@aoagents/ao-web 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +200 -186
  3. package/.next/app-path-routes-manifest.json +16 -14
  4. package/.next/build-manifest.json +6 -6
  5. package/.next/next-server.js.nft.json +1 -1
  6. package/.next/prerender-manifest.json +19 -19
  7. package/.next/react-loadable-manifest.json +5 -3
  8. package/.next/required-server-files.json +4 -5
  9. package/.next/server/app/_not-found/page.js +2 -2
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +8 -8
  14. package/.next/server/app/api/backlog/route.js +1 -1
  15. package/.next/server/app/api/backlog/route.js.nft.json +1 -1
  16. package/.next/server/app/api/backlog/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/browse-directory/route.js +1 -1
  18. package/.next/server/app/api/browse-directory/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/filesystem/browse/route.js +1 -1
  20. package/.next/server/app/api/filesystem/browse/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/issues/route.js +1 -1
  22. package/.next/server/app/api/issues/route.js.nft.json +1 -1
  23. package/.next/server/app/api/issues/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/observability/route.js +1 -1
  25. package/.next/server/app/api/observability/route.js.nft.json +1 -1
  26. package/.next/server/app/api/observability/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/orchestrators/route.js +1 -1
  28. package/.next/server/app/api/orchestrators/route.js.nft.json +1 -1
  29. package/.next/server/app/api/orchestrators/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/projects/[id]/route.js +5 -1
  31. package/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  32. package/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/projects/reload/route.js +1 -1
  34. package/.next/server/app/api/projects/reload/route.js.nft.json +1 -1
  35. package/.next/server/app/api/projects/reload/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/projects/route.js +1 -1
  37. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  38. package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/prs/[id]/merge/route.js +1 -1
  40. package/.next/server/app/api/prs/[id]/merge/route.js.nft.json +1 -1
  41. package/.next/server/app/api/prs/[id]/merge/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/runtime/terminal/route.js +1 -1
  43. package/.next/server/app/api/runtime/terminal/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/sessions/[id]/kill/route.js +1 -1
  45. package/.next/server/app/api/sessions/[id]/kill/route.js.nft.json +1 -1
  46. package/.next/server/app/api/sessions/[id]/kill/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/sessions/[id]/message/route.js +1 -1
  48. package/.next/server/app/api/sessions/[id]/message/route.js.nft.json +1 -1
  49. package/.next/server/app/api/sessions/[id]/message/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/sessions/[id]/remap/route.js +1 -1
  51. package/.next/server/app/api/sessions/[id]/remap/route.js.nft.json +1 -1
  52. package/.next/server/app/api/sessions/[id]/remap/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/sessions/[id]/restore/route.js +1 -1
  54. package/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -1
  55. package/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  57. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  58. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/sessions/[id]/send/route.js +1 -1
  60. package/.next/server/app/api/sessions/[id]/send/route.js.nft.json +1 -1
  61. package/.next/server/app/api/sessions/[id]/send/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/sessions/patches/route.js +1 -1
  63. package/.next/server/app/api/sessions/patches/route.js.nft.json +1 -1
  64. package/.next/server/app/api/sessions/patches/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/sessions/route.js +1 -1
  66. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  67. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/setup-labels/route.js +1 -1
  69. package/.next/server/app/api/setup-labels/route.js.nft.json +1 -1
  70. package/.next/server/app/api/setup-labels/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/spawn/route.js +1 -1
  72. package/.next/server/app/api/spawn/route.js.nft.json +1 -1
  73. package/.next/server/app/api/spawn/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/update/route.js +1 -0
  75. package/.next/server/app/api/update/route.js.nft.json +1 -0
  76. package/.next/server/app/api/update/route_client-reference-manifest.js +1 -0
  77. package/.next/server/app/api/verify/route.js +1 -1
  78. package/.next/server/app/api/verify/route.js.nft.json +1 -1
  79. package/.next/server/app/api/verify/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/version/route.js +1 -0
  81. package/.next/server/app/api/version/route.js.nft.json +1 -0
  82. package/.next/server/app/api/version/route_client-reference-manifest.js +1 -0
  83. package/.next/server/app/api/webhooks/[...slug]/route.js +1 -1
  84. package/.next/server/app/api/webhooks/[...slug]/route.js.nft.json +1 -1
  85. package/.next/server/app/api/webhooks/[...slug]/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/apple-icon/route.js +1 -1
  87. package/.next/server/app/apple-icon/route.js.nft.json +1 -1
  88. package/.next/server/app/apple-icon/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/apple-icon.body +0 -0
  90. package/.next/server/app/dev/terminal-test/page.js +3 -3
  91. package/.next/server/app/dev/terminal-test/page.js.nft.json +1 -1
  92. package/.next/server/app/dev/terminal-test/page_client-reference-manifest.js +1 -1
  93. package/.next/server/app/dev/terminal-test.html +1 -1
  94. package/.next/server/app/dev/terminal-test.rsc +9 -9
  95. package/.next/server/app/icon/route.js +1 -1
  96. package/.next/server/app/icon/route.js.nft.json +1 -1
  97. package/.next/server/app/icon/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/icon-192/route.js +1 -1
  99. package/.next/server/app/icon-192/route.js.nft.json +1 -1
  100. package/.next/server/app/icon-192/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/icon-512/route.js +1 -1
  102. package/.next/server/app/icon-512/route.js.nft.json +1 -1
  103. package/.next/server/app/icon-512/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/icon.body +0 -0
  105. package/.next/server/app/manifest.webmanifest/route.js +1 -1
  106. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  107. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/manifest.webmanifest.body +1 -1
  109. package/.next/server/app/orchestrators/page.js +2 -2
  110. package/.next/server/app/orchestrators/page.js.nft.json +1 -1
  111. package/.next/server/app/orchestrators/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app/page.js +2 -2
  113. package/.next/server/app/page.js.nft.json +1 -1
  114. package/.next/server/app/page_client-reference-manifest.js +1 -1
  115. package/.next/server/app/projects/[projectId]/page.js +2 -2
  116. package/.next/server/app/projects/[projectId]/page.js.nft.json +1 -1
  117. package/.next/server/app/projects/[projectId]/page_client-reference-manifest.js +1 -1
  118. package/.next/server/app/projects/[projectId]/sessions/[id]/page.js +2 -2
  119. package/.next/server/app/projects/[projectId]/sessions/[id]/page.js.nft.json +1 -1
  120. package/.next/server/app/projects/[projectId]/sessions/[id]/page_client-reference-manifest.js +1 -1
  121. package/.next/server/app/projects/[projectId]/settings/page.js +2 -2
  122. package/.next/server/app/projects/[projectId]/settings/page.js.nft.json +1 -1
  123. package/.next/server/app/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
  124. package/.next/server/app/prs/page.js +2 -2
  125. package/.next/server/app/prs/page.js.nft.json +1 -1
  126. package/.next/server/app/prs/page_client-reference-manifest.js +1 -1
  127. package/.next/server/app/sessions/[id]/page.js +2 -2
  128. package/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  129. package/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  130. package/.next/server/app/test-direct/page.js +2 -2
  131. package/.next/server/app/test-direct/page.js.nft.json +1 -1
  132. package/.next/server/app/test-direct/page_client-reference-manifest.js +1 -1
  133. package/.next/server/app/test-direct.html +1 -1
  134. package/.next/server/app/test-direct.rsc +9 -9
  135. package/.next/server/app-paths-manifest.json +16 -14
  136. package/.next/server/chunks/1271.js +1 -1
  137. package/.next/server/chunks/1876.js +2 -2
  138. package/.next/server/chunks/303.js +3 -0
  139. package/.next/server/chunks/3714.js +1 -1
  140. package/.next/server/chunks/4520.js +1 -1
  141. package/.next/server/chunks/6013.js +884 -0
  142. package/.next/server/chunks/6848.js +1 -0
  143. package/.next/server/chunks/7167.js +1 -1
  144. package/.next/server/chunks/7173.js +1 -1
  145. package/.next/server/chunks/7227.js +604 -0
  146. package/.next/server/middleware-build-manifest.js +1 -1
  147. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  148. package/.next/server/pages/404.html +1 -1
  149. package/.next/server/pages/500.html +1 -1
  150. package/.next/server/server-reference-manifest.json +1 -1
  151. package/.next/static/9nr0fNWbZcuWTqhM2HhrH/_buildManifest.js +1 -0
  152. package/.next/static/chunks/1654.ac304fc9e36ec94a.js +1 -0
  153. package/.next/static/chunks/3764.cdef4e76dbc23af8.js +1 -0
  154. package/.next/static/chunks/3780-7bdc52d8370adf2f.js +1 -0
  155. package/.next/static/chunks/{5795-b96fd46c8c7344fc.js → 5795-a4dd81606df09bc4.js} +1 -1
  156. package/.next/static/chunks/6231-57dd9c1e306c7069.js +1 -0
  157. package/.next/static/chunks/app/_not-found/page-8b5044bdc951ae98.js +1 -0
  158. package/.next/static/chunks/app/api/backlog/route-8b5044bdc951ae98.js +1 -0
  159. package/.next/static/chunks/app/api/browse-directory/route-8b5044bdc951ae98.js +1 -0
  160. package/.next/static/chunks/app/api/filesystem/browse/route-8b5044bdc951ae98.js +1 -0
  161. package/.next/static/chunks/app/api/issues/route-8b5044bdc951ae98.js +1 -0
  162. package/.next/static/chunks/app/api/observability/route-8b5044bdc951ae98.js +1 -0
  163. package/.next/static/chunks/app/api/orchestrators/route-8b5044bdc951ae98.js +1 -0
  164. package/.next/static/chunks/app/api/projects/[id]/route-8b5044bdc951ae98.js +1 -0
  165. package/.next/static/chunks/app/api/projects/reload/route-8b5044bdc951ae98.js +1 -0
  166. package/.next/static/chunks/app/api/projects/route-8b5044bdc951ae98.js +1 -0
  167. package/.next/static/chunks/app/api/prs/[id]/merge/route-8b5044bdc951ae98.js +1 -0
  168. package/.next/static/chunks/app/api/runtime/terminal/route-8b5044bdc951ae98.js +1 -0
  169. package/.next/static/chunks/app/api/sessions/[id]/kill/route-8b5044bdc951ae98.js +1 -0
  170. package/.next/static/chunks/app/api/sessions/[id]/message/route-8b5044bdc951ae98.js +1 -0
  171. package/.next/static/chunks/app/api/sessions/[id]/remap/route-8b5044bdc951ae98.js +1 -0
  172. package/.next/static/chunks/app/api/sessions/[id]/restore/route-8b5044bdc951ae98.js +1 -0
  173. package/.next/static/chunks/app/api/sessions/[id]/route-8b5044bdc951ae98.js +1 -0
  174. package/.next/static/chunks/app/api/sessions/[id]/send/route-8b5044bdc951ae98.js +1 -0
  175. package/.next/static/chunks/app/api/sessions/patches/route-8b5044bdc951ae98.js +1 -0
  176. package/.next/static/chunks/app/api/sessions/route-8b5044bdc951ae98.js +1 -0
  177. package/.next/static/chunks/app/api/setup-labels/route-8b5044bdc951ae98.js +1 -0
  178. package/.next/static/chunks/app/api/spawn/route-8b5044bdc951ae98.js +1 -0
  179. package/.next/static/chunks/app/api/update/route-8b5044bdc951ae98.js +1 -0
  180. package/.next/static/chunks/app/api/verify/route-8b5044bdc951ae98.js +1 -0
  181. package/.next/static/chunks/app/api/version/route-8b5044bdc951ae98.js +1 -0
  182. package/.next/static/chunks/app/api/webhooks/[...slug]/route-8b5044bdc951ae98.js +1 -0
  183. package/.next/static/chunks/app/apple-icon/route-8b5044bdc951ae98.js +1 -0
  184. package/.next/static/chunks/app/dev/terminal-test/{page-59decd1aad4e02ad.js → page-9aa423dfd54c8325.js} +1 -1
  185. package/.next/static/chunks/app/{error-684a1c5596fa1e14.js → error-65c526052680c0dc.js} +1 -1
  186. package/.next/static/chunks/app/{global-error-1a79bacfbd9b1ba4.js → global-error-63dcb797b2c3ee60.js} +1 -1
  187. package/.next/static/chunks/app/icon/route-8b5044bdc951ae98.js +1 -0
  188. package/.next/static/chunks/app/icon-192/route-8b5044bdc951ae98.js +1 -0
  189. package/.next/static/chunks/app/icon-512/route-8b5044bdc951ae98.js +1 -0
  190. package/.next/static/chunks/app/layout-36ab0168ddb22083.js +1 -0
  191. package/.next/static/chunks/app/loading-8b5044bdc951ae98.js +1 -0
  192. package/.next/static/chunks/app/manifest.webmanifest/route-8b5044bdc951ae98.js +1 -0
  193. package/.next/static/chunks/app/not-found-a693bed1f9e1893f.js +1 -0
  194. package/.next/static/chunks/app/orchestrators/{page-e3a2c53b57dd8391.js → page-376a92db51deb112.js} +1 -1
  195. package/.next/static/chunks/app/page-587d546e62c0796f.js +1 -0
  196. package/.next/static/chunks/app/projects/[projectId]/loading-8b5044bdc951ae98.js +1 -0
  197. package/.next/static/chunks/app/projects/[projectId]/page-bd8fc2a1decb649d.js +1 -0
  198. package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-bd33f6ffda513080.js +1 -0
  199. package/.next/static/chunks/app/projects/[projectId]/settings/page-11facc471a63de50.js +1 -0
  200. package/.next/static/chunks/app/prs/page-f34f66ad51106080.js +1 -0
  201. package/.next/static/chunks/app/sessions/[id]/{error-62e9972b39d9cd16.js → error-df65e7b626bbb713.js} +1 -1
  202. package/.next/static/chunks/app/sessions/[id]/loading-8b5044bdc951ae98.js +1 -0
  203. package/.next/static/chunks/app/sessions/[id]/not-found-a693bed1f9e1893f.js +1 -0
  204. package/.next/static/chunks/app/sessions/[id]/page-3ea4aa79275ea449.js +1 -0
  205. package/.next/static/chunks/app/test-direct/page-edfc701a9300105b.js +1 -0
  206. package/.next/static/chunks/main-app-decbc53736801215.js +1 -0
  207. package/.next/static/chunks/{webpack-83d2d8248a30259c.js → webpack-ecf0988dbb79e19b.js} +1 -1
  208. package/.next/static/css/b93232cd4a58743d.css +1 -0
  209. package/dist-server/direct-terminal-ws.js +12 -2
  210. package/dist-server/mux-websocket.js +270 -70
  211. package/dist-server/start-all.js +28 -6
  212. package/dist-server/tmux-utils.js +124 -2
  213. package/next.config.js +26 -0
  214. package/package.json +26 -12
  215. package/.next/server/chunks/1172.js +0 -1
  216. package/.next/server/chunks/6811.js +0 -3
  217. package/.next/server/chunks/801.js +0 -658
  218. package/.next/server/chunks/9223.js +0 -440
  219. package/.next/static/chunks/1383.8f5f7d4606d356cc.js +0 -1
  220. package/.next/static/chunks/3764.88619fb0d047cae8.js +0 -1
  221. package/.next/static/chunks/3780-52c4733ce6591b8d.js +0 -1
  222. package/.next/static/chunks/4465-17154f7a01abfe85.js +0 -1
  223. package/.next/static/chunks/app/_not-found/page-3b8a01e726e988c8.js +0 -1
  224. package/.next/static/chunks/app/api/backlog/route-3b8a01e726e988c8.js +0 -1
  225. package/.next/static/chunks/app/api/browse-directory/route-3b8a01e726e988c8.js +0 -1
  226. package/.next/static/chunks/app/api/filesystem/browse/route-3b8a01e726e988c8.js +0 -1
  227. package/.next/static/chunks/app/api/issues/route-3b8a01e726e988c8.js +0 -1
  228. package/.next/static/chunks/app/api/observability/route-3b8a01e726e988c8.js +0 -1
  229. package/.next/static/chunks/app/api/orchestrators/route-3b8a01e726e988c8.js +0 -1
  230. package/.next/static/chunks/app/api/projects/[id]/route-3b8a01e726e988c8.js +0 -1
  231. package/.next/static/chunks/app/api/projects/reload/route-3b8a01e726e988c8.js +0 -1
  232. package/.next/static/chunks/app/api/projects/route-3b8a01e726e988c8.js +0 -1
  233. package/.next/static/chunks/app/api/prs/[id]/merge/route-3b8a01e726e988c8.js +0 -1
  234. package/.next/static/chunks/app/api/runtime/terminal/route-3b8a01e726e988c8.js +0 -1
  235. package/.next/static/chunks/app/api/sessions/[id]/kill/route-3b8a01e726e988c8.js +0 -1
  236. package/.next/static/chunks/app/api/sessions/[id]/message/route-3b8a01e726e988c8.js +0 -1
  237. package/.next/static/chunks/app/api/sessions/[id]/remap/route-3b8a01e726e988c8.js +0 -1
  238. package/.next/static/chunks/app/api/sessions/[id]/restore/route-3b8a01e726e988c8.js +0 -1
  239. package/.next/static/chunks/app/api/sessions/[id]/route-3b8a01e726e988c8.js +0 -1
  240. package/.next/static/chunks/app/api/sessions/[id]/send/route-3b8a01e726e988c8.js +0 -1
  241. package/.next/static/chunks/app/api/sessions/patches/route-3b8a01e726e988c8.js +0 -1
  242. package/.next/static/chunks/app/api/sessions/route-3b8a01e726e988c8.js +0 -1
  243. package/.next/static/chunks/app/api/setup-labels/route-3b8a01e726e988c8.js +0 -1
  244. package/.next/static/chunks/app/api/spawn/route-3b8a01e726e988c8.js +0 -1
  245. package/.next/static/chunks/app/api/verify/route-3b8a01e726e988c8.js +0 -1
  246. package/.next/static/chunks/app/api/webhooks/[...slug]/route-3b8a01e726e988c8.js +0 -1
  247. package/.next/static/chunks/app/apple-icon/route-3b8a01e726e988c8.js +0 -1
  248. package/.next/static/chunks/app/icon/route-3b8a01e726e988c8.js +0 -1
  249. package/.next/static/chunks/app/icon-192/route-3b8a01e726e988c8.js +0 -1
  250. package/.next/static/chunks/app/icon-512/route-3b8a01e726e988c8.js +0 -1
  251. package/.next/static/chunks/app/layout-0cda720d75f111b8.js +0 -1
  252. package/.next/static/chunks/app/loading-3b8a01e726e988c8.js +0 -1
  253. package/.next/static/chunks/app/manifest.webmanifest/route-3b8a01e726e988c8.js +0 -1
  254. package/.next/static/chunks/app/not-found-315f4e5c106b425d.js +0 -1
  255. package/.next/static/chunks/app/page-e2e589ea11a0780a.js +0 -1
  256. package/.next/static/chunks/app/projects/[projectId]/loading-3b8a01e726e988c8.js +0 -1
  257. package/.next/static/chunks/app/projects/[projectId]/page-19a6d4cc9951a9e4.js +0 -1
  258. package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-75c536c9755754f7.js +0 -1
  259. package/.next/static/chunks/app/projects/[projectId]/settings/page-f8c323b91978efff.js +0 -1
  260. package/.next/static/chunks/app/prs/page-08f17d7dc341b6f1.js +0 -1
  261. package/.next/static/chunks/app/sessions/[id]/loading-3b8a01e726e988c8.js +0 -1
  262. package/.next/static/chunks/app/sessions/[id]/not-found-315f4e5c106b425d.js +0 -1
  263. package/.next/static/chunks/app/sessions/[id]/page-d0b08722dec5a04a.js +0 -1
  264. package/.next/static/chunks/app/test-direct/page-ee0944bcd355194e.js +0 -1
  265. package/.next/static/chunks/main-app-b95f197c38e3b0a3.js +0 -1
  266. package/.next/static/css/cf9226160e230bf4.css +0 -1
  267. package/.next/static/h0RXs0prE87a8wlbEXQKM/_buildManifest.js +0 -1
  268. /package/.next/static/{h0RXs0prE87a8wlbEXQKM → 9nr0fNWbZcuWTqhM2HhrH}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9170],{1712:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let t=s(1903)._(s(5864));function a(e,r){var s;let a={};"function"==typeof e&&(a.loader=e);let n={...a,...r};return(0,t.default)({...n,modules:null==(s=n.loadableGenerated)?void 0:s.modules})}("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),e.exports=r.default)},4255:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>x,dynamic:()=>c});var t=s(3817),a=s(9891),n=s(7594),l=s(6749);let i=(0,a.default)(()=>Promise.all([s.e(8944),s.e(3764)]).then(s.bind(s,3764)).then(e=>({default:e.DirectTerminal})),{loadableGenerated:{webpack:()=>[3764]},ssr:!1}),o=(0,a.default)(()=>s.e(7317).then(s.bind(s,7317)).then(e=>({default:e.Terminal})),{loadableGenerated:{webpack:()=>[7317]},ssr:!1}),c="force-dynamic";function d(){let e=(0,n.useSearchParams)(),[r,s]=(0,l.useState)([]),[a,c]=(0,l.useState)(!0);(0,l.useEffect)(()=>{fetch("/api/sessions?active=true").then(e=>e.json()).then(e=>{e.sessions&&Array.isArray(e.sessions)&&s(e.sessions.map(e=>e.id))}).catch(e=>{console.error("Failed to fetch sessions:",e)})},[]);let d=e.get("session"),x=e.get("old_session"),m=e.get("new_session"),h=r[0]||"ao-orchestrator",p=r[1]||r[0]||"ao-orchestrator",u=x||d||h,b=m||d||p;return(0,t.jsx)("div",{className:"min-h-screen bg-[var(--color-bg-primary)] p-8",children:(0,t.jsxs)("div",{className:"mx-auto max-w-7xl",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"mb-2 text-3xl font-bold text-[var(--color-text-primary)]",children:"Terminal Implementation Test & Documentation"}),(0,t.jsxs)("p",{className:"text-sm text-[var(--color-text-muted)]",children:["Comparing sessions:",(0,t.jsxs)("span",{className:"ml-2 font-mono text-[var(--color-accent-red)]",children:["OLD: ",u]}),(0,t.jsxs)("span",{className:"ml-2 font-mono text-[var(--color-accent-green)]",children:["NEW: ",b]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDC1B The Problem"}),(0,t.jsxs)("div",{className:"space-y-3 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Issue:"})," Browser clipboard (Cmd+C/Ctrl+C) only worked when an iTerm2 client was attached to the tmux session."]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Impact:"})," Users had to keep iTerm2 tabs open in the background for clipboard to work in the web dashboard."]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Investigation time:"})," 12+ hours of debugging across tmux, ttyd, xterm.js, and macOS clipboard systems."]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDD0D Root Cause Analysis"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"1. How tmux Clipboard Works (OSC 52)"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"tmux uses OSC 52 escape sequences to synchronize clipboard with terminals"}),(0,t.jsxs)("li",{children:["Format:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"\\x1b]52;c;<base64>\\x07"})]}),(0,t.jsx)("li",{children:"Terminal must support OSC 52 and have proper capabilities declared"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"2. tmux Capability Detection (XDA)"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"tmux queries terminal capabilities using Device Attributes (DA/XDA)"}),(0,t.jsxs)("li",{children:["XDA query: ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"CSI > q"})," ","(also called XTVERSION)"]}),(0,t.jsx)("li",{children:'Terminal responds with identification string containing terminal type (e.g., "XTerm(370)", "iTerm2 ")'}),(0,t.jsx)("li",{children:"Based on response, tmux enables features like TTYC_MS (clipboard support)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"3. The Missing Piece"}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-accent-red)] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-red)]",children:"xterm.js does NOT implement XDA (Extended Device Attributes)"}),(0,t.jsxs)("ul",{className:"ml-6 mt-2 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["XDA is marked as TODO in xterm.js codebase:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"test.skip('CSI > Ps q - Report xterm name and version (XTVERSION)')"})]}),(0,t.jsx)("li",{children:"Without XDA response, tmux doesn't recognize the terminal as clipboard-capable"}),(0,t.jsx)("li",{children:"tmux never emits OSC 52 sequences → clipboard doesn't work"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:'4. Why iTerm2 "Fixed" It'}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["iTerm2 sends proper XDA response identifying itself as"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:'"iTerm2 "'})]}),(0,t.jsx)("li",{children:"tmux detects this and enables clipboard for the entire session"}),(0,t.jsx)("li",{children:"OSC 52 sequences are then sent to ALL clients, including browser (ttyd/xterm.js)"}),(0,t.jsx)("li",{children:'This is why clipboard "magically worked" when iTerm2 was attached'})]})]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"✅ The Solution"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"DirectTerminal Implementation"}),(0,t.jsx)("p",{className:"mb-2 text-[var(--color-text-secondary)]",children:"Created custom terminal component that registers an XDA handler using xterm.js parser API:"}),(0,t.jsx)("pre",{className:"overflow-x-auto rounded-[2px] bg-black p-4 text-xs",children:(0,t.jsx)("code",{className:"text-[var(--color-accent-green)]",children:'terminal.parser.registerCsiHandler(\n { prefix: ">", final: "q" }, // CSI > q is XDA query\n () => {\n // Respond with XTerm identification\n terminal.write("\\x1bP>|XTerm(370)\\x1b\\\\");\n return true;\n }\n);'})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"What This Does"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"Intercepts XDA queries from tmux"}),(0,t.jsxs)("li",{children:["Responds with"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"XTerm(370)"})," ","identification"]}),(0,t.jsx)("li",{children:'tmux detects "XTerm(" in response and enables TTYC_MS capability'}),(0,t.jsx)("li",{children:"OSC 52 sequences now flow: tmux → WebSocket → xterm.js → navigator.clipboard"}),(0,t.jsx)("li",{children:(0,t.jsx)("strong",{className:"text-[var(--color-accent-green)]",children:"Clipboard works without iTerm2!"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"Architecture Changes"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Old:"})," Browser → ttyd (iframe) → tmux"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"New:"})," Browser → Custom WebSocket (node-pty) → tmux"]}),(0,t.jsx)("li",{children:"Bypasses ttyd for direct control over terminal initialization"}),(0,t.jsx)("li",{children:"Full control over escape sequence handling and capabilities"})]})]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"⚠️ Node Version Requirement"}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,t.jsx)("div",{className:"rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-4",children:(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-orange)]",children:"CRITICAL: This implementation requires Node 20.x (currently 20.20.0)"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"Why Node 20?"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:(0,t.jsx)("strong",{children:"node-pty 1.1.0 is incompatible with Node 25+"})}),(0,t.jsxs)("li",{children:["Error on Node 25.6.1:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"posix_spawnp failed"})]}),(0,t.jsx)("li",{children:"Root cause: node-pty's native module (darwin-arm64 prebuild) fails to spawn processes on Node 25"}),(0,t.jsx)("li",{children:"No darwin-arm64 prebuilds available that work with Node 25"}),(0,t.jsx)("li",{children:"Building from source also fails with the same error"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"When Can We Upgrade?"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 1:"})," Wait for node-pty 1.2.0 stable release with Node 25+ support"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 2:"})," Test node-pty beta versions (currently 1.2.0-beta.11)"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 3:"})," Switch to alternative PTY library (e.g., xterm-pty, node-child-pty)"]})]})]}),(0,t.jsxs)("div",{className:"rounded-[2px] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"⚡ Testing Instructions for Upgrades"}),(0,t.jsx)("p",{className:"mb-2 text-[var(--color-text-secondary)]",children:"Before upgrading Node or node-pty:"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-xs text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["Test node-pty directly:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"node -e \"const pty = require('node-pty'); pty.spawn('/bin/bash', [], {})\""})]}),(0,t.jsxs)("li",{children:["If no"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"posix_spawnp failed"})," ","error, proceed"]}),(0,t.jsx)("li",{children:"Start dev servers and open this page"}),(0,t.jsx)("li",{children:"Test DirectTerminal: verify connection, clipboard, resize"}),(0,t.jsx)("li",{children:"Test multiple sessions to ensure stability"}),(0,t.jsx)("li",{children:"If all tests pass, upgrade is safe"})]})]})]})]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("button",{onClick:()=>c(!a),className:"rounded-[2px] bg-[var(--color-accent-blue)] px-4 py-2 text-sm font-semibold text-white transition-opacity hover:opacity-80",children:[a?"Hide":"Show"," Side-by-Side Comparison"]}),(0,t.jsx)("span",{className:"text-sm text-[var(--color-text-secondary)]",children:"Compare old (ttyd iframe) vs new (DirectTerminal with XDA)"})]}),u===b&&(0,t.jsxs)("div",{className:"mt-2 rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["⚠️ Using same session for both terminals. To avoid port conflicts, use different sessions:",(0,t.jsx)("code",{className:"ml-1 rounded-[2px] bg-black px-1",children:"?old_session=ao-orchestrator&new_session=ao-20"})]})]}),a&&(0,t.jsxs)("section",{className:"mb-8",children:[(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"rounded-[2px] bg-[var(--color-accent-red)] px-2 py-1 text-xs font-semibold text-white",children:"OLD"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--color-text-primary)]",children:"ttyd iframe (no XDA)"})]}),(0,t.jsxs)("div",{className:"mb-2 rounded bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["❌ Clipboard requires iTerm2 attached",(0,t.jsx)("br",{}),"✅ Battle-tested (ttyd)",(0,t.jsx)("br",{}),"❌ No control over capabilities"]}),(0,t.jsx)(o,{sessionId:u})]}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"rounded-[2px] bg-[var(--color-accent-green)] px-2 py-1 text-xs font-semibold text-white",children:"NEW"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--color-text-primary)]",children:"DirectTerminal (with XDA)"})]}),(0,t.jsxs)("div",{className:"mb-2 rounded bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["✅ Clipboard works standalone",(0,t.jsx)("br",{}),"✅ Full control over terminal",(0,t.jsx)("br",{}),"⚠️ Requires Node 20.x (node-pty)"]}),(0,t.jsx)(i,{sessionId:b,tmuxName:b})]})]}),(0,t.jsxs)("div",{className:"mt-4 rounded-[2px] border border-[var(--color-accent-blue)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 text-sm font-semibold text-[var(--color-text-primary)]",children:"\uD83E\uDDEA How to Test Clipboard"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"Drag-select text in BOTH terminals above"}),(0,t.jsx)("li",{children:"Press Cmd+C (macOS) or Ctrl+Shift+C (Linux/Windows)"}),(0,t.jsx)("li",{children:"Paste in another application (Notes, VS Code, etc.)"}),(0,t.jsx)("li",{children:(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Expected: RIGHT terminal works, LEFT may not (unless iTerm2 is attached)"})})]})]})]}),(0,t.jsxs)("section",{className:"rounded-[2px] border border-[var(--color-accent)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDD2C The Debugging Journey"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsx)("div",{className:"rounded-[2px] bg-[var(--color-bg-tertiary)] p-4",children:(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-red)]",children:"Total Time Wasted: 12+ hours across Feb 15-16, 2026"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"❌ What We Tried (That Didn't Work)"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Suspected ttyd clipboard handling"})," - Spent hours analyzing ttyd source code, checking OSC 52 passthrough. ttyd was innocent - it passes escape sequences correctly."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Blamed xterm.js configuration"})," - Tried every possible xterm.js option, clipboard addon configurations, terminal type settings. None made a difference."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Investigated macOS clipboard permissions"})," - Checked browser permissions, sandbox attributes, navigator.clipboard API. All were correct."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Suspected WebSocket encoding issues"})," - Checked binary vs text mode, UTF-8 encoding, base64 handling. All correct."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Tried force-enabling tmux clipboard"})," - Used"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"set-option -s set-clipboard on"})," ","in tmux.conf. Didn't help - tmux needs the terminal to declare support."]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83D\uDCA1 The Breakthrough"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"What finally worked:"})," Registering an XDA (Extended Device Attributes) handler in xterm.js using"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"terminal.parser.registerCsiHandler()"})]}),(0,t.jsx)("pre",{className:"mt-2 overflow-x-auto rounded-[2px] bg-black p-3 text-xs",children:(0,t.jsx)("code",{className:"text-[var(--color-accent-green)]",children:'terminal.parser.registerCsiHandler(\n { prefix: ">", final: "q" },\n () => {\n terminal.write("\\x1bP>|XTerm(370)\\x1b\\\\");\n return true;\n }\n);'})}),(0,t.jsx)("p",{className:"mt-2",children:"This single handler made tmux recognize our terminal as clipboard-capable. Clipboard immediately started working."})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83C\uDFAF How We Finally Figured It Out"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Deep-dive into tmux source code"})," - Used DeepWiki.com to analyze tmux's terminal capability detection logic in"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty-keys.c"})," and"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty.c"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Discovered XDA queries"})," - Found that tmux sends"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"CSI > q"})," (XTVERSION) to detect terminal type"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:'Traced the "iTerm2 magic"'})," - Realized why clipboard worked when iTerm2 was attached: iTerm2 responds to XDA queries, enabling clipboard for the entire tmux session"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Checked xterm.js implementation"})," - Found that XDA is marked as TODO in xterm.js tests:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"test.skip('CSI > Ps q - Report xterm name and version (XTVERSION)')"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Implemented custom handler"})," - Used xterm.js parser API to register our own XDA handler"]})]})]}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"⚡ How We Could Have Figured It Out Faster"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Start with tmux source code first"})," - Instead of debugging xterm.js and ttyd, we should have immediately checked how tmux detects terminal capabilities"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Monitor escape sequences"})," - Running"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tmux -vvv"})," or using a terminal protocol analyzer would have revealed the XDA queries being sent"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Compare working vs broken scenarios"})," - Should have captured and diffed the escape sequences when iTerm2 was attached vs not attached earlier"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Check xterm.js issues/limitations first"}),' - A GitHub search for "xterm.js XDA" or "xterm.js device attributes" would have revealed it\'s unimplemented']}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Read tmux documentation on terminal types"})," - tmux man page mentions terminal capability detection, but we focused on clipboard settings instead"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83D\uDCDA Key Resources"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1",children:[(0,t.jsx)("li",{children:"tmux source analysis: DeepWiki.com (Feb 15, 2026)"}),(0,t.jsx)("li",{children:"xterm.js parser API documentation"}),(0,t.jsx)("li",{children:"XTerm Control Sequences: XTVERSION / Device Attributes"}),(0,t.jsxs)("li",{children:["tmux ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty-keys.c"}),": Terminal type detection logic"]})]})]})]})]}),(0,t.jsxs)("section",{className:"mt-6 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDCC1 Implementation Files"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/src/components/DirectTerminal.tsx"})," ","- Main component with XDA handler"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/server/direct-terminal-ws.ts"})," ","- WebSocket server using node-pty"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/src/app/dev/terminal-test/page.tsx"})," ","- This test page"]})]})]}),(0,t.jsxs)("div",{className:"mt-8 border-t border-[var(--color-border-default)] pt-4 text-center text-xs text-[var(--color-text-secondary)]",children:[(0,t.jsx)("p",{children:"Investigation: Feb 15-16, 2026 • Duration: 12+ hours • Status: ✅ Resolved"}),(0,t.jsx)("p",{className:"mt-1",children:"Node 20.20.0 • node-pty 1.1.0 • xterm.js 5.3.0"})]})]})})}function x(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:"Loading..."}),children:(0,t.jsx)(d,{})})}},5468:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,r){for(var s in r)Object.defineProperty(e,s,{enumerable:!0,get:r[s]})}(r,{bindSnapshot:function(){return l},createAsyncLocalStorage:function(){return n},createSnapshot:function(){return i}});let s=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class t{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let a="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function n(){return a?new a:new t}function l(e){return a?a.bind(e):t.bind(e)}function i(){return a?a.snapshot():function(e,...r){return e(...r)}}},5864:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let t=s(3817),a=s(6749),n=s(6943);function l(e){return{default:e&&"default"in e?e.default:e}}s(6418);let i={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},o=function(e){let r={...i,...e},s=(0,a.lazy)(()=>r.loader().then(l)),o=r.loading;function c(e){let l=o?(0,t.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!r.ssr||!!r.loading,c=i?a.Suspense:a.Fragment,d=r.ssr?(0,t.jsxs)(t.Fragment,{children:[null,(0,t.jsx)(s,{...e})]}):(0,t.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,t.jsx)(s,{...e})});return(0,t.jsx)(c,{...i?{fallback:l}:{},children:d})}return c.displayName="LoadableComponent",c}},6313:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return t.workAsyncStorageInstance}});let t=s(8394)},6418:(e,r,s)=>{"use strict";function t(e){let{moduleIds:r}=e;return null}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return t}}),s(3817),s(4768),s(6313),s(5152)},6943:(e,r,s)=>{"use strict";function t(e){let{reason:r,children:s}=e;return s}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return t}}),s(1763)},7594:(e,r,s)=>{"use strict";var t=s(9582);s.o(t,"useParams")&&s.d(r,{useParams:function(){return t.useParams}}),s.o(t,"usePathname")&&s.d(r,{usePathname:function(){return t.usePathname}}),s.o(t,"useRouter")&&s.d(r,{useRouter:function(){return t.useRouter}}),s.o(t,"useSearchParams")&&s.d(r,{useSearchParams:function(){return t.useSearchParams}})},8394:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return t}});let t=(0,s(5468).createAsyncLocalStorage)()},9891:(e,r,s)=>{"use strict";s.d(r,{default:()=>a.a});var t=s(1712),a=s.n(t)},9937:(e,r,s)=>{Promise.resolve().then(s.bind(s,4255))}},e=>{e.O(0,[131,1461,7358],()=>e(e.s=9937)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9170],{438:(e,r,s)=>{Promise.resolve().then(s.bind(s,4255))},1712:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let t=s(1903)._(s(5864));function a(e,r){var s;let a={};"function"==typeof e&&(a.loader=e);let n={...a,...r};return(0,t.default)({...n,modules:null==(s=n.loadableGenerated)?void 0:s.modules})}("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),e.exports=r.default)},4255:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>x,dynamic:()=>c});var t=s(3817),a=s(9891),n=s(7594),l=s(6749);let i=(0,a.default)(()=>Promise.all([s.e(8944),s.e(3764),s.e(1654)]).then(s.bind(s,3764)).then(e=>({default:e.DirectTerminal})),{loadableGenerated:{webpack:()=>[3764]},ssr:!1}),o=(0,a.default)(()=>s.e(7317).then(s.bind(s,7317)).then(e=>({default:e.Terminal})),{loadableGenerated:{webpack:()=>[7317]},ssr:!1}),c="force-dynamic";function d(){let e=(0,n.useSearchParams)(),[r,s]=(0,l.useState)([]),[a,c]=(0,l.useState)(!0);(0,l.useEffect)(()=>{fetch("/api/sessions?active=true").then(e=>e.json()).then(e=>{e.sessions&&Array.isArray(e.sessions)&&s(e.sessions.map(e=>e.id))}).catch(e=>{console.error("Failed to fetch sessions:",e)})},[]);let d=e.get("session"),x=e.get("old_session"),m=e.get("new_session"),h=r[0]||"ao-orchestrator",p=r[1]||r[0]||"ao-orchestrator",u=x||d||h,b=m||d||p;return(0,t.jsx)("div",{className:"min-h-screen bg-[var(--color-bg-primary)] p-8",children:(0,t.jsxs)("div",{className:"mx-auto max-w-7xl",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"mb-2 text-3xl font-bold text-[var(--color-text-primary)]",children:"Terminal Implementation Test & Documentation"}),(0,t.jsxs)("p",{className:"text-sm text-[var(--color-text-muted)]",children:["Comparing sessions:",(0,t.jsxs)("span",{className:"ml-2 font-mono text-[var(--color-accent-red)]",children:["OLD: ",u]}),(0,t.jsxs)("span",{className:"ml-2 font-mono text-[var(--color-accent-green)]",children:["NEW: ",b]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDC1B The Problem"}),(0,t.jsxs)("div",{className:"space-y-3 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Issue:"})," Browser clipboard (Cmd+C/Ctrl+C) only worked when an iTerm2 client was attached to the tmux session."]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Impact:"})," Users had to keep iTerm2 tabs open in the background for clipboard to work in the web dashboard."]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Investigation time:"})," 12+ hours of debugging across tmux, ttyd, xterm.js, and macOS clipboard systems."]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDD0D Root Cause Analysis"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"1. How tmux Clipboard Works (OSC 52)"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"tmux uses OSC 52 escape sequences to synchronize clipboard with terminals"}),(0,t.jsxs)("li",{children:["Format:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"\\x1b]52;c;<base64>\\x07"})]}),(0,t.jsx)("li",{children:"Terminal must support OSC 52 and have proper capabilities declared"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"2. tmux Capability Detection (XDA)"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"tmux queries terminal capabilities using Device Attributes (DA/XDA)"}),(0,t.jsxs)("li",{children:["XDA query: ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"CSI > q"})," ","(also called XTVERSION)"]}),(0,t.jsx)("li",{children:'Terminal responds with identification string containing terminal type (e.g., "XTerm(370)", "iTerm2 ")'}),(0,t.jsx)("li",{children:"Based on response, tmux enables features like TTYC_MS (clipboard support)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"3. The Missing Piece"}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-accent-red)] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-red)]",children:"xterm.js does NOT implement XDA (Extended Device Attributes)"}),(0,t.jsxs)("ul",{className:"ml-6 mt-2 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["XDA is marked as TODO in xterm.js codebase:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"test.skip('CSI > Ps q - Report xterm name and version (XTVERSION)')"})]}),(0,t.jsx)("li",{children:"Without XDA response, tmux doesn't recognize the terminal as clipboard-capable"}),(0,t.jsx)("li",{children:"tmux never emits OSC 52 sequences → clipboard doesn't work"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:'4. Why iTerm2 "Fixed" It'}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["iTerm2 sends proper XDA response identifying itself as"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:'"iTerm2 "'})]}),(0,t.jsx)("li",{children:"tmux detects this and enables clipboard for the entire session"}),(0,t.jsx)("li",{children:"OSC 52 sequences are then sent to ALL clients, including browser (ttyd/xterm.js)"}),(0,t.jsx)("li",{children:'This is why clipboard "magically worked" when iTerm2 was attached'})]})]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"✅ The Solution"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"DirectTerminal Implementation"}),(0,t.jsx)("p",{className:"mb-2 text-[var(--color-text-secondary)]",children:"Created custom terminal component that registers an XDA handler using xterm.js parser API:"}),(0,t.jsx)("pre",{className:"overflow-x-auto rounded-[2px] bg-black p-4 text-xs",children:(0,t.jsx)("code",{className:"text-[var(--color-accent-green)]",children:'terminal.parser.registerCsiHandler(\n { prefix: ">", final: "q" }, // CSI > q is XDA query\n () => {\n // Respond with XTerm identification\n terminal.write("\\x1bP>|XTerm(370)\\x1b\\\\");\n return true;\n }\n);'})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"What This Does"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"Intercepts XDA queries from tmux"}),(0,t.jsxs)("li",{children:["Responds with"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"XTerm(370)"})," ","identification"]}),(0,t.jsx)("li",{children:'tmux detects "XTerm(" in response and enables TTYC_MS capability'}),(0,t.jsx)("li",{children:"OSC 52 sequences now flow: tmux → WebSocket → xterm.js → navigator.clipboard"}),(0,t.jsx)("li",{children:(0,t.jsx)("strong",{className:"text-[var(--color-accent-green)]",children:"Clipboard works without iTerm2!"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"Architecture Changes"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Old:"})," Browser → ttyd (iframe) → tmux"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"New:"})," Browser → Custom WebSocket (node-pty) → tmux"]}),(0,t.jsx)("li",{children:"Bypasses ttyd for direct control over terminal initialization"}),(0,t.jsx)("li",{children:"Full control over escape sequence handling and capabilities"})]})]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"⚠️ Node Version Requirement"}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,t.jsx)("div",{className:"rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-4",children:(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-orange)]",children:"CRITICAL: This implementation requires Node 20.x (currently 20.20.0)"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"Why Node 20?"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:(0,t.jsx)("strong",{children:"node-pty 1.1.0 is incompatible with Node 25+"})}),(0,t.jsxs)("li",{children:["Error on Node 25.6.1:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"posix_spawnp failed"})]}),(0,t.jsx)("li",{children:"Root cause: node-pty's native module (darwin-arm64 prebuild) fails to spawn processes on Node 25"}),(0,t.jsx)("li",{children:"No darwin-arm64 prebuilds available that work with Node 25"}),(0,t.jsx)("li",{children:"Building from source also fails with the same error"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"When Can We Upgrade?"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 1:"})," Wait for node-pty 1.2.0 stable release with Node 25+ support"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 2:"})," Test node-pty beta versions (currently 1.2.0-beta.11)"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 3:"})," Switch to alternative PTY library (e.g., xterm-pty, node-child-pty)"]})]})]}),(0,t.jsxs)("div",{className:"rounded-[2px] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"⚡ Testing Instructions for Upgrades"}),(0,t.jsx)("p",{className:"mb-2 text-[var(--color-text-secondary)]",children:"Before upgrading Node or node-pty:"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-xs text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["Test node-pty directly:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"node -e \"const pty = require('node-pty'); pty.spawn('/bin/bash', [], {})\""})]}),(0,t.jsxs)("li",{children:["If no"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"posix_spawnp failed"})," ","error, proceed"]}),(0,t.jsx)("li",{children:"Start dev servers and open this page"}),(0,t.jsx)("li",{children:"Test DirectTerminal: verify connection, clipboard, resize"}),(0,t.jsx)("li",{children:"Test multiple sessions to ensure stability"}),(0,t.jsx)("li",{children:"If all tests pass, upgrade is safe"})]})]})]})]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("button",{onClick:()=>c(!a),className:"rounded-[2px] bg-[var(--color-accent-blue)] px-4 py-2 text-sm font-semibold text-white transition-opacity hover:opacity-80",children:[a?"Hide":"Show"," Side-by-Side Comparison"]}),(0,t.jsx)("span",{className:"text-sm text-[var(--color-text-secondary)]",children:"Compare old (ttyd iframe) vs new (DirectTerminal with XDA)"})]}),u===b&&(0,t.jsxs)("div",{className:"mt-2 rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["⚠️ Using same session for both terminals. To avoid port conflicts, use different sessions:",(0,t.jsx)("code",{className:"ml-1 rounded-[2px] bg-black px-1",children:"?old_session=ao-orchestrator&new_session=ao-20"})]})]}),a&&(0,t.jsxs)("section",{className:"mb-8",children:[(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"rounded-[2px] bg-[var(--color-accent-red)] px-2 py-1 text-xs font-semibold text-white",children:"OLD"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--color-text-primary)]",children:"ttyd iframe (no XDA)"})]}),(0,t.jsxs)("div",{className:"mb-2 rounded bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["❌ Clipboard requires iTerm2 attached",(0,t.jsx)("br",{}),"✅ Battle-tested (ttyd)",(0,t.jsx)("br",{}),"❌ No control over capabilities"]}),(0,t.jsx)(o,{sessionId:u})]}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"rounded-[2px] bg-[var(--color-accent-green)] px-2 py-1 text-xs font-semibold text-white",children:"NEW"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--color-text-primary)]",children:"DirectTerminal (with XDA)"})]}),(0,t.jsxs)("div",{className:"mb-2 rounded bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["✅ Clipboard works standalone",(0,t.jsx)("br",{}),"✅ Full control over terminal",(0,t.jsx)("br",{}),"⚠️ Requires Node 20.x (node-pty)"]}),(0,t.jsx)(i,{sessionId:b,tmuxName:b})]})]}),(0,t.jsxs)("div",{className:"mt-4 rounded-[2px] border border-[var(--color-accent-blue)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 text-sm font-semibold text-[var(--color-text-primary)]",children:"\uD83E\uDDEA How to Test Clipboard"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"Drag-select text in BOTH terminals above"}),(0,t.jsx)("li",{children:"Press Cmd+C (macOS) or Ctrl+Shift+C (Linux/Windows)"}),(0,t.jsx)("li",{children:"Paste in another application (Notes, VS Code, etc.)"}),(0,t.jsx)("li",{children:(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Expected: RIGHT terminal works, LEFT may not (unless iTerm2 is attached)"})})]})]})]}),(0,t.jsxs)("section",{className:"rounded-[2px] border border-[var(--color-accent)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDD2C The Debugging Journey"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsx)("div",{className:"rounded-[2px] bg-[var(--color-bg-tertiary)] p-4",children:(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-red)]",children:"Total Time Wasted: 12+ hours across Feb 15-16, 2026"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"❌ What We Tried (That Didn't Work)"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Suspected ttyd clipboard handling"})," - Spent hours analyzing ttyd source code, checking OSC 52 passthrough. ttyd was innocent - it passes escape sequences correctly."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Blamed xterm.js configuration"})," - Tried every possible xterm.js option, clipboard addon configurations, terminal type settings. None made a difference."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Investigated macOS clipboard permissions"})," - Checked browser permissions, sandbox attributes, navigator.clipboard API. All were correct."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Suspected WebSocket encoding issues"})," - Checked binary vs text mode, UTF-8 encoding, base64 handling. All correct."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Tried force-enabling tmux clipboard"})," - Used"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"set-option -s set-clipboard on"})," ","in tmux.conf. Didn't help - tmux needs the terminal to declare support."]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83D\uDCA1 The Breakthrough"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"What finally worked:"})," Registering an XDA (Extended Device Attributes) handler in xterm.js using"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"terminal.parser.registerCsiHandler()"})]}),(0,t.jsx)("pre",{className:"mt-2 overflow-x-auto rounded-[2px] bg-black p-3 text-xs",children:(0,t.jsx)("code",{className:"text-[var(--color-accent-green)]",children:'terminal.parser.registerCsiHandler(\n { prefix: ">", final: "q" },\n () => {\n terminal.write("\\x1bP>|XTerm(370)\\x1b\\\\");\n return true;\n }\n);'})}),(0,t.jsx)("p",{className:"mt-2",children:"This single handler made tmux recognize our terminal as clipboard-capable. Clipboard immediately started working."})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83C\uDFAF How We Finally Figured It Out"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Deep-dive into tmux source code"})," - Used DeepWiki.com to analyze tmux's terminal capability detection logic in"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty-keys.c"})," and"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty.c"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Discovered XDA queries"})," - Found that tmux sends"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"CSI > q"})," (XTVERSION) to detect terminal type"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:'Traced the "iTerm2 magic"'})," - Realized why clipboard worked when iTerm2 was attached: iTerm2 responds to XDA queries, enabling clipboard for the entire tmux session"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Checked xterm.js implementation"})," - Found that XDA is marked as TODO in xterm.js tests:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"test.skip('CSI > Ps q - Report xterm name and version (XTVERSION)')"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Implemented custom handler"})," - Used xterm.js parser API to register our own XDA handler"]})]})]}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"⚡ How We Could Have Figured It Out Faster"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Start with tmux source code first"})," - Instead of debugging xterm.js and ttyd, we should have immediately checked how tmux detects terminal capabilities"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Monitor escape sequences"})," - Running"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tmux -vvv"})," or using a terminal protocol analyzer would have revealed the XDA queries being sent"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Compare working vs broken scenarios"})," - Should have captured and diffed the escape sequences when iTerm2 was attached vs not attached earlier"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Check xterm.js issues/limitations first"}),' - A GitHub search for "xterm.js XDA" or "xterm.js device attributes" would have revealed it\'s unimplemented']}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Read tmux documentation on terminal types"})," - tmux man page mentions terminal capability detection, but we focused on clipboard settings instead"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83D\uDCDA Key Resources"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1",children:[(0,t.jsx)("li",{children:"tmux source analysis: DeepWiki.com (Feb 15, 2026)"}),(0,t.jsx)("li",{children:"xterm.js parser API documentation"}),(0,t.jsx)("li",{children:"XTerm Control Sequences: XTVERSION / Device Attributes"}),(0,t.jsxs)("li",{children:["tmux ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty-keys.c"}),": Terminal type detection logic"]})]})]})]})]}),(0,t.jsxs)("section",{className:"mt-6 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDCC1 Implementation Files"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/src/components/DirectTerminal.tsx"})," ","- Main component with XDA handler"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/server/direct-terminal-ws.ts"})," ","- WebSocket server using node-pty"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/src/app/dev/terminal-test/page.tsx"})," ","- This test page"]})]})]}),(0,t.jsxs)("div",{className:"mt-8 border-t border-[var(--color-border-default)] pt-4 text-center text-xs text-[var(--color-text-secondary)]",children:[(0,t.jsx)("p",{children:"Investigation: Feb 15-16, 2026 • Duration: 12+ hours • Status: ✅ Resolved"}),(0,t.jsx)("p",{className:"mt-1",children:"Node 20.20.0 • node-pty 1.1.0 • xterm.js 5.3.0"})]})]})})}function x(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:"Loading..."}),children:(0,t.jsx)(d,{})})}},5468:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,r){for(var s in r)Object.defineProperty(e,s,{enumerable:!0,get:r[s]})}(r,{bindSnapshot:function(){return l},createAsyncLocalStorage:function(){return n},createSnapshot:function(){return i}});let s=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class t{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let a="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function n(){return a?new a:new t}function l(e){return a?a.bind(e):t.bind(e)}function i(){return a?a.snapshot():function(e,...r){return e(...r)}}},5864:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let t=s(3817),a=s(6749),n=s(6943);function l(e){return{default:e&&"default"in e?e.default:e}}s(6418);let i={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},o=function(e){let r={...i,...e},s=(0,a.lazy)(()=>r.loader().then(l)),o=r.loading;function c(e){let l=o?(0,t.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!r.ssr||!!r.loading,c=i?a.Suspense:a.Fragment,d=r.ssr?(0,t.jsxs)(t.Fragment,{children:[null,(0,t.jsx)(s,{...e})]}):(0,t.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,t.jsx)(s,{...e})});return(0,t.jsx)(c,{...i?{fallback:l}:{},children:d})}return c.displayName="LoadableComponent",c}},6313:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return t.workAsyncStorageInstance}});let t=s(8394)},6418:(e,r,s)=>{"use strict";function t(e){let{moduleIds:r}=e;return null}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return t}}),s(3817),s(4768),s(6313),s(5152)},6943:(e,r,s)=>{"use strict";function t(e){let{reason:r,children:s}=e;return s}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return t}}),s(1763)},7594:(e,r,s)=>{"use strict";var t=s(9582);s.o(t,"useParams")&&s.d(r,{useParams:function(){return t.useParams}}),s.o(t,"usePathname")&&s.d(r,{usePathname:function(){return t.usePathname}}),s.o(t,"useRouter")&&s.d(r,{useRouter:function(){return t.useRouter}}),s.o(t,"useSearchParams")&&s.d(r,{useSearchParams:function(){return t.useSearchParams}})},8394:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return t}});let t=(0,s(5468).createAsyncLocalStorage)()},9891:(e,r,s)=>{"use strict";s.d(r,{default:()=>a.a});var t=s(1712),a=s.n(t)}},e=>{e.O(0,[131,1461,7358],()=>e(e.s=438)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8039],{3464:(r,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>s});var a=o(3817),t=o(7594),l=o(6749),n=o(9789);function s(r){let{error:e,reset:o}=r,s=(0,t.useRouter)();return(0,l.useEffect)(()=>{console.error(e)},[e]),(0,a.jsx)(n.ErrorDisplay,{title:"Something went wrong",message:"The dashboard hit an unexpected error. Try reloading the route data or head back to the main dashboard.",tone:"warning",primaryAction:{label:"Try again",onClick:()=>{o(),s.refresh()}},secondaryAction:{label:"Back to dashboard",href:"/"},error:e,compact:!0,chrome:"card"})}},5308:(r,e,o)=>{Promise.resolve().then(o.bind(o,3464))},7594:(r,e,o)=>{"use strict";var a=o(9582);o.o(a,"useParams")&&o.d(e,{useParams:function(){return a.useParams}}),o.o(a,"usePathname")&&o.d(e,{usePathname:function(){return a.usePathname}}),o.o(a,"useRouter")&&o.d(e,{useRouter:function(){return a.useRouter}}),o.o(a,"useSearchParams")&&o.d(e,{useSearchParams:function(){return a.useSearchParams}})},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var a=o(3817),t=o(8713),l=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,a.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,a.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,a.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,a.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,a.jsx)(l(),{href:e.href,className:t,style:n,children:e.label}):(0,a.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:l="Technical details",error:i,primaryAction:d,secondaryAction:u,compact:x=!1,chrome:m="page",children:b}=r,v=n[t],h=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,a.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(x?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,a.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,a.jsx)(s,{accent:v.accent}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,a.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,a.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||u)&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,a.jsx)(c,{action:d,primary:!0}):null,u?(0,a.jsx)(c,{action:u}):null]}),b,h?(0,a.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,a.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:l}),(0,a.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,a.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,a.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,a.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=5308)),_N_E=r.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8039],{3464:(r,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>s});var a=o(3817),t=o(7594),l=o(6749),n=o(9789);function s(r){let{error:e,reset:o}=r,s=(0,t.useRouter)();return(0,l.useEffect)(()=>{console.error(e)},[e]),(0,a.jsx)(n.ErrorDisplay,{title:"Something went wrong",message:"The dashboard hit an unexpected error. Try reloading the route data or head back to the main dashboard.",tone:"warning",primaryAction:{label:"Try again",onClick:()=>{o(),s.refresh()}},secondaryAction:{label:"Back to dashboard",href:"/"},error:e,compact:!0,chrome:"card"})}},7557:(r,e,o)=>{Promise.resolve().then(o.bind(o,3464))},7594:(r,e,o)=>{"use strict";var a=o(9582);o.o(a,"useParams")&&o.d(e,{useParams:function(){return a.useParams}}),o.o(a,"usePathname")&&o.d(e,{usePathname:function(){return a.usePathname}}),o.o(a,"useRouter")&&o.d(e,{useRouter:function(){return a.useRouter}}),o.o(a,"useSearchParams")&&o.d(e,{useSearchParams:function(){return a.useSearchParams}})},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var a=o(3817),t=o(8713),l=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,a.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,a.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,a.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,a.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,a.jsx)(l(),{href:e.href,className:t,style:n,children:e.label}):(0,a.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:l="Technical details",error:i,primaryAction:d,secondaryAction:u,compact:x=!1,chrome:m="page",children:b}=r,v=n[t],h=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,a.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(x?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,a.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,a.jsx)(s,{accent:v.accent}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,a.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,a.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||u)&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,a.jsx)(c,{action:d,primary:!0}):null,u?(0,a.jsx)(c,{action:u}):null]}),b,h?(0,a.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,a.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:l}),(0,a.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,a.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,a.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,a.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=7557)),_N_E=r.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{7494:(r,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>n});var l=o(3817),t=o(6749),a=o(9789);function n(r){let{error:e,reset:o}=r;return(0,t.useEffect)(()=>{console.error(e)},[e]),(0,l.jsx)("html",{lang:"en",className:"dark",children:(0,l.jsx)("body",{className:"bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased",children:(0,l.jsx)(a.ErrorDisplay,{title:"Something broke at the app shell",message:"The dashboard could not recover from this error at the layout level. Try again first, then reload the page if it still fails.",tone:"error",primaryAction:{label:"Try again",onClick:o},secondaryAction:{label:"Reload page",onClick:()=>window.location.reload()},error:e})})})}},7930:(r,e,o)=>{Promise.resolve().then(o.bind(o,7494))},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var l=o(3817),t=o(8713),a=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,l.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,l.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,l.jsx)(a(),{href:e.href,className:t,style:n,children:e.label}):(0,l.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:a="Technical details",error:i,primaryAction:d,secondaryAction:x,compact:b=!1,chrome:m="page",children:u}=r,v=n[t],p=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,l.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(b?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,l.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,l.jsx)(s,{accent:v.accent}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,l.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,l.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||x)&&(0,l.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,l.jsx)(c,{action:d,primary:!0}):null,x?(0,l.jsx)(c,{action:x}):null]}),u,p?(0,l.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,l.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:a}),(0,l.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,l.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,l.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,l.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=7930)),_N_E=r.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{5857:(r,e,o)=>{Promise.resolve().then(o.bind(o,7494))},7494:(r,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>n});var l=o(3817),t=o(6749),a=o(9789);function n(r){let{error:e,reset:o}=r;return(0,t.useEffect)(()=>{console.error(e)},[e]),(0,l.jsx)("html",{lang:"en",className:"dark",children:(0,l.jsx)("body",{className:"bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased",children:(0,l.jsx)(a.ErrorDisplay,{title:"Something broke at the app shell",message:"The dashboard could not recover from this error at the layout level. Try again first, then reload the page if it still fails.",tone:"error",primaryAction:{label:"Try again",onClick:o},secondaryAction:{label:"Reload page",onClick:()=>window.location.reload()},error:e})})})}},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var l=o(3817),t=o(8713),a=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,l.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,l.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,l.jsx)(a(),{href:e.href,className:t,style:n,children:e.label}):(0,l.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:a="Technical details",error:i,primaryAction:d,secondaryAction:x,compact:b=!1,chrome:m="page",children:u}=r,v=n[t],p=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,l.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(b?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,l.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,l.jsx)(s,{accent:v.accent}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,l.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,l.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||x)&&(0,l.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,l.jsx)(c,{action:d,primary:!0}):null,x?(0,l.jsx)(c,{action:x}):null]}),u,p?(0,l.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,l.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:a}),(0,l.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,l.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,l.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,l.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=5857)),_N_E=r.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2922,2985,3675,4209,4587,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2922,2985,3675,4209,4587,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2922,2985,3675,4209,4587,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1012:(e,t,r)=>{"use strict";r.d(t,{Providers:()=>s});var n=r(3817),o=r(2286),c=r(5184);function s(e){let{children:t}=e;return(0,n.jsx)(o.N,{attribute:"class",defaultTheme:"dark",enableSystem:!1,children:(0,n.jsx)(c.i2,{children:t})})}},2286:(e,t,r)=>{"use strict";r.d(t,{D:()=>u,N:()=>d});var n=r(6749),o=(e,t,r,n,o,c,s,a)=>{let i=document.documentElement,l=["light","dark"];function u(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&c?o.map(e=>c[e]||e):o;r?(i.classList.remove(...n),i.classList.add(c&&c[t]?c[t]:t)):i.setAttribute(e,t)}),r=t,a&&l.includes(r)&&(i.style.colorScheme=r)}if(n)u(n);else try{let e=localStorage.getItem(t)||r,n=s&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(n)}catch(e){}},c=["light","dark"],s="(prefers-color-scheme: dark)",a="undefined"==typeof window,i=n.createContext(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!=(e=n.useContext(i))?e:l},d=e=>n.useContext(i)?n.createElement(n.Fragment,null,e.children):n.createElement(f,{...e}),m=["light","dark"],f=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:o=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:u=m,defaultTheme:d=o?"system":"light",attribute:f="data-theme",value:g,children:b,nonce:S,scriptProps:w}=e,[k,E]=n.useState(()=>p(l,d)),[x,P]=n.useState(()=>"system"===k?v():k),T=g?Object.values(g):u,C=n.useCallback(e=>{let t=e;if(!t)return;"system"===e&&o&&(t=v());let n=g?g[t]:t,s=r?y(S):null,i=document.documentElement,l=e=>{"class"===e?(i.classList.remove(...T),n&&i.classList.add(n)):e.startsWith("data-")&&(n?i.setAttribute(e,n):i.removeAttribute(e))};if(Array.isArray(f)?f.forEach(l):l(f),a){let e=c.includes(d)?d:null,r=c.includes(t)?t:e;i.style.colorScheme=r}null==s||s()},[S]),N=n.useCallback(e=>{let t="function"==typeof e?e(k):e;E(t);try{localStorage.setItem(l,t)}catch(e){}},[k]),M=n.useCallback(e=>{P(v(e)),"system"===k&&o&&!t&&C("system")},[k,t]);n.useEffect(()=>{let e=window.matchMedia(s);return e.addListener(M),M(e),()=>e.removeListener(M)},[M]),n.useEffect(()=>{let e=e=>{e.key===l&&(e.newValue?E(e.newValue):N(d))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[N]),n.useEffect(()=>{C(null!=t?t:k)},[t,k]);let I=n.useMemo(()=>({theme:k,setTheme:N,forcedTheme:t,resolvedTheme:"system"===k?x:k,themes:o?[...u,"system"]:u,systemTheme:o?x:void 0}),[k,N,t,x,o,u]);return n.createElement(i.Provider,{value:I},n.createElement(h,{forcedTheme:t,storageKey:l,attribute:f,enableSystem:o,enableColorScheme:a,defaultTheme:d,value:g,themes:u,nonce:S,scriptProps:w}),b)},h=n.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:c,enableSystem:s,enableColorScheme:a,defaultTheme:i,value:l,themes:u,nonce:d,scriptProps:m}=e,f=JSON.stringify([c,r,i,t,u,l,s,a]).slice(1,-1);return n.createElement("script",{...m,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?d:"",dangerouslySetInnerHTML:{__html:"(".concat(o.toString(),")(").concat(f,")")}})}),p=(e,t)=>{let r;if(!a){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},y=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},v=e=>(e||(e=window.matchMedia(s)),e.matches?"dark":"light")},2490:()=>{},4500:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,2490,23)),Promise.resolve().then(r.bind(r,1012)),Promise.resolve().then(r.bind(r,7285))},5184:(e,t,r)=>{"use strict";r.d(t,{Ug:()=>a,eT:()=>i,i2:()=>u});var n=r(3817),o=r(6749),c=r(1806);let s=o.createContext(void 0);function a(){let e=o.useContext(s);if(!e)throw Error("useMux() must be used within <MuxProvider>");return e}function i(){return o.useContext(s)}function l(e,t){return t?"".concat(t,":").concat(e):e}function u(e){let{children:t}=e,r=(0,o.useRef)(null),a=(0,o.useRef)(new Map),i=(0,o.useRef)(new Map),[u,d]=(0,o.useState)("connecting"),[m,f]=(0,o.useState)([]),[h,p]=(0,o.useState)(null),y=(0,o.useRef)(0),v=(0,o.useRef)(null),g=(0,o.useRef)({}),b=(0,o.useRef)(!1),S=(0,o.useCallback)(()=>{if(!r.current){d("connecting");try{let e=function(e){var t,r,n;let o=window.location,s="https:"===o.protocol?"wss:":"ws:",a=null!=(t=e.proxyWsPath)?t:c.env.NEXT_PUBLIC_TERMINAL_WS_PATH;if(a){let e=a.replace(/\/ws\/?$/,"");return"".concat(s,"//").concat(o.host).concat(e,"/mux")}if(""===o.port||"443"===o.port||"80"===o.port)return"".concat(s,"//").concat(o.hostname,"/ao-terminal-mux");let i=null!=(n=null!=(r=e.directTerminalPort)?r:c.env.NEXT_PUBLIC_DIRECT_TERMINAL_PORT)?n:"14801";return"".concat(s,"//").concat(o.hostname,":").concat(i,"/mux")}(g.current);console.log("[MuxProvider] Connecting to",e);let t=new WebSocket(e);r.current=t,t.addEventListener("open",()=>{if(b.current)return void t.close();for(let e of(console.log("[MuxProvider] Connected"),d("connected"),y.current=0,i.current.values())){let r={ch:"terminal",id:e.id,type:"open",...e.projectId&&{projectId:e.projectId},...e.tmuxName&&{tmuxName:e.tmuxName}};t.send(JSON.stringify(r))}t.send(JSON.stringify({ch:"subscribe",topics:["sessions"]}))}),t.addEventListener("message",e=>{try{let t=JSON.parse(e.data);if("terminal"===t.ch){let e=l(t.id,"projectId"in t?t.projectId:void 0);if("data"===t.type){let r=a.current.get(e);if(r)for(let e of r)e(t.data)}else if("opened"===t.type)i.current.has(e)||i.current.set(e,{id:t.id,..."projectId"in t&&t.projectId?{projectId:t.projectId}:{}});else if("exited"===t.type){i.current.delete(e);let r=a.current.get(e);if(r){let e="\r\n\x1b[31m[Terminal exited with code ".concat(t.code,"]\x1b[0m\r\n");for(let t of r)t(e)}}else"error"===t.type&&console.error("[MuxProvider] Terminal error for ".concat(t.id,":"),t.message)}else"sessions"===t.ch&&("snapshot"===t.type?(f(t.sessions),p(null)):"error"===t.type&&p(t.error))}catch(e){console.error("[MuxProvider] Error processing message:",e)}}),t.addEventListener("error",e=>{console.error("[MuxProvider] WebSocket error:",e)}),t.addEventListener("close",()=>{if(console.log("[MuxProvider] Disconnected"),r.current===t&&(r.current=null),b.current)return;let e=Math.min(1e3*Math.pow(2,y.current),3e4);y.current+=1,d("reconnecting"),v.current=setTimeout(()=>{console.log("[MuxProvider] Reconnecting (attempt ".concat(y.current,")...")),S()},e)})}catch(e){console.error("[MuxProvider] Failed to create WebSocket:",e),d("disconnected")}}},[]);(0,o.useEffect)(()=>{b.current=!1;let e=!1;return(async()=>{try{let e=await fetch("/api/runtime/terminal");if(e.ok){let t=await e.json();g.current={directTerminalPort:function(e){if("string"!=typeof e&&"number"!=typeof e)return;let t=Number.parseInt(String(e),10);if(Number.isInteger(t)&&!(t<=0)&&!(t>65535))return String(t)}(t.directTerminalPort),proxyWsPath:function(e){if("string"!=typeof e)return;let t=e.trim();if(t.startsWith("/"))return t}(t.proxyWsPath)}}}catch(e){}e||S()})(),()=>{var t;e=!0,b.current=!0,v.current&&clearTimeout(v.current),null==(t=r.current)||t.close()}},[S]);let w=(0,o.useCallback)((e,t,n)=>{var o;let c=l(e,n),s=a.current.get(c);if(s||(s=new Set,a.current.set(c,s)),s.add(t),!i.current.has(c)&&(null==(o=r.current)?void 0:o.readyState)===WebSocket.OPEN){let t={ch:"terminal",id:e,type:"open",...n&&{projectId:n}};r.current.send(JSON.stringify(t))}return()=>{let e=a.current.get(c);e&&(e.delete(t),0===e.size&&a.current.delete(c))}},[]),k=(0,o.useCallback)((e,t,n)=>{var o;if((null==(o=r.current)?void 0:o.readyState)===WebSocket.OPEN){let o={ch:"terminal",id:e,type:"data",data:t,...n&&{projectId:n}};r.current.send(JSON.stringify(o))}},[]),E=(0,o.useCallback)((e,t,n)=>{var o;if(i.current.set(l(e,t),{id:e,projectId:t,tmuxName:n}),(null==(o=r.current)?void 0:o.readyState)===WebSocket.OPEN){let o={ch:"terminal",id:e,type:"open",...t&&{projectId:t},...n&&{tmuxName:n}};r.current.send(JSON.stringify(o))}},[]),x=(0,o.useCallback)((e,t)=>{var n;if(i.current.delete(l(e,t)),(null==(n=r.current)?void 0:n.readyState)===WebSocket.OPEN){let n={ch:"terminal",id:e,type:"close",...t&&{projectId:t}};r.current.send(JSON.stringify(n))}},[]),P=(0,o.useCallback)((e,t,n,o)=>{var c;if((null==(c=r.current)?void 0:c.readyState)===WebSocket.OPEN){let c={ch:"terminal",id:e,type:"resize",cols:t,rows:n,...o&&{projectId:o}};r.current.send(JSON.stringify(c))}},[]),T=(0,o.useMemo)(()=>({subscribeTerminal:w,writeTerminal:k,openTerminal:E,closeTerminal:x,resizeTerminal:P,status:u,sessions:m,lastError:h}),[w,k,E,x,P,u,m,h]);return(0,n.jsx)(s.Provider,{value:T,children:t})}},7285:(e,t,r)=>{"use strict";r.d(t,{ServiceWorkerRegistrar:()=>o});var n=r(6749);function o(){return(0,n.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").catch(e=>{console.error("Service worker registration failed:",e)})},[]),null}}},e=>{e.O(0,[3906,131,1461,7358],()=>e(e.s=4500)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2922,2985,3675,4209,4587,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2922,2985,3675,4209,4587,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4345,7927],{5416:(r,e,o)=>{Promise.resolve().then(o.bind(o,9789))},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var l=o(3817),t=o(8713),a=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,l.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,l.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,l.jsx)(a(),{href:e.href,className:t,style:n,children:e.label}):(0,l.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:a="Technical details",error:i,primaryAction:d,secondaryAction:x,compact:b=!1,chrome:u="page",children:m}=r,v=n[t],p=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,l.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(b?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===u?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,l.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,l.jsx)(s,{accent:v.accent}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,l.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,l.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||x)&&(0,l.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,l.jsx)(c,{action:d,primary:!0}):null,x?(0,l.jsx)(c,{action:x}):null]}),m,p?(0,l.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,l.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:a}),(0,l.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,l.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,l.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,l.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=5416)),_N_E=r.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9428],{1705:(e,r,t)=>{Promise.resolve().then(t.bind(t,9574))},4901:(e,r,t)=>{"use strict";function s(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.filter(Boolean).join(" ")}t.d(r,{cn:()=>s})},7594:(e,r,t)=>{"use strict";var s=t(9582);t.o(s,"useParams")&&t.d(r,{useParams:function(){return s.useParams}}),t.o(s,"usePathname")&&t.d(r,{usePathname:function(){return s.usePathname}}),t.o(s,"useRouter")&&t.d(r,{useRouter:function(){return s.useRouter}}),t.o(s,"useSearchParams")&&t.d(r,{useSearchParams:function(){return s.useSearchParams}})},8450:(e,r,t)=>{"use strict";function s(e){return"/projects/".concat(encodeURIComponent(e))}function a(e,r){return"".concat(s(e),"/sessions/").concat(encodeURIComponent(r))}function c(e,r,t){return"".concat(a(e,r)).concat(t)}t.d(r,{$l:()=>c,Nc:()=>a,bn:()=>s})},9574:(e,r,t)=>{"use strict";t.d(r,{OrchestratorSelector:()=>u});var s=t(3817),a=t(6749),c=t(7594),n=t(8713),o=t.n(n),i=t(4901),l=t(8450);function d(e){if(!e)return"Unknown";let r=new Date(e).getTime();if(!Number.isFinite(r))return"Unknown";let t=new Date().getTime()-r;if(t<0)return"Just now";let s=Math.floor(t/6e4),a=Math.floor(s/60),c=Math.floor(a/24);return s<1?"Just now":s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):"".concat(c,"d ago")}function u(e){let{orchestrators:r,projectId:t,projectName:n,error:u}=e,x=(0,c.useRouter)(),[m,h]=(0,a.useState)(!1),[p,v]=(0,a.useState)(null),f=(0,a.useRef)(!1),b=async()=>{if(!f.current){f.current=!0,h(!0),v(null);try{let e=await fetch("/api/orchestrators",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:t})});if(!e.ok){let r=await e.json();throw Error(r.error||"Failed to spawn orchestrator")}let r=await e.json();x.push((0,l.Nc)(t,r.orchestrator.id))}catch(e){v(e instanceof Error?e.message:"Failed to spawn orchestrator")}finally{h(!1),f.current=!1}}};return u?(0,s.jsx)("div",{className:"flex h-screen items-center justify-center bg-[var(--color-bg-base)]",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-[var(--color-text-primary)]",children:"Error"}),(0,s.jsx)("p",{className:"mt-2 text-[var(--color-text-secondary)]",children:u}),(0,s.jsx)(o(),{href:"/",className:"orchestrator-btn mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium",children:"Go to Dashboard"})]})}):(0,s.jsxs)("div",{className:"flex min-h-screen flex-col bg-[var(--color-bg-base)]",children:[(0,s.jsx)("header",{className:"nav-glass sticky top-0 z-10 border-b border-[var(--color-border-subtle)] px-6 py-4",children:(0,s.jsxs)("div",{className:"mx-auto flex max-w-3xl items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-semibold text-[var(--color-text-primary)]",children:n}),(0,s.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"Project orchestrator"})]}),(0,s.jsx)(o(),{href:(0,l.bn)(t),className:"text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]",children:"Dashboard"})]})}),(0,s.jsx)("main",{className:"flex-1 px-6 py-8",children:(0,s.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)] p-4",children:(0,s.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"AO keeps one main orchestrator per project. Opening or spawning here reuses that canonical session instead of creating another duplicate."})}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("h2",{className:"mb-3 text-sm font-medium text-[var(--color-text-secondary)]",children:"Main Session"}),(0,s.jsx)("div",{className:"space-y-2",children:r.map(e=>(0,s.jsxs)(o(),{href:(0,l.Nc)(e.projectId,e.id),className:(0,i.cn)("flex items-center justify-between rounded-lg border border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)] p-4","transition-all hover:border-[var(--color-border-default)] hover:shadow-sm"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:function(e){switch(e){case"working":return"var(--color-status-working)";case"spawning":return"var(--color-status-attention)";case"pr_open":case"review_pending":case"approved":case"mergeable":return"var(--color-status-ready)";case"ci_failed":case"changes_requested":return"var(--color-status-error)";case"merged":case"done":case"killed":case"terminated":return"var(--color-text-tertiary)";default:return"var(--color-text-secondary)"}}(e.status)}}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium text-[var(--color-text-primary)]",children:e.id}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-secondary)]",children:[(0,s.jsx)("span",{className:"capitalize",children:e.status.replace(/_/g," ")}),e.activity&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--color-text-tertiary)]",children:"\xb7"}),(0,s.jsx)("span",{children:function(e){if(!e)return"";switch(e){case"active":return"Active";case"ready":return"Ready";case"idle":return"Idle";case"waiting_input":return"Waiting";case"blocked":return"Blocked";case"exited":return"Exited";default:return e}}(e.activity)})]})]})]})]}),(0,s.jsxs)("div",{className:"text-right text-xs text-[var(--color-text-tertiary)]",children:[(0,s.jsxs)("div",{children:["Created ",d(e.createdAt)]}),e.lastActivityAt&&(0,s.jsxs)("div",{children:["Active ",d(e.lastActivityAt)]})]})]},e.id))})]}),(0,s.jsxs)("div",{className:"border-t border-[var(--color-border-subtle)] pt-6",children:[(0,s.jsx)("h2",{className:"mb-3 text-sm font-medium text-[var(--color-text-secondary)]",children:"Open Orchestrator"}),(0,s.jsx)("button",{type:"button",onClick:b,disabled:m,className:(0,i.cn)("orchestrator-btn w-full px-4 py-3 text-sm font-medium","disabled:cursor-wait disabled:opacity-70"),children:m?(0,s.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,s.jsxs)("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Opening orchestrator..."]}):"Open Orchestrator"}),p&&(0,s.jsx)("p",{className:"mt-2 text-sm text-[var(--color-status-error)]",children:p})]})]})})]})}}},e=>{e.O(0,[8713,131,1461,7358],()=>e(e.s=1705)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9428],{4901:(e,r,t)=>{"use strict";function s(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.filter(Boolean).join(" ")}t.d(r,{cn:()=>s})},7594:(e,r,t)=>{"use strict";var s=t(9582);t.o(s,"useParams")&&t.d(r,{useParams:function(){return s.useParams}}),t.o(s,"usePathname")&&t.d(r,{usePathname:function(){return s.usePathname}}),t.o(s,"useRouter")&&t.d(r,{useRouter:function(){return s.useRouter}}),t.o(s,"useSearchParams")&&t.d(r,{useSearchParams:function(){return s.useSearchParams}})},8450:(e,r,t)=>{"use strict";function s(e){return"/projects/".concat(encodeURIComponent(e))}function a(e,r){return"".concat(s(e),"/sessions/").concat(encodeURIComponent(r))}function c(e,r,t){return"".concat(a(e,r)).concat(t)}t.d(r,{$l:()=>c,Nc:()=>a,bn:()=>s})},8824:(e,r,t)=>{Promise.resolve().then(t.bind(t,9574))},9574:(e,r,t)=>{"use strict";t.d(r,{OrchestratorSelector:()=>u});var s=t(3817),a=t(6749),c=t(7594),n=t(8713),o=t.n(n),i=t(4901),l=t(8450);function d(e){if(!e)return"Unknown";let r=new Date(e).getTime();if(!Number.isFinite(r))return"Unknown";let t=new Date().getTime()-r;if(t<0)return"Just now";let s=Math.floor(t/6e4),a=Math.floor(s/60),c=Math.floor(a/24);return s<1?"Just now":s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):"".concat(c,"d ago")}function u(e){let{orchestrators:r,projectId:t,projectName:n,error:u}=e,x=(0,c.useRouter)(),[m,h]=(0,a.useState)(!1),[p,v]=(0,a.useState)(null),f=(0,a.useRef)(!1),b=async()=>{if(!f.current){f.current=!0,h(!0),v(null);try{let e=await fetch("/api/orchestrators",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:t})});if(!e.ok){let r=await e.json();throw Error(r.error||"Failed to spawn orchestrator")}let r=await e.json();x.push((0,l.Nc)(t,r.orchestrator.id))}catch(e){v(e instanceof Error?e.message:"Failed to spawn orchestrator")}finally{h(!1),f.current=!1}}};return u?(0,s.jsx)("div",{className:"flex h-screen items-center justify-center bg-[var(--color-bg-base)]",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-[var(--color-text-primary)]",children:"Error"}),(0,s.jsx)("p",{className:"mt-2 text-[var(--color-text-secondary)]",children:u}),(0,s.jsx)(o(),{href:"/",className:"orchestrator-btn mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium",children:"Go to Dashboard"})]})}):(0,s.jsxs)("div",{className:"flex min-h-screen flex-col bg-[var(--color-bg-base)]",children:[(0,s.jsx)("header",{className:"nav-glass sticky top-0 z-10 border-b border-[var(--color-border-subtle)] px-6 py-4",children:(0,s.jsxs)("div",{className:"mx-auto flex max-w-3xl items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-semibold text-[var(--color-text-primary)]",children:n}),(0,s.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"Project orchestrator"})]}),(0,s.jsx)(o(),{href:(0,l.bn)(t),className:"text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]",children:"Dashboard"})]})}),(0,s.jsx)("main",{className:"flex-1 px-6 py-8",children:(0,s.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)] p-4",children:(0,s.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"AO keeps one main orchestrator per project. Opening or spawning here reuses that canonical session instead of creating another duplicate."})}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("h2",{className:"mb-3 text-sm font-medium text-[var(--color-text-secondary)]",children:"Main Session"}),(0,s.jsx)("div",{className:"space-y-2",children:r.map(e=>(0,s.jsxs)(o(),{href:(0,l.Nc)(e.projectId,e.id),className:(0,i.cn)("flex items-center justify-between rounded-lg border border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)] p-4","transition-all hover:border-[var(--color-border-default)] hover:shadow-sm"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:function(e){switch(e){case"working":return"var(--color-status-working)";case"spawning":return"var(--color-status-attention)";case"pr_open":case"review_pending":case"approved":case"mergeable":return"var(--color-status-ready)";case"ci_failed":case"changes_requested":return"var(--color-status-error)";case"merged":case"done":case"killed":case"terminated":return"var(--color-text-tertiary)";default:return"var(--color-text-secondary)"}}(e.status)}}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium text-[var(--color-text-primary)]",children:e.id}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-secondary)]",children:[(0,s.jsx)("span",{className:"capitalize",children:e.status.replace(/_/g," ")}),e.activity&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--color-text-tertiary)]",children:"\xb7"}),(0,s.jsx)("span",{children:function(e){if(!e)return"";switch(e){case"active":return"Active";case"ready":return"Ready";case"idle":return"Idle";case"waiting_input":return"Waiting";case"blocked":return"Blocked";case"exited":return"Exited";default:return e}}(e.activity)})]})]})]})]}),(0,s.jsxs)("div",{className:"text-right text-xs text-[var(--color-text-tertiary)]",children:[(0,s.jsxs)("div",{children:["Created ",d(e.createdAt)]}),e.lastActivityAt&&(0,s.jsxs)("div",{children:["Active ",d(e.lastActivityAt)]})]})]},e.id))})]}),(0,s.jsxs)("div",{className:"border-t border-[var(--color-border-subtle)] pt-6",children:[(0,s.jsx)("h2",{className:"mb-3 text-sm font-medium text-[var(--color-text-secondary)]",children:"Open Orchestrator"}),(0,s.jsx)("button",{type:"button",onClick:b,disabled:m,className:(0,i.cn)("orchestrator-btn w-full px-4 py-3 text-sm font-medium","disabled:cursor-wait disabled:opacity-70"),children:m?(0,s.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,s.jsxs)("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Opening orchestrator..."]}):"Open Orchestrator"}),p&&(0,s.jsx)("p",{className:"mt-2 text-sm text-[var(--color-status-error)]",children:p})]})]})})]})}}},e=>{e.O(0,[8713,131,1461,7358],()=>e(e.s=8824)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{5696:(e,s,_)=>{Promise.resolve().then(_.bind(_,6231))}},e=>{e.O(0,[8713,3780,7008,6231,131,1461,7358],()=>e(e.s=5696)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2922,2985,3675,4209,4587,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1332],{2925:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,8713,23)),Promise.resolve().then(t.bind(t,6231)),Promise.resolve().then(t.bind(t,5275))},5275:(e,r,t)=>{"use strict";t.d(r,{RepairDegradedProjectButton:()=>l});var o=t(3817),n=t(6749),a=t(7594);function l(e){let{projectId:r}=e,t=(0,a.useRouter)(),[l,c]=(0,n.useState)(!1),[i,s]=(0,n.useState)(null),d=async()=>{c(!0),s(null);try{let o=await fetch("/api/projects/".concat(encodeURIComponent(r)),{method:"POST"}),n=await o.json().catch(()=>null);if(!o.ok){var e;s(null!=(e=null==n?void 0:n.error)?e:"Failed to repair project config.");return}t.refresh()}catch(e){s("Network error while repairing project config.")}finally{c(!1)}};return(0,o.jsxs)("div",{className:"mt-6",children:[(0,o.jsx)("button",{type:"button",onClick:()=>void d(),disabled:l,className:"rounded-lg border border-[var(--color-accent)] bg-[var(--color-tint-blue)] px-4 py-2 text-sm font-semibold text-[var(--color-accent)] transition-colors hover:bg-[color-mix(in_srgb,var(--color-accent)_14%,transparent)] disabled:cursor-not-allowed disabled:opacity-60",children:l?"Repairing...":"Repair config"}),i?(0,o.jsx)("p",{className:"mt-3 text-sm text-[var(--color-status-error)]",children:i}):null]})}}},e=>{e.O(0,[8713,3780,7008,6231,131,1461,7358],()=>e(e.s=2925)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3610],{5589:(e,s,_)=>{Promise.resolve().then(_.bind(_,5795))}},e=>{e.O(0,[8713,3780,5795,131,1461,7358],()=>e(e.s=5589)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3916],{352:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,8713,23)),Promise.resolve().then(s.bind(s,2749)),Promise.resolve().then(s.bind(s,5275))},2446:(e,t,s)=>{"use strict";s.d(t,{d:()=>c,t:()=>l});var r=s(3817),n=s(6749),a=s(4901);function i(e,t){return"SHOW"===t.type?{message:t.message,variant:t.variant,key:t.key}:null}let o=(0,n.createContext)(null);function l(e){let{children:t}=e,[s,l]=(0,n.useReducer)(i,null),c=(0,n.useRef)(null),u=(0,n.useRef)(0);(0,n.useEffect)(()=>()=>{null!==c.current&&clearTimeout(c.current)},[]);let d=(0,n.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";null!==c.current&&clearTimeout(c.current),u.current+=1,l({type:"SHOW",message:e,variant:t,key:u.current}),c.current=setTimeout(()=>{l({type:"HIDE"}),c.current=null},3e3)},[]);return(0,r.jsxs)(o.Provider,{value:{showToast:d},children:[t,(0,r.jsx)("div",{className:"toast-container",role:"status","aria-live":"polite","aria-atomic":"true",children:s&&(0,r.jsxs)("div",{className:(0,a.cn)("toast","success"===s.variant&&"toast--success","error"===s.variant&&"toast--error","info"===s.variant&&"toast--info"),children:[(0,r.jsx)("span",{className:"toast__icon","aria-hidden":"true"}),(0,r.jsx)("span",{className:"toast__message",children:s.message})]},s.key)})]})}function c(){let e=(0,n.useContext)(o);if(!e)throw Error("useToast must be used within a ToastProvider");return e}},2749:(e,t,s)=>{"use strict";s.d(t,{ProjectSettingsForm:()=>d});var r=s(3817),n=s(6749),a=s(7594),i=s(2446);let o="These describe which repo this is. Change them via `ao project relink`.";function l(e){let{projectId:t,initialValues:s}=e,o=(0,a.useRouter)(),{showToast:l}=(0,i.d)(),[d,m]=(0,n.useState)(s.agent),[h,p]=(0,n.useState)(s.runtime),[j,g]=(0,n.useState)(s.trackerPlugin),[f,_]=(0,n.useState)(s.scmPlugin),[v,x]=(0,n.useState)(s.reactions),[b,y]=(0,n.useState)(!1),[N,k]=(0,n.useState)(null),[P,S]=(0,n.useState)(null),C=(0,n.useMemo)(()=>({agent:d.trim()||null,runtime:h.trim()||null,tracker:j.trim()?{plugin:j.trim()}:null,scm:f.trim()?{plugin:f.trim()}:null,reactions:v}),[d,h,j,f,v]),w=async()=>{let e;k(null),S(null);try{let t=v.trim();e=t?JSON.parse(t):void 0}catch(e){k("Reactions must be valid JSON.");return}y(!0);try{let r=await fetch("/api/projects/".concat(encodeURIComponent(t)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:C.agent,runtime:C.runtime,tracker:C.tracker,scm:C.scm,reactions:null!=e?e:null})}),n=await r.json().catch(()=>null);if(!r.ok){var s;let e=null!=(s=null==n?void 0:n.error)?s:"Failed to save project settings.";400===r.status?k(e):S(e);return}l("Project settings updated.","success"),o.refresh()}catch(e){S("Network error while saving project settings.")}finally{y(!1)}};return(0,r.jsxs)("div",{className:"project-settings-form",children:[(0,r.jsxs)("section",{className:"project-settings-form__section",children:[(0,r.jsxs)("div",{className:"project-settings-form__section-header",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"project-settings-form__eyebrow",children:"Behavior"}),(0,r.jsx)("h2",{className:"project-settings-form__section-title",children:"Runtime configuration"}),(0,r.jsx)("p",{className:"project-settings-form__section-copy",children:"These values change how AO runs this project without changing which repository the project points at."})]}),(0,r.jsx)("button",{type:"button",onClick:()=>void w(),disabled:b,className:"project-settings-form__save",children:b?"Saving...":"Save changes"})]}),(0,r.jsxs)("div",{className:"project-settings-form__grid",children:[(0,r.jsx)(c,{id:"agent",label:"Agent",value:d,onChange:m,placeholder:"claude-code"}),(0,r.jsx)(c,{id:"runtime",label:"Runtime",value:h,onChange:p,placeholder:"tmux"}),(0,r.jsx)(c,{id:"tracker-plugin",label:"Tracker plugin",value:j,onChange:g,placeholder:"github"}),(0,r.jsx)(c,{id:"scm-plugin",label:"SCM plugin",value:f,onChange:_,placeholder:"github"})]}),(0,r.jsxs)("div",{className:"project-settings-form__reactions",children:[(0,r.jsx)("label",{htmlFor:"reactions",className:"project-settings-form__label",children:"Reactions"}),(0,r.jsx)("p",{className:"project-settings-form__hint",children:"JSON object keyed by reaction name. This PATCH only sends behavior fields."}),(0,r.jsx)("textarea",{id:"reactions",value:v,onChange:e=>x(e.target.value),spellCheck:!1,rows:12,className:"project-settings-form__textarea project-settings-form__textarea--mono"})]}),N?(0,r.jsx)("div",{role:"alert",className:"project-settings-form__alert project-settings-form__alert--error",children:N}):null,P?(0,r.jsxs)("div",{className:"project-settings-form__alert project-settings-form__alert--surface",children:[(0,r.jsx)("p",{className:"project-settings-form__alert-copy",children:P}),(0,r.jsx)("button",{type:"button",onClick:()=>void w(),className:"project-settings-form__retry",children:"Retry"})]}):null]}),(0,r.jsxs)("section",{className:"project-settings-form__section",children:[(0,r.jsx)("p",{className:"project-settings-form__eyebrow",children:"Identity"}),(0,r.jsx)("h2",{className:"project-settings-form__section-title",children:"Repository identity"}),(0,r.jsx)("p",{className:"project-settings-form__section-copy",children:"These fields are read-only because they define which repository AO considers this project to be."}),(0,r.jsxs)("div",{className:"project-settings-form__grid",children:[(0,r.jsx)(u,{id:"identity-project-id",label:"Project ID",value:s.identity.projectId}),(0,r.jsx)(u,{id:"identity-path",label:"Path",value:s.identity.path}),(0,r.jsx)(u,{id:"identity-repo",label:"Repo",value:s.identity.repo}),(0,r.jsx)(u,{id:"identity-default-branch",label:"Default branch",value:s.identity.defaultBranch})]})]})]})}function c(e){let{id:t,label:s,value:n,onChange:a,placeholder:i}=e;return(0,r.jsxs)("label",{htmlFor:t,className:"project-settings-form__field",children:[(0,r.jsx)("span",{className:"project-settings-form__label",children:s}),(0,r.jsx)("input",{id:t,value:n,onChange:e=>a(e.target.value),placeholder:i,className:"project-settings-form__input"})]})}function u(e){let{id:t,label:s,value:n}=e;return(0,r.jsxs)("label",{htmlFor:t,className:"project-settings-form__field",children:[(0,r.jsx)("span",{className:"project-settings-form__label",children:s}),(0,r.jsx)("input",{id:t,value:n,disabled:!0,readOnly:!0,title:o,"aria-describedby":"".concat(t,"-tooltip"),className:"project-settings-form__input project-settings-form__input--readonly"}),(0,r.jsx)("span",{id:"".concat(t,"-tooltip"),className:"project-settings-form__hint",children:o})]})}function d(e){return(0,r.jsx)(i.t,{children:(0,r.jsx)(l,{...e})})}},4901:(e,t,s)=>{"use strict";function r(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter(Boolean).join(" ")}s.d(t,{cn:()=>r})},5275:(e,t,s)=>{"use strict";s.d(t,{RepairDegradedProjectButton:()=>i});var r=s(3817),n=s(6749),a=s(7594);function i(e){let{projectId:t}=e,s=(0,a.useRouter)(),[i,o]=(0,n.useState)(!1),[l,c]=(0,n.useState)(null),u=async()=>{o(!0),c(null);try{let r=await fetch("/api/projects/".concat(encodeURIComponent(t)),{method:"POST"}),n=await r.json().catch(()=>null);if(!r.ok){var e;c(null!=(e=null==n?void 0:n.error)?e:"Failed to repair project config.");return}s.refresh()}catch(e){c("Network error while repairing project config.")}finally{o(!1)}};return(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("button",{type:"button",onClick:()=>void u(),disabled:i,className:"rounded-lg border border-[var(--color-accent)] bg-[var(--color-tint-blue)] px-4 py-2 text-sm font-semibold text-[var(--color-accent)] transition-colors hover:bg-[color-mix(in_srgb,var(--color-accent)_14%,transparent)] disabled:cursor-not-allowed disabled:opacity-60",children:i?"Repairing...":"Repair config"}),l?(0,r.jsx)("p",{className:"mt-3 text-sm text-[var(--color-status-error)]",children:l}):null]})}},7594:(e,t,s)=>{"use strict";var r=s(9582);s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})}},e=>{e.O(0,[8713,131,1461,7358],()=>e(e.s=352)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6450],{60:(e,s,r)=>{Promise.resolve().then(r.bind(r,6802))},2537:(e,s,r)=>{"use strict";r.d(s,{X:()=>o});var a=r(3817),t=r(8713),l=r.n(t);function o(e){let{ariaLabel:s,activeTab:r,dashboardHref:t,prsHref:o,showOrchestrator:n=!0,orchestratorHref:c=null}=e;return(0,a.jsxs)("nav",{className:"mobile-bottom-nav","aria-label":s,children:[(0,a.jsxs)(l(),{href:t,className:"mobile-bottom-nav__item","data-active":"dashboard"===r?"true":"false","aria-current":"dashboard"===r?"page":void 0,children:[(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M3 13h8V3H3zm10 8h8V11h-8zM3 21h8v-6H3zm10-10h8V3h-8z"})}),(0,a.jsx)("span",{children:"Dashboard"})]}),(0,a.jsxs)(l(),{href:o,className:"mobile-bottom-nav__item","data-active":"prs"===r?"true":"false","aria-current":"prs"===r?"page":void 0,children:[(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"})}),(0,a.jsx)("span",{children:"PRs"})]}),n?c?(0,a.jsxs)(l(),{href:c,className:"mobile-bottom-nav__item","data-active":"orchestrator"===r?"true":"false","aria-current":"orchestrator"===r?"page":void 0,children:[(0,a.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M9 3H5a2 2 0 0 0-2 2v4m16 0V5a2 2 0 0 0-2-2h-4m0 18h4a2 2 0 0 0 2-2v-4M3 15v4a2 2 0 0 0 2 2h4"}),(0,a.jsx)("path",{d:"M9 9h6v6H9z"})]}),(0,a.jsx)("span",{children:"Orchestrator"})]}):(0,a.jsxs)("button",{type:"button",className:"mobile-bottom-nav__item",disabled:!0,children:[(0,a.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M9 3H5a2 2 0 0 0-2 2v4m16 0V5a2 2 0 0 0-2-2h-4m0 18h4a2 2 0 0 0 2-2v-4M3 15v4a2 2 0 0 0 2 2h4"}),(0,a.jsx)("path",{d:"M9 9h6v6H9z"})]}),(0,a.jsx)("span",{children:"Orchestrator"})]}):null]})}},6802:(e,s,r)=>{"use strict";r.d(s,{PullRequestsPage:()=>g});var a=r(3817),t=r(6749),l=r(7594),o=r(9120),n=r(545),c=r(5309),d=r(5184),i=r(9293),p=r(6004),h=r(7848),m=r(1237),x=r(2537);function b(e,s){return s?"".concat(e,"?project=").concat(encodeURIComponent(s)):"".concat(e,"?project=all")}r(5425);var u=r(8450);let j=[];function v(e){return"open"===e?"Open PRs":"merged"===e?"Merged PRs":"closed"===e?"Closed PRs":"All PRs"}function g(e){let{initialSessions:s,projectId:r,projectName:g,projects:N=[],orchestrators:f,attentionZones:_="simple"}=e,M=null!=f?f:j,k=(0,d.eT)(),y=(0,t.useMemo)(()=>{let e={};for(let r of s)e[r.id]=(0,n.ng)(r,_);return e},[s,_]),{sessions:w,attentionLevels:C}=(0,c.D)({initialSessions:s,project:r,muxSessions:(null==k?void 0:k.status)==="connected"?k.sessions:void 0,initialAttentionLevels:y,attentionZones:_}),P=(0,l.useSearchParams)(),[R,O]=(0,t.useState)(!1),[q,S]=(0,t.useState)(!1),H=(0,o.U)(o.D),z=N.length>1,I=z&&void 0===r,B=(0,t.useMemo)(()=>{var e;return r&&null!=(e=M.find(e=>e.projectId===r))?e:null},[M,r]),[W,T]=(0,t.useState)("all"),V=(0,t.useMemo)(()=>w.filter(e=>!!e.pr).map(e=>e.pr).sort((e,s)=>s.number-e.number),[w]),E=(0,t.useMemo)(()=>V.filter(e=>"open"===e.state),[V]),F=(0,t.useMemo)(()=>V.filter(e=>"merged"===e.state),[V]),G=(0,t.useMemo)(()=>V.filter(e=>"closed"===e.state),[V]),A=r?(0,u.bn)(r):b("/",r),D=b("/prs",r),U=B?(0,u.Nc)(B.projectId,B.id):null,L="open"===W?E:"merged"===W?F:"closed"===W?G:V;return(0,t.useEffect)(()=>{S(!1)},[P]),(0,a.jsxs)("div",{className:"dashboard-shell flex h-screen".concat(!H&&R?" dashboard-shell--sidebar-collapsed":""),children:[z?(0,a.jsx)("div",{className:"sidebar-wrapper".concat(q?" sidebar-wrapper--mobile-open":""),children:(0,a.jsx)(i.u,{projects:N,sessions:w,orchestrators:M,activeProjectId:r,activeSessionId:void 0,collapsed:R,onToggleCollapsed:()=>O(e=>!e),onMobileClose:()=>S(!1)})}):null,q&&(0,a.jsx)("div",{className:"sidebar-mobile-backdrop",onClick:()=>S(!1)}),(0,a.jsxs)("div",{className:"dashboard-main flex-1 overflow-y-auto px-4 py-4 md:px-7 md:py-6",children:[(0,a.jsx)(h.u,{attentionLevels:C,projectName:g?"".concat(g," PRs"):"Pull Requests"}),H?(0,a.jsxs)("section",{className:"mobile-pr-page-header",children:[(0,a.jsxs)("div",{className:"mobile-pr-page-header__top",children:[(0,a.jsxs)("div",{className:"mobile-pr-page-header__title-row",children:[z?(0,a.jsx)("button",{type:"button",className:"mobile-menu-toggle",onClick:()=>S(!0),"aria-label":"Open menu",children:(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-5 w-5",children:(0,a.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})})}):null,(0,a.jsx)("h1",{className:"mobile-pr-page-header__title",children:g?"".concat(g," PRs"):"Pull Requests"})]}),(0,a.jsxs)("div",{className:"mobile-pr-page-header__meta",children:[(0,a.jsx)("span",{className:"mobile-pr-page-header__count",children:V.length}),(0,a.jsx)(p.U,{})]})]}),(0,a.jsxs)("p",{className:"mobile-pr-page-header__subtitle",children:["Open pull requests created by agents",I?" across projects":" in this project","."]})]}):(0,a.jsxs)("section",{className:"dashboard-hero mb-5",children:[(0,a.jsx)("div",{className:"dashboard-hero__backdrop"}),(0,a.jsxs)("div",{className:"dashboard-hero__content",children:[z?(0,a.jsx)("button",{type:"button",className:"mobile-menu-toggle",onClick:()=>S(!0),"aria-label":"Open menu",children:(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-5 w-5",children:(0,a.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})})}):null,(0,a.jsxs)("div",{className:"dashboard-hero__primary",children:[(0,a.jsx)("div",{className:"dashboard-hero__heading",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"dashboard-title",children:g?"".concat(g," PRs"):"Pull Requests"}),(0,a.jsxs)("p",{className:"dashboard-subtitle",children:["Open pull requests created by agents",I?" across all projects":" in this project","."]})]})}),(0,a.jsx)("div",{className:"dashboard-stat-cards dashboard-stat-cards--persist-mobile",children:(0,a.jsxs)("div",{className:"dashboard-stat-card",children:[(0,a.jsx)("span",{className:"dashboard-stat-card__value",children:E.length}),(0,a.jsx)("span",{className:"dashboard-stat-card__label",children:"Open PRs"}),(0,a.jsx)("span",{className:"dashboard-stat-card__meta",children:I?"Across all projects":"In this project"})]})})]})]})]}),(0,a.jsxs)("section",{className:"mx-auto max-w-[900px]",children:[(0,a.jsx)("div",{className:H?"mobile-pr-filter-tabs":"mb-4 flex items-center gap-1.5",children:[{value:"all",label:"All",count:V.length},{value:"open",label:"Open",count:E.length},{value:"merged",label:"Merged",count:F.length},{value:"closed",label:"Closed",count:G.length}].map(e=>{let{value:s,label:r,count:t}=e;return(0,a.jsxs)("button",{type:"button",onClick:()=>T(s),className:H?"mobile-pr-filter-tab":["inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-[11px] font-semibold transition-colors",W===s?"border-[var(--color-border-default)] bg-[var(--color-bg-elevated)] text-[var(--color-text-primary)]":"border-transparent bg-transparent text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"].join(" "),"data-active":H?String(W===s):void 0,children:[r,(0,a.jsx)("span",{className:H?"mobile-pr-filter-tab__count":"rounded-full bg-[var(--color-chip-bg)] px-1.5 py-px text-[9.5px] font-mono text-[var(--color-text-muted)]",children:t})]},s)})}),H?(0,a.jsx)("div",{className:"mobile-pr-mobile-layout",children:"all"===W?(0,a.jsxs)(a.Fragment,{children:[E.length>0&&(0,a.jsxs)("section",{className:"mobile-pr-group","aria-label":"Open pull requests",children:[(0,a.jsxs)("div",{className:"mobile-pr-section-header",children:[(0,a.jsx)("span",{children:"Open"}),(0,a.jsx)("span",{children:E.length})]}),(0,a.jsx)("div",{className:"mobile-pr-list",children:E.map(e=>(0,a.jsx)(m.dG,{pr:e},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))})]}),F.length>0&&(0,a.jsxs)("section",{className:"mobile-pr-group","aria-label":"Merged pull requests",children:[(0,a.jsxs)("div",{className:"mobile-pr-section-header",children:[(0,a.jsx)("span",{children:"Merged"}),(0,a.jsx)("span",{children:F.length})]}),(0,a.jsx)("div",{className:"mobile-pr-list",children:F.map(e=>(0,a.jsx)(m.dG,{pr:e,muted:!0},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))})]}),G.length>0&&(0,a.jsxs)("section",{className:"mobile-pr-group","aria-label":"Closed pull requests",children:[(0,a.jsxs)("div",{className:"mobile-pr-section-header",children:[(0,a.jsx)("span",{children:"Closed"}),(0,a.jsx)("span",{children:G.length})]}),(0,a.jsx)("div",{className:"mobile-pr-list",children:G.map(e=>(0,a.jsx)(m.dG,{pr:e,muted:!0},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))})]}),0===V.length&&(0,a.jsx)("div",{className:"mobile-pr-empty",children:"No pull requests yet."})]}):(0,a.jsxs)("section",{className:"mobile-pr-group","aria-label":v(W),children:[(0,a.jsxs)("div",{className:"mobile-pr-section-header",children:[(0,a.jsx)("span",{children:v(W).replace(" PRs","")}),(0,a.jsx)("span",{children:L.length})]}),(0,a.jsx)("div",{className:"mobile-pr-list",children:L.length>0?L.map(e=>(0,a.jsx)(m.dG,{pr:e,muted:"open"!==W},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number))):(0,a.jsx)("div",{className:"mobile-pr-empty",children:"No pull requests in this view."})})]})}):(0,a.jsx)("div",{className:"overflow-hidden rounded-[7px] border border-[var(--color-border-subtle)]",children:(0,a.jsxs)("table",{className:"w-full border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-[var(--color-border-subtle)] bg-[var(--color-bg-elevated)]",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"PR"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"Title"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"Size"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"CI"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"Review"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"Threads"})]})}),(0,a.jsxs)("tbody",{children:[("all"===W||"open"===W)&&E.length>0&&(0,a.jsxs)(a.Fragment,{children:["all"===W&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"border-b border-[var(--color-border-subtle)] bg-[var(--color-bg-base)] px-3 py-1.5 text-[9.5px] font-mono font-semibold uppercase tracking-[0.06em] text-[var(--color-text-muted)]",children:"Open"})}),E.map(e=>(0,a.jsx)(m.j6,{pr:e},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))]}),("all"===W||"merged"===W)&&F.length>0&&(0,a.jsxs)(a.Fragment,{children:["all"===W&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"border-b border-t border-[var(--color-border-subtle)] bg-[var(--color-bg-base)] px-3 py-1.5 text-[9.5px] font-mono font-semibold uppercase tracking-[0.06em] text-[var(--color-text-muted)]",children:"Merged"})}),F.map(e=>(0,a.jsx)(m.j6,{pr:e,muted:!0},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))]}),("all"===W||"closed"===W)&&G.length>0&&(0,a.jsxs)(a.Fragment,{children:["all"===W&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"border-b border-t border-[var(--color-border-subtle)] bg-[var(--color-bg-base)] px-3 py-1.5 text-[9.5px] font-mono font-semibold uppercase tracking-[0.06em] text-[var(--color-text-muted)]",children:"Closed"})}),G.map(e=>(0,a.jsx)(m.j6,{pr:e,muted:!0},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))]}),0===V.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"px-4 py-6 text-[12px] text-[var(--color-text-secondary)]",children:"No pull requests yet."})})]})]})})]})]}),H?(0,a.jsx)(x.X,{ariaLabel:"PR navigation",activeTab:"prs",dashboardHref:A,prsHref:D,showOrchestrator:!I,orchestratorHref:U}):null]})}}},e=>{e.O(0,[8713,3780,7008,131,1461,7358],()=>e(e.s=60)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4097],{2528:(e,r,o)=>{Promise.resolve().then(o.bind(o,9654))},7594:(e,r,o)=>{"use strict";var t=o(9582);o.o(t,"useParams")&&o.d(r,{useParams:function(){return t.useParams}}),o.o(t,"usePathname")&&o.d(r,{usePathname:function(){return t.usePathname}}),o.o(t,"useRouter")&&o.d(r,{useRouter:function(){return t.useRouter}}),o.o(t,"useSearchParams")&&o.d(r,{useSearchParams:function(){return t.useSearchParams}})},9654:(e,r,o)=>{"use strict";o.r(r),o.d(r,{default:()=>l});var t=o(3817),a=o(7594),s=o(6749),n=o(9789);function l(e){let{error:r,reset:o}=e,l=(0,a.useRouter)();return(0,s.useEffect)(()=>{console.error(r)},[r]),(0,t.jsx)(n.ErrorDisplay,{title:"Failed to load session",message:function(e){let r=e.message.toLowerCase();return r.includes("timed out")?"The session request did not complete in time. Check the backend process and try again once the API is responsive.":r.includes("network")?"The session request failed before the dashboard got a response. Check the server connection and try again.":r.includes("403")?"The dashboard could not access this session. Permissions or auth may have changed.":r.includes("404")?"This session is no longer available. It may have been removed while the page was open.":r.includes("500")?"The server returned an internal error while loading this session. Try re-fetching the session data.":e.message.trim().length>0?e.message:"The dashboard could not load this session cleanly. Try again to re-fetch the latest state."}(r),tone:"error",primaryAction:{label:"Try again",onClick:()=>{o(),l.refresh()}},secondaryAction:{label:"Back to dashboard",href:"/"},error:r,compact:!0,chrome:"card"})}},9789:(e,r,o)=>{"use strict";o.d(r,{ErrorDisplay:()=>i});var t=o(3817),a=o(8713),s=o.n(a);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function l(e){let{accent:r}=e;return(0,t.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(r," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(r," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,t.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:r},viewBox:"0 0 24 24",children:[(0,t.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,t.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(e){let{action:r,primary:o=!1}=e,a=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return r.href?(0,t.jsx)(s(),{href:r.href,className:a,style:n,children:r.label}):(0,t.jsx)("button",{type:"button",onClick:r.onClick,className:a,style:n,children:r.label})}function i(e){let{title:r,message:o,tone:a="error",detailsTitle:s="Technical details",error:i,primaryAction:d,secondaryAction:u,compact:x=!1,chrome:m="page",children:h}=e,b=n[a],v=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,t.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(x?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,t.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,t.jsx)(l,{accent:b.accent}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:b.accent,background:b.bg,borderColor:b.border},children:b.label}),(0,t.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:r}),(0,t.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||u)&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,t.jsx)(c,{action:d,primary:!0}):null,u?(0,t.jsx)(c,{action:u}):null]}),h,v?(0,t.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:s}),(0,t.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,t.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,t.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,t.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},e=>{e.O(0,[8713,131,1461,7358],()=>e(e.s=2528)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4097],{1417:(e,r,o)=>{Promise.resolve().then(o.bind(o,9654))},7594:(e,r,o)=>{"use strict";var t=o(9582);o.o(t,"useParams")&&o.d(r,{useParams:function(){return t.useParams}}),o.o(t,"usePathname")&&o.d(r,{usePathname:function(){return t.usePathname}}),o.o(t,"useRouter")&&o.d(r,{useRouter:function(){return t.useRouter}}),o.o(t,"useSearchParams")&&o.d(r,{useSearchParams:function(){return t.useSearchParams}})},9654:(e,r,o)=>{"use strict";o.r(r),o.d(r,{default:()=>l});var t=o(3817),a=o(7594),s=o(6749),n=o(9789);function l(e){let{error:r,reset:o}=e,l=(0,a.useRouter)();return(0,s.useEffect)(()=>{console.error(r)},[r]),(0,t.jsx)(n.ErrorDisplay,{title:"Failed to load session",message:function(e){let r=e.message.toLowerCase();return r.includes("timed out")?"The session request did not complete in time. Check the backend process and try again once the API is responsive.":r.includes("network")?"The session request failed before the dashboard got a response. Check the server connection and try again.":r.includes("403")?"The dashboard could not access this session. Permissions or auth may have changed.":r.includes("404")?"This session is no longer available. It may have been removed while the page was open.":r.includes("500")?"The server returned an internal error while loading this session. Try re-fetching the session data.":e.message.trim().length>0?e.message:"The dashboard could not load this session cleanly. Try again to re-fetch the latest state."}(r),tone:"error",primaryAction:{label:"Try again",onClick:()=>{o(),l.refresh()}},secondaryAction:{label:"Back to dashboard",href:"/"},error:r,compact:!0,chrome:"card"})}},9789:(e,r,o)=>{"use strict";o.d(r,{ErrorDisplay:()=>i});var t=o(3817),a=o(8713),s=o.n(a);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function l(e){let{accent:r}=e;return(0,t.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(r," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(r," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,t.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:r},viewBox:"0 0 24 24",children:[(0,t.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,t.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(e){let{action:r,primary:o=!1}=e,a=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return r.href?(0,t.jsx)(s(),{href:r.href,className:a,style:n,children:r.label}):(0,t.jsx)("button",{type:"button",onClick:r.onClick,className:a,style:n,children:r.label})}function i(e){let{title:r,message:o,tone:a="error",detailsTitle:s="Technical details",error:i,primaryAction:d,secondaryAction:u,compact:x=!1,chrome:m="page",children:h}=e,b=n[a],v=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,t.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(x?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,t.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,t.jsx)(l,{accent:b.accent}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:b.accent,background:b.bg,borderColor:b.border},children:b.label}),(0,t.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:r}),(0,t.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||u)&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,t.jsx)(c,{action:d,primary:!0}):null,u?(0,t.jsx)(c,{action:u}):null]}),h,v?(0,t.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:s}),(0,t.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,t.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,t.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,t.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},e=>{e.O(0,[8713,131,1461,7358],()=>e(e.s=1417)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2922,2985,3675,4209,4587,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4345,7927],{5416:(r,e,o)=>{Promise.resolve().then(o.bind(o,9789))},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var l=o(3817),t=o(8713),a=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,l.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,l.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,l.jsx)(a(),{href:e.href,className:t,style:n,children:e.label}):(0,l.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:a="Technical details",error:i,primaryAction:d,secondaryAction:x,compact:b=!1,chrome:u="page",children:m}=r,v=n[t],p=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,l.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(b?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===u?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,l.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,l.jsx)(s,{accent:v.accent}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,l.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,l.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||x)&&(0,l.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,l.jsx)(c,{action:d,primary:!0}):null,x?(0,l.jsx)(c,{action:x}):null]}),m,p?(0,l.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,l.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:a}),(0,l.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,l.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,l.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,l.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=5416)),_N_E=r.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[824],{718:(e,s,_)=>{Promise.resolve().then(_.bind(_,5795))}},e=>{e.O(0,[8713,3780,5795,131,1461,7358],()=>e(e.s=718)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9495],{943:(e,t,r)=>{Promise.resolve().then(r.bind(r,8746))},1712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let n=r(1903)._(r(5864));function s(e,t){var r;let s={};"function"==typeof e&&(s.loader=e);let a={...s,...t};return(0,n.default)({...a,modules:null==(r=a.loadableGenerated)?void 0:r.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5468:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{bindSnapshot:function(){return l},createAsyncLocalStorage:function(){return a},createSnapshot:function(){return o}});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let s="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function a(){return s?new s:new n}function l(e){return s?s.bind(e):n.bind(e)}function o(){return s?s.snapshot():function(e,...t){return e(...t)}}},5864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(3817),s=r(6749),a=r(6943);function l(e){return{default:e&&"default"in e?e.default:e}}r(6418);let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},i=function(e){let t={...o,...e},r=(0,s.lazy)(()=>t.loader().then(l)),i=t.loading;function c(e){let l=i?(0,n.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,c=o?s.Suspense:s.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:[null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(c,{...o?{fallback:l}:{},children:u})}return c.displayName="LoadableComponent",c}},6313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=r(8394)},6418:(e,t,r)=>{"use strict";function n(e){let{moduleIds:t}=e;return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return n}}),r(3817),r(4768),r(6313),r(5152)},6943:(e,t,r)=>{"use strict";function n(e){let{reason:t,children:r}=e;return r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return n}}),r(1763)},7594:(e,t,r)=>{"use strict";var n=r(9582);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},8394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(5468).createAsyncLocalStorage)()},8746:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u,dynamic:()=>i});var n=r(3817),s=r(9891),a=r(7594),l=r(6749);let o=(0,s.default)(()=>Promise.all([r.e(8944),r.e(3764),r.e(1654)]).then(r.bind(r,3764)).then(e=>({default:e.DirectTerminal})),{loadableGenerated:{webpack:()=>[3764]},ssr:!1}),i="force-dynamic";function c(){let e=(0,a.useSearchParams)(),t="true"===e.get("fullscreen"),r=e.get("session")||"ao-orchestrator";return(0,n.jsx)("div",{className:"min-h-screen bg-[var(--color-bg-primary)] p-8",children:(0,n.jsxs)("div",{className:"mx-auto max-w-7xl",children:[(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h1",{className:"text-2xl font-bold text-[var(--color-text-primary)]",children:"DirectTerminal Test - XDA Clipboard Support"}),(0,n.jsxs)("p",{className:"mt-2 text-sm text-[var(--color-text-muted)]",children:["This terminal has XDA (Extended Device Attributes) handler registered.",(0,n.jsx)("br",{}),"tmux should recognize it as XTerm and enable clipboard support (OSC 52)."]}),(0,n.jsxs)("div",{className:"mt-4 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-4",children:[(0,n.jsxs)("h2",{className:"mb-2 text-sm font-semibold text-[var(--color-text-primary)]",children:["Testing: ",(0,n.jsx)("span",{className:"text-[var(--color-accent-green)]",children:r})]}),(0,n.jsx)("h2",{className:"mb-2 text-sm font-semibold text-[var(--color-text-primary)]",children:"Test Steps:"}),(0,n.jsxs)("ol",{className:"list-inside list-decimal space-y-1 text-sm text-[var(--color-text-muted)]",children:[(0,n.jsxs)("li",{children:["Connected to tmux session: ",r]}),(0,n.jsxs)("li",{children:["Verify XDA badge shows"," ",(0,n.jsx)("span",{className:"text-[var(--color-accent-green)]",children:"✓ XDA"})]}),(0,n.jsx)("li",{children:"Drag-select text in the terminal"}),(0,n.jsx)("li",{children:"Press Cmd+C (macOS) or Ctrl+C (Linux/Windows)"}),(0,n.jsx)("li",{children:"Paste elsewhere to verify clipboard works"}),(0,n.jsxs)("li",{children:[(0,n.jsx)("strong",{children:"Expected:"})," Clipboard works without iTerm2 attachment!"]})]})]}),(0,n.jsxs)("div",{className:"mt-4 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-4",children:[(0,n.jsx)("h2",{className:"mb-2 text-sm font-semibold text-[var(--color-text-primary)]",children:"Technical Details:"}),(0,n.jsxs)("ul",{className:"list-inside list-disc space-y-1 text-sm text-[var(--color-text-muted)]",children:[(0,n.jsx)("li",{children:"Registers CSI > q (XDA) handler in xterm.js parser"}),(0,n.jsx)("li",{children:"Responds with DCS > | XTerm(370) ST sequence"}),(0,n.jsx)("li",{children:'tmux detects "XTerm(" and enables TTYC_MS (clipboard capability)'}),(0,n.jsx)("li",{children:"OSC 52 sequences flow: tmux → WebSocket → xterm.js → navigator.clipboard"})]})]})]}),(0,n.jsx)(o,{sessionId:r,tmuxName:r,startFullscreen:t},"".concat(r,"-").concat(t?"fullscreen":"normal"))]})})}function u(){return(0,n.jsx)(l.Suspense,{fallback:(0,n.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:"Loading..."}),children:(0,n.jsx)(c,{})})}},9891:(e,t,r)=>{"use strict";r.d(t,{default:()=>s.a});var n=r(1712),s=r.n(n)}},e=>{e.O(0,[131,1461,7358],()=>e(e.s=943)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7358],{4592:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,7573,23)),Promise.resolve().then(n.t.bind(n,1847,23)),Promise.resolve().then(n.t.bind(n,9948,23)),Promise.resolve().then(n.t.bind(n,1992,23)),Promise.resolve().then(n.t.bind(n,9904,23)),Promise.resolve().then(n.t.bind(n,7678,23)),Promise.resolve().then(n.t.bind(n,2901,23)),Promise.resolve().then(n.bind(n,7184))},7279:()=>{}},e=>{var s=s=>e(e.s=s);e.O(0,[131,1461],()=>(s(660),s(4592))),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (()=>{"use strict";var e={},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}},i=!0;try{e[n](a,a.exports,r),i=!1}finally{i&&delete t[n]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,n,o,a)=>{if(n){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[n,o,a];return}for(var l=1/0,i=0;i<e.length;i++){for(var[n,o,a]=e[i],d=!0,u=0;u<n.length;u++)(!1&a||l>=a)&&Object.keys(r.O).every(e=>r.O[e](n[u]))?n.splice(u--,1):(d=!1,a<l&&(l=a));if(d){e.splice(i--,1);var s=o();void 0!==s&&(t=s)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(n,o){if(1&o&&(n=this(n)),8&o||"object"==typeof n&&n&&(4&o&&n.__esModule||16&o&&"function"==typeof n.then))return n;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&o&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,r.d(a,i),a}})(),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>"static/chunks/"+(4560===e?"1d2d5650":e)+"."+({1383:"8f5f7d4606d356cc",2529:"32352c1ce5253e3e",3764:"88619fb0d047cae8",4560:"1ef8611b5325bd83",5491:"fd98884d48631149",7317:"685aa5231218e8d3"})[e]+".js",r.miniCssF=e=>"static/css/659eccb5db697b76.css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(n,o,a,i)=>{if(e[n])return void e[n].push(o);if(void 0!==a)for(var l,d,u=document.getElementsByTagName("script"),s=0;s<u.length;s++){var c=u[s];if(c.getAttribute("src")==n||c.getAttribute("data-webpack")==t+a){l=c;break}}l||(d=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,r.nc&&l.setAttribute("nonce",r.nc),l.setAttribute("data-webpack",t+a),l.src=r.tu(n)),e[n]=[o];var f=(t,r)=>{l.onerror=l.onload=null,clearTimeout(p);var o=e[n];if(delete e[n],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach(e=>e(r)),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),d&&document.head.appendChild(l)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={8068:0};r.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&({8944:1})[t]&&n.push(e[t]=(e=>new Promise((t,n)=>{var o=r.miniCssF(e),a=r.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=r[n],a=o.getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===t))return o}for(var i=document.getElementsByTagName("style"),n=0;n<i.length;n++){var o=i[n],a=o.getAttribute("data-href");if(a===e||a===t)return o}})(o,a))return t();((e,t,r,n)=>{var o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=a=>{if(o.onerror=o.onload=null,"load"===a.type)r();else{var i=a&&("load"===a.type?"missing":a.type),l=a&&a.target&&a.target.href||t,d=Error("Loading CSS chunk "+e+" failed.\n("+l+")");d.code="CSS_CHUNK_LOAD_FAILED",d.type=i,d.request=l,o.parentNode.removeChild(o),n(d)}},o.href=t,!function(e){if("function"==typeof _N_E_STYLE_LOAD){let{href:t,onload:r,onerror:n}=e;_N_E_STYLE_LOAD(0===t.indexOf(window.location.origin)?new URL(t).pathname:t).then(()=>null==r?void 0:r.call(e,{type:"load"}),()=>null==n?void 0:n.call(e,{}))}else document.head.appendChild(e)}(o)})(e,a,t,n)}))(t).then(()=>{e[t]=0},r=>{throw delete e[t],r}))}})(),(()=>{var e={8068:0,3906:0};r.f.j=(t,n)=>{var o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else if(/^(3906|8068|8944)$/.test(t))e[t]=0;else{var a=new Promise((r,n)=>o=e[t]=[r,n]);n.push(o[2]=a);var i=r.p+r.u(t),l=Error();r.l(i,n=>{if(r.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,n)=>{var o,a,[i,l,d]=n,u=0;if(i.some(t=>0!==e[t])){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(d)var s=d(r)}for(t&&t(n);u<i.length;u++)a=i[u],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(s)},n=self.webpackChunk_N_E=self.webpackChunk_N_E||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})()})();
1
+ (()=>{"use strict";var e={},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}},i=!0;try{e[n](a,a.exports,r),i=!1}finally{i&&delete t[n]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,n,o,a)=>{if(n){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[n,o,a];return}for(var l=1/0,i=0;i<e.length;i++){for(var[n,o,a]=e[i],u=!0,d=0;d<n.length;d++)(!1&a||l>=a)&&Object.keys(r.O).every(e=>r.O[e](n[d]))?n.splice(d--,1):(u=!1,a<l&&(l=a));if(u){e.splice(i--,1);var s=o();void 0!==s&&(t=s)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(n,o){if(1&o&&(n=this(n)),8&o||"object"==typeof n&&n&&(4&o&&n.__esModule||16&o&&"function"==typeof n.then))return n;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&o&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,r.d(a,i),a}})(),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>"static/chunks/"+(4560===e?"1d2d5650":e)+"."+({1654:"ac304fc9e36ec94a",2529:"32352c1ce5253e3e",3764:"cdef4e76dbc23af8",4560:"1ef8611b5325bd83",5491:"fd98884d48631149",7317:"685aa5231218e8d3"})[e]+".js",r.miniCssF=e=>"static/css/659eccb5db697b76.css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(n,o,a,i)=>{if(e[n])return void e[n].push(o);if(void 0!==a)for(var l,u,d=document.getElementsByTagName("script"),s=0;s<d.length;s++){var c=d[s];if(c.getAttribute("src")==n||c.getAttribute("data-webpack")==t+a){l=c;break}}l||(u=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,r.nc&&l.setAttribute("nonce",r.nc),l.setAttribute("data-webpack",t+a),l.src=r.tu(n)),e[n]=[o];var f=(t,r)=>{l.onerror=l.onload=null,clearTimeout(p);var o=e[n];if(delete e[n],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach(e=>e(r)),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),u&&document.head.appendChild(l)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={8068:0};r.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&({8944:1})[t]&&n.push(e[t]=(e=>new Promise((t,n)=>{var o=r.miniCssF(e),a=r.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=r[n],a=o.getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===t))return o}for(var i=document.getElementsByTagName("style"),n=0;n<i.length;n++){var o=i[n],a=o.getAttribute("data-href");if(a===e||a===t)return o}})(o,a))return t();((e,t,r,n)=>{var o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=a=>{if(o.onerror=o.onload=null,"load"===a.type)r();else{var i=a&&("load"===a.type?"missing":a.type),l=a&&a.target&&a.target.href||t,u=Error("Loading CSS chunk "+e+" failed.\n("+l+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=i,u.request=l,o.parentNode.removeChild(o),n(u)}},o.href=t,!function(e){if("function"==typeof _N_E_STYLE_LOAD){let{href:t,onload:r,onerror:n}=e;_N_E_STYLE_LOAD(0===t.indexOf(window.location.origin)?new URL(t).pathname:t).then(()=>null==r?void 0:r.call(e,{type:"load"}),()=>null==n?void 0:n.call(e,{}))}else document.head.appendChild(e)}(o)})(e,a,t,n)}))(t).then(()=>{e[t]=0},r=>{throw delete e[t],r}))}})(),(()=>{var e={8068:0,3906:0};r.f.j=(t,n)=>{var o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else if(/^(3906|8068|8944)$/.test(t))e[t]=0;else{var a=new Promise((r,n)=>o=e[t]=[r,n]);n.push(o[2]=a);var i=r.p+r.u(t),l=Error();r.l(i,n=>{if(r.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,n)=>{var o,a,[i,l,u]=n,d=0;if(i.some(t=>0!==e[t])){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(u)var s=u(r)}for(t&&t(n);d<i.length;d++)a=i[d],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(s)},n=self.webpackChunk_N_E=self.webpackChunk_N_E||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})()})();