@selectwin/kit 0.1.21 → 0.1.23

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,48 @@ 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
5028
  };
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: [
5029
+ return /* @__PURE__ */ m("div", { ref: g, ...f, className: `select-chart-wrap select-heatmap${u ? " " + u : ""}`, style: p, children: [
5030
+ /* @__PURE__ */ m("div", { className: "select-heatmap__grid", style: b, children: [
5031
5031
  /* @__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);
5032
+ n.map((w) => /* @__PURE__ */ e("div", { className: "select-heatmap__colhead", children: w }, w)),
5033
+ l.map((w) => /* @__PURE__ */ m(Yt, { children: [
5034
+ /* @__PURE__ */ e("div", { className: "select-heatmap__rowhead", children: w.label }),
5035
+ w.values.map((k, M) => {
5036
+ const S = `${w.label}-${n[M] ?? M}`;
5037
+ if (k == null || !Number.isFinite(k))
5038
+ return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty" }, S);
5039
+ 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
5040
  return /* @__PURE__ */ e(
5041
5041
  "div",
5042
5042
  {
5043
5043
  className: "select-heatmap__cell",
5044
5044
  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)"
5045
+ background: `linear-gradient(150deg, color-mix(in srgb, ${a} ${L}%, transparent), color-mix(in srgb, ${a} ${C}%, transparent))`,
5046
+ color: N > 0.55 ? "#fff" : "var(--select-text)"
5047
5047
  },
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 }]
5048
+ onMouseEnter: (E) => {
5049
+ 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;
5050
+ v.show({
5051
+ x: O,
5052
+ y: T,
5053
+ place: P,
5054
+ title: `${w.label} · ${n[M] ?? ""}`,
5055
+ rows: [{ label: "Valor", value: (s ?? c)(k), color: a }]
5056
5056
  });
5057
5057
  },
5058
- onMouseLeave: g.hide,
5059
- children: r ? c(S) : ""
5058
+ onMouseLeave: v.hide,
5059
+ children: r ? c(k) : ""
5060
5060
  },
5061
- M
5061
+ S
5062
5062
  );
5063
5063
  })
5064
- ] }, b.label))
5064
+ ] }, w.label))
5065
5065
  ] }),
5066
- /* @__PURE__ */ e(K, { tip: g.tip })
5066
+ /* @__PURE__ */ e(K, { tip: v.tip })
5067
5067
  ] });
5068
5068
  });
5069
5069
  function oo({
@@ -5150,14 +5150,14 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5150
5150
  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
5151
  Math.max(Bn, p * En + Tt),
5152
5152
  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));
5153
+ ), 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
5154
  return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: v, children: [
5155
5155
  y > 0 && /* @__PURE__ */ m("svg", { width: y, height: g, className: "select-chart", children: [
5156
5156
  /* @__PURE__ */ e("defs", { children: t.map((F, B) => {
5157
- const T = A(F, B);
5157
+ const W = A(F, B);
5158
5158
  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 })
5159
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: W, stopOpacity: 1 }),
5160
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: W, stopOpacity: 0.5 })
5161
5161
  ] }, B);
5162
5162
  }) }),
5163
5163
  we(_).map((F, B) => /* @__PURE__ */ m("g", { children: [
@@ -5174,14 +5174,14 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5174
5174
  /* @__PURE__ */ e("text", { x: E(F), y: g - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: c(F) })
5175
5175
  ] }, B)),
5176
5176
  t.map((F, B) => {
5177
- const T = 6 + C * B + C / 2, P = F.value / _ * w, O = A(F, B);
5177
+ const W = 6 + C * B + C / 2, P = F.value / _ * S, O = A(F, B);
5178
5178
  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" }),
5179
+ /* @__PURE__ */ e("rect", { x: w, y: W - L / 2, width: S, height: L, rx: 5, className: "select-chart__track-bar" }),
5180
5180
  /* @__PURE__ */ e(
5181
5181
  "rect",
5182
5182
  {
5183
- x: S,
5184
- y: T - L / 2,
5183
+ x: w,
5184
+ y: W - L / 2,
5185
5185
  width: Math.max(0, P),
5186
5186
  height: L,
5187
5187
  rx: 5,
@@ -5189,9 +5189,9 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5189
5189
  className: "select-chart__hbar",
5190
5190
  style: { animationDelay: `${B * 40}ms` },
5191
5191
  onMouseEnter: () => x.show({
5192
- x: S + P,
5193
- y: T - L / 2,
5194
- place: T - L / 2 < 50 ? "bottom" : "top",
5192
+ x: w + P,
5193
+ y: W - L / 2,
5194
+ place: W - L / 2 < 50 ? "bottom" : "top",
5195
5195
  rows: [{ label: F.label, value: (s ?? c)(F.value), color: O }]
5196
5196
  }),
5197
5197
  onMouseLeave: x.hide
@@ -5200,8 +5200,8 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5200
5200
  /* @__PURE__ */ m(
5201
5201
  "text",
5202
5202
  {
5203
- x: S - Tt / 2,
5204
- y: T,
5203
+ x: w - Tt / 2,
5204
+ y: W,
5205
5205
  className: "select-chart__ylabel",
5206
5206
  dominantBaseline: "middle",
5207
5207
  textAnchor: "end",
@@ -5229,7 +5229,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5229
5229
  total: "var(--select-chart-1)",
5230
5230
  inc: "var(--select-chart-4)",
5231
5231
  dec: "var(--select-chart-3)"
5232
- }, S = (k) => k.total ? "total" : k.value >= 0 ? "inc" : "dec";
5232
+ }, w = (k) => k.total ? "total" : k.value >= 0 ? "inc" : "dec";
5233
5233
  return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
5234
5234
  r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
5235
5235
  /* @__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 +5250,16 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5250
5250
  /* @__PURE__ */ e("text", { x: f.left - 8, y: p(k), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(k) })
5251
5251
  ] }, M)),
