efficient-shell 8.0.0 → 8.0.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 (53) hide show
  1. package/README.md +1 -1
  2. package/dist/{Browser-5BF4O6KA.js → Browser-WABHNBLH.js} +14 -14
  3. package/dist/{Documents-QVVIGL32.js → Documents-C67EDIA2.js} +8 -8
  4. package/dist/{Files-BBG7FAHH.js → Files-V46YR5GY.js} +19 -19
  5. package/dist/{Notepad-EJZMYSON.js → Notepad-FSE73NLM.js} +8 -8
  6. package/dist/{Preview-7WUO44K6.js → Preview-QVZ5SDAJ.js} +1 -1
  7. package/dist/{Spreadsheet-3EGL6YHL.js → Spreadsheet-QYKJENFO.js} +9 -9
  8. package/dist/apps/index.js +1 -1
  9. package/dist/bin/ui-check.js +1 -1
  10. package/dist/charts/BoxPlotChart.js +1 -1
  11. package/dist/charts/CandlestickChart.js +1 -1
  12. package/dist/charts/CartesianPlot.js +1 -1
  13. package/dist/charts/ChordChart.js +1 -1
  14. package/dist/charts/ColumnChart.js +1 -1
  15. package/dist/charts/HeatmapChart.js +1 -1
  16. package/dist/charts/HistogramChart.js +1 -1
  17. package/dist/charts/RadarChart.js +1 -1
  18. package/dist/charts/RangeChart.js +1 -1
  19. package/dist/charts/SankeyChart.js +1 -1
  20. package/dist/charts/ScatterChart.js +1 -1
  21. package/dist/charts/SunburstChart.js +1 -1
  22. package/dist/charts/TimeSeriesChart.js +1 -1
  23. package/dist/charts/TreemapChart.js +1 -1
  24. package/dist/charts/WaterfallChart.js +1 -1
  25. package/dist/{chunk-IFXAQO67.js → chunk-3KWPVW2D.js} +1 -1
  26. package/dist/{chunk-LXV7ANUQ.js → chunk-3WQWA5P5.js} +2 -2
  27. package/dist/{chunk-7BSBTDKK.js → chunk-4JSR7A7L.js} +4 -4
  28. package/dist/{chunk-4KAR6P2W.js → chunk-EWQY4JAO.js} +1 -1
  29. package/dist/{chunk-ZECGF5LS.js → chunk-IJBRRPVS.js} +1 -1
  30. package/dist/chunk-L5Y5HVUL.js +1 -0
  31. package/dist/{chunk-JS34LPLL.js → chunk-MIXJ7CQJ.js} +6 -6
  32. package/dist/{chunk-SRCPFYYU.js → chunk-PGAMTK7Y.js} +14 -14
  33. package/dist/{chunk-TUR6CTGT.js → chunk-PHH2U3OV.js} +2 -2
  34. package/dist/{chunk-K62MSU6T.js → chunk-POYKJ4DY.js} +4 -4
  35. package/dist/{chunk-3NQDUKH6.js → chunk-T3OGD6KJ.js} +1 -1
  36. package/dist/chunk-UNDP25FA.js +2 -0
  37. package/dist/{chunk-5H4ZKLNG.js → chunk-VFWEIP2P.js} +5 -5
  38. package/dist/chunk-X2S2XDZI.js +1 -0
  39. package/dist/{chunk-K5Q5RIQT.js → chunk-YLVBWVMX.js} +5 -5
  40. package/dist/{chunk-EHV7LRGU.js → chunk-YTCLAQYX.js} +9 -9
  41. package/dist/format/index.js +1 -1
  42. package/dist/index.js +81 -81
  43. package/dist/shell/TimeAgo.js +1 -1
  44. package/dist/telemetry/index.js +1 -1
  45. package/dist/templates/DashboardTemplate.js +1 -1
  46. package/dist/ui/index.js +1 -1
  47. package/dist/utils/format.d.ts +4 -2
  48. package/dist/utils/format.js +1 -1
  49. package/dist/version.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/chunk-GZFM5V5L.js +0 -1
  52. package/dist/chunk-MFUGVAP5.js +0 -2
  53. package/dist/chunk-Y6CIIF65.js +0 -1
