@selectwin/kit 0.1.22 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -28,25 +28,25 @@ function Ks({ className: t, theme: n, glowTarget: l }) {
28
28
  if (!s) return;
29
29
  const a = s.getContext("2d");
30
30
  if (!a) return;
31
- const r = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, d = n === "dark", o = 30, i = 1.2, h = 160, u = 8, f = 2.9, g = 0.32, v = 1.4, y = 18, x = Math.PI * 2, $ = getComputedStyle(s), [_, p, b] = Cl($, "--select-dot", d ? [235, 238, 255] : [64, 68, 92]), [S, k, M] = Ll($.getPropertyValue("--select-primary"), d ? [255, 255, 255] : [33, 37, 41]);
32
- let w = 0, N = 0, C = [], L = 0, E = 0, A = null, F = 0;
31
+ const r = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, d = n === "dark", o = 30, i = 1.2, h = 160, u = 8, f = 2.9, g = 0.32, v = 1.4, y = 18, x = Math.PI * 2, $ = getComputedStyle(s), [_, p, b] = Cl($, "--select-dot", d ? [235, 238, 255] : [64, 68, 92]), [w, k, M] = Ll($.getPropertyValue("--select-primary"), d ? [255, 255, 255] : [33, 37, 41]);
32
+ let S = 0, N = 0, C = [], L = 0, E = 0, A = null, F = 0;
33
33
  const B = { x: 0, y: 0 };
34
- let T = 0, P = 0, O = -10;
35
- const W = Me.quickTo(B, "x", { duration: 0.5, ease: "power3.out" }), Z = Me.quickTo(B, "y", { duration: 0.5, ease: "power3.out" });
34
+ let W = 0, P = 0, O = -10;
35
+ const T = Me.quickTo(B, "x", { duration: 0.5, ease: "power3.out" }), Z = Me.quickTo(B, "y", { duration: 0.5, ease: "power3.out" });
36
36
  function G() {
37
37
  const z = s.getBoundingClientRect();
38
- L = z.left, E = z.top, w = z.width, N = z.height;
38
+ L = z.left, E = z.top, S = z.width, N = z.height;
39
39
  const ue = Math.min(window.devicePixelRatio || 1, 2);
40
- s.width = Math.round(w * ue), s.height = Math.round(N * ue), a.setTransform(ue, 0, 0, ue, 0, 0);
40
+ s.width = Math.round(S * ue), s.height = Math.round(N * ue), a.setTransform(ue, 0, 0, ue, 0, 0);
41
41
  const ie = s.closest(".select-auth") ?? document;
42
42
  A = l ? ie.querySelector(l) : null, C = [];
43
- const he = Math.ceil(w / o) + 1, de = Math.ceil(N / o) + 1, ae = (w - (he - 1) * o) / 2, $e = (N - (de - 1) * o) / 2;
43
+ const he = Math.ceil(S / o) + 1, de = Math.ceil(N / o) + 1, ae = (S - (he - 1) * o) / 2, $e = (N - (de - 1) * o) / 2;
44
44
  for (let Ce = 0; Ce < de; Ce++)
45
45
  for (let Le = 0; Le < he; Le++) {
46
46
  const Ne = ae + Le * o, Ie = $e + Ce * o;
47
47
  C.push({ x: Ne, y: Ie, phase: (Ne + Ie) * 0.013 });
48
48
  }
49
- B.x === 0 && B.y === 0 && (B.x = T = w / 2, B.y = P = N / 2);
49
+ B.x === 0 && B.y === 0 && (B.x = W = S / 2, B.y = P = N / 2);
50
50
  }
51
51
  function J(z, ue, ie, he, de) {
52
52
  if (!A) return;
@@ -58,24 +58,24 @@ function Ks({ className: t, theme: n, glowTarget: l }) {
58
58
  F = Fe;
59
59
  }
60
60
  function re() {
61
- a.clearRect(0, 0, w, N), a.fillStyle = `rgba(${_},${p},${b},${g})`;
61
+ a.clearRect(0, 0, S, N), a.fillStyle = `rgba(${_},${p},${b},${g})`;
62
62
  for (const z of C)
63
63
  a.beginPath(), a.arc(z.x, z.y, i, 0, x), a.fill();
64
64
  A == null || A.style.setProperty("--select-card-glow", "0");
65
65
  }
66
66
  function me(z) {
67
67
  let ue, ie;
68
- z - O < v ? (ue = T, ie = P) : (ue = w * 0.5 + Math.cos(z * 0.45) * w * 0.3, ie = N * 0.5 + Math.sin(z * 0.6) * N * 0.28), W(ue), Z(ie);
68
+ z - O < v ? (ue = W, ie = P) : (ue = S * 0.5 + Math.cos(z * 0.45) * S * 0.3, ie = N * 0.5 + Math.sin(z * 0.6) * N * 0.28), T(ue), Z(ie);
69
69
  const he = B.x, de = B.y;
70
- a.clearRect(0, 0, w, N);
70
+ a.clearRect(0, 0, S, N);
71
71
  for (let ae = 0; ae < C.length; ae++) {
72
- const $e = C[ae], Ce = $e.x - he, Le = $e.y - de, Ne = Math.sqrt(Ce * Ce + Le * Le), Ie = Ne < h ? 1 - Ne / h : 0, ke = Ie * Ie, Ue = Math.sin(z * 1.4 + $e.phase) * 0.5 + 0.5, je = ke * u, Fe = Ne > 1e-4 ? 1 / Ne : 0, I = $e.x - Ce * Fe * je, V = $e.y - Le * Fe * je, U = 1 + ke * (f - 1) + Ue * 0.14, oe = Math.min(1, g + Ue * 0.08 + ke * (1 - g)), ee = _ + (S - _) * ke | 0, se = p + (k - p) * ke | 0, pe = b + (M - b) * ke | 0;
73
- ke > 0.12 ? (a.shadowColor = `rgba(${S},${k},${M},${0.6 * ke})`, a.shadowBlur = 12 * ke) : a.shadowBlur = 0, a.beginPath(), a.arc(I, V, i * U, 0, x), a.fillStyle = `rgba(${ee},${se},${pe},${oe})`, a.fill();
72
+ const $e = C[ae], Ce = $e.x - he, Le = $e.y - de, Ne = Math.sqrt(Ce * Ce + Le * Le), Ie = Ne < h ? 1 - Ne / h : 0, ke = Ie * Ie, Ue = Math.sin(z * 1.4 + $e.phase) * 0.5 + 0.5, je = ke * u, Fe = Ne > 1e-4 ? 1 / Ne : 0, I = $e.x - Ce * Fe * je, V = $e.y - Le * Fe * je, U = 1 + ke * (f - 1) + Ue * 0.14, oe = Math.min(1, g + Ue * 0.08 + ke * (1 - g)), ee = _ + (w - _) * ke | 0, se = p + (k - p) * ke | 0, pe = b + (M - b) * ke | 0;
73
+ ke > 0.12 ? (a.shadowColor = `rgba(${w},${k},${M},${0.6 * ke})`, a.shadowBlur = 12 * ke) : a.shadowBlur = 0, a.beginPath(), a.arc(I, V, i * U, 0, x), a.fillStyle = `rgba(${ee},${se},${pe},${oe})`, a.fill();
74
74
  }
75
- a.shadowBlur = 0, J(he, de, S, k, M);
75
+ a.shadowBlur = 0, J(he, de, w, k, M);
76
76
  }
77
77
  function Se(z) {
78
- T = z.clientX - L, P = z.clientY - E, O = Me.ticker.time;
78
+ W = z.clientX - L, P = z.clientY - E, O = Me.ticker.time;
79
79
  }
80
80
  function ne() {
81
81
  const z = s.getBoundingClientRect();
@@ -120,12 +120,12 @@ const El = (t) => {
120
120
  }
121
121
  }
122
122
  function h(u, f) {
123
- const { ctx: g, pointer: v } = t, [y, x, $] = t.ink, [_, p, b] = t.accent, S = t.w(), k = t.h();
124
- g.clearRect(0, 0, S, k);
125
- const M = v.x, w = v.y;
123
+ const { ctx: g, pointer: v } = t, [y, x, $] = t.ink, [_, p, b] = t.accent, w = t.w(), k = t.h();
124
+ g.clearRect(0, 0, w, k);
125
+ const M = v.x, S = v.y;
126
126
  for (const N of d) {
127
- const C = N.x - M, L = N.y - w, E = Math.hypot(C, L), A = f > 0 && E < 150 ? 1 - E / 150 : 0, F = A * A * f, B = Math.sin(u * 1.1 + N.phase) * 0.5 + 0.5, T = F * 6, P = E > 1e-3 ? 1 / E : 0, O = N.x - C * P * T, W = N.y - L * P * T, Z = 1 + F * (2.4 - 1) + B * 0.1, G = Math.min(1, 0.3 + B * 0.06 + F * (1 - 0.3)), J = y + (_ - y) * F | 0, re = x + (p - x) * F | 0, me = $ + (b - $) * F | 0;
128
- t.dark && F > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * F})`, g.shadowBlur = 10 * F) : g.shadowBlur = 0, g.beginPath(), g.arc(O, W, 1.2 * Z, 0, tt), g.fillStyle = `rgba(${J},${re},${me},${G})`, g.fill();
127
+ const C = N.x - M, L = N.y - S, E = Math.hypot(C, L), A = f > 0 && E < 150 ? 1 - E / 150 : 0, F = A * A * f, B = Math.sin(u * 1.1 + N.phase) * 0.5 + 0.5, W = F * 6, P = E > 1e-3 ? 1 / E : 0, O = N.x - C * P * W, T = N.y - L * P * W, Z = 1 + F * (2.4 - 1) + B * 0.1, G = Math.min(1, 0.3 + B * 0.06 + F * (1 - 0.3)), J = y + (_ - y) * F | 0, re = x + (p - x) * F | 0, me = $ + (b - $) * F | 0;
128
+ t.dark && F > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * F})`, g.shadowBlur = 10 * F) : g.shadowBlur = 0, g.beginPath(), g.arc(O, T, 1.2 * Z, 0, tt), g.fillStyle = `rgba(${J},${re},${me},${G})`, g.fill();
129
129
  }
130
130
  g.shadowBlur = 0;
131
131
  }