5252
5252
  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}`);
5253
+ const S = f.left + $ * M + $ / 2 + _ / 2, N = f.left + $ * (M + 1) + $ / 2 - _ / 2;
5254
+ return /* @__PURE__ */ e("line", { x1: S, x2: N, y1: p(k.end), y2: p(k.end), className: "select-chart__crosshair" }, `c${M}`);
5255
5255
  }),
5256
5256
  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);
5257
+ 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
5258
  return /* @__PURE__ */ m("g", { children: [
5259
5259
  /* @__PURE__ */ e(
5260
5260
  "rect",
5261
5261
  {
5262
- x: w - _ / 2,
5262
+ x: S - _ / 2,
5263
5263
  y: N,
5264
5264
  width: _,
5265
5265
  height: Math.max(2, C),
@@ -5268,7 +5268,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5268
5268
  className: "select-chart__bar",
5269
5269
  style: { animationDelay: `${M * 40}ms` },
5270
5270
  onMouseEnter: () => d.show({
5271
- x: w,
5271
+ x: S,
5272
5272
  y: N,
5273
5273
  place: N < f.top + 52 ? "bottom" : "top",
5274
5274
  title: k.label,
@@ -5280,7 +5280,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5280
5280
  onMouseLeave: d.hide
5281
5281
  }
5282
5282
  ),
5283
- /* @__PURE__ */ e("text", { x: w, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k.label })
5283
+ /* @__PURE__ */ e("text", { x: S, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k.label })
5284
5284
  ] }, M);
5285
5285
  })
5286
5286
  ] }),
@@ -5345,16 +5345,16 @@ function Fs(t, n, l) {
5345
5345
  if (i >= h) {
5346
5346
  const p = _ / h;
5347
5347
  let b = o;
5348
- $.forEach((S, k) => {
5348
+ $.forEach((w, k) => {
5349
5349
  const M = x[k] / p;
5350
- c.push({ x: d, y: b, w: p, h: M, idx: S }), b += M;
5350
+ c.push({ x: d, y: b, w: p, h: M, idx: w }), b += M;
5351
5351
  }), a(r.slice(y), d + p, o, i - p, h);
5352
5352
  } else {
5353
5353
  const p = _ / i;
5354
5354
  let b = d;
5355
- $.forEach((S, k) => {
5355
+ $.forEach((w, k) => {
5356
5356
  const M = x[k] / p;
5357
- c.push({ x: b, y: o, w: M, h: p, idx: S }), b += M;
5357
+ c.push({ x: b, y: o, w: M, h: p, idx: w }), b += M;
5358
5358
  }), a(r.slice(y), d, o + p, i, h - p);
5359
5359
  }
5360
5360
  };
@@ -5409,36 +5409,36 @@ function po({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5409
5409
  ] });
5410
5410
  }
5411
5411
  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;
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 * $, w = (M) => p - M / v * _, k = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(y) * (r - 4) : 4.5;
5413
5413
  return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
5414
5414
  h > 0 && /* @__PURE__ */ m("svg", { width: h, height: n, className: "select-chart", children: [
5415
- we(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
5415
+ we(v).map((M, S) => /* @__PURE__ */ m("g", { children: [
5416
5416
  /* @__PURE__ */ e(
5417
5417
  "line",
5418
5418
  {
5419
5419
  x1: x.left,
5420
5420
  x2: h - x.right,
5421
- y1: S(M),
5422
- y2: S(M),
5423
- className: w === 0 ? "select-chart__axis" : "select-chart__grid"
5421
+ y1: w(M),
5422
+ y2: w(M),
5423
+ className: S === 0 ? "select-chart__axis" : "select-chart__grid"
5424
5424
  }
5425
5425
  ),
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);
5426
+ /* @__PURE__ */ e("text", { x: x.left - 8, y: w(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
5427
+ ] }, `y${S}`)),
5428
+ 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}`)),
5429
+ t.map((M, S) => {
5430
+ const N = M.color ?? j(S);
5431
5431
  return /* @__PURE__ */ e("g", { fill: N, children: M.points.map((C, L) => /* @__PURE__ */ e(
5432
5432
  "circle",
5433
5433
  {
5434
5434
  cx: b(C.x),
5435
- cy: S(C.y),
5435
+ cy: w(C.y),
5436
5436
  r: k(C),
5437
5437
  className: "select-chart__point",
5438
5438
  onMouseEnter: () => u.show({
5439
5439
  x: b(C.x),
5440
- y: S(C.y) - k(C),
5441
- place: S(C.y) - k(C) < x.top + 52 ? "bottom" : "top",
5440
+ y: w(C.y) - k(C),
5441
+ place: w(C.y) - k(C) < x.top + 52 ? "bottom" : "top",
5442
5442
  title: C.label ?? M.name,
5443
5443
  rows: [
5444
5444
  { label: "X", value: l(C.x), color: N },
@@ -5449,32 +5449,32 @@ function mo({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax:
5449
5449
  onMouseLeave: u.hide
5450
5450
  },
5451
5451
  L
5452
- )) }, w);
5452
+ )) }, S);
5453
5453
  })
5454
5454
  ] }),
5455
5455
  /* @__PURE__ */ e(K, { tip: u.tip })
5456
5456
  ] });
5457
5457
  }
5458
5458
  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";
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((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
5460
  return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
5461
5461
  /* @__PURE__ */ m("div", { className: "select-radar", style: { width: c, aspectRatio: "1" }, children: [
5462
5462
  /* @__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);
5463
+ /* @__PURE__ */ e("defs", { children: l.map((w, k) => {
5464
+ const M = w.color ?? j(k);
5465
5465
  return /* @__PURE__ */ m("radialGradient", { id: `${f}-rd${k}`, children: [
5466
5466
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: M, stopOpacity: 0.32 }),
5467
5467
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: M, stopOpacity: 0.12 })
5468
5468
  ] }, k);
5469
5469
  }) }),
5470
- Array.from({ length: r }, (S, k) => {
5470
+ Array.from({ length: r }, (w, k) => {
5471
5471
  const M = x * (k + 1) / r;
5472
5472
  return /* @__PURE__ */ e("path", { d: b(n.map(() => M)), className: "select-chart__grid", fill: "none" }, k);
5473
5473
  }),
5474
- n.map((S, k) => {
5475
- const [M, w] = p(k, x), [N, C] = p(k, x + 14);
5474
+ n.map((w, k) => {
5475
+ const [M, S] = p(k, x), [N, C] = p(k, x + 14);
5476
5476
  return /* @__PURE__ */ m("g", { children: [
5477
- /* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: w, className: "select-chart__grid" }),
5477
+ /* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: S, className: "select-chart__grid" }),
5478
5478
  /* @__PURE__ */ e(
5479
5479
  "text",
5480
5480
  {
@@ -5483,16 +5483,16 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5483
5483
  className: "select-chart__xlabel",
5484
5484
  textAnchor: Math.abs(N - v) < 4 ? "middle" : N > v ? "start" : "end",
5485
5485
  dominantBaseline: "middle",
5486
- children: S
5486
+ children: w
5487
5487
  }
5488
5488
  )
5489
5489
  ] }, k);
5490
5490
  }),
5491
- l.map((S, k) => {
5492
- const M = S.color ?? j(k), w = S.values.map((N) => Math.max(0, N) / $ * x);
5491
+ l.map((w, k) => {
5492
+ const M = w.color ?? j(k), S = w.values.map((N) => Math.max(0, N) / $ * x);
5493
5493
  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) => {
5494
+ /* @__PURE__ */ e("path", { d: b(S), fill: `url(#${f}-rd${k})`, stroke: M, strokeWidth: 2, strokeLinejoin: "round", className: "select-chart__area" }),
5495
+ S.map((N, C) => {
5496
5496
  const [L, E] = p(C, N);
5497
5497
  return /* @__PURE__ */ e(
5498
5498
  "circle",
@@ -5507,7 +5507,7 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5507
5507
  y: E,
5508
5508
  place: E < 44 ? "bottom" : "top",
5509
5509
  title: n[C],
5510
- rows: [{ label: S.name, value: a(S.values[C] ?? 0), color: M }]
5510
+ rows: [{ label: w.name, value: a(w.values[C] ?? 0), color: M }]
5511
5511
  }),
5512
5512
  onMouseLeave: u.hide
5513
5513
  },
@@ -5519,9 +5519,9 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5519
5519
  ] }),
5520
5520
  /* @__PURE__ */ e(K, { tip: u.tip })
5521
5521
  ] }),
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 })
5522
+ d && l.length > 1 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: l.map((w, k) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
5523
+ /* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: w.color ?? j(k) } }),
5524
+ /* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: w.name })
5525
5525
  ] }, k)) })
5526
5526
  ] });
5527
5527
  });
@@ -5533,24 +5533,24 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5533
5533
  const E = /* @__PURE__ */ new Map();
5534
5534
  let A = v;
5535
5535
  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;
5536
+ const W = g(F, C) * _;
5537
+ E.set(F, { name: F, y: A, h: W, cursor: A, color: j(B + L) }), A += W + s;
5538
5538
  }), E;
5539
- }, b = p(h, "source", 0), S = p(u, "target", h.length), k = c, M = o - c, w = (k + M) / 2;
5539
+ }, b = p(h, "source", 0), w = p(u, "target", h.length), k = c, M = o - c, S = (k + M) / 2;
5540
5540
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
5541
5541
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
5542
5542
  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;
