efficient-shell 4.155.3 → 4.156.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.
- package/dist/{Browser-TIDINTH6.js → Browser-WBZPCS6W.js} +13 -13
- package/dist/{Documents-RAMFBU5W.js → Documents-5WGBDLTF.js} +11 -11
- package/dist/{Files-MNQESP7F.js → Files-62DPJ4NN.js} +15 -15
- package/dist/Notepad-U67M72JS.js +25 -0
- package/dist/{Preview-B4YSLMYC.js → Preview-O52DJFV6.js} +16 -16
- package/dist/{Spreadsheet-MGNBOJBM.js → Spreadsheet-7PMGYBO6.js} +10 -10
- package/dist/apps/index.js +1 -1
- package/dist/{chunk-YW2RNWY4.js → chunk-5DVD4E4P.js} +1 -1
- package/dist/{chunk-F23LRPOG.js → chunk-ESXQJ7YI.js} +43 -43
- package/dist/chunk-KAESEFKM.js +1 -0
- package/dist/chunk-O5BOGWO3.js +1 -0
- package/dist/index.js +645 -645
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Notepad-4NPCRBGL.js +0 -25
- package/dist/chunk-LVTPUYJO.js +0 -1
|
@@ -787,54 +787,54 @@ return re("div",{className:s,children:/* @__PURE__ */ne("svg",{ref:c,width:"100%
|
|
|
787
787
|
/* @__PURE__ */re("path",{d:v,fill:as.grid}),
|
|
788
788
|
/* @__PURE__ */re("rect",{x:0,y:0,width:p(u),height:a,fill:as.surface,fillOpacity:.72}),
|
|
789
789
|
/* @__PURE__ */re("rect",{x:p(h),y:0,width:Math.max(0,l-p(h)),height:a,fill:as.surface,fillOpacity:.72}),
|
|
790
|
-
/* @__PURE__ */re("rect",{x:p(u),y:0,width:Math.max(1,p(h)-p(u)),height:a,fill:"none",stroke:m,strokeWidth:1}),L("from"),L("to")]})})}function Vs({labels:e,values:t,height:r=220,width:n,bandPadding:a=.24,min:l,max:i,yTickCount:s=4,formatValue:o,yAxisLabel:c,xTickAnchor:d="center",children:u,tooltip:h,ariaLabel:m,className:p,emptyLabel:g}){const f=j().charts,x=D(),b=o??(e=>P(e,x)),y=g??f.noData,v=H(null),w=Fs(v),N=n??w,[k,$]=Y(null),C=_();if(q(()=>{if(null!==k)return M(e=>"Escape"===e.key&&($(null),!0))},[k]),0===e.length)/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */re("rect",{x:p(u),y:0,width:Math.max(1,p(h)-p(u)),height:a,fill:"none",stroke:m,strokeWidth:1}),L("from"),L("to")]})})}function Vs(e,t,r){const n=(t/2+8).toFixed(1),a=e=>{return`clamp(0px, calc(${t=e,r>0?(t/r*100).toFixed(2):"0.00"}% + ${n}px), calc(100% - 184px))`;var t};return e<=r/2?{left:a(e)}:{right:a(r-e)}}function Ks({labels:e,values:t,height:r=220,width:n,bandPadding:a=.24,min:l,max:i,yTickCount:s=4,formatValue:o,yAxisLabel:c,xTickAnchor:d="center",children:u,tooltip:h,ariaLabel:m,className:p,emptyLabel:g}){const f=j().charts,x=D(),b=o??(e=>P(e,x)),y=g??f.noData,v=H(null),w=Fs(v),N=n??w,[k,$]=Y(null),C=_();if(q(()=>{if(null!==k)return M(e=>"Escape"===e.key&&($(null),!0))},[k]),0===e.length)/* @__PURE__ */
|
|
791
791
|
return re("div",{className:p,ref:v,children:/* @__PURE__ */re("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:r},children:y})});const L={top:12,right:16,bottom:26,left:c?58:48},S=L.left,z=Math.max(S+1,N-L.right),A=L.top,F=r-L.bottom,B=t.filter(Number.isFinite),T=l??Math.min(0,...B),I=ss([T,i??ds(Math.max(...B,0))],{from:F,to:A}),W=os(e.length,{from:S,to:z},a),E=I.ticks(s+1),R=Math.max(1,Math.ceil(e.length/Math.max(1,Math.floor(N/84))));/* @__PURE__ */
|
|
792
792
|
return ne("div",{className:`relative ${p??""}`,ref:v,children:[
|
|
793
793
|
/* @__PURE__ */ne("svg",{width:"100%",height:r,viewBox:`0 0 ${N} ${r}`,role:"img","aria-label":m,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>$(null),onBlur:()=>$(null),onKeyDown:t=>{if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const r="ArrowRight"===t.key?1:-1;$(t=>Math.min(e.length-1,Math.max(0,(t??0)+r)))},children:[
|
|
794
794
|
/* @__PURE__ */re("defs",{children:/* @__PURE__ */re("clipPath",{id:C,children:/* @__PURE__ */re("rect",{x:S,y:A,width:z-S,height:F-A})})}),E.map(e=>/* @__PURE__ */re("line",{x1:S,y1:I(e),x2:z,y2:I(e),stroke:as.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
|
|
795
795
|
/* @__PURE__ */re("line",{x1:S,y1:I(Math.max(T,0)),x2:z,y2:I(Math.max(T,0)),stroke:as.axis,strokeWidth:1,shapeRendering:"crispEdges"}),E.map(e=>/* @__PURE__ */re("text",{x:S-8,y:I(e)+4,textAnchor:"end",fontSize:11,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:b(e)},`t${e}`)),c&&/* @__PURE__ */re("text",{x:14,y:(A+F)/2,transform:`rotate(-90 14 ${(A+F)/2})`,textAnchor:"middle",fontSize:11,fill:as.label,children:c}),
|
|
796
796
|
/* @__PURE__ */re("g",{clipPath:`url(#${C})`,children:u({x:W,y:I,left:S,right:z,top:A,bottom:F,width:N,height:r,clipId:C,active:k})}),e.map((e,t)=>t%R===0?/* @__PURE__ */re("text",{x:"start"===d?W(t):W.center(t),y:r-8,textAnchor:"middle",fontSize:11,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:e},`x${t}`):null),e.map((t,r)=>/* @__PURE__ */re("rect",{x:W.center(r)-(z-S)/e.length/2,y:A,width:(z-S)/e.length,height:F-A,fill:"transparent",onMouseEnter:()=>$(r)},`h${r}`))]}),h&&null!==k&&
|
|
797
|
-
/* @__PURE__ */re("div",{className:"absolute top-2 z-10",style:
|
|
798
|
-
return re("div",{className:L,ref:I,children:/* @__PURE__ */re(Rs,{height:r,width:C??W})});const G=t,J=b??U??[0,Math.max(0,G.length-1)],[X,Q]=J,ee=e=>x?e.slice(X,Q+1):e,te=e.map((e,t)=>({...e,slot:t})).filter(e=>e.data.some(
|
|
799
|
-
return re("div",{className:L,ref:I,children:/* @__PURE__ */re("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:r},children:T})});const ae={left:
|
|
797
|
+
/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 z-10",style:Vs(W.center(k),W.bandwidth,N),children:h(k)})]})}var Zs=12,Gs=16,Js=26,Xs=52,Qs=e=>"number"==typeof e&&Number.isFinite(e);function eo({series:e,labels:t,height:r=200,stacked:n=!1,stackMode:a="value",levels:l,curve:i="linear",tension:s=0,max:o,yTickCount:c=4,formatValue:d,yAxisLabel:u,referenceLines:h,labelEndpoints:m=!1,dots:p,dotVariant:g="border",pulse:f=!1,brush:x=!1,range:b,onRangeChange:y,loading:v=!1,animate:w=!0,reveal:N="left-to-right",fillVariant:k="gradient",gridStyle:$="solid",width:C,className:L,emptyLabel:S}){const z=j().charts,A=D(),B=d??(e=>P(e,A)),T=S??z.noData,I=H(null),W=Fs(I),E=C??W,[R,O]=Y(null),[U,V]=Y(null),{highlighted:K}=zs(),Z=_();if(q(()=>{if(null!==R)return M(e=>"Escape"===e.key&&(O(null),!0))},[R]),v)/* @__PURE__ */
|
|
798
|
+
return re("div",{className:L,ref:I,children:/* @__PURE__ */re(Rs,{height:r,width:C??W})});const G=t,J=b??U??[0,Math.max(0,G.length-1)],[X,Q]=J,ee=e=>x?e.slice(X,Q+1):e,te=e.map((e,t)=>({...e,slot:t})).filter(e=>e.data.some(Qs)).map(e=>({...e,data:ee(e.data)}));if(t=ee(G),0===te.length||0===t.length)/* @__PURE__ */
|
|
799
|
+
return re("div",{className:L,ref:I,children:/* @__PURE__ */re("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:r},children:T})});const ae={left:Xs,right:Math.max(Xs+1,E-Gs),top:Zs,bottom:r-Js},le=os(t.length,{from:ae.left,to:ae.right}),ie=t.map((e,t)=>te.reduce((e,r)=>e+(Qs(r.data[t])?r.data[t]:0),0)),se=(e,t)=>ie[t]>0?e/ie[t]:null,oe=[];if(n){let e=t.map(()=>0);for(const t of te)e=e.map((e,r)=>e+(Qs(t.data[r])?t.data[r]:0)),oe.push("percent"===a?e.map((e,t)=>se(e,t)):[...e])}const ce=l&&l.length>0?cs(l,{from:ae.bottom,to:ae.top}):null,de=n?(oe.at(-1)??[]).filter(Qs):te.flatMap(e=>e.data.filter(Qs)),ue=ss([0,n&&"percent"===a?1:o??ds(Math.max(...de,0))],{from:ae.bottom,to:ae.top}),he=e=>ce?ce(e):ue(e),me=n&&"percent"===a?e=>F(Math.round(100*e),0,A):B,pe=ce?ce.levels.map(e=>({value:e,y:ce(e)})):ue.ticks(c+1).map(e=>({value:e,y:ue(e)})),ge=e=>r=>{r.preventDefault(),O(r=>{const n=(r??0)+e;return Math.min(t.length-1,Math.max(0,n))})},fe=Math.max(1,Math.ceil(t.length/Math.max(1,Math.floor(E/96))));/* @__PURE__ */
|
|
800
800
|
return ne("div",{className:`relative ${L??""}`,ref:I,children:[
|
|
801
801
|
/* @__PURE__ */ne("svg",{width:"100%",height:r,viewBox:`0 0 ${E} ${r}`,role:"img","aria-label":z.overIntervals(te.map(e=>e.label),t.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>O(null),onBlur:()=>O(null),onKeyDown:e=>{"ArrowRight"===e.key&&ge(1)(e),"ArrowLeft"===e.key&&ge(-1)(e)},children:[
|
|
802
802
|
/* @__PURE__ */re("defs",{children:/* @__PURE__ */re("clipPath",{id:Z,children:/* @__PURE__ */re("rect",{x:ae.left,y:ae.top,width:ae.right-ae.left,height:ae.bottom-ae.top})})}),
|
|
803
803
|
/* @__PURE__ */re(wa,{id:Z,fills:te.map((e,t)=>({color:is(e.slot,e.color,e.tone),variant:e.fillVariant??k})),fadeFrom:n?.42:.3,reveal:!!w&&N}),pe.map(e=>/* @__PURE__ */re("line",{x1:ae.left,y1:e.y,x2:ae.right,y2:e.y,stroke:as.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===$?"3 3":void 0},`grid-${e.value}`)),
|
|
804
804
|
/* @__PURE__ */re("line",{x1:ae.left,y1:ae.bottom,x2:ae.right,y2:ae.bottom,stroke:as.axis,strokeWidth:1,shapeRendering:"crispEdges"}),pe.map(e=>/* @__PURE__ */re("text",{x:ae.left-8,y:e.y+4,textAnchor:"end",fontSize:11,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:me(e.value)},`ytick-${e.value}`)),u&&/* @__PURE__ */re("text",{x:12,y:(ae.top+ae.bottom)/2,transform:`rotate(-90 12 ${(ae.top+ae.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:as.label,children:u}),
|
|
805
|
-
/* @__PURE__ */re("g",{clipPath:`url(#${Z})`,mask:w&&N?`url(#${ga(Z)})`:void 0,children:te.map((e,r)=>{const a=is(e.slot,e.color,e.tone),l=e.mode??(n?"area":"line"),o=Ps(e.key,K);if("step"===l){const r=t.map((t,r)=>({start:le(r),end:le.end(r),value:e.data[r]})).filter(e=>
|
|
806
|
-
return re("path",{d:xs(r),fill:"none",stroke:a,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:o??void 0,className:"rosh-viz-mark"},e.key)}const c=t.map((t,a)=>{const l=n?oe[r]?.[a]:e.data[a];return
|
|
807
|
-
return re("g",{opacity:o??void 0,className:"rosh-viz-mark",children:t.map((t,i)=>{const s=n?oe[r]?.[i]:e.data[i];if(!
|
|
805
|
+
/* @__PURE__ */re("g",{clipPath:`url(#${Z})`,mask:w&&N?`url(#${ga(Z)})`:void 0,children:te.map((e,r)=>{const a=is(e.slot,e.color,e.tone),l=e.mode??(n?"area":"line"),o=Ps(e.key,K);if("step"===l){const r=t.map((t,r)=>({start:le(r),end:le.end(r),value:e.data[r]})).filter(e=>Qs(e.value)).map(e=>({start:e.start,end:e.end,y:he(e.value)}));/* @__PURE__ */
|
|
806
|
+
return re("path",{d:xs(r),fill:"none",stroke:a,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:o??void 0,className:"rosh-viz-mark"},e.key)}const c=t.map((t,a)=>{const l=n?oe[r]?.[a]:e.data[a];return Qs(l)?[le.center(a),he(l)]:null}).filter(e=>null!==e);if(0===c.length)return null;if("column"===l){const l=Math.max(1,.62*le.bandwidth);/* @__PURE__ */
|
|
807
|
+
return re("g",{opacity:o??void 0,className:"rosh-viz-mark",children:t.map((t,i)=>{const s=n?oe[r]?.[i]:e.data[i];if(!Qs(s))return null;const o=he(s);/* @__PURE__ */
|
|
808
808
|
return re("rect",{x:le.center(i)-l/2,y:o,width:l,height:Math.max(0,ae.bottom-o),rx:2,fill:a,fillOpacity:.35,className:w?ka.rise:void 0,style:w?Ma(i,26):void 0},i)})},e.key)}const d=ws(c,i,s),u=n&&r>0?t.map((e,t)=>[le.center(t),he(oe[r-1]?.[t]??0)-2]):null,h=u?ks(d,u):Ns(d,c,ae.bottom);/* @__PURE__ */
|
|
809
809
|
return ne("g",{opacity:o??void 0,className:"rosh-viz-mark",children:[("area"===l||n)&&
|
|
810
810
|
/* @__PURE__ */re("path",{d:h,fill:xa(Z,r,e.fillVariant??k,a),stroke:"none"}),
|
|
811
811
|
/* @__PURE__ */re("path",{d:d,fill:"none",stroke:a,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:ba(e.stroke??(e.forecast?"animated-dashed":"solid")),className:w&&("animated-dashed"===e.stroke||e.forecast&&!e.stroke)?ka.march:void 0})]},e.key)})}),h?.map((e,t)=>{const r=e.color??ns[e.tone??"critical"],n=he(e.value);/* @__PURE__ */
|
|
812
812
|
return ne("g",{children:[
|
|
813
|
-
/* @__PURE__ */re("line",{x1:ae.left,y1:n,x2:ae.right,y2:n,stroke:r,strokeWidth:1,strokeDasharray:"5 4"}),e.label&&/* @__PURE__ */re("text",{x:ae.right-4,y:n-5,textAnchor:"end",fontSize:10.5,fontWeight:600,fill:r,children:e.label})]},`rule-${t}`)}),"none"!==(p??(m?"last":"none"))&&te.map((e,r)=>{const a=p??(m?"last":"none"),l=is(e.slot,e.color,e.tone),i=[...e.data].map(
|
|
814
|
-
return ne("g",{children:[s.map(a=>{const s=n?oe[r]?.[a]:e.data[a];return
|
|
815
|
-
/* @__PURE__ */re("div",{className:"absolute top-2 z-10",style:
|
|
816
|
-
return re(
|
|
813
|
+
/* @__PURE__ */re("line",{x1:ae.left,y1:n,x2:ae.right,y2:n,stroke:r,strokeWidth:1,strokeDasharray:"5 4"}),e.label&&/* @__PURE__ */re("text",{x:ae.right-4,y:n-5,textAnchor:"end",fontSize:10.5,fontWeight:600,fill:r,children:e.label})]},`rule-${t}`)}),"none"!==(p??(m?"last":"none"))&&te.map((e,r)=>{const a=p??(m?"last":"none"),l=is(e.slot,e.color,e.tone),i=[...e.data].map(Qs).lastIndexOf(!0),s="all"===a?t.map((e,t)=>t).filter(t=>Qs(n?oe[r]?.[t]:e.data[t])):i>=0?[i]:[];/* @__PURE__ */
|
|
814
|
+
return ne("g",{children:[s.map(a=>{const s=n?oe[r]?.[a]:e.data[a];return Qs(s)?/* @__PURE__ */re(qs,{cx:le.center(a),cy:he(s),color:l,variant:g,pulse:f&&a===i,title:`${t[a]}: ${e.label} ${B(s)}`},a):null}),m&&i>=0&&Qs(n?oe[r]?.[i]:e.data[i])&&/* @__PURE__ */re("text",{x:le.center(i)-10,y:he(n?oe[r]?.[i]:e.data[i])-9,textAnchor:"end",fontSize:11.5,fontWeight:600,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:B(n?oe[r]?.[i]:e.data[i])})]},`dots-${e.key}`)}),t.map((e,t)=>t%fe===0?/* @__PURE__ */re("text",{x:le.center(t),y:r-8,textAnchor:"middle",fontSize:11,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:e},`xtick-${t}`):null),null!==R&&/* @__PURE__ */re("line",{x1:le.center(R),y1:ae.top,x2:le.center(R),y2:ae.bottom,stroke:as.axis,strokeWidth:1}),t.map((e,t)=>/* @__PURE__ */re("rect",{x:le(t),y:ae.top,width:Math.max(1,le.bandwidth),height:ae.bottom-ae.top,fill:"transparent",onMouseEnter:()=>O(t)},`hit-${t}`))]}),x&&G.length>2&&/* @__PURE__ */re(Us,{className:"mt-1",labels:G,width:E,data:e[0]?.data??[],range:J,onRangeChange:e=>{y?y(e):V(e)}}),null!==R&&
|
|
815
|
+
/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 z-10",style:Vs(le.center(R),le.bandwidth,E),children:/* @__PURE__ */re(_s,{title:t[R],rows:te.map((e,t)=>({key:e.key,label:e.label,color:is(e.slot,e.color,e.tone),value:Qs(e.data[R])?n&&"percent"===a?`${F(100*(se(e.data[R],R)??0),1,A)} · ${B(e.data[R])}`:B(e.data[R]):void 0})),footnote:n&&"percent"===a?z.inBucket(B(ie[R])):void 0})})]})}function to({series:e,labels:t,stacked:r=!1,stackMode:n="value",height:a=220,width:l,max:i,formatValue:s,yAxisLabel:o,className:c,emptyLabel:d,radius:u=3,loading:h=!1,animate:m=!0,glow:p=!1,emphasise:g=!1,activeKey:f,highlight:x="none"}){const b=_(),{highlighted:y}=zs(),v=j().charts,w=D(),N=s??(e=>P(e,w));if(h)/* @__PURE__ */return re(Rs,{height:a,width:l,variant:"bars",className:c});const k=e.map((e,t)=>({...e,slot:t})).filter(e=>e.data.some(e=>Number.isFinite(e))),M=(e,t)=>{const r=e.data[t];return"number"==typeof r&&Number.isFinite(r)?r:0},$=t.map((e,t)=>k.reduce((e,r)=>e+M(r,t),0)),C=t.map((e,t)=>k.reduce((e,r)=>e+Math.max(0,M(r,t)),0)),L=t.map((e,t)=>k.reduce((e,r)=>e+Math.min(0,M(r,t)),0)),S=r&&"percent"===n,z=(e,t)=>$[t]>0?e/$[t]:null,A=S?[1]:r?[...C,...L]:k.flatMap(e=>e.data.filter(Number.isFinite));/* @__PURE__ */
|
|
816
|
+
return re(Ks,{labels:t,values:A,height:a,width:l,max:S?1:i,formatValue:S?e=>F(Math.round(100*e),0,w):N,yAxisLabel:o,className:c,emptyLabel:d,ariaLabel:v.acrossCategories(k.map(e=>e.label),t.length),tooltip:e=>/* @__PURE__ */re(_s,{title:t[e],rows:k.map(t=>({key:t.key,label:t.label,color:is(t.slot,t.color,t.tone),value:Number.isFinite(t.data[e])?S?`${F(100*(z(t.data[e],e)??0),1,w)} · ${N(t.data[e])}`:N(t.data[e]):void 0})),footnote:S?v.inCategory(N($[e])):void 0}),children:({x:e,y:n,bottom:a,active:l})=>{const i=f?t.indexOf(f):-1,s=As(r?$:k[0]?.data??[],x),o=l??(i>=0?i:s);/* @__PURE__ */
|
|
817
817
|
return ne("g",{children:[
|
|
818
818
|
/* @__PURE__ */re(wa,{id:b,glow:p}),t.map((t,a)=>{const l=e.bandwidth/(r?1:Math.max(1,k.length));let i=0,s=0;const c=n(Math.min(n.domain[1],Math.max(n.domain[0],0)));return k.map((t,d)=>{const h=t.data[a];if(!Number.isFinite(h))return null;const f=S?z(h,a):h;if(null===f)return null;const x=is(t.slot,t.color,t.tone),v=r?e(a):e(a)+d*l;let w,N,M=!0;if(r){const e=f>=0?i:s,t=e+f;f>=0?i=t:s=t,w=n(Math.max(e,t)),N=n(Math.min(e,t)),M=0===e}else w=Math.min(n(f),c),N=Math.max(n(f),c);const $=Math.max(0,N-w-(r&&!M?2:0)),C=null===o||o===a,L=C?x:g?as.muted:x,D=Ps(t.key,y);/* @__PURE__ */
|
|
819
|
-
return re("rect",{x:v,y:w,width:Math.max(1,l),height:$,rx:u,fill:L,fillOpacity:D??(C?1:g?.32:.45),filter:p&&o===a?`url(#${pa(b)})`:void 0,className:"rosh-viz-mark"+(m?` ${ka.rise}`:""),style:m?Ma(a*(r?1:k.length)+d,26):void 0},`${t.key}-${a}`)})}),null!==l&&!g&&/* @__PURE__ */re("line",{x1:e.center(l),y1:n(n.domain[1]),x2:e.center(l),y2:a,stroke:as.axis,strokeWidth:1})]})}})}var
|
|
819
|
+
return re("rect",{x:v,y:w,width:Math.max(1,l),height:$,rx:u,fill:L,fillOpacity:D??(C?1:g?.32:.45),filter:p&&o===a?`url(#${pa(b)})`:void 0,className:"rosh-viz-mark"+(m?` ${ka.rise}`:""),style:m?Ma(a*(r?1:k.length)+d,26):void 0},`${t.key}-${a}`)})}),null!==l&&!g&&/* @__PURE__ */re("line",{x1:e.center(l),y1:n(n.domain[1]),x2:e.center(l),y2:a,stroke:as.axis,strokeWidth:1})]})}})}var ro=3;function no({series:e,height:t=260,width:r,xLabel:n,yLabel:a,formatX:l,formatY:i,xDomain:s,yDomain:o,xScale:c="linear",yScale:d="linear",radiusRange:u=[4,22],className:h,emptyLabel:m}){const p=j().charts,g=D(),f=l??(e=>P(e,g)),x=i??(e=>P(e,g)),b=m??p.noObservations,y=H(null),v=Fs(y),w=r??v,N=_(),[k,$]=Y(null);q(()=>{if(null!==k)return M(e=>"Escape"===e.key&&($(null),!0))},[k]);const C=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),L=e.filter(e=>e.points.length>0).slice(0,3),S=s||o?L.map(e=>({...e,points:e.points.filter(e=>C(e.x,s)&&C(e.y,o))})).filter(e=>e.points.length>0):L,z=L.reduce((e,t)=>e+t.points.length,0)-S.reduce((e,t)=>e+t.points.length,0);if(0===S.length)/* @__PURE__ */
|
|
820
820
|
return re("div",{className:h,ref:y,children:/* @__PURE__ */re("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:t},children:b})});const A=S.flatMap(e=>e.points),F=A.some(e=>null!=e.size),B=14,T=20,I=34,W=52,E=Math.max(W+1,w-T),R=(e,t,r,n)=>{const a=e.filter(e=>e>0),l="log"===r?a.length>0?Math.min(...a):0:Math.min(0,...e),i=t??[l,ds(Math.max(...e))];return"log"===r?us(i,n):ss(i,n)},O=R(A.map(e=>e.x),s,c,{from:W,to:E}),U=R(A.map(e=>e.y),o,d,{from:t-I,to:B}),V=ms([0,Math.max(...A.map(e=>e.size??1))],{from:u[0],to:u[1]}),K=k?S[k.s]:void 0,Z=k&&K?K.points[k.i]:void 0,G=S.flatMap((e,t)=>e.points.map((e,r)=>({s:t,i:r})));/* @__PURE__ */
|
|
821
821
|
return ne("div",{className:`relative ${h??""}`,ref:y,children:[
|
|
822
822
|
/* @__PURE__ */ne("svg",{width:"100%",height:t,viewBox:`0 0 ${w} ${t}`,role:"img","aria-label":p.scatter(S.map(e=>e.label),a??p.yAxis,n??p.xAxis)+(z>0?`. ${p.outsideRange(z)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>$(null),onBlur:()=>$(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,r=k?G.findIndex(e=>e.s===k.s&&e.i===k.i):0;$(G[Math.min(G.length-1,Math.max(0,r+t))])},children:[
|
|
823
823
|
/* @__PURE__ */re("defs",{children:/* @__PURE__ */re("clipPath",{id:N,children:/* @__PURE__ */re("rect",{x:W-u[1],y:B-u[1],width:E-W+2*u[1],height:t-I-B+2*u[1]})})}),U.ticks(5).map(e=>/* @__PURE__ */ne("g",{children:[
|
|
824
824
|
/* @__PURE__ */re("line",{x1:W,y1:U(e),x2:E,y2:U(e),stroke:as.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
825
825
|
/* @__PURE__ */re("text",{x:W-8,y:U(e)+4,textAnchor:"end",fontSize:11,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:x(e)})]},`y${e}`)),O.ticks(5).map(e=>/* @__PURE__ */re("text",{x:O(e),y:t-12,textAnchor:"middle",fontSize:11,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:f(e)},`x${e}`)),n&&/* @__PURE__ */re("text",{x:(W+E)/2,y:t-.5,textAnchor:"middle",fontSize:11,fill:as.label,children:n}),a&&/* @__PURE__ */re("text",{x:12,y:t/2,transform:`rotate(-90 12 ${t/2})`,textAnchor:"middle",fontSize:11,fill:as.label,children:a}),
|
|
826
|
-
/* @__PURE__ */re("g",{clipPath:`url(#${N})`,children:S.map((e,t)=>{const r=is(t,e.color,e.tone);return e.points.map((n,a)=>/* @__PURE__ */re("circle",{cx:O(n.x),cy:U(n.y),r:F?V(n.size??0):u[0]+1,fill:r,fillOpacity:k&&k.s!==t?.25:.62,stroke:as.surface,strokeWidth:2,onMouseEnter:()=>$({s:t,i:a})},`${e.key}-${a}`))})})]}),k&&K&&Z&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:Z.label??K.label,rows:[{key:"x",label:n??p.xAxis,color:is(k.s,K.color,K.tone),value:f(Z.x)},{key:"y",label:a??p.yAxis,color:is(k.s,K.color,K.tone),value:x(Z.y)},...null!=Z.size?[{key:"size",label:p.size,color:as.muted,value:P(Z.size,g)}]:[]],footnote:Z.label?K.label:void 0})})]})}function
|
|
827
|
-
return re(
|
|
826
|
+
/* @__PURE__ */re("g",{clipPath:`url(#${N})`,children:S.map((e,t)=>{const r=is(t,e.color,e.tone);return e.points.map((n,a)=>/* @__PURE__ */re("circle",{cx:O(n.x),cy:U(n.y),r:F?V(n.size??0):u[0]+1,fill:r,fillOpacity:k&&k.s!==t?.25:.62,stroke:as.surface,strokeWidth:2,onMouseEnter:()=>$({s:t,i:a})},`${e.key}-${a}`))})})]}),k&&K&&Z&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:Z.label??K.label,rows:[{key:"x",label:n??p.xAxis,color:is(k.s,K.color,K.tone),value:f(Z.x)},{key:"y",label:a??p.yAxis,color:is(k.s,K.color,K.tone),value:x(Z.y)},...null!=Z.size?[{key:"size",label:p.size,color:as.muted,value:P(Z.size,g)}]:[]],footnote:Z.label?K.label:void 0})})]})}function ao({rows:e,labels:t,variant:r="area",curve:n="linear",height:a=220,width:l,max:i,min:s,formatValue:o,yAxisLabel:c,color:d,tone:u,label:h,className:m,emptyLabel:p,radius:g=3}){const f=j().charts,x=D(),b=o??(e=>P(e,x)),y=h??f.range,v=e.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),w=is(0,d,u);/* @__PURE__ */
|
|
827
|
+
return re(Ks,{labels:t,values:v,height:a,width:l,max:i,min:s,formatValue:b,yAxisLabel:c,className:m,emptyLabel:p,bandPadding:"bar"===r?.34:0,ariaLabel:f.rangeLabel(y,t.length),tooltip:r=>/* @__PURE__ */re(_s,{title:t[r],rows:[{key:"high",label:f.high,color:w,value:null==e[r]?void 0:b(e[r].high)},{key:"low",label:f.low,color:w,value:null==e[r]?void 0:b(e[r].low)}]}),children:({x:t,y:a,active:l})=>"bar"===r?/* @__PURE__ */re("g",{children:e.map((e,r)=>/* @__PURE__ */re("rect",{x:t(r),y:a(e.high),width:Math.max(1,t.bandwidth),height:Math.max(1,a(e.low)-a(e.high)),rx:g,fill:w,fillOpacity:null===l||l===r?.85:.4},r))}):/* @__PURE__ */ne("g",{children:[(()=>{const r=e.map((e,r)=>[t.center(r),a(e.high)]),l=e.map((e,r)=>[t.center(r),a(e.low)]);/* @__PURE__ */
|
|
828
828
|
return ne(ae,{children:[
|
|
829
829
|
/* @__PURE__ */re("path",{d:ks(ws(r,n),l),fill:w,fillOpacity:.2,stroke:"none"}),
|
|
830
830
|
/* @__PURE__ */re("path",{d:ws(r,n),fill:"none",stroke:w,strokeWidth:2,strokeLinejoin:"round"}),
|
|
831
|
-
/* @__PURE__ */re("path",{d:ws(l,n),fill:"none",stroke:w,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==l&&/* @__PURE__ */re("line",{x1:t.center(l),y1:a(e[l].high),x2:t.center(l),y2:a(e[l].low),stroke:as.axis,strokeWidth:1})]})})}function
|
|
832
|
-
return re(
|
|
831
|
+
/* @__PURE__ */re("path",{d:ws(l,n),fill:"none",stroke:w,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==l&&/* @__PURE__ */re("line",{x1:t.center(l),y1:a(e[l].high),x2:t.center(l),y2:a(e[l].low),stroke:as.axis,strokeWidth:1})]})})}function lo({steps:e,height:t=240,width:r,formatValue:n,yAxisLabel:a,className:l,emptyLabel:i,radius:s=3,connectors:o=!0}){const c=j().charts,d=D(),u=n??(e=>P(e,d));let h=0;const m=e.map(e=>{if(e.total){const t={from:0,to:h,value:h,total:!0};return{...e,...t}}const t=h;return h+=e.value,{...e,from:t,to:h,value:e.value,total:!1}}),p=m.flatMap(e=>[e.from,e.to]);/* @__PURE__ */
|
|
832
|
+
return re(Ks,{labels:e.map(e=>e.label),values:p,height:t,width:r,formatValue:u,yAxisLabel:a,className:l,emptyLabel:i,bandPadding:.36,ariaLabel:c.waterfall(e.length,u(m[0]?.from??0),u(h)),tooltip:e=>{const t=m[e],r=t?.total?ns.neutral:t.value>=0?ns.good:ns.critical;/* @__PURE__ */
|
|
833
833
|
return re(_s,{title:t?.label,rows:[{key:"step",color:r,label:t?.total?c.balance:t.value>=0?c.increase:c.decrease,value:t?.total?u(t.to):`${t.value>=0?"+":"−"}${u(Math.abs(t.value))}`},...t?.total?[]:[{key:"running",label:c.runningTotal,color:ns.neutral,value:u(t.to)}]]})},children:({x:e,y:t,active:r})=>/* @__PURE__ */ne("g",{children:[o&&m.slice(0,-1).map((r,n)=>
|
|
834
834
|
/* @__PURE__ */re("line",{x1:e.end(n),y1:t(r.to),x2:e(n+1),y2:t(r.to),stroke:as.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${n}`)),m.map((n,a)=>{const l=n.total?ns.neutral:n.value>=0?ns.good:ns.critical,i=Math.min(t(n.from),t(n.to)),o=Math.max(1,Math.abs(t(n.to)-t(n.from)));/* @__PURE__ */
|
|
835
|
-
return re("rect",{x:e(a),y:i,width:Math.max(1,e.bandwidth),height:o,rx:s,fill:l,fillOpacity:null===r||r===a?1:.45},a)})]})})}function
|
|
836
|
-
return re(
|
|
837
|
-
return re(
|
|
835
|
+
return re("rect",{x:e(a),y:i,width:Math.max(1,e.bandwidth),height:o,rx:s,fill:l,fillOpacity:null===r||r===a?1:.45},a)})]})})}function io({values:e,bins:t=10,precomputed:r,height:n=220,width:a,color:l,tone:i,formatBound:s,formatCount:o,yAxisLabel:c,label:d,className:u,emptyLabel:h}){const m=j().charts,p=D(),g=s??(e=>Number.isInteger(e)?P(e,p):A(e,1,p)),f=o??(e=>P(e,p)),x=c??m.countAxis,b=d??m.distribution,y=r??ps(e??[],t),v=is(0,l,i),w=y.map(e=>g(e.from)),N=y.map(e=>e.count);/* @__PURE__ */
|
|
836
|
+
return re(Ks,{labels:w,values:N,height:n,width:a,bandPadding:0,xTickAnchor:"start",formatValue:f,yAxisLabel:x,className:u,emptyLabel:h,ariaLabel:m.histogram(b,y.length,(e??[]).length),tooltip:e=>/* @__PURE__ */re(_s,{title:`${g(y[e].from)} – ${g(y[e].to)}`,rows:[{key:"count",label:m.observations,color:v,value:f(y[e].count)}]}),children:({x:e,y:t,bottom:r,active:n})=>/* @__PURE__ */re("g",{children:y.map((a,l)=>/* @__PURE__ */re("rect",{x:e(l)+.5,y:t(a.count),width:Math.max(1,e.bandwidth-1),height:Math.max(0,r-t(a.count)),fill:v,fillOpacity:null===n||n===l?.85:.42},l))})})}function so({boxes:e,height:t=240,width:r,color:n,tone:a,formatValue:l,yAxisLabel:i,label:s,className:o,emptyLabel:c}){const d=j().charts,u=D(),h=l??(e=>P(e,u)),m=s??d.distribution,p=is(0,n,a),g=e.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
|
|
837
|
+
return re(Ks,{labels:e.map(e=>e.label),values:g,height:t,width:r,bandPadding:.5,formatValue:h,yAxisLabel:i,className:o,emptyLabel:c,ariaLabel:d.fiveNumber(m,e.length),tooltip:t=>{const r=e[t];/* @__PURE__ */
|
|
838
838
|
return re(_s,{title:r.label,rows:[{key:"max",label:d.maximum,color:p,value:h(r.max)},{key:"q3",label:d.q3,color:p,value:h(r.q3)},{key:"median",label:d.median,color:p,value:h(r.median)},{key:"q1",label:d.q1,color:p,value:h(r.q1)},{key:"min",label:d.minimum,color:p,value:h(r.min)}],emphasisKey:"median",footnote:r.outliers?.length?d.outliers(r.outliers.length):void 0})},children:({x:t,y:r,active:n})=>/* @__PURE__ */re("g",{children:e.map((e,a)=>{const l=t.center(a),i=Math.max(6,t.bandwidth);/* @__PURE__ */
|
|
839
839
|
return ne("g",{opacity:null!==n&&n!==a?.45:1,children:[
|
|
840
840
|
/* @__PURE__ */re("line",{x1:l,y1:r(e.max),x2:l,y2:r(e.q3),stroke:p,strokeWidth:1.5}),
|
|
@@ -842,13 +842,13 @@ return ne("g",{opacity:null!==n&&n!==a?.45:1,children:[
|
|
|
842
842
|
/* @__PURE__ */re("line",{x1:l-i/4,y1:r(e.max),x2:l+i/4,y2:r(e.max),stroke:p,strokeWidth:1.5}),
|
|
843
843
|
/* @__PURE__ */re("line",{x1:l-i/4,y1:r(e.min),x2:l+i/4,y2:r(e.min),stroke:p,strokeWidth:1.5}),
|
|
844
844
|
/* @__PURE__ */re("rect",{x:l-i/2,y:r(e.q3),width:i,height:Math.max(1,r(e.q1)-r(e.q3)),rx:2,fill:p,fillOpacity:.22,stroke:p,strokeWidth:1.5}),
|
|
845
|
-
/* @__PURE__ */re("line",{x1:l-i/2,y1:r(e.median),x2:l+i/2,y2:r(e.median),stroke:p,strokeWidth:3}),(e.outliers??[]).map((e,t)=>/* @__PURE__ */re("circle",{cx:l,cy:r(e),r:3,fill:p,stroke:as.surface,strokeWidth:1.5},t))]},a)})})})}function
|
|
846
|
-
return re(
|
|
845
|
+
/* @__PURE__ */re("line",{x1:l-i/2,y1:r(e.median),x2:l+i/2,y2:r(e.median),stroke:p,strokeWidth:3}),(e.outliers??[]).map((e,t)=>/* @__PURE__ */re("circle",{cx:l,cy:r(e),r:3,fill:p,stroke:as.surface,strokeWidth:1.5},t))]},a)})})})}function oo({candles:e,variant:t="candle",height:r=260,width:n,formatValue:a,yAxisLabel:l,label:i,className:s,emptyLabel:o}){const c=j().charts,d=D(),u=a??(e=>Number.isInteger(e)?P(e,d):A(e,2,d)),h=i??c.price,m=e.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),p=Math.min(...m),g=Math.max(...m),f=.08*(g-p)||1;/* @__PURE__ */
|
|
846
|
+
return re(Ks,{labels:e.map(e=>e.label),values:m,height:r,width:n,min:p-f,max:g+f,bandPadding:.42,formatValue:u,yAxisLabel:l,className:s,emptyLabel:o,ariaLabel:c.ohlc(h,e.length),tooltip:t=>{const r=e[t],n=r.close>=r.open,a=n?ns.good:ns.critical;/* @__PURE__ */
|
|
847
847
|
return re(_s,{title:r.label,rows:[{key:"open",label:c.open,color:a,value:u(r.open)},{key:"high",label:c.high,color:a,value:u(r.high)},{key:"low",label:c.low,color:a,value:u(r.low)},{key:"close",label:c.close,color:a,value:u(r.close)}],emphasisKey:"close",footnote:n?c.closedAbove:c.closedBelow})},children:({x:r,y:n,active:a})=>/* @__PURE__ */re("g",{children:e.map((e,l)=>{const i=e.close>=e.open,s=i?ns.good:ns.critical,o=r.center(l),c=Math.max(3,r.bandwidth),d=null!==a&&a!==l,u=n(Math.max(e.open,e.close)),h=Math.max(1,Math.abs(n(e.close)-n(e.open)));/* @__PURE__ */
|
|
848
848
|
return ne("g",{opacity:d?.45:1,children:[
|
|
849
849
|
/* @__PURE__ */re("line",{x1:o,y1:n(e.high),x2:o,y2:n(e.low),stroke:s,strokeWidth:1.5}),"candle"===t?/* @__PURE__ */re("rect",{x:o-c/2,y:u,width:c,height:h,rx:1,fill:i?s:"transparent",fillOpacity:i?.85:1,stroke:s,strokeWidth:1.5}):/* @__PURE__ */ne(ae,{children:[
|
|
850
850
|
/* @__PURE__ */re("line",{x1:o-c/2,y1:n(e.open),x2:o,y2:n(e.open),stroke:s,strokeWidth:2}),
|
|
851
|
-
/* @__PURE__ */re("line",{x1:o,y1:n(e.close),x2:o+c/2,y2:n(e.close),stroke:s,strokeWidth:2})]})]},l)})})})}function
|
|
851
|
+
/* @__PURE__ */re("line",{x1:o,y1:n(e.close),x2:o+c/2,y2:n(e.close),stroke:s,strokeWidth:2})]})]},l)})})})}function co({rows:e,columns:t,cells:r,height:n,width:a,color:l,max:i,formatValue:s,label:o,className:c,emptyLabel:d,cellGap:u=2,cellRadius:h=2}){const m=j().charts,p=D(),g=s??(e=>P(e,p)),f=o??m.intensity,x=d??m.noActivity,b=H(null),y=Fs(b),v=a??y,w=_(),[N,k]=Y(null);if(q(()=>{if(null!==N)return M(e=>"Escape"===e.key&&(k(null),!0))},[N]),0===e.length||0===t.length)/* @__PURE__ */
|
|
852
852
|
return re("div",{className:c,ref:b,children:/* @__PURE__ */re("p",{className:"py-8 text-center text-sm text-gray-500",children:x})});const $=l??is(0),C=i??Math.max(1,...r.flat().filter(Number.isFinite)),L=96,S=26*e.length,z=n??S+26+26,A=Math.max(2,(Math.max(97,v)-L)/t.length),F=e=>{const t=C>0?Math.max(0,Math.min(1,e/C)):0;return`color-mix(in oklab, ${$} ${(8+92*t).toFixed(1)}%, ${as.surface})`};/* @__PURE__ */
|
|
853
853
|
return ne("div",{className:`relative ${c??""}`,ref:b,children:[
|
|
854
854
|
/* @__PURE__ */ne("svg",{width:"100%",height:z,viewBox:`0 0 ${v} ${z}`,role:"img","aria-label":m.heatmap(f,e.length,t.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>k(null),onBlur:()=>k(null),onKeyDown:r=>{const n="ArrowDown"===r.key?1:"ArrowUp"===r.key?-1:0,a="ArrowRight"===r.key?1:"ArrowLeft"===r.key?-1:0;0===n&&0===a||(r.preventDefault(),k(r=>({r:Math.min(e.length-1,Math.max(0,(r?.r??0)+n)),c:Math.min(t.length-1,Math.max(0,(r?.c??0)+a))})))},children:[
|
|
@@ -858,25 +858,25 @@ return ne("div",{className:`relative ${c??""}`,ref:b,children:[
|
|
|
858
858
|
return re("rect",{x:L+a*A+u/2,y:26*n+u/2,width:Math.max(1,A-u),height:26-u,rx:h,fill:F(l),opacity:i?.55:1,onMouseEnter:()=>k({r:n,c:a}),children:/* @__PURE__ */re("title",{children:`${e} · ${t}: ${g(l)}`})},`${n}-${a}`)})),t.map((e,r)=>r%Math.max(1,Math.ceil(t.length/Math.max(1,Math.floor((v-L)/56))))===0?/* @__PURE__ */re("text",{x:L+r*A+A/2,y:S+15,textAnchor:"middle",fontSize:11,fill:as.label,children:e},`c${r}`):null),
|
|
859
859
|
/* @__PURE__ */re("rect",{x:L,y:S+26,width:Math.min(180,Math.max(40,v-L)),height:8,rx:4,fill:`url(#${w})`}),
|
|
860
860
|
/* @__PURE__ */re("text",{x:L,y:S+48,fontSize:10.5,fill:as.label,children:"0"}),
|
|
861
|
-
/* @__PURE__ */re("text",{x:L+Math.min(180,Math.max(40,v-L)),y:S+48,textAnchor:"end",fontSize:10.5,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:g(C)})]}),N&&/* @__PURE__ */re("div",{className:"absolute top-1 right-1 z-10",children:/* @__PURE__ */re(_s,{title:`${e[N.r]} · ${t[N.c]}`,rows:[{key:"v",label:f,color:$,value:null==r[N.r]?.[N.c]?void 0:g(r[N.r][N.c])}]})})]})}function
|
|
861
|
+
/* @__PURE__ */re("text",{x:L+Math.min(180,Math.max(40,v-L)),y:S+48,textAnchor:"end",fontSize:10.5,fill:as.label,style:{fontVariantNumeric:"tabular-nums"},children:g(C)})]}),N&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */re(_s,{title:`${e[N.r]} · ${t[N.c]}`,rows:[{key:"v",label:f,color:$,value:null==r[N.r]?.[N.c]?void 0:g(r[N.r][N.c])}]})})]})}function uo({caption:e,head:t,rows:r}){/* @__PURE__ */
|
|
862
862
|
return ne("table",{className:"sr-only",children:[
|
|
863
863
|
/* @__PURE__ */re("caption",{children:e}),
|
|
864
864
|
/* @__PURE__ */re("thead",{children:/* @__PURE__ */re("tr",{children:t.map(e=>/* @__PURE__ */re("th",{scope:"col",children:e},e))})}),
|
|
865
|
-
/* @__PURE__ */re("tbody",{children:r.map((e,t)=>/* @__PURE__ */re("tr",{children:e.map((e,t)=>/* @__PURE__ */re("td",{children:e},t))},t))})]})}var
|
|
865
|
+
/* @__PURE__ */re("tbody",{children:r.map((e,t)=>/* @__PURE__ */re("tr",{children:e.map((e,t)=>/* @__PURE__ */re("td",{children:e},t))},t))})]})}var ho=3,mo=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function po({axes:e,series:t,size:r=300,mode:n="area",grid:a="polygon",rings:l=4,formatValue:i,animate:s=!0,className:o,emptyLabel:c}){const d=j().charts,u=D(),h=i??(e=>P(e,u)),m=c??d.nothingToCompare,p=_(),[g,f]=Y(null),{highlighted:x}=zs(),b=t.slice(0,3);if(e.length<3||0===b.length)/* @__PURE__ */
|
|
866
866
|
return re("p",{className:`text-sm text-gray-500 ${o??""}`,children:m});const y=r/2,v=r/2,w=r/2-46,N=hs(e.length),k=e.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...b.map(e=>e.values[t]??0).filter(Number.isFinite))),M=(e,t)=>{const r=Math.max(0,Math.min(1,t/k[e])),n=N.center(e)-N.step/2;return[y+w*r*Math.cos(n),v+w*r*Math.sin(n)]},$=(e,t)=>null!==g?g!==e:null!==x&&x!==t,C=null!==g?b[g]:void 0;/* @__PURE__ */
|
|
867
867
|
return ne("div",{className:`relative ${o??""}`,children:[
|
|
868
868
|
/* @__PURE__ */ne("svg",{width:"100%",height:r,viewBox:`0 0 ${r} ${r}`,role:"img","aria-labelledby":p,onMouseLeave:()=>f(null),children:[
|
|
869
|
-
/* @__PURE__ */re("title",{id:p,children:d.acrossMeasures(b.map(e=>e.label),e.length)}),Array.from({length:l},(t,r)=>{const n=w*(r+1)/l;return"circle"===a?/* @__PURE__ */re("circle",{cx:y,cy:v,r:n,fill:"none",stroke:as.grid,strokeWidth:1},r):/* @__PURE__ */re("path",{d:
|
|
869
|
+
/* @__PURE__ */re("title",{id:p,children:d.acrossMeasures(b.map(e=>e.label),e.length)}),Array.from({length:l},(t,r)=>{const n=w*(r+1)/l;return"circle"===a?/* @__PURE__ */re("circle",{cx:y,cy:v,r:n,fill:"none",stroke:as.grid,strokeWidth:1},r):/* @__PURE__ */re("path",{d:mo(Ms(y,v,n,e.length)),fill:"none",stroke:as.grid,strokeWidth:1},r)}),e.map((e,t)=>{const[r,n]=M(t,k[t]);/* @__PURE__ */
|
|
870
870
|
return ne("g",{children:[
|
|
871
871
|
/* @__PURE__ */re("line",{x1:y,y1:v,x2:r,y2:n,stroke:as.grid,strokeWidth:1}),
|
|
872
872
|
/* @__PURE__ */re("text",{x:y+(w+18)*Math.cos(N.center(t)-N.step/2),y:v+(w+18)*Math.sin(N.center(t)-N.step/2)+4,textAnchor:"middle",fontSize:11,fill:as.label,children:e.label})]},e.key)}),
|
|
873
873
|
/* @__PURE__ */re(wa,{id:p,reveal:!!s&&"center-out"}),b.map((t,r)=>{const a=is(r,t.color,t.tone),l=e.map((e,r)=>M(r,t.values[r]??0));/* @__PURE__ */
|
|
874
|
-
return ne("g",{opacity:$(r,t.key)?.3:1,onMouseEnter:()=>f(r),mask:s?`url(#${ga(p)})`:void 0,children:["area"===n&&/* @__PURE__ */re("path",{d:
|
|
875
|
-
/* @__PURE__ */re("path",{d:
|
|
874
|
+
return ne("g",{opacity:$(r,t.key)?.3:1,onMouseEnter:()=>f(r),mask:s?`url(#${ga(p)})`:void 0,children:["area"===n&&/* @__PURE__ */re("path",{d:mo(l),fill:a,fillOpacity:.18,stroke:"none"}),
|
|
875
|
+
/* @__PURE__ */re("path",{d:mo(l),fill:"none",stroke:a,strokeWidth:2,strokeLinejoin:"round"}),l.map(([e,t],r)=>/* @__PURE__ */re("circle",{cx:e,cy:t,r:3.5,fill:a,stroke:as.surface,strokeWidth:1.5},r))]},t.key)})]}),C&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:C.label,rows:e.map((e,t)=>({key:e.key,label:e.label,color:is(g,C.color,C.tone),value:h(C.values[t]??0)}))})}),
|
|
876
876
|
/* @__PURE__ */re("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:b.map((e,t)=>/* @__PURE__ */ne("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
877
877
|
/* @__PURE__ */re("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:is(t,e.color,e.tone)}}),
|
|
878
878
|
/* @__PURE__ */re("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
879
|
-
/* @__PURE__ */re(
|
|
879
|
+
/* @__PURE__ */re(uo,{caption:d.acrossMeasures(b.map(e=>e.label),e.length),head:[d.tableSeries,...e.map(e=>e.label)],rows:b.map(t=>[t.label,...e.map((e,r)=>h(t.values[r]??0))])})]})}function go({segments:e,variant:t="pie",size:r=280,innerRadius:n,padAngle:a=.012,maxSegments:l=6,otherLabel:i,formatValue:s,centerLabel:o,animate:c=!0,labels:d="none",labelMinShare:u=.04,className:h,emptyLabel:m}){const p=j().charts,g=D(),f=s??(e=>P(e,g)),x=i??p.other,b=m??p.nothingToBreakDown,y=_(),[v,w]=Y(null),{highlighted:N}=zs(),k=e.filter(e=>e.value>0);if(0===k.length)/* @__PURE__ */return re("p",{className:`text-sm text-gray-500 ${h??""}`,children:b});const M=[...k].sort((e,t)=>t.value-e.value),$=M.slice(0,l),C=M.slice(l),L=C.length>0?[...$,{key:"__other__",label:x,value:C.reduce((e,t)=>e+t.value,0)}]:$,S=L.reduce((e,t)=>e+t.value,0),z=r/2,A=r/2,B=r/2-12,T=n??("ring"===t?.58*B:0),I=hs(L.length,a),W=Math.max(...L.map(e=>e.value)),E=e=>T+(B-T)*Math.sqrt(Math.max(0,e)/W);let R=-Math.PI/2;const O=(()=>{if("outside"!==d)return[];let e=-Math.PI/2;const r=L.map((r,n)=>{const l="rose"===t?hs(L.length,a).step:r.value/S*Math.PI*2,i="rose"===t?hs(L.length,a).center(n):e+l/2;e+=l;const s="rose"===t?E(r.value):B;return{key:r.key,label:r.label,share:r.value/S,right:Math.cos(i)>=0,anchor:[z+s*Math.cos(i),A+s*Math.sin(i)],y:A+(s+14)*Math.sin(i),index:n}}).filter(e=>e.share>=u);for(const e of[!0,!1]){const t=r.filter(t=>t.right===e).sort((e,t)=>e.y-t.y);for(let e=1;e<t.length;e+=1)t[e].y-t[e-1].y<15&&(t[e].y=t[e-1].y+15)}return r})(),H=(e,t)=>null!==v?v!==e:null!==N&&N!==t,q=null!==v?L[v]:void 0;/* @__PURE__ */
|
|
880
880
|
return ne("div",{className:`relative ${h??""}`,children:[
|
|
881
881
|
/* @__PURE__ */ne("svg",{width:"100%",height:r,viewBox:`0 0 ${r} ${r}`,role:"img","aria-labelledby":y,onMouseLeave:()=>w(null),children:[
|
|
882
882
|
/* @__PURE__ */re("title",{id:y,children:p.breakdown(f(S),L.length)}),L.map((e,r)=>{const n=is(r,e.color,e.tone),l="rose"===t?I(r):R,i="rose"===t?I.step:e.value/S*Math.PI*2-a;"rose"!==t&&(R+=e.value/S*Math.PI*2);const s=l+Math.max(.001,i),o="rose"===t?E(e.value):B;/* @__PURE__ */
|
|
@@ -884,22 +884,22 @@ return re("path",{d:$s(z,A,T,o,l,s),fill:n,fillOpacity:H(r,e.key)?.4:1,stroke:as
|
|
|
884
884
|
return ne("g",{children:[
|
|
885
885
|
/* @__PURE__ */re("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${n},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:as.grid,strokeWidth:1}),
|
|
886
886
|
/* @__PURE__ */re("text",{x:t,y:e.y-2,fontSize:10.5,fill:as.label,textAnchor:e.right?"end":"start",children:e.label}),
|
|
887
|
-
/* @__PURE__ */re("text",{x:t,y:e.y+10,fontSize:10.5,fontWeight:600,fill:as.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:F(100*e.share,1,g)})]},`lbl-${e.key}`)}),o&&T>0&&/* @__PURE__ */re("text",{x:z,y:A+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:as.label,children:o})]}),q&&null!==v&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:q.label,rows:[{key:"value",label:p.value,color:is(v,q.color,q.tone),value:f(q.value)},{key:"share",label:p.share,color:as.muted,value:F(q.value/S*100,1,g)}]})}),
|
|
887
|
+
/* @__PURE__ */re("text",{x:t,y:e.y+10,fontSize:10.5,fontWeight:600,fill:as.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:F(100*e.share,1,g)})]},`lbl-${e.key}`)}),o&&T>0&&/* @__PURE__ */re("text",{x:z,y:A+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:as.label,children:o})]}),q&&null!==v&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:q.label,rows:[{key:"value",label:p.value,color:is(v,q.color,q.tone),value:f(q.value)},{key:"share",label:p.share,color:as.muted,value:F(q.value/S*100,1,g)}]})}),
|
|
888
888
|
/* @__PURE__ */re("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:L.map((e,t)=>/* @__PURE__ */ne("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
889
889
|
/* @__PURE__ */re("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:is(t,e.color,e.tone)}}),
|
|
890
890
|
/* @__PURE__ */re("span",{className:"flex-1 truncate",children:e.label}),
|
|
891
|
-
/* @__PURE__ */re("span",{className:"tabular-nums text-gray-800",children:F(e.value/S*100,1,g)})]},e.key))})]})}var
|
|
891
|
+
/* @__PURE__ */re("span",{className:"tabular-nums text-gray-800",children:F(e.value/S*100,1,g)})]},e.key))})]})}var fo=300*Math.PI/180;function xo({rows:e,variant:t="track",size:r=300,max:n,formatValue:a,animate:l=!0,className:i,emptyLabel:s,trackGap:o=6}){const c=j().charts,d=D(),u=a??(e=>P(e,d)),h=s??c.nothingToPlot,m=_(),[p,g]=Y(null),{highlighted:f}=zs();if(0===e.length)/* @__PURE__ */return re("p",{className:`text-sm text-gray-500 ${i??""}`,children:h});const x=r/2,b=r/2,y=r/2-10,v=n??Math.max(...e.map(e=>e.value),1),w="track"===t?Math.max(6,(y-.16*r)/e.length):0,N=Math.max(1,Math.floor((y-.16*r)/w||1)),k="track"===t?e.slice(0,N):e,M=Math.min(o,Math.max(1,w-2)),$=hs(k.length,.03),C=null!==p?k[p]:void 0;/* @__PURE__ */
|
|
892
892
|
return ne("div",{className:`relative ${i??""}`,children:[
|
|
893
893
|
/* @__PURE__ */ne("svg",{width:"100%",height:r,viewBox:`0 0 ${r} ${r}`,role:"img","aria-labelledby":m,onMouseLeave:()=>g(null),children:[
|
|
894
894
|
/* @__PURE__ */re("title",{id:m,children:"track"===t?c.radialTrack(k.length):c.radialCycle(k.length)}),k.map((e,n)=>{const a=is(n,e.color,e.tone),i=Math.max(0,Math.min(1,e.value/v)),s=((e,t)=>null!==p?p!==e:null!==f&&f!==t)(n,e.key);if("track"===t){const t=y-n*w,r=t-w+M,o=-Math.PI/2;/* @__PURE__ */
|
|
895
895
|
return ne("g",{opacity:s?.4:1,onMouseEnter:()=>g(n),className:l?ka.sweep:void 0,style:l?Ma(n,70):void 0,children:[
|
|
896
|
-
/* @__PURE__ */re("path",{d:$s(x,b,r,t,o,o+
|
|
897
|
-
/* @__PURE__ */re("path",{d:$s(x,b,r,t,o,o+
|
|
898
|
-
return re("g",{opacity:s?.4:1,onMouseEnter:()=>g(n),children:/* @__PURE__ */re("path",{d:$s(x,b,o,o+(y-o)*i,$(n),$(n)+$.step),fill:a})},e.key)})]}),C&&null!==p&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:C.label,rows:[{key:"value",label:c.value,color:is(p,C.color,C.tone),value:u(C.value)}]})}),
|
|
896
|
+
/* @__PURE__ */re("path",{d:$s(x,b,r,t,o,o+fo),fill:as.grid}),
|
|
897
|
+
/* @__PURE__ */re("path",{d:$s(x,b,r,t,o,o+fo*i),fill:a})]},e.key)}const o=.14*r;/* @__PURE__ */
|
|
898
|
+
return re("g",{opacity:s?.4:1,onMouseEnter:()=>g(n),children:/* @__PURE__ */re("path",{d:$s(x,b,o,o+(y-o)*i,$(n),$(n)+$.step),fill:a})},e.key)})]}),C&&null!==p&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:C.label,rows:[{key:"value",label:c.value,color:is(p,C.color,C.tone),value:u(C.value)}]})}),
|
|
899
899
|
/* @__PURE__ */re("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:e.map((e,t)=>/* @__PURE__ */ne("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
900
900
|
/* @__PURE__ */re("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:is(t,e.color,e.tone)}}),
|
|
901
901
|
/* @__PURE__ */re("span",{className:"flex-1 truncate",children:e.label}),
|
|
902
|
-
/* @__PURE__ */re("span",{className:"tabular-nums text-gray-800",children:u(e.value)})]},e.key))})]})}function
|
|
902
|
+
/* @__PURE__ */re("span",{className:"tabular-nums text-gray-800",children:u(e.value)})]},e.key))})]})}function bo({stages:e,shape:t="funnel",height:r,width:n=560,gap:a=4,formatValue:l,color:i,className:s,emptyLabel:o}){const c=j().charts,d=D(),u=l??(e=>P(e,d)),h=o??c.noStages,m=_(),[p,g]=Y(null),{highlighted:f}=zs();if(0===e.length)/* @__PURE__ */return re("p",{className:`text-sm text-gray-500 ${s??""}`,children:h});const x=i??is(0),b=r??54*e.length,y=Math.max(...e.map(e=>e.value),1),v=168,w=n-v,N=e=>w*Math.max(0,e/y)/2,k=v+w/2,M=t=>46+t/Math.max(1,e.length-1)*54,$=e=>`color-mix(in oklab, ${x} ${M(e).toFixed(0)}%, ${as.surface})`,C=e=>M(e)>=55?as.surface:as.label,L=(e,t)=>null!==p?p!==e:null!==f&&f!==t,S=null!==p?e[p]:void 0;/* @__PURE__ */
|
|
903
903
|
return ne("div",{className:`relative ${s??""}`,children:[
|
|
904
904
|
/* @__PURE__ */ne("svg",{width:"100%",height:b,viewBox:`0 0 ${n} ${b}`,role:"img","aria-labelledby":m,onMouseLeave:()=>g(null),children:[
|
|
905
905
|
/* @__PURE__ */re("title",{id:m,children:c.funnel(e.length,u(e[0].value),u(e[e.length-1].value))}),e.map((r,n)=>{const l=n*b/e.length+a/2,i=(n+1)*b/e.length-a/2,s=N(r.value),o="cone"===t?N(e[n+1]?.value??r.value):s,c=e[n-1]?.value,h=null!=c&&c>0?100*(1-r.value/c):null;/* @__PURE__ */
|
|
@@ -907,28 +907,28 @@ return ne("g",{opacity:L(n,r.key)?.45:1,onMouseEnter:()=>g(n),children:[
|
|
|
907
907
|
/* @__PURE__ */re("path",{d:`M${k-s},${l} L${k+s},${l} L${k+o},${i} L${k-o},${i} Z`,fill:$(n)}),
|
|
908
908
|
/* @__PURE__ */re("text",{x:154,y:(l+i)/2-2,textAnchor:"end",fontSize:12,fill:as.label,children:r.label}),
|
|
909
909
|
/* @__PURE__ */ne("text",{x:154,y:(l+i)/2+14,textAnchor:"end",fontSize:11,fill:as.muted,style:{fontVariantNumeric:"tabular-nums"},children:[u(r.value),null!=h?` · −${F(h,1,d)}`:""]}),
|
|
910
|
-
/* @__PURE__ */re("text",{x:k,y:(l+i)/2+4,textAnchor:"middle",fontSize:11.5,fontWeight:600,fill:C(n),style:{fontVariantNumeric:"tabular-nums"},children:F(r.value/(e[0].value||1)*100,0,d)})]},r.key)})]}),S&&null!==p&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:S.label,rows:[{key:"value",label:c.count,color:$(p),value:u(S.value)},{key:"share",label:c.ofFirstStage,color:as.muted,value:F(S.value/(e[0].value||1)*100,0,d)},...p>0&&e[p-1].value>0?[{key:"drop",label:c.droppedHere,color:ns.critical,value:`−${F(100*(1-S.value/e[p-1].value),1,d)}`}]:[]]})})]})}function
|
|
910
|
+
/* @__PURE__ */re("text",{x:k,y:(l+i)/2+4,textAnchor:"middle",fontSize:11.5,fontWeight:600,fill:C(n),style:{fontVariantNumeric:"tabular-nums"},children:F(r.value/(e[0].value||1)*100,0,d)})]},r.key)})]}),S&&null!==p&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:S.label,rows:[{key:"value",label:c.count,color:$(p),value:u(S.value)},{key:"share",label:c.ofFirstStage,color:as.muted,value:F(S.value/(e[0].value||1)*100,0,d)},...p>0&&e[p-1].value>0?[{key:"drop",label:c.droppedHere,color:ns.critical,value:`−${F(100*(1-S.value/e[p-1].value),1,d)}`}]:[]]})})]})}function yo({items:e,height:t=320,width:r,gap:n=2,radius:a=3,formatValue:l,color:i,className:s,emptyLabel:o}){const c=j().charts,d=D(),u=l??(e=>P(e,d)),h=o??c.nothingToBreakDown,m=H(null),p=Fs(m),g=r??p,[f,x]=Y(null),{highlighted:b}=zs(),y=Ds(e,g,t);if(0===y.length)/* @__PURE__ */
|
|
911
911
|
return re("div",{className:s,ref:m,children:/* @__PURE__ */re("p",{className:"py-8 text-center text-sm text-gray-500",children:h})});const v=i??is(0),w=Math.max(...y.map(e=>e.value),1),N=e=>34+e/w*62,k=e=>`color-mix(in oklab, ${v} ${N(e).toFixed(0)}%, ${as.surface})`,M=e=>N(e)>=55?as.surface:as.label,$=f??b,C=f?y.find(e=>e.key===f):void 0;/* @__PURE__ */
|
|
912
912
|
return ne("div",{className:`relative ${s??""}`,ref:m,children:[
|
|
913
913
|
/* @__PURE__ */re("svg",{width:"100%",height:t,viewBox:`0 0 ${g} ${t}`,role:"img","aria-label":c.treemap(e.length),onMouseLeave:()=>x(null),children:y.map(e=>{const t=Math.max(0,e.width-n),r=Math.max(0,e.height-n),l=t>6.2*e.label.length+12&&r>30,i=l&&r>44;/* @__PURE__ */
|
|
914
914
|
return ne("g",{opacity:$&&$!==e.key?.55:1,onMouseEnter:()=>x(e.key),children:[
|
|
915
|
-
/* @__PURE__ */re("rect",{x:e.x+n/2,y:e.y+n/2,width:t,height:r,rx:a,fill:k(e.value)}),l&&/* @__PURE__ */re("text",{x:e.x+n/2+8,y:e.y+n/2+18,fontSize:11.5,fontWeight:600,fill:M(e.value),children:e.label}),i&&/* @__PURE__ */re("text",{x:e.x+n/2+8,y:e.y+n/2+34,fontSize:11,fill:M(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:u(e.value)})]},e.key)})}),C&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:C.label,rows:[{key:"value",label:c.value,color:k(C.value),value:u(C.value)}]})}),
|
|
916
|
-
/* @__PURE__ */re(
|
|
915
|
+
/* @__PURE__ */re("rect",{x:e.x+n/2,y:e.y+n/2,width:t,height:r,rx:a,fill:k(e.value)}),l&&/* @__PURE__ */re("text",{x:e.x+n/2+8,y:e.y+n/2+18,fontSize:11.5,fontWeight:600,fill:M(e.value),children:e.label}),i&&/* @__PURE__ */re("text",{x:e.x+n/2+8,y:e.y+n/2+34,fontSize:11,fill:M(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:u(e.value)})]},e.key)})}),C&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:C.label,rows:[{key:"value",label:c.value,color:k(C.value),value:u(C.value)}]})}),
|
|
916
|
+
/* @__PURE__ */re(uo,{caption:c.treemap(e.length),head:[c.tableItem,c.value],rows:y.map(e=>[e.label,u(e.value)])})]})}function vo(e,t,r,n,a,l,i,s){if(n>=8)return;const o=e.reduce((e,t)=>e+wo(t,8-n),0);if(o<=0)return;let c=t;e.forEach((e,t)=>{const d=wo(e,8-n),u=d/o*r,h=`${i}/${e.key}`,m=0===n?t:a,p=0===n?e.key:l;s.push({id:h,label:e.label,value:d,depth:n,start:c,end:c+u,branch:m,branchKey:p}),e.children?.length&&vo(e.children,c,u,n+1,m,p,h,s),c+=u})}function wo(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+wo(r,t-1),0):Math.max(0,e.value??0)}function No({nodes:e,size:t=320,innerRadius:r=44,ringGap:n=2,formatValue:a,centerLabel:l,className:i,emptyLabel:s}){const o=j().charts,c=D(),d=a??(e=>P(e,c)),u=s??o.nothingToBreakDown,[h,m]=Y(null),{highlighted:p}=zs(),g=[];if(vo(e,-Math.PI/2,2*Math.PI,0,0,"","",g),0===g.length)/* @__PURE__ */return re("p",{className:`text-sm text-gray-500 ${i??""}`,children:u});const f=Math.max(...g.map(e=>e.depth))+1,x=t/2,b=t/2,y=(t/2-8-r)/f,v=g.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),w=e=>`color-mix(in oklab, ${is(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${as.surface})`,N=e=>null!==h?e.id===h:null===p||e.branchKey===p,k=h?g.find(e=>e.id===h):void 0,M=e=>F(e.value/v*100,1,c);/* @__PURE__ */
|
|
917
917
|
return ne("div",{className:`relative ${i??""}`,children:[
|
|
918
|
-
/* @__PURE__ */ne("svg",{width:"100%",height:t,viewBox:`0 0 ${t} ${t}`,role:"img","aria-label":o.sunburst(d(v),f),onMouseLeave:()=>m(null),children:[g.map(e=>/* @__PURE__ */re("path",{d:$s(x,b,r+e.depth*y+n/2,r+(e.depth+1)*y-n/2,e.start,e.end),fill:w(e),fillOpacity:N(e)?1:.45,stroke:as.surface,strokeWidth:1,onMouseEnter:()=>m(e.id)},e.id)),l&&/* @__PURE__ */re("text",{x:x,y:b+5,textAnchor:"middle",fontSize:15,fontWeight:600,fill:as.label,children:l})]}),k&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:k.label,rows:[{key:"value",label:o.value,color:w(k),value:d(k.value)},{key:"share",label:o.share,color:as.muted,value:M(k)}]})}),
|
|
919
|
-
/* @__PURE__ */re(
|
|
918
|
+
/* @__PURE__ */ne("svg",{width:"100%",height:t,viewBox:`0 0 ${t} ${t}`,role:"img","aria-label":o.sunburst(d(v),f),onMouseLeave:()=>m(null),children:[g.map(e=>/* @__PURE__ */re("path",{d:$s(x,b,r+e.depth*y+n/2,r+(e.depth+1)*y-n/2,e.start,e.end),fill:w(e),fillOpacity:N(e)?1:.45,stroke:as.surface,strokeWidth:1,onMouseEnter:()=>m(e.id)},e.id)),l&&/* @__PURE__ */re("text",{x:x,y:b+5,textAnchor:"middle",fontSize:15,fontWeight:600,fill:as.label,children:l})]}),k&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:k.label,rows:[{key:"value",label:o.value,color:w(k),value:d(k.value)},{key:"share",label:o.share,color:as.muted,value:M(k)}]})}),
|
|
919
|
+
/* @__PURE__ */re(uo,{caption:o.sunburst(d(v),f),head:[o.tableLevel,o.tableItem,o.value,o.share],rows:g.map(e=>[e.depth+1,e.label,d(e.value),M(e)])})]})}function ko({nodes:e,links:t,height:r=320,width:n,nodeWidth:a=14,nodePadding:l=12,formatValue:i,className:s,emptyLabel:o}){const c=j().charts,d=D(),u=i??(e=>P(e,d)),h=o??c.noFlows,m=H(null),p=Fs(m),g=n??p,[f,x]=Y(null),{highlighted:b}=zs();if(0===e.length||0===t.length)/* @__PURE__ */
|
|
920
920
|
return re("div",{className:s,ref:m,children:/* @__PURE__ */re("p",{className:"py-8 text-center text-sm text-gray-500",children:h})});const y=[...new Set(e.map(e=>e.depth))].sort((e,t)=>e-t),v=e=>y.length<=1?0:y.indexOf(e)/(y.length-1)*(g-a-140)+70,w=new Map(e.map(e=>{const r=t.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=t.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(r,n,e.value??0)]})),N=/* @__PURE__ */new Map;for(const t of e)N.set(t.depth,[...N.get(t.depth)??[],t]);const k=Math.max(...[...N.values()].map(e=>e.reduce((e,t)=>e+(w.get(t.key)??0),0))),M=r-20,$=k>0?(M-l*(Math.max(...[...N.values()].map(e=>e.length))-1))/k:0,C=/* @__PURE__ */new Map;for(const[e,t]of N){const r=t.map(e=>Math.max(2,(w.get(e.key)??0)*$)),n=r.reduce((e,t)=>e+t,0)+l*(t.length-1),a=r.reduce((e,t)=>e+Math.max(0,t-2),0),i=n>M&&a>0?Math.max(0,1-(n-M)/a):1;let s=10;t.forEach((t,n)=>{const a=2+Math.max(0,r[n]-2)*i;C.set(t.key,{x:v(e),y:s,h:a,index:n}),s+=a+l})}const L=/* @__PURE__ */new Map,S=/* @__PURE__ */new Map,z=/* @__PURE__ */new Map,A=(e,t)=>e.from===t||e.to===t,F="link"===f?.kind?t[f.index]:void 0,B="node"===f?.kind?e.find(e=>e.key===f.key):void 0;/* @__PURE__ */
|
|
921
921
|
return ne("div",{className:`relative ${s??""}`,ref:m,children:[
|
|
922
922
|
/* @__PURE__ */ne("svg",{width:"100%",height:r,viewBox:`0 0 ${g} ${r}`,role:"img","aria-label":c.sankey(e.length,t.length),onMouseLeave:()=>x(null),children:[t.map((e,t)=>{const r=C.get(e.from),n=C.get(e.to);if(!r||!n)return null;const l=Math.max(1,e.value*$),i=r.y+(L.get(e.from)??0)+l/2,s=n.y+(S.get(e.to)??0)+l/2;L.set(e.from,(L.get(e.from)??0)+l),S.set(e.to,(S.get(e.to)??0)+l);const o=r.x+a,c=n.x,d=is(r.index,e.color),u=`${e.from}→${e.to}`,h=z.get(u)??0;z.set(u,h+1);const m=((e,t)=>f?"link"===f.kind?f.index===t:A(e,f.key):null!==b?A(e,b):null)(e,t);/* @__PURE__ */
|
|
923
923
|
return re("path",{d:vs([[o,i],[c,s]]),fill:"none",stroke:d,strokeWidth:l,strokeOpacity:null===m||m?.42:.12,onMouseEnter:()=>x({kind:"link",index:t})},h?`${u}#${h}`:u)}),e.map(e=>{const r=C.get(e.key);if(!r)return null;const n=r.x>g/2,l=(i=e.key,f?"node"===f.kind?f.key===i:A(t[f.index],i):null!==b?b===i:null);var i;/* @__PURE__ */
|
|
924
924
|
return ne("g",{opacity:null===l||l?1:.45,onMouseEnter:()=>x({kind:"node",key:e.key}),children:[
|
|
925
925
|
/* @__PURE__ */re("rect",{x:r.x,y:r.y,width:a,height:r.h,rx:2,fill:is(r.index,e.color,e.tone)}),
|
|
926
|
-
/* @__PURE__ */re("text",{x:n?r.x-8:r.x+a+8,y:r.y+r.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:as.label,children:e.label})]},e.key)})]}),F&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:`${F.from} → ${F.to}`,rows:[{key:"value",label:c.flow,color:is(C.get(F.from)?.index??0,F.color),value:u(F.value)}]})}),B&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:B.label,rows:[{key:"value",label:c.throughput,color:is(C.get(B.key)?.index??0,B.color,B.tone),value:u(w.get(B.key)??0)}]})}),
|
|
927
|
-
/* @__PURE__ */re(
|
|
926
|
+
/* @__PURE__ */re("text",{x:n?r.x-8:r.x+a+8,y:r.y+r.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:as.label,children:e.label})]},e.key)})]}),F&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:`${F.from} → ${F.to}`,rows:[{key:"value",label:c.flow,color:is(C.get(F.from)?.index??0,F.color),value:u(F.value)}]})}),B&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:B.label,rows:[{key:"value",label:c.throughput,color:is(C.get(B.key)?.index??0,B.color,B.tone),value:u(w.get(B.key)??0)}]})}),
|
|
927
|
+
/* @__PURE__ */re(uo,{caption:c.sankey(e.length,t.length),head:[c.tableFrom,c.tableTo,c.value],rows:t.map(e=>[e.from,e.to,u(e.value)])})]})}function Mo({labels:e,matrix:t,size:r=340,maxNodes:n=8,padAngle:a=.04,arcWidth:l=12,formatValue:i,className:s,emptyLabel:o}){const c=j().charts,d=D(),u=i??(e=>P(e,d)),h=o??c.noFlows,[m,p]=Y(null),{highlighted:g}=zs(),f=(e,r)=>{const n=t[e]?.[r];return"number"==typeof n&&Number.isFinite(n)?n:0},x=e.map((t,r)=>e.reduce((e,t,n)=>e+f(r,n)+f(n,r),0)),b=e.map((e,t)=>t).sort((e,t)=>x[t]-x[e]).slice(0,n),y=b.reduce((e,t)=>e+x[t],0);if(y<=0)/* @__PURE__ */return re("p",{className:`text-sm text-gray-500 ${s??""}`,children:h});const v=r/2,w=r/2,N=r/2-44,k=N-l,M=a*b.length,$=/* @__PURE__ */new Map;let C=-Math.PI/2;b.forEach((e,t)=>{const r=x[e]/y*(2*Math.PI-M);$.set(e,{start:C,end:C+r,slot:t}),C+=r+a});const L=/* @__PURE__ */new Map,S=[];for(const e of b)for(const t of b){const r=f(e,t);if(r<=0)continue;const n=$.get(e),a=r/Math.max(1,x[e])*(n.end-n.start),l=L.get(e)??0;L.set(e,l+a),S.push({from:e,to:t,value:r,a:n.start+l+a/2,b:$.get(t).start+($.get(t).end-$.get(t).start)/2})}const z=(e,t)=>[v+t*Math.cos(e),w+t*Math.sin(e)],A="arc"===m?.kind?m.index:void 0,F="ribbon"===m?.kind?S[m.index]:void 0;/* @__PURE__ */
|
|
928
928
|
return ne("div",{className:`relative ${s??""}`,children:[
|
|
929
929
|
/* @__PURE__ */ne("svg",{width:"100%",height:r,viewBox:`0 0 ${r} ${r}`,role:"img","aria-label":c.chord(b.length),onMouseLeave:()=>p(null),children:[S.map((t,n)=>{const[a,l]=z(t.a,k),[i,s]=z(t.b,k),o=is($.get(t.from).slot),c=((t,r)=>m?"ribbon"===m.kind?m.index===r:m.index===t.from||m.index===t.to:null!==g?e[t.from]===g||e[t.to]===g:null)(t,n);/* @__PURE__ */
|
|
930
930
|
return re("path",{d:`M${a},${l} Q${v},${w} ${i},${s}`,fill:"none",stroke:o,strokeWidth:Math.max(1,t.value/y*r*.9),strokeOpacity:null===c||c?.34:.07,strokeLinecap:"round",onMouseEnter:()=>p({kind:"ribbon",index:n})},`${e[t.from]}→${e[t.to]}`)}),b.map(t=>{const r=$.get(t),n=(r.start+r.end)/2,[a,l]=z(n,N+16),i=(t=>m?"arc"===m.kind?m.index===t:S[m.index].from===t||S[m.index].to===t:null!==g?e[t]===g:null)(t);/* @__PURE__ */
|
|
931
931
|
return ne("g",{onMouseEnter:()=>p({kind:"arc",index:t}),children:[
|
|
932
932
|
/* @__PURE__ */re("path",{d:$s(v,w,k,N,r.start,r.end),fill:is(r.slot),fillOpacity:null===i||i?1:.45}),
|
|
933
|
-
/* @__PURE__ */re("text",{x:a,y:l+4,fontSize:11,fill:as.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:e[t]})]},t)})]}),void 0!==A&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:e[A],rows:[{key:"total",label:c.totalFlow,color:is($.get(A).slot),value:u(x[A])}]})}),F&&/* @__PURE__ */re("div",{className:"absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:`${e[F.from]} → ${e[F.to]}`,rows:[{key:"value",label:c.flow,color:is($.get(F.from).slot),value:u(F.value)}]})}),
|
|
934
|
-
/* @__PURE__ */re(
|
|
933
|
+
/* @__PURE__ */re("text",{x:a,y:l+4,fontSize:11,fill:as.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:e[t]})]},t)})]}),void 0!==A&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:e[A],rows:[{key:"total",label:c.totalFlow,color:is($.get(A).slot),value:u(x[A])}]})}),F&&/* @__PURE__ */re("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */re(_s,{title:`${e[F.from]} → ${e[F.to]}`,rows:[{key:"value",label:c.flow,color:is($.get(F.from).slot),value:u(F.value)}]})}),
|
|
934
|
+
/* @__PURE__ */re(uo,{caption:c.chord(b.length),head:[c.tableFrom,c.tableTo,c.value],rows:S.map(t=>[e[t.from],e[t.to],u(t.value)])})]})}export{Hl as APP_UPDATE_POLL_MS,Wn as Accordion,ql as AppUpdateBanner,Br as AttachButton,Ar as AttachmentDropZone,Fr as AttachmentList,Wi as AuthScreen,$n as Avatar,Cn as AvatarGroup,Sn as Banner,di as BarChart,so as BoxPlotChart,at as BrandAssetEditor,ca as BudgetBar,as as CHART_INK,Pt as Calendar,oo as CandlestickChart,Or as Card,Ks as CartesianPlot,Us as ChartBrush,wa as ChartDefs,qs as ChartDot,Hs as ChartFrame,Ss as ChartHighlightProvider,Rs as ChartSkeleton,_s as ChartTooltip,Ai as ChatTemplate,Be as Checkbox_default,Li as CheckoutTemplate,Mo as ChordChart,Vn as ColoredBadge,to as ColumnChart,Tr as ComposerAttachments,yl as ContainerFillChart,bn as CountBadge,da as DAY_MS,yi as DashboardTemplate,ii as DataTable,ki as DataTablePage,Qt as DatePicker_default,Yt as DateRangePicker,nr as DateTimePicker_default,gn as DescriptionList,sn as Divider,hi as DonutChart,Zl as Drawer,Rl as DropdownMenu,Si as EmailTemplate,Kn as EmptyState,Yi as ErrorBoundary,Ri as ErrorPage,Sr as FilePicker_default,Oe as FormErrorSummary,We as FormField,$i as FormLayoutPage,bo as FunnelChart,On as GROUP_COLORS,Yn as GROUP_COLORS_SOLID,Ti as GalleryTemplate,an as Grid,co as HeatmapChart,zl as HelpCenter,io as HistogramChart,de as INPUT_BASE,ce as INPUT_SIZES,ie as IconButton_default,en as Inline,jr as InputNumber_default,me as Input_default,Gl as Kanban,_e as Label,pi as LineChart,si as ListFooter,oi as ListLoadError,hr as MAX_FRACTION_DIGITS,fe as MENU_MAX_HEIGHT,ka as MOTION,jl as Markdown,nt as MediaUploadField,ut as MediaUploadGrid,Is as Meter,la as MetricBar,dl as MilestoneTimeline,ze as NativeSelect,fr as NumericKeypad,ge as POPUP_MAX_WIDTH,ul as POST_PRODUCTION_STATUSES,Zn as PageHeader,Xl as Pagination,zr as PaperclipGlyph,Zr as Paragraph,go as PieChart,Yl as Popover,ot as PortalBrandingProvider,xl as ProductionTimeline,ho as RADAR_SERIES_CAP,po as RadarChart,xo as RadialBarChart,Re as RadioGroup,Ie as Radio_default,ao as RangeChart,Bs as RankedBars,ro as SCATTER_SERIES_CAP,ts as SERIES_SLOT_COUNT,rs as SERIES_VARS,hl as STAGES,ns as STATUS_VARS,ko as SankeyChart,no as ScatterChart,Wr as SearchableSelect,Nr as Segmented,Ae as Select_default,fn as SettingRow,Al as SidebarActionButton,Fl as SidebarGroupLabel,Bl as SidebarNavItem,dn as Skeleton,ur as Snippet,ci as Sparkline,Qr as Stack,Yr as StatCard,Es as StatTile,wn as Statistic,Un as StatusBadge,qn as StatusBadgeProvider,In as Stepper,No as SunburstChart,Cr as Switch_default,Bn as Tabs,Er as TagInput,Ur as Text,pe as Textarea_default,br as TileButton_default,Ut as TimePicker_default,eo as TimeSeriesChart,ol as TimelineTrack,Kr as Title,Rn as Tooltip,Tl as TopNav,yo as TreemapChart,lo as WaterfallChart,hs as angleScale,mr as appendKey,Xi as applyThemePrefs,$s as arcPath,ks as areaBetween,Ns as areaFrom,As as autoHighlightIndex,pr as backspace,os as bandScale,ps as binValues,sa as budgetState,vs as bumpPath,ml as calcOverall,pl as calcReportOverall,ir as copyToClipboard,ws as curvePath,ba as dashFor,xa as fillFor,ma as fillId,Mt as firstDayOfWeek,Le as firstEnabledIndex,ha as fmtSliderDate,yt as formatDate,Lt as fromKey,pa as glowId,fa as groundId,Hn as groupColors,Ps as highlightOpacity,he as inputClasses,Jn as isSeverityTone,He as labelClasses,cs as ladderScale,De as lastEnabledIndex,fs as linearPath,ss as linearScale,us as logScale,ga as maskId,Se as matchTypeahead,Ue as mediaFileName,bs as monotonePath,je as nextEnabledIndex,ds as niceMax,Ms as polygonPoints,be as popupBounds,ms as radiusScale,lt as resolvePortalBrandAsset,is as resolveSeriesColor,Zi as resolveTheme,ar as selectionAt,ls as seriesColor,Xn as severityOf,ys as splinePath,Ds as squarify,Ma as stagger,xs as stepPath,zn as tabButtonId,Pn as tabPanelId,ua as toDayMs,Tt as toISODate,Ct as toKey,_l as useAppUpdate,es as useClickOutside,Ce as useDropdownPosition,zs as useHighlight,Fs as usePlotWidth,ct as usePortalBranding,gl as useProductionTimeline,Qi as useTheme};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{client_default as a}from"./chunk-XC64WV33.js";var e=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),t="uploaded:wallpaper";function r(a,e){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===t?e||"":a}var p=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=e=>{const t=new FormData;return t.append("wallpaper",e),a.post("/auth/me/wallpaper/",t).then(a=>a.data)},l=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function s(a){const e=a?.response?.status,t=a?.response?.data,r=Array.isArray(t?.wallpaper)?t.wallpaper[0]:void 0;return r||(413===e?"That picture is too large to use as a wallpaper.":415===e?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{t as WALLPAPER_PREF_TOKEN,l as deleteWallpaper,e as getNumberingConfigs,p as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,s as wallpaperUploadError};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="4.156.1",a=r;export{a as APP_VERSION,r as VERSION};
|