@shepai/cli 1.102.0 → 1.103.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +5 -4
  2. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +2 -1
  3. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
  4. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/ci-watch-fix-loop.js +1 -1
  5. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +1 -1
  6. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  7. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +2 -2
  8. package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts +19 -0
  9. package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts.map +1 -0
  10. package/dist/src/presentation/web/app/actions/check-agent-auth.js +178 -0
  11. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +1 -1
  12. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.d.ts +1 -1
  13. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.d.ts.map +1 -1
  14. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +46 -8
  15. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  16. package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +28 -5
  17. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  18. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +0 -2
  19. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.d.ts.map +1 -1
  20. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.js +26 -148
  21. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.d.ts.map +1 -1
  22. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.js +29 -8
  23. package/dist/src/presentation/web/components/ui/dialog.d.ts.map +1 -1
  24. package/dist/src/presentation/web/components/ui/dialog.js +2 -2
  25. package/dist/src/presentation/web/hooks/use-graph-state.d.ts.map +1 -1
  26. package/dist/src/presentation/web/hooks/use-graph-state.js +26 -6
  27. package/dist/tsconfig.build.tsbuildinfo +1 -1
  28. package/package.json +2 -2
  29. package/web/.next/BUILD_ID +1 -1
  30. package/web/.next/build-manifest.json +2 -2
  31. package/web/.next/fallback-build-manifest.json +2 -2
  32. package/web/.next/prerender-manifest.json +3 -3
  33. package/web/.next/required-server-files.js +2 -2
  34. package/web/.next/required-server-files.json +2 -2
  35. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +48 -48
  36. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  37. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  38. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +58 -58
  40. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  41. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +58 -58
  44. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  45. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  46. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +44 -44
  48. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  49. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +48 -48
  52. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  53. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +58 -58
  56. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  57. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  58. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +58 -58
  60. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  61. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  62. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +44 -44
  64. package/web/.next/server/app/(dashboard)/page.js +1 -1
  65. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +44 -44
  68. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  69. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  70. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  71. package/web/.next/server/app/_global-error.html +2 -2
  72. package/web/.next/server/app/_global-error.rsc +1 -1
  73. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  74. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  75. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  76. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  77. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  78. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  79. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  81. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  82. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  83. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  84. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  86. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  87. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  88. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  89. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  90. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  92. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  93. package/web/.next/server/chunks/[root-of-the-server]__f47bb8a5._.js +1 -1
  94. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  95. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js +3 -0
  97. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js.map +1 -0
  98. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js +3 -0
  99. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js.map +1 -0
  100. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_0a7546ed.js +3 -0
  101. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_0a7546ed.js.map +1 -0
  102. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_978cbb4c.js +3 -0
  103. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_978cbb4c.js.map +1 -0
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  105. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js.map +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  109. package/web/.next/server/chunks/ssr/{[root-of-the-server]__ec9a1550._.js → [root-of-the-server]__51fc98b0._.js} +2 -2
  110. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0b6bb4ae._.js.map → [root-of-the-server]__51fc98b0._.js.map} +1 -1
  111. package/web/.next/server/chunks/ssr/{[root-of-the-server]__f8932d55._.js → [root-of-the-server]__57f37786._.js} +2 -2
  112. package/web/.next/server/chunks/ssr/{[root-of-the-server]__ec9a1550._.js.map → [root-of-the-server]__57f37786._.js.map} +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  114. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0b6bb4ae._.js → [root-of-the-server]__708dcad1._.js} +2 -2
  115. package/web/.next/server/chunks/ssr/{[root-of-the-server]__f8932d55._.js.map → [root-of-the-server]__708dcad1._.js.map} +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js +2 -2
  119. package/web/.next/server/chunks/ssr/{[root-of-the-server]__6a82177d._.js → [root-of-the-server]__8e002910._.js} +2 -2
  120. package/web/.next/server/chunks/ssr/{[root-of-the-server]__6a82177d._.js.map → [root-of-the-server]__8e002910._.js.map} +1 -1
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/[root-of-the-server]__d91fdd51._.js +3 -0
  124. package/web/.next/server/chunks/ssr/[root-of-the-server]__d91fdd51._.js.map +1 -0
  125. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  126. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  128. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/_273d4632._.js +3 -0
  130. package/web/.next/server/chunks/ssr/_273d4632._.js.map +1 -0
  131. package/web/.next/server/chunks/ssr/{_d2a282c5._.js → _43bc1b22._.js} +2 -2
  132. package/web/.next/server/chunks/ssr/{_d2a282c5._.js.map → _43bc1b22._.js.map} +1 -1
  133. package/web/.next/server/chunks/ssr/_6225647a._.js +3 -0
  134. package/web/.next/server/chunks/ssr/_6225647a._.js.map +1 -0
  135. package/web/.next/server/chunks/ssr/{_9d0908a8._.js → _798dcca3._.js} +2 -2
  136. package/web/.next/server/chunks/ssr/{_9d0908a8._.js.map → _798dcca3._.js.map} +1 -1
  137. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  138. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  140. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/_f5316e67._.js +3 -0
  142. package/web/.next/server/chunks/ssr/_f5316e67._.js.map +1 -0
  143. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  144. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/{src_presentation_web_3c53a23d._.js → src_presentation_web_7275ce5d._.js} +3 -3
  146. package/web/.next/server/chunks/ssr/{src_presentation_web_3c53a23d._.js.map → src_presentation_web_7275ce5d._.js.map} +1 -1
  147. package/web/.next/server/chunks/ssr/{src_presentation_web_ec8c7a4f._.js → src_presentation_web_758dfa10._.js} +3 -3
  148. package/web/.next/server/chunks/ssr/{src_presentation_web_ec8c7a4f._.js.map → src_presentation_web_758dfa10._.js.map} +1 -1
  149. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_84803221.js +3 -0
  150. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_84803221.js.map +1 -0
  151. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  152. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  154. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  155. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  156. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
  157. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  158. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -1
  159. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  160. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  161. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
  162. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js.map +1 -1
  163. package/web/.next/server/pages/500.html +2 -2
  164. package/web/.next/server/server-reference-manifest.js +1 -1
  165. package/web/.next/server/server-reference-manifest.json +273 -273
  166. package/web/.next/static/chunks/07b853e29af1e5f2.js +1 -0
  167. package/web/.next/static/chunks/12f2e950ef2c1a25.js +1 -0
  168. package/web/.next/static/chunks/{d3c337aa9acbfd96.js → 27b176706ec35488.js} +2 -2
  169. package/web/.next/static/chunks/28aa6c032562c065.js +1 -0
  170. package/web/.next/static/chunks/3a806cf059241bc9.js +1 -0
  171. package/web/.next/static/chunks/3ff4c5790bf84403.js +1 -0
  172. package/web/.next/static/chunks/{d994924b9107401b.js → 5981cd90d8cbdad7.js} +1 -1
  173. package/web/.next/static/chunks/790f576eb41aedc6.js +1 -0
  174. package/web/.next/static/chunks/{0ecdad7af8d93397.js → 87ce4933c46c0c18.js} +1 -1
  175. package/web/.next/static/chunks/{bfee4f72255f4654.js → 8f9956f5871a8cdb.js} +2 -2
  176. package/web/.next/static/chunks/93058c22968e2fef.css +1 -0
  177. package/web/.next/static/chunks/a39402a05bf12912.js +1 -0
  178. package/web/.next/static/chunks/f37993a7b6f87fcb.js +1 -0
  179. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_6ba7eb21._.js +0 -3
  180. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_6ba7eb21._.js.map +0 -1
  181. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_c757eb00.js +0 -3
  182. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_c757eb00.js.map +0 -1
  183. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_7eb49631.js +0 -3
  184. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_7eb49631.js.map +0 -1
  185. package/web/.next/server/chunks/ssr/[root-of-the-server]__7b49fcb3._.js +0 -3
  186. package/web/.next/server/chunks/ssr/[root-of-the-server]__7b49fcb3._.js.map +0 -1
  187. package/web/.next/server/chunks/ssr/_60e203af._.js +0 -3
  188. package/web/.next/server/chunks/ssr/_60e203af._.js.map +0 -1
  189. package/web/.next/server/chunks/ssr/_6a83bd29._.js +0 -3
  190. package/web/.next/server/chunks/ssr/_6a83bd29._.js.map +0 -1
  191. package/web/.next/server/chunks/ssr/_7d954884._.js +0 -3
  192. package/web/.next/server/chunks/ssr/_7d954884._.js.map +0 -1
  193. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_befd865a.js +0 -3
  194. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_befd865a.js.map +0 -1
  195. package/web/.next/static/chunks/0a370e5d6fd1bb24.js +0 -1
  196. package/web/.next/static/chunks/2d3dc372f05429dd.css +0 -1
  197. package/web/.next/static/chunks/3092c9611e2dc032.js +0 -1
  198. package/web/.next/static/chunks/30dc64780817371a.js +0 -1
  199. package/web/.next/static/chunks/ac12b8d2bd59675e.js +0 -1
  200. package/web/.next/static/chunks/b272ac93b52dceeb.js +0 -1
  201. package/web/.next/static/chunks/d61cbdfc00003e44.js +0 -1
  202. package/web/.next/static/chunks/e248c85913405af4.js +0 -1
  203. package/web/.next/static/chunks/e24a024affc634d9.js +0 -1
  204. /package/web/.next/static/{_-n7Ii9h0sTnlzE_aFMQI → YTwpzFRHYkkE5cDxaRlDQ}/_buildManifest.js +0 -0
  205. /package/web/.next/static/{_-n7Ii9h0sTnlzE_aFMQI → YTwpzFRHYkkE5cDxaRlDQ}/_clientMiddlewareManifest.json +0 -0
  206. /package/web/.next/static/{_-n7Ii9h0sTnlzE_aFMQI → YTwpzFRHYkkE5cDxaRlDQ}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- module.exports=[96853,a=>{"use strict";let b=(0,a.i(25700).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["default",()=>b])},98410,a=>{"use strict";let b=(0,a.i(25700).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",()=>b],98410)},9955,a=>{"use strict";var b=a.i(76096);a.s(["Download",()=>b.default])},67075,a=>{"use strict";var b=a.i(2811);a.s(["CheckCircle2",()=>b.default])},4019,a=>{"use strict";let b=(0,a.i(25700).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Circle",()=>b],4019)},63698,a=>{"use strict";let b=(0,a.i(25700).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",()=>b],63698)},71238,a=>{"use strict";let b=(0,a.i(25700).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",()=>b],71238)},58339,a=>{"use strict";var b=a.i(10973),c=a.i(42261),d=a.i(85536);let e=(0,c.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function f({className:a,variant:c,...f}){return(0,b.jsx)("div",{className:(0,d.cn)(e({variant:c}),a),...f})}a.s(["Badge",()=>f])},78454,a=>{"use strict";a.i(24255),a.s([])},3195,a=>{"use strict";let b=(0,a.i(25700).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);a.s(["FolderOpen",()=>b],3195)},50488,63247,30528,85649,a=>{"use strict";let b=(0,a.i(25700).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);a.s(["Code2",()=>b],50488);var c=a.i(25674);let d=(0,c.createServerReference)("402ad9e22dae41ccdb453f2e5ffc8ad3eec0307a8b",c.callServer,void 0,c.findSourceMapURL,"openIde");a.s(["openIde",()=>d],63247);let e=(0,c.createServerReference)("40621e07f1ad3a63beee17791df2592c777342e318",c.callServer,void 0,c.findSourceMapURL,"openShell");a.s(["openShell",()=>e],30528);let f=(0,c.createServerReference)("40b4f2fb877b5eddc8abd9b707b3088acec4426a75",c.callServer,void 0,c.findSourceMapURL,"openFolder");a.s(["openFolder",()=>f],85649)},42642,a=>{"use strict";let b=(0,a.i(25700).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["default",()=>b])},3942,a=>{"use strict";let b=(0,a.i(25700).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);a.s(["Zap",()=>b],3942)},10606,a=>{"use strict";var b=a.i(51969);a.s(["CheckIcon",()=>b.default])},72016,51969,a=>{"use strict";let b=(0,a.i(25700).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["default",()=>b],51969),a.s(["Check",()=>b],72016)},76096,a=>{"use strict";let b=(0,a.i(25700).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);a.s(["default",()=>b])},64005,a=>{"use strict";var b=a.i(96960);function c(a){let c=b.useRef({value:a,previous:a});return b.useMemo(()=>(c.current.value!==a&&(c.current.previous=c.current.value,c.current.value=a),c.current.previous),[a])}a.s(["usePrevious",()=>c])},58860,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(66873),e=c.forwardRef((a,c)=>(0,b.jsx)(d.Primitive.label,{...a,ref:c,onMouseDown:b=>{b.target.closest("button, input, select, textarea")||(a.onMouseDown?.(b),!b.defaultPrevented&&b.detail>1&&b.preventDefault())}}));e.displayName="Label",a.s(["Label",()=>e,"Root",()=>e],59967);var f=a.i(59967),f=f,g=a.i(42261),h=a.i(85536);let i=(0,g.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),j=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(f.Root,{ref:d,className:(0,h.cn)(i(),a),...c}));j.displayName=f.Root.displayName,a.s(["Label",()=>j],58860)},3410,a=>{"use strict";let b=(0,a.i(25700).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",()=>b],3410)},94132,a=>{"use strict";let b=(0,a.i(25700).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",()=>b],94132)},10539,a=>{"use strict";var b=a.i(96960);function c(a){let[c,d]=(0,b.useState)([]),[e,f]=(0,b.useState)("idle"),[g,h]=(0,b.useState)(null),i=(0,b.useRef)(null),j=(0,b.useCallback)(()=>{i.current&&(i.current.close(),i.current=null)},[]);return(0,b.useEffect)(()=>j,[j]),{logs:c,status:e,result:g,startInstall:(0,b.useCallback)(()=>{j(),d([]),h(null),f("streaming");let b=new EventSource(`/api/tools/${a}/install/stream`);i.current=b,b.onmessage=a=>{d(b=>[...b,a.data])},b.addEventListener("done",a=>{let b=JSON.parse(a.data);h(b),f("error"===b.status?"error":"done"),j()}),b.onerror=()=>{f("error"),j()}},[a,j])}}a.s(["useToolInstallStream",()=>c])},38702,16223,a=>{"use strict";var b=a.i(10973),c=a.i(85536);function d({icon:a,title:d,description:e,action:f,className:g,...h}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",g),...h,children:[a?(0,b.jsx)("div",{className:"text-muted-foreground",children:a}):null,(0,b.jsx)("h3",{className:"text-lg font-semibold",children:d}),e?(0,b.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:e}):null,f?(0,b.jsx)("div",{className:"mt-2",children:f}):null]})}a.s(["EmptyState",()=>d],16223),a.s([],38702)},9813,21680,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("00b15754dd58909026360834d5147d7e66f5a0f880",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],9813);let d=(0,b.createServerReference)("60c46a6a1f0ce6d436cc990b1fb285677ea4cfa739",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],21680)},34644,a=>{"use strict";let b=(0,a.i(25700).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);a.s(["Bot",()=>b],34644)},55628,a=>{"use strict";var b=a.i(96960),c=a.i(63247),d=a.i(30528),e=a.i(85649);function f(a){let[f,g]=(0,b.useState)(!1),[h,i]=(0,b.useState)(!1),[j,k]=(0,b.useState)(!1),[l,m]=(0,b.useState)(null),[n,o]=(0,b.useState)(null),[p,q]=(0,b.useState)(null),r=(0,b.useRef)(null),s=(0,b.useRef)(null),t=(0,b.useRef)(null);(0,b.useEffect)(()=>()=>{r.current&&clearTimeout(r.current),s.current&&clearTimeout(s.current),t.current&&clearTimeout(t.current)},[]);let u=(0,b.useCallback)(async(b,c,d,e,f)=>{if(a&&!f){e.current&&clearTimeout(e.current),c(!0),d(null);try{let a=await b();if(!a.success){let b=a.error??"An unexpected error occurred";d(b),e.current=setTimeout(()=>d(null),5e3)}}catch(a){d(a instanceof Error?a.message:"An unexpected error occurred"),e.current=setTimeout(()=>d(null),5e3)}finally{c(!1)}}},[a]);return{openInIde:(0,b.useCallback)(()=>u(()=>(0,c.openIde)({repositoryPath:a.repositoryPath}),g,m,r,f),[u,f,a]),openInShell:(0,b.useCallback)(()=>u(()=>(0,d.openShell)({repositoryPath:a.repositoryPath}),i,o,s,h),[u,h,a]),openFolder:(0,b.useCallback)(()=>u(()=>(0,e.openFolder)(a.repositoryPath),k,q,t,j),[u,j,a]),ideLoading:f,shellLoading:h,folderLoading:j,ideError:l,shellError:n,folderError:p}}a.s(["useRepositoryActions",()=>f])}];
2
-
3
- //# sourceMappingURL=_7d954884._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/minus.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/copy.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/circle.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/terminal.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/external-link.ts","../../../../../../../src/presentation/web/components/ui/badge.tsx","../../../../../../../src/presentation/web/components/common/base-drawer/index.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/folder-open.ts","../../../../../../../src/presentation/web/app/actions/data%3A819cab%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Ae8bed1%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Ae19929%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/code-xml.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/file-text.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/zap.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/check.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/download.ts","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-use-previous%401.1.1_%40types%2Breact%4019.2.10_react%4019.2.4/node_modules/%40radix-ui/react-use-previous/src/use-previous.tsx","../../../../../../../src/presentation/web/components/ui/label.tsx","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-label%402.1.7_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Breact%40_511ac9deb435ae46b2843bd1975598a6/node_modules/%40radix-ui/react-label/dist/index.mjs","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevron-right.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevron-left.ts","../../../../../../../src/presentation/web/hooks/use-tool-install-stream.ts","../../../../../../../src/presentation/web/components/common/empty-state/empty-state.tsx","../../../../../../../src/presentation/web/app/actions/data%3Ac25d41%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Acdb136%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/bot.ts","../../../../../../../src/presentation/web/components/common/repository-node/use-repository-actions.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'M5 12h14', key: '1ays0h' }]];\n\n/**\n * @component @name Minus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMmgxNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/minus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Minus = createLucideIcon('minus', __iconNode);\n\nexport default Minus;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2', key: '17jyea' }],\n ['path', { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2', key: 'zix9uf' }],\n];\n\n/**\n * @component @name Copy\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHg9IjgiIHk9IjgiIHJ4PSIyIiByeT0iMiIgLz4KICA8cGF0aCBkPSJNNCAxNmMtMS4xIDAtMi0uOS0yLTJWNGMwLTEuMS45LTIgMi0yaDEwYzEuMSAwIDIgLjkgMiAyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/copy\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Copy = createLucideIcon('copy', __iconNode);\n\nexport default Copy;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }]];\n\n/**\n * @component @name Circle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/circle\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Circle = createLucideIcon('circle', __iconNode);\n\nexport default Circle;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 19h8', key: 'baeox8' }],\n ['path', { d: 'm4 17 6-6-6-6', key: '1yngyt' }],\n];\n\n/**\n * @component @name Terminal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTloOCIgLz4KICA8cGF0aCBkPSJtNCAxNyA2LTYtNi02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/terminal\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Terminal = createLucideIcon('terminal', __iconNode);\n\nexport default Terminal;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M15 3h6v6', key: '1q9fwt' }],\n ['path', { d: 'M10 14 21 3', key: 'gplh6r' }],\n ['path', { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6', key: 'a6xqqp' }],\n];\n\n/**\n * @component @name ExternalLink\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgM2g2djYiIC8+CiAgPHBhdGggZD0iTTEwIDE0IDIxIDMiIC8+CiAgPHBhdGggZD0iTTE4IDEzdjZhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWOGEyIDIgMCAwIDEgMi0yaDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/external-link\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ExternalLink = createLucideIcon('external-link', __iconNode);\n\nexport default ExternalLink;\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst badgeVariants = cva(\n 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none',\n {\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive:\n 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',\n outline: 'text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />;\n}\n\nexport { Badge, badgeVariants };\n","export { BaseDrawer, type BaseDrawerProps } from './base-drawer';\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'm6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2',\n key: 'usdka0',\n },\n ],\n];\n\n/**\n * @component @name FolderOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNiAxNCAxLjUtMi45QTIgMiAwIDAgMSA5LjI0IDEwSDIwYTIgMiAwIDAgMSAxLjk0IDIuNWwtMS41NCA2YTIgMiAwIDAgMS0xLjk1IDEuNUg0YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDMuOWEyIDIgMCAwIDEgMS42OS45bC44MSAxLjJhMiAyIDAgMCAwIDEuNjcuOUgxOGEyIDIgMCAwIDEgMiAydjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/folder-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FolderOpen = createLucideIcon('folder-open', __iconNode);\n\nexport default FolderOpen;\n","/* __next_internal_action_entry_do_not_use__ [{\"402ad9e22dae41ccdb453f2e5ffc8ad3eec0307a8b\":\"openIde\"},\"src/presentation/web/app/actions/open-ide.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"402ad9e22dae41ccdb453f2e5ffc8ad3eec0307a8b\",callServer,void 0,findSourceMapURL,\"openIde\");export{$$RSC_SERVER_ACTION_0 as openIde};","/* __next_internal_action_entry_do_not_use__ [{\"40621e07f1ad3a63beee17791df2592c777342e318\":\"openShell\"},\"src/presentation/web/app/actions/open-shell.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40621e07f1ad3a63beee17791df2592c777342e318\",callServer,void 0,findSourceMapURL,\"openShell\");export{$$RSC_SERVER_ACTION_0 as openShell};","/* __next_internal_action_entry_do_not_use__ [{\"40b4f2fb877b5eddc8abd9b707b3088acec4426a75\":\"openFolder\"},\"src/presentation/web/app/actions/open-folder.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40b4f2fb877b5eddc8abd9b707b3088acec4426a75\",callServer,void 0,findSourceMapURL,\"openFolder\");export{$$RSC_SERVER_ACTION_0 as openFolder};","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm18 16 4-4-4-4', key: '1inbqp' }],\n ['path', { d: 'm6 8-4 4 4 4', key: '15zrgr' }],\n ['path', { d: 'm14.5 4-5 16', key: 'e7oirm' }],\n];\n\n/**\n * @component @name CodeXml\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTggMTYgNC00LTQtNCIgLz4KICA8cGF0aCBkPSJtNiA4LTQgNCA0IDQiIC8+CiAgPHBhdGggZD0ibTE0LjUgNC01IDE2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/code-xml\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CodeXml = createLucideIcon('code-xml', __iconNode);\n\nexport default CodeXml;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n 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',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'M10 9H8', key: 'b1mrlr' }],\n ['path', { d: 'M16 13H8', key: 't4e002' }],\n ['path', { d: 'M16 17H8', key: 'z1uh3a' }],\n];\n\n/**\n * @component @name FileText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAyMmEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg4YTIuNCAyLjQgMCAwIDEgMS43MDQuNzA2bDMuNTg4IDMuNTg4QTIuNCAyLjQgMCAwIDEgMjAgOHYxMmEyIDIgMCAwIDEtMiAyeiIgLz4KICA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4KICA8cGF0aCBkPSJNMTAgOUg4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxM0g4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxN0g4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/file-text\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileText = createLucideIcon('file-text', __iconNode);\n\nexport default FileText;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z',\n key: '1xq2db',\n },\n ],\n];\n\n/**\n * @component @name Zap\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxNGExIDEgMCAwIDEtLjc4LTEuNjNsOS45LTEwLjJhLjUuNSAwIDAgMSAuODYuNDZsLTEuOTIgNi4wMkExIDEgMCAwIDAgMTMgMTBoN2ExIDEgMCAwIDEgLjc4IDEuNjNsLTkuOSAxMC4yYS41LjUgMCAwIDEtLjg2LS40NmwxLjkyLTYuMDJBMSAxIDAgMCAwIDExIDE0eiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/zap\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Zap = createLucideIcon('zap', __iconNode);\n\nexport default Zap;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'M20 6 9 17l-5-5', key: '1gmf2c' }]];\n\n/**\n * @component @name Check\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgNiA5IDE3bC01LTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Check = createLucideIcon('check', __iconNode);\n\nexport default Check;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 15V3', key: 'm9g1x1' }],\n ['path', { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4', key: 'ih7n3h' }],\n ['path', { d: 'm7 10 5 5 5-5', key: 'brsn70' }],\n];\n\n/**\n * @component @name Download\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTVWMyIgLz4KICA8cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNCIgLz4KICA8cGF0aCBkPSJtNyAxMCA1IDUgNS01IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/download\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Download = createLucideIcon('download', __iconNode);\n\nexport default Download;\n","import * as React from 'react';\n\nfunction usePrevious<T>(value: T) {\n const ref = React.useRef({ value, previous: value });\n\n // We compare values before making an update to ensure that\n // a change has been made. This ensures the previous value is\n // persisted correctly between renders.\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\n\nexport { usePrevious };\n","'use client';\n\nimport * as React from 'react';\nimport { Label as LabelPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst labelVariants = cva(\n 'text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70'\n);\n\nconst Label = React.forwardRef<\n React.ComponentRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'm9 18 6-6-6-6', key: 'mthhwq' }]];\n\n/**\n * @component @name ChevronRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtOSAxOCA2LTYtNi02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/chevron-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronRight = createLucideIcon('chevron-right', __iconNode);\n\nexport default ChevronRight;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'm15 18-6-6 6-6', key: '1wnfg3' }]];\n\n/**\n * @component @name ChevronLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTUgMTgtNi02IDYtNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chevron-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronLeft = createLucideIcon('chevron-left', __iconNode);\n\nexport default ChevronLeft;\n","'use client';\n\nimport { useState, useRef, useCallback, useEffect } from 'react';\nimport type { ToolInstallationStatus } from '@shepai/core/domain/generated/output';\n\nexport type InstallStreamStatus = 'idle' | 'streaming' | 'done' | 'error';\n\nexport interface UseToolInstallStreamResult {\n logs: string[];\n status: InstallStreamStatus;\n result: ToolInstallationStatus | null;\n startInstall: () => void;\n}\n\nexport function useToolInstallStream(toolId: string): UseToolInstallStreamResult {\n const [logs, setLogs] = useState<string[]>([]);\n const [status, setStatus] = useState<InstallStreamStatus>('idle');\n const [result, setResult] = useState<ToolInstallationStatus | null>(null);\n const esRef = useRef<EventSource | null>(null);\n\n const cleanup = useCallback(() => {\n if (esRef.current) {\n esRef.current.close();\n esRef.current = null;\n }\n }, []);\n\n // Cleanup on unmount\n useEffect(() => cleanup, [cleanup]);\n\n const startInstall = useCallback(() => {\n cleanup();\n setLogs([]);\n setResult(null);\n setStatus('streaming');\n\n const es = new EventSource(`/api/tools/${toolId}/install/stream`);\n esRef.current = es;\n\n es.onmessage = (event: MessageEvent) => {\n setLogs((prev) => [...prev, event.data]);\n };\n\n es.addEventListener('done', (event: MessageEvent) => {\n const installResult: ToolInstallationStatus = JSON.parse(event.data);\n setResult(installResult);\n setStatus(installResult.status === 'error' ? 'error' : 'done');\n cleanup();\n });\n\n es.onerror = () => {\n setStatus('error');\n cleanup();\n };\n }, [toolId, cleanup]);\n\n return { logs, status, result, startInstall };\n}\n","import type { ReactNode, HTMLAttributes } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n}\n\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n ...props\n}: EmptyStateProps) {\n return (\n <div\n className={cn('flex flex-col items-center gap-4 px-4 py-12 text-center', className)}\n {...props}\n >\n {icon ? <div className=\"text-muted-foreground\">{icon}</div> : null}\n <h3 className=\"text-lg font-semibold\">{title}</h3>\n {description ? <p className=\"text-muted-foreground max-w-md text-sm\">{description}</p> : null}\n {action ? <div className=\"mt-2\">{action}</div> : null}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"00b15754dd58909026360834d5147d7e66f5a0f880\":\"getAllAgentModels\"},\"src/presentation/web/app/actions/get-all-agent-models.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"00b15754dd58909026360834d5147d7e66f5a0f880\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"60c46a6a1f0ce6d436cc990b1fb285677ea4cfa739\":\"updateAgentAndModel\"},\"src/presentation/web/app/actions/update-agent-and-model.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"60c46a6a1f0ce6d436cc990b1fb285677ea4cfa739\",callServer,void 0,findSourceMapURL,\"updateAgentAndModel\");export{$$RSC_SERVER_ACTION_0 as updateAgentAndModel};","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 8V4H8', key: 'hb8ula' }],\n ['rect', { width: '16', height: '12', x: '4', y: '8', rx: '2', key: 'enze0r' }],\n ['path', { d: 'M2 14h2', key: 'vft8re' }],\n ['path', { d: 'M20 14h2', key: '4cs60a' }],\n ['path', { d: 'M15 13v2', key: '1xurst' }],\n ['path', { d: 'M9 13v2', key: 'rq6x2g' }],\n];\n\n/**\n * @component @name Bot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgOFY0SDgiIC8+CiAgPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjEyIiB4PSI0IiB5PSI4IiByeD0iMiIgLz4KICA8cGF0aCBkPSJNMiAxNGgyIiAvPgogIDxwYXRoIGQ9Ik0yMCAxNGgyIiAvPgogIDxwYXRoIGQ9Ik0xNSAxM3YyIiAvPgogIDxwYXRoIGQ9Ik05IDEzdjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/bot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Bot = createLucideIcon('bot', __iconNode);\n\nexport default Bot;\n","'use client';\n\nimport { useState, useCallback, useRef, useEffect } from 'react';\nimport { openIde } from '@/app/actions/open-ide';\nimport { openShell } from '@/app/actions/open-shell';\nimport { openFolder } from '@/app/actions/open-folder';\n\nexport interface RepositoryActionsInput {\n repositoryPath: string;\n}\n\nexport interface RepositoryActionsState {\n openInIde: () => Promise<void>;\n openInShell: () => Promise<void>;\n openFolder: () => Promise<void>;\n ideLoading: boolean;\n shellLoading: boolean;\n folderLoading: boolean;\n ideError: string | null;\n shellError: string | null;\n folderError: string | null;\n}\n\nconst ERROR_CLEAR_DELAY = 5000;\n\nexport function useRepositoryActions(input: RepositoryActionsInput | null): RepositoryActionsState {\n const [ideLoading, setIdeLoading] = useState(false);\n const [shellLoading, setShellLoading] = useState(false);\n const [folderLoading, setFolderLoading] = useState(false);\n const [ideError, setIdeError] = useState<string | null>(null);\n const [shellError, setShellError] = useState<string | null>(null);\n const [folderError, setFolderError] = useState<string | null>(null);\n\n const ideTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const shellTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const folderTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Clear timers on unmount\n useEffect(() => {\n const ideRef = ideTimerRef;\n const shellRef = shellTimerRef;\n const folderRef = folderTimerRef;\n return () => {\n if (ideRef.current) clearTimeout(ideRef.current);\n if (shellRef.current) clearTimeout(shellRef.current);\n if (folderRef.current) clearTimeout(folderRef.current);\n };\n }, []);\n\n const performAction = useCallback(\n async (\n action: () => Promise<{ success: boolean; error?: string }>,\n setLoading: (v: boolean) => void,\n setError: (v: string | null) => void,\n timerRef: React.RefObject<ReturnType<typeof setTimeout> | null>,\n isLoading: boolean\n ) => {\n if (!input || isLoading) return;\n\n if (timerRef.current) clearTimeout(timerRef.current);\n\n setLoading(true);\n setError(null);\n\n try {\n const result = await action();\n\n if (!result.success) {\n const errorMessage = result.error ?? 'An unexpected error occurred';\n setError(errorMessage);\n timerRef.current = setTimeout(() => setError(null), ERROR_CLEAR_DELAY);\n }\n } catch (err: unknown) {\n const errorMessage = err instanceof Error ? err.message : 'An unexpected error occurred';\n setError(errorMessage);\n timerRef.current = setTimeout(() => setError(null), ERROR_CLEAR_DELAY);\n } finally {\n setLoading(false);\n }\n },\n [input]\n );\n\n const handleOpenIde = useCallback(\n () =>\n performAction(\n () => openIde({ repositoryPath: input!.repositoryPath }),\n setIdeLoading,\n setIdeError,\n ideTimerRef,\n ideLoading\n ),\n [performAction, ideLoading, input]\n );\n\n const handleOpenShell = useCallback(\n () =>\n performAction(\n () => openShell({ repositoryPath: input!.repositoryPath }),\n setShellLoading,\n setShellError,\n shellTimerRef,\n shellLoading\n ),\n [performAction, shellLoading, input]\n );\n\n const handleOpenFolder = useCallback(\n () =>\n performAction(\n () => openFolder(input!.repositoryPath),\n setFolderLoading,\n setFolderError,\n folderTimerRef,\n folderLoading\n ),\n [performAction, folderLoading, input]\n );\n\n return {\n openInIde: handleOpenIde,\n openInShell: handleOpenShell,\n openFolder: handleOpenFolder,\n ideLoading,\n shellLoading,\n folderLoading,\n ideError,\n shellError,\n folderError,\n };\n}\n"],"names":[],"mappings":"uCAgBA,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,EAAA,AAAQ,CAAR,AAAQ,CAAR,AAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAbK,CAaI,AAbH,CAaG,AAbF,CAaE,CAAA,CAAA,CAAA,CAAA,CAAA,AAbF,CAaE,AAbF,AAAQ,CAAE,AAaR,AAbM,CAaI,CAAA,AAbC,UAAA,CAAY,AAAZ,CAAY,CAAA,CAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAC,CAAA,iDCgB/E,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,CAAA,CAAO,AAAP,CAAO,AAAP,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAhBM,CAClC,AAeoC,CAfnC,AAemC,CAfnC,AAemC,CAfnC,AAemC,CAfnC,AAemC,CAfnC,AAemC,CAfnC,AAemC,CAfnC,AAemC,CAfnC,AAAQ,AAe2B,CAf3B,AAAE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BlC,YA1BsB,CA0BT,AA1BS,EAAA,EAAA,WAAW,AAAX,EACtB,IACE,EACE,IAAM,CAAA,EAAA,EAAA,SAAS,AAAT,EAAU,CAAE,eAAgB,EAAO,cAAc,AAAC,GACxD,EACA,EACA,EACA,GAEJ,CAAC,EAAe,EAAc,EAAM,EAkBpC,WAfuB,CAAA,AAeX,EAfW,EAAA,WAAA,AAAW,EAClC,IACE,EACE,IAAM,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,EAAO,cAAc,EACtC,EACA,EACA,EACA,GAEJ,CAAC,EAAe,EAAe,EAAM,aAOrC,eACA,gBACA,WACA,aACA,cACA,CACF,CACF","ignoreList":[1,2,3,4,7,11,13,14,18,19,20,25]}
@@ -1,3 +0,0 @@
1
- module.exports=[65719,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(41872),l=a.i(23504),m=a.i(83532),n=a.i(27900),o=a.i(50845),p=a.i(49560),q=a.i(39353),r=a.i(29207),s=a.i(31075);a.s([],42248),a.i(42248),a.s(["000222ad3301cdf311d341f5025bff7b540789fba2",()=>k.isAgentSetupComplete,"00993e2545d649b5aba1cb3cc40052d2ebf47f015e",()=>b.pickFolder,"00b15754dd58909026360834d5147d7e66f5a0f880",()=>l.getAllAgentModels,"00d3c456fd85e65c4440ef5f07d3f2e866669a0367",()=>s.fetchGraphData,"400ddd88aec26491140409627bd00fe94e8fdd949f",()=>p.addRepository,"402ad9e22dae41ccdb453f2e5ffc8ad3eec0307a8b",()=>h.openIde,"403b24c91eecfc1c82492a9ff79a84f2bc4dcfe5fb",()=>c.getDeploymentLogs,"4061003b0fba3b211b3f70dc4f19caa196d58a06a5",()=>r.getFeatureMetadata,"40621e07f1ad3a63beee17791df2592c777342e318",()=>i.openShell,"40714eb41a47f1cef73f1eaf85c1f84644452008cb",()=>e.deployRepository,"40880675b03886539a6882aa0bc80af3a2008c4e86",()=>m.checkAgentTool,"40afed3b63acce6c6b813e2822bc1a7d106e6e51e1",()=>g.getDeploymentStatus,"40b4f2fb877b5eddc8abd9b707b3088acec4426a75",()=>j.openFolder,"40def591a406f9e6ea5e2e2ac7e938509e71d329bc",()=>q.deleteRepository,"40ea563da84c1ff124cc9f59ea892a7cca351c85a4",()=>f.stopDeployment,"40ed21889a5cd5f67f4f7a6499e2e66718a79b23bf",()=>d.deployFeature,"60c46a6a1f0ce6d436cc990b1fb285677ea4cfa739",()=>n.updateAgentAndModel,"60d3b20ea075e817f84bd32c735fe023bf9a55a905",()=>o.deleteFeature],65719)}];
2
-
3
- //# sourceMappingURL=src_presentation_web__next-internal_server_app_%28dashboard%29_page_actions_befd865a.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '00993e2545d649b5aba1cb3cc40052d2ebf47f015e'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '403b24c91eecfc1c82492a9ff79a84f2bc4dcfe5fb'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40ed21889a5cd5f67f4f7a6499e2e66718a79b23bf'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40714eb41a47f1cef73f1eaf85c1f84644452008cb'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '40ea563da84c1ff124cc9f59ea892a7cca351c85a4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40afed3b63acce6c6b813e2822bc1a7d106e6e51e1'} from 'ACTIONS_MODULE5'\nexport {openIde as '402ad9e22dae41ccdb453f2e5ffc8ad3eec0307a8b'} from 'ACTIONS_MODULE6'\nexport {openShell as '40621e07f1ad3a63beee17791df2592c777342e318'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40b4f2fb877b5eddc8abd9b707b3088acec4426a75'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '000222ad3301cdf311d341f5025bff7b540789fba2'} from 'ACTIONS_MODULE9'\nexport {getAllAgentModels as '00b15754dd58909026360834d5147d7e66f5a0f880'} from 'ACTIONS_MODULE10'\nexport {checkAgentTool as '40880675b03886539a6882aa0bc80af3a2008c4e86'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '60c46a6a1f0ce6d436cc990b1fb285677ea4cfa739'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '60d3b20ea075e817f84bd32c735fe023bf9a55a905'} from 'ACTIONS_MODULE13'\nexport {addRepository as '400ddd88aec26491140409627bd00fe94e8fdd949f'} from 'ACTIONS_MODULE14'\nexport {deleteRepository as '40def591a406f9e6ea5e2e2ac7e938509e71d329bc'} from 'ACTIONS_MODULE15'\nexport {getFeatureMetadata as '4061003b0fba3b211b3f70dc4f19caa196d58a06a5'} from 'ACTIONS_MODULE16'\nexport {fetchGraphData as '00d3c456fd85e65c4440ef5f07d3f2e866669a0367'} from 'ACTIONS_MODULE17'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17840,e=>{"use strict";var t=e.i(79054),r=e.i(31406),n=e.i(60112),o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),a=o((e,t)=>{var r=Object.defineProperty,n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),o=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?r(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n},a=n((e,t)=>{function r(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function a(e,t,r,n){var o=""+t,a=""+r;if(!e&&o>a){var s=o;o=a,a=s}return o+"\x01"+a+"\x01"+(void 0===n?"\0":n)}function s(e,t){return a(e,t.v,t.w,t.name)}t.exports=class{constructor(e){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var r=arguments,n=this;return e.forEach(function(e){r.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var r=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(r),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(void 0===t)t="\0";else{t+="";for(var r=t;void 0!==r;r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e="\0"){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let n=new Set(t);for(var r of this.successors(e))n.add(r);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([r,n]){e(r)&&t.setNode(r,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var n={};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,function e(o){var a=r.parent(o);return void 0===a||t.hasNode(a)?(n[o]=a,a):a in n?n[a]:e(a)}(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var r=this,n=arguments;return e.reduce(function(e,o){return n.length>1?r.setEdge(e,o,t):r.setEdge(e,o),o}),this}setEdge(){var e,t,n,o,s=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,t=i.w,n=i.name,2==arguments.length&&(o=arguments[1],s=!0)):(e=i,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],s=!0)),e=""+e,t=""+t,void 0!==n&&(n=""+n);var l=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,l))return s&&(this._edgeLabels[l]=o),this;if(void 0!==n&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?o:this._defaultEdgeLabelFn(e,t,n);var d=function(e,t,r,n){var o=""+t,a=""+r;if(!e&&o>a){var s=o;o=a,a=s}var i={v:o,w:a};return n&&(i.name=n),i}(this._isDirected,e,t,n);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[l]=d,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][l]=d,this._out[e][l]=d,this._edgeCount++,this}edge(e,t,r){var n=1==arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(){let e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,r){var n=1==arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,r){var o=1==arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,r),i=this._edgeObjs[o];return i&&(e=i.v,t=i.w,delete this._edgeLabels[o],delete this._edgeObjs[o],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][o],delete this._out[e][o],this._edgeCount--),this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}filterEdges(e,t,r){if(e){var n=Object.values(e);return r?n.filter(function(e){return e.v===t&&e.w===r||e.v===r&&e.w===t}):n}}}}),s=n((e,t)=>{t.exports="3.0.2"}),i=n((e,t)=>{t.exports={Graph:a(),version:s()}}),l=n((e,t)=>{var r=a();t.exports={write:function(e){var t,r,n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e).nodes().map(function(e){var r=t.node(e),n=t.parent(e),o={v:e};return void 0!==r&&(o.value=r),void 0!==n&&(o.parent=n),o}),edges:(r=e).edges().map(function(e){var t=r.edge(e),n={v:e.v,w:e.w};return void 0!==e.name&&(n.name=e.name),void 0!==t&&(n.value=t),n})};return void 0!==e.graph()&&(n.value=structuredClone(e.graph())),n},read:function(e){var t=new r(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}}),d=n((e,t)=>{t.exports=function(e,t,n,o){return function(e,t,r,n){var o={},a=!0,s=0,i=e.nodes(),l=function(e){var t=r(e);o[e.v].distance+t<o[e.w].distance&&(o[e.w]={distance:o[e.v].distance+t,predecessor:e.v},a=!0)},d=function(){i.forEach(function(e){n(e).forEach(function(t){var r=t.v===e?t.v:t.w,n=r===t.v?t.w:t.v;l({v:r,w:n})})})};i.forEach(function(e){o[e]={distance:e===t?0:1/0}});for(var c=i.length,u=1;u<c&&(a=!1,s++,d(),a);u++);if(s===c-1&&(a=!1,d(),a))throw Error("The graph contains a negative weight cycle");return o}(e,String(t),n||r,o||function(t){return e.outEdges(t)})};var r=()=>1}),c=n((e,t)=>{t.exports=function(e){var t,r={},n=[];return e.nodes().forEach(function(o){t=[],function n(o){Object.hasOwn(r,o)||(r[o]=!0,t.push(o),e.successors(o).forEach(n),e.predecessors(o).forEach(n))}(o),t.length&&n.push(t)}),n}}),u=n((e,t)=>{t.exports=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var r=this._keyIndices;if(!Object.hasOwn(r,e=String(e))){var n=this._arr,o=n.length;return r[e]=o,n.push({key:e,priority:t}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)}_heapify(e){var t=this._arr,r=2*e,n=r+1,o=e;r<t.length&&(o=t[r].priority<t[o].priority?r:o,n<t.length&&(o=t[n].priority<t[o].priority?n:o),o!==e&&(this._swap(e,o),this._heapify(o)))}_decrease(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var r=this._arr,n=this._keyIndices,o=r[e],a=r[t];r[e]=a,r[t]=o,n[a.key]=e,n[o.key]=t}}}),h=n((e,t)=>{var r=u();t.exports=function(e,t,o,a){return function(e,t,n,o){var a,s,i={},l=new r,d=function(e){var t=e.v!==a?e.v:e.w,r=i[t],o=n(e),d=s.distance+o;if(o<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);d<r.distance&&(r.distance=d,r.predecessor=a,l.decrease(t,d))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;i[e]={distance:r},l.add(e,r)});l.size()>0&&(s=i[a=l.removeMin()]).distance!==1/0;)o(a).forEach(d);return i}(e,String(t),o||n,a||function(t){return e.outEdges(t)})};var n=()=>1}),f=n((e,t)=>{var r=h();t.exports=function(e,t,n){return e.nodes().reduce(function(o,a){return o[a]=r(e,a,t,n),o},{})}}),p=n((e,t)=>{t.exports=function(e,t,r){if(void 0!==e[t].predecessor)throw Error("Invalid source vertex");if(void 0===e[r].predecessor&&r!==t)throw Error("Invalid destination vertex");return{weight:e[r].distance,path:function(e,t,r){for(var n=[],o=r;o!==t;)n.push(o),o=e[o].predecessor;return n.push(t),n.reverse()}(e,t,r)}}}),g=n((e,t)=>{t.exports=function(e){var t=0,r=[],n={},o=[];return e.nodes().forEach(function(a){Object.hasOwn(n,a)||function a(s){var i=n[s]={onStack:!0,lowlink:t,index:t++};if(r.push(s),e.successors(s).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(i.lowlink=Math.min(i.lowlink,n[e].index)):(a(e),i.lowlink=Math.min(i.lowlink,n[e].lowlink))}),i.lowlink===i.index){var l,d=[];do n[l=r.pop()].onStack=!1,d.push(l);while(s!==l)o.push(d)}}(a)}),o}}),m=n((e,t)=>{var r=g();t.exports=function(e){return r(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}}),x=n((e,t)=>{t.exports=function(e,t,n){var o,a,s,i,l;return o=e,a=t||r,s=n||function(t){return e.outEdges(t)},i={},(l=o.nodes()).forEach(function(e){i[e]={},i[e][e]={distance:0},l.forEach(function(t){e!==t&&(i[e][t]={distance:1/0})}),s(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=a(t);i[e][r]={distance:n,predecessor:e}})}),l.forEach(function(e){var t=i[e];l.forEach(function(r){var n=i[r];l.forEach(function(r){var o=n[e],a=t[r],s=n[r],i=o.distance+a.distance;i<s.distance&&(s.distance=i,s.predecessor=a.predecessor)})})}),i};var r=()=>1}),v=n((e,t)=>{function r(e){var t={},r={},o=[];if(e.sinks().forEach(function a(s){if(Object.hasOwn(r,s))throw new n;Object.hasOwn(t,s)||(r[s]=!0,t[s]=!0,e.predecessors(s).forEach(a),delete r[s],o.push(s))}),Object.keys(t).length!==e.nodeCount())throw new n;return o}var n=class extends Error{constructor(){super(...arguments)}};t.exports=r,r.CycleException=n}),y=n((e,t)=>{var r=v();t.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}}),b=n((e,t)=>{t.exports=function(e,t,r,n,o){Array.isArray(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),s={};return t.forEach(function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);o=function e(t,r,n,o,a,s,i){return Object.hasOwn(o,r)||(o[r]=!0,n||(i=s(i,r)),a(r).forEach(function(r){i=e(t,r,n,o,a,s,i)}),n&&(i=s(i,r))),i}(e,t,"post"===r,s,a,n,o)}),o}}),w=n((e,t)=>{var r=b();t.exports=function(e,t,n){return r(e,t,n,function(e,t){return e.push(t),e},[])}}),j=n((e,t)=>{var r=w();t.exports=function(e,t){return r(e,t,"post")}}),k=n((e,t)=>{var r=w();t.exports=function(e,t){return r(e,t,"pre")}}),E=n((e,t)=>{var r=a(),n=u();t.exports=function(e,t){var o,a=new r,s={},i=new n;function l(e){var r=e.v===o?e.w:e.v,n=i.priority(r);if(void 0!==n){var a=t(e);a<n&&(s[r]=o,i.decrease(r,a))}}if(0===e.nodeCount())return a;e.nodes().forEach(function(e){i.add(e,1/0),a.setNode(e)}),i.decrease(e.nodes()[0],0);for(var d=!1;i.size()>0;){if(Object.hasOwn(s,o=i.removeMin()))a.setEdge(o,s[o]);else{if(d)throw Error("Input graph is not connected: "+e);d=!0}e.nodeEdges(o).forEach(l)}return a}}),N=n((e,t)=>{var r=h(),n=d();t.exports=function(e,t,o,a){return function(e,t,o,a){if(void 0===o)return r(e,t,o,a);for(var s=!1,i=e.nodes(),l=0;l<i.length;l++){for(var d=a(i[l]),c=0;c<d.length;c++){var u=d[c],h=u.v===i[l]?u.v:u.w,f=h===u.v?u.w:u.v;0>o({v:h,w:f})&&(s=!0)}if(s)return n(e,t,o,a)}return r(e,t,o,a)}(e,t,o,a||function(t){return e.outEdges(t)})}}),C=n((e,t)=>{t.exports={bellmanFord:d(),components:c(),dijkstra:h(),dijkstraAll:f(),extractPath:p(),findCycles:m(),floydWarshall:x(),isAcyclic:y(),postorder:j(),preorder:k(),prim:E(),shortestPaths:N(),reduce:b(),tarjan:g(),topsort:v()}}),_=i();t.exports={Graph:_.Graph,json:l(),alg:C(),version:_.version}}),s=o((e,t)=>{function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}}}),i=o((e,t)=>{var r=a().Graph,n=s();t.exports=function(e,t){var a,s;let d,c,u,h,f;if(1>=e.nodeCount())return[];let p=(a=e,s=t||o,d=new r,c=0,u=0,a.nodes().forEach(e=>{d.setNode(e,{v:e,in:0,out:0})}),a.edges().forEach(e=>{let t=d.edge(e.v,e.w)||0,r=s(e);d.setEdge(e.v,e.w,t+r),u=Math.max(u,d.node(e.v).out+=r),c=Math.max(c,d.node(e.w).in+=r)}),h=(function(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t})(u+c+3).map(()=>new n),f=c+1,d.nodes().forEach(e=>{l(h,f,d.node(e))}),{graph:d,buckets:h,zeroIdx:f});return(function(e,t,r){let n=[],o=t[t.length-1],a=t[0],s;for(;e.nodeCount();){for(;s=a.dequeue();)i(e,t,r,s);for(;s=o.dequeue();)i(e,t,r,s);if(e.nodeCount()){for(let o=t.length-2;o>0;--o)if(s=t[o].dequeue()){n=n.concat(i(e,t,r,s,!0));break}}}return n})(p.graph,p.buckets,p.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};var o=()=>1;function i(e,t,r,n,o){let a=o?[]:void 0;return e.inEdges(n.v).forEach(n=>{let s=e.edge(n),i=e.node(n.v);o&&a.push({v:n.v,w:n.w}),i.out-=s,l(t,r,i)}),e.outEdges(n.v).forEach(n=>{let o=e.edge(n),a=n.w,s=e.node(a);s.in-=o,l(t,r,s)}),e.removeNode(n.v),a}function l(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}}),l=o((e,t)=>{var r=a().Graph;function n(e,t,r,n){for(var o=n;e.hasNode(o);)o=l(n);return r.dummy=t,e.setNode(o,r),o}t.exports={addBorderNode:function(e,t,r,o){let a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=o),n(e,"border",a,t)},addDummyNode:n,applyWithChunking:o,asNonCompoundGraph:function(e){let t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t},buildLayerMatrix:function(e){let t=d(s(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),o=n.rank;void 0!==o&&(t[o][n.order]=r)}),t},intersectRect:function(e,t){let r,n,o=e.x,a=e.y,s=t.x-o,i=t.y-a,l=e.width/2,d=e.height/2;if(!s&&!i)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(i)*l>Math.abs(s)*d?(i<0&&(d=-d),r=d*s/i,n=d):(s<0&&(l=-l),r=l,n=l*i/s),{x:o+r,y:a+n}},mapValues:function(e,t){let r=t;return"string"==typeof t&&(r=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=r(n,t),e),{})},maxRank:s,normalizeRanks:function(e){let t=o(Math.min,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?Number.MAX_VALUE:r}));e.nodes().forEach(r=>{let n=e.node(r);Object.hasOwn(n,"rank")&&(n.rank-=t)})},notime:function(e,t){return t()},partition:function(e,t){let r={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?r.lhs.push(e):r.rhs.push(e)}),r},pick:function(e,t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r},predecessorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.inEdges(t).forEach(t=>{r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},range:d,removeEmptyRanks:function(e){let t=o(Math.min,e.nodes().map(t=>e.node(t).rank).filter(e=>void 0!==e)),r=[];e.nodes().forEach(n=>{let o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)});let n=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,r)=>{void 0===t&&r%a!=0?--n:void 0!==t&&n&&t.forEach(t=>e.node(t).rank+=n)})},simplify:function(e){let t=new r().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.outEdges(t).forEach(t=>{r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},time:function(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}},uniqueId:l,zipObject:c};function o(e,t){if(!(t.length>65535))return e.apply(null,t);{let r=function(e,t=65535){let r=[];for(let n=0;n<e.length;n+=t){let o=e.slice(n,n+t);r.push(o)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}}function s(e){return o(Math.max,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?5e-324:r}))}var i=0;function l(e){return e+""+ ++i}function d(e,t,r=1){null==t&&(t=e,e=0);let n=e=>e<t;r<0&&(n=e=>t<e);let o=[];for(let t=e;n(t);t+=r)o.push(t);return o}function c(e,t){return e.reduce((e,r,n)=>(e[r]=t[n],e),{})}}),d=o((e,t)=>{var r=i(),n=l().uniqueId;t.exports={run:function(e){var t,o;let a,s,i;("greedy"===e.graph().acyclicer?r(e,(t=e,e=>t.edge(e).weight)):(a=[],s={},i={},(o=e).nodes().forEach(function e(t){Object.hasOwn(i,t)||(i[t]=!0,s[t]=!0,o.outEdges(t).forEach(t=>{Object.hasOwn(s,t.w)?a.push(t):e(t.w)}),delete s[t])}),a)).forEach(t=>{let r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n("rev"))})},undo:function(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}}),c=o((e,t)=>{var r=l();t.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>(function(e,t){let n,o,a,s=t.v,i=e.node(s).rank,l=t.w,d=e.node(l).rank,c=t.name,u=e.edge(t),h=u.labelRank;if(d!==i+1){for(e.removeEdge(t),a=0,++i;i<d;++a,++i)u.points=[],o={width:0,height:0,edgeLabel:u,edgeObj:t,rank:i},n=r.addDummyNode(e,"edge",o,"_d"),i===h&&(o.width=u.width,o.height=u.height,o.dummy="edge-label",o.labelpos=u.labelpos),e.setEdge(s,n,{weight:u.weight},c),0===a&&e.graph().dummyChains.push(n),s=n;e.setEdge(s,l,{weight:u.weight},c)}})(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,o;for(e.setEdge(r.edgeObj,n);r.dummy;)o=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=o,r=e.node(t)})}}}),u=o((e,t)=>{var{applyWithChunking:r}=l();t.exports={longestPath:function(e){var t={};e.sources().forEach(function n(o){var a=e.node(o);if(Object.hasOwn(t,o))return a.rank;t[o]=!0;var s=r(Math.min,e.outEdges(o).map(t=>null==t?1/0:n(t.w)-e.edge(t).minlen));return s===1/0&&(s=0),a.rank=s})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}),h=o((e,t)=>{var r=a().Graph,n=u().slack;t.exports=function(e){var t,o,a,s,i=new r({directed:!1}),l=e.nodes()[0],d=e.nodeCount();for(i.setNode(l,{});t=i,o=e,t.nodes().forEach(function e(r){o.nodeEdges(r).forEach(a=>{var s=a.v,i=r===s?a.w:s;t.hasNode(i)||n(o,a)||(t.setNode(i,{}),t.setEdge(r,i,{}),e(i))})}),t.nodeCount()<d;)a=function(e,t){return t.edges().reduce((r,o)=>{let a=1/0;return e.hasNode(o.v)!==e.hasNode(o.w)&&(a=n(t,o)),a<r[0]?[a,o]:r},[1/0,null])[1]}(i,e),s=i.hasNode(a.v)?n(e,a):-n(e,a),function(e,t,r){e.nodes().forEach(e=>t.node(e).rank+=r)}(i,e,s);return i}}),f=o((e,t)=>{var r=h(),n=u().slack,o=u().longestPath,s=a().alg.preorder,i=a().alg.postorder,d=l().simplify;function c(e){o(e=d(e));var t,n,a=r(e);for(g(a),f(a,e);t=m(a);)n=x(a,e,t),v(a,e,t,n)}function f(e,t){var r=i(e,e.nodes());(r=r.slice(0,r.length-1)).forEach(r=>{var n,o,a,s;return n=e,o=t,a=r,s=n.node(a).parent,void(n.edge(a,s).cutvalue=p(n,o,a))})}function p(e,t,r){var n=e.node(r).parent,o=!0,a=t.edge(r,n),s=0;return a||(o=!1,a=t.edge(n,r)),s=a.weight,t.nodeEdges(r).forEach(a=>{var i=a.v===r,l=i?a.w:a.v;if(l!==n){var d,c,u,h=i===o,f=t.edge(a).weight;if(s+=h?f:-f,d=e,c=r,u=l,d.hasEdge(c,u)){var p=e.edge(r,l).cutvalue;s+=h?-p:p}}}),s}function g(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,o,a){var s=n,i=t.node(o);return r[o]=!0,t.neighbors(o).forEach(a=>{Object.hasOwn(r,a)||(n=e(t,r,n,a,o))}),i.low=s,i.lim=n++,a?i.parent=a:delete i.parent,n}(e,{},1,t)}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function x(e,t,r){var o=r.v,a=r.w;t.hasEdge(o,a)||(o=r.w,a=r.v);var s=e.node(o),i=e.node(a),l=s,d=!1;return s.lim>i.lim&&(l=i,d=!0),t.edges().filter(t=>d===y(e,e.node(t.v),l)&&d!==y(e,e.node(t.w),l)).reduce((e,r)=>n(t,r)<n(t,e)?r:e)}function v(e,t,r,n){var o,a,i,l,d=r.v,c=r.w;e.removeEdge(d,c),e.setEdge(n.v,n.w,{}),g(e),f(e,t),o=e,a=t,i=o.nodes().find(e=>!a.node(e).parent),(l=(l=s(o,i)).slice(1)).forEach(e=>{var t=o.node(e).parent,r=a.edge(e,t),n=!1;r||(r=a.edge(t,e),n=!0),a.node(e).rank=a.node(t).rank+(n?r.minlen:-r.minlen)})}function y(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}t.exports=c,c.initLowLimValues=g,c.initCutValues=f,c.calcCutValue=p,c.leaveEdge=m,c.enterEdge=x,c.exchangeEdges=v}),p=o((e,t)=>{var r=u().longestPath,n=h(),o=f();t.exports=function(e){var t,s=e.graph().ranker;if(s instanceof Function)return s(e);switch(e.graph().ranker){case"network-simplex":default:o(e);break;case"tight-tree":r(t=e),n(t);break;case"longest-path":a(e);case"none":}};var a=r}),g=o((e,t)=>{t.exports=function(e){var t;let r,n,o=(r={},n=0,(t=e).children().forEach(function e(o){let a=n;t.children(o).forEach(e),r[o]={low:a,lim:n++}}),r);e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeObj,a=function(e,t,r,n){let o=[],a=[],s=Math.min(t[r].low,t[n].low),i=Math.max(t[r].lim,t[n].lim),l,d;l=r;do o.push(l=e.parent(l));while(l&&(t[l].low>s||i>t[l].lim))for(d=l,l=n;(l=e.parent(l))!==d;)a.push(l);return{path:o.concat(a.reverse()),lca:d}}(e,o,n.v,n.w),s=a.path,i=a.lca,l=0,d=s[0],c=!0;for(;t!==n.w;){if(r=e.node(t),c){for(;(d=s[l])!==i&&e.node(d).maxRank<r.rank;)l++;d===i&&(c=!1)}if(!c){for(;l<s.length-1&&e.node(d=s[l+1]).minRank<=r.rank;)l++;d=s[l]}e.setParent(t,d),t=e.successors(t)[0]}})}}),m=o((e,t)=>{var r=l();t.exports={run:function(e){var t,n,o;let a=r.addDummyNode(e,"root",{},"_root"),s=(n={},(t=e).children().forEach(e=>(function e(r,o){var a=t.children(r);a&&a.length&&a.forEach(t=>e(t,o+1)),n[r]=o})(e,1)),n),i=Object.values(s),l=r.applyWithChunking(Math.max,i)-1,d=2*l+1;e.graph().nestingRoot=a,e.edges().forEach(t=>e.edge(t).minlen*=d);let c=(o=e).edges().reduce((e,t)=>e+o.edge(t).weight,0)+1;e.children().forEach(t=>(function e(t,n,o,a,s,i,l){let d=t.children(l);if(!d.length){l!==n&&t.setEdge(n,l,{weight:0,minlen:o});return}let c=r.addBorderNode(t,"_bt"),u=r.addBorderNode(t,"_bb"),h=t.node(l);t.setParent(c,l),h.borderTop=c,t.setParent(u,l),h.borderBottom=u,d.forEach(r=>{e(t,n,o,a,s,i,r);let d=t.node(r),h=d.borderTop?d.borderTop:r,f=d.borderBottom?d.borderBottom:r,p=d.borderTop?a:2*a,g=h!==f?1:s-i[l]+1;t.setEdge(c,h,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(f,u,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(l)||t.setEdge(n,c,{weight:0,minlen:s+i[l]})})(e,a,d,c,l,s,t)),e.graph().nodeRankFactor=d},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}),x=o((e,t)=>{var r=l();function n(e,t,n,o,a,s){let i=a[t][s-1],l=r.addDummyNode(e,"border",{width:0,height:0,rank:s,borderType:t},n);a[t][s]=l,e.setParent(l,o),i&&e.setEdge(i,l,{weight:1})}t.exports=function(e){e.children().forEach(function t(r){let o=e.children(r),a=e.node(r);if(o.length&&o.forEach(t),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,o=a.maxRank+1;t<o;++t)n(e,"borderLeft","_bl",r,a,t),n(e,"borderRight","_br",r,a,t)}})}}),v=o((e,t)=>{function r(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>n(e.edge(t)))}function n(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.y=-e.y}function a(e){let t=e.x;e.x=e.y,e.y=t}t.exports={adjust:function(e){let t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&r(e)},undo:function(e){var t,n;let s=e.graph().rankdir.toLowerCase();("bt"===s||"rl"===s)&&((t=e).nodes().forEach(e=>o(t.node(e))),t.edges().forEach(e=>{let r=t.edge(e);r.points.forEach(o),Object.hasOwn(r,"y")&&o(r)})),("lr"===s||"rl"===s)&&((n=e).nodes().forEach(e=>a(n.node(e))),n.edges().forEach(e=>{let t=n.edge(e);t.points.forEach(a),Object.hasOwn(t,"x")&&a(t)}),r(e))}}}),y=o((e,t)=>{var r=l();t.exports=function(e){let t={},n=e.nodes().filter(t=>!e.children(t).length),o=n.map(t=>e.node(t).rank),a=r.applyWithChunking(Math.max,o),s=r.range(a+1).map(()=>[]);return n.sort((t,r)=>e.node(t).rank-e.node(r).rank).forEach(function r(n){t[n]||(t[n]=!0,s[e.node(n).rank].push(n),e.successors(n).forEach(r))}),s}}),b=o((e,t)=>{var r=l().zipObject;t.exports=function(e,t){let n=0;for(let o=1;o<t.length;++o)n+=function(e,t,n){let o=r(n,n.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:o[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),s=1;for(;s<n.length;)s<<=1;let i=2*s-1;s-=1;let l=Array(i).fill(0),d=0;return a.forEach(e=>{let t=e.pos+s;l[t]+=e.weight;let r=0;for(;t>0;)t%2&&(r+=l[t+1]),t=t-1>>1,l[t]+=e.weight;d+=e.weight*r}),d}(e,t[o-1],t[o]);return n}}),w=o((e,t)=>{t.exports=function(e,t=[]){return t.map(t=>{let r=e.inEdges(t);if(!r.length)return{v:t};{let n=r.reduce((t,r)=>{let n=e.edge(r),o=e.node(r.v);return{sum:t.sum+n.weight*o.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}})}}),j=o((e,t)=>{var r=l();t.exports=function(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];void 0!==t&&void 0!==r&&(r.indegree++,t.out.push(n[e.w]))}),function(e){let t=[];for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(function(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),r.out.forEach(function(t){return r=>{r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return t.filter(e=>!e.merged).map(e=>r.pick(e,["vs","i","barycenter","weight"]))}(Object.values(n).filter(e=>!e.indegree))}}),k=o((e,t)=>{var r=l();function n(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}t.exports=function(e,t){var o;let a=r.partition(e,e=>Object.hasOwn(e,"barycenter")),s=a.lhs,i=a.rhs.sort((e,t)=>t.i-e.i),l=[],d=0,c=0,u=0;s.sort((o=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:o?t.i-e.i:e.i-t.i)),u=n(l,i,u),s.forEach(e=>{u+=e.vs.length,l.push(e.vs),d+=e.barycenter*e.weight,c+=e.weight,u=n(l,i,u)});let h={vs:l.flat(!0)};return c&&(h.barycenter=d/c,h.weight=c),h}}),E=o((e,t)=>{var r=w(),n=j(),o=k();t.exports=function e(t,a,s,i){var l,d;let c=t.children(a),u=t.node(a),h=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};h&&(c=c.filter(e=>e!==h&&e!==f));let g=r(t,c);g.forEach(r=>{if(t.children(r.v).length){var n,o;let a=e(t,r.v,s,i);p[r.v]=a,Object.hasOwn(a,"barycenter")&&(n=r,o=a,void 0!==n.barycenter?(n.barycenter=(n.barycenter*n.weight+o.barycenter*o.weight)/(n.weight+o.weight),n.weight+=o.weight):(n.barycenter=o.barycenter,n.weight=o.weight))}});let m=n(g,s);l=m,d=p,l.forEach(e=>{e.vs=e.vs.flatMap(e=>d[e]?d[e].vs:e)});let x=o(m,i);if(h&&(x.vs=[h,x.vs,f].flat(!0),t.predecessors(h).length)){let e=t.node(t.predecessors(h)[0]),r=t.node(t.predecessors(f)[0]);Object.hasOwn(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+e.order+r.order)/(x.weight+2),x.weight+=2}return x}}),N=o((e,t)=>{var r=a().Graph,n=l();t.exports=function(e,t,o,a){a||(a=e.nodes());let s=function(e){for(var t;e.hasNode(t=n.uniqueId("_root")););return t}(e),i=new r({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(t=>e.node(t));return a.forEach(r=>{let n=e.node(r),a=e.parent(r);(n.rank===t||n.minRank<=t&&t<=n.maxRank)&&(i.setNode(r),i.setParent(r,a||s),e[o](r).forEach(t=>{let n=t.v===r?t.w:t.v,o=i.edge(n,r),a=void 0!==o?o.weight:0;i.setEdge(n,r,{weight:e.edge(t).weight+a})}),Object.hasOwn(n,"minRank")&&i.setNode(r,{borderLeft:n.borderLeft[t],borderRight:n.borderRight[t]}))}),i}}),C=o((e,t)=>{t.exports=function(e,t,r){let n={},o;r.forEach(r=>{let a=e.parent(r),s,i;for(;a;){if((s=e.parent(a))?(i=n[s],n[s]=a):(i=o,o=a),i&&i!==a)return void t.setEdge(i,a);a=s}})}}),_=o((e,t)=>{var r=y(),n=b(),o=E(),s=N(),i=C(),d=a().Graph,c=l();function u(e,t,r){let n=new Map,o=(e,t)=>{n.has(e)||n.set(e,[]),n.get(e).push(t)};for(let t of e.nodes()){let r=e.node(t);if("number"==typeof r.rank&&o(r.rank,t),"number"==typeof r.minRank&&"number"==typeof r.maxRank)for(let e=r.minRank;e<=r.maxRank;e++)e!==r.rank&&o(e,t)}return t.map(function(t){return s(e,t,r,n.get(t)||[])})}function h(e,t){Object.values(t).forEach(t=>t.forEach((t,r)=>e.node(t).order=r))}t.exports=function e(t,a={}){if("function"==typeof a.customOrder)return void a.customOrder(t,e);let s=c.maxRank(t),l=u(t,c.range(1,s+1),"inEdges"),f=u(t,c.range(s-1,-1,-1),"outEdges"),p=r(t);if(h(t,p),a.disableOptimalOrderHeuristic)return;let g=1/0,m,x=a.constraints||[];for(let e=0,r=0;r<4;++e,++r){(function(e,t,r){let n=new d;e.forEach(function(e){r.forEach(e=>n.setEdge(e.left,e.right));let a=e.graph().root,s=o(e,a,n,t);s.vs.forEach((t,r)=>e.node(t).order=r),i(e,n,s.vs)})})(e%2?l:f,e%4>=2,x),p=c.buildLayerMatrix(t);let a=n(t,p);a<g?(r=0,m=Object.assign({},p),g=a):a===g&&(m=structuredClone(p))}h(t,m)}}),O=o((e,t)=>{var r=a().Graph,n=l();function o(e,t){let r={};return t.length&&t.reduce(function(t,n){let o=0,a=0,s=t.length,l=n[n.length-1];return n.forEach((t,d)=>{let c=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),u=c?e.node(c).order:s;(c||t===l)&&(n.slice(a,d+1).forEach(t=>{e.predecessors(t).forEach(n=>{let a=e.node(n),s=a.order;(s<o||u<s)&&!(a.dummy&&e.node(t).dummy)&&i(r,n,t)})}),a=d+1,o=u)}),n}),r}function s(e,t){let r={};function o(t,o,a,s,l){let d;n.range(o,a).forEach(n=>{d=t[n],e.node(d).dummy&&e.predecessors(d).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<s||n.order>l)&&i(r,t,d)})})}return t.length&&t.reduce(function(t,r){let n=-1,a,s=0;return r.forEach((i,l)=>{if("border"===e.node(i).dummy){let t=e.predecessors(i);t.length&&(a=e.node(t[0]).order,o(r,s,l,n,a),s=l,n=a)}o(r,s,r.length,a,t.length)}),r}),r}function i(e,t,r){if(t>r){let e=t;t=r,r=e}let n=e[t];n||(e[t]=n={}),n[r]=!0}function d(e,t,r){if(t>r){let e=t;t=r,r=e}return!!e[t]&&Object.hasOwn(e[t],r)}function c(e,t,r,n){let o={},a={},s={};return t.forEach(e=>{e.forEach((e,t)=>{o[e]=e,a[e]=e,s[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let i=n(e);if(i.length){let n=((i=i.sort((e,t)=>s[e]-s[t])).length-1)/2;for(let l=Math.floor(n),c=Math.ceil(n);l<=c;++l){let n=i[l];a[e]===e&&t<s[n]&&!d(r,e,n)&&(a[n]=e,a[e]=o[e]=o[n],t=s[n])}}})}),{root:o,align:a}}function u(e,t,n,o,a){var s,i,l,d,c,u,h;let f,p,g,m={},x=(s=e,i=t,l=n,d=a,f=new r,g=(c=(p=s.graph()).nodesep,u=p.edgesep,h=d,(e,t,r)=>{let n=e.node(t),o=e.node(r),a,s;if(a=0+n.width/2,Object.hasOwn(n,"labelpos"))switch(n.labelpos.toLowerCase()){case"l":s=-n.width/2;break;case"r":s=n.width/2}if(s&&(a+=h?s:-s),s=0,a+=(n.dummy?u:c)/2,a+=(o.dummy?u:c)/2,a+=o.width/2,Object.hasOwn(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":s=o.width/2;break;case"r":s=-o.width/2}return s&&(a+=h?s:-s),s=0,a}),i.forEach(e=>{let t;e.forEach(e=>{let r=l[e];if(f.setNode(r),t){var n=l[t],o=f.edge(n,r);f.setEdge(n,r,Math.max(g(s,e,t),o||0))}t=e})}),f),v=a?"borderLeft":"borderRight";function y(e,t){let r=x.nodes().slice(),n={},o=r.pop();for(;o;){if(n[o])e(o);else for(let e of(n[o]=!0,r.push(o),t(o)))r.push(e);o=r.pop()}}return y(function(e){m[e]=x.inEdges(e).reduce((e,t)=>Math.max(e,m[t.v]+x.edge(t)),0)},x.predecessors.bind(x)),y(function(t){let r=x.outEdges(t).reduce((e,t)=>Math.min(e,m[t.w]-x.edge(t)),1/0),n=e.node(t);r!==1/0&&n.borderType!==v&&(m[t]=Math.max(m[t],r))},x.successors.bind(x)),Object.keys(o).forEach(e=>m[e]=m[n[e]]),m}function h(e,t){return Object.values(t).reduce((t,r)=>{let n=-1/0,o=1/0;Object.entries(r).forEach(([t,r])=>{var a,s;let i=(a=e,s=t,a.node(s).width/2);n=Math.max(r+i,n),o=Math.min(r-i,o)});let a=n-o;return a<t[0]&&(t=[a,r]),t},[1/0,null])[1]}function f(e,t){let r=Object.values(t),o=n.applyWithChunking(Math.min,r),a=n.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(s=>{let i=r+s,l=e[i];if(l===t)return;let d=Object.values(l),c=o-n.applyWithChunking(Math.min,d);"l"!==s&&(c=a-n.applyWithChunking(Math.max,d)),c&&(e[i]=n.mapValues(l,e=>e+c))})})}function p(e,t){return n.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}t.exports={positionX:function(e){let t=n.buildLayerMatrix(e),r=Object.assign(o(e,t),s(e,t)),a={},i;["u","d"].forEach(o=>{i="u"===o?t:Object.values(t).reverse(),["l","r"].forEach(t=>{"r"===t&&(i=i.map(e=>Object.values(e).reverse()));let s=("u"===o?e.predecessors:e.successors).bind(e),l=c(e,i,r,s),d=u(e,i,l.root,l.align,"r"===t);"r"===t&&(d=n.mapValues(d,e=>-e)),a[o+t]=d})});let l=h(e,a);return f(a,l),p(a,e.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:i,hasConflict:d,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:f,findSmallestWidthAlignment:h,balance:p}}),M=o((e,t)=>{var r=l(),n=O().positionX;t.exports=function(e){var t;let o,a,s,i;t=e=r.asNonCompoundGraph(e),o=r.buildLayerMatrix(t),a=t.graph().ranksep,s=t.graph().rankalign,i=0,o.forEach(e=>{let r=e.reduce((e,r)=>{let n=t.node(r).height;return e>n?e:n},0);e.forEach(e=>{let n=t.node(e);"top"===s?n.y=i+n.height/2:"bottom"===s?n.y=i+r-n.height/2:n.y=i+r/2}),i+=r+a}),Object.entries(n(e)).forEach(([t,r])=>e.node(t).x=r)}}),R=o((e,t)=>{var r=d(),n=c(),o=p(),s=l().normalizeRanks,i=g(),u=l().removeEmptyRanks,h=m(),f=x(),y=v(),b=_(),w=M(),j=l(),k=a().Graph;t.exports=function(e,t={}){let a=t.debugTiming?j.time:j.notime;return a("layout",()=>{let l=a(" buildLayoutGraph",()=>{var t;let r,n;return t=e,r=new k({multigraph:!0,compound:!0}),n=I(t.graph()),r.setGraph(Object.assign({},N,T(n,E),j.pick(n,C))),t.nodes().forEach(e=>{let n=T(I(t.node(e)),O);Object.keys(R).forEach(e=>{void 0===n[e]&&(n[e]=R[e])}),r.setNode(e,n),r.setParent(e,t.parent(e))}),t.edges().forEach(e=>{let n=I(t.edge(e));r.setEdge(e,Object.assign({},P,T(n,S),j.pick(n,L)))}),r});return a(" runLayout",()=>{var e,d,c;return e=l,d=a,c=t,void(d(" makeSpaceForEdgeLabels",()=>{var t;let r;return r=(t=e).graph(),void(r.ranksep/=2,t.edges().forEach(e=>{let n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),d(" removeSelfEdges",()=>{var t;(t=e).edges().forEach(e=>{if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),d(" acyclic",()=>r.run(e)),d(" nestingGraph.run",()=>h.run(e)),d(" rank",()=>o(j.asNonCompoundGraph(e))),d(" injectEdgeLabelProxies",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(r.width&&r.height){let r=t.node(e.v),n={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};j.addDummyNode(t,"edge-proxy",n,"_ep")}})}),d(" removeEmptyRanks",()=>u(e)),d(" nestingGraph.cleanup",()=>h.cleanup(e)),d(" normalizeRanks",()=>s(e)),d(" assignRankMinMax",()=>{var t;let r;return r=0,void((t=e).nodes().forEach(e=>{let n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=Math.max(r,n.maxRank))}),t.graph().maxRank=r)}),d(" removeEdgeLabelProxies",()=>{var t;(t=e).nodes().forEach(e=>{let r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),d(" normalize.run",()=>n.run(e)),d(" parentDummyChains",()=>i(e)),d(" addBorderSegments",()=>f(e)),d(" order",()=>b(e,c)),d(" insertSelfEdges",()=>{var t;return t=e,void j.buildLayerMatrix(t).forEach(e=>{var r=0;e.forEach((e,n)=>{var o=t.node(e);o.order=n+r,(o.selfEdges||[]).forEach(e=>{j.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}),d(" adjustCoordinateSystem",()=>y.adjust(e)),d(" position",()=>w(e)),d(" positionSelfEdges",()=>{var t;(t=e).nodes().forEach(e=>{var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),o=n.x+n.width/2,a=n.y,s=r.x-o,i=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:o+2*s/3,y:a-i},{x:o+5*s/6,y:a-i},{x:o+s,y:a},{x:o+5*s/6,y:a+i},{x:o+2*s/3,y:a+i}],r.label.x=r.x,r.label.y=r.y}})}),d(" removeBorderNodes",()=>{var t;(t=e).nodes().forEach(e=>{if(t.children(e).length){let r=t.node(e),n=t.node(r.borderTop),o=t.node(r.borderBottom),a=t.node(r.borderLeft[r.borderLeft.length-1]),s=t.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(s.x-a.x),r.height=Math.abs(o.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}),d(" normalize.undo",()=>n.undo(e)),d(" fixupEdgeLabelCoords",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(Object.hasOwn(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),d(" undoCoordinateSystem",()=>y.undo(e)),d(" translateGraph",()=>(function(e){let t=1/0,r=0,n=1/0,o=0,a=e.graph(),s=a.marginx||0,i=a.marginy||0;function l(e){let a=e.x,s=e.y,i=e.width,l=e.height;t=Math.min(t,a-i/2),r=Math.max(r,a+i/2),n=Math.min(n,s-l/2),o=Math.max(o,s+l/2)}e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);Object.hasOwn(r,"x")&&l(r)}),t-=s,n-=i,e.nodes().forEach(r=>{let o=e.node(r);o.x-=t,o.y-=n}),e.edges().forEach(r=>{let o=e.edge(r);o.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(o,"x")&&(o.x-=t),Object.hasOwn(o,"y")&&(o.y-=n)}),a.width=r-t+s,a.height=o-n+i})(e)),d(" assignNodeIntersects",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e),n=t.node(e.v),o=t.node(e.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=o,s=n),r.points.unshift(j.intersectRect(n,a)),r.points.push(j.intersectRect(o,s))})}),d(" reversePoints",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);r.reversed&&r.points.reverse()})}),d(" acyclic.undo",()=>r.undo(e)))}),a(" updateInputGraph",()=>{var t,r;return t=e,r=l,void(t.nodes().forEach(e=>{let n=t.node(e),o=r.node(e);n&&(n.x=o.x,n.y=o.y,n.order=o.order,n.rank=o.rank,r.children(e).length&&(n.width=o.width,n.height=o.height))}),t.edges().forEach(e=>{let n=t.edge(e),o=r.edge(e);n.points=o.points,Object.hasOwn(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height)}),l})};var E=["nodesep","edgesep","ranksep","marginx","marginy"],N={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},C=["acyclicer","ranker","rankdir","align","rankalign"],O=["width","height","rank"],R={width:0,height:0},S=["minlen","weight","width","height","labeloffset"],P={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function T(e,t){return j.mapValues(j.pick(e,t),Number)}function I(e){var t={};return e&&Object.entries(e).forEach(([e,r])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=r}),t}}),S=o((e,t)=>{var r=l(),n=a().Graph;t.exports={debugOrdering:function(e){let t=r.buildLayerMatrix(e),o=new n({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{o.setNode(t,{label:t}),o.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>o.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{o.setNode("layer"+t,{rank:"same"}),e.reduce((e,t)=>(o.setEdge(e,t,{style:"invis"}),t))}),o}}}),P=o((e,t)=>{t.exports="2.0.4"});let L=o((e,t)=>{t.exports={graphlib:a(),layout:R(),debug:S(),util:{time:l().time,notime:l().notime},version:P()}})(),T={direction:"LR",ranksep:200,nodesep:15},I={featureNode:{width:288,height:140},repositoryNode:{width:328,height:50}};function D(e,t){let r=e.data;return r&&"number"==typeof r.width&&"number"==typeof r.height?{width:r.width,height:r.height}:I[e.type??""]??t}function A(e,t,r={}){let{direction:n="TB",nodeSize:o={width:172,height:36},ranksep:a=80,nodesep:s=30}=r;if(0===e.length)return{nodes:[],edges:[]};let i=new L.graphlib.Graph({multigraph:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:n,ranksep:a,nodesep:s});let l=new Set;for(let e of t)l.add(e.source),l.add(e.target);let d=e.filter(e=>l.has(e.id)),c=e.filter(e=>!l.has(e.id));for(let e of d){let t=D(e,o);i.setNode(e.id,{width:t.width,height:t.height})}for(let e of t)i.hasNode(e.source)&&i.hasNode(e.target)&&i.setEdge(e.source,e.target,{},e.id);L.layout(i);let{targetPosition:u,sourcePosition:h}=function(e){switch(e){case"LR":return{targetPosition:"left",sourcePosition:"right"};case"RL":return{targetPosition:"right",sourcePosition:"left"};case"BT":return{targetPosition:"bottom",sourcePosition:"top"};default:return{targetPosition:"top",sourcePosition:"bottom"}}}(n),f="LR"===n||"RL"===n,p=new Map;for(let e of d){let t=i.node(e.id),r=D(e,o);p.set(e.id,{cx:t.x,cy:t.y,w:r.width,h:r.height})}let g=0;for(let e of p.values()){g=f?e.cx:e.cy;break}for(let e of c){let t=D(e,o);p.set(e.id,{cx:f?g:0,cy:f?0:g,w:t.width,h:t.height})}let m=new Map;for(let e of t)p.has(e.source)&&p.has(e.target)&&(m.has(e.source)||m.set(e.source,[]),m.get(e.source).push(e.target));let x=new Map;for(let t=0;t<e.length;t++)x.set(e[t].id,t);for(let[,e]of m)e.sort((e,t)=>(x.get(e)??0)-(x.get(t)??0));let v=new Set;for(let e of m.values())for(let t of e)v.add(t);let y=[...[...l].filter(e=>p.has(e)&&!v.has(e)),...c.map(e=>e.id)];y.sort((e,t)=>(x.get(e)??0)-(x.get(t)??0));let b=new Map;for(let e of y)!function e(t){if(b.has(t))return b.get(t);let r=p.get(t),n=f?r.h:r.w,o=m.get(t);if(!o||0===o.length)return b.set(t,n),n;let a=0;for(let t of o)a+=e(t);let i=Math.max(n,a+=(o.length-1)*s);return b.set(t,i),i}(e);let w=0;for(let e of y){let t=b.get(e)??0;!function e(t,r){let n=p.get(t);f?n.cy=r:n.cx=r;let o=m.get(t);if(!o||0===o.length)return;let a=0;for(let e of o)a+=b.get(e)??0;let i=r-(a+=(o.length-1)*s)/2;for(let t of o){let r=b.get(t)??0;e(t,i+r/2),i+=r+s}}(e,w+t/2),w+=t+s}let j=[];for(let t of e){let e=p.get(t.id);e&&j.push({...t,targetPosition:u,sourcePosition:h,position:{x:e.cx-e.w/2,y:e.cy-e.h/2}})}return{nodes:j,edges:[...t]}}var F=e.i(58089),$=e.i(21023);let z=(0,$.createServerReference)("400ddd88aec26491140409627bd00fe94e8fdd949f",$.callServer,void 0,$.findSourceMapURL,"addRepository"),B=(0,$.createServerReference)("40def591a406f9e6ea5e2e2ac7e938509e71d329bc",$.callServer,void 0,$.findSourceMapURL,"deleteRepository"),G=(0,$.createServerReference)("4061003b0fba3b211b3f70dc4f19caa196d58a06a5",$.callServer,void 0,$.findSourceMapURL,"getFeatureMetadata"),q=(0,$.createServerReference)("00d3c456fd85e65c4440ef5f07d3f2e866669a0367",$.callServer,void 0,$.findSourceMapURL,"fetchGraphData");var W=e.i(39443),V=e.i(8361),U=e.i(18354),H=e.i(99045);function X(e,t){let r=new Map;for(let e of t)"dependencyEdge"===e.type&&r.set(e.target,e.source);let n=new Map,o=new Map;for(let t of e)"featureNode"===t.type?n.set(t.id,{nodeId:t.id,data:t.data,parentNodeId:r.get(t.id)}):"repositoryNode"===t.type&&o.set(t.id,{nodeId:t.id,data:t.data});return{featureMap:n,repoMap:o}}function K(e,t){return(void 0===t.state||t.state===e.state)&&(void 0===t.lifecycle||t.lifecycle===e.lifecycle)&&(void 0===t.name||t.name===e.name)&&(void 0===t.description||t.description===e.description)}let Y=(0,U.createLogger)("[Polling]"),J=0,Q=0;function Z(e,o){let a=(0,r.useRouter)(),s=(0,V.useSoundAction)("delete"),i=(0,V.useSoundAction)("create"),{nodes:l,edges:d,reconcile:c,updateFeature:u,addPendingFeature:h,removeFeature:f,restoreFeature:p,addRepository:g,removeRepository:m,replaceRepository:x,getFeatureRepositoryPath:v,getRepositoryData:y,getRepoMapSize:b,setCallbacks:w}=function(e,r){let n=(0,t.useMemo)(()=>X(e,r),[]),[o,a]=(0,t.useState)(n.featureMap),[s,i]=(0,t.useState)(n.repoMap),[l,d]=(0,t.useState)(new Map),c=(0,t.useRef)(new Map),u=(0,t.useRef)(new Set),h=(0,t.useRef)({}),f=(0,t.useMemo)(()=>({onNodeAction:e=>h.current.onNodeAction?.(e),onNodeSettings:e=>h.current.onNodeSettings?.(e),onFeatureDelete:e=>h.current.onFeatureDelete?.(e),onRepositoryAdd:e=>h.current.onRepositoryAdd?.(e),onRepositoryClick:e=>h.current.onRepositoryClick?.(e),onRepositoryDelete:e=>h.current.onRepositoryDelete?.(e)}),[]),p=(0,t.useRef)(o);p.current=o;let g=(0,t.useRef)(s);g.current=s;let m=(0,t.useMemo)(()=>(function(e,t,r,n){let o=[],a=[],s=new Map;for(let[e,r]of t)r.data.repositoryPath&&s.set(r.data.repositoryPath,e);let i=new Map;for(let[e,r]of[...t.entries()].sort((e,t)=>(e[1].data.createdAt??0)-(t[1].data.createdAt??0))){let t={...r.data,...n?.onRepositoryAdd&&{onAdd:()=>n.onRepositoryAdd(e)},...n?.onRepositoryClick&&{onClick:()=>n.onRepositoryClick(e)},...n?.onRepositoryDelete&&{onDelete:n.onRepositoryDelete}};o.push({id:e,type:"repositoryNode",position:{x:0,y:0},data:t})}for(let[t,l,d]of[...[...e.entries()].map(([e,t])=>[e,t,!1]),...[...r.entries()].filter(([t])=>!e.has(t)).map(([e,t])=>[e,t,!0])]){let e="creating"===l.data.state||d,r={...l.data,...!e&&n?.onNodeAction&&{onAction:()=>n.onNodeAction(t)},...!e&&n?.onNodeSettings&&{onSettings:()=>n.onNodeSettings(t)},...!e&&n?.onFeatureDelete&&{onDelete:n.onFeatureDelete}};if(o.push({id:t,type:"featureNode",position:{x:0,y:0},data:r}),l.parentNodeId)a.push({id:`dep-${l.parentNodeId}-${t}`,source:l.parentNodeId,target:t,type:"dependencyEdge"});else{let e=l.data.repositoryPath,r=s.get(e)??function(e){if(i.has(e))return i.get(e);let t=`virtual-repo-${e}`,r=e.split("/").filter(Boolean).at(-1)??e;return o.push({id:t,type:"repositoryNode",position:{x:0,y:0},data:{name:r,repositoryPath:e}}),i.set(e,t),t}(e);a.push({id:`edge-${r}-${t}`,source:r,target:t,style:{strokeDasharray:"5 5"}})}}let l=a.length>0;for(let e of o)e.data.showHandles=l;return{nodes:o,edges:a}})(o,s,l,f),[o,s,l,f]),x=(0,t.useRef)({key:"",positions:new Map}),{nodes:v,edges:y}=(0,t.useMemo)(()=>{let e=m.nodes.map(e=>e.id).sort().join(","),t=m.edges.map(e=>`${e.source}-${e.target}`).sort().join(","),r=`${e}|${t}`;if(r!==x.current.key){let e=A(m.nodes,m.edges,T),t=new Map;for(let r of e.nodes)t.set(r.id,{position:r.position,targetPosition:r.targetPosition,sourcePosition:r.sourcePosition});let n=x.current.positions;if(n.size>0){let r=0,o=0;for(let[e,a]of t){let t=n.get(e);if(t){r=t.position.x-a.position.x,o=t.position.y-a.position.y;break}}if(0!==r||0!==o){for(let e of t.values())e.position={x:e.position.x+r,y:e.position.y+o};for(let t of e.nodes)t.position={x:t.position.x+r,y:t.position.y+o}}}return x.current={key:r,positions:t},e}let{positions:n}=x.current;return{nodes:m.nodes.map(e=>{let t=n.get(e.id);return t?{...e,...t}:e}),edges:m.edges}},[m]),b=(0,t.useCallback)((e,t)=>{let{featureMap:r,repoMap:n}=X(e,t),o=new Set([...r.values()].map(e=>`${e.data.name}\0${e.data.repositoryPath}`));a(e=>{let t=[...e.entries()].filter(([,e])=>"creating"===e.data.state),n=new Map(r);for(let[e,r]of t){let t=`${r.data.name}\0${r.data.repositoryPath}`;o.has(t)||n.set(e,r)}let a=new Set;for(let[t,r]of e)"deleting"===r.data.state&&(n.has(t)?n.set(t,{...n.get(t),data:{...n.get(t).data,state:"deleting"}}):u.current.has(t)||(n.set(t,r),a.add(t)));for(let[e,t]of(u.current=a,c.current)){let r=n.get(e);r&&(n.set(e,{...r,data:{...r.data,...t}}),c.current.delete(e))}return n}),d(e=>{if(0===e.size)return e;let t=!1,r=new Map(e);for(let[n,a]of e){let e=`${a.data.name}\0${a.data.repositoryPath}`;o.has(e)&&(r.delete(n),t=!0)}return t?r:e}),i(e=>{let t=new Map(n),r=new Set([...n.values()].map(e=>e.data.repositoryPath));for(let[n,o]of e)n.startsWith("repo-temp-")&&!r.has(o.data.repositoryPath)&&t.set(n,o);return t})},[]),w=(0,t.useCallback)((e,t)=>{a(r=>{let n=r.get(e);if(!n)return c.current.set(e,{...c.current.get(e),...t}),r;if(c.current.delete(e),K(n.data,t))return r;let o=new Map(r);return o.set(e,{...n,data:{...n.data,...t}}),o}),d(r=>{let n=r.get(e);if(!n||K(n.data,t))return r;let o=new Map(r);return o.set(e,{...n,data:{...n.data,...t}}),o})},[]),j=(0,t.useCallback)((e,t,r)=>{d(n=>{let o=new Map(n);return o.set(e,{nodeId:e,data:t,parentNodeId:r}),o})},[]),k=(0,t.useCallback)(e=>{d(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),E=(0,t.useCallback)(e=>{a(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),N=(0,t.useCallback)((e,t)=>{a(r=>{let n=new Map(r);return n.set(e,t),n})},[]),C=(0,t.useCallback)((e,t)=>{i(r=>{let n=new Map(r);return n.set(e,{nodeId:e,data:t}),n})},[]),_=(0,t.useCallback)(e=>{i(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),O=(0,t.useCallback)((e,t,r)=>{i(n=>{if(!n.has(e))return n;let o=new Map(n);return o.delete(e),o.set(t,{nodeId:t,data:r}),o})},[]),M=(0,t.useCallback)(e=>p.current.get(e)?.data.repositoryPath,[]),R=(0,t.useCallback)(e=>g.current.get(e)?.data,[]);return{nodes:v,edges:y,reconcile:b,updateFeature:w,addPendingFeature:j,removePendingFeature:k,removeFeature:E,restoreFeature:N,addRepository:C,removeRepository:_,replaceRepository:O,getFeatureRepositoryPath:M,getRepositoryData:R,getRepoMapSize:(0,t.useCallback)(()=>g.current.size,[]),setCallbacks:(0,t.useCallback)(e=>{h.current=e},[])}}(e,o),j=(0,t.useRef)(l),k=(0,t.useRef)(d);(0,t.useEffect)(()=>{j.current=l,k.current=d},[l,d]);let E=(0,t.useMemo)(()=>e.map(e=>e.id).sort().join(","),[e]),N=(0,t.useMemo)(()=>e.filter(e=>"featureNode"===e.type).map(e=>{let t=e.data;return`${e.id}:${t.state}:${t.lifecycle}`}).sort().join(","),[e]),C=(0,t.useRef)("");(0,t.useEffect)(()=>{let t=`${E}|${N}`;t!==C.current&&(C.current=t,c(e,o))},[E,N,e,o,c]);let _=(0,t.useRef)(new Map),{events:O}=(0,W.useAgentEventsContext)();(0,t.useEffect)(()=>{let t=_.current;for(let r of e){if("featureNode"!==r.type)continue;let e=r.data,o=t.get(r.id);void 0!==o&&o!==e.state&&(O.some(t=>t.featureId===e.featureId&&(0,H.mapEventTypeToState)(t.eventType)===e.state)||("done"===e.state?n.toast.success(e.name,{description:"Feature completed!"}):"action-required"===e.state?n.toast.warning(e.name,{description:"Waiting for your approval",action:{label:"Review",onClick:()=>a.push(`/feature/${e.featureId}`)}}):"error"===e.state&&n.toast.error(e.name,{description:e.errorMessage??"Agent failed"}))),t.set(r.id,e.state)}},[N,e,O,a]);let M=(0,t.useRef)(0);(0,t.useEffect)(()=>{if(M.current>O.length&&(M.current=0),O.length<=M.current)return;let e=O.slice(M.current);for(let{featureId:t,state:r,lifecycle:n}of(M.current=O.length,(0,H.resolveSseEventUpdates)(e)))if(void 0!==r||void 0!==n){let e=`feat-${t}`,o=j.current.find(t=>t.id===e);if(o&&"deleting"===o.data.state)continue;u(e,{...void 0!==r&&{state:r},...void 0!==n&&{lifecycle:n}})}},[O,u]),(0,t.useEffect)(()=>{let e=e=>{let{featureId:t}=e.detail;u(`feat-${t}`,{state:"running"})};return window.addEventListener("shep:feature-approved",e),()=>window.removeEventListener("shep:feature-approved",e)},[u]);let R=(0,t.useRef)(new Set),S=(0,t.useRef)(0);(0,t.useEffect)(()=>{if(S.current>O.length&&(S.current=0),O.length<=S.current)return;let e=O.slice(S.current);for(let t of(S.current=O.length,e)){if("Feature metadata updated"!==t.message||R.current.has(t.featureId))continue;R.current.add(t.featureId);let e=`feat-${t.featureId}`;G(t.featureId).then(t=>{t&&u(e,{name:t.name,description:t.description})}).catch(()=>{})}},[O,u]),(0,t.useEffect)(()=>{Y.debug("polling enabled (3000ms interval)");let e=setInterval(async()=>{try{let{nodes:e,edges:t}=await q();c(e,t)}catch{Y.warn("poll fetch failed — will retry next interval")}},3e3);return()=>{Y.debug("polling disabled"),clearInterval(e)}},[c]);let P=(0,t.useCallback)(e=>{},[]),L=(0,t.useCallback)(e=>{},[]),I=(0,t.useCallback)((e,t,r)=>{let n=t?.featureId?`feat-${t.featureId}`:`feature-${Date.now()}-${J++}`,o={name:t?.name??"New Feature",description:t?.description??"Describe what this feature does",featureId:t?.featureId??`#${n.slice(-4)}`,lifecycle:"requirements",state:t?.state??"running",progress:0,repositoryPath:t?.repositoryPath??"",branch:t?.branch??""};return h(n,o,"dependencyEdge"===r&&e?e:void 0),n},[h]),D=(0,t.useCallback)((e,t)=>{let r=`feat-${e}`,o=[],i=[r];for(;i.length>0;){let e=i.shift();for(let t of k.current)"dependencyEdge"===t.type&&t.source===e&&(o.push(t.target),i.push(t.target))}let l=new Map;for(let e of[r,...o]){let t=j.current.find(t=>t.id===e);t&&l.set(e,t.data.state)}for(let e of(u(r,{state:"deleting"}),o))u(e,{state:"deleting"});s.play(),n.toast.success("Deleting feature…"),a.push("/"),(0,F.deleteFeature)(e,t).then(e=>{if(e.error){for(let[e,t]of l)t&&u(e,{state:t});n.toast.error(e.error)}else for(let e of(f(r),o))f(e)}).catch(()=>{for(let[e,t]of l)t&&u(e,{state:t});n.toast.error("Failed to delete feature")})},[a,s,u,f]),$=(0,t.useCallback)(async e=>{let t=`repo-${e}`,r=new Set(k.current.filter(e=>e.source===t).map(e=>e.target)),o=y(t),a=new Map;for(let e of r){let t=j.current.find(t=>t.id===e);t&&a.set(e,{nodeId:e,data:t.data})}let i=()=>{for(let[e,r]of(o&&g(t,o),a))p(e,r)};for(let e of(m(t),r))f(e);try{let t=await B(e);if(!t.success){n.toast.error(t.error??"Failed to remove repository"),i();return}s.play(),n.toast.success("Repository removed")}catch{n.toast.error("Failed to remove repository"),i()}},[s,m,f,g,p,y]),U=(0,t.useCallback)(e=>{let t=A(j.current,k.current,{...T,direction:e});c(t.nodes,t.edges)},[c]);return{nodes:l,edges:d,onNodesChange:P,handleConnect:L,handleAddRepository:(0,t.useCallback)(e=>{let t=0===b(),r=`repo-temp-${++Q}`,o=e.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??e;return g(r,{name:o,repositoryPath:e,id:r,createdAt:Date.now()}),z({path:e,name:o}).then(e=>{if(e.error){m(r),n.toast.error(e.error);return}let t=e.repository;x(r,`repo-${t.id}`,{name:t.name,repositoryPath:t.path,id:t.id,createdAt:t.createdAt instanceof Date?t.createdAt.getTime():Number(t.createdAt)}),i.play()}).catch(()=>{m(r),n.toast.error("Failed to add repository")}),{wasEmpty:t,repoPath:e}},[g,m,x,i,b]),handleLayout:U,handleDeleteFeature:D,handleDeleteRepository:$,createFeatureNode:I,getFeatureRepositoryPath:v,getRepositoryData:y,setCallbacks:w}}e.s(["useControlCenterState",()=>Z],17840)},48246,e=>{"use strict";var t=e.i(20314),r=e.i(53271),n=e.i(79054),o=e.i(31406),a=e.i(3214),s=e.i(3645);let i=(0,s.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var l=e.i(35364);e.i(54793);var d=e.i(7729);e.i(47506);var c=e.i(89313),u=e.i(92002);let h=(0,s.default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var f=e.i(8986),p=e.i(38573),g=e.i(19933),m=e.i(67669),x=e.i(24042),v=e.i(64970),y=e.i(31777);e.i(81803);var b=e.i(72714),w=e.i(2287),j=e.i(2828);e.i(99348);var k=e.i(17466),E=e.i(8537),N=e.i(75921),C=e.i(76852);function _({data:e}){let o=(0,N.useFeatureFlags)(),[s,i]=(0,n.useState)(!1),d=(0,C.useRepositoryActions)(e.repositoryPath?{repositoryPath:e.repositoryPath}:null),c=(0,E.useDeployAction)(e.repositoryPath?{targetId:e.repositoryPath,targetType:"repository",repositoryPath:e.repositoryPath}:null),_="Booting"===c.status||"Ready"===c.status;return(0,t.jsxs)("div",{className:(0,y.cn)("group relative",e.onDelete&&e.id&&"pl-10"),children:[e.showHandles?(0,t.jsx)(r.Handle,{type:"target",position:u.Position.Left,isConnectable:!1,className:"opacity-0!"}):null,e.onDelete&&e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute top-1/2 left-0 -translate-y-1/2 opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(j.TooltipProvider,{children:(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{"aria-label":"Remove repository","data-testid":"repository-node-delete-button",onClick:e=>{e.stopPropagation(),i(!0)},className:"bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors",children:(0,t.jsx)(m.Trash2,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(j.TooltipContent,{children:"Remove repository"})]})})}),(0,t.jsx)(w.Dialog,{open:s,onOpenChange:i,children:(0,t.jsxs)(w.DialogContent,{className:"max-w-xs",children:[(0,t.jsxs)(w.DialogHeader,{children:[(0,t.jsx)(w.DialogTitle,{children:"Remove repository?"}),(0,t.jsxs)(w.DialogDescription,{children:["This will remove ",(0,t.jsx)("strong",{children:e.name})," and all its features from your workspace. The repository files on disk won't be affected."]})]}),(0,t.jsxs)(w.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,t.jsx)(w.DialogClose,{asChild:!0,children:(0,t.jsx)(l.Button,{variant:"outline",children:"Cancel"})}),(0,t.jsx)(l.Button,{variant:"destructive",onClick:()=>{i(!1),e.onDelete?.(e.id)},children:"Remove"})]})]})})]}):null,(0,t.jsxs)("div",{role:"button",tabIndex:0,"data-testid":"repository-node-card","data-repo-name":e.name,onClick:t=>{t.stopPropagation(),e.onClick?.()},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),t.stopPropagation(),e.onClick?.())},className:"nodrag bg-card flex min-w-[18rem] cursor-pointer items-center gap-3 rounded-full border px-4 py-3 shadow-sm",children:[(0,t.jsx)(h,{className:"text-muted-foreground h-5 w-5 shrink-0"}),(0,t.jsx)("span",{"data-testid":"repository-node-name",className:"min-w-0 truncate text-sm font-medium",children:e.name}),(0,t.jsxs)("div",{className:(0,y.cn)("flex shrink-0 items-center gap-2",(e.repositoryPath??e.onAdd)&&"ml-auto"),onClick:e=>e.stopPropagation(),children:[e.repositoryPath?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.TooltipProvider,{children:(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open in IDE",onClick:d.openInIde,loading:d.ideLoading,error:!!d.ideError,icon:f.Code2,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(j.TooltipContent,{children:"Open in IDE"})]})}),(0,t.jsx)(j.TooltipProvider,{children:(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open in Shell",onClick:d.openInShell,loading:d.shellLoading,error:!!d.shellError,icon:p.Terminal,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(j.TooltipContent,{children:"Open in Shell"})]})}),(0,t.jsx)(j.TooltipProvider,{children:(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open Folder",onClick:d.openFolder,loading:d.folderLoading,error:!!d.folderError,icon:g.FolderOpen,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(j.TooltipContent,{children:"Open Folder"})]})}),o.envDeploy?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.TooltipProvider,{children:(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:_?"Stop Dev Server":"Start Dev Server",onClick:_?c.stop:c.deploy,loading:c.deployLoading||c.stopLoading,error:!!c.deployError,icon:_?v.Square:x.Play,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(j.TooltipContent,{children:_?"Stop Dev Server":"Start Dev Server"})]})}),_?(0,t.jsx)(k.DeploymentStatusBadge,{status:c.status,url:c.url,targetId:e.repositoryPath}):null]}):null]}):null,e.onAdd?(0,t.jsx)(j.TooltipProvider,{children:(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{"aria-label":"Add feature","data-testid":"repository-node-add-button",onClick:t=>{t.stopPropagation(),e.onAdd?.()},className:(0,y.cn)("text-muted-foreground hover:bg-accent dark:hover:bg-accent/50 flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-full transition-colors hover:text-blue-500",e.pulseAdd&&"animate-pulse-cta bg-blue-100 text-blue-500 dark:bg-blue-900/40"),children:(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(j.TooltipContent,{children:"Add feature"})]})}):null]})]}),e.onAdd||e.showHandles?(0,t.jsx)(r.Handle,{type:"source",position:u.Position.Right,isConnectable:!e.showHandles,className:"opacity-0!"}):null]})}function O(e){let[n]=(0,u.getBezierPath)({sourceX:e.sourceX,sourceY:e.sourceY,targetX:e.targetX,targetY:e.targetY,sourcePosition:e.sourcePosition,targetPosition:e.targetPosition});return(0,t.jsx)(r.BaseEdge,{id:e.id,path:n,style:{strokeDasharray:"5 5"}})}e.i(1650),e.i(45811),e.i(25235);let M={x:30,y:30,zoom:.85};function R({onResetViewport:e}){let{setViewport:o}=(0,r.useReactFlow)(),a=(0,n.useCallback)(()=>{o(e(),{duration:400})},[e,o]);return(0,t.jsx)(r.ControlButton,{onClick:a,title:"Reset view","aria-label":"Reset view",children:(0,t.jsx)(i,{style:{fill:"none"}})})}function S({nodes:e,edges:o,selectedFeatureId:s,defaultViewport:i,onNodesChange:u,onAddFeature:h,onConnect:f,onNodeClick:p,onPaneClick:g,onCanvasDrag:m,onMoveEnd:x,onResetViewport:v,toolbar:y,emptyState:b}){let w=(0,n.useMemo)(()=>({featureNode:c.FeatureNode,repositoryNode:_}),[]),j=(0,n.useMemo)(()=>({dependencyEdge:O}),[]),k=(0,n.useMemo)(()=>null==s?e:e.map(e=>"featureNode"===e.type&&e.data.featureId===s?{...e,selected:!0}:e),[e,s]);return 0===e.length?b?(0,t.jsx)("div",{"data-testid":"features-canvas-empty",className:"h-full w-full",children:b}):(0,t.jsx)("div",{"data-testid":"features-canvas-empty",children:(0,t.jsx)(d.EmptyState,{title:"No features yet",description:"Get started by creating your first feature.",action:(0,t.jsxs)(l.Button,{onClick:h,children:[(0,t.jsx)(a.Plus,{className:"mr-2 h-4 w-4"}),"New Feature"]})})}):(0,t.jsx)("div",{"data-testid":"features-canvas","data-no-drawer-close":!0,className:"pointer-events-auto h-full w-full",children:(0,t.jsxs)(r.ReactFlow,{nodes:k,edges:o,nodeTypes:w,edgeTypes:j,onConnect:f,onNodesChange:u,onNodeClick:p,onPaneClick:g,onMoveStart:m,onMoveEnd:x,defaultViewport:i??M,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,t.jsx)(r.Background,{}),(0,t.jsx)(r.Controls,{showInteractive:!1,children:v?(0,t.jsx)(R,{onResetViewport:v}):null}),y]})})}var P=e.i(5147),L=e.i(8361),T=e.i(30153);let I="shep-canvas-viewport",D={x:30,y:30,zoom:.85},A=(0,s.default)("square-terminal",[["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"}]]);var F=e.i(33548),$=e.i(23925),z=e.i(83428),B=e.i(78521),G=e.i(21023);let q=(0,G.createServerReference)("000222ad3301cdf311d341f5025bff7b540789fba2",G.callServer,void 0,G.findSourceMapURL,"isAgentSetupComplete");var W=e.i(76016),V=e.i(11345),U=e.i(81181),H=e.i(35e3),X=e.i(95812),K=e.i(79687),Y=e.i(26370),J=e.i(30702),Q=e.i(33383);let Z=(0,G.createServerReference)("40880675b03886539a6882aa0bc80af3a2008c4e86",G.callServer,void 0,G.findSourceMapURL,"checkAgentTool");var ee=e.i(4799),et=e.i(86782),er=e.i(29847),en=e.i(32983);let eo=["select-agent","select-model","check-tool","authenticate"];function ea({onComplete:e,className:r}){let o,a,[s,i]=(0,n.useState)([]),[l,d]=(0,n.useState)(!0),[c,u]=(0,n.useState)("select-agent"),[h,f]=(0,n.useState)(null),[p,g]=(0,n.useState)(null),[m,x]=(0,n.useState)(null),[v,b]=(0,n.useState)(!1),[w,j]=(0,n.useState)(!1),[k,E]=(0,n.useState)(!1),[N,C]=(0,n.useState)(!0),_=(0,n.useRef)(void 0);(0,n.useEffect)(()=>{(0,Q.getAllAgentModels)().then(i).finally(()=>d(!1))},[]);let O=h?s.find(e=>e.agentType===h):null,M=(0,n.useCallback)((e,t)=>{E(!0),C(!1),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{t?.(),u(e),requestAnimationFrame(()=>{C(!0),E(!1)})},150)},[]);(0,n.useEffect)(()=>()=>{_.current&&clearTimeout(_.current)},[]);let R=(0,n.useCallback)(e=>{let t=s.find(t=>t.agentType===e);t&&t.models.length>0?M("select-model",()=>{f(e)}):M("check-tool",()=>{f(e),g("")})},[s,M]),S=(0,n.useCallback)(e=>{M("check-tool",()=>{g(e)})},[M]),P=(0,n.useCallback)(()=>{M("authenticate")},[M]),L=(0,n.useCallback)(()=>{"select-model"===c?M("select-agent",()=>{f(null)}):"check-tool"===c?O&&O.models.length>0?M("select-model",()=>{g(null)}):M("select-agent",()=>{f(null)}):"authenticate"===c&&(m&&!m.installed&&m.toolId?M("check-tool"):O&&O.models.length>0?M("select-model",()=>{g(null)}):M("select-agent",()=>{f(null)}))},[c,O,m,M]);(0,n.useEffect)(()=>{"check-tool"===c&&h&&(b(!0),Z(h).then(e=>{x(e),(e.installed||!e.toolId)&&M("authenticate")}).finally(()=>b(!1)))},[c,h,M]);let T=(0,n.useCallback)(async()=>{if(h){j(!0);try{await (0,ee.updateAgentAndModel)(h,p??null),e()}finally{j(!1)}}},[h,p,e]);if(l)return(0,t.jsxs)("div",{"data-testid":"welcome-agent-setup",className:(0,y.cn)("flex flex-col items-center justify-center gap-3",r),children:[(0,t.jsx)(z.Loader2,{className:"text-muted-foreground h-4 w-4 animate-spin"}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:"Loading agents…"})]});let I=eo.indexOf(c);return(0,t.jsxs)("div",{"data-testid":"welcome-agent-setup",className:(0,y.cn)("flex flex-col items-center gap-4","w-72",r),children:[(0,t.jsx)("div",{className:"flex flex-col items-center gap-1",children:(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-2",children:["select-agent"===c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Y.Bot,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-[10px] font-semibold tracking-widest uppercase",children:"Choose your agent"})]}),"select-model"===c&&O?(o=(0,et.getAgentTypeIcon)(O.agentType),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"text-[10px] font-semibold tracking-widest uppercase",children:[O.label," — Pick a model"]})]})):null,"check-tool"===c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Y.Bot,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-[10px] font-semibold tracking-widest uppercase",children:"Verifying setup"})]}),"authenticate"===c&&O?(a=(0,et.getAgentTypeIcon)(O.agentType),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-[10px] font-semibold tracking-widest uppercase",children:"Authenticate"})]})):null]})}),(0,t.jsx)("div",{className:"flex w-32 items-center gap-1",children:eo.map((e,r)=>(0,t.jsx)("div",{className:(0,y.cn)("h-0.5 flex-1 rounded-full transition-colors duration-300",r<=I?"bg-foreground/60":"bg-muted")},e))}),(0,t.jsxs)("div",{className:(0,y.cn)("flex w-full flex-col items-center transition-opacity duration-150",N&&!k?"opacity-100":"opacity-0"),children:["select-agent"===c&&(0,t.jsx)("div",{"data-testid":"agent-list",className:"flex w-full flex-col gap-1.5",children:s.map(e=>{let r=(0,et.getAgentTypeIcon)(e.agentType);return(0,t.jsxs)("button",{type:"button","data-testid":`agent-option-${e.agentType}`,className:"border-border hover:border-foreground/40 flex w-full cursor-pointer items-center gap-2.5 rounded-md border border-dashed px-4 py-2.5 transition-colors",onClick:()=>R(e.agentType),children:[(0,t.jsx)(r,{className:"text-muted-foreground h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-left text-xs font-medium",children:e.label}),(0,t.jsx)(W.ChevronRight,{className:"text-muted-foreground h-3 w-3"})]},e.agentType)})}),"select-model"===c&&O?(0,t.jsxs)("div",{"data-testid":"model-list",className:"flex w-full flex-col gap-1.5",children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground mb-0.5 flex cursor-pointer items-center gap-1 self-start text-[10px] font-medium transition-colors",onClick:L,children:[(0,t.jsx)(V.ChevronLeft,{className:"h-3 w-3"}),"Back"]}),(0,t.jsx)("div",{className:"flex max-h-48 w-full flex-col gap-1.5 overflow-y-auto",children:O.models.map(e=>{let r=(0,er.getModelMeta)(e.id);return(0,t.jsxs)("button",{type:"button","data-testid":`model-option-${e.id}`,className:"border-border hover:border-foreground/40 flex w-full cursor-pointer items-center gap-2.5 rounded-md border border-dashed px-4 py-2.5 text-left transition-colors",onClick:()=>S(e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:r.displayName||e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] leading-tight",children:r.description||e.description})]}),(0,t.jsx)(W.ChevronRight,{className:"text-muted-foreground h-3 w-3 shrink-0"})]},e.id)})})]}):null,"check-tool"===c&&(0,t.jsx)(es,{toolStatus:m,checking:v,saving:!1,onConfirm:P,onBack:L,onToolInstalled:()=>{h&&(b(!0),Z(h).then(x).finally(()=>b(!1)))}}),"authenticate"===c&&m?(0,t.jsx)(el,{toolStatus:m,agentLabel:O?.label??h??"Agent",saving:w,onConfirm:T,onBack:L}):null]})]})}function es({toolStatus:e,checking:r,saving:n,onConfirm:o,onBack:a,onToolInstalled:s}){return r||!e?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-4",children:[(0,t.jsx)(z.Loader2,{className:"text-muted-foreground h-4 w-4 animate-spin"}),(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"Checking tool availability…"})]}):e.toolId?e.installed?(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-3",children:[(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-1.5",children:[(0,t.jsx)(H.CheckCircle2,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"text-xs",children:[e.tool?.name??e.toolId," is installed"]})]}),(0,t.jsx)(ei,{saving:n,onConfirm:o,onBack:a})]}):(0,t.jsx)(ed,{toolStatus:e,saving:n,onConfirm:o,onBack:a,onInstalled:s}):(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-3",children:[(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-1.5",children:[(0,t.jsx)(H.CheckCircle2,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs",children:"No additional tools required"})]}),(0,t.jsx)(ei,{saving:n,onConfirm:o,onBack:a})]})}function ei({saving:e,onConfirm:r,onBack:n,label:o="Continue"}){return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground cursor-pointer text-[10px] transition-colors",onClick:n,children:[(0,t.jsx)(V.ChevronLeft,{className:"mr-0.5 inline h-3 w-3"}),"Back"]}),(0,t.jsxs)("button",{type:"button","data-testid":"agent-setup-confirm",disabled:e,className:"border-border hover:border-foreground/40 flex cursor-pointer items-center gap-1.5 rounded-md border border-dashed px-4 py-2 text-xs font-medium transition-colors disabled:opacity-50",onClick:r,children:[e?(0,t.jsx)(z.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)($.Check,{className:"h-3 w-3"}),o]})]})}function el({toolStatus:e,agentLabel:r,saving:o,onConfirm:a,onBack:s}){let[i,l]=(0,n.useState)(!1),[d,c]=(0,n.useState)(!1),u=(0,n.useCallback)(async()=>{if(e.toolId){l(!0);try{(await fetch(`/api/tools/${e.toolId}/launch`,{method:"POST"})).ok&&c(!0)}finally{l(!1)}}},[e.toolId]);return e.toolId?(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-3",children:[(0,t.jsxs)("p",{className:"text-muted-foreground text-center text-[10px] leading-relaxed",children:["Open ",r," in a terminal to sign in.",(0,t.jsx)("br",{}),"Follow the prompts, then come back here."]}),(0,t.jsxs)("button",{type:"button","data-testid":"agent-setup-launch",disabled:i,onClick:u,className:"border-border hover:border-foreground/40 flex w-full cursor-pointer items-center gap-2.5 rounded-md border border-dashed px-4 py-2.5 transition-colors disabled:opacity-50",children:[i?(0,t.jsx)(z.Loader2,{className:"text-muted-foreground h-4 w-4 animate-spin"}):(0,t.jsx)(p.Terminal,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("span",{className:"flex-1 text-left text-xs font-medium",children:d?"Open again":`Open ${r}`}),(0,t.jsx)(J.ExternalLink,{className:"text-muted-foreground h-3 w-3"})]}),d?(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"Terminal opened — complete sign-in there"}):null,e.binaryName?(0,t.jsxs)("div",{className:"flex w-full flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"Or run manually in any terminal:"}),(0,t.jsxs)("div",{className:"w-full rounded-md bg-zinc-900 px-3 py-1.5 font-mono text-[11px] text-zinc-300",children:[(0,t.jsx)("span",{className:"text-zinc-500 select-none",children:"$ "}),e.binaryName]})]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground cursor-pointer text-[10px] transition-colors",onClick:s,children:[(0,t.jsx)(V.ChevronLeft,{className:"mr-0.5 inline h-3 w-3"}),"Back"]}),(0,t.jsxs)("button",{type:"button","data-testid":"agent-setup-confirm",disabled:o,className:"border-border hover:border-foreground/40 flex cursor-pointer items-center gap-1.5 rounded-md border border-dashed px-4 py-2 text-xs font-medium transition-colors disabled:opacity-50",onClick:a,children:[o?(0,t.jsx)(z.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)($.Check,{className:"h-3 w-3"}),d?"Done":"Skip"]})]})]}):(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-3",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No authentication required"}),(0,t.jsx)(ei,{saving:o,onConfirm:a,onBack:s,label:"Done"})]})}function ed({toolStatus:e,saving:r,onConfirm:o,onBack:a,onInstalled:s}){let i=e.toolId??"",{logs:l,status:d,startInstall:c}=(0,en.useToolInstallStream)(i),u="done"===d,h="error"===d;return(0,n.useEffect)(()=>{u&&s()},[u,s]),(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[u?(0,t.jsx)(H.CheckCircle2,{className:"text-muted-foreground h-3.5 w-3.5"}):h?(0,t.jsx)(K.AlertCircle,{className:"text-destructive h-3.5 w-3.5"}):(0,t.jsx)(X.Circle,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"text-xs",children:[e.tool?.name??i," ",u?"installed":h?"install failed":"is not installed"]})]}),e.tool?.installCommand&&"idle"===d?(0,t.jsxs)("div",{className:"w-full rounded-md bg-zinc-900 px-3 py-2 font-mono text-[11px] text-zinc-300",children:[(0,t.jsx)("span",{className:"text-zinc-500 select-none",children:"$ "}),e.tool.installCommand]}):null,("streaming"===d||u||h)&&l.length>0?(0,t.jsxs)("div",{className:"max-h-28 w-full overflow-auto rounded-md bg-zinc-900 px-3 py-2 font-mono text-[10px] leading-relaxed text-zinc-400",children:[l.map((e,r)=>(0,t.jsx)("div",{className:"break-all whitespace-pre-wrap",children:e},r)),u?(0,t.jsx)("div",{className:"text-muted-foreground mt-1",children:"Installation complete"}):null,h?(0,t.jsx)("div",{className:"text-destructive mt-1",children:"Installation failed — try manually"}):null]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground cursor-pointer text-[10px] transition-colors",onClick:a,children:[(0,t.jsx)(V.ChevronLeft,{className:"mr-0.5 inline h-3 w-3"}),"Back"]}),!u&&e.tool?.autoInstall?(0,t.jsxs)("button",{type:"button","data-testid":"agent-setup-install",disabled:"streaming"===d,className:"border-border hover:border-foreground/40 flex cursor-pointer items-center gap-1.5 rounded-md border border-dashed px-4 py-2 text-xs font-medium transition-colors disabled:opacity-50",onClick:c,children:["streaming"===d?(0,t.jsx)(z.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(U.Download,{className:"h-3 w-3"}),"streaming"===d?"Installing…":"Install"]}):null,u?(0,t.jsxs)("button",{type:"button","data-testid":"agent-setup-confirm",disabled:r,className:"border-border hover:border-foreground/40 flex cursor-pointer items-center gap-1.5 rounded-md border border-dashed px-4 py-2 text-xs font-medium transition-colors disabled:opacity-50",onClick:o,children:[r?(0,t.jsx)(z.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)($.Check,{className:"h-3 w-3"}),"Continue"]}):null]})]})}let ec=["cd ~/my-repo",'shep feat new "sleek dashboard"'];function eu({onRepositorySelect:e,className:r}){let[o,s]=(0,n.useState)(!1),[i,l]=(0,n.useState)(!1),[d,c]=(0,n.useState)(!1);async function u(){if(!i){l(!0);try{let t=await (0,B.pickFolder)();t&&e?.(t)}finally{l(!1)}}}(0,n.useEffect)(()=>{q().then(e=>{e&&c(!0)})},[]);let f=(0,n.useCallback)(async()=>{await navigator.clipboard.writeText(ec.join("\n")),s(!0),setTimeout(()=>s(!1),2e3)},[]),p=(0,n.useCallback)(()=>{c(!0)},[]);return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,y.cn)("relative h-full w-full",r),children:[(0,t.jsx)("div",{className:"absolute inset-0 [background-image:radial-gradient(circle,_var(--color-border)_1px,_transparent_1px)] [background-size:24px_24px]"}),(0,t.jsxs)("div",{className:"absolute top-8 left-8 z-10",children:[(0,t.jsx)("h1",{className:"text-4xl font-bold tracking-tight",children:"Features"}),(0,t.jsx)("p",{className:"text-muted-foreground text-3xl font-light",children:"Control Center"})]}),(0,t.jsx)("div",{className:"relative z-10 flex h-full items-center justify-center",children:(0,t.jsx)("div",{className:"flex w-72 flex-col items-center gap-4",children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-2",children:[(0,t.jsx)(h,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-[10px] font-semibold tracking-widest uppercase",children:"Repositories"})]}),(0,t.jsxs)("button",{type:"button","data-testid":"empty-state-add-repository",onClick:u,disabled:i,className:"border-border hover:border-foreground/40 flex w-full cursor-pointer items-center gap-2.5 rounded-md border border-dashed px-4 py-2.5 transition-colors disabled:cursor-wait disabled:opacity-50",children:[i?(0,t.jsx)(z.Loader2,{className:"text-muted-foreground h-4 w-4 animate-spin"}):(0,t.jsx)(a.Plus,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:i?"Opening…":"Add Repository"})]}),(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-2",children:[(0,t.jsx)("div",{className:"bg-border h-px w-10"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(A,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"text-[10px] font-semibold tracking-widest uppercase",children:"Or via CLI"})]}),(0,t.jsx)("div",{className:"bg-border h-px w-10"})]}),(0,t.jsxs)("div",{"data-testid":"cli-code-block",className:"relative w-full rounded-md bg-zinc-900 px-3 py-2 font-mono text-[11px] text-zinc-300",children:[(0,t.jsx)("button",{type:"button","data-testid":"cli-code-block-copy",onClick:f,className:"absolute top-2 right-2 cursor-pointer rounded p-1 text-zinc-500 transition-colors hover:bg-zinc-800 hover:text-zinc-300","aria-label":"Copy commands",children:o?(0,t.jsx)($.Check,{className:"h-3 w-3"}):(0,t.jsx)(F.Copy,{className:"h-3 w-3"})}),(0,t.jsx)("div",{className:"space-y-0.5",children:ec.map(e=>(0,t.jsxs)("div",{className:"whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-zinc-500 select-none",children:"$ "}),(0,t.jsx)("span",{children:e})]},e))})]}),(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"Feature will appear on canvas once created"})]}):(0,t.jsx)(ea,{onComplete:p})})})]})}var eh=e.i(17840);let ef={maxZoom:1,padding:.5,duration:500};function ep({initialNodes:e,initialEdges:a}){let s,i,l,d=(0,o.useRouter)(),c=(0,o.usePathname)(),u=(s=(0,o.usePathname)().match(/^\/feature\/([^/]+)/),s?.[1]??null),h=(0,L.useSoundAction)("click"),{guardedNavigate:f}=(0,T.useDrawerCloseGuard)(),{fitView:p}=(0,r.useReactFlow)(),g=(0,n.useRef)(null),{defaultViewport:m,onMoveEnd:x,resetViewport:v}=(i=(0,n.useRef)(function(){try{let e=localStorage.getItem(I);if(null==e)return D;let t=JSON.parse(e);return!(null==t||"object"!=typeof t||Array.isArray(t))&&"number"==typeof t.x&&"number"==typeof t.y&&"number"==typeof t.zoom&&Number.isFinite(t.x)&&Number.isFinite(t.y)&&Number.isFinite(t.zoom)&&t.zoom>0?t:D}catch{return D}}()).current,l=(0,n.useRef)(null),(0,n.useEffect)(()=>()=>{null!=l.current&&clearTimeout(l.current)},[]),{defaultViewport:i,onMoveEnd:(0,n.useCallback)(e=>{null!=l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{try{localStorage.setItem(I,JSON.stringify(e))}catch{}},500)},[]),resetViewport:(0,n.useCallback)(()=>{try{localStorage.removeItem(I)}catch{}return D},[])}),{nodes:y,edges:b,onNodesChange:w,handleConnect:j,handleAddRepository:k,handleDeleteFeature:E,handleDeleteRepository:N,createFeatureNode:C,setCallbacks:_}=(0,eh.useControlCenterState)(e,a),{setFeatures:O}=(0,P.useSidebarFeaturesContext)(),M=(0,n.useMemo)(()=>y.filter(e=>"featureNode"===e.type),[y]),R=(0,n.useMemo)(()=>M.map(e=>{let t=e.data;return`${t.featureId}:${t.state}:${t.name}`}).sort().join(","),[M]);(0,n.useEffect)(()=>{O(M.map(e=>{let t=e.data,r=(0,P.mapNodeStateToSidebarStatus)(t.state);return r?{featureId:t.featureId,name:t.name,status:r,...null!=t.startedAt&&{startedAt:t.startedAt},...null!=t.runtime&&{duration:t.runtime},...t.agentType&&{agentType:t.agentType},...t.modelId&&{modelId:t.modelId}}:null}).filter(Boolean))},[R,M,O]);let A=(0,n.useCallback)((e,t)=>{if("featureNode"===t.type){let r=t.data;"creating"!==r.state&&"deleting"!==r.state&&e.target.closest('[data-testid="feature-node-card"]')&&f(()=>{h.play(),d.push(`/feature/${r.featureId}`)})}},[d,h,f]),F=(0,n.useCallback)(()=>{h.play(),d.push("/create")},[d,h]),$=(0,n.useCallback)(e=>{h.play();let t=y.find(t=>t.id===e),r=t?.data?.repositoryPath;r?d.push(`/create?repo=${encodeURIComponent(r)}`):d.push("/create")},[y,d,h]),z=(0,n.useCallback)(e=>{let t=e.startsWith("feat-")?e.slice(5):e,r=b.find(t=>t.target===e),n=r?y.find(e=>e.id===r.source):null,o=n?.data?.repositoryPath;h.play();let a=new URLSearchParams;o&&a.set("repo",o),a.set("parent",t),d.push(`/create?${a.toString()}`)},[y,b,d,h]),B=(0,n.useCallback)(e=>{let t=y.find(t=>t.id===e);if(t?.type==="repositoryNode"){let e=t.data;e.id&&f(()=>d.push(`/repository/${e.id}`))}},[y,d,f]),G=(0,n.useCallback)(()=>{"/"!==c&&f(()=>d.push("/"))},[d,c,f]);(0,n.useEffect)(()=>{let e=e=>{let{wasEmpty:t,repoPath:r}=k(e.detail.path);t&&setTimeout(()=>{p(ef),g.current=setTimeout(()=>{f(()=>d.push(`/create?repo=${encodeURIComponent(r)}`))},600)},0)};return window.addEventListener("shep:add-repository",e),()=>{window.removeEventListener("shep:add-repository",e),null!=g.current&&clearTimeout(g.current)}},[k,p,f,d]),(0,n.useEffect)(()=>{let e=e=>{let t=e.detail;if(t.parentId)return void C(`feat-${t.parentId}`,{state:"creating",featureId:t.featureId,name:t.name,description:t.description,repositoryPath:t.repositoryPath},"dependencyEdge");let r=y.find(e=>"repositoryNode"===e.type&&e.data.repositoryPath===t.repositoryPath);C(r?.id??null,{state:"running",featureId:t.featureId,name:t.name,description:t.description,repositoryPath:t.repositoryPath})};return window.addEventListener("shep:feature-created",e),()=>window.removeEventListener("shep:feature-created",e)},[y,C]),(0,n.useEffect)(()=>{_({onNodeAction:z,onFeatureDelete:E,onRepositoryAdd:$,onRepositoryClick:B,onRepositoryDelete:N})},[_,z,E,$,B,N]);let q=(0,n.useCallback)((e,t)=>{x(t)},[x]),W=y.some(e=>"repositoryNode"===e.type),V=c.startsWith("/create"),U=(0,n.useMemo)(()=>{let e=y.filter(e=>"repositoryNode"===e.type),t=y.some(e=>"featureNode"===e.type);return 1!==e.length||t||V?y:y.map(e=>"repositoryNode"===e.type?{...e,data:{...e.data,pulseAdd:!0}}:e)},[y,V]);return W?(0,t.jsx)(S,{nodes:U,edges:b,selectedFeatureId:u,defaultViewport:m,onNodesChange:w,onConnect:j,onAddFeature:F,onNodeClick:A,onPaneClick:G,onMoveEnd:q,onResetViewport:v,emptyState:(0,t.jsx)(eu,{onRepositorySelect:k})}):(0,t.jsx)(eu,{onRepositorySelect:k})}function eg({initialNodes:e,initialEdges:n,drawer:o}){return(0,t.jsxs)("div",{"data-testid":"control-center",className:"h-full w-full",children:[(0,t.jsx)(r.ReactFlowProvider,{children:(0,t.jsx)(ep,{initialNodes:e,initialEdges:n})}),(0,t.jsx)("div",{children:o},"drawer")]})}e.s(["ControlCenter",()=>eg],48246)}]);