5543
+ const L = b.get(N.source), E = w.get(N.target), A = N.value * _, F = L.cursor, B = E.cursor;
5544
5544
  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`;
5545
+ 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
5546
  return /* @__PURE__ */ e(
5547
5547
  "path",
5548
5548
  {
5549
- d: T,
5549
+ d: W,
5550
5550
  fill: L.color,
5551
5551
  className: "select-sankey__link",
5552
5552
  onMouseEnter: () => i.show({
5553
- x: w,
5553
+ x: S,
5554
5554
  y: (F + B + A) / 2,
5555
5555
  place: "top",
5556
5556
  title: `${N.source} → ${N.target}`,
@@ -5565,7 +5565,7 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5565
5565
  /* @__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
5566
  /* @__PURE__ */ e("text", { x: c + 6, y: N.y + N.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "start", children: N.name })
5567
5567
  ] }, `s${C}`)),
5568
- [...S.values()].map((N, C) => /* @__PURE__ */ m("g", { children: [
5568
+ [...w.values()].map((N, C) => /* @__PURE__ */ m("g", { children: [
5569
5569
  /* @__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
5570
  /* @__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
5571
  ] }, `t${C}`))
@@ -5574,46 +5574,46 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5574
5574
  ] });
5575
5575
  }
5576
5576
  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);
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((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
5578
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
5579
5579
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
5580
- M.map((w, N) => /* @__PURE__ */ m("g", { children: [
5580
+ M.map((S, N) => /* @__PURE__ */ m("g", { children: [
5581
5581
  /* @__PURE__ */ e(
5582
5582
  "line",
5583
5583
  {
5584
5584
  x1: h.left,
5585
5585
  x2: o - h.right,
5586
- y1: p(w),
5587
- y2: p(w),
5586
+ y1: p(S),
5587
+ y2: p(S),
5588
5588
  className: N === 0 ? "select-chart__axis" : "select-chart__grid"
5589
5589
  }
5590
5590
  ),
5591
- /* @__PURE__ */ e("text", { x: h.left - 8, y: p(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(w) })
5591
+ /* @__PURE__ */ e("text", { x: h.left - 8, y: p(S), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(S) })
5592
5592
  ] }, 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)));
5593
+ t.map((S, N) => {
5594
+ 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
5595
  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 }),
5596
+ /* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(S.high), y2: p(S.low), stroke: E, strokeWidth: 1.5 }),
5597
5597
  /* @__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 }),
5598
+ /* @__PURE__ */ e("text", { x: C, y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: S.label }),
5599
5599
  /* @__PURE__ */ e(
5600
5600
  "rect",
5601
5601
  {
5602
- x: h.left + S * N,
5602
+ x: h.left + w * N,
5603
5603
  y: h.top,
5604
- width: S,
5604
+ width: w,
5605
5605
  height: f,
5606
5606
  fill: "transparent",
5607
5607
  onMouseEnter: () => i.show({
5608
5608
  x: C,
5609
- y: p(w.high),
5610
- place: p(w.high) < h.top + 64 ? "bottom" : "top",
5611
- title: w.label,
5609
+ y: p(S.high),
5610
+ place: p(S.high) < h.top + 64 ? "bottom" : "top",
5611
+ title: S.label,
5612
5612
  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) }
5613
+ { label: "Abertura", value: l(S.open), color: E },
5614
+ { label: "Máxima", value: l(S.high) },
5615
+ { label: "Mínima", value: l(S.low) },
5616
+ { label: "Fechamento", value: l(S.close) }
5617
5617
  ]
5618
5618
  }),
5619
5619
  onMouseLeave: i.hide
@@ -5682,7 +5682,7 @@ function go({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5682
5682
  ] });
5683
5683
  }
5684
5684
  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);
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, 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
5686
  return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
5687
5687
  v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
5688
5688
  /* @__PURE__ */ e("defs", { children: t.map((L, E) => {
@@ -5706,25 +5706,25 @@ function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
5706
5706
  /* @__PURE__ */ e("text", { x: N(L), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: s(L) })
5707
5707
  ] }, E)),
5708
5708
  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);
5709
+ 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
5710
  return /* @__PURE__ */ m("g", { children: [
5711
5711
  /* @__PURE__ */ e(
5712
5712
  "rect",
5713
5713
  {
5714
5714
  x: F,
5715
- y: A - w / 2,
5715
+ y: A - S / 2,
5716
5716
  width: B,
5717
- height: w,
5717
+ height: S,
5718
5718
  rx: 5,
5719
5719
  fill: `url(#${x}-rg${E})`,
5720
5720
  className: "select-chart__hbar",
5721
5721
  style: { animationDelay: `${E * 40}ms` },
5722
5722
  onMouseEnter: () => y.show({
5723
5723
  x: F + B / 2,
5724
- y: A - w / 2,
5725
- place: A - w / 2 < 50 ? "bottom" : "top",
5724
+ y: A - S / 2,
5725
+ place: A - S / 2 < 50 ? "bottom" : "top",
5726
5726
  title: L.label,
5727
- rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: T }]
5727
+ rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: W }]
5728
5728
  }),
5729
5729
  onMouseLeave: y.hide
5730
5730
  }
@@ -5739,17 +5739,17 @@ function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
5739
5739
  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
5740
  const g = X();
5741
5741
  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 };
5742
+ 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
5743
  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: [
5744
+ /* @__PURE__ */ m("svg", { width: w, height: k, className: "select-chart", children: [
5745
5745
  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
5746
+ (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
5747
  ),
5748
5748
  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
5749
+ (S, N) => S ? /* @__PURE__ */ e("text", { x: _ + N * b, y: p - 4, className: "select-chart__xlabel", textAnchor: "start", children: S }, N) : null
5750
5750
  ),
5751
5751
  n.map(
5752
- (w, N) => w.map((C, L) => {
5752
+ (S, N) => S.map((C, L) => {
5753
5753
  const E = _ + N * b, A = p + L * b;
5754
5754
  if (C == null || !Number.isFinite(C))
5755
5755
  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 +5787,15 @@ const xo = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
5787
5787
  /* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
5788
5788
  [0.34, 0.67, 1].map(($, _) => /* @__PURE__ */ e("circle", { cx: h, cy: u, r: f * $, className: "select-chart__grid", fill: "none" }, _)),
5789
5789
  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);
5790
+ 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
5791
  return /* @__PURE__ */ e(
5792
5792
  "path",
5793
5793
  {
5794
5794
  d: it(h, u, k, 0, p, b),
5795
- fill: S,
5795
+ fill: w,
5796
5796
  fillOpacity: 0.8,
5797
5797
  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 }] }),
5798
+ onMouseEnter: () => i.show({ x: S, y: N, place: N < u ? "top" : "bottom", title: $.label, rows: [{ label: "Valor", value: c($.value), color: w }] }),
5799
5799
  onMouseLeave: i.hide
5800
5800
  },
5801
5801
  _
@@ -5859,29 +5859,29 @@ function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
5859
5859
  ] });
5860
5860
  }
