@weing-dev/ui-kit-primitive 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/chart.js CHANGED
@@ -1,318 +1,412 @@
1
- import { c as j, j as G } from "./compiler-runtime-BFrE5JtX.js";
2
- import { c as ne } from "./bind-D3ZJ5k4I.js";
3
- import { Bar as se, Line as ae, Pie as ie, Doughnut as ce } from "react-chartjs-2";
4
- import de from "chartjs-plugin-datalabels";
5
- import { Chart as Q, CategoryScale as pe, LinearScale as ue, BarController as he, BarElement as ge, LineController as fe, LineElement as me, PointElement as ye, ArcElement as Ce, PieController as be, DoughnutController as xe, Title as Ae, Tooltip as ve, Legend as Le, Filler as Te } from "chart.js";
6
- import W from "react";
7
- import { B as y } from "./baseColor-DYa5_IOB.js";
8
- const Pe = "_ChartFrame_1t22s_2", Ee = "_ChartState_1t22s_6", Se = {
9
- ChartFrame: Pe,
10
- ChartState: Ee
11
- }, q = ne.bind(Se), M = (t) => {
12
- const e = j.c(14), {
13
- height: o,
14
- loading: r,
15
- empty: l,
16
- isEmpty: n,
17
- className: s,
18
- children: a
19
- } = t;
20
- let i;
21
- e[0] !== s ? (i = q("ChartFrame", s), e[0] = s, e[1] = i) : i = e[1];
22
- const u = o ?? "100%", c = o ? void 0 : 240;
23
- let d;
24
- e[2] !== u || e[3] !== c ? (d = {
25
- height: u,
26
- minHeight: c
27
- }, e[2] = u, e[3] = c, e[4] = d) : d = e[4];
28
- let p;
29
- e[5] !== a || e[6] !== l || e[7] !== n || e[8] !== r ? (p = n ? /* @__PURE__ */ G.jsx("div", { className: q("ChartState"), children: l ?? "데이터가 없습니다" }) : r ? /* @__PURE__ */ G.jsx("div", { className: q("ChartState"), children: "불러오는 중…" }) : a, e[5] = a, e[6] = l, e[7] = n, e[8] = r, e[9] = p) : p = e[9];
1
+ import { c as _, j } from "./compiler-runtime-BFrE5JtX.js";
2
+ import { c as ut } from "./bind-D3ZJ5k4I.js";
3
+ import { Bar as pt, Line as ht, Pie as mt, Doughnut as gt, Radar as yt } from "react-chartjs-2";
4
+ import ft from "chartjs-plugin-datalabels";
5
+ import { Chart as ot, CategoryScale as bt, LinearScale as Ct, RadialLinearScale as xt, BarController as At, BarElement as vt, LineController as Lt, LineElement as St, PointElement as Et, ArcElement as Gt, PieController as Pt, DoughnutController as Tt, RadarController as Rt, Title as Dt, Tooltip as Bt, Legend as kt, Filler as jt } from "chart.js";
6
+ import U from "react";
7
+ import { B as S } from "./baseColor-DYa5_IOB.js";
8
+ const wt = "_ChartFrame_1t22s_2", Ot = "_ChartState_1t22s_6", _t = {
9
+ ChartFrame: wt,
10
+ ChartState: Ot
11
+ }, Y = ut.bind(_t), I = (e) => {
12
+ const t = _.c(14), {
13
+ height: r,
14
+ loading: o,
15
+ empty: n,
16
+ isEmpty: a,
17
+ className: l,
18
+ children: c
19
+ } = e;
20
+ let s;
21
+ t[0] !== l ? (s = Y("ChartFrame", l), t[0] = l, t[1] = s) : s = t[1];
22
+ const i = r ?? "100%", u = r ? void 0 : 240;
30
23
  let h;
31
- return e[10] !== i || e[11] !== d || e[12] !== p ? (h = /* @__PURE__ */ G.jsx("div", { className: i, style: d, children: p }), e[10] = i, e[11] = d, e[12] = p, e[13] = h) : h = e[13], h;
24
+ t[2] !== i || t[3] !== u ? (h = {
25
+ height: i,
26
+ minHeight: u
27
+ }, t[2] = i, t[3] = u, t[4] = h) : h = t[4];
28
+ let d;
29
+ t[5] !== c || t[6] !== n || t[7] !== a || t[8] !== o ? (d = a ? /* @__PURE__ */ j.jsx("div", { className: Y("ChartState"), children: n ?? "데이터가 없습니다" }) : o ? /* @__PURE__ */ j.jsx("div", { className: Y("ChartState"), children: "불러오는 중…" }) : c, t[5] = c, t[6] = n, t[7] = a, t[8] = o, t[9] = d) : d = t[9];
30
+ let m;
31
+ return t[10] !== s || t[11] !== h || t[12] !== d ? (m = /* @__PURE__ */ j.jsx("div", { className: s, style: h, children: d }), t[10] = s, t[11] = h, t[12] = d, t[13] = m) : m = t[13], m;
32
32
  };
33
- let Z = !1;
34
- const Be = () => {
33
+ let lt = !1;
34
+ const $t = () => {
35
35
  if (typeof window > "u") return "sans-serif";
36
- const t = getComputedStyle(document.body).fontFamily;
37
- return (t == null ? void 0 : t.trim()) || "sans-serif";
38
- }, ke = () => {
39
- Z || (Z = !0, Q.register(pe, ue, he, ge, fe, me, ye, Ce, be, xe, Ae, ve, Le, Te), Q.defaults.font.family = Be());
36
+ const e = getComputedStyle(document.body).fontFamily;
37
+ return (e == null ? void 0 : e.trim()) || "sans-serif";
38
+ }, Ft = () => {
39
+ lt || (lt = !0, ot.register(
40
+ bt,
41
+ Ct,
42
+ xt,
43
+ // radar 방사축
44
+ At,
45
+ vt,
46
+ Lt,
47
+ St,
48
+ Et,
49
+ Gt,
50
+ Pt,
51
+ Tt,
52
+ Rt,
53
+ // radar (point/line/Filler 는 위에서 공용)
54
+ Dt,
55
+ Bt,
56
+ kt,
57
+ jt
58
+ ), ot.defaults.font.family = $t());
40
59
  };
41
- ke();
42
- const Ge = {
43
- bar: se,
44
- line: ae,
45
- pie: ie,
46
- doughnut: ce
47
- }, Re = (t) => {
48
- var o, r;
49
- const e = (r = (o = t.plugins) == null ? void 0 : o.datalabels) == null ? void 0 : r.display;
50
- return e !== void 0 && e !== !1;
51
- }, I = (t) => {
52
- const e = j.c(12), {
53
- kind: o,
54
- data: r,
55
- options: l,
56
- plugins: n
57
- } = t, s = Ge[o];
58
- let a;
59
- e[0] !== n ? (a = n ?? [], e[0] = n, e[1] = a) : a = e[1];
60
+ Ft();
61
+ const Nt = {
62
+ bar: pt,
63
+ line: ht,
64
+ pie: mt,
65
+ doughnut: gt,
66
+ radar: yt
67
+ }, Wt = (e) => {
68
+ var r, o;
69
+ const t = (o = (r = e.plugins) == null ? void 0 : r.datalabels) == null ? void 0 : o.display;
70
+ return t !== void 0 && t !== !1;
71
+ }, M = (e) => {
72
+ const t = _.c(12), {
73
+ kind: r,
74
+ data: o,
75
+ options: n,
76
+ plugins: a
77
+ } = e, l = Nt[r];
78
+ let c;
79
+ t[0] !== a ? (c = a ?? [], t[0] = a, t[1] = c) : c = t[1];
80
+ let s;
81
+ t[2] !== n ? (s = Wt(n) ? [ft] : [], t[2] = n, t[3] = s) : s = t[3];
60
82
  let i;
61
- e[2] !== l ? (i = Re(l) ? [de] : [], e[2] = l, e[3] = i) : i = e[3];
62
- let u;
63
- e[4] !== a || e[5] !== i ? (u = [...a, ...i], e[4] = a, e[5] = i, e[6] = u) : u = e[6];
64
- const c = u, d = r, p = l, h = c;
65
- let m;
66
- return e[7] !== s || e[8] !== d || e[9] !== p || e[10] !== h ? (m = /* @__PURE__ */ G.jsx(s, { data: d, options: p, plugins: h }), e[7] = s, e[8] = d, e[9] = p, e[10] = h, e[11] = m) : m = e[11], m;
67
- }, De = 8, X = [y.deepGreen.DeepGreen6, y.blue.Blue6, y.gold.Gold6, y.purple.Purple6, y.cyanBlue.CyanBlue6, y.red.Red6, y.lightGreen.LightGreen6, y.grey.Grey6], je = {
68
- red: y.red.Red6,
69
- lightGreen: y.lightGreen.LightGreen6,
70
- cyanBlue: y.cyanBlue.CyanBlue6,
71
- purple: y.purple.Purple6,
72
- gold: y.gold.Gold6,
73
- blue: y.blue.Blue6,
74
- grey: y.grey.Grey6,
75
- deepGreen: y.deepGreen.DeepGreen6,
76
- primary: y.deepGreen.DeepGreen6
77
- }, V = (t) => /^(#|rgb|hsl|var\()/.test(t) ? t : je[t] ?? t, w = (t) => typeof window > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(t).trim(), we = () => {
78
- const t = Array.from({
79
- length: De
80
- }, (e, o) => w(`--chartCategorical${o}`));
81
- return t.some(Boolean) ? t.map((e, o) => e || X[o]) : X;
82
- }, te = (t, e) => {
83
- const [o, r] = W.useState(e);
84
- return W.useEffect(() => {
85
- const l = () => r(t());
86
- l();
87
- const n = window.matchMedia("(prefers-color-scheme: dark)");
88
- return n.addEventListener("change", l), () => n.removeEventListener("change", l);
89
- }, []), o;
90
- }, _e = () => te(we, X), _ = {
91
- grid: y.grey.Grey4,
92
- axis: y.grey.Grey6,
93
- label: y.grey.Grey7,
94
- tooltipBg: y.grey.Grey9,
95
- tooltipText: y.whiteWhite
96
- }, Oe = () => ({
97
- grid: w("--chartGrid") || _.grid,
98
- axis: w("--chartAxis") || _.axis,
99
- label: w("--chartLabel") || _.label,
100
- tooltipBg: w("--chartTooltipBg") || _.tooltipBg,
101
- tooltipText: w("--chartTooltipText") || _.tooltipText
102
- }), K = () => te(Oe, _), $e = (t, e) => {
103
- if (t)
104
- return Array.isArray(t) ? t.map(V) : e;
105
- }, oe = W.createContext(void 0), Fe = () => W.use(oe), Ne = {
83
+ t[4] !== c || t[5] !== s ? (i = [...c, ...s], t[4] = c, t[5] = s, t[6] = i) : i = t[6];
84
+ const u = i, h = o, d = n, m = u;
85
+ let g;
86
+ return t[7] !== l || t[8] !== h || t[9] !== d || t[10] !== m ? (g = /* @__PURE__ */ j.jsx(l, { data: h, options: d, plugins: m }), t[7] = l, t[8] = h, t[9] = d, t[10] = m, t[11] = g) : g = t[11], g;
87
+ }, It = 8, J = [S.deepGreen.DeepGreen6, S.blue.Blue6, S.gold.Gold6, S.purple.Purple6, S.cyanBlue.CyanBlue6, S.red.Red6, S.lightGreen.LightGreen6, S.grey.Grey6], Mt = {
88
+ red: S.red.Red6,
89
+ lightGreen: S.lightGreen.LightGreen6,
90
+ cyanBlue: S.cyanBlue.CyanBlue6,
91
+ purple: S.purple.Purple6,
92
+ gold: S.gold.Gold6,
93
+ blue: S.blue.Blue6,
94
+ grey: S.grey.Grey6,
95
+ deepGreen: S.deepGreen.DeepGreen6,
96
+ primary: S.deepGreen.DeepGreen6
97
+ }, X = (e) => /^(#|rgb|hsl|var\()/.test(e) ? e : Mt[e] ?? e, F = (e) => typeof window > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(e).trim(), Vt = () => {
98
+ const e = Array.from({
99
+ length: It
100
+ }, (t, r) => F(`--chartCategorical${r}`));
101
+ return e.some(Boolean) ? e.map((t, r) => t || J[r]) : J;
102
+ }, st = (e, t) => {
103
+ const [r, o] = U.useState(t);
104
+ return U.useEffect(() => {
105
+ const n = () => o(e());
106
+ n();
107
+ const a = window.matchMedia("(prefers-color-scheme: dark)");
108
+ return a.addEventListener("change", n), () => a.removeEventListener("change", n);
109
+ }, []), r;
110
+ }, Kt = () => st(Vt, J), N = {
111
+ grid: S.grey.Grey4,
112
+ axis: S.grey.Grey6,
113
+ label: S.grey.Grey7,
114
+ tooltipBg: S.grey.Grey9,
115
+ tooltipText: S.whiteWhite
116
+ }, zt = () => ({
117
+ grid: F("--chartGrid") || N.grid,
118
+ axis: F("--chartAxis") || N.axis,
119
+ label: F("--chartLabel") || N.label,
120
+ tooltipBg: F("--chartTooltipBg") || N.tooltipBg,
121
+ tooltipText: F("--chartTooltipText") || N.tooltipText
122
+ }), V = () => st(zt, N), Ht = (e, t) => {
123
+ if (e)
124
+ return Array.isArray(e) ? e.map(X) : t;
125
+ }, it = U.createContext(void 0), qt = () => U.use(it), Ut = {
106
126
  // 예) 모든 도넛 기본 정책을 켤 때:
107
127
  // doughnut: { cutout: 0.6, showTotal: true, legend: "right" },
108
128
  // bar: { barRadius: 6 },
109
- }, z = (t, e) => {
110
- const o = j.c(6), r = _e(), l = Fe(), n = Ne[t];
111
- let s;
112
- return o[0] !== e || o[1] !== t || o[2] !== n || o[3] !== l || o[4] !== r ? (s = {
113
- kind: t,
114
- instance: e,
115
- theme: l,
116
- preset: n,
117
- tokenPalette: r
118
- }, o[0] = e, o[1] = t, o[2] = n, o[3] = l, o[4] = r, o[5] = s) : s = o[5], s;
119
- }, We = (t) => {
120
- var e, o, r;
129
+ }, K = (e, t) => {
130
+ const r = _.c(6), o = Kt(), n = qt(), a = Ut[e];
131
+ let l;
132
+ return r[0] !== t || r[1] !== e || r[2] !== a || r[3] !== n || r[4] !== o ? (l = {
133
+ kind: e,
134
+ instance: t,
135
+ theme: n,
136
+ preset: a,
137
+ tokenPalette: o
138
+ }, r[0] = t, r[1] = e, r[2] = a, r[3] = n, r[4] = o, r[5] = l) : l = r[5], l;
139
+ }, Xt = (e) => {
140
+ var t, r, o;
121
141
  return {
122
- ...(e = t.theme) == null ? void 0 : e.defaults,
123
- ...(r = (o = t.theme) == null ? void 0 : o.presets) == null ? void 0 : r[t.kind]
142
+ ...(t = e.theme) == null ? void 0 : t.defaults,
143
+ ...(o = (r = e.theme) == null ? void 0 : r.presets) == null ? void 0 : o[e.kind]
124
144
  };
125
- }, Ve = (t) => {
126
- var e, o, r, l, n, s;
127
- return ((r = (o = (e = t.theme) == null ? void 0 : e.presets) == null ? void 0 : o[t.kind]) == null ? void 0 : r.palette) ?? ((n = (l = t.theme) == null ? void 0 : l.defaults) == null ? void 0 : n.palette) ?? ((s = t.theme) == null ? void 0 : s.palette);
128
- }, U = (t, e, o) => {
129
- const r = $e(t, o);
130
- return r && r.length ? r[e % r.length] : void 0;
131
- }, $ = (t, e) => {
132
- var o, r;
133
- return ((o = e.instance) == null ? void 0 : o[t]) ?? We(e)[t] ?? ((r = e.preset) == null ? void 0 : r[t]);
134
- }, Y = (t, e) => {
135
- var o, r;
136
- return U((o = e.instance) == null ? void 0 : o.colors, t, e.tokenPalette) ?? U(Ve(e), t, e.tokenPalette) ?? U((r = e.preset) == null ? void 0 : r.palette, t, e.tokenPalette) ?? e.tokenPalette[t % e.tokenPalette.length];
137
- }, ee = (t) => !!t && typeof t == "object" && !Array.isArray(t), J = (t, e) => {
138
- if (!e) return t;
139
- const o = Array.isArray(t) ? [...t] : {
140
- ...t
145
+ }, Yt = (e) => {
146
+ var t, r, o, n, a, l;
147
+ return ((o = (r = (t = e.theme) == null ? void 0 : t.presets) == null ? void 0 : r[e.kind]) == null ? void 0 : o.palette) ?? ((a = (n = e.theme) == null ? void 0 : n.defaults) == null ? void 0 : a.palette) ?? ((l = e.theme) == null ? void 0 : l.palette);
148
+ }, Z = (e, t, r) => {
149
+ const o = Ht(e, r);
150
+ return o && o.length ? o[t % o.length] : void 0;
151
+ }, W = (e, t) => {
152
+ var r, o;
153
+ return ((r = t.instance) == null ? void 0 : r[e]) ?? Xt(t)[e] ?? ((o = t.preset) == null ? void 0 : o[e]);
154
+ }, Q = (e, t) => {
155
+ var r, o;
156
+ return Z((r = t.instance) == null ? void 0 : r.colors, e, t.tokenPalette) ?? Z(Yt(t), e, t.tokenPalette) ?? Z((o = t.preset) == null ? void 0 : o.palette, e, t.tokenPalette) ?? t.tokenPalette[e % t.tokenPalette.length];
157
+ }, Zt = (e, t) => (r) => {
158
+ const {
159
+ chart: o
160
+ } = r, {
161
+ ctx: n,
162
+ chartArea: a
163
+ } = o;
164
+ if (!a) return e;
165
+ const l = n.createLinearGradient(0, a.top, 0, a.bottom);
166
+ return l.addColorStop(0, e), l.addColorStop(1, t), l;
167
+ }, nt = (e) => !!e && typeof e == "object" && !Array.isArray(e), tt = (e, t) => {
168
+ if (!t) return e;
169
+ const r = Array.isArray(e) ? [...e] : {
170
+ ...e
141
171
  };
142
- for (const r of Object.keys(e)) {
143
- const l = t == null ? void 0 : t[r], n = e[r];
144
- o[r] = ee(l) && ee(n) ? J(l, n) : n;
172
+ for (const o of Object.keys(t)) {
173
+ const n = e == null ? void 0 : e[o], a = t[o];
174
+ r[o] = nt(n) && nt(a) ? tt(n, a) : a;
145
175
  }
146
- return o;
147
- }, Me = (t, e) => /^#[0-9a-fA-F]{6}$/.test(t) ? `${t}${e}` : t, Ie = (t) => !Array.isArray(t) && "series" in t, re = (t, e, o = {}) => {
148
- const r = (n) => e.kind === "line" && o.area ? Me(n, "29") : n;
149
- if (Ie(t))
176
+ return r;
177
+ }, et = (e, t) => /^#[0-9a-fA-F]{6}$/.test(e) ? `${e}${t}` : e, Jt = (e, t) => {
178
+ const r = e === !0 ? void 0 : e.from, o = e === !0 ? void 0 : e.to;
179
+ return Zt(r ?? et(t, "33"), o ?? et(t, "03"));
180
+ }, Qt = (e) => !Array.isArray(e) && "series" in e, rt = (e, t, r = {}) => {
181
+ const o = t.kind === "line" || t.kind === "radar", n = (l) => o && r.area ? et(l, "29") : l;
182
+ if (Qt(e))
150
183
  return {
151
- labels: t.labels,
152
- datasets: t.series.map((n, s) => {
153
- const a = n.color ? V(n.color) : Y(s, e);
184
+ labels: e.labels,
185
+ datasets: e.series.map((l, c) => {
186
+ const s = l.color ? X(l.color) : Q(c, t), i = t.kind === "line" ? l.gradient : void 0, u = i != null && i !== !1;
154
187
  return {
155
- label: n.name,
156
- data: n.values,
157
- backgroundColor: r(a),
158
- borderColor: a,
159
- fill: e.kind === "line" ? !!o.area : void 0,
160
- tension: o.tension,
161
- pointStyle: o.pointStyle,
162
- borderWidth: o.lineWidth
188
+ label: l.name,
189
+ data: l.values,
190
+ backgroundColor: u ? Jt(i, s) : n(s),
191
+ borderColor: s,
192
+ fill: o ? u || !!r.area : void 0,
193
+ tension: r.tension,
194
+ pointStyle: r.pointStyle,
195
+ borderWidth: r.lineWidth,
196
+ // ── 데이터셋 단위 옵션 (① 듀얼축·점선·null 구간) ──
197
+ yAxisID: l.yAxisID,
198
+ borderDash: l.borderDash,
199
+ spanGaps: l.spanGaps
163
200
  };
164
201
  })
165
202
  };
166
- const l = t.map((n, s) => n.color ? V(n.color) : Y(s, e));
203
+ const a = e.map((l, c) => l.color ? X(l.color) : Q(c, t));
167
204
  return {
168
- labels: t.map((n) => n.label),
205
+ labels: e.map((l) => l.label),
169
206
  datasets: [{
170
207
  label: "",
171
- data: t.map((n) => n.value),
172
- backgroundColor: e.kind === "line" ? r(l[0]) : l,
173
- borderColor: l,
174
- fill: e.kind === "line" ? !!o.area : void 0,
175
- tension: o.tension,
176
- pointStyle: o.pointStyle,
177
- borderWidth: o.lineWidth
208
+ data: e.map((l) => l.value),
209
+ // line/radar 단일색 면적, bar/pie 항목별 색
210
+ backgroundColor: o ? n(a[0]) : a,
211
+ // radar 단일 시리즈는 한 색, 그 외(line 기존동작 포함)는 항목별 배열
212
+ borderColor: t.kind === "radar" ? a[0] : a,
213
+ fill: o ? !!r.area : void 0,
214
+ tension: r.tension,
215
+ pointStyle: r.pointStyle,
216
+ borderWidth: r.lineWidth
178
217
  }]
179
218
  };
180
- }, le = (t, e) => ({
181
- labels: t.map((o) => o.label),
219
+ }, ct = (e, t) => ({
220
+ labels: e.map((r) => r.label),
182
221
  datasets: [{
183
222
  label: "",
184
- data: t.map((o) => o.value),
185
- backgroundColor: t.map((o, r) => o.color ? V(o.color) : Y(r, e)),
223
+ data: e.map((r) => r.value),
224
+ backgroundColor: e.map((r, o) => r.color ? X(r.color) : Q(o, t)),
186
225
  borderWidth: 0
187
226
  }]
188
- }), Ke = (t) => t === !1 ? {
227
+ }), te = (e) => e === !1 ? {
189
228
  display: !1
190
- } : t === !0 || t === void 0 ? {
229
+ } : e === !0 || e === void 0 ? {
191
230
  display: !0,
192
231
  position: "top"
193
232
  } : {
194
233
  display: !0,
195
- position: t
196
- }, ze = {
234
+ position: e
235
+ }, ee = {
197
236
  top: 24,
198
237
  right: 28,
199
238
  left: 8
200
- }, He = (t, e, o) => t ? {
239
+ }, re = (e, t, r) => e ? {
201
240
  display: "auto",
202
- color: e ? o.label : "#fff",
203
- anchor: e ? "end" : "center",
204
- align: e ? "top" : "center",
241
+ color: t ? r.label : "#fff",
242
+ anchor: t ? "end" : "center",
243
+ align: t ? "top" : "center",
205
244
  // 차트 영역 밖으로 라벨이 잘리지 않도록 안쪽으로 강제 (라인 양 끝 점 등)
206
245
  clamp: !0,
207
246
  font: {
208
247
  weight: 600
209
248
  },
210
- formatter: typeof t == "function" ? t : (r) => typeof r == "number" ? r.toLocaleString() : r
249
+ formatter: typeof e == "function" ? e : (o) => typeof o == "number" ? o.toLocaleString() : o
211
250
  } : {
212
251
  display: !1
213
- }, H = ({
214
- kind: t,
215
- base: e,
216
- tokens: o,
217
- extra: r
252
+ }, at = (e, t, r) => {
253
+ const o = t == null ? void 0 : t.tickFormat;
254
+ return {
255
+ grid: {
256
+ color: e.grid,
257
+ // 보조축 격자는 주축과 겹쳐 지저분해지므로 차트 영역엔 안 그림
258
+ ...r === "right" ? {
259
+ drawOnChartArea: !1
260
+ } : {}
261
+ },
262
+ ticks: {
263
+ color: e.label,
264
+ ...o ? {
265
+ callback: (n) => o(Number(n))
266
+ } : {}
267
+ },
268
+ border: {
269
+ color: e.axis
270
+ },
271
+ ...(t == null ? void 0 : t.max) != null ? {
272
+ max: t.max
273
+ } : {},
274
+ ...(t == null ? void 0 : t.min) != null ? {
275
+ min: t.min
276
+ } : {},
277
+ ...r ? {
278
+ position: r
279
+ } : {},
280
+ ...t != null && t.title ? {
281
+ title: {
282
+ display: !0,
283
+ text: t.title,
284
+ color: e.label
285
+ }
286
+ } : {}
287
+ };
288
+ }, oe = (e, t, r) => {
289
+ if (e === "bar" || e === "line")
290
+ return {
291
+ x: {
292
+ grid: {
293
+ color: t.grid
294
+ },
295
+ ticks: {
296
+ color: t.label
297
+ },
298
+ border: {
299
+ color: t.axis
300
+ }
301
+ },
302
+ y: at(t, r == null ? void 0 : r.y, "left"),
303
+ ...r != null && r.y1 ? {
304
+ y1: at(t, r.y1, "right")
305
+ } : {}
306
+ };
307
+ if (e === "radar")
308
+ return {
309
+ r: {
310
+ grid: {
311
+ color: t.grid
312
+ },
313
+ angleLines: {
314
+ color: t.grid
315
+ },
316
+ pointLabels: {
317
+ color: t.label
318
+ },
319
+ ticks: {
320
+ color: t.label,
321
+ backdropColor: "transparent"
322
+ },
323
+ beginAtZero: !0
324
+ }
325
+ };
326
+ }, z = ({
327
+ kind: e,
328
+ base: t,
329
+ tokens: r,
330
+ extra: o,
331
+ axes: n
218
332
  }) => {
219
- const l = t === "bar" || t === "line", n = {
333
+ const a = e === "bar" || e === "line", l = oe(e, r, n), c = {
220
334
  responsive: !0,
221
- maintainAspectRatio: e.height == null,
222
- aspectRatio: e.aspectRatio,
335
+ maintainAspectRatio: t.height == null,
336
+ aspectRatio: t.aspectRatio,
223
337
  // 영역 여백: padding prop 이 최우선, 없으면 valueLabel·직교좌표 시 기본 여백(라벨 잘림 방지)
224
338
  layout: (() => {
225
- const a = e.padding ?? (e.valueLabel && l ? ze : void 0);
226
- return a ? {
227
- padding: a
339
+ const i = t.padding ?? (t.valueLabel && a ? ee : void 0);
340
+ return i ? {
341
+ padding: i
228
342
  } : void 0;
229
343
  })(),
230
344
  plugins: {
231
- legend: Ke(e.legend),
232
- title: e.title ? {
345
+ legend: te(t.legend),
346
+ title: t.title ? {
233
347
  display: !0,
234
- text: e.title,
235
- color: o.label
348
+ text: t.title,
349
+ color: r.label
236
350
  } : {
237
351
  display: !1
238
352
  },
239
353
  tooltip: {
240
- backgroundColor: o.tooltipBg,
241
- titleColor: o.tooltipText,
242
- bodyColor: o.tooltipText
354
+ backgroundColor: r.tooltipBg,
355
+ titleColor: r.tooltipText,
356
+ bodyColor: r.tooltipText
243
357
  },
244
- datalabels: He(e.valueLabel, l, o)
358
+ datalabels: re(t.valueLabel, a, r)
245
359
  },
246
360
  ...l ? {
247
- scales: {
248
- x: {
249
- grid: {
250
- color: o.grid
251
- },
252
- ticks: {
253
- color: o.label
254
- },
255
- border: {
256
- color: o.axis
257
- }
258
- },
259
- y: {
260
- grid: {
261
- color: o.grid
262
- },
263
- ticks: {
264
- color: o.label
265
- },
266
- border: {
267
- color: o.axis
268
- }
269
- }
270
- }
361
+ scales: l
271
362
  } : {}
272
- }, s = J(J(n, r), e.options);
273
- return e.rawOptions ?? s;
274
- }, qe = (t) => Array.isArray(t) ? t.length === 0 : t.series.length === 0, lt = (t) => {
275
- const e = j.c(32), {
276
- data: o,
277
- orientation: r,
278
- stacked: l,
279
- barRadius: n,
280
- barThickness: s,
281
- colors: a,
282
- title: i,
283
- legend: u,
284
- height: c,
285
- aspectRatio: d,
286
- padding: p,
287
- loading: h,
288
- empty: m,
289
- className: x,
290
- valueLabel: v,
291
- options: S,
292
- rawOptions: g
293
- } = t, L = r === void 0 ? "vertical" : r;
294
- let C;
295
- e[0] !== n || e[1] !== a ? (C = {
296
- colors: a,
297
- barRadius: n
298
- }, e[0] = n, e[1] = a, e[2] = C) : C = e[2];
299
- const A = z("bar", C), T = K();
363
+ }, s = tt(tt(c, o), t.options);
364
+ return t.rawOptions ?? s;
365
+ }, le = (e) => Array.isArray(e) ? e.length === 0 : e.series.length === 0, ye = (e) => {
366
+ const t = _.c(35), {
367
+ data: r,
368
+ orientation: o,
369
+ stacked: n,
370
+ barRadius: a,
371
+ barThickness: l,
372
+ yAxis: c,
373
+ y1Axis: s,
374
+ colors: i,
375
+ title: u,
376
+ legend: h,
377
+ height: d,
378
+ aspectRatio: m,
379
+ padding: g,
380
+ loading: E,
381
+ empty: v,
382
+ className: G,
383
+ valueLabel: R,
384
+ options: p,
385
+ rawOptions: L,
386
+ plugins: P
387
+ } = e, T = o === void 0 ? "vertical" : o;
300
388
  let f;
301
- if (e[3] !== s || e[4] !== o || e[5] !== A) {
302
- const D = $("barRadius", A);
303
- f = re(o, A), f.datasets = f.datasets.map((O) => ({
304
- ...O,
305
- borderRadius: D,
306
- barThickness: s
307
- })), e[3] = s, e[4] = o, e[5] = A, e[6] = f;
389
+ t[0] !== a || t[1] !== i ? (f = {
390
+ colors: i,
391
+ barRadius: a
392
+ }, t[0] = a, t[1] = i, t[2] = f) : f = t[2];
393
+ const b = K("bar", f), y = V();
394
+ let C;
395
+ if (t[3] !== l || t[4] !== r || t[5] !== b) {
396
+ const O = W("barRadius", b);
397
+ C = rt(r, b), C.datasets = C.datasets.map(($) => ({
398
+ ...$,
399
+ borderRadius: O,
400
+ barThickness: l
401
+ })), t[3] = l, t[4] = r, t[5] = b, t[6] = C;
308
402
  } else
309
- f = e[6];
310
- const b = L === "horizontal" ? "y" : "x";
311
- let B;
312
- if (e[7] !== d || e[8] !== o || e[9] !== c || e[10] !== u || e[11] !== S || e[12] !== p || e[13] !== g || e[14] !== l || e[15] !== b || e[16] !== i || e[17] !== T || e[18] !== v) {
313
- const D = {
314
- indexAxis: b,
315
- ...l ? {
403
+ C = t[6];
404
+ const x = T === "horizontal" ? "y" : "x";
405
+ let A;
406
+ if (t[7] !== m || t[8] !== r || t[9] !== d || t[10] !== h || t[11] !== p || t[12] !== g || t[13] !== L || t[14] !== n || t[15] !== x || t[16] !== u || t[17] !== y || t[18] !== R || t[19] !== s || t[20] !== c) {
407
+ const O = {
408
+ indexAxis: x,
409
+ ...n ? {
316
410
  scales: {
317
411
  x: {
318
412
  stacked: !0
@@ -322,220 +416,298 @@ const Ge = {
322
416
  }
323
417
  }
324
418
  } : {}
325
- }, O = u ?? (Array.isArray(o) ? !1 : void 0);
326
- B = H({
419
+ }, $ = h ?? (Array.isArray(r) ? !1 : void 0);
420
+ A = z({
327
421
  kind: "bar",
328
422
  base: {
329
- title: i,
330
- legend: O,
331
- height: c,
332
- aspectRatio: d,
333
- padding: p,
334
- valueLabel: v,
335
- options: S,
336
- rawOptions: g
423
+ title: u,
424
+ legend: $,
425
+ height: d,
426
+ aspectRatio: m,
427
+ padding: g,
428
+ valueLabel: R,
429
+ options: p,
430
+ rawOptions: L
337
431
  },
338
- tokens: T,
339
- extra: D
340
- }), e[7] = d, e[8] = o, e[9] = c, e[10] = u, e[11] = S, e[12] = p, e[13] = g, e[14] = l, e[15] = b, e[16] = i, e[17] = T, e[18] = v, e[19] = B;
432
+ tokens: y,
433
+ extra: O,
434
+ axes: {
435
+ y: c,
436
+ y1: s
437
+ }
438
+ }), t[7] = m, t[8] = r, t[9] = d, t[10] = h, t[11] = p, t[12] = g, t[13] = L, t[14] = n, t[15] = x, t[16] = u, t[17] = y, t[18] = R, t[19] = s, t[20] = c, t[21] = A;
341
439
  } else
342
- B = e[19];
343
- const R = B;
344
- let P;
345
- e[20] !== o ? (P = qe(o), e[20] = o, e[21] = P) : P = e[21];
346
- let E;
347
- e[22] !== f || e[23] !== R ? (E = /* @__PURE__ */ G.jsx(I, { kind: "bar", data: f, options: R }), e[22] = f, e[23] = R, e[24] = E) : E = e[24];
440
+ A = t[21];
441
+ const B = A;
442
+ let D;
443
+ t[22] !== r ? (D = le(r), t[22] = r, t[23] = D) : D = t[23];
348
444
  let k;
349
- return e[25] !== x || e[26] !== m || e[27] !== c || e[28] !== h || e[29] !== P || e[30] !== E ? (k = /* @__PURE__ */ G.jsx(M, { height: c, loading: h, empty: m, isEmpty: P, className: x, children: E }), e[25] = x, e[26] = m, e[27] = c, e[28] = h, e[29] = P, e[30] = E, e[31] = k) : k = e[31], k;
350
- }, Ue = (t) => Array.isArray(t) ? t.length === 0 : t.series.length === 0, nt = (t) => {
351
- const e = j.c(31), {
352
- data: o,
353
- area: r,
354
- tension: l,
355
- pointStyle: n,
356
- lineWidth: s,
357
- colors: a,
358
- title: i,
359
- legend: u,
360
- height: c,
361
- aspectRatio: d,
362
- padding: p,
363
- loading: h,
364
- empty: m,
365
- className: x,
366
- valueLabel: v,
367
- options: S,
368
- rawOptions: g
369
- } = t;
370
- let L;
371
- e[0] !== a || e[1] !== n || e[2] !== l ? (L = {
372
- colors: a,
373
- tension: l,
374
- pointStyle: n
375
- }, e[0] = a, e[1] = n, e[2] = l, e[3] = L) : L = e[3];
376
- const C = z("line", L), A = K();
445
+ t[24] !== C || t[25] !== B || t[26] !== P ? (k = /* @__PURE__ */ j.jsx(M, { kind: "bar", data: C, options: B, plugins: P }), t[24] = C, t[25] = B, t[26] = P, t[27] = k) : k = t[27];
446
+ let w;
447
+ return t[28] !== G || t[29] !== v || t[30] !== d || t[31] !== E || t[32] !== D || t[33] !== k ? (w = /* @__PURE__ */ j.jsx(I, { height: d, loading: E, empty: v, isEmpty: D, className: G, children: k }), t[28] = G, t[29] = v, t[30] = d, t[31] = E, t[32] = D, t[33] = k, t[34] = w) : w = t[34], w;
448
+ }, ne = (e) => Array.isArray(e) ? e.length === 0 : e.series.length === 0, fe = (e) => {
449
+ const t = _.c(34), {
450
+ data: r,
451
+ area: o,
452
+ tension: n,
453
+ pointStyle: a,
454
+ lineWidth: l,
455
+ yAxis: c,
456
+ y1Axis: s,
457
+ colors: i,
458
+ title: u,
459
+ legend: h,
460
+ height: d,
461
+ aspectRatio: m,
462
+ padding: g,
463
+ loading: E,
464
+ empty: v,
465
+ className: G,
466
+ valueLabel: R,
467
+ options: p,
468
+ rawOptions: L,
469
+ plugins: P
470
+ } = e;
377
471
  let T;
378
- e[4] !== r || e[5] !== o || e[6] !== s || e[7] !== C ? (T = re(o, C, {
379
- area: r,
380
- tension: $("tension", C) ?? 0.4,
381
- pointStyle: $("pointStyle", C),
382
- lineWidth: s
383
- }), e[4] = r, e[5] = o, e[6] = s, e[7] = C, e[8] = T) : T = e[8];
384
- const f = T, b = u ?? (Array.isArray(o) ? !1 : void 0);
385
- let B;
386
- e[9] !== d || e[10] !== c || e[11] !== b || e[12] !== S || e[13] !== p || e[14] !== g || e[15] !== i || e[16] !== A || e[17] !== v ? (B = H({
472
+ t[0] !== i || t[1] !== a || t[2] !== n ? (T = {
473
+ colors: i,
474
+ tension: n,
475
+ pointStyle: a
476
+ }, t[0] = i, t[1] = a, t[2] = n, t[3] = T) : T = t[3];
477
+ const f = K("line", T), b = V();
478
+ let y;
479
+ t[4] !== o || t[5] !== r || t[6] !== l || t[7] !== f ? (y = rt(r, f, {
480
+ area: o,
481
+ tension: W("tension", f) ?? 0.4,
482
+ pointStyle: W("pointStyle", f),
483
+ lineWidth: l
484
+ }), t[4] = o, t[5] = r, t[6] = l, t[7] = f, t[8] = y) : y = t[8];
485
+ const C = y, x = h ?? (Array.isArray(r) ? !1 : void 0);
486
+ let A;
487
+ t[9] !== m || t[10] !== d || t[11] !== x || t[12] !== p || t[13] !== g || t[14] !== L || t[15] !== u || t[16] !== b || t[17] !== R || t[18] !== s || t[19] !== c ? (A = z({
387
488
  kind: "line",
388
489
  base: {
389
- title: i,
390
- legend: b,
391
- height: c,
392
- aspectRatio: d,
393
- padding: p,
394
- valueLabel: v,
395
- options: S,
396
- rawOptions: g
490
+ title: u,
491
+ legend: x,
492
+ height: d,
493
+ aspectRatio: m,
494
+ padding: g,
495
+ valueLabel: R,
496
+ options: p,
497
+ rawOptions: L
397
498
  },
398
- tokens: A
399
- }), e[9] = d, e[10] = c, e[11] = b, e[12] = S, e[13] = p, e[14] = g, e[15] = i, e[16] = A, e[17] = v, e[18] = B) : B = e[18];
400
- const R = B;
401
- let P;
402
- e[19] !== o ? (P = Ue(o), e[19] = o, e[20] = P) : P = e[20];
403
- let E;
404
- e[21] !== f || e[22] !== R ? (E = /* @__PURE__ */ G.jsx(I, { kind: "line", data: f, options: R }), e[21] = f, e[22] = R, e[23] = E) : E = e[23];
499
+ tokens: b,
500
+ axes: {
501
+ y: c,
502
+ y1: s
503
+ }
504
+ }), t[9] = m, t[10] = d, t[11] = x, t[12] = p, t[13] = g, t[14] = L, t[15] = u, t[16] = b, t[17] = R, t[18] = s, t[19] = c, t[20] = A) : A = t[20];
505
+ const B = A;
506
+ let D;
507
+ t[21] !== r ? (D = ne(r), t[21] = r, t[22] = D) : D = t[22];
405
508
  let k;
406
- return e[24] !== x || e[25] !== m || e[26] !== c || e[27] !== h || e[28] !== P || e[29] !== E ? (k = /* @__PURE__ */ G.jsx(M, { height: c, loading: h, empty: m, isEmpty: P, className: x, children: E }), e[24] = x, e[25] = m, e[26] = c, e[27] = h, e[28] = P, e[29] = E, e[30] = k) : k = e[30], k;
407
- }, st = (t) => {
408
- const e = j.c(25), {
409
- data: o,
410
- colors: r,
411
- title: l,
412
- legend: n,
413
- height: s,
414
- aspectRatio: a,
415
- padding: i,
416
- loading: u,
417
- empty: c,
418
- className: d,
419
- valueLabel: p,
420
- options: h,
421
- rawOptions: m
422
- } = t;
423
- let x;
424
- e[0] !== r ? (x = {
425
- colors: r
426
- }, e[0] = r, e[1] = x) : x = e[1];
427
- const v = z("pie", x), S = K();
428
- let g;
429
- e[2] !== o || e[3] !== v ? (g = le(o, v), e[2] = o, e[3] = v, e[4] = g) : g = e[4];
430
- const L = g;
431
- let C;
432
- e[5] !== a || e[6] !== s || e[7] !== n || e[8] !== h || e[9] !== i || e[10] !== m || e[11] !== l || e[12] !== S || e[13] !== p ? (C = H({
509
+ t[23] !== C || t[24] !== B || t[25] !== P ? (k = /* @__PURE__ */ j.jsx(M, { kind: "line", data: C, options: B, plugins: P }), t[23] = C, t[24] = B, t[25] = P, t[26] = k) : k = t[26];
510
+ let w;
511
+ return t[27] !== G || t[28] !== v || t[29] !== d || t[30] !== E || t[31] !== D || t[32] !== k ? (w = /* @__PURE__ */ j.jsx(I, { height: d, loading: E, empty: v, isEmpty: D, className: G, children: k }), t[27] = G, t[28] = v, t[29] = d, t[30] = E, t[31] = D, t[32] = k, t[33] = w) : w = t[33], w;
512
+ }, be = (e) => {
513
+ const t = _.c(26), {
514
+ data: r,
515
+ colors: o,
516
+ title: n,
517
+ legend: a,
518
+ height: l,
519
+ aspectRatio: c,
520
+ padding: s,
521
+ loading: i,
522
+ empty: u,
523
+ className: h,
524
+ valueLabel: d,
525
+ options: m,
526
+ rawOptions: g,
527
+ plugins: E
528
+ } = e;
529
+ let v;
530
+ t[0] !== o ? (v = {
531
+ colors: o
532
+ }, t[0] = o, t[1] = v) : v = t[1];
533
+ const G = K("pie", v), R = V();
534
+ let p;
535
+ t[2] !== r || t[3] !== G ? (p = ct(r, G), t[2] = r, t[3] = G, t[4] = p) : p = t[4];
536
+ const L = p;
537
+ let P;
538
+ t[5] !== c || t[6] !== l || t[7] !== a || t[8] !== m || t[9] !== s || t[10] !== g || t[11] !== n || t[12] !== R || t[13] !== d ? (P = z({
433
539
  kind: "pie",
434
540
  base: {
435
- title: l,
436
- legend: n,
437
- height: s,
438
- aspectRatio: a,
439
- padding: i,
440
- valueLabel: p,
441
- options: h,
442
- rawOptions: m
541
+ title: n,
542
+ legend: a,
543
+ height: l,
544
+ aspectRatio: c,
545
+ padding: s,
546
+ valueLabel: d,
547
+ options: m,
548
+ rawOptions: g
443
549
  },
444
- tokens: S
445
- }), e[5] = a, e[6] = s, e[7] = n, e[8] = h, e[9] = i, e[10] = m, e[11] = l, e[12] = S, e[13] = p, e[14] = C) : C = e[14];
446
- const A = C, T = o.length === 0;
447
- let f;
448
- e[15] !== L || e[16] !== A ? (f = /* @__PURE__ */ G.jsx(I, { kind: "pie", data: L, options: A }), e[15] = L, e[16] = A, e[17] = f) : f = e[17];
550
+ tokens: R
551
+ }), t[5] = c, t[6] = l, t[7] = a, t[8] = m, t[9] = s, t[10] = g, t[11] = n, t[12] = R, t[13] = d, t[14] = P) : P = t[14];
552
+ const T = P, f = r.length === 0;
449
553
  let b;
450
- return e[18] !== d || e[19] !== c || e[20] !== s || e[21] !== u || e[22] !== T || e[23] !== f ? (b = /* @__PURE__ */ G.jsx(M, { height: s, loading: u, empty: c, isEmpty: T, className: d, children: f }), e[18] = d, e[19] = c, e[20] = s, e[21] = u, e[22] = T, e[23] = f, e[24] = b) : b = e[24], b;
451
- }, Xe = (t, e) => ({
554
+ t[15] !== L || t[16] !== T || t[17] !== E ? (b = /* @__PURE__ */ j.jsx(M, { kind: "pie", data: L, options: T, plugins: E }), t[15] = L, t[16] = T, t[17] = E, t[18] = b) : b = t[18];
555
+ let y;
556
+ return t[19] !== h || t[20] !== u || t[21] !== l || t[22] !== i || t[23] !== f || t[24] !== b ? (y = /* @__PURE__ */ j.jsx(I, { height: l, loading: i, empty: u, isEmpty: f, className: h, children: b }), t[19] = h, t[20] = u, t[21] = l, t[22] = i, t[23] = f, t[24] = b, t[25] = y) : y = t[25], y;
557
+ }, ae = (e, t) => ({
452
558
  id: "centerTotal",
453
- afterDraw(o) {
559
+ afterDraw(r) {
454
560
  const {
455
- ctx: r,
456
- chartArea: l
457
- } = o;
458
- if (!l) return;
459
- const n = (l.left + l.right) / 2, s = (l.top + l.bottom) / 2;
460
- r.save(), r.textAlign = "center", r.textBaseline = "middle", r.fillStyle = e, r.font = "600 18px sans-serif", r.fillText(t, n, s), r.restore();
561
+ ctx: o,
562
+ chartArea: n
563
+ } = r;
564
+ if (!n) return;
565
+ const a = (n.left + n.right) / 2, l = (n.top + n.bottom) / 2;
566
+ o.save(), o.textAlign = "center", o.textBaseline = "middle", o.fillStyle = t, o.font = "600 18px sans-serif", o.fillText(e, a, l), o.restore();
461
567
  }
462
- }), at = (t) => {
463
- const e = j.c(49), {
464
- data: o,
465
- showTotal: r,
466
- cutout: l,
467
- colors: n,
468
- title: s,
469
- legend: a,
470
- height: i,
471
- aspectRatio: u,
472
- padding: c,
473
- loading: d,
474
- empty: p,
475
- className: h,
476
- valueLabel: m,
477
- options: x,
478
- rawOptions: v
479
- } = t;
480
- let S;
481
- e[0] !== n || e[1] !== l || e[2] !== r ? (S = {
482
- colors: n,
483
- cutout: l,
484
- showTotal: r
485
- }, e[0] = n, e[1] = l, e[2] = r, e[3] = S) : S = e[3];
486
- const g = z("doughnut", S), L = K();
487
- let C;
488
- e[4] !== g ? (C = $("cutout", g) ?? 0.6, e[4] = g, e[5] = C) : C = e[5];
489
- const A = C;
490
- let T;
491
- e[6] !== g ? (T = $("showTotal", g) ?? !1, e[6] = g, e[7] = T) : T = e[7];
492
- const f = T;
493
- let b, B, R;
494
- if (e[8] !== u || e[9] !== A || e[10] !== o || e[11] !== i || e[12] !== a || e[13] !== x || e[14] !== c || e[15] !== v || e[16] !== f || e[17] !== g || e[18] !== s || e[19] !== L || e[20] !== m) {
495
- const O = o.reduce(Ye, 0);
496
- let F;
497
- e[24] !== o || e[25] !== g ? (F = le(o, g), e[24] = o, e[25] = g, e[26] = F) : F = e[26], b = F;
498
- let N;
499
- e[27] !== u || e[28] !== A || e[29] !== i || e[30] !== a || e[31] !== x || e[32] !== c || e[33] !== v || e[34] !== s || e[35] !== L || e[36] !== m ? (N = H({
568
+ }), Ce = (e) => {
569
+ const t = _.c(56), {
570
+ data: r,
571
+ showTotal: o,
572
+ cutout: n,
573
+ colors: a,
574
+ title: l,
575
+ legend: c,
576
+ height: s,
577
+ aspectRatio: i,
578
+ padding: u,
579
+ loading: h,
580
+ empty: d,
581
+ className: m,
582
+ valueLabel: g,
583
+ options: E,
584
+ rawOptions: v,
585
+ plugins: G
586
+ } = e;
587
+ let R;
588
+ t[0] !== a || t[1] !== n || t[2] !== o ? (R = {
589
+ colors: a,
590
+ cutout: n,
591
+ showTotal: o
592
+ }, t[0] = a, t[1] = n, t[2] = o, t[3] = R) : R = t[3];
593
+ const p = K("doughnut", R), L = V();
594
+ let P;
595
+ t[4] !== p ? (P = W("cutout", p) ?? 0.6, t[4] = p, t[5] = P) : P = t[5];
596
+ const T = P;
597
+ let f;
598
+ t[6] !== p ? (f = W("showTotal", p) ?? !1, t[6] = p, t[7] = f) : f = t[7];
599
+ const b = f;
600
+ let y, C, x, A;
601
+ if (t[8] !== i || t[9] !== T || t[10] !== r || t[11] !== s || t[12] !== c || t[13] !== E || t[14] !== u || t[15] !== G || t[16] !== v || t[17] !== b || t[18] !== p || t[19] !== l || t[20] !== L || t[21] !== g) {
602
+ const dt = r.reduce(se, 0);
603
+ let H;
604
+ t[26] !== r || t[27] !== p ? (H = ct(r, p), t[26] = r, t[27] = p, t[28] = H) : H = t[28], y = H;
605
+ let q;
606
+ t[29] !== i || t[30] !== T || t[31] !== s || t[32] !== c || t[33] !== E || t[34] !== u || t[35] !== v || t[36] !== l || t[37] !== L || t[38] !== g ? (q = z({
500
607
  kind: "doughnut",
501
608
  base: {
502
- title: s,
503
- legend: a,
504
- height: i,
505
- aspectRatio: u,
506
- padding: c,
507
- valueLabel: m,
508
- options: x,
609
+ title: l,
610
+ legend: c,
611
+ height: s,
612
+ aspectRatio: i,
613
+ padding: u,
614
+ valueLabel: g,
615
+ options: E,
509
616
  rawOptions: v
510
617
  },
511
618
  tokens: L,
512
619
  extra: {
513
- cutout: `${A * 100}%`
620
+ cutout: `${T * 100}%`
514
621
  }
515
- }), e[27] = u, e[28] = A, e[29] = i, e[30] = a, e[31] = x, e[32] = c, e[33] = v, e[34] = s, e[35] = L, e[36] = m, e[37] = N) : N = e[37], B = N, R = f ? [Xe(O.toLocaleString(), L.label)] : void 0, e[8] = u, e[9] = A, e[10] = o, e[11] = i, e[12] = a, e[13] = x, e[14] = c, e[15] = v, e[16] = f, e[17] = g, e[18] = s, e[19] = L, e[20] = m, e[21] = b, e[22] = B, e[23] = R;
622
+ }), t[29] = i, t[30] = T, t[31] = s, t[32] = c, t[33] = E, t[34] = u, t[35] = v, t[36] = l, t[37] = L, t[38] = g, t[39] = q) : q = t[39], C = q, t[40] !== G ? (x = G ?? [], t[40] = G, t[41] = x) : x = t[41], A = b ? [ae(dt.toLocaleString(), L.label)] : [], t[8] = i, t[9] = T, t[10] = r, t[11] = s, t[12] = c, t[13] = E, t[14] = u, t[15] = G, t[16] = v, t[17] = b, t[18] = p, t[19] = l, t[20] = L, t[21] = g, t[22] = y, t[23] = C, t[24] = x, t[25] = A;
516
623
  } else
517
- b = e[21], B = e[22], R = e[23];
518
- const P = R, E = o.length === 0;
519
- let k;
520
- e[38] !== b || e[39] !== B || e[40] !== P ? (k = /* @__PURE__ */ G.jsx(I, { kind: "doughnut", data: b, options: B, plugins: P }), e[38] = b, e[39] = B, e[40] = P, e[41] = k) : k = e[41];
521
- let D;
522
- return e[42] !== h || e[43] !== p || e[44] !== i || e[45] !== d || e[46] !== E || e[47] !== k ? (D = /* @__PURE__ */ G.jsx(M, { height: i, loading: d, empty: p, isEmpty: E, className: h, children: k }), e[42] = h, e[43] = p, e[44] = i, e[45] = d, e[46] = E, e[47] = k, e[48] = D) : D = e[48], D;
624
+ y = t[22], C = t[23], x = t[24], A = t[25];
625
+ let B;
626
+ t[42] !== x || t[43] !== A ? (B = [...x, ...A], t[42] = x, t[43] = A, t[44] = B) : B = t[44];
627
+ const D = B, k = r.length === 0, w = D.length ? D : void 0;
628
+ let O;
629
+ t[45] !== y || t[46] !== C || t[47] !== w ? (O = /* @__PURE__ */ j.jsx(M, { kind: "doughnut", data: y, options: C, plugins: w }), t[45] = y, t[46] = C, t[47] = w, t[48] = O) : O = t[48];
630
+ let $;
631
+ return t[49] !== m || t[50] !== d || t[51] !== s || t[52] !== h || t[53] !== k || t[54] !== O ? ($ = /* @__PURE__ */ j.jsx(I, { height: s, loading: h, empty: d, isEmpty: k, className: m, children: O }), t[49] = m, t[50] = d, t[51] = s, t[52] = h, t[53] = k, t[54] = O, t[55] = $) : $ = t[55], $;
523
632
  };
524
- function Ye(t, e) {
525
- return t + e.value;
633
+ function se(e, t) {
634
+ return e + t.value;
526
635
  }
527
- const it = (t) => {
528
- const e = j.c(3), {
529
- value: o,
530
- children: r
531
- } = t;
532
- let l;
533
- return e[0] !== r || e[1] !== o ? (l = /* @__PURE__ */ G.jsx(oe, { value: o, children: r }), e[0] = r, e[1] = o, e[2] = l) : l = e[2], l;
636
+ const ie = (e) => Array.isArray(e) ? e.length === 0 : e.series.length === 0, xe = (e) => {
637
+ const t = _.c(30), {
638
+ data: r,
639
+ max: o,
640
+ fill: n,
641
+ colors: a,
642
+ title: l,
643
+ legend: c,
644
+ height: s,
645
+ aspectRatio: i,
646
+ padding: u,
647
+ loading: h,
648
+ empty: d,
649
+ className: m,
650
+ valueLabel: g,
651
+ options: E,
652
+ rawOptions: v,
653
+ plugins: G
654
+ } = e, R = n === void 0 ? !0 : n;
655
+ let p;
656
+ t[0] !== a ? (p = {
657
+ colors: a
658
+ }, t[0] = a, t[1] = p) : p = t[1];
659
+ const L = K("radar", p), P = V();
660
+ let T;
661
+ t[2] !== r || t[3] !== R || t[4] !== L ? (T = rt(r, L, {
662
+ area: R
663
+ }), t[2] = r, t[3] = R, t[4] = L, t[5] = T) : T = t[5];
664
+ const f = T, b = c ?? (Array.isArray(r) ? !1 : void 0);
665
+ let y;
666
+ if (t[6] !== i || t[7] !== s || t[8] !== b || t[9] !== o || t[10] !== E || t[11] !== u || t[12] !== v || t[13] !== l || t[14] !== P || t[15] !== g) {
667
+ const D = o != null ? {
668
+ scales: {
669
+ r: {
670
+ suggestedMax: o
671
+ }
672
+ }
673
+ } : {};
674
+ y = z({
675
+ kind: "radar",
676
+ base: {
677
+ title: l,
678
+ legend: b,
679
+ height: s,
680
+ aspectRatio: i,
681
+ padding: u,
682
+ valueLabel: g,
683
+ options: E,
684
+ rawOptions: v
685
+ },
686
+ tokens: P,
687
+ extra: D
688
+ }), t[6] = i, t[7] = s, t[8] = b, t[9] = o, t[10] = E, t[11] = u, t[12] = v, t[13] = l, t[14] = P, t[15] = g, t[16] = y;
689
+ } else
690
+ y = t[16];
691
+ const C = y;
692
+ let x;
693
+ t[17] !== r ? (x = ie(r), t[17] = r, t[18] = x) : x = t[18];
694
+ let A;
695
+ t[19] !== f || t[20] !== C || t[21] !== G ? (A = /* @__PURE__ */ j.jsx(M, { kind: "radar", data: f, options: C, plugins: G }), t[19] = f, t[20] = C, t[21] = G, t[22] = A) : A = t[22];
696
+ let B;
697
+ return t[23] !== m || t[24] !== d || t[25] !== s || t[26] !== h || t[27] !== x || t[28] !== A ? (B = /* @__PURE__ */ j.jsx(I, { height: s, loading: h, empty: d, isEmpty: x, className: m, children: A }), t[23] = m, t[24] = d, t[25] = s, t[26] = h, t[27] = x, t[28] = A, t[29] = B) : B = t[29], B;
698
+ }, Ae = (e) => {
699
+ const t = _.c(3), {
700
+ value: r,
701
+ children: o
702
+ } = e;
703
+ let n;
704
+ return t[0] !== o || t[1] !== r ? (n = /* @__PURE__ */ j.jsx(it, { value: r, children: o }), t[0] = o, t[1] = r, t[2] = n) : n = t[2], n;
534
705
  };
535
706
  export {
536
- lt as BarChart,
537
- it as ChartThemeProvider,
538
- at as DoughnutChart,
539
- nt as LineChart,
540
- st as PieChart
707
+ ye as BarChart,
708
+ Ae as ChartThemeProvider,
709
+ Ce as DoughnutChart,
710
+ fe as LineChart,
711
+ be as PieChart,
712
+ xe as RadarChart
541
713
  };