agent-tower 0.7.2-beta.1 → 0.7.2-beta.4

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 (209) hide show
  1. package/dist/executors/base.executor.d.ts.map +1 -1
  2. package/dist/executors/base.executor.js +6 -3
  3. package/dist/executors/base.executor.js.map +1 -1
  4. package/dist/routes/__tests__/workspaces.test.js +80 -0
  5. package/dist/routes/__tests__/workspaces.test.js.map +1 -1
  6. package/dist/routes/workspaces.js +1 -1
  7. package/dist/routes/workspaces.js.map +1 -1
  8. package/dist/runtime/__tests__/cli-driver-lifecycle.test.js +37 -0
  9. package/dist/runtime/__tests__/cli-driver-lifecycle.test.js.map +1 -1
  10. package/dist/runtime/__tests__/runtime-coordinator.test.js +13 -0
  11. package/dist/runtime/__tests__/runtime-coordinator.test.js.map +1 -1
  12. package/dist/runtime/cli-driver.js +17 -3
  13. package/dist/runtime/cli-driver.js.map +1 -1
  14. package/dist/runtime/contracts.d.ts +9 -2
  15. package/dist/runtime/contracts.d.ts.map +1 -1
  16. package/dist/runtime/runtime-coordinator.d.ts +2 -0
  17. package/dist/runtime/runtime-coordinator.d.ts.map +1 -1
  18. package/dist/runtime/runtime-coordinator.js +10 -0
  19. package/dist/runtime/runtime-coordinator.js.map +1 -1
  20. package/dist/services/__tests__/session-manager.lifecycle.test.js +67 -0
  21. package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
  22. package/dist/services/__tests__/session-manager.team-run.test.js +41 -46
  23. package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
  24. package/dist/services/__tests__/team-reconciler.service.test.js +30 -0
  25. package/dist/services/__tests__/team-reconciler.service.test.js.map +1 -1
  26. package/dist/services/project.service.d.ts.map +1 -1
  27. package/dist/services/project.service.js +30 -4
  28. package/dist/services/project.service.js.map +1 -1
  29. package/dist/services/session-manager.d.ts +1 -0
  30. package/dist/services/session-manager.d.ts.map +1 -1
  31. package/dist/services/session-manager.js +38 -3
  32. package/dist/services/session-manager.js.map +1 -1
  33. package/dist/services/session-runtime-cleanup-gate.d.ts +1 -0
  34. package/dist/services/session-runtime-cleanup-gate.d.ts.map +1 -1
  35. package/dist/services/session-runtime-cleanup-gate.js +5 -3
  36. package/dist/services/session-runtime-cleanup-gate.js.map +1 -1
  37. package/dist/services/team-reconciler.service.d.ts +1 -0
  38. package/dist/services/team-reconciler.service.d.ts.map +1 -1
  39. package/dist/services/team-reconciler.service.js +1 -0
  40. package/dist/services/team-reconciler.service.js.map +1 -1
  41. package/dist/services/workspace.service.js +8 -8
  42. package/dist/services/workspace.service.js.map +1 -1
  43. package/dist/utils/__tests__/spawned-process-identity.test.d.ts +2 -0
  44. package/dist/utils/__tests__/spawned-process-identity.test.d.ts.map +1 -0
  45. package/dist/utils/__tests__/spawned-process-identity.test.js +31 -0
  46. package/dist/utils/__tests__/spawned-process-identity.test.js.map +1 -0
  47. package/dist/utils/spawned-process-identity.d.ts +1 -1
  48. package/dist/utils/spawned-process-identity.d.ts.map +1 -1
  49. package/dist/utils/spawned-process-identity.js +11 -3
  50. package/dist/utils/spawned-process-identity.js.map +1 -1
  51. package/dist/web/assets/AgentDemoPage-Svq9Baa7.js +1 -0
  52. package/dist/web/assets/{AgentEnvironmentSettingsPage-DfVjAeK8.js → AgentEnvironmentSettingsPage-DQjnDr-h.js} +1 -1
  53. package/dist/web/assets/AgentLogo-I2etsqym.js +1 -0
  54. package/dist/web/assets/BranchSelect-Eb5UGWWX.js +1 -0
  55. package/dist/web/assets/BrandLogo-BjC1hcgv.js +1 -0
  56. package/dist/web/assets/{ConversationPage-Bh_x9kK3.js → ConversationPage-jEYUuSPT.js} +2 -2
  57. package/dist/web/assets/CreateTaskInput-B_cRDkVq.js +1 -0
  58. package/dist/web/assets/{DemoPage-xys5j303.js → DemoPage-BkkueMuL.js} +1 -1
  59. package/dist/web/assets/DesignSystemPage-oM16R2Ta.js +16 -0
  60. package/dist/web/assets/{ExecutionPermissionSelector-CTeKhMaB.js → ExecutionPermissionSelector-BX5Xx8ta.js} +1 -1
  61. package/dist/web/assets/{GeneralSettingsPage-BZEcE8xN.js → GeneralSettingsPage-B0jFlgDl.js} +1 -1
  62. package/dist/web/assets/{LoadingPreviewPage-D81UstX2.js → LoadingPreviewPage-BxjpxLLP.js} +1 -1
  63. package/dist/web/assets/McpSettingsPage-BErvd619.js +1 -0
  64. package/dist/web/assets/{MemberAvatar-BuueBvLu.js → MemberAvatar-TVtoxQe8.js} +1 -1
  65. package/dist/web/assets/NotificationSettingsPage-BETMBdj1.js +1 -0
  66. package/dist/web/assets/{ProfileSettingsPage-DdK3Q2wl.js → ProfileSettingsPage-C03ZAft-.js} +1 -1
  67. package/dist/web/assets/ProjectKanbanPage-DsPxwoVf.js +86 -0
  68. package/dist/web/assets/ProjectSettingsPage-BwNM6VWs.js +2 -0
  69. package/dist/web/assets/{ProviderSettingsPage-CiTp3QwX.js → ProviderSettingsPage-CeNQPd74.js} +3 -3
  70. package/dist/web/assets/{SettingsMasterDetail-BhepxZ5b.js → SettingsMasterDetail-B_SI2h_k.js} +1 -1
  71. package/dist/web/assets/TeamSettingsPage-BfgtMl_n.js +1 -0
  72. package/dist/web/assets/agent-meta-DOylIs2N.js +1 -0
  73. package/dist/web/assets/arc-BlZww3MO.js +1 -0
  74. package/dist/web/assets/{architectureDiagram-3BPJPVTR-Byb8rrNU.js → architectureDiagram-3BPJPVTR-DWO_DRgk.js} +1 -1
  75. package/dist/web/assets/at-sign-BFf8Sz8T.js +1 -0
  76. package/dist/web/assets/{blockDiagram-GPEHLZMM-DGcS4UET.js → blockDiagram-GPEHLZMM-CJPYhE52.js} +1 -1
  77. package/dist/web/assets/{c4Diagram-AAUBKEIU-BRyJRATZ.js → c4Diagram-AAUBKEIU-Cx5IvcjB.js} +1 -1
  78. package/dist/web/assets/channel-D9sA6Wxp.js +1 -0
  79. package/dist/web/assets/check-Cm7Vstpm.js +1 -0
  80. package/dist/web/assets/chevron-down-C6Ta4vyM.js +1 -0
  81. package/dist/web/assets/chevron-up-BwJT7iif.js +1 -0
  82. package/dist/web/assets/{chunk-2J33WTMH-DgL3sVcs.js → chunk-2J33WTMH-D9cBNYgd.js} +1 -1
  83. package/dist/web/assets/{chunk-4BX2VUAB-BVgUUvCo.js → chunk-4BX2VUAB-BY8TNt6E.js} +1 -1
  84. package/dist/web/assets/{chunk-55IACEB6-CfD9Uy7p.js → chunk-55IACEB6-pT-HP-28.js} +1 -1
  85. package/dist/web/assets/{chunk-727SXJPM-D8gRbLX6.js → chunk-727SXJPM-hy95xDLb.js} +1 -1
  86. package/dist/web/assets/{chunk-AQP2D5EJ-CwBPJyzk.js → chunk-AQP2D5EJ-DlUN-icr.js} +1 -1
  87. package/dist/web/assets/{chunk-FMBD7UC4-B0b7Iiv3.js → chunk-FMBD7UC4-Dg2iMKZR.js} +1 -1
  88. package/dist/web/assets/{chunk-ND2GUHAM-D0Y5tagg.js → chunk-ND2GUHAM-DMzFIsJ-.js} +1 -1
  89. package/dist/web/assets/{chunk-QZHKN3VN-qVEPtRTm.js → chunk-QZHKN3VN-C6CgmKuM.js} +1 -1
  90. package/dist/web/assets/{circle-alert-C_ON1rCL.js → circle-alert-Dm2Pl-rU.js} +1 -1
  91. package/dist/web/assets/classDiagram-4FO5ZUOK-2e2YVo9r.js +1 -0
  92. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-2e2YVo9r.js +1 -0
  93. package/dist/web/assets/code-block-OCS4YCEC-DizntuP_.js +2 -0
  94. package/dist/web/assets/{confirm-dialog-Drhw7wmk.js → confirm-dialog-DRpyE_qU.js} +1 -1
  95. package/dist/web/assets/copy-r0aUdsl8.js +1 -0
  96. package/dist/web/assets/{cose-bilkent-S5V4N54A-BoSlujEJ.js → cose-bilkent-S5V4N54A-D-fvmvw-.js} +1 -1
  97. package/dist/web/assets/cssMode-DVorIr82.js +1 -0
  98. package/dist/web/assets/{dagre-BM42HDAG-DWm_GyDR.js → dagre-BM42HDAG-H0bYI1f3.js} +1 -1
  99. package/dist/web/assets/{diagram-2AECGRRQ-CVtgrsl0.js → diagram-2AECGRRQ-DI568fLp.js} +1 -1
  100. package/dist/web/assets/{diagram-5GNKFQAL-XNMIXdme.js → diagram-5GNKFQAL-BLcaBzw2.js} +1 -1
  101. package/dist/web/assets/{diagram-KO2AKTUF-CYXdL2cC.js → diagram-KO2AKTUF-aL1cvl23.js} +1 -1
  102. package/dist/web/assets/{diagram-LMA3HP47-8MCVTTrT.js → diagram-LMA3HP47-DbOutAfH.js} +1 -1
  103. package/dist/web/assets/{diagram-OG6HWLK6-DMWgHctP.js → diagram-OG6HWLK6-D_cWftAX.js} +1 -1
  104. package/dist/web/assets/{erDiagram-TEJ5UH35-D3qp5csl.js → erDiagram-TEJ5UH35-DRe5V8Dx.js} +1 -1
  105. package/dist/web/assets/{flowDiagram-I6XJVG4X-D-Bem31x.js → flowDiagram-I6XJVG4X-B5-vg_Nh.js} +1 -1
  106. package/dist/web/assets/{freemarker2-D7pixABp.js → freemarker2-CXlYb2yX.js} +3 -3
  107. package/dist/web/assets/{ganttDiagram-6RSMTGT7-D5ctgPCm.js → ganttDiagram-6RSMTGT7-B3iBFICN.js} +1 -1
  108. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-lA3I18_r.js → gitGraphDiagram-PVQCEYII-CZ9zsKVw.js} +1 -1
  109. package/dist/web/assets/globe-JXfw4MCF.js +1 -0
  110. package/dist/web/assets/handlebars-BL0prPVZ.js +1 -0
  111. package/dist/web/assets/html-DJWeRkWe.js +1 -0
  112. package/dist/web/assets/htmlMode-D_fekqg9.js +1 -0
  113. package/dist/web/assets/{index-CA_B15_q.js → index-CWEbo6pZ.js} +5 -5
  114. package/dist/web/assets/{index-ClhIruws.js → index-CWbMMO6g.js} +13 -13
  115. package/dist/web/assets/index-uXglTJ2_.css +1 -0
  116. package/dist/web/assets/{infoDiagram-5YYISTIA-CGy_XnVP.js → infoDiagram-5YYISTIA-DQU_sN8x.js} +1 -1
  117. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-DFGAkcYD.js → ishikawaDiagram-YF4QCWOH-BVGrNzJa.js} +1 -1
  118. package/dist/web/assets/javascript-CDfuzdfe.js +1 -0
  119. package/dist/web/assets/{journeyDiagram-JHISSGLW-C9ZHl7QM.js → journeyDiagram-JHISSGLW-DU4Md1Tq.js} +1 -1
  120. package/dist/web/assets/{jsonMode-bD-WsLyj.js → jsonMode-BMSvHUHa.js} +4 -4
  121. package/dist/web/assets/{kanban-definition-UN3LZRKU-BbbRnxDG.js → kanban-definition-UN3LZRKU-DDPgCucq.js} +1 -1
  122. package/dist/web/assets/key-round-BHVp7u3Z.js +1 -0
  123. package/dist/web/assets/{layers-BlEewgM8.js → layers-2tjjhM75.js} +1 -1
  124. package/dist/web/assets/{linear-D04wUvKo.js → linear-D8yLBTVY.js} +1 -1
  125. package/dist/web/assets/link-CnunXc7X.js +1 -0
  126. package/dist/web/assets/liquid-DHrNpv6c.js +1 -0
  127. package/dist/web/assets/{lspLanguageFeatures-jn1q-hoP.js → lspLanguageFeatures-BiYvrSP0.js} +1 -1
  128. package/dist/web/assets/mdx-CIEpgUOV.js +1 -0
  129. package/dist/web/assets/mermaid-NOHMQCX5-9-DTTfp6.js +124 -0
  130. package/dist/web/assets/{message-square-CTrwLud_.js → message-square-QM0c6Dcv.js} +1 -1
  131. package/dist/web/assets/{mindmap-definition-RKZ34NQL-n24WGa7x.js → mindmap-definition-RKZ34NQL-CCAuuWFZ.js} +1 -1
  132. package/dist/web/assets/{modal-BFDGLwoR.js → modal-BRoNvfhw.js} +1 -1
  133. package/dist/web/assets/{monaco-CirwkIGR.js → monaco-CrBn9oMJ.js} +3 -3
  134. package/dist/web/assets/paperclip-CC7nHUQ7.js +1 -0
  135. package/dist/web/assets/pencil-DIY0Hu5t.js +1 -0
  136. package/dist/web/assets/{pieDiagram-4H26LBE5-CUMw3DZK.js → pieDiagram-4H26LBE5-CXy_N5QX.js} +2 -2
  137. package/dist/web/assets/play-CIZVXiwM.js +1 -0
  138. package/dist/web/assets/python-BIs0pClJ.js +1 -0
  139. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-DMshWJZy.js → quadrantDiagram-W4KKPZXB-Dt44QsS8.js} +1 -1
  140. package/dist/web/assets/razor-JCx8NEwU.js +1 -0
  141. package/dist/web/assets/{requirementDiagram-4Y6WPE33-B4Jx_Yx6.js → requirementDiagram-4Y6WPE33-BL8D7Np0.js} +1 -1
  142. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-CN2JbWht.js → sankeyDiagram-5OEKKPKP-I5nefO3A.js} +1 -1
  143. package/dist/web/assets/{select-CLV6rtRD.js → select-BmjoUfrV.js} +1 -1
  144. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-B4bMaYD_.js → sequenceDiagram-3UESZ5HK-lbPrhX8g.js} +1 -1
  145. package/dist/web/assets/server-BNBdQGor.js +1 -0
  146. package/dist/web/assets/stateDiagram-AJRCARHV-Bw3qtv2M.js +1 -0
  147. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Xbc4HxDQ.js +1 -0
  148. package/dist/web/assets/{switch-Ch_hFX_n.js → switch-CEUHI4gI.js} +1 -1
  149. package/dist/web/assets/task-kalEmHDc.js +42 -0
  150. package/dist/web/assets/task-priority-wLXAgVZZ.js +1 -0
  151. package/dist/web/assets/{textarea-DDy2_gLQ.js → textarea-CD82lB0Z.js} +1 -1
  152. package/dist/web/assets/{timeline-definition-PNZ67QCA-BuLxqHOL.js → timeline-definition-PNZ67QCA-Cfg_kgoa.js} +1 -1
  153. package/dist/web/assets/{trash-2-DrNpNvRo.js → trash-2-BF_3L-qk.js} +1 -1
  154. package/dist/web/assets/{tsMode-qES9KHvZ.js → tsMode-DAHSkTAr.js} +2 -2
  155. package/dist/web/assets/typescript-CptiLWGr.js +1 -0
  156. package/dist/web/assets/{upload-D6SifUfr.js → upload-B2AMXrU-.js} +1 -1
  157. package/dist/web/assets/{use-profiles-DUoivbBF.js → use-profiles-CQ-jIuiI.js} +1 -1
  158. package/dist/web/assets/use-projects-BYUZwQ-q.js +1 -0
  159. package/dist/web/assets/{use-providers-BKYsoOBU.js → use-providers-DdV9gbj1.js} +1 -1
  160. package/dist/web/assets/useNormalizedLogs-DdFsf-Z1.js +1 -0
  161. package/dist/web/assets/{vennDiagram-CIIHVFJN-LoQ_fciU.js → vennDiagram-CIIHVFJN-CdEP03CK.js} +1 -1
  162. package/dist/web/assets/{wardley-L42UT6IY-Dh_9I9Zv.js → wardley-L42UT6IY-q_Enplrs.js} +1 -1
  163. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-CQ-yZsuW.js → wardleyDiagram-YWT4CUSO-DlL6fsid.js} +1 -1
  164. package/dist/web/assets/xml-DbPqkgZW.js +1 -0
  165. package/dist/web/assets/{xychartDiagram-2RQKCTM6-HLyImhwf.js → xychartDiagram-2RQKCTM6-B2OGqVKA.js} +1 -1
  166. package/dist/web/assets/yaml-Deyq6Z5-.js +1 -0
  167. package/dist/web/index.html +2 -2
  168. package/node_modules/@agent-tower/shared/dist/types.d.ts +1 -1
  169. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  170. package/package.json +1 -1
  171. package/dist/web/assets/AgentDemoPage-CCw9EfsA.js +0 -1
  172. package/dist/web/assets/AgentLogo-BhKP5dmt.js +0 -1
  173. package/dist/web/assets/CreateTaskInput-D_KCLZ4q.js +0 -1
  174. package/dist/web/assets/McpSettingsPage-Ch1U9tIg.js +0 -1
  175. package/dist/web/assets/NotificationSettingsPage-IHVOP-Vc.js +0 -1
  176. package/dist/web/assets/ProjectKanbanPage-VFkvX9IJ.js +0 -86
  177. package/dist/web/assets/ProjectSettingsPage-BlRbxcf8.js +0 -2
  178. package/dist/web/assets/TeamSettingsPage-JaLFYXmJ.js +0 -1
  179. package/dist/web/assets/arc-Bd616RKq.js +0 -1
  180. package/dist/web/assets/channel-DJbXDmr3.js +0 -1
  181. package/dist/web/assets/check-Bj-p_n7C.js +0 -1
  182. package/dist/web/assets/chevron-down-BouKK_Vr.js +0 -1
  183. package/dist/web/assets/chevron-right-DJVYJhGF.js +0 -1
  184. package/dist/web/assets/chevron-up-CRlA9Cjl.js +0 -1
  185. package/dist/web/assets/classDiagram-4FO5ZUOK-BIz565rI.js +0 -1
  186. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BIz565rI.js +0 -1
  187. package/dist/web/assets/code-block-OCS4YCEC-wB-pkznC.js +0 -2
  188. package/dist/web/assets/cssMode-DBSRGK6o.js +0 -1
  189. package/dist/web/assets/globe-AjOch0vk.js +0 -1
  190. package/dist/web/assets/handlebars-B10IREzV.js +0 -1
  191. package/dist/web/assets/html-BpG68rDt.js +0 -1
  192. package/dist/web/assets/htmlMode-DuHt_Jpu.js +0 -1
  193. package/dist/web/assets/index-NxnivNNl.css +0 -1
  194. package/dist/web/assets/javascript-BupP80yJ.js +0 -1
  195. package/dist/web/assets/liquid-C57aZJpn.js +0 -1
  196. package/dist/web/assets/mdx-CEldzbGM.js +0 -1
  197. package/dist/web/assets/mermaid-NOHMQCX5-BsnLQ2rU.js +0 -124
  198. package/dist/web/assets/pencil-DQeFTV0j.js +0 -1
  199. package/dist/web/assets/python-B5Uu3BYh.js +0 -1
  200. package/dist/web/assets/razor-BW2eCr4L.js +0 -1
  201. package/dist/web/assets/server-Dhw531hF.js +0 -1
  202. package/dist/web/assets/stateDiagram-AJRCARHV-CJAmyasO.js +0 -1
  203. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CXOXut1l.js +0 -1
  204. package/dist/web/assets/typescript-DyiE-tjk.js +0 -1
  205. package/dist/web/assets/use-projects-CNU2P0v0.js +0 -1
  206. package/dist/web/assets/use-workspaces-C1HJqhNs.js +0 -1
  207. package/dist/web/assets/useNormalizedLogs-Bu2oXEky.js +0 -1
  208. package/dist/web/assets/xml-BNpVw2Ox.js +0 -1
  209. package/dist/web/assets/yaml-DtqgC7D8.js +0 -1
@@ -0,0 +1,16 @@
1
+ import{c as X,r as c,j as e,ax as re,an as Y,al as an,aU as Oa,D as $a,aV as cu,U as La,W as ts,T as wt,ak as Ln,aj as za,aW as Fa,C as du,aX as ns,a1 as uu,ae as xu,X as mn,s as Ga,a5 as Cr,l as j,u as Be,a8 as Us,aY as mu,aB as Vs,aZ as pu}from"./index-CWbMMO6g.js";import{G as hu,S as Ba,M as fu,B as gu}from"./BrandLogo-BjC1hcgv.js";import{h as K,i as xe,u as ue,j as je,k as _,l as be,m as ss,R as kr,n as Sr,o as Mr,p as _r,D as rs,q as ju,r as as,s as Gt,t as os,A as Tr,v as Bt,w as vu,C as Rr,x as Er,y as Qe,G as bu,a as Ua,T as dt,z as on,E as Le,H as Va,I as Re,J as Nu,K as Ir,L as Ka,N as Ha,O as Wa,Q as wu,M as pn,d as hn,e as Ue,V as yt,W as fn,X as gn,Y as At,Z as ln,_ as is,$ as cn,a0 as We,B as F,a1 as Ar,a2 as I,a3 as ze,a4 as Pr,a5 as Pt,a6 as ls,a7 as oe,a8 as ae,a9 as ce,aa as yu,ab as Ct,ac as De,ad as ft,ae as jn,af as ut,ag as cs,ah as qa,ai as vn,aj as Dr,ak as gt,al as Ya,am as Ce,an as En,ao as Xa,ap as Or,aq as In,ar as An,as as zn,at as Za,au as xt,av as qt,aw as Tt,ax as He,ay as Qa,az as Ks,aA as Fn,P as Ja,aB as Cu,aC as Hs,c as eo,b as to,aD as lt,aE as Ut,aF as jt,aG as $r,aH as Me,S as Ws,aI as no,aJ as ku,aK as Su,aL as so,aM as Gn,aN as ro,aO as Mu,aP as ao,aQ as oo,aR as io,aS as _u,aT as lo,aU as Tu,aV as Ru,aW as Eu,aX as Iu,aY as Lr,U as ct,g as ja}from"./task-kalEmHDc.js";import{H as Au,C as co,P as uo,F as xo}from"./play-CIZVXiwM.js";import{C as ds}from"./circle-alert-Dm2Pl-rU.js";import{K as Pu}from"./key-round-BHVp7u3Z.js";import{G as Du}from"./globe-JXfw4MCF.js";import{S as Ou}from"./server-BNBdQGor.js";import{F as mo,C as us,A as q,T as _e,b as Bn,j as $u}from"./agent-meta-DOylIs2N.js";import{G as Un,a as xs,S as po,F as qs,A as ho}from"./task-priority-wLXAgVZZ.js";import{L as Lu}from"./link-CnunXc7X.js";import{P as fo}from"./paperclip-CC7nHUQ7.js";import{U as zu}from"./upload-B2AMXrU-.js";import{C as Oe}from"./check-Cm7Vstpm.js";import{C as Vn}from"./copy-r0aUdsl8.js";import{T as Lt,P as Kn}from"./trash-2-BF_3L-qk.js";import{P as go}from"./pencil-DIY0Hu5t.js";import{C as ms}from"./chevron-down-C6Ta4vyM.js";import{M as Fu}from"./message-square-QM0c6Dcv.js";import{L as jo}from"./layers-2tjjhM75.js";import{A as Te}from"./AgentLogo-I2etsqym.js";const Gu=[["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"}]],vo=X("activity",Gu);const Bu=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],Uu=X("app-window",Bu);const Vu=[["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"}]],Ku=X("archive",Vu);const Hu=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],bo=X("arrow-up-down",Hu);const Wu=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],No=X("arrow-up-right",Wu);const qu=[["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"}]],Yu=X("book-open",qu);const Xu=[["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"}]],Zu=X("bug",Xu);const Qu=[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],wo=X("calendar-days",Qu);const Ju=[["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"}]],yo=X("chart-column",Ju);const ex=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ys=X("clock",ex);const tx=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],nx=X("columns-3",tx);const sx=[["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"}]],Co=X("ellipsis",sx);const rx=[["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:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],ax=X("file-diff",rx);const ox=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],zr=X("flag",ox);const ix=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Fr=X("git-merge",ix);const lx=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],ko=X("git-pull-request",lx);const cx=[["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"}]],dx=X("grip-vertical",cx);const ux=[["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"}]],xx=X("house",ux);const mx=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],So=X("inbox",mx);const px=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],hx=X("layout-grid",px);const fx=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Mo=X("list-filter",fx);const gx=[["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"}]],jx=X("lock",gx);const vx=[["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"}]],bx=X("log-out",vx);const Nx=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]],wx=X("mouse-pointer-2",Nx);const yx=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Cx=X("pin",yx);const kx=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],Sx=X("plug",kx);const Mx=[["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"}]],Rt=X("rotate-cw",Mx);const _x=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],Tx=X("rows-3",_x);const Rx=[["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"}]],Ex=X("sparkles",Rx);const Ix=[["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"}]],tn=X("square-terminal",Ix);const Ax=[["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"}]],Px=X("star",Ax);const Dx=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],_o=X("table-2",Dx);const Ox=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],$x=X("target",Ox);const Lx=[["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"}]],zx=X("user",Lx);const Fx=[["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"}]],Gx=X("workflow",Fx);var To=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Bx="VisuallyHidden",Ro=c.forwardRef((t,n)=>e.jsx(K.span,{...t,ref:n,style:{...To,...t.style}}));Ro.displayName=Bx;var Ux=Ro;function ps(t){const n=t+"CollectionProvider",[s,r]=xe(n),[a,o]=s(n,{collectionRef:{current:null},itemMap:new Map}),i=f=>{const{scope:v,children:g}=f,N=re.useRef(null),w=re.useRef(new Map).current;return e.jsx(a,{scope:v,itemMap:w,collectionRef:N,children:g})};i.displayName=n;const l=t+"CollectionSlot",u=an(l),x=re.forwardRef((f,v)=>{const{scope:g,children:N}=f,w=o(l,g),y=Y(v,w.collectionRef);return e.jsx(u,{ref:y,children:N})});x.displayName=l;const d=t+"CollectionItemSlot",m="data-radix-collection-item",p=an(d),b=re.forwardRef((f,v)=>{const{scope:g,children:N,...w}=f,y=re.useRef(null),M=Y(v,y),P=o(d,g);return re.useEffect(()=>(P.itemMap.set(y,{ref:y,...w}),()=>{P.itemMap.delete(y)})),e.jsx(p,{[m]:"",ref:M,children:N})});b.displayName=d;function h(f){const v=o(t+"CollectionConsumer",f);return re.useCallback(()=>{const N=v.collectionRef.current;if(!N)return[];const w=Array.from(N.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((P,A)=>w.indexOf(P.ref.current)-w.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:x,ItemSlot:b},h,r]}var Vx=c.createContext(void 0);function kt(t){const n=c.useContext(Vx);return t||n||"ltr"}var hs="Dialog",[Eo]=xe(hs),[Kx,Ee]=Eo(hs),Io=t=>{const{__scopeDialog:n,children:s,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=t,l=c.useRef(null),u=c.useRef(null),[x,d]=ue({prop:r,defaultProp:a??!1,onChange:o,caller:hs});return e.jsx(Kx,{scope:n,triggerRef:l,contentRef:u,contentId:je(),titleId:je(),descriptionId:je(),open:x,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(m=>!m),[d]),modal:i,children:s})};Io.displayName=hs;var Ao="DialogTrigger",Po=c.forwardRef((t,n)=>{const{__scopeDialog:s,...r}=t,a=Ee(Ao,s),o=Y(n,a.triggerRef);return e.jsx(K.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Ur(a.open),...r,ref:o,onClick:_(t.onClick,a.onOpenToggle)})});Po.displayName=Ao;var Gr="DialogPortal",[Hx,Do]=Eo(Gr,{forceMount:void 0}),Oo=t=>{const{__scopeDialog:n,forceMount:s,children:r,container:a}=t,o=Ee(Gr,n);return e.jsx(Hx,{scope:n,forceMount:s,children:c.Children.map(r,i=>e.jsx(be,{present:s||o.open,children:e.jsx(ss,{asChild:!0,container:a,children:i})}))})};Oo.displayName=Gr;var Hn="DialogOverlay",$o=c.forwardRef((t,n)=>{const s=Do(Hn,t.__scopeDialog),{forceMount:r=s.forceMount,...a}=t,o=Ee(Hn,t.__scopeDialog);return o.modal?e.jsx(be,{present:r||o.open,children:e.jsx(qx,{...a,ref:n})}):null});$o.displayName=Hn;var Wx=an("DialogOverlay.RemoveScroll"),qx=c.forwardRef((t,n)=>{const{__scopeDialog:s,...r}=t,a=Ee(Hn,s);return e.jsx(kr,{as:Wx,allowPinchZoom:!0,shards:[a.contentRef],children:e.jsx(K.div,{"data-state":Ur(a.open),...r,ref:n,style:{pointerEvents:"auto",...r.style}})})}),vt="DialogContent",Lo=c.forwardRef((t,n)=>{const s=Do(vt,t.__scopeDialog),{forceMount:r=s.forceMount,...a}=t,o=Ee(vt,t.__scopeDialog);return e.jsx(be,{present:r||o.open,children:o.modal?e.jsx(Yx,{...a,ref:n}):e.jsx(Xx,{...a,ref:n})})});Lo.displayName=vt;var Yx=c.forwardRef((t,n)=>{const s=Ee(vt,t.__scopeDialog),r=c.useRef(null),a=Y(n,s.contentRef,r);return c.useEffect(()=>{const o=r.current;if(o)return Sr(o)},[]),e.jsx(zo,{...t,ref:a,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(t.onCloseAutoFocus,o=>{o.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:_(t.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:_(t.onFocusOutside,o=>o.preventDefault())})}),Xx=c.forwardRef((t,n)=>{const s=Ee(vt,t.__scopeDialog),r=c.useRef(!1),a=c.useRef(!1);return e.jsx(zo,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{t.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||s.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{t.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=o.target;s.triggerRef.current?.contains(i)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),zo=c.forwardRef((t,n)=>{const{__scopeDialog:s,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=t,l=Ee(vt,s),u=c.useRef(null),x=Y(n,u);return Mr(),e.jsxs(e.Fragment,{children:[e.jsx(_r,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:e.jsx(rs,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Ur(l.open),...i,ref:x,onDismiss:()=>l.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(Zx,{titleId:l.titleId}),e.jsx(Jx,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Br="DialogTitle",Fo=c.forwardRef((t,n)=>{const{__scopeDialog:s,...r}=t,a=Ee(Br,s);return e.jsx(K.h2,{id:a.titleId,...r,ref:n})});Fo.displayName=Br;var Go="DialogDescription",Bo=c.forwardRef((t,n)=>{const{__scopeDialog:s,...r}=t,a=Ee(Go,s);return e.jsx(K.p,{id:a.descriptionId,...r,ref:n})});Bo.displayName=Go;var Uo="DialogClose",Vo=c.forwardRef((t,n)=>{const{__scopeDialog:s,...r}=t,a=Ee(Uo,s);return e.jsx(K.button,{type:"button",...r,ref:n,onClick:_(t.onClick,()=>a.onOpenChange(!1))})});Vo.displayName=Uo;function Ur(t){return t?"open":"closed"}var Ko="DialogTitleWarning",[ov,Ho]=ju(Ko,{contentName:vt,titleName:Br,docsSlug:"dialog"}),Zx=({titleId:t})=>{const n=Ho(Ko),s=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
2
+
3
+ If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
4
+
5
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return c.useEffect(()=>{t&&(document.getElementById(t)||console.error(s))},[s,t]),null},Qx="DialogDescriptionWarning",Jx=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ho(Qx).contentName}}.`;return c.useEffect(()=>{const a=t.current?.getAttribute("aria-describedby");n&&a&&(document.getElementById(n)||console.warn(r))},[r,t,n]),null},em=Io,tm=Po,nm=Oo,sm=$o,rm=Lo,am=Fo,om=Bo,Wo=Vo;function bn(t){const n=c.useRef({value:t,previous:t});return c.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}var fs="Checkbox",[im]=xe(fs),[lm,Vr]=im(fs);function cm(t){const{__scopeCheckbox:n,checked:s,children:r,defaultChecked:a,disabled:o,form:i,name:l,onCheckedChange:u,required:x,value:d="on",internal_do_not_use_render:m}=t,[p,b]=ue({prop:s,defaultProp:a??!1,onChange:u,caller:fs}),[h,f]=c.useState(null),[v,g]=c.useState(null),N=c.useRef(!1),w=h?!!i||!!h.closest("form"):!0,y={checked:p,disabled:o,setChecked:b,control:h,setControl:f,name:l,form:i,value:d,hasConsumerStoppedPropagationRef:N,required:x,defaultChecked:Ye(a)?!1:a,isFormControl:w,bubbleInput:v,setBubbleInput:g};return e.jsx(lm,{scope:n,...y,children:dm(m)?m(y):r})}var qo="CheckboxTrigger",Yo=c.forwardRef(({__scopeCheckbox:t,onKeyDown:n,onClick:s,...r},a)=>{const{control:o,value:i,disabled:l,checked:u,required:x,setControl:d,setChecked:m,hasConsumerStoppedPropagationRef:p,isFormControl:b,bubbleInput:h}=Vr(qo,t),f=Y(a,d),v=c.useRef(u);return c.useEffect(()=>{const g=o?.form;if(g){const N=()=>m(v.current);return g.addEventListener("reset",N),()=>g.removeEventListener("reset",N)}},[o,m]),e.jsx(K.button,{type:"button",role:"checkbox","aria-checked":Ye(u)?"mixed":u,"aria-required":x,"data-state":ti(u),"data-disabled":l?"":void 0,disabled:l,value:i,...r,ref:f,onKeyDown:_(n,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:_(s,g=>{m(N=>Ye(N)?!0:!N),h&&b&&(p.current=g.isPropagationStopped(),p.current||g.stopPropagation())})})});Yo.displayName=qo;var Xo=c.forwardRef((t,n)=>{const{__scopeCheckbox:s,name:r,checked:a,defaultChecked:o,required:i,disabled:l,value:u,onCheckedChange:x,form:d,...m}=t;return e.jsx(cm,{__scopeCheckbox:s,checked:a,defaultChecked:o,disabled:l,required:i,onCheckedChange:x,name:r,form:d,value:u,internal_do_not_use_render:({isFormControl:p})=>e.jsxs(e.Fragment,{children:[e.jsx(Yo,{...m,ref:n,__scopeCheckbox:s}),p&&e.jsx(ei,{__scopeCheckbox:s})]})})});Xo.displayName=fs;var Zo="CheckboxIndicator",Qo=c.forwardRef((t,n)=>{const{__scopeCheckbox:s,forceMount:r,...a}=t,o=Vr(Zo,s);return e.jsx(be,{present:r||Ye(o.checked)||o.checked===!0,children:e.jsx(K.span,{"data-state":ti(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:n,style:{pointerEvents:"none",...t.style}})})});Qo.displayName=Zo;var Jo="CheckboxBubbleInput",ei=c.forwardRef(({__scopeCheckbox:t,...n},s)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:i,required:l,disabled:u,name:x,value:d,form:m,bubbleInput:p,setBubbleInput:b}=Vr(Jo,t),h=Y(s,b),f=bn(o),v=as(r);c.useEffect(()=>{const N=p;if(!N)return;const w=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(w,"checked").set,P=!a.current;if(f!==o&&M){const A=new Event("click",{bubbles:P});N.indeterminate=Ye(o),M.call(N,Ye(o)?!1:o),N.dispatchEvent(A)}},[p,f,o,a]);const g=c.useRef(Ye(o)?!1:o);return e.jsx(K.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??g.current,required:l,disabled:u,name:x,value:d,form:m,...n,tabIndex:-1,ref:h,style:{...n.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ei.displayName=Jo;function dm(t){return typeof t=="function"}function Ye(t){return t==="indeterminate"}function ti(t){return Ye(t)?"indeterminate":t?"checked":"unchecked"}var Ls="rovingFocusGroup.onEntryFocus",um={bubbles:!1,cancelable:!0},Nn="RovingFocusGroup",[Xs,ni,xm]=ps(Nn),[mm,et]=xe(Nn,[xm]),[pm,hm]=mm(Nn),si=c.forwardRef((t,n)=>e.jsx(Xs.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(Xs.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(fm,{...t,ref:n})})}));si.displayName=Nn;var fm=c.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:s,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:x,preventScrollOnEntryFocus:d=!1,...m}=t,p=c.useRef(null),b=Y(n,p),h=kt(o),[f,v]=ue({prop:i,defaultProp:l??null,onChange:u,caller:Nn}),[g,N]=c.useState(!1),w=Gt(x),y=ni(s),M=c.useRef(!1),[P,A]=c.useState(0);return c.useEffect(()=>{const E=p.current;if(E)return E.addEventListener(Ls,w),()=>E.removeEventListener(Ls,w)},[w]),e.jsx(pm,{scope:s,orientation:r,dir:h,loop:a,currentTabStopId:f,onItemFocus:c.useCallback(E=>v(E),[v]),onItemShiftTab:c.useCallback(()=>N(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(E=>E+1),[]),onFocusableItemRemove:c.useCallback(()=>A(E=>E-1),[]),children:e.jsx(K.div,{tabIndex:g||P===0?-1:0,"data-orientation":r,...m,ref:b,style:{outline:"none",...t.style},onMouseDown:_(t.onMouseDown,()=>{M.current=!0}),onFocus:_(t.onFocus,E=>{const G=!M.current;if(E.target===E.currentTarget&&G&&!g){const U=new CustomEvent(Ls,um);if(E.currentTarget.dispatchEvent(U),!U.defaultPrevented){const S=y().filter(T=>T.focusable),L=S.find(T=>T.active),O=S.find(T=>T.id===f),R=[L,O,...S].filter(Boolean).map(T=>T.ref.current);oi(R,d)}}M.current=!1}),onBlur:_(t.onBlur,()=>N(!1))})})}),ri="RovingFocusGroupItem",ai=c.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:s,focusable:r=!0,active:a=!1,tabStopId:o,children:i,...l}=t,u=je(),x=o||u,d=hm(ri,s),m=d.currentTabStopId===x,p=ni(s),{onFocusableItemAdd:b,onFocusableItemRemove:h,currentTabStopId:f}=d;return c.useEffect(()=>{if(r)return b(),()=>h()},[r,b,h]),e.jsx(Xs.ItemSlot,{scope:s,id:x,focusable:r,active:a,children:e.jsx(K.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:_(t.onMouseDown,v=>{r?d.onItemFocus(x):v.preventDefault()}),onFocus:_(t.onFocus,()=>d.onItemFocus(x)),onKeyDown:_(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const g=vm(v,d.orientation,d.dir);if(g!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(y=>y.focusable).map(y=>y.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const y=w.indexOf(v.currentTarget);w=d.loop?bm(w,y+1):w.slice(y+1)}setTimeout(()=>oi(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:f!=null}):i})})});ai.displayName=ri;var gm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jm(t,n){return n!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function vm(t,n,s){const r=jm(t.key,s);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return gm[r]}function oi(t,n=!1){const s=document.activeElement;for(const r of t)if(r===s||(r.focus({preventScroll:n}),document.activeElement!==s))return}function bm(t,n){return t.map((s,r)=>t[(n+r)%t.length])}var gs=si,js=ai,Zs=["Enter"," "],Nm=["ArrowDown","PageUp","Home"],ii=["ArrowUp","PageDown","End"],wm=[...Nm,...ii],ym={ltr:[...Zs,"ArrowRight"],rtl:[...Zs,"ArrowLeft"]},Cm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wn="Menu",[dn,km,Sm]=ps(wn),[St,vs]=xe(wn,[Sm,Bt,et]),yn=Bt(),li=et(),[ci,tt]=St(wn),[Mm,Cn]=St(wn),di=t=>{const{__scopeMenu:n,open:s=!1,children:r,dir:a,onOpenChange:o,modal:i=!0}=t,l=yn(n),[u,x]=c.useState(null),d=c.useRef(!1),m=Gt(o),p=kt(a);return c.useEffect(()=>{const b=()=>{d.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>d.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),e.jsx(os,{...l,children:e.jsx(ci,{scope:n,open:s,onOpenChange:m,content:u,onContentChange:x,children:e.jsx(Mm,{scope:n,onClose:c.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};di.displayName=wn;var _m="MenuAnchor",Kr=c.forwardRef((t,n)=>{const{__scopeMenu:s,...r}=t,a=yn(s);return e.jsx(Tr,{...a,...r,ref:n})});Kr.displayName=_m;var Hr="MenuPortal",[Tm,ui]=St(Hr,{forceMount:void 0}),xi=t=>{const{__scopeMenu:n,forceMount:s,children:r,container:a}=t,o=tt(Hr,n);return e.jsx(Tm,{scope:n,forceMount:s,children:e.jsx(be,{present:s||o.open,children:e.jsx(ss,{asChild:!0,container:a,children:r})})})};xi.displayName=Hr;var ve="MenuContent",[Rm,Wr]=St(ve),mi=c.forwardRef((t,n)=>{const s=ui(ve,t.__scopeMenu),{forceMount:r=s.forceMount,...a}=t,o=tt(ve,t.__scopeMenu),i=Cn(ve,t.__scopeMenu);return e.jsx(dn.Provider,{scope:t.__scopeMenu,children:e.jsx(be,{present:r||o.open,children:e.jsx(dn.Slot,{scope:t.__scopeMenu,children:i.modal?e.jsx(Em,{...a,ref:n}):e.jsx(Im,{...a,ref:n})})})})}),Em=c.forwardRef((t,n)=>{const s=tt(ve,t.__scopeMenu),r=c.useRef(null),a=Y(n,r);return c.useEffect(()=>{const o=r.current;if(o)return Sr(o)},[]),e.jsx(qr,{...t,ref:a,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:_(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),Im=c.forwardRef((t,n)=>{const s=tt(ve,t.__scopeMenu);return e.jsx(qr,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),Am=an("MenuContent.ScrollLock"),qr=c.forwardRef((t,n)=>{const{__scopeMenu:s,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:x,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:b,disableOutsideScroll:h,...f}=t,v=tt(ve,s),g=Cn(ve,s),N=yn(s),w=li(s),y=km(s),[M,P]=c.useState(null),A=c.useRef(null),E=Y(n,A,v.onContentChange),G=c.useRef(0),U=c.useRef(""),S=c.useRef(0),L=c.useRef(null),O=c.useRef("right"),$=c.useRef(0),R=h?kr:c.Fragment,T=h?{as:Am,allowPinchZoom:!0}:void 0,B=C=>{const D=U.current+C,H=y().filter(z=>!z.disabled),ie=document.activeElement,pe=H.find(z=>z.ref.current===ie)?.textValue,le=H.map(z=>z.textValue),at=Km(le,D,pe),Ne=H.find(z=>z.textValue===at)?.ref.current;(function z(te){U.current=te,window.clearTimeout(G.current),te!==""&&(G.current=window.setTimeout(()=>z(""),1e3))})(D),Ne&&setTimeout(()=>Ne.focus())};c.useEffect(()=>()=>window.clearTimeout(G.current),[]),Mr();const W=c.useCallback(C=>O.current===L.current?.side&&Wm(C,L.current?.area),[]);return e.jsx(Rm,{scope:s,searchRef:U,onItemEnter:c.useCallback(C=>{W(C)&&C.preventDefault()},[W]),onItemLeave:c.useCallback(C=>{W(C)||(A.current?.focus(),P(null))},[W]),onTriggerLeave:c.useCallback(C=>{W(C)&&C.preventDefault()},[W]),pointerGraceTimerRef:S,onPointerGraceIntentChange:c.useCallback(C=>{L.current=C},[]),children:e.jsx(R,{...T,children:e.jsx(_r,{asChild:!0,trapped:a,onMountAutoFocus:_(o,C=>{C.preventDefault(),A.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:e.jsx(rs,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:x,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:b,children:e.jsx(gs,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:P,onEntryFocus:_(u,C=>{g.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:e.jsx(Rr,{role:"menu","aria-orientation":"vertical","data-state":Ri(v.open),"data-radix-menu-content":"",dir:g.dir,...N,...f,ref:E,style:{outline:"none",...f.style},onKeyDown:_(f.onKeyDown,C=>{const H=C.target.closest("[data-radix-menu-content]")===C.currentTarget,ie=C.ctrlKey||C.altKey||C.metaKey,pe=C.key.length===1;H&&(C.key==="Tab"&&C.preventDefault(),!ie&&pe&&B(C.key));const le=A.current;if(C.target!==le||!wm.includes(C.key))return;C.preventDefault();const Ne=y().filter(z=>!z.disabled).map(z=>z.ref.current);ii.includes(C.key)&&Ne.reverse(),Um(Ne)}),onBlur:_(t.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(G.current),U.current="")}),onPointerMove:_(t.onPointerMove,un(C=>{const D=C.target,H=$.current!==C.clientX;if(C.currentTarget.contains(D)&&H){const ie=C.clientX>$.current?"right":"left";O.current=ie,$.current=C.clientX}}))})})})})})})});mi.displayName=ve;var Pm="MenuGroup",Yr=c.forwardRef((t,n)=>{const{__scopeMenu:s,...r}=t;return e.jsx(K.div,{role:"group",...r,ref:n})});Yr.displayName=Pm;var Dm="MenuLabel",pi=c.forwardRef((t,n)=>{const{__scopeMenu:s,...r}=t;return e.jsx(K.div,{...r,ref:n})});pi.displayName=Dm;var Wn="MenuItem",va="menu.itemSelect",bs=c.forwardRef((t,n)=>{const{disabled:s=!1,onSelect:r,...a}=t,o=c.useRef(null),i=Cn(Wn,t.__scopeMenu),l=Wr(Wn,t.__scopeMenu),u=Y(n,o),x=c.useRef(!1),d=()=>{const m=o.current;if(!s&&m){const p=new CustomEvent(va,{bubbles:!0,cancelable:!0});m.addEventListener(va,b=>r?.(b),{once:!0}),vu(m,p),p.defaultPrevented?x.current=!1:i.onClose()}};return e.jsx(hi,{...a,ref:u,disabled:s,onClick:_(t.onClick,d),onPointerDown:m=>{t.onPointerDown?.(m),x.current=!0},onPointerUp:_(t.onPointerUp,m=>{x.current||m.currentTarget?.click()}),onKeyDown:_(t.onKeyDown,m=>{const p=l.searchRef.current!=="";s||p&&m.key===" "||Zs.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});bs.displayName=Wn;var hi=c.forwardRef((t,n)=>{const{__scopeMenu:s,disabled:r=!1,textValue:a,...o}=t,i=Wr(Wn,s),l=li(s),u=c.useRef(null),x=Y(n,u),[d,m]=c.useState(!1),[p,b]=c.useState("");return c.useEffect(()=>{const h=u.current;h&&b((h.textContent??"").trim())},[o.children]),e.jsx(dn.ItemSlot,{scope:s,disabled:r,textValue:a??p,children:e.jsx(js,{asChild:!0,...l,focusable:!r,children:e.jsx(K.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:x,onPointerMove:_(t.onPointerMove,un(h=>{r?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(t.onPointerLeave,un(h=>i.onItemLeave(h))),onFocus:_(t.onFocus,()=>m(!0)),onBlur:_(t.onBlur,()=>m(!1))})})})}),Om="MenuCheckboxItem",fi=c.forwardRef((t,n)=>{const{checked:s=!1,onCheckedChange:r,...a}=t;return e.jsx(Ni,{scope:t.__scopeMenu,checked:s,children:e.jsx(bs,{role:"menuitemcheckbox","aria-checked":qn(s)?"mixed":s,...a,ref:n,"data-state":Qr(s),onSelect:_(a.onSelect,()=>r?.(qn(s)?!0:!s),{checkForDefaultPrevented:!1})})})});fi.displayName=Om;var gi="MenuRadioGroup",[$m,Lm]=St(gi,{value:void 0,onValueChange:()=>{}}),ji=c.forwardRef((t,n)=>{const{value:s,onValueChange:r,...a}=t,o=Gt(r);return e.jsx($m,{scope:t.__scopeMenu,value:s,onValueChange:o,children:e.jsx(Yr,{...a,ref:n})})});ji.displayName=gi;var vi="MenuRadioItem",bi=c.forwardRef((t,n)=>{const{value:s,...r}=t,a=Lm(vi,t.__scopeMenu),o=s===a.value;return e.jsx(Ni,{scope:t.__scopeMenu,checked:o,children:e.jsx(bs,{role:"menuitemradio","aria-checked":o,...r,ref:n,"data-state":Qr(o),onSelect:_(r.onSelect,()=>a.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});bi.displayName=vi;var Xr="MenuItemIndicator",[Ni,zm]=St(Xr,{checked:!1}),wi=c.forwardRef((t,n)=>{const{__scopeMenu:s,forceMount:r,...a}=t,o=zm(Xr,s);return e.jsx(be,{present:r||qn(o.checked)||o.checked===!0,children:e.jsx(K.span,{...a,ref:n,"data-state":Qr(o.checked)})})});wi.displayName=Xr;var Fm="MenuSeparator",yi=c.forwardRef((t,n)=>{const{__scopeMenu:s,...r}=t;return e.jsx(K.div,{role:"separator","aria-orientation":"horizontal",...r,ref:n})});yi.displayName=Fm;var Gm="MenuArrow",Ci=c.forwardRef((t,n)=>{const{__scopeMenu:s,...r}=t,a=yn(s);return e.jsx(Er,{...a,...r,ref:n})});Ci.displayName=Gm;var Zr="MenuSub",[Bm,ki]=St(Zr),Si=t=>{const{__scopeMenu:n,children:s,open:r=!1,onOpenChange:a}=t,o=tt(Zr,n),i=yn(n),[l,u]=c.useState(null),[x,d]=c.useState(null),m=Gt(a);return c.useEffect(()=>(o.open===!1&&m(!1),()=>m(!1)),[o.open,m]),e.jsx(os,{...i,children:e.jsx(ci,{scope:n,open:r,onOpenChange:m,content:x,onContentChange:d,children:e.jsx(Bm,{scope:n,contentId:je(),triggerId:je(),trigger:l,onTriggerChange:u,children:s})})})};Si.displayName=Zr;var Yt="MenuSubTrigger",Mi=c.forwardRef((t,n)=>{const s=tt(Yt,t.__scopeMenu),r=Cn(Yt,t.__scopeMenu),a=ki(Yt,t.__scopeMenu),o=Wr(Yt,t.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=o,x={__scopeMenu:t.__scopeMenu},d=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>d,[d]),c.useEffect(()=>{const m=l.current;return()=>{window.clearTimeout(m),u(null)}},[l,u]),e.jsx(Kr,{asChild:!0,...x,children:e.jsx(hi,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":a.contentId,"data-state":Ri(s.open),...t,ref:Oa(n,a.onTriggerChange),onClick:m=>{t.onClick?.(m),!(t.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:_(t.onPointerMove,un(m=>{o.onItemEnter(m),!m.defaultPrevented&&!t.disabled&&!s.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{s.onOpenChange(!0),d()},100))})),onPointerLeave:_(t.onPointerLeave,un(m=>{d();const p=s.content?.getBoundingClientRect();if(p){const b=s.content?.dataset.side,h=b==="right",f=h?-5:5,v=p[h?"left":"right"],g=p[h?"right":"left"];o.onPointerGraceIntentChange({area:[{x:m.clientX+f,y:m.clientY},{x:v,y:p.top},{x:g,y:p.top},{x:g,y:p.bottom},{x:v,y:p.bottom}],side:b}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(m),m.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:_(t.onKeyDown,m=>{const p=o.searchRef.current!=="";t.disabled||p&&m.key===" "||ym[r.dir].includes(m.key)&&(s.onOpenChange(!0),s.content?.focus(),m.preventDefault())})})})});Mi.displayName=Yt;var _i="MenuSubContent",Ti=c.forwardRef((t,n)=>{const s=ui(ve,t.__scopeMenu),{forceMount:r=s.forceMount,...a}=t,o=tt(ve,t.__scopeMenu),i=Cn(ve,t.__scopeMenu),l=ki(_i,t.__scopeMenu),u=c.useRef(null),x=Y(n,u);return e.jsx(dn.Provider,{scope:t.__scopeMenu,children:e.jsx(be,{present:r||o.open,children:e.jsx(dn.Slot,{scope:t.__scopeMenu,children:e.jsx(qr,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:x,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{i.isUsingKeyboardRef.current&&u.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:_(t.onFocusOutside,d=>{d.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:_(t.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:_(t.onKeyDown,d=>{const m=d.currentTarget.contains(d.target),p=Cm[i.dir].includes(d.key);m&&p&&(o.onOpenChange(!1),l.trigger?.focus(),d.preventDefault())})})})})})});Ti.displayName=_i;function Ri(t){return t?"open":"closed"}function qn(t){return t==="indeterminate"}function Qr(t){return qn(t)?"indeterminate":t?"checked":"unchecked"}function Um(t){const n=document.activeElement;for(const s of t)if(s===n||(s.focus(),document.activeElement!==n))return}function Vm(t,n){return t.map((s,r)=>t[(n+r)%t.length])}function Km(t,n,s){const a=n.length>1&&Array.from(n).every(x=>x===n[0])?n[0]:n,o=s?t.indexOf(s):-1;let i=Vm(t,Math.max(o,0));a.length===1&&(i=i.filter(x=>x!==s));const u=i.find(x=>x.toLowerCase().startsWith(a.toLowerCase()));return u!==s?u:void 0}function Hm(t,n){const{x:s,y:r}=t;let a=!1;for(let o=0,i=n.length-1;o<n.length;i=o++){const l=n[o],u=n[i],x=l.x,d=l.y,m=u.x,p=u.y;d>r!=p>r&&s<(m-x)*(r-d)/(p-d)+x&&(a=!a)}return a}function Wm(t,n){if(!n)return!1;const s={x:t.clientX,y:t.clientY};return Hm(s,n)}function un(t){return n=>n.pointerType==="mouse"?t(n):void 0}var Ei=di,Ii=Kr,Ai=xi,Pi=mi,Di=Yr,Oi=pi,$i=bs,Li=fi,zi=ji,Fi=bi,Gi=wi,Bi=yi,Ui=Ci,qm=Si,Vi=Mi,Ki=Ti,Jr="ContextMenu",[Ym]=xe(Jr,[vs]),me=vs(),[Xm,Hi]=Ym(Jr),Wi=t=>{const{__scopeContextMenu:n,children:s,onOpenChange:r,dir:a,modal:o=!0}=t,[i,l]=c.useState(!1),u=me(n),x=Gt(r),d=c.useCallback(m=>{l(m),x(m)},[x]);return e.jsx(Xm,{scope:n,open:i,onOpenChange:d,modal:o,children:e.jsx(Ei,{...u,dir:a,open:i,onOpenChange:d,modal:o,children:s})})};Wi.displayName=Jr;var qi="ContextMenuTrigger",Yi=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,disabled:r=!1,...a}=t,o=Hi(qi,s),i=me(s),l=c.useRef({x:0,y:0}),u=c.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...l.current})}),x=c.useRef(0),d=c.useCallback(()=>window.clearTimeout(x.current),[]),m=p=>{l.current={x:p.clientX,y:p.clientY},o.onOpenChange(!0)};return c.useEffect(()=>d,[d]),c.useEffect(()=>{r&&d()},[r,d]),e.jsxs(e.Fragment,{children:[e.jsx(Ii,{...i,virtualRef:u}),e.jsx(K.span,{"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,...a,ref:n,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:_(t.onContextMenu,p=>{d(),m(p),p.preventDefault()}),onPointerDown:r?t.onPointerDown:_(t.onPointerDown,Mn(p=>{d(),x.current=window.setTimeout(()=>m(p),700)})),onPointerMove:r?t.onPointerMove:_(t.onPointerMove,Mn(d)),onPointerCancel:r?t.onPointerCancel:_(t.onPointerCancel,Mn(d)),onPointerUp:r?t.onPointerUp:_(t.onPointerUp,Mn(d))})]})});Yi.displayName=qi;var Zm="ContextMenuPortal",Xi=t=>{const{__scopeContextMenu:n,...s}=t,r=me(n);return e.jsx(Ai,{...r,...s})};Xi.displayName=Zm;var Zi="ContextMenuContent",Qi=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=Hi(Zi,s),o=me(s),i=c.useRef(!1);return e.jsx(Pi,{...o,...r,ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:l=>{t.onCloseAutoFocus?.(l),!l.defaultPrevented&&i.current&&l.preventDefault(),i.current=!1},onInteractOutside:l=>{t.onInteractOutside?.(l),!l.defaultPrevented&&!a.modal&&(i.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qi.displayName=Zi;var Qm="ContextMenuGroup",Jm=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Di,{...a,...r,ref:n})});Jm.displayName=Qm;var ep="ContextMenuLabel",Ji=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Oi,{...a,...r,ref:n})});Ji.displayName=ep;var tp="ContextMenuItem",el=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx($i,{...a,...r,ref:n})});el.displayName=tp;var np="ContextMenuCheckboxItem",sp=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Li,{...a,...r,ref:n})});sp.displayName=np;var rp="ContextMenuRadioGroup",ap=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(zi,{...a,...r,ref:n})});ap.displayName=rp;var op="ContextMenuRadioItem",ip=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Fi,{...a,...r,ref:n})});ip.displayName=op;var lp="ContextMenuItemIndicator",cp=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Gi,{...a,...r,ref:n})});cp.displayName=lp;var dp="ContextMenuSeparator",tl=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Bi,{...a,...r,ref:n})});tl.displayName=dp;var up="ContextMenuArrow",xp=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Ui,{...a,...r,ref:n})});xp.displayName=up;var mp="ContextMenuSubTrigger",pp=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Vi,{...a,...r,ref:n})});pp.displayName=mp;var hp="ContextMenuSubContent",fp=c.forwardRef((t,n)=>{const{__scopeContextMenu:s,...r}=t,a=me(s);return e.jsx(Ki,{...a,...r,ref:n,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fp.displayName=hp;function Mn(t){return n=>n.pointerType!=="mouse"?t(n):void 0}var gp=Wi,jp=Yi,vp=Xi,bp=Qi,Np=Ji,wp=el,yp=tl,Ns="DropdownMenu",[Cp]=xe(Ns,[vs]),de=vs(),[kp,nl]=Cp(Ns),sl=t=>{const{__scopeDropdownMenu:n,children:s,dir:r,open:a,defaultOpen:o,onOpenChange:i,modal:l=!0}=t,u=de(n),x=c.useRef(null),[d,m]=ue({prop:a,defaultProp:o??!1,onChange:i,caller:Ns});return e.jsx(kp,{scope:n,triggerId:je(),triggerRef:x,contentId:je(),open:d,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(p=>!p),[m]),modal:l,children:e.jsx(Ei,{...u,open:d,onOpenChange:m,dir:r,modal:l,children:s})})};sl.displayName=Ns;var rl="DropdownMenuTrigger",al=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,disabled:r=!1,...a}=t,o=nl(rl,s),i=de(s);return e.jsx(Ii,{asChild:!0,...i,children:e.jsx(K.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Oa(n,o.triggerRef),onPointerDown:_(t.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:_(t.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});al.displayName=rl;var Sp="DropdownMenuPortal",ol=t=>{const{__scopeDropdownMenu:n,...s}=t,r=de(n);return e.jsx(Ai,{...r,...s})};ol.displayName=Sp;var il="DropdownMenuContent",ll=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=nl(il,s),o=de(s),i=c.useRef(!1);return e.jsx(Pi,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:n,onCloseAutoFocus:_(t.onCloseAutoFocus,l=>{i.current||a.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:_(t.onInteractOutside,l=>{const u=l.detail.originalEvent,x=u.button===0&&u.ctrlKey===!0,d=u.button===2||x;(!a.modal||d)&&(i.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ll.displayName=il;var Mp="DropdownMenuGroup",cl=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Di,{...a,...r,ref:n})});cl.displayName=Mp;var _p="DropdownMenuLabel",dl=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Oi,{...a,...r,ref:n})});dl.displayName=_p;var Tp="DropdownMenuItem",ul=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx($i,{...a,...r,ref:n})});ul.displayName=Tp;var Rp="DropdownMenuCheckboxItem",xl=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Li,{...a,...r,ref:n})});xl.displayName=Rp;var Ep="DropdownMenuRadioGroup",ml=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(zi,{...a,...r,ref:n})});ml.displayName=Ep;var Ip="DropdownMenuRadioItem",pl=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Fi,{...a,...r,ref:n})});pl.displayName=Ip;var Ap="DropdownMenuItemIndicator",hl=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Gi,{...a,...r,ref:n})});hl.displayName=Ap;var Pp="DropdownMenuSeparator",fl=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Bi,{...a,...r,ref:n})});fl.displayName=Pp;var Dp="DropdownMenuArrow",Op=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Ui,{...a,...r,ref:n})});Op.displayName=Dp;var $p=t=>{const{__scopeDropdownMenu:n,children:s,open:r,onOpenChange:a,defaultOpen:o}=t,i=de(n),[l,u]=ue({prop:r,defaultProp:o??!1,onChange:a,caller:"DropdownMenuSub"});return e.jsx(qm,{...i,open:l,onOpenChange:u,children:s})},Lp="DropdownMenuSubTrigger",gl=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Vi,{...a,...r,ref:n})});gl.displayName=Lp;var zp="DropdownMenuSubContent",jl=c.forwardRef((t,n)=>{const{__scopeDropdownMenu:s,...r}=t,a=de(s);return e.jsx(Ki,{...a,...r,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jl.displayName=zp;var vl=sl,bl=al,ea=ol,Nl=ll,Fp=cl,wl=dl,Gp=ul,Bp=xl,yl=ml,Cl=pl,ta=hl,Up=fl,Vp=$p,Kp=gl,Hp=jl;function Yn(t,[n,s]){return Math.min(s,Math.max(n,t))}var na="Radio",[Wp,kl]=xe(na),[qp,Yp]=Wp(na),Sl=c.forwardRef((t,n)=>{const{__scopeRadio:s,name:r,checked:a=!1,required:o,disabled:i,value:l="on",onCheck:u,form:x,...d}=t,[m,p]=c.useState(null),b=Y(n,v=>p(v)),h=c.useRef(!1),f=m?x||!!m.closest("form"):!0;return e.jsxs(qp,{scope:s,checked:a,disabled:i,children:[e.jsx(K.button,{type:"button",role:"radio","aria-checked":a,"data-state":Rl(a),"data-disabled":i?"":void 0,disabled:i,value:l,...d,ref:b,onClick:_(t.onClick,v=>{a||u?.(),f&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})}),f&&e.jsx(Tl,{control:m,bubbles:!h.current,name:r,value:l,checked:a,required:o,disabled:i,form:x,style:{transform:"translateX(-100%)"}})]})});Sl.displayName=na;var Ml="RadioIndicator",_l=c.forwardRef((t,n)=>{const{__scopeRadio:s,forceMount:r,...a}=t,o=Yp(Ml,s);return e.jsx(be,{present:r||o.checked,children:e.jsx(K.span,{"data-state":Rl(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:n})})});_l.displayName=Ml;var Xp="RadioBubbleInput",Tl=c.forwardRef(({__scopeRadio:t,control:n,checked:s,bubbles:r=!0,...a},o)=>{const i=c.useRef(null),l=Y(i,o),u=bn(s),x=as(n);return c.useEffect(()=>{const d=i.current;if(!d)return;const m=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(m,"checked").set;if(u!==s&&b){const h=new Event("click",{bubbles:r});b.call(d,s),d.dispatchEvent(h)}},[u,s,r]),e.jsx(K.input,{type:"radio","aria-hidden":!0,defaultChecked:s,...a,tabIndex:-1,ref:l,style:{...a.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Tl.displayName=Xp;function Rl(t){return t?"checked":"unchecked"}var Zp=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ws="RadioGroup",[Qp]=xe(ws,[et,kl]),El=et(),Il=kl(),[Jp,eh]=Qp(ws),Al=c.forwardRef((t,n)=>{const{__scopeRadioGroup:s,name:r,defaultValue:a,value:o,required:i=!1,disabled:l=!1,orientation:u,dir:x,loop:d=!0,onValueChange:m,...p}=t,b=El(s),h=kt(x),[f,v]=ue({prop:o,defaultProp:a??null,onChange:m,caller:ws});return e.jsx(Jp,{scope:s,name:r,required:i,disabled:l,value:f,onValueChange:v,children:e.jsx(gs,{asChild:!0,...b,orientation:u,dir:h,loop:d,children:e.jsx(K.div,{role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h,...p,ref:n})})})});Al.displayName=ws;var Pl="RadioGroupItem",Dl=c.forwardRef((t,n)=>{const{__scopeRadioGroup:s,disabled:r,...a}=t,o=eh(Pl,s),i=o.disabled||r,l=El(s),u=Il(s),x=c.useRef(null),d=Y(n,x),m=o.value===a.value,p=c.useRef(!1);return c.useEffect(()=>{const b=f=>{Zp.includes(f.key)&&(p.current=!0)},h=()=>p.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",h)}},[]),e.jsx(js,{asChild:!0,...l,focusable:!i,active:m,children:e.jsx(Sl,{disabled:i,required:o.required,checked:m,...u,...a,name:o.name,ref:d,onCheck:()=>o.onValueChange(a.value),onKeyDown:_(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:_(a.onFocus,()=>{p.current&&x.current?.click()})})})});Dl.displayName=Pl;var th="RadioGroupIndicator",nh=c.forwardRef((t,n)=>{const{__scopeRadioGroup:s,...r}=t,a=Il(s);return e.jsx(_l,{...a,...r,ref:n})});nh.displayName=th;var sh=Al,rh=Dl,ah=[" ","Enter","ArrowUp","ArrowDown"],oh=[" ","Enter"],bt="Select",[ys,Cs,ih]=ps(bt),[Vt]=xe(bt,[ih,Bt]),ks=Bt(),[lh,nt]=Vt(bt),[ch,dh]=Vt(bt),Ol=t=>{const{__scopeSelect:n,children:s,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:l,onValueChange:u,dir:x,name:d,autoComplete:m,disabled:p,required:b,form:h}=t,f=ks(n),[v,g]=c.useState(null),[N,w]=c.useState(null),[y,M]=c.useState(!1),P=kt(x),[A,E]=ue({prop:r,defaultProp:a??!1,onChange:o,caller:bt}),[G,U]=ue({prop:i,defaultProp:l,onChange:u,caller:bt}),S=c.useRef(null),L=v?h||!!v.closest("form"):!0,[O,$]=c.useState(new Set),R=Array.from(O).map(T=>T.props.value).join(";");return e.jsx(os,{...f,children:e.jsxs(lh,{required:b,scope:n,trigger:v,onTriggerChange:g,valueNode:N,onValueNodeChange:w,valueNodeHasChildren:y,onValueNodeHasChildrenChange:M,contentId:je(),value:G,onValueChange:U,open:A,onOpenChange:E,dir:P,triggerPointerDownPosRef:S,disabled:p,children:[e.jsx(ys.Provider,{scope:n,children:e.jsx(ch,{scope:t.__scopeSelect,onNativeOptionAdd:c.useCallback(T=>{$(B=>new Set(B).add(T))},[]),onNativeOptionRemove:c.useCallback(T=>{$(B=>{const W=new Set(B);return W.delete(T),W})},[]),children:s})}),L?e.jsxs(nc,{"aria-hidden":!0,required:b,tabIndex:-1,name:d,autoComplete:m,value:G,onChange:T=>U(T.target.value),disabled:p,form:h,children:[G===void 0?e.jsx("option",{value:""}):null,Array.from(O)]},R):null]})})};Ol.displayName=bt;var $l="SelectTrigger",Ll=c.forwardRef((t,n)=>{const{__scopeSelect:s,disabled:r=!1,...a}=t,o=ks(s),i=nt($l,s),l=i.disabled||r,u=Y(n,i.onTriggerChange),x=Cs(s),d=c.useRef("touch"),[m,p,b]=rc(f=>{const v=x().filter(w=>!w.disabled),g=v.find(w=>w.value===i.value),N=ac(v,f,g);N!==void 0&&i.onValueChange(N.value)}),h=f=>{l||(i.onOpenChange(!0),b()),f&&(i.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return e.jsx(Tr,{asChild:!0,...o,children:e.jsx(K.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":sc(i.value)?"":void 0,...a,ref:u,onClick:_(a.onClick,f=>{f.currentTarget.focus(),d.current!=="mouse"&&h(f)}),onPointerDown:_(a.onPointerDown,f=>{d.current=f.pointerType;const v=f.target;v.hasPointerCapture(f.pointerId)&&v.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(h(f),f.preventDefault())}),onKeyDown:_(a.onKeyDown,f=>{const v=m.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&p(f.key),!(v&&f.key===" ")&&ah.includes(f.key)&&(h(),f.preventDefault())})})})});Ll.displayName=$l;var zl="SelectValue",Fl=c.forwardRef((t,n)=>{const{__scopeSelect:s,className:r,style:a,children:o,placeholder:i="",...l}=t,u=nt(zl,s),{onValueNodeHasChildrenChange:x}=u,d=o!==void 0,m=Y(n,u.onValueNodeChange);return Qe(()=>{x(d)},[x,d]),e.jsx(K.span,{...l,ref:m,style:{pointerEvents:"none"},children:sc(u.value)?e.jsx(e.Fragment,{children:i}):o})});Fl.displayName=zl;var uh="SelectIcon",Gl=c.forwardRef((t,n)=>{const{__scopeSelect:s,children:r,...a}=t;return e.jsx(K.span,{"aria-hidden":!0,...a,ref:n,children:r||"▼"})});Gl.displayName=uh;var xh="SelectPortal",Bl=t=>e.jsx(ss,{asChild:!0,...t});Bl.displayName=xh;var Nt="SelectContent",Ul=c.forwardRef((t,n)=>{const s=nt(Nt,t.__scopeSelect),[r,a]=c.useState();if(Qe(()=>{a(new DocumentFragment)},[]),!s.open){const o=r;return o?$a.createPortal(e.jsx(Vl,{scope:t.__scopeSelect,children:e.jsx(ys.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),o):null}return e.jsx(Kl,{...t,ref:n})});Ul.displayName=Nt;var ye=10,[Vl,st]=Vt(Nt),mh="SelectContentImpl",ph=an("SelectContent.RemoveScroll"),Kl=c.forwardRef((t,n)=>{const{__scopeSelect:s,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:l,sideOffset:u,align:x,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:b,sticky:h,hideWhenDetached:f,avoidCollisions:v,...g}=t,N=nt(Nt,s),[w,y]=c.useState(null),[M,P]=c.useState(null),A=Y(n,z=>y(z)),[E,G]=c.useState(null),[U,S]=c.useState(null),L=Cs(s),[O,$]=c.useState(!1),R=c.useRef(!1);c.useEffect(()=>{if(w)return Sr(w)},[w]),Mr();const T=c.useCallback(z=>{const[te,...ge]=L().map(se=>se.ref.current),[J]=ge.slice(-1),ne=document.activeElement;for(const se of z)if(se===ne||(se?.scrollIntoView({block:"nearest"}),se===te&&M&&(M.scrollTop=0),se===J&&M&&(M.scrollTop=M.scrollHeight),se?.focus(),document.activeElement!==ne))return},[L,M]),B=c.useCallback(()=>T([E,w]),[T,E,w]);c.useEffect(()=>{O&&B()},[O,B]);const{onOpenChange:W,triggerPointerDownPosRef:C}=N;c.useEffect(()=>{if(w){let z={x:0,y:0};const te=J=>{z={x:Math.abs(Math.round(J.pageX)-(C.current?.x??0)),y:Math.abs(Math.round(J.pageY)-(C.current?.y??0))}},ge=J=>{z.x<=10&&z.y<=10?J.preventDefault():w.contains(J.target)||W(!1),document.removeEventListener("pointermove",te),C.current=null};return C.current!==null&&(document.addEventListener("pointermove",te),document.addEventListener("pointerup",ge,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",ge,{capture:!0})}}},[w,W,C]),c.useEffect(()=>{const z=()=>W(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[W]);const[D,H]=rc(z=>{const te=L().filter(ne=>!ne.disabled),ge=te.find(ne=>ne.ref.current===document.activeElement),J=ac(te,z,ge);J&&setTimeout(()=>J.ref.current.focus())}),ie=c.useCallback((z,te,ge)=>{const J=!R.current&&!ge;(N.value!==void 0&&N.value===te||J)&&(G(z),J&&(R.current=!0))},[N.value]),pe=c.useCallback(()=>w?.focus(),[w]),le=c.useCallback((z,te,ge)=>{const J=!R.current&&!ge;(N.value!==void 0&&N.value===te||J)&&S(z)},[N.value]),at=r==="popper"?Qs:Hl,Ne=at===Qs?{side:l,sideOffset:u,align:x,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:b,sticky:h,hideWhenDetached:f,avoidCollisions:v}:{};return e.jsx(Vl,{scope:s,content:w,viewport:M,onViewportChange:P,itemRefCallback:ie,selectedItem:E,onItemLeave:pe,itemTextRefCallback:le,focusSelectedItem:B,selectedItemText:U,position:r,isPositioned:O,searchRef:D,children:e.jsx(kr,{as:ph,allowPinchZoom:!0,children:e.jsx(_r,{asChild:!0,trapped:N.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:_(a,z=>{N.trigger?.focus({preventScroll:!0}),z.preventDefault()}),children:e.jsx(rs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:e.jsx(at,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:z=>z.preventDefault(),...g,...Ne,onPlaced:()=>$(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:_(g.onKeyDown,z=>{const te=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!te&&z.key.length===1&&H(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let J=L().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(z.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ne=z.target,se=J.indexOf(ne);J=J.slice(se+1)}setTimeout(()=>T(J)),z.preventDefault()}})})})})})})});Kl.displayName=mh;var hh="SelectItemAlignedPosition",Hl=c.forwardRef((t,n)=>{const{__scopeSelect:s,onPlaced:r,...a}=t,o=nt(Nt,s),i=st(Nt,s),[l,u]=c.useState(null),[x,d]=c.useState(null),m=Y(n,A=>d(A)),p=Cs(s),b=c.useRef(!1),h=c.useRef(!0),{viewport:f,selectedItem:v,selectedItemText:g,focusSelectedItem:N}=i,w=c.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&x&&f&&v&&g){const A=o.trigger.getBoundingClientRect(),E=x.getBoundingClientRect(),G=o.valueNode.getBoundingClientRect(),U=g.getBoundingClientRect();if(o.dir!=="rtl"){const ne=U.left-E.left,se=G.left-ne,ot=A.left-se,it=A.width+ot,Ds=Math.max(it,E.width),Os=window.innerWidth-ye,$s=Yn(se,[ye,Math.max(ye,Os-Ds)]);l.style.minWidth=it+"px",l.style.left=$s+"px"}else{const ne=E.right-U.right,se=window.innerWidth-G.right-ne,ot=window.innerWidth-A.right-se,it=A.width+ot,Ds=Math.max(it,E.width),Os=window.innerWidth-ye,$s=Yn(se,[ye,Math.max(ye,Os-Ds)]);l.style.minWidth=it+"px",l.style.right=$s+"px"}const S=p(),L=window.innerHeight-ye*2,O=f.scrollHeight,$=window.getComputedStyle(x),R=parseInt($.borderTopWidth,10),T=parseInt($.paddingTop,10),B=parseInt($.borderBottomWidth,10),W=parseInt($.paddingBottom,10),C=R+T+O+W+B,D=Math.min(v.offsetHeight*5,C),H=window.getComputedStyle(f),ie=parseInt(H.paddingTop,10),pe=parseInt(H.paddingBottom,10),le=A.top+A.height/2-ye,at=L-le,Ne=v.offsetHeight/2,z=v.offsetTop+Ne,te=R+T+z,ge=C-te;if(te<=le){const ne=S.length>0&&v===S[S.length-1].ref.current;l.style.bottom="0px";const se=x.clientHeight-f.offsetTop-f.offsetHeight,ot=Math.max(at,Ne+(ne?pe:0)+se+B),it=te+ot;l.style.height=it+"px"}else{const ne=S.length>0&&v===S[0].ref.current;l.style.top="0px";const ot=Math.max(le,R+f.offsetTop+(ne?ie:0)+Ne)+ge;l.style.height=ot+"px",f.scrollTop=te-le+f.offsetTop}l.style.margin=`${ye}px 0`,l.style.minHeight=D+"px",l.style.maxHeight=L+"px",r?.(),requestAnimationFrame(()=>b.current=!0)}},[p,o.trigger,o.valueNode,l,x,f,v,g,o.dir,r]);Qe(()=>w(),[w]);const[y,M]=c.useState();Qe(()=>{x&&M(window.getComputedStyle(x).zIndex)},[x]);const P=c.useCallback(A=>{A&&h.current===!0&&(w(),N?.(),h.current=!1)},[w,N]);return e.jsx(gh,{scope:s,contentWrapper:l,shouldExpandOnScrollRef:b,onScrollButtonChange:P,children:e.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:e.jsx(K.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Hl.displayName=hh;var fh="SelectPopperPosition",Qs=c.forwardRef((t,n)=>{const{__scopeSelect:s,align:r="start",collisionPadding:a=ye,...o}=t,i=ks(s);return e.jsx(Rr,{...i,...o,ref:n,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Qs.displayName=fh;var[gh,sa]=Vt(Nt,{}),Js="SelectViewport",Wl=c.forwardRef((t,n)=>{const{__scopeSelect:s,nonce:r,...a}=t,o=st(Js,s),i=sa(Js,s),l=Y(n,o.onViewportChange),u=c.useRef(0);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),e.jsx(ys.Slot,{scope:s,children:e.jsx(K.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:_(a.onScroll,x=>{const d=x.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=i;if(p?.current&&m){const b=Math.abs(u.current-d.scrollTop);if(b>0){const h=window.innerHeight-ye*2,f=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),g=Math.max(f,v);if(g<h){const N=g+b,w=Math.min(h,N),y=N-w;m.style.height=w+"px",m.style.bottom==="0px"&&(d.scrollTop=y>0?y:0,m.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})});Wl.displayName=Js;var ql="SelectGroup",[jh,vh]=Vt(ql),bh=c.forwardRef((t,n)=>{const{__scopeSelect:s,...r}=t,a=je();return e.jsx(jh,{scope:s,id:a,children:e.jsx(K.div,{role:"group","aria-labelledby":a,...r,ref:n})})});bh.displayName=ql;var Yl="SelectLabel",Nh=c.forwardRef((t,n)=>{const{__scopeSelect:s,...r}=t,a=vh(Yl,s);return e.jsx(K.div,{id:a.id,...r,ref:n})});Nh.displayName=Yl;var Xn="SelectItem",[wh,Xl]=Vt(Xn),Zl=c.forwardRef((t,n)=>{const{__scopeSelect:s,value:r,disabled:a=!1,textValue:o,...i}=t,l=nt(Xn,s),u=st(Xn,s),x=l.value===r,[d,m]=c.useState(o??""),[p,b]=c.useState(!1),h=Y(n,N=>u.itemRefCallback?.(N,r,a)),f=je(),v=c.useRef("touch"),g=()=>{a||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e.jsx(wh,{scope:s,value:r,disabled:a,textId:f,isSelected:x,onItemTextChange:c.useCallback(N=>{m(w=>w||(N?.textContent??"").trim())},[]),children:e.jsx(ys.ItemSlot,{scope:s,value:r,disabled:a,textValue:d,children:e.jsx(K.div,{role:"option","aria-labelledby":f,"data-highlighted":p?"":void 0,"aria-selected":x&&p,"data-state":x?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:_(i.onFocus,()=>b(!0)),onBlur:_(i.onBlur,()=>b(!1)),onClick:_(i.onClick,()=>{v.current!=="mouse"&&g()}),onPointerUp:_(i.onPointerUp,()=>{v.current==="mouse"&&g()}),onPointerDown:_(i.onPointerDown,N=>{v.current=N.pointerType}),onPointerMove:_(i.onPointerMove,N=>{v.current=N.pointerType,a?u.onItemLeave?.():v.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(i.onPointerLeave,N=>{N.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:_(i.onKeyDown,N=>{u.searchRef?.current!==""&&N.key===" "||(oh.includes(N.key)&&g(),N.key===" "&&N.preventDefault())})})})})});Zl.displayName=Xn;var Xt="SelectItemText",Ql=c.forwardRef((t,n)=>{const{__scopeSelect:s,className:r,style:a,...o}=t,i=nt(Xt,s),l=st(Xt,s),u=Xl(Xt,s),x=dh(Xt,s),[d,m]=c.useState(null),p=Y(n,g=>m(g),u.onItemTextChange,g=>l.itemTextRefCallback?.(g,u.value,u.disabled)),b=d?.textContent,h=c.useMemo(()=>e.jsx("option",{value:u.value,disabled:u.disabled,children:b},u.value),[u.disabled,u.value,b]),{onNativeOptionAdd:f,onNativeOptionRemove:v}=x;return Qe(()=>(f(h),()=>v(h)),[f,v,h]),e.jsxs(e.Fragment,{children:[e.jsx(K.span,{id:u.textId,...o,ref:p}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?$a.createPortal(o.children,i.valueNode):null]})});Ql.displayName=Xt;var Jl="SelectItemIndicator",ec=c.forwardRef((t,n)=>{const{__scopeSelect:s,...r}=t;return Xl(Jl,s).isSelected?e.jsx(K.span,{"aria-hidden":!0,...r,ref:n}):null});ec.displayName=Jl;var er="SelectScrollUpButton",yh=c.forwardRef((t,n)=>{const s=st(er,t.__scopeSelect),r=sa(er,t.__scopeSelect),[a,o]=c.useState(!1),i=Y(n,r.onScrollButtonChange);return Qe(()=>{if(s.viewport&&s.isPositioned){let l=function(){const x=u.scrollTop>0;o(x)};const u=s.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[s.viewport,s.isPositioned]),a?e.jsx(tc,{...t,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=s;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});yh.displayName=er;var tr="SelectScrollDownButton",Ch=c.forwardRef((t,n)=>{const s=st(tr,t.__scopeSelect),r=sa(tr,t.__scopeSelect),[a,o]=c.useState(!1),i=Y(n,r.onScrollButtonChange);return Qe(()=>{if(s.viewport&&s.isPositioned){let l=function(){const x=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<x;o(d)};const u=s.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[s.viewport,s.isPositioned]),a?e.jsx(tc,{...t,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=s;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Ch.displayName=tr;var tc=c.forwardRef((t,n)=>{const{__scopeSelect:s,onAutoScroll:r,...a}=t,o=st("SelectScrollButton",s),i=c.useRef(null),l=Cs(s),u=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),Qe(()=>{l().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),e.jsx(K.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:_(a.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:_(a.onPointerMove,()=>{o.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:_(a.onPointerLeave,()=>{u()})})}),kh="SelectSeparator",Sh=c.forwardRef((t,n)=>{const{__scopeSelect:s,...r}=t;return e.jsx(K.div,{"aria-hidden":!0,...r,ref:n})});Sh.displayName=kh;var nr="SelectArrow",Mh=c.forwardRef((t,n)=>{const{__scopeSelect:s,...r}=t,a=ks(s),o=nt(nr,s),i=st(nr,s);return o.open&&i.position==="popper"?e.jsx(Er,{...a,...r,ref:n}):null});Mh.displayName=nr;var _h="SelectBubbleInput",nc=c.forwardRef(({__scopeSelect:t,value:n,...s},r)=>{const a=c.useRef(null),o=Y(r,a),i=bn(n);return c.useEffect(()=>{const l=a.current;if(!l)return;const u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==n&&d){const m=new Event("change",{bubbles:!0});d.call(l,n),l.dispatchEvent(m)}},[i,n]),e.jsx(K.select,{...s,style:{...To,...s.style},ref:o,defaultValue:n})});nc.displayName=_h;function sc(t){return t===""||t===void 0}function rc(t){const n=Gt(t),s=c.useRef(""),r=c.useRef(0),a=c.useCallback(i=>{const l=s.current+i;n(l),(function u(x){s.current=x,window.clearTimeout(r.current),x!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(l)},[n]),o=c.useCallback(()=>{s.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[s,a,o]}function ac(t,n,s){const a=n.length>1&&Array.from(n).every(x=>x===n[0])?n[0]:n,o=s?t.indexOf(s):-1;let i=Th(t,Math.max(o,0));a.length===1&&(i=i.filter(x=>x!==s));const u=i.find(x=>x.textValue.toLowerCase().startsWith(a.toLowerCase()));return u!==s?u:void 0}function Th(t,n){return t.map((s,r)=>t[(n+r)%t.length])}var Rh=Ol,Eh=Ll,Ih=Fl,Ah=Gl,Ph=Bl,Dh=Ul,Oh=Wl,$h=Zl,Lh=Ql,zh=ec,oc=["PageUp","PageDown"],ic=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],lc={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Kt="Slider",[sr,Fh,Gh]=ps(Kt),[cc]=xe(Kt,[Gh]),[Bh,Ss]=cc(Kt),dc=c.forwardRef((t,n)=>{const{name:s,min:r=0,max:a=100,step:o=1,orientation:i="horizontal",disabled:l=!1,minStepsBetweenThumbs:u=0,defaultValue:x=[r],value:d,onValueChange:m=()=>{},onValueCommit:p=()=>{},inverted:b=!1,form:h,...f}=t,v=c.useRef(new Set),g=c.useRef(0),w=i==="horizontal"?Uh:Vh,[y=[],M]=ue({prop:d,defaultProp:x,onChange:S=>{[...v.current][g.current]?.focus(),m(S)}}),P=c.useRef(y);function A(S){const L=Yh(y,S);U(S,L)}function E(S){U(S,g.current)}function G(){const S=P.current[g.current];y[g.current]!==S&&p(y)}function U(S,L,{commit:O}={commit:!1}){const $=Jh(o),R=ef(Math.round((S-r)/o)*o+r,$),T=Yn(R,[r,a]);M((B=[])=>{const W=Wh(B,T,L);if(Qh(W,u*o)){g.current=W.indexOf(T);const C=String(W)!==String(B);return C&&O&&p(W),C?W:B}else return B})}return e.jsx(Bh,{scope:t.__scopeSlider,name:s,disabled:l,min:r,max:a,valueIndexToChangeRef:g,thumbs:v.current,values:y,orientation:i,form:h,children:e.jsx(sr.Provider,{scope:t.__scopeSlider,children:e.jsx(sr.Slot,{scope:t.__scopeSlider,children:e.jsx(w,{"aria-disabled":l,"data-disabled":l?"":void 0,...f,ref:n,onPointerDown:_(f.onPointerDown,()=>{l||(P.current=y)}),min:r,max:a,inverted:b,onSlideStart:l?void 0:A,onSlideMove:l?void 0:E,onSlideEnd:l?void 0:G,onHomeKeyDown:()=>!l&&U(r,0,{commit:!0}),onEndKeyDown:()=>!l&&U(a,y.length-1,{commit:!0}),onStepKeyDown:({event:S,direction:L})=>{if(!l){const R=oc.includes(S.key)||S.shiftKey&&ic.includes(S.key)?10:1,T=g.current,B=y[T],W=o*R*L;U(B+W,T,{commit:!0})}}})})})})});dc.displayName=Kt;var[uc,xc]=cc(Kt,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Uh=c.forwardRef((t,n)=>{const{min:s,max:r,dir:a,inverted:o,onSlideStart:i,onSlideMove:l,onSlideEnd:u,onStepKeyDown:x,...d}=t,[m,p]=c.useState(null),b=Y(n,w=>p(w)),h=c.useRef(void 0),f=kt(a),v=f==="ltr",g=v&&!o||!v&&o;function N(w){const y=h.current||m.getBoundingClientRect(),M=[0,y.width],A=ra(M,g?[s,r]:[r,s]);return h.current=y,A(w-y.left)}return e.jsx(uc,{scope:t.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:e.jsx(mc,{dir:f,"data-orientation":"horizontal",...d,ref:b,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const y=N(w.clientX);i?.(y)},onSlideMove:w=>{const y=N(w.clientX);l?.(y)},onSlideEnd:()=>{h.current=void 0,u?.()},onStepKeyDown:w=>{const M=lc[g?"from-left":"from-right"].includes(w.key);x?.({event:w,direction:M?-1:1})}})})}),Vh=c.forwardRef((t,n)=>{const{min:s,max:r,inverted:a,onSlideStart:o,onSlideMove:i,onSlideEnd:l,onStepKeyDown:u,...x}=t,d=c.useRef(null),m=Y(n,d),p=c.useRef(void 0),b=!a;function h(f){const v=p.current||d.current.getBoundingClientRect(),g=[0,v.height],w=ra(g,b?[r,s]:[s,r]);return p.current=v,w(f-v.top)}return e.jsx(uc,{scope:t.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:e.jsx(mc,{"data-orientation":"vertical",...x,ref:m,style:{...x.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:f=>{const v=h(f.clientY);o?.(v)},onSlideMove:f=>{const v=h(f.clientY);i?.(v)},onSlideEnd:()=>{p.current=void 0,l?.()},onStepKeyDown:f=>{const g=lc[b?"from-bottom":"from-top"].includes(f.key);u?.({event:f,direction:g?-1:1})}})})}),mc=c.forwardRef((t,n)=>{const{__scopeSlider:s,onSlideStart:r,onSlideMove:a,onSlideEnd:o,onHomeKeyDown:i,onEndKeyDown:l,onStepKeyDown:u,...x}=t,d=Ss(Kt,s);return e.jsx(K.span,{...x,ref:n,onKeyDown:_(t.onKeyDown,m=>{m.key==="Home"?(i(m),m.preventDefault()):m.key==="End"?(l(m),m.preventDefault()):oc.concat(ic).includes(m.key)&&(u(m),m.preventDefault())}),onPointerDown:_(t.onPointerDown,m=>{const p=m.target;p.setPointerCapture(m.pointerId),m.preventDefault(),d.thumbs.has(p)?p.focus():r(m)}),onPointerMove:_(t.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&a(m)}),onPointerUp:_(t.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&(p.releasePointerCapture(m.pointerId),o(m))})})}),pc="SliderTrack",hc=c.forwardRef((t,n)=>{const{__scopeSlider:s,...r}=t,a=Ss(pc,s);return e.jsx(K.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:n})});hc.displayName=pc;var rr="SliderRange",fc=c.forwardRef((t,n)=>{const{__scopeSlider:s,...r}=t,a=Ss(rr,s),o=xc(rr,s),i=c.useRef(null),l=Y(n,i),u=a.values.length,x=a.values.map(p=>vc(p,a.min,a.max)),d=u>1?Math.min(...x):0,m=100-Math.max(...x);return e.jsx(K.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:l,style:{...t.style,[o.startEdge]:d+"%",[o.endEdge]:m+"%"}})});fc.displayName=rr;var ar="SliderThumb",gc=c.forwardRef((t,n)=>{const s=Fh(t.__scopeSlider),[r,a]=c.useState(null),o=Y(n,l=>a(l)),i=c.useMemo(()=>r?s().findIndex(l=>l.ref.current===r):-1,[s,r]);return e.jsx(Kh,{...t,ref:o,index:i})}),Kh=c.forwardRef((t,n)=>{const{__scopeSlider:s,index:r,name:a,...o}=t,i=Ss(ar,s),l=xc(ar,s),[u,x]=c.useState(null),d=Y(n,N=>x(N)),m=u?i.form||!!u.closest("form"):!0,p=as(u),b=i.values[r],h=b===void 0?0:vc(b,i.min,i.max),f=qh(r,i.values.length),v=p?.[l.size],g=v?Xh(v,h,l.direction):0;return c.useEffect(()=>{if(u)return i.thumbs.add(u),()=>{i.thumbs.delete(u)}},[u,i.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${h}% + ${g}px)`},children:[e.jsx(sr.ItemSlot,{scope:t.__scopeSlider,children:e.jsx(K.span,{role:"slider","aria-label":t["aria-label"]||f,"aria-valuemin":i.min,"aria-valuenow":b,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...o,ref:d,style:b===void 0?{display:"none"}:t.style,onFocus:_(t.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),m&&e.jsx(jc,{name:a??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:b},r)]})});gc.displayName=ar;var Hh="RadioBubbleInput",jc=c.forwardRef(({__scopeSlider:t,value:n,...s},r)=>{const a=c.useRef(null),o=Y(a,r),i=bn(n);return c.useEffect(()=>{const l=a.current;if(!l)return;const u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==n&&d){const m=new Event("input",{bubbles:!0});d.call(l,n),l.dispatchEvent(m)}},[i,n]),e.jsx(K.input,{style:{display:"none"},...s,ref:o,defaultValue:n})});jc.displayName=Hh;function Wh(t=[],n,s){const r=[...t];return r[s]=n,r.sort((a,o)=>a-o)}function vc(t,n,s){const o=100/(s-n)*(t-n);return Yn(o,[0,100])}function qh(t,n){return n>2?`Value ${t+1} of ${n}`:n===2?["Minimum","Maximum"][t]:void 0}function Yh(t,n){if(t.length===1)return 0;const s=t.map(a=>Math.abs(a-n)),r=Math.min(...s);return s.indexOf(r)}function Xh(t,n,s){const r=t/2,o=ra([0,50],[0,r]);return(r-o(n)*s)*s}function Zh(t){return t.slice(0,-1).map((n,s)=>t[s+1]-n)}function Qh(t,n){if(n>0){const s=Zh(t);return Math.min(...s)>=n}return!0}function ra(t,n){return s=>{if(t[0]===t[1]||n[0]===n[1])return n[0];const r=(n[1]-n[0])/(t[1]-t[0]);return n[0]+r*(s-t[0])}}function Jh(t){return(String(t).split(".")[1]||"").length}function ef(t,n){const s=Math.pow(10,n);return Math.round(t*s)/s}var tf=dc,nf=hc,sf=fc,rf=gc,Ms="Switch",[af]=xe(Ms),[of,lf]=af(Ms),bc=c.forwardRef((t,n)=>{const{__scopeSwitch:s,name:r,checked:a,defaultChecked:o,required:i,disabled:l,value:u="on",onCheckedChange:x,form:d,...m}=t,[p,b]=c.useState(null),h=Y(n,w=>b(w)),f=c.useRef(!1),v=p?d||!!p.closest("form"):!0,[g,N]=ue({prop:a,defaultProp:o??!1,onChange:x,caller:Ms});return e.jsxs(of,{scope:s,checked:g,disabled:l,children:[e.jsx(K.button,{type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":Cc(g),"data-disabled":l?"":void 0,disabled:l,value:u,...m,ref:h,onClick:_(t.onClick,w=>{N(y=>!y),v&&(f.current=w.isPropagationStopped(),f.current||w.stopPropagation())})}),v&&e.jsx(yc,{control:p,bubbles:!f.current,name:r,value:u,checked:g,required:i,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});bc.displayName=Ms;var Nc="SwitchThumb",wc=c.forwardRef((t,n)=>{const{__scopeSwitch:s,...r}=t,a=lf(Nc,s);return e.jsx(K.span,{"data-state":Cc(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:n})});wc.displayName=Nc;var cf="SwitchBubbleInput",yc=c.forwardRef(({__scopeSwitch:t,control:n,checked:s,bubbles:r=!0,...a},o)=>{const i=c.useRef(null),l=Y(i,o),u=bn(s),x=as(n);return c.useEffect(()=>{const d=i.current;if(!d)return;const m=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(m,"checked").set;if(u!==s&&b){const h=new Event("click",{bubbles:r});b.call(d,s),d.dispatchEvent(h)}},[u,s,r]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...a,tabIndex:-1,ref:l,style:{...a.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});yc.displayName=cf;function Cc(t){return t?"checked":"unchecked"}var df=bc,uf=wc,_s="Tabs",[xf]=xe(_s,[et]),kc=et(),[mf,aa]=xf(_s),Sc=c.forwardRef((t,n)=>{const{__scopeTabs:s,value:r,onValueChange:a,defaultValue:o,orientation:i="horizontal",dir:l,activationMode:u="automatic",...x}=t,d=kt(l),[m,p]=ue({prop:r,onChange:a,defaultProp:o??"",caller:_s});return e.jsx(mf,{scope:s,baseId:je(),value:m,onValueChange:p,orientation:i,dir:d,activationMode:u,children:e.jsx(K.div,{dir:d,"data-orientation":i,...x,ref:n})})});Sc.displayName=_s;var Mc="TabsList",_c=c.forwardRef((t,n)=>{const{__scopeTabs:s,loop:r=!0,...a}=t,o=aa(Mc,s),i=kc(s);return e.jsx(gs,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:e.jsx(K.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:n})})});_c.displayName=Mc;var Tc="TabsTrigger",Rc=c.forwardRef((t,n)=>{const{__scopeTabs:s,value:r,disabled:a=!1,...o}=t,i=aa(Tc,s),l=kc(s),u=Ac(i.baseId,r),x=Pc(i.baseId,r),d=r===i.value;return e.jsx(js,{asChild:!0,...l,focusable:!a,active:d,children:e.jsx(K.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":x,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:u,...o,ref:n,onMouseDown:_(t.onMouseDown,m=>{!a&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:_(t.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:_(t.onFocus,()=>{const m=i.activationMode!=="manual";!d&&!a&&m&&i.onValueChange(r)})})})});Rc.displayName=Tc;var Ec="TabsContent",Ic=c.forwardRef((t,n)=>{const{__scopeTabs:s,value:r,forceMount:a,children:o,...i}=t,l=aa(Ec,s),u=Ac(l.baseId,r),x=Pc(l.baseId,r),d=r===l.value,m=c.useRef(d);return c.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),e.jsx(be,{present:a||d,children:({present:p})=>e.jsx(K.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:x,tabIndex:0,...i,ref:n,style:{...t.style,animationDuration:m.current?"0s":void 0},children:p&&o})})});Ic.displayName=Ec;function Ac(t,n){return`${t}-trigger-${n}`}function Pc(t,n){return`${t}-content-${n}`}var pf=Sc,hf=_c,ff=Rc,gf=Ic,Dc="Toggle",Oc=c.forwardRef((t,n)=>{const{pressed:s,defaultPressed:r,onPressedChange:a,...o}=t,[i,l]=ue({prop:s,onChange:a,defaultProp:r??!1,caller:Dc});return e.jsx(K.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...o,ref:n,onClick:_(t.onClick,()=>{t.disabled||l(!i)})})});Oc.displayName=Dc;var rt="ToggleGroup",[$c]=xe(rt,[et]),Lc=et(),oa=re.forwardRef((t,n)=>{const{type:s,...r}=t;if(s==="single"){const a=r;return e.jsx(jf,{...a,ref:n})}if(s==="multiple"){const a=r;return e.jsx(vf,{...a,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${rt}\``)});oa.displayName=rt;var[zc,Fc]=$c(rt),jf=re.forwardRef((t,n)=>{const{value:s,defaultValue:r,onValueChange:a=()=>{},...o}=t,[i,l]=ue({prop:s,defaultProp:r??"",onChange:a,caller:rt});return e.jsx(zc,{scope:t.__scopeToggleGroup,type:"single",value:re.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:re.useCallback(()=>l(""),[l]),children:e.jsx(Gc,{...o,ref:n})})}),vf=re.forwardRef((t,n)=>{const{value:s,defaultValue:r,onValueChange:a=()=>{},...o}=t,[i,l]=ue({prop:s,defaultProp:r??[],onChange:a,caller:rt}),u=re.useCallback(d=>l((m=[])=>[...m,d]),[l]),x=re.useCallback(d=>l((m=[])=>m.filter(p=>p!==d)),[l]);return e.jsx(zc,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:x,children:e.jsx(Gc,{...o,ref:n})})});oa.displayName=rt;var[bf,Nf]=$c(rt),Gc=re.forwardRef((t,n)=>{const{__scopeToggleGroup:s,disabled:r=!1,rovingFocus:a=!0,orientation:o,dir:i,loop:l=!0,...u}=t,x=Lc(s),d=kt(i),m={role:"group",dir:d,...u};return e.jsx(bf,{scope:s,rovingFocus:a,disabled:r,children:a?e.jsx(gs,{asChild:!0,...x,orientation:o,dir:d,loop:l,children:e.jsx(K.div,{...m,ref:n})}):e.jsx(K.div,{...m,ref:n})})}),Zn="ToggleGroupItem",Bc=re.forwardRef((t,n)=>{const s=Fc(Zn,t.__scopeToggleGroup),r=Nf(Zn,t.__scopeToggleGroup),a=Lc(t.__scopeToggleGroup),o=s.value.includes(t.value),i=r.disabled||t.disabled,l={...t,pressed:o,disabled:i},u=re.useRef(null);return r.rovingFocus?e.jsx(js,{asChild:!0,...a,focusable:!i,active:o,ref:u,children:e.jsx(ba,{...l,ref:n})}):e.jsx(ba,{...l,ref:n})});Bc.displayName=Zn;var ba=re.forwardRef((t,n)=>{const{__scopeToggleGroup:s,value:r,...a}=t,o=Fc(Zn,s),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=o.type==="single"?i:void 0;return e.jsx(Oc,{...l,...a,ref:n,onPressedChange:u=>{u?o.onItemActivate(r):o.onItemDeactivate(r)}})}),wf=oa,yf=Bc,[Ts]=xe("Tooltip",[Bt]),Rs=Bt(),Uc="TooltipProvider",Cf=700,or="tooltip.open",[kf,ia]=Ts(Uc),Vc=t=>{const{__scopeTooltip:n,delayDuration:s=Cf,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=t,i=c.useRef(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const x=u.current;return()=>window.clearTimeout(x)},[]),e.jsx(kf,{scope:n,isOpenDelayedRef:i,delayDuration:s,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(x=>{l.current=x},[]),disableHoverableContent:a,children:o})};Vc.displayName=Uc;var xn="Tooltip",[Sf,kn]=Ts(xn),Kc=t=>{const{__scopeTooltip:n,children:s,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:i,delayDuration:l}=t,u=ia(xn,t.__scopeTooltip),x=Rs(n),[d,m]=c.useState(null),p=je(),b=c.useRef(0),h=i??u.disableHoverableContent,f=l??u.delayDuration,v=c.useRef(!1),[g,N]=ue({prop:r,defaultProp:a??!1,onChange:A=>{A?(u.onOpen(),document.dispatchEvent(new CustomEvent(or))):u.onClose(),o?.(A)},caller:xn}),w=c.useMemo(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),y=c.useCallback(()=>{window.clearTimeout(b.current),b.current=0,v.current=!1,N(!0)},[N]),M=c.useCallback(()=>{window.clearTimeout(b.current),b.current=0,N(!1)},[N]),P=c.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{v.current=!0,N(!0),b.current=0},f)},[f,N]);return c.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),e.jsx(os,{...x,children:e.jsx(Sf,{scope:n,contentId:p,open:g,stateAttribute:w,trigger:d,onTriggerChange:m,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayedRef.current?P():y()},[u.isOpenDelayedRef,P,y]),onTriggerLeave:c.useCallback(()=>{h?M():(window.clearTimeout(b.current),b.current=0)},[M,h]),onOpen:y,onClose:M,disableHoverableContent:h,children:s})})};Kc.displayName=xn;var ir="TooltipTrigger",Hc=c.forwardRef((t,n)=>{const{__scopeTooltip:s,...r}=t,a=kn(ir,s),o=ia(ir,s),i=Rs(s),l=c.useRef(null),u=Y(n,l,a.onTriggerChange),x=c.useRef(!1),d=c.useRef(!1),m=c.useCallback(()=>x.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),e.jsx(Tr,{asChild:!0,...i,children:e.jsx(K.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:u,onPointerMove:_(t.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:_(t.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:_(t.onPointerDown,()=>{a.open&&a.onClose(),x.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:_(t.onFocus,()=>{x.current||a.onOpen()}),onBlur:_(t.onBlur,a.onClose),onClick:_(t.onClick,a.onClose)})})});Hc.displayName=ir;var la="TooltipPortal",[Mf,_f]=Ts(la,{forceMount:void 0}),Wc=t=>{const{__scopeTooltip:n,forceMount:s,children:r,container:a}=t,o=kn(la,n);return e.jsx(Mf,{scope:n,forceMount:s,children:e.jsx(be,{present:s||o.open,children:e.jsx(ss,{asChild:!0,container:a,children:r})})})};Wc.displayName=la;var zt="TooltipContent",qc=c.forwardRef((t,n)=>{const s=_f(zt,t.__scopeTooltip),{forceMount:r=s.forceMount,side:a="top",...o}=t,i=kn(zt,t.__scopeTooltip);return e.jsx(be,{present:r||i.open,children:i.disableHoverableContent?e.jsx(Yc,{side:a,...o,ref:n}):e.jsx(Tf,{side:a,...o,ref:n})})}),Tf=c.forwardRef((t,n)=>{const s=kn(zt,t.__scopeTooltip),r=ia(zt,t.__scopeTooltip),a=c.useRef(null),o=Y(n,a),[i,l]=c.useState(null),{trigger:u,onClose:x}=s,d=a.current,{onPointerInTransitChange:m}=r,p=c.useCallback(()=>{l(null),m(!1)},[m]),b=c.useCallback((h,f)=>{const v=h.currentTarget,g={x:h.clientX,y:h.clientY},N=Pf(g,v.getBoundingClientRect()),w=Df(g,N),y=Of(f.getBoundingClientRect()),M=Lf([...w,...y]);l(M),m(!0)},[m]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(u&&d){const h=v=>b(v,d),f=v=>b(v,u);return u.addEventListener("pointerleave",h),d.addEventListener("pointerleave",f),()=>{u.removeEventListener("pointerleave",h),d.removeEventListener("pointerleave",f)}}},[u,d,b,p]),c.useEffect(()=>{if(i){const h=f=>{const v=f.target,g={x:f.clientX,y:f.clientY},N=u?.contains(v)||d?.contains(v),w=!$f(g,i);N?p():w&&(p(),x())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[u,d,i,x,p]),e.jsx(Yc,{...t,ref:o})}),[Rf,Ef]=Ts(xn,{isInside:!1}),If=cu("TooltipContent"),Yc=c.forwardRef((t,n)=>{const{__scopeTooltip:s,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...l}=t,u=kn(zt,s),x=Rs(s),{onClose:d}=u;return c.useEffect(()=>(document.addEventListener(or,d),()=>document.removeEventListener(or,d)),[d]),c.useEffect(()=>{if(u.trigger){const m=p=>{p.target?.contains(u.trigger)&&d()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[u.trigger,d]),e.jsx(rs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:d,children:e.jsxs(Rr,{"data-state":u.stateAttribute,...x,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e.jsx(If,{children:r}),e.jsx(Rf,{scope:s,isInside:!0,children:e.jsx(Ux,{id:u.contentId,role:"tooltip",children:a||r})})]})})});qc.displayName=zt;var Xc="TooltipArrow",Af=c.forwardRef((t,n)=>{const{__scopeTooltip:s,...r}=t,a=Rs(s);return Ef(Xc,s).isInside?null:e.jsx(Er,{...a,...r,ref:n})});Af.displayName=Xc;function Pf(t,n){const s=Math.abs(n.top-t.y),r=Math.abs(n.bottom-t.y),a=Math.abs(n.right-t.x),o=Math.abs(n.left-t.x);switch(Math.min(s,r,a,o)){case o:return"left";case a:return"right";case s:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Df(t,n,s=5){const r=[];switch(n){case"top":r.push({x:t.x-s,y:t.y+s},{x:t.x+s,y:t.y+s});break;case"bottom":r.push({x:t.x-s,y:t.y-s},{x:t.x+s,y:t.y-s});break;case"left":r.push({x:t.x+s,y:t.y-s},{x:t.x+s,y:t.y+s});break;case"right":r.push({x:t.x-s,y:t.y-s},{x:t.x-s,y:t.y+s});break}return r}function Of(t){const{top:n,right:s,bottom:r,left:a}=t;return[{x:a,y:n},{x:s,y:n},{x:s,y:r},{x:a,y:r}]}function $f(t,n){const{x:s,y:r}=t;let a=!1;for(let o=0,i=n.length-1;o<n.length;i=o++){const l=n[o],u=n[i],x=l.x,d=l.y,m=u.x,p=u.y;d>r!=p>r&&s<(m-x)*(r-d)/(p-d)+x&&(a=!a)}return a}function Lf(t){const n=t.slice();return n.sort((s,r)=>s.x<r.x?-1:s.x>r.x?1:s.y<r.y?-1:s.y>r.y?1:0),zf(n)}function zf(t){if(t.length<=1)return t.slice();const n=[];for(let r=0;r<t.length;r++){const a=t[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))n.pop();else break}n.push(a)}n.pop();const s=[];for(let r=t.length-1;r>=0;r--){const a=t[r];for(;s.length>=2;){const o=s[s.length-1],i=s[s.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))s.pop();else break}s.push(a)}return s.pop(),n.length===1&&s.length===1&&n[0].x===s[0].x&&n[0].y===s[0].y?n:n.concat(s)}var Ff=Vc,Gf=Kc,Bf=Hc,Uf=Wc,Vf=qc;function Fe(t,n,s){return Math.min(s,Math.max(n,t))}function Ge(t,n){const[s,r]=t,[a,o]=n,i=r===s?0:(o-a)/(r-s);return l=>a+(l-s)*i}function Zc(t,n){if(!(t>0)||n<=0)return 1;const s=t/n,r=10**Math.floor(Math.log10(s)),a=s/r;return(a>=7.5?10:a>=3.5?5:a>=1.5?2:1)*r}function zs(t,n){const s=Math.max(0,-Math.floor(Math.log10(n)));return Number(t.toFixed(s))}function Ft(t,{count:n=4,includeZero:s=!0}={}){const r=t.filter(Number.isFinite);let a=r.length?Math.min(...r):0,o=r.length?Math.max(...r):1;s&&(a=Math.min(0,a),o=Math.max(0,o)),a===o&&(o=a+1);const i=Zc(o-a,n),l=zs(Math.floor(a/i)*i,i),u=zs(Math.ceil(o/i)*i,i),x=[];for(let d=l;d<=u+i/2;d+=i)x.push(zs(d,i));return{min:l,max:u,ticks:x}}function ca(t,n,s,{paddingInner:r=.4,paddingOuter:a=.2}={}){const o=Math.max(1,t),i=(s-n)/(o-r+a*2),l=i*(1-r),u=n+i*a;return{step:i,bandwidth:l,x:x=>u+x*i,center:x=>u+x*i+l/2}}function da(t,n,s,r,a=4){if(!(r>0)||!(s>0))return"";const o=Math.min(a,s/2,r);return[`M${t},${n+r}`,`V${n+o}`,`A${o},${o} 0 0 1 ${t+o},${n}`,`H${t+s-o}`,`A${o},${o} 0 0 1 ${t+s},${n+o}`,`V${n+r}`,"Z"].join("")}function Kf(t,n,s,r,a=4){if(!(r>0)||!(s>0))return"";const o=Math.min(a,r/2,s);return[`M${t},${n}`,`H${t+s-o}`,`A${o},${o} 0 0 1 ${t+s},${n+o}`,`V${n+r-o}`,`A${o},${o} 0 0 1 ${t+s-o},${n+r}`,`H${t}`,"Z"].join("")}function _n(t,n,s,r){return[t+s*Math.sin(r),n-s*Math.cos(r)]}function Qn(t,n,s,r,a,o){const i=o-a;if(i<=0)return"";if(i>=Math.PI*2-1e-6){const v=a+Math.PI;return`${Qn(t,n,s,r,a,v)}${Qn(t,n,s,r,v,a+Math.PI*2-1e-6)}`}const l=i>Math.PI?1:0,[u,x]=_n(t,n,s,a),[d,m]=_n(t,n,s,o),[p,b]=_n(t,n,r,o),[h,f]=_n(t,n,r,a);return[`M${u},${x}`,`A${s},${s} 0 ${l} 1 ${d},${m}`,`L${p},${b}`,`A${r},${r} 0 ${l} 0 ${h},${f}`,"Z"].join("")}function lr(t,n,[s,r]){const a=t.map((x,d)=>({value:x,index:d})).sort((x,d)=>x.value-d.value),o=a.map(x=>x.value),i=()=>{for(let x=1;x<o.length;x++)o[x]=Math.max(o[x],o[x-1]+n)};i();const l=o.length-1;if(l>=0&&o[l]>r){o[l]=r;for(let x=l-1;x>=0;x--)o[x]=Math.min(o[x],o[x+1]-n)}l>=0&&o[0]<s&&(o[0]=s,i());const u=new Array(t.length);return a.forEach((x,d)=>{u[x.index]=o[d]}),u}function Jn(t,n,s){return!(t>0)||!(n>0)?0:Fe(Math.ceil(t/n*(s-1)),1,s-1)}function Xe(t,n){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+n)}const Es={home:xx,project:qs,projectNew:Ua,allProjects:jo,taskNew:Ba,conversation:Fu,search:po,settings:Cr,back:Ga,external:No,chevron:us,expand:ms,more:Co,app:Uu,add:Kn,edit:go,delete:Lt,copy:Vn,check:Oe,close:mn,refresh:Rt,download:xu,upload:zu,attach:fo,send:xs,stop:uu,run:uo,filter:Mo,sort:bo,drag:dx,link:Lu,logout:bx,branch:Un,commit:bu,merge:Fr,pullRequest:ko,diff:ax,file:mo,code:co,terminal:tn,server:Ou,tunnel:Du,agent:ns,runtime:du,ai:Ex,tokens:hu,mcp:Sx,permission:Fa,lock:jx,secret:Pu,team:za,user:zx,bug:Zu,info:Ln,warning:wt,error:ds,success:ts,time:Ys,history:Au,calendar:wo,notification:La,pin:Cx,target:$x,milestone:zr,activity:vo,board:hx,chart:yo,table:_o,docs:Yu,inbox:So,workflow:Gx,archive:Ku,favorite:Px},es={xs:12,sm:14,md:16,lg:18,xl:20},Qc=[{title:"导航",names:["home","project","projectNew","allProjects","taskNew","conversation","search","settings","back","external","chevron","expand","more","app"]},{title:"操作",names:["add","edit","delete","copy","check","close","refresh","download","upload","attach","send","stop","run","filter","sort","drag","link","logout"]},{title:"开发",names:["branch","commit","merge","pullRequest","diff","file","code","terminal","server","tunnel","agent","runtime","ai","tokens","mcp","permission","lock","secret","team","user","bug"]},{title:"信息",names:["info","warning","error","success","time","history","calendar","notification","pin","target","milestone","activity","board","chart","table","docs","inbox","workflow","archive","favorite"]}];function we({name:t,size:n="md",strokeWidth:s,className:r,...a}){const o=Es[t],i=typeof n=="number"?n:es[n],l=!!a["aria-label"];return e.jsx(o,{size:i,strokeWidth:s??(i>=24?1.5:2),"aria-hidden":l?void 0:!0,role:l?"img":void 0,className:j("shrink-0",r),...a})}const Hf={neutral:e.jsx(Ln,{}),info:e.jsx(Ln,{}),success:e.jsx(ts,{}),warning:e.jsx(wt,{}),danger:e.jsx(ds,{})},Wf={neutral:"bg-foreground/[0.04]",info:"bg-info/[0.06]",success:"bg-success/[0.07]",warning:"bg-warning/[0.08]",danger:"bg-destructive/[0.06]"};function Et({tone:t="neutral",title:n,icon:s,action:r,onDismiss:a,className:o,children:i,...l}){const{t:u}=Be();return e.jsxs("div",{"data-slot":"notice",className:j("flex items-start gap-2.5 rounded-lg px-3 py-2.5 text-[13px] leading-5",Wf[t],o),...l,children:[s!==!1&&e.jsx("span",{"aria-hidden":"true",className:j("mt-0.5 shrink-0 [&_svg]:size-4",dt[t]),children:s??Hf[t]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[n&&e.jsx("div",{className:"font-medium text-foreground",children:n}),i&&e.jsx("div",{className:j("text-foreground/80",n&&"mt-0.5"),children:i})]}),r&&e.jsx("div",{className:"shrink-0 self-center",children:r}),a&&e.jsx("button",{type:"button",onClick:a,"aria-label":u("Dismiss"),className:"-mr-1 shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:e.jsx(mn,{className:"size-3.5","aria-hidden":"true"})})]})}function nn({icon:t,title:n,description:s,action:r,variant:a="plain",size:o="md",className:i}){return e.jsxs("div",{"data-slot":"empty-state",className:j("flex flex-col items-center justify-center text-center",o==="md"?"px-6 py-10":"px-4 py-6",a==="dashed"&&"rounded-xl border border-dashed border-border bg-foreground/[0.015]",i),children:[t&&e.jsx("div",{"aria-hidden":"true",className:j("mb-3 text-muted-foreground/40",o==="md"?"[&_svg]:size-9 [&_svg]:stroke-[1.5]":"[&_svg]:size-7 [&_svg]:stroke-[1.5]"),children:t}),n&&e.jsx("p",{className:j("font-medium text-foreground",o==="md"?"text-sm":"text-[13px]"),children:n}),s&&e.jsx("p",{className:j("max-w-xs text-muted-foreground",o==="md"?"text-[13px]":"text-xs",n&&"mt-1"),children:s}),r&&e.jsx("div",{className:"mt-4 flex items-center gap-2",children:r})]})}function mt({className:t,...n}){return e.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:j("rounded-full bg-foreground/[0.06] motion-safe:animate-pulse",t),...n})}const Na=["92%","78%","64%","86%","52%"];function Jc({lines:t=3,className:n}){return e.jsx("div",{"aria-hidden":"true",className:j("space-y-2",n),children:Array.from({length:t}).map((s,r)=>e.jsx(mt,{className:"h-2.5",style:{width:r===t-1?"42%":Na[r%Na.length]}},r))})}function ed({rows:t=4,className:n}){return e.jsx("div",{"aria-hidden":"true",className:j("motion-safe:animate-pulse",n),children:Array.from({length:t}).map((s,r)=>e.jsxs("div",{className:"flex h-8 items-center gap-2.5 px-2",children:[e.jsx("div",{className:"h-3 rounded-full bg-foreground/[0.06]",style:{width:`${64-r%3*14}%`}}),e.jsx("div",{className:"ml-auto h-2.5 w-8 shrink-0 rounded-full bg-foreground/[0.05]"})]},r))})}function Ze({tone:t="success",pulse:n=!0,label:s,className:r}){return e.jsxs("span",{role:s?"status":void 0,"aria-label":s,"aria-hidden":s?void 0:!0,className:j("relative inline-flex size-2 shrink-0",r),children:[n&&e.jsx("span",{className:j("absolute inline-flex size-full rounded-full opacity-60 motion-safe:animate-ping",on[t])}),e.jsx("span",{className:j("relative inline-flex size-2 rounded-full",on[t])})]})}function td({text:t,className:n}){return e.jsxs("span",{className:j("inline-flex text-sm",n),children:[e.jsx("span",{className:"sr-only",children:t}),e.jsx("span",{className:"agent-thinking-shimmer","aria-hidden":"true",children:Array.from(t).map((s,r)=>e.jsx("span",{className:"agent-thinking-char",style:{animationDelay:`${r*45}ms`},children:s},`${s}-${r}`))})]})}function nd({className:t}){return e.jsxs("span",{className:j("active-work-dots",t),"aria-hidden":"true",children:[e.jsx("span",{children:"."}),e.jsx("span",{className:"active-work-dots__second",children:"."}),e.jsx("span",{className:"active-work-dots__third",children:"."})]})}function he({label:t,variant:n="ghost",tone:s="neutral",size:r="md",loading:a=!1,showTitle:o=!0,className:i,disabled:l,children:u,type:x,...d}){return e.jsx("button",{type:x??"button","data-slot":"icon-button","aria-label":t,title:o?t:void 0,className:Va({variant:n,tone:s,size:r,iconOnly:!0,loading:a,className:i}),disabled:l||a,"aria-busy":a||void 0,...d,children:a?e.jsx(Le,{size:r==="xs"?"xs":"sm"}):u})}function ke({label:t,description:n,error:s,required:r=!1,counter:a,htmlFor:o,className:i,children:l}){const u=c.useId(),x=o??`${u}-control`,d=`${u}-message`,m=!!(s||n),p=c.useMemo(()=>({id:x,describedBy:m?d:void 0,invalid:!!s,required:r}),[x,m,d,s,r]);return e.jsxs("div",{"data-slot":"field",className:j("flex min-w-0 flex-col gap-1.5",i),children:[(t||a)&&e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[t&&e.jsxs("label",{htmlFor:x,className:"text-[13px] font-medium text-foreground",children:[t,r&&e.jsx("span",{"aria-hidden":"true",className:"ml-0.5 text-destructive-ink",children:"*"})]}),Re(a)&&e.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:a})]}),e.jsx(Nu.Provider,{value:p,children:l}),s?e.jsxs("p",{id:d,className:"flex items-start gap-1 text-xs leading-relaxed text-destructive-ink",children:[e.jsx(ds,{"aria-hidden":"true",className:"mt-[3px] size-3 shrink-0"}),e.jsx("span",{children:s})]}):n?e.jsx("p",{id:d,className:"text-xs leading-relaxed text-muted-foreground",children:n}):null]})}const wa=22,ya=18;function sd({invalid:t,autoResize:n=!1,minRows:s=3,maxRows:r=10,className:a,style:o,id:i,disabled:l,required:u,"aria-describedby":x,...d}){const m=Ir(),p=t??m?.invalid??!1,b=n?{fieldSizing:"content",minHeight:s*wa+ya,maxHeight:r*wa+ya}:{};return e.jsx("textarea",{"data-slot":"textarea",id:i??m?.id,disabled:l,required:u??m?.required,"aria-invalid":p||void 0,"aria-describedby":x??m?.describedBy,rows:n?void 0:s,style:{...b,...o},className:j(Wa,"block w-full resize-none px-3 py-2 text-sm leading-[22px] outline-none placeholder:text-muted-foreground/70 focus:border-ring",p&&Ha,l&&Ka,a),...d})}function cr({options:t,value:n,defaultValue:s,onValueChange:r,placeholder:a,size:o="md",disabled:i,invalid:l,id:u,className:x,contentClassName:d,...m}){const p=Ir(),b=l??p?.invalid??!1;return e.jsxs(Rh,{value:n,defaultValue:s,onValueChange:r,disabled:i,children:[e.jsxs(Eh,{id:u??p?.id,"aria-label":m["aria-label"],"aria-invalid":b||void 0,"aria-describedby":p?.describedBy,className:j(Wa,wu[o],"group flex w-full min-w-0 items-center justify-between gap-2 text-left outline-none focus-visible:border-ring data-[state=open]:border-ring data-[placeholder]:text-muted-foreground/70",b&&Ha,i&&Ka,x),children:[e.jsx("span",{className:"flex min-w-0 flex-1 items-center gap-2 truncate [&_svg]:size-4",children:e.jsx(Ih,{placeholder:a})}),e.jsx(Ah,{asChild:!0,children:e.jsx(ms,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground transition-transform duration-150 group-data-[state=open]:rotate-180"})})]}),e.jsx(Ph,{children:e.jsx(Dh,{position:"popper",sideOffset:6,collisionPadding:8,className:j(yt,"max-h-(--radix-select-content-available-height) min-w-(--radix-select-trigger-width) origin-(--radix-select-content-transform-origin)",d),children:e.jsx(Oh,{children:t.map(h=>e.jsxs($h,{value:h.value,disabled:h.disabled,className:j(Ue,hn,"group/item items-start data-[state=checked]:text-foreground"),children:[h.icon&&e.jsx("span",{className:"mt-0.5 flex shrink-0 text-muted-foreground",children:h.icon}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx(Lh,{children:e.jsx("span",{className:"flex items-center gap-2 truncate group-data-[state=checked]/item:font-medium",children:h.label})}),h.description&&e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground",children:h.description})]}),e.jsx(zh,{className:j(pn,"top-2"),children:e.jsx(Oe,{className:"size-3.5"})})]},h.value))})})})]})}function dr({value:t,defaultValue:n,onValueChange:s,onValueCommit:r,min:a=0,max:o=100,step:i=1,disabled:l,marks:u,className:x,...d}){const[m,p]=fn({value:t,defaultValue:n??[a],onChange:s}),b=o-a||1,h=m.length>1?Math.min(...m):a,f=Math.max(...m);return e.jsxs(tf,{value:m,onValueChange:p,onValueCommit:r,min:a,max:o,step:i,disabled:l,className:j("relative flex h-5 w-full touch-none select-none items-center data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",x),children:[e.jsxs(nf,{className:"relative h-1 w-full grow rounded-full bg-foreground/10",children:[e.jsx(sf,{className:"absolute h-full rounded-full bg-primary"}),u?.map(v=>e.jsx("span",{"aria-hidden":"true",className:j("absolute top-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",v>=h&&v<=f?"bg-primary":"bg-foreground/20"),style:{left:`${(v-a)/b*100}%`}},v))]}),m.map((v,g)=>e.jsx(rf,{"aria-label":d["aria-label"],className:"block size-4 rounded-full border-4 border-primary bg-background shadow-raised transition-[transform,box-shadow] duration-150 hover:scale-110 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring/30 motion-reduce:transition-none"},g))]})}function sn({options:t,value:n,defaultValue:s,onValueChange:r,size:a="md",block:o=!1,className:i,...l}){const[u,x]=fn({value:n,defaultValue:s??t[0]?.value??"",onChange:r});return e.jsx(wf,{type:"single",value:u,onValueChange:d=>{d&&x(d)},"aria-label":l["aria-label"],className:j("items-center gap-0.5 rounded-lg bg-foreground/[0.05] p-0.5",o?"flex w-full":"inline-flex w-fit",i),children:t.map(d=>e.jsxs(yf,{value:d.value,disabled:d.disabled,className:j("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium text-foreground/70 transition-[color,background-color,box-shadow] duration-150","hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-40","data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-raised data-[state=on]:ring-1 data-[state=on]:ring-border/80",a==="md"?"h-7 px-3 text-xs [&_svg]:size-3.5":"h-6 px-2.5 text-[11px] [&_svg]:size-3",o&&"flex-1"),children:[d.icon,d.label,d.count!==void 0&&e.jsx("span",{className:"tabular-nums text-foreground/65",children:d.count})]},d.value))})}const rd=pf;function ad({className:t,...n}){return e.jsx(hf,{className:j("flex h-9 items-stretch gap-5 border-b border-border/60",t),...n})}function Zt({className:t,count:n,icon:s,children:r,...a}){return e.jsxs(ff,{className:j("relative -mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 border-transparent px-0.5 text-[13px] font-medium text-muted-foreground transition-colors","hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-40","data-[state=active]:border-foreground data-[state=active]:text-foreground [&_svg]:size-3.5",t),...a,children:[s,r,n!==void 0&&e.jsx("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:n})]})}function Pn({className:t,...n}){return e.jsx(gf,{className:j("pt-4 outline-none",t),...n})}function ur({selected:t=!1,icon:n,count:s,size:r="md",className:a,children:o,type:i,...l}){return e.jsxs("button",{type:i??"button","aria-pressed":t,"data-slot":"chip",className:j("inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full font-medium transition-[background-color,color,box-shadow] duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-40",r==="md"?"h-7 px-3 text-xs [&_svg]:size-3.5":"h-6 px-2.5 text-[11px] [&_svg]:size-3",t?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-background text-foreground/80 ring-1 ring-inset ring-border hover:bg-accent hover:text-foreground",a),...l,children:[n,o,s!==void 0&&e.jsx("span",{className:j("tabular-nums",t?"text-primary-foreground/60":"text-muted-foreground"),children:s})]})}function od({icon:t,onRemove:n,removeLabel:s,className:r,children:a,...o}){const{t:i}=Be();return e.jsxs("span",{"data-slot":"tag",className:j("inline-flex h-6 max-w-full shrink-0 items-center gap-1 rounded-md bg-foreground/[0.05] pl-2 text-xs text-foreground/80 [&_svg]:size-3",n?"pr-0.5":"pr-2",r),...o,children:[t&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground",children:t}),e.jsx("span",{className:"min-w-0 truncate",children:a}),n&&e.jsx("button",{type:"button",onClick:n,"aria-label":s??i("Remove"),className:"flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-foreground/[0.08] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:e.jsx(mn,{"aria-hidden":"true"})})]})}const qf={sm:"w-48",md:"w-60",lg:"w-80"};function Ae({options:t,value:n,defaultValue:s,onValueChange:r,icon:a,placeholder:o,showMenuLabel:i=!1,disabled:l,menuWidth:u="md",className:x,...d}){const[m,p]=fn({value:n,defaultValue:s??"",onChange:r}),b=t.find(f=>f.value===m),h=d["aria-label"];return e.jsxs(vl,{children:[e.jsxs(bl,{disabled:l,"aria-label":`${h}: ${b?.label??o??""}`,className:j("group inline-flex h-7 max-w-full items-center gap-1.5 rounded-md px-2 text-xs font-medium transition-colors","hover:bg-accent data-[state=open]:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-40",b?"text-foreground/80":"text-muted-foreground",x),children:[(a??b?.icon)&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:a??b?.icon}),e.jsx("span",{className:"max-w-[120px] truncate",children:b?.label??o}),e.jsx(ms,{"aria-hidden":"true",className:"size-3 shrink-0 text-muted-foreground transition-transform duration-150 group-data-[state=open]:rotate-180"})]}),e.jsx(ea,{children:e.jsxs(Nl,{align:"start",sideOffset:6,collisionPadding:8,className:j(yt,"max-h-[min(60vh,320px)] max-w-[calc(100vw-2rem)] overflow-y-auto origin-(--radix-dropdown-menu-content-transform-origin)",qf[u]),children:[i&&e.jsx(wl,{className:gn,children:h}),e.jsx(yl,{value:m,onValueChange:p,children:t.map(f=>e.jsxs(Cl,{value:f.value,disabled:f.disabled,className:j(Ue,hn,"group/item items-start data-[disabled]:opacity-50"),children:[f.icon&&e.jsx("span",{className:"mt-0.5 flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:f.icon}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block truncate group-data-[state=checked]/item:font-medium group-data-[state=checked]/item:text-foreground",children:f.label}),f.description&&e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground",children:f.description})]}),e.jsx(ta,{className:j(pn,"top-2"),children:e.jsx(Oe,{className:"size-3.5"})})]},f.value))})]})})]})}function id({size:t="md",className:n,...s}){return e.jsx(df,{className:j("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full transition-colors duration-150 outline-none","focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-40","bg-foreground/15 data-[state=checked]:bg-primary",t==="md"?"h-5 w-9":"h-4 w-7",n),...s,children:e.jsx(uf,{className:j("pointer-events-none block rounded-full bg-background shadow-raised transition-transform duration-150 motion-reduce:transition-none",t==="md"?"size-4 translate-x-0.5 data-[state=checked]:translate-x-[18px]":"size-3 translate-x-0.5 data-[state=checked]:translate-x-3.5")})})}function qe({label:t,description:n,id:s,className:r,...a}){const o=c.useId(),i=s??o,l=e.jsx(Xo,{id:i,className:j("flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-foreground/25 bg-background shadow-raised transition-colors outline-none","focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-40","data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground","data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",!t&&r),...a,children:e.jsx(Qo,{className:"flex items-center justify-center",children:a.checked==="indeterminate"?e.jsx(fu,{className:"size-3",strokeWidth:3,"aria-hidden":"true"}):e.jsx(Oe,{className:"size-3",strokeWidth:3,"aria-hidden":"true"})})});return t?e.jsxs("div",{className:j("flex items-start gap-2.5",r),children:[e.jsx("span",{className:"flex h-5 items-center",children:l}),e.jsxs("label",{htmlFor:i,className:j("cursor-pointer select-none",a.disabled&&"cursor-not-allowed opacity-50"),children:[e.jsx("span",{className:"block text-[13px] leading-5 text-foreground",children:t}),n&&e.jsx("span",{className:"block text-xs leading-relaxed text-muted-foreground",children:n})]})]}):l}function ld({options:t,orientation:n="vertical",className:s,...r}){const a=c.useId();return e.jsx(sh,{orientation:n,className:j(n==="vertical"?"flex flex-col gap-3":"flex flex-wrap gap-x-5 gap-y-2",s),...r,children:t.map(o=>{const i=`${a}-${o.value}`;return e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("span",{className:"flex h-5 items-center",children:e.jsx(rh,{id:i,value:o.value,disabled:o.disabled,className:j("size-4 shrink-0 rounded-full border border-foreground/25 bg-background shadow-raised transition-[border-color,border-width] duration-150 outline-none","focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-40","data-[state=checked]:border-[5px] data-[state=checked]:border-primary")})}),e.jsxs("label",{htmlFor:i,className:j("cursor-pointer select-none",o.disabled&&"cursor-not-allowed opacity-50"),children:[e.jsx("span",{className:"block text-[13px] leading-5 text-foreground",children:o.label}),o.description&&e.jsx("span",{className:"block text-xs leading-relaxed text-muted-foreground",children:o.description})]})]},o.value)})})}function cd({value:t,defaultValue:n="",onValueChange:s,onSubmit:r,placeholder:a,submitLabel:o,submitHint:i,submitting:l=!1,pendingLabel:u,disabled:x=!1,toolbarStart:d,toolbarEnd:m,footer:p,autoFocus:b,className:h,...f}){const[v,g]=fn({value:t,defaultValue:n,onChange:s}),N=v.trim().length>0&&!x&&!l,w=()=>{N&&r?.(v)};return e.jsxs("div",{"data-slot":"composer",className:j("w-full",h),children:[e.jsxs("div",{className:j("relative rounded-xl border border-border bg-background shadow-raised transition-colors duration-200","hover:border-ring/40 focus-within:border-ring/60",l&&"opacity-80"),children:[e.jsx("textarea",{value:v,onChange:y=>g(y.target.value),onKeyDown:y=>{y.key==="Enter"&&!y.shiftKey&&!y.nativeEvent.isComposing&&(y.preventDefault(),w())},placeholder:a,"aria-label":f["aria-label"]??a,disabled:x||l,autoFocus:b,rows:1,className:"block w-full resize-none border-none bg-transparent px-4 pb-2 pt-4 text-[15px] leading-relaxed text-foreground placeholder:text-muted-foreground/80 focus:outline-none disabled:cursor-not-allowed",style:{minHeight:76,maxHeight:220,fieldSizing:"content"}}),e.jsxs("div",{className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1",children:[e.jsx("div",{className:"flex min-w-0 items-center gap-1",children:d}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[l&&u&&e.jsx(Le,{size:"sm",label:u,className:"text-xs"}),m,N&&i&&e.jsxs("span",{className:"hidden select-none items-center gap-1 text-[11px] text-muted-foreground sm:inline-flex",children:[e.jsx(At,{children:"⏎"}),i]}),e.jsx("button",{type:"button",onClick:w,disabled:!N,"aria-label":o,title:o,className:j("flex size-8 items-center justify-center rounded-lg transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1",N?"bg-primary text-primary-foreground shadow-raised hover:bg-primary/90":"cursor-not-allowed bg-muted text-muted-foreground/40"),children:e.jsx(xs,{size:16,strokeWidth:2.5,"aria-hidden":"true"})})]})]})]}),p&&e.jsx("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5 px-0.5",children:p})]})}const dd=vl,ud=bl,Yf=Fp,xd=yl,md=Vp;function pd({className:t,sideOffset:n=6,align:s="start",...r}){return e.jsx(ea,{children:e.jsx(Nl,{sideOffset:n,align:s,className:j(yt,"origin-(--radix-dropdown-menu-content-transform-origin)",t),...r})})}function Dn({icon:t,shortcut:n,tone:s="neutral",className:r,children:a,...o}){return e.jsxs(Gp,{className:j(Ue,s==="danger"&&is,r),...o,children:[t&&e.jsx("span",{className:j("flex shrink-0",s==="danger"?"text-current":"text-muted-foreground"),children:t}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:a}),n&&e.jsx("span",{className:ln,children:n})]})}function Xf({className:t,children:n,...s}){return e.jsxs(Bp,{className:j(Ue,hn,t),...s,children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:n}),e.jsx(ta,{className:pn,children:e.jsx(Oe,{className:"size-3.5"})})]})}function Qt({icon:t,className:n,children:s,...r}){return e.jsxs(Cl,{className:j(Ue,hn,"data-[state=checked]:font-medium data-[state=checked]:text-foreground",n),...r,children:[t&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground",children:t}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:s}),e.jsx(ta,{className:pn,children:e.jsx(Oe,{className:"size-3.5"})})]})}function hd({className:t,...n}){return e.jsx(wl,{className:j(gn,t),...n})}function xr({className:t,...n}){return e.jsx(Up,{className:j(cn,t),...n})}function fd({icon:t,className:n,children:s,...r}){return e.jsxs(Kp,{className:j(Ue,"data-[state=open]:bg-accent",n),...r,children:[t&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground",children:t}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:s}),e.jsx(us,{className:"ml-auto size-3.5 text-muted-foreground"})]})}function gd({className:t,...n}){return e.jsx(ea,{children:e.jsx(Hp,{className:j(yt,t),sideOffset:4,...n})})}const jd=gp,vd=jp;function bd({className:t,...n}){return e.jsx(vp,{children:e.jsx(bp,{className:j(yt,"w-48 min-w-0",t),...n})})}function On({icon:t,shortcut:n,tone:s="neutral",className:r,children:a,...o}){return e.jsxs(wp,{className:j(Ue,s==="danger"&&is,r),...o,children:[t&&e.jsx("span",{className:j("flex shrink-0",s==="danger"?"text-current":"text-muted-foreground"),children:t}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:a}),n&&e.jsx("span",{className:ln,children:n})]})}function Zf({className:t,...n}){return e.jsx(Np,{className:j(gn,t),...n})}function Nd({className:t,...n}){return e.jsx(yp,{className:j(cn,t),...n})}function Dt({content:t,shortcut:n,children:s,side:r="top",align:a="center",delayDuration:o=300,disabled:i=!1,className:l}){return i||!t?e.jsx(e.Fragment,{children:s}):e.jsx(Ff,{delayDuration:o,skipDelayDuration:200,children:e.jsxs(Gf,{children:[e.jsx(Bf,{asChild:!0,children:s}),e.jsx(Uf,{children:e.jsxs(Vf,{side:r,align:a,sideOffset:6,collisionPadding:8,className:j("z-[100] flex max-w-[260px] items-center gap-2 rounded-lg bg-inverse px-2.5 py-1.5 text-xs leading-relaxed text-inverse-foreground shadow-popover","origin-(--radix-tooltip-content-transform-origin) data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 duration-100",l),children:[e.jsx("span",{className:"min-w-0",children:t}),n&&e.jsx(We,{keys:n,inverse:!0,className:"shrink-0"})]})})]})})}const ua=em,wd=tm,mr=Wo,Qf={sm:"max-w-sm",md:"max-w-md",lg:"max-w-xl",xl:"max-w-3xl"};function xa({title:t,description:n,footer:s,size:r="md",hideClose:a=!1,className:o,children:i,...l}){const{t:u}=Be();return e.jsxs(nm,{children:[e.jsx(sm,{className:"fixed inset-0 z-[60] bg-black/20 duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0"}),e.jsxs(rm,{className:j("fixed left-1/2 top-1/2 z-[60] flex max-h-[calc(100vh-2rem)] w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-border bg-background shadow-overlay outline-none","duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",Qf[r],o),...n?{}:{"aria-describedby":void 0},...l,children:[e.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-4 px-5 pb-3 pt-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(am,{className:"text-[15px] font-semibold leading-6 text-foreground",children:t}),n&&e.jsx(om,{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:n})]}),!a&&e.jsx(Wo,{"aria-label":u("Close"),className:"-mr-1.5 -mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:e.jsx(mn,{className:"size-4","aria-hidden":"true"})})]}),i&&e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 text-sm text-foreground/90",children:i}),s&&e.jsx("div",{className:"flex shrink-0 items-center justify-end gap-2 border-t border-border/60 bg-foreground/[0.015] px-5 py-3",children:s})]})]})}function yd({open:t,onOpenChange:n,title:s,description:r,confirmLabel:a,cancelLabel:o,tone:i="neutral",loading:l=!1,onConfirm:u}){return e.jsx(ua,{open:t,onOpenChange:n,children:e.jsx(xa,{size:"sm",hideClose:!0,title:e.jsxs("span",{className:"flex items-center gap-2",children:[i==="danger"&&e.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-destructive/10 text-destructive",children:e.jsx(wt,{className:"size-3.5","aria-hidden":"true"})}),s]}),description:r,footer:e.jsxs(e.Fragment,{children:[e.jsx(F,{variant:"ghost",size:"md",onClick:()=>n(!1),disabled:l,children:o}),e.jsx(F,{variant:"primary",tone:i,size:"md",loading:l,onClick:u,children:a})]})})})}function Cd({icon:t,label:n,meta:s}){return e.jsxs(e.Fragment,{children:[t&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground [&_svg]:size-4",children:t}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:n}),Re(s)&&e.jsx("span",{className:"ml-auto flex shrink-0 items-center gap-1 text-[11px] tabular-nums text-muted-foreground",children:s})]})}function Ke({icon:t,label:n,meta:s,active:r=!1,className:a,type:o,...i}){return e.jsx("button",{type:o??"button","data-sidebar-item":"","aria-current":r||void 0,className:Ar(r,a),...i,children:e.jsx(Cd,{icon:t,label:n,meta:s})})}function Jf({icon:t,label:n,meta:s,active:r=!1,className:a,...o}){return e.jsx(Us,{"data-sidebar-item":"","aria-current":r?"page":void 0,className:Ar(r,typeof a=="string"?a:void 0),...o,children:e.jsx(Cd,{icon:t,label:n,meta:s})})}function pr({className:t,children:n,...s}){const r=c.Children.toArray(n);return e.jsx("nav",{"aria-label":"Breadcrumb",className:j("flex min-w-0 items-center",t),...s,children:r.map((a,o)=>e.jsxs(c.Fragment,{children:[o>0&&e.jsx("span",{"aria-hidden":"true",className:"mx-1.5 select-none text-muted-foreground/40",children:"/"}),a]},o))})}function It({icon:t,menu:n=!1,current:s=!1,className:r,children:a,type:o,...i}){return e.jsxs("button",{type:o??"button","aria-current":s?"page":void 0,className:j("group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 text-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 data-[state=open]:bg-accent",s?"font-medium text-foreground/90":"text-muted-foreground hover:text-foreground",r),...i,children:[t&&e.jsx("span",{className:"flex shrink-0 [&_svg]:size-3.5",children:t}),e.jsx("span",{className:"max-w-[200px] truncate",children:a}),n&&e.jsx(ms,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground/70 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}function kd({status:t,index:n}){return e.jsx("span",{"aria-hidden":"true",className:j("relative z-[1] flex size-6 shrink-0 items-center justify-center rounded-full text-[11px] font-semibold tabular-nums",t==="done"&&"bg-primary text-primary-foreground",t==="current"&&"bg-background text-foreground ring-[1.5px] ring-inset ring-foreground",t==="upcoming"&&"bg-background text-muted-foreground ring-1 ring-inset ring-border"),children:t==="done"?e.jsx(Oe,{className:"size-3.5",strokeWidth:2.5}):n+1})}function Sd({steps:t,current:n,className:s}){return e.jsx("ol",{className:j("flex w-full items-start",s),children:t.map((r,a)=>{const o=a<n?"done":a===n?"current":"upcoming",i=a===t.length-1;return e.jsxs("li",{"aria-current":o==="current"?"step":void 0,className:j("flex min-w-0 items-start gap-2.5",!i&&"flex-1"),children:[e.jsx(kd,{status:o,index:a}),e.jsxs("div",{className:"min-w-0 pt-0.5",children:[e.jsx("div",{className:j("truncate text-[13px] leading-5",o==="upcoming"?"text-muted-foreground":"font-medium text-foreground"),children:r.title}),r.description&&e.jsx("div",{className:"truncate text-[11px] leading-4 text-muted-foreground",children:r.description})]}),!i&&e.jsx("span",{"aria-hidden":"true",className:j("mx-2 mt-3 h-px min-w-6 flex-1",a<n?"bg-foreground":"bg-border")})]},a)})})}function Md({steps:t,className:n}){return e.jsx("ol",{className:j("flex flex-col",n),children:t.map((s,r)=>{const a=s.status??"upcoming",o=r===t.length-1;return e.jsxs("li",{"aria-current":a==="current"?"step":void 0,className:"relative flex gap-3 pb-5 last:pb-0",children:[!o&&e.jsx("span",{"aria-hidden":"true",className:j("absolute left-3 top-7 bottom-1 w-px -translate-x-1/2",a==="done"?"bg-foreground":"bg-border")}),e.jsx(kd,{status:a,index:r}),e.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[e.jsx("div",{className:j("text-sm leading-5",a==="upcoming"?"text-foreground/80":"font-medium text-foreground"),children:s.title}),s.description&&e.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:s.description}),s.content&&e.jsx("div",{className:"mt-2.5",children:s.content})]})]},r)})})}function Is({swatch:t="solid",color:n=I.ink}){switch(t){case"hatch":return e.jsx("span",{"aria-hidden":"true",className:"hatch size-2.5 shrink-0 rounded-[2px] bg-viz-0",style:{color:n===I.ink?I.plan:n}});case"line":return e.jsx("span",{"aria-hidden":"true",className:"h-0.5 w-3 shrink-0 rounded-full",style:{background:n}});case"dashed":return e.jsx("svg",{"aria-hidden":"true",width:"14",height:"2",className:"shrink-0",children:e.jsx("line",{x1:"0",y1:"1",x2:"14",y2:"1",stroke:n,strokeWidth:"2",strokeDasharray:"3 2"})});case"dot":return e.jsx("span",{"aria-hidden":"true",className:"size-2 shrink-0 rounded-full",style:{background:n}});case"outline":return e.jsx("span",{"aria-hidden":"true",className:"size-2.5 shrink-0 rounded-[2px]",style:{boxShadow:`inset 0 0 0 1px ${n}`}});default:return e.jsx("span",{"aria-hidden":"true",className:"size-2.5 shrink-0 rounded-[2px]",style:{background:n}})}}function Je({items:t,className:n}){return e.jsx("ul",{className:j("flex flex-wrap items-center gap-x-3.5 gap-y-1 text-[11px] text-muted-foreground",n),children:t.map((s,r)=>e.jsxs("li",{className:"inline-flex items-center gap-1.5",children:[e.jsx(Is,{swatch:s.swatch,color:s.color}),e.jsx("span",{children:s.label}),s.value!==void 0&&e.jsx("span",{className:"font-medium tabular-nums text-foreground/80",children:s.value})]},r))})}function Ie({value:t,format:n="percent",goodWhen:s="up",period:r,size:a="sm",className:o}){const i=t>0?"up":t<0?"down":"flat",l=i==="flat"||s==="none"?"neutral":i===s?"success":"danger",u=Math.abs(t),x=n==="percent"?`${Number.isInteger(u*100)?(u*100).toFixed(0):(u*100).toFixed(1)}%`:ze(u),d=i==="down"?ho:xs;return e.jsxs("span",{className:j("inline-flex items-center gap-1 whitespace-nowrap",a==="sm"?"text-[11px]":"text-xs",o),children:[e.jsxs("span",{className:j("inline-flex items-center gap-0.5 font-medium tabular-nums",s==="none"&&i!=="flat"?"text-foreground/80":Pr[l]),children:[i!=="flat"&&e.jsx(d,{"aria-hidden":"true",className:a==="sm"?"size-3":"size-3.5",strokeWidth:2.5}),e.jsx("span",{className:"sr-only",children:i==="up"?"+":i==="down"?"−":""}),x]}),r&&e.jsx("span",{className:"text-muted-foreground",children:r})]})}const eg={ink:"bg-viz-6",neutral:"bg-viz-3",info:"bg-info",success:"bg-success",warning:"bg-warning",danger:"bg-destructive"},tg={ink:"bg-viz-0",neutral:"bg-viz-0",info:"bg-info/15",success:"bg-success/15",warning:"bg-warning/15",danger:"bg-destructive/15"},ng={xs:"h-1",sm:"h-1.5",md:"h-2"};function Pe({value:t,max:n=1,expected:s,tone:r="ink",size:a="sm",className:o,...i}){const l=n>0?Fe(t/n,0,1):0,u=s!==void 0&&n>0?Fe(s/n,0,1):null;return e.jsxs("div",{role:"progressbar","aria-label":i["aria-label"],"aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":t,className:j("relative w-full rounded-full",ng[a],tg[r],o),children:[e.jsx("div",{className:j("h-full rounded-full transition-[width] duration-500 ease-enter motion-reduce:transition-none",eg[r]),style:{width:l>0?`max(2px, ${l*100}%)`:0}}),u!==null&&e.jsx("span",{"aria-hidden":"true",className:"absolute -top-[3px] -bottom-[3px] w-0.5 -translate-x-1/2 rounded-full bg-foreground/60 ring-2 ring-background",style:{left:`${u*100}%`}})]})}function pt({value:t,size:n=64,thickness:s,expected:r,tone:a="ink",children:o,className:i,...l}){const u=s??Math.max(3,Math.round(n/14)),x=(n-u)/2,d=2*Math.PI*x,m=Fe(t,0,1),p=a==="ink"?I.ink:Pt[a],b=Math.round(m*100),h=n/2,f=r!==void 0?Fe(r,0,1)*Math.PI*2:null;return e.jsxs("div",{role:"img","aria-label":l["aria-label"]??`${b}%`,className:j("relative inline-flex shrink-0 items-center justify-center",i),style:{width:n,height:n},children:[e.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,className:"-rotate-90","aria-hidden":"true",children:[e.jsx("circle",{cx:h,cy:h,r:x,fill:"none",stroke:a==="ink"?I.empty:`color-mix(in oklab, ${p} 15%, transparent)`,strokeWidth:u}),m>0&&e.jsx("circle",{cx:h,cy:h,r:x,fill:"none",stroke:p,strokeWidth:u,strokeLinecap:"round",strokeDasharray:d,strokeDashoffset:d*(1-m),className:"transition-[stroke-dashoffset] duration-700 ease-enter motion-reduce:transition-none"}),f!==null&&e.jsx("line",{x1:h+(x-u)*Math.cos(f),y1:h+(x-u)*Math.sin(f),x2:h+(x+u)*Math.cos(f),y2:h+(x+u)*Math.sin(f),stroke:I.text,strokeOpacity:.6,strokeWidth:2,strokeLinecap:"round"})]}),e.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:o??e.jsxs("span",{className:j("font-semibold tracking-tight text-foreground",n>=88?"text-2xl":n>=60?"text-[15px]":"text-[11px]"),children:[b,e.jsx("span",{className:j("font-medium text-muted-foreground",n>=88?"text-sm":"text-[0.7em]"),children:"%"})]})})]})}function ma({values:t,width:n=96,height:s=28,area:r=!1,showLast:a=!0,baseline:o,tone:i="ink",className:l,...u}){const x=ls("spark");if(t.length<2)return null;const d=3,m=o!==void 0?[...t,o]:t,p=Math.min(...m),b=Math.max(...m),h=Ge([0,t.length-1],[d,n-d]),f=Ge([p,b===p?p+1:b],[s-d,d]),v=t.map((M,P)=>[h(P),f(M)]),g=v.map(([M,P],A)=>`${A===0?"M":"L"}${M.toFixed(1)},${P.toFixed(1)}`).join(""),N=i==="ink"?I.ink:I.context,[w,y]=v[v.length-1];return e.jsxs("svg",{width:n,height:s,viewBox:`0 0 ${n} ${s}`,role:"img","aria-label":u["aria-label"],"aria-hidden":u["aria-label"]?void 0:!0,className:j("shrink-0 overflow-visible",l),children:[r&&e.jsxs(e.Fragment,{children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:x,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:N,stopOpacity:.12}),e.jsx("stop",{offset:"100%",stopColor:N,stopOpacity:0})]})}),e.jsx("path",{d:`${g}L${w.toFixed(1)},${s}L${v[0][0].toFixed(1)},${s}Z`,fill:`url(#${x})`})]}),o!==void 0&&e.jsx("line",{x1:d,x2:n-d,y1:f(o),y2:f(o),stroke:I.axis,strokeWidth:1,strokeDasharray:"2 2"}),e.jsx("path",{d:g,fill:"none",stroke:N,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a&&e.jsx("circle",{cx:w,cy:y,r:2.5,fill:N,stroke:I.surface,strokeWidth:1.5})]})}const sg={todo:"bg-background ring-1 ring-inset ring-foreground/30",doing:"ring-1 ring-inset ring-viz-6 bg-[linear-gradient(135deg,transparent_50%,var(--viz-6)_50%)]",done:"bg-viz-6",late:"hatch bg-destructive/10 text-destructive/70 ring-1 ring-inset ring-destructive/60",cancelled:"ring-1 ring-inset ring-foreground/20 bg-[linear-gradient(to_top_right,transparent_calc(50%-0.5px),var(--muted-foreground)_calc(50%-0.5px),var(--muted-foreground)_calc(50%+0.5px),transparent_calc(50%+0.5px))]"};function hr({state:t,size:n="md",label:s,className:r}){return e.jsx("span",{role:s?"img":void 0,"aria-label":s,"aria-hidden":s?void 0:!0,className:j("inline-block shrink-0 rounded-[3px]",n==="md"?"size-3":"size-2.5",sg[t],r)})}const rg={"not-started":{label:"Not started",tone:"neutral",variant:"soft"},"on-track":{label:"On track",tone:"neutral",variant:"outline"},ahead:{label:"Ahead",tone:"success",variant:"dot"},"at-risk":{label:"At risk",tone:"warning",variant:"dot"},"off-track":{label:"Off track",tone:"danger",variant:"soft"},done:{label:"Done",tone:"success",variant:"soft"}};function pa({health:t,label:n,className:s}){const{t:r}=Be(),a=rg[t];return e.jsx(oe,{tone:a.tone,variant:a.variant,icon:t==="done"?e.jsx(Oe,{strokeWidth:3}):void 0,className:s,children:n??r(a.label)})}function _d(t,n){for(const s of t)s.children?.length&&(n.add(s.id),_d(s.children,n));return n}function Td({nodes:t,depth:n,expanded:s,toggle:r}){const{t:a}=Be();return e.jsx("ul",{role:n===0?"tree":"group",className:j(n>0&&"ml-[11px]"),children:t.map(o=>{const i=!!o.children?.length,l=s.has(o.id);return e.jsxs("li",{role:"treeitem","aria-expanded":i?l:void 0,className:j("relative",n>0&&["pl-4","before:absolute before:left-0 before:top-0 before:h-full before:w-px before:bg-viz-axis last:before:h-3.5","after:absolute after:left-0 after:top-3.5 after:h-px after:w-3 after:bg-viz-axis"]),children:[e.jsxs("div",{className:"flex h-7 items-center gap-1.5",children:[i?e.jsx("button",{type:"button",onClick:()=>r(o.id),"aria-label":a(l?"Collapse":"Expand"),className:"-ml-0.5 flex size-[18px] shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:e.jsx(us,{"aria-hidden":"true",className:j("size-3 transition-transform duration-150",l&&"rotate-90")})}):e.jsx("span",{"aria-hidden":"true",className:"flex size-[18px] shrink-0 items-center justify-center",children:e.jsx("span",{className:"size-1 rounded-full bg-foreground/30"})}),o.icon&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:o.icon}),e.jsx("span",{className:j("min-w-0 truncate text-[13px]",n===0?"font-medium text-foreground":"text-foreground/85"),children:o.label}),Re(o.meta)&&e.jsx("span",{className:"shrink-0 truncate text-[11px] text-muted-foreground",children:o.meta}),e.jsx("span",{className:"flex-1"}),o.progress!==void 0&&e.jsx(Pe,{value:o.progress,size:"xs",className:"w-14 shrink-0 sm:w-20"}),(o.value!==void 0||o.progress!==void 0)&&e.jsx("span",{className:"w-9 shrink-0 text-right text-[11px] tabular-nums text-muted-foreground",children:o.value??ae(o.progress??0)})]}),i&&l&&o.children&&e.jsx(Td,{nodes:o.children,depth:n+1,expanded:s,toggle:r})]},o.id)})})}function Rd({nodes:t,defaultCollapsed:n=[],className:s}){const[r,a]=c.useState(()=>{const i=_d(t,new Set);return n.forEach(l=>i.delete(l)),i}),o=i=>{a(l=>{const u=new Set(l);return u.has(i)?u.delete(i):u.add(i),u})};return e.jsx("div",{className:s,children:e.jsx(Td,{nodes:t,depth:0,expanded:r,toggle:o})})}function Ot({title:t,subtitle:n,legend:s,actions:r,table:a,footnote:o,bare:i=!1,className:l,children:u}){const{t:x}=Be(),d=c.useId(),[m,p]=c.useState("chart");return e.jsxs("figure",{"aria-labelledby":d,className:j("flex min-w-0 flex-col",!i&&"rounded-xl border border-border/70 bg-background p-4",l),children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{id:d,className:"text-[13px] font-semibold leading-5 text-foreground",children:t}),n&&e.jsx("div",{className:"text-[11px] leading-4 text-muted-foreground",children:n})]}),(r||a)&&e.jsxs("div",{className:"-mr-1 -mt-0.5 flex shrink-0 items-center gap-1",children:[r,a&&e.jsx(he,{size:"xs",label:x(m==="chart"?"Table":"Chart"),"aria-pressed":m==="table",onClick:()=>p(b=>b==="chart"?"table":"chart"),children:m==="chart"?e.jsx(_o,{}):e.jsx(yo,{})})]})]}),s&&m==="chart"&&e.jsx("div",{className:"mt-2",children:s}),e.jsx("div",{className:"mt-3 min-w-0",children:m==="table"&&a?e.jsx(ag,{data:a}):u}),o&&e.jsx("figcaption",{className:"mt-3 text-[11px] leading-relaxed text-muted-foreground",children:o})]})}function ag({data:t}){return e.jsx("div",{className:"max-h-72 overflow-auto scrollbar-app-thin",children:e.jsxs("table",{className:"w-full border-collapse text-xs",children:[e.jsx("thead",{className:"sticky top-0 bg-background",children:e.jsx("tr",{className:"border-b border-border/60",children:t.columns.map(n=>e.jsx("th",{scope:"col",className:j("h-7 px-2 font-medium text-muted-foreground first:pl-0 last:pr-0",n.align==="right"?"text-right":"text-left"),children:n.header},n.key))})}),e.jsx("tbody",{children:t.rows.map((n,s)=>e.jsx("tr",{className:"border-b border-border/40 last:border-0",children:t.columns.map(r=>e.jsx("td",{className:j("h-7 px-2 text-foreground/85 first:pl-0 last:pr-0",r.align==="right"?"text-right tabular-nums":"text-left"),children:n[r.key]},r.key))},s))})]})})}function Mt({x:t,y:n,containerWidth:s,containerHeight:r,title:a,rows:o,footer:i}){const l=t>s*.62,u=28+o.length*20+(i?24:0),x=r?Fe(n-16,0,Math.max(0,r-u)):n;return e.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute z-10 min-w-[120px] max-w-[240px] rounded-lg border border-border bg-popover px-2.5 py-2 text-xs shadow-popover",style:{top:x,...l?{right:s-t+12}:{left:t+12}},children:[a&&e.jsx("div",{className:"mb-1 text-[11px] text-muted-foreground",children:a}),e.jsx("div",{className:"space-y-1",children:o.map((d,m)=>e.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[e.jsx(Is,{swatch:d.swatch??"line",color:d.color??I.ink}),e.jsx("span",{className:"font-semibold tabular-nums text-foreground",children:d.value}),e.jsx("span",{className:"truncate text-muted-foreground",children:d.label})]},m))}),i&&e.jsx("div",{className:"mt-1.5 border-t border-border/60 pt-1.5 text-[11px] text-muted-foreground",children:i})]})}function og({id:t,color:n=I.plan,background:s=I.empty}){return e.jsxs("pattern",{id:t,width:"5",height:"5",patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)",children:[e.jsx("rect",{width:"5",height:"5",fill:s}),e.jsx("line",{x1:"0",y1:"0",x2:"0",y2:"5",stroke:n,strokeWidth:"1.2"})]})}function As({ticks:t,y:n,left:s,right:r,format:a}){return e.jsx("g",{children:t.map(o=>e.jsxs("g",{children:[e.jsx("line",{x1:s,x2:r,y1:ce(n(o)),y2:ce(n(o)),stroke:o===0?I.axis:I.grid,strokeWidth:1}),e.jsx("text",{x:s-8,y:n(o),dy:"0.32em",textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:a(o)})]},o))})}function ha({labels:t,x:n,y:s,width:r,minGap:a=44,activeIndex:o}){const i=yu(t.length,r,a,o);return e.jsx("g",{children:t.map((l,u)=>i.has(u)&&e.jsx("text",{x:n(u),y:s,textAnchor:"middle",className:j("text-[11px] tabular-nums",o===u?"fill-foreground font-medium":"fill-muted-foreground"),children:l},u))})}function Sn({children:t}){return e.jsx("div",{className:"sr-only","aria-live":"polite",children:t})}function Ht({height:t}){return e.jsx("div",{"aria-hidden":"true",style:{height:t}})}function Ed(t){let n="",s=!1;for(const r of t){if(!r){s=!1;continue}n+=`${s?"L":"M"}${r[0].toFixed(1)},${r[1].toFixed(1)}`,s=!0}return n}function ig(t,n){const s=[];let r=[];for(const a of t)a?r.push(a):r.length&&(s.push(r),r=[]);return r.length&&s.push(r),s.filter(a=>a.length>1).map(a=>`${Ed(a)}L${a[a.length-1][0].toFixed(1)},${n}L${a[0][0].toFixed(1)},${n}Z`)}function lg(t){for(let n=t.length-1;n>=0;n--)if(t[n]!==null&&Number.isFinite(t[n]))return n;return-1}function Id({labels:t,series:n,height:s=220,formatValue:r=De,marker:a,baseline:o,endLabels:i=!0,className:l,...u}){const[x,d]=Ct(),[m,p]=c.useState(null),b=ls("line-area"),h=t.length,f=n.flatMap(C=>C.values.filter(D=>D!==null&&Number.isFinite(D))),v=Ft(o?[...f,o.value]:f,{count:4}),g=a?24:14,w=Math.max(0,s-g-26),y=Ge([v.min,v.max],[g+w,g]),M=n.map(C=>lg(C.values)),P=n.map((C,D)=>M[D]>=0?r(C.values[M[D]]):""),A=n.map((C,D)=>M[D]>=0?y(C.values[M[D]]):null).filter(C=>C!==null).sort((C,D)=>C-D),E=A.some((C,D)=>D>0&&C-A[D-1]<14),G=i&&n.length<=4&&!E,U=ft(v.ticks.map(r)),S=G?ft(n.map((C,D)=>`${P[D]} ${C.label}`))+6:12,L=Math.max(0,d-U-S),O=C=>U+(h<=1?L/2:C/(h-1)*L),$=n.map(C=>C.values.map((D,H)=>D===null||!Number.isFinite(D)?null:[O(H),y(D)])),R=y(Math.max(v.min,0)),T=C=>{const D=C.currentTarget.getBoundingClientRect(),H=(C.clientX-D.left)/Math.max(1,D.width);p(Fe(Math.round(H*(h-1)),0,Math.max(0,h-1)))},B=C=>{const D=cs(C.key,m,h);D!==void 0&&(C.preventDefault(),p(D))},W=(C,D)=>{const H=C.values[D];return H==null?"—":r(H)};return e.jsxs("div",{ref:x,className:j("relative w-full",l),children:[d===0?e.jsx(Ht,{height:s}):e.jsx("div",{role:"img","aria-label":u["aria-label"],tabIndex:0,onKeyDown:B,onBlur:()=>p(null),className:jn,children:e.jsxs("svg",{width:d,height:s,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:b,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:I.ink,stopOpacity:.1}),e.jsx("stop",{offset:"100%",stopColor:I.ink,stopOpacity:.01})]})}),e.jsx(As,{ticks:v.ticks,y,left:U,right:U+L,format:r}),o&&e.jsxs("g",{children:[e.jsx("line",{x1:U,x2:U+L,y1:ce(y(o.value)),y2:ce(y(o.value)),stroke:"var(--viz-4)",strokeWidth:1,strokeDasharray:"4 3"}),e.jsxs("text",{x:U+L,y:y(o.value)-5,textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:[o.label," ",r(o.value)]})]}),n.map((C,D)=>C.area&&ig($[D],R).map((H,ie)=>e.jsx("path",{d:H,fill:`url(#${b})`},`${C.id}-area-${ie}`))),n.map((C,D)=>{const H=C.variant??"ink";return e.jsx("path",{d:Ed($[D]),fill:"none",stroke:ut[H],strokeWidth:2,strokeDasharray:H==="plan"?"5 4":void 0,strokeLinecap:"round",strokeLinejoin:"round"},C.id)}),a&&a.index>=0&&a.index<h&&e.jsxs("g",{children:[e.jsx("line",{x1:ce(O(a.index)),x2:ce(O(a.index)),y1:g,y2:g+w,stroke:I.text,strokeOpacity:.35,strokeWidth:1}),e.jsx("rect",{x:O(a.index)-(a.label.length*11+10)/2,y:g-19,width:a.label.length*11+10,height:15,rx:4,fill:I.text}),e.jsx("text",{x:O(a.index),y:g-8,textAnchor:"middle",className:"fill-background text-[10px] font-medium",children:a.label})]}),n.map((C,D)=>{const H=C.variant??"ink",ie=M[D];if(ie<0)return null;const[pe,le]=$[D][ie];return e.jsxs("g",{children:[H!=="plan"&&e.jsx("circle",{cx:pe,cy:le,r:4,fill:ut[H],stroke:I.surface,strokeWidth:2}),G&&e.jsxs("text",{x:pe+9,y:le,dy:"0.32em",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:"fill-foreground font-semibold",children:P[D]}),e.jsx("tspan",{dx:4,className:"fill-muted-foreground",children:C.label})]})]},`${C.id}-end`)}),m!==null&&e.jsxs("g",{children:[e.jsx("line",{x1:ce(O(m)),x2:ce(O(m)),y1:g,y2:g+w,stroke:I.axis,strokeWidth:1}),n.map((C,D)=>{const H=$[D][m];return H?e.jsx("circle",{cx:H[0],cy:H[1],r:4,fill:ut[C.variant??"ink"],stroke:I.surface,strokeWidth:2},C.id):null})]}),e.jsx(ha,{labels:t,x:O,y:s-8,width:L,activeIndex:m}),e.jsx("rect",{x:U,y:g,width:L,height:w,fill:"transparent",onPointerMove:T,onPointerLeave:()=>p(null)})]})}),m!==null&&d>0&&e.jsx(Mt,{x:O(m),y:g+4,containerWidth:d,containerHeight:s,title:t[m],rows:n.map(C=>({label:C.label,value:W(C,m),color:ut[C.variant??"ink"],swatch:C.variant==="plan"?"dashed":"line"}))}),e.jsx(Sn,{children:m!==null?`${t[m]}:${n.map(C=>`${C.label} ${W(C,m)}`).join(",")}`:""})]})}const Jt=2,Ad=24;function Pd(t){const[n,s]=c.useState(null);return{active:n,setActive:s,handleKeyDown:a=>{const o=cs(a.key,n,t);o!==void 0&&(a.preventDefault(),s(o))}}}function Dd({labels:t,series:n,height:s=220,formatValue:r=De,highlightIndex:a,baseline:o,className:i,...l}){const[u,x]=Ct(),{active:d,setActive:m,handleKeyDown:p}=Pd(t.length),b=ls("bar-hatch"),h=t.length,f=n.flatMap(T=>T.values),v=Ft(o?[...f,o.value]:f,{count:4}),g=18,N=26,w=ft(v.ticks.map(r)),y=Math.max(0,x-w-8),M=Math.max(0,s-g-N),P=Ge([v.min,v.max],[g+M,g]),A=P(Math.max(0,v.min)),E=ca(h,w,w+y,{paddingInner:.35,paddingOuter:.2}),G=Math.max(2,Math.min(Ad,(E.bandwidth-Jt*(n.length-1))/Math.max(1,n.length))),U=G*n.length+Jt*(n.length-1),S=a===void 0?h-1:a,L=(T="ink")=>T==="plan"?`url(#${b})`:T==="context"?I.context:I.ink,O=(T,B)=>E.center(T)-U/2+B*(G+Jt),$=T=>Math.min(...n.map(B=>P(Math.max(0,B.values[T]??0)))),R=(()=>{if(S===null||S<0||S>=h)return null;const T=Math.max(0,n.findIndex(H=>(H.variant??"ink")==="ink")),B=n[T]?.values[S]??0,W=r(B),C=P(Math.max(0,B)),D=qa(W)<=G+Jt*2||C<=$(S);return{text:W,x:D?O(S,T)+G/2:E.center(S),y:(D?C:$(S))-6}})();return e.jsxs("div",{ref:u,className:j("relative w-full",i),onPointerLeave:()=>m(null),children:[x===0?e.jsx(Ht,{height:s}):e.jsx("div",{role:"img","aria-label":l["aria-label"],tabIndex:0,onKeyDown:p,onBlur:()=>m(null),className:jn,children:e.jsxs("svg",{width:x,height:s,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsx(og,{id:b})}),e.jsx(As,{ticks:v.ticks,y:P,left:w,right:w+y,format:r}),t.map((T,B)=>e.jsxs("g",{opacity:d!==null&&d!==B?.4:1,className:"transition-opacity duration-150",children:[n.map((W,C)=>{const D=W.values[B]??0,H=P(Math.max(0,D));return e.jsx("path",{d:da(O(B,C),H,G,A-H,4),fill:L(W.variant)},W.id)}),R&&S===B&&e.jsx("text",{x:R.x,y:R.y,textAnchor:"middle",className:"fill-foreground text-[11px] font-semibold tabular-nums",children:R.text})]},T+B)),o&&e.jsxs("g",{children:[e.jsx("line",{x1:w,x2:w+y,y1:ce(P(o.value)),y2:ce(P(o.value)),stroke:"var(--viz-4)",strokeWidth:1,strokeDasharray:"4 3"}),e.jsxs("text",{x:w+y,y:P(o.value)-5,textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:[o.label," ",r(o.value)]})]}),e.jsx(ha,{labels:t,x:E.center,y:s-8,width:y,minGap:36,activeIndex:d}),t.map((T,B)=>e.jsx("rect",{x:E.center(B)-E.step/2,y:g,width:E.step,height:M,fill:"transparent",onPointerEnter:()=>m(B)},`hit-${T}-${B}`))]})}),d!==null&&x>0&&e.jsx(Mt,{x:E.center(d)+U/2,y:$(d),containerWidth:x,containerHeight:s,title:t[d],rows:n.map(T=>({label:T.label,value:r(T.values[d]??0),color:T.variant==="context"?I.context:I.ink,swatch:T.variant==="plan"?"hatch":"solid"}))}),e.jsx(Sn,{children:d!==null?`${t[d]}:${n.map(T=>`${T.label} ${r(T.values[d]??0)}`).join(",")}`:""})]})}function Od({labels:t,segments:n,data:s,colors:r,height:a=220,formatValue:o=De,highlightIndex:i,className:l,...u}){const{t:x}=Be(),[d,m]=Ct(),{active:p,setActive:b,handleKeyDown:h}=Pd(t.length),f=t.length,v=r??vn(n.length),g=s.map(O=>O.reduce(($,R)=>$+R,0)),N=Ft(g,{count:4}),w=18,y=26,M=ft(N.ticks.map(o)),P=Math.max(0,m-M-8),A=Math.max(0,a-w-y),E=Ge([N.min,N.max],[w+A,w]),G=ca(f,M,M+P,{paddingInner:.4,paddingOuter:.2}),U=Math.max(2,Math.min(Ad,G.bandwidth)),S=i===void 0?f-1:i,L=t.map((O,$)=>{const R=s[$]??[],T=[];let B=0,W=-1;for(let C=0;C<R.length;C++)R[C]>0&&(W=C);for(let C=0;C<R.length;C++){const D=R[C];if(D<=0)continue;const H=E(B),ie=B===0;B+=D;const pe=E(B),le=ie?H:H-Jt;le-pe>0&&T.push({segmentIndex:C,top:pe,height:le-pe,rounded:C===W})}return{key:`${O}-${$}`,index:$,x:G.center($)-U/2,parts:T}});return e.jsxs("div",{ref:d,className:j("relative w-full",l),onPointerLeave:()=>b(null),children:[m===0?e.jsx(Ht,{height:a}):e.jsx("div",{role:"img","aria-label":u["aria-label"],tabIndex:0,onKeyDown:h,onBlur:()=>b(null),className:jn,children:e.jsxs("svg",{width:m,height:a,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx(As,{ticks:N.ticks,y:E,left:M,right:M+P,format:o}),L.map(O=>e.jsxs("g",{opacity:p!==null&&p!==O.index?.4:1,className:"transition-opacity duration-150",children:[O.parts.map($=>$.rounded?e.jsx("path",{d:da(O.x,$.top,U,$.height,4),fill:v[$.segmentIndex]},$.segmentIndex):e.jsx("rect",{x:O.x,y:$.top,width:U,height:$.height,fill:v[$.segmentIndex]},$.segmentIndex)),S===O.index&&e.jsx("text",{x:G.center(O.index),y:E(g[O.index])-6,textAnchor:"middle",className:"fill-foreground text-[11px] font-semibold tabular-nums",children:o(g[O.index])})]},O.key)),e.jsx(ha,{labels:t,x:G.center,y:a-8,width:P,minGap:36,activeIndex:p}),t.map((O,$)=>e.jsx("rect",{x:G.center($)-G.step/2,y:w,width:G.step,height:A,fill:"transparent",onPointerEnter:()=>b($)},`hit-${O}-${$}`))]})}),p!==null&&m>0&&e.jsx(Mt,{x:G.center(p)+U/2,y:E(g[p]),containerWidth:m,containerHeight:a,title:t[p],rows:n.map((O,$)=>({label:O.label,value:o(s[p]?.[$]??0),color:v[$],swatch:"solid"})).reverse(),footer:`${x("Total")} ${o(g[p])}`}),e.jsx(Sn,{children:p!==null?`${t[p]}:${n.map((O,$)=>`${O.label} ${o(s[p]?.[$]??0)}`).join(",")}`:""})]})}const Ca=15;function ka(t){return t.start===0?0:(t.end-t.start)/Math.abs(t.start)}function $d({items:t,startLabel:n,endLabel:s,height:r=240,formatValue:a=De,formatChange:o,className:i,...l}){const[u,x]=Ct(),[d,m]=c.useState(null),p=R=>o?o(R):Dr(ka(R)),b=t.map(R=>`${R.label} ${a(R.start)}`),h=t.map(R=>`${a(R.end)} ${R.label} ${p(R)}`),f=Math.min(ft(b),x*.3),v=Math.min(ft(h),x*.4),g=f+6,N=Math.max(g+40,x-v-6),w=30,y=12,M=t.flatMap(R=>[R.start,R.end]),P=Math.min(...M),A=Math.max(...M),E=(A-P||1)*.06,G=Ge([P-E,A+E],[r-y,w]),U=lr(t.map(R=>G(R.start)),Ca,[w,r-y]),S=lr(t.map(R=>G(R.end)),Ca,[w,r-y]),L=R=>d!==null?d===R:!!t[R].emphasis,O=t.map((R,T)=>T).sort((R,T)=>Number(L(R))-Number(L(T))),$=R=>{const T=cs(R.key,d,t.length,"y");T!==void 0&&(R.preventDefault(),m(T))};return e.jsxs("div",{ref:u,className:j("relative w-full",i),children:[x===0?e.jsx(Ht,{height:r}):e.jsx("div",{role:"img","aria-label":l["aria-label"],tabIndex:0,onKeyDown:$,onBlur:()=>m(null),className:jn,children:e.jsxs("svg",{width:x,height:r,className:"block overflow-visible","aria-hidden":"true",onPointerLeave:()=>m(null),children:[e.jsx("text",{x:g,y:12,textAnchor:"middle",className:"fill-muted-foreground text-[11px]",children:n}),e.jsx("text",{x:N,y:12,textAnchor:"middle",className:"fill-muted-foreground text-[11px]",children:s}),e.jsx("line",{x1:ce(g),x2:ce(g),y1:w-8,y2:r-y+4,stroke:I.grid}),e.jsx("line",{x1:ce(N),x2:ce(N),y1:w-8,y2:r-y+4,stroke:I.grid}),O.map(R=>{const T=t[R],B=L(R),W=B?I.ink:I.context,C=G(T.start),D=G(T.end),H=ka(T);return e.jsxs("g",{onPointerEnter:()=>m(R),children:[e.jsx("line",{x1:g,y1:C,x2:N,y2:D,stroke:"transparent",strokeWidth:14}),e.jsx("line",{x1:g,y1:C,x2:N,y2:D,stroke:W,strokeWidth:B?2:1.5,strokeLinecap:"round"}),e.jsx("circle",{cx:g,cy:C,r:B?4:3,fill:W,stroke:I.surface,strokeWidth:2}),e.jsx("circle",{cx:N,cy:D,r:B?4:3,fill:W,stroke:I.surface,strokeWidth:2}),Math.abs(U[R]-C)>1.5&&e.jsx("line",{x1:g-5,y1:C,x2:g-9,y2:U[R],stroke:I.axis}),e.jsxs("text",{x:g-11,y:U[R],dy:"0.32em",textAnchor:"end",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:B?"fill-foreground font-medium":"fill-muted-foreground",children:T.label}),e.jsx("tspan",{dx:4,className:B?"fill-foreground font-semibold":"fill-muted-foreground",children:a(T.start)})]}),Math.abs(S[R]-D)>1.5&&e.jsx("line",{x1:N+5,y1:D,x2:N+9,y2:S[R],stroke:I.axis}),e.jsxs("text",{x:N+11,y:S[R],dy:"0.32em",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:B?"fill-foreground font-semibold":"fill-muted-foreground",children:a(T.end)}),e.jsx("tspan",{dx:4,className:B?"fill-foreground font-medium":"fill-muted-foreground",children:T.label}),e.jsx("tspan",{dx:4,className:j(B?H>0?"fill-success-ink":H<0?"fill-destructive-ink":"fill-muted-foreground":"fill-muted-foreground"),children:p(T)})]})]},T.id)})]})}),d!==null&&x>0&&e.jsx(Mt,{x:N,y:G(t[d].end),containerWidth:x,containerHeight:r,title:t[d].label,rows:[{label:n,value:a(t[d].start),color:I.context},{label:s,value:a(t[d].end),color:I.ink}],footer:p(t[d])}),e.jsx(Sn,{children:d!==null?`${t[d].label}:${n} ${a(t[d].start)},${s} ${a(t[d].end)},${p(t[d])}`:""})]})}function fr({segments:t,size:n=136,thickness:s=14,centerValue:r,centerLabel:a,formatValue:o=De,className:i,...l}){const[u,x]=c.useState(null),d=t.reduce((y,M)=>y+M.value,0),m=vn(t.length),p=y=>t[y].color??m[y],b=n/2,h=n/2,f=h-s,v=t.length>1?2/(h-s/2):0,g=[];let N=0;for(let y=0;y<t.length;y++){const M=d>0?t[y].value/d*Math.PI*2:0,P=N+v/2,A=N+M-v/2;N+=M,g.push({index:y,d:A>P?Qn(b,b,h,f,P,A):""})}const w=u!==null?t[u]:null;return e.jsxs("div",{className:j("flex flex-wrap items-center gap-x-6 gap-y-4",i),children:[e.jsxs("div",{className:"relative shrink-0",style:{width:n,height:n},children:[e.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,role:"img","aria-label":l["aria-label"],onPointerLeave:()=>x(null),children:[e.jsx("circle",{cx:b,cy:b,r:h-s/2,fill:"none",stroke:I.empty,strokeWidth:s,opacity:d>0?0:1}),g.map(y=>y.d&&e.jsx("path",{d:y.d,fill:p(y.index),opacity:u!==null&&u!==y.index?.3:1,className:"transition-opacity duration-150",onPointerEnter:()=>x(y.index)},t[y.index].id))]}),e.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center",children:[e.jsx("span",{className:"text-[22px] font-semibold leading-7 tracking-tight text-foreground",children:w?o(w.value):r??o(d)}),e.jsx("span",{className:"max-w-[80%] truncate text-[11px] leading-4 text-muted-foreground",children:w?`${w.label} · ${ae(d?w.value/d:0)}`:a})]})]}),e.jsx("table",{className:"min-w-[160px] flex-1 border-collapse text-xs",children:e.jsx("tbody",{children:t.map((y,M)=>e.jsxs("tr",{onPointerEnter:()=>x(M),onPointerLeave:()=>x(null),className:j("transition-opacity duration-150",u!==null&&u!==M&&"opacity-40"),children:[e.jsx("td",{className:"h-7 w-4 pr-2",children:e.jsx(Is,{color:p(M)})}),e.jsx("td",{className:"h-7 truncate pr-3 text-foreground/85",children:y.label}),e.jsx("td",{className:"h-7 pr-3 text-right font-medium tabular-nums text-foreground",children:o(y.value)}),e.jsx("td",{className:"h-7 w-10 text-right tabular-nums text-muted-foreground",children:ae(d?y.value/d:0)})]},y.id))})})]})}function Ld({value:t,secondary:n=0,cellSize:s=10,className:r,...a}){const o=Math.round(Math.min(1,Math.max(0,t))*100),i=Math.min(100-o,Math.round(Math.max(0,n)*100));return e.jsx("div",{role:"img","aria-label":a["aria-label"],className:j("grid w-max grid-cols-10 gap-[2px]",r),children:Array.from({length:100}).map((l,u)=>e.jsx("span",{"aria-hidden":"true",className:j("rounded-[2px]",u<o?"bg-viz-6":u<o+i?"hatch bg-viz-0 text-viz-3":"bg-viz-0"),style:{width:s,height:s}},u))})}function zd({items:t,formatValue:n=De,max:s,showRank:r=!0,className:a,...o}){const[i,l]=c.useState(null),u=s??Math.max(1,...t.map(x=>x.value));return e.jsx("ol",{"aria-label":o["aria-label"],className:j("flex flex-col",a),onPointerLeave:()=>l(null),children:t.map((x,d)=>e.jsxs("li",{onPointerEnter:()=>l(x.id),className:j("grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 py-1.5 transition-opacity duration-150",!r&&"grid-cols-[minmax(0,1fr)_auto]",i!==null&&i!==x.id&&"opacity-45"),children:[r&&e.jsx("span",{className:j("w-5 text-[11px] font-semibold tabular-nums",d<3?"text-foreground":"text-muted-foreground"),children:String(d+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[x.icon&&e.jsx("span",{className:"flex shrink-0 [&_svg]:size-3.5",children:x.icon}),e.jsx("span",{className:"truncate text-[13px] text-foreground/90",children:x.label}),Re(x.meta)&&e.jsx("span",{className:"shrink-0 truncate text-[11px] text-muted-foreground",children:x.meta})]}),e.jsx("div",{className:"mt-1 h-1.5 w-full",children:e.jsx("div",{className:"h-full rounded-r-[3px] bg-viz-6 transition-[width] duration-500 ease-enter motion-reduce:transition-none",style:{width:`max(2px, ${x.value/u*100}%)`}})})]}),e.jsx("span",{className:"text-right text-[13px] font-semibold tabular-nums text-foreground",children:n(x.value)})]},x.id))})}function Fd({stages:t,formatValue:n=De,className:s,...r}){const a=t[0]?.value||1,o=Math.max(1,...t.map(x=>x.value)),i=vn(t.length).slice().reverse(),l=t.map((x,d)=>d===0?1:t[d-1].value?x.value/t[d-1].value:0),u=l.slice(1).reduce((x,d,m)=>d<l[x+1]?m:x,0)+1;return e.jsx("div",{role:"img","aria-label":r["aria-label"],className:j("flex flex-col",s),children:t.map((x,d)=>{const m=x.value/o,p=d<t.length-1?t[d+1].value/o:m;return e.jsxs("div",{children:[e.jsxs("div",{className:"grid grid-cols-[5.5rem_minmax(0,1fr)_4.5rem] items-center gap-3",children:[e.jsx("span",{className:"truncate text-xs text-foreground/85",children:x.label}),e.jsx("div",{className:"flex h-6 justify-center",children:e.jsx("div",{className:"h-full rounded-[4px]",style:{width:`${m*100}%`,background:i[d]}})}),e.jsxs("span",{className:"text-right",children:[e.jsx("span",{className:"block text-[13px] font-semibold leading-4 tabular-nums text-foreground",children:n(x.value)}),e.jsx("span",{className:"block text-[10px] leading-3 tabular-nums text-muted-foreground",children:ae(x.value/a)})]})]}),d<t.length-1&&e.jsxs("div",{className:"grid grid-cols-[5.5rem_minmax(0,1fr)_4.5rem] items-center gap-3",children:[e.jsx("span",{}),e.jsxs("div",{className:"relative flex h-5 items-center justify-center",children:[e.jsx("svg",{viewBox:"0 0 100 10",preserveAspectRatio:"none",className:"absolute inset-0 size-full","aria-hidden":"true",children:e.jsx("polygon",{points:`${50-m*50},0 ${50+m*50},0 ${50+p*50},10 ${50-p*50},10`,fill:I.empty})}),e.jsxs("span",{className:j("relative text-[10px] leading-none tabular-nums",d+1===u?"font-medium text-warning-ink":"text-foreground/70"),children:["↓ ",ae(l[d+1])]})]}),e.jsx("span",{})]})]},x.id)})})}function cg(t){return t>=4?"text-white":"text-foreground/80"}function gr({steps:t=[0,1,3,4,6],className:n}){const{t:s}=Be();return e.jsxs("span",{className:j("inline-flex items-center gap-1.5 text-[11px] text-muted-foreground",n),children:[s("Less"),e.jsx("span",{className:"flex gap-[2px]","aria-hidden":"true",children:t.map(r=>e.jsx("span",{className:"size-2.5 rounded-[2px]",style:{background:gt[r]}},r))}),s("More")]})}function Gd({rows:t,columns:n,data:s,corner:r,formatValue:a=De,max:o,showValues:i=!0,className:l,...u}){const x=o??Math.max(1,...s.flat());return e.jsx("div",{className:j("overflow-x-auto scrollbar-app-thin",l),children:e.jsxs("table",{"aria-label":u["aria-label"],className:"border-separate border-spacing-[2px] text-[11px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"pr-2 text-left font-normal text-muted-foreground",children:r}),n.map(d=>e.jsx("th",{scope:"col",className:"h-6 min-w-9 px-1 text-center font-normal text-muted-foreground",children:d},d))]})}),e.jsx("tbody",{children:t.map((d,m)=>{const{name:p,label:b}=typeof d=="string"?{name:d,label:d}:d;return e.jsxs("tr",{children:[e.jsx("th",{scope:"row",className:"whitespace-nowrap pr-2 text-left font-normal text-foreground/85",children:e.jsx("span",{className:"block max-w-40 truncate",children:b??p})}),n.map((h,f)=>{const v=s[m]?.[f]??0,g=Jn(v,x,7);return e.jsx("td",{title:`${p} · ${h}:${a(v)}`,className:j("h-7 min-w-9 rounded-[3px] px-1 text-center tabular-nums transition-shadow hover:ring-2 hover:ring-foreground/70",cg(g)),style:{background:gt[g]},children:i?a(v):e.jsx("span",{className:"sr-only",children:a(v)})},h)})]},m)})})]})})}const Tn=[0,1,3,4,6];function Bd({start:t,values:n,describe:s,locale:r,className:a,...o}){const[i,l]=Ct(),[u,x]=c.useState(null),d=(t.getDay()+6)%7,m=Math.ceil((n.length+d)/7),p=22,b=2,h=Fe(Math.floor((l-p)/m)-b,6,13),f=h+b,v=16,g=v+f*7,N=Math.max(1,...n),w=new Intl.DateTimeFormat(r,{month:"short"}),y=new Intl.DateTimeFormat(r,{weekday:"narrow"}),M=E=>Xe(t,E),P=[];for(let E=0;E<n.length;E++){const G=M(E);if(G.getDate()===1){const U=Math.floor((E+d)/7);(!P.length||U-P[P.length-1].week>=3)&&P.push({week:U,label:w.format(G)})}}const A=Xe(t,-d);return e.jsxs("div",{ref:i,className:j("relative w-full",a),onPointerLeave:()=>x(null),children:[l===0?e.jsx(Ht,{height:g}):e.jsxs("svg",{width:p+m*f,height:g,role:"img","aria-label":o["aria-label"],className:"block",children:[P.map(E=>e.jsx("text",{x:p+E.week*f,y:10,className:"fill-muted-foreground text-[10px]",children:E.label},E.week)),[0,2,4].map(E=>e.jsx("text",{x:0,y:v+E*f+h/2,dy:"0.32em",className:"fill-muted-foreground text-[10px]",children:y.format(Xe(A,E))},E)),n.map((E,G)=>{const U=G+d,S=Math.floor(U/7),L=U%7,O=Tn[Jn(E,N,Tn.length)],$=p+S*f,R=v+L*f;return e.jsx("rect",{x:$,y:R,width:h,height:h,rx:2,fill:gt[O],stroke:u?.index===G?I.text:"none",strokeWidth:1.5,onPointerEnter:()=>x({x:$+h,y:R,index:G})},G)})]}),u&&l>0&&e.jsx(Mt,{x:u.x,y:u.y,containerWidth:l,containerHeight:g,rows:[{label:s?s(M(u.index),n[u.index]):M(u.index).toLocaleDateString(r),value:n[u.index],swatch:"solid",color:gt[Tn[Jn(n[u.index],N,Tn.length)]]}]})]})}function Ud({points:t,xLabel:n,yLabel:s,height:r=240,formatX:a=De,formatY:o=De,className:i,...l}){const[u,x]=Ct(),[d,m]=c.useState(null),p=Ft(t.map(S=>S.x),{count:5}),b=Ft(t.map(S=>S.y),{count:4}),h=ft(b.ticks.map(o)),f=18,v=36,N=Math.max(0,x-h-12),w=Math.max(0,r-f-v),y=Ge([p.min,p.max],[h,h+N]),M=Ge([b.min,b.max],[f+w,f]),P=t.some(S=>S.emphasis),A=t.find(S=>S.id===d),E=[...t].sort((S,L)=>+!!S.emphasis-+!!L.emphasis),G=[...t].sort((S,L)=>S.x-L.x||S.y-L.y),U=S=>{const L=G.findIndex($=>$.id===d),O=cs(S.key,L===-1?null:L,G.length);O!==void 0&&(S.preventDefault(),m(G[O].id))};return e.jsxs("div",{ref:u,className:j("relative w-full",i),onPointerLeave:()=>m(null),children:[x===0?e.jsx(Ht,{height:r}):e.jsx("div",{role:"img","aria-label":l["aria-label"],tabIndex:0,onKeyDown:U,onBlur:()=>m(null),className:jn,children:e.jsxs("svg",{width:x,height:r,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx(As,{ticks:b.ticks,y:M,left:h,right:h+N,format:o}),p.ticks.map(S=>e.jsxs("g",{children:[e.jsx("line",{x1:ce(y(S)),x2:ce(y(S)),y1:f,y2:f+w,stroke:S===p.min?I.axis:I.grid}),e.jsx("text",{x:y(S),y:f+w+16,textAnchor:"middle",className:"fill-muted-foreground text-[11px] tabular-nums",children:a(S)})]},S)),e.jsxs("text",{x:h+N,y:r-2,textAnchor:"end",className:"fill-muted-foreground text-[11px]",children:[n," →"]}),e.jsxs("text",{x:h,y:f-6,textAnchor:"start",className:"fill-muted-foreground text-[11px]",children:["↑ ",s]}),E.map(S=>{const L=!P||S.emphasis||S.id===d;return e.jsxs("g",{onPointerEnter:()=>m(S.id),children:[e.jsx("circle",{cx:y(S.x),cy:M(S.y),r:12,fill:"transparent"}),e.jsx("circle",{cx:y(S.x),cy:M(S.y),r:S.id===d?5:4,fill:L?I.ink:I.context,stroke:I.surface,strokeWidth:2})]},S.id)}),E.map(S=>{if(!S.emphasis||!S.label)return null;const L=y(S.x),O=L+9+qa(S.label)>h+N;return e.jsx("text",{x:O?L-9:L+9,y:M(S.y)+4,textAnchor:O?"end":"start",stroke:I.surface,strokeWidth:3,strokeLinejoin:"round",paintOrder:"stroke",className:"pointer-events-none fill-foreground text-[11px]",children:S.label},`label-${S.id}`)})]})}),A&&x>0&&e.jsx(Mt,{x:y(A.x),y:M(A.y),containerWidth:x,containerHeight:r,title:A.label,rows:[{label:n,value:a(A.x),swatch:"dot"},{label:s,value:o(A.y),swatch:"dot"}]}),e.jsx(Sn,{children:A?`${A.label?`${A.label}:`:""}${n} ${a(A.x)},${s} ${o(A.y)}`:""})]})}function Vd({tasks:t,start:n,days:s,today:r,locale:a,className:o,...i}){const{t:l}=Be(),u=h=>`${h/s*100}%`,x=[],d=[],m=new Intl.DateTimeFormat(a,{month:"short"});for(let h=0;h<s;h++){const f=Xe(n,h);f.getDay()===1&&x.push(h),(h===0||f.getDate()===1)&&d.push({day:h,label:m.format(f)})}const p=r!==void 0&&r>=0&&r<s,b=p&&e.jsx("span",{"aria-hidden":"true",className:"absolute inset-y-0 w-px bg-foreground/50",style:{left:u(r+.5)}});return e.jsxs("div",{role:"table","aria-label":i["aria-label"],className:j("text-xs",o),children:[e.jsxs("div",{role:"row",className:"grid grid-cols-[minmax(7rem,9rem)_minmax(0,1fr)] border-b border-border/60",children:[e.jsx("div",{role:"columnheader",className:"h-8"}),e.jsxs("div",{role:"columnheader",className:"relative h-8",children:[d.map(h=>e.jsx("span",{className:"absolute top-1 text-[11px] font-medium text-foreground/80",style:{left:u(h.day)},children:h.label},h.day)),x.map(h=>e.jsx("span",{className:"absolute bottom-0.5 -translate-x-1/2 text-[10px] tabular-nums text-muted-foreground",style:{left:u(h)},children:Xe(n,h).getDate()},h)),p&&e.jsx("span",{className:"absolute -bottom-px z-[1] -translate-x-1/2 rounded bg-foreground px-1 py-px text-[10px] font-medium leading-3 text-background",style:{left:u(r+.5)},children:l("Today")})]})]}),t.map(h=>{const f=Math.min(1,Math.max(0,h.progress)),v=p&&h.end<r&&f<1,g=(h.end+1)/s>.86;return e.jsxs("div",{role:"row",className:"group grid grid-cols-[minmax(7rem,9rem)_minmax(0,1fr)]",children:[e.jsxs("div",{role:"rowheader",className:"flex min-w-0 flex-col justify-center py-1.5 pr-3",children:[e.jsx("span",{className:"truncate text-xs text-foreground/90",children:h.label}),h.meta&&e.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:h.meta})]}),e.jsxs("div",{role:"cell",className:"relative h-11 transition-colors group-hover:bg-foreground/[0.02]",children:[x.map(N=>e.jsx("span",{"aria-hidden":"true",className:"absolute inset-y-0 w-px bg-viz-grid",style:{left:u(N)}},N)),b,e.jsxs("div",{title:`${h.label} · ${ae(f)}`,className:"absolute top-1/2 flex h-2.5 -translate-y-1/2 overflow-hidden rounded-[3px]",style:{left:u(h.start),width:u(h.end-h.start+1)},children:[e.jsx("span",{className:"h-full bg-viz-6",style:{width:`${f*100}%`}}),e.jsx("span",{className:j("hatch h-full flex-1",v?"bg-destructive/10 text-destructive/60":"bg-viz-0 text-viz-3")})]}),e.jsx("span",{className:j("absolute top-1/2 -translate-y-1/2 whitespace-nowrap text-[11px] tabular-nums",v?"font-medium text-destructive-ink":"text-muted-foreground"),style:g?{right:`calc(${(1-h.start/s)*100}% + 6px)`}:{left:`calc(${u(h.end+1)} + 6px)`},children:ae(f)})]})]},h.id)})]})}function dg(t){return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}function Kd({year:t,month:n,events:s,today:r,locale:a,maxPerDay:o=2,className:i}){const u=(new Date(t,n,1).getDay()+6)%7,x=new Date(t,n,1-u),d=new Intl.DateTimeFormat(a,{weekday:"short"}),m=new Map;for(const b of s){const h=m.get(b.date)??[];h.push(b),m.set(b.date,h)}const p=Array.from({length:42},(b,h)=>new Date(x.getFullYear(),x.getMonth(),x.getDate()+h));return e.jsxs("div",{className:j("overflow-hidden rounded-lg border border-border/70",i),children:[e.jsx("div",{className:"grid grid-cols-7 border-b border-border/60 bg-foreground/[0.015]",children:p.slice(0,7).map(b=>e.jsx("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground",children:d.format(b)},b.getDay()))}),e.jsx("div",{className:"grid grid-cols-7",children:p.map((b,h)=>{const f=dg(b),v=b.getMonth()===n,g=f===r,N=m.get(f)??[];return e.jsxs("div",{className:j("min-h-[84px] border-border/60 p-1.5",h%7!==6&&"border-r",h<35&&"border-b",!v&&"bg-foreground/[0.015]"),children:[e.jsx("span",{className:j("inline-flex size-5 items-center justify-center rounded-full text-[11px] tabular-nums",g?"bg-primary font-semibold text-primary-foreground":v?"text-foreground/80":"text-muted-foreground"),children:b.getDate()}),e.jsxs("ul",{className:"mt-1 space-y-0.5",children:[N.slice(0,o).map(w=>e.jsxs("li",{className:j("flex min-w-0 items-center gap-1 text-[11px] leading-4",!v&&"opacity-50"),children:[e.jsx("span",{"aria-hidden":"true",className:j("h-2.5 w-0.5 shrink-0 rounded-full",w.tone?on[w.tone]:"bg-viz-6")}),w.time&&e.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:w.time}),e.jsx("span",{className:"truncate text-foreground/85",children:w.title})]},w.id)),N.length>o&&e.jsxs("li",{className:"pl-1.5 text-[11px] leading-4 text-muted-foreground",children:["+",N.length-o]})]})]},f)})})]})}const ug={none:"",sm:"px-3 pb-3",md:"px-4 pb-4"};function xg({title:t,description:n,actions:s,footer:r,variant:a="plain",padding:o="md",className:i,children:l,...u}){const x=!!(t||s);return e.jsxs("section",{"data-slot":"panel",className:j("flex min-w-0 flex-col rounded-xl border",a==="plain"?"border-border/70 bg-background":"border-border/60 bg-muted/40",i),...u,children:[x&&e.jsxs("header",{className:j("flex items-start justify-between gap-3 pb-2.5 pt-3.5",o==="sm"?"px-3":"px-4"),children:[e.jsxs("div",{className:"min-w-0",children:[t&&e.jsx("h3",{className:"truncate text-[13px] font-semibold leading-5 text-foreground",children:t}),n&&e.jsx("p",{className:"text-[11px] leading-4 text-muted-foreground",children:n})]}),s&&e.jsx("div",{className:"-mr-1 -mt-0.5 flex shrink-0 items-center gap-1",children:s})]}),e.jsx("div",{className:j("min-w-0 flex-1",ug[o],!x&&o!=="none"&&(o==="sm"?"pt-3":"pt-4")),children:l}),r&&e.jsx("footer",{className:"border-t border-border/60 px-4 py-2.5 text-xs text-muted-foreground",children:r})]})}function en({label:t,value:n,unit:s,icon:r,delta:a,trend:o,footnote:i,className:l}){return e.jsxs("div",{className:j("flex min-w-0 flex-col gap-1 bg-background p-4",l),children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground [&_svg]:size-3.5",children:[r,e.jsx("span",{className:"truncate",children:t})]}),e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-1",children:[e.jsx("span",{className:"truncate text-[26px] font-semibold leading-8 tracking-tight text-foreground",children:n}),Re(s)&&e.jsx("span",{className:"shrink-0 text-[13px] text-muted-foreground",children:s})]}),o&&e.jsx(ma,{values:o,area:!0,width:76,height:28,className:"mb-1"})]}),(a||i)&&e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a&&e.jsx(Ie,{...a}),i&&e.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:i})]})]})}function Hd({className:t,...n}){return e.jsx("div",{className:j("grid gap-px overflow-hidden rounded-xl border border-border/70 bg-border/60 sm:grid-cols-2 xl:grid-cols-4",t),...n})}function Wd({value:t,unit:n,label:s,delta:r,caption:a,className:o}){return e.jsxs("div",{className:j("flex flex-col gap-1.5",o),children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:s}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-[56px] font-semibold leading-none tracking-tight text-foreground",children:t}),Re(n)&&e.jsx("span",{className:"text-xl font-medium text-muted-foreground",children:n})]}),(r||a)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r&&e.jsx(Ie,{size:"md",...r}),Re(a)&&e.jsx("span",{className:"text-xs text-muted-foreground",children:a})]})]})}function $n({label:t,value:n,max:s,formatValue:r=l=>ze(l,{compact:!0}),warningAt:a=.7,dangerAt:o=.9,className:i}){const l=s>0?n/s:0,u=l>=o?"danger":l>=a?"warning":"ink";return e.jsxs("div",{className:j("flex flex-col gap-1.5",i),children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-xs",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-1 text-foreground/85",children:[u!=="ink"&&e.jsx(wt,{"aria-hidden":"true",className:j("size-3 shrink-0",u==="danger"?"text-destructive":"text-warning")}),e.jsx("span",{className:"truncate",children:t})]}),e.jsxs("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:[r(n)," / ",r(s),e.jsx("span",{className:j("ml-1.5 font-medium",u==="danger"?"text-destructive-ink":u==="warning"?"text-warning-ink":"text-foreground/80"),children:ae(l)})]})]}),e.jsx(Pe,{value:n,max:s,tone:u,"aria-label":typeof t=="string"?t:void 0})]})}function jr({code:t,title:n,meta:s,health:r,progress:a,keyResults:o,className:i}){return e.jsxs("article",{className:j("rounded-xl border border-border/70 bg-background p-4",i),children:[e.jsxs("header",{className:"flex items-start gap-3",children:[e.jsx(pt,{value:a,size:44,thickness:4}),e.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[t&&e.jsx("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:t}),e.jsx("h4",{className:"truncate text-sm font-semibold leading-5 text-foreground",children:n})]}),Re(s)&&e.jsx("p",{className:"truncate text-[11px] leading-4 text-muted-foreground",children:s})]}),r&&e.jsx(pa,{health:r,className:"mt-0.5"})]}),e.jsx("ul",{className:"mt-3 flex flex-col gap-2.5",children:o.map(l=>e.jsxs("li",{children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[l.code&&e.jsx("span",{className:"w-7 shrink-0 font-mono text-[10px] text-muted-foreground",children:l.code}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground/85",children:l.title}),Re(l.current)&&e.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:l.current}),e.jsx("span",{className:"w-9 shrink-0 text-right text-xs font-semibold tabular-nums text-foreground",children:ae(l.progress)})]}),e.jsx(Pe,{value:l.progress,expected:l.expected,size:"xs",className:j("mt-1.5",l.code&&"ml-9 w-[calc(100%-2.25rem)]")})]},l.id))})]})}function Sa(t,n){if(n.sortValue)return n.sortValue(t);const s=t[n.key];return typeof s=="number"||typeof s=="string"?s:""}function qd({columns:t,rows:n,rowKey:s,density:r="compact",defaultSort:a,selectedKey:o,onRowClick:i,loading:l=!1,empty:u,caption:x,className:d}){const[m,p]=c.useState(a??null),b=(()=>{if(!m)return n;const g=t.find(w=>w.key===m.key);if(!g)return n;const N=m.direction==="asc"?1:-1;return[...n].sort((w,y)=>{const M=Sa(w,g),P=Sa(y,g);return typeof M=="number"&&typeof P=="number"?(M-P)*N:String(M).localeCompare(String(P),void 0,{numeric:!0})*N})})(),h=g=>{p(N=>!N||N.key!==g?{key:g,direction:"desc"}:N.direction==="desc"?{key:g,direction:"asc"}:null)},f=r==="compact"?"h-9":"h-11",v=g=>g.numeric||g.align==="right"?"text-right":g.align==="center"?"text-center":"text-left";return e.jsx("div",{className:j("overflow-x-auto scrollbar-app-thin",d),children:e.jsxs("table",{className:"w-full border-collapse text-[13px]",children:[x&&e.jsx("caption",{className:"sr-only",children:x}),e.jsx("thead",{children:e.jsx("tr",{className:"border-b border-border/70",children:t.map(g=>{const N=m?.key===g.key,w=N?m?.direction==="asc"?xs:ho:bo;return e.jsx("th",{scope:"col",style:g.width?{width:g.width}:void 0,"aria-sort":N?m?.direction==="asc"?"ascending":"descending":void 0,className:j("h-8 whitespace-nowrap px-3 text-[11px] font-medium text-muted-foreground first:pl-2 last:pr-2",v(g)),children:g.sortable?e.jsxs("button",{type:"button",onClick:()=>h(g.key),className:j("group inline-flex items-center gap-1 rounded transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",(g.numeric||g.align==="right")&&"flex-row-reverse",N&&"text-foreground"),children:[g.header,e.jsx(w,{"aria-hidden":"true",className:j("size-3",N?"opacity-100":"opacity-0 group-hover:opacity-60 group-focus-visible:opacity-60")})]}):g.header},g.key)})})}),e.jsx("tbody",{children:l?Array.from({length:4}).map((g,N)=>e.jsx("tr",{className:"border-b border-border/40",children:t.map(w=>e.jsx("td",{className:j(f,"px-3 first:pl-2 last:pr-2"),children:e.jsx(mt,{className:j("h-2.5",w.numeric?"ml-auto w-10":"w-3/4")})},w.key))},N)):b.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:"py-2",children:u})}):b.map(g=>{const N=s(g),w=o===N;return e.jsx("tr",{"aria-selected":i?w:void 0,tabIndex:i?0:void 0,onClick:i?()=>i(g):void 0,onKeyDown:i?y=>{y.key==="Enter"&&i(g)}:void 0,className:j("border-b border-border/40 transition-colors last:border-0",i&&"cursor-pointer outline-none focus-visible:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60",w?"bg-accent":"hover:bg-accent/60"),children:t.map(y=>e.jsx("td",{className:j(f,"px-3 text-foreground/85 first:pl-2 last:pr-2",v(y),y.numeric&&"tabular-nums"),children:y.render?y.render(g):String(g[y.key]??"")},y.key))},N)})})]})})}function mg({status:t}){return e.jsxs("span",{"aria-hidden":"true",className:j("flex size-5 shrink-0 items-center justify-center rounded-md",t==="done"&&"bg-primary text-primary-foreground",t==="current"&&"bg-background ring-[1.5px] ring-inset ring-foreground",t==="upcoming"&&"bg-background ring-1 ring-inset ring-border",t==="blocked"&&"bg-destructive/10 text-destructive ring-1 ring-inset ring-destructive/50"),children:[t==="done"&&e.jsx(Oe,{className:"size-3",strokeWidth:3}),t==="current"&&e.jsx("span",{className:"size-1.5 rounded-full bg-foreground"}),t==="blocked"&&e.jsx(wt,{className:"size-3"})]})}function vr({steps:t,className:n}){return e.jsx("div",{className:j("overflow-x-auto scrollbar-app-thin pb-1",n),children:e.jsx("ol",{className:"flex min-w-max",children:t.map((s,r)=>{const a=r===t.length-1;return e.jsxs("li",{"aria-current":s.status==="current"?"step":void 0,className:j("flex min-w-[128px] flex-col gap-2",!a&&"flex-1 pr-3"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(mg,{status:s.status}),!a&&e.jsx("span",{"aria-hidden":"true",className:j("h-px flex-1",s.status==="done"?"bg-foreground":"bg-border")})]}),e.jsxs("div",{className:"min-w-0 pr-2",children:[e.jsx("div",{className:"font-mono text-[10px] text-muted-foreground",children:String(r+1).padStart(2,"0")}),e.jsx("div",{className:j("text-[13px] leading-5",s.status==="upcoming"?"text-foreground/70":"font-medium text-foreground"),children:s.title}),(s.owner||s.time)&&e.jsxs("div",{className:"text-[11px] leading-4 text-muted-foreground",children:[s.owner,s.owner&&s.time&&" · ",s.time]})]})]},s.id)})})})}function Yd({node:t}){return e.jsxs("li",{children:[e.jsxs("div",{className:j("relative flex min-w-[92px] max-w-[148px] flex-col items-center gap-0.5 rounded-lg bg-background px-2.5 py-1.5 text-center shadow-raised ring-1",t.active?"ring-foreground/70":"ring-border/80"),children:[t.status&&e.jsx("span",{className:"absolute right-1.5 top-1.5",children:t.status}),t.icon&&e.jsx("span",{className:"flex text-muted-foreground [&_img]:size-4 [&_svg]:size-4",children:t.icon}),e.jsx("span",{className:"max-w-full truncate text-xs font-medium text-foreground",children:t.title}),Re(t.subtitle)&&e.jsx("span",{className:"max-w-full truncate text-[10px] text-muted-foreground",children:t.subtitle})]}),t.children?.length?e.jsx("ul",{children:t.children.map(n=>e.jsx(Yd,{node:n},n.id))}):null]})}function Xd({root:t,className:n}){return e.jsx("div",{className:j("overflow-x-auto scrollbar-app-thin pb-1",n),children:e.jsx("ul",{className:"ds-org-tree min-w-max",children:e.jsx(Yd,{node:t})})})}const Zd={xs:"size-5 text-[9px]",sm:"size-6 text-[10px]",md:"size-8 text-xs",lg:"size-10 text-sm"};function pg(t,n){const s=t.trim();if(!s)return"?";if(/[㐀-鿿]/.test(s))return Array.from(s).slice(n==="xs"||n==="sm"?-1:-2).join("");const r=s.split(/\s+/);return(r.length>1?`${r[0][0]}${r[1][0]}`:s.slice(0,n==="xs"?1:2)).toUpperCase()}function Se({name:t,src:n,size:s="sm",shape:r="circle",ring:a=!1,className:o}){const[i,l]=c.useState(null),u=!!n&&i!==n;return e.jsx("span",{title:t,className:j("relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-muted font-medium text-foreground/70",Zd[s],r==="circle"?"rounded-full":"rounded-md",a&&"ring-2 ring-background",o),children:u?e.jsx("img",{src:n,alt:t,className:"size-full object-cover",onError:()=>l(n??null)}):e.jsx("span",{"aria-label":t,role:"img",children:pg(t,s)})})}function Qd({people:t,max:n=4,size:s="sm",className:r}){const a=t.slice(0,n),o=t.length-a.length;return e.jsxs("span",{className:j("inline-flex items-center",r),children:[a.map((i,l)=>e.jsx(Se,{name:i.name,src:i.src,size:s,ring:!0,className:l>0?"-ml-1.5":void 0},`${i.name}-${l}`)),o>0&&e.jsxs("span",{title:t.slice(n).map(i=>i.name).join("、"),className:j("-ml-1.5 inline-flex shrink-0 items-center justify-center rounded-full bg-muted font-medium tabular-nums text-foreground/70 ring-2 ring-background",Zd[s]),children:["+",o]})]})}function br({from:t,author:n,avatar:s,time:r,children:a,className:o}){return t==="user"?e.jsxs("div",{className:j("flex flex-col items-end gap-1",o),children:[e.jsx("div",{className:"max-w-[85%] rounded-2xl rounded-tr-sm bg-foreground/[0.08] px-3.5 py-2.5 text-[13px] leading-relaxed text-foreground",children:a}),r&&e.jsx("span",{className:"pr-1 text-[11px] text-muted-foreground",children:r})]}):e.jsxs("div",{className:j("flex gap-2.5",o),children:[s&&e.jsx("span",{className:"mt-0.5 flex shrink-0",children:s}),e.jsxs("div",{className:"min-w-0 flex-1",children:[(n||r)&&e.jsxs("div",{className:"mb-1 flex items-baseline gap-2",children:[n&&e.jsx("span",{className:"text-xs font-medium text-foreground",children:n}),r&&e.jsx("span",{className:"text-[11px] text-muted-foreground",children:r})]}),e.jsx("div",{className:"text-[13px] leading-relaxed text-foreground/90",children:a})]})]})}const hg=Object.freeze(Object.defineProperty({__proto__:null,ActivityFeed:Ya,AgentMark:Ce,Avatar:Se,AvatarGroup:Qd,Badge:oe,BarChart:Dd,BranchTag:En,Breadcrumb:pr,BreadcrumbItem:It,Bulletin:Xa,Button:F,CalendarHeatmap:Bd,ChartFrame:Ot,ChartTooltip:Mt,Checkbox:qe,Chip:ur,ChipSelect:Ae,CodeBlock:Or,CommitItem:In,Composer:cd,ConfirmDialog:yd,ContextMenu:jd,ContextMenuContent:bd,ContextMenuItem:On,ContextMenuLabel:Zf,ContextMenuSeparator:Nd,ContextMenuTrigger:vd,CopyButton:An,CountBadge:zn,DataTable:qd,DeadlineList:Za,Delta:Ie,Dialog:ua,DialogClose:mr,DialogContent:xa,DialogTrigger:wd,DiffStat:xt,DonutChart:fr,EmptyState:nn,Field:ke,FileChip:qt,FileRow:Tt,FunnelChart:Fd,GanttChart:Vd,HealthBadge:pa,HeatTable:Gd,HeroFigure:Wd,ICON_GROUPS:Qc,ICON_SIZE:es,Icon:we,IconButton:he,Input:He,Kbd:At,KbdGroup:We,Leaderboard:Qa,Legend:Je,LegendSwatchMark:Is,LineChart:Id,LiveDot:Ze,MENU_INDICATOR:pn,MENU_ITEM:Ue,MENU_ITEM_CHECKABLE:hn,MENU_ITEM_DANGER:is,MENU_LABEL:gn,MENU_SEPARATOR:cn,MENU_SHORTCUT:ln,MENU_SURFACE:yt,MOTION:Ks,Menu:dd,MenuCheckboxItem:Xf,MenuContent:pd,MenuGroup:Yf,MenuItem:Dn,MenuLabel:hd,MenuRadioGroup:xd,MenuRadioItem:Qt,MenuSeparator:xr,MenuSub:md,MenuSubContent:gd,MenuSubTrigger:fd,MenuTrigger:ud,MessageBubble:br,Meter:$n,MonthCalendar:Kd,NavGroup:Fn,NavRow:Ke,NavRowLink:Jf,Notice:Et,ObjectiveCard:jr,Panel:xg,Popover:Ja,PopoverAnchor:Cu,PopoverClose:Hs,PopoverContent:eo,PopoverTrigger:to,PriorityTag:lt,ProcessSteps:vr,ProjectDot:Ut,ProjectTag:jt,PromptBlock:$r,RadioGroup:ld,RankedBars:zd,RelativeTime:Me,Ring:pt,SERIES_COLOR:ut,STATUS_MARK:Pt,ScaleLegend:gr,ScatterChart:Ud,SearchField:Ws,Segmented:sn,Select:cr,Skeleton:mt,SkeletonRows:ed,SkeletonText:Jc,Slider:dr,SlopeChart:$d,Sparkline:ma,Spinner:Le,StackedBarChart:Od,StatGroup:Hd,StatTile:en,StateSquare:hr,StepList:Md,Stepper:Sd,Switch:id,TERMINAL_THEME:no,TONE_DOT:on,TONE_INK:Pr,TONE_MARK:dt,TONE_SOFT:ku,TONE_SOLID:Su,Tabs:rd,TabsContent:Pn,TabsList:ad,TabsTrigger:Zt,Tag:od,TaskRow:so,TaskStatusBadge:Gn,TaskStatusGroup:ro,TaskStatusIcon:Mu,TerminalBlock:ao,Textarea:sd,ThinkingText:td,Timeline:oo,TodoList:io,Tooltip:Dt,TopologyTree:Xd,Track:Pe,TreeList:Rd,VIZ:I,VIZ_RAMP:gt,WaffleChart:Ld,WorkingDots:nd,addDays:Xe,arcPath:Qn,bandLayout:ca,barPath:Kf,buttonClassName:Va,clamp:Fe,columnPath:da,dodge:lr,formatNumber:ze,formatPercent:ae,formatRelativeTime:_u,formatSignedNumber:lo,formatSignedPercent:Dr,hasNode:Re,icons:Es,linearScale:Ge,navRowClassName:Ar,niceDomain:Ft,niceStep:Zc,ordinalRamp:Tu,projectDotClass:Ru,quantize:Jn,shortenProjectName:Eu,stackColors:vn,useControllableState:fn,useElementWidth:Ct,useFieldControl:Ir,useNow:Iu,usePrefersReducedMotion:Lr,useSvgId:ls},Symbol.toStringTag,{value:"Module"})),Jd=[{title:"基础",sections:[{id:"principles",title:"原则",en:"Principles"},{id:"color",title:"颜色",en:"Color"},{id:"typography",title:"文字",en:"Typography"},{id:"layout",title:"间距、圆角与层级",en:"Space & Elevation"},{id:"icons",title:"图标",en:"Icons"},{id:"agents",title:"Agent 标志",en:"Agent Logos"},{id:"motion",title:"动效",en:"Motion"}]},{title:"组件",sections:[{id:"status",title:"状态",en:"Status"},{id:"actions",title:"操作",en:"Actions"},{id:"inputs",title:"输入",en:"Inputs"},{id:"overlays",title:"浮层",en:"Overlays"},{id:"navigation",title:"导航",en:"Navigation"},{id:"business",title:"业务组件",en:"Agent Tower"}]},{title:"展示组件",sections:[{id:"viz-principles",title:"展示原则",en:"Display Principles"},{id:"marks",title:"画法",en:"Marks"},{id:"goals",title:"目标",en:"Goals"},{id:"numbers",title:"数字",en:"Numbers"},{id:"trends",title:"趋势与对比",en:"Trend & Comparison"},{id:"composition",title:"构成与分布",en:"Composition"},{id:"lists",title:"清单",en:"Lists"},{id:"tables",title:"表格",en:"Tables"},{id:"schedule",title:"流程与排期",en:"Process & Schedule"},{id:"people",title:"人与内容",en:"People & Content"}]}],ht=Jd.flatMap(t=>t.sections);function eu(t){return String(ht.findIndex(n=>n.id===t)+1).padStart(2,"0")}const tu=c.createContext("");function ee({id:t,description:n,columns:s=2,children:r}){const a=ht.find(i=>i.id===t),o=eu(t);return e.jsxs("section",{id:t,"data-ds-section":"","aria-labelledby":`${t}-title`,className:"scroll-mt-6 [counter-reset:ds-specimen]",children:[e.jsxs("header",{className:"mb-5",children:[e.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:[e.jsx("span",{className:"tabular-nums text-foreground",children:o}),e.jsx("span",{"aria-hidden":"true",className:"h-px w-5 bg-border"}),e.jsx("span",{className:"uppercase",children:a?.en})]}),e.jsx("h2",{id:`${t}-title`,className:"mt-2 text-[22px] font-semibold leading-tight tracking-tight text-foreground",children:a?.title??t}),n&&e.jsx("p",{className:"mt-1.5 max-w-3xl text-[13px] leading-relaxed text-muted-foreground",children:n})]}),e.jsx(tu.Provider,{value:o,children:e.jsx("div",{className:j("grid grid-cols-1 gap-4",s===2&&"xl:grid-cols-2",s===3&&"lg:grid-cols-2 2xl:grid-cols-3"),children:r})})]})}function Fs({index:t,title:n,description:s}){return e.jsxs("div",{className:"pt-4",children:[e.jsxs("div",{className:"flex items-center gap-3 text-[11px] font-medium text-muted-foreground",children:[e.jsxs("span",{className:"font-mono tracking-wide",children:["PART ",t]}),e.jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-border/70"})]}),e.jsx("p",{className:"mt-3 text-[26px] font-medium leading-snug tracking-tight text-foreground",children:n}),s&&e.jsx("p",{className:"mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:s})]})}function k({name:t,title:n,description:s,span:r=1,dos:a,donts:o,canvas:i="plain",bodyClassName:l,className:u,children:x}){const d=c.useContext(tu),m=!!(a?.length||o?.length);return e.jsxs("article",{className:j("flex min-w-0 flex-col overflow-hidden rounded-xl border border-border/60 bg-background [counter-increment:ds-specimen]",r===2&&"xl:col-span-2",r===3&&"lg:col-span-2 2xl:col-span-3",u),children:[e.jsxs("header",{className:"border-b border-border/50 px-4 py-3",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[e.jsxs("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground/60",children:[d,".",e.jsx("span",{className:"before:content-[counter(ds-specimen)]"})]}),e.jsx("h3",{className:"shrink-0 font-mono text-xs font-medium text-foreground",children:t}),n&&e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:n})]}),s&&e.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:s})]}),e.jsx("div",{className:j("min-w-0 flex-1 p-5",i==="chrome"&&"bg-sidebar",l),children:x}),m&&e.jsxs("footer",{className:"grid gap-x-6 gap-y-2 border-t border-border/50 bg-foreground/[0.015] px-4 py-3 sm:grid-cols-2",children:[a?.length?e.jsx(Ma,{kind:"do",rules:a}):null,o?.length?e.jsx(Ma,{kind:"dont",rules:o}):null]})]})}function Ma({kind:t,rules:n}){const s=t==="do"?Oe:mn;return e.jsx("ul",{className:"flex flex-col gap-1","aria-label":t==="do"?"推荐":"避免",children:n.map((r,a)=>e.jsxs("li",{className:"flex gap-1.5 text-xs leading-relaxed text-muted-foreground",children:[e.jsx(s,{"aria-hidden":"true",className:j("mt-[3px] size-3 shrink-0",t==="do"?"text-success":"text-destructive"),strokeWidth:2.5}),e.jsx("span",{children:r})]},a))})}function V({label:t,className:n,children:s}){return e.jsxs("div",{className:j("flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:gap-4",n),children:[t!==void 0&&e.jsx("span",{className:"w-20 shrink-0 text-[11px] text-muted-foreground",children:t}),e.jsx("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:s})]})}function Q({className:t,children:n}){return e.jsx("p",{className:j("text-[11px] leading-relaxed text-muted-foreground",t),children:n})}function $t({className:t,children:n}){return e.jsx("code",{className:j("rounded bg-foreground/[0.05] px-1 py-px font-mono text-[11px] text-foreground/80",t),children:n})}const fg=new Date(2026,9,14),Z=new Date(2026,9,14,15,30).getTime(),Nr=6e4,wr=60*Nr,_a=24*wr;function nu(t){let n=t>>>0;const s=()=>{n=n+1831565813>>>0;let r=n;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296};return{next:s,between:(r,a)=>r+s()*(a-r),int:(r,a)=>Math.floor(r+s()*(a-r+1))}}const fe=[{name:"agent-tower",color:"text-indigo-600"},{name:"docs-site",color:"text-emerald-600"},{name:"desktop-shell",color:"text-rose-600"},{name:"payment-gateway-service",color:"text-amber-600"}],gg=["text-indigo-600","text-emerald-600","text-rose-600","text-amber-600","text-cyan-600","text-violet-600","text-teal-600","text-pink-600"],rn=[{id:"task-1",title:"重塑左侧任务面板样式与交互",status:ct.Review,priority:_e.HIGH,project:fe[0],updatedAt:Z-4*Nr,agent:q.CLAUDE_CODE,minutes:48,additions:412,deletions:187},{id:"task-2",title:"修复 Claude 会话自动结束及停止时进程树清理超时",status:ct.Running,priority:_e.URGENT,project:fe[0],updatedAt:Z-12*Nr,agent:q.CODEX,minutes:23,additions:96,deletions:41},{id:"task-3",title:"文档站接入全文搜索",status:ct.Pending,priority:_e.NORMAL,project:fe[1],updatedAt:Z-3*wr,agent:q.GEMINI_CLI,minutes:0,additions:0,deletions:0},{id:"task-4",title:"桌面端窗口控制按钮适配 Windows",status:ct.Done,priority:_e.LOW,project:fe[2],updatedAt:Z-2*_a,agent:q.CURSOR_AGENT,minutes:31,additions:58,deletions:12},{id:"task-5",title:"回调验签迁移到新密钥",status:ct.Cancelled,priority:_e.NORMAL,project:fe[3],updatedAt:Z-9*_a,agent:q.QWEN_CODE,minutes:6,additions:4,deletions:4},{id:"task-6",title:"三档执行权限适配与审批闭环",status:ct.Done,priority:_e.HIGH,project:fe[0],updatedAt:Z-26*wr,agent:q.CLAUDE_CODE,minutes:74,additions:865,deletions:233}],su=Array.from({length:14},(t,n)=>`10/${n+1}`),Ps=[14,17,9,6,19,22,21,24,26,12,10,27,30,33],fa=[12,13,8,5,15,16,18,17,19,9,8,18,20,21],ga=["W37","W38","W39","W40","W41","W42"],ru=[32,41,38,45,52,36],au=[40,40,45,45,50,50],yr=[{id:"lt10",label:"10 分钟内"},{id:"10to30",label:"10–30 分钟"},{id:"30to60",label:"30–60 分钟"},{id:"gt60",label:"1 小时以上"}],jg=[[18,22,9,4],[20,25,11,5],[16,27,14,6],[22,30,12,7],[25,33,15,6],[14,19,8,3]],ou=[{id:"claude",label:"Claude Code",start:.62,end:.74,emphasis:!0},{id:"codex",label:"Codex",start:.58,end:.61},{id:"cursor",label:"Cursor Agent",start:.55,end:.6},{id:"gemini",label:"Gemini CLI",start:.49,end:.47},{id:"qwen",label:"Qwen Code",start:.41,end:.5}],Gs=[{id:"claude",agent:q.CLAUDE_CODE,value:486},{id:"codex",agent:q.CODEX,value:312},{id:"gemini",agent:q.GEMINI_CLI,value:158},{id:"cursor",agent:q.CURSOR_AGENT,value:97},{id:"qwen",agent:q.QWEN_CODE,value:41}],vg=[{id:"created",label:"创建",value:1284},{id:"started",label:"启动 Agent",value:1102},{id:"review",label:"提交审查",value:864},{id:"merged",label:"合并",value:701}],bg=(()=>{const t=nu(7);return[...Array.from({length:42},(s,r)=>{const a=Math.round(t.between(3,85)),o=Math.max(8,Math.round(a*t.between(5.5,9.5)+t.between(-60,60)));return{id:`s${r}`,x:a,y:o}}),{id:"outlier-1",x:88,y:64,label:"卡在依赖安装",emphasis:!0},{id:"outlier-2",x:14,y:940,label:"批量格式化",emphasis:!0}]})(),Ng=["周一","周二","周三","周四","周五","周六","周日"],wg=[[24,31,28,35,29,6,3],[8,11,9,14,12,2,0],[5,7,12,9,6,1,1],[13,10,15,11,18,4,2]],iu=Xe(fg,-181),Ta=(()=>{const t=nu(42);return Array.from({length:182},(n,s)=>{const a=Xe(iu,s).getDay(),o=a===0||a===6,i=.6+s/182*.8;return t.next()<(o?.45:.06)?0:Math.round((o?t.between(0,4):t.between(2,14))*i)})})(),yg=new Date(2026,9,5),Cg=[{id:"g1",label:"需求与设计",meta:"shitian",start:0,end:4,progress:1},{id:"g2",label:"组件库",meta:"Claude Code",start:3,end:13,progress:.8},{id:"g3",label:"展示页",meta:"Claude Code",start:8,end:16,progress:.45},{id:"g4",label:"主页迁移",meta:"Codex",start:14,end:22,progress:0},{id:"g5",label:"回归测试",meta:"Gemini CLI",start:20,end:25,progress:0},{id:"g6",label:"发布 v1.3",meta:"shitian",start:26,end:27,progress:0}],kg=[{id:"e1",date:"2026-10-02",title:"迭代周会",time:"10:00"},{id:"e2",date:"2026-10-09",title:"v1.2 发布",tone:"success"},{id:"e3",date:"2026-10-12",title:"迭代周会",time:"10:00"},{id:"e4",date:"2026-10-14",title:"设计评审",time:"14:00"},{id:"e5",date:"2026-10-14",title:"组件库提测"},{id:"e6",date:"2026-10-14",title:"TeamRun 演示",time:"17:00"},{id:"e7",date:"2026-10-16",title:"隧道证书到期",tone:"danger"},{id:"e8",date:"2026-10-21",title:"主页迁移截止",tone:"warning"},{id:"e9",date:"2026-10-28",title:"v1.3 发布"}],Sg={columns:[{key:"day",header:"日期"},{key:"current",header:"本期",align:"right"},{key:"previous",header:"上期",align:"right"}],rows:su.map((t,n)=>({day:t,current:Ps[n],previous:fa[n]}))},Mg={columns:[{key:"week",header:"周"},{key:"actual",header:"实际",align:"right"},{key:"plan",header:"计划",align:"right"}],rows:ga.map((t,n)=>({week:t,actual:ru[n],plan:au[n]}))},_g={columns:[{key:"agent",header:"Agent"},{key:"start",header:"9 月",align:"right"},{key:"end",header:"10 月",align:"right"}],rows:ou.map(t=>({agent:t.label,start:ae(t.start),end:ae(t.end)}))};function Tg(){return e.jsxs(ee,{id:"trends",description:"随时间变化用折线(连续)或柱图(分期);两期之间谁变了用斜率图。主系列墨色,对比系列灰色,计划与目标用虚线或斜纹。",children:[e.jsx(k,{name:"LineChart",title:"折线图",description:"2px 线,悬停出现十字线与数值卡;竖线标出发布日,虚线是目标。方向键可逐点移动。",span:2,dos:["每张图都能切到表格(右上角按钮)——数值不能只靠悬停读到"],donts:["双 Y 轴","超过 3 条线:拆成小多图或改用表格"],bodyClassName:"p-0",children:e.jsx(Ot,{bare:!0,className:"p-5",title:"每日完成任务",subtitle:"10 月 1 日 – 14 日 · 个",legend:e.jsx(Je,{items:[{label:"本期",swatch:"line",color:ut.ink},{label:"上期(按星期对齐)",swatch:"line",color:ut.context}]}),table:Sg,footnote:"周末明显回落;v1.2 发布后,完成量连续 3 个工作日高于目标线。",children:e.jsx(Id,{"aria-label":"每日完成任务,本期与上期对比",labels:su,series:[{id:"current",label:"本期",values:Ps,area:!0},{id:"previous",label:"上期",values:fa,variant:"context"}],marker:{index:8,label:"v1.2 发布"},baseline:{value:25,label:"目标"}})})}),e.jsx(k,{name:"BarChart",title:"柱图",description:"柱宽封顶 24px,4px 数据端圆角;计划用斜纹并排。只在最后一组柱顶标数。",bodyClassName:"p-0",children:e.jsx(Ot,{bare:!0,className:"p-5",title:"每周合并的 PR",subtitle:"实际 vs 计划 · 个",legend:e.jsx(Je,{items:[{label:"实际",swatch:"solid",color:I.ink},{label:"计划",swatch:"hatch",color:I.plan}]}),table:Mg,footnote:"W42 截至周三,距本周计划还差 14 个。",children:e.jsx(Dd,{"aria-label":"每周合并的 PR,实际与计划",labels:ga,series:[{id:"actual",label:"实际",values:ru},{id:"plan",label:"计划",values:au,variant:"plan"}]})})}),e.jsx(k,{name:"SlopeChart",title:"斜率图",description:"两个时间点之间谁升谁降:主角墨色加粗,其余为灰色背景线;端点标签相撞时自动错开。",bodyClassName:"p-0",children:e.jsx(Ot,{bare:!0,className:"p-5",title:"一次通过审查的比例",subtitle:"9 月 → 10 月 · 按 Agent",table:_g,children:e.jsx($d,{"aria-label":"各 Agent 一次通过审查比例的变化",items:ou,startLabel:"9 月",endLabel:"10 月",formatValue:t=>ae(t),formatChange:t=>`${lo(Math.round((t.end-t.start)*100))} pt`})})})]})}const Rg=vn(yr.length),Eg=[{id:"done",label:"已完成",value:412,color:Pt.success},{id:"running",label:"运行中",value:38,color:Pt.info},{id:"review",label:"待审查",value:21,color:Pt.warning},{id:"pending",label:"待开始",value:64,color:Pt.neutral}];function Ig(){const t=Gs.reduce((n,s)=>n+s.value,0);return e.jsxs(ee,{id:"composition",description:"构成用堆叠柱、环图、方格图;分布用排行条、漏斗、散点。类别默认用墨阶由深到浅;只有当类别本身就是状态时才用状态色。",children:[e.jsx(k,{name:"StackedBarChart",title:"堆叠柱",description:"看构成随时间的变化。分段之间 2px 白缝,最深的一段放在最下面;只标最后一根的合计。",bodyClassName:"p-0",children:e.jsx(Ot,{bare:!0,className:"p-5",title:"任务耗时分布",subtitle:"按周 · 个",legend:e.jsx(Je,{items:yr.map((n,s)=>({label:n.label,swatch:"solid",color:Rg[s]}))}),children:e.jsx(Od,{"aria-label":"每周任务耗时分布",labels:ga,segments:yr,data:jg})})}),e.jsxs(k,{name:"DonutChart",title:"环图",description:"部分与整体,不超过 5 段。中心放合计,悬停某段时换成该段的值;右侧数值表同时也是图例。",donts:["超过 5 段——把小的合并成「其他」","用环图比较两期——改用柱图"],children:[e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(fr,{"aria-label":"任务状态构成",segments:Eg,centerLabel:"个任务"}),e.jsx(fr,{"aria-label":"各 Agent 会话占比",segments:Gs.map(n=>({id:n.id,label:Bn(n.agent),value:n.value})),centerLabel:"次会话",size:120,thickness:12})]}),e.jsx(Q,{className:"mt-3",children:"上:类别就是状态,用状态色;下:普通类别,用墨阶由深到浅。"})]}),e.jsx(k,{name:"WaffleChart",title:"方格图",description:"一个比例的直观版:100 格,实心是完成,斜纹是进行中。",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsx(Ld,{"aria-label":"迭代完成 62%,进行中 14%",value:.62,secondary:.14,cellSize:12}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[26px] font-semibold leading-8 tracking-tight text-foreground",children:"62%"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"迭代任务已完成"})]}),e.jsx(Je,{className:"flex-col items-start gap-1.5",items:[{label:"已完成",swatch:"solid",color:I.ink,value:"62"},{label:"进行中",swatch:"hatch",color:I.plan,value:"14"},{label:"未开始",swatch:"solid",color:I.empty,value:"24"}]})]})]})}),e.jsx(k,{name:"RankedBars",title:"排行条",description:"谁多谁少:按值降序,前三名序号加深;条长相对最大值。",children:e.jsx(zd,{"aria-label":"近 30 天各 Agent 会话数",items:Gs.map(n=>({id:n.id,label:Bn(n.agent),value:n.value,meta:ae(n.value/t),icon:e.jsx(Te,{agentType:n.agent,className:"size-4"})}))})}),e.jsx(k,{name:"FunnelChart",title:"漏斗",description:"逐级转化:每级右侧是占首级的比例,级间是转化率;流失最大的一级用警告色标出。",children:e.jsx(Fd,{"aria-label":"任务从创建到合并的转化",stages:vg,formatValue:n=>ze(n)})}),e.jsx(k,{name:"ScatterChart",title:"散点图",description:"两个量有没有关系:点是灰的,需要注意的离群点用墨色并直接标注。",bodyClassName:"p-0",children:e.jsx(Ot,{bare:!0,className:"p-5",title:"会话时长与改动行数",subtitle:"近 30 天 · 每个点是一次会话",footnote:"两个离群点:一次卡在依赖安装(时长长、改动少),一次是批量格式化(时长短、改动多)。",children:e.jsx(Ud,{"aria-label":"会话时长与改动行数的关系",points:bg,xLabel:"会话时长(分钟)",yLabel:"改动行数",height:260})})})]})}const Ra=[{tone:"neutral",label:"草稿"},{tone:"info",label:"运行中"},{tone:"success",label:"已合并"},{tone:"warning",label:"待审查"},{tone:"danger",label:"失败"}],Ag=[{variant:"dot",label:"dot 圆点"},{variant:"soft",label:"soft 浅底"},{variant:"outline",label:"outline 描边"},{variant:"solid",label:"solid 实底"}];function Pg(){const[t,n]=c.useState(!0);return e.jsxs(ee,{id:"status",description:"状态反馈从安静到醒目排成一列:圆点 → 浅底徽章 → 提示条 → 实底。越需要用户处理,越往后取。",children:[e.jsxs(k,{name:"Badge",title:"徽章",description:"一两个字的状态或属性。文字永远用 *-ink;没有状态含义的标签一律 neutral。",span:2,dos:["状态列表首选 dot:最安静,颜色只占 6px","solid 每屏至多一处,留给最需要注意的那一个"],donts:["用徽章给分类、Agent、项目上色","徽章里放超过 6 个字的句子"],children:[e.jsx("div",{className:"overflow-x-auto scrollbar-app-thin",children:e.jsxs("div",{className:"grid min-w-[560px] grid-cols-[96px_repeat(5,minmax(0,1fr))] items-center gap-x-3 gap-y-3",children:[e.jsx("span",{}),Ra.map(s=>e.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:s.tone},s.tone)),Ag.map(s=>e.jsxs("div",{className:"contents",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:s.label}),Ra.map(r=>e.jsx("span",{children:e.jsx(oe,{tone:r.tone,variant:s.variant,children:r.label})},r.tone))]},s.variant))]})}),e.jsxs("div",{className:"mt-5 flex flex-wrap items-center gap-x-6 gap-y-3 border-t border-border/50 pt-4",children:[e.jsxs(V,{label:"尺寸",children:[e.jsx(oe,{size:"sm",tone:"info",children:"sm 18"}),e.jsx(oe,{tone:"info",children:"md 20"})]}),e.jsxs(V,{label:"形状",children:[e.jsx(oe,{shape:"tag",size:"sm",className:"font-semibold",children:"P1"}),e.jsx(oe,{shape:"tag",size:"sm",tone:"danger",className:"font-semibold",children:"P0"}),e.jsx(oe,{shape:"tag",variant:"outline",children:"v1.3"})]})]})]}),e.jsxs(k,{name:"CountBadge",title:"计数",description:"分组标题、导航行右侧的数量:默认是安静的灰字,只有需要介入时才上色。",canvas:"chrome",children:[e.jsx("div",{className:"flex max-w-xs flex-col gap-1",children:[{label:"待审查",count:3,tone:"warning"},{label:"运行中",count:2,tone:"neutral"},{label:"已完成",count:128,tone:"neutral"}].map(s=>e.jsxs("div",{className:"flex h-7 items-center rounded-md px-2 text-xs font-medium text-muted-foreground",children:[s.label,e.jsx(zn,{count:s.count,max:99,tone:s.tone,className:"ml-auto"})]},s.label))}),e.jsx(Q,{className:"mt-3",children:"超过上限显示 99+;只有「待审查」这类需要你动手的计数用 warning。"})]}),e.jsx(k,{name:"Spinner",title:"转圈",description:"只用于「正在发生、时长未知」的短等待。有结构的内容用骨架,有进度的用进度条。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(V,{label:"尺寸",children:[e.jsx(Le,{size:"xs"}),e.jsx(Le,{size:"sm"}),e.jsx(Le,{size:"md"}),e.jsx(Le,{size:"lg"})]}),e.jsx(V,{label:"带说明",children:e.jsx(Le,{label:"正在读取文件"})}),e.jsxs(V,{label:"按钮内",children:[e.jsx(F,{loading:!0,children:"保存中"}),e.jsx(F,{variant:"primary",loading:!0,children:"创建中"})]})]})}),e.jsx(k,{name:"Notice",title:"提示条",description:"一段需要读到、但不打断操作的说明。颜色只给图标,正文保持墨色。",span:2,donts:["用提示条报告需要立刻处理的错误——那是对话框或 Toast 的事","整段彩色正文"],children:e.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[e.jsx(Et,{tone:"info",title:"工作区正在准备",children:"正在复制 .env 与 node_modules,完成后 Agent 会自动开始。"}),e.jsx(Et,{tone:"success",title:"已合并到 main",children:"分支 feat/design-system 已删除,工作树已清理。"}),e.jsx(Et,{tone:"warning",title:"自动同意(完全访问)",action:e.jsx(F,{size:"xs",variant:"link",children:"了解风险"}),children:"Agent 可以不经确认执行任意命令和网络请求。"}),t?e.jsx(Et,{tone:"danger",title:"合并冲突",onDismiss:()=>n(!1),children:"src/index.css 有 2 处冲突,解决后才能继续合并。"}):e.jsx("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-border text-xs text-muted-foreground",children:e.jsx(F,{size:"xs",variant:"ghost",onClick:()=>n(!0),children:"恢复示例"})}),e.jsx(Et,{className:"lg:col-span-2",children:"修改在新运行实例启动时生效,运行中的会话保留启动时的权限。"})]})}),e.jsx(k,{name:"EmptyState",title:"空状态",description:"说清楚「为什么是空的、下一步做什么」:图标浅灰细描边,一句话,至多一个主操作。",children:e.jsx(nn,{icon:e.jsx(So,{}),title:"还没有任务",description:"在上方输入框描述一件事,Agent 会在独立的工作树里完成它。",action:e.jsxs(F,{variant:"primary",size:"sm",children:[e.jsx(Kn,{}),"新建任务"]}),className:"py-6"})}),e.jsx(k,{name:"EmptyState · dashed",title:"面板内空状态",description:"嵌在面板、列表、拖放区里时用虚线框 + 小号。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(nn,{variant:"dashed",size:"sm",icon:e.jsx(Ua,{}),title:"没有变更文件",description:"Agent 修改文件后会出现在这里"}),e.jsx(nn,{variant:"dashed",size:"sm",description:"拖入文件或粘贴截图作为附件"})]})}),e.jsx(k,{name:"Skeleton",title:"骨架",description:"首次加载有固定结构的内容时使用,几何与真实内容一致,加载完不跳动。",span:2,donts:["刷新已有数据时闪骨架——保留旧内容,降低不透明度即可"],children:e.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[e.jsxs("div",{children:[e.jsx(Q,{className:"mb-2",children:"列表行(与 32px 侧栏行同几何)"}),e.jsx(ed,{rows:4})]}),e.jsxs("div",{children:[e.jsx(Q,{className:"mb-2",children:"段落"}),e.jsx(Jc,{lines:4})]}),e.jsxs("div",{children:[e.jsx(Q,{className:"mb-2",children:"卡片"}),e.jsxs("div",{className:"rounded-xl border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(mt,{className:"size-8"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(mt,{className:"h-2.5 w-2/3"}),e.jsx(mt,{className:"h-2 w-1/3"})]})]}),e.jsx(mt,{className:"mt-4 h-16 w-full rounded-lg"})]})]})]})})]})}const Ea=["xs","sm","md","lg","xl"];function Dg(){return e.jsxs(ee,{id:"actions",description:"按钮按强调程度分五种:primary 只给这一屏最重要的一件事,其余从 secondary 往下取。危险操作只换语气,不新增形状。",children:[e.jsx(k,{name:"Button",title:"按钮",description:"默认 secondary(描边白卡),高度 32px 与侧栏行对齐。",span:2,dos:["一屏一个 primary;对话框里主按钮放最右","文案写动作本身:「创建任务」「合并」,而不是「确定」"],donts:["两个 primary 并排","用 danger 表达普通的取消或关闭"],children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(V,{label:"primary",children:[e.jsxs(F,{variant:"primary",children:[e.jsx(uo,{}),"开始"]}),e.jsx(F,{variant:"primary",children:"创建任务"}),e.jsx(F,{variant:"primary",loading:!0,children:"创建中"}),e.jsx(F,{variant:"primary",disabled:!0,children:"开始"})]}),e.jsxs(V,{label:"secondary",children:[e.jsxs(F,{children:[e.jsx(Kn,{}),"新建项目"]}),e.jsx(F,{children:"导入"}),e.jsx(F,{disabled:!0,children:"导入"})]}),e.jsxs(V,{label:"ghost",children:[e.jsxs(F,{variant:"ghost",children:[e.jsx(tn,{}),"打开终端"]}),e.jsx(F,{variant:"ghost",children:"取消"})]}),e.jsxs(V,{label:"soft",children:[e.jsxs(F,{variant:"soft",children:[e.jsx(Rt,{}),"重试"]}),e.jsx(F,{variant:"soft",children:"更多选项"})]}),e.jsxs(V,{label:"link",children:[e.jsx(F,{variant:"link",children:"查看文档"}),e.jsxs(F,{variant:"link",children:["了解执行权限",e.jsx(No,{})]})]}),e.jsxs(V,{label:"danger",children:[e.jsxs(F,{variant:"primary",tone:"danger",children:[e.jsx(Lt,{}),"删除项目"]}),e.jsx(F,{tone:"danger",children:"终止会话"}),e.jsx(F,{variant:"ghost",tone:"danger",children:"移除"}),e.jsx(F,{variant:"soft",tone:"danger",children:"放弃更改"})]}),e.jsx(V,{label:"尺寸",children:Ea.map(t=>e.jsx(F,{size:t,variant:t==="xl"?"primary":"secondary",children:t},t))})]})}),e.jsx(k,{name:"IconButton",title:"图标按钮",description:"工具栏、行尾操作、关闭。默认 ghost:灰色图标,悬停才浮出底色。必须有读屏名称。",dos:["含义不自明的图标外包 Tooltip"],children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(V,{label:"ghost",children:Ea.map(t=>e.jsx(he,{size:t,label:`设置(${t})`,children:e.jsx(Cr,{})},t))}),e.jsxs(V,{label:"secondary",children:[e.jsx(he,{variant:"secondary",label:"刷新",children:e.jsx(Rt,{})}),e.jsx(he,{variant:"secondary",size:"sm",label:"新建",children:e.jsx(Kn,{})}),e.jsx(he,{variant:"secondary",tone:"danger",label:"删除",children:e.jsx(Lt,{})})]}),e.jsxs(V,{label:"带提示",children:[e.jsx(Dt,{content:"打开终端",shortcut:["⌃","`"],children:e.jsx(he,{label:"打开终端",showTitle:!1,children:e.jsx(tn,{})})}),e.jsx(Dt,{content:"刷新",children:e.jsx(he,{label:"刷新",showTitle:!1,children:e.jsx(Rt,{})})}),e.jsx(he,{label:"加载中",loading:!0,children:e.jsx(Rt,{})})]})]})}),e.jsx(k,{name:"CopyButton",title:"复制",description:"点击后对勾 1.6 秒,文案同步变「已复制」,读屏同样播报。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(V,{label:"图标",children:e.jsxs("span",{className:"flex items-center gap-1 font-mono text-xs text-foreground/80",children:["8721b9c",e.jsx(An,{value:"8721b9c",size:"xs"})]})}),e.jsxs(V,{label:"图标 + 文字",children:[e.jsx(An,{value:"pnpm --filter web build",display:"text",variant:"secondary"}),e.jsx(An,{value:"feat/design-system",display:"text",label:"复制分支名"})]})]})}),e.jsx(k,{name:"Kbd",title:"按键",description:"快捷键提示:单键、组合键;在深色 Tooltip 里用反色版本。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(V,{label:"单键",children:[e.jsx(At,{children:"⏎"}),e.jsx(At,{children:"Esc"}),e.jsx(At,{children:"⌘"}),e.jsx(At,{children:"Tab"})]}),e.jsxs(V,{label:"组合",children:[e.jsx(We,{keys:["⌘","K"]}),e.jsx(We,{keys:["Ctrl","Enter"],separator:"+"}),e.jsx(We,{keys:["⇧","⏎"]})]}),e.jsx(V,{label:"反色",children:e.jsxs("span",{className:"flex items-center gap-2 rounded-lg bg-inverse px-2.5 py-1.5 text-xs text-inverse-foreground",children:["搜索任务",e.jsx(We,{keys:["⌘","K"],inverse:!0})]})})]})}),e.jsx(k,{name:"Toolbar",title:"工具栏",description:"一组图标按钮 + 一个文字按钮;同一工具栏里所有控件同高(28px)。",canvas:"chrome",children:e.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-background p-1 shadow-raised ring-1 ring-border/70",children:[e.jsx(he,{size:"sm",label:"刷新",children:e.jsx(Rt,{})}),e.jsx(he,{size:"sm",label:"打开终端",children:e.jsx(tn,{})}),e.jsx("span",{"aria-hidden":"true",className:"mx-1 h-4 w-px bg-border"}),e.jsx(F,{size:"sm",variant:"ghost",children:"提交"}),e.jsx(F,{size:"sm",variant:"primary",className:"ml-auto",children:"合并"})]})})]})}function _t({title:t,art:n,children:s}){return e.jsxs("article",{className:"flex min-w-0 flex-col overflow-hidden rounded-xl border border-border/60 bg-background",children:[e.jsx("div",{"aria-hidden":"true",className:"flex h-36 items-center justify-center border-b border-border/50 bg-foreground/[0.015] px-6",children:n}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:t}),e.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:s})]})]})}function $e({title:t,meta:n=!1,active:s=!1,hovered:r=!1,status:a}){return e.jsxs("div",{className:j("flex h-6 items-center gap-1.5 rounded-[5px] px-1.5",s&&"bg-background shadow-raised ring-1 ring-border/80",r&&"bg-accent"),children:[a??e.jsx("span",{className:"size-2 shrink-0 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:j("h-1.5 rounded-full",s?"bg-foreground/80":"bg-foreground/45",t)}),n&&e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[e.jsx("span",{className:"h-2.5 w-7 rounded-[3px] bg-foreground/[0.07]"}),e.jsx("span",{className:"h-1.5 w-3.5 rounded-full bg-foreground/20"})]}),r&&e.jsx(wx,{className:"ml-auto size-3 text-foreground/60"})]})}function Og(){return e.jsxs(ee,{id:"principles",columns:3,description:"全部规则都从现有主页长出来:浅灰外框里放一座白色内容岛,Charcoal 墨色做主角,颜色只留给状态与项目身份。遇到规范没覆盖的情况,按这六条推理。",children:[e.jsx(_t,{title:"灰框白岛",art:e.jsxs("div",{className:"flex h-24 w-full max-w-[220px] flex-col rounded-lg bg-sidebar ring-1 ring-border",children:[e.jsxs("div",{className:"flex h-4 shrink-0 items-center gap-1 px-2",children:[e.jsx("span",{className:"h-1.5 w-6 rounded-full bg-foreground/80"}),e.jsx("span",{className:"h-1 w-8 rounded-full bg-foreground/15"})]}),e.jsxs("div",{className:"flex min-h-0 flex-1 gap-1.5 px-1.5 pb-1.5",children:[e.jsxs("div",{className:"flex w-14 flex-col gap-1 pt-1",children:[e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"}),e.jsx("span",{className:"h-2.5 rounded-[3px] bg-background shadow-raised ring-1 ring-border/80"}),e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"}),e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"})]}),e.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-1.5 rounded-md border border-border/60 bg-background",children:[e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/70"}),e.jsx("span",{className:"h-5 w-20 rounded-[4px] ring-1 ring-border"})]})]})]}),children:"界面分两层:浅灰外框(顶栏、侧栏)承载导航,白色内容岛承载正在处理的对象。层级靠底色和 1px 细边区分,不靠阴影堆叠。"}),e.jsx(_t,{title:"标题优先",art:e.jsxs("div",{className:"w-full max-w-[240px] space-y-0.5 rounded-lg bg-sidebar p-1.5 ring-1 ring-border/70",children:[e.jsx($e,{title:"w-[44%]",meta:!0}),e.jsx($e,{title:"w-[72%]",hovered:!0}),e.jsx($e,{title:"w-[36%]",meta:!0})]}),children:"列表行里标题拥有最大宽度。元信息(项目、时间)必须紧凑,悬停或键盘聚焦时整体让位;宁可截短元信息,也不截短标题。"}),e.jsx(_t,{title:"墨色为主",art:e.jsxs("div",{className:"flex items-end gap-4",children:[e.jsx("span",{className:"flex h-7 items-center rounded-md bg-primary px-3 text-[11px] font-medium text-primary-foreground shadow-raised",children:"开始"}),e.jsx("span",{className:"relative mb-1.5 h-4 w-7 rounded-full bg-primary",children:e.jsx("span",{className:"absolute right-0.5 top-0.5 size-3 rounded-full bg-background"})}),e.jsx("span",{className:"flex h-12 items-end gap-1",children:[.45,.7,.55,1].map((t,n)=>e.jsx("span",{className:"w-2.5 rounded-t-[2px] bg-viz-6",style:{height:`${t*100}%`}},n))})]}),children:"Charcoal 是唯一的主色:主按钮、选中、开关、图表主系列都用它。蓝色只表示「运行中 / 信息」,不再作品牌色。"}),e.jsx(_t,{title:"颜色只给状态",art:e.jsxs("div",{className:"w-full max-w-[220px] space-y-0.5 rounded-lg bg-background p-1.5 ring-1 ring-border/70",children:[e.jsx($e,{title:"w-[50%]"}),e.jsx($e,{title:"w-[40%]",status:e.jsx(wt,{className:"size-2.5 shrink-0 text-warning",strokeWidth:2.5})}),e.jsx($e,{title:"w-[58%]"}),e.jsx("div",{className:"flex justify-end px-1.5 pt-0.5",children:e.jsx("span",{className:"rounded-full bg-warning/10 px-1.5 py-px text-[9px] font-medium text-warning-ink",children:"待审查 1"})})]}),children:"颜色是稀缺资源,只表达需要注意的状态(运行中、待审查、失败)和项目身份。没有状态含义的东西一律用灰阶,状态也永远配图标或文字。"}),e.jsx(_t,{title:"浮起 = 正在打开",art:e.jsxs("div",{className:"flex w-full max-w-[220px] flex-col gap-2 rounded-lg bg-sidebar p-2 ring-1 ring-border/70",children:[e.jsxs("div",{className:"inline-flex gap-0.5 self-start rounded-md bg-foreground/[0.05] p-0.5",children:[e.jsx("span",{className:"rounded-[5px] bg-background px-2 py-0.5 text-[10px] font-medium text-foreground shadow-raised ring-1 ring-border/80",children:"列表"}),e.jsx("span",{className:"px-2 py-0.5 text-[10px] text-foreground/60",children:"看板"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx($e,{title:"w-[46%]"}),e.jsx($e,{title:"w-[60%]",active:!0}),e.jsx($e,{title:"w-[38%]"})]})]}),children:"白卡浮在灰底上,表示「这一项正在右侧展示」:侧栏选中行、分段控件的选中段是同一种材质,只表达这一个意思。"}),e.jsx(_t,{title:"动效只解释变化",art:e.jsxs("div",{className:"relative h-20 w-44",children:[e.jsx("span",{className:"absolute inset-x-6 top-7 h-10 rounded-lg bg-background opacity-30 ring-1 ring-border/60"}),e.jsx("span",{className:"absolute inset-x-3 top-3.5 h-10 rounded-lg bg-background opacity-60 ring-1 ring-border/70"}),e.jsxs("span",{className:"absolute inset-x-0 top-0 flex h-10 items-center gap-2 rounded-lg bg-background px-3 shadow-raised ring-1 ring-border/80",children:[e.jsx("span",{className:"size-2 rounded-full bg-info"}),e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/60"})]}),e.jsx("span",{className:"absolute inset-x-0 bottom-0 text-center font-mono text-[10px] text-muted-foreground",children:"250ms · ease-enter"})]}),children:"动效说明「什么变了」:新内容上浮淡入,状态切换 150ms 完成,不做装饰性循环。开启「减少动态效果」时只保留必要的进行中提示。"})]})}const $g=[{name:"外框",token:"--sidebar",hex:"#F9FAFB",value:"var(--sidebar)",usage:"顶栏、侧栏、页面底色"},{name:"内容岛",token:"--background",hex:"#FFFFFF",value:"var(--background)",usage:"内容岛、卡片、输入框、菜单"},{name:"悬停",token:"--accent",hex:"#F3F4F6",value:"var(--accent)",usage:"行悬停、ghost 按钮"},{name:"浅灰底",token:"foreground / 5%",hex:"≈ #F4F4F4",value:"color-mix(in oklab, var(--foreground) 5%, var(--background))",usage:"分段轨道、标签、代码、头像"},{name:"反色",token:"--inverse",hex:"#191F25",value:"var(--inverse)",usage:"Tooltip、Toast 等浮在内容上的小面"},{name:"终端",token:"TERMINAL_THEME",hex:"#1E1E1E",value:no.background,usage:"终端与日志:唯一常驻深色面"}];function Lg({name:t,token:n,hex:s,value:r,usage:a}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"h-14 rounded-lg ring-1 ring-inset ring-black/[0.07]",style:{background:r}}),e.jsxs("div",{className:"mt-2 flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-foreground",children:t}),e.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:s})]}),e.jsx("div",{className:"truncate font-mono text-[10px] text-muted-foreground",children:n}),e.jsx("p",{className:"mt-1 text-[11px] leading-snug text-muted-foreground",children:a})]})}const zg=[{name:"正文",className:"text-foreground",token:"foreground",ratio:16.5,usage:"标题、正文、选中项"},{name:"次要正文",className:"text-foreground/80",token:"foreground / 80%",ratio:8.6,usage:"列表行、菜单项、未选中的值"},{name:"弱正文",className:"text-foreground/70",token:"foreground / 70%",ratio:6.1,usage:"浅灰底上的标签文字(neutral ink)"},{name:"说明",className:"text-muted-foreground",token:"muted-foreground",ratio:4.85,usage:"元信息、时间、计数、表头:白底上最浅的可读文字"},{name:"占位",className:"text-muted-foreground/70",token:"muted-foreground / 70%",ratio:2.75,usage:"只用于占位符与禁用态,不承载信息"}],Fg=[{tone:"info",name:"信息",meaning:"运行中、链接、提示",icon:Ln,base:"--info",ink:"--info-ink",baseRatio:5.26,inkRatio:6.31},{tone:"success",name:"成功",meaning:"已完成、已合并、在线",icon:ts,base:"--success",ink:"--success-ink",baseRatio:3.22,inkRatio:5.61},{tone:"warning",name:"警告",meaning:"待审查、临近截止、需要确认",icon:wt,base:"--warning",ink:"--warning-ink",baseRatio:3.19,inkRatio:5.8},{tone:"danger",name:"危险",meaning:"失败、逾期、删除",icon:ds,base:"--destructive",ink:"--destructive-ink",baseRatio:4.76,inkRatio:6.37}],Gg=[{hex:"#EFF0F3",ratio:"1.14",usage:"零值 / 空格"},{hex:"#CED1D6",ratio:"1.53",usage:"量级 1"},{hex:"#A0A5AC",ratio:"2.48",usage:"对比 · 序数起点"},{hex:"#7B8189",ratio:"3.94",usage:"计划斜纹"},{hex:"#555B63",ratio:"6.82",usage:"量级 4"},{hex:"#333940",ratio:"11.7",usage:"量级 5"},{hex:"#191F25",ratio:"16.7",usage:"主数据"}];function Bg(){return e.jsxs(ee,{id:"color",description:"中性色全部带一点冷蓝(色相 255–264),与 Charcoal 主色同源。所有颜色都是 CSS 变量(src/index.css),组件里只写语义类名,不写色值。",children:[e.jsx(k,{name:"Surface",title:"表面",description:"从外到内:外框 → 内容岛 → 悬停 / 浅灰底。深色只出现在反色小面和终端。",span:2,children:e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",children:$g.map(t=>e.jsx(Lg,{...t},t.name))})}),e.jsx(k,{name:"Ink",title:"文字墨阶",description:"文字只有这几档;对比度按白底计算。",dos:["正文类文字至少 4.5:1;muted-foreground 是白底上最浅的可读文字"],donts:["用透明度再调浅说明文字(muted/80 只有 3.3:1)"],children:e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:zg.map(t=>e.jsxs("div",{className:"flex items-center gap-3 py-2 first:pt-0 last:pb-0",children:[e.jsx("span",{className:j("w-28 shrink-0 text-sm",t.className),children:"任务看板 Aa 128"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"text-xs font-medium text-foreground",children:[t.name," ",e.jsx($t,{className:"ml-1",children:t.token})]}),e.jsx("div",{className:"text-[11px] leading-snug text-muted-foreground",children:t.usage})]}),t.ratio>=4.5?e.jsxs(oe,{variant:"outline",size:"sm",className:"tabular-nums",children:[t.ratio,":1"]}):e.jsxs(oe,{tone:"warning",size:"sm",className:"tabular-nums",children:[t.ratio,":1"]})]},t.token))})}),e.jsx(k,{name:"Line",title:"线与焦点",description:"边框 1px;焦点是边框加深为中性灰,不引入彩色描边。",children:e.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{label:"分隔线、卡片",token:"--border",className:"border border-border"},{label:"内容岛描边",token:"border / 50%",className:"border border-border/50"},{label:"悬停加深",token:"ring / 50%",className:"border border-ring/50"},{label:"焦点",token:"--ring",className:"border border-ring ring-2 ring-ring/30"}].map(t=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:j("h-12 rounded-lg bg-background",t.className)}),e.jsx("div",{className:"mt-2 text-xs font-medium text-foreground",children:t.label}),e.jsx("div",{className:"font-mono text-[10px] text-muted-foreground",children:t.token})]},t.token))})}),e.jsx(k,{name:"Status",title:"状态色",description:"每个状态两档:基础色给图标、圆点、图形;*-ink 给文字和实底。基础色作文字时绿、橙只有约 3.2:1。",span:2,dos:["状态同时用图标或文字表达,色弱用户也能区分","文字、数字、实底按钮一律用 *-ink"],donts:["用状态色装饰没有状态含义的东西(分类、Agent、图表系列)","整段彩色正文:颜色只给图标,正文保持墨色"],children:e.jsx("div",{className:"overflow-x-auto scrollbar-app-thin",children:e.jsxs("table",{className:"w-full min-w-[640px] border-collapse text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border/70 text-[11px] text-muted-foreground",children:[e.jsx("th",{scope:"col",className:"h-8 pr-3 font-medium",children:"语义"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"标记(基础色)"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"文字(ink)"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"浅底"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"实底"}),e.jsx("th",{scope:"col",className:"h-8 pl-3 text-right font-medium",children:"对比度 基础 / ink"})]})}),e.jsx("tbody",{children:Fg.map(t=>{const n=t.icon;return e.jsxs("tr",{className:"border-b border-border/40 last:border-0",children:[e.jsxs("td",{className:"py-2.5 pr-3",children:[e.jsx("div",{className:"text-[13px] font-medium text-foreground",children:t.name}),e.jsx("div",{className:"text-[11px] text-muted-foreground",children:t.meaning})]}),e.jsx("td",{className:"px-3",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(n,{"aria-hidden":"true",className:j("size-4",dt[t.tone])}),e.jsx("span",{className:j("size-2 rounded-full",on[t.tone])}),e.jsx($t,{children:t.base})]})}),e.jsxs("td",{className:"px-3",children:[e.jsx("span",{className:j("text-[13px] font-medium",Pr[t.tone]),children:"+12 · 3 天"}),e.jsx($t,{className:"ml-2",children:t.ink})]}),e.jsx("td",{className:"px-3",children:e.jsx(oe,{tone:t.tone,children:t.meaning.split("、")[0]})}),e.jsx("td",{className:"px-3",children:e.jsx(oe,{tone:t.tone,variant:"solid",children:t.meaning.split("、")[0]})}),e.jsxs("td",{className:"pl-3 text-right font-mono text-[11px] tabular-nums text-muted-foreground",children:[e.jsx("span",{className:t.baseRatio<4.5?"text-warning-ink":void 0,children:t.baseRatio.toFixed(2)})," / ",e.jsx("span",{className:"text-foreground/80",children:t.inkRatio.toFixed(2)})]})]},t.tone)})})]})})}),e.jsxs(k,{name:"Project",title:"项目标识色",description:"8 色按项目名哈希分配(components/task/adapters.ts)。项目色只出现在圆点和项目标签上。",donts:["用项目色做大面积底色或按钮色"],children:[e.jsx("div",{className:"grid grid-cols-4 gap-x-4 gap-y-3",children:gg.map(t=>e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(Ut,{color:t,className:"size-2.5"}),e.jsx("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:t.replace("text-","")})]},t))}),e.jsx("div",{className:"mt-5 flex flex-wrap items-center gap-2",children:fe.map(t=>e.jsx(jt,{name:t.name,color:t.color},t.name))}),e.jsx(Q,{className:"mt-2",children:"项目标签:文字从项目色渐变到灰,长名自动截短(payment-gateway-service → payment..)。"})]}),e.jsxs(k,{name:"Viz ink",title:"图表墨阶",description:"图表只用一种颜色的深浅:主数据墨色、对比用灰、计划用斜纹。序数(漏斗、分桶)只取 2–6 档。",dos:["数值越大越深;零值用最浅的 0 档而不是留白"],donts:["给类别分配彩虹色——超过 5 类就合并成「其他」或改用表格"],children:[e.jsx("div",{className:"flex h-10 overflow-hidden rounded-lg ring-1 ring-inset ring-black/[0.05]",children:gt.map(t=>e.jsx("div",{className:"flex-1",style:{background:t}},t))}),e.jsx("div",{className:"mt-2 grid grid-cols-7 gap-1",children:Gg.map((t,n)=>e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-mono text-[10px] text-foreground/80",children:["viz-",n]}),e.jsxs("div",{className:"font-mono text-[10px] tabular-nums text-muted-foreground",children:[t.ratio,":1"]}),e.jsx("div",{className:"text-[10px] leading-snug text-muted-foreground",children:t.usage})]},t.hex))}),e.jsx(Je,{className:"mt-4",items:[{label:"实际",swatch:"solid",color:I.ink},{label:"上期 / 对比",swatch:"solid",color:I.context},{label:"计划 / 剩余",swatch:"hatch",color:I.plan},{label:"目标",swatch:"dashed",color:I.ink}]})]})]})}const Ug=[{spec:"26 / 34 · 500",className:"text-[26px] leading-[34px] font-medium tracking-tight",sample:"你需要在 agent-tower 中做点什么?",usage:"首屏标题,每屏至多一个"},{spec:"22 / 28 · 600",className:"text-[22px] leading-7 font-semibold tracking-tight",sample:"项目设置",usage:"页面与章节标题"},{spec:"15 / 24 · 400",className:"text-[15px] leading-6",sample:"把左侧任务面板改成紧凑的两行布局",usage:"输入卡正文"},{spec:"14 / 20 · 400",className:"text-sm leading-5",sample:"重塑左侧任务面板样式与交互",usage:"正文、侧栏行(默认字号)"},{spec:"13 / 20 · 400",className:"text-[13px] leading-5",sample:"在新标签页中打开 · 复制分支名",usage:"菜单项、按钮、表格、对话"},{spec:"12 / 16 · 500",className:"text-xs leading-4 font-medium",sample:"待审查 · 运行中 · 已完成",usage:"分组标题、胶囊、表单说明"},{spec:"11 / 16 · 400",className:"text-[11px] leading-4",sample:"agent-tower · 12 分钟 · 1,284",usage:"元信息、时间、计数、表头"},{spec:"10 / 12 · 500",className:"text-[10px] leading-3 font-medium",sample:"P0 · KR1 · W42",usage:"优先级编号、角标(最小字号)"}];function Vg(){return e.jsxs(ee,{id:"typography",description:"系统字体栈,不加载网络字体。字号以 14px 为正文基准,向下最小到 10px;字重只用 400 / 500 / 600。",children:[e.jsx(k,{name:"Type scale",title:"字号阶梯",span:2,dos:["同一区域最多三档字号;层级优先用字重和颜色拉开"],donts:["小于 10px 的文字","700 以上的字重和全大写中文"],children:e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:Ug.map(t=>e.jsxs("div",{className:"grid grid-cols-1 items-baseline gap-1 py-3 first:pt-0 last:pb-0 md:grid-cols-[120px_minmax(0,1fr)_220px] md:gap-6",children:[e.jsx("span",{className:"font-mono text-[11px] tabular-nums text-muted-foreground",children:t.spec}),e.jsx("span",{className:j("min-w-0 truncate text-foreground",t.className),children:t.sample}),e.jsx("span",{className:"text-xs text-muted-foreground",children:t.usage})]},t.spec))})}),e.jsx(k,{name:"Family",title:"字体",description:"正文用系统无衬线;代码、分支、哈希、路径用等宽。",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Sans · ui-sans-serif, system-ui"}),e.jsx("p",{className:"mt-1 text-[15px] text-foreground",children:"Agent Tower 让多个 AI Agent 并行工作"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Mono · ui-monospace, SFMono-Regular, Menlo"}),e.jsx("p",{className:"mt-1 font-mono text-[13px] text-foreground",children:"feat/design-system · 8721b9c · src/index.css"})]})]})}),e.jsxs(k,{name:"Numerals",title:"数字",description:"会变化或需要上下对齐的数字一律 tabular-nums;千分位用逗号,大数用紧凑写法。",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-[11px] text-muted-foreground",children:"比例数字(默认)"}),["1,111","8,888","4,701"].map(t=>e.jsx("div",{className:"text-right text-lg font-semibold text-foreground",children:t},t))]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-[11px] text-muted-foreground",children:"等宽数字 tabular-nums"}),["1,111","8,888","4,701"].map(t=>e.jsx("div",{className:"text-right text-lg font-semibold tabular-nums text-foreground",children:t},t))]})]}),e.jsx(Q,{className:"mt-3",children:"紧凑写法:1,284 · 12.9K · 1.28M;负号用「−」(U+2212),与加号同宽。"})]})]})}const Kg=[{px:2,usage:"图表分段间隙、头像叠放描边"},{px:4,usage:"紧凑的图标与文字、标签内边距"},{px:6,usage:"胶囊内图标与文字"},{px:8,usage:"侧栏外边距 · 行内边距 · 内容岛外边距"},{px:10,usage:"行内图标与标题"},{px:12,usage:"卡片内元素、表单字段之间"},{px:16,usage:"卡片内边距、卡片之间"},{px:24,usage:"区块之间"},{px:32,usage:"宽屏页面内边距"},{px:48,usage:"章节之间"}],Hg=[{size:"xs",px:24,usage:"行内操作、图表工具"},{size:"sm",px:28,usage:"胶囊、工具栏、分段"},{size:"md",px:32,usage:"默认:与侧栏行同高"},{size:"lg",px:36,usage:"表单输入、对话框按钮"},{size:"xl",px:44,usage:"首屏 CTA、触屏行"}],Wg=[{label:"4",token:"rounded",className:"rounded",usage:"标签、键帽、优先级、数据端"},{label:"6",token:"rounded-sm",className:"rounded-sm",usage:"气泡收尖的那个角"},{label:"8",token:"rounded-md",className:"rounded-md",usage:"侧栏行、按钮、菜单项"},{label:"10",token:"rounded-lg",className:"rounded-lg",usage:"菜单、输入框、代码块、提示条"},{label:"14",token:"rounded-xl",className:"rounded-xl",usage:"内容岛、卡片、输入卡、对话框"},{label:"∞",token:"rounded-full",className:"rounded-full",usage:"胶囊、徽章、头像、开关"}],qg=[{name:"平面",token:"border",className:"border border-border/70",usage:"内容岛、卡片:只有 1px 边"},{name:"浮起",token:"shadow-raised",className:"shadow-raised ring-1 ring-border/80",usage:"选中行、按钮、开关滑块"},{name:"弹出",token:"shadow-popover",className:"shadow-popover ring-1 ring-border/60",usage:"菜单、下拉、气泡卡"},{name:"覆盖",token:"shadow-overlay",className:"shadow-overlay ring-1 ring-border/60",usage:"对话框、拖拽中的行"}];function Yg(){return e.jsxs(ee,{id:"layout",description:"4px 网格;控件高度、圆角、阴影各只有一组固定档位。新组件先从这里取值,取不到再讨论要不要加档。",children:[e.jsx(k,{name:"Spacing",title:"间距",description:"4px 网格,2 / 6 / 10 只用于组件内部的细调。",children:e.jsx("div",{className:"flex flex-col gap-2",children:Kg.map(t=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-6 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:t.px}),e.jsx("span",{className:"w-12 shrink-0",children:e.jsx("span",{className:"block h-2 rounded-[2px] bg-viz-6",style:{width:t.px}})}),e.jsx("span",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:t.usage})]},t.px))})}),e.jsx(k,{name:"Control height",title:"控件高度",description:"五档高度对应按钮的 xs–xl;同一行里的控件必须同高。",children:e.jsx("div",{className:"flex flex-col gap-3",children:Hg.map(t=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-6 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:t.px}),e.jsx("span",{className:"w-24 shrink-0",children:e.jsxs(F,{size:t.size,children:["按钮 ",t.size]})}),e.jsx("span",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:t.usage})]},t.size))})}),e.jsx(k,{name:"Radius",title:"圆角",description:"由 --radius(10px)派生;外层容器的圆角 ≥ 内层:内容岛 14 → 输入框 10 → 行 8。",children:e.jsx("div",{className:"grid grid-cols-3 gap-3 sm:grid-cols-6",children:Wg.map(t=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:j("aspect-square w-full border border-foreground/25 bg-foreground/[0.03]",t.className)}),e.jsx("div",{className:"mt-2 font-mono text-[11px] text-foreground/80",children:t.label}),e.jsx("div",{className:"truncate font-mono text-[10px] text-muted-foreground",children:t.token}),e.jsx("p",{className:"mt-0.5 text-[10px] leading-snug text-muted-foreground",children:t.usage})]},t.token))})}),e.jsx(k,{name:"Elevation",title:"层级",description:"四档,越高越少见。阴影都很淡,层级主要靠白在灰上。",canvas:"chrome",children:e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:qg.map(t=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:j("h-16 rounded-lg bg-background",t.className)}),e.jsx("div",{className:"mt-2.5 text-xs font-medium text-foreground",children:t.name}),e.jsx("div",{className:"font-mono text-[10px] text-muted-foreground",children:t.token}),e.jsx("p",{className:"mt-0.5 text-[10px] leading-snug text-muted-foreground",children:t.usage})]},t.token))})}),e.jsx(k,{name:"App shell",title:"页面骨架",description:"主页的三段式:48px 顶栏 · 可拖拽侧栏(默认 400,260–600)· 内容岛(右下各留 8px,圆角 14,描边 border/50)。",span:2,children:e.jsxs("div",{className:"relative mx-auto flex h-56 max-w-3xl flex-col overflow-hidden rounded-lg bg-sidebar ring-1 ring-border",children:[e.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-2 px-3",children:[e.jsx("span",{className:"h-2 w-14 rounded-full bg-foreground/80"}),e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/20"}),e.jsx("span",{className:"ml-auto h-4 w-4 rounded-[4px] bg-foreground/10"}),e.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:"顶栏 48"})]}),e.jsxs("div",{className:"flex min-h-0 flex-1",children:[e.jsxs("div",{className:"flex w-[34%] shrink-0 flex-col gap-1 px-2 py-1",children:[e.jsx("span",{className:"mb-1 h-6 rounded-md bg-background shadow-raised ring-1 ring-border/80"}),e.jsx("span",{className:"h-1.5 w-10 rounded-full bg-foreground/20"}),[62,48,70,40].map((t,n)=>e.jsxs("span",{className:j("flex h-5 items-center gap-1.5 rounded-[5px] px-1.5",n===1&&"bg-background shadow-raised ring-1 ring-border/80"),children:[e.jsx("span",{className:"size-2 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:"h-1.5 rounded-full bg-foreground/40",style:{width:`${t}%`}})]},n)),e.jsx("span",{className:"mt-auto font-mono text-[10px] text-muted-foreground",children:"侧栏 400(260–600)"})]}),e.jsx("div",{className:"w-1 shrink-0"}),e.jsxs("div",{className:"mb-2 mr-2 flex min-w-0 flex-1 flex-col items-center justify-center gap-2 rounded-xl border border-border/50 bg-background",children:[e.jsx("span",{className:"h-2 w-40 max-w-[70%] rounded-full bg-foreground/70"}),e.jsx("span",{className:"h-12 w-64 max-w-[80%] rounded-xl border border-border shadow-raised"}),e.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:"内容岛 · rounded-xl · mb-2 mr-2"})]})]})]})})]})}const Xg={xs:"折叠箭头、行内小标记",sm:"胶囊、菜单项、按钮 sm",md:"列表行、按钮(默认)",lg:"工具栏",xl:"强调、标题旁"};function Zg(){const t=Object.keys(Es).length;return e.jsxs(ee,{id:"icons",description:`lucide 线性图标,按语义注册,共 ${t} 个。业务代码写 <Icon name="delete" />,不直接引入图标组件——换一个图标只改注册表一处。`,children:[e.jsx(k,{name:"Icon",title:"语义图标",span:2,dos:["按含义取图标(delete、branch),同一含义全站只用一个图标","图标独立承载含义时提供 aria-label 或 Tooltip"],donts:["同一个动作在不同页面用不同图标","给普通图标上色:图标颜色跟随文字,只有状态图标有颜色"],children:e.jsx("div",{className:"space-y-5",children:Qc.map(n=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline gap-2 text-xs font-medium text-foreground",children:[n.title,e.jsx("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:n.names.length})]}),e.jsx("div",{className:"grid grid-cols-4 gap-1 sm:grid-cols-6 lg:grid-cols-8 xl:grid-cols-10 2xl:grid-cols-11",children:n.names.map(s=>e.jsxs("div",{title:s,className:"flex min-w-0 flex-col items-center gap-1.5 rounded-lg px-1 py-3 text-foreground/80 transition-colors hover:bg-accent hover:text-foreground",children:[e.jsx(we,{name:s}),e.jsx("span",{className:"max-w-full truncate font-mono text-[10px] text-muted-foreground",children:s})]},s))})]},n.title))})}),e.jsx(k,{name:"Size",title:"尺寸与描边",description:"五档尺寸;24px 以上(空状态插图)描边降到 1.5,避免显得笨重。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[Object.keys(es).map(n=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex w-8 shrink-0 justify-center text-foreground",children:e.jsx(we,{name:"agent",size:n})}),e.jsxs("span",{className:"w-14 shrink-0 font-mono text-[11px] text-foreground/80",children:[n," · ",es[n]]}),e.jsx("span",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:Xg[n]})]},n)),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex w-8 shrink-0 justify-center text-muted-foreground/60",children:e.jsx(we,{name:"inbox",size:32})}),e.jsx("span",{className:"w-14 shrink-0 font-mono text-[11px] text-foreground/80",children:"32 · 1.5"}),e.jsx("span",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:"空状态插图(浅灰、细描边)"})]})]})}),e.jsx(k,{name:"Tint",title:"图标颜色",description:"默认是说明灰,悬停跟随文字变深;状态图标是唯一有颜色的图标。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(V,{label:"默认",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground/80",children:[e.jsx(we,{name:"project",className:"text-muted-foreground"}),"agent-tower"]})}),e.jsx(V,{label:"悬停 / 选中",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground",children:[e.jsx(we,{name:"project"}),"agent-tower"]})}),e.jsxs(V,{label:"状态",children:[e.jsx(we,{name:"success",className:dt.success,"aria-label":"成功"}),e.jsx(we,{name:"warning",className:dt.warning,"aria-label":"警告"}),e.jsx(we,{name:"error",className:dt.danger,"aria-label":"错误"}),e.jsx(we,{name:"info",className:dt.info,"aria-label":"信息"})]}),e.jsx(V,{label:"禁用",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground/40",children:[e.jsx(we,{name:"lock"}),"只读项目"]})})]})})]})}function Qg(){const t=Object.values($u);return e.jsxs(ee,{id:"agents",description:"Agent 靠官方 logo 区分身份,不分配颜色。没有 logo 或加载失败时退回通用芯片图标,名称照常显示。",children:[e.jsx(k,{name:"AgentLogo",title:"标志墙",span:2,donts:["给 Agent 分配主题色,或把 logo 重新着色"],children:e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-6",children:[t.map(n=>e.jsxs("div",{className:"flex min-w-0 flex-col items-center gap-2 rounded-lg border border-border/60 px-2 py-4",children:[e.jsx(Te,{agentType:n.agentType,className:"size-8"}),e.jsx("span",{className:"max-w-full truncate text-xs font-medium text-foreground",children:n.label}),e.jsx("span",{className:"max-w-full truncate font-mono text-[10px] text-muted-foreground",children:n.logoSrc?n.agentType:"无 logo · 回退"})]},n.agentType)),e.jsxs("div",{className:"flex min-w-0 flex-col items-center gap-2 rounded-lg border border-dashed border-border px-2 py-4",children:[e.jsx(Te,{agentType:null,className:"size-8"}),e.jsx("span",{className:"text-xs font-medium text-foreground",children:"未知 Agent"}),e.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:"fallback"})]})]})}),e.jsx(k,{name:"AgentMark",title:"标识 + 名称",description:"三档尺寸;只放 logo 时名称进入读屏文本和悬停提示。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(V,{label:"sm · 14",children:[e.jsx(Ce,{agentType:q.CLAUDE_CODE,size:"sm"}),e.jsx(Ce,{agentType:q.CODEX,size:"sm"})]}),e.jsxs(V,{label:"md · 16",children:[e.jsx(Ce,{agentType:q.CLAUDE_CODE}),e.jsx(Ce,{agentType:q.GEMINI_CLI})]}),e.jsx(V,{label:"lg · 20",children:e.jsx(Ce,{agentType:q.CURSOR_AGENT,size:"lg"})}),e.jsxs(V,{label:"仅 logo",children:[e.jsx(Ce,{agentType:q.CLAUDE_CODE,showLabel:!1}),e.jsx(Ce,{agentType:q.CODEX,showLabel:!1}),e.jsx(Ce,{agentType:q.QWEN_CODE,showLabel:!1})]})]})}),e.jsxs(k,{name:"In context",title:"在界面里",description:"输入卡下方的胶囊选择器:平时是一行灰字,悬停才浮出底色。",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx(Ae,{"aria-label":"Agent",defaultValue:q.CLAUDE_CODE,menuWidth:"md",options:t.slice(0,6).map(n=>({value:n.agentType,label:n.label,icon:e.jsx(Te,{agentType:n.agentType,className:"size-3.5"})}))}),e.jsx(Ae,{"aria-label":"工作区",defaultValue:"worktree",menuWidth:"lg",options:[{value:"worktree",label:"新建工作树",description:"在独立分支上工作,不影响主目录"},{value:"local",label:"本地目录",description:"直接修改项目目录"}]})]}),e.jsx(Q,{className:"mt-3",children:"点开试试:菜单与选择框同材质,选中项右侧对勾,可带一行说明。"})]})]})}const Jg=[{name:"ease-enter",curve:Ks.easeEnter,points:[.16,1,.3,1],usage:"进入、展开、数值增长"},{name:"ease-move",curve:Ks.easeMove,points:[.2,0,0,1],usage:"位移、拖拽归位、面板滑动"},{name:"linear",curve:"linear",points:[0,0,1,1],usage:"只用于循环:转圈、扫光"}],ej=[{ms:100,usage:"悬停变色"},{ms:150,usage:"开关、复选、分段切换、按钮"},{ms:200,usage:"折叠展开、元信息收起"},{ms:250,usage:"列表新增行(taskSlideIn)"},{ms:500,usage:"首屏标题上浮(fadeInUp)、进度增长"},{ms:700,usage:"环形进度"}];function tj({points:t}){const[n,s,r,a]=t,o=36;return e.jsxs("svg",{viewBox:`-2 -2 ${o+4} ${o+4}`,className:"size-10 shrink-0","aria-hidden":"true",children:[e.jsx("rect",{x:"0",y:"0",width:o,height:o,rx:"3",fill:"none",stroke:"var(--viz-grid)"}),e.jsx("path",{d:`M0 ${o} C ${n*o} ${o-s*o} ${r*o} ${o-a*o} ${o} 0`,fill:"none",stroke:"var(--viz-6)",strokeWidth:"2",strokeLinecap:"round"})]})}function nj(){const t=Lr(),[n,s]=c.useState(!1);return e.jsxs("div",{className:"flex flex-col gap-3",children:[Jg.map(r=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(tj,{points:r.points}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx($t,{children:r.name}),e.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:r.usage})]}),e.jsx("div",{className:"relative mt-1.5 h-5 rounded-full bg-foreground/[0.05]",children:e.jsx("span",{className:"absolute top-0.5 size-4 rounded-full bg-primary shadow-raised",style:{left:n?"calc(100% - 18px)":"2px",transition:t?"none":`left 600ms ${r.curve}`}})})]})]},r.name)),e.jsx("div",{children:e.jsx(F,{size:"sm",onClick:()=>s(r=>!r),children:"播放"})})]})}const Ia=["接入飞书通知","优化终端滚动性能","补充 MCP 工具文档","修复隧道断线重连","项目设置支持快捷命令"];function sj(){const[t,n]=c.useState(0),[s,r]=c.useState([{id:0,title:"重塑左侧任务面板样式与交互"},{id:-1,title:"修复会话自动结束"}]),a=()=>{r(o=>{const i=(o[0]?.id??0)+1;return[{id:i,title:Ia[(i-1)%Ia.length]},...o].slice(0,4)})};return e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"flex h-40 flex-col items-center justify-center rounded-lg bg-sidebar",children:e.jsxs("div",{className:"flex animate-[fadeInUp_0.5s_cubic-bezier(0.16,1,0.3,1)] flex-col items-center",children:[e.jsx("p",{className:"text-[17px] font-medium tracking-tight text-foreground",children:"你需要做点什么?"}),e.jsx("div",{className:"mt-3 h-10 w-52 rounded-xl border border-border bg-background shadow-raised"})]},t)}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx(Q,{children:"首屏 fadeInUp · 500ms · 上浮 10px"}),e.jsx(F,{size:"xs",variant:"ghost",onClick:()=>n(o=>o+1),children:"重播"})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"h-40 overflow-hidden rounded-lg bg-sidebar p-1.5",children:s.map(o=>e.jsxs("div",{className:"animate-task-enter flex h-8 items-center gap-2.5 rounded-md px-2 text-sm text-foreground/80",children:[e.jsx("span",{className:"size-3.5 shrink-0 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:"truncate",children:o.title})]},o.id))}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx(Q,{children:"新增行 taskSlideIn · 250ms · 下落 6px"}),e.jsx(F,{size:"xs",variant:"ghost",onClick:a,children:"新增任务"})]})]})]})}function rj(){const[t,n]=c.useState(!1),[s,r]=c.useState(0);return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{type:"button","aria-pressed":t,"aria-label":t?"标记为未完成":"完成任务",onClick:()=>{n(a=>!a),r(a=>a+1)},className:"relative flex size-10 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[t&&e.jsx("span",{"aria-hidden":"true",className:"ds-ring-burst absolute inset-1 rounded-full ring-2 ring-success"},`burst-${s}`),e.jsx("span",{className:j("flex size-6 items-center justify-center rounded-full transition-colors duration-150",t?"bg-success text-white":"ring-[1.5px] ring-inset ring-foreground/30 hover:ring-foreground/50"),children:t&&e.jsx("svg",{viewBox:"0 0 16 16",className:"size-3.5","aria-hidden":"true",children:e.jsx("path",{className:"ds-check-draw",d:"M3.5 8.5l3 3 6-7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})},`check-${s}`)})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:j("truncate text-sm transition-colors duration-150",t?"text-muted-foreground line-through":"text-foreground"),children:"修复会话自动结束"}),e.jsx("div",{className:"text-[11px] text-muted-foreground",children:"点圆圈完成:对勾描绘 + 一次光环"})]})]})}function aj(){const[t,n]=c.useState(.35);return e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(pt,{value:t,size:72,expected:.6,"aria-label":"迭代进度"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-2.5",children:[e.jsx(Pe,{value:t,expected:.6,size:"md","aria-label":"迭代进度"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(F,{size:"xs",onClick:()=>n(s=>Math.min(1,Math.round((s+.15)*100)/100)),children:"推进 15%"}),e.jsx(F,{size:"xs",variant:"ghost",onClick:()=>n(.35),children:"重置"})]})]})]})}function oj(){return e.jsxs(ee,{id:"motion",description:"动效只做三件事:交代新内容从哪来、确认状态变了、表明事情还在进行。所有循环动画都有减少动态效果的降级。",children:[e.jsx(k,{name:"Easing",title:"缓动",description:"界面过渡只用两条曲线,循环才用 linear。",dos:["进入用 ease-enter,位移用 ease-move"],donts:["弹跳、回弹曲线——工具界面不需要「俏皮」"],children:e.jsx(nj,{})}),e.jsx(k,{name:"Duration",title:"时长",description:"越小的变化越快;界面过渡不超过 500ms。",children:e.jsx("div",{className:"flex flex-col gap-2",children:ej.map(t=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:[t.ms,"ms"]}),e.jsx("span",{className:"w-28 shrink-0",children:e.jsx("span",{className:"block h-1.5 rounded-full bg-viz-6",style:{width:`${t.ms/700*100}%`}})}),e.jsx("span",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:t.usage})]},t.ms))})}),e.jsx(k,{name:"Enter",title:"进入",description:"新内容从它「来的方向」出现:首屏向上浮起,列表新行从上方落下。",span:2,children:e.jsx(sj,{})}),e.jsx(k,{name:"Celebrate",title:"完成时刻",description:"只在用户亲手完成一件事时出现一次,不循环、不放礼花。",children:e.jsx(rj,{})}),e.jsx(k,{name:"Momentum",title:"进度增长",description:"数值变化时从旧值长到新值(500–700ms),竖线是此刻应到的位置。",children:e.jsx(aj,{})}),e.jsx(k,{name:"Live",title:"进行中",description:"循环动画只给「正在发生」的事。",donts:["给静止的内容加呼吸、漂浮等装饰性循环"],children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(V,{label:"在线 / 运行",children:[e.jsxs("span",{className:"flex items-center gap-2 text-[13px] text-foreground/80",children:[e.jsx(Ze,{label:"在线"}),"隧道已连接"]}),e.jsxs("span",{className:"flex items-center gap-2 text-[13px] text-foreground/80",children:[e.jsx(Ze,{tone:"info"}),"Claude Code 运行中"]})]}),e.jsx(V,{label:"思考",children:e.jsx(td,{text:"正在思考",className:"text-[13px]"})}),e.jsx(V,{label:"处理中",children:e.jsxs("span",{className:"text-[13px] text-muted-foreground",children:["正在创建工作区",e.jsx(nd,{})]})}),e.jsx(V,{label:"短等待",children:e.jsx(Le,{label:"正在读取文件"})})]})}),e.jsx(k,{name:"Brand",title:"品牌加载",description:"首屏加载(FullscreenLoading):Charcoal 标志缓慢呼吸,2s 一个周期。",children:e.jsx("div",{className:"flex h-28 items-center justify-center rounded-lg bg-background",children:e.jsx(mu,{})})})]})}const Aa=["低","中","高","极高"],Pa=[{value:"ask",label:"请求批准",description:"遵循原生审批规则,已允许的操作可以直接执行。"},{value:"sandbox",label:"自动同意(沙箱)",description:"使用原生沙箱与自动审阅,部分操作仍可能请求批准。"},{value:"full",label:"自动同意(完全访问)",description:"关闭可配置沙箱,上游强制规则仍然生效。"}],lu=[...[q.CLAUDE_CODE,q.CODEX,q.GEMINI_CLI].map(t=>({value:t,label:Bn(t),icon:e.jsx(Te,{agentType:t,className:"size-3.5"})})),{value:q.CURSOR_AGENT,label:Bn(q.CURSOR_AGENT),icon:e.jsx(Te,{agentType:q.CURSOR_AGENT,className:"size-3.5"}),description:"未检测到 cursor-agent 命令",disabled:!0}];function ij(){const[t,n]=c.useState([4]),[s,r]=c.useState([2]);return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline justify-between text-[13px]",children:[e.jsx("span",{className:"font-medium text-foreground",children:"并发会话上限"}),e.jsxs("span",{className:"tabular-nums text-foreground/80",children:[t[0]," 个"]})]}),e.jsx(dr,{value:t,onValueChange:n,min:1,max:10,"aria-label":"并发会话上限"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline justify-between text-[13px]",children:[e.jsx("span",{className:"font-medium text-foreground",children:"推理强度"}),e.jsx("span",{className:"text-foreground/80",children:Aa[s[0]]})]}),e.jsx(dr,{value:s,onValueChange:r,min:0,max:3,step:1,marks:[0,1,2,3],"aria-label":"推理强度"}),e.jsx("div",{className:"mt-1.5 flex justify-between text-[11px] text-muted-foreground",children:Aa.map(a=>e.jsx("span",{children:a},a))})]})]})}function lj(){const[t,n]=c.useState(["agent-tower"]),[s,r]=c.useState(["design-system.png","tokens.css","TaskList.tsx"]),a=o=>n(i=>i.includes(o)?i.filter(l=>l!==o):[...i,o]);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.jsx(ur,{selected:t.length===0,onClick:()=>n([]),children:"全部项目"}),fe.slice(0,3).map((o,i)=>e.jsx(ur,{selected:t.includes(o.name),onClick:()=>a(o.name),icon:e.jsx(Ut,{color:o.color}),count:[24,7,3][i],children:o.name},o.name))]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[s.map(o=>e.jsx(od,{icon:e.jsx(mo,{}),onRemove:()=>r(i=>i.filter(l=>l!==o)),children:o},o)),s.length===0&&e.jsx(F,{size:"xs",variant:"ghost",onClick:()=>r(["design-system.png","tokens.css","TaskList.tsx"]),children:"恢复示例"})]})]})}function cj(){const[t,n]=c.useState(!1),s=c.useRef(null),r=()=>{n(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),1800)};return e.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col items-center py-4",children:[e.jsx("h3",{className:"mb-6 text-center text-[26px] font-medium leading-snug tracking-tight text-foreground",children:"你需要在 agent-tower 中做点什么?"}),e.jsx(cd,{placeholder:"描述一个任务,Agent 会在独立工作树里完成它",defaultValue:"把左侧任务面板改成紧凑的两行布局",submitLabel:"创建并启动",submitHint:"创建并启动",submitting:t,pendingLabel:"正在创建工作区…",onSubmit:r,toolbarStart:e.jsx(he,{size:"sm",label:"添加附件",children:e.jsx(fo,{})}),footer:e.jsxs(e.Fragment,{children:[e.jsx(Ae,{"aria-label":"项目",defaultValue:"agent-tower",options:fe.map(a=>({value:a.name,label:a.name,icon:e.jsx(Ut,{color:a.color})}))}),e.jsx(Ae,{"aria-label":"Agent",defaultValue:q.CLAUDE_CODE,options:lu}),e.jsx(Ae,{"aria-label":"工作区",defaultValue:"worktree",icon:e.jsx(Un,{}),menuWidth:"lg",options:[{value:"worktree",label:"新建工作树",description:"在独立分支上工作,不影响主目录"},{value:"local",label:"本地目录",description:"直接修改项目目录,适合一次性小改动"}]})]})})]})}function dj(){const[t,n]=c.useState("先读 TaskList.tsx 与 sidebar-styles.ts,保持 32px 行高;元信息悬停时收起。");return e.jsxs(ee,{id:"inputs",description:"输入控件共用一个外壳:白底、1px 边框、10px 圆角。焦点 = 边框加深为中性灰;错误 = 红边框 + 字段下方一行红字,不弹窗、不清空输入。",children:[e.jsx(k,{name:"Field · Input",title:"字段与输入框",description:"标签在上、说明在下;Field 自动把 id、说明、错误态接到内部控件上。",span:2,dos:["错误信息说清楚怎么改:「目录不是 Git 仓库」而不是「输入有误」"],donts:["用占位符代替标签","输入时就报错——等失焦或提交时再校验"],children:e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsx(ke,{label:"项目名称",required:!0,description:"用于侧栏与任务标签,可随时修改",children:e.jsx(He,{defaultValue:"agent-tower"})}),e.jsx(ke,{label:"仓库路径",error:"这个目录不是 Git 仓库,初始化后才能使用工作树",children:e.jsx(He,{defaultValue:"/Users/shitian/Work/notes",prefix:e.jsx(xo,{})})}),e.jsx(ke,{label:"开发端口",description:"留空则按项目自动分配",children:e.jsx(He,{placeholder:"5173",inputMode:"numeric",suffix:e.jsx("span",{className:"text-xs",children:"端口"})})}),e.jsx(ke,{label:"分支前缀",counter:"7 / 24",children:e.jsx(He,{size:"sm",defaultValue:"feat/ds"})}),e.jsx(ke,{label:"默认分支",description:"只读:由仓库决定",children:e.jsx(He,{disabled:!0,defaultValue:"main"})})]})}),e.jsx(k,{name:"Textarea",title:"多行输入",description:"Prompt、脚本、说明文字;可随内容增高。",children:e.jsx(ke,{label:"任务说明",counter:`${t.length} / 500`,children:e.jsx(sd,{autoResize:!0,minRows:3,maxRows:6,value:t,onChange:s=>n(s.target.value.slice(0,500))})})}),e.jsx(k,{name:"SearchField",title:"搜索",description:"放大镜前缀;有内容时出现清除按钮,Esc 同样清空。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(Ws,{placeholder:"搜索任务",shortcut:["⌘","K"],"aria-label":"搜索任务"}),e.jsx(Ws,{size:"sm",defaultValue:"design",placeholder:"筛选文件","aria-label":"筛选文件"})]})}),e.jsx(k,{name:"Select",title:"选择框",description:"5 个以上互斥选项时用;更少时用分段或单选,全部可见更快。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ke,{label:"Provider",children:e.jsx(cr,{defaultValue:"anthropic",options:[{value:"anthropic",label:"Anthropic 官方",description:"使用 Claude Code 自带的登录"},{value:"bedrock",label:"AWS Bedrock",description:"按 AWS 账号计费"},{value:"vertex",label:"Google Vertex AI"},{value:"proxy",label:"自定义代理",description:"兼容 Anthropic API 的网关"},{value:"disabled",label:"OpenRouter",description:"尚未配置密钥",disabled:!0}]})}),e.jsx(ke,{label:"目标分支",children:e.jsx(cr,{size:"sm",placeholder:"选择分支",options:["main","develop","release/1.3","feat/design-system","fix/session-timeout"].map(s=>({value:s,label:s,icon:e.jsx(Un,{})}))})})]})}),e.jsx(k,{name:"Slider",title:"滑块",description:"连续或分档取值;精确数值必须同时以文字显示。",children:e.jsx(ij,{})}),e.jsx(k,{name:"Segmented",title:"分段选择",description:"2–5 个互斥选项、切换后原地刷新内容。选中段是浮起的白卡。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(sn,{"aria-label":"视图",defaultValue:"list",options:[{value:"list",label:"列表",icon:e.jsx(Tx,{})},{value:"board",label:"看板",icon:e.jsx(nx,{})},{value:"calendar",label:"日历",icon:e.jsx(wo,{})}]}),e.jsx(sn,{"aria-label":"任务状态",defaultValue:"all",options:[{value:"all",label:"全部",count:24},{value:"running",label:"运行中",count:3},{value:"review",label:"待审查",count:2}]}),e.jsx(sn,{"aria-label":"时间范围",size:"sm",defaultValue:"30",options:[{value:"7",label:"7 天"},{value:"30",label:"30 天"},{value:"90",label:"90 天"}]})]})}),e.jsx(k,{name:"Tabs",title:"标签页",description:"同一对象的不同面,切换整块内容区。下划线式,切换时字重不变、不抖动。",children:e.jsxs(rd,{defaultValue:"changes",children:[e.jsxs(ad,{children:[e.jsx(Zt,{value:"conversation",children:"对话"}),e.jsx(Zt,{value:"changes",count:12,children:"变更"}),e.jsx(Zt,{value:"terminal",children:"终端"}),e.jsx(Zt,{value:"preview",disabled:!0,children:"预览"})]}),e.jsx(Pn,{value:"conversation",children:e.jsx(Q,{children:"与 Agent 的对话记录。"})}),e.jsx(Pn,{value:"changes",children:e.jsx(Q,{children:"12 个文件有改动,+412 −187。"})}),e.jsx(Pn,{value:"terminal",children:e.jsx(Q,{children:"工作区终端。"})})]})}),e.jsx(k,{name:"Chip · Tag",title:"筛选胶囊与标签",description:"胶囊是可切换的筛选条件,选中为 Charcoal 实心;标签是已添加的条目,可移除。",children:e.jsx(lj,{})}),e.jsxs(k,{name:"ChipSelect",title:"胶囊选择器",description:"输入卡下方、工具栏里的轻量参数:平时只是灰字 + 图标,悬停才浮出底色;点开是单选菜单。",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(V,{label:"已选",children:[e.jsx(Ae,{"aria-label":"Agent",defaultValue:q.CLAUDE_CODE,options:lu}),e.jsx(Ae,{"aria-label":"执行权限",icon:e.jsx(Fa,{}),defaultValue:"ask",menuWidth:"lg",showMenuLabel:!0,options:Pa})]}),e.jsx(V,{label:"未选",children:e.jsx(Ae,{"aria-label":"目标分支",icon:e.jsx(Un,{}),placeholder:"选择分支",options:["main","release/1.3","feat/design-system"].map(s=>({value:s,label:s}))})}),e.jsx(V,{label:"禁用",children:e.jsx(Ae,{"aria-label":"Provider",disabled:!0,defaultValue:"official",options:[{value:"official",label:"Anthropic 官方"}]})})]}),e.jsx(Q,{className:"mt-4",children:'不可用的选项留在菜单里并写明原因(点开 Agent 看 Cursor Agent);带说明的选项用宽菜单 menuWidth="lg"。'})]}),e.jsx(k,{name:"Switch · Checkbox · Radio",title:"开关、复选与单选",description:"开关立即生效;复选框用于需要提交的选择;单选用于 2–5 个需要读说明才能选的互斥项。",span:2,children:e.jsxs("div",{className:"grid gap-8 lg:grid-cols-3",children:[e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:[{label:"任务完成时发送系统通知",checked:!0},{label:"自动生成提交信息",checked:!1},{label:"合并后删除工作树",checked:!0,disabled:!0}].map(s=>e.jsxs("label",{className:j("flex items-center justify-between gap-4 py-2.5 first:pt-0",s.disabled&&"opacity-50"),children:[e.jsx("span",{className:"text-[13px] text-foreground",children:s.label}),e.jsx(id,{defaultChecked:s.checked,disabled:s.disabled,"aria-label":s.label})]},s.label))}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(qe,{defaultChecked:!0,label:"合并后删除分支"}),e.jsx(qe,{label:"推送前运行测试",description:"在工作树里执行 pnpm test,失败则中止推送"}),e.jsx(qe,{checked:"indeterminate",label:"选中 3 / 5 个文件"}),e.jsx(qe,{disabled:!0,label:"签名提交(未配置 GPG)"})]}),e.jsx(ld,{"aria-label":"执行权限",defaultValue:"ask",options:Pa})]})}),e.jsx(k,{name:"Composer",title:"输入卡",description:"主页的「一句话发起任务」:Enter 提交、Shift+Enter 换行,输入法组字时不提交。参数用卡片下方的胶囊,不塞进卡片里。",span:2,children:e.jsx(cj,{})})]})}function Wt({icon:t,trailing:n,tone:s="neutral",highlighted:r=!1,children:a}){return e.jsxs("div",{className:j(Ue,s==="danger"&&is,r&&"bg-accent text-foreground"),children:[e.jsx("span",{className:j("flex shrink-0",s==="danger"?"text-current":"text-muted-foreground"),children:t}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:a}),n]})}function uj(){return e.jsxs("div",{className:j(yt,"w-60"),role:"presentation",children:[e.jsx("div",{className:gn,children:"任务"}),e.jsx(Wt,{icon:e.jsx(Vs,{}),trailing:e.jsx("span",{className:ln,children:"⌘⏎"}),children:"在新标签页打开"}),e.jsx(Wt,{icon:e.jsx(Vn,{}),highlighted:!0,children:"复制分支名"}),e.jsx(Wt,{icon:e.jsx(go,{}),trailing:e.jsx("span",{className:ln,children:"F2"}),children:"重命名"}),e.jsx("div",{className:cn}),e.jsx(Wt,{icon:e.jsx(zr,{}),trailing:e.jsx(us,{className:"ml-auto size-3.5 text-muted-foreground"}),children:"优先级"}),e.jsx("div",{className:cn}),e.jsx(Wt,{icon:e.jsx(Lt,{}),tone:"danger",children:"删除任务"})]})}function Da(){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"状态"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(qe,{defaultChecked:!0,label:"运行中"}),e.jsx(qe,{defaultChecked:!0,label:"待审查"}),e.jsx(qe,{label:"已完成"})]})]})}function xj(){const[t,n]=c.useState(!1),[s,r]=c.useState(!1),a=c.useRef(null),o=()=>{r(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{r(!1),n(!1)},1200)};return e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(ua,{children:[e.jsx(wd,{asChild:!0,children:e.jsx(F,{children:"新建项目"})}),e.jsx(xa,{title:"新建项目",description:"选择一个 Git 仓库,Agent 会在它的工作树里完成任务。",footer:e.jsxs(e.Fragment,{children:[e.jsx(mr,{asChild:!0,children:e.jsx(F,{variant:"ghost",children:"取消"})}),e.jsx(mr,{asChild:!0,children:e.jsx(F,{variant:"primary",children:"创建项目"})})]}),children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ke,{label:"项目名称",required:!0,children:e.jsx(He,{defaultValue:"agent-tower"})}),e.jsx(ke,{label:"仓库路径",description:"必须是 Git 仓库的根目录",children:e.jsx(He,{defaultValue:"~/Work/agent-tower",prefix:e.jsx(xo,{})})})]})})]}),e.jsx(F,{tone:"danger",onClick:()=>n(!0),children:"删除项目…"}),e.jsx(yd,{open:t,onOpenChange:n,tone:"danger",title:"删除项目 agent-tower?",description:"项目下的 24 个任务与工作树会一起删除,仓库本身不受影响。删除后无法恢复。",confirmLabel:"删除项目",cancelLabel:"取消",loading:s,onConfirm:o})]})}function mj(){const[t,n]=c.useState("high");return e.jsxs(ee,{id:"overlays",description:"浮层共用一种材质:白底、1px 边框、popover 阴影、10px 圆角。由轻到重:Tooltip → 菜单 → 气泡面板 → 对话框。",children:[e.jsx(k,{name:"Menu",title:"菜单",description:"条目 13px、8px 圆角;图标在左、快捷键在右,危险操作放最后并用分隔线隔开。",canvas:"chrome",dos:["菜单文案用动词开头:「复制分支名」","危险项放最后,前面加分隔线"],donts:["在菜单里放表单——那是气泡面板的事"],children:e.jsxs("div",{className:"flex flex-wrap items-start gap-6",children:[e.jsx(uj,{}),e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx(Q,{children:"可交互版本:"}),e.jsxs(dd,{children:[e.jsx(ud,{asChild:!0,children:e.jsx(F,{size:"sm",children:"任务操作"})}),e.jsxs(pd,{className:"w-56",children:[e.jsx(hd,{children:"任务"}),e.jsx(Dn,{icon:e.jsx(Vs,{}),shortcut:"⌘⏎",children:"在新标签页打开"}),e.jsx(Dn,{icon:e.jsx(Vn,{}),children:"复制分支名"}),e.jsx(xr,{}),e.jsxs(md,{children:[e.jsx(fd,{icon:e.jsx(zr,{}),children:"优先级"}),e.jsx(gd,{children:e.jsxs(xd,{value:t,onValueChange:n,children:[e.jsx(Qt,{value:"urgent",children:"P0 紧急"}),e.jsx(Qt,{value:"high",children:"P1 高"}),e.jsx(Qt,{value:"normal",children:"P2 普通"}),e.jsx(Qt,{value:"low",children:"P3 低"})]})})]}),e.jsx(xr,{}),e.jsx(Dn,{icon:e.jsx(Lt,{}),tone:"danger",children:"删除任务"})]})]}),e.jsxs(jd,{children:[e.jsx(vd,{className:"flex h-20 w-44 items-center justify-center rounded-lg border border-dashed border-border bg-background text-xs text-muted-foreground",children:"在这里右键"}),e.jsxs(bd,{className:"w-48",children:[e.jsx(On,{icon:e.jsx(Vn,{}),children:"复制路径"}),e.jsx(On,{icon:e.jsx(Vs,{}),children:"在编辑器中打开"}),e.jsx(Nd,{}),e.jsx(On,{icon:e.jsx(Lt,{}),tone:"danger",children:"删除文件"})]})]})]})]})}),e.jsx(k,{name:"Tooltip",title:"悬停提示",description:"深色反色面、无箭头,只放补充信息;键盘聚焦同样出现。",donts:["把必须知道的信息只藏在 Tooltip 里"],children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("span",{className:"flex max-w-[260px] items-center gap-2 rounded-lg bg-inverse px-2.5 py-1.5 text-xs leading-relaxed text-inverse-foreground shadow-popover",children:["搜索任务",e.jsx(We,{keys:["⌘","K"],inverse:!0})]}),e.jsx("span",{className:"max-w-[220px] rounded-lg bg-inverse px-2.5 py-1.5 text-xs leading-relaxed text-inverse-foreground shadow-popover",children:"修复 Claude 会话自动结束及停止时进程树清理超时"})]}),e.jsxs(V,{label:"悬停试试",children:[e.jsx(Dt,{content:"刷新状态",children:e.jsx(F,{size:"sm",variant:"ghost",children:"刷新"})}),e.jsx(Dt,{content:"新建任务",shortcut:["⌘","N"],children:e.jsx(F,{size:"sm",children:"新建"})}),e.jsx(Dt,{content:"下方显示",side:"bottom",children:e.jsx(F,{size:"sm",variant:"ghost",children:"下方"})})]})]})}),e.jsxs(k,{name:"Popover",title:"气泡面板",description:"小表单、筛选器、详情预览:比菜单内容多,又不值得开对话框。",canvas:"chrome",children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-6",children:[e.jsxs("div",{className:"w-64 rounded-lg border border-border bg-popover p-3 text-sm text-popover-foreground shadow-popover",role:"presentation",children:[e.jsx(Da,{}),e.jsxs("div",{className:"mt-3 flex justify-end gap-1.5 border-t border-border/60 pt-3",children:[e.jsx(F,{size:"sm",variant:"ghost",children:"重置"}),e.jsx(F,{size:"sm",variant:"primary",children:"应用"})]})]}),e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx(Q,{children:"可交互版本:"}),e.jsxs(Ja,{children:[e.jsx(to,{asChild:!0,children:e.jsxs(F,{size:"sm",children:[e.jsx(Mo,{}),"筛选"]})}),e.jsxs(eo,{className:"w-64",children:[e.jsx(Da,{}),e.jsxs("div",{className:"mt-3 flex justify-end gap-1.5 border-t border-border/60 pt-3",children:[e.jsx(Hs,{asChild:!0,children:e.jsx(F,{size:"sm",variant:"ghost",children:"重置"})}),e.jsx(Hs,{asChild:!0,children:e.jsx(F,{size:"sm",variant:"primary",children:"应用"})})]})]})]})]})]}),e.jsx(Q,{className:"mt-4",children:"与菜单同材质,内边距 12px;底部操作区与对话框一致,主按钮在右。"})]}),e.jsxs(k,{name:"Dialog",title:"对话框",description:"需要专注完成的一件事。遮罩 20% 黑,面板 14px 圆角;Esc 或点遮罩关闭,焦点在关闭后归还。",dos:["确认框写清后果:「删除后无法恢复」","主按钮写动作本身:「删除项目」"],donts:["对话框里再开对话框"],children:[e.jsxs("div",{className:"mb-4 overflow-hidden rounded-xl border border-border bg-background shadow-overlay",children:[e.jsxs("div",{className:"px-4 pb-2 pt-4",children:[e.jsx("div",{className:"text-[15px] font-semibold text-foreground",children:"删除项目 agent-tower?"}),e.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:"项目下的 24 个任务与工作树会一起删除。删除后无法恢复。"})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-border/60 bg-foreground/[0.015] px-4 py-2.5",children:[e.jsx(F,{size:"sm",variant:"ghost",children:"取消"}),e.jsx(F,{size:"sm",variant:"primary",tone:"danger",children:"删除项目"})]})]}),e.jsx(xj,{})]})]})}const Bs=6e4,pj=[{id:"todo-1",title:"审查「重塑左侧任务面板」的改动",state:"doing",tag:e.jsx(jt,{name:"agent-tower",color:"text-indigo-600"}),due:{label:"今天",tone:"warning"}},{id:"todo-2",title:"续期隧道证书",state:"todo",tag:e.jsx(jt,{name:"desktop-shell",color:"text-rose-600"}),due:{label:"逾期 1 天",tone:"danger"}},{id:"todo-3",title:"给 TeamRun 写拓扑模板说明",state:"todo",due:{label:"10/17"}},{id:"todo-4",title:"合并 v1.2 发布分支",state:"done",due:{label:"10/09"}},{id:"todo-5",title:"迁移旧的 Provider 配置",state:"cancelled"}];function hj(){const[t,n]=c.useState(pj),s=r=>{n(a=>a.map(o=>o.id===r?{...o,state:o.state==="done"?"todo":"done"}:o))};return e.jsx(io,{items:t,onToggle:s})}function Ve({agentType:t}){return e.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-background ring-1 ring-border",children:e.jsx(Te,{agentType:t,className:"size-3.5"})})}function fj(){return e.jsxs(ee,{id:"lists",description:"清单是最常见的展示形式:每行一件事,状态在左、元信息在右。行间 1px 细线,悬停浅灰;只有临近或逾期的日期才上色。",children:[e.jsx(k,{name:"TodoList",title:"待办",description:"状态图标与任务状态同一套,可点击切换完成;顶部是各状态计数。逾期红、今天到期橙,其余日期灰。",children:e.jsx(hj,{})}),e.jsx(k,{name:"Timeline",title:"日程",description:"按天分组的时间线:起止时间对齐成列,竖条表示时长,进行中的一项竖条变黑。",children:e.jsx(oo,{groups:[{id:"today",title:"今天",caption:"10 月 14 日 周三",entries:[{id:"tl-1",time:"09:30",endTime:"10:00",title:"站会",meta:"线上 · 6 人"},{id:"tl-2",time:"10:00",endTime:"12:00",title:"Claude Code:重塑任务面板",tag:e.jsx(oe,{size:"sm",variant:"dot",tone:"success",children:"已完成"})},{id:"tl-3",time:"14:00",endTime:"15:00",title:"设计评审:组件库",meta:"会议室 3"},{id:"tl-4",time:"15:00",endTime:"16:30",title:"TeamRun:设计系统展示页",active:!0,tag:e.jsx(Ze,{tone:"info",label:"进行中"})},{id:"tl-5",time:"17:00",title:"TeamRun 演示"}]},{id:"tomorrow",title:"明天",caption:"10 月 15 日 周四",entries:[{id:"tl-6",time:"10:00",endTime:"11:00",title:"迭代周会",meta:"线上"}]}]})}),e.jsx(k,{name:"ActivityFeed",title:"动态",description:"谁在什么时候做了什么。主语加粗,时间右对齐,附加内容缩进在下方。",children:e.jsx(Ya,{entries:[{id:"act-1",avatar:e.jsx(Ve,{agentType:q.CLAUDE_CODE}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"Claude Code"})," 提交了 3 个文件"]}),time:"4 分钟",detail:e.jsx("span",{className:"font-mono text-[11px]",children:"feat(web): 重塑左侧任务面板样式与交互"})},{id:"act-2",avatar:e.jsx(Se,{name:"林夏",size:"sm"}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"林夏"})," 把任务移到了「待审查」"]}),time:"12 分钟"},{id:"act-3",avatar:e.jsx(Ve,{agentType:q.CODEX}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"Codex"})," 开始执行「修复会话自动结束」"]}),time:"25 分钟"},{id:"act-4",avatar:e.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-foreground/[0.06] text-muted-foreground",children:e.jsx(Fr,{className:"size-3.5","aria-hidden":"true"})}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"周远"})," 合并了 feat/approval-loop"]}),time:"1 小时",detail:e.jsx(xt,{additions:865,deletions:233})}]})}),e.jsx(k,{name:"DeadlineList",title:"到期提醒",description:"大号天数先抓住视线:逾期红、3 天内橙、其余墨色——越紧急越醒目。",children:e.jsx(Za,{items:[{id:"dl-1",days:-2,title:"隧道证书续期",meta:"desktop-shell · 运维"},{id:"dl-2",days:0,title:"组件库提测",meta:"设计系统 v1"},{id:"dl-3",days:2,title:"回复设计评审意见",meta:"设计系统 v1"},{id:"dl-4",days:7,title:"主页迁移",meta:"agent-tower"}]})}),e.jsxs(k,{name:"Leaderboard",title:"排行榜",description:"前三名序号加深;名次变化用小箭头,不用奖牌和彩色。",children:[e.jsx(Qa,{entries:[{id:"lb-1",name:"Claude Code",avatar:e.jsx(Ve,{agentType:q.CLAUDE_CODE}),meta:"486 次会话",value:"74%",change:1},{id:"lb-2",name:"Codex",avatar:e.jsx(Ve,{agentType:q.CODEX}),meta:"312 次会话",value:"61%",change:-1},{id:"lb-3",name:"Cursor Agent",avatar:e.jsx(Ve,{agentType:q.CURSOR_AGENT}),meta:"97 次会话",value:"60%",change:2},{id:"lb-4",name:"Qwen Code",avatar:e.jsx(Ve,{agentType:q.QWEN_CODE}),meta:"41 次会话",value:"50%"},{id:"lb-5",name:"Gemini CLI",avatar:e.jsx(Ve,{agentType:q.GEMINI_CLI}),meta:"158 次会话",value:"47%",change:-2}]}),e.jsx(Q,{className:"mt-2",children:"一次通过审查的比例 · 10 月"})]}),e.jsx(k,{name:"Bulletin",title:"公告",description:"日期块 + 标题 + 一两行正文;类型徽章只用 neutral,维护这类需要注意的才上色。",children:e.jsx(Xa,{locale:"zh-CN",items:[{id:"bl-1",date:new Date(2026,9,14),title:"设计系统 v1 上线",body:"组件、设计规范与扩展规则都在 /design-system,新页面请从这里取组件。",badge:e.jsx(oe,{size:"sm",children:"公告"})},{id:"bl-2",date:new Date(2026,9,12),title:"隧道服务维护",body:"10 月 16 日 02:00–03:00 远程访问不可用,本地使用不受影响。",badge:e.jsx(oe,{size:"sm",tone:"warning",children:"维护"})},{id:"bl-3",date:new Date(2026,9,9),title:"v1.2:三档执行权限",body:"请求批准、自动同意(沙箱)、自动同意(完全访问)。",badge:e.jsx(oe,{size:"sm",children:"更新"}),meta:"发布说明"}]})})]})}const gj=[{key:"title",header:"任务",render:t=>e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-foreground",children:t.title}),e.jsx(jt,{name:t.project.name,color:t.project.color})]})},{key:"status",header:"状态",width:"96px",render:t=>e.jsx(Gn,{status:t.status})},{key:"agent",header:"Agent",width:"136px",render:t=>e.jsx(Ce,{agentType:t.agent,size:"sm"})},{key:"minutes",header:"耗时",width:"80px",numeric:!0,sortable:!0,render:t=>t.minutes?`${t.minutes} 分钟`:"—"},{key:"changes",header:"改动",width:"112px",numeric:!0,sortable:!0,sortValue:t=>t.additions+t.deletions,render:t=>e.jsx(xt,{additions:t.additions,deletions:t.deletions})},{key:"updatedAt",header:"更新",width:"80px",numeric:!0,sortable:!0,render:t=>e.jsx(Me,{value:t.updatedAt,now:Z,className:"text-xs"})}];function jj(){const[t,n]=c.useState("data"),[s,r]=c.useState(rn[0].id);return e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(sn,{"aria-label":"表格状态",size:"sm",value:t,onValueChange:n,options:[{value:"data",label:"数据"},{value:"loading",label:"首次加载"},{value:"empty",label:"无结果"}]}),e.jsx(qd,{caption:"最近的任务",columns:gj,rows:t==="empty"?[]:rn,rowKey:a=>a.id,loading:t==="loading",defaultSort:{key:"updatedAt",direction:"desc"},selectedKey:s,onRowClick:a=>r(a.id),empty:e.jsx(nn,{size:"sm",icon:e.jsx(po,{}),title:"没有匹配的任务",description:"换个关键词,或清除筛选条件"})})]})}function vj(){return e.jsxs(ee,{id:"tables",description:"需要逐行比较、排序时用表格。表头 11px 灰字,行高 36px,数字列右对齐等宽;状态列用图标 + 文字。热力表用墨阶表示强弱,格内仍写数字。",children:[e.jsx(k,{name:"DataTable",title:"数据表",description:"可排序的列悬停才显示排序箭头;可点击的行支持 Enter 打开,选中行浅灰底。",span:2,dos:["刷新时保留旧数据,骨架只用于首次加载","空结果给出下一步:「换个关键词」"],donts:["斑马纹和竖线网格——行间细线就够了","数字列左对齐"],children:e.jsx(jj,{})}),e.jsxs(k,{name:"HeatTable",title:"热力表",description:"两个维度交叉的强弱:颜色帮助扫视,数字负责精确,打印和色弱同样可读。",children:[e.jsx(Gd,{"aria-label":"各项目按星期的任务数",corner:"项目",rows:fe.map(t=>({name:t.name,label:e.jsxs(e.Fragment,{children:[e.jsx(Ut,{color:t.color,className:"mr-1.5 inline-block align-[1px]"}),t.name]})})),columns:Ng,data:wg}),e.jsx(gr,{className:"mt-3"})]}),e.jsxs(k,{name:"CalendarHeatmap",title:"日历热力",description:"每天的活跃度:周为列、星期为行,5 档墨阶;悬停看具体日期和数值。",children:[e.jsx(Bd,{"aria-label":"近 26 周每日会话数",start:iu,values:Ta,locale:"zh-CN",describe:(t,n)=>`${t.getMonth()+1} 月 ${t.getDate()} 日 · ${n} 次会话`}),e.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[e.jsxs(Q,{children:["近 26 周 · 共 ",Ta.reduce((t,n)=>t+n,0).toLocaleString("zh-CN")," 次会话"]}),e.jsx(gr,{})]})]})]})}function bj(){return e.jsxs(ee,{id:"schedule",description:"流程回答「走到哪一步了、卡在哪」,排期回答「什么时候、谁在做」。都用「今天」竖线做参照,受阻和逾期是唯一的彩色。",children:[e.jsx(k,{name:"ProcessSteps",title:"流程步骤",description:"任务生命周期 / SOP:已完成的连线变黑,当前步骤黑框,受阻的步骤用红色——整条流程唯一需要处理的地方。",span:2,children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(vr,{steps:[{id:"p1",title:"创建任务",owner:"林夏",time:"09:12",status:"done"},{id:"p2",title:"准备工作区",owner:"自动",time:"09:13",status:"done"},{id:"p3",title:"Agent 执行",owner:"Claude Code",time:"48 分钟",status:"done"},{id:"p4",title:"代码审查",owner:"林夏",time:"进行中",status:"current"},{id:"p5",title:"合并",status:"upcoming"}]}),e.jsx(vr,{steps:[{id:"q1",title:"创建任务",owner:"周远",time:"昨天",status:"done"},{id:"q2",title:"准备工作区",owner:"自动",time:"依赖安装失败",status:"blocked"},{id:"q3",title:"Agent 执行",status:"upcoming"},{id:"q4",title:"代码审查",status:"upcoming"},{id:"q5",title:"合并",status:"upcoming"}]})]})}),e.jsx(k,{name:"TopologyTree",title:"拓扑树",description:"TeamRun 团队结构:自上而下的层级,节点是小白卡,当前关注的节点加深描边。",span:2,canvas:"chrome",children:e.jsx(Xd,{root:{id:"lead",title:"Lead",subtitle:"Claude Code · 拆解与汇总",icon:e.jsx(Te,{agentType:q.CLAUDE_CODE}),status:e.jsx(Ze,{tone:"info",label:"运行中"}),children:[{id:"planner",title:"Planner",subtitle:"Codex",icon:e.jsx(Te,{agentType:q.CODEX})},{id:"coder",title:"Coder",subtitle:"2 个实例",icon:e.jsx(co,{}),active:!0,children:[{id:"coder-a",title:"Coder A",subtitle:"组件库",icon:e.jsx(Te,{agentType:q.CLAUDE_CODE}),status:e.jsx(Ze,{tone:"info",label:"运行中"})},{id:"coder-b",title:"Coder B",subtitle:"展示页",icon:e.jsx(Te,{agentType:q.GEMINI_CLI}),status:e.jsx(Ze,{tone:"info",label:"运行中"})}]},{id:"reviewer",title:"Reviewer",subtitle:"Codex · 等待中",icon:e.jsx(ns,{})}]}})}),e.jsx(k,{name:"GanttChart",title:"甘特图",description:"横条是起止,墨色部分是已完成的比例,斜纹是剩余;竖线是今天。条外写负责人,不靠颜色区分人。",span:2,children:e.jsx(Vd,{"aria-label":"v1.3 里程碑排期",tasks:Cg,start:yg,days:28,today:9,locale:"zh-CN"})}),e.jsx(k,{name:"MonthCalendar",title:"月历",description:"一个月的事件:今天是黑底日期;只有带状态含义的事件(到期、维护)才上色,超出的折叠成「+N」。",span:2,children:e.jsx(Kd,{year:2026,month:9,today:"2026-10-14",events:kg,locale:"zh-CN"})})]})}const Nj=[{name:"林夏"},{name:"周远"},{name:"陈默"},{name:"Alex Kim"},{name:"王若"},{name:"Sam Lee"}],wj=`export function navRowClassName(active: boolean, className?: string) {
6
+ return cn(
7
+ 'flex h-8 w-full min-w-0 items-center gap-2.5 rounded-md px-2 text-sm',
8
+ active
9
+ ? 'bg-background shadow-raised ring-1 ring-border/80'
10
+ : 'text-foreground/80 hover:bg-accent',
11
+ className,
12
+ )
13
+ }`;function yj(){return e.jsxs(ee,{id:"people",description:"人用单色头像 + 缩写,不给每个人分配颜色;Agent 用官方 logo。内容类组件(文件、提交、代码、终端)都是等宽字,路径从左截断,复制按钮在右上。",children:[e.jsxs(k,{name:"Avatar · AvatarGroup",title:"头像",description:"圆形是人,方形是项目 / 机器人。叠放时白描边,超出收成「+N」。",children:[e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs(V,{label:"尺寸",children:[e.jsx(Se,{name:"林夏",size:"xs"}),e.jsx(Se,{name:"林夏",size:"sm"}),e.jsx(Se,{name:"林夏",size:"md"}),e.jsx(Se,{name:"林夏",size:"lg"}),e.jsx(Q,{className:"ml-1",children:"20 · 24 · 32 · 40"})]}),e.jsxs(V,{label:"缩写与形状",children:[e.jsx(Se,{name:"周远",size:"md"}),e.jsx(Se,{name:"Alex Kim",size:"md"}),e.jsx(Se,{name:"docs-site",size:"md",shape:"square"}),e.jsx(Se,{name:"Agent Tower",src:pu,size:"md",shape:"square"})]}),e.jsxs(V,{label:"叠放",children:[e.jsx(Qd,{people:Nj,max:4}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"6 人参与"})]})]}),e.jsx(Q,{className:"mt-4",children:"中文取名字最后两个字,24px 及以下只取一个字;英文取前两个单词的首字母。"})]}),e.jsx(k,{name:"MessageBubble",title:"对话",description:"用户消息是右侧灰气泡(右上角收尖);Agent 回复不加气泡,长回复、代码、表格才有足够宽度。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(br,{from:"user",time:"15:02",children:["把左侧任务面板的行高改成 32px,元信息悬停时收起,参考 ",e.jsx(qt,{path:"src/components/task/TaskList.tsx"})]}),e.jsxs(br,{from:"agent",author:"Claude Code",time:"15:04",avatar:e.jsx(Ve,{agentType:q.CLAUDE_CODE}),children:["已改好:行高统一走 ",e.jsx("code",{className:"rounded bg-foreground/[0.05] px-1 font-mono text-xs",children:"navRowClassName"}),",元信息用 grid 1fr → 0fr 收起,宽度精确跟随内容。改动了 3 个文件,测试已通过。"]})]})}),e.jsxs(k,{name:"FileRow · FileChip",title:"文件",description:"状态字母(A/M/D/R)· 文件名 · 灰色目录(从左截断)· 增删统计。",children:[e.jsxs("div",{className:"-mx-2 flex flex-col",children:[e.jsx(Tt,{path:"packages/web/src/design-system/navigation/nav-row.tsx",status:"A",additions:64,active:!0}),e.jsx(Tt,{path:"packages/web/src/index.css",status:"M",additions:60,deletions:2}),e.jsx(Tt,{path:"packages/web/src/components/task/TaskGroup.tsx",status:"M",additions:12,deletions:31}),e.jsx(Tt,{path:"packages/web/src/components/task/legacy-row.tsx",status:"D",deletions:88}),e.jsx(Tt,{path:"docs/design/tokens.md",status:"R",additions:3,deletions:3})]}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-1.5",children:[e.jsx(qt,{path:"src/index.css"}),e.jsx(qt,{path:"design/hero.png"}),e.jsx(qt,{path:"README.md"})]})]}),e.jsx(k,{name:"CommitItem",title:"提交",description:"提交信息一行 · 作者与时间 · 等宽短哈希(可复制)。",children:e.jsxs("div",{className:"flex flex-col divide-y divide-border/50",children:[e.jsx(In,{message:"feat(web): 重塑左侧任务面板样式与交互",hash:"8721b9c4e2a1f0d93b7c",author:"Claude Code",time:e.jsx(Me,{value:Z-4*Bs,now:Z}),additions:412,deletions:187}),e.jsx(In,{message:"feat: 展示任务所属项目名称并优化悬停动效",hash:"bb1ecaa07d5e33f1a2c9",author:"林夏",time:e.jsx(Me,{value:Z-1560*Bs,now:Z}),additions:96,deletions:41}),e.jsx(In,{message:"fix: 修复 Claude 会话自动结束及停止时进程树清理超时",hash:"7503b04aa81c2e9f6d10",author:"Codex",time:e.jsx(Me,{value:Z-4320*Bs,now:Z})})]})}),e.jsx(k,{name:"CodeBlock",title:"代码块",description:"浅灰底等宽 12px、行高 20px;长行横向滚动,不自动折行。",children:e.jsx(Or,{title:"design-system/navigation/nav-row-styles.ts",code:wj,lineNumbers:!0})}),e.jsx(k,{name:"TerminalBlock",title:"终端输出",description:"全站唯一常驻的深色面,配色与 xterm 主题一致,像「窗口中的窗口」。",children:e.jsx(ao,{title:"pnpm --filter web build",status:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(Ze,{tone:"success",pulse:!1}),"退出码 0"]}),lines:[{kind:"command",text:"pnpm --filter web build"},{kind:"muted",text:"> tsc -b && vite build"},{text:"vite building for production..."},{kind:"success",text:"✓ 2481 modules transformed."},{kind:"warning",text:"(!) Some chunks are larger than 500 kB after minification."},{kind:"success",text:"✓ built in 14.62s"}]})}),e.jsx(k,{name:"PromptBlock",title:"可复制的指令",description:"「把这句话发给你的 Agent」:正文墨色,右上角带文字的复制按钮。",span:2,children:e.jsx($r,{text:"请阅读 packages/web/src/design-system/README.md,新页面只从 @/design-system 引入组件;需要新组件时先在展示页加样张,再写进组件库。"})})]})}function Rn({title:t,en:n,art:s,children:r}){return e.jsxs("article",{className:"flex min-w-0 flex-col overflow-hidden rounded-xl border border-border/60 bg-background",children:[e.jsx("div",{"aria-hidden":"true",className:"flex h-32 items-center justify-center border-b border-border/50 px-6",children:s}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:t}),e.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide text-muted-foreground",children:n})]}),e.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r})]})]})}const Cj="hatch bg-viz-0 text-viz-3";function kj(){const t=[.55,.7,.62,.84,.48],s=[18,22,17,26,24,30,28,34].map((r,a)=>`${a===0?"M":"L"}${8+a*22} ${76-r*1.8}`).join(" ");return e.jsxs(ee,{id:"viz-principles",columns:2,description:"展示组件是一套「画法」,不是一堆图表类型。四条原则决定了所有图表、统计卡、清单长什么样;新组件先回答这四个问题。",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 xl:col-span-2 2xl:grid-cols-4",children:[e.jsx(Rn,{title:"实与虚",en:"Actual vs plan",art:e.jsx("div",{className:"flex h-20 items-end gap-3",children:t.map((r,a)=>e.jsxs("div",{className:"flex h-full items-end gap-[2px]",children:[e.jsx("span",{className:"w-3 rounded-t-[3px] bg-viz-6",style:{height:`${r*100}%`}}),e.jsx("span",{className:j("w-3 rounded-t-[3px]",Cj),style:{height:`${Math.min(1,r+.15)*100}%`}})]},a))}),children:"已经发生的用实心墨色;计划、预期、剩余用斜纹或虚线。读者一眼分清「做到了多少」和「应该到多少」。"}),e.jsx(Rn,{title:"一种颜色",en:"One ink",art:e.jsx("div",{className:"grid grid-cols-7 gap-[3px]",children:[0,1,2,4,3,5,6,1,2,3,2,4,6,5,0,2,3,5,4,6,6].map((r,a)=>e.jsx("span",{className:"size-5 rounded-[3px]",style:{background:gt[r]}},a))}),children:"所有图表只用 Charcoal 的深浅,数值越大越深。需要并列的系列最多两个:主角墨色,对比用灰。"}),e.jsx(Rn,{title:"状态才有颜色",en:"Color means status",art:e.jsx("div",{className:"flex h-20 items-end gap-2",children:[.5,.65,.4,.9,.55,.7].map((r,a)=>a===3?e.jsxs("span",{className:"flex w-4 flex-col items-center gap-1",children:[e.jsx("span",{className:"whitespace-nowrap rounded bg-destructive/10 px-1 text-[9px] font-medium leading-4 text-destructive-ink",children:"逾期"}),e.jsx("span",{className:"w-4 rounded-t-[3px] bg-destructive",style:{height:r*60}})]},a):e.jsx("span",{className:"w-4 rounded-t-[3px] bg-viz-2",style:{height:r*60}},a))}),children:"图表里出现颜色,就意味着有事要处理:逾期红、风险橙。颜色必须配图标或文字,其余全部灰阶。"}),e.jsx(Rn,{title:"今天与基准",en:"Today & baseline",art:e.jsxs("svg",{viewBox:"0 0 176 84",className:"h-20 w-44",children:[e.jsx("line",{x1:"0",x2:"176",y1:"30",y2:"30",stroke:I.ink,strokeWidth:"1",strokeDasharray:"3 3"}),e.jsx("path",{d:s,fill:"none",stroke:I.ink,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"}),e.jsx("line",{x1:"140",x2:"140",y1:"4",y2:"80",stroke:I.ink,strokeOpacity:"0.5",strokeWidth:"1"}),e.jsx("text",{x:"143",y:"12",fontSize:"9",fill:"var(--muted-foreground)",children:"今天"}),e.jsx("text",{x:"2",y:"26",fontSize:"9",fill:"var(--muted-foreground)",children:"目标"})]}),children:"时间轴用竖线标出今天,水平虚线标出目标或均值——数字只有放在参照旁边才有意义。"})]}),e.jsx(k,{name:"Form",title:"选型",description:"先问「读者要回答什么问题」,再选形式。",span:2,dos:["一个数字就是答案时用统计卡,不要画图","需要逐行比较时用表格"],donts:["饼图超过 5 块、双 Y 轴、3D、渐变填充","用图表装饰没有问题要回答的版面"],children:e.jsx("div",{className:"grid gap-x-8 gap-y-2 text-xs sm:grid-cols-2 xl:grid-cols-4",children:[["现在是多少?","统计卡 · 主数字 · 用量表"],["离目标还差多少?","目标卡 · 进度条 · 进度环"],["随时间怎么变?","折线(连续)· 柱图(分期)"],["谁多谁少?","排行条 · 柱图"],["由什么构成?","堆叠柱 · 环图 · 方格图"],["两期之间谁变了?","斜率图"],["两个量有没有关系?","散点图"],["什么时候、在哪儿集中?","热力表 · 日历热力"]].map(([r,a])=>e.jsxs("div",{className:"flex flex-col border-l border-border pl-3",children:[e.jsx("span",{className:"font-medium text-foreground",children:r}),e.jsx("span",{className:"text-muted-foreground",children:a})]},r))})})]})}const Sj=[{state:"todo",label:"未开始"},{state:"doing",label:"进行中"},{state:"done",label:"已完成"},{state:"late",label:"逾期"},{state:"cancelled",label:"已取消"}],Mj=["not-started","on-track","ahead","at-risk","off-track","done"],_j=["done","done","done","late","done","done","done","done","cancelled","done","done","doing","todo","todo"];function Tj(){return e.jsxs(ee,{id:"marks",description:"图表与展示组件的最小零件。每个零件只有一种画法:同样的意思在任何地方都画成同样的样子。",children:[e.jsx(k,{name:"Legend",title:"图例",description:"两个及以上系列才放图例;色块形状与图中标记一致(实心 / 斜纹 / 线 / 虚线)。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Je,{items:[{label:"实际",swatch:"solid",color:I.ink,value:"1,284"},{label:"计划",swatch:"hatch",color:I.plan,value:"1,400"},{label:"上期",swatch:"solid",color:I.context}]}),e.jsx(Je,{items:[{label:"本期",swatch:"line",color:I.ink},{label:"目标",swatch:"dashed",color:I.ink},{label:"当前值",swatch:"dot",color:I.ink},{label:"预测区间",swatch:"outline",color:I.plan}]})]})}),e.jsx(k,{name:"Delta",title:"变化量",description:"箭头 + 带符号的数值 + 对比口径。颜色看「好坏」而不是「涨跌」:成本涨了是红的。",dos:["永远写明对比口径:「比上周」"],children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(V,{label:"越多越好",children:[e.jsx(Ie,{value:.18,period:"比上周"}),e.jsx(Ie,{value:-.07,period:"比上周"})]}),e.jsxs(V,{label:"越少越好",children:[e.jsx(Ie,{value:-.12,goodWhen:"down",period:"审查耗时"}),e.jsx(Ie,{value:.09,goodWhen:"down",period:"Token 成本"})]}),e.jsxs(V,{label:"无好坏",children:[e.jsx(Ie,{value:.04,goodWhen:"none",period:"会话数"}),e.jsx(Ie,{value:0,period:"持平"})]}),e.jsx(V,{label:"数值 · md",children:e.jsx(Ie,{value:12,format:"number",size:"md",period:"个任务"})})]})}),e.jsx(k,{name:"Track",title:"进度条",description:"墨色实际 + 浅灰轨道;竖线是「此刻应到的位置」,落后多少一眼可见。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[[{label:"迭代进度",value:.62,expected:.7,tone:"ink"},{label:"测试覆盖",value:.81,tone:"ink"},{label:"磁盘用量",value:.78,tone:"warning"},{label:"上下文窗口",value:.94,tone:"danger"}].map(t=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-1.5 flex justify-between text-xs",children:[e.jsx("span",{className:"text-foreground/85",children:t.label}),e.jsx("span",{className:"font-medium tabular-nums text-foreground",children:ae(t.value)})]}),e.jsx(Pe,{value:t.value,expected:t.expected,tone:t.tone,"aria-label":t.label})]},t.label)),e.jsxs(V,{label:"粗细",children:[e.jsx(Pe,{value:.5,size:"xs",className:"w-20","aria-label":"xs"}),e.jsx(Pe,{value:.5,size:"sm",className:"w-20","aria-label":"sm"}),e.jsx(Pe,{value:.5,size:"md",className:"w-20","aria-label":"md"})]})]})}),e.jsx(k,{name:"Ring",title:"进度环",description:"空间紧凑时代替进度条;中心放百分比或自定义内容。",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsx(pt,{value:.42,size:40,"aria-label":"完成 42%"}),e.jsx(pt,{value:.66,size:64,expected:.75,"aria-label":"完成 66%"}),e.jsx(pt,{value:.88,size:88,thickness:8,"aria-label":"完成 88%",children:e.jsxs("span",{className:"flex flex-col items-center leading-tight",children:[e.jsx("span",{className:"text-lg font-semibold tabular-nums text-foreground",children:"22"}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"/ 25 任务"})]})}),e.jsx(pt,{value:.95,size:64,tone:"danger","aria-label":"配额 95%"})]})}),e.jsx(k,{name:"Sparkline",title:"迷你走势",description:"放在数字旁边,只回答「在涨还是在跌」;不画坐标轴。",children:e.jsx("div",{className:"flex flex-col gap-3",children:[{label:"每日完成",values:Ps,value:"33",area:!0},{label:"上期同日",values:fa,value:"21",tone:"context"},{label:"平均审查耗时",values:[22,20,21,18,19,16,15,14,15,13,14,12],value:"12 分钟",baseline:15}].map(t=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-24 shrink-0 text-xs text-foreground/85",children:t.label}),e.jsx(ma,{values:t.values,area:t.area,tone:t.tone,baseline:t.baseline,width:120,"aria-label":t.label}),e.jsx("span",{className:"text-[13px] font-semibold tabular-nums text-foreground",children:t.value})]},t.label))})}),e.jsx(k,{name:"StateSquare",title:"状态方块",description:"图表里的最小状态单元(连续记录、排期格):空心 → 半实 → 实心,逾期是唯一的彩色。它是数据标记,界面里的状态图标仍用 lucide 线性图标。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex flex-wrap gap-4",children:Sj.map(t=>e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-foreground/85",children:[e.jsx(hr,{state:t.state,label:t.label}),t.label]},t.state))}),e.jsxs("div",{children:[e.jsx(Q,{className:"mb-1.5",children:"近两周每日构建"}),e.jsx("div",{className:"flex gap-1",children:_j.map((t,n)=>e.jsx(hr,{state:t,size:"md",label:`第 ${n+1} 天`},n))})]})]})}),e.jsx(k,{name:"HealthBadge",title:"健康度",description:"目标、里程碑、TeamRun 共用。正常不上色;越需要处理越醒目。",children:e.jsx("div",{className:"flex flex-wrap gap-2",children:Mj.map(t=>e.jsx(pa,{health:t},t))})}),e.jsx(k,{name:"TreeList",title:"树形清单",description:"层级拆解(任务 → 子任务),每层带进度;层级超过 3 层就该换一种组织方式。",span:2,children:e.jsx(Rd,{defaultCollapsed:["tree-3"],nodes:[{id:"tree-1",label:"设计系统 v1",meta:"TeamRun · 4 个 Agent",progress:.68,children:[{id:"tree-1-1",label:"令牌与组件",meta:"Claude Code",progress:1},{id:"tree-1-2",label:"展示页",meta:"Claude Code",progress:.55,children:[{id:"tree-1-2-1",label:"基础与组件章节",progress:.9},{id:"tree-1-2-2",label:"图表章节",progress:.3}]},{id:"tree-1-3",label:"视觉回归测试",meta:"Codex",progress:.2}]},{id:"tree-3",label:"主页迁移",meta:"下周开始",progress:0,children:[{id:"tree-3-1",label:"侧栏换用 NavRow / TaskRow",progress:0}]}]})})]})}function Rj(){return e.jsxs(ee,{id:"goals",description:"目标卡回答「离目标还差多少、是否按计划」:整体进度环 + 健康度 + 每条关键结果的进度与预期线。",children:[e.jsx(jr,{code:"O1",title:"让任务一次通过审查",meta:"Q4 · 负责人 shitian · 截止 12 月 31 日",health:"at-risk",progress:.48,keyResults:[{id:"kr1",code:"KR1",title:"一次通过率从 62% 提到 75%",progress:.46,expected:.6,current:"68%"},{id:"kr2",code:"KR2",title:"平均审查轮次降到 1.5",progress:.35,expected:.6,current:"2.1 轮"},{id:"kr3",code:"KR3",title:"合并后回滚率低于 2%",progress:.9,expected:.6,current:"1.4%"}]}),e.jsx(jr,{code:"O2",title:"多 Agent 协作进入日常",meta:"Q4 · TeamRun · 截止 12 月 31 日",health:"on-track",progress:.66,keyResults:[{id:"kr4",code:"KR1",title:"每周 TeamRun 任务 ≥ 30 个",progress:.73,expected:.6,current:"22 / 30"},{id:"kr5",code:"KR2",title:"团队拓扑模板 5 套",progress:.6,expected:.6,current:"3 / 5"},{id:"kr6",code:"KR3",title:"Lead Agent 自动拆解准确率 80%",progress:.65,expected:.6,current:"78%"}]}),e.jsx(k,{name:"KeyResult",title:"关键结果的读法",span:2,dos:["预期线 = 按时间均匀推进此刻应到的位置;进度条在线左边就是落后","健康度由负责人判断,不由公式自动算"],donts:["用红绿给每条关键结果上色——只有整体健康度有颜色"],children:e.jsx("div",{className:"grid gap-6 sm:grid-cols-3",children:[{title:"落后",value:.35,expected:.6,text:"进度在预期线左侧"},{title:"按计划",value:.62,expected:.6,text:"进度贴着预期线"},{title:"领先",value:.9,expected:.6,text:"进度越过预期线"}].map(t=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-1.5 flex justify-between text-xs",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.title}),e.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[ae(t.value)," / 预期 ",ae(t.expected)]})]}),e.jsx(Pe,{value:t.value,expected:t.expected,"aria-label":t.title}),e.jsx(Q,{className:"mt-1.5",children:t.text})]},t.title))})})]})}function Ej(){return e.jsxs(ee,{id:"numbers",description:"一个数字就是答案时不要画图。数字要有单位、有对比、有走势中的一两样,不要三样都没有,也不要三样全塞满。",children:[e.jsx(k,{name:"StatTile · StatGroup",title:"统计卡",description:"标签 · 数值 · 变化量(带口径)· 可选走势。一组 2–4 个,1px 细线分隔。",span:2,bodyClassName:"p-0",children:e.jsxs(Hd,{className:"rounded-none border-0",children:[e.jsx(en,{label:"运行中的 Agent",icon:e.jsx(ns,{}),value:"7",unit:"个",delta:{value:2,format:"number",goodWhen:"none",period:"比昨天"}}),e.jsx(en,{label:"今日完成任务",icon:e.jsx(ts,{}),value:"33",delta:{value:.18,period:"比上周同日"},trend:Ps}),e.jsx(en,{label:"平均审查耗时",icon:e.jsx(Ys,{}),value:"12",unit:"分钟",delta:{value:-.12,goodWhen:"down",period:"比上周"}}),e.jsx(en,{label:"本月 Token",icon:e.jsx(vo,{}),value:ze(1284e3,{compact:!0}),delta:{value:.09,goodWhen:"down",period:"比上月"},footnote:"配额 2M"})]})}),e.jsx(k,{name:"HeroFigure",title:"主数字",description:"一个视图只能有一个;56px,和正文同一款字体。",children:e.jsx(Wd,{label:"本月由 Agent 完成的工时",value:"186",unit:"小时",delta:{value:.24,period:"比上月"},caption:"按任务预估工时累计"})}),e.jsx(k,{name:"Meter",title:"用量表",description:"有上限的资源。平时墨色;越过阈值整条换色并加图标,颜色不单独承载含义。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx($n,{label:"本月 Token 配额",value:1284e3,max:2e6}),e.jsx($n,{label:"工作树磁盘",value:41,max:50,formatValue:t=>`${t} GB`}),e.jsx($n,{label:"并发会话",value:9,max:10,formatValue:t=>String(t)})]})}),e.jsxs(k,{name:"Format",title:"数字格式",description:"formatNumber / formatPercent 统一格式化;表格、坐标轴、提示用同一套写法。",span:2,children:[e.jsx("div",{className:"grid gap-x-8 gap-y-2 sm:grid-cols-2 xl:grid-cols-3",children:[["整数千分位","1284",ze(1284)],["紧凑写法","1284000",ze(1284e3,{compact:!0})],["中文紧凑","1736000(zh-CN)",ze(1736e3,{compact:!0,locale:"zh-CN"})],["百分比","0.6248",ae(.6248)],["带符号变化","−0.071",Dr(-.071)],["小数位","3.14159 · 1 位",ze(3.14159,{maximumFractionDigits:1})]].map(([t,n,s])=>e.jsxs("div",{className:"flex items-baseline justify-between gap-3 border-b border-border/40 py-1.5",children:[e.jsx("span",{className:"text-xs text-foreground/85",children:t}),e.jsxs("span",{className:"flex items-baseline gap-2",children:[e.jsx($t,{children:n}),e.jsx("span",{className:"text-[13px] font-semibold tabular-nums text-foreground",children:s})]})]},t))}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(za,{className:"size-3.5"}),"人数、次数:整数"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ko,{className:"size-3.5"}),"比例:最多 1 位小数"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(Ys,{className:"size-3.5"}),"时长:分钟 / 小时,不写秒"]})]})]})]})}function Ij(){const[t,n]=c.useState(fe[0].name),[s,r]=c.useState(2);return e.jsxs(ee,{id:"navigation",description:"导航只在灰色外框里:侧栏行、分组、面包屑。选中行是浮起的白卡,和右侧内容岛是同一种材质。",children:[e.jsx(k,{name:"NavRow · NavGroup",title:"侧栏行与分组",description:"行高 32px(触屏 40px),图标 16px;分组标题 12px 灰字 + 折叠箭头 + 计数。",canvas:"chrome",dos:["右侧元信息只放计数、时间、快捷键,并保持紧凑"],donts:["在侧栏行里放按钮组——行尾操作用悬停才出现的图标按钮或右键菜单"],children:e.jsxs("div",{className:"max-w-[300px]",children:[e.jsx(Ke,{icon:e.jsx(Ba,{}),label:"新建任务",meta:e.jsx(We,{keys:["⌘","N"]}),className:"mb-2"}),e.jsxs(Fn,{title:"项目",count:fe.length,children:[e.jsx(Ke,{icon:e.jsx(jo,{}),label:"全部项目",meta:"34",active:t==="all",onClick:()=>n("all")}),fe.map((a,o)=>e.jsx(Ke,{icon:e.jsx(Ut,{color:a.color,className:"mx-1"}),label:a.name,meta:[24,7,3,0][o],active:t===a.name,onClick:()=>n(a.name)},a.name))]}),e.jsxs(Fn,{title:"设置",defaultOpen:!1,children:[e.jsx(Ke,{icon:e.jsx(Cr,{}),label:"通用"}),e.jsx(Ke,{icon:e.jsx(ns,{}),label:"Agent 与 Provider"}),e.jsx(Ke,{icon:e.jsx(La,{}),label:"通知"})]})]})}),e.jsx(k,{name:"StepList",title:"步骤清单",description:"带内容的操作指引:命令、Prompt、按钮放在步骤下方,竖线串起各步。",children:e.jsx(Md,{steps:[{title:"安装 Agent Tower",description:"全局安装后即可启动本地服务(默认端口 12580)。",status:"done"},{title:"把 MCP 服务告诉你的 Agent",description:"复制下面这句话发给 Agent,它会自己完成注册。",status:"current",content:e.jsx($r,{text:"请运行 claude mcp add agent-tower -- agent-tower-mcp,然后列出 agent-tower 提供的工具确认连接成功。"})},{title:"在对话里创建任务",description:"「在 agent-tower 项目里新建一个任务:修复终端滚动」"}]})}),e.jsxs(k,{name:"Stepper",title:"步骤条",description:"3–5 步的线性流程:已完成实心对勾、当前黑环、未开始灰环,连线随进度变黑。横向需要整行宽度,窄处改用步骤清单。",span:2,children:[e.jsx(Sd,{current:s,steps:[{title:"安装 CLI",description:"claude / codex"},{title:"登录",description:"官方账号或 Provider"},{title:"添加项目",description:"选择 Git 仓库"},{title:"第一个任务"}]}),e.jsxs("div",{className:"mt-4 flex gap-1.5",children:[e.jsx(F,{size:"xs",variant:"ghost",disabled:s===0,onClick:()=>r(a=>Math.max(0,a-1)),children:"上一步"}),e.jsx(F,{size:"xs",disabled:s===4,onClick:()=>r(a=>Math.min(4,a+1)),children:"下一步"})]})]}),e.jsx(k,{name:"Breadcrumb",title:"面包屑",description:"告诉用户「我在哪」,最后一级可下拉切换同级对象;不超过 3 级。",span:2,canvas:"chrome",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-x-16 gap-y-4",children:[e.jsxs(pr,{children:[e.jsx(It,{children:"Agent Tower"}),e.jsx(It,{icon:e.jsx(qs,{}),menu:!0,current:!0,children:"agent-tower"})]}),e.jsxs(pr,{children:[e.jsx(It,{icon:e.jsx(qs,{}),children:"agent-tower"}),e.jsx(It,{children:"任务"}),e.jsx(It,{current:!0,children:"重塑左侧任务面板样式与交互"})]})]})})]})}function Aj(){const[t,n]=c.useState(rn[0].id),s=ja.map(a=>({status:a,tasks:rn.filter(o=>o.status===a)})),r=rn[0];return e.jsxs(ee,{id:"business",description:"Agent Tower 专属组件:任务、项目、分支、Agent。状态的颜色和图标只来自 components/task/status-styles 一处映射,这里只负责排版。",children:[e.jsxs(k,{name:"TaskStatusGroup · TaskRow",title:"任务分组与任务行",description:"分组标题吸顶,状态图标每组只出现一次;任务行不放状态图标,宽度全部留给标题。标题按需要你介入的程度分级:待审查加粗、进行中淡扫光、已结束降灰。悬停或键盘聚焦时元信息收起;侧栏窄于 22rem 时项目标签自动隐藏。",canvas:"chrome",dos:["普通优先级(P2)不显示:只有偏离常态才值得占位","标题完整内容放在 title 里"],donts:["在任务行行首再放状态图标——状态由分组标题表达","在任务行里加第三种元信息——放进详情页"],children:[e.jsx("div",{className:"@container max-h-[300px] max-w-[400px] overflow-y-auto scroll-pt-8 scrollbar-app-thin",children:s.filter(a=>a.tasks.length>0).map(a=>e.jsx(ro,{status:a.status,count:a.tasks.length,defaultOpen:a.status!==ct.Cancelled,children:a.tasks.map(o=>e.jsx(so,{title:o.title,status:o.status,priority:o.priority,project:o.project,updatedAt:o.updatedAt,now:Z,active:t===o.id,onClick:()=>n(o.id)},o.id))},a.status))}),e.jsx(Q,{className:"mt-3",children:"列表限高 300px,滚动看分组标题吸顶。"})]}),e.jsx(k,{name:"Task header",title:"任务详情头",description:"内容岛顶部:标题一行,状态与元信息一行,操作靠右。主操作只有一个。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("h3",{className:"min-w-0 text-base font-semibold leading-6 text-foreground",children:r.title}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsx(he,{size:"sm",label:"打开终端",children:e.jsx(tn,{})}),e.jsx(he,{size:"sm",label:"更多操作",children:e.jsx(Co,{})}),e.jsxs(F,{size:"sm",variant:"primary",children:[e.jsx(Fr,{}),"合并"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs text-muted-foreground",children:[e.jsx(Gn,{status:r.status}),e.jsx(lt,{priority:r.priority,showLabel:!0}),e.jsx(jt,{name:r.project.name,color:r.project.color,shorten:!1}),e.jsx(En,{name:"feat/sidebar-compact-rows",className:"max-w-[180px]"}),e.jsx(Ce,{agentType:q.CLAUDE_CODE,size:"sm"}),e.jsx(xt,{additions:r.additions,deletions:r.deletions,bar:!0}),e.jsx(Me,{value:r.updatedAt,now:Z,className:"text-xs"})]})]})}),e.jsx(k,{name:"TaskStatus",title:"任务状态",description:"五种状态,lucide 线性图标 + 文字成对出现,与侧栏菜单同一套笔触;图标不加动画——「正在运行」由任务标题的淡扫光表达。",children:e.jsx("div",{className:"flex flex-col gap-2.5",children:ja.map(a=>e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:"w-24",children:e.jsx(Gn,{status:a})}),e.jsx($t,{children:a})]},a))})}),e.jsxs(k,{name:"Meta",title:"元信息原子",description:"任务行、详情头、表格共用的小部件:都很紧凑,都能截断,完整内容在悬停提示里。",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(V,{label:"优先级",children:[e.jsx(lt,{priority:_e.URGENT}),e.jsx(lt,{priority:_e.HIGH}),e.jsx(lt,{priority:_e.NORMAL}),e.jsx(lt,{priority:_e.LOW}),e.jsx(lt,{priority:_e.URGENT,showLabel:!0})]}),e.jsx(V,{label:"项目",children:fe.map(a=>e.jsx(jt,{name:a.name,color:a.color},a.name))}),e.jsxs(V,{label:"分支",children:[e.jsx(En,{name:"main"}),e.jsx(En,{name:"feat/design-system-component-library",className:"max-w-[200px]"})]}),e.jsxs(V,{label:"改动",children:[e.jsx(xt,{additions:412,deletions:187}),e.jsx(xt,{additions:58,deletions:0,bar:!0}),e.jsx(xt,{additions:0,deletions:0})]}),e.jsxs(V,{label:"时间",children:[e.jsx(Me,{value:Z-2e4,now:Z,className:"text-xs"}),e.jsx(Me,{value:Z-12*6e4,now:Z,className:"text-xs"}),e.jsx(Me,{value:Z-5*36e5,now:Z,className:"text-xs"}),e.jsx(Me,{value:Z-3*864e5,now:Z,className:"text-xs"}),e.jsx(Me,{value:Z-40*864e5,now:Z,className:"text-xs"})]}),e.jsxs(V,{label:"计数",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:["待审查",e.jsx(zn,{count:3,tone:"warning"})]}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:["已完成",e.jsx(zn,{count:128})]})]})]}),e.jsx(Q,{className:"mt-3",children:"相对时间每 30 秒刷新一次(共享时钟),一周以上显示日期。"})]})]})}const Pj=Object.entries(hg).filter(([t,n])=>/^[A-Z][a-z]/.test(t)&&(typeof n=="function"||typeof n=="object")).length,Dj=Object.keys(Es).length,Oj=[{label:"主色",value:"Charcoal",note:"#191F25 · 主按钮、选中、图表主系列"},{label:"正文",value:"14 / 20",note:"最小 10px · 字重 400 / 500 / 600"},{label:"行高",value:"32px",note:"侧栏行、默认按钮、工具栏"},{label:"圆角",value:"8 · 10 · 14",note:"行 · 浮层与输入框 · 内容岛"}],$j=`import { Badge, Button } from '@/design-system'
14
+
15
+ <Button variant="primary">创建任务</Button>
16
+ <Badge tone="warning" variant="dot">待审查</Badge>`;function Lj(){return e.jsxs("header",{className:"flex flex-col gap-8 border-b border-border/60 pb-12",children:[e.jsxs("div",{className:"grid gap-8 xl:grid-cols-[minmax(0,1fr)_420px] xl:items-end",children:[e.jsxs("div",{className:"animate-[fadeInUp_0.5s_cubic-bezier(0.16,1,0.3,1)]",children:[e.jsx("div",{className:"font-mono text-[11px] uppercase tracking-[0.08em] text-muted-foreground",children:"Agent Tower Design System · v1.0"}),e.jsx("h1",{className:"mt-3 text-[26px] font-medium leading-[34px] tracking-tight text-foreground",children:"设计系统"}),e.jsx("p",{className:"mt-2 max-w-2xl text-[15px] leading-relaxed text-muted-foreground",children:"从主页提炼的一套界面语言:浅灰外框里放一座白色内容岛,Charcoal 墨色做主角,颜色只留给状态与项目身份。 这里是全部令牌、组件和展示组件的样张,每张都写了什么时候用、什么时候不用。"}),e.jsxs("p",{className:"mt-4 text-xs text-muted-foreground",children:[e.jsx("span",{className:"tabular-nums text-foreground/80",children:Pj})," 个组件 ·"," ",e.jsx("span",{className:"tabular-nums text-foreground/80",children:Dj})," 个语义图标 ·"," ",e.jsx("span",{className:"tabular-nums text-foreground/80",children:ht.length})," 个章节"]})]}),e.jsx(Or,{title:"使用",code:$j})]}),e.jsx("dl",{className:"grid grid-cols-2 gap-px overflow-hidden rounded-xl border border-border/70 bg-border/60 lg:grid-cols-4",children:Oj.map(t=>e.jsxs("div",{className:"bg-background p-4",children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:t.label}),e.jsx("dd",{className:"mt-1 text-[17px] font-semibold tracking-tight text-foreground",children:t.value}),e.jsx("dd",{className:"mt-0.5 text-[11px] text-muted-foreground",children:t.note})]},t.label))})]})}function iv(){const t=c.useRef(null),[n,s]=c.useState(ht[0].id),r=Lr();c.useEffect(()=>{const o=t.current;if(!o)return;const i=new Set,l=new IntersectionObserver(m=>{for(const p of m)p.isIntersecting?i.add(p.target.id):i.delete(p.target.id);for(let p=ht.length-1;p>=0;p--)if(i.has(ht[p].id)){s(ht[p].id);break}},{root:o,rootMargin:"0px 0px -65% 0px"});o.querySelectorAll("[data-ds-section]").forEach(m=>l.observe(m));const u=decodeURIComponent(window.location.hash.slice(1)),x=u?document.getElementById(u):null,d=x?requestAnimationFrame(()=>x.scrollIntoView({block:"start"})):0;return()=>{l.disconnect(),cancelAnimationFrame(d)}},[]);const a=o=>{const i=document.getElementById(o);i&&(i.scrollIntoView({behavior:r?"auto":"smooth",block:"start"}),window.history.replaceState(null,"",`#${o}`),s(o))};return e.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-sidebar text-sm",children:[e.jsxs("header",{className:"z-20 flex h-12 shrink-0 items-center justify-between gap-3 px-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(Us,{to:"/","aria-label":"Agent Tower 首页",className:"shrink-0 rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:e.jsx(gu,{})}),e.jsx("span",{"aria-hidden":"true",className:"select-none text-muted-foreground/40",children:"/"}),e.jsx("span",{className:"truncate font-medium text-foreground/90",children:"设计系统"}),e.jsx(oe,{size:"sm",variant:"outline",className:"tabular-nums",children:"v1.0"})]}),e.jsx(F,{asChild:!0,size:"sm",variant:"ghost",children:e.jsxs(Us,{to:"/",children:[e.jsx(Ga,{}),"返回工作台"]})})]}),e.jsxs("div",{className:"flex min-h-0 flex-1",children:[e.jsx("nav",{"aria-label":"设计系统目录",className:"hidden w-60 shrink-0 overflow-y-auto px-2 pb-4 scrollbar-app-thin lg:block",children:Jd.map(o=>e.jsx(Fn,{title:o.title,count:o.sections.length,children:o.sections.map(i=>e.jsx(Ke,{label:i.title,meta:e.jsx("span",{className:"font-mono",children:eu(i.id)}),active:n===i.id,"aria-current":n===i.id?"location":void 0,onClick:()=>a(i.id)},i.id))},o.title))}),e.jsx("main",{ref:t,className:"relative mb-2 mr-2 min-w-0 flex-1 overflow-y-auto rounded-xl border border-border/50 bg-background scrollbar-app-thin max-lg:ml-2",children:e.jsxs("div",{className:"mx-auto max-w-[1280px] px-6 py-10 sm:px-10",children:[e.jsx(Lj,{}),e.jsxs("div",{className:"mt-12 flex flex-col gap-16",children:[e.jsx(Fs,{index:"I",title:"基础",description:"颜色、文字、间距、图标与动效:所有组件都从这里取值。"}),e.jsx(Og,{}),e.jsx(Bg,{}),e.jsx(Vg,{}),e.jsx(Yg,{}),e.jsx(Zg,{}),e.jsx(Qg,{}),e.jsx(oj,{}),e.jsx(Fs,{index:"II",title:"组件",description:"状态、操作、输入、浮层、导航,以及 Agent Tower 专属的业务组件。"}),e.jsx(Pg,{}),e.jsx(Dg,{}),e.jsx(dj,{}),e.jsx(mj,{}),e.jsx(Ij,{}),e.jsx(Aj,{}),e.jsx(Fs,{index:"III",title:"展示组件",description:"数字、目标、趋势、构成、清单、表格、排期、人与内容——同一套「实与虚、一种颜色」的画法。"}),e.jsx(kj,{}),e.jsx(Tj,{}),e.jsx(Rj,{}),e.jsx(Ej,{}),e.jsx(Tg,{}),e.jsx(Ig,{}),e.jsx(fj,{}),e.jsx(vj,{}),e.jsx(bj,{}),e.jsx(yj,{})]}),e.jsxs("footer",{className:"mt-20 border-t border-border/60 pt-6 text-xs text-muted-foreground",children:["组件源码在 ",e.jsx("code",{className:"font-mono",children:"packages/web/src/design-system"}),";新增组件先在这里加样张,再进组件库。"]})]})})]})]})}export{iv as DesignSystemPage};