5861
5861
  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;
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((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
5863
  return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
5864
5864
  v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
5865
- we(_).map((w, N) => /* @__PURE__ */ m("g", { children: [
5865
+ we(_).map((S, N) => /* @__PURE__ */ m("g", { children: [
5866
5866
  /* @__PURE__ */ e(
5867
5867
  "line",
5868
5868
  {
5869
- x1: M(w),
5870
- x2: M(w),
5869
+ x1: M(S),
5870
+ x2: M(S),
5871
5871
  y1: 6,
5872
- y2: 6 + S,
5872
+ y2: 6 + w,
5873
5873
  className: N === 0 ? "select-chart__axis" : "select-chart__grid"
5874
5874
  }
5875
5875
  ),
5876
- /* @__PURE__ */ e("text", { x: M(w), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(w) })
5876
+ /* @__PURE__ */ e("text", { x: M(S), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(S) })
5877
5877
  ] }, N)),
5878
- t.map((w, N) => {
5878
+ t.map((S, N) => {
5879
5879
  const C = 6 + k * N + k / 2;
5880
5880
  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 }),
5881
+ /* @__PURE__ */ e("line", { x1: M(S.from), x2: M(S.to), y1: C, y2: C, stroke: "var(--select-chart-track)", strokeWidth: 4, strokeLinecap: "round" }),
5882
+ /* @__PURE__ */ e("circle", { cx: M(S.from), cy: C, r: 5, fill: x, className: "select-chart__dot" }),
5883
+ /* @__PURE__ */ e("circle", { cx: M(S.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: S.label }),
5885
5885
  /* @__PURE__ */ e(
5886
5886
  "rect",
5887
5887
  {
@@ -5891,14 +5891,14 @@ function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
5891
5891
  height: k,
5892
5892
  fill: "transparent",
5893
5893
  onMouseEnter: () => y.show({
5894
- x: (M(w.from) + M(w.to)) / 2,
5894
+ x: (M(S.from) + M(S.to)) / 2,
5895
5895
  y: C - 8,
5896
5896
  place: C - 8 < 50 ? "bottom" : "top",
5897
- title: w.label,
5897
+ title: S.label,
5898
5898
  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)}` }
5899
+ { label: c, value: l(S.from), color: x },
5900
+ { label: s, value: l(S.to), color: $ },
5901
+ { label: "Δ", value: `${S.to - S.from >= 0 ? "+" : ""}${l(S.to - S.from)}` }
5902
5902
  ]
5903
5903
  }),
5904
5904
  onMouseLeave: y.hide
@@ -5911,7 +5911,7 @@ function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
5911
5911
  ] });
5912
5912
  }
5913
5913
  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 = [];
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, w) => b + w.value, 0)), g = f.reduce((p, b) => p + b, 0) || 1, v = [];
5915
5915
  t.forEach((p) => p.segments.forEach((b) => {
5916
5916
  v.includes(b.key) || v.push(b.key);
5917
5917
  }));
@@ -5919,13 +5919,13 @@ function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
5919
5919
  let _ = i.left;
5920
5920
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
5921
5921
  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 = _;
5922
+ const w = f[b] || 1, k = w / g * $, M = _;
5923
5923
  _ += k + c;
5924
- let w = i.top;
5924
+ let S = i.top;
5925
5925
  return /* @__PURE__ */ m("g", { children: [
5926
5926
  p.segments.map((N, C) => {
5927
- const L = N.value / S * u, E = w;
5928
- w += L;
5927
+ const L = N.value / w * u, E = S;
5928
+ S += L;
5929
5929
  const A = y(N.key, N.color);
5930
5930
  return /* @__PURE__ */ e(
5931
5931
  "rect",
@@ -5944,7 +5944,7 @@ function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
5944
5944
  title: `${p.label} · ${N.key}`,
5945
5945
  rows: [
5946
5946
  { label: "Valor", value: l(N.value), color: A },
5947
- { label: "Share", value: `${Math.round(N.value / S * 100)}%` }
5947
+ { label: "Share", value: `${Math.round(N.value / w * 100)}%` }
5948
5948
  ]
5949
5949
  }),
5950
5950
  onMouseLeave: o.hide
@@ -5967,17 +5967,17 @@ const ko = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
5967
5967
  const E = Math.PI + L * Math.PI;
5968
5968
  return [v + g * Math.cos(E), y + g * Math.sin(E)];
5969
5969
  }, 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)}`;
5970
+ const [A, F] = _(L), [B, W] = _(E);
5971
+ return `M ${A.toFixed(2)} ${F.toFixed(2)} A ${g} ${g} 0 0 1 ${B.toFixed(2)} ${W.toFixed(2)}`;
5972
5972
  };
5973
5973
  let b = 0;
5974
- const S = c.map((L) => {
5974
+ const w = c.map((L) => {
5975
5975
  const E = $(b) / l, A = $(L.upTo) / l;
5976
5976
  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);
5977
+ }), 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
5978
  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
5979
  /* @__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)),
5980
+ w.map((L, E) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: u, strokeLinecap: "butt" }, E)),
5981
5981
  /* @__PURE__ */ e("line", { x1: v, y1: y, x2: N, y2: C, stroke: "var(--select-text)", strokeWidth: 3, strokeLinecap: "round", className: "select-gaugeband__needle" }),
5982
5982
  /* @__PURE__ */ e("circle", { cx: v, cy: y, r: 5, fill: "var(--select-text)" })
5983
5983
  ] }),
@@ -5988,20 +5988,20 @@ const ko = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
5988
5988
  ] }) });
5989
5989
  });
5990
5990
  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 = [];
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((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) => {
5992
+ const S = [], N = [];
5993
5993
  return n.forEach((C, L) => {
5994
5994
  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 };
5995
+ S.push([p(L), A]), N.push([p(L), F]), b[L] = b[L] + (k.data[L] ?? 0);
5996
+ }), { upper: S, lower: N, color: k.color ?? j(M), name: k.name };
5997
5997
  });
5998
5998
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
5999
5999
  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: [
6000
+ /* @__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
6001
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: k.color, stopOpacity: 0.95 }),
6002
6002
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: k.color, stopOpacity: 0.6 })
6003
6003
  ] }, 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)),
6004
+ w.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${i}-st${M})`, className: "select-chart__area" }, M)),
6005
6005
  h != null && /* @__PURE__ */ e("line", { x1: p(h), x2: p(h), y1: g.top, y2: g.top + y, className: "select-chart__crosshair" }),
6006
6006
  n.map(
6007
6007
  (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 +6020,7 @@ function wo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
6020
6020
  y: g.top + y / 2,
6021
6021
  place: "top",
6022
6022
  title: k,
6023
- rows: t.map((w, N) => ({ label: w.name, value: c(w.data[M] ?? 0), color: w.color ?? j(N) }))
6023
+ rows: t.map((S, N) => ({ label: S.name, value: c(S.data[M] ?? 0), color: S.color ?? j(N) }))
6024
6024
  });
6025
6025
  },
