nemesischart 2.0.7 → 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 Bt, openBlock as l, createElementBlock as s, normalizeStyle as h, createElementVNode as S, computed as z, unref as a, normalizeClass as lt, renderSlot as F, createTextVNode as X, toDisplayString as A, createCommentVNode as g, createVNode as ft, Fragment as mt, renderList as yt, useCssVars as Vt } from "vue";
2
- import { Chart as wt, 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, m) => {
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 [i, o] of m)
6
- e[i] = 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 },
@@ -16,11 +16,9 @@ const at = (t, m) => {
16
16
  width: { type: [String, Number], default: null }
17
17
  },
18
18
  setup(t, { expose: m }) {
19
- wt.register(
20
- Nt,
21
- Pt,
22
- Dt,
19
+ Tt.register(
23
20
  It,
21
+ Dt,
24
22
  Wt,
25
23
  Ot,
26
24
  Xt,
@@ -29,11 +27,13 @@ const at = (t, m) => {
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, i = ot(null), o = Mt(null), C = {
36
+ const e = t, p = et(null), o = jt(null), k = {
37
37
  responsive: !0,
38
38
  maintainAspectRatio: !1,
39
39
  plugins: {
@@ -41,78 +41,78 @@ const at = (t, m) => {
41
41
  }
42
42
  };
43
43
  function $() {
44
- return { ...C, ...e.options };
44
+ return { ...k, ...e.options };
45
45
  }
46
- function w() {
47
- i.value && (o.value = new wt(i.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 P() {
54
+ function D() {
55
55
  o.value && (o.value.destroy(), o.value = null);
56
56
  }
57
- return jt(w), Ht(P), Bt(
57
+ return Vt(A), Nt(D), Rt(
58
58
  () => e.data,
59
59
  (R) => {
60
60
  if (!o.value) return;
61
61
  o.value.data.labels = R.labels;
62
- const q = o.value.data.datasets, L = R.datasets;
63
- q.length !== L.length ? o.value.data.datasets = L : L.forEach((Q, W) => Object.assign(q[W], Q)), o.value.update();
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
- ), Bt(
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
- ), m({ chart: o }), (R, q) => (l(), s("div", {
72
+ ), m({ chart: o }), (R, w) => (u(), f("div", {
73
73
  class: "nc-chart-wrapper w-full",
74
- style: h({
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
79
  S("canvas", {
80
80
  ref_key: "canvasRef",
81
- ref: i
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 m = t.replace("#", ""), e = m.length === 3 ? m.split("").map((Q) => Q + Q).join("") : m, i = parseInt(e.slice(0, 2), 16) / 255, o = parseInt(e.slice(2, 4), 16) / 255, C = parseInt(e.slice(4, 6), 16) / 255, $ = Math.max(i, o, C), w = Math.min(i, o, C), P = ($ + w) / 2;
88
- if ($ === w) return [0, 0, P * 100];
89
- const R = $ - w, q = P > 0.5 ? R / (2 - $ - w) : R / ($ + w);
90
- let L;
91
- return $ === i ? L = ((o - C) / R + (o < C ? 6 : 0)) / 6 : $ === o ? L = ((C - i) / R + 2) / 6 : L = ((i - o) / R + 4) / 6, [L * 360, q * 100, P * 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, m, e) {
93
+ function ne(t, m, e) {
94
94
  t /= 360, m /= 100, e /= 100;
95
- const i = e < 0.5 ? e * (1 + m) : e + m - e * m, o = 2 * e - i, C = (R) => (R < 0 && (R += 1), R > 1 && (R -= 1), R < 1 / 6 ? o + (i - o) * 6 * R : R < 1 / 2 ? i : R < 2 / 3 ? o + (i - o) * (2 / 3 - R) * 6 : o), $ = m === 0 ? e : C(t + 1 / 3), w = m === 0 ? e : C(t), P = m === 0 ? e : C(t - 1 / 3);
96
- return "#" + [$, w, P].map((R) => Math.round(R * 255).toString(16).padStart(2, "0")).join("");
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 ht(t, m = 7) {
98
+ function xt(t, m = 7) {
99
99
  if (!(t != null && t.startsWith("#"))) return Array.from({ length: m }, () => t ?? "#3B82F6");
100
- const [e, i] = ee(t), o = 20, C = 72;
101
- return Array.from({ length: m }, ($, w) => {
102
- const P = m === 1 ? 0.5 : w / (m - 1), R = o + P * (C - o), q = Math.max(50, i - Math.max(0, R - 55) * 0.6);
103
- return oe(e, q, R);
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 N(t, m) {
111
+ function j(t, m) {
112
112
  if (!t) return `rgba(59,130,246,${m})`;
113
113
  if (t.startsWith("#")) {
114
- const e = t.replace("#", ""), i = e.length === 3 ? e.split("").map((w) => w + w).join("") : e, o = parseInt(i.slice(0, 2), 16), C = parseInt(i.slice(2, 4), 16), $ = parseInt(i.slice(4, 6), 16);
115
- return `rgba(${o},${C},${$},${m})`;
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);
@@ -121,28 +121,28 @@ function N(t, m) {
121
121
  return t;
122
122
  }
123
123
  function it(t) {
124
- const m = z(() => {
125
- const i = ae[t.tema], o = i ? { ...i, bg: t.corFundo || i.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
- }), e = z(() => ({
131
+ }), e = M(() => ({
132
132
  background: m.value.bg,
133
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: m, cardStyle: e, toRgba: N };
138
+ return { palette: m, cardStyle: e, toRgba: j };
139
139
  }
140
140
  function pt(t) {
141
- const m = z(() => 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(i) {
143
- if (i == null) return "";
144
- const o = Number(i);
145
- return Number.isNaN(o) ? String(i) : t.tipoValor === "percentual" ? m.value.format(o / 100) : m.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
147
  return { formatador: m, formatar: e };
148
148
  }
@@ -166,8 +166,8 @@ function gt(t, { caretFlexivel: m = !1 } = {}) {
166
166
  fontFamily: "inherit",
167
167
  textAlign: "left"
168
168
  });
169
- const i = document.createElement("div");
170
- i.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: m = !1 } = {}) {
177
177
  transform: "translateX(-50%) rotate(45deg)",
178
178
  borderRadius: "2px"
179
179
  };
180
- m ? Object.assign(i.style, o) : Object.assign(i.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(i);
185
- const C = document.createElement("div");
186
- return C.className = "nc-tt__content", Object.assign(C.style, { position: "relative", background: "#fff", borderRadius: "8px" }), e.appendChild(C), 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) {
188
+ function lt(t) {
189
189
  const m = t.canvas.parentNode;
190
190
  return m ? (getComputedStyle(m).position === "static" && (m.style.position = "relative"), m) : null;
191
191
  }
192
- function nt(t, m, e, i = 4) {
192
+ function rt(t, m, e, p = 4) {
193
193
  const o = m / 2;
194
- return t - o < i ? o + i : t + o > e - i ? e - o - i : t;
194
+ return t - o < p ? o + p : t + o > e - p ? e - o - p : t;
195
195
  }
196
- function Rt(t, m) {
196
+ function qt(t, m) {
197
197
  const e = window.getComputedStyle(t);
198
- let i = "";
198
+ let p = "";
199
199
  for (let o = 0; o < e.length; o++) {
200
- const C = e[o];
201
- let $ = e.getPropertyValue(C);
200
+ const k = e[o];
201
+ let $ = e.getPropertyValue(k);
202
202
  if ($ && $.indexOf("url(") !== -1 && !/url\(["']?data:/.test($))
203
- if (C === "background-image" || C === "background" || C === "mask-image" || C === "border-image" || C === "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
- i += `${C}:${$};`;
207
+ p += `${k}:${$};`;
208
208
  }
209
- m.setAttribute("style", i);
209
+ m.setAttribute("style", p);
210
210
  }
211
211
  function re(t, m) {
212
- Rt(t, m);
213
- const e = t.querySelectorAll("*"), i = m.querySelectorAll("*");
212
+ qt(t, m);
213
+ const e = t.querySelectorAll("*"), p = m.querySelectorAll("*");
214
214
  for (let o = 0; o < e.length; o++)
215
- i[o] && Rt(e[o], i[o]);
215
+ p[o] && qt(e[o], p[o]);
216
216
  }
217
- function ne(t, m) {
218
- const e = t.querySelectorAll("canvas"), i = m.querySelectorAll("canvas");
219
- e.forEach((o, C) => {
220
- if (!i[C]) 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 w = o.getBoundingClientRect();
228
- $.setAttribute("style", `width:${w.width}px;height:${w.height}px;display:block;`), i[C].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
231
  async function ct(t, m = {}) {
232
232
  if (!t) return;
233
233
  const {
234
234
  nomeArquivo: e = "componente.png",
235
- escala: i = 2,
235
+ escala: p = 2,
236
236
  corFundo: o = null
237
- } = m, C = t.getBoundingClientRect(), $ = Math.ceil(C.width), w = Math.ceil(C.height), P = t.cloneNode(!0);
238
- re(t, P), ne(t, P), P.style.margin = "0", P.style.transform = "none";
239
- const R = new XMLSerializer().serializeToString(P), q = `<svg xmlns="http://www.w3.org/2000/svg" width="${$}" height="${w}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${$}px;height:${w}px;">` + R + "</div></foreignObject></svg>", Q = "data:image/svg+xml;base64," + (typeof window < "u" && window.btoa ? window.btoa(unescape(encodeURIComponent(q))) : ""), W = new Image();
240
- await new Promise((M, G) => {
241
- W.onload = M, W.onerror = G, W.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
- const K = document.createElement("canvas");
244
- K.width = $ * i, K.height = w * i;
245
- const _ = K.getContext("2d");
246
- _.scale(i, i), o && (_.fillStyle = o, _.fillRect(0, 0, $, w)), _.drawImage(W, 0, 0);
247
- let f;
243
+ const _ = document.createElement("canvas");
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
- f = K.toDataURL("image/png");
250
- } catch (M) {
251
- console.error("Falha ao exportar imagem: canvas contaminado.", M);
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 T = document.createElement("a");
255
- T.download = e, T.href = f, document.body.appendChild(T), T.click(), document.body.removeChild(T);
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 },
@@ -318,75 +318,75 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
318
318
  },
319
319
  emits: ["botaoAcao", "exportado"],
320
320
  setup(t, { emit: m }) {
321
- const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null), P = dt;
321
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null), D = dt;
322
322
  async function R() {
323
- await ct(w.value, {
323
+ await ct(A.value, {
324
324
  nomeArquivo: e.nomeArquivoExport,
325
325
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
326
- }), i("exportado");
326
+ }), p("exportado");
327
327
  }
328
- const q = z(() => `card-linhas--${e.direcao}`), L = z(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((d) => d && (typeof d == "number" || typeof d.valor == "number")).map((d) => typeof d == "number" ? { valor: d, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
329
- valor: d.valor,
330
- rotulo: d.rotulo ?? null,
331
- cor: d.cor || "#0F172A",
332
- corRotulo: d.corRotulo || d.cor || "#0F172A",
333
- corTexto: d.corTexto || "#FFFFFF",
334
- tracejado: d.tracejado || [6, 6],
335
- espessura: d.espessura ?? 1
336
- }) : []), Q = [];
337
- let W = 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(p) {
341
- const d = L.value;
342
- if (Q.length = 0, !d.length) return;
343
- const { ctx: r, chartArea: b, scales: x } = p, c = x.y;
344
- c && d.forEach((u) => {
345
- const n = c.getPixelForValue(u.valor);
346
- if (Q.push({ linha: u, pos: n, chartArea: b }), r.save(), r.beginPath(), r.setLineDash(u.tracejado), r.lineWidth = u.espessura, r.strokeStyle = u.cor, n < b.top || n > b.bottom) {
347
- r.restore();
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
+ a.restore();
348
348
  return;
349
349
  }
350
- if (r.moveTo(b.left, n), r.lineTo(b.right, n), r.stroke(), r.setLineDash([]), u.rotulo) {
351
- r.font = "600 11px 'Inter', sans-serif";
352
- const y = 8, v = 5, E = r.measureText(u.rotulo).width, B = 12, k = E + y * 2, O = B + v * 2, Y = O / 2;
353
- let V = b.left - k - 6, I = n - O / 2;
354
- V < 0 && (V = b.left + 6), r.fillStyle = u.corRotulo, r.beginPath(), r.roundRect ? r.roundRect(V, I, k, O, Y) : (r.moveTo(V + Y, I), r.lineTo(V + k - Y, I), r.quadraticCurveTo(V + k, I, V + k, I + Y), r.lineTo(V + k, I + O - Y), r.quadraticCurveTo(V + k, I + O, V + k - Y, I + O), r.lineTo(V + Y, I + O), r.quadraticCurveTo(V, I + O, V, I + O - Y), r.lineTo(V, I + Y), r.quadraticCurveTo(V, I, V + Y, I)), r.fill(), r.fillStyle = u.corTexto, r.textBaseline = "middle", r.textAlign = "center", r.fillText(u.rotulo, V + k / 2, I + O / 2);
350
+ if (a.moveTo(r.left, c), a.lineTo(r.right, c), a.stroke(), a.setLineDash([]), g.rotulo) {
351
+ a.font = "600 11px 'Inter', sans-serif";
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
- r.restore();
356
+ a.restore();
357
357
  });
358
358
  },
359
- beforeEvent(p, d) {
360
- if (!Q.length) {
361
- W = null;
359
+ beforeEvent(l, n) {
360
+ if (!J.length) {
361
+ O = null;
362
362
  return;
363
363
  }
364
- const r = d.event;
365
- if (!r || r.type === "mouseout" || r.x == null || r.y == null) {
366
- W = null;
364
+ const a = n.event;
365
+ if (!a || a.type === "mouseout" || a.x == null || a.y == null) {
366
+ O = null;
367
367
  return;
368
368
  }
369
- const b = 8;
370
- let x = null, c = 1 / 0;
371
- for (const u of Q) {
372
- const n = Math.abs(r.y - u.pos), y = r.x >= u.chartArea.left && r.x <= u.chartArea.right;
373
- n <= b && y && n < c && (c = n, x = u);
369
+ const r = 8;
370
+ let v = null, i = 1 / 0;
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
- W = x;
375
+ O = v;
376
376
  },
377
- afterEvent(p, d) {
378
- if (!Q.length) return;
379
- const r = d.event;
377
+ afterEvent(l, n) {
378
+ if (!J.length) return;
379
+ const a = n.event;
380
+ if (!a) return;
381
+ const r = lt(l);
380
382
  if (!r) return;
381
- const b = rt(p);
382
- if (!b) return;
383
- let x = b.querySelector(".nc-tt-linhaRef");
384
- if (!W) {
385
- x && (x.style.opacity = "0");
383
+ let v = r.querySelector(".nc-tt-linhaRef");
384
+ if (!O) {
385
+ v && (v.style.opacity = "0");
386
386
  return;
387
387
  }
388
- const c = W;
389
- x || (x = document.createElement("div"), x.className = "nc-tt-linhaRef", Object.assign(x.style, {
388
+ const i = O;
389
+ v || (v = document.createElement("div"), v.className = "nc-tt-linhaRef", Object.assign(v.style, {
390
390
  position: "absolute",
391
391
  pointerEvents: "none",
392
392
  transform: "translate(-50%, calc(-100% - 12px))",
@@ -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(x));
405
- const u = c.linha.cor || "#0F172A", n = $(c.linha.valor), y = c.linha.rotulo;
406
- x.innerHTML = (y ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${y}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${u};box-shadow:0 0 0 2px ${N(u, 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 v = p.canvas;
408
- x.style.opacity = "1", x.style.visibility = "hidden", x.style.left = "0px", x.style.top = "0px";
409
- const j = x.offsetWidth, E = x.offsetHeight, B = 4, k = v.offsetLeft + r.x, O = v.offsetTop + c.pos, Y = nt(k, j, b.clientWidth, B);
410
- let V = O;
411
- const I = E + 16 + B;
412
- V < I && (V = I), x.style.left = Y + "px", x.style.top = V + "px", x.style.visibility = "visible";
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
+ v.style.opacity = "1", v.style.visibility = "hidden", v.style.left = "0px", v.style.top = "0px";
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
- }, _ = z(() => L.value.length ? [K] : []), f = z(() => ({
415
- labels: e.data.map((p) => p.rotulo),
414
+ }], Z = M(() => ({
415
+ labels: e.data.map((l) => l.rotulo),
416
416
  datasets: [
417
417
  {
418
- data: e.data.map((p) => p.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: (p) => {
424
- const { chart: d } = p, { ctx: r, chartArea: b } = d;
425
- if (!b) return "transparent";
426
- const x = e.corDetalhes || "#0400FF", c = "#7C7C7C", u = r.createLinearGradient(0, b.top, 0, b.bottom);
427
- return u.addColorStop(0.16, N(x, 0.2)), u.addColorStop(1, N(c, 0)), u;
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 T(p) {
441
- const { chart: d, tooltip: r } = p, b = rt(d);
442
- if (!b) return;
443
- const x = gt(b);
444
- if (r.opacity === 0 || W) {
445
- x.style.opacity = "0";
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
+ v.style.opacity = "0";
446
446
  return;
447
447
  }
448
- const c = r.title || [], u = (r.body || []).flatMap((Z) => Z.lines), n = x.querySelector(".nc-tt__content"), y = 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;">${c.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${y};box-shadow:0 0 0 2px ${N(y, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${u.join(" ")}</span></div>`;
450
- const { offsetLeft: v, offsetTop: j } = d.canvas;
451
- x.style.opacity = "1", x.style.visibility = "hidden", x.style.left = "0px", x.style.top = "0px";
452
- const E = x.offsetWidth, B = x.offsetHeight, k = 4, O = v + r.caretX, Y = j + r.caretY, V = nt(O, E, b.clientWidth, k), I = B + 16 + k, tt = Y < I;
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
+ v.style.opacity = "1", v.style.visibility = "hidden", v.style.left = "0px", v.style.top = "0px";
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 ? (x.style.transform = "translateX(-50%) translateY(16px)", U = Y) : (x.style.transform = "translate(-50%, calc(-100% - 16px))", U = Y), x.style.left = V + "px", x.style.top = U + "px";
455
- const H = x.querySelector(".nc-tt__caret");
456
- if (H) {
457
- const Z = O - V, D = E / 2, J = Math.max(-D + 8, Math.min(D - 8, Z));
458
- H.style.left = `calc(50% + ${J}px)`, tt ? (H.style.bottom = "", H.style.top = "-5px", H.style.borderRight = "", H.style.borderBottom = "", H.style.borderLeft = "1px solid rgba(15,23,42,.06)", H.style.borderTop = "1px solid rgba(15,23,42,.06)") : (H.style.top = "", H.style.bottom = "-5px", H.style.borderLeft = "", H.style.borderTop = "", H.style.borderRight = "1px solid rgba(15,23,42,.06)", H.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
- x.style.visibility = "visible";
460
+ v.style.visibility = "visible";
461
461
  }
462
- const M = z(() => ({
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: L.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: T,
473
+ external: K,
474
474
  callbacks: {
475
- title: (p) => {
476
- var d;
477
- return ((d = p[0]) == null ? void 0 : d.label) ?? "";
475
+ title: (l) => {
476
+ var n;
477
+ return ((n = l[0]) == null ? void 0 : n.label) ?? "";
478
478
  },
479
- label: (p) => $(p.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: (p) => {
487
- p.paddingLeft = 0, p.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: L.value.length ? Math.max(...L.value.map((p) => p.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
- i("botaoAcao");
506
+ function d() {
507
+ p("botaoAcao");
508
508
  }
509
- return (p, d) => (l(), s("div", {
509
+ return (l, n) => (u(), f("div", {
510
510
  ref_key: "cardRef",
511
- ref: w,
512
- class: lt(["card-linhas p-4 flex", q.value]),
513
- style: h(a(C))
511
+ ref: A,
512
+ class: ot(["card-linhas p-4 flex", w.value]),
513
+ style: x(s(k))
514
514
  }, [
515
- S("div", le, [
516
- S("div", se, [
517
- p.$slots.legenda || t.legenda || p.$slots.sublegenda || t.sublegenda ? (l(), s("div", ie, [
518
- p.$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: h({ color: a(o).text, opacity: 0.85 })
521
+ style: x({ color: s(o).text, opacity: 0.85 })
522
522
  }, [
523
- F(p.$slots, "legenda", {}, () => [
524
- X(A(t.legenda), 1)
523
+ L(l.$slots, "legenda", {}, () => [
524
+ X(B(t.legenda), 1)
525
525
  ], !0)
526
- ], 4)) : g("", !0),
527
- p.$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: h({ color: a(o).muted })
530
+ style: x({ color: s(o).muted })
531
531
  }, [
532
- F(p.$slots, "sublegenda", {}, () => [
533
- X(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
- p.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ce, [
538
- F(p.$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: h({ color: a(o).text, borderColor: a(N)(a(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
- S("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: h({ color: a(o).muted, borderColor: a(N)(a(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
555
  onClick: R,
556
- innerHTML: a(P)
557
- }, null, 12, de)) : g("", !0)
558
- ])) : g("", !0)
556
+ innerHTML: s(D)
557
+ }, null, 12, fe)) : y("", !0)
558
+ ])) : y("", !0)
559
559
  ]),
560
- p.$slots.titulo || t.titulo || p.$slots.descricao || t.descricao ? (l(), s("div", ue, [
561
- p.$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: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
564
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
565
565
  }, [
566
- F(p.$slots, "titulo", {}, () => [
567
- X(A(t.titulo), 1)
566
+ L(l.$slots, "titulo", {}, () => [
567
+ X(B(t.titulo), 1)
568
568
  ], !0)
569
- ], 4)) : g("", !0),
570
- p.$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: h({ color: a(o).muted })
573
+ style: x({ color: s(o).muted })
574
574
  }, [
575
- F(p.$slots, "descricao", {}, () => [
576
- X(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
- S("div", fe, [
581
+ S("div", ge, [
582
582
  ft(st, {
583
583
  type: "line",
584
- data: f.value,
585
- options: M.value,
586
- plugins: _.value,
584
+ data: Z.value,
585
+ options: tt.value,
586
+ plugins: Q,
587
587
  height: t.height
588
- }, null, 8, ["data", "options", "plugins", "height"])
588
+ }, null, 8, ["data", "options", "height"])
589
589
  ]),
590
- p.$slots.footer ? (l(), s("div", pe, [
591
- F(p.$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
- }, me = /* @__PURE__ */ at(ge, [["__scopeId", "data-v-364ce1d1"]]), ye = { class: "card-pizza__topo flex align-items-start justify-content-between gap-3" }, he = {
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
- }, be = {
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" }, Ae = { class: "card-pizza__chart-wrap flex align-items-center justify-content-center" }, Be = { class: "card-pizza__chart" }, we = {
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
- }, Re = {
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
+ emits: ["botaoAcao", "exportado", "itemClicado"],
656
657
  setup(t, { emit: m }) {
657
- const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null);
658
- async function P() {
659
- await ct(w.value, {
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
- }), i("exportado");
663
+ }), p("exportado");
663
664
  }
664
- const R = z(() => `card-pizza--${e.direcao}`), q = z(() => {
665
- const f = ht(e.corDetalhes, e.data.length);
666
- return e.data.map((T, M) => T.cor ?? f[M]);
667
- }), L = z(() => ({
668
- labels: e.data.map((f) => f.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((f) => f.quantidade),
672
- backgroundColor: q.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(f) {
682
- const { chart: T, tooltip: M } = f, G = rt(T);
683
- if (!G) return;
684
- const p = gt(G);
685
- if (M.opacity === 0) {
686
- p.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 d = M.title || [], r = M.dataPoints && M.dataPoints[0], b = r ? q.value[r.dataIndex] : "#3B82F6", x = r ? $(r.parsed) : "", c = p.querySelector(".nc-tt__content");
690
- c.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${d.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 ${N(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;">${x}</span></div>`;
691
- const { offsetLeft: u, offsetTop: n } = T.canvas;
692
- p.style.opacity = "1", p.style.visibility = "hidden", p.style.left = "0px", p.style.top = "0px";
693
- const y = p.offsetWidth, v = p.offsetHeight, j = 4, E = nt(u + M.caretX, y, G.clientWidth, j);
694
- let B = n + M.caretY;
695
- const k = v + 16 + j;
696
- B < k && (B = k), p.style.left = E + "px", p.style.top = B + "px", p.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] });
702
+ }
703
+ function _(d, l) {
704
+ e.itensClicaveis && p("itemClicado", { item: d, index: l, cor: w.value[l] });
697
705
  }
698
- const W = z(() => ({
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: (f) => {
710
- var T;
711
- return ((T = f[0]) == null ? void 0 : T.label) ?? "";
724
+ title: (d) => {
725
+ var l;
726
+ return ((l = d[0]) == null ? void 0 : l.label) ?? "";
712
727
  },
713
- label: (f) => $(f.parsed)
728
+ label: (d) => $(d.parsed)
714
729
  }
715
730
  }
716
731
  }
717
732
  }));
718
733
  function K() {
719
- i("botaoAcao");
734
+ p("botaoAcao");
720
735
  }
721
- const _ = dt;
722
- return (f, T) => (l(), s("div", {
736
+ const tt = dt;
737
+ return (d, l) => (u(), f("div", {
723
738
  ref_key: "cardRef",
724
- ref: w,
725
- class: lt(["card-pizza p-4 flex flex-column", R.value]),
726
- style: h(a(C))
739
+ ref: A,
740
+ class: ot(["card-pizza p-4 flex flex-column", R.value]),
741
+ style: x(s(k))
727
742
  }, [
728
- S("div", ye, [
729
- f.$slots.legenda || t.legenda || f.$slots.sublegenda || t.sublegenda ? (l(), s("div", he, [
730
- f.$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: h({ color: a(o).text, opacity: 0.95 })
748
+ style: x({ color: s(o).text, opacity: 0.95 })
734
749
  }, [
735
- F(f.$slots, "legenda", {}, () => [
736
- X(A(t.legenda), 1)
750
+ L(d.$slots, "legenda", {}, () => [
751
+ X(B(t.legenda), 1)
737
752
  ], !0)
738
- ], 4)) : g("", !0),
739
- f.$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: h({ color: a(o).muted })
757
+ style: x({ color: s(o).muted })
743
758
  }, [
744
- F(f.$slots, "sublegenda", {}, () => [
745
- X(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
- f.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", be, [
750
- F(f.$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: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
769
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
755
770
  onClick: K
756
771
  }, [
757
- S("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: h({ color: a(o).muted, borderColor: a(N)(a(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: P,
768
- innerHTML: a(_)
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
- S("div", ve, [
773
- S("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: h({ color: a(o).muted, borderColor: a(N)(a(o).muted, 0.25) })
792
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).muted, 0.25) })
778
793
  }, [
779
- S("span", null, A(t.rotuloCategoria), 1),
780
- S("span", Se, A(t.rotuloQuantidade), 1)
781
- ], 4)) : g("", !0),
782
- (l(!0), s(mt, null, yt(t.data, (M, G) => (l(), s("div", {
783
- key: G,
784
- class: "nc-tabela-linha flex align-items-center justify-content-between",
785
- style: h({ color: a(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
- S("span", ke, [
818
+ S("span", Ae, [
788
819
  S("span", {
789
820
  class: "nc-bolinha",
790
- style: h({ background: q.value[G] })
821
+ style: x({ background: w.value[a] })
791
822
  }, null, 4),
792
- S("span", null, A(M.rotulo), 1)
823
+ S("span", null, B(n.rotulo), 1)
793
824
  ]),
794
- S("span", Ce, A(a($)(M.quantidade)), 1)
795
- ], 4))), 128))
825
+ S("span", we, B(s($)(n.quantidade)), 1)
826
+ ], 46, Be))), 128))
796
827
  ]),
797
- S("div", Ae, [
798
- S("div", Be, [
828
+ S("div", Re, [
829
+ S("div", Te, [
799
830
  ft(st, {
800
831
  type: "doughnut",
801
- data: L.value,
802
- options: W.value,
832
+ data: T.value,
833
+ options: Z.value,
803
834
  height: t.height
804
835
  }, null, 8, ["data", "options", "height"]),
805
- f.$slots.titulo || t.titulo || f.$slots.descricao || t.descricao ? (l(), s("div", we, [
806
- f.$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: h({ color: a(o).text })
840
+ style: x({ color: s(o).text })
810
841
  }, [
811
- F(f.$slots, "titulo", {}, () => [
812
- X(A(t.titulo), 1)
842
+ L(d.$slots, "titulo", {}, () => [
843
+ X(B(t.titulo), 1)
813
844
  ], !0)
814
- ], 4)) : g("", !0),
815
- f.$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: h({ color: a(o).muted })
849
+ style: x({ color: s(o).muted })
819
850
  }, [
820
- F(f.$slots, "descricao", {}, () => [
821
- X(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
- f.$slots.footer ? (l(), s("div", Re, [
829
- F(f.$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
- }, Ee = /* @__PURE__ */ at(Te, [["__scopeId", "data-v-2a65258f"]]), qe = { 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 },
@@ -909,67 +940,67 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
909
940
  },
910
941
  emits: ["botaoAcao", "exportado"],
911
942
  setup(t, { emit: m }) {
912
- Vt((c) => ({
913
- c9bf3d56: L.value
943
+ Pt((i) => ({
944
+ c9bf3d56: T.value
914
945
  }));
915
- const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null), P = dt;
946
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null), D = dt;
916
947
  async function R() {
917
- await ct(w.value, {
948
+ await ct(A.value, {
918
949
  nomeArquivo: e.nomeArquivoExport,
919
950
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
920
- }), i("exportado");
951
+ }), p("exportado");
921
952
  }
922
- const q = z(() => `card-barra--${e.direcao}`), L = z(
953
+ const w = M(() => `card-barra--${e.direcao}`), T = M(
923
954
  () => typeof e.height == "number" ? `${e.height}px` : e.height
924
- ), Q = z(() => e.orientacao === "horizontal"), W = z(() => Array.isArray(e.series) && e.series.length > 0 ? e.series.map((c, u) => ({
925
- nome: c.nome ?? `Série ${u + 1}`,
926
- cor: c.cor || e.cores[u % e.cores.length],
927
- dados: Array.isArray(c.dados) ? c.dados : []
928
- })) : [{ nome: e.legenda || "Valores", cor: e.corDetalhes, dados: e.data }]), K = z(() => {
929
- const c = W.value[0];
930
- return c ? c.dados.map((u) => u.rotulo) : [];
931
- }), _ = z(() => {
932
- const c = W.value, u = c.length - 1, n = typeof e.larguraBarra == "number" ? e.larguraBarra : Number(e.larguraBarra) || 0.6, y = e.raioBarra, v = Q.value;
933
- function j(E) {
934
- if (!e.empilhado || c.length === 1) return y;
935
- const B = E === 0, k = E === u;
936
- return v ? {
937
- topLeft: B ? y : 0,
938
- bottomLeft: B ? y : 0,
939
- topRight: k ? y : 0,
940
- bottomRight: k ? y : 0
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],
958
+ dados: Array.isArray(i.dados) ? i.dados : []
959
+ })) : [{ nome: e.legenda || "Valores", cor: e.corDetalhes, dados: e.data }]), _ = M(() => {
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;
967
+ return h ? {
968
+ topLeft: E ? b : 0,
969
+ bottomLeft: E ? b : 0,
970
+ topRight: C ? b : 0,
971
+ bottomRight: C ? b : 0
941
972
  } : {
942
- bottomLeft: B ? y : 0,
943
- bottomRight: B ? y : 0,
944
- topLeft: k ? y : 0,
945
- topRight: k ? y : 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
- labels: K.value,
950
- datasets: c.map((E, B) => ({
951
- label: E.nome,
952
- data: E.dados.map((k) => k.quantidade),
953
- previstos: E.dados.map((k) => k.previsto != null ? k.previsto : null),
954
- backgroundColor: N(E.cor, 0.72),
955
- hoverBackgroundColor: e.corHover || E.cor,
980
+ labels: _.value,
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: j(B),
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 f(c, u) {
965
- u ? Object.assign(c.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)",
969
1000
  borderLeft: "1px solid rgba(15,23,42,.06)",
970
1001
  borderRight: "none",
971
1002
  borderBottom: "none"
972
- }) : Object.assign(c.style, {
1003
+ }) : Object.assign(i.style, {
973
1004
  bottom: "-5px",
974
1005
  top: "auto",
975
1006
  borderRight: "1px solid rgba(15,23,42,.06)",
@@ -978,68 +1009,68 @@ 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 T = null;
982
- function M(c) {
983
- var kt, Ct;
984
- const { chart: u, tooltip: n } = c, y = rt(u);
985
- if (!y) return;
986
- const v = gt(y, { caretFlexivel: !0 });
987
- if (n.opacity === 0 || T) {
988
- v.style.opacity = "0";
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) {
1019
+ h.style.opacity = "0";
989
1020
  return;
990
1021
  }
991
- const j = n.title || [], E = n.dataPoints || [], B = v.querySelector(".nc-tt__content"), k = E.map((et) => {
992
- var At;
993
- const ut = ((At = W.value[et.datasetIndex]) == null ? void 0 : At.cor) || e.corDetalhes, Lt = $(Q.value ? et.parsed.x : et.parsed.y), zt = et.dataset.label && W.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 ${N(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(""), O = (kt = E[0]) == null ? void 0 : kt.dataIndex;
996
- let Y = null;
997
- if (O != null)
998
- for (const et of u.data.datasets) {
999
- const ut = (Ct = et.previstos) == null ? void 0 : Ct[O];
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
- Y = ut;
1032
+ N = ut;
1002
1033
  break;
1003
1034
  }
1004
1035
  }
1005
- const V = Y != 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;">${$(Y)}</span></div>` : "";
1006
- B.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${j.join(" ")}</div>` + k + V;
1007
- const { offsetLeft: I, offsetTop: tt } = u.canvas;
1008
- v.style.opacity = "1", v.style.visibility = "hidden", v.style.left = "0px", v.style.top = "0px";
1009
- const U = v.offsetWidth, H = v.offsetHeight, Z = 4, D = I + n.caretX, J = tt + n.caretY, bt = nt(D, U, y.clientWidth, Z), Tt = U / 2, xt = 14, vt = J - xt - H, $t = vt < Z, Et = $t ? J + xt : vt, St = v.querySelector(".nc-tt__caret");
1010
- f(St, $t);
1011
- const qt = D - (bt - Tt), Ft = Math.max(10, Math.min(U - 10, qt));
1012
- St.style.left = Ft + "px", v.style.left = bt + "px", v.style.top = Et + "px", v.style.visibility = "visible";
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;
1039
+ h.style.opacity = "1", h.style.visibility = "hidden", h.style.left = "0px", h.style.top = "0px";
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 = z(() => {
1015
- const c = Q.value, u = {
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: d.value.length ? Math.max(...d.value.map((y) => y.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,
1029
1060
  maintainAspectRatio: !1,
1030
- indexAxis: c ? "y" : "x",
1031
- interaction: { intersect: !1, mode: "index", axis: c ? "y" : "x" },
1061
+ indexAxis: i ? "y" : "x",
1062
+ interaction: { intersect: !1, mode: "index", axis: i ? "y" : "x" },
1032
1063
  layout: {
1033
1064
  padding: {
1034
- top: d.value.length && !c ? 24 : 12,
1035
- right: c ? 12 : 0,
1065
+ top: n.value.length && !i ? 24 : 12,
1066
+ right: i ? 12 : 0,
1036
1067
  bottom: 0,
1037
- left: d.value.length && c ? 60 : 0
1068
+ left: n.value.length && i ? 60 : 0
1038
1069
  }
1039
1070
  },
1040
1071
  plugins: {
1041
1072
  legend: {
1042
- display: e.mostrarLegendaSeries && W.value.length > 1,
1073
+ display: e.mostrarLegendaSeries && O.value.length > 1,
1043
1074
  position: "bottom",
1044
1075
  align: "start",
1045
1076
  labels: {
@@ -1054,94 +1085,94 @@ 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: M,
1088
+ external: tt,
1058
1089
  callbacks: {
1059
- title: (y) => {
1060
- var v;
1061
- return ((v = y[0]) == null ? void 0 : v.label) ?? "";
1090
+ title: (b) => {
1091
+ var h;
1092
+ return ((h = b[0]) == null ? void 0 : h.label) ?? "";
1062
1093
  },
1063
- label: (y) => $(c ? y.parsed.x : y.parsed.y)
1094
+ label: (b) => $(i ? b.parsed.x : b.parsed.y)
1064
1095
  }
1065
1096
  }
1066
1097
  },
1067
1098
  scales: {
1068
- x: c ? n : u,
1069
- y: c ? u : n
1099
+ x: i ? c : g,
1100
+ y: i ? g : c
1070
1101
  }
1071
1102
  };
1072
1103
  });
1073
- function p() {
1074
- i("botaoAcao");
1104
+ function l() {
1105
+ p("botaoAcao");
1075
1106
  }
1076
- const d = z(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((u) => u && (typeof u == "number" || typeof u.valor == "number")).map((u) => typeof u == "number" ? { valor: u, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
1077
- valor: u.valor,
1078
- rotulo: u.rotulo ?? null,
1079
- cor: u.cor || "#0F172A",
1080
- corRotulo: u.corRotulo || u.cor || "#0F172A",
1081
- corTexto: u.corTexto || "#FFFFFF",
1082
- tracejado: u.tracejado || [6, 6],
1083
- espessura: u.espessura ?? 1
1084
- }) : []), r = [], 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
- afterDatasetsDraw(c) {
1087
- const u = d.value;
1088
- if (r.length = 0, !u.length) return;
1089
- const { ctx: n, chartArea: y, scales: v } = c, j = Q.value, E = j ? v.x : v.y;
1090
- E && u.forEach((B) => {
1091
- const k = E.getPixelForValue(B.valor);
1092
- if (r.push({ linha: B, pos: k, horizontal: j, chartArea: y }), n.save(), n.beginPath(), n.setLineDash(B.tracejado), n.lineWidth = B.espessura, n.strokeStyle = B.cor, j) {
1093
- if (k < y.left || k > y.right) {
1094
- n.restore();
1117
+ afterDatasetsDraw(i) {
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(k, y.top), n.lineTo(k, y.bottom);
1128
+ c.moveTo(C, b.top), c.lineTo(C, b.bottom);
1098
1129
  } else {
1099
- if (k < y.top || k > y.bottom) {
1100
- n.restore();
1130
+ if (C < b.top || C > b.bottom) {
1131
+ c.restore();
1101
1132
  return;
1102
1133
  }
1103
- n.moveTo(y.left, k), n.lineTo(y.right, k);
1134
+ c.moveTo(b.left, C), c.lineTo(b.right, C);
1104
1135
  }
1105
- if (n.stroke(), n.setLineDash([]), B.rotulo) {
1106
- n.font = "600 11px 'Inter', sans-serif";
1107
- const O = 8, Y = 5, I = n.measureText(B.rotulo).width, tt = 12, U = I + O * 2, H = tt + Y * 2, Z = H / 2;
1108
- let D, J;
1109
- j ? (D = k - U / 2, J = y.top - H - 6, J < 0 && (J = y.top + 6)) : (D = y.left - U - 6, J = k - H / 2, D < 0 && (D = y.left + 6)), n.fillStyle = B.corRotulo, n.beginPath(), n.roundRect ? n.roundRect(D, J, U, H, Z) : (n.moveTo(D + Z, J), n.lineTo(D + U - Z, J), n.quadraticCurveTo(D + U, J, D + U, J + Z), n.lineTo(D + U, J + H - Z), n.quadraticCurveTo(D + U, J + H, D + U - Z, J + H), n.lineTo(D + Z, J + H), n.quadraticCurveTo(D, J + H, D, J + H - Z), n.lineTo(D, J + Z), n.quadraticCurveTo(D, J, D + Z, J)), n.fill(), n.fillStyle = B.corTexto, n.textBaseline = "middle", n.textAlign = "center", n.fillText(B.rotulo, D + U / 2, J + H / 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(c, u) {
1115
- if (!r.length) {
1116
- T = null;
1145
+ beforeEvent(i, g) {
1146
+ if (!a.length) {
1147
+ K = null;
1117
1148
  return;
1118
1149
  }
1119
- const n = u.event;
1120
- if (!n || n.type === "mouseout" || n.x == null || n.y == null) {
1121
- T = 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 y = 8;
1125
- let v = null, j = 1 / 0;
1126
- for (const E of r) {
1127
- const B = E.horizontal ? Math.abs(n.x - E.pos) : Math.abs(n.y - E.pos), k = E.horizontal ? n.y >= E.chartArea.top && n.y <= E.chartArea.bottom : n.x >= E.chartArea.left && n.x <= E.chartArea.right;
1128
- B <= y && k && B < j && (j = B, v = E);
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
- T = v;
1161
+ K = h;
1131
1162
  },
1132
- afterEvent(c, u) {
1133
- if (!r.length) return;
1134
- const n = u.event;
1135
- if (!n) return;
1136
- const y = rt(c);
1137
- if (!y) return;
1138
- let v = y.querySelector(".nc-tt-linhaRef");
1139
- if (!T) {
1140
- v && (v.style.opacity = "0");
1163
+ afterEvent(i, g) {
1164
+ if (!a.length) return;
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) {
1171
+ h && (h.style.opacity = "0");
1141
1172
  return;
1142
1173
  }
1143
- const j = T;
1144
- v || (v = document.createElement("div"), v.className = "nc-tt-linhaRef", Object.assign(v.style, {
1174
+ const V = K;
1175
+ h || (h = document.createElement("div"), h.className = "nc-tt-linhaRef", Object.assign(h.style, {
1145
1176
  position: "absolute",
1146
1177
  pointerEvents: "none",
1147
1178
  transform: "translate(-50%, calc(-100% - 12px))",
@@ -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
- }), y.appendChild(v));
1160
- const E = j.linha.cor || "#0F172A", B = $(j.linha.valor), k = j.linha.rotulo;
1161
- v.innerHTML = (k ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${k}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${E};box-shadow:0 0 0 2px ${N(E, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${B}</span></div>`;
1162
- const O = c.canvas;
1163
- v.style.opacity = "1", v.style.visibility = "hidden", v.style.left = "0px", v.style.top = "0px";
1164
- const Y = v.offsetWidth, V = v.offsetHeight, I = 4;
1165
- let tt, U;
1166
- j.horizontal ? (tt = O.offsetLeft + j.pos, U = O.offsetTop + n.y) : (tt = O.offsetLeft + n.x, U = O.offsetTop + j.pos);
1167
- const H = nt(tt, Y, y.clientWidth, I);
1168
- let Z = U;
1169
- const D = V + 16 + I;
1170
- Z < D && (Z = D), v.style.left = H + "px", v.style.top = Z + "px", v.style.visibility = "visible";
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;
1194
+ h.style.opacity = "1", h.style.visibility = "hidden", h.style.left = "0px", h.style.top = "0px";
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
- }, x = z(() => d.value.length ? [b] : []);
1173
- return (c, u) => (l(), s("div", {
1203
+ }, v = M(() => n.value.length ? [r] : []);
1204
+ return (i, g) => (u(), f("div", {
1174
1205
  ref_key: "cardRef",
1175
- ref: w,
1176
- class: lt(["card-barra p-4 flex", q.value]),
1177
- style: h(a(C))
1206
+ ref: A,
1207
+ class: ot(["card-barra p-4 flex", w.value]),
1208
+ style: x(s(k))
1178
1209
  }, [
1179
- S("div", qe, [
1180
- S("div", Fe, [
1181
- c.$slots.legenda || t.legenda || c.$slots.sublegenda || t.sublegenda ? (l(), s("div", Le, [
1182
- c.$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: h({ color: a(o).text, opacity: 0.85 })
1216
+ style: x({ color: s(o).text, opacity: 0.85 })
1186
1217
  }, [
1187
- F(c.$slots, "legenda", {}, () => [
1188
- X(A(t.legenda), 1)
1218
+ L(i.$slots, "legenda", {}, () => [
1219
+ X(B(t.legenda), 1)
1189
1220
  ], !0)
1190
- ], 4)) : g("", !0),
1191
- c.$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: h({ color: a(o).muted })
1225
+ style: x({ color: s(o).muted })
1195
1226
  }, [
1196
- F(c.$slots, "sublegenda", {}, () => [
1197
- X(A(t.sublegenda), 1)
1227
+ L(i.$slots, "sublegenda", {}, () => [
1228
+ X(B(t.sublegenda), 1)
1198
1229
  ], !0)
1199
- ], 4)) : g("", !0)
1200
- ])) : g("", !0),
1201
- c.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ze, [
1202
- F(c.$slots, "actions", {}, () => [
1203
- t.botaoVisivel ? (l(), s("button", {
1230
+ ], 4)) : y("", !0)
1231
+ ])) : y("", !0),
1232
+ i.$slots.actions || t.botaoVisivel || t.exportar ? (u(), f("div", je, [
1233
+ L(i.$slots, "actions", {}, () => [
1234
+ t.botaoVisivel ? (u(), f("button", {
1204
1235
  key: 0,
1205
1236
  class: "nc-btn inline-flex align-items-center",
1206
- style: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
1207
- onClick: p
1237
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
1238
+ onClick: l
1208
1239
  }, [
1209
- S("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: h({ color: a(o).muted, borderColor: a(N)(a(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
1250
  onClick: R,
1220
- innerHTML: a(P)
1221
- }, null, 12, Me)) : g("", !0)
1222
- ])) : g("", !0)
1251
+ innerHTML: s(D)
1252
+ }, null, 12, Ve)) : y("", !0)
1253
+ ])) : y("", !0)
1223
1254
  ]),
1224
- c.$slots.titulo || t.titulo || c.$slots.descricao || t.descricao ? (l(), s("div", je, [
1225
- c.$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: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1259
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1229
1260
  }, [
1230
- F(c.$slots, "titulo", {}, () => [
1231
- X(A(t.titulo), 1)
1261
+ L(i.$slots, "titulo", {}, () => [
1262
+ X(B(t.titulo), 1)
1232
1263
  ], !0)
1233
- ], 4)) : g("", !0),
1234
- c.$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: h({ color: a(o).muted })
1268
+ style: x({ color: s(o).muted })
1238
1269
  }, [
1239
- F(c.$slots, "descricao", {}, () => [
1240
- X(A(t.descricao), 1)
1270
+ L(i.$slots, "descricao", {}, () => [
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
- S("div", He, [
1276
+ S("div", Pe, [
1246
1277
  ft(st, {
1247
1278
  type: "bar",
1248
- data: _.value,
1249
- options: G.value,
1250
- plugins: x.value,
1279
+ data: Q.value,
1280
+ options: d.value,
1281
+ plugins: v.value,
1251
1282
  height: "100%"
1252
1283
  }, null, 8, ["data", "options", "plugins"])
1253
1284
  ]),
1254
- c.$slots.footer ? (l(), s("div", Ve, [
1255
- F(c.$slots, "footer", {}, void 0, !0)
1256
- ])) : g("", !0)
1285
+ i.$slots.footer ? (u(), f("div", Ie, [
1286
+ L(i.$slots, "footer", {}, void 0, !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"],
1351
+ emits: ["botaoAcao", "exportado", "itemClicado"],
1320
1352
  setup(t, { emit: m }) {
1321
- const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null), P = dt;
1353
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null), D = dt;
1322
1354
  async function R() {
1323
- await ct(w.value, {
1355
+ await ct(A.value, {
1324
1356
  nomeArquivo: e.nomeArquivoExport,
1325
1357
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1326
- }), i("exportado");
1358
+ }), p("exportado");
1327
1359
  }
1328
- const q = z(() => `card-polar--${e.direcao}`), L = z(() => {
1329
- const f = ht(e.corDetalhes, e.data.length);
1330
- return e.data.map((T, M) => T.cor ?? f[M]);
1331
- }), Q = z(() => ({
1332
- labels: e.data.map((f) => f.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((f) => f.quantidade),
1336
- backgroundColor: L.value,
1337
- borderColor: L.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 W(f) {
1344
- const { chart: T, tooltip: M } = f, G = rt(T);
1345
- if (!G) return;
1346
- const p = gt(G);
1347
- if (M.opacity === 0) {
1348
- p.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 d = M.title || [], r = M.dataPoints && M.dataPoints[0], b = r ? L.value[r.dataIndex] : "#3B82F6", x = r ? $(r.parsed.r ?? r.parsed) : "", c = p.querySelector(".nc-tt__content");
1352
- c.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${d.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 ${N(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;">${x}</span></div>`;
1353
- const { offsetLeft: u, offsetTop: n } = T.canvas;
1354
- p.style.opacity = "1", p.style.visibility = "hidden", p.style.left = "0px", p.style.top = "0px";
1355
- const y = p.offsetWidth, v = p.offsetHeight, j = 4, E = nt(u + M.caretX, y, G.clientWidth, j);
1356
- let B = n + M.caretY;
1357
- const k = v + 16 + j;
1358
- B < k && (B = k), p.style.left = E + "px", p.style.top = B + "px", p.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";
1391
+ }
1392
+ function _(d) {
1393
+ const l = e.data[d];
1394
+ l && p("itemClicado", { item: l, index: d, cor: T.value[d] });
1359
1395
  }
1360
- const K = z(() => ({
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: N(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: N(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: W,
1429
+ external: O,
1384
1430
  callbacks: {
1385
- title: (f) => {
1386
- var T;
1387
- return ((T = f[0]) == null ? void 0 : T.label) ?? "";
1431
+ title: (d) => {
1432
+ var l;
1433
+ return ((l = d[0]) == null ? void 0 : l.label) ?? "";
1388
1434
  },
1389
- label: (f) => {
1390
- var T;
1391
- return $(((T = f.parsed) == null ? void 0 : T.r) ?? f.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 _() {
1398
- i("botaoAcao");
1443
+ function tt() {
1444
+ p("botaoAcao");
1399
1445
  }
1400
- return (f, T) => (l(), s("div", {
1446
+ return (d, l) => (u(), f("div", {
1401
1447
  ref_key: "cardRef",
1402
- ref: w,
1403
- class: lt(["card-polar p-4 flex flex-column", q.value]),
1404
- style: h(a(C))
1448
+ ref: A,
1449
+ class: ot(["card-polar p-4 flex flex-column", w.value]),
1450
+ style: x(s(k))
1405
1451
  }, [
1406
- S("div", De, [
1407
- f.$slots.legenda || t.legenda || f.$slots.sublegenda || t.sublegenda ? (l(), s("div", Ie, [
1408
- f.$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: h({ color: a(o).text, opacity: 0.95 })
1457
+ style: x({ color: s(o).text, opacity: 0.95 })
1412
1458
  }, [
1413
- F(f.$slots, "legenda", {}, () => [
1414
- X(A(t.legenda), 1)
1459
+ L(d.$slots, "legenda", {}, () => [
1460
+ X(B(t.legenda), 1)
1415
1461
  ], !0)
1416
- ], 4)) : g("", !0),
1417
- f.$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: h({ color: a(o).muted })
1466
+ style: x({ color: s(o).muted })
1421
1467
  }, [
1422
- F(f.$slots, "sublegenda", {}, () => [
1423
- X(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
- f.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", We, [
1428
- F(f.$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: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
1433
- onClick: _
1478
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
1479
+ onClick: tt
1434
1480
  }, [
1435
- S("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: h({ color: a(o).muted, borderColor: a(N)(a(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
1491
  onClick: R,
1446
- innerHTML: a(P)
1447
- }, null, 12, Oe)) : g("", !0)
1448
- ])) : g("", !0)
1492
+ innerHTML: s(D)
1493
+ }, null, 12, Je)) : y("", !0)
1494
+ ])) : y("", !0)
1449
1495
  ]),
1450
- S("div", Xe, [
1451
- S("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: h({ color: a(o).muted, borderColor: a(N)(a(o).muted, 0.25) })
1501
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).muted, 0.25) })
1456
1502
  }, [
1457
- S("span", null, A(t.rotuloCategoria), 1),
1458
- S("span", Je, A(t.rotuloQuantidade), 1)
1459
- ], 4)) : g("", !0),
1460
- (l(!0), s(mt, null, yt(t.data, (M, G) => (l(), s("div", {
1461
- key: G,
1462
- class: "nc-tabela-linha flex align-items-center justify-content-between",
1463
- style: h({ color: a(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
- S("span", Qe, [
1527
+ S("span", Ze, [
1466
1528
  S("span", {
1467
1529
  class: "nc-bolinha",
1468
- style: h({ background: L.value[G] })
1530
+ style: x({ background: T.value[a] })
1469
1531
  }, null, 4),
1470
- S("span", null, A(M.rotulo), 1)
1532
+ S("span", null, B(n.rotulo), 1)
1471
1533
  ]),
1472
- S("span", Ue, A(a($)(M.quantidade)), 1)
1473
- ], 4))), 128))
1534
+ S("span", _e, B(s($)(n.quantidade)), 1)
1535
+ ], 46, Ke))), 128))
1474
1536
  ]),
1475
- S("div", Ge, [
1476
- S("div", Ze, [
1537
+ S("div", to, [
1538
+ S("div", eo, [
1477
1539
  ft(st, {
1478
1540
  type: "polarArea",
1479
- data: Q.value,
1541
+ data: J.value,
1480
1542
  options: K.value,
1481
1543
  height: t.height
1482
1544
  }, null, 8, ["data", "options", "height"]),
1483
- f.$slots.titulo || t.titulo || f.$slots.descricao || t.descricao ? (l(), s("div", Ke, [
1484
- f.$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: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1549
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1488
1550
  }, [
1489
- F(f.$slots, "titulo", {}, () => [
1490
- X(A(t.titulo), 1)
1551
+ L(d.$slots, "titulo", {}, () => [
1552
+ X(B(t.titulo), 1)
1491
1553
  ], !0)
1492
- ], 4)) : g("", !0),
1493
- f.$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: h({ color: a(o).muted })
1558
+ style: x({ color: s(o).muted })
1497
1559
  }, [
1498
- F(f.$slots, "descricao", {}, () => [
1499
- X(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
- f.$slots.footer ? (l(), s("div", _e, [
1507
- F(f.$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-94cbf2b0"]]), 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
- }, mo = { key: 0 }, yo = {
1588
+ }, xo = { key: 0 }, vo = {
1527
1589
  key: 1,
1528
1590
  class: "card-progresso__footer mt-3"
1529
- }, ho = {
1591
+ }, $o = {
1530
1592
  __name: "CardProgresso",
1531
1593
  props: {
1532
1594
  legenda: { type: String, default: null },
@@ -1581,41 +1643,39 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1581
1643
  },
1582
1644
  emits: ["botaoAcao", "exportado"],
1583
1645
  setup(t, { emit: m }) {
1584
- const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null), P = dt;
1646
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), { formatar: $ } = pt(e), A = et(null), D = dt;
1585
1647
  async function R() {
1586
- await ct(w.value, {
1648
+ await ct(A.value, {
1587
1649
  nomeArquivo: e.nomeArquivoExport,
1588
1650
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1589
- }), i("exportado");
1651
+ }), p("exportado");
1590
1652
  }
1591
- const q = z(() => `card-progresso--${e.direcao}`), L = z(() => {
1592
- const d = ht(e.corDetalhes, e.data.length);
1593
- return e.data.map((r, b) => {
1594
- const x = Number(r.meta ?? e.metaPadrao) || 0, c = Number(r.quantidade) || 0, u = r.cor ?? d[b], n = r.modo === "reducao";
1595
- let y;
1596
- if (n) {
1597
- const v = Number(r.valor_referencia) || 0, j = v - x;
1598
- y = j > 0 ? Math.max(0, Math.min(100, (v - c) / j * 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
- y = x > 0 ? Math.max(0, Math.min(100, c / x * 100)) : 0;
1601
- return { rotulo: r.rotulo, quantidade: c, meta: x, valorReferencia: r.valor_referencia ?? null, cor: u, percentual: y, 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 = z(
1665
+ }), J = M(
1604
1666
  () => typeof e.alturaBarra == "number" ? `${e.alturaBarra}px` : e.alturaBarra
1605
- ), W = z(
1667
+ ), O = M(
1606
1668
  () => typeof e.raioBarra == "number" ? `${e.raioBarra}px` : e.raioBarra
1607
- ), K = z(() => L.value.reduce((d, r) => d + r.quantidade, 0)), _ = z(() => L.value.reduce((d, r) => d + r.meta, 0)), f = z(() => {
1608
- if (!L.value.length) return 0;
1609
- const d = (b) => b.reducao && b.valorReferencia != null ? Math.max(0, Number(b.valorReferencia) - b.meta) : b.meta, r = L.value.reduce((b, x) => b + d(x), 0);
1610
- return r <= 0 ? 0 : L.value.reduce((b, x) => b + x.percentual * d(x), 0) / r;
1611
- }), T = z(() => L.value.every((d) => d.reducao)), M = z(() => {
1612
- const d = Math.min(f.value, 100), r = Math.max(0, 100 - d), b = T.value ? e.corExcesso : e.corDetalhes;
1669
+ );
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;
1613
1673
  return {
1614
1674
  labels: ["Progresso", "Restante"],
1615
1675
  datasets: [
1616
1676
  {
1617
- data: [d, r],
1618
- backgroundColor: [b, N(o.value.muted, 0.15)],
1677
+ data: [n, a],
1678
+ backgroundColor: [r, j(o.value.muted, 0.15)],
1619
1679
  borderWidth: 0,
1620
1680
  borderColor: "transparent",
1621
1681
  hoverOffset: 0,
@@ -1623,7 +1683,7 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1623
1683
  }
1624
1684
  ]
1625
1685
  };
1626
- }), G = z(() => ({
1686
+ }), K = M(() => ({
1627
1687
  responsive: !0,
1628
1688
  maintainAspectRatio: !1,
1629
1689
  cutout: e.cutout,
@@ -1635,171 +1695,194 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1635
1695
  tooltip: { enabled: !1 }
1636
1696
  }
1637
1697
  }));
1638
- function p() {
1639
- i("botaoAcao");
1698
+ function tt(n) {
1699
+ const a = A.value;
1700
+ if (!a) return;
1701
+ getComputedStyle(a).position === "static" && (a.style.position = "relative");
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");
1709
+ h && Object.assign(h.style, {
1710
+ top: "",
1711
+ bottom: "-5px",
1712
+ borderLeft: "",
1713
+ borderTop: "",
1714
+ borderRight: "1px solid rgba(15,23,42,.06)",
1715
+ borderBottom: "1px solid rgba(15,23,42,.06)"
1716
+ }), r.style.left = c + "px", r.style.top = b + "px", r.style.visibility = "visible";
1717
+ }
1718
+ function d() {
1719
+ var a;
1720
+ const n = (a = A.value) == null ? void 0 : a.querySelector(".nc-tt");
1721
+ n && (n.style.opacity = "0");
1640
1722
  }
1641
- return (d, r) => (l(), s("div", {
1723
+ function l() {
1724
+ p("botaoAcao");
1725
+ }
1726
+ return (n, a) => (u(), f("div", {
1642
1727
  ref_key: "cardRef",
1643
- ref: w,
1644
- class: lt(["card-progresso p-4 flex flex-column", q.value]),
1645
- style: h(a(C))
1728
+ ref: A,
1729
+ class: ot(["card-progresso p-4 flex flex-column", w.value]),
1730
+ style: x(s(k))
1646
1731
  }, [
1647
- S("div", oo, [
1648
- d.$slots.legenda || t.legenda || d.$slots.sublegenda || t.sublegenda ? (l(), s("div", ao, [
1649
- d.$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", {
1650
1735
  key: 0,
1651
1736
  class: "text-xs font-medium",
1652
- style: h({ color: a(o).text, opacity: 0.95 })
1737
+ style: x({ color: s(o).text, opacity: 0.95 })
1653
1738
  }, [
1654
- F(d.$slots, "legenda", {}, () => [
1655
- X(A(t.legenda), 1)
1739
+ L(n.$slots, "legenda", {}, () => [
1740
+ X(B(t.legenda), 1)
1656
1741
  ], !0)
1657
- ], 4)) : g("", !0),
1658
- d.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1742
+ ], 4)) : y("", !0),
1743
+ n.$slots.sublegenda || t.sublegenda ? (u(), f("div", {
1659
1744
  key: 1,
1660
1745
  class: "text-xs",
1661
- style: h({ color: a(o).muted })
1746
+ style: x({ color: s(o).muted })
1662
1747
  }, [
1663
- F(d.$slots, "sublegenda", {}, () => [
1664
- X(A(t.sublegenda), 1)
1748
+ L(n.$slots, "sublegenda", {}, () => [
1749
+ X(B(t.sublegenda), 1)
1665
1750
  ], !0)
1666
- ], 4)) : g("", !0)
1667
- ])) : g("", !0),
1668
- d.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ro, [
1669
- F(d.$slots, "actions", {}, () => [
1670
- 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", {
1671
1756
  key: 0,
1672
1757
  class: "nc-btn inline-flex align-items-center",
1673
- style: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
1674
- onClick: p
1758
+ style: x({ color: s(o).text, borderColor: s(j)(s(o).text, 0.18) }),
1759
+ onClick: l
1675
1760
  }, [
1676
- S("span", null, A(t.textoBotao), 1)
1677
- ], 4)) : g("", !0)
1761
+ S("span", null, B(t.textoBotao), 1)
1762
+ ], 4)) : y("", !0)
1678
1763
  ], !0),
1679
- t.exportar ? (l(), s("button", {
1764
+ t.exportar ? (u(), f("button", {
1680
1765
  key: 0,
1681
1766
  type: "button",
1682
1767
  class: "nc-exportar inline-flex align-items-center justify-content-center",
1683
- style: h({ color: a(o).muted, borderColor: a(N)(a(o).text, 0.18) }),
1768
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).text, 0.18) }),
1684
1769
  title: "Exportar como imagem",
1685
1770
  "aria-label": "Exportar como imagem",
1686
1771
  onClick: R,
1687
- innerHTML: a(P)
1688
- }, null, 12, no)) : g("", !0)
1689
- ])) : g("", !0)
1772
+ innerHTML: s(D)
1773
+ }, null, 12, co)) : y("", !0)
1774
+ ])) : y("", !0)
1690
1775
  ]),
1691
- d.$slots.titulo || t.titulo || d.$slots.descricao || t.descricao ? (l(), s("div", lo, [
1692
- d.$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", {
1693
1778
  key: 0,
1694
1779
  class: "m-0 text-3xl font-semibold",
1695
- style: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1780
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1696
1781
  }, [
1697
- F(d.$slots, "titulo", {}, () => [
1698
- X(A(t.titulo), 1)
1782
+ L(n.$slots, "titulo", {}, () => [
1783
+ X(B(t.titulo), 1)
1699
1784
  ], !0)
1700
- ], 4)) : g("", !0),
1701
- d.$slots.descricao || t.descricao ? (l(), s("div", {
1785
+ ], 4)) : y("", !0),
1786
+ n.$slots.descricao || t.descricao ? (u(), f("div", {
1702
1787
  key: 1,
1703
1788
  class: "text-sm mt-1",
1704
- style: h({ color: a(o).muted })
1789
+ style: x({ color: s(o).muted })
1705
1790
  }, [
1706
- F(d.$slots, "descricao", {}, () => [
1707
- X(A(t.descricao), 1)
1791
+ L(n.$slots, "descricao", {}, () => [
1792
+ X(B(t.descricao), 1)
1708
1793
  ], !0)
1709
- ], 4)) : g("", !0)
1710
- ])) : g("", !0),
1711
- S("div", so, [
1712
- t.formato === "circular" ? (l(), s("div", io, [
1713
- S("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, [
1714
1799
  ft(st, {
1715
1800
  type: "doughnut",
1716
- data: M.value,
1717
- options: G.value,
1801
+ data: Z.value,
1802
+ options: K.value,
1718
1803
  height: t.height
1719
1804
  }, null, 8, ["data", "options", "height"]),
1720
- S("div", uo, [
1805
+ S("div", yo, [
1721
1806
  S("div", {
1722
1807
  class: "nc-centro-titulo",
1723
- style: h({ color: T.value ? e.corExcesso : a(o).text })
1724
- }, A(Math.round(f.value)) + "% ", 5),
1725
- S("div", {
1726
- class: "nc-centro-desc",
1727
- style: h({ color: a(o).muted })
1728
- }, A(a($)(K.value)) + " / " + A(a($)(_.value)), 5)
1808
+ style: x({ color: Q.value ? e.corExcesso : s(o).text })
1809
+ }, B(Math.round(_.value)) + "% ", 5)
1729
1810
  ])
1730
1811
  ])
1731
- ])) : g("", !0),
1732
- S("div", fo, [
1733
- (l(!0), s(mt, null, yt(L.value, (b, x) => (l(), s("div", {
1734
- key: x,
1812
+ ])) : y("", !0),
1813
+ S("div", mo, [
1814
+ (u(!0), f(bt, null, ht(T.value, (r, v) => (u(), f("div", {
1815
+ key: v,
1735
1816
  class: "card-progresso__item flex flex-column"
1736
1817
  }, [
1737
- S("div", po, [
1818
+ S("div", bo, [
1738
1819
  S("span", {
1739
1820
  class: "card-progresso__item-rotulo inline-flex align-items-center gap-2",
1740
- style: h({ color: a(o).text })
1821
+ style: x({ color: s(o).text })
1741
1822
  }, [
1742
1823
  S("span", {
1743
1824
  class: "nc-bolinha",
1744
- style: h({ background: b.cor })
1825
+ style: x({ background: r.cor })
1745
1826
  }, null, 4),
1746
- S("span", null, A(b.rotulo), 1),
1747
- b.reducao ? (l(), s("span", {
1827
+ S("span", null, B(r.rotulo), 1),
1828
+ r.reducao ? (u(), f("span", {
1748
1829
  key: 0,
1749
1830
  class: "card-progresso__item-modo",
1750
- style: h({ color: a(o).muted })
1751
- }, "↓", 4)) : g("", !0)
1831
+ style: x({ color: s(o).muted }),
1832
+ onMouseenter: tt,
1833
+ onMouseleave: d
1834
+ }, "↓", 36)) : y("", !0)
1752
1835
  ], 4),
1753
- t.mostrarValor || t.mostrarPercentual ? (l(), s("span", go, [
1754
- t.mostrarValor ? (l(), s("span", {
1836
+ t.mostrarValor || t.mostrarPercentual ? (u(), f("span", ho, [
1837
+ t.mostrarValor ? (u(), f("span", {
1755
1838
  key: 0,
1756
1839
  class: "card-progresso__item-nums",
1757
- style: h({ color: a(o).muted })
1840
+ style: x({ color: s(o).muted })
1758
1841
  }, [
1759
- X(A(a($)(b.quantidade)), 1),
1760
- b.meta ? (l(), s("span", mo, " / " + A(a($)(b.meta)), 1)) : g("", !0)
1761
- ], 4)) : g("", !0),
1762
- 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", {
1763
1846
  key: 1,
1764
1847
  class: "card-progresso__item-pct",
1765
- style: h({ background: a(N)(b.cor, 0.12), color: b.cor })
1766
- }, A(Math.round(b.percentual)) + "% ", 5)) : g("", !0)
1767
- ])) : 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)
1768
1851
  ]),
1769
1852
  S("div", {
1770
1853
  class: "card-progresso__trilha w-full",
1771
- style: h({
1772
- height: Q.value,
1773
- borderRadius: W.value,
1774
- background: b.reducao ? a(N)(e.corExcesso, 0.18) : a(N)(a(o).muted, 0.15)
1854
+ style: x({
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)
1775
1858
  })
1776
1859
  }, [
1777
1860
  S("div", {
1778
1861
  class: "card-progresso__preenchimento",
1779
- style: h({ width: b.percentual + "%", background: b.cor, borderRadius: W.value })
1862
+ style: x({ width: r.percentual + "%", background: r.cor, borderRadius: O.value })
1780
1863
  }, null, 4)
1781
1864
  ], 4)
1782
1865
  ]))), 128))
1783
1866
  ])
1784
1867
  ]),
1785
- d.$slots.footer ? (l(), s("div", yo, [
1786
- F(d.$slots, "footer", {}, void 0, !0)
1787
- ])) : g("", !0)
1868
+ n.$slots.footer ? (u(), f("div", vo, [
1869
+ L(n.$slots, "footer", {}, void 0, !0)
1870
+ ])) : y("", !0)
1788
1871
  ], 6));
1789
1872
  }
1790
- }, bo = /* @__PURE__ */ at(ho, [["__scopeId", "data-v-36cee8f0"]]), xo = {
1873
+ }, So = /* @__PURE__ */ nt($o, [["__scopeId", "data-v-f738fbcc"]]), Co = {
1791
1874
  key: 0,
1792
1875
  class: "card-base__topo"
1793
- }, vo = ["innerHTML"], $o = { class: "card-base__legendas flex flex-column" }, So = {
1876
+ }, ko = ["innerHTML"], Bo = { class: "card-base__legendas flex flex-column" }, Ao = {
1794
1877
  key: 1,
1795
1878
  class: "card-base__titulos flex flex-column"
1796
- }, ko = {
1879
+ }, wo = {
1797
1880
  key: 2,
1798
1881
  class: "card-base__acao flex"
1799
- }, Co = {
1882
+ }, Ro = {
1800
1883
  key: 3,
1801
1884
  class: "card-base__footer"
1802
- }, Ao = {
1885
+ }, To = {
1803
1886
  __name: "CardBase",
1804
1887
  props: {
1805
1888
  legenda: { type: String, default: null },
@@ -1824,116 +1907,116 @@ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1824
1907
  },
1825
1908
  emits: ["botaoAcao", "exportado"],
1826
1909
  setup(t, { emit: m }) {
1827
- const e = t, i = m, { palette: o, cardStyle: C } = it(e), $ = ot(null), w = dt;
1828
- function P() {
1829
- i("botaoAcao");
1910
+ const e = t, p = m, { palette: o, cardStyle: k } = it(e), $ = et(null), A = dt;
1911
+ function D() {
1912
+ p("botaoAcao");
1830
1913
  }
1831
1914
  async function R() {
1832
1915
  await ct($.value, {
1833
1916
  nomeArquivo: e.nomeArquivoExport,
1834
1917
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1835
- }), i("exportado");
1918
+ }), p("exportado");
1836
1919
  }
1837
- return (q, L) => (l(), s("div", {
1920
+ return (w, T) => (u(), f("div", {
1838
1921
  ref_key: "cardRef",
1839
1922
  ref: $,
1840
- class: lt(["card-base flex flex-column", `card-base--${t.alinhamento}`]),
1841
- style: h(a(C))
1923
+ class: ot(["card-base flex flex-column", `card-base--${t.alinhamento}`]),
1924
+ style: x(s(k))
1842
1925
  }, [
1843
- t.exportar ? (l(), s("div", xo, [
1926
+ t.exportar ? (u(), f("div", Co, [
1844
1927
  S("button", {
1845
1928
  type: "button",
1846
1929
  class: "nc-exportar card-base__exportar inline-flex align-items-center justify-content-center",
1847
- style: h({ color: a(o).muted, borderColor: a(N)(a(o).text === "inherit" ? "#0F172A" : a(o).text, 0.18) }),
1930
+ style: x({ color: s(o).muted, borderColor: s(j)(s(o).text === "inherit" ? "#0F172A" : s(o).text, 0.18) }),
1848
1931
  title: "Exportar como imagem",
1849
1932
  "aria-label": "Exportar como imagem",
1850
1933
  onClick: R,
1851
- innerHTML: a(w)
1852
- }, null, 12, vo)
1853
- ])) : g("", !0),
1854
- S("div", $o, [
1855
- q.$slots.legenda || t.legenda ? (l(), s("div", {
1934
+ innerHTML: s(A)
1935
+ }, null, 12, ko)
1936
+ ])) : y("", !0),
1937
+ S("div", Bo, [
1938
+ w.$slots.legenda || t.legenda ? (u(), f("div", {
1856
1939
  key: 0,
1857
1940
  class: "card-base__legenda font-medium text-xs",
1858
- style: h({ color: a(o).text })
1941
+ style: x({ color: s(o).text })
1859
1942
  }, [
1860
- F(q.$slots, "legenda", {}, () => [
1861
- X(A(t.legenda), 1)
1943
+ L(w.$slots, "legenda", {}, () => [
1944
+ X(B(t.legenda), 1)
1862
1945
  ], !0)
1863
- ], 4)) : g("", !0),
1864
- q.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1946
+ ], 4)) : y("", !0),
1947
+ w.$slots.sublegenda || t.sublegenda ? (u(), f("div", {
1865
1948
  key: 1,
1866
1949
  class: "card-base__sublegenda text-xs",
1867
- style: h({ color: a(o).muted })
1950
+ style: x({ color: s(o).muted })
1868
1951
  }, [
1869
- F(q.$slots, "sublegenda", {}, () => [
1870
- X(A(t.sublegenda), 1)
1952
+ L(w.$slots, "sublegenda", {}, () => [
1953
+ X(B(t.sublegenda), 1)
1871
1954
  ], !0)
1872
- ], 4)) : g("", !0)
1955
+ ], 4)) : y("", !0)
1873
1956
  ]),
1874
- q.$slots.titulo || t.titulo || q.$slots.descricao || t.descricao ? (l(), s("div", So, [
1875
- q.$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", {
1876
1959
  key: 0,
1877
1960
  class: "card-base__titulo m-0 text-3xl font-semibold",
1878
- style: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1961
+ style: x({ color: s(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1879
1962
  }, [
1880
- F(q.$slots, "titulo", {}, () => [
1881
- X(A(t.titulo), 1)
1963
+ L(w.$slots, "titulo", {}, () => [
1964
+ X(B(t.titulo), 1)
1882
1965
  ], !0)
1883
- ], 4)) : g("", !0),
1884
- q.$slots.descricao || t.descricao ? (l(), s("div", {
1966
+ ], 4)) : y("", !0),
1967
+ w.$slots.descricao || t.descricao ? (u(), f("div", {
1885
1968
  key: 1,
1886
1969
  class: "text-sm",
1887
- style: h({ color: a(o).muted })
1970
+ style: x({ color: s(o).muted })
1888
1971
  }, [
1889
- F(q.$slots, "descricao", {}, () => [
1890
- X(A(t.descricao), 1)
1972
+ L(w.$slots, "descricao", {}, () => [
1973
+ X(B(t.descricao), 1)
1891
1974
  ], !0)
1892
- ], 4)) : g("", !0)
1893
- ])) : g("", !0),
1894
- q.$slots.acao || t.botaoVisivel ? (l(), s("div", ko, [
1895
- F(q.$slots, "acao", {}, () => [
1896
- 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", {
1897
1980
  key: 0,
1898
1981
  type: "button",
1899
1982
  class: "card-base__link text-xs inline-flex align-items-center",
1900
- style: h({ color: a(o).text }),
1901
- onClick: P
1983
+ style: x({ color: s(o).text }),
1984
+ onClick: D
1902
1985
  }, [
1903
- S("span", null, A(t.textoBotao), 1),
1904
- L[0] || (L[0] = S("span", {
1986
+ S("span", null, B(t.textoBotao), 1),
1987
+ T[0] || (T[0] = S("span", {
1905
1988
  class: "card-base__chevron",
1906
1989
  "aria-hidden": "true"
1907
1990
  }, "›", -1))
1908
- ], 4)) : g("", !0)
1991
+ ], 4)) : y("", !0)
1909
1992
  ], !0)
1910
- ])) : g("", !0),
1911
- q.$slots.footer ? (l(), s("div", Co, [
1912
- F(q.$slots, "footer", {}, void 0, !0)
1913
- ])) : g("", !0)
1993
+ ])) : y("", !0),
1994
+ w.$slots.footer ? (u(), f("div", Ro, [
1995
+ L(w.$slots, "footer", {}, void 0, !0)
1996
+ ])) : y("", !0)
1914
1997
  ], 6));
1915
1998
  }
1916
- }, Bo = /* @__PURE__ */ at(Ao, [["__scopeId", "data-v-61091b7c"]]), To = {
1999
+ }, qo = /* @__PURE__ */ nt(To, [["__scopeId", "data-v-d1b84008"]]), Lo = {
1917
2000
  install(t) {
1918
- t.component("ChartBase", st), t.component("CardBase", Bo), t.component("CardLinhas", me), t.component("CardPizza", Ee), t.component("CardBarra", Pe), t.component("CardPolar", eo), t.component("CardProgresso", bo);
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);
1919
2002
  }
1920
2003
  };
1921
2004
  export {
1922
- Pe as CardBarra,
1923
- Bo as CardBase,
1924
- me as CardLinhas,
1925
- Ee as CardPizza,
1926
- eo as CardPolar,
1927
- bo 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,
1928
2011
  st as ChartBase,
1929
2012
  dt as ICONE_EXPORTAR_SVG,
1930
- nt as clampHorizontal,
2013
+ rt as clampHorizontal,
1931
2014
  gt as criarTooltipEl,
1932
- To as default,
2015
+ Lo as default,
1933
2016
  ct as exportarElementoComoImagem,
1934
- ht as gerarPaleta,
1935
- rt as prepararTooltipParent,
1936
- N as toRgba,
2017
+ xt as gerarPaleta,
2018
+ lt as prepararTooltipParent,
2019
+ j as toRgba,
1937
2020
  pt as useFormatadorValor,
1938
2021
  it as useTema
1939
2022
  };