ccgauge 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +37 -37
  3. package/.next/standalone/.next/app-path-routes-manifest.json +6 -6
  4. package/.next/standalone/.next/build-manifest.json +2 -2
  5. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  6. package/.next/standalone/.next/server/app/api/blocks/route.js +1 -1
  7. package/.next/standalone/.next/server/app/api/blocks/route_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/api/scan/route.js +1 -1
  11. package/.next/standalone/.next/server/app/api/scan/route_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/api/usage/route_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/models/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/page.js +2 -2
  16. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/projects/[id]/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  23. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/usage/page.js +2 -2
  25. package/.next/standalone/.next/server/app/usage/page.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app-paths-manifest.json +6 -6
  28. package/.next/standalone/.next/server/chunks/116.js +1 -1
  29. package/.next/standalone/.next/server/chunks/144.js +1 -1
  30. package/.next/standalone/.next/server/chunks/328.js +1 -0
  31. package/.next/standalone/.next/server/functions-config-manifest.json +4 -4
  32. package/.next/standalone/.next/server/pages/500.html +1 -1
  33. package/.next/standalone/.next/static/chunks/327-e20abd872315fef4.js +1 -0
  34. package/.next/standalone/.next/static/chunks/app/usage/page-8841853999af6b39.js +1 -0
  35. package/.next/standalone/.next/static/css/1853d325765daf80.css +3 -0
  36. package/.next/standalone/package.json +1 -1
  37. package/package.json +1 -1
  38. package/.next/standalone/.next/static/chunks/327-994edd6fce79709a.js +0 -1
  39. package/.next/standalone/.next/static/chunks/app/usage/page-5b49b84e2f7903aa.js +0 -1
  40. package/.next/standalone/.next/static/css/e24bab5baa9273ba.css +0 -3
  41. /package/.next/standalone/.next/static/{wbc6_C4wOzvneKldidsp7 → kSxC61RuI0if1xBcXSx-q}/_buildManifest.js +0 -0
  42. /package/.next/standalone/.next/static/{wbc6_C4wOzvneKldidsp7 → kSxC61RuI0if1xBcXSx-q}/_ssgManifest.js +0 -0
@@ -18,4 +18,4 @@ exports.id=144,exports.ids=[144],exports.modules={3879:()=>{},22666:(a,b,c)=>{"u
18
18
  root.setAttribute('data-theme', resolved);
19
19
  } catch (e) {}
20
20
  })();
21
- `;return(0,d.jsx)("script",{dangerouslySetInnerHTML:{__html:a}})}var h=c(44119),i=c(65129);async function j(){try{let a=await (0,i.UL)(),b=a.get("ccgauge_theme")?.value;if("light"===b||"dark"===b||"system"===b)return b}catch{}return"system"}var k=c(28806);async function l(){let a=await (0,h.sG)();return{title:"ccgauge — Claude Code Dashboard",description:(0,k.nA)(a,"brand.tagline")}}let m={width:"device-width",initialScale:1};async function n({children:a}){let b=await (0,h.sG)(),c=await j();return(0,d.jsxs)("html",{lang:"zh"===b?"zh-CN":"en",className:"light"===c?"theme-light":"theme-dark",suppressHydrationWarning:!0,children:[(0,d.jsx)("head",{children:(0,d.jsx)(g,{})}),(0,d.jsx)("body",{className:"min-h-screen bg-bg text-text-primary",children:(0,d.jsxs)(f.Providers,{locale:b,theme:c,children:[(0,d.jsx)(e.Nav,{}),(0,d.jsx)("main",{children:a})]})})]})}},24713:(a,b,c)=>{"use strict";c.d(b,{ThemeSwitcher:()=>j});var d=c(11581),e=c(89864),f=c(97304),g=c(32838),h=c(57176);let i={light:"☀",dark:"☾",system:"◐"};function j(){let{theme:a,resolved:b,setTheme:c}=(0,f.D)(),{t:j}=(0,g.s9)(),[k,l]=(0,e.useState)(!1),m=(0,e.useRef)(null),n=[{value:"light",label:j("settings.theme.light")},{value:"dark",label:j("settings.theme.dark")},{value:"system",label:j("settings.theme.system")}];return(0,d.jsxs)("div",{ref:m,className:"relative",children:[(0,d.jsx)("button",{onClick:()=>l(!k),className:"btn-ghost px-2 py-1 text-base leading-none",title:`${j("theme.label")}: ${a} (${b})`,"aria-label":j("theme.label"),children:(0,d.jsx)("span",{"aria-hidden":!0,children:i[a]})}),k&&(0,d.jsx)("div",{className:"absolute right-0 mt-1 min-w-[8rem] card border-border-hi shadow-lg p-1 z-30",children:n.map(b=>(0,d.jsxs)("button",{onClick:()=>{c(b.value),l(!1)},className:(0,h.cn)("w-full text-left px-2.5 py-1.5 text-sm rounded hover:bg-bg-surface-hi flex items-center gap-2",a===b.value&&"text-text-primary"),children:[(0,d.jsx)("span",{className:"w-4 text-center","aria-hidden":!0,children:i[b.value]}),(0,d.jsx)("span",{children:b.label})]},b.value))})]})}},28806:(a,b,c)=>{"use strict";c.d(b,{Xn:()=>d,nA:()=>f});let d="en",e={en:{"brand.tagline":"claude code dashboard","nav.overview":"Overview","nav.usage":"Usage","nav.sessions":"Sessions","nav.projects":"Projects","nav.models":"Models","nav.settings":"Settings","nav.localBadge":"local","common.requests":"requests","common.tokens":"tokens","common.cost":"Cost","common.savedViaCache":"Saved {amount} via cache","common.savedTodayViaCache":"Saved {amount} today","common.live":"live","common.allModels":"All","common.allProjects":"All","common.unknown":"(unknown)","common.session":"Session","common.sessions":"sessions","common.projects":"projects","common.req":"req","common.day":"day","common.days":"days","common.activity":"activity","common.fallbackPrice":"fallback price","common.thinking":"thinking","common.lastActivity":"last activity","common.empty.title":"No usage data yet","common.empty.desc":"Open Claude Code, send a message, then refresh.","common.refresh":"Refresh","common.search":"Search…","common.searchPlaceholder":"Search model, project, session, tool…","common.exportCsv":"Export CSV","common.rows":"{count} rows","common.prev":"‹ Prev","common.next":"Next ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"Page {page} of {total}","common.allSessions":"← All sessions","common.allProjectsLink":"← All projects","common.noMatchingRows":"No matching rows","range.today":"Today","range.7d":"7d","range.30d":"30d","range.90d":"90d","range.all":"All","gran.hour":"Hour","gran.day":"Day","gran.week":"Week","gran.month":"Month","overview.title":"Overview","overview.subtitle":"{count} requests across {files} files \xb7 scan in {ms}ms","overview.subtitle.empty":"Scanned {dirs} directory(ies). Open Claude Code, send a message, then refresh.","overview.empty.title":"No usage data yet","overview.kpi.tokensToday":"Tokens today","overview.kpi.costToday":"Cost today","overview.kpi.thisMonth":"This month","overview.kpi.cacheHit":"Cache hit rate","overview.kpi.topModel":"Top model","overview.kpi.activeSessions":"Sessions today","overview.kpi.activeSessions.hint":"{count} project(s)","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} req","overview.kpi.tokensToday.hint":"{count} requests","overview.kpi.topModel.hint":"{pct} of cost this month","overview.kpi.cacheHit.hint":"Saved {amount} today","overview.delta.title":"vs yesterday","overview.trend.title":"Token usage trend","overview.trend.desc":"Last 30 days \xb7 stacked by token type","overview.trend.activeDays":"{n} day with activity","overview.trend.activeDays.plural":"{n} days with activity","overview.costByModel.title":"Cost by model","overview.costByModel.desc":"This month, sorted by spend","block.title":"Active 5h block","block.remaining":"remaining","block.elapsed":"{pct}% elapsed","block.tokensSuffix":"tokens","block.spentSoFar":"Spent so far","block.burnPerMin":"Burn / min","block.projectedTotal":"Projected total","block.requests":"Requests","block.empty":"No active block","block.emptyDesc":"Send a message in Claude Code to start one.","chart.legend.input":"Input","chart.legend.output":"Output","chart.legend.cacheRead":"Cache read","chart.legend.cacheWrite":"Cache write","chart.tooltip.total":"Total","chart.tooltip.cost":"Cost","chart.tooltip.requests":"Requests","chart.empty":"No data in this range","chart.empty.short":"No data","usage.title":"Usage","usage.subtitle":"{count} requests in selected range","usage.kpi.totalTokens":"Total tokens","usage.kpi.totalCost":"Total cost","usage.kpi.cacheSaved":"Cache saved","usage.kpi.cacheHit":"Cache hit","usage.trend":"Trend","usage.trend.gran":"Granularity: {gran}","usage.requests.title":"Requests","usage.requests.desc":"Detailed request log; click a header to sort","usage.col.time":"Time","usage.col.model":"Model","usage.col.project":"Project","usage.col.session":"Session","usage.col.input":"Input","usage.col.output":"Output","usage.col.cacheRead":"Cache R","usage.col.cacheWrite":"Cache W","usage.col.cost":"Cost","usage.col.tools":"Tools","filter.modelLabel":"Model","filter.projectLabel":"Project","filter.modelAll":"Model: All","filter.projectAll":"Project: All","filter.modelSingle":"Model: {value}","filter.projectSingle":"Project: {value}","filter.modelMulti":"Model: {count}","filter.projectMulti":"Project: {count}","filter.clearAll":"Clear all","filter.noOptions":"No options","sessions.title":"Sessions","sessions.subtitle":"{count} sessions \xb7 sorted by most recent activity","sessions.col.session":"Session","sessions.col.project":"Project","sessions.col.models":"Model(s)","sessions.col.requests":"Requests","sessions.col.tokens":"Tokens","sessions.col.cost":"Cost","sessions.col.duration":"Duration","sessions.col.lastActivity":"Last activity","sessions.untitled":"Session {hash}","sessions.empty":"No sessions yet","session.kpi.requests":"Requests","session.kpi.totalTokens":"Total tokens","session.kpi.cost":"Cost","session.kpi.duration":"Duration","session.timeline.title":"Message timeline","session.timeline.desc":"In order; newest at the bottom","session.perMessage.title":"Per-message tokens","session.modelsInSession":"Models in this session","session.modelLine":"{requests} req \xb7 {tokens} tokens","session.token.in":"in","session.token.out":"out","session.token.cacheR":"cache r","session.token.cacheW":"cache w","projects.title":"Projects","projects.subtitle":"{count} projects \xb7 sorted by spend","projects.empty":"No projects yet","projects.stat.sessions":"Sessions","projects.stat.requests":"Requests","projects.stat.tokens":"Tokens","project.activity":"Activity (last 30 days)","project.sessions.title":"Sessions ({count})","models.title":"Models","models.subtitle":"{count} model(s) used in total","models.empty":"No model usage yet","models.share.cost":"Cost share","models.share.tokens":"Tokens share","models.share.cacheHit":"Cache hit","models.field.requests":"Requests","models.field.savedByCache":"Saved by cache","models.field.input1M":"Input / 1M","models.field.output1M":"Output / 1M","models.field.cacheRead1M":"Cache read / 1M","models.field.pctOfTotal":"{pct} of total spend \xb7 {tokens} tokens","models.eachTrend":"Combined trend (last 30 days)","settings.title":"Settings","settings.subtitle":"Data sources, pricing, and behavior","settings.dataSources.title":"Data sources","settings.dataSources.desc":"ccgauge scans these locations for JSONL files","settings.dataSources.active":"active","settings.dataSources.notPresent":"not present","settings.dataSources.envHint":"Override with {env1} or {env2} environment variables (the dashboard appends {appendix}).","settings.rescan":"Rescan now","settings.rescanning":"Rescanning…","settings.scanStats.title":"Scan stats","settings.scanStats.files":"Files scanned","settings.scanStats.records":"Records parsed","settings.scanStats.assistant":"Assistant records (deduped)","settings.scanStats.duration":"Scan duration","settings.pricing.title":"Pricing table","settings.pricing.desc":"USD per 1M tokens \xb7 built-in snapshot, fuzzy match for date-suffixed model names","settings.pricing.col.model":"Model","settings.pricing.col.input":"Input","settings.pricing.col.output":"Output","settings.pricing.col.write5m":"Cache write 5m","settings.pricing.col.write1h":"Cache write 1h","settings.pricing.col.read":"Cache read","settings.preferences.title":"Preferences","settings.preferences.language":"Language","settings.preferences.theme":"Theme","settings.theme.light":"Light","settings.theme.dark":"Dark","settings.theme.system":"System","settings.about.title":"About","settings.about.subtitle":"Version {version} \xb7 MIT licensed","settings.about.line1":"Fully local: data never leaves your machine; no telemetry, no network calls.","settings.about.line2":"Read-only: ccgauge only reads JSONL files, never writes back to ~/.claude.","settings.about.line3":'Cache: scan results are memoized for 5s; click "Rescan" to force a fresh read.',"settings.about.line4":"Stop with Ctrl+C in the terminal that started ccgauge.","lang.label":"Language","lang.en":"English","lang.zh":"中文","theme.label":"Theme"},zh:{"brand.tagline":"Claude Code 用量看板","nav.overview":"概览","nav.usage":"用量","nav.sessions":"会话","nav.projects":"项目","nav.models":"模型","nav.settings":"设置","nav.localBadge":"本地","common.requests":"次请求","common.tokens":"tokens","common.cost":"花费","common.savedViaCache":"通过缓存节省 {amount}","common.savedTodayViaCache":"今日缓存节省 {amount}","common.live":"进行中","common.allModels":"全部","common.allProjects":"全部","common.unknown":"(未知)","common.session":"会话","common.sessions":"个会话","common.projects":"个项目","common.req":"请求","common.day":"天","common.days":"天","common.activity":"活跃","common.fallbackPrice":"使用兜底单价","common.thinking":"思考","common.lastActivity":"最近活跃","common.empty.title":"暂无用量数据","common.empty.desc":"打开 Claude Code 发送一条消息后刷新本页。","common.refresh":"刷新","common.search":"搜索…","common.searchPlaceholder":"搜索模型 / 项目 / 会话 / 工具…","common.exportCsv":"导出 CSV","common.rows":"{count} 行","common.prev":"‹ 上一页","common.next":"下一页 ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"第 {page} / {total} 页","common.allSessions":"← 返回会话列表","common.allProjectsLink":"← 返回项目列表","common.noMatchingRows":"没有匹配的记录","range.today":"今天","range.7d":"7 天","range.30d":"30 天","range.90d":"90 天","range.all":"全部","gran.hour":"小时","gran.day":"天","gran.week":"周","gran.month":"月","overview.title":"概览","overview.subtitle":"{count} 次请求,覆盖 {files} 个文件 \xb7 扫描耗时 {ms}ms","overview.subtitle.empty":"已扫描 {dirs} 个目录。打开 Claude Code 发一条消息后刷新本页。","overview.empty.title":"暂无用量数据","overview.kpi.tokensToday":"今日 tokens","overview.kpi.costToday":"今日花费","overview.kpi.thisMonth":"本月累计","overview.kpi.cacheHit":"缓存命中率","overview.kpi.topModel":"主力模型","overview.kpi.activeSessions":"今日会话","overview.kpi.activeSessions.hint":"涉及 {count} 个项目","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} 次请求","overview.kpi.tokensToday.hint":"{count} 次请求","overview.kpi.topModel.hint":"本月成本占比 {pct}","overview.kpi.cacheHit.hint":"今日缓存节省 {amount}","overview.delta.title":"相比昨日","overview.trend.title":"Token 用量趋势","overview.trend.desc":"近 30 天 \xb7 按 token 类型堆叠","overview.trend.activeDays":"{n} 天有数据","overview.trend.activeDays.plural":"{n} 天有数据","overview.costByModel.title":"按模型成本分布","overview.costByModel.desc":"本月,按花费排序","block.title":"当前 5h block","block.remaining":"剩余","block.elapsed":"已用 {pct}%","block.tokensSuffix":"tokens","block.spentSoFar":"已花费","block.burnPerMin":"每分钟消耗","block.projectedTotal":"预计总花费","block.requests":"请求数","block.empty":"当前无活跃 block","block.emptyDesc":"在 Claude Code 中发送消息会启动一个新 block。","chart.legend.input":"输入","chart.legend.output":"输出","chart.legend.cacheRead":"缓存读取","chart.legend.cacheWrite":"缓存写入","chart.tooltip.total":"合计","chart.tooltip.cost":"花费","chart.tooltip.requests":"请求数","chart.empty":"区间内无数据","chart.empty.short":"暂无数据","usage.title":"用量明细","usage.subtitle":"当前筛选范围内 {count} 次请求","usage.kpi.totalTokens":"总 tokens","usage.kpi.totalCost":"总花费","usage.kpi.cacheSaved":"缓存节省","usage.kpi.cacheHit":"缓存命中","usage.trend":"趋势","usage.trend.gran":"粒度:{gran}","usage.requests.title":"请求列表","usage.requests.desc":"逐条请求记录;点击表头排序","usage.col.time":"时间","usage.col.model":"模型","usage.col.project":"项目","usage.col.session":"会话","usage.col.input":"输入","usage.col.output":"输出","usage.col.cacheRead":"缓存读","usage.col.cacheWrite":"缓存写","usage.col.cost":"花费","usage.col.tools":"工具","filter.modelLabel":"模型","filter.projectLabel":"项目","filter.modelAll":"模型:全部","filter.projectAll":"项目:全部","filter.modelSingle":"模型:{value}","filter.projectSingle":"项目:{value}","filter.modelMulti":"模型:{count} 个","filter.projectMulti":"项目:{count} 个","filter.clearAll":"清除筛选","filter.noOptions":"没有可选项","sessions.title":"会话","sessions.subtitle":"共 {count} 个会话 \xb7 按最近活跃排序","sessions.col.session":"会话","sessions.col.project":"项目","sessions.col.models":"模型","sessions.col.requests":"请求数","sessions.col.tokens":"Tokens","sessions.col.cost":"花费","sessions.col.duration":"时长","sessions.col.lastActivity":"最近活跃","sessions.untitled":"会话 {hash}","sessions.empty":"暂无会话","session.kpi.requests":"请求数","session.kpi.totalTokens":"总 tokens","session.kpi.cost":"花费","session.kpi.duration":"时长","session.timeline.title":"消息时间线","session.timeline.desc":"按时间正序,最新的在最下方","session.perMessage.title":"逐条消息 tokens","session.modelsInSession":"本会话使用的模型","session.modelLine":"{requests} 次 \xb7 {tokens} tokens","session.token.in":"输入","session.token.out":"输出","session.token.cacheR":"缓存读","session.token.cacheW":"缓存写","projects.title":"项目","projects.subtitle":"共 {count} 个项目 \xb7 按花费排序","projects.empty":"暂无项目","projects.stat.sessions":"会话","projects.stat.requests":"请求","projects.stat.tokens":"Tokens","project.activity":"活跃情况(近 30 天)","project.sessions.title":"会话({count})","models.title":"模型","models.subtitle":"共使用过 {count} 个模型","models.empty":"暂无模型用量","models.share.cost":"成本占比","models.share.tokens":"Tokens 占比","models.share.cacheHit":"缓存命中","models.field.requests":"请求数","models.field.savedByCache":"缓存节省","models.field.input1M":"输入 / 1M","models.field.output1M":"输出 / 1M","models.field.cacheRead1M":"缓存读 / 1M","models.field.pctOfTotal":"占总花费 {pct} \xb7 {tokens} tokens","models.eachTrend":"整体趋势(近 30 天)","settings.title":"设置","settings.subtitle":"数据源、价格表与行为偏好","settings.dataSources.title":"数据源","settings.dataSources.desc":"ccgauge 会扫描以下路径的 JSONL 文件","settings.dataSources.active":"已启用","settings.dataSources.notPresent":"不存在","settings.dataSources.envHint":"可以通过环境变量 {env1} 或 {env2} 自定义路径(看板会自动追加 {appendix})。","settings.rescan":"立即重新扫描","settings.rescanning":"扫描中…","settings.scanStats.title":"扫描统计","settings.scanStats.files":"扫描文件数","settings.scanStats.records":"解析记录数","settings.scanStats.assistant":"去重后 assistant 记录","settings.scanStats.duration":"扫描耗时","settings.pricing.title":"价格表","settings.pricing.desc":"美元 / 1M tokens \xb7 内置快照,对带日期后缀的模型名做 fuzzy 匹配","settings.pricing.col.model":"模型","settings.pricing.col.input":"输入","settings.pricing.col.output":"输出","settings.pricing.col.write5m":"缓存写入 5 分钟","settings.pricing.col.write1h":"缓存写入 1 小时","settings.pricing.col.read":"缓存读取","settings.preferences.title":"偏好设置","settings.preferences.language":"语言","settings.preferences.theme":"主题","settings.theme.light":"亮色","settings.theme.dark":"暗色","settings.theme.system":"跟随系统","settings.about.title":"关于","settings.about.subtitle":"版本 {version} \xb7 MIT 协议","settings.about.line1":"完全本地:数据从不离开你的机器,没有任何遥测、没有任何网络调用。","settings.about.line2":"只读:ccgauge 只读取 JSONL,绝不会写回 ~/.claude。","settings.about.line3":'缓存:扫描结果会缓存 5 秒;点击"重新扫描"可强制刷新。',"settings.about.line4":"在启动 ccgauge 的终端按 Ctrl+C 即可停止。","lang.label":"语言","lang.en":"English","lang.zh":"中文","theme.label":"主题"}};function f(a,b,c){let d=e[a]?.[b];if(void 0===d&&(d=e.en[b]),void 0===d&&(d=b),c)for(let[a,b]of Object.entries(c))d=d.replace(RegExp(`\\{${a}\\}`,"g"),String(b));return d}},31236:(a,b,c)=>{"use strict";c.d(b,{LanguageSwitcher:()=>k});var d=c(11581),e=c(89864),f=c(32838),g=c(75688),h=c(57176);let i={en:"EN",zh:"中"},j={en:"English",zh:"中文"};function k(){let{locale:a,setLocale:b,t:c}=(0,f.s9)(),[k,l]=(0,e.useState)(!1),m=(0,e.useRef)(null);return(0,d.jsxs)("div",{ref:m,className:"relative",children:[(0,d.jsx)("button",{onClick:()=>l(!k),className:"btn-ghost px-2 py-1 text-xs font-medium",title:c("lang.label"),"aria-label":c("lang.label"),children:i[a]}),k&&(0,d.jsx)("div",{className:"absolute right-0 mt-1 min-w-[8rem] card border-border-hi shadow-lg p-1 z-30",children:g.YZ.map(c=>(0,d.jsxs)("button",{onClick:()=>{b(c),l(!1)},className:(0,h.cn)("w-full text-left px-2.5 py-1.5 text-sm rounded hover:bg-bg-surface-hi flex items-center gap-2",a===c&&"text-text-primary"),children:[(0,d.jsx)("span",{className:(0,h.cn)("w-3.5 h-3.5 rounded-sm border flex items-center justify-center text-[10px]",a===c?"bg-brand border-brand text-white":"border-border-hi"),children:a===c?"✓":""}),(0,d.jsx)("span",{children:j[c]})]},c))})]})}},32838:(a,b,c)=>{"use strict";c.d(b,{CY:()=>i,s9:()=>j,kj:()=>k});var d=c(11581),e=c(89864),f=c(33479),g=c(75688);let h=(0,e.createContext)({locale:g.Xn,setLocale:()=>{},t:a=>a});function i({initialLocale:a,children:b}){let c=(0,f.useRouter)(),i=(0,e.useCallback)(a=>{try{localStorage.setItem("ccgauge.locale",a)}catch{}document.cookie=`ccgauge_locale=${a}; path=/; max-age=31536000; SameSite=Lax`,c.refresh()},[c]),j=(0,e.useCallback)((b,c)=>(0,g.nA)(a,b,c),[a]),k=(0,e.useMemo)(()=>({locale:a,setLocale:i,t:j}),[a,i,j]);return(0,d.jsx)(h.Provider,{value:k,children:b})}function j(){return(0,e.useContext)(h)}function k(){return(0,e.useContext)(h).t}},32966:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,41053,23)),Promise.resolve().then(c.t.bind(c,47812,23)),Promise.resolve().then(c.t.bind(c,50954,23)),Promise.resolve().then(c.t.bind(c,12493,23)),Promise.resolve().then(c.t.bind(c,99961,23)),Promise.resolve().then(c.t.bind(c,44865,23)),Promise.resolve().then(c.t.bind(c,91307,23)),Promise.resolve().then(c.t.bind(c,89684,23)),Promise.resolve().then(c.bind(c,69977))},41214:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,57535,23)),Promise.resolve().then(c.t.bind(c,97262,23)),Promise.resolve().then(c.t.bind(c,70184,23)),Promise.resolve().then(c.t.bind(c,66623,23)),Promise.resolve().then(c.t.bind(c,76983,23)),Promise.resolve().then(c.t.bind(c,43199,23)),Promise.resolve().then(c.t.bind(c,32313,23)),Promise.resolve().then(c.t.bind(c,43462,23)),Promise.resolve().then(c.t.bind(c,60367,23))},44119:(a,b,c)=>{"use strict";c.d(b,{sG:()=>f,yO:()=>g});var d=c(65129),e=c(28806);async function f(){try{let a=await (0,d.UL)(),b=a.get("ccgauge_locale")?.value;if("zh"===b||"en"===b)return b}catch{}return e.Xn}async function g(){let a=await f();return(b,c)=>(0,e.nA)(a,b,c)}},49902:(a,b,c)=>{"use strict";c.d(b,{Providers:()=>d});let d=(0,c(58979).registerClientReference)(function(){throw Error("Attempted to call Providers() from the server but Providers 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.")},"/Users/zuopeng.cheng/personal/workspace/ccgauge/components/providers.tsx","Providers")},57176:(a,b,c)=>{"use strict";c.d(b,{BC:()=>n,P6:()=>o,PJ:()=>m,R8:()=>j,az:()=>h,cn:()=>f,jh:()=>g,l7:()=>i,om:()=>k,r6:()=>l});var d=c(45301),e=c(86981);function f(...a){return(0,e.QP)((0,d.$)(a))}function g(a){return Number.isFinite(a)?a>=1e9?(a/1e9).toFixed(2)+"B":a>=1e6?(a/1e6).toFixed(2)+"M":a>=1e3?(a/1e3).toFixed(1)+"K":new Intl.NumberFormat("en-US",{maximumFractionDigits:(void 0)??0}).format(a):"0"}function h(a,b){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:b?.minFrac??2,maximumFractionDigits:b?.maxFrac??2}).format(a)}function i(a){return 0===a?"$0":a<.01?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:4,maximumFractionDigits:6}).format(a):h(a)}function j(a,b=1){return Number.isFinite(a)?`${(100*a).toFixed(b)}%`:"0%"}function k(a){let b="string"==typeof a||"number"==typeof a?new Date(a):a,c=Date.now()-b.getTime();if(c<0)return"just now";let d=Math.floor(c/1e3);if(d<60)return`${d}s ago`;let e=Math.floor(d/60);if(e<60)return`${e}m ago`;let f=Math.floor(e/60);if(f<24)return`${f}h ago`;let g=Math.floor(f/24);if(g<7)return`${g}d ago`;let h=Math.floor(g/7);if(h<5)return`${h}w ago`;let i=Math.floor(g/30);return i<12?`${i}mo ago`:`${Math.floor(g/365)}y ago`}function l(a){let b="string"==typeof a||"number"==typeof a?new Date(a):a;if(Number.isNaN(b.getTime()))return"";let c=b.getFullYear(),d=String(b.getMonth()+1).padStart(2,"0"),e=String(b.getDate()).padStart(2,"0"),f=String(b.getHours()).padStart(2,"0"),g=String(b.getMinutes()).padStart(2,"0");return`${c}-${d}-${e} ${f}:${g}`}function m(a){if(!a)return"(unknown)";let b=a.replace(/\/+$/,"").split("/");return b[b.length-1]||a}function n(a,b=8){return a?a.replace(/-/g,"").slice(0,b):""}function o(a){if(!a)return"(unknown)";let b=a.replace(/-(\d{8})$/,"").replace(/^(vertex_ai|bedrock|anthropic)\//,""),c=(b=b.replace(/^claude-/,"")).split("-");if(c.length>=2){let a=c[0],b=c.slice(1).join(".");return p(a)+" "+b}return p(b.replace(/-/g," "))}function p(a){return a.replace(/\b\w/g,a=>a.toUpperCase())}},66548:(a,b,c)=>{"use strict";c.d(b,{Providers:()=>g});var d=c(11581),e=c(32838),f=c(97304);function g({locale:a,theme:b,children:c}){return(0,d.jsx)(e.CY,{initialLocale:a,children:(0,d.jsx)(f.N,{initialTheme:b,children:c})})}},74369:(a,b,c)=>{Promise.resolve().then(c.bind(c,90639)),Promise.resolve().then(c.bind(c,49902))},75688:(a,b,c)=>{"use strict";c.d(b,{Xn:()=>e,YZ:()=>d,nA:()=>g});let d=["en","zh"],e="en",f={en:{"brand.tagline":"claude code dashboard","nav.overview":"Overview","nav.usage":"Usage","nav.sessions":"Sessions","nav.projects":"Projects","nav.models":"Models","nav.settings":"Settings","nav.localBadge":"local","common.requests":"requests","common.tokens":"tokens","common.cost":"Cost","common.savedViaCache":"Saved {amount} via cache","common.savedTodayViaCache":"Saved {amount} today","common.live":"live","common.allModels":"All","common.allProjects":"All","common.unknown":"(unknown)","common.session":"Session","common.sessions":"sessions","common.projects":"projects","common.req":"req","common.day":"day","common.days":"days","common.activity":"activity","common.fallbackPrice":"fallback price","common.thinking":"thinking","common.lastActivity":"last activity","common.empty.title":"No usage data yet","common.empty.desc":"Open Claude Code, send a message, then refresh.","common.refresh":"Refresh","common.search":"Search…","common.searchPlaceholder":"Search model, project, session, tool…","common.exportCsv":"Export CSV","common.rows":"{count} rows","common.prev":"‹ Prev","common.next":"Next ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"Page {page} of {total}","common.allSessions":"← All sessions","common.allProjectsLink":"← All projects","common.noMatchingRows":"No matching rows","range.today":"Today","range.7d":"7d","range.30d":"30d","range.90d":"90d","range.all":"All","gran.hour":"Hour","gran.day":"Day","gran.week":"Week","gran.month":"Month","overview.title":"Overview","overview.subtitle":"{count} requests across {files} files \xb7 scan in {ms}ms","overview.subtitle.empty":"Scanned {dirs} directory(ies). Open Claude Code, send a message, then refresh.","overview.empty.title":"No usage data yet","overview.kpi.tokensToday":"Tokens today","overview.kpi.costToday":"Cost today","overview.kpi.thisMonth":"This month","overview.kpi.cacheHit":"Cache hit rate","overview.kpi.topModel":"Top model","overview.kpi.activeSessions":"Sessions today","overview.kpi.activeSessions.hint":"{count} project(s)","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} req","overview.kpi.tokensToday.hint":"{count} requests","overview.kpi.topModel.hint":"{pct} of cost this month","overview.kpi.cacheHit.hint":"Saved {amount} today","overview.delta.title":"vs yesterday","overview.trend.title":"Token usage trend","overview.trend.desc":"Last 30 days \xb7 stacked by token type","overview.trend.activeDays":"{n} day with activity","overview.trend.activeDays.plural":"{n} days with activity","overview.costByModel.title":"Cost by model","overview.costByModel.desc":"This month, sorted by spend","block.title":"Active 5h block","block.remaining":"remaining","block.elapsed":"{pct}% elapsed","block.tokensSuffix":"tokens","block.spentSoFar":"Spent so far","block.burnPerMin":"Burn / min","block.projectedTotal":"Projected total","block.requests":"Requests","block.empty":"No active block","block.emptyDesc":"Send a message in Claude Code to start one.","chart.legend.input":"Input","chart.legend.output":"Output","chart.legend.cacheRead":"Cache read","chart.legend.cacheWrite":"Cache write","chart.tooltip.total":"Total","chart.tooltip.cost":"Cost","chart.tooltip.requests":"Requests","chart.empty":"No data in this range","chart.empty.short":"No data","usage.title":"Usage","usage.subtitle":"{count} requests in selected range","usage.kpi.totalTokens":"Total tokens","usage.kpi.totalCost":"Total cost","usage.kpi.cacheSaved":"Cache saved","usage.kpi.cacheHit":"Cache hit","usage.trend":"Trend","usage.trend.gran":"Granularity: {gran}","usage.requests.title":"Requests","usage.requests.desc":"Detailed request log; click a header to sort","usage.col.time":"Time","usage.col.model":"Model","usage.col.project":"Project","usage.col.session":"Session","usage.col.input":"Input","usage.col.output":"Output","usage.col.cacheRead":"Cache R","usage.col.cacheWrite":"Cache W","usage.col.cost":"Cost","usage.col.tools":"Tools","filter.modelLabel":"Model","filter.projectLabel":"Project","filter.modelAll":"Model: All","filter.projectAll":"Project: All","filter.modelSingle":"Model: {value}","filter.projectSingle":"Project: {value}","filter.modelMulti":"Model: {count}","filter.projectMulti":"Project: {count}","filter.clearAll":"Clear all","filter.noOptions":"No options","sessions.title":"Sessions","sessions.subtitle":"{count} sessions \xb7 sorted by most recent activity","sessions.col.session":"Session","sessions.col.project":"Project","sessions.col.models":"Model(s)","sessions.col.requests":"Requests","sessions.col.tokens":"Tokens","sessions.col.cost":"Cost","sessions.col.duration":"Duration","sessions.col.lastActivity":"Last activity","sessions.untitled":"Session {hash}","sessions.empty":"No sessions yet","session.kpi.requests":"Requests","session.kpi.totalTokens":"Total tokens","session.kpi.cost":"Cost","session.kpi.duration":"Duration","session.timeline.title":"Message timeline","session.timeline.desc":"In order; newest at the bottom","session.perMessage.title":"Per-message tokens","session.modelsInSession":"Models in this session","session.modelLine":"{requests} req \xb7 {tokens} tokens","session.token.in":"in","session.token.out":"out","session.token.cacheR":"cache r","session.token.cacheW":"cache w","projects.title":"Projects","projects.subtitle":"{count} projects \xb7 sorted by spend","projects.empty":"No projects yet","projects.stat.sessions":"Sessions","projects.stat.requests":"Requests","projects.stat.tokens":"Tokens","project.activity":"Activity (last 30 days)","project.sessions.title":"Sessions ({count})","models.title":"Models","models.subtitle":"{count} model(s) used in total","models.empty":"No model usage yet","models.share.cost":"Cost share","models.share.tokens":"Tokens share","models.share.cacheHit":"Cache hit","models.field.requests":"Requests","models.field.savedByCache":"Saved by cache","models.field.input1M":"Input / 1M","models.field.output1M":"Output / 1M","models.field.cacheRead1M":"Cache read / 1M","models.field.pctOfTotal":"{pct} of total spend \xb7 {tokens} tokens","models.eachTrend":"Combined trend (last 30 days)","settings.title":"Settings","settings.subtitle":"Data sources, pricing, and behavior","settings.dataSources.title":"Data sources","settings.dataSources.desc":"ccgauge scans these locations for JSONL files","settings.dataSources.active":"active","settings.dataSources.notPresent":"not present","settings.dataSources.envHint":"Override with {env1} or {env2} environment variables (the dashboard appends {appendix}).","settings.rescan":"Rescan now","settings.rescanning":"Rescanning…","settings.scanStats.title":"Scan stats","settings.scanStats.files":"Files scanned","settings.scanStats.records":"Records parsed","settings.scanStats.assistant":"Assistant records (deduped)","settings.scanStats.duration":"Scan duration","settings.pricing.title":"Pricing table","settings.pricing.desc":"USD per 1M tokens \xb7 built-in snapshot, fuzzy match for date-suffixed model names","settings.pricing.col.model":"Model","settings.pricing.col.input":"Input","settings.pricing.col.output":"Output","settings.pricing.col.write5m":"Cache write 5m","settings.pricing.col.write1h":"Cache write 1h","settings.pricing.col.read":"Cache read","settings.preferences.title":"Preferences","settings.preferences.language":"Language","settings.preferences.theme":"Theme","settings.theme.light":"Light","settings.theme.dark":"Dark","settings.theme.system":"System","settings.about.title":"About","settings.about.subtitle":"Version {version} \xb7 MIT licensed","settings.about.line1":"Fully local: data never leaves your machine; no telemetry, no network calls.","settings.about.line2":"Read-only: ccgauge only reads JSONL files, never writes back to ~/.claude.","settings.about.line3":'Cache: scan results are memoized for 5s; click "Rescan" to force a fresh read.',"settings.about.line4":"Stop with Ctrl+C in the terminal that started ccgauge.","lang.label":"Language","lang.en":"English","lang.zh":"中文","theme.label":"Theme"},zh:{"brand.tagline":"Claude Code 用量看板","nav.overview":"概览","nav.usage":"用量","nav.sessions":"会话","nav.projects":"项目","nav.models":"模型","nav.settings":"设置","nav.localBadge":"本地","common.requests":"次请求","common.tokens":"tokens","common.cost":"花费","common.savedViaCache":"通过缓存节省 {amount}","common.savedTodayViaCache":"今日缓存节省 {amount}","common.live":"进行中","common.allModels":"全部","common.allProjects":"全部","common.unknown":"(未知)","common.session":"会话","common.sessions":"个会话","common.projects":"个项目","common.req":"请求","common.day":"天","common.days":"天","common.activity":"活跃","common.fallbackPrice":"使用兜底单价","common.thinking":"思考","common.lastActivity":"最近活跃","common.empty.title":"暂无用量数据","common.empty.desc":"打开 Claude Code 发送一条消息后刷新本页。","common.refresh":"刷新","common.search":"搜索…","common.searchPlaceholder":"搜索模型 / 项目 / 会话 / 工具…","common.exportCsv":"导出 CSV","common.rows":"{count} 行","common.prev":"‹ 上一页","common.next":"下一页 ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"第 {page} / {total} 页","common.allSessions":"← 返回会话列表","common.allProjectsLink":"← 返回项目列表","common.noMatchingRows":"没有匹配的记录","range.today":"今天","range.7d":"7 天","range.30d":"30 天","range.90d":"90 天","range.all":"全部","gran.hour":"小时","gran.day":"天","gran.week":"周","gran.month":"月","overview.title":"概览","overview.subtitle":"{count} 次请求,覆盖 {files} 个文件 \xb7 扫描耗时 {ms}ms","overview.subtitle.empty":"已扫描 {dirs} 个目录。打开 Claude Code 发一条消息后刷新本页。","overview.empty.title":"暂无用量数据","overview.kpi.tokensToday":"今日 tokens","overview.kpi.costToday":"今日花费","overview.kpi.thisMonth":"本月累计","overview.kpi.cacheHit":"缓存命中率","overview.kpi.topModel":"主力模型","overview.kpi.activeSessions":"今日会话","overview.kpi.activeSessions.hint":"涉及 {count} 个项目","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} 次请求","overview.kpi.tokensToday.hint":"{count} 次请求","overview.kpi.topModel.hint":"本月成本占比 {pct}","overview.kpi.cacheHit.hint":"今日缓存节省 {amount}","overview.delta.title":"相比昨日","overview.trend.title":"Token 用量趋势","overview.trend.desc":"近 30 天 \xb7 按 token 类型堆叠","overview.trend.activeDays":"{n} 天有数据","overview.trend.activeDays.plural":"{n} 天有数据","overview.costByModel.title":"按模型成本分布","overview.costByModel.desc":"本月,按花费排序","block.title":"当前 5h block","block.remaining":"剩余","block.elapsed":"已用 {pct}%","block.tokensSuffix":"tokens","block.spentSoFar":"已花费","block.burnPerMin":"每分钟消耗","block.projectedTotal":"预计总花费","block.requests":"请求数","block.empty":"当前无活跃 block","block.emptyDesc":"在 Claude Code 中发送消息会启动一个新 block。","chart.legend.input":"输入","chart.legend.output":"输出","chart.legend.cacheRead":"缓存读取","chart.legend.cacheWrite":"缓存写入","chart.tooltip.total":"合计","chart.tooltip.cost":"花费","chart.tooltip.requests":"请求数","chart.empty":"区间内无数据","chart.empty.short":"暂无数据","usage.title":"用量明细","usage.subtitle":"当前筛选范围内 {count} 次请求","usage.kpi.totalTokens":"总 tokens","usage.kpi.totalCost":"总花费","usage.kpi.cacheSaved":"缓存节省","usage.kpi.cacheHit":"缓存命中","usage.trend":"趋势","usage.trend.gran":"粒度:{gran}","usage.requests.title":"请求列表","usage.requests.desc":"逐条请求记录;点击表头排序","usage.col.time":"时间","usage.col.model":"模型","usage.col.project":"项目","usage.col.session":"会话","usage.col.input":"输入","usage.col.output":"输出","usage.col.cacheRead":"缓存读","usage.col.cacheWrite":"缓存写","usage.col.cost":"花费","usage.col.tools":"工具","filter.modelLabel":"模型","filter.projectLabel":"项目","filter.modelAll":"模型:全部","filter.projectAll":"项目:全部","filter.modelSingle":"模型:{value}","filter.projectSingle":"项目:{value}","filter.modelMulti":"模型:{count} 个","filter.projectMulti":"项目:{count} 个","filter.clearAll":"清除筛选","filter.noOptions":"没有可选项","sessions.title":"会话","sessions.subtitle":"共 {count} 个会话 \xb7 按最近活跃排序","sessions.col.session":"会话","sessions.col.project":"项目","sessions.col.models":"模型","sessions.col.requests":"请求数","sessions.col.tokens":"Tokens","sessions.col.cost":"花费","sessions.col.duration":"时长","sessions.col.lastActivity":"最近活跃","sessions.untitled":"会话 {hash}","sessions.empty":"暂无会话","session.kpi.requests":"请求数","session.kpi.totalTokens":"总 tokens","session.kpi.cost":"花费","session.kpi.duration":"时长","session.timeline.title":"消息时间线","session.timeline.desc":"按时间正序,最新的在最下方","session.perMessage.title":"逐条消息 tokens","session.modelsInSession":"本会话使用的模型","session.modelLine":"{requests} 次 \xb7 {tokens} tokens","session.token.in":"输入","session.token.out":"输出","session.token.cacheR":"缓存读","session.token.cacheW":"缓存写","projects.title":"项目","projects.subtitle":"共 {count} 个项目 \xb7 按花费排序","projects.empty":"暂无项目","projects.stat.sessions":"会话","projects.stat.requests":"请求","projects.stat.tokens":"Tokens","project.activity":"活跃情况(近 30 天)","project.sessions.title":"会话({count})","models.title":"模型","models.subtitle":"共使用过 {count} 个模型","models.empty":"暂无模型用量","models.share.cost":"成本占比","models.share.tokens":"Tokens 占比","models.share.cacheHit":"缓存命中","models.field.requests":"请求数","models.field.savedByCache":"缓存节省","models.field.input1M":"输入 / 1M","models.field.output1M":"输出 / 1M","models.field.cacheRead1M":"缓存读 / 1M","models.field.pctOfTotal":"占总花费 {pct} \xb7 {tokens} tokens","models.eachTrend":"整体趋势(近 30 天)","settings.title":"设置","settings.subtitle":"数据源、价格表与行为偏好","settings.dataSources.title":"数据源","settings.dataSources.desc":"ccgauge 会扫描以下路径的 JSONL 文件","settings.dataSources.active":"已启用","settings.dataSources.notPresent":"不存在","settings.dataSources.envHint":"可以通过环境变量 {env1} 或 {env2} 自定义路径(看板会自动追加 {appendix})。","settings.rescan":"立即重新扫描","settings.rescanning":"扫描中…","settings.scanStats.title":"扫描统计","settings.scanStats.files":"扫描文件数","settings.scanStats.records":"解析记录数","settings.scanStats.assistant":"去重后 assistant 记录","settings.scanStats.duration":"扫描耗时","settings.pricing.title":"价格表","settings.pricing.desc":"美元 / 1M tokens \xb7 内置快照,对带日期后缀的模型名做 fuzzy 匹配","settings.pricing.col.model":"模型","settings.pricing.col.input":"输入","settings.pricing.col.output":"输出","settings.pricing.col.write5m":"缓存写入 5 分钟","settings.pricing.col.write1h":"缓存写入 1 小时","settings.pricing.col.read":"缓存读取","settings.preferences.title":"偏好设置","settings.preferences.language":"语言","settings.preferences.theme":"主题","settings.theme.light":"亮色","settings.theme.dark":"暗色","settings.theme.system":"跟随系统","settings.about.title":"关于","settings.about.subtitle":"版本 {version} \xb7 MIT 协议","settings.about.line1":"完全本地:数据从不离开你的机器,没有任何遥测、没有任何网络调用。","settings.about.line2":"只读:ccgauge 只读取 JSONL,绝不会写回 ~/.claude。","settings.about.line3":'缓存:扫描结果会缓存 5 秒;点击"重新扫描"可强制刷新。',"settings.about.line4":"在启动 ccgauge 的终端按 Ctrl+C 即可停止。","lang.label":"语言","lang.en":"English","lang.zh":"中文","theme.label":"主题"}};function g(a,b,c){let d=f[a]?.[b];if(void 0===d&&(d=f.en[b]),void 0===d&&(d=b),c)for(let[a,b]of Object.entries(c))d=d.replace(RegExp(`\\{${a}\\}`,"g"),String(b));return d}},87521:(a,b,c)=>{Promise.resolve().then(c.bind(c,97273)),Promise.resolve().then(c.bind(c,66548))},90639:(a,b,c)=>{"use strict";c.d(b,{Nav:()=>d});let d=(0,c(58979).registerClientReference)(function(){throw Error("Attempted to call Nav() from the server but Nav 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.")},"/Users/zuopeng.cheng/personal/workspace/ccgauge/components/nav.tsx","Nav")},97273:(a,b,c)=>{"use strict";c.d(b,{Nav:()=>m});var d=c(11581),e=c(3024),f=c.n(e),g=c(33479),h=c(57176),i=c(32838),j=c(31236),k=c(24713);let l=[{href:"/",tk:"nav.overview",exact:!0},{href:"/usage",tk:"nav.usage"},{href:"/sessions",tk:"nav.sessions"},{href:"/projects",tk:"nav.projects"},{href:"/models",tk:"nav.models"},{href:"/settings",tk:"nav.settings"}];function m(){let a=(0,g.usePathname)(),b=(0,i.kj)();return(0,d.jsx)("header",{className:"sticky top-0 z-30 border-b border-border bg-bg-base/80 backdrop-blur",children:(0,d.jsxs)("div",{className:"max-w-7xl mx-auto px-6 h-14 flex items-center gap-4",children:[(0,d.jsxs)(f(),{href:"/",className:"flex items-center gap-2 font-semibold tracking-tight whitespace-nowrap",children:[(0,d.jsx)("span",{className:"inline-flex items-center justify-center w-7 h-7 rounded-button bg-brand text-white text-xs font-bold",children:"cc"}),(0,d.jsx)("span",{children:"ccgauge"}),(0,d.jsx)("span",{className:"text-xs text-text-tertiary font-normal hidden md:inline",children:b("brand.tagline")})]}),(0,d.jsx)("nav",{className:"flex-1 flex items-center gap-1",children:l.map(c=>{let e=c.exact?a===c.href:a===c.href||a.startsWith(c.href+"/");return(0,d.jsx)(f(),{href:c.href,className:(0,h.cn)("px-3 py-1.5 text-sm rounded-button font-medium transition-colors",e?"text-text-primary bg-bg-surface-hi":"text-text-secondary hover:text-text-primary hover:bg-bg-surface"),children:b(c.tk)},c.href)})}),(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"pill bg-bg-surface-hi text-text-tertiary text-[10px] uppercase tracking-wide",children:b("nav.localBadge")}),(0,d.jsx)(j.LanguageSwitcher,{}),(0,d.jsx)(k.ThemeSwitcher,{})]})]})})}},97304:(a,b,c)=>{"use strict";c.d(b,{N:()=>h,D:()=>i});var d=c(11581),e=c(89864);let f=(0,e.createContext)({theme:"system",resolved:"dark",setTheme:()=>{}});function g(a){return"light"===a?"light":"dark"}function h({initialTheme:a,children:b}){let[c,h]=(0,e.useState)(a),[i,j]=(0,e.useState)(()=>"system"===a?"dark":a),k=(0,e.useCallback)(a=>{try{localStorage.setItem("ccgauge.theme",a)}catch{}document.cookie=`ccgauge_theme=${a}; path=/; max-age=31536000; SameSite=Lax`,h(a),j(g(a)),function(a){if("undefined"==typeof document)return;let b=document.documentElement,c=g(a);b.classList.remove("theme-light","theme-dark"),b.classList.add("light"===c?"theme-light":"theme-dark"),b.setAttribute("data-theme",c)}(a)},[]);return(0,d.jsx)(f.Provider,{value:{theme:c,resolved:i,setTheme:k},children:b})}function i(){return(0,e.useContext)(f)}}};
21
+ `;return(0,d.jsx)("script",{dangerouslySetInnerHTML:{__html:a}})}var h=c(44119),i=c(65129);async function j(){try{let a=await (0,i.UL)(),b=a.get("ccgauge_theme")?.value;if("light"===b||"dark"===b||"system"===b)return b}catch{}return"system"}var k=c(28806);async function l(){let a=await (0,h.sG)();return{title:"ccgauge — Claude Code Dashboard",description:(0,k.nA)(a,"brand.tagline")}}let m={width:"device-width",initialScale:1};async function n({children:a}){let b=await (0,h.sG)(),c=await j();return(0,d.jsxs)("html",{lang:"zh"===b?"zh-CN":"en",className:"light"===c?"theme-light":"theme-dark",suppressHydrationWarning:!0,children:[(0,d.jsx)("head",{children:(0,d.jsx)(g,{})}),(0,d.jsx)("body",{className:"min-h-screen bg-bg text-text-primary",children:(0,d.jsxs)(f.Providers,{locale:b,theme:c,children:[(0,d.jsx)(e.Nav,{}),(0,d.jsx)("main",{children:a})]})})]})}},24713:(a,b,c)=>{"use strict";c.d(b,{ThemeSwitcher:()=>j});var d=c(11581),e=c(89864),f=c(97304),g=c(32838),h=c(57176);let i={light:"☀",dark:"☾",system:"◐"};function j(){let{theme:a,resolved:b,setTheme:c}=(0,f.D)(),{t:j}=(0,g.s9)(),[k,l]=(0,e.useState)(!1),m=(0,e.useRef)(null),n=[{value:"light",label:j("settings.theme.light")},{value:"dark",label:j("settings.theme.dark")},{value:"system",label:j("settings.theme.system")}];return(0,d.jsxs)("div",{ref:m,className:"relative",children:[(0,d.jsx)("button",{onClick:()=>l(!k),className:"btn-ghost px-2 py-1 text-base leading-none",title:`${j("theme.label")}: ${a} (${b})`,"aria-label":j("theme.label"),children:(0,d.jsx)("span",{"aria-hidden":!0,children:i[a]})}),k&&(0,d.jsx)("div",{className:"absolute right-0 mt-1 min-w-[8rem] card border-border-hi shadow-lg p-1 z-30",children:n.map(b=>(0,d.jsxs)("button",{onClick:()=>{c(b.value),l(!1)},className:(0,h.cn)("w-full text-left px-2.5 py-1.5 text-sm rounded hover:bg-bg-surface-hi flex items-center gap-2",a===b.value&&"text-text-primary"),children:[(0,d.jsx)("span",{className:"w-4 text-center","aria-hidden":!0,children:i[b.value]}),(0,d.jsx)("span",{children:b.label})]},b.value))})]})}},28806:(a,b,c)=>{"use strict";c.d(b,{Xn:()=>d,nA:()=>f});let d="en",e={en:{"brand.tagline":"claude code dashboard","nav.overview":"Overview","nav.usage":"Usage","nav.sessions":"Sessions","nav.projects":"Projects","nav.models":"Models","nav.settings":"Settings","nav.localBadge":"local","common.requests":"requests","common.tokens":"tokens","common.cost":"Cost","common.savedViaCache":"Saved {amount} via cache","common.savedTodayViaCache":"Saved {amount} today","common.live":"live","common.allModels":"All","common.allProjects":"All","common.unknown":"(unknown)","common.session":"Session","common.sessions":"sessions","common.projects":"projects","common.req":"req","common.day":"day","common.days":"days","common.activity":"activity","common.fallbackPrice":"fallback price","common.thinking":"thinking","common.lastActivity":"last activity","common.empty.title":"No usage data yet","common.empty.desc":"Open Claude Code, send a message, then refresh.","common.refresh":"Refresh","common.search":"Search…","common.searchPlaceholder":"Search model, project, session, tool…","common.exportCsv":"Export CSV","common.rows":"{count} rows","common.prev":"‹ Prev","common.next":"Next ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"Page {page} of {total}","common.allSessions":"← All sessions","common.allProjectsLink":"← All projects","common.noMatchingRows":"No matching rows","range.today":"Today","range.7d":"7d","range.30d":"30d","range.90d":"90d","range.all":"All","gran.hour":"Hour","gran.day":"Day","gran.week":"Week","gran.month":"Month","overview.title":"Overview","overview.subtitle":"{count} requests across {files} files \xb7 scan in {ms}ms","overview.subtitle.empty":"Scanned {dirs} directory(ies). Open Claude Code, send a message, then refresh.","overview.empty.title":"No usage data yet","overview.kpi.tokensToday":"Tokens today","overview.kpi.costToday":"Cost today","overview.kpi.thisMonth":"This month","overview.kpi.cacheHit":"Cache hit rate","overview.kpi.topModel":"Top model","overview.kpi.activeSessions":"Sessions today","overview.kpi.activeSessions.hint":"{count} project(s)","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} req","overview.kpi.tokensToday.hint":"{count} requests","overview.kpi.topModel.hint":"{pct} of cost this month","overview.kpi.cacheHit.hint":"Saved {amount} today","overview.delta.title":"vs yesterday","overview.trend.title":"Token usage trend","overview.trend.desc":"Last 30 days \xb7 stacked by token type","overview.trend.activeDays":"{n} day with activity","overview.trend.activeDays.plural":"{n} days with activity","overview.costByModel.title":"Cost by model","overview.costByModel.desc":"This month, sorted by spend","block.title":"Active 5h block","block.remaining":"remaining","block.elapsed":"{pct}% elapsed","block.tokensSuffix":"tokens","block.spentSoFar":"Spent so far","block.burnPerMin":"Burn / min","block.projectedTotal":"Projected total","block.requests":"Requests","block.empty":"No active block","block.emptyDesc":"Send a message in Claude Code to start one.","chart.legend.input":"Input","chart.legend.output":"Output","chart.legend.cacheRead":"Cache read","chart.legend.cacheWrite":"Cache write","chart.tooltip.total":"Total","chart.tooltip.cost":"Cost","chart.tooltip.requests":"Requests","chart.empty":"No data in this range","chart.empty.short":"No data","usage.title":"Usage","usage.subtitle":"{count} turns in selected range","usage.col.calls":"Calls","usage.col.userMessage":"Prompt","usage.turn.expand":"Expand","usage.turn.collapse":"Collapse","usage.turn.callsCount":"{count} calls","usage.turn.noPrompt":"(no user text)","usage.requests.desc":"One row per turn (user message + tool calls); click ▸ to expand","usage.kpi.totalTokens":"Total tokens","usage.kpi.totalCost":"Total cost","usage.kpi.cacheSaved":"Cache saved","usage.kpi.cacheHit":"Cache hit","usage.trend":"Trend","usage.trend.gran":"Granularity: {gran}","usage.requests.title":"Requests","usage.col.time":"Time","usage.col.model":"Model","usage.col.project":"Project","usage.col.session":"Session","usage.col.input":"Input","usage.col.output":"Output","usage.col.cacheRead":"Cache R","usage.col.cacheWrite":"Cache W","usage.col.cost":"Cost","usage.col.tools":"Tools","filter.modelLabel":"Model","filter.projectLabel":"Project","filter.modelAll":"Model: All","filter.projectAll":"Project: All","filter.modelSingle":"Model: {value}","filter.projectSingle":"Project: {value}","filter.modelMulti":"Model: {count}","filter.projectMulti":"Project: {count}","filter.clearAll":"Clear all","filter.noOptions":"No options","sessions.title":"Sessions","sessions.subtitle":"{count} sessions \xb7 sorted by most recent activity","sessions.col.session":"Session","sessions.col.project":"Project","sessions.col.models":"Model(s)","sessions.col.requests":"Requests","sessions.col.tokens":"Tokens","sessions.col.cost":"Cost","sessions.col.duration":"Duration","sessions.col.lastActivity":"Last activity","sessions.untitled":"Session {hash}","sessions.empty":"No sessions yet","session.kpi.requests":"Requests","session.kpi.totalTokens":"Total tokens","session.kpi.cost":"Cost","session.kpi.duration":"Duration","session.timeline.title":"Message timeline","session.timeline.desc":"In order; newest at the bottom","session.perMessage.title":"Per-message tokens","session.modelsInSession":"Models in this session","session.modelLine":"{requests} req \xb7 {tokens} tokens","session.token.in":"in","session.token.out":"out","session.token.cacheR":"cache r","session.token.cacheW":"cache w","projects.title":"Projects","projects.subtitle":"{count} projects \xb7 sorted by spend","projects.empty":"No projects yet","projects.stat.sessions":"Sessions","projects.stat.requests":"Requests","projects.stat.tokens":"Tokens","project.activity":"Activity (last 30 days)","project.sessions.title":"Sessions ({count})","models.title":"Models","models.subtitle":"{count} model(s) used in total","models.empty":"No model usage yet","models.share.cost":"Cost share","models.share.tokens":"Tokens share","models.share.cacheHit":"Cache hit","models.field.requests":"Requests","models.field.savedByCache":"Saved by cache","models.field.input1M":"Input / 1M","models.field.output1M":"Output / 1M","models.field.cacheRead1M":"Cache read / 1M","models.field.pctOfTotal":"{pct} of total spend \xb7 {tokens} tokens","models.eachTrend":"Combined trend (last 30 days)","settings.title":"Settings","settings.subtitle":"Data sources, pricing, and behavior","settings.dataSources.title":"Data sources","settings.dataSources.desc":"ccgauge scans these locations for JSONL files","settings.dataSources.active":"active","settings.dataSources.notPresent":"not present","settings.dataSources.envHint":"Override with {env1} or {env2} environment variables (the dashboard appends {appendix}).","settings.rescan":"Rescan now","settings.rescanning":"Rescanning…","settings.scanStats.title":"Scan stats","settings.scanStats.files":"Files scanned","settings.scanStats.records":"Records parsed","settings.scanStats.assistant":"Assistant records (deduped)","settings.scanStats.duration":"Scan duration","settings.pricing.title":"Pricing table","settings.pricing.desc":"USD per 1M tokens \xb7 built-in snapshot, fuzzy match for date-suffixed model names","settings.pricing.col.model":"Model","settings.pricing.col.input":"Input","settings.pricing.col.output":"Output","settings.pricing.col.write5m":"Cache write 5m","settings.pricing.col.write1h":"Cache write 1h","settings.pricing.col.read":"Cache read","settings.preferences.title":"Preferences","settings.preferences.language":"Language","settings.preferences.theme":"Theme","settings.theme.light":"Light","settings.theme.dark":"Dark","settings.theme.system":"System","settings.about.title":"About","settings.about.subtitle":"Version {version} \xb7 MIT licensed","settings.about.line1":"Fully local: data never leaves your machine; no telemetry, no network calls.","settings.about.line2":"Read-only: ccgauge only reads JSONL files, never writes back to ~/.claude.","settings.about.line3":'Cache: scan results are memoized for 5s; click "Rescan" to force a fresh read.',"settings.about.line4":"Stop with Ctrl+C in the terminal that started ccgauge.","lang.label":"Language","lang.en":"English","lang.zh":"中文","theme.label":"Theme"},zh:{"brand.tagline":"Claude Code 用量看板","nav.overview":"概览","nav.usage":"用量","nav.sessions":"会话","nav.projects":"项目","nav.models":"模型","nav.settings":"设置","nav.localBadge":"本地","common.requests":"次请求","common.tokens":"tokens","common.cost":"花费","common.savedViaCache":"通过缓存节省 {amount}","common.savedTodayViaCache":"今日缓存节省 {amount}","common.live":"进行中","common.allModels":"全部","common.allProjects":"全部","common.unknown":"(未知)","common.session":"会话","common.sessions":"个会话","common.projects":"个项目","common.req":"请求","common.day":"天","common.days":"天","common.activity":"活跃","common.fallbackPrice":"使用兜底单价","common.thinking":"思考","common.lastActivity":"最近活跃","common.empty.title":"暂无用量数据","common.empty.desc":"打开 Claude Code 发送一条消息后刷新本页。","common.refresh":"刷新","common.search":"搜索…","common.searchPlaceholder":"搜索模型 / 项目 / 会话 / 工具…","common.exportCsv":"导出 CSV","common.rows":"{count} 行","common.prev":"‹ 上一页","common.next":"下一页 ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"第 {page} / {total} 页","common.allSessions":"← 返回会话列表","common.allProjectsLink":"← 返回项目列表","common.noMatchingRows":"没有匹配的记录","range.today":"今天","range.7d":"7 天","range.30d":"30 天","range.90d":"90 天","range.all":"全部","gran.hour":"小时","gran.day":"天","gran.week":"周","gran.month":"月","overview.title":"概览","overview.subtitle":"{count} 次请求,覆盖 {files} 个文件 \xb7 扫描耗时 {ms}ms","overview.subtitle.empty":"已扫描 {dirs} 个目录。打开 Claude Code 发一条消息后刷新本页。","overview.empty.title":"暂无用量数据","overview.kpi.tokensToday":"今日 tokens","overview.kpi.costToday":"今日花费","overview.kpi.thisMonth":"本月累计","overview.kpi.cacheHit":"缓存命中率","overview.kpi.topModel":"主力模型","overview.kpi.activeSessions":"今日会话","overview.kpi.activeSessions.hint":"涉及 {count} 个项目","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} 次请求","overview.kpi.tokensToday.hint":"{count} 次请求","overview.kpi.topModel.hint":"本月成本占比 {pct}","overview.kpi.cacheHit.hint":"今日缓存节省 {amount}","overview.delta.title":"相比昨日","overview.trend.title":"Token 用量趋势","overview.trend.desc":"近 30 天 \xb7 按 token 类型堆叠","overview.trend.activeDays":"{n} 天有数据","overview.trend.activeDays.plural":"{n} 天有数据","overview.costByModel.title":"按模型成本分布","overview.costByModel.desc":"本月,按花费排序","block.title":"当前 5h block","block.remaining":"剩余","block.elapsed":"已用 {pct}%","block.tokensSuffix":"tokens","block.spentSoFar":"已花费","block.burnPerMin":"每分钟消耗","block.projectedTotal":"预计总花费","block.requests":"请求数","block.empty":"当前无活跃 block","block.emptyDesc":"在 Claude Code 中发送消息会启动一个新 block。","chart.legend.input":"输入","chart.legend.output":"输出","chart.legend.cacheRead":"缓存读取","chart.legend.cacheWrite":"缓存写入","chart.tooltip.total":"合计","chart.tooltip.cost":"花费","chart.tooltip.requests":"请求数","chart.empty":"区间内无数据","chart.empty.short":"暂无数据","usage.title":"用量明细","usage.subtitle":"当前筛选范围内 {count} 轮对话","usage.kpi.totalTokens":"总 tokens","usage.kpi.totalCost":"总花费","usage.kpi.cacheSaved":"缓存节省","usage.kpi.cacheHit":"缓存命中","usage.trend":"趋势","usage.trend.gran":"粒度:{gran}","usage.requests.title":"对话轮次","usage.requests.desc":"每轮对话一行(用户消息 + 工具调用),点击 ▸ 展开明细","usage.col.calls":"调用","usage.col.userMessage":"提示","usage.turn.expand":"展开","usage.turn.collapse":"收起","usage.turn.callsCount":"{count} 次调用","usage.turn.noPrompt":"(无用户文本)","usage.col.time":"时间","usage.col.model":"模型","usage.col.project":"项目","usage.col.session":"会话","usage.col.input":"输入","usage.col.output":"输出","usage.col.cacheRead":"缓存读","usage.col.cacheWrite":"缓存写","usage.col.cost":"花费","usage.col.tools":"工具","filter.modelLabel":"模型","filter.projectLabel":"项目","filter.modelAll":"模型:全部","filter.projectAll":"项目:全部","filter.modelSingle":"模型:{value}","filter.projectSingle":"项目:{value}","filter.modelMulti":"模型:{count} 个","filter.projectMulti":"项目:{count} 个","filter.clearAll":"清除筛选","filter.noOptions":"没有可选项","sessions.title":"会话","sessions.subtitle":"共 {count} 个会话 \xb7 按最近活跃排序","sessions.col.session":"会话","sessions.col.project":"项目","sessions.col.models":"模型","sessions.col.requests":"请求数","sessions.col.tokens":"Tokens","sessions.col.cost":"花费","sessions.col.duration":"时长","sessions.col.lastActivity":"最近活跃","sessions.untitled":"会话 {hash}","sessions.empty":"暂无会话","session.kpi.requests":"请求数","session.kpi.totalTokens":"总 tokens","session.kpi.cost":"花费","session.kpi.duration":"时长","session.timeline.title":"消息时间线","session.timeline.desc":"按时间正序,最新的在最下方","session.perMessage.title":"逐条消息 tokens","session.modelsInSession":"本会话使用的模型","session.modelLine":"{requests} 次 \xb7 {tokens} tokens","session.token.in":"输入","session.token.out":"输出","session.token.cacheR":"缓存读","session.token.cacheW":"缓存写","projects.title":"项目","projects.subtitle":"共 {count} 个项目 \xb7 按花费排序","projects.empty":"暂无项目","projects.stat.sessions":"会话","projects.stat.requests":"请求","projects.stat.tokens":"Tokens","project.activity":"活跃情况(近 30 天)","project.sessions.title":"会话({count})","models.title":"模型","models.subtitle":"共使用过 {count} 个模型","models.empty":"暂无模型用量","models.share.cost":"成本占比","models.share.tokens":"Tokens 占比","models.share.cacheHit":"缓存命中","models.field.requests":"请求数","models.field.savedByCache":"缓存节省","models.field.input1M":"输入 / 1M","models.field.output1M":"输出 / 1M","models.field.cacheRead1M":"缓存读 / 1M","models.field.pctOfTotal":"占总花费 {pct} \xb7 {tokens} tokens","models.eachTrend":"整体趋势(近 30 天)","settings.title":"设置","settings.subtitle":"数据源、价格表与行为偏好","settings.dataSources.title":"数据源","settings.dataSources.desc":"ccgauge 会扫描以下路径的 JSONL 文件","settings.dataSources.active":"已启用","settings.dataSources.notPresent":"不存在","settings.dataSources.envHint":"可以通过环境变量 {env1} 或 {env2} 自定义路径(看板会自动追加 {appendix})。","settings.rescan":"立即重新扫描","settings.rescanning":"扫描中…","settings.scanStats.title":"扫描统计","settings.scanStats.files":"扫描文件数","settings.scanStats.records":"解析记录数","settings.scanStats.assistant":"去重后 assistant 记录","settings.scanStats.duration":"扫描耗时","settings.pricing.title":"价格表","settings.pricing.desc":"美元 / 1M tokens \xb7 内置快照,对带日期后缀的模型名做 fuzzy 匹配","settings.pricing.col.model":"模型","settings.pricing.col.input":"输入","settings.pricing.col.output":"输出","settings.pricing.col.write5m":"缓存写入 5 分钟","settings.pricing.col.write1h":"缓存写入 1 小时","settings.pricing.col.read":"缓存读取","settings.preferences.title":"偏好设置","settings.preferences.language":"语言","settings.preferences.theme":"主题","settings.theme.light":"亮色","settings.theme.dark":"暗色","settings.theme.system":"跟随系统","settings.about.title":"关于","settings.about.subtitle":"版本 {version} \xb7 MIT 协议","settings.about.line1":"完全本地:数据从不离开你的机器,没有任何遥测、没有任何网络调用。","settings.about.line2":"只读:ccgauge 只读取 JSONL,绝不会写回 ~/.claude。","settings.about.line3":'缓存:扫描结果会缓存 5 秒;点击"重新扫描"可强制刷新。',"settings.about.line4":"在启动 ccgauge 的终端按 Ctrl+C 即可停止。","lang.label":"语言","lang.en":"English","lang.zh":"中文","theme.label":"主题"}};function f(a,b,c){let d=e[a]?.[b];if(void 0===d&&(d=e.en[b]),void 0===d&&(d=b),c)for(let[a,b]of Object.entries(c))d=d.replace(RegExp(`\\{${a}\\}`,"g"),String(b));return d}},31236:(a,b,c)=>{"use strict";c.d(b,{LanguageSwitcher:()=>k});var d=c(11581),e=c(89864),f=c(32838),g=c(75688),h=c(57176);let i={en:"EN",zh:"中"},j={en:"English",zh:"中文"};function k(){let{locale:a,setLocale:b,t:c}=(0,f.s9)(),[k,l]=(0,e.useState)(!1),m=(0,e.useRef)(null);return(0,d.jsxs)("div",{ref:m,className:"relative",children:[(0,d.jsx)("button",{onClick:()=>l(!k),className:"btn-ghost px-2 py-1 text-xs font-medium",title:c("lang.label"),"aria-label":c("lang.label"),children:i[a]}),k&&(0,d.jsx)("div",{className:"absolute right-0 mt-1 min-w-[8rem] card border-border-hi shadow-lg p-1 z-30",children:g.YZ.map(c=>(0,d.jsxs)("button",{onClick:()=>{b(c),l(!1)},className:(0,h.cn)("w-full text-left px-2.5 py-1.5 text-sm rounded hover:bg-bg-surface-hi flex items-center gap-2",a===c&&"text-text-primary"),children:[(0,d.jsx)("span",{className:(0,h.cn)("w-3.5 h-3.5 rounded-sm border flex items-center justify-center text-[10px]",a===c?"bg-brand border-brand text-white":"border-border-hi"),children:a===c?"✓":""}),(0,d.jsx)("span",{children:j[c]})]},c))})]})}},32838:(a,b,c)=>{"use strict";c.d(b,{CY:()=>i,s9:()=>j,kj:()=>k});var d=c(11581),e=c(89864),f=c(33479),g=c(75688);let h=(0,e.createContext)({locale:g.Xn,setLocale:()=>{},t:a=>a});function i({initialLocale:a,children:b}){let c=(0,f.useRouter)(),i=(0,e.useCallback)(a=>{try{localStorage.setItem("ccgauge.locale",a)}catch{}document.cookie=`ccgauge_locale=${a}; path=/; max-age=31536000; SameSite=Lax`,c.refresh()},[c]),j=(0,e.useCallback)((b,c)=>(0,g.nA)(a,b,c),[a]),k=(0,e.useMemo)(()=>({locale:a,setLocale:i,t:j}),[a,i,j]);return(0,d.jsx)(h.Provider,{value:k,children:b})}function j(){return(0,e.useContext)(h)}function k(){return(0,e.useContext)(h).t}},32966:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,41053,23)),Promise.resolve().then(c.t.bind(c,47812,23)),Promise.resolve().then(c.t.bind(c,50954,23)),Promise.resolve().then(c.t.bind(c,12493,23)),Promise.resolve().then(c.t.bind(c,99961,23)),Promise.resolve().then(c.t.bind(c,44865,23)),Promise.resolve().then(c.t.bind(c,91307,23)),Promise.resolve().then(c.t.bind(c,89684,23)),Promise.resolve().then(c.bind(c,69977))},41214:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,57535,23)),Promise.resolve().then(c.t.bind(c,97262,23)),Promise.resolve().then(c.t.bind(c,70184,23)),Promise.resolve().then(c.t.bind(c,66623,23)),Promise.resolve().then(c.t.bind(c,76983,23)),Promise.resolve().then(c.t.bind(c,43199,23)),Promise.resolve().then(c.t.bind(c,32313,23)),Promise.resolve().then(c.t.bind(c,43462,23)),Promise.resolve().then(c.t.bind(c,60367,23))},44119:(a,b,c)=>{"use strict";c.d(b,{sG:()=>f,yO:()=>g});var d=c(65129),e=c(28806);async function f(){try{let a=await (0,d.UL)(),b=a.get("ccgauge_locale")?.value;if("zh"===b||"en"===b)return b}catch{}return e.Xn}async function g(){let a=await f();return(b,c)=>(0,e.nA)(a,b,c)}},49902:(a,b,c)=>{"use strict";c.d(b,{Providers:()=>d});let d=(0,c(58979).registerClientReference)(function(){throw Error("Attempted to call Providers() from the server but Providers 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.")},"/Users/zuopeng.cheng/personal/workspace/ccgauge/components/providers.tsx","Providers")},57176:(a,b,c)=>{"use strict";c.d(b,{BC:()=>n,P6:()=>o,PJ:()=>m,R8:()=>j,az:()=>h,cn:()=>f,jh:()=>g,l7:()=>i,om:()=>k,r6:()=>l});var d=c(45301),e=c(86981);function f(...a){return(0,e.QP)((0,d.$)(a))}function g(a){return Number.isFinite(a)?a>=1e9?(a/1e9).toFixed(2)+"B":a>=1e6?(a/1e6).toFixed(2)+"M":a>=1e3?(a/1e3).toFixed(1)+"K":new Intl.NumberFormat("en-US",{maximumFractionDigits:(void 0)??0}).format(a):"0"}function h(a,b){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:b?.minFrac??2,maximumFractionDigits:b?.maxFrac??2}).format(a)}function i(a){return 0===a?"$0":a<.01?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:4,maximumFractionDigits:6}).format(a):h(a)}function j(a,b=1){return Number.isFinite(a)?`${(100*a).toFixed(b)}%`:"0%"}function k(a){let b="string"==typeof a||"number"==typeof a?new Date(a):a,c=Date.now()-b.getTime();if(c<0)return"just now";let d=Math.floor(c/1e3);if(d<60)return`${d}s ago`;let e=Math.floor(d/60);if(e<60)return`${e}m ago`;let f=Math.floor(e/60);if(f<24)return`${f}h ago`;let g=Math.floor(f/24);if(g<7)return`${g}d ago`;let h=Math.floor(g/7);if(h<5)return`${h}w ago`;let i=Math.floor(g/30);return i<12?`${i}mo ago`:`${Math.floor(g/365)}y ago`}function l(a){let b="string"==typeof a||"number"==typeof a?new Date(a):a;if(Number.isNaN(b.getTime()))return"";let c=b.getFullYear(),d=String(b.getMonth()+1).padStart(2,"0"),e=String(b.getDate()).padStart(2,"0"),f=String(b.getHours()).padStart(2,"0"),g=String(b.getMinutes()).padStart(2,"0");return`${c}-${d}-${e} ${f}:${g}`}function m(a){if(!a)return"(unknown)";let b=a.replace(/\/+$/,"").split("/");return b[b.length-1]||a}function n(a,b=8){return a?a.replace(/-/g,"").slice(0,b):""}function o(a){if(!a)return"(unknown)";let b=a.replace(/-(\d{8})$/,"").replace(/^(vertex_ai|bedrock|anthropic)\//,""),c=(b=b.replace(/^claude-/,"")).split("-");if(c.length>=2){let a=c[0],b=c.slice(1).join(".");return p(a)+" "+b}return p(b.replace(/-/g," "))}function p(a){return a.replace(/\b\w/g,a=>a.toUpperCase())}},66548:(a,b,c)=>{"use strict";c.d(b,{Providers:()=>g});var d=c(11581),e=c(32838),f=c(97304);function g({locale:a,theme:b,children:c}){return(0,d.jsx)(e.CY,{initialLocale:a,children:(0,d.jsx)(f.N,{initialTheme:b,children:c})})}},74369:(a,b,c)=>{Promise.resolve().then(c.bind(c,90639)),Promise.resolve().then(c.bind(c,49902))},75688:(a,b,c)=>{"use strict";c.d(b,{Xn:()=>e,YZ:()=>d,nA:()=>g});let d=["en","zh"],e="en",f={en:{"brand.tagline":"claude code dashboard","nav.overview":"Overview","nav.usage":"Usage","nav.sessions":"Sessions","nav.projects":"Projects","nav.models":"Models","nav.settings":"Settings","nav.localBadge":"local","common.requests":"requests","common.tokens":"tokens","common.cost":"Cost","common.savedViaCache":"Saved {amount} via cache","common.savedTodayViaCache":"Saved {amount} today","common.live":"live","common.allModels":"All","common.allProjects":"All","common.unknown":"(unknown)","common.session":"Session","common.sessions":"sessions","common.projects":"projects","common.req":"req","common.day":"day","common.days":"days","common.activity":"activity","common.fallbackPrice":"fallback price","common.thinking":"thinking","common.lastActivity":"last activity","common.empty.title":"No usage data yet","common.empty.desc":"Open Claude Code, send a message, then refresh.","common.refresh":"Refresh","common.search":"Search…","common.searchPlaceholder":"Search model, project, session, tool…","common.exportCsv":"Export CSV","common.rows":"{count} rows","common.prev":"‹ Prev","common.next":"Next ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"Page {page} of {total}","common.allSessions":"← All sessions","common.allProjectsLink":"← All projects","common.noMatchingRows":"No matching rows","range.today":"Today","range.7d":"7d","range.30d":"30d","range.90d":"90d","range.all":"All","gran.hour":"Hour","gran.day":"Day","gran.week":"Week","gran.month":"Month","overview.title":"Overview","overview.subtitle":"{count} requests across {files} files \xb7 scan in {ms}ms","overview.subtitle.empty":"Scanned {dirs} directory(ies). Open Claude Code, send a message, then refresh.","overview.empty.title":"No usage data yet","overview.kpi.tokensToday":"Tokens today","overview.kpi.costToday":"Cost today","overview.kpi.thisMonth":"This month","overview.kpi.cacheHit":"Cache hit rate","overview.kpi.topModel":"Top model","overview.kpi.activeSessions":"Sessions today","overview.kpi.activeSessions.hint":"{count} project(s)","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} req","overview.kpi.tokensToday.hint":"{count} requests","overview.kpi.topModel.hint":"{pct} of cost this month","overview.kpi.cacheHit.hint":"Saved {amount} today","overview.delta.title":"vs yesterday","overview.trend.title":"Token usage trend","overview.trend.desc":"Last 30 days \xb7 stacked by token type","overview.trend.activeDays":"{n} day with activity","overview.trend.activeDays.plural":"{n} days with activity","overview.costByModel.title":"Cost by model","overview.costByModel.desc":"This month, sorted by spend","block.title":"Active 5h block","block.remaining":"remaining","block.elapsed":"{pct}% elapsed","block.tokensSuffix":"tokens","block.spentSoFar":"Spent so far","block.burnPerMin":"Burn / min","block.projectedTotal":"Projected total","block.requests":"Requests","block.empty":"No active block","block.emptyDesc":"Send a message in Claude Code to start one.","chart.legend.input":"Input","chart.legend.output":"Output","chart.legend.cacheRead":"Cache read","chart.legend.cacheWrite":"Cache write","chart.tooltip.total":"Total","chart.tooltip.cost":"Cost","chart.tooltip.requests":"Requests","chart.empty":"No data in this range","chart.empty.short":"No data","usage.title":"Usage","usage.subtitle":"{count} turns in selected range","usage.col.calls":"Calls","usage.col.userMessage":"Prompt","usage.turn.expand":"Expand","usage.turn.collapse":"Collapse","usage.turn.callsCount":"{count} calls","usage.turn.noPrompt":"(no user text)","usage.requests.desc":"One row per turn (user message + tool calls); click ▸ to expand","usage.kpi.totalTokens":"Total tokens","usage.kpi.totalCost":"Total cost","usage.kpi.cacheSaved":"Cache saved","usage.kpi.cacheHit":"Cache hit","usage.trend":"Trend","usage.trend.gran":"Granularity: {gran}","usage.requests.title":"Requests","usage.col.time":"Time","usage.col.model":"Model","usage.col.project":"Project","usage.col.session":"Session","usage.col.input":"Input","usage.col.output":"Output","usage.col.cacheRead":"Cache R","usage.col.cacheWrite":"Cache W","usage.col.cost":"Cost","usage.col.tools":"Tools","filter.modelLabel":"Model","filter.projectLabel":"Project","filter.modelAll":"Model: All","filter.projectAll":"Project: All","filter.modelSingle":"Model: {value}","filter.projectSingle":"Project: {value}","filter.modelMulti":"Model: {count}","filter.projectMulti":"Project: {count}","filter.clearAll":"Clear all","filter.noOptions":"No options","sessions.title":"Sessions","sessions.subtitle":"{count} sessions \xb7 sorted by most recent activity","sessions.col.session":"Session","sessions.col.project":"Project","sessions.col.models":"Model(s)","sessions.col.requests":"Requests","sessions.col.tokens":"Tokens","sessions.col.cost":"Cost","sessions.col.duration":"Duration","sessions.col.lastActivity":"Last activity","sessions.untitled":"Session {hash}","sessions.empty":"No sessions yet","session.kpi.requests":"Requests","session.kpi.totalTokens":"Total tokens","session.kpi.cost":"Cost","session.kpi.duration":"Duration","session.timeline.title":"Message timeline","session.timeline.desc":"In order; newest at the bottom","session.perMessage.title":"Per-message tokens","session.modelsInSession":"Models in this session","session.modelLine":"{requests} req \xb7 {tokens} tokens","session.token.in":"in","session.token.out":"out","session.token.cacheR":"cache r","session.token.cacheW":"cache w","projects.title":"Projects","projects.subtitle":"{count} projects \xb7 sorted by spend","projects.empty":"No projects yet","projects.stat.sessions":"Sessions","projects.stat.requests":"Requests","projects.stat.tokens":"Tokens","project.activity":"Activity (last 30 days)","project.sessions.title":"Sessions ({count})","models.title":"Models","models.subtitle":"{count} model(s) used in total","models.empty":"No model usage yet","models.share.cost":"Cost share","models.share.tokens":"Tokens share","models.share.cacheHit":"Cache hit","models.field.requests":"Requests","models.field.savedByCache":"Saved by cache","models.field.input1M":"Input / 1M","models.field.output1M":"Output / 1M","models.field.cacheRead1M":"Cache read / 1M","models.field.pctOfTotal":"{pct} of total spend \xb7 {tokens} tokens","models.eachTrend":"Combined trend (last 30 days)","settings.title":"Settings","settings.subtitle":"Data sources, pricing, and behavior","settings.dataSources.title":"Data sources","settings.dataSources.desc":"ccgauge scans these locations for JSONL files","settings.dataSources.active":"active","settings.dataSources.notPresent":"not present","settings.dataSources.envHint":"Override with {env1} or {env2} environment variables (the dashboard appends {appendix}).","settings.rescan":"Rescan now","settings.rescanning":"Rescanning…","settings.scanStats.title":"Scan stats","settings.scanStats.files":"Files scanned","settings.scanStats.records":"Records parsed","settings.scanStats.assistant":"Assistant records (deduped)","settings.scanStats.duration":"Scan duration","settings.pricing.title":"Pricing table","settings.pricing.desc":"USD per 1M tokens \xb7 built-in snapshot, fuzzy match for date-suffixed model names","settings.pricing.col.model":"Model","settings.pricing.col.input":"Input","settings.pricing.col.output":"Output","settings.pricing.col.write5m":"Cache write 5m","settings.pricing.col.write1h":"Cache write 1h","settings.pricing.col.read":"Cache read","settings.preferences.title":"Preferences","settings.preferences.language":"Language","settings.preferences.theme":"Theme","settings.theme.light":"Light","settings.theme.dark":"Dark","settings.theme.system":"System","settings.about.title":"About","settings.about.subtitle":"Version {version} \xb7 MIT licensed","settings.about.line1":"Fully local: data never leaves your machine; no telemetry, no network calls.","settings.about.line2":"Read-only: ccgauge only reads JSONL files, never writes back to ~/.claude.","settings.about.line3":'Cache: scan results are memoized for 5s; click "Rescan" to force a fresh read.',"settings.about.line4":"Stop with Ctrl+C in the terminal that started ccgauge.","lang.label":"Language","lang.en":"English","lang.zh":"中文","theme.label":"Theme"},zh:{"brand.tagline":"Claude Code 用量看板","nav.overview":"概览","nav.usage":"用量","nav.sessions":"会话","nav.projects":"项目","nav.models":"模型","nav.settings":"设置","nav.localBadge":"本地","common.requests":"次请求","common.tokens":"tokens","common.cost":"花费","common.savedViaCache":"通过缓存节省 {amount}","common.savedTodayViaCache":"今日缓存节省 {amount}","common.live":"进行中","common.allModels":"全部","common.allProjects":"全部","common.unknown":"(未知)","common.session":"会话","common.sessions":"个会话","common.projects":"个项目","common.req":"请求","common.day":"天","common.days":"天","common.activity":"活跃","common.fallbackPrice":"使用兜底单价","common.thinking":"思考","common.lastActivity":"最近活跃","common.empty.title":"暂无用量数据","common.empty.desc":"打开 Claude Code 发送一条消息后刷新本页。","common.refresh":"刷新","common.search":"搜索…","common.searchPlaceholder":"搜索模型 / 项目 / 会话 / 工具…","common.exportCsv":"导出 CSV","common.rows":"{count} 行","common.prev":"‹ 上一页","common.next":"下一页 ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"第 {page} / {total} 页","common.allSessions":"← 返回会话列表","common.allProjectsLink":"← 返回项目列表","common.noMatchingRows":"没有匹配的记录","range.today":"今天","range.7d":"7 天","range.30d":"30 天","range.90d":"90 天","range.all":"全部","gran.hour":"小时","gran.day":"天","gran.week":"周","gran.month":"月","overview.title":"概览","overview.subtitle":"{count} 次请求,覆盖 {files} 个文件 \xb7 扫描耗时 {ms}ms","overview.subtitle.empty":"已扫描 {dirs} 个目录。打开 Claude Code 发一条消息后刷新本页。","overview.empty.title":"暂无用量数据","overview.kpi.tokensToday":"今日 tokens","overview.kpi.costToday":"今日花费","overview.kpi.thisMonth":"本月累计","overview.kpi.cacheHit":"缓存命中率","overview.kpi.topModel":"主力模型","overview.kpi.activeSessions":"今日会话","overview.kpi.activeSessions.hint":"涉及 {count} 个项目","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} 次请求","overview.kpi.tokensToday.hint":"{count} 次请求","overview.kpi.topModel.hint":"本月成本占比 {pct}","overview.kpi.cacheHit.hint":"今日缓存节省 {amount}","overview.delta.title":"相比昨日","overview.trend.title":"Token 用量趋势","overview.trend.desc":"近 30 天 \xb7 按 token 类型堆叠","overview.trend.activeDays":"{n} 天有数据","overview.trend.activeDays.plural":"{n} 天有数据","overview.costByModel.title":"按模型成本分布","overview.costByModel.desc":"本月,按花费排序","block.title":"当前 5h block","block.remaining":"剩余","block.elapsed":"已用 {pct}%","block.tokensSuffix":"tokens","block.spentSoFar":"已花费","block.burnPerMin":"每分钟消耗","block.projectedTotal":"预计总花费","block.requests":"请求数","block.empty":"当前无活跃 block","block.emptyDesc":"在 Claude Code 中发送消息会启动一个新 block。","chart.legend.input":"输入","chart.legend.output":"输出","chart.legend.cacheRead":"缓存读取","chart.legend.cacheWrite":"缓存写入","chart.tooltip.total":"合计","chart.tooltip.cost":"花费","chart.tooltip.requests":"请求数","chart.empty":"区间内无数据","chart.empty.short":"暂无数据","usage.title":"用量明细","usage.subtitle":"当前筛选范围内 {count} 轮对话","usage.kpi.totalTokens":"总 tokens","usage.kpi.totalCost":"总花费","usage.kpi.cacheSaved":"缓存节省","usage.kpi.cacheHit":"缓存命中","usage.trend":"趋势","usage.trend.gran":"粒度:{gran}","usage.requests.title":"对话轮次","usage.requests.desc":"每轮对话一行(用户消息 + 工具调用),点击 ▸ 展开明细","usage.col.calls":"调用","usage.col.userMessage":"提示","usage.turn.expand":"展开","usage.turn.collapse":"收起","usage.turn.callsCount":"{count} 次调用","usage.turn.noPrompt":"(无用户文本)","usage.col.time":"时间","usage.col.model":"模型","usage.col.project":"项目","usage.col.session":"会话","usage.col.input":"输入","usage.col.output":"输出","usage.col.cacheRead":"缓存读","usage.col.cacheWrite":"缓存写","usage.col.cost":"花费","usage.col.tools":"工具","filter.modelLabel":"模型","filter.projectLabel":"项目","filter.modelAll":"模型:全部","filter.projectAll":"项目:全部","filter.modelSingle":"模型:{value}","filter.projectSingle":"项目:{value}","filter.modelMulti":"模型:{count} 个","filter.projectMulti":"项目:{count} 个","filter.clearAll":"清除筛选","filter.noOptions":"没有可选项","sessions.title":"会话","sessions.subtitle":"共 {count} 个会话 \xb7 按最近活跃排序","sessions.col.session":"会话","sessions.col.project":"项目","sessions.col.models":"模型","sessions.col.requests":"请求数","sessions.col.tokens":"Tokens","sessions.col.cost":"花费","sessions.col.duration":"时长","sessions.col.lastActivity":"最近活跃","sessions.untitled":"会话 {hash}","sessions.empty":"暂无会话","session.kpi.requests":"请求数","session.kpi.totalTokens":"总 tokens","session.kpi.cost":"花费","session.kpi.duration":"时长","session.timeline.title":"消息时间线","session.timeline.desc":"按时间正序,最新的在最下方","session.perMessage.title":"逐条消息 tokens","session.modelsInSession":"本会话使用的模型","session.modelLine":"{requests} 次 \xb7 {tokens} tokens","session.token.in":"输入","session.token.out":"输出","session.token.cacheR":"缓存读","session.token.cacheW":"缓存写","projects.title":"项目","projects.subtitle":"共 {count} 个项目 \xb7 按花费排序","projects.empty":"暂无项目","projects.stat.sessions":"会话","projects.stat.requests":"请求","projects.stat.tokens":"Tokens","project.activity":"活跃情况(近 30 天)","project.sessions.title":"会话({count})","models.title":"模型","models.subtitle":"共使用过 {count} 个模型","models.empty":"暂无模型用量","models.share.cost":"成本占比","models.share.tokens":"Tokens 占比","models.share.cacheHit":"缓存命中","models.field.requests":"请求数","models.field.savedByCache":"缓存节省","models.field.input1M":"输入 / 1M","models.field.output1M":"输出 / 1M","models.field.cacheRead1M":"缓存读 / 1M","models.field.pctOfTotal":"占总花费 {pct} \xb7 {tokens} tokens","models.eachTrend":"整体趋势(近 30 天)","settings.title":"设置","settings.subtitle":"数据源、价格表与行为偏好","settings.dataSources.title":"数据源","settings.dataSources.desc":"ccgauge 会扫描以下路径的 JSONL 文件","settings.dataSources.active":"已启用","settings.dataSources.notPresent":"不存在","settings.dataSources.envHint":"可以通过环境变量 {env1} 或 {env2} 自定义路径(看板会自动追加 {appendix})。","settings.rescan":"立即重新扫描","settings.rescanning":"扫描中…","settings.scanStats.title":"扫描统计","settings.scanStats.files":"扫描文件数","settings.scanStats.records":"解析记录数","settings.scanStats.assistant":"去重后 assistant 记录","settings.scanStats.duration":"扫描耗时","settings.pricing.title":"价格表","settings.pricing.desc":"美元 / 1M tokens \xb7 内置快照,对带日期后缀的模型名做 fuzzy 匹配","settings.pricing.col.model":"模型","settings.pricing.col.input":"输入","settings.pricing.col.output":"输出","settings.pricing.col.write5m":"缓存写入 5 分钟","settings.pricing.col.write1h":"缓存写入 1 小时","settings.pricing.col.read":"缓存读取","settings.preferences.title":"偏好设置","settings.preferences.language":"语言","settings.preferences.theme":"主题","settings.theme.light":"亮色","settings.theme.dark":"暗色","settings.theme.system":"跟随系统","settings.about.title":"关于","settings.about.subtitle":"版本 {version} \xb7 MIT 协议","settings.about.line1":"完全本地:数据从不离开你的机器,没有任何遥测、没有任何网络调用。","settings.about.line2":"只读:ccgauge 只读取 JSONL,绝不会写回 ~/.claude。","settings.about.line3":'缓存:扫描结果会缓存 5 秒;点击"重新扫描"可强制刷新。',"settings.about.line4":"在启动 ccgauge 的终端按 Ctrl+C 即可停止。","lang.label":"语言","lang.en":"English","lang.zh":"中文","theme.label":"主题"}};function g(a,b,c){let d=f[a]?.[b];if(void 0===d&&(d=f.en[b]),void 0===d&&(d=b),c)for(let[a,b]of Object.entries(c))d=d.replace(RegExp(`\\{${a}\\}`,"g"),String(b));return d}},87521:(a,b,c)=>{Promise.resolve().then(c.bind(c,97273)),Promise.resolve().then(c.bind(c,66548))},90639:(a,b,c)=>{"use strict";c.d(b,{Nav:()=>d});let d=(0,c(58979).registerClientReference)(function(){throw Error("Attempted to call Nav() from the server but Nav 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.")},"/Users/zuopeng.cheng/personal/workspace/ccgauge/components/nav.tsx","Nav")},97273:(a,b,c)=>{"use strict";c.d(b,{Nav:()=>m});var d=c(11581),e=c(3024),f=c.n(e),g=c(33479),h=c(57176),i=c(32838),j=c(31236),k=c(24713);let l=[{href:"/",tk:"nav.overview",exact:!0},{href:"/usage",tk:"nav.usage"},{href:"/sessions",tk:"nav.sessions"},{href:"/projects",tk:"nav.projects"},{href:"/models",tk:"nav.models"},{href:"/settings",tk:"nav.settings"}];function m(){let a=(0,g.usePathname)(),b=(0,i.kj)();return(0,d.jsx)("header",{className:"sticky top-0 z-30 border-b border-border bg-bg-base/80 backdrop-blur",children:(0,d.jsxs)("div",{className:"max-w-7xl mx-auto px-6 h-14 flex items-center gap-4",children:[(0,d.jsxs)(f(),{href:"/",className:"flex items-center gap-2 font-semibold tracking-tight whitespace-nowrap",children:[(0,d.jsx)("span",{className:"inline-flex items-center justify-center w-7 h-7 rounded-button bg-brand text-white text-xs font-bold",children:"cc"}),(0,d.jsx)("span",{children:"ccgauge"}),(0,d.jsx)("span",{className:"text-xs text-text-tertiary font-normal hidden md:inline",children:b("brand.tagline")})]}),(0,d.jsx)("nav",{className:"flex-1 flex items-center gap-1",children:l.map(c=>{let e=c.exact?a===c.href:a===c.href||a.startsWith(c.href+"/");return(0,d.jsx)(f(),{href:c.href,className:(0,h.cn)("px-3 py-1.5 text-sm rounded-button font-medium transition-colors",e?"text-text-primary bg-bg-surface-hi":"text-text-secondary hover:text-text-primary hover:bg-bg-surface"),children:b(c.tk)},c.href)})}),(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"pill bg-bg-surface-hi text-text-tertiary text-[10px] uppercase tracking-wide",children:b("nav.localBadge")}),(0,d.jsx)(j.LanguageSwitcher,{}),(0,d.jsx)(k.ThemeSwitcher,{})]})]})})}},97304:(a,b,c)=>{"use strict";c.d(b,{N:()=>h,D:()=>i});var d=c(11581),e=c(89864);let f=(0,e.createContext)({theme:"system",resolved:"dark",setTheme:()=>{}});function g(a){return"light"===a?"light":"dark"}function h({initialTheme:a,children:b}){let[c,h]=(0,e.useState)(a),[i,j]=(0,e.useState)(()=>"system"===a?"dark":a),k=(0,e.useCallback)(a=>{try{localStorage.setItem("ccgauge.theme",a)}catch{}document.cookie=`ccgauge_theme=${a}; path=/; max-age=31536000; SameSite=Lax`,h(a),j(g(a)),function(a){if("undefined"==typeof document)return;let b=document.documentElement,c=g(a);b.classList.remove("theme-light","theme-dark"),b.classList.add("light"===c?"theme-light":"theme-dark"),b.setAttribute("data-theme",c)}(a)},[]);return(0,d.jsx)(f.Provider,{value:{theme:c,resolved:i,setTheme:k},children:b})}function i(){return(0,e.useContext)(f)}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=328,exports.ids=[328],exports.modules={23819:(a,b,c)=>{c.d(b,{Q:()=>i,n:()=>f});var d=c(80707),e=c(36118);function f({label:a,value:b,hint:c,delta:f,deltaTitle:i,progress:j,accent:k="default",className:l}){return(0,d.jsxs)("div",{className:(0,e.cn)("card card-pad flex flex-col gap-2 min-h-[128px] transition-colors","brand"===k&&"border-brand/30","success"===k&&"border-success/30","warning"===k&&"border-warning/30",l),children:[(0,d.jsx)("div",{className:"label",children:a}),(0,d.jsxs)("div",{className:"flex items-baseline gap-2 flex-wrap",children:[(0,d.jsx)("div",{className:"num-hero",children:b}),f&&Number.isFinite(f.value)&&(0,d.jsx)(g,{value:f.value,positiveIsGood:f.positiveIsGood,title:i})]}),c&&(0,d.jsx)("div",{className:"text-xs text-text-secondary mt-auto leading-snug",children:c}),j&&(0,d.jsx)("div",{className:"mt-auto pt-2",children:(0,d.jsx)(h,{value:j.value,tone:j.tone})})]})}function g({value:a,positiveIsGood:b=!0,title:c}){let f=a>=0;return(0,d.jsxs)("span",{className:(0,e.cn)("pill text-[11px] font-medium whitespace-nowrap",f===b?"text-success bg-success/10":"text-danger bg-danger/10"),title:c,children:[f?"↑":"↓"," ",Math.abs(a).toFixed(0),"%"]})}function h({value:a,tone:b="brand"}){let c=Math.max(0,Math.min(1,a));return(0,d.jsx)("div",{className:"h-1.5 w-full bg-bg-surface-hi rounded-full overflow-hidden",children:(0,d.jsx)("div",{className:(0,e.cn)("h-full rounded-full transition-all",{brand:"bg-brand",success:"bg-success",warning:"bg-warning",danger:"bg-danger"}[b]),style:{width:`${100*c}%`}})})}function i(){return(0,d.jsxs)("div",{className:"card card-pad min-h-[128px] animate-pulse",children:[(0,d.jsx)("div",{className:"h-3 w-20 bg-bg-surface-hi rounded mb-3"}),(0,d.jsx)("div",{className:"h-8 w-32 bg-bg-surface-hi rounded mb-2"}),(0,d.jsx)("div",{className:"h-3 w-24 bg-bg-surface-hi rounded mt-auto"})]})}},26353:(a,b,c)=>{c.d(b,{pp:()=>h,qK:()=>g,wn:()=>f});var d=c(80707),e=c(36118);function f({title:a,desc:b,right:c,children:f,className:g}){return(0,d.jsxs)("section",{className:(0,e.cn)("card",g),children:[(a||c)&&(0,d.jsxs)("header",{className:"flex items-start justify-between gap-4 px-6 pt-5 pb-3 border-b border-border",children:[(0,d.jsxs)("div",{children:[a&&(0,d.jsx)("h2",{className:"text-base font-semibold text-text-primary tracking-tight",children:a}),b&&(0,d.jsx)("p",{className:"text-xs text-text-secondary mt-1",children:b})]}),c]}),(0,d.jsx)("div",{className:"p-6",children:f})]})}function g({title:a,desc:b,right:c,children:e}){return(0,d.jsxs)("div",{className:"max-w-7xl mx-auto px-6 py-8 space-y-6",children:[(0,d.jsxs)("div",{className:"flex items-end justify-between gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:a}),b&&(0,d.jsx)("p",{className:"text-sm text-text-secondary mt-1",children:b})]}),c]}),e]})}function h({title:a,desc:b}){return(0,d.jsxs)("div",{className:"card card-pad text-center py-16",children:[(0,d.jsx)("div",{className:"text-base font-medium text-text-secondary",children:a}),b&&(0,d.jsx)("div",{className:"text-sm text-text-tertiary mt-2",children:b})]})}},26803:(a,b,c)=>{c.d(b,{TokenStackChart:()=>d});let d=(0,c(58979).registerClientReference)(function(){throw Error("Attempted to call TokenStackChart() from the server but TokenStackChart 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.")},"/Users/zuopeng.cheng/personal/workspace/ccgauge/components/charts/token-stack-chart.tsx","TokenStackChart")},60969:(a,b,c)=>{c.d(b,{TokenStackChart:()=>o});var d=c(11581),e=c(28470),f=c(82516),g=c(89596),h=c(98711),i=c(98148),j=c(98583),k=c(90053),l=c(57176),m=c(32838);let n={input:"rgb(var(--chart-input))",output:"rgb(var(--chart-output))",cacheRead:"rgb(var(--chart-cache-read))",cacheCreation:"rgb(var(--chart-cache-create))"};function o({data:a,height:b="h-72"}){let c=(0,m.kj)();return a.length?(0,d.jsxs)("div",{className:`${b} w-full`,children:[(0,d.jsx)(e.u,{width:"100%",height:"100%",children:(0,d.jsxs)(f.E,{data:a,margin:{top:12,right:8,bottom:4,left:8},children:[(0,d.jsx)(g.d,{stroke:"rgb(var(--chart-grid))",strokeDasharray:"3 3",vertical:!1}),(0,d.jsx)(h.W,{dataKey:"label",tick:{fill:"rgb(var(--chart-axis))",fontSize:11},tickLine:!1,axisLine:{stroke:"rgb(var(--chart-grid))"},interval:"preserveStartEnd",minTickGap:32}),(0,d.jsx)(i.h,{tickFormatter:a=>(0,l.jh)(Number(a)),tick:{fill:"rgb(var(--chart-axis))",fontSize:11},tickLine:!1,axisLine:{stroke:"rgb(var(--chart-grid))"},width:56}),(0,d.jsx)(j.m,{content:(0,d.jsx)(q,{}),cursor:{fill:"rgb(var(--text-primary) / 0.04)"}}),(0,d.jsx)(k.y,{dataKey:"input",stackId:"a",fill:n.input,isAnimationActive:!1}),(0,d.jsx)(k.y,{dataKey:"cacheCreation",stackId:"a",fill:n.cacheCreation,isAnimationActive:!1}),(0,d.jsx)(k.y,{dataKey:"cacheRead",stackId:"a",fill:n.cacheRead,isAnimationActive:!1}),(0,d.jsx)(k.y,{dataKey:"output",stackId:"a",fill:n.output,radius:[3,3,0,0],isAnimationActive:!1})]})}),(0,d.jsxs)("div",{className:"flex items-center flex-wrap justify-center gap-4 text-xs text-text-secondary mt-2",children:[(0,d.jsx)(p,{color:n.input,label:c("chart.legend.input")}),(0,d.jsx)(p,{color:n.cacheCreation,label:c("chart.legend.cacheWrite")}),(0,d.jsx)(p,{color:n.cacheRead,label:c("chart.legend.cacheRead")}),(0,d.jsx)(p,{color:n.output,label:c("chart.legend.output")})]})]}):(0,d.jsx)("div",{className:`${b} flex items-center justify-center text-text-tertiary text-sm`,children:c("chart.empty")})}function p({color:a,label:b}){return(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm",style:{background:a}}),(0,d.jsx)("span",{children:b})]})}function q(a){let b=(0,m.kj)();if(!a.active||!a.payload||!a.payload.length)return null;let c=a.payload[0].payload,e=c.input+c.output+c.cacheRead+c.cacheCreation;return(0,d.jsxs)("div",{className:"card border-border-hi shadow-lg p-3 text-xs min-w-[200px]",children:[(0,d.jsx)("div",{className:"font-medium text-text-primary mb-2",children:a.label}),(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)(r,{color:n.input,label:b("chart.legend.input"),value:c.input}),(0,d.jsx)(r,{color:n.cacheCreation,label:b("chart.legend.cacheWrite"),value:c.cacheCreation}),(0,d.jsx)(r,{color:n.cacheRead,label:b("chart.legend.cacheRead"),value:c.cacheRead}),(0,d.jsx)(r,{color:n.output,label:b("chart.legend.output"),value:c.output})]}),(0,d.jsxs)("div",{className:"mt-2 pt-2 border-t border-border flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-text-secondary",children:b("chart.tooltip.total")}),(0,d.jsx)("span",{className:"num-mono text-text-primary",children:(0,l.jh)(e)})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,d.jsx)("span",{className:"text-text-secondary",children:b("chart.tooltip.cost")}),(0,d.jsx)("span",{className:"num-mono text-brand",children:(0,l.az)(c.cost)})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,d.jsx)("span",{className:"text-text-secondary",children:b("chart.tooltip.requests")}),(0,d.jsx)("span",{className:"num-mono text-text-primary",children:c.requests})]})]})}function r({color:a,label:b,value:c}){return(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-text-secondary",children:[(0,d.jsx)("span",{className:"w-2 h-2 rounded-sm",style:{background:a}}),b]}),(0,d.jsx)("span",{className:"num-mono text-text-primary",children:(0,l.jh)(c)})]})}},61528:(a,b,c)=>{c.d(b,{N0:()=>e,go:()=>f});var d=c(52546);function e(a){return a&&a.block?{hasBlock:!0,startTime:a.block.startTime,endTime:a.block.endTime,totalTokens:a.block.totalTokens,cost:a.block.cost,requests:a.block.requests,models:a.block.models,burnRatePerMin:a.burnRatePerMin,costPerMin:a.costPerMin,projectedTotal:a.projectedTotal,projectedCost:a.projectedCost}:{hasBlock:!1,totalTokens:0,cost:0,requests:0,models:[],burnRatePerMin:0,costPerMin:0,projectedTotal:0,projectedCost:0}}function f(a,b,c){let e=function(a,b,c){let d=new Map;for(let a of b)a.textPreview&&a.textPreview.trim()&&d.set(a.uuid,a.textPreview);let e=new Map,f=new Map;for(let b of a)e.set(b.uuid,function(a){let b=[],e=a,g=null,h=0,i=new Set;for(;e&&h++<5e3&&!i.has(e);){i.add(e);let a=f.get(e);if(a){g=a;break}if(b.push(e),d.has(e)){g=e;break}e=c[e]??null}for(let c of(g||(g=a),b))f.set(c,g);return g}(b.uuid));return e}(a,b,c),f=new Map;for(let a of b)f.set(a.uuid,a);let g=new Map,h=new Map;for(let b of a){let a=e.get(b.uuid)??b.uuid,c={uuid:b.uuid,timestamp:b.timestamp,model:b.model,cwd:b.cwd,sessionId:b.sessionId,inputTokens:b.usage.input_tokens,outputTokens:b.usage.output_tokens,cacheReadTokens:b.usage.cache_read_input_tokens,cacheCreationTokens:b.usage.cache_creation_input_tokens,cost:(0,d.SI)(b).total,toolNames:b.toolNames},f=g.get(a);f?f.push(c):g.set(a,[c]),h.has(a)||h.set(a,b)}let i=[];for(let[a,b]of g){b.sort((a,b)=>a.timestamp<b.timestamp?-1:1);let c=b[0],d=b[b.length-1],e=new Set,g=new Set,h=0,j=0,k=0,l=0,m=0;for(let a of b){for(let b of(e.add(a.model),a.toolNames))g.add(b);h+=a.inputTokens,j+=a.outputTokens,k+=a.cacheReadTokens,l+=a.cacheCreationTokens,m+=a.cost}let n=f.get(a);i.push({turnId:a,timestamp:c.timestamp,endTimestamp:d.timestamp,cwd:c.cwd,sessionId:c.sessionId,models:Array.from(e),callCount:b.length,inputTokens:h,outputTokens:j,cacheReadTokens:k,cacheCreationTokens:l,cost:m,toolNames:Array.from(g),userText:n?.textPreview??"",children:b})}return i.sort((a,b)=>a.endTimestamp<b.endTimestamp?1:-1),i}}};
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "version": 1,
3
3
  "functions": {
4
- "/api/pricing": {},
5
4
  "/api/blocks": {},
6
- "/api/sessions": {},
7
- "/api/projects": {},
5
+ "/api/pricing": {},
6
+ "/api/usage": {},
8
7
  "/api/scan": {},
9
- "/api/usage": {}
8
+ "/api/sessions": {},
9
+ "/api/projects": {}
10
10
  }
11
11
  }
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-3baaf554c753fcb4.js" defer=""></script><script src="/_next/static/chunks/framework-84e0387bd8faf417.js" defer=""></script><script src="/_next/static/chunks/main-6f5662bdfaa5fe91.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d7128dbe272f92f3.js" defer=""></script><script src="/_next/static/chunks/pages/_error-da2eb543ee7861b0.js" defer=""></script><script src="/_next/static/wbc6_C4wOzvneKldidsp7/_buildManifest.js" defer=""></script><script src="/_next/static/wbc6_C4wOzvneKldidsp7/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"wbc6_C4wOzvneKldidsp7","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-3baaf554c753fcb4.js" defer=""></script><script src="/_next/static/chunks/framework-84e0387bd8faf417.js" defer=""></script><script src="/_next/static/chunks/main-6f5662bdfaa5fe91.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d7128dbe272f92f3.js" defer=""></script><script src="/_next/static/chunks/pages/_error-da2eb543ee7861b0.js" defer=""></script><script src="/_next/static/kSxC61RuI0if1xBcXSx-q/_buildManifest.js" defer=""></script><script src="/_next/static/kSxC61RuI0if1xBcXSx-q/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"kSxC61RuI0if1xBcXSx-q","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[327],{22106:(e,t,s)=>{s.d(t,{BC:()=>g,P6:()=>p,PJ:()=>d,R8:()=>r,az:()=>c,cn:()=>i,jh:()=>a,l7:()=>l,om:()=>u,r6:()=>m});var o=s(53125),n=s(15269);function i(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,n.QP)((0,o.$)(t))}function a(e){return Number.isFinite(e)?e>=1e9?(e/1e9).toFixed(2)+"B":e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":new Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(e):"0"}function c(e,t){var s,o;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:null!=(s=null==t?void 0:t.minFrac)?s:2,maximumFractionDigits:null!=(o=null==t?void 0:t.maxFrac)?o:2}).format(e)}function l(e){return 0===e?"$0":e<.01?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:4,maximumFractionDigits:6}).format(e):c(e)}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isFinite(e)?"".concat((100*e).toFixed(t),"%"):"0%"}function u(e){let t="string"==typeof e||"number"==typeof e?new Date(e):e,s=Date.now()-t.getTime();if(s<0)return"just now";let o=Math.floor(s/1e3);if(o<60)return"".concat(o,"s ago");let n=Math.floor(o/60);if(n<60)return"".concat(n,"m ago");let i=Math.floor(n/60);if(i<24)return"".concat(i,"h ago");let a=Math.floor(i/24);if(a<7)return"".concat(a,"d ago");let c=Math.floor(a/7);if(c<5)return"".concat(c,"w ago");let l=Math.floor(a/30);return l<12?"".concat(l,"mo ago"):"".concat(Math.floor(a/365),"y ago")}function m(e){let t="string"==typeof e||"number"==typeof e?new Date(e):e;if(Number.isNaN(t.getTime()))return"";let s=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0");return"".concat(s,"-").concat(o,"-").concat(n," ").concat(i,":").concat(a)}function d(e){if(!e)return"(unknown)";let t=e.replace(/\/+$/,"").split("/");return t[t.length-1]||e}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return e?e.replace(/-/g,"").slice(0,t):""}function p(e){if(!e)return"(unknown)";let t=e.replace(/-(\d{8})$/,"").replace(/^(vertex_ai|bedrock|anthropic)\//,""),s=(t=t.replace(/^claude-/,"")).split("-");if(s.length>=2){let e=s[0],t=s.slice(1).join(".");return h(e)+" "+t}return h(t.replace(/-/g," "))}function h(e){return e.replace(/\b\w/g,e=>e.toUpperCase())}},46522:(e,t,s)=>{s.d(t,{Xn:()=>n,YZ:()=>o,nA:()=>a});let o=["en","zh"],n="en",i={en:{"brand.tagline":"claude code dashboard","nav.overview":"Overview","nav.usage":"Usage","nav.sessions":"Sessions","nav.projects":"Projects","nav.models":"Models","nav.settings":"Settings","nav.localBadge":"local","common.requests":"requests","common.tokens":"tokens","common.cost":"Cost","common.savedViaCache":"Saved {amount} via cache","common.savedTodayViaCache":"Saved {amount} today","common.live":"live","common.allModels":"All","common.allProjects":"All","common.unknown":"(unknown)","common.session":"Session","common.sessions":"sessions","common.projects":"projects","common.req":"req","common.day":"day","common.days":"days","common.activity":"activity","common.fallbackPrice":"fallback price","common.thinking":"thinking","common.lastActivity":"last activity","common.empty.title":"No usage data yet","common.empty.desc":"Open Claude Code, send a message, then refresh.","common.refresh":"Refresh","common.search":"Search…","common.searchPlaceholder":"Search model, project, session, tool…","common.exportCsv":"Export CSV","common.rows":"{count} rows","common.prev":"‹ Prev","common.next":"Next ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"Page {page} of {total}","common.allSessions":"← All sessions","common.allProjectsLink":"← All projects","common.noMatchingRows":"No matching rows","range.today":"Today","range.7d":"7d","range.30d":"30d","range.90d":"90d","range.all":"All","gran.hour":"Hour","gran.day":"Day","gran.week":"Week","gran.month":"Month","overview.title":"Overview","overview.subtitle":"{count} requests across {files} files \xb7 scan in {ms}ms","overview.subtitle.empty":"Scanned {dirs} directory(ies). Open Claude Code, send a message, then refresh.","overview.empty.title":"No usage data yet","overview.kpi.tokensToday":"Tokens today","overview.kpi.costToday":"Cost today","overview.kpi.thisMonth":"This month","overview.kpi.cacheHit":"Cache hit rate","overview.kpi.topModel":"Top model","overview.kpi.activeSessions":"Sessions today","overview.kpi.activeSessions.hint":"{count} project(s)","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} req","overview.kpi.tokensToday.hint":"{count} requests","overview.kpi.topModel.hint":"{pct} of cost this month","overview.kpi.cacheHit.hint":"Saved {amount} today","overview.delta.title":"vs yesterday","overview.trend.title":"Token usage trend","overview.trend.desc":"Last 30 days \xb7 stacked by token type","overview.trend.activeDays":"{n} day with activity","overview.trend.activeDays.plural":"{n} days with activity","overview.costByModel.title":"Cost by model","overview.costByModel.desc":"This month, sorted by spend","block.title":"Active 5h block","block.remaining":"remaining","block.elapsed":"{pct}% elapsed","block.tokensSuffix":"tokens","block.spentSoFar":"Spent so far","block.burnPerMin":"Burn / min","block.projectedTotal":"Projected total","block.requests":"Requests","block.empty":"No active block","block.emptyDesc":"Send a message in Claude Code to start one.","chart.legend.input":"Input","chart.legend.output":"Output","chart.legend.cacheRead":"Cache read","chart.legend.cacheWrite":"Cache write","chart.tooltip.total":"Total","chart.tooltip.cost":"Cost","chart.tooltip.requests":"Requests","chart.empty":"No data in this range","chart.empty.short":"No data","usage.title":"Usage","usage.subtitle":"{count} turns in selected range","usage.col.calls":"Calls","usage.col.userMessage":"Prompt","usage.turn.expand":"Expand","usage.turn.collapse":"Collapse","usage.turn.callsCount":"{count} calls","usage.turn.noPrompt":"(no user text)","usage.requests.desc":"One row per turn (user message + tool calls); click ▸ to expand","usage.kpi.totalTokens":"Total tokens","usage.kpi.totalCost":"Total cost","usage.kpi.cacheSaved":"Cache saved","usage.kpi.cacheHit":"Cache hit","usage.trend":"Trend","usage.trend.gran":"Granularity: {gran}","usage.requests.title":"Requests","usage.col.time":"Time","usage.col.model":"Model","usage.col.project":"Project","usage.col.session":"Session","usage.col.input":"Input","usage.col.output":"Output","usage.col.cacheRead":"Cache R","usage.col.cacheWrite":"Cache W","usage.col.cost":"Cost","usage.col.tools":"Tools","filter.modelLabel":"Model","filter.projectLabel":"Project","filter.modelAll":"Model: All","filter.projectAll":"Project: All","filter.modelSingle":"Model: {value}","filter.projectSingle":"Project: {value}","filter.modelMulti":"Model: {count}","filter.projectMulti":"Project: {count}","filter.clearAll":"Clear all","filter.noOptions":"No options","sessions.title":"Sessions","sessions.subtitle":"{count} sessions \xb7 sorted by most recent activity","sessions.col.session":"Session","sessions.col.project":"Project","sessions.col.models":"Model(s)","sessions.col.requests":"Requests","sessions.col.tokens":"Tokens","sessions.col.cost":"Cost","sessions.col.duration":"Duration","sessions.col.lastActivity":"Last activity","sessions.untitled":"Session {hash}","sessions.empty":"No sessions yet","session.kpi.requests":"Requests","session.kpi.totalTokens":"Total tokens","session.kpi.cost":"Cost","session.kpi.duration":"Duration","session.timeline.title":"Message timeline","session.timeline.desc":"In order; newest at the bottom","session.perMessage.title":"Per-message tokens","session.modelsInSession":"Models in this session","session.modelLine":"{requests} req \xb7 {tokens} tokens","session.token.in":"in","session.token.out":"out","session.token.cacheR":"cache r","session.token.cacheW":"cache w","projects.title":"Projects","projects.subtitle":"{count} projects \xb7 sorted by spend","projects.empty":"No projects yet","projects.stat.sessions":"Sessions","projects.stat.requests":"Requests","projects.stat.tokens":"Tokens","project.activity":"Activity (last 30 days)","project.sessions.title":"Sessions ({count})","models.title":"Models","models.subtitle":"{count} model(s) used in total","models.empty":"No model usage yet","models.share.cost":"Cost share","models.share.tokens":"Tokens share","models.share.cacheHit":"Cache hit","models.field.requests":"Requests","models.field.savedByCache":"Saved by cache","models.field.input1M":"Input / 1M","models.field.output1M":"Output / 1M","models.field.cacheRead1M":"Cache read / 1M","models.field.pctOfTotal":"{pct} of total spend \xb7 {tokens} tokens","models.eachTrend":"Combined trend (last 30 days)","settings.title":"Settings","settings.subtitle":"Data sources, pricing, and behavior","settings.dataSources.title":"Data sources","settings.dataSources.desc":"ccgauge scans these locations for JSONL files","settings.dataSources.active":"active","settings.dataSources.notPresent":"not present","settings.dataSources.envHint":"Override with {env1} or {env2} environment variables (the dashboard appends {appendix}).","settings.rescan":"Rescan now","settings.rescanning":"Rescanning…","settings.scanStats.title":"Scan stats","settings.scanStats.files":"Files scanned","settings.scanStats.records":"Records parsed","settings.scanStats.assistant":"Assistant records (deduped)","settings.scanStats.duration":"Scan duration","settings.pricing.title":"Pricing table","settings.pricing.desc":"USD per 1M tokens \xb7 built-in snapshot, fuzzy match for date-suffixed model names","settings.pricing.col.model":"Model","settings.pricing.col.input":"Input","settings.pricing.col.output":"Output","settings.pricing.col.write5m":"Cache write 5m","settings.pricing.col.write1h":"Cache write 1h","settings.pricing.col.read":"Cache read","settings.preferences.title":"Preferences","settings.preferences.language":"Language","settings.preferences.theme":"Theme","settings.theme.light":"Light","settings.theme.dark":"Dark","settings.theme.system":"System","settings.about.title":"About","settings.about.subtitle":"Version {version} \xb7 MIT licensed","settings.about.line1":"Fully local: data never leaves your machine; no telemetry, no network calls.","settings.about.line2":"Read-only: ccgauge only reads JSONL files, never writes back to ~/.claude.","settings.about.line3":'Cache: scan results are memoized for 5s; click "Rescan" to force a fresh read.',"settings.about.line4":"Stop with Ctrl+C in the terminal that started ccgauge.","lang.label":"Language","lang.en":"English","lang.zh":"中文","theme.label":"Theme"},zh:{"brand.tagline":"Claude Code 用量看板","nav.overview":"概览","nav.usage":"用量","nav.sessions":"会话","nav.projects":"项目","nav.models":"模型","nav.settings":"设置","nav.localBadge":"本地","common.requests":"次请求","common.tokens":"tokens","common.cost":"花费","common.savedViaCache":"通过缓存节省 {amount}","common.savedTodayViaCache":"今日缓存节省 {amount}","common.live":"进行中","common.allModels":"全部","common.allProjects":"全部","common.unknown":"(未知)","common.session":"会话","common.sessions":"个会话","common.projects":"个项目","common.req":"请求","common.day":"天","common.days":"天","common.activity":"活跃","common.fallbackPrice":"使用兜底单价","common.thinking":"思考","common.lastActivity":"最近活跃","common.empty.title":"暂无用量数据","common.empty.desc":"打开 Claude Code 发送一条消息后刷新本页。","common.refresh":"刷新","common.search":"搜索…","common.searchPlaceholder":"搜索模型 / 项目 / 会话 / 工具…","common.exportCsv":"导出 CSV","common.rows":"{count} 行","common.prev":"‹ 上一页","common.next":"下一页 ›","common.first":"\xab","common.last":"\xbb","common.pageOf":"第 {page} / {total} 页","common.allSessions":"← 返回会话列表","common.allProjectsLink":"← 返回项目列表","common.noMatchingRows":"没有匹配的记录","range.today":"今天","range.7d":"7 天","range.30d":"30 天","range.90d":"90 天","range.all":"全部","gran.hour":"小时","gran.day":"天","gran.week":"周","gran.month":"月","overview.title":"概览","overview.subtitle":"{count} 次请求,覆盖 {files} 个文件 \xb7 扫描耗时 {ms}ms","overview.subtitle.empty":"已扫描 {dirs} 个目录。打开 Claude Code 发一条消息后刷新本页。","overview.empty.title":"暂无用量数据","overview.kpi.tokensToday":"今日 tokens","overview.kpi.costToday":"今日花费","overview.kpi.thisMonth":"本月累计","overview.kpi.cacheHit":"缓存命中率","overview.kpi.topModel":"主力模型","overview.kpi.activeSessions":"今日会话","overview.kpi.activeSessions.hint":"涉及 {count} 个项目","overview.kpi.thisMonth.hint":"{tokens} tokens \xb7 {req} 次请求","overview.kpi.tokensToday.hint":"{count} 次请求","overview.kpi.topModel.hint":"本月成本占比 {pct}","overview.kpi.cacheHit.hint":"今日缓存节省 {amount}","overview.delta.title":"相比昨日","overview.trend.title":"Token 用量趋势","overview.trend.desc":"近 30 天 \xb7 按 token 类型堆叠","overview.trend.activeDays":"{n} 天有数据","overview.trend.activeDays.plural":"{n} 天有数据","overview.costByModel.title":"按模型成本分布","overview.costByModel.desc":"本月,按花费排序","block.title":"当前 5h block","block.remaining":"剩余","block.elapsed":"已用 {pct}%","block.tokensSuffix":"tokens","block.spentSoFar":"已花费","block.burnPerMin":"每分钟消耗","block.projectedTotal":"预计总花费","block.requests":"请求数","block.empty":"当前无活跃 block","block.emptyDesc":"在 Claude Code 中发送消息会启动一个新 block。","chart.legend.input":"输入","chart.legend.output":"输出","chart.legend.cacheRead":"缓存读取","chart.legend.cacheWrite":"缓存写入","chart.tooltip.total":"合计","chart.tooltip.cost":"花费","chart.tooltip.requests":"请求数","chart.empty":"区间内无数据","chart.empty.short":"暂无数据","usage.title":"用量明细","usage.subtitle":"当前筛选范围内 {count} 轮对话","usage.kpi.totalTokens":"总 tokens","usage.kpi.totalCost":"总花费","usage.kpi.cacheSaved":"缓存节省","usage.kpi.cacheHit":"缓存命中","usage.trend":"趋势","usage.trend.gran":"粒度:{gran}","usage.requests.title":"对话轮次","usage.requests.desc":"每轮对话一行(用户消息 + 工具调用),点击 ▸ 展开明细","usage.col.calls":"调用","usage.col.userMessage":"提示","usage.turn.expand":"展开","usage.turn.collapse":"收起","usage.turn.callsCount":"{count} 次调用","usage.turn.noPrompt":"(无用户文本)","usage.col.time":"时间","usage.col.model":"模型","usage.col.project":"项目","usage.col.session":"会话","usage.col.input":"输入","usage.col.output":"输出","usage.col.cacheRead":"缓存读","usage.col.cacheWrite":"缓存写","usage.col.cost":"花费","usage.col.tools":"工具","filter.modelLabel":"模型","filter.projectLabel":"项目","filter.modelAll":"模型:全部","filter.projectAll":"项目:全部","filter.modelSingle":"模型:{value}","filter.projectSingle":"项目:{value}","filter.modelMulti":"模型:{count} 个","filter.projectMulti":"项目:{count} 个","filter.clearAll":"清除筛选","filter.noOptions":"没有可选项","sessions.title":"会话","sessions.subtitle":"共 {count} 个会话 \xb7 按最近活跃排序","sessions.col.session":"会话","sessions.col.project":"项目","sessions.col.models":"模型","sessions.col.requests":"请求数","sessions.col.tokens":"Tokens","sessions.col.cost":"花费","sessions.col.duration":"时长","sessions.col.lastActivity":"最近活跃","sessions.untitled":"会话 {hash}","sessions.empty":"暂无会话","session.kpi.requests":"请求数","session.kpi.totalTokens":"总 tokens","session.kpi.cost":"花费","session.kpi.duration":"时长","session.timeline.title":"消息时间线","session.timeline.desc":"按时间正序,最新的在最下方","session.perMessage.title":"逐条消息 tokens","session.modelsInSession":"本会话使用的模型","session.modelLine":"{requests} 次 \xb7 {tokens} tokens","session.token.in":"输入","session.token.out":"输出","session.token.cacheR":"缓存读","session.token.cacheW":"缓存写","projects.title":"项目","projects.subtitle":"共 {count} 个项目 \xb7 按花费排序","projects.empty":"暂无项目","projects.stat.sessions":"会话","projects.stat.requests":"请求","projects.stat.tokens":"Tokens","project.activity":"活跃情况(近 30 天)","project.sessions.title":"会话({count})","models.title":"模型","models.subtitle":"共使用过 {count} 个模型","models.empty":"暂无模型用量","models.share.cost":"成本占比","models.share.tokens":"Tokens 占比","models.share.cacheHit":"缓存命中","models.field.requests":"请求数","models.field.savedByCache":"缓存节省","models.field.input1M":"输入 / 1M","models.field.output1M":"输出 / 1M","models.field.cacheRead1M":"缓存读 / 1M","models.field.pctOfTotal":"占总花费 {pct} \xb7 {tokens} tokens","models.eachTrend":"整体趋势(近 30 天)","settings.title":"设置","settings.subtitle":"数据源、价格表与行为偏好","settings.dataSources.title":"数据源","settings.dataSources.desc":"ccgauge 会扫描以下路径的 JSONL 文件","settings.dataSources.active":"已启用","settings.dataSources.notPresent":"不存在","settings.dataSources.envHint":"可以通过环境变量 {env1} 或 {env2} 自定义路径(看板会自动追加 {appendix})。","settings.rescan":"立即重新扫描","settings.rescanning":"扫描中…","settings.scanStats.title":"扫描统计","settings.scanStats.files":"扫描文件数","settings.scanStats.records":"解析记录数","settings.scanStats.assistant":"去重后 assistant 记录","settings.scanStats.duration":"扫描耗时","settings.pricing.title":"价格表","settings.pricing.desc":"美元 / 1M tokens \xb7 内置快照,对带日期后缀的模型名做 fuzzy 匹配","settings.pricing.col.model":"模型","settings.pricing.col.input":"输入","settings.pricing.col.output":"输出","settings.pricing.col.write5m":"缓存写入 5 分钟","settings.pricing.col.write1h":"缓存写入 1 小时","settings.pricing.col.read":"缓存读取","settings.preferences.title":"偏好设置","settings.preferences.language":"语言","settings.preferences.theme":"主题","settings.theme.light":"亮色","settings.theme.dark":"暗色","settings.theme.system":"跟随系统","settings.about.title":"关于","settings.about.subtitle":"版本 {version} \xb7 MIT 协议","settings.about.line1":"完全本地:数据从不离开你的机器,没有任何遥测、没有任何网络调用。","settings.about.line2":"只读:ccgauge 只读取 JSONL,绝不会写回 ~/.claude。","settings.about.line3":'缓存:扫描结果会缓存 5 秒;点击"重新扫描"可强制刷新。',"settings.about.line4":"在启动 ccgauge 的终端按 Ctrl+C 即可停止。","lang.label":"语言","lang.en":"English","lang.zh":"中文","theme.label":"主题"}};function a(e,t,s){var o;let n=null==(o=i[e])?void 0:o[t];if(void 0===n&&(n=i.en[t]),void 0===n&&(n=t),s)for(let[e,t]of Object.entries(s))n=n.replace(RegExp("\\{".concat(e,"\\}"),"g"),String(t));return n}},68244:(e,t,s)=>{s.d(t,{CY:()=>u,s9:()=>m,kj:()=>d});var o=s(50692),n=s(92616),i=s(5317),a=s(46522);let c="ccgauge_locale",l=(0,n.createContext)({locale:a.Xn,setLocale:()=>{},t:e=>e}),r="ccgauge.locale";function u(e){let{initialLocale:t,children:s}=e,u=(0,i.useRouter)();(0,n.useEffect)(()=>{try{let e=localStorage.getItem(r);e&&e!==t&&("en"===e||"zh"===e)&&(document.cookie="".concat(c,"=").concat(e,"; path=/; max-age=").concat(31536e3,"; SameSite=Lax"),u.refresh())}catch(e){}},[]);let m=(0,n.useCallback)(e=>{try{localStorage.setItem(r,e)}catch(e){}document.cookie="".concat(c,"=").concat(e,"; path=/; max-age=").concat(31536e3,"; SameSite=Lax"),u.refresh()},[u]),d=(0,n.useCallback)((e,s)=>(0,a.nA)(t,e,s),[t]),g=(0,n.useMemo)(()=>({locale:t,setLocale:m,t:d}),[t,m,d]);return(0,o.jsx)(l.Provider,{value:g,children:s})}function m(){return(0,n.useContext)(l)}function d(){return(0,n.useContext)(l).t}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[430],{15830:(e,t,s)=>{"use strict";s.d(t,{UsageTable:()=>c});var a=s(50692),r=s(92616),n=s(22106),l=s(68244);function c(e){let{rows:t}=e,s=(0,l.kj)(),[n,c]=(0,r.useState)(0),[x,u]=(0,r.useState)("timestamp"),[m,h]=(0,r.useState)("desc"),[p,j]=(0,r.useState)(""),[g,b]=(0,r.useState)(new Set),y=(0,r.useMemo)(()=>{if(!p.trim())return t;let e=p.toLowerCase();return t.filter(t=>t.models.some(t=>t.toLowerCase().includes(e))||t.cwd.toLowerCase().includes(e)||t.sessionId.toLowerCase().includes(e)||t.toolNames.some(t=>t.toLowerCase().includes(e))||t.userText.toLowerCase().includes(e))},[t,p]),f=(0,r.useMemo)(()=>{let e=[...y];return e.sort((e,t)=>{let s="timestamp"===x?e.endTimestamp:e[x],a="timestamp"===x?t.endTimestamp:t[x];return s===a?0:"asc"===m?s<a?-1:1:s<a?1:-1}),e},[y,x,m]),N=Math.max(1,Math.ceil(f.length/25)),v=Math.min(n,N-1),k=f.slice(25*v,(v+1)*25);function w(e){x===e?h("asc"===m?"desc":"asc"):(u(e),h("desc"))}return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-3 flex-wrap",children:[(0,a.jsx)("input",{value:p,onChange:e=>{j(e.target.value),c(0)},placeholder:s("common.searchPlaceholder"),className:"px-3 py-1.5 text-sm rounded-button border border-border bg-bg-surface focus:outline-none focus:border-border-hi w-72 placeholder:text-text-tertiary text-text-primary"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"text-xs text-text-tertiary tabular-nums",children:s("common.rows",{count:f.length.toLocaleString()})}),(0,a.jsx)("button",{onClick:function(){let e=["turn_id,timestamp,model,project,session,input,output,cache_read,cache_create,cost,tools"];for(let t of f)for(let s of t.children)e.push([t.turnId,s.timestamp,s.model,d(s.cwd),s.sessionId,s.inputTokens,s.outputTokens,s.cacheReadTokens,s.cacheCreationTokens,s.cost.toFixed(6),d(s.toolNames.join(";"))].join(","));let t=new Blob([e.join("\n")],{type:"text/csv"}),s=URL.createObjectURL(t),a=document.createElement("a");a.href=s,a.download="ccgauge-usage-".concat(new Date().toISOString().slice(0,10),".csv"),a.click(),URL.revokeObjectURL(s)},className:"btn",children:s("common.exportCsv")})]})]}),(0,a.jsx)("div",{className:"card overflow-hidden",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border bg-bg-surface-hi/30",children:[(0,a.jsx)(o,{children:(0,a.jsx)("span",{className:"sr-only",children:"expand"})}),(0,a.jsx)(o,{sorted:"timestamp"===x,dir:m,onClick:()=>w("timestamp"),children:s("usage.col.time")}),(0,a.jsx)(o,{children:s("usage.col.userMessage")}),(0,a.jsx)(o,{children:s("usage.col.model")}),(0,a.jsx)(o,{children:s("usage.col.project")}),(0,a.jsx)(o,{children:s("usage.col.session")}),(0,a.jsx)(o,{align:"right",sorted:"callCount"===x,dir:m,onClick:()=>w("callCount"),children:s("usage.col.calls")}),(0,a.jsx)(o,{align:"right",sorted:"inputTokens"===x,dir:m,onClick:()=>w("inputTokens"),children:s("usage.col.input")}),(0,a.jsx)(o,{align:"right",sorted:"outputTokens"===x,dir:m,onClick:()=>w("outputTokens"),children:s("usage.col.output")}),(0,a.jsx)(o,{align:"right",sorted:"cacheReadTokens"===x,dir:m,onClick:()=>w("cacheReadTokens"),children:s("usage.col.cacheRead")}),(0,a.jsx)(o,{align:"right",sorted:"cacheCreationTokens"===x,dir:m,onClick:()=>w("cacheCreationTokens"),children:s("usage.col.cacheWrite")}),(0,a.jsx)(o,{align:"right",sorted:"cost"===x,dir:m,onClick:()=>w("cost"),children:s("usage.col.cost")}),(0,a.jsx)(o,{children:s("usage.col.tools")})]})}),(0,a.jsxs)("tbody",{children:[k.map(e=>{let t=g.has(e.turnId),r=e.userText.trim()||s("usage.turn.noPrompt");return(0,a.jsx)(i,{turn:e,isOpen:t,onToggle:()=>{var t;return t=e.turnId,void b(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},userText:r,expandLabel:s("usage.turn.expand"),collapseLabel:s("usage.turn.collapse")},e.turnId)}),0===k.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:13,className:"px-3 py-8 text-center text-text-tertiary text-sm",children:s("common.noMatchingRows")})})]})]})})}),N>1&&(0,a.jsxs)("div",{className:"flex items-center justify-between mt-3 text-xs text-text-secondary",children:[(0,a.jsx)("span",{children:s("common.pageOf",{page:v+1,total:N})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>c(0),disabled:0===v,className:"btn-ghost disabled:opacity-40",children:s("common.first")}),(0,a.jsx)("button",{onClick:()=>c(v-1),disabled:0===v,className:"btn-ghost disabled:opacity-40",children:s("common.prev")}),(0,a.jsx)("button",{onClick:()=>c(v+1),disabled:v>=N-1,className:"btn-ghost disabled:opacity-40",children:s("common.next")}),(0,a.jsx)("button",{onClick:()=>c(N-1),disabled:v>=N-1,className:"btn-ghost disabled:opacity-40",children:s("common.last")})]})]})]})}function i(e){let{turn:t,isOpen:s,onToggle:r,userText:l,expandLabel:c,collapseLabel:i}=e,o=1===t.models.length?(0,n.P6)(t.models[0]):"".concat((0,n.P6)(t.models[0])," +").concat(t.models.length-1),d=t.toolNames.length?t.toolNames.slice(0,3).join(", ")+(t.toolNames.length>3?"…":""):"—";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("tr",{className:"border-b border-border last:border-b-0 hover:bg-bg-surface-hi/40 cursor-pointer",onClick:r,children:[(0,a.jsx)("td",{className:"px-2 py-2 text-text-tertiary w-6 text-center select-none",children:(0,a.jsx)("span",{title:s?i:c,className:"inline-block w-4",children:s?"▾":"▸"})}),(0,a.jsx)("td",{className:"px-3 py-2 num-mono text-text-secondary whitespace-nowrap",title:(0,n.r6)(t.endTimestamp),children:(0,n.om)(t.endTimestamp)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-secondary truncate max-w-[280px]",title:l,children:l}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary whitespace-nowrap",children:o}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-secondary truncate max-w-[160px]",title:t.cwd,children:(0,n.PJ)(t.cwd)}),(0,a.jsx)("td",{className:"px-3 py-2 num-mono text-text-tertiary text-xs",title:t.sessionId,children:(0,n.BC)(t.sessionId)}),(0,a.jsx)("td",{className:"px-3 py-2 num-mono text-right text-text-secondary",children:t.callCount}),(0,a.jsx)("td",{className:"px-3 py-2 num-mono text-right text-text-secondary",children:(0,n.jh)(t.inputTokens)}),(0,a.jsx)("td",{className:"px-3 py-2 num-mono text-right text-text-secondary",children:(0,n.jh)(t.outputTokens)}),(0,a.jsx)("td",{className:"px-3 py-2 num-mono text-right text-success",children:(0,n.jh)(t.cacheReadTokens)}),(0,a.jsx)("td",{className:"px-3 py-2 num-mono text-right text-text-secondary",children:(0,n.jh)(t.cacheCreationTokens)}),(0,a.jsx)("td",{className:"px-3 py-2 num-mono text-right text-text-primary font-medium",children:(0,n.l7)(t.cost)}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs text-text-tertiary truncate max-w-[160px]",title:t.toolNames.join(", "),children:d})]}),s&&t.children.map(e=>(0,a.jsxs)("tr",{className:"border-b border-border last:border-b-0 bg-bg-surface-hi/20 text-text-tertiary",children:[(0,a.jsx)("td",{className:"px-2 py-1.5 w-6"}),(0,a.jsx)("td",{className:"px-3 py-1.5 num-mono whitespace-nowrap pl-8",title:(0,n.r6)(e.timestamp),children:(0,n.om)(e.timestamp)}),(0,a.jsx)("td",{className:"px-3 py-1.5 text-text-tertiary text-xs",children:"—"}),(0,a.jsx)("td",{className:"px-3 py-1.5 whitespace-nowrap",children:(0,n.P6)(e.model)}),(0,a.jsx)("td",{className:"px-3 py-1.5 truncate max-w-[160px]",title:e.cwd,children:(0,n.PJ)(e.cwd)}),(0,a.jsx)("td",{className:"px-3 py-1.5 num-mono text-xs",title:e.sessionId,children:(0,n.BC)(e.sessionId)}),(0,a.jsx)("td",{className:"px-3 py-1.5 num-mono text-right",children:"1"}),(0,a.jsx)("td",{className:"px-3 py-1.5 num-mono text-right",children:(0,n.jh)(e.inputTokens)}),(0,a.jsx)("td",{className:"px-3 py-1.5 num-mono text-right",children:(0,n.jh)(e.outputTokens)}),(0,a.jsx)("td",{className:"px-3 py-1.5 num-mono text-right text-success",children:(0,n.jh)(e.cacheReadTokens)}),(0,a.jsx)("td",{className:"px-3 py-1.5 num-mono text-right",children:(0,n.jh)(e.cacheCreationTokens)}),(0,a.jsx)("td",{className:"px-3 py-1.5 num-mono text-right",children:(0,n.l7)(e.cost)}),(0,a.jsx)("td",{className:"px-3 py-1.5 text-xs truncate max-w-[160px]",title:e.toolNames.join(", "),children:e.toolNames.length?e.toolNames.join(", "):"—"})]},e.uuid))]})}function o(e){let{children:t,align:s="left",sorted:r,dir:l,onClick:c}=e;return(0,a.jsx)("th",{className:(0,n.cn)("px-3 py-2 text-xs font-medium text-text-tertiary uppercase tracking-wide whitespace-nowrap","right"===s?"text-right":"text-left",c&&"cursor-pointer hover:text-text-primary select-none"),onClick:c,children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[t,r&&(0,a.jsx)("span",{className:"text-[10px]",children:"asc"===l?"▲":"▼"})]})})}function d(e){return e.includes(",")||e.includes('"')||e.includes("\n")?'"'.concat(e.replace(/"/g,'""'),'"'):e}},20315:(e,t,s)=>{"use strict";s.d(t,{GranularityPicker:()=>i});var a=s(50692),r=s(5317),n=s(22106),l=s(68244);let c=[{value:"hour",tk:"gran.hour"},{value:"day",tk:"gran.day"},{value:"week",tk:"gran.week"},{value:"month",tk:"gran.month"}];function i(e){let{defaultValue:t="day"}=e,s=(0,r.useRouter)(),i=(0,r.usePathname)(),o=(0,r.useSearchParams)(),d=(0,l.kj)(),x=o.get("gran")||t;return(0,a.jsx)("div",{className:"inline-flex rounded-button border border-border bg-bg-surface p-0.5",children:c.map(e=>(0,a.jsx)("button",{onClick:()=>(function(e){let t=new URLSearchParams(o.toString());t.set("gran",e),s.push("".concat(i,"?").concat(t.toString()))})(e.value),className:(0,n.cn)("px-2.5 py-1 text-xs font-medium rounded transition-colors",x===e.value?"bg-bg-surface-hi text-text-primary":"text-text-secondary hover:text-text-primary"),children:d(e.tk)},e.value))})}},30833:(e,t,s)=>{"use strict";s.d(t,{TokenStackChart:()=>h});var a=s(50692),r=s(9606),n=s(59970),l=s(2292),c=s(12399),i=s(59164),o=s(2039),d=s(64384),x=s(22106),u=s(68244);let m={input:"rgb(var(--chart-input))",output:"rgb(var(--chart-output))",cacheRead:"rgb(var(--chart-cache-read))",cacheCreation:"rgb(var(--chart-cache-create))"};function h(e){let{data:t,height:s="h-72"}=e,h=(0,u.kj)();return t.length?(0,a.jsxs)("div",{className:"".concat(s," w-full"),children:[(0,a.jsx)(r.u,{width:"100%",height:"100%",children:(0,a.jsxs)(n.E,{data:t,margin:{top:12,right:8,bottom:4,left:8},children:[(0,a.jsx)(l.d,{stroke:"rgb(var(--chart-grid))",strokeDasharray:"3 3",vertical:!1}),(0,a.jsx)(c.W,{dataKey:"label",tick:{fill:"rgb(var(--chart-axis))",fontSize:11},tickLine:!1,axisLine:{stroke:"rgb(var(--chart-grid))"},interval:"preserveStartEnd",minTickGap:32}),(0,a.jsx)(i.h,{tickFormatter:e=>(0,x.jh)(Number(e)),tick:{fill:"rgb(var(--chart-axis))",fontSize:11},tickLine:!1,axisLine:{stroke:"rgb(var(--chart-grid))"},width:56}),(0,a.jsx)(o.m,{content:(0,a.jsx)(j,{}),cursor:{fill:"rgb(var(--text-primary) / 0.04)"}}),(0,a.jsx)(d.y,{dataKey:"input",stackId:"a",fill:m.input,isAnimationActive:!1}),(0,a.jsx)(d.y,{dataKey:"cacheCreation",stackId:"a",fill:m.cacheCreation,isAnimationActive:!1}),(0,a.jsx)(d.y,{dataKey:"cacheRead",stackId:"a",fill:m.cacheRead,isAnimationActive:!1}),(0,a.jsx)(d.y,{dataKey:"output",stackId:"a",fill:m.output,radius:[3,3,0,0],isAnimationActive:!1})]})}),(0,a.jsxs)("div",{className:"flex items-center flex-wrap justify-center gap-4 text-xs text-text-secondary mt-2",children:[(0,a.jsx)(p,{color:m.input,label:h("chart.legend.input")}),(0,a.jsx)(p,{color:m.cacheCreation,label:h("chart.legend.cacheWrite")}),(0,a.jsx)(p,{color:m.cacheRead,label:h("chart.legend.cacheRead")}),(0,a.jsx)(p,{color:m.output,label:h("chart.legend.output")})]})]}):(0,a.jsx)("div",{className:"".concat(s," flex items-center justify-center text-text-tertiary text-sm"),children:h("chart.empty")})}function p(e){let{color:t,label:s}=e;return(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm",style:{background:t}}),(0,a.jsx)("span",{children:s})]})}function j(e){let t=(0,u.kj)();if(!e.active||!e.payload||!e.payload.length)return null;let s=e.payload[0].payload,r=s.input+s.output+s.cacheRead+s.cacheCreation;return(0,a.jsxs)("div",{className:"card border-border-hi shadow-lg p-3 text-xs min-w-[200px]",children:[(0,a.jsx)("div",{className:"font-medium text-text-primary mb-2",children:e.label}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(g,{color:m.input,label:t("chart.legend.input"),value:s.input}),(0,a.jsx)(g,{color:m.cacheCreation,label:t("chart.legend.cacheWrite"),value:s.cacheCreation}),(0,a.jsx)(g,{color:m.cacheRead,label:t("chart.legend.cacheRead"),value:s.cacheRead}),(0,a.jsx)(g,{color:m.output,label:t("chart.legend.output"),value:s.output})]}),(0,a.jsxs)("div",{className:"mt-2 pt-2 border-t border-border flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-text-secondary",children:t("chart.tooltip.total")}),(0,a.jsx)("span",{className:"num-mono text-text-primary",children:(0,x.jh)(r)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,a.jsx)("span",{className:"text-text-secondary",children:t("chart.tooltip.cost")}),(0,a.jsx)("span",{className:"num-mono text-brand",children:(0,x.az)(s.cost)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,a.jsx)("span",{className:"text-text-secondary",children:t("chart.tooltip.requests")}),(0,a.jsx)("span",{className:"num-mono text-text-primary",children:s.requests})]})]})}function g(e){let{color:t,label:s,value:r}=e;return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-text-secondary",children:[(0,a.jsx)("span",{className:"w-2 h-2 rounded-sm",style:{background:t}}),s]}),(0,a.jsx)("span",{className:"num-mono text-text-primary",children:(0,x.jh)(r)})]})}},48122:(e,t,s)=>{"use strict";s.d(t,{ModelFilter:()=>i,d:()=>o});var a=s(50692),r=s(5317),n=s(92616),l=s(22106),c=s(68244);function i(e){let{all:t,selected:s}=e;return(0,a.jsx)(o,{labelKey:"filter.modelLabel",labelAllKey:"filter.modelAll",labelSingleKey:"filter.modelSingle",labelMultiKey:"filter.modelMulti",all:t,selected:s,param:"models",render:l.P6})}function o(e){let t,{labelAllKey:s,labelSingleKey:i,labelMultiKey:o,all:d,selected:x,param:u,render:m}=e,h=(0,r.useRouter)(),p=(0,r.usePathname)(),j=(0,r.useSearchParams)(),g=(0,c.kj)(),[b,y]=(0,n.useState)(!1),f=(0,n.useRef)(null);return(0,n.useEffect)(()=>{function e(e){f.current&&!f.current.contains(e.target)&&y(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),t=0===x.length?g(s):1===x.length?g(i,{value:m?m(x[0]):x[0]}):g(o,{count:x.length}),(0,a.jsxs)("div",{ref:f,className:"relative",children:[(0,a.jsxs)("button",{onClick:()=>y(!b),className:"btn",children:[t,(0,a.jsx)("span",{className:"text-text-tertiary ml-1",children:"▾"})]}),b&&(0,a.jsxs)("div",{className:"absolute right-0 mt-1 w-64 max-h-80 overflow-y-auto card border-border-hi shadow-lg p-2 z-20",children:[x.length>0&&(0,a.jsx)("button",{onClick:function(){let e=new URLSearchParams(j.toString());e.delete(u),h.push("".concat(p,"?").concat(e.toString()))},className:"w-full text-left text-xs text-text-secondary px-2 py-1 hover:bg-bg-surface-hi rounded",children:g("filter.clearAll")}),0===d.length&&(0,a.jsx)("div",{className:"text-xs text-text-tertiary px-2 py-3 text-center",children:g("filter.noOptions")}),d.map(e=>{let t=x.includes(e);return(0,a.jsxs)("button",{onClick:()=>(function(e){let t=new URLSearchParams(j.toString()),s=new Set(x);s.has(e)?s.delete(e):s.add(e),0===s.size?t.delete(u):t.set(u,Array.from(s).join(",")),h.push("".concat(p,"?").concat(t.toString()))})(e),className:(0,l.cn)("w-full text-left text-sm px-2 py-1.5 hover:bg-bg-surface-hi rounded flex items-center gap-2",t&&"text-text-primary"),children:[(0,a.jsx)("span",{className:(0,l.cn)("w-3.5 h-3.5 rounded-sm border flex items-center justify-center text-[10px] flex-shrink-0",t?"bg-brand border-brand text-white":"border-border-hi"),children:t?"✓":""}),(0,a.jsx)("span",{className:"truncate",children:m?m(e):e})]},e)})]})]})}},60534:(e,t,s)=>{"use strict";s.d(t,{ProjectFilter:()=>l});var a=s(50692),r=s(48122),n=s(22106);function l(e){let{all:t,selected:s}=e;return(0,a.jsx)(r.d,{labelKey:"filter.projectLabel",labelAllKey:"filter.projectAll",labelSingleKey:"filter.projectSingle",labelMultiKey:"filter.projectMulti",all:t,selected:s,param:"projects",render:n.PJ})}},90841:(e,t,s)=>{Promise.resolve().then(s.bind(s,30833)),Promise.resolve().then(s.bind(s,20315)),Promise.resolve().then(s.bind(s,48122)),Promise.resolve().then(s.bind(s,60534)),Promise.resolve().then(s.bind(s,93462)),Promise.resolve().then(s.bind(s,15830))},93462:(e,t,s)=>{"use strict";s.d(t,{RangePicker:()=>i});var a=s(50692),r=s(5317),n=s(22106),l=s(68244);let c=[{value:"1d",tk:"range.today"},{value:"7d",tk:"range.7d"},{value:"30d",tk:"range.30d"},{value:"90d",tk:"range.90d"},{value:"all",tk:"range.all"}];function i(e){let{defaultValue:t="7d"}=e,s=(0,r.useRouter)(),i=(0,r.usePathname)(),o=(0,r.useSearchParams)(),d=(0,l.kj)(),x=o.get("range")||t;return(0,a.jsx)("div",{className:"inline-flex rounded-button border border-border bg-bg-surface p-0.5",children:c.map(e=>(0,a.jsx)("button",{onClick:()=>(function(e){let t=new URLSearchParams(o.toString());t.set("range",e),s.push("".concat(i,"?").concat(t.toString()))})(e.value),className:(0,n.cn)("px-2.5 py-1 text-xs font-medium rounded transition-colors",x===e.value?"bg-bg-surface-hi text-text-primary":"text-text-secondary hover:text-text-primary"),children:d(e.tk)},e.value))})}}},e=>{e.O(0,[653,946,327,623,338,358],()=>e(e.s=90841)),_N_E=e.O()}]);
@@ -0,0 +1,3 @@
1
+ *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
+ ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
3
+ */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans),ui-sans-serif,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--font-mono),ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.card{border-radius:12px;border-width:1px;--tw-bg-opacity:1;background-color:rgb(var(--bg-surface)/var(--tw-bg-opacity,1))}.card-pad{padding:1.5rem}.label{font-size:.75rem;line-height:1rem;font-weight:500;text-transform:uppercase;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(var(--text-tertiary)/var(--tw-text-opacity,1))}.num-hero{font-size:2.25rem;line-height:2.5rem;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);letter-spacing:-.025em}.num-hero,.num-mid{font-weight:600;--tw-numeric-spacing:tabular-nums;--tw-text-opacity:1;color:rgb(var(--text-primary)/var(--tw-text-opacity,1))}.num-mid{font-size:1.5rem;line-height:2rem;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.num-mono{font-family:var(--font-mono),ui-monospace,monospace;--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.pill{display:inline-flex;align-items:center;border-radius:8px;padding:.125rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500}.pill-muted{padding:.125rem .5rem;font-size:.75rem;line-height:1rem;--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgb(var(--bg-surface-hi)/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(var(--text-secondary)/var(--tw-text-opacity,1))}.btn,.pill-muted{display:inline-flex;align-items:center;border-radius:8px;font-weight:500;border-width:1px;border-color:rgb(var(--border)/var(--tw-border-opacity,1))}.btn{justify-content:center;gap:.375rem;background-color:rgb(var(--bg-surface)/var(--tw-bg-opacity,1));padding:.375rem .75rem;font-size:.875rem;line-height:1.25rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn,.btn:hover{--tw-border-opacity:1;--tw-bg-opacity:1}.btn:hover{border-color:rgb(var(--border-hi)/var(--tw-border-opacity,1));background-color:rgb(var(--bg-surface-hi)/var(--tw-bg-opacity,1))}.btn-ghost{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;border-radius:8px;padding:.375rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(var(--text-secondary)/var(--tw-text-opacity,1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-ghost:hover{--tw-bg-opacity:1;background-color:rgb(var(--bg-surface-hi)/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(var(--text-primary)/var(--tw-text-opacity,1))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.right-0{right:0}.top-0{top:0}.z-20{z-index:20}.z-30{z-index:30}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-full{height:100%}.max-h-80{max-height:20rem}.min-h-\[128px\]{min-height:128px}.min-h-\[180px\]{min-height:180px}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[120px\]{min-width:120px}.min-w-\[200px\]{min-width:200px}.min-w-\[80px\]{min-width:80px}.min-w-\[8rem\]{min-width:8rem}.max-w-7xl{max-width:80rem}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[280px\]{max-width:280px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-button{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-border{--tw-border-opacity:1;border-color:rgb(var(--border)/var(--tw-border-opacity,1))}.border-border-hi{--tw-border-opacity:1;border-color:rgb(var(--border-hi)/var(--tw-border-opacity,1))}.border-brand{--tw-border-opacity:1;border-color:rgb(var(--brand)/var(--tw-border-opacity,1))}.border-brand\/30{border-color:rgb(var(--brand)/.3)}.border-success\/20{border-color:rgb(var(--success)/.2)}.border-success\/30{border-color:rgb(var(--success)/.3)}.border-warning\/20{border-color:rgb(var(--warning)/.2)}.border-warning\/30{border-color:rgb(var(--warning)/.3)}.bg-bg{--tw-bg-opacity:1;background-color:rgb(var(--bg-base)/var(--tw-bg-opacity,1))}.bg-bg-surface{--tw-bg-opacity:1;background-color:rgb(var(--bg-surface)/var(--tw-bg-opacity,1))}.bg-bg-surface-hi{--tw-bg-opacity:1;background-color:rgb(var(--bg-surface-hi)/var(--tw-bg-opacity,1))}.bg-bg-surface-hi\/20{background-color:rgb(var(--bg-surface-hi)/.2)}.bg-bg-surface-hi\/30{background-color:rgb(var(--bg-surface-hi)/.3)}.bg-brand{--tw-bg-opacity:1;background-color:rgb(var(--brand)/var(--tw-bg-opacity,1))}.bg-chart-cache-create\/15{background-color:rgb(var(--chart-cache-create)/.15)}.bg-chart-input{--tw-bg-opacity:1;background-color:rgb(var(--chart-input)/var(--tw-bg-opacity,1))}.bg-danger{--tw-bg-opacity:1;background-color:rgb(var(--danger)/var(--tw-bg-opacity,1))}.bg-danger\/10{background-color:rgb(var(--danger)/.1)}.bg-success{--tw-bg-opacity:1;background-color:rgb(var(--success)/var(--tw-bg-opacity,1))}.bg-success\/10{background-color:rgb(var(--success)/.1)}.bg-warning{--tw-bg-opacity:1;background-color:rgb(var(--warning)/var(--tw-bg-opacity,1))}.bg-warning\/10{background-color:rgb(var(--warning)/.1)}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-brand{--tw-gradient-from:rgb(var(--brand)/1) var(--tw-gradient-from-position);--tw-gradient-to:rgb(var(--brand)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-brand-hover{--tw-gradient-to:rgb(var(--brand-hover)/1) var(--tw-gradient-to-position)}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-3{padding-bottom:.75rem}.pl-8{padding-left:2rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-brand{--tw-text-opacity:1;color:rgb(var(--brand)/var(--tw-text-opacity,1))}.text-chart-cache-create{--tw-text-opacity:1;color:rgb(var(--chart-cache-create)/var(--tw-text-opacity,1))}.text-danger{--tw-text-opacity:1;color:rgb(var(--danger)/var(--tw-text-opacity,1))}.text-success{--tw-text-opacity:1;color:rgb(var(--success)/var(--tw-text-opacity,1))}.text-text-primary{--tw-text-opacity:1;color:rgb(var(--text-primary)/var(--tw-text-opacity,1))}.text-text-secondary{--tw-text-opacity:1;color:rgb(var(--text-secondary)/var(--tw-text-opacity,1))}.text-text-tertiary{--tw-text-opacity:1;color:rgb(var(--text-tertiary)/var(--tw-text-opacity,1))}.text-warning{--tw-text-opacity:1;color:rgb(var(--warning)/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.theme-dark,:root{--bg-base:10 10 10;--bg-surface:20 20 20;--bg-surface-hi:28 28 28;--border:38 38 38;--border-hi:64 64 64;--text-primary:250 250 250;--text-secondary:163 163 163;--text-tertiary:115 115 115;--brand:201 100 66;--brand-hover:216 121 89;--success:34 197 94;--warning:250 204 21;--danger:248 113 113;--chart-input:96 165 250;--chart-output:251 146 60;--chart-cache-read:52 211 153;--chart-cache-create:167 139 250;--chart-grid:38 38 38;--chart-axis:115 115 115}.theme-light{--bg-base:255 255 255;--bg-surface:250 250 250;--bg-surface-hi:244 244 245;--border:228 228 231;--border-hi:212 212 216;--text-primary:23 23 23;--text-secondary:82 82 91;--text-tertiary:161 161 170;--brand:194 65 12;--brand-hover:154 52 18;--success:22 163 74;--warning:217 119 6;--danger:220 38 38;--chart-input:37 99 235;--chart-output:234 88 12;--chart-cache-read:22 163 74;--chart-cache-create:124 58 237;--chart-grid:228 228 231;--chart-axis:113 113 122}:root{--font-sans:"Geist Sans","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;--font-mono:"Geist Mono","JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace}*{border-color:rgb(var(--border))}body,html{background:rgb(var(--bg-base));color:rgb(var(--text-primary));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}body{min-height:100vh}::-moz-selection{background:rgb(var(--brand)/.3);color:rgb(var(--text-primary))}::selection{background:rgb(var(--brand)/.3);color:rgb(var(--text-primary))}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:rgb(var(--border-hi));border-radius:5px}::-webkit-scrollbar-thumb:hover{background:rgb(var(--text-tertiary))}.placeholder\:text-text-tertiary::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--text-tertiary)/var(--tw-text-opacity,1))}.placeholder\:text-text-tertiary::placeholder{--tw-text-opacity:1;color:rgb(var(--text-tertiary)/var(--tw-text-opacity,1))}.last\:border-b-0:last-child{border-bottom-width:0}.hover\:border-border-hi:hover{--tw-border-opacity:1;border-color:rgb(var(--border-hi)/var(--tw-border-opacity,1))}.hover\:bg-bg-surface:hover{--tw-bg-opacity:1;background-color:rgb(var(--bg-surface)/var(--tw-bg-opacity,1))}.hover\:bg-bg-surface-hi:hover{--tw-bg-opacity:1;background-color:rgb(var(--bg-surface-hi)/var(--tw-bg-opacity,1))}.hover\:bg-bg-surface-hi\/30:hover{background-color:rgb(var(--bg-surface-hi)/.3)}.hover\:bg-bg-surface-hi\/40:hover{background-color:rgb(var(--bg-surface-hi)/.4)}.hover\:text-brand:hover{--tw-text-opacity:1;color:rgb(var(--brand)/var(--tw-text-opacity,1))}.hover\:text-text-primary:hover{--tw-text-opacity:1;color:rgb(var(--text-primary)/var(--tw-text-opacity,1))}.focus\:border-border-hi:focus{--tw-border-opacity:1;border-color:rgb(var(--border-hi)/var(--tw-border-opacity,1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:opacity-40:disabled{opacity:.4}.group:hover .group-hover\:text-brand{--tw-text-opacity:1;color:rgb(var(--brand)/var(--tw-text-opacity,1))}@media (min-width:768px){.md\:inline{display:inline}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:1024px){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccgauge",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Claude Code Dashboard — local web UI for Claude Code token usage and cost",
5
5
  "keywords": [
6
6
  "claude",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccgauge",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Claude Code Dashboard — local web UI for Claude Code token usage and cost",
5
5
  "keywords": [
6
6
  "claude",