6026
6026
  onMouseLeave: () => {
@@ -6044,23 +6044,23 @@ const So = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
6044
6044
  /* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart select-donut", "aria-hidden": "true", children: n.map(($, _) => {
6045
6045
  const p = v[_], b = x / y * 360;
6046
6046
  x += p;
6047
- const S = x / y * 360, k = $.color ?? j(_);
6047
+ const w = x / y * 360, k = $.color ?? j(_);
6048
6048
  let M = b;
6049
6049
  return /* @__PURE__ */ m("g", { children: [
6050
6050
  /* @__PURE__ */ e(
6051
6051
  "path",
6052
6052
  {
6053
- d: it(i, h, f, g, b + 0.6, Math.max(b + 0.7, S - 0.6)),
6053
+ d: it(i, h, f, g, b + 0.6, Math.max(b + 0.7, w - 0.6)),
6054
6054
  fill: k,
6055
6055
  className: "select-chart__seg",
6056
6056
  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
6057
  onMouseLeave: o.hide
6058
6058
  }
6059
6059
  ),
6060
- ($.children ?? []).map((w, N) => {
6060
+ ($.children ?? []).map((S, N) => {
6061
6061
  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);
6062
+ M += S.value / y * 360;
6063
+ const L = M, E = S.color ?? k, A = 0.45 + N % 3 * 0.2, F = ((C + L) / 2 - 90) * (Math.PI / 180);
6064
6064
  return /* @__PURE__ */ e(
6065
6065
  "path",
6066
6066
  {
@@ -6072,10 +6072,10 @@ const So = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
6072
6072
  x: i + (u - 6) * Math.cos(F),
6073
6073
  y: h + (u - 6) * Math.sin(F),
6074
6074
  place: h + (u - 6) * Math.sin(F) < h ? "top" : "bottom",
6075
- title: `${$.label} · ${w.label}`,
6075
+ title: `${$.label} · ${S.label}`,
6076
6076
  rows: [
6077
- { label: "Valor", value: c(w.value), color: k },
6078
- { label: "Share", value: `${Math.round(w.value / (p || 1) * 100)}%` }
6077
+ { label: "Valor", value: c(S.value), color: k },
6078
+ { label: "Share", value: `${Math.round(S.value / (p || 1) * 100)}%` }
6079
6079
  ]
6080
6080
  }),
6081
6081
  onMouseLeave: o.hide
@@ -6112,13 +6112,13 @@ function Co({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6112
6112
  /* @__PURE__ */ e("text", { x: o.left - 8, y: g(_), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(_) })
6113
6113
  ] }, p)),
6114
6114
  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)]);
6115
+ 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 = [];
6116
+ for (let A = k - 1; A >= 0; A--) N.push([b + S(A), M(A)]);
6117
+ for (let A = 0; A < k; A++) C.push([b - S(A), M(A)]);
6118
6118
  const L = `${Cn(N)} ${Cn(C).replace(/^M/, "L")} Z`, E = _.median != null ? g(_.median) : null;
6119
6119
  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 }),
6120
+ /* @__PURE__ */ e("path", { d: L, fill: w, fillOpacity: 0.32, stroke: w, 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: w, strokeWidth: 2 }),
6122
6122
  /* @__PURE__ */ e("text", { x: b, y: n - o.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: _.label }),
6123
6123
  /* @__PURE__ */ e(
6124
6124
  "rect",
@@ -6134,7 +6134,7 @@ function Co({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6134
6134
  place: g(_.max) < o.top + 64 ? "bottom" : "top",
6135
6135
  title: _.label,
6136
6136
  rows: [
6137
- { label: "Máx", value: l(_.max), color: S },
6137
+ { label: "Máx", value: l(_.max), color: w },
6138
6138
  ..._.median != null ? [{ label: "Mediana", value: l(_.median) }] : [],
6139
6139
  { label: "Mín", value: l(_.min) }
6140
6140
  ]
@@ -6163,19 +6163,19 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6163
6163
  b[N][L] = [C, C + E], C += E;
6164
6164
  }
6165
6165
  }
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 = [];
6166
+ 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) => {
6167
+ const [A, F] = w(N, v), [B, W] = w(C, v), [P, O] = w(L, v), [T, Z] = w(E, v);
6168
+ 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`;
6169
+ }, M = (N) => N * 180 / Math.PI, S = [];
6170
6170
  for (let N = 0; N < h; N++)
6171
6171
  for (let C = N; C < h; C++) {
6172
6172
  if (N === C || n[N][C] + n[C][N] <= 0) continue;
6173
6173
  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] });
6174
+ S.push({ d: k(L, E, A, F), color: j(N), i: N, j: C, value: n[N][C] + n[C][N] });
6175
6175
  }
6176
6176
  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
6177
  /* @__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(
6178
+ S.map((N, C) => /* @__PURE__ */ e(
6179
6179
  "path",
6180
6180
  {
6181
6181
  d: N.d,
@@ -6193,7 +6193,7 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6193
6193
  C
6194
6194
  )),
6195
6195
  _.map((N, C) => {
6196
- const L = (N.a0 + N.a1) / 2, [E, A] = S(L, g + 12);
6196
+ const L = (N.a0 + N.a1) / 2, [E, A] = w(L, g + 12);
6197
6197
  return /* @__PURE__ */ m("g", { children: [
6198
6198
  /* @__PURE__ */ e("path", { d: it(u, f, g, v, M(N.a0), M(N.a1)), fill: j(C), className: "select-chord__arc" }),
6199
6199
  /* @__PURE__ */ e(
@@ -6214,10 +6214,10 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6214
6214
  ] }) });
6215
6215
  });
6216
6216
  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];
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), w = (C, L) => {
6218
+ let E = C, A = L, F = -E - A, B = Math.round(E), W = Math.round(F), P = Math.round(A);
6219
+ const O = Math.abs(B - E), T = Math.abs(W - F), Z = Math.abs(P - A);
6220
+ return O > T && O > Z ? B = -W - P : T > Z ? W = -B - P : P = -B - W, [B, P];
6221
6221
  }, k = (C, L) => [p * b * (C + L / 2), p * (3 / 2) * L], M = (C, L) => {
6222
6222
  let E = "";
6223
6223
  for (let A = 0; A < 6; A++) {
@@ -6225,15 +6225,15 @@ function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--sele
6225
6225
  E += `${A === 0 ? "M" : "L"}${(C + p * Math.cos(F)).toFixed(1)},${(L + p * Math.sin(F)).toFixed(1)}`;
6226
6226
  }
6227
6227
  return E + "Z";
6228
- }, w = /* @__PURE__ */ new Map();
6228
+ }, S = /* @__PURE__ */ new Map();
6229
6229
  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);
6230
+ 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}`;
6231
+ S.set(P, (S.get(P) ?? 0) + 1);
6232
6232
  }
6233
- const N = Math.max(1, ...w.values());
6233
+ const N = Math.max(1, ...S.values());
6234
6234
  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);
