dev3000 0.0.149 → 0.0.151

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 (62) hide show
  1. package/dist/cdp-monitor.d.ts.map +1 -1
  2. package/dist/cdp-monitor.js +20 -10
  3. package/dist/cdp-monitor.js.map +1 -1
  4. package/dist/constants/log-colors.d.ts +2 -0
  5. package/dist/constants/log-colors.d.ts.map +1 -1
  6. package/dist/constants/log-colors.js +2 -0
  7. package/dist/constants/log-colors.js.map +1 -1
  8. package/dist/src/tui-interface-impl.tsx +1 -0
  9. package/dist/tui-interface-impl.d.ts.map +1 -1
  10. package/dist/tui-interface-impl.js +1 -0
  11. package/dist/tui-interface-impl.js.map +1 -1
  12. package/dist/tui-interface-opentui.d.ts.map +1 -1
  13. package/dist/tui-interface-opentui.js +81 -12
  14. package/dist/tui-interface-opentui.js.map +1 -1
  15. package/dist/utils/timestamp.d.ts +12 -0
  16. package/dist/utils/timestamp.d.ts.map +1 -1
  17. package/dist/utils/timestamp.js +39 -0
  18. package/dist/utils/timestamp.js.map +1 -1
  19. package/mcp-server/.next/BUILD_ID +1 -1
  20. package/mcp-server/.next/build-manifest.json +2 -2
  21. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  22. package/mcp-server/.next/prerender-manifest.json +3 -3
  23. package/mcp-server/.next/server/app/_global-error.html +2 -2
  24. package/mcp-server/.next/server/app/_global-error.rsc +1 -1
  25. package/mcp-server/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  26. package/mcp-server/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  27. package/mcp-server/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  28. package/mcp-server/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  29. package/mcp-server/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  30. package/mcp-server/.next/server/app/_not-found.html +1 -1
  31. package/mcp-server/.next/server/app/_not-found.rsc +1 -1
  32. package/mcp-server/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  33. package/mcp-server/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  34. package/mcp-server/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  35. package/mcp-server/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  36. package/mcp-server/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  37. package/mcp-server/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  38. package/mcp-server/.next/server/app/index.html +1 -1
  39. package/mcp-server/.next/server/app/index.rsc +1 -1
  40. package/mcp-server/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  41. package/mcp-server/.next/server/app/index.segments/_full.segment.rsc +1 -1
  42. package/mcp-server/.next/server/app/index.segments/_head.segment.rsc +1 -1
  43. package/mcp-server/.next/server/app/index.segments/_index.segment.rsc +1 -1
  44. package/mcp-server/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  45. package/mcp-server/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  46. package/mcp-server/.next/server/chunks/mcp-server_app_mcp_tools_ts_faf6d7df._.js +1 -1
  47. package/mcp-server/.next/server/chunks/mcp-server_app_mcp_tools_ts_faf6d7df._.js.map +1 -1
  48. package/mcp-server/.next/server/chunks/ssr/_edba94b0._.js +2 -2
  49. package/mcp-server/.next/server/chunks/ssr/_edba94b0._.js.map +1 -1
  50. package/mcp-server/.next/server/pages/404.html +1 -1
  51. package/mcp-server/.next/server/pages/500.html +2 -2
  52. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  53. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  54. package/mcp-server/.next/static/chunks/ec58e1c556f5d0fa.js +3 -0
  55. package/mcp-server/app/logs/LogsClient.tsx +6 -0
  56. package/mcp-server/app/mcp/tools.ts +10 -2
  57. package/package.json +3 -3
  58. package/src/tui-interface-impl.tsx +1 -0
  59. package/mcp-server/.next/static/chunks/cbbf49c419347401.js +0 -3
  60. /package/mcp-server/.next/static/{CkJlsvUmQYBtGMl09c6Ht → HVxg1xsmhVm6VO2KBlH_-}/_buildManifest.js +0 -0
  61. /package/mcp-server/.next/static/{CkJlsvUmQYBtGMl09c6Ht → HVxg1xsmhVm6VO2KBlH_-}/_clientMiddlewareManifest.json +0 -0
  62. /package/mcp-server/.next/static/{CkJlsvUmQYBtGMl09c6Ht → HVxg1xsmhVm6VO2KBlH_-}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><!--CkJlsvUmQYBtGMl09c6Ht--><html lang="en" class="h-full" vt-update="auto"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/59cdeaf92a780e96.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/39e9bdcc541cc428.js"/><script src="/_next/static/chunks/10099c90a1ca89ea.js" async=""></script><script src="/_next/static/chunks/13606014ef33124c.js" async=""></script><script src="/_next/static/chunks/4785978304fb9e19.js" async=""></script><script src="/_next/static/chunks/turbopack-b64e111cadf03885.js" async=""></script><script src="/_next/static/chunks/5df77c9395248155.js" async=""></script><script src="/_next/static/chunks/807aef58565dccb1.js" async=""></script><meta name="robots" content="noindex"/><title>dev3000</title><link rel="icon" href="/favicon.ico" type="image/x-icon"/><link rel="icon" href="/favicon.svg" type="image/svg+xml" sizes="32x32"/><link rel="icon" href="/favicon-16.svg" type="image/svg+xml" sizes="16x16"/><link rel="icon" href="/favicon-64.svg" type="image/svg+xml" sizes="64x64"/><link rel="apple-touch-icon" href="/favicon-180.png"/><link rel="shortcut icon" href="/favicon.svg"/><meta name="theme-color" content="#1f2937"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="h-full"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/39e9bdcc541cc428.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"$Sreact.view_transition\"\n3:I[83414,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n4:I[48876,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n5:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n8:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"ViewportBoundary\"]\na:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"MetadataBoundary\"]\nc:I[82165,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n:HL[\"/_next/static/chunks/59cdeaf92a780e96.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"CkJlsvUmQYBtGMl09c6Ht\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/59cdeaf92a780e96.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/5df77c9395248155.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/807aef58565dccb1.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$2\",null,{\"children\":[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"h-full\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"dev3000\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"32x32\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon-16.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"16x16\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon-64.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"64x64\"}],[\"$\",\"link\",null,{\"rel\":\"apple-touch-icon\",\"href\":\"/favicon-180.png\"}],[\"$\",\"link\",null,{\"rel\":\"shortcut icon\",\"href\":\"/favicon.svg\"}],[\"$\",\"meta\",null,{\"name\":\"theme-color\",\"content\":\"#1f2937\"}]]}],[\"$\",\"body\",null,{\"className\":\"h-full\",\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"7:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><!--HVxg1xsmhVm6VO2KBlH__--><html lang="en" class="h-full" vt-update="auto"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/59cdeaf92a780e96.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/39e9bdcc541cc428.js"/><script src="/_next/static/chunks/10099c90a1ca89ea.js" async=""></script><script src="/_next/static/chunks/13606014ef33124c.js" async=""></script><script src="/_next/static/chunks/4785978304fb9e19.js" async=""></script><script src="/_next/static/chunks/turbopack-b64e111cadf03885.js" async=""></script><script src="/_next/static/chunks/5df77c9395248155.js" async=""></script><script src="/_next/static/chunks/807aef58565dccb1.js" async=""></script><meta name="robots" content="noindex"/><title>dev3000</title><link rel="icon" href="/favicon.ico" type="image/x-icon"/><link rel="icon" href="/favicon.svg" type="image/svg+xml" sizes="32x32"/><link rel="icon" href="/favicon-16.svg" type="image/svg+xml" sizes="16x16"/><link rel="icon" href="/favicon-64.svg" type="image/svg+xml" sizes="64x64"/><link rel="apple-touch-icon" href="/favicon-180.png"/><link rel="shortcut icon" href="/favicon.svg"/><meta name="theme-color" content="#1f2937"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="h-full"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/39e9bdcc541cc428.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"$Sreact.view_transition\"\n3:I[83414,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n4:I[48876,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n5:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n8:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"ViewportBoundary\"]\na:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"MetadataBoundary\"]\nc:I[82165,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n:HL[\"/_next/static/chunks/59cdeaf92a780e96.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"HVxg1xsmhVm6VO2KBlH_-\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/59cdeaf92a780e96.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/5df77c9395248155.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/807aef58565dccb1.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$2\",null,{\"children\":[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"h-full\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"dev3000\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"32x32\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon-16.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"16x16\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon-64.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"64x64\"}],[\"$\",\"link\",null,{\"rel\":\"apple-touch-icon\",\"href\":\"/favicon-180.png\"}],[\"$\",\"link\",null,{\"rel\":\"shortcut icon\",\"href\":\"/favicon.svg\"}],[\"$\",\"meta\",null,{\"name\":\"theme-color\",\"content\":\"#1f2937\"}]]}],[\"$\",\"body\",null,{\"className\":\"h-full\",\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"7:null\nb:[]\n"])</script></body></html>
@@ -1,2 +1,2 @@
1
- <!DOCTYPE html><!--CkJlsvUmQYBtGMl09c6Ht--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/39e9bdcc541cc428.js"/><script src="/_next/static/chunks/10099c90a1ca89ea.js" async=""></script><script src="/_next/static/chunks/13606014ef33124c.js" async=""></script><script src="/_next/static/chunks/4785978304fb9e19.js" async=""></script><script src="/_next/static/chunks/turbopack-b64e111cadf03885.js" async=""></script><script src="/_next/static/chunks/5df77c9395248155.js" async=""></script><script src="/_next/static/chunks/807aef58565dccb1.js" async=""></script><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
- @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/39e9bdcc541cc428.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[83414,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n3:I[48876,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n4:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"ViewportBoundary\"]\n9:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"MetadataBoundary\"]\nb:I[82165,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"CkJlsvUmQYBtGMl09c6Ht\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/5df77c9395248155.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/807aef58565dccb1.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><!--HVxg1xsmhVm6VO2KBlH__--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/39e9bdcc541cc428.js"/><script src="/_next/static/chunks/10099c90a1ca89ea.js" async=""></script><script src="/_next/static/chunks/13606014ef33124c.js" async=""></script><script src="/_next/static/chunks/4785978304fb9e19.js" async=""></script><script src="/_next/static/chunks/turbopack-b64e111cadf03885.js" async=""></script><script src="/_next/static/chunks/5df77c9395248155.js" async=""></script><script src="/_next/static/chunks/807aef58565dccb1.js" async=""></script><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
+ @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/39e9bdcc541cc428.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[83414,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n3:I[48876,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n4:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"ViewportBoundary\"]\n9:I[51263,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"MetadataBoundary\"]\nb:I[82165,[\"/_next/static/chunks/5df77c9395248155.js\",\"/_next/static/chunks/807aef58565dccb1.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"HVxg1xsmhVm6VO2KBlH_-\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/5df77c9395248155.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/807aef58565dccb1.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"GYBAvNGhyt0e04IDYLQE5Jd6HEgDvaCgBOO1Eb9s8MA=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"VWPOJ13Ga3EWlNps49vahiiUNaHq8S+bcVqMAVwqTV4=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "GYBAvNGhyt0e04IDYLQE5Jd6HEgDvaCgBOO1Eb9s8MA="
4
+ "encryptionKey": "VWPOJ13Ga3EWlNps49vahiiUNaHq8S+bcVqMAVwqTV4="
5
5
  }
@@ -0,0 +1,3 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52867,(e,t,r)=>{t.exports=e.r(33104)},54735,e=>{"use strict";var t=e.i(42073),r=e.i(36546),s=e.i(61550),n=e.i(52867),l=e.i(23093),a=e.i(68860),o=e.i(54768);let i="#4A7C7E",c="#FF6B6B",d="#FFA500",u="#87CEEB",x="#B0B0B0",m="#9370DB",p="#FF69B4",g="#DDA0DD",h="#F0E68C",f="#F0E68C",b="#DC143C",N="#A0A0A0",j="#9370DB",v="#DDA0DD",y="#A0A0A0";function C(e){return[u,p,g,h,f,"#DDA0DD",v].includes(e)?"#000":"#FFF"}function w(e){let t=/\[(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z|\d{2}:\d{2}:\d{2}\.\d{3})\] \[([^\]]+)\] /,r=[],s=e.split("\n"),n=null;for(let e of s){if(!e.trim())continue;let s=e.match(t);if(s){let t,l;n&&r.push(n);let[a,o,i]=s,c=e.substring(a.length),d=/^TAB-\d+\.\d+$/.test(i),u=i,x=c;if(d){t=i;let e=c.match(/^\[([^\]]+)\] /);if(e&&(u=e[1],(x=c.substring(e[0].length)).includes("User-Agent:"))){let e=x.match(/User-Agent: ([^,\n]+)/);e&&(l=e[1])}}let m=x.match(/\[SCREENSHOT\] ([^\s[]+)/)?.[1],p=x.match(/\[SCREENCAST\] View jank analysis: ([^\s]+)/)?.[1],g=function(e){let t=e.match(/^\[CONSOLE LOG\] (.+)$/);if(!t)return e;let r=t[1];if(!r.includes("%c"))return e;let s=r;return s=(s=(s=s.replace(/%c/g,"")).replace(/\s+color:\s*[^{}\n]*?(?=\s*[{[]|$)/g,"")).replace(/\s+/g," ").trim(),`[CONSOLE LOG] ${s}`}(x);if((g=g.replace(/ \[CHROME_EXTENSION\]$/,"")).includes("[Network.webSocketFrameSent]")||g.includes("[Network.webSocketFrameReceived]")||g.includes("[Network.webSocketFrame")||g.includes("webSocketDebuggerUrl")&&g.includes("localhost")||g.includes("[NETWORK")&&g.includes("__PAGE__")&&g.includes("refresh")){n=null;continue}let h=o;if(/^\d{2}:\d{2}:\d{2}\.\d{3}$/.test(o)){let e=new Date,[t,r,s]=o.split(":"),[n,l]=s.split(".");e.setHours(parseInt(t,10),parseInt(r,10),parseInt(n,10),parseInt(l,10)),h=e.toISOString()}n={timestamp:h,source:u,message:g,screenshot:m,screencast:p,original:e,tabIdentifier:t,userAgent:l}}else n&&(n.message+=`
2
+ ${e}`,n.original+=`
3
+ ${e}`)}return n&&r.push(n),r}function k(e){let s,n,a=(0,r.c)(9),{url:o,maxLength:i}=e,c=void 0===i?60:i,[d,u]=(0,l.useState)(!1);if(o.length<=c){let e;return a[0]!==o?(e=(0,t.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline",children:o}),a[0]=o,a[1]=e):e=a[1],e}a[2]!==c||a[3]!==o?(s=o.substring(0,c),a[2]=c,a[3]=o,a[4]=s):s=a[4];let x=`${s}...`;return a[5]!==d||a[6]!==x||a[7]!==o?(n=(0,t.jsx)("span",{className:"inline-block",children:d?(0,t.jsxs)("span",{children:[(0,t.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline",children:o}),(0,t.jsx)("button",{type:"button",onClick:()=>u(!1),className:"ml-2 text-xs text-muted-foreground hover:text-foreground px-1 py-0.5 rounded hover:bg-muted",children:"[collapse]"})]}):(0,t.jsxs)("span",{children:[(0,t.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline",children:x}),(0,t.jsx)("button",{type:"button",onClick:()=>u(!0),className:"ml-1 text-xs text-muted-foreground hover:text-foreground px-1 py-0.5 rounded hover:bg-muted",children:"[expand]"})]})}),a[5]=d,a[6]=x,a[7]=o,a[8]=n):n=a[8],n}function E({content:e}){let[r,s]=(0,l.useState)(!1);try{let n=JSON.parse(e);if(n&&"object"==typeof n&&"object"===n.type&&n.properties){let e=n.properties,l=n.description||"Object",a=n.overflow;return(0,t.jsxs)("div",{className:"inline-block",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(!r),className:"inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 font-mono text-sm",children:[(0,t.jsx)("svg",{className:`w-3 h-3 transition-transform ${r?"rotate-90":""}`,fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 111.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})}),(0,t.jsx)("span",{className:"text-purple-600",children:l}),!r&&(0,t.jsxs)("span",{className:"text-gray-500",children:[a?"...":""," ","{",e.slice(0,3).map((e,r)=>(0,t.jsxs)("span",{children:[r>0&&", ",(0,t.jsx)("span",{className:"text-red-600",children:e.name}),":",(0,t.jsx)("span",{className:"text-blue-600",children:"string"===e.type?`"${e.value}"`:"number"===e.type?e.value:"object"===e.type?"array"===e.subtype?e.value:"{...}":e.value})]},`${e.name}-${r}`)),e.length>3&&", ...","}"]})]}),r&&(0,t.jsx)("div",{className:"mt-1 ml-4 border-l-2 border-gray-200 pl-3",children:(0,t.jsx)("div",{className:"font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-600",children:[l," ","{",(0,t.jsxs)("div",{className:"ml-4",children:[e.map((r,s)=>(0,t.jsxs)("div",{className:"py-0.5",children:[(0,t.jsx)("span",{className:"text-red-600",children:r.name}),(0,t.jsx)("span",{className:"text-gray-500",children:": "}),(0,t.jsx)("span",{className:"string"===r.type?"text-green-600":"number"===r.type?"text-blue-600":"object"===r.type?"text-purple-600":"text-orange-600",children:"string"===r.type?`"${String(r.value)}"`:"number"===r.type?String(r.value):"object"===r.type?"array"===r.subtype?String(r.value):"{...}":String(r.value)}),s<e.length-1&&(0,t.jsx)("span",{className:"text-gray-500",children:","})]},`${r.name}-${s}`)),a&&(0,t.jsx)("div",{className:"text-gray-500 italic",children:"... and more properties"})]}),(0,t.jsx)("div",{className:"text-gray-600",children:"}"})]})})})]})}return(0,t.jsxs)("div",{className:"inline-block",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(!r),className:"inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 font-mono text-sm",children:[(0,t.jsx)("svg",{className:`w-3 h-3 transition-transform ${r?"rotate-90":""}`,fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 111.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})}),(0,t.jsx)("span",{className:"text-purple-600",children:"Object"}),!r&&(0,t.jsxs)("span",{className:"text-gray-500",children:["{","...","}"]})]}),r&&(0,t.jsx)("div",{className:"mt-1 ml-4 border-l-2 border-gray-200 pl-3",children:(0,t.jsx)("pre",{className:"font-mono text-sm text-foreground whitespace-pre-wrap",children:JSON.stringify(n,null,2)})})]})}catch(r){return(0,t.jsx)("span",{children:e})}}function R(e){let n,l,a,o,w,R,A,I,L,$,D,F,B,M,P,W,H,G,V,U,_,z=(0,r.c)(59),{entry:K,darkMode:J}=e;z[0]!==K.message?(n=function(e){return e.includes("[INTERACTION]")?{type:"INTERACTION",backgroundColor:v,textColor:C(v)}:e.includes("[ERROR]")?{type:"ERROR",backgroundColor:c,textColor:C(c)}:e.includes("[WARNING]")?{type:"WARNING",backgroundColor:d,textColor:C(d)}:e.includes("[INFO]")?{type:"INFO",backgroundColor:u,textColor:C(u)}:e.includes("[LOG]")?{type:"LOG",backgroundColor:x,textColor:C(x)}:e.includes("[DEBUG]")?{type:"DEBUG",backgroundColor:m,textColor:C(m)}:e.includes("[SCREENSHOT]")?{type:"SCREENSHOT",backgroundColor:p,textColor:C(p)}:e.includes("[NAVIGATION]")||e.includes("[PAGE]")||e.includes("[DOM]")?{type:"DOM",backgroundColor:g,textColor:C(g)}:e.includes("[CDP]")?{type:"CDP",backgroundColor:h,textColor:C(h)}:e.includes("[NETWORK]")?{type:"NETWORK",backgroundColor:i,textColor:C(i)}:e.includes("[CRASH]")?{type:"CRASH",backgroundColor:b,textColor:C(b)}:e.includes("[EXIT]")?{type:"EXIT",backgroundColor:N,textColor:C(N)}:e.includes("[CHROME]")?{type:"CHROME",backgroundColor:f,textColor:C(f)}:e.includes("[REPLAY]")?{type:"REPLAY",backgroundColor:j,textColor:C(j)}:{type:"DEFAULT",color:"bg-gray-50 dark:bg-gray-800/50 border-gray-200 dark:border-gray-700",backgroundColor:y,textColor:C(y)}}(K.message),z[0]=K.message,z[1]=n):n=z[1];let X=n;z[2]!==X.backgroundColor||z[3]!==X.textColor?(l=e=>{let r,s=/\[([A-Z\s]+)\]/g,n=/\{[^{}]*(?:\{[^{}]*\}[^{}]*)*\}/g,l=/(https?:\/\/[^\s]+)/g,a=[],o=0;for(r=s.exec(e);null!==r;)r.index>o&&a.push(e.slice(o,r.index)),a.push((0,t.jsx)("span",{className:"inline-block px-1.5 py-0.5 rounded text-xs font-medium mr-1",style:{backgroundColor:X.backgroundColor,color:X.textColor},children:r[1]},r.index)),o=r.index+r[0].length,r=s.exec(e);return a.push(...((e,r)=>{let s=[...e.matchAll(n)],a=[...e.matchAll(l)],o=[...s.map(T),...a.map(O)];if(o.sort(S),0===o.length)return[e];let i=[],c=0;return o.forEach((s,n)=>{(s.index??0)>c&&i.push(e.slice(c,s.index??0)),"json"===s.type?i.push((0,t.jsx)(E,{content:s[0]},`${r}-json-${s.index}-${s[0].slice(0,20)}`)):"url"===s.type&&i.push((0,t.jsx)(k,{url:s[0]},`${r}-url-${s.index}-${s[0]}`)),c=(s.index??0)+s[0].length}),c<e.length&&i.push(e.slice(c)),i})(e.slice(o),"main")),a.length>0?a:e},z[2]=X.backgroundColor,z[3]=X.textColor,z[4]=l):l=z[4];let Y=l;z[5]!==J||z[6]!==X.type?(a=()=>{let e=X.type;if(J)switch(e){case"INTERACTION":case"CONSOLE DEBUG":case"DOM":return{backgroundColor:"rgba(88, 28, 135, 0.3)"};case"CONSOLE ERROR":case"ERROR":case"CRITICAL ERROR":return{backgroundColor:"rgba(127, 29, 29, 0.3)"};case"CONSOLE WARN":case"CDP":case"NETWORK":return{backgroundColor:"rgba(133, 77, 14, 0.3)"};case"CONSOLE INFO":case"SCREENSHOT":return{backgroundColor:"rgba(30, 58, 138, 0.3)"};case"PAGE":return{backgroundColor:"rgba(20, 83, 45, 0.3)"};default:return{backgroundColor:"rgba(17, 24, 39, 0.3)"}}switch(e){case"INTERACTION":case"CONSOLE DEBUG":case"DOM":return{backgroundColor:"rgba(250, 245, 255, 0.5)"};case"CONSOLE ERROR":case"ERROR":case"CRITICAL ERROR":return{backgroundColor:"rgba(254, 242, 242, 0.5)"};case"CONSOLE WARN":case"CDP":case"NETWORK":return{backgroundColor:"rgba(254, 252, 232, 0.5)"};case"CONSOLE INFO":case"SCREENSHOT":return{backgroundColor:"rgba(239, 246, 255, 0.5)"};case"PAGE":return{backgroundColor:"rgba(240, 253, 244, 0.5)"};default:return{backgroundColor:"transparent"}}},z[5]=J,z[6]=X.type,z[7]=a):a=z[7];let Z=a;z[8]!==X.type?(o=()=>{switch(X.type){case"INTERACTION":case"CONSOLE DEBUG":case"DOM":return"border-purple-200 dark:border-purple-800";case"CONSOLE ERROR":case"ERROR":case"CRITICAL ERROR":return"border-red-200 dark:border-red-800";case"CONSOLE WARN":case"CDP":case"NETWORK":return"border-yellow-200 dark:border-yellow-800";case"CONSOLE INFO":case"SCREENSHOT":return"border-blue-200 dark:border-blue-800";case"PAGE":return"border-green-200 dark:border-green-800";default:return"border-gray-200 dark:border-gray-700"}},z[8]=X.type,z[9]=o):o=z[9];let q=o,Q=`border-l-4 ${q()} pl-4 py-2`;z[10]!==Z?(w=Z(),z[10]=Z,z[11]=w):w=z[11],z[12]!==K.timestamp?(R=new Date(K.timestamp).toLocaleTimeString(),z[12]=K.timestamp,z[13]=R):R=z[13],z[14]!==R?(A=(0,t.jsx)("div",{className:"text-xs text-muted-foreground font-mono whitespace-nowrap pt-1",children:R}),z[14]=R,z[15]=A):A=z[15];let ee="SERVER"===K.source?"#32CD32":"#00CED1";if(z[16]!==ee?(I={backgroundColor:ee,color:"#000"},z[16]=ee,z[17]=I):I=z[17],z[18]!==K.source||z[19]!==I?(L=(0,t.jsx)("div",{className:"px-2 py-1 rounded text-xs font-medium whitespace-nowrap",style:I,children:K.source}),z[18]=K.source,z[19]=I,z[20]=L):L=z[20],z[21]!==K.message||z[22]!==Y?($=Y(K.message),z[21]=K.message,z[22]=Y,z[23]=$):$=z[23],z[24]!==$?(D=(0,t.jsx)("div",{className:"flex-1 min-w-0",children:$}),z[24]=$,z[25]=D):D=z[25],z[26]!==K.tabIdentifier?(F=K.tabIdentifier&&(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-muted text-muted-foreground",children:K.tabIdentifier}),z[26]=K.tabIdentifier,z[27]=F):F=z[27],z[28]!==K.userAgent?(B=K.userAgent&&(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-100 dark:bg-green-800 text-green-700 dark:text-green-200",children:K.userAgent.includes("Chrome")?"Chrome":K.userAgent.includes("Firefox")?"Firefox":K.userAgent.includes("Safari")?"Safari":K.userAgent.includes("Edge")?"Edge":"Browser"}),z[28]=K.userAgent,z[29]=B):B=z[29],z[30]!==K.message||z[31]!==K.source||z[32]!==K.tabIdentifier){let e,r;M="BROWSER"===K.source&&(e=K.message.includes("[PLAYWRIGHT]"),r=K.message.includes("[CHROME_EXTENSION]")||K.tabIdentifier,e?(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-purple-100 dark:bg-purple-800 text-purple-700 dark:text-purple-200",children:"🎭 Playwright"}):r?(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-100 dark:bg-blue-800 text-blue-700 dark:text-blue-200",children:"🧩 Extension"}):null),z[30]=K.message,z[31]=K.source,z[32]=K.tabIdentifier,z[33]=M}else M=z[33];return z[34]!==K.message||z[35]!==K.source?(P="SERVER"===K.source&&(()=>{let e=K.message.toLowerCase();if(e.includes("ready on http://localhost")||e.includes("ready in ")||e.includes("next.js")||e.includes("compiled client and server"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-black text-white",children:"▲ Next.js"});if(e.includes("nuxt")||e.includes("nitro")&&e.includes("http://localhost")||e.includes("universal mode")||e.includes("spa mode"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-500 text-white",children:"💚 Nuxt"});if(e.includes("vue-cli-service")||e.includes("vue")&&(e.includes("dev server")||e.includes("local:"))||e.includes("@vue/cli-service"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-600 text-white",children:"🟢 Vue"});if(e.includes("local:")&&e.includes("vite")||e.includes("dev server running")||e.includes("vite v"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-500 text-white",children:"⚡ Vite"});if(e.includes("rails server")||e.includes("puma starting")||e.includes("use ctrl-c to stop")||e.includes("listening on tcp://")&&e.includes("3000"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-red-600 text-white",children:"💎 Rails"});else if(e.includes("laravel development server")||e.includes("artisan serve")||e.includes("laravel")&&e.includes("127.0.0.1:8000"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-red-500 text-white",children:"🅻 Laravel"});else if(e.includes("express server")||e.includes("server listening on")||e.includes("app listening on port")||e.includes("node server"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-700 text-white",children:"🟩 Express"});else if(e.includes("django")||e.includes("development server")&&e.includes("127.0.0.1:8000")||e.includes("runserver"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-800 text-white",children:"🐍 Django"});else if(e.includes("flask")||e.includes("running on http://127.0.0.1:5000")||e.includes("debug mode: on"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-800 text-white",children:"🌶️ Flask"});else if(e.includes("sveltekit")||e.includes("svelte")&&e.includes("dev")||e.includes("@sveltejs"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-orange-500 text-white",children:"🔥 Svelte"});else if(e.includes("remix")||e.includes("@remix-run"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-400 text-white",children:"💿 Remix"});else if(e.includes("astro")||e.includes("@astrojs"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-purple-600 text-white",children:"🚀 Astro"});else if(e.includes("spring boot")||e.includes("tomcat started on port")||e.includes("started application")&&e.includes("seconds"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-500 text-white",children:"🍃 Spring"});else if(e.includes("webpack compiled")||e.includes("compiled successfully")||e.includes("webpack-dev-server"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-600 text-white",children:"⚛️ React"});return null})(),z[34]=K.message,z[35]=K.source,z[36]=P):P=z[36],z[37]!==F||z[38]!==B||z[39]!==M||z[40]!==P?(W=(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[F,B,M,P]}),z[37]=F,z[38]=B,z[39]=M,z[40]=P,z[41]=W):W=z[41],z[42]!==D||z[43]!==W?(H=(0,t.jsx)("div",{className:"font-mono text-sm min-w-0 text-foreground",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-2",children:[D,W]})}),z[42]=D,z[43]=W,z[44]=H):H=z[44],z[45]!==L||z[46]!==H||z[47]!==A?(G=(0,t.jsxs)("div",{className:"grid grid-cols-[auto_auto_1fr] gap-3 items-start",children:[A,L,H]}),z[45]=L,z[46]=H,z[47]=A,z[48]=G):G=z[48],z[49]!==K.screenshot?(V=K.screenshot&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{src:K.screenshot.startsWith("http")?K.screenshot:`/api/screenshots/${K.screenshot}`,alt:"Screenshot",width:800,height:600,className:"w-full h-auto max-w-2xl border rounded shadow-sm",style:{maxHeight:"600px",objectFit:"contain"},unoptimized:!0})}),z[49]=K.screenshot,z[50]=V):V=z[50],z[51]!==K.screencast?(U=K.screencast&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)("a",{href:K.screencast,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors",children:[(0,t.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]}),"View Jank Analysis Video"]})}),z[51]=K.screencast,z[52]=U):U=z[52],z[53]!==G||z[54]!==V||z[55]!==U||z[56]!==Q||z[57]!==w?(_=(0,t.jsxs)("div",{className:Q,style:w,children:[G,V,U]}),z[53]=G,z[54]=V,z[55]=U,z[56]=Q,z[57]=w,z[58]=_):_=z[58],_}function S(e,t){return(e.index??0)-(t.index??0)}function O(e){return{...e,type:"url"}}function T(e){return{...e,type:"json"}}function A({version:e,initialData:r}){let s=(0,n.useRouter)(),i=(0,n.useSearchParams)(),[c,d]=(0,o.useDarkMode)(),[u,x]=(0,l.useState)(r?.logs||[]),[m,p]=(0,l.useState)(r?.mode||"tail");(0,l.useEffect)(()=>{let e=i.get("mode");e&&e!==m&&p(e)},[i,m]);let[g,h]=(0,l.useState)(!0),[f,b]=(0,l.useState)(!r),[N,j]=(0,l.useState)(r?.logs.length||0),[v,y]=(0,l.useState)(null),[C,k]=(0,l.useState)(r?.logFiles||[]),[E,S]=(0,l.useState)(r?.currentLogFile||""),[O,T]=(0,l.useState)(""),[A,I]=(0,l.useState)(!1),[L,$]=(0,l.useState)(!1),[D,F]=(0,l.useState)(!1),[B,M]=(0,l.useState)(!1),[P,W]=(0,l.useState)([]),[H,G]=(0,l.useState)(!1),[V,U]=(0,l.useState)(0),[_]=(0,l.useState)(5),[z,K]=(0,l.useState)(null),[J,X]=(0,l.useState)(!1),[Y,Z]=(0,l.useState)({browser:!0,server:!0,interaction:!0,screenshot:!0}),[q,Q]=(0,l.useState)({}),[ee,et]=(0,l.useState)([]),er=(0,l.useRef)(null),es=(0,l.useRef)(null),en=(0,l.useRef)(null),el=(0,l.useRef)(null),ea=(0,l.useRef)(null),eo=(0,l.useRef)(!1),ei=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/logs/list");if(e.ok){let t=await e.json();return k(t.files),S(t.currentFile),T(t.projectName),!0}return!1}catch(e){return console.error("Error loading available logs:",e),!1}},[]),ec=(0,l.useCallback)(async()=>{if("tail"===m)try{let e=i.get("file"),t="",r=!0;if(e&&C.length>0){let s=C.find(t=>t.name===e);t=s?.path||E,r=s?.isCurrent!==!1}else t=E,r=!0;if(!r)return;let s=t?`/api/logs/tail?lines=50&logPath=${encodeURIComponent(t)}`:"/api/logs/tail?lines=50";if(z===s&&V>=_){console.error(`Maximum retry attempts (${_}) reached for ${s}. Stopping polling.`),en.current&&(clearInterval(en.current),en.current=null);return}let n=await fetch(s);if(!n.ok)throw Error(`HTTP ${n.status}: ${n.statusText}`);(z===s||V>0)&&(U(0),K(null));let l=await n.json();if(!l.logs)return void console.warn("No logs data in response");let a=w(l.logs);if(a.length>N)if(g)y(new Date),ee.length>0?(x([...u,...ee,...a.slice(N)]),et([])):x(a),j(a.length),eo.current||setTimeout(()=>{er.current?.scrollIntoView({behavior:"smooth"})},50);else{let e=a.slice(N);e.length>0&&(et(t=>[...t,...e]),j(a.length))}}catch(s){console.error("Error polling logs:",s);let e=i.get("file"),t="";if(e&&C.length>0){let r=C.find(t=>t.name===e);t=r?.path||E}else t=E;let r=t?`/api/logs/tail?lines=50&logPath=${encodeURIComponent(t)}`:"/api/logs/tail?lines=50";if(z===r){let e=V+1;U(e),e>=_&&(console.error(`Maximum retry attempts (${_}) reached for ${r}. Stopping polling.`),en.current&&(clearInterval(en.current),en.current=null))}else K(r),U(1)}},[m,g,i,C,E,N,ee,u,V,z,_]);(0,l.useEffect)(()=>{if("tail"===m&&V<_)return en.current=setInterval(ec,3e3),()=>{en.current&&clearInterval(en.current)};en.current&&clearInterval(en.current)},[m,ec,V,_]);let ed=(0,l.useCallback)(async()=>{if(V>=_)return void console.log("Max retries reached, not attempting to load");if(b(!0),!await ei())return void b(!1);try{let e=i.get("file"),t="";if(e&&C.length>0){let r=C.find(t=>t.name===e);t=r?.path||E}else t=E;let r=t?`/api/logs/${m}?lines=1000&logPath=${encodeURIComponent(t)}`:`/api/logs/${m}?lines=1000`;if(z===r&&V>=_){console.error(`Maximum retry attempts (${_}) reached for ${r}. Not attempting to load.`),x([]),b(!1);return}let s=await fetch(r);if(!s.ok)throw Error(`HTTP ${s.status}: ${s.statusText}`);(z===r||V>0)&&(U(0),K(null));let n=await s.json();if(!n.logs){console.warn("No logs data in response"),x([]),b(!1);return}let l=w(n.logs);if(x(l),j(l.length),y(new Date),b(!1),"tail"===m&&!eo.current){h(!0);let e=()=>{er.current?er.current.scrollIntoView({behavior:"auto"}):es.current&&(es.current.scrollTop=es.current.scrollHeight)};setTimeout(e,0),setTimeout(e,100)}}catch(s){console.error("Error loading logs:",s);let e=i.get("file"),t="";if(e&&C.length>0){let r=C.find(t=>t.name===e);t=r?.path||E}else t=E;let r=t?`/api/logs/${m}?lines=1000&logPath=${encodeURIComponent(t)}`:`/api/logs/${m}?lines=1000`;if(z===r){let e=V+1;U(e),e>=_&&console.error(`Maximum retry attempts (${_}) reached for initial load of ${r}.`)}else K(r),U(1);x([])}finally{b(!1)}},[ei,i,C,E,m,V,z,_]);(0,l.useEffect)(()=>{let e=r?.logs&&r?.logs.length>0;if(J||e||u.length){if(e&&0===u.length&&(x(r.logs),b(!1),"tail"===m&&!eo.current)){h(!0);let e=()=>{er.current?er.current.scrollIntoView({behavior:"auto"}):es.current&&(es.current.scrollTop=es.current.scrollHeight)};setTimeout(e,0),setTimeout(e,100),setTimeout(e,300)}}else X(!0),ed()},[m,r,u.length,J,ed]),(0,l.useEffect)(()=>{u.length>0&&"tail"===m&&g&&!eo.current&&setTimeout(()=>{er.current?er.current.scrollIntoView({behavior:"auto"}):es.current&&(es.current.scrollTop=es.current.scrollHeight)},0)},[u.length,m,g]),(0,l.useEffect)(()=>()=>{en.current&&clearInterval(en.current)},[]),(0,l.useEffect)(()=>{let e=e=>{el.current&&!el.current.contains(e.target)&&I(!1),ea.current&&!ea.current.contains(e.target)&&F(!1)};if(A||D)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[A,D]);let eu=async()=>{if(E&&!H&&window.confirm("Clear logs and start fresh?\n\nThis will:\n• Archive the current log file\n• Start a new empty log file\n• Clear the current view\n\nThe archived logs will still be available in the dropdown.")){G(!0);try{let e=await fetch("/api/logs/rotate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentLogPath:E})});if(e.ok)x([]),j(0),y(null),await ei(),await ed();else{let t=await e.json();console.error("Failed to rotate log:",t),alert(`Failed to rotate log: ${t.error}`)}}catch(e){console.error("Error rotating log:",e),alert("Error rotating log")}finally{G(!1)}}},ex=(0,l.useMemo)(()=>{let e=new Set;return u.forEach(t=>{"BROWSER"===t.source&&t.userAgent&&e.add(t.userAgent)}),Array.from(e).sort()},[u]);(0,l.useEffect)(()=>{ex.length>0&&Q(e=>{let t={...e};return ex.forEach(e=>{e in t||(t[e]=!0)}),t})},[ex]);let em=(0,l.useMemo)(()=>u.filter(e=>{let t=e.message.includes("[INTERACTION]"),r=e.message.includes("[SCREENSHOT]");if(t)return Y.interaction;if(r)return Y.screenshot;if("SERVER"===e.source)return Y.server;if("BROWSER"===e.source){if(!Y.browser)return!1;if(ex.length>0&&e.userAgent)return!1!==q[e.userAgent]}return!0}),[u,Y,q,ex]);return(0,t.jsxs)("div",{className:"h-screen bg-background text-foreground flex flex-col transition-colors",children:[(0,t.jsx)("div",{className:"bg-card shadow-sm border-b border-border flex-none z-10",children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 py-3",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"text-xl sm:text-2xl font-bold whitespace-nowrap",children:"dev3000"}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:["(v",e,")"]})]}),C.length>1?(0,t.jsxs)("div",{className:"relative",ref:el,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>I(!A),className:"flex items-center gap-2 px-3 py-1 text-sm text-muted-foreground hover:text-foreground hover:bg-accent rounded-md transition-colors",children:[(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:f&&!E?(0,t.jsx)("div",{className:"h-4 bg-muted rounded animate-pulse",style:{width:"220px"}}):E?"Current":"No log file"}),(0,t.jsx)("svg",{className:`w-4 h-4 transition-transform ${A?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),A&&C.length>1&&(0,t.jsx)("div",{className:"absolute top-full left-0 mt-1 bg-card border border-border rounded-md shadow-lg z-20 min-w-80",children:(0,t.jsxs)("div",{className:"py-1 max-h-60 overflow-y-auto",children:[(0,t.jsxs)("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground border-b border-border",children:[O," logs (",C.length,")"]}),C.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{I(!1),s.push(`/logs?file=${encodeURIComponent(e.name)}&mode=${m}`)},className:`w-full text-left px-3 py-2 text-sm hover:bg-accent flex items-center justify-between ${e.isCurrent?"bg-primary/10 text-primary":"text-foreground"}`,children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-mono text-xs",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[new Date(e.mtime).toLocaleString()," • ",Math.round(e.size/1024),"KB"]})]}),e.isCurrent&&(0,t.jsx)("span",{className:"text-xs text-blue-600 font-medium",children:"current"})]},e.path))]})})]}):(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"font-mono text-xs text-gray-600 px-3 py-1 whitespace-nowrap",children:f&&!E?(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded animate-pulse",style:{width:"220px"}}):E?E.split("/").pop():"No log file"})}),u.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 hidden sm:flex",children:[(0,t.jsxs)("span",{className:"text-sm text-muted-foreground",children:[u.length," entries"]}),E&&!f&&(0,t.jsx)("button",{type:"button",onClick:eu,disabled:H,className:"p-0.5 text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Clear logs (rotate current log to archive and start fresh)",children:H?(0,t.jsx)("div",{className:"w-3 h-3 border border-current border-t-transparent rounded-full animate-spin"}):(0,t.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),ee.length>0&&!g&&(0,t.jsxs)("span",{className:"text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full",children:["+",ee.length," buffered"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!1,(0,t.jsxs)("div",{className:"relative",ref:ea,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>F(!D),className:"flex items-center gap-1 px-3 py-1 rounded text-sm font-medium transition-colors whitespace-nowrap bg-muted text-muted-foreground hover:bg-muted/80",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filter"]}),D&&(0,t.jsx)("div",{className:"absolute top-full right-0 mt-1 bg-card border border-border rounded-md shadow-lg z-20 min-w-48",children:(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground border-b border-border",children:"Log Types"}),(0,t.jsxs)("label",{className:"flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:Y.server,onChange:e=>Z(t=>({...t,server:e.target.checked})),className:"rounded border-input text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-foreground",children:"Server"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(e=>"SERVER"===e.source).length})]}),(0,t.jsxs)("label",{className:"flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:Y.browser,onChange:e=>Z(t=>({...t,browser:e.target.checked})),className:"rounded border-input text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-foreground",children:"Browser"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(e=>"BROWSER"===e.source).length})]}),ex.length>1&&Y.browser&&(0,t.jsx)("div",{className:"ml-6 border-l border-border pl-2",children:ex.map(e=>{let r=e.includes("Chrome")?"Chrome":e.includes("Firefox")?"Firefox":e.includes("Safari")?"Safari":e.includes("Edge")?"Edge":"Browser";return(0,t.jsxs)("label",{className:"flex items-center justify-between px-2 py-1 text-xs hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:!1!==q[e],onChange:t=>Q(r=>({...r,[e]:t.target.checked})),className:"rounded border-input text-primary focus:ring-ring w-3 h-3"}),(0,t.jsx)("span",{className:"text-foreground",children:r})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(t=>"BROWSER"===t.source&&t.userAgent===e).length})]},e)})}),(0,t.jsxs)("label",{className:"flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:Y.interaction,onChange:e=>Z(t=>({...t,interaction:e.target.checked})),className:"rounded border-input text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-foreground",children:"Interaction"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(e=>e.message.includes("[INTERACTION]")).length})]}),(0,t.jsxs)("label",{className:"flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:Y.screenshot,onChange:e=>Z(t=>({...t,screenshot:e.target.checked})),className:"rounded border-input text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-foreground",children:"Screenshot"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(e=>e.message.includes("[SCREENSHOT]")).length})]})]})})]}),(0,t.jsx)(a.DarkModeToggle,{darkMode:c,setDarkMode:d,className:"ml-2"})]})]})})}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,t.jsx)("div",{ref:es,className:"max-w-7xl mx-auto px-4 py-6 h-full overflow-y-auto",onScroll:()=>{if(es.current){let{scrollTop:e,scrollHeight:t,clientHeight:r}=es.current,s=e+r>=t-10;g&&!s&&(eo.current=!0),h(s)}},children:f?(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),(0,t.jsx)("div",{className:"text-muted-foreground text-sm mt-4",children:"Loading logs..."})]}):0===u.length?(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("div",{className:"text-muted-foreground text-lg",children:"📝 No logs yet"}),(0,t.jsx)("div",{className:"text-muted-foreground text-sm mt-2",children:V>=_?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-red-500 mb-2",children:["Failed to load logs after ",_," attempts."]}),(0,t.jsx)("button",{type:"button",onClick:()=>{U(0),K(null),X(!1),ed()},className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Retry"})]}):"Logs will appear here as your development server runs"})]}):0===em.length?(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("div",{className:"text-muted-foreground text-lg",children:"🔍 No logs match current filters"}),(0,t.jsx)("div",{className:"text-muted-foreground text-sm mt-2",children:"Try adjusting your filter settings to see more logs"})]}):(0,t.jsxs)("div",{className:"space-y-1 pb-4",children:[em.map((e,r)=>(0,t.jsx)(R,{entry:e,darkMode:c},`${e.timestamp}-${r}`)),(0,t.jsx)("div",{ref:er})]})})}),(0,t.jsx)("div",{className:"border-t border-border bg-muted/50 flex-none",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[v&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground font-mono",children:["Last updated ",v.toLocaleTimeString()]}),E&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground font-mono break-all",children:E})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("div",{className:`flex items-center gap-1 text-green-600 ${"tail"===m&&g?"visible":"invisible"}`,children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),(0,t.jsx)("span",{className:"text-xs",children:"Live"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{eo.current=!1,ee.length>0&&(x(e=>[...e,...ee]),et([]),y(new Date)),er.current?.scrollIntoView({behavior:"smooth"})},className:`absolute top-0 right-0 flex items-center gap-1 px-2 py-0.5 bg-blue-600 text-white rounded text-xs hover:bg-blue-700 whitespace-nowrap ${"tail"===m&&!g?"visible":"invisible"}`,children:"↓ Live"})]})]})})]})}e.s(["default",()=>A],54735)}]);
@@ -322,6 +322,12 @@ function LogEntryComponent({ entry, darkMode }: { entry: LogEntry; darkMode: boo
322
322
  backgroundColor: LOG_COLORS.CRASH,
323
323
  textColor: getTextColor(LOG_COLORS.CRASH)
324
324
  }
325
+ if (message.includes("[EXIT]"))
326
+ return {
327
+ type: "EXIT",
328
+ backgroundColor: LOG_COLORS.EXIT,
329
+ textColor: getTextColor(LOG_COLORS.EXIT)
330
+ }
325
331
  if (message.includes("[CHROME]"))
326
332
  return {
327
333
  type: "CHROME",
@@ -206,8 +206,16 @@ function calculateErrorPriority(
206
206
  // Strip ANSI escape codes before constructing regex pattern (fixes #74)
207
207
  // biome-ignore lint/suspicious/noControlCharactersInRegex: ANSI escape codes require control characters
208
208
  const cleanLine = errorLine.replace(/\x1b\[[0-9;]*m/g, "")
209
- const errorPattern = cleanLine.replace(/\d+/g, "\\d+").substring(0, 100)
210
- const occurrences = allErrors.filter((e) => new RegExp(errorPattern).test(e)).length
209
+ // Escape regex special characters, then replace digit sequences with \d+
210
+ const escapedLine = cleanLine.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
211
+ const errorPattern = escapedLine.replace(/\d+/g, "\\d+").substring(0, 100)
212
+ let occurrences = 0
213
+ try {
214
+ occurrences = allErrors.filter((e) => new RegExp(errorPattern).test(e)).length
215
+ } catch {
216
+ // If regex still fails for some reason, just count exact matches
217
+ occurrences = allErrors.filter((e) => e.includes(cleanLine.substring(0, 50))).length
218
+ }
211
219
  if (occurrences > 1) {
212
220
  score += (occurrences - 1) * 50
213
221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev3000",
3
- "version": "0.0.149",
3
+ "version": "0.0.151",
4
4
  "description": "AI-powered development tools with browser monitoring and MCP server integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -95,8 +95,8 @@
95
95
  "vitest": "^3.2.4"
96
96
  },
97
97
  "optionalDependencies": {
98
- "@d3k/darwin-arm64": "0.0.149",
99
- "@d3k/linux-x64": "0.0.149",
98
+ "@d3k/darwin-arm64": "0.0.151",
99
+ "@d3k/linux-x64": "0.0.151",
100
100
  "@opentui/core-linux-x64": "^0.1.71"
101
101
  },
102
102
  "engines": {
@@ -49,6 +49,7 @@ const TYPE_COLORS: Record<string, string> = {
49
49
  CDP: LOG_COLORS.CDP,
50
50
  CHROME: LOG_COLORS.CHROME,
51
51
  CRASH: LOG_COLORS.CRASH,
52
+ EXIT: LOG_COLORS.EXIT,
52
53
  REPLAY: LOG_COLORS.REPLAY,
53
54
  NAVIGATION: LOG_COLORS.NAVIGATION,
54
55
  INTERACTION: LOG_COLORS.INTERACTION,
@@ -1,3 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52867,(e,t,r)=>{t.exports=e.r(33104)},54735,e=>{"use strict";var t=e.i(42073),r=e.i(36546),s=e.i(61550),n=e.i(52867),l=e.i(23093),a=e.i(68860),o=e.i(54768);let i="#4A7C7E",c="#FF6B6B",d="#FFA500",u="#87CEEB",x="#B0B0B0",m="#9370DB",p="#FF69B4",g="#DDA0DD",h="#F0E68C",f="#F0E68C",b="#DC143C",N="#9370DB",j="#DDA0DD",v="#A0A0A0";function y(e){return[u,p,g,h,f,"#DDA0DD",j].includes(e)?"#000":"#FFF"}function w(e){let t=/\[(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z|\d{2}:\d{2}:\d{2}\.\d{3})\] \[([^\]]+)\] /,r=[],s=e.split("\n"),n=null;for(let e of s){if(!e.trim())continue;let s=e.match(t);if(s){let t,l;n&&r.push(n);let[a,o,i]=s,c=e.substring(a.length),d=/^TAB-\d+\.\d+$/.test(i),u=i,x=c;if(d){t=i;let e=c.match(/^\[([^\]]+)\] /);if(e&&(u=e[1],(x=c.substring(e[0].length)).includes("User-Agent:"))){let e=x.match(/User-Agent: ([^,\n]+)/);e&&(l=e[1])}}let m=x.match(/\[SCREENSHOT\] ([^\s[]+)/)?.[1],p=x.match(/\[SCREENCAST\] View jank analysis: ([^\s]+)/)?.[1],g=function(e){let t=e.match(/^\[CONSOLE LOG\] (.+)$/);if(!t)return e;let r=t[1];if(!r.includes("%c"))return e;let s=r;return s=(s=(s=s.replace(/%c/g,"")).replace(/\s+color:\s*[^{}\n]*?(?=\s*[{[]|$)/g,"")).replace(/\s+/g," ").trim(),`[CONSOLE LOG] ${s}`}(x);if((g=g.replace(/ \[CHROME_EXTENSION\]$/,"")).includes("[Network.webSocketFrameSent]")||g.includes("[Network.webSocketFrameReceived]")||g.includes("[Network.webSocketFrame")||g.includes("webSocketDebuggerUrl")&&g.includes("localhost")||g.includes("[NETWORK")&&g.includes("__PAGE__")&&g.includes("refresh")){n=null;continue}let h=o;if(/^\d{2}:\d{2}:\d{2}\.\d{3}$/.test(o)){let e=new Date,[t,r,s]=o.split(":"),[n,l]=s.split(".");e.setHours(parseInt(t,10),parseInt(r,10),parseInt(n,10),parseInt(l,10)),h=e.toISOString()}n={timestamp:h,source:u,message:g,screenshot:m,screencast:p,original:e,tabIdentifier:t,userAgent:l}}else n&&(n.message+=`
2
- ${e}`,n.original+=`
3
- ${e}`)}return n&&r.push(n),r}function C(e){let s,n,a=(0,r.c)(9),{url:o,maxLength:i}=e,c=void 0===i?60:i,[d,u]=(0,l.useState)(!1);if(o.length<=c){let e;return a[0]!==o?(e=(0,t.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline",children:o}),a[0]=o,a[1]=e):e=a[1],e}a[2]!==c||a[3]!==o?(s=o.substring(0,c),a[2]=c,a[3]=o,a[4]=s):s=a[4];let x=`${s}...`;return a[5]!==d||a[6]!==x||a[7]!==o?(n=(0,t.jsx)("span",{className:"inline-block",children:d?(0,t.jsxs)("span",{children:[(0,t.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline",children:o}),(0,t.jsx)("button",{type:"button",onClick:()=>u(!1),className:"ml-2 text-xs text-muted-foreground hover:text-foreground px-1 py-0.5 rounded hover:bg-muted",children:"[collapse]"})]}):(0,t.jsxs)("span",{children:[(0,t.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline",children:x}),(0,t.jsx)("button",{type:"button",onClick:()=>u(!0),className:"ml-1 text-xs text-muted-foreground hover:text-foreground px-1 py-0.5 rounded hover:bg-muted",children:"[expand]"})]})}),a[5]=d,a[6]=x,a[7]=o,a[8]=n):n=a[8],n}function k({content:e}){let[r,s]=(0,l.useState)(!1);try{let n=JSON.parse(e);if(n&&"object"==typeof n&&"object"===n.type&&n.properties){let e=n.properties,l=n.description||"Object",a=n.overflow;return(0,t.jsxs)("div",{className:"inline-block",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(!r),className:"inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 font-mono text-sm",children:[(0,t.jsx)("svg",{className:`w-3 h-3 transition-transform ${r?"rotate-90":""}`,fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 111.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})}),(0,t.jsx)("span",{className:"text-purple-600",children:l}),!r&&(0,t.jsxs)("span",{className:"text-gray-500",children:[a?"...":""," ","{",e.slice(0,3).map((e,r)=>(0,t.jsxs)("span",{children:[r>0&&", ",(0,t.jsx)("span",{className:"text-red-600",children:e.name}),":",(0,t.jsx)("span",{className:"text-blue-600",children:"string"===e.type?`"${e.value}"`:"number"===e.type?e.value:"object"===e.type?"array"===e.subtype?e.value:"{...}":e.value})]},`${e.name}-${r}`)),e.length>3&&", ...","}"]})]}),r&&(0,t.jsx)("div",{className:"mt-1 ml-4 border-l-2 border-gray-200 pl-3",children:(0,t.jsx)("div",{className:"font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-600",children:[l," ","{",(0,t.jsxs)("div",{className:"ml-4",children:[e.map((r,s)=>(0,t.jsxs)("div",{className:"py-0.5",children:[(0,t.jsx)("span",{className:"text-red-600",children:r.name}),(0,t.jsx)("span",{className:"text-gray-500",children:": "}),(0,t.jsx)("span",{className:"string"===r.type?"text-green-600":"number"===r.type?"text-blue-600":"object"===r.type?"text-purple-600":"text-orange-600",children:"string"===r.type?`"${String(r.value)}"`:"number"===r.type?String(r.value):"object"===r.type?"array"===r.subtype?String(r.value):"{...}":String(r.value)}),s<e.length-1&&(0,t.jsx)("span",{className:"text-gray-500",children:","})]},`${r.name}-${s}`)),a&&(0,t.jsx)("div",{className:"text-gray-500 italic",children:"... and more properties"})]}),(0,t.jsx)("div",{className:"text-gray-600",children:"}"})]})})})]})}return(0,t.jsxs)("div",{className:"inline-block",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(!r),className:"inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 font-mono text-sm",children:[(0,t.jsx)("svg",{className:`w-3 h-3 transition-transform ${r?"rotate-90":""}`,fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 111.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})}),(0,t.jsx)("span",{className:"text-purple-600",children:"Object"}),!r&&(0,t.jsxs)("span",{className:"text-gray-500",children:["{","...","}"]})]}),r&&(0,t.jsx)("div",{className:"mt-1 ml-4 border-l-2 border-gray-200 pl-3",children:(0,t.jsx)("pre",{className:"font-mono text-sm text-foreground whitespace-pre-wrap",children:JSON.stringify(n,null,2)})})]})}catch(r){return(0,t.jsx)("span",{children:e})}}function E(e){let n,l,a,o,w,E,T,A,I,L,$,D,F,B,M,P,W,H,G,V,U,_=(0,r.c)(59),{entry:z,darkMode:K}=e;_[0]!==z.message?(n=function(e){return e.includes("[INTERACTION]")?{type:"INTERACTION",backgroundColor:j,textColor:y(j)}:e.includes("[ERROR]")?{type:"ERROR",backgroundColor:c,textColor:y(c)}:e.includes("[WARNING]")?{type:"WARNING",backgroundColor:d,textColor:y(d)}:e.includes("[INFO]")?{type:"INFO",backgroundColor:u,textColor:y(u)}:e.includes("[LOG]")?{type:"LOG",backgroundColor:x,textColor:y(x)}:e.includes("[DEBUG]")?{type:"DEBUG",backgroundColor:m,textColor:y(m)}:e.includes("[SCREENSHOT]")?{type:"SCREENSHOT",backgroundColor:p,textColor:y(p)}:e.includes("[NAVIGATION]")||e.includes("[PAGE]")||e.includes("[DOM]")?{type:"DOM",backgroundColor:g,textColor:y(g)}:e.includes("[CDP]")?{type:"CDP",backgroundColor:h,textColor:y(h)}:e.includes("[NETWORK]")?{type:"NETWORK",backgroundColor:i,textColor:y(i)}:e.includes("[CRASH]")?{type:"CRASH",backgroundColor:b,textColor:y(b)}:e.includes("[CHROME]")?{type:"CHROME",backgroundColor:f,textColor:y(f)}:e.includes("[REPLAY]")?{type:"REPLAY",backgroundColor:N,textColor:y(N)}:{type:"DEFAULT",color:"bg-gray-50 dark:bg-gray-800/50 border-gray-200 dark:border-gray-700",backgroundColor:v,textColor:y(v)}}(z.message),_[0]=z.message,_[1]=n):n=_[1];let J=n;_[2]!==J.backgroundColor||_[3]!==J.textColor?(l=e=>{let r,s=/\[([A-Z\s]+)\]/g,n=/\{[^{}]*(?:\{[^{}]*\}[^{}]*)*\}/g,l=/(https?:\/\/[^\s]+)/g,a=[],o=0;for(r=s.exec(e);null!==r;)r.index>o&&a.push(e.slice(o,r.index)),a.push((0,t.jsx)("span",{className:"inline-block px-1.5 py-0.5 rounded text-xs font-medium mr-1",style:{backgroundColor:J.backgroundColor,color:J.textColor},children:r[1]},r.index)),o=r.index+r[0].length,r=s.exec(e);return a.push(...((e,r)=>{let s=[...e.matchAll(n)],a=[...e.matchAll(l)],o=[...s.map(O),...a.map(S)];if(o.sort(R),0===o.length)return[e];let i=[],c=0;return o.forEach((s,n)=>{(s.index??0)>c&&i.push(e.slice(c,s.index??0)),"json"===s.type?i.push((0,t.jsx)(k,{content:s[0]},`${r}-json-${s.index}-${s[0].slice(0,20)}`)):"url"===s.type&&i.push((0,t.jsx)(C,{url:s[0]},`${r}-url-${s.index}-${s[0]}`)),c=(s.index??0)+s[0].length}),c<e.length&&i.push(e.slice(c)),i})(e.slice(o),"main")),a.length>0?a:e},_[2]=J.backgroundColor,_[3]=J.textColor,_[4]=l):l=_[4];let Y=l;_[5]!==K||_[6]!==J.type?(a=()=>{let e=J.type;if(K)switch(e){case"INTERACTION":case"CONSOLE DEBUG":case"DOM":return{backgroundColor:"rgba(88, 28, 135, 0.3)"};case"CONSOLE ERROR":case"ERROR":case"CRITICAL ERROR":return{backgroundColor:"rgba(127, 29, 29, 0.3)"};case"CONSOLE WARN":case"CDP":case"NETWORK":return{backgroundColor:"rgba(133, 77, 14, 0.3)"};case"CONSOLE INFO":case"SCREENSHOT":return{backgroundColor:"rgba(30, 58, 138, 0.3)"};case"PAGE":return{backgroundColor:"rgba(20, 83, 45, 0.3)"};default:return{backgroundColor:"rgba(17, 24, 39, 0.3)"}}switch(e){case"INTERACTION":case"CONSOLE DEBUG":case"DOM":return{backgroundColor:"rgba(250, 245, 255, 0.5)"};case"CONSOLE ERROR":case"ERROR":case"CRITICAL ERROR":return{backgroundColor:"rgba(254, 242, 242, 0.5)"};case"CONSOLE WARN":case"CDP":case"NETWORK":return{backgroundColor:"rgba(254, 252, 232, 0.5)"};case"CONSOLE INFO":case"SCREENSHOT":return{backgroundColor:"rgba(239, 246, 255, 0.5)"};case"PAGE":return{backgroundColor:"rgba(240, 253, 244, 0.5)"};default:return{backgroundColor:"transparent"}}},_[5]=K,_[6]=J.type,_[7]=a):a=_[7];let X=a;_[8]!==J.type?(o=()=>{switch(J.type){case"INTERACTION":case"CONSOLE DEBUG":case"DOM":return"border-purple-200 dark:border-purple-800";case"CONSOLE ERROR":case"ERROR":case"CRITICAL ERROR":return"border-red-200 dark:border-red-800";case"CONSOLE WARN":case"CDP":case"NETWORK":return"border-yellow-200 dark:border-yellow-800";case"CONSOLE INFO":case"SCREENSHOT":return"border-blue-200 dark:border-blue-800";case"PAGE":return"border-green-200 dark:border-green-800";default:return"border-gray-200 dark:border-gray-700"}},_[8]=J.type,_[9]=o):o=_[9];let Z=o,q=`border-l-4 ${Z()} pl-4 py-2`;_[10]!==X?(w=X(),_[10]=X,_[11]=w):w=_[11],_[12]!==z.timestamp?(E=new Date(z.timestamp).toLocaleTimeString(),_[12]=z.timestamp,_[13]=E):E=_[13],_[14]!==E?(T=(0,t.jsx)("div",{className:"text-xs text-muted-foreground font-mono whitespace-nowrap pt-1",children:E}),_[14]=E,_[15]=T):T=_[15];let Q="SERVER"===z.source?"#32CD32":"#00CED1";if(_[16]!==Q?(A={backgroundColor:Q,color:"#000"},_[16]=Q,_[17]=A):A=_[17],_[18]!==z.source||_[19]!==A?(I=(0,t.jsx)("div",{className:"px-2 py-1 rounded text-xs font-medium whitespace-nowrap",style:A,children:z.source}),_[18]=z.source,_[19]=A,_[20]=I):I=_[20],_[21]!==z.message||_[22]!==Y?(L=Y(z.message),_[21]=z.message,_[22]=Y,_[23]=L):L=_[23],_[24]!==L?($=(0,t.jsx)("div",{className:"flex-1 min-w-0",children:L}),_[24]=L,_[25]=$):$=_[25],_[26]!==z.tabIdentifier?(D=z.tabIdentifier&&(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-muted text-muted-foreground",children:z.tabIdentifier}),_[26]=z.tabIdentifier,_[27]=D):D=_[27],_[28]!==z.userAgent?(F=z.userAgent&&(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-100 dark:bg-green-800 text-green-700 dark:text-green-200",children:z.userAgent.includes("Chrome")?"Chrome":z.userAgent.includes("Firefox")?"Firefox":z.userAgent.includes("Safari")?"Safari":z.userAgent.includes("Edge")?"Edge":"Browser"}),_[28]=z.userAgent,_[29]=F):F=_[29],_[30]!==z.message||_[31]!==z.source||_[32]!==z.tabIdentifier){let e,r;B="BROWSER"===z.source&&(e=z.message.includes("[PLAYWRIGHT]"),r=z.message.includes("[CHROME_EXTENSION]")||z.tabIdentifier,e?(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-purple-100 dark:bg-purple-800 text-purple-700 dark:text-purple-200",children:"🎭 Playwright"}):r?(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-100 dark:bg-blue-800 text-blue-700 dark:text-blue-200",children:"🧩 Extension"}):null),_[30]=z.message,_[31]=z.source,_[32]=z.tabIdentifier,_[33]=B}else B=_[33];return _[34]!==z.message||_[35]!==z.source?(M="SERVER"===z.source&&(()=>{let e=z.message.toLowerCase();if(e.includes("ready on http://localhost")||e.includes("ready in ")||e.includes("next.js")||e.includes("compiled client and server"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-black text-white",children:"▲ Next.js"});if(e.includes("nuxt")||e.includes("nitro")&&e.includes("http://localhost")||e.includes("universal mode")||e.includes("spa mode"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-500 text-white",children:"💚 Nuxt"});if(e.includes("vue-cli-service")||e.includes("vue")&&(e.includes("dev server")||e.includes("local:"))||e.includes("@vue/cli-service"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-600 text-white",children:"🟢 Vue"});if(e.includes("local:")&&e.includes("vite")||e.includes("dev server running")||e.includes("vite v"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-500 text-white",children:"⚡ Vite"});if(e.includes("rails server")||e.includes("puma starting")||e.includes("use ctrl-c to stop")||e.includes("listening on tcp://")&&e.includes("3000"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-red-600 text-white",children:"💎 Rails"});else if(e.includes("laravel development server")||e.includes("artisan serve")||e.includes("laravel")&&e.includes("127.0.0.1:8000"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-red-500 text-white",children:"🅻 Laravel"});else if(e.includes("express server")||e.includes("server listening on")||e.includes("app listening on port")||e.includes("node server"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-700 text-white",children:"🟩 Express"});else if(e.includes("django")||e.includes("development server")&&e.includes("127.0.0.1:8000")||e.includes("runserver"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-800 text-white",children:"🐍 Django"});else if(e.includes("flask")||e.includes("running on http://127.0.0.1:5000")||e.includes("debug mode: on"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-800 text-white",children:"🌶️ Flask"});else if(e.includes("sveltekit")||e.includes("svelte")&&e.includes("dev")||e.includes("@sveltejs"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-orange-500 text-white",children:"🔥 Svelte"});else if(e.includes("remix")||e.includes("@remix-run"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-400 text-white",children:"💿 Remix"});else if(e.includes("astro")||e.includes("@astrojs"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-purple-600 text-white",children:"🚀 Astro"});else if(e.includes("spring boot")||e.includes("tomcat started on port")||e.includes("started application")&&e.includes("seconds"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-500 text-white",children:"🍃 Spring"});else if(e.includes("webpack compiled")||e.includes("compiled successfully")||e.includes("webpack-dev-server"))return(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-600 text-white",children:"⚛️ React"});return null})(),_[34]=z.message,_[35]=z.source,_[36]=M):M=_[36],_[37]!==D||_[38]!==F||_[39]!==B||_[40]!==M?(P=(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[D,F,B,M]}),_[37]=D,_[38]=F,_[39]=B,_[40]=M,_[41]=P):P=_[41],_[42]!==$||_[43]!==P?(W=(0,t.jsx)("div",{className:"font-mono text-sm min-w-0 text-foreground",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-2",children:[$,P]})}),_[42]=$,_[43]=P,_[44]=W):W=_[44],_[45]!==I||_[46]!==W||_[47]!==T?(H=(0,t.jsxs)("div",{className:"grid grid-cols-[auto_auto_1fr] gap-3 items-start",children:[T,I,W]}),_[45]=I,_[46]=W,_[47]=T,_[48]=H):H=_[48],_[49]!==z.screenshot?(G=z.screenshot&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{src:z.screenshot.startsWith("http")?z.screenshot:`/api/screenshots/${z.screenshot}`,alt:"Screenshot",width:800,height:600,className:"w-full h-auto max-w-2xl border rounded shadow-sm",style:{maxHeight:"600px",objectFit:"contain"},unoptimized:!0})}),_[49]=z.screenshot,_[50]=G):G=_[50],_[51]!==z.screencast?(V=z.screencast&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)("a",{href:z.screencast,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors",children:[(0,t.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]}),"View Jank Analysis Video"]})}),_[51]=z.screencast,_[52]=V):V=_[52],_[53]!==H||_[54]!==G||_[55]!==V||_[56]!==q||_[57]!==w?(U=(0,t.jsxs)("div",{className:q,style:w,children:[H,G,V]}),_[53]=H,_[54]=G,_[55]=V,_[56]=q,_[57]=w,_[58]=U):U=_[58],U}function R(e,t){return(e.index??0)-(t.index??0)}function S(e){return{...e,type:"url"}}function O(e){return{...e,type:"json"}}function T({version:e,initialData:r}){let s=(0,n.useRouter)(),i=(0,n.useSearchParams)(),[c,d]=(0,o.useDarkMode)(),[u,x]=(0,l.useState)(r?.logs||[]),[m,p]=(0,l.useState)(r?.mode||"tail");(0,l.useEffect)(()=>{let e=i.get("mode");e&&e!==m&&p(e)},[i,m]);let[g,h]=(0,l.useState)(!0),[f,b]=(0,l.useState)(!r),[N,j]=(0,l.useState)(r?.logs.length||0),[v,y]=(0,l.useState)(null),[C,k]=(0,l.useState)(r?.logFiles||[]),[R,S]=(0,l.useState)(r?.currentLogFile||""),[O,T]=(0,l.useState)(""),[A,I]=(0,l.useState)(!1),[L,$]=(0,l.useState)(!1),[D,F]=(0,l.useState)(!1),[B,M]=(0,l.useState)(!1),[P,W]=(0,l.useState)([]),[H,G]=(0,l.useState)(!1),[V,U]=(0,l.useState)(0),[_]=(0,l.useState)(5),[z,K]=(0,l.useState)(null),[J,Y]=(0,l.useState)(!1),[X,Z]=(0,l.useState)({browser:!0,server:!0,interaction:!0,screenshot:!0}),[q,Q]=(0,l.useState)({}),[ee,et]=(0,l.useState)([]),er=(0,l.useRef)(null),es=(0,l.useRef)(null),en=(0,l.useRef)(null),el=(0,l.useRef)(null),ea=(0,l.useRef)(null),eo=(0,l.useRef)(!1),ei=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/logs/list");if(e.ok){let t=await e.json();return k(t.files),S(t.currentFile),T(t.projectName),!0}return!1}catch(e){return console.error("Error loading available logs:",e),!1}},[]),ec=(0,l.useCallback)(async()=>{if("tail"===m)try{let e=i.get("file"),t="",r=!0;if(e&&C.length>0){let s=C.find(t=>t.name===e);t=s?.path||R,r=s?.isCurrent!==!1}else t=R,r=!0;if(!r)return;let s=t?`/api/logs/tail?lines=50&logPath=${encodeURIComponent(t)}`:"/api/logs/tail?lines=50";if(z===s&&V>=_){console.error(`Maximum retry attempts (${_}) reached for ${s}. Stopping polling.`),en.current&&(clearInterval(en.current),en.current=null);return}let n=await fetch(s);if(!n.ok)throw Error(`HTTP ${n.status}: ${n.statusText}`);(z===s||V>0)&&(U(0),K(null));let l=await n.json();if(!l.logs)return void console.warn("No logs data in response");let a=w(l.logs);if(a.length>N)if(g)y(new Date),ee.length>0?(x([...u,...ee,...a.slice(N)]),et([])):x(a),j(a.length),eo.current||setTimeout(()=>{er.current?.scrollIntoView({behavior:"smooth"})},50);else{let e=a.slice(N);e.length>0&&(et(t=>[...t,...e]),j(a.length))}}catch(s){console.error("Error polling logs:",s);let e=i.get("file"),t="";if(e&&C.length>0){let r=C.find(t=>t.name===e);t=r?.path||R}else t=R;let r=t?`/api/logs/tail?lines=50&logPath=${encodeURIComponent(t)}`:"/api/logs/tail?lines=50";if(z===r){let e=V+1;U(e),e>=_&&(console.error(`Maximum retry attempts (${_}) reached for ${r}. Stopping polling.`),en.current&&(clearInterval(en.current),en.current=null))}else K(r),U(1)}},[m,g,i,C,R,N,ee,u,V,z,_]);(0,l.useEffect)(()=>{if("tail"===m&&V<_)return en.current=setInterval(ec,3e3),()=>{en.current&&clearInterval(en.current)};en.current&&clearInterval(en.current)},[m,ec,V,_]);let ed=(0,l.useCallback)(async()=>{if(V>=_)return void console.log("Max retries reached, not attempting to load");if(b(!0),!await ei())return void b(!1);try{let e=i.get("file"),t="";if(e&&C.length>0){let r=C.find(t=>t.name===e);t=r?.path||R}else t=R;let r=t?`/api/logs/${m}?lines=1000&logPath=${encodeURIComponent(t)}`:`/api/logs/${m}?lines=1000`;if(z===r&&V>=_){console.error(`Maximum retry attempts (${_}) reached for ${r}. Not attempting to load.`),x([]),b(!1);return}let s=await fetch(r);if(!s.ok)throw Error(`HTTP ${s.status}: ${s.statusText}`);(z===r||V>0)&&(U(0),K(null));let n=await s.json();if(!n.logs){console.warn("No logs data in response"),x([]),b(!1);return}let l=w(n.logs);if(x(l),j(l.length),y(new Date),b(!1),"tail"===m&&!eo.current){h(!0);let e=()=>{er.current?er.current.scrollIntoView({behavior:"auto"}):es.current&&(es.current.scrollTop=es.current.scrollHeight)};setTimeout(e,0),setTimeout(e,100)}}catch(s){console.error("Error loading logs:",s);let e=i.get("file"),t="";if(e&&C.length>0){let r=C.find(t=>t.name===e);t=r?.path||R}else t=R;let r=t?`/api/logs/${m}?lines=1000&logPath=${encodeURIComponent(t)}`:`/api/logs/${m}?lines=1000`;if(z===r){let e=V+1;U(e),e>=_&&console.error(`Maximum retry attempts (${_}) reached for initial load of ${r}.`)}else K(r),U(1);x([])}finally{b(!1)}},[ei,i,C,R,m,V,z,_]);(0,l.useEffect)(()=>{let e=r?.logs&&r?.logs.length>0;if(J||e||u.length){if(e&&0===u.length&&(x(r.logs),b(!1),"tail"===m&&!eo.current)){h(!0);let e=()=>{er.current?er.current.scrollIntoView({behavior:"auto"}):es.current&&(es.current.scrollTop=es.current.scrollHeight)};setTimeout(e,0),setTimeout(e,100),setTimeout(e,300)}}else Y(!0),ed()},[m,r,u.length,J,ed]),(0,l.useEffect)(()=>{u.length>0&&"tail"===m&&g&&!eo.current&&setTimeout(()=>{er.current?er.current.scrollIntoView({behavior:"auto"}):es.current&&(es.current.scrollTop=es.current.scrollHeight)},0)},[u.length,m,g]),(0,l.useEffect)(()=>()=>{en.current&&clearInterval(en.current)},[]),(0,l.useEffect)(()=>{let e=e=>{el.current&&!el.current.contains(e.target)&&I(!1),ea.current&&!ea.current.contains(e.target)&&F(!1)};if(A||D)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[A,D]);let eu=async()=>{if(R&&!H&&window.confirm("Clear logs and start fresh?\n\nThis will:\n• Archive the current log file\n• Start a new empty log file\n• Clear the current view\n\nThe archived logs will still be available in the dropdown.")){G(!0);try{let e=await fetch("/api/logs/rotate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentLogPath:R})});if(e.ok)x([]),j(0),y(null),await ei(),await ed();else{let t=await e.json();console.error("Failed to rotate log:",t),alert(`Failed to rotate log: ${t.error}`)}}catch(e){console.error("Error rotating log:",e),alert("Error rotating log")}finally{G(!1)}}},ex=(0,l.useMemo)(()=>{let e=new Set;return u.forEach(t=>{"BROWSER"===t.source&&t.userAgent&&e.add(t.userAgent)}),Array.from(e).sort()},[u]);(0,l.useEffect)(()=>{ex.length>0&&Q(e=>{let t={...e};return ex.forEach(e=>{e in t||(t[e]=!0)}),t})},[ex]);let em=(0,l.useMemo)(()=>u.filter(e=>{let t=e.message.includes("[INTERACTION]"),r=e.message.includes("[SCREENSHOT]");if(t)return X.interaction;if(r)return X.screenshot;if("SERVER"===e.source)return X.server;if("BROWSER"===e.source){if(!X.browser)return!1;if(ex.length>0&&e.userAgent)return!1!==q[e.userAgent]}return!0}),[u,X,q,ex]);return(0,t.jsxs)("div",{className:"h-screen bg-background text-foreground flex flex-col transition-colors",children:[(0,t.jsx)("div",{className:"bg-card shadow-sm border-b border-border flex-none z-10",children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 py-3",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"text-xl sm:text-2xl font-bold whitespace-nowrap",children:"dev3000"}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:["(v",e,")"]})]}),C.length>1?(0,t.jsxs)("div",{className:"relative",ref:el,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>I(!A),className:"flex items-center gap-2 px-3 py-1 text-sm text-muted-foreground hover:text-foreground hover:bg-accent rounded-md transition-colors",children:[(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:f&&!R?(0,t.jsx)("div",{className:"h-4 bg-muted rounded animate-pulse",style:{width:"220px"}}):R?"Current":"No log file"}),(0,t.jsx)("svg",{className:`w-4 h-4 transition-transform ${A?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),A&&C.length>1&&(0,t.jsx)("div",{className:"absolute top-full left-0 mt-1 bg-card border border-border rounded-md shadow-lg z-20 min-w-80",children:(0,t.jsxs)("div",{className:"py-1 max-h-60 overflow-y-auto",children:[(0,t.jsxs)("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground border-b border-border",children:[O," logs (",C.length,")"]}),C.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{I(!1),s.push(`/logs?file=${encodeURIComponent(e.name)}&mode=${m}`)},className:`w-full text-left px-3 py-2 text-sm hover:bg-accent flex items-center justify-between ${e.isCurrent?"bg-primary/10 text-primary":"text-foreground"}`,children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-mono text-xs",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[new Date(e.mtime).toLocaleString()," • ",Math.round(e.size/1024),"KB"]})]}),e.isCurrent&&(0,t.jsx)("span",{className:"text-xs text-blue-600 font-medium",children:"current"})]},e.path))]})})]}):(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"font-mono text-xs text-gray-600 px-3 py-1 whitespace-nowrap",children:f&&!R?(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded animate-pulse",style:{width:"220px"}}):R?R.split("/").pop():"No log file"})}),u.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 hidden sm:flex",children:[(0,t.jsxs)("span",{className:"text-sm text-muted-foreground",children:[u.length," entries"]}),R&&!f&&(0,t.jsx)("button",{type:"button",onClick:eu,disabled:H,className:"p-0.5 text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Clear logs (rotate current log to archive and start fresh)",children:H?(0,t.jsx)("div",{className:"w-3 h-3 border border-current border-t-transparent rounded-full animate-spin"}):(0,t.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),ee.length>0&&!g&&(0,t.jsxs)("span",{className:"text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full",children:["+",ee.length," buffered"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!1,(0,t.jsxs)("div",{className:"relative",ref:ea,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>F(!D),className:"flex items-center gap-1 px-3 py-1 rounded text-sm font-medium transition-colors whitespace-nowrap bg-muted text-muted-foreground hover:bg-muted/80",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filter"]}),D&&(0,t.jsx)("div",{className:"absolute top-full right-0 mt-1 bg-card border border-border rounded-md shadow-lg z-20 min-w-48",children:(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground border-b border-border",children:"Log Types"}),(0,t.jsxs)("label",{className:"flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:X.server,onChange:e=>Z(t=>({...t,server:e.target.checked})),className:"rounded border-input text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-foreground",children:"Server"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(e=>"SERVER"===e.source).length})]}),(0,t.jsxs)("label",{className:"flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:X.browser,onChange:e=>Z(t=>({...t,browser:e.target.checked})),className:"rounded border-input text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-foreground",children:"Browser"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(e=>"BROWSER"===e.source).length})]}),ex.length>1&&X.browser&&(0,t.jsx)("div",{className:"ml-6 border-l border-border pl-2",children:ex.map(e=>{let r=e.includes("Chrome")?"Chrome":e.includes("Firefox")?"Firefox":e.includes("Safari")?"Safari":e.includes("Edge")?"Edge":"Browser";return(0,t.jsxs)("label",{className:"flex items-center justify-between px-2 py-1 text-xs hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:!1!==q[e],onChange:t=>Q(r=>({...r,[e]:t.target.checked})),className:"rounded border-input text-primary focus:ring-ring w-3 h-3"}),(0,t.jsx)("span",{className:"text-foreground",children:r})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(t=>"BROWSER"===t.source&&t.userAgent===e).length})]},e)})}),(0,t.jsxs)("label",{className:"flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:X.interaction,onChange:e=>Z(t=>({...t,interaction:e.target.checked})),className:"rounded border-input text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-foreground",children:"Interaction"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(e=>e.message.includes("[INTERACTION]")).length})]}),(0,t.jsxs)("label",{className:"flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:X.screenshot,onChange:e=>Z(t=>({...t,screenshot:e.target.checked})),className:"rounded border-input text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-foreground",children:"Screenshot"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:u.filter(e=>e.message.includes("[SCREENSHOT]")).length})]})]})})]}),(0,t.jsx)(a.DarkModeToggle,{darkMode:c,setDarkMode:d,className:"ml-2"})]})]})})}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,t.jsx)("div",{ref:es,className:"max-w-7xl mx-auto px-4 py-6 h-full overflow-y-auto",onScroll:()=>{if(es.current){let{scrollTop:e,scrollHeight:t,clientHeight:r}=es.current,s=e+r>=t-10;g&&!s&&(eo.current=!0),h(s)}},children:f?(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),(0,t.jsx)("div",{className:"text-muted-foreground text-sm mt-4",children:"Loading logs..."})]}):0===u.length?(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("div",{className:"text-muted-foreground text-lg",children:"📝 No logs yet"}),(0,t.jsx)("div",{className:"text-muted-foreground text-sm mt-2",children:V>=_?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-red-500 mb-2",children:["Failed to load logs after ",_," attempts."]}),(0,t.jsx)("button",{type:"button",onClick:()=>{U(0),K(null),Y(!1),ed()},className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Retry"})]}):"Logs will appear here as your development server runs"})]}):0===em.length?(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("div",{className:"text-muted-foreground text-lg",children:"🔍 No logs match current filters"}),(0,t.jsx)("div",{className:"text-muted-foreground text-sm mt-2",children:"Try adjusting your filter settings to see more logs"})]}):(0,t.jsxs)("div",{className:"space-y-1 pb-4",children:[em.map((e,r)=>(0,t.jsx)(E,{entry:e,darkMode:c},`${e.timestamp}-${r}`)),(0,t.jsx)("div",{ref:er})]})})}),(0,t.jsx)("div",{className:"border-t border-border bg-muted/50 flex-none",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[v&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground font-mono",children:["Last updated ",v.toLocaleTimeString()]}),R&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground font-mono break-all",children:R})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("div",{className:`flex items-center gap-1 text-green-600 ${"tail"===m&&g?"visible":"invisible"}`,children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),(0,t.jsx)("span",{className:"text-xs",children:"Live"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{eo.current=!1,ee.length>0&&(x(e=>[...e,...ee]),et([]),y(new Date)),er.current?.scrollIntoView({behavior:"smooth"})},className:`absolute top-0 right-0 flex items-center gap-1 px-2 py-0.5 bg-blue-600 text-white rounded text-xs hover:bg-blue-700 whitespace-nowrap ${"tail"===m&&!g?"visible":"invisible"}`,children:"↓ Live"})]})]})})]})}e.s(["default",()=>T],54735)}]);