@claudeye/linux-arm64 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/standalone/.next/BUILD_ID +1 -1
- package/assets/standalone/.next/build-manifest.json +5 -5
- package/assets/standalone/.next/prerender-manifest.json +3 -3
- package/assets/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/assets/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/_global-error.html +1 -1
- package/assets/standalone/.next/server/app/_global-error.rsc +7 -7
- package/assets/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/assets/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
- package/assets/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/_not-found.html +2 -2
- package/assets/standalone/.next/server/app/_not-found.rsc +15 -15
- package/assets/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/assets/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/assets/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/dashboard/[viewName]/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/dashboard/[viewName]/page/server-reference-manifest.json +5 -5
- package/assets/standalone/.next/server/app/dashboard/[viewName]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/dashboard/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/dashboard/page/server-reference-manifest.json +5 -5
- package/assets/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/index.html +1 -1
- package/assets/standalone/.next/server/app/index.rsc +15 -15
- package/assets/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/assets/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
- package/assets/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/login/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/login/page/server-reference-manifest.json +3 -3
- package/assets/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/login.html +2 -2
- package/assets/standalone/.next/server/app/login.rsc +17 -17
- package/assets/standalone/.next/server/app/login.segments/_full.segment.rsc +17 -17
- package/assets/standalone/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/login.segments/_index.segment.rsc +10 -10
- package/assets/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/page/server-reference-manifest.json +2 -2
- package/assets/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/policies/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/policies/page/server-reference-manifest.json +9 -9
- package/assets/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/project/[name]/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +2 -2
- package/assets/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +10 -10
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/projects/page/server-reference-manifest.json +2 -2
- package/assets/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/queue/page/build-manifest.json +2 -2
- package/assets/standalone/.next/server/app/queue/page/server-reference-manifest.json +4 -4
- package/assets/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0.lwwrp._.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0f_5ws6._.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0rtkhr~._.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0tlbu6c._.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0vfmej5._.js +2 -2
- package/assets/standalone/.next/server/chunks/_0aylu-q._.js +1 -1
- package/assets/standalone/.next/server/chunks/_0lq2_wn._.js +2 -2
- package/assets/standalone/.next/server/chunks/_0oqawqx._.js +2 -2
- package/assets/standalone/.next/server/chunks/_0vt409y._.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0bdfoky.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0l15kkr.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_00~~2w9._.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_05pz9._._.js +1 -1
- package/assets/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-_oq51._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-wbic0._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__04qo1w2._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-9w~bh._.js → [root-of-the-server]__07vr-m8._.js} +2 -2
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__09y6src._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__09y7ni.._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bubgf_._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0f7wkrr._.js → [root-of-the-server]__0hzootc._.js} +2 -2
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0m0x9dt._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pw0g9c._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rm4qtt._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0spfsp5._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0x7-awk._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zva2n_._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__1370kzv._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_01fj_8s._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_04.u7zx._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_06383ya._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_06nq9qk._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0i~.gk_._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0kfjwwu._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0km.fsf._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0rr.uoo._.js +3 -3
- package/assets/standalone/.next/server/chunks/ssr/_0x26hbi._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0xg44oj._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_11ou~_x._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_1207ol.._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_04qfs8z._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_05evmdg._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_07izk21._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_0uosk1e._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_13f0ohr._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_13cb_9d._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_queue_queue-client_tsx_0c0olxv._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/node_modules_next_0rd0oc-._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_0h9llsw._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_0~3yv~8._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mebn66._.js +1 -1
- package/assets/standalone/.next/server/middleware-build-manifest.js +5 -5
- package/assets/standalone/.next/server/pages/404.html +2 -2
- package/assets/standalone/.next/server/pages/500.html +1 -1
- package/assets/standalone/.next/server/server-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/server-reference-manifest.json +23 -23
- package/assets/standalone/.next/static/chunks/{0u95dh6lcl7tm.js → 031pa5~qfzt~_.js} +1 -1
- package/assets/standalone/.next/static/chunks/{0r33ook0mzjdp.js → 053fkn7ps6kaz.js} +2 -2
- package/assets/standalone/.next/static/chunks/{0r-uj~~hfjn~d.js → 0c7lqtrcy3f9..js} +1 -1
- package/assets/standalone/.next/static/chunks/{0tdv9t00~jli0.js → 0dxnepassa~ef.js} +1 -1
- package/assets/standalone/.next/static/chunks/{0.llxyobdk9ao.js → 0s3ccto17p65b.js} +1 -1
- package/assets/standalone/.next/static/chunks/{0eozapv72nxu9.js → 0su8rjooh3ypl.js} +1 -1
- package/assets/standalone/.next/static/chunks/{0yby34zxp~u9y.js → 0t9elhfl1ut1l.js} +1 -1
- package/assets/standalone/.next/static/chunks/{041yg1qijsts_.js → 0uii3kvke.3a6.js} +1 -1
- package/assets/standalone/.next/static/chunks/{01z1mkd0jlg01.js → 0wbz7205d6p7w.js} +1 -1
- package/assets/standalone/.next/static/chunks/{013e6ucdn~oej.js → 0xtj0hdw6ymaw.js} +1 -1
- package/assets/standalone/.next/static/chunks/{01i5gpaes1u49.js → 0z1t1-lgk7n30.js} +1 -1
- package/assets/standalone/.next/static/chunks/turbopack-0uc5y~g6h.n7-.js +1 -0
- package/assets/standalone/README.md +17 -2643
- package/assets/standalone/node_modules/@next/env/package.json +1 -1
- package/assets/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/assets/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +2 -2
- package/assets/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
- package/assets/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/assets/standalone/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +80 -0
- package/assets/standalone/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +24 -20
- package/assets/standalone/node_modules/next/dist/server/config-schema.js +1 -0
- package/assets/standalone/node_modules/next/dist/server/config.js +1 -1
- package/assets/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +13 -16
- package/assets/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/assets/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/assets/standalone/node_modules/next/dist/server/lib/router-server.js +14 -1
- package/assets/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/assets/standalone/node_modules/next/dist/server/route-modules/app-route/module.js +25 -10
- package/assets/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/assets/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/assets/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/assets/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/assets/standalone/node_modules/next/package.json +15 -15
- package/assets/standalone/package.json +5 -5
- package/bin/claudeye +0 -0
- package/package.json +2 -2
- package/assets/standalone/.next/static/chunks/turbopack-0.w3uhj.ln7pt.js +0 -1
- /package/assets/standalone/.next/static/{T2uFRf42cIG4zxcRtc0qK → gYWWFmr61HWYw5tmB9lVi}/_buildManifest.js +0 -0
- /package/assets/standalone/.next/static/{T2uFRf42cIG4zxcRtc0qK → gYWWFmr61HWYw5tmB9lVi}/_clientMiddlewareManifest.js +0 -0
- /package/assets/standalone/.next/static/{T2uFRf42cIG4zxcRtc0qK → gYWWFmr61HWYw5tmB9lVi}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53348,e=>{"use strict";var r=e.i(43476),t=e.i(71645),n=e.i(
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53348,e=>{"use strict";var r=e.i(43476),t=e.i(71645),n=e.i(82191),i=e.i(9969);e.s(["default",0,function({error:e,reset:o}){return(0,t.useEffect)(()=>{(0,n.getTelemetryConfig)().then(r=>{(0,i.setClientTelemetryConfig)(r),(0,i.captureClientEvent)("client_error",{error_message:e.message,error_name:e.name,error_digest:e.digest,boundary:"global"})}).catch(()=>{})},[e]),(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,r.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,r.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,r.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:e.message||"An unexpected error occurred."}),(0,r.jsx)("button",{onClick:o,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])}]);
|
|
@@ -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,
|
|
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,13172,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)("60415f7645fb1a70067457ca7cf96ce759bc4e3e6b",a.callServer,void 0,a.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,r],13172)},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 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},18967,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return P},MissingStaticPage:function(){return S},NormalizeError:function(){return h},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return f},getLocationOrigin:function(){return u},getURL:function(){return l},isAbsoluteUrl:function(){return c},isResSent:function(){return d},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return E}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let r,t=!1;return(...n)=>(t||(t=!0,r=e(...n)),r)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,c=e=>s.test(e);function u(){let{protocol:e,hostname:r,port:t}=window.location;return`${e}//${r}${t?":"+t:""}`}function l(){let{href:e}=window.location,r=u();return e.substring(r.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let r=e.split("?");return r[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(r[1]?`?${r.slice(1).join("?")}`:"")}async function g(e,r){let t=r.res||r.ctx&&r.ctx.res;if(!e.getInitialProps)return r.ctx&&r.Component?{pageProps:await g(r.Component,r.ctx)}:{};let n=await e.getInitialProps(r);if(t&&d(t))return n;if(!n)throw Object.defineProperty(Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class h extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,r){super(),this.message=`Failed to load static file for page: ${e} ${r}`}}class P extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},98183,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={assign:function(){return c},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});function i(e){let r={};for(let[t,n]of e.entries()){let e=r[t];void 0===e?r[t]=n:Array.isArray(e)?e.push(n):r[t]=[e,n]}return r}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let r=new URLSearchParams;for(let[t,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)r.append(t,a(e));else r.set(t,a(n));return r}function c(e,...r){for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}},95187,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=e.r(32120),a=e.r(92245),s=e.r(35326)},9969,e=>{"use strict";let r=null;e.s(["captureClientEvent",0,function(e,t){if(!r||!r.enabled)return;let n=JSON.stringify({api_key:r.apiKey,event:e,distinct_id:r.distinctId,properties:{...t,$lib:"claudeye-web",claudeye_version:r.version,$current_url:window.location.href,$pathname:window.location.pathname}});fetch(r.host.replace(/\/+$/,"")+"/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:n,signal:AbortSignal.timeout(5e3)}).catch(()=>{})},"setClientTelemetryConfig",0,function(e){r=e}])},
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},18967,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return P},MissingStaticPage:function(){return S},NormalizeError:function(){return h},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return f},getLocationOrigin:function(){return u},getURL:function(){return l},isAbsoluteUrl:function(){return c},isResSent:function(){return d},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return E}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let r,t=!1;return(...n)=>(t||(t=!0,r=e(...n)),r)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,c=e=>s.test(e);function u(){let{protocol:e,hostname:r,port:t}=window.location;return`${e}//${r}${t?":"+t:""}`}function l(){let{href:e}=window.location,r=u();return e.substring(r.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let r=e.split("?");return r[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(r[1]?`?${r.slice(1).join("?")}`:"")}async function g(e,r){let t=r.res||r.ctx&&r.ctx.res;if(!e.getInitialProps)return r.ctx&&r.Component?{pageProps:await g(r.Component,r.ctx)}:{};let n=await e.getInitialProps(r);if(t&&d(t))return n;if(!n)throw Object.defineProperty(Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class h extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,r){super(),this.message=`Failed to load static file for page: ${e} ${r}`}}class P extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},98183,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={assign:function(){return c},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});function i(e){let r={};for(let[t,n]of e.entries()){let e=r[t];void 0===e?r[t]=n:Array.isArray(e)?e.push(n):r[t]=[e,n]}return r}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let r=new URLSearchParams;for(let[t,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)r.append(t,a(e));else r.set(t,a(n));return r}function c(e,...r){for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}},95187,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=e.r(32120),a=e.r(92245),s=e.r(35326)},9969,e=>{"use strict";let r=null;e.s(["captureClientEvent",0,function(e,t){if(!r||!r.enabled)return;let n=JSON.stringify({api_key:r.apiKey,event:e,distinct_id:r.distinctId,properties:{...t,$lib:"claudeye-web",claudeye_version:r.version,$current_url:window.location.href,$pathname:window.location.pathname}});fetch(r.host.replace(/\/+$/,"")+"/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:n,signal:AbortSignal.timeout(5e3)}).catch(()=>{})},"setClientTelemetryConfig",0,function(e){r=e}])},82191,e=>{"use strict";var r=e.i(95187);let t=(0,r.createServerReference)("002e75faef8fec11b3638d60b23cc34c6fe620bc96",r.callServer,void 0,r.findSourceMapURL,"getTelemetryConfig");e.s(["getTelemetryConfig",0,t])},53348,e=>{"use strict";var r=e.i(43476),t=e.i(71645),n=e.i(82191),o=e.i(9969);e.s(["default",0,function({error:e,reset:i}){return(0,t.useEffect)(()=>{(0,n.getTelemetryConfig)().then(r=>{(0,o.setClientTelemetryConfig)(r),(0,o.captureClientEvent)("client_error",{error_message:e.message,error_name:e.name,error_digest:e.digest,boundary:"global"})}).catch(()=>{})},[e]),(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,r.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,r.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,r.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:e.message||"An unexpected error occurred."}),(0,r.jsx)("button",{onClick:i,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])}]);
|
|
@@ -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)("
|
|
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)("40a0f3fd622896a1929a55ac2b3cdf31f2ec9fdca6",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,f]=(0,o.useState)(!1);async function x(e){e.preventDefault(),u(null),f(!0);let r=new FormData(e.currentTarget);r.set("redirectTo",i);let o=await d(r);o?.error?(u(o.error),f(!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:x,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,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
|
+
(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)("608371c5dbb9448b7782decb5a0b3ffd6ab178486c",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)("4086aec177499c8f29f077c48fc84db22848eb4d5a",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,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 n=(0,t.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,n],43531)},24380,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(74886),o=e.i(43531),l=e.i(47163);function i(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t);try{return t.select(),document.execCommand("copy")}finally{document.body.removeChild(t)}}e.s(["CopyButton",0,function({text:e,className:a}){let[u,s]=(0,r.useState)(!1),d=(0,r.useCallback)(async()=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else if(!i(e))throw Error("Both clipboard methods failed");s(!0),setTimeout(()=>s(!1),2e3)}catch(t){console.error("Failed to copy to clipboard:",t);try{i(e)&&(s(!0),setTimeout(()=>s(!1),2e3))}catch{}}},[e]);return(0,t.jsx)("button",{onClick:d,title:"Copy to clipboard",className:(0,l.cn)("inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors",a),children:u?(0,t.jsx)(o.Check,{className:"w-3.5 h-3.5 text-green-500"}):(0,t.jsx)(n.Copy,{className:"w-3.5 h-3.5"})})}])},67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(32061);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return u}});let n=e.r(43476),o=e.r(74080),l=e.r(63599),i=e.r(9885),a=e.r(43369);function u({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let s=(0,a.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${s}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(43476),o=e.r(71645),l=e.r(67585),i=e.r(52157);function a(e){return{default:e&&"default"in e?e.default:e}}let u={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},s=function(e){let t={...u,...e},r=(0,o.lazy)(()=>t.loader().then(a)),s=t.loading;function d(e){let a=s?(0,n.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,u=!t.ssr||!!t.loading,d=u?o.Suspense:o.Fragment,c=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...u?{fallback:a}:{},children:c})}return d.displayName="LoadableComponent",d}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(55682)._(e.r(69093));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},69186,e=>{"use strict";var t=e.i(43476);let r=(0,e.i(70703).default)(()=>e.A(79348),{loadableGenerated:{modules:[5780]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"bg-card border border-border rounded-lg p-4 shadow-sm",children:(0,t.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,t.jsx)("div",{className:"animate-pulse text-muted-foreground",children:"Loading log viewer..."})})})});e.s(["default",0,function({entries:e,projectName:n,sessionId:o}){return(0,t.jsx)(r,{entries:e,projectName:n,sessionId:o})}])},79348,e=>{e.v(t=>Promise.all(["static/chunks/
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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 n=(0,t.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,n],43531)},24380,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(74886),o=e.i(43531),l=e.i(47163);function i(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t);try{return t.select(),document.execCommand("copy")}finally{document.body.removeChild(t)}}e.s(["CopyButton",0,function({text:e,className:a}){let[u,s]=(0,r.useState)(!1),d=(0,r.useCallback)(async()=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else if(!i(e))throw Error("Both clipboard methods failed");s(!0),setTimeout(()=>s(!1),2e3)}catch(t){console.error("Failed to copy to clipboard:",t);try{i(e)&&(s(!0),setTimeout(()=>s(!1),2e3))}catch{}}},[e]);return(0,t.jsx)("button",{onClick:d,title:"Copy to clipboard",className:(0,l.cn)("inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors",a),children:u?(0,t.jsx)(o.Check,{className:"w-3.5 h-3.5 text-green-500"}):(0,t.jsx)(n.Copy,{className:"w-3.5 h-3.5"})})}])},67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(32061);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return u}});let n=e.r(43476),o=e.r(74080),l=e.r(63599),i=e.r(9885),a=e.r(43369);function u({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let s=(0,a.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${s}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(43476),o=e.r(71645),l=e.r(67585),i=e.r(52157);function a(e){return{default:e&&"default"in e?e.default:e}}let u={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},s=function(e){let t={...u,...e},r=(0,o.lazy)(()=>t.loader().then(a)),s=t.loading;function d(e){let a=s?(0,n.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,u=!t.ssr||!!t.loading,d=u?o.Suspense:o.Fragment,c=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...u?{fallback:a}:{},children:c})}return d.displayName="LoadableComponent",d}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(55682)._(e.r(69093));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},69186,e=>{"use strict";var t=e.i(43476);let r=(0,e.i(70703).default)(()=>e.A(79348),{loadableGenerated:{modules:[5780]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"bg-card border border-border rounded-lg p-4 shadow-sm",children:(0,t.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,t.jsx)("div",{className:"animate-pulse text-muted-foreground",children:"Loading log viewer..."})})})});e.s(["default",0,function({entries:e,projectName:n,sessionId:o}){return(0,t.jsx)(r,{entries:e,projectName:n,sessionId:o})}])},79348,e=>{e.v(t=>Promise.all(["static/chunks/0su8rjooh3ypl.js","static/chunks/0c7lqtrcy3f9..js"].map(t=>e.l(t))).then(()=>t(5780)))}]);
|
|
@@ -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,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:`
|
|
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,13172,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)("60415f7645fb1a70067457ca7cf96ce759bc4e3e6b",r.callServer,void 0,r.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,s],13172)},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)("402cef3876f2170f8f50b6df0d279774141e2700b1",g.callServer,void 0,g.findSourceMapURL,"getHookActivityAction");var v=e.i(13172);let j=(0,g.createServerReference)("0028fda270ca3d0108f87465647ffac157574432a6",g.callServer,void 0,g.findSourceMapURL,"getHooksConfigAction"),y=(0,g.createServerReference)("60abe89e6be833e34447862fb01bc68a7a60da91fc",g.callServer,void 0,g.findSourceMapURL,"togglePolicyAction"),N=(0,g.createServerReference)("40f63cd767462f387fd39c4e8293db85c121eebdcf",g.callServer,void 0,g.findSourceMapURL,"installHooksWebAction"),k=(0,g.createServerReference)("40933654b4319674f826de0d6b39f25edf49f39313",g.callServer,void 0,g.findSourceMapURL,"removeHooksWebAction"),w=(0,g.createServerReference)("602795442f367f4a365e2ac5969e6e6371684cbe4a",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; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/0tyw4u3~2isbh.js","static/chunks/150i0n26fnvso.js","static/chunks/07uz2g0_38qia.js","static/chunks/031pa5~qfzt~_.js","static/chunks/01q52wg_amm60.js"],runtimeModuleIds:[94553]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;let t="/_next/",r=function(){if(null!=self.TURBOPACK_ASSET_SUFFIX)return self.TURBOPACK_ASSET_SUFFIX;let e=document?.currentScript?.getAttribute?.("src")??"",t=e.indexOf("?");return t>=0?e.slice(t):""}(),n=["NEXT_DEPLOYMENT_ID","NEXT_CLIENT_ASSET_SUFFIX"];var o,i=((o=i||{})[o.Runtime=0]="Runtime",o[o.Parent=1]="Parent",o[o.Update=2]="Update",o);let l=new WeakMap;function s(e,t){this.m=e,this.e=t}let u=s.prototype,a=Object.prototype.hasOwnProperty,c="u">typeof Symbol&&Symbol.toStringTag;function f(e,t,r){a.call(e,t)||Object.defineProperty(e,t,r)}function p(e,t){let r=e[t];return r||(r=h(t),e[t]=r),r}function h(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function d(e,t){f(e,"__esModule",{value:!0}),c&&f(e,c,{value:"Module"});let r=0;for(;r<t.length;){let n=t[r++],o=t[r++];if("number"==typeof o)if(0===o)f(e,n,{value:t[r++],enumerable:!0,writable:!1});else throw Error(`unexpected tag: ${o}`);else"function"==typeof t[r]?f(e,n,{get:o,set:t[r++],enumerable:!0}):f(e,n,{get:o,enumerable:!0})}Object.seal(e)}function m(e,t){(null!=t?p(this.c,t):this.m).exports=e}u.s=function(e,t){let r,n;null!=t?n=(r=p(this.c,t)).exports:(r=this.m,n=this.e),r.namespaceObject=n,d(n,e)},u.j=function(e,t){var r,n;let o,i,s;null!=t?i=(o=p(this.c,t)).exports:(o=this.m,i=this.e);let u=(r=o,n=i,(s=l.get(r))||(l.set(r,s=[]),r.exports=r.namespaceObject=new Proxy(n,{get(e,t){if(a.call(e,t)||"default"===t||"__esModule"===t)return Reflect.get(e,t);for(let e of s){let r=Reflect.get(e,t);if(void 0!==r)return r}},ownKeys(e){let t=Reflect.ownKeys(e);for(let e of s)for(let r of Reflect.ownKeys(e))"default"===r||t.includes(r)||t.push(r);return t}})),s);"object"==typeof e&&null!==e&&u.push(e)},u.v=m,u.n=function(e,t){let r;(r=null!=t?p(this.c,t):this.m).exports=r.namespaceObject=e};let b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,y=[null,b({}),b([]),b(b)];function g(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!y.includes(t);t=b(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),d(t,n),t}function w(e){let t=B(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=g(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function O(e){let t=e.indexOf("#");-1!==t&&(e=e.substring(0,t));let r=e.indexOf("?");return -1!==r&&(e=e.substring(0,r)),e}function j(){let e,t;return{promise:new Promise((r,n)=>{t=n,e=r}),resolve:e,reject:t}}u.i=w,u.A=function(e){return this.r(e)(w.bind(this))},u.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},u.r=function(e){return B(e,this.m).exports},u.f=function(e){function t(t){if(t=O(t),a.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(t=O(t),a.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let k=Symbol("turbopack queues"),U=Symbol("turbopack exports"),v=Symbol("turbopack error");function C(e){e&&1!==e.status&&(e.status=1,e.forEach(e=>e.queueCount--),e.forEach(e=>e.queueCount--?e.queueCount++:e()))}u.a=function(e,t){let r=this.m,n=t?Object.assign([],{status:-1}):void 0,o=new Set,{resolve:i,reject:l,promise:s}=j(),u=Object.assign(s,{[U]:r.exports,[k]:e=>{n&&e(n),o.forEach(e),u.catch(()=>{})}}),a={get:()=>u,set(e){e!==u&&(u[U]=e)}};Object.defineProperty(r,"exports",a),Object.defineProperty(r,"namespaceObject",a),e(function(e){let t=e.map(e=>{if(null!==e&&"object"==typeof e){if(k in e)return e;if(null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then){let t=Object.assign([],{status:0}),r={[U]:{},[k]:e=>e(t)};return e.then(e=>{r[U]=e,C(t)},e=>{r[v]=e,C(t)}),r}}return{[U]:e,[k]:()=>{}}}),r=()=>t.map(e=>{if(e[v])throw e[v];return e[U]}),{promise:i,resolve:l}=j(),s=Object.assign(()=>l(r),{queueCount:0});function u(e){e!==n&&!o.has(e)&&(o.add(e),e&&0===e.status&&(s.queueCount++,e.push(s)))}return t.map(e=>e[k](u)),s.queueCount?i:r()},function(e){e?l(u[v]=e):i(u[U]),C(n)}),n&&-1===n.status&&(n.status=0)};let P=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function R(e,t){throw Error(`Invariant: ${t(e)}`)}P.prototype=URL.prototype,u.U=P,u.z=function(e){throw Error("dynamic usage of require is not supported")},u.g=globalThis;let S=s.prototype,_=new Map;u.M=_;let $=new Map,E=new Map;async function T(e,t,r){let n;if("string"==typeof r)return M(e,t,q(r));let o=r.included||[],i=o.map(e=>!!_.has(e)||$.get(e));if(i.length>0&&i.every(e=>e))return void await Promise.all(i);let l=r.moduleChunks||[],s=l.map(e=>E.get(e)).filter(e=>e);if(s.length>0){if(s.length===l.length)return void await Promise.all(s);let r=new Set;for(let e of l)E.has(e)||r.add(e);for(let n of r){let r=M(e,t,q(n));E.set(n,r),s.push(r)}n=Promise.all(s)}else{for(let o of(n=M(e,t,q(r.path)),l))E.has(o)||E.set(o,n)}for(let e of o)$.has(e)||$.set(e,n);await n}S.l=function(e){return T(i.Parent,this.m.id,e)};let A=Promise.resolve(void 0),x=new WeakMap;function M(t,r,n){let o=e.loadChunkCached(t,n),l=x.get(o);if(void 0===l){let e=x.set.bind(x,o,A);l=o.then(e).catch(e=>{let o;switch(t){case i.Runtime:o=`as a runtime dependency of chunk ${r}`;break;case i.Parent:o=`from module ${r}`;break;case i.Update:o="from an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}let l=Error(`Failed to load chunk ${n} ${o}${e?`: ${e}`:""}`,e?{cause:e}:void 0);throw l.name="ChunkLoadError",l}),x.set(o,l)}return l}function q(e){return`${t}${e.split("/").map(e=>encodeURIComponent(e)).join("/")}${r}`}S.L=function(e){return M(i.Parent,this.m.id,e)},S.R=function(e){let t=this.r(e);return t?.default??t},S.P=function(e){return`/ROOT/${e??""}`},S.q=function(e,t){m.call(this,`${e}${r}`,t)},S.b=function(e,t,o,i){let l="SharedWorker"===e.name,s=[o.map(e=>q(e)).reverse(),r];for(let e of n)s.push(globalThis[e]);let u=new URL(q(t),location.origin),a=JSON.stringify(s);return l?u.searchParams.set("params",a):u.hash="#params="+encodeURIComponent(a),new e(u,i?{...i,type:void 0}:void 0)};let N=/\.js(?:\?[^#]*)?(?:#.*)?$/,K=/\.css(?:\?[^#]*)?(?:#.*)?$/;function L(e){return K.test(e)}u.w=function(t,r,n){return e.loadWebAssembly(i.Parent,this.m.id,t,r,n)},u.u=function(t,r){return e.loadWebAssemblyModule(i.Parent,this.m.id,t,r)};let I={};u.c=I;let B=(e,t)=>{let r=I[e];if(r){if(r.error)throw r.error;return r}return W(e,i.Parent,t.id)};function W(e,t,r){let n=_.get(e);if("function"!=typeof n)throw Error(function(e,t,r){let n;switch(t){case 0:n=`as a runtime entry of chunk ${r}`;break;case 1:n=`because it was required from module ${r}`;break;case 2:n="because of an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}return`Module ${e} was instantiated ${n}, but the module factory is not available.`}(e,t,r));let o=h(e),i=o.exports;I[e]=o;let l=new s(o,i);try{n(l,o,i)}catch(e){throw o.error=e,e}return o.namespaceObject&&o.exports!==o.namespaceObject&&g(o.exports,o.namespaceObject),o}function F(t){let r,n=function(e){if("string"==typeof e)return e;if(e)return{src:e.getAttribute("src")};if("u">typeof TURBOPACK_NEXT_CHUNK_URLS)return{src:TURBOPACK_NEXT_CHUNK_URLS.pop()};throw Error("chunk path empty but not in a worker")}(t[0]);return 2===t.length?r=t[1]:(r=void 0,!function(e,t){let r=1;for(;r<e.length;){let n,o=r+1;for(;o<e.length&&"function"!=typeof e[o];)o++;if(o===e.length)throw Error("malformed chunk format, expected a factory function");let i=e[o];for(let i=r;i<o;i++){let r=e[i],o=t.get(r);if(o){n=o;break}}let l=n??i,s=!1;for(let n=r;n<o;n++){let r=e[n];t.has(r)||(s||(l===i&&Object.defineProperty(i,"name",{value:"module evaluation"}),s=!0),t.set(r,l))}r=o+1}}(t,_)),e.registerChunk(n,r)}let X=new Map;function D(e){let t=X.get(e);if(!t){let r,n;t={resolved:!1,loadingStarted:!1,promise:new Promise((e,t)=>{r=e,n=t}),resolve:()=>{t.resolved=!0,r()},reject:n},X.set(e,t)}return t}e={async registerChunk(e,r){let n=function(e){if("string"==typeof e)return e;let r=decodeURIComponent(e.src.replace(/[?#].*$/,""));return r.startsWith(t)?r.slice(t.length):r}(e);if(D("string"==typeof e?q(e):e.src).resolve(),null!=r){for(let e of r.otherChunks)D(q("string"==typeof e?e:e.path));if(await Promise.all(r.otherChunks.map(e=>T(i.Runtime,n,e))),r.runtimeModuleIds.length>0)for(let e of r.runtimeModuleIds)!function(e,t){let r=I[t];if(r){if(r.error)throw r.error;return}W(t,i.Runtime,e)}(n,e)}},loadChunkCached:(e,t)=>(function(e,t){let r=D(t);if(r.loadingStarted)return r.promise;if(e===i.Runtime)return r.loadingStarted=!0,L(t)&&r.resolve(),r.promise;if("function"==typeof importScripts)if(L(t));else if(N.test(t))self.TURBOPACK_NEXT_CHUNK_URLS.push(t),importScripts(t);else throw Error(`can't infer type of chunk from URL ${t} in worker`);else{let e=decodeURI(t);if(L(t))if(document.querySelectorAll(`link[rel=stylesheet][href="${t}"],link[rel=stylesheet][href^="${t}?"],link[rel=stylesheet][href="${e}"],link[rel=stylesheet][href^="${e}?"]`).length>0)r.resolve();else{let e=document.createElement("link");e.rel="stylesheet",e.href=t,e.onerror=()=>{r.reject()},e.onload=()=>{r.resolve()},document.head.appendChild(e)}else if(N.test(t)){let n=document.querySelectorAll(`script[src="${t}"],script[src^="${t}?"],script[src="${e}"],script[src^="${e}?"]`);if(n.length>0)for(let e of Array.from(n))e.addEventListener("error",()=>{r.reject()});else{let e=document.createElement("script");e.src=t,e.onerror=()=>{r.reject()},document.head.appendChild(e)}}else throw Error(`can't infer type of chunk from URL ${t}`)}return r.loadingStarted=!0,r.promise})(e,t),async loadWebAssembly(e,t,r,n,o){let i=fetch(q(r)),{instance:l}=await WebAssembly.instantiateStreaming(i,o);return l.exports},async loadWebAssemblyModule(e,t,r,n){let o=fetch(q(r));return await WebAssembly.compileStreaming(o)}};let H=globalThis.TURBOPACK;globalThis.TURBOPACK={push:F},H.forEach(F)})();
|