6235
+ h > 0 && /* @__PURE__ */ e("svg", { width: h, height: n, className: "select-chart", children: [...S].map(([C, L]) => {
6236
+ 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
6237
  return /* @__PURE__ */ e(
6238
6238
  "path",
6239
6239
  {
@@ -6417,9 +6417,9 @@ function Pn(t, n, l) {
6417
6417
  }
6418
6418
  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
6419
  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(
6420
+ 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
6421
  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 = () => {
6422
+ ), 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
6423
  A.current || (F.current = performance.now(), A.current = requestAnimationFrame(G));
6424
6424
  };
6425
6425
  function G(I) {
@@ -6429,10 +6429,10 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6429
6429
  if (!C.current) if (N.current) {
6430
6430
  const se = Math.min(1, V * 6);
6431
6431
  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;
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 && !w.current && !L.current && (k.current.lng += r * V));
6433
+ 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
6434
  }
6435
- le(() => (S.current || Z(), () => {
6435
+ le(() => (w.current || Z(), () => {
6436
6436
  A.current && cancelAnimationFrame(A.current), A.current = 0;
6437
6437
  }), []);
6438
6438
  const J = q(f);
@@ -6442,8 +6442,8 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6442
6442
  const V = (U) => {
6443
6443
  var ee;
6444
6444
  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);
6445
+ const oe = S.current * (U.deltaY < 0 ? 1.12 : 0.89);
6446
+ 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
6447
  };
6448
6448
  return I.addEventListener("wheel", V, { passive: !1 }), () => I.removeEventListener("wheel", V);
6449
6449
  }, []);
@@ -6452,12 +6452,12 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6452
6452
  (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
6453
  }, me = (I) => {
6454
6454
  if (!C.current) return;
6455
- const V = 0.34 / w.current, U = I.clientX - C.current.x, oe = I.clientY - C.current.y;
6455
+ const V = 0.34 / S.current, U = I.clientX - C.current.x, oe = I.clientY - C.current.y;
6456
6456
  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
6457
  }, Se = (I) => {
6458
6458
  var V, U;
6459
6459
  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) => {
6460
+ }, ne = (p / 2 - 6) * S.current, H = p / 2, Q = p / 2, z = (I) => {
6461
6461
  const V = bt(I, k.current.lng, k.current.lat);
6462
6462
  return { x: H + ne * V[0], y: Q - ne * V[1], z: V[2] };
6463
6463
  }, ue = xe(() => {
@@ -6541,7 +6541,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6541
6541
  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
6542
  $l[2] > -0.05 ? (ee += `${se ? "L" : "M"}${an.x.toFixed(1)},${an.y.toFixed(1)}`, se = !0) : se = !1;
6543
6543
  }
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));
6544
+ 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
6545
  return { d: ee, col: I.color ?? d, i: V, flow: { ...Je, vis: Pe[2] > 0 }, active: sn };
6546
6546
  }), Ue = Ne != null, je = i ? [...n].sort((I, V) => (V.value ?? 0) - (I.value ?? 0)).slice(0, 6) : [];
6547
6547
  return /* @__PURE__ */ m("div", { ref: y, ...v, className: `select-globe${g ? " " + g : ""}`, children: [
@@ -6549,13 +6549,13 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6549
6549
  "div",
6550
6550
  {
6551
6551
  ref: _,
6552
- className: `select-globe__stage${T ? " is-grabbing" : ""}`,
6552
+ className: `select-globe__stage${W ? " is-grabbing" : ""}`,
6553
6553
  style: { width: u ? "100%" : `${c / 16}rem`, aspectRatio: "1" },
6554
6554
  onPointerEnter: () => {
6555
6555
  L.current = !0;
6556
6556
  },
6557
6557
  onPointerLeave: (I) => {
6558
- L.current = !1, Se(I), W(null), $.hide(), Z();
6558
+ L.current = !1, Se(I), T(null), $.hide(), Z();
6559
6559
  },
6560
6560
  onPointerDown: re,
6561
6561
  onPointerMove: me,
@@ -6664,7 +6664,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6664
6664
  fill: I.col,
6665
6665
  className: "select-globe__point",
6666
6666
  onPointerEnter: () => {
6667
- W(I.i), $.show({
6667
+ T(I.i), $.show({
6668
6668
  x: I.p.x,
6669
6669
  y: I.p.y - I.r - 4,
6670
6670
  place: I.p.y < Q ? "bottom" : "top",
@@ -6673,7 +6673,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6673
6673
  });
6674
6674
  },
6675
6675
  onPointerLeave: () => {
6676
- W(null), $.hide();
6676
+ T(null), $.hide();
6677
6677
  },
6678
6678
  onClick: () => {
6679
6679
  N.current = { lng: -I.lng, lat: s }, Z();
@@ -6697,14 +6697,14 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6697
6697
  function Bo({ children: t, speed: n = 28, className: l, ...c }) {
6698
6698
  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
6699
  le(() => {
6700
- var S;
6700
+ var w;
6701
6701
  const x = a.current;
6702
6702
  if (!x) return;
6703
6703
  if (!i) {
6704
6704
  h.current = 0, x.style.transform = "";
6705
6705
  return;
6706
6706
  }
6707
- const $ = ((S = window.matchMedia) == null ? void 0 : S.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
6707
+ const $ = ((w = window.matchMedia) == null ? void 0 : w.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
6708
6708
  let _ = 0, p = performance.now();
6709
6709
  const b = (k) => {
6710
6710
  const M = Math.min(0.1, (k - p) / 1e3);
@@ -6746,7 +6746,7 @@ function Io({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6746
6746
  var A;
6747
6747
  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
6748
  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);
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, 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
6750
  return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
6751
6751
  r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
6752
6752
  h(null), d.hide();
@@ -6759,27 +6759,27 @@ function Io({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6759
6759
  /* @__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
6760
  /* @__PURE__ */ e("text", { x: u.left - 8, y: M(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(F) })
6761
6761
  ] }, 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: [
6762
+ [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
6763
  F,
6764
6764
  "%"
6765
6765
  ] }, `r${B}`)),
6766
- /* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: w(80), y2: w(80), className: "select-chart__crosshair" }),
6766
+ /* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: S(80), y2: S(80), className: "select-chart__crosshair" }),
6767
6767
  f.map((F, B) => {
6768
- const T = M(F.value);
6768
+ const W = M(F.value);
6769
6769
  return /* @__PURE__ */ e(
6770
6770
  "rect",
6771
6771
  {
6772
- x: N(B) - S / 2,
6773
- y: T,
6774
- width: S,
6775
- height: Math.max(0, k - T),
6772
+ x: N(B) - w / 2,
6773
+ y: W,
6774
+ width: w,
6775
+ height: Math.max(0, k - W),
6776
6776
  rx: 4,
6777
6777
  fill: `url(#${o}-b)`,
6778
6778
  className: "select-chart__bar",
6779
6779
  onMouseEnter: () => d.show({
6780
6780
  x: N(B),
6781
- y: T,
6782
- place: T < u.top + 40 ? "bottom" : "top",
6781
+ y: W,
6782
+ place: W < u.top + 40 ? "bottom" : "top",
6783
6783
  title: F.label,
6784
6784
  rows: [
6785
6785
  { label: "Valor", value: l(F.value), color: L },
@@ -6829,7 +6829,7 @@ const Po = R(function({ segments: n, cols: l = 10, rows: c = 10, format: s = Y,
6829
6829
  ] });
6830
6830
  });
6831
6831
  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);
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), 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
6833
  return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: u, children: [
6834
6834
  f > 0 && /* @__PURE__ */ m("svg", { width: f, height: h, className: "select-chart", onMouseLeave: () => {
6835
6835
  y(null), g.hide();
@@ -6837,8 +6837,8 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6837
6837
  /* @__PURE__ */ e("text", { x, y: 14, className: "select-chart__xlabel", textAnchor: "start", style: { fill: N, fontWeight: 600 }, children: n }),
6838
6838
  /* @__PURE__ */ e("text", { x: f - x, y: 14, className: "select-chart__xlabel", textAnchor: "end", style: { fill: C, fontWeight: 600 }, children: l }),
6839
6839
  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: [
6840
+ const A = $ + w * E + w / 2, F = L.left / p * b, B = L.right / p * b, W = v === L.label;
6841
+ return /* @__PURE__ */ m("g", { style: { opacity: v === null || W ? 1 : 0.5 }, children: [
6842
6842
  /* @__PURE__ */ e(
6843
6843
  "rect",
6844
6844
  {
@@ -6860,7 +6860,7 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6860
6860
  /* @__PURE__ */ e(
6861
6861
  "rect",
6862
6862
  {
6863
- x: w,
6863
+ x: S,
6864
6864
  y: A - k / 2,
6865
6865
  width: B,
6866
6866
  height: k,
@@ -6868,14 +6868,14 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6868
6868
  fill: C,
6869
6869
  className: "select-pyramid__bar select-pyramid__bar--r",
6870
6870
  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 }] });
6871
+ 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
6872
  },
6873
6873
  onMouseLeave: () => {
6874
6874
  y(null), g.hide();
6875
6875
  }
6876
6876
  }
6877
6877
  ),
6878
- /* @__PURE__ */ e("text", { x: (M + w) / 2, y: A, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "middle", children: L.label })
6878
+ /* @__PURE__ */ e("text", { x: (M + S) / 2, y: A, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "middle", children: L.label })
6879
6879
  ] }, L.label);
6880
6880
  })
6881
6881
  ] }),
@@ -6885,8 +6885,8 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6885
6885
  function Do({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
6886
6886
  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
6887
  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;
6888
+ t.map((w, k) => ({ si: k, v: w.data[p] ?? 0 })).sort((w, k) => k.v - w.v).forEach((w, k) => {
6889
+ x[w.si][p] = k + 1;
6890
6890
  });
6891
6891
  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
6892
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
@@ -6895,35 +6895,35 @@ function Do({ series: t, labels: n, height: l = 240, format: c = Y, className: s
6895
6895
  }, children: [
6896
6896
  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
6897
  t.map((p, b) => {
6898
- const S = p.color ?? j(b), k = x[b].map((M, w) => [$(w), _(M)]);
6898
+ const w = p.color ?? j(b), k = x[b].map((M, S) => [$(S), _(M)]);
6899
6899
  return /* @__PURE__ */ m("g", { style: { opacity: i === null || i === b ? 1 : 0.22 }, children: [
6900
6900
  /* @__PURE__ */ e(
6901
6901
  "path",
6902
6902
  {
6903
6903
  d: Ge(k),
6904
6904
  fill: "none",
6905
- stroke: S,
6905
+ stroke: w,
6906
6906
  strokeWidth: i === b ? 3.5 : 2.5,
6907
6907
  strokeLinecap: "round",
6908
6908
  style: { cursor: "pointer" },
6909
6909
  onMouseEnter: () => h(b)
6910
6910
  }
6911
6911
  ),
6912
- k.map((M, w) => /* @__PURE__ */ e(
6912
+ k.map((M, S) => /* @__PURE__ */ e(
6913
6913
  "circle",
6914
6914
  {
6915
6915
  cx: M[0],
6916
6916
  cy: M[1],
6917
6917
  r: i === b ? 5.5 : 4,
6918
- fill: S,
6918
+ fill: w,
6919
6919
  className: "select-chart__dot",
6920
6920
  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 }] });
6921
+ 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
6922
  }
6923
6923
  },
6924
- w
6924
+ S
6925
6925
  )),
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 })
6926
+ /* @__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
6927
  ] }, b);
6928
6928
  })
6929
6929
  ] }),
@@ -6935,8 +6935,8 @@ function To({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
6935
6935
  const p = n.map((b) => b.values[_.key] ?? 0);
6936
6936
  return { min: Math.min(...p), max: Math.max(...p) };
6937
6937
  }), $ = (_, 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;
6938
+ const b = x[_], w = b.max === b.min ? 0.5 : (p - b.min) / (b.max - b.min);
6939
+ return u.top + g - w * g;
6940
6940
  };
6941
6941
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
6942
6942
  d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", onMouseLeave: () => {
@@ -6949,11 +6949,11 @@ function To({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
6949
6949
  /* @__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
6950
  ] }, _.key)),
6951
6951
  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("");
6952
+ 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
6953
  return /* @__PURE__ */ e(
6954
6954
  "path",
6955
6955
  {
6956
- d: S,
6956
+ d: w,
6957
6957
  fill: "none",
6958
6958
  stroke: b,
6959
6959
  strokeWidth: i === p ? 3 : 1.75,
@@ -6990,11 +6990,11 @@ function Nl(t, n = 0) {
6990
6990
  function Wo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6991
6991
  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
6992
  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;
6993
+ const p = v.children.reduce((w, k) => w + Mt(k), 0) || 1;
6994
6994
  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;
6995
+ v.children.forEach((w, k) => {
6996
+ const M = (x - y) * Mt(w) / p;
6997
+ g(w, b, b + M, $ + 1, $ === 0 ? k : _), b += M;
6998
6998
  });
6999
6999
  }
7000
7000
  };
@@ -7037,12 +7037,12 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7037
7037
  if (a > 0) {
7038
7038
  const u = [];
7039
7039
  let f = 0, g = 0;
7040
- const v = (p, b, S, k) => {
7040
+ const v = (p, b, w, k) => {
7041
7041
  g = Math.max(g, b);
7042
- const M = { node: p, depth: b, yUnit: 0, ci: S, parent: k };
7042
+ const M = { node: p, depth: b, yUnit: 0, ci: w, parent: k };
7043
7043
  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;
7044
+ const S = p.children.map((N, C) => v(N, b + 1, b === 0 ? C : w, M));
7045
+ M.yUnit = (S[0].yUnit + S[S.length - 1].yUnit) / 2;
7046
7046
  } else
7047
7047
  M.yUnit = f, f++;
7048
7048
  return u.push(M), M;
@@ -7063,7 +7063,7 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7063
7063
  ) : null
7064
7064
  ),
7065
7065
  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;
7066
+ const w = p.node.color ?? j(p.ci), k = $(p.depth), M = _(p.yUnit), S = !p.node.children || !p.node.children.length;
7067
7067
  return /* @__PURE__ */ m("g", { style: { opacity: d === null || d === b ? 1 : 0.4 }, children: [
7068
7068
  /* @__PURE__ */ e(
7069
7069
  "circle",
@@ -7071,7 +7071,7 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7071
7071
  cx: k,
7072
7072
  cy: M,
7073
7073
  r: d === b ? 6 : 4.5,
7074
- fill: S,
7074
+ fill: w,
7075
7075
  className: "select-tree__node",
7076
7076
  onMouseEnter: () => {
7077
7077
  o(b), r.show({ x: k, y: M - 8, place: "top", title: p.node.label, rows: [] });
@@ -7084,11 +7084,11 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7084
7084
  /* @__PURE__ */ e(
7085
7085
  "text",
7086
7086
  {
7087
- x: w ? k + 9 : k,
7088
- y: w ? M : M - 9,
7087
+ x: S ? k + 9 : k,
7088
+ y: S ? M : M - 9,
7089
7089
  className: "select-chart__xlabel",
7090
7090
  dominantBaseline: "middle",
7091
- textAnchor: w ? "start" : "middle",
7091
+ textAnchor: S ? "start" : "middle",
7092
7092
  children: p.node.label
7093
7093
  }
7094
7094
  )
@@ -7159,13 +7159,13 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7159
7159
  let C = 0, L = 0, E = null;
7160
7160
  for (let A = 0; A < 8e3; A++) {
7161
7161
  const F = Math.cos(C) * L, B = Math.sin(C) * L;
7162
- let T = !0;
7162
+ let W = !0;
7163
7163
  for (const P of f)
7164
7164
  if (Math.hypot(F - P.x, B - P.y) < P.r + N.r + 2) {
7165
- T = !1;
7165
+ W = !1;
7166
7166
  break;
7167
7167
  }
7168
- if (T) {
7168
+ if (W) {
7169
7169
  E = [F, B];
7170
7170
  break;
7171
7171
  }
@@ -7173,7 +7173,7 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7173
7173
  }
7174
7174
  E && f.push({ d: N.d, i: N.i, x: E[0], y: E[1], r: N.r });
7175
7175
  }
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;
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) / _), w = (l - $ * b) / 2 - g * b, k = (l - _ * b) / 2 - y * b, M = (N) => N * b + w, S = (N) => N * b + k;
7177
7177
  return /* @__PURE__ */ m("div", { ref: r, ...a, className: `select-donut-wrap${s ? " " + s : ""}`, children: [
7178
7178
  /* @__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
7179
  i(null), d.hide();
@@ -7184,7 +7184,7 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7184
7184
  "circle",
7185
7185
  {
7186
7186
  cx: M(N.x),
7187
- cy: w(N.y),
7187
+ cy: S(N.y),
7188
7188
  r: L,
7189
7189
  fill: C,
7190
7190
  fillOpacity: 0.3,
@@ -7192,14 +7192,14 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7192
7192
  strokeWidth: 1.5,
7193
7193
  className: "select-pack__circle",
7194
7194
  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 }] });
7195
+ 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
7196
  },
7197
7197
  onMouseLeave: () => {
7198
7198
  i(null), d.hide();
7199
7199
  }
7200
7200
  }
7201
7201
  ),
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 })
7202
+ 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
7203
  ] }, N.i);
7204
7204
  }) }) }),
7205
7205
  /* @__PURE__ */ e(K, { tip: d.tip })
@@ -7214,25 +7214,25 @@ function Vo({ nodes: t, links: n, height: l = 300, format: c = Y, className: s,
7214
7214
  x: v / 2 + Math.cos(M / x * 2 * Math.PI) * v * 0.3,
7215
7215
  y: y / 2 + Math.sin(M / x * 2 * Math.PI) * y * 0.3
7216
7216
  })), p = new Map(t.map((k, M) => [k.id, M])), b = Math.sqrt(v * y / x) * 0.55;
7217
- let S = v * 0.12;
7217
+ let w = v * 0.12;
7218
7218
  for (let k = 0; k < 320; k++) {
7219
7219
  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;
7220
+ for (let S = 0; S < x; S++)
7221
+ for (let N = S + 1; N < x; N++) {
7222
+ const C = _[S].x - _[N].x, L = _[S].y - _[N].y, E = Math.hypot(C, L) || 0.01, A = b * b / E;
7223
+ 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
7224
  }
7225
- for (const w of n) {
7226
- const N = p.get(w.source), C = p.get(w.target);
7225
+ for (const S of n) {
7226
+ const N = p.get(S.source), C = p.get(S.target);
7227
7227
  if (N == null || C == null) continue;
7228
7228
  const L = _[N].x - _[C].x, E = _[N].y - _[C].y, A = Math.hypot(L, E) || 0.01, F = A * A / b;
7229
7229
  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
7230
  }
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));
7231
+ for (let S = 0; S < x; S++) {
7232
+ const N = M[S].x, C = M[S].y, L = Math.hypot(N, C) || 0.01, E = Math.min(L, w);
7233
+ _[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
7234
  }
7235
- S *= 0.97;
7235
+ w *= 0.97;
7236
7236
  }
7237
7237
  return _.forEach((k) => $.set(k.id, { x: k.x, y: k.y })), $;
7238
7238
  }, [t, n, d, l]), f = /* @__PURE__ */ new Map();
@@ -7295,13 +7295,13 @@ function Bs({ children: t }) {
7295
7295
  return /* @__PURE__ */ e("div", { className: "select-combobox__list", ref: n, children: t });
7296
7296
  }
7297
7297
  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();
7298
+ const _ = te(), [p, b] = D(!1), [w, k] = D(""), M = s.find((E) => E.value === l), S = xe(() => {
7299
+ const E = w.trim().toLowerCase();
7300
7300
  return !v || !E ? s : s.filter((A) => {
7301
7301
  var F;
7302
7302
  return A.label.toLowerCase().includes(E) || ((F = A.secondary) == null ? void 0 : F.toLowerCase().includes(E));
7303
7303
  });
7304
- }, [s, S, v]), N = () => {
7304
+ }, [s, w, v]), N = () => {
7305
7305
  b(!1), k("");
7306
7306
  }, C = (E) => {
7307
7307
  c(E), N();
@@ -7343,13 +7343,13 @@ const Zo = R(function({ label: n, value: l, onChange: c, options: s, placeholder
7343
7343
  {
7344
7344
  className: "select-combobox__searchinput",
7345
7345
  type: "text",
7346
- value: S,
7346
+ value: w,
7347
7347
  onChange: (E) => k(E.target.value),
7348
7348
  placeholder: r,
7349
7349
  autoFocus: !0
7350
7350
  }
7351
7351
  ) }),
7352
- /* @__PURE__ */ e(Bs, { children: w.length === 0 ? /* @__PURE__ */ e("div", { className: "select-combobox__empty", children: h }) : w.map((E) => {
7352
+ /* @__PURE__ */ e(Bs, { children: S.length === 0 ? /* @__PURE__ */ e("div", { className: "select-combobox__empty", children: h }) : S.map((E) => {
7353
7353
  const A = E.value === l;
7354
7354
  return /* @__PURE__ */ m(
7355
7355
  "button",
@@ -7696,12 +7696,12 @@ function Os(t) {
7696
7696
  return n = n % 12 || 12, `${n} : ${String(t.getMinutes()).padStart(2, "0")} ${l}`;
7697
7697
  }
7698
7698
  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 }));
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, 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) => {
7700
+ 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
7701
  }, L = (A) => {
7702
7702
  if (A.disabled || !A.range) return;
7703
7703
  const F = A.range();
7704
- $(F), S(A.id), F.from && p(xt(F.from));
7704
+ $(F), w(A.id), F.from && p(xt(F.from));
7705
7705
  }, E = a ? { "--select-dp-accent": `var(${a})` } : void 0;
7706
7706
  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
7707
  /* @__PURE__ */ e("div", { className: "select-datepicker__presets", role: "listbox", "aria-label": "Intervalos", children: l.map((A) => {
@@ -7759,7 +7759,7 @@ const Hs = R(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, acce
7759
7759
  /* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
7760
7760
  g.weekdays.map((A, F) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: A }, F)),
7761
7761
  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" : "");
7762
+ 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
7763
  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
7764
  })
7765
7765
  ] }),
@@ -7856,11 +7856,11 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7856
7856
  ) : /* @__PURE__ */ e("span", { children: $ }, y);
7857
7857
  }) });
7858
7858
  }), 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) => {
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, 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
7860
  const B = d ? F.replace(/[^\d.,-]/g, "").replace(",", ".") : F.replace(/[^\d-]/g, "");
7861
7861
  if (d && C(B), B === "" || B === "-" || B === ".") return c(null);
7862
- const T = Number(B);
7863
- Number.isFinite(T) && c(_(T));
7862
+ const W = Number(B);
7863
+ Number.isFinite(W) && c(_(W));
7864
7864
  }, A = (F) => {
7865
7865
  const B = _(p(b + F));
7866
7866
  d && C(String(B)), c(B);
@@ -7875,7 +7875,7 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7875
7875
  size: g,
7876
7876
  icon: /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "select-numfield__minus", children: "−" }),
7877
7877
  label: "Diminuir",
7878
- disabled: o || S,
7878
+ disabled: o || w,
7879
7879
  onClick: () => A(-r)
7880
7880
  }
7881
7881
  ),
@@ -7892,10 +7892,10 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7892
7892
  value: L,
7893
7893
  onChange: (F) => E(F.target.value),
7894
7894
  onFocus: () => {
7895
- w(!0), C(l == null ? "" : String(l));
7895
+ S(!0), C(l == null ? "" : String(l));
7896
7896
  },
7897
7897
  onBlur: () => {
7898
- w(!1), u == null || u();
7898
+ S(!1), u == null || u();
7899
7899
  },
7900
7900
  "aria-invalid": h ? !0 : void 0
7901
7901
  }
@@ -7929,11 +7929,11 @@ function ar({
7929
7929
  emptyState: h,
7930
7930
  helpText: u
7931
7931
  }) {
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) => {
7932
+ 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
7933
  const b = _ + p;
7934
7934
  if (b < 0 || b >= t.length) return;
7935
- const S = t.slice(), k = S[_];
7936
- S[_] = S[b], S[b] = k, n(S);
7935
+ const w = t.slice(), k = w[_];
7936
+ w[_] = w[b], w[b] = k, n(w);
7937
7937
  }, $ = (_, p) => ({
7938
7938
  index: p,
7939
7939
  isFirst: p === 0,