@@ -155,8 +155,8 @@ const El = (t) => {
155
155
  i.lineWidth = 1;
156
156
  for (let p = 0; p < a.length; p++) {
157
157
  const b = a[p];
158
- for (let S = p + 1; S < a.length; S++) {
159
- const k = a[S], M = b.x - k.x, w = b.y - k.y, N = M * M + w * w;
158
+ for (let w = p + 1; w < a.length; w++) {
159
+ const k = a[w], M = b.x - k.x, S = b.y - k.y, N = M * M + S * S;
160
160
  if (N < 132 * 132) {
161
161
  const C = 1 - Math.sqrt(N) / 132;
162
162
  i.strokeStyle = `rgba(${u},${f},${g},${(C * C * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo(b.x, b.y), i.lineTo(k.x, k.y), i.stroke();
@@ -167,11 +167,11 @@ const El = (t) => {
167
167
  for (const p of a) {
168
168
  let b = 0;
169
169
  if (o) {
170
- const w = Math.hypot(p.x - $, p.y - _);
171
- w < 175 && (b = 1 - w / 175, i.strokeStyle = `rgba(${v},${y},${x},${(b * b * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo($, _), i.lineTo(p.x, p.y), i.stroke());
170
+ const S = Math.hypot(p.x - $, p.y - _);
171
+ S < 175 && (b = 1 - S / 175, i.strokeStyle = `rgba(${v},${y},${x},${(b * b * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo($, _), i.lineTo(p.x, p.y), i.stroke());
172
172
  }
173
- const S = u + (v - u) * b | 0, k = f + (y - f) * b | 0, M = g + (x - g) * b | 0;
174
- t.dark && b > 0.2 ? (i.shadowColor = `rgba(${v},${y},${x},${0.6 * b})`, i.shadowBlur = 10 * b) : i.shadowBlur = 0, i.beginPath(), i.arc(p.x, p.y, 1.4 + b * 2.2, 0, tt), i.fillStyle = `rgba(${S},${k},${M},${0.5 + b * 0.5})`, i.fill();
173
+ const w = u + (v - u) * b | 0, k = f + (y - f) * b | 0, M = g + (x - g) * b | 0;
174
+ t.dark && b > 0.2 ? (i.shadowColor = `rgba(${v},${y},${x},${0.6 * b})`, i.shadowBlur = 10 * b) : i.shadowBlur = 0, i.beginPath(), i.arc(p.x, p.y, 1.4 + b * 2.2, 0, tt), i.fillStyle = `rgba(${w},${k},${M},${0.5 + b * 0.5})`, i.fill();
175
175
  }
176
176
  i.shadowBlur = 0;
177
177
  }
@@ -202,21 +202,21 @@ const El = (t) => {
202
202
  g.moveTo(0, C), g.lineTo(c, C);
203
203
  }
204
204
  g.stroke();
205
- const S = (u * 0.12 % 1 + 1) % 1 * s, k = g.createLinearGradient(0, S - 90, 0, S + 90);
206
- k.addColorStop(0, `rgba(${_},${p},${b},0)`), k.addColorStop(0.5, `rgba(${_},${p},${b},${t.dark ? 0.08 : 0.05})`), k.addColorStop(1, `rgba(${_},${p},${b},0)`), g.fillStyle = k, g.fillRect(0, S - 90, c, 90 * 2), g.strokeStyle = `rgba(${_},${p},${b},0.18)`, g.beginPath(), g.moveTo(0, S), g.lineTo(c, S), g.stroke();
207
- const M = v.x, w = v.y;
205
+ const w = (u * 0.12 % 1 + 1) % 1 * s, k = g.createLinearGradient(0, w - 90, 0, w + 90);
206
+ k.addColorStop(0, `rgba(${_},${p},${b},0)`), k.addColorStop(0.5, `rgba(${_},${p},${b},${t.dark ? 0.08 : 0.05})`), k.addColorStop(1, `rgba(${_},${p},${b},0)`), g.fillStyle = k, g.fillRect(0, w - 90, c, 90 * 2), g.strokeStyle = `rgba(${_},${p},${b},0.18)`, g.beginPath(), g.moveTo(0, w), g.lineTo(c, w), g.stroke();
207
+ const M = v.x, S = v.y;
208
208
  for (let N = 0; N < r; N++) {
209
- const C = o + N * 44, L = 1 - Math.min(1, Math.abs(C - S) / 90), E = L * L * 0.8;
209
+ const C = o + N * 44, L = 1 - Math.min(1, Math.abs(C - w) / 90), E = L * L * 0.8;
210
210
  for (let A = 0; A < a; A++) {
211
211
  const F = d + A * 44;
212
212
  let B = E;
213
213
  if (f) {
214
- const W = Math.hypot(F - M, C - w);
215
- W < 120 && (B = Math.max(B, (1 - W / 120) ** 2));
214
+ const T = Math.hypot(F - M, C - S);
215
+ T < 120 && (B = Math.max(B, (1 - T / 120) ** 2));
216
216
  }
217
217
  if (B < 0.02) continue;
218
- const T = y + (_ - y) * B | 0, P = x + (p - x) * B | 0, O = $ + (b - $) * B | 0;
219
- g.beginPath(), g.arc(F, C, 1 + B * 2.2, 0, tt), g.fillStyle = `rgba(${T},${P},${O},${0.3 + B * 0.6})`, g.fill();
218
+ const W = y + (_ - y) * B | 0, P = x + (p - x) * B | 0, O = $ + (b - $) * B | 0;
219
+ g.beginPath(), g.arc(F, C, 1 + B * 2.2, 0, tt), g.fillStyle = `rgba(${W},${P},${O},${0.3 + B * 0.6})`, g.fill();
220
220
  }
221
221
  }
222
222
  }
@@ -250,21 +250,21 @@ const El = (t) => {
250
250
  const { ctx: u, pointer: f } = t, [g, v, y] = t.ink, [x, $, _] = t.accent;
251
251
  u.clearRect(0, 0, l, c), u.lineCap = "round";
252
252
  const p = f.x, b = f.y;
253
- for (const S of s) {
254
- let k = a(S.x, S.y, i), M = 0;
253
+ for (const w of s) {
254
+ let k = a(w.x, w.y, i), M = 0;
255
255
  if (h) {
256
- const E = S.x - p, A = S.y - b, F = Math.hypot(E, A);
256
+ const E = w.x - p, A = w.y - b, F = Math.hypot(E, A);
257
257
  F < 160 && (M = 1 - F / 160, k = $t(k, Math.atan2(A, E) + Math.PI / 2, M * 0.7));
258
258
  }
259
- const w = 0.9 + M * 0.6;
260
- if (S.x += Math.cos(k) * w, S.y += Math.sin(k) * w, S.hist.push(S.x, S.y), S.hist.length > 9 * 2 && S.hist.splice(0, S.hist.length - 9 * 2), ++S.life > S.max || S.x < -20 || S.x > l + 20 || S.y < -20 || S.y > c + 20) {
261
- r(S);
259
+ const S = 0.9 + M * 0.6;
260
+ if (w.x += Math.cos(k) * S, w.y += Math.sin(k) * S, w.hist.push(w.x, w.y), w.hist.length > 9 * 2 && w.hist.splice(0, w.hist.length - 9 * 2), ++w.life > w.max || w.x < -20 || w.x > l + 20 || w.y < -20 || w.y > c + 20) {
261
+ r(w);
262
262
  continue;
263
263
  }
264
264
  const N = g + (x - g) * M | 0, C = v + ($ - v) * M | 0, L = y + (_ - y) * M | 0;
265
265
  u.strokeStyle = `rgba(${N},${C},${L},${0.16 + M * 0.5})`, u.lineWidth = 1 + M * 0.8, u.beginPath();
266
- for (let E = 0; E < S.hist.length; E += 2) {
267
- const A = S.hist[E], F = S.hist[E + 1];
266
+ for (let E = 0; E < w.hist.length; E += 2) {
267
+ const A = w.hist[E], F = w.hist[E + 1];
268
268
  E === 0 ? u.moveTo(A, F) : u.lineTo(A, F);
269
269
  }
270
270
  u.stroke();
@@ -294,11 +294,11 @@ const El = (t) => {
294
294
  for (let x = 0; x < g; x++) {
295
295
  let $ = Math.floor(Math.random() * i), _ = Math.floor(Math.random() * h);
296
296
  const p = [u + $ * 26, f + _ * 26], b = 3 + Math.floor(Math.random() * 5);
297
- let S = Math.floor(Math.random() * 4);
297
+ let w = Math.floor(Math.random() * 4);
298
298
  for (let C = 0; C < b; C++) {
299
- Math.random() < 0.6 && (S = (S + (Math.random() < 0.5 ? 1 : 3)) % 4);
299
+ Math.random() < 0.6 && (w = (w + (Math.random() < 0.5 ? 1 : 3)) % 4);
300
300
  const L = 1 + Math.floor(Math.random() * 4);
301
- $ = Ye($ + v[S] * L, 0, i), _ = Ye(_ + y[S] * L, 0, h), p.push(u + $ * 26, f + _ * 26);
301
+ $ = Ye($ + v[w] * L, 0, i), _ = Ye(_ + y[w] * L, 0, h), p.push(u + $ * 26, f + _ * 26);
302
302
  }
303
303
  const k = [];
304
304
  let M = 0;
@@ -307,9 +307,9 @@ const El = (t) => {
307
307
  k.push(L), M += L;
308
308
  }
309
309
  if (M < 26) continue;
310
- const w = [], N = 1 + (Math.random() < 0.4 ? 1 : 0);
311
- for (let C = 0; C < N; C++) w.push({ p: Math.random(), sp: 0.1 + Math.random() * 0.16 });
312
- s.push({ pts: p, len: M, seg: k, pulses: w });
310
+ const S = [], N = 1 + (Math.random() < 0.4 ? 1 : 0);
311
+ for (let C = 0; C < N; C++) S.push({ p: Math.random(), sp: 0.1 + Math.random() * 0.16 });
312
+ s.push({ pts: p, len: M, seg: k, pulses: S });
313
313
  }
314
314
  }
315
315
  function r(i, h) {
@@ -332,19 +332,19 @@ const El = (t) => {
332
332
  const { ctx: u, pointer: f } = t, [g, v, y] = t.ink, [x, $, _] = t.accent;
333
333
  u.clearRect(0, 0, l, c), u.lineJoin = "round", u.lineCap = "round";
334
334
  const p = f.x, b = f.y;
335
- for (const S of s) {
335
+ for (const w of s) {
336
336
  let k = 0;
337
337
  if (h) {
338
- const M = Math.hypot(S.pts[0] - p, S.pts[1] - b);
338
+ const M = Math.hypot(w.pts[0] - p, w.pts[1] - b);
339
339
  M < 200 && (k = (1 - M / 200) * 0.6);
340
340
  }
341
- u.strokeStyle = `rgba(${g},${v},${y},${0.12 + k * 0.18})`, u.lineWidth = 1.2, u.beginPath(), u.moveTo(S.pts[0], S.pts[1]);
342
- for (let M = 2; M < S.pts.length; M += 2) u.lineTo(S.pts[M], S.pts[M + 1]);
343
- u.stroke(), d(S.pts[0], S.pts[1], g, v, y, k), d(S.pts[S.pts.length - 2], S.pts[S.pts.length - 1], g, v, y, k);
344
- for (const M of S.pulses) {
341
+ u.strokeStyle = `rgba(${g},${v},${y},${0.12 + k * 0.18})`, u.lineWidth = 1.2, u.beginPath(), u.moveTo(w.pts[0], w.pts[1]);
342
+ for (let M = 2; M < w.pts.length; M += 2) u.lineTo(w.pts[M], w.pts[M + 1]);
343
+ u.stroke(), d(w.pts[0], w.pts[1], g, v, y, k), d(w.pts[w.pts.length - 2], w.pts[w.pts.length - 1], g, v, y, k);
344
+ for (const M of w.pulses) {
345
345
  M.p += M.sp * i, M.p > 1 && (M.p -= 1);
346
- const [w, N] = r(S, M.p);
347
- t.dark && (u.shadowColor = `rgba(${x},${$},${_},0.85)`, u.shadowBlur = 10), u.beginPath(), u.arc(w, N, 2.1, 0, tt), u.fillStyle = `rgba(${x},${$},${_},0.95)`, u.fill(), u.shadowBlur = 0;
346
+ const [S, N] = r(w, M.p);
347
+ t.dark && (u.shadowColor = `rgba(${x},${$},${_},0.85)`, u.shadowBlur = 10), u.beginPath(), u.arc(S, N, 2.1, 0, tt), u.fillStyle = `rgba(${x},${$},${_},0.95)`, u.fill(), u.shadowBlur = 0;
348
348
  }
349
349
  }
350
350
  }
@@ -380,8 +380,8 @@ function Qs({
380
380
  const d = ((Z = window.matchMedia) == null ? void 0 : Z.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, o = n === "dark", i = getComputedStyle(a), h = Al(i, "--select-dot", o ? [235, 238, 255] : [64, 68, 92]), u = Fl(i.getPropertyValue("--select-primary"), o ? [255, 255, 255] : [33, 37, 41]);
381
381
  let f = 0, g = 0, v = 0, y = 0, x = null, $ = 0;
382
382
  const _ = 1.2, p = { x: 0, y: 0 }, b = { x: 0, y: 0, active: !1 };
383
- let S = 0, k = 0, M = -10;
384
- const w = Me.quickTo(p, "x", { duration: 0.5, ease: "power3.out" }), N = Me.quickTo(p, "y", { duration: 0.5, ease: "power3.out" });
383
+ let w = 0, k = 0, M = -10;
384
+ const S = Me.quickTo(p, "x", { duration: 0.5, ease: "power3.out" }), N = Me.quickTo(p, "y", { duration: 0.5, ease: "power3.out" });
385
385
  function C(G, J) {
386
386
  if (!x) return;
387
387
  const re = x.getBoundingClientRect(), me = re.left - v + re.width / 2, Se = re.top - y + re.height / 2, ne = re.width / 2, H = re.height / 2, Q = 18, z = (G - me) / (ne + Q), ue = (J - Se) / (H + Q), ie = Math.sqrt(z * z + ue * ue), he = ie < 1 ? 1 - ie : 0, de = he * he * (3 - 2 * he);
@@ -401,26 +401,26 @@ function Qs({
401
401
  const J = Math.min(window.devicePixelRatio || 1, 2);
402
402
  a.width = Math.round(f * J), a.height = Math.round(g * J), r.setTransform(J, 0, 0, J, 0, 0);
403
403
  const re = a.closest(".select-auth") ?? document;
404
- x = l ? re.querySelector(l) : null, p.x === 0 && p.y === 0 && (p.x = S = f / 2, p.y = k = g / 2), A.build();
404
+ x = l ? re.querySelector(l) : null, p.x === 0 && p.y === 0 && (p.x = w = f / 2, p.y = k = g / 2), A.build();
405
405
  }
406
406
  let B = -1;
407
- function T(G) {
407
+ function W(G) {
408
408
  const J = B < 0 ? 0 : Math.min(G - B, 0.05);
409
- B = G, b.active = G - M < _, w(b.active ? S : f / 2), N(b.active ? k : g / 2), b.x = p.x, b.y = p.y, A.frame(G, J);
409
+ B = G, b.active = G - M < _, S(b.active ? w : f / 2), N(b.active ? k : g / 2), b.x = p.x, b.y = p.y, A.frame(G, J);
410
410
  }
411
411
  function P(G) {
412
- S = G.clientX - v, k = G.clientY - y, M = Me.ticker.time;
412
+ w = G.clientX - v, k = G.clientY - y, M = Me.ticker.time;
413
413
  }
414
414
  function O() {
415
415
  const G = a.getBoundingClientRect();
416
416
  v = G.left, y = G.top;
417
417
  }
418
418
  F();
419
- const W = new ResizeObserver(() => {
419
+ const T = new ResizeObserver(() => {
420
420
  F(), d && A.paintStatic();
421
421
  });
422
- return W.observe(a), d ? (A.paintStatic(), () => W.disconnect()) : (window.addEventListener("pointermove", P, { passive: !0 }), window.addEventListener("scroll", O, { passive: !0 }), Me.ticker.add(T), () => {
423
- Me.ticker.remove(T), Me.killTweensOf(p), window.removeEventListener("pointermove", P), window.removeEventListener("scroll", O), W.disconnect(), x == null || x.style.removeProperty("--select-card-glow");
422
+ return T.observe(a), d ? (A.paintStatic(), () => T.disconnect()) : (window.addEventListener("pointermove", P, { passive: !0 }), window.addEventListener("scroll", O, { passive: !0 }), Me.ticker.add(W), () => {
423
+ Me.ticker.remove(W), Me.killTweensOf(p), window.removeEventListener("pointermove", P), window.removeEventListener("scroll", O), T.disconnect(), x == null || x.style.removeProperty("--select-card-glow");
424
424
  });
425
425
  }, [n, l, c]), /* @__PURE__ */ e("canvas", { ref: s, className: t, "aria-hidden": "true" });
426
426
  }
@@ -453,11 +453,11 @@ const ea = R(function({ title: n, subtitle: l, logo: c, mark: s, children: a, fo
453
453
  const [g, v] = D([]), y = q(0), x = (_) => {
454
454
  var k;
455
455
  if (i == null || i(_), o || s || typeof window < "u" && ((k = window.matchMedia) != null && k.call(window, "(prefers-reduced-motion: reduce)").matches)) return;
456
- const p = _.currentTarget.getBoundingClientRect(), b = Math.max(p.width, p.height) * 2, S = y.current++;
456
+ const p = _.currentTarget.getBoundingClientRect(), b = Math.max(p.width, p.height) * 2, w = y.current++;
457
457
  v((M) => [
458
458
  ...M,
459
459
  {
460
- key: S,
460
+ key: w,
461
461
  style: {
462
462
  width: b,
463
463
  height: b,
@@ -866,9 +866,9 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
866
866
  ] }),
867
867
  s
868
868
  ] });
869
- }), We = R(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: d, hint: o, error: i, prefix: h, suffix: u, mono: f, autoComplete: g, placeholder: v, required: y, disabled: x, readOnly: $, name: _, id: p, minLength: b, maxLength: S, min: k, max: M, step: w, inputMode: N, autoFocus: C, onBlur: L, onKeyDown: E, size: A = "md", className: F, ...B }, T) {
870
- const P = te(), O = p ?? P, [W, Z] = D(!1), G = s === "password", J = G && W ? "text" : s, re = i ? `${O}-err` : o ? `${O}-hint` : void 0, me = h != null || u != null, Se = s === "number" && !me && !$, ne = l === "" ? null : Number(l), H = (ie) => {
871
- const he = Number(w ?? 1) || 1;
869
+ }), We = R(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: d, hint: o, error: i, prefix: h, suffix: u, mono: f, autoComplete: g, placeholder: v, required: y, disabled: x, readOnly: $, name: _, id: p, minLength: b, maxLength: w, min: k, max: M, step: S, inputMode: N, autoFocus: C, onBlur: L, onKeyDown: E, size: A = "md", className: F, ...B }, W) {
870
+ const P = te(), O = p ?? P, [T, Z] = D(!1), G = s === "password", J = G && T ? "text" : s, re = i ? `${O}-err` : o ? `${O}-hint` : void 0, me = h != null || u != null, Se = s === "number" && !me && !$, ne = l === "" ? null : Number(l), H = (ie) => {
871
+ const he = Number(S ?? 1) || 1;
872
872
  let ae = (ne != null && Number.isFinite(ne) ? ne : 0) + ie * he;
873
873
  k != null && (ae = Math.max(Number(k), ae)), M != null && (ae = Math.min(Number(M), ae)), c(String(ae));
874
874
  }, Q = k != null && ne != null && ne <= Number(k), z = M != null && ne != null && ne >= Number(M), ue = /* @__PURE__ */ e(
@@ -888,17 +888,17 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
888
888
  readOnly: $,
889
889
  name: _,
890
890
  minLength: b,
891
- maxLength: S,
891
+ maxLength: w,
892
892
  min: k,
893
893
  max: M,
894
- step: w,
894
+ step: S,
895
895
  inputMode: N,
896
896
  autoFocus: C,
897
897
  "aria-invalid": i ? !0 : void 0,
898
898
  "aria-describedby": re
899
899
  }
900
900
  );
901
- return /* @__PURE__ */ m("div", { ref: T, ...B, className: `select-field${A === "sm" ? " select-field--sm" : ""}${F ? " " + F : ""}`, children: [
901
+ return /* @__PURE__ */ m("div", { ref: W, ...B, className: `select-field${A === "sm" ? " select-field--sm" : ""}${F ? " " + F : ""}`, children: [
902
902
  (n || r || a) && /* @__PURE__ */ e(lt, { htmlFor: O, label: n, info: r, action: a }),
903
903
  d && /* @__PURE__ */ e("p", { className: "select-field__desc", children: d }),
904
904
  /* @__PURE__ */ m("div", { className: `select-input-wrap${me ? " select-input-wrap--affixed" : ""}${i ? " select-input-wrap--error" : ""}`, children: [
@@ -911,8 +911,8 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
911
911
  type: "button",
912
912
  className: "select-input__reveal",
913
913
  onClick: () => Z((ie) => !ie),
914
- "aria-label": W ? "Ocultar senha" : "Mostrar senha",
915
- children: W ? /* @__PURE__ */ e(Gn, {}) : /* @__PURE__ */ e(Zn, {})
914
+ "aria-label": T ? "Ocultar senha" : "Mostrar senha",
915
+ children: T ? /* @__PURE__ */ e(Gn, {}) : /* @__PURE__ */ e(Zn, {})
916
916
  }
917
917
  ),
918
918
  Se && /* @__PURE__ */ m("span", { className: "select-stepper", children: [
@@ -963,14 +963,14 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
963
963
  a && /* @__PURE__ */ e("span", { className: "select-checkbox__hint", children: a })
964
964
  ] });
965
965
  }), Wa = R(function({ label: n, value: l, onChange: c, labelAction: s, info: a, description: r, hint: d, error: o, placeholder: i, rows: h = 4, mono: u, name: f, required: g, disabled: v, maxLength: y, onBlur: x, size: $ = "md", className: _, ...p }, b) {
966
- const S = te(), k = o ? `${S}-err` : d ? `${S}-hint` : void 0;
966
+ const w = te(), k = o ? `${w}-err` : d ? `${w}-hint` : void 0;
967
967
  return /* @__PURE__ */ m("div", { ref: b, ...p, className: `select-field${$ === "sm" ? " select-field--sm" : ""}${_ ? " " + _ : ""}`, children: [
968
- (n || a || s) && /* @__PURE__ */ e(lt, { htmlFor: S, label: n, info: a, action: s }),
968
+ (n || a || s) && /* @__PURE__ */ e(lt, { htmlFor: w, label: n, info: a, action: s }),
969
969
  r && /* @__PURE__ */ e("p", { className: "select-field__desc", children: r }),
970
970
  /* @__PURE__ */ e(
971
971
  "textarea",
972
972
  {
973
- id: S,
973
+ id: w,
974
974
  className: `select-input select-textarea${u ? " select-textarea--mono" : ""}${o ? " select-input--error" : ""}`,
975
975
  value: l,
976
976
  onChange: (M) => c(M.target.value),
@@ -985,7 +985,7 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
985
985
  "aria-describedby": k
986
986
  }
987
987
  ),
988
- o ? /* @__PURE__ */ e("p", { id: `${S}-err`, className: "select-field__error", children: o }) : d ? /* @__PURE__ */ e("p", { id: `${S}-hint`, className: "select-field__hint", children: d }) : null
988
+ o ? /* @__PURE__ */ e("p", { id: `${w}-err`, className: "select-field__error", children: o }) : d ? /* @__PURE__ */ e("p", { id: `${w}-hint`, className: "select-field__hint", children: d }) : null
989
989
  ] });
990
990
  }), Oa = R(function({ label: n, value: l, onChange: c, unit: s, info: a, hint: r, error: d, placeholder: o = "0", disabled: i = !1, min: h, max: u, className: f, ...g }, v) {
991
991
  const y = te();
@@ -1178,10 +1178,10 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1178
1178
  onDrop: (C) => {
1179
1179
  C.preventDefault(), g(!1), _(Array.from(C.dataTransfer.files));
1180
1180
  }
1181
- }, S = () => {
1181
+ }, w = () => {
1182
1182
  var C;
1183
1183
  return (C = u.current) == null ? void 0 : C.click();
1184
- }, k = (C) => l(n.filter((L, E) => E !== C)), M = r != null && n.length >= r, w = (a || n.length === 0) && !M, N = n.length > 0;
1184
+ }, k = (C) => l(n.filter((L, E) => E !== C)), M = r != null && n.length >= r, S = (a || n.length === 0) && !M, N = n.length > 0;
1185
1185
  return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-dropzone-wrap${o ? " " + o : ""}`, children: [
1186
1186
  N && /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
1187
1187
  n.map((C, L) => /* @__PURE__ */ e(
@@ -1195,12 +1195,12 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1195
1195
  },
1196
1196
  `${C.name}-${L}`
1197
1197
  )),
1198
- w && /* @__PURE__ */ m(
1198
+ S && /* @__PURE__ */ m(
1199
1199
  "button",
1200
1200
  {
1201
1201
  type: "button",
1202
1202
  className: `select-dropzone select-dropzone--tile${f ? " is-over" : ""}`,
1203
- onClick: S,
1203
+ onClick: w,
1204
1204
  ...b,
1205
1205
  children: [
1206
1206
  /* @__PURE__ */ e(kt, {}),
@@ -1209,12 +1209,12 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1209
1209
  }
1210
1210
  )
1211
1211
  ] }),
1212
- !N && w && /* @__PURE__ */ m(
1212
+ !N && S && /* @__PURE__ */ m(
1213
1213
  "button",
1214
1214
  {
1215
1215
  type: "button",
1216
1216
  className: `select-dropzone${f ? " is-over" : ""}`,
1217
- onClick: S,
1217
+ onClick: w,
1218
1218
  ...b,
1219
1219
  children: [
1220
1220
  /* @__PURE__ */ e(kt, {}),
@@ -1289,7 +1289,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1289
1289
  r != null && !f && /* @__PURE__ */ e("p", { className: "select-field__hint", children: r })
1290
1290
  ] });
1291
1291
  }), tc = R(function({ label: n, mode: l = "multiple", files: c, onFilesChange: s, urls: a, onUrlsChange: r, accept: d = ".jpg,.jpeg,.png,.webp", maxSizeMB: o = 3, maxItems: i = 10, maxFiles: h, uploadHint: u, urlPlaceholder: f, helpText: g, className: v, ...y }, x) {
1292
- const $ = l === "single", _ = q(null), [p, b] = D(!1), [S, k] = D(0), [M, w] = D(""), [N, C] = D(null), L = $ ? 1 : Math.max(1, i), E = $ ? 1 : h ?? L, A = c.length + a.length, F = $ ? A === 0 : A < L && c.length < E, B = $ ? A === 0 : A < L, T = A > 0, P = o * 1024 * 1024, O = xe(() => c.map((H) => Kn(H) ? URL.createObjectURL(H) : null), [c]);
1292
+ const $ = l === "single", _ = q(null), [p, b] = D(!1), [w, k] = D(0), [M, S] = D(""), [N, C] = D(null), L = $ ? 1 : Math.max(1, i), E = $ ? 1 : h ?? L, A = c.length + a.length, F = $ ? A === 0 : A < L && c.length < E, B = $ ? A === 0 : A < L, W = A > 0, P = o * 1024 * 1024, O = xe(() => c.map((H) => Kn(H) ? URL.createObjectURL(H) : null), [c]);
1293
1293
  le(
1294
1294
  () => () => {
1295
1295
  O.forEach((H) => {
@@ -1298,7 +1298,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1298
1298
  },
1299
1299
  [O]
1300
1300
  );
1301
- const W = (H) => {
1301
+ const T = (H) => {
1302
1302
  const Q = H.filter((ie) => ie.size <= P && Xn(ie, d));
1303
1303
  if (k(H.length - Q.length), !Q.length) return;
1304
1304
  if ($) {
@@ -1318,7 +1318,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1318
1318
  C("Essa URL já foi adicionada.");
1319
1319
  return;
1320
1320
  }
1321
- $ ? (s([]), r([H])) : r([...a, H].slice(0, L)), w(""), C(null);
1321
+ $ ? (s([]), r([H])) : r([...a, H].slice(0, L)), S(""), C(null);
1322
1322
  }
1323
1323
  }, G = (H) => {
1324
1324
  H.key === "Enter" && (H.preventDefault(), Z());
@@ -1331,13 +1331,13 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1331
1331
  },
1332
1332
  onDragLeave: () => b(!1),
1333
1333
  onDrop: (H) => {
1334
- H.preventDefault(), b(!1), W(Array.from(H.dataTransfer.files));
1334
+ H.preventDefault(), b(!1), T(Array.from(H.dataTransfer.files));
1335
1335
  }
1336
1336
  };
1337
1337
  return /* @__PURE__ */ m("div", { ref: x, ...y, className: `select-field select-imageupload${v ? " " + v : ""}`, children: [
1338
1338
  n && /* @__PURE__ */ e("span", { className: "select-field__label", children: n }),
1339
1339
  /* @__PURE__ */ m("div", { className: `select-uploadzone${p ? " is-over" : ""}`, ...ne, children: [
1340
- T ? /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
1340
+ W ? /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
1341
1341
  c.map((H, Q) => /* @__PURE__ */ e(
1342
1342
  wt,
1343
1343
  {
@@ -1366,7 +1366,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1366
1366
  size: "sm",
1367
1367
  value: M,
1368
1368
  onChange: (H) => {
1369
- w(H), N && C(null);
1369
+ S(H), N && C(null);
1370
1370
  },
1371
1371
  onKeyDown: G,
1372
1372
  type: "url",
@@ -1387,13 +1387,13 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1387
1387
  multiple: !$,
1388
1388
  hidden: !0,
1389
1389
  onChange: (H) => {
1390
- W(Array.from(H.target.files ?? [])), H.target.value = "";
1390
+ T(Array.from(H.target.files ?? [])), H.target.value = "";
1391
1391
  }
1392
1392
  }
1393
1393
  )
1394
1394
  ] }),
1395
- S > 0 && /* @__PURE__ */ m(ut, { tone: "warning", children: [
1396
- S,
1395
+ w > 0 && /* @__PURE__ */ m(ut, { tone: "warning", children: [
1396
+ w,
1397
1397
  " arquivo(s) ignorado(s): tipo não permitido ou acima de ",
1398
1398
  o,
1399
1399
  " MB."
@@ -1766,8 +1766,8 @@ function Oe({
1766
1766
  var k;
1767
1767
  const _ = ((k = h.current) == null ? void 0 : k.firstElementChild) ?? h.current, p = u.current;
1768
1768
  if (!_ || !p) return;
1769
- const b = _.getBoundingClientRect(), S = ll(b, { width: p.offsetWidth, height: p.offsetHeight }, s, a);
1770
- v({ top: S.top, left: S.left, minWidth: o ? b.width : void 0 });
1769
+ const b = _.getBoundingClientRect(), w = ll(b, { width: p.offsetWidth, height: p.offsetHeight }, s, a);
1770
+ v({ top: w.top, left: w.left, minWidth: o ? b.width : void 0 });
1771
1771
  }, [s, a, o]);
1772
1772
  return Ee(() => {
1773
1773
  if (!t) {
@@ -1799,8 +1799,8 @@ function Oe({
1799
1799
  if (!t) return;
1800
1800
  const _ = (b) => {
1801
1801
  var k, M;
1802
- const S = b.target;
1803
- (k = u.current) != null && k.contains(S) || (M = h.current) != null && M.contains(S) || Qe.length && Qe[Qe.length - 1] !== u.current || n();
1802
+ const w = b.target;
1803
+ (k = u.current) != null && k.contains(w) || (M = h.current) != null && M.contains(w) || Qe.length && Qe[Qe.length - 1] !== u.current || n();
1804
1804
  }, p = (b) => {
1805
1805
  b.key === "Escape" && (b.stopPropagation(), n());
1806
1806
  };
@@ -2385,7 +2385,7 @@ function Ic({ text: t, term: n }) {
2385
2385
  return l ? /* @__PURE__ */ e("pre", { className: "select-json__pre", children: l.map((c, s) => /* @__PURE__ */ e("span", { className: `select-json__v--${c.cls}`, children: /* @__PURE__ */ e(St, { text: c.text, term: n }) }, s)) }) : /* @__PURE__ */ e("pre", { className: "select-json__pre", children: /* @__PURE__ */ e(St, { text: t, term: n }) });
2386
2386
  }
2387
2387
  const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, defaultOpen: s = !1, defaultExpandDepth: a = 1, searchable: r = !0, emptyLabel: d = "Sem dados", className: o, ...i }, h) {
2388
- const [u, f] = D(s), [g, v] = D("tree"), [y, x] = D(""), [$, _] = D(/* @__PURE__ */ new Set()), [p, b] = Bc(), S = q(null), k = xe(() => yc(n), [n]), M = Nc(k), w = xe(
2388
+ const [u, f] = D(s), [g, v] = D("tree"), [y, x] = D(""), [$, _] = D(/* @__PURE__ */ new Set()), [p, b] = Bc(), w = q(null), k = xe(() => yc(n), [n]), M = Nc(k), S = xe(
2389
2389
  () => typeof n == "string" && k === n ? n : rl(k),
2390
2390
  [n, k]
2391
2391
  ), N = xe(() => rt(k, () => {
@@ -2393,23 +2393,23 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
2393
2393
  le(() => {
2394
2394
  _(N ? /* @__PURE__ */ new Set() : $c(k, a)), x("");
2395
2395
  }, [k, a, N]);
2396
- const E = xe(() => Sc(k, C ? y : ""), [k, y, C]), A = y.trim().length > 0, F = C ? E.count : Ac(w, y);
2396
+ const E = xe(() => Sc(k, C ? y : ""), [k, y, C]), A = y.trim().length > 0, F = C ? E.count : Ac(S, y);
2397
2397
  le(() => {
2398
2398
  var Z, G;
2399
- !u || !A || (G = (Z = S.current) == null ? void 0 : Z.querySelector(".select-json__hit")) == null || G.scrollIntoView({ block: "nearest" });
2399
+ !u || !A || (G = (Z = w.current) == null ? void 0 : Z.querySelector(".select-json__hit")) == null || G.scrollIntoView({ block: "nearest" });
2400
2400
  }, [u, A, y, g]);
2401
2401
  const B = Te((Z) => {
2402
2402
  _((G) => {
2403
2403
  const J = new Set(G);
2404
2404
  return J.delete(Z) || J.add(Z), J;
2405
2405
  });
2406
- }, []), T = L.length > 0 && L.every((Z) => $.has(Z)), P = () => _(T ? /* @__PURE__ */ new Set() : new Set(L)), O = { expanded: $, toggle: B, search: y, result: E, copied: p, copy: b }, W = u && !M;
2406
+ }, []), W = L.length > 0 && L.every((Z) => $.has(Z)), P = () => _(W ? /* @__PURE__ */ new Set() : new Set(L)), O = { expanded: $, toggle: B, search: y, result: E, copied: p, copy: b }, T = u && !M;
2407
2407
  return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-json${o ? " " + o : ""}`, children: [
2408
2408
  /* @__PURE__ */ m("div", { className: "select-json__head", children: [
2409
2409
  /* @__PURE__ */ e(Xe, { as: "h2", variant: "headingSm", children: l }),
2410
- /* @__PURE__ */ e(gc, { open: W, onToggle: () => f((Z) => !Z), openLabel: "Ocultar", disabled: M, children: M ? d : "Mostrar" })
2410
+ /* @__PURE__ */ e(gc, { open: T, onToggle: () => f((Z) => !Z), openLabel: "Ocultar", disabled: M, children: M ? d : "Mostrar" })
2411
2411
  ] }),
2412
- W && /* @__PURE__ */ m("div", { className: "select-json__body", children: [
2412
+ T && /* @__PURE__ */ m("div", { className: "select-json__body", children: [
2413
2413
  /* @__PURE__ */ m("div", { className: "select-json__toolbar", children: [
2414
2414
  r ? /* @__PURE__ */ m(_e, { children: [
2415
2415
  /* @__PURE__ */ e("span", { className: "select-json__searchicon", "aria-hidden": "true", children: /* @__PURE__ */ e(Jt, {}) }),
@@ -2430,9 +2430,9 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
2430
2430
  ge,
2431
2431
  {
2432
2432
  icon: /* @__PURE__ */ e(jn, {}),
2433
- label: T ? "Recolher tudo" : "Expandir tudo",
2433
+ label: W ? "Recolher tudo" : "Expandir tudo",
2434
2434
  size: "sm",
2435
- active: T,
2435
+ active: W,
2436
2436
  onClick: P
2437
2437
  }
2438
2438
  ),
@@ -2454,18 +2454,18 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
2454
2454
  label: p === "all" ? "Copiado!" : "Copiar JSON",
2455
2455
  size: "sm",
2456
2456
  active: p === "all",
2457
- onClick: () => b("all", w)
2457
+ onClick: () => b("all", S)
2458
2458
  }
2459
2459
  )
2460
2460
  ] }),
2461
- /* @__PURE__ */ e("div", { ref: S, className: "select-json__scroll", style: { maxHeight: c }, children: C ? A && E.count === 0 ? /* @__PURE__ */ e("div", { className: "select-json__empty", children: /* @__PURE__ */ m(Xe, { as: "p", tone: "subdued", variant: "bodySm", children: [
2461
+ /* @__PURE__ */ e("div", { ref: w, className: "select-json__scroll", style: { maxHeight: c }, children: C ? A && E.count === 0 ? /* @__PURE__ */ e("div", { className: "select-json__empty", children: /* @__PURE__ */ m(Xe, { as: "p", tone: "subdued", variant: "bodySm", children: [
2462
2462
  "Nenhuma chave ou valor corresponde a “",
2463
2463
  y.trim(),
2464
2464
  "”."
2465
2465
  ] }) }) : /* @__PURE__ */ e("div", { className: "select-json__tree", children: He(k) ? /* @__PURE__ */ e(dl, { value: k, path: "", depth: 0, ancestors: [k], ctx: O }) : /* @__PURE__ */ m("div", { className: "select-json__row", style: { "--json-depth": 0 }, children: [
2466
2466
  /* @__PURE__ */ e("span", { className: "select-json__caret select-json__caret--empty", "aria-hidden": "true" }),
2467
2467
  /* @__PURE__ */ e("span", { className: "select-json__label", children: /* @__PURE__ */ e(il, { value: k, term: y, forceFull: !0 }) })
2468
- ] }) }) : /* @__PURE__ */ e(Ic, { text: w, term: y }) })
2468
+ ] }) }) : /* @__PURE__ */ e(Ic, { text: S, term: y }) })
2469
2469
  ] })
2470
2470
  ] });
2471
2471
  }), Pc = {
@@ -2539,8 +2539,8 @@ function Bt(t = {}) {
2539
2539
  Me.set(y, x);
2540
2540
  const p = new IntersectionObserver(
2541
2541
  (b) => {
2542
- for (const S of b)
2543
- S.isIntersecting && (_(), f && p.unobserve(S.target));
2542
+ for (const w of b)
2543
+ w.isIntersecting && (_(), f && p.unobserve(w.target));
2544
2544
  },
2545
2545
  { threshold: 0 }
2546
2546
  );
@@ -2634,8 +2634,8 @@ const o1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
2634
2634
  }, g = (_, p) => {
2635
2635
  const b = u.slice();
2636
2636
  b[_] = p;
2637
- const S = b.join("").slice(0, c);
2638
- return l(S), S;
2637
+ const w = b.join("").slice(0, c);
2638
+ return l(w), w;
2639
2639
  }, v = (_, p) => {
2640
2640
  const b = p.replace(/\D/g, "");
2641
2641
  if (!b) {
@@ -2643,18 +2643,18 @@ const o1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
2643
2643
  return;
2644
2644
  }
2645
2645
  if (b.length === 1) {
2646
- const S = g(_, b);
2647
- _ < c - 1 && f(_ + 1), S.length === c && (s == null || s(S));
2646
+ const w = g(_, b);
2647
+ _ < c - 1 && f(_ + 1), w.length === c && (s == null || s(w));
2648
2648
  } else
2649
2649
  y(b, _);
2650
2650
  }, y = (_, p) => {
2651
2651
  const b = u.slice();
2652
2652
  for (let M = 0; M < _.length && p + M < c; M++)
2653
2653
  b[p + M] = _[M] ?? "";
2654
- const S = b.join("").slice(0, c);
2655
- l(S);
2654
+ const w = b.join("").slice(0, c);
2655
+ l(w);
2656
2656
  const k = Math.min(p + _.length, c) - 1;
2657
- f(Math.min(k + 1, c - 1)), S.length === c && (s == null || s(S));
2657
+ f(Math.min(k + 1, c - 1)), w.length === c && (s == null || s(w));
2658
2658
  }, x = (_, p) => {
2659
2659
  p.key === "Backspace" && !u[_] && _ > 0 ? (p.preventDefault(), g(_ - 1, ""), f(_ - 1)) : p.key === "ArrowLeft" && _ > 0 ? (p.preventDefault(), f(_ - 1)) : p.key === "ArrowRight" && _ < c - 1 && (p.preventDefault(), f(_ + 1));
2660
2660
  }, $ = (_, p) => {
@@ -3471,16 +3471,16 @@ const ns = R(function({ page: n, pageCount: l, total: c, pageSize: s, hasPreviou
3471
3471
  }
3472
3472
  ),
3473
3473
  _ ? p.map(
3474
- (S, k) => S === "gap" ? /* @__PURE__ */ e("span", { className: "select-pagination__gap", "aria-hidden": "true", children: "…" }, `gap-${k}`) : /* @__PURE__ */ e(
3474
+ (w, k) => w === "gap" ? /* @__PURE__ */ e("span", { className: "select-pagination__gap", "aria-hidden": "true", children: "…" }, `gap-${k}`) : /* @__PURE__ */ e(
3475
3475
  "button",
3476
3476
  {
3477
3477
  type: "button",
3478
- className: `select-pagination__page${S === n ? " is-active" : ""}`,
3479
- onClick: () => i == null ? void 0 : i(S),
3480
- "aria-current": S === n ? "page" : void 0,
3481
- children: S
3478
+ className: `select-pagination__page${w === n ? " is-active" : ""}`,
3479
+ onClick: () => i == null ? void 0 : i(w),
3480
+ "aria-current": w === n ? "page" : void 0,
3481
+ children: w
3482
3482
  },
3483
- S
3483
+ w
3484
3484
  )
3485
3485
  ) : /* @__PURE__ */ e("span", { className: "select-pagination__current", children: l != null ? `${n} / ${l}` : `Página ${n}` }),
3486
3486
  /* @__PURE__ */ e(
@@ -3550,22 +3550,22 @@ function T1({
3550
3550
  filters: i,
3551
3551
  columnsKey: h
3552
3552
  }) {
3553
- const [u, f] = D(() => h ? ls(h) : []), [g, v] = D(!1), [y, x] = D(!1), $ = xe(() => new Set(u), [u]), _ = t.filter(yn), p = _.length > 0 && _.every((P) => $.has(P.key)), b = (P) => !p && $.has(P.key) && yn(P), S = t.filter((P) => !b(P)), k = _.filter((P) => !b(P)), [M, w] = D(null), N = (P) => {
3553
+ const [u, f] = D(() => h ? ls(h) : []), [g, v] = D(!1), [y, x] = D(!1), $ = xe(() => new Set(u), [u]), _ = t.filter(yn), p = _.length > 0 && _.every((P) => $.has(P.key)), b = (P) => !p && $.has(P.key) && yn(P), w = t.filter((P) => !b(P)), k = _.filter((P) => !b(P)), [M, S] = D(null), N = (P) => {
3554
3554
  f((O) => {
3555
- const W = !O.includes(P.key), Z = W ? [...O, P.key] : O.filter((G) => G !== P.key);
3556
- return h && cs(h, Z), W && w((G) => G && G.key === P.key ? null : G), Z;
3555
+ const T = !O.includes(P.key), Z = T ? [...O, P.key] : O.filter((G) => G !== P.key);
3556
+ return h && cs(h, Z), T && S((G) => G && G.key === P.key ? null : G), Z;
3557
3557
  });
3558
3558
  }, C = (P) => {
3559
- w((O) => {
3560
- const W = P.sortDefault ?? "asc";
3561
- return !O || O.key !== P.key ? { key: P.key, dir: W } : O.dir === W ? { key: P.key, dir: W === "asc" ? "desc" : "asc" } : null;
3559
+ S((O) => {
3560
+ const T = P.sortDefault ?? "asc";
3561
+ return !O || O.key !== P.key ? { key: P.key, dir: T } : O.dir === T ? { key: P.key, dir: T === "asc" ? "desc" : "asc" } : null;
3562
3562
  });
3563
3563
  }, L = M ? t.find((P) => P.key === M.key) : void 0, E = xe(() => {
3564
3564
  const P = L == null ? void 0 : L.sortValue;
3565
3565
  if (!M || !P) return n;
3566
3566
  const O = M.dir === "asc" ? 1 : -1;
3567
- return [...n].sort((W, Z) => ss(P(W), P(Z), O));
3568
- }, [n, M, L]), A = S.map((P) => ({
3567
+ return [...n].sort((T, Z) => ss(P(T), P(Z), O));
3568
+ }, [n, M, L]), A = w.map((P) => ({
3569
3569
  label: P.title,
3570
3570
  align: P.align,
3571
3571
  width: P.width,
@@ -3591,14 +3591,14 @@ function T1({
3591
3591
  }
3592
3592
  ),
3593
3593
  children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "menu", children: _.map((P) => {
3594
- const O = !b(P), W = O && k.length === 1;
3594
+ const O = !b(P), T = O && k.length === 1;
3595
3595
  return /* @__PURE__ */ m(
3596
3596
  "button",
3597
3597
  {
3598
3598
  type: "button",
3599
3599
  role: "menuitemcheckbox",
3600
3600
  "aria-checked": O,
3601
- disabled: W,
3601
+ disabled: T,
3602
3602
  className: `select-facet__opt${O ? " is-selected" : ""}`,
3603
3603
  onClick: () => N(P),
3604
3604
  children: [
@@ -3615,7 +3615,7 @@ function T1({
3615
3615
  /* @__PURE__ */ e(Yc, { columns: A, empty: F, title: d, filters: i, action: B ? /* @__PURE__ */ m("span", { className: "select-datatable__toolbar", children: [
3616
3616
  o,
3617
3617
  B
3618
- ] }) : o, children: c ? Array.from({ length: 5 }, (P, O) => /* @__PURE__ */ e(bn, { children: S.map((W, Z) => /* @__PURE__ */ e(xn, { align: W.align, width: W.width, children: /* @__PURE__ */ e("span", { className: "select-skeleton select-datatable__skel" }) }, Z)) }, `skeleton-${O}`)) : E.map((P) => /* @__PURE__ */ e(bn, { onClick: r ? () => r(P) : void 0, children: S.map((O, W) => /* @__PURE__ */ e(xn, { align: O.align, width: O.width, children: O.render(P) }, W)) }, l(P))) }),
3618
+ ] }) : o, children: c ? Array.from({ length: 5 }, (P, O) => /* @__PURE__ */ e(bn, { children: w.map((T, Z) => /* @__PURE__ */ e(xn, { align: T.align, width: T.width, children: /* @__PURE__ */ e("span", { className: "select-skeleton select-datatable__skel" }) }, Z)) }, `skeleton-${O}`)) : E.map((P) => /* @__PURE__ */ e(bn, { onClick: r ? () => r(P) : void 0, children: w.map((O, T) => /* @__PURE__ */ e(xn, { align: O.align, width: O.width, children: O.render(P) }, T)) }, l(P))) }),
3619
3619
  a && /* @__PURE__ */ m("div", { className: "select-datatable__pagination", children: [
3620
3620
  a.pageSizeOptions && a.pageSizeOptions.length > 1 && a.onPageSizeChange && /* @__PURE__ */ e("div", { className: "select-datatable__pagesize", children: /* @__PURE__ */ e(
3621
3621
  Oe,
@@ -3651,8 +3651,8 @@ function T1({
3651
3651
  "aria-selected": O,
3652
3652
  className: `select-facet__opt${O ? " is-selected" : ""}`,
3653
3653
  onClick: () => {
3654
- var W;
3655
- (W = a.onPageSizeChange) == null || W.call(a, P), x(!1);
3654
+ var T;
3655
+ (T = a.onPageSizeChange) == null || T.call(a, P), x(!1);
3656
3656
  },
3657
3657
  children: [
3658
3658
  /* @__PURE__ */ m("span", { children: [
@@ -3712,14 +3712,14 @@ function is(t, n) {
3712
3712
  return n ? `${l} ${De(t.getHours())}:${De(t.getMinutes())}` : l;
3713
3713
  }
3714
3714
  const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, placeholder: a, required: r, disabled: d, error: o, hint: i, minDate: h, maxDate: u, clearable: f = !0, id: g, className: v, ...y }, x) {
3715
- const $ = te(), _ = g ?? $, [p, b] = D(!1), S = rs(l), [k, M] = D(() => vt(S ?? /* @__PURE__ */ new Date())), w = h ? ct(h) : null, N = u ? ct(u) : null, C = (W) => !!w && ct(W) < w || !!N && ct(W) > N, L = Mn(vt(k), -vt(k).getDay()), E = Array.from({ length: 42 }, (W, Z) => Mn(L, Z)), A = ct(/* @__PURE__ */ new Date()), F = () => {
3716
- d || (M(vt(S ?? /* @__PURE__ */ new Date())), b((W) => !W));
3717
- }, B = (W) => {
3718
- if (C(W)) return;
3719
- const Z = new Date(W);
3720
- s && Z.setHours((S == null ? void 0 : S.getHours()) ?? 0, (S == null ? void 0 : S.getMinutes()) ?? 0, 0, 0), c(wn(Z, s)), s || b(!1);
3721
- }, T = (W) => {
3722
- const [Z = "", G = ""] = W.split(":"), J = Number(Z), re = Number(G), me = new Date(S ?? A);
3715
+ const $ = te(), _ = g ?? $, [p, b] = D(!1), w = rs(l), [k, M] = D(() => vt(w ?? /* @__PURE__ */ new Date())), S = h ? ct(h) : null, N = u ? ct(u) : null, C = (T) => !!S && ct(T) < S || !!N && ct(T) > N, L = Mn(vt(k), -vt(k).getDay()), E = Array.from({ length: 42 }, (T, Z) => Mn(L, Z)), A = ct(/* @__PURE__ */ new Date()), F = () => {
3716
+ d || (M(vt(w ?? /* @__PURE__ */ new Date())), b((T) => !T));
3717
+ }, B = (T) => {
3718
+ if (C(T)) return;
3719
+ const Z = new Date(T);
3720
+ s && Z.setHours((w == null ? void 0 : w.getHours()) ?? 0, (w == null ? void 0 : w.getMinutes()) ?? 0, 0, 0), c(wn(Z, s)), s || b(!1);
3721
+ }, W = (T) => {
3722
+ const [Z = "", G = ""] = T.split(":"), J = Number(Z), re = Number(G), me = new Date(w ?? A);
3723
3723
  me.setHours(Number.isFinite(J) ? J : 0, Number.isFinite(re) ? re : 0, 0, 0), c(wn(me, !0));
3724
3724
  }, P = () => {
3725
3725
  c(""), b(!1);
@@ -3735,7 +3735,7 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
3735
3735
  "aria-haspopup": "dialog",
3736
3736
  "aria-expanded": p,
3737
3737
  "aria-invalid": o ? !0 : void 0,
3738
- children: S ? is(S, s) : /* @__PURE__ */ e("span", { className: "select-datefield__ph", children: a ?? (s ? "Selecione data e hora" : "Selecione uma data") })
3738
+ children: w ? is(w, s) : /* @__PURE__ */ e("span", { className: "select-datefield__ph", children: a ?? (s ? "Selecione data e hora" : "Selecione uma data") })
3739
3739
  }
3740
3740
  ),
3741
3741
  /* @__PURE__ */ e("span", { className: "select-datefield__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(qn, {}) })
@@ -3744,19 +3744,19 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
3744
3744
  n && /* @__PURE__ */ e(lt, { htmlFor: _, label: r ? `${n} *` : n }),
3745
3745
  /* @__PURE__ */ e("div", { className: "select-datefield", children: /* @__PURE__ */ e(Oe, { active: p, onClose: () => b(!1), placement: "bottom-start", role: "dialog", activator: O, children: /* @__PURE__ */ m("div", { className: "select-datefield__pop", children: [
3746
3746
  /* @__PURE__ */ m("div", { className: "select-datepicker__calhead", children: [
3747
- /* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Mês anterior", onClick: () => M((W) => $n(W, -1)), children: /* @__PURE__ */ e(Kt, {}) }),
3747
+ /* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Mês anterior", onClick: () => M((T) => $n(T, -1)), children: /* @__PURE__ */ e(Kt, {}) }),
3748
3748
  /* @__PURE__ */ m("span", { className: "select-datepicker__monthlabel", children: [
3749
3749
  os[k.getMonth()],
3750
3750
  " ",
3751
3751
  k.getFullYear()
3752
3752
  ] }),
3753
- /* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Próximo mês", onClick: () => M((W) => $n(W, 1)), children: /* @__PURE__ */ e(dt, {}) })
3753
+ /* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Próximo mês", onClick: () => M((T) => $n(T, 1)), children: /* @__PURE__ */ e(dt, {}) })
3754
3754
  ] }),
3755
3755
  /* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
3756
- as.map((W) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: W }, W)),
3757
- E.map((W) => {
3758
- const Z = W.getMonth() !== k.getMonth(), G = !!S && kn(W, S), J = "select-datepicker__daybtn" + (G ? " is-selected" : "") + (kn(W, A) && !G ? " is-today" : "") + (Z ? " is-outside" : "");
3759
- return /* @__PURE__ */ e("div", { className: "select-datepicker__day", children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: C(W), onClick: () => B(W), children: W.getDate() }) }, W.getTime());
3756
+ as.map((T) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: T }, T)),
3757
+ E.map((T) => {
3758
+ const Z = T.getMonth() !== k.getMonth(), G = !!w && kn(T, w), J = "select-datepicker__daybtn" + (G ? " is-selected" : "") + (kn(T, A) && !G ? " is-today" : "") + (Z ? " is-outside" : "");
3759
+ return /* @__PURE__ */ e("div", { className: "select-datepicker__day", children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: C(T), onClick: () => B(T), children: T.getDate() }) }, T.getTime());
3760
3760
  })
3761
3761
  ] }),
3762
3762
  s && /* @__PURE__ */ m("div", { className: "select-datefield__time", children: [
@@ -3767,13 +3767,13 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
3767
3767
  type: "time",
3768
3768
  className: "select-input select-datefield__time-input",
3769
3769
  "aria-label": "Horário",
3770
- value: S ? `${De(S.getHours())}:${De(S.getMinutes())}` : "",
3771
- onChange: (W) => T(W.target.value)
3770
+ value: w ? `${De(w.getHours())}:${De(w.getMinutes())}` : "",
3771
+ onChange: (T) => W(T.target.value)
3772
3772
  }
3773
3773
  )
3774
3774
  ] }),
3775
3775
  /* @__PURE__ */ m("div", { className: "select-datefield__footer", children: [
3776
- f && S ? /* @__PURE__ */ e(ve, { variant: "secondary", inline: !0, onClick: P, children: "Limpar" }) : /* @__PURE__ */ e("span", {}),
3776
+ f && w ? /* @__PURE__ */ e(ve, { variant: "secondary", inline: !0, onClick: P, children: "Limpar" }) : /* @__PURE__ */ e("span", {}),
3777
3777
  /* @__PURE__ */ m("div", { className: "select-datefield__footer-right", children: [
3778
3778
  /* @__PURE__ */ e(ve, { variant: "secondary", inline: !0, onClick: () => B(A), children: "Hoje" }),
3779
3779
  s && /* @__PURE__ */ e(ve, { variant: "primary", inline: !0, onClick: () => b(!1), children: "Concluir" })
@@ -3870,10 +3870,10 @@ function us({
3870
3870
  );
3871
3871
  }
3872
3872
  const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, search: a, disabled: r, className: d, ...o }, i) {
3873
- const [h, u] = D([]), [f, g] = D(null), [v, y] = D(!1), x = (M) => (l[M.key] ?? "").trim() !== "", $ = (M) => !!M.pinned || x(M) || h.includes(M.key), _ = n.filter($), p = n.filter((M) => !$(M)), b = n.filter(x), S = () => {
3873
+ const [h, u] = D([]), [f, g] = D(null), [v, y] = D(!1), x = (M) => (l[M.key] ?? "").trim() !== "", $ = (M) => !!M.pinned || x(M) || h.includes(M.key), _ = n.filter($), p = n.filter((M) => !$(M)), b = n.filter(x), w = () => {
3874
3874
  u([]), g(null), s();
3875
3875
  }, k = (M) => {
3876
- u((w) => w.includes(M) ? w : [...w, M]), y(!1), g(M);
3876
+ u((S) => S.includes(M) ? S : [...S, M]), y(!1), g(M);
3877
3877
  };
3878
3878
  return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-filterbar${d ? " " + d : ""}`, children: [
3879
3879
  /* @__PURE__ */ m("div", { className: "select-filterbar__row", children: [
@@ -3906,10 +3906,10 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
3906
3906
  {
3907
3907
  filter: M,
3908
3908
  value: l[M.key] ?? "",
3909
- onChange: (w) => c(M.key, w),
3909
+ onChange: (S) => c(M.key, S),
3910
3910
  open: f === M.key,
3911
- onToggle: () => g((w) => w === M.key ? null : M.key),
3912
- onClose: () => g((w) => w === M.key ? null : w),
3911
+ onToggle: () => g((S) => S === M.key ? null : M.key),
3912
+ onClose: () => g((S) => S === M.key ? null : S),
3913
3913
  disabled: r
3914
3914
  },
3915
3915
  M.key
@@ -3964,11 +3964,11 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
3964
3964
  }
3965
3965
  )
3966
3966
  ] }, M.key)),
3967
- /* @__PURE__ */ e("button", { type: "button", className: "select-filterbar__clear", onClick: S, children: "Limpar tudo" })
3967
+ /* @__PURE__ */ e("button", { type: "button", className: "select-filterbar__clear", onClick: w, children: "Limpar tudo" })
3968
3968
  ] })
3969
3969
  ] });
3970
3970
  }), O1 = R(function({ label: n, options: l, selected: c, onChange: s, placeholder: a = "Selecionar…", hint: r, error: d, onBlur: o, size: i = "md", className: h, ...u }, f) {
3971
- const [g, v] = D(!1), [y, x] = D(""), $ = l.filter((b) => b.label.toLowerCase().includes(y.trim().toLowerCase())), _ = (b) => s(c.includes(b) ? c.filter((S) => S !== b) : [...c, b]), p = c.map((b) => l.find((S) => S.value === b)).filter((b) => b != null);
3971
+ const [g, v] = D(!1), [y, x] = D(""), $ = l.filter((b) => b.label.toLowerCase().includes(y.trim().toLowerCase())), _ = (b) => s(c.includes(b) ? c.filter((w) => w !== b) : [...c, b]), p = c.map((b) => l.find((w) => w.value === b)).filter((b) => b != null);
3972
3972
  return /* @__PURE__ */ m("div", { ref: f, ...u, className: `select-field${i === "sm" ? " select-field--sm" : ""}${h ? " " + h : ""}`, children: [
3973
3973
  n && /* @__PURE__ */ e("div", { className: "select-field__labelrow", children: /* @__PURE__ */ e("span", { className: "select-field__label", children: n }) }),
3974
3974
  /* @__PURE__ */ e(
@@ -4003,8 +4003,8 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
4003
4003
  type: "button",
4004
4004
  className: "select-tagselect__remove",
4005
4005
  "aria-label": `Remover ${b.label}`,
4006
- onClick: (S) => {
4007
- S.stopPropagation(), _(b.value);
4006
+ onClick: (w) => {
4007
+ w.stopPropagation(), _(b.value);
4008
4008
  },
4009
4009
  children: /* @__PURE__ */ e(Ke, {})
4010
4010
  }
@@ -4017,21 +4017,21 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
4017
4017
  children: /* @__PURE__ */ m("div", { className: "select-tagselect__menu", children: [
4018
4018
  /* @__PURE__ */ e("div", { className: "select-tagselect__search", children: /* @__PURE__ */ e(ml, { value: y, onChange: x, placeholder: "Buscar…" }) }),
4019
4019
  /* @__PURE__ */ e("div", { className: "select-tagselect__options", role: "presentation", children: $.length === 0 ? /* @__PURE__ */ e("div", { className: "select-tagselect__empty", children: "Nada encontrado" }) : $.map((b) => {
4020
- const S = c.includes(b.value);
4020
+ const w = c.includes(b.value);
4021
4021
  return /* @__PURE__ */ m(
4022
4022
  "button",
4023
4023
  {
4024
4024
  type: "button",
4025
4025
  role: "option",
4026
- "aria-selected": S,
4027
- className: `select-tagselect__option${S ? " is-selected" : ""}`,
4026
+ "aria-selected": w,
4027
+ className: `select-tagselect__option${w ? " is-selected" : ""}`,
4028
4028
  onClick: () => _(b.value),
4029
4029
  children: [
4030
4030
  /* @__PURE__ */ m("span", { className: "select-tagselect__optlabel", children: [
4031
4031
  b.label,
4032
4032
  b.secondary && /* @__PURE__ */ e("span", { className: "select-tagselect__optsec", children: b.secondary })
4033
4033
  ] }),
4034
- S && /* @__PURE__ */ e("span", { className: "select-tagselect__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
4034
+ w && /* @__PURE__ */ e("span", { className: "select-tagselect__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
4035
4035
  ]
4036
4036
  },
4037
4037
  b.value
@@ -4525,12 +4525,12 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
4525
4525
  /* @__PURE__ */ e("text", { x: f.left - 8, y: _(p), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(p) })
4526
4526
  ] }, b)),
4527
4527
  t.map((p, b) => {
4528
- const S = f.left + y * b + y / 2, k = p.value / u * v, M = $ - k;
4528
+ const w = f.left + y * b + y / 2, k = p.value / u * v, M = $ - k;
4529
4529
  return /* @__PURE__ */ m("g", { children: [
4530
4530
  /* @__PURE__ */ e(
4531
4531
  "rect",
4532
4532
  {
4533
- x: S - x / 2,
4533
+ x: w - x / 2,
4534
4534
  y: M,
4535
4535
  width: x,
4536
4536
  height: Math.max(0, k),
@@ -4539,7 +4539,7 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
4539
4539
  className: "select-chart__bar",
4540
4540
  style: { animationDelay: `${b * 40}ms` },
4541
4541
  onMouseEnter: () => o.show({
4542
- x: S,
4542
+ x: w,
4543
4543
  y: M,
4544
4544
  place: M < f.top + 52 ? "bottom" : "top",
4545
4545
  rows: [{ label: p.label, value: c(p.value), color: h }]
@@ -4547,7 +4547,7 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
4547
4547
  onMouseLeave: o.hide
4548
4548
  }
4549
4549
  ),
4550
- /* @__PURE__ */ e("text", { x: S, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: p.label })
4550
+ /* @__PURE__ */ e("text", { x: w, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: p.label })
4551
4551
  ] }, b);
4552
4552
  })
4553
4553
  ] }),
@@ -4555,32 +4555,32 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
4555
4555
  ] });
4556
4556
  }
4557
4557
  function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1, className: a, ...r }) {
4558
- const { ref: d, width: o } = ce(l), i = X(), h = te(), [u, f] = D(null), { max: g, values: v } = Ss(Math.max(0, ...t.flatMap((w) => w.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = n.length, p = (w) => y.left + (_ <= 1 ? x / 2 : w / (_ - 1) * x), b = (w) => y.top + $ - w / g * $, S = _ > 1 ? x / (_ - 1) : x, k = Math.max(1, Math.ceil(_ / 7)), M = y.top + $;
4558
+ const { ref: d, width: o } = ce(l), i = X(), h = te(), [u, f] = D(null), { max: g, values: v } = Ss(Math.max(0, ...t.flatMap((S) => S.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = n.length, p = (S) => y.left + (_ <= 1 ? x / 2 : S / (_ - 1) * x), b = (S) => y.top + $ - S / g * $, w = _ > 1 ? x / (_ - 1) : x, k = Math.max(1, Math.ceil(_ / 7)), M = y.top + $;
4559
4559
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
4560
4560
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
4561
- /* @__PURE__ */ e("defs", { children: t.map((w, N) => {
4562
- const C = w.color ?? j(N);
4561
+ /* @__PURE__ */ e("defs", { children: t.map((S, N) => {
4562
+ const C = S.color ?? j(N);
4563
4563
  return /* @__PURE__ */ m("linearGradient", { id: `${h}-a${N}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
4564
4564
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: C, stopOpacity: 0.32 }),
4565
4565
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: C, stopOpacity: 0 })
4566
4566
  ] }, N);
4567
4567
  }) }),
4568
- v.map((w, N) => /* @__PURE__ */ m("g", { children: [
4568
+ v.map((S, N) => /* @__PURE__ */ m("g", { children: [
4569
4569
  /* @__PURE__ */ e(
4570
4570
  "line",
4571
4571
  {
4572
4572
  x1: y.left,
4573
4573
  x2: o - y.right,
4574
- y1: b(w),
4575
- y2: b(w),
4576
- className: w === 0 ? "select-chart__axis" : "select-chart__grid"
4574
+ y1: b(S),
4575
+ y2: b(S),
4576
+ className: S === 0 ? "select-chart__axis" : "select-chart__grid"
4577
4577
  }
4578
4578
  ),
4579
- /* @__PURE__ */ e("text", { x: y.left - 8, y: b(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(w) })
4579
+ /* @__PURE__ */ e("text", { x: y.left - 8, y: b(S), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(S) })
4580
4580
  ] }, N)),
4581
4581
  u != null && /* @__PURE__ */ e("line", { x1: p(u), x2: p(u), y1: y.top, y2: M, className: "select-chart__crosshair" }),
4582
- t.map((w, N) => {
4583
- const C = w.color ?? j(N), L = w.data.map((E, A) => [p(A), b(E)]);
4582
+ t.map((S, N) => {
4583
+ const C = S.color ?? j(N), L = S.data.map((E, A) => [p(A), b(E)]);
4584
4584
  return /* @__PURE__ */ m("g", { children: [
4585
4585
  s && /* @__PURE__ */ e("path", { d: xl(L, M), fill: `url(#${h}-a${N})`, className: "select-chart__area" }),
4586
4586
  /* @__PURE__ */ e(
@@ -4598,26 +4598,26 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
4598
4598
  )
4599
4599
  ] }, N);
4600
4600
  }),
4601
- u != null && t.map((w, N) => /* @__PURE__ */ e(
4601
+ u != null && t.map((S, N) => /* @__PURE__ */ e(
4602
4602
  "circle",
4603
4603
  {
4604
4604
  cx: p(u),
4605
- cy: b(w.data[u] ?? 0),
4605
+ cy: b(S.data[u] ?? 0),
4606
4606
  r: 3.5,
4607
- fill: w.color ?? j(N),
4607
+ fill: S.color ?? j(N),
4608
4608
  className: "select-chart__dot select-chart__dot--active"
4609
4609
  },
4610
4610
  N
4611
4611
  )),
4612
4612
  n.map(
4613
- (w, N) => N % k === 0 || N === _ - 1 ? /* @__PURE__ */ e("text", { x: p(N), y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: N === 0 ? "start" : N === _ - 1 ? "end" : "middle", children: w }, N) : null
4613
+ (S, N) => N % k === 0 || N === _ - 1 ? /* @__PURE__ */ e("text", { x: p(N), y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: N === 0 ? "start" : N === _ - 1 ? "end" : "middle", children: S }, N) : null
4614
4614
  ),
4615
- n.map((w, N) => /* @__PURE__ */ e(
4615
+ n.map((S, N) => /* @__PURE__ */ e(
4616
4616
  "rect",
4617
4617
  {
4618
- x: p(N) - S / 2,
4618
+ x: p(N) - w / 2,
4619
4619
  y: y.top,
4620
- width: S,
4620
+ width: w,
4621
4621
  height: $,
4622
4622
  fill: "transparent",
4623
4623
  onMouseEnter: () => {
@@ -4627,7 +4627,7 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
4627
4627
  x: p(N),
4628
4628
  y: C,
4629
4629
  place: C < y.top + 52 ? "bottom" : "top",
4630
- title: w,
4630
+ title: S,
4631
4631
  rows: t.map((L, E) => ({ label: L.name, value: c(L.data[N] ?? 0), color: L.color ?? j(E) }))
4632
4632
  });
4633
4633
  },
@@ -4644,7 +4644,7 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
4644
4644
  function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
4645
4645
  const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = new Array(f).fill(0), v = t.map(
4646
4646
  (N) => N.data.map((C, L) => (g[L] = (g[L] ?? 0) + (C ?? 0), g[L]))
4647
- ), y = ye(Math.max(0, ...g)), x = Be, $ = Math.max(0, d - x.left - x.right), _ = l - x.top - x.bottom, p = (N) => x.left + (f <= 1 ? $ / 2 : N / (f - 1) * $), b = (N) => x.top + _ - N / y * _, S = f > 1 ? $ / (f - 1) : $, k = Math.max(1, Math.ceil(f / 7)), M = x.top + _, w = v[v.length - 1];
4647
+ ), y = ye(Math.max(0, ...g)), x = Be, $ = Math.max(0, d - x.left - x.right), _ = l - x.top - x.bottom, p = (N) => x.left + (f <= 1 ? $ / 2 : N / (f - 1) * $), b = (N) => x.top + _ - N / y * _, w = f > 1 ? $ / (f - 1) : $, k = Math.max(1, Math.ceil(f / 7)), M = x.top + _, S = v[v.length - 1];
4648
4648
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
4649
4649
  d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
4650
4650
  /* @__PURE__ */ e("defs", { children: t.map((N, C) => {
@@ -4681,14 +4681,14 @@ function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
4681
4681
  n.map((N, C) => /* @__PURE__ */ e(
4682
4682
  "rect",
4683
4683
  {
4684
- x: p(C) - S / 2,
4684
+ x: p(C) - w / 2,
4685
4685
  y: x.top,
4686
- width: S,
4686
+ width: w,
4687
4687
  height: _,
4688
4688
  fill: "transparent",
4689
4689
  onMouseEnter: () => {
4690
4690
  u(C);
4691
- const L = b((w == null ? void 0 : w[C]) ?? 0);
4691
+ const L = b((S == null ? void 0 : S[C]) ?? 0);
4692
4692
  o.show({
4693
4693
  x: p(C),
4694
4694
  y: L,
@@ -4708,7 +4708,7 @@ function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
4708
4708
  ] });
4709
4709
  }
4710
4710
  function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, formatLine: a = (o) => `${Math.round(o)}%`, className: r, ...d }) {
4711
- const { ref: o, width: i } = ce(c), h = X(), u = te(), [f, g] = D(null), v = { ...Be, right: 58 }, y = Math.max(0, i - v.left - v.right), x = c - v.top - v.bottom, $ = t.length, _ = ye(Math.max(0, ...n.data)), p = ye(Math.max(0, ...l.data)), b = $ > 0 ? y / $ : 0, S = Math.min(b * 0.5, 36), k = Math.max(1, Math.ceil($ / 8)), M = n.color ?? j(0), w = l.color ?? j(1), N = v.top + x, C = (F) => N - F / _ * x, L = (F) => N - F / p * x, E = (F) => v.left + b * F + b / 2, A = l.data.map((F, B) => [E(B), L(F)]);
4711
+ const { ref: o, width: i } = ce(c), h = X(), u = te(), [f, g] = D(null), v = { ...Be, right: 58 }, y = Math.max(0, i - v.left - v.right), x = c - v.top - v.bottom, $ = t.length, _ = ye(Math.max(0, ...n.data)), p = ye(Math.max(0, ...l.data)), b = $ > 0 ? y / $ : 0, w = Math.min(b * 0.5, 36), k = Math.max(1, Math.ceil($ / 8)), M = n.color ?? j(0), S = l.color ?? j(1), N = v.top + x, C = (F) => N - F / _ * x, L = (F) => N - F / p * x, E = (F) => v.left + b * F + b / 2, A = l.data.map((F, B) => [E(B), L(F)]);
4712
4712
  return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: o, children: [
4713
4713
  i > 0 && /* @__PURE__ */ m("svg", { width: i, height: c, className: "select-chart", children: [
4714
4714
  /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${u}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
@@ -4730,14 +4730,14 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4730
4730
  ] }, B)),
4731
4731
  we(p).map((F, B) => /* @__PURE__ */ e("text", { x: i - 4, y: L(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: a(F) }, `r${B}`)),
4732
4732
  n.data.map((F, B) => {
4733
- const T = F / _ * x;
4733
+ const W = F / _ * x;
4734
4734
  return /* @__PURE__ */ e(
4735
4735
  "rect",
4736
4736
  {
4737
- x: E(B) - S / 2,
4738
- y: N - T,
4739
- width: S,
4740
- height: Math.max(0, T),
4737
+ x: E(B) - w / 2,
4738
+ y: N - W,
4739
+ width: w,
4740
+ height: Math.max(0, W),
4741
4741
  rx: 5,
4742
4742
  fill: `url(#${u}-bar)`,
4743
4743
  className: "select-chart__bar",
@@ -4752,7 +4752,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4752
4752
  {
4753
4753
  d: Ge(A),
4754
4754
  fill: "none",
4755
- stroke: w,
4755
+ stroke: S,
4756
4756
  strokeWidth: 2.5,
4757
4757
  strokeLinecap: "round",
4758
4758
  strokeLinejoin: "round",
@@ -4766,7 +4766,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4766
4766
  cx: E(f),
4767
4767
  cy: L(l.data[f] ?? 0),
4768
4768
  r: 4,
4769
- fill: w,
4769
+ fill: S,
4770
4770
  className: "select-chart__dot select-chart__dot--active"
4771
4771
  }
4772
4772
  ),
@@ -4783,15 +4783,15 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4783
4783
  fill: "transparent",
4784
4784
  onMouseEnter: () => {
4785
4785
  g(B);
4786
- const T = Math.min(C(n.data[B] ?? 0), L(l.data[B] ?? 0));
4786
+ const W = Math.min(C(n.data[B] ?? 0), L(l.data[B] ?? 0));
4787
4787
  h.show({
4788
4788
  x: E(B),
4789
- y: T,
4790
- place: T < v.top + 52 ? "bottom" : "top",
4789
+ y: W,
4790
+ place: W < v.top + 52 ? "bottom" : "top",
4791
4791
  title: F,
4792
4792
  rows: [
4793
4793
  { label: n.name, value: s(n.data[B] ?? 0), color: M },
4794
- { label: l.name, value: a(l.data[B] ?? 0), color: w }
4794
+ { label: l.name, value: a(l.data[B] ?? 0), color: S }
4795
4795
  ]
4796
4796
  });
4797
4797
  },
@@ -4807,21 +4807,21 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4807
4807
  }
4808
4808
  const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s = Y, centerLabel: a, legend: r = !0, gap: d = 2, pie: o = !1, className: i, ...h }, u) {
4809
4809
  const f = X(), g = te(), v = q(null), y = Ct(v, l), x = n.reduce((k, M) => k + M.value, 0) || 1, $ = y / 2, _ = y / 2, p = y / 2 - 2, b = o ? 0 : p - c;
4810
- let S = 0;
4810
+ let w = 0;
4811
4811
  return /* @__PURE__ */ m("div", { ref: u, ...h, className: `select-donut-wrap${i ? " " + i : ""}`, children: [
4812
4812
  /* @__PURE__ */ m("div", { ref: v, className: "select-donut-ring", style: { width: `${l / 16}rem`, aspectRatio: "1" }, children: [
4813
4813
  /* @__PURE__ */ m("svg", { width: y, height: y, viewBox: `0 0 ${y} ${y}`, className: "select-chart select-donut", "aria-hidden": "true", children: [
4814
4814
  /* @__PURE__ */ e("defs", { children: n.map((k, M) => {
4815
- const w = k.color ?? j(M);
4815
+ const S = k.color ?? j(M);
4816
4816
  return /* @__PURE__ */ m("linearGradient", { id: `${g}-s${M}`, gradientUnits: "userSpaceOnUse", x1: "0", y1: "0", x2: "0", y2: y, children: [
4817
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: w, stopOpacity: 1 }),
4818
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: w, stopOpacity: 0.6 })
4817
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: S, stopOpacity: 1 }),
4818
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: S, stopOpacity: 0.6 })
4819
4819
  ] }, M);
4820
4820
  }) }),
4821
4821
  n.map((k, M) => {
4822
- const w = S / x * 360;
4823
- S += k.value;
4824
- const N = S / x * 360, C = k.color ?? j(M), E = N - w > d * 1.5 ? d / 2 : 0, A = w + E, F = Math.max(A + 0.01, N - E);
4822
+ const S = w / x * 360;
4823
+ w += k.value;
4824
+ const N = w / x * 360, C = k.color ?? j(M), E = N - S > d * 1.5 ? d / 2 : 0, A = S + E, F = Math.max(A + 0.01, N - E);
4825
4825
  return /* @__PURE__ */ e(
4826
4826
  "path",
4827
4827
  {
@@ -4829,9 +4829,9 @@ const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s
4829
4829
  fill: `url(#${g}-s${M})`,
4830
4830
  className: "select-chart__seg",
4831
4831
  onMouseEnter: () => {
4832
- const B = ((w + N) / 2 - 90) * Math.PI / 180, T = $ + (p + 6) * Math.cos(B), P = _ + (p + 6) * Math.sin(B);
4832
+ const B = ((S + N) / 2 - 90) * Math.PI / 180, W = $ + (p + 6) * Math.cos(B), P = _ + (p + 6) * Math.sin(B);
4833
4833
  f.show({
4834
- x: T,
4834
+ x: W,
4835
4835
  y: P,
4836
4836
  place: P <= _ ? "top" : "bottom",
4837
4837
  title: k.label,
@@ -4855,17 +4855,17 @@ const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s
4855
4855
  ] });
4856
4856
  });
4857
4857
  function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s = !1, className: a, ...r }) {
4858
- const { ref: d, width: o } = ce(l), i = X(), h = te(), u = n.length, f = t.length || 1, g = n.map((M, w) => t.reduce((N, C) => N + (C.data[w] ?? 0), 0)), v = ye(s ? Math.max(0, ...g) : Math.max(0, ...t.flatMap((M) => M.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = y.top + $, p = u ? x / u : 0, b = (M) => _ - M / v * $, S = Math.min(p * 0.72, f * 40), k = s ? Math.min(p * 0.5, 44) : S / f;
4858
+ const { ref: d, width: o } = ce(l), i = X(), h = te(), u = n.length, f = t.length || 1, g = n.map((M, S) => t.reduce((N, C) => N + (C.data[S] ?? 0), 0)), v = ye(s ? Math.max(0, ...g) : Math.max(0, ...t.flatMap((M) => M.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = y.top + $, p = u ? x / u : 0, b = (M) => _ - M / v * $, w = Math.min(p * 0.72, f * 40), k = s ? Math.min(p * 0.5, 44) : w / f;
4859
4859
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
4860
4860
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
4861
- /* @__PURE__ */ e("defs", { children: t.map((M, w) => {
4862
- const N = M.color ?? j(w);
4863
- return /* @__PURE__ */ m("linearGradient", { id: `${h}-c${w}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
4861
+ /* @__PURE__ */ e("defs", { children: t.map((M, S) => {
4862
+ const N = M.color ?? j(S);
4863
+ return /* @__PURE__ */ m("linearGradient", { id: `${h}-c${S}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
4864
4864
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: N, stopOpacity: 1 }),
4865
4865
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: N, stopOpacity: 0.62 })
4866
- ] }, w);
4866
+ ] }, S);
4867
4867
  }) }),
4868
- we(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
4868
+ we(v).map((M, S) => /* @__PURE__ */ m("g", { children: [
4869
4869
  /* @__PURE__ */ e(
4870
4870
  "line",
4871
4871
  {
@@ -4873,17 +4873,17 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
4873
4873
  x2: o - y.right,
4874
4874
  y1: b(M),
4875
4875
  y2: b(M),
4876
- className: w === 0 ? "select-chart__axis" : "select-chart__grid"
4876
+ className: S === 0 ? "select-chart__axis" : "select-chart__grid"
4877
4877
  }
4878
4878
  ),
4879
4879
  /* @__PURE__ */ e("text", { x: y.left - 8, y: b(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
4880
- ] }, w)),
4881
- n.map((M, w) => {
4882
- const N = y.left + p * w;
4880
+ ] }, S)),
4881
+ n.map((M, S) => {
4882
+ const N = y.left + p * S;
4883
4883
  if (s) {
4884
4884
  let L = 0;
4885
4885
  return /* @__PURE__ */ e("g", { children: t.map((E, A) => {
4886
- const F = (E.data[w] ?? 0) / v * $, B = _ - L - F;
4886
+ const F = (E.data[S] ?? 0) / v * $, B = _ - L - F;
4887
4887
  return L += F, /* @__PURE__ */ e(
4888
4888
  "rect",
4889
4889
  {
@@ -4894,15 +4894,15 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
4894
4894
  rx: 3,
4895
4895
  fill: `url(#${h}-c${A})`,
4896
4896
  className: "select-chart__bar",
4897
- style: { animationDelay: `${w * 30}ms` }
4897
+ style: { animationDelay: `${S * 30}ms` }
4898
4898
  },
4899
4899
  A
4900
4900
  );
4901
- }) }, w);
4901
+ }) }, S);
4902
4902
  }
4903
- const C = N + (p - S) / 2;
4903
+ const C = N + (p - w) / 2;
4904
4904
  return /* @__PURE__ */ e("g", { children: t.map((L, E) => {
4905
- const A = (L.data[w] ?? 0) / v * $;
4905
+ const A = (L.data[S] ?? 0) / v * $;
4906
4906
  return /* @__PURE__ */ e(
4907
4907
  "rect",
4908
4908
  {
@@ -4913,33 +4913,33 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
4913
4913
  rx: 3,
4914
4914
  fill: `url(#${h}-c${E})`,
4915
4915
  className: "select-chart__bar",
4916
- style: { animationDelay: `${(w * f + E) * 25}ms` }
4916
+ style: { animationDelay: `${(S * f + E) * 25}ms` }
4917
4917
  },
4918
4918
  E
4919
4919
  );
4920
- }) }, w);
4920
+ }) }, S);
4921
4921
  }),
4922
- n.map((M, w) => /* @__PURE__ */ e("text", { x: y.left + p * w + p / 2, y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: M }, w)),
4923
- n.map((M, w) => {
4924
- const N = s ? b(g[w] ?? 0) : Math.min(...t.map((C) => b(C.data[w] ?? 0)));
4922
+ n.map((M, S) => /* @__PURE__ */ e("text", { x: y.left + p * S + p / 2, y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: M }, S)),
4923
+ n.map((M, S) => {
4924
+ const N = s ? b(g[S] ?? 0) : Math.min(...t.map((C) => b(C.data[S] ?? 0)));
4925
4925
  return /* @__PURE__ */ e(
4926
4926
  "rect",
4927
4927
  {
4928
- x: y.left + p * w,
4928
+ x: y.left + p * S,
4929
4929
  y: y.top,
4930
4930
  width: p,
4931
4931
  height: $,
4932
4932
  fill: "transparent",
4933
4933
  onMouseEnter: () => i.show({
4934
- x: y.left + p * w + p / 2,
4934
+ x: y.left + p * S + p / 2,
4935
4935
  y: N,
4936
4936
  place: N < y.top + 52 ? "bottom" : "top",
4937
4937
  title: M,
4938
- rows: t.map((C, L) => ({ label: C.name, value: c(C.data[w] ?? 0), color: C.color ?? j(L) }))
4938
+ rows: t.map((C, L) => ({ label: C.name, value: c(C.data[S] ?? 0), color: C.color ?? j(L) }))
4939
4939
  }),
4940
4940
  onMouseLeave: i.hide
4941
4941
  },
4942
- `h${w}`
4942
+ `h${S}`
4943
4943
  );
4944
4944
  })
4945
4945
  ] }),
@@ -5022,48 +5022,51 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
5022
5022
  ] }),
5023
5023
  c != null && /* @__PURE__ */ e("div", { className: "select-gauge__caption", children: c })
5024
5024
  ] });
5025
- }), ao = R(function({ columns: n, rows: l, format: c = Y, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min: d, max: o, cellSize: i = 40, className: h, ...u }, f) {
5026
- const g = X(), v = l.flatMap((b) => b.values).filter((b) => b != null && Number.isFinite(b)), y = d ?? (v.length ? Math.min(...v) : 0), $ = (o ?? (v.length ? Math.max(...v) : 1)) - y || 1, _ = { "--heat-color": a }, p = {
5027
- gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${i}px, 1fr))`
5025
+ }), ao = R(function({ columns: n, rows: l, format: c = Y, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min: d, max: o, cellSize: i = 40, maxCellSize: h = 96, className: u, ...f }, g) {
5026
+ const v = X(), y = l.flatMap((w) => w.values).filter((w) => w != null && Number.isFinite(w)), x = d ?? (y.length ? Math.min(...y) : 0), _ = (o ?? (y.length ? Math.max(...y) : 1)) - x || 1, p = { "--heat-color": a }, b = {
5027
+ gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${i}px, ${Math.max(i, h)}px))`,
5028
+ width: "fit-content",
5029
+ maxWidth: "100%",
5030
+ minWidth: 0
5028
5031
  };
5029
- return /* @__PURE__ */ m("div", { ref: f, ...u, className: `select-chart-wrap select-heatmap${h ? " " + h : ""}`, style: _, children: [
5030
- /* @__PURE__ */ m("div", { className: "select-heatmap__grid", style: p, children: [
5032
+ return /* @__PURE__ */ m("div", { ref: g, ...f, className: `select-chart-wrap select-heatmap${u ? " " + u : ""}`, style: p, children: [
5033
+ /* @__PURE__ */ m("div", { className: "select-heatmap__grid", style: b, children: [
5031
5034
  /* @__PURE__ */ e("div", { className: "select-heatmap__corner" }),
5032
- n.map((b) => /* @__PURE__ */ e("div", { className: "select-heatmap__colhead", children: b }, b)),
5033
- l.map((b) => /* @__PURE__ */ m(Yt, { children: [
5034
- /* @__PURE__ */ e("div", { className: "select-heatmap__rowhead", children: b.label }),
5035
- b.values.map((S, k) => {
5036
- const M = `${b.label}-${n[k] ?? k}`;
5037
- if (S == null || !Number.isFinite(S))
5038
- return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty" }, M);
5039
- const w = Math.max(0, Math.min(1, (S - y) / $)), N = Math.round((0.14 + w * 0.86) * 100), C = Math.max(6, N - 16);
5035
+ n.map((w) => /* @__PURE__ */ e("div", { className: "select-heatmap__colhead", children: w }, w)),
5036
+ l.map((w) => /* @__PURE__ */ m(Yt, { children: [
5037
+ /* @__PURE__ */ e("div", { className: "select-heatmap__rowhead", children: w.label }),
5038
+ w.values.map((k, M) => {
5039
+ const S = `${w.label}-${n[M] ?? M}`;
5040
+ if (k == null || !Number.isFinite(k))
5041
+ return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty" }, S);
5042
+ const N = Math.max(0, Math.min(1, (k - x) / _)), C = Math.round((0.14 + N * 0.86) * 100), L = Math.max(6, C - 16);
5040
5043
  return /* @__PURE__ */ e(
5041
5044
  "div",
5042
5045
  {
5043
5046
  className: "select-heatmap__cell",
5044
5047
  style: {
5045
- background: `linear-gradient(150deg, color-mix(in srgb, ${a} ${C}%, transparent), color-mix(in srgb, ${a} ${N}%, transparent))`,
5046
- color: w > 0.55 ? "#fff" : "var(--select-text)"
5048
+ background: `linear-gradient(150deg, color-mix(in srgb, ${a} ${L}%, transparent), color-mix(in srgb, ${a} ${C}%, transparent))`,
5049
+ color: N > 0.55 ? "#fff" : "var(--select-text)"
5047
5050
  },
5048
- onMouseEnter: (L) => {
5049
- const E = L.currentTarget.closest(".select-chart-wrap"), A = L.currentTarget.getBoundingClientRect(), F = E == null ? void 0 : E.getBoundingClientRect(), B = F ? A.top - F.top : 0, T = B < 64 ? "bottom" : "top", P = (F ? A.left - F.left : 0) + A.width / 2, O = T === "bottom" ? F ? A.bottom - F.top : 0 : B;
5050
- g.show({
5051
- x: P,
5052
- y: O,
5053
- place: T,
5054
- title: `${b.label} · ${n[k] ?? ""}`,
5055
- rows: [{ label: "Valor", value: (s ?? c)(S), color: a }]
5051
+ onMouseEnter: (E) => {
5052
+ const A = E.currentTarget.closest(".select-chart-wrap"), F = E.currentTarget.getBoundingClientRect(), B = A == null ? void 0 : A.getBoundingClientRect(), W = B ? F.top - B.top : 0, P = W < 64 ? "bottom" : "top", O = (B ? F.left - B.left : 0) + F.width / 2, T = P === "bottom" ? B ? F.bottom - B.top : 0 : W;
5053
+ v.show({
5054
+ x: O,
5055
+ y: T,
5056
+ place: P,
5057
+ title: `${w.label} · ${n[M] ?? ""}`,
5058
+ rows: [{ label: "Valor", value: (s ?? c)(k), color: a }]
5056
5059
  });
5057
5060
  },
5058
- onMouseLeave: g.hide,
5059
- children: r ? c(S) : ""
5061
+ onMouseLeave: v.hide,
5062
+ children: r ? c(k) : ""
5060
5063
  },
5061
- M
5064
+ S
5062
5065
  );
5063
5066
  })
5064
- ] }, b.label))
5067
+ ] }, w.label))
5065
5068
  ] }),
5066
- /* @__PURE__ */ e(K, { tip: g.tip })
5069
+ /* @__PURE__ */ e(K, { tip: v.tip })
5067
5070
  ] });
5068
5071
  });
5069
5072
  function oo({
@@ -5150,14 +5153,14 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5150
5153
  const g = n ?? t.length * 36 + 6 + 26, { ref: v, width: y } = ce(g), x = X(), $ = te(), _ = ye(Math.max(0, ...t.map((F) => F.value))), p = t.reduce((F, B) => Math.max(F, B.label.length), 0), b = Math.min(
5151
5154
  Math.max(Bn, p * En + Tt),
5152
5155
  Math.max(Bn, y * As)
5153
- ), S = r ?? b, k = Math.max(3, Math.floor((S - Tt) / En)), M = (F) => F.length <= k ? F : `${F.slice(0, k - 1).trimEnd()}…`, w = Math.max(0, y - S - 28), N = g - 6 - 26, C = t.length ? N / t.length : 0, L = Math.min(C * 0.62, 22), E = (F) => S + F / _ * w, A = (F, B) => F.color ?? (a ? j(B) : l ?? j(0));
5156
+ ), w = r ?? b, k = Math.max(3, Math.floor((w - Tt) / En)), M = (F) => F.length <= k ? F : `${F.slice(0, k - 1).trimEnd()}…`, S = Math.max(0, y - w - 28), N = g - 6 - 26, C = t.length ? N / t.length : 0, L = Math.min(C * 0.62, 22), E = (F) => w + F / _ * S, A = (F, B) => F.color ?? (a ? j(B) : l ?? j(0));
5154
5157
  return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: v, children: [
5155
5158
  y > 0 && /* @__PURE__ */ m("svg", { width: y, height: g, className: "select-chart", children: [
5156
5159
  /* @__PURE__ */ e("defs", { children: t.map((F, B) => {
5157
- const T = A(F, B);
5160
+ const W = A(F, B);
5158
5161
  return /* @__PURE__ */ m("linearGradient", { id: `${$}-h${B}`, x1: "0", y1: "0", x2: "1", y2: "0", children: [
5159
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: T, stopOpacity: 1 }),
5160
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: T, stopOpacity: 0.5 })
5162
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: W, stopOpacity: 1 }),
5163
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: W, stopOpacity: 0.5 })
5161
5164
  ] }, B);
5162
5165
  }) }),
5163
5166
  we(_).map((F, B) => /* @__PURE__ */ m("g", { children: [
@@ -5174,14 +5177,14 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5174
5177
  /* @__PURE__ */ e("text", { x: E(F), y: g - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: c(F) })
5175
5178
  ] }, B)),
5176
5179
  t.map((F, B) => {
5177
- const T = 6 + C * B + C / 2, P = F.value / _ * w, O = A(F, B);
5180
+ const W = 6 + C * B + C / 2, P = F.value / _ * S, O = A(F, B);
5178
5181
  return /* @__PURE__ */ m("g", { children: [
5179
- /* @__PURE__ */ e("rect", { x: S, y: T - L / 2, width: w, height: L, rx: 5, className: "select-chart__track-bar" }),
5182
+ /* @__PURE__ */ e("rect", { x: w, y: W - L / 2, width: S, height: L, rx: 5, className: "select-chart__track-bar" }),
5180
5183
  /* @__PURE__ */ e(
5181
5184
  "rect",
5182
5185
  {
5183
- x: S,
5184
- y: T - L / 2,
5186
+ x: w,
5187
+ y: W - L / 2,
5185
5188
  width: Math.max(0, P),
5186
5189
  height: L,
5187
5190
  rx: 5,
@@ -5189,9 +5192,9 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5189
5192
  className: "select-chart__hbar",
5190
5193
  style: { animationDelay: `${B * 40}ms` },
5191
5194
  onMouseEnter: () => x.show({
5192
- x: S + P,
5193
- y: T - L / 2,
5194
- place: T - L / 2 < 50 ? "bottom" : "top",
5195
+ x: w + P,
5196
+ y: W - L / 2,
5197
+ place: W - L / 2 < 50 ? "bottom" : "top",
5195
5198
  rows: [{ label: F.label, value: (s ?? c)(F.value), color: O }]
5196
5199
  }),
5197
5200
  onMouseLeave: x.hide
@@ -5200,8 +5203,8 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5200
5203
  /* @__PURE__ */ m(
5201
5204
  "text",
5202
5205
  {
5203
- x: S - Tt / 2,
5204
- y: T,
5206
+ x: w - Tt / 2,
5207
+ y: W,
5205
5208
  className: "select-chart__ylabel",
5206
5209
  dominantBaseline: "middle",
5207
5210
  textAnchor: "end",
@@ -5229,7 +5232,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5229
5232
  total: "var(--select-chart-1)",
5230
5233
  inc: "var(--select-chart-4)",
5231
5234
  dec: "var(--select-chart-3)"
5232
- }, S = (k) => k.total ? "total" : k.value >= 0 ? "inc" : "dec";
5235
+ }, w = (k) => k.total ? "total" : k.value >= 0 ? "inc" : "dec";
5233
5236
  return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
5234
5237
  r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
5235
5238
  /* @__PURE__ */ e("defs", { children: ["total", "inc", "dec"].map((k) => /* @__PURE__ */ m("linearGradient", { id: `${o}-${k}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
@@ -5250,16 +5253,16 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5250
5253
  /* @__PURE__ */ e("text", { x: f.left - 8, y: p(k), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(k) })
5251
5254
  ] }, M)),
5252
5255
  h.slice(0, -1).map((k, M) => {
5253
- const w = f.left + $ * M + $ / 2 + _ / 2, N = f.left + $ * (M + 1) + $ / 2 - _ / 2;
5254
- return /* @__PURE__ */ e("line", { x1: w, x2: N, y1: p(k.end), y2: p(k.end), className: "select-chart__crosshair" }, `c${M}`);
5256
+ const S = f.left + $ * M + $ / 2 + _ / 2, N = f.left + $ * (M + 1) + $ / 2 - _ / 2;
5257
+ return /* @__PURE__ */ e("line", { x1: S, x2: N, y1: p(k.end), y2: p(k.end), className: "select-chart__crosshair" }, `c${M}`);
5255
5258
  }),
5256
5259
  h.map((k, M) => {
5257
- const w = f.left + $ * M + $ / 2, N = p(Math.max(k.start, k.end)), C = Math.abs(p(k.start) - p(k.end)), L = S(k);
5260
+ const S = f.left + $ * M + $ / 2, N = p(Math.max(k.start, k.end)), C = Math.abs(p(k.start) - p(k.end)), L = w(k);
5258
5261
  return /* @__PURE__ */ m("g", { children: [
5259
5262
  /* @__PURE__ */ e(
5260
5263
  "rect",
5261
5264
  {
5262
- x: w - _ / 2,
5265
+ x: S - _ / 2,
5263
5266
  y: N,
5264
5267
  width: _,
5265
5268
  height: Math.max(2, C),
@@ -5268,7 +5271,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5268
5271
  className: "select-chart__bar",
5269
5272
  style: { animationDelay: `${M * 40}ms` },
5270
5273
  onMouseEnter: () => d.show({
5271
- x: w,
5274
+ x: S,
5272
5275
  y: N,
5273
5276
  place: N < f.top + 52 ? "bottom" : "top",
5274
5277
  title: k.label,
@@ -5280,7 +5283,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5280
5283
  onMouseLeave: d.hide
5281
5284
  }
5282
5285
  ),
5283
- /* @__PURE__ */ e("text", { x: w, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k.label })
5286
+ /* @__PURE__ */ e("text", { x: S, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k.label })
5284
5287
  ] }, M);
5285
5288
  })
5286
5289
  ] }),
@@ -5345,16 +5348,16 @@ function Fs(t, n, l) {
5345
5348
  if (i >= h) {
5346
5349
  const p = _ / h;
5347
5350
  let b = o;
5348
- $.forEach((S, k) => {
5351
+ $.forEach((w, k) => {
5349
5352
  const M = x[k] / p;
5350
- c.push({ x: d, y: b, w: p, h: M, idx: S }), b += M;
5353
+ c.push({ x: d, y: b, w: p, h: M, idx: w }), b += M;
5351
5354
  }), a(r.slice(y), d + p, o, i - p, h);
5352
5355
  } else {
5353
5356
  const p = _ / i;
5354
5357
  let b = d;
5355
- $.forEach((S, k) => {
5358
+ $.forEach((w, k) => {
5356
5359
  const M = x[k] / p;
5357
- c.push({ x: b, y: o, w: M, h: p, idx: S }), b += M;
5360
+ c.push({ x: b, y: o, w: M, h: p, idx: w }), b += M;
5358
5361
  }), a(r.slice(y), d, o + p, i, h - p);
5359
5362
  }
5360
5363
  };
@@ -5409,36 +5412,36 @@ function po({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5409
5412
  ] });
5410
5413
  }
5411
5414
  function mo({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax: s, yMax: a, maxRadius: r = 18, className: d, ...o }) {
5412
- const { ref: i, width: h } = ce(n), u = X(), f = t.flatMap((M) => M.points), g = ye(s ?? Math.max(0, ...f.map((M) => M.x))), v = ye(a ?? Math.max(0, ...f.map((M) => M.y))), y = Math.max(1, ...f.map((M) => M.r ?? 0)), x = Be, $ = Math.max(0, h - x.left - x.right), _ = n - x.top - x.bottom, p = x.top + _, b = (M) => x.left + M / g * $, S = (M) => p - M / v * _, k = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(y) * (r - 4) : 4.5;
5415
+ const { ref: i, width: h } = ce(n), u = X(), f = t.flatMap((M) => M.points), g = ye(s ?? Math.max(0, ...f.map((M) => M.x))), v = ye(a ?? Math.max(0, ...f.map((M) => M.y))), y = Math.max(1, ...f.map((M) => M.r ?? 0)), x = Be, $ = Math.max(0, h - x.left - x.right), _ = n - x.top - x.bottom, p = x.top + _, b = (M) => x.left + M / g * $, w = (M) => p - M / v * _, k = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(y) * (r - 4) : 4.5;
5413
5416
  return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
5414
5417
  h > 0 && /* @__PURE__ */ m("svg", { width: h, height: n, className: "select-chart", children: [
5415
- we(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
5418
+ we(v).map((M, S) => /* @__PURE__ */ m("g", { children: [
5416
5419
  /* @__PURE__ */ e(
5417
5420
  "line",
5418
5421
  {
5419
5422
  x1: x.left,
5420
5423
  x2: h - x.right,
5421
- y1: S(M),
5422
- y2: S(M),
5423
- className: w === 0 ? "select-chart__axis" : "select-chart__grid"
5424
+ y1: w(M),
5425
+ y2: w(M),
5426
+ className: S === 0 ? "select-chart__axis" : "select-chart__grid"
5424
5427
  }
5425
5428
  ),
5426
- /* @__PURE__ */ e("text", { x: x.left - 8, y: S(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
5427
- ] }, `y${w}`)),
5428
- we(g).map((M, w, N) => /* @__PURE__ */ e("text", { x: b(M), y: n - x.bottom + 16, className: "select-chart__xlabel", textAnchor: w === 0 ? "start" : w === N.length - 1 ? "end" : "middle", children: l(M) }, `x${w}`)),
5429
- t.map((M, w) => {
5430
- const N = M.color ?? j(w);
5429
+ /* @__PURE__ */ e("text", { x: x.left - 8, y: w(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
5430
+ ] }, `y${S}`)),
5431
+ we(g).map((M, S, N) => /* @__PURE__ */ e("text", { x: b(M), y: n - x.bottom + 16, className: "select-chart__xlabel", textAnchor: S === 0 ? "start" : S === N.length - 1 ? "end" : "middle", children: l(M) }, `x${S}`)),
5432
+ t.map((M, S) => {
5433
+ const N = M.color ?? j(S);
5431
5434
  return /* @__PURE__ */ e("g", { fill: N, children: M.points.map((C, L) => /* @__PURE__ */ e(
5432
5435
  "circle",
5433
5436
  {
5434
5437
  cx: b(C.x),
5435
- cy: S(C.y),
5438
+ cy: w(C.y),
5436
5439
  r: k(C),
5437
5440
  className: "select-chart__point",
5438
5441
  onMouseEnter: () => u.show({
5439
5442
  x: b(C.x),
5440
- y: S(C.y) - k(C),
5441
- place: S(C.y) - k(C) < x.top + 52 ? "bottom" : "top",
5443
+ y: w(C.y) - k(C),
5444
+ place: w(C.y) - k(C) < x.top + 52 ? "bottom" : "top",
5442
5445
  title: C.label ?? M.name,
5443
5446
  rows: [
5444
5447
  { label: "X", value: l(C.x), color: N },
@@ -5449,32 +5452,32 @@ function mo({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax:
5449
5452
  onMouseLeave: u.hide
5450
5453
  },
5451
5454
  L
5452
- )) }, w);
5455
+ )) }, S);
5453
5456
  })
5454
5457
  ] }),
5455
5458
  /* @__PURE__ */ e(K, { tip: u.tip })
5456
5459
  ] });
5457
5460
  }
5458
5461
  const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y, levels: r = 4, legend: d = !0, className: o, ...i }, h) {
5459
- const u = X(), f = te(), g = n.length, v = c / 2, y = c / 2, x = c / 2 - 30, $ = s ?? ye(Math.max(1, ...l.flatMap((S) => S.values))), _ = (S) => (-90 + S * 360 / g) * Math.PI / 180, p = (S, k) => [v + k * Math.cos(_(S)), y + k * Math.sin(_(S))], b = (S) => S.map((k, M) => `${M === 0 ? "M" : "L"}${p(M, k).map((w) => w.toFixed(2)).join(",")}`).join(" ") + " Z";
5462
+ const u = X(), f = te(), g = n.length, v = c / 2, y = c / 2, x = c / 2 - 30, $ = s ?? ye(Math.max(1, ...l.flatMap((w) => w.values))), _ = (w) => (-90 + w * 360 / g) * Math.PI / 180, p = (w, k) => [v + k * Math.cos(_(w)), y + k * Math.sin(_(w))], b = (w) => w.map((k, M) => `${M === 0 ? "M" : "L"}${p(M, k).map((S) => S.toFixed(2)).join(",")}`).join(" ") + " Z";
5460
5463
  return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
5461
5464
  /* @__PURE__ */ m("div", { className: "select-radar", style: { width: c, aspectRatio: "1" }, children: [
5462
5465
  /* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
5463
- /* @__PURE__ */ e("defs", { children: l.map((S, k) => {
5464
- const M = S.color ?? j(k);
5466
+ /* @__PURE__ */ e("defs", { children: l.map((w, k) => {
5467
+ const M = w.color ?? j(k);
5465
5468
  return /* @__PURE__ */ m("radialGradient", { id: `${f}-rd${k}`, children: [
5466
5469
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: M, stopOpacity: 0.32 }),
5467
5470
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: M, stopOpacity: 0.12 })
5468
5471
  ] }, k);
5469
5472
  }) }),
5470
- Array.from({ length: r }, (S, k) => {
5473
+ Array.from({ length: r }, (w, k) => {
5471
5474
  const M = x * (k + 1) / r;
5472
5475
  return /* @__PURE__ */ e("path", { d: b(n.map(() => M)), className: "select-chart__grid", fill: "none" }, k);
5473
5476
  }),
5474
- n.map((S, k) => {
5475
- const [M, w] = p(k, x), [N, C] = p(k, x + 14);
5477
+ n.map((w, k) => {
5478
+ const [M, S] = p(k, x), [N, C] = p(k, x + 14);
5476
5479
  return /* @__PURE__ */ m("g", { children: [
5477
- /* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: w, className: "select-chart__grid" }),
5480
+ /* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: S, className: "select-chart__grid" }),
5478
5481
  /* @__PURE__ */ e(
5479
5482
  "text",
5480
5483
  {
@@ -5483,16 +5486,16 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5483
5486
  className: "select-chart__xlabel",
5484
5487
  textAnchor: Math.abs(N - v) < 4 ? "middle" : N > v ? "start" : "end",
5485
5488
  dominantBaseline: "middle",
5486
- children: S
5489
+ children: w
5487
5490
  }
5488
5491
  )
5489
5492
  ] }, k);
5490
5493
  }),
5491
- l.map((S, k) => {
5492
- const M = S.color ?? j(k), w = S.values.map((N) => Math.max(0, N) / $ * x);
5494
+ l.map((w, k) => {
5495
+ const M = w.color ?? j(k), S = w.values.map((N) => Math.max(0, N) / $ * x);
5493
5496
  return /* @__PURE__ */ m("g", { children: [
5494
- /* @__PURE__ */ e("path", { d: b(w), fill: `url(#${f}-rd${k})`, stroke: M, strokeWidth: 2, strokeLinejoin: "round", className: "select-chart__area" }),
5495
- w.map((N, C) => {
5497
+ /* @__PURE__ */ e("path", { d: b(S), fill: `url(#${f}-rd${k})`, stroke: M, strokeWidth: 2, strokeLinejoin: "round", className: "select-chart__area" }),
5498
+ S.map((N, C) => {
5496
5499
  const [L, E] = p(C, N);
5497
5500
  return /* @__PURE__ */ e(
5498
5501
  "circle",
@@ -5507,7 +5510,7 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5507
5510
  y: E,
5508
5511
  place: E < 44 ? "bottom" : "top",
5509
5512
  title: n[C],
5510
- rows: [{ label: S.name, value: a(S.values[C] ?? 0), color: M }]
5513
+ rows: [{ label: w.name, value: a(w.values[C] ?? 0), color: M }]
5511
5514
  }),
5512
5515
  onMouseLeave: u.hide
5513
5516
  },
@@ -5519,9 +5522,9 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5519
5522
  ] }),
5520
5523
  /* @__PURE__ */ e(K, { tip: u.tip })
5521
5524
  ] }),
5522
- d && l.length > 1 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: l.map((S, k) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
5523
- /* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: S.color ?? j(k) } }),
5524
- /* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: S.name })
5525
+ d && l.length > 1 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: l.map((w, k) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
5526
+ /* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: w.color ?? j(k) } }),
5527
+ /* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: w.name })
5525
5528
  ] }, k)) })
5526
5529
  ] });
5527
5530
  });
@@ -5533,24 +5536,24 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5533
5536
  const E = /* @__PURE__ */ new Map();
5534
5537
  let A = v;
5535
5538
  return N.forEach((F, B) => {
5536
- const T = g(F, C) * _;
5537
- E.set(F, { name: F, y: A, h: T, cursor: A, color: j(B + L) }), A += T + s;
5539
+ const W = g(F, C) * _;
5540
+ E.set(F, { name: F, y: A, h: W, cursor: A, color: j(B + L) }), A += W + s;
5538
5541
  }), E;
5539
- }, b = p(h, "source", 0), S = p(u, "target", h.length), k = c, M = o - c, w = (k + M) / 2;
5542
+ }, b = p(h, "source", 0), w = p(u, "target", h.length), k = c, M = o - c, S = (k + M) / 2;
5540
5543
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
5541
5544
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
5542
5545
  t.map((N, C) => {
5543
- const L = b.get(N.source), E = S.get(N.target), A = N.value * _, F = L.cursor, B = E.cursor;
5546
+ const L = b.get(N.source), E = w.get(N.target), A = N.value * _, F = L.cursor, B = E.cursor;
5544
5547
  L.cursor += A, E.cursor += A;
5545
- const T = `M${k},${F} C${w},${F} ${w},${B} ${M},${B} L${M},${B + A} C${w},${B + A} ${w},${F + A} ${k},${F + A} Z`;
5548
+ const W = `M${k},${F} C${S},${F} ${S},${B} ${M},${B} L${M},${B + A} C${S},${B + A} ${S},${F + A} ${k},${F + A} Z`;
5546
5549
  return /* @__PURE__ */ e(
5547
5550
  "path",
5548
5551
  {
5549
- d: T,
5552
+ d: W,
5550
5553
  fill: L.color,
5551
5554
  className: "select-sankey__link",
5552
5555
  onMouseEnter: () => i.show({
5553
- x: w,
5556
+ x: S,
5554
5557
  y: (F + B + A) / 2,
5555
5558
  place: "top",
5556
5559
  title: `${N.source} → ${N.target}`,
@@ -5565,7 +5568,7 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5565
5568
  /* @__PURE__ */ e("rect", { x: 0, y: N.y, width: c, height: Math.max(1, N.h), rx: 3, fill: N.color, className: "select-sankey__node" }),
5566
5569
  /* @__PURE__ */ e("text", { x: c + 6, y: N.y + N.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "start", children: N.name })
5567
5570
  ] }, `s${C}`)),
5568
- [...S.values()].map((N, C) => /* @__PURE__ */ m("g", { children: [
5571
+ [...w.values()].map((N, C) => /* @__PURE__ */ m("g", { children: [
5569
5572
  /* @__PURE__ */ e("rect", { x: o - c, y: N.y, width: c, height: Math.max(1, N.h), rx: 3, fill: N.color, className: "select-sankey__node" }),
5570
5573
  /* @__PURE__ */ e("text", { x: o - c - 6, y: N.y + N.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "end", children: N.name })
5571
5574
  ] }, `t${C}`))
@@ -5574,46 +5577,46 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5574
5577
  ] });
5575
5578
  }
5576
5579
  function vo({ data: t, height: n = 240, format: l = Y, upColor: c = "var(--select-chart-4)", downColor: s = "var(--select-chart-3)", className: a, ...r }) {
5577
- const { ref: d, width: o } = ce(n), i = X(), h = Be, u = Math.max(0, o - h.left - h.right), f = n - h.top - h.bottom, g = h.top + f, v = Math.max(1, ...t.map((w) => w.high)), y = Math.min(v, ...t.map((w) => w.low)), x = (v - y) * 0.08 || 1, $ = y - x, _ = v + x, p = (w) => g - (w - $) / (_ - $) * f, b = t.length, S = b ? u / b : 0, k = Math.min(S * 0.5, 18), M = Array.from({ length: 5 }, (w, N) => $ + (_ - $) * N / 4);
5580
+ const { ref: d, width: o } = ce(n), i = X(), h = Be, u = Math.max(0, o - h.left - h.right), f = n - h.top - h.bottom, g = h.top + f, v = Math.max(1, ...t.map((S) => S.high)), y = Math.min(v, ...t.map((S) => S.low)), x = (v - y) * 0.08 || 1, $ = y - x, _ = v + x, p = (S) => g - (S - $) / (_ - $) * f, b = t.length, w = b ? u / b : 0, k = Math.min(w * 0.5, 18), M = Array.from({ length: 5 }, (S, N) => $ + (_ - $) * N / 4);
5578
5581
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
5579
5582
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
5580
- M.map((w, N) => /* @__PURE__ */ m("g", { children: [
5583
+ M.map((S, N) => /* @__PURE__ */ m("g", { children: [
5581
5584
  /* @__PURE__ */ e(
5582
5585
  "line",
5583
5586
  {
5584
5587
  x1: h.left,
5585
5588
  x2: o - h.right,
5586
- y1: p(w),
5587
- y2: p(w),
5589
+ y1: p(S),
5590
+ y2: p(S),
5588
5591
  className: N === 0 ? "select-chart__axis" : "select-chart__grid"
5589
5592
  }
5590
5593
  ),
5591
- /* @__PURE__ */ e("text", { x: h.left - 8, y: p(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(w) })
5594
+ /* @__PURE__ */ e("text", { x: h.left - 8, y: p(S), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(S) })
5592
5595
  ] }, N)),
5593
- t.map((w, N) => {
5594
- const C = h.left + S * N + S / 2, L = w.close >= w.open, E = L ? c : s, A = p(Math.max(w.open, w.close)), F = Math.max(1, Math.abs(p(w.open) - p(w.close)));
5596
+ t.map((S, N) => {
5597
+ const C = h.left + w * N + w / 2, L = S.close >= S.open, E = L ? c : s, A = p(Math.max(S.open, S.close)), F = Math.max(1, Math.abs(p(S.open) - p(S.close)));
5595
5598
  return /* @__PURE__ */ m("g", { children: [
5596
- /* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(w.high), y2: p(w.low), stroke: E, strokeWidth: 1.5 }),
5599
+ /* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(S.high), y2: p(S.low), stroke: E, strokeWidth: 1.5 }),
5597
5600
  /* @__PURE__ */ e("rect", { x: C - k / 2, y: A, width: k, height: F, rx: 2, fill: E, fillOpacity: L ? 0.9 : 0.78 }),
5598
- /* @__PURE__ */ e("text", { x: C, y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: w.label }),
5601
+ /* @__PURE__ */ e("text", { x: C, y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: S.label }),
5599
5602
  /* @__PURE__ */ e(
5600
5603
  "rect",
5601
5604
  {
5602
- x: h.left + S * N,
5605
+ x: h.left + w * N,
5603
5606
  y: h.top,
5604
- width: S,
5607
+ width: w,
5605
5608
  height: f,
5606
5609
  fill: "transparent",
5607
5610
  onMouseEnter: () => i.show({
5608
5611
  x: C,
5609
- y: p(w.high),
5610
- place: p(w.high) < h.top + 64 ? "bottom" : "top",
5611
- title: w.label,
5612
+ y: p(S.high),
5613
+ place: p(S.high) < h.top + 64 ? "bottom" : "top",
5614
+ title: S.label,
5612
5615
  rows: [
5613
- { label: "Abertura", value: l(w.open), color: E },
5614
- { label: "Máxima", value: l(w.high) },
5615
- { label: "Mínima", value: l(w.low) },
5616
- { label: "Fechamento", value: l(w.close) }
5616
+ { label: "Abertura", value: l(S.open), color: E },
5617
+ { label: "Máxima", value: l(S.high) },
5618
+ { label: "Mínima", value: l(S.low) },
5619
+ { label: "Fechamento", value: l(S.close) }
5617
5620
  ]
5618
5621
  }),
5619
5622
  onMouseLeave: i.hide
@@ -5682,7 +5685,7 @@ function go({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5682
5685
  ] });
5683
5686
  }
5684
5687
  function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a = 96, className: r, ...d }) {
5685
- const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = te(), $ = l ?? Math.min(0, ...t.map((L) => L.start)), p = (c ?? Math.max(1, ...t.map((L) => L.end))) - $ || 1, b = a, S = Math.max(0, v - b - 14), k = f - 6 - 26, M = t.length ? k / t.length : 0, w = Math.min(M * 0.6, 22), N = (L) => b + (L - $) / p * S, C = Array.from({ length: 5 }, (L, E) => $ + p * E / 4);
5688
+ const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = te(), $ = l ?? Math.min(0, ...t.map((L) => L.start)), p = (c ?? Math.max(1, ...t.map((L) => L.end))) - $ || 1, b = a, w = Math.max(0, v - b - 14), k = f - 6 - 26, M = t.length ? k / t.length : 0, S = Math.min(M * 0.6, 22), N = (L) => b + (L - $) / p * w, C = Array.from({ length: 5 }, (L, E) => $ + p * E / 4);
5686
5689
  return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
5687
5690
  v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
5688
5691
  /* @__PURE__ */ e("defs", { children: t.map((L, E) => {
@@ -5706,25 +5709,25 @@ function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
5706
5709
  /* @__PURE__ */ e("text", { x: N(L), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: s(L) })
5707
5710
  ] }, E)),
5708
5711
  t.map((L, E) => {
5709
- const A = 6 + M * E + M / 2, F = N(L.start), B = Math.max(2, N(L.end) - N(L.start)), T = L.color ?? j(E);
5712
+ const A = 6 + M * E + M / 2, F = N(L.start), B = Math.max(2, N(L.end) - N(L.start)), W = L.color ?? j(E);
5710
5713
  return /* @__PURE__ */ m("g", { children: [
5711
5714
  /* @__PURE__ */ e(
5712
5715
  "rect",
5713
5716
  {
5714
5717
  x: F,
5715
- y: A - w / 2,
5718
+ y: A - S / 2,
5716
5719
  width: B,
5717
- height: w,
5720
+ height: S,
5718
5721
  rx: 5,
5719
5722
  fill: `url(#${x}-rg${E})`,
5720
5723
  className: "select-chart__hbar",
5721
5724
  style: { animationDelay: `${E * 40}ms` },
5722
5725
  onMouseEnter: () => y.show({
5723
5726
  x: F + B / 2,
5724
- y: A - w / 2,
5725
- place: A - w / 2 < 50 ? "bottom" : "top",
5727
+ y: A - S / 2,
5728
+ place: A - S / 2 < 50 ? "bottom" : "top",
5726
5729
  title: L.label,
5727
- rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: T }]
5730
+ rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: W }]
5728
5731
  }),
5729
5732
  onMouseLeave: y.hide
5730
5733
  }
@@ -5739,17 +5742,17 @@ function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
5739
5742
  const xo = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels: c = ["Seg", "", "Qua", "", "Sex", "", "Dom"], columnLabels: s, format: a = Y, cell: r = 14, gap: d = 3, min: o, max: i, className: h, ...u }, f) {
5740
5743
  const g = X();
5741
5744
  te();
5742
- const v = n.flat().filter((w) => w != null && Number.isFinite(w)), y = o ?? (v.length ? Math.min(...v) : 0), $ = (i ?? (v.length ? Math.max(...v) : 1)) - y || 1, _ = 30, p = s ? 16 : 4, b = r + d, S = _ + n.length * b, k = p + 7 * b, M = { "--heat-color": l };
5745
+ const v = n.flat().filter((S) => S != null && Number.isFinite(S)), y = o ?? (v.length ? Math.min(...v) : 0), $ = (i ?? (v.length ? Math.max(...v) : 1)) - y || 1, _ = 30, p = s ? 16 : 4, b = r + d, w = _ + n.length * b, k = p + 7 * b, M = { "--heat-color": l };
5743
5746
  return /* @__PURE__ */ m("div", { ref: f, ...u, className: `select-chart-wrap select-calheat${h ? " " + h : ""}`, style: M, children: [
5744
- /* @__PURE__ */ m("svg", { width: S, height: k, className: "select-chart", children: [
5747
+ /* @__PURE__ */ m("svg", { width: w, height: k, className: "select-chart", children: [
5745
5748
  c.map(
5746
- (w, N) => w ? /* @__PURE__ */ e("text", { x: _ - 6, y: p + N * b + r / 2, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "end", children: w }, N) : null
5749
+ (S, N) => S ? /* @__PURE__ */ e("text", { x: _ - 6, y: p + N * b + r / 2, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "end", children: S }, N) : null
5747
5750
  ),
5748
5751
  s == null ? void 0 : s.map(
5749
- (w, N) => w ? /* @__PURE__ */ e("text", { x: _ + N * b, y: p - 4, className: "select-chart__xlabel", textAnchor: "start", children: w }, N) : null
5752
+ (S, N) => S ? /* @__PURE__ */ e("text", { x: _ + N * b, y: p - 4, className: "select-chart__xlabel", textAnchor: "start", children: S }, N) : null
5750
5753
  ),
5751
5754
  n.map(
5752
- (w, N) => w.map((C, L) => {
5755
+ (S, N) => S.map((C, L) => {
5753
5756
  const E = _ + N * b, A = p + L * b;
5754
5757
  if (C == null || !Number.isFinite(C))
5755
5758
  return /* @__PURE__ */ e("rect", { x: E, y: A, width: r, height: r, rx: 3, className: "select-chart__calcell select-chart__calcell--empty" }, `${N}-${L}`);
@@ -5787,15 +5790,15 @@ const xo = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
5787
5790
  /* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
5788
5791
  [0.34, 0.67, 1].map(($, _) => /* @__PURE__ */ e("circle", { cx: h, cy: u, r: f * $, className: "select-chart__grid", fill: "none" }, _)),
5789
5792
  n.map(($, _) => {
5790
- const p = _ * x, b = (_ + 1) * x - 1.5, S = $.color ?? j(_), k = Math.max(2, y($.value)), M = ((p + b) / 2 - 90) * (Math.PI / 180), w = h + k * Math.cos(M), N = u + k * Math.sin(M);
5793
+ const p = _ * x, b = (_ + 1) * x - 1.5, w = $.color ?? j(_), k = Math.max(2, y($.value)), M = ((p + b) / 2 - 90) * (Math.PI / 180), S = h + k * Math.cos(M), N = u + k * Math.sin(M);
5791
5794
  return /* @__PURE__ */ e(
5792
5795
  "path",
5793
5796
  {
5794
5797
  d: it(h, u, k, 0, p, b),
5795
- fill: S,
5798
+ fill: w,
5796
5799
  fillOpacity: 0.8,
5797
5800
  className: "select-chart__seg",
5798
- onMouseEnter: () => i.show({ x: w, y: N, place: N < u ? "top" : "bottom", title: $.label, rows: [{ label: "Valor", value: c($.value), color: S }] }),
5801
+ onMouseEnter: () => i.show({ x: S, y: N, place: N < u ? "top" : "bottom", title: $.label, rows: [{ label: "Valor", value: c($.value), color: w }] }),
5799
5802
  onMouseLeave: i.hide
5800
5803
  },
5801
5804
  _
@@ -5859,29 +5862,29 @@ function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
5859
5862
  ] });
5860
5863
  }
5861
5864
  function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel: s = "Depois", labelWidth: a = 96, className: r, ...d }) {
5862
- const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = "var(--select-chart-2)", $ = "var(--select-chart-1)", _ = ye(Math.max(1, ...t.flatMap((w) => [w.from, w.to]))), p = a, b = Math.max(0, v - p - 14), S = f - 6 - 26, k = t.length ? S / t.length : 0, M = (w) => p + w / _ * b;
5865
+ const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = "var(--select-chart-2)", $ = "var(--select-chart-1)", _ = ye(Math.max(1, ...t.flatMap((S) => [S.from, S.to]))), p = a, b = Math.max(0, v - p - 14), w = f - 6 - 26, k = t.length ? w / t.length : 0, M = (S) => p + S / _ * b;
5863
5866
  return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
5864
5867
  v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
5865
- we(_).map((w, N) => /* @__PURE__ */ m("g", { children: [
5868
+ we(_).map((S, N) => /* @__PURE__ */ m("g", { children: [
5866
5869
  /* @__PURE__ */ e(
5867
5870
  "line",
5868
5871
  {
5869
- x1: M(w),
5870
- x2: M(w),
5872
+ x1: M(S),
5873
+ x2: M(S),
5871
5874
  y1: 6,
5872
- y2: 6 + S,
5875
+ y2: 6 + w,
5873
5876
  className: N === 0 ? "select-chart__axis" : "select-chart__grid"
5874
5877
  }
5875
5878
  ),
5876
- /* @__PURE__ */ e("text", { x: M(w), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(w) })
5879
+ /* @__PURE__ */ e("text", { x: M(S), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(S) })
5877
5880
  ] }, N)),
5878
- t.map((w, N) => {
5881
+ t.map((S, N) => {
5879
5882
  const C = 6 + k * N + k / 2;
5880
5883
  return /* @__PURE__ */ m("g", { children: [
5881
- /* @__PURE__ */ e("line", { x1: M(w.from), x2: M(w.to), y1: C, y2: C, stroke: "var(--select-chart-track)", strokeWidth: 4, strokeLinecap: "round" }),
5882
- /* @__PURE__ */ e("circle", { cx: M(w.from), cy: C, r: 5, fill: x, className: "select-chart__dot" }),
5883
- /* @__PURE__ */ e("circle", { cx: M(w.to), cy: C, r: 5, fill: $, className: "select-chart__dot" }),
5884
- /* @__PURE__ */ e("text", { x: p - 8, y: C, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: w.label }),
5884
+ /* @__PURE__ */ e("line", { x1: M(S.from), x2: M(S.to), y1: C, y2: C, stroke: "var(--select-chart-track)", strokeWidth: 4, strokeLinecap: "round" }),
5885
+ /* @__PURE__ */ e("circle", { cx: M(S.from), cy: C, r: 5, fill: x, className: "select-chart__dot" }),
5886
+ /* @__PURE__ */ e("circle", { cx: M(S.to), cy: C, r: 5, fill: $, className: "select-chart__dot" }),
5887
+ /* @__PURE__ */ e("text", { x: p - 8, y: C, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: S.label }),
5885
5888
  /* @__PURE__ */ e(
5886
5889
  "rect",
5887
5890
  {
@@ -5891,14 +5894,14 @@ function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
5891
5894
  height: k,
5892
5895
  fill: "transparent",
5893
5896
  onMouseEnter: () => y.show({
5894
- x: (M(w.from) + M(w.to)) / 2,
5897
+ x: (M(S.from) + M(S.to)) / 2,
5895
5898
  y: C - 8,
5896
5899
  place: C - 8 < 50 ? "bottom" : "top",
5897
- title: w.label,
5900
+ title: S.label,
5898
5901
  rows: [
5899
- { label: c, value: l(w.from), color: x },
5900
- { label: s, value: l(w.to), color: $ },
5901
- { label: "Δ", value: `${w.to - w.from >= 0 ? "+" : ""}${l(w.to - w.from)}` }
5902
+ { label: c, value: l(S.from), color: x },
5903
+ { label: s, value: l(S.to), color: $ },
5904
+ { label: "Δ", value: `${S.to - S.from >= 0 ? "+" : ""}${l(S.to - S.from)}` }
5902
5905
  ]
5903
5906
  }),
5904
5907
  onMouseLeave: y.hide
@@ -5911,7 +5914,7 @@ function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
5911
5914
  ] });
5912
5915
  }
5913
5916
  function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className: s, ...a }) {
5914
- const { ref: r, width: d } = ce(n), o = X(), i = { top: 6, right: 6, bottom: 24, left: 6 }, h = Math.max(0, d - i.left - i.right), u = n - i.top - i.bottom, f = t.map((p) => p.segments.reduce((b, S) => b + S.value, 0)), g = f.reduce((p, b) => p + b, 0) || 1, v = [];
5917
+ const { ref: r, width: d } = ce(n), o = X(), i = { top: 6, right: 6, bottom: 24, left: 6 }, h = Math.max(0, d - i.left - i.right), u = n - i.top - i.bottom, f = t.map((p) => p.segments.reduce((b, w) => b + w.value, 0)), g = f.reduce((p, b) => p + b, 0) || 1, v = [];
5915
5918
  t.forEach((p) => p.segments.forEach((b) => {
5916
5919
  v.includes(b.key) || v.push(b.key);
5917
5920
  }));
@@ -5919,13 +5922,13 @@ function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
5919
5922
  let _ = i.left;
5920
5923
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
5921
5924
  d > 0 && /* @__PURE__ */ e("svg", { width: d, height: n, className: "select-chart", children: t.map((p, b) => {
5922
- const S = f[b] || 1, k = S / g * $, M = _;
5925
+ const w = f[b] || 1, k = w / g * $, M = _;
5923
5926
  _ += k + c;
5924
- let w = i.top;
5927
+ let S = i.top;
5925
5928
  return /* @__PURE__ */ m("g", { children: [
5926
5929
  p.segments.map((N, C) => {
5927
- const L = N.value / S * u, E = w;
5928
- w += L;
5930
+ const L = N.value / w * u, E = S;
5931
+ S += L;
5929
5932
  const A = y(N.key, N.color);
5930
5933
  return /* @__PURE__ */ e(
5931
5934
  "rect",
@@ -5944,7 +5947,7 @@ function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
5944
5947
  title: `${p.label} · ${N.key}`,
5945
5948
  rows: [
5946
5949
  { label: "Valor", value: l(N.value), color: A },
5947
- { label: "Share", value: `${Math.round(N.value / S * 100)}%` }
5950
+ { label: "Share", value: `${Math.round(N.value / w * 100)}%` }
5948
5951
  ]
5949
5952
  }),
5950
5953
  onMouseLeave: o.hide
@@ -5967,17 +5970,17 @@ const ko = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
5967
5970
  const E = Math.PI + L * Math.PI;
5968
5971
  return [v + g * Math.cos(E), y + g * Math.sin(E)];
5969
5972
  }, p = (L, E) => {
5970
- const [A, F] = _(L), [B, T] = _(E);
5971
- return `M ${A.toFixed(2)} ${F.toFixed(2)} A ${g} ${g} 0 0 1 ${B.toFixed(2)} ${T.toFixed(2)}`;
5973
+ const [A, F] = _(L), [B, W] = _(E);
5974
+ return `M ${A.toFixed(2)} ${F.toFixed(2)} A ${g} ${g} 0 0 1 ${B.toFixed(2)} ${W.toFixed(2)}`;
5972
5975
  };
5973
5976
  let b = 0;
5974
- const S = c.map((L) => {
5977
+ const w = c.map((L) => {
5975
5978
  const E = $(b) / l, A = $(L.upTo) / l;
5976
5979
  return b = L.upTo, { t0: E, t1: A, color: L.color };
5977
- }), k = $(n) / l, M = Math.PI + k * Math.PI, w = g * 0.82, N = v + w * Math.cos(M), C = y + w * Math.sin(M);
5980
+ }), k = $(n) / l, M = Math.PI + k * Math.PI, S = g * 0.82, N = v + S * Math.cos(M), C = y + S * Math.sin(M);
5978
5981
  return /* @__PURE__ */ e("div", { ref: h, ...i, className: `select-gauge${o ? " " + o : ""}`, style: { width: `${s / 16}rem` }, children: /* @__PURE__ */ m("div", { className: "select-gauge__ring", style: { width: "100%", aspectRatio: `${s} / ${x}` }, children: [
5979
5982
  /* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${x}`, className: "select-chart", "aria-hidden": "true", children: [
5980
- S.map((L, E) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: u, strokeLinecap: "butt" }, E)),
5983
+ w.map((L, E) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: u, strokeLinecap: "butt" }, E)),
5981
5984
  /* @__PURE__ */ e("line", { x1: v, y1: y, x2: N, y2: C, stroke: "var(--select-text)", strokeWidth: 3, strokeLinecap: "round", className: "select-gaugeband__needle" }),
5982
5985
  /* @__PURE__ */ e("circle", { cx: v, cy: y, r: 5, fill: "var(--select-text)" })
5983
5986
  ] }),
@@ -5988,20 +5991,20 @@ const ko = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
5988
5991
  ] }) });
5989
5992
  });
5990
5993
  function wo({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
5991
- const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = { top: 14, right: 14, bottom: 28, left: 14 }, v = Math.max(0, d - g.left - g.right), y = l - g.top - g.bottom, x = n.map((k, M) => t.reduce((w, N) => w + (N.data[M] ?? 0), 0)), $ = Math.max(1, ...x), _ = y / $, p = (k) => g.left + (f <= 1 ? v / 2 : k / (f - 1) * v), b = n.map(() => 0), S = t.map((k, M) => {
5992
- const w = [], N = [];
5994
+ const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = { top: 14, right: 14, bottom: 28, left: 14 }, v = Math.max(0, d - g.left - g.right), y = l - g.top - g.bottom, x = n.map((k, M) => t.reduce((S, N) => S + (N.data[M] ?? 0), 0)), $ = Math.max(1, ...x), _ = y / $, p = (k) => g.left + (f <= 1 ? v / 2 : k / (f - 1) * v), b = n.map(() => 0), w = t.map((k, M) => {
5995
+ const S = [], N = [];
5993
5996
  return n.forEach((C, L) => {
5994
5997
  const A = g.top + (y - x[L] * _) / 2 + b[L] * _, F = A + (k.data[L] ?? 0) * _;
5995
- w.push([p(L), A]), N.push([p(L), F]), b[L] = b[L] + (k.data[L] ?? 0);
5996
- }), { upper: w, lower: N, color: k.color ?? j(M), name: k.name };
5998
+ S.push([p(L), A]), N.push([p(L), F]), b[L] = b[L] + (k.data[L] ?? 0);
5999
+ }), { upper: S, lower: N, color: k.color ?? j(M), name: k.name };
5997
6000
  });
5998
6001
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
5999
6002
  d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
6000
- /* @__PURE__ */ e("defs", { children: S.map((k, M) => /* @__PURE__ */ m("linearGradient", { id: `${i}-st${M}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6003
+ /* @__PURE__ */ e("defs", { children: w.map((k, M) => /* @__PURE__ */ m("linearGradient", { id: `${i}-st${M}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6001
6004
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: k.color, stopOpacity: 0.95 }),
6002
6005
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: k.color, stopOpacity: 0.6 })
6003
6006
  ] }, M)) }),
6004
- S.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${i}-st${M})`, className: "select-chart__area" }, M)),
6007
+ w.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${i}-st${M})`, className: "select-chart__area" }, M)),
6005
6008
  h != null && /* @__PURE__ */ e("line", { x1: p(h), x2: p(h), y1: g.top, y2: g.top + y, className: "select-chart__crosshair" }),
6006
6009
  n.map(
6007
6010
  (k, M) => M % Math.max(1, Math.ceil(f / 7)) === 0 || M === f - 1 ? /* @__PURE__ */ e("text", { x: p(M), y: l - g.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k }, M) : null
@@ -6020,7 +6023,7 @@ function wo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
6020
6023
  y: g.top + y / 2,
6021
6024
  place: "top",
6022
6025
  title: k,
6023
- rows: t.map((w, N) => ({ label: w.name, value: c(w.data[M] ?? 0), color: w.color ?? j(N) }))
6026
+ rows: t.map((S, N) => ({ label: S.name, value: c(S.data[M] ?? 0), color: S.color ?? j(N) }))
6024
6027
  });
6025
6028
  },
6026
6029
  onMouseLeave: () => {
@@ -6044,23 +6047,23 @@ const So = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
6044
6047
  /* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart select-donut", "aria-hidden": "true", children: n.map(($, _) => {
6045
6048
  const p = v[_], b = x / y * 360;
6046
6049
  x += p;
6047
- const S = x / y * 360, k = $.color ?? j(_);
6050
+ const w = x / y * 360, k = $.color ?? j(_);
6048
6051
  let M = b;
6049
6052
  return /* @__PURE__ */ m("g", { children: [
6050
6053
  /* @__PURE__ */ e(
6051
6054
  "path",
6052
6055
  {
6053
- d: it(i, h, f, g, b + 0.6, Math.max(b + 0.7, S - 0.6)),
6056
+ d: it(i, h, f, g, b + 0.6, Math.max(b + 0.7, w - 0.6)),
6054
6057
  fill: k,
6055
6058
  className: "select-chart__seg",
6056
6059
  onMouseEnter: () => o.show({ x: i, y: h - f, place: h - f < 44 ? "bottom" : "top", title: $.label, rows: [{ label: "Total", value: c(p), color: k }] }),
6057
6060
  onMouseLeave: o.hide
6058
6061
  }
6059
6062
  ),
6060
- ($.children ?? []).map((w, N) => {
6063
+ ($.children ?? []).map((S, N) => {
6061
6064
  const C = M;
6062
- M += w.value / y * 360;
6063
- const L = M, E = w.color ?? k, A = 0.45 + N % 3 * 0.2, F = ((C + L) / 2 - 90) * (Math.PI / 180);
6065
+ M += S.value / y * 360;
6066
+ const L = M, E = S.color ?? k, A = 0.45 + N % 3 * 0.2, F = ((C + L) / 2 - 90) * (Math.PI / 180);
6064
6067
  return /* @__PURE__ */ e(
6065
6068
  "path",
6066
6069
  {
@@ -6072,10 +6075,10 @@ const So = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
6072
6075
  x: i + (u - 6) * Math.cos(F),
6073
6076
  y: h + (u - 6) * Math.sin(F),
6074
6077
  place: h + (u - 6) * Math.sin(F) < h ? "top" : "bottom",
6075
- title: `${$.label} · ${w.label}`,
6078
+ title: `${$.label} · ${S.label}`,
6076
6079
  rows: [
6077
- { label: "Valor", value: c(w.value), color: k },
6078
- { label: "Share", value: `${Math.round(w.value / (p || 1) * 100)}%` }
6080
+ { label: "Valor", value: c(S.value), color: k },
6081
+ { label: "Share", value: `${Math.round(S.value / (p || 1) * 100)}%` }
6079
6082
  ]
6080
6083
  }),
6081
6084
  onMouseLeave: o.hide
@@ -6112,13 +6115,13 @@ function Co({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6112
6115
  /* @__PURE__ */ e("text", { x: o.left - 8, y: g(_), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(_) })
6113
6116
  ] }, p)),
6114
6117
  t.map((_, p) => {
6115
- const b = o.left + y * p + y / 2, S = _.color ?? j(p), k = _.bins.length, M = (A) => g(_.min + (_.max - _.min) * A / Math.max(1, k - 1)), w = (A) => _.bins[A] / $ * x, N = [], C = [];
6116
- for (let A = k - 1; A >= 0; A--) N.push([b + w(A), M(A)]);
6117
- for (let A = 0; A < k; A++) C.push([b - w(A), M(A)]);
6118
+ const b = o.left + y * p + y / 2, w = _.color ?? j(p), k = _.bins.length, M = (A) => g(_.min + (_.max - _.min) * A / Math.max(1, k - 1)), S = (A) => _.bins[A] / $ * x, N = [], C = [];
6119
+ for (let A = k - 1; A >= 0; A--) N.push([b + S(A), M(A)]);
6120
+ for (let A = 0; A < k; A++) C.push([b - S(A), M(A)]);
6118
6121
  const L = `${Cn(N)} ${Cn(C).replace(/^M/, "L")} Z`, E = _.median != null ? g(_.median) : null;
6119
6122
  return /* @__PURE__ */ m("g", { children: [
6120
- /* @__PURE__ */ e("path", { d: L, fill: S, fillOpacity: 0.32, stroke: S, strokeWidth: 1.5, strokeLinejoin: "round" }),
6121
- E != null && /* @__PURE__ */ e("line", { x1: b - x * 0.6, x2: b + x * 0.6, y1: E, y2: E, stroke: S, strokeWidth: 2 }),
6123
+ /* @__PURE__ */ e("path", { d: L, fill: w, fillOpacity: 0.32, stroke: w, strokeWidth: 1.5, strokeLinejoin: "round" }),
6124
+ E != null && /* @__PURE__ */ e("line", { x1: b - x * 0.6, x2: b + x * 0.6, y1: E, y2: E, stroke: w, strokeWidth: 2 }),
6122
6125
  /* @__PURE__ */ e("text", { x: b, y: n - o.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: _.label }),
6123
6126
  /* @__PURE__ */ e(
6124
6127
  "rect",
@@ -6134,7 +6137,7 @@ function Co({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6134
6137
  place: g(_.max) < o.top + 64 ? "bottom" : "top",
6135
6138
  title: _.label,
6136
6139
  rows: [
6137
- { label: "Máx", value: l(_.max), color: S },
6140
+ { label: "Máx", value: l(_.max), color: w },
6138
6141
  ..._.median != null ? [{ label: "Mediana", value: l(_.median) }] : [],
6139
6142
  { label: "Mín", value: l(_.min) }
6140
6143
  ]
@@ -6163,19 +6166,19 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6163
6166
  b[N][L] = [C, C + E], C += E;
6164
6167
  }
6165
6168
  }
6166
- const S = (N, C) => [u + C * Math.cos(N - Math.PI / 2), f + C * Math.sin(N - Math.PI / 2)], k = (N, C, L, E) => {
6167
- const [A, F] = S(N, v), [B, T] = S(C, v), [P, O] = S(L, v), [W, Z] = S(E, v);
6168
- return `M${A.toFixed(2)},${F.toFixed(2)} A${v},${v} 0 0 1 ${B.toFixed(2)},${T.toFixed(2)} Q${u},${f} ${P.toFixed(2)},${O.toFixed(2)} A${v},${v} 0 0 1 ${W.toFixed(2)},${Z.toFixed(2)} Q${u},${f} ${A.toFixed(2)},${F.toFixed(2)} Z`;
6169
- }, M = (N) => N * 180 / Math.PI, w = [];
6169
+ const w = (N, C) => [u + C * Math.cos(N - Math.PI / 2), f + C * Math.sin(N - Math.PI / 2)], k = (N, C, L, E) => {
6170
+ const [A, F] = w(N, v), [B, W] = w(C, v), [P, O] = w(L, v), [T, Z] = w(E, v);
6171
+ return `M${A.toFixed(2)},${F.toFixed(2)} A${v},${v} 0 0 1 ${B.toFixed(2)},${W.toFixed(2)} Q${u},${f} ${P.toFixed(2)},${O.toFixed(2)} A${v},${v} 0 0 1 ${T.toFixed(2)},${Z.toFixed(2)} Q${u},${f} ${A.toFixed(2)},${F.toFixed(2)} Z`;
6172
+ }, M = (N) => N * 180 / Math.PI, S = [];
6170
6173
  for (let N = 0; N < h; N++)
6171
6174
  for (let C = N; C < h; C++) {
6172
6175
  if (N === C || n[N][C] + n[C][N] <= 0) continue;
6173
6176
  const [L, E] = b[N][C], [A, F] = b[C][N];
6174
- w.push({ d: k(L, E, A, F), color: j(N), i: N, j: C, value: n[N][C] + n[C][N] });
6177
+ S.push({ d: k(L, E, A, F), color: j(N), i: N, j: C, value: n[N][C] + n[C][N] });
6175
6178
  }
6176
6179
  return /* @__PURE__ */ e("div", { ref: o, ...d, className: `select-donut-wrap${r ? " " + r : ""}`, children: /* @__PURE__ */ m("div", { className: "select-radial", style: { width: c, aspectRatio: "1" }, children: [
6177
6180
  /* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
6178
- w.map((N, C) => /* @__PURE__ */ e(
6181
+ S.map((N, C) => /* @__PURE__ */ e(
6179
6182
  "path",
6180
6183
  {
6181
6184
  d: N.d,
@@ -6193,7 +6196,7 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6193
6196
  C
6194
6197
  )),
6195
6198
  _.map((N, C) => {
6196
- const L = (N.a0 + N.a1) / 2, [E, A] = S(L, g + 12);
6199
+ const L = (N.a0 + N.a1) / 2, [E, A] = w(L, g + 12);
6197
6200
  return /* @__PURE__ */ m("g", { children: [
6198
6201
  /* @__PURE__ */ e("path", { d: it(u, f, g, v, M(N.a0), M(N.a1)), fill: j(C), className: "select-chord__arc" }),
6199
6202
  /* @__PURE__ */ e(
@@ -6214,10 +6217,10 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6214
6217
  ] }) });
6215
6218
  });
6216
6219
  function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--select-chart-1)", xMax: s, yMax: a, format: r = Y, className: d, ...o }) {
6217
- const { ref: i, width: h } = ce(n), u = X(), f = 12, g = Math.max(0, h - f * 2), v = n - f * 2, y = s ?? Math.max(1, ...t.map((C) => C.x)), x = a ?? Math.max(1, ...t.map((C) => C.y)), $ = (C) => f + C / y * g, _ = (C) => f + v - C / x * v, p = l, b = Math.sqrt(3), S = (C, L) => {
6218
- let E = C, A = L, F = -E - A, B = Math.round(E), T = Math.round(F), P = Math.round(A);
6219
- const O = Math.abs(B - E), W = Math.abs(T - F), Z = Math.abs(P - A);
6220
- return O > W && O > Z ? B = -T - P : W > Z ? T = -B - P : P = -B - T, [B, P];
6220
+ const { ref: i, width: h } = ce(n), u = X(), f = 12, g = Math.max(0, h - f * 2), v = n - f * 2, y = s ?? Math.max(1, ...t.map((C) => C.x)), x = a ?? Math.max(1, ...t.map((C) => C.y)), $ = (C) => f + C / y * g, _ = (C) => f + v - C / x * v, p = l, b = Math.sqrt(3), w = (C, L) => {
6221
+ let E = C, A = L, F = -E - A, B = Math.round(E), W = Math.round(F), P = Math.round(A);
6222
+ const O = Math.abs(B - E), T = Math.abs(W - F), Z = Math.abs(P - A);
6223
+ return O > T && O > Z ? B = -W - P : T > Z ? W = -B - P : P = -B - W, [B, P];
6221
6224
  }, k = (C, L) => [p * b * (C + L / 2), p * (3 / 2) * L], M = (C, L) => {
6222
6225
  let E = "";
6223
6226
  for (let A = 0; A < 6; A++) {
@@ -6225,15 +6228,15 @@ function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--sele
6225
6228
  E += `${A === 0 ? "M" : "L"}${(C + p * Math.cos(F)).toFixed(1)},${(L + p * Math.sin(F)).toFixed(1)}`;
6226
6229
  }
6227
6230
  return E + "Z";
6228
- }, w = /* @__PURE__ */ new Map();
6231
+ }, S = /* @__PURE__ */ new Map();
6229
6232
  for (const C of t) {
6230
- const L = $(C.x), E = _(C.y), A = (b / 3 * L - 1 / 3 * E) / p, F = 2 / 3 * E / p, [B, T] = S(A, F), P = `${B},${T}`;
6231
- w.set(P, (w.get(P) ?? 0) + 1);
6233
+ const L = $(C.x), E = _(C.y), A = (b / 3 * L - 1 / 3 * E) / p, F = 2 / 3 * E / p, [B, W] = w(A, F), P = `${B},${W}`;
6234
+ S.set(P, (S.get(P) ?? 0) + 1);
6232
6235
  }
6233
- const N = Math.max(1, ...w.values());
6236
+ const N = Math.max(1, ...S.values());
6234
6237
  return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
6235
- h > 0 && /* @__PURE__ */ e("svg", { width: h, height: n, className: "select-chart", children: [...w].map(([C, L]) => {
6236
- const [E, A] = C.split(",").map(Number), [F, B] = k(E, A), T = L / N, P = Math.round((0.16 + T * 0.84) * 100);
6238
+ h > 0 && /* @__PURE__ */ e("svg", { width: h, height: n, className: "select-chart", children: [...S].map(([C, L]) => {
6239
+ const [E, A] = C.split(",").map(Number), [F, B] = k(E, A), W = L / N, P = Math.round((0.16 + W * 0.84) * 100);
6237
6240
  return /* @__PURE__ */ e(
6238
6241
  "path",
6239
6242
  {
@@ -6417,9 +6420,9 @@ function Pn(t, n, l) {
6417
6420
  }
6418
6421
  const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) < 1e-6, Eo = R(function({ points: n = [], arcs: l = [], size: c = 320, tilt: s = -18, spin: a = !0, speed: r = 7, color: d = "var(--select-chart-1)", format: o = Y, legend: i = !0, map: h = !0, fluid: u = !1, onZoomChange: f, className: g, ...v }, y) {
6419
6422
  var Fe;
6420
- const x = te(), $ = X(), _ = q(null), p = Ct(_, c), b = n.length ? n.reduce((I, V) => I + V.lng, 0) / n.length : 0, S = q(
6423
+ const x = te(), $ = X(), _ = q(null), p = Ct(_, c), b = n.length ? n.reduce((I, V) => I + V.lng, 0) / n.length : 0, w = q(
6421
6424
  typeof window < "u" && !!((Fe = window.matchMedia) != null && Fe.call(window, "(prefers-reduced-motion: reduce)").matches)
6422
- ), k = q({ lng: -b, lat: s }), M = q({ lng: 0, lat: 0 }), w = q(1), N = q(null), C = q(null), L = q(!1), E = q(0), A = q(0), F = q(0), [, B] = D(0), [T, P] = D(!1), [O, W] = D(null), Z = () => {
6425
+ ), k = q({ lng: -b, lat: s }), M = q({ lng: 0, lat: 0 }), S = q(1), N = q(null), C = q(null), L = q(!1), E = q(0), A = q(0), F = q(0), [, B] = D(0), [W, P] = D(!1), [O, T] = D(null), Z = () => {
6423
6426
  A.current || (F.current = performance.now(), A.current = requestAnimationFrame(G));
6424
6427
  };
6425
6428
  function G(I) {
@@ -6429,10 +6432,10 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6429
6432
  if (!C.current) if (N.current) {
6430
6433
  const se = Math.min(1, V * 6);
6431
6434
  k.current.lng += (N.current.lng - k.current.lng) * se, k.current.lat += (N.current.lat - k.current.lat) * se, Math.abs(N.current.lng - k.current.lng) < 0.2 && Math.abs(N.current.lat - k.current.lat) < 0.2 && (N.current = null);
6432
- } else oe ? (k.current.lng += U.lng * V * 60, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + U.lat * V * 60)), U.lng *= 0.94, U.lat *= 0.94) : (U.lng = 0, U.lat = 0, a && !S.current && !L.current && (k.current.lng += r * V));
6433
- B((se) => (se + 1) % 1e6), !S.current || !!C.current || !!N.current || Math.abs(U.lng) + Math.abs(U.lat) > 0.02 ? A.current = requestAnimationFrame(G) : A.current = 0;
6435
+ } else oe ? (k.current.lng += U.lng * V * 60, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + U.lat * V * 60)), U.lng *= 0.94, U.lat *= 0.94) : (U.lng = 0, U.lat = 0, a && !w.current && !L.current && (k.current.lng += r * V));
6436
+ B((se) => (se + 1) % 1e6), !w.current || !!C.current || !!N.current || Math.abs(U.lng) + Math.abs(U.lat) > 0.02 ? A.current = requestAnimationFrame(G) : A.current = 0;
6434
6437
  }
6435
- le(() => (S.current || Z(), () => {
6438
+ le(() => (w.current || Z(), () => {
6436
6439
  A.current && cancelAnimationFrame(A.current), A.current = 0;
6437
6440
  }), []);
6438
6441
  const J = q(f);
@@ -6442,8 +6445,8 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6442
6445
  const V = (U) => {
6443
6446
  var ee;
6444
6447
  U.preventDefault();
6445
- const oe = w.current * (U.deltaY < 0 ? 1.12 : 0.89);
6446
- w.current = Math.max(0.8, Math.min(1.8, oe)), (ee = J.current) == null || ee.call(J, w.current), Z(), B((se) => (se + 1) % 1e6);
6448
+ const oe = S.current * (U.deltaY < 0 ? 1.12 : 0.89);
6449
+ S.current = Math.max(0.8, Math.min(1.8, oe)), (ee = J.current) == null || ee.call(J, S.current), Z(), B((se) => (se + 1) % 1e6);
6447
6450
  };
6448
6451
  return I.addEventListener("wheel", V, { passive: !1 }), () => I.removeEventListener("wheel", V);
6449
6452
  }, []);
@@ -6452,12 +6455,12 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6452
6455
  (U = (V = I.target).setPointerCapture) == null || U.call(V, I.pointerId), C.current = { x: I.clientX, y: I.clientY }, M.current = { lng: 0, lat: 0 }, N.current = null, P(!0), Z();
6453
6456
  }, me = (I) => {
6454
6457
  if (!C.current) return;
6455
- const V = 0.34 / w.current, U = I.clientX - C.current.x, oe = I.clientY - C.current.y;
6458
+ const V = 0.34 / S.current, U = I.clientX - C.current.x, oe = I.clientY - C.current.y;
6456
6459
  C.current = { x: I.clientX, y: I.clientY }, k.current.lng += U * V, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + oe * V)), M.current = { lng: U * V, lat: oe * V };
6457
6460
  }, Se = (I) => {
6458
6461
  var V, U;
6459
6462
  C.current && ((U = (V = I.target).releasePointerCapture) == null || U.call(V, I.pointerId), C.current = null, P(!1), Z());
6460
- }, ne = (p / 2 - 6) * w.current, H = p / 2, Q = p / 2, z = (I) => {
6463
+ }, ne = (p / 2 - 6) * S.current, H = p / 2, Q = p / 2, z = (I) => {
6461
6464
  const V = bt(I, k.current.lng, k.current.lat);
6462
6465
  return { x: H + ne * V[0], y: Q - ne * V[1], z: V[2] };
6463
6466
  }, ue = xe(() => {
@@ -6541,7 +6544,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6541
6544
  const mt = Ze / 40, ft = Pn(U, oe, mt), Pt = 1 + 0.34 * Math.sin(Math.PI * mt), $l = bt(ft, k.current.lng, k.current.lat), an = z([ft[0] * Pt, ft[1] * Pt, ft[2] * Pt]);
6542
6545
  $l[2] > -0.05 ? (ee += `${se ? "L" : "M"}${an.x.toFixed(1)},${an.y.toFixed(1)}`, se = !0) : se = !1;
6543
6546
  }
6544
- const pe = S.current ? 0.5 : (E.current * Ie + V * 0.27) % 1, fe = Pn(U, oe, pe), Ve = 1 + 0.34 * Math.sin(Math.PI * pe), Pe = bt(fe, k.current.lng, k.current.lat), Je = z([fe[0] * Ve, fe[1] * Ve, fe[2] * Ve]), sn = Ne != null && (Rn(I.from, Ne) || Rn(I.to, Ne));
6547
+ const pe = w.current ? 0.5 : (E.current * Ie + V * 0.27) % 1, fe = Pn(U, oe, pe), Ve = 1 + 0.34 * Math.sin(Math.PI * pe), Pe = bt(fe, k.current.lng, k.current.lat), Je = z([fe[0] * Ve, fe[1] * Ve, fe[2] * Ve]), sn = Ne != null && (Rn(I.from, Ne) || Rn(I.to, Ne));
6545
6548
  return { d: ee, col: I.color ?? d, i: V, flow: { ...Je, vis: Pe[2] > 0 }, active: sn };
6546
6549
  }), Ue = Ne != null, je = i ? [...n].sort((I, V) => (V.value ?? 0) - (I.value ?? 0)).slice(0, 6) : [];
6547
6550
  return /* @__PURE__ */ m("div", { ref: y, ...v, className: `select-globe${g ? " " + g : ""}`, children: [
@@ -6549,13 +6552,13 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6549
6552
  "div",
6550
6553
  {
6551
6554
  ref: _,
6552
- className: `select-globe__stage${T ? " is-grabbing" : ""}`,
6555
+ className: `select-globe__stage${W ? " is-grabbing" : ""}`,
6553
6556
  style: { width: u ? "100%" : `${c / 16}rem`, aspectRatio: "1" },
6554
6557
  onPointerEnter: () => {
6555
6558
  L.current = !0;
6556
6559
  },
6557
6560
  onPointerLeave: (I) => {
6558
- L.current = !1, Se(I), W(null), $.hide(), Z();
6561
+ L.current = !1, Se(I), T(null), $.hide(), Z();
6559
6562
  },
6560
6563
  onPointerDown: re,
6561
6564
  onPointerMove: me,
@@ -6664,7 +6667,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6664
6667
  fill: I.col,
6665
6668
  className: "select-globe__point",
6666
6669
  onPointerEnter: () => {
6667
- W(I.i), $.show({
6670
+ T(I.i), $.show({
6668
6671
  x: I.p.x,
6669
6672
  y: I.p.y - I.r - 4,
6670
6673
  place: I.p.y < Q ? "bottom" : "top",
@@ -6673,7 +6676,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6673
6676
  });
6674
6677
  },
6675
6678
  onPointerLeave: () => {
6676
- W(null), $.hide();
6679
+ T(null), $.hide();
6677
6680
  },
6678
6681
  onClick: () => {
6679
6682
  N.current = { lng: -I.lng, lat: s }, Z();
@@ -6697,14 +6700,14 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6697
6700
  function Bo({ children: t, speed: n = 28, className: l, ...c }) {
6698
6701
  const s = q(null), a = q(null), r = q(null), d = Ct(s, 0), o = Ct(r, 0), i = d > 0 && o > d + 1, h = q(0), u = q(null), f = q(!1);
6699
6702
  le(() => {
6700
- var S;
6703
+ var w;
6701
6704
  const x = a.current;
6702
6705
  if (!x) return;
6703
6706
  if (!i) {
6704
6707
  h.current = 0, x.style.transform = "";
6705
6708
  return;
6706
6709
  }
6707
- const $ = ((S = window.matchMedia) == null ? void 0 : S.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
6710
+ const $ = ((w = window.matchMedia) == null ? void 0 : w.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
6708
6711
  let _ = 0, p = performance.now();
6709
6712
  const b = (k) => {
6710
6713
  const M = Math.min(0.1, (k - p) / 1e3);
@@ -6746,7 +6749,7 @@ function Io({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6746
6749
  var A;
6747
6750
  const { ref: a, width: r } = ce(n), d = X(), o = te(), [i, h] = D(null), u = { ...Be, right: 44 }, f = [...t].sort((F, B) => B.value - F.value), g = f.length, v = f.reduce((F, B) => F + B.value, 0) || 1;
6748
6751
  let y = 0;
6749
- const x = f.map((F) => (y += F.value, y / v * 100)), $ = Math.max(0, r - u.left - u.right), _ = n - u.top - u.bottom, p = ye(((A = f[0]) == null ? void 0 : A.value) ?? 1), b = g > 0 ? $ / g : 0, S = Math.min(b * 0.62, 46), k = u.top + _, M = (F) => k - F / p * _, w = (F) => k - F / 100 * _, N = (F) => u.left + b * F + b / 2, C = x.map((F, B) => [N(B), w(F)]), L = j(0), E = j(1);
6752
+ const x = f.map((F) => (y += F.value, y / v * 100)), $ = Math.max(0, r - u.left - u.right), _ = n - u.top - u.bottom, p = ye(((A = f[0]) == null ? void 0 : A.value) ?? 1), b = g > 0 ? $ / g : 0, w = Math.min(b * 0.62, 46), k = u.top + _, M = (F) => k - F / p * _, S = (F) => k - F / 100 * _, N = (F) => u.left + b * F + b / 2, C = x.map((F, B) => [N(B), S(F)]), L = j(0), E = j(1);
6750
6753
  return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
6751
6754
  r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
6752
6755
  h(null), d.hide();
@@ -6759,27 +6762,27 @@ function Io({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6759
6762
  /* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: M(F), y2: M(F), className: B === 0 ? "select-chart__axis" : "select-chart__grid" }),
6760
6763
  /* @__PURE__ */ e("text", { x: u.left - 8, y: M(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(F) })
6761
6764
  ] }, B)),
6762
- [0, 25, 50, 75, 100].map((F, B) => /* @__PURE__ */ m("text", { x: r - 4, y: w(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: [
6765
+ [0, 25, 50, 75, 100].map((F, B) => /* @__PURE__ */ m("text", { x: r - 4, y: S(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: [
6763
6766
  F,
6764
6767
  "%"
6765
6768
  ] }, `r${B}`)),
6766
- /* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: w(80), y2: w(80), className: "select-chart__crosshair" }),
6769
+ /* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: S(80), y2: S(80), className: "select-chart__crosshair" }),
6767
6770
  f.map((F, B) => {
6768
- const T = M(F.value);
6771
+ const W = M(F.value);
6769
6772
  return /* @__PURE__ */ e(
6770
6773
  "rect",
6771
6774
  {
6772
- x: N(B) - S / 2,
6773
- y: T,
6774
- width: S,
6775
- height: Math.max(0, k - T),
6775
+ x: N(B) - w / 2,
6776
+ y: W,
6777
+ width: w,
6778
+ height: Math.max(0, k - W),
6776
6779
  rx: 4,
6777
6780
  fill: `url(#${o}-b)`,
6778
6781
  className: "select-chart__bar",
6779
6782
  onMouseEnter: () => d.show({
6780
6783
  x: N(B),
6781
- y: T,
6782
- place: T < u.top + 40 ? "bottom" : "top",
6784
+ y: W,
6785
+ place: W < u.top + 40 ? "bottom" : "top",
6783
6786
  title: F.label,
6784
6787
  rows: [
6785
6788
  { label: "Valor", value: l(F.value), color: L },
@@ -6829,7 +6832,7 @@ const Po = R(function({ segments: n, cols: l = 10, rows: c = 10, format: s = Y,
6829
6832
  ] });
6830
6833
  });
6831
6834
  function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", height: c, format: s = Y, leftColor: a, rightColor: r, centerWidth: d = 84, className: o, ...i }) {
6832
- const h = c ?? Math.max(180, t.length * 40 + 36), { ref: u, width: f } = ce(h), g = X(), [v, y] = D(null), x = 8, $ = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f - d - x * 2) / 2), S = t.length ? (h - $ - _) / t.length : 0, k = Math.min(S * 0.6, 26), M = x + b, w = x + b + d, N = a ?? j(1), C = r ?? j(0);
6835
+ const h = c ?? Math.max(180, t.length * 40 + 36), { ref: u, width: f } = ce(h), g = X(), [v, y] = D(null), x = 8, $ = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f - d - x * 2) / 2), w = t.length ? (h - $ - _) / t.length : 0, k = Math.min(w * 0.6, 26), M = x + b, S = x + b + d, N = a ?? j(1), C = r ?? j(0);
6833
6836
  return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: u, children: [
6834
6837
  f > 0 && /* @__PURE__ */ m("svg", { width: f, height: h, className: "select-chart", onMouseLeave: () => {
6835
6838
  y(null), g.hide();
@@ -6837,8 +6840,8 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6837
6840
  /* @__PURE__ */ e("text", { x, y: 14, className: "select-chart__xlabel", textAnchor: "start", style: { fill: N, fontWeight: 600 }, children: n }),
6838
6841
  /* @__PURE__ */ e("text", { x: f - x, y: 14, className: "select-chart__xlabel", textAnchor: "end", style: { fill: C, fontWeight: 600 }, children: l }),
6839
6842
  t.map((L, E) => {
6840
- const A = $ + S * E + S / 2, F = L.left / p * b, B = L.right / p * b, T = v === L.label;
6841
- return /* @__PURE__ */ m("g", { style: { opacity: v === null || T ? 1 : 0.5 }, children: [
6843
+ const A = $ + w * E + w / 2, F = L.left / p * b, B = L.right / p * b, W = v === L.label;
6844
+ return /* @__PURE__ */ m("g", { style: { opacity: v === null || W ? 1 : 0.5 }, children: [
6842
6845
  /* @__PURE__ */ e(
6843
6846
  "rect",
6844
6847
  {
@@ -6860,7 +6863,7 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6860
6863
  /* @__PURE__ */ e(
6861
6864
  "rect",
6862
6865
  {
6863
- x: w,
6866
+ x: S,
6864
6867
  y: A - k / 2,
6865
6868
  width: B,
6866
6869
  height: k,
@@ -6868,14 +6871,14 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6868
6871
  fill: C,
6869
6872
  className: "select-pyramid__bar select-pyramid__bar--r",
6870
6873
  onMouseEnter: () => {
6871
- y(L.label), g.show({ x: w + B, y: A - k / 2, place: "top", title: L.label, rows: [{ label: l, value: s(L.right), color: C }] });
6874
+ y(L.label), g.show({ x: S + B, y: A - k / 2, place: "top", title: L.label, rows: [{ label: l, value: s(L.right), color: C }] });
6872
6875
  },
6873
6876
  onMouseLeave: () => {
6874
6877
  y(null), g.hide();
6875
6878
  }
6876
6879
  }
6877
6880
  ),
6878
- /* @__PURE__ */ e("text", { x: (M + w) / 2, y: A, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "middle", children: L.label })
6881
+ /* @__PURE__ */ e("text", { x: (M + S) / 2, y: A, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "middle", children: L.label })
6879
6882
  ] }, L.label);
6880
6883
  })
6881
6884
  ] }),
@@ -6885,8 +6888,8 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6885
6888
  function Do({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
6886
6889
  const { ref: r, width: d } = ce(l), o = X(), [i, h] = D(null), u = { top: 16, right: 78, bottom: 28, left: 28 }, f = n.length, g = t.length, v = Math.max(0, d - u.left - u.right), y = l - u.top - u.bottom, x = t.map(() => new Array(f).fill(0));
6887
6890
  for (let p = 0; p < f; p++)
6888
- t.map((S, k) => ({ si: k, v: S.data[p] ?? 0 })).sort((S, k) => k.v - S.v).forEach((S, k) => {
6889
- x[S.si][p] = k + 1;
6891
+ t.map((w, k) => ({ si: k, v: w.data[p] ?? 0 })).sort((w, k) => k.v - w.v).forEach((w, k) => {
6892
+ x[w.si][p] = k + 1;
6890
6893
  });
6891
6894
  const $ = (p) => u.left + (f <= 1 ? v / 2 : v / (f - 1) * p), _ = (p) => u.top + (g <= 1 ? y / 2 : y / (g - 1) * (p - 1));
6892
6895
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
@@ -6895,35 +6898,35 @@ function Do({ series: t, labels: n, height: l = 240, format: c = Y, className: s
6895
6898
  }, children: [
6896
6899
  n.map((p, b) => /* @__PURE__ */ e("text", { x: $(b), y: l - u.bottom + 16, className: "select-chart__xlabel", textAnchor: b === 0 ? "start" : b === f - 1 ? "end" : "middle", children: p }, b)),
6897
6900
  t.map((p, b) => {
6898
- const S = p.color ?? j(b), k = x[b].map((M, w) => [$(w), _(M)]);
6901
+ const w = p.color ?? j(b), k = x[b].map((M, S) => [$(S), _(M)]);
6899
6902
  return /* @__PURE__ */ m("g", { style: { opacity: i === null || i === b ? 1 : 0.22 }, children: [
6900
6903
  /* @__PURE__ */ e(
6901
6904
  "path",
6902
6905
  {
6903
6906
  d: Ge(k),
6904
6907
  fill: "none",
6905
- stroke: S,
6908
+ stroke: w,
6906
6909
  strokeWidth: i === b ? 3.5 : 2.5,
6907
6910
  strokeLinecap: "round",
6908
6911
  style: { cursor: "pointer" },
6909
6912
  onMouseEnter: () => h(b)
6910
6913
  }
6911
6914
  ),
6912
- k.map((M, w) => /* @__PURE__ */ e(
6915
+ k.map((M, S) => /* @__PURE__ */ e(
6913
6916
  "circle",
6914
6917
  {
6915
6918
  cx: M[0],
6916
6919
  cy: M[1],
6917
6920
  r: i === b ? 5.5 : 4,
6918
- fill: S,
6921
+ fill: w,
6919
6922
  className: "select-chart__dot",
6920
6923
  onMouseEnter: () => {
6921
- h(b), o.show({ x: M[0], y: M[1] - 8, place: "top", title: p.name, rows: [{ label: n[w] ?? "", value: `#${x[b][w]} · ${c(p.data[w] ?? 0)}`, color: S }] });
6924
+ h(b), o.show({ x: M[0], y: M[1] - 8, place: "top", title: p.name, rows: [{ label: n[S] ?? "", value: `#${x[b][S]} · ${c(p.data[S] ?? 0)}`, color: w }] });
6922
6925
  }
6923
6926
  },
6924
- w
6927
+ S
6925
6928
  )),
6926
- /* @__PURE__ */ e("text", { x: $(f - 1) + 10, y: _(x[b][f - 1]), className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "start", style: { fill: S, fontWeight: 600 }, children: p.name })
6929
+ /* @__PURE__ */ e("text", { x: $(f - 1) + 10, y: _(x[b][f - 1]), className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "start", style: { fill: w, fontWeight: 600 }, children: p.name })
6927
6930
  ] }, b);
6928
6931
  })
6929
6932
  ] }),
@@ -6935,8 +6938,8 @@ function To({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
6935
6938
  const p = n.map((b) => b.values[_.key] ?? 0);
6936
6939
  return { min: Math.min(...p), max: Math.max(...p) };
6937
6940
  }), $ = (_, p) => {
6938
- const b = x[_], S = b.max === b.min ? 0.5 : (p - b.min) / (b.max - b.min);
6939
- return u.top + g - S * g;
6941
+ const b = x[_], w = b.max === b.min ? 0.5 : (p - b.min) / (b.max - b.min);
6942
+ return u.top + g - w * g;
6940
6943
  };
6941
6944
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
6942
6945
  d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", onMouseLeave: () => {
@@ -6949,11 +6952,11 @@ function To({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
6949
6952
  /* @__PURE__ */ e("text", { x: y(p), y: u.top + g + 14, className: "select-chart__ylabel", textAnchor: "middle", style: { fontSize: 9 }, children: c(x[p].min) })
6950
6953
  ] }, _.key)),
6951
6954
  n.map((_, p) => {
6952
- const b = _.color ?? j(p), S = t.map((k, M) => `${M ? "L" : "M"}${y(M).toFixed(1)},${$(M, _.values[k.key] ?? 0).toFixed(1)}`).join("");
6955
+ const b = _.color ?? j(p), w = t.map((k, M) => `${M ? "L" : "M"}${y(M).toFixed(1)},${$(M, _.values[k.key] ?? 0).toFixed(1)}`).join("");
6953
6956
  return /* @__PURE__ */ e(
6954
6957
  "path",
6955
6958
  {
6956
- d: S,
6959
+ d: w,
6957
6960
  fill: "none",
6958
6961
  stroke: b,
6959
6962
  strokeWidth: i === p ? 3 : 1.75,
@@ -6990,11 +6993,11 @@ function Nl(t, n = 0) {
6990
6993
  function Wo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6991
6994
  const { ref: a, width: r } = ce(n), d = X(), [o, i] = D(null), h = Nl(t), u = n / (h + 1), f = [], g = (v, y, x, $, _) => {
6992
6995
  if (f.push({ node: v, x0: y, x1: x, depth: $, color: v.color ?? j(_), value: Mt(v) }), v.children && v.children.length) {
6993
- const p = v.children.reduce((S, k) => S + Mt(k), 0) || 1;
6996
+ const p = v.children.reduce((w, k) => w + Mt(k), 0) || 1;
6994
6997
  let b = y;
6995
- v.children.forEach((S, k) => {
6996
- const M = (x - y) * Mt(S) / p;
6997
- g(S, b, b + M, $ + 1, $ === 0 ? k : _), b += M;
6998
+ v.children.forEach((w, k) => {
6999
+ const M = (x - y) * Mt(w) / p;
7000
+ g(w, b, b + M, $ + 1, $ === 0 ? k : _), b += M;
6998
7001
  });
6999
7002
  }
7000
7003
  };
@@ -7037,12 +7040,12 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7037
7040
  if (a > 0) {
7038
7041
  const u = [];
7039
7042
  let f = 0, g = 0;
7040
- const v = (p, b, S, k) => {
7043
+ const v = (p, b, w, k) => {
7041
7044
  g = Math.max(g, b);
7042
- const M = { node: p, depth: b, yUnit: 0, ci: S, parent: k };
7045
+ const M = { node: p, depth: b, yUnit: 0, ci: w, parent: k };
7043
7046
  if (p.children && p.children.length) {
7044
- const w = p.children.map((N, C) => v(N, b + 1, b === 0 ? C : S, M));
7045
- M.yUnit = (w[0].yUnit + w[w.length - 1].yUnit) / 2;
7047
+ const S = p.children.map((N, C) => v(N, b + 1, b === 0 ? C : w, M));
7048
+ M.yUnit = (S[0].yUnit + S[S.length - 1].yUnit) / 2;
7046
7049
  } else
7047
7050
  M.yUnit = f, f++;
7048
7051
  return u.push(M), M;
@@ -7063,7 +7066,7 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7063
7066
  ) : null
7064
7067
  ),
7065
7068
  u.map((p, b) => {
7066
- const S = p.node.color ?? j(p.ci), k = $(p.depth), M = _(p.yUnit), w = !p.node.children || !p.node.children.length;
7069
+ const w = p.node.color ?? j(p.ci), k = $(p.depth), M = _(p.yUnit), S = !p.node.children || !p.node.children.length;
7067
7070
  return /* @__PURE__ */ m("g", { style: { opacity: d === null || d === b ? 1 : 0.4 }, children: [
7068
7071
  /* @__PURE__ */ e(
7069
7072
  "circle",
@@ -7071,7 +7074,7 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7071
7074
  cx: k,
7072
7075
  cy: M,
7073
7076
  r: d === b ? 6 : 4.5,
7074
- fill: S,
7077
+ fill: w,
7075
7078
  className: "select-tree__node",
7076
7079
  onMouseEnter: () => {
7077
7080
  o(b), r.show({ x: k, y: M - 8, place: "top", title: p.node.label, rows: [] });
@@ -7084,11 +7087,11 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7084
7087
  /* @__PURE__ */ e(
7085
7088
  "text",
7086
7089
  {
7087
- x: w ? k + 9 : k,
7088
- y: w ? M : M - 9,
7090
+ x: S ? k + 9 : k,
7091
+ y: S ? M : M - 9,
7089
7092
  className: "select-chart__xlabel",
7090
7093
  dominantBaseline: "middle",
7091
- textAnchor: w ? "start" : "middle",
7094
+ textAnchor: S ? "start" : "middle",
7092
7095
  children: p.node.label
7093
7096
  }
7094
7097
  )
@@ -7159,13 +7162,13 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7159
7162
  let C = 0, L = 0, E = null;
7160
7163
  for (let A = 0; A < 8e3; A++) {
7161
7164
  const F = Math.cos(C) * L, B = Math.sin(C) * L;
7162
- let T = !0;
7165
+ let W = !0;
7163
7166
  for (const P of f)
7164
7167
  if (Math.hypot(F - P.x, B - P.y) < P.r + N.r + 2) {
7165
- T = !1;
7168
+ W = !1;
7166
7169
  break;
7167
7170
  }
7168
- if (T) {
7171
+ if (W) {
7169
7172
  E = [F, B];
7170
7173
  break;
7171
7174
  }
@@ -7173,7 +7176,7 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7173
7176
  }
7174
7177
  E && f.push({ d: N.d, i: N.i, x: E[0], y: E[1], r: N.r });
7175
7178
  }
7176
- const g = Math.min(...f.map((N) => N.x - N.r)), v = Math.max(...f.map((N) => N.x + N.r)), y = Math.min(...f.map((N) => N.y - N.r)), x = Math.max(...f.map((N) => N.y + N.r)), $ = v - g || 1, _ = x - y || 1, p = 8, b = Math.min((l - p * 2) / $, (l - p * 2) / _), S = (l - $ * b) / 2 - g * b, k = (l - _ * b) / 2 - y * b, M = (N) => N * b + S, w = (N) => N * b + k;
7179
+ const g = Math.min(...f.map((N) => N.x - N.r)), v = Math.max(...f.map((N) => N.x + N.r)), y = Math.min(...f.map((N) => N.y - N.r)), x = Math.max(...f.map((N) => N.y + N.r)), $ = v - g || 1, _ = x - y || 1, p = 8, b = Math.min((l - p * 2) / $, (l - p * 2) / _), w = (l - $ * b) / 2 - g * b, k = (l - _ * b) / 2 - y * b, M = (N) => N * b + w, S = (N) => N * b + k;
7177
7180
  return /* @__PURE__ */ m("div", { ref: r, ...a, className: `select-donut-wrap${s ? " " + s : ""}`, children: [
7178
7181
  /* @__PURE__ */ e("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: /* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", onMouseLeave: () => {
7179
7182
  i(null), d.hide();
@@ -7184,7 +7187,7 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7184
7187
  "circle",
7185
7188
  {
7186
7189
  cx: M(N.x),
7187
- cy: w(N.y),
7190
+ cy: S(N.y),
7188
7191
  r: L,
7189
7192
  fill: C,
7190
7193
  fillOpacity: 0.3,
@@ -7192,14 +7195,14 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7192
7195
  strokeWidth: 1.5,
7193
7196
  className: "select-pack__circle",
7194
7197
  onMouseEnter: () => {
7195
- i(N.i), d.show({ x: M(N.x), y: w(N.y) - L, place: w(N.y) - L < 40 ? "bottom" : "top", title: N.d.label, rows: [{ label: "Valor", value: c(N.d.value), color: C }] });
7198
+ i(N.i), d.show({ x: M(N.x), y: S(N.y) - L, place: S(N.y) - L < 40 ? "bottom" : "top", title: N.d.label, rows: [{ label: "Valor", value: c(N.d.value), color: C }] });
7196
7199
  },
7197
7200
  onMouseLeave: () => {
7198
7201
  i(null), d.hide();
7199
7202
  }
7200
7203
  }
7201
7204
  ),
7202
- L > 18 && /* @__PURE__ */ e("text", { x: M(N.x), y: w(N.y), className: "select-chart__xlabel", textAnchor: "middle", dominantBaseline: "middle", style: { fontWeight: 600 }, children: N.d.label })
7205
+ L > 18 && /* @__PURE__ */ e("text", { x: M(N.x), y: S(N.y), className: "select-chart__xlabel", textAnchor: "middle", dominantBaseline: "middle", style: { fontWeight: 600 }, children: N.d.label })
7203
7206
  ] }, N.i);
7204
7207
  }) }) }),
7205
7208
  /* @__PURE__ */ e(K, { tip: d.tip })
@@ -7214,25 +7217,25 @@ function Vo({ nodes: t, links: n, height: l = 300, format: c = Y, className: s,
7214
7217
  x: v / 2 + Math.cos(M / x * 2 * Math.PI) * v * 0.3,
7215
7218
  y: y / 2 + Math.sin(M / x * 2 * Math.PI) * y * 0.3
7216
7219
  })), p = new Map(t.map((k, M) => [k.id, M])), b = Math.sqrt(v * y / x) * 0.55;
7217
- let S = v * 0.12;
7220
+ let w = v * 0.12;
7218
7221
  for (let k = 0; k < 320; k++) {
7219
7222
  const M = _.map(() => ({ x: 0, y: 0 }));
7220
- for (let w = 0; w < x; w++)
7221
- for (let N = w + 1; N < x; N++) {
7222
- const C = _[w].x - _[N].x, L = _[w].y - _[N].y, E = Math.hypot(C, L) || 0.01, A = b * b / E;
7223
- M[w].x += C / E * A, M[w].y += L / E * A, M[N].x -= C / E * A, M[N].y -= L / E * A;
7223
+ for (let S = 0; S < x; S++)
7224
+ for (let N = S + 1; N < x; N++) {
7225
+ const C = _[S].x - _[N].x, L = _[S].y - _[N].y, E = Math.hypot(C, L) || 0.01, A = b * b / E;
7226
+ M[S].x += C / E * A, M[S].y += L / E * A, M[N].x -= C / E * A, M[N].y -= L / E * A;
7224
7227
  }
7225
- for (const w of n) {
7226
- const N = p.get(w.source), C = p.get(w.target);
7228
+ for (const S of n) {
7229
+ const N = p.get(S.source), C = p.get(S.target);
7227
7230
  if (N == null || C == null) continue;
7228
7231
  const L = _[N].x - _[C].x, E = _[N].y - _[C].y, A = Math.hypot(L, E) || 0.01, F = A * A / b;
7229
7232
  M[N].x -= L / A * F, M[N].y -= E / A * F, M[C].x += L / A * F, M[C].y += E / A * F;
7230
7233
  }
7231
- for (let w = 0; w < x; w++) {
7232
- const N = M[w].x, C = M[w].y, L = Math.hypot(N, C) || 0.01, E = Math.min(L, S);
7233
- _[w].x = Math.max(18, Math.min(v - 18, _[w].x + N / L * E)), _[w].y = Math.max(18, Math.min(y - 18, _[w].y + C / L * E));
7234
+ for (let S = 0; S < x; S++) {
7235
+ const N = M[S].x, C = M[S].y, L = Math.hypot(N, C) || 0.01, E = Math.min(L, w);
7236
+ _[S].x = Math.max(18, Math.min(v - 18, _[S].x + N / L * E)), _[S].y = Math.max(18, Math.min(y - 18, _[S].y + C / L * E));
7234
7237
  }
7235
- S *= 0.97;
7238
+ w *= 0.97;
7236
7239
  }
7237
7240
  return _.forEach((k) => $.set(k.id, { x: k.x, y: k.y })), $;
7238
7241
  }, [t, n, d, l]), f = /* @__PURE__ */ new Map();
@@ -7295,13 +7298,13 @@ function Bs({ children: t }) {
7295
7298
  return /* @__PURE__ */ e("div", { className: "select-combobox__list", ref: n, children: t });
7296
7299
  }
7297
7300
  const Zo = R(function({ label: n, value: l, onChange: c, options: s, placeholder: a = "Selecionar…", searchPlaceholder: r = "Buscar…", labelAction: d, hint: o, error: i, emptyText: h = "Nenhum resultado", disabled: u, required: f, size: g = "md", searchable: v = !0, className: y, ...x }, $) {
7298
- const _ = te(), [p, b] = D(!1), [S, k] = D(""), M = s.find((E) => E.value === l), w = xe(() => {
7299
- const E = S.trim().toLowerCase();
7301
+ const _ = te(), [p, b] = D(!1), [w, k] = D(""), M = s.find((E) => E.value === l), S = xe(() => {
7302
+ const E = w.trim().toLowerCase();
7300
7303
  return !v || !E ? s : s.filter((A) => {
7301
7304
  var F;
7302
7305
  return A.label.toLowerCase().includes(E) || ((F = A.secondary) == null ? void 0 : F.toLowerCase().includes(E));
7303
7306
  });
7304
- }, [s, S, v]), N = () => {
7307
+ }, [s, w, v]), N = () => {
7305
7308
  b(!1), k("");
7306
7309
  }, C = (E) => {
7307
7310
  c(E), N();
@@ -7343,13 +7346,13 @@ const Zo = R(function({ label: n, value: l, onChange: c, options: s, placeholder
7343
7346
  {
7344
7347
  className: "select-combobox__searchinput",
7345
7348
  type: "text",
7346
- value: S,
7349
+ value: w,
7347
7350
  onChange: (E) => k(E.target.value),
7348
7351
  placeholder: r,
7349
7352
  autoFocus: !0
7350
7353
  }
7351
7354
  ) }),
7352
- /* @__PURE__ */ e(Bs, { children: w.length === 0 ? /* @__PURE__ */ e("div", { className: "select-combobox__empty", children: h }) : w.map((E) => {
7355
+ /* @__PURE__ */ e(Bs, { children: S.length === 0 ? /* @__PURE__ */ e("div", { className: "select-combobox__empty", children: h }) : S.map((E) => {
7353
7356
  const A = E.value === l;
7354
7357
  return /* @__PURE__ */ m(
7355
7358
  "button",
@@ -7696,12 +7699,12 @@ function Os(t) {
7696
7699
  return n = n % 12 || 12, `${n} : ${String(t.getMinutes()).padStart(2, "0")} ${l}`;
7697
7700
  }
7698
7701
  const Hs = R(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, accentVar: a, locale: r = "en-US", showTime: d = !0, maxDate: o, embedded: i = !1, className: h, ...u }, f) {
7699
- const g = Rs[r], v = Re(/* @__PURE__ */ new Date()), y = o ? Re(o) : null, [x, $] = D(n ?? { from: v, to: v }), [_, p] = D(xt((n == null ? void 0 : n.from) ?? /* @__PURE__ */ new Date())), [b, S] = D(null), k = At(xt(_), -xt(_).getDay()), M = Array.from({ length: 42 }, (A, F) => At(k, F)), w = (A) => y ? Re(A) > y : !1, N = (A) => A ? g.formatDate(A) : /* @__PURE__ */ e("span", { className: "select-datepicker__placeholder", children: "— / — / ——" }), C = (A) => {
7700
- w(A) || (S(null), $((F) => !F.from || F.from && F.to ? { from: A, to: null } : A < Re(F.from) ? { from: A, to: null } : { from: F.from, to: A }));
7702
+ const g = Rs[r], v = Re(/* @__PURE__ */ new Date()), y = o ? Re(o) : null, [x, $] = D(n ?? { from: v, to: v }), [_, p] = D(xt((n == null ? void 0 : n.from) ?? /* @__PURE__ */ new Date())), [b, w] = D(null), k = At(xt(_), -xt(_).getDay()), M = Array.from({ length: 42 }, (A, F) => At(k, F)), S = (A) => y ? Re(A) > y : !1, N = (A) => A ? g.formatDate(A) : /* @__PURE__ */ e("span", { className: "select-datepicker__placeholder", children: "— / — / ——" }), C = (A) => {
7703
+ S(A) || (w(null), $((F) => !F.from || F.from && F.to ? { from: A, to: null } : A < Re(F.from) ? { from: A, to: null } : { from: F.from, to: A }));
7701
7704
  }, L = (A) => {
7702
7705
  if (A.disabled || !A.range) return;
7703
7706
  const F = A.range();
7704
- $(F), S(A.id), F.from && p(xt(F.from));
7707
+ $(F), w(A.id), F.from && p(xt(F.from));
7705
7708
  }, E = a ? { "--select-dp-accent": `var(${a})` } : void 0;
7706
7709
  return /* @__PURE__ */ e("div", { ref: f, ...u, className: `select select-datepicker${i ? " select-datepicker--bare" : ""}${h ? " " + h : ""}`, style: E, children: /* @__PURE__ */ m("div", { className: "select-datepicker__body", children: [
7707
7710
  /* @__PURE__ */ e("div", { className: "select-datepicker__presets", role: "listbox", "aria-label": "Intervalos", children: l.map((A) => {
@@ -7759,7 +7762,7 @@ const Hs = R(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, acce
7759
7762
  /* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
7760
7763
  g.weekdays.map((A, F) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: A }, F)),
7761
7764
  M.map((A) => {
7762
- const F = A.getMonth() !== _.getMonth(), B = w(A), T = !!x.from && yt(A, x.from), P = !!x.to && yt(A, x.to), O = T || P, W = !!x.from && !!x.to && !yt(x.from, x.to), G = "select-datepicker__day" + (!!x.from && !!x.to && A > Re(x.from) && A < Re(x.to) ? " select-datepicker__day--in-range" : "") + (W && T ? " select-datepicker__day--range-start" : "") + (W && P ? " select-datepicker__day--range-end" : ""), J = "select-datepicker__daybtn" + (O ? " is-selected" : "") + (yt(A, v) && !O ? " is-today" : "") + (F ? " is-outside" : "");
7765
+ const F = A.getMonth() !== _.getMonth(), B = S(A), W = !!x.from && yt(A, x.from), P = !!x.to && yt(A, x.to), O = W || P, T = !!x.from && !!x.to && !yt(x.from, x.to), G = "select-datepicker__day" + (!!x.from && !!x.to && A > Re(x.from) && A < Re(x.to) ? " select-datepicker__day--in-range" : "") + (T && W ? " select-datepicker__day--range-start" : "") + (T && P ? " select-datepicker__day--range-end" : ""), J = "select-datepicker__daybtn" + (O ? " is-selected" : "") + (yt(A, v) && !O ? " is-today" : "") + (F ? " is-outside" : "");
7763
7766
  return /* @__PURE__ */ e("div", { className: G, children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: B, onClick: () => C(A), children: A.getDate() }) }, A.getTime());
7764
7767
  })
7765
7768
  ] }),
@@ -7856,11 +7859,11 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7856
7859
  ) : /* @__PURE__ */ e("span", { children: $ }, y);
7857
7860
  }) });
7858
7861
  }), sr = R(function({ label: n, value: l, onChange: c, min: s, max: a, step: r = 1, decimal: d = !1, disabled: o = !1, hint: i, error: h, onBlur: u, placeholder: f, size: g = "md", className: v, ...y }, x) {
7859
- const $ = te(), _ = (F) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, F)), p = (F) => Math.round(F * 1e6) / 1e6, b = l ?? 0, S = s != null && b <= s, k = a != null && b >= a, [M, w] = D(!1), [N, C] = D(""), L = d && M ? N : l == null ? "" : String(l), E = (F) => {
7862
+ const $ = te(), _ = (F) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, F)), p = (F) => Math.round(F * 1e6) / 1e6, b = l ?? 0, w = s != null && b <= s, k = a != null && b >= a, [M, S] = D(!1), [N, C] = D(""), L = d && M ? N : l == null ? "" : String(l), E = (F) => {
7860
7863
  const B = d ? F.replace(/[^\d.,-]/g, "").replace(",", ".") : F.replace(/[^\d-]/g, "");
7861
7864
  if (d && C(B), B === "" || B === "-" || B === ".") return c(null);
7862
- const T = Number(B);
7863
- Number.isFinite(T) && c(_(T));
7865
+ const W = Number(B);
7866
+ Number.isFinite(W) && c(_(W));
7864
7867
  }, A = (F) => {
7865
7868
  const B = _(p(b + F));
7866
7869
  d && C(String(B)), c(B);
@@ -7875,7 +7878,7 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7875
7878
  size: g,
7876
7879
  icon: /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "select-numfield__minus", children: "−" }),
7877
7880
  label: "Diminuir",
7878
- disabled: o || S,
7881
+ disabled: o || w,
7879
7882
  onClick: () => A(-r)
7880
7883
  }
7881
7884
  ),
@@ -7892,10 +7895,10 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7892
7895
  value: L,
7893
7896
  onChange: (F) => E(F.target.value),
7894
7897
  onFocus: () => {
7895
- w(!0), C(l == null ? "" : String(l));
7898
+ S(!0), C(l == null ? "" : String(l));
7896
7899
  },
7897
7900
  onBlur: () => {
7898
- w(!1), u == null || u();
7901
+ S(!1), u == null || u();
7899
7902
  },
7900
7903
  "aria-invalid": h ? !0 : void 0
7901
7904
  }
@@ -7929,11 +7932,11 @@ function ar({
7929
7932
  emptyState: h,
7930
7933
  helpText: u
7931
7934
  }) {
7932
- const f = d == null || t.length < d, g = t.length > r, v = (_, p) => n(t.map((b, S) => S === _ ? p : b)), y = (_) => n(t.filter((p, b) => b !== _)), x = (_, p) => {
7935
+ const f = d == null || t.length < d, g = t.length > r, v = (_, p) => n(t.map((b, w) => w === _ ? p : b)), y = (_) => n(t.filter((p, b) => b !== _)), x = (_, p) => {
7933
7936
  const b = _ + p;
7934
7937
  if (b < 0 || b >= t.length) return;
7935
- const S = t.slice(), k = S[_];
7936
- S[_] = S[b], S[b] = k, n(S);
7938
+ const w = t.slice(), k = w[_];
7939
+ w[_] = w[b], w[b] = k, n(w);
7937
7940
  }, $ = (_, p) => ({
7938
7941
  index: p,
7939
7942
  isFirst: p === 0,