nemesischart 2.0.8 → 2.0.9

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.
@@ -1,11 +1,11 @@
1
- import { ref as ot, shallowRef as Mt, onMounted as jt, onBeforeUnmount as Ht, watch as At, openBlock as l, createElementBlock as s, normalizeStyle as x, createElementVNode as k, computed as M, unref as r, normalizeClass as lt, renderSlot as L, createTextVNode as Y, toDisplayString as A, createCommentVNode as g, createVNode as ft, Fragment as yt, renderList as mt, useCssVars as Vt } from "vue";
2
- import { Chart as Rt, Title as Nt, Tooltip as Pt, Legend as Dt, Filler as It, LineController as Wt, LineElement as Ot, PointElement as Xt, BarController as Yt, BarElement as Jt, PieController as Qt, PolarAreaController as Ut, ArcElement as Gt, CategoryScale as Zt, LinearScale as Kt, RadialLinearScale as _t } from "chart.js";
3
- const at = (t, y) => {
1
+ import { ref as et, shallowRef as jt, onMounted as Vt, onBeforeUnmount as Nt, watch as Rt, openBlock as u, createElementBlock as f, normalizeStyle as x, createElementVNode as S, computed as M, unref as s, normalizeClass as ot, renderSlot as L, createTextVNode as X, toDisplayString as B, createCommentVNode as y, createVNode as ft, Fragment as bt, renderList as ht, withKeys as yt, withModifiers as mt, useCssVars as Pt } from "vue";
2
+ import { Chart as Tt, Title as It, Tooltip as Dt, Legend as Wt, Filler as Ot, LineController as Xt, LineElement as Yt, PointElement as Jt, BarController as Qt, BarElement as Ut, PieController as Gt, PolarAreaController as Kt, ArcElement as Zt, CategoryScale as _t, LinearScale as te, RadialLinearScale as ee } from "chart.js";
3
+ const nt = (t, m) => {
4
4
  const e = t.__vccOpts || t;
5
- for (const [d, o] of y)
6
- e[d] = o;
5
+ for (const [p, o] of m)
6
+ e[p] = o;
7
7
  return e;
8
- }, te = {
8
+ }, oe = {
9
9
  __name: "ChartBase",
10
10
  props: {
11
11
  type: { type: String, required: !0 },
@@ -15,12 +15,10 @@ const at = (t, y) => {
15
15
  height: { type: [String, Number], default: 300 },
16
16
  width: { type: [String, Number], default: null }
17
17
  },
18
- setup(t, { expose: y }) {
19
- Rt.register(
20
- Nt,
21
- Pt,
22
- Dt,
18
+ setup(t, { expose: m }) {
19
+ Tt.register(
23
20
  It,
21
+ Dt,
24
22
  Wt,
25
23
  Ot,
26
24
  Xt,
@@ -29,11 +27,13 @@ const at = (t, y) => {
29
27
  Qt,
30
28
  Ut,
31
29
  Gt,
32
- Zt,
33
30
  Kt,
34
- _t
31
+ Zt,
32
+ _t,
33
+ te,
34
+ ee
35
35
  );
36
- const e = t, d = ot(null), o = Mt(null), B = {
36
+ const e = t, p = et(null), o = jt(null), k = {
37
37
  responsive: !0,
38
38
  maintainAspectRatio: !1,
39
39
  plugins: {
@@ -41,118 +41,118 @@ const at = (t, y) => {
41
41
  }
42
42
  };
43
43
  function $() {
44
- return { ...B, ...e.options };
44
+ return { ...k, ...e.options };
45
45
  }
46
- function R() {
47
- d.value && (o.value = new Rt(d.value, {
46
+ function A() {
47
+ p.value && (o.value = new Tt(p.value, {
48
48
  type: e.type,
49
49
  data: e.data,
50
50
  options: $(),
51
51
  plugins: e.plugins
52
52
  }));
53
53
  }
54
- function I() {
54
+ function D() {
55
55
  o.value && (o.value.destroy(), o.value = null);
56
56
  }
57
- return jt(R), Ht(I), At(
57
+ return Vt(A), Nt(D), Rt(
58
58
  () => e.data,
59
- (w) => {
59
+ (R) => {
60
60
  if (!o.value) return;
61
- o.value.data.labels = w.labels;
62
- const F = o.value.data.datasets, z = w.datasets;
63
- F.length !== z.length ? o.value.data.datasets = z : z.forEach((Q, X) => Object.assign(F[X], Q)), o.value.update();
61
+ o.value.data.labels = R.labels;
62
+ const w = o.value.data.datasets, T = R.datasets;
63
+ w.length !== T.length ? o.value.data.datasets = T : T.forEach((J, O) => Object.assign(w[O], J)), o.value.update();
64
64
  },
65
65
  { deep: !0 }
66
- ), At(
66
+ ), Rt(
67
67
  () => e.options,
68
68
  () => {
69
69
  o.value && (o.value.options = $(), o.value.update());
70
70
  },
71
71
  { deep: !0 }
72
- ), y({ chart: o }), (w, F) => (l(), s("div", {
72
+ ), m({ chart: o }), (R, w) => (u(), f("div", {
73
73
  class: "nc-chart-wrapper w-full",
74
74
  style: x({
75
75
  height: typeof t.height == "number" ? `${t.height}px` : t.height,
76
76
  width: t.width ? typeof t.width == "number" ? `${t.width}px` : t.width : "100%"
77
77
  })
78
78
  }, [
79
- k("canvas", {
79
+ S("canvas", {
80
80
  ref_key: "canvasRef",
81
- ref: d
81
+ ref: p
82
82
  }, null, 512)
83
83
  ], 4));
84
84
  }
85
- }, st = /* @__PURE__ */ at(te, [["__scopeId", "data-v-9828990e"]]);
86
- function ee(t) {
87
- const y = t.replace("#", ""), e = y.length === 3 ? y.split("").map((Q) => Q + Q).join("") : y, d = parseInt(e.slice(0, 2), 16) / 255, o = parseInt(e.slice(2, 4), 16) / 255, B = parseInt(e.slice(4, 6), 16) / 255, $ = Math.max(d, o, B), R = Math.min(d, o, B), I = ($ + R) / 2;
88
- if ($ === R) return [0, 0, I * 100];
89
- const w = $ - R, F = I > 0.5 ? w / (2 - $ - R) : w / ($ + R);
90
- let z;
91
- return $ === d ? z = ((o - B) / w + (o < B ? 6 : 0)) / 6 : $ === o ? z = ((B - d) / w + 2) / 6 : z = ((d - o) / w + 4) / 6, [z * 360, F * 100, I * 100];
85
+ }, st = /* @__PURE__ */ nt(oe, [["__scopeId", "data-v-9828990e"]]);
86
+ function ae(t) {
87
+ const m = t.replace("#", ""), e = m.length === 3 ? m.split("").map((J) => J + J).join("") : m, p = parseInt(e.slice(0, 2), 16) / 255, o = parseInt(e.slice(2, 4), 16) / 255, k = parseInt(e.slice(4, 6), 16) / 255, $ = Math.max(p, o, k), A = Math.min(p, o, k), D = ($ + A) / 2;
88
+ if ($ === A) return [0, 0, D * 100];
89
+ const R = $ - A, w = D > 0.5 ? R / (2 - $ - A) : R / ($ + A);
90
+ let T;
91
+ return $ === p ? T = ((o - k) / R + (o < k ? 6 : 0)) / 6 : $ === o ? T = ((k - p) / R + 2) / 6 : T = ((p - o) / R + 4) / 6, [T * 360, w * 100, D * 100];
92
92
  }
93
- function oe(t, y, e) {
94
- t /= 360, y /= 100, e /= 100;
95
- const d = e < 0.5 ? e * (1 + y) : e + y - e * y, o = 2 * e - d, B = (w) => (w < 0 && (w += 1), w > 1 && (w -= 1), w < 1 / 6 ? o + (d - o) * 6 * w : w < 1 / 2 ? d : w < 2 / 3 ? o + (d - o) * (2 / 3 - w) * 6 : o), $ = y === 0 ? e : B(t + 1 / 3), R = y === 0 ? e : B(t), I = y === 0 ? e : B(t - 1 / 3);
96
- return "#" + [$, R, I].map((w) => Math.round(w * 255).toString(16).padStart(2, "0")).join("");
93
+ function ne(t, m, e) {
94
+ t /= 360, m /= 100, e /= 100;
95
+ const p = e < 0.5 ? e * (1 + m) : e + m - e * m, o = 2 * e - p, k = (R) => (R < 0 && (R += 1), R > 1 && (R -= 1), R < 1 / 6 ? o + (p - o) * 6 * R : R < 1 / 2 ? p : R < 2 / 3 ? o + (p - o) * (2 / 3 - R) * 6 : o), $ = m === 0 ? e : k(t + 1 / 3), A = m === 0 ? e : k(t), D = m === 0 ? e : k(t - 1 / 3);
96
+ return "#" + [$, A, D].map((R) => Math.round(R * 255).toString(16).padStart(2, "0")).join("");
97
97
  }
98
- function bt(t, y = 7) {
99
- if (!(t != null && t.startsWith("#"))) return Array.from({ length: y }, () => t ?? "#3B82F6");
100
- const [e, d] = ee(t), o = 20, B = 72;
101
- return Array.from({ length: y }, ($, R) => {
102
- const I = y === 1 ? 0.5 : R / (y - 1), w = o + I * (B - o), F = Math.max(50, d - Math.max(0, w - 55) * 0.6);
103
- return oe(e, F, w);
98
+ function xt(t, m = 7) {
99
+ if (!(t != null && t.startsWith("#"))) return Array.from({ length: m }, () => t ?? "#3B82F6");
100
+ const [e, p] = ae(t), o = 20, k = 72;
101
+ return Array.from({ length: m }, ($, A) => {
102
+ const D = m === 1 ? 0.5 : A / (m - 1), R = o + D * (k - o), w = Math.max(50, p - Math.max(0, R - 55) * 0.6);
103
+ return ne(e, w, R);
104
104
  });
105
105
  }
106
- const ae = {
106
+ const le = {
107
107
  light: { bg: "#ffffff", text: "#000000", muted: "#64748B", grid: "rgba(15,23,42,0.06)" },
108
108
  dark: { bg: "#000000", text: "#ffffff", muted: "#7b7b7b", grid: "rgba(255,255,255,0.08)" },
109
109
  transparent: { bg: "transparent", text: "inherit", muted: "#7b7b7b", grid: "rgba(127,127,127,0.15)" }
110
110
  };
111
- function D(t, y) {
112
- if (!t) return `rgba(59,130,246,${y})`;
111
+ function j(t, m) {
112
+ if (!t) return `rgba(59,130,246,${m})`;
113
113
  if (t.startsWith("#")) {
114
- const e = t.replace("#", ""), d = e.length === 3 ? e.split("").map((R) => R + R).join("") : e, o = parseInt(d.slice(0, 2), 16), B = parseInt(d.slice(2, 4), 16), $ = parseInt(d.slice(4, 6), 16);
115
- return `rgba(${o},${B},${$},${y})`;
114
+ const e = t.replace("#", ""), p = e.length === 3 ? e.split("").map((A) => A + A).join("") : e, o = parseInt(p.slice(0, 2), 16), k = parseInt(p.slice(2, 4), 16), $ = parseInt(p.slice(4, 6), 16);
115
+ return `rgba(${o},${k},${$},${m})`;
116
116
  }
117
117
  if (t.startsWith("rgb")) {
118
118
  const e = t.match(/[\d.]+/g);
119
- if (e && e.length >= 3) return `rgba(${e[0]},${e[1]},${e[2]},${y})`;
119
+ if (e && e.length >= 3) return `rgba(${e[0]},${e[1]},${e[2]},${m})`;
120
120
  }
121
121
  return t;
122
122
  }
123
123
  function it(t) {
124
- const y = M(() => {
125
- const d = ae[t.tema], o = d ? { ...d, bg: t.corFundo || d.bg } : { bg: t.corFundo || t.tema, text: "#F8FAFC", muted: "#7b7b7b", grid: "rgba(255,255,255,0.08)" };
124
+ const m = M(() => {
125
+ const p = le[t.tema], o = p ? { ...p, bg: t.corFundo || p.bg } : { bg: t.corFundo || t.tema, text: "#F8FAFC", muted: "#7b7b7b", grid: "rgba(255,255,255,0.08)" };
126
126
  return {
127
127
  ...o,
128
128
  text: t.corTexto || o.text,
129
129
  muted: t.corTexto || o.muted
130
130
  };
131
131
  }), e = M(() => ({
132
- background: y.value.bg,
133
- color: y.value.text,
132
+ background: m.value.bg,
133
+ color: m.value.text,
134
134
  borderRadius: typeof t.borderRadius == "number" ? `${t.borderRadius}px` : t.borderRadius,
135
135
  boxShadow: t.sombra,
136
136
  border: t.corBorda ? `1px solid ${t.corBorda}` : "none"
137
137
  }));
138
- return { palette: y, cardStyle: e, toRgba: D };
138
+ return { palette: m, cardStyle: e, toRgba: j };
139
139
  }
140
140
  function pt(t) {
141
- const y = M(() => t.tipoValor === "moeda" ? new Intl.NumberFormat(t.locale, { style: "currency", currency: t.moeda }) : t.tipoValor === "percentual" ? new Intl.NumberFormat(t.locale, { style: "percent", maximumFractionDigits: 2 }) : new Intl.NumberFormat(t.locale, { maximumFractionDigits: 2 }));
142
- function e(d) {
143
- if (d == null) return "";
144
- const o = Number(d);
145
- return Number.isNaN(o) ? String(d) : t.tipoValor === "percentual" ? y.value.format(o / 100) : y.value.format(o);
141
+ const m = M(() => t.tipoValor === "moeda" ? new Intl.NumberFormat(t.locale, { style: "currency", currency: t.moeda }) : t.tipoValor === "percentual" ? new Intl.NumberFormat(t.locale, { style: "percent", maximumFractionDigits: 2 }) : new Intl.NumberFormat(t.locale, { maximumFractionDigits: 2 }));
142
+ function e(p) {
143
+ if (p == null) return "";
144
+ const o = Number(p);
145
+ return Number.isNaN(o) ? String(p) : t.tipoValor === "percentual" ? m.value.format(o / 100) : m.value.format(o);
146
146
  }
147
- return { formatador: y, formatar: e };
147
+ return { formatador: m, formatar: e };
148
148
  }
149
- function gt(t, { caretFlexivel: y = !1 } = {}) {
149
+ function gt(t, { caretFlexivel: m = !1 } = {}) {
150
150
  let e = t.querySelector(".nc-tt");
151
151
  if (e) return e;
152
152
  e = document.createElement("div"), e.className = "nc-tt", Object.assign(e.style, {
153
153
  position: "absolute",
154
154
  pointerEvents: "none",
155
- transform: y ? "translateX(-50%)" : "translate(-50%, calc(-100% - 16px))",
155
+ transform: m ? "translateX(-50%)" : "translate(-50%, calc(-100% - 16px))",
156
156
  transition: "opacity .18s ease, left .12s ease, top .12s ease",
157
157
  opacity: "0",
158
158
  background: "#ffffff",
@@ -166,8 +166,8 @@ function gt(t, { caretFlexivel: y = !1 } = {}) {
166
166
  fontFamily: "inherit",
167
167
  textAlign: "left"
168
168
  });
169
- const d = document.createElement("div");
170
- d.className = "nc-tt__caret";
169
+ const p = document.createElement("div");
170
+ p.className = "nc-tt__caret";
171
171
  const o = {
172
172
  position: "absolute",
173
173
  left: "50%",
@@ -177,96 +177,96 @@ function gt(t, { caretFlexivel: y = !1 } = {}) {
177
177
  transform: "translateX(-50%) rotate(45deg)",
178
178
  borderRadius: "2px"
179
179
  };
180
- y ? Object.assign(d.style, o) : Object.assign(d.style, o, {
180
+ m ? Object.assign(p.style, o) : Object.assign(p.style, o, {
181
181
  bottom: "-5px",
182
182
  borderRight: "1px solid rgba(15,23,42,.06)",
183
183
  borderBottom: "1px solid rgba(15,23,42,.06)"
184
- }), e.appendChild(d);
185
- const B = document.createElement("div");
186
- return B.className = "nc-tt__content", Object.assign(B.style, { position: "relative", background: "#fff", borderRadius: "8px" }), e.appendChild(B), t.appendChild(e), e;
184
+ }), e.appendChild(p);
185
+ const k = document.createElement("div");
186
+ return k.className = "nc-tt__content", Object.assign(k.style, { position: "relative", background: "#fff", borderRadius: "8px" }), e.appendChild(k), t.appendChild(e), e;
187
187
  }
188
- function rt(t) {
189
- const y = t.canvas.parentNode;
190
- return y ? (getComputedStyle(y).position === "static" && (y.style.position = "relative"), y) : null;
188
+ function lt(t) {
189
+ const m = t.canvas.parentNode;
190
+ return m ? (getComputedStyle(m).position === "static" && (m.style.position = "relative"), m) : null;
191
191
  }
192
- function nt(t, y, e, d = 4) {
193
- const o = y / 2;
194
- return t - o < d ? o + d : t + o > e - d ? e - o - d : t;
192
+ function rt(t, m, e, p = 4) {
193
+ const o = m / 2;
194
+ return t - o < p ? o + p : t + o > e - p ? e - o - p : t;
195
195
  }
196
- function wt(t, y) {
196
+ function qt(t, m) {
197
197
  const e = window.getComputedStyle(t);
198
- let d = "";
198
+ let p = "";
199
199
  for (let o = 0; o < e.length; o++) {
200
- const B = e[o];
201
- let $ = e.getPropertyValue(B);
200
+ const k = e[o];
201
+ let $ = e.getPropertyValue(k);
202
202
  if ($ && $.indexOf("url(") !== -1 && !/url\(["']?data:/.test($))
203
- if (B === "background-image" || B === "background" || B === "mask-image" || B === "border-image" || B === "border-image-source")
203
+ if (k === "background-image" || k === "background" || k === "mask-image" || k === "border-image" || k === "border-image-source")
204
204
  $ = "none";
205
205
  else
206
206
  continue;
207
- d += `${B}:${$};`;
207
+ p += `${k}:${$};`;
208
208
  }
209
- y.setAttribute("style", d);
209
+ m.setAttribute("style", p);
210
210
  }
211
- function re(t, y) {
212
- wt(t, y);
213
- const e = t.querySelectorAll("*"), d = y.querySelectorAll("*");
211
+ function re(t, m) {
212
+ qt(t, m);
213
+ const e = t.querySelectorAll("*"), p = m.querySelectorAll("*");
214
214
  for (let o = 0; o < e.length; o++)
215
- d[o] && wt(e[o], d[o]);
215
+ p[o] && qt(e[o], p[o]);
216
216
  }
217
- function ne(t, y) {
218
- const e = t.querySelectorAll("canvas"), d = y.querySelectorAll("canvas");
219
- e.forEach((o, B) => {
220
- if (!d[B]) return;
217
+ function se(t, m) {
218
+ const e = t.querySelectorAll("canvas"), p = m.querySelectorAll("canvas");
219
+ e.forEach((o, k) => {
220
+ if (!p[k]) return;
221
221
  const $ = document.createElement("img");
222
222
  try {
223
223
  $.src = o.toDataURL("image/png");
224
224
  } catch {
225
225
  return;
226
226
  }
227
- const R = o.getBoundingClientRect();
228
- $.setAttribute("style", `width:${R.width}px;height:${R.height}px;display:block;`), d[B].replaceWith($);
227
+ const A = o.getBoundingClientRect();
228
+ $.setAttribute("style", `width:${A.width}px;height:${A.height}px;display:block;`), p[k].replaceWith($);
229
229
  });
230
230
  }
231
- async function ct(t, y = {}) {
231
+ async function ct(t, m = {}) {
232
232
  if (!t) return;
233
233
  const {
234
234
  nomeArquivo: e = "componente.png",
235
- escala: d = 2,
235
+ escala: p = 2,
236
236
  corFundo: o = null
237
- } = y, B = t.getBoundingClientRect(), $ = Math.ceil(B.width), R = Math.ceil(B.height), I = t.cloneNode(!0);
238
- re(t, I), ne(t, I), I.style.margin = "0", I.style.transform = "none";
239
- const w = new XMLSerializer().serializeToString(I), F = `<svg xmlns="http://www.w3.org/2000/svg" width="${$}" height="${R}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${$}px;height:${R}px;">` + w + "</div></foreignObject></svg>", Q = "data:image/svg+xml;base64," + (typeof window < "u" && window.btoa ? window.btoa(unescape(encodeURIComponent(F))) : ""), X = new Image();
240
- await new Promise((j, G) => {
241
- X.onload = j, X.onerror = G, X.src = Q;
237
+ } = m, k = t.getBoundingClientRect(), $ = Math.ceil(k.width), A = Math.ceil(k.height), D = t.cloneNode(!0);
238
+ re(t, D), se(t, D), D.style.margin = "0", D.style.transform = "none";
239
+ const R = new XMLSerializer().serializeToString(D), w = `<svg xmlns="http://www.w3.org/2000/svg" width="${$}" height="${A}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${$}px;height:${A}px;">` + R + "</div></foreignObject></svg>", J = "data:image/svg+xml;base64," + (typeof window < "u" && window.btoa ? window.btoa(unescape(encodeURIComponent(w))) : ""), O = new Image();
240
+ await new Promise((tt, d) => {
241
+ O.onload = tt, O.onerror = d, O.src = J;
242
242
  });
243
243
  const _ = document.createElement("canvas");
244
- _.width = $ * d, _.height = R * d;
245
- const K = _.getContext("2d");
246
- K.scale(d, d), o && (K.fillStyle = o, K.fillRect(0, 0, $, R)), K.drawImage(X, 0, 0);
247
- let p;
244
+ _.width = $ * p, _.height = A * p;
245
+ const Q = _.getContext("2d");
246
+ Q.scale(p, p), o && (Q.fillStyle = o, Q.fillRect(0, 0, $, A)), Q.drawImage(O, 0, 0);
247
+ let Z;
248
248
  try {
249
- p = _.toDataURL("image/png");
250
- } catch (j) {
251
- console.error("Falha ao exportar imagem: canvas contaminado.", j);
249
+ Z = _.toDataURL("image/png");
250
+ } catch (tt) {
251
+ console.error("Falha ao exportar imagem: canvas contaminado.", tt);
252
252
  return;
253
253
  }
254
- const E = document.createElement("a");
255
- E.download = e, E.href = p, document.body.appendChild(E), E.click(), document.body.removeChild(E);
254
+ const K = document.createElement("a");
255
+ K.download = e, K.href = Z, document.body.appendChild(K), K.click(), document.body.removeChild(K);
256
256
  }
257
- const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>', le = { class: "card-linhas__header flex flex-column" }, se = { class: "card-linhas__topo flex align-items-start justify-content-between gap-3" }, ie = {
257
+ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>', ie = { class: "card-linhas__header flex flex-column" }, ce = { class: "card-linhas__topo flex align-items-start justify-content-between gap-3" }, de = {
258
258
  key: 0,
259
259
  class: "nc-legendas-flex flex flex-column"
260
- }, ce = {
260
+ }, ue = {
261
261
  key: 1,
262
262
  class: "nc-actions inline-flex align-items-center gap-2"
263
- }, de = ["innerHTML"], ue = {
263
+ }, fe = ["innerHTML"], pe = {
264
264
  key: 0,
265
265
  class: "card-linhas__titulos mt-3 mb-2 flex flex-column"
266
- }, fe = { class: "card-linhas__chart flex-1" }, pe = {
266
+ }, ge = { class: "card-linhas__chart flex-1" }, ye = {
267
267
  key: 0,
268
268
  class: "card-linhas__footer mt-3"
269
- }, ge = {
269
+ }, me = {
270
270
  __name: "CardLinhas",
271
271
  props: {
272
272
  legenda: { type: String, default: null },
@@ -317,75 +317,75 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
317
317
  nomeArquivoExport: { type: String, default: "card-linhas.png" }
318
318
  },
319
319
  emits: ["botaoAcao", "exportado"],
320
- setup(t, { emit: y }) {
321
- const e = t, d = y, { palette: o, cardStyle: B } = it(e), { formatar: $ } = pt(e), R = ot(null), I = dt;
322
- async function w() {
323
- await ct(R.value, {
320
+ setup(t, { emit: m }) {
321
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null), D = dt;
322
+ async function R() {
323
+ await ct(A.value, {
324
324
  nomeArquivo: e.nomeArquivoExport,
325
325
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
326
- }), d("exportado");
326
+ }), p("exportado");
327
327
  }
328
- const F = M(() => `card-linhas--${e.direcao}`), z = M(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((c) => c && (typeof c == "number" || typeof c.valor == "number")).map((c) => typeof c == "number" ? { valor: c, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
329
- valor: c.valor,
330
- rotulo: c.rotulo ?? null,
331
- cor: c.cor || "#0F172A",
332
- corRotulo: c.corRotulo || c.cor || "#0F172A",
333
- corTexto: c.corTexto || "#FFFFFF",
334
- tracejado: c.tracejado || [6, 6],
335
- espessura: c.espessura ?? 1
336
- }) : []), Q = [];
337
- let X = null;
338
- const K = [{
328
+ const w = M(() => `card-linhas--${e.direcao}`), T = M(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((n) => n && (typeof n == "number" || typeof n.valor == "number")).map((n) => typeof n == "number" ? { valor: n, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
329
+ valor: n.valor,
330
+ rotulo: n.rotulo ?? null,
331
+ cor: n.cor || "#0F172A",
332
+ corRotulo: n.corRotulo || n.cor || "#0F172A",
333
+ corTexto: n.corTexto || "#FFFFFF",
334
+ tracejado: n.tracejado || [6, 6],
335
+ espessura: n.espessura ?? 1
336
+ }) : []), J = [];
337
+ let O = null;
338
+ const Q = [{
339
339
  id: "linhaReferencia",
340
- afterDatasetsDraw(u) {
341
- const c = z.value;
342
- if (Q.length = 0, !c.length) return;
343
- const { ctx: a, chartArea: b, scales: v } = u, i = v.y;
344
- i && c.forEach((f) => {
345
- const n = i.getPixelForValue(f.valor);
346
- if (Q.push({ linha: f, pos: n, chartArea: b }), a.save(), a.beginPath(), a.setLineDash(f.tracejado), a.lineWidth = f.espessura, a.strokeStyle = f.cor, n < b.top || n > b.bottom) {
340
+ afterDatasetsDraw(l) {
341
+ const n = T.value;
342
+ if (J.length = 0, !n.length) return;
343
+ const { ctx: a, chartArea: r, scales: v } = l, i = v.y;
344
+ i && n.forEach((g) => {
345
+ const c = i.getPixelForValue(g.valor);
346
+ if (J.push({ linha: g, pos: c, chartArea: r }), a.save(), a.beginPath(), a.setLineDash(g.tracejado), a.lineWidth = g.espessura, a.strokeStyle = g.cor, c < r.top || c > r.bottom) {
347
347
  a.restore();
348
348
  return;
349
349
  }
350
- if (a.moveTo(b.left, n), a.lineTo(b.right, n), a.stroke(), a.setLineDash([]), f.rotulo) {
350
+ if (a.moveTo(r.left, c), a.lineTo(r.right, c), a.stroke(), a.setLineDash([]), g.rotulo) {
351
351
  a.font = "600 11px 'Inter', sans-serif";
352
- const m = 8, h = 5, T = a.measureText(f.rotulo).width, q = 12, C = T + m * 2, V = q + h * 2, S = V / 2;
353
- let P = b.left - C - 6, O = n - V / 2;
354
- P < 0 && (P = b.left + 6), a.fillStyle = f.corRotulo, a.beginPath(), a.roundRect ? a.roundRect(P, O, C, V, S) : (a.moveTo(P + S, O), a.lineTo(P + C - S, O), a.quadraticCurveTo(P + C, O, P + C, O + S), a.lineTo(P + C, O + V - S), a.quadraticCurveTo(P + C, O + V, P + C - S, O + V), a.lineTo(P + S, O + V), a.quadraticCurveTo(P, O + V, P, O + V - S), a.lineTo(P, O + S), a.quadraticCurveTo(P, O, P + S, O)), a.fill(), a.fillStyle = f.corTexto, a.textBaseline = "middle", a.textAlign = "center", a.fillText(f.rotulo, P + C / 2, O + V / 2);
352
+ const b = 8, h = 5, q = a.measureText(g.rotulo).width, E = 12, C = q + b * 2, I = E + h * 2, N = I / 2;
353
+ let z = r.left - C - 6, H = c - I / 2;
354
+ z < 0 && (z = r.left + 6), a.fillStyle = g.corRotulo, a.beginPath(), a.roundRect ? a.roundRect(z, H, C, I, N) : (a.moveTo(z + N, H), a.lineTo(z + C - N, H), a.quadraticCurveTo(z + C, H, z + C, H + N), a.lineTo(z + C, H + I - N), a.quadraticCurveTo(z + C, H + I, z + C - N, H + I), a.lineTo(z + N, H + I), a.quadraticCurveTo(z, H + I, z, H + I - N), a.lineTo(z, H + N), a.quadraticCurveTo(z, H, z + N, H)), a.fill(), a.fillStyle = g.corTexto, a.textBaseline = "middle", a.textAlign = "center", a.fillText(g.rotulo, z + C / 2, H + I / 2);
355
355
  }
356
356
  a.restore();
357
357
  });
358
358
  },
359
- beforeEvent(u, c) {
360
- if (!Q.length) {
361
- X = null;
359
+ beforeEvent(l, n) {
360
+ if (!J.length) {
361
+ O = null;
362
362
  return;
363
363
  }
364
- const a = c.event;
364
+ const a = n.event;
365
365
  if (!a || a.type === "mouseout" || a.x == null || a.y == null) {
366
- X = null;
366
+ O = null;
367
367
  return;
368
368
  }
369
- const b = 8;
369
+ const r = 8;
370
370
  let v = null, i = 1 / 0;
371
- for (const f of Q) {
372
- const n = Math.abs(a.y - f.pos), m = a.x >= f.chartArea.left && a.x <= f.chartArea.right;
373
- n <= b && m && n < i && (i = n, v = f);
371
+ for (const g of J) {
372
+ const c = Math.abs(a.y - g.pos), b = a.x >= g.chartArea.left && a.x <= g.chartArea.right;
373
+ c <= r && b && c < i && (i = c, v = g);
374
374
  }
375
- X = v;
375
+ O = v;
376
376
  },
377
- afterEvent(u, c) {
378
- if (!Q.length) return;
379
- const a = c.event;
377
+ afterEvent(l, n) {
378
+ if (!J.length) return;
379
+ const a = n.event;
380
380
  if (!a) return;
381
- const b = rt(u);
382
- if (!b) return;
383
- let v = b.querySelector(".nc-tt-linhaRef");
384
- if (!X) {
381
+ const r = lt(l);
382
+ if (!r) return;
383
+ let v = r.querySelector(".nc-tt-linhaRef");
384
+ if (!O) {
385
385
  v && (v.style.opacity = "0");
386
386
  return;
387
387
  }
388
- const i = X;
388
+ const i = O;
389
389
  v || (v = document.createElement("div"), v.className = "nc-tt-linhaRef", Object.assign(v.style, {
390
390
  position: "absolute",
391
391
  pointerEvents: "none",
@@ -401,30 +401,30 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
401
401
  zIndex: "11",
402
402
  fontFamily: "'Inter', sans-serif",
403
403
  textAlign: "left"
404
- }), b.appendChild(v));
405
- const f = i.linha.cor || "#0F172A", n = $(i.linha.valor), m = i.linha.rotulo;
406
- v.innerHTML = (m ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${m}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${f};box-shadow:0 0 0 2px ${D(f, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${n}</span></div>`;
407
- const h = u.canvas;
404
+ }), r.appendChild(v));
405
+ const g = i.linha.cor || "#0F172A", c = $(i.linha.valor), b = i.linha.rotulo;
406
+ v.innerHTML = (b ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${b}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${g};box-shadow:0 0 0 2px ${j(g, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${c}</span></div>`;
407
+ const h = l.canvas;
408
408
  v.style.opacity = "1", v.style.visibility = "hidden", v.style.left = "0px", v.style.top = "0px";
409
- const H = v.offsetWidth, T = v.offsetHeight, q = 4, C = h.offsetLeft + a.x, V = h.offsetTop + i.pos, S = nt(C, H, b.clientWidth, q);
410
- let P = V;
411
- const O = T + 16 + q;
412
- P < O && (P = O), v.style.left = S + "px", v.style.top = P + "px", v.style.visibility = "visible";
409
+ const V = v.offsetWidth, q = v.offsetHeight, E = 4, C = h.offsetLeft + a.x, I = h.offsetTop + i.pos, N = rt(C, V, r.clientWidth, E);
410
+ let z = I;
411
+ const H = q + 16 + E;
412
+ z < H && (z = H), v.style.left = N + "px", v.style.top = z + "px", v.style.visibility = "visible";
413
413
  }
414
- }], p = M(() => ({
415
- labels: e.data.map((u) => u.rotulo),
414
+ }], Z = M(() => ({
415
+ labels: e.data.map((l) => l.rotulo),
416
416
  datasets: [
417
417
  {
418
- data: e.data.map((u) => u.quantidade),
418
+ data: e.data.map((l) => l.quantidade),
419
419
  borderColor: e.corDetalhes,
420
420
  borderWidth: 3,
421
421
  borderJoinStyle: "round",
422
422
  borderCapStyle: "round",
423
- backgroundColor: (u) => {
424
- const { chart: c } = u, { ctx: a, chartArea: b } = c;
425
- if (!b) return "transparent";
426
- const v = e.corDetalhes || "#0400FF", i = "#7C7C7C", f = a.createLinearGradient(0, b.top, 0, b.bottom);
427
- return f.addColorStop(0.16, D(v, 0.2)), f.addColorStop(1, D(i, 0)), f;
423
+ backgroundColor: (l) => {
424
+ const { chart: n } = l, { ctx: a, chartArea: r } = n;
425
+ if (!r) return "transparent";
426
+ const v = e.corDetalhes || "#0400FF", i = "#7C7C7C", g = a.createLinearGradient(0, r.top, 0, r.bottom);
427
+ return g.addColorStop(0.16, j(v, 0.2)), g.addColorStop(1, j(i, 0)), g;
428
428
  },
429
429
  fill: !0,
430
430
  tension: 0.45,
@@ -437,54 +437,54 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
437
437
  }
438
438
  ]
439
439
  }));
440
- function E(u) {
441
- const { chart: c, tooltip: a } = u, b = rt(c);
442
- if (!b) return;
443
- const v = gt(b);
444
- if (a.opacity === 0 || X) {
440
+ function K(l) {
441
+ const { chart: n, tooltip: a } = l, r = lt(n);
442
+ if (!r) return;
443
+ const v = gt(r);
444
+ if (a.opacity === 0 || O) {
445
445
  v.style.opacity = "0";
446
446
  return;
447
447
  }
448
- const i = a.title || [], f = (a.body || []).flatMap((Z) => Z.lines), n = v.querySelector(".nc-tt__content"), m = e.corDetalhes || "#3B82F6";
449
- n.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${i.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${m};box-shadow:0 0 0 2px ${D(m, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${f.join(" ")}</span></div>`;
450
- const { offsetLeft: h, offsetTop: H } = c.canvas;
448
+ const i = a.title || [], g = (a.body || []).flatMap((G) => G.lines), c = v.querySelector(".nc-tt__content"), b = e.corDetalhes || "#3B82F6";
449
+ c.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${i.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${b};box-shadow:0 0 0 2px ${j(b, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${g.join(" ")}</span></div>`;
450
+ const { offsetLeft: h, offsetTop: V } = n.canvas;
451
451
  v.style.opacity = "1", v.style.visibility = "hidden", v.style.left = "0px", v.style.top = "0px";
452
- const T = v.offsetWidth, q = v.offsetHeight, C = 4, V = h + a.caretX, S = H + a.caretY, P = nt(V, T, b.clientWidth, C), O = q + 16 + C, tt = S < O;
452
+ const q = v.offsetWidth, E = v.offsetHeight, C = 4, I = h + a.caretX, N = V + a.caretY, z = rt(I, q, r.clientWidth, C), H = E + 16 + C, F = N < H;
453
453
  let U;
454
- tt ? (v.style.transform = "translateX(-50%) translateY(16px)", U = S) : (v.style.transform = "translate(-50%, calc(-100% - 16px))", U = S), v.style.left = P + "px", v.style.top = U + "px";
455
- const N = v.querySelector(".nc-tt__caret");
456
- if (N) {
457
- const Z = V - P, W = T / 2, J = Math.max(-W + 8, Math.min(W - 8, Z));
458
- N.style.left = `calc(50% + ${J}px)`, tt ? (N.style.bottom = "", N.style.top = "-5px", N.style.borderRight = "", N.style.borderBottom = "", N.style.borderLeft = "1px solid rgba(15,23,42,.06)", N.style.borderTop = "1px solid rgba(15,23,42,.06)") : (N.style.top = "", N.style.bottom = "-5px", N.style.borderLeft = "", N.style.borderTop = "", N.style.borderRight = "1px solid rgba(15,23,42,.06)", N.style.borderBottom = "1px solid rgba(15,23,42,.06)");
454
+ F ? (v.style.transform = "translateX(-50%) translateY(16px)", U = N) : (v.style.transform = "translate(-50%, calc(-100% - 16px))", U = N), v.style.left = z + "px", v.style.top = U + "px";
455
+ const P = v.querySelector(".nc-tt__caret");
456
+ if (P) {
457
+ const G = I - z, W = q / 2, Y = Math.max(-W + 8, Math.min(W - 8, G));
458
+ P.style.left = `calc(50% + ${Y}px)`, F ? (P.style.bottom = "", P.style.top = "-5px", P.style.borderRight = "", P.style.borderBottom = "", P.style.borderLeft = "1px solid rgba(15,23,42,.06)", P.style.borderTop = "1px solid rgba(15,23,42,.06)") : (P.style.top = "", P.style.bottom = "-5px", P.style.borderLeft = "", P.style.borderTop = "", P.style.borderRight = "1px solid rgba(15,23,42,.06)", P.style.borderBottom = "1px solid rgba(15,23,42,.06)");
459
459
  }
460
460
  v.style.visibility = "visible";
461
461
  }
462
- const j = M(() => ({
462
+ const tt = M(() => ({
463
463
  responsive: !0,
464
464
  maintainAspectRatio: !1,
465
465
  interaction: { intersect: !1, mode: "index" },
466
466
  layout: {
467
- padding: { top: z.value.length ? 24 : 0, right: 0, bottom: 0, left: 0 }
467
+ padding: { top: T.value.length ? 24 : 0, right: 0, bottom: 0, left: 0 }
468
468
  },
469
469
  plugins: {
470
470
  legend: { display: !1 },
471
471
  tooltip: {
472
472
  enabled: !1,
473
- external: E,
473
+ external: K,
474
474
  callbacks: {
475
- title: (u) => {
476
- var c;
477
- return ((c = u[0]) == null ? void 0 : c.label) ?? "";
475
+ title: (l) => {
476
+ var n;
477
+ return ((n = l[0]) == null ? void 0 : n.label) ?? "";
478
478
  },
479
- label: (u) => $(u.parsed.y)
479
+ label: (l) => $(l.parsed.y)
480
480
  }
481
481
  }
482
482
  },
483
483
  scales: {
484
484
  x: {
485
485
  display: !0,
486
- afterFit: (u) => {
487
- u.paddingLeft = 0, u.paddingRight = 0;
486
+ afterFit: (l) => {
487
+ l.paddingLeft = 0, l.paddingRight = 0;
488
488
  },
489
489
  grid: { display: !1, drawBorder: !1 },
490
490
  border: { display: !1 },
@@ -499,112 +499,112 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
499
499
  display: !1,
500
500
  grid: { display: !1 },
501
501
  beginAtZero: !0,
502
- suggestedMax: z.value.length ? Math.max(...z.value.map((u) => u.valor)) : void 0
502
+ suggestedMax: T.value.length ? Math.max(...T.value.map((l) => l.valor)) : void 0
503
503
  }
504
504
  }
505
505
  }));
506
- function G() {
507
- d("botaoAcao");
506
+ function d() {
507
+ p("botaoAcao");
508
508
  }
509
- return (u, c) => (l(), s("div", {
509
+ return (l, n) => (u(), f("div", {
510
510
  ref_key: "cardRef",
511
- ref: R,
512
- class: lt(["card-linhas p-4 flex", F.value]),
513
- style: x(r(B))
511
+ ref: A,
512
+ class: ot(["card-linhas p-4 flex", w.value]),
513
+ style: x(s(k))
514
514
  }, [
515
- k("div", le, [
516
- k("div", se, [
517
- u.$slots.legenda || t.legenda || u.$slots.sublegenda || t.sublegenda ? (l(), s("div", ie, [
518
- u.$slots.legenda || t.legenda ? (l(), s("div", {
515
+ S("div", ie, [
516
+ S("div", ce, [
517
+ l.$slots.legenda || t.legenda || l.$slots.sublegenda || t.sublegenda ? (u(), f("div", de, [
518
+ l.$slots.legenda || t.legenda ? (u(), f("div", {
519
519
  key: 0,
520
520
  class: "text-xs font-medium",
521
- style: x({ color: r(o).text, opacity: 0.85 })
521
+ style: x({ color: s(o).text, opacity: 0.85 })
522
522
  }, [
523
- L(u.$slots, "legenda", {}, () => [
524
- Y(A(t.legenda), 1)
523
+ L(l.$slots, "legenda", {}, () => [
524
+ X(B(t.legenda), 1)
525
525
  ], !0)
526
- ], 4)) : g("", !0),
527
- u.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
526
+ ], 4)) : y("", !0),
527
+ l.$slots.sublegenda || t.sublegenda ? (u(), f("div", {
528
528
  key: 1,
529
529
  class: "text-xs",
530
- style: x({ color: r(o).muted })
530
+ style: x({ color: s(o).muted })
531
531
  }, [
532
- L(u.$slots, "sublegenda", {}, () => [
533
- Y(A(t.sublegenda), 1)
532
+ L(l.$slots, "sublegenda", {}, () => [
533
+ X(B(t.sublegenda), 1)
534
534
  ], !0)
535
- ], 4)) : g("", !0)
536
- ])) : g("", !0),
537
- u.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ce, [
538
- L(u.$slots, "actions", {}, () => [
539
- t.botaoVisivel ? (l(), s("button", {
535
+ ], 4)) : y("", !0)
536
+ ])) : y("", !0),
537
+ l.$slots.actions || t.botaoVisivel || t.exportar ? (u(), f("div", ue, [
538
+ L(l.$slots, "actions", {}, () => [
539
+ t.botaoVisivel ? (u(), f("button", {
540
540
  key: 0,
541
541
  class: "nc-btn inline-flex align-items-center",
542
- style: x({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
543
- onClick: G
542
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
543
+ onClick: d
544
544
  }, [
545
- k("span", null, A(t.textoBotao), 1)
546
- ], 4)) : g("", !0)
545
+ S("span", null, B(t.textoBotao), 1)
546
+ ], 4)) : y("", !0)
547
547
  ], !0),
548
- t.exportar ? (l(), s("button", {
548
+ t.exportar ? (u(), f("button", {
549
549
  key: 0,
550
550
  type: "button",
551
551
  class: "nc-exportar inline-flex align-items-center justify-content-center",
552
- style: x({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
552
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).text, 0.18) }),
553
553
  title: "Exportar como imagem",
554
554
  "aria-label": "Exportar como imagem",
555
- onClick: w,
556
- innerHTML: r(I)
557
- }, null, 12, de)) : g("", !0)
558
- ])) : g("", !0)
555
+ onClick: R,
556
+ innerHTML: s(D)
557
+ }, null, 12, fe)) : y("", !0)
558
+ ])) : y("", !0)
559
559
  ]),
560
- u.$slots.titulo || t.titulo || u.$slots.descricao || t.descricao ? (l(), s("div", ue, [
561
- u.$slots.titulo || t.titulo ? (l(), s("div", {
560
+ l.$slots.titulo || t.titulo || l.$slots.descricao || t.descricao ? (u(), f("div", pe, [
561
+ l.$slots.titulo || t.titulo ? (u(), f("div", {
562
562
  key: 0,
563
563
  class: "m-0 text-3xl font-semibold",
564
- style: x({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
564
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
565
565
  }, [
566
- L(u.$slots, "titulo", {}, () => [
567
- Y(A(t.titulo), 1)
566
+ L(l.$slots, "titulo", {}, () => [
567
+ X(B(t.titulo), 1)
568
568
  ], !0)
569
- ], 4)) : g("", !0),
570
- u.$slots.descricao || t.descricao ? (l(), s("div", {
569
+ ], 4)) : y("", !0),
570
+ l.$slots.descricao || t.descricao ? (u(), f("div", {
571
571
  key: 1,
572
572
  class: "text-sm mt-1",
573
- style: x({ color: r(o).muted })
573
+ style: x({ color: s(o).muted })
574
574
  }, [
575
- L(u.$slots, "descricao", {}, () => [
576
- Y(A(t.descricao), 1)
575
+ L(l.$slots, "descricao", {}, () => [
576
+ X(B(t.descricao), 1)
577
577
  ], !0)
578
- ], 4)) : g("", !0)
579
- ])) : g("", !0)
578
+ ], 4)) : y("", !0)
579
+ ])) : y("", !0)
580
580
  ]),
581
- k("div", fe, [
581
+ S("div", ge, [
582
582
  ft(st, {
583
583
  type: "line",
584
- data: p.value,
585
- options: j.value,
586
- plugins: K,
584
+ data: Z.value,
585
+ options: tt.value,
586
+ plugins: Q,
587
587
  height: t.height
588
588
  }, null, 8, ["data", "options", "height"])
589
589
  ]),
590
- u.$slots.footer ? (l(), s("div", pe, [
591
- L(u.$slots, "footer", {}, void 0, !0)
592
- ])) : g("", !0)
590
+ l.$slots.footer ? (u(), f("div", ye, [
591
+ L(l.$slots, "footer", {}, void 0, !0)
592
+ ])) : y("", !0)
593
593
  ], 6));
594
594
  }
595
- }, ye = /* @__PURE__ */ at(ge, [["__scopeId", "data-v-513bd6fe"]]), me = { class: "card-pizza__topo flex align-items-start justify-content-between gap-3" }, be = {
595
+ }, be = /* @__PURE__ */ nt(me, [["__scopeId", "data-v-513bd6fe"]]), he = { class: "card-pizza__topo flex align-items-start justify-content-between gap-3" }, xe = {
596
596
  key: 0,
597
597
  class: "nc-legendas-flex flex flex-column"
598
- }, he = {
598
+ }, ve = {
599
599
  key: 1,
600
600
  class: "nc-actions inline-flex align-items-center gap-2"
601
- }, xe = ["innerHTML"], ve = { class: "card-pizza__corpo flex align-items-center" }, $e = { class: "nc-tabela flex flex-column" }, Se = { class: "nc-tabela-valor" }, ke = { class: "nc-tabela-rotulo inline-flex align-items-center gap-2" }, Ce = { class: "nc-tabela-valor" }, Be = { class: "card-pizza__chart-wrap flex align-items-center justify-content-center" }, Ae = { class: "card-pizza__chart" }, Re = {
601
+ }, $e = ["innerHTML"], Se = { class: "card-pizza__corpo flex align-items-center" }, Ce = { class: "nc-tabela flex flex-column" }, ke = { class: "nc-tabela-valor" }, Be = ["role", "tabindex", "onMouseenter", "onFocus", "onClick", "onKeydown"], Ae = { class: "nc-tabela-rotulo inline-flex align-items-center gap-2" }, we = { class: "nc-tabela-valor" }, Re = { class: "card-pizza__chart-wrap flex align-items-center justify-content-center" }, Te = { class: "card-pizza__chart" }, qe = {
602
602
  key: 0,
603
603
  class: "nc-centro flex flex-column align-items-center justify-content-center"
604
- }, we = {
604
+ }, Fe = {
605
605
  key: 0,
606
606
  class: "card-pizza__footer mt-3"
607
- }, Te = {
607
+ }, Ee = {
608
608
  __name: "CardPizza",
609
609
  props: {
610
610
  legenda: { type: String, default: null },
@@ -650,26 +650,27 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
650
650
  height: { type: [String, Number], default: 260 },
651
651
  cutout: { type: [String, Number], default: "70%" },
652
652
  exportar: { type: Boolean, default: !1 },
653
- nomeArquivoExport: { type: String, default: "card-pizza.png" }
653
+ nomeArquivoExport: { type: String, default: "card-pizza.png" },
654
+ itensClicaveis: { type: Boolean, default: !1 }
654
655
  },
655
- emits: ["botaoAcao", "exportado"],
656
- setup(t, { emit: y }) {
657
- const e = t, d = y, { palette: o, cardStyle: B } = it(e), { formatar: $ } = pt(e), R = ot(null);
658
- async function I() {
659
- await ct(R.value, {
656
+ emits: ["botaoAcao", "exportado", "itemClicado"],
657
+ setup(t, { emit: m }) {
658
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null);
659
+ async function D() {
660
+ await ct(A.value, {
660
661
  nomeArquivo: e.nomeArquivoExport,
661
662
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
662
- }), d("exportado");
663
+ }), p("exportado");
663
664
  }
664
- const w = M(() => `card-pizza--${e.direcao}`), F = M(() => {
665
- const p = bt(e.corDetalhes, e.data.length);
666
- return e.data.map((E, j) => E.cor ?? p[j]);
667
- }), z = M(() => ({
668
- labels: e.data.map((p) => p.rotulo),
665
+ const R = M(() => `card-pizza--${e.direcao}`), w = M(() => {
666
+ const d = xt(e.corDetalhes, e.data.length);
667
+ return e.data.map((l, n) => l.cor ?? d[n]);
668
+ }), T = M(() => ({
669
+ labels: e.data.map((d) => d.rotulo),
669
670
  datasets: [
670
671
  {
671
- data: e.data.map((p) => p.quantidade),
672
- backgroundColor: F.value,
672
+ data: e.data.map((d) => d.quantidade),
673
+ backgroundColor: w.value,
673
674
  borderWidth: 0,
674
675
  borderColor: "transparent",
675
676
  hoverOffset: 6,
@@ -678,171 +679,201 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
678
679
  }
679
680
  ]
680
681
  }));
681
- function Q(p) {
682
- const { chart: E, tooltip: j } = p, G = rt(E);
683
- if (!G) return;
684
- const u = gt(G);
685
- if (j.opacity === 0) {
686
- u.style.opacity = "0";
682
+ function J(d) {
683
+ const { chart: l, tooltip: n } = d, a = lt(l);
684
+ if (!a) return;
685
+ const r = gt(a);
686
+ if (n.opacity === 0) {
687
+ r.style.opacity = "0";
687
688
  return;
688
689
  }
689
- const c = j.title || [], a = j.dataPoints && j.dataPoints[0], b = a ? F.value[a.dataIndex] : "#3B82F6", v = a ? $(a.parsed) : "", i = u.querySelector(".nc-tt__content");
690
- i.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${c.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${b};box-shadow:0 0 0 2px ${D(b, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${v}</span></div>`;
691
- const { offsetLeft: f, offsetTop: n } = E.canvas;
692
- u.style.opacity = "1", u.style.visibility = "hidden", u.style.left = "0px", u.style.top = "0px";
693
- const m = u.offsetWidth, h = u.offsetHeight, H = 4, T = f + j.caretX, q = n + j.caretY, C = nt(T, m, G.clientWidth, H), V = q < h + 16 + H;
694
- u.style.transform = V ? "translate(-50%, 16px)" : "translate(-50%, calc(-100% - 16px))";
695
- const S = u.querySelector(".nc-tt__caret");
696
- S && (V ? (S.style.bottom = "", S.style.top = "-5px", S.style.borderRight = "", S.style.borderBottom = "", S.style.borderLeft = "1px solid rgba(15,23,42,.06)", S.style.borderTop = "1px solid rgba(15,23,42,.06)") : (S.style.top = "", S.style.bottom = "-5px", S.style.borderLeft = "", S.style.borderTop = "", S.style.borderRight = "1px solid rgba(15,23,42,.06)", S.style.borderBottom = "1px solid rgba(15,23,42,.06)")), u.style.left = C + "px", u.style.top = q + "px", u.style.visibility = "visible";
690
+ const v = n.title || [], i = n.dataPoints && n.dataPoints[0], g = i ? w.value[i.dataIndex] : "#3B82F6", c = i ? $(i.parsed) : "", b = r.querySelector(".nc-tt__content");
691
+ b.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${v.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${g};box-shadow:0 0 0 2px ${j(g, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${c}</span></div>`;
692
+ const { offsetLeft: h, offsetTop: V } = l.canvas;
693
+ r.style.opacity = "1", r.style.visibility = "hidden", r.style.left = "0px", r.style.top = "0px";
694
+ const q = r.offsetWidth, E = r.offsetHeight, C = 4, I = h + n.caretX, N = V + n.caretY, z = rt(I, q, a.clientWidth, C), H = N < E + 16 + C;
695
+ r.style.transform = H ? "translate(-50%, 16px)" : "translate(-50%, calc(-100% - 16px))";
696
+ const F = r.querySelector(".nc-tt__caret");
697
+ F && (H ? (F.style.bottom = "", F.style.top = "-5px", F.style.borderRight = "", F.style.borderBottom = "", F.style.borderLeft = "1px solid rgba(15,23,42,.06)", F.style.borderTop = "1px solid rgba(15,23,42,.06)") : (F.style.top = "", F.style.bottom = "-5px", F.style.borderLeft = "", F.style.borderTop = "", F.style.borderRight = "1px solid rgba(15,23,42,.06)", F.style.borderBottom = "1px solid rgba(15,23,42,.06)")), r.style.left = z + "px", r.style.top = N + "px", r.style.visibility = "visible";
698
+ }
699
+ function O(d) {
700
+ const l = e.data[d];
701
+ l && p("itemClicado", { item: l, index: d, cor: w.value[d] });
697
702
  }
698
- const X = M(() => ({
703
+ function _(d, l) {
704
+ e.itensClicaveis && p("itemClicado", { item: d, index: l, cor: w.value[l] });
705
+ }
706
+ const Q = et(null), Z = M(() => ({
699
707
  responsive: !0,
700
708
  maintainAspectRatio: !1,
701
709
  cutout: e.cutout,
702
710
  layout: { padding: 4 },
711
+ onHover: (d, l, n) => {
712
+ const a = l.length ? l[0].index : null;
713
+ Q.value = a, n.canvas.style.cursor = e.itensClicaveis && l.length ? "pointer" : "default";
714
+ },
715
+ onClick: (d, l) => {
716
+ !e.itensClicaveis || !l.length || O(l[0].index);
717
+ },
703
718
  plugins: {
704
719
  legend: { display: !1 },
705
720
  tooltip: {
706
721
  enabled: !1,
707
- external: Q,
722
+ external: J,
708
723
  callbacks: {
709
- title: (p) => {
710
- var E;
711
- return ((E = p[0]) == null ? void 0 : E.label) ?? "";
724
+ title: (d) => {
725
+ var l;
726
+ return ((l = d[0]) == null ? void 0 : l.label) ?? "";
712
727
  },
713
- label: (p) => $(p.parsed)
728
+ label: (d) => $(d.parsed)
714
729
  }
715
730
  }
716
731
  }
717
732
  }));
718
- function _() {
719
- d("botaoAcao");
733
+ function K() {
734
+ p("botaoAcao");
720
735
  }
721
- const K = dt;
722
- return (p, E) => (l(), s("div", {
736
+ const tt = dt;
737
+ return (d, l) => (u(), f("div", {
723
738
  ref_key: "cardRef",
724
- ref: R,
725
- class: lt(["card-pizza p-4 flex flex-column", w.value]),
726
- style: x(r(B))
739
+ ref: A,
740
+ class: ot(["card-pizza p-4 flex flex-column", R.value]),
741
+ style: x(s(k))
727
742
  }, [
728
- k("div", me, [
729
- p.$slots.legenda || t.legenda || p.$slots.sublegenda || t.sublegenda ? (l(), s("div", be, [
730
- p.$slots.legenda || t.legenda ? (l(), s("div", {
743
+ S("div", he, [
744
+ d.$slots.legenda || t.legenda || d.$slots.sublegenda || t.sublegenda ? (u(), f("div", xe, [
745
+ d.$slots.legenda || t.legenda ? (u(), f("div", {
731
746
  key: 0,
732
747
  class: "text-xs font-medium",
733
- style: x({ color: r(o).text, opacity: 0.95 })
748
+ style: x({ color: s(o).text, opacity: 0.95 })
734
749
  }, [
735
- L(p.$slots, "legenda", {}, () => [
736
- Y(A(t.legenda), 1)
750
+ L(d.$slots, "legenda", {}, () => [
751
+ X(B(t.legenda), 1)
737
752
  ], !0)
738
- ], 4)) : g("", !0),
739
- p.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
753
+ ], 4)) : y("", !0),
754
+ d.$slots.sublegenda || t.sublegenda ? (u(), f("div", {
740
755
  key: 1,
741
756
  class: "text-xs",
742
- style: x({ color: r(o).muted })
757
+ style: x({ color: s(o).muted })
743
758
  }, [
744
- L(p.$slots, "sublegenda", {}, () => [
745
- Y(A(t.sublegenda), 1)
759
+ L(d.$slots, "sublegenda", {}, () => [
760
+ X(B(t.sublegenda), 1)
746
761
  ], !0)
747
- ], 4)) : g("", !0)
748
- ])) : g("", !0),
749
- p.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", he, [
750
- L(p.$slots, "actions", {}, () => [
751
- t.botaoVisivel ? (l(), s("button", {
762
+ ], 4)) : y("", !0)
763
+ ])) : y("", !0),
764
+ d.$slots.actions || t.botaoVisivel || t.exportar ? (u(), f("div", ve, [
765
+ L(d.$slots, "actions", {}, () => [
766
+ t.botaoVisivel ? (u(), f("button", {
752
767
  key: 0,
753
768
  class: "nc-btn inline-flex align-items-center",
754
- style: x({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
755
- onClick: _
769
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
770
+ onClick: K
756
771
  }, [
757
- k("span", null, A(t.textoBotao), 1)
758
- ], 4)) : g("", !0)
772
+ S("span", null, B(t.textoBotao), 1)
773
+ ], 4)) : y("", !0)
759
774
  ], !0),
760
- t.exportar ? (l(), s("button", {
775
+ t.exportar ? (u(), f("button", {
761
776
  key: 0,
762
777
  type: "button",
763
778
  class: "nc-exportar inline-flex align-items-center justify-content-center",
764
- style: x({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
779
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).text, 0.18) }),
765
780
  title: "Exportar como imagem",
766
781
  "aria-label": "Exportar como imagem",
767
- onClick: I,
768
- innerHTML: r(K)
769
- }, null, 12, xe)) : g("", !0)
770
- ])) : g("", !0)
782
+ onClick: D,
783
+ innerHTML: s(tt)
784
+ }, null, 12, $e)) : y("", !0)
785
+ ])) : y("", !0)
771
786
  ]),
772
- k("div", ve, [
773
- k("div", $e, [
774
- t.mostrarCabecalho ? (l(), s("div", {
787
+ S("div", Se, [
788
+ S("div", Ce, [
789
+ t.mostrarCabecalho ? (u(), f("div", {
775
790
  key: 0,
776
791
  class: "nc-tabela-cab flex align-items-center justify-content-between",
777
- style: x({ color: r(o).muted, borderColor: r(D)(r(o).muted, 0.25) })
792
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).muted, 0.25) })
778
793
  }, [
779
- k("span", null, A(t.rotuloCategoria), 1),
780
- k("span", Se, A(t.rotuloQuantidade), 1)
781
- ], 4)) : g("", !0),
782
- (l(!0), s(yt, null, mt(t.data, (j, G) => (l(), s("div", {
783
- key: G,
784
- class: "nc-tabela-linha flex align-items-center justify-content-between",
785
- style: x({ color: r(o).text })
794
+ S("span", null, B(t.rotuloCategoria), 1),
795
+ S("span", ke, B(t.rotuloQuantidade), 1)
796
+ ], 4)) : y("", !0),
797
+ (u(!0), f(bt, null, ht(t.data, (n, a) => (u(), f("div", {
798
+ key: a,
799
+ class: ot(["nc-tabela-linha flex align-items-center justify-content-between", { "nc-tabela-linha--clicavel": t.itensClicaveis, "nc-tabela-linha--ativa": Q.value === a }]),
800
+ style: x({
801
+ color: s(o).text,
802
+ cursor: t.itensClicaveis ? "pointer" : "default",
803
+ "--nc-linha-bg": s(j)(w.value[a], 0.05),
804
+ "--nc-linha-bg-forte": s(j)(w.value[a], 0.08)
805
+ }),
806
+ role: t.itensClicaveis ? "button" : null,
807
+ tabindex: t.itensClicaveis ? 0 : null,
808
+ onMouseenter: (r) => Q.value = a,
809
+ onMouseleave: l[0] || (l[0] = (r) => Q.value = null),
810
+ onFocus: (r) => Q.value = a,
811
+ onBlur: l[1] || (l[1] = (r) => Q.value = null),
812
+ onClick: (r) => _(n, a),
813
+ onKeydown: [
814
+ yt(mt((r) => _(n, a), ["prevent"]), ["enter"]),
815
+ yt(mt((r) => _(n, a), ["prevent"]), ["space"])
816
+ ]
786
817
  }, [
787
- k("span", ke, [
788
- k("span", {
818
+ S("span", Ae, [
819
+ S("span", {
789
820
  class: "nc-bolinha",
790
- style: x({ background: F.value[G] })
821
+ style: x({ background: w.value[a] })
791
822
  }, null, 4),
792
- k("span", null, A(j.rotulo), 1)
823
+ S("span", null, B(n.rotulo), 1)
793
824
  ]),
794
- k("span", Ce, A(r($)(j.quantidade)), 1)
795
- ], 4))), 128))
825
+ S("span", we, B(s($)(n.quantidade)), 1)
826
+ ], 46, Be))), 128))
796
827
  ]),
797
- k("div", Be, [
798
- k("div", Ae, [
828
+ S("div", Re, [
829
+ S("div", Te, [
799
830
  ft(st, {
800
831
  type: "doughnut",
801
- data: z.value,
802
- options: X.value,
832
+ data: T.value,
833
+ options: Z.value,
803
834
  height: t.height
804
835
  }, null, 8, ["data", "options", "height"]),
805
- p.$slots.titulo || t.titulo || p.$slots.descricao || t.descricao ? (l(), s("div", Re, [
806
- p.$slots.titulo || t.titulo ? (l(), s("div", {
836
+ d.$slots.titulo || t.titulo || d.$slots.descricao || t.descricao ? (u(), f("div", qe, [
837
+ d.$slots.titulo || t.titulo ? (u(), f("div", {
807
838
  key: 0,
808
839
  class: "nc-centro-titulo m-0 font-semibold",
809
- style: x({ color: r(o).text })
840
+ style: x({ color: s(o).text })
810
841
  }, [
811
- L(p.$slots, "titulo", {}, () => [
812
- Y(A(t.titulo), 1)
842
+ L(d.$slots, "titulo", {}, () => [
843
+ X(B(t.titulo), 1)
813
844
  ], !0)
814
- ], 4)) : g("", !0),
815
- p.$slots.descricao || t.descricao ? (l(), s("div", {
845
+ ], 4)) : y("", !0),
846
+ d.$slots.descricao || t.descricao ? (u(), f("div", {
816
847
  key: 1,
817
848
  class: "nc-centro-desc",
818
- style: x({ color: r(o).muted })
849
+ style: x({ color: s(o).muted })
819
850
  }, [
820
- L(p.$slots, "descricao", {}, () => [
821
- Y(A(t.descricao), 1)
851
+ L(d.$slots, "descricao", {}, () => [
852
+ X(B(t.descricao), 1)
822
853
  ], !0)
823
- ], 4)) : g("", !0)
824
- ])) : g("", !0)
854
+ ], 4)) : y("", !0)
855
+ ])) : y("", !0)
825
856
  ])
826
857
  ])
827
858
  ]),
828
- p.$slots.footer ? (l(), s("div", we, [
829
- L(p.$slots, "footer", {}, void 0, !0)
830
- ])) : g("", !0)
859
+ d.$slots.footer ? (u(), f("div", Fe, [
860
+ L(d.$slots, "footer", {}, void 0, !0)
861
+ ])) : y("", !0)
831
862
  ], 6));
832
863
  }
833
- }, qe = /* @__PURE__ */ at(Te, [["__scopeId", "data-v-e0fe217f"]]), Ee = { class: "card-barra__header flex flex-column" }, Fe = { class: "card-barra__topo flex align-items-start justify-content-between gap-3" }, Le = {
864
+ }, Le = /* @__PURE__ */ nt(Ee, [["__scopeId", "data-v-eda43720"]]), Me = { class: "card-barra__header flex flex-column" }, ze = { class: "card-barra__topo flex align-items-start justify-content-between gap-3" }, He = {
834
865
  key: 0,
835
866
  class: "nc-legendas-flex flex flex-column"
836
- }, ze = {
867
+ }, je = {
837
868
  key: 1,
838
869
  class: "nc-actions inline-flex align-items-center gap-2"
839
- }, Me = ["innerHTML"], je = {
870
+ }, Ve = ["innerHTML"], Ne = {
840
871
  key: 0,
841
872
  class: "card-barra__titulos mt-3 mb-2 flex flex-column"
842
- }, He = { class: "card-barra__chart flex-1" }, Ve = {
873
+ }, Pe = { class: "card-barra__chart flex-1" }, Ie = {
843
874
  key: 0,
844
875
  class: "card-barra__footer mt-3"
845
- }, Ne = {
876
+ }, De = {
846
877
  __name: "CardBarra",
847
878
  props: {
848
879
  legenda: { type: String, default: null },
@@ -908,61 +939,61 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
908
939
  corHover: { type: String, default: null }
909
940
  },
910
941
  emits: ["botaoAcao", "exportado"],
911
- setup(t, { emit: y }) {
912
- Vt((i) => ({
913
- c9bf3d56: z.value
942
+ setup(t, { emit: m }) {
943
+ Pt((i) => ({
944
+ c9bf3d56: T.value
914
945
  }));
915
- const e = t, d = y, { palette: o, cardStyle: B } = it(e), { formatar: $ } = pt(e), R = ot(null), I = dt;
916
- async function w() {
917
- await ct(R.value, {
946
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null), D = dt;
947
+ async function R() {
948
+ await ct(A.value, {
918
949
  nomeArquivo: e.nomeArquivoExport,
919
950
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
920
- }), d("exportado");
951
+ }), p("exportado");
921
952
  }
922
- const F = M(() => `card-barra--${e.direcao}`), z = M(
953
+ const w = M(() => `card-barra--${e.direcao}`), T = M(
923
954
  () => typeof e.height == "number" ? `${e.height}px` : e.height
924
- ), Q = M(() => e.orientacao === "horizontal"), X = M(() => Array.isArray(e.series) && e.series.length > 0 ? e.series.map((i, f) => ({
925
- nome: i.nome ?? `Série ${f + 1}`,
926
- cor: i.cor || e.cores[f % e.cores.length],
955
+ ), J = M(() => e.orientacao === "horizontal"), O = M(() => Array.isArray(e.series) && e.series.length > 0 ? e.series.map((i, g) => ({
956
+ nome: i.nome ?? `Série ${g + 1}`,
957
+ cor: i.cor || e.cores[g % e.cores.length],
927
958
  dados: Array.isArray(i.dados) ? i.dados : []
928
959
  })) : [{ nome: e.legenda || "Valores", cor: e.corDetalhes, dados: e.data }]), _ = M(() => {
929
- const i = X.value[0];
930
- return i ? i.dados.map((f) => f.rotulo) : [];
931
- }), K = M(() => {
932
- const i = X.value, f = i.length - 1, n = typeof e.larguraBarra == "number" ? e.larguraBarra : Number(e.larguraBarra) || 0.6, m = e.raioBarra, h = Q.value;
933
- function H(T) {
934
- if (!e.empilhado || i.length === 1) return m;
935
- const q = T === 0, C = T === f;
960
+ const i = O.value[0];
961
+ return i ? i.dados.map((g) => g.rotulo) : [];
962
+ }), Q = M(() => {
963
+ const i = O.value, g = i.length - 1, c = typeof e.larguraBarra == "number" ? e.larguraBarra : Number(e.larguraBarra) || 0.6, b = e.raioBarra, h = J.value;
964
+ function V(q) {
965
+ if (!e.empilhado || i.length === 1) return b;
966
+ const E = q === 0, C = q === g;
936
967
  return h ? {
937
- topLeft: q ? m : 0,
938
- bottomLeft: q ? m : 0,
939
- topRight: C ? m : 0,
940
- bottomRight: C ? m : 0
968
+ topLeft: E ? b : 0,
969
+ bottomLeft: E ? b : 0,
970
+ topRight: C ? b : 0,
971
+ bottomRight: C ? b : 0
941
972
  } : {
942
- bottomLeft: q ? m : 0,
943
- bottomRight: q ? m : 0,
944
- topLeft: C ? m : 0,
945
- topRight: C ? m : 0
973
+ bottomLeft: E ? b : 0,
974
+ bottomRight: E ? b : 0,
975
+ topLeft: C ? b : 0,
976
+ topRight: C ? b : 0
946
977
  };
947
978
  }
948
979
  return {
949
980
  labels: _.value,
950
- datasets: i.map((T, q) => ({
951
- label: T.nome,
952
- data: T.dados.map((C) => C.quantidade),
953
- previstos: T.dados.map((C) => C.previsto != null ? C.previsto : null),
954
- backgroundColor: D(T.cor, 0.72),
955
- hoverBackgroundColor: e.corHover || T.cor,
981
+ datasets: i.map((q, E) => ({
982
+ label: q.nome,
983
+ data: q.dados.map((C) => C.quantidade),
984
+ previstos: q.dados.map((C) => C.previsto != null ? C.previsto : null),
985
+ backgroundColor: j(q.cor, 0.72),
986
+ hoverBackgroundColor: e.corHover || q.cor,
956
987
  borderWidth: 0,
957
- borderRadius: H(q),
988
+ borderRadius: V(E),
958
989
  borderSkipped: !1,
959
990
  categoryPercentage: 1,
960
- barPercentage: n
991
+ barPercentage: c
961
992
  }))
962
993
  };
963
994
  });
964
- function p(i, f) {
965
- f ? Object.assign(i.style, {
995
+ function Z(i, g) {
996
+ g ? Object.assign(i.style, {
966
997
  top: "-5px",
967
998
  bottom: "auto",
968
999
  borderTop: "1px solid rgba(15,23,42,.06)",
@@ -978,51 +1009,51 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
978
1009
  borderLeft: "none"
979
1010
  });
980
1011
  }
981
- let E = null;
982
- function j(i) {
983
- var kt, Ct;
984
- const { chart: f, tooltip: n } = i, m = rt(f);
985
- if (!m) return;
986
- const h = gt(m, { caretFlexivel: !0 });
987
- if (n.opacity === 0 || E) {
1012
+ let K = null;
1013
+ function tt(i) {
1014
+ var Bt, At;
1015
+ const { chart: g, tooltip: c } = i, b = lt(g);
1016
+ if (!b) return;
1017
+ const h = gt(b, { caretFlexivel: !0 });
1018
+ if (c.opacity === 0 || K) {
988
1019
  h.style.opacity = "0";
989
1020
  return;
990
1021
  }
991
- const H = n.title || [], T = n.dataPoints || [], q = h.querySelector(".nc-tt__content"), C = T.map((et) => {
992
- var Bt;
993
- const ut = ((Bt = X.value[et.datasetIndex]) == null ? void 0 : Bt.cor) || e.corDetalhes, Lt = $(Q.value ? et.parsed.x : et.parsed.y), zt = et.dataset.label && X.value.length > 1 ? `<span style="font-size:11px;color:#64748B;margin-right:6px;">${et.dataset.label}</span>` : "";
994
- return `<div style="display:flex;align-items:center;gap:6px;margin-top:2px;"><span style="width:6px;height:6px;border-radius:999px;background:${ut};box-shadow:0 0 0 2px ${D(ut, 0.15)};flex:0 0 auto;"></span>` + zt + `<span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${Lt}</span></div>`;
995
- }).join(""), V = (kt = T[0]) == null ? void 0 : kt.dataIndex;
996
- let S = null;
997
- if (V != null)
998
- for (const et of f.data.datasets) {
999
- const ut = (Ct = et.previstos) == null ? void 0 : Ct[V];
1022
+ const V = c.title || [], q = c.dataPoints || [], E = h.querySelector(".nc-tt__content"), C = q.map((at) => {
1023
+ var wt;
1024
+ const ut = ((wt = O.value[at.datasetIndex]) == null ? void 0 : wt.cor) || e.corDetalhes, zt = $(J.value ? at.parsed.x : at.parsed.y), Ht = at.dataset.label && O.value.length > 1 ? `<span style="font-size:11px;color:#64748B;margin-right:6px;">${at.dataset.label}</span>` : "";
1025
+ return `<div style="display:flex;align-items:center;gap:6px;margin-top:2px;"><span style="width:6px;height:6px;border-radius:999px;background:${ut};box-shadow:0 0 0 2px ${j(ut, 0.15)};flex:0 0 auto;"></span>` + Ht + `<span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${zt}</span></div>`;
1026
+ }).join(""), I = (Bt = q[0]) == null ? void 0 : Bt.dataIndex;
1027
+ let N = null;
1028
+ if (I != null)
1029
+ for (const at of g.data.datasets) {
1030
+ const ut = (At = at.previstos) == null ? void 0 : At[I];
1000
1031
  if (ut != null) {
1001
- S = ut;
1032
+ N = ut;
1002
1033
  break;
1003
1034
  }
1004
1035
  }
1005
- const P = S != null ? `<div style="display:flex;align-items:center;gap:6px;margin-top:6px;padding-top:4px;border-top:1px dashed rgba(15,23,42,.08);"><span style="font-size:11px;color:#64748B;margin-right:6px;">Previsto</span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${$(S)}</span></div>` : "";
1006
- q.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${H.join(" ")}</div>` + C + P;
1007
- const { offsetLeft: O, offsetTop: tt } = f.canvas;
1036
+ const z = N != null ? `<div style="display:flex;align-items:center;gap:6px;margin-top:6px;padding-top:4px;border-top:1px dashed rgba(15,23,42,.08);"><span style="font-size:11px;color:#64748B;margin-right:6px;">Previsto</span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${$(N)}</span></div>` : "";
1037
+ E.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${V.join(" ")}</div>` + C + z;
1038
+ const { offsetLeft: H, offsetTop: F } = g.canvas;
1008
1039
  h.style.opacity = "1", h.style.visibility = "hidden", h.style.left = "0px", h.style.top = "0px";
1009
- const U = h.offsetWidth, N = h.offsetHeight, Z = 4, W = O + n.caretX, J = tt + n.caretY, ht = nt(W, U, m.clientWidth, Z), Tt = U / 2, xt = 14, vt = J - xt - N, $t = vt < Z, qt = $t ? J + xt : vt, St = h.querySelector(".nc-tt__caret");
1010
- p(St, $t);
1011
- const Et = W - (ht - Tt), Ft = Math.max(10, Math.min(U - 10, Et));
1012
- St.style.left = Ft + "px", h.style.left = ht + "px", h.style.top = qt + "px", h.style.visibility = "visible";
1040
+ const U = h.offsetWidth, P = h.offsetHeight, G = 4, W = H + c.caretX, Y = F + c.caretY, vt = rt(W, U, b.clientWidth, G), Ft = U / 2, $t = 14, St = Y - $t - P, Ct = St < G, Et = Ct ? Y + $t : St, kt = h.querySelector(".nc-tt__caret");
1041
+ Z(kt, Ct);
1042
+ const Lt = W - (vt - Ft), Mt = Math.max(10, Math.min(U - 10, Lt));
1043
+ kt.style.left = Mt + "px", h.style.left = vt + "px", h.style.top = Et + "px", h.style.visibility = "visible";
1013
1044
  }
1014
- const G = M(() => {
1015
- const i = Q.value, f = {
1045
+ const d = M(() => {
1046
+ const i = J.value, g = {
1016
1047
  grid: { display: !1, drawBorder: !1 },
1017
1048
  border: { display: !1 },
1018
1049
  ticks: { color: o.value.muted, font: { size: 10, family: "'Inter', sans-serif" }, padding: 8 },
1019
1050
  stacked: e.empilhado
1020
- }, n = {
1051
+ }, c = {
1021
1052
  display: !1,
1022
1053
  grid: { display: !1 },
1023
1054
  beginAtZero: !0,
1024
1055
  stacked: e.empilhado,
1025
- suggestedMax: c.value.length ? Math.max(...c.value.map((m) => m.valor)) : void 0
1056
+ suggestedMax: n.value.length ? Math.max(...n.value.map((b) => b.valor)) : void 0
1026
1057
  };
1027
1058
  return {
1028
1059
  responsive: !0,
@@ -1031,15 +1062,15 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1031
1062
  interaction: { intersect: !1, mode: "index", axis: i ? "y" : "x" },
1032
1063
  layout: {
1033
1064
  padding: {
1034
- top: c.value.length && !i ? 24 : 12,
1065
+ top: n.value.length && !i ? 24 : 12,
1035
1066
  right: i ? 12 : 0,
1036
1067
  bottom: 0,
1037
- left: c.value.length && i ? 60 : 0
1068
+ left: n.value.length && i ? 60 : 0
1038
1069
  }
1039
1070
  },
1040
1071
  plugins: {
1041
1072
  legend: {
1042
- display: e.mostrarLegendaSeries && X.value.length > 1,
1073
+ display: e.mostrarLegendaSeries && O.value.length > 1,
1043
1074
  position: "bottom",
1044
1075
  align: "start",
1045
1076
  labels: {
@@ -1054,93 +1085,93 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1054
1085
  },
1055
1086
  tooltip: {
1056
1087
  enabled: !1,
1057
- external: j,
1088
+ external: tt,
1058
1089
  callbacks: {
1059
- title: (m) => {
1090
+ title: (b) => {
1060
1091
  var h;
1061
- return ((h = m[0]) == null ? void 0 : h.label) ?? "";
1092
+ return ((h = b[0]) == null ? void 0 : h.label) ?? "";
1062
1093
  },
1063
- label: (m) => $(i ? m.parsed.x : m.parsed.y)
1094
+ label: (b) => $(i ? b.parsed.x : b.parsed.y)
1064
1095
  }
1065
1096
  }
1066
1097
  },
1067
1098
  scales: {
1068
- x: i ? n : f,
1069
- y: i ? f : n
1099
+ x: i ? c : g,
1100
+ y: i ? g : c
1070
1101
  }
1071
1102
  };
1072
1103
  });
1073
- function u() {
1074
- d("botaoAcao");
1104
+ function l() {
1105
+ p("botaoAcao");
1075
1106
  }
1076
- const c = M(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((f) => f && (typeof f == "number" || typeof f.valor == "number")).map((f) => typeof f == "number" ? { valor: f, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
1077
- valor: f.valor,
1078
- rotulo: f.rotulo ?? null,
1079
- cor: f.cor || "#0F172A",
1080
- corRotulo: f.corRotulo || f.cor || "#0F172A",
1081
- corTexto: f.corTexto || "#FFFFFF",
1082
- tracejado: f.tracejado || [6, 6],
1083
- espessura: f.espessura ?? 1
1084
- }) : []), a = [], b = {
1107
+ const n = M(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((g) => g && (typeof g == "number" || typeof g.valor == "number")).map((g) => typeof g == "number" ? { valor: g, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
1108
+ valor: g.valor,
1109
+ rotulo: g.rotulo ?? null,
1110
+ cor: g.cor || "#0F172A",
1111
+ corRotulo: g.corRotulo || g.cor || "#0F172A",
1112
+ corTexto: g.corTexto || "#FFFFFF",
1113
+ tracejado: g.tracejado || [6, 6],
1114
+ espessura: g.espessura ?? 1
1115
+ }) : []), a = [], r = {
1085
1116
  id: "linhaReferencia",
1086
1117
  afterDatasetsDraw(i) {
1087
- const f = c.value;
1088
- if (a.length = 0, !f.length) return;
1089
- const { ctx: n, chartArea: m, scales: h } = i, H = Q.value, T = H ? h.x : h.y;
1090
- T && f.forEach((q) => {
1091
- const C = T.getPixelForValue(q.valor);
1092
- if (a.push({ linha: q, pos: C, horizontal: H, chartArea: m }), n.save(), n.beginPath(), n.setLineDash(q.tracejado), n.lineWidth = q.espessura, n.strokeStyle = q.cor, H) {
1093
- if (C < m.left || C > m.right) {
1094
- n.restore();
1118
+ const g = n.value;
1119
+ if (a.length = 0, !g.length) return;
1120
+ const { ctx: c, chartArea: b, scales: h } = i, V = J.value, q = V ? h.x : h.y;
1121
+ q && g.forEach((E) => {
1122
+ const C = q.getPixelForValue(E.valor);
1123
+ if (a.push({ linha: E, pos: C, horizontal: V, chartArea: b }), c.save(), c.beginPath(), c.setLineDash(E.tracejado), c.lineWidth = E.espessura, c.strokeStyle = E.cor, V) {
1124
+ if (C < b.left || C > b.right) {
1125
+ c.restore();
1095
1126
  return;
1096
1127
  }
1097
- n.moveTo(C, m.top), n.lineTo(C, m.bottom);
1128
+ c.moveTo(C, b.top), c.lineTo(C, b.bottom);
1098
1129
  } else {
1099
- if (C < m.top || C > m.bottom) {
1100
- n.restore();
1130
+ if (C < b.top || C > b.bottom) {
1131
+ c.restore();
1101
1132
  return;
1102
1133
  }
1103
- n.moveTo(m.left, C), n.lineTo(m.right, C);
1134
+ c.moveTo(b.left, C), c.lineTo(b.right, C);
1104
1135
  }
1105
- if (n.stroke(), n.setLineDash([]), q.rotulo) {
1106
- n.font = "600 11px 'Inter', sans-serif";
1107
- const V = 8, S = 5, O = n.measureText(q.rotulo).width, tt = 12, U = O + V * 2, N = tt + S * 2, Z = N / 2;
1108
- let W, J;
1109
- H ? (W = C - U / 2, J = m.top - N - 6, J < 0 && (J = m.top + 6)) : (W = m.left - U - 6, J = C - N / 2, W < 0 && (W = m.left + 6)), n.fillStyle = q.corRotulo, n.beginPath(), n.roundRect ? n.roundRect(W, J, U, N, Z) : (n.moveTo(W + Z, J), n.lineTo(W + U - Z, J), n.quadraticCurveTo(W + U, J, W + U, J + Z), n.lineTo(W + U, J + N - Z), n.quadraticCurveTo(W + U, J + N, W + U - Z, J + N), n.lineTo(W + Z, J + N), n.quadraticCurveTo(W, J + N, W, J + N - Z), n.lineTo(W, J + Z), n.quadraticCurveTo(W, J, W + Z, J)), n.fill(), n.fillStyle = q.corTexto, n.textBaseline = "middle", n.textAlign = "center", n.fillText(q.rotulo, W + U / 2, J + N / 2);
1136
+ if (c.stroke(), c.setLineDash([]), E.rotulo) {
1137
+ c.font = "600 11px 'Inter', sans-serif";
1138
+ const I = 8, N = 5, H = c.measureText(E.rotulo).width, F = 12, U = H + I * 2, P = F + N * 2, G = P / 2;
1139
+ let W, Y;
1140
+ V ? (W = C - U / 2, Y = b.top - P - 6, Y < 0 && (Y = b.top + 6)) : (W = b.left - U - 6, Y = C - P / 2, W < 0 && (W = b.left + 6)), c.fillStyle = E.corRotulo, c.beginPath(), c.roundRect ? c.roundRect(W, Y, U, P, G) : (c.moveTo(W + G, Y), c.lineTo(W + U - G, Y), c.quadraticCurveTo(W + U, Y, W + U, Y + G), c.lineTo(W + U, Y + P - G), c.quadraticCurveTo(W + U, Y + P, W + U - G, Y + P), c.lineTo(W + G, Y + P), c.quadraticCurveTo(W, Y + P, W, Y + P - G), c.lineTo(W, Y + G), c.quadraticCurveTo(W, Y, W + G, Y)), c.fill(), c.fillStyle = E.corTexto, c.textBaseline = "middle", c.textAlign = "center", c.fillText(E.rotulo, W + U / 2, Y + P / 2);
1110
1141
  }
1111
- n.restore();
1142
+ c.restore();
1112
1143
  });
1113
1144
  },
1114
- beforeEvent(i, f) {
1145
+ beforeEvent(i, g) {
1115
1146
  if (!a.length) {
1116
- E = null;
1147
+ K = null;
1117
1148
  return;
1118
1149
  }
1119
- const n = f.event;
1120
- if (!n || n.type === "mouseout" || n.x == null || n.y == null) {
1121
- E = null;
1150
+ const c = g.event;
1151
+ if (!c || c.type === "mouseout" || c.x == null || c.y == null) {
1152
+ K = null;
1122
1153
  return;
1123
1154
  }
1124
- const m = 8;
1125
- let h = null, H = 1 / 0;
1126
- for (const T of a) {
1127
- const q = T.horizontal ? Math.abs(n.x - T.pos) : Math.abs(n.y - T.pos), C = T.horizontal ? n.y >= T.chartArea.top && n.y <= T.chartArea.bottom : n.x >= T.chartArea.left && n.x <= T.chartArea.right;
1128
- q <= m && C && q < H && (H = q, h = T);
1155
+ const b = 8;
1156
+ let h = null, V = 1 / 0;
1157
+ for (const q of a) {
1158
+ const E = q.horizontal ? Math.abs(c.x - q.pos) : Math.abs(c.y - q.pos), C = q.horizontal ? c.y >= q.chartArea.top && c.y <= q.chartArea.bottom : c.x >= q.chartArea.left && c.x <= q.chartArea.right;
1159
+ E <= b && C && E < V && (V = E, h = q);
1129
1160
  }
1130
- E = h;
1161
+ K = h;
1131
1162
  },
1132
- afterEvent(i, f) {
1163
+ afterEvent(i, g) {
1133
1164
  if (!a.length) return;
1134
- const n = f.event;
1135
- if (!n) return;
1136
- const m = rt(i);
1137
- if (!m) return;
1138
- let h = m.querySelector(".nc-tt-linhaRef");
1139
- if (!E) {
1165
+ const c = g.event;
1166
+ if (!c) return;
1167
+ const b = lt(i);
1168
+ if (!b) return;
1169
+ let h = b.querySelector(".nc-tt-linhaRef");
1170
+ if (!K) {
1140
1171
  h && (h.style.opacity = "0");
1141
1172
  return;
1142
1173
  }
1143
- const H = E;
1174
+ const V = K;
1144
1175
  h || (h = document.createElement("div"), h.className = "nc-tt-linhaRef", Object.assign(h.style, {
1145
1176
  position: "absolute",
1146
1177
  pointerEvents: "none",
@@ -1156,119 +1187,119 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1156
1187
  zIndex: "11",
1157
1188
  fontFamily: "'Inter', sans-serif",
1158
1189
  textAlign: "left"
1159
- }), m.appendChild(h));
1160
- const T = H.linha.cor || "#0F172A", q = $(H.linha.valor), C = H.linha.rotulo;
1161
- h.innerHTML = (C ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${C}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${T};box-shadow:0 0 0 2px ${D(T, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${q}</span></div>`;
1162
- const V = i.canvas;
1190
+ }), b.appendChild(h));
1191
+ const q = V.linha.cor || "#0F172A", E = $(V.linha.valor), C = V.linha.rotulo;
1192
+ h.innerHTML = (C ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${C}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${q};box-shadow:0 0 0 2px ${j(q, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${E}</span></div>`;
1193
+ const I = i.canvas;
1163
1194
  h.style.opacity = "1", h.style.visibility = "hidden", h.style.left = "0px", h.style.top = "0px";
1164
- const S = h.offsetWidth, P = h.offsetHeight, O = 4;
1165
- let tt, U;
1166
- H.horizontal ? (tt = V.offsetLeft + H.pos, U = V.offsetTop + n.y) : (tt = V.offsetLeft + n.x, U = V.offsetTop + H.pos);
1167
- const N = nt(tt, S, m.clientWidth, O);
1168
- let Z = U;
1169
- const W = P + 16 + O;
1170
- Z < W && (Z = W), h.style.left = N + "px", h.style.top = Z + "px", h.style.visibility = "visible";
1195
+ const N = h.offsetWidth, z = h.offsetHeight, H = 4;
1196
+ let F, U;
1197
+ V.horizontal ? (F = I.offsetLeft + V.pos, U = I.offsetTop + c.y) : (F = I.offsetLeft + c.x, U = I.offsetTop + V.pos);
1198
+ const P = rt(F, N, b.clientWidth, H);
1199
+ let G = U;
1200
+ const W = z + 16 + H;
1201
+ G < W && (G = W), h.style.left = P + "px", h.style.top = G + "px", h.style.visibility = "visible";
1171
1202
  }
1172
- }, v = M(() => c.value.length ? [b] : []);
1173
- return (i, f) => (l(), s("div", {
1203
+ }, v = M(() => n.value.length ? [r] : []);
1204
+ return (i, g) => (u(), f("div", {
1174
1205
  ref_key: "cardRef",
1175
- ref: R,
1176
- class: lt(["card-barra p-4 flex", F.value]),
1177
- style: x(r(B))
1206
+ ref: A,
1207
+ class: ot(["card-barra p-4 flex", w.value]),
1208
+ style: x(s(k))
1178
1209
  }, [
1179
- k("div", Ee, [
1180
- k("div", Fe, [
1181
- i.$slots.legenda || t.legenda || i.$slots.sublegenda || t.sublegenda ? (l(), s("div", Le, [
1182
- i.$slots.legenda || t.legenda ? (l(), s("div", {
1210
+ S("div", Me, [
1211
+ S("div", ze, [
1212
+ i.$slots.legenda || t.legenda || i.$slots.sublegenda || t.sublegenda ? (u(), f("div", He, [
1213
+ i.$slots.legenda || t.legenda ? (u(), f("div", {
1183
1214
  key: 0,
1184
1215
  class: "text-xs font-medium",
1185
- style: x({ color: r(o).text, opacity: 0.85 })
1216
+ style: x({ color: s(o).text, opacity: 0.85 })
1186
1217
  }, [
1187
1218
  L(i.$slots, "legenda", {}, () => [
1188
- Y(A(t.legenda), 1)
1219
+ X(B(t.legenda), 1)
1189
1220
  ], !0)
1190
- ], 4)) : g("", !0),
1191
- i.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1221
+ ], 4)) : y("", !0),
1222
+ i.$slots.sublegenda || t.sublegenda ? (u(), f("div", {
1192
1223
  key: 1,
1193
1224
  class: "text-xs",
1194
- style: x({ color: r(o).muted })
1225
+ style: x({ color: s(o).muted })
1195
1226
  }, [
1196
1227
  L(i.$slots, "sublegenda", {}, () => [
1197
- Y(A(t.sublegenda), 1)
1228
+ X(B(t.sublegenda), 1)
1198
1229
  ], !0)
1199
- ], 4)) : g("", !0)
1200
- ])) : g("", !0),
1201
- i.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ze, [
1230
+ ], 4)) : y("", !0)
1231
+ ])) : y("", !0),
1232
+ i.$slots.actions || t.botaoVisivel || t.exportar ? (u(), f("div", je, [
1202
1233
  L(i.$slots, "actions", {}, () => [
1203
- t.botaoVisivel ? (l(), s("button", {
1234
+ t.botaoVisivel ? (u(), f("button", {
1204
1235
  key: 0,
1205
1236
  class: "nc-btn inline-flex align-items-center",
1206
- style: x({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
1207
- onClick: u
1237
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
1238
+ onClick: l
1208
1239
  }, [
1209
- k("span", null, A(t.textoBotao), 1)
1210
- ], 4)) : g("", !0)
1240
+ S("span", null, B(t.textoBotao), 1)
1241
+ ], 4)) : y("", !0)
1211
1242
  ], !0),
1212
- t.exportar ? (l(), s("button", {
1243
+ t.exportar ? (u(), f("button", {
1213
1244
  key: 0,
1214
1245
  type: "button",
1215
1246
  class: "nc-exportar inline-flex align-items-center justify-content-center",
1216
- style: x({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
1247
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).text, 0.18) }),
1217
1248
  title: "Exportar como imagem",
1218
1249
  "aria-label": "Exportar como imagem",
1219
- onClick: w,
1220
- innerHTML: r(I)
1221
- }, null, 12, Me)) : g("", !0)
1222
- ])) : g("", !0)
1250
+ onClick: R,
1251
+ innerHTML: s(D)
1252
+ }, null, 12, Ve)) : y("", !0)
1253
+ ])) : y("", !0)
1223
1254
  ]),
1224
- i.$slots.titulo || t.titulo || i.$slots.descricao || t.descricao ? (l(), s("div", je, [
1225
- i.$slots.titulo || t.titulo ? (l(), s("div", {
1255
+ i.$slots.titulo || t.titulo || i.$slots.descricao || t.descricao ? (u(), f("div", Ne, [
1256
+ i.$slots.titulo || t.titulo ? (u(), f("div", {
1226
1257
  key: 0,
1227
1258
  class: "m-0 text-3xl font-semibold",
1228
- style: x({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1259
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1229
1260
  }, [
1230
1261
  L(i.$slots, "titulo", {}, () => [
1231
- Y(A(t.titulo), 1)
1262
+ X(B(t.titulo), 1)
1232
1263
  ], !0)
1233
- ], 4)) : g("", !0),
1234
- i.$slots.descricao || t.descricao ? (l(), s("div", {
1264
+ ], 4)) : y("", !0),
1265
+ i.$slots.descricao || t.descricao ? (u(), f("div", {
1235
1266
  key: 1,
1236
1267
  class: "text-sm mt-1",
1237
- style: x({ color: r(o).muted })
1268
+ style: x({ color: s(o).muted })
1238
1269
  }, [
1239
1270
  L(i.$slots, "descricao", {}, () => [
1240
- Y(A(t.descricao), 1)
1271
+ X(B(t.descricao), 1)
1241
1272
  ], !0)
1242
- ], 4)) : g("", !0)
1243
- ])) : g("", !0)
1273
+ ], 4)) : y("", !0)
1274
+ ])) : y("", !0)
1244
1275
  ]),
1245
- k("div", He, [
1276
+ S("div", Pe, [
1246
1277
  ft(st, {
1247
1278
  type: "bar",
1248
- data: K.value,
1249
- options: G.value,
1279
+ data: Q.value,
1280
+ options: d.value,
1250
1281
  plugins: v.value,
1251
1282
  height: "100%"
1252
1283
  }, null, 8, ["data", "options", "plugins"])
1253
1284
  ]),
1254
- i.$slots.footer ? (l(), s("div", Ve, [
1285
+ i.$slots.footer ? (u(), f("div", Ie, [
1255
1286
  L(i.$slots, "footer", {}, void 0, !0)
1256
- ])) : g("", !0)
1287
+ ])) : y("", !0)
1257
1288
  ], 6));
1258
1289
  }
1259
- }, Pe = /* @__PURE__ */ at(Ne, [["__scopeId", "data-v-474043e8"]]), De = { class: "card-polar__topo flex align-items-start justify-content-between gap-3" }, Ie = {
1290
+ }, We = /* @__PURE__ */ nt(De, [["__scopeId", "data-v-474043e8"]]), Oe = { class: "card-polar__topo flex align-items-start justify-content-between gap-3" }, Xe = {
1260
1291
  key: 0,
1261
1292
  class: "nc-legendas-flex flex flex-column"
1262
- }, We = {
1293
+ }, Ye = {
1263
1294
  key: 1,
1264
1295
  class: "nc-actions inline-flex align-items-center gap-2"
1265
- }, Oe = ["innerHTML"], Xe = { class: "card-polar__corpo flex align-items-center" }, Ye = { class: "nc-tabela flex flex-column" }, Je = { class: "nc-tabela-valor" }, Qe = { class: "nc-tabela-rotulo inline-flex align-items-center gap-2" }, Ue = { class: "nc-tabela-valor" }, Ge = { class: "card-polar__chart-wrap flex align-items-center justify-content-center" }, Ze = { class: "card-polar__chart" }, Ke = {
1296
+ }, Je = ["innerHTML"], Qe = { class: "card-polar__corpo flex align-items-center" }, Ue = { class: "nc-tabela flex flex-column" }, Ge = { class: "nc-tabela-valor" }, Ke = ["role", "tabindex", "onMouseenter", "onFocus", "onClick", "onKeydown"], Ze = { class: "nc-tabela-rotulo inline-flex align-items-center gap-2" }, _e = { class: "nc-tabela-valor" }, to = { class: "card-polar__chart-wrap flex align-items-center justify-content-center" }, eo = { class: "card-polar__chart" }, oo = {
1266
1297
  key: 0,
1267
1298
  class: "card-polar__centro-bottom"
1268
- }, _e = {
1299
+ }, ao = {
1269
1300
  key: 0,
1270
1301
  class: "card-polar__footer mt-3"
1271
- }, to = {
1302
+ }, no = {
1272
1303
  __name: "CardPolar",
1273
1304
  props: {
1274
1305
  legenda: { type: String, default: null },
@@ -1314,64 +1345,79 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1314
1345
  height: { type: [String, Number], default: 260 },
1315
1346
  mostrarLinhasGrade: { type: Boolean, default: !0 },
1316
1347
  exportar: { type: Boolean, default: !1 },
1317
- nomeArquivoExport: { type: String, default: "card-polar.png" }
1348
+ nomeArquivoExport: { type: String, default: "card-polar.png" },
1349
+ itensClicaveis: { type: Boolean, default: !1 }
1318
1350
  },
1319
- emits: ["botaoAcao", "exportado"],
1320
- setup(t, { emit: y }) {
1321
- const e = t, d = y, { palette: o, cardStyle: B } = it(e), { formatar: $ } = pt(e), R = ot(null), I = dt;
1322
- async function w() {
1323
- await ct(R.value, {
1351
+ emits: ["botaoAcao", "exportado", "itemClicado"],
1352
+ setup(t, { emit: m }) {
1353
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null), D = dt;
1354
+ async function R() {
1355
+ await ct(A.value, {
1324
1356
  nomeArquivo: e.nomeArquivoExport,
1325
1357
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1326
- }), d("exportado");
1358
+ }), p("exportado");
1327
1359
  }
1328
- const F = M(() => `card-polar--${e.direcao}`), z = M(() => {
1329
- const p = bt(e.corDetalhes, e.data.length);
1330
- return e.data.map((E, j) => E.cor ?? p[j]);
1331
- }), Q = M(() => ({
1332
- labels: e.data.map((p) => p.rotulo),
1360
+ const w = M(() => `card-polar--${e.direcao}`), T = M(() => {
1361
+ const d = xt(e.corDetalhes, e.data.length);
1362
+ return e.data.map((l, n) => l.cor ?? d[n]);
1363
+ }), J = M(() => ({
1364
+ labels: e.data.map((d) => d.rotulo),
1333
1365
  datasets: [
1334
1366
  {
1335
- data: e.data.map((p) => p.quantidade),
1336
- backgroundColor: z.value,
1337
- borderColor: z.value,
1367
+ data: e.data.map((d) => d.quantidade),
1368
+ backgroundColor: T.value,
1369
+ borderColor: T.value,
1338
1370
  borderWidth: 0,
1339
1371
  hoverOffset: 6
1340
1372
  }
1341
1373
  ]
1342
1374
  }));
1343
- function X(p) {
1344
- const { chart: E, tooltip: j } = p, G = rt(E);
1345
- if (!G) return;
1346
- const u = gt(G);
1347
- if (j.opacity === 0) {
1348
- u.style.opacity = "0";
1375
+ function O(d) {
1376
+ const { chart: l, tooltip: n } = d, a = lt(l);
1377
+ if (!a) return;
1378
+ const r = gt(a);
1379
+ if (n.opacity === 0) {
1380
+ r.style.opacity = "0";
1349
1381
  return;
1350
1382
  }
1351
- const c = j.title || [], a = j.dataPoints && j.dataPoints[0], b = a ? z.value[a.dataIndex] : "#3B82F6", v = a ? $(a.parsed.r ?? a.parsed) : "", i = u.querySelector(".nc-tt__content");
1352
- i.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${c.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${b};box-shadow:0 0 0 2px ${D(b, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${v}</span></div>`;
1353
- const { offsetLeft: f, offsetTop: n } = E.canvas;
1354
- u.style.opacity = "1", u.style.visibility = "hidden", u.style.left = "0px", u.style.top = "0px";
1355
- const m = u.offsetWidth, h = u.offsetHeight, H = 4, T = f + j.caretX, q = n + j.caretY, C = nt(T, m, G.clientWidth, H), V = q < h + 16 + H;
1356
- u.style.transform = V ? "translate(-50%, 16px)" : "translate(-50%, calc(-100% - 16px))";
1357
- const S = u.querySelector(".nc-tt__caret");
1358
- S && (V ? (S.style.bottom = "", S.style.top = "-5px", S.style.borderRight = "", S.style.borderBottom = "", S.style.borderLeft = "1px solid rgba(15,23,42,.06)", S.style.borderTop = "1px solid rgba(15,23,42,.06)") : (S.style.top = "", S.style.bottom = "-5px", S.style.borderLeft = "", S.style.borderTop = "", S.style.borderRight = "1px solid rgba(15,23,42,.06)", S.style.borderBottom = "1px solid rgba(15,23,42,.06)")), u.style.left = C + "px", u.style.top = q + "px", u.style.visibility = "visible";
1383
+ const v = n.title || [], i = n.dataPoints && n.dataPoints[0], g = i ? T.value[i.dataIndex] : "#3B82F6", c = i ? $(i.parsed.r ?? i.parsed) : "", b = r.querySelector(".nc-tt__content");
1384
+ b.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${v.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${g};box-shadow:0 0 0 2px ${j(g, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${c}</span></div>`;
1385
+ const { offsetLeft: h, offsetTop: V } = l.canvas;
1386
+ r.style.opacity = "1", r.style.visibility = "hidden", r.style.left = "0px", r.style.top = "0px";
1387
+ const q = r.offsetWidth, E = r.offsetHeight, C = 4, I = h + n.caretX, N = V + n.caretY, z = rt(I, q, a.clientWidth, C), H = N < E + 16 + C;
1388
+ r.style.transform = H ? "translate(-50%, 16px)" : "translate(-50%, calc(-100% - 16px))";
1389
+ const F = r.querySelector(".nc-tt__caret");
1390
+ F && (H ? (F.style.bottom = "", F.style.top = "-5px", F.style.borderRight = "", F.style.borderBottom = "", F.style.borderLeft = "1px solid rgba(15,23,42,.06)", F.style.borderTop = "1px solid rgba(15,23,42,.06)") : (F.style.top = "", F.style.bottom = "-5px", F.style.borderLeft = "", F.style.borderTop = "", F.style.borderRight = "1px solid rgba(15,23,42,.06)", F.style.borderBottom = "1px solid rgba(15,23,42,.06)")), r.style.left = z + "px", r.style.top = N + "px", r.style.visibility = "visible";
1359
1391
  }
1360
- const _ = M(() => ({
1392
+ function _(d) {
1393
+ const l = e.data[d];
1394
+ l && p("itemClicado", { item: l, index: d, cor: T.value[d] });
1395
+ }
1396
+ function Q(d, l) {
1397
+ e.itensClicaveis && p("itemClicado", { item: d, index: l, cor: T.value[l] });
1398
+ }
1399
+ const Z = et(null), K = M(() => ({
1361
1400
  responsive: !0,
1362
1401
  maintainAspectRatio: !1,
1363
1402
  layout: { padding: 4 },
1403
+ onHover: (d, l, n) => {
1404
+ const a = l.length ? l[0].index : null;
1405
+ Z.value = a, n.canvas.style.cursor = e.itensClicaveis && l.length ? "pointer" : "default";
1406
+ },
1407
+ onClick: (d, l) => {
1408
+ !e.itensClicaveis || !l.length || _(l[0].index);
1409
+ },
1364
1410
  scales: {
1365
1411
  r: {
1366
1412
  beginAtZero: !0,
1367
1413
  ticks: { display: !1, backdropColor: "transparent" },
1368
1414
  grid: {
1369
1415
  display: e.mostrarLinhasGrade,
1370
- color: D(o.value.muted, 0.18)
1416
+ color: j(o.value.muted, 0.18)
1371
1417
  },
1372
1418
  angleLines: {
1373
1419
  display: e.mostrarLinhasGrade,
1374
- color: D(o.value.muted, 0.18)
1420
+ color: j(o.value.muted, 0.18)
1375
1421
  },
1376
1422
  pointLabels: { display: !1 }
1377
1423
  }
@@ -1380,153 +1426,169 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1380
1426
  legend: { display: !1 },
1381
1427
  tooltip: {
1382
1428
  enabled: !1,
1383
- external: X,
1429
+ external: O,
1384
1430
  callbacks: {
1385
- title: (p) => {
1386
- var E;
1387
- return ((E = p[0]) == null ? void 0 : E.label) ?? "";
1431
+ title: (d) => {
1432
+ var l;
1433
+ return ((l = d[0]) == null ? void 0 : l.label) ?? "";
1388
1434
  },
1389
- label: (p) => {
1390
- var E;
1391
- return $(((E = p.parsed) == null ? void 0 : E.r) ?? p.parsed);
1435
+ label: (d) => {
1436
+ var l;
1437
+ return $(((l = d.parsed) == null ? void 0 : l.r) ?? d.parsed);
1392
1438
  }
1393
1439
  }
1394
1440
  }
1395
1441
  }
1396
1442
  }));
1397
- function K() {
1398
- d("botaoAcao");
1443
+ function tt() {
1444
+ p("botaoAcao");
1399
1445
  }
1400
- return (p, E) => (l(), s("div", {
1446
+ return (d, l) => (u(), f("div", {
1401
1447
  ref_key: "cardRef",
1402
- ref: R,
1403
- class: lt(["card-polar p-4 flex flex-column", F.value]),
1404
- style: x(r(B))
1448
+ ref: A,
1449
+ class: ot(["card-polar p-4 flex flex-column", w.value]),
1450
+ style: x(s(k))
1405
1451
  }, [
1406
- k("div", De, [
1407
- p.$slots.legenda || t.legenda || p.$slots.sublegenda || t.sublegenda ? (l(), s("div", Ie, [
1408
- p.$slots.legenda || t.legenda ? (l(), s("div", {
1452
+ S("div", Oe, [
1453
+ d.$slots.legenda || t.legenda || d.$slots.sublegenda || t.sublegenda ? (u(), f("div", Xe, [
1454
+ d.$slots.legenda || t.legenda ? (u(), f("div", {
1409
1455
  key: 0,
1410
1456
  class: "text-xs font-medium",
1411
- style: x({ color: r(o).text, opacity: 0.95 })
1457
+ style: x({ color: s(o).text, opacity: 0.95 })
1412
1458
  }, [
1413
- L(p.$slots, "legenda", {}, () => [
1414
- Y(A(t.legenda), 1)
1459
+ L(d.$slots, "legenda", {}, () => [
1460
+ X(B(t.legenda), 1)
1415
1461
  ], !0)
1416
- ], 4)) : g("", !0),
1417
- p.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1462
+ ], 4)) : y("", !0),
1463
+ d.$slots.sublegenda || t.sublegenda ? (u(), f("div", {
1418
1464
  key: 1,
1419
1465
  class: "text-xs",
1420
- style: x({ color: r(o).muted })
1466
+ style: x({ color: s(o).muted })
1421
1467
  }, [
1422
- L(p.$slots, "sublegenda", {}, () => [
1423
- Y(A(t.sublegenda), 1)
1468
+ L(d.$slots, "sublegenda", {}, () => [
1469
+ X(B(t.sublegenda), 1)
1424
1470
  ], !0)
1425
- ], 4)) : g("", !0)
1426
- ])) : g("", !0),
1427
- p.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", We, [
1428
- L(p.$slots, "actions", {}, () => [
1429
- t.botaoVisivel ? (l(), s("button", {
1471
+ ], 4)) : y("", !0)
1472
+ ])) : y("", !0),
1473
+ d.$slots.actions || t.botaoVisivel || t.exportar ? (u(), f("div", Ye, [
1474
+ L(d.$slots, "actions", {}, () => [
1475
+ t.botaoVisivel ? (u(), f("button", {
1430
1476
  key: 0,
1431
1477
  class: "nc-btn inline-flex align-items-center",
1432
- style: x({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
1433
- onClick: K
1478
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
1479
+ onClick: tt
1434
1480
  }, [
1435
- k("span", null, A(t.textoBotao), 1)
1436
- ], 4)) : g("", !0)
1481
+ S("span", null, B(t.textoBotao), 1)
1482
+ ], 4)) : y("", !0)
1437
1483
  ], !0),
1438
- t.exportar ? (l(), s("button", {
1484
+ t.exportar ? (u(), f("button", {
1439
1485
  key: 0,
1440
1486
  type: "button",
1441
1487
  class: "nc-exportar inline-flex align-items-center justify-content-center",
1442
- style: x({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
1488
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).text, 0.18) }),
1443
1489
  title: "Exportar como imagem",
1444
1490
  "aria-label": "Exportar como imagem",
1445
- onClick: w,
1446
- innerHTML: r(I)
1447
- }, null, 12, Oe)) : g("", !0)
1448
- ])) : g("", !0)
1491
+ onClick: R,
1492
+ innerHTML: s(D)
1493
+ }, null, 12, Je)) : y("", !0)
1494
+ ])) : y("", !0)
1449
1495
  ]),
1450
- k("div", Xe, [
1451
- k("div", Ye, [
1452
- t.mostrarCabecalho ? (l(), s("div", {
1496
+ S("div", Qe, [
1497
+ S("div", Ue, [
1498
+ t.mostrarCabecalho ? (u(), f("div", {
1453
1499
  key: 0,
1454
1500
  class: "nc-tabela-cab flex align-items-center justify-content-between",
1455
- style: x({ color: r(o).muted, borderColor: r(D)(r(o).muted, 0.25) })
1501
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).muted, 0.25) })
1456
1502
  }, [
1457
- k("span", null, A(t.rotuloCategoria), 1),
1458
- k("span", Je, A(t.rotuloQuantidade), 1)
1459
- ], 4)) : g("", !0),
1460
- (l(!0), s(yt, null, mt(t.data, (j, G) => (l(), s("div", {
1461
- key: G,
1462
- class: "nc-tabela-linha flex align-items-center justify-content-between",
1463
- style: x({ color: r(o).text })
1503
+ S("span", null, B(t.rotuloCategoria), 1),
1504
+ S("span", Ge, B(t.rotuloQuantidade), 1)
1505
+ ], 4)) : y("", !0),
1506
+ (u(!0), f(bt, null, ht(t.data, (n, a) => (u(), f("div", {
1507
+ key: a,
1508
+ class: ot(["nc-tabela-linha flex align-items-center justify-content-between", { "nc-tabela-linha--clicavel": t.itensClicaveis, "nc-tabela-linha--ativa": Z.value === a }]),
1509
+ style: x({
1510
+ color: s(o).text,
1511
+ cursor: t.itensClicaveis ? "pointer" : "default",
1512
+ "--nc-linha-bg": s(j)(T.value[a], 0.05),
1513
+ "--nc-linha-bg-forte": s(j)(T.value[a], 0.08)
1514
+ }),
1515
+ role: t.itensClicaveis ? "button" : null,
1516
+ tabindex: t.itensClicaveis ? 0 : null,
1517
+ onMouseenter: (r) => Z.value = a,
1518
+ onMouseleave: l[0] || (l[0] = (r) => Z.value = null),
1519
+ onFocus: (r) => Z.value = a,
1520
+ onBlur: l[1] || (l[1] = (r) => Z.value = null),
1521
+ onClick: (r) => Q(n, a),
1522
+ onKeydown: [
1523
+ yt(mt((r) => Q(n, a), ["prevent"]), ["enter"]),
1524
+ yt(mt((r) => Q(n, a), ["prevent"]), ["space"])
1525
+ ]
1464
1526
  }, [
1465
- k("span", Qe, [
1466
- k("span", {
1527
+ S("span", Ze, [
1528
+ S("span", {
1467
1529
  class: "nc-bolinha",
1468
- style: x({ background: z.value[G] })
1530
+ style: x({ background: T.value[a] })
1469
1531
  }, null, 4),
1470
- k("span", null, A(j.rotulo), 1)
1532
+ S("span", null, B(n.rotulo), 1)
1471
1533
  ]),
1472
- k("span", Ue, A(r($)(j.quantidade)), 1)
1473
- ], 4))), 128))
1534
+ S("span", _e, B(s($)(n.quantidade)), 1)
1535
+ ], 46, Ke))), 128))
1474
1536
  ]),
1475
- k("div", Ge, [
1476
- k("div", Ze, [
1537
+ S("div", to, [
1538
+ S("div", eo, [
1477
1539
  ft(st, {
1478
1540
  type: "polarArea",
1479
- data: Q.value,
1480
- options: _.value,
1541
+ data: J.value,
1542
+ options: K.value,
1481
1543
  height: t.height
1482
1544
  }, null, 8, ["data", "options", "height"]),
1483
- p.$slots.titulo || t.titulo || p.$slots.descricao || t.descricao ? (l(), s("div", Ke, [
1484
- p.$slots.titulo || t.titulo ? (l(), s("div", {
1545
+ d.$slots.titulo || t.titulo || d.$slots.descricao || t.descricao ? (u(), f("div", oo, [
1546
+ d.$slots.titulo || t.titulo ? (u(), f("div", {
1485
1547
  key: 0,
1486
1548
  class: "card-polar__centro-titulo m-0 text-3xl font-semibold",
1487
- style: x({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1549
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1488
1550
  }, [
1489
- L(p.$slots, "titulo", {}, () => [
1490
- Y(A(t.titulo), 1)
1551
+ L(d.$slots, "titulo", {}, () => [
1552
+ X(B(t.titulo), 1)
1491
1553
  ], !0)
1492
- ], 4)) : g("", !0),
1493
- p.$slots.descricao || t.descricao ? (l(), s("div", {
1554
+ ], 4)) : y("", !0),
1555
+ d.$slots.descricao || t.descricao ? (u(), f("div", {
1494
1556
  key: 1,
1495
1557
  class: "card-polar__centro-desc",
1496
- style: x({ color: r(o).muted })
1558
+ style: x({ color: s(o).muted })
1497
1559
  }, [
1498
- L(p.$slots, "descricao", {}, () => [
1499
- Y(A(t.descricao), 1)
1560
+ L(d.$slots, "descricao", {}, () => [
1561
+ X(B(t.descricao), 1)
1500
1562
  ], !0)
1501
- ], 4)) : g("", !0)
1502
- ])) : g("", !0)
1563
+ ], 4)) : y("", !0)
1564
+ ])) : y("", !0)
1503
1565
  ])
1504
1566
  ])
1505
1567
  ]),
1506
- p.$slots.footer ? (l(), s("div", _e, [
1507
- L(p.$slots, "footer", {}, void 0, !0)
1508
- ])) : g("", !0)
1568
+ d.$slots.footer ? (u(), f("div", ao, [
1569
+ L(d.$slots, "footer", {}, void 0, !0)
1570
+ ])) : y("", !0)
1509
1571
  ], 6));
1510
1572
  }
1511
- }, eo = /* @__PURE__ */ at(to, [["__scopeId", "data-v-352f2f67"]]), oo = { class: "card-progresso__topo flex align-items-start justify-content-between gap-3" }, ao = {
1573
+ }, lo = /* @__PURE__ */ nt(no, [["__scopeId", "data-v-c384afa9"]]), ro = { class: "card-progresso__topo flex align-items-start justify-content-between gap-3" }, so = {
1512
1574
  key: 0,
1513
1575
  class: "nc-legendas-flex flex flex-column"
1514
- }, ro = {
1576
+ }, io = {
1515
1577
  key: 1,
1516
1578
  class: "nc-actions inline-flex align-items-center gap-2"
1517
- }, no = ["innerHTML"], lo = {
1579
+ }, co = ["innerHTML"], uo = {
1518
1580
  key: 0,
1519
1581
  class: "card-progresso__titulos mt-3 mb-2 flex flex-column"
1520
- }, so = { class: "card-progresso__corpo flex align-items-center flex-wrap" }, io = {
1582
+ }, fo = { class: "card-progresso__corpo flex align-items-center flex-wrap" }, po = {
1521
1583
  key: 0,
1522
1584
  class: "card-progresso__chart-wrap flex align-items-center justify-content-center"
1523
- }, co = { class: "card-progresso__chart" }, uo = { class: "nc-centro flex flex-column align-items-center justify-content-center" }, fo = { class: "card-progresso__lista flex flex-column" }, po = { class: "card-progresso__item-cab flex align-items-center justify-content-between" }, go = {
1585
+ }, go = { class: "card-progresso__chart" }, yo = { class: "nc-centro flex flex-column align-items-center justify-content-center" }, mo = { class: "card-progresso__lista flex flex-column" }, bo = { class: "card-progresso__item-cab flex align-items-center justify-content-between" }, ho = {
1524
1586
  key: 0,
1525
1587
  class: "card-progresso__item-valor inline-flex align-items-center gap-2"
1526
- }, yo = { key: 0 }, mo = {
1588
+ }, xo = { key: 0 }, vo = {
1527
1589
  key: 1,
1528
1590
  class: "card-progresso__footer mt-3"
1529
- }, bo = {
1591
+ }, $o = {
1530
1592
  __name: "CardProgresso",
1531
1593
  props: {
1532
1594
  legenda: { type: String, default: null },
@@ -1580,40 +1642,40 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1580
1642
  nomeArquivoExport: { type: String, default: "card-progresso.png" }
1581
1643
  },
1582
1644
  emits: ["botaoAcao", "exportado"],
1583
- setup(t, { emit: y }) {
1584
- const e = t, d = y, { palette: o, cardStyle: B } = it(e), { formatar: $ } = pt(e), R = ot(null), I = dt;
1585
- async function w() {
1586
- await ct(R.value, {
1645
+ setup(t, { emit: m }) {
1646
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null), D = dt;
1647
+ async function R() {
1648
+ await ct(A.value, {
1587
1649
  nomeArquivo: e.nomeArquivoExport,
1588
1650
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1589
- }), d("exportado");
1651
+ }), p("exportado");
1590
1652
  }
1591
- const F = M(() => `card-progresso--${e.direcao}`), z = M(() => {
1592
- const c = bt(e.corDetalhes, e.data.length);
1593
- return e.data.map((a, b) => {
1594
- const v = Number(a.meta ?? e.metaPadrao) || 0, i = Number(a.quantidade) || 0, f = a.cor ?? c[b], n = a.modo === "reducao";
1595
- let m;
1596
- if (n) {
1597
- const h = Number(a.valor_referencia) || 0, H = h - v;
1598
- m = H > 0 ? Math.max(0, Math.min(100, (h - i) / H * 100)) : 0;
1653
+ const w = M(() => `card-progresso--${e.direcao}`), T = M(() => {
1654
+ const n = xt(e.corDetalhes, e.data.length);
1655
+ return e.data.map((a, r) => {
1656
+ const v = Number(a.meta ?? e.metaPadrao) || 0, i = Number(a.quantidade) || 0, g = a.cor ?? n[r], c = a.modo === "reducao";
1657
+ let b;
1658
+ if (c) {
1659
+ const h = Number(a.valor_referencia) || 0, V = h - v;
1660
+ b = V > 0 ? Math.max(0, Math.min(100, (h - i) / V * 100)) : 0;
1599
1661
  } else
1600
- m = v > 0 ? Math.max(0, Math.min(100, i / v * 100)) : 0;
1601
- return { rotulo: a.rotulo, quantidade: i, meta: v, valorReferencia: a.valor_referencia ?? null, cor: f, percentual: m, reducao: n };
1662
+ b = v > 0 ? Math.max(0, Math.min(100, i / v * 100)) : 0;
1663
+ return { rotulo: a.rotulo, quantidade: i, meta: v, valorReferencia: a.valor_referencia ?? null, cor: g, percentual: b, reducao: c };
1602
1664
  });
1603
- }), Q = M(
1665
+ }), J = M(
1604
1666
  () => typeof e.alturaBarra == "number" ? `${e.alturaBarra}px` : e.alturaBarra
1605
- ), X = M(
1667
+ ), O = M(
1606
1668
  () => typeof e.raioBarra == "number" ? `${e.raioBarra}px` : e.raioBarra
1607
1669
  );
1608
- M(() => z.value.reduce((c, a) => c + a.quantidade, 0)), M(() => z.value.reduce((c, a) => c + a.meta, 0));
1609
- const _ = M(() => z.value.length ? z.value.reduce((c, a) => c + a.percentual, 0) / z.value.length : 0), K = M(() => z.value.every((c) => c.reducao)), p = M(() => {
1610
- const c = Math.min(_.value, 100), a = Math.max(0, 100 - c), b = K.value ? e.corExcesso : e.corDetalhes;
1670
+ M(() => T.value.reduce((n, a) => n + a.quantidade, 0)), M(() => T.value.reduce((n, a) => n + a.meta, 0));
1671
+ const _ = M(() => T.value.length ? T.value.reduce((n, a) => n + a.percentual, 0) / T.value.length : 0), Q = M(() => T.value.every((n) => n.reducao)), Z = M(() => {
1672
+ const n = Math.min(_.value, 100), a = Math.max(0, 100 - n), r = Q.value ? e.corExcesso : e.corDetalhes;
1611
1673
  return {
1612
1674
  labels: ["Progresso", "Restante"],
1613
1675
  datasets: [
1614
1676
  {
1615
- data: [c, a],
1616
- backgroundColor: [b, D(o.value.muted, 0.15)],
1677
+ data: [n, a],
1678
+ backgroundColor: [r, j(o.value.muted, 0.15)],
1617
1679
  borderWidth: 0,
1618
1680
  borderColor: "transparent",
1619
1681
  hoverOffset: 0,
@@ -1621,7 +1683,7 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1621
1683
  }
1622
1684
  ]
1623
1685
  };
1624
- }), E = M(() => ({
1686
+ }), K = M(() => ({
1625
1687
  responsive: !0,
1626
1688
  maintainAspectRatio: !1,
1627
1689
  cutout: e.cutout,
@@ -1633,17 +1695,17 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1633
1695
  tooltip: { enabled: !1 }
1634
1696
  }
1635
1697
  }));
1636
- function j(c) {
1637
- const a = R.value;
1698
+ function tt(n) {
1699
+ const a = A.value;
1638
1700
  if (!a) return;
1639
1701
  getComputedStyle(a).position === "static" && (a.style.position = "relative");
1640
- const b = gt(a);
1641
- b.style.whiteSpace = "normal";
1642
- const v = b.querySelector(".nc-tt__content");
1643
- v.innerHTML = '<span style="font-size:11px;color:#0F172A;display:block;max-width:140px;line-height:1.5;"><strong>Modo Redução</strong>: o progresso aumenta conforme o valor diminui</span>', b.style.opacity = "1", b.style.visibility = "hidden", b.style.left = "0px", b.style.top = "0px", b.offsetWidth;
1644
- const i = c.currentTarget.getBoundingClientRect(), f = a.getBoundingClientRect(), n = i.left - f.left + i.width / 2, m = i.top - f.top;
1645
- b.style.transform = "translate(-50%, calc(-100% - 8px))";
1646
- const h = b.querySelector(".nc-tt__caret");
1702
+ const r = gt(a);
1703
+ r.style.whiteSpace = "normal";
1704
+ const v = r.querySelector(".nc-tt__content");
1705
+ v.innerHTML = '<span style="font-size:11px;color:#0F172A;display:block;max-width:140px;line-height:1.5;"><strong>Modo Redução</strong>: o progresso aumenta conforme o valor diminui</span>', r.style.opacity = "1", r.style.visibility = "hidden", r.style.left = "0px", r.style.top = "0px", r.offsetWidth;
1706
+ const i = n.currentTarget.getBoundingClientRect(), g = a.getBoundingClientRect(), c = i.left - g.left + i.width / 2, b = i.top - g.top;
1707
+ r.style.transform = "translate(-50%, calc(-100% - 8px))";
1708
+ const h = r.querySelector(".nc-tt__caret");
1647
1709
  h && Object.assign(h.style, {
1648
1710
  top: "",
1649
1711
  bottom: "-5px",
@@ -1651,176 +1713,176 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1651
1713
  borderTop: "",
1652
1714
  borderRight: "1px solid rgba(15,23,42,.06)",
1653
1715
  borderBottom: "1px solid rgba(15,23,42,.06)"
1654
- }), b.style.left = n + "px", b.style.top = m + "px", b.style.visibility = "visible";
1716
+ }), r.style.left = c + "px", r.style.top = b + "px", r.style.visibility = "visible";
1655
1717
  }
1656
- function G() {
1718
+ function d() {
1657
1719
  var a;
1658
- const c = (a = R.value) == null ? void 0 : a.querySelector(".nc-tt");
1659
- c && (c.style.opacity = "0");
1720
+ const n = (a = A.value) == null ? void 0 : a.querySelector(".nc-tt");
1721
+ n && (n.style.opacity = "0");
1660
1722
  }
1661
- function u() {
1662
- d("botaoAcao");
1723
+ function l() {
1724
+ p("botaoAcao");
1663
1725
  }
1664
- return (c, a) => (l(), s("div", {
1726
+ return (n, a) => (u(), f("div", {
1665
1727
  ref_key: "cardRef",
1666
- ref: R,
1667
- class: lt(["card-progresso p-4 flex flex-column", F.value]),
1668
- style: x(r(B))
1728
+ ref: A,
1729
+ class: ot(["card-progresso p-4 flex flex-column", w.value]),
1730
+ style: x(s(k))
1669
1731
  }, [
1670
- k("div", oo, [
1671
- c.$slots.legenda || t.legenda || c.$slots.sublegenda || t.sublegenda ? (l(), s("div", ao, [
1672
- c.$slots.legenda || t.legenda ? (l(), s("div", {
1732
+ S("div", ro, [
1733
+ n.$slots.legenda || t.legenda || n.$slots.sublegenda || t.sublegenda ? (u(), f("div", so, [
1734
+ n.$slots.legenda || t.legenda ? (u(), f("div", {
1673
1735
  key: 0,
1674
1736
  class: "text-xs font-medium",
1675
- style: x({ color: r(o).text, opacity: 0.95 })
1737
+ style: x({ color: s(o).text, opacity: 0.95 })
1676
1738
  }, [
1677
- L(c.$slots, "legenda", {}, () => [
1678
- Y(A(t.legenda), 1)
1739
+ L(n.$slots, "legenda", {}, () => [
1740
+ X(B(t.legenda), 1)
1679
1741
  ], !0)
1680
- ], 4)) : g("", !0),
1681
- c.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1742
+ ], 4)) : y("", !0),
1743
+ n.$slots.sublegenda || t.sublegenda ? (u(), f("div", {
1682
1744
  key: 1,
1683
1745
  class: "text-xs",
1684
- style: x({ color: r(o).muted })
1746
+ style: x({ color: s(o).muted })
1685
1747
  }, [
1686
- L(c.$slots, "sublegenda", {}, () => [
1687
- Y(A(t.sublegenda), 1)
1748
+ L(n.$slots, "sublegenda", {}, () => [
1749
+ X(B(t.sublegenda), 1)
1688
1750
  ], !0)
1689
- ], 4)) : g("", !0)
1690
- ])) : g("", !0),
1691
- c.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ro, [
1692
- L(c.$slots, "actions", {}, () => [
1693
- t.botaoVisivel ? (l(), s("button", {
1751
+ ], 4)) : y("", !0)
1752
+ ])) : y("", !0),
1753
+ n.$slots.actions || t.botaoVisivel || t.exportar ? (u(), f("div", io, [
1754
+ L(n.$slots, "actions", {}, () => [
1755
+ t.botaoVisivel ? (u(), f("button", {
1694
1756
  key: 0,
1695
1757
  class: "nc-btn inline-flex align-items-center",
1696
- style: x({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
1697
- onClick: u
1758
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
1759
+ onClick: l
1698
1760
  }, [
1699
- k("span", null, A(t.textoBotao), 1)
1700
- ], 4)) : g("", !0)
1761
+ S("span", null, B(t.textoBotao), 1)
1762
+ ], 4)) : y("", !0)
1701
1763
  ], !0),
1702
- t.exportar ? (l(), s("button", {
1764
+ t.exportar ? (u(), f("button", {
1703
1765
  key: 0,
1704
1766
  type: "button",
1705
1767
  class: "nc-exportar inline-flex align-items-center justify-content-center",
1706
- style: x({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
1768
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).text, 0.18) }),
1707
1769
  title: "Exportar como imagem",
1708
1770
  "aria-label": "Exportar como imagem",
1709
- onClick: w,
1710
- innerHTML: r(I)
1711
- }, null, 12, no)) : g("", !0)
1712
- ])) : g("", !0)
1771
+ onClick: R,
1772
+ innerHTML: s(D)
1773
+ }, null, 12, co)) : y("", !0)
1774
+ ])) : y("", !0)
1713
1775
  ]),
1714
- c.$slots.titulo || t.titulo || c.$slots.descricao || t.descricao ? (l(), s("div", lo, [
1715
- c.$slots.titulo || t.titulo ? (l(), s("div", {
1776
+ n.$slots.titulo || t.titulo || n.$slots.descricao || t.descricao ? (u(), f("div", uo, [
1777
+ n.$slots.titulo || t.titulo ? (u(), f("div", {
1716
1778
  key: 0,
1717
1779
  class: "m-0 text-3xl font-semibold",
1718
- style: x({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1780
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1719
1781
  }, [
1720
- L(c.$slots, "titulo", {}, () => [
1721
- Y(A(t.titulo), 1)
1782
+ L(n.$slots, "titulo", {}, () => [
1783
+ X(B(t.titulo), 1)
1722
1784
  ], !0)
1723
- ], 4)) : g("", !0),
1724
- c.$slots.descricao || t.descricao ? (l(), s("div", {
1785
+ ], 4)) : y("", !0),
1786
+ n.$slots.descricao || t.descricao ? (u(), f("div", {
1725
1787
  key: 1,
1726
1788
  class: "text-sm mt-1",
1727
- style: x({ color: r(o).muted })
1789
+ style: x({ color: s(o).muted })
1728
1790
  }, [
1729
- L(c.$slots, "descricao", {}, () => [
1730
- Y(A(t.descricao), 1)
1791
+ L(n.$slots, "descricao", {}, () => [
1792
+ X(B(t.descricao), 1)
1731
1793
  ], !0)
1732
- ], 4)) : g("", !0)
1733
- ])) : g("", !0),
1734
- k("div", so, [
1735
- t.formato === "circular" ? (l(), s("div", io, [
1736
- k("div", co, [
1794
+ ], 4)) : y("", !0)
1795
+ ])) : y("", !0),
1796
+ S("div", fo, [
1797
+ t.formato === "circular" ? (u(), f("div", po, [
1798
+ S("div", go, [
1737
1799
  ft(st, {
1738
1800
  type: "doughnut",
1739
- data: p.value,
1740
- options: E.value,
1801
+ data: Z.value,
1802
+ options: K.value,
1741
1803
  height: t.height
1742
1804
  }, null, 8, ["data", "options", "height"]),
1743
- k("div", uo, [
1744
- k("div", {
1805
+ S("div", yo, [
1806
+ S("div", {
1745
1807
  class: "nc-centro-titulo",
1746
- style: x({ color: K.value ? e.corExcesso : r(o).text })
1747
- }, A(Math.round(_.value)) + "% ", 5)
1808
+ style: x({ color: Q.value ? e.corExcesso : s(o).text })
1809
+ }, B(Math.round(_.value)) + "% ", 5)
1748
1810
  ])
1749
1811
  ])
1750
- ])) : g("", !0),
1751
- k("div", fo, [
1752
- (l(!0), s(yt, null, mt(z.value, (b, v) => (l(), s("div", {
1812
+ ])) : y("", !0),
1813
+ S("div", mo, [
1814
+ (u(!0), f(bt, null, ht(T.value, (r, v) => (u(), f("div", {
1753
1815
  key: v,
1754
1816
  class: "card-progresso__item flex flex-column"
1755
1817
  }, [
1756
- k("div", po, [
1757
- k("span", {
1818
+ S("div", bo, [
1819
+ S("span", {
1758
1820
  class: "card-progresso__item-rotulo inline-flex align-items-center gap-2",
1759
- style: x({ color: r(o).text })
1821
+ style: x({ color: s(o).text })
1760
1822
  }, [
1761
- k("span", {
1823
+ S("span", {
1762
1824
  class: "nc-bolinha",
1763
- style: x({ background: b.cor })
1825
+ style: x({ background: r.cor })
1764
1826
  }, null, 4),
1765
- k("span", null, A(b.rotulo), 1),
1766
- b.reducao ? (l(), s("span", {
1827
+ S("span", null, B(r.rotulo), 1),
1828
+ r.reducao ? (u(), f("span", {
1767
1829
  key: 0,
1768
1830
  class: "card-progresso__item-modo",
1769
- style: x({ color: r(o).muted }),
1770
- onMouseenter: j,
1771
- onMouseleave: G
1772
- }, "↓", 36)) : g("", !0)
1831
+ style: x({ color: s(o).muted }),
1832
+ onMouseenter: tt,
1833
+ onMouseleave: d
1834
+ }, "↓", 36)) : y("", !0)
1773
1835
  ], 4),
1774
- t.mostrarValor || t.mostrarPercentual ? (l(), s("span", go, [
1775
- t.mostrarValor ? (l(), s("span", {
1836
+ t.mostrarValor || t.mostrarPercentual ? (u(), f("span", ho, [
1837
+ t.mostrarValor ? (u(), f("span", {
1776
1838
  key: 0,
1777
1839
  class: "card-progresso__item-nums",
1778
- style: x({ color: r(o).muted })
1840
+ style: x({ color: s(o).muted })
1779
1841
  }, [
1780
- Y(A(r($)(b.quantidade)), 1),
1781
- b.meta ? (l(), s("span", yo, " / " + A(r($)(b.meta)), 1)) : g("", !0)
1782
- ], 4)) : g("", !0),
1783
- t.mostrarPercentual ? (l(), s("span", {
1842
+ X(B(s($)(r.quantidade)), 1),
1843
+ r.meta ? (u(), f("span", xo, " / " + B(s($)(r.meta)), 1)) : y("", !0)
1844
+ ], 4)) : y("", !0),
1845
+ t.mostrarPercentual ? (u(), f("span", {
1784
1846
  key: 1,
1785
1847
  class: "card-progresso__item-pct",
1786
- style: x({ background: r(D)(b.cor, 0.12), color: b.cor })
1787
- }, A(Math.round(b.percentual)) + "% ", 5)) : g("", !0)
1788
- ])) : g("", !0)
1848
+ style: x({ background: s(j)(r.cor, 0.12), color: r.cor })
1849
+ }, B(Math.round(r.percentual)) + "% ", 5)) : y("", !0)
1850
+ ])) : y("", !0)
1789
1851
  ]),
1790
- k("div", {
1852
+ S("div", {
1791
1853
  class: "card-progresso__trilha w-full",
1792
1854
  style: x({
1793
- height: Q.value,
1794
- borderRadius: X.value,
1795
- background: b.reducao ? r(D)(e.corExcesso, 0.18) : r(D)(r(o).muted, 0.15)
1855
+ height: J.value,
1856
+ borderRadius: O.value,
1857
+ background: r.reducao ? s(j)(e.corExcesso, 0.18) : s(j)(s(o).muted, 0.15)
1796
1858
  })
1797
1859
  }, [
1798
- k("div", {
1860
+ S("div", {
1799
1861
  class: "card-progresso__preenchimento",
1800
- style: x({ width: b.percentual + "%", background: b.cor, borderRadius: X.value })
1862
+ style: x({ width: r.percentual + "%", background: r.cor, borderRadius: O.value })
1801
1863
  }, null, 4)
1802
1864
  ], 4)
1803
1865
  ]))), 128))
1804
1866
  ])
1805
1867
  ]),
1806
- c.$slots.footer ? (l(), s("div", mo, [
1807
- L(c.$slots, "footer", {}, void 0, !0)
1808
- ])) : g("", !0)
1868
+ n.$slots.footer ? (u(), f("div", vo, [
1869
+ L(n.$slots, "footer", {}, void 0, !0)
1870
+ ])) : y("", !0)
1809
1871
  ], 6));
1810
1872
  }
1811
- }, ho = /* @__PURE__ */ at(bo, [["__scopeId", "data-v-f738fbcc"]]), xo = {
1873
+ }, So = /* @__PURE__ */ nt($o, [["__scopeId", "data-v-f738fbcc"]]), Co = {
1812
1874
  key: 0,
1813
1875
  class: "card-base__topo"
1814
- }, vo = ["innerHTML"], $o = { class: "card-base__legendas flex flex-column" }, So = {
1876
+ }, ko = ["innerHTML"], Bo = { class: "card-base__legendas flex flex-column" }, Ao = {
1815
1877
  key: 1,
1816
1878
  class: "card-base__titulos flex flex-column"
1817
- }, ko = {
1879
+ }, wo = {
1818
1880
  key: 2,
1819
1881
  class: "card-base__acao flex"
1820
- }, Co = {
1882
+ }, Ro = {
1821
1883
  key: 3,
1822
1884
  class: "card-base__footer"
1823
- }, Bo = {
1885
+ }, To = {
1824
1886
  __name: "CardBase",
1825
1887
  props: {
1826
1888
  legenda: { type: String, default: null },
@@ -1844,117 +1906,117 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1844
1906
  nomeArquivoExport: { type: String, default: "card-base.png" }
1845
1907
  },
1846
1908
  emits: ["botaoAcao", "exportado"],
1847
- setup(t, { emit: y }) {
1848
- const e = t, d = y, { palette: o, cardStyle: B } = it(e), $ = ot(null), R = dt;
1849
- function I() {
1850
- d("botaoAcao");
1909
+ setup(t, { emit: m }) {
1910
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), $ = et(null), A = dt;
1911
+ function D() {
1912
+ p("botaoAcao");
1851
1913
  }
1852
- async function w() {
1914
+ async function R() {
1853
1915
  await ct($.value, {
1854
1916
  nomeArquivo: e.nomeArquivoExport,
1855
1917
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1856
- }), d("exportado");
1918
+ }), p("exportado");
1857
1919
  }
1858
- return (F, z) => (l(), s("div", {
1920
+ return (w, T) => (u(), f("div", {
1859
1921
  ref_key: "cardRef",
1860
1922
  ref: $,
1861
- class: lt(["card-base flex flex-column", `card-base--${t.alinhamento}`]),
1862
- style: x(r(B))
1923
+ class: ot(["card-base flex flex-column", `card-base--${t.alinhamento}`]),
1924
+ style: x(s(k))
1863
1925
  }, [
1864
- t.exportar ? (l(), s("div", xo, [
1865
- k("button", {
1926
+ t.exportar ? (u(), f("div", Co, [
1927
+ S("button", {
1866
1928
  type: "button",
1867
1929
  class: "nc-exportar card-base__exportar inline-flex align-items-center justify-content-center",
1868
- style: x({ color: r(o).muted, borderColor: r(D)(r(o).text === "inherit" ? "#0F172A" : r(o).text, 0.18) }),
1930
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).text === "inherit" ? "#0F172A" : s(o).text, 0.18) }),
1869
1931
  title: "Exportar como imagem",
1870
1932
  "aria-label": "Exportar como imagem",
1871
- onClick: w,
1872
- innerHTML: r(R)
1873
- }, null, 12, vo)
1874
- ])) : g("", !0),
1875
- k("div", $o, [
1876
- F.$slots.legenda || t.legenda ? (l(), s("div", {
1933
+ onClick: R,
1934
+ innerHTML: s(A)
1935
+ }, null, 12, ko)
1936
+ ])) : y("", !0),
1937
+ S("div", Bo, [
1938
+ w.$slots.legenda || t.legenda ? (u(), f("div", {
1877
1939
  key: 0,
1878
1940
  class: "card-base__legenda font-medium text-xs",
1879
- style: x({ color: r(o).text })
1941
+ style: x({ color: s(o).text })
1880
1942
  }, [
1881
- L(F.$slots, "legenda", {}, () => [
1882
- Y(A(t.legenda), 1)
1943
+ L(w.$slots, "legenda", {}, () => [
1944
+ X(B(t.legenda), 1)
1883
1945
  ], !0)
1884
- ], 4)) : g("", !0),
1885
- F.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1946
+ ], 4)) : y("", !0),
1947
+ w.$slots.sublegenda || t.sublegenda ? (u(), f("div", {
1886
1948
  key: 1,
1887
1949
  class: "card-base__sublegenda text-xs",
1888
- style: x({ color: r(o).muted })
1950
+ style: x({ color: s(o).muted })
1889
1951
  }, [
1890
- L(F.$slots, "sublegenda", {}, () => [
1891
- Y(A(t.sublegenda), 1)
1952
+ L(w.$slots, "sublegenda", {}, () => [
1953
+ X(B(t.sublegenda), 1)
1892
1954
  ], !0)
1893
- ], 4)) : g("", !0)
1955
+ ], 4)) : y("", !0)
1894
1956
  ]),
1895
- F.$slots.titulo || t.titulo || F.$slots.descricao || t.descricao ? (l(), s("div", So, [
1896
- F.$slots.titulo || t.titulo ? (l(), s("div", {
1957
+ w.$slots.titulo || t.titulo || w.$slots.descricao || t.descricao ? (u(), f("div", Ao, [
1958
+ w.$slots.titulo || t.titulo ? (u(), f("div", {
1897
1959
  key: 0,
1898
1960
  class: "card-base__titulo m-0 text-3xl font-semibold",
1899
- style: x({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1961
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1900
1962
  }, [
1901
- L(F.$slots, "titulo", {}, () => [
1902
- Y(A(t.titulo), 1)
1963
+ L(w.$slots, "titulo", {}, () => [
1964
+ X(B(t.titulo), 1)
1903
1965
  ], !0)
1904
- ], 4)) : g("", !0),
1905
- F.$slots.descricao || t.descricao ? (l(), s("div", {
1966
+ ], 4)) : y("", !0),
1967
+ w.$slots.descricao || t.descricao ? (u(), f("div", {
1906
1968
  key: 1,
1907
1969
  class: "text-sm",
1908
- style: x({ color: r(o).muted })
1970
+ style: x({ color: s(o).muted })
1909
1971
  }, [
1910
- L(F.$slots, "descricao", {}, () => [
1911
- Y(A(t.descricao), 1)
1972
+ L(w.$slots, "descricao", {}, () => [
1973
+ X(B(t.descricao), 1)
1912
1974
  ], !0)
1913
- ], 4)) : g("", !0)
1914
- ])) : g("", !0),
1915
- F.$slots.acao || t.botaoVisivel ? (l(), s("div", ko, [
1916
- L(F.$slots, "acao", {}, () => [
1917
- t.botaoVisivel ? (l(), s("button", {
1975
+ ], 4)) : y("", !0)
1976
+ ])) : y("", !0),
1977
+ w.$slots.acao || t.botaoVisivel ? (u(), f("div", wo, [
1978
+ L(w.$slots, "acao", {}, () => [
1979
+ t.botaoVisivel ? (u(), f("button", {
1918
1980
  key: 0,
1919
1981
  type: "button",
1920
1982
  class: "card-base__link text-xs inline-flex align-items-center",
1921
- style: x({ color: r(o).text }),
1922
- onClick: I
1983
+ style: x({ color: s(o).text }),
1984
+ onClick: D
1923
1985
  }, [
1924
- k("span", null, A(t.textoBotao), 1),
1925
- z[0] || (z[0] = k("span", {
1986
+ S("span", null, B(t.textoBotao), 1),
1987
+ T[0] || (T[0] = S("span", {
1926
1988
  class: "card-base__chevron",
1927
1989
  "aria-hidden": "true"
1928
1990
  }, "›", -1))
1929
- ], 4)) : g("", !0)
1991
+ ], 4)) : y("", !0)
1930
1992
  ], !0)
1931
- ])) : g("", !0),
1932
- F.$slots.footer ? (l(), s("div", Co, [
1933
- L(F.$slots, "footer", {}, void 0, !0)
1934
- ])) : g("", !0)
1993
+ ])) : y("", !0),
1994
+ w.$slots.footer ? (u(), f("div", Ro, [
1995
+ L(w.$slots, "footer", {}, void 0, !0)
1996
+ ])) : y("", !0)
1935
1997
  ], 6));
1936
1998
  }
1937
- }, Ao = /* @__PURE__ */ at(Bo, [["__scopeId", "data-v-d1b84008"]]), To = {
1999
+ }, qo = /* @__PURE__ */ nt(To, [["__scopeId", "data-v-d1b84008"]]), Lo = {
1938
2000
  install(t) {
1939
- t.component("ChartBase", st), t.component("CardBase", Ao), t.component("CardLinhas", ye), t.component("CardPizza", qe), t.component("CardBarra", Pe), t.component("CardPolar", eo), t.component("CardProgresso", ho);
2001
+ t.component("ChartBase", st), t.component("CardBase", qo), t.component("CardLinhas", be), t.component("CardPizza", Le), t.component("CardBarra", We), t.component("CardPolar", lo), t.component("CardProgresso", So);
1940
2002
  }
1941
2003
  };
1942
2004
  export {
1943
- Pe as CardBarra,
1944
- Ao as CardBase,
1945
- ye as CardLinhas,
1946
- qe as CardPizza,
1947
- eo as CardPolar,
1948
- ho as CardProgresso,
2005
+ We as CardBarra,
2006
+ qo as CardBase,
2007
+ be as CardLinhas,
2008
+ Le as CardPizza,
2009
+ lo as CardPolar,
2010
+ So as CardProgresso,
1949
2011
  st as ChartBase,
1950
2012
  dt as ICONE_EXPORTAR_SVG,
1951
- nt as clampHorizontal,
2013
+ rt as clampHorizontal,
1952
2014
  gt as criarTooltipEl,
1953
- To as default,
2015
+ Lo as default,
1954
2016
  ct as exportarElementoComoImagem,
1955
- bt as gerarPaleta,
1956
- rt as prepararTooltipParent,
1957
- D as toRgba,
2017
+ xt as gerarPaleta,
2018
+ lt as prepararTooltipParent,
2019
+ j as toRgba,
1958
2020
  pt as useFormatadorValor,
1959
2021
  it as useTema
1960
2022
  };