@puddle-code/cli 0.3.2 → 0.3.3

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 (212) hide show
  1. package/CHANGELOG.md +5 -4
  2. package/dist/host-control.mjs +11 -4
  3. package/dist/index.js +134 -29
  4. package/dist/public/assets/App-CkunCEjY.js +2 -0
  5. package/dist/public/assets/Dashboard-3XQN7EWB.js +1 -0
  6. package/dist/public/assets/EditorTabClose-CCYbaxcQ.js +1 -0
  7. package/dist/public/assets/FindWidget-BsFwo-Vf.js +1 -0
  8. package/dist/public/assets/LazyTerminal-CRonN-zb.js +2 -0
  9. package/dist/public/assets/{ModelRefcount-Dkp1avzM.js → ModelRefcount-BdmA-Mgb.js} +1 -1
  10. package/dist/public/assets/NewProjectDialog-Bsp8NGgY.js +1 -0
  11. package/dist/public/assets/PaneEditorBody-MSWyifa9.js +299 -0
  12. package/dist/public/assets/PdfViewer-C3kK31fw.js +2 -0
  13. package/dist/public/assets/SettingsDialog-CGT3gjKB.js +8 -0
  14. package/dist/public/assets/Terminal-_KJe85Cp.js +66 -0
  15. package/dist/public/assets/Workspace-ZdFFHXHa.js +20 -0
  16. package/dist/public/assets/abnfDiagram-VCTEODGH-CIbaiPRK.js +1 -0
  17. package/dist/public/assets/architecture-7GRP2DOG-C37y6gLW.js +1 -0
  18. package/dist/public/assets/architectureDiagram-5GKGNRK7-OE8n13hC.js +36 -0
  19. package/dist/public/assets/auth-C3Hg0pRq.js +73 -0
  20. package/dist/public/assets/{blockDiagram-I7D4REHJ-NHlOsaCN.js → blockDiagram-I7D4REHJ-TUFuv4qI.js} +1 -1
  21. package/dist/public/assets/buffer-store-De6oYRzb.js +16 -0
  22. package/dist/public/assets/button-DkCgQgIz.js +1 -0
  23. package/dist/public/assets/{c4Diagram-7LVT6UL2-ZLfrwKT4.js → c4Diagram-7LVT6UL2-Cwvhq15S.js} +1 -1
  24. package/dist/public/assets/channel-Bl1m0NKH.js +1 -0
  25. package/dist/public/assets/chunk-2E4U76K2-3abpRZU5.js +2 -0
  26. package/dist/public/assets/chunk-2ZTRR5NV-NvRGlFrK.js +2 -0
  27. package/dist/public/assets/chunk-3Z5EZCMW-DiR4QWP9.js +1 -0
  28. package/dist/public/assets/{chunk-4HAMMTFA-Brp_wxZT.js → chunk-4HAMMTFA-eolw8o4c.js} +1 -1
  29. package/dist/public/assets/chunk-5V3GS4D5-C1iY134n.js +1 -0
  30. package/dist/public/assets/chunk-6AZGARVD-_0gi5QUW.js +1 -0
  31. package/dist/public/assets/chunk-6EIED4P4-BxkNo1Kd.js +1 -0
  32. package/dist/public/assets/chunk-6K3QC6MW-3E45BuBF.js +1 -0
  33. package/dist/public/assets/chunk-6TQVIW2G-CakkaKNk.js +1 -0
  34. package/dist/public/assets/chunk-747NJXEK-pfB9pTl1.js +2 -0
  35. package/dist/public/assets/{chunk-75Z2AOVW-9vLeKuoB.js → chunk-75Z2AOVW-CYC6lmPG.js} +1 -1
  36. package/dist/public/assets/{chunk-CLGD4ZFX-B8Oa13vy.js → chunk-CLGD4ZFX-85mvsF4F.js} +1 -1
  37. package/dist/public/assets/chunk-DU6HZSFF-1ZoT19aa.js +125 -0
  38. package/dist/public/assets/{chunk-F27PBJKO-I29_mrbz.js → chunk-F27PBJKO-DM71futS.js} +1 -1
  39. package/dist/public/assets/{chunk-GMAD6QVW-ZzqGXNRY.js → chunk-GMAD6QVW-BzDEhlK8.js} +1 -1
  40. package/dist/public/assets/{chunk-GVQU2GXP-DiJctosx.js → chunk-GVQU2GXP-CZrUjjq3.js} +1 -1
  41. package/dist/public/assets/chunk-I5DQTOEV-Dcwirj_w.js +1 -0
  42. package/dist/public/assets/chunk-ICYGCRZG-BJAGKQA9.js +1 -0
  43. package/dist/public/assets/chunk-IH6LHLGP-BN2I9ljI.js +1 -0
  44. package/dist/public/assets/{chunk-IMKFNOWR-yuPnJltA.js → chunk-IMKFNOWR-CLsPi8Op.js} +1 -1
  45. package/dist/public/assets/chunk-KI3K4JFJ-v5_17D28.js +1 -0
  46. package/dist/public/assets/{chunk-L3NEJ4N5-DB3LOw2c.js → chunk-L3NEJ4N5-BW3s5_r9.js} +1 -1
  47. package/dist/public/assets/{chunk-OSK3NFVY-ygO9ccvX.js → chunk-OSK3NFVY-Cs_K17E_.js} +1 -1
  48. package/dist/public/assets/chunk-OUJLGHUK-FHDQe81Z.js +2 -0
  49. package/dist/public/assets/{chunk-P2QGCYS3-CaO30dnF.js → chunk-P2QGCYS3-C5-f0Lvg.js} +1 -1
  50. package/dist/public/assets/{chunk-POPQ4Y6H-BS_wlBQ7.js → chunk-POPQ4Y6H-gkafJx1Z.js} +1 -1
  51. package/dist/public/assets/{chunk-PWAF6VOD-BYtVJDwT.js → chunk-PWAF6VOD-CTSTb7zN.js} +1 -1
  52. package/dist/public/assets/{chunk-SHT3W25Y-DbWwFCez.js → chunk-SHT3W25Y-Cg6sVFNA.js} +1 -1
  53. package/dist/public/assets/{chunk-SVP7TREG-DLDU3lFF.js → chunk-SVP7TREG-DRUnItYx.js} +1 -1
  54. package/dist/public/assets/{chunk-TICWLB2K-Bo_jKuAY.js → chunk-TICWLB2K-HtG8ibWH.js} +1 -1
  55. package/dist/public/assets/chunk-TLUHSLCS-CcE5HWjm.js +2 -0
  56. package/dist/public/assets/chunk-UY3FDG6J-DHD-4eXF.js +1 -0
  57. package/dist/public/assets/chunk-XHIXRSVI-DRL0dwtI.js +1 -0
  58. package/dist/public/assets/classDiagram-ZZMXUADV-AgT8hWlv.js +1 -0
  59. package/dist/public/assets/classDiagram-v2-VYDZK3BY-AgT8hWlv.js +1 -0
  60. package/dist/public/assets/client-settings-CwqpIric.js +1 -0
  61. package/dist/public/assets/context-menu-0Tb8cG9E.js +1 -0
  62. package/dist/public/assets/copy-CKvSfzPk.js +1 -0
  63. package/dist/public/assets/cssMode-CSjHtANE.js +1 -0
  64. package/dist/public/assets/cynefin-OW5HDTMX-Dy2ZNO0g.js +1 -0
  65. package/dist/public/assets/cynefinDiagram-5FMLGOSQ-C2miE5p0.js +62 -0
  66. package/dist/public/assets/{dagre-GXQ25YYZ-DJ40uVpF.js → dagre-GXQ25YYZ-BjnR_o63.js} +1 -1
  67. package/dist/public/assets/{diagram-S7CK7UJ4-CakLFIEW.js → diagram-S7CK7UJ4-CBYedG6v.js} +3 -3
  68. package/dist/public/assets/diagram-UQ7AKVKN-CUL346-t.js +41 -0
  69. package/dist/public/assets/diagram-VSXAHHWV-1DKb_UJ5.js +3 -0
  70. package/dist/public/assets/{diagram-VX7I27RA-VJip2Tpi.js → diagram-VX7I27RA-DYP31PbY.js} +2 -2
  71. package/dist/public/assets/{diagram-Z3DM3KII-CPQuWy39.js → diagram-Z3DM3KII-C-mC8cmq.js} +1 -1
  72. package/dist/public/assets/dialog-UpZ_vNTE.js +41 -0
  73. package/dist/public/assets/disclosure-D7vpyXdR.js +1 -0
  74. package/dist/public/assets/dist-C2WZA469.js +1 -0
  75. package/dist/public/assets/dist-v3Pwgb3Q.js +1 -0
  76. package/dist/public/assets/ebnfDiagram-PWID7BFC-CnSa44Tb.js +1 -0
  77. package/dist/public/assets/{erDiagram-RLTQ6QDP-DqwnnH7t.js → erDiagram-RLTQ6QDP-ZmDlrO9k.js} +1 -1
  78. package/dist/public/assets/{errors-BkbAF9Bu.js → errors-BH_S68Hd.js} +1 -1
  79. package/dist/public/assets/eventmodeling-NTZA5JFV-uFnlWNGc.js +1 -0
  80. package/dist/public/assets/flowDiagram-HODETNUW-CW47qpBT.js +1 -0
  81. package/dist/public/assets/{ganttDiagram-EL5Y4UJY-BvWbPqg4.js → ganttDiagram-EL5Y4UJY-raM_gefY.js} +1 -1
  82. package/dist/public/assets/gitGraph-4MIJSDKK-1PxNX92k.js +1 -0
  83. package/dist/public/assets/gitGraphDiagram-WWUBYQGX-DnLrgk4s.js +106 -0
  84. package/dist/public/assets/htmlMode-CIHMS93l.js +1 -0
  85. package/dist/public/assets/index-xDhpMZgv.js +10 -0
  86. package/dist/public/assets/info-A6RAGUB7-BZV44TW1.js +1 -0
  87. package/dist/public/assets/infoDiagram-27XIBGKW-eCv-Vsx8.js +2 -0
  88. package/dist/public/assets/{ishikawaDiagram-5VMMS53U-Bq13tOFJ.js → ishikawaDiagram-5VMMS53U-DCFnvrdr.js} +1 -1
  89. package/dist/public/assets/{journeyDiagram-3NMN7TZE-7GJvjukT.js → journeyDiagram-3NMN7TZE-6o4KvbhJ.js} +1 -1
  90. package/dist/public/assets/{jsonMode-C6jAdn8r.js → jsonMode-BijgXT6I.js} +1 -1
  91. package/dist/public/assets/jsx-runtime-ffCh33zF.js +1 -0
  92. package/dist/public/assets/{kanban-definition-UXKFOSKX-BIFvSwV9.js → kanban-definition-UXKFOSKX-CQKuhkFV.js} +1 -1
  93. package/dist/public/assets/{line-BjlS8UJs.js → line-D4r_bmlv.js} +1 -1
  94. package/dist/public/assets/markdown-mermaid-D0nzztEz.js +2 -0
  95. package/dist/public/assets/{math-BNNuKpUP.js → math-CSw6sgCC.js} +2 -2
  96. package/dist/public/assets/math-delimiters-BCnTi7Ii.js +1 -0
  97. package/dist/public/assets/media-refresh-store-Ddvr6wz1.js +1 -0
  98. package/dist/public/assets/mermaid-parser.core-CICMKhjq.js +4 -0
  99. package/dist/public/assets/mermaid.core-D2QzpYEE.js +11 -0
  100. package/dist/public/assets/{mindmap-definition-YA3MSWOX-Cy4SIHHe.js → mindmap-definition-YA3MSWOX-DAB8mHOv.js} +1 -1
  101. package/dist/public/assets/monaco.contribution-C0TYpF88.js +2 -0
  102. package/dist/public/assets/notification-delivery-CDu_5PS7.js +1 -0
  103. package/dist/public/assets/packet-AYTQ26CC-Cw5JteoC.js +1 -0
  104. package/dist/public/assets/{pdf-Cnp8bCq1.js → pdf-EQHMWEbX.js} +1 -1
  105. package/dist/public/assets/pegDiagram-XKGWAZYB-BE_LYTdh.js +1 -0
  106. package/dist/public/assets/pie-WAS4IAKB-CnPKaBaN.js +1 -0
  107. package/dist/public/assets/pieDiagram-E7YTZNPT-BRffiJ1a.js +39 -0
  108. package/dist/public/assets/preload-helper-Czpn1I53.js +1 -0
  109. package/dist/public/assets/project-abbrev-Br6sQqPh.js +1 -0
  110. package/dist/public/assets/protocol-support-CLMCHX8i.js +1 -0
  111. package/dist/public/assets/{quadrantDiagram-AXDQQJYC-2BigfRRK.js → quadrantDiagram-AXDQQJYC-DYWp1Jjq.js} +1 -1
  112. package/dist/public/assets/radar-RG4KPBEZ-Dqx79rlE.js +1 -0
  113. package/dist/public/assets/railroad-74A4TZTK-BkDQqaz7.js +1 -0
  114. package/dist/public/assets/railroad-abnf-HS5TGJTU-kgqWL-Ba.js +1 -0
  115. package/dist/public/assets/railroad-ebnf-LZEXJU2U-GspfOzjs.js +1 -0
  116. package/dist/public/assets/railroad-peg-WCYAUIDC-qO23KZap.js +1 -0
  117. package/dist/public/assets/railroadDiagram-O6MQD6OU-wuPYUWJ2.js +1 -0
  118. package/dist/public/assets/{requirementDiagram-BXWQKSXE-BfBBVeo_.js → requirementDiagram-BXWQKSXE-BtGNZ92J.js} +1 -1
  119. package/dist/public/assets/{sankeyDiagram-P5KCCOFB-BHy22mhl.js → sankeyDiagram-P5KCCOFB-XgIIrsbe.js} +1 -1
  120. package/dist/public/assets/{scroll-restoration-rhyw8Ck0.js → scroll-restoration-hNqYmCAE.js} +1 -1
  121. package/dist/public/assets/selection-actions-Bh9Fkkqv.js +1 -0
  122. package/dist/public/assets/{sequenceDiagram-WJ2MYXX4-Dhgnxvrt.js → sequenceDiagram-WJ2MYXX4-CVIIE7ze.js} +1 -1
  123. package/dist/public/assets/{stateDiagram-D77RDMKH-CPWwa5Aj.js → stateDiagram-D77RDMKH-0kIDexDQ.js} +1 -1
  124. package/dist/public/assets/stateDiagram-v2-MP3YSRHH-DdU6a-zG.js +1 -0
  125. package/dist/public/assets/{swimlanes-42K2YHIH-DsqTASlp.js → swimlanes-42K2YHIH-BY2JV_Jb.js} +1 -1
  126. package/dist/public/assets/swimlanesDiagram-VR7AAH4N-BCiIa4tX.js +8 -0
  127. package/dist/public/assets/switch-SW6BMps1.js +1 -0
  128. package/dist/public/assets/{timeline-definition-24CTP7MA-B7hjD0KJ.js → timeline-definition-24CTP7MA-CPRUSXUS.js} +1 -1
  129. package/dist/public/assets/treeView-Q6P3EWNA-CiZNqz_z.js +1 -0
  130. package/dist/public/assets/treemap-WGGIJYW6-5hDYDC6e.js +1 -0
  131. package/dist/public/assets/{tsMode-CillYPbz.js → tsMode-B7q3gz7a.js} +1 -1
  132. package/dist/public/assets/use-ui-state-BiAROr3D.js +1 -0
  133. package/dist/public/assets/{vennDiagram-4TSXK5OY-BvS0i65j.js → vennDiagram-4TSXK5OY-CU1Q7iGV.js} +1 -1
  134. package/dist/public/assets/view-state-store-C6OmciCC.js +1 -0
  135. package/dist/public/assets/wardley-WFR3VGLG-CWb_ROLo.js +1 -0
  136. package/dist/public/assets/{wardleyDiagram-VM6X3IG4-CxconmGB.js → wardleyDiagram-VM6X3IG4-B2Pn7CDF.js} +3 -3
  137. package/dist/public/assets/whole-word-2m2pmAFT.js +1 -0
  138. package/dist/public/assets/workers-Ck67TJT4.js +1 -0
  139. package/dist/public/assets/ws-DNNH0sEH.js +1 -0
  140. package/dist/public/assets/{xychartDiagram-S5SC5T6Z-DSJMW0r7.js → xychartDiagram-S5SC5T6Z-xhQ4tT_S.js} +1 -1
  141. package/dist/public/index.html +5 -1
  142. package/dist/pudl.js +12 -5
  143. package/package.json +1 -1
  144. package/dist/public/assets/App-D_YTB3jH.js +0 -2
  145. package/dist/public/assets/Dashboard-Djw9nPV_.js +0 -1
  146. package/dist/public/assets/EditorTabClose-BCunnuEj.js +0 -1
  147. package/dist/public/assets/FindWidget-Ch-y_4eH.js +0 -1
  148. package/dist/public/assets/LazyTerminal-BN3rEDcD.js +0 -2
  149. package/dist/public/assets/NewProjectDialog-BK_gfWmL.js +0 -1
  150. package/dist/public/assets/PaneEditorBody-ClWRSuGV.js +0 -299
  151. package/dist/public/assets/PdfViewer-CbC1KAkq.js +0 -2
  152. package/dist/public/assets/SettingsDialog-DsmyHhQB.js +0 -8
  153. package/dist/public/assets/Terminal-CDnGRsgd.js +0 -66
  154. package/dist/public/assets/Workspace-CmclLFK3.js +0 -20
  155. package/dist/public/assets/abnfDiagram-VCTEODGH-Aa5uAdnV.js +0 -1
  156. package/dist/public/assets/architecture-7GRP2DOG-D3814jvH.js +0 -1
  157. package/dist/public/assets/architectureDiagram-5GKGNRK7-B0d475xG.js +0 -36
  158. package/dist/public/assets/buffer-store-BtRP7zZm.js +0 -16
  159. package/dist/public/assets/button-D3DTuFk3.js +0 -1
  160. package/dist/public/assets/channel-C6g1aWXR.js +0 -1
  161. package/dist/public/assets/chunk-2E4U76K2-DyVxGuz5.js +0 -2
  162. package/dist/public/assets/chunk-DU6HZSFF-ziCxw8j9.js +0 -125
  163. package/dist/public/assets/chunk-TLUHSLCS-BGFLoTUj.js +0 -2
  164. package/dist/public/assets/classDiagram-ZZMXUADV-BiQrxRCS.js +0 -1
  165. package/dist/public/assets/classDiagram-v2-VYDZK3BY-BiQrxRCS.js +0 -1
  166. package/dist/public/assets/context-menu-CwR-PGrS.js +0 -1
  167. package/dist/public/assets/copy-ZzKoF5dj.js +0 -1
  168. package/dist/public/assets/cssMode-DBrJeag9.js +0 -1
  169. package/dist/public/assets/cynefin-OW5HDTMX-DsXo9hDP.js +0 -1
  170. package/dist/public/assets/cynefinDiagram-5FMLGOSQ-CNr5UISm.js +0 -62
  171. package/dist/public/assets/diagram-UQ7AKVKN-Blm9jWHJ.js +0 -41
  172. package/dist/public/assets/diagram-VSXAHHWV-BzXCydDQ.js +0 -3
  173. package/dist/public/assets/dialog-BoaHxScl.js +0 -41
  174. package/dist/public/assets/disclosure-DNbP2Rp4.js +0 -1
  175. package/dist/public/assets/dist-CQZ_zg-s.js +0 -1
  176. package/dist/public/assets/dist-DUfD4S2p.js +0 -1
  177. package/dist/public/assets/ebnfDiagram-PWID7BFC-x8Hm-8FP.js +0 -1
  178. package/dist/public/assets/eventmodeling-NTZA5JFV-DE-zSV6F.js +0 -1
  179. package/dist/public/assets/flowDiagram-HODETNUW-Cn9XuALP.js +0 -1
  180. package/dist/public/assets/gitGraph-4MIJSDKK-DKeR8Wjx.js +0 -1
  181. package/dist/public/assets/gitGraphDiagram-WWUBYQGX-CPJ482wi.js +0 -106
  182. package/dist/public/assets/htmlMode-CKCaIwmL.js +0 -1
  183. package/dist/public/assets/index-CPKHBs7z.js +0 -82
  184. package/dist/public/assets/info-A6RAGUB7-CYKUxPau.js +0 -1
  185. package/dist/public/assets/infoDiagram-27XIBGKW-5qHuu76B.js +0 -2
  186. package/dist/public/assets/markdown-mermaid-B_y_6yBe.js +0 -2
  187. package/dist/public/assets/media-refresh-store-BnZNW8xS.js +0 -1
  188. package/dist/public/assets/mermaid-parser.core-BwJKOdFv.js +0 -7
  189. package/dist/public/assets/mermaid.core-Cii531li.js +0 -11
  190. package/dist/public/assets/notification-delivery-Cn-YcMec.js +0 -1
  191. package/dist/public/assets/packet-AYTQ26CC-y8aHtpCT.js +0 -1
  192. package/dist/public/assets/pegDiagram-XKGWAZYB-yIL7Oty_.js +0 -1
  193. package/dist/public/assets/pie-WAS4IAKB-DNZ4gYKN.js +0 -1
  194. package/dist/public/assets/pieDiagram-E7YTZNPT-CUwYqrWF.js +0 -39
  195. package/dist/public/assets/project-abbrev-B5CMO00I.js +0 -1
  196. package/dist/public/assets/protocol-support-hVrRUHAd.js +0 -1
  197. package/dist/public/assets/radar-RG4KPBEZ-DCE8-Z-G.js +0 -1
  198. package/dist/public/assets/railroad-74A4TZTK-BfnC2It7.js +0 -1
  199. package/dist/public/assets/railroad-abnf-HS5TGJTU-C8QChwRk.js +0 -1
  200. package/dist/public/assets/railroad-ebnf-LZEXJU2U-DN6nLE-f.js +0 -1
  201. package/dist/public/assets/railroad-peg-WCYAUIDC-emPIg_g-.js +0 -1
  202. package/dist/public/assets/railroadDiagram-O6MQD6OU-DpX2WbJ5.js +0 -1
  203. package/dist/public/assets/selection-actions-BDJnKwuj.js +0 -1
  204. package/dist/public/assets/stateDiagram-v2-MP3YSRHH-CmGYleZg.js +0 -1
  205. package/dist/public/assets/swimlanesDiagram-VR7AAH4N-CUahIPDv.js +0 -8
  206. package/dist/public/assets/switch-DGZtVofo.js +0 -1
  207. package/dist/public/assets/treeView-Q6P3EWNA-WU6eWUi6.js +0 -1
  208. package/dist/public/assets/treemap-WGGIJYW6-BNZcLwqI.js +0 -1
  209. package/dist/public/assets/use-ui-state-BZeOd2de.js +0 -1
  210. package/dist/public/assets/view-state-store-BEl9Q1Jm.js +0 -1
  211. package/dist/public/assets/wardley-WFR3VGLG-ChvHhLGz.js +0 -1
  212. package/dist/public/assets/ws-B6RLTvWI.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{g as r}from"./auth-C3Hg0pRq.js";import{a as i,b as a,i as o,o as s,s as c,t as l,x as u}from"./LazyTerminal-CRonN-zb.js";import{C as d,E as f,Et as p,gt as m,lt as h,pt as g,ut as _,xt as v}from"./protocol-support-CLMCHX8i.js";import{a as y,n as b,t as x}from"./project-abbrev-Br6sQqPh.js";import{a as S,i as C,n as w,o as T,t as E}from"./dialog-UpZ_vNTE.js";import{t as D}from"./button-DkCgQgIz.js";import{n as O}from"./x-CZCUod6A.js";import{A as k,M as A,c as j,j as M,k as N,n as P,r as F,t as I}from"./context-menu-0Tb8cG9E.js";import{r as L}from"./dist-C2WZA469.js";import{t as R}from"./NewProjectDialog-Bsp8NGgY.js";import{n as z}from"./errors-BH_S68Hd.js";import{t as B}from"./ws-DNNH0sEH.js";var V=e(t(),1),H=n(),U=!1;function W(){let[e,t]=(0,V.useState)(U),[n,i]=(0,V.useState)(null);(0,V.useEffect)(()=>{if(!e)return;let t=!1;return B.spawnShell(r).then(e=>{t||i(e)}),()=>{t=!0}},[e]);let a=()=>{U=!1,t(!1),i(null)};return{open:e,term:n,toggle:()=>{e?(n&&B.killShell(r,n),a()):(U=!0,t(!0))},onExit:a}}function G({term:e,onExit:t}){return(0,H.jsx)(`div`,{className:`h-72 shrink-0 pb-6`,children:(0,H.jsx)(`div`,{className:`mx-auto size-full max-w-4xl px-6`,children:e!==null&&(0,H.jsx)(l,{stream:`home`,term:e,onExit:t})})})}var K=`group block w-full rounded-lg bg-surface p-4 text-left transition-colors hover:bg-elevated`,q=[{status:`running`,colour:`bg-running`},{status:`waiting_input`,colour:`bg-waiting`},{status:`interrupted`,colour:`bg-interrupted`}];function J({project:e,repoPath:t,sessions:n}){let r=n.filter(e=>e.status!==`archived`);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`h2`,{className:`truncate pr-16 text-base font-semibold text-fg group-hover:text-accent`,children:e.name}),(0,H.jsx)(`p`,{className:`mt-1 truncate text-2xs text-fg-muted`,children:t??`…`}),(0,H.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-3 text-2xs text-fg-muted tabular-nums`,children:[(0,H.jsxs)(`span`,{children:[r.length,` session`,r.length===1?``:`s`]}),q.map(({status:e,colour:t})=>{let n=r.filter(t=>t.status===e).length;return n>0?(0,H.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(`span`,{className:`size-1.5 rounded-full ${t}`}),n,` `,e.replace(`_`,` `)]},e):null})]})]})}function Y({icon:e,label:t,onClick:n}){return(0,H.jsx)(`button`,{type:`button`,"aria-label":t,title:t,onClick:e=>{e.preventDefault(),e.stopPropagation(),n()},className:`flex items-center rounded-md p-1.5 text-fg-muted transition-colors hover:bg-ground hover:text-fg`,children:(0,H.jsx)(e,{className:`size-4`})})}function X({project:e,repoPath:t,draggable:n,dragging:r,onDragStart:i,onDragEnd:l,onDragOver:d}){let f=_(),m=p(e.id),[h,g]=(0,V.useState)(!1),[v,b]=(0,V.useState)(e.name),[x,k]=(0,V.useState)(u(e)),N=t=>f.mutate({id:e.id,archived:t},{onError:e=>z(e)}),L=()=>{b(e.name),k(u(e)),g(!0)},R=()=>{let t=v.trim(),n=a(x);if(!t){g(!1);return}let r={...t===e.name?{}:{name:t},...n&&n!==u(e)?{abbrev:n}:{}};if(Object.keys(r).length===0){g(!1);return}f.mutate({id:e.id,...r},{onSuccess:()=>g(!1),onError:e=>z(e)})};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(I,{children:[(0,H.jsx)(j,{asChild:!0,children:(0,H.jsxs)(`div`,{draggable:n,onDragStart:i,onDragEnd:l,onDragOver:d,className:O(`group relative transition-opacity`,r&&`opacity-50`),children:[(0,H.jsx)(y,{draggable:!1,to:`/project/${e.id}`,className:K,children:(0,H.jsx)(J,{project:e,repoPath:t,sessions:m.data??[]})}),(0,H.jsx)(`div`,{className:`absolute right-2 top-2 hidden gap-0.5 group-hover:flex has-[[data-state=open]]:flex pointer-coarse:flex`,children:e.archived?(0,H.jsx)(Y,{icon:A,label:`Reopen project`,onClick:()=>N(!1)}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{icon:o,label:`Edit project`,onClick:L}),(0,H.jsx)(Y,{icon:M,label:`Archive project`,onClick:()=>N(!0)})]})})]})}),(0,H.jsx)(P,{children:e.archived?(0,H.jsxs)(F,{onSelect:()=>N(!1),children:[(0,H.jsx)(A,{}),` Reopen`]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(F,{onSelect:L,children:[(0,H.jsx)(o,{}),` Edit`]}),(0,H.jsxs)(F,{onSelect:()=>N(!0),children:[(0,H.jsx)(M,{}),` Archive`]})]})})]}),(0,H.jsx)(E,{open:h,onOpenChange:g,children:(0,H.jsxs)(w,{children:[(0,H.jsx)(S,{children:(0,H.jsx)(T,{children:`Edit project`})}),(0,H.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),R()},children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsx)(s,{htmlFor:`project-name-${e.id}`,children:`Name`}),(0,H.jsx)(c,{id:`project-name-${e.id}`,value:v,onChange:e=>b(e.target.value),autoFocus:!0})]}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsx)(s,{htmlFor:`project-abbrev-${e.id}`,children:`Abbreviation`}),(0,H.jsx)(c,{id:`project-abbrev-${e.id}`,maxLength:5,value:x,onChange:e=>k(a(e.target.value)),className:`w-24 uppercase`}),(0,H.jsxs)(`p`,{className:`text-2xs text-fg-muted`,children:[`Up to `,5,` characters — the label on the collapsed sidebar rail.`]})]}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(s,{className:`text-fg-muted`,children:`Path`}),(0,H.jsx)(`p`,{className:`truncate text-2xs text-fg-muted`,children:t??`…`})]}),(0,H.jsxs)(C,{children:[(0,H.jsx)(D,{type:`button`,variant:`ghost`,onClick:()=>g(!1),children:`Cancel`}),(0,H.jsx)(D,{type:`submit`,disabled:!v.trim()||f.isPending,children:`Save`})]})]})]})})]})}function Z({icon:e,label:t,hint:n,onClick:r}){return(0,H.jsxs)(`button`,{type:`button`,onClick:r,className:`group flex flex-col rounded-lg bg-surface p-4 text-left transition-colors hover:bg-elevated`,children:[(0,H.jsxs)(`h2`,{className:`flex items-center gap-2 truncate text-base font-semibold text-fg group-hover:text-accent`,children:[(0,H.jsx)(e,{className:`size-4 shrink-0`}),t]}),(0,H.jsx)(`p`,{className:`mt-1 truncate text-2xs text-fg-muted`,children:n})]})}function Q(){let e=f(),t=m(e??void 0),n=v(),r=g(e??void 0),a=h(e??``),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(null),[u,p]=(0,V.useState)(!1),_=W(),y=d(`palette.toggle`),S=e=>n.data?.find(t=>t.id===e)?.path,C=t.data??[],w=r.data?.projectOrder??[],T=N(C.filter(e=>!e.archived),w),E=C.filter(e=>e.archived),D=(e,t)=>{e!==t&&a.mutate({projectOrder:k(T.map(e=>e.id),e,t)})};return(0,H.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,H.jsxs)(`div`,{className:`mx-auto max-w-4xl p-6`,children:[C.length===0&&(0,H.jsxs)(`div`,{className:`mb-8 mt-16 flex flex-col items-center gap-3 text-center`,children:[(0,H.jsx)(i,{className:`size-8 text-fg-muted`}),(0,H.jsxs)(`p`,{className:`text-sm text-fg-secondary`,children:[`No projects yet — open one below, or press `,y,`.`]})]}),(0,H.jsxs)(`div`,{className:`grid auto-rows-fr grid-cols-1 gap-3 sm:grid-cols-2`,children:[T.map(e=>(0,H.jsx)(X,{project:e,repoPath:S(e.repo_id),draggable:!0,dragging:c===e.id,onDragStart:()=>l(e.id),onDragEnd:()=>l(null),onDragOver:t=>{t.preventDefault(),c&&c!==e.id&&D(c,e.id)}},e.id)),(0,H.jsx)(Z,{icon:b,label:`Open project`,hint:`Point at a repository on this host`,onClick:()=>s(!0)}),(0,H.jsx)(Z,{icon:x,label:_.open?`Close terminal`:`Open terminal`,hint:_.open?`End the shell below`:`A shell at ~ for cloning repositories`,onClick:_.toggle})]}),E.length>0&&(0,H.jsxs)(`div`,{className:`mt-6`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>p(e=>!e),className:`flex items-center gap-1.5 px-1 py-1.5 text-2xs uppercase tracking-wide text-fg-muted transition-colors hover:text-fg`,children:[(0,H.jsx)(L,{className:O(`size-3 transition-transform`,u&&`rotate-90`)}),(0,H.jsx)(M,{className:`size-3`}),(0,H.jsx)(`span`,{children:`Archived`}),(0,H.jsx)(`span`,{className:`tabular-nums`,children:E.length})]}),u&&(0,H.jsx)(`div`,{className:`mt-2 grid grid-cols-1 gap-3 sm:grid-cols-2`,children:E.map(e=>(0,H.jsx)(X,{project:e,repoPath:S(e.repo_id),draggable:!1,dragging:!1,onDragStart:()=>{},onDragEnd:()=>{},onDragOver:()=>{}},e.id))})]})]})}),_.open&&(0,H.jsx)(G,{term:_.term,onExit:_.onExit}),e!==null&&(0,H.jsx)(R,{profileId:e,open:o,onOpenChange:s})]})}export{Q as Dashboard};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{a as r,i,n as a,o,r as s,t as c}from"./dialog-UpZ_vNTE.js";import{t as l}from"./button-DkCgQgIz.js";import{t as u}from"./x-CZCUod6A.js";import{t as d}from"./createLucideIcon-DyMAgLa3.js";import{t as f}from"./drafts-B_tChlzR.js";import{i as p,t as m,u as h}from"./buffer-store-De6oYRzb.js";import{t as g}from"./editor-sync-W1bamxAP.js";var _=d(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),v=e(t(),1),y=n();function b(e,t,n){let r=m(e,t,n);return(0,v.useSyncExternalStore)((0,v.useCallback)(e=>h(r,e),[r]),()=>p(r))}function x({session:e,path:t,kind:n,root:r}){return b(e,t,r)&&n!==`commit`?(0,y.jsx)(_,{"aria-hidden":!0,className:`size-2 shrink-0 fill-current text-fg-muted group-hover:hidden`}):null}function S({session:e,path:t,kind:n,root:d,label:p,onClose:m}){let h=b(e,t,d)&&n!==`commit`,[_,x]=(0,v.useState)(!1),S=()=>h?x(!0):m();return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`button`,{onClick:e=>{e.stopPropagation(),S()},className:`hidden size-4 items-center justify-center rounded-sm text-fg-muted transition-colors hover:text-fg group-hover:flex pointer-coarse:flex`,"aria-label":`Close ${p}`,children:(0,y.jsx)(u,{className:`size-3`})}),(0,y.jsx)(c,{open:_,onOpenChange:e=>!e&&x(!1),children:(0,y.jsxs)(a,{children:[(0,y.jsxs)(r,{children:[(0,y.jsxs)(o,{children:[`Discard changes to `,p,`?`]}),(0,y.jsx)(s,{children:`This file has unsaved changes. Closing the tab will discard them.`})]}),(0,y.jsxs)(i,{children:[(0,y.jsx)(l,{variant:`ghost`,onClick:()=>x(!1),children:`Keep editing`}),(0,y.jsx)(l,{variant:`danger`,onClick:()=>{f(e,t,d),g(e,t,d),x(!1),m()},children:`Discard`})]})]})})]})}export{x as EditorDirtyDot,S as EditorTabClose};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{n as r,t as i}from"./x-CZCUod6A.js";import{t as a}from"./createLucideIcon-DyMAgLa3.js";import{n as o,r as s,t as c}from"./whole-word-2m2pmAFT.js";import{t as l}from"./chevron-down--sjpQEHH.js";var u=a(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),d=/[.*+?^${}()|[\]\\]/g;function f(e,t){if(e.length===0)return null;try{let n=t.regex?e:e.replace(d,`\\$&`);return t.wholeWord&&(n=`\\b(?:${n})\\b`),new RegExp(n,t.caseSensitive?`g`:`gi`)}catch{return null}}function p(e,t){return e.length===0||f(e,t)!==null}function m(e,t,n,r=1e3){let i=f(t,n);if(t.length>0&&i===null)return{matches:[],invalid:!0,limited:!1};if(!i)return{matches:[],invalid:!1,limited:!1};let a=[],o;for(;(o=i.exec(e))!==null;){if(o[0].length===0){i.lastIndex++;continue}if(a.length===r)return{matches:a,invalid:!1,limited:!0};a.push({start:o.index,end:o.index+o[0].length})}return{matches:a,invalid:!1,limited:!1}}var h=e(t(),1),g={index:-1,count:0},_={caseSensitive:!1,wholeWord:!1,regex:!1},v=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform);function y(e,t=v){return e.key.toLowerCase()===`f`&&!e.altKey&&!e.shiftKey&&(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)}function b({shortcutEnabled:e,onFind:t,onClear:n,onCloseFocus:r}){let[i,a]=(0,h.useState)(!1),[o,s]=(0,h.useState)(0),[c,l]=(0,h.useState)(``),[u,d]=(0,h.useState)(_),[f,p]=(0,h.useState)(g),m=(0,h.useRef)({open:i,query:c,options:u});m.current={open:i,query:c,options:u};let v=(0,h.useRef)(t);v.current=t;let b=(0,h.useRef)(n);b.current=n;let x=(0,h.useRef)(r);x.current=r;let S=(0,h.useCallback)(e=>{let t=m.current;if(!t.open)return;let n=v.current(t.query,t.options,e);n&&p(n)},[]),C=(0,h.useCallback)(()=>{a(!0),s(e=>e+1)},[]),w=(0,h.useCallback)(()=>{a(!1),b.current(),x.current?.()},[]),T=(0,h.useCallback)(()=>S(`next`),[S]),E=(0,h.useCallback)(()=>S(`previous`),[S]),D=(0,h.useCallback)(()=>S(`reset`),[S]);return(0,h.useEffect)(()=>{i&&S(`reset`)},[i,c,u,S]),(0,h.useEffect)(()=>{if(!e)return;let t=e=>{y(e)&&(e.preventDefault(),e.stopPropagation(),C())};return window.addEventListener(`keydown`,t,!0),()=>window.removeEventListener(`keydown`,t,!0)},[e,C]),(0,h.useEffect)(()=>()=>{b.current()},[]),{open:i,focusKey:o,query:c,options:u,result:f,openFind:C,close:w,next:T,previous:E,refresh:D,setQuery:l,setOptions:d,setResult:p}}var x=n();function S({active:e,label:t,onClick:n,children:i}){return(0,x.jsx)(`button`,{type:`button`,"aria-label":t,"aria-pressed":e,title:t,onClick:n,className:r(`rounded-sm p-1 transition-colors`,e?`bg-surface text-accent`:`text-fg-muted hover:bg-surface hover:text-fg`),children:i})}function C({query:e,result:t}){return e.length===0?null:t.invalid?(0,x.jsx)(x.Fragment,{children:`Invalid expression`}):t.count===0?(0,x.jsx)(x.Fragment,{children:`No results`}):t.limited?(0,x.jsxs)(x.Fragment,{children:[t.count,`+ results`]}):t.index<0?(0,x.jsxs)(x.Fragment,{children:[t.count,` results`]}):(0,x.jsxs)(x.Fragment,{children:[t.index+1,` of `,t.count]})}function w({query:e,focusKey:t,options:n,result:r,onQueryChange:a,onOptionsChange:d,onNext:f,onPrevious:p,onClose:m}){let g=(0,h.useRef)(null);(0,h.useEffect)(()=>{g.current?.focus(),g.current?.select()},[t]);let _=r.count>0&&!r.invalid;return(0,x.jsxs)(`div`,{role:`search`,"aria-label":`Find in view`,className:`absolute right-2 top-0 z-30 flex h-10 w-[min(34rem,calc(100%-0.5rem))] items-center gap-1.5 rounded-b-md bg-surface px-1.5 shadow-lg`,onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),m();return}if(e.key===`Enter`){e.preventDefault(),e.stopPropagation(),e.shiftKey?p():f();return}y(e.nativeEvent)&&(e.preventDefault(),e.stopPropagation(),g.current?.select())},children:[(0,x.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center rounded-md bg-elevated pl-2 pr-0.5`,children:[(0,x.jsx)(`input`,{ref:g,value:e,onChange:e=>a(e.target.value),placeholder:`Find`,spellCheck:!1,autoComplete:`off`,"aria-label":`Find`,className:`h-7 min-w-0 flex-1 bg-transparent text-sm text-fg outline-none placeholder:text-fg-muted`}),(0,x.jsx)(S,{active:n.caseSensitive,label:`Match case`,onClick:()=>d({...n,caseSensitive:!n.caseSensitive}),children:(0,x.jsx)(s,{className:`size-3.5`})}),(0,x.jsx)(S,{active:n.wholeWord,label:`Match whole word`,onClick:()=>d({...n,wholeWord:!n.wholeWord}),children:(0,x.jsx)(c,{className:`size-3.5`})}),(0,x.jsx)(S,{active:n.regex,label:`Use regular expression`,onClick:()=>d({...n,regex:!n.regex}),children:(0,x.jsx)(o,{className:`size-3.5`})})]}),(0,x.jsx)(`div`,{className:`w-20 shrink-0 text-center text-xs text-fg-muted`,children:(0,x.jsx)(C,{query:e,result:r})}),(0,x.jsx)(`button`,{type:`button`,"aria-label":`Previous match`,title:`Previous match (Shift+Enter)`,disabled:!_,onClick:p,className:`rounded-sm p-1 text-fg-muted transition-colors hover:bg-elevated hover:text-fg disabled:cursor-default disabled:opacity-40`,children:(0,x.jsx)(u,{className:`size-4`})}),(0,x.jsx)(`button`,{type:`button`,"aria-label":`Next match`,title:`Next match (Enter)`,disabled:!_,onClick:f,className:`rounded-sm p-1 text-fg-muted transition-colors hover:bg-elevated hover:text-fg disabled:cursor-default disabled:opacity-40`,children:(0,x.jsx)(l,{className:`size-4`})}),(0,x.jsx)(`button`,{type:`button`,"aria-label":`Close find`,title:`Close (Escape)`,onClick:m,className:`rounded-sm p-1 text-fg-muted transition-colors hover:bg-elevated hover:text-fg`,children:(0,x.jsx)(i,{className:`size-4`})})]})}export{m as a,g as i,b as n,p as o,y as r,w as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Terminal-_KJe85Cp.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-CZI7_Jkm.js","assets/jsx-runtime-ffCh33zF.js","assets/auth-C3Hg0pRq.js","assets/client-settings-CwqpIric.js","assets/preload-helper-Czpn1I53.js","assets/index-xDhpMZgv.js","assets/index-CAvJOpdz.css","assets/dist-v3Pwgb3Q.js","assets/protocol-support-CLMCHX8i.js","assets/copy-CKvSfzPk.js","assets/createLucideIcon-DyMAgLa3.js","assets/x-CZCUod6A.js","assets/FindWidget-BsFwo-Vf.js","assets/whole-word-2m2pmAFT.js","assets/chevron-down--sjpQEHH.js","assets/selection-actions-Bh9Fkkqv.js","assets/button-DkCgQgIz.js","assets/ws-DNNH0sEH.js","assets/code-DRWf9a5s.js","assets/errors-BH_S68Hd.js","assets/math-delimiters-BCnTi7Ii.js","assets/Terminal-BrP-ENHg.css"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n,t as r}from"./jsx-runtime-ffCh33zF.js";import{t as i}from"./preload-helper-Czpn1I53.js";import{S as a,w as o,x as s,y as c}from"./dialog-UpZ_vNTE.js";import{a as l}from"./button-DkCgQgIz.js";import{n as u}from"./x-CZCUod6A.js";import{t as d}from"./createLucideIcon-DyMAgLa3.js";function f(e){return e.trim().slice(0,5).toUpperCase()}function p(e){return e.abbrev??f(e.name)}function m(e){return e.trim().toUpperCase().slice(0,5)}var h=e(t(),1),g=[`top`,`right`,`bottom`,`left`],_=Math.min,v=Math.max,y=Math.round,b=Math.floor,x=e=>({x:e,y:e}),S={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function C(e,t,n){return v(e,_(t,n))}function w(e,t){return typeof e==`function`?e(t):e}function T(e){return e.split(`-`)[0]}function E(e){return e.split(`-`)[1]}function D(e){return e===`x`?`y`:`x`}function O(e){return e===`y`?`height`:`width`}function k(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function A(e){return D(k(e))}function j(e,t,n){n===void 0&&(n=!1);let r=E(e),i=A(e),a=O(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=B(o)),[o,B(o)]}function M(e){let t=B(e);return[N(e),t,N(t)]}function N(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var P=[`left`,`right`],F=[`right`,`left`],I=[`top`,`bottom`],L=[`bottom`,`top`];function R(e,t,n){switch(e){case`top`:case`bottom`:return n?t?F:P:t?P:F;case`left`:case`right`:return t?I:L;default:return[]}}function z(e,t,n,r){let i=E(e),a=R(T(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(N)))),a}function B(e){let t=T(e);return S[t]+e.slice(t.length)}function ee(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function te(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ee(e)}function V(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ne(e,t,n){let{reference:r,floating:i}=e,a=k(t),o=A(t),s=O(o),c=T(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=E(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function re(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=w(t,e),p=te(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=V(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=V(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ie=50,ae=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:re},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ne(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ie&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ne(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},oe=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=w(e,t)||{};if(l==null)return{};let d=te(u),f={x:n,y:r},p=A(i),m=O(p),h=await o.getDimensions(l),g=p===`y`,v=g?`top`:`left`,y=g?`bottom`:`right`,b=g?`clientHeight`:`clientWidth`,x=a.reference[m]+a.reference[p]-f[p]-a.floating[m],S=f[p]-a.reference[p],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),D=T?T[b]:0;(!D||!await(o.isElement==null?void 0:o.isElement(T)))&&(D=s.floating[b]||a.floating[m]);let k=x/2-S/2,j=D/2-h[m]/2-1,M=_(d[v],j),N=_(d[y],j),P=D-h[m]-N,F=D/2-h[m]/2+k,I=C(M,F,P),L=!c.arrow&&E(i)!=null&&F!==I&&a.reference[m]/2-(F<M?M:N)-h[m]/2<0,R=L?F<M?F-M:F-P:0;return{[p]:f[p]+R,data:{[p]:I,centerOffset:F-I-R,...L&&{alignmentOffset:R}},reset:L}}}),se=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=w(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=T(r),_=k(o),v=T(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[B(o)]:M(o)),x=p!==`none`;!d&&x&&b.push(...z(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),E=[],D=i.flip?.overflows||[];if(l&&E.push(C[g]),u){let e=j(r,a,y);E.push(C[e[0]],C[e[1]])}if(D=[...D,{placement:r,overflows:E}],!E.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==k(t))||D.every(e=>k(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:D},reset:{placement:t}};let n=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=D.filter(e=>{if(x){let t=k(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ce(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function le(e){return g.some(t=>e[t]>=0)}var ue=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=w(e,t);switch(i){case`referenceHidden`:{let e=ce(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:le(e)}}}case`escaped`:{let e=ce(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:le(e)}}}default:return{}}}}},de=new Set([`left`,`top`]);async function fe(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=T(n),s=E(n),c=k(n)===`y`,l=de.has(o)?-1:1,u=a&&c?-1:1,d=w(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var pe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await fe(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},me=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=w(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=k(i),p=D(f),m=u[p],h=u[f],g=(e,t)=>C(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},he=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=w(e,t),u={x:n,y:r},d=k(i),f=D(d),p=u[f],m=u[d],h=w(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=de.has(T(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ge=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=w(e,t),c=await i.detectOverflow(t,s),l=T(n),u=E(n),d=k(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,y=f-c.left-c.right,b=_(p-c[m],g),x=_(f-c[h],y),S=t.middlewareData.shift,C=!S,D=b,O=x;S!=null&&S.enabled.x&&(O=y),S!=null&&S.enabled.y&&(D=g),C&&!u&&(d?O=f-2*v(c.left,c.right):D=p-2*v(c.top,c.bottom)),await o({...t,availableWidth:O,availableHeight:D});let A=await i.getDimensions(a.floating);return f!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function _e(){return typeof window<`u`}function H(e){return ve(e)?(e.nodeName||``).toLowerCase():`#document`}function U(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function W(e){return((ve(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ve(e){return _e()?e instanceof Node||e instanceof U(e).Node:!1}function G(e){return _e()?e instanceof Element||e instanceof U(e).Element:!1}function K(e){return _e()?e instanceof HTMLElement||e instanceof U(e).HTMLElement:!1}function ye(e){return!_e()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof U(e).ShadowRoot}function be(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function xe(e){return/^(table|td|th)$/.test(H(e))}function Se(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ce=/transform|translate|scale|rotate|perspective|filter/,we=/paint|layout|strict|content/,q=e=>!!e&&e!==`none`,Te;function Ee(e){let t=G(e)?Y(e):e;return q(t.transform)||q(t.translate)||q(t.scale)||q(t.rotate)||q(t.perspective)||!Oe()&&(q(t.backdropFilter)||q(t.filter))||Ce.test(t.willChange||``)||we.test(t.contain||``)}function De(e){let t=X(e);for(;K(t)&&!J(t);){if(Ee(t))return t;if(Se(t))return null;t=X(t)}return null}function Oe(){return Te??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Te}function J(e){return/^(html|body|#document)$/.test(H(e))}function Y(e){return U(e).getComputedStyle(e)}function ke(e){return G(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if(H(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ye(e)&&e.host||W(e);return ye(t)?t.host:t}function Ae(e){let t=X(e);return J(t)?(e.ownerDocument||e).body:K(t)&&be(t)?t:Ae(t)}function je(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ae(e),i=r===e.ownerDocument?.body,a=U(r);if(i){let e=Me(a);return t.concat(a,a.visualViewport||[],be(r)?r:[],e&&n?je(e):[])}else return t.concat(r,je(r,[],n))}function Me(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ne(e){let t=Y(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=K(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=y(n)!==a||y(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Pe(e){return G(e)?e:e.contextElement}function Z(e){let t=Pe(e);if(!K(t))return x(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ne(t),o=(a?y(n.width):n.width)/r,s=(a?y(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Fe=x(0);function Ie(e){let t=U(e);return!Oe()||!t.visualViewport?Fe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Le(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===U(e)}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Pe(e),o=x(1);t&&(r?G(r)&&(o=Z(r)):o=Z(e));let s=Le(a,n,r)?Ie(a):x(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=U(a),t=G(r)?U(r):r,n=e,i=Me(n);for(;i&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=Y(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=U(i),i=Me(n)}}return V({width:u,height:d,x:c,y:l})}function Re(e,t){let n=ke(e).scrollLeft;return t?t.left+n:Q(W(e)).left+n}function ze(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Re(e,n),y:n.top+t.scrollTop}}function Be(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=W(r),s=t?Se(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=x(1),u=x(0),d=K(r);if((d||!a)&&((H(r)!==`body`||be(o))&&(c=ke(r)),d)){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ze(o,c):x(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ve(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function He(e){let t=ke(e),n=e.ownerDocument.body,r=v(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=v(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Re(e),o=-t.scrollTop;return Y(n).direction===`rtl`&&(a+=v(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ue=25;function We(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=U(e),a=W(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Oe()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Re(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ue&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ge(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Z(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ke(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=We(e,n,t);else if(t===`document`)r=He(W(e));else if(G(t))r=Ge(t,n);else{let n=Ie(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return V(r)}function qe(e,t){let n=t.get(e);if(n)return n;let r=je(e,[],!1).filter(e=>G(e)&&H(e)!==`body`),i=null,a=Y(e).position===`fixed`,o=a?X(e):e;for(;G(o)&&!J(o);){let e=Y(o),t=Ee(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=X(o)}return t.set(e,r),r}function Je(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Se(t)?[]:qe(t,this._c):[].concat(n),r],o=Ke(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ke(t,a[e],i);s=v(n.top,s),c=_(n.right,c),l=_(n.bottom,l),u=v(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ye(e){let{width:t,height:n}=Ne(e);return{width:t,height:n}}function Xe(e,t,n){let r=K(t),i=W(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=x(0);if((r||!a)&&((H(t)!==`body`||be(i))&&(s=ke(t)),r)){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Re(i));let l=i&&!r&&!a?ze(i,s):x(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ze(e){return Y(e).position===`static`}function Qe(e,t){if(!K(e)||Y(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return W(e)===n&&(n=n.ownerDocument.body),n}function $e(e,t){let n=U(e);if(Se(e))return n;if(!K(e)){let t=X(e);for(;t&&!J(t);){if(G(t)&&!Ze(t))return t;t=X(t)}return n}let r=Qe(e,t);for(;r&&xe(r)&&Ze(r);)r=Qe(r,t);return r&&J(r)&&Ze(r)&&!Ee(r)?n:r||De(e)||n}var et=async function(e){let t=this.getOffsetParent||$e,n=this.getDimensions,r=await n(e.floating);return{reference:Xe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tt(e){return Y(e).direction===`rtl`}var nt={convertOffsetParentRelativeRectToViewportRelativeRect:Be,getDocumentElement:W,getClippingRect:Je,getOffsetParent:$e,getElementRects:et,getClientRects:Ve,getDimensions:Ye,getScale:Z,isElement:G,isRTL:tt};function rt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function it(e,t,n){let r=null,i,a=W(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=b(d),h=b(a.clientWidth-(u+f)),g=b(a.clientHeight-(d+p)),y=b(u),x={rootMargin:-m+`px `+-h+`px `+-g+`px `+-y+`px`,threshold:v(0,_(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!rt(l,e.getBoundingClientRect()))return s();if(n!==c){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let c=U(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function at(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Pe(e),u=i||a?[...l?je(l):[],...t?je(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?it(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!rt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ot=pe,st=me,ct=se,lt=ge,ut=ue,dt=oe,ft=he,pt=(e,t,n)=>{let r=new Map,i=n??{},a={...nt,...i.platform,_c:r};return ae(e,t,{...i,platform:a})},mt=e(n(),1),ht=typeof document<`u`?h.useLayoutEffect:function(){};function gt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!gt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!gt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function _t(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vt(e,t){let n=_t(e);return Math.round(t*n)/n}function yt(e){let t=h.useRef(e);return ht(()=>{t.current=e}),t}function bt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);gt(f,r)||p(r);let[m,g]=h.useState(null),[_,v]=h.useState(null),y=h.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=h.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||_,C=h.useRef(null),w=h.useRef(null),T=h.useRef(u),E=c!=null,D=yt(c),O=yt(i),k=yt(l),A=h.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),pt(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!gt(T.current,t)&&(T.current=t,mt.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);ht(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=h.useRef(!1);ht(()=>(j.current=!0,()=>{j.current=!1}),[]),ht(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=h.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=h.useMemo(()=>({reference:x,floating:S}),[x,S]),P=h.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=vt(N.floating,u.x),r=vt(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,..._t(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var xt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:dt({element:r.current,padding:i}).fn(n):r?dt({element:r,padding:i}).fn(n):{}}}},St=(e,t)=>{let n=ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ct=(e,t)=>{let n=st(e);return{name:n.name,fn:n.fn,options:[e,t]}},wt=(e,t)=>({fn:ft(e).fn,options:[e,t]}),Tt=(e,t)=>{let n=ct(e);return{name:n.name,fn:n.fn,options:[e,t]}},Et=(e,t)=>{let n=lt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dt=(e,t)=>{let n=ut(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ot=(e,t)=>{let n=xt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$=r(),kt=`Arrow`,At=h.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,$.jsx)(a.svg,{...o,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,$.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});At.displayName=kt;var jt=At;function Mt(e){let[t,n]=h.useState(void 0);return c(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Nt=`Popper`,[Pt,Ft]=o(Nt),[It,Lt]=Pt(Nt),Rt=e=>{let{__scopePopper:t,children:n}=e,[r,i]=h.useState(null),[a,o]=h.useState(void 0);return(0,$.jsx)(It,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Rt.displayName=Nt;var zt=`PopperAnchor`,Bt=h.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=Lt(zt,n),s=h.useRef(null),c=o.onAnchorChange,u=l(t,h.useCallback(e=>{s.current=e,e&&c(e)},[c])),d=h.useRef(null);h.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&c(d.current)});let f=o.placementState&&Xt(o.placementState),p=f?.[0],m=f?.[1];return r?null:(0,$.jsx)(a.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...i,ref:u})});Bt.displayName=zt;var Vt=`PopperContent`,[Ht,Ut]=Pt(Vt),Wt=h.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:o=`center`,alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:g=`partial`,hideWhenDetached:_=!1,updatePositionStrategy:v=`optimized`,onPlaced:y,...b}=e,x=Lt(Vt,n),[S,C]=h.useState(null),w=l(t,C),[T,E]=h.useState(null),D=Mt(T),O=D?.width??0,k=D?.height??0,A=r+(o===`center`?``:`-`+o),j=typeof m==`number`?m:{top:0,right:0,bottom:0,left:0,...m},M=Array.isArray(p)?p:[p],N=M.length>0,P={padding:j,boundary:M.filter(Jt),altBoundary:N},{refs:F,floatingStyles:I,placement:L,isPositioned:R,middlewareData:z}=bt({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>at(...e,{animationFrame:v===`always`}),elements:{reference:x.anchor},middleware:[St({mainAxis:i+k,alignmentAxis:u}),f&&Ct({mainAxis:!0,crossAxis:!1,limiter:g===`partial`?wt():void 0,...P}),f&&Tt({...P}),Et({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&Ot({element:T,padding:d}),Yt({arrowWidth:O,arrowHeight:k}),_&&Dt({strategy:`referenceHidden`,...P,boundary:N?P.boundary:void 0})]}),B=x.setPlacementState;c(()=>(B(L),()=>{B(void 0)}),[L,B]);let[ee,te]=Xt(L),V=s(y);c(()=>{R&&V?.()},[R,V]);let ne=z.arrow?.x,re=z.arrow?.y,ie=z.arrow?.centerOffset!==0,[ae,oe]=h.useState();return c(()=>{S&&oe(window.getComputedStyle(S).zIndex)},[S]),(0,$.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:R?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,$.jsx)(Ht,{scope:n,placedSide:ee,placedAlign:te,onArrowChange:E,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,$.jsx)(a.div,{"data-side":ee,"data-align":te,...b,ref:w,style:{...b.style,animation:R?void 0:`none`}})})})});Wt.displayName=Vt;var Gt=`PopperArrow`,Kt={top:`bottom`,right:`left`,bottom:`top`,left:`right`},qt=h.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Ut(Gt,n),a=Kt[i.placedSide];return(0,$.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,$.jsx)(jt,{...r,ref:t,style:{...r.style,display:`block`}})})});qt.displayName=Gt;function Jt(e){return e!==null}var Yt=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Xt(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Xt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Zt=Rt,Qt=Bt,$t=Wt,en=qt,tn=`rounded-md bg-border/50 text-sm text-fg placeholder:text-fg-muted transition-colors hover:bg-border/80 focus:bg-border/80 disabled:cursor-not-allowed disabled:opacity-50`,nn=`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg outline-none transition-colors`,rn=`data-[highlighted]:bg-action data-[highlighted]:text-action-ink data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,an=`data-[selected=true]:bg-action data-[selected=true]:text-action-ink data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`;function on({className:e,type:t,...n}){return(0,$.jsx)(`input`,{type:t,className:u(`flex h-8 w-full px-2.5`,tn,e),...n})}function sn({className:e,...t}){return(0,$.jsx)(`textarea`,{className:u(`flex min-h-16 w-full px-2.5 py-2`,tn,e),...t})}var cn=`Label`,ln=h.forwardRef((e,t)=>(0,$.jsx)(a.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));ln.displayName=cn;var un=ln;function dn({className:e,...t}){return(0,$.jsx)(un,{className:u(`text-xs font-medium text-fg-secondary peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var fn=d(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),pn=d(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]);function mn({id:e,value:t,onValueChange:n,onChoose:r,hints:i,placeholder:a,className:o,hintsClassName:s,autoFocus:c}){let[l,d]=(0,h.useState)(!1),[f,p]=(0,h.useState)(0),m=e=>{n(e.value),r?.(e),d(!1)};return(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(on,{id:e,value:t,onChange:e=>{n(e.target.value),d(!0),p(0)},onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:e=>{if(!(!l||i.length===0))if(e.key===`ArrowDown`)e.preventDefault(),p(e=>(e+1)%i.length);else if(e.key===`ArrowUp`)e.preventDefault(),p(e=>(e-1+i.length)%i.length);else if(e.key===`Enter`||e.key===`Tab`){let t=i[f]??i[0];t&&(e.preventDefault(),m(t))}else e.key===`Escape`&&(e.stopPropagation(),d(!1))},placeholder:a,className:o,autoComplete:`off`,spellCheck:!1,autoFocus:c}),l&&i.length>0&&(0,$.jsx)(`ul`,{className:u(`absolute top-full z-10 mt-1 max-h-56 overflow-y-auto rounded-md bg-elevated p-1 shadow-xl`,s??`w-full`),children:i.map((e,t)=>(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,onMouseDown:t=>{t.preventDefault(),m(e)},onMouseEnter:()=>p(t),className:u(`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg outline-none transition-colors`,`data-[selected=true]:bg-action data-[selected=true]:text-action-ink data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,`w-full text-xs`),"data-selected":t===f,children:[(0,$.jsx)(`span`,{className:`truncate`,children:e.label??e.value}),e.badge&&(0,$.jsx)(`span`,{className:`ml-auto shrink-0 text-2xs opacity-70`,children:e.badge})]})},e.value))})]})}var hn=(0,h.lazy)(()=>i(()=>import(`./Terminal-_KJe85Cp.js`).then(e=>({default:e.Terminal})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))),gn=null;async function _n(){gn=(await i(()=>import(`./Terminal-_KJe85Cp.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))).Terminal}function vn(e){return gn?(0,$.jsx)(gn,{...e}):(0,$.jsx)(h.Suspense,{fallback:(0,$.jsx)(`div`,{className:`size-full bg-ground`}),children:(0,$.jsx)(hn,{...e})})}export{Ft as _,fn as a,m as b,sn as c,rn as d,nn as f,Zt as g,$t as h,pn as i,tn as l,en as m,_n as n,dn as o,Qt as p,mn as r,on as s,vn as t,an as u,Mt as v,p as x,f as y};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{c as n,o as r,t as i}from"./buffer-store-BtRP7zZm.js";var a=e(t(),1);function o({buffers:e}){let t=(0,a.useRef)(new Set);return(0,a.useEffect)(()=>{let a=new Set(e.map(e=>i(e.session,e.path,e.root))),o=t.current;for(let e of a)o.has(e)||(n(e),o.add(e));for(let e of[...o])a.has(e)||(r(e),o.delete(e))},[e]),(0,a.useEffect)(()=>()=>{for(let e of t.current)r(e);t.current.clear()},[]),null}export{o as ModelRefcount};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{c as n,o as r,t as i}from"./buffer-store-De6oYRzb.js";var a=e(t(),1);function o({buffers:e}){let t=(0,a.useRef)(new Set);return(0,a.useEffect)(()=>{let a=new Set(e.map(e=>i(e.session,e.path,e.root))),o=t.current;for(let e of a)o.has(e)||(n(e),o.add(e));for(let e of[...o])a.has(e)||(r(e),o.delete(e))},[e]),(0,a.useEffect)(()=>()=>{for(let e of t.current)r(e);t.current.clear()},[]),null}export{o as ModelRefcount};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{a as r,b as i,o as a,r as o,s,y as c}from"./LazyTerminal-CRonN-zb.js";import{H as l,K as u,Q as d,U as f,s as ee,tt as p,xt as m}from"./protocol-support-CLMCHX8i.js";import{r as h,u as g}from"./project-abbrev-Br6sQqPh.js";import{a as _,i as v,n as y,o as b,r as x,t as te}from"./dialog-UpZ_vNTE.js";import{t as S}from"./button-DkCgQgIz.js";import{t as C}from"./createLucideIcon-DyMAgLa3.js";import{t as w}from"./use-debounced-value-C86N-mOK.js";var T=C(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),E=e(t(),1),D=n();function O(e){let t=e.trim().replace(/\/+$/,``);return t===``?`/`:t}function k(e){return e.startsWith(`/`)||e.startsWith(`~`)}function A(e){let t=e.replace(/\/+$/,``),n=t.lastIndexOf(`/`);return n<=0?`/`:t.slice(0,n)}function j({dir:e,onNavigate:t,onChoose:n}){let i=d(e.endsWith(`/`)?e:`${e}/`);return(0,D.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,D.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,D.jsxs)(`button`,{type:`button`,onClick:()=>t(A(e)),disabled:e===`/`,title:`Parent directory`,className:`shrink-0 rounded-sm p-1 text-fg-gold transition-colors hover:bg-elevated hover:text-fg disabled:pointer-events-none disabled:opacity-40`,children:[(0,D.jsx)(h,{className:`size-3.5`}),(0,D.jsx)(`span`,{className:`sr-only`,children:`Parent directory`})]}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>n(e),className:`ml-auto shrink-0 text-2xs text-fg-muted transition-colors hover:text-fg`,children:`choose this folder`})]}),(0,D.jsxs)(`div`,{className:`max-h-48 overflow-y-auto`,children:[(i.data?.entries??[]).map(e=>(0,D.jsxs)(`div`,{className:`flex items-center rounded-md transition-colors hover:bg-elevated`,children:[(0,D.jsxs)(`button`,{type:`button`,onClick:()=>t(e.path),className:`flex min-w-0 flex-1 items-center gap-2 px-2 py-1 text-left`,children:[e.is_git?(0,D.jsx)(r,{className:`size-3.5 shrink-0 text-success`}):(0,D.jsx)(T,{className:`size-3.5 shrink-0 text-fg-gold`}),(0,D.jsx)(`span`,{className:`truncate text-xs text-fg`,children:e.name})]}),e.is_git&&(0,D.jsx)(`button`,{type:`button`,onClick:()=>n(e.path),className:`shrink-0 px-2 py-1 text-2xs text-fg-muted transition-colors hover:text-fg`,children:`choose`})]},e.path)),i.data!==void 0&&i.data.entries.length===0&&(0,D.jsx)(`p`,{className:`px-2 py-1 text-xs text-fg-muted`,children:`No subdirectories.`})]})]})}function M({profileId:e,open:t,onOpenChange:n}){let r=m(),h=ee(u().data?.protocol),C=f(),T=l(),A=g(),M=p(),[N,P]=(0,E.useState)(``),[F,I]=(0,E.useState)(``),[L,R]=(0,E.useState)(!1),[z,B]=(0,E.useState)(``),[V,H]=(0,E.useState)(!1),[U,W]=(0,E.useState)(null),[G,K]=(0,E.useState)(null),q=M.data?.home,J=()=>{let e=N.trim(),t=k(e)&&q!==void 0?O(e.replace(/^~(?=\/|$)/,q)):k(e)&&e.startsWith(`/`)?O(e):q??`/`;X(t)},Y=e=>{I(e),V||B(c(e))},X=e=>{K(e),P(e)},Z=e=>{P(e),K(null),Y(e.split(`/`).filter(Boolean).pop()??``),R(!0)},Q=d(w(N,150)),ne=(0,E.useMemo)(()=>{if(!k(N))return(r.data??[]).map(e=>({value:e.path,badge:`registered`,is_git:!0}));let e=new Set((r.data??[]).map(e=>e.path));return(Q.data?.entries??[]).map(t=>({value:t.path,label:t.name,badge:e.has(t.path)?`registered`:t.is_git?`git`:void 0,is_git:t.is_git}))},[N,r.data,Q.data]),re=async()=>{W(null);try{let t=O(N),a=r.data?.find(e=>e.path===t)?.id??(await C.mutateAsync({path:t,...h?{default_base_branch:``}:{}})).id,o=await T.mutateAsync({profile_id:e,repo_id:a,name:F.trim(),...i(z)?{abbrev:i(z)}:{}});n(!1),A(`/project/${o.id}`)}catch(e){W(e instanceof Error?e.message:String(e))}},$=F.trim()!==``&&k(N.trim());return(0,D.jsx)(te,{open:t,onOpenChange:n,children:(0,D.jsxs)(y,{children:[(0,D.jsxs)(_,{children:[(0,D.jsx)(b,{children:`New project`}),(0,D.jsx)(x,{children:`Point at a git repository on the daemon host — known repositories are reused.`})]}),(0,D.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),$&&re()},children:[(0,D.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(a,{htmlFor:`repo-path`,children:`Repository path`}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>G===null?J():K(null),className:`text-2xs text-fg-muted transition-colors hover:text-fg`,children:G===null?`browse…`:`hide browser`})]}),(0,D.jsx)(o,{id:`repo-path`,placeholder:`~/src/my-repo`,value:N,onValueChange:P,onChoose:e=>{!L&&e.is_git&&Y(e.value.split(`/`).filter(Boolean).pop()??``)},hints:ne}),G!==null&&(0,D.jsx)(j,{dir:G,onNavigate:X,onChoose:Z})]}),(0,D.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,D.jsx)(a,{htmlFor:`project-name`,children:`Project name`}),(0,D.jsx)(s,{id:`project-name`,placeholder:`e.g. checkout-rework`,value:F,onChange:e=>{Y(e.target.value),R(!0)}})]}),(0,D.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,D.jsx)(a,{htmlFor:`project-abbrev`,children:`Abbreviation`}),(0,D.jsx)(s,{id:`project-abbrev`,placeholder:F.trim()?c(F):`ABBRV`,maxLength:5,value:z,onChange:e=>{B(i(e.target.value)),H(!0)},className:`w-24 uppercase`}),(0,D.jsxs)(`p`,{className:`text-2xs text-fg-muted`,children:[`Up to `,5,` characters — the project's label on the collapsed sidebar rail.`]})]}),U&&(0,D.jsx)(`p`,{className:`text-xs text-danger`,children:U}),(0,D.jsxs)(v,{children:[(0,D.jsx)(S,{type:`button`,variant:`ghost`,onClick:()=>n(!1),children:`Cancel`}),(0,D.jsx)(S,{type:`submit`,disabled:!$||C.isPending||T.isPending,children:`Create project`})]})]})]})})}export{M as t};