@claudeye/darwin-arm64 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/assets/standalone/.next/BUILD_ID +1 -1
  2. package/assets/standalone/.next/build-manifest.json +3 -3
  3. package/assets/standalone/.next/prerender-manifest.json +3 -3
  4. package/assets/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  5. package/assets/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/assets/standalone/.next/server/app/_global-error.html +1 -1
  7. package/assets/standalone/.next/server/app/_global-error.rsc +7 -7
  8. package/assets/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  9. package/assets/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  10. package/assets/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  11. package/assets/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  12. package/assets/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/assets/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
  14. package/assets/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/assets/standalone/.next/server/app/_not-found.html +2 -2
  16. package/assets/standalone/.next/server/app/_not-found.rsc +15 -15
  17. package/assets/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
  18. package/assets/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  19. package/assets/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
  20. package/assets/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  21. package/assets/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  22. package/assets/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  23. package/assets/standalone/.next/server/app/dashboard/[viewName]/page/server-reference-manifest.json +5 -5
  24. package/assets/standalone/.next/server/app/dashboard/[viewName]/page_client-reference-manifest.js +1 -1
  25. package/assets/standalone/.next/server/app/dashboard/page/server-reference-manifest.json +5 -5
  26. package/assets/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
  27. package/assets/standalone/.next/server/app/index.html +1 -1
  28. package/assets/standalone/.next/server/app/index.rsc +15 -15
  29. package/assets/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  30. package/assets/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  31. package/assets/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  32. package/assets/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
  33. package/assets/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  34. package/assets/standalone/.next/server/app/login/page/server-reference-manifest.json +3 -3
  35. package/assets/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  36. package/assets/standalone/.next/server/app/login.html +2 -2
  37. package/assets/standalone/.next/server/app/login.rsc +17 -17
  38. package/assets/standalone/.next/server/app/login.segments/_full.segment.rsc +17 -17
  39. package/assets/standalone/.next/server/app/login.segments/_head.segment.rsc +4 -4
  40. package/assets/standalone/.next/server/app/login.segments/_index.segment.rsc +10 -10
  41. package/assets/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  42. package/assets/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  43. package/assets/standalone/.next/server/app/login.segments/login.segment.rsc +3 -3
  44. package/assets/standalone/.next/server/app/page/server-reference-manifest.json +2 -2
  45. package/assets/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  46. package/assets/standalone/.next/server/app/policies/page/server-reference-manifest.json +9 -9
  47. package/assets/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  48. package/assets/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +2 -2
  49. package/assets/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  50. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  51. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +10 -10
  52. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  53. package/assets/standalone/.next/server/app/projects/page/server-reference-manifest.json +2 -2
  54. package/assets/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  55. package/assets/standalone/.next/server/app/queue/page/server-reference-manifest.json +4 -4
  56. package/assets/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  57. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0f_5ws6._.js +1 -1
  58. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
  59. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0vfmej5._.js +2 -2
  60. package/assets/standalone/.next/server/chunks/_0aylu-q._.js +1 -1
  61. package/assets/standalone/.next/server/chunks/_0lq2_wn._.js +1 -1
  62. package/assets/standalone/.next/server/chunks/_0oqawqx._.js +1 -1
  63. package/assets/standalone/.next/server/chunks/_0vt409y._.js +1 -1
  64. package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0l15kkr.js +1 -1
  65. package/assets/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
  66. package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0sq7snp._.js → [root-of-the-server]__0-9w~bh._.js} +2 -2
  67. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-_oq51._.js +1 -1
  68. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-wbic0._.js +1 -1
  69. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__04qo1w2._.js +1 -1
  70. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__09y6src._.js +1 -1
  71. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__09y7ni.._.js +1 -1
  72. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bubgf_._.js +1 -1
  73. package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07ifmkx._.js → [root-of-the-server]__0f7wkrr._.js} +2 -2
  74. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0m0x9dt._.js +1 -1
  75. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pw0g9c._.js +1 -1
  76. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rm4qtt._.js +1 -1
  77. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0spfsp5._.js +1 -1
  78. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0x7-awk._.js +1 -1
  79. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zva2n_._.js +1 -1
  80. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__1370kzv._.js +1 -1
  81. package/assets/standalone/.next/server/chunks/ssr/_01fj_8s._.js +1 -1
  82. package/assets/standalone/.next/server/chunks/ssr/_04.u7zx._.js +1 -1
  83. package/assets/standalone/.next/server/chunks/ssr/_06383ya._.js +1 -1
  84. package/assets/standalone/.next/server/chunks/ssr/_06nq9qk._.js +1 -1
  85. package/assets/standalone/.next/server/chunks/ssr/_0i~.gk_._.js +1 -1
  86. package/assets/standalone/.next/server/chunks/ssr/_0kfjwwu._.js +1 -1
  87. package/assets/standalone/.next/server/chunks/ssr/_0km.fsf._.js +1 -1
  88. package/assets/standalone/.next/server/chunks/ssr/_0rr.uoo._.js +3 -3
  89. package/assets/standalone/.next/server/chunks/ssr/_0x26hbi._.js +1 -1
  90. package/assets/standalone/.next/server/chunks/ssr/_0xg44oj._.js +1 -1
  91. package/assets/standalone/.next/server/chunks/ssr/_11ou~_x._.js +1 -1
  92. package/assets/standalone/.next/server/chunks/ssr/_1207ol.._.js +1 -1
  93. package/assets/standalone/.next/server/chunks/ssr/app_04qfs8z._.js +1 -1
  94. package/assets/standalone/.next/server/chunks/ssr/app_05evmdg._.js +1 -1
  95. package/assets/standalone/.next/server/chunks/ssr/app_07izk21._.js +1 -1
  96. package/assets/standalone/.next/server/chunks/ssr/app_0uosk1e._.js +1 -1
  97. package/assets/standalone/.next/server/chunks/ssr/app_13f0ohr._.js +1 -1
  98. package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_13cb_9d._.js +1 -1
  99. package/assets/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
  100. package/assets/standalone/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js +1 -1
  101. package/assets/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +1 -1
  102. package/assets/standalone/.next/server/chunks/ssr/app_queue_queue-client_tsx_0c0olxv._.js +1 -1
  103. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_0rd0oc-._.js +2 -2
  104. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_0h9llsw._.js +2 -2
  105. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_0~3yv~8._.js +1 -1
  106. package/assets/standalone/.next/server/middleware-build-manifest.js +3 -3
  107. package/assets/standalone/.next/server/pages/404.html +2 -2
  108. package/assets/standalone/.next/server/pages/500.html +1 -1
  109. package/assets/standalone/.next/server/server-reference-manifest.js +1 -1
  110. package/assets/standalone/.next/server/server-reference-manifest.json +23 -23
  111. package/assets/standalone/.next/static/chunks/0.llxyobdk9ao.js +1 -0
  112. package/assets/standalone/.next/static/chunks/{11nnvwnj7e__0.js → 013e6ucdn~oej.js} +1 -1
  113. package/assets/standalone/.next/static/chunks/{0y8d5uz5f1m~..js → 01i5gpaes1u49.js} +1 -1
  114. package/assets/standalone/.next/static/chunks/{0nc3no0r1i66_.js → 01z1mkd0jlg01.js} +1 -1
  115. package/assets/standalone/.next/static/chunks/{07tkt19hty~w~.js → 041yg1qijsts_.js} +1 -1
  116. package/assets/standalone/.next/static/chunks/{08eqdulekk8l-.js → 0eozapv72nxu9.js} +1 -1
  117. package/assets/standalone/.next/static/chunks/{0.~t6_2r7n04x.js → 0r-uj~~hfjn~d.js} +1 -1
  118. package/assets/standalone/.next/static/chunks/{0tp7ck~nhe8-g.js → 0r33ook0mzjdp.js} +2 -2
  119. package/assets/standalone/.next/static/chunks/{0h2.~bz5i.4.g.js → 0tdv9t00~jli0.js} +1 -1
  120. package/assets/standalone/.next/static/chunks/{162jxog7oodad.js → 0yby34zxp~u9y.js} +1 -1
  121. package/assets/standalone/.next/static/chunks/{0l8ej7oju~.oy.js → 16g-s3n9.r1ua.js} +1 -1
  122. package/assets/standalone/package.json +1 -1
  123. package/bin/claudeye +0 -0
  124. package/package.json +1 -1
  125. package/assets/standalone/.next/static/chunks/14trwlfhtz63l.js +0 -1
  126. /package/assets/standalone/.next/static/{5FBEWHgw7h8OR_JoJzccY → T2uFRf42cIG4zxcRtc0qK}/_buildManifest.js +0 -0
  127. /package/assets/standalone/.next/static/{5FBEWHgw7h8OR_JoJzccY → T2uFRf42cIG4zxcRtc0qK}/_clientMiddlewareManifest.js +0 -0
  128. /package/assets/standalone/.next/static/{5FBEWHgw7h8OR_JoJzccY → T2uFRf42cIG4zxcRtc0qK}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73375,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],73375)},63059,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],63059)},73520,e=>{"use strict";var t=e.i(43476),r=e.i(73375),s=e.i(63059);e.s(["default",0,function({currentPage:e,totalPages:n,onPageChange:a}){if(n<=1)return null;let o=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>a(e-1),disabled:1===e,className:o(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(r.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(n<=7)return Array.from({length:n},(e,t)=>t+1);let t=[1],r=Math.max(2,e-1),s=Math.min(n-1,e+1);e<=3&&(s=Math.min(5,n-1)),e>=n-2&&(r=Math.max(2,n-4)),r>2&&t.push("ellipsis-start");for(let e=r;e<=s;e++)t.push(e);return s<n-1&&t.push("ellipsis-end"),t.push(n),t})().map(r=>"string"==typeof r?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},r):(0,t.jsx)("button",{onClick:()=>a(r),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===r?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${r}`,"aria-current":e===r?"page":void 0,children:r},r))}),(0,t.jsxs)("button",{onClick:()=>a(e+1),disabled:e===n,className:o(e===n),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(s.ChevronRight,{className:"w-4 h-4"})]})]})}])},80060,2711,e=>{"use strict";var t=e.i(18566),r=e.i(71645);function s(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${s}`}function n(e){if(!e||!a(e))return null;let[t,r,s]=e.split("-").map(Number);return new Date(t,r-1,s,12,0,0)}function a(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)&&!isNaN(Date.parse(e))}e.s(["useUrlParams",0,function(){let e=(0,t.useSearchParams)(),s=(0,t.useRouter)(),n=(0,t.usePathname)(),a=(0,r.useRef)(null),o=(0,r.useCallback)(t=>e.get(t),[e]),l=(0,r.useCallback)(()=>new URLSearchParams(e.toString()),[e]),i=(0,r.useCallback)(t=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{let r=new URLSearchParams(e.toString());for(let[e,s]of Object.entries(t))void 0===s||""===s?r.delete(e):r.set(e,s);let a=r.toString(),o=a?`${n}?${a}`:n;s.replace(o,{scroll:!1})},150)},[e,n,s]);return(0,r.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]),{get:o,getAll:l,setAll:i}}],80060),e.s(["activeFilterToParam",0,function(e,t){switch(e.type){case"boolean":return"all"===t?void 0:t;case"number":if(t.min===e.min&&t.max===e.max)return;return`${t.min}~${t.max}`;case"string":if(t.size===e.values.length)return;return Array.from(t).map(e=>encodeURIComponent(e)).join(",");case"date":if(!t.from&&!t.to)return;return`${t.from??""},${t.to??""}`}},"dateRangeToParams",0,function(e){let t={};return e.from&&(t.from=s(e.from)),e.to&&(t.to=s(e.to)),t},"keywordsToParam",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"pageToParam",0,function(e){return e<=1?void 0:String(e)},"paramToActiveFilter",0,function(e,t){if(null===t||""===t)return null;switch(e.type){case"boolean":if("true"===t||"false"===t)return t;return null;case"number":{let e=t.split("~");if(2!==e.length)return null;let r=parseFloat(e[0]),s=parseFloat(e[1]);if(!Number.isFinite(r)||!Number.isFinite(s))return null;return{min:r,max:s}}case"string":{let r=t.split(",").map(e=>decodeURIComponent(e.trim())).filter(t=>e.values.includes(t));if(0===r.length)return null;return new Set(r)}case"date":{let e=t.split(",");if(2!==e.length)return null;let r=e[0]||null,s=e[1]||null;if(!r&&!s||r&&!a(r)||s&&!a(s))return null;return{from:r,to:s}}}},"paramToKeywords",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"paramToPage",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"paramToPreset",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"paramsToDateRange",0,function(e,t){return{from:n(e),to:n(t)}},"presetToParam",0,function(e){return"all"===e?void 0:e}],2711)},74886,43531,e=>{"use strict";var t=e.i(75254);let r=(0,t.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,r],74886);let s=(0,t.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,s],43531)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],37727)},71689,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],71689)},81418,88092,51737,e=>{"use strict";var t=e.i(75254);let r=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,r],81418);let s=(0,t.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);e.s(["ShieldX",0,s],88092);let n=(0,t.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,n],51737)},39616,62363,e=>{"use strict";let t=(0,e.i(75254).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],39616);var r=e.i(95187);let s=(0,r.createServerReference)("60e923e36f3e84508d60f327582e32738a949baee8",r.callServer,void 0,r.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,s],62363)},64245,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(74080),n=e.i(22016),a=e.i(71689),o=e.i(81418),l=e.i(88092),i=e.i(51737),d=e.i(98919),c=e.i(64659),m=e.i(74886),u=e.i(43531),x=e.i(39616);let h=(0,e.i(75254).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var p=e.i(37727),f=e.i(73520),g=e.i(95187);let b=(0,g.createServerReference)("409eeda3fdf4a95308651f701eaf9b39b9870d9e33",g.callServer,void 0,g.findSourceMapURL,"getHookActivityAction");var v=e.i(62363);let j=(0,g.createServerReference)("001e0dbeec04368f30379a08e4346cfe53a34634eb",g.callServer,void 0,g.findSourceMapURL,"getHooksConfigAction"),y=(0,g.createServerReference)("60a7d639c8458afdd0a54a64602ea7d430316724ba",g.callServer,void 0,g.findSourceMapURL,"togglePolicyAction"),N=(0,g.createServerReference)("40e8044917481a0aca3778a31937a597cf6ffd5fc9",g.callServer,void 0,g.findSourceMapURL,"installHooksWebAction"),k=(0,g.createServerReference)("400d466ad4769d1fe505b209db2189e3831ad38247",g.callServer,void 0,g.findSourceMapURL,"removeHooksWebAction"),w=(0,g.createServerReference)("605b75a0d2d8d9af98e5b156e86b8e0b4ee04948f6",g.callServer,void 0,g.findSourceMapURL,"updatePolicyParamsAction");var S=e.i(85881),C=e.i(80060),P=e.i(2711),T=e.i(67881);function R({sessionId:e,transcriptPath:r}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let s=r?function(e){let t=e.replace(/\\/g,"/").split("/").filter(Boolean);if(t.length<2)return null;let r=t[t.length-2];return!r||r.startsWith(".")?null:r}(r):null,a=e?e.slice(0,8):"—";return s?(0,t.jsx)(n.default,{href:`/project/${encodeURIComponent(s)}/session/${encodeURIComponent(e)}`,className:"text-primary hover:underline font-mono",onClick:e=>e.stopPropagation(),children:a}):(0,t.jsx)("span",{className:"text-muted-foreground font-mono",children:a})}function A({decision:e}){return"deny"===e?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,t.jsx)(l.ShieldX,{className:"h-3 w-3"}),"Deny"]}):"instruct"===e?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,t.jsx)(i.ShieldAlert,{className:"h-3 w-3"}),"Instruct"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,t.jsx)(o.ShieldCheck,{className:"h-3 w-3"}),"Allow"]})}function $({eventType:e}){return(0,t.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:e})}function M({mode:e}){let r="default"===e;return(0,t.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${r?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:e})}function I({ms:e}){return(0,t.jsx)("span",{className:`font-mono text-[0.7rem] ${e>500?"text-red-400":e>100?"text-amber-400":"text-muted-foreground"}`,children:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`})}function E({text:e}){let[s,n]=(0,r.useState)(!1),a=async t=>{t.stopPropagation();try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}catch{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),n(!0),setTimeout(()=>n(!1),1500)}};return(0,t.jsx)("button",{onClick:a,className:"inline-flex items-center justify-center h-5 w-5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:"Copy",children:s?(0,t.jsx)(u.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(m.Copy,{className:"h-3 w-3"})})}function U({value:e,onChange:r}){return(0,t.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(s=>(0,t.jsx)("button",{onClick:()=>r(s.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${e===s.value?"deny"===s.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===s.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===s.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:s.label},s.value))})}function F({stats:e}){let r=e.totalEvents>0?(e.denyCount/e.totalEvents*100).toFixed(0):"0";return(0,t.jsxs)("div",{className:"flex items-center gap-6 text-[0.7rem] text-muted-foreground",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-foreground font-mono font-semibold",children:e.totalEvents})," total events"]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:`font-mono font-semibold ${e.denyCount>0?"text-red-400":"text-foreground"}`,children:[r,"%"]})," ","deny rate"]}),(0,t.jsxs)("div",{className:"hidden sm:block",children:["top policy:"," ",(0,t.jsx)("span",{className:"font-mono text-foreground",children:e.topPolicy??"—"})]})]})}function D({item:e}){return(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:10,className:"px-0 py-0",children:(0,t.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-in fade-in slide-in-from-top-1 duration-150",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,t.jsx)("span",{className:"font-mono text-foreground",children:e.sessionId??"—"}),e.sessionId&&(0,t.jsx)(E,{text:e.sessionId})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,t.jsx)("span",{className:"font-mono text-foreground",children:e.cwd??"—"}),e.cwd&&(0,t.jsx)(E,{text:e.cwd})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,t.jsx)("span",{className:"font-mono text-foreground break-all",children:e.transcriptPath??"—"})]})]}),e.reason&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,t.jsx)("span",{className:"text-foreground",children:e.reason})]})]})})})}function z({hooksInstalled:e,onSwitchTab:s}){let{intervalSec:n}=(0,S.useAutoRefresh)(),a=(0,C.useUrlParams)(),o=(0,r.useRef)(!1),[l,i]=(0,r.useState)(()=>(0,P.paramToPage)(a.get("page"))),[m,u]=(0,r.useState)(null),[x,h]=(0,r.useState)(null),[p,g]=(0,r.useState)(()=>{let e=a.get("decision");return"allow"===e||"deny"===e||"instruct"===e?e:""}),[j,y]=(0,r.useState)(()=>a.get("event")??""),[N,k]=(0,r.useState)(()=>a.get("policy")??""),[w,T]=(0,r.useState)(()=>a.get("session")??""),E=(0,r.useRef)(null),L=(0,r.useRef)({filterDecision:p,filterEventType:j,filterPolicy:N,filterSessionId:w});L.current={filterDecision:p,filterEventType:j,filterPolicy:N,filterSessionId:w},(0,r.useEffect)(()=>{if(!o.current){o.current=!0;return}a.setAll({decision:p||void 0,event:j||void 0,policy:N||void 0,session:w||void 0,page:(0,P.pageToParam)(l)})},[p,j,N,w,l]);let H=""!==p||""!==j||""!==N||""!==w,O=(0,r.useCallback)(async e=>{try{let t,{filterDecision:r,filterEventType:s,filterPolicy:n,filterSessionId:a}=L.current;t=""!==r||""!==s||""!==n||""!==a?await (0,v.searchHookActivityAction)({decision:r||void 0,eventType:s||void 0,policyName:n||void 0,sessionId:a||void 0},e):await b(e),u(t)}catch{}},[]);(0,r.useEffect)(()=>{O(l);let e=setInterval(()=>O(l),n>0?1e3*n:5e3);return()=>clearInterval(e)},[l,O,n]),(0,r.useEffect)(()=>(E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{i(1),h(null),O(1)},300),()=>{E.current&&clearTimeout(E.current)}),[p,j,N,w]);let B=m?.entries??[],X=m?.totalPages??1;return(0,t.jsxs)(t.Fragment,{children:[m?.stats&&m.stats.totalEvents>0&&(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(F,{stats:m.stats})}),(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,t.jsx)(U,{value:p,onChange:g}),(0,t.jsxs)("select",{value:j,onChange:e=>y(e.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,t.jsx)("option",{value:"",children:"All Events"}),(0,t.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,t.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,t.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,t.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,t.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,t.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("input",{type:"text",value:N,onChange:e=>k(e.target.value),placeholder:"Filter by policy\\u2026",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})}),(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("input",{type:"text",value:w,onChange:e=>T(e.target.value),placeholder:"Filter by session…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===B.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center",children:[(0,t.jsx)(d.Shield,{className:"h-12 w-12 text-muted-foreground/30"}),!1===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-4 font-medium",children:"Hooks are not installed"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:["Go to the"," ",(0,t.jsx)("button",{className:"underline hover:text-foreground transition-colors",onClick:()=>s?.("policies"),children:"Policies tab"})," ","and click ",(0,t.jsx)("span",{className:"font-mono bg-muted px-1 rounded",children:"Install"})," to enable hook monitoring."]})]}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:H?"No matching activity.":"Waiting for hook events…"})]}):(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-xs",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,t.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Session"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/30",children:B.map((e,s)=>{var n;let a,o="deny"===e.decision,l=x===s,i="instruct"===e.decision;return(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsxs)("tr",{onClick:()=>{h(e=>e===s?null:s)},className:`cursor-pointer transition-colors ${o?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":i?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":s%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${l?"bg-muted/20":""}`,children:[(0,t.jsx)("td",{className:"px-4 py-2",children:(0,t.jsx)(c.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${l?"rotate-0":"-rotate-90"}`})}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(A,{decision:e.decision})}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)($,{eventType:e.eventType})}),(0,t.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.toolName??"—"}),(0,t.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.policyName??"—"}),(0,t.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:e.reason??"",children:e.reason??"—"}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(I,{ms:e.durationMs})}),(0,t.jsx)("td",{className:"px-3 py-2",title:e.sessionId??"",children:(0,t.jsx)(R,{sessionId:e.sessionId,transcriptPath:e.transcriptPath})}),(0,t.jsx)("td",{className:"px-3 py-2",children:e.permissionMode?(0,t.jsx)(M,{mode:e.permissionMode}):"—"}),(0,t.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(e.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(n=e.timestamp,(a=Date.now()-n)<6e4?`${Math.max(1,Math.floor(a/1e3))}s ago`:a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`)})]}),l&&(0,t.jsx)(D,{item:e})]},`${e.timestamp}-${s}`)})})]})}),(0,t.jsx)(f.default,{currentPage:l,totalPages:X,onPageChange:e=>{i(e),h(null)}})]})]})}function L({enabled:e,onChange:r,disabled:s}){return(0,t.jsx)("button",{onClick:r,disabled:s,className:`relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors disabled:opacity-40 ${e?"bg-emerald-500":"bg-muted-foreground/30"}`,"aria-label":e?"Disable policy":"Enable policy",children:(0,t.jsx)("span",{className:`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform ${e?"translate-x-3.5":"translate-x-0.5"}`})})}function H({policy:e,onClose:s,onSave:n}){let a=e.params??{},o=e.currentParams??{},[l,i]=(0,r.useState)(()=>{let e={};for(let[t,r]of Object.entries(a)){let s=t in o?o[t]:r.default;e[t]=s}return e});(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&s()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]);let d=(e,t)=>{i(r=>({...r,[e]:t}))};return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:e=>{e.target===e.currentTarget&&s()},children:(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-xl w-full max-w-lg mx-4 max-h-[80vh] flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-mono font-semibold text-foreground",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.description})]}),(0,t.jsx)("button",{onClick:s,className:"text-muted-foreground hover:text-foreground transition-colors",children:(0,t.jsx)(p.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("div",{className:"overflow-y-auto flex-1 px-4 py-4 space-y-4",children:Object.entries(a).map(([e,r])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-semibold text-foreground mb-1 font-mono",children:e}),(0,t.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mb-1.5",children:r.description}),((e,r)=>{let s=l[e];if("boolean"===r.type)return(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:!!s,onChange:t=>d(e,t.target.checked),className:"rounded border-border"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:r.description})]});if("number"===r.type)return(0,t.jsx)("input",{type:"number",value:"number"==typeof s?s:"",onChange:t=>d(e,Number(t.target.value)),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"});if("string[]"===r.type){let r=Array.isArray(s)?s.join("\n"):"";return(0,t.jsx)("textarea",{value:r,onChange:t=>d(e,t.target.value.split("\n").filter(e=>""!==e.trim())),rows:4,placeholder:"One entry per line",className:"w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground font-mono focus:outline-none focus:ring-2 focus:ring-primary/40 resize-y"})}if("pattern[]"===r.type){let r=Array.isArray(s)?s:[];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[r.map((s,n)=>(0,t.jsxs)("div",{className:"flex gap-1.5 items-center",children:[(0,t.jsx)("input",{type:"text",value:s.regex,onChange:t=>{let s=[...r];s[n]={...s[n],regex:t.target.value},d(e,s)},placeholder:"regex",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,t.jsx)("input",{type:"text",value:s.label,onChange:t=>{let s=[...r];s[n]={...s[n],label:t.target.value},d(e,s)},placeholder:"label",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,t.jsx)("button",{onClick:()=>d(e,r.filter((e,t)=>t!==n)),className:"text-muted-foreground/50 hover:text-destructive transition-colors",children:(0,t.jsx)(p.X,{className:"h-3.5 w-3.5"})})]},n)),(0,t.jsx)("button",{onClick:()=>d(e,[...r,{regex:"",label:""}]),className:"text-xs text-primary hover:underline",children:"+ Add pattern"})]})}return(0,t.jsx)("input",{type:"text",value:"string"==typeof s?s:"",onChange:t=>d(e,t.target.value),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"})})(e,r)]},e))}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-border",children:[(0,t.jsx)(T.Button,{variant:"outline",size:"sm",onClick:s,className:"h-7 text-xs",children:"Cancel"}),(0,t.jsx)(T.Button,{size:"sm",onClick:()=>n(l),className:"h-7 text-xs",children:"Save"})]})]})})}function O({message:e,onDismiss:r,onInstall:n,isPending:a}){return(0,s.createPortal)((0,t.jsxs)("div",{className:"fixed top-4 right-4 z-[9999] w-full max-w-sm",style:{animation:"slideInFromRight 0.25s ease-out"},children:[(0,t.jsx)("style",{children:`
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73375,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],73375)},63059,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],63059)},73520,e=>{"use strict";var t=e.i(43476),r=e.i(73375),s=e.i(63059);e.s(["default",0,function({currentPage:e,totalPages:n,onPageChange:a}){if(n<=1)return null;let o=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>a(e-1),disabled:1===e,className:o(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(r.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(n<=7)return Array.from({length:n},(e,t)=>t+1);let t=[1],r=Math.max(2,e-1),s=Math.min(n-1,e+1);e<=3&&(s=Math.min(5,n-1)),e>=n-2&&(r=Math.max(2,n-4)),r>2&&t.push("ellipsis-start");for(let e=r;e<=s;e++)t.push(e);return s<n-1&&t.push("ellipsis-end"),t.push(n),t})().map(r=>"string"==typeof r?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},r):(0,t.jsx)("button",{onClick:()=>a(r),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===r?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${r}`,"aria-current":e===r?"page":void 0,children:r},r))}),(0,t.jsxs)("button",{onClick:()=>a(e+1),disabled:e===n,className:o(e===n),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(s.ChevronRight,{className:"w-4 h-4"})]})]})}])},80060,2711,e=>{"use strict";var t=e.i(18566),r=e.i(71645);function s(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${s}`}function n(e){if(!e||!a(e))return null;let[t,r,s]=e.split("-").map(Number);return new Date(t,r-1,s,12,0,0)}function a(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)&&!isNaN(Date.parse(e))}e.s(["useUrlParams",0,function(){let e=(0,t.useSearchParams)(),s=(0,t.useRouter)(),n=(0,t.usePathname)(),a=(0,r.useRef)(null),o=(0,r.useCallback)(t=>e.get(t),[e]),l=(0,r.useCallback)(()=>new URLSearchParams(e.toString()),[e]),i=(0,r.useCallback)(t=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{let r=new URLSearchParams(e.toString());for(let[e,s]of Object.entries(t))void 0===s||""===s?r.delete(e):r.set(e,s);let a=r.toString(),o=a?`${n}?${a}`:n;s.replace(o,{scroll:!1})},150)},[e,n,s]);return(0,r.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]),{get:o,getAll:l,setAll:i}}],80060),e.s(["activeFilterToParam",0,function(e,t){switch(e.type){case"boolean":return"all"===t?void 0:t;case"number":if(t.min===e.min&&t.max===e.max)return;return`${t.min}~${t.max}`;case"string":if(t.size===e.values.length)return;return Array.from(t).map(e=>encodeURIComponent(e)).join(",");case"date":if(!t.from&&!t.to)return;return`${t.from??""},${t.to??""}`}},"dateRangeToParams",0,function(e){let t={};return e.from&&(t.from=s(e.from)),e.to&&(t.to=s(e.to)),t},"keywordsToParam",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"pageToParam",0,function(e){return e<=1?void 0:String(e)},"paramToActiveFilter",0,function(e,t){if(null===t||""===t)return null;switch(e.type){case"boolean":if("true"===t||"false"===t)return t;return null;case"number":{let e=t.split("~");if(2!==e.length)return null;let r=parseFloat(e[0]),s=parseFloat(e[1]);if(!Number.isFinite(r)||!Number.isFinite(s))return null;return{min:r,max:s}}case"string":{let r=t.split(",").map(e=>decodeURIComponent(e.trim())).filter(t=>e.values.includes(t));if(0===r.length)return null;return new Set(r)}case"date":{let e=t.split(",");if(2!==e.length)return null;let r=e[0]||null,s=e[1]||null;if(!r&&!s||r&&!a(r)||s&&!a(s))return null;return{from:r,to:s}}}},"paramToKeywords",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"paramToPage",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"paramToPreset",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"paramsToDateRange",0,function(e,t){return{from:n(e),to:n(t)}},"presetToParam",0,function(e){return"all"===e?void 0:e}],2711)},74886,43531,e=>{"use strict";var t=e.i(75254);let r=(0,t.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,r],74886);let s=(0,t.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,s],43531)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],37727)},71689,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],71689)},81418,88092,51737,e=>{"use strict";var t=e.i(75254);let r=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,r],81418);let s=(0,t.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);e.s(["ShieldX",0,s],88092);let n=(0,t.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,n],51737)},39616,72131,e=>{"use strict";let t=(0,e.i(75254).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],39616);var r=e.i(95187);let s=(0,r.createServerReference)("602bbc72facb5faaec730a7e10bdd3c426fb357a36",r.callServer,void 0,r.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,s],72131)},64245,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(74080),n=e.i(22016),a=e.i(71689),o=e.i(81418),l=e.i(88092),i=e.i(51737),d=e.i(98919),c=e.i(64659),m=e.i(74886),u=e.i(43531),x=e.i(39616);let h=(0,e.i(75254).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var p=e.i(37727),f=e.i(73520),g=e.i(95187);let b=(0,g.createServerReference)("40985fcad95b1dfb5ce5ad080f01dc6797f4adce5c",g.callServer,void 0,g.findSourceMapURL,"getHookActivityAction");var v=e.i(72131);let j=(0,g.createServerReference)("002569392ae732575c764414749b761d1ea2620387",g.callServer,void 0,g.findSourceMapURL,"getHooksConfigAction"),y=(0,g.createServerReference)("604f971c899887c5fe2dd0904a38e24f4bb138ae21",g.callServer,void 0,g.findSourceMapURL,"togglePolicyAction"),N=(0,g.createServerReference)("4073b98f592f47ab4dee360318c78ba940f2bd13eb",g.callServer,void 0,g.findSourceMapURL,"installHooksWebAction"),k=(0,g.createServerReference)("40a49c13a668e7a4c89fdfbdf0a2a3976d9f43bd34",g.callServer,void 0,g.findSourceMapURL,"removeHooksWebAction"),w=(0,g.createServerReference)("605eaa5aaa4640854292ad3d86724a4b0501f07699",g.callServer,void 0,g.findSourceMapURL,"updatePolicyParamsAction");var S=e.i(85881),C=e.i(80060),P=e.i(2711),T=e.i(67881);function R({sessionId:e,transcriptPath:r}){if(!e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let s=r?function(e){let t=e.replace(/\\/g,"/").split("/").filter(Boolean);if(t.length<2)return null;let r=t[t.length-2];return!r||r.startsWith(".")?null:r}(r):null,a=e?e.slice(0,8):"—";return s?(0,t.jsx)(n.default,{href:`/project/${encodeURIComponent(s)}/session/${encodeURIComponent(e)}`,className:"text-primary hover:underline font-mono",onClick:e=>e.stopPropagation(),children:a}):(0,t.jsx)("span",{className:"text-muted-foreground font-mono",children:a})}function A({decision:e}){return"deny"===e?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,t.jsx)(l.ShieldX,{className:"h-3 w-3"}),"Deny"]}):"instruct"===e?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,t.jsx)(i.ShieldAlert,{className:"h-3 w-3"}),"Instruct"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,t.jsx)(o.ShieldCheck,{className:"h-3 w-3"}),"Allow"]})}function $({eventType:e}){return(0,t.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:e})}function M({mode:e}){let r="default"===e;return(0,t.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${r?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:e})}function I({ms:e}){return(0,t.jsx)("span",{className:`font-mono text-[0.7rem] ${e>500?"text-red-400":e>100?"text-amber-400":"text-muted-foreground"}`,children:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`})}function E({text:e}){let[s,n]=(0,r.useState)(!1),a=async t=>{t.stopPropagation();try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}catch{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),n(!0),setTimeout(()=>n(!1),1500)}};return(0,t.jsx)("button",{onClick:a,className:"inline-flex items-center justify-center h-5 w-5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:"Copy",children:s?(0,t.jsx)(u.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(m.Copy,{className:"h-3 w-3"})})}function U({value:e,onChange:r}){return(0,t.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(s=>(0,t.jsx)("button",{onClick:()=>r(s.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${e===s.value?"deny"===s.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===s.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===s.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:s.label},s.value))})}function F({stats:e}){let r=e.totalEvents>0?(e.denyCount/e.totalEvents*100).toFixed(0):"0";return(0,t.jsxs)("div",{className:"flex items-center gap-6 text-[0.7rem] text-muted-foreground",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-foreground font-mono font-semibold",children:e.totalEvents})," total events"]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:`font-mono font-semibold ${e.denyCount>0?"text-red-400":"text-foreground"}`,children:[r,"%"]})," ","deny rate"]}),(0,t.jsxs)("div",{className:"hidden sm:block",children:["top policy:"," ",(0,t.jsx)("span",{className:"font-mono text-foreground",children:e.topPolicy??"—"})]})]})}function D({item:e}){return(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:10,className:"px-0 py-0",children:(0,t.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-in fade-in slide-in-from-top-1 duration-150",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,t.jsx)("span",{className:"font-mono text-foreground",children:e.sessionId??"—"}),e.sessionId&&(0,t.jsx)(E,{text:e.sessionId})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,t.jsx)("span",{className:"font-mono text-foreground",children:e.cwd??"—"}),e.cwd&&(0,t.jsx)(E,{text:e.cwd})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,t.jsx)("span",{className:"font-mono text-foreground break-all",children:e.transcriptPath??"—"})]})]}),e.reason&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,t.jsx)("span",{className:"text-foreground",children:e.reason})]})]})})})}function z({hooksInstalled:e,onSwitchTab:s}){let{intervalSec:n}=(0,S.useAutoRefresh)(),a=(0,C.useUrlParams)(),o=(0,r.useRef)(!1),[l,i]=(0,r.useState)(()=>(0,P.paramToPage)(a.get("page"))),[m,u]=(0,r.useState)(null),[x,h]=(0,r.useState)(null),[p,g]=(0,r.useState)(()=>{let e=a.get("decision");return"allow"===e||"deny"===e||"instruct"===e?e:""}),[j,y]=(0,r.useState)(()=>a.get("event")??""),[N,k]=(0,r.useState)(()=>a.get("policy")??""),[w,T]=(0,r.useState)(()=>a.get("session")??""),E=(0,r.useRef)(null),L=(0,r.useRef)({filterDecision:p,filterEventType:j,filterPolicy:N,filterSessionId:w});L.current={filterDecision:p,filterEventType:j,filterPolicy:N,filterSessionId:w},(0,r.useEffect)(()=>{if(!o.current){o.current=!0;return}a.setAll({decision:p||void 0,event:j||void 0,policy:N||void 0,session:w||void 0,page:(0,P.pageToParam)(l)})},[p,j,N,w,l]);let H=""!==p||""!==j||""!==N||""!==w,O=(0,r.useCallback)(async e=>{try{let t,{filterDecision:r,filterEventType:s,filterPolicy:n,filterSessionId:a}=L.current;t=""!==r||""!==s||""!==n||""!==a?await (0,v.searchHookActivityAction)({decision:r||void 0,eventType:s||void 0,policyName:n||void 0,sessionId:a||void 0},e):await b(e),u(t)}catch{}},[]);(0,r.useEffect)(()=>{O(l);let e=setInterval(()=>O(l),n>0?1e3*n:5e3);return()=>clearInterval(e)},[l,O,n]),(0,r.useEffect)(()=>(E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{i(1),h(null),O(1)},300),()=>{E.current&&clearTimeout(E.current)}),[p,j,N,w]);let B=m?.entries??[],X=m?.totalPages??1;return(0,t.jsxs)(t.Fragment,{children:[m?.stats&&m.stats.totalEvents>0&&(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(F,{stats:m.stats})}),(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,t.jsx)(U,{value:p,onChange:g}),(0,t.jsxs)("select",{value:j,onChange:e=>y(e.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,t.jsx)("option",{value:"",children:"All Events"}),(0,t.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,t.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,t.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,t.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,t.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,t.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("input",{type:"text",value:N,onChange:e=>k(e.target.value),placeholder:"Filter by policy\\u2026",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})}),(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("input",{type:"text",value:w,onChange:e=>T(e.target.value),placeholder:"Filter by session…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===B.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center",children:[(0,t.jsx)(d.Shield,{className:"h-12 w-12 text-muted-foreground/30"}),!1===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-4 font-medium",children:"Hooks are not installed"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:["Go to the"," ",(0,t.jsx)("button",{className:"underline hover:text-foreground transition-colors",onClick:()=>s?.("policies"),children:"Policies tab"})," ","and click ",(0,t.jsx)("span",{className:"font-mono bg-muted px-1 rounded",children:"Install"})," to enable hook monitoring."]})]}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:H?"No matching activity.":"Waiting for hook events…"})]}):(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-xs",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,t.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Session"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,t.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/30",children:B.map((e,s)=>{var n;let a,o="deny"===e.decision,l=x===s,i="instruct"===e.decision;return(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsxs)("tr",{onClick:()=>{h(e=>e===s?null:s)},className:`cursor-pointer transition-colors ${o?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":i?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":s%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${l?"bg-muted/20":""}`,children:[(0,t.jsx)("td",{className:"px-4 py-2",children:(0,t.jsx)(c.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${l?"rotate-0":"-rotate-90"}`})}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(A,{decision:e.decision})}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)($,{eventType:e.eventType})}),(0,t.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.toolName??"—"}),(0,t.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.policyName??"—"}),(0,t.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:e.reason??"",children:e.reason??"—"}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(I,{ms:e.durationMs})}),(0,t.jsx)("td",{className:"px-3 py-2",title:e.sessionId??"",children:(0,t.jsx)(R,{sessionId:e.sessionId,transcriptPath:e.transcriptPath})}),(0,t.jsx)("td",{className:"px-3 py-2",children:e.permissionMode?(0,t.jsx)(M,{mode:e.permissionMode}):"—"}),(0,t.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(e.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(n=e.timestamp,(a=Date.now()-n)<6e4?`${Math.max(1,Math.floor(a/1e3))}s ago`:a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`)})]}),l&&(0,t.jsx)(D,{item:e})]},`${e.timestamp}-${s}`)})})]})}),(0,t.jsx)(f.default,{currentPage:l,totalPages:X,onPageChange:e=>{i(e),h(null)}})]})]})}function L({enabled:e,onChange:r,disabled:s}){return(0,t.jsx)("button",{onClick:r,disabled:s,className:`relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors disabled:opacity-40 ${e?"bg-emerald-500":"bg-muted-foreground/30"}`,"aria-label":e?"Disable policy":"Enable policy",children:(0,t.jsx)("span",{className:`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform ${e?"translate-x-3.5":"translate-x-0.5"}`})})}function H({policy:e,onClose:s,onSave:n}){let a=e.params??{},o=e.currentParams??{},[l,i]=(0,r.useState)(()=>{let e={};for(let[t,r]of Object.entries(a)){let s=t in o?o[t]:r.default;e[t]=s}return e});(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&s()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]);let d=(e,t)=>{i(r=>({...r,[e]:t}))};return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:e=>{e.target===e.currentTarget&&s()},children:(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-xl w-full max-w-lg mx-4 max-h-[80vh] flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-mono font-semibold text-foreground",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.description})]}),(0,t.jsx)("button",{onClick:s,className:"text-muted-foreground hover:text-foreground transition-colors",children:(0,t.jsx)(p.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("div",{className:"overflow-y-auto flex-1 px-4 py-4 space-y-4",children:Object.entries(a).map(([e,r])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-semibold text-foreground mb-1 font-mono",children:e}),(0,t.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mb-1.5",children:r.description}),((e,r)=>{let s=l[e];if("boolean"===r.type)return(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:!!s,onChange:t=>d(e,t.target.checked),className:"rounded border-border"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:r.description})]});if("number"===r.type)return(0,t.jsx)("input",{type:"number",value:"number"==typeof s?s:"",onChange:t=>d(e,Number(t.target.value)),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"});if("string[]"===r.type){let r=Array.isArray(s)?s.join("\n"):"";return(0,t.jsx)("textarea",{value:r,onChange:t=>d(e,t.target.value.split("\n").filter(e=>""!==e.trim())),rows:4,placeholder:"One entry per line",className:"w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground font-mono focus:outline-none focus:ring-2 focus:ring-primary/40 resize-y"})}if("pattern[]"===r.type){let r=Array.isArray(s)?s:[];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[r.map((s,n)=>(0,t.jsxs)("div",{className:"flex gap-1.5 items-center",children:[(0,t.jsx)("input",{type:"text",value:s.regex,onChange:t=>{let s=[...r];s[n]={...s[n],regex:t.target.value},d(e,s)},placeholder:"regex",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,t.jsx)("input",{type:"text",value:s.label,onChange:t=>{let s=[...r];s[n]={...s[n],label:t.target.value},d(e,s)},placeholder:"label",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,t.jsx)("button",{onClick:()=>d(e,r.filter((e,t)=>t!==n)),className:"text-muted-foreground/50 hover:text-destructive transition-colors",children:(0,t.jsx)(p.X,{className:"h-3.5 w-3.5"})})]},n)),(0,t.jsx)("button",{onClick:()=>d(e,[...r,{regex:"",label:""}]),className:"text-xs text-primary hover:underline",children:"+ Add pattern"})]})}return(0,t.jsx)("input",{type:"text",value:"string"==typeof s?s:"",onChange:t=>d(e,t.target.value),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"})})(e,r)]},e))}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-border",children:[(0,t.jsx)(T.Button,{variant:"outline",size:"sm",onClick:s,className:"h-7 text-xs",children:"Cancel"}),(0,t.jsx)(T.Button,{size:"sm",onClick:()=>n(l),className:"h-7 text-xs",children:"Save"})]})]})})}function O({message:e,onDismiss:r,onInstall:n,isPending:a}){return(0,s.createPortal)((0,t.jsxs)("div",{className:"fixed top-4 right-4 z-[9999] w-full max-w-sm",style:{animation:"slideInFromRight 0.25s ease-out"},children:[(0,t.jsx)("style",{children:`
2
2
  @keyframes slideInFromRight {
3
3
  from { transform: translateX(calc(100% + 1rem)); opacity: 0; }
4
4
  to { transform: translateX(0); opacity: 1; }
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73375,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],73375)},63059,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],63059)},73520,e=>{"use strict";var t=e.i(43476),r=e.i(73375),a=e.i(63059);e.s(["default",0,function({currentPage:e,totalPages:n,onPageChange:s}){if(n<=1)return null;let l=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>s(e-1),disabled:1===e,className:l(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(r.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(n<=7)return Array.from({length:n},(e,t)=>t+1);let t=[1],r=Math.max(2,e-1),a=Math.min(n-1,e+1);e<=3&&(a=Math.min(5,n-1)),e>=n-2&&(r=Math.max(2,n-4)),r>2&&t.push("ellipsis-start");for(let e=r;e<=a;e++)t.push(e);return a<n-1&&t.push("ellipsis-end"),t.push(n),t})().map(r=>"string"==typeof r?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},r):(0,t.jsx)("button",{onClick:()=>s(r),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===r?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${r}`,"aria-current":e===r?"page":void 0,children:r},r))}),(0,t.jsxs)("button",{onClick:()=>s(e+1),disabled:e===n,className:l(e===n),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(a.ChevronRight,{className:"w-4 h-4"})]})]})}])},80060,2711,e=>{"use strict";var t=e.i(18566),r=e.i(71645);function a(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${a}`}function n(e){if(!e||!s(e))return null;let[t,r,a]=e.split("-").map(Number);return new Date(t,r-1,a,12,0,0)}function s(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)&&!isNaN(Date.parse(e))}e.s(["useUrlParams",0,function(){let e=(0,t.useSearchParams)(),a=(0,t.useRouter)(),n=(0,t.usePathname)(),s=(0,r.useRef)(null),l=(0,r.useCallback)(t=>e.get(t),[e]),o=(0,r.useCallback)(()=>new URLSearchParams(e.toString()),[e]),i=(0,r.useCallback)(t=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{let r=new URLSearchParams(e.toString());for(let[e,a]of Object.entries(t))void 0===a||""===a?r.delete(e):r.set(e,a);let s=r.toString(),l=s?`${n}?${s}`:n;a.replace(l,{scroll:!1})},150)},[e,n,a]);return(0,r.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),{get:l,getAll:o,setAll:i}}],80060),e.s(["activeFilterToParam",0,function(e,t){switch(e.type){case"boolean":return"all"===t?void 0:t;case"number":if(t.min===e.min&&t.max===e.max)return;return`${t.min}~${t.max}`;case"string":if(t.size===e.values.length)return;return Array.from(t).map(e=>encodeURIComponent(e)).join(",");case"date":if(!t.from&&!t.to)return;return`${t.from??""},${t.to??""}`}},"dateRangeToParams",0,function(e){let t={};return e.from&&(t.from=a(e.from)),e.to&&(t.to=a(e.to)),t},"keywordsToParam",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"pageToParam",0,function(e){return e<=1?void 0:String(e)},"paramToActiveFilter",0,function(e,t){if(null===t||""===t)return null;switch(e.type){case"boolean":if("true"===t||"false"===t)return t;return null;case"number":{let e=t.split("~");if(2!==e.length)return null;let r=parseFloat(e[0]),a=parseFloat(e[1]);if(!Number.isFinite(r)||!Number.isFinite(a))return null;return{min:r,max:a}}case"string":{let r=t.split(",").map(e=>decodeURIComponent(e.trim())).filter(t=>e.values.includes(t));if(0===r.length)return null;return new Set(r)}case"date":{let e=t.split(",");if(2!==e.length)return null;let r=e[0]||null,a=e[1]||null;if(!r&&!a||r&&!s(r)||a&&!s(a))return null;return{from:r,to:a}}}},"paramToKeywords",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"paramToPage",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"paramToPreset",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"paramsToDateRange",0,function(e,t){return{from:n(e),to:n(t)}},"presetToParam",0,function(e){return"all"===e?void 0:e}],2711)},85898,e=>{"use strict";var t=e.i(43476);let r=(0,e.i(75254).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["default",0,function({id:e,value:a,stringValue:n,onChange:s,"aria-label":l}){let o=null!=n?n:a?a.toISOString().split("T")[0]:"";return(0,t.jsxs)("div",{className:"relative group",children:[(0,t.jsx)("input",{type:"date",id:e,value:o,onChange:e=>s(e.target.value),"aria-label":l,className:"date-input px-3 py-2 pr-8 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[200px]"}),(0,t.jsx)("label",{htmlFor:e,className:"absolute right-2.5 top-1/2 -translate-y-1/2 cursor-pointer pointer-events-auto z-10 p-1 rounded hover:bg-muted/50 transition-colors",onClick:t=>{t.preventDefault();let r=document.getElementById(e);r&&"function"==typeof r.showPicker?r.showPicker():r?.click()},children:(0,t.jsx)(r,{className:"w-4 h-4 text-primary group-hover:text-primary/80 transition-colors"})})]})}],85898)},94008,e=>{"use strict";let t=(0,e.i(75254).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["File",0,t],94008)},31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],31278)},69263,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("60ddf2690705dcf83a45c4285f2729beb2221b4208",a.callServer,void 0,a.findSourceMapURL,"computeDashboard");var s=e.i(80060),l=e.i(2711);let o=["all","true","false"];function i({meta:e,value:r,onChange:a}){return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:e.label}),(0,t.jsx)("div",{className:"flex gap-1",children:o.map(e=>(0,t.jsx)("button",{onClick:()=>a(e),className:`flex-1 px-3 py-1.5 text-sm rounded-md transition-colors ${r===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"all"===e?"All":"true"===e?"Yes":"No"},e))})]})}function m({meta:e,value:a,onChange:n}){let s=e.max-e.min,l=!Number.isInteger(e.min)||!Number.isInteger(e.max),o=s<=1?.01:l&&s<=10?.1:l||s<=10?1:s<=100?5:10,i=(0,r.useCallback)(e=>{let t=Number(e.target.value);isNaN(t)||n({...a,min:Math.min(t,a.max)})},[a,n]),u=(0,r.useCallback)(e=>{let t=Number(e.target.value);isNaN(t)||n({...a,max:Math.max(t,a.min)})},[a,n]),d=(0,r.useCallback)(e=>{let t=Number(e.target.value);n({...a,min:Math.min(t,a.max)})},[a,n]),c=(0,r.useCallback)(e=>{let t=Number(e.target.value);n({...a,max:Math.max(t,a.min)})},[a,n]);return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:e.label}),(0,t.jsxs)("div",{className:"relative mb-3",children:[(0,t.jsx)("input",{type:"range",min:e.min,max:e.max,step:o,value:a.min,onChange:d,className:"absolute w-full pointer-events-none appearance-none bg-transparent [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer","aria-label":`${e.label} minimum`}),(0,t.jsx)("input",{type:"range",min:e.min,max:e.max,step:o,value:a.max,onChange:c,className:"absolute w-full pointer-events-none appearance-none bg-transparent [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer","aria-label":`${e.label} maximum`}),(0,t.jsx)("div",{className:"h-1 bg-muted rounded w-full mt-2"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"number",min:e.min,max:e.max,step:o,value:a.min,onChange:i,className:"w-20 px-2 py-1 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring","aria-label":`${e.label} minimum value`}),(0,t.jsx)("span",{className:"text-muted-foreground text-sm",children:"to"}),(0,t.jsx)("input",{type:"number",min:e.min,max:e.max,step:o,value:a.max,onChange:u,className:"w-20 px-2 py-1 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring","aria-label":`${e.label} maximum value`})]})]})}var u=e.i(64659);function d({meta:e,value:a,onChange:n}){let[s,l]=(0,r.useState)(!1),o=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!s)return;let e=e=>{o.current&&!o.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);let i=(0,r.useCallback)(e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),n(t)},[a,n]),m=(0,r.useCallback)(()=>{n(new Set(e.values))},[e.values,n]),c=(0,r.useCallback)(()=>{n(new Set)},[n]),x=a.size,p=e.values.length,f=0===x?"None selected":x===p?"All selected":`${x} of ${p} selected`;return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",ref:o,children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:e.label}),(0,t.jsxs)("button",{onClick:()=>l(!s),className:"w-full flex items-center justify-between px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground hover:border-primary/50 transition-colors","aria-expanded":s,children:[(0,t.jsx)("span",{className:"truncate",children:f}),(0,t.jsx)(u.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${s?"rotate-180":""}`})]}),s&&(0,t.jsxs)("div",{className:"mt-2 border border-border rounded-md bg-popover shadow-md max-h-60 overflow-y-auto",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Select All"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"|"}),(0,t.jsx)("button",{onClick:c,className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Clear"})]}),e.values.map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-2 px-3 py-1.5 hover:bg-muted/50 cursor-pointer transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:a.has(e),onChange:()=>i(e),className:"rounded border-border text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-sm text-foreground truncate",children:e})]},e)),0===e.values.length&&(0,t.jsx)("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No values available"})]})]})}var c=e.i(85898);function x({meta:e,value:r,onChange:a}){let n=null!==r.from||null!==r.to;return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground",children:e.label}),n&&(0,t.jsx)("button",{onClick:()=>a({from:null,to:null}),className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Clear"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.default,{id:`filter-date-${e.name}-from`,value:null,stringValue:r.from,onChange:e=>a({...r,from:e||null}),"aria-label":`${e.label} from date`}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"to"}),(0,t.jsx)(c.default,{id:`filter-date-${e.name}-to`,value:null,stringValue:r.to,onChange:e=>a({...r,to:e||null}),"aria-label":`${e.label} to date`})]})]})}var p=e.i(22016),f=e.i(94008),b=e.i(73520);function h({sessions:e,filterMeta:r,totalCount:a,matchingCount:n,page:s,pageSize:l,onPageChange:o}){let i=Math.ceil(n/l),m=(s-1)*l,u=Math.min(m+e.length,n);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:0===n?"No sessions match the current filters.":(0,t.jsxs)(t.Fragment,{children:["Showing ",m+1,"-",u," of ",n," sessions",n!==a&&(0,t.jsxs)("span",{className:"ml-1",children:["(filtered from ",a," total)"]})]})}),(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,t.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Project"}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Session ID"}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Modified"}),r.filter(e=>"date"!==e.type).map(e=>(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:e.label},e.name))]})}),(0,t.jsx)("tbody",{children:0===e.length?(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:4+r.filter(e=>"date"!==e.type).length,className:"px-4 py-8 text-center text-muted-foreground",children:"No sessions found matching the filters."})}):e.map(e=>(0,t.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsx)(f.File,{className:"w-5 h-5 text-primary"})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-foreground",children:(0,t.jsx)(p.default,{href:`/project/${encodeURIComponent(e.projectName)}`,className:"hover:text-primary transition-colors",children:e.projectName})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm max-w-xs",children:(0,t.jsx)(p.default,{href:`/project/${encodeURIComponent(e.projectName)}/session/${encodeURIComponent(e.sessionId)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all",children:e.sessionId})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:e.lastModifiedFormatted}),r.filter(e=>"date"!==e.type).map(r=>{var a;return(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:void 0===(a=e.filterValues[r.name])?"-":"boolean"==typeof a?a?"Yes":"No":String(a)},r.name)})]},`${e.projectName}/${e.sessionId}`))})]})}),n>0&&i>1&&(0,t.jsx)(b.default,{currentPage:s,totalPages:i,onPageChange:o})]})]})}var g=e.i(31278);function v(e,t){let r={};for(let a of t){let t=e[a.name];if(t)switch(a.type){case"boolean":r[a.name]={type:"boolean",value:t};break;case"number":r[a.name]={type:"number",min:t.min,max:t.max};break;case"string":r[a.name]={type:"string",selected:Array.from(t)};break;case"date":r[a.name]={type:"date",from:t.from,to:t.to}}}return r}function y(e,t){for(let r of t){let t=e[r.name];if(t)switch(r.type){case"boolean":if("all"!==t)return!0;break;case"number":if(t.min!==r.min||t.max!==r.max)return!0;break;case"string":if(t.size!==r.values.length)return!0;break;case"date":if(null!==t.from||null!==t.to)return!0}}return!1}e.s(["default",0,function({viewName:e}){let a=(0,s.useUrlParams)(),o=(0,r.useRef)(null);null===o.current&&(o.current=a.getAll());let u=(0,r.useRef)(!1),[c,p]=(0,r.useState)(null),[f,b]=(0,r.useState)([]),[j,N]=(0,r.useState)(!0),[w,k]=(0,r.useState)(null),[C,S]=(0,r.useState)(!1),[P,$]=(0,r.useState)({}),[M,R]=(0,r.useState)(()=>(0,l.paramToPage)(a.get("page"))),T=(0,r.useRef)(null);(0,r.useEffect)(()=>()=>{T.current&&clearTimeout(T.current)},[]);let z=(0,r.useCallback)(async(t,r)=>{N(!0),k(null);try{let a=await n(e,{filters:t,page:r??1,pageSize:25});a.ok?a.hasFilters?(p(a.payload),a.payload.filterMeta.length>0&&b(a.payload.filterMeta)):S(!0):k(a.error)}catch(e){k(e instanceof Error?e.message:String(e))}finally{N(!1)}},[e]);(0,r.useEffect)(()=>{z().then(()=>{})},[z]),(0,r.useEffect)(()=>{if(f.length>0&&0===Object.keys(P).length){let e=function(e){let t={};for(let r of e)switch(r.type){case"boolean":t[r.name]="all";break;case"number":t[r.name]={min:r.min,max:r.max};break;case"string":t[r.name]=new Set(r.values);break;case"date":t[r.name]={from:null,to:null}}return t}(f),t=o.current,r=!1;if(t)for(let a of f){let n=t.get(a.name),s=(0,l.paramToActiveFilter)(a,n);null!==s&&(e[a.name]=s,r=!0)}if($(e),u.current=!0,r||t&&(0,l.paramToPage)(t.get("page"))>1){let r=t?(0,l.paramToPage)(t.get("page")):1,a=y(e,f)?v(e,f):void 0;R(r),z(a,r)}}},[f]);let F=(0,r.useCallback)((e,t)=>{if(!u.current)return;let r={page:(0,l.pageToParam)(t)};for(let t of f)r[t.name]=(0,l.activeFilterToParam)(t,e[t.name]);a.setAll(r)},[f,a]),I=(0,r.useCallback)((e,t)=>{$(r=>{let a={...r,[e]:t};return T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{let e=y(a,f)?v(a,f):void 0;R(1),z(e,1),F(a,1)},300),a})},[f,z,F]),A=(0,r.useCallback)(e=>{R(e),z(y(P,f)?v(P,f):void 0,e),F(P,e)},[P,f,z,F]);if(C)return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-6 text-center",children:[(0,t.jsx)("p",{className:"text-muted-foreground mb-2",children:"No filters are registered for this view."}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Use ",(0,t.jsx)("code",{className:"text-foreground bg-muted px-1 py-0.5 rounded",children:"app.dashboard.view()"})," or"," ",(0,t.jsx)("code",{className:"text-foreground bg-muted px-1 py-0.5 rounded",children:"app.dashboard.filter()"})," in your evals file to register filters."]})]});if(j&&!c)return(0,t.jsxs)("div",{className:"flex items-center justify-center py-16",children:[(0,t.jsx)(g.Loader2,{className:"w-6 h-6 text-primary animate-spin mr-2"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"Computing dashboard filters..."})]});if(w&&!c)return(0,t.jsxs)("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[(0,t.jsx)("p",{className:"text-sm text-destructive font-medium",children:"Failed to load dashboard"}),(0,t.jsx)("p",{className:"text-sm text-destructive/80 mt-1",children:w}),(0,t.jsx)("button",{onClick:()=>z(),className:"mt-3 px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Retry"})]});if(!c)return null;let U=f.length>0?f:c.filterMeta;return(0,t.jsxs)("div",{className:"space-y-6",children:[U.length>0&&(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:U.map(e=>{switch(e.type){case"boolean":return(0,t.jsx)(i,{meta:e,value:P[e.name]??"all",onChange:t=>I(e.name,t)},e.name);case"number":return(0,t.jsx)(m,{meta:e,value:P[e.name]??{min:e.min,max:e.max},onChange:t=>I(e.name,t)},e.name);case"string":return(0,t.jsx)(d,{meta:e,value:P[e.name]??new Set(e.values),onChange:t=>I(e.name,t)},e.name);case"date":return(0,t.jsx)(x,{meta:e,value:P[e.name]??{from:null,to:null},onChange:t=>I(e.name,t)},e.name)}})}),(0,t.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Computed in ",c.totalDurationMs,"ms",j&&" (updating...)"]}),(0,t.jsx)(h,{sessions:c.sessions,filterMeta:U,totalCount:c.totalCount,matchingCount:c.matchingCount,page:c.page,pageSize:c.pageSize,onPageChange:A})]})}],69263)},6225,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("405ce74cb046aeae573f23da28395edc2ad7ab1981",a.callServer,void 0,a.findSourceMapURL,"computeAggregates"),s=(0,e.i(75254).default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);function l({rows:e,columns:a}){let[n,o]=(0,r.useState)(null),[i,m]=(0,r.useState)("asc");if(0===e.length)return(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No data returned from reduce function."});let u=n?[...e].sort((e,t)=>{let r="asc"===i?1:-1,a=e[n],s=t[n];return void 0===a&&void 0===s?0:void 0===a?1:void 0===s?-1:"string"==typeof a&&"string"==typeof s?a.localeCompare(s)*r:"boolean"==typeof a&&"boolean"==typeof s?(Number(a)-Number(s))*r:"number"==typeof a&&"number"==typeof s?(a-s)*r:String(a).localeCompare(String(s))*r}):e;return(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{className:"border-b border-border",children:a.map(e=>(0,t.jsx)("th",{className:"px-3 py-2 text-left text-xs font-medium text-muted-foreground cursor-pointer hover:text-foreground select-none",onClick:()=>{n===e?m(e=>"asc"===e?"desc":"asc"):(o(e),m("desc"))},children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[e,(0,t.jsx)(s,{className:"w-3 h-3"})]})},e))})}),(0,t.jsx)("tbody",{children:u.map((e,r)=>(0,t.jsx)("tr",{className:"border-b border-border/50 hover:bg-muted/50",children:a.map(r=>{var a;return(0,t.jsx)("td",{className:"px-3 py-2 text-foreground",children:null==(a=e[r])?"—":"boolean"==typeof a?a?"Yes":"No":"number"==typeof a?Number.isInteger(a)?a.toLocaleString():a.toFixed(4):String(a)},r)})},r))})]})})}function o({aggregate:e}){return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground mb-3",children:e.label}),(0,t.jsx)(l,{rows:e.rows,columns:e.columns})]})}var i=e.i(31278);e.s(["default",0,function({viewName:e}){let[a,s]=(0,r.useState)(null),[l,m]=(0,r.useState)(!0),[u,d]=(0,r.useState)(null),c=(0,r.useCallback)(async()=>{m(!0),d(null);try{let t=await n(e);t.ok?t.hasAggregates&&s(t.payload):d(t.error)}catch(e){d(e instanceof Error?e.message:String(e))}finally{m(!1)}},[e]);return((0,r.useEffect)(()=>{c()},[c]),l&&!a)?(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Loader2,{className:"w-5 h-5 text-primary animate-spin mr-2"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Computing aggregates..."})]}):u&&!a?(0,t.jsxs)("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[(0,t.jsx)("p",{className:"text-sm text-destructive font-medium",children:"Failed to compute aggregates"}),(0,t.jsx)("p",{className:"text-sm text-destructive/80 mt-1",children:u}),(0,t.jsx)("button",{onClick:()=>c(),className:"mt-3 px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Retry"})]}):a&&0!==a.aggregates.length?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-foreground",children:"Aggregates"}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[a.totalSessions," sessions, ",a.totalDurationMs,"ms",l&&" (updating...)"]})]}),a.aggregates.map(e=>(0,t.jsx)(o,{aggregate:e},e.name))]}):null}],6225)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73375,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],73375)},63059,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],63059)},73520,e=>{"use strict";var t=e.i(43476),r=e.i(73375),a=e.i(63059);e.s(["default",0,function({currentPage:e,totalPages:n,onPageChange:s}){if(n<=1)return null;let l=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>s(e-1),disabled:1===e,className:l(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(r.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(n<=7)return Array.from({length:n},(e,t)=>t+1);let t=[1],r=Math.max(2,e-1),a=Math.min(n-1,e+1);e<=3&&(a=Math.min(5,n-1)),e>=n-2&&(r=Math.max(2,n-4)),r>2&&t.push("ellipsis-start");for(let e=r;e<=a;e++)t.push(e);return a<n-1&&t.push("ellipsis-end"),t.push(n),t})().map(r=>"string"==typeof r?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},r):(0,t.jsx)("button",{onClick:()=>s(r),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===r?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${r}`,"aria-current":e===r?"page":void 0,children:r},r))}),(0,t.jsxs)("button",{onClick:()=>s(e+1),disabled:e===n,className:l(e===n),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(a.ChevronRight,{className:"w-4 h-4"})]})]})}])},80060,2711,e=>{"use strict";var t=e.i(18566),r=e.i(71645);function a(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${a}`}function n(e){if(!e||!s(e))return null;let[t,r,a]=e.split("-").map(Number);return new Date(t,r-1,a,12,0,0)}function s(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)&&!isNaN(Date.parse(e))}e.s(["useUrlParams",0,function(){let e=(0,t.useSearchParams)(),a=(0,t.useRouter)(),n=(0,t.usePathname)(),s=(0,r.useRef)(null),l=(0,r.useCallback)(t=>e.get(t),[e]),o=(0,r.useCallback)(()=>new URLSearchParams(e.toString()),[e]),i=(0,r.useCallback)(t=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{let r=new URLSearchParams(e.toString());for(let[e,a]of Object.entries(t))void 0===a||""===a?r.delete(e):r.set(e,a);let s=r.toString(),l=s?`${n}?${s}`:n;a.replace(l,{scroll:!1})},150)},[e,n,a]);return(0,r.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),{get:l,getAll:o,setAll:i}}],80060),e.s(["activeFilterToParam",0,function(e,t){switch(e.type){case"boolean":return"all"===t?void 0:t;case"number":if(t.min===e.min&&t.max===e.max)return;return`${t.min}~${t.max}`;case"string":if(t.size===e.values.length)return;return Array.from(t).map(e=>encodeURIComponent(e)).join(",");case"date":if(!t.from&&!t.to)return;return`${t.from??""},${t.to??""}`}},"dateRangeToParams",0,function(e){let t={};return e.from&&(t.from=a(e.from)),e.to&&(t.to=a(e.to)),t},"keywordsToParam",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"pageToParam",0,function(e){return e<=1?void 0:String(e)},"paramToActiveFilter",0,function(e,t){if(null===t||""===t)return null;switch(e.type){case"boolean":if("true"===t||"false"===t)return t;return null;case"number":{let e=t.split("~");if(2!==e.length)return null;let r=parseFloat(e[0]),a=parseFloat(e[1]);if(!Number.isFinite(r)||!Number.isFinite(a))return null;return{min:r,max:a}}case"string":{let r=t.split(",").map(e=>decodeURIComponent(e.trim())).filter(t=>e.values.includes(t));if(0===r.length)return null;return new Set(r)}case"date":{let e=t.split(",");if(2!==e.length)return null;let r=e[0]||null,a=e[1]||null;if(!r&&!a||r&&!s(r)||a&&!s(a))return null;return{from:r,to:a}}}},"paramToKeywords",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"paramToPage",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"paramToPreset",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"paramsToDateRange",0,function(e,t){return{from:n(e),to:n(t)}},"presetToParam",0,function(e){return"all"===e?void 0:e}],2711)},85898,e=>{"use strict";var t=e.i(43476);let r=(0,e.i(75254).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["default",0,function({id:e,value:a,stringValue:n,onChange:s,"aria-label":l}){let o=null!=n?n:a?a.toISOString().split("T")[0]:"";return(0,t.jsxs)("div",{className:"relative group",children:[(0,t.jsx)("input",{type:"date",id:e,value:o,onChange:e=>s(e.target.value),"aria-label":l,className:"date-input px-3 py-2 pr-8 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[200px]"}),(0,t.jsx)("label",{htmlFor:e,className:"absolute right-2.5 top-1/2 -translate-y-1/2 cursor-pointer pointer-events-auto z-10 p-1 rounded hover:bg-muted/50 transition-colors",onClick:t=>{t.preventDefault();let r=document.getElementById(e);r&&"function"==typeof r.showPicker?r.showPicker():r?.click()},children:(0,t.jsx)(r,{className:"w-4 h-4 text-primary group-hover:text-primary/80 transition-colors"})})]})}],85898)},94008,e=>{"use strict";let t=(0,e.i(75254).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["File",0,t],94008)},31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],31278)},69263,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("60c8f906a04683e63645a750428aa2af6a36851626",a.callServer,void 0,a.findSourceMapURL,"computeDashboard");var s=e.i(80060),l=e.i(2711);let o=["all","true","false"];function i({meta:e,value:r,onChange:a}){return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:e.label}),(0,t.jsx)("div",{className:"flex gap-1",children:o.map(e=>(0,t.jsx)("button",{onClick:()=>a(e),className:`flex-1 px-3 py-1.5 text-sm rounded-md transition-colors ${r===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"all"===e?"All":"true"===e?"Yes":"No"},e))})]})}function m({meta:e,value:a,onChange:n}){let s=e.max-e.min,l=!Number.isInteger(e.min)||!Number.isInteger(e.max),o=s<=1?.01:l&&s<=10?.1:l||s<=10?1:s<=100?5:10,i=(0,r.useCallback)(e=>{let t=Number(e.target.value);isNaN(t)||n({...a,min:Math.min(t,a.max)})},[a,n]),u=(0,r.useCallback)(e=>{let t=Number(e.target.value);isNaN(t)||n({...a,max:Math.max(t,a.min)})},[a,n]),d=(0,r.useCallback)(e=>{let t=Number(e.target.value);n({...a,min:Math.min(t,a.max)})},[a,n]),c=(0,r.useCallback)(e=>{let t=Number(e.target.value);n({...a,max:Math.max(t,a.min)})},[a,n]);return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:e.label}),(0,t.jsxs)("div",{className:"relative mb-3",children:[(0,t.jsx)("input",{type:"range",min:e.min,max:e.max,step:o,value:a.min,onChange:d,className:"absolute w-full pointer-events-none appearance-none bg-transparent [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer","aria-label":`${e.label} minimum`}),(0,t.jsx)("input",{type:"range",min:e.min,max:e.max,step:o,value:a.max,onChange:c,className:"absolute w-full pointer-events-none appearance-none bg-transparent [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer","aria-label":`${e.label} maximum`}),(0,t.jsx)("div",{className:"h-1 bg-muted rounded w-full mt-2"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"number",min:e.min,max:e.max,step:o,value:a.min,onChange:i,className:"w-20 px-2 py-1 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring","aria-label":`${e.label} minimum value`}),(0,t.jsx)("span",{className:"text-muted-foreground text-sm",children:"to"}),(0,t.jsx)("input",{type:"number",min:e.min,max:e.max,step:o,value:a.max,onChange:u,className:"w-20 px-2 py-1 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring","aria-label":`${e.label} maximum value`})]})]})}var u=e.i(64659);function d({meta:e,value:a,onChange:n}){let[s,l]=(0,r.useState)(!1),o=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!s)return;let e=e=>{o.current&&!o.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);let i=(0,r.useCallback)(e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),n(t)},[a,n]),m=(0,r.useCallback)(()=>{n(new Set(e.values))},[e.values,n]),c=(0,r.useCallback)(()=>{n(new Set)},[n]),x=a.size,p=e.values.length,f=0===x?"None selected":x===p?"All selected":`${x} of ${p} selected`;return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",ref:o,children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:e.label}),(0,t.jsxs)("button",{onClick:()=>l(!s),className:"w-full flex items-center justify-between px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground hover:border-primary/50 transition-colors","aria-expanded":s,children:[(0,t.jsx)("span",{className:"truncate",children:f}),(0,t.jsx)(u.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${s?"rotate-180":""}`})]}),s&&(0,t.jsxs)("div",{className:"mt-2 border border-border rounded-md bg-popover shadow-md max-h-60 overflow-y-auto",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Select All"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"|"}),(0,t.jsx)("button",{onClick:c,className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Clear"})]}),e.values.map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-2 px-3 py-1.5 hover:bg-muted/50 cursor-pointer transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:a.has(e),onChange:()=>i(e),className:"rounded border-border text-primary focus:ring-ring"}),(0,t.jsx)("span",{className:"text-sm text-foreground truncate",children:e})]},e)),0===e.values.length&&(0,t.jsx)("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No values available"})]})]})}var c=e.i(85898);function x({meta:e,value:r,onChange:a}){let n=null!==r.from||null!==r.to;return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground",children:e.label}),n&&(0,t.jsx)("button",{onClick:()=>a({from:null,to:null}),className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Clear"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.default,{id:`filter-date-${e.name}-from`,value:null,stringValue:r.from,onChange:e=>a({...r,from:e||null}),"aria-label":`${e.label} from date`}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"to"}),(0,t.jsx)(c.default,{id:`filter-date-${e.name}-to`,value:null,stringValue:r.to,onChange:e=>a({...r,to:e||null}),"aria-label":`${e.label} to date`})]})]})}var p=e.i(22016),f=e.i(94008),h=e.i(73520);function b({sessions:e,filterMeta:r,totalCount:a,matchingCount:n,page:s,pageSize:l,onPageChange:o}){let i=Math.ceil(n/l),m=(s-1)*l,u=Math.min(m+e.length,n);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:0===n?"No sessions match the current filters.":(0,t.jsxs)(t.Fragment,{children:["Showing ",m+1,"-",u," of ",n," sessions",n!==a&&(0,t.jsxs)("span",{className:"ml-1",children:["(filtered from ",a," total)"]})]})}),(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,t.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Project"}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Session ID"}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Modified"}),r.filter(e=>"date"!==e.type).map(e=>(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:e.label},e.name))]})}),(0,t.jsx)("tbody",{children:0===e.length?(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:4+r.filter(e=>"date"!==e.type).length,className:"px-4 py-8 text-center text-muted-foreground",children:"No sessions found matching the filters."})}):e.map(e=>(0,t.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsx)(f.File,{className:"w-5 h-5 text-primary"})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-foreground",children:(0,t.jsx)(p.default,{href:`/project/${encodeURIComponent(e.projectName)}`,className:"hover:text-primary transition-colors",children:e.projectName})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm max-w-xs",children:(0,t.jsx)(p.default,{href:`/project/${encodeURIComponent(e.projectName)}/session/${encodeURIComponent(e.sessionId)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all",children:e.sessionId})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:e.lastModifiedFormatted}),r.filter(e=>"date"!==e.type).map(r=>{var a;return(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:void 0===(a=e.filterValues[r.name])?"-":"boolean"==typeof a?a?"Yes":"No":String(a)},r.name)})]},`${e.projectName}/${e.sessionId}`))})]})}),n>0&&i>1&&(0,t.jsx)(h.default,{currentPage:s,totalPages:i,onPageChange:o})]})]})}var g=e.i(31278);function v(e,t){let r={};for(let a of t){let t=e[a.name];if(t)switch(a.type){case"boolean":r[a.name]={type:"boolean",value:t};break;case"number":r[a.name]={type:"number",min:t.min,max:t.max};break;case"string":r[a.name]={type:"string",selected:Array.from(t)};break;case"date":r[a.name]={type:"date",from:t.from,to:t.to}}}return r}function y(e,t){for(let r of t){let t=e[r.name];if(t)switch(r.type){case"boolean":if("all"!==t)return!0;break;case"number":if(t.min!==r.min||t.max!==r.max)return!0;break;case"string":if(t.size!==r.values.length)return!0;break;case"date":if(null!==t.from||null!==t.to)return!0}}return!1}e.s(["default",0,function({viewName:e}){let a=(0,s.useUrlParams)(),o=(0,r.useRef)(null);null===o.current&&(o.current=a.getAll());let u=(0,r.useRef)(!1),[c,p]=(0,r.useState)(null),[f,h]=(0,r.useState)([]),[j,N]=(0,r.useState)(!0),[w,k]=(0,r.useState)(null),[C,S]=(0,r.useState)(!1),[P,$]=(0,r.useState)({}),[M,R]=(0,r.useState)(()=>(0,l.paramToPage)(a.get("page"))),T=(0,r.useRef)(null);(0,r.useEffect)(()=>()=>{T.current&&clearTimeout(T.current)},[]);let z=(0,r.useCallback)(async(t,r)=>{N(!0),k(null);try{let a=await n(e,{filters:t,page:r??1,pageSize:25});a.ok?a.hasFilters?(p(a.payload),a.payload.filterMeta.length>0&&h(a.payload.filterMeta)):S(!0):k(a.error)}catch(e){k(e instanceof Error?e.message:String(e))}finally{N(!1)}},[e]);(0,r.useEffect)(()=>{z().then(()=>{})},[z]),(0,r.useEffect)(()=>{if(f.length>0&&0===Object.keys(P).length){let e=function(e){let t={};for(let r of e)switch(r.type){case"boolean":t[r.name]="all";break;case"number":t[r.name]={min:r.min,max:r.max};break;case"string":t[r.name]=new Set(r.values);break;case"date":t[r.name]={from:null,to:null}}return t}(f),t=o.current,r=!1;if(t)for(let a of f){let n=t.get(a.name),s=(0,l.paramToActiveFilter)(a,n);null!==s&&(e[a.name]=s,r=!0)}if($(e),u.current=!0,r||t&&(0,l.paramToPage)(t.get("page"))>1){let r=t?(0,l.paramToPage)(t.get("page")):1,a=y(e,f)?v(e,f):void 0;R(r),z(a,r)}}},[f]);let F=(0,r.useCallback)((e,t)=>{if(!u.current)return;let r={page:(0,l.pageToParam)(t)};for(let t of f)r[t.name]=(0,l.activeFilterToParam)(t,e[t.name]);a.setAll(r)},[f,a]),I=(0,r.useCallback)((e,t)=>{$(r=>{let a={...r,[e]:t};return T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{let e=y(a,f)?v(a,f):void 0;R(1),z(e,1),F(a,1)},300),a})},[f,z,F]),A=(0,r.useCallback)(e=>{R(e),z(y(P,f)?v(P,f):void 0,e),F(P,e)},[P,f,z,F]);if(C)return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-6 text-center",children:[(0,t.jsx)("p",{className:"text-muted-foreground mb-2",children:"No filters are registered for this view."}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Use ",(0,t.jsx)("code",{className:"text-foreground bg-muted px-1 py-0.5 rounded",children:"app.dashboard.view()"})," or"," ",(0,t.jsx)("code",{className:"text-foreground bg-muted px-1 py-0.5 rounded",children:"app.dashboard.filter()"})," in your evals file to register filters."]})]});if(j&&!c)return(0,t.jsxs)("div",{className:"flex items-center justify-center py-16",children:[(0,t.jsx)(g.Loader2,{className:"w-6 h-6 text-primary animate-spin mr-2"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"Computing dashboard filters..."})]});if(w&&!c)return(0,t.jsxs)("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[(0,t.jsx)("p",{className:"text-sm text-destructive font-medium",children:"Failed to load dashboard"}),(0,t.jsx)("p",{className:"text-sm text-destructive/80 mt-1",children:w}),(0,t.jsx)("button",{onClick:()=>z(),className:"mt-3 px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Retry"})]});if(!c)return null;let U=f.length>0?f:c.filterMeta;return(0,t.jsxs)("div",{className:"space-y-6",children:[U.length>0&&(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:U.map(e=>{switch(e.type){case"boolean":return(0,t.jsx)(i,{meta:e,value:P[e.name]??"all",onChange:t=>I(e.name,t)},e.name);case"number":return(0,t.jsx)(m,{meta:e,value:P[e.name]??{min:e.min,max:e.max},onChange:t=>I(e.name,t)},e.name);case"string":return(0,t.jsx)(d,{meta:e,value:P[e.name]??new Set(e.values),onChange:t=>I(e.name,t)},e.name);case"date":return(0,t.jsx)(x,{meta:e,value:P[e.name]??{from:null,to:null},onChange:t=>I(e.name,t)},e.name)}})}),(0,t.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Computed in ",c.totalDurationMs,"ms",j&&" (updating...)"]}),(0,t.jsx)(b,{sessions:c.sessions,filterMeta:U,totalCount:c.totalCount,matchingCount:c.matchingCount,page:c.page,pageSize:c.pageSize,onPageChange:A})]})}],69263)},6225,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("40ca129944c8d7e3f7818a8ec8cb24452b33915e5d",a.callServer,void 0,a.findSourceMapURL,"computeAggregates"),s=(0,e.i(75254).default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);function l({rows:e,columns:a}){let[n,o]=(0,r.useState)(null),[i,m]=(0,r.useState)("asc");if(0===e.length)return(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No data returned from reduce function."});let u=n?[...e].sort((e,t)=>{let r="asc"===i?1:-1,a=e[n],s=t[n];return void 0===a&&void 0===s?0:void 0===a?1:void 0===s?-1:"string"==typeof a&&"string"==typeof s?a.localeCompare(s)*r:"boolean"==typeof a&&"boolean"==typeof s?(Number(a)-Number(s))*r:"number"==typeof a&&"number"==typeof s?(a-s)*r:String(a).localeCompare(String(s))*r}):e;return(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{className:"border-b border-border",children:a.map(e=>(0,t.jsx)("th",{className:"px-3 py-2 text-left text-xs font-medium text-muted-foreground cursor-pointer hover:text-foreground select-none",onClick:()=>{n===e?m(e=>"asc"===e?"desc":"asc"):(o(e),m("desc"))},children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[e,(0,t.jsx)(s,{className:"w-3 h-3"})]})},e))})}),(0,t.jsx)("tbody",{children:u.map((e,r)=>(0,t.jsx)("tr",{className:"border-b border-border/50 hover:bg-muted/50",children:a.map(r=>{var a;return(0,t.jsx)("td",{className:"px-3 py-2 text-foreground",children:null==(a=e[r])?"—":"boolean"==typeof a?a?"Yes":"No":"number"==typeof a?Number.isInteger(a)?a.toLocaleString():a.toFixed(4):String(a)},r)})},r))})]})})}function o({aggregate:e}){return(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground mb-3",children:e.label}),(0,t.jsx)(l,{rows:e.rows,columns:e.columns})]})}var i=e.i(31278);e.s(["default",0,function({viewName:e}){let[a,s]=(0,r.useState)(null),[l,m]=(0,r.useState)(!0),[u,d]=(0,r.useState)(null),c=(0,r.useCallback)(async()=>{m(!0),d(null);try{let t=await n(e);t.ok?t.hasAggregates&&s(t.payload):d(t.error)}catch(e){d(e instanceof Error?e.message:String(e))}finally{m(!1)}},[e]);return((0,r.useEffect)(()=>{c()},[c]),l&&!a)?(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Loader2,{className:"w-5 h-5 text-primary animate-spin mr-2"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Computing aggregates..."})]}):u&&!a?(0,t.jsxs)("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[(0,t.jsx)("p",{className:"text-sm text-destructive font-medium",children:"Failed to compute aggregates"}),(0,t.jsx)("p",{className:"text-sm text-destructive/80 mt-1",children:u}),(0,t.jsx)("button",{onClick:()=>c(),className:"mt-3 px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Retry"})]}):a&&0!==a.aggregates.length?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-foreground",children:"Aggregates"}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[a.totalSessions," sessions, ",a.totalDurationMs,"ms",l&&" (updating...)"]})]}),a.aggregates.map(e=>(0,t.jsx)(o,{aggregate:e},e.name))]}):null}],6225)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89954,e=>{"use strict";var r=e.i(43476),o=e.i(71645),t=e.i(18566),s=e.i(95187);let d=(0,s.createServerReference)("40221a3f443368abe259a2bc5aa6039eefd6e9e70d",s.callServer,void 0,s.findSourceMapURL,"login");var n=e.i(15127),a=e.i(22016);function i(){let e=(0,t.useSearchParams)(),s=(0,t.useRouter)(),i=e.get("from")??"/",l=e.get("hash")??"",[c,u]=(0,o.useState)(null),[m,x]=(0,o.useState)(!1);async function f(e){e.preventDefault(),u(null),x(!0);let r=new FormData(e.currentTarget);r.set("redirectTo",i);let o=await d(r);o?.error?(u(o.error),x(!1)):o?.redirectTo&&(l?window.location.href=o.redirectTo+l:s.push(o.redirectTo))}return(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:(0,r.jsxs)("div",{className:"w-full max-w-sm rounded-lg border border-border bg-card p-8 shadow-lg",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-6",children:[(0,r.jsx)(a.default,{href:"/",children:(0,r.jsx)(n.Logo,{width:36,height:36})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Sign in to Claudeye"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Enter your credentials to continue"})]}),(0,r.jsxs)("form",{onSubmit:f,className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("label",{htmlFor:"username",className:"text-sm font-medium text-foreground",children:"Username"}),(0,r.jsx)("input",{id:"username",name:"username",type:"text",required:!0,autoComplete:"username",autoFocus:!0,className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary",placeholder:"admin"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("label",{htmlFor:"password",className:"text-sm font-medium text-foreground",children:"Password"}),(0,r.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"current-password",className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary"})]}),c&&(0,r.jsx)("p",{className:"text-sm text-red-500 bg-red-500/10 rounded-md px-3 py-2",children:c}),(0,r.jsx)("button",{type:"submit",disabled:m,className:"mt-1 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Signing in...":"Sign in"})]})]})})}e.s(["default",0,function(){return(0,r.jsx)(o.Suspense,{children:(0,r.jsx)(i,{})})}],89954)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89954,e=>{"use strict";var r=e.i(43476),o=e.i(71645),t=e.i(18566),s=e.i(95187);let d=(0,s.createServerReference)("409aadcbf2d0760a74e17de2f0830dafb3695f973c",s.callServer,void 0,s.findSourceMapURL,"login");var n=e.i(15127),a=e.i(22016);function i(){let e=(0,t.useSearchParams)(),s=(0,t.useRouter)(),i=e.get("from")??"/",l=e.get("hash")??"",[c,u]=(0,o.useState)(null),[m,x]=(0,o.useState)(!1);async function f(e){e.preventDefault(),u(null),x(!0);let r=new FormData(e.currentTarget);r.set("redirectTo",i);let o=await d(r);o?.error?(u(o.error),x(!1)):o?.redirectTo&&(l?window.location.href=o.redirectTo+l:s.push(o.redirectTo))}return(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:(0,r.jsxs)("div",{className:"w-full max-w-sm rounded-lg border border-border bg-card p-8 shadow-lg",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-6",children:[(0,r.jsx)(a.default,{href:"/",children:(0,r.jsx)(n.Logo,{width:36,height:36})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Sign in to Claudeye"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Enter your credentials to continue"})]}),(0,r.jsxs)("form",{onSubmit:f,className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("label",{htmlFor:"username",className:"text-sm font-medium text-foreground",children:"Username"}),(0,r.jsx)("input",{id:"username",name:"username",type:"text",required:!0,autoComplete:"username",autoFocus:!0,className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary",placeholder:"admin"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("label",{htmlFor:"password",className:"text-sm font-medium text-foreground",children:"Password"}),(0,r.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"current-password",className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary"})]}),c&&(0,r.jsx)("p",{className:"text-sm text-red-500 bg-red-500/10 rounded-md px-3 py-2",children:c}),(0,r.jsx)("button",{type:"submit",disabled:m,className:"mt-1 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Signing in...":"Sign in"})]})]})})}e.s(["default",0,function(){return(0,r.jsx)(o.Suspense,{children:(0,r.jsx)(i,{})})}],89954)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63059,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],63059)},73375,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],73375)},73520,e=>{"use strict";var t=e.i(43476),a=e.i(73375),r=e.i(63059);e.s(["default",0,function({currentPage:e,totalPages:i,onPageChange:s}){if(i<=1)return null;let l=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>s(e-1),disabled:1===e,className:l(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(a.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(i<=7)return Array.from({length:i},(e,t)=>t+1);let t=[1],a=Math.max(2,e-1),r=Math.min(i-1,e+1);e<=3&&(r=Math.min(5,i-1)),e>=i-2&&(a=Math.max(2,i-4)),a>2&&t.push("ellipsis-start");for(let e=a;e<=r;e++)t.push(e);return r<i-1&&t.push("ellipsis-end"),t.push(i),t})().map(a=>"string"==typeof a?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},a):(0,t.jsx)("button",{onClick:()=>s(a),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${a}`,"aria-current":e===a?"page":void 0,children:a},a))}),(0,t.jsxs)("button",{onClick:()=>s(e+1),disabled:e===i,className:l(e===i),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(r.ChevronRight,{className:"w-4 h-4"})]})]})}])},1742,e=>{"use strict";let t=(0,e.i(75254).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],1742)},39616,62363,e=>{"use strict";let t=(0,e.i(75254).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],39616);var a=e.i(95187);let r=(0,a.createServerReference)("60e923e36f3e84508d60f327582e32738a949baee8",a.callServer,void 0,a.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,r],62363)},81418,88092,51737,e=>{"use strict";var t=e.i(75254);let a=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,a],81418);let r=(0,t.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);e.s(["ShieldX",0,r],88092);let i=(0,t.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,i],51737)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63059,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],63059)},73375,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],73375)},73520,e=>{"use strict";var t=e.i(43476),a=e.i(73375),r=e.i(63059);e.s(["default",0,function({currentPage:e,totalPages:i,onPageChange:s}){if(i<=1)return null;let l=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>s(e-1),disabled:1===e,className:l(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(a.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(i<=7)return Array.from({length:i},(e,t)=>t+1);let t=[1],a=Math.max(2,e-1),r=Math.min(i-1,e+1);e<=3&&(r=Math.min(5,i-1)),e>=i-2&&(a=Math.max(2,i-4)),a>2&&t.push("ellipsis-start");for(let e=a;e<=r;e++)t.push(e);return r<i-1&&t.push("ellipsis-end"),t.push(i),t})().map(a=>"string"==typeof a?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},a):(0,t.jsx)("button",{onClick:()=>s(a),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${a}`,"aria-current":e===a?"page":void 0,children:a},a))}),(0,t.jsxs)("button",{onClick:()=>s(e+1),disabled:e===i,className:l(e===i),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(r.ChevronRight,{className:"w-4 h-4"})]})]})}])},1742,e=>{"use strict";let t=(0,e.i(75254).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],1742)},39616,72131,e=>{"use strict";let t=(0,e.i(75254).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],39616);var a=e.i(95187);let r=(0,a.createServerReference)("602bbc72facb5faaec730a7e10bdd3c426fb357a36",a.callServer,void 0,a.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,r],72131)},81418,88092,51737,e=>{"use strict";var t=e.i(75254);let a=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,a],81418);let r=(0,t.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);e.s(["ShieldX",0,r],88092);let i=(0,t.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,i],51737)}]);