fleetlens 1.0.13 → 1.0.14
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/app/apps/web/.next/BUILD_ID +1 -1
- package/app/apps/web/.next/build-manifest.json +3 -3
- package/app/apps/web/.next/prerender-manifest.json +3 -3
- package/app/apps/web/.next/server/app/_global-error.html +1 -1
- package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/agent/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/insights/[key]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/insights/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/print/[key]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/team/onboarding/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/team/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__02.51sr._.js +1 -1
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0zyh554._.js +1 -1
- package/app/apps/web/.next/server/chunks/packages_parser_dist_06d9se1._.js +1 -1
- package/app/apps/web/.next/server/chunks/packages_parser_dist_10ihc3~._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0s~wd1k._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/_0k8yioi._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_0epqfet._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0x014hn._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0n7_p1d._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0nb5_-s._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0mx_509._.js +1 -1
- package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
- package/app/apps/web/.next/server/middleware-manifest.json +5 -5
- package/app/apps/web/.next/server/pages/500.html +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/app/apps/web/.next/static/chunks/00_9zw_tjem-o.js +14 -0
- package/app/apps/web/.next/static/chunks/{0r~~~j3kmv7s_.js → 08os0c_3cdpqn.js} +1 -1
- package/app/apps/web/.next/static/chunks/0f9bdjq4n1ykp.js +1 -0
- package/app/apps/web/app/usage/page.tsx +264 -1
- package/app/apps/web/lib/changelog-data.generated.ts +1 -1
- package/app/apps/web/lib/usage-data.ts +1 -1
- package/app/apps/web/lib/usage-display.test.ts +15 -0
- package/app/apps/web/lib/usage-display.ts +22 -3
- package/app/apps/web/package.json +1 -1
- package/app/apps/web/tsconfig.tsbuildinfo +1 -1
- package/dist/daemon-worker.js +358 -92
- package/dist/index.js +564 -155
- package/menubar/Fleetlens.app/Contents/Info.plist +2 -2
- package/menubar/Fleetlens.app/Contents/MacOS/FleetlensMenubar +0 -0
- package/menubar/Fleetlens.app/Contents/Resources/command-code.svg +4 -0
- package/menubar/Fleetlens.app/Contents/_CodeSignature/CodeResources +11 -0
- package/package.json +1 -1
- package/app/apps/web/.next/static/chunks/0lcq6isl3n79m.js +0 -1
- package/app/apps/web/.next/static/chunks/0livk1wjx5m4o.js +0 -14
- /package/app/apps/web/.next/static/{h9pB-Efqh5oayfi0_lGfY → FOCI6RnIt_wZ2j2ZEqW5_}/_buildManifest.js +0 -0
- /package/app/apps/web/.next/static/{h9pB-Efqh5oayfi0_lGfY → FOCI6RnIt_wZ2j2ZEqW5_}/_clientMiddlewareManifest.js +0 -0
- /package/app/apps/web/.next/static/{h9pB-Efqh5oayfi0_lGfY → FOCI6RnIt_wZ2j2ZEqW5_}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[63681,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={RequestCookies:function(){return f.RequestCookies},ResponseCookies:function(){return f.ResponseCookies},stringifyCookie:function(){return f.stringifyCookie}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(36226)},51409,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReflectAdapter",{enumerable:!0,get:function(){return d}});class d{static get(a,b,c){let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}static set(a,b,c,d){return Reflect.set(a,b,c,d)}static has(a,b){return Reflect.has(a,b)}static deleteProperty(a,b){return Reflect.deleteProperty(a,b)}}},4712,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ActionDidNotRevalidate:function(){return f},ActionDidRevalidateDynamicOnly:function(){return h},ActionDidRevalidateStaticAndDynamic:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=0,g=1,h=2},14896,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(63681),g=a.r(51409),h=a.r(56704),i=a.r(4712);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},8018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(a.r(717));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},86309,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={isRequestAPICallableInsideAfter:function(){return j},throwForSearchParamsAccessInUseCache:function(){return i},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(60312),g=a.r(24725);function h(a,b){throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${a} with \`dynamic = "error"\` couldn't be rendered statically because it used ${b}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function i(a,b){let c=Object.defineProperty(Error(`Route ${a.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(c,b),a.invalidDynamicUsageError??=c,c}function j(){let a=g.afterTaskAsyncStorage.getStore();return(null==a?void 0:a.rootTaskSpawnPhase)==="action"}},81740,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"cookies",{enumerable:!0,get:function(){return n}});let d=a.r(14896),e=a.r(63681),f=a.r(56704),g=a.r(32319),h=a.r(60384),i=a.r(60312),j=a.r(13091),k=a.r(8018),l=a.r(86309),m=a.r(50640);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}a.r(31382);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},29927,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HeadersAdapter:function(){return h},ReadonlyHeadersError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(51409);class g extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new g}}class h extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return f.ReflectAdapter.get(b,c,d);let e=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==g)return f.ReflectAdapter.get(b,g,d)},set(b,c,d,e){if("symbol"==typeof c)return f.ReflectAdapter.set(b,c,d,e);let g=c.toLowerCase(),h=Object.keys(a).find(a=>a.toLowerCase()===g);return f.ReflectAdapter.set(b,h??c,d,e)},has(b,c){if("symbol"==typeof c)return f.ReflectAdapter.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&f.ReflectAdapter.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return f.ReflectAdapter.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||f.ReflectAdapter.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return g.callable;default:return f.ReflectAdapter.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new h(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}},35754,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"headers",{enumerable:!0,get:function(){return m}});let d=a.r(29927),e=a.r(56704),f=a.r(32319),g=a.r(60384),h=a.r(60312),i=a.r(13091),j=a.r(8018),k=a.r(86309),l=a.r(50640);function m(){let a="headers",b=e.workAsyncStorage.getStore(),c=f.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,k.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(b.forceStatic)return o(d.HeadersAdapter.seal(new Headers({})));if(c)switch(c.type){case"cache":{let a=Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(a,m),b.invalidDynamicUsageError??=a,a}case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(c)switch(c.type){case"prerender":var j=b,p=c;let e=n.get(p);if(e)return e;let q=(0,i.makeHangingPromise)(p.renderSignal,j.route,"`headers()`");return n.set(p,q),q;case"prerender-client":case"validation-client":let r="`headers`";throw Object.defineProperty(new l.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,g.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,g.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,i.delayUntilRuntimeStage)(c,o(c.headers));case"private-cache":return o(c.headers);case"request":if((0,g.trackDynamicDataInDynamicRender)(c),c.asyncApiPromises)return(0,f.isInEarlyRenderStage)(c)?c.asyncApiPromises.earlyHeaders:c.asyncApiPromises.headers;return o(c.headers)}}(0,f.throwForMissingRequestStore)(a)}a.r(31382);let n=new WeakMap;function o(a){let b=n.get(a);if(b)return b;let c=Promise.resolve(a);return n.set(a,c),c}(0,j.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},51125,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"draftMode",{enumerable:!0,get:function(){return l}});let d=a.r(32319),e=a.r(56704),f=a.r(60384),g=a.r(8018),h=a.r(60312),i=a.r(96556),j=a.r(50640),k=a.r(13091);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}a.r(51409);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},5246,(a,b,c)=>{b.exports.cookies=a.r(81740).cookies,b.exports.headers=a.r(35754).headers,b.exports.draftMode=a.r(51125).draftMode},45017,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx <module evaluation>","Sidebar")},10398,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx","Sidebar")},23604,a=>{"use strict";a.i(45017);var b=a.i(10398);a.n(b)},59969,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx <module evaluation>","LiveRefresher")},11272,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx","LiveRefresher")},30642,a=>{"use strict";a.i(59969);var b=a.i(11272);a.n(b)},99153,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx <module evaluation>","LiveSessionsWidget")},62615,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx","LiveSessionsWidget")},9647,a=>{"use strict";a.i(99153);var b=a.i(62615);a.n(b)},14022,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx <module evaluation>","JobQueueWidget")},5900,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx","JobQueueWidget")},84829,a=>{"use strict";a.i(14022);var b=a.i(5900);a.n(b)},73842,a=>{"use strict";a.s(["MenubarInstallBanner",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call MenubarInstallBanner() from the server but MenubarInstallBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/menubar-install-banner.tsx <module evaluation>","MenubarInstallBanner")},46147,a=>{"use strict";a.s(["MenubarInstallBanner",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call MenubarInstallBanner() from the server but MenubarInstallBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/menubar-install-banner.tsx","MenubarInstallBanner")},73994,a=>{"use strict";a.i(73842);var b=a.i(46147);a.n(b)},28992,a=>{"use strict";var b=a.i(7997),c=a.i(5246),d=a.i(23604),e=a.i(30642),f=a.i(9647),g=a.i(84829),h=a.i(73994);a.i(9117);var i=a.i(48024),j=a.i(67116),k=a.i(70709),l=a.i(60511),m=a.i(76597),n=a.i(40095);async function o({children:a}){let p=await (0,c.headers)();if((p.get("x-fleetlens-pathname")??"").startsWith("/print/")){let d=p.get("x-fleetlens-theme"),e=await (0,c.cookies)(),f=e.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===d||"dark"===d?d:"light"===f||"dark"===f?f:"dark",suppressHydrationWarning:!0,children:(0,b.jsx)("body",{children:a})})}let[q,r]=await Promise.all([(0,j.listSessions)(),(0,m.buildEntriesIndex)()]),s=q.slice(0,20),t=q.length,u=(0,i.groupByProject)(q).map(a=>({projectDir:a.projectDir,projectName:a.projectName,sessionCount:a.sessions.length,lastActiveMs:a.lastActiveMs,worktreeCount:a.worktreeCount})),v=(0,k.latestUsageSnapshotsByAgent)(),w=(0,l.readTeamConnection)(),x=s.map(a=>({id:a.id,projectName:a.projectName,firstUserPreview:a.firstUserPreview,lastUserPreview:a.lastUserPreview,lastAgentPreview:a.lastAgentPreview,firstTimestamp:a.firstTimestamp,lastTimestamp:a.lastTimestamp,lastActivityMs:a.lastActivityMs,teamName:a.teamName,agentName:a.agentName,agent:a.agent})),y={};for(let a of s){let b=r.bySession.get(a.id)??[];if(0===b.length)continue;let c=b[b.length-1];y[a.id]={outcome:c.enrichment.outcome??null,enrichmentStatus:c.enrichment.status,localDay:c.local_day}}let z=await (0,c.cookies)(),A=z.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===A||"dark"===A?A:"dark",suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{children:[(0,b.jsx)(e.LiveRefresher,{}),(0,b.jsxs)("div",{style:{display:"flex",height:"100vh"},children:[(0,b.jsx)(d.Sidebar,{projects:u,totalSessions:t,usageByAgent:v,version:"1.0.13",latestChangelogVersion:n.LATEST_VERSION,teamConnection:w}),(0,b.jsxs)("main",{style:{flex:1,minWidth:0,minHeight:0,padding:0,overflow:"auto"},children:[(0,b.jsx)(h.MenubarInstallBanner,{}),a]})]}),(0,b.jsx)(f.LiveSessionsWidget,{sessions:x,entrySummaries:y}),(0,b.jsx)(g.JobQueueWidget,{})]})})}a.s(["default",0,o,"dynamic",0,"force-dynamic","metadata",0,{title:"Fleetlens",description:"Multi-agent fleet analytics — local-only dashboard for Claude Code, Codex, and other coding-agent sessions."}],28992)},44665,a=>{a.n(a.i(28992))}];
|
|
1
|
+
module.exports=[63681,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={RequestCookies:function(){return f.RequestCookies},ResponseCookies:function(){return f.ResponseCookies},stringifyCookie:function(){return f.stringifyCookie}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(36226)},51409,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReflectAdapter",{enumerable:!0,get:function(){return d}});class d{static get(a,b,c){let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}static set(a,b,c,d){return Reflect.set(a,b,c,d)}static has(a,b){return Reflect.has(a,b)}static deleteProperty(a,b){return Reflect.deleteProperty(a,b)}}},4712,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ActionDidNotRevalidate:function(){return f},ActionDidRevalidateDynamicOnly:function(){return h},ActionDidRevalidateStaticAndDynamic:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=0,g=1,h=2},14896,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(63681),g=a.r(51409),h=a.r(56704),i=a.r(4712);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},8018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(a.r(717));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},86309,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={isRequestAPICallableInsideAfter:function(){return j},throwForSearchParamsAccessInUseCache:function(){return i},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(60312),g=a.r(24725);function h(a,b){throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${a} with \`dynamic = "error"\` couldn't be rendered statically because it used ${b}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function i(a,b){let c=Object.defineProperty(Error(`Route ${a.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(c,b),a.invalidDynamicUsageError??=c,c}function j(){let a=g.afterTaskAsyncStorage.getStore();return(null==a?void 0:a.rootTaskSpawnPhase)==="action"}},81740,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"cookies",{enumerable:!0,get:function(){return n}});let d=a.r(14896),e=a.r(63681),f=a.r(56704),g=a.r(32319),h=a.r(60384),i=a.r(60312),j=a.r(13091),k=a.r(8018),l=a.r(86309),m=a.r(50640);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}a.r(31382);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},29927,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HeadersAdapter:function(){return h},ReadonlyHeadersError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(51409);class g extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new g}}class h extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return f.ReflectAdapter.get(b,c,d);let e=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==g)return f.ReflectAdapter.get(b,g,d)},set(b,c,d,e){if("symbol"==typeof c)return f.ReflectAdapter.set(b,c,d,e);let g=c.toLowerCase(),h=Object.keys(a).find(a=>a.toLowerCase()===g);return f.ReflectAdapter.set(b,h??c,d,e)},has(b,c){if("symbol"==typeof c)return f.ReflectAdapter.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&f.ReflectAdapter.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return f.ReflectAdapter.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||f.ReflectAdapter.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return g.callable;default:return f.ReflectAdapter.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new h(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}},35754,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"headers",{enumerable:!0,get:function(){return m}});let d=a.r(29927),e=a.r(56704),f=a.r(32319),g=a.r(60384),h=a.r(60312),i=a.r(13091),j=a.r(8018),k=a.r(86309),l=a.r(50640);function m(){let a="headers",b=e.workAsyncStorage.getStore(),c=f.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,k.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(b.forceStatic)return o(d.HeadersAdapter.seal(new Headers({})));if(c)switch(c.type){case"cache":{let a=Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(a,m),b.invalidDynamicUsageError??=a,a}case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(c)switch(c.type){case"prerender":var j=b,p=c;let e=n.get(p);if(e)return e;let q=(0,i.makeHangingPromise)(p.renderSignal,j.route,"`headers()`");return n.set(p,q),q;case"prerender-client":case"validation-client":let r="`headers`";throw Object.defineProperty(new l.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,g.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,g.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,i.delayUntilRuntimeStage)(c,o(c.headers));case"private-cache":return o(c.headers);case"request":if((0,g.trackDynamicDataInDynamicRender)(c),c.asyncApiPromises)return(0,f.isInEarlyRenderStage)(c)?c.asyncApiPromises.earlyHeaders:c.asyncApiPromises.headers;return o(c.headers)}}(0,f.throwForMissingRequestStore)(a)}a.r(31382);let n=new WeakMap;function o(a){let b=n.get(a);if(b)return b;let c=Promise.resolve(a);return n.set(a,c),c}(0,j.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},51125,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"draftMode",{enumerable:!0,get:function(){return l}});let d=a.r(32319),e=a.r(56704),f=a.r(60384),g=a.r(8018),h=a.r(60312),i=a.r(96556),j=a.r(50640),k=a.r(13091);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}a.r(51409);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},5246,(a,b,c)=>{b.exports.cookies=a.r(81740).cookies,b.exports.headers=a.r(35754).headers,b.exports.draftMode=a.r(51125).draftMode},45017,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx <module evaluation>","Sidebar")},10398,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx","Sidebar")},23604,a=>{"use strict";a.i(45017);var b=a.i(10398);a.n(b)},59969,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx <module evaluation>","LiveRefresher")},11272,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx","LiveRefresher")},30642,a=>{"use strict";a.i(59969);var b=a.i(11272);a.n(b)},99153,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx <module evaluation>","LiveSessionsWidget")},62615,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx","LiveSessionsWidget")},9647,a=>{"use strict";a.i(99153);var b=a.i(62615);a.n(b)},14022,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx <module evaluation>","JobQueueWidget")},5900,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx","JobQueueWidget")},84829,a=>{"use strict";a.i(14022);var b=a.i(5900);a.n(b)},73842,a=>{"use strict";a.s(["MenubarInstallBanner",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call MenubarInstallBanner() from the server but MenubarInstallBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/menubar-install-banner.tsx <module evaluation>","MenubarInstallBanner")},46147,a=>{"use strict";a.s(["MenubarInstallBanner",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call MenubarInstallBanner() from the server but MenubarInstallBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/menubar-install-banner.tsx","MenubarInstallBanner")},73994,a=>{"use strict";a.i(73842);var b=a.i(46147);a.n(b)},28992,a=>{"use strict";var b=a.i(7997),c=a.i(5246),d=a.i(23604),e=a.i(30642),f=a.i(9647),g=a.i(84829),h=a.i(73994);a.i(9117);var i=a.i(48024),j=a.i(67116),k=a.i(70709),l=a.i(60511),m=a.i(76597),n=a.i(40095);async function o({children:a}){let p=await (0,c.headers)();if((p.get("x-fleetlens-pathname")??"").startsWith("/print/")){let d=p.get("x-fleetlens-theme"),e=await (0,c.cookies)(),f=e.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===d||"dark"===d?d:"light"===f||"dark"===f?f:"dark",suppressHydrationWarning:!0,children:(0,b.jsx)("body",{children:a})})}let[q,r]=await Promise.all([(0,j.listSessions)(),(0,m.buildEntriesIndex)()]),s=q.slice(0,20),t=q.length,u=(0,i.groupByProject)(q).map(a=>({projectDir:a.projectDir,projectName:a.projectName,sessionCount:a.sessions.length,lastActiveMs:a.lastActiveMs,worktreeCount:a.worktreeCount})),v=(0,k.latestUsageSnapshotsByAgent)(),w=(0,l.readTeamConnection)(),x=s.map(a=>({id:a.id,projectName:a.projectName,firstUserPreview:a.firstUserPreview,lastUserPreview:a.lastUserPreview,lastAgentPreview:a.lastAgentPreview,firstTimestamp:a.firstTimestamp,lastTimestamp:a.lastTimestamp,lastActivityMs:a.lastActivityMs,teamName:a.teamName,agentName:a.agentName,agent:a.agent})),y={};for(let a of s){let b=r.bySession.get(a.id)??[];if(0===b.length)continue;let c=b[b.length-1];y[a.id]={outcome:c.enrichment.outcome??null,enrichmentStatus:c.enrichment.status,localDay:c.local_day}}let z=await (0,c.cookies)(),A=z.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===A||"dark"===A?A:"dark",suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{children:[(0,b.jsx)(e.LiveRefresher,{}),(0,b.jsxs)("div",{style:{display:"flex",height:"100vh"},children:[(0,b.jsx)(d.Sidebar,{projects:u,totalSessions:t,usageByAgent:v,version:"1.0.14",latestChangelogVersion:n.LATEST_VERSION,teamConnection:w}),(0,b.jsxs)("main",{style:{flex:1,minWidth:0,minHeight:0,padding:0,overflow:"auto"},children:[(0,b.jsx)(h.MenubarInstallBanner,{}),a]})]}),(0,b.jsx)(f.LiveSessionsWidget,{sessions:x,entrySummaries:y}),(0,b.jsx)(g.JobQueueWidget,{})]})})}a.s(["default",0,o,"dynamic",0,"force-dynamic","metadata",0,{title:"Fleetlens",description:"Multi-agent fleet analytics — local-only dashboard for Claude Code, Codex, and other coding-agent sessions."}],28992)},44665,a=>{a.n(a.i(28992))}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0k8yioi._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[43296,a=>{"use strict";a.s(["UsageChartsDashboard",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call UsageChartsDashboard() from the server but UsageChartsDashboard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/usage-charts-dashboard.tsx <module evaluation>","UsageChartsDashboard")},51071,a=>{"use strict";a.s(["UsageChartsDashboard",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call UsageChartsDashboard() from the server but UsageChartsDashboard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/usage-charts-dashboard.tsx","UsageChartsDashboard")},90268,a=>{"use strict";a.i(43296);var b=a.i(51071);a.n(b)},28664,a=>{"use strict";var b=a.i(7997),c=a.i(74091),d=a.i(95936),e=a.i(70709),f=a.i(717),g=a.i(2157),h=a.i(23895);let i=(0,h.cclensPath)("profile.json"),j="pro-max-20x",k=(0,f.cache)(async()=>{let a=function(){if(!(0,g.existsSync)(i))return j;try{let a=JSON.parse((0,g.readFileSync)(i,"utf8")),b=a?.profile?.planTier;if("pro"===b||"pro-max"===b||"pro-max-20x"===b||"custom"===b)return b}catch{}return j}(),b=await (0,h.loadCalibrationCurve)(a);return b?{curve:b.curve,rate_per_pct:b.rate_per_pct,rate_per_pct_5h:b.rate_per_pct_5h,rate_per_pct_7d:b.rate_per_pct_7d,rate_source_5h:b.rate_source_5h,rate_source_7d:b.rate_source_7d,cycles_used_5h:b.cycles_used_5h,cycles_used_7d:b.cycles_used_7d,tier:b.tier}:null});var l=a.i(90268);let m={"5h":18e6,"7d":6048e5};function n({windowLabel:a,cycles:c}){return 0===c.length?null:(0,b.jsxs)("section",{style:{border:"1px solid var(--af-border-subtle)",borderRadius:8,padding:"12px 16px",display:"flex",flexDirection:"column",gap:10},children:[(0,b.jsxs)("header",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsxs)("h2",{style:{fontSize:13,margin:0,fontWeight:700},children:["Previous ",a," cycles"]}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:"peak utilization · oldest → newest"}),(0,b.jsx)("span",{style:{marginLeft:"auto",fontSize:11,color:"var(--af-text-tertiary)"},children:function(a){let b=a.filter(a=>!a.current);if(b.length<2)return"";let c=b[b.length-1].peakPct-b[b.length-2].peakPct;return 5>Math.abs(c)?`flat vs prior (${c>=0?"+":""}${c.toFixed(0)}pp)`:c>0?`↑ up ${c.toFixed(0)}pp from prior`:`↓ down ${Math.abs(c).toFixed(0)}pp from prior`}(c)})]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:`repeat(${c.length}, minmax(0, 1fr))`,gap:8,alignItems:"end"},children:c.map((c,d)=>(0,b.jsx)(o,{cycle:c,windowLabel:a},d))})]})}function o({cycle:a,windowLabel:c}){let d=Math.max(0,Math.min(100,a.peakPct)),e=Math.max(0,a.peakPct),f=function(a){switch(a){case"success":return"var(--af-success)";case"warning":return"#b58400";case"danger":return"var(--af-danger)"}}(a.current?function(a,b,c,d=Date.now()){var e;return((e=100*Math.max(0,Math.min(1,(d-(b-c))/c))-a)<-15?{tone:"danger",label:"may exhaust early"}:e>15?{tone:"warning",label:"below pace"}:{tone:"success",label:"on pace"}).tone}(d,new Date(a.endsAt).getTime(),m[c]):d>=70?"success":d>=40?"warning":"danger"),g=new Date(a.endsAt),h=a.current?`ends ${g.toLocaleDateString(void 0,{month:"short",day:"numeric"})}`:g.toLocaleDateString(void 0,{month:"short",day:"numeric"});return(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:4},title:`${a.current?"Current cycle ends":"Cycle ended"} ${g.toLocaleString()}${"predicted"===a.source?" · estimated from JSONL":" · measured from daemon"}`,children:[(0,b.jsxs)("div",{style:{fontSize:11,fontFamily:"var(--font-mono)",color:f,fontWeight:700,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:[e.toFixed(0),"%"]}),(0,b.jsx)("div",{style:{height:80,display:"flex",flexDirection:"column",justifyContent:"flex-end",background:"var(--af-border-subtle)",borderRadius:4,opacity:a.current?.85:1,border:a.current?`1px dashed ${f}`:"none"},children:(0,b.jsx)("div",{style:{height:`${d}%`,background:f,borderRadius:4,opacity:"predicted"===a.source?.55:1,backgroundImage:"predicted"===a.source?"repeating-linear-gradient(45deg, transparent 0 4px, rgba(0,0,0,0.08) 4px 8px)":void 0}})}),(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textAlign:"center",fontFamily:"var(--font-mono)",letterSpacing:"0.02em"},children:[h,"predicted"===a.source&&(0,b.jsxs)(b.Fragment,{children:[" ",(0,b.jsx)("span",{style:{color:"#b58400"},children:"·est"})]})]})]})}a.i(9117);var p=a.i(30375);function q(a){return"premium-requests"===a?"premium requests":"AI credits"}function r(a){return(0,p.getAgentMetadata)(a)?.displayName??a}function s(a){return(0,p.getAgentMetadata)(a)?.accentColor??"var(--af-text-tertiary)"}async function t({searchParams:a}){var d;let f=await a,g=new Set(function(a){let b=new Set;for(let c of a)b.add(c.agent??"claude-code");return b.add("claude-code"),Array.from(b)}((0,e.readUsageSnapshots)())),h=(0,p.isAgentKind)(f.agent)?f.agent:void 0,i=h&&g.has(h)?h:g.has("claude-code")?"claude-code":Array.from(g)[0],j=(0,e.readUsageSnapshotsByAgent)(i),m=(0,e.latestUsageSnapshotByAgent)(i),o="claude-code"===i?(0,e.readCachedPlanTier)():null,q="claude-code"===i?await k():null,z=q?(d=q)?{five_hour:d.curve.filter(a=>Number.isFinite(a.pred_5h)).map(a=>({capturedAt:new Date(a.ts).getTime(),util:Math.max(0,a.pred_5h)})),seven_day:d.curve.filter(a=>Number.isFinite(a.pred_7d)).map(a=>({capturedAt:new Date(a.ts).getTime(),util:Math.max(0,a.pred_7d)})),seven_day_sonnet:[]}:{five_hour:[],seven_day:[],seven_day_sonnet:[]}:null,A=q?function(a,b=6,c=Date.now()){if(!a||a.curve.length<2)return[];let d="real_7d",e=new Map;for(let b of a.curve){let a=b.cycle_end_7d;if(!a)continue;let c=Date.parse(a);if(Number.isNaN(c))continue;let d=36e5*Math.round(c/36e5),f=e.get(d)??[];f.push(b),e.set(d,f)}let f=function(a){let b=[];for(let[c,d]of Array.from(a.entries()).sort((a,b)=>a[0]-b[0])){let a=b[b.length-1];a&&c-a.endMs<=432e5?(a.endMs=c,a.points.push(...d)):b.push({endMs:c,points:[...d]})}return b}(e),g=[];for(let{endMs:a,points:b}of f){let e=a>c,f=e?function(a,b){if(a.length<2)return a;let c=[...a].sort((a,b)=>Date.parse(a.ts)-Date.parse(b.ts)),d=0;for(let a=1;a<c.length;a++){let e=c[a-1][b],f=c[a][b];"number"==typeof e&&"number"==typeof f&&e-f>=30&&(d=a)}return 0===d?c:c.slice(d)}(b,d):b,h=0,i="predicted";for(let a of f){let b=a[d];"number"==typeof b&&b>h&&(h=b,i="real");let c=Math.min(a.pred_7d??0,100);c>h&&(h=c,i="predicted")}g.push({endsAt:new Date(a).toISOString(),peakPct:Math.round(10*h)/10,source:i,current:e})}return g.slice(-b)}(q,12):[],B="grok"===i,C="copilot"===i,D="codex"===i&&m?.five_hour?.utilization==null;return(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:18,maxWidth:1400,padding:"20px 32px"},children:[(0,b.jsxs)("header",{style:{display:"flex",alignItems:"baseline",gap:14,flexWrap:"wrap"},children:[(0,b.jsxs)("h1",{style:{fontSize:20,fontWeight:700,letterSpacing:"-0.02em",margin:0,display:"flex",alignItems:"center",gap:8},children:[(0,b.jsx)(c.Activity,{size:18}),"Usage history"]}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:"historical plan utilization · current usage in sidebar"}),o&&"claude-code"===i&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},title:o.rateLimitTier?`Anthropic rate_limit_tier: ${o.rateLimitTier}`:void 0,children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"plan"}),(0,b.jsx)("span",{style:{color:"var(--af-text)",fontWeight:600},children:e.PLAN_TIER_LABELS[o.planTier].label}),e.PLAN_TIER_LABELS[o.planTier].monthlyPriceUsd>0&&(0,b.jsxs)("span",{style:{color:"var(--af-text-tertiary)"},children:["· $",e.PLAN_TIER_LABELS[o.planTier].monthlyPriceUsd,"/mo"]})]}),"codex"===i&&m?.plan_type&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"plan"}),(0,b.jsxs)("span",{style:{color:"var(--af-text)",fontWeight:600},children:["Codex ",m.plan_type]})]}),C&&m?.plan_type&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"allowance"}),(0,b.jsxs)("span",{style:{color:"var(--af-text)",fontWeight:600},children:["GitHub Copilot · ",m.plan_type]})]}),"zai"===i&&m?.plan_type&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"plan"}),(0,b.jsx)("span",{style:{color:"var(--af-text)",fontWeight:600},children:m.plan_type})]})]}),(0,b.jsx)(w,{agents:Array.from(g),selected:i}),D&&(0,b.jsxs)("div",{className:"af-card",style:{padding:"12px 16px",fontSize:12,color:"var(--af-text-secondary)"},children:[(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"Codex 5-hour limit removed."})," ","This account is reporting a single 7-day usage window, so Fleetlens hides the retired 5-hour meter."]}),m?(0,b.jsxs)(b.Fragment,{children:[B&&m.seven_day?.utilization!=null&&(0,b.jsx)(x,{utilization:m.seven_day.utilization,resetsAt:m.seven_day.resets_at,planType:m.plan_type}),C&&m.monthly&&(0,b.jsx)(u,{window:m.monthly,quota:m.monthly_quota}),A.length>0&&(0,b.jsx)(n,{windowLabel:"7d",cycles:A}),(0,b.jsx)(l.UsageChartsDashboard,{snapshots:j,predicted:z??void 0,windows:B?[{key:"seven_day",label:"7d utilization (weekly pool)",windowMs:6048e5,colorVar:"var(--af-accent)"}]:C?[{key:"monthly",label:"Monthly AI-credit utilization",windowMs:2592e6,colorVar:s("copilot")}]:D?[{key:"seven_day",label:"7d utilization (current limit)",windowMs:6048e5,colorVar:"var(--af-accent)"}]:void 0,hideSonnet:B||C||"codex"===i}),"zai"===i&&m?.web_search_quota&&(0,b.jsx)(v,{quota:m.web_search_quota}),(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},suppressHydrationWarning:!0,children:["Last ",r(i)," poll: ",new Date(m.captured_at).toLocaleString()," ·"," ",j.length," snapshot",1===j.length?"":"s"," on disk",B?" · weekly shared-pool % (no 5h window)":"",C?" · monthly AI-credit allowance (no 5h/7d windows)":"",D?" · weekly-only Codex limit":""]})]}):(0,b.jsx)(y,{agent:i})]})}function u({window:a,quota:c}){let d=a.utilization,e=q(c?.unit),f=function(a,b){let c=q(b?.unit);if(b?.unlimited)return{headline:"Limit not reported",detail:null===b.used?null:`${b.used.toLocaleString("en-US")} ${c} reported by Copilot`,limitNotReported:!0};let d=b?.used!==null&&b?.used!==void 0&&null!==b.limit?`${b.used.toLocaleString("en-US")} of ${b.limit.toLocaleString("en-US")} ${c} used${null!==b.remaining?` \xb7 ${b.remaining.toLocaleString("en-US")} remaining`:""}`:null;return{headline:null===a?"—":`${a.toFixed(1)}%`,detail:d,limitNotReported:!1}}(d,c);return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px"},children:[(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:["Monthly ",e]}),(0,b.jsx)("div",{style:{fontSize:28,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1,fontVariantNumeric:"tabular-nums"},children:f.headline}),f.detail&&(0,b.jsx)("div",{style:{marginTop:6,fontSize:12,color:"var(--af-text-secondary)"},children:f.detail}),null!==d&&(0,b.jsx)("div",{style:{marginTop:10,height:8,borderRadius:999,background:"var(--af-border-subtle)",overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:`${Math.min(100,Math.max(0,d))}%`,height:"100%",borderRadius:999,background:s("copilot")}})}),f.limitNotReported?(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:10,marginBottom:0,lineHeight:1.5},children:["Copilot did not expose a personal credit ceiling for this account. Organization-managed plans can draw from a shared pool, so this does not mean individual use is unlimited."," ",(0,b.jsx)("a",{href:"https://docs.github.com/en/copilot/concepts/billing/usage-based-billing-for-organizations-and-enterprises",target:"_blank",rel:"noreferrer",style:{color:"var(--af-accent)"},children:"How GitHub pools AI credits ↗"})," · ",(0,b.jsx)("a",{href:"https://github.com/settings/billing",target:"_blank",rel:"noreferrer",style:{color:"var(--af-accent)"},children:"Verify in GitHub billing ↗"}),a.resets_at?` \xb7 Reported reset ${new Date(a.resets_at).toLocaleString()}.`:""]}):(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:10,marginBottom:0},children:["Copilot reports a monthly allowance; it does not expose Codex-style 5-hour or 7-day windows.",a.resets_at?` Resets ${new Date(a.resets_at).toLocaleString()}.`:""]})]})}function v({quota:a}){let c=a.used??0;return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px"},children:[(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:"Monthly web search"}),(0,b.jsxs)("div",{style:{fontSize:28,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1,fontVariantNumeric:"tabular-nums"},children:[Math.round(c),"%"]}),(0,b.jsx)("div",{style:{marginTop:10,height:6,width:"100%",background:"var(--af-border-subtle)",borderRadius:999,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.min(100,c)}%`,background:"rgb(59, 130, 246)",borderRadius:999,transition:"width 0.24s ease"}})})]})}function w({agents:a,selected:c}){let e=[...a].sort((a,b)=>"claude-code"===a?-1:"claude-code"===b?1:a.localeCompare(b));return(0,b.jsx)("div",{role:"tablist",style:{display:"inline-flex",gap:4,padding:4,background:"var(--af-border-subtle)",borderRadius:8,alignSelf:"flex-start"},children:e.map(a=>{let e=a===c;return(0,b.jsxs)(d.default,{role:"tab","aria-selected":e,href:`/usage?agent=${a}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:6,fontSize:12,fontWeight:600,letterSpacing:"0.01em",color:e?"var(--af-text)":"var(--af-text-tertiary)",background:e?"var(--af-surface)":"transparent",boxShadow:e?"0 1px 2px rgba(0,0,0,0.06)":"none",textDecoration:"none",transition:"all 0.12s ease"},children:[(0,b.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:999,background:s(a),opacity:e?1:.6}}),r(a)]},a)})})}function x({utilization:a,resetsAt:c,planType:d}){let e=Math.round(Math.min(100,Math.max(0,a)));return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px"},children:[(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:["7-day weekly pool",d?(0,b.jsxs)("span",{style:{marginLeft:8,fontWeight:500,textTransform:"none"},children:["· ",d]}):null]}),(0,b.jsxs)("div",{style:{fontSize:28,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1,fontVariantNumeric:"tabular-nums"},children:[e,"%"]}),(0,b.jsx)("div",{style:{marginTop:10,height:8,borderRadius:999,background:"var(--af-border-subtle)",overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:`${e}%`,height:"100%",borderRadius:999,background:s("grok")}})}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:10,marginBottom:0},children:["Grok unified-billing shared weekly pool (same source as the Grok CLI). There is no 5-hour window — only this 7-day limit.",c?(0,b.jsxs)(b.Fragment,{children:[" ","Resets ",new Date(c).toLocaleString(),"."]}):null]})]})}function y({agent:a}){return"copilot"===a?(0,b.jsxs)("div",{className:"af-card",style:{padding:"48px 32px",textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:15,fontWeight:600,color:"var(--af-text)"},children:"No GitHub Copilot usage samples yet"}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:"8px auto 0",maxWidth:520,lineHeight:1.5},children:["Run ",(0,b.jsx)("code",{style:{fontSize:11},children:"copilot login"}),", then start the Fleetlens daemon. Fleetlens reads the monthly AI-credit quota through Copilot CLI's authenticated local SDK server."]}),(0,b.jsx)("pre",{style:{display:"inline-block",marginTop:14,background:"var(--background)",border:"1px solid var(--af-border-subtle)",padding:"8px 16px",borderRadius:6,fontSize:13,fontFamily:"var(--font-mono)",color:"var(--af-text)"},children:"fleetlens daemon start"})]}):"grok"===a?(0,b.jsxs)("div",{className:"af-card",style:{padding:"48px 32px",textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:15,fontWeight:600,color:"var(--af-text)"},children:"No Grok weekly usage samples yet"}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:8,maxWidth:440,marginLeft:"auto",marginRight:"auto",lineHeight:1.5},children:["The daemon polls Grok's weekly shared-pool % (via the same billing API as the Grok CLI). Run ",(0,b.jsx)("code",{style:{fontSize:11},children:"grok login"})," if needed, then start the daemon."]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,justifyContent:"center",marginTop:16,flexWrap:"wrap"},children:[(0,b.jsx)("pre",{style:{display:"inline-block",background:"var(--background)",border:"1px solid var(--af-border-subtle)",padding:"8px 16px",borderRadius:6,fontSize:13,fontFamily:"var(--font-mono)",color:"var(--af-text)",margin:0},children:"fleetlens daemon start"}),(0,b.jsx)(d.default,{href:"/sessions?agent=grok",className:"af-btn af-btn-primary",style:{display:"inline-flex",alignItems:"center",fontSize:12,padding:"6px 14px"},children:"View Grok sessions"})]})]}):(0,b.jsxs)("div",{className:"af-card",style:{padding:"48px 32px",textAlign:"center"},children:[(0,b.jsxs)("div",{style:{fontSize:15,fontWeight:600,color:"var(--af-text)"},children:["No ",r(a)," usage data yet"]}),(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:8},children:"claude-code"===a?"Start the polling daemon to begin collecting metrics every 5 minutes:":"zai"===a?"Save a Z.ai API key in Settings; the daemon (or a settings save) writes utilization snapshots here.":"The daemon picks up this agent's rate-limit windows from disk on every poll cycle. Run a session and the data will appear here within minutes."}),"claude-code"===a&&(0,b.jsx)("pre",{style:{display:"inline-block",marginTop:14,background:"var(--background)",border:"1px solid var(--af-border-subtle)",padding:"8px 16px",borderRadius:6,fontSize:13,fontFamily:"var(--font-mono)",color:"var(--af-text)"},children:"fleetlens daemon start"})]})}a.s(["default",0,t,"dynamic",0,"force-dynamic"],28664)},51443,a=>{a.n(a.i(28664))}];
|
|
1
|
+
module.exports=[43296,a=>{"use strict";a.s(["UsageChartsDashboard",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call UsageChartsDashboard() from the server but UsageChartsDashboard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/usage-charts-dashboard.tsx <module evaluation>","UsageChartsDashboard")},51071,a=>{"use strict";a.s(["UsageChartsDashboard",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call UsageChartsDashboard() from the server but UsageChartsDashboard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/usage-charts-dashboard.tsx","UsageChartsDashboard")},90268,a=>{"use strict";a.i(43296);var b=a.i(51071);a.n(b)},28664,a=>{"use strict";var b=a.i(7997),c=a.i(74091),d=a.i(95936),e=a.i(70709),f=a.i(717),g=a.i(2157),h=a.i(23895);let i=(0,h.cclensPath)("profile.json"),j="pro-max-20x",k=(0,f.cache)(async()=>{let a=function(){if(!(0,g.existsSync)(i))return j;try{let a=JSON.parse((0,g.readFileSync)(i,"utf8")),b=a?.profile?.planTier;if("pro"===b||"pro-max"===b||"pro-max-20x"===b||"custom"===b)return b}catch{}return j}(),b=await (0,h.loadCalibrationCurve)(a);return b?{curve:b.curve,rate_per_pct:b.rate_per_pct,rate_per_pct_5h:b.rate_per_pct_5h,rate_per_pct_7d:b.rate_per_pct_7d,rate_source_5h:b.rate_source_5h,rate_source_7d:b.rate_source_7d,cycles_used_5h:b.cycles_used_5h,cycles_used_7d:b.cycles_used_7d,tier:b.tier}:null});var l=a.i(90268);let m={"5h":18e6,"7d":6048e5};function n({windowLabel:a,cycles:c}){return 0===c.length?null:(0,b.jsxs)("section",{style:{border:"1px solid var(--af-border-subtle)",borderRadius:8,padding:"12px 16px",display:"flex",flexDirection:"column",gap:10},children:[(0,b.jsxs)("header",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsxs)("h2",{style:{fontSize:13,margin:0,fontWeight:700},children:["Previous ",a," cycles"]}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:"peak utilization · oldest → newest"}),(0,b.jsx)("span",{style:{marginLeft:"auto",fontSize:11,color:"var(--af-text-tertiary)"},children:function(a){let b=a.filter(a=>!a.current);if(b.length<2)return"";let c=b[b.length-1].peakPct-b[b.length-2].peakPct;return 5>Math.abs(c)?`flat vs prior (${c>=0?"+":""}${c.toFixed(0)}pp)`:c>0?`↑ up ${c.toFixed(0)}pp from prior`:`↓ down ${Math.abs(c).toFixed(0)}pp from prior`}(c)})]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:`repeat(${c.length}, minmax(0, 1fr))`,gap:8,alignItems:"end"},children:c.map((c,d)=>(0,b.jsx)(o,{cycle:c,windowLabel:a},d))})]})}function o({cycle:a,windowLabel:c}){let d=Math.max(0,Math.min(100,a.peakPct)),e=Math.max(0,a.peakPct),f=function(a){switch(a){case"success":return"var(--af-success)";case"warning":return"#b58400";case"danger":return"var(--af-danger)"}}(a.current?function(a,b,c,d=Date.now()){var e;return((e=100*Math.max(0,Math.min(1,(d-(b-c))/c))-a)<-15?{tone:"danger",label:"may exhaust early"}:e>15?{tone:"warning",label:"below pace"}:{tone:"success",label:"on pace"}).tone}(d,new Date(a.endsAt).getTime(),m[c]):d>=70?"success":d>=40?"warning":"danger"),g=new Date(a.endsAt),h=a.current?`ends ${g.toLocaleDateString(void 0,{month:"short",day:"numeric"})}`:g.toLocaleDateString(void 0,{month:"short",day:"numeric"});return(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:4},title:`${a.current?"Current cycle ends":"Cycle ended"} ${g.toLocaleString()}${"predicted"===a.source?" · estimated from JSONL":" · measured from daemon"}`,children:[(0,b.jsxs)("div",{style:{fontSize:11,fontFamily:"var(--font-mono)",color:f,fontWeight:700,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:[e.toFixed(0),"%"]}),(0,b.jsx)("div",{style:{height:80,display:"flex",flexDirection:"column",justifyContent:"flex-end",background:"var(--af-border-subtle)",borderRadius:4,opacity:a.current?.85:1,border:a.current?`1px dashed ${f}`:"none"},children:(0,b.jsx)("div",{style:{height:`${d}%`,background:f,borderRadius:4,opacity:"predicted"===a.source?.55:1,backgroundImage:"predicted"===a.source?"repeating-linear-gradient(45deg, transparent 0 4px, rgba(0,0,0,0.08) 4px 8px)":void 0}})}),(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textAlign:"center",fontFamily:"var(--font-mono)",letterSpacing:"0.02em"},children:[h,"predicted"===a.source&&(0,b.jsxs)(b.Fragment,{children:[" ",(0,b.jsx)("span",{style:{color:"#b58400"},children:"·est"})]})]})]})}a.i(9117);var p=a.i(30375);function q(a){return"premium-requests"===a?"premium requests":"credits"===a?"credits":"AI credits"}function r(a,b){let c=q(b?.unit);if(b?.unlimited)return{headline:"Limit not reported",detail:null===b.used?null:`${b.used.toLocaleString("en-US")} ${c} reported by Copilot`,limitNotReported:!0};let d=b?.used!==null&&b?.used!==void 0&&null!==b.limit?`${b.used.toLocaleString("en-US")} of ${b.limit.toLocaleString("en-US")} ${c} used${null!==b.remaining?` \xb7 ${b.remaining.toLocaleString("en-US")} remaining`:""}`:null;return{headline:null===a?"—":`${a.toFixed(1)}%`,detail:d,limitNotReported:!1}}function s(a){return(0,p.getAgentMetadata)(a)?.displayName??a}function t(a){return(0,p.getAgentMetadata)(a)?.accentColor??"var(--af-text-tertiary)"}async function u({searchParams:a}){var d;let f=await a,g=new Set(function(a){let b=new Set;for(let c of a)b.add(c.agent??"claude-code");return b.add("claude-code"),Array.from(b)}((0,e.readUsageSnapshots)())),h=(0,p.isAgentKind)(f.agent)?f.agent:void 0,i=h&&g.has(h)?h:g.has("claude-code")?"claude-code":Array.from(g)[0],j=(0,e.readUsageSnapshotsByAgent)(i),m=(0,e.latestUsageSnapshotByAgent)(i),o="claude-code"===i?(0,e.readCachedPlanTier)():null,q="claude-code"===i?await k():null,r=q?(d=q)?{five_hour:d.curve.filter(a=>Number.isFinite(a.pred_5h)).map(a=>({capturedAt:new Date(a.ts).getTime(),util:Math.max(0,a.pred_5h)})),seven_day:d.curve.filter(a=>Number.isFinite(a.pred_7d)).map(a=>({capturedAt:new Date(a.ts).getTime(),util:Math.max(0,a.pred_7d)})),seven_day_sonnet:[]}:{five_hour:[],seven_day:[],seven_day_sonnet:[]}:null,z=q?function(a,b=6,c=Date.now()){if(!a||a.curve.length<2)return[];let d="real_7d",e=new Map;for(let b of a.curve){let a=b.cycle_end_7d;if(!a)continue;let c=Date.parse(a);if(Number.isNaN(c))continue;let d=36e5*Math.round(c/36e5),f=e.get(d)??[];f.push(b),e.set(d,f)}let f=function(a){let b=[];for(let[c,d]of Array.from(a.entries()).sort((a,b)=>a[0]-b[0])){let a=b[b.length-1];a&&c-a.endMs<=432e5?(a.endMs=c,a.points.push(...d)):b.push({endMs:c,points:[...d]})}return b}(e),g=[];for(let{endMs:a,points:b}of f){let e=a>c,f=e?function(a,b){if(a.length<2)return a;let c=[...a].sort((a,b)=>Date.parse(a.ts)-Date.parse(b.ts)),d=0;for(let a=1;a<c.length;a++){let e=c[a-1][b],f=c[a][b];"number"==typeof e&&"number"==typeof f&&e-f>=30&&(d=a)}return 0===d?c:c.slice(d)}(b,d):b,h=0,i="predicted";for(let a of f){let b=a[d];"number"==typeof b&&b>h&&(h=b,i="real");let c=Math.min(a.pred_7d??0,100);c>h&&(h=c,i="predicted")}g.push({endsAt:new Date(a).toISOString(),peakPct:Math.round(10*h)/10,source:i,current:e})}return g.slice(-b)}(q,12):[],D="grok"===i,E="copilot"===i,F="command-code"===i,G=t("command-code"),H="codex"===i&&m?.five_hour?.utilization==null;return(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:18,maxWidth:1400,padding:"20px 32px"},children:[(0,b.jsxs)("header",{style:{display:"flex",alignItems:"baseline",gap:14,flexWrap:"wrap"},children:[(0,b.jsxs)("h1",{style:{fontSize:20,fontWeight:700,letterSpacing:"-0.02em",margin:0,display:"flex",alignItems:"center",gap:8},children:[(0,b.jsx)(c.Activity,{size:18}),"Usage history"]}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:"historical plan utilization · current usage in sidebar"}),o&&"claude-code"===i&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},title:o.rateLimitTier?`Anthropic rate_limit_tier: ${o.rateLimitTier}`:void 0,children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"plan"}),(0,b.jsx)("span",{style:{color:"var(--af-text)",fontWeight:600},children:e.PLAN_TIER_LABELS[o.planTier].label}),e.PLAN_TIER_LABELS[o.planTier].monthlyPriceUsd>0&&(0,b.jsxs)("span",{style:{color:"var(--af-text-tertiary)"},children:["· $",e.PLAN_TIER_LABELS[o.planTier].monthlyPriceUsd,"/mo"]})]}),"codex"===i&&m?.plan_type&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"plan"}),(0,b.jsxs)("span",{style:{color:"var(--af-text)",fontWeight:600},children:["Codex ",m.plan_type]})]}),E&&m?.plan_type&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"allowance"}),(0,b.jsxs)("span",{style:{color:"var(--af-text)",fontWeight:600},children:["GitHub Copilot · ",m.plan_type]})]}),F&&m?.plan_type&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"plan"}),(0,b.jsxs)("span",{style:{color:"var(--af-text)",fontWeight:600},children:["Command Code · ",m.plan_type]})]}),"zai"===i&&m?.plan_type&&(0,b.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8,fontSize:12,padding:"4px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:999,fontFamily:"var(--font-mono)"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"plan"}),(0,b.jsx)("span",{style:{color:"var(--af-text)",fontWeight:600},children:m.plan_type})]})]}),(0,b.jsx)(x,{agents:Array.from(g),selected:i}),H&&(0,b.jsxs)("div",{className:"af-card",style:{padding:"12px 16px",fontSize:12,color:"var(--af-text-secondary)"},children:[(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"Codex 5-hour limit removed."})," ","This account is reporting a single 7-day usage window, so Fleetlens hides the retired 5-hour meter."]}),m?(0,b.jsxs)(b.Fragment,{children:[D&&m.seven_day?.utilization!=null&&(0,b.jsx)(B,{utilization:m.seven_day.utilization,resetsAt:m.seven_day.resets_at,planType:m.plan_type}),F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{fiveHour:m.five_hour,weekly:m.seven_day}),m.monthly&&(0,b.jsx)(A,{window:m.monthly,quota:m.monthly_quota,planType:m.plan_type})]}),E&&m.monthly&&(0,b.jsx)(v,{window:m.monthly,quota:m.monthly_quota}),z.length>0&&(0,b.jsx)(n,{windowLabel:"7d",cycles:z}),(0,b.jsx)(l.UsageChartsDashboard,{snapshots:j,predicted:r??void 0,windows:D?[{key:"seven_day",label:"7d utilization (weekly pool)",windowMs:6048e5,colorVar:"var(--af-accent)"}]:E?[{key:"monthly",label:"Monthly AI-credit utilization",windowMs:2592e6,colorVar:t("copilot")}]:F?[{key:"five_hour",label:"5h utilization",windowMs:18e6,colorVar:"var(--af-success)"},{key:"seven_day",label:"Weekly utilization",windowMs:6048e5,colorVar:G},{key:"monthly",label:"Monthly credit utilization",windowMs:2592e6,colorVar:G}]:H?[{key:"seven_day",label:"7d utilization (current limit)",windowMs:6048e5,colorVar:"var(--af-accent)"}]:void 0,hideSonnet:D||E||F||"codex"===i}),"zai"===i&&m?.web_search_quota&&(0,b.jsx)(w,{quota:m.web_search_quota}),(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},suppressHydrationWarning:!0,children:["Last ",s(i)," poll: ",new Date(m.captured_at).toLocaleString()," ·"," ",j.length," snapshot",1===j.length?"":"s"," on disk",D?" · weekly shared-pool % (no 5h window)":"",E?" · monthly AI-credit allowance (no 5h/7d windows)":"",F?" · monthly credits + 5-hour and weekly windows":"",H?" · weekly-only Codex limit":""]})]}):(0,b.jsx)(C,{agent:i})]})}function v({window:a,quota:c}){let d=a.utilization,e=q(c?.unit),f=r(d,c);return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px"},children:[(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:["Monthly ",e]}),(0,b.jsx)("div",{style:{fontSize:28,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1,fontVariantNumeric:"tabular-nums"},children:f.headline}),f.detail&&(0,b.jsx)("div",{style:{marginTop:6,fontSize:12,color:"var(--af-text-secondary)"},children:f.detail}),null!==d&&(0,b.jsx)("div",{style:{marginTop:10,height:8,borderRadius:999,background:"var(--af-border-subtle)",overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:`${Math.min(100,Math.max(0,d))}%`,height:"100%",borderRadius:999,background:t("copilot")}})}),f.limitNotReported?(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:10,marginBottom:0,lineHeight:1.5},children:["Copilot did not expose a personal credit ceiling for this account. Organization-managed plans can draw from a shared pool, so this does not mean individual use is unlimited."," ",(0,b.jsx)("a",{href:"https://docs.github.com/en/copilot/concepts/billing/usage-based-billing-for-organizations-and-enterprises",target:"_blank",rel:"noreferrer",style:{color:"var(--af-accent)"},children:"How GitHub pools AI credits ↗"})," · ",(0,b.jsx)("a",{href:"https://github.com/settings/billing",target:"_blank",rel:"noreferrer",style:{color:"var(--af-accent)"},children:"Verify in GitHub billing ↗"}),a.resets_at?` \xb7 Reported reset ${new Date(a.resets_at).toLocaleString()}.`:""]}):(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:10,marginBottom:0},children:["Copilot reports a monthly allowance; it does not expose Codex-style 5-hour or 7-day windows.",a.resets_at?` Resets ${new Date(a.resets_at).toLocaleString()}.`:""]})]})}function w({quota:a}){let c=a.used??0;return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px"},children:[(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:"Monthly web search"}),(0,b.jsxs)("div",{style:{fontSize:28,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1,fontVariantNumeric:"tabular-nums"},children:[Math.round(c),"%"]}),(0,b.jsx)("div",{style:{marginTop:10,height:6,width:"100%",background:"var(--af-border-subtle)",borderRadius:999,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.min(100,c)}%`,background:"rgb(59, 130, 246)",borderRadius:999,transition:"width 0.24s ease"}})})]})}function x({agents:a,selected:c}){let e=[...a].sort((a,b)=>"claude-code"===a?-1:"claude-code"===b?1:a.localeCompare(b));return(0,b.jsx)("div",{role:"tablist",style:{display:"inline-flex",gap:4,padding:4,background:"var(--af-border-subtle)",borderRadius:8,alignSelf:"flex-start"},children:e.map(a=>{let e=a===c;return(0,b.jsxs)(d.default,{role:"tab","aria-selected":e,href:`/usage?agent=${a}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:6,fontSize:12,fontWeight:600,letterSpacing:"0.01em",color:e?"var(--af-text)":"var(--af-text-tertiary)",background:e?"var(--af-surface)":"transparent",boxShadow:e?"0 1px 2px rgba(0,0,0,0.06)":"none",textDecoration:"none",transition:"all 0.12s ease"},children:[(0,b.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:999,background:t(a),opacity:e?1:.6}}),s(a)]},a)})})}function y({fiveHour:a,weekly:c}){return(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(240px, 1fr))",gap:12},children:[(0,b.jsx)(z,{label:"5-hour window",window:a,hint:"Rolling 5-hour rate limit on this plan."}),(0,b.jsx)(z,{label:"Weekly window",window:c,hint:"Rolling 7-day rate limit. Extra purchased credits bypass this cap."})]})}function z({label:a,window:c,hint:d}){let e=null!=c.utilization,f=e?Math.min(100,Math.max(0,c.utilization)):0;return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px"},children:[(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:a}),(0,b.jsx)("div",{style:{fontSize:28,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1,fontVariantNumeric:"tabular-nums"},children:e?`${f.toFixed(1)}%`:"—"}),(0,b.jsx)("div",{style:{marginTop:10,height:8,borderRadius:999,background:"var(--af-border-subtle)",overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:e?`${f}%`:"0%",height:"100%",borderRadius:999,background:t("command-code")}})}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:10,marginBottom:0},children:[d,c.resets_at?` Resets ${new Date(c.resets_at).toLocaleString()}.`:""]})]})}function A({window:a,quota:c,planType:d}){let e=a.utilization,f=r(e,c);return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px"},children:[(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:["Monthly credits",d?(0,b.jsxs)("span",{style:{marginLeft:8,fontWeight:500,textTransform:"none"},children:["· ",d]}):null]}),(0,b.jsx)("div",{style:{fontSize:28,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1,fontVariantNumeric:"tabular-nums"},children:f.headline}),f.detail&&(0,b.jsx)("div",{style:{marginTop:6,fontSize:12,color:"var(--af-text-secondary)"},children:f.detail}),null!==e&&(0,b.jsx)("div",{style:{marginTop:10,height:8,borderRadius:999,background:"var(--af-border-subtle)",overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:`${Math.min(100,Math.max(0,e))}%`,height:"100%",borderRadius:999,background:t("command-code")}})}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:10,marginBottom:0},children:["Plan credit allocation for this billing cycle. Extra purchased credits sit on top and are not in this meter.",a.resets_at?` Resets ${new Date(a.resets_at).toLocaleString()}.`:""]})]})}function B({utilization:a,resetsAt:c,planType:d}){let e=Math.round(Math.min(100,Math.max(0,a)));return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px"},children:[(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:["7-day weekly pool",d?(0,b.jsxs)("span",{style:{marginLeft:8,fontWeight:500,textTransform:"none"},children:["· ",d]}):null]}),(0,b.jsxs)("div",{style:{fontSize:28,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1,fontVariantNumeric:"tabular-nums"},children:[e,"%"]}),(0,b.jsx)("div",{style:{marginTop:10,height:8,borderRadius:999,background:"var(--af-border-subtle)",overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:`${e}%`,height:"100%",borderRadius:999,background:t("grok")}})}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:10,marginBottom:0},children:["Grok unified-billing shared weekly pool (same source as the Grok CLI). There is no 5-hour window — only this 7-day limit.",c?(0,b.jsxs)(b.Fragment,{children:[" ","Resets ",new Date(c).toLocaleString(),"."]}):null]})]})}function C({agent:a}){return"copilot"===a?(0,b.jsxs)("div",{className:"af-card",style:{padding:"48px 32px",textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:15,fontWeight:600,color:"var(--af-text)"},children:"No GitHub Copilot usage samples yet"}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:"8px auto 0",maxWidth:520,lineHeight:1.5},children:["Run ",(0,b.jsx)("code",{style:{fontSize:11},children:"copilot login"}),", then start the Fleetlens daemon. Fleetlens reads the monthly AI-credit quota through Copilot CLI's authenticated local SDK server."]}),(0,b.jsx)("pre",{style:{display:"inline-block",marginTop:14,background:"var(--background)",border:"1px solid var(--af-border-subtle)",padding:"8px 16px",borderRadius:6,fontSize:13,fontFamily:"var(--font-mono)",color:"var(--af-text)"},children:"fleetlens daemon start"})]}):"command-code"===a?(0,b.jsxs)("div",{className:"af-card",style:{padding:"48px 32px",textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:15,fontWeight:600,color:"var(--af-text)"},children:"No Command Code usage samples yet"}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:"8px auto 0",maxWidth:520,lineHeight:1.5},children:["The daemon polls Command Code's monthly credits plus 5-hour and weekly windows (the same billing API the ",(0,b.jsx)("code",{style:{fontSize:11},children:"cmd"})," ","/usage overlay uses). Run ",(0,b.jsx)("code",{style:{fontSize:11},children:"cmd login"})," if needed, then start the daemon."]}),(0,b.jsx)("pre",{style:{display:"inline-block",marginTop:14,background:"var(--background)",border:"1px solid var(--af-border-subtle)",padding:"8px 16px",borderRadius:6,fontSize:13,fontFamily:"var(--font-mono)",color:"var(--af-text)"},children:"fleetlens daemon start"})]}):"grok"===a?(0,b.jsxs)("div",{className:"af-card",style:{padding:"48px 32px",textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:15,fontWeight:600,color:"var(--af-text)"},children:"No Grok weekly usage samples yet"}),(0,b.jsxs)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:8,maxWidth:440,marginLeft:"auto",marginRight:"auto",lineHeight:1.5},children:["The daemon polls Grok's weekly shared-pool % (via the same billing API as the Grok CLI). Run ",(0,b.jsx)("code",{style:{fontSize:11},children:"grok login"})," if needed, then start the daemon."]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,justifyContent:"center",marginTop:16,flexWrap:"wrap"},children:[(0,b.jsx)("pre",{style:{display:"inline-block",background:"var(--background)",border:"1px solid var(--af-border-subtle)",padding:"8px 16px",borderRadius:6,fontSize:13,fontFamily:"var(--font-mono)",color:"var(--af-text)",margin:0},children:"fleetlens daemon start"}),(0,b.jsx)(d.default,{href:"/sessions?agent=grok",className:"af-btn af-btn-primary",style:{display:"inline-flex",alignItems:"center",fontSize:12,padding:"6px 14px"},children:"View Grok sessions"})]})]}):(0,b.jsxs)("div",{className:"af-card",style:{padding:"48px 32px",textAlign:"center"},children:[(0,b.jsxs)("div",{style:{fontSize:15,fontWeight:600,color:"var(--af-text)"},children:["No ",s(a)," usage data yet"]}),(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:8},children:"claude-code"===a?"Start the polling daemon to begin collecting metrics every 5 minutes:":"zai"===a?"Save a Z.ai API key in Settings; the daemon (or a settings save) writes utilization snapshots here.":"The daemon picks up this agent's rate-limit windows from disk on every poll cycle. Run a session and the data will appear here within minutes."}),"claude-code"===a&&(0,b.jsx)("pre",{style:{display:"inline-block",marginTop:14,background:"var(--background)",border:"1px solid var(--af-border-subtle)",padding:"8px 16px",borderRadius:6,fontSize:13,fontFamily:"var(--font-mono)",color:"var(--af-text)"},children:"fleetlens daemon start"})]})}a.s(["default",0,u,"dynamic",0,"force-dynamic"],28664)},51443,a=>{a.n(a.i(28664))}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=apps_web_0epqfet._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[44422,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(72131),f=a.i(70106);let g=(0,f.default)("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),h=(0,f.default)("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);var i=a.i(96101);let j=(0,f.default)("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),k=(0,f.default)("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);var l=a.i(87532),m=a.i(69439);let n=(0,f.default)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var o=a.i(60702),p=a.i(8406),q=a.i(3444);let r=(0,f.default)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),s=(0,f.default)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);function t(a){if("u">typeof document){document.documentElement.setAttribute("data-theme",a);try{document.cookie=`claude-lens-theme=${a};path=/;max-age=31536000;samesite=lax`}catch{}}}function u(){let[a,c]=(0,e.useState)("dark"),[d,f]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{let a=document.documentElement.getAttribute("data-theme");if("light"===a||"dark"===a)c(a);else{let a="dark";c(a),t(a)}f(!0)},[]),(0,b.jsx)("button",{type:"button",onClick:()=>{let b="dark"===a?"light":"dark";c(b),t(b);try{window.localStorage.setItem("claude-lens:theme",b)}catch{}},"aria-label":"dark"===a?"Switch to light mode":"Switch to dark mode",title:"dark"===a?"Switch to light mode":"Switch to dark mode",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,background:"transparent",border:"1px solid var(--af-border-subtle)",color:"var(--af-text-secondary)",cursor:"pointer",transition:"all 0.12s"},onMouseEnter:a=>{a.currentTarget.style.background="var(--af-surface-hover)",a.currentTarget.style.color="var(--af-text)"},onMouseLeave:a=>{a.currentTarget.style.background="transparent",a.currentTarget.style.color="var(--af-text-secondary)"},children:d?"dark"===a?(0,b.jsx)(s,{size:14}):(0,b.jsx)(r,{size:14}):null})}a.i(99417);var v=a.i(69176),w=a.i(2591),x=a.i(55555);function y({latestByAgent:a}){let d,f,g=(0,e.useMemo)(()=>{let b=Object.keys(a).filter(v.isAgentKind);return b.includes("claude-code")||b.push("claude-code"),[...b].sort((a,b)=>"claude-code"===a?-1:"claude-code"===b?1:a.localeCompare(b))},[a]),[h,i,j]=function(a,b,c){let[d,f]=(0,e.useState)(b),[g,h]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{let d=null;try{let b=window.localStorage.getItem(a);b&&(0,v.isAgentKind)(b)&&(d=b)}catch{}d&&c.includes(d)?f(d):c.includes(b)?f(b):c[0]&&f(c[0]),h(!0)},[a,b,c]),(0,e.useEffect)(()=>{g&&!c.includes(d)&&(c.includes(b)?f(b):c[0]&&f(c[0]))},[c,d,b,g]),[d,(0,e.useCallback)(b=>{f(b);try{window.localStorage.setItem(a,b)}catch{}},[a]),g]}("cclens:usage:sidebar-agent","claude-code",g),[k,,l]=(0,w.usePersistentBoolean)("cclens:usage:show-sonnet",!1),m=a[h]??null,n=g.length>1;if(1===g.length&&!m)return(0,b.jsxs)("div",{style:{padding:"10px 16px 12px",borderTop:"1px solid var(--af-border-subtle)",fontSize:10,color:"var(--af-text-tertiary)",lineHeight:1.4},children:[(0,b.jsx)("div",{style:{textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600,marginBottom:4},children:"Usage"}),(0,b.jsxs)("div",{children:["Run"," ",(0,b.jsx)("code",{style:{fontFamily:"var(--font-mono)"},children:"fleetlens daemon start"})," ","to collect metrics."]})]});let o=function(a,b,c={}){if(!b)return[];if("copilot"===a){let a=b.monthly??null,c=2592e6;if(a?.resets_at){let b=new Date(a.resets_at).getTime();if(Number.isFinite(b)){let a=new Date(b);c=Math.max(36e5,b-Date.UTC(a.getUTCFullYear(),a.getUTCMonth()-1,1))}}return[{label:"Monthly",window:a,windowMs:c}]}if("grok"===a||"codex"===a&&b.five_hour?.utilization==null)return[{label:"7d",window:b.seven_day??null,windowMs:6048e5}];let d=[{label:"5h",window:b.five_hour??null,windowMs:18e6},{label:"7d",window:b.seven_day??null,windowMs:6048e5}];return"claude-code"===a&&c.showSonnet&&d.push({label:"Sonnet 7d",window:b.seven_day_sonnet??null,windowMs:6048e5}),d}(h,m,{showSonnet:"claude-code"===h&&l&&k});return(0,b.jsxs)("div",{style:{padding:"10px 16px 12px",borderTop:"1px solid var(--af-border-subtle)",color:"inherit"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:n?6:8},children:[(0,b.jsx)("span",{children:"Current usage"}),m&&(0,b.jsx)(c.default,{href:`/usage?agent=${h}`,style:{fontWeight:500,textTransform:"none",letterSpacing:0,color:"var(--af-text-tertiary)",textDecoration:"none"},suppressHydrationWarning:!0,children:(d=new Date(m.captured_at).getTime(),(f=Math.round((Date.now()-d)/1e3))<60?`${f}s ago`:f<3600?`${Math.floor(f/60)}m ago`:f<86400?`${Math.floor(f/3600)}h ago`:`${Math.floor(f/86400)}d ago`)})]}),n&&j&&(0,b.jsx)("div",{role:"tablist","aria-label":"Usage agent",style:{display:"flex",flexWrap:"wrap",gap:3,marginBottom:8},children:g.map(c=>{let d=(0,v.getAgentMetadata)(c),e=c===h,f=!!a[c];return(0,b.jsx)("button",{type:"button",role:"tab","aria-selected":e,disabled:!f&&"claude-code"!==c,onClick:()=>i(c),title:d?.displayName??c,style:{appearance:"none",border:"none",cursor:f||"claude-code"===c?"pointer":"default",padding:"2px 7px",borderRadius:999,fontSize:9,fontWeight:600,letterSpacing:"0.02em",lineHeight:1.4,color:e?"var(--af-text)":"var(--af-text-tertiary)",opacity:f||"claude-code"===c?1:.45,background:e?"var(--af-border-subtle)":"transparent",boxShadow:e?`inset 0 0 0 1px ${d?.accentColor??"var(--af-border)"}`:"none"},children:d?.shortLabel??c},c)})}),m?(0,b.jsx)(c.default,{href:`/usage?agent=${h}`,style:{display:"flex",flexDirection:"column",gap:6,textDecoration:"none",color:"inherit"},children:o.map(a=>(0,b.jsx)(z,{...a},a.label))}):(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",lineHeight:1.4},children:["No ",(0,v.getAgentMetadata)(h)?.shortLabel??h," snapshots yet."]})]})}function z({label:a,window:c,windowMs:d}){let e=c?.utilization??null,f=null!==e,g=f?Math.max(0,Math.min(100,e)):0,h=c?.resets_at?new Date(c.resets_at).getTime():null,i=f&&h?(0,x.toneVar)((0,x.paceToneForCycle)(g,h,d)):"var(--af-border-subtle)";return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,fontSize:10,color:"var(--af-text-secondary)",marginBottom:2,fontVariantNumeric:"tabular-nums"},children:[(0,b.jsx)("span",{children:a}),c?.resets_at&&(0,b.jsxs)("span",{suppressHydrationWarning:!0,style:{fontSize:9,color:"var(--af-text-tertiary)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["resets ",function(a){let b,c=Math.round((new Date(a).getTime()-Date.now())/1e3),d=Math.abs(c);if(d<60)b=`${d}s`;else if(d<3600)b=`${Math.floor(d/60)}m`;else if(d<86400){let a=Math.floor(d/3600),c=Math.floor(d%3600/60);b=c>0?`${a}h${c}m`:`${a}h`}else{let a=Math.floor(d/86400),c=Math.floor(d%86400/3600);b=c>0?`${a}d${c}h`:`${a}d`}return c<0?`${b} ago`:`in ${b}`}(c.resets_at)]}),(0,b.jsx)("span",{style:{fontWeight:600,color:"var(--af-text)",marginLeft:"auto"},children:f?`${g.toFixed(0)}%`:"—"})]}),(0,b.jsx)("div",{style:{height:4,background:"var(--af-border-subtle)",borderRadius:999,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:f?`${g}%`:"0%",background:i,borderRadius:999,transition:"width 0.24s ease"}})})]})}let A=(0,f.default)("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);var B=a.i(2913);function C({latestVersion:a,active:d}){let[f,g]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{if(!a)return void g(!1);try{let b=window.localStorage.getItem(B.STORAGE_KEY);g(b!==a)}catch{g(!1)}},[a]),(0,b.jsxs)(c.default,{href:"/changelog","aria-label":f?"Changelog (new entries)":"Changelog",title:f?`What's new in v${a}`:"Changelog",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:6,color:d?"var(--af-text)":"var(--af-text-tertiary)",background:d?"var(--af-surface-hover)":"transparent",textDecoration:"none"},children:[(0,b.jsx)(A,{size:14}),f&&(0,b.jsx)("span",{"aria-hidden":!0,style:{position:"absolute",top:3,right:3,width:7,height:7,borderRadius:"50%",background:"#ef4444",border:"1.5px solid var(--af-surface)"}})]})}let D={green:"var(--af-success, #10b981)",amber:"var(--af-warning, #f59e0b)",red:"var(--af-error, #ef4444)"};function E({connection:a}){let d,f,[g,h]=(0,e.useState)(()=>Date.now());if((0,e.useEffect)(()=>{if(!a.paired)return;let b=setInterval(()=>h(Date.now()),3e4);return()=>clearInterval(b)},[a.paired]),!a.paired)return null;let{team:i,lastPush:j}=a,k=D[function(a,b=Date.now()){if("none"===a.kind)return"amber";if("error"===a.kind)return"red";let c=b-Date.parse(a.at);return Number.isNaN(c)||c>36e5?"red":c>9e5?"amber":"green"}(j,g)];"none"===j.kind?(d="waiting…",f="Daemon pushes every 5 minutes"):(d="error"===j.kind?`failed ${(0,q.formatRelative)(j.at)}`:`synced ${(0,q.formatRelative)(j.at)}`,f=new Date(j.at).toLocaleString());let l=[`Team: ${i.name}`,f,"error"===j.kind?`Error: ${j.error}`:"Click to inspect what's synced."];return(0,b.jsxs)(c.default,{href:"/team",title:l.join("\n"),style:{display:"flex",alignItems:"center",gap:8,padding:"8px 16px 8px 20px",borderTop:"1px solid var(--af-border-subtle)",fontSize:11,color:"var(--af-text-secondary)",textDecoration:"none",minWidth:0},children:[(0,b.jsx)("span",{"aria-hidden":!0,suppressHydrationWarning:!0,style:{width:7,height:7,borderRadius:"50%",background:k,flexShrink:0,boxShadow:`0 0 0 2px color-mix(in srgb, ${k} 25%, transparent)`}}),(0,b.jsx)("span",{style:{flexShrink:0,fontWeight:500},children:"Team:"}),(0,b.jsx)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.name}),(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0},suppressHydrationWarning:!0,children:d})]})}function F({href:a,active:d,icon:e,trailing:f,children:g}){return(0,b.jsxs)(c.default,{href:a,style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",borderRadius:7,fontSize:13,fontWeight:500,color:d?"var(--af-accent)":"var(--af-text-secondary)",background:d?"var(--af-accent-subtle)":"transparent",transition:"all 0.12s"},children:[e,(0,b.jsx)("span",{style:{flex:1},children:g}),f&&(0,b.jsx)("span",{style:{fontSize:10,color:d?"var(--af-accent)":"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:f})]})}function G({label:a,items:d,pathname:e,isPinned:f,onTogglePin:g}){return 0===d.length?null:(0,b.jsxs)("div",{style:{marginTop:10},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",padding:"0 10px 6px",fontWeight:600},children:a}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:d.map(a=>{let d=`/projects/${encodeURIComponent(a.projectDir)}`,h=e===d,i=(0,q.prettyProjectName)(a.projectName);return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"5px 6px 5px 10px",borderRadius:6,background:h?"var(--af-accent-subtle)":"transparent",color:h?"var(--af-accent)":"var(--af-text-secondary)"},children:[(0,b.jsxs)(c.default,{href:d,style:{flex:1,minWidth:0,fontSize:12,color:"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:5},title:(a.worktreeCount??0)>0?`${a.projectName} — ${a.worktreeCount} worktree${1===a.worktreeCount?"":"s"}`:a.projectName,children:[(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:i}),(a.worktreeCount??0)>0&&(0,b.jsxs)("span",{style:{fontSize:9,fontWeight:600,padding:"1px 5px",borderRadius:100,background:"rgba(167, 139, 250, 0.15)",color:"rgba(167, 139, 250, 1)",flexShrink:0},children:["+",a.worktreeCount," wt"]})]}),(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginLeft:4},children:a.sessionCount}),(0,b.jsx)("button",{type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),g(a.projectDir)},"aria-label":f(a.projectDir)?"Unpin project":"Pin project",title:f(a.projectDir)?"Unpin":"Pin",style:{background:"transparent",border:"none",padding:3,borderRadius:4,color:f(a.projectDir)?"var(--af-accent)":"var(--af-text-tertiary)",display:"flex",alignItems:"center"},children:f(a.projectDir)?(0,b.jsx)(k,{size:12}):(0,b.jsx)(j,{size:12})}),a.lastActiveMs&&(0,b.jsx)("span",{style:{fontSize:9,color:"var(--af-text-tertiary)",marginLeft:2,minWidth:32,textAlign:"right"},title:new Date(a.lastActiveMs).toISOString(),suppressHydrationWarning:!0,children:(0,q.formatRelative)(new Date(a.lastActiveMs).toISOString())})]},a.projectDir)})})]})}a.s(["Sidebar",0,function({projects:a,totalSessions:f,usageByAgent:j,version:k,latestChangelogVersion:q,teamConnection:r}){let s=(0,d.usePathname)(),[t,v]=(0,e.useState)(new Set),[w,x]=(0,e.useState)(!1),[z,A]=(0,e.useState)("");(0,e.useEffect)(()=>{v(new Set),x(!0)},[]);let B=a=>{v(b=>{let c=new Set(b);c.has(a)?c.delete(a):c.add(a);try{window.localStorage.setItem("claude-lens:pinned-projects:v1",JSON.stringify(Array.from(c)))}catch{}return c})},D=(0,e.useMemo)(()=>{if(!z.trim())return a;let b=z.toLowerCase();return a.filter(a=>a.projectName.toLowerCase().includes(b))},[a,z]),H=D.filter(a=>t.has(a.projectDir)),I=D.filter(a=>!t.has(a.projectDir));return(0,b.jsxs)("aside",{style:{width:260,flexShrink:0,borderRight:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",display:"flex",flexDirection:"column",position:"sticky",top:0,height:"100vh"},children:[(0,b.jsx)("div",{style:{padding:"18px 20px 12px",borderBottom:"1px solid var(--af-border-subtle)"},children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,b.jsx)("span",{"aria-hidden":"true",style:{width:28,height:28,flex:"0 0 auto",background:'url("/icon.svg") center / contain no-repeat'}}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,b.jsx)("span",{style:{fontSize:14,fontWeight:700,letterSpacing:"-0.01em"},children:"Fleetlens"}),(0,b.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",fontWeight:500},title:`fleetlens ${k}`,children:["v",k]})]}),(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:"Multi-agent fleet analytics"})]})]})}),(0,b.jsxs)("nav",{style:{padding:"10px 10px 6px",display:"flex",flexDirection:"column",gap:2},children:[(0,b.jsx)(F,{href:"/",active:"/"===s,icon:(0,b.jsx)(g,{size:15}),children:"Overview"}),(0,b.jsx)(F,{href:"/sessions",active:"/sessions"===s||s.startsWith("/sessions/"),icon:(0,b.jsx)(h,{size:15}),trailing:f>0?String(f):void 0,children:"All sessions"}),(0,b.jsx)(F,{href:"/projects",active:"/projects"===s,icon:(0,b.jsx)(i.FolderOpen,{size:15}),trailing:a.length>0?String(a.length):void 0,children:"Projects"}),(0,b.jsx)(F,{href:"/day",active:"/day"===s||s.startsWith("/day/")||"/digest"===s||s.startsWith("/digest/")||"/parallelism"===s,icon:(0,b.jsx)(o.CalendarDays,{size:15}),children:"Day"}),(0,b.jsx)(F,{href:"/insights",active:"/insights"===s,icon:(0,b.jsx)(m.Lightbulb,{size:15}),children:"Insights"}),(0,b.jsx)(F,{href:"/agent",active:"/agent"===s||"/runs"===s||s.startsWith("/runs/"),icon:(0,b.jsx)(p.Sparkles,{size:15}),children:"Agent"})]}),(0,b.jsxs)("div",{style:{margin:"0 14px",padding:"8px 0",borderTop:"1px solid var(--af-border-subtle)",borderBottom:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)(l.Search,{size:13,color:"var(--af-text-tertiary)"}),(0,b.jsx)("input",{type:"text",placeholder:"Search projects",value:z,onChange:a=>A(a.target.value),style:{flex:1,background:"transparent",border:"none",padding:"4px 0",fontSize:12,color:"var(--af-text)"}})]}),(0,b.jsxs)("div",{style:{flex:1,overflow:"auto",padding:"4px 8px 20px"},children:[w&&H.length>0&&(0,b.jsx)(G,{label:"Pinned",items:H,pathname:s,isPinned:a=>t.has(a),onTogglePin:B}),(0,b.jsx)(G,{label:"Projects",items:I,pathname:s,isPinned:a=>t.has(a),onTogglePin:B})]}),(0,b.jsx)(y,{latestByAgent:j}),(0,b.jsx)(E,{connection:r}),(0,b.jsxs)("div",{style:{padding:"10px 16px 10px 20px",fontSize:10,color:"var(--af-text-tertiary)",borderTop:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:8},children:[(0,b.jsxs)("span",{style:{flex:1,minWidth:0},children:[f," sessions · ",a.length," projects"]}),(0,b.jsx)(C,{latestVersion:q,active:"/changelog"===s}),(0,b.jsx)(c.default,{href:"/settings","aria-label":"Settings",title:"Settings",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:6,color:"/settings"===s?"var(--af-text)":"var(--af-text-tertiary)",background:"/settings"===s?"var(--af-surface-hover)":"transparent",textDecoration:"none"},children:(0,b.jsx)(n,{size:14})}),(0,b.jsx)(u,{})]})]})}],44422)},46069,a=>{"use strict";var b=a.i(50944),c=a.i(72131);a.s(["LiveRefresher",0,function(){let a,d=(0,b.useRouter)(),e=(a=(0,b.usePathname)(),a?.includes("/insights/print/")??!1),f=(0,c.useRef)(null),g=(0,c.useRef)({session:0,usage:0,team:0});return!function(a,b={}){let{enabled:d=!0}=b,e=(0,c.useRef)(a);(0,c.useEffect)(()=>{e.current=a},[a]),(0,c.useEffect)(()=>{if(!d)return;let a=new EventSource("/api/events");return a.onmessage=a=>{try{let b=JSON.parse(a.data);("session-updated"===b.type||"usage-updated"===b.type||"team-push"===b.type)&&e.current(b)}catch{}},a.onerror=()=>{},()=>{a.close()}},[d])}((0,c.useCallback)(a=>{let b="usage-updated"===a.type?"usage":"team-push"===a.type?"team":"session";a.mtimeMs<=(g.current[b]??0)||(g.current[b]=a.mtimeMs,f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{d.refresh()},400))},[d]),{enabled:!e}),(0,c.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),null}],46069)},1568,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(38246),f=a.i(3444),g=a.i(76285),h=a.i(99309),i=a.i(44220);let j="cclens-live-widget-expanded";a.s(["LiveSessionsWidget",0,function({sessions:a,entrySummaries:k={}}){let l=(0,d.usePathname)(),[m,n]=(0,c.useState)(()=>Date.now()),[o,p]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{try{let a=localStorage.getItem(j);null!==a&&p("true"===a)}catch{}},[]),(0,c.useEffect)(()=>{let a=setInterval(()=>n(Date.now()),1e4);return()=>clearInterval(a)},[]),l&&/^\/sessions\/[^/]+$/.test(l))return null;let q=a.filter(a=>{let b=a.lastTimestamp?Date.parse(a.lastTimestamp):NaN,c=Math.max(Number.isNaN(b)?0:b,a.lastActivityMs&&Number.isFinite(a.lastActivityMs)?a.lastActivityMs:0);return!(c<=0)&&m-c<=45e3}).slice().sort((a,b)=>{let c=a.firstTimestamp?Date.parse(a.firstTimestamp):0;return(b.firstTimestamp?Date.parse(b.firstTimestamp):0)-c});if(0===q.length)return null;let r=o?q.slice(0,5):[],s=o?q.length-r.length:0;return(0,b.jsxs)("div",{style:{position:"fixed",right:20,bottom:20,zIndex:100,display:"flex",flexDirection:"column-reverse",gap:6,maxWidth:320,pointerEvents:"auto"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{var a;return a=a=>!a,void p(b=>{let c=a(b);try{localStorage.setItem(j,String(c))}catch{}return c})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"5px 11px 5px 9px",background:"rgba(239, 68, 68, 0.14)",border:"1px solid rgba(239, 68, 68, 0.4)",borderRadius:100,fontSize:10,fontWeight:700,color:"#ef4444",letterSpacing:"0.06em",textTransform:"uppercase",alignSelf:"flex-end",cursor:"pointer",userSelect:"none",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",boxShadow:"0 2px 10px rgba(239, 68, 68, 0.15)"},title:o?"Collapse":`Show ${q.length} live session${1===q.length?"":"s"}`,children:[(0,b.jsx)("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#ef4444",animation:"cs-live-pulse 1.6s ease-in-out infinite"}}),"Live · ",(0,b.jsx)("span",{suppressHydrationWarning:!0,children:q.length})]}),o&&s>0&&(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",padding:"0 4px",textAlign:"right"},children:["+",s," more live"]}),r.map(a=>{let c=k[a.id];return(0,b.jsxs)(e.default,{href:`/sessions/${a.id}`,style:{display:"block",padding:"10px 12px",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderLeft:"2px solid #ef4444",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",textDecoration:"none",color:"var(--af-text)",fontSize:11,lineHeight:1.35,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},title:(a.lastUserPreview||a.firstUserPreview||a.lastAgentPreview)??(0,f.prettyProjectName)(a.projectName),children:[c&&(0,b.jsx)("div",{onClick:a=>a.stopPropagation(),style:{marginBottom:4},children:c.outcome?(0,b.jsx)(i.OutcomePill,{outcome:c.outcome,size:"sm",label:"text",agent:a.agent}):"skipped_trivial"!==c.enrichmentStatus?(0,b.jsx)(i.OutcomePill,{outcome:null,pending:!0,sessionId:a.id,localDay:c.localDay,size:"sm",agent:a.agent}):null}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,fontWeight:500,color:"var(--af-text)",minWidth:0},children:[(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:a.lastUserPreview||a.firstUserPreview||(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})}),(0,b.jsx)(g.TeamBadge,{session:a,linkable:!1}),(0,b.jsx)(h.AgentBadge,{agent:a.agent})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:3,fontStyle:"italic"},children:a.lastAgentPreview?(0,b.jsxs)(b.Fragment,{children:["↳ ",a.lastAgentPreview]}):(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"waiting…"})}),(0,b.jsx)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(0,f.prettyProjectName)(a.projectName)})]},a.id)}),(0,b.jsx)("style",{children:`
|
|
1
|
+
module.exports=[44422,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(72131),f=a.i(70106);let g=(0,f.default)("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),h=(0,f.default)("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);var i=a.i(96101);let j=(0,f.default)("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),k=(0,f.default)("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);var l=a.i(87532),m=a.i(69439);let n=(0,f.default)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var o=a.i(60702),p=a.i(8406),q=a.i(3444);let r=(0,f.default)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),s=(0,f.default)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);function t(a){if("u">typeof document){document.documentElement.setAttribute("data-theme",a);try{document.cookie=`claude-lens-theme=${a};path=/;max-age=31536000;samesite=lax`}catch{}}}function u(){let[a,c]=(0,e.useState)("dark"),[d,f]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{let a=document.documentElement.getAttribute("data-theme");if("light"===a||"dark"===a)c(a);else{let a="dark";c(a),t(a)}f(!0)},[]),(0,b.jsx)("button",{type:"button",onClick:()=>{let b="dark"===a?"light":"dark";c(b),t(b);try{window.localStorage.setItem("claude-lens:theme",b)}catch{}},"aria-label":"dark"===a?"Switch to light mode":"Switch to dark mode",title:"dark"===a?"Switch to light mode":"Switch to dark mode",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,background:"transparent",border:"1px solid var(--af-border-subtle)",color:"var(--af-text-secondary)",cursor:"pointer",transition:"all 0.12s"},onMouseEnter:a=>{a.currentTarget.style.background="var(--af-surface-hover)",a.currentTarget.style.color="var(--af-text)"},onMouseLeave:a=>{a.currentTarget.style.background="transparent",a.currentTarget.style.color="var(--af-text-secondary)"},children:d?"dark"===a?(0,b.jsx)(s,{size:14}):(0,b.jsx)(r,{size:14}):null})}a.i(99417);var v=a.i(69176),w=a.i(2591),x=a.i(55555);function y({latestByAgent:a}){let d,f,g=(0,e.useMemo)(()=>{let b=Object.keys(a).filter(v.isAgentKind);return b.includes("claude-code")||b.push("claude-code"),[...b].sort((a,b)=>"claude-code"===a?-1:"claude-code"===b?1:a.localeCompare(b))},[a]),[h,i,j]=function(a,b,c){let[d,f]=(0,e.useState)(b),[g,h]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{let d=null;try{let b=window.localStorage.getItem(a);b&&(0,v.isAgentKind)(b)&&(d=b)}catch{}d&&c.includes(d)?f(d):c.includes(b)?f(b):c[0]&&f(c[0]),h(!0)},[a,b,c]),(0,e.useEffect)(()=>{g&&!c.includes(d)&&(c.includes(b)?f(b):c[0]&&f(c[0]))},[c,d,b,g]),[d,(0,e.useCallback)(b=>{f(b);try{window.localStorage.setItem(a,b)}catch{}},[a]),g]}("cclens:usage:sidebar-agent","claude-code",g),[k,,l]=(0,w.usePersistentBoolean)("cclens:usage:show-sonnet",!1),m=a[h]??null,n=g.length>1;if(1===g.length&&!m)return(0,b.jsxs)("div",{style:{padding:"10px 16px 12px",borderTop:"1px solid var(--af-border-subtle)",fontSize:10,color:"var(--af-text-tertiary)",lineHeight:1.4},children:[(0,b.jsx)("div",{style:{textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600,marginBottom:4},children:"Usage"}),(0,b.jsxs)("div",{children:["Run"," ",(0,b.jsx)("code",{style:{fontFamily:"var(--font-mono)"},children:"fleetlens daemon start"})," ","to collect metrics."]})]});let o=function(a,b,c={}){if(!b)return[];if("copilot"===a){let a=b.monthly??null,c=2592e6;if(a?.resets_at){let b=new Date(a.resets_at).getTime();if(Number.isFinite(b)){let a=new Date(b);c=Math.max(36e5,b-Date.UTC(a.getUTCFullYear(),a.getUTCMonth()-1,1))}}return[{label:"Monthly",window:a,windowMs:c}]}if("grok"===a)return[{label:"7d",window:b.seven_day??null,windowMs:6048e5}];if("command-code"===a){let a=b.monthly??null,c=2592e6;if(a?.resets_at){let b=new Date(a.resets_at).getTime();if(Number.isFinite(b)){let a=new Date(b);c=Math.max(36e5,b-Date.UTC(a.getUTCFullYear(),a.getUTCMonth()-1,1))}}return[{label:"5h",window:b.five_hour??null,windowMs:18e6},{label:"wk",window:b.seven_day??null,windowMs:6048e5},{label:"Monthly",window:a,windowMs:c}]}if("codex"===a&&b.five_hour?.utilization==null)return[{label:"7d",window:b.seven_day??null,windowMs:6048e5}];let d=[{label:"5h",window:b.five_hour??null,windowMs:18e6},{label:"7d",window:b.seven_day??null,windowMs:6048e5}];return"claude-code"===a&&c.showSonnet&&d.push({label:"Sonnet 7d",window:b.seven_day_sonnet??null,windowMs:6048e5}),d}(h,m,{showSonnet:"claude-code"===h&&l&&k});return(0,b.jsxs)("div",{style:{padding:"10px 16px 12px",borderTop:"1px solid var(--af-border-subtle)",color:"inherit"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:n?6:8},children:[(0,b.jsx)("span",{children:"Current usage"}),m&&(0,b.jsx)(c.default,{href:`/usage?agent=${h}`,style:{fontWeight:500,textTransform:"none",letterSpacing:0,color:"var(--af-text-tertiary)",textDecoration:"none"},suppressHydrationWarning:!0,children:(d=new Date(m.captured_at).getTime(),(f=Math.round((Date.now()-d)/1e3))<60?`${f}s ago`:f<3600?`${Math.floor(f/60)}m ago`:f<86400?`${Math.floor(f/3600)}h ago`:`${Math.floor(f/86400)}d ago`)})]}),n&&j&&(0,b.jsx)("div",{role:"tablist","aria-label":"Usage agent",style:{display:"flex",flexWrap:"wrap",gap:3,marginBottom:8},children:g.map(c=>{let d=(0,v.getAgentMetadata)(c),e=c===h,f=!!a[c];return(0,b.jsx)("button",{type:"button",role:"tab","aria-selected":e,disabled:!f&&"claude-code"!==c,onClick:()=>i(c),title:d?.displayName??c,style:{appearance:"none",border:"none",cursor:f||"claude-code"===c?"pointer":"default",padding:"2px 7px",borderRadius:999,fontSize:9,fontWeight:600,letterSpacing:"0.02em",lineHeight:1.4,color:e?"var(--af-text)":"var(--af-text-tertiary)",opacity:f||"claude-code"===c?1:.45,background:e?"var(--af-border-subtle)":"transparent",boxShadow:e?`inset 0 0 0 1px ${d?.accentColor??"var(--af-border)"}`:"none"},children:d?.shortLabel??c},c)})}),m?(0,b.jsx)(c.default,{href:`/usage?agent=${h}`,style:{display:"flex",flexDirection:"column",gap:6,textDecoration:"none",color:"inherit"},children:o.map(a=>(0,b.jsx)(z,{...a},a.label))}):(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",lineHeight:1.4},children:["No ",(0,v.getAgentMetadata)(h)?.shortLabel??h," snapshots yet."]})]})}function z({label:a,window:c,windowMs:d}){let e=c?.utilization??null,f=null!==e,g=f?Math.max(0,Math.min(100,e)):0,h=c?.resets_at?new Date(c.resets_at).getTime():null,i=f&&h?(0,x.toneVar)((0,x.paceToneForCycle)(g,h,d)):"var(--af-border-subtle)";return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,fontSize:10,color:"var(--af-text-secondary)",marginBottom:2,fontVariantNumeric:"tabular-nums"},children:[(0,b.jsx)("span",{children:a}),c?.resets_at&&(0,b.jsxs)("span",{suppressHydrationWarning:!0,style:{fontSize:9,color:"var(--af-text-tertiary)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["resets ",function(a){let b,c=Math.round((new Date(a).getTime()-Date.now())/1e3),d=Math.abs(c);if(d<60)b=`${d}s`;else if(d<3600)b=`${Math.floor(d/60)}m`;else if(d<86400){let a=Math.floor(d/3600),c=Math.floor(d%3600/60);b=c>0?`${a}h${c}m`:`${a}h`}else{let a=Math.floor(d/86400),c=Math.floor(d%86400/3600);b=c>0?`${a}d${c}h`:`${a}d`}return c<0?`${b} ago`:`in ${b}`}(c.resets_at)]}),(0,b.jsx)("span",{style:{fontWeight:600,color:"var(--af-text)",marginLeft:"auto"},children:f?`${g.toFixed(0)}%`:"—"})]}),(0,b.jsx)("div",{style:{height:4,background:"var(--af-border-subtle)",borderRadius:999,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:f?`${g}%`:"0%",background:i,borderRadius:999,transition:"width 0.24s ease"}})})]})}let A=(0,f.default)("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);var B=a.i(2913);function C({latestVersion:a,active:d}){let[f,g]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{if(!a)return void g(!1);try{let b=window.localStorage.getItem(B.STORAGE_KEY);g(b!==a)}catch{g(!1)}},[a]),(0,b.jsxs)(c.default,{href:"/changelog","aria-label":f?"Changelog (new entries)":"Changelog",title:f?`What's new in v${a}`:"Changelog",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:6,color:d?"var(--af-text)":"var(--af-text-tertiary)",background:d?"var(--af-surface-hover)":"transparent",textDecoration:"none"},children:[(0,b.jsx)(A,{size:14}),f&&(0,b.jsx)("span",{"aria-hidden":!0,style:{position:"absolute",top:3,right:3,width:7,height:7,borderRadius:"50%",background:"#ef4444",border:"1.5px solid var(--af-surface)"}})]})}let D={green:"var(--af-success, #10b981)",amber:"var(--af-warning, #f59e0b)",red:"var(--af-error, #ef4444)"};function E({connection:a}){let d,f,[g,h]=(0,e.useState)(()=>Date.now());if((0,e.useEffect)(()=>{if(!a.paired)return;let b=setInterval(()=>h(Date.now()),3e4);return()=>clearInterval(b)},[a.paired]),!a.paired)return null;let{team:i,lastPush:j}=a,k=D[function(a,b=Date.now()){if("none"===a.kind)return"amber";if("error"===a.kind)return"red";let c=b-Date.parse(a.at);return Number.isNaN(c)||c>36e5?"red":c>9e5?"amber":"green"}(j,g)];"none"===j.kind?(d="waiting…",f="Daemon pushes every 5 minutes"):(d="error"===j.kind?`failed ${(0,q.formatRelative)(j.at)}`:`synced ${(0,q.formatRelative)(j.at)}`,f=new Date(j.at).toLocaleString());let l=[`Team: ${i.name}`,f,"error"===j.kind?`Error: ${j.error}`:"Click to inspect what's synced."];return(0,b.jsxs)(c.default,{href:"/team",title:l.join("\n"),style:{display:"flex",alignItems:"center",gap:8,padding:"8px 16px 8px 20px",borderTop:"1px solid var(--af-border-subtle)",fontSize:11,color:"var(--af-text-secondary)",textDecoration:"none",minWidth:0},children:[(0,b.jsx)("span",{"aria-hidden":!0,suppressHydrationWarning:!0,style:{width:7,height:7,borderRadius:"50%",background:k,flexShrink:0,boxShadow:`0 0 0 2px color-mix(in srgb, ${k} 25%, transparent)`}}),(0,b.jsx)("span",{style:{flexShrink:0,fontWeight:500},children:"Team:"}),(0,b.jsx)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.name}),(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0},suppressHydrationWarning:!0,children:d})]})}function F({href:a,active:d,icon:e,trailing:f,children:g}){return(0,b.jsxs)(c.default,{href:a,style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",borderRadius:7,fontSize:13,fontWeight:500,color:d?"var(--af-accent)":"var(--af-text-secondary)",background:d?"var(--af-accent-subtle)":"transparent",transition:"all 0.12s"},children:[e,(0,b.jsx)("span",{style:{flex:1},children:g}),f&&(0,b.jsx)("span",{style:{fontSize:10,color:d?"var(--af-accent)":"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:f})]})}function G({label:a,items:d,pathname:e,isPinned:f,onTogglePin:g}){return 0===d.length?null:(0,b.jsxs)("div",{style:{marginTop:10},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",padding:"0 10px 6px",fontWeight:600},children:a}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:d.map(a=>{let d=`/projects/${encodeURIComponent(a.projectDir)}`,h=e===d,i=(0,q.prettyProjectName)(a.projectName);return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"5px 6px 5px 10px",borderRadius:6,background:h?"var(--af-accent-subtle)":"transparent",color:h?"var(--af-accent)":"var(--af-text-secondary)"},children:[(0,b.jsxs)(c.default,{href:d,style:{flex:1,minWidth:0,fontSize:12,color:"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:5},title:(a.worktreeCount??0)>0?`${a.projectName} — ${a.worktreeCount} worktree${1===a.worktreeCount?"":"s"}`:a.projectName,children:[(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:i}),(a.worktreeCount??0)>0&&(0,b.jsxs)("span",{style:{fontSize:9,fontWeight:600,padding:"1px 5px",borderRadius:100,background:"rgba(167, 139, 250, 0.15)",color:"rgba(167, 139, 250, 1)",flexShrink:0},children:["+",a.worktreeCount," wt"]})]}),(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginLeft:4},children:a.sessionCount}),(0,b.jsx)("button",{type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),g(a.projectDir)},"aria-label":f(a.projectDir)?"Unpin project":"Pin project",title:f(a.projectDir)?"Unpin":"Pin",style:{background:"transparent",border:"none",padding:3,borderRadius:4,color:f(a.projectDir)?"var(--af-accent)":"var(--af-text-tertiary)",display:"flex",alignItems:"center"},children:f(a.projectDir)?(0,b.jsx)(k,{size:12}):(0,b.jsx)(j,{size:12})}),a.lastActiveMs&&(0,b.jsx)("span",{style:{fontSize:9,color:"var(--af-text-tertiary)",marginLeft:2,minWidth:32,textAlign:"right"},title:new Date(a.lastActiveMs).toISOString(),suppressHydrationWarning:!0,children:(0,q.formatRelative)(new Date(a.lastActiveMs).toISOString())})]},a.projectDir)})})]})}a.s(["Sidebar",0,function({projects:a,totalSessions:f,usageByAgent:j,version:k,latestChangelogVersion:q,teamConnection:r}){let s=(0,d.usePathname)(),[t,v]=(0,e.useState)(new Set),[w,x]=(0,e.useState)(!1),[z,A]=(0,e.useState)("");(0,e.useEffect)(()=>{v(new Set),x(!0)},[]);let B=a=>{v(b=>{let c=new Set(b);c.has(a)?c.delete(a):c.add(a);try{window.localStorage.setItem("claude-lens:pinned-projects:v1",JSON.stringify(Array.from(c)))}catch{}return c})},D=(0,e.useMemo)(()=>{if(!z.trim())return a;let b=z.toLowerCase();return a.filter(a=>a.projectName.toLowerCase().includes(b))},[a,z]),H=D.filter(a=>t.has(a.projectDir)),I=D.filter(a=>!t.has(a.projectDir));return(0,b.jsxs)("aside",{style:{width:260,flexShrink:0,borderRight:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",display:"flex",flexDirection:"column",position:"sticky",top:0,height:"100vh"},children:[(0,b.jsx)("div",{style:{padding:"18px 20px 12px",borderBottom:"1px solid var(--af-border-subtle)"},children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,b.jsx)("span",{"aria-hidden":"true",style:{width:28,height:28,flex:"0 0 auto",background:'url("/icon.svg") center / contain no-repeat'}}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,b.jsx)("span",{style:{fontSize:14,fontWeight:700,letterSpacing:"-0.01em"},children:"Fleetlens"}),(0,b.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",fontWeight:500},title:`fleetlens ${k}`,children:["v",k]})]}),(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:"Multi-agent fleet analytics"})]})]})}),(0,b.jsxs)("nav",{style:{padding:"10px 10px 6px",display:"flex",flexDirection:"column",gap:2},children:[(0,b.jsx)(F,{href:"/",active:"/"===s,icon:(0,b.jsx)(g,{size:15}),children:"Overview"}),(0,b.jsx)(F,{href:"/sessions",active:"/sessions"===s||s.startsWith("/sessions/"),icon:(0,b.jsx)(h,{size:15}),trailing:f>0?String(f):void 0,children:"All sessions"}),(0,b.jsx)(F,{href:"/projects",active:"/projects"===s,icon:(0,b.jsx)(i.FolderOpen,{size:15}),trailing:a.length>0?String(a.length):void 0,children:"Projects"}),(0,b.jsx)(F,{href:"/day",active:"/day"===s||s.startsWith("/day/")||"/digest"===s||s.startsWith("/digest/")||"/parallelism"===s,icon:(0,b.jsx)(o.CalendarDays,{size:15}),children:"Day"}),(0,b.jsx)(F,{href:"/insights",active:"/insights"===s,icon:(0,b.jsx)(m.Lightbulb,{size:15}),children:"Insights"}),(0,b.jsx)(F,{href:"/agent",active:"/agent"===s||"/runs"===s||s.startsWith("/runs/"),icon:(0,b.jsx)(p.Sparkles,{size:15}),children:"Agent"})]}),(0,b.jsxs)("div",{style:{margin:"0 14px",padding:"8px 0",borderTop:"1px solid var(--af-border-subtle)",borderBottom:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)(l.Search,{size:13,color:"var(--af-text-tertiary)"}),(0,b.jsx)("input",{type:"text",placeholder:"Search projects",value:z,onChange:a=>A(a.target.value),style:{flex:1,background:"transparent",border:"none",padding:"4px 0",fontSize:12,color:"var(--af-text)"}})]}),(0,b.jsxs)("div",{style:{flex:1,overflow:"auto",padding:"4px 8px 20px"},children:[w&&H.length>0&&(0,b.jsx)(G,{label:"Pinned",items:H,pathname:s,isPinned:a=>t.has(a),onTogglePin:B}),(0,b.jsx)(G,{label:"Projects",items:I,pathname:s,isPinned:a=>t.has(a),onTogglePin:B})]}),(0,b.jsx)(y,{latestByAgent:j}),(0,b.jsx)(E,{connection:r}),(0,b.jsxs)("div",{style:{padding:"10px 16px 10px 20px",fontSize:10,color:"var(--af-text-tertiary)",borderTop:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:8},children:[(0,b.jsxs)("span",{style:{flex:1,minWidth:0},children:[f," sessions · ",a.length," projects"]}),(0,b.jsx)(C,{latestVersion:q,active:"/changelog"===s}),(0,b.jsx)(c.default,{href:"/settings","aria-label":"Settings",title:"Settings",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:6,color:"/settings"===s?"var(--af-text)":"var(--af-text-tertiary)",background:"/settings"===s?"var(--af-surface-hover)":"transparent",textDecoration:"none"},children:(0,b.jsx)(n,{size:14})}),(0,b.jsx)(u,{})]})]})}],44422)},46069,a=>{"use strict";var b=a.i(50944),c=a.i(72131);a.s(["LiveRefresher",0,function(){let a,d=(0,b.useRouter)(),e=(a=(0,b.usePathname)(),a?.includes("/insights/print/")??!1),f=(0,c.useRef)(null),g=(0,c.useRef)({session:0,usage:0,team:0});return!function(a,b={}){let{enabled:d=!0}=b,e=(0,c.useRef)(a);(0,c.useEffect)(()=>{e.current=a},[a]),(0,c.useEffect)(()=>{if(!d)return;let a=new EventSource("/api/events");return a.onmessage=a=>{try{let b=JSON.parse(a.data);("session-updated"===b.type||"usage-updated"===b.type||"team-push"===b.type)&&e.current(b)}catch{}},a.onerror=()=>{},()=>{a.close()}},[d])}((0,c.useCallback)(a=>{let b="usage-updated"===a.type?"usage":"team-push"===a.type?"team":"session";a.mtimeMs<=(g.current[b]??0)||(g.current[b]=a.mtimeMs,f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{d.refresh()},400))},[d]),{enabled:!e}),(0,c.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),null}],46069)},1568,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(38246),f=a.i(3444),g=a.i(76285),h=a.i(99309),i=a.i(44220);let j="cclens-live-widget-expanded";a.s(["LiveSessionsWidget",0,function({sessions:a,entrySummaries:k={}}){let l=(0,d.usePathname)(),[m,n]=(0,c.useState)(()=>Date.now()),[o,p]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{try{let a=localStorage.getItem(j);null!==a&&p("true"===a)}catch{}},[]),(0,c.useEffect)(()=>{let a=setInterval(()=>n(Date.now()),1e4);return()=>clearInterval(a)},[]),l&&/^\/sessions\/[^/]+$/.test(l))return null;let q=a.filter(a=>{let b=a.lastTimestamp?Date.parse(a.lastTimestamp):NaN,c=Math.max(Number.isNaN(b)?0:b,a.lastActivityMs&&Number.isFinite(a.lastActivityMs)?a.lastActivityMs:0);return!(c<=0)&&m-c<=45e3}).slice().sort((a,b)=>{let c=a.firstTimestamp?Date.parse(a.firstTimestamp):0;return(b.firstTimestamp?Date.parse(b.firstTimestamp):0)-c});if(0===q.length)return null;let r=o?q.slice(0,5):[],s=o?q.length-r.length:0;return(0,b.jsxs)("div",{style:{position:"fixed",right:20,bottom:20,zIndex:100,display:"flex",flexDirection:"column-reverse",gap:6,maxWidth:320,pointerEvents:"auto"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{var a;return a=a=>!a,void p(b=>{let c=a(b);try{localStorage.setItem(j,String(c))}catch{}return c})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"5px 11px 5px 9px",background:"rgba(239, 68, 68, 0.14)",border:"1px solid rgba(239, 68, 68, 0.4)",borderRadius:100,fontSize:10,fontWeight:700,color:"#ef4444",letterSpacing:"0.06em",textTransform:"uppercase",alignSelf:"flex-end",cursor:"pointer",userSelect:"none",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",boxShadow:"0 2px 10px rgba(239, 68, 68, 0.15)"},title:o?"Collapse":`Show ${q.length} live session${1===q.length?"":"s"}`,children:[(0,b.jsx)("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#ef4444",animation:"cs-live-pulse 1.6s ease-in-out infinite"}}),"Live · ",(0,b.jsx)("span",{suppressHydrationWarning:!0,children:q.length})]}),o&&s>0&&(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",padding:"0 4px",textAlign:"right"},children:["+",s," more live"]}),r.map(a=>{let c=k[a.id];return(0,b.jsxs)(e.default,{href:`/sessions/${a.id}`,style:{display:"block",padding:"10px 12px",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderLeft:"2px solid #ef4444",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",textDecoration:"none",color:"var(--af-text)",fontSize:11,lineHeight:1.35,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},title:(a.lastUserPreview||a.firstUserPreview||a.lastAgentPreview)??(0,f.prettyProjectName)(a.projectName),children:[c&&(0,b.jsx)("div",{onClick:a=>a.stopPropagation(),style:{marginBottom:4},children:c.outcome?(0,b.jsx)(i.OutcomePill,{outcome:c.outcome,size:"sm",label:"text",agent:a.agent}):"skipped_trivial"!==c.enrichmentStatus?(0,b.jsx)(i.OutcomePill,{outcome:null,pending:!0,sessionId:a.id,localDay:c.localDay,size:"sm",agent:a.agent}):null}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,fontWeight:500,color:"var(--af-text)",minWidth:0},children:[(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:a.lastUserPreview||a.firstUserPreview||(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})}),(0,b.jsx)(g.TeamBadge,{session:a,linkable:!1}),(0,b.jsx)(h.AgentBadge,{agent:a.agent})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:3,fontStyle:"italic"},children:a.lastAgentPreview?(0,b.jsxs)(b.Fragment,{children:["↳ ",a.lastAgentPreview]}):(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"waiting…"})}),(0,b.jsx)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(0,f.prettyProjectName)(a.projectName)})]},a.id)}),(0,b.jsx)("style",{children:`
|
|
2
2
|
@keyframes cs-live-pulse {
|
|
3
3
|
0%, 100% { opacity: 1; transform: scale(1); }
|
|
4
4
|
50% { opacity: 0.4; transform: scale(0.85); }
|