@sleep2agi/agent-network-dashboard 0.1.0-preview.7 → 0.1.0-preview.9

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 (325) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +6 -6
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/diagnostics/route-bundle-stats.json +90 -87
  5. package/.next/fallback-build-manifest.json +3 -3
  6. package/.next/server/app/_global-error/page/build-manifest.json +3 -3
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +8 -8
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +8 -8
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +4 -4
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page/build-manifest.json +3 -3
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +2 -2
  18. package/.next/server/app/_not-found.rsc +11 -11
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  20. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  21. package/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
  22. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  23. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  25. package/.next/server/app/admin/page/build-manifest.json +3 -3
  26. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  27. package/.next/server/app/admin.html +2 -2
  28. package/.next/server/app/admin.rsc +13 -13
  29. package/.next/server/app/admin.segments/_full.segment.rsc +13 -13
  30. package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
  31. package/.next/server/app/admin.segments/_index.segment.rsc +6 -6
  32. package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
  33. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
  34. package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
  35. package/.next/server/app/api/anet/config/route.js +2 -2
  36. package/.next/server/app/api/anet/config/route.js.nft.json +1 -1
  37. package/.next/server/app/api/auth/login/route.js +2 -2
  38. package/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  39. package/.next/server/app/api/auth/logout/route.js +2 -2
  40. package/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  41. package/.next/server/app/api/auth/v3/route.js +2 -2
  42. package/.next/server/app/api/auth/v3/route.js.nft.json +1 -1
  43. package/.next/server/app/api/hub/audit-log/route.js +2 -2
  44. package/.next/server/app/api/hub/audit-log/route.js.nft.json +1 -1
  45. package/.next/server/app/api/hub/auth/route.js +2 -2
  46. package/.next/server/app/api/hub/auth/route.js.nft.json +1 -1
  47. package/.next/server/app/api/hub/broadcast/route.js +2 -2
  48. package/.next/server/app/api/hub/broadcast/route.js.nft.json +1 -1
  49. package/.next/server/app/api/hub/events/route.js +2 -2
  50. package/.next/server/app/api/hub/events/route.js.nft.json +1 -1
  51. package/.next/server/app/api/hub/health/route.js +2 -2
  52. package/.next/server/app/api/hub/health/route.js.nft.json +1 -1
  53. package/.next/server/app/api/hub/inbox/route.js +2 -2
  54. package/.next/server/app/api/hub/inbox/route.js.nft.json +1 -1
  55. package/.next/server/app/api/hub/license/route.js +2 -2
  56. package/.next/server/app/api/hub/license/route.js.nft.json +1 -1
  57. package/.next/server/app/api/hub/messages/route.js +2 -2
  58. package/.next/server/app/api/hub/messages/route.js.nft.json +1 -1
  59. package/.next/server/app/api/hub/networks/route.js +2 -2
  60. package/.next/server/app/api/hub/networks/route.js.nft.json +1 -1
  61. package/.next/server/app/api/hub/nodes/route.js +2 -2
  62. package/.next/server/app/api/hub/nodes/route.js.nft.json +1 -1
  63. package/.next/server/app/api/hub/register/route.js +2 -2
  64. package/.next/server/app/api/hub/register/route.js.nft.json +1 -1
  65. package/.next/server/app/api/hub/send/route.js +2 -2
  66. package/.next/server/app/api/hub/send/route.js.nft.json +1 -1
  67. package/.next/server/app/api/hub/session/route.js +2 -2
  68. package/.next/server/app/api/hub/session/route.js.nft.json +1 -1
  69. package/.next/server/app/api/hub/stats/route.js +2 -2
  70. package/.next/server/app/api/hub/stats/route.js.nft.json +1 -1
  71. package/.next/server/app/api/hub/status/route.js +2 -2
  72. package/.next/server/app/api/hub/status/route.js.nft.json +1 -1
  73. package/.next/server/app/api/hub/task-events/route.js +2 -2
  74. package/.next/server/app/api/hub/task-events/route.js.nft.json +1 -1
  75. package/.next/server/app/api/hub/tasks/route.js +2 -2
  76. package/.next/server/app/api/hub/tasks/route.js.nft.json +1 -1
  77. package/.next/server/app/api/hub/tmux/route.js +2 -2
  78. package/.next/server/app/api/hub/tmux/route.js.nft.json +1 -1
  79. package/.next/server/app/api/hub/tokens/route.js +2 -2
  80. package/.next/server/app/api/hub/tokens/route.js.nft.json +1 -1
  81. package/.next/server/app/docs/page/build-manifest.json +3 -3
  82. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  83. package/.next/server/app/docs.html +2 -2
  84. package/.next/server/app/docs.rsc +13 -13
  85. package/.next/server/app/docs.segments/_full.segment.rsc +13 -13
  86. package/.next/server/app/docs.segments/_head.segment.rsc +4 -4
  87. package/.next/server/app/docs.segments/_index.segment.rsc +6 -6
  88. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  89. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +4 -4
  90. package/.next/server/app/docs.segments/docs.segment.rsc +3 -3
  91. package/.next/server/app/index.html +2 -2
  92. package/.next/server/app/index.rsc +13 -13
  93. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  94. package/.next/server/app/index.segments/_full.segment.rsc +13 -13
  95. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  96. package/.next/server/app/index.segments/_index.segment.rsc +6 -6
  97. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  98. package/.next/server/app/login/page/build-manifest.json +3 -3
  99. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  100. package/.next/server/app/login.html +1 -1
  101. package/.next/server/app/login.rsc +13 -13
  102. package/.next/server/app/login.segments/_full.segment.rsc +13 -13
  103. package/.next/server/app/login.segments/_head.segment.rsc +4 -4
  104. package/.next/server/app/login.segments/_index.segment.rsc +6 -6
  105. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  106. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  107. package/.next/server/app/login.segments/login.segment.rsc +3 -3
  108. package/.next/server/app/logs/page/build-manifest.json +3 -3
  109. package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/logs.html +2 -2
  111. package/.next/server/app/logs.rsc +13 -13
  112. package/.next/server/app/logs.segments/_full.segment.rsc +13 -13
  113. package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
  114. package/.next/server/app/logs.segments/_index.segment.rsc +6 -6
  115. package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
  116. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
  117. package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
  118. package/.next/server/app/messages/page/build-manifest.json +3 -3
  119. package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
  120. package/.next/server/app/messages.html +2 -2
  121. package/.next/server/app/messages.rsc +13 -13
  122. package/.next/server/app/messages.segments/_full.segment.rsc +13 -13
  123. package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
  124. package/.next/server/app/messages.segments/_index.segment.rsc +6 -6
  125. package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
  126. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
  127. package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
  128. package/.next/server/app/node/page/build-manifest.json +3 -3
  129. package/.next/server/app/node/page.js.nft.json +1 -1
  130. package/.next/server/app/node/page_client-reference-manifest.js +1 -1
  131. package/.next/server/app/node.html +2 -2
  132. package/.next/server/app/node.rsc +13 -13
  133. package/.next/server/app/node.segments/_full.segment.rsc +13 -13
  134. package/.next/server/app/node.segments/_head.segment.rsc +4 -4
  135. package/.next/server/app/node.segments/_index.segment.rsc +6 -6
  136. package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
  137. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
  138. package/.next/server/app/node.segments/node.segment.rsc +3 -3
  139. package/.next/server/app/nodes/page/build-manifest.json +3 -3
  140. package/.next/server/app/nodes/page.js.nft.json +1 -1
  141. package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  142. package/.next/server/app/nodes.html +2 -2
  143. package/.next/server/app/nodes.rsc +13 -13
  144. package/.next/server/app/nodes.segments/_full.segment.rsc +13 -13
  145. package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
  146. package/.next/server/app/nodes.segments/_index.segment.rsc +6 -6
  147. package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
  148. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
  149. package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
  150. package/.next/server/app/page/build-manifest.json +3 -3
  151. package/.next/server/app/page.js.nft.json +1 -1
  152. package/.next/server/app/page_client-reference-manifest.js +1 -1
  153. package/.next/server/app/settings/networks/page/build-manifest.json +3 -3
  154. package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
  155. package/.next/server/app/settings/networks.html +2 -2
  156. package/.next/server/app/settings/networks.rsc +13 -13
  157. package/.next/server/app/settings/networks.segments/_full.segment.rsc +13 -13
  158. package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
  159. package/.next/server/app/settings/networks.segments/_index.segment.rsc +6 -6
  160. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
  161. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
  162. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
  163. package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
  164. package/.next/server/app/settings/page/build-manifest.json +3 -3
  165. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  166. package/.next/server/app/settings/tokens/page/build-manifest.json +3 -3
  167. package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
  168. package/.next/server/app/settings/tokens.html +2 -2
  169. package/.next/server/app/settings/tokens.rsc +13 -13
  170. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +13 -13
  171. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
  172. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +6 -6
  173. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
  174. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
  175. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
  176. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
  177. package/.next/server/app/settings.html +2 -2
  178. package/.next/server/app/settings.rsc +13 -13
  179. package/.next/server/app/settings.segments/_full.segment.rsc +13 -13
  180. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  181. package/.next/server/app/settings.segments/_index.segment.rsc +6 -6
  182. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  183. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  184. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  185. package/.next/server/app/tasks/[id]/page/build-manifest.json +3 -3
  186. package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  187. package/.next/server/app/tasks/page/build-manifest.json +3 -3
  188. package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  189. package/.next/server/app/tasks.html +2 -2
  190. package/.next/server/app/tasks.rsc +13 -13
  191. package/.next/server/app/tasks.segments/_full.segment.rsc +13 -13
  192. package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
  193. package/.next/server/app/tasks.segments/_index.segment.rsc +6 -6
  194. package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
  195. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
  196. package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
  197. package/.next/server/chunks/[root-of-the-server]__0.r9hpx._.js +3 -0
  198. package/.next/server/chunks/{[root-of-the-server]__0sywwd7._.js.map → [root-of-the-server]__0.r9hpx._.js.map} +1 -1
  199. package/.next/server/chunks/[root-of-the-server]__0.~awwb._.js +3 -0
  200. package/.next/server/chunks/{[root-of-the-server]__02up7n2._.js.map → [root-of-the-server]__0.~awwb._.js.map} +1 -1
  201. package/.next/server/chunks/[root-of-the-server]__011ghni._.js +3 -0
  202. package/.next/server/chunks/{[root-of-the-server]__0mmo75i._.js.map → [root-of-the-server]__011ghni._.js.map} +1 -1
  203. package/.next/server/chunks/[root-of-the-server]__0_roltz._.js +3 -0
  204. package/.next/server/chunks/{[root-of-the-server]__05uypa~._.js.map → [root-of-the-server]__0_roltz._.js.map} +1 -1
  205. package/.next/server/chunks/[root-of-the-server]__0ak3zmb._.js +3 -0
  206. package/.next/server/chunks/{[root-of-the-server]__0u9ppm.._.js.map → [root-of-the-server]__0ak3zmb._.js.map} +1 -1
  207. package/.next/server/chunks/[root-of-the-server]__0c0_p0v._.js +3 -0
  208. package/.next/server/chunks/{[root-of-the-server]__0uxkj4r._.js.map → [root-of-the-server]__0c0_p0v._.js.map} +1 -1
  209. package/.next/server/chunks/[root-of-the-server]__0c5h0a~._.js +3 -0
  210. package/.next/server/chunks/{[root-of-the-server]__0hz-gqk._.js.map → [root-of-the-server]__0c5h0a~._.js.map} +1 -1
  211. package/.next/server/chunks/[root-of-the-server]__0cfodg2._.js +3 -0
  212. package/.next/server/chunks/{[root-of-the-server]__0nb8029._.js.map → [root-of-the-server]__0cfodg2._.js.map} +1 -1
  213. package/.next/server/chunks/[root-of-the-server]__0fo7jlh._.js +3 -0
  214. package/.next/server/chunks/{[root-of-the-server]__0m77953._.js.map → [root-of-the-server]__0fo7jlh._.js.map} +1 -1
  215. package/.next/server/chunks/[root-of-the-server]__0hj~i84._.js +3 -0
  216. package/.next/server/chunks/{[root-of-the-server]__0nl3akl._.js.map → [root-of-the-server]__0hj~i84._.js.map} +1 -1
  217. package/.next/server/chunks/[root-of-the-server]__0hxwf9u._.js +3 -0
  218. package/.next/server/chunks/{[root-of-the-server]__13e9ex0._.js.map → [root-of-the-server]__0hxwf9u._.js.map} +1 -1
  219. package/.next/server/chunks/[root-of-the-server]__0k.vegl._.js +3 -0
  220. package/.next/server/chunks/{[root-of-the-server]__0g16ayc._.js.map → [root-of-the-server]__0k.vegl._.js.map} +1 -1
  221. package/.next/server/chunks/[root-of-the-server]__0k3eytp._.js +3 -0
  222. package/.next/server/chunks/{[root-of-the-server]__0q86a80._.js.map → [root-of-the-server]__0k3eytp._.js.map} +1 -1
  223. package/.next/server/chunks/[root-of-the-server]__0khwewd._.js +3 -0
  224. package/.next/server/chunks/{[root-of-the-server]__12s1q1.._.js.map → [root-of-the-server]__0khwewd._.js.map} +1 -1
  225. package/.next/server/chunks/[root-of-the-server]__0ku8l.~._.js +3 -0
  226. package/.next/server/chunks/{[root-of-the-server]__0344fys._.js.map → [root-of-the-server]__0ku8l.~._.js.map} +1 -1
  227. package/.next/server/chunks/[root-of-the-server]__0kx9lo1._.js +3 -0
  228. package/.next/server/chunks/{[root-of-the-server]__0o1z0_7._.js.map → [root-of-the-server]__0kx9lo1._.js.map} +1 -1
  229. package/.next/server/chunks/[root-of-the-server]__0lu__6g._.js +3 -0
  230. package/.next/server/chunks/{[root-of-the-server]__0150zad._.js.map → [root-of-the-server]__0lu__6g._.js.map} +1 -1
  231. package/.next/server/chunks/[root-of-the-server]__0nsfjkb._.js +3 -0
  232. package/.next/server/chunks/{[root-of-the-server]__0swcbs5._.js.map → [root-of-the-server]__0nsfjkb._.js.map} +1 -1
  233. package/.next/server/chunks/[root-of-the-server]__0p3fo6l._.js +1 -1
  234. package/.next/server/chunks/[root-of-the-server]__0t0.lss._.js +3 -0
  235. package/.next/server/chunks/{[root-of-the-server]__09dhh_t._.js.map → [root-of-the-server]__0t0.lss._.js.map} +1 -1
  236. package/.next/server/chunks/[root-of-the-server]__0wpe~w2._.js +3 -0
  237. package/.next/server/chunks/{[root-of-the-server]__09kj7n.._.js.map → [root-of-the-server]__0wpe~w2._.js.map} +1 -1
  238. package/.next/server/chunks/[root-of-the-server]__0x.-194._.js +3 -0
  239. package/.next/server/chunks/{[root-of-the-server]__11aui~e._.js.map → [root-of-the-server]__0x.-194._.js.map} +1 -1
  240. package/.next/server/chunks/[root-of-the-server]__10ducxb._.js +3 -0
  241. package/.next/server/chunks/{[root-of-the-server]__10439sp._.js.map → [root-of-the-server]__10ducxb._.js.map} +1 -1
  242. package/.next/server/chunks/[root-of-the-server]__10~rj8b._.js +3 -0
  243. package/.next/server/chunks/{[root-of-the-server]__0w~31ff._.js.map → [root-of-the-server]__10~rj8b._.js.map} +1 -1
  244. package/.next/server/chunks/[root-of-the-server]__114809t._.js +3 -0
  245. package/.next/server/chunks/{[root-of-the-server]__0uf_olq._.js.map → [root-of-the-server]__114809t._.js.map} +1 -1
  246. package/.next/server/chunks/[root-of-the-server]__11yl3c.._.js +3 -0
  247. package/.next/server/chunks/{[root-of-the-server]__090uiv5._.js.map → [root-of-the-server]__11yl3c.._.js.map} +1 -1
  248. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0yubv2d.js +1 -1
  249. package/.next/server/chunks/ssr/[root-of-the-server]__093ymui._.js +3 -0
  250. package/.next/server/chunks/ssr/[root-of-the-server]__093ymui._.js.map +1 -0
  251. package/.next/server/chunks/ssr/[root-of-the-server]__0nrckjd._.js +3 -0
  252. package/.next/server/chunks/ssr/[root-of-the-server]__0nrckjd._.js.map +1 -0
  253. package/.next/server/chunks/ssr/[root-of-the-server]__0xm3h9x._.js +3 -0
  254. package/.next/server/chunks/ssr/[root-of-the-server]__0xm3h9x._.js.map +1 -0
  255. package/.next/server/chunks/ssr/[root-of-the-server]__0~yad5w._.js +3 -0
  256. package/.next/server/chunks/ssr/[root-of-the-server]__0~yad5w._.js.map +1 -0
  257. package/.next/server/middleware-build-manifest.js +6 -6
  258. package/.next/server/pages/404.html +2 -2
  259. package/.next/server/pages/500.html +1 -1
  260. package/.next/static/chunks/00uwfd~z5dh.b.js +1 -0
  261. package/.next/static/chunks/{0io~i_rk3k9q3.js → 060yf6n1jdcri.js} +1 -1
  262. package/.next/static/chunks/{01bx19dpl~r6u.js → 063eleenll4ri.js} +1 -1
  263. package/.next/static/chunks/{0fpff4dxg3a5x.js → 08aj9~75raaah.js} +1 -1
  264. package/.next/static/chunks/{0xqtq9944k~ek.js → 08v0-ki6vwpxf.js} +1 -1
  265. package/.next/static/chunks/{0tb-yun7e_n3c.js → 09al3qm76q7nd.js} +1 -1
  266. package/.next/static/chunks/{12t1c0u8~txfo.js → 0afxijuigt-49.js} +1 -1
  267. package/.next/static/chunks/0dkkv90do9a4r.js +1 -0
  268. package/.next/static/chunks/{024co7ns8w7ms.js → 0ejz4zwhu3a3y.js} +1 -1
  269. package/.next/static/chunks/{0ql1nb6991-hi.js → 0h4x8zbbd__pl.js} +1 -1
  270. package/.next/static/chunks/{02w9ytw8eey3r.js → 0krweyme4bfjm.js} +1 -1
  271. package/.next/static/chunks/0ogeals5ufhho.js +1 -0
  272. package/.next/static/chunks/{15-ywchriw.vi.js → 0u359llqm1_01.js} +1 -1
  273. package/.next/static/chunks/{0~sxxils~iff..js → 0ugk4jd4e7oft.js} +1 -1
  274. package/.next/static/chunks/{0w.7_h6kx__bg.js → 0uqfv6rc-xdru.js} +1 -1
  275. package/.next/static/chunks/{11f7871-m2pu4.js → 0vlojka~d~9h4.js} +1 -1
  276. package/.next/static/chunks/0xakhywf66-mg.js +1 -0
  277. package/.next/static/chunks/0xenn83e6rq1m.css +2 -0
  278. package/.next/static/chunks/{0w5hxo645~s.g.js → 0xrnwfefpke-g.js} +2 -2
  279. package/.next/static/chunks/{0s4w.hhez3.xx.js → 14bsg3_-taiw4.js} +1 -1
  280. package/.next/static/chunks/{turbopack-0zklppa1rg.u8.js → turbopack-0vsvjs02l449s.js} +1 -1
  281. package/.next/trace +2 -2
  282. package/.next/trace-build +1 -1
  283. package/app/api/hub/tasks/route.ts +2 -0
  284. package/app/components/TaskChatPanel.tsx +48 -22
  285. package/package.json +3 -1
  286. package/.next/server/chunks/[root-of-the-server]__0150zad._.js +0 -3
  287. package/.next/server/chunks/[root-of-the-server]__02up7n2._.js +0 -3
  288. package/.next/server/chunks/[root-of-the-server]__0344fys._.js +0 -3
  289. package/.next/server/chunks/[root-of-the-server]__05uypa~._.js +0 -3
  290. package/.next/server/chunks/[root-of-the-server]__090uiv5._.js +0 -3
  291. package/.next/server/chunks/[root-of-the-server]__09dhh_t._.js +0 -3
  292. package/.next/server/chunks/[root-of-the-server]__09kj7n.._.js +0 -3
  293. package/.next/server/chunks/[root-of-the-server]__0g16ayc._.js +0 -3
  294. package/.next/server/chunks/[root-of-the-server]__0hz-gqk._.js +0 -3
  295. package/.next/server/chunks/[root-of-the-server]__0m77953._.js +0 -3
  296. package/.next/server/chunks/[root-of-the-server]__0mmo75i._.js +0 -3
  297. package/.next/server/chunks/[root-of-the-server]__0nb8029._.js +0 -3
  298. package/.next/server/chunks/[root-of-the-server]__0nl3akl._.js +0 -3
  299. package/.next/server/chunks/[root-of-the-server]__0o1z0_7._.js +0 -3
  300. package/.next/server/chunks/[root-of-the-server]__0q86a80._.js +0 -3
  301. package/.next/server/chunks/[root-of-the-server]__0swcbs5._.js +0 -3
  302. package/.next/server/chunks/[root-of-the-server]__0sywwd7._.js +0 -3
  303. package/.next/server/chunks/[root-of-the-server]__0u9ppm.._.js +0 -3
  304. package/.next/server/chunks/[root-of-the-server]__0uf_olq._.js +0 -3
  305. package/.next/server/chunks/[root-of-the-server]__0uxkj4r._.js +0 -3
  306. package/.next/server/chunks/[root-of-the-server]__0w~31ff._.js +0 -3
  307. package/.next/server/chunks/[root-of-the-server]__10439sp._.js +0 -3
  308. package/.next/server/chunks/[root-of-the-server]__11aui~e._.js +0 -3
  309. package/.next/server/chunks/[root-of-the-server]__12s1q1.._.js +0 -3
  310. package/.next/server/chunks/[root-of-the-server]__13e9ex0._.js +0 -3
  311. package/.next/server/chunks/ssr/_0s2kgzl._.js +0 -3
  312. package/.next/server/chunks/ssr/_0s2kgzl._.js.map +0 -1
  313. package/.next/server/chunks/ssr/app_05bbp~.._.js +0 -3
  314. package/.next/server/chunks/ssr/app_05bbp~.._.js.map +0 -1
  315. package/.next/server/chunks/ssr/app_0d3prqs._.js +0 -3
  316. package/.next/server/chunks/ssr/app_0d3prqs._.js.map +0 -1
  317. package/.next/server/chunks/ssr/app_0p9bx.i._.js +0 -3
  318. package/.next/server/chunks/ssr/app_0p9bx.i._.js.map +0 -1
  319. package/.next/static/chunks/06f76ht~w6c6c.js +0 -1
  320. package/.next/static/chunks/0_qu9.8wo.eq1.css +0 -2
  321. package/.next/static/chunks/0g5j6.4xxjqd3.js +0 -1
  322. package/.next/static/chunks/15cp_p75shcm9.js +0 -1
  323. /package/.next/static/{2rqnf6RwG7ululyvXyiP5 → E8R10krmbjKv-G9MRFxJD}/_buildManifest.js +0 -0
  324. /package/.next/static/{2rqnf6RwG7ululyvXyiP5 → E8R10krmbjKv-G9MRFxJD}/_clientMiddlewareManifest.js +0 -0
  325. /package/.next/static/{2rqnf6RwG7ululyvXyiP5 → E8R10krmbjKv-G9MRFxJD}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return o},execOnce:function(){return i},getDisplayName:function(){return f},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return d},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return E}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Object.defineProperty(Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},77086,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),a=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809),i=e.r(43476),s=o._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(77086),f=e.r(18967),d=e.r(5550);e.r(33525);let h=e.r(88540),p=e.r(91949),g=e.r(73668),m=e.r(9396);function y(t){var r,n;let a,o,y,[b,x]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),w=(0,s.useRef)(null),{href:E,as:j,children:_,prefetch:k=null,passHref:S,replace:O,shallow:T,scroll:N,onClick:R,onMouseEnter:C,onTouchStart:P,legacyBehavior:M=!1,onNavigate:L,transitionTypes:A,ref:I,unstable_dynamicOnHover:V,...D}=t;a=_,M&&("string"==typeof a||"number"==typeof a)&&(a=(0,i.jsx)("a",{children:a}));let $=s.default.useContext(u.AppRouterContext),F=!1!==k,U=!1!==k?null===(n=k)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,W="string"==typeof(r=j||E)?r:(0,l.formatUrl)(r);if(M){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=s.default.Children.only(a)}let z=M?o&&"object"==typeof o&&o.ref:I,B=s.default.useCallback(e=>(null!==$&&(w.current=(0,p.mountLinkInstance)(e,W,$,U,F,x)),()=>{w.current&&((0,p.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,W,$,U,x]),K={ref:(0,c.useMergedRef)(B,z),onClick(t){M||"function"!=typeof R||R(t),M&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,a,o,i,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);s.default.startTransition(()=>{f(r,a?"replace":"push",!1===o?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,W,w,O,N,L,A)},onMouseEnter(e){M||"function"!=typeof C||C(e),M&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===V)},onTouchStart:function(e){M||"function"!=typeof P||P(e),M&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===V)}};return(0,f.isAbsoluteUrl)(W)?K.href=W:M&&!S&&("a"!==o.type||"href"in o.props)||(K.href=(0,d.addBasePath)(W)),y=M?s.default.cloneElement(o,K):(0,i.jsx)("a",{...D,...K,children:a}),(0,i.jsx)(v.Provider,{value:b,children:y})}e.r(84508);let v=(0,s.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},58963,e=>{"use strict";var t=e.i(43476),r=e.i(71645);let n=(0,r.createContext)({networkId:"",setNetworkId:()=>{}});e.s(["NetworkProvider",0,function({children:e}){let[a,o]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=sessionStorage.getItem("anet_network_id");e&&o(e)},[]),(0,t.jsx)(n.Provider,{value:{networkId:a,setNetworkId:e=>{o(e),sessionStorage.setItem("anet_network_id",e)}},children:e})},"useNetworkId",0,function(){return(0,r.useContext)(n)}])},55838,(e,t,r)=>{"use strict";var n=e.r(71645),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,i=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!a(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),a=n[0].inst,c=n[1];return s(function(){a.value=r,a.getSnapshot=t,u(a)&&c({inst:a})},[e,r,t]),i(function(){return u(a)&&c({inst:a}),e(function(){u(a)&&c({inst:a})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},2239,(e,t,r)=>{"use strict";t.exports=e.r(55838)},83599,71235,e=>{"use strict";var t=e.i(71645),r=e.i(2239);e.s(["ERROR_REVALIDATE_EVENT",0,3,"FOCUS_EVENT",0,0,"MUTATE_EVENT",0,2,"RECONNECT_EVENT",0,1],11671);var n=Object.prototype.hasOwnProperty;let a=new WeakMap,o=()=>{},i=o(),s=Object,l=e=>e===i,u=(e,t)=>({...e,...t}),c={},f={},d="undefined",h=typeof window!=d,p=typeof document!=d,g=h&&"Deno"in window,m=(e,t)=>{let r=a.get(e);return[()=>!l(t)&&e.get(t)||c,n=>{if(!l(t)){let a=e.get(t);t in f||(f[t]=a),r[5](t,u(a,n),a||c)}},r[6],()=>!l(t)&&t in f?f[t]:!l(t)&&e.get(t)||c]},y=!0,[v,b]=h&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[o,o],x={initFocus:e=>(p&&document.addEventListener("visibilitychange",e),v("focus",e),()=>{p&&document.removeEventListener("visibilitychange",e),b("focus",e)}),initReconnect:e=>{let t=()=>{y=!0,e()},r=()=>{y=!1};return v("online",t),v("offline",r),()=>{b("online",t),b("offline",r)}}},w=!t.default.useId,E=!h||g,j=E?t.useEffect:t.useLayoutEffect,_="u">typeof navigator&&navigator.connection,k=!E&&_&&(["slow-2g","2g"].includes(_.effectiveType)||_.saveData),S=new WeakMap,O=(e,t)=>e===`[object ${t}]`,T=0,N=e=>{let t,r,n=typeof e,a=s.prototype.toString.call(e),o=O(a,"Date"),i=O(a,"RegExp"),u=O(a,"Object");if(s(e)!==e||o||i)t=o?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=S.get(e))return t;if(t=++T+"~",S.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=N(e[r])+",";S.set(e,t)}if(u){t="#";let n=s.keys(e).sort();for(;!l(r=n.pop());)l(e[r])||(t+=r+":"+N(e[r])+",");S.set(e,t)}}return t},R=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?N(e):"",t]},C=0,P=()=>++C;async function M(...e){let[t,r,n,o]=e,s=u({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{}),c=s.populateCache,f=s.rollbackOnError,d=s.optimisticData,h=s.throwOnError;if("function"==typeof r){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(p))}return p(r);async function p(r){let o,[u]=R(r);if(!u)return;let[p,g]=m(t,u),[y,v,b,x]=a.get(t),w=()=>{let e=y[u];return("function"==typeof s.revalidate?s.revalidate(p().data,r):!1!==s.revalidate)&&(delete b[u],delete x[u],e&&e[0])?e[0](2).then(()=>p().data):p().data};if(e.length<3)return w();let E=n,j=!1,_=P();v[u]=[_,0];let k=!l(d),S=p(),O=S.data,T=S._c,N=l(T)?O:T;if(k&&g({data:d="function"==typeof d?d(N,O):d,_c:N}),"function"==typeof E)try{E=E(N)}catch(e){o=e,j=!0}if(E&&"function"==typeof E.then){let e;if(E=await E.catch(e=>{o=e,j=!0}),_!==v[u][0]){if(j)throw o;return E}j&&k&&(e=o,"function"==typeof f?f(e):!1!==f)&&(c=!0,g({data:N,_c:i}))}if(c&&!j&&("function"==typeof c?g({data:c(E,N),error:i,_c:i}):g({data:E,error:i,_c:i})),v[u][1]=P(),Promise.resolve(w()).then(()=>{g({_c:i})}),j){if(h)throw o;return}return E}}let L=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},A=(e,t)=>{if(!a.has(e)){let r=u(x,t),n=Object.create(null),s=M.bind(i,e),l=o,c=Object.create(null),f=(e,t)=>{let r=c[e]||[];return c[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},d=(t,r,n)=>{e.set(t,r);let a=c[t];if(a)for(let e of a)e(r,n)},h=()=>{if(!a.has(e)&&(a.set(e,[n,Object.create(null),Object.create(null),Object.create(null),s,d,f]),!E)){let t=r.initFocus(setTimeout.bind(i,L.bind(i,n,0))),o=r.initReconnect(setTimeout.bind(i,L.bind(i,n,1)));l=()=>{t&&t(),o&&o(),a.delete(e)}}};return h(),[e,s,h,l]}return[e,a.get(e)[4]]},[I,V]=A(new Map),D=u({onLoadingSlow:o,onSuccess:o,onError:o,onErrorRetry:(e,t,r,n,a)=>{let o=r.errorRetryCount,i=a.retryCount,s=~~((Math.random()+.5)*(1<<(i<8?i:8)))*r.errorRetryInterval;(l(o)||!(i>o))&&setTimeout(n,s,a)},onDiscarded:o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:k?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:k?5e3:3e3,compare:function e(t,r){var a,o;if(t===r)return!0;if(t&&r&&(a=t.constructor)===r.constructor){if(a===Date)return t.getTime()===r.getTime();if(a===RegExp)return t.toString()===r.toString();if(a===Array){if((o=t.length)===r.length)for(;o--&&e(t[o],r[o]););return -1===o}if(!a||"object"==typeof t){for(a in o=0,t)if(n.call(t,a)&&++o&&!n.call(r,a)||!(a in r)||!e(t[a],r[a]))return!1;return Object.keys(r).length===o}}return t!=t&&r!=r},isPaused:()=>!1,cache:I,mutate:V,fallback:{}},{isOnline:()=>y,isVisible:()=>{let e=p&&document.visibilityState;return l(e)||"hidden"!==e}}),$=(e,t)=>{let r=u(e,t);if(t){let{use:n,fallback:a}=e,{use:o,fallback:i}=t;n&&o&&(r.use=n.concat(o)),a&&i&&(r.fallback=u(a,i))}return r},F=(0,t.createContext)({});var U=e.i(11671);let W=h&&window.__SWR_DEVTOOLS_USE__,z=W?window.__SWR_DEVTOOLS_USE__:[],B=()=>{let e=(0,t.useContext)(F);return(0,t.useMemo)(()=>u(D,e),[e])},K=z.concat(e=>(t,r,n)=>{let o=r&&((...e)=>{let[n]=R(t),[,,,o]=a.get(I);if(n.startsWith("$inf$"))return r(...e);let i=o[n];return l(i)?r(...e):(delete o[n],i)});return e(t,o,n)}),q=e=>function(...t){let r,n=B(),[a,o,i]="function"==typeof(r=t)[1]?[r[0],r[1],r[2]||{}]:[r[0],null,(null===r[1]?r[2]:r[1])||{}],s=$(n,i),l=e,{use:u}=s,c=(u||[]).concat(K);for(let e=c.length;e--;)l=c[e](l);return l(a,o||s.fetcher||null,s)},H=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}};W&&(window.__SWR_DEVTOOLS_REACT__=t.default),e.s(["subscribeCallback",0,H,"useSWRConfig",0,B,"withArgs",0,q],71235);let J=()=>{},Q=J(),X=(new WeakMap,t.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),Z={dedupe:!0},G=Promise.resolve(i),Y=()=>o;s.defineProperty(e=>{let{value:r}=e,n=(0,t.useContext)(F),a="function"==typeof r,o=(0,t.useMemo)(()=>a?r(n):r,[a,n,r]),s=(0,t.useMemo)(()=>a?o:$(n,o),[a,n,o]),l=o&&o.provider,c=(0,t.useRef)(i);l&&!c.current&&(c.current=A(l(s.cache||I),o));let f=c.current;return f&&(s.cache=f[0],s.mutate=f[1]),j(()=>{if(f)return f[2]&&f[2](),f[3]},[]),(0,t.createElement)(F.Provider,u(e,{value:s}))},"defaultValue",{value:D});let ee=q((e,n,o)=>{let{cache:s,compare:c,suspense:f,fallbackData:p,revalidateOnMount:g,revalidateIfStale:y,refreshInterval:v,refreshWhenHidden:b,refreshWhenOffline:x,keepPreviousData:_,strictServerPrefetchWarning:k}=o,[S,O,T,N]=a.get(s),[C,L]=R(e),A=(0,t.useRef)(!1),I=(0,t.useRef)(!1),V=(0,t.useRef)(C),D=(0,t.useRef)(n),$=(0,t.useRef)(o),F=()=>$.current.isVisible()&&$.current.isOnline(),[W,z,B,K]=m(s,C),q=(0,t.useRef)({}).current,J=l(p)?l(o.fallback)?i:o.fallback[C]:p,Q=(e,t)=>{for(let r in q)if("data"===r){if(!c(e[r],t[r])&&(!l(e[r])||!c(el,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},ee=!A.current,et=(0,t.useMemo)(()=>{let e=W(),t=K(),r=e=>{let t=u(e);return(delete t._k,(()=>{if(!C||!n||$.current.isPaused())return!1;if(ee&&!l(g))return g;let e=l(J)?t.data:J;return l(e)||y})())?{isValidating:!0,isLoading:!0,...t}:t},a=r(e),o=e===t?a:r(t),i=a;return[()=>{let e=r(W());return Q(e,i)?(i.data=e.data,i.isLoading=e.isLoading,i.isValidating=e.isValidating,i.error=e.error,i):(i=e,e)},()=>o]},[s,C]),er=(0,r.useSyncExternalStore)((0,t.useCallback)(e=>B(C,(t,r)=>{Q(r,t)||e()}),[s,C]),et[0],et[1]),en=S[C]&&S[C].length>0,ea=er.data,eo=l(ea)?J&&"function"==typeof J.then?X(J):J:ea,ei=er.error,es=(0,t.useRef)(eo),el=_?l(ea)?l(es.current)?eo:es.current:ea:eo,eu=C&&l(eo),ec=(0,t.useRef)(null);E||(0,r.useSyncExternalStore)(Y,()=>(ec.current=!1,ec),()=>(ec.current=!0,ec));let ef=ec.current;k&&ef&&!f&&eu&&console.warn(`Missing pre-initiated data for serialized key "${C}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ed=!(!C||!n||$.current.isPaused())&&(!en||!!l(ei))&&(ee&&!l(g)?g:f?!l(eo)&&y:l(eo)||y),eh=ee&&ed,ep=l(er.isValidating)?eh:er.isValidating,eg=l(er.isLoading)?eh:er.isLoading,em=(0,t.useCallback)(async e=>{let t,r,n=D.current;if(!C||!n||I.current||$.current.isPaused())return!1;let a=!0,s=e||{},u=!T[C]||!s.dedupe,f=()=>w?!I.current&&C===V.current&&A.current:C===V.current,d={isValidating:!1,isLoading:!1},h=()=>{z(d)},p=()=>{let e=T[C];e&&e[1]===r&&delete T[C]},g={isValidating:!0};l(W().data)&&(g.isLoading=!0);try{if(u&&(z(g),o.loadingTimeout&&l(W().data)&&setTimeout(()=>{a&&f()&&$.current.onLoadingSlow(C,o)},o.loadingTimeout),T[C]=[n(L),P()]),[t,r]=T[C],t=await t,u&&setTimeout(p,o.dedupingInterval),!T[C]||T[C][1]!==r)return u&&f()&&$.current.onDiscarded(C),!1;d.error=i;let e=O[C];if(!l(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return h(),u&&f()&&$.current.onDiscarded(C),!1;let s=W().data;d.data=c(s,t)?s:t,u&&f()&&$.current.onSuccess(t,C,o)}catch(r){p();let e=$.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,u&&f())&&(e.onError(r,C,e),(!0===t||"function"==typeof t&&t(r))&&(!$.current.revalidateOnFocus||!$.current.revalidateOnReconnect||F())&&e.onErrorRetry(r,C,e,e=>{let t=S[C];t&&t[0]&&t[0](U.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0}))}return a=!1,h(),!0},[C,s]),ey=(0,t.useCallback)((...e)=>M(s,V.current,...e),[]);if(j(()=>{D.current=n,$.current=o,l(ea)||(es.current=ea)}),j(()=>{if(!C)return;let e=em.bind(i,Z),t=0;$.current.revalidateOnFocus&&(t=Date.now()+$.current.focusThrottleInterval);let r=H(C,S,(r,n={})=>{if(r==U.FOCUS_EVENT){let r=Date.now();$.current.revalidateOnFocus&&r>t&&F()&&(t=r+$.current.focusThrottleInterval,e())}else if(r==U.RECONNECT_EVENT)$.current.revalidateOnReconnect&&F()&&e();else if(r==U.MUTATE_EVENT)return em();else if(r==U.ERROR_REVALIDATE_EVENT)return em(n)});if(I.current=!1,V.current=C,A.current=!0,z({_k:L}),ed&&!T[C])if(l(eo)||E)e();else h&&typeof window.requestAnimationFrame!=d?window.requestAnimationFrame(e):setTimeout(e,1);return()=>{I.current=!0,r()}},[C]),j(()=>{let e;function t(){let t="function"==typeof v?v(W().data):v;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!W().error&&(b||$.current.isVisible())&&(x||$.current.isOnline())?em(Z).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[v,b,x,C]),(0,t.useDebugValue)(el),f){if(!w&&E&&eu)throw Error("Fallback data is required when using Suspense in SSR.");eu&&(D.current=n,$.current=o,I.current=!1);let e=N[C];if(X(!l(e)&&eu?ey(e):G),!l(ei)&&eu)throw ei;let t=eu?em(Z):G;!l(el)&&eu&&(t.status="fulfilled",t.value=!0),X(t)}return{mutate:ey,get data(){return q.data=!0,el},get error(){return q.error=!0,ei},get isValidating(){return q.isValidating=!0,ep},get isLoading(){return q.isLoading=!0,eg}}});e.s(["default",0,ee],83599)},18566,(e,t,r)=>{t.exports=e.r(76562)},25045,e=>{"use strict";var t=e.i(43476),r=e.i(18566),n=e.i(22016),a=e.i(71645),o=e.i(83599),i=e.i(58963);let s=e=>fetch(e).then(e=>e.ok?e.json():{networks:[]}),l=[{href:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"},{href:"/tasks",label:"Tasks",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},{href:"/nodes",label:"Nodes",icon:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"},{href:"/messages",label:"Messages",icon:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"},{href:"/settings/networks",label:"Networks",icon:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{href:"/logs",label:"Logs",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{href:"/admin",label:"Admin",icon:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"},{href:"/docs",label:"Docs",icon:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"},{href:"/settings",label:"Settings",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}],u={owner:"⭐",admin:"🔧",member:"👤",viewer:"👁"};function c(){let e=(0,r.usePathname)(),[c,f]=(0,a.useState)(!1),[d,h]=(0,a.useState)(!1),{networkId:p,setNetworkId:g}=(0,i.useNetworkId)(),{data:m}=(0,o.default)("/api/hub/networks",s,{refreshInterval:15e3,dedupingInterval:1e4}),y=m?.networks||[],v=(0,t.jsx)("nav",{className:"flex flex-col gap-1 px-2 py-4",children:l.map(r=>{var a;return(0,t.jsxs)(n.default,{href:r.href,prefetch:!1,onClick:()=>h(!1),className:`flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] ${("/"===(a=r.href)?"/"===e:"/settings"===a?"/settings"===e:e.startsWith(a))?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20":"text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a]"} ${c?"justify-center":""}`,children:[(0,t.jsx)("svg",{className:"w-5 h-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:r.icon})}),!c&&(0,t.jsx)("span",{children:r.label})]},r.href)})});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>h(!d),className:"fixed top-4 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-2.5 text-gray-400 hover:text-white active:bg-[#1a1a3a]","aria-label":"Toggle menu",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:d?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),d&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 z-30 lg:hidden",onClick:()=>h(!1)}),(0,t.jsxs)("aside",{className:`
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return o},execOnce:function(){return i},getDisplayName:function(){return f},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return d},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return E}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Object.defineProperty(Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},77086,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),a=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809),i=e.r(18050),s=o._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(77086),f=e.r(18967),d=e.r(5550);e.r(33525);let h=e.r(88540),p=e.r(91949),g=e.r(73668),m=e.r(9396);function y(t){var r,n;let a,o,y,[b,x]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),w=(0,s.useRef)(null),{href:E,as:j,children:_,prefetch:k=null,passHref:S,replace:O,shallow:T,scroll:N,onClick:R,onMouseEnter:C,onTouchStart:P,legacyBehavior:M=!1,onNavigate:L,transitionTypes:A,ref:I,unstable_dynamicOnHover:V,...D}=t;a=_,M&&("string"==typeof a||"number"==typeof a)&&(a=(0,i.jsx)("a",{children:a}));let $=s.default.useContext(u.AppRouterContext),F=!1!==k,U=!1!==k?null===(n=k)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,W="string"==typeof(r=j||E)?r:(0,l.formatUrl)(r);if(M){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=s.default.Children.only(a)}let z=M?o&&"object"==typeof o&&o.ref:I,B=s.default.useCallback(e=>(null!==$&&(w.current=(0,p.mountLinkInstance)(e,W,$,U,F,x)),()=>{w.current&&((0,p.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,W,$,U,x]),K={ref:(0,c.useMergedRef)(B,z),onClick(t){M||"function"!=typeof R||R(t),M&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,a,o,i,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);s.default.startTransition(()=>{f(r,a?"replace":"push",!1===o?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,W,w,O,N,L,A)},onMouseEnter(e){M||"function"!=typeof C||C(e),M&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===V)},onTouchStart:function(e){M||"function"!=typeof P||P(e),M&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===V)}};return(0,f.isAbsoluteUrl)(W)?K.href=W:M&&!S&&("a"!==o.type||"href"in o.props)||(K.href=(0,d.addBasePath)(W)),y=M?s.default.cloneElement(o,K):(0,i.jsx)("a",{...D,...K,children:a}),(0,i.jsx)(v.Provider,{value:b,children:y})}e.r(84508);let v=(0,s.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},58963,e=>{"use strict";var t=e.i(18050),r=e.i(71645);let n=(0,r.createContext)({networkId:"",setNetworkId:()=>{}});e.s(["NetworkProvider",0,function({children:e}){let[a,o]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=sessionStorage.getItem("anet_network_id");e&&o(e)},[]),(0,t.jsx)(n.Provider,{value:{networkId:a,setNetworkId:e=>{o(e),sessionStorage.setItem("anet_network_id",e)}},children:e})},"useNetworkId",0,function(){return(0,r.useContext)(n)}])},55838,(e,t,r)=>{"use strict";var n=e.r(71645),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,i=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!a(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),a=n[0].inst,c=n[1];return s(function(){a.value=r,a.getSnapshot=t,u(a)&&c({inst:a})},[e,r,t]),i(function(){return u(a)&&c({inst:a}),e(function(){u(a)&&c({inst:a})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},2239,(e,t,r)=>{"use strict";t.exports=e.r(55838)},83599,71235,e=>{"use strict";var t=e.i(71645),r=e.i(2239);e.s(["ERROR_REVALIDATE_EVENT",0,3,"FOCUS_EVENT",0,0,"MUTATE_EVENT",0,2,"RECONNECT_EVENT",0,1],11671);var n=Object.prototype.hasOwnProperty;let a=new WeakMap,o=()=>{},i=o(),s=Object,l=e=>e===i,u=(e,t)=>({...e,...t}),c={},f={},d="undefined",h=typeof window!=d,p=typeof document!=d,g=h&&"Deno"in window,m=(e,t)=>{let r=a.get(e);return[()=>!l(t)&&e.get(t)||c,n=>{if(!l(t)){let a=e.get(t);t in f||(f[t]=a),r[5](t,u(a,n),a||c)}},r[6],()=>!l(t)&&t in f?f[t]:!l(t)&&e.get(t)||c]},y=!0,[v,b]=h&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[o,o],x={initFocus:e=>(p&&document.addEventListener("visibilitychange",e),v("focus",e),()=>{p&&document.removeEventListener("visibilitychange",e),b("focus",e)}),initReconnect:e=>{let t=()=>{y=!0,e()},r=()=>{y=!1};return v("online",t),v("offline",r),()=>{b("online",t),b("offline",r)}}},w=!t.default.useId,E=!h||g,j=E?t.useEffect:t.useLayoutEffect,_="u">typeof navigator&&navigator.connection,k=!E&&_&&(["slow-2g","2g"].includes(_.effectiveType)||_.saveData),S=new WeakMap,O=(e,t)=>e===`[object ${t}]`,T=0,N=e=>{let t,r,n=typeof e,a=s.prototype.toString.call(e),o=O(a,"Date"),i=O(a,"RegExp"),u=O(a,"Object");if(s(e)!==e||o||i)t=o?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=S.get(e))return t;if(t=++T+"~",S.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=N(e[r])+",";S.set(e,t)}if(u){t="#";let n=s.keys(e).sort();for(;!l(r=n.pop());)l(e[r])||(t+=r+":"+N(e[r])+",");S.set(e,t)}}return t},R=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?N(e):"",t]},C=0,P=()=>++C;async function M(...e){let[t,r,n,o]=e,s=u({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{}),c=s.populateCache,f=s.rollbackOnError,d=s.optimisticData,h=s.throwOnError;if("function"==typeof r){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(p))}return p(r);async function p(r){let o,[u]=R(r);if(!u)return;let[p,g]=m(t,u),[y,v,b,x]=a.get(t),w=()=>{let e=y[u];return("function"==typeof s.revalidate?s.revalidate(p().data,r):!1!==s.revalidate)&&(delete b[u],delete x[u],e&&e[0])?e[0](2).then(()=>p().data):p().data};if(e.length<3)return w();let E=n,j=!1,_=P();v[u]=[_,0];let k=!l(d),S=p(),O=S.data,T=S._c,N=l(T)?O:T;if(k&&g({data:d="function"==typeof d?d(N,O):d,_c:N}),"function"==typeof E)try{E=E(N)}catch(e){o=e,j=!0}if(E&&"function"==typeof E.then){let e;if(E=await E.catch(e=>{o=e,j=!0}),_!==v[u][0]){if(j)throw o;return E}j&&k&&(e=o,"function"==typeof f?f(e):!1!==f)&&(c=!0,g({data:N,_c:i}))}if(c&&!j&&("function"==typeof c?g({data:c(E,N),error:i,_c:i}):g({data:E,error:i,_c:i})),v[u][1]=P(),Promise.resolve(w()).then(()=>{g({_c:i})}),j){if(h)throw o;return}return E}}let L=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},A=(e,t)=>{if(!a.has(e)){let r=u(x,t),n=Object.create(null),s=M.bind(i,e),l=o,c=Object.create(null),f=(e,t)=>{let r=c[e]||[];return c[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},d=(t,r,n)=>{e.set(t,r);let a=c[t];if(a)for(let e of a)e(r,n)},h=()=>{if(!a.has(e)&&(a.set(e,[n,Object.create(null),Object.create(null),Object.create(null),s,d,f]),!E)){let t=r.initFocus(setTimeout.bind(i,L.bind(i,n,0))),o=r.initReconnect(setTimeout.bind(i,L.bind(i,n,1)));l=()=>{t&&t(),o&&o(),a.delete(e)}}};return h(),[e,s,h,l]}return[e,a.get(e)[4]]},[I,V]=A(new Map),D=u({onLoadingSlow:o,onSuccess:o,onError:o,onErrorRetry:(e,t,r,n,a)=>{let o=r.errorRetryCount,i=a.retryCount,s=~~((Math.random()+.5)*(1<<(i<8?i:8)))*r.errorRetryInterval;(l(o)||!(i>o))&&setTimeout(n,s,a)},onDiscarded:o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:k?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:k?5e3:3e3,compare:function e(t,r){var a,o;if(t===r)return!0;if(t&&r&&(a=t.constructor)===r.constructor){if(a===Date)return t.getTime()===r.getTime();if(a===RegExp)return t.toString()===r.toString();if(a===Array){if((o=t.length)===r.length)for(;o--&&e(t[o],r[o]););return -1===o}if(!a||"object"==typeof t){for(a in o=0,t)if(n.call(t,a)&&++o&&!n.call(r,a)||!(a in r)||!e(t[a],r[a]))return!1;return Object.keys(r).length===o}}return t!=t&&r!=r},isPaused:()=>!1,cache:I,mutate:V,fallback:{}},{isOnline:()=>y,isVisible:()=>{let e=p&&document.visibilityState;return l(e)||"hidden"!==e}}),$=(e,t)=>{let r=u(e,t);if(t){let{use:n,fallback:a}=e,{use:o,fallback:i}=t;n&&o&&(r.use=n.concat(o)),a&&i&&(r.fallback=u(a,i))}return r},F=(0,t.createContext)({});var U=e.i(11671);let W=h&&window.__SWR_DEVTOOLS_USE__,z=W?window.__SWR_DEVTOOLS_USE__:[],B=()=>{let e=(0,t.useContext)(F);return(0,t.useMemo)(()=>u(D,e),[e])},K=z.concat(e=>(t,r,n)=>{let o=r&&((...e)=>{let[n]=R(t),[,,,o]=a.get(I);if(n.startsWith("$inf$"))return r(...e);let i=o[n];return l(i)?r(...e):(delete o[n],i)});return e(t,o,n)}),q=e=>function(...t){let r,n=B(),[a,o,i]="function"==typeof(r=t)[1]?[r[0],r[1],r[2]||{}]:[r[0],null,(null===r[1]?r[2]:r[1])||{}],s=$(n,i),l=e,{use:u}=s,c=(u||[]).concat(K);for(let e=c.length;e--;)l=c[e](l);return l(a,o||s.fetcher||null,s)},H=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}};W&&(window.__SWR_DEVTOOLS_REACT__=t.default),e.s(["subscribeCallback",0,H,"useSWRConfig",0,B,"withArgs",0,q],71235);let J=()=>{},Q=J(),X=(new WeakMap,t.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),Z={dedupe:!0},G=Promise.resolve(i),Y=()=>o;s.defineProperty(e=>{let{value:r}=e,n=(0,t.useContext)(F),a="function"==typeof r,o=(0,t.useMemo)(()=>a?r(n):r,[a,n,r]),s=(0,t.useMemo)(()=>a?o:$(n,o),[a,n,o]),l=o&&o.provider,c=(0,t.useRef)(i);l&&!c.current&&(c.current=A(l(s.cache||I),o));let f=c.current;return f&&(s.cache=f[0],s.mutate=f[1]),j(()=>{if(f)return f[2]&&f[2](),f[3]},[]),(0,t.createElement)(F.Provider,u(e,{value:s}))},"defaultValue",{value:D});let ee=q((e,n,o)=>{let{cache:s,compare:c,suspense:f,fallbackData:p,revalidateOnMount:g,revalidateIfStale:y,refreshInterval:v,refreshWhenHidden:b,refreshWhenOffline:x,keepPreviousData:_,strictServerPrefetchWarning:k}=o,[S,O,T,N]=a.get(s),[C,L]=R(e),A=(0,t.useRef)(!1),I=(0,t.useRef)(!1),V=(0,t.useRef)(C),D=(0,t.useRef)(n),$=(0,t.useRef)(o),F=()=>$.current.isVisible()&&$.current.isOnline(),[W,z,B,K]=m(s,C),q=(0,t.useRef)({}).current,J=l(p)?l(o.fallback)?i:o.fallback[C]:p,Q=(e,t)=>{for(let r in q)if("data"===r){if(!c(e[r],t[r])&&(!l(e[r])||!c(el,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},ee=!A.current,et=(0,t.useMemo)(()=>{let e=W(),t=K(),r=e=>{let t=u(e);return(delete t._k,(()=>{if(!C||!n||$.current.isPaused())return!1;if(ee&&!l(g))return g;let e=l(J)?t.data:J;return l(e)||y})())?{isValidating:!0,isLoading:!0,...t}:t},a=r(e),o=e===t?a:r(t),i=a;return[()=>{let e=r(W());return Q(e,i)?(i.data=e.data,i.isLoading=e.isLoading,i.isValidating=e.isValidating,i.error=e.error,i):(i=e,e)},()=>o]},[s,C]),er=(0,r.useSyncExternalStore)((0,t.useCallback)(e=>B(C,(t,r)=>{Q(r,t)||e()}),[s,C]),et[0],et[1]),en=S[C]&&S[C].length>0,ea=er.data,eo=l(ea)?J&&"function"==typeof J.then?X(J):J:ea,ei=er.error,es=(0,t.useRef)(eo),el=_?l(ea)?l(es.current)?eo:es.current:ea:eo,eu=C&&l(eo),ec=(0,t.useRef)(null);E||(0,r.useSyncExternalStore)(Y,()=>(ec.current=!1,ec),()=>(ec.current=!0,ec));let ef=ec.current;k&&ef&&!f&&eu&&console.warn(`Missing pre-initiated data for serialized key "${C}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ed=!(!C||!n||$.current.isPaused())&&(!en||!!l(ei))&&(ee&&!l(g)?g:f?!l(eo)&&y:l(eo)||y),eh=ee&&ed,ep=l(er.isValidating)?eh:er.isValidating,eg=l(er.isLoading)?eh:er.isLoading,em=(0,t.useCallback)(async e=>{let t,r,n=D.current;if(!C||!n||I.current||$.current.isPaused())return!1;let a=!0,s=e||{},u=!T[C]||!s.dedupe,f=()=>w?!I.current&&C===V.current&&A.current:C===V.current,d={isValidating:!1,isLoading:!1},h=()=>{z(d)},p=()=>{let e=T[C];e&&e[1]===r&&delete T[C]},g={isValidating:!0};l(W().data)&&(g.isLoading=!0);try{if(u&&(z(g),o.loadingTimeout&&l(W().data)&&setTimeout(()=>{a&&f()&&$.current.onLoadingSlow(C,o)},o.loadingTimeout),T[C]=[n(L),P()]),[t,r]=T[C],t=await t,u&&setTimeout(p,o.dedupingInterval),!T[C]||T[C][1]!==r)return u&&f()&&$.current.onDiscarded(C),!1;d.error=i;let e=O[C];if(!l(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return h(),u&&f()&&$.current.onDiscarded(C),!1;let s=W().data;d.data=c(s,t)?s:t,u&&f()&&$.current.onSuccess(t,C,o)}catch(r){p();let e=$.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,u&&f())&&(e.onError(r,C,e),(!0===t||"function"==typeof t&&t(r))&&(!$.current.revalidateOnFocus||!$.current.revalidateOnReconnect||F())&&e.onErrorRetry(r,C,e,e=>{let t=S[C];t&&t[0]&&t[0](U.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0}))}return a=!1,h(),!0},[C,s]),ey=(0,t.useCallback)((...e)=>M(s,V.current,...e),[]);if(j(()=>{D.current=n,$.current=o,l(ea)||(es.current=ea)}),j(()=>{if(!C)return;let e=em.bind(i,Z),t=0;$.current.revalidateOnFocus&&(t=Date.now()+$.current.focusThrottleInterval);let r=H(C,S,(r,n={})=>{if(r==U.FOCUS_EVENT){let r=Date.now();$.current.revalidateOnFocus&&r>t&&F()&&(t=r+$.current.focusThrottleInterval,e())}else if(r==U.RECONNECT_EVENT)$.current.revalidateOnReconnect&&F()&&e();else if(r==U.MUTATE_EVENT)return em();else if(r==U.ERROR_REVALIDATE_EVENT)return em(n)});if(I.current=!1,V.current=C,A.current=!0,z({_k:L}),ed&&!T[C])if(l(eo)||E)e();else h&&typeof window.requestAnimationFrame!=d?window.requestAnimationFrame(e):setTimeout(e,1);return()=>{I.current=!0,r()}},[C]),j(()=>{let e;function t(){let t="function"==typeof v?v(W().data):v;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!W().error&&(b||$.current.isVisible())&&(x||$.current.isOnline())?em(Z).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[v,b,x,C]),(0,t.useDebugValue)(el),f){if(!w&&E&&eu)throw Error("Fallback data is required when using Suspense in SSR.");eu&&(D.current=n,$.current=o,I.current=!1);let e=N[C];if(X(!l(e)&&eu?ey(e):G),!l(ei)&&eu)throw ei;let t=eu?em(Z):G;!l(el)&&eu&&(t.status="fulfilled",t.value=!0),X(t)}return{mutate:ey,get data(){return q.data=!0,el},get error(){return q.error=!0,ei},get isValidating(){return q.isValidating=!0,ep},get isLoading(){return q.isLoading=!0,eg}}});e.s(["default",0,ee],83599)},18566,(e,t,r)=>{t.exports=e.r(76562)},25045,e=>{"use strict";var t=e.i(18050),r=e.i(18566),n=e.i(22016),a=e.i(71645),o=e.i(83599),i=e.i(58963);let s=e=>fetch(e).then(e=>e.ok?e.json():{networks:[]}),l=[{href:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"},{href:"/tasks",label:"Tasks",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},{href:"/nodes",label:"Nodes",icon:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"},{href:"/messages",label:"Messages",icon:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"},{href:"/settings/networks",label:"Networks",icon:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{href:"/logs",label:"Logs",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{href:"/admin",label:"Admin",icon:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"},{href:"/docs",label:"Docs",icon:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"},{href:"/settings",label:"Settings",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}],u={owner:"⭐",admin:"🔧",member:"👤",viewer:"👁"};function c(){let e=(0,r.usePathname)(),[c,f]=(0,a.useState)(!1),[d,h]=(0,a.useState)(!1),{networkId:p,setNetworkId:g}=(0,i.useNetworkId)(),{data:m}=(0,o.default)("/api/hub/networks",s,{refreshInterval:15e3,dedupingInterval:1e4}),y=m?.networks||[],v=(0,t.jsx)("nav",{className:"flex flex-col gap-1 px-2 py-4",children:l.map(r=>{var a;return(0,t.jsxs)(n.default,{href:r.href,prefetch:!1,onClick:()=>h(!1),className:`flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] ${("/"===(a=r.href)?"/"===e:"/settings"===a?"/settings"===e:e.startsWith(a))?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20":"text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a]"} ${c?"justify-center":""}`,children:[(0,t.jsx)("svg",{className:"w-5 h-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:r.icon})}),!c&&(0,t.jsx)("span",{children:r.label})]},r.href)})});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>h(!d),className:"fixed top-4 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-2.5 text-gray-400 hover:text-white active:bg-[#1a1a3a]","aria-label":"Toggle menu",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:d?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),d&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 z-30 lg:hidden",onClick:()=>h(!1)}),(0,t.jsxs)("aside",{className:`
2
2
  fixed top-0 left-0 h-full z-40 bg-[#0d0d1a] border-r border-[#2a2a4a]
3
3
  transition-all duration-200
4
4
  ${c?"w-16":"w-52"}
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14287,e=>{"use strict";var t=e.i(43476),s=e.i(71645);let a=[{id:"overview",label:"概览"},{id:"login",label:"登录与注册"},{id:"dashboard",label:"Overview 首页"},{id:"chat",label:"ChatPanel 对话"},{id:"nodes",label:"Nodes 节点管理"},{id:"tasks",label:"Tasks 任务流水"},{id:"messages",label:"Messages 消息"},{id:"networks",label:"Networks 网络管理"},{id:"admin",label:"Admin 管理"},{id:"cli",label:"CLI 命令参考"},{id:"config",label:"配置说明"},{id:"api",label:"API 参考"},{id:"faq",label:"常见问题"}];function r({id:e,title:s,children:a}){return(0,t.jsxs)("section",{id:e,className:"mb-12 scroll-mt-8",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-white mb-4 pb-2 border-b border-[#2a2a4a]",children:s}),(0,t.jsx)("div",{className:"text-gray-300 text-sm leading-relaxed space-y-3",children:a})]})}function l({children:e,lang:a}){let[r,i]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"mt-3 rounded-xl overflow-hidden border border-[#2a2a4a]",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0d0d1a] px-4 py-1.5 border-b border-[#2a2a4a]",children:[(0,t.jsx)("span",{className:"text-[10px] text-gray-600",children:a||"code"}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)},className:"text-[10px] text-gray-500 hover:text-gray-300 transition-colors",children:r?"✓ Copied":"Copy"})]}),(0,t.jsx)("pre",{className:"bg-[#050510] px-4 py-3 text-[12px] text-green-300 overflow-x-auto leading-relaxed",children:(0,t.jsx)("code",{children:e})})]})}function i({steps:e}){return(0,t.jsx)("div",{className:"mt-3 space-y-2",children:e.map((s,a)=>(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-6 h-6 rounded-full bg-cyan-500/20 border border-cyan-500/30 flex items-center justify-center text-[10px] text-cyan-300 font-bold shrink-0",children:a+1}),a<e.length-1&&(0,t.jsx)("div",{className:"w-0.5 flex-1 mt-1 bg-[#2a2a4a]"})]}),(0,t.jsx)("div",{className:"text-sm text-gray-300 pt-0.5",children:s})]},a))})}function n({features:e}){return(0,t.jsx)("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-2 gap-2",children:e.map(e=>(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-3",children:[(0,t.jsx)("div",{className:"text-sm text-white font-medium",children:e.title}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e.desc})]},e.title))})}function d({children:e,type:s}){return(0,t.jsxs)("div",{className:`mt-3 px-4 py-2.5 rounded-xl border text-xs ${"warning"===s?"border-yellow-500/20 bg-yellow-500/5 text-yellow-300":"border-blue-500/20 bg-blue-500/5 text-blue-300"}`,children:["warning"===s?"⚠️ ":"ℹ️ ",e]})}function o({q:e,a}){let[r,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"mb-2 bg-[#111128] rounded-xl border border-[#2a2a4a] overflow-hidden",children:[(0,t.jsxs)("button",{onClick:()=>l(!r),className:"w-full flex items-center justify-between px-4 py-3 text-left",children:[(0,t.jsx)("span",{className:"text-sm text-cyan-400 font-medium",children:e}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-600 transition-transform ${r?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),r&&(0,t.jsx)("div",{className:"px-4 pb-3 text-sm text-gray-400",children:a})]})}e.s(["default",0,function(){let[e,c]=(0,s.useState)("overview"),[x,h]=(0,s.useState)(!1),[m,b]=(0,s.useState)("");(0,s.useEffect)(()=>{let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&c(e.target.id)})},{rootMargin:"-20% 0px -70% 0px"});return a.forEach(t=>{let s=document.getElementById(t.id);s&&e.observe(s)}),()=>e.disconnect()},[]);let g=m?a.filter(e=>e.label.toLowerCase().includes(m.toLowerCase())):a;return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex",children:[(0,t.jsxs)("aside",{className:"hidden lg:block w-64 shrink-0 border-r border-[#2a2a4a] bg-[#0d0d1a] sticky top-0 h-screen overflow-y-auto",children:[(0,t.jsxs)("div",{className:"p-4 border-b border-[#2a2a4a]",children:[(0,t.jsx)("h2",{className:"text-sm font-bold text-white",children:"文档"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 mt-0.5",children:"Agent Network Dashboard"})]}),(0,t.jsx)("div",{className:"px-3 py-2",children:(0,t.jsx)("input",{type:"text",value:m,onChange:e=>b(e.target.value),placeholder:"搜索文档...",className:"w-full bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-1.5 text-xs text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"})}),(0,t.jsx)("nav",{className:"px-2 pb-4",children:g.map(s=>(0,t.jsx)("a",{href:`#${s.id}`,className:`block px-3 py-1.5 rounded-lg text-xs transition-colors ${e===s.id?"bg-cyan-500/10 text-cyan-300 border-l-2 border-cyan-400":"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]"}`,children:s.label},s.id))})]}),(0,t.jsx)("button",{onClick:()=>h(!x),className:"lg:hidden fixed bottom-4 right-4 z-50 w-12 h-12 bg-cyan-600 rounded-full shadow-lg flex items-center justify-center text-white",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h7"})})}),x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"lg:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>h(!1)}),(0,t.jsxs)("div",{className:"lg:hidden fixed left-0 top-0 h-full w-64 bg-[#0d0d1a] border-r border-[#2a2a4a] z-50 overflow-y-auto p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-bold text-white mb-3",children:"目录"}),a.map(s=>(0,t.jsx)("a",{href:`#${s.id}`,onClick:()=>h(!1),className:`block px-3 py-2 rounded-lg text-sm ${e===s.id?"text-cyan-300 bg-cyan-500/10":"text-gray-400"}`,children:s.label},s.id))]})]}),(0,t.jsxs)("main",{className:"flex-1 max-w-3xl mx-auto px-4 sm:px-8 py-8 lg:ml-0 ml-10",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold text-white mb-1",children:"Agent Network Dashboard"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mb-10",children:"企业级 AI Agent 军团管控平台 · 使用指南"}),(0,t.jsxs)(r,{id:"overview",title:"概览",children:[(0,t.jsx)("p",{children:"Agent Network 是基于 MCP (Model Context Protocol) 的多智能体协作基础设施。通过 CommHub Server 实现 Agent 间的任务派发、状态同步、消息路由。"}),(0,t.jsx)(i,{steps:["查看所有 Agent 节点的实时状态","通过 ChatPanel 直接与任意 Agent 对话","派发任务、查看执行结果","管理网络、成员、权限","查看审计日志和通信记录"]})]}),(0,t.jsxs)(r,{id:"login",title:"登录与注册",children:[(0,t.jsx)("p",{children:"首次使用需注册账号。第一个注册的用户自动成为 admin。"}),(0,t.jsx)(l,{lang:"bash",children:`# 注册
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14287,e=>{"use strict";var t=e.i(18050),s=e.i(71645);let a=[{id:"overview",label:"概览"},{id:"login",label:"登录与注册"},{id:"dashboard",label:"Overview 首页"},{id:"chat",label:"ChatPanel 对话"},{id:"nodes",label:"Nodes 节点管理"},{id:"tasks",label:"Tasks 任务流水"},{id:"messages",label:"Messages 消息"},{id:"networks",label:"Networks 网络管理"},{id:"admin",label:"Admin 管理"},{id:"cli",label:"CLI 命令参考"},{id:"config",label:"配置说明"},{id:"api",label:"API 参考"},{id:"faq",label:"常见问题"}];function r({id:e,title:s,children:a}){return(0,t.jsxs)("section",{id:e,className:"mb-12 scroll-mt-8",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-white mb-4 pb-2 border-b border-[#2a2a4a]",children:s}),(0,t.jsx)("div",{className:"text-gray-300 text-sm leading-relaxed space-y-3",children:a})]})}function l({children:e,lang:a}){let[r,i]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"mt-3 rounded-xl overflow-hidden border border-[#2a2a4a]",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0d0d1a] px-4 py-1.5 border-b border-[#2a2a4a]",children:[(0,t.jsx)("span",{className:"text-[10px] text-gray-600",children:a||"code"}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)},className:"text-[10px] text-gray-500 hover:text-gray-300 transition-colors",children:r?"✓ Copied":"Copy"})]}),(0,t.jsx)("pre",{className:"bg-[#050510] px-4 py-3 text-[12px] text-green-300 overflow-x-auto leading-relaxed",children:(0,t.jsx)("code",{children:e})})]})}function i({steps:e}){return(0,t.jsx)("div",{className:"mt-3 space-y-2",children:e.map((s,a)=>(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-6 h-6 rounded-full bg-cyan-500/20 border border-cyan-500/30 flex items-center justify-center text-[10px] text-cyan-300 font-bold shrink-0",children:a+1}),a<e.length-1&&(0,t.jsx)("div",{className:"w-0.5 flex-1 mt-1 bg-[#2a2a4a]"})]}),(0,t.jsx)("div",{className:"text-sm text-gray-300 pt-0.5",children:s})]},a))})}function n({features:e}){return(0,t.jsx)("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-2 gap-2",children:e.map(e=>(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-3",children:[(0,t.jsx)("div",{className:"text-sm text-white font-medium",children:e.title}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e.desc})]},e.title))})}function d({children:e,type:s}){return(0,t.jsxs)("div",{className:`mt-3 px-4 py-2.5 rounded-xl border text-xs ${"warning"===s?"border-yellow-500/20 bg-yellow-500/5 text-yellow-300":"border-blue-500/20 bg-blue-500/5 text-blue-300"}`,children:["warning"===s?"⚠️ ":"ℹ️ ",e]})}function o({q:e,a}){let[r,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"mb-2 bg-[#111128] rounded-xl border border-[#2a2a4a] overflow-hidden",children:[(0,t.jsxs)("button",{onClick:()=>l(!r),className:"w-full flex items-center justify-between px-4 py-3 text-left",children:[(0,t.jsx)("span",{className:"text-sm text-cyan-400 font-medium",children:e}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-600 transition-transform ${r?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),r&&(0,t.jsx)("div",{className:"px-4 pb-3 text-sm text-gray-400",children:a})]})}e.s(["default",0,function(){let[e,c]=(0,s.useState)("overview"),[x,h]=(0,s.useState)(!1),[m,b]=(0,s.useState)("");(0,s.useEffect)(()=>{let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&c(e.target.id)})},{rootMargin:"-20% 0px -70% 0px"});return a.forEach(t=>{let s=document.getElementById(t.id);s&&e.observe(s)}),()=>e.disconnect()},[]);let g=m?a.filter(e=>e.label.toLowerCase().includes(m.toLowerCase())):a;return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex",children:[(0,t.jsxs)("aside",{className:"hidden lg:block w-64 shrink-0 border-r border-[#2a2a4a] bg-[#0d0d1a] sticky top-0 h-screen overflow-y-auto",children:[(0,t.jsxs)("div",{className:"p-4 border-b border-[#2a2a4a]",children:[(0,t.jsx)("h2",{className:"text-sm font-bold text-white",children:"文档"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 mt-0.5",children:"Agent Network Dashboard"})]}),(0,t.jsx)("div",{className:"px-3 py-2",children:(0,t.jsx)("input",{type:"text",value:m,onChange:e=>b(e.target.value),placeholder:"搜索文档...",className:"w-full bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-1.5 text-xs text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"})}),(0,t.jsx)("nav",{className:"px-2 pb-4",children:g.map(s=>(0,t.jsx)("a",{href:`#${s.id}`,className:`block px-3 py-1.5 rounded-lg text-xs transition-colors ${e===s.id?"bg-cyan-500/10 text-cyan-300 border-l-2 border-cyan-400":"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]"}`,children:s.label},s.id))})]}),(0,t.jsx)("button",{onClick:()=>h(!x),className:"lg:hidden fixed bottom-4 right-4 z-50 w-12 h-12 bg-cyan-600 rounded-full shadow-lg flex items-center justify-center text-white",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h7"})})}),x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"lg:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>h(!1)}),(0,t.jsxs)("div",{className:"lg:hidden fixed left-0 top-0 h-full w-64 bg-[#0d0d1a] border-r border-[#2a2a4a] z-50 overflow-y-auto p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-bold text-white mb-3",children:"目录"}),a.map(s=>(0,t.jsx)("a",{href:`#${s.id}`,onClick:()=>h(!1),className:`block px-3 py-2 rounded-lg text-sm ${e===s.id?"text-cyan-300 bg-cyan-500/10":"text-gray-400"}`,children:s.label},s.id))]})]}),(0,t.jsxs)("main",{className:"flex-1 max-w-3xl mx-auto px-4 sm:px-8 py-8 lg:ml-0 ml-10",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold text-white mb-1",children:"Agent Network Dashboard"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mb-10",children:"企业级 AI Agent 军团管控平台 · 使用指南"}),(0,t.jsxs)(r,{id:"overview",title:"概览",children:[(0,t.jsx)("p",{children:"Agent Network 是基于 MCP (Model Context Protocol) 的多智能体协作基础设施。通过 CommHub Server 实现 Agent 间的任务派发、状态同步、消息路由。"}),(0,t.jsx)(i,{steps:["查看所有 Agent 节点的实时状态","通过 ChatPanel 直接与任意 Agent 对话","派发任务、查看执行结果","管理网络、成员、权限","查看审计日志和通信记录"]})]}),(0,t.jsxs)(r,{id:"login",title:"登录与注册",children:[(0,t.jsx)("p",{children:"首次使用需注册账号。第一个注册的用户自动成为 admin。"}),(0,t.jsx)(l,{lang:"bash",children:`# 注册
2
2
  Username: 自定义
3
3
  Password: 至少 6 位
4
4
 
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},65822,e=>{"use strict";var t=e.i(83599),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function l(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:n}=(0,s.useNetworkId)(),{data:o,error:i,isLoading:c}=(0,t.default)(l(`/api/hub/messages?limit=${e}`,n),a,r);return{messages:o?.messages||[],error:i,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:n,error:o,isLoading:i}=(0,t.default)(l("/api/hub/status",e),a,r);return{sessions:n?.sessions||[],hint:n?._hint,error:o,isLoading:i}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:n,error:o}=(0,t.default)(l("/api/hub/stats",e),a,r);return{stats:n?.ok?n:null,error:o}},"useTasks",0,function(e){let{networkId:n}=(0,s.useNetworkId)(),o=new URLSearchParams({limit:"100",...e}).toString(),{data:i,error:c,isLoading:d}=(0,t.default)(l(`/api/hub/tasks?${o}`,n),a,r);return{tasks:i?.tasks||[],count:i?.count??0,source:i?.source,error:c,isLoading:d}}])},82756,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(65822),r=e.i(18150);let l={task:"bg-green-500/10 text-green-300 border-green-500/20",message:"bg-blue-500/10 text-blue-300 border-blue-500/20",broadcast:"bg-purple-500/10 text-purple-300 border-purple-500/20",reply:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"};function n(e){return e?new Date(e.replace(" ","T")+"Z").getTime():0}e.s(["default",0,function(){let{messages:e,isLoading:o}=(0,a.useMessages)(200),[i,c]=(0,s.useState)(""),[d,x]=(0,s.useState)(""),[u,m]=(0,s.useState)(!1),[p,g]=(0,s.useState)("timeline"),h=(0,s.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let s=e.from_alias?.trim();s&&"dashboard"!==s.toLowerCase()&&t.add(s)}),[...t].slice(0,8)},[e]),b=(0,s.useMemo)(()=>{let t=d.trim().toLowerCase(),s=t.startsWith("from:")?t.slice(5).trim():"";return[...e].filter(e=>(!i||e.type===i)&&(s?(e.from_alias||"").toLowerCase().includes(s):!t||(e.from_alias||"").toLowerCase().includes(t)||(e.to_alias||"").toLowerCase().includes(t)||(e.content||"").toLowerCase().includes(t))).sort((e,t)=>n(e.created_at)-n(t.created_at))},[i,e,d]),f=(0,s.useMemo)(()=>{let e=new Map;return b.forEach(t=>{let s=t.from_alias||"?",a=t.to_alias||"?",r=[s,a].sort().join("↔"),l=e.get(r)||{participants:[s,a].sort(),messages:[],lastTime:0};l.messages.push(t),l.lastTime=Math.max(l.lastTime,n(t.created_at)),e.set(r,l)}),[...e.values()].sort((e,t)=>t.lastTime-e.lastTime)},[b]);return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Messages"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:e.length}),b.length>0&&(0,t.jsx)("button",{onClick:()=>{let e=b.map(e=>`**${e.from_alias||"?"}** → ${e.to_alias||"?"} (${e.type||"?"}) — ${e.created_at||""}
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},65822,e=>{"use strict";var t=e.i(83599),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function l(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:n}=(0,s.useNetworkId)(),{data:o,error:i,isLoading:c}=(0,t.default)(l(`/api/hub/messages?limit=${e}`,n),a,r);return{messages:o?.messages||[],error:i,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:n,error:o,isLoading:i}=(0,t.default)(l("/api/hub/status",e),a,r);return{sessions:n?.sessions||[],hint:n?._hint,error:o,isLoading:i}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:n,error:o}=(0,t.default)(l("/api/hub/stats",e),a,r);return{stats:n?.ok?n:null,error:o}},"useTasks",0,function(e){let{networkId:n}=(0,s.useNetworkId)(),o=new URLSearchParams({limit:"100",...e}).toString(),{data:i,error:c,isLoading:d}=(0,t.default)(l(`/api/hub/tasks?${o}`,n),a,r);return{tasks:i?.tasks||[],count:i?.count??0,source:i?.source,error:c,isLoading:d}}])},82756,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(65822),r=e.i(18150);let l={task:"bg-green-500/10 text-green-300 border-green-500/20",message:"bg-blue-500/10 text-blue-300 border-blue-500/20",broadcast:"bg-purple-500/10 text-purple-300 border-purple-500/20",reply:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"};function n(e){return e?new Date(e.replace(" ","T")+"Z").getTime():0}e.s(["default",0,function(){let{messages:e,isLoading:o}=(0,a.useMessages)(200),[i,c]=(0,s.useState)(""),[d,x]=(0,s.useState)(""),[u,m]=(0,s.useState)(!1),[p,g]=(0,s.useState)("timeline"),h=(0,s.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let s=e.from_alias?.trim();s&&"dashboard"!==s.toLowerCase()&&t.add(s)}),[...t].slice(0,8)},[e]),b=(0,s.useMemo)(()=>{let t=d.trim().toLowerCase(),s=t.startsWith("from:")?t.slice(5).trim():"";return[...e].filter(e=>(!i||e.type===i)&&(s?(e.from_alias||"").toLowerCase().includes(s):!t||(e.from_alias||"").toLowerCase().includes(t)||(e.to_alias||"").toLowerCase().includes(t)||(e.content||"").toLowerCase().includes(t))).sort((e,t)=>n(e.created_at)-n(t.created_at))},[i,e,d]),f=(0,s.useMemo)(()=>{let e=new Map;return b.forEach(t=>{let s=t.from_alias||"?",a=t.to_alias||"?",r=[s,a].sort().join("↔"),l=e.get(r)||{participants:[s,a].sort(),messages:[],lastTime:0};l.messages.push(t),l.lastTime=Math.max(l.lastTime,n(t.created_at)),e.set(r,l)}),[...e.values()].sort((e,t)=>t.lastTime-e.lastTime)},[b]);return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Messages"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:e.length}),b.length>0&&(0,t.jsx)("button",{onClick:()=>{let e=b.map(e=>`**${e.from_alias||"?"}** → ${e.to_alias||"?"} (${e.type||"?"}) — ${e.created_at||""}
2
2
 
3
3
  ${e.content||"--"}
4
4
 
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),a=Math.floor(e%3600/60);return t>0?`${t}h ${a}m`:`${a}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},28523,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(22016),r=e.i(18150);e.s(["default",0,function(){let[e,n]=(0,a.useState)([]),[o,l]=(0,a.useState)(!0),[i,c]=(0,a.useState)(""),[d,x]=(0,a.useState)({}),m=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/hub/tokens"),t=await e.json();n(t.tokens||[])}catch{}finally{l(!1)}},[]);(0,a.useEffect)(()=>{m()},[m]);let h=async()=>{if(i.trim())try{let e=sessionStorage.getItem("anet_v3_auth");if(!e)return;let{token:t}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create_token",token:t,name:i})}),s=await a.json();s.ok?(x({token:s.token}),c(""),m()):x({error:s.error})}catch{x({error:"Failed"})}},g=async e=>{try{let t=sessionStorage.getItem("anet_v3_auth");if(!t)return;let{token:a}=JSON.parse(t);await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"revoke_token",token:a,token_id:e})}),m()}catch{}};return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)(s.default,{href:"/settings",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Settings"}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-white",children:"API Tokens"})]}),(0,t.jsxs)("div",{className:"max-w-2xl space-y-6",children:[(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Create Token"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:i,onChange:e=>c(e.target.value),placeholder:"Token name (e.g. my-cli)",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,t.jsx)("button",{onClick:h,disabled:!i.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 text-white text-sm rounded-lg transition-colors",children:"Create"})]}),d.token&&(0,t.jsxs)("div",{className:"mt-3 bg-green-500/5 border border-green-500/20 rounded-lg px-3 py-2",children:[(0,t.jsx)("div",{className:"text-xs text-green-400 mb-1",children:"Token created (copy now, shown only once):"}),(0,t.jsx)("code",{className:"text-sm text-green-300 break-all select-all",children:d.token})]}),d.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:d.error})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:["Active Tokens (",e.length,")"]}),o?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2].map(e=>(0,t.jsx)("div",{className:"h-12 bg-gray-800/20 rounded"},e))}):0===e.length?(0,t.jsx)("div",{className:"text-xs text-gray-600 text-center py-4",children:"No tokens. V3 auth required."}):(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-white font-medium",children:e.name}),(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded border ${"full"===e.scope?"text-cyan-300 border-cyan-500/20 bg-cyan-500/5":"text-gray-400 border-gray-600/20"}`,children:e.scope})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500",children:[e.token_id," · network: ",e.network_id?.slice(0,12)||"--"," · used ",(0,r.timeAgo)(e.last_used_at)]})]}),(0,t.jsx)("button",{onClick:()=>g(e.token_id),className:"text-xs text-red-400 hover:text-red-300 px-2 py-1 rounded border border-red-800/30 hover:bg-red-500/10 transition-colors",children:"Revoke"})]},e.token_id))})]})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),a=Math.floor(e%3600/60);return t>0?`${t}h ${a}m`:`${a}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},28523,e=>{"use strict";var t=e.i(18050),a=e.i(71645),s=e.i(22016),r=e.i(18150);e.s(["default",0,function(){let[e,n]=(0,a.useState)([]),[o,l]=(0,a.useState)(!0),[i,c]=(0,a.useState)(""),[d,x]=(0,a.useState)({}),m=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/hub/tokens"),t=await e.json();n(t.tokens||[])}catch{}finally{l(!1)}},[]);(0,a.useEffect)(()=>{m()},[m]);let h=async()=>{if(i.trim())try{let e=sessionStorage.getItem("anet_v3_auth");if(!e)return;let{token:t}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create_token",token:t,name:i})}),s=await a.json();s.ok?(x({token:s.token}),c(""),m()):x({error:s.error})}catch{x({error:"Failed"})}},g=async e=>{try{let t=sessionStorage.getItem("anet_v3_auth");if(!t)return;let{token:a}=JSON.parse(t);await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"revoke_token",token:a,token_id:e})}),m()}catch{}};return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)(s.default,{href:"/settings",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Settings"}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-white",children:"API Tokens"})]}),(0,t.jsxs)("div",{className:"max-w-2xl space-y-6",children:[(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Create Token"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:i,onChange:e=>c(e.target.value),placeholder:"Token name (e.g. my-cli)",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,t.jsx)("button",{onClick:h,disabled:!i.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 text-white text-sm rounded-lg transition-colors",children:"Create"})]}),d.token&&(0,t.jsxs)("div",{className:"mt-3 bg-green-500/5 border border-green-500/20 rounded-lg px-3 py-2",children:[(0,t.jsx)("div",{className:"text-xs text-green-400 mb-1",children:"Token created (copy now, shown only once):"}),(0,t.jsx)("code",{className:"text-sm text-green-300 break-all select-all",children:d.token})]}),d.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:d.error})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:["Active Tokens (",e.length,")"]}),o?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2].map(e=>(0,t.jsx)("div",{className:"h-12 bg-gray-800/20 rounded"},e))}):0===e.length?(0,t.jsx)("div",{className:"text-xs text-gray-600 text-center py-4",children:"No tokens. V3 auth required."}):(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-white font-medium",children:e.name}),(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded border ${"full"===e.scope?"text-cyan-300 border-cyan-500/20 bg-cyan-500/5":"text-gray-400 border-gray-600/20"}`,children:e.scope})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500",children:[e.token_id," · network: ",e.network_id?.slice(0,12)||"--"," · used ",(0,r.timeAgo)(e.last_used_at)]})]}),(0,t.jsx)("button",{onClick:()=>g(e.token_id),className:"text-xs text-red-400 hover:text-red-300 px-2 py-1 rounded border border-red-800/30 hover:bg-red-500/10 transition-colors",children:"Revoke"})]},e.token_id))})]})]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),a=Math.floor(e%3600/60);return t>0?`${t}h ${a}m`:`${a}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},38030,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(22016),r=e.i(83599),l=e.i(18150);let n=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()};function d({steps:e}){return e.filter(e=>e.time).length,(0,t.jsx)("div",{className:"relative",children:e.map((a,s)=>{let r=!!a.time,n=s===e.length-1;return(0,t.jsxs)("div",{className:"flex gap-4 pb-6 last:pb-0",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:`w-3 h-3 rounded-full border-2 shrink-0 ${r?`${a.color} border-current`:"border-gray-700 bg-transparent"}`}),!n&&(0,t.jsx)("div",{className:`w-0.5 flex-1 mt-1 ${r&&e[s+1]?.time?"bg-cyan-500/40":"bg-gray-800"}`})]}),(0,t.jsxs)("div",{className:"min-w-0 -mt-0.5",children:[(0,t.jsx)("div",{className:`text-sm font-medium ${r?"text-gray-200":"text-gray-600"}`,children:a.label}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:a.time?`${(0,l.timeAgo)(a.time)} — ${a.time}`:"Pending"})]})]},a.label)})})}let i={created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"};e.s(["default",0,function({params:e}){let{id:o}=(0,a.use)(e),{data:c,isLoading:m}=(0,r.default)(`/api/hub/tasks?task_id=${encodeURIComponent(o)}`,n,{refreshInterval:5e3}),{data:x}=(0,r.default)(`/api/hub/task-events?task_id=${encodeURIComponent(o)}&limit=50`,n,{refreshInterval:1e4}),g=c?.tasks?.[0];if(m)return(0,t.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:(0,t.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,t.jsx)("div",{className:"h-8 w-48 bg-gray-800 rounded"}),(0,t.jsx)("div",{className:"h-64 bg-gray-800/20 rounded-lg"})]})});if(!g)return(0,t.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-gray-600 text-4xl mb-4",children:"--"}),(0,t.jsx)("p",{className:"text-gray-400",children:"Task not found"}),(0,t.jsx)(s.default,{href:"/tasks",className:"text-cyan-400 text-sm mt-2 inline-block",children:"Back to tasks"})]})});let b=i[g.status]||i.created,h=[{label:"Created",time:g.created_at,color:"text-gray-400"},{label:"Delivered",time:g.delivered_at,color:"text-blue-400"},{label:"Started",time:g.started_at,color:"text-green-400"},{label:"Completed",time:g.completed_at,color:"text-purple-400"}];return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)(s.default,{href:"/tasks",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Tasks"}),(0,t.jsx)("h1",{className:"text-xl font-bold text-white truncate",children:"Task Detail"}),(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${b}`,children:g.status})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Timeline"}),(0,t.jsx)(d,{steps:h})]}),(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Info"}),(0,t.jsx)("div",{className:"space-y-2 text-xs",children:[["Task ID",g.task_id],["From",g.from_name],["To",g.to_name],["Priority",g.priority],["Status",g.status],["Expires",g.expires_at]].map(([e,a])=>(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-gray-500",children:e}),(0,t.jsx)("span",{className:"text-gray-300 truncate max-w-[200px]",title:String(a||""),children:String(a||"--")})]},e))})]})]}),(0,t.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Content"}),(0,t.jsx)("div",{className:"text-sm text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-4 py-3 border border-[#1a1a2a]",children:g.content||"--"})]}),g.result&&(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Result"}),(0,t.jsx)("div",{className:"text-sm text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-4 py-3 border border-[#1a1a2a] max-h-96 overflow-y-auto",children:g.result})]}),x?.events&&x.events.length>0&&(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:["Events (",x.events.length,")"]}),(0,t.jsx)("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:x.events.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${"running"===e.to_status?"bg-green-400":"replied"===e.to_status?"bg-purple-400":"failed"===e.to_status?"bg-red-400":"bg-blue-400"}`}),(0,t.jsx)("span",{className:"text-gray-400",children:e.event_type}),e.from_status&&(0,t.jsxs)("span",{className:"text-gray-600",children:[e.from_status," → ",e.to_status]}),(0,t.jsx)("span",{className:"text-gray-600 ml-auto shrink-0",children:(0,l.timeAgo)(e.created_at)})]},e.id||a))})]})]})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),a=Math.floor(e%3600/60);return t>0?`${t}h ${a}m`:`${a}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},38030,e=>{"use strict";var t=e.i(18050),a=e.i(71645),s=e.i(22016),r=e.i(83599),l=e.i(18150);let n=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()};function d({steps:e}){return e.filter(e=>e.time).length,(0,t.jsx)("div",{className:"relative",children:e.map((a,s)=>{let r=!!a.time,n=s===e.length-1;return(0,t.jsxs)("div",{className:"flex gap-4 pb-6 last:pb-0",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:`w-3 h-3 rounded-full border-2 shrink-0 ${r?`${a.color} border-current`:"border-gray-700 bg-transparent"}`}),!n&&(0,t.jsx)("div",{className:`w-0.5 flex-1 mt-1 ${r&&e[s+1]?.time?"bg-cyan-500/40":"bg-gray-800"}`})]}),(0,t.jsxs)("div",{className:"min-w-0 -mt-0.5",children:[(0,t.jsx)("div",{className:`text-sm font-medium ${r?"text-gray-200":"text-gray-600"}`,children:a.label}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:a.time?`${(0,l.timeAgo)(a.time)} — ${a.time}`:"Pending"})]})]},a.label)})})}let i={created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"};e.s(["default",0,function({params:e}){let{id:o}=(0,a.use)(e),{data:c,isLoading:m}=(0,r.default)(`/api/hub/tasks?task_id=${encodeURIComponent(o)}`,n,{refreshInterval:5e3}),{data:x}=(0,r.default)(`/api/hub/task-events?task_id=${encodeURIComponent(o)}&limit=50`,n,{refreshInterval:1e4}),g=c?.tasks?.[0];if(m)return(0,t.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:(0,t.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,t.jsx)("div",{className:"h-8 w-48 bg-gray-800 rounded"}),(0,t.jsx)("div",{className:"h-64 bg-gray-800/20 rounded-lg"})]})});if(!g)return(0,t.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-gray-600 text-4xl mb-4",children:"--"}),(0,t.jsx)("p",{className:"text-gray-400",children:"Task not found"}),(0,t.jsx)(s.default,{href:"/tasks",className:"text-cyan-400 text-sm mt-2 inline-block",children:"Back to tasks"})]})});let b=i[g.status]||i.created,h=[{label:"Created",time:g.created_at,color:"text-gray-400"},{label:"Delivered",time:g.delivered_at,color:"text-blue-400"},{label:"Started",time:g.started_at,color:"text-green-400"},{label:"Completed",time:g.completed_at,color:"text-purple-400"}];return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)(s.default,{href:"/tasks",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Tasks"}),(0,t.jsx)("h1",{className:"text-xl font-bold text-white truncate",children:"Task Detail"}),(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${b}`,children:g.status})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Timeline"}),(0,t.jsx)(d,{steps:h})]}),(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Info"}),(0,t.jsx)("div",{className:"space-y-2 text-xs",children:[["Task ID",g.task_id],["From",g.from_name],["To",g.to_name],["Priority",g.priority],["Status",g.status],["Expires",g.expires_at]].map(([e,a])=>(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-gray-500",children:e}),(0,t.jsx)("span",{className:"text-gray-300 truncate max-w-[200px]",title:String(a||""),children:String(a||"--")})]},e))})]})]}),(0,t.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Content"}),(0,t.jsx)("div",{className:"text-sm text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-4 py-3 border border-[#1a1a2a]",children:g.content||"--"})]}),g.result&&(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Result"}),(0,t.jsx)("div",{className:"text-sm text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-4 py-3 border border-[#1a1a2a] max-h-96 overflow-y-auto",children:g.result})]}),x?.events&&x.events.length>0&&(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:["Events (",x.events.length,")"]}),(0,t.jsx)("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:x.events.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${"running"===e.to_status?"bg-green-400":"replied"===e.to_status?"bg-purple-400":"failed"===e.to_status?"bg-red-400":"bg-blue-400"}`}),(0,t.jsx)("span",{className:"text-gray-400",children:e.event_type}),e.from_status&&(0,t.jsxs)("span",{className:"text-gray-600",children:[e.from_status," → ",e.to_status]}),(0,t.jsx)("span",{className:"text-gray-600 ml-auto shrink-0",children:(0,l.timeAgo)(e.created_at)})]},e.id||a))})]})]})]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89954,e=>{"use strict";var t=e.i(43476),a=e.i(71645);e.s(["default",0,function(){let[e,r]=(0,a.useState)("login"),[s,n]=(0,a.useState)(""),[o,l]=(0,a.useState)(""),[i,d]=(0,a.useState)(""),[c,u]=(0,a.useState)(!1),x=async t=>{t.preventDefault(),u(!0),d("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:s,password:o})}),a=await t.json();if(a.ok){a.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:a.user,token:a.token,networks:a.networks||[],currentNetwork:a.network_id||a.networks?.[0]?.network_id||""})),window.location.assign("/");return}d(a.error||"Login failed")}catch{d("Connection failed")}u(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden",children:[(0,t.jsxs)("div",{className:"absolute inset-0 pointer-events-none",children:[(0,t.jsx)("div",{className:"absolute top-1/4 left-1/2 -translate-x-1/2 w-[600px] h-[600px] rounded-full bg-cyan-500/5 blur-[120px]"}),(0,t.jsx)("div",{className:"absolute bottom-1/4 left-1/3 w-[400px] h-[400px] rounded-full bg-blue-500/5 blur-[100px]"})]}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm mx-4",children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-cyan-500/20 to-blue-500/20 border border-cyan-500/20 mb-4",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-cyan-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})})}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Dashboard"})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>{r(a),d("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===a?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===a?"Sign in":"Register"},a))}),(0,t.jsxs)("form",{onSubmit:x,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:s,onChange:e=>n(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsx)("input",{id:"password",type:"password",value:o,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),i&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:i}),(0,t.jsx)("button",{type:"submit",disabled:c||!o,className:"mt-5 w-full px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:c?"login"===e?"Signing in...":"Registering...":"login"===e?"Sign in":"Create account"})]}),(0,t.jsx)("p",{className:"text-center text-xs text-gray-700 mt-6",children:"Powered by CommHub V3"})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89954,e=>{"use strict";var t=e.i(18050),a=e.i(71645);e.s(["default",0,function(){let[e,r]=(0,a.useState)("login"),[s,n]=(0,a.useState)(""),[o,l]=(0,a.useState)(""),[i,d]=(0,a.useState)(""),[c,u]=(0,a.useState)(!1),x=async t=>{t.preventDefault(),u(!0),d("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:s,password:o})}),a=await t.json();if(a.ok){a.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:a.user,token:a.token,networks:a.networks||[],currentNetwork:a.network_id||a.networks?.[0]?.network_id||""})),window.location.assign("/");return}d(a.error||"Login failed")}catch{d("Connection failed")}u(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden",children:[(0,t.jsxs)("div",{className:"absolute inset-0 pointer-events-none",children:[(0,t.jsx)("div",{className:"absolute top-1/4 left-1/2 -translate-x-1/2 w-[600px] h-[600px] rounded-full bg-cyan-500/5 blur-[120px]"}),(0,t.jsx)("div",{className:"absolute bottom-1/4 left-1/3 w-[400px] h-[400px] rounded-full bg-blue-500/5 blur-[100px]"})]}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm mx-4",children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-cyan-500/20 to-blue-500/20 border border-cyan-500/20 mb-4",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-cyan-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})})}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Dashboard"})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>{r(a),d("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===a?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===a?"Sign in":"Register"},a))}),(0,t.jsxs)("form",{onSubmit:x,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:s,onChange:e=>n(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsx)("input",{id:"password",type:"password",value:o,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),i&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:i}),(0,t.jsx)("button",{type:"submit",disabled:c||!o,className:"mt-5 w-full px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:c?"login"===e?"Signing in...":"Registering...":"login"===e?"Sign in":"Create account"})]}),(0,t.jsx)("p",{className:"text-center text-xs text-gray-700 mt-6",children:"Powered by CommHub V3"})]})]})}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60);return t>0?`${t}h ${n}m`:`${n}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},65822,e=>{"use strict";var t=e.i(83599),n=e.i(58963);let r=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},s={refreshInterval:5e3,dedupingInterval:3e3};function i(e,t){if(!t)return e;let n=e.includes("?")?"&":"?";return`${e}${n}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",r,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:n}=(0,t.default)("/api/hub/health",r,s);return{health:e||null,error:n}},"useLicense",0,function(){let{data:e,error:n}=(0,t.default)("/api/hub/license",r,{refreshInterval:6e4});return{license:e?.ok?e:null,error:n}},"useMessages",0,function(e=100){let{networkId:o}=(0,n.useNetworkId)(),{data:u,error:l,isLoading:a}=(0,t.default)(i(`/api/hub/messages?limit=${e}`,o),r,s);return{messages:u?.messages||[],error:l,isLoading:a}},"useSessions",0,function(){let{networkId:e}=(0,n.useNetworkId)(),{data:o,error:u,isLoading:l}=(0,t.default)(i("/api/hub/status",e),r,s);return{sessions:o?.sessions||[],hint:o?._hint,error:u,isLoading:l}},"useStats",0,function(){let{networkId:e}=(0,n.useNetworkId)(),{data:o,error:u}=(0,t.default)(i("/api/hub/stats",e),r,s);return{stats:o?.ok?o:null,error:u}},"useTasks",0,function(e){let{networkId:o}=(0,n.useNetworkId)(),u=new URLSearchParams({limit:"100",...e}).toString(),{data:l,error:a,isLoading:c}=(0,t.default)(i(`/api/hub/tasks?${u}`,o),r,s);return{tasks:l?.tasks||[],count:l?.count??0,source:l?.source,error:a,isLoading:c}}])},16015,(e,t,n)=>{},98547,(e,t,n)=>{var r=e.i(47167);e.r(16015);var s=e.r(71645),i=s&&"object"==typeof s&&"default"in s?s:{default:s},o=void 0!==r.default&&r.default.env&&!0,u=function(e){return"[object String]"===Object.prototype.toString.call(e)},l=function(){function e(e){var t=void 0===e?{}:e,n=t.name,r=void 0===n?"stylesheet":n,s=t.optimizeForSpeed,i=void 0===s?o:s;a(u(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",a("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var t,n=e.prototype;return n.setOptimizeForSpeed=function(e){a("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),a(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},n.isOptimizeForSpeed=function(){return this._optimizeForSpeed},n.inject=function(){var e=this;if(a(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},n.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},n.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},n.insertRule=function(e,t){if(a(u(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var n=this.getSheet();"number"!=typeof t&&(t=n.cssRules.length);try{n.insertRule(e,t)}catch(t){return o||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},n.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var n="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(r){o||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];a(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},n.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];a(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},n.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},n.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,n){return n?t=t.concat(Array.prototype.map.call(e.getSheetForTag(n).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},n.makeStyleTag=function(e,t,n){t&&a(u(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var s=document.head||document.getElementsByTagName("head")[0];return n?s.insertBefore(r,n):s.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function a(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0},h={};function d(e,t){if(!t)return"jsx-"+e;var n=String(t),r=e+n;return h[r]||(h[r]="jsx-"+c(e+"-"+n)),h[r]}function f(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var n=e+t;return h[n]||(h[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[n]}var p=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,r=void 0===n?null:n,s=t.optimizeForSpeed,i=void 0!==s&&s;this._sheet=r||new l({name:"styled-jsx",optimizeForSpeed:i}),this._sheet.inject(),r&&"boolean"==typeof i&&(this._sheet.setOptimizeForSpeed(i),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var n=this.getIdAndRules(e),r=n.styleId,s=n.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var i=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=i,this._instancesCounts[r]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var r=this._fromServer&&this._fromServer[n];r?(r.parentNode.removeChild(r),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],r=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,r=e.id;if(n){var s=d(r,n);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return f(s,e)}):[f(s,t)]}}return{styleId:d(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=s.createContext(null);function _(){return new p}function y(){return s.useContext(m)}m.displayName="StyleSheetContext";var S=i.default.useInsertionEffect||i.default.useLayoutEffect,v="u">typeof window?_():void 0;function g(e){var t=v||y();return t&&("u"<typeof window?t.add(e):S(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}g.dynamic=function(e){return e.map(function(e){return d(e[0],e[1])}).join(" ")},n.StyleRegistry=function(e){var t=e.registry,n=e.children,r=s.useContext(m),o=s.useState(function(){return r||t||_()})[0];return i.default.createElement(m.Provider,{value:o},n)},n.createStyleRegistry=_,n.style=g,n.useStyleRegistry=y},21373,(e,t,n)=>{t.exports=e.r(98547).style}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},16015,(e,t,s)=>{},98547,(e,t,s)=>{var r=e.i(47167);e.r(16015);var a=e.r(71645),n=a&&"object"==typeof a&&"default"in a?a:{default:a},i=void 0!==r.default&&r.default.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},c=function(){function e(e){var t=void 0===e?{}:e,s=t.name,r=void 0===s?"stylesheet":s,a=t.optimizeForSpeed,n=void 0===a?i:a;o(l(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",o("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var c="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=c?c.getAttribute("content"):null}var t,s=e.prototype;return s.setOptimizeForSpeed=function(e){o("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),o(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},s.isOptimizeForSpeed=function(){return this._optimizeForSpeed},s.inject=function(){var e=this;if(o(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(i||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,s){return"number"==typeof s?e._serverSheet.cssRules[s]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),s},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},s.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},s.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},s.insertRule=function(e,t){if(o(l(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var s=this.getSheet();"number"!=typeof t&&(t=s.cssRules.length);try{s.insertRule(e,t)}catch(t){return i||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},s.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var s="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!s.cssRules[e])return e;s.deleteRule(e);try{s.insertRule(t,e)}catch(r){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),s.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];o(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},s.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];o(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},s.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},s.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,s){return s?t=t.concat(Array.prototype.map.call(e.getSheetForTag(s).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},s.makeStyleTag=function(e,t,s){t&&o(l(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var a=document.head||document.getElementsByTagName("head")[0];return s?a.insertBefore(r,s):a.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function o(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,s=e.length;s;)t=33*t^e.charCodeAt(--s);return t>>>0},u={};function x(e,t){if(!t)return"jsx-"+e;var s=String(t),r=e+s;return u[r]||(u[r]="jsx-"+d(e+"-"+s)),u[r]}function h(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var s=e+t;return u[s]||(u[s]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[s]}var m=function(){function e(e){var t=void 0===e?{}:e,s=t.styleSheet,r=void 0===s?null:s,a=t.optimizeForSpeed,n=void 0!==a&&a;this._sheet=r||new c({name:"styled-jsx",optimizeForSpeed:n}),this._sheet.inject(),r&&"boolean"==typeof n&&(this._sheet.setOptimizeForSpeed(n),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var s=this.getIdAndRules(e),r=s.styleId,a=s.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var n=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=n,this._instancesCounts[r]=1},t.remove=function(e){var t=this,s=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(s in this._instancesCounts,"styleId: `"+s+"` not found"),this._instancesCounts[s]-=1,this._instancesCounts[s]<1){var r=this._fromServer&&this._fromServer[s];r?(r.parentNode.removeChild(r),delete this._fromServer[s]):(this._indices[s].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[s]),delete this._instancesCounts[s]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],s=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return s[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,s;return t=this.cssRules(),void 0===(s=e)&&(s={}),t.map(function(e){var t=e[0],r=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:s.nonce?s.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,s=e.dynamic,r=e.id;if(s){var a=x(r,s);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return h(a,e)}):[h(a,t)]}}return{styleId:x(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),p=a.createContext(null);function g(){return new m}function f(){return a.useContext(p)}p.displayName="StyleSheetContext";var y=n.default.useInsertionEffect||n.default.useLayoutEffect,b="u">typeof window?g():void 0;function v(e){var t=b||f();return t&&("u"<typeof window?t.add(e):y(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return x(e[0],e[1])}).join(" ")},s.StyleRegistry=function(e){var t=e.registry,s=e.children,r=a.useContext(p),i=a.useState(function(){return r||t||g()})[0];return n.default.createElement(p.Provider,{value:i},s)},s.createStyleRegistry=g,s.style=v,s.useStyleRegistry=f},21373,(e,t,s)=>{t.exports=e.r(98547).style},96527,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(18566),a=e.i(58963),n=e.i(21373),i=e.i(18150);let l={created:"text-gray-400",delivered:"text-blue-400",running:"text-green-400",replied:"text-purple-400",failed:"text-red-400",closed:"text-gray-500"};function c({taskId:e,onClose:r}){let[a,o]=(0,s.useState)(null),[d,u]=(0,s.useState)([]),[x,h]=(0,s.useState)(!0);(0,s.useEffect)(()=>{(async()=>{try{let[t,s]=await Promise.all([fetch(`/api/hub/tasks?task_id=${encodeURIComponent(e)}`),fetch(`/api/hub/task-events?task_id=${encodeURIComponent(e)}&limit=50`)]),r=await t.json(),a=await s.json();r.tasks?.[0]&&o(r.tasks[0]),u(a.events||[])}catch{}finally{h(!1)}})()},[e]);let m=a?[{label:"Created",time:a.created_at,color:"bg-gray-400"},{label:"Delivered",time:a.delivered_at,color:"bg-blue-400"},{label:"Started",time:a.started_at,color:"bg-green-400"},{label:"Completed",time:a.completed_at,color:"bg-purple-400"}]:[],p=a?.started_at&&a?.completed_at?Math.round((new Date(a.completed_at).getTime()-new Date(a.started_at).getTime())/1e3):null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{onClick:r,className:"jsx-c3e56cbc81656d9 fixed inset-0 bg-black/30 z-40"}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 overflow-y-auto animate-slide-in",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center justify-between px-5 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a] sticky top-0",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm font-semibold text-white",children:"Task Detail"}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500 mt-0.5",children:[e.slice(0,16),"..."]})]}),(0,t.jsx)("button",{onClick:r,className:"jsx-c3e56cbc81656d9 text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,t.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-c3e56cbc81656d9 w-5 h-5",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12",className:"jsx-c3e56cbc81656d9"})})})]}),x?(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 flex justify-center py-16",children:(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 w-6 h-6 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):a?(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 px-5 py-5 space-y-5",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-lg font-bold ${l[a.status]||"text-gray-400"}`,children:a.status}),"normal"!==a.priority&&(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-xs px-2 py-0.5 rounded border ${"high"===a.priority?"text-red-300 border-red-500/20":"text-gray-400 border-gray-600/20"}`,children:a.priority}),null!==p&&(0,t.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500",children:["⏱ ",p<60?`${p}s`:`${Math.floor(p/60)}m ${p%60}s`]})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-blue-400 font-medium",children:a.from_name||"--"}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:"→"}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-cyan-400 font-medium",children:a.to_name||"--"})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-3",children:"Timeline"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-3",children:m.map((e,s)=>(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex flex-col items-center",children:[(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-3 h-3 rounded-full ${e.time?e.color:"bg-gray-700"}`}),s<m.length-1&&(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-0.5 h-4 mt-1 ${e.time&&m[s+1]?.time?"bg-gray-600":"bg-gray-800"}`})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex-1",children:[(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 text-xs font-medium ${e.time?"text-gray-300":"text-gray-600"}`,children:e.label}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500",children:e.time||"Pending"})]})]},e.label))})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Input"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap",children:a.content||"--"})]}),a.result&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Output"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap max-h-64 overflow-y-auto",children:a.result})]}),d.length>0&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:["Events (",d.length,")"]}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-1.5 max-h-40 overflow-y-auto",children:d.map(e=>(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-[11px]",children:[(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 w-1.5 h-1.5 rounded-full shrink-0 ${"running"===e.to_status?"bg-green-400":"replied"===e.to_status?"bg-purple-400":"failed"===e.to_status?"bg-red-400":"bg-blue-400"}`}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-400",children:e.event_type}),e.from_status&&(0,t.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:[e.from_status,"→",e.to_status]}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600 ml-auto",children:(0,i.timeAgo)(e.created_at)})]},e.id))})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-600 space-y-1",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Task ID: ",a.task_id]}),a.expires_at&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Expires: ",a.expires_at]})]})]}):(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-center py-16 text-gray-500",children:"Task not found"})]}),(0,t.jsx)(n.default,{id:"c3e56cbc81656d9",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}let o=["","created","delivered","acked","running","replied","closed","failed","cancelled","expired"],d={created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"};function u(e){let t=d[e]||"bg-gray-500/10 text-gray-400 border-gray-500/20";return`text-xs px-2 py-0.5 rounded-md border ${t}`}function x(e){return"high"===e?"text-red-400":"low"===e?"text-gray-600":"text-gray-400"}function h(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}function m(){let e,n,i,l=(0,r.useSearchParams)(),{networkId:m}=(0,a.useNetworkId)(),[p,g]=(0,s.useState)([]),[f,y]=(0,s.useState)(0),[b,v]=(0,s.useState)(!0),[j,_]=(0,s.useState)(""),[N,S]=(0,s.useState)(new Set),[w,k]=(0,s.useState)(l.get("status")||""),[C,R]=(0,s.useState)(""),[F,T]=(0,s.useState)(""),[z,$]=(0,s.useState)(null),A=(0,s.useCallback)(async()=>{try{let e=new URLSearchParams;m&&e.set("network_id",m),w&&e.set("status",w),C&&e.set("from_name",C),F&&e.set("to_name",F),e.set("limit","100");let t=await fetch(`/api/hub/tasks?${e.toString()}`);if(401===t.status)return void window.location.assign("/login");let s=await t.json();g(s.tasks||[]),y(s.count??(s.tasks?.length||0)),_("")}catch(e){_(e instanceof Error?e.message:"fetch failed")}finally{v(!1)}},[w,C,F,m]);return(0,s.useEffect)(()=>{v(!0),A();let e=setInterval(A,5e3);return()=>clearInterval(e)},[A]),(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Tasks"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:f})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mb-4 bg-[#111128] rounded-lg border border-[#2a2a4a] p-1",children:["",...o.filter(Boolean)].map(e=>(0,t.jsx)("button",{onClick:()=>k(e),className:`px-3 py-1.5 rounded-md text-xs transition-colors ${w===e?`${d[e]||"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"} border`:"text-gray-500 hover:text-gray-300"}`,children:e||"All"},e))}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 mb-6",children:[(0,t.jsx)("input",{type:"text",value:C,onChange:e=>R(e.target.value),placeholder:"From node...",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-40"}),(0,t.jsx)("input",{type:"text",value:F,onChange:e=>T(e.target.value),placeholder:"To node...",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-40"})]}),p.length>0&&!w&&(e={},p.forEach(t=>{e[t.status]=(e[t.status]||0)+1}),n=p.length||1,(i=[{key:"running",color:"bg-green-500",text:"text-green-400"},{key:"delivered",color:"bg-blue-500",text:"text-blue-400"},{key:"replied",color:"bg-purple-500",text:"text-purple-400"},{key:"failed",color:"bg-red-500",text:"text-red-400"},{key:"expired",color:"bg-orange-500",text:"text-orange-400"}].filter(t=>e[t.key])).length?(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex h-2 rounded-full overflow-hidden bg-gray-800",children:i.map(s=>(0,t.jsx)("div",{className:s.color,style:{width:`${e[s.key]/n*100}%`}},s.key))}),(0,t.jsx)("div",{className:"flex flex-wrap gap-3 mt-1.5 text-[10px] text-gray-500",children:i.map(s=>(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${s.color} mr-1`}),e[s.key]," ",s.key]},s.key))})]}):null),j&&(0,t.jsx)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-2 rounded-lg mb-6 text-sm",children:j}),b?(0,t.jsx)("div",{className:"animate-pulse space-y-3",children:[1,2,3,4,5].map(e=>(0,t.jsx)("div",{className:"h-20 bg-gray-800/20 rounded-lg border border-gray-800/40"},e))}):0===p.length?(0,t.jsxs)("div",{className:"text-center py-16",children:[(0,t.jsx)("div",{className:"text-gray-600 text-4xl mb-4",children:"--"}),(0,t.jsx)("h3",{className:"text-gray-400 text-lg font-medium mb-2",children:"No tasks found"}),(0,t.jsx)("p",{className:"text-gray-600 text-sm",children:w||C||F?"Try adjusting your filters.":"Tasks will appear here when agents send them via CommHub."})]}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase",children:[(0,t.jsx)("div",{className:"col-span-1",children:"Status"}),(0,t.jsx)("div",{className:"col-span-2",children:"From"}),(0,t.jsx)("div",{className:"col-span-2",children:"To"}),(0,t.jsx)("div",{className:"col-span-4",children:"Content"}),(0,t.jsx)("div",{className:"col-span-1",children:"Priority"}),(0,t.jsx)("div",{className:"col-span-2",children:"Time"})]}),p.map(e=>(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-3 hover:border-[#3a3a5a] transition-colors cursor-pointer",onClick:()=>{var t;return t=e.task_id,void S(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 items-center",children:[(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:u(e.status),children:e.status})}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-blue-400 truncate",title:e.from_name,children:e.from_name||"--"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-cyan-400 truncate",title:e.to_name,children:e.to_name||"--"}),(0,t.jsx)("div",{className:"col-span-4 text-xs text-gray-400 truncate",title:e.content,children:e.content||"--"}),(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:`text-xs ${x(e.priority)}`,children:e.priority||"normal"})}),(0,t.jsx)("div",{className:"col-span-2 text-xs text-gray-500",title:e.created_at,children:h(e.created_at)})]}),(0,t.jsxs)("div",{className:"sm:hidden space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:u(e.status),children:e.status}),(0,t.jsx)("span",{className:`text-xs ${x(e.priority)}`,children:e.priority||"normal"})]}),(0,t.jsxs)("div",{className:"text-xs text-gray-500",children:[(0,t.jsx)("span",{className:"text-blue-400",children:e.from_name||"--"}),(0,t.jsx)("span",{className:"text-gray-600 mx-1",children:"→"}),(0,t.jsx)("span",{className:"text-cyan-400",children:e.to_name||"--"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-400 truncate",children:e.content||"--"}),(0,t.jsx)("div",{className:"text-xs text-gray-600",children:h(e.created_at)})]}),N.has(e.task_id)&&(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-[#2a2a4a] space-y-3",children:[e.content&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Content"}),(0,t.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:e.content})]}),e.result&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Result"}),(0,t.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] max-h-48 overflow-y-auto",children:e.result})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[["Created",e.created_at],["Delivered",e.delivered_at],["Started",e.started_at],["Completed",e.completed_at]].map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-gray-600",children:[e,": "]}),(0,t.jsx)("span",{className:"text-gray-400",children:s?h(s):"--"})]},e))}),e.expires_at&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"Expires: "}),(0,t.jsx)("span",{className:"text-orange-400",children:e.expires_at})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"text-xs text-gray-600 truncate",title:e.task_id,children:["ID: ",e.task_id]}),(0,t.jsxs)("div",{className:"flex gap-2 shrink-0",children:[("failed"===e.status||"expired"===e.status)&&(0,t.jsx)("button",{onClick:async t=>{t.stopPropagation(),await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:e.to_name,task:e.content,priority:e.priority})}),A()},className:"text-xs text-orange-400 hover:text-orange-300 px-2 py-0.5 rounded border border-orange-500/20 hover:bg-orange-500/10",children:"Retry"}),(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),$(e.task_id)},className:"text-xs text-cyan-400 hover:text-cyan-300",children:"Detail →"})]})]})]})]},e.task_id))]}),z&&(0,t.jsx)(c,{taskId:z,onClose:()=>$(null)})]})}e.s(["default",0,function(){return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono",children:"Loading tasks..."}),children:(0,t.jsx)(m,{})})}],96527)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},16015,(e,t,s)=>{},98547,(e,t,s)=>{var r=e.i(47167);e.r(16015);var a=e.r(71645),n=a&&"object"==typeof a&&"default"in a?a:{default:a},i=void 0!==r.default&&r.default.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},c=function(){function e(e){var t=void 0===e?{}:e,s=t.name,r=void 0===s?"stylesheet":s,a=t.optimizeForSpeed,n=void 0===a?i:a;o(l(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",o("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var c="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=c?c.getAttribute("content"):null}var t,s=e.prototype;return s.setOptimizeForSpeed=function(e){o("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),o(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},s.isOptimizeForSpeed=function(){return this._optimizeForSpeed},s.inject=function(){var e=this;if(o(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(i||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,s){return"number"==typeof s?e._serverSheet.cssRules[s]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),s},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},s.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},s.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},s.insertRule=function(e,t){if(o(l(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var s=this.getSheet();"number"!=typeof t&&(t=s.cssRules.length);try{s.insertRule(e,t)}catch(t){return i||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},s.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var s="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!s.cssRules[e])return e;s.deleteRule(e);try{s.insertRule(t,e)}catch(r){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),s.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];o(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},s.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];o(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},s.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},s.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,s){return s?t=t.concat(Array.prototype.map.call(e.getSheetForTag(s).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},s.makeStyleTag=function(e,t,s){t&&o(l(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var a=document.head||document.getElementsByTagName("head")[0];return s?a.insertBefore(r,s):a.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function o(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,s=e.length;s;)t=33*t^e.charCodeAt(--s);return t>>>0},u={};function x(e,t){if(!t)return"jsx-"+e;var s=String(t),r=e+s;return u[r]||(u[r]="jsx-"+d(e+"-"+s)),u[r]}function h(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var s=e+t;return u[s]||(u[s]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[s]}var m=function(){function e(e){var t=void 0===e?{}:e,s=t.styleSheet,r=void 0===s?null:s,a=t.optimizeForSpeed,n=void 0!==a&&a;this._sheet=r||new c({name:"styled-jsx",optimizeForSpeed:n}),this._sheet.inject(),r&&"boolean"==typeof n&&(this._sheet.setOptimizeForSpeed(n),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var s=this.getIdAndRules(e),r=s.styleId,a=s.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var n=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=n,this._instancesCounts[r]=1},t.remove=function(e){var t=this,s=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(s in this._instancesCounts,"styleId: `"+s+"` not found"),this._instancesCounts[s]-=1,this._instancesCounts[s]<1){var r=this._fromServer&&this._fromServer[s];r?(r.parentNode.removeChild(r),delete this._fromServer[s]):(this._indices[s].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[s]),delete this._instancesCounts[s]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],s=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return s[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,s;return t=this.cssRules(),void 0===(s=e)&&(s={}),t.map(function(e){var t=e[0],r=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:s.nonce?s.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,s=e.dynamic,r=e.id;if(s){var a=x(r,s);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return h(a,e)}):[h(a,t)]}}return{styleId:x(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),p=a.createContext(null);function g(){return new m}function f(){return a.useContext(p)}p.displayName="StyleSheetContext";var y=n.default.useInsertionEffect||n.default.useLayoutEffect,b="u">typeof window?g():void 0;function v(e){var t=b||f();return t&&("u"<typeof window?t.add(e):y(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return x(e[0],e[1])}).join(" ")},s.StyleRegistry=function(e){var t=e.registry,s=e.children,r=a.useContext(p),i=a.useState(function(){return r||t||g()})[0];return n.default.createElement(p.Provider,{value:i},s)},s.createStyleRegistry=g,s.style=v,s.useStyleRegistry=f},21373,(e,t,s)=>{t.exports=e.r(98547).style},96527,e=>{"use strict";var t=e.i(18050),s=e.i(71645),r=e.i(18566),a=e.i(58963),n=e.i(21373),i=e.i(18150);let l={created:"text-gray-400",delivered:"text-blue-400",running:"text-green-400",replied:"text-purple-400",failed:"text-red-400",closed:"text-gray-500"};function c({taskId:e,onClose:r}){let[a,o]=(0,s.useState)(null),[d,u]=(0,s.useState)([]),[x,h]=(0,s.useState)(!0);(0,s.useEffect)(()=>{(async()=>{try{let[t,s]=await Promise.all([fetch(`/api/hub/tasks?task_id=${encodeURIComponent(e)}`),fetch(`/api/hub/task-events?task_id=${encodeURIComponent(e)}&limit=50`)]),r=await t.json(),a=await s.json();r.tasks?.[0]&&o(r.tasks[0]),u(a.events||[])}catch{}finally{h(!1)}})()},[e]);let m=a?[{label:"Created",time:a.created_at,color:"bg-gray-400"},{label:"Delivered",time:a.delivered_at,color:"bg-blue-400"},{label:"Started",time:a.started_at,color:"bg-green-400"},{label:"Completed",time:a.completed_at,color:"bg-purple-400"}]:[],p=a?.started_at&&a?.completed_at?Math.round((new Date(a.completed_at).getTime()-new Date(a.started_at).getTime())/1e3):null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{onClick:r,className:"jsx-c3e56cbc81656d9 fixed inset-0 bg-black/30 z-40"}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 overflow-y-auto animate-slide-in",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center justify-between px-5 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a] sticky top-0",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm font-semibold text-white",children:"Task Detail"}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500 mt-0.5",children:[e.slice(0,16),"..."]})]}),(0,t.jsx)("button",{onClick:r,className:"jsx-c3e56cbc81656d9 text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,t.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-c3e56cbc81656d9 w-5 h-5",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12",className:"jsx-c3e56cbc81656d9"})})})]}),x?(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 flex justify-center py-16",children:(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 w-6 h-6 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):a?(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 px-5 py-5 space-y-5",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-lg font-bold ${l[a.status]||"text-gray-400"}`,children:a.status}),"normal"!==a.priority&&(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-xs px-2 py-0.5 rounded border ${"high"===a.priority?"text-red-300 border-red-500/20":"text-gray-400 border-gray-600/20"}`,children:a.priority}),null!==p&&(0,t.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500",children:["⏱ ",p<60?`${p}s`:`${Math.floor(p/60)}m ${p%60}s`]})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-blue-400 font-medium",children:a.from_name||"--"}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:"→"}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-cyan-400 font-medium",children:a.to_name||"--"})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-3",children:"Timeline"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-3",children:m.map((e,s)=>(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex flex-col items-center",children:[(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-3 h-3 rounded-full ${e.time?e.color:"bg-gray-700"}`}),s<m.length-1&&(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-0.5 h-4 mt-1 ${e.time&&m[s+1]?.time?"bg-gray-600":"bg-gray-800"}`})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex-1",children:[(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 text-xs font-medium ${e.time?"text-gray-300":"text-gray-600"}`,children:e.label}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500",children:e.time||"Pending"})]})]},e.label))})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Input"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap",children:a.content||"--"})]}),a.result&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Output"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap max-h-64 overflow-y-auto",children:a.result})]}),d.length>0&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:["Events (",d.length,")"]}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-1.5 max-h-40 overflow-y-auto",children:d.map(e=>(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-[11px]",children:[(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 w-1.5 h-1.5 rounded-full shrink-0 ${"running"===e.to_status?"bg-green-400":"replied"===e.to_status?"bg-purple-400":"failed"===e.to_status?"bg-red-400":"bg-blue-400"}`}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-400",children:e.event_type}),e.from_status&&(0,t.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:[e.from_status,"→",e.to_status]}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600 ml-auto",children:(0,i.timeAgo)(e.created_at)})]},e.id))})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-600 space-y-1",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Task ID: ",a.task_id]}),a.expires_at&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Expires: ",a.expires_at]})]})]}):(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-center py-16 text-gray-500",children:"Task not found"})]}),(0,t.jsx)(n.default,{id:"c3e56cbc81656d9",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}let o=["","created","delivered","acked","running","replied","closed","failed","cancelled","expired"],d={created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"};function u(e){let t=d[e]||"bg-gray-500/10 text-gray-400 border-gray-500/20";return`text-xs px-2 py-0.5 rounded-md border ${t}`}function x(e){return"high"===e?"text-red-400":"low"===e?"text-gray-600":"text-gray-400"}function h(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}function m(){let e,n,i,l=(0,r.useSearchParams)(),{networkId:m}=(0,a.useNetworkId)(),[p,g]=(0,s.useState)([]),[f,y]=(0,s.useState)(0),[b,v]=(0,s.useState)(!0),[j,_]=(0,s.useState)(""),[N,S]=(0,s.useState)(new Set),[w,k]=(0,s.useState)(l.get("status")||""),[C,R]=(0,s.useState)(""),[F,T]=(0,s.useState)(""),[z,$]=(0,s.useState)(null),A=(0,s.useCallback)(async()=>{try{let e=new URLSearchParams;m&&e.set("network_id",m),w&&e.set("status",w),C&&e.set("from_name",C),F&&e.set("to_name",F),e.set("limit","100");let t=await fetch(`/api/hub/tasks?${e.toString()}`);if(401===t.status)return void window.location.assign("/login");let s=await t.json();g(s.tasks||[]),y(s.count??(s.tasks?.length||0)),_("")}catch(e){_(e instanceof Error?e.message:"fetch failed")}finally{v(!1)}},[w,C,F,m]);return(0,s.useEffect)(()=>{v(!0),A();let e=setInterval(A,5e3);return()=>clearInterval(e)},[A]),(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Tasks"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:f})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mb-4 bg-[#111128] rounded-lg border border-[#2a2a4a] p-1",children:["",...o.filter(Boolean)].map(e=>(0,t.jsx)("button",{onClick:()=>k(e),className:`px-3 py-1.5 rounded-md text-xs transition-colors ${w===e?`${d[e]||"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"} border`:"text-gray-500 hover:text-gray-300"}`,children:e||"All"},e))}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 mb-6",children:[(0,t.jsx)("input",{type:"text",value:C,onChange:e=>R(e.target.value),placeholder:"From node...",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-40"}),(0,t.jsx)("input",{type:"text",value:F,onChange:e=>T(e.target.value),placeholder:"To node...",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-40"})]}),p.length>0&&!w&&(e={},p.forEach(t=>{e[t.status]=(e[t.status]||0)+1}),n=p.length||1,(i=[{key:"running",color:"bg-green-500",text:"text-green-400"},{key:"delivered",color:"bg-blue-500",text:"text-blue-400"},{key:"replied",color:"bg-purple-500",text:"text-purple-400"},{key:"failed",color:"bg-red-500",text:"text-red-400"},{key:"expired",color:"bg-orange-500",text:"text-orange-400"}].filter(t=>e[t.key])).length?(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex h-2 rounded-full overflow-hidden bg-gray-800",children:i.map(s=>(0,t.jsx)("div",{className:s.color,style:{width:`${e[s.key]/n*100}%`}},s.key))}),(0,t.jsx)("div",{className:"flex flex-wrap gap-3 mt-1.5 text-[10px] text-gray-500",children:i.map(s=>(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${s.color} mr-1`}),e[s.key]," ",s.key]},s.key))})]}):null),j&&(0,t.jsx)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-2 rounded-lg mb-6 text-sm",children:j}),b?(0,t.jsx)("div",{className:"animate-pulse space-y-3",children:[1,2,3,4,5].map(e=>(0,t.jsx)("div",{className:"h-20 bg-gray-800/20 rounded-lg border border-gray-800/40"},e))}):0===p.length?(0,t.jsxs)("div",{className:"text-center py-16",children:[(0,t.jsx)("div",{className:"text-gray-600 text-4xl mb-4",children:"--"}),(0,t.jsx)("h3",{className:"text-gray-400 text-lg font-medium mb-2",children:"No tasks found"}),(0,t.jsx)("p",{className:"text-gray-600 text-sm",children:w||C||F?"Try adjusting your filters.":"Tasks will appear here when agents send them via CommHub."})]}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase",children:[(0,t.jsx)("div",{className:"col-span-1",children:"Status"}),(0,t.jsx)("div",{className:"col-span-2",children:"From"}),(0,t.jsx)("div",{className:"col-span-2",children:"To"}),(0,t.jsx)("div",{className:"col-span-4",children:"Content"}),(0,t.jsx)("div",{className:"col-span-1",children:"Priority"}),(0,t.jsx)("div",{className:"col-span-2",children:"Time"})]}),p.map(e=>(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-3 hover:border-[#3a3a5a] transition-colors cursor-pointer",onClick:()=>{var t;return t=e.task_id,void S(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 items-center",children:[(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:u(e.status),children:e.status})}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-blue-400 truncate",title:e.from_name,children:e.from_name||"--"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-cyan-400 truncate",title:e.to_name,children:e.to_name||"--"}),(0,t.jsx)("div",{className:"col-span-4 text-xs text-gray-400 truncate",title:e.content,children:e.content||"--"}),(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:`text-xs ${x(e.priority)}`,children:e.priority||"normal"})}),(0,t.jsx)("div",{className:"col-span-2 text-xs text-gray-500",title:e.created_at,children:h(e.created_at)})]}),(0,t.jsxs)("div",{className:"sm:hidden space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:u(e.status),children:e.status}),(0,t.jsx)("span",{className:`text-xs ${x(e.priority)}`,children:e.priority||"normal"})]}),(0,t.jsxs)("div",{className:"text-xs text-gray-500",children:[(0,t.jsx)("span",{className:"text-blue-400",children:e.from_name||"--"}),(0,t.jsx)("span",{className:"text-gray-600 mx-1",children:"→"}),(0,t.jsx)("span",{className:"text-cyan-400",children:e.to_name||"--"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-400 truncate",children:e.content||"--"}),(0,t.jsx)("div",{className:"text-xs text-gray-600",children:h(e.created_at)})]}),N.has(e.task_id)&&(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-[#2a2a4a] space-y-3",children:[e.content&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Content"}),(0,t.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:e.content})]}),e.result&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Result"}),(0,t.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] max-h-48 overflow-y-auto",children:e.result})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[["Created",e.created_at],["Delivered",e.delivered_at],["Started",e.started_at],["Completed",e.completed_at]].map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-gray-600",children:[e,": "]}),(0,t.jsx)("span",{className:"text-gray-400",children:s?h(s):"--"})]},e))}),e.expires_at&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"Expires: "}),(0,t.jsx)("span",{className:"text-orange-400",children:e.expires_at})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"text-xs text-gray-600 truncate",title:e.task_id,children:["ID: ",e.task_id]}),(0,t.jsxs)("div",{className:"flex gap-2 shrink-0",children:[("failed"===e.status||"expired"===e.status)&&(0,t.jsx)("button",{onClick:async t=>{t.stopPropagation(),await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:e.to_name,task:e.content,priority:e.priority})}),A()},className:"text-xs text-orange-400 hover:text-orange-300 px-2 py-0.5 rounded border border-orange-500/20 hover:bg-orange-500/10",children:"Retry"}),(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),$(e.task_id)},className:"text-xs text-cyan-400 hover:text-cyan-300",children:"Detail →"})]})]})]})]},e.task_id))]}),z&&(0,t.jsx)(c,{taskId:z,onClose:()=>$(null)})]})}e.s(["default",0,function(){return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono",children:"Loading tasks..."}),children:(0,t.jsx)(m,{})})}],96527)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},65822,e=>{"use strict";var t=e.i(83599),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function l(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:n}=(0,s.useNetworkId)(),{data:i,error:o,isLoading:d}=(0,t.default)(l(`/api/hub/messages?limit=${e}`,n),a,r);return{messages:i?.messages||[],error:o,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:n,error:i,isLoading:o}=(0,t.default)(l("/api/hub/status",e),a,r);return{sessions:n?.sessions||[],hint:n?._hint,error:i,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:n,error:i}=(0,t.default)(l("/api/hub/stats",e),a,r);return{stats:n?.ok?n:null,error:i}},"useTasks",0,function(e){let{networkId:n}=(0,s.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:d,isLoading:c}=(0,t.default)(l(`/api/hub/tasks?${i}`,n),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:d,isLoading:c}}])},23261,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(65822),r=e.i(18150);e.s(["default",0,function(){let{sessions:e}=(0,a.useSessions)(),{health:l}=(0,a.useHealth)(),{stats:n}=(0,a.useStats)(),i=l?.sse_sessions||{},[o,d]=(0,s.useState)(""),[c,u]=(0,s.useState)(""),[x,h]=(0,s.useState)(""),[m,g]=(0,s.useState)(""),[b,p]=(0,s.useState)(""),[f,y]=(0,s.useState)(""),[j,N]=(0,s.useState)(""),[v,w]=(0,s.useState)(""),k=async()=>{if(o.trim()&&c.trim()){try{let e=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"register",username:o,password:c})}),t=await e.json();h(t.ok?`Created: ${t.user.username} (${t.user.user_id})`:`Failed: ${t.error}`),t.ok&&(d(""),u(""))}catch{h("Failed")}setTimeout(()=>h(""),8e3)}},S=async()=>{if(m.trim()){try{let e=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:m})}),t=await e.json();p(t.ok?`Sent to ${t.recipients} nodes`:`Failed: ${t.error}`),t.ok&&g("")}catch{p("Failed")}setTimeout(()=>p(""),5e3)}},T=async()=>{if(f&&j.trim()){try{let e=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:f,task:j})}),t=await e.json();w(t.ok?"Task sent":`Failed: ${t.error}`),t.ok&&N("")}catch{w("Failed")}setTimeout(()=>w(""),5e3)}},$=e.filter(e=>i[e.alias]),C=e.filter(e=>!i[e.alias]);return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white mb-6 lg:ml-0 ml-10",children:"Admin"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 max-w-6xl",children:[(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-3xl font-bold text-green-400 tabular-nums",children:$.length}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Online"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-3xl font-bold text-gray-500 tabular-nums",children:C.length}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Offline"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-3xl font-bold text-cyan-400 tabular-nums",children:l?.sse_connections??"--"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"SSE Connections"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-3xl font-bold text-white tabular-nums",children:n?.tasks?.total??"--"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Total Tasks"})]})]}),n?.tasks?.by_status&&n.tasks.by_status.length>0&&(0,t.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:n.tasks.by_status.map(e=>(0,t.jsxs)("span",{className:"text-xs px-2 py-1 rounded bg-[#0a0a15] border border-[#1a1a2a] text-gray-400",children:[e.status,": ",e.count]},e.status))})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Broadcast"}),(0,t.jsx)("textarea",{value:m,onChange:e=>g(e.target.value),placeholder:"Message to all online nodes...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[(0,t.jsxs)("span",{className:"text-xs text-gray-600",children:[m.length,"/500"]}),(0,t.jsx)("button",{onClick:S,disabled:!m.trim(),className:"px-4 py-2 bg-purple-600 hover:bg-purple-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Broadcast"})]}),b&&(0,t.jsx)("div",{className:`mt-2 text-xs ${b.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:b})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Send Task"}),(0,t.jsxs)("select",{value:f,onChange:e=>y(e.target.value),className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-cyan-500/50 focus:outline-none mb-3",children:[(0,t.jsx)("option",{value:"",children:"Select target node..."}),$.map(e=>(0,t.jsxs)("option",{value:e.alias,children:[e.alias," (",e.status,")"]},e.alias)),(0,t.jsx)("optgroup",{label:"Offline",children:C.map(e=>(0,t.jsxs)("option",{value:e.alias,children:[e.alias," (offline)"]},e.alias))})]}),(0,t.jsx)("textarea",{value:j,onChange:e=>N(e.target.value),placeholder:"Task content...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,t.jsx)("div",{className:"flex justify-end mt-3",children:(0,t.jsx)("button",{onClick:T,disabled:!f||!j.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Send Task"})}),v&&(0,t.jsx)("div",{className:`mt-2 text-xs ${v.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:v})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:["Online Sessions ",(0,t.jsxs)("span",{className:"text-gray-600",children:["(",$.length,")"]})]}),(0,t.jsx)("div",{className:"space-y-2 max-h-80 overflow-y-auto",children:0===$.length?(0,t.jsx)("div",{className:"text-xs text-gray-600 text-center py-4",children:"No online sessions"}):$.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-sm text-white font-medium truncate",children:e.alias}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:[e.agent||"--"," · ",e.task||"idle"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded border ${"working"===e.status?"bg-green-900/30 text-green-300 border-green-800/30":"bg-blue-900/30 text-blue-300 border-blue-800/30"}`,children:e.status}),(0,t.jsx)("span",{className:"text-[10px] text-gray-600",children:(0,r.timeAgo)(e.updated_at)})]})]},e.alias))})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Register User (V3)"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("input",{type:"text",value:o,onChange:e=>d(e.target.value),placeholder:"Username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,t.jsx)("input",{type:"password",value:c,onChange:e=>u(e.target.value),placeholder:"Password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,t.jsx)("button",{onClick:k,disabled:!o.trim()||!c.trim(),className:"w-full px-4 py-2 bg-green-600 hover:bg-green-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Register"})]}),x&&(0,t.jsx)("div",{className:`mt-2 text-xs ${x.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:x})]})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},65822,e=>{"use strict";var t=e.i(83599),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function l(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:n}=(0,s.useNetworkId)(),{data:i,error:o,isLoading:d}=(0,t.default)(l(`/api/hub/messages?limit=${e}`,n),a,r);return{messages:i?.messages||[],error:o,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:n,error:i,isLoading:o}=(0,t.default)(l("/api/hub/status",e),a,r);return{sessions:n?.sessions||[],hint:n?._hint,error:i,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:n,error:i}=(0,t.default)(l("/api/hub/stats",e),a,r);return{stats:n?.ok?n:null,error:i}},"useTasks",0,function(e){let{networkId:n}=(0,s.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:d,isLoading:c}=(0,t.default)(l(`/api/hub/tasks?${i}`,n),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:d,isLoading:c}}])},23261,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(65822),r=e.i(18150);e.s(["default",0,function(){let{sessions:e}=(0,a.useSessions)(),{health:l}=(0,a.useHealth)(),{stats:n}=(0,a.useStats)(),i=l?.sse_sessions||{},[o,d]=(0,s.useState)(""),[c,u]=(0,s.useState)(""),[x,h]=(0,s.useState)(""),[m,g]=(0,s.useState)(""),[b,p]=(0,s.useState)(""),[f,y]=(0,s.useState)(""),[j,N]=(0,s.useState)(""),[v,w]=(0,s.useState)(""),k=async()=>{if(o.trim()&&c.trim()){try{let e=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"register",username:o,password:c})}),t=await e.json();h(t.ok?`Created: ${t.user.username} (${t.user.user_id})`:`Failed: ${t.error}`),t.ok&&(d(""),u(""))}catch{h("Failed")}setTimeout(()=>h(""),8e3)}},S=async()=>{if(m.trim()){try{let e=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:m})}),t=await e.json();p(t.ok?`Sent to ${t.recipients} nodes`:`Failed: ${t.error}`),t.ok&&g("")}catch{p("Failed")}setTimeout(()=>p(""),5e3)}},T=async()=>{if(f&&j.trim()){try{let e=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:f,task:j})}),t=await e.json();w(t.ok?"Task sent":`Failed: ${t.error}`),t.ok&&N("")}catch{w("Failed")}setTimeout(()=>w(""),5e3)}},$=e.filter(e=>i[e.alias]),C=e.filter(e=>!i[e.alias]);return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white mb-6 lg:ml-0 ml-10",children:"Admin"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 max-w-6xl",children:[(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-3xl font-bold text-green-400 tabular-nums",children:$.length}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Online"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-3xl font-bold text-gray-500 tabular-nums",children:C.length}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Offline"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-3xl font-bold text-cyan-400 tabular-nums",children:l?.sse_connections??"--"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"SSE Connections"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-3xl font-bold text-white tabular-nums",children:n?.tasks?.total??"--"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Total Tasks"})]})]}),n?.tasks?.by_status&&n.tasks.by_status.length>0&&(0,t.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:n.tasks.by_status.map(e=>(0,t.jsxs)("span",{className:"text-xs px-2 py-1 rounded bg-[#0a0a15] border border-[#1a1a2a] text-gray-400",children:[e.status,": ",e.count]},e.status))})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Broadcast"}),(0,t.jsx)("textarea",{value:m,onChange:e=>g(e.target.value),placeholder:"Message to all online nodes...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[(0,t.jsxs)("span",{className:"text-xs text-gray-600",children:[m.length,"/500"]}),(0,t.jsx)("button",{onClick:S,disabled:!m.trim(),className:"px-4 py-2 bg-purple-600 hover:bg-purple-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Broadcast"})]}),b&&(0,t.jsx)("div",{className:`mt-2 text-xs ${b.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:b})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Send Task"}),(0,t.jsxs)("select",{value:f,onChange:e=>y(e.target.value),className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-cyan-500/50 focus:outline-none mb-3",children:[(0,t.jsx)("option",{value:"",children:"Select target node..."}),$.map(e=>(0,t.jsxs)("option",{value:e.alias,children:[e.alias," (",e.status,")"]},e.alias)),(0,t.jsx)("optgroup",{label:"Offline",children:C.map(e=>(0,t.jsxs)("option",{value:e.alias,children:[e.alias," (offline)"]},e.alias))})]}),(0,t.jsx)("textarea",{value:j,onChange:e=>N(e.target.value),placeholder:"Task content...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,t.jsx)("div",{className:"flex justify-end mt-3",children:(0,t.jsx)("button",{onClick:T,disabled:!f||!j.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Send Task"})}),v&&(0,t.jsx)("div",{className:`mt-2 text-xs ${v.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:v})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:["Online Sessions ",(0,t.jsxs)("span",{className:"text-gray-600",children:["(",$.length,")"]})]}),(0,t.jsx)("div",{className:"space-y-2 max-h-80 overflow-y-auto",children:0===$.length?(0,t.jsx)("div",{className:"text-xs text-gray-600 text-center py-4",children:"No online sessions"}):$.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-sm text-white font-medium truncate",children:e.alias}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:[e.agent||"--"," · ",e.task||"idle"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded border ${"working"===e.status?"bg-green-900/30 text-green-300 border-green-800/30":"bg-blue-900/30 text-blue-300 border-blue-800/30"}`,children:e.status}),(0,t.jsx)("span",{className:"text-[10px] text-gray-600",children:(0,r.timeAgo)(e.updated_at)})]})]},e.alias))})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Register User (V3)"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("input",{type:"text",value:o,onChange:e=>d(e.target.value),placeholder:"Username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,t.jsx)("input",{type:"password",value:c,onChange:e=>u(e.target.value),placeholder:"Password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,t.jsx)("button",{onClick:k,disabled:!o.trim()||!c.trim(),className:"w-full px-4 py-2 bg-green-600 hover:bg-green-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Register"})]}),x&&(0,t.jsx)("div",{className:`mt-2 text-xs ${x.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:x})]})]})]})}])}]);