@@ -1,19 +1,19 @@
1
- import{ChartBrush as t}from"./chunk-LLBP42IT.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as l,areaFrom as n}from"./chunk-VFC6QUEN.js";import{ChartDefs as i,MOTION as o,stagger as s,fillFor as c,dashFor as h,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as d}from"./chunk-6LLCKIV6.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{ChartTooltip as p}from"./chunk-P5BOTIJU.js";import{tooltipBesideBand as g}from"./chunk-MG7A3R75.js";import{pairedAxes as k,niceAxis as y,niceMax as x,linearScale as v,axisGutter as b,bandScale as M,ladderScale as N}from"./chunk-2JWPNR2U.js";import{usePlotWidth as j}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as $,CHART_INK as L,STATUS_VARS as w}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as V}from"./chunk-TWVUQUUD.js";import{useShellStrings as A,useShellLocale as R}from"./chunk-5LHPDU6X.js";import{formatPercent as W,formatPlain as z}from"./chunk-C3QOHMR6.js";import{useRef as C,useState as U,useId as I,useEffect as D}from"react";import{jsx as S,jsxs as E}from"react/jsx-runtime";var P=12,B=16,T=26,F=52,O=t=>"number"==typeof t&&Number.isFinite(t);function Y({series:Y,labels:H,height:K=200,stacked:Q=!1,stackMode:G="value",levels:J,curve:X="linear",tension:Z=0,max:q,yTickCount:_=4,formatValue:tt,formatTooltipValue:et,tooltipLabels:at,yAxisLabel:rt,referenceLines:lt,labelEndpoints:nt=!1,dots:it,dotVariant:ot="border",pulse:st=!1,brush:ct=!1,range:ht,onRangeChange:mt,loading:dt=!1,animate:ut=!0,reveal:ft="left-to-right",fillVariant:pt="gradient",gridStyle:gt="solid",width:kt,className:yt,emptyLabel:xt}){const vt=A().charts,bt=R(),Mt=tt??(t=>z(t,bt)),Nt=et??Mt,jt=xt??vt.noData,$t=C(null),Lt=j($t),wt=kt??Lt,[Vt,At]=U(null),[Rt,Wt]=U(null),{highlighted:zt}=u(),Ct=I();if(D(()=>{if(null!==Vt)return V(t=>"Escape"===t.key&&(At(null),!0))},[Vt]),dt)/* @__PURE__ */
2
- return S("div",{className:yt,ref:$t,children:/* @__PURE__ */S(d,{height:K,width:kt??Lt})});const Ut=H,It=ht??Rt??[0,Math.max(0,Ut.length-1)],[Dt,St]=It,Et=t=>ct?t.slice(Dt,St+1):t,Pt=Y.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(O)).map(t=>({...t,data:Et(t.data)}));if(H=Et(Ut),0===Pt.length||0===H.length)/* @__PURE__ */
3
- return S("div",{className:yt,ref:$t,children:/* @__PURE__ */S("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:K},children:jt})});const Bt=H.map((t,e)=>Pt.reduce((t,a)=>t+(O(a.data[e])?a.data[e]:0),0)),Tt=(t,e)=>Bt[e]>0?t/Bt[e]:null,Ft=[];if(Q){let t=H.map(()=>0);for(const e of Pt)t=t.map((t,a)=>t+(O(e.data[a])?e.data[a]:0)),Ft.push("percent"===G?t.map((t,e)=>Tt(t,e)):[...t])}const Ot=!!J&&J.length>0,Yt=t=>"right"===t.axis,Ht=!Q&&!Ot&&void 0===q&&Pt.some(Yt)&&Pt.some(t=>!Yt(t)),Kt=Ht?Pt.filter(t=>!Yt(t)):Pt,Qt=Ht?Pt.filter(Yt).flatMap(t=>t.data.filter(O)):[],Gt=Q?(Ft.at(-1)??[]).filter(O):Kt.flatMap(t=>t.data.filter(O)),Jt=Ht?k([Math.min(0,...Gt),Math.max(0,...Gt)],[Math.min(0,...Qt),Math.max(0,...Qt)],{intervals:_+1,integerLeft:Gt.every(Number.isInteger),integerRight:Qt.every(Number.isInteger)}):null,Xt=Jt?Jt.left:Q&&"percent"===G||Ot||void 0!==q?null:y(Q?0:Math.min(0,...Gt),Math.max(0,...Gt),{intervals:_+1,integer:Gt.every(Number.isInteger)}),Zt=Xt?Xt.lo:0,qt=Q&&"percent"===G?1:Xt?Xt.hi:q??x(Math.max(...Gt,0)),_t=Q&&"percent"===G?t=>W(Math.round(100*t),0,bt):Mt,te=Ot?J:Xt?Xt.ticks:v([Zt,qt],{from:0,to:1}).ticks(_+1),ee=b(te.map(_t),F),ae=Jt?b(Jt.right.ticks.map(Mt),B):B,re={left:ee,right:Math.max(ee+1,wt-ae),top:P,bottom:K-T},le=M(H.length,{from:re.left,to:re.right}),ne=Ot?N(J,{from:re.bottom,to:re.top}):null,ie=v([Zt,qt],{from:re.bottom,to:re.top}),oe=ie(Math.max(Zt,0)),se=t=>ne?ne(t):ie(t),ce=Jt?v([Jt.right.lo,Jt.right.hi],{from:re.bottom,to:re.top}):null,he=t=>ce&&Yt(t)?ce:se,me=ne?ne.levels.map(t=>({value:t,y:ne(t)})):te.map(t=>({value:t,y:ie(t)})),de=t=>e=>{e.preventDefault(),At(e=>{const a=(e??0)+t;return Math.min(H.length-1,Math.max(0,a))})},ue=Math.max(1,Math.ceil(H.length/Math.max(1,Math.floor(wt/96))));/* @__PURE__ */
1
+ import{ChartDot as t}from"./chunk-CK2YOGUS.js";import{stepPath as e,curvePath as a,areaBetween as r,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as o,fillFor as s,dashFor as c,maskId as h}from"./chunk-465RRWBY.js";import{ChartSkeleton as m}from"./chunk-6LLCKIV6.js";import{useHighlight as d,highlightOpacity as u}from"./chunk-CNYAHYE6.js";import{ChartTooltip as f}from"./chunk-P5BOTIJU.js";import{tooltipBesideBand as p}from"./chunk-MG7A3R75.js";import{pairedAxes as g,niceAxis as k,niceMax as y,linearScale as x,axisGutter as v,bandScale as b,ladderScale as M}from"./chunk-2JWPNR2U.js";import{usePlotWidth as N}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as j}from"./chunk-TWVUQUUD.js";import{ChartBrush as $}from"./chunk-LLBP42IT.js";import{resolveSeriesColor as L,CHART_INK as w,STATUS_VARS as V}from"./chunk-TZFACUMR.js";import{useShellStrings as A,useShellLocale as R}from"./chunk-5LHPDU6X.js";import{formatPercent as W,formatPlain as z}from"./chunk-C3QOHMR6.js";import{useRef as C,useState as U,useId as I,useEffect as D}from"react";import{jsx as S,jsxs as E}from"react/jsx-runtime";var P=12,B=16,T=26,F=52,O=t=>"number"==typeof t&&Number.isFinite(t);function Y({series:Y,labels:H,height:K=200,stacked:Q=!1,stackMode:G="value",levels:J,curve:X="linear",tension:Z=0,max:q,yTickCount:_=4,formatValue:tt,formatTooltipValue:et,tooltipLabels:at,yAxisLabel:rt,referenceLines:lt,labelEndpoints:nt=!1,dots:it,dotVariant:ot="border",pulse:st=!1,brush:ct=!1,range:ht,onRangeChange:mt,loading:dt=!1,animate:ut=!0,reveal:ft="left-to-right",fillVariant:pt="gradient",gridStyle:gt="solid",width:kt,className:yt,emptyLabel:xt}){const vt=A().charts,bt=R(),Mt=tt??(t=>z(t,bt)),Nt=et??Mt,jt=xt??vt.noData,$t=C(null),Lt=N($t),wt=kt??Lt,[Vt,At]=U(null),[Rt,Wt]=U(null),{highlighted:zt}=d(),Ct=I();if(D(()=>{if(null!==Vt)return j(t=>"Escape"===t.key&&(At(null),!0))},[Vt]),dt)/* @__PURE__ */
2
+ return S("div",{className:yt,ref:$t,children:/* @__PURE__ */S(m,{height:K,width:kt??Lt})});const Ut=H,It=ht??Rt??[0,Math.max(0,Ut.length-1)],[Dt,St]=It,Et=t=>ct?t.slice(Dt,St+1):t,Pt=Y.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(O)).map(t=>({...t,data:Et(t.data)}));if(H=Et(Ut),0===Pt.length||0===H.length)/* @__PURE__ */
3
+ return S("div",{className:yt,ref:$t,children:/* @__PURE__ */S("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:K},children:jt})});const Bt=H.map((t,e)=>Pt.reduce((t,a)=>t+(O(a.data[e])?a.data[e]:0),0)),Tt=(t,e)=>Bt[e]>0?t/Bt[e]:null,Ft=[];if(Q){let t=H.map(()=>0);for(const e of Pt)t=t.map((t,a)=>t+(O(e.data[a])?e.data[a]:0)),Ft.push("percent"===G?t.map((t,e)=>Tt(t,e)):[...t])}const Ot=!!J&&J.length>0,Yt=t=>"right"===t.axis,Ht=!Q&&!Ot&&void 0===q&&Pt.some(Yt)&&Pt.some(t=>!Yt(t)),Kt=Ht?Pt.filter(t=>!Yt(t)):Pt,Qt=Ht?Pt.filter(Yt).flatMap(t=>t.data.filter(O)):[],Gt=Q?(Ft.at(-1)??[]).filter(O):Kt.flatMap(t=>t.data.filter(O)),Jt=Ht?g([Math.min(0,...Gt),Math.max(0,...Gt)],[Math.min(0,...Qt),Math.max(0,...Qt)],{intervals:_+1,integerLeft:Gt.every(Number.isInteger),integerRight:Qt.every(Number.isInteger)}):null,Xt=Jt?Jt.left:Q&&"percent"===G||Ot||void 0!==q?null:k(Q?0:Math.min(0,...Gt),Math.max(0,...Gt),{intervals:_+1,integer:Gt.every(Number.isInteger)}),Zt=Xt?Xt.lo:0,qt=Q&&"percent"===G?1:Xt?Xt.hi:q??y(Math.max(...Gt,0)),_t=Q&&"percent"===G?t=>W(Math.round(100*t),0,bt):Mt,te=Ot?J:Xt?Xt.ticks:x([Zt,qt],{from:0,to:1}).ticks(_+1),ee=v(te.map(_t),F),ae=Jt?v(Jt.right.ticks.map(Mt),B):B,re={left:ee,right:Math.max(ee+1,wt-ae),top:P,bottom:K-T},le=b(H.length,{from:re.left,to:re.right}),ne=Ot?M(J,{from:re.bottom,to:re.top}):null,ie=x([Zt,qt],{from:re.bottom,to:re.top}),oe=ie(Math.max(Zt,0)),se=t=>ne?ne(t):ie(t),ce=Jt?x([Jt.right.lo,Jt.right.hi],{from:re.bottom,to:re.top}):null,he=t=>ce&&Yt(t)?ce:se,me=ne?ne.levels.map(t=>({value:t,y:ne(t)})):te.map(t=>({value:t,y:ie(t)})),de=t=>e=>{e.preventDefault(),At(e=>{const a=(e??0)+t;return Math.min(H.length-1,Math.max(0,a))})},ue=Math.max(1,Math.ceil(H.length/Math.max(1,Math.floor(wt/96))));/* @__PURE__ */
4
4
  return E("div",{className:`relative ${yt??""}`,ref:$t,children:[
5
5
  /* @__PURE__ */E("svg",{width:"100%",height:K,viewBox:`0 0 ${wt} ${K}`,role:"img","aria-label":vt.overIntervals(Pt.map(t=>t.label),H.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>At(null),onBlur:()=>At(null),onKeyDown:t=>{"ArrowRight"===t.key&&de(1)(t),"ArrowLeft"===t.key&&de(-1)(t)},children:[
6
6
  /* @__PURE__ */S("defs",{children:/* @__PURE__ */S("clipPath",{id:Ct,children:/* @__PURE__ */S("rect",{x:re.left,y:re.top,width:re.right-re.left,height:re.bottom-re.top})})}),
7
- /* @__PURE__ */S(i,{id:Ct,fills:Pt.map((t,e)=>({color:$(t.slot,t.color,t.tone),variant:t.fillVariant??pt})),fadeFrom:Q?.42:.3,reveal:!!ut&&ft}),me.map(t=>/* @__PURE__ */S("line",{x1:re.left,y1:t.y,x2:re.right,y2:t.y,stroke:L.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===gt?"3 3":void 0},`grid-${t.value}`)),
8
- /* @__PURE__ */S("line",{x1:re.left,y1:oe,x2:re.right,y2:oe,stroke:L.axis,strokeWidth:1,shapeRendering:"crispEdges"}),me.map(t=>/* @__PURE__ */S("text",{x:re.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:L.label,style:{fontVariantNumeric:"tabular-nums"},children:_t(t.value)},`ytick-${t.value}`)),Jt&&me.map((t,e)=>/* @__PURE__ */S("text",{x:re.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:L.label,style:{fontVariantNumeric:"tabular-nums"},children:Mt(Jt.right.ticks[e])},`ytick-r-${t.value}`)),rt&&/* @__PURE__ */S("text",{x:12,y:(re.top+re.bottom)/2,transform:`rotate(-90 12 ${(re.top+re.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:L.label,children:rt}),
9
- /* @__PURE__ */S("g",{clipPath:`url(#${Ct})`,mask:ut&&ft?`url(#${m(Ct)})`:void 0,children:Pt.map((t,e)=>{const i=$(t.slot,t.color,t.tone),m=t.mode??(Q?"area":"line"),d=f(t.key,zt);if("step"===m){const e=H.map((e,a)=>({start:le(a),end:le.end(a),value:t.data[a]})).filter(t=>O(t.value)).map(e=>({start:e.start,end:e.end,y:he(t)(e.value)}));/* @__PURE__ */
10
- return S("path",{d:a(e),fill:"none",stroke:i,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:d??void 0,className:"rosh-viz-mark"},t.key)}const u=H.map((a,r)=>{const l=Q?Ft[e]?.[r]:t.data[r];return O(l)?[le.center(r),he(t)(l)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*le.bandwidth),r="solid"===t.fillVariant,l=he(t);/* @__PURE__ */
11
- return S("g",{opacity:d??void 0,className:"rosh-viz-mark",children:H.map((n,c)=>{const h=Q?Ft[e]?.[c]:t.data[c];if(!O(h))return null;const m=l(h);/* @__PURE__ */
12
- return S("rect",{x:le.center(c)-a/2,y:Math.min(m,oe),width:a,height:Math.abs(oe-m),rx:2,fill:i,fillOpacity:r?1:.35,className:ut?o.rise:void 0,style:ut?s(c,26):void 0},c)})},t.key)}const p=r(u,X,Z),g=Q&&e>0?H.map((t,a)=>[le.center(a),se(Ft[e-1]?.[a]??0)-2]):null,k=g?l(p,g):n(p,u,oe);/* @__PURE__ */
7
+ /* @__PURE__ */S(n,{id:Ct,fills:Pt.map((t,e)=>({color:L(t.slot,t.color,t.tone),variant:t.fillVariant??pt})),fadeFrom:Q?.42:.3,reveal:!!ut&&ft}),me.map(t=>/* @__PURE__ */S("line",{x1:re.left,y1:t.y,x2:re.right,y2:t.y,stroke:w.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===gt?"3 3":void 0},`grid-${t.value}`)),
8
+ /* @__PURE__ */S("line",{x1:re.left,y1:oe,x2:re.right,y2:oe,stroke:w.axis,strokeWidth:1,shapeRendering:"crispEdges"}),me.map(t=>/* @__PURE__ */S("text",{x:re.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:w.label,style:{fontVariantNumeric:"tabular-nums"},children:_t(t.value)},`ytick-${t.value}`)),Jt&&me.map((t,e)=>/* @__PURE__ */S("text",{x:re.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:w.label,style:{fontVariantNumeric:"tabular-nums"},children:Mt(Jt.right.ticks[e])},`ytick-r-${t.value}`)),rt&&/* @__PURE__ */S("text",{x:12,y:(re.top+re.bottom)/2,transform:`rotate(-90 12 ${(re.top+re.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:w.label,children:rt}),
9
+ /* @__PURE__ */S("g",{clipPath:`url(#${Ct})`,mask:ut&&ft?`url(#${h(Ct)})`:void 0,children:Pt.map((t,n)=>{const h=L(t.slot,t.color,t.tone),m=t.mode??(Q?"area":"line"),d=u(t.key,zt);if("step"===m){const a=H.map((e,a)=>({start:le(a),end:le.end(a),value:t.data[a]})).filter(t=>O(t.value)).map(e=>({start:e.start,end:e.end,y:he(t)(e.value)}));/* @__PURE__ */
10
+ return S("path",{d:e(a),fill:"none",stroke:h,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:d??void 0,className:"rosh-viz-mark"},t.key)}const f=H.map((e,a)=>{const r=Q?Ft[n]?.[a]:t.data[a];return O(r)?[le.center(a),he(t)(r)]:null}).filter(t=>null!==t);if(0===f.length)return null;if("column"===m){const e=Math.max(1,.62*le.bandwidth),a="solid"===t.fillVariant,r=he(t);/* @__PURE__ */
11
+ return S("g",{opacity:d??void 0,className:"rosh-viz-mark",children:H.map((l,s)=>{const c=Q?Ft[n]?.[s]:t.data[s];if(!O(c))return null;const m=r(c);/* @__PURE__ */
12
+ return S("rect",{x:le.center(s)-e/2,y:Math.min(m,oe),width:e,height:Math.abs(oe-m),rx:2,fill:h,fillOpacity:a?1:.35,className:ut?i.rise:void 0,style:ut?o(s,26):void 0},s)})},t.key)}const p=a(f,X,Z),g=Q&&n>0?H.map((t,e)=>[le.center(e),se(Ft[n-1]?.[e]??0)-2]):null,k=g?r(p,g):l(p,f,oe);/* @__PURE__ */
13
13
  return E("g",{opacity:d??void 0,className:"rosh-viz-mark",children:[("area"===m||Q)&&
14
- /* @__PURE__ */S("path",{d:k,fill:c(Ct,e,t.fillVariant??pt,i),stroke:"none"}),
15
- /* @__PURE__ */S("path",{d:p,fill:"none",stroke:i,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:h(t.stroke??(t.forecast?"animated-dashed":"solid")),className:ut&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?o.march:void 0})]},t.key)})}),lt?.map((t,e)=>{const a=t.color??w[t.tone??"critical"],r=se(t.value);/* @__PURE__ */
14
+ /* @__PURE__ */S("path",{d:k,fill:s(Ct,n,t.fillVariant??pt,h),stroke:"none"}),
15
+ /* @__PURE__ */S("path",{d:p,fill:"none",stroke:h,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:c(t.stroke??(t.forecast?"animated-dashed":"solid")),className:ut&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),lt?.map((t,e)=>{const a=t.color??V[t.tone??"critical"],r=se(t.value);/* @__PURE__ */
16
16
  return E("g",{children:[
17
- /* @__PURE__ */S("line",{x1:re.left,y1:r,x2:re.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */S("text",{x:re.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(it??(nt?"last":"none"))&&Pt.map((t,a)=>{if("column"===t.mode)return null;const r=it??(nt?"last":"none"),l=$(t.slot,t.color,t.tone),n=[...t.data].map(O).lastIndexOf(!0),i="all"===r?H.map((t,e)=>e).filter(e=>O(Q?Ft[a]?.[e]:t.data[e])):n>=0?[n]:[];/* @__PURE__ */
18
- return E("g",{children:[i.map(r=>{const i=Q?Ft[a]?.[r]:t.data[r];return O(i)?/* @__PURE__ */S(e,{cx:le.center(r),cy:he(t)(i),color:l,variant:ot,pulse:st&&r===n,title:`${H[r]}: ${t.label} ${Mt(i)}`},r):null}),nt&&n>=0&&O(Q?Ft[a]?.[n]:t.data[n])&&/* @__PURE__ */S("text",{x:le.center(n)-10,y:he(t)(Q?Ft[a]?.[n]:t.data[n])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:L.label,style:{fontVariantNumeric:"tabular-nums"},children:Mt(Q?Ft[a]?.[n]:t.data[n])})]},`dots-${t.key}`)}),H.map((t,e)=>e%ue===0?/* @__PURE__ */S("text",{x:le.center(e),y:K-8,textAnchor:"middle",fontSize:11,fill:L.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Vt&&/* @__PURE__ */S("line",{x1:le.center(Vt),y1:re.top,x2:le.center(Vt),y2:re.bottom,stroke:L.axis,strokeWidth:1}),H.map((t,e)=>/* @__PURE__ */S("rect",{x:le(e),y:re.top,width:Math.max(1,le.bandwidth),height:re.bottom-re.top,fill:"transparent",onMouseEnter:()=>At(e)},`hit-${e}`))]}),ct&&Ut.length>2&&/* @__PURE__ */S(t,{className:"mt-1",labels:Ut,width:wt,data:Y[0]?.data??[],range:It,onRangeChange:t=>{mt?mt(t):Wt(t)}}),null!==Vt&&
19
- /* @__PURE__ */S("div",{className:"pointer-events-none absolute top-2 z-10",style:g(le.center(Vt),le.bandwidth,wt),children:/* @__PURE__ */S(p,{title:at?.[Vt]??H[Vt],rows:Pt.map((t,e)=>({key:t.key,label:t.label,color:$(t.slot,t.color,t.tone),value:O(t.data[Vt])?Q&&"percent"===G?`${W(100*(Tt(t.data[Vt],Vt)??0),1,bt)} · ${Nt(t.data[Vt])}`:Nt(t.data[Vt]):void 0})),footnote:Q&&"percent"===G?vt.inBucket(Nt(Bt[Vt])):void 0})})]})}export{Y as TimeSeriesChart};
17
+ /* @__PURE__ */S("line",{x1:re.left,y1:r,x2:re.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */S("text",{x:re.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(it??(nt?"last":"none"))&&Pt.map((e,a)=>{if("column"===e.mode)return null;const r=it??(nt?"last":"none"),l=L(e.slot,e.color,e.tone),n=[...e.data].map(O).lastIndexOf(!0),i="all"===r?H.map((t,e)=>e).filter(t=>O(Q?Ft[a]?.[t]:e.data[t])):n>=0?[n]:[];/* @__PURE__ */
18
+ return E("g",{children:[i.map(r=>{const i=Q?Ft[a]?.[r]:e.data[r];return O(i)?/* @__PURE__ */S(t,{cx:le.center(r),cy:he(e)(i),color:l,variant:ot,pulse:st&&r===n,title:`${H[r]}: ${e.label} ${Mt(i)}`},r):null}),nt&&n>=0&&O(Q?Ft[a]?.[n]:e.data[n])&&/* @__PURE__ */S("text",{x:le.center(n)-10,y:he(e)(Q?Ft[a]?.[n]:e.data[n])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:w.label,style:{fontVariantNumeric:"tabular-nums"},children:Mt(Q?Ft[a]?.[n]:e.data[n])})]},`dots-${e.key}`)}),H.map((t,e)=>e%ue===0?/* @__PURE__ */S("text",{x:le.center(e),y:K-8,textAnchor:"middle",fontSize:11,fill:w.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Vt&&/* @__PURE__ */S("line",{x1:le.center(Vt),y1:re.top,x2:le.center(Vt),y2:re.bottom,stroke:w.axis,strokeWidth:1}),H.map((t,e)=>/* @__PURE__ */S("rect",{x:le(e),y:re.top,width:Math.max(1,le.bandwidth),height:re.bottom-re.top,fill:"transparent",onMouseEnter:()=>At(e)},`hit-${e}`))]}),ct&&Ut.length>2&&/* @__PURE__ */S($,{className:"mt-1",labels:Ut,width:wt,data:Y[0]?.data??[],range:It,onRangeChange:t=>{mt?mt(t):Wt(t)}}),null!==Vt&&
19
+ /* @__PURE__ */S("div",{className:"pointer-events-none absolute top-2 z-10",style:p(le.center(Vt),le.bandwidth,wt),children:/* @__PURE__ */S(f,{title:at?.[Vt]??H[Vt],rows:Pt.map((t,e)=>({key:t.key,label:t.label,color:L(t.slot,t.color,t.tone),value:O(t.data[Vt])?Q&&"percent"===G?`${W(100*(Tt(t.data[Vt],Vt)??0),1,bt)} · ${Nt(t.data[Vt])}`:Nt(t.data[Vt]):void 0})),footnote:Q&&"percent"===G?vt.inBucket(Nt(Bt[Vt])):void 0})})]})}export{Y as TimeSeriesChart};
@@ -1,5 +1,5 @@
1
- import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as l}from"./chunk-7BSBTDKK.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-5LHPDU6X.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),L=Math.max(...v),A=.08*(L-j)||1;/* @__PURE__ */
2
- return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-A,max:L+A,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
1
+ import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as l}from"./chunk-4JSR7A7L.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-5LHPDU6X.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),L=Math.min(...v),j=Math.max(...v),A=.08*(j-L)||1;/* @__PURE__ */
2
+ return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:L-A,max:j+A,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
3
3
  return c(e,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
4
4
  return n("g",{opacity:u?.45:1,children:[
5
5
  /* @__PURE__ */c("line",{x1:p,y1:l(a.high),x2:p,y2:l(a.low),stroke:h,strokeWidth:1.5}),"candle"===m?/* @__PURE__ */c("rect",{x:p-d/2,y:b,width:d,height:y,rx:1,fill:r?h:"transparent",fillOpacity:r?.85:1,stroke:h,strokeWidth:1.5}):/* @__PURE__ */n(s,{children:[
@@ -1,8 +1,8 @@
1
- import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-5LHPDU6X.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:U=[4,22],className:D,emptyLabel:L}){const P=m().charts,S=h(),O=z??(e=>f(e,S)),W=$??(e=>f(e,S)),B=L??P.noObservations,C=u(null),E=n(C),I=v??E,T=p(),[V,X]=d(null);x(()=>{if(null!==V)return c(e=>"Escape"===e.key&&(X(null),!0))},[V]);const F=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),H=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),J=j||w?H.map(e=>({...e,points:e.points.filter(e=>F(e.x,j)&&F(e.y,w))})).filter(e=>e.points.length>0):H,Q=H.reduce((e,t)=>e+t.points.length,0)-J.reduce((e,t)=>e+t.points.length,0);if(0===J.length)/* @__PURE__ */
1
+ import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{CHART_INK as s,resolveSeriesColorWithin as c}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-5LHPDU6X.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:U=[4,22],className:D,emptyLabel:L}){const P=m().charts,S=h(),O=z??(e=>f(e,S)),W=$??(e=>f(e,S)),B=L??P.noObservations,C=u(null),E=n(C),I=v??E,T=p(),[V,X]=d(null);x(()=>{if(null!==V)return a(e=>"Escape"===e.key&&(X(null),!0))},[V]);const F=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),H=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),J=j||w?H.map(e=>({...e,points:e.points.filter(e=>F(e.x,j)&&F(e.y,w))})).filter(e=>e.points.length>0):H,Q=H.reduce((e,t)=>e+t.points.length,0)-J.reduce((e,t)=>e+t.points.length,0);if(0===J.length)/* @__PURE__ */
2
2
  return y("div",{className:D,ref:C,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:B})});const Z=J.flatMap(e=>e.points),K=Z.some(e=>null!=e.size),Y=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(Z.map(e=>e.y),w,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(W),_),le=Math.max(ie+1,I-q),re=ee(Z.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...Z.map(e=>e.size??1))],{from:U[0],to:U[1]}),ne=V?J[V.s]:void 0,ae=V&&ne?ne.points[V.i]:void 0,se=J.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
3
3
  return g("div",{className:`relative ${D??""}`,ref:C,children:[
4
4
  /* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${I} ${k}`,role:"img","aria-label":P.scatter(J.map(e=>e.label),A??P.yAxis,M??P.xAxis)+(Q>0?`. ${P.outsideRange(Q)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>X(null),onBlur:()=>X(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=V?se.findIndex(e=>e.s===V.s&&e.i===V.i):0;X(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
5
5
  /* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:T,children:/* @__PURE__ */y("rect",{x:ie-U[1],y:Y-U[1],width:le-ie+2*U[1],height:k-G-Y+2*U[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
6
- /* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
7
- /* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:W(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:O(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
8
- /* @__PURE__ */y("g",{clipPath:`url(#${T})`,children:J.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:K?oe(l.size??0):U[0]+1,fill:i,fillOpacity:V&&V.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>X({s:t,i:r})},`${e.key}-${r}`))})})]}),V&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??P.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:O(ae.x)},{key:"y",label:A??P.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:W(ae.y)},...null!=ae.size?[{key:"size",label:P.size,color:a.muted,value:f(ae.size,S)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
6
+ /* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:s.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
7
+ /* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:W(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:O(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:s.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:s.label,children:A}),
8
+ /* @__PURE__ */y("g",{clipPath:`url(#${T})`,children:J.map((e,t)=>{const i=c(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:K?oe(l.size??0):U[0]+1,fill:i,fillOpacity:V&&V.s!==t?.25:.62,stroke:s.surface,strokeWidth:2,onMouseEnter:()=>X({s:t,i:r})},`${e.key}-${r}`))})})]}),V&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??P.xAxis,color:c(ne.slot,3,ne.color,ne.tone),value:O(ae.x)},{key:"y",label:A??P.yAxis,color:c(ne.slot,3,ne.color,ne.tone),value:W(ae.y)},...null!=ae.size?[{key:"size",label:P.size,color:s.muted,value:f(ae.size,S)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
@@ -1,4 +1,4 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-P2HKX4VB.js";import{navIcons as r}from"./chunk-TPDOOCFS.js";import{VERSION as s}from"./chunk-Y6CIIF65.js";import{Icon as o}from"./chunk-C2HHGLLR.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-5LHPDU6X.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),g=c(()=>w(!0),[]),N=i().aboutApp,b=N.title(n.name);if(e(b,g,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,H]=a(N.partOf);/* @__PURE__ */
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-P2HKX4VB.js";import{navIcons as r}from"./chunk-TPDOOCFS.js";import{VERSION as s}from"./chunk-L5Y5HVUL.js";import{Icon as o}from"./chunk-C2HHGLLR.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-5LHPDU6X.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),g=c(()=>w(!0),[]),N=i().aboutApp,b=N.title(n.name);if(e(b,g,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,H]=a(N.partOf);/* @__PURE__ */
2
2
  return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
4
4
  /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:n.name}),
@@ -0,0 +1,2 @@
1
+ import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as o}from"./chunk-4JSR7A7L.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-5LHPDU6X.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const L=e().charts,A=i(),v=d??(t=>Number.isInteger(t)?m(t,A):n(t,1,A)),w=x??(t=>m(t,A)),M=g??L.countAxis,N=k??L.distribution,P=h??r(c??[],s),R=a(0,b,f),U=P.map(t=>v(t.from)),C=P.map(t=>t.count);/* @__PURE__ */
2
+ return l(o,{labels:U,values:C,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:w,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:L.histogram(N,P.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${v(P[o].from)} – ${v(P[o].to)}`,rows:[{key:"count",label:L.observations,color:R,value:w(P[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:P.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:R,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
@@ -1,8 +1,8 @@
1
- import{ChartDefs as t,MOTION as e,stagger as a,glowId as n}from"./chunk-465RRWBY.js";import{ChartSkeleton as i}from"./chunk-6LLCKIV6.js";import{useHighlight as r,autoHighlightIndex as l,highlightOpacity as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as m}from"./chunk-P5BOTIJU.js";import{CartesianPlot as s}from"./chunk-7BSBTDKK.js";import{CHART_INK as u,STATUS_VARS as h,resolveSeriesColor as c}from"./chunk-TZFACUMR.js";import{useShellStrings as d,useShellLocale as f}from"./chunk-5LHPDU6X.js";import{formatPercent as b,formatPlain as p}from"./chunk-C3QOHMR6.js";import{useId as x}from"react";import{jsx as y,jsxs as M}from"react/jsx-runtime";function g({series:g,labels:v,stacked:k=!1,stackMode:N="value",height:$=220,width:w,max:L,formatValue:j,yAxisLabel:F,className:A,emptyLabel:C,radius:S=3,loading:V=!1,animate:B=!0,glow:T=!1,emphasise:z=!1,activeKey:K,highlight:O="none",valueLabels:R=!1,onSelect:E,min:H,formatTooltipValue:U,tooltipLabels:Y,barGap:D=4,seriesLabels:I=!1}){const P=x(),{highlighted:W}=r(),G=d().charts,J=f(),Q=j??(t=>p(t,J)),X=U??Q;if(V)/* @__PURE__ */return y(i,{height:$,width:w,variant:"bars",className:A});const Z=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const n=t.pointTones?.[e];return n?h[n]:c(t.slot,t.color,t.tone)},q=g.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),_=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},tt=v.map((t,e)=>q.reduce((t,a)=>t+_(a,e),0)),et=v.map((t,e)=>q.reduce((t,a)=>t+Math.max(0,_(a,e)),0)),at=v.map((t,e)=>q.reduce((t,a)=>t+Math.min(0,_(a,e)),0)),nt=k&&"percent"===N,it=(t,e)=>tt[e]>0?t/tt[e]:null,rt=nt?[1]:k?[...et,...at]:q.flatMap(t=>t.data.filter(Number.isFinite)),lt=(t,e)=>{const a=t.bandwidth/Math.max(1,q.length),n=q.length>1?Math.min(D,.25*a):0;return{offset:e*a+n/2,width:Math.max(1,a-n)}},ot=I&&!k?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return v.map((n,i)=>q.map((n,r)=>{const l=n.data[i];if(!Number.isFinite(l))return null;const o=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:m,width:s}=lt(t,r),h=t(i)+m+s/2,c=Math.min(e(o),e(a)),d=Math.max(e(o),e(a));if(s<13)return null;const f=Math.floor((d-c-12)/6.6),b=f>=Math.min(4,n.label.length),p=b&&n.label.length>f?`${n.label.slice(0,f-1).trimEnd()}…`:n.label,x=b?d-6:c-4;/* @__PURE__ */
1
+ import{ChartDefs as t,MOTION as e,stagger as a,glowId as n}from"./chunk-465RRWBY.js";import{ChartSkeleton as i}from"./chunk-6LLCKIV6.js";import{useHighlight as r,autoHighlightIndex as l,highlightOpacity as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as m}from"./chunk-P5BOTIJU.js";import{CartesianPlot as s}from"./chunk-4JSR7A7L.js";import{CHART_INK as u,STATUS_VARS as h,resolveSeriesColor as c}from"./chunk-TZFACUMR.js";import{useShellStrings as d,useShellLocale as f}from"./chunk-5LHPDU6X.js";import{formatPercent as b,formatPlain as p}from"./chunk-C3QOHMR6.js";import{useId as x}from"react";import{jsx as y,jsxs as M}from"react/jsx-runtime";function g({series:g,labels:v,stacked:k=!1,stackMode:N="value",height:$=220,width:w,max:L,formatValue:j,yAxisLabel:F,className:A,emptyLabel:C,radius:S=3,loading:V=!1,animate:R=!0,glow:z=!1,emphasise:O=!1,activeKey:T,highlight:B="none",valueLabels:E=!1,onSelect:H,min:U,formatTooltipValue:Y,tooltipLabels:I,barGap:J=4,seriesLabels:K=!1}){const P=x(),{highlighted:W}=r(),D=d().charts,G=f(),Q=j??(t=>p(t,G)),X=Y??Q;if(V)/* @__PURE__ */return y(i,{height:$,width:w,variant:"bars",className:A});const Z=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const n=t.pointTones?.[e];return n?h[n]:c(t.slot,t.color,t.tone)},q=g.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),_=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},tt=v.map((t,e)=>q.reduce((t,a)=>t+_(a,e),0)),et=v.map((t,e)=>q.reduce((t,a)=>t+Math.max(0,_(a,e)),0)),at=v.map((t,e)=>q.reduce((t,a)=>t+Math.min(0,_(a,e)),0)),nt=k&&"percent"===N,it=(t,e)=>tt[e]>0?t/tt[e]:null,rt=nt?[1]:k?[...et,...at]:q.flatMap(t=>t.data.filter(Number.isFinite)),lt=(t,e)=>{const a=t.bandwidth/Math.max(1,q.length),n=q.length>1?Math.min(J,.25*a):0;return{offset:e*a+n/2,width:Math.max(1,a-n)}},ot=K&&!k?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return v.map((n,i)=>q.map((n,r)=>{const l=n.data[i];if(!Number.isFinite(l))return null;const o=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:m,width:s}=lt(t,r),h=t(i)+m+s/2,c=Math.min(e(o),e(a)),d=Math.max(e(o),e(a));if(s<13)return null;const f=Math.floor((d-c-12)/6.6),b=f>=Math.min(4,n.label.length),p=b&&n.label.length>f?`${n.label.slice(0,f-1).trimEnd()}…`:n.label,x=b?d-6:c-4;/* @__PURE__ */
2
2
  return y("text",{"data-series-label":"true",x:h,y:x,transform:`rotate(-90 ${h} ${x})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:b?u.surface:u.label,children:p},`n${n.key}-${i}`)}))}:null;/* @__PURE__ */
3
- return y(s,{labels:v,values:rt,height:$,width:w,max:nt?1:L,min:nt?void 0:H,formatValue:nt?t=>b(Math.round(100*t),0,J):Q,yAxisLabel:F,className:A,emptyLabel:C,onSelect:E,ariaLabel:G.acrossCategories(q.map(t=>t.label),v.length),tooltip:t=>/* @__PURE__ */y(m,{title:Y?.[t]??v[t],rows:q.map(e=>({key:e.key,label:e.label,color:Z(e,t),value:Number.isFinite(e.data[t])?nt?`${b(100*(it(e.data[t],t)??0),1,J)} · ${X(e.data[t])}`:X(e.data[t]):void 0})),footnote:nt?G.inCategory(X(tt[t])):void 0}),overlay:R&&!nt||ot?({x:t,y:e})=>/* @__PURE__ */M("g",{pointerEvents:"none",children:[ot?.({x:t,y:e}),R&&!nt&&v.map((a,n)=>{if(k){if(!q.some(t=>Number.isFinite(t.data[n])))return null;const a=q.reduce((t,e)=>t+_(e,n),0),i=a>=0?et[n]:at[n];/* @__PURE__ */
3
+ return y(s,{labels:v,values:rt,height:$,width:w,max:nt?1:L,min:nt?void 0:U,formatValue:nt?t=>b(Math.round(100*t),0,G):Q,yAxisLabel:F,className:A,emptyLabel:C,onSelect:H,ariaLabel:D.acrossCategories(q.map(t=>t.label),v.length),tooltip:t=>/* @__PURE__ */y(m,{title:I?.[t]??v[t],rows:q.map(e=>({key:e.key,label:e.label,color:Z(e,t),value:Number.isFinite(e.data[t])?nt?`${b(100*(it(e.data[t],t)??0),1,G)} · ${X(e.data[t])}`:X(e.data[t]):void 0})),footnote:nt?D.inCategory(X(tt[t])):void 0}),overlay:E&&!nt||ot?({x:t,y:e})=>/* @__PURE__ */M("g",{pointerEvents:"none",children:[ot?.({x:t,y:e}),E&&!nt&&v.map((a,n)=>{if(k){if(!q.some(t=>Number.isFinite(t.data[n])))return null;const a=q.reduce((t,e)=>t+_(e,n),0),i=a>=0?et[n]:at[n];/* @__PURE__ */
4
4
  return y("text",{"data-value-label":"true",x:t.center(n),y:a>=0?e(i)-4:e(i)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:Q(a)},`v${n}`)}return q.map((a,i)=>{const r=a.data[n];if(!Number.isFinite(r))return null;const l=r,{offset:o,width:m}=lt(t,i);/* @__PURE__ */
5
- return y("text",{"data-value-label":"true",x:t(n)+o+m/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:Q(l)},`v${a.key}-${n}`)})})]}):void 0,children:({x:i,y:r,bottom:m,active:s})=>{const h=K?v.indexOf(K):-1,c=l(k?tt:q[0]?.data??[],O),d=s??(h>=0?h:c);/* @__PURE__ */
5
+ return y("text",{"data-value-label":"true",x:t(n)+o+m/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:Q(l)},`v${a.key}-${n}`)})})]}):void 0,children:({x:i,y:r,bottom:m,active:s})=>{const h=T?v.indexOf(T):-1,c=l(k?tt:q[0]?.data??[],B),d=s??(h>=0?h:c);/* @__PURE__ */
6
6
  return M("g",{children:[
7
- /* @__PURE__ */y(t,{id:P,glow:T}),v.map((t,l)=>{let m=0,s=0;const h=r(Math.min(r.domain[1],Math.max(r.domain[0],0)));return q.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const b=nt?it(f,l):f;if(null===b)return null;const p=Z(t,l),x=lt(i,c),M=k?i(l):i(l)+x.offset,g=k?Math.max(1,i.bandwidth):x.width;let v,N,$=!0;if(k){const t=b>=0?m:s,e=t+b;b>=0?m=e:s=e,v=r(Math.max(t,e)),N=r(Math.min(t,e)),$=0===t}else v=Math.min(r(b),h),N=Math.max(r(b),h);const w=Math.max(0,N-v-(k&&!$?2:0)),L=null===d||d===l,j=L?p:z?u.muted:p,F=o(t.key,W);/* @__PURE__ */
8
- return y("rect",{x:M,y:v,width:g,height:w,rx:S,fill:j,fillOpacity:F??(L?1:z?.32:.45),filter:T&&d===l?`url(#${n(P)})`:void 0,className:"rosh-viz-mark"+(B?` ${e.rise}`:""),style:B?a(l*(k?1:q.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==s&&!z&&/* @__PURE__ */y("line",{x1:i.center(s),y1:r(r.domain[1]),x2:i.center(s),y2:m,stroke:u.axis,strokeWidth:1})]})}})}export{g as ColumnChart};
7
+ /* @__PURE__ */y(t,{id:P,glow:z}),v.map((t,l)=>{let m=0,s=0;const h=r(Math.min(r.domain[1],Math.max(r.domain[0],0)));return q.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const b=nt?it(f,l):f;if(null===b)return null;const p=Z(t,l),x=lt(i,c),M=k?i(l):i(l)+x.offset,g=k?Math.max(1,i.bandwidth):x.width;let v,N,$=!0;if(k){const t=b>=0?m:s,e=t+b;b>=0?m=e:s=e,v=r(Math.max(t,e)),N=r(Math.min(t,e)),$=0===t}else v=Math.min(r(b),h),N=Math.max(r(b),h);const w=Math.max(0,N-v-(k&&!$?2:0)),L=null===d||d===l,j=L?p:O?u.muted:p,F=o(t.key,W);/* @__PURE__ */
8
+ return y("rect",{x:M,y:v,width:g,height:w,rx:S,fill:j,fillOpacity:F??(L?1:O?.32:.45),filter:z&&d===l?`url(#${n(P)})`:void 0,className:"rosh-viz-mark"+(R?` ${e.rise}`:""),style:R?a(l*(k?1:q.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==s&&!O&&/* @__PURE__ */y("line",{x1:i.center(s),y1:r(r.domain[1]),x2:i.center(s),y2:m,stroke:u.axis,strokeWidth:1})]})}})}export{g as ColumnChart};
@@ -0,0 +1 @@
1
+ import{formatDate as t}from"./chunk-5OTS2G3M.js";import{EMPTY_VALUE as o}from"./chunk-36BRD5J3.js";var r=6e4,n=36e5,e=24*n;function i(t){if(null==t||""===t)return null;const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?null:o}function a(a,u){const f=i(a);if(!f)return o;const l=Date.now()-f.getTime();return u?.locale?function(o,i,a,u){const f=new Intl.RelativeTimeFormat(o,{style:"narrow",numeric:"auto"});return i<r?a&&i>=1e3?f.format(-Math.floor(i/1e3),"second"):f.format(0,"second"):i<n?f.format(-Math.floor(i/r),"minute"):i<e?f.format(-Math.floor(i/n),"hour"):i<7*e?f.format(-Math.floor(i/e),"day"):t(u.toISOString(),{locale:o})}(u.locale,Math.max(l,0),u.precise,f):l<0?"just now":l<r?u?.precise&&l>=1e3?`${Math.floor(l/1e3)}s ago`:"just now":l<n?`${Math.floor(l/r)}m ago`:l<e?`${Math.floor(l/n)}h ago`:l<7*e?`${Math.floor(l/e)}d ago`:t(f.toISOString())}var u=null;function f(t){if(!t)return void(u=null);const o={};for(const[r,n]of Object.entries(t))o[r.toUpperCase()]=n;u=o}function l(t){if(!t)return"";const o=t.toUpperCase();return u?.[o]?.symbol||o}function s(t){return t?u?.[t.toUpperCase()]?.decimals??2:2}function c(t,r,n){if(null==t||""===t)return o;const e="string"==typeof t?Number(t):t;if(!Number.isFinite(e))return o;const i=n?.whole?0:s(r),a=Math.abs(e).toLocaleString("en-US",{minimumFractionDigits:i,maximumFractionDigits:i}),u=e<0&&/[1-9]/.test(a)?"-":"";if(!r)return`${u}${a}`;const f=l(r);return`${u}${/^[A-Za-z]+$/.test(f)?`${f} `:f}${a}`}var m=["KB","MB","GB","TB"];function h(t){if(null==t||!Number.isFinite(t)||t<0)return o;if(t<1024)return`${Math.round(t)} B`;let r=t/1024,n=0;for(;n<m.length-1&&Number(r.toFixed(1))>=1024;)r/=1024,n++;return`${r.toFixed(1)} ${m[n]}`}export{s as currencyDecimals,l as currencySymbol,h as formatBytes,c as formatMoney,f as setCurrencyFormats,a as timeAgo,i as toInstant};
@@ -1,6 +1,6 @@
1
- import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-P5BOTIJU.js";import{CartesianPlot as t}from"./chunk-7BSBTDKK.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-5LHPDU6X.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:M,emptyLabel:O,radius:N=3}){const U=o().charts,A=n(),B=w??(e=>h(e,A)),C=v??U.range,F=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),P=r(0,j,L);/* @__PURE__ */
2
- return s(t,{labels:d,values:F,height:k,width:g,max:b,min:x,formatValue:B,yAxisLabel:y,className:M,emptyLabel:O,bandPadding:"bar"===p?.34:0,ariaLabel:U.rangeLabel(C,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:U.high,color:P,value:null==u[e]?void 0:B(u[e].high)},{key:"low",label:U.low,color:P,value:null==u[e]?void 0:B(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:N,fill:P,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
1
+ import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-P5BOTIJU.js";import{CartesianPlot as t}from"./chunk-4JSR7A7L.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-5LHPDU6X.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:L,tone:j,label:v,className:M,emptyLabel:O,radius:A=3}){const N=o().charts,U=n(),C=w??(e=>h(e,U)),F=v??N.range,P=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),R=r(0,L,j);/* @__PURE__ */
2
+ return s(t,{labels:d,values:P,height:k,width:g,max:b,min:x,formatValue:C,yAxisLabel:y,className:M,emptyLabel:O,bandPadding:"bar"===p?.34:0,ariaLabel:N.rangeLabel(F,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:N.high,color:R,value:null==u[e]?void 0:C(u[e].high)},{key:"low",label:N.low,color:R,value:null==u[e]?void 0:C(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:A,fill:R,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
3
3
  return m(c,{children:[
4
- /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:P,fillOpacity:.2,stroke:"none"}),
5
- /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:P,strokeWidth:2,strokeLinejoin:"round"}),
6
- /* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:P,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
4
+ /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:R,fillOpacity:.2,stroke:"none"}),
5
+ /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:R,strokeWidth:2,strokeLinejoin:"round"}),
6
+ /* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:R,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
@@ -1,10 +1,10 @@
1
- import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as t}from"./chunk-7BSBTDKK.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-5LHPDU6X.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
2
- return m(t,{labels:s.map(e=>e.label),values:j,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:t=>{const i=s[t];/* @__PURE__ */
3
- return m(e,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
1
+ import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as t}from"./chunk-4JSR7A7L.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-5LHPDU6X.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,L=i(0,u,x),W=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
2
+ return m(t,{labels:s.map(e=>e.label),values:W,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:t=>{const i=s[t];/* @__PURE__ */
3
+ return m(e,{title:i.label,rows:[{key:"max",label:p.maximum,color:L,value:g(i.max)},{key:"q3",label:p.q3,color:L,value:g(i.q3)},{key:"median",label:p.median,color:L,value:g(i.median)},{key:"q1",label:p.q1,color:L,value:g(i.q1)},{key:"min",label:p.minimum,color:L,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
4
4
  return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
5
- /* @__PURE__ */m("line",{x1:o,y1:t(r.max),x2:o,y2:t(r.q3),stroke:W,strokeWidth:1.5}),
6
- /* @__PURE__ */m("line",{x1:o,y1:t(r.q1),x2:o,y2:t(r.min),stroke:W,strokeWidth:1.5}),
7
- /* @__PURE__ */m("line",{x1:o-s/4,y1:t(r.max),x2:o+s/4,y2:t(r.max),stroke:W,strokeWidth:1.5}),
8
- /* @__PURE__ */m("line",{x1:o-s/4,y1:t(r.min),x2:o+s/4,y2:t(r.min),stroke:W,strokeWidth:1.5}),
9
- /* @__PURE__ */m("rect",{x:o-s/2,y:t(r.q3),width:s,height:Math.max(1,t(r.q1)-t(r.q3)),rx:2,fill:W,fillOpacity:.22,stroke:W,strokeWidth:1.5}),
10
- /* @__PURE__ */m("line",{x1:o-s/2,y1:t(r.median),x2:o+s/2,y2:t(r.median),stroke:W,strokeWidth:3}),(r.outliers??[]).map((e,i)=>/* @__PURE__ */m("circle",{cx:o,cy:t(e),r:3,fill:W,stroke:l.surface,strokeWidth:1.5},i))]},a)})})})}export{s as BoxPlotChart};
5
+ /* @__PURE__ */m("line",{x1:o,y1:t(r.max),x2:o,y2:t(r.q3),stroke:L,strokeWidth:1.5}),
6
+ /* @__PURE__ */m("line",{x1:o,y1:t(r.q1),x2:o,y2:t(r.min),stroke:L,strokeWidth:1.5}),
7
+ /* @__PURE__ */m("line",{x1:o-s/4,y1:t(r.max),x2:o+s/4,y2:t(r.max),stroke:L,strokeWidth:1.5}),
8
+ /* @__PURE__ */m("line",{x1:o-s/4,y1:t(r.min),x2:o+s/4,y2:t(r.min),stroke:L,strokeWidth:1.5}),
9
+ /* @__PURE__ */m("rect",{x:o-s/2,y:t(r.q3),width:s,height:Math.max(1,t(r.q1)-t(r.q3)),rx:2,fill:L,fillOpacity:.22,stroke:L,strokeWidth:1.5}),
10
+ /* @__PURE__ */m("line",{x1:o-s/2,y1:t(r.median),x2:o+s/2,y2:t(r.median),stroke:L,strokeWidth:3}),(r.outliers??[]).map((e,i)=>/* @__PURE__ */m("circle",{cx:o,cy:t(e),r:3,fill:L,stroke:l.surface,strokeWidth:1.5},i))]},a)})})})}export{s as BoxPlotChart};
@@ -1 +1 @@
1
- export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-GZFM5V5L.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";
1
+ export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";