efficient-shell 7.14.3 → 7.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -590,7 +590,7 @@ return He("nav",{"aria-label":i.label,className:`flex items-center gap-1 ${l}`.t
590
590
  /* @__PURE__ */qe("button",{type:"button","aria-label":i.next,disabled:e===t,onClick:()=>c(e+1),className:`${ss} text-gray-600 hover:bg-gray-100`,children:"›"}),a&&/* @__PURE__ */qe("button",{type:"button","aria-label":i.last,disabled:e===t,onClick:()=>c(t),className:`${ss} text-gray-600 hover:bg-gray-100`,children:"»"})]})}function ds(e){const t={};if(!e)return t;for(const[r,n]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n||(t[r]=n);return t}var us=e=>Array.isArray(e.columns),hs=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",ms="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",ps={sm:"px-2 py-2",md:"px-3 py-2"},gs={left:"text-left",right:"text-right",center:"text-center"};function fs({direction:e}){/* @__PURE__ */
591
591
  return He("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
592
592
  /* @__PURE__ */qe("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */qe("path",{d:"M4 0L8 5H0z"})}),
593
- /* @__PURE__ */qe("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */qe("path",{d:"M4 5L0 0h8z"})})]})}function bs({columns:e,data:t,rowKey:r,sort:n=null,onSortChange:a,pagination:l,caption:i,loading:o=!1,bordered:s=!1,size:c="md",minWidth:d,rowClassName:u,onRow:h,rowHref:m,onRowPress:p,linkAs:g,emptyText:f,selection:b,footer:x,virtualized:y,stackOnNarrow:v=!1,stackBelow:w,className:N=""}){const k=se(),$=f??k.table.empty,M=(e,t)=>"function"==typeof r?r(e,t):String(e[r]),C=v&&!y,L=C?e:e.flatMap(e=>{if(!us(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),S=e=>C?{role:e}:{},D=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[P,A]=Ae(0),j=y?.overscan??6,z=y?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/y.rowHeight)-j);A(e=>e===t?e:t)}:void 0,F=y?Math.ceil(y.height/y.rowHeight)+2*j:t.length,E=y?Math.min(P,Math.max(0,t.length-F)):0,B=Math.min(t.length,E+F),T=y?E*y.rowHeight:0,I=y?(t.length-B)*y.rowHeight:0,O=je(null),[R,W]=Ae(0);J(()=>{if(!y)return;const e=O.current?.offsetHeight??0;W(t=>t===e?t:e)});const K=e=>e.sortField??e.key,_=e=>n&&n.field===K(e)?n.direction:null,q=L.flatMap(e=>us(e)?e.columns:[e]),H=L.some(us),U=/* @__PURE__ */new Map;if(C)for(const e of L)if(us(e))for(const t of e.columns)U.set(t,D(e.title,e.label));const V=e=>{const t=D(e.title,e.label),r=U.get(e);return t&&r?`${r} · ${t}`:t},Y=new Set(b?.selected??[]),G=b?t.map((e,t)=>M(e,t)):[],X=G.length>0&&G.every(e=>Y.has(e)),Z=G.some(e=>Y.has(e)),Q=b?36:0,ee=q.length+(b?1:0),te=q.some(e=>"left"===e.fixed),re=C&&!b&&q.some(e=>e.cardCorner),ne=g??"a",ae=`${ps[c]} ${"sm"===c?"text-xs":"text-sm"}`,le=(e,t,r,n=0)=>{const l=_(e),i=gs[e.align??(e.numeric?"right":"left")],o="left"===e.fixed,s=!(!e.sortable||!a);/* @__PURE__ */
593
+ /* @__PURE__ */qe("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */qe("path",{d:"M4 5L0 0h8z"})})]})}function bs(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function xs({columns:e,data:t,rowKey:r,sort:n=null,onSortChange:a,pagination:l,caption:i,loading:o=!1,bordered:s=!1,size:c="md",minWidth:d,rowClassName:u,onRow:h,rowHref:m,onRowPress:p,linkAs:g,emptyText:f,selection:b,footer:x,virtualized:y,stackOnNarrow:v=!1,stackBelow:w,className:N=""}){const k=se(),$=f??k.table.empty,M=(e,t)=>"function"==typeof r?r(e,t):String(e[r]),C=v&&!y,L=C?e:e.flatMap(e=>{if(!us(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),S=e=>C?{role:e}:{},D=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[P,A]=Ae(0),j=y?.overscan??6,z=y?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/y.rowHeight)-j);A(e=>e===t?e:t)}:void 0,F=y?Math.ceil(y.height/y.rowHeight)+2*j:t.length,E=y?Math.min(P,Math.max(0,t.length-F)):0,B=Math.min(t.length,E+F),T=y?E*y.rowHeight:0,I=y?(t.length-B)*y.rowHeight:0,O=je(null),[R,W]=Ae(0);J(()=>{if(!y)return;const e=O.current?.offsetHeight??0;W(t=>t===e?t:e)});const K=e=>e.sortField??e.key,_=e=>n&&n.field===K(e)?n.direction:null,q=L.flatMap(e=>us(e)?e.columns:[e]),H=L.some(us),U=/* @__PURE__ */new Map;if(C)for(const e of L)if(us(e))for(const t of e.columns)U.set(t,D(e.title,e.label));const V=e=>{const t=D(e.title,e.label),r=U.get(e);return t&&r?`${r} · ${t}`:t},Y=new Set(b?.selected??[]),G=b?t.map((e,t)=>M(e,t)):[],X=G.length>0&&G.every(e=>Y.has(e)),Z=G.some(e=>Y.has(e)),Q=b?36:0,ee=q.length+(b?1:0),te=q.some(e=>"left"===e.fixed),re=C&&!b&&q.some(e=>e.cardCorner),ne=g??"a",ae=`${ps[c]} ${"sm"===c?"text-xs":"text-sm"}`,le=(e,t,r,n=0)=>{const l=_(e),i=gs[e.align??(e.numeric?"right":"left")],o="left"===e.fixed,s=!(!e.sortable||!a);/* @__PURE__ */
594
594
  return qe("th",{scope:"col",...S("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===l?"ascending":"desc"===l?"descending":s?"none":void 0,style:{width:e.width,...o?{left:(oe[t]??0)+Q}:{},...y?{top:n}:{}},className:[ae,i,"font-semibold uppercase tracking-wide text-gray-500","sm"===c?"text-2xs":"text-xs",o?y?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":y?"sticky z-10 bg-gray-50":"",C&&s?"rosh-dt-sort":"",C?hs(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:s?/* @__PURE__ */He("button",{type:"button",onClick:()=>(e=>{if(!a)return;const t=K(e),r=_(e),n=e.sortFirst??"asc";a(null===r?{field:t,direction:n}:r===n?{field:t,direction:"asc"===n?"desc":"asc"}:null)})(e),"data-group":C?U.get(e):void 0,className:`inline-flex items-center font-semibold uppercase tracking-wide hover:text-gray-700 ${i}`,children:[e.title,
595
595
  /* @__PURE__ */qe(fs,{direction:l})]}):e.title},e.key)};let ie=0;const oe=q.map(e=>{if("left"!==e.fixed)return null;const t=ie;return ie+=e.width??0,t}),ce=/* @__PURE__ */He(Ue,{children:[
596
596
  /* @__PURE__ */He("div",{onScroll:z,style:y?{maxHeight:y.height}:void 0,className:`relative overflow-x-auto ${y?"overflow-y-auto":""} ${s?"rounded-lg border border-gray-200":""}${C?" rosh-dt-scroll":""}`.trim(),children:[o&&
@@ -603,58 +603,58 @@ return qe("th",{scope:"col",...S("columnheader"),rowSpan:r>1?r:void 0,"aria-sort
603
603
  /* @__PURE__ */qe("tbody",{...S("rowgroup"),className:C?"rosh-dt-body":void 0,children:0!==t.length||o?/* @__PURE__ */He(Ue,{children:[T>0&&/* @__PURE__ */qe("tr",{"aria-hidden":"true",children:/* @__PURE__ */qe("td",{colSpan:ee,style:{height:T,padding:0,border:0}})}),t.slice(E,B).map((e,t)=>{const r=E+t,n=h?.(e,r),a=!!n?.current,l=m?.(e,r),i=void 0===l&&p?()=>p(e,r):void 0,o=void 0!==l||void 0!==i;let s=!1;const c=(e,t)=>{if(s=!0,!o)return e;const r=[ms,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),n=a?"true":void 0;return void 0!==l?/* @__PURE__ */qe(ne,{href:l,className:r,"aria-current":n,children:e}):/* @__PURE__ */qe("button",{type:"button",onClick:i,className:r,"aria-current":n,children:e})},d=q.map(t=>t.render?t.render(e,r,c):t.dataIndex?e[t.dataIndex]:null);if(o&&!s){const e=q.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=q.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(d[r]=c(d[r]))}const g=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
604
604
  return He("tr",{...ds(n),...S("row"),style:y?{height:y.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:g(n?.onFocus),onBlur:g(n?.onBlur),"aria-current":a&&!o?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[C?b?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",C&&re?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",o?"rosh-dt-linked hover:bg-gray-50":"",a?"rosh-dt-current":"",u?.(e,r)??"",n?.className??""].filter(Boolean).join(" "),children:[b&&(()=>{const t=M(e,r);/* @__PURE__ */
605
605
  return qe("td",{...S("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[ae,te?"sticky left-0 z-10 bg-white":"",C?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */qe(mt,{"aria-label":k.table.selectRow,checked:Y.has(t),onChange:()=>(e=>{b&&b.onChange(Y.has(e)?b.selected.filter(t=>t!==e):[...b.selected,e])})(t)})})})(),q.map((e,t)=>{const r="left"===e.fixed,n=d[t],a=re&&!!e.cardCorner,l=C&&!a&&"wide"!==e.only;/* @__PURE__ */
606
- return qe("td",{...S("cell"),"data-label":l?V(e):void 0,style:r?{left:(oe[t]??0)+Q}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",a?"rosh-dt-corner":"",C?hs(e):"",ae,gs[e.align??(e.numeric?"right":"left")],e.numeric&&!C?"font-mono":"","text-gray-900",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:C?
607
- /* @__PURE__ */qe("span",{className:e.numeric?"rosh-dt-value font-mono":"rosh-dt-value",children:n}):n},e.key)})]},M(e,r))}),I>0&&/* @__PURE__ */qe("tr",{"aria-hidden":"true",children:/* @__PURE__ */qe("td",{colSpan:ee,style:{height:I,padding:0,border:0}})})]}):/* @__PURE__ */qe("tr",{...S("row"),className:C?"rosh-dt-empty":void 0,children:/* @__PURE__ */qe("td",{...S("cell"),colSpan:ee,className:`${ae} py-10 text-center text-gray-500`,children:$})})})]}),x]}),l&&l.pageCount>1&&/* @__PURE__ */qe("div",{className:C?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */qe(cs,{page:l.page,pageCount:l.pageCount,onPageChange:l.onPageChange})})]});/* @__PURE__ */
608
- return qe("div",C?void 0!==w&&w>0&&40!==w?{className:`rosh-dt-at ${N}`.trim(),children:/* @__PURE__ */qe("div",{className:"rosh-dt-stack",style:{width:40/w*100+"%"},children:/* @__PURE__ */qe("div",{className:"rosh-dt-fit",style:{width:w/40*100+"%"},children:ce})})}:{className:`rosh-dt-stack ${N}`.trim(),children:ce}:{className:N,children:ce})}function xs({selectedCount:e,hiddenSelectedCount:t=0,loadedCount:r,totalCount:n,label:a,isFetchingMore:l,extra:i}){const o=se().list,s=n??r,c=r>=s,d=t>0?o.selectedNotShown(e,t):e>0?o.selected(e):"";/* @__PURE__ */
609
- return He(Ue,{children:[i,d?`${d} — `:"",c?null!=n?o.allLoaded(s,a):o.count(s,a):o.loadedOf(r,s,a),l?` · ${o.loadingMore}`:""]})}function ys({title:e,message:t,onRetry:r,variant:n="dashed"}){const a=se().list;/* @__PURE__ */
606
+ return qe("td",{...S("cell"),"data-label":l?V(e):void 0,style:r?{left:(oe[t]??0)+Q}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",a?"rosh-dt-corner":"",C?hs(e):"",ae,gs[e.align??(e.numeric?"right":"left")],C?"":bs(e),"text-gray-900",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:C?
607
+ /* @__PURE__ */qe("span",{className:["rosh-dt-value",bs(e,!0)].filter(Boolean).join(" "),children:n}):n},e.key)})]},M(e,r))}),I>0&&/* @__PURE__ */qe("tr",{"aria-hidden":"true",children:/* @__PURE__ */qe("td",{colSpan:ee,style:{height:I,padding:0,border:0}})})]}):/* @__PURE__ */qe("tr",{...S("row"),className:C?"rosh-dt-empty":void 0,children:/* @__PURE__ */qe("td",{...S("cell"),colSpan:ee,className:`${ae} py-10 text-center text-gray-500`,children:$})})})]}),x]}),l&&l.pageCount>1&&/* @__PURE__ */qe("div",{className:C?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */qe(cs,{page:l.page,pageCount:l.pageCount,onPageChange:l.onPageChange})})]});/* @__PURE__ */
608
+ return qe("div",C?void 0!==w&&w>0&&40!==w?{className:`rosh-dt-at ${N}`.trim(),children:/* @__PURE__ */qe("div",{className:"rosh-dt-stack",style:{width:40/w*100+"%"},children:/* @__PURE__ */qe("div",{className:"rosh-dt-fit",style:{width:w/40*100+"%"},children:ce})})}:{className:`rosh-dt-stack ${N}`.trim(),children:ce}:{className:N,children:ce})}function ys({selectedCount:e,hiddenSelectedCount:t=0,loadedCount:r,totalCount:n,label:a,isFetchingMore:l,extra:i}){const o=se().list,s=n??r,c=r>=s,d=t>0?o.selectedNotShown(e,t):e>0?o.selected(e):"";/* @__PURE__ */
609
+ return He(Ue,{children:[i,d?`${d} — `:"",c?null!=n?o.allLoaded(s,a):o.count(s,a):o.loadedOf(r,s,a),l?` · ${o.loadingMore}`:""]})}function vs({title:e,message:t,onRetry:r,variant:n="dashed"}){const a=se().list;/* @__PURE__ */
610
610
  return He("div",{className:`flex flex-col items-center justify-center text-center ${"card"===n?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===n?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
611
611
  /* @__PURE__ */qe(Ce,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
612
612
  /* @__PURE__ */qe("h3",{className:"text-sm font-medium text-gray-900",children:e??a.loadError}),
613
- /* @__PURE__ */qe("p",{className:"text-sm text-gray-500 mt-2",children:t??a.loadErrorMessage}),r&&/* @__PURE__ */qe("div",{className:"mt-4",children:/* @__PURE__ */qe(k,{variant:"secondary",size:"sm",onClick:r,children:a.retry})})]})}function vs({data:e,width:t=120,height:r=32,stroke:n="currentColor",fill:a,strokeWidth:l=1.5,showDots:i=!1,className:o,style:s}){if(0===e.length)return null;const c=Math.max(...e),d=Math.min(...e),u=c-d||1,h=l+(i?2:0),m=e=>r-h-(e-d)/u*(r-2*h),p=1===e.length?[[0,r/2],[t,r/2]]:e.map((r,n)=>[n*t/(e.length-1),m(r)]),g=p.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" "),f=`${g} L${t.toFixed(2)},${r} L0,${r} Z`;/* @__PURE__ */
613
+ /* @__PURE__ */qe("p",{className:"text-sm text-gray-500 mt-2",children:t??a.loadErrorMessage}),r&&/* @__PURE__ */qe("div",{className:"mt-4",children:/* @__PURE__ */qe(k,{variant:"secondary",size:"sm",onClick:r,children:a.retry})})]})}function ws({data:e,width:t=120,height:r=32,stroke:n="currentColor",fill:a,strokeWidth:l=1.5,showDots:i=!1,className:o,style:s}){if(0===e.length)return null;const c=Math.max(...e),d=Math.min(...e),u=c-d||1,h=l+(i?2:0),m=e=>r-h-(e-d)/u*(r-2*h),p=1===e.length?[[0,r/2],[t,r/2]]:e.map((r,n)=>[n*t/(e.length-1),m(r)]),g=p.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" "),f=`${g} L${t.toFixed(2)},${r} L0,${r} Z`;/* @__PURE__ */
614
614
  return He("svg",{className:o,style:s,width:t,height:r,viewBox:`0 0 ${t} ${r}`,preserveAspectRatio:"none",role:"img","aria-hidden":"true",children:[a&&/* @__PURE__ */qe("path",{d:f,fill:a,stroke:"none"}),
615
- /* @__PURE__ */qe("path",{d:g,fill:"none",stroke:n,strokeWidth:l,strokeLinejoin:"round",strokeLinecap:"round"}),i&&p.map(([e,t],r)=>/* @__PURE__ */qe("circle",{cx:e,cy:t,r:l+.5,fill:n},r))]})}var ws=8,Ns=["var(--viz-series-1)","var(--viz-series-2)","var(--viz-series-3)","var(--viz-series-4)","var(--viz-series-5)","var(--viz-series-6)","var(--viz-series-7)","var(--viz-series-8)"],ks={good:"var(--viz-good)",neutral:"var(--viz-neutral)",warning:"var(--viz-warning)",serious:"var(--viz-serious)",critical:"var(--viz-critical)"},$s={grid:"var(--viz-grid)",axis:"var(--viz-axis)",label:"var(--viz-label)",muted:"var(--viz-muted)",surface:"var(--viz-surface)"};function Ms(e){return Ns[e]??$s.muted}function Cs(e,t,r){return t||(r?ks[r]:Ms(e))}function Ls(e,t={},r=8){const n={},a=/* @__PURE__ */new Set,l=/* @__PURE__ */new Set;for(const r of e){const e=t[r];void 0===e||a.has(e)||(n[r]=e,a.add(e)),l.add(r)}const i=0===Object.keys(t).length;for(const l of e){if(void 0!==n[l])continue;if(!i&&l in t)continue;const e=Array.from({length:r},(e,t)=>t).find(e=>!a.has(e));if(void 0===e)break;n[l]=e,a.add(e)}return n}function Ss(e,t,r=8){if(void 0!==e[t]){const{[t]:r,...n}=e;return n}const n=new Set(Object.values(e)),a=Array.from({length:r},(e,t)=>t).find(e=>!n.has(e));return void 0===a?e:{...e,[t]:a}}function Ds(e,t,r,n){return r||n?Cs(e,r,n):e<t?Ms(e):$s.muted}function Ps(e,t){const[r,n]=e,a=n-r,l=e=>0===a?t.from:t.from+(e-r)/a*(t.to-t.from);return l.domain=e,l.range=t,l.ticks=e=>e<2?[r]:Array.from({length:e},(t,n)=>r+a*n/(e-1)),l}function As(e,t,r=0){const n=e>0?(t.to-t.from)/e:0,a=n*r,l=e=>t.from+e*n+a/2;return l.bandwidth=Math.max(0,n-a),l.center=e=>t.from+e*n+n/2,l.end=e=>t.from+(e+1)*n-a/2,l.count=e,l}function js(e,t){const r=[...e].sort((e,t)=>e-t),n=Math.max(0,r.length-1),a=e=>0===n?t.from:t.from+e/n*(t.to-t.from),l=e=>{const t=r.indexOf(e);if(t>=0)return a(t);const l=r.findIndex(t=>t>=e);return a(-1===l?n:l)};return l.levels=r,l.indexOf=e=>r.indexOf(e),l.range=t,l}function zs(e){if(!Number.isFinite(e)||e<=0)return 1;const t=10**Math.floor(Math.log10(e)),r=e/t;return(r<=1?1:r<=2?2:r<=2.5?2.5:r<=5?5:10)*t}function Fs(e,t,{intervals:r=5,integer:n=!1,zero:a=!0}={}){const l=a?Math.min(0,e):e,i=a?Math.max(0,t):Math.max(e,t);if(!Number.isFinite(l)||!Number.isFinite(i)||i-l<=0){const e=Number.isFinite(l)&&!a?l:0;return{lo:e,hi:e+1,ticks:[e,e+1]}}const o=Math.max(1,Math.floor(r));let s=10**Math.floor(Math.log10((i-l)/o));for(;;){for(const e of[1,2,2.5,5]){const t=e*s;if(n&&!Number.isInteger(t))continue;const r=Math.floor(l/t)*t,a=Math.ceil(i/t)*t,c=Math.round((a-r)/t);if(c<=o){const e=Array.from({length:c+1},(e,n)=>Number((r+n*t).toPrecision(12)));return{lo:e[0],hi:e[c],ticks:e}}}s*=10}}function Es(e,t,{intervals:r=5,integerLeft:n=!1,integerRight:a=!1}={}){const l=e=>Math.min(0,e),i=e=>Math.max(0,e),o=([e,t],r,n,a)=>{if(l(e)<0&&0===r)return null;if(i(t)>0&&0===n)return null;const o=function(e,t){if(!(e>0))return 1;let r=10**Math.floor(Math.log10(e));for(;;){for(const n of[1,2,2.5,5]){const a=n*r;if((!t||Number.isInteger(a))&&a>=e*(1-1e-9))return a}r*=10}}(Math.max(r?-l(e)/r:0,n?i(t)/n:0),a),s=o*(r+n),c=i(t)-l(e);return{step:o,waste:c>0?(s-c)/s:1}};let s=null;const c=Math.max(2,Math.floor(r));for(let r=2;r<=c;r++)for(let l=0;l<=r;l++){const i=o(e,l,r-l,n),d=o(t,l,r-l,a);if(!i||!d)continue;const u=i.waste+d.waste+.02*(c-r);(!s||u<s.score-1e-9)&&(s={n:r,k:l,l:i.step,r:d.step,score:u})}const{n:d,k:u,l:h,r:m}=s??{n:1,k:0,l:1,r:1},p=e=>{const t=Array.from({length:d+1},(t,r)=>Number(((r-u)*e).toPrecision(12)));return{lo:t[0],hi:t[d],ticks:t}};return{left:p(h),right:p(m)}}function Bs(e,t){const r=Math.max(e[0],e[1]),n=Math.min(e[0],e[1]),a=r>0?r:0,l=n>0?n:a>0?10**(Math.ceil(Math.log10(a))-3):0,i=Math.log10(l),o=a>0&&l>0?Math.log10(a)-i:0,s=e=>{if(o<=0)return t.from;const r=Math.max(l,e);return t.from+(Math.log10(r)-i)/o*(t.to-t.from)};return s.domain=[l,a],s.range=t,s.ticks=e=>{if(e<2||o<=0)return[l];const t=Math.ceil(i),r=Math.floor(Math.log10(a)),n=[];for(let e=t;e<=r;e+=1)n.push(10**e);return 0===n.length?[l,a]:(Math.log10(n[0])-i>.15&&n.unshift(l),Math.log10(a)-Math.log10(n[n.length-1])>.15&&n.push(a),n)},s}function Ts(e,t=0){const r=e>0?2*Math.PI/e:0,n=e=>-Math.PI/2+e*r+t/2;return n.step=Math.max(0,r-t),n.center=e=>-Math.PI/2+e*r+r/2,n.count=e,n}function Is(e,t){const[r,n]=e,a=Math.sqrt(Math.max(0,n))-Math.sqrt(Math.max(0,r));return e=>{if(0===a)return t.to;const n=(Math.sqrt(Math.max(0,e))-Math.sqrt(Math.max(0,r)))/a;return t.from+Math.min(1,Math.max(0,n))*(t.to-t.from)}}function Os(e,t=10){const r=e.filter(Number.isFinite);if(Array.isArray(t)){const e=[...t].filter(Number.isFinite).sort((e,t)=>e-t);if(e.length<2)return[];const n=Array.from({length:e.length-1},(t,r)=>({from:e[r],to:e[r+1],count:0})),a=e[e.length-1];for(const t of r){if(t<e[0]||t>a)continue;const r=t===a?n.length-1:n.findIndex(e=>t>=e.from&&t<e.to);r>=0&&(n[r].count+=1)}return n}const n=t;if(0===r.length||n<1)return[];const a=Math.min(...r),l=(Math.max(...r)-a)/n||1,i=Array.from({length:n},(e,t)=>({from:a+t*l,to:a+(t+1)*l,count:0}));for(const e of r){i[Math.min(n-1,Math.floor((e-a)/l))].count+=1}return i}function Rs(e,t,{fontSize:r=11,gap:n=8}={}){const a=e.reduce((e,t)=>Math.max(e,t.length),0);return Math.max(t,Math.ceil(.62*a*r+n+2))}function Ws(e,t=720){const[r,n]=Ae(t);return Fe(()=>{const t=e.current;if(!t||"undefined"==typeof ResizeObserver)return;const r=new ResizeObserver(e=>{const t=e[0]?.contentRect.width??0;t>0&&n(t)});return r.observe(t),()=>r.disconnect()},[e]),r}function Ks(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 _s({labels:e,values:t,height:r=220,width:n,bandPadding:a=.24,min:l,max:i,yTickCount:o=4,formatValue:s,yAxisLabel:c,xTickAnchor:d="center",children:u,overlay:h,tooltip:m,onSelect:p,ariaLabel:g,className:f,emptyLabel:b}){const x=se().charts,y=oe(),v=s??(e=>he(e,y)),w=b??x.noData,N=je(null),k=Ws(N),$=n??k,[M,C]=Ae(null),L=De();if(Fe(()=>{if(null!==M)return G(e=>"Escape"===e.key&&(C(null),!0))},[M]),0===e.length||!t.some(Number.isFinite))/* @__PURE__ */
616
- return qe("div",{className:f,ref:N,children:/* @__PURE__ */qe("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:r},children:w})});const S=t.filter(Number.isFinite),D=S.every(Number.isInteger),P=void 0===l&&void 0===i?Fs(Math.min(0,...S),Math.max(0,...S),{intervals:o+1,integer:D}):null,A=void 0!==l&&void 0===i?Fs(l,Math.max(l,...S),{intervals:o+1,integer:D,zero:!1}):null,j=P?P.lo:l??Math.min(0,...S),z=P?P.hi:A?A.hi:i??zs(Math.max(...S,0)),F=P?P.ticks:A?[j,...A.ticks.filter(e=>e>j)]:Ps([j,z],{from:0,to:1}).ticks(o+1),E={top:12,right:16,bottom:26,left:Rs(F.map(v),48)+(c?10:0)},B=E.left,T=Math.max(B+1,$-E.right),I=E.top,O=r-E.bottom,R=Ps([j,z],{from:O,to:I}),W=As(e.length,{from:B,to:T},a),K=(T-B)/Math.max(1,e.length),_=K>=48,q=_?1:Math.max(1,Math.ceil(e.length/Math.max(1,Math.floor($/84)))),H=Math.max(2,Math.floor((K-6)/6.6)),U=e=>_&&e.length>H?`${e.slice(0,H-1).trimEnd()}…`:e;/* @__PURE__ */
615
+ /* @__PURE__ */qe("path",{d:g,fill:"none",stroke:n,strokeWidth:l,strokeLinejoin:"round",strokeLinecap:"round"}),i&&p.map(([e,t],r)=>/* @__PURE__ */qe("circle",{cx:e,cy:t,r:l+.5,fill:n},r))]})}var Ns=8,ks=["var(--viz-series-1)","var(--viz-series-2)","var(--viz-series-3)","var(--viz-series-4)","var(--viz-series-5)","var(--viz-series-6)","var(--viz-series-7)","var(--viz-series-8)"],$s={good:"var(--viz-good)",neutral:"var(--viz-neutral)",warning:"var(--viz-warning)",serious:"var(--viz-serious)",critical:"var(--viz-critical)"},Ms={grid:"var(--viz-grid)",axis:"var(--viz-axis)",label:"var(--viz-label)",muted:"var(--viz-muted)",surface:"var(--viz-surface)"};function Cs(e){return ks[e]??Ms.muted}function Ls(e,t,r){return t||(r?$s[r]:Cs(e))}function Ss(e,t={},r=8){const n={},a=/* @__PURE__ */new Set,l=/* @__PURE__ */new Set;for(const r of e){const e=t[r];void 0===e||a.has(e)||(n[r]=e,a.add(e)),l.add(r)}const i=0===Object.keys(t).length;for(const l of e){if(void 0!==n[l])continue;if(!i&&l in t)continue;const e=Array.from({length:r},(e,t)=>t).find(e=>!a.has(e));if(void 0===e)break;n[l]=e,a.add(e)}return n}function Ds(e,t,r=8){if(void 0!==e[t]){const{[t]:r,...n}=e;return n}const n=new Set(Object.values(e)),a=Array.from({length:r},(e,t)=>t).find(e=>!n.has(e));return void 0===a?e:{...e,[t]:a}}function Ps(e,t,r,n){return r||n?Ls(e,r,n):e<t?Cs(e):Ms.muted}function As(e,t){const[r,n]=e,a=n-r,l=e=>0===a?t.from:t.from+(e-r)/a*(t.to-t.from);return l.domain=e,l.range=t,l.ticks=e=>e<2?[r]:Array.from({length:e},(t,n)=>r+a*n/(e-1)),l}function js(e,t,r=0){const n=e>0?(t.to-t.from)/e:0,a=n*r,l=e=>t.from+e*n+a/2;return l.bandwidth=Math.max(0,n-a),l.center=e=>t.from+e*n+n/2,l.end=e=>t.from+(e+1)*n-a/2,l.count=e,l}function zs(e,t){const r=[...e].sort((e,t)=>e-t),n=Math.max(0,r.length-1),a=e=>0===n?t.from:t.from+e/n*(t.to-t.from),l=e=>{const t=r.indexOf(e);if(t>=0)return a(t);const l=r.findIndex(t=>t>=e);return a(-1===l?n:l)};return l.levels=r,l.indexOf=e=>r.indexOf(e),l.range=t,l}function Fs(e){if(!Number.isFinite(e)||e<=0)return 1;const t=10**Math.floor(Math.log10(e)),r=e/t;return(r<=1?1:r<=2?2:r<=2.5?2.5:r<=5?5:10)*t}function Es(e,t,{intervals:r=5,integer:n=!1,zero:a=!0}={}){const l=a?Math.min(0,e):e,i=a?Math.max(0,t):Math.max(e,t);if(!Number.isFinite(l)||!Number.isFinite(i)||i-l<=0){const e=Number.isFinite(l)&&!a?l:0;return{lo:e,hi:e+1,ticks:[e,e+1]}}const o=Math.max(1,Math.floor(r));let s=10**Math.floor(Math.log10((i-l)/o));for(;;){for(const e of[1,2,2.5,5]){const t=e*s;if(n&&!Number.isInteger(t))continue;const r=Math.floor(l/t)*t,a=Math.ceil(i/t)*t,c=Math.round((a-r)/t);if(c<=o){const e=Array.from({length:c+1},(e,n)=>Number((r+n*t).toPrecision(12)));return{lo:e[0],hi:e[c],ticks:e}}}s*=10}}function Bs(e,t,{intervals:r=5,integerLeft:n=!1,integerRight:a=!1}={}){const l=e=>Math.min(0,e),i=e=>Math.max(0,e),o=([e,t],r,n,a)=>{if(l(e)<0&&0===r)return null;if(i(t)>0&&0===n)return null;const o=function(e,t){if(!(e>0))return 1;let r=10**Math.floor(Math.log10(e));for(;;){for(const n of[1,2,2.5,5]){const a=n*r;if((!t||Number.isInteger(a))&&a>=e*(1-1e-9))return a}r*=10}}(Math.max(r?-l(e)/r:0,n?i(t)/n:0),a),s=o*(r+n),c=i(t)-l(e);return{step:o,waste:c>0?(s-c)/s:1}};let s=null;const c=Math.max(2,Math.floor(r));for(let r=2;r<=c;r++)for(let l=0;l<=r;l++){const i=o(e,l,r-l,n),d=o(t,l,r-l,a);if(!i||!d)continue;const u=i.waste+d.waste+.02*(c-r);(!s||u<s.score-1e-9)&&(s={n:r,k:l,l:i.step,r:d.step,score:u})}const{n:d,k:u,l:h,r:m}=s??{n:1,k:0,l:1,r:1},p=e=>{const t=Array.from({length:d+1},(t,r)=>Number(((r-u)*e).toPrecision(12)));return{lo:t[0],hi:t[d],ticks:t}};return{left:p(h),right:p(m)}}function Ts(e,t){const r=Math.max(e[0],e[1]),n=Math.min(e[0],e[1]),a=r>0?r:0,l=n>0?n:a>0?10**(Math.ceil(Math.log10(a))-3):0,i=Math.log10(l),o=a>0&&l>0?Math.log10(a)-i:0,s=e=>{if(o<=0)return t.from;const r=Math.max(l,e);return t.from+(Math.log10(r)-i)/o*(t.to-t.from)};return s.domain=[l,a],s.range=t,s.ticks=e=>{if(e<2||o<=0)return[l];const t=Math.ceil(i),r=Math.floor(Math.log10(a)),n=[];for(let e=t;e<=r;e+=1)n.push(10**e);return 0===n.length?[l,a]:(Math.log10(n[0])-i>.15&&n.unshift(l),Math.log10(a)-Math.log10(n[n.length-1])>.15&&n.push(a),n)},s}function Is(e,t=0){const r=e>0?2*Math.PI/e:0,n=e=>-Math.PI/2+e*r+t/2;return n.step=Math.max(0,r-t),n.center=e=>-Math.PI/2+e*r+r/2,n.count=e,n}function Os(e,t){const[r,n]=e,a=Math.sqrt(Math.max(0,n))-Math.sqrt(Math.max(0,r));return e=>{if(0===a)return t.to;const n=(Math.sqrt(Math.max(0,e))-Math.sqrt(Math.max(0,r)))/a;return t.from+Math.min(1,Math.max(0,n))*(t.to-t.from)}}function Rs(e,t=10){const r=e.filter(Number.isFinite);if(Array.isArray(t)){const e=[...t].filter(Number.isFinite).sort((e,t)=>e-t);if(e.length<2)return[];const n=Array.from({length:e.length-1},(t,r)=>({from:e[r],to:e[r+1],count:0})),a=e[e.length-1];for(const t of r){if(t<e[0]||t>a)continue;const r=t===a?n.length-1:n.findIndex(e=>t>=e.from&&t<e.to);r>=0&&(n[r].count+=1)}return n}const n=t;if(0===r.length||n<1)return[];const a=Math.min(...r),l=(Math.max(...r)-a)/n||1,i=Array.from({length:n},(e,t)=>({from:a+t*l,to:a+(t+1)*l,count:0}));for(const e of r){i[Math.min(n-1,Math.floor((e-a)/l))].count+=1}return i}function Ws(e,t,{fontSize:r=11,gap:n=8}={}){const a=e.reduce((e,t)=>Math.max(e,t.length),0);return Math.max(t,Math.ceil(.62*a*r+n+2))}function Ks(e,t=720){const[r,n]=Ae(t);return Fe(()=>{const t=e.current;if(!t||"undefined"==typeof ResizeObserver)return;const r=new ResizeObserver(e=>{const t=e[0]?.contentRect.width??0;t>0&&n(t)});return r.observe(t),()=>r.disconnect()},[e]),r}function _s(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 qs({labels:e,values:t,height:r=220,width:n,bandPadding:a=.24,min:l,max:i,yTickCount:o=4,formatValue:s,yAxisLabel:c,xTickAnchor:d="center",children:u,overlay:h,tooltip:m,onSelect:p,ariaLabel:g,className:f,emptyLabel:b}){const x=se().charts,y=oe(),v=s??(e=>he(e,y)),w=b??x.noData,N=je(null),k=Ks(N),$=n??k,[M,C]=Ae(null),L=De();if(Fe(()=>{if(null!==M)return G(e=>"Escape"===e.key&&(C(null),!0))},[M]),0===e.length||!t.some(Number.isFinite))/* @__PURE__ */
616
+ return qe("div",{className:f,ref:N,children:/* @__PURE__ */qe("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:r},children:w})});const S=t.filter(Number.isFinite),D=S.every(Number.isInteger),P=void 0===l&&void 0===i?Es(Math.min(0,...S),Math.max(0,...S),{intervals:o+1,integer:D}):null,A=void 0!==l&&void 0===i?Es(l,Math.max(l,...S),{intervals:o+1,integer:D,zero:!1}):null,j=P?P.lo:l??Math.min(0,...S),z=P?P.hi:A?A.hi:i??Fs(Math.max(...S,0)),F=P?P.ticks:A?[j,...A.ticks.filter(e=>e>j)]:As([j,z],{from:0,to:1}).ticks(o+1),E={top:12,right:16,bottom:26,left:Ws(F.map(v),48)+(c?10:0)},B=E.left,T=Math.max(B+1,$-E.right),I=E.top,O=r-E.bottom,R=As([j,z],{from:O,to:I}),W=js(e.length,{from:B,to:T},a),K=(T-B)/Math.max(1,e.length),_=K>=48,q=_?1:Math.max(1,Math.ceil(e.length/Math.max(1,Math.floor($/84)))),H=Math.max(2,Math.floor((K-6)/6.6)),U=e=>_&&e.length>H?`${e.slice(0,H-1).trimEnd()}…`:e;/* @__PURE__ */
617
617
  return He("div",{className:`relative ${f??""}`,ref:N,children:[
618
618
  /* @__PURE__ */He("svg",{width:"100%",height:r,viewBox:`0 0 ${$} ${r}`,role:"img","aria-label":g,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>C(null),onBlur:()=>C(null),onKeyDown:t=>{if(p&&null!==M&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void p(M);if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const r="ArrowRight"===t.key?1:-1;C(t=>Math.min(e.length-1,Math.max(0,(t??0)+r)))},children:[
619
- /* @__PURE__ */qe("defs",{children:/* @__PURE__ */qe("clipPath",{id:L,children:/* @__PURE__ */qe("rect",{x:B,y:I,width:T-B,height:O-I})})}),F.map(e=>/* @__PURE__ */qe("line",{x1:B,y1:R(e),x2:T,y2:R(e),stroke:$s.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
620
- /* @__PURE__ */qe("line",{x1:B,y1:R(Math.max(j,0)),x2:T,y2:R(Math.max(j,0)),stroke:$s.axis,strokeWidth:1,shapeRendering:"crispEdges"}),F.map(e=>/* @__PURE__ */qe("text",{x:B-8,y:R(e)+4,textAnchor:"end",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:v(e)},`t${e}`)),c&&/* @__PURE__ */qe("text",{x:14,y:(I+O)/2,transform:`rotate(-90 14 ${(I+O)/2})`,textAnchor:"middle",fontSize:11,fill:$s.label,children:c}),
621
- /* @__PURE__ */qe("g",{clipPath:`url(#${L})`,children:u({x:W,y:R,left:B,right:T,top:I,bottom:O,width:$,height:r,clipId:L,active:M})}),h?.({x:W,y:R,left:B,right:T,top:I,bottom:O,width:$,height:r,clipId:L,active:M}),e.map((e,t)=>t%q===0?/* @__PURE__ */qe("text",{x:"start"===d?W(t):W.center(t),y:r-8,textAnchor:"middle",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:U(e)},`x${t}`):null),e.map((t,r)=>/* @__PURE__ */qe("rect",{x:W.center(r)-(T-B)/e.length/2,y:I,width:(T-B)/e.length,height:O-I,fill:"transparent",onMouseEnter:()=>C(r),onClick:p?()=>p(r):void 0,style:p?{cursor:"pointer"}:void 0},`h${r}`))]}),m&&null!==M&&
622
- /* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 z-10",style:Ks(W.center(M),W.bandwidth,$),children:m(M)})]})}function qs({height:e=220,width:t=720,variant:r="area",bars:n=9,label:a,className:l}){const i=se().charts,o=a??i.loading,s=`${De()}-shimmer`,c=48,d=t-16,u=12,h=e-26;/* @__PURE__ */
619
+ /* @__PURE__ */qe("defs",{children:/* @__PURE__ */qe("clipPath",{id:L,children:/* @__PURE__ */qe("rect",{x:B,y:I,width:T-B,height:O-I})})}),F.map(e=>/* @__PURE__ */qe("line",{x1:B,y1:R(e),x2:T,y2:R(e),stroke:Ms.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
620
+ /* @__PURE__ */qe("line",{x1:B,y1:R(Math.max(j,0)),x2:T,y2:R(Math.max(j,0)),stroke:Ms.axis,strokeWidth:1,shapeRendering:"crispEdges"}),F.map(e=>/* @__PURE__ */qe("text",{x:B-8,y:R(e)+4,textAnchor:"end",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:v(e)},`t${e}`)),c&&/* @__PURE__ */qe("text",{x:14,y:(I+O)/2,transform:`rotate(-90 14 ${(I+O)/2})`,textAnchor:"middle",fontSize:11,fill:Ms.label,children:c}),
621
+ /* @__PURE__ */qe("g",{clipPath:`url(#${L})`,children:u({x:W,y:R,left:B,right:T,top:I,bottom:O,width:$,height:r,clipId:L,active:M})}),h?.({x:W,y:R,left:B,right:T,top:I,bottom:O,width:$,height:r,clipId:L,active:M}),e.map((e,t)=>t%q===0?/* @__PURE__ */qe("text",{x:"start"===d?W(t):W.center(t),y:r-8,textAnchor:"middle",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:U(e)},`x${t}`):null),e.map((t,r)=>/* @__PURE__ */qe("rect",{x:W.center(r)-(T-B)/e.length/2,y:I,width:(T-B)/e.length,height:O-I,fill:"transparent",onMouseEnter:()=>C(r),onClick:p?()=>p(r):void 0,style:p?{cursor:"pointer"}:void 0},`h${r}`))]}),m&&null!==M&&
622
+ /* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 z-10",style:_s(W.center(M),W.bandwidth,$),children:m(M)})]})}function Hs({height:e=220,width:t=720,variant:r="area",bars:n=9,label:a,className:l}){const i=se().charts,o=a??i.loading,s=`${De()}-shimmer`,c=48,d=t-16,u=12,h=e-26;/* @__PURE__ */
623
623
  return qe("div",{className:l,children:/* @__PURE__ */He("svg",{width:"100%",height:e,viewBox:`0 0 ${t} ${e}`,role:"img","aria-label":o,"aria-busy":"true",children:[
624
624
  /* @__PURE__ */qe("defs",{children:/* @__PURE__ */He("linearGradient",{id:s,x1:"0",y1:"0",x2:"1",y2:"0",children:[
625
- /* @__PURE__ */qe("stop",{offset:"0%",stopColor:$s.surface,stopOpacity:"0"}),
626
- /* @__PURE__ */qe("stop",{offset:"45%",stopColor:$s.surface,stopOpacity:"0.55"}),
627
- /* @__PURE__ */qe("stop",{offset:"55%",stopColor:$s.surface,stopOpacity:"0.55"}),
628
- /* @__PURE__ */qe("stop",{offset:"100%",stopColor:$s.surface,stopOpacity:"0"})]})}),Array.from({length:5},(e,t)=>{const r=u+(h-u)*t/4;/* @__PURE__ */
629
- return qe("line",{x1:c,y1:r,x2:d,y2:r,stroke:$s.grid,strokeWidth:1,shapeRendering:"crispEdges"},t)}),Array.from({length:5},(e,t)=>/* @__PURE__ */qe("rect",{x:18,y:u+(h-u)*t/4-4,width:22,height:8,rx:4,fill:$s.grid},`t${t}`)),"bars"===r?Array.from({length:n},(e,t)=>{const r=(d-c)/n,a=.35+.4*Math.abs(Math.sin(1.1*(t+1))),l=(h-u)*a;/* @__PURE__ */
630
- return qe("rect",{x:c+t*r+.18*r,y:h-l,width:.64*r,height:l,rx:3,fill:$s.grid},t)}):/* @__PURE__ */qe("path",{d:`M48,${h} C${c+.25*(d-c)},${u+.35*(h-u)} ${c+.55*(d-c)},${u+.15*(h-u)} ${d},${u+.55*(h-u)} L${d},${h} Z`,fill:$s.grid}),
631
- /* @__PURE__ */qe("rect",{className:"rosh-viz-shimmer",x:-t,y:0,width:t,height:e,fill:`url(#${s})`})]})})}var Hs=Ee({highlighted:null,setHighlighted:()=>{}});function Us({children:e}){const[t,r]=Ae(null),n=ze(()=>({highlighted:t,setHighlighted:r}),[t]);/* @__PURE__ */
632
- return qe(Hs.Provider,{value:n,children:e})}function Vs(){return Oe(Hs)}function Ys(e,t,r=.22){return null===t?null:t===e?1:r}function Gs(e,t="none"){if("none"===t||0===e.length)return null;if("last"===t){for(let t=e.length-1;t>=0;t-=1)if("number"==typeof e[t]&&Number.isFinite(e[t]))return t;return null}let r=null;return e.forEach((n,a)=>{if("number"!=typeof n||!Number.isFinite(n))return;if(null===r)return void(r=a);const l=e[r];("max"===t?n>l:n<l)&&(r=a)}),r}function Xs({variant:e="solid",title:t,rows:r,footnote:n,emphasisKey:a,className:l}){const i="glass"===e;/* @__PURE__ */
625
+ /* @__PURE__ */qe("stop",{offset:"0%",stopColor:Ms.surface,stopOpacity:"0"}),
626
+ /* @__PURE__ */qe("stop",{offset:"45%",stopColor:Ms.surface,stopOpacity:"0.55"}),
627
+ /* @__PURE__ */qe("stop",{offset:"55%",stopColor:Ms.surface,stopOpacity:"0.55"}),
628
+ /* @__PURE__ */qe("stop",{offset:"100%",stopColor:Ms.surface,stopOpacity:"0"})]})}),Array.from({length:5},(e,t)=>{const r=u+(h-u)*t/4;/* @__PURE__ */
629
+ return qe("line",{x1:c,y1:r,x2:d,y2:r,stroke:Ms.grid,strokeWidth:1,shapeRendering:"crispEdges"},t)}),Array.from({length:5},(e,t)=>/* @__PURE__ */qe("rect",{x:18,y:u+(h-u)*t/4-4,width:22,height:8,rx:4,fill:Ms.grid},`t${t}`)),"bars"===r?Array.from({length:n},(e,t)=>{const r=(d-c)/n,a=.35+.4*Math.abs(Math.sin(1.1*(t+1))),l=(h-u)*a;/* @__PURE__ */
630
+ return qe("rect",{x:c+t*r+.18*r,y:h-l,width:.64*r,height:l,rx:3,fill:Ms.grid},t)}):/* @__PURE__ */qe("path",{d:`M48,${h} C${c+.25*(d-c)},${u+.35*(h-u)} ${c+.55*(d-c)},${u+.15*(h-u)} ${d},${u+.55*(h-u)} L${d},${h} Z`,fill:Ms.grid}),
631
+ /* @__PURE__ */qe("rect",{className:"rosh-viz-shimmer",x:-t,y:0,width:t,height:e,fill:`url(#${s})`})]})})}var Us=Ee({highlighted:null,setHighlighted:()=>{}});function Vs({children:e}){const[t,r]=Ae(null),n=ze(()=>({highlighted:t,setHighlighted:r}),[t]);/* @__PURE__ */
632
+ return qe(Us.Provider,{value:n,children:e})}function Ys(){return Oe(Us)}function Gs(e,t,r=.22){return null===t?null:t===e?1:r}function Xs(e,t="none"){if("none"===t||0===e.length)return null;if("last"===t){for(let t=e.length-1;t>=0;t-=1)if("number"==typeof e[t]&&Number.isFinite(e[t]))return t;return null}let r=null;return e.forEach((n,a)=>{if("number"!=typeof n||!Number.isFinite(n))return;if(null===r)return void(r=a);const l=e[r];("max"===t?n>l:n<l)&&(r=a)}),r}function Zs({variant:e="solid",title:t,rows:r,footnote:n,emphasisKey:a,className:l}){const i="glass"===e;/* @__PURE__ */
633
633
  return He("div",{role:"status",className:`pointer-events-none min-w-44 rounded-xl p-3 text-xs ${i?"":"bg-white ring-1 ring-black/5"} ${l??""}`,style:i?V():{boxShadow:"var(--elevation-popup)"},children:[t&&/* @__PURE__ */qe("p",{className:"mb-2 text-sm font-medium text-gray-800",children:t}),
634
634
  /* @__PURE__ */qe("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:r.map(e=>/* @__PURE__ */He("li",{className:"flex items-center gap-3",style:a&&e.key!==a?{opacity:.45}:void 0,children:[
635
- /* @__PURE__ */qe("span",{className:"h-3 w-3 shrink-0 rounded-[4px]",style:{backgroundColor:e.color??$s.muted}}),
635
+ /* @__PURE__ */qe("span",{className:"h-3 w-3 shrink-0 rounded-[4px]",style:{backgroundColor:e.color??Ms.muted}}),
636
636
  /* @__PURE__ */qe("span",{className:"flex-1 whitespace-nowrap text-gray-600",children:e.label}),
637
- /* @__PURE__ */qe("span",{className:"pl-4 font-semibold tabular-nums text-gray-900",children:e.value??"—"})]},e.key))}),n&&/* @__PURE__ */qe("p",{className:"mt-2 text-2xs text-gray-500",children:n})]})}function Zs({series:e,labels:t,stacked:r=!1,stackMode:n="value",height:a=220,width:l,max:i,formatValue:o,yAxisLabel:s,className:c,emptyLabel:d,radius:u=3,loading:h=!1,animate:m=!0,glow:p=!1,emphasise:g=!1,activeKey:f,highlight:b="none",valueLabels:x=!1,onSelect:y,min:v,formatTooltipValue:w,tooltipLabels:N,barGap:k=4,seriesLabels:$=!1}){const M=De(),{highlighted:C}=Vs(),L=se().charts,S=oe(),D=o??(e=>he(e,S)),P=w??D;if(h)/* @__PURE__ */return qe(qs,{height:a,width:l,variant:"bars",className:c});const A=(e,t)=>{const r=e.pointColors?.[t];if(r)return r;const n=e.pointTones?.[t];return n?ks[n]:Cs(e.slot,e.color,e.tone)},j=e.map((e,t)=>({...e,slot:t})).filter(e=>e.data.some(e=>Number.isFinite(e))),z=(e,t)=>{const r=e.data[t];return"number"==typeof r&&Number.isFinite(r)?r:0},F=t.map((e,t)=>j.reduce((e,r)=>e+z(r,t),0)),E=t.map((e,t)=>j.reduce((e,r)=>e+Math.max(0,z(r,t)),0)),B=t.map((e,t)=>j.reduce((e,r)=>e+Math.min(0,z(r,t)),0)),T=r&&"percent"===n,I=(e,t)=>F[t]>0?e/F[t]:null,O=T?[1]:r?[...E,...B]:j.flatMap(e=>e.data.filter(Number.isFinite)),R=(e,t)=>{const r=e.bandwidth/Math.max(1,j.length),n=j.length>1?Math.min(k,.25*r):0;return{offset:t*r+n/2,width:Math.max(1,r-n)}},W=$&&!r?({x:e,y:r})=>{const n=Math.min(r.domain[1],Math.max(r.domain[0],0));return t.map((t,a)=>j.map((t,l)=>{const i=t.data[a];if(!Number.isFinite(i))return null;const o=Math.min(r.domain[1],Math.max(r.domain[0],i)),{offset:s,width:c}=R(e,l),d=e(a)+s+c/2,u=Math.min(r(o),r(n)),h=Math.max(r(o),r(n));if(c<13)return null;const m=Math.floor((h-u-12)/6.6),p=m>=Math.min(4,t.label.length),g=p&&t.label.length>m?`${t.label.slice(0,m-1).trimEnd()}…`:t.label,f=p?h-6:u-4;/* @__PURE__ */
638
- return qe("text",{"data-series-label":"true",x:d,y:f,transform:`rotate(-90 ${d} ${f})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:p?$s.surface:$s.label,children:g},`n${t.key}-${a}`)}))}:null;/* @__PURE__ */
639
- return qe(_s,{labels:t,values:O,height:a,width:l,max:T?1:i,min:T?void 0:v,formatValue:T?e=>pe(Math.round(100*e),0,S):D,yAxisLabel:s,className:c,emptyLabel:d,onSelect:y,ariaLabel:L.acrossCategories(j.map(e=>e.label),t.length),tooltip:e=>/* @__PURE__ */qe(Xs,{title:N?.[e]??t[e],rows:j.map(t=>({key:t.key,label:t.label,color:A(t,e),value:Number.isFinite(t.data[e])?T?`${pe(100*(I(t.data[e],e)??0),1,S)} · ${P(t.data[e])}`:P(t.data[e]):void 0})),footnote:T?L.inCategory(P(F[e])):void 0}),overlay:x&&!T||W?({x:e,y:n})=>/* @__PURE__ */He("g",{pointerEvents:"none",children:[W?.({x:e,y:n}),x&&!T&&t.map((t,a)=>{if(r){if(!j.some(e=>Number.isFinite(e.data[a])))return null;const t=j.reduce((e,t)=>e+z(t,a),0),r=t>=0?E[a]:B[a];/* @__PURE__ */
640
- return qe("text",{"data-value-label":"true",x:e.center(a),y:t>=0?n(r)-4:n(r)+12,textAnchor:"middle",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:D(t)},`v${a}`)}return j.map((t,r)=>{const l=t.data[a];if(!Number.isFinite(l))return null;const i=l,{offset:o,width:s}=R(e,r);/* @__PURE__ */
641
- return qe("text",{"data-value-label":"true",x:e(a)+o+s/2,y:i>=0?n(i)-4:n(i)+12,textAnchor:"middle",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:D(i)},`v${t.key}-${a}`)})})]}):void 0,children:({x:e,y:n,bottom:a,active:l})=>{const i=f?t.indexOf(f):-1,o=Gs(r?F:j[0]?.data??[],b),s=l??(i>=0?i:o);/* @__PURE__ */
637
+ /* @__PURE__ */qe("span",{className:"pl-4 font-semibold tabular-nums text-gray-900",children:e.value??"—"})]},e.key))}),n&&/* @__PURE__ */qe("p",{className:"mt-2 text-2xs text-gray-500",children:n})]})}function Js({series:e,labels:t,stacked:r=!1,stackMode:n="value",height:a=220,width:l,max:i,formatValue:o,yAxisLabel:s,className:c,emptyLabel:d,radius:u=3,loading:h=!1,animate:m=!0,glow:p=!1,emphasise:g=!1,activeKey:f,highlight:b="none",valueLabels:x=!1,onSelect:y,min:v,formatTooltipValue:w,tooltipLabels:N,barGap:k=4,seriesLabels:$=!1}){const M=De(),{highlighted:C}=Ys(),L=se().charts,S=oe(),D=o??(e=>he(e,S)),P=w??D;if(h)/* @__PURE__ */return qe(Hs,{height:a,width:l,variant:"bars",className:c});const A=(e,t)=>{const r=e.pointColors?.[t];if(r)return r;const n=e.pointTones?.[t];return n?$s[n]:Ls(e.slot,e.color,e.tone)},j=e.map((e,t)=>({...e,slot:t})).filter(e=>e.data.some(e=>Number.isFinite(e))),z=(e,t)=>{const r=e.data[t];return"number"==typeof r&&Number.isFinite(r)?r:0},F=t.map((e,t)=>j.reduce((e,r)=>e+z(r,t),0)),E=t.map((e,t)=>j.reduce((e,r)=>e+Math.max(0,z(r,t)),0)),B=t.map((e,t)=>j.reduce((e,r)=>e+Math.min(0,z(r,t)),0)),T=r&&"percent"===n,I=(e,t)=>F[t]>0?e/F[t]:null,O=T?[1]:r?[...E,...B]:j.flatMap(e=>e.data.filter(Number.isFinite)),R=(e,t)=>{const r=e.bandwidth/Math.max(1,j.length),n=j.length>1?Math.min(k,.25*r):0;return{offset:t*r+n/2,width:Math.max(1,r-n)}},W=$&&!r?({x:e,y:r})=>{const n=Math.min(r.domain[1],Math.max(r.domain[0],0));return t.map((t,a)=>j.map((t,l)=>{const i=t.data[a];if(!Number.isFinite(i))return null;const o=Math.min(r.domain[1],Math.max(r.domain[0],i)),{offset:s,width:c}=R(e,l),d=e(a)+s+c/2,u=Math.min(r(o),r(n)),h=Math.max(r(o),r(n));if(c<13)return null;const m=Math.floor((h-u-12)/6.6),p=m>=Math.min(4,t.label.length),g=p&&t.label.length>m?`${t.label.slice(0,m-1).trimEnd()}…`:t.label,f=p?h-6:u-4;/* @__PURE__ */
638
+ return qe("text",{"data-series-label":"true",x:d,y:f,transform:`rotate(-90 ${d} ${f})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:p?Ms.surface:Ms.label,children:g},`n${t.key}-${a}`)}))}:null;/* @__PURE__ */
639
+ return qe(qs,{labels:t,values:O,height:a,width:l,max:T?1:i,min:T?void 0:v,formatValue:T?e=>pe(Math.round(100*e),0,S):D,yAxisLabel:s,className:c,emptyLabel:d,onSelect:y,ariaLabel:L.acrossCategories(j.map(e=>e.label),t.length),tooltip:e=>/* @__PURE__ */qe(Zs,{title:N?.[e]??t[e],rows:j.map(t=>({key:t.key,label:t.label,color:A(t,e),value:Number.isFinite(t.data[e])?T?`${pe(100*(I(t.data[e],e)??0),1,S)} · ${P(t.data[e])}`:P(t.data[e]):void 0})),footnote:T?L.inCategory(P(F[e])):void 0}),overlay:x&&!T||W?({x:e,y:n})=>/* @__PURE__ */He("g",{pointerEvents:"none",children:[W?.({x:e,y:n}),x&&!T&&t.map((t,a)=>{if(r){if(!j.some(e=>Number.isFinite(e.data[a])))return null;const t=j.reduce((e,t)=>e+z(t,a),0),r=t>=0?E[a]:B[a];/* @__PURE__ */
640
+ return qe("text",{"data-value-label":"true",x:e.center(a),y:t>=0?n(r)-4:n(r)+12,textAnchor:"middle",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:D(t)},`v${a}`)}return j.map((t,r)=>{const l=t.data[a];if(!Number.isFinite(l))return null;const i=l,{offset:o,width:s}=R(e,r);/* @__PURE__ */
641
+ return qe("text",{"data-value-label":"true",x:e(a)+o+s/2,y:i>=0?n(i)-4:n(i)+12,textAnchor:"middle",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:D(i)},`v${t.key}-${a}`)})})]}):void 0,children:({x:e,y:n,bottom:a,active:l})=>{const i=f?t.indexOf(f):-1,o=Xs(r?F:j[0]?.data??[],b),s=l??(i>=0?i:o);/* @__PURE__ */
642
642
  return He("g",{children:[
643
- /* @__PURE__ */qe(ii,{id:M,glow:p}),t.map((t,a)=>{let l=0,i=0;const o=n(Math.min(n.domain[1],Math.max(n.domain[0],0)));return j.map((t,c)=>{const d=t.data[a];if(!Number.isFinite(d))return null;const h=T?I(d,a):d;if(null===h)return null;const f=A(t,a),b=R(e,c),x=r?e(a):e(a)+b.offset,y=r?Math.max(1,e.bandwidth):b.width;let v,w,N=!0;if(r){const e=h>=0?l:i,t=e+h;h>=0?l=t:i=t,v=n(Math.max(e,t)),w=n(Math.min(e,t)),N=0===e}else v=Math.min(n(h),o),w=Math.max(n(h),o);const k=Math.max(0,w-v-(r&&!N?2:0)),$=null===s||s===a,L=$?f:g?$s.muted:f,S=Ys(t.key,C);/* @__PURE__ */
644
- return qe("rect",{x:x,y:v,width:y,height:k,rx:u,fill:L,fillOpacity:S??($?1:g?.32:.45),filter:p&&s===a?`url(#${Ql(M)})`:void 0,className:"rosh-viz-mark"+(m?` ${si.rise}`:""),style:m?ci(a*(r?1:j.length)+c,26):void 0},`${t.key}-${a}`)})}),null!==l&&!g&&/* @__PURE__ */qe("line",{x1:e.center(l),y1:n(n.domain[1]),x2:e.center(l),y2:a,stroke:$s.axis,strokeWidth:1})]})}})}var Js=e=>e.toFixed(2);function Qs(e){return e.map(([e,t],r)=>`${0===r?"M":"L"}${Js(e)},${Js(t)}`).join(" ")}function ec(e){let t="";return e.forEach((e,r)=>{t+=`${0===r?"M":" L"}${Js(e.start)},${Js(e.y)}`,t+=` L${Js(e.end)},${Js(e.y)}`}),t}function tc(e){if(e.length<3)return Qs(e);const t=e.length,r=[],n=[];for(let a=0;a<t-1;a+=1){const t=e[a+1][0]-e[a][0];r.push(t),n.push(0===t?0:(e[a+1][1]-e[a][1])/t)}const a=[n[0]];for(let e=1;e<t-1;e+=1)a.push(n[e-1]*n[e]<=0?0:(n[e-1]+n[e])/2);a.push(n[t-2]);for(let e=0;e<t-1;e+=1){if(0===n[e]){a[e]=0,a[e+1]=0;continue}const t=a[e]/n[e],r=a[e+1]/n[e],l=t*t+r*r;if(l>9){const i=3/Math.sqrt(l);a[e]=i*t*n[e],a[e+1]=i*r*n[e]}}let l=`M${Js(e[0][0])},${Js(e[0][1])}`;for(let n=0;n<t-1;n+=1){const t=r[n]/3;l+=` C${Js(e[n][0]+t)},${Js(e[n][1]+a[n]*t)} ${Js(e[n+1][0]-t)},${Js(e[n+1][1]-a[n+1]*t)} ${Js(e[n+1][0])},${Js(e[n+1][1])}`}return l}function rc(e,t=0){if(e.length<3)return Qs(e);const r=e.map(e=>e[1]),n=Math.min(...r),a=Math.max(...r),l=e=>Math.min(a,Math.max(n,e)),i=(1-t)/6;let o=`M${Js(e[0][0])},${Js(e[0][1])}`;for(let t=0;t<e.length-1;t+=1){const r=e[t-1]??e[t],n=e[t],a=e[t+1],s=e[t+2]??a,c=n[0]+(a[0]-r[0])*i,d=l(n[1]+(a[1]-r[1])*i),u=a[0]-(s[0]-n[0])*i,h=l(a[1]-(s[1]-n[1])*i);o+=` C${Js(c)},${Js(d)} ${Js(u)},${Js(h)} ${Js(a[0])},${Js(a[1])}`}return o}function nc(e){if(e.length<2)return Qs(e);let t=`M${Js(e[0][0])},${Js(e[0][1])}`;for(let r=1;r<e.length;r+=1){const[n,a]=e[r-1],[l,i]=e[r],o=(n+l)/2;t+=` C${Js(o)},${Js(a)} ${Js(o)},${Js(i)} ${Js(l)},${Js(i)}`}return t}function ac(e,t="linear",r=0){return 0===e.length?"":1===e.length?`M${Js(e[0][0])},${Js(e[0][1])}`:"monotone"===t?tc(e):"spline"===t?rc(e,r):"bump"===t?nc(e):Qs(e)}function lc(e,t,r){if(0===t.length)return"";const n=t[0],a=t[t.length-1];return`${e} L${Js(a[0])},${Js(r)} L${Js(n[0])},${Js(r)} Z`}function ic(e,t){if(0===t.length)return e;return`${e} L${[...t].reverse().map(([e,t])=>`${Js(e)},${Js(t)}`).join(" L")} Z`}function oc(e,t,r,n,a=-Math.PI/2){return Array.from({length:n},(l,i)=>{const o=a+2*i*Math.PI/n;return[e+r*Math.cos(o),t+r*Math.sin(o)]})}function sc(e,t,r,n,a,l){const i=l-a;if(Math.abs(i)>=2*Math.PI){const l=a+Math.PI;return`${sc(e,t,r,n,a,l)} ${sc(e,t,r,n,l,a+2*Math.PI)}`}const o=Math.abs(i)>Math.PI?1:0,s=(r,n)=>[e+r*Math.cos(n),t+r*Math.sin(n)],[c,d]=s(n,a),[u,h]=s(n,l);if(r<=0)return`M${Js(e)},${Js(t)} L${Js(c)},${Js(d)} A${Js(n)},${Js(n)} 0 ${o} 1 ${Js(u)},${Js(h)} Z`;const[m,p]=s(r,l),[g,f]=s(r,a);return`M${Js(c)},${Js(d)} A${Js(n)},${Js(n)} 0 ${o} 1 ${Js(u)},${Js(h)} L${Js(m)},${Js(p)} A${Js(r)},${Js(r)} 0 ${o} 0 ${Js(g)},${Js(f)} Z`}function cc({segments:e,variant:t="pie",size:r=280,innerRadius:n,padAngle:a=.012,maxSegments:l=6,otherLabel:i,formatValue:o,centerLabel:s,animate:c=!0,labels:d="none",labelMinShare:u=.04,className:h,emptyLabel:m}){const p=se().charts,g=oe(),f=o??(e=>he(e,g)),b=i??p.other,x=m??p.nothingToBreakDown,y=De(),[v,w]=Ae(null),{highlighted:N}=Vs(),k=je(null),$=Ws(k,Number.POSITIVE_INFINITY),M=e.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===M.length)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${h??""}`,children:x});const C=[...M].sort((e,t)=>t.value-e.value),L=C.slice(0,l),S=C.slice(l),D=S.length>0?[...L,{key:"__other__",label:b,value:S.reduce((e,t)=>e+t.value,0),slot:-1,color:$s.muted}]:L,P=e=>Cs(e.slot,e.color,e.tone),A=D.reduce((e,t)=>e+t.value,0),j=Math.ceil(.62*Math.max(...D.map(e=>String(e.label).length),4)*11)+24,z="outside"===d&&$>=120+2*j,F=z?j:0,E=z?Math.max(120,Math.min(r,$-2*F)):r,B=E+2*F,T=F+E/2,I=E/2,O=E/2-12,R=n??("ring"===t?.58*O:0),W=Ts(D.length,a),K=Math.max(...D.map(e=>e.value)),_=e=>R+(O-R)*Math.sqrt(Math.max(0,e)/K);let q=-Math.PI/2;const H=(()=>{if(!z)return[];let e=-Math.PI/2;const r=D.map((r,n)=>{const l="rose"===t?Ts(D.length,a).step:r.value/A*Math.PI*2,i="rose"===t?Ts(D.length,a).center(n):e+l/2;e+=l;const o="rose"===t?_(r.value):O;return{key:r.key,label:r.label,share:r.value/A,right:Math.cos(i)>=0,anchor:[T+o*Math.cos(i),I+o*Math.sin(i)],y:I+(o+14)*Math.sin(i),index:n}}).filter(e=>e.share>=u),n=Math.max(1,Math.floor((E-11-13)/26)+1),l=/* @__PURE__ */new Set;for(const e of[!0,!1]){const t=r.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,n).sort((e,t)=>e.y-t.y);for(let e=1;e<t.length;e+=1)t[e].y-t[e-1].y<26&&(t[e].y=t[e-1].y+26);for(let e=t.length-1;e>=0;e-=1){const r=e===t.length-1?E-13:t[e+1].y-26;t[e].y=Math.min(t[e].y,r)}t.forEach((e,r)=>{e.y=Math.max(e.y,0===r?11:t[r-1].y+26),l.add(e.key)})}return r.filter(e=>l.has(e.key))})(),U=(e,t)=>null!==v?v!==e:null!==N&&N!==t,V=null!==v?D[v]:void 0;/* @__PURE__ */
643
+ /* @__PURE__ */qe(ii,{id:M,glow:p}),t.map((t,a)=>{let l=0,i=0;const o=n(Math.min(n.domain[1],Math.max(n.domain[0],0)));return j.map((t,c)=>{const d=t.data[a];if(!Number.isFinite(d))return null;const h=T?I(d,a):d;if(null===h)return null;const f=A(t,a),b=R(e,c),x=r?e(a):e(a)+b.offset,y=r?Math.max(1,e.bandwidth):b.width;let v,w,N=!0;if(r){const e=h>=0?l:i,t=e+h;h>=0?l=t:i=t,v=n(Math.max(e,t)),w=n(Math.min(e,t)),N=0===e}else v=Math.min(n(h),o),w=Math.max(n(h),o);const k=Math.max(0,w-v-(r&&!N?2:0)),$=null===s||s===a,L=$?f:g?Ms.muted:f,S=Gs(t.key,C);/* @__PURE__ */
644
+ return qe("rect",{x:x,y:v,width:y,height:k,rx:u,fill:L,fillOpacity:S??($?1:g?.32:.45),filter:p&&s===a?`url(#${Ql(M)})`:void 0,className:"rosh-viz-mark"+(m?` ${si.rise}`:""),style:m?ci(a*(r?1:j.length)+c,26):void 0},`${t.key}-${a}`)})}),null!==l&&!g&&/* @__PURE__ */qe("line",{x1:e.center(l),y1:n(n.domain[1]),x2:e.center(l),y2:a,stroke:Ms.axis,strokeWidth:1})]})}})}var Qs=e=>e.toFixed(2);function ec(e){return e.map(([e,t],r)=>`${0===r?"M":"L"}${Qs(e)},${Qs(t)}`).join(" ")}function tc(e){let t="";return e.forEach((e,r)=>{t+=`${0===r?"M":" L"}${Qs(e.start)},${Qs(e.y)}`,t+=` L${Qs(e.end)},${Qs(e.y)}`}),t}function rc(e){if(e.length<3)return ec(e);const t=e.length,r=[],n=[];for(let a=0;a<t-1;a+=1){const t=e[a+1][0]-e[a][0];r.push(t),n.push(0===t?0:(e[a+1][1]-e[a][1])/t)}const a=[n[0]];for(let e=1;e<t-1;e+=1)a.push(n[e-1]*n[e]<=0?0:(n[e-1]+n[e])/2);a.push(n[t-2]);for(let e=0;e<t-1;e+=1){if(0===n[e]){a[e]=0,a[e+1]=0;continue}const t=a[e]/n[e],r=a[e+1]/n[e],l=t*t+r*r;if(l>9){const i=3/Math.sqrt(l);a[e]=i*t*n[e],a[e+1]=i*r*n[e]}}let l=`M${Qs(e[0][0])},${Qs(e[0][1])}`;for(let n=0;n<t-1;n+=1){const t=r[n]/3;l+=` C${Qs(e[n][0]+t)},${Qs(e[n][1]+a[n]*t)} ${Qs(e[n+1][0]-t)},${Qs(e[n+1][1]-a[n+1]*t)} ${Qs(e[n+1][0])},${Qs(e[n+1][1])}`}return l}function nc(e,t=0){if(e.length<3)return ec(e);const r=e.map(e=>e[1]),n=Math.min(...r),a=Math.max(...r),l=e=>Math.min(a,Math.max(n,e)),i=(1-t)/6;let o=`M${Qs(e[0][0])},${Qs(e[0][1])}`;for(let t=0;t<e.length-1;t+=1){const r=e[t-1]??e[t],n=e[t],a=e[t+1],s=e[t+2]??a,c=n[0]+(a[0]-r[0])*i,d=l(n[1]+(a[1]-r[1])*i),u=a[0]-(s[0]-n[0])*i,h=l(a[1]-(s[1]-n[1])*i);o+=` C${Qs(c)},${Qs(d)} ${Qs(u)},${Qs(h)} ${Qs(a[0])},${Qs(a[1])}`}return o}function ac(e){if(e.length<2)return ec(e);let t=`M${Qs(e[0][0])},${Qs(e[0][1])}`;for(let r=1;r<e.length;r+=1){const[n,a]=e[r-1],[l,i]=e[r],o=(n+l)/2;t+=` C${Qs(o)},${Qs(a)} ${Qs(o)},${Qs(i)} ${Qs(l)},${Qs(i)}`}return t}function lc(e,t="linear",r=0){return 0===e.length?"":1===e.length?`M${Qs(e[0][0])},${Qs(e[0][1])}`:"monotone"===t?rc(e):"spline"===t?nc(e,r):"bump"===t?ac(e):ec(e)}function ic(e,t,r){if(0===t.length)return"";const n=t[0],a=t[t.length-1];return`${e} L${Qs(a[0])},${Qs(r)} L${Qs(n[0])},${Qs(r)} Z`}function oc(e,t){if(0===t.length)return e;return`${e} L${[...t].reverse().map(([e,t])=>`${Qs(e)},${Qs(t)}`).join(" L")} Z`}function sc(e,t,r,n,a=-Math.PI/2){return Array.from({length:n},(l,i)=>{const o=a+2*i*Math.PI/n;return[e+r*Math.cos(o),t+r*Math.sin(o)]})}function cc(e,t,r,n,a,l){const i=l-a;if(Math.abs(i)>=2*Math.PI){const l=a+Math.PI;return`${cc(e,t,r,n,a,l)} ${cc(e,t,r,n,l,a+2*Math.PI)}`}const o=Math.abs(i)>Math.PI?1:0,s=(r,n)=>[e+r*Math.cos(n),t+r*Math.sin(n)],[c,d]=s(n,a),[u,h]=s(n,l);if(r<=0)return`M${Qs(e)},${Qs(t)} L${Qs(c)},${Qs(d)} A${Qs(n)},${Qs(n)} 0 ${o} 1 ${Qs(u)},${Qs(h)} Z`;const[m,p]=s(r,l),[g,f]=s(r,a);return`M${Qs(c)},${Qs(d)} A${Qs(n)},${Qs(n)} 0 ${o} 1 ${Qs(u)},${Qs(h)} L${Qs(m)},${Qs(p)} A${Qs(r)},${Qs(r)} 0 ${o} 0 ${Qs(g)},${Qs(f)} Z`}function dc({segments:e,variant:t="pie",size:r=280,innerRadius:n,padAngle:a=.012,maxSegments:l=6,otherLabel:i,formatValue:o,centerLabel:s,animate:c=!0,labels:d="none",labelMinShare:u=.04,className:h,emptyLabel:m}){const p=se().charts,g=oe(),f=o??(e=>he(e,g)),b=i??p.other,x=m??p.nothingToBreakDown,y=De(),[v,w]=Ae(null),{highlighted:N}=Ys(),k=je(null),$=Ks(k,Number.POSITIVE_INFINITY),M=e.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===M.length)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${h??""}`,children:x});const C=[...M].sort((e,t)=>t.value-e.value),L=C.slice(0,l),S=C.slice(l),D=S.length>0?[...L,{key:"__other__",label:b,value:S.reduce((e,t)=>e+t.value,0),slot:-1,color:Ms.muted}]:L,P=e=>Ls(e.slot,e.color,e.tone),A=D.reduce((e,t)=>e+t.value,0),j=Math.ceil(.62*Math.max(...D.map(e=>String(e.label).length),4)*11)+24,z="outside"===d&&$>=120+2*j,F=z?j:0,E=z?Math.max(120,Math.min(r,$-2*F)):r,B=E+2*F,T=F+E/2,I=E/2,O=E/2-12,R=n??("ring"===t?.58*O:0),W=Is(D.length,a),K=Math.max(...D.map(e=>e.value)),_=e=>R+(O-R)*Math.sqrt(Math.max(0,e)/K);let q=-Math.PI/2;const H=(()=>{if(!z)return[];let e=-Math.PI/2;const r=D.map((r,n)=>{const l="rose"===t?Is(D.length,a).step:r.value/A*Math.PI*2,i="rose"===t?Is(D.length,a).center(n):e+l/2;e+=l;const o="rose"===t?_(r.value):O;return{key:r.key,label:r.label,share:r.value/A,right:Math.cos(i)>=0,anchor:[T+o*Math.cos(i),I+o*Math.sin(i)],y:I+(o+14)*Math.sin(i),index:n}}).filter(e=>e.share>=u),n=Math.max(1,Math.floor((E-11-13)/26)+1),l=/* @__PURE__ */new Set;for(const e of[!0,!1]){const t=r.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,n).sort((e,t)=>e.y-t.y);for(let e=1;e<t.length;e+=1)t[e].y-t[e-1].y<26&&(t[e].y=t[e-1].y+26);for(let e=t.length-1;e>=0;e-=1){const r=e===t.length-1?E-13:t[e+1].y-26;t[e].y=Math.min(t[e].y,r)}t.forEach((e,r)=>{e.y=Math.max(e.y,0===r?11:t[r-1].y+26),l.add(e.key)})}return r.filter(e=>l.has(e.key))})(),U=(e,t)=>null!==v?v!==e:null!==N&&N!==t,V=null!==v?D[v]:void 0;/* @__PURE__ */
645
645
  return He("div",{className:`relative ${h??""}`,ref:k,children:[
646
646
  /* @__PURE__ */He("svg",{width:"100%",height:E,viewBox:`0 0 ${B} ${E}`,role:"img","aria-labelledby":y,onMouseLeave:()=>w(null),children:[
647
647
  /* @__PURE__ */qe("title",{id:y,children:p.breakdown(f(A),D.length)}),D.map((e,r)=>{const n=P(e),l="rose"===t?W(r):q,i="rose"===t?W.step:e.value/A*Math.PI*2-a;"rose"!==t&&(q+=e.value/A*Math.PI*2);const o=l+Math.max(.001,i),s="rose"===t?_(e.value):O;/* @__PURE__ */
648
- return qe("path",{d:sc(T,I,R,s,l,o),fill:n,fillOpacity:U(r,e.key)?.4:1,stroke:$s.surface,strokeWidth:1,className:c?si.sweep:void 0,style:c?ci(r,55):void 0,onMouseEnter:()=>w(r)},e.key)}),H.map(e=>{const t=e.right?B-6:6,r=e.right?T+O+14:T-O-14;/* @__PURE__ */
648
+ return qe("path",{d:cc(T,I,R,s,l,o),fill:n,fillOpacity:U(r,e.key)?.4:1,stroke:Ms.surface,strokeWidth:1,className:c?si.sweep:void 0,style:c?ci(r,55):void 0,onMouseEnter:()=>w(r)},e.key)}),H.map(e=>{const t=e.right?B-6:6,r=e.right?T+O+14:T-O-14;/* @__PURE__ */
649
649
  return He("g",{children:[
650
- /* @__PURE__ */qe("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${r},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:$s.grid,strokeWidth:1}),
651
- /* @__PURE__ */qe("text",{x:t,y:e.y-2,fontSize:11,fill:$s.label,textAnchor:e.right?"end":"start",children:e.label}),
652
- /* @__PURE__ */qe("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:$s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:pe(100*e.share,1,g)})]},`lbl-${e.key}`)}),s&&R>0&&/* @__PURE__ */qe("text",{x:T,y:I+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:$s.label,children:s})]}),V&&null!==v&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:V.label,rows:[{key:"value",label:p.value,color:P(V),value:f(V.value)},{key:"share",label:p.share,color:$s.muted,value:pe(V.value/A*100,1,g)}]})}),
650
+ /* @__PURE__ */qe("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${r},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:Ms.grid,strokeWidth:1}),
651
+ /* @__PURE__ */qe("text",{x:t,y:e.y-2,fontSize:11,fill:Ms.label,textAnchor:e.right?"end":"start",children:e.label}),
652
+ /* @__PURE__ */qe("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:Ms.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:pe(100*e.share,1,g)})]},`lbl-${e.key}`)}),s&&R>0&&/* @__PURE__ */qe("text",{x:T,y:I+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:Ms.label,children:s})]}),V&&null!==v&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:V.label,rows:[{key:"value",label:p.value,color:P(V),value:f(V.value)},{key:"share",label:p.share,color:Ms.muted,value:pe(V.value/A*100,1,g)}]})}),
653
653
  /* @__PURE__ */qe("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:D.map((e,t)=>/* @__PURE__ */He("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
654
654
  /* @__PURE__ */qe("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:P(e)}}),
655
655
  /* @__PURE__ */qe("span",{className:"flex-1 truncate",children:e.label}),
656
- /* @__PURE__ */qe("span",{className:"tabular-nums text-gray-800",children:pe(e.value/A*100,1,g)})]},e.key))})]})}var dc={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},uc=[12,18,14,22,19,27,24,31,28,35,30,38],hc=["J","F","M","A","M","J","J","A","S","O","N","D"],mc=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],pc=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function gc(){/* @__PURE__ */
657
- return qe(fa,{groups:dc,children:/* @__PURE__ */qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("div",{className:"mx-auto max-w-6xl space-y-6",children:[
656
+ /* @__PURE__ */qe("span",{className:"tabular-nums text-gray-800",children:pe(e.value/A*100,1,g)})]},e.key))})]})}var uc={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},hc=[12,18,14,22,19,27,24,31,28,35,30,38],mc=["J","F","M","A","M","J","J","A","S","O","N","D"],pc=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],gc=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function fc(){/* @__PURE__ */
657
+ return qe(fa,{groups:uc,children:/* @__PURE__ */qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("div",{className:"mx-auto max-w-6xl space-y-6",children:[
658
658
  /* @__PURE__ */He("div",{className:"flex items-center justify-between gap-4",children:[
659
659
  /* @__PURE__ */He("div",{children:[
660
660
  /* @__PURE__ */qe("h1",{className:"text-xl font-semibold text-gray-900",children:"Dashboard"}),
@@ -668,29 +668,29 @@ return qe(fa,{groups:dc,children:/* @__PURE__ */qe("div",{className:"h-full over
668
668
  /* @__PURE__ */qe($a,{label:"Customers",value:"892",delta:{value:"2%",direction:"down"}}),
669
669
  /* @__PURE__ */qe($a,{label:"Refunds",value:"$1.1k",delta:{value:"0%",direction:"flat"}})]}),
670
670
  /* @__PURE__ */He("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[
671
- /* @__PURE__ */qe(ka,{header:"Revenue",className:"lg:col-span-2",children:/* @__PURE__ */qe(Zs,{labels:hc,height:200,series:[{key:"revenue",label:"Revenue",data:uc}],formatValue:e=>`$${e}k`})}),
672
- /* @__PURE__ */qe(ka,{header:"Traffic sources",children:/* @__PURE__ */qe(cc,{variant:"ring",size:180,segments:mc,centerLabel:"100%"})})]}),
671
+ /* @__PURE__ */qe(ka,{header:"Revenue",className:"lg:col-span-2",children:/* @__PURE__ */qe(Js,{labels:mc,height:200,series:[{key:"revenue",label:"Revenue",data:hc}],formatValue:e=>`$${e}k`})}),
672
+ /* @__PURE__ */qe(ka,{header:"Traffic sources",children:/* @__PURE__ */qe(dc,{variant:"ring",size:180,segments:pc,centerLabel:"100%"})})]}),
673
673
  /* @__PURE__ */qe(ka,{header:"Recent orders",padded:!1,children:/* @__PURE__ */He("table",{className:"w-full text-sm",children:[
674
674
  /* @__PURE__ */qe("thead",{children:/* @__PURE__ */He("tr",{className:"border-b border-gray-100 text-left text-xs uppercase tracking-wide text-gray-400",children:[
675
675
  /* @__PURE__ */qe("th",{className:"px-4 py-2 font-medium",children:"Order"}),
676
676
  /* @__PURE__ */qe("th",{className:"px-4 py-2 font-medium",children:"Customer"}),
677
677
  /* @__PURE__ */qe("th",{className:"px-4 py-2 font-medium",children:"Total"}),
678
678
  /* @__PURE__ */qe("th",{className:"px-4 py-2 font-medium",children:"Status"})]})}),
679
- /* @__PURE__ */qe("tbody",{className:"divide-y divide-gray-100",children:pc.map(e=>/* @__PURE__ */He("tr",{className:"text-gray-700",children:[
679
+ /* @__PURE__ */qe("tbody",{className:"divide-y divide-gray-100",children:gc.map(e=>/* @__PURE__ */He("tr",{className:"text-gray-700",children:[
680
680
  /* @__PURE__ */qe("td",{className:"px-4 py-2 font-mono text-xs text-gray-500",children:e.id}),
681
681
  /* @__PURE__ */qe("td",{className:"px-4 py-2",children:/* @__PURE__ */He("span",{className:"flex items-center gap-2",children:[
682
682
  /* @__PURE__ */qe(xl,{size:"xs",name:e.customer}),e.customer]})}),
683
683
  /* @__PURE__ */qe("td",{className:"px-4 py-2",children:e.total}),
684
684
  /* @__PURE__ */qe("td",{className:"px-4 py-2",children:/* @__PURE__ */qe(xa,{status:e.status})})]},e.id))})]})}),
685
685
  /* @__PURE__ */He("p",{className:"flex items-center gap-2 text-xs text-gray-400",children:[
686
- /* @__PURE__ */qe("span",{className:"text-emerald-600",children:/* @__PURE__ */qe(vs,{data:uc,width:80,height:20})}),"Trending up 12% vs last month"]})]})})})}var fc={active:"success",invited:"queued",suspended:"danger",pending:"pending"},bc=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function xc(){const[e,t]=Ae(1),[r,n]=Ae(""),[a,l]=Ae("");/* @__PURE__ */
687
- return qe(fa,{groups:fc,children:/* @__PURE__ */qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("div",{className:"mx-auto max-w-5xl space-y-4",children:[
686
+ /* @__PURE__ */qe("span",{className:"text-emerald-600",children:/* @__PURE__ */qe(ws,{data:hc,width:80,height:20})}),"Trending up 12% vs last month"]})]})})})}var bc={active:"success",invited:"queued",suspended:"danger",pending:"pending"},xc=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function yc(){const[e,t]=Ae(1),[r,n]=Ae(""),[a,l]=Ae("");/* @__PURE__ */
687
+ return qe(fa,{groups:bc,children:/* @__PURE__ */qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("div",{className:"mx-auto max-w-5xl space-y-4",children:[
688
688
  /* @__PURE__ */He("div",{className:"flex items-center justify-between gap-4",children:[
689
689
  /* @__PURE__ */qe("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
690
690
  /* @__PURE__ */qe(k,{size:"sm",children:"Invite member"})]}),
691
691
  /* @__PURE__ */He(ka,{padded:!1,children:[
692
692
  /* @__PURE__ */He("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-100 p-3",children:[
693
- /* @__PURE__ */qe("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */qe(Ge,{value:a,onChange:e=>l(e.target.value),placeholder:"Search members…",leftIcon:/* @__PURE__ */qe(yc,{})})}),
693
+ /* @__PURE__ */qe("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */qe(Ge,{value:a,onChange:e=>l(e.target.value),placeholder:"Search members…",leftIcon:/* @__PURE__ */qe(vc,{})})}),
694
694
  /* @__PURE__ */qe("div",{className:"w-40",children:/* @__PURE__ */qe(ut,{value:r,onChange:n,placeholder:"All roles",options:[{value:"admin",label:"Admin"},{value:"editor",label:"Editor"},{value:"viewer",label:"Viewer"}]})}),
695
695
  /* @__PURE__ */qe(k,{variant:"secondary",size:"sm",children:"Filter"})]}),
696
696
  /* @__PURE__ */He("table",{className:"w-full text-sm",children:[
@@ -699,7 +699,7 @@ return qe(fa,{groups:fc,children:/* @__PURE__ */qe("div",{className:"h-full over
699
699
  /* @__PURE__ */qe("th",{className:"px-4 py-2 font-medium",children:"Role"}),
700
700
  /* @__PURE__ */qe("th",{className:"px-4 py-2 font-medium",children:"Status"}),
701
701
  /* @__PURE__ */qe("th",{className:"px-4 py-2 font-medium text-right",children:"Actions"})]})}),
702
- /* @__PURE__ */qe("tbody",{className:"divide-y divide-gray-100",children:bc.map(e=>/* @__PURE__ */He("tr",{className:"text-gray-700 hover:bg-gray-50",children:[
702
+ /* @__PURE__ */qe("tbody",{className:"divide-y divide-gray-100",children:xc.map(e=>/* @__PURE__ */He("tr",{className:"text-gray-700 hover:bg-gray-50",children:[
703
703
  /* @__PURE__ */He("td",{className:"px-4 py-3",children:[
704
704
  /* @__PURE__ */qe("div",{className:"font-medium text-gray-900",children:e.name}),
705
705
  /* @__PURE__ */qe("div",{className:"text-xs text-gray-400",children:e.email})]}),
@@ -708,8 +708,8 @@ return qe(fa,{groups:fc,children:/* @__PURE__ */qe("div",{className:"h-full over
708
708
  /* @__PURE__ */qe("td",{className:"px-4 py-3 text-right",children:/* @__PURE__ */qe(k,{variant:"ghost",size:"sm",children:"Edit"})})]},e.email))})]}),
709
709
  /* @__PURE__ */He("div",{className:"flex items-center justify-between border-t border-gray-100 p-3",children:[
710
710
  /* @__PURE__ */qe("span",{className:"text-xs text-gray-400",children:"Showing 1–6 of 48"}),
711
- /* @__PURE__ */qe(cs,{page:e,pageCount:8,onPageChange:t,showEdges:!0})]})]})]})})})}function yc(){/* @__PURE__ */
712
- return qe(Ce,{name:"search",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}function vc(){const[e,t]=Ae("pro"),[r,n]=Ae(!0),[a,l]=Ae("us");/* @__PURE__ */
711
+ /* @__PURE__ */qe(cs,{page:e,pageCount:8,onPageChange:t,showEdges:!0})]})]})]})})})}function vc(){/* @__PURE__ */
712
+ return qe(Ce,{name:"search",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}function wc(){const[e,t]=Ae("pro"),[r,n]=Ae(!0),[a,l]=Ae("us");/* @__PURE__ */
713
713
  return qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
714
714
  /* @__PURE__ */He("div",{children:[
715
715
  /* @__PURE__ */qe("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
@@ -730,7 +730,7 @@ return qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__
730
730
  /* @__PURE__ */qe(mt,{checked:r,onChange:n,label:"Email me product updates",description:"Occasional news — no more than once a month."})]})}),
731
731
  /* @__PURE__ */He("div",{className:"flex items-center justify-end gap-2",children:[
732
732
  /* @__PURE__ */qe(k,{variant:"secondary",children:"Cancel"}),
733
- /* @__PURE__ */qe(k,{type:"submit",children:"Save changes"})]})]})})}var wc=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function Nc(){const[e,t]=Ae(!0),[r,n]=Ae("us"),a=wc.reduce((e,t)=>e+t.qty*t.price,0),l=a+9;/* @__PURE__ */
733
+ /* @__PURE__ */qe(k,{type:"submit",children:"Save changes"})]})]})})}var Nc=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function kc(){const[e,t]=Ae(!0),[r,n]=Ae("us"),a=Nc.reduce((e,t)=>e+t.qty*t.price,0),l=a+9;/* @__PURE__ */
734
734
  return qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("div",{className:"mx-auto max-w-5xl space-y-5",children:[
735
735
  /* @__PURE__ */qe("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
736
736
  /* @__PURE__ */He("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
@@ -753,7 +753,7 @@ return qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__
753
753
  /* @__PURE__ */qe(ft,{label:"CVC",required:!0,children:/* @__PURE__ */qe(Ge,{placeholder:"123"})})]})]})})]}),
754
754
  /* @__PURE__ */He("div",{className:"space-y-4",children:[
755
755
  /* @__PURE__ */He(ka,{header:"Order summary",children:[
756
- /* @__PURE__ */qe("ul",{className:"space-y-2 text-sm",children:wc.map(e=>/* @__PURE__ */He("li",{className:"flex items-center justify-between gap-2 text-gray-700",children:[
756
+ /* @__PURE__ */qe("ul",{className:"space-y-2 text-sm",children:Nc.map(e=>/* @__PURE__ */He("li",{className:"flex items-center justify-between gap-2 text-gray-700",children:[
757
757
  /* @__PURE__ */He("span",{children:[e.name," ",
758
758
  /* @__PURE__ */He("span",{className:"text-gray-400",children:["×",e.qty]})]}),
759
759
  /* @__PURE__ */He("span",{children:["$",e.qty*e.price]})]},e.name))}),
@@ -768,11 +768,11 @@ return qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__
768
768
  /* @__PURE__ */qe("span",{children:"Total"}),
769
769
  /* @__PURE__ */He("span",{children:["$",l]})]})]}),
770
770
  /* @__PURE__ */He(k,{block:!0,className:"mt-4",children:["Pay $",l]})]}),
771
- /* @__PURE__ */qe(kl,{tone:"success",title:"Promo applied",children:"Free returns within 30 days."})]})]})]})})}var kc=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],$c=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know…",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported…",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by…",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th…",time:"Yest"}];function Mc(){const[e,r]=Ae(1),n=$c.find(t=>t.id===e)??$c[0];/* @__PURE__ */
771
+ /* @__PURE__ */qe(kl,{tone:"success",title:"Promo applied",children:"Free returns within 30 days."})]})]})]})})}var $c=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],Mc=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know…",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported…",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by…",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th…",time:"Yest"}];function Cc(){const[e,r]=Ae(1),n=Mc.find(t=>t.id===e)??Mc[0];/* @__PURE__ */
772
772
  return qe("div",{className:"h-full",children:/* @__PURE__ */qe(t,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */He("div",{className:"flex h-full flex-col p-2",children:[
773
- /* @__PURE__ */qe(k,{block:!0,className:"mb-2",children:"Compose"}),kc.map((e,t)=>/* @__PURE__ */He("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
773
+ /* @__PURE__ */qe(k,{block:!0,className:"mb-2",children:"Compose"}),$c.map((e,t)=>/* @__PURE__ */He("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
774
774
  /* @__PURE__ */qe("span",{children:e.label}),null!=e.count&&/* @__PURE__ */qe("span",{className:"text-xs text-gray-400",children:e.count})]},e.id))]}),children:/* @__PURE__ */He("div",{className:"flex h-full",children:[
775
- /* @__PURE__ */qe("div",{className:"w-72 shrink-0 overflow-auto border-r border-gray-200",children:$c.map(t=>/* @__PURE__ */He("button",{onClick:()=>r(t.id),className:"block w-full border-b border-gray-100 px-4 py-3 text-left hover:bg-gray-50 "+(t.id===e?"bg-blue-50/50":""),children:[
775
+ /* @__PURE__ */qe("div",{className:"w-72 shrink-0 overflow-auto border-r border-gray-200",children:Mc.map(t=>/* @__PURE__ */He("button",{onClick:()=>r(t.id),className:"block w-full border-b border-gray-100 px-4 py-3 text-left hover:bg-gray-50 "+(t.id===e?"bg-blue-50/50":""),children:[
776
776
  /* @__PURE__ */He("div",{className:"flex items-center justify-between gap-2",children:[
777
777
  /* @__PURE__ */qe("span",{className:"truncate text-sm "+(t.unread?"font-semibold text-gray-900":"text-gray-700"),children:t.from}),
778
778
  /* @__PURE__ */qe("span",{className:"shrink-0 text-2xs text-gray-400",children:t.time})]}),
@@ -793,8 +793,8 @@ return qe("div",{className:"h-full",children:/* @__PURE__ */qe(t,{side:"left",de
793
793
  /* @__PURE__ */qe("p",{children:"Hi,"}),
794
794
  /* @__PURE__ */He("p",{children:[n.preview," The full details are attached — happy to walk through anything on a quick call."]}),
795
795
  /* @__PURE__ */He("p",{children:["Best,",
796
- /* @__PURE__ */qe("br",{}),n.from]})]})]})]})})})}var Cc=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],Lc=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function Sc(){const[e,r]=Ae(1),n=Cc.find(t=>t.id===e)??Cc[0];/* @__PURE__ */
797
- return qe("div",{className:"h-full",children:/* @__PURE__ */qe(t,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */qe("div",{className:"h-full overflow-auto",children:Cc.map(t=>/* @__PURE__ */He("button",{onClick:()=>r(t.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(t.id===e?"bg-blue-50/50":""),children:[
796
+ /* @__PURE__ */qe("br",{}),n.from]})]})]})]})})})}var Lc=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],Sc=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function Dc(){const[e,r]=Ae(1),n=Lc.find(t=>t.id===e)??Lc[0];/* @__PURE__ */
797
+ return qe("div",{className:"h-full",children:/* @__PURE__ */qe(t,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */qe("div",{className:"h-full overflow-auto",children:Lc.map(t=>/* @__PURE__ */He("button",{onClick:()=>r(t.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(t.id===e?"bg-blue-50/50":""),children:[
798
798
  /* @__PURE__ */qe(xl,{name:t.name,status:t.status}),
799
799
  /* @__PURE__ */He("div",{className:"min-w-0 flex-1",children:[
800
800
  /* @__PURE__ */He("div",{className:"flex items-center justify-between gap-2",children:[
@@ -806,11 +806,11 @@ return qe("div",{className:"h-full",children:/* @__PURE__ */qe(t,{side:"left",de
806
806
  /* @__PURE__ */He("div",{children:[
807
807
  /* @__PURE__ */qe("div",{className:"text-sm font-medium text-gray-900",children:n.name}),
808
808
  /* @__PURE__ */qe("div",{className:"text-xs text-gray-400 capitalize",children:n.status})]})]}),
809
- /* @__PURE__ */qe("div",{className:"flex flex-1 flex-col gap-2 overflow-auto bg-gray-50 p-4",children:Lc.map((e,t)=>/* @__PURE__ */qe("div",{className:"flex "+(e.mine?"justify-end":"justify-start"),children:/* @__PURE__ */qe("div",{style:{maxWidth:"75%"},className:"rounded-2xl px-3 py-2 text-sm "+(e.mine?"bg-blue-600 text-white":"bg-white text-gray-800 shadow-sm"),children:e.text})},t))}),
809
+ /* @__PURE__ */qe("div",{className:"flex flex-1 flex-col gap-2 overflow-auto bg-gray-50 p-4",children:Sc.map((e,t)=>/* @__PURE__ */qe("div",{className:"flex "+(e.mine?"justify-end":"justify-start"),children:/* @__PURE__ */qe("div",{style:{maxWidth:"75%"},className:"rounded-2xl px-3 py-2 text-sm "+(e.mine?"bg-blue-600 text-white":"bg-white text-gray-800 shadow-sm"),children:e.text})},t))}),
810
810
  /* @__PURE__ */He("form",{className:"flex items-center gap-2 border-t border-gray-200 p-3",onSubmit:e=>e.preventDefault(),children:[
811
811
  /* @__PURE__ */qe("div",{className:"flex-1",children:/* @__PURE__ */qe(Ge,{placeholder:"Type a message…"})}),
812
- /* @__PURE__ */qe(k,{type:"submit",children:"Send"})]})]})})})}var Dc={featured:"success",new:"active",draft:"draft"},Pc=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,t)=>({id:t,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][t],tag:["featured","new","draft"][t%3],bg:e}));function Ac(){const[e,t]=Ae("all"),r="all"===e?Pc:Pc.filter(t=>t.tag===e);/* @__PURE__ */
813
- return qe(fa,{groups:Dc,children:/* @__PURE__ */qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("div",{className:"mx-auto max-w-5xl space-y-4",children:[
812
+ /* @__PURE__ */qe(k,{type:"submit",children:"Send"})]})]})})})}var Pc={featured:"success",new:"active",draft:"draft"},Ac=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,t)=>({id:t,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][t],tag:["featured","new","draft"][t%3],bg:e}));function jc(){const[e,t]=Ae("all"),r="all"===e?Ac:Ac.filter(t=>t.tag===e);/* @__PURE__ */
813
+ return qe(fa,{groups:Pc,children:/* @__PURE__ */qe("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("div",{className:"mx-auto max-w-5xl space-y-4",children:[
814
814
  /* @__PURE__ */He("div",{className:"flex items-center justify-between gap-4",children:[
815
815
  /* @__PURE__ */qe("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
816
816
  /* @__PURE__ */qe(k,{size:"sm",children:"Upload"})]}),
@@ -819,7 +819,7 @@ return qe(fa,{groups:Dc,children:/* @__PURE__ */qe("div",{className:"h-full over
819
819
  /* @__PURE__ */qe("div",{className:"relative h-28",style:{background:e.bg},children:/* @__PURE__ */qe("span",{className:"absolute right-2 top-2",children:/* @__PURE__ */qe(xa,{status:e.tag})})}),
820
820
  /* @__PURE__ */He("div",{className:"flex items-center justify-between gap-2 p-3",children:[
821
821
  /* @__PURE__ */qe("span",{className:"truncate text-sm font-medium text-gray-900",children:e.title}),
822
- /* @__PURE__ */qe("span",{className:"text-xs text-gray-400",children:"2.4 MB"})]})]},e.id))})]})})})}var jc={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function zc({mode:e="login"}){const[t,r]=Ae(!0),n=jc[e];/* @__PURE__ */
822
+ /* @__PURE__ */qe("span",{className:"text-xs text-gray-400",children:"2.4 MB"})]})]},e.id))})]})})})}var zc={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function Fc({mode:e="login"}){const[t,r]=Ae(!0),n=zc[e];/* @__PURE__ */
823
823
  return qe("div",{className:"flex h-full items-center justify-center overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */He("div",{className:"w-full max-w-sm",children:[
824
824
  /* @__PURE__ */He("div",{className:"mb-6 text-center",children:[
825
825
  /* @__PURE__ */qe("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-blue-600 text-sm font-bold text-white",children:"A"}),
@@ -832,193 +832,193 @@ return qe("div",{className:"flex h-full items-center justify-center overflow-aut
832
832
  /* @__PURE__ */qe(k,{type:"submit",block:!0,children:n.cta})]})}),
833
833
  /* @__PURE__ */qe("p",{className:"mt-4 text-center text-sm text-gray-500",children:/* @__PURE__ */He(Ue,"register"===e?{children:["Already have an account? ",
834
834
  /* @__PURE__ */qe("a",{href:"#",className:"text-blue-600 hover:underline",children:"Sign in"})]}:{children:["New here? ",
835
- /* @__PURE__ */qe("a",{href:"#",className:"text-blue-600 hover:underline",children:"Create an account"})]})})]})})}var Fc={403:e=>({title:e.forbidden,body:e.forbiddenBody}),404:e=>({title:e.notFound,body:e.notFoundBody}),500:e=>({title:e.serverError,body:e.serverErrorBody})};function Ec({code:e=404,actions:t}){const r=Fc[e](se().errors);/* @__PURE__ */
835
+ /* @__PURE__ */qe("a",{href:"#",className:"text-blue-600 hover:underline",children:"Create an account"})]})})]})})}var Ec={403:e=>({title:e.forbidden,body:e.forbiddenBody}),404:e=>({title:e.notFound,body:e.notFoundBody}),500:e=>({title:e.serverError,body:e.serverErrorBody})};function Bc({code:e=404,actions:t}){const r=Ec[e](se().errors);/* @__PURE__ */
836
836
  return He("div",{className:"flex h-full flex-col items-center justify-center bg-gray-50 p-6 text-center",children:[
837
837
  /* @__PURE__ */qe("div",{className:"text-7xl font-bold tracking-tight text-gray-400",children:e}),
838
838
  /* @__PURE__ */qe("h1",{className:"mt-2 text-xl font-semibold text-gray-900",children:r.title}),
839
- /* @__PURE__ */qe("p",{className:"mt-1 max-w-sm text-sm text-gray-500",children:r.body}),t&&/* @__PURE__ */qe("div",{className:"mt-6 flex items-center gap-2",children:t})]})}function Bc({pick:e}){/* @__PURE__ */
840
- return qe(Ue,{children:e(se().errors)})}var Tc=class extends We{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t),ne(e),this.props.onError?.(e,t)}componentDidUpdate(e){if(!this.state.error)return;const t=e.resetKeys??[],r=this.props.resetKeys??[];(t.length!==r.length||t.some((e,t)=>!Object.is(e,r[t])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
839
+ /* @__PURE__ */qe("p",{className:"mt-1 max-w-sm text-sm text-gray-500",children:r.body}),t&&/* @__PURE__ */qe("div",{className:"mt-6 flex items-center gap-2",children:t})]})}function Tc({pick:e}){/* @__PURE__ */
840
+ return qe(Ue,{children:e(se().errors)})}var Ic=class extends We{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t),ne(e),this.props.onError?.(e,t)}componentDidUpdate(e){if(!this.state.error)return;const t=e.resetKeys??[],r=this.props.resetKeys??[];(t.length!==r.length||t.some((e,t)=>!Object.is(e,r[t])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
841
841
  /* @__PURE__ */He("div",{className:"flex h-full flex-col",children:[
842
- /* @__PURE__ */qe("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */qe(Ec,{code:500,actions:/* @__PURE__ */He(Ue,{children:[
843
- /* @__PURE__ */qe(k,{onClick:this.reset,children:/* @__PURE__ */qe(Bc,{pick:e=>e.retry})}),this.props.actions]})})}),this.props.showDetails&&/* @__PURE__ */He("details",{className:"mx-auto w-full max-w-2xl shrink-0 px-6 pb-6",children:[
844
- /* @__PURE__ */qe("summary",{className:"cursor-pointer text-sm font-medium text-gray-600",children:/* @__PURE__ */qe(Bc,{pick:e=>e.details})}),
845
- /* @__PURE__ */qe("pre",{className:"mt-2 overflow-auto rounded-md bg-gray-100 p-3 text-xs text-gray-700",children:e.stack??e.message})]})]}):this.props.children}};function Ic(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}function Oc(e){const t=Ic();return t?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):()=>{}}function Rc(){return Ic()?.matches??!1}function Wc(){return!1}function Kc(e){const t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,n=parseInt(e.slice(5,7),16)/255,a=Math.max(t,r,n),l=Math.min(t,r,n);let i=0,o=0;const s=(a+l)/2;if(a!==l){const e=a-l;o=s>.5?e/(2-a-l):e/(a+l),i=a===t?((r-n)/e+(r<n?6:0))/6:a===r?((n-t)/e+2)/6:((t-r)/e+4)/6}return[360*i,100*o,100*s]}function _c(e,t,r){r/=100;const n=(t/=100)*Math.min(r,1-r),a=t=>{const a=(t+e/30)%12;return r-n*Math.max(Math.min(a-3,9-a,1),-1)},l=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${l(a(0))}${l(a(8))}${l(a(4))}`}function qc(e){const t=e||"system";return"system"===t?Rc()?"dark":"light":t}function Hc(e){const t=document.documentElement;if(e&&/^#[0-9a-fA-F]{6}$/.test(e)){const[r,n,a]=Kc(e);t.setAttribute("data-custom-accent","true"),t.style.setProperty("--accent-600",e),t.style.setProperty("--accent-700",_c(r,n,Math.max(a-10,5))),t.style.setProperty("--accent-500",_c(r,n,Math.min(a+10,95))),t.style.setProperty("--accent-400",_c(r,n,Math.min(a+20,95))),t.style.setProperty("--accent-300",_c(r,Math.min(n+10,100),Math.min(a+30,92))),t.style.setProperty("--accent-200",_c(r,Math.min(n+15,100),Math.min(a+38,94))),t.style.setProperty("--accent-100",_c(r,Math.min(n+20,100),Math.min(a+42,96))),t.style.setProperty("--accent-50",_c(r,Math.min(n+20,100),Math.min(a+46,98)))}else t.removeAttribute("data-custom-accent"),["--accent-600","--accent-700","--accent-500","--accent-400","--accent-300","--accent-200","--accent-100","--accent-50"].forEach(e=>t.style.removeProperty(e))}function Uc(e,t,r,n,a){const l=document.documentElement;if(e){const e=e=>`${parseInt(e.slice(1,3),16)} ${parseInt(e.slice(3,5),16)} ${parseInt(e.slice(5,7),16)}`;if(t&&l.style.setProperty("--custom-bg-color",t),r&&(l.style.setProperty("--window-header-rgb",e(r)),l.style.setProperty("--window-footer-rgb",e(r))),n&&l.style.setProperty("--window-content-rgb",e(n)),a){l.style.setProperty("--custom-button-color",a);const[e,t,r]=Kc(a);l.style.setProperty("--custom-button-hover",_c(e,t,Math.max(r-10,5)))}}else["--custom-bg-color","--custom-button-color","--custom-button-hover"].forEach(e=>l.style.removeProperty(e))}var Vc=["square","soft","round"];function Yc(e){return"square"===e||"round"===e?e:"soft"}function Gc(e){const t=Yc(e);"soft"===t?document.documentElement.removeAttribute("data-corners"):document.documentElement.setAttribute("data-corners",t)}function Xc(e){const t="string"==typeof e&&e?e:null;Le(t),t?document.documentElement.setAttribute("data-icon-set",t):document.documentElement.removeAttribute("data-icon-set")}function Zc(e){"corners"in e&&Gc(e.corners),"icon_set"in e&&Xc(e.icon_set),document.documentElement.setAttribute("data-theme",qc(e.theme)),Hc(e.accent_color??null),Uc(e.accent_color??null,e.custom_bg_color??null,e.custom_title_color??null,e.custom_window_color??null,e.custom_button_color??null)}function Jc(){const{prefs:e}=f(),t=Ke(Oc,Rc,Wc),r=e.theme||"system",n=e.accent_color||null,a=e.custom_bg_color||null,l=e.custom_title_color||null,i=e.custom_window_color||null,o=e.custom_button_color||null,s=Yc(e.corners),c="string"==typeof e.icon_set&&e.icon_set?e.icon_set:null,d="system"===r?t?"dark":"light":r;return Fe(()=>(document.documentElement.setAttribute("data-theme",d),()=>document.documentElement.removeAttribute("data-theme")),[d]),Fe(()=>(Gc(s),()=>document.documentElement.removeAttribute("data-corners")),[s]),Fe(()=>(Xc(c),()=>Xc(null)),[c]),Fe(()=>{Hc(n)},[n]),Fe(()=>{Uc(n,a,l,i,o)},[n,a,l,i,o]),{theme:r,resolved:d,corners:s,iconSet:c}}function Qc(e){const t=Math.max(0,...e.map(e=>[...e].reduce((e,t)=>e+((t.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(t+3.5))/10}function ed({size:e="sm",className:t=""}){const{language:r,languages:n,setLanguage:a}=h(),l=se().language;return n.length<2?null:/* @__PURE__ */He("span",{className:`inline-flex items-center gap-2 text-gray-500 ${t}`.trim(),children:[
842
+ /* @__PURE__ */qe("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */qe(Bc,{code:500,actions:/* @__PURE__ */He(Ue,{children:[
843
+ /* @__PURE__ */qe(k,{onClick:this.reset,children:/* @__PURE__ */qe(Tc,{pick:e=>e.retry})}),this.props.actions]})})}),this.props.showDetails&&/* @__PURE__ */He("details",{className:"mx-auto w-full max-w-2xl shrink-0 px-6 pb-6",children:[
844
+ /* @__PURE__ */qe("summary",{className:"cursor-pointer text-sm font-medium text-gray-600",children:/* @__PURE__ */qe(Tc,{pick:e=>e.details})}),
845
+ /* @__PURE__ */qe("pre",{className:"mt-2 overflow-auto rounded-md bg-gray-100 p-3 text-xs text-gray-700",children:e.stack??e.message})]})]}):this.props.children}};function Oc(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}function Rc(e){const t=Oc();return t?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):()=>{}}function Wc(){return Oc()?.matches??!1}function Kc(){return!1}function _c(e){const t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,n=parseInt(e.slice(5,7),16)/255,a=Math.max(t,r,n),l=Math.min(t,r,n);let i=0,o=0;const s=(a+l)/2;if(a!==l){const e=a-l;o=s>.5?e/(2-a-l):e/(a+l),i=a===t?((r-n)/e+(r<n?6:0))/6:a===r?((n-t)/e+2)/6:((t-r)/e+4)/6}return[360*i,100*o,100*s]}function qc(e,t,r){r/=100;const n=(t/=100)*Math.min(r,1-r),a=t=>{const a=(t+e/30)%12;return r-n*Math.max(Math.min(a-3,9-a,1),-1)},l=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${l(a(0))}${l(a(8))}${l(a(4))}`}function Hc(e){const t=e||"system";return"system"===t?Wc()?"dark":"light":t}function Uc(e){const t=document.documentElement;if(e&&/^#[0-9a-fA-F]{6}$/.test(e)){const[r,n,a]=_c(e);t.setAttribute("data-custom-accent","true"),t.style.setProperty("--accent-600",e),t.style.setProperty("--accent-700",qc(r,n,Math.max(a-10,5))),t.style.setProperty("--accent-500",qc(r,n,Math.min(a+10,95))),t.style.setProperty("--accent-400",qc(r,n,Math.min(a+20,95))),t.style.setProperty("--accent-300",qc(r,Math.min(n+10,100),Math.min(a+30,92))),t.style.setProperty("--accent-200",qc(r,Math.min(n+15,100),Math.min(a+38,94))),t.style.setProperty("--accent-100",qc(r,Math.min(n+20,100),Math.min(a+42,96))),t.style.setProperty("--accent-50",qc(r,Math.min(n+20,100),Math.min(a+46,98)))}else t.removeAttribute("data-custom-accent"),["--accent-600","--accent-700","--accent-500","--accent-400","--accent-300","--accent-200","--accent-100","--accent-50"].forEach(e=>t.style.removeProperty(e))}function Vc(e,t,r,n,a){const l=document.documentElement;if(e){const e=e=>`${parseInt(e.slice(1,3),16)} ${parseInt(e.slice(3,5),16)} ${parseInt(e.slice(5,7),16)}`;if(t&&l.style.setProperty("--custom-bg-color",t),r&&(l.style.setProperty("--window-header-rgb",e(r)),l.style.setProperty("--window-footer-rgb",e(r))),n&&l.style.setProperty("--window-content-rgb",e(n)),a){l.style.setProperty("--custom-button-color",a);const[e,t,r]=_c(a);l.style.setProperty("--custom-button-hover",qc(e,t,Math.max(r-10,5)))}}else["--custom-bg-color","--custom-button-color","--custom-button-hover"].forEach(e=>l.style.removeProperty(e))}var Yc=["square","soft","round"];function Gc(e){return"square"===e||"round"===e?e:"soft"}function Xc(e){const t=Gc(e);"soft"===t?document.documentElement.removeAttribute("data-corners"):document.documentElement.setAttribute("data-corners",t)}function Zc(e){const t="string"==typeof e&&e?e:null;Le(t),t?document.documentElement.setAttribute("data-icon-set",t):document.documentElement.removeAttribute("data-icon-set")}function Jc(e){"corners"in e&&Xc(e.corners),"icon_set"in e&&Zc(e.icon_set),document.documentElement.setAttribute("data-theme",Hc(e.theme)),Uc(e.accent_color??null),Vc(e.accent_color??null,e.custom_bg_color??null,e.custom_title_color??null,e.custom_window_color??null,e.custom_button_color??null)}function Qc(){const{prefs:e}=f(),t=Ke(Rc,Wc,Kc),r=e.theme||"system",n=e.accent_color||null,a=e.custom_bg_color||null,l=e.custom_title_color||null,i=e.custom_window_color||null,o=e.custom_button_color||null,s=Gc(e.corners),c="string"==typeof e.icon_set&&e.icon_set?e.icon_set:null,d="system"===r?t?"dark":"light":r;return Fe(()=>(document.documentElement.setAttribute("data-theme",d),()=>document.documentElement.removeAttribute("data-theme")),[d]),Fe(()=>(Xc(s),()=>document.documentElement.removeAttribute("data-corners")),[s]),Fe(()=>(Zc(c),()=>Zc(null)),[c]),Fe(()=>{Uc(n)},[n]),Fe(()=>{Vc(n,a,l,i,o)},[n,a,l,i,o]),{theme:r,resolved:d,corners:s,iconSet:c}}function ed(e){const t=Math.max(0,...e.map(e=>[...e].reduce((e,t)=>e+((t.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(t+3.5))/10}function td({size:e="sm",className:t=""}){const{language:r,languages:n,setLanguage:a}=h(),l=se().language;return n.length<2?null:/* @__PURE__ */He("span",{className:`inline-flex items-center gap-2 text-gray-500 ${t}`.trim(),children:[
846
846
  /* @__PURE__ */qe(Ce,{name:"globe","aria-hidden":!0,className:"h-4 w-4 shrink-0"}),
847
- /* @__PURE__ */qe("span",{className:"block",style:{width:`${Qc(n.map(e=>e.name))}em`},children:/* @__PURE__ */qe(ut,{size:e,touchSize:e,"aria-label":l.title,value:r,onChange:e=>{a(e)},options:n.map(({tag:e,name:t})=>({value:e,label:t,lang:e}))})})]})}function td({description:e,className:t=""}){const{language:r,languages:n,setLanguage:a}=h(),l=se().language;return n.length<2?null:/* @__PURE__ */He("div",{className:`space-y-4 ${t}`.trim(),children:[
847
+ /* @__PURE__ */qe("span",{className:"block",style:{width:`${ed(n.map(e=>e.name))}em`},children:/* @__PURE__ */qe(ut,{size:e,touchSize:e,"aria-label":l.title,value:r,onChange:e=>{a(e)},options:n.map(({tag:e,name:t})=>({value:e,label:t,lang:e}))})})]})}function rd({description:e,className:t=""}){const{language:r,languages:n,setLanguage:a}=h(),l=se().language;return n.length<2?null:/* @__PURE__ */He("div",{className:`space-y-4 ${t}`.trim(),children:[
848
848
  /* @__PURE__ */He("div",{children:[
849
849
  /* @__PURE__ */qe("h3",{className:"text-sm font-semibold text-gray-900",children:l.title}),
850
850
  /* @__PURE__ */qe("p",{className:"mt-0.5 text-sm text-gray-500",children:e??l.description})]}),
851
- /* @__PURE__ */qe(xt,{name:"shell-language",value:r,onChange:e=>{a(e)},hint:l.reloadNote,options:n.map(({tag:e,name:t})=>({value:e,label:/* @__PURE__ */qe("span",{lang:e,children:t})}))})]})}function rd({label:e="Not available"}){/* @__PURE__ */
852
- return qe("span",{className:"text-gray-400",role:"img","aria-label":e,children:Ne})}function nd({value:e,precise:t,locale:r,className:n}){const a=oe(),l=ke(e);if(!l)/* @__PURE__ */return qe(rd,{});const i="string"==typeof e?e:l.toISOString();/* @__PURE__ */
853
- return qe("time",{dateTime:i,title:Me(i,{locale:r??a}),className:n,children:$e(l,{precise:t,locale:r??a})})}function ad(e,t=300){const[r,n]=Ae(e);return Fe(()=>{const r=setTimeout(()=>n(e),t);return()=>clearTimeout(r)},[e,t]),r}function ld(e,t){Fe(()=>{const r=r=>{e.current&&!e.current.contains(r.target)&&t()};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[e,t])}function id(e,t,r){if(0===e.length||t<=0||r<=0)return 1/0;const n=Math.max(...e),a=Math.min(...e),l=t*t,i=r*r;return Math.max(i*n/l,l/(i*a))}function od(e,t,r,n){const a=n?r.height:r.width,l=a>0?t/a:0;let i=0;return{tiles:e.map(e=>{const o=t>0?e.value/t*a:0,s=n?{...e,x:r.x,y:r.y+i,width:l,height:o}:{...e,x:r.x+i,y:r.y,width:o,height:l};return i+=o,s}),rest:n?{x:r.x+l,y:r.y,width:r.width-l,height:r.height}:{x:r.x,y:r.y+l,width:r.width,height:r.height-l}}}function sd(e,t,r){const n=e.filter(e=>e.value>0).sort((e,t)=>t.value-e.value);if(0===n.length||t<=0||r<=0)return[];const a=n.reduce((e,t)=>e+t.value,0),l=t*r,i=[];let o={x:0,y:0,width:t,height:r},s=[],c=0,d=[...n.map(e=>({...e,value:e.value/a*l}))];for(;d.length>0;){const e=d[0],t=Math.min(o.width,o.height),r=o.width>=o.height,n=id(s.map(e=>e.value),c,t),a=id([...s.map(e=>e.value),e.value],c+e.value,t);if(0===s.length||a<=n)s.push(e),c+=e.value,d=d.slice(1);else{const e=od(s,c,o,r);i.push(...e.tiles),o=e.rest,s=[],c=0}}s.length>0&&i.push(...od(s,c,o,o.width>=o.height).tiles);const u=new Map(e.map(e=>[e.key,e.value]));return i.map(e=>({...e,value:u.get(e.key)??e.value}))}function cd({rows:e,max:t,formatValue:r,emphasisKey:n,highlight:a="none",emphasisTone:l,barHeight:i=12,rowGap:o=30,animate:s=!0,labelFont:c="sans",className:d,emptyLabel:u}){const h=se().charts,m=oe(),p=r??(e=>he(e,m)),g=u??h.nothingToRank;if(0===e.length)/* @__PURE__ */
854
- return qe("p",{className:`text-sm text-gray-500 ${d??""}`,children:g});const f=Gs(e.map(e=>e.value),a),b=n??(null===f?void 0:e[f]?.key),x=t??Math.max(...e.map(e=>e.value).filter(Number.isFinite),0),y=Ms(0);/* @__PURE__ */
855
- return qe("ol",{className:`m-0 list-none p-0 ${d??""}`,style:{display:"grid",rowGap:`${Math.max(4,o-i)}px`},children:e.map((e,t)=>{const r=e.key===b,n=r?l?ks[l]:Ms(1):b?$s.muted:y,a=Number.isFinite(e.value)?e.value:null,o=null!==a&&x>0?Math.max(0,Math.min(1,a/x)):0;/* @__PURE__ */
851
+ /* @__PURE__ */qe(xt,{name:"shell-language",value:r,onChange:e=>{a(e)},hint:l.reloadNote,options:n.map(({tag:e,name:t})=>({value:e,label:/* @__PURE__ */qe("span",{lang:e,children:t})}))})]})}function nd({label:e="Not available"}){/* @__PURE__ */
852
+ return qe("span",{className:"text-gray-400",role:"img","aria-label":e,children:Ne})}function ad({value:e,precise:t,locale:r,className:n}){const a=oe(),l=ke(e);if(!l)/* @__PURE__ */return qe(nd,{});const i="string"==typeof e?e:l.toISOString();/* @__PURE__ */
853
+ return qe("time",{dateTime:i,title:Me(i,{locale:r??a}),className:n,children:$e(l,{precise:t,locale:r??a})})}function ld(e,t=300){const[r,n]=Ae(e);return Fe(()=>{const r=setTimeout(()=>n(e),t);return()=>clearTimeout(r)},[e,t]),r}function id(e,t){Fe(()=>{const r=r=>{e.current&&!e.current.contains(r.target)&&t()};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[e,t])}function od(e,t,r){if(0===e.length||t<=0||r<=0)return 1/0;const n=Math.max(...e),a=Math.min(...e),l=t*t,i=r*r;return Math.max(i*n/l,l/(i*a))}function sd(e,t,r,n){const a=n?r.height:r.width,l=a>0?t/a:0;let i=0;return{tiles:e.map(e=>{const o=t>0?e.value/t*a:0,s=n?{...e,x:r.x,y:r.y+i,width:l,height:o}:{...e,x:r.x+i,y:r.y,width:o,height:l};return i+=o,s}),rest:n?{x:r.x+l,y:r.y,width:r.width-l,height:r.height}:{x:r.x,y:r.y+l,width:r.width,height:r.height-l}}}function cd(e,t,r){const n=e.filter(e=>e.value>0).sort((e,t)=>t.value-e.value);if(0===n.length||t<=0||r<=0)return[];const a=n.reduce((e,t)=>e+t.value,0),l=t*r,i=[];let o={x:0,y:0,width:t,height:r},s=[],c=0,d=[...n.map(e=>({...e,value:e.value/a*l}))];for(;d.length>0;){const e=d[0],t=Math.min(o.width,o.height),r=o.width>=o.height,n=od(s.map(e=>e.value),c,t),a=od([...s.map(e=>e.value),e.value],c+e.value,t);if(0===s.length||a<=n)s.push(e),c+=e.value,d=d.slice(1);else{const e=sd(s,c,o,r);i.push(...e.tiles),o=e.rest,s=[],c=0}}s.length>0&&i.push(...sd(s,c,o,o.width>=o.height).tiles);const u=new Map(e.map(e=>[e.key,e.value]));return i.map(e=>({...e,value:u.get(e.key)??e.value}))}function dd({rows:e,max:t,formatValue:r,emphasisKey:n,highlight:a="none",emphasisTone:l,barHeight:i=12,rowGap:o=30,animate:s=!0,labelFont:c="sans",className:d,emptyLabel:u}){const h=se().charts,m=oe(),p=r??(e=>he(e,m)),g=u??h.nothingToRank;if(0===e.length)/* @__PURE__ */
854
+ return qe("p",{className:`text-sm text-gray-500 ${d??""}`,children:g});const f=Xs(e.map(e=>e.value),a),b=n??(null===f?void 0:e[f]?.key),x=t??Math.max(...e.map(e=>e.value).filter(Number.isFinite),0),y=Cs(0);/* @__PURE__ */
855
+ return qe("ol",{className:`m-0 list-none p-0 ${d??""}`,style:{display:"grid",rowGap:`${Math.max(4,o-i)}px`},children:e.map((e,t)=>{const r=e.key===b,n=r?l?$s[l]:Cs(1):b?Ms.muted:y,a=Number.isFinite(e.value)?e.value:null,o=null!==a&&x>0?Math.max(0,Math.min(1,a/x)):0;/* @__PURE__ */
856
856
  return He("li",{className:"grid gap-1",children:[
857
857
  /* @__PURE__ */He("div",{className:"flex items-baseline justify-between gap-3",children:[
858
858
  /* @__PURE__ */He("span",{className:`truncate ${"mono"===c?"font-mono ":""}text-xs text-gray-600 ${r?"font-semibold":""}`,title:e.label,children:[e.label,r&&/* @__PURE__ */qe("span",{className:"sr-only",children:` ${h.emphasised}`})]}),
859
859
  /* @__PURE__ */qe("span",{className:"shrink-0 text-xs font-semibold tabular-nums text-gray-700",style:r?{color:n}:void 0,children:null===a?"—":p(a)})]}),
860
- /* @__PURE__ */qe("div",{className:"w-full rounded-sm bg-gray-200",style:{height:i},children:/* @__PURE__ */qe("div",{className:`rounded-sm ${s?si.grow:""}`,style:{width:`${(100*o).toFixed(2)}%`,height:i,backgroundColor:n,minWidth:o>0?2:0,...s?ci(t):{}}})})]},e.key)})})}var dd=e=>Math.max(0,Math.min(1,e));function ud({value:e,segments:t,objective:r,label:n,detail:a,formatValue:l,tone:i,className:o,unavailableLabel:s}){const c=se().charts,d=oe(),u=l??(e=>pe(100*e,1,d)),h=s??c.notEnough;if(null==e||!Number.isFinite(e))/* @__PURE__ */
860
+ /* @__PURE__ */qe("div",{className:"w-full rounded-sm bg-gray-200",style:{height:i},children:/* @__PURE__ */qe("div",{className:`rounded-sm ${s?si.grow:""}`,style:{width:`${(100*o).toFixed(2)}%`,height:i,backgroundColor:n,minWidth:o>0?2:0,...s?ci(t):{}}})})]},e.key)})})}var ud=e=>Math.max(0,Math.min(1,e));function hd({value:e,segments:t,objective:r,label:n,detail:a,formatValue:l,tone:i,className:o,unavailableLabel:s}){const c=se().charts,d=oe(),u=l??(e=>pe(100*e,1,d)),h=s??c.notEnough;if(null==e||!Number.isFinite(e))/* @__PURE__ */
861
861
  return He("div",{className:o,children:[n&&/* @__PURE__ */qe("p",{className:"text-sm font-medium text-gray-700",children:n}),
862
- /* @__PURE__ */qe("p",{className:"mt-1 text-sm text-gray-500",children:h})]});const m=dd(e),p=null==r||e>=r,g=i??(p?"good":"critical"),f=ks[g],b=[t?.length?t.map(e=>`${e.label} ${u(e.value)}`).join(" · "):"",a??"",null!=r?(p?c.objectiveMet:c.objectiveMissed)(u(r)):""].filter(Boolean).join(" · ");/* @__PURE__ */
862
+ /* @__PURE__ */qe("p",{className:"mt-1 text-sm text-gray-500",children:h})]});const m=ud(e),p=null==r||e>=r,g=i??(p?"good":"critical"),f=$s[g],b=[t?.length?t.map(e=>`${e.label} ${u(e.value)}`).join(" · "):"",a??"",null!=r?(p?c.objectiveMet:c.objectiveMissed)(u(r)):""].filter(Boolean).join(" · ");/* @__PURE__ */
863
863
  return He("div",{className:o,children:[
864
864
  /* @__PURE__ */He("div",{className:"mb-2 flex items-baseline justify-between gap-3",children:[
865
865
  /* @__PURE__ */qe("span",{className:"text-sm font-medium text-gray-700",children:n}),
866
866
  /* @__PURE__ */qe("span",{className:"text-sm font-semibold tabular-nums",style:{color:f},children:u(e)})]}),
867
867
  /* @__PURE__ */He("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*m).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":u(e),"aria-label":n,children:[
868
- /* @__PURE__ */qe("div",t?.length?{className:"flex h-full overflow-hidden rounded-full",children:t.map((e,r)=>/* @__PURE__ */qe("div",{className:"h-full shrink-0"+(r===t.length-1?" rounded-r-full":""),style:{width:`${(100*dd(e.value)).toFixed(2)}%`,backgroundColor:ks[e.tone??(0===r?g:"neutral")]}},`${e.label}-${r}`))}:{className:"h-full rounded-full",style:{width:`${(100*m).toFixed(2)}%`,backgroundColor:f}}),null!=r&&/* @__PURE__ */qe("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*dd(r)).toFixed(2)}%`,height:20,backgroundColor:$s.axis},"aria-hidden":"true"})]}),b&&/* @__PURE__ */qe("p",{className:"mt-2 text-xs text-gray-500",children:b})]})}var hd={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function md({label:e,value:t,unit:r,delta:n,deltaTone:a,trend:l,trendTone:i,footnote:o,className:s}){const c=se().charts,d=oe(),u=null==n?null:n>0?"up":n<0?"down":"flat",h=a?ks[a]:void 0,m=i?ks[i]:Cs(0);/* @__PURE__ */
868
+ /* @__PURE__ */qe("div",t?.length?{className:"flex h-full overflow-hidden rounded-full",children:t.map((e,r)=>/* @__PURE__ */qe("div",{className:"h-full shrink-0"+(r===t.length-1?" rounded-r-full":""),style:{width:`${(100*ud(e.value)).toFixed(2)}%`,backgroundColor:$s[e.tone??(0===r?g:"neutral")]}},`${e.label}-${r}`))}:{className:"h-full rounded-full",style:{width:`${(100*m).toFixed(2)}%`,backgroundColor:f}}),null!=r&&/* @__PURE__ */qe("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*ud(r)).toFixed(2)}%`,height:20,backgroundColor:Ms.axis},"aria-hidden":"true"})]}),b&&/* @__PURE__ */qe("p",{className:"mt-2 text-xs text-gray-500",children:b})]})}var md={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function pd({label:e,value:t,unit:r,delta:n,deltaTone:a,trend:l,trendTone:i,footnote:o,className:s}){const c=se().charts,d=oe(),u=null==n?null:n>0?"up":n<0?"down":"flat",h=a?$s[a]:void 0,m=i?$s[i]:Ls(0);/* @__PURE__ */
869
869
  return He("div",{className:`flex flex-col gap-0.5 rounded-lg border border-gray-200 bg-white p-4 ${s??""}`,children:[
870
870
  /* @__PURE__ */qe("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:e}),
871
871
  /* @__PURE__ */He("span",{className:"flex items-baseline gap-2",children:[
872
872
  /* @__PURE__ */qe("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:t}),r&&/* @__PURE__ */qe("span",{className:"text-sm font-medium text-gray-500",children:r})]}),u&&/* @__PURE__ */He("span",{className:"text-xs font-medium",style:h?{color:h}:void 0,children:[
873
- /* @__PURE__ */qe("span",{"aria-hidden":"true",children:hd[u].glyph})," ",he(Math.abs(n),d),
874
- /* @__PURE__ */He("span",{className:"sr-only",children:[" ",c[hd[u].word]]})]}),l&&l.length>1&&/* @__PURE__ */qe(vs,{data:l,height:26,stroke:m,strokeWidth:2,className:"mt-2 w-full"}),o&&/* @__PURE__ */qe("span",{className:"mt-1 text-xs text-gray-500",children:o})]})}function pd({shape:e,colour:t}){const r="shrink-0";switch(e){case"circle":/* @__PURE__ */
873
+ /* @__PURE__ */qe("span",{"aria-hidden":"true",children:md[u].glyph})," ",he(Math.abs(n),d),
874
+ /* @__PURE__ */He("span",{className:"sr-only",children:[" ",c[md[u].word]]})]}),l&&l.length>1&&/* @__PURE__ */qe(ws,{data:l,height:26,stroke:m,strokeWidth:2,className:"mt-2 w-full"}),o&&/* @__PURE__ */qe("span",{className:"mt-1 text-xs text-gray-500",children:o})]})}function gd({shape:e,colour:t}){const r="shrink-0";switch(e){case"circle":/* @__PURE__ */
875
875
  return qe("span",{className:`${r} h-2.5 w-2.5 rounded-full`,style:{backgroundColor:t}});case"circle-outline":/* @__PURE__ */
876
876
  return qe("span",{className:`${r} h-2.5 w-2.5 rounded-full border-2`,style:{borderColor:t}});case"rounded-square-outline":/* @__PURE__ */
877
877
  return qe("span",{className:`${r} h-2.5 w-2.5 rounded-sm border-2`,style:{borderColor:t}});case"square":/* @__PURE__ */
878
878
  return qe("span",{className:`${r} h-2.5 w-2.5`,style:{backgroundColor:t}});case"bar":/* @__PURE__ */
879
879
  return qe("span",{className:`${r} h-1 w-4 rounded-full`,style:{backgroundColor:t}});case"bar-vertical":/* @__PURE__ */
880
880
  return qe("span",{className:`${r} h-3.5 w-1 rounded-full`,style:{backgroundColor:t}});default:/* @__PURE__ */
881
- return qe("span",{className:`${r} h-2.5 w-2.5 rounded-sm`,style:{backgroundColor:t}})}}function gd({entries:e,interactive:t,fallbackSwatch:r,onClick:n}){const{highlighted:a,setHighlighted:l}=Vs();/* @__PURE__ */
881
+ return qe("span",{className:`${r} h-2.5 w-2.5 rounded-sm`,style:{backgroundColor:t}})}}function fd({entries:e,interactive:t,fallbackSwatch:r,onClick:n}){const{highlighted:a,setHighlighted:l}=Ys();/* @__PURE__ */
882
882
  return qe("ul",{className:"m-0 flex flex-wrap items-center gap-x-4 gap-y-1 p-0",children:e.map((e,i)=>{const o=t&&null!==a&&a!==e.key,s=/* @__PURE__ */He(Ue,{children:[
883
- /* @__PURE__ */qe(pd,{shape:e.swatch??r,colour:Cs(i,e.color,e.tone)}),e.label]});/* @__PURE__ */
884
- return qe("li",{className:"list-none",children:t||n?/* @__PURE__ */qe("button",{type:"button",onClick:n?()=>n(e.key):void 0,"aria-pressed":n?Boolean(e.pressed):void 0,onMouseEnter:t?()=>l(e.key):void 0,onMouseLeave:t?()=>l(null):void 0,onFocus:t?()=>l(e.key):void 0,onBlur:t?()=>l(null):void 0,className:"flex items-center gap-2 rounded text-xs text-gray-600 transition-opacity rosh-focus-outline "+(o?"opacity-40":""),children:s}):/* @__PURE__ */qe("span",{className:"flex items-center gap-2 text-xs text-gray-600",children:s})},e.key)})})}function fd({title:e,subtitle:t,legend:r,table:n,tableLabel:a,busy:l=!1,loading:i=!1,skeletonVariant:o="area",skeletonHeight:s,interactiveLegend:c=!0,legendSwatch:d="rounded-square",onLegendClick:u,actions:h,children:m,className:p}){const g=se().charts;/* @__PURE__ */
885
- return qe(Us,{children:/* @__PURE__ */He("section",{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-gray-200 bg-white p-5 ${p??""}`,"aria-busy":l||i||void 0,children:[
883
+ /* @__PURE__ */qe(gd,{shape:e.swatch??r,colour:Ls(i,e.color,e.tone)}),e.label]});/* @__PURE__ */
884
+ return qe("li",{className:"list-none",children:t||n?/* @__PURE__ */qe("button",{type:"button",onClick:n?()=>n(e.key):void 0,"aria-pressed":n?Boolean(e.pressed):void 0,onMouseEnter:t?()=>l(e.key):void 0,onMouseLeave:t?()=>l(null):void 0,onFocus:t?()=>l(e.key):void 0,onBlur:t?()=>l(null):void 0,className:"flex items-center gap-2 rounded text-xs text-gray-600 transition-opacity rosh-focus-outline "+(o?"opacity-40":""),children:s}):/* @__PURE__ */qe("span",{className:"flex items-center gap-2 text-xs text-gray-600",children:s})},e.key)})})}function bd({title:e,subtitle:t,legend:r,table:n,tableLabel:a,busy:l=!1,loading:i=!1,skeletonVariant:o="area",skeletonHeight:s,interactiveLegend:c=!0,legendSwatch:d="rounded-square",onLegendClick:u,actions:h,children:m,className:p}){const g=se().charts;/* @__PURE__ */
885
+ return qe(Vs,{children:/* @__PURE__ */He("section",{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-gray-200 bg-white p-5 ${p??""}`,"aria-busy":l||i||void 0,children:[
886
886
  /* @__PURE__ */He("header",{className:"flex items-start justify-between gap-4",children:[
887
887
  /* @__PURE__ */He("div",{className:"min-w-0",children:[
888
- /* @__PURE__ */qe("h3",{className:"text-base font-semibold text-gray-900",children:e}),t&&/* @__PURE__ */qe("p",{className:"mt-0.5 text-sm text-gray-500",children:t})]}),h&&/* @__PURE__ */qe("div",{className:"shrink-0",children:h})]}),i?/* @__PURE__ */qe(qs,{variant:o,height:s}):/* @__PURE__ */qe("div",{className:l?"opacity-60 transition-opacity":"transition-opacity",children:m}),!i&&r&&r.length>1&&/* @__PURE__ */qe(gd,{entries:r,interactive:c,fallbackSwatch:d,onClick:u}),!i&&n&&/* @__PURE__ */He("details",{className:"border-t border-gray-100 pt-3",children:[
888
+ /* @__PURE__ */qe("h3",{className:"text-base font-semibold text-gray-900",children:e}),t&&/* @__PURE__ */qe("p",{className:"mt-0.5 text-sm text-gray-500",children:t})]}),h&&/* @__PURE__ */qe("div",{className:"shrink-0",children:h})]}),i?/* @__PURE__ */qe(Hs,{variant:o,height:s}):/* @__PURE__ */qe("div",{className:l?"opacity-60 transition-opacity":"transition-opacity",children:m}),!i&&r&&r.length>1&&/* @__PURE__ */qe(fd,{entries:r,interactive:c,fallbackSwatch:d,onClick:u}),!i&&n&&/* @__PURE__ */He("details",{className:"border-t border-gray-100 pt-3",children:[
889
889
  /* @__PURE__ */qe("summary",{className:"cursor-pointer text-sm font-medium text-gray-600 rosh-focus-outline",children:a??g.showTable}),
890
- /* @__PURE__ */qe("div",{className:"mt-3 overflow-x-auto",style:{color:$s.label},children:n})]})]})})}function bd({cx:e,cy:t,color:r,variant:n="default",pulse:a=!1,title:l}){const i="border"===n?3:"colored-border"===n?1.5:0,o="border"===n?3:3.5;/* @__PURE__ */
891
- return He("g",{children:[a&&/* @__PURE__ */qe("circle",{className:"rosh-viz-ping",cx:e,cy:t,r:o,fill:r,fillOpacity:.45}),"border"===n&&/* @__PURE__ */qe("circle",{cx:e,cy:t,r:o+i,fill:$s.surface}),
892
- /* @__PURE__ */qe("circle",{cx:e,cy:t,r:o,fill:"colored-border"===n?$s.surface:r,stroke:"colored-border"===n?r:void 0,strokeWidth:"colored-border"===n?i:void 0,children:l&&/* @__PURE__ */qe("title",{children:l})})]})}function xd({labels:e,data:t,range:r,onRangeChange:n,height:a=46,width:l=720,color:i,className:o}){const s=se().charts,c=je(null),d=e.length-1,[u,h]=r,m=i??Cs(0),p=e=>0===d?0:e/d*l,g=e=>"number"==typeof e&&Number.isFinite(e),f=t.filter(g),b=Math.max(...f,1),x=e=>a-e/b*(a-6),y=[];e.forEach((e,r)=>{if(!g(t[r]))return;const n=y[y.length-1];n&&n.to===r-1?n.to=r:y.push({from:r,to:r})});const v=y.map(e=>{const r=[];for(let n=e.from;n<=e.to;n+=1)r.push(`${n===e.from?"M":"L"}${p(n).toFixed(2)},${x(t[n]).toFixed(2)}`);return`${r.join(" ")} L${p(e.to).toFixed(2)},${a} L${p(e.from).toFixed(2)},${a} Z`}).join(" "),w=(e,t)=>{const r=Math.max(0,Math.min(d,t));n("from"===e?[Math.min(r,h-1),h]:[u,Math.max(r,u+1)])},N=e=>t=>{const r=t.shiftKey?5:1,n="from"===e?u:h;"ArrowLeft"===t.key&&(t.preventDefault(),w(e,n-r)),"ArrowRight"===t.key&&(t.preventDefault(),w(e,n+r)),"Home"===t.key&&(t.preventDefault(),w(e,0)),"End"===t.key&&(t.preventDefault(),w(e,d))},k=je(null),$=e=>t=>{k.current=e,t.currentTarget.setPointerCapture(t.pointerId)},M=e=>t=>{k.current===e&&w(e,(e=>{const t=c.current?.getBoundingClientRect();if(!t||0===t.width)return u;const r=Math.max(0,Math.min(1,(e-t.left)/t.width));return Math.round(r*d)})(t.clientX))},C=e=>()=>{k.current===e&&(k.current=null)},L=t=>{const r="from"===t?u:h;/* @__PURE__ */
890
+ /* @__PURE__ */qe("div",{className:"mt-3 overflow-x-auto",style:{color:Ms.label},children:n})]})]})})}function xd({cx:e,cy:t,color:r,variant:n="default",pulse:a=!1,title:l}){const i="border"===n?3:"colored-border"===n?1.5:0,o="border"===n?3:3.5;/* @__PURE__ */
891
+ return He("g",{children:[a&&/* @__PURE__ */qe("circle",{className:"rosh-viz-ping",cx:e,cy:t,r:o,fill:r,fillOpacity:.45}),"border"===n&&/* @__PURE__ */qe("circle",{cx:e,cy:t,r:o+i,fill:Ms.surface}),
892
+ /* @__PURE__ */qe("circle",{cx:e,cy:t,r:o,fill:"colored-border"===n?Ms.surface:r,stroke:"colored-border"===n?r:void 0,strokeWidth:"colored-border"===n?i:void 0,children:l&&/* @__PURE__ */qe("title",{children:l})})]})}function yd({labels:e,data:t,range:r,onRangeChange:n,height:a=46,width:l=720,color:i,className:o}){const s=se().charts,c=je(null),d=e.length-1,[u,h]=r,m=i??Ls(0),p=e=>0===d?0:e/d*l,g=e=>"number"==typeof e&&Number.isFinite(e),f=t.filter(g),b=Math.max(...f,1),x=e=>a-e/b*(a-6),y=[];e.forEach((e,r)=>{if(!g(t[r]))return;const n=y[y.length-1];n&&n.to===r-1?n.to=r:y.push({from:r,to:r})});const v=y.map(e=>{const r=[];for(let n=e.from;n<=e.to;n+=1)r.push(`${n===e.from?"M":"L"}${p(n).toFixed(2)},${x(t[n]).toFixed(2)}`);return`${r.join(" ")} L${p(e.to).toFixed(2)},${a} L${p(e.from).toFixed(2)},${a} Z`}).join(" "),w=(e,t)=>{const r=Math.max(0,Math.min(d,t));n("from"===e?[Math.min(r,h-1),h]:[u,Math.max(r,u+1)])},N=e=>t=>{const r=t.shiftKey?5:1,n="from"===e?u:h;"ArrowLeft"===t.key&&(t.preventDefault(),w(e,n-r)),"ArrowRight"===t.key&&(t.preventDefault(),w(e,n+r)),"Home"===t.key&&(t.preventDefault(),w(e,0)),"End"===t.key&&(t.preventDefault(),w(e,d))},k=je(null),$=e=>t=>{k.current=e,t.currentTarget.setPointerCapture(t.pointerId)},M=e=>t=>{k.current===e&&w(e,(e=>{const t=c.current?.getBoundingClientRect();if(!t||0===t.width)return u;const r=Math.max(0,Math.min(1,(e-t.left)/t.width));return Math.round(r*d)})(t.clientX))},C=e=>()=>{k.current===e&&(k.current=null)},L=t=>{const r="from"===t?u:h;/* @__PURE__ */
893
893
  return qe("rect",{x:p(r)-4.5,y:0,width:9,height:a,rx:3,fill:m,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?s.windowStart:s.windowEnd,"aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":r,"aria-valuetext":e[r],style:{touchAction:"none"},onKeyDown:N(t),onPointerDown:$(t),onPointerMove:M(t),onPointerUp:C(t),onPointerCancel:C(t)},t)};/* @__PURE__ */
894
894
  return qe("div",{className:o,children:/* @__PURE__ */He("svg",{ref:c,width:"100%",height:a,viewBox:`0 0 ${l} ${a}`,role:"group","aria-label":s.window(e[u],e[h],e.length),children:[
895
- /* @__PURE__ */qe("path",{d:v,fill:$s.grid}),
896
- /* @__PURE__ */qe("rect",{x:0,y:0,width:p(u),height:a,fill:$s.surface,fillOpacity:.72}),
897
- /* @__PURE__ */qe("rect",{x:p(h),y:0,width:Math.max(0,l-p(h)),height:a,fill:$s.surface,fillOpacity:.72}),
898
- /* @__PURE__ */qe("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")]})})}var yd=12,vd=16,wd=26,Nd=52,kd=e=>"number"==typeof e&&Number.isFinite(e);function $d({series:e,labels:t,height:r=200,stacked:n=!1,stackMode:a="value",levels:l,curve:i="linear",tension:o=0,max:s,yTickCount:c=4,formatValue:d,formatTooltipValue:u,tooltipLabels:h,yAxisLabel:m,referenceLines:p,labelEndpoints:g=!1,dots:f,dotVariant:b="border",pulse:x=!1,brush:y=!1,range:v,onRangeChange:w,loading:N=!1,animate:k=!0,reveal:$="left-to-right",fillVariant:M="gradient",gridStyle:C="solid",width:L,className:S,emptyLabel:D}){const P=se().charts,A=oe(),j=d??(e=>he(e,A)),z=u??j,F=D??P.noData,E=je(null),B=Ws(E),T=L??B,[I,O]=Ae(null),[R,W]=Ae(null),{highlighted:K}=Vs(),_=De();if(Fe(()=>{if(null!==I)return G(e=>"Escape"===e.key&&(O(null),!0))},[I]),N)/* @__PURE__ */
899
- return qe("div",{className:S,ref:E,children:/* @__PURE__ */qe(qs,{height:r,width:L??B})});const q=t,H=v??R??[0,Math.max(0,q.length-1)],[U,V]=H,Y=e=>y?e.slice(U,V+1):e,X=e.map((e,t)=>({...e,slot:t})).filter(e=>e.data.some(kd)).map(e=>({...e,data:Y(e.data)}));if(t=Y(q),0===X.length||0===t.length)/* @__PURE__ */
900
- return qe("div",{className:S,ref:E,children:/* @__PURE__ */qe("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:r},children:F})});const Z=t.map((e,t)=>X.reduce((e,r)=>e+(kd(r.data[t])?r.data[t]:0),0)),J=(e,t)=>Z[t]>0?e/Z[t]:null,Q=[];if(n){let e=t.map(()=>0);for(const t of X)e=e.map((e,r)=>e+(kd(t.data[r])?t.data[r]:0)),Q.push("percent"===a?e.map((e,t)=>J(e,t)):[...e])}const ee=!!l&&l.length>0,te=e=>"right"===e.axis,re=!n&&!ee&&void 0===s&&X.some(te)&&X.some(e=>!te(e)),ne=re?X.filter(e=>!te(e)):X,ae=re?X.filter(te).flatMap(e=>e.data.filter(kd)):[],le=n?(Q.at(-1)??[]).filter(kd):ne.flatMap(e=>e.data.filter(kd)),ie=re?Es([Math.min(0,...le),Math.max(0,...le)],[Math.min(0,...ae),Math.max(0,...ae)],{intervals:c+1,integerLeft:le.every(Number.isInteger),integerRight:ae.every(Number.isInteger)}):null,ce=ie?ie.left:n&&"percent"===a||ee||void 0!==s?null:Fs(n?0:Math.min(0,...le),Math.max(0,...le),{intervals:c+1,integer:le.every(Number.isInteger)}),de=ce?ce.lo:0,ue=n&&"percent"===a?1:ce?ce.hi:s??zs(Math.max(...le,0)),me=n&&"percent"===a?e=>pe(Math.round(100*e),0,A):j,ge=ee?l:ce?ce.ticks:Ps([de,ue],{from:0,to:1}).ticks(c+1),fe=Rs(ge.map(me),Nd),be=ie?Rs(ie.right.ticks.map(j),vd):vd,xe={left:fe,right:Math.max(fe+1,T-be),top:yd,bottom:r-wd},ye=As(t.length,{from:xe.left,to:xe.right}),ve=ee?js(l,{from:xe.bottom,to:xe.top}):null,we=Ps([de,ue],{from:xe.bottom,to:xe.top}),Ne=we(Math.max(de,0)),ke=e=>ve?ve(e):we(e),$e=ie?Ps([ie.right.lo,ie.right.hi],{from:xe.bottom,to:xe.top}):null,Me=e=>$e&&te(e)?$e:ke,Ce=ve?ve.levels.map(e=>({value:e,y:ve(e)})):ge.map(e=>({value:e,y:we(e)})),Le=e=>r=>{r.preventDefault(),O(r=>{const n=(r??0)+e;return Math.min(t.length-1,Math.max(0,n))})},Se=Math.max(1,Math.ceil(t.length/Math.max(1,Math.floor(T/96))));/* @__PURE__ */
895
+ /* @__PURE__ */qe("path",{d:v,fill:Ms.grid}),
896
+ /* @__PURE__ */qe("rect",{x:0,y:0,width:p(u),height:a,fill:Ms.surface,fillOpacity:.72}),
897
+ /* @__PURE__ */qe("rect",{x:p(h),y:0,width:Math.max(0,l-p(h)),height:a,fill:Ms.surface,fillOpacity:.72}),
898
+ /* @__PURE__ */qe("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")]})})}var vd=12,wd=16,Nd=26,kd=52,$d=e=>"number"==typeof e&&Number.isFinite(e);function Md({series:e,labels:t,height:r=200,stacked:n=!1,stackMode:a="value",levels:l,curve:i="linear",tension:o=0,max:s,yTickCount:c=4,formatValue:d,formatTooltipValue:u,tooltipLabels:h,yAxisLabel:m,referenceLines:p,labelEndpoints:g=!1,dots:f,dotVariant:b="border",pulse:x=!1,brush:y=!1,range:v,onRangeChange:w,loading:N=!1,animate:k=!0,reveal:$="left-to-right",fillVariant:M="gradient",gridStyle:C="solid",width:L,className:S,emptyLabel:D}){const P=se().charts,A=oe(),j=d??(e=>he(e,A)),z=u??j,F=D??P.noData,E=je(null),B=Ks(E),T=L??B,[I,O]=Ae(null),[R,W]=Ae(null),{highlighted:K}=Ys(),_=De();if(Fe(()=>{if(null!==I)return G(e=>"Escape"===e.key&&(O(null),!0))},[I]),N)/* @__PURE__ */
899
+ return qe("div",{className:S,ref:E,children:/* @__PURE__ */qe(Hs,{height:r,width:L??B})});const q=t,H=v??R??[0,Math.max(0,q.length-1)],[U,V]=H,Y=e=>y?e.slice(U,V+1):e,X=e.map((e,t)=>({...e,slot:t})).filter(e=>e.data.some($d)).map(e=>({...e,data:Y(e.data)}));if(t=Y(q),0===X.length||0===t.length)/* @__PURE__ */
900
+ return qe("div",{className:S,ref:E,children:/* @__PURE__ */qe("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:r},children:F})});const Z=t.map((e,t)=>X.reduce((e,r)=>e+($d(r.data[t])?r.data[t]:0),0)),J=(e,t)=>Z[t]>0?e/Z[t]:null,Q=[];if(n){let e=t.map(()=>0);for(const t of X)e=e.map((e,r)=>e+($d(t.data[r])?t.data[r]:0)),Q.push("percent"===a?e.map((e,t)=>J(e,t)):[...e])}const ee=!!l&&l.length>0,te=e=>"right"===e.axis,re=!n&&!ee&&void 0===s&&X.some(te)&&X.some(e=>!te(e)),ne=re?X.filter(e=>!te(e)):X,ae=re?X.filter(te).flatMap(e=>e.data.filter($d)):[],le=n?(Q.at(-1)??[]).filter($d):ne.flatMap(e=>e.data.filter($d)),ie=re?Bs([Math.min(0,...le),Math.max(0,...le)],[Math.min(0,...ae),Math.max(0,...ae)],{intervals:c+1,integerLeft:le.every(Number.isInteger),integerRight:ae.every(Number.isInteger)}):null,ce=ie?ie.left:n&&"percent"===a||ee||void 0!==s?null:Es(n?0:Math.min(0,...le),Math.max(0,...le),{intervals:c+1,integer:le.every(Number.isInteger)}),de=ce?ce.lo:0,ue=n&&"percent"===a?1:ce?ce.hi:s??Fs(Math.max(...le,0)),me=n&&"percent"===a?e=>pe(Math.round(100*e),0,A):j,ge=ee?l:ce?ce.ticks:As([de,ue],{from:0,to:1}).ticks(c+1),fe=Ws(ge.map(me),kd),be=ie?Ws(ie.right.ticks.map(j),wd):wd,xe={left:fe,right:Math.max(fe+1,T-be),top:vd,bottom:r-Nd},ye=js(t.length,{from:xe.left,to:xe.right}),ve=ee?zs(l,{from:xe.bottom,to:xe.top}):null,we=As([de,ue],{from:xe.bottom,to:xe.top}),Ne=we(Math.max(de,0)),ke=e=>ve?ve(e):we(e),$e=ie?As([ie.right.lo,ie.right.hi],{from:xe.bottom,to:xe.top}):null,Me=e=>$e&&te(e)?$e:ke,Ce=ve?ve.levels.map(e=>({value:e,y:ve(e)})):ge.map(e=>({value:e,y:we(e)})),Le=e=>r=>{r.preventDefault(),O(r=>{const n=(r??0)+e;return Math.min(t.length-1,Math.max(0,n))})},Se=Math.max(1,Math.ceil(t.length/Math.max(1,Math.floor(T/96))));/* @__PURE__ */
901
901
  return He("div",{className:`relative ${S??""}`,ref:E,children:[
902
902
  /* @__PURE__ */He("svg",{width:"100%",height:r,viewBox:`0 0 ${T} ${r}`,role:"img","aria-label":P.overIntervals(X.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&&Le(1)(e),"ArrowLeft"===e.key&&Le(-1)(e)},children:[
903
903
  /* @__PURE__ */qe("defs",{children:/* @__PURE__ */qe("clipPath",{id:_,children:/* @__PURE__ */qe("rect",{x:xe.left,y:xe.top,width:xe.right-xe.left,height:xe.bottom-xe.top})})}),
904
- /* @__PURE__ */qe(ii,{id:_,fills:X.map((e,t)=>({color:Cs(e.slot,e.color,e.tone),variant:e.fillVariant??M})),fadeFrom:n?.42:.3,reveal:!!k&&$}),Ce.map(e=>/* @__PURE__ */qe("line",{x1:xe.left,y1:e.y,x2:xe.right,y2:e.y,stroke:$s.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===C?"3 3":void 0},`grid-${e.value}`)),
905
- /* @__PURE__ */qe("line",{x1:xe.left,y1:Ne,x2:xe.right,y2:Ne,stroke:$s.axis,strokeWidth:1,shapeRendering:"crispEdges"}),Ce.map(e=>/* @__PURE__ */qe("text",{x:xe.left-8,y:e.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:me(e.value)},`ytick-${e.value}`)),ie&&Ce.map((e,t)=>/* @__PURE__ */qe("text",{x:xe.right+8,y:e.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:j(ie.right.ticks[t])},`ytick-r-${e.value}`)),m&&/* @__PURE__ */qe("text",{x:12,y:(xe.top+xe.bottom)/2,transform:`rotate(-90 12 ${(xe.top+xe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:$s.label,children:m}),
906
- /* @__PURE__ */qe("g",{clipPath:`url(#${_})`,mask:k&&$?`url(#${ei(_)})`:void 0,children:X.map((e,r)=>{const a=Cs(e.slot,e.color,e.tone),l=e.mode??(n?"area":"line"),s=Ys(e.key,K);if("step"===l){const r=t.map((t,r)=>({start:ye(r),end:ye.end(r),value:e.data[r]})).filter(e=>kd(e.value)).map(t=>({start:t.start,end:t.end,y:Me(e)(t.value)}));/* @__PURE__ */
907
- return qe("path",{d:ec(r),fill:"none",stroke:a,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:s??void 0,className:"rosh-viz-mark"},e.key)}const c=t.map((t,a)=>{const l=n?Q[r]?.[a]:e.data[a];return kd(l)?[ye.center(a),Me(e)(l)]:null}).filter(e=>null!==e);if(0===c.length)return null;if("column"===l){const l=Math.max(1,.62*ye.bandwidth),i="solid"===e.fillVariant,o=Me(e);/* @__PURE__ */
908
- return qe("g",{opacity:s??void 0,className:"rosh-viz-mark",children:t.map((t,s)=>{const c=n?Q[r]?.[s]:e.data[s];if(!kd(c))return null;const d=o(c);/* @__PURE__ */
909
- return qe("rect",{x:ye.center(s)-l/2,y:Math.min(d,Ne),width:l,height:Math.abs(Ne-d),rx:2,fill:a,fillOpacity:i?1:.35,className:k?si.rise:void 0,style:k?ci(s,26):void 0},s)})},e.key)}const d=ac(c,i,o),u=n&&r>0?t.map((e,t)=>[ye.center(t),ke(Q[r-1]?.[t]??0)-2]):null,h=u?ic(d,u):lc(d,c,Ne);/* @__PURE__ */
904
+ /* @__PURE__ */qe(ii,{id:_,fills:X.map((e,t)=>({color:Ls(e.slot,e.color,e.tone),variant:e.fillVariant??M})),fadeFrom:n?.42:.3,reveal:!!k&&$}),Ce.map(e=>/* @__PURE__ */qe("line",{x1:xe.left,y1:e.y,x2:xe.right,y2:e.y,stroke:Ms.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===C?"3 3":void 0},`grid-${e.value}`)),
905
+ /* @__PURE__ */qe("line",{x1:xe.left,y1:Ne,x2:xe.right,y2:Ne,stroke:Ms.axis,strokeWidth:1,shapeRendering:"crispEdges"}),Ce.map(e=>/* @__PURE__ */qe("text",{x:xe.left-8,y:e.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:me(e.value)},`ytick-${e.value}`)),ie&&Ce.map((e,t)=>/* @__PURE__ */qe("text",{x:xe.right+8,y:e.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:j(ie.right.ticks[t])},`ytick-r-${e.value}`)),m&&/* @__PURE__ */qe("text",{x:12,y:(xe.top+xe.bottom)/2,transform:`rotate(-90 12 ${(xe.top+xe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:Ms.label,children:m}),
906
+ /* @__PURE__ */qe("g",{clipPath:`url(#${_})`,mask:k&&$?`url(#${ei(_)})`:void 0,children:X.map((e,r)=>{const a=Ls(e.slot,e.color,e.tone),l=e.mode??(n?"area":"line"),s=Gs(e.key,K);if("step"===l){const r=t.map((t,r)=>({start:ye(r),end:ye.end(r),value:e.data[r]})).filter(e=>$d(e.value)).map(t=>({start:t.start,end:t.end,y:Me(e)(t.value)}));/* @__PURE__ */
907
+ return qe("path",{d:tc(r),fill:"none",stroke:a,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:s??void 0,className:"rosh-viz-mark"},e.key)}const c=t.map((t,a)=>{const l=n?Q[r]?.[a]:e.data[a];return $d(l)?[ye.center(a),Me(e)(l)]:null}).filter(e=>null!==e);if(0===c.length)return null;if("column"===l){const l=Math.max(1,.62*ye.bandwidth),i="solid"===e.fillVariant,o=Me(e);/* @__PURE__ */
908
+ return qe("g",{opacity:s??void 0,className:"rosh-viz-mark",children:t.map((t,s)=>{const c=n?Q[r]?.[s]:e.data[s];if(!$d(c))return null;const d=o(c);/* @__PURE__ */
909
+ return qe("rect",{x:ye.center(s)-l/2,y:Math.min(d,Ne),width:l,height:Math.abs(Ne-d),rx:2,fill:a,fillOpacity:i?1:.35,className:k?si.rise:void 0,style:k?ci(s,26):void 0},s)})},e.key)}const d=lc(c,i,o),u=n&&r>0?t.map((e,t)=>[ye.center(t),ke(Q[r-1]?.[t]??0)-2]):null,h=u?oc(d,u):ic(d,c,Ne);/* @__PURE__ */
910
910
  return He("g",{opacity:s??void 0,className:"rosh-viz-mark",children:[("area"===l||n)&&
911
911
  /* @__PURE__ */qe("path",{d:h,fill:ri(_,r,e.fillVariant??M,a),stroke:"none"}),
912
- /* @__PURE__ */qe("path",{d:d,fill:"none",stroke:a,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:ni(e.stroke??(e.forecast?"animated-dashed":"solid")),className:k&&("animated-dashed"===e.stroke||e.forecast&&!e.stroke)?si.march:void 0})]},e.key)})}),p?.map((e,t)=>{const r=e.color??ks[e.tone??"critical"],n=ke(e.value);/* @__PURE__ */
912
+ /* @__PURE__ */qe("path",{d:d,fill:"none",stroke:a,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:ni(e.stroke??(e.forecast?"animated-dashed":"solid")),className:k&&("animated-dashed"===e.stroke||e.forecast&&!e.stroke)?si.march:void 0})]},e.key)})}),p?.map((e,t)=>{const r=e.color??$s[e.tone??"critical"],n=ke(e.value);/* @__PURE__ */
913
913
  return He("g",{children:[
914
- /* @__PURE__ */qe("line",{x1:xe.left,y1:n,x2:xe.right,y2:n,stroke:r,strokeWidth:1,strokeDasharray:"5 4"}),e.label&&/* @__PURE__ */qe("text",{x:xe.right-4,y:n-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:r,children:e.label})]},`rule-${t}`)}),"none"!==(f??(g?"last":"none"))&&X.map((e,r)=>{if("column"===e.mode)return null;const a=f??(g?"last":"none"),l=Cs(e.slot,e.color,e.tone),i=[...e.data].map(kd).lastIndexOf(!0),o="all"===a?t.map((e,t)=>t).filter(t=>kd(n?Q[r]?.[t]:e.data[t])):i>=0?[i]:[];/* @__PURE__ */
915
- return He("g",{children:[o.map(a=>{const o=n?Q[r]?.[a]:e.data[a];return kd(o)?/* @__PURE__ */qe(bd,{cx:ye.center(a),cy:Me(e)(o),color:l,variant:b,pulse:x&&a===i,title:`${t[a]}: ${e.label} ${j(o)}`},a):null}),g&&i>=0&&kd(n?Q[r]?.[i]:e.data[i])&&/* @__PURE__ */qe("text",{x:ye.center(i)-10,y:Me(e)(n?Q[r]?.[i]:e.data[i])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:j(n?Q[r]?.[i]:e.data[i])})]},`dots-${e.key}`)}),t.map((e,t)=>t%Se===0?/* @__PURE__ */qe("text",{x:ye.center(t),y:r-8,textAnchor:"middle",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:e},`xtick-${t}`):null),null!==I&&/* @__PURE__ */qe("line",{x1:ye.center(I),y1:xe.top,x2:ye.center(I),y2:xe.bottom,stroke:$s.axis,strokeWidth:1}),t.map((e,t)=>/* @__PURE__ */qe("rect",{x:ye(t),y:xe.top,width:Math.max(1,ye.bandwidth),height:xe.bottom-xe.top,fill:"transparent",onMouseEnter:()=>O(t)},`hit-${t}`))]}),y&&q.length>2&&/* @__PURE__ */qe(xd,{className:"mt-1",labels:q,width:T,data:e[0]?.data??[],range:H,onRangeChange:e=>{w?w(e):W(e)}}),null!==I&&
916
- /* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 z-10",style:Ks(ye.center(I),ye.bandwidth,T),children:/* @__PURE__ */qe(Xs,{title:h?.[I]??t[I],rows:X.map((e,t)=>({key:e.key,label:e.label,color:Cs(e.slot,e.color,e.tone),value:kd(e.data[I])?n&&"percent"===a?`${pe(100*(J(e.data[I],I)??0),1,A)} · ${z(e.data[I])}`:z(e.data[I]):void 0})),footnote:n&&"percent"===a?P.inBucket(z(Z[I])):void 0})})]})}var Md=3;function Cd({series:e,height:t=260,width:r,xLabel:n,yLabel:a,formatX:l,formatY:i,xDomain:o,yDomain:s,xScale:c="linear",yScale:d="linear",radiusRange:u=[4,22],className:h,emptyLabel:m}){const p=se().charts,g=oe(),f=l??(e=>he(e,g)),b=i??(e=>he(e,g)),x=m??p.noObservations,y=je(null),v=Ws(y),w=r??v,N=De(),[k,$]=Ae(null);Fe(()=>{if(null!==k)return G(e=>"Escape"===e.key&&($(null),!0))},[k]);const M=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),C=e.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),L=o||s?C.map(e=>({...e,points:e.points.filter(e=>M(e.x,o)&&M(e.y,s))})).filter(e=>e.points.length>0):C,S=C.reduce((e,t)=>e+t.points.length,0)-L.reduce((e,t)=>e+t.points.length,0);if(0===L.length)/* @__PURE__ */
917
- return qe("div",{className:h,ref:y,children:/* @__PURE__ */qe("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:t},children:x})});const D=L.flatMap(e=>e.points),P=D.some(e=>null!=e.size),A=14,j=20,z=34,F=52,E=(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,zs(Math.max(...e))];return"log"===r?Bs(i,n):Ps(i,n)},B=E(D.map(e=>e.y),s,d,{from:t-z,to:A}),T=Rs(B.ticks(5).map(b),F),I=Math.max(T+1,w-j),O=E(D.map(e=>e.x),o,c,{from:T,to:I}),R=Is([0,Math.max(...D.map(e=>e.size??1))],{from:u[0],to:u[1]}),W=k?L[k.s]:void 0,K=k&&W?W.points[k.i]:void 0,_=L.flatMap((e,t)=>e.points.map((e,r)=>({s:t,i:r})));/* @__PURE__ */
914
+ /* @__PURE__ */qe("line",{x1:xe.left,y1:n,x2:xe.right,y2:n,stroke:r,strokeWidth:1,strokeDasharray:"5 4"}),e.label&&/* @__PURE__ */qe("text",{x:xe.right-4,y:n-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:r,children:e.label})]},`rule-${t}`)}),"none"!==(f??(g?"last":"none"))&&X.map((e,r)=>{if("column"===e.mode)return null;const a=f??(g?"last":"none"),l=Ls(e.slot,e.color,e.tone),i=[...e.data].map($d).lastIndexOf(!0),o="all"===a?t.map((e,t)=>t).filter(t=>$d(n?Q[r]?.[t]:e.data[t])):i>=0?[i]:[];/* @__PURE__ */
915
+ return He("g",{children:[o.map(a=>{const o=n?Q[r]?.[a]:e.data[a];return $d(o)?/* @__PURE__ */qe(xd,{cx:ye.center(a),cy:Me(e)(o),color:l,variant:b,pulse:x&&a===i,title:`${t[a]}: ${e.label} ${j(o)}`},a):null}),g&&i>=0&&$d(n?Q[r]?.[i]:e.data[i])&&/* @__PURE__ */qe("text",{x:ye.center(i)-10,y:Me(e)(n?Q[r]?.[i]:e.data[i])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:j(n?Q[r]?.[i]:e.data[i])})]},`dots-${e.key}`)}),t.map((e,t)=>t%Se===0?/* @__PURE__ */qe("text",{x:ye.center(t),y:r-8,textAnchor:"middle",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:e},`xtick-${t}`):null),null!==I&&/* @__PURE__ */qe("line",{x1:ye.center(I),y1:xe.top,x2:ye.center(I),y2:xe.bottom,stroke:Ms.axis,strokeWidth:1}),t.map((e,t)=>/* @__PURE__ */qe("rect",{x:ye(t),y:xe.top,width:Math.max(1,ye.bandwidth),height:xe.bottom-xe.top,fill:"transparent",onMouseEnter:()=>O(t)},`hit-${t}`))]}),y&&q.length>2&&/* @__PURE__ */qe(yd,{className:"mt-1",labels:q,width:T,data:e[0]?.data??[],range:H,onRangeChange:e=>{w?w(e):W(e)}}),null!==I&&
916
+ /* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 z-10",style:_s(ye.center(I),ye.bandwidth,T),children:/* @__PURE__ */qe(Zs,{title:h?.[I]??t[I],rows:X.map((e,t)=>({key:e.key,label:e.label,color:Ls(e.slot,e.color,e.tone),value:$d(e.data[I])?n&&"percent"===a?`${pe(100*(J(e.data[I],I)??0),1,A)} · ${z(e.data[I])}`:z(e.data[I]):void 0})),footnote:n&&"percent"===a?P.inBucket(z(Z[I])):void 0})})]})}var Cd=3;function Ld({series:e,height:t=260,width:r,xLabel:n,yLabel:a,formatX:l,formatY:i,xDomain:o,yDomain:s,xScale:c="linear",yScale:d="linear",radiusRange:u=[4,22],className:h,emptyLabel:m}){const p=se().charts,g=oe(),f=l??(e=>he(e,g)),b=i??(e=>he(e,g)),x=m??p.noObservations,y=je(null),v=Ks(y),w=r??v,N=De(),[k,$]=Ae(null);Fe(()=>{if(null!==k)return G(e=>"Escape"===e.key&&($(null),!0))},[k]);const M=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),C=e.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),L=o||s?C.map(e=>({...e,points:e.points.filter(e=>M(e.x,o)&&M(e.y,s))})).filter(e=>e.points.length>0):C,S=C.reduce((e,t)=>e+t.points.length,0)-L.reduce((e,t)=>e+t.points.length,0);if(0===L.length)/* @__PURE__ */
917
+ return qe("div",{className:h,ref:y,children:/* @__PURE__ */qe("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:t},children:x})});const D=L.flatMap(e=>e.points),P=D.some(e=>null!=e.size),A=14,j=20,z=34,F=52,E=(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,Fs(Math.max(...e))];return"log"===r?Ts(i,n):As(i,n)},B=E(D.map(e=>e.y),s,d,{from:t-z,to:A}),T=Ws(B.ticks(5).map(b),F),I=Math.max(T+1,w-j),O=E(D.map(e=>e.x),o,c,{from:T,to:I}),R=Os([0,Math.max(...D.map(e=>e.size??1))],{from:u[0],to:u[1]}),W=k?L[k.s]:void 0,K=k&&W?W.points[k.i]:void 0,_=L.flatMap((e,t)=>e.points.map((e,r)=>({s:t,i:r})));/* @__PURE__ */
918
918
  return He("div",{className:`relative ${h??""}`,ref:y,children:[
919
919
  /* @__PURE__ */He("svg",{width:"100%",height:t,viewBox:`0 0 ${w} ${t}`,role:"img","aria-label":p.scatter(L.map(e=>e.label),a??p.yAxis,n??p.xAxis)+(S>0?`. ${p.outsideRange(S)}`:""),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?_.findIndex(e=>e.s===k.s&&e.i===k.i):0;$(_[Math.min(_.length-1,Math.max(0,r+t))])},children:[
920
920
  /* @__PURE__ */qe("defs",{children:/* @__PURE__ */qe("clipPath",{id:N,children:/* @__PURE__ */qe("rect",{x:T-u[1],y:A-u[1],width:I-T+2*u[1],height:t-z-A+2*u[1]})})}),B.ticks(5).map(e=>/* @__PURE__ */He("g",{children:[
921
- /* @__PURE__ */qe("line",{x1:T,y1:B(e),x2:I,y2:B(e),stroke:$s.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
922
- /* @__PURE__ */qe("text",{x:T-8,y:B(e)+4,textAnchor:"end",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:b(e)})]},`y${e}`)),O.ticks(5).map(e=>/* @__PURE__ */qe("text",{x:O(e),y:t-12,textAnchor:"middle",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:f(e)},`x${e}`)),n&&/* @__PURE__ */qe("text",{x:(T+I)/2,y:t-.5,textAnchor:"middle",fontSize:11,fill:$s.label,children:n}),a&&/* @__PURE__ */qe("text",{x:12,y:t/2,transform:`rotate(-90 12 ${t/2})`,textAnchor:"middle",fontSize:11,fill:$s.label,children:a}),
923
- /* @__PURE__ */qe("g",{clipPath:`url(#${N})`,children:L.map((e,t)=>{const r=Ds(e.slot,3,e.color,e.tone);return e.points.map((n,a)=>/* @__PURE__ */qe("circle",{cx:O(n.x),cy:B(n.y),r:P?R(n.size??0):u[0]+1,fill:r,fillOpacity:k&&k.s!==t?.25:.62,stroke:$s.surface,strokeWidth:2,onMouseEnter:()=>$({s:t,i:a})},`${e.key}-${a}`))})})]}),k&&W&&K&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:K.label??W.label,rows:[{key:"x",label:n??p.xAxis,color:Ds(W.slot,3,W.color,W.tone),value:f(K.x)},{key:"y",label:a??p.yAxis,color:Ds(W.slot,3,W.color,W.tone),value:b(K.y)},...null!=K.size?[{key:"size",label:p.size,color:$s.muted,value:he(K.size,g)}]:[]],footnote:K.label?W.label:void 0})})]})}function Ld({rows:e,labels:t,variant:r="area",curve:n="linear",height:a=220,width:l,max:i,min:o,formatValue:s,yAxisLabel:c,color:d,tone:u,label:h,className:m,emptyLabel:p,radius:g=3}){const f=se().charts,b=oe(),x=s??(e=>he(e,b)),y=h??f.range,v=e.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),w=Cs(0,d,u);/* @__PURE__ */
924
- return qe(_s,{labels:t,values:v,height:a,width:l,max:i,min:o,formatValue:x,yAxisLabel:c,className:m,emptyLabel:p,bandPadding:"bar"===r?.34:0,ariaLabel:f.rangeLabel(y,t.length),tooltip:r=>/* @__PURE__ */qe(Xs,{title:t[r],rows:[{key:"high",label:f.high,color:w,value:null==e[r]?void 0:x(e[r].high)},{key:"low",label:f.low,color:w,value:null==e[r]?void 0:x(e[r].low)}]}),children:({x:t,y:a,active:l})=>"bar"===r?/* @__PURE__ */qe("g",{children:e.map((e,r)=>/* @__PURE__ */qe("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__ */He("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__ */
921
+ /* @__PURE__ */qe("line",{x1:T,y1:B(e),x2:I,y2:B(e),stroke:Ms.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
922
+ /* @__PURE__ */qe("text",{x:T-8,y:B(e)+4,textAnchor:"end",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:b(e)})]},`y${e}`)),O.ticks(5).map(e=>/* @__PURE__ */qe("text",{x:O(e),y:t-12,textAnchor:"middle",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:f(e)},`x${e}`)),n&&/* @__PURE__ */qe("text",{x:(T+I)/2,y:t-.5,textAnchor:"middle",fontSize:11,fill:Ms.label,children:n}),a&&/* @__PURE__ */qe("text",{x:12,y:t/2,transform:`rotate(-90 12 ${t/2})`,textAnchor:"middle",fontSize:11,fill:Ms.label,children:a}),
923
+ /* @__PURE__ */qe("g",{clipPath:`url(#${N})`,children:L.map((e,t)=>{const r=Ps(e.slot,3,e.color,e.tone);return e.points.map((n,a)=>/* @__PURE__ */qe("circle",{cx:O(n.x),cy:B(n.y),r:P?R(n.size??0):u[0]+1,fill:r,fillOpacity:k&&k.s!==t?.25:.62,stroke:Ms.surface,strokeWidth:2,onMouseEnter:()=>$({s:t,i:a})},`${e.key}-${a}`))})})]}),k&&W&&K&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:K.label??W.label,rows:[{key:"x",label:n??p.xAxis,color:Ps(W.slot,3,W.color,W.tone),value:f(K.x)},{key:"y",label:a??p.yAxis,color:Ps(W.slot,3,W.color,W.tone),value:b(K.y)},...null!=K.size?[{key:"size",label:p.size,color:Ms.muted,value:he(K.size,g)}]:[]],footnote:K.label?W.label:void 0})})]})}function Sd({rows:e,labels:t,variant:r="area",curve:n="linear",height:a=220,width:l,max:i,min:o,formatValue:s,yAxisLabel:c,color:d,tone:u,label:h,className:m,emptyLabel:p,radius:g=3}){const f=se().charts,b=oe(),x=s??(e=>he(e,b)),y=h??f.range,v=e.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),w=Ls(0,d,u);/* @__PURE__ */
924
+ return qe(qs,{labels:t,values:v,height:a,width:l,max:i,min:o,formatValue:x,yAxisLabel:c,className:m,emptyLabel:p,bandPadding:"bar"===r?.34:0,ariaLabel:f.rangeLabel(y,t.length),tooltip:r=>/* @__PURE__ */qe(Zs,{title:t[r],rows:[{key:"high",label:f.high,color:w,value:null==e[r]?void 0:x(e[r].high)},{key:"low",label:f.low,color:w,value:null==e[r]?void 0:x(e[r].low)}]}),children:({x:t,y:a,active:l})=>"bar"===r?/* @__PURE__ */qe("g",{children:e.map((e,r)=>/* @__PURE__ */qe("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__ */He("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__ */
925
925
  return He(Ue,{children:[
926
- /* @__PURE__ */qe("path",{d:ic(ac(r,n),l),fill:w,fillOpacity:.2,stroke:"none"}),
927
- /* @__PURE__ */qe("path",{d:ac(r,n),fill:"none",stroke:w,strokeWidth:2,strokeLinejoin:"round"}),
928
- /* @__PURE__ */qe("path",{d:ac(l,n),fill:"none",stroke:w,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==l&&/* @__PURE__ */qe("line",{x1:t.center(l),y1:a(e[l].high),x2:t.center(l),y2:a(e[l].low),stroke:$s.axis,strokeWidth:1})]})})}function Sd({steps:e,height:t=240,width:r,formatValue:n,yAxisLabel:a,className:l,emptyLabel:i,radius:o=3,connectors:s=!0}){const c=se().charts,d=oe(),u=n??(e=>he(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__ */
929
- return qe(_s,{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?ks.neutral:t.value>=0?ks.good:ks.critical;/* @__PURE__ */
930
- return qe(Xs,{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:ks.neutral,value:u(t.to)}]]})},children:({x:e,y:t,active:r})=>/* @__PURE__ */He("g",{children:[s&&m.slice(0,-1).map((r,n)=>
931
- /* @__PURE__ */qe("line",{x1:e.end(n),y1:t(r.to),x2:e(n+1),y2:t(r.to),stroke:$s.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${n}`)),m.map((n,a)=>{const l=n.total?ks.neutral:n.value>=0?ks.good:ks.critical,i=Math.min(t(n.from),t(n.to)),s=Math.max(1,Math.abs(t(n.to)-t(n.from)));/* @__PURE__ */
932
- return qe("rect",{x:e(a),y:i,width:Math.max(1,e.bandwidth),height:s,rx:o,fill:l,fillOpacity:null===r||r===a?1:.45},a)})]})})}function Dd({values:e,bins:t=10,precomputed:r,height:n=220,width:a,color:l,tone:i,formatBound:o,formatCount:s,yAxisLabel:c,label:d,className:u,emptyLabel:h}){const m=se().charts,p=oe(),g=o??(e=>Number.isInteger(e)?he(e,p):me(e,1,p)),f=s??(e=>he(e,p)),b=c??m.countAxis,x=d??m.distribution,y=r??Os(e??[],t),v=Cs(0,l,i),w=y.map(e=>g(e.from)),N=y.map(e=>e.count);/* @__PURE__ */
933
- return qe(_s,{labels:w,values:N,height:n,width:a,bandPadding:0,xTickAnchor:"start",formatValue:f,yAxisLabel:b,className:u,emptyLabel:h,ariaLabel:m.histogram(x,y.length,(e??[]).length),tooltip:e=>/* @__PURE__ */qe(Xs,{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__ */qe("g",{children:y.map((a,l)=>/* @__PURE__ */qe("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 Pd({boxes:e,height:t=240,width:r,color:n,tone:a,formatValue:l,yAxisLabel:i,label:o,className:s,emptyLabel:c}){const d=se().charts,u=oe(),h=l??(e=>he(e,u)),m=o??d.distribution,p=Cs(0,n,a),g=e.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
934
- return qe(_s,{labels:e.map(e=>e.label),values:g,height:t,width:r,bandPadding:.5,formatValue:h,yAxisLabel:i,className:s,emptyLabel:c,ariaLabel:d.fiveNumber(m,e.length),tooltip:t=>{const r=e[t];/* @__PURE__ */
935
- return qe(Xs,{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__ */qe("g",{children:e.map((e,a)=>{const l=t.center(a),i=Math.max(6,t.bandwidth);/* @__PURE__ */
926
+ /* @__PURE__ */qe("path",{d:oc(lc(r,n),l),fill:w,fillOpacity:.2,stroke:"none"}),
927
+ /* @__PURE__ */qe("path",{d:lc(r,n),fill:"none",stroke:w,strokeWidth:2,strokeLinejoin:"round"}),
928
+ /* @__PURE__ */qe("path",{d:lc(l,n),fill:"none",stroke:w,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==l&&/* @__PURE__ */qe("line",{x1:t.center(l),y1:a(e[l].high),x2:t.center(l),y2:a(e[l].low),stroke:Ms.axis,strokeWidth:1})]})})}function Dd({steps:e,height:t=240,width:r,formatValue:n,yAxisLabel:a,className:l,emptyLabel:i,radius:o=3,connectors:s=!0}){const c=se().charts,d=oe(),u=n??(e=>he(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__ */
929
+ return qe(qs,{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?$s.neutral:t.value>=0?$s.good:$s.critical;/* @__PURE__ */
930
+ return qe(Zs,{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:$s.neutral,value:u(t.to)}]]})},children:({x:e,y:t,active:r})=>/* @__PURE__ */He("g",{children:[s&&m.slice(0,-1).map((r,n)=>
931
+ /* @__PURE__ */qe("line",{x1:e.end(n),y1:t(r.to),x2:e(n+1),y2:t(r.to),stroke:Ms.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${n}`)),m.map((n,a)=>{const l=n.total?$s.neutral:n.value>=0?$s.good:$s.critical,i=Math.min(t(n.from),t(n.to)),s=Math.max(1,Math.abs(t(n.to)-t(n.from)));/* @__PURE__ */
932
+ return qe("rect",{x:e(a),y:i,width:Math.max(1,e.bandwidth),height:s,rx:o,fill:l,fillOpacity:null===r||r===a?1:.45},a)})]})})}function Pd({values:e,bins:t=10,precomputed:r,height:n=220,width:a,color:l,tone:i,formatBound:o,formatCount:s,yAxisLabel:c,label:d,className:u,emptyLabel:h}){const m=se().charts,p=oe(),g=o??(e=>Number.isInteger(e)?he(e,p):me(e,1,p)),f=s??(e=>he(e,p)),b=c??m.countAxis,x=d??m.distribution,y=r??Rs(e??[],t),v=Ls(0,l,i),w=y.map(e=>g(e.from)),N=y.map(e=>e.count);/* @__PURE__ */
933
+ return qe(qs,{labels:w,values:N,height:n,width:a,bandPadding:0,xTickAnchor:"start",formatValue:f,yAxisLabel:b,className:u,emptyLabel:h,ariaLabel:m.histogram(x,y.length,(e??[]).length),tooltip:e=>/* @__PURE__ */qe(Zs,{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__ */qe("g",{children:y.map((a,l)=>/* @__PURE__ */qe("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 Ad({boxes:e,height:t=240,width:r,color:n,tone:a,formatValue:l,yAxisLabel:i,label:o,className:s,emptyLabel:c}){const d=se().charts,u=oe(),h=l??(e=>he(e,u)),m=o??d.distribution,p=Ls(0,n,a),g=e.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
934
+ return qe(qs,{labels:e.map(e=>e.label),values:g,height:t,width:r,bandPadding:.5,formatValue:h,yAxisLabel:i,className:s,emptyLabel:c,ariaLabel:d.fiveNumber(m,e.length),tooltip:t=>{const r=e[t];/* @__PURE__ */
935
+ return qe(Zs,{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__ */qe("g",{children:e.map((e,a)=>{const l=t.center(a),i=Math.max(6,t.bandwidth);/* @__PURE__ */
936
936
  return He("g",{opacity:null!==n&&n!==a?.45:1,children:[
937
937
  /* @__PURE__ */qe("line",{x1:l,y1:r(e.max),x2:l,y2:r(e.q3),stroke:p,strokeWidth:1.5}),
938
938
  /* @__PURE__ */qe("line",{x1:l,y1:r(e.q1),x2:l,y2:r(e.min),stroke:p,strokeWidth:1.5}),
939
939
  /* @__PURE__ */qe("line",{x1:l-i/4,y1:r(e.max),x2:l+i/4,y2:r(e.max),stroke:p,strokeWidth:1.5}),
940
940
  /* @__PURE__ */qe("line",{x1:l-i/4,y1:r(e.min),x2:l+i/4,y2:r(e.min),stroke:p,strokeWidth:1.5}),
941
941
  /* @__PURE__ */qe("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}),
942
- /* @__PURE__ */qe("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__ */qe("circle",{cx:l,cy:r(e),r:3,fill:p,stroke:$s.surface,strokeWidth:1.5},t))]},a)})})})}function Ad({candles:e,variant:t="candle",height:r=260,width:n,formatValue:a,yAxisLabel:l,label:i,className:o,emptyLabel:s}){const c=se().charts,d=oe(),u=a??(e=>Number.isInteger(e)?he(e,d):me(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__ */
943
- return qe(_s,{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:o,emptyLabel:s,ariaLabel:c.ohlc(h,e.length),tooltip:t=>{const r=e[t],n=r.close>=r.open,a=n?ks.good:ks.critical;/* @__PURE__ */
944
- return qe(Xs,{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__ */qe("g",{children:e.map((e,l)=>{const i=e.close>=e.open,o=i?ks.good:ks.critical,s=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__ */
942
+ /* @__PURE__ */qe("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__ */qe("circle",{cx:l,cy:r(e),r:3,fill:p,stroke:Ms.surface,strokeWidth:1.5},t))]},a)})})})}function jd({candles:e,variant:t="candle",height:r=260,width:n,formatValue:a,yAxisLabel:l,label:i,className:o,emptyLabel:s}){const c=se().charts,d=oe(),u=a??(e=>Number.isInteger(e)?he(e,d):me(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__ */
943
+ return qe(qs,{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:o,emptyLabel:s,ariaLabel:c.ohlc(h,e.length),tooltip:t=>{const r=e[t],n=r.close>=r.open,a=n?$s.good:$s.critical;/* @__PURE__ */
944
+ return qe(Zs,{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__ */qe("g",{children:e.map((e,l)=>{const i=e.close>=e.open,o=i?$s.good:$s.critical,s=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__ */
945
945
  return He("g",{opacity:d?.45:1,children:[
946
946
  /* @__PURE__ */qe("line",{x1:s,y1:n(e.high),x2:s,y2:n(e.low),stroke:o,strokeWidth:1.5}),"candle"===t?/* @__PURE__ */qe("rect",{x:s-c/2,y:u,width:c,height:h,rx:1,fill:i?o:"transparent",fillOpacity:i?.85:1,stroke:o,strokeWidth:1.5}):/* @__PURE__ */He(Ue,{children:[
947
947
  /* @__PURE__ */qe("line",{x1:s-c/2,y1:n(e.open),x2:s,y2:n(e.open),stroke:o,strokeWidth:2}),
948
- /* @__PURE__ */qe("line",{x1:s,y1:n(e.close),x2:s+c/2,y2:n(e.close),stroke:o,strokeWidth:2})]})]},l)})})})}function jd({rows:e,columns:t,cells:r,height:n,width:a,color:l,max:i,formatValue:o,label:s,className:c,emptyLabel:d,cellGap:u=2,cellRadius:h=2}){const m=se().charts,p=oe(),g=o??(e=>he(e,p)),f=s??m.intensity,b=d??m.noActivity,x=je(null),y=Ws(x),v=a??y,w=De(),[N,k]=Ae(null);if(Fe(()=>{if(null!==N)return G(e=>"Escape"===e.key&&(k(null),!0))},[N]),0===e.length||0===t.length)/* @__PURE__ */
949
- return qe("div",{className:c,ref:x,children:/* @__PURE__ */qe("p",{className:"py-8 text-center text-sm text-gray-500",children:b})});const $=l??Cs(0),M=i??Math.max(1,...r.flat().filter(Number.isFinite)),C=96,L=26*e.length,S=n??L+26+26,D=Math.max(2,(Math.max(97,v)-C)/t.length),P=e=>{const t=M>0?Math.max(0,Math.min(1,e/M)):0;return`color-mix(in oklab, ${$} ${(8+92*t).toFixed(1)}%, ${$s.surface})`};/* @__PURE__ */
948
+ /* @__PURE__ */qe("line",{x1:s,y1:n(e.close),x2:s+c/2,y2:n(e.close),stroke:o,strokeWidth:2})]})]},l)})})})}function zd({rows:e,columns:t,cells:r,height:n,width:a,color:l,max:i,formatValue:o,label:s,className:c,emptyLabel:d,cellGap:u=2,cellRadius:h=2}){const m=se().charts,p=oe(),g=o??(e=>he(e,p)),f=s??m.intensity,b=d??m.noActivity,x=je(null),y=Ks(x),v=a??y,w=De(),[N,k]=Ae(null);if(Fe(()=>{if(null!==N)return G(e=>"Escape"===e.key&&(k(null),!0))},[N]),0===e.length||0===t.length)/* @__PURE__ */
949
+ return qe("div",{className:c,ref:x,children:/* @__PURE__ */qe("p",{className:"py-8 text-center text-sm text-gray-500",children:b})});const $=l??Ls(0),M=i??Math.max(1,...r.flat().filter(Number.isFinite)),C=96,L=26*e.length,S=n??L+26+26,D=Math.max(2,(Math.max(97,v)-C)/t.length),P=e=>{const t=M>0?Math.max(0,Math.min(1,e/M)):0;return`color-mix(in oklab, ${$} ${(8+92*t).toFixed(1)}%, ${Ms.surface})`};/* @__PURE__ */
950
950
  return He("div",{className:`relative ${c??""}`,ref:x,children:[
951
951
  /* @__PURE__ */He("svg",{width:"100%",height:S,viewBox:`0 0 ${v} ${S}`,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:[
952
952
  /* @__PURE__ */qe("defs",{children:/* @__PURE__ */He("linearGradient",{id:w,x1:"0",x2:"1",children:[
953
953
  /* @__PURE__ */qe("stop",{offset:"0",stopColor:P(0)}),
954
- /* @__PURE__ */qe("stop",{offset:"1",stopColor:P(M)})]})}),e.map((e,t)=>/* @__PURE__ */qe("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:$s.label,children:e},`r${t}`)),e.map((e,n)=>t.map((t,a)=>{const l=r[n]?.[a]??0,i=N&&(N.r!==n||N.c!==a);/* @__PURE__ */
955
- return qe("rect",{x:C+a*D+u/2,y:26*n+u/2,width:Math.max(1,D-u),height:26-u,rx:h,fill:P(l),opacity:i?.55:1,onMouseEnter:()=>k({r:n,c:a}),children:/* @__PURE__ */qe("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-C)/56))))===0?/* @__PURE__ */qe("text",{x:C+r*D+D/2,y:L+15,textAnchor:"middle",fontSize:11,fill:$s.label,children:e},`c${r}`):null),
954
+ /* @__PURE__ */qe("stop",{offset:"1",stopColor:P(M)})]})}),e.map((e,t)=>/* @__PURE__ */qe("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:Ms.label,children:e},`r${t}`)),e.map((e,n)=>t.map((t,a)=>{const l=r[n]?.[a]??0,i=N&&(N.r!==n||N.c!==a);/* @__PURE__ */
955
+ return qe("rect",{x:C+a*D+u/2,y:26*n+u/2,width:Math.max(1,D-u),height:26-u,rx:h,fill:P(l),opacity:i?.55:1,onMouseEnter:()=>k({r:n,c:a}),children:/* @__PURE__ */qe("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-C)/56))))===0?/* @__PURE__ */qe("text",{x:C+r*D+D/2,y:L+15,textAnchor:"middle",fontSize:11,fill:Ms.label,children:e},`c${r}`):null),
956
956
  /* @__PURE__ */qe("rect",{x:C,y:L+26,width:Math.min(180,Math.max(40,v-C)),height:8,rx:4,fill:`url(#${w})`}),
957
- /* @__PURE__ */qe("text",{x:C,y:L+48,fontSize:11,fill:$s.label,children:"0"}),
958
- /* @__PURE__ */qe("text",{x:C+Math.min(180,Math.max(40,v-C)),y:L+48,textAnchor:"end",fontSize:11,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:g(M)})]}),N&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */qe(Xs,{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 zd({caption:e,head:t,rows:r}){/* @__PURE__ */
957
+ /* @__PURE__ */qe("text",{x:C,y:L+48,fontSize:11,fill:Ms.label,children:"0"}),
958
+ /* @__PURE__ */qe("text",{x:C+Math.min(180,Math.max(40,v-C)),y:L+48,textAnchor:"end",fontSize:11,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:g(M)})]}),N&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */qe(Zs,{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 Fd({caption:e,head:t,rows:r}){/* @__PURE__ */
959
959
  return He("table",{className:"sr-only",children:[
960
960
  /* @__PURE__ */qe("caption",{children:e}),
961
961
  /* @__PURE__ */qe("thead",{children:/* @__PURE__ */qe("tr",{children:t.map(e=>/* @__PURE__ */qe("th",{scope:"col",children:e},e))})}),
962
- /* @__PURE__ */qe("tbody",{children:r.map((e,t)=>/* @__PURE__ */qe("tr",{children:e.map((e,t)=>/* @__PURE__ */qe("td",{children:e},t))},t))})]})}var Fd=3,Ed=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function Bd({axes:e,series:t,size:r=300,mode:n="area",grid:a="polygon",rings:l=4,formatValue:i,animate:o=!0,className:s,emptyLabel:c}){const d=se().charts,u=oe(),h=i??(e=>he(e,u)),m=c??d.nothingToCompare,p=De(),[g,f]=Ae(null),{highlighted:b}=Vs(),x=t;if(e.length<3||0===x.length)/* @__PURE__ */
963
- return qe("p",{className:`text-sm text-gray-500 ${s??""}`,children:m});const y=r/2,v=r/2,w=r/2-46,N=Ts(e.length),k=e.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...x.map(e=>e.values[t]??0).filter(Number.isFinite))),$=(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)]},M=(e,t)=>null!==g?g!==e:null!==b&&b!==t,C=null!==g?x[g]:void 0;/* @__PURE__ */
962
+ /* @__PURE__ */qe("tbody",{children:r.map((e,t)=>/* @__PURE__ */qe("tr",{children:e.map((e,t)=>/* @__PURE__ */qe("td",{children:e},t))},t))})]})}var Ed=3,Bd=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function Td({axes:e,series:t,size:r=300,mode:n="area",grid:a="polygon",rings:l=4,formatValue:i,animate:o=!0,className:s,emptyLabel:c}){const d=se().charts,u=oe(),h=i??(e=>he(e,u)),m=c??d.nothingToCompare,p=De(),[g,f]=Ae(null),{highlighted:b}=Ys(),x=t;if(e.length<3||0===x.length)/* @__PURE__ */
963
+ return qe("p",{className:`text-sm text-gray-500 ${s??""}`,children:m});const y=r/2,v=r/2,w=r/2-46,N=Is(e.length),k=e.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...x.map(e=>e.values[t]??0).filter(Number.isFinite))),$=(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)]},M=(e,t)=>null!==g?g!==e:null!==b&&b!==t,C=null!==g?x[g]:void 0;/* @__PURE__ */
964
964
  return He("div",{className:`relative ${s??""}`,children:[
965
965
  /* @__PURE__ */He("svg",{width:"100%",height:r,viewBox:`0 0 ${r} ${r}`,role:"img","aria-labelledby":p,onMouseLeave:()=>f(null),children:[
966
- /* @__PURE__ */qe("title",{id:p,children:d.acrossMeasures(x.map(e=>e.label),e.length)}),Array.from({length:l},(t,r)=>{const n=w*(r+1)/l;return"circle"===a?/* @__PURE__ */qe("circle",{cx:y,cy:v,r:n,fill:"none",stroke:$s.grid,strokeWidth:1},r):/* @__PURE__ */qe("path",{d:Ed(oc(y,v,n,e.length)),fill:"none",stroke:$s.grid,strokeWidth:1},r)}),e.map((e,t)=>{const[r,n]=$(t,k[t]);/* @__PURE__ */
966
+ /* @__PURE__ */qe("title",{id:p,children:d.acrossMeasures(x.map(e=>e.label),e.length)}),Array.from({length:l},(t,r)=>{const n=w*(r+1)/l;return"circle"===a?/* @__PURE__ */qe("circle",{cx:y,cy:v,r:n,fill:"none",stroke:Ms.grid,strokeWidth:1},r):/* @__PURE__ */qe("path",{d:Bd(sc(y,v,n,e.length)),fill:"none",stroke:Ms.grid,strokeWidth:1},r)}),e.map((e,t)=>{const[r,n]=$(t,k[t]);/* @__PURE__ */
967
967
  return He("g",{children:[
968
- /* @__PURE__ */qe("line",{x1:y,y1:v,x2:r,y2:n,stroke:$s.grid,strokeWidth:1}),
969
- /* @__PURE__ */qe("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:$s.label,children:e.label})]},e.key)}),
970
- /* @__PURE__ */qe(ii,{id:p,reveal:!!o&&"center-out"}),x.map((t,r)=>{const a=Ds(r,3,t.color,t.tone),l=e.map((e,r)=>$(r,t.values[r]??0));/* @__PURE__ */
971
- return He("g",{opacity:M(r,t.key)?.3:1,onMouseEnter:()=>f(r),mask:o?`url(#${ei(p)})`:void 0,children:["area"===n&&/* @__PURE__ */qe("path",{d:Ed(l),fill:a,fillOpacity:.18,stroke:"none"}),
972
- /* @__PURE__ */qe("path",{d:Ed(l),fill:"none",stroke:a,strokeWidth:2,strokeLinejoin:"round"}),l.map(([e,t],r)=>/* @__PURE__ */qe("circle",{cx:e,cy:t,r:3.5,fill:a,stroke:$s.surface,strokeWidth:1.5},r))]},t.key)})]}),C&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:C.label,rows:e.map((e,t)=>({key:e.key,label:e.label,color:Ds(g,3,C.color,C.tone),value:h(C.values[t]??0)}))})}),
968
+ /* @__PURE__ */qe("line",{x1:y,y1:v,x2:r,y2:n,stroke:Ms.grid,strokeWidth:1}),
969
+ /* @__PURE__ */qe("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:Ms.label,children:e.label})]},e.key)}),
970
+ /* @__PURE__ */qe(ii,{id:p,reveal:!!o&&"center-out"}),x.map((t,r)=>{const a=Ps(r,3,t.color,t.tone),l=e.map((e,r)=>$(r,t.values[r]??0));/* @__PURE__ */
971
+ return He("g",{opacity:M(r,t.key)?.3:1,onMouseEnter:()=>f(r),mask:o?`url(#${ei(p)})`:void 0,children:["area"===n&&/* @__PURE__ */qe("path",{d:Bd(l),fill:a,fillOpacity:.18,stroke:"none"}),
972
+ /* @__PURE__ */qe("path",{d:Bd(l),fill:"none",stroke:a,strokeWidth:2,strokeLinejoin:"round"}),l.map(([e,t],r)=>/* @__PURE__ */qe("circle",{cx:e,cy:t,r:3.5,fill:a,stroke:Ms.surface,strokeWidth:1.5},r))]},t.key)})]}),C&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:C.label,rows:e.map((e,t)=>({key:e.key,label:e.label,color:Ps(g,3,C.color,C.tone),value:h(C.values[t]??0)}))})}),
973
973
  /* @__PURE__ */qe("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:x.map((e,t)=>/* @__PURE__ */He("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
974
- /* @__PURE__ */qe("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:Ds(t,3,e.color,e.tone)}}),
974
+ /* @__PURE__ */qe("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:Ps(t,3,e.color,e.tone)}}),
975
975
  /* @__PURE__ */qe("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
976
- /* @__PURE__ */qe(zd,{caption:d.acrossMeasures(x.map(e=>e.label),e.length),head:[d.tableSeries,...e.map(e=>e.label)],rows:x.map(t=>[t.label,...e.map((e,r)=>h(t.values[r]??0))])})]})}var Td=300*Math.PI/180;function Id({rows:e,variant:t="track",size:r=300,max:n,formatValue:a,animate:l=!0,className:i,emptyLabel:o,trackGap:s=6}){const c=se().charts,d=oe(),u=a??(e=>he(e,d)),h=o??c.nothingToPlot,m=De(),[p,g]=Ae(null),{highlighted:f}=Vs();if(0===e.length)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${i??""}`,children:h});const b=r/2,x=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,$=Math.min(s,Math.max(1,w-2)),M=Ts(k.length,.03),C=null!==p?k[p]:void 0;/* @__PURE__ */
976
+ /* @__PURE__ */qe(Fd,{caption:d.acrossMeasures(x.map(e=>e.label),e.length),head:[d.tableSeries,...e.map(e=>e.label)],rows:x.map(t=>[t.label,...e.map((e,r)=>h(t.values[r]??0))])})]})}var Id=300*Math.PI/180;function Od({rows:e,variant:t="track",size:r=300,max:n,formatValue:a,animate:l=!0,className:i,emptyLabel:o,trackGap:s=6}){const c=se().charts,d=oe(),u=a??(e=>he(e,d)),h=o??c.nothingToPlot,m=De(),[p,g]=Ae(null),{highlighted:f}=Ys();if(0===e.length)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${i??""}`,children:h});const b=r/2,x=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,$=Math.min(s,Math.max(1,w-2)),M=Is(k.length,.03),C=null!==p?k[p]:void 0;/* @__PURE__ */
977
977
  return He("div",{className:`relative ${i??""}`,children:[
978
978
  /* @__PURE__ */He("svg",{width:"100%",height:r,viewBox:`0 0 ${r} ${r}`,role:"img","aria-labelledby":m,onMouseLeave:()=>g(null),children:[
979
- /* @__PURE__ */qe("title",{id:m,children:"track"===t?c.radialTrack(k.length):c.radialCycle(k.length)}),k.map((e,n)=>{const a=Cs(n,e.color,e.tone),i=Math.max(0,Math.min(1,e.value/v)),o=((e,t)=>null!==p?p!==e:null!==f&&f!==t)(n,e.key);if("track"===t){const t=y-n*w,r=t-w+$,s=-Math.PI/2;/* @__PURE__ */
979
+ /* @__PURE__ */qe("title",{id:m,children:"track"===t?c.radialTrack(k.length):c.radialCycle(k.length)}),k.map((e,n)=>{const a=Ls(n,e.color,e.tone),i=Math.max(0,Math.min(1,e.value/v)),o=((e,t)=>null!==p?p!==e:null!==f&&f!==t)(n,e.key);if("track"===t){const t=y-n*w,r=t-w+$,s=-Math.PI/2;/* @__PURE__ */
980
980
  return He("g",{opacity:o?.4:1,onMouseEnter:()=>g(n),className:l?si.sweep:void 0,style:l?ci(n,70):void 0,children:[
981
- /* @__PURE__ */qe("path",{d:sc(b,x,r,t,s,s+Td),fill:$s.grid}),
982
- /* @__PURE__ */qe("path",{d:sc(b,x,r,t,s,s+Td*i),fill:a})]},e.key)}const s=.14*r;/* @__PURE__ */
983
- return qe("g",{opacity:o?.4:1,onMouseEnter:()=>g(n),children:/* @__PURE__ */qe("path",{d:sc(b,x,s,s+(y-s)*i,M(n),M(n)+M.step),fill:a})},e.key)})]}),C&&null!==p&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:C.label,rows:[{key:"value",label:c.value,color:Cs(p,C.color,C.tone),value:u(C.value)}]})}),
981
+ /* @__PURE__ */qe("path",{d:cc(b,x,r,t,s,s+Id),fill:Ms.grid}),
982
+ /* @__PURE__ */qe("path",{d:cc(b,x,r,t,s,s+Id*i),fill:a})]},e.key)}const s=.14*r;/* @__PURE__ */
983
+ return qe("g",{opacity:o?.4:1,onMouseEnter:()=>g(n),children:/* @__PURE__ */qe("path",{d:cc(b,x,s,s+(y-s)*i,M(n),M(n)+M.step),fill:a})},e.key)})]}),C&&null!==p&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:C.label,rows:[{key:"value",label:c.value,color:Ls(p,C.color,C.tone),value:u(C.value)}]})}),
984
984
  /* @__PURE__ */qe("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__ */He("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
985
- /* @__PURE__ */qe("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:Cs(t,e.color,e.tone)}}),
985
+ /* @__PURE__ */qe("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:Ls(t,e.color,e.tone)}}),
986
986
  /* @__PURE__ */qe("span",{className:"flex-1 truncate",children:e.label}),
987
- /* @__PURE__ */qe("span",{className:"tabular-nums text-gray-800",children:u(e.value)})]},e.key))})]})}function Od({stages:e,shape:t="funnel",height:r,width:n,gap:a=4,minBandWidth:l=0,formatValue:i,color:o,className:s,emptyLabel:c}){const d=se().charts,u=oe(),h=i??(e=>he(e,u)),m=c??d.noStages,p=De(),[g,f]=Ae(null),{highlighted:b}=Vs(),x=je(null),y=Ws(x,560),v=n??y;if(0===e.length)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${s??""}`,children:m});const w=o??Cs(0),N=r??54*e.length,k=Math.max(...e.map(e=>e.value),1),$="bars"===t,M=$?Math.round(Math.min(132,Math.max(80,.24*v))):Math.round(Math.min(168,Math.max(104,.38*v))),C=t=>{const r=e[t-1]?.value;return null!=r&&r>0?100*(1-e[t].value/r):null},L=t=>{const r=C(t);return{count:h(e[t].value),drop:null!=r?`−${pe(r,1,u)}`:""}},S=$?Math.ceil(Math.max(...e.map((e,t)=>{const{count:r,drop:n}=L(t);return.62*(r.length+(n?n.length+1:0))*12}))+16):0,D=v-M-S,P=Math.max($?2:0,Math.min(l,D)),A=e=>Math.max(P,D*Math.max(0,e/k)),j=e=>A(e)/2,z=M+D/2,F=t=>46+t/Math.max(1,e.length-1)*54,E=e=>`color-mix(in oklab, ${w} ${F(e).toFixed(0)}%, ${$s.surface})`,B=e=>F(e)>=55?$s.surface:$s.label,T=(e,t)=>null!==g?g!==e:null!==b&&b!==t,I=null!==g?e[g]:void 0;/* @__PURE__ */
987
+ /* @__PURE__ */qe("span",{className:"tabular-nums text-gray-800",children:u(e.value)})]},e.key))})]})}function Rd({stages:e,shape:t="funnel",height:r,width:n,gap:a=4,minBandWidth:l=0,formatValue:i,color:o,className:s,emptyLabel:c}){const d=se().charts,u=oe(),h=i??(e=>he(e,u)),m=c??d.noStages,p=De(),[g,f]=Ae(null),{highlighted:b}=Ys(),x=je(null),y=Ks(x,560),v=n??y;if(0===e.length)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${s??""}`,children:m});const w=o??Ls(0),N=r??54*e.length,k=Math.max(...e.map(e=>e.value),1),$="bars"===t,M=$?Math.round(Math.min(132,Math.max(80,.24*v))):Math.round(Math.min(168,Math.max(104,.38*v))),C=t=>{const r=e[t-1]?.value;return null!=r&&r>0?100*(1-e[t].value/r):null},L=t=>{const r=C(t);return{count:h(e[t].value),drop:null!=r?`−${pe(r,1,u)}`:""}},S=$?Math.ceil(Math.max(...e.map((e,t)=>{const{count:r,drop:n}=L(t);return.62*(r.length+(n?n.length+1:0))*12}))+16):0,D=v-M-S,P=Math.max($?2:0,Math.min(l,D)),A=e=>Math.max(P,D*Math.max(0,e/k)),j=e=>A(e)/2,z=M+D/2,F=t=>46+t/Math.max(1,e.length-1)*54,E=e=>`color-mix(in oklab, ${w} ${F(e).toFixed(0)}%, ${Ms.surface})`,B=e=>F(e)>=55?Ms.surface:Ms.label,T=(e,t)=>null!==g?g!==e:null!==b&&b!==t,I=null!==g?e[g]:void 0;/* @__PURE__ */
988
988
  return He("div",{className:`relative ${s??""}`,ref:x,children:[
989
989
  /* @__PURE__ */He("svg",{width:"100%",height:N,viewBox:`0 0 ${v} ${N}`,role:"img","aria-labelledby":p,onMouseLeave:()=>f(null),children:[
990
990
  /* @__PURE__ */qe("title",{id:p,children:d.funnel(e.length,h(e[0].value),h(e[e.length-1].value))}),e.map((r,n)=>{const l=n*N/e.length+a/2,i=(n+1)*N/e.length-a/2,o=(l+i)/2,s=pe(r.value/(e[0].value||1)*100,0,u),c=.62*s.length*12+12;if($){const e=M,t=e+A(r.value),{count:a,drop:d}=L(n);/* @__PURE__ */
991
991
  return He("g",{opacity:T(n,r.key)?.45:1,onMouseEnter:()=>f(n),children:[
992
992
  /* @__PURE__ */qe("path",{d:`M${e},${l} L${t},${l} L${t},${i} L${e},${i} Z`,fill:E(n)}),
993
- /* @__PURE__ */qe("text",{x:M-12,y:o+4,textAnchor:"end",fontSize:12,fill:$s.label,children:r.label}),t-e>=c&&/* @__PURE__ */qe("text",{x:e+8,y:o+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:B(n),style:{fontVariantNumeric:"tabular-nums"},children:s}),
994
- /* @__PURE__ */He("text",{"data-funnel-value":"true",x:t+8,y:o+4,textAnchor:"start",fontSize:12,fill:$s.label,style:{fontVariantNumeric:"tabular-nums"},children:[
995
- /* @__PURE__ */qe("tspan",{fontWeight:600,children:a}),d&&/* @__PURE__ */qe("tspan",{fill:$s.muted,children:` ${d}`})]})]},r.key)}const d=j(r.value),m="cone"===t?j(e[n+1]?.value??r.value):d,p=C(n),g=2*Math.min(d,m)>=c;/* @__PURE__ */
993
+ /* @__PURE__ */qe("text",{x:M-12,y:o+4,textAnchor:"end",fontSize:12,fill:Ms.label,children:r.label}),t-e>=c&&/* @__PURE__ */qe("text",{x:e+8,y:o+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:B(n),style:{fontVariantNumeric:"tabular-nums"},children:s}),
994
+ /* @__PURE__ */He("text",{"data-funnel-value":"true",x:t+8,y:o+4,textAnchor:"start",fontSize:12,fill:Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:[
995
+ /* @__PURE__ */qe("tspan",{fontWeight:600,children:a}),d&&/* @__PURE__ */qe("tspan",{fill:Ms.muted,children:` ${d}`})]})]},r.key)}const d=j(r.value),m="cone"===t?j(e[n+1]?.value??r.value):d,p=C(n),g=2*Math.min(d,m)>=c;/* @__PURE__ */
996
996
  return He("g",{opacity:T(n,r.key)?.45:1,onMouseEnter:()=>f(n),children:[
997
997
  /* @__PURE__ */qe("path",{d:`M${z-d},${l} L${z+d},${l} L${z+m},${i} L${z-m},${i} Z`,fill:E(n)}),
998
- /* @__PURE__ */qe("text",{x:M-14,y:o-2,textAnchor:"end",fontSize:12,fill:$s.label,children:r.label}),
999
- /* @__PURE__ */He("text",{x:M-14,y:o+14,textAnchor:"end",fontSize:11,fill:$s.muted,style:{fontVariantNumeric:"tabular-nums"},children:[h(r.value),null!=p?` · −${pe(p,1,u)}`:""]}),
1000
- /* @__PURE__ */qe("text",{x:g?z:z+Math.max(d,m)+6,y:o+4,textAnchor:g?"middle":"start",fontSize:12,fontWeight:600,fill:g?B(n):$s.label,style:{fontVariantNumeric:"tabular-nums"},children:s})]},r.key)})]}),I&&null!==g&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:I.label,rows:[{key:"value",label:d.count,color:E(g),value:h(I.value)},{key:"share",label:d.ofFirstStage,color:$s.muted,value:pe(I.value/(e[0].value||1)*100,0,u)},...g>0&&e[g-1].value>0?[{key:"drop",label:d.droppedHere,color:ks.critical,value:`−${pe(100*(1-I.value/e[g-1].value),1,u)}`}]:[]]})})]})}function Rd({items:e,height:t=320,width:r,gap:n=2,radius:a=3,formatValue:l,color:i,className:o,emptyLabel:s}){const c=se().charts,d=oe(),u=l??(e=>he(e,d)),h=s??c.nothingToBreakDown,m=je(null),p=Ws(m),g=r??p,[f,b]=Ae(null),{highlighted:x}=Vs(),y=sd(e,g,t);if(0===y.length)/* @__PURE__ */
1001
- return qe("div",{className:o,ref:m,children:/* @__PURE__ */qe("p",{className:"py-8 text-center text-sm text-gray-500",children:h})});const v=i??Cs(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)}%, ${$s.surface})`,$=e=>N(e)>=55?$s.surface:$s.label,M=f??x,C=f?y.find(e=>e.key===f):void 0;/* @__PURE__ */
998
+ /* @__PURE__ */qe("text",{x:M-14,y:o-2,textAnchor:"end",fontSize:12,fill:Ms.label,children:r.label}),
999
+ /* @__PURE__ */He("text",{x:M-14,y:o+14,textAnchor:"end",fontSize:11,fill:Ms.muted,style:{fontVariantNumeric:"tabular-nums"},children:[h(r.value),null!=p?` · −${pe(p,1,u)}`:""]}),
1000
+ /* @__PURE__ */qe("text",{x:g?z:z+Math.max(d,m)+6,y:o+4,textAnchor:g?"middle":"start",fontSize:12,fontWeight:600,fill:g?B(n):Ms.label,style:{fontVariantNumeric:"tabular-nums"},children:s})]},r.key)})]}),I&&null!==g&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:I.label,rows:[{key:"value",label:d.count,color:E(g),value:h(I.value)},{key:"share",label:d.ofFirstStage,color:Ms.muted,value:pe(I.value/(e[0].value||1)*100,0,u)},...g>0&&e[g-1].value>0?[{key:"drop",label:d.droppedHere,color:$s.critical,value:`−${pe(100*(1-I.value/e[g-1].value),1,u)}`}]:[]]})})]})}function Wd({items:e,height:t=320,width:r,gap:n=2,radius:a=3,formatValue:l,color:i,className:o,emptyLabel:s}){const c=se().charts,d=oe(),u=l??(e=>he(e,d)),h=s??c.nothingToBreakDown,m=je(null),p=Ks(m),g=r??p,[f,b]=Ae(null),{highlighted:x}=Ys(),y=cd(e,g,t);if(0===y.length)/* @__PURE__ */
1001
+ return qe("div",{className:o,ref:m,children:/* @__PURE__ */qe("p",{className:"py-8 text-center text-sm text-gray-500",children:h})});const v=i??Ls(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)}%, ${Ms.surface})`,$=e=>N(e)>=55?Ms.surface:Ms.label,M=f??x,C=f?y.find(e=>e.key===f):void 0;/* @__PURE__ */
1002
1002
  return He("div",{className:`relative ${o??""}`,ref:m,children:[
1003
1003
  /* @__PURE__ */qe("svg",{width:"100%",height:t,viewBox:`0 0 ${g} ${t}`,role:"img","aria-label":c.treemap(e.length),onMouseLeave:()=>b(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__ */
1004
1004
  return He("g",{opacity:M&&M!==e.key?.55:1,onMouseEnter:()=>b(e.key),children:[
1005
- /* @__PURE__ */qe("rect",{x:e.x+n/2,y:e.y+n/2,width:t,height:r,rx:a,fill:k(e.value)}),l&&/* @__PURE__ */qe("text",{x:e.x+n/2+8,y:e.y+n/2+18,fontSize:12,fontWeight:600,fill:$(e.value),children:e.label}),i&&/* @__PURE__ */qe("text",{x:e.x+n/2+8,y:e.y+n/2+34,fontSize:11,fill:$(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:u(e.value)})]},e.key)})}),C&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:C.label,rows:[{key:"value",label:c.value,color:k(C.value),value:u(C.value)}]})}),
1006
- /* @__PURE__ */qe(zd,{caption:c.treemap(e.length),head:[c.tableItem,c.value],rows:y.map(e=>[e.label,u(e.value)])})]})}function Wd(e,t,r,n,a,l,i,o){if(n>=8)return;const s=e.reduce((e,t)=>e+Kd(t,8-n),0);if(s<=0)return;let c=t;e.forEach((e,t)=>{const d=Kd(e,8-n),u=d/s*r,h=`${i}/${e.key}`,m=0===n?t:a,p=0===n?e.key:l;o.push({id:h,label:e.label,value:d,depth:n,start:c,end:c+u,branch:m,branchKey:p}),e.children?.length&&Wd(e.children,c,u,n+1,m,p,h,o),c+=u})}function Kd(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+Kd(r,t-1),0):Math.max(0,e.value??0)}function _d({nodes:e,size:t=320,innerRadius:r=44,ringGap:n=2,formatValue:a,centerLabel:l,className:i,emptyLabel:o}){const s=se().charts,c=oe(),d=a??(e=>he(e,c)),u=o??s.nothingToBreakDown,[h,m]=Ae(null),{highlighted:p}=Vs(),g=[];if(Wd(e,-Math.PI/2,2*Math.PI,0,0,"","",g),0===g.length)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${i??""}`,children:u});const f=Math.max(...g.map(e=>e.depth))+1,b=t/2,x=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, ${Cs(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${$s.surface})`,N=e=>null!==h?e.id===h:null===p||e.branchKey===p,k=h?g.find(e=>e.id===h):void 0,$=e=>pe(e.value/v*100,1,c);/* @__PURE__ */
1005
+ /* @__PURE__ */qe("rect",{x:e.x+n/2,y:e.y+n/2,width:t,height:r,rx:a,fill:k(e.value)}),l&&/* @__PURE__ */qe("text",{x:e.x+n/2+8,y:e.y+n/2+18,fontSize:12,fontWeight:600,fill:$(e.value),children:e.label}),i&&/* @__PURE__ */qe("text",{x:e.x+n/2+8,y:e.y+n/2+34,fontSize:11,fill:$(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:u(e.value)})]},e.key)})}),C&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:C.label,rows:[{key:"value",label:c.value,color:k(C.value),value:u(C.value)}]})}),
1006
+ /* @__PURE__ */qe(Fd,{caption:c.treemap(e.length),head:[c.tableItem,c.value],rows:y.map(e=>[e.label,u(e.value)])})]})}function Kd(e,t,r,n,a,l,i,o){if(n>=8)return;const s=e.reduce((e,t)=>e+_d(t,8-n),0);if(s<=0)return;let c=t;e.forEach((e,t)=>{const d=_d(e,8-n),u=d/s*r,h=`${i}/${e.key}`,m=0===n?t:a,p=0===n?e.key:l;o.push({id:h,label:e.label,value:d,depth:n,start:c,end:c+u,branch:m,branchKey:p}),e.children?.length&&Kd(e.children,c,u,n+1,m,p,h,o),c+=u})}function _d(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+_d(r,t-1),0):Math.max(0,e.value??0)}function qd({nodes:e,size:t=320,innerRadius:r=44,ringGap:n=2,formatValue:a,centerLabel:l,className:i,emptyLabel:o}){const s=se().charts,c=oe(),d=a??(e=>he(e,c)),u=o??s.nothingToBreakDown,[h,m]=Ae(null),{highlighted:p}=Ys(),g=[];if(Kd(e,-Math.PI/2,2*Math.PI,0,0,"","",g),0===g.length)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${i??""}`,children:u});const f=Math.max(...g.map(e=>e.depth))+1,b=t/2,x=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, ${Ls(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${Ms.surface})`,N=e=>null!==h?e.id===h:null===p||e.branchKey===p,k=h?g.find(e=>e.id===h):void 0,$=e=>pe(e.value/v*100,1,c);/* @__PURE__ */
1007
1007
  return He("div",{className:`relative ${i??""}`,children:[
1008
- /* @__PURE__ */He("svg",{width:"100%",height:t,viewBox:`0 0 ${t} ${t}`,role:"img","aria-label":s.sunburst(d(v),f),onMouseLeave:()=>m(null),children:[g.map(e=>/* @__PURE__ */qe("path",{d:sc(b,x,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:$s.surface,strokeWidth:1,onMouseEnter:()=>m(e.id)},e.id)),l&&/* @__PURE__ */qe("text",{x:b,y:x+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:$s.label,children:l})]}),k&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:k.label,rows:[{key:"value",label:s.value,color:w(k),value:d(k.value)},{key:"share",label:s.share,color:$s.muted,value:$(k)}]})}),
1009
- /* @__PURE__ */qe(zd,{caption:s.sunburst(d(v),f),head:[s.tableLevel,s.tableItem,s.value,s.share],rows:g.map(e=>[e.depth+1,e.label,d(e.value),$(e)])})]})}function qd({nodes:e,links:t,height:r=320,width:n,nodeWidth:a=14,nodePadding:l=12,formatValue:i,className:o,emptyLabel:s}){const c=se().charts,d=oe(),u=i??(e=>he(e,d)),h=s??c.noFlows,m=je(null),p=Ws(m),g=n??p,[f,b]=Ae(null),{highlighted:x}=Vs();if(0===e.length||0===t.length)/* @__PURE__ */
1008
+ /* @__PURE__ */He("svg",{width:"100%",height:t,viewBox:`0 0 ${t} ${t}`,role:"img","aria-label":s.sunburst(d(v),f),onMouseLeave:()=>m(null),children:[g.map(e=>/* @__PURE__ */qe("path",{d:cc(b,x,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:Ms.surface,strokeWidth:1,onMouseEnter:()=>m(e.id)},e.id)),l&&/* @__PURE__ */qe("text",{x:b,y:x+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:Ms.label,children:l})]}),k&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:k.label,rows:[{key:"value",label:s.value,color:w(k),value:d(k.value)},{key:"share",label:s.share,color:Ms.muted,value:$(k)}]})}),
1009
+ /* @__PURE__ */qe(Fd,{caption:s.sunburst(d(v),f),head:[s.tableLevel,s.tableItem,s.value,s.share],rows:g.map(e=>[e.depth+1,e.label,d(e.value),$(e)])})]})}function Hd({nodes:e,links:t,height:r=320,width:n,nodeWidth:a=14,nodePadding:l=12,formatValue:i,className:o,emptyLabel:s}){const c=se().charts,d=oe(),u=i??(e=>he(e,d)),h=s??c.noFlows,m=je(null),p=Ks(m),g=n??p,[f,b]=Ae(null),{highlighted:x}=Ys();if(0===e.length||0===t.length)/* @__PURE__ */
1010
1010
  return qe("div",{className:o,ref:m,children:/* @__PURE__ */qe("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))),$=r-20,M=k>0?($-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)*M)),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>$&&a>0?Math.max(0,1-(n-$)/a):1;let o=10;t.forEach((t,n)=>{const a=2+Math.max(0,r[n]-2)*i;C.set(t.key,{x:v(e),y:o,h:a,index:n}),o+=a+l})}const L=/* @__PURE__ */new Map,S=/* @__PURE__ */new Map,D=/* @__PURE__ */new Map,P=(e,t)=>e.from===t||e.to===t,A="link"===f?.kind?t[f.index]:void 0,j="node"===f?.kind?e.find(e=>e.key===f.key):void 0;/* @__PURE__ */
1011
1011
  return He("div",{className:`relative ${o??""}`,ref:m,children:[
1012
- /* @__PURE__ */He("svg",{width:"100%",height:r,viewBox:`0 0 ${g} ${r}`,role:"img","aria-label":c.sankey(e.length,t.length),onMouseLeave:()=>b(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*M),i=r.y+(L.get(e.from)??0)+l/2,o=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 s=r.x+a,c=n.x,d=Cs(r.index,e.color),u=`${e.from}→${e.to}`,h=D.get(u)??0;D.set(u,h+1);const m=((e,t)=>f?"link"===f.kind?f.index===t:P(e,f.key):null!==x?P(e,x):null)(e,t);/* @__PURE__ */
1013
- return qe("path",{d:nc([[s,i],[c,o]]),fill:"none",stroke:d,strokeWidth:l,strokeOpacity:null===m||m?.42:.12,onMouseEnter:()=>b({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:P(t[f.index],i):null!==x?x===i:null);var i;/* @__PURE__ */
1012
+ /* @__PURE__ */He("svg",{width:"100%",height:r,viewBox:`0 0 ${g} ${r}`,role:"img","aria-label":c.sankey(e.length,t.length),onMouseLeave:()=>b(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*M),i=r.y+(L.get(e.from)??0)+l/2,o=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 s=r.x+a,c=n.x,d=Ls(r.index,e.color),u=`${e.from}→${e.to}`,h=D.get(u)??0;D.set(u,h+1);const m=((e,t)=>f?"link"===f.kind?f.index===t:P(e,f.key):null!==x?P(e,x):null)(e,t);/* @__PURE__ */
1013
+ return qe("path",{d:ac([[s,i],[c,o]]),fill:"none",stroke:d,strokeWidth:l,strokeOpacity:null===m||m?.42:.12,onMouseEnter:()=>b({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:P(t[f.index],i):null!==x?x===i:null);var i;/* @__PURE__ */
1014
1014
  return He("g",{opacity:null===l||l?1:.45,onMouseEnter:()=>b({kind:"node",key:e.key}),children:[
1015
- /* @__PURE__ */qe("rect",{x:r.x,y:r.y,width:a,height:r.h,rx:2,fill:Cs(r.index,e.color,e.tone)}),
1016
- /* @__PURE__ */qe("text",{x:n?r.x-8:r.x+a+8,y:r.y+r.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:$s.label,children:e.label})]},e.key)})]}),A&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:`${A.from} → ${A.to}`,rows:[{key:"value",label:c.flow,color:Cs(C.get(A.from)?.index??0,A.color),value:u(A.value)}]})}),j&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:j.label,rows:[{key:"value",label:c.throughput,color:Cs(C.get(j.key)?.index??0,j.color,j.tone),value:u(w.get(j.key)??0)}]})}),
1017
- /* @__PURE__ */qe(zd,{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 Hd({labels:e,matrix:t,size:r=340,maxNodes:n=8,padAngle:a=.04,arcWidth:l=12,formatValue:i,className:o,emptyLabel:s}){const c=se().charts,d=oe(),u=i??(e=>he(e,d)),h=s??c.noFlows,[m,p]=Ae(null),{highlighted:g}=Vs(),f=function(e,t,r,n){const a=(e,r)=>{const n=t[e]?.[r];return"number"==typeof n&&Number.isFinite(n)?n:0},l=e.map((t,r)=>e.reduce((e,t,n)=>e+a(r,n)+a(n,r),0)),i=Math.max(2,r),o=e.length>i,s=o?e.map((e,t)=>t).sort((e,t)=>l[t]-l[e]).slice(0,i-1).sort((e,t)=>e-t):e.map((e,t)=>t),c=new Map(s.map((e,t)=>[e,t])),d=o?s.length:-1,u=o?[...s.map(t=>e[t]),n]:[...e],h=u.map(()=>u.map(()=>0));let m=0;e.forEach((t,r)=>e.forEach((e,t)=>{const n=c.get(r)??d,l=c.get(t)??d;n!==d||l!==d?h[n][l]+=a(r,t):m+=a(r,t)}));const p=u.map((e,t)=>u.reduce((e,r,n)=>e+h[t][n]+h[n][t],0));return d>=0&&(p[d]+=m),{labels:u,matrix:h,totals:p,otherIndex:d,foldedCount:o?e.length-s.length:0}}(e,t,n,c.other),{labels:b,matrix:x,otherIndex:y,foldedCount:v}=f,w=(e,t)=>x[e]?.[t]??0,N=e=>e===y?$s.muted:Cs(e),k=f.totals,$=b.map((e,t)=>t).sort((e,t)=>k[t]-k[e]),M=$.reduce((e,t)=>e+k[t],0);if(M<=0)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${o??""}`,children:h});const C=r/2,L=r/2,S=r/2-44,D=S-l,P=a*$.length,A=/* @__PURE__ */new Map;let j=-Math.PI/2;$.forEach((e,t)=>{const r=k[e]/M*(2*Math.PI-P);A.set(e,{start:j,end:j+r,slot:t}),j+=r+a});const z=/* @__PURE__ */new Map,F=[];for(const e of $)for(const t of $){const r=w(e,t);if(r<=0)continue;const n=A.get(e),a=r/Math.max(1,k[e])*(n.end-n.start),l=z.get(e)??0;z.set(e,l+a),F.push({from:e,to:t,value:r,a:n.start+l+a/2,b:A.get(t).start+(A.get(t).end-A.get(t).start)/2})}const E=(e,t)=>[C+t*Math.cos(e),L+t*Math.sin(e)],B="arc"===m?.kind?m.index:void 0,T="ribbon"===m?.kind?F[m.index]:void 0;/* @__PURE__ */
1015
+ /* @__PURE__ */qe("rect",{x:r.x,y:r.y,width:a,height:r.h,rx:2,fill:Ls(r.index,e.color,e.tone)}),
1016
+ /* @__PURE__ */qe("text",{x:n?r.x-8:r.x+a+8,y:r.y+r.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:Ms.label,children:e.label})]},e.key)})]}),A&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:`${A.from} → ${A.to}`,rows:[{key:"value",label:c.flow,color:Ls(C.get(A.from)?.index??0,A.color),value:u(A.value)}]})}),j&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:j.label,rows:[{key:"value",label:c.throughput,color:Ls(C.get(j.key)?.index??0,j.color,j.tone),value:u(w.get(j.key)??0)}]})}),
1017
+ /* @__PURE__ */qe(Fd,{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 Ud({labels:e,matrix:t,size:r=340,maxNodes:n=8,padAngle:a=.04,arcWidth:l=12,formatValue:i,className:o,emptyLabel:s}){const c=se().charts,d=oe(),u=i??(e=>he(e,d)),h=s??c.noFlows,[m,p]=Ae(null),{highlighted:g}=Ys(),f=function(e,t,r,n){const a=(e,r)=>{const n=t[e]?.[r];return"number"==typeof n&&Number.isFinite(n)?n:0},l=e.map((t,r)=>e.reduce((e,t,n)=>e+a(r,n)+a(n,r),0)),i=Math.max(2,r),o=e.length>i,s=o?e.map((e,t)=>t).sort((e,t)=>l[t]-l[e]).slice(0,i-1).sort((e,t)=>e-t):e.map((e,t)=>t),c=new Map(s.map((e,t)=>[e,t])),d=o?s.length:-1,u=o?[...s.map(t=>e[t]),n]:[...e],h=u.map(()=>u.map(()=>0));let m=0;e.forEach((t,r)=>e.forEach((e,t)=>{const n=c.get(r)??d,l=c.get(t)??d;n!==d||l!==d?h[n][l]+=a(r,t):m+=a(r,t)}));const p=u.map((e,t)=>u.reduce((e,r,n)=>e+h[t][n]+h[n][t],0));return d>=0&&(p[d]+=m),{labels:u,matrix:h,totals:p,otherIndex:d,foldedCount:o?e.length-s.length:0}}(e,t,n,c.other),{labels:b,matrix:x,otherIndex:y,foldedCount:v}=f,w=(e,t)=>x[e]?.[t]??0,N=e=>e===y?Ms.muted:Ls(e),k=f.totals,$=b.map((e,t)=>t).sort((e,t)=>k[t]-k[e]),M=$.reduce((e,t)=>e+k[t],0);if(M<=0)/* @__PURE__ */return qe("p",{className:`text-sm text-gray-500 ${o??""}`,children:h});const C=r/2,L=r/2,S=r/2-44,D=S-l,P=a*$.length,A=/* @__PURE__ */new Map;let j=-Math.PI/2;$.forEach((e,t)=>{const r=k[e]/M*(2*Math.PI-P);A.set(e,{start:j,end:j+r,slot:t}),j+=r+a});const z=/* @__PURE__ */new Map,F=[];for(const e of $)for(const t of $){const r=w(e,t);if(r<=0)continue;const n=A.get(e),a=r/Math.max(1,k[e])*(n.end-n.start),l=z.get(e)??0;z.set(e,l+a),F.push({from:e,to:t,value:r,a:n.start+l+a/2,b:A.get(t).start+(A.get(t).end-A.get(t).start)/2})}const E=(e,t)=>[C+t*Math.cos(e),L+t*Math.sin(e)],B="arc"===m?.kind?m.index:void 0,T="ribbon"===m?.kind?F[m.index]:void 0;/* @__PURE__ */
1018
1018
  return He("div",{className:`relative ${o??""}`,children:[
1019
1019
  /* @__PURE__ */He("svg",{width:"100%",height:r,viewBox:`0 0 ${r} ${r}`,role:"img","aria-label":c.chord($.length),onMouseLeave:()=>p(null),children:[F.map((e,t)=>{const[n,a]=E(e.a,D),[l,i]=E(e.b,D),o=N(e.from),s=((e,t)=>m?"ribbon"===m.kind?m.index===t:m.index===e.from||m.index===e.to:null!==g?b[e.from]===g||b[e.to]===g:null)(e,t);/* @__PURE__ */
1020
1020
  return qe("path",{d:`M${n},${a} Q${C},${L} ${l},${i}`,fill:"none",stroke:o,strokeWidth:Math.max(1,e.value/M*r*.9),strokeOpacity:null===s||s?.34:.07,strokeLinecap:"round",onMouseEnter:()=>p({kind:"ribbon",index:t})},`${b[e.from]}→${b[e.to]}`)}),$.map(e=>{const t=A.get(e),r=(t.start+t.end)/2,[n,a]=E(r,S+16),l=(e=>m?"arc"===m.kind?m.index===e:F[m.index].from===e||F[m.index].to===e:null!==g?b[e]===g:null)(e);/* @__PURE__ */
1021
1021
  return He("g",{onMouseEnter:()=>p({kind:"arc",index:e}),children:[
1022
- /* @__PURE__ */qe("path",{d:sc(C,L,D,S,t.start,t.end),fill:N(e),fillOpacity:null===l||l?1:.45}),
1023
- /* @__PURE__ */qe("text",{x:n,y:a+4,fontSize:11,fill:$s.label,textAnchor:Math.cos(r)>.15?"start":Math.cos(r)<-.15?"end":"middle",children:b[e]})]},e)})]}),v>0&&/* @__PURE__ */qe("p",{className:"mt-1 text-xs text-gray-500",children:c.chordFolded(v)}),void 0!==B&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:b[B],rows:[{key:"total",label:c.totalFlow,color:N(B),value:u(k[B])}]})}),T&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Xs,{title:`${b[T.from]} → ${b[T.to]}`,rows:[{key:"value",label:c.flow,color:N(T.from),value:u(T.value)}]})}),
1024
- /* @__PURE__ */qe(zd,{caption:c.chord($.length),head:[c.tableFrom,c.tableTo,c.value],rows:F.map(e=>[b[e.from],b[e.to],u(e.value)])})]})}export{es as APP_UPDATE_POLL_MS,Al as Accordion,ra as AlignmentGrid,rs as AppUpdateBanner,sa as AttachButton,ia as AttachmentDropZone,oa as AttachmentList,zc as AuthScreen,xl as Avatar,yl as AvatarGroup,Za as BORDER_WIDTHS,kl as Banner,Pd as BoxPlotChart,Bt as BrandAssetEditor,Yl as BudgetBar,$s as CHART_INK,ln as COLUMN_COUNT_MAX,sn as COLUMN_COUNT_WIDTHS,cn as COLUMN_SHARES_EQUAL,on as COLUMN_SHARE_MIN,Ha as CONTROL_HEIGHTS,Vc as CORNERS,Jt as Calendar,Ad as CandlestickChart,ka as Card,_s as CartesianPlot,xd as ChartBrush,ii as ChartDefs,bd as ChartDot,fd as ChartFrame,Us as ChartHighlightProvider,qs as ChartSkeleton,Xs as ChartTooltip,Sc as ChatTemplate,mt as Checkbox_default,Nc as CheckoutTemplate,Hd as ChordChart,Wn as ColorPicker,On as ColorPickerPanel,En as ColorSwatch,jl as ColoredBadge,Zs as ColumnChart,ca as ComposerAttachments,ao as ContainerFillChart,Po as ContextMenu,ea as CornersInput,ul as CountBadge,Gl as DAY_MS,gc as DashboardTemplate,bs as DataTable,xc as DataTablePage,yr as DatePicker_default,sr as DateRangePicker,kr as DateTimePicker_default,ol as DescriptionList,an as DisplayChips,Ka as Divider,is as Drawer,So as DropdownMenu,Qa as ELEVATION_LEVELS,Mc as EmailTemplate,zl as EmptyState,rd as EmptyValue,Tc as ErrorBoundary,Ec as ErrorPage,Ga as FONT_WEIGHTS,na as FilePicker_default,yt as FormErrorSummary,ft as FormField,vc as FormLayoutPage,Od as FunnelChart,da as GROUP_COLORS,ua as GROUP_COLORS_SOLID,Ac as GalleryTemplate,Ra as Grid,jd as HeatmapChart,bo as HelpCenter,Rn as HexInput,Dd as HistogramChart,Ye as IconButton_default,Jo as IconRail,Qo as IconRailButton,qn as ImageFocusPoint,Ba as Inline,Jr as InputNumber_default,Ge as Input_default,os as Kanban,Nt as Label,td as LanguagePanel,ed as LanguageSelect,Zn as LinkPicker,xs as ListFooter,ys as ListLoadError,Yo as ListRow,jr as MAX_FRACTION_DIGITS,si as MOTION,Xa as MOTION_DURATIONS,go as Markdown,Et as MediaUploadField,_t as MediaUploadGrid,ud as Meter,ql as MetricBar,Gi as MilestoneTimeline,st as NativeSelect,Br as NumericKeypad,Xi as POST_PRODUCTION_STATUSES,Fl as PageHeader,cs as Pagination,aa as PaperclipGlyph,Aa as Paragraph,cc as PieChart,kn as Popover,Rt as PortalBrandingProvider,ro as ProductionTimeline,Fd as RADAR_SERIES_CAP,Ja as RADIUS_ROLES,Ua as ROW_HEIGHTS,Bd as RadarChart,Id as RadialBarChart,xt as RadioGroup,gt as Radio_default,Ld as RangeChart,cd as RankedBars,Md as SCATTER_SERIES_CAP,ws as SERIES_SLOT_COUNT,Ns as SERIES_VARS,qa as SPACING_ROLES,_a as SPACING_SCALE,Zi as STAGES,ks as STATUS_VARS,qd as SankeyChart,Cd as ScatterChart,Un as SearchableSelect,qr as Segmented,ut as Select_default,cl as SettingRow,yo as SidebarActionButton,wo as SidebarGroupLabel,$o as SidebarNavGroup,ko as SidebarNavItem,rl as Skeleton,tn as Slider,Ar as Snippet,Vo as SortableList,vs as Sparkline,Ea as Stack,$a as StatCard,md as StatTile,pl as Statistic,xa as StatusBadge,fa as StatusBadgeProvider,Pl as Stepper,_d as SunburstChart,Yr as Switch_default,Ya as TYPE_SCALE,Sl as Tabs,va as TagInput,Sa as Text,Jn as TextLinkField,Xe as Textarea_default,Ir as TileButton_default,nd as TimeAgo,hr as TimePicker_default,$d as TimeSeriesChart,Vi as TimelineTrack,Pa as Title,Mo as TopNav,Oo as Tree,qo as TreeEmptySlot,Ro as TreeGroup,Wo as TreeGroupLabel,_o as TreeRow,Ho as TreeSeam,Rd as TreemapChart,Sd as WaterfallChart,wn as WidthsBar,Ts as angleScale,zr as appendKey,Gc as applyCorners,Xc as applyIconSet,Zc as applyThemePrefs,sc as arcPath,ic as areaBetween,lc as areaFrom,Ls as assignSeriesSlots,Gs as autoHighlightIndex,Fr as backspace,As as bandScale,Os as binValues,Ul as budgetState,nc as bumpPath,Ji as calcOverall,Qi as calcReportOverall,zn as colorFill,Fn as colorSwatchClasses,hn as columnSharesWidths,Cr as copyToClipboard,ac as curvePath,ni as dashFor,ri as fillFor,Jl as fillId,Ze as firstEnabledIndex,Zl as fmtSliderDate,Vt as fromKey,Ql as glowId,ti as groundId,ha as groupColors,Sn as hexToHsv,Ys as highlightOpacity,Dn as hsvToHex,Bl as isSeverityTone,Va as isSpacingStep,wt as labelClasses,js as ladderScale,Qc as languageSelectWidth,Je as lastEnabledIndex,Qs as linearPath,Ps as linearScale,Bs as logScale,ei as maskId,et as matchTypeahead,$t as mediaFileName,tc as monotonePath,Qe as nextEnabledIndex,Fs as niceAxis,zs as niceMax,Mn as parseHexColor,oc as polygonPoints,Is as radiusScale,un as resolveColumnShares,mn as resolveColumnWidths,Yc as resolveCorners,Tt as resolvePortalBrandAsset,Cs as resolveSeriesColor,Ds as resolveSeriesColorWithin,qc as resolveTheme,$r as selectionAt,Ms as seriesColor,Tl as severityOf,rc as splinePath,sd as squarify,ci as stagger,ec as stepPath,$l as tabButtonId,Ml as tabPanelId,Xl as toDayMs,rr as toISODate,Ut as toKey,Ss as toggleSeriesSlot,ts as useAppUpdate,ld as useClickOutside,Ao as useContextMenu,ad as useDebouncedValue,Vs as useHighlight,Ws as usePlotWidth,Wt as usePortalBranding,eo as useProductionTimeline,ba as useStatusLabel,Jc as useTheme};
1022
+ /* @__PURE__ */qe("path",{d:cc(C,L,D,S,t.start,t.end),fill:N(e),fillOpacity:null===l||l?1:.45}),
1023
+ /* @__PURE__ */qe("text",{x:n,y:a+4,fontSize:11,fill:Ms.label,textAnchor:Math.cos(r)>.15?"start":Math.cos(r)<-.15?"end":"middle",children:b[e]})]},e)})]}),v>0&&/* @__PURE__ */qe("p",{className:"mt-1 text-xs text-gray-500",children:c.chordFolded(v)}),void 0!==B&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:b[B],rows:[{key:"total",label:c.totalFlow,color:N(B),value:u(k[B])}]})}),T&&/* @__PURE__ */qe("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */qe(Zs,{title:`${b[T.from]} → ${b[T.to]}`,rows:[{key:"value",label:c.flow,color:N(T.from),value:u(T.value)}]})}),
1024
+ /* @__PURE__ */qe(Fd,{caption:c.chord($.length),head:[c.tableFrom,c.tableTo,c.value],rows:F.map(e=>[b[e.from],b[e.to],u(e.value)])})]})}export{es as APP_UPDATE_POLL_MS,Al as Accordion,ra as AlignmentGrid,rs as AppUpdateBanner,sa as AttachButton,ia as AttachmentDropZone,oa as AttachmentList,Fc as AuthScreen,xl as Avatar,yl as AvatarGroup,Za as BORDER_WIDTHS,kl as Banner,Ad as BoxPlotChart,Bt as BrandAssetEditor,Yl as BudgetBar,Ms as CHART_INK,ln as COLUMN_COUNT_MAX,sn as COLUMN_COUNT_WIDTHS,cn as COLUMN_SHARES_EQUAL,on as COLUMN_SHARE_MIN,Ha as CONTROL_HEIGHTS,Yc as CORNERS,Jt as Calendar,jd as CandlestickChart,ka as Card,qs as CartesianPlot,yd as ChartBrush,ii as ChartDefs,xd as ChartDot,bd as ChartFrame,Vs as ChartHighlightProvider,Hs as ChartSkeleton,Zs as ChartTooltip,Dc as ChatTemplate,mt as Checkbox_default,kc as CheckoutTemplate,Ud as ChordChart,Wn as ColorPicker,On as ColorPickerPanel,En as ColorSwatch,jl as ColoredBadge,Js as ColumnChart,ca as ComposerAttachments,ao as ContainerFillChart,Po as ContextMenu,ea as CornersInput,ul as CountBadge,Gl as DAY_MS,fc as DashboardTemplate,xs as DataTable,yc as DataTablePage,yr as DatePicker_default,sr as DateRangePicker,kr as DateTimePicker_default,ol as DescriptionList,an as DisplayChips,Ka as Divider,is as Drawer,So as DropdownMenu,Qa as ELEVATION_LEVELS,Cc as EmailTemplate,zl as EmptyState,nd as EmptyValue,Ic as ErrorBoundary,Bc as ErrorPage,Ga as FONT_WEIGHTS,na as FilePicker_default,yt as FormErrorSummary,ft as FormField,wc as FormLayoutPage,Rd as FunnelChart,da as GROUP_COLORS,ua as GROUP_COLORS_SOLID,jc as GalleryTemplate,Ra as Grid,zd as HeatmapChart,bo as HelpCenter,Rn as HexInput,Pd as HistogramChart,Ye as IconButton_default,Jo as IconRail,Qo as IconRailButton,qn as ImageFocusPoint,Ba as Inline,Jr as InputNumber_default,Ge as Input_default,os as Kanban,Nt as Label,rd as LanguagePanel,td as LanguageSelect,Zn as LinkPicker,ys as ListFooter,vs as ListLoadError,Yo as ListRow,jr as MAX_FRACTION_DIGITS,si as MOTION,Xa as MOTION_DURATIONS,go as Markdown,Et as MediaUploadField,_t as MediaUploadGrid,hd as Meter,ql as MetricBar,Gi as MilestoneTimeline,st as NativeSelect,Br as NumericKeypad,Xi as POST_PRODUCTION_STATUSES,Fl as PageHeader,cs as Pagination,aa as PaperclipGlyph,Aa as Paragraph,dc as PieChart,kn as Popover,Rt as PortalBrandingProvider,ro as ProductionTimeline,Ed as RADAR_SERIES_CAP,Ja as RADIUS_ROLES,Ua as ROW_HEIGHTS,Td as RadarChart,Od as RadialBarChart,xt as RadioGroup,gt as Radio_default,Sd as RangeChart,dd as RankedBars,Cd as SCATTER_SERIES_CAP,Ns as SERIES_SLOT_COUNT,ks as SERIES_VARS,qa as SPACING_ROLES,_a as SPACING_SCALE,Zi as STAGES,$s as STATUS_VARS,Hd as SankeyChart,Ld as ScatterChart,Un as SearchableSelect,qr as Segmented,ut as Select_default,cl as SettingRow,yo as SidebarActionButton,wo as SidebarGroupLabel,$o as SidebarNavGroup,ko as SidebarNavItem,rl as Skeleton,tn as Slider,Ar as Snippet,Vo as SortableList,ws as Sparkline,Ea as Stack,$a as StatCard,pd as StatTile,pl as Statistic,xa as StatusBadge,fa as StatusBadgeProvider,Pl as Stepper,qd as SunburstChart,Yr as Switch_default,Ya as TYPE_SCALE,Sl as Tabs,va as TagInput,Sa as Text,Jn as TextLinkField,Xe as Textarea_default,Ir as TileButton_default,ad as TimeAgo,hr as TimePicker_default,Md as TimeSeriesChart,Vi as TimelineTrack,Pa as Title,Mo as TopNav,Oo as Tree,qo as TreeEmptySlot,Ro as TreeGroup,Wo as TreeGroupLabel,_o as TreeRow,Ho as TreeSeam,Wd as TreemapChart,Dd as WaterfallChart,wn as WidthsBar,Is as angleScale,zr as appendKey,Xc as applyCorners,Zc as applyIconSet,Jc as applyThemePrefs,cc as arcPath,oc as areaBetween,ic as areaFrom,Ss as assignSeriesSlots,Xs as autoHighlightIndex,Fr as backspace,js as bandScale,Rs as binValues,Ul as budgetState,ac as bumpPath,Ji as calcOverall,Qi as calcReportOverall,zn as colorFill,Fn as colorSwatchClasses,hn as columnSharesWidths,Cr as copyToClipboard,lc as curvePath,ni as dashFor,ri as fillFor,Jl as fillId,Ze as firstEnabledIndex,Zl as fmtSliderDate,Vt as fromKey,Ql as glowId,ti as groundId,ha as groupColors,Sn as hexToHsv,Gs as highlightOpacity,Dn as hsvToHex,Bl as isSeverityTone,Va as isSpacingStep,wt as labelClasses,zs as ladderScale,ed as languageSelectWidth,Je as lastEnabledIndex,ec as linearPath,As as linearScale,Ts as logScale,ei as maskId,et as matchTypeahead,$t as mediaFileName,rc as monotonePath,Qe as nextEnabledIndex,Es as niceAxis,Fs as niceMax,Mn as parseHexColor,sc as polygonPoints,Os as radiusScale,un as resolveColumnShares,mn as resolveColumnWidths,Gc as resolveCorners,Tt as resolvePortalBrandAsset,Ls as resolveSeriesColor,Ps as resolveSeriesColorWithin,Hc as resolveTheme,$r as selectionAt,Cs as seriesColor,Tl as severityOf,nc as splinePath,cd as squarify,ci as stagger,tc as stepPath,$l as tabButtonId,Ml as tabPanelId,Xl as toDayMs,rr as toISODate,Ut as toKey,Ds as toggleSeriesSlot,ts as useAppUpdate,id as useClickOutside,Ao as useContextMenu,ld as useDebouncedValue,Ys as useHighlight,Ks as usePlotWidth,Wt as usePortalBranding,eo as useProductionTimeline,ba as useStatusLabel,Qc as useTheme};