p-backlog 0.4.0 → 0.5.1

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 (36) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +50 -30
  3. package/README.ru.md +50 -30
  4. package/dist/cli.js +670 -265
  5. package/dist/web/assets/{CodeTab-C87LaJFD.js → CodeTab-D3I5lIJJ.js} +1 -1
  6. package/dist/web/assets/CostTab-8f2AC5ER.js +1 -0
  7. package/dist/web/assets/EffectTab-1jObLK9a.js +1 -0
  8. package/dist/web/assets/Figure-BHBCd7Dt.js +1 -0
  9. package/dist/web/assets/OverviewTab-DjNyxzJq.js +1 -0
  10. package/dist/web/assets/QualityTab-W2NdYBhI.js +1 -0
  11. package/dist/web/assets/StatsPage-rJH3k8Ye.js +1 -0
  12. package/dist/web/assets/StatsTabState-BoimPoKm.js +1 -0
  13. package/dist/web/assets/{StatsTable-BXG0IS8p.js → StatsTable-B0tbx68M.js} +1 -1
  14. package/dist/web/assets/{UnavailableRepos-KiTvsm1X.js → UnavailableRepos-SpC6Dzwu.js} +1 -1
  15. package/dist/web/assets/cx-DDl6tKXq.js +58 -0
  16. package/dist/web/assets/{index-AJ1Qzly1.js → index-C8xqRmo-.js} +2 -2
  17. package/dist/web/assets/start-YlC0KTe5.js +38 -0
  18. package/dist/web/assets/use-grain-series-Bx70IZvb.js +55 -0
  19. package/dist/web/assets/value-dot-B7BsbWBD.js +1 -0
  20. package/dist/web/index.html +1 -1
  21. package/package.json +2 -1
  22. package/skill/backlog/SKILL.md +2 -2
  23. package/skill/backlog-en/SKILL.md +2 -2
  24. package/dist/web/assets/ChartTooltip-DWaDSRan.js +0 -55
  25. package/dist/web/assets/CostTab-D4ByOnHX.js +0 -1
  26. package/dist/web/assets/EffectTab-Dq06ghtZ.js +0 -1
  27. package/dist/web/assets/Figure-BC1eGh3_.js +0 -1
  28. package/dist/web/assets/OverviewTab-BBmohHJR.js +0 -1
  29. package/dist/web/assets/QualityTab-Rb7zRcGH.js +0 -1
  30. package/dist/web/assets/StatsPage-Dtyc1gAc.js +0 -1
  31. package/dist/web/assets/StatsTabState-Br-8FgKd.js +0 -1
  32. package/dist/web/assets/cx-CNNf0q6V.js +0 -58
  33. package/dist/web/assets/rolldown-runtime-hePW80VL.js +0 -1
  34. package/dist/web/assets/start-BGXTwsB0.js +0 -38
  35. package/dist/web/assets/value-dot-W-8PsGpd.js +0 -1
  36. /package/dist/web/assets/{ChartTooltip-tQC8-pw2.css → use-grain-series-tQC8-pw2.css} +0 -0
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Cn as t,E as n,O as r,Sn as i,T as a,_n as o,at as s,bn as c,gn as l,o as u,u as d,vn as f,wn as p,xn as m,xt as h,yn as g}from"./cx-CNNf0q6V.js";import{l as _}from"./start-BGXTwsB0.js";import{i as v,r as y,t as b}from"./StatsTabState-Br-8FgKd.js";import{t as x}from"./StatsPage.module-D8dvB8Va.js";import{t as S}from"./Figure-BC1eGh3_.js";import{t as C}from"./StatsTable-BXG0IS8p.js";import{$ as w,A as T,B as ee,Ct as E,D as te,E as ne,Et as re,F as ie,G as ae,H as oe,I as se,J as ce,K as le,L as ue,M as de,N as fe,O as pe,Ot as me,P as he,R as ge,S as _e,T as ve,V as ye,W as D,X as be,Y as xe,Z as Se,_ as O,_t as Ce,a as we,at as Te,b as Ee,bt as k,c as De,ct as Oe,d as ke,dt as A,et as Ae,f as je,ft as j,g as Me,gt as M,h as Ne,i as Pe,it as Fe,j as Ie,k as Le,l as Re,lt as N,m as P,mt as ze,n as F,nt as Be,o as Ve,ot as He,p as Ue,pt as We,q as Ge,r as Ke,rt as qe,s as Je,st as Ye,t as Xe,tt as I,u as Ze,ut as Qe,v as L,vt as $e,w as et,wt as tt,xt as nt,y as rt,yt as it,z as at}from"./ChartTooltip-DWaDSRan.js";import{a as ot,i as st,n as ct,o as lt,r as ut,t as dt}from"./value-dot-W-8PsGpd.js";var ft=i({input:m(),cacheWrite5m:m(),cacheWrite1h:m(),cacheRead:m(),output:m()}),R=f([`cli`,`skill`]);i({slot:p(),cwd:p(),model:p(),kind:f([`hook`,...R.options]),tokens:ft,hookTurns:m()}),i({hookOpen:c(),lastModel:p().nullable(),lastMessageId:p().nullable(),lastMessageTokens:ft.nullable().optional(),pending:t(p(),R),pendingEstimates:g(i({kind:R,chars:m(),slot:p(),cwd:p()}))});function z(e,t){return t===null?`—`:`≈ ${s(e,t)}`}var B=l();function pt({totals:e,days:t}){let{stats:i}=n(),o=a(),s=t.slice(-7),c=_(s.map(e=>e.hookTokens)),l=_(s.map(e=>e.cliTokens)),u=e=>r(o,e);return(0,B.jsxs)(`div`,{className:x.totals,children:[(0,B.jsx)(S,{label:i.backlogTokens,value:u(e.tokens),note:i.backlogTokensNote(u(c),u(l))}),(0,B.jsx)(S,{label:i.apiPrice,value:z(o,e.cost),note:e.hasUnpricedTokens?i.unpricedNote:``}),(0,B.jsx)(S,{label:i.hookTurns,value:u(e.hookTurns),note:i.hookRunsNote(u(e.hookRuns))}),(0,B.jsx)(S,{label:i.cliCalls,value:u(e.cliRuns),note:``})]})}function mt({models:e}){let{stats:t}=n(),i=a();return(0,B.jsx)(v,{title:t.byModel,children:e.length===0?(0,B.jsx)(`p`,{className:y.muted,children:t.noModels}):(0,B.jsx)(C,{label:t.byModel,head:t.modelsHead,rows:e.map(e=>({key:`${e.model}:${e.fast}`,cells:[e.fast?t.fastModel(e.model):e.model,r(i,e.tokens),s(i,e.cost)]}))})})}function ht({commands:e}){let{stats:t}=n(),i=a();return(0,B.jsx)(v,{title:t.commandsTitle,children:e.length===0?(0,B.jsx)(`p`,{className:y.muted,children:t.noCommands}):(0,B.jsx)(C,{label:t.commandsTitle,head:t.commandsHead,rows:e.map(e=>({key:e.command,cells:[e.command,r(i,e.runs),t.milliseconds(e.avgMs),t.megabytes(e.avgRssMb),t.megabytes(e.maxRssMb)]}))})})}var gt=(e,t,n)=>D(e,`xAxis`,O(e,t),n),_t=(e,t,n)=>le(e,`xAxis`,O(e,t),n),vt=(e,t,n)=>D(e,`yAxis`,L(e,t),n),yt=(e,t,n)=>le(e,`yAxis`,L(e,t),n),bt=j([I,gt,vt,_t,yt],(e,t,n,r,i)=>Qe(e,`xAxis`)?Te(t,r,!1):Te(n,i,!1)),V=j([Ge,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),xt=e=>{var t=I(e);return Qe(t,`xAxis`)?`yAxis`:`xAxis`},St=(e,t)=>xt(e)===`yAxis`?L(e,t):O(e,t),Ct=(e,t,n)=>ae(e,xt(e),St(e,t),n),wt=j([V,Ct],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=ce(e);if(n!=null&&r!=null){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),Tt=j([V,Ct],(e,t)=>{if(e!=null&&e.stackId!=null&&t!=null){var n=t[e.stackId];if(n!=null)return n.graphicalItems.map(e=>e.dataKey).filter($e)}}),Et=j([I,gt,vt,_t,yt,wt,Se,bt,V,be,Tt],(e,t,n,r,i,a,o,s,c,l,u)=>{var d=o.chartData,f=o.dataStartIndex,p=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var m=c.data,h=m&&m.length>0?m:d?.slice(f,p+1);if(h!=null)return tn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),H=e(o()),Dt=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],Ot=[`id`,`baseLine`];function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(null,arguments)}function kt(e,t){if(e==null)return{};var n,r,i=At(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function At(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function jt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!A(a)||!A(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return k(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),k(c)?H.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function Mt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!A(a)||!A(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return k(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),k(c)?H.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function Nt(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?H.createElement(Mt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):H.createElement(jt,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function Pt(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r!==void 0&&r,a=e.isEntrance,o=a!==void 0&&a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=kt(e,Dt),f=s===`vertical`?`vertical`:`horizontal`,p=u??!1,m=te(),h=d.id,g=d.baseLine,_=kt(d,Ot),v=re(_),y=H.createElement(w,U({},d,{id:h,baseLine:g,connectNulls:p,stroke:`none`,className:`recharts-area-area`,layout:f})),b=l!==`none`&&H.createElement(w,U({},v,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:d.points})),x=l!==`none`&&c&&Array.isArray(g)&&H.createElement(w,U({},v,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:g}));return o&&(i||n<1)?H.createElement(E,null,H.createElement(`defs`,null,H.createElement(`clipPath`,{id:m},H.createElement(Nt,{alpha:n,points:d.points??[],baseLine:g,layout:f,strokeWidth:d.strokeWidth}))),H.createElement(E,{clipPath:`url(#${m})`},y,b,x)):H.createElement(H.Fragment,null,y,b,x)}var Ft=[`id`],It=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}function Lt(e,t){if(e==null)return{};var n,r,i=Rt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zt(Object(n),!0).forEach(function(t){Bt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bt(e,t,n){return(t=Vt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vt(e){var t=Ht(e,`string`);return typeof t==`symbol`?t:t+``}function Ht(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ut={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:de,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[G(G({},e.next),{},{x:M(e.prev.x,e.next.x,t),y:M(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:Pt,xAxisId:0,yAxisId:0,zIndex:xe.area};function K(e,t){return e&&e!==`none`?e:t}var Wt=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:K(r,i),value:Oe(n,t),payload:e}]},Gt=H.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:nt,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Oe(o,t),hide:s,type:u,color:K(r,a),unit:c,formatter:l,graphicalItemId:d}};return H.createElement(he,{tooltipEntrySettings:f})});function Kt(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=re(r);return H.createElement(lt,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function qt(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return G(G({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return H.createElement(ue,{value:t?r:void 0},n)}function Jt(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,s=e.isAnimating,c=e.isEntrance,l=a.layout,u=a.type,d=a.stroke,f=a.connectNulls,p=a.isRange,m=a.shape,h=a.id,g=Lt(a,Ft),_=G(G({},tt(g)),{},{id:h,points:t,connectNulls:f,type:u,baseLine:n,layout:l,stroke:d,isRange:p,animationElapsedTime:o,isAnimating:s,isEntrance:c});return H.createElement(H.Fragment,null,t?.length>1&&H.createElement(E,{clipPath:r?`url(#clipPath-${i})`:void 0},H.createElement(ie,{option:m,DefaultShape:Ut.shape,shapeProps:_})),H.createElement(Kt,{points:t,props:g,clipPathId:i}))}function Yt(e,t,n){if(k(e)){var r=k(t)?t:void 0;return M(r,e,n)}if(it(e)||Ce(e)){var i=k(t)?t:void 0;return M(i,0,n)}return e}function Xt(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,c=r.isAnimationActive,l=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationMatchBy,p=r.animationInterpolateFn,m=(0,H.useMemo)(()=>({points:o,baseLine:s}),[o,s]),h=T(m,a),g=Be(),_=Le(r.onAnimationStart,r.onAnimationEnd),v=_.isAnimating,y=_.handleAnimationStart,b=_.handleAnimationEnd,x=h.startValue;if(g==null)return null;var S=Array.isArray(s)&&Array.isArray(x)?Ie(x,s,f):Array.isArray(s)?Ie(null,s,f):null;return H.createElement(pe,{animationInput:m,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,onAnimationStart:y,onAnimationEnd:b,animationInterpolateFn:p,animationMatchBy:f,layout:g},(e,i,a)=>{var c=i===1?s:Array.isArray(s)?p(S,i,g):a?s:Yt(s,x,i);return h.syncStepValue(c,i),H.createElement(qt,{showLabels:!v,points:o},r.children,H.createElement(Jt,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:v||i<1,isEntrance:a}),H.createElement(ge,{label:r.label}))})}function Zt(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=(0,H.useRef)(null),a=(0,H.useRef)();return H.createElement(Xt,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var Qt=class extends H.PureComponent{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.needClip,c=e.xAxisId,l=e.yAxisId,u=e.width,d=e.height,f=e.id,p=e.baseLine,m=e.zIndex;if(t)return null;var h=me(`recharts-area`,i),g=f,_=st(n),v=_.r,y=_.strokeWidth,b=se(n),x=v*2+y,S=s?`url(#clipPath-${b?``:`dots-`}${g})`:void 0;return H.createElement(ye,{zIndex:m},H.createElement(E,{className:h},s&&H.createElement(`defs`,null,H.createElement(rt,{clipPathId:g,xAxisId:c,yAxisId:l}),!b&&H.createElement(`clipPath`,{id:`clipPath-dots-${g}`},H.createElement(`rect`,{x:o-x/2,y:a-x/2,width:u+x,height:d+x}))),H.createElement(Zt,{needClip:s,clipPathId:g,props:this.props})),H.createElement(ot,{points:r,mainColor:K(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}),this.props.isRange&&Array.isArray(p)&&H.createElement(ot,{points:p,mainColor:K(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}))}};function $t(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=Lt(e,It),g=qe(),_=oe(),v=Ee(p,m).needClip,y=Fe(),b=We(t=>Et(t,e.id,y))??{},x=b.points,S=b.isRange,C=b.baseLine,w=et();if(g!==`horizontal`&&g!==`vertical`||w==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var T=w.height,ee=w.width,E=w.x,te=w.y;return!x||!x.length?null:H.createElement(Qt,W({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:C,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:T,hide:l,layout:g,isAnimationActive:u,isRange:S,legendType:d,needClip:v,points:x,stroke:f,width:ee,left:E,top:te,xAxisId:p,yAxisId:m}))}var en=(e,t,n,r,i)=>{var a=n??t;if(k(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a===`dataMin`?l:a===`dataMax`||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]};function tn(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=e.stackDataKeys,g=a&&a.length,_=en(o,s,r,c,l),v=o===`horizontal`,y=!1,b=u.map((e,t)=>{var r;if(g)r=a[d+t];else{var o=N(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=N(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>N(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:He({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:x?null:l.scale.map(s)??null,value:r,payload:e}:{x:x?null:c.scale.map(s)??null,y:He({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:b,baseLine:(g||y?b.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):v?l.scale.map(_):c.scale.map(_))??0,isRange:y}}function nn(e){var t=ze(e,Ut),n=Fe();return H.createElement(ne,{id:t.id,type:`area`},e=>H.createElement(H.Fragment,null,H.createElement(fe,{legendPayload:Wt(t)}),H.createElement(Gt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),H.createElement(ve,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:Ye(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),H.createElement($t,W({},t,{id:e}))))}var q=H.memo(nn,Ae);q.displayName=`Area`;var rn=[`axis`],an=(0,H.forwardRef)((e,t)=>H.createElement(Ue,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:rn,tooltipPayloadSearcher:ee,categoricalChartProps:e,ref:t})),J=`var(--chart-line-bright)`,Y=`var(--chart-line-blue)`;function on(e,t){return Xe(n=>({title:ke(t,n.at),rows:[{label:e.processMemory,value:e.megabytes(n.rssMb),shape:`line`,color:J},{label:e.jsHeap,value:e.megabytes(n.heapUsedMb),shape:`dashed`,color:Y}]}))}function sn(){let{stats:e}=n(),t=a(),r=(0,H.useMemo)(()=>on(e,t),[e,t]),i=[{label:e.processMemory,shape:`line`,color:J},{label:e.jsHeap,shape:`dashed`,color:Y}],o=d().data?.samples??[],s=o.at(-1)?.rssMb??null,c=o.length===0?null:Math.max(...o.map(e=>e.rssMb));return(0,B.jsxs)(v,{title:e.serverMemory,children:[(0,B.jsx)(`p`,{className:y.muted,children:e.memoryRestartNote}),(0,B.jsx)(je,{summary:e.memorySummary(e.megabytes(s),e.megabytes(c)),legend:i,children:(0,B.jsxs)(an,{data:o,margin:Pe,"aria-label":e.chartLabel(e.serverMemory,`sample`),children:[(0,B.jsx)(_e,{vertical:!1}),(0,B.jsx)(Ne,{dataKey:`at`,tickFormatter:e=>De(t,e),...we}),(0,B.jsx)(P,{tickFormatter:t=>e.megabytes(t),width:60,...F}),(0,B.jsx)(at,{content:r,...Ve,cursor:{stroke:`var(--line-strong)`}}),(0,B.jsx)(q,{dataKey:`rssMb`,stroke:J,strokeWidth:3,fill:J,fillOpacity:.12,dot:!1,isAnimationActive:!1}),(0,B.jsx)(q,{dataKey:`heapUsedMb`,stroke:Y,strokeWidth:2,strokeDasharray:`5 4`,fill:`none`,dot:!1,isAnimationActive:!1})]})})]})}var X=`var(--chart-bar-warm)`,Z=`var(--chart-bar-neutral)`,Q=`var(--chart-line-green)`,$=`var(--chart-line-yellow)`;function cn(e,t){return Xe(n=>({title:Ze(t,n.day),rows:[{label:e.hookTurnsTooltip,value:e.tokens(n.hookTokens),shape:`bar`,color:X},{label:e.cliOutput,value:e.tokens(n.cliTokens),shape:`bar`,color:Z},{label:e.apiPriceTooltip,value:n.hasUnpricedTokens&&n.cost!==null?`${z(t,n.cost)} (${e.unpricedNote})`:z(t,n.cost)},{label:e.hookRuns,value:r(t,n.hookRuns),shape:`line`,color:Q},{label:e.otherCommands,value:r(t,n.cliRuns),shape:`dashed`,color:$}]}))}function ln({days:e}){let{stats:t}=n(),r=a(),i=(0,H.useMemo)(()=>cn(t,r),[t,r]),o=[{label:t.hookTurnTokens,shape:`bar`,color:X},{label:t.cliOutputTokens,shape:`bar`,color:Z},{label:t.hookRuns,shape:`line`,color:Q},{label:t.otherCommands,shape:`dashed`,color:$}],s=e=>Re(r,e);return(0,B.jsx)(v,{title:t.spendByDay,children:(0,B.jsx)(je,{summary:un(t,r,e),legend:o,children:(0,B.jsxs)(ct,{data:e,margin:Pe,"aria-label":t.chartLabel(t.spendByDay,`day`),children:[(0,B.jsx)(_e,{vertical:!1}),(0,B.jsx)(Ne,{dataKey:`day`,tickFormatter:e=>Je(r,e),...we}),(0,B.jsx)(P,{yAxisId:`tokens`,tickFormatter:s,width:60,...F}),(0,B.jsx)(P,{yAxisId:`runs`,orientation:`right`,allowDecimals:!1,tickFormatter:s,width:60,...F}),(0,B.jsx)(at,{content:i,...Ve}),(0,B.jsx)(Me,{yAxisId:`tokens`,dataKey:`hookTokens`,stackId:`tokens`,fill:X,isAnimationActive:!1}),(0,B.jsx)(Me,{yAxisId:`tokens`,dataKey:`cliTokens`,stackId:`tokens`,fill:Z,radius:Ke,isAnimationActive:!1}),(0,B.jsx)(ut,{yAxisId:`runs`,dataKey:`hookRuns`,stroke:Q,strokeWidth:3,dot:dt(Q),isAnimationActive:!1}),(0,B.jsx)(ut,{yAxisId:`runs`,dataKey:`cliRuns`,stroke:$,strokeWidth:2,strokeDasharray:`5 4`,dot:dt($),isAnimationActive:!1})]})})})}function un(e,t,n){let i=e=>_(n.map(e)),a=e=>r(t,e);return e.spendSummary({dayCount:n.length,hookTokens:i(e=>e.hookTokens),cliTokens:a(i(e=>e.cliTokens)),money:s(t,dn(n)),hookRuns:a(i(e=>e.hookRuns)),cliRuns:a(i(e=>e.cliRuns))})}function dn(e){return e.every(e=>e.cost===null)?null:_(e.map(e=>e.cost??0))}function fn(){let{projectId:e}=h(),t=u(e),{stats:r}=n();return(0,B.jsx)(b,{query:t,children:e=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(pn,{scan:e.scan}),(0,B.jsx)(hn,{report:e}),(0,B.jsx)(`p`,{className:x.note,children:r.costNote})]})})}function pn({scan:e}){let{stats:t}=n(),r=mn(t,e);return(0,B.jsx)(`p`,{className:r===null?`visually-hidden`:x.warning,role:`status`,children:r})}function mn(e,t){return t.listed?t.filesTotal===0?e.noTranscripts:t.bytesLeft>0?e.scanProgress(t.filesDone,t.filesTotal):null:e.scanStarting}function hn({report:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(pt,{totals:e.totals,days:e.days}),(0,B.jsxs)(`div`,{className:x.blocks,children:[(0,B.jsx)(`div`,{className:y.wide,children:(0,B.jsx)(ln,{days:e.days})}),(0,B.jsx)(mt,{models:e.models}),(0,B.jsx)(sn,{}),(0,B.jsx)(`div`,{className:y.wide,children:(0,B.jsx)(ht,{commands:e.commands})})]})]})}export{fn as CostTab};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,D as n,E as r,O as i,T as a,_n as o,c as s,gn as c,k as l,xt as u}from"./cx-CNNf0q6V.js";import{n as d}from"./start-BGXTwsB0.js";import{i as f,n as p,r as m}from"./StatsTabState-Br-8FgKd.js";import{t as h}from"./StatsPage.module-D8dvB8Va.js";import{t as g}from"./UnavailableRepos-KiTvsm1X.js";import{t as _}from"./Figure-BC1eGh3_.js";import{t as v}from"./StatsTable-BXG0IS8p.js";import{B as y,S as b,a as x,f as S,g as C,h as w,i as T,l as E,m as D,n as O,o as k,p as A,r as j,s as M,t as N,u as P,z as F}from"./ChartTooltip-DWaDSRan.js";var I=e(o()),L=[`axis`,`item`],R=(0,I.forwardRef)((e,t)=>I.createElement(A,{chartName:`BarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:L,tooltipPayloadSearcher:y,categoricalChartProps:e,ref:t})),z={steps:`_steps_advmo_1`,now:`_now_advmo_13`},B=c();function V({totals:e}){let{stats:t}=r(),n=a();return(0,B.jsx)(f,{title:t.explainerTitle,children:(0,B.jsxs)(`ol`,{className:z.steps,children:[(0,B.jsx)(`li`,{children:t.explainerTask}),(0,B.jsxs)(`li`,{children:[t.explainerFixed,(0,B.jsx)(H,{children:t.fixedNow(e.fixedTasks,e.fixedLines)})]}),(0,B.jsxs)(`li`,{children:[t.explainerPending,(0,B.jsx)(H,{children:U(t,e)})]}),(0,B.jsxs)(`li`,{children:[t.explainerTests,(0,B.jsx)(H,{children:t.codeAndTests(e)})]}),(0,B.jsxs)(`li`,{children:[t.explainerNoise,(0,B.jsx)(H,{children:W(t,n,e)})]})]})})}function H({children:e}){let{stats:t}=r();return(0,B.jsxs)(`span`,{className:z.now,children:[t.now,` `,e]})}function U(e,t){return t.openTasks===0?e.noPending:t.estimatedLines===null?e.pendingWithoutEstimate(t.openTasks):e.pendingEstimated(t.openTasks,t.estimatedLines,t.estimatedLines/t.openTasks)}function W(e,r,a){if(a.estimatedLines===null&&a.openTasks>0)return e.estimateLater;if(a.noiseShare===null)return e.noCommitsSinceAdoption;let o=a.estimatedLines??0,s=t(a.estimatedLines);return`${n(r,a.deferredLines,s)} ÷ (${i(r,a.realLines)} + ${n(r,o,s)}) ${l(a.noiseShare)}`}var G=`var(--chart-bar-neutral)`,K=`var(--accent-ink)`;function q(e,t,r,i){let a=e=>n(r,e,Math.round(e)>0);return N(n=>({title:i===`week`?e.weekOf(P(r,n.start)):P(r,n.start),rows:[{label:e.inPullRequests,value:t.count(Math.round(n.onTopicLines),`line`),shape:`bar`,color:G},{label:e.deferredSeries,value:a(n.deferredLines),shape:`hatch`,color:K},{label:e.codeLines,value:a(n.deferredLines-n.deferredTestLines)},{label:e.testLines,value:a(n.deferredTestLines)},{label:e.deferredTasks,value:String(n.deferredTasks)}]}))}function J({periods:e,totals:n,grain:i}){let{stats:o,core:s}=r(),c=a(),u=(0,I.useMemo)(()=>q(o,s,c,i),[o,s,c,i]),d=(0,I.useId)(),f=[{label:o.inPullRequests,shape:`bar`,color:G},{label:o.deferredSeries,shape:`hatch`,color:K}],p=o.linesText(n.deferredLines,t(n.estimatedLines)),m=o.effectSummary(n.realLines,p,l(n.noiseShare));return(0,B.jsx)(S,{summary:m,legend:f,children:(0,B.jsxs)(R,{data:e,margin:T,"aria-label":o.chartLabel(o.effectTitle,i),children:[(0,B.jsx)(`defs`,{children:(0,B.jsxs)(`pattern`,{id:d,width:`6`,height:`6`,patternUnits:`userSpaceOnUse`,patternTransform:`rotate(45)`,children:[(0,B.jsx)(`rect`,{width:`6`,height:`6`,fill:`var(--surface-raised)`}),(0,B.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`6`,stroke:K,strokeWidth:`3`})]})}),(0,B.jsx)(b,{vertical:!1}),(0,B.jsx)(w,{dataKey:`start`,tickFormatter:e=>M(c,e),...x}),(0,B.jsx)(D,{tickFormatter:e=>E(c,e),width:60,...O}),(0,B.jsx)(F,{content:u,...k}),(0,B.jsx)(C,{dataKey:`onTopicLines`,stackId:`lines`,fill:G,isAnimationActive:!1}),(0,B.jsx)(C,{dataKey:`deferredLines`,stackId:`lines`,fill:`url(#${d})`,radius:j,isAnimationActive:!1})]})})}function Y({totals:e}){let{stats:t}=r(),n=a();return(0,B.jsxs)(`div`,{className:h.totals,children:[(0,B.jsx)(_,{label:t.keptOut,value:X(t,e),note:`${Z(t,n,e)} · ${t.codeAndTests(e)}`}),(0,B.jsx)(_,{label:t.noiseWithoutBacklog,value:l(e.noiseShare),note:t.noiseNote}),(0,B.jsx)(_,{label:t.deferredToBacklog,value:String(e.fixedTasks+e.openTasks),note:t.deferredNote(e.fixedTasks,e.openTasks)}),(0,B.jsx)(_,{label:t.pullRequestLines,value:i(n,e.realLines),note:t.sinceAdoption})]})}function X(e,n){return n.estimatedLines===null?e.linesText(n.fixedLines,!1):e.linesText(n.deferredLines,t(n.estimatedLines))}function Z(e,r,a){let o=i(r,a.fixedLines);return a.estimatedLines===null?e.keptOutPending(o):e.keptOutEstimated(o,n(r,a.estimatedLines,t(a.estimatedLines)))}function Q({weeks:e,days:t,totals:n}){let{stats:i}=r(),[a,o]=(0,I.useState)(`week`),s=(0,B.jsxs)(`span`,{role:`group`,"aria-label":i.chartScale,className:m.grain,children:[(0,B.jsx)(d,{pressed:a===`week`,onToggle:()=>o(`week`),children:i.grainWeek}),(0,B.jsx)(d,{pressed:a===`day`,onToggle:()=>o(`day`),children:i.grainDay})]});return(0,B.jsx)(f,{title:i.effectTitle,aside:s,children:(0,B.jsx)(J,{periods:a===`week`?e:t,totals:n,grain:a})})}function $({projects:e}){let{stats:o}=r(),s=a();return(0,B.jsx)(f,{title:o.byProject,children:e.length===0?(0,B.jsx)(`p`,{className:m.muted,children:o.noCodeData}):(0,B.jsx)(v,{label:o.byProject,head:o.projectsHead,rows:e.map(e=>({key:e.projectId,cells:[e.name,e.deferredTasks,i(s,e.fixedLines),e.estimatedLines===null?`—`:n(s,e.estimatedLines,t(e.estimatedLines)),i(s,e.realLines),l(e.noiseShare)]}))})})}function ee(){let{projectId:e}=u(),t=s(e);return(0,B.jsx)(p,{query:t,children:e=>(0,B.jsx)(te,{report:e})})}function te({report:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(g,{repos:e.unavailableRepos}),(0,B.jsx)(Y,{totals:e.totals}),(0,B.jsxs)(`div`,{className:h.blocks,children:[(0,B.jsx)(`div`,{className:m.wide,children:(0,B.jsx)(Q,{weeks:e.weeks,days:e.days,totals:e.totals})}),(0,B.jsx)(`div`,{className:m.wide,children:(0,B.jsx)($,{projects:e.projects})}),(0,B.jsx)(`div`,{className:m.wide,children:(0,B.jsx)(V,{totals:e.totals})})]})]})}export{ee as EffectTab};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{_n as t,gn as n,t as r}from"./cx-CNNf0q6V.js";import{t as i}from"./StatsPage.module-D8dvB8Va.js";var a=e(t(),1),o=n();function s({label:e,value:t,note:n,tone:s,trend:c}){let l=(0,a.useId)();return(0,o.jsxs)(`div`,{className:i.figure,role:`group`,"aria-labelledby":l,children:[(0,o.jsx)(`span`,{id:l,className:i.figureLabel,children:e}),(0,o.jsx)(`span`,{className:r(i.figureValue,s===`growth`&&i.growth,s===`decline`&&i.decline),children:t}),c!==void 0&&(0,o.jsxs)(`span`,{className:r(i.figureTrend,c.better?i.decline:i.growth),children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,children:c.text}),(0,o.jsx)(`span`,{className:`visually-hidden`,children:c.speech})]}),(0,o.jsx)(`span`,{className:i.figureNote,children:n})]})}export{s as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{E as t,M as n,P as r,T as i,_ as a,_n as o,gn as s,j as c,t as l,xt as u}from"./cx-CNNf0q6V.js";import{l as d,s as f,u as ee}from"./start-BGXTwsB0.js";import{i as p,n as te,r as m}from"./StatsTabState-Br-8FgKd.js";import{t as h}from"./StatsPage.module-D8dvB8Va.js";import{t as g}from"./Figure-BC1eGh3_.js";import{S as _,a as v,f as y,g as b,h as x,i as S,l as C,m as w,n as T,o as E,r as D,s as O,t as k,u as A,z as j}from"./ChartTooltip-DWaDSRan.js";import{n as M,r as N,t as ne}from"./value-dot-W-8PsGpd.js";var P={columns:`_columns_1m2da_1`,countList:`_countList_1m2da_7`,ageRows:`_ageRows_1m2da_11`,ageRow:`_ageRow_1m2da_11`,ageLabel:`_ageLabel_1m2da_25`,ageTrack:`_ageTrack_1m2da_29`,ageSegment:`_ageSegment_1m2da_37`,legend:`_legend_1m2da_41`,legendItem:`_legendItem_1m2da_50`,share:`_share_1m2da_61`,critical:`_critical_1m2da_65`,high:`_high_1m2da_69`,medium:`_medium_1m2da_73`,low:`_low_1m2da_77`,done:`_done_1m2da_81`,fixed:`_fixed_1m2da_85`,obsolete:`_obsolete_1m2da_89`,duplicate:`_duplicate_1m2da_93`,cancelled:`_cancelled_1m2da_97`,unknown:`_unknown_1m2da_101`,shareBar:`_shareBar_1m2da_105`,alarm:`_alarm_1m2da_117`,alarmOn:`_alarmOn_1m2da_123`},F=s();function I(e,t){let n=[...r].reverse().filter(e=>t[e]>0).map(n=>`${e.priorityCounts[n]} ${t[n]}`);return n.length===0?``:` (${n.join(`, `)})`}function L({age:e}){let{stats:n,core:i}=t(),a=e.buckets.map(({bucket:e,byPriority:t})=>({bucket:e,total:d(r.map(e=>t[e])),byPriority:t})),o=Math.max(1,...a.map(({total:e})=>e)),s=a.map(({bucket:e,total:t,byPriority:r})=>`${n.ageBuckets[e]}: ${t}${I(n,r)}`).join(`; `);return(0,F.jsxs)(p,{title:n.openAge,children:[(0,F.jsx)(`div`,{role:`img`,"aria-label":s,className:P.ageRows,children:a.map(({bucket:e,total:t,byPriority:i})=>(0,F.jsxs)(`div`,{className:P.ageRow,"aria-hidden":`true`,children:[(0,F.jsx)(`span`,{className:P.ageLabel,children:n.ageBuckets[e]}),(0,F.jsx)(`span`,{className:P.ageTrack,children:r.map(e=>(0,F.jsx)(`span`,{className:l(P.ageSegment,P[e]),style:{width:`${i[e]/o*100}%`}},e))}),(0,F.jsx)(`span`,{className:m.rowValue,children:t})]},e))}),(0,F.jsx)(`p`,{className:P.legend,children:[...r].reverse().map(e=>(0,F.jsx)(`span`,{className:l(P.legendItem,P[e]),children:i.priorityLabel(e)},e))}),(0,F.jsx)(`p`,{className:l(P.alarm,e.urgentStale>0&&P.alarmOn),children:n.urgentStale(e.urgentStale)})]})}var R=[`done`,`fixed`,`obsolete`,`duplicate`,`cancelled`,`unknown`];function z(e,{stats:t,core:n}){return e===`done`||e===`cancelled`||e===`unknown`?t.closingReasons[e]:n.resolutionLabel(e)}function B({closing:e}){let n=t(),{stats:r}=n,i=d(R.map(t=>e.byReason[t])),a=R.map(t=>`${z(t,n)}: ${e.byReason[t]}`).join(`; `);return(0,F.jsxs)(p,{title:r.closing,children:[(0,F.jsx)(`div`,{role:`img`,"aria-label":a,className:P.shareBar,children:R.map(t=>(0,F.jsx)(`span`,{className:l(P.share,P[t]),style:{width:i===0?0:`${e.byReason[t]/i*100}%`}},t))}),(0,F.jsx)(`ul`,{className:m.rows,children:R.map(t=>(0,F.jsxs)(`li`,{className:m.row,children:[(0,F.jsx)(`span`,{className:l(P.legendItem,P[t]),children:z(t,n)}),(0,F.jsx)(`span`,{className:m.rowValue,children:e.byReason[t]})]},t))}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{className:m.subTitle,children:r.noiseAndReopens}),(0,F.jsxs)(`ul`,{className:m.rows,children:[(0,F.jsx)(V,{label:r.duplicatesAmongClosed,value:c(e.duplicateShare)}),(0,F.jsx)(V,{label:r.noSourceAmongCreated,value:c(e.withoutSourceShare)}),(0,F.jsx)(V,{label:r.reopened,value:e.reopened})]})]})]})}function V({label:e,value:t}){return(0,F.jsxs)(`li`,{className:m.row,children:[(0,F.jsx)(`span`,{className:m.rowLabel,children:e}),(0,F.jsx)(`span`,{className:m.rowValue,children:t})]})}var H=`↓`,U=`↑`;function W(e,t,n,r){if(t===null||n===null)return;let i=t-n;if(i===0)return;let a=i<0,o=r(Math.abs(i));return{text:e.weekTrend(a?H:U,o),speech:e.weekTrendSpeech(o,a),better:a}}function G({hotspots:e,listPath:n}){let{stats:r}=t();return(0,F.jsx)(p,{title:r.hotspots,children:(0,F.jsxs)(`div`,{className:P.columns,children:[(0,F.jsx)(K,{title:r.folders,empty:r.noSourceFolders,items:e.folders.map(({label:e,count:t})=>({key:e,label:(0,F.jsx)(`code`,{children:e}),count:t}))}),(0,F.jsx)(K,{title:r.tags,empty:r.noTags,items:e.tags.map(({tag:e,count:t})=>({key:e,label:(0,F.jsxs)(ee,{to:{pathname:n,search:`tag=${encodeURIComponent(e)}`},children:[`#`,e]}),count:t}))})]})})}function K({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,F.jsxs)(`div`,{className:P.countList,children:[(0,F.jsx)(`h3`,{className:m.subTitle,children:e}),n.length===0?(0,F.jsx)(`p`,{className:m.muted,children:t}):(0,F.jsx)(`ul`,{className:m.rows,children:n.map(e=>(0,F.jsxs)(`li`,{className:m.countRow,children:[(0,F.jsx)(`span`,{className:m.rowLabel,children:e.label}),(0,F.jsx)(`span`,{className:m.rowValue,children:e.count}),(0,F.jsx)(`span`,{className:m.track,"aria-hidden":`true`,children:(0,F.jsx)(`span`,{className:m.fill,style:{transform:`scaleX(${e.count/r})`}})})]},e.key))})]})}var q=e(o(),1),J=`var(--chart-bar-warm)`;function Y(e,t,n){return k(r=>({title:A(n,r.day),rows:[{label:e.flowCreated,value:t.count(r.created,`task`),shape:`bar`,color:J}]}))}function X({days:e}){let{stats:n,core:r}=t(),a=i(),o=(0,q.useMemo)(()=>Y(n,r,a),[n,r,a]),s=[{label:n.createdTasks,shape:`bar`,color:J}];return(0,F.jsx)(p,{title:n.createdByDay,children:(0,F.jsx)(y,{summary:n.intakeSummary(e.length,d(e.map(e=>e.created))),legend:s,children:(0,F.jsxs)(M,{data:e,margin:S,"aria-label":n.chartLabel(n.createdByDay,`day`),children:[(0,F.jsx)(_,{vertical:!1}),(0,F.jsx)(x,{dataKey:`day`,tickFormatter:e=>O(a,e),...v}),(0,F.jsx)(w,{allowDecimals:!1,tickFormatter:e=>C(a,e),width:60,...T}),(0,F.jsx)(j,{content:o,...E}),(0,F.jsx)(b,{dataKey:`created`,fill:J,radius:D,isAnimationActive:!1})]})})})}var Z=`var(--chart-bar-neutral)`,Q=`var(--chart-bar-green)`,$=`var(--chart-line-bright)`;function re(e,t){return k(n=>({title:e.weekOf(A(t,n.start)),rows:[{label:e.flowCreated,value:String(n.created),shape:`bar`,color:Z},{label:e.flowClosed,value:String(n.closed),shape:`bar`,color:Q},{label:e.flowOpen,value:String(n.openAtEnd),shape:`line`,color:$}]}))}function ie({weeks:e}){let{stats:n}=t(),r=i(),a=(0,q.useMemo)(()=>re(n,r),[n,r]),o=[{label:n.flowCreated,shape:`bar`,color:Z},{label:n.flowClosed,shape:`bar`,color:Q},{label:n.flowOpenAtWeekEnd,shape:`line`,color:$}],s=n.flowSummary({weekCount:e.length,created:d(e.map(e=>e.created)),closed:d(e.map(e=>e.closed)),openNow:e.at(-1)?.openAtEnd??0}),c=e=>C(r,e);return(0,F.jsx)(y,{summary:s,legend:o,children:(0,F.jsxs)(M,{data:e,margin:S,"aria-label":n.chartLabel(n.debtByWeek,`week`),children:[(0,F.jsx)(_,{vertical:!1}),(0,F.jsx)(x,{dataKey:`start`,tickFormatter:e=>O(r,e),...v}),(0,F.jsx)(w,{yAxisId:`flow`,allowDecimals:!1,tickFormatter:c,width:60,...T}),(0,F.jsx)(w,{yAxisId:`open`,orientation:`right`,allowDecimals:!1,tickFormatter:c,width:60,...T}),(0,F.jsx)(j,{content:a,...E}),(0,F.jsx)(b,{yAxisId:`flow`,dataKey:`created`,fill:Z,radius:D,isAnimationActive:!1}),(0,F.jsx)(b,{yAxisId:`flow`,dataKey:`closed`,fill:Q,radius:D,isAnimationActive:!1}),(0,F.jsx)(N,{yAxisId:`open`,dataKey:`openAtEnd`,stroke:$,strokeWidth:3,dot:ne($),isAnimationActive:!1})]})})}function ae(){let{projectId:e}=u(),t=a(e);return(0,F.jsx)(te,{query:t,children:t=>(0,F.jsx)(oe,{report:t,listPath:f(e)})})}function oe({report:e,listPath:n}){let{stats:r}=t();return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(se,{totals:e.totals}),(0,F.jsxs)(`div`,{className:h.blocks,children:[(0,F.jsx)(p,{title:r.debtByWeek,children:(0,F.jsx)(ie,{weeks:e.weeks})}),(0,F.jsx)(X,{days:e.days}),(0,F.jsx)(G,{hotspots:e.hotspots,listPath:n}),(0,F.jsx)(L,{age:e.age}),(0,F.jsx)(B,{closing:e.closing})]})]})}function se({totals:e}){let{stats:r}=t(),i=e.createdLastWeek-e.closedLastWeek,a=e.previous;return(0,F.jsxs)(`div`,{className:l(h.totals,h.totalsPair),children:[(0,F.jsx)(g,{label:r.tasksToday,value:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{className:e.createdToday>0?h.growth:void 0,children:[`+`,e.createdToday]}),` `,(0,F.jsxs)(`span`,{className:e.closedToday>0?h.decline:void 0,children:[`−`,e.closedToday]})]}),note:r.createdAndClosed}),(0,F.jsx)(g,{label:r.thisWeek,value:n(i),tone:ce(i),note:r.weekNote(e.createdLastWeek,e.closedLastWeek),trend:W(r,i,a?.net??null,String)})]})}function ce(e){if(e>0)return`growth`;if(e<0)return`decline`}export{ae as OverviewTab};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{E as t,T as n,_n as r,f as i,gn as a,j as o,xt as s}from"./cx-CNNf0q6V.js";import{l as c}from"./start-BGXTwsB0.js";import{i as l,n as u,r as d}from"./StatsTabState-Br-8FgKd.js";import{t as f}from"./StatsPage.module-D8dvB8Va.js";import{t as p}from"./StatsTable-BXG0IS8p.js";import{S as m,a as h,f as g,g as _,h as v,i as y,m as b,n as x,o as S,r as C,s as w,t as T,u as E,z as D}from"./ChartTooltip-DWaDSRan.js";import{n as O,r as k,t as A}from"./value-dot-W-8PsGpd.js";var j=e(r(),1),M=a(),N=`var(--chart-bar-neutral)`,P=`var(--chart-line-green)`;function F(e,t){return T(n=>({title:e.weekOf(E(t,n.start)),rows:[{label:e.decidedCandidates,value:String(n.decided),shape:`bar`,color:N},{label:e.precision,value:o(n.precision),shape:`line`,color:P}]}))}function I({weeks:e}){let{stats:r}=t(),i=n(),a=(0,j.useMemo)(()=>F(r,i),[r,i]),s=[{label:r.decidedCandidates,shape:`bar`,color:N},{label:r.precision,shape:`line`,color:P}],l=c(e.map(e=>e.decided)),u=e.filter(e=>e.precision!==null).at(-1),d=r.accuracySummary(e.length,l,u===void 0?null:o(u.precision));return(0,M.jsx)(g,{summary:d,legend:s,children:(0,M.jsxs)(O,{data:e,margin:y,"aria-label":r.chartLabel(r.accuracyTitle,`week`),children:[(0,M.jsx)(m,{vertical:!1}),(0,M.jsx)(v,{dataKey:`start`,tickFormatter:e=>w(i,e),...h}),(0,M.jsx)(b,{yAxisId:`decided`,width:60,...x}),(0,M.jsx)(b,{yAxisId:`precision`,orientation:`right`,domain:[0,1],tickFormatter:e=>`${Math.round(e*100)}%`,width:60,...x}),(0,M.jsx)(D,{content:a,...S}),(0,M.jsx)(_,{yAxisId:`decided`,dataKey:`decided`,fill:N,radius:C,isAnimationActive:!1}),(0,M.jsx)(k,{yAxisId:`precision`,type:`monotone`,dataKey:`precision`,stroke:P,strokeWidth:2,connectNulls:!0,dot:A(P),isAnimationActive:!1})]})})}function L({rows:e,weeks:n,methodRows:r,matchRows:i}){let{stats:a,core:s}=t(),c=e=>e===`source-changed`?r.map(e=>R(a,e,e.by===`unknown`?a.beforeMethodRecorded:a.checkedBy(s.checkMethodLabel(e.by)))):e===`duplicate`?i.map(e=>R(a,e,e.by===`unknown`?a.beforeMatchRecorded:a.matchedBy(s.duplicateMatchLabel(e.by)))):[];return(0,M.jsx)(l,{title:a.accuracyTitle,children:e.length===0?(0,M.jsx)(`p`,{className:d.muted,children:a.noCandidates}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`p`,{className:d.muted,children:a.accuracyHint}),(0,M.jsx)(I,{weeks:n}),(0,M.jsx)(p,{label:a.accuracyTable,head:a.accuracyHead,rows:e.flatMap(e=>[{key:e.evidence,tone:e.evidence===`total`?`total`:void 0,cells:[s.evidenceLabel(e.evidence),e.candidates,e.closed,e.verified,e.open,o(e.precision)]},...c(e.evidence).map(t=>({...t,key:`${e.evidence}-${t.key}`}))])})]})})}function R(e,t,n){return{key:t.by,tone:`child`,cells:[e.splitRow(n),t.candidates,t.closed,t.verified,t.open,o(t.precision)]}}function z({graph:e}){let{stats:n,core:r}=t(),{projects:i,filter:a}=e;return a.filtered===0&&i.every(e=>e.state===`none`)?(0,M.jsx)(l,{title:n.graphTitle,children:(0,M.jsx)(`p`,{className:d.muted,children:n.graphMissing(e=>(0,M.jsx)(`code`,{children:e},e))})}):(0,M.jsxs)(l,{title:n.graphTitle,children:[(0,M.jsx)(`p`,{className:d.muted,children:n.graphHint}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:d.subTitle,children:n.filteredTitle}),a.filtered===0?(0,M.jsx)(`p`,{className:d.muted,children:n.nothingFiltered}):(0,M.jsx)(p,{label:n.filteredTable,head:n.filteredHead,rows:[{key:`filtered`,cells:[n.filteredByGraph,a.filtered]},{key:`caught`,cells:[n.filteredCaught,a.caught]},{key:`missed`,cells:[n.filteredMissed,a.missed]},{key:`quiet`,cells:[n.filteredQuiet,a.quiet]}]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:d.subTitle,children:n.projects}),(0,M.jsx)(p,{label:n.graphByProject,head:n.graphHead,rows:i.map(e=>({key:e.projectId,cells:[e.name,r.graphStateLabel(e.state),e.pinned,B(e)]}))})]})]})}function B({state:e,pinned:t,resolved:n}){return e===`none`||e===`unreadable`?`—`:`${n} (${o(t===0?null:n/t)})`}function V({rows:e}){let{stats:n,core:r}=t(),i=e=>e.category===`unknown`?n.categoryUnknown:r.categoryLabel(e.category??void 0);return(0,M.jsx)(l,{title:n.categoriesTitle,children:e.length===0?(0,M.jsx)(`p`,{className:d.muted,children:n.categoriesEmpty}):(0,M.jsx)(p,{label:n.categoriesTitle,head:n.categoriesHead,rows:e.map(e=>({key:e.category??`none`,cells:[i(e),e.open,e.weight,e.created,e.closed]}))})})}function H({found:e,branches:n}){let{stats:r}=t(),i=e=>e.found===null?r.foundNotRecorded:e.found===`unknown`?r.foundUnknown:r.foundLabels[e.found];return(0,M.jsxs)(l,{title:r.originTitle,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:d.subTitle,children:r.foundTitle}),(0,M.jsx)(p,{label:r.foundTitle,head:r.foundHead,rows:e.map(e=>({key:e.found??`not-recorded`,cells:[i(e),e.created,e.open,e.fixed]}))})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:d.subTitle,children:r.branchesTitle}),n.length===0?(0,M.jsx)(`p`,{className:d.muted,children:r.branchesEmpty}):(0,M.jsx)(p,{label:r.branchesTitle,head:r.branchesHead,rows:n.map(e=>({key:e.label,cells:[(0,M.jsx)(`code`,{children:e.label}),e.created,e.open]}))})]})]})}function U(){let{projectId:e}=s(),t=i(e);return(0,M.jsx)(u,{query:t,children:e=>(0,M.jsx)(W,{report:e})})}function W({report:e}){return(0,M.jsxs)(`div`,{className:f.blocks,children:[(0,M.jsx)(`div`,{className:d.wide,children:(0,M.jsx)(L,{rows:e.accuracy,weeks:e.accuracyWeeks,methodRows:e.methodAccuracy,matchRows:e.matchAccuracy})}),(0,M.jsx)(`div`,{className:d.wide,children:(0,M.jsx)(z,{graph:e.graph})}),(0,M.jsx)(`div`,{className:d.wide,children:(0,M.jsx)(V,{rows:e.categories})}),(0,M.jsx)(`div`,{className:d.wide,children:(0,M.jsx)(H,{found:e.found,branches:e.branches})})]})}export{U as QualityTab};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{E as t,Wt as n,_n as r,d as i,g as a,gn as o,ht as s,t as c,vt as l,xt as u}from"./cx-CNNf0q6V.js";import{a as d,c as f,d as p,o as m,t as h,u as g}from"./start-BGXTwsB0.js";import{t as _}from"./StatsPage.module-D8dvB8Va.js";var v=e(r(),1),y=o();function b(){let{projectId:e}=u(),{pathname:r}=s(),o=i(),b=a(e),{app:x,core:S,stats:C}=t(),w=e===void 0?C.projects:d(o.data,e),T=C.heading(w),E=f(e),D=e=>e===``?E:`${E}/${e}`,O=(e,t)=>n({path:D(e),end:!0},t)!==null,k=h.find(e=>e.segment!==``&&O(e.segment,r))??h[0],A=l().location?.pathname,j=(0,v.useRef)(null),M=A===void 0?void 0:h.find(e=>O(e.segment,A)),N=C.docTitle(k.segment===``?T:`${C.tabs[k.key]} · ${T}`);return(0,v.useEffect)(()=>{document.title=N},[N]),(0,y.jsxs)(`main`,{id:`content`,tabIndex:-1,className:_.page,"aria-busy":M!==void 0||void 0,children:[(0,y.jsx)(`h1`,{ref:j,tabIndex:-1,className:_.heading,children:T}),e===void 0&&o.data!==void 0&&(0,y.jsx)(`p`,{className:_.scopeNote,children:m(o.data,x)}),(b.data?.signals.length??0)>0&&(0,y.jsxs)(`div`,{className:_.signals,role:`status`,"aria-labelledby":`stats-signals-heading`,children:[(0,y.jsx)(`strong`,{id:`stats-signals-heading`,className:_.signalsTitle,children:C.alerts}),(0,y.jsx)(`ul`,{children:b.data?.signals.map(e=>(0,y.jsx)(`li`,{children:S.signal(e)},e.kind))})]}),(0,y.jsx)(`nav`,{className:_.tabs,"aria-label":C.tabsLabel,children:h.map(e=>(0,y.jsx)(g,{to:D(e.segment),className:c(_.tab,e===k&&_.tabActive,e===M&&_.tabPending),"aria-current":e===k?`page`:void 0,children:C.tabs[e.key]},e.key))}),(0,y.jsx)(p,{context:{heading:j}})]})}export{b as StatsPage};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{E as t,S as n,T as r,_n as i,bt as a,gn as o,nt as s,t as c}from"./cx-CNNf0q6V.js";import{i as l,r as u}from"./start-BGXTwsB0.js";import{t as d}from"./StatsPage.module-D8dvB8Va.js";var f=e(i(),1),p={panel:`_panel_1ke0e_1`,head:`_head_1ke0e_14`,title:`_title_1ke0e_21`},m=o();function h({title:e,aside:t,children:n}){let r=(0,f.useId)();return(0,m.jsxs)(`section`,{className:p.panel,"aria-labelledby":r,children:[(0,m.jsxs)(`div`,{className:p.head,children:[(0,m.jsx)(`h2`,{id:r,className:p.title,children:e}),t]}),n]})}var g={muted:`_muted_14ll2_1`,subTitle:`_subTitle_14ll2_7`,rows:`_rows_14ll2_14`,countRow:`_countRow_14ll2_28`,row:`_row_14ll2_14`,rowLabel:`_rowLabel_14ll2_41`,rowValue:`_rowValue_14ll2_58`,wide:`_wide_14ll2_64`,track:`_track_14ll2_68`,fill:`_fill_14ll2_75`,grain:`_grain_14ll2_82`};function _({query:e,emptyMessage:r=null,children:i}){let{stats:o}=t(),{error:s,data:f,isFetching:p}=e,h=f!==void 0,g=s instanceof n&&s.status===404,_=g?null:s,v=s===null&&!h,b=y(o,s,g,h,r),{status:x,keepFocus:S}=u(b===null&&_===null,a()?.heading);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{ref:x,tabIndex:-1,role:`status`,"aria-live":`polite`,className:b===null&&_===null?`visually-hidden`:c(d.hint,v&&d.hintLoading),children:[b!==null&&(0,m.jsx)(`p`,{children:b}),_!==null&&(0,m.jsx)(l,{error:_,fetching:p,onRetry:()=>{S(),e.refetch()}})]}),!g&&f!==void 0&&r===null&&(0,m.jsx)(`div`,{className:d.content,children:i(f)})]})}function v({query:e,children:n}){let{stats:i}=t(),a=r(),o=e.data?.invalidJournalLines??0,s=e.data?.unknownJournalLines??0,c=e.data?.unparsedTasks??0,l=[o>0?i.invalidJournalLines(o):null,s>0?i.unknownJournalLines(s):null,c>0?i.unparsedTasks(c):null].filter(e=>e!==null);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`p`,{className:l.length>0?d.warning:`visually-hidden`,role:`status`,children:l.join(` `)}),(0,m.jsx)(_,{query:e,emptyMessage:e.data?.taskCount===0?i.noTasks:null,children:e=>(0,m.jsxs)(m.Fragment,{children:[n(e),(0,m.jsx)(`p`,{className:d.note,children:b(i,a,e.journalSince)})]})})]})}function y(e,t,n,r,i){return n?e.projectNotFound:t===null?r?i:e.loading:null}function b(e,t,n){return n===null?e.journalEmpty:e.journalSince(s(t,n))}export{h as i,v as n,g as r,_ as t};