import{o as r}from"./rolldown-runtime-iuO8RvI4.js";import{Mi as o}from"./vendor-frame-CwiylG4Y.js";import{lt as t}from"./shared-frame-DbQbH4Yr.js";import{oo as e}from"./shared-4-6CEyRAHb.js";import{Is as a}from"./shared-5-UQAFGbWu.js";import{_ as i,a as n,c as s,d as c,f as d,g as u,l,m as f,s as y,v as g,y as m}from"./c2a6d07ee-z_SX0ju5.js";var p=r(o());l.register(n,s,d,f,c,y,g,m,i,u),m.positioners.cursor=function(r,o){return{x:o.x,y:o.y}};var h={primary:e.chart.categorical.byHue.blue,secondary:e.chart.categorical.byHue.aqua,tertiary:e.chart.categorical.byHue.yellow,cowork:e.chart.categorical.byHue.green,negative:e.chart.categorical.byHue.red};function b(r,o){return"dark"===o&&"modes"in r?r.modes.dark:r.value}var v={primary:h.primary.value,secondary:h.secondary.value,tertiary:h.tertiary.value,cowork:h.cowork.value,negative:h.negative.value,border:"#E5E4DD",text:"#73726C",textLight:"#6B7280"};function F(){const r=t();return(0,p.useMemo)(()=>({primary:b(h.primary,r),secondary:b(h.secondary,r),tertiary:b(h.tertiary,r),cowork:b(h.cowork,r),negative:b(h.negative,r)}),[r])}function x(r,o){if(o<r.length)return r[o];const t=Math.floor(o/r.length);return`hsl(${(function(r){const o=parseInt(r.slice(1,3),16)/255,t=parseInt(r.slice(3,5),16)/255,e=parseInt(r.slice(5,7),16)/255,a=Math.max(o,t,e),i=a-Math.min(o,t,e);if(0===i)return 0;const n=a===o?(t-e)/i%6:a===t?(e-o)/i+2:(o-t)/i+4;return Math.round((60*n+360)%360)}(r[o%r.length])+16*t)%360}, 48%, ${t%2==1?45:62}%)`}function C(r){return x(e.chart.categorical.array.slice(0,6).map(r=>r.value),r)}function k(){const r=t();return(0,p.useMemo)(()=>e.chart.categorical.array.slice(0,6).map(o=>b(o,r)),[r])}var H={default:{size:12}},w={color:v.text,font:H.default},M={light:{backgroundColor:"#FFFFFF",titleColor:"#000000",bodyColor:"#000000",borderColor:v.border,borderWidth:1,padding:8,cornerRadius:8}},W={backgroundColor:"#1F2937",titleColor:"#F9FAFB",bodyColor:"#F9FAFB",borderColor:"#374151",borderWidth:1,padding:8,cornerRadius:8},B={surface:"#FFFFFF",text:"#000000",tick:v.text,grid:v.border,font:"ui-sans-serif, system-ui, -apple-system, sans-serif"};function j(){const r=a("surface-3"),o=a("text-primary"),t=a("text-secondary"),e=a("chart-grid"),i=a("font-sans");return(0,p.useMemo)(()=>({surface:r,text:o,tick:t,grid:e,font:i}),[r,o,t,e,i])}function R(r=B){const o=r.font;return{backgroundColor:r.surface,titleColor:r.text,bodyColor:r.text,borderColor:r.grid,borderWidth:1,usePointStyle:!0,boxWidth:6,boxHeight:6,boxPadding:4,padding:10,cornerRadius:10,titleFont:{family:o,weight:"bold"},bodyFont:{family:o},position:"cursor",caretPadding:12}}function I(r=B){return{color:r.tick,font:{...H.default,family:r.font}}}function P(r){return 1===r.dataset.data.length?3:0}function A(r){return{borderColor:r,borderWidth:2,tension:.4,pointStyle:"circle",pointBackgroundColor:r,pointBorderWidth:0,pointRadius:P,pointHoverRadius:4,pointHoverBackgroundColor:r,pointHoverBorderWidth:0}}function D(r=B){return{grid:{color:r.grid,lineWidth:1},border:{dash:[3,3]}}}function E(){return{grid:{display:!1},border:{display:!1}}}export{D as a,C as c,R as d,x as f,F as h,M as i,P as l,k as m,w as n,A as o,j as p,W as r,E as s,v as t,I as u};