chartformers 1.0.44 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import aa, { useRef as Wt, useEffect as _t, useState as ot } from "react";
1
+ import aa, { useRef as Pt, useEffect as vt, useState as ct } from "react";
2
2
  import { createPortal as kn } from "react-dom";
3
- var Be = { exports: {} }, Se = {};
3
+ var Xe = { exports: {} }, Se = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -45,239 +45,239 @@ var Me = {};
45
45
  var mr;
46
46
  function oa() {
47
47
  return mr || (mr = 1, process.env.NODE_ENV !== "production" && (function() {
48
- function t(y) {
49
- if (y == null) return null;
50
- if (typeof y == "function")
51
- return y.$$typeof === j ? null : y.displayName || y.name || null;
52
- if (typeof y == "string") return y;
53
- switch (y) {
48
+ function t(m) {
49
+ if (m == null) return null;
50
+ if (typeof m == "function")
51
+ return m.$$typeof === C ? null : m.displayName || m.name || null;
52
+ if (typeof m == "string") return m;
53
+ switch (m) {
54
54
  case K:
55
55
  return "Fragment";
56
- case V:
56
+ case q:
57
57
  return "Profiler";
58
- case R:
58
+ case T:
59
59
  return "StrictMode";
60
- case U:
60
+ case V:
61
61
  return "Suspense";
62
62
  case J:
63
63
  return "SuspenseList";
64
- case et:
64
+ case B:
65
65
  return "Activity";
66
66
  }
67
- if (typeof y == "object")
68
- switch (typeof y.tag == "number" && console.error(
67
+ if (typeof m == "object")
68
+ switch (typeof m.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
- ), y.$$typeof) {
71
- case L:
70
+ ), m.$$typeof) {
71
+ case j:
72
72
  return "Portal";
73
+ case A:
74
+ return m.displayName || "Context";
73
75
  case k:
74
- return y.displayName || "Context";
75
- case S:
76
- return (y._context.displayName || "Context") + ".Consumer";
77
- case q:
78
- var I = y.render;
79
- return y = y.displayName, y || (y = I.displayName || I.name || "", y = y !== "" ? "ForwardRef(" + y + ")" : "ForwardRef"), y;
80
- case F:
81
- return I = y.displayName || null, I !== null ? I : t(y.type) || "Memo";
76
+ return (m._context.displayName || "Context") + ".Consumer";
77
+ case O:
78
+ var D = m.render;
79
+ return m = m.displayName, m || (m = D.displayName || D.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
80
+ case Z:
81
+ return D = m.displayName || null, D !== null ? D : t(m.type) || "Memo";
82
82
  case W:
83
- I = y._payload, y = y._init;
83
+ D = m._payload, m = m._init;
84
84
  try {
85
- return t(y(I));
85
+ return t(m(D));
86
86
  } catch {
87
87
  }
88
88
  }
89
89
  return null;
90
90
  }
91
- function e(y) {
92
- return "" + y;
91
+ function e(m) {
92
+ return "" + m;
93
93
  }
94
- function n(y) {
94
+ function n(m) {
95
95
  try {
96
- e(y);
97
- var I = !1;
96
+ e(m);
97
+ var D = !1;
98
98
  } catch {
99
- I = !0;
99
+ D = !0;
100
100
  }
101
- if (I) {
102
- I = console;
103
- var P = I.error, Y = typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object";
101
+ if (D) {
102
+ D = console;
103
+ var P = D.error, F = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
104
104
  return P.call(
105
- I,
105
+ D,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- Y
108
- ), e(y);
107
+ F
108
+ ), e(m);
109
109
  }
110
110
  }
111
- function r(y) {
112
- if (y === K) return "<>";
113
- if (typeof y == "object" && y !== null && y.$$typeof === W)
111
+ function r(m) {
112
+ if (m === K) return "<>";
113
+ if (typeof m == "object" && m !== null && m.$$typeof === W)
114
114
  return "<...>";
115
115
  try {
116
- var I = t(y);
117
- return I ? "<" + I + ">" : "<...>";
116
+ var D = t(m);
117
+ return D ? "<" + D + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
122
  function i() {
123
- var y = E.A;
124
- return y === null ? null : y.getOwner();
123
+ var m = L.A;
124
+ return m === null ? null : m.getOwner();
125
125
  }
126
126
  function a() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
- function s(y) {
130
- if (v.call(y, "key")) {
131
- var I = Object.getOwnPropertyDescriptor(y, "key").get;
132
- if (I && I.isReactWarning) return !1;
129
+ function s(m) {
130
+ if (w.call(m, "key")) {
131
+ var D = Object.getOwnPropertyDescriptor(m, "key").get;
132
+ if (D && D.isReactWarning) return !1;
133
133
  }
134
- return y.key !== void 0;
134
+ return m.key !== void 0;
135
135
  }
136
- function o(y, I) {
136
+ function o(m, D) {
137
137
  function P() {
138
- C || (C = !0, console.error(
138
+ R || (R = !0, console.error(
139
139
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
- I
140
+ D
141
141
  ));
142
142
  }
143
- P.isReactWarning = !0, Object.defineProperty(y, "key", {
143
+ P.isReactWarning = !0, Object.defineProperty(m, "key", {
144
144
  get: P,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
148
  function c() {
149
- var y = t(this.type);
150
- return M[y] || (M[y] = !0, console.error(
149
+ var m = t(this.type);
150
+ return M[m] || (M[m] = !0, console.error(
151
151
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
- )), y = this.props.ref, y !== void 0 ? y : null;
152
+ )), m = this.props.ref, m !== void 0 ? m : null;
153
153
  }
154
- function l(y, I, P, Y, Z, m) {
155
- var g = P.ref;
156
- return y = {
154
+ function l(m, D, P, F, Q, tt) {
155
+ var z = P.ref;
156
+ return m = {
157
157
  $$typeof: _,
158
- type: y,
159
- key: I,
158
+ type: m,
159
+ key: D,
160
160
  props: P,
161
- _owner: Y
162
- }, (g !== void 0 ? g : null) !== null ? Object.defineProperty(y, "ref", {
161
+ _owner: F
162
+ }, (z !== void 0 ? z : null) !== null ? Object.defineProperty(m, "ref", {
163
163
  enumerable: !1,
164
164
  get: c
165
- }) : Object.defineProperty(y, "ref", { enumerable: !1, value: null }), y._store = {}, Object.defineProperty(y._store, "validated", {
165
+ }) : Object.defineProperty(m, "ref", { enumerable: !1, value: null }), m._store = {}, Object.defineProperty(m._store, "validated", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
168
168
  writable: !0,
169
169
  value: 0
170
- }), Object.defineProperty(y, "_debugInfo", {
170
+ }), Object.defineProperty(m, "_debugInfo", {
171
171
  configurable: !1,
172
172
  enumerable: !1,
173
173
  writable: !0,
174
174
  value: null
175
- }), Object.defineProperty(y, "_debugStack", {
175
+ }), Object.defineProperty(m, "_debugStack", {
176
176
  configurable: !1,
177
177
  enumerable: !1,
178
178
  writable: !0,
179
- value: Z
180
- }), Object.defineProperty(y, "_debugTask", {
179
+ value: Q
180
+ }), Object.defineProperty(m, "_debugTask", {
181
181
  configurable: !1,
182
182
  enumerable: !1,
183
183
  writable: !0,
184
- value: m
185
- }), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
184
+ value: tt
185
+ }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
186
186
  }
187
- function u(y, I, P, Y, Z, m) {
188
- var g = I.children;
189
- if (g !== void 0)
190
- if (Y)
191
- if (z(g)) {
192
- for (Y = 0; Y < g.length; Y++)
193
- h(g[Y]);
194
- Object.freeze && Object.freeze(g);
187
+ function u(m, D, P, F, Q, tt) {
188
+ var z = D.children;
189
+ if (z !== void 0)
190
+ if (F)
191
+ if (E(z)) {
192
+ for (F = 0; F < z.length; F++)
193
+ h(z[F]);
194
+ Object.freeze && Object.freeze(z);
195
195
  } else
196
196
  console.error(
197
197
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
198
  );
199
- else h(g);
200
- if (v.call(I, "key")) {
201
- g = t(y);
202
- var D = Object.keys(I).filter(function(N) {
203
- return N !== "key";
199
+ else h(z);
200
+ if (w.call(D, "key")) {
201
+ z = t(m);
202
+ var g = Object.keys(D).filter(function(b) {
203
+ return b !== "key";
204
204
  });
205
- Y = 0 < D.length ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}", T[g + Y] || (D = 0 < D.length ? "{" + D.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ F = 0 < g.length ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}", S[z + F] || (g = 0 < g.length ? "{" + g.join(": ..., ") + ": ...}" : "{}", console.error(
206
206
  `A props object containing a "key" prop is being spread into JSX:
207
207
  let props = %s;
208
208
  <%s {...props} />
209
209
  React keys must be passed directly to JSX without using spread:
210
210
  let props = %s;
211
211
  <%s key={someKey} {...props} />`,
212
- Y,
212
+ F,
213
+ z,
213
214
  g,
214
- D,
215
- g
216
- ), T[g + Y] = !0);
215
+ z
216
+ ), S[z + F] = !0);
217
217
  }
218
- if (g = null, P !== void 0 && (n(P), g = "" + P), s(I) && (n(I.key), g = "" + I.key), "key" in I) {
218
+ if (z = null, P !== void 0 && (n(P), z = "" + P), s(D) && (n(D.key), z = "" + D.key), "key" in D) {
219
219
  P = {};
220
- for (var w in I)
221
- w !== "key" && (P[w] = I[w]);
222
- } else P = I;
223
- return g && o(
220
+ for (var y in D)
221
+ y !== "key" && (P[y] = D[y]);
222
+ } else P = D;
223
+ return z && o(
224
224
  P,
225
- typeof y == "function" ? y.displayName || y.name || "Unknown" : y
225
+ typeof m == "function" ? m.displayName || m.name || "Unknown" : m
226
226
  ), l(
227
- y,
228
- g,
227
+ m,
228
+ z,
229
229
  P,
230
230
  i(),
231
- Z,
232
- m
231
+ Q,
232
+ tt
233
233
  );
234
234
  }
235
- function h(y) {
236
- f(y) ? y._store && (y._store.validated = 1) : typeof y == "object" && y !== null && y.$$typeof === W && (y._payload.status === "fulfilled" ? f(y._payload.value) && y._payload.value._store && (y._payload.value._store.validated = 1) : y._store && (y._store.validated = 1));
235
+ function h(m) {
236
+ f(m) ? m._store && (m._store.validated = 1) : typeof m == "object" && m !== null && m.$$typeof === W && (m._payload.status === "fulfilled" ? f(m._payload.value) && m._payload.value._store && (m._payload.value._store.validated = 1) : m._store && (m._store.validated = 1));
237
237
  }
238
- function f(y) {
239
- return typeof y == "object" && y !== null && y.$$typeof === _;
238
+ function f(m) {
239
+ return typeof m == "object" && m !== null && m.$$typeof === _;
240
240
  }
241
- var d = aa, _ = Symbol.for("react.transitional.element"), L = Symbol.for("react.portal"), K = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), V = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), k = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), et = Symbol.for("react.activity"), j = Symbol.for("react.client.reference"), E = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, v = Object.prototype.hasOwnProperty, z = Array.isArray, p = console.createTask ? console.createTask : function() {
241
+ var p = aa, _ = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), K = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), A = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), L = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, w = Object.prototype.hasOwnProperty, E = Array.isArray, d = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- d = {
245
- react_stack_bottom_frame: function(y) {
246
- return y();
244
+ p = {
245
+ react_stack_bottom_frame: function(m) {
246
+ return m();
247
247
  }
248
248
  };
249
- var C, M = {}, A = d.react_stack_bottom_frame.bind(
250
- d,
249
+ var R, M = {}, N = p.react_stack_bottom_frame.bind(
250
+ p,
251
251
  a
252
- )(), x = p(r(a)), T = {};
253
- Me.Fragment = K, Me.jsx = function(y, I, P) {
254
- var Y = 1e4 > E.recentlyCreatedOwnerStacks++;
252
+ )(), x = d(r(a)), S = {};
253
+ Me.Fragment = K, Me.jsx = function(m, D, P) {
254
+ var F = 1e4 > L.recentlyCreatedOwnerStacks++;
255
255
  return u(
256
- y,
257
- I,
256
+ m,
257
+ D,
258
258
  P,
259
259
  !1,
260
- Y ? Error("react-stack-top-frame") : A,
261
- Y ? p(r(y)) : x
260
+ F ? Error("react-stack-top-frame") : N,
261
+ F ? d(r(m)) : x
262
262
  );
263
- }, Me.jsxs = function(y, I, P) {
264
- var Y = 1e4 > E.recentlyCreatedOwnerStacks++;
263
+ }, Me.jsxs = function(m, D, P) {
264
+ var F = 1e4 > L.recentlyCreatedOwnerStacks++;
265
265
  return u(
266
- y,
267
- I,
266
+ m,
267
+ D,
268
268
  P,
269
269
  !0,
270
- Y ? Error("react-stack-top-frame") : A,
271
- Y ? p(r(y)) : x
270
+ F ? Error("react-stack-top-frame") : N,
271
+ F ? d(r(m)) : x
272
272
  );
273
273
  };
274
274
  })()), Me;
275
275
  }
276
276
  var xr;
277
277
  function la() {
278
- return xr || (xr = 1, process.env.NODE_ENV === "production" ? Be.exports = sa() : Be.exports = oa()), Be.exports;
278
+ return xr || (xr = 1, process.env.NODE_ENV === "production" ? Xe.exports = sa() : Xe.exports = oa()), Xe.exports;
279
279
  }
280
- var O = la();
280
+ var H = la();
281
281
  function je(t, e) {
282
282
  return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
283
283
  }
@@ -430,39 +430,39 @@ function Ra() {
430
430
  }
431
431
  function fi(t, e) {
432
432
  var n = [], r = null, i = null, a = 6, s = 6, o = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, l = t === En || t === Re ? -1 : 1, u = t === Re || t === Cn ? "x" : "y", h = t === En || t === Yn ? Na : Sa;
433
- function f(d) {
434
- var _ = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), L = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : Aa), K = Math.max(a, 0) + o, R = e.range(), V = +R[0] + c, S = +R[R.length - 1] + c, k = (e.bandwidth ? Ta : Ma)(e.copy(), c), q = d.selection ? d.selection() : d, U = q.selectAll(".domain").data([null]), J = q.selectAll(".tick").data(_, e).order(), F = J.exit(), W = J.enter().append("g").attr("class", "tick"), et = J.select("line"), j = J.select("text");
435
- U = U.merge(U.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), J = J.merge(W), et = et.merge(W.append("line").attr("stroke", "currentColor").attr(u + "2", l * a)), j = j.merge(W.append("text").attr("fill", "currentColor").attr(u, l * K).attr("dy", t === En ? "0em" : t === Yn ? "0.71em" : "0.32em")), d !== q && (U = U.transition(d), J = J.transition(d), et = et.transition(d), j = j.transition(d), F = F.transition(d).attr("opacity", br).attr("transform", function(E) {
436
- return isFinite(E = k(E)) ? h(E + c) : this.getAttribute("transform");
437
- }), W.attr("opacity", br).attr("transform", function(E) {
438
- var v = this.parentNode.__axis;
439
- return h((v && isFinite(v = v(E)) ? v : k(E)) + c);
440
- })), F.remove(), U.attr("d", t === Re || t === Cn ? s ? "M" + l * s + "," + V + "H" + c + "V" + S + "H" + l * s : "M" + c + "," + V + "V" + S : s ? "M" + V + "," + l * s + "V" + c + "H" + S + "V" + l * s : "M" + V + "," + c + "H" + S), J.attr("opacity", 1).attr("transform", function(E) {
441
- return h(k(E) + c);
442
- }), et.attr(u + "2", l * a), j.attr(u, l * K).text(L), q.filter(Ra).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === Cn ? "start" : t === Re ? "end" : "middle"), q.each(function() {
443
- this.__axis = k;
433
+ function f(p) {
434
+ var _ = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), j = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : Aa), K = Math.max(a, 0) + o, T = e.range(), q = +T[0] + c, k = +T[T.length - 1] + c, A = (e.bandwidth ? Ta : Ma)(e.copy(), c), O = p.selection ? p.selection() : p, V = O.selectAll(".domain").data([null]), J = O.selectAll(".tick").data(_, e).order(), Z = J.exit(), W = J.enter().append("g").attr("class", "tick"), B = J.select("line"), C = J.select("text");
435
+ V = V.merge(V.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), J = J.merge(W), B = B.merge(W.append("line").attr("stroke", "currentColor").attr(u + "2", l * a)), C = C.merge(W.append("text").attr("fill", "currentColor").attr(u, l * K).attr("dy", t === En ? "0em" : t === Yn ? "0.71em" : "0.32em")), p !== O && (V = V.transition(p), J = J.transition(p), B = B.transition(p), C = C.transition(p), Z = Z.transition(p).attr("opacity", br).attr("transform", function(L) {
436
+ return isFinite(L = A(L)) ? h(L + c) : this.getAttribute("transform");
437
+ }), W.attr("opacity", br).attr("transform", function(L) {
438
+ var w = this.parentNode.__axis;
439
+ return h((w && isFinite(w = w(L)) ? w : A(L)) + c);
440
+ })), Z.remove(), V.attr("d", t === Re || t === Cn ? s ? "M" + l * s + "," + q + "H" + c + "V" + k + "H" + l * s : "M" + c + "," + q + "V" + k : s ? "M" + q + "," + l * s + "V" + c + "H" + k + "V" + l * s : "M" + q + "," + c + "H" + k), J.attr("opacity", 1).attr("transform", function(L) {
441
+ return h(A(L) + c);
442
+ }), B.attr(u + "2", l * a), C.attr(u, l * K).text(j), O.filter(Ra).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === Cn ? "start" : t === Re ? "end" : "middle"), O.each(function() {
443
+ this.__axis = A;
444
444
  });
445
445
  }
446
- return f.scale = function(d) {
447
- return arguments.length ? (e = d, f) : e;
446
+ return f.scale = function(p) {
447
+ return arguments.length ? (e = p, f) : e;
448
448
  }, f.ticks = function() {
449
449
  return n = Array.from(arguments), f;
450
- }, f.tickArguments = function(d) {
451
- return arguments.length ? (n = d == null ? [] : Array.from(d), f) : n.slice();
452
- }, f.tickValues = function(d) {
453
- return arguments.length ? (r = d == null ? null : Array.from(d), f) : r && r.slice();
454
- }, f.tickFormat = function(d) {
455
- return arguments.length ? (i = d, f) : i;
456
- }, f.tickSize = function(d) {
457
- return arguments.length ? (a = s = +d, f) : a;
458
- }, f.tickSizeInner = function(d) {
459
- return arguments.length ? (a = +d, f) : a;
460
- }, f.tickSizeOuter = function(d) {
461
- return arguments.length ? (s = +d, f) : s;
462
- }, f.tickPadding = function(d) {
463
- return arguments.length ? (o = +d, f) : o;
464
- }, f.offset = function(d) {
465
- return arguments.length ? (c = +d, f) : c;
450
+ }, f.tickArguments = function(p) {
451
+ return arguments.length ? (n = p == null ? [] : Array.from(p), f) : n.slice();
452
+ }, f.tickValues = function(p) {
453
+ return arguments.length ? (r = p == null ? null : Array.from(p), f) : r && r.slice();
454
+ }, f.tickFormat = function(p) {
455
+ return arguments.length ? (i = p, f) : i;
456
+ }, f.tickSize = function(p) {
457
+ return arguments.length ? (a = s = +p, f) : a;
458
+ }, f.tickSizeInner = function(p) {
459
+ return arguments.length ? (a = +p, f) : a;
460
+ }, f.tickSizeOuter = function(p) {
461
+ return arguments.length ? (s = +p, f) : s;
462
+ }, f.tickPadding = function(p) {
463
+ return arguments.length ? (o = +p, f) : o;
464
+ }, f.offset = function(p) {
465
+ return arguments.length ? (c = +p, f) : c;
466
466
  }, f;
467
467
  }
468
468
  function Gt(t) {
@@ -532,10 +532,10 @@ function wr(t, e, n) {
532
532
  }
533
533
  return n != null && t.push({ name: e, value: n }), t;
534
534
  }
535
- var Xn = "http://www.w3.org/1999/xhtml";
535
+ var Bn = "http://www.w3.org/1999/xhtml";
536
536
  const kr = {
537
537
  svg: "http://www.w3.org/2000/svg",
538
- xhtml: Xn,
538
+ xhtml: Bn,
539
539
  xlink: "http://www.w3.org/1999/xlink",
540
540
  xml: "http://www.w3.org/XML/1998/namespace",
541
541
  xmlns: "http://www.w3.org/2000/xmlns/"
@@ -547,7 +547,7 @@ function $n(t) {
547
547
  function Da(t) {
548
548
  return function() {
549
549
  var e = this.ownerDocument, n = this.namespaceURI;
550
- return n === Xn && e.documentElement.namespaceURI === Xn ? e.createElement(t) : e.createElementNS(n, t);
550
+ return n === Bn && e.documentElement.namespaceURI === Bn ? e.createElement(t) : e.createElementNS(n, t);
551
551
  };
552
552
  }
553
553
  function ja(t) {
@@ -618,17 +618,17 @@ function Wa() {
618
618
  function Ya(t) {
619
619
  return this.select(t == null ? Wa : Fa(typeof t == "function" ? t : yi(t)));
620
620
  }
621
- var Xa = Array.prototype.filter;
622
- function Ba() {
621
+ var Ba = Array.prototype.filter;
622
+ function Xa() {
623
623
  return Array.from(this.children);
624
624
  }
625
625
  function Ka(t) {
626
626
  return function() {
627
- return Xa.call(this.children, t);
627
+ return Ba.call(this.children, t);
628
628
  };
629
629
  }
630
630
  function Ua(t) {
631
- return this.selectAll(t == null ? Ba : Ka(typeof t == "function" ? t : yi(t)));
631
+ return this.selectAll(t == null ? Xa : Ka(typeof t == "function" ? t : yi(t)));
632
632
  }
633
633
  function Ja(t) {
634
634
  typeof t != "function" && (t = gi(t));
@@ -673,11 +673,11 @@ function Qa(t, e, n, r, i, a) {
673
673
  (o = e[s]) && (i[s] = o);
674
674
  }
675
675
  function ts(t, e, n, r, i, a, s) {
676
- var o, c, l = /* @__PURE__ */ new Map(), u = e.length, h = a.length, f = new Array(u), d;
676
+ var o, c, l = /* @__PURE__ */ new Map(), u = e.length, h = a.length, f = new Array(u), p;
677
677
  for (o = 0; o < u; ++o)
678
- (c = e[o]) && (f[o] = d = s.call(c, c.__data__, o, e) + "", l.has(d) ? i[o] = c : l.set(d, c));
678
+ (c = e[o]) && (f[o] = p = s.call(c, c.__data__, o, e) + "", l.has(p) ? i[o] = c : l.set(p, c));
679
679
  for (o = 0; o < h; ++o)
680
- d = s.call(t, a[o], o, a) + "", (c = l.get(d)) ? (r[o] = c, c.__data__ = a[o], l.delete(d)) : n[o] = new cn(t, a[o]);
680
+ p = s.call(t, a[o], o, a) + "", (c = l.get(p)) ? (r[o] = c, c.__data__ = a[o], l.delete(p)) : n[o] = new cn(t, a[o]);
681
681
  for (o = 0; o < u; ++o)
682
682
  (c = e[o]) && l.get(f[o]) === c && (i[o] = c);
683
683
  }
@@ -689,12 +689,12 @@ function ns(t, e) {
689
689
  var n = e ? ts : Qa, r = this._parents, i = this._groups;
690
690
  typeof t != "function" && (t = Za(t));
691
691
  for (var a = i.length, s = new Array(a), o = new Array(a), c = new Array(a), l = 0; l < a; ++l) {
692
- var u = r[l], h = i[l], f = h.length, d = rs(t.call(u, u && u.__data__, l, r)), _ = d.length, L = o[l] = new Array(_), K = s[l] = new Array(_), R = c[l] = new Array(f);
693
- n(u, h, L, K, R, d, e);
694
- for (var V = 0, S = 0, k, q; V < _; ++V)
695
- if (k = L[V]) {
696
- for (V >= S && (S = V + 1); !(q = K[S]) && ++S < _; ) ;
697
- k._next = q || null;
692
+ var u = r[l], h = i[l], f = h.length, p = rs(t.call(u, u && u.__data__, l, r)), _ = p.length, j = o[l] = new Array(_), K = s[l] = new Array(_), T = c[l] = new Array(f);
693
+ n(u, h, j, K, T, p, e);
694
+ for (var q = 0, k = 0, A, O; q < _; ++q)
695
+ if (A = j[q]) {
696
+ for (q >= k && (k = q + 1); !(O = K[k]) && ++k < _; ) ;
697
+ A._next = O || null;
698
698
  }
699
699
  }
700
700
  return s = new At(s, r), s._enter = o, s._exit = c, s;
@@ -711,8 +711,8 @@ function as(t, e, n) {
711
711
  }
712
712
  function ss(t) {
713
713
  for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, a = r.length, s = Math.min(i, a), o = new Array(i), c = 0; c < s; ++c)
714
- for (var l = n[c], u = r[c], h = l.length, f = o[c] = new Array(h), d, _ = 0; _ < h; ++_)
715
- (d = l[_] || u[_]) && (f[_] = d);
714
+ for (var l = n[c], u = r[c], h = l.length, f = o[c] = new Array(h), p, _ = 0; _ < h; ++_)
715
+ (p = l[_] || u[_]) && (f[_] = p);
716
716
  for (; c < i; ++c)
717
717
  o[c] = n[c];
718
718
  return new At(o, this._parents);
@@ -945,10 +945,10 @@ function Ws() {
945
945
  function Ys() {
946
946
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
947
947
  }
948
- function Xs() {
948
+ function Bs() {
949
949
  return this.each(Ys);
950
950
  }
951
- function Bs(t) {
951
+ function Xs(t) {
952
952
  var e = typeof t == "function" ? t : di(t);
953
953
  return this.select(function() {
954
954
  return this.appendChild(e.apply(this, arguments));
@@ -1093,8 +1093,8 @@ At.prototype = qe.prototype = {
1093
1093
  text: zs,
1094
1094
  html: Vs,
1095
1095
  raise: Ws,
1096
- lower: Xs,
1097
- append: Bs,
1096
+ lower: Bs,
1097
+ append: Xs,
1098
1098
  insert: Us,
1099
1099
  remove: Gs,
1100
1100
  clone: to,
@@ -1116,7 +1116,7 @@ function An(t, e) {
1116
1116
  }
1117
1117
  function ue() {
1118
1118
  }
1119
- var Ie = 0.7, un = 1 / Ie, ve = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Pt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ho = /^#([0-9a-f]{3,8})$/, po = new RegExp(`^rgb\\(${ve},${ve},${ve}\\)$`), go = new RegExp(`^rgb\\(${Pt},${Pt},${Pt}\\)$`), yo = new RegExp(`^rgba\\(${ve},${ve},${ve},${ze}\\)$`), mo = new RegExp(`^rgba\\(${Pt},${Pt},${Pt},${ze}\\)$`), xo = new RegExp(`^hsl\\(${ze},${Pt},${Pt}\\)$`), vo = new RegExp(`^hsla\\(${ze},${Pt},${Pt},${ze}\\)$`), $r = {
1119
+ var Ie = 0.7, un = 1 / Ie, ve = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", It = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ho = /^#([0-9a-f]{3,8})$/, po = new RegExp(`^rgb\\(${ve},${ve},${ve}\\)$`), go = new RegExp(`^rgb\\(${It},${It},${It}\\)$`), yo = new RegExp(`^rgba\\(${ve},${ve},${ve},${ze}\\)$`), mo = new RegExp(`^rgba\\(${It},${It},${It},${ze}\\)$`), xo = new RegExp(`^hsl\\(${ze},${It},${It}\\)$`), vo = new RegExp(`^hsla\\(${ze},${It},${It},${ze}\\)$`), $r = {
1120
1120
  aliceblue: 15792383,
1121
1121
  antiquewhite: 16444375,
1122
1122
  aqua: 65535,
@@ -1306,13 +1306,13 @@ function Ke(t, e, n, r) {
1306
1306
  function Ai(t) {
1307
1307
  return t instanceof ue || (t = se(t)), t ? (t = t.rgb(), new mt(t.r, t.g, t.b, t.opacity)) : new mt();
1308
1308
  }
1309
- function Bn(t, e, n, r) {
1309
+ function Xn(t, e, n, r) {
1310
1310
  return arguments.length === 1 ? Ai(t) : new mt(t, e, n, r ?? 1);
1311
1311
  }
1312
1312
  function mt(t, e, n, r) {
1313
1313
  this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
1314
1314
  }
1315
- Ve(mt, Bn, An(ue, {
1315
+ Ve(mt, Xn, An(ue, {
1316
1316
  brighter(t) {
1317
1317
  return t = t == null ? un : Math.pow(un, t), new mt(this.r * t, this.g * t, this.b * t, this.opacity);
1318
1318
  },
@@ -1409,24 +1409,24 @@ function Ln(t, e, n) {
1409
1409
  }
1410
1410
  const $o = Math.PI / 180, Ao = 180 / Math.PI, hn = 18, Si = 0.96422, Mi = 1, Ti = 0.82521, Ri = 4 / 29, _e = 6 / 29, Ei = 3 * _e * _e, No = _e * _e * _e;
1411
1411
  function Ci(t) {
1412
- if (t instanceof It) return new It(t.l, t.a, t.b, t.opacity);
1413
- if (t instanceof Ft) return Li(t);
1412
+ if (t instanceof zt) return new zt(t.l, t.a, t.b, t.opacity);
1413
+ if (t instanceof Wt) return Li(t);
1414
1414
  t instanceof mt || (t = Ai(t));
1415
1415
  var e = In(t.r), n = In(t.g), r = In(t.b), i = Dn((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / Mi), a, s;
1416
- return e === n && n === r ? a = s = i : (a = Dn((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / Si), s = Dn((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / Ti)), new It(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity);
1416
+ return e === n && n === r ? a = s = i : (a = Dn((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / Si), s = Dn((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / Ti)), new zt(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity);
1417
1417
  }
1418
1418
  function So(t, e, n, r) {
1419
- return arguments.length === 1 ? Ci(t) : new It(t, e, n, r ?? 1);
1419
+ return arguments.length === 1 ? Ci(t) : new zt(t, e, n, r ?? 1);
1420
1420
  }
1421
- function It(t, e, n, r) {
1421
+ function zt(t, e, n, r) {
1422
1422
  this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
1423
1423
  }
1424
- Ve(It, So, An(ue, {
1424
+ Ve(zt, So, An(ue, {
1425
1425
  brighter(t) {
1426
- return new It(this.l + hn * (t ?? 1), this.a, this.b, this.opacity);
1426
+ return new zt(this.l + hn * (t ?? 1), this.a, this.b, this.opacity);
1427
1427
  },
1428
1428
  darker(t) {
1429
- return new It(this.l - hn * (t ?? 1), this.a, this.b, this.opacity);
1429
+ return new zt(this.l - hn * (t ?? 1), this.a, this.b, this.opacity);
1430
1430
  },
1431
1431
  rgb() {
1432
1432
  var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
@@ -1451,28 +1451,28 @@ function In(t) {
1451
1451
  return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
1452
1452
  }
1453
1453
  function Mo(t) {
1454
- if (t instanceof Ft) return new Ft(t.h, t.c, t.l, t.opacity);
1455
- if (t instanceof It || (t = Ci(t)), t.a === 0 && t.b === 0) return new Ft(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
1454
+ if (t instanceof Wt) return new Wt(t.h, t.c, t.l, t.opacity);
1455
+ if (t instanceof zt || (t = Ci(t)), t.a === 0 && t.b === 0) return new Wt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
1456
1456
  var e = Math.atan2(t.b, t.a) * Ao;
1457
- return new Ft(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
1457
+ return new Wt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
1458
1458
  }
1459
1459
  function Kn(t, e, n, r) {
1460
- return arguments.length === 1 ? Mo(t) : new Ft(t, e, n, r ?? 1);
1460
+ return arguments.length === 1 ? Mo(t) : new Wt(t, e, n, r ?? 1);
1461
1461
  }
1462
- function Ft(t, e, n, r) {
1462
+ function Wt(t, e, n, r) {
1463
1463
  this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
1464
1464
  }
1465
1465
  function Li(t) {
1466
- if (isNaN(t.h)) return new It(t.l, 0, 0, t.opacity);
1466
+ if (isNaN(t.h)) return new zt(t.l, 0, 0, t.opacity);
1467
1467
  var e = t.h * $o;
1468
- return new It(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
1468
+ return new zt(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
1469
1469
  }
1470
- Ve(Ft, Kn, An(ue, {
1470
+ Ve(Wt, Kn, An(ue, {
1471
1471
  brighter(t) {
1472
- return new Ft(this.h, this.c, this.l + hn * (t ?? 1), this.opacity);
1472
+ return new Wt(this.h, this.c, this.l + hn * (t ?? 1), this.opacity);
1473
1473
  },
1474
1474
  darker(t) {
1475
- return new Ft(this.h, this.c, this.l - hn * (t ?? 1), this.opacity);
1475
+ return new Wt(this.h, this.c, this.l - hn * (t ?? 1), this.opacity);
1476
1476
  },
1477
1477
  rgb() {
1478
1478
  return Li(this).rgb();
@@ -1505,7 +1505,7 @@ function Pe(t, e) {
1505
1505
  const dn = (function t(e) {
1506
1506
  var n = Eo(e);
1507
1507
  function r(i, a) {
1508
- var s = n((i = Bn(i)).r, (a = Bn(a)).r), o = n(i.g, a.g), c = n(i.b, a.b), l = Pe(i.opacity, a.opacity);
1508
+ var s = n((i = Xn(i)).r, (a = Xn(a)).r), o = n(i.g, a.g), c = n(i.b, a.b), l = Pe(i.opacity, a.opacity);
1509
1509
  return function(u) {
1510
1510
  return i.r = s(u), i.g = o(u), i.b = c(u), i.opacity = l(u), i + "";
1511
1511
  };
@@ -1613,11 +1613,11 @@ function Ii(t, e, n, r) {
1613
1613
  function i(l) {
1614
1614
  return l.length ? l.pop() + " " : "";
1615
1615
  }
1616
- function a(l, u, h, f, d, _) {
1616
+ function a(l, u, h, f, p, _) {
1617
1617
  if (l !== h || u !== f) {
1618
- var L = d.push("translate(", null, e, null, n);
1619
- _.push({ i: L - 4, x: Nt(l, h) }, { i: L - 2, x: Nt(u, f) });
1620
- } else (h || f) && d.push("translate(" + h + e + f + n);
1618
+ var j = p.push("translate(", null, e, null, n);
1619
+ _.push({ i: j - 4, x: Nt(l, h) }, { i: j - 2, x: Nt(u, f) });
1620
+ } else (h || f) && p.push("translate(" + h + e + f + n);
1621
1621
  }
1622
1622
  function s(l, u, h, f) {
1623
1623
  l !== u ? (l - u > 180 ? u += 360 : u - l > 180 && (l += 360), f.push({ i: h.push(i(h) + "rotate(", null, r) - 2, x: Nt(l, u) })) : u && h.push(i(h) + "rotate(" + u + r);
@@ -1625,16 +1625,16 @@ function Ii(t, e, n, r) {
1625
1625
  function o(l, u, h, f) {
1626
1626
  l !== u ? f.push({ i: h.push(i(h) + "skewX(", null, r) - 2, x: Nt(l, u) }) : u && h.push(i(h) + "skewX(" + u + r);
1627
1627
  }
1628
- function c(l, u, h, f, d, _) {
1628
+ function c(l, u, h, f, p, _) {
1629
1629
  if (l !== h || u !== f) {
1630
- var L = d.push(i(d) + "scale(", null, ",", null, ")");
1631
- _.push({ i: L - 4, x: Nt(l, h) }, { i: L - 2, x: Nt(u, f) });
1632
- } else (h !== 1 || f !== 1) && d.push(i(d) + "scale(" + h + "," + f + ")");
1630
+ var j = p.push(i(p) + "scale(", null, ",", null, ")");
1631
+ _.push({ i: j - 4, x: Nt(l, h) }, { i: j - 2, x: Nt(u, f) });
1632
+ } else (h !== 1 || f !== 1) && p.push(i(p) + "scale(" + h + "," + f + ")");
1633
1633
  }
1634
1634
  return function(l, u) {
1635
1635
  var h = [], f = [];
1636
- return l = t(l), u = t(u), a(l.translateX, l.translateY, u.translateX, u.translateY, h, f), s(l.rotate, u.rotate, h, f), o(l.skewX, u.skewX, h, f), c(l.scaleX, l.scaleY, u.scaleX, u.scaleY, h, f), l = u = null, function(d) {
1637
- for (var _ = -1, L = f.length, K; ++_ < L; ) h[(K = f[_]).i] = K.x(d);
1636
+ return l = t(l), u = t(u), a(l.translateX, l.translateY, u.translateX, u.translateY, h, f), s(l.rotate, u.rotate, h, f), o(l.skewX, u.skewX, h, f), c(l.scaleX, l.scaleY, u.scaleX, u.scaleY, h, f), l = u = null, function(p) {
1637
+ for (var _ = -1, j = f.length, K; ++_ < j; ) h[(K = f[_]).i] = K.x(p);
1638
1638
  return h.join("");
1639
1639
  };
1640
1640
  };
@@ -1653,9 +1653,9 @@ var we = 0, Ee = 0, Te = 0, zi = 1e3, pn, Ce, gn = 0, oe = 0, Sn = 0, He = typeo
1653
1653
  setTimeout(t, 17);
1654
1654
  };
1655
1655
  function ur() {
1656
- return oe || (Hi(Xo), oe = He.now() + Sn);
1656
+ return oe || (Hi(Bo), oe = He.now() + Sn);
1657
1657
  }
1658
- function Xo() {
1658
+ function Bo() {
1659
1659
  oe = 0;
1660
1660
  }
1661
1661
  function yn() {
@@ -1675,7 +1675,7 @@ function Oi(t, e, n) {
1675
1675
  var r = new yn();
1676
1676
  return r.restart(t, e, n), r;
1677
1677
  }
1678
- function Bo() {
1678
+ function Xo() {
1679
1679
  ur(), ++we;
1680
1680
  for (var t = pn, e; t; )
1681
1681
  (e = oe - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
@@ -1684,7 +1684,7 @@ function Bo() {
1684
1684
  function Lr() {
1685
1685
  oe = (gn = He.now()) + Sn, we = Ee = 0;
1686
1686
  try {
1687
- Bo();
1687
+ Xo();
1688
1688
  } finally {
1689
1689
  we = 0, Uo(), oe = 0;
1690
1690
  }
@@ -1737,7 +1737,7 @@ function fr(t, e) {
1737
1737
  if (n.state > qi) throw new Error("too late; already scheduled");
1738
1738
  return n;
1739
1739
  }
1740
- function zt(t, e) {
1740
+ function Ht(t, e) {
1741
1741
  var n = Ct(t, e);
1742
1742
  if (n.state > an) throw new Error("too late; already running");
1743
1743
  return n;
@@ -1754,18 +1754,18 @@ function Zo(t, e, n) {
1754
1754
  n.state = jr, n.timer.restart(s, n.delay, n.time), n.delay <= l && s(l - n.delay);
1755
1755
  }
1756
1756
  function s(l) {
1757
- var u, h, f, d;
1757
+ var u, h, f, p;
1758
1758
  if (n.state !== jr) return c();
1759
1759
  for (u in r)
1760
- if (d = r[u], d.name === n.name) {
1761
- if (d.state === an) return Dr(s);
1762
- d.state === Pr ? (d.state = sn, d.timer.stop(), d.on.call("interrupt", t, t.__data__, d.index, d.group), delete r[u]) : +u < e && (d.state = sn, d.timer.stop(), d.on.call("cancel", t, t.__data__, d.index, d.group), delete r[u]);
1760
+ if (p = r[u], p.name === n.name) {
1761
+ if (p.state === an) return Dr(s);
1762
+ p.state === Pr ? (p.state = sn, p.timer.stop(), p.on.call("interrupt", t, t.__data__, p.index, p.group), delete r[u]) : +u < e && (p.state = sn, p.timer.stop(), p.on.call("cancel", t, t.__data__, p.index, p.group), delete r[u]);
1763
1763
  }
1764
1764
  if (Dr(function() {
1765
1765
  n.state === an && (n.state = Pr, n.timer.restart(o, n.delay, n.time), o(l));
1766
1766
  }), n.state = Zn, n.on.call("start", t, t.__data__, n.index, n.group), n.state === Zn) {
1767
1767
  for (n.state = an, i = new Array(f = n.tween.length), u = 0, h = -1; u < f; ++u)
1768
- (d = n.tween[u].value.call(t, t.__data__, n.index, n.group)) && (i[++h] = d);
1768
+ (p = n.tween[u].value.call(t, t.__data__, n.index, n.group)) && (i[++h] = p);
1769
1769
  i.length = h + 1;
1770
1770
  }
1771
1771
  }
@@ -1802,7 +1802,7 @@ function tl(t) {
1802
1802
  function el(t, e) {
1803
1803
  var n, r;
1804
1804
  return function() {
1805
- var i = zt(this, t), a = i.tween;
1805
+ var i = Ht(this, t), a = i.tween;
1806
1806
  if (a !== n) {
1807
1807
  r = n = a;
1808
1808
  for (var s = 0, o = r.length; s < o; ++s)
@@ -1818,7 +1818,7 @@ function nl(t, e, n) {
1818
1818
  var r, i;
1819
1819
  if (typeof n != "function") throw new Error();
1820
1820
  return function() {
1821
- var a = zt(this, t), s = a.tween;
1821
+ var a = Ht(this, t), s = a.tween;
1822
1822
  if (s !== r) {
1823
1823
  i = (r = s).slice();
1824
1824
  for (var o = { name: e, value: n }, c = 0, l = i.length; c < l; ++c)
@@ -1844,7 +1844,7 @@ function rl(t, e) {
1844
1844
  function hr(t, e, n) {
1845
1845
  var r = t._id;
1846
1846
  return t.each(function() {
1847
- var i = zt(this, r);
1847
+ var i = Ht(this, r);
1848
1848
  (i.value || (i.value = {}))[e] = n.apply(this, arguments);
1849
1849
  }), function(i) {
1850
1850
  return Ct(i, r).value[e];
@@ -1946,12 +1946,12 @@ function xl(t) {
1946
1946
  }
1947
1947
  function vl(t, e) {
1948
1948
  return function() {
1949
- zt(this, t).duration = +e.apply(this, arguments);
1949
+ Ht(this, t).duration = +e.apply(this, arguments);
1950
1950
  };
1951
1951
  }
1952
1952
  function _l(t, e) {
1953
1953
  return e = +e, function() {
1954
- zt(this, t).duration = e;
1954
+ Ht(this, t).duration = e;
1955
1955
  };
1956
1956
  }
1957
1957
  function bl(t) {
@@ -1961,7 +1961,7 @@ function bl(t) {
1961
1961
  function wl(t, e) {
1962
1962
  if (typeof e != "function") throw new Error();
1963
1963
  return function() {
1964
- zt(this, t).ease = e;
1964
+ Ht(this, t).ease = e;
1965
1965
  };
1966
1966
  }
1967
1967
  function kl(t) {
@@ -1972,7 +1972,7 @@ function $l(t, e) {
1972
1972
  return function() {
1973
1973
  var n = e.apply(this, arguments);
1974
1974
  if (typeof n != "function") throw new Error();
1975
- zt(this, t).ease = n;
1975
+ Ht(this, t).ease = n;
1976
1976
  };
1977
1977
  }
1978
1978
  function Al(t) {
@@ -1984,16 +1984,16 @@ function Nl(t) {
1984
1984
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
1985
1985
  for (var a = e[i], s = a.length, o = r[i] = [], c, l = 0; l < s; ++l)
1986
1986
  (c = a[l]) && t.call(c, c.__data__, l, a) && o.push(c);
1987
- return new Xt(r, this._parents, this._name, this._id);
1987
+ return new Bt(r, this._parents, this._name, this._id);
1988
1988
  }
1989
1989
  function Sl(t) {
1990
1990
  if (t._id !== this._id) throw new Error();
1991
1991
  for (var e = this._groups, n = t._groups, r = e.length, i = n.length, a = Math.min(r, i), s = new Array(r), o = 0; o < a; ++o)
1992
- for (var c = e[o], l = n[o], u = c.length, h = s[o] = new Array(u), f, d = 0; d < u; ++d)
1993
- (f = c[d] || l[d]) && (h[d] = f);
1992
+ for (var c = e[o], l = n[o], u = c.length, h = s[o] = new Array(u), f, p = 0; p < u; ++p)
1993
+ (f = c[p] || l[p]) && (h[p] = f);
1994
1994
  for (; o < r; ++o)
1995
1995
  s[o] = e[o];
1996
- return new Xt(s, this._parents, this._name, this._id);
1996
+ return new Bt(s, this._parents, this._name, this._id);
1997
1997
  }
1998
1998
  function Ml(t) {
1999
1999
  return (t + "").trim().split(/^|\s+/).every(function(e) {
@@ -2002,7 +2002,7 @@ function Ml(t) {
2002
2002
  });
2003
2003
  }
2004
2004
  function Tl(t, e, n) {
2005
- var r, i, a = Ml(e) ? fr : zt;
2005
+ var r, i, a = Ml(e) ? fr : Ht;
2006
2006
  return function() {
2007
2007
  var s = a(this, t), o = s.on;
2008
2008
  o !== r && (i = (r = o).copy()).on(e, n), s.on = i;
@@ -2028,7 +2028,7 @@ function Ll(t) {
2028
2028
  for (var r = this._groups, i = r.length, a = new Array(i), s = 0; s < i; ++s)
2029
2029
  for (var o = r[s], c = o.length, l = a[s] = new Array(c), u, h, f = 0; f < c; ++f)
2030
2030
  (u = o[f]) && (h = t.call(u, u.__data__, f, o)) && ("__data__" in u && (h.__data__ = u.__data__), l[f] = h, Mn(l[f], e, n, f, l, Ct(u, n)));
2031
- return new Xt(a, this._parents, e, n);
2031
+ return new Bt(a, this._parents, e, n);
2032
2032
  }
2033
2033
  function Dl(t) {
2034
2034
  var e = this._name, n = this._id;
@@ -2036,11 +2036,11 @@ function Dl(t) {
2036
2036
  for (var r = this._groups, i = r.length, a = [], s = [], o = 0; o < i; ++o)
2037
2037
  for (var c = r[o], l = c.length, u, h = 0; h < l; ++h)
2038
2038
  if (u = c[h]) {
2039
- for (var f = t.call(u, u.__data__, h, c), d, _ = Ct(u, n), L = 0, K = f.length; L < K; ++L)
2040
- (d = f[L]) && Mn(d, e, n, L, f, _);
2039
+ for (var f = t.call(u, u.__data__, h, c), p, _ = Ct(u, n), j = 0, K = f.length; j < K; ++j)
2040
+ (p = f[j]) && Mn(p, e, n, j, f, _);
2041
2041
  a.push(f), s.push(u);
2042
2042
  }
2043
- return new Xt(a, s, e, n);
2043
+ return new Bt(a, s, e, n);
2044
2044
  }
2045
2045
  var jl = qe.prototype.constructor;
2046
2046
  function Pl() {
@@ -2075,7 +2075,7 @@ function Hl(t, e, n) {
2075
2075
  function Ol(t, e) {
2076
2076
  var n, r, i, a = "style." + e, s = "end." + a, o;
2077
2077
  return function() {
2078
- var c = zt(this, t), l = c.on, u = c.value[a] == null ? o || (o = Fi(e)) : void 0;
2078
+ var c = Ht(this, t), l = c.on, u = c.value[a] == null ? o || (o = Fi(e)) : void 0;
2079
2079
  (l !== n || i !== u) && (r = (n = l).copy()).on(s, i = u), c.on = r;
2080
2080
  };
2081
2081
  }
@@ -2108,14 +2108,14 @@ function Yl(t) {
2108
2108
  this.textContent = t;
2109
2109
  };
2110
2110
  }
2111
- function Xl(t) {
2111
+ function Bl(t) {
2112
2112
  return function() {
2113
2113
  var e = t(this);
2114
2114
  this.textContent = e ?? "";
2115
2115
  };
2116
2116
  }
2117
- function Bl(t) {
2118
- return this.tween("text", typeof t == "function" ? Xl(hr(this, "text", t)) : Yl(t == null ? "" : t + ""));
2117
+ function Xl(t) {
2118
+ return this.tween("text", typeof t == "function" ? Bl(hr(this, "text", t)) : Yl(t == null ? "" : t + ""));
2119
2119
  }
2120
2120
  function Kl(t) {
2121
2121
  return function(e) {
@@ -2149,7 +2149,7 @@ function Gl() {
2149
2149
  ease: u.ease
2150
2150
  });
2151
2151
  }
2152
- return new Xt(r, this._parents, t, n);
2152
+ return new Bt(r, this._parents, t, n);
2153
2153
  }
2154
2154
  function Zl() {
2155
2155
  var t, e, n = this, r = n._id, i = n.size();
@@ -2158,41 +2158,41 @@ function Zl() {
2158
2158
  --i === 0 && a();
2159
2159
  } };
2160
2160
  n.each(function() {
2161
- var l = zt(this, r), u = l.on;
2161
+ var l = Ht(this, r), u = l.on;
2162
2162
  u !== t && (e = (t = u).copy(), e._.cancel.push(o), e._.interrupt.push(o), e._.end.push(c)), l.on = e;
2163
2163
  }), i === 0 && a();
2164
2164
  });
2165
2165
  }
2166
2166
  var Ql = 0;
2167
- function Xt(t, e, n, r) {
2167
+ function Bt(t, e, n, r) {
2168
2168
  this._groups = t, this._parents = e, this._name = n, this._id = r;
2169
2169
  }
2170
2170
  function Wi() {
2171
2171
  return ++Ql;
2172
2172
  }
2173
- var qt = qe.prototype;
2174
- Xt.prototype = {
2175
- constructor: Xt,
2173
+ var Vt = qe.prototype;
2174
+ Bt.prototype = {
2175
+ constructor: Bt,
2176
2176
  select: Ll,
2177
2177
  selectAll: Dl,
2178
- selectChild: qt.selectChild,
2179
- selectChildren: qt.selectChildren,
2178
+ selectChild: Vt.selectChild,
2179
+ selectChildren: Vt.selectChildren,
2180
2180
  filter: Nl,
2181
2181
  merge: Sl,
2182
2182
  selection: Pl,
2183
2183
  transition: Gl,
2184
- call: qt.call,
2185
- nodes: qt.nodes,
2186
- node: qt.node,
2187
- size: qt.size,
2188
- empty: qt.empty,
2189
- each: qt.each,
2184
+ call: Vt.call,
2185
+ nodes: Vt.nodes,
2186
+ node: Vt.node,
2187
+ size: Vt.size,
2188
+ empty: Vt.empty,
2189
+ each: Vt.each,
2190
2190
  on: Rl,
2191
2191
  attr: ul,
2192
2192
  attrTween: gl,
2193
2193
  style: ql,
2194
2194
  styleTween: Wl,
2195
- text: Bl,
2195
+ text: Xl,
2196
2196
  textTween: Jl,
2197
2197
  remove: Cl,
2198
2198
  tween: rl,
@@ -2201,7 +2201,7 @@ Xt.prototype = {
2201
2201
  ease: kl,
2202
2202
  easeVarying: Al,
2203
2203
  end: Zl,
2204
- [Symbol.iterator]: qt[Symbol.iterator]
2204
+ [Symbol.iterator]: Vt[Symbol.iterator]
2205
2205
  };
2206
2206
  function tc(t) {
2207
2207
  return --t * t * t + 1;
@@ -2224,11 +2224,11 @@ function rc(t, e) {
2224
2224
  }
2225
2225
  function ic(t) {
2226
2226
  var e, n;
2227
- t instanceof Xt ? (e = t._id, t = t._name) : (e = Wi(), (n = nc).time = ur(), t = t == null ? null : t + "");
2227
+ t instanceof Bt ? (e = t._id, t = t._name) : (e = Wi(), (n = nc).time = ur(), t = t == null ? null : t + "");
2228
2228
  for (var r = this._groups, i = r.length, a = 0; a < i; ++a)
2229
2229
  for (var s = r[a], o = s.length, c, l = 0; l < o; ++l)
2230
2230
  (c = s[l]) && Mn(c, t, e, l, s, n || rc(c, e));
2231
- return new Xt(r, this._parents, t, e);
2231
+ return new Bt(r, this._parents, t, e);
2232
2232
  }
2233
2233
  qe.prototype.interrupt = tl;
2234
2234
  qe.prototype.transition = ic;
@@ -2277,8 +2277,8 @@ let oc = class {
2277
2277
  else if (f > ne) if (!(Math.abs(h * c - l * u) > ne) || !a)
2278
2278
  this._append`L${this._x1 = e},${this._y1 = n}`;
2279
2279
  else {
2280
- let d = r - s, _ = i - o, L = c * c + l * l, K = d * d + _ * _, R = Math.sqrt(L), V = Math.sqrt(f), S = a * Math.tan((tr - Math.acos((L + f - K) / (2 * R * V))) / 2), k = S / V, q = S / R;
2281
- Math.abs(k - 1) > ne && this._append`L${e + k * u},${n + k * h}`, this._append`A${a},${a},0,0,${+(h * d > u * _)},${this._x1 = e + q * c},${this._y1 = n + q * l}`;
2280
+ let p = r - s, _ = i - o, j = c * c + l * l, K = p * p + _ * _, T = Math.sqrt(j), q = Math.sqrt(f), k = a * Math.tan((tr - Math.acos((j + f - K) / (2 * T * q))) / 2), A = k / q, O = k / T;
2281
+ Math.abs(A - 1) > ne && this._append`L${e + A * u},${n + A * h}`, this._append`A${a},${a},0,0,${+(h * p > u * _)},${this._x1 = e + O * c},${this._y1 = n + O * l}`;
2282
2282
  }
2283
2283
  }
2284
2284
  arc(e, n, r, i, a, s) {
@@ -2361,11 +2361,11 @@ function hc(t) {
2361
2361
  }
2362
2362
  return r > 0 ? t.slice(0, r) + t.slice(i + 1) : t;
2363
2363
  }
2364
- var Xi;
2364
+ var Bi;
2365
2365
  function dc(t, e) {
2366
2366
  var n = mn(t, e);
2367
2367
  if (!n) return t + "";
2368
- var r = n[0], i = n[1], a = i - (Xi = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, s = r.length;
2368
+ var r = n[0], i = n[1], a = i - (Bi = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, s = r.length;
2369
2369
  return a === s ? r : a > s ? r + new Array(a - s + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + new Array(1 - a).join("0") + mn(t, Math.max(0, e + a - 1))[0];
2370
2370
  }
2371
2371
  function Ir(t, e) {
@@ -2397,51 +2397,51 @@ function pc(t) {
2397
2397
  var e = t.grouping === void 0 || t.thousands === void 0 ? Hr : cc(Or.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? Hr : uc(Or.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", o = t.minus === void 0 ? "−" : t.minus + "", c = t.nan === void 0 ? "NaN" : t.nan + "";
2398
2398
  function l(h) {
2399
2399
  h = xn(h);
2400
- var f = h.fill, d = h.align, _ = h.sign, L = h.symbol, K = h.zero, R = h.width, V = h.comma, S = h.precision, k = h.trim, q = h.type;
2401
- q === "n" ? (V = !0, q = "g") : zr[q] || (S === void 0 && (S = 12), k = !0, q = "g"), (K || f === "0" && d === "=") && (K = !0, f = "0", d = "=");
2402
- var U = L === "$" ? n : L === "#" && /[boxX]/.test(q) ? "0" + q.toLowerCase() : "", J = L === "$" ? r : /[%p]/.test(q) ? s : "", F = zr[q], W = /[defgprs%]/.test(q);
2403
- S = S === void 0 ? 6 : /[gprs]/.test(q) ? Math.max(1, Math.min(21, S)) : Math.max(0, Math.min(20, S));
2404
- function et(j) {
2405
- var E = U, v = J, z, p, C;
2406
- if (q === "c")
2407
- v = F(j) + v, j = "";
2400
+ var f = h.fill, p = h.align, _ = h.sign, j = h.symbol, K = h.zero, T = h.width, q = h.comma, k = h.precision, A = h.trim, O = h.type;
2401
+ O === "n" ? (q = !0, O = "g") : zr[O] || (k === void 0 && (k = 12), A = !0, O = "g"), (K || f === "0" && p === "=") && (K = !0, f = "0", p = "=");
2402
+ var V = j === "$" ? n : j === "#" && /[boxX]/.test(O) ? "0" + O.toLowerCase() : "", J = j === "$" ? r : /[%p]/.test(O) ? s : "", Z = zr[O], W = /[defgprs%]/.test(O);
2403
+ k = k === void 0 ? 6 : /[gprs]/.test(O) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
2404
+ function B(C) {
2405
+ var L = V, w = J, E, d, R;
2406
+ if (O === "c")
2407
+ w = Z(C) + w, C = "";
2408
2408
  else {
2409
- j = +j;
2410
- var M = j < 0 || 1 / j < 0;
2411
- if (j = isNaN(j) ? c : F(Math.abs(j), S), k && (j = hc(j)), M && +j == 0 && _ !== "+" && (M = !1), E = (M ? _ === "(" ? _ : o : _ === "-" || _ === "(" ? "" : _) + E, v = (q === "s" ? qr[8 + Xi / 3] : "") + v + (M && _ === "(" ? ")" : ""), W) {
2412
- for (z = -1, p = j.length; ++z < p; )
2413
- if (C = j.charCodeAt(z), 48 > C || C > 57) {
2414
- v = (C === 46 ? i + j.slice(z + 1) : j.slice(z)) + v, j = j.slice(0, z);
2409
+ C = +C;
2410
+ var M = C < 0 || 1 / C < 0;
2411
+ if (C = isNaN(C) ? c : Z(Math.abs(C), k), A && (C = hc(C)), M && +C == 0 && _ !== "+" && (M = !1), L = (M ? _ === "(" ? _ : o : _ === "-" || _ === "(" ? "" : _) + L, w = (O === "s" ? qr[8 + Bi / 3] : "") + w + (M && _ === "(" ? ")" : ""), W) {
2412
+ for (E = -1, d = C.length; ++E < d; )
2413
+ if (R = C.charCodeAt(E), 48 > R || R > 57) {
2414
+ w = (R === 46 ? i + C.slice(E + 1) : C.slice(E)) + w, C = C.slice(0, E);
2415
2415
  break;
2416
2416
  }
2417
2417
  }
2418
2418
  }
2419
- V && !K && (j = e(j, 1 / 0));
2420
- var A = E.length + j.length + v.length, x = A < R ? new Array(R - A + 1).join(f) : "";
2421
- switch (V && K && (j = e(x + j, x.length ? R - v.length : 1 / 0), x = ""), d) {
2419
+ q && !K && (C = e(C, 1 / 0));
2420
+ var N = L.length + C.length + w.length, x = N < T ? new Array(T - N + 1).join(f) : "";
2421
+ switch (q && K && (C = e(x + C, x.length ? T - w.length : 1 / 0), x = ""), p) {
2422
2422
  case "<":
2423
- j = E + j + v + x;
2423
+ C = L + C + w + x;
2424
2424
  break;
2425
2425
  case "=":
2426
- j = E + x + j + v;
2426
+ C = L + x + C + w;
2427
2427
  break;
2428
2428
  case "^":
2429
- j = x.slice(0, A = x.length >> 1) + E + j + v + x.slice(A);
2429
+ C = x.slice(0, N = x.length >> 1) + L + C + w + x.slice(N);
2430
2430
  break;
2431
2431
  default:
2432
- j = x + E + j + v;
2432
+ C = x + L + C + w;
2433
2433
  break;
2434
2434
  }
2435
- return a(j);
2435
+ return a(C);
2436
2436
  }
2437
- return et.toString = function() {
2437
+ return B.toString = function() {
2438
2438
  return h + "";
2439
- }, et;
2439
+ }, B;
2440
2440
  }
2441
2441
  function u(h, f) {
2442
- var d = l((h = xn(h), h.type = "f", h)), _ = Math.max(-8, Math.min(8, Math.floor(ke(f) / 3))) * 3, L = Math.pow(10, -_), K = qr[8 + _ / 3];
2443
- return function(R) {
2444
- return d(L * R) + K;
2442
+ var p = l((h = xn(h), h.type = "f", h)), _ = Math.max(-8, Math.min(8, Math.floor(ke(f) / 3))) * 3, j = Math.pow(10, -_), K = qr[8 + _ / 3];
2443
+ return function(T) {
2444
+ return p(j * T) + K;
2445
2445
  };
2446
2446
  }
2447
2447
  return {
@@ -2449,14 +2449,14 @@ function pc(t) {
2449
2449
  formatPrefix: u
2450
2450
  };
2451
2451
  }
2452
- var Ge, fe, Bi;
2452
+ var Ge, fe, Xi;
2453
2453
  gc({
2454
2454
  thousands: ",",
2455
2455
  grouping: [3],
2456
2456
  currency: ["$", ""]
2457
2457
  });
2458
2458
  function gc(t) {
2459
- return Ge = pc(t), fe = Ge.format, Bi = Ge.formatPrefix, Ge;
2459
+ return Ge = pc(t), fe = Ge.format, Xi = Ge.formatPrefix, Ge;
2460
2460
  }
2461
2461
  function yc(t) {
2462
2462
  return Math.max(0, -ke(Math.abs(t)));
@@ -2627,14 +2627,14 @@ function Wc() {
2627
2627
  function Yc(t) {
2628
2628
  return typeof t == "object" && "length" in t ? t : Array.from(t);
2629
2629
  }
2630
- function Xc(t, e) {
2630
+ function Bc(t, e) {
2631
2631
  let n = t.length, r, i;
2632
2632
  for (; n; )
2633
2633
  i = e() * n-- | 0, r = t[n], t[n] = t[i], t[i] = r;
2634
2634
  return t;
2635
2635
  }
2636
- function Bc(t, e) {
2637
- for (var n = 0, r = (t = Xc(Array.from(t), e)).length, i = [], a, s; n < r; )
2636
+ function Xc(t, e) {
2637
+ for (var n = 0, r = (t = Bc(Array.from(t), e)).length, i = [], a, s; n < r; )
2638
2638
  a = t[n], s && Ki(s, a) ? ++n : (s = Uc(i = Kc(i, a)), n = 0);
2639
2639
  return s;
2640
2640
  }
@@ -2690,11 +2690,11 @@ function Le(t, e) {
2690
2690
  };
2691
2691
  }
2692
2692
  function Ui(t, e, n) {
2693
- var r = t.x, i = t.y, a = t.r, s = e.x, o = e.y, c = e.r, l = n.x, u = n.y, h = n.r, f = r - s, d = r - l, _ = i - o, L = i - u, K = c - a, R = h - a, V = r * r + i * i - a * a, S = V - s * s - o * o + c * c, k = V - l * l - u * u + h * h, q = d * _ - f * L, U = (_ * k - L * S) / (q * 2) - r, J = (L * K - _ * R) / q, F = (d * S - f * k) / (q * 2) - i, W = (f * R - d * K) / q, et = J * J + W * W - 1, j = 2 * (a + U * J + F * W), E = U * U + F * F - a * a, v = -(Math.abs(et) > 1e-6 ? (j + Math.sqrt(j * j - 4 * et * E)) / (2 * et) : E / j);
2693
+ var r = t.x, i = t.y, a = t.r, s = e.x, o = e.y, c = e.r, l = n.x, u = n.y, h = n.r, f = r - s, p = r - l, _ = i - o, j = i - u, K = c - a, T = h - a, q = r * r + i * i - a * a, k = q - s * s - o * o + c * c, A = q - l * l - u * u + h * h, O = p * _ - f * j, V = (_ * A - j * k) / (O * 2) - r, J = (j * K - _ * T) / O, Z = (p * k - f * A) / (O * 2) - i, W = (f * T - p * K) / O, B = J * J + W * W - 1, C = 2 * (a + V * J + Z * W), L = V * V + Z * Z - a * a, w = -(Math.abs(B) > 1e-6 ? (C + Math.sqrt(C * C - 4 * B * L)) / (2 * B) : L / C);
2694
2694
  return {
2695
- x: r + U + J * v,
2696
- y: i + F + W * v,
2697
- r: v
2695
+ x: r + V + J * w,
2696
+ y: i + Z + W * w,
2697
+ r: w
2698
2698
  };
2699
2699
  }
2700
2700
  function Wr(t, e, n) {
@@ -2705,7 +2705,7 @@ function Yr(t, e) {
2705
2705
  var n = t.r + e.r - 1e-6, r = e.x - t.x, i = e.y - t.y;
2706
2706
  return n > 0 && n * n > r * r + i * i;
2707
2707
  }
2708
- function Xr(t) {
2708
+ function Br(t) {
2709
2709
  var e = t._, n = t.next._, r = e.r + n.r, i = (e.x * n.r + n.x * e.r) / r, a = (e.y * n.r + n.y * e.r) / r;
2710
2710
  return i * i + a * a;
2711
2711
  }
@@ -2735,12 +2735,12 @@ function Gc(t, e) {
2735
2735
  f += u._.r, u = u.previous;
2736
2736
  }
2737
2737
  while (l !== u.next);
2738
- for (i.previous = n, i.next = r, n.next = r.previous = r = i, s = Xr(n); (i = i.next) !== r; )
2739
- (o = Xr(i)) < s && (n = i, s = o);
2738
+ for (i.previous = n, i.next = r, n.next = r.previous = r = i, s = Br(n); (i = i.next) !== r; )
2739
+ (o = Br(i)) < s && (n = i, s = o);
2740
2740
  r = n.next;
2741
2741
  }
2742
2742
  for (n = [r._], i = r; (i = i.next) !== r; ) n.push(i._);
2743
- for (i = Bc(n, e), c = 0; c < a; ++c) n = t[c], n.x -= i.x, n.y -= i.y;
2743
+ for (i = Xc(n, e), c = 0; c < a; ++c) n = t[c], n.x -= i.x, n.y -= i.y;
2744
2744
  return i.r;
2745
2745
  }
2746
2746
  function Zc(t) {
@@ -2750,7 +2750,7 @@ function Qc() {
2750
2750
  var t = null, e = 1, n = 1, r = Vr;
2751
2751
  function i(a) {
2752
2752
  const s = Wc();
2753
- return a.x = e / 2, a.y = n / 2, t ? a.eachBefore(Br(t)).eachAfter(On(r, 0.5, s)).eachBefore(Kr(1)) : a.eachBefore(Br(Zc)).eachAfter(On(Vr, 1, s)).eachAfter(On(r, a.r / Math.min(e, n), s)).eachBefore(Kr(Math.min(e, n) / (2 * a.r))), a;
2753
+ return a.x = e / 2, a.y = n / 2, t ? a.eachBefore(Xr(t)).eachAfter(On(r, 0.5, s)).eachBefore(Kr(1)) : a.eachBefore(Xr(Zc)).eachAfter(On(Vr, 1, s)).eachAfter(On(r, a.r / Math.min(e, n), s)).eachBefore(Kr(Math.min(e, n) / (2 * a.r))), a;
2754
2754
  }
2755
2755
  return i.radius = function(a) {
2756
2756
  return arguments.length ? (t = Hc(a), i) : t;
@@ -2760,7 +2760,7 @@ function Qc() {
2760
2760
  return arguments.length ? (r = typeof a == "function" ? a : qc(+a), i) : r;
2761
2761
  }, i;
2762
2762
  }
2763
- function Br(t) {
2763
+ function Xr(t) {
2764
2764
  return function(e) {
2765
2765
  e.children || (e.r = Math.max(0, +t(e) || 0));
2766
2766
  };
@@ -2823,12 +2823,12 @@ function $e() {
2823
2823
  var t = Ji().unknown(void 0), e = t.domain, n = t.range, r = 0, i = 1, a, s, o = !1, c = 0, l = 0, u = 0.5;
2824
2824
  delete t.unknown;
2825
2825
  function h() {
2826
- var f = e().length, d = i < r, _ = d ? i : r, L = d ? r : i;
2827
- a = (L - _) / Math.max(1, f - c + l * 2), o && (a = Math.floor(a)), _ += (L - _ - a * (f - c)) * u, s = a * (1 - c), o && (_ = Math.round(_), s = Math.round(s));
2828
- var K = wa(f).map(function(R) {
2829
- return _ + a * R;
2826
+ var f = e().length, p = i < r, _ = p ? i : r, j = p ? r : i;
2827
+ a = (j - _) / Math.max(1, f - c + l * 2), o && (a = Math.floor(a)), _ += (j - _ - a * (f - c)) * u, s = a * (1 - c), o && (_ = Math.round(_), s = Math.round(s));
2828
+ var K = wa(f).map(function(T) {
2829
+ return _ + a * T;
2830
2830
  });
2831
- return n(d ? K.reverse() : K);
2831
+ return n(p ? K.reverse() : K);
2832
2832
  }
2833
2833
  return t.domain = function(f) {
2834
2834
  return arguments.length ? (e(f), h()) : e();
@@ -2918,8 +2918,8 @@ function su() {
2918
2918
  return arguments.length ? (n = f, u()) : n;
2919
2919
  }, h.unknown = function(f) {
2920
2920
  return arguments.length ? (a = f, h) : a;
2921
- }, function(f, d) {
2922
- return r = f, i = d, u();
2921
+ }, function(f, p) {
2922
+ return r = f, i = p, u();
2923
2923
  };
2924
2924
  }
2925
2925
  function ou() {
@@ -2930,7 +2930,7 @@ function lu(t, e, n, r) {
2930
2930
  switch (r = xn(r ?? ",f"), r.type) {
2931
2931
  case "s": {
2932
2932
  var s = Math.max(Math.abs(t), Math.abs(e));
2933
- return r.precision == null && !isNaN(a = mc(i, s)) && (r.precision = a), Bi(r, s);
2933
+ return r.precision == null && !isNaN(a = mc(i, s)) && (r.precision = a), Xi(r, s);
2934
2934
  }
2935
2935
  case "":
2936
2936
  case "e":
@@ -3031,40 +3031,40 @@ function xu(t, e, n, r, i, a, s, o) {
3031
3031
  return f = (u * (e - a) - h * (t - i)) / f, [t + f * c, e + f * l];
3032
3032
  }
3033
3033
  function tn(t, e, n, r, i, a, s) {
3034
- var o = t - n, c = e - r, l = (s ? a : -a) / ye(o * o + c * c), u = l * c, h = -l * o, f = t + u, d = e + h, _ = n + u, L = r + h, K = (f + _) / 2, R = (d + L) / 2, V = _ - f, S = L - d, k = V * V + S * S, q = i - a, U = f * L - _ * d, J = (S < 0 ? -1 : 1) * ye(uu(0, q * q * k - U * U)), F = (U * S - V * J) / k, W = (-U * V - S * J) / k, et = (U * S + V * J) / k, j = (-U * V + S * J) / k, E = F - K, v = W - R, z = et - K, p = j - R;
3035
- return E * E + v * v > z * z + p * p && (F = et, W = j), {
3036
- cx: F,
3034
+ var o = t - n, c = e - r, l = (s ? a : -a) / ye(o * o + c * c), u = l * c, h = -l * o, f = t + u, p = e + h, _ = n + u, j = r + h, K = (f + _) / 2, T = (p + j) / 2, q = _ - f, k = j - p, A = q * q + k * k, O = i - a, V = f * j - _ * p, J = (k < 0 ? -1 : 1) * ye(uu(0, O * O * A - V * V)), Z = (V * k - q * J) / A, W = (-V * q - k * J) / A, B = (V * k + q * J) / A, C = (-V * q + k * J) / A, L = Z - K, w = W - T, E = B - K, d = C - T;
3035
+ return L * L + w * w > E * E + d * d && (Z = B, W = C), {
3036
+ cx: Z,
3037
3037
  cy: W,
3038
3038
  x01: -u,
3039
3039
  y01: -h,
3040
- x11: F * (i / q - 1),
3041
- y11: W * (i / q - 1)
3040
+ x11: Z * (i / O - 1),
3041
+ y11: W * (i / O - 1)
3042
3042
  };
3043
3043
  }
3044
3044
  function Qr() {
3045
3045
  var t = du, e = pu, n = dt(0), r = null, i = gu, a = yu, s = mu, o = null, c = hu(l);
3046
3046
  function l() {
3047
- var u, h, f = +t.apply(this, arguments), d = +e.apply(this, arguments), _ = i.apply(this, arguments) - _n, L = a.apply(this, arguments) - _n, K = Gr(L - _), R = L > _;
3048
- if (o || (o = u = c()), d < f && (h = d, d = f, f = h), !(d > wt)) o.moveTo(0, 0);
3047
+ var u, h, f = +t.apply(this, arguments), p = +e.apply(this, arguments), _ = i.apply(this, arguments) - _n, j = a.apply(this, arguments) - _n, K = Gr(j - _), T = j > _;
3048
+ if (o || (o = u = c()), p < f && (h = p, p = f, f = h), !(p > wt)) o.moveTo(0, 0);
3049
3049
  else if (K > on - wt)
3050
- o.moveTo(d * te(_), d * Dt(_)), o.arc(0, 0, d, _, L, !R), f > wt && (o.moveTo(f * te(L), f * Dt(L)), o.arc(0, 0, f, L, _, R));
3050
+ o.moveTo(p * te(_), p * Dt(_)), o.arc(0, 0, p, _, j, !T), f > wt && (o.moveTo(f * te(j), f * Dt(j)), o.arc(0, 0, f, j, _, T));
3051
3051
  else {
3052
- var V = _, S = L, k = _, q = L, U = K, J = K, F = s.apply(this, arguments) / 2, W = F > wt && (r ? +r.apply(this, arguments) : ye(f * f + d * d)), et = qn(Gr(d - f) / 2, +n.apply(this, arguments)), j = et, E = et, v, z;
3052
+ var q = _, k = j, A = _, O = j, V = K, J = K, Z = s.apply(this, arguments) / 2, W = Z > wt && (r ? +r.apply(this, arguments) : ye(f * f + p * p)), B = qn(Gr(p - f) / 2, +n.apply(this, arguments)), C = B, L = B, w, E;
3053
3053
  if (W > wt) {
3054
- var p = Zr(W / f * Dt(F)), C = Zr(W / d * Dt(F));
3055
- (U -= p * 2) > wt ? (p *= R ? 1 : -1, k += p, q -= p) : (U = 0, k = q = (_ + L) / 2), (J -= C * 2) > wt ? (C *= R ? 1 : -1, V += C, S -= C) : (J = 0, V = S = (_ + L) / 2);
3054
+ var d = Zr(W / f * Dt(Z)), R = Zr(W / p * Dt(Z));
3055
+ (V -= d * 2) > wt ? (d *= T ? 1 : -1, A += d, O -= d) : (V = 0, A = O = (_ + j) / 2), (J -= R * 2) > wt ? (R *= T ? 1 : -1, q += R, k -= R) : (J = 0, q = k = (_ + j) / 2);
3056
3056
  }
3057
- var M = d * te(V), A = d * Dt(V), x = f * te(q), T = f * Dt(q);
3058
- if (et > wt) {
3059
- var y = d * te(S), I = d * Dt(S), P = f * te(k), Y = f * Dt(k), Z;
3057
+ var M = p * te(q), N = p * Dt(q), x = f * te(O), S = f * Dt(O);
3058
+ if (B > wt) {
3059
+ var m = p * te(k), D = p * Dt(k), P = f * te(A), F = f * Dt(A), Q;
3060
3060
  if (K < Oe)
3061
- if (Z = xu(M, A, P, Y, y, I, x, T)) {
3062
- var m = M - Z[0], g = A - Z[1], D = y - Z[0], w = I - Z[1], N = 1 / Dt(fu((m * D + g * w) / (ye(m * m + g * g) * ye(D * D + w * w))) / 2), $ = ye(Z[0] * Z[0] + Z[1] * Z[1]);
3063
- j = qn(et, (f - $) / (N - 1)), E = qn(et, (d - $) / (N + 1));
3061
+ if (Q = xu(M, N, P, F, m, D, x, S)) {
3062
+ var tt = M - Q[0], z = N - Q[1], g = m - Q[0], y = D - Q[1], b = 1 / Dt(fu((tt * g + z * y) / (ye(tt * tt + z * z) * ye(g * g + y * y))) / 2), v = ye(Q[0] * Q[0] + Q[1] * Q[1]);
3063
+ C = qn(B, (f - v) / (b - 1)), L = qn(B, (p - v) / (b + 1));
3064
3064
  } else
3065
- j = E = 0;
3065
+ C = L = 0;
3066
3066
  }
3067
- J > wt ? E > wt ? (v = tn(P, Y, M, A, d, E, R), z = tn(y, I, x, T, d, E, R), o.moveTo(v.cx + v.x01, v.cy + v.y01), E < et ? o.arc(v.cx, v.cy, E, yt(v.y01, v.x01), yt(z.y01, z.x01), !R) : (o.arc(v.cx, v.cy, E, yt(v.y01, v.x01), yt(v.y11, v.x11), !R), o.arc(0, 0, d, yt(v.cy + v.y11, v.cx + v.x11), yt(z.cy + z.y11, z.cx + z.x11), !R), o.arc(z.cx, z.cy, E, yt(z.y11, z.x11), yt(z.y01, z.x01), !R))) : (o.moveTo(M, A), o.arc(0, 0, d, V, S, !R)) : o.moveTo(M, A), !(f > wt) || !(U > wt) ? o.lineTo(x, T) : j > wt ? (v = tn(x, T, y, I, f, -j, R), z = tn(M, A, P, Y, f, -j, R), o.lineTo(v.cx + v.x01, v.cy + v.y01), j < et ? o.arc(v.cx, v.cy, j, yt(v.y01, v.x01), yt(z.y01, z.x01), !R) : (o.arc(v.cx, v.cy, j, yt(v.y01, v.x01), yt(v.y11, v.x11), !R), o.arc(0, 0, f, yt(v.cy + v.y11, v.cx + v.x11), yt(z.cy + z.y11, z.cx + z.x11), R), o.arc(z.cx, z.cy, j, yt(z.y11, z.x11), yt(z.y01, z.x01), !R))) : o.arc(0, 0, f, q, k, R);
3067
+ J > wt ? L > wt ? (w = tn(P, F, M, N, p, L, T), E = tn(m, D, x, S, p, L, T), o.moveTo(w.cx + w.x01, w.cy + w.y01), L < B ? o.arc(w.cx, w.cy, L, yt(w.y01, w.x01), yt(E.y01, E.x01), !T) : (o.arc(w.cx, w.cy, L, yt(w.y01, w.x01), yt(w.y11, w.x11), !T), o.arc(0, 0, p, yt(w.cy + w.y11, w.cx + w.x11), yt(E.cy + E.y11, E.cx + E.x11), !T), o.arc(E.cx, E.cy, L, yt(E.y11, E.x11), yt(E.y01, E.x01), !T))) : (o.moveTo(M, N), o.arc(0, 0, p, q, k, !T)) : o.moveTo(M, N), !(f > wt) || !(V > wt) ? o.lineTo(x, S) : C > wt ? (w = tn(x, S, m, D, f, -C, T), E = tn(M, N, P, F, f, -C, T), o.lineTo(w.cx + w.x01, w.cy + w.y01), C < B ? o.arc(w.cx, w.cy, C, yt(w.y01, w.x01), yt(E.y01, E.x01), !T) : (o.arc(w.cx, w.cy, C, yt(w.y01, w.x01), yt(w.y11, w.x11), !T), o.arc(0, 0, f, yt(w.cy + w.y11, w.cx + w.x11), yt(E.cy + E.y11, E.cx + E.x11), T), o.arc(E.cx, E.cy, C, yt(E.y11, E.x11), yt(E.y01, E.x01), !T))) : o.arc(0, 0, f, O, A, T);
3068
3068
  }
3069
3069
  if (o.closePath(), u) return o = null, u + "" || null;
3070
3070
  }
@@ -3101,21 +3101,21 @@ function _u(t) {
3101
3101
  function bu() {
3102
3102
  var t = _u, e = vu, n = null, r = dt(0), i = dt(on), a = dt(0);
3103
3103
  function s(o) {
3104
- var c, l = (o = na(o)).length, u, h, f = 0, d = new Array(l), _ = new Array(l), L = +r.apply(this, arguments), K = Math.min(on, Math.max(-on, i.apply(this, arguments) - L)), R, V = Math.min(Math.abs(K) / l, a.apply(this, arguments)), S = V * (K < 0 ? -1 : 1), k;
3104
+ var c, l = (o = na(o)).length, u, h, f = 0, p = new Array(l), _ = new Array(l), j = +r.apply(this, arguments), K = Math.min(on, Math.max(-on, i.apply(this, arguments) - j)), T, q = Math.min(Math.abs(K) / l, a.apply(this, arguments)), k = q * (K < 0 ? -1 : 1), A;
3105
3105
  for (c = 0; c < l; ++c)
3106
- (k = _[d[c] = c] = +t(o[c], c, o)) > 0 && (f += k);
3107
- for (e != null ? d.sort(function(q, U) {
3108
- return e(_[q], _[U]);
3109
- }) : n != null && d.sort(function(q, U) {
3110
- return n(o[q], o[U]);
3111
- }), c = 0, h = f ? (K - l * S) / f : 0; c < l; ++c, L = R)
3112
- u = d[c], k = _[u], R = L + (k > 0 ? k * h : 0) + S, _[u] = {
3106
+ (A = _[p[c] = c] = +t(o[c], c, o)) > 0 && (f += A);
3107
+ for (e != null ? p.sort(function(O, V) {
3108
+ return e(_[O], _[V]);
3109
+ }) : n != null && p.sort(function(O, V) {
3110
+ return n(o[O], o[V]);
3111
+ }), c = 0, h = f ? (K - l * k) / f : 0; c < l; ++c, j = T)
3112
+ u = p[c], A = _[u], T = j + (A > 0 ? A * h : 0) + k, _[u] = {
3113
3113
  data: o[u],
3114
3114
  index: c,
3115
- value: k,
3116
- startAngle: L,
3117
- endAngle: R,
3118
- padAngle: V
3115
+ value: A,
3116
+ startAngle: j,
3117
+ endAngle: T,
3118
+ padAngle: q
3119
3119
  };
3120
3120
  return _;
3121
3121
  }
@@ -3221,14 +3221,14 @@ De.prototype = {
3221
3221
  };
3222
3222
  De.prototype;
3223
3223
  const Et = (t, e) => {
3224
- const n = Wt(null);
3225
- return _t(() => {
3224
+ const n = Pt(null);
3225
+ return vt(() => {
3226
3226
  e !== void 0 && n.current && t(ht(n.current));
3227
3227
  }, e === null ? void 0 : e), n;
3228
3228
  };
3229
3229
  function he() {
3230
- const t = Wt(null), [e, n] = ot({ width: 0, height: 0 });
3231
- return _t(() => {
3230
+ const t = Pt(null), [e, n] = ct({ width: 0, height: 0 });
3231
+ return vt(() => {
3232
3232
  const r = t.current;
3233
3233
  if (!r || !r.parentElement) return;
3234
3234
  const i = r.parentElement, a = () => {
@@ -3241,8 +3241,8 @@ function he() {
3241
3241
  }, []), [t, e];
3242
3242
  }
3243
3243
  function Tn() {
3244
- const [t, e] = ot(null);
3245
- return _t(() => {
3244
+ const [t, e] = ct(null);
3245
+ return vt(() => {
3246
3246
  const n = typeof document < "u" ? document.getElementById("UI-controls") : null;
3247
3247
  e(n);
3248
3248
  }, []), t;
@@ -3340,18 +3340,18 @@ const Nu = "_tooltip_vth6t_3", Su = "_title_vth6t_167", kt = {
3340
3340
  title: Su,
3341
3341
  "text-small": "_text-small_vth6t_199",
3342
3342
  "right-label": "_right-label_vth6t_227"
3343
- }, We = ({ pCount: t }) => /* @__PURE__ */ O.jsxs("div", { id: "tooltip", className: `${kt.tooltip}`, children: [
3344
- !t && /* @__PURE__ */ O.jsx("p", { className: `top-label ${kt["text-small"]}` }),
3345
- t === 2 && /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
3346
- /* @__PURE__ */ O.jsx("p", { className: `top-label ${kt["text-small"]}` }),
3347
- /* @__PURE__ */ O.jsx("p", { className: `bottom-label ${kt["text-small"]}` })
3343
+ }, We = ({ pCount: t }) => /* @__PURE__ */ H.jsxs("div", { id: "tooltip", className: `${kt.tooltip}`, children: [
3344
+ !t && /* @__PURE__ */ H.jsx("p", { className: `top-label ${kt["text-small"]}` }),
3345
+ t === 2 && /* @__PURE__ */ H.jsxs(H.Fragment, { children: [
3346
+ /* @__PURE__ */ H.jsx("p", { className: `top-label ${kt["text-small"]}` }),
3347
+ /* @__PURE__ */ H.jsx("p", { className: `bottom-label ${kt["text-small"]}` })
3348
3348
  ] }),
3349
- /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
3350
- /* @__PURE__ */ O.jsx("p", { className: `title ${kt.title}` }),
3351
- /* @__PURE__ */ O.jsx("p", { className: `top-label ${kt["right-label"]}` }),
3352
- /* @__PURE__ */ O.jsx("p", { className: `bottom-label ${kt["right-label"]}` })
3349
+ /* @__PURE__ */ H.jsxs(H.Fragment, { children: [
3350
+ /* @__PURE__ */ H.jsx("p", { className: `title ${kt.title}` }),
3351
+ /* @__PURE__ */ H.jsx("p", { className: `top-label ${kt["right-label"]}` }),
3352
+ /* @__PURE__ */ H.jsx("p", { className: `bottom-label ${kt["right-label"]}` })
3353
3353
  ] }),
3354
- t === 4 && /* @__PURE__ */ O.jsx("p", { className: `small-text ${kt["right-label"]} ${kt["small-text"]}` })
3354
+ t === 4 && /* @__PURE__ */ H.jsx("p", { className: `small-text ${kt["right-label"]} ${kt["small-text"]}` })
3355
3355
  ] }), Ye = (t, e = "tooltip") => t.select(`#${e}`).style("pointer-events", "none").style("position", "fixed").style("left", "auto").style("top", "auto").style("bottom", "auto").style("right", "auto").style("padding", "8px 5px").style("max-width", "200px").style("opacity", 0);
3356
3356
  function Rn(t, e) {
3357
3357
  const { e: n, svg: r, yScale: i } = e, { pixelY: a } = Au(n, r, i), s = a < 100 ? "bottom" : "top", { offsetWidth: o, offsetHeight: c } = t.node() || {}, l = typeof document < "u" ? document.documentElement.clientWidth : 0, u = n.x - o / 2;
@@ -3359,8 +3359,8 @@ function Rn(t, e) {
3359
3359
  if (u < 0)
3360
3360
  h = 0;
3361
3361
  else if (u + o > l) {
3362
- const d = u + o - l;
3363
- h = u - d;
3362
+ const p = u + o - l;
3363
+ h = u - p;
3364
3364
  } else
3365
3365
  h = u;
3366
3366
  const f = s === "top" ? kt["tooltip--arrow-down"] : kt["tooltip--arrow-up"];
@@ -3381,7 +3381,7 @@ function ei(t, e) {
3381
3381
  s = a;
3382
3382
  e.style("left", s + "px").attr("class", `${kt.tooltip} ${kt["tooltip--arrow-down"]}`).style("top", t.y - (r + 10) + "px");
3383
3383
  }
3384
- const Vt = "#d1d5db", Mu = "_disabled_6kkmf_99", tt = {
3384
+ const Ft = "#d1d5db", Mu = "_disabled_6kkmf_99", et = {
3385
3385
  "controls-container": "_controls-container_6kkmf_1",
3386
3386
  "controls-container-sm": "_controls-container-sm_6kkmf_1",
3387
3387
  "fill-container": "_fill-container_6kkmf_39",
@@ -3394,8 +3394,8 @@ const Vt = "#d1d5db", Mu = "_disabled_6kkmf_99", tt = {
3394
3394
  axisText: Ru,
3395
3395
  "value-axis": "_value-axis_1tba7_21"
3396
3396
  }, Ae = (t) => {
3397
- const e = Wt([]);
3398
- return _t(() => {
3397
+ const e = Pt([]);
3398
+ return vt(() => {
3399
3399
  const n = e.current;
3400
3400
  if (t.length === 0) {
3401
3401
  e.current = [];
@@ -3427,128 +3427,128 @@ function wf({
3427
3427
  formatType: s = "long"
3428
3428
  } = { prefix: "", suffix: "", formatType: "long" }
3429
3429
  }) {
3430
- const [o, c] = he(), { width: l, height: u } = c, [h, f] = ot(!1), d = Ae(t.map((k) => k.label)), _ = Tn(), L = l > 576, K = /* @__PURE__ */ O.jsx(
3430
+ const [o, c] = he(), { width: l, height: u } = c, [h, f] = ct(!1), p = Ae(t.map((A) => A.label)), _ = Tn(), j = l > 576, K = /* @__PURE__ */ H.jsx(
3431
3431
  "div",
3432
3432
  {
3433
3433
  id: "controls",
3434
- className: `${tt[L ? "controls-container" : "controls-container-sm"]} ${_ ? tt["fill-container"] : ""}`,
3435
- children: /* @__PURE__ */ O.jsxs("label", { className: tt["controls-label"], children: [
3436
- /* @__PURE__ */ O.jsx(
3434
+ className: `${et[j ? "controls-container" : "controls-container-sm"]} ${_ ? et["fill-container"] : ""}`,
3435
+ children: /* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], children: [
3436
+ /* @__PURE__ */ H.jsx(
3437
3437
  "input",
3438
3438
  {
3439
3439
  type: "checkbox",
3440
- className: tt["controls-checkbox"],
3440
+ className: et["controls-checkbox"],
3441
3441
  checked: h,
3442
- onChange: (k) => f(k.target.checked)
3442
+ onChange: (A) => f(A.target.checked)
3443
3443
  }
3444
3444
  ),
3445
3445
  "Sort"
3446
3446
  ] })
3447
3447
  }
3448
- ), R = { idx: e, type: n }, V = 750, S = Et((k) => {
3448
+ ), T = { idx: e, type: n }, q = 750, k = Et((A) => {
3449
3449
  if (l === 0 || u === 0) return;
3450
- const q = {
3450
+ const O = {
3451
3451
  top: 20,
3452
3452
  right: 30,
3453
3453
  bottom: r === "vertical" ? 50 : 30,
3454
3454
  left: r === "vertical" ? 25 : 50
3455
- }, U = h ? Mt(t).sort((x, T) => T.value - x.value) : Mt(t), J = k.select("svg"), F = J.node(), W = J.select(".plot-area").attr("transform", "translate(" + q.left + "," + q.top + ")"), et = Ye(k).style("opacity", 0), j = L ? en.axisText : en.rotatedAxisText, E = l - q.left - q.right, v = u - q.top - q.bottom, z = $e().domain(U.map((x) => x.label)).rangeRound(r === "vertical" ? [0, E] : [v, 0]).paddingInner(L ? 0.4 : 0.25).paddingOuter(0.1), p = le().domain([0, Yt(U, (x) => x.value) ?? 0]).rangeRound(r === "vertical" ? [v, 0] : [0, E]), C = r === "vertical" ? Gt(z).tickValues(z.domain()).scale(z).tickSizeOuter(0) : Gt(p).ticks(5, "s").tickSizeOuter(0).tickSize(-v);
3456
- W.select(".x-axis").attr("transform", `translate(0, ${v})`).transition().duration(V).call(C).selectAll("text").attr("class", j);
3457
- const M = r === "vertical" ? Zt(p).ticks(5, "s").tickSize(-E) : Zt(z).tickSizeOuter(0);
3458
- W.select(".y-axis").attr("transform", "translate(0, 0)").transition().duration(V).call(M);
3459
- const A = (x) => {
3460
- const { idx: T, type: y } = R, I = d.current.findIndex((P) => P === x.label);
3461
- return xe(y === "fixed" ? T : T + I);
3455
+ }, V = h ? Mt(t).sort((x, S) => S.value - x.value) : Mt(t), J = A.select("svg"), Z = J.node(), W = J.select(".plot-area").attr("transform", "translate(" + O.left + "," + O.top + ")"), B = Ye(A).style("opacity", 0), C = j ? en.axisText : en.rotatedAxisText, L = l - O.left - O.right, w = u - O.top - O.bottom, E = $e().domain(V.map((x) => x.label)).rangeRound(r === "vertical" ? [0, L] : [w, 0]).paddingInner(j ? 0.4 : 0.25).paddingOuter(0.1), d = le().domain([0, Yt(V, (x) => x.value) ?? 0]).rangeRound(r === "vertical" ? [w, 0] : [0, L]), R = r === "vertical" ? Gt(E).tickValues(E.domain()).scale(E).tickSizeOuter(0) : Gt(d).ticks(5, "s").tickSizeOuter(0).tickSize(-w);
3456
+ W.select(".x-axis").attr("transform", `translate(0, ${w})`).transition().duration(q).call(R).selectAll("text").attr("class", C);
3457
+ const M = r === "vertical" ? Zt(d).ticks(5, "s").tickSize(-L) : Zt(E).tickSizeOuter(0);
3458
+ W.select(".y-axis").attr("transform", "translate(0, 0)").transition().duration(q).call(M);
3459
+ const N = (x) => {
3460
+ const { idx: S, type: m } = T, D = p.current.findIndex((P) => P === x.label);
3461
+ return xe(m === "fixed" ? S : S + D);
3462
3462
  };
3463
- W.selectAll(".bar").data(U, (x) => x.label).join(
3464
- (x) => x.append("rect").attr("class", "bar").attr("x", function(T) {
3465
- return r === "vertical" ? z(T.label) ?? 0 : p(0);
3466
- }).attr("width", function(T) {
3467
- return r === "vertical" ? z.bandwidth() : 0;
3468
- }).attr("y", function(T) {
3469
- return r === "vertical" ? p(0) : z(T.label) ?? 0;
3463
+ W.selectAll(".bar").data(V, (x) => x.label).join(
3464
+ (x) => x.append("rect").attr("class", "bar").attr("x", function(S) {
3465
+ return r === "vertical" ? E(S.label) ?? 0 : d(0);
3466
+ }).attr("width", function(S) {
3467
+ return r === "vertical" ? E.bandwidth() : 0;
3468
+ }).attr("y", function(S) {
3469
+ return r === "vertical" ? d(0) : E(S.label) ?? 0;
3470
3470
  }).attr("height", function() {
3471
- return r === "vertical" ? 0 : z.bandwidth();
3472
- }).attr("fill", A).transition().duration(V).attr("y", function(T) {
3473
- return r === "vertical" ? p(T.value) : z(T.label) ?? 0;
3474
- }).attr("width", function(T) {
3475
- return r === "vertical" ? z.bandwidth() : p(T.value);
3476
- }).attr("height", function(T) {
3477
- return r === "vertical" ? p(0) - p(T.value) : z.bandwidth();
3471
+ return r === "vertical" ? 0 : E.bandwidth();
3472
+ }).attr("fill", N).transition().duration(q).attr("y", function(S) {
3473
+ return r === "vertical" ? d(S.value) : E(S.label) ?? 0;
3474
+ }).attr("width", function(S) {
3475
+ return r === "vertical" ? E.bandwidth() : d(S.value);
3476
+ }).attr("height", function(S) {
3477
+ return r === "vertical" ? d(0) - d(S.value) : E.bandwidth();
3478
3478
  }),
3479
3479
  void 0,
3480
- (x) => x.transition().duration(V).attr("fill", Vt).attr("height", 0).attr("y", u).style("opacity", 0).remove()
3480
+ (x) => x.transition().duration(q).attr("fill", Ft).attr("height", 0).attr("y", u).style("opacity", 0).remove()
3481
3481
  ).on(
3482
3482
  "mouseover",
3483
- (x, T) => {
3484
- W.selectAll("rect.bar").filter((y) => y.label === T.label).style("stroke", "#71717a").style("stroke-width", 1), et.style("opacity", 1).select("p").text(T.label + ` :
3483
+ (x, S) => {
3484
+ W.selectAll("rect.bar").filter((m) => m.label === S.label).style("stroke", "#71717a").style("stroke-width", 1), B.style("opacity", 1).select("p").text(S.label + ` :
3485
3485
  ${i}
3486
- ${fe(s === "long" ? "," : "~s")(T.value)}
3487
- ${a}`), ht(".x-axis").selectAll("text").filter((y) => y === T.label).style("font-weight", "bold");
3486
+ ${fe(s === "long" ? "," : "~s")(S.value)}
3487
+ ${a}`), ht(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "bold");
3488
3488
  }
3489
- ).on("mousemove", (x, T) => {
3490
- Rn(et, { e: x, svg: F, yScale: p });
3489
+ ).on("mousemove", (x, S) => {
3490
+ Rn(B, { e: x, svg: Z, yScale: d });
3491
3491
  }).on(
3492
3492
  "mouseout",
3493
- (x, T) => {
3494
- W.selectAll("rect.bar").filter((y) => y.label === T.label).style("stroke", "none").style("stroke-width", 0), et.style("opacity", 0), ht(".x-axis").selectAll("text").filter((y) => y === T.label).style("font-weight", "normal");
3493
+ (x, S) => {
3494
+ W.selectAll("rect.bar").filter((m) => m.label === S.label).style("stroke", "none").style("stroke-width", 0), B.style("opacity", 0), ht(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "normal");
3495
3495
  }
3496
- ).transition().duration(V).attr("fill", A).attr("x", function(x) {
3497
- return r === "vertical" ? z(x.label) ?? 0 : p(0);
3496
+ ).transition().duration(q).attr("fill", N).attr("x", function(x) {
3497
+ return r === "vertical" ? E(x.label) ?? 0 : d(0);
3498
3498
  }).attr("width", function(x) {
3499
- return r === "vertical" ? z.bandwidth() : p(x.value);
3499
+ return r === "vertical" ? E.bandwidth() : d(x.value);
3500
3500
  }).attr("y", function(x) {
3501
- return r === "vertical" ? p(x.value) : z(x.label) ?? 0;
3501
+ return r === "vertical" ? d(x.value) : E(x.label) ?? 0;
3502
3502
  }).attr("height", function(x) {
3503
- return r === "vertical" ? p(0) - p(x.value) : z.bandwidth();
3503
+ return r === "vertical" ? d(0) - d(x.value) : E.bandwidth();
3504
3504
  });
3505
- }, [t, R, l, u, h, r, { prefix: i, suffix: a, formatType: s }]);
3506
- return /* @__PURE__ */ O.jsxs(
3505
+ }, [t, T, l, u, h, r, { prefix: i, suffix: a, formatType: s }]);
3506
+ return /* @__PURE__ */ H.jsxs(
3507
3507
  "div",
3508
3508
  {
3509
3509
  ref: o,
3510
3510
  style: { width: l, height: u, display: "flex", flexDirection: "column" },
3511
3511
  children: [
3512
3512
  _ && kn(K, _),
3513
- /* @__PURE__ */ O.jsxs(
3513
+ /* @__PURE__ */ H.jsxs(
3514
3514
  "div",
3515
3515
  {
3516
- ref: S,
3517
- className: `${tt["fill-container"]}`,
3516
+ ref: k,
3517
+ className: `${et["fill-container"]}`,
3518
3518
  style: { display: "flex", flexDirection: "column", position: "relative" },
3519
3519
  children: [
3520
- /* @__PURE__ */ O.jsx(
3520
+ /* @__PURE__ */ H.jsx(
3521
3521
  "svg",
3522
3522
  {
3523
- className: `${tt["chart-svg"]} ${tt["fill-container"]}`,
3523
+ className: `${et["chart-svg"]} ${et["fill-container"]}`,
3524
3524
  style: {},
3525
3525
  viewBox: `0 0 ${l} ${u}`,
3526
- children: /* @__PURE__ */ O.jsxs("g", { className: "plot-area", children: [
3527
- /* @__PURE__ */ O.jsx("g", { className: `${r === "vertical" ? en["value-axis"] : ""} y-axis` }),
3528
- /* @__PURE__ */ O.jsx("g", { className: `${r === "horizontal" ? en["value-axis"] : ""} x-axis` })
3526
+ children: /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
3527
+ /* @__PURE__ */ H.jsx("g", { className: `${r === "vertical" ? en["value-axis"] : ""} y-axis` }),
3528
+ /* @__PURE__ */ H.jsx("g", { className: `${r === "horizontal" ? en["value-axis"] : ""} x-axis` })
3529
3529
  ] })
3530
3530
  }
3531
3531
  ),
3532
- !_ && /* @__PURE__ */ O.jsxs(
3532
+ !_ && /* @__PURE__ */ H.jsxs(
3533
3533
  "label",
3534
3534
  {
3535
- className: tt["controls-label"],
3535
+ className: et["controls-label"],
3536
3536
  style: { position: "absolute", right: "12px", top: "6px" },
3537
3537
  children: [
3538
- /* @__PURE__ */ O.jsx(
3538
+ /* @__PURE__ */ H.jsx(
3539
3539
  "input",
3540
3540
  {
3541
3541
  type: "checkbox",
3542
- className: tt["controls-checkbox"],
3542
+ className: et["controls-checkbox"],
3543
3543
  checked: h,
3544
- onChange: (k) => f(k.target.checked)
3544
+ onChange: (A) => f(A.target.checked)
3545
3545
  }
3546
3546
  ),
3547
3547
  "Sort"
3548
3548
  ]
3549
3549
  }
3550
3550
  ),
3551
- /* @__PURE__ */ O.jsx(We, {})
3551
+ /* @__PURE__ */ H.jsx(We, {})
3552
3552
  ]
3553
3553
  }
3554
3554
  )
@@ -3557,8 +3557,8 @@ function wf({
3557
3557
  );
3558
3558
  }
3559
3559
  function ce() {
3560
- const t = Wt(null), [e, n] = ot({ width: 0, height: 0 });
3561
- return _t(() => {
3560
+ const t = Pt(null), [e, n] = ct({ width: 0, height: 0 });
3561
+ return vt(() => {
3562
3562
  const r = t.current;
3563
3563
  if (!r) return;
3564
3564
  const i = new ResizeObserver(([a]) => {
@@ -3592,109 +3592,109 @@ const Eu = "_legend_7ftsg_1", Cu = "_pieSlice_7ftsg_77", Lu = "_pieSliceNotHover
3592
3592
  pieLabelExit: qu
3593
3593
  };
3594
3594
  function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r = 0 }) {
3595
- const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { width: u, height: h } = l, f = Ae(t.map((J) => J.label)), [d, _] = ot([]), [L, K] = ot(!1), [R, V] = ot(""), S = 750, k = Et((J) => {
3596
- const W = (n && L ? Mt(t).sort((j, E) => j.value - E.value) : t).map((j) => j.label);
3597
- J.selectAll(".legend-item").data([...W], (j) => j).join(
3598
- (j) => {
3599
- const E = j.append("div").attr("class", function(v) {
3600
- return `${jt[v === R ? "legend-active" : "legend"]} legend-item`;
3601
- }).style("left", "-10px").style("top", function(v, z) {
3602
- return `${z * 20 + 10}px`;
3595
+ const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { width: u, height: h } = l, f = Ae(t.map((J) => J.label)), [p, _] = ct([]), [j, K] = ct(!1), [T, q] = ct(""), k = 750, A = Et((J) => {
3596
+ const W = (n && j ? Mt(t).sort((C, L) => C.value - L.value) : t).map((C) => C.label);
3597
+ J.selectAll(".legend-item").data([...W], (C) => C).join(
3598
+ (C) => {
3599
+ const L = C.append("div").attr("class", function(w) {
3600
+ return `${jt[w === T ? "legend-active" : "legend"]} legend-item`;
3601
+ }).style("left", "-10px").style("top", function(w, E) {
3602
+ return `${E * 20 + 10}px`;
3603
3603
  }).style("opacity", 0);
3604
- return E.append("div").attr("class", `rect ${jt["legend-rect"]}`).style("background-color", (v) => xe(f.current.findIndex((z) => z === v) + r)), E.append("span").attr("class", jt["legend-label"]).style("color", (v) => "#333").text((v) => v), E.transition().duration(S).style("left", "6px").style("opacity", 1), E;
3604
+ return L.append("div").attr("class", `rect ${jt["legend-rect"]}`).style("background-color", (w) => xe(f.current.findIndex((E) => E === w) + r)), L.append("span").attr("class", jt["legend-label"]).style("color", (w) => "#333").text((w) => w), L.transition().duration(k).style("left", "6px").style("opacity", 1), L;
3605
3605
  },
3606
- (j) => (j.attr("class", (E) => `
3607
- ${jt[E === R ? "legend-active" : "legend"]} legend-item`).transition().duration(S).style("top", function(E, v) {
3608
- return `${v * 20 + 10}px`;
3609
- }).style("left", "6px").style("opacity", 1).select("div.rect").attr("class", `rect ${jt["legend-rect"]}`).style("background-color", (E) => xe(f.current.findIndex((v) => v === E) + r)), j.select("span").style("color", (E) => "#333").text((E) => E), j),
3610
- (j) => j.transition().duration(S).style("opacity", 0).style("left", "30px").remove()
3611
- ).on("mouseover", (j, E) => {
3612
- V(E);
3606
+ (C) => (C.attr("class", (L) => `
3607
+ ${jt[L === T ? "legend-active" : "legend"]} legend-item`).transition().duration(k).style("top", function(L, w) {
3608
+ return `${w * 20 + 10}px`;
3609
+ }).style("left", "6px").style("opacity", 1).select("div.rect").attr("class", `rect ${jt["legend-rect"]}`).style("background-color", (L) => xe(f.current.findIndex((w) => w === L) + r)), C.select("span").style("color", (L) => "#333").text((L) => L), C),
3610
+ (C) => C.transition().duration(k).style("opacity", 0).style("left", "30px").remove()
3611
+ ).on("mouseover", (C, L) => {
3612
+ q(L);
3613
3613
  }).on("mouseout", () => {
3614
- V("");
3614
+ q("");
3615
3615
  });
3616
- }, [t, r, u, h, R, L, n]), q = Et((J) => {
3616
+ }, [t, r, u, h, T, j, n]), O = Et((J) => {
3617
3617
  if (u === 0 || h === 0) return;
3618
- const F = { x: u / 2, y: h / 2 }, W = { top: 10, right: 20, bottom: 10, left: 20 }, et = t, j = u - (W.left + W.right), E = h - (W.top + W.bottom), v = Math.min(j, E) / 2, z = et.reduce(($, Q) => $ + Q.value, 0), p = J.select(".plot-area").attr("transform", "translate(" + F.x + "," + F.y + ")"), C = bu().value(function($) {
3619
- return $.value;
3620
- }).sort(function($, Q) {
3621
- return L ? je($.value, Q.value) : 0;
3622
- }), M = Mt(et), A = C(M), x = Mt(M);
3623
- _(C(x));
3624
- let T = x.length > M.length;
3625
- const y = d.map(($) => $.data.label), I = A.map(($) => $.data.label);
3626
- y.every(($) => T ? !1 : I.includes($) ? !0 : (T = !0, !1));
3627
- const P = d.length === 0, Z = Qr().innerRadius(e * v).outerRadius(v - 12), m = Qr().innerRadius(e * v).outerRadius(v), g = ($, Q) => {
3618
+ const Z = { x: u / 2, y: h / 2 }, W = { top: 10, right: 20, bottom: 10, left: 20 }, B = t, C = u - (W.left + W.right), L = h - (W.top + W.bottom), w = Math.min(C, L) / 2, E = B.reduce((v, U) => v + U.value, 0), d = J.select(".plot-area").attr("transform", "translate(" + Z.x + "," + Z.y + ")"), R = bu().value(function(v) {
3619
+ return v.value;
3620
+ }).sort(function(v, U) {
3621
+ return j ? je(v.value, U.value) : 0;
3622
+ }), M = Mt(B), N = R(M), x = Mt(M);
3623
+ _(R(x));
3624
+ let S = x.length > M.length;
3625
+ const m = p.map((v) => v.data.label), D = N.map((v) => v.data.label);
3626
+ m.every((v) => S ? !1 : D.includes(v) ? !0 : (S = !0, !1));
3627
+ const P = p.length === 0, Q = Qr().innerRadius(e * w).outerRadius(w - 12), tt = Qr().innerRadius(e * w).outerRadius(w), z = (v, U) => {
3628
3628
  const nt = Jt(
3629
- Q === "exit" ? $.endAngle : $.startAngle,
3630
- Q === "exit" ? $.startAngle : $.endAngle
3631
- ), lt = $.data.label === R;
3632
- return function(ct) {
3633
- return $.endAngle = nt(ct), lt ? m($) || "" : Z($) || "";
3629
+ U === "exit" ? v.endAngle : v.startAngle,
3630
+ U === "exit" ? v.startAngle : v.endAngle
3631
+ ), ot = v.data.label === T;
3632
+ return function(lt) {
3633
+ return v.endAngle = nt(lt), ot ? tt(v) || "" : Q(v) || "";
3634
3634
  };
3635
3635
  };
3636
- p.selectAll("path").data(A, function($) {
3637
- return $.data.label;
3636
+ d.selectAll("path").data(N, function(v) {
3637
+ return v.data.label;
3638
3638
  }).join(
3639
- ($) => {
3640
- const Q = $.append("path").attr("class", jt.pieSlice).attr("fill", function(nt) {
3641
- const lt = f.current.findIndex((ct) => ct === nt.data.label) + r;
3642
- return xe(lt);
3639
+ (v) => {
3640
+ const U = v.append("path").attr("class", jt.pieSlice).attr("fill", function(nt) {
3641
+ const ot = f.current.findIndex((lt) => lt === nt.data.label) + r;
3642
+ return xe(ot);
3643
3643
  });
3644
- return Q.transition().duration(S).delay(P ? 0 : S).attr("d", Z).attrTween("d", function(nt) {
3644
+ return U.transition().duration(k).delay(P ? 0 : k).attr("d", Q).attrTween("d", function(nt) {
3645
3645
  if (!P)
3646
- return g(nt, "not exit");
3647
- const lt = Jt(0, nt.startAngle), ct = Jt(0, nt.endAngle), pt = nt.data.label === R;
3646
+ return z(nt, "not exit");
3647
+ const ot = Jt(0, nt.startAngle), lt = Jt(0, nt.endAngle), pt = nt.data.label === T;
3648
3648
  return function(ft) {
3649
- return nt.startAngle = lt(ft), nt.endAngle = ct(ft), pt ? m(nt) : Z(nt);
3649
+ return nt.startAngle = ot(ft), nt.endAngle = lt(ft), pt ? tt(nt) : Q(nt);
3650
3650
  };
3651
- }), Q;
3651
+ }), U;
3652
3652
  },
3653
- ($) => {
3654
- const Q = $;
3655
- return $.transition().duration(S).attr("fill", function(nt, lt) {
3656
- const ct = f.current.findIndex((pt) => pt === nt.data.label) + r;
3657
- return xe(ct);
3653
+ (v) => {
3654
+ const U = v;
3655
+ return v.transition().duration(k).attr("fill", function(nt, ot) {
3656
+ const lt = f.current.findIndex((pt) => pt === nt.data.label) + r;
3657
+ return xe(lt);
3658
3658
  }).attrTween("d", function(nt) {
3659
- const lt = d.find((Ht) => Ht.data.label === nt.data.label), ct = lt && lt.startAngle ? lt.startAngle : 0, pt = Jt(ct, nt.startAngle), ft = lt && lt.endAngle ? lt.endAngle : 0, ut = Jt(ft, nt.endAngle), vt = nt.data.label === R;
3660
- return function(Ht) {
3661
- return nt.startAngle = pt(Ht), nt.endAngle = ut(Ht), vt ? m(nt) || "" : Z(nt) || "";
3659
+ const ot = p.find((Ot) => Ot.data.label === nt.data.label), lt = ot && ot.startAngle ? ot.startAngle : 0, pt = Jt(lt, nt.startAngle), ft = ot && ot.endAngle ? ot.endAngle : 0, ut = Jt(ft, nt.endAngle), _t = nt.data.label === T;
3660
+ return function(Ot) {
3661
+ return nt.startAngle = pt(Ot), nt.endAngle = ut(Ot), _t ? tt(nt) || "" : Q(nt) || "";
3662
3662
  };
3663
- }), Q;
3663
+ }), U;
3664
3664
  },
3665
- ($) => $.attr("class", jt.pieSliceExit).transition().duration(S).attr("fill", Vt).attrTween("d", function(Q) {
3666
- return g(Q, "exit");
3665
+ (v) => v.attr("class", jt.pieSliceExit).transition().duration(k).attr("fill", Ft).attrTween("d", function(U) {
3666
+ return z(U, "exit");
3667
3667
  }).remove()
3668
- ).on("mouseover", function($, Q) {
3669
- V(Q.data.label);
3668
+ ).on("mouseover", function(v, U) {
3669
+ q(U.data.label);
3670
3670
  }).on("mouseout", () => {
3671
- V("");
3671
+ q("");
3672
3672
  });
3673
- const w = ($) => et.length === 1 ? "translate(0, 0)" : `translate(${Z.centroid($)})`, N = ($) => {
3674
- const Q = $.value / z;
3675
- return fe(".1%")(Q);
3673
+ const y = (v) => B.length === 1 ? "translate(0, 0)" : `translate(${Q.centroid(v)})`, b = (v) => {
3674
+ const U = v.value / E;
3675
+ return fe(".1%")(U);
3676
3676
  };
3677
- p.selectAll("text").data(A, function($) {
3678
- return $.data.label;
3677
+ d.selectAll("text").data(N, function(v) {
3678
+ return v.data.label;
3679
3679
  }).join(
3680
- ($) => {
3681
- const Q = $.append("text").text(N).attr("class", jt.pieLabelEnter);
3682
- return Q.merge(Q).transition().duration(S).delay(
3683
- S
3680
+ (v) => {
3681
+ const U = v.append("text").text(b).attr("class", jt.pieLabelEnter);
3682
+ return U.merge(U).transition().duration(k).delay(
3683
+ k
3684
3684
  /* + exitDelay*/
3685
- ).attr("transform", w), Q;
3685
+ ).attr("transform", y), U;
3686
3686
  },
3687
- ($) => {
3688
- const Q = $.text(N);
3689
- return $.merge(Q).attr("class", jt.pieLabelUpdate).transition().duration(R !== "" ? 250 : S).style("opacity", function(nt) {
3690
- const lt = R === nt.data.label;
3691
- return R === "" || lt ? 1 : 0;
3692
- }).attr("transform", w), Q;
3687
+ (v) => {
3688
+ const U = v.text(b);
3689
+ return v.merge(U).attr("class", jt.pieLabelUpdate).transition().duration(T !== "" ? 250 : k).style("opacity", function(nt) {
3690
+ const ot = T === nt.data.label;
3691
+ return T === "" || ot ? 1 : 0;
3692
+ }).attr("transform", y), U;
3693
3693
  },
3694
- ($) => $.transition().duration(S / 2).attr("class", jt.pieLabelExit).remove()
3694
+ (v) => v.transition().duration(k / 2).attr("class", jt.pieLabelExit).remove()
3695
3695
  );
3696
- }, [t, r, e, u, h, L, R]), U = s > o;
3697
- return /* @__PURE__ */ O.jsxs(
3696
+ }, [t, r, e, u, h, j, T]), V = s > o;
3697
+ return /* @__PURE__ */ H.jsxs(
3698
3698
  "div",
3699
3699
  {
3700
3700
  ref: i,
@@ -3703,11 +3703,11 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3703
3703
  height: o,
3704
3704
  position: "relative",
3705
3705
  display: "flex",
3706
- flexDirection: U ? "row" : "column",
3706
+ flexDirection: V ? "row" : "column",
3707
3707
  overflow: "hidden"
3708
3708
  },
3709
3709
  children: [
3710
- /* @__PURE__ */ O.jsx(
3710
+ /* @__PURE__ */ H.jsx(
3711
3711
  "div",
3712
3712
  {
3713
3713
  ref: c,
@@ -3716,34 +3716,34 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3716
3716
  position: "relative",
3717
3717
  display: "flex"
3718
3718
  },
3719
- children: /* @__PURE__ */ O.jsx(
3719
+ children: /* @__PURE__ */ H.jsx(
3720
3720
  "svg",
3721
3721
  {
3722
- ref: q,
3723
- className: `${tt["chart-svg"]} ${tt["fill-container"]}`,
3722
+ ref: O,
3723
+ className: `${et["chart-svg"]} ${et["fill-container"]}`,
3724
3724
  viewBox: `0 0 ${u} ${h}`,
3725
- children: /* @__PURE__ */ O.jsx("g", { className: "plot-area" })
3725
+ children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
3726
3726
  }
3727
3727
  )
3728
3728
  }
3729
3729
  ),
3730
- /* @__PURE__ */ O.jsx(
3730
+ /* @__PURE__ */ H.jsx(
3731
3731
  "div",
3732
3732
  {
3733
3733
  style: {
3734
- width: U ? s > 480 ? "180px" : "100px" : "100%",
3735
- height: U ? "100%" : o > 400 ? "180px" : "100px",
3734
+ width: V ? s > 480 ? "180px" : "100px" : "100%",
3735
+ height: V ? "100%" : o > 400 ? "180px" : "100px",
3736
3736
  flexShrink: 0,
3737
3737
  overflowY: "auto",
3738
3738
  background: "rgba(255, 255, 255)",
3739
- borderLeft: U ? "1px solid #ddd" : "none",
3740
- borderTop: U ? "none" : "1px solid #ddd",
3739
+ borderLeft: V ? "1px solid #ddd" : "none",
3740
+ borderTop: V ? "none" : "1px solid #ddd",
3741
3741
  padding: "0px"
3742
3742
  },
3743
- children: /* @__PURE__ */ O.jsx(
3743
+ children: /* @__PURE__ */ H.jsx(
3744
3744
  "div",
3745
3745
  {
3746
- ref: k,
3746
+ ref: A,
3747
3747
  className: "legends-content",
3748
3748
  style: {
3749
3749
  display: "flex",
@@ -3757,18 +3757,18 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3757
3757
  )
3758
3758
  }
3759
3759
  ),
3760
- /* @__PURE__ */ O.jsxs(
3760
+ /* @__PURE__ */ H.jsxs(
3761
3761
  "label",
3762
3762
  {
3763
- className: tt["controls-label"],
3763
+ className: et["controls-label"],
3764
3764
  style: { position: "absolute", left: "12px", top: "6px" },
3765
3765
  children: [
3766
- /* @__PURE__ */ O.jsx(
3766
+ /* @__PURE__ */ H.jsx(
3767
3767
  "input",
3768
3768
  {
3769
3769
  type: "checkbox",
3770
- className: tt["controls-checkbox"],
3771
- checked: L,
3770
+ className: et["controls-checkbox"],
3771
+ checked: j,
3772
3772
  onChange: (J) => K(J.target.checked)
3773
3773
  }
3774
3774
  ),
@@ -3780,7 +3780,7 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3780
3780
  }
3781
3781
  );
3782
3782
  }
3783
- const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHovered_aemvq_297", Yu = "_legend_aemvq_1", Xu = "_rectHoveredLegend_aemvq_333", Bu = "_rectCardLegendHovered_aemvq_343", Ku = "_rectLegendHovered_aemvq_355", Uu = "_rotatedAxisText_aemvq_377", Ju = "_axisText_aemvq_387", Gu = "_hoveredAxisText_aemvq_397", Zu = "_yAxisLabel_aemvq_411", rt = {
3783
+ const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHovered_aemvq_297", Yu = "_legend_aemvq_1", Bu = "_rectHoveredLegend_aemvq_333", Xu = "_rectCardLegendHovered_aemvq_343", Ku = "_rectLegendHovered_aemvq_355", Uu = "_rotatedAxisText_aemvq_377", Ju = "_axisText_aemvq_387", Gu = "_hoveredAxisText_aemvq_397", Zu = "_yAxisLabel_aemvq_411", rt = {
3784
3784
  "legends-container": "_legends-container_aemvq_1",
3785
3785
  "legend-container": "_legend-container_aemvq_61",
3786
3786
  "legend-container-active": "_legend-container-active_aemvq_61",
@@ -3794,8 +3794,8 @@ const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHo
3794
3794
  rectCard: Fu,
3795
3795
  rectLegendNotHovered: Wu,
3796
3796
  legend: Yu,
3797
- rectHoveredLegend: Xu,
3798
- rectCardLegendHovered: Bu,
3797
+ rectHoveredLegend: Bu,
3798
+ rectCardLegendHovered: Xu,
3799
3799
  rectLegendHovered: Ku,
3800
3800
  rotatedAxisText: Uu,
3801
3801
  axisText: Ju,
@@ -3804,109 +3804,109 @@ const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHo
3804
3804
  "value-axis": "_value-axis_aemvq_421"
3805
3805
  };
3806
3806
  function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "vertical", tooltipFormat: i }) {
3807
- const [a, s] = he(), { width: o, height: c } = s, [l, u] = ce(), { height: h } = u, [f, d] = ce(), { width: _, height: L } = d, [K, R] = ot(null), [V, S] = ot(!1), [k, q] = ot(["all"]), [U, J] = ot(!1), [F, W] = ot(""), [et, j] = ot(!1), E = Tn(), v = t;
3808
- _t(() => {
3809
- q(["all"]), S(!0);
3810
- }, [v]), _t(() => {
3811
- q(["all"]);
3807
+ const [a, s] = he(), { width: o, height: c } = s, [l, u] = ce(), { height: h } = u, [f, p] = ce(), { width: _, height: j } = p, [K, T] = ct(null), [q, k] = ct(!1), [A, O] = ct(["all"]), [V, J] = ct(!1), [Z, W] = ct(""), [B, C] = ct(!1), L = Tn(), w = t;
3808
+ vt(() => {
3809
+ O(["all"]), k(!0);
3810
+ }, [w]), vt(() => {
3811
+ O(["all"]);
3812
3812
  }, [e]);
3813
- const z = 750;
3814
- _t(() => {
3813
+ const E = 750;
3814
+ vt(() => {
3815
3815
  let P;
3816
- return V && (P = setTimeout(() => {
3817
- S(!1);
3818
- }, z + 500)), () => {
3816
+ return q && (P = setTimeout(() => {
3817
+ k(!1);
3818
+ }, E + 500)), () => {
3819
3819
  clearTimeout(P);
3820
3820
  };
3821
- }, [V]);
3822
- const p = [_, L, k, n, e], C = Mt(v), M = C.length === 0 ? [] : Object.keys(C[0]).filter((P) => P !== "label" && P !== "total"), A = Ae(M), x = _ > 576, T = Et((P) => {
3823
- if (V)
3821
+ }, [q]);
3822
+ const d = [_, j, A, n, e], R = Mt(w), M = R.length === 0 ? [] : Object.keys(R[0]).filter((P) => P !== "label" && P !== "total"), N = Ae(M), x = _ > 576, S = Et((P) => {
3823
+ if (q)
3824
3824
  return;
3825
- const Y = x ? 80 : 50, Z = function(g) {
3826
- const D = rt[x ? "legend-container" : "legend-container-sm"], w = rt[x ? "legend-container-active" : "legend-container-active-sm"], N = rt[x ? "legend-container-inactive" : "legend-container-inactive-sm"];
3825
+ const F = x ? 80 : 50, Q = function(z) {
3826
+ const g = rt[x ? "legend-container" : "legend-container-sm"], y = rt[x ? "legend-container-active" : "legend-container-active-sm"], b = rt[x ? "legend-container-inactive" : "legend-container-inactive-sm"];
3827
3827
  return `
3828
- ${k.includes(g) ? e ? w : N : D}
3828
+ ${A.includes(z) ? e ? y : b : g}
3829
3829
  legend-item
3830
3830
  `;
3831
3831
  };
3832
- P.selectAll(".legend-item").data([...M], (g) => g).join(
3833
- (g) => {
3834
- const D = g.append("div").attr("class", Z).style("left", (w, N) => `${N * Y}px`).style("top", "-53px").style("opacity", 0);
3835
- return D.append("div").attr("class", rt["legend-rect"]).style("background", (w) => {
3836
- if (!e && k.includes(w))
3837
- return Vt;
3838
- const N = A.current.findIndex(($) => $ === w) + n;
3839
- return xt(N);
3840
- }), D.append("span").attr("class", rt["legend-label"]).style("color", (w) => !e && k.includes(w) ? "#d1d5db" : "#333").text((w) => w), D.transition().duration(z).style("top", "0px").style("opacity", 1), D;
3832
+ P.selectAll(".legend-item").data([...M], (z) => z).join(
3833
+ (z) => {
3834
+ const g = z.append("div").attr("class", Q).style("left", (y, b) => `${b * F}px`).style("top", "-53px").style("opacity", 0);
3835
+ return g.append("div").attr("class", rt["legend-rect"]).style("background", (y) => {
3836
+ if (!e && A.includes(y))
3837
+ return Ft;
3838
+ const b = N.current.findIndex((v) => v === y) + n;
3839
+ return xt(b);
3840
+ }), g.append("span").attr("class", rt["legend-label"]).style("color", (y) => !e && A.includes(y) ? "#d1d5db" : "#333").text((y) => y), g.transition().duration(E).style("top", "0px").style("opacity", 1), g;
3841
3841
  },
3842
- (g) => (g.attr("class", Z).transition().duration(z).style("top", "0px").style("left", (D, w) => `${w * Y}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (D) => {
3843
- if (!e && k.includes(D))
3844
- return Vt;
3845
- const w = A.current.findIndex((N) => N === D) + n;
3846
- return xt(w);
3847
- }), g.select(`.${rt["legend-label"]}`).style("color", (D) => !e && k.includes(D) ? Vt : "#333").text((D) => D), g),
3848
- (g) => g.style("color", Vt).transition().duration(z).style("opacity", 0).style("top", "53px").remove()
3849
- ).on("mouseover", function(g, D) {
3850
- V || W(D);
3851
- }).on("mouseout", function(g, D) {
3852
- V || (W(""), U && J(!1));
3853
- }).on("click", (g, D) => {
3854
- q((w) => {
3855
- let N = [];
3856
- return e ? w[0] === D ? N = ["all"] : N = [D] : w.includes(D) ? N = w.filter(($) => $ !== D) : N = [...w, D], N;
3842
+ (z) => (z.attr("class", Q).transition().duration(E).style("top", "0px").style("left", (g, y) => `${y * F}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (g) => {
3843
+ if (!e && A.includes(g))
3844
+ return Ft;
3845
+ const y = N.current.findIndex((b) => b === g) + n;
3846
+ return xt(y);
3847
+ }), z.select(`.${rt["legend-label"]}`).style("color", (g) => !e && A.includes(g) ? Ft : "#333").text((g) => g), z),
3848
+ (z) => z.style("color", Ft).transition().duration(E).style("opacity", 0).style("top", "53px").remove()
3849
+ ).on("mouseover", function(z, g) {
3850
+ q || W(g);
3851
+ }).on("mouseout", function(z, g) {
3852
+ q || (W(""), V && J(!1));
3853
+ }).on("click", (z, g) => {
3854
+ O((y) => {
3855
+ let b = [];
3856
+ return e ? y[0] === g ? b = ["all"] : b = [g] : y.includes(g) ? b = y.filter((v) => v !== g) : b = [...y, g], b;
3857
3857
  }), J(!0);
3858
3858
  });
3859
- }, [...p, M, V]), y = /* @__PURE__ */ O.jsxs(
3859
+ }, [...d, M, q]), m = /* @__PURE__ */ H.jsxs(
3860
3860
  "div",
3861
3861
  {
3862
3862
  ref: l,
3863
- className: `${tt[x ? "controls-container" : "controls-container-sm"]} ${E ? tt["fill-container"] : ""}`,
3863
+ className: `${et[x ? "controls-container" : "controls-container-sm"]} ${L ? et["fill-container"] : ""}`,
3864
3864
  children: [
3865
- /* @__PURE__ */ O.jsxs("label", { className: tt["controls-label"], style: { paddingRight: "12px" }, children: [
3866
- /* @__PURE__ */ O.jsx(
3865
+ /* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], style: { paddingRight: "12px" }, children: [
3866
+ /* @__PURE__ */ H.jsx(
3867
3867
  "input",
3868
3868
  {
3869
3869
  type: "checkbox",
3870
- className: tt["controls-checkbox"],
3871
- checked: et,
3872
- onChange: (P) => j(P.target.checked)
3870
+ className: et["controls-checkbox"],
3871
+ checked: B,
3872
+ onChange: (P) => C(P.target.checked)
3873
3873
  }
3874
3874
  ),
3875
3875
  "Sort"
3876
3876
  ] }),
3877
- /* @__PURE__ */ O.jsx(
3877
+ /* @__PURE__ */ H.jsx(
3878
3878
  "div",
3879
3879
  {
3880
- ref: T,
3880
+ ref: S,
3881
3881
  id: "stacked-barchart-legends",
3882
3882
  className: `${rt["legends-container"]}`
3883
3883
  }
3884
3884
  )
3885
3885
  ]
3886
3886
  }
3887
- ), I = Et((P) => {
3888
- if (_ === 0 || L === 0 || F !== "" && V) return;
3889
- const Y = { top: 20, right: 20, bottom: 30, left: 40 }, Z = e ? M : M.filter((b) => !k.includes(b));
3890
- C.forEach((b) => {
3891
- const G = Z.reduce((B, gt) => {
3892
- const bt = b[gt];
3893
- return B + (typeof bt == "number" ? bt : 0);
3887
+ ), D = Et((P) => {
3888
+ if (_ === 0 || j === 0 || Z !== "" && q) return;
3889
+ const F = { top: 20, right: 20, bottom: 30, left: 40 }, Q = e ? M : M.filter(($) => !A.includes($));
3890
+ R.forEach(($) => {
3891
+ const G = Q.reduce((X, gt) => {
3892
+ const bt = $[gt];
3893
+ return X + (typeof bt == "number" ? bt : 0);
3894
3894
  }, 0);
3895
- b.total = G;
3895
+ $.total = G;
3896
3896
  });
3897
- const m = C, g = et ? Mt(m).sort(function(b, G) {
3898
- return e ? k[0] === "all" ? b.total - G.total : Number(b[k[0]]) - Number(G[k[0]]) : b.total - G.total;
3899
- }) : m, D = _ - Y.left - Y.right, w = L - Y.top - Y.bottom, N = P.select("svg"), $ = N.node(), Q = N.select(".plot-area").attr("transform", "translate(" + Y.left + "," + Y.top + ")"), nt = Ye(P).style("opacity", 0);
3900
- let lt = !1;
3901
- K === null && (lt = !0, R(Mt(C)));
3902
- const ct = g.map(function(b) {
3903
- return b.label;
3904
- }), pt = $e().domain(ct).rangeRound(r === "vertical" ? [0, D] : [w, 0]).paddingInner(x ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), ft = e ? k[0] === "all" ? Yt(C, (b) => b.total) : Yt(C, (b) => b[k[0]]) : Yt(C, (b) => b.total), ut = le().domain([0, ft ?? 0]).range(r === "vertical" ? [w, 0] : [0, D]), vt = !x && r === "vertical" ? rt.rotatedAxisText : rt.axisText, Ht = [], Xe = r === "vertical" ? Gt(pt).tickValues(pt.domain()).tickSizeOuter(0) : Gt(ut).ticks(4, "s").tickSizeOuter(0).tickSize(-w);
3905
- Q.select(".x-axis").attr("transform", `translate(0,${w})`).transition().duration(z).call(Xe).selectAll("text").style("cursor", "pointer").attr("dy", x ? "1em" : ".20em").attr("dx", x ? "0em" : "-.8em").attr("class", vt).selectAll(".tick").filter((b) => b === 0).select("line").remove();
3906
- const de = r === "vertical" ? Zt(ut).ticks(4, "s").tickSize(-D) : Zt(pt).tickSizeOuter(0);
3907
- Q.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(lt ? 0 : z).call(de).selectAll(".tick").filter((b) => b === 0).select("line").remove();
3908
- const Qt = bn().keys(Z)(g).map((b) => {
3909
- const G = b.key, B = b.map((gt) => {
3897
+ const tt = R, z = B ? Mt(tt).sort(function($, G) {
3898
+ return e ? A[0] === "all" ? $.total - G.total : Number($[A[0]]) - Number(G[A[0]]) : $.total - G.total;
3899
+ }) : tt, g = _ - F.left - F.right, y = j - F.top - F.bottom, b = P.select("svg"), v = b.node(), U = b.select(".plot-area").attr("transform", "translate(" + F.left + "," + F.top + ")"), nt = Ye(P).style("opacity", 0);
3900
+ let ot = !1;
3901
+ K === null && (ot = !0, T(Mt(R)));
3902
+ const lt = z.map(function($) {
3903
+ return $.label;
3904
+ }), pt = $e().domain(lt).rangeRound(r === "vertical" ? [0, g] : [y, 0]).paddingInner(x ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), ft = e ? A[0] === "all" ? Yt(R, ($) => $.total) : Yt(R, ($) => $[A[0]]) : Yt(R, ($) => $.total), ut = le().domain([0, ft ?? 0]).range(r === "vertical" ? [y, 0] : [0, g]), _t = !x && r === "vertical" ? rt.rotatedAxisText : rt.axisText, Ot = [], Be = r === "vertical" ? Gt(pt).tickValues(pt.domain()).tickSizeOuter(0) : Gt(ut).ticks(4, "s").tickSizeOuter(0).tickSize(-y);
3905
+ U.select(".x-axis").attr("transform", `translate(0,${y})`).transition().duration(E).call(Be).selectAll("text").style("cursor", "pointer").attr("dy", x ? "1em" : ".20em").attr("dx", x ? "0em" : "-.8em").attr("class", _t).selectAll(".tick").filter(($) => $ === 0).select("line").remove();
3906
+ const de = r === "vertical" ? Zt(ut).ticks(4, "s").tickSize(-g) : Zt(pt).tickSizeOuter(0);
3907
+ U.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(ot ? 0 : E).call(de).selectAll(".tick").filter(($) => $ === 0).select("line").remove();
3908
+ const Qt = bn().keys(Q)(z).map(($) => {
3909
+ const G = $.key, X = $.map((gt) => {
3910
3910
  const bt = gt.data.label;
3911
3911
  return {
3912
3912
  ...gt,
@@ -3914,122 +3914,122 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
3914
3914
  barKey: G
3915
3915
  };
3916
3916
  });
3917
- return B.key = G, B;
3918
- }), Bt = Q.selectAll(".serie").data(Qt, (b) => b.key).join(
3919
- (b) => b.append("g").attr("class", "serie").attr("fill", (B) => {
3920
- const gt = A.current.findIndex((Ne) => Ne === B.key) + n;
3917
+ return X.key = G, X;
3918
+ }), Xt = U.selectAll(".serie").data(Qt, ($) => $.key).join(
3919
+ ($) => $.append("g").attr("class", "serie").attr("fill", (X) => {
3920
+ const gt = N.current.findIndex((Ne) => Ne === X.key) + n;
3921
3921
  return xt(gt);
3922
- }).style("opacity", (B) => {
3923
- if (F !== "")
3922
+ }).style("opacity", (X) => {
3923
+ if (Z !== "")
3924
3924
  if (e) {
3925
- if (k[0] === "all")
3926
- return B.key === F || U ? 1 : 0.25;
3925
+ if (A[0] === "all")
3926
+ return X.key === Z || V ? 1 : 0.25;
3927
3927
  } else
3928
- return U ? 1 : B.key === F ? 0.25 : 1;
3929
- return e ? k[0] === "all" || B.key === k[0] ? 1 : 0 : 1;
3930
- }).style("pointer-events", (B) => e ? k[0] === "all" || B.key === k[0] ? "auto" : "none" : "auto"),
3931
- (b) => b.transition().duration(z).attr("fill", (B) => {
3932
- const gt = A.current.findIndex((Ne) => Ne === B.key) + n;
3928
+ return V ? 1 : X.key === Z ? 0.25 : 1;
3929
+ return e ? A[0] === "all" || X.key === A[0] ? 1 : 0 : 1;
3930
+ }).style("pointer-events", (X) => e ? A[0] === "all" || X.key === A[0] ? "auto" : "none" : "auto"),
3931
+ ($) => $.transition().duration(E).attr("fill", (X) => {
3932
+ const gt = N.current.findIndex((Ne) => Ne === X.key) + n;
3933
3933
  return xt(gt);
3934
- }).style("opacity", (B) => {
3935
- if (F !== "")
3934
+ }).style("opacity", (X) => {
3935
+ if (Z !== "")
3936
3936
  if (e) {
3937
- if (k[0] === "all")
3938
- return B.key === F || U ? 1 : 0.25;
3937
+ if (A[0] === "all")
3938
+ return X.key === Z || V ? 1 : 0.25;
3939
3939
  } else
3940
- return U ? 1 : B.key === F ? 0.25 : 1;
3941
- return e ? k[0] === "all" || B.key === k[0] ? 1 : 0 : 1;
3942
- }).style("pointer-events", (B) => e ? k[0] === "all" || B.key === k[0] ? "auto" : "none" : "auto"),
3943
- (b) => b.transition().duration(z).attr("fill", Vt).style("opacity", 0).selectAll("rect").attr("y", w).attr("height", 0).remove()
3944
- ), Kt = (b) => pt(b.data.label + "") ?? 0, Ut = pt.bandwidth(), Ot = (b) => {
3945
- const G = r === "vertical" ? w : D;
3946
- return lt ? 0 : k[0] === "all" ? ut(r === "vertical" ? b[1] : b[0]) : (
3940
+ return V ? 1 : X.key === Z ? 0.25 : 1;
3941
+ return e ? A[0] === "all" || X.key === A[0] ? 1 : 0 : 1;
3942
+ }).style("pointer-events", (X) => e ? A[0] === "all" || X.key === A[0] ? "auto" : "none" : "auto"),
3943
+ ($) => $.transition().duration(E).attr("fill", Ft).style("opacity", 0).selectAll("rect").attr("y", y).attr("height", 0).remove()
3944
+ ), Kt = ($) => pt($.data.label + "") ?? 0, Ut = pt.bandwidth(), qt = ($) => {
3945
+ const G = r === "vertical" ? y : g;
3946
+ return ot ? 0 : A[0] === "all" ? ut(r === "vertical" ? $[1] : $[0]) : (
3947
3947
  /*d.key.startsWith(plotted)
3948
3948
  ?*/
3949
- e && r !== "vertical" ? ut(0) : G - (ut(b[0]) - ut(b[1]))
3949
+ e && r !== "vertical" ? ut(0) : G - (ut($[0]) - ut($[1]))
3950
3950
  );
3951
- }, Lt = (b) => {
3952
- const G = r === "vertical" ? ut(b[0]) - ut(b[1]) : ut(b[1]) - ut(b[0]);
3951
+ }, Lt = ($) => {
3952
+ const G = r === "vertical" ? ut($[0]) - ut($[1]) : ut($[1]) - ut($[0]);
3953
3953
  return isNaN(G) || G < 0 ? 0 : G;
3954
- }, Tt = (b) => r === "vertical" ? Kt(b) : Ot(b), $t = (b) => r === "vertical" ? Ut : Lt(b), X = (b) => r === "vertical" ? Ot(b) : Kt(b), it = (b) => r === "vertical" ? Lt(b) : Ut, st = (b) => {
3955
- if (b.barKey === F)
3954
+ }, Tt = ($) => r === "vertical" ? Kt($) : qt($), $t = ($) => r === "vertical" ? Ut : Lt($), Y = ($) => r === "vertical" ? qt($) : Kt($), it = ($) => r === "vertical" ? Lt($) : Ut, st = ($) => {
3955
+ if ($.barKey === Z)
3956
3956
  return "none";
3957
- const G = $t(b), B = it(b);
3958
- return Z.indexOf(b.barKey) === Z.length - 1 || b.barKey === k[0] ? r === "vertical" ? `${G + B} ${G} ${B}` : `${G + B + G}` : r === "vertical" ? `${B} ${G}` : `${G} ${B}`;
3959
- }, H = (b) => {
3960
- const G = $t(b), B = Z.indexOf(b.barKey) === Z.length - 1 || b.barKey === k[0];
3961
- return r === "vertical" ? B ? 0 : G * -1 : 0;
3962
- }, at = (b) => F !== "" && F === b.barKey && e ? `rect ${rt.rectLegendHovered}` : `rect ${rt.rect}`;
3963
- Bt.selectAll("rect").data(
3964
- (b) => b,
3957
+ const G = $t($), X = it($);
3958
+ return Q.indexOf($.barKey) === Q.length - 1 || $.barKey === A[0] ? r === "vertical" ? `${G + X} ${G} ${X}` : `${G + X + G}` : r === "vertical" ? `${X} ${G}` : `${G} ${X}`;
3959
+ }, I = ($) => {
3960
+ const G = $t($), X = Q.indexOf($.barKey) === Q.length - 1 || $.barKey === A[0];
3961
+ return r === "vertical" ? X ? 0 : G * -1 : 0;
3962
+ }, at = ($) => Z !== "" && Z === $.barKey && e ? `rect ${rt.rectLegendHovered}` : `rect ${rt.rect}`;
3963
+ Xt.selectAll("rect").data(
3964
+ ($) => $,
3965
3965
  // each group binds its stacked points
3966
- (b) => b.data.label
3966
+ ($) => $.data.label
3967
3967
  // unique key per bar
3968
3968
  ).join(
3969
- (b) => b.append("rect").attr("class", `rect ${tt.rect}`).attr("x", function(B) {
3970
- return r === "vertical" ? Tt(B) : ut(0);
3971
- }).attr("width", function(B) {
3972
- return r === "vertical" ? $t(B) : 0;
3973
- }).attr("y", (B) => {
3969
+ ($) => $.append("rect").attr("class", `rect ${et.rect}`).attr("x", function(X) {
3970
+ return r === "vertical" ? Tt(X) : ut(0);
3971
+ }).attr("width", function(X) {
3972
+ return r === "vertical" ? $t(X) : 0;
3973
+ }).attr("y", (X) => {
3974
3974
  if (r === "vertical") {
3975
- if (!Ht.includes(B.data.label)) return w;
3976
- const gt = k[0] === "all" ? ut(B[1]) : B.key.startsWith(k[0]) ? w - (ut(B[0]) - ut(B[1])) : ut(B[1]), bt = ut(B[0]) - ut(B[1]), Ne = isNaN(bt) || bt < 0 ? 0 : bt, ia = gt + Ne;
3977
- return lt ? w - (Y.bottom + Y.top) : ia;
3975
+ if (!Ot.includes(X.data.label)) return y;
3976
+ const gt = A[0] === "all" ? ut(X[1]) : X.key.startsWith(A[0]) ? y - (ut(X[0]) - ut(X[1])) : ut(X[1]), bt = ut(X[0]) - ut(X[1]), Ne = isNaN(bt) || bt < 0 ? 0 : bt, ia = gt + Ne;
3977
+ return ot ? y - (F.bottom + F.top) : ia;
3978
3978
  } else
3979
- return X(B);
3980
- }).attr("height", function(B) {
3981
- return r === "vertical" ? 0 : it(B);
3982
- }).attr("stroke-dasharray", st).attr("stroke-dashoffset", H).transition().duration(z).attr("x", Tt).attr("width", $t).attr("height", it).attr("y", X),
3979
+ return Y(X);
3980
+ }).attr("height", function(X) {
3981
+ return r === "vertical" ? 0 : it(X);
3982
+ }).attr("stroke-dasharray", st).attr("stroke-dashoffset", I).transition().duration(E).attr("x", Tt).attr("width", $t).attr("height", it).attr("y", Y),
3983
3983
  void 0,
3984
3984
  // no custom update handler
3985
- (b) => b.transition().duration(z).attr("opacity", 0).attr("y", w).attr("height", 0).remove()
3986
- ).attr("class", at).attr("stroke-dasharray", st).attr("stroke-dashoffset", H).transition().duration(z).attr("x", Tt).attr("width", $t).attr("height", it).attr("y", X).on("start", function() {
3985
+ ($) => $.transition().duration(E).attr("opacity", 0).attr("y", y).attr("height", 0).remove()
3986
+ ).attr("class", at).attr("stroke-dasharray", st).attr("stroke-dashoffset", I).transition().duration(E).attr("x", Tt).attr("width", $t).attr("height", it).attr("y", Y).on("start", function() {
3987
3987
  }).on("end", function() {
3988
- }), Bt.selectAll("rect").on("mouseover", function(b, G) {
3989
- ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((bt) => bt === G.data.label).attr("class", (r === "vertical" ? vt : "") + " " + rt.hoveredAxisText), nt.style("opacity", 1).select("p.title").text(G.data.label);
3990
- const B = G.data[G.barKey], { total: gt } = G.data;
3991
- nt.select("p.top-label").text(G.barKey + " : " + St(B, i)), nt.select("p.bottom-label").text(k[0] === "all" ? `Total : ${St(gt, i)}` : "~");
3992
- }).on("touch", function(b, G) {
3993
- ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((B) => B === G.data.label);
3994
- }).on("mousemove", (b, G) => {
3995
- Rn(nt, { e: b, svg: $, yScale: ut });
3996
- }).on("mouseout", function(b, G) {
3997
- ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((B) => B === G.data.label).attr("class", r === "vertical" ? vt : ""), nt.style("opacity", 0);
3988
+ }), Xt.selectAll("rect").on("mouseover", function($, G) {
3989
+ ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((bt) => bt === G.data.label).attr("class", (r === "vertical" ? _t : "") + " " + rt.hoveredAxisText), nt.style("opacity", 1).select("p.title").text(G.data.label);
3990
+ const X = G.data[G.barKey], { total: gt } = G.data;
3991
+ nt.select("p.top-label").text(G.barKey + " : " + St(X, i)), nt.select("p.bottom-label").text(A[0] === "all" ? `Total : ${St(gt, i)}` : "~");
3992
+ }).on("touch", function($, G) {
3993
+ ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label);
3994
+ }).on("mousemove", ($, G) => {
3995
+ Rn(nt, { e: $, svg: v, yScale: ut });
3996
+ }).on("mouseout", function($, G) {
3997
+ ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label).attr("class", r === "vertical" ? _t : ""), nt.style("opacity", 0);
3998
3998
  });
3999
- }, [...p, et, C, M, F, U, V, r, i]);
4000
- return /* @__PURE__ */ O.jsxs(
3999
+ }, [...d, B, R, M, Z, V, q, r, i]);
4000
+ return /* @__PURE__ */ H.jsxs(
4001
4001
  "div",
4002
4002
  {
4003
4003
  ref: a,
4004
4004
  style: { width: `${o}px`, height: `${c}px`, display: "flex", flexDirection: "column" },
4005
4005
  children: [
4006
- E ? kn(y, E) : y,
4007
- /* @__PURE__ */ O.jsx(
4006
+ L ? kn(m, L) : m,
4007
+ /* @__PURE__ */ H.jsx(
4008
4008
  "div",
4009
4009
  {
4010
4010
  ref: f,
4011
- className: `${tt["fill-container"]}`,
4011
+ className: `${et["fill-container"]}`,
4012
4012
  style: { display: "flex", flexDirection: "column" },
4013
- children: /* @__PURE__ */ O.jsxs(
4013
+ children: /* @__PURE__ */ H.jsxs(
4014
4014
  "div",
4015
4015
  {
4016
- ref: I,
4017
- className: `${tt["fill-container"]}`,
4016
+ ref: D,
4017
+ className: `${et["fill-container"]}`,
4018
4018
  style: { display: "flex", flexDirection: "column" },
4019
4019
  children: [
4020
- /* @__PURE__ */ O.jsx(
4020
+ /* @__PURE__ */ H.jsx(
4021
4021
  "svg",
4022
4022
  {
4023
- className: `${tt["chart-svg"]} ${tt["fill-container"]}`,
4024
- viewBox: `0 0 ${_} ${L}`,
4025
- children: _ > 0 && /* @__PURE__ */ O.jsxs("g", { className: "plot-area", children: [
4026
- /* @__PURE__ */ O.jsx("g", { className: "plot-rects" }),
4027
- /* @__PURE__ */ O.jsx("g", { className: `${r === "vertical" ? rt["value-axis"] : ""} y-axis` }),
4028
- /* @__PURE__ */ O.jsx("g", { className: `${r === "horizontal" ? rt["value-axis"] : ""} x-axis` })
4023
+ className: `${et["chart-svg"]} ${et["fill-container"]}`,
4024
+ viewBox: `0 0 ${_} ${j}`,
4025
+ children: _ > 0 && /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
4026
+ /* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
4027
+ /* @__PURE__ */ H.jsx("g", { className: `${r === "vertical" ? rt["value-axis"] : ""} y-axis` }),
4028
+ /* @__PURE__ */ H.jsx("g", { className: `${r === "horizontal" ? rt["value-axis"] : ""} x-axis` })
4029
4029
  ] })
4030
4030
  }
4031
4031
  ),
4032
- /* @__PURE__ */ O.jsx(We, { pCount: 3 })
4032
+ /* @__PURE__ */ H.jsx(We, { pCount: 3 })
4033
4033
  ]
4034
4034
  }
4035
4035
  )
@@ -4040,68 +4040,68 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
4040
4040
  );
4041
4041
  }
4042
4042
  function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipFormat: r }) {
4043
- const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: d, height: _ } = f, [L, K] = ot(null), [R, V] = ot(!1), [S, k] = ot("all"), [q, U] = ot(!1), [J, F] = ot(""), [W, et] = ot(!1), j = Tn(), E = t;
4044
- _t(() => {
4045
- k("all"), V(!0), et(!1);
4046
- }, [E]);
4047
- const v = 750;
4048
- _t(() => {
4049
- let I;
4050
- return R && (I = setTimeout(() => {
4051
- V(!1);
4052
- }, v + 500)), () => {
4053
- clearTimeout(I);
4043
+ const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: _ } = f, [j, K] = ct(null), [T, q] = ct(!1), [k, A] = ct("all"), [O, V] = ct(!1), [J, Z] = ct(""), [W, B] = ct(!1), C = Tn(), L = t;
4044
+ vt(() => {
4045
+ A("all"), q(!0), B(!1);
4046
+ }, [L]);
4047
+ const w = 750;
4048
+ vt(() => {
4049
+ let D;
4050
+ return T && (D = setTimeout(() => {
4051
+ q(!1);
4052
+ }, w + 500)), () => {
4053
+ clearTimeout(D);
4054
4054
  };
4055
- }, [R]);
4056
- const z = [d, _, S, e], p = Mt(E), C = p.length === 0 ? [] : Object.keys(p[0]).filter((I) => I !== "label" && I !== "total"), M = Ae(C), A = d > 576, x = Et((I) => {
4057
- if (R) return;
4058
- const P = A ? 80 : 50, Y = function(m) {
4059
- const g = rt[A ? "legend-container" : "legend-container-sm"], D = rt[A ? "legend-container-active" : "legend-container-active-sm"], w = rt[A ? "legend-container-inactive" : "legend-container-inactive-sm"];
4055
+ }, [T]);
4056
+ const E = [p, _, k, e], d = Mt(L), R = d.length === 0 ? [] : Object.keys(d[0]).filter((D) => D !== "label" && D !== "total"), M = Ae(R), N = p > 576, x = Et((D) => {
4057
+ if (T) return;
4058
+ const P = N ? 80 : 50, F = function(tt) {
4059
+ const z = rt[N ? "legend-container" : "legend-container-sm"], g = rt[N ? "legend-container-active" : "legend-container-active-sm"], y = rt[N ? "legend-container-inactive" : "legend-container-inactive-sm"];
4060
4060
  return `
4061
- ${S.includes(m) ? S === m ? D : w : g}
4061
+ ${k.includes(tt) ? k === tt ? g : y : z}
4062
4062
  legend-item
4063
4063
  `;
4064
4064
  };
4065
- I.selectAll(".legend-item").data([...C], (m) => m).join(
4066
- (m) => {
4067
- const g = m.append("div").attr("class", Y).style("left", (D, w) => `${w * P}px`).style("top", "-53px").style("opacity", 0);
4068
- return g.append("div").attr("class", rt["legend-rect"]).style("background", (D) => {
4069
- const w = M.current.findIndex((N) => N === D) + e;
4070
- return xt(w);
4071
- }), g.append("span").attr("class", rt["legend-label"]).text((D) => D), g.transition().duration(v).style("top", "0px").style("opacity", 1), g;
4065
+ D.selectAll(".legend-item").data([...R], (tt) => tt).join(
4066
+ (tt) => {
4067
+ const z = tt.append("div").attr("class", F).style("left", (g, y) => `${y * P}px`).style("top", "-53px").style("opacity", 0);
4068
+ return z.append("div").attr("class", rt["legend-rect"]).style("background", (g) => {
4069
+ const y = M.current.findIndex((b) => b === g) + e;
4070
+ return xt(y);
4071
+ }), z.append("span").attr("class", rt["legend-label"]).text((g) => g), z.transition().duration(w).style("top", "0px").style("opacity", 1), z;
4072
4072
  },
4073
- (m) => (m.attr("class", Y).transition().duration(v).style("top", "0px").style("left", (g, D) => `${D * P}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (g) => {
4074
- const D = M.current.findIndex((w) => w === g) + e;
4075
- return xt(D);
4076
- }), m.select(`.${rt["legend-label"]}`).text((g) => g), m),
4077
- (m) => m.transition().duration(v).style("opacity", 0).style("top", "53px").remove().remove()
4078
- ).on("click", (m, g) => {
4079
- k((D) => D === g ? (et(!1), "all") : g);
4080
- }).on("mouseover", (m, g) => {
4081
- F(g);
4082
- }).on("mouseout", (m, g) => {
4083
- F("");
4073
+ (tt) => (tt.attr("class", F).transition().duration(w).style("top", "0px").style("left", (z, g) => `${g * P}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (z) => {
4074
+ const g = M.current.findIndex((y) => y === z) + e;
4075
+ return xt(g);
4076
+ }), tt.select(`.${rt["legend-label"]}`).text((z) => z), tt),
4077
+ (tt) => tt.transition().duration(w).style("opacity", 0).style("top", "53px").remove().remove()
4078
+ ).on("click", (tt, z) => {
4079
+ A((g) => g === z ? (B(!1), "all") : z);
4080
+ }).on("mouseover", (tt, z) => {
4081
+ Z(z);
4082
+ }).on("mouseout", (tt, z) => {
4083
+ Z("");
4084
4084
  });
4085
- }, [...z, C, R]), T = /* @__PURE__ */ O.jsxs(
4085
+ }, [...E, R, T]), S = /* @__PURE__ */ H.jsxs(
4086
4086
  "div",
4087
4087
  {
4088
4088
  ref: c,
4089
- className: `${tt[A ? "controls-container" : "controls-container-sm"]} ${j ? tt["fill-container"] : ""}`,
4089
+ className: `${et[N ? "controls-container" : "controls-container-sm"]} ${C ? et["fill-container"] : ""}`,
4090
4090
  children: [
4091
- /* @__PURE__ */ O.jsxs("label", { className: `${tt["controls-label"]} ${S === "all" ? tt.disabled : ""}`, style: { paddingRight: "12px" }, children: [
4092
- /* @__PURE__ */ O.jsx(
4091
+ /* @__PURE__ */ H.jsxs("label", { className: `${et["controls-label"]} ${k === "all" ? et.disabled : ""}`, style: { paddingRight: "12px" }, children: [
4092
+ /* @__PURE__ */ H.jsx(
4093
4093
  "input",
4094
4094
  {
4095
4095
  type: "checkbox",
4096
- className: `${tt["controls-checkbox"]}`,
4096
+ className: `${et["controls-checkbox"]}`,
4097
4097
  checked: W,
4098
- onChange: (I) => et(I.target.checked),
4099
- disabled: S === "all"
4098
+ onChange: (D) => B(D.target.checked),
4099
+ disabled: k === "all"
4100
4100
  }
4101
4101
  ),
4102
4102
  "Sort"
4103
4103
  ] }),
4104
- /* @__PURE__ */ O.jsx(
4104
+ /* @__PURE__ */ H.jsx(
4105
4105
  "div",
4106
4106
  {
4107
4107
  ref: x,
@@ -4111,131 +4111,131 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4111
4111
  )
4112
4112
  ]
4113
4113
  }
4114
- ), y = Et((I) => {
4115
- if (d === 0 || _ === 0 || J !== "" && R) return;
4114
+ ), m = Et((D) => {
4115
+ if (p === 0 || _ === 0 || J !== "" && T) return;
4116
4116
  const P = { top: 20, right: 30, bottom: 30, left: 40 };
4117
- p.forEach(function(X) {
4118
- X.total = C.reduce((it, st) => {
4119
- const H = X[st];
4120
- return it + (typeof H == "number" ? H : Number(H));
4117
+ d.forEach(function(Y) {
4118
+ Y.total = R.reduce((it, st) => {
4119
+ const I = Y[st];
4120
+ return it + (typeof I == "number" ? I : Number(I));
4121
4121
  }, 0);
4122
4122
  });
4123
- const Y = p, Z = W ? Mt(Y).sort(function(X, it) {
4124
- return Number(X[S]) - Number(it[S]);
4125
- }) : Y, m = d - P.left - P.right, g = _ - P.top - P.bottom, D = I.select("svg"), w = D.node(), N = D.select(".plot-area").attr("transform", "translate(" + P.left + "," + P.top + ")"), $ = Ye(I).style("opacity", 0);
4126
- L === null && K(Mt(p));
4127
- const Q = S === "all", nt = !A && n === "vertical" ? rt.rotatedAxisText : rt.axisText, lt = Z.map(function(X) {
4128
- return X.label;
4129
- }), ct = $e().domain(lt).rangeRound(n === "vertical" ? [0, m] : [g, 0]).paddingInner(Q ? 0.15 : A ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), pt = S === "all" ? Yt(
4130
- p,
4131
- (X) => Yt(
4132
- Object.entries(X).filter(([it]) => it !== "total" && it !== "label").map(([, it]) => it)
4123
+ const F = d, Q = W ? Mt(F).sort(function(Y, it) {
4124
+ return Number(Y[k]) - Number(it[k]);
4125
+ }) : F, tt = p - P.left - P.right, z = _ - P.top - P.bottom, g = D.select("svg"), y = g.node(), b = g.select(".plot-area").attr("transform", "translate(" + P.left + "," + P.top + ")"), v = Ye(D).style("opacity", 0);
4126
+ j === null && K(Mt(d));
4127
+ const U = k === "all", nt = !N && n === "vertical" ? rt.rotatedAxisText : rt.axisText, ot = Q.map(function(Y) {
4128
+ return Y.label;
4129
+ }), lt = $e().domain(ot).rangeRound(n === "vertical" ? [0, tt] : [z, 0]).paddingInner(U ? 0.15 : N ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), pt = k === "all" ? Yt(
4130
+ d,
4131
+ (Y) => Yt(
4132
+ Object.entries(Y).filter(([it]) => it !== "total" && it !== "label").map(([, it]) => it)
4133
4133
  // value is number | string | undefined
4134
4134
  )
4135
- ) : Yt(p, (X) => X[S]), ft = le().domain([0, pt ?? 0]).range(n === "vertical" ? [g, 0] : [0, m]), ut = n === "vertical" ? Gt(ct).tickValues(ct.domain()).tickSizeOuter(0) : Gt(ft).ticks(4, "s").tickSizeOuter(0).tickSize(-g);
4136
- N.select(".x-axis").attr("transform", `translate(0,${g})`).transition().duration(v).call(ut).selectAll("text").style("cursor", "pointer").attr("dy", A ? "1em" : ".20em").attr("dx", A ? "0em" : "-.8em").attr("class", nt).selectAll(".tick").filter((X) => X === 0).select("line").remove();
4137
- const vt = n === "vertical" ? Zt(ft).ticks(4, "s").tickSize(-m) : Zt(ct).tickSizeOuter(0);
4138
- N.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(v).call(vt).selectAll(".tick").filter((X) => X === 0).select("line").remove();
4139
- const Xe = bn().keys(C)(Z).map(
4140
- (X) => {
4141
- const it = X.key, st = X.map((H) => ({
4142
- ...H,
4143
- key: `${it} - ${H.data.label}`,
4135
+ ) : Yt(d, (Y) => Y[k]), ft = le().domain([0, pt ?? 0]).range(n === "vertical" ? [z, 0] : [0, tt]), ut = n === "vertical" ? Gt(lt).tickValues(lt.domain()).tickSizeOuter(0) : Gt(ft).ticks(4, "s").tickSizeOuter(0).tickSize(-z);
4136
+ b.select(".x-axis").attr("transform", `translate(0,${z})`).transition().duration(w).call(ut).selectAll("text").style("cursor", "pointer").attr("dy", N ? "1em" : ".20em").attr("dx", N ? "0em" : "-.8em").attr("class", nt).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
4137
+ const _t = n === "vertical" ? Zt(ft).ticks(4, "s").tickSize(-tt) : Zt(lt).tickSizeOuter(0);
4138
+ b.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(w).call(_t).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
4139
+ const Be = bn().keys(R)(Q).map(
4140
+ (Y) => {
4141
+ const it = Y.key, st = Y.map((I) => ({
4142
+ ...I,
4143
+ key: `${it} - ${I.data.label}`,
4144
4144
  barKey: it
4145
4145
  }));
4146
4146
  return st.key = it, st;
4147
4147
  }
4148
- ), de = (X) => J !== "" ? `rect
4149
- ${J === X.barKey ? rt.rectLegendHovered : rt.rectLegendNotHovered}` : `rect ${rt.rect}`;
4150
- let pe = N.selectAll(".serie").data(Xe, function(X) {
4151
- return X.key;
4148
+ ), de = (Y) => J !== "" ? `rect
4149
+ ${J === Y.barKey ? rt.rectLegendHovered : rt.rectLegendNotHovered}` : `rect ${rt.rect}`;
4150
+ let pe = b.selectAll(".serie").data(Be, function(Y) {
4151
+ return Y.key;
4152
4152
  }).join(
4153
- (X) => X.append("g").attr("class", "serie").attr("fill", function(st) {
4154
- const H = M.current.findIndex((at) => at === st.key) + e;
4155
- return xt(H);
4156
- }).style("opacity", (st) => S === "all" || st.key === S ? 1 : 0).style("pointer-events", (st) => S === "all" || st.key === S ? "auto" : "none"),
4157
- (X) => X.transition().duration(v).attr("fill", function(st) {
4158
- const H = M.current.findIndex((at) => at === st.key) + e;
4159
- return xt(H);
4160
- }).style("opacity", (st) => S === "all" || st.key === S ? 1 : 0).style("pointer-events", (st) => S === "all" || st.key === S ? "auto" : "none"),
4161
- (X) => X.transition().duration(v).style("opacity", 0).attr("fill", "grey").selectAll("rect").attr("y", g).attr("height", 0).remove()
4153
+ (Y) => Y.append("g").attr("class", "serie").attr("fill", function(st) {
4154
+ const I = M.current.findIndex((at) => at === st.key) + e;
4155
+ return xt(I);
4156
+ }).style("opacity", (st) => k === "all" || st.key === k ? 1 : 0).style("pointer-events", (st) => k === "all" || st.key === k ? "auto" : "none"),
4157
+ (Y) => Y.transition().duration(w).attr("fill", function(st) {
4158
+ const I = M.current.findIndex((at) => at === st.key) + e;
4159
+ return xt(I);
4160
+ }).style("opacity", (st) => k === "all" || st.key === k ? 1 : 0).style("pointer-events", (st) => k === "all" || st.key === k ? "auto" : "none"),
4161
+ (Y) => Y.transition().duration(w).style("opacity", 0).attr("fill", "grey").selectAll("rect").attr("y", z).attr("height", 0).remove()
4162
4162
  );
4163
- const Qt = (X) => {
4164
- const it = ct(X.data.label + "") ?? 0;
4165
- if (S === "all") {
4166
- const st = C.indexOf(X.barKey) || 0;
4167
- return it + st * (ct.bandwidth() / C.length);
4163
+ const Qt = (Y) => {
4164
+ const it = lt(Y.data.label + "") ?? 0;
4165
+ if (k === "all") {
4166
+ const st = R.indexOf(Y.barKey) || 0;
4167
+ return it + st * (lt.bandwidth() / R.length);
4168
4168
  }
4169
4169
  return it;
4170
- }, Bt = () => S === "all" ? ct.bandwidth() / C.length : ct.bandwidth(), Kt = (X) => n === "vertical" ? g - (ft(X[0]) - ft(X[1])) : ft(0), Ut = (X) => {
4171
- const it = n === "vertical" ? ft(X[0]) - ft(X[1]) : ft(X[1]) - ft(X[0]);
4170
+ }, Xt = () => k === "all" ? lt.bandwidth() / R.length : lt.bandwidth(), Kt = (Y) => n === "vertical" ? z - (ft(Y[0]) - ft(Y[1])) : ft(0), Ut = (Y) => {
4171
+ const it = n === "vertical" ? ft(Y[0]) - ft(Y[1]) : ft(Y[1]) - ft(Y[0]);
4172
4172
  return isNaN(it) || it < 0 ? 0 : it;
4173
- }, Ot = (X) => n === "vertical" ? Qt(X) : Kt(X), Lt = (X) => n === "vertical" ? Bt() : Ut(X), Tt = (X) => n === "vertical" ? Kt(X) : Qt(X), $t = (X) => n === "vertical" ? Ut(X) : Bt();
4173
+ }, qt = (Y) => n === "vertical" ? Qt(Y) : Kt(Y), Lt = (Y) => n === "vertical" ? Xt() : Ut(Y), Tt = (Y) => n === "vertical" ? Kt(Y) : Qt(Y), $t = (Y) => n === "vertical" ? Ut(Y) : Xt();
4174
4174
  pe.selectAll("rect").data(
4175
- (X) => X,
4176
- (X) => X.data.label
4175
+ (Y) => Y,
4176
+ (Y) => Y.data.label
4177
4177
  ).join(
4178
- (X) => {
4178
+ (Y) => {
4179
4179
  let it;
4180
- return it = X.append("rect").attr("class", de).attr("x", function(st) {
4181
- return n === "vertical" ? Ot(st) : 0;
4180
+ return it = Y.append("rect").attr("class", de).attr("x", function(st) {
4181
+ return n === "vertical" ? qt(st) : 0;
4182
4182
  }).attr("width", function(st) {
4183
- return n === "vertical" ? S === "all" ? ct.bandwidth() / C.length : ct.bandwidth() : 0;
4183
+ return n === "vertical" ? k === "all" ? lt.bandwidth() / R.length : lt.bandwidth() : 0;
4184
4184
  }).attr("y", function(st) {
4185
- return n === "vertical" ? g : Tt(st);
4185
+ return n === "vertical" ? z : Tt(st);
4186
4186
  }).attr("height", function(st) {
4187
- return n === "vertical" ? 0 : S === "all" ? ct.bandwidth() / C.length : ct.bandwidth();
4188
- }).transition().duration(v).attr("x", Ot).attr("width", Lt).attr("height", $t).attr("y", Tt), it;
4187
+ return n === "vertical" ? 0 : k === "all" ? lt.bandwidth() / R.length : lt.bandwidth();
4188
+ }).transition().duration(w).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), it;
4189
4189
  },
4190
4190
  void 0,
4191
- (X) => X.attr("fill", Vt).transition().duration(v).attr("opacity", 0).attr("height", 0).attr("y", g + P.bottom).remove()
4192
- ).attr("class", de).transition().duration(v).attr("x", Ot).attr("width", Lt).attr("height", $t).attr("y", Tt), pe.selectAll("rect").on("mouseover", function(X, it) {
4193
- ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((b) => b === it.data.label).attr("class", (n === "vertical" ? nt : "") + " " + rt.hoveredAxisText), $.style("opacity", 1).select("p.title").text(it.data.label);
4194
- const st = it.data[it.barKey], { total: H } = it.data, at = st / H * 100;
4195
- fe(".1f")(at) + "", $.select("p.top-label").text(it.barKey + " : " + St(st, r)), $.select("p.bottom-label").text(
4196
- S === "all" ? `Total : ${St(H, r)}` : "~"
4191
+ (Y) => Y.attr("fill", Ft).transition().duration(w).attr("opacity", 0).attr("height", 0).attr("y", z + P.bottom).remove()
4192
+ ).attr("class", de).transition().duration(w).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), pe.selectAll("rect").on("mouseover", function(Y, it) {
4193
+ ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter(($) => $ === it.data.label).attr("class", (n === "vertical" ? nt : "") + " " + rt.hoveredAxisText), v.style("opacity", 1).select("p.title").text(it.data.label);
4194
+ const st = it.data[it.barKey], { total: I } = it.data, at = st / I * 100;
4195
+ fe(".1f")(at) + "", v.select("p.top-label").text(it.barKey + " : " + St(st, r)), v.select("p.bottom-label").text(
4196
+ k === "all" ? `Total : ${St(I, r)}` : "~"
4197
4197
  );
4198
- }).on("touch", function(X, it) {
4198
+ }).on("touch", function(Y, it) {
4199
4199
  ht(".x-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", nt);
4200
- }).on("mousemove", (X, it) => {
4201
- Rn($, { e: X, svg: w, yScale: ft });
4202
- }).on("mouseout", function(X, it) {
4203
- ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", n === "vertical" ? nt : ""), $.style("opacity", 0);
4200
+ }).on("mousemove", (Y, it) => {
4201
+ Rn(v, { e: Y, svg: y, yScale: ft });
4202
+ }).on("mouseout", function(Y, it) {
4203
+ ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", n === "vertical" ? nt : ""), v.style("opacity", 0);
4204
4204
  });
4205
- }, [...z, W, p, C, J, q, n, R, r]);
4206
- return /* @__PURE__ */ O.jsxs(
4205
+ }, [...E, W, d, R, J, O, n, T, r]);
4206
+ return /* @__PURE__ */ H.jsxs(
4207
4207
  "div",
4208
4208
  {
4209
4209
  ref: i,
4210
4210
  style: { width: s, height: o, display: "flex", flexDirection: "column" },
4211
4211
  children: [
4212
- j ? kn(T, j) : T,
4213
- /* @__PURE__ */ O.jsx(
4212
+ C ? kn(S, C) : S,
4213
+ /* @__PURE__ */ H.jsx(
4214
4214
  "div",
4215
4215
  {
4216
4216
  ref: h,
4217
- className: `${tt["fill-container"]}`,
4217
+ className: `${et["fill-container"]}`,
4218
4218
  style: { display: "flex", flexDirection: "column" },
4219
- children: /* @__PURE__ */ O.jsxs(
4219
+ children: /* @__PURE__ */ H.jsxs(
4220
4220
  "div",
4221
4221
  {
4222
- ref: y,
4223
- className: `${tt["fill-container"]}`,
4222
+ ref: m,
4223
+ className: `${et["fill-container"]}`,
4224
4224
  style: { display: "flex", flexDirection: "column" },
4225
4225
  children: [
4226
- /* @__PURE__ */ O.jsx(
4226
+ /* @__PURE__ */ H.jsx(
4227
4227
  "svg",
4228
4228
  {
4229
- className: `${tt["chart-svg"]} ${tt["fill-container"]}`,
4230
- viewBox: `0 0 ${d} ${_}`,
4231
- children: d > 0 && /* @__PURE__ */ O.jsxs("g", { className: "plot-area", children: [
4232
- /* @__PURE__ */ O.jsx("g", { className: "plot-rects" }),
4233
- /* @__PURE__ */ O.jsx("g", { className: `${n === "vertical" ? rt["value-axis"] : ""} y-axis` }),
4234
- /* @__PURE__ */ O.jsx("g", { className: `${n === "horizontal" ? rt["value-axis"] : ""} x-axis` })
4229
+ className: `${et["chart-svg"]} ${et["fill-container"]}`,
4230
+ viewBox: `0 0 ${p} ${_}`,
4231
+ children: p > 0 && /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
4232
+ /* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
4233
+ /* @__PURE__ */ H.jsx("g", { className: `${n === "vertical" ? rt["value-axis"] : ""} y-axis` }),
4234
+ /* @__PURE__ */ H.jsx("g", { className: `${n === "horizontal" ? rt["value-axis"] : ""} x-axis` })
4235
4235
  ] })
4236
4236
  }
4237
4237
  ),
4238
- /* @__PURE__ */ O.jsx(We, { pCount: 3 })
4238
+ /* @__PURE__ */ H.jsx(We, { pCount: 3 })
4239
4239
  ]
4240
4240
  }
4241
4241
  )
@@ -4246,203 +4246,203 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4246
4246
  );
4247
4247
  }
4248
4248
  function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipFormat: r }) {
4249
- const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: d, height: _ } = f, [L, K] = ot(""), [R, V] = ot(!0), [S, k] = ot(!1), [q, U] = ot("all"), J = Tn(), F = t;
4250
- _t(() => {
4251
- U("all"), V(!0), k(!0);
4252
- }, [F]);
4249
+ const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: _ } = f, [j, K] = ct(""), [T, q] = ct(!0), [k, A] = ct(!1), [O, V] = ct("all"), J = Tn(), Z = t;
4250
+ vt(() => {
4251
+ V("all"), q(!0), A(!0);
4252
+ }, [Z]);
4253
4253
  const W = 750;
4254
- _t(() => {
4255
- let A;
4256
- return S && (A = setTimeout(() => {
4257
- k(!1);
4254
+ vt(() => {
4255
+ let N;
4256
+ return k && (N = setTimeout(() => {
4257
+ A(!1);
4258
4258
  }, W + 500)), () => {
4259
- clearTimeout(A);
4259
+ clearTimeout(N);
4260
4260
  };
4261
- }, [S]);
4262
- const et = [d, _, q, e], j = Mt(F), E = j.length === 0 ? [] : Object.keys(j[0]).filter((A) => A !== "label" && A !== "total"), v = Ae(E), z = d > 576, p = Et((A) => {
4263
- if (S) return;
4264
- const x = z ? 80 : 50, T = function(I) {
4265
- const P = rt[z ? "legend-container" : "legend-container-sm"], Y = rt[z ? "legend-container-active" : "legend-container-active-sm"], Z = rt[z ? "legend-container-inactive" : "legend-container-inactive-sm"];
4261
+ }, [k]);
4262
+ const B = [p, _, O, e], C = Mt(Z), L = C.length === 0 ? [] : Object.keys(C[0]).filter((N) => N !== "label" && N !== "total"), w = Ae(L), E = p > 576, d = Et((N) => {
4263
+ if (k) return;
4264
+ const x = E ? 80 : 50, S = function(D) {
4265
+ const P = rt[E ? "legend-container" : "legend-container-sm"], F = rt[E ? "legend-container-active" : "legend-container-active-sm"], Q = rt[E ? "legend-container-inactive" : "legend-container-inactive-sm"];
4266
4266
  return `
4267
- ${q.includes(I) ? q === I ? Y : Z : P}
4267
+ ${O.includes(D) ? O === D ? F : Q : P}
4268
4268
  legend-item
4269
4269
  `;
4270
4270
  };
4271
- A.selectAll(".legend-item").data([...E], (I) => I).join(
4272
- (I) => {
4273
- const P = I.append("div").attr("class", T).style("left", (Y, Z) => `${Z * x}px`).style("top", "-53px").style("opacity", 0);
4274
- return P.append("div").attr("class", rt["legend-rect"]).style("background", (Y) => {
4275
- const Z = v.current.findIndex((m) => m === Y) + e;
4276
- return xt(Z);
4277
- }), P.append("span").attr("class", rt["legend-label"]).text((Y) => Y), P.transition().duration(W).style("top", "0px").style("opacity", 1), P;
4271
+ N.selectAll(".legend-item").data([...L], (D) => D).join(
4272
+ (D) => {
4273
+ const P = D.append("div").attr("class", S).style("left", (F, Q) => `${Q * x}px`).style("top", "-53px").style("opacity", 0);
4274
+ return P.append("div").attr("class", rt["legend-rect"]).style("background", (F) => {
4275
+ const Q = w.current.findIndex((tt) => tt === F) + e;
4276
+ return xt(Q);
4277
+ }), P.append("span").attr("class", rt["legend-label"]).text((F) => F), P.transition().duration(W).style("top", "0px").style("opacity", 1), P;
4278
4278
  },
4279
- (I) => (I.attr("class", T).transition().duration(W).style("top", "0px").style("left", (P, Y) => `${Y * x}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (P) => {
4280
- const Y = v.current.findIndex((Z) => Z === P) + e;
4281
- return xt(Y);
4282
- }), I.select(`.${rt["legend-label"]}`).text((P) => P), I),
4283
- (I) => I.transition().duration(W).style("opacity", 0).style("top", "53px").remove().remove().remove()
4284
- ).on("mouseover", (I, P) => {
4279
+ (D) => (D.attr("class", S).transition().duration(W).style("top", "0px").style("left", (P, F) => `${F * x}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (P) => {
4280
+ const F = w.current.findIndex((Q) => Q === P) + e;
4281
+ return xt(F);
4282
+ }), D.select(`.${rt["legend-label"]}`).text((P) => P), D),
4283
+ (D) => D.transition().duration(W).style("opacity", 0).style("top", "53px").remove().remove().remove()
4284
+ ).on("mouseover", (D, P) => {
4285
4285
  K(P);
4286
- }).on("mouseout", function(I) {
4286
+ }).on("mouseout", function(D) {
4287
4287
  K("");
4288
4288
  });
4289
- }, [...et, E, S]), C = /* @__PURE__ */ O.jsxs(
4289
+ }, [...B, L, k]), R = /* @__PURE__ */ H.jsxs(
4290
4290
  "div",
4291
4291
  {
4292
4292
  ref: c,
4293
- className: `${tt["controls-container"]} ${J ? tt["fill-container"] : ""}`,
4293
+ className: `${et["controls-container"]} ${J ? et["fill-container"] : ""}`,
4294
4294
  children: [
4295
- /* @__PURE__ */ O.jsxs("label", { className: tt["controls-label"], style: { paddingRight: "12px" }, children: [
4296
- /* @__PURE__ */ O.jsx(
4295
+ /* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], style: { paddingRight: "12px" }, children: [
4296
+ /* @__PURE__ */ H.jsx(
4297
4297
  "input",
4298
4298
  {
4299
4299
  type: "checkbox",
4300
- className: tt["controls-checkbox"],
4301
- checked: R,
4302
- onChange: (A) => V(A.target.checked)
4300
+ className: et["controls-checkbox"],
4301
+ checked: T,
4302
+ onChange: (N) => q(N.target.checked)
4303
4303
  }
4304
4304
  ),
4305
4305
  "Percentage"
4306
4306
  ] }),
4307
- /* @__PURE__ */ O.jsx(
4307
+ /* @__PURE__ */ H.jsx(
4308
4308
  "div",
4309
4309
  {
4310
- ref: p,
4310
+ ref: d,
4311
4311
  id: "stacked-barchart-legends",
4312
4312
  className: `${rt["legends-container"]}`
4313
4313
  }
4314
4314
  )
4315
4315
  ]
4316
4316
  }
4317
- ), M = Et((A) => {
4318
- if (d === 0 || _ === 0 || L !== "" && S) return;
4317
+ ), M = Et((N) => {
4318
+ if (p === 0 || _ === 0 || j !== "" && k) return;
4319
4319
  const x = { top: 20, right: 30, bottom: 30, left: 40 };
4320
- j.forEach(function(H) {
4321
- H.total = E.reduce((at, b) => {
4322
- const G = H[b];
4320
+ C.forEach(function(I) {
4321
+ I.total = L.reduce((at, $) => {
4322
+ const G = I[$];
4323
4323
  return at + (typeof G == "number" ? G : Number(G));
4324
4324
  }, 0);
4325
4325
  });
4326
- const y = j.filter((H) => H?.total && H.total > 0), I = d - x.left - x.right, P = _ - x.top - x.bottom, Y = A.select("svg"), Z = Y.node(), m = Y.select(".plot-area").attr("transform", "translate(" + x.left + "," + x.top + ")"), g = Ye(A).style("opacity", 0), D = !z && n === "vertical" ? rt.rotatedAxisText : rt.axisText, w = y.map(function(H) {
4327
- return H.label;
4328
- }), N = $e().domain(w).rangeRound(n === "vertical" ? [0, I] : [P, 0]).paddingInner(z ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), $ = Yt(j, (H) => H.total), Q = le().domain([0, R ? 1 : $ || 0]).nice().range(n === "vertical" ? [P, 0] : [0, I]), nt = $e().rangeRound([0, I]).paddingInner(0.1).align(0.2), lt = y.map(function(H) {
4329
- return H.label;
4326
+ const m = C.filter((I) => I?.total && I.total > 0), D = p - x.left - x.right, P = _ - x.top - x.bottom, F = N.select("svg"), Q = F.node(), tt = F.select(".plot-area").attr("transform", "translate(" + x.left + "," + x.top + ")"), z = Ye(N).style("opacity", 0), g = !E && n === "vertical" ? rt.rotatedAxisText : rt.axisText, y = m.map(function(I) {
4327
+ return I.label;
4328
+ }), b = $e().domain(y).rangeRound(n === "vertical" ? [0, D] : [P, 0]).paddingInner(E ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), v = Yt(C, (I) => I.total), U = le().domain([0, T ? 1 : v || 0]).nice().range(n === "vertical" ? [P, 0] : [0, D]), nt = $e().rangeRound([0, D]).paddingInner(0.1).align(0.2), ot = m.map(function(I) {
4329
+ return I.label;
4330
4330
  });
4331
- nt.domain(lt);
4332
- const ct = [], pt = n === "vertical" ? Gt(N).tickValues(N.domain()).tickSizeOuter(0) : Gt(Q).ticks(4, R ? ".0%" : "s").tickSizeOuter(0).tickSize(-P);
4333
- m.select(".x-axis").attr("transform", `translate(0,${P})`).transition().duration(W).call(pt).selectAll("text").style("cursor", "pointer").attr("dy", z ? "1em" : ".20em").attr("dx", z ? "0em" : "-.8em").attr("class", D).selectAll(".tick").filter((H) => H === 0).select("line").remove();
4334
- const ft = Yt(j, (H) => H.total), ut = le().domain([0, R ? 1 : ft || 0]).nice().range([P, 0]), vt = n === "vertical" ? Zt(Q).ticks(4, R ? ".0%" : "s").tickSize(-I) : Zt(N).tickSizeOuter(0);
4335
- m.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(W).call(vt).selectAll(".tick").filter((H) => H === 0).select("line").remove();
4336
- const Ht = bn().order(ir).offset($u), de = (R ? Ht.keys(E)(y) : bn().keys(E)(y)).map((H) => {
4337
- const at = H.key, b = H.map((G) => {
4338
- const B = G.data.label;
4331
+ nt.domain(ot);
4332
+ const lt = [], pt = n === "vertical" ? Gt(b).tickValues(b.domain()).tickSizeOuter(0) : Gt(U).ticks(4, T ? ".0%" : "s").tickSizeOuter(0).tickSize(-P);
4333
+ tt.select(".x-axis").attr("transform", `translate(0,${P})`).transition().duration(W).call(pt).selectAll("text").style("cursor", "pointer").attr("dy", E ? "1em" : ".20em").attr("dx", E ? "0em" : "-.8em").attr("class", g).selectAll(".tick").filter((I) => I === 0).select("line").remove();
4334
+ const ft = Yt(C, (I) => I.total), ut = le().domain([0, T ? 1 : ft || 0]).nice().range([P, 0]), _t = n === "vertical" ? Zt(U).ticks(4, T ? ".0%" : "s").tickSize(-D) : Zt(b).tickSizeOuter(0);
4335
+ tt.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(W).call(_t).selectAll(".tick").filter((I) => I === 0).select("line").remove();
4336
+ const Ot = bn().order(ir).offset($u), de = (T ? Ot.keys(L)(m) : bn().keys(L)(m)).map((I) => {
4337
+ const at = I.key, $ = I.map((G) => {
4338
+ const X = G.data.label;
4339
4339
  return {
4340
4340
  ...G,
4341
- key: `${at} - ${B}`,
4341
+ key: `${at} - ${X}`,
4342
4342
  barKey: at
4343
4343
  };
4344
4344
  });
4345
- return b.key = at, b;
4345
+ return $.key = at, $;
4346
4346
  });
4347
- let pe = m.selectAll(".serie").data(de, function(H) {
4348
- return H.key;
4347
+ let pe = tt.selectAll(".serie").data(de, function(I) {
4348
+ return I.key;
4349
4349
  }).join(
4350
- (H) => H.append("g").attr("class", "serie").attr("fill", function(b) {
4351
- const G = v.current.findIndex((B) => B === b.key) + e;
4350
+ (I) => I.append("g").attr("class", "serie").attr("fill", function($) {
4351
+ const G = w.current.findIndex((X) => X === $.key) + e;
4352
4352
  return xt(G);
4353
4353
  }).style("opacity", 1).style("pointer-events", "auto"),
4354
- (H) => H.transition().duration(W).attr("fill", function(b) {
4355
- const G = v.current.findIndex((B) => B === b.key) + e;
4354
+ (I) => I.transition().duration(W).attr("fill", function($) {
4355
+ const G = w.current.findIndex((X) => X === $.key) + e;
4356
4356
  return xt(G);
4357
4357
  }).style("opacity", 1).style("pointer-events", "auto"),
4358
- (H) => H.transition().duration(W).style("opacity", 0).attr("fill", Vt).selectAll("rect").attr("y", P).attr("height", 0).remove()
4358
+ (I) => I.transition().duration(W).style("opacity", 0).attr("fill", Ft).selectAll("rect").attr("y", P).attr("height", 0).remove()
4359
4359
  );
4360
- const Qt = (H) => N(H.data.label + "") ?? 0, Bt = N.bandwidth(), Kt = (H) => Q(n === "vertical" ? H[1] : H[0]), Ut = (H) => {
4361
- const at = n === "vertical" ? Q(H[0]) - Q(H[1]) : Q(H[1]) - Q(H[0]);
4360
+ const Qt = (I) => b(I.data.label + "") ?? 0, Xt = b.bandwidth(), Kt = (I) => U(n === "vertical" ? I[1] : I[0]), Ut = (I) => {
4361
+ const at = n === "vertical" ? U(I[0]) - U(I[1]) : U(I[1]) - U(I[0]);
4362
4362
  return isNaN(at) || at < 0 ? 0 : at;
4363
- }, Ot = (H) => n === "vertical" ? Qt(H) : Kt(H), Lt = (H) => n === "vertical" ? Bt : Ut(H), Tt = (H) => n === "vertical" ? Kt(H) : Qt(H), $t = (H) => n === "vertical" ? Ut(H) : Bt;
4364
- function X(H) {
4365
- if (H.barKey === L)
4363
+ }, qt = (I) => n === "vertical" ? Qt(I) : Kt(I), Lt = (I) => n === "vertical" ? Xt : Ut(I), Tt = (I) => n === "vertical" ? Kt(I) : Qt(I), $t = (I) => n === "vertical" ? Ut(I) : Xt;
4364
+ function Y(I) {
4365
+ if (I.barKey === j)
4366
4366
  return "none";
4367
- const at = Lt(H), b = $t(H);
4368
- return E.indexOf(H.barKey) === E.length - 1 || H.barKey === q[0] ? n === "vertical" ? `${at + b} ${at} ${b}` : `${at + b + at}` : n === "vertical" ? `${b} ${at}` : `${at} ${b}`;
4367
+ const at = Lt(I), $ = $t(I);
4368
+ return L.indexOf(I.barKey) === L.length - 1 || I.barKey === O[0] ? n === "vertical" ? `${at + $} ${at} ${$}` : `${at + $ + at}` : n === "vertical" ? `${$} ${at}` : `${at} ${$}`;
4369
4369
  }
4370
- function it(H) {
4371
- const at = Lt(H), b = E.indexOf(H.barKey) === E.length - 1;
4372
- return n === "vertical" ? b ? 0 : at * -1 : 0;
4370
+ function it(I) {
4371
+ const at = Lt(I), $ = L.indexOf(I.barKey) === L.length - 1;
4372
+ return n === "vertical" ? $ ? 0 : at * -1 : 0;
4373
4373
  }
4374
- const st = (H) => L !== "" && L === H.barKey ? `rect ${rt.rectLegendHovered}` : `rect ${rt.rect}`;
4374
+ const st = (I) => j !== "" && j === I.barKey ? `rect ${rt.rectLegendHovered}` : `rect ${rt.rect}`;
4375
4375
  pe.selectAll("rect").data(
4376
- (H) => H,
4377
- (H) => H.data.label
4376
+ (I) => I,
4377
+ (I) => I.data.label
4378
4378
  ).join(
4379
- (H) => {
4379
+ (I) => {
4380
4380
  let at;
4381
- return at = H.append("rect").attr("class", st).attr("x", function(b) {
4382
- return n === "vertical" ? nt(b.data.label + "") ?? 0 : Q(0);
4383
- }).attr("width", function(b) {
4384
- return n === "vertical" ? N.bandwidth() : 0;
4385
- }).attr("y", function(b) {
4381
+ return at = I.append("rect").attr("class", st).attr("x", function($) {
4382
+ return n === "vertical" ? nt($.data.label + "") ?? 0 : U(0);
4383
+ }).attr("width", function($) {
4384
+ return n === "vertical" ? b.bandwidth() : 0;
4385
+ }).attr("y", function($) {
4386
4386
  if (n === "vertical") {
4387
- if (!ct.includes(b.data.label + ""))
4387
+ if (!lt.includes($.data.label + ""))
4388
4388
  return P;
4389
- const G = Q(b[1]), B = Q(b[0]) - Q(b[1]), gt = isNaN(B) || B < 0 ? 0 : B;
4389
+ const G = U($[1]), X = U($[0]) - U($[1]), gt = isNaN(X) || X < 0 ? 0 : X;
4390
4390
  return G + gt;
4391
4391
  } else
4392
- return Tt(b);
4393
- }).attr("height", function(b) {
4394
- return n === "vertical" ? 0 : $t(b);
4395
- }).attr("stroke-dasharray", X).attr("stroke-dashoffset", it).transition().duration(W).attr("x", Ot).attr("width", Lt).attr("height", $t).attr("y", Tt), at;
4392
+ return Tt($);
4393
+ }).attr("height", function($) {
4394
+ return n === "vertical" ? 0 : $t($);
4395
+ }).attr("stroke-dasharray", Y).attr("stroke-dashoffset", it).transition().duration(W).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), at;
4396
4396
  },
4397
4397
  void 0,
4398
- (H) => H.transition().duration(W).attr("opacity", 0).attr("height", 0).attr("y", P).remove()
4399
- ).attr("class", st).attr("stroke-dasharray", X).attr("stroke-dashoffset", it).transition().duration(W).attr("x", Ot).attr("width", Lt).attr("height", $t).attr("y", Tt), pe.selectAll("rect").on("mouseover", function(H, at) {
4400
- ht(".x-axis").selectAll("text").filter((bt) => bt === at.data.name).attr("class", D + " " + tt.hoveredAxisText), g.style("opacity", 1).select("p.title").text(at.data.label);
4401
- const b = at.data[at.barKey] || 0, G = at.data.total || 0, B = b / G * 100, gt = fe(".1f")(B) + "%";
4402
- g.select("p.top-label").text(at.barKey + " : " + (R ? gt : St(b, r))), g.select("p.bottom-label").text(
4403
- R ? `(${St(b, r)} of ${St(G, r)})` : `Total : ${St(G, r)}`
4398
+ (I) => I.transition().duration(W).attr("opacity", 0).attr("height", 0).attr("y", P).remove()
4399
+ ).attr("class", st).attr("stroke-dasharray", Y).attr("stroke-dashoffset", it).transition().duration(W).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), pe.selectAll("rect").on("mouseover", function(I, at) {
4400
+ ht(".x-axis").selectAll("text").filter((bt) => bt === at.data.name).attr("class", g + " " + et.hoveredAxisText), z.style("opacity", 1).select("p.title").text(at.data.label);
4401
+ const $ = at.data[at.barKey] || 0, G = at.data.total || 0, X = $ / G * 100, gt = fe(".1f")(X) + "%";
4402
+ z.select("p.top-label").text(at.barKey + " : " + (T ? gt : St($, r))), z.select("p.bottom-label").text(
4403
+ T ? `(${St($, r)} of ${St(G, r)})` : `Total : ${St(G, r)}`
4404
4404
  );
4405
- }).on("touch", function(H, at) {
4406
- ht(".x-axis").selectAll("text").filter((b) => b === at.data.label).attr("class", D);
4407
- }).on("mousemove", (H, at) => {
4408
- Rn(g, { e: H, svg: Z, yScale: ut });
4409
- }).on("mouseout", function(H, at) {
4410
- ht(".x-axis").selectAll("text").filter((b) => b === at.data.name).attr("class", D), g.style("opacity", 0);
4405
+ }).on("touch", function(I, at) {
4406
+ ht(".x-axis").selectAll("text").filter(($) => $ === at.data.label).attr("class", g);
4407
+ }).on("mousemove", (I, at) => {
4408
+ Rn(z, { e: I, svg: Q, yScale: ut });
4409
+ }).on("mouseout", function(I, at) {
4410
+ ht(".x-axis").selectAll("text").filter(($) => $ === at.data.name).attr("class", g), z.style("opacity", 0);
4411
4411
  });
4412
- }, [...et, j, E, R, L, n, S, r]);
4413
- return /* @__PURE__ */ O.jsxs(
4412
+ }, [...B, C, L, T, j, n, k, r]);
4413
+ return /* @__PURE__ */ H.jsxs(
4414
4414
  "div",
4415
4415
  {
4416
4416
  ref: i,
4417
4417
  style: { width: s, height: o, display: "flex", flexDirection: "column" },
4418
4418
  children: [
4419
- J ? kn(C, J) : C,
4420
- /* @__PURE__ */ O.jsx(
4419
+ J ? kn(R, J) : R,
4420
+ /* @__PURE__ */ H.jsx(
4421
4421
  "div",
4422
4422
  {
4423
4423
  ref: h,
4424
- className: `${tt["fill-container"]}`,
4424
+ className: `${et["fill-container"]}`,
4425
4425
  style: { display: "flex", flexDirection: "column" },
4426
- children: /* @__PURE__ */ O.jsxs(
4426
+ children: /* @__PURE__ */ H.jsxs(
4427
4427
  "div",
4428
4428
  {
4429
4429
  ref: M,
4430
- className: `${tt["fill-container"]}`,
4430
+ className: `${et["fill-container"]}`,
4431
4431
  style: { display: "flex", flexDirection: "column" },
4432
4432
  children: [
4433
- /* @__PURE__ */ O.jsx(
4433
+ /* @__PURE__ */ H.jsx(
4434
4434
  "svg",
4435
4435
  {
4436
- className: `${tt["chart-svg"]} ${tt["fill-container"]}`,
4437
- viewBox: `0 0 ${d} ${_}`,
4438
- children: /* @__PURE__ */ O.jsxs("g", { className: "plot-area", children: [
4439
- /* @__PURE__ */ O.jsx("g", { className: "plot-rects" }),
4440
- /* @__PURE__ */ O.jsx("g", { className: `${n === "vertical" ? rt["value-axis"] : ""} y-axis` }),
4441
- /* @__PURE__ */ O.jsx("g", { className: `${n === "horizontal" ? rt["value-axis"] : ""} x-axis` })
4436
+ className: `${et["chart-svg"]} ${et["fill-container"]}`,
4437
+ viewBox: `0 0 ${p} ${_}`,
4438
+ children: /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
4439
+ /* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
4440
+ /* @__PURE__ */ H.jsx("g", { className: `${n === "vertical" ? rt["value-axis"] : ""} y-axis` }),
4441
+ /* @__PURE__ */ H.jsx("g", { className: `${n === "horizontal" ? rt["value-axis"] : ""} x-axis` })
4442
4442
  ] })
4443
4443
  }
4444
4444
  ),
4445
- /* @__PURE__ */ O.jsx(We, { pCount: 3 })
4445
+ /* @__PURE__ */ H.jsx(We, { pCount: 3 })
4446
4446
  ]
4447
4447
  }
4448
4448
  )
@@ -4532,195 +4532,195 @@ function si({ nodes: t }) {
4532
4532
  }
4533
4533
  }
4534
4534
  function af() {
4535
- let t = 0, e = 0, n = 1, r = 1, i = 24, a = 8, s, o = ef, c = tf, l, u, h = nf, f = rf, d = 6;
4535
+ let t = 0, e = 0, n = 1, r = 1, i = 24, a = 8, s, o = ef, c = tf, l, u, h = nf, f = rf, p = 6;
4536
4536
  function _() {
4537
- const p = { nodes: h.apply(null, arguments), links: f.apply(null, arguments) };
4538
- return L(p), K(p), R(p), V(p), q(p), si(p), p;
4537
+ const d = { nodes: h.apply(null, arguments), links: f.apply(null, arguments) };
4538
+ return j(d), K(d), T(d), q(d), O(d), si(d), d;
4539
4539
  }
4540
- _.update = function(p) {
4541
- return si(p), p;
4542
- }, _.nodeId = function(p) {
4543
- return arguments.length ? (o = typeof p == "function" ? p : nn(p), _) : o;
4544
- }, _.nodeAlign = function(p) {
4545
- return arguments.length ? (c = typeof p == "function" ? p : nn(p), _) : c;
4546
- }, _.nodeSort = function(p) {
4547
- return arguments.length ? (l = p, _) : l;
4548
- }, _.nodeWidth = function(p) {
4549
- return arguments.length ? (i = +p, _) : i;
4550
- }, _.nodePadding = function(p) {
4551
- return arguments.length ? (a = s = +p, _) : a;
4552
- }, _.nodes = function(p) {
4553
- return arguments.length ? (h = typeof p == "function" ? p : nn(p), _) : h;
4554
- }, _.links = function(p) {
4555
- return arguments.length ? (f = typeof p == "function" ? p : nn(p), _) : f;
4556
- }, _.linkSort = function(p) {
4557
- return arguments.length ? (u = p, _) : u;
4558
- }, _.size = function(p) {
4559
- return arguments.length ? (t = e = 0, n = +p[0], r = +p[1], _) : [n - t, r - e];
4560
- }, _.extent = function(p) {
4561
- return arguments.length ? (t = +p[0][0], n = +p[1][0], e = +p[0][1], r = +p[1][1], _) : [[t, e], [n, r]];
4562
- }, _.iterations = function(p) {
4563
- return arguments.length ? (d = +p, _) : d;
4540
+ _.update = function(d) {
4541
+ return si(d), d;
4542
+ }, _.nodeId = function(d) {
4543
+ return arguments.length ? (o = typeof d == "function" ? d : nn(d), _) : o;
4544
+ }, _.nodeAlign = function(d) {
4545
+ return arguments.length ? (c = typeof d == "function" ? d : nn(d), _) : c;
4546
+ }, _.nodeSort = function(d) {
4547
+ return arguments.length ? (l = d, _) : l;
4548
+ }, _.nodeWidth = function(d) {
4549
+ return arguments.length ? (i = +d, _) : i;
4550
+ }, _.nodePadding = function(d) {
4551
+ return arguments.length ? (a = s = +d, _) : a;
4552
+ }, _.nodes = function(d) {
4553
+ return arguments.length ? (h = typeof d == "function" ? d : nn(d), _) : h;
4554
+ }, _.links = function(d) {
4555
+ return arguments.length ? (f = typeof d == "function" ? d : nn(d), _) : f;
4556
+ }, _.linkSort = function(d) {
4557
+ return arguments.length ? (u = d, _) : u;
4558
+ }, _.size = function(d) {
4559
+ return arguments.length ? (t = e = 0, n = +d[0], r = +d[1], _) : [n - t, r - e];
4560
+ }, _.extent = function(d) {
4561
+ return arguments.length ? (t = +d[0][0], n = +d[1][0], e = +d[0][1], r = +d[1][1], _) : [[t, e], [n, r]];
4562
+ }, _.iterations = function(d) {
4563
+ return arguments.length ? (p = +d, _) : p;
4564
4564
  };
4565
- function L({ nodes: p, links: C }) {
4566
- for (const [A, x] of p.entries())
4567
- x.index = A, x.sourceLinks = [], x.targetLinks = [];
4568
- const M = new Map(p.map((A, x) => [o(A, x, p), A]));
4569
- for (const [A, x] of C.entries()) {
4570
- x.index = A;
4571
- let { source: T, target: y } = x;
4572
- typeof T != "object" && (T = x.source = ai(M, T)), typeof y != "object" && (y = x.target = ai(M, y)), T.sourceLinks.push(x), y.targetLinks.push(x);
4565
+ function j({ nodes: d, links: R }) {
4566
+ for (const [N, x] of d.entries())
4567
+ x.index = N, x.sourceLinks = [], x.targetLinks = [];
4568
+ const M = new Map(d.map((N, x) => [o(N, x, d), N]));
4569
+ for (const [N, x] of R.entries()) {
4570
+ x.index = N;
4571
+ let { source: S, target: m } = x;
4572
+ typeof S != "object" && (S = x.source = ai(M, S)), typeof m != "object" && (m = x.target = ai(M, m)), S.sourceLinks.push(x), m.targetLinks.push(x);
4573
4573
  }
4574
4574
  if (u != null)
4575
- for (const { sourceLinks: A, targetLinks: x } of p)
4576
- A.sort(u), x.sort(u);
4575
+ for (const { sourceLinks: N, targetLinks: x } of d)
4576
+ N.sort(u), x.sort(u);
4577
4577
  }
4578
- function K({ nodes: p }) {
4579
- for (const C of p)
4580
- C.value = C.fixedValue === void 0 ? Math.max(Vn(C.sourceLinks, Fn), Vn(C.targetLinks, Fn)) : C.fixedValue;
4578
+ function K({ nodes: d }) {
4579
+ for (const R of d)
4580
+ R.value = R.fixedValue === void 0 ? Math.max(Vn(R.sourceLinks, Fn), Vn(R.targetLinks, Fn)) : R.fixedValue;
4581
4581
  }
4582
- function R({ nodes: p }) {
4583
- const C = p.length;
4584
- let M = new Set(p), A = /* @__PURE__ */ new Set(), x = 0;
4582
+ function T({ nodes: d }) {
4583
+ const R = d.length;
4584
+ let M = new Set(d), N = /* @__PURE__ */ new Set(), x = 0;
4585
4585
  for (; M.size; ) {
4586
- for (const T of M) {
4587
- T.depth = x;
4588
- for (const { target: y } of T.sourceLinks)
4589
- A.add(y);
4586
+ for (const S of M) {
4587
+ S.depth = x;
4588
+ for (const { target: m } of S.sourceLinks)
4589
+ N.add(m);
4590
4590
  }
4591
- if (++x > C) throw new Error("circular link");
4592
- M = A, A = /* @__PURE__ */ new Set();
4591
+ if (++x > R) throw new Error("circular link");
4592
+ M = N, N = /* @__PURE__ */ new Set();
4593
4593
  }
4594
4594
  }
4595
- function V({ nodes: p }) {
4596
- const C = p.length;
4597
- let M = new Set(p), A = /* @__PURE__ */ new Set(), x = 0;
4595
+ function q({ nodes: d }) {
4596
+ const R = d.length;
4597
+ let M = new Set(d), N = /* @__PURE__ */ new Set(), x = 0;
4598
4598
  for (; M.size; ) {
4599
- for (const T of M) {
4600
- T.height = x;
4601
- for (const { source: y } of T.targetLinks)
4602
- A.add(y);
4599
+ for (const S of M) {
4600
+ S.height = x;
4601
+ for (const { source: m } of S.targetLinks)
4602
+ N.add(m);
4603
4603
  }
4604
- if (++x > C) throw new Error("circular link");
4605
- M = A, A = /* @__PURE__ */ new Set();
4604
+ if (++x > R) throw new Error("circular link");
4605
+ M = N, N = /* @__PURE__ */ new Set();
4606
4606
  }
4607
4607
  }
4608
- function S({ nodes: p }) {
4609
- const C = ni(p, (x) => x.depth) + 1, M = (n - t - i) / (C - 1), A = new Array(C);
4610
- for (const x of p) {
4611
- const T = Math.max(0, Math.min(C - 1, Math.floor(c.call(null, x, C))));
4612
- x.layer = T, x.x0 = t + T * M, x.x1 = x.x0 + i, A[T] ? A[T].push(x) : A[T] = [x];
4608
+ function k({ nodes: d }) {
4609
+ const R = ni(d, (x) => x.depth) + 1, M = (n - t - i) / (R - 1), N = new Array(R);
4610
+ for (const x of d) {
4611
+ const S = Math.max(0, Math.min(R - 1, Math.floor(c.call(null, x, R))));
4612
+ x.layer = S, x.x0 = t + S * M, x.x1 = x.x0 + i, N[S] ? N[S].push(x) : N[S] = [x];
4613
4613
  }
4614
- if (l) for (const x of A)
4614
+ if (l) for (const x of N)
4615
4615
  x.sort(l);
4616
- return A;
4616
+ return N;
4617
4617
  }
4618
- function k(p) {
4619
- const C = Qu(p, (M) => (r - e - (M.length - 1) * s) / Vn(M, Fn));
4620
- for (const M of p) {
4621
- let A = e;
4618
+ function A(d) {
4619
+ const R = Qu(d, (M) => (r - e - (M.length - 1) * s) / Vn(M, Fn));
4620
+ for (const M of d) {
4621
+ let N = e;
4622
4622
  for (const x of M) {
4623
- x.y0 = A, x.y1 = A + x.value * C, A = x.y1 + s;
4624
- for (const T of x.sourceLinks)
4625
- T.width = T.value * C;
4623
+ x.y0 = N, x.y1 = N + x.value * R, N = x.y1 + s;
4624
+ for (const S of x.sourceLinks)
4625
+ S.width = S.value * R;
4626
4626
  }
4627
- A = (r - A + s) / (M.length + 1);
4627
+ N = (r - N + s) / (M.length + 1);
4628
4628
  for (let x = 0; x < M.length; ++x) {
4629
- const T = M[x];
4630
- T.y0 += A * (x + 1), T.y1 += A * (x + 1);
4629
+ const S = M[x];
4630
+ S.y0 += N * (x + 1), S.y1 += N * (x + 1);
4631
4631
  }
4632
- E(M);
4632
+ L(M);
4633
4633
  }
4634
4634
  }
4635
- function q(p) {
4636
- const C = S(p);
4637
- s = Math.min(a, (r - e) / (ni(C, (M) => M.length) - 1)), k(C);
4638
- for (let M = 0; M < d; ++M) {
4639
- const A = Math.pow(0.99, M), x = Math.max(1 - A, (M + 1) / d);
4640
- J(C, A, x), U(C, A, x);
4635
+ function O(d) {
4636
+ const R = k(d);
4637
+ s = Math.min(a, (r - e) / (ni(R, (M) => M.length) - 1)), A(R);
4638
+ for (let M = 0; M < p; ++M) {
4639
+ const N = Math.pow(0.99, M), x = Math.max(1 - N, (M + 1) / p);
4640
+ J(R, N, x), V(R, N, x);
4641
4641
  }
4642
4642
  }
4643
- function U(p, C, M) {
4644
- for (let A = 1, x = p.length; A < x; ++A) {
4645
- const T = p[A];
4646
- for (const y of T) {
4647
- let I = 0, P = 0;
4648
- for (const { source: Z, value: m } of y.targetLinks) {
4649
- let g = m * (y.layer - Z.layer);
4650
- I += v(Z, y) * g, P += g;
4643
+ function V(d, R, M) {
4644
+ for (let N = 1, x = d.length; N < x; ++N) {
4645
+ const S = d[N];
4646
+ for (const m of S) {
4647
+ let D = 0, P = 0;
4648
+ for (const { source: Q, value: tt } of m.targetLinks) {
4649
+ let z = tt * (m.layer - Q.layer);
4650
+ D += w(Q, m) * z, P += z;
4651
4651
  }
4652
4652
  if (!(P > 0)) continue;
4653
- let Y = (I / P - y.y0) * C;
4654
- y.y0 += Y, y.y1 += Y, j(y);
4653
+ let F = (D / P - m.y0) * R;
4654
+ m.y0 += F, m.y1 += F, C(m);
4655
4655
  }
4656
- l === void 0 && T.sort(wn), F(T, M);
4656
+ l === void 0 && S.sort(wn), Z(S, M);
4657
4657
  }
4658
4658
  }
4659
- function J(p, C, M) {
4660
- for (let A = p.length, x = A - 2; x >= 0; --x) {
4661
- const T = p[x];
4662
- for (const y of T) {
4663
- let I = 0, P = 0;
4664
- for (const { target: Z, value: m } of y.sourceLinks) {
4665
- let g = m * (Z.layer - y.layer);
4666
- I += z(y, Z) * g, P += g;
4659
+ function J(d, R, M) {
4660
+ for (let N = d.length, x = N - 2; x >= 0; --x) {
4661
+ const S = d[x];
4662
+ for (const m of S) {
4663
+ let D = 0, P = 0;
4664
+ for (const { target: Q, value: tt } of m.sourceLinks) {
4665
+ let z = tt * (Q.layer - m.layer);
4666
+ D += E(m, Q) * z, P += z;
4667
4667
  }
4668
4668
  if (!(P > 0)) continue;
4669
- let Y = (I / P - y.y0) * C;
4670
- y.y0 += Y, y.y1 += Y, j(y);
4669
+ let F = (D / P - m.y0) * R;
4670
+ m.y0 += F, m.y1 += F, C(m);
4671
4671
  }
4672
- l === void 0 && T.sort(wn), F(T, M);
4672
+ l === void 0 && S.sort(wn), Z(S, M);
4673
4673
  }
4674
4674
  }
4675
- function F(p, C) {
4676
- const M = p.length >> 1, A = p[M];
4677
- et(p, A.y0 - s, M - 1, C), W(p, A.y1 + s, M + 1, C), et(p, r, p.length - 1, C), W(p, e, 0, C);
4675
+ function Z(d, R) {
4676
+ const M = d.length >> 1, N = d[M];
4677
+ B(d, N.y0 - s, M - 1, R), W(d, N.y1 + s, M + 1, R), B(d, r, d.length - 1, R), W(d, e, 0, R);
4678
4678
  }
4679
- function W(p, C, M, A) {
4680
- for (; M < p.length; ++M) {
4681
- const x = p[M], T = (C - x.y0) * A;
4682
- T > 1e-6 && (x.y0 += T, x.y1 += T), C = x.y1 + s;
4679
+ function W(d, R, M, N) {
4680
+ for (; M < d.length; ++M) {
4681
+ const x = d[M], S = (R - x.y0) * N;
4682
+ S > 1e-6 && (x.y0 += S, x.y1 += S), R = x.y1 + s;
4683
4683
  }
4684
4684
  }
4685
- function et(p, C, M, A) {
4685
+ function B(d, R, M, N) {
4686
4686
  for (; M >= 0; --M) {
4687
- const x = p[M], T = (x.y1 - C) * A;
4688
- T > 1e-6 && (x.y0 -= T, x.y1 -= T), C = x.y0 - s;
4687
+ const x = d[M], S = (x.y1 - R) * N;
4688
+ S > 1e-6 && (x.y0 -= S, x.y1 -= S), R = x.y0 - s;
4689
4689
  }
4690
4690
  }
4691
- function j({ sourceLinks: p, targetLinks: C }) {
4691
+ function C({ sourceLinks: d, targetLinks: R }) {
4692
4692
  if (u === void 0) {
4693
- for (const { source: { sourceLinks: M } } of C)
4693
+ for (const { source: { sourceLinks: M } } of R)
4694
4694
  M.sort(ii);
4695
- for (const { target: { targetLinks: M } } of p)
4695
+ for (const { target: { targetLinks: M } } of d)
4696
4696
  M.sort(ri);
4697
4697
  }
4698
4698
  }
4699
- function E(p) {
4699
+ function L(d) {
4700
4700
  if (u === void 0)
4701
- for (const { sourceLinks: C, targetLinks: M } of p)
4702
- C.sort(ii), M.sort(ri);
4701
+ for (const { sourceLinks: R, targetLinks: M } of d)
4702
+ R.sort(ii), M.sort(ri);
4703
4703
  }
4704
- function v(p, C) {
4705
- let M = p.y0 - (p.sourceLinks.length - 1) * s / 2;
4706
- for (const { target: A, width: x } of p.sourceLinks) {
4707
- if (A === C) break;
4704
+ function w(d, R) {
4705
+ let M = d.y0 - (d.sourceLinks.length - 1) * s / 2;
4706
+ for (const { target: N, width: x } of d.sourceLinks) {
4707
+ if (N === R) break;
4708
4708
  M += x + s;
4709
4709
  }
4710
- for (const { source: A, width: x } of C.targetLinks) {
4711
- if (A === p) break;
4710
+ for (const { source: N, width: x } of R.targetLinks) {
4711
+ if (N === d) break;
4712
4712
  M -= x;
4713
4713
  }
4714
4714
  return M;
4715
4715
  }
4716
- function z(p, C) {
4717
- let M = C.y0 - (C.targetLinks.length - 1) * s / 2;
4718
- for (const { source: A, width: x } of C.targetLinks) {
4719
- if (A === p) break;
4716
+ function E(d, R) {
4717
+ let M = R.y0 - (R.targetLinks.length - 1) * s / 2;
4718
+ for (const { source: N, width: x } of R.targetLinks) {
4719
+ if (N === d) break;
4720
4720
  M += x + s;
4721
4721
  }
4722
- for (const { target: A, width: x } of p.sourceLinks) {
4723
- if (A === C) break;
4722
+ for (const { target: N, width: x } of d.sourceLinks) {
4723
+ if (N === R) break;
4724
4724
  M -= x;
4725
4725
  }
4726
4726
  return M;
@@ -4761,8 +4761,8 @@ or.prototype = ra.prototype = {
4761
4761
  else if (h > re) if (!(Math.abs(u * o - c * l) > re) || !i)
4762
4762
  this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
4763
4763
  else {
4764
- var f = n - a, d = r - s, _ = o * o + c * c, L = f * f + d * d, K = Math.sqrt(_), R = Math.sqrt(h), V = i * Math.tan((ar - Math.acos((_ + h - L) / (2 * K * R))) / 2), S = V / R, k = V / K;
4765
- Math.abs(S - 1) > re && (this._ += "L" + (t + S * l) + "," + (e + S * u)), this._ += "A" + i + "," + i + ",0,0," + +(u * f > l * d) + "," + (this._x1 = t + k * o) + "," + (this._y1 = e + k * c);
4764
+ var f = n - a, p = r - s, _ = o * o + c * c, j = f * f + p * p, K = Math.sqrt(_), T = Math.sqrt(h), q = i * Math.tan((ar - Math.acos((_ + h - j) / (2 * K * T))) / 2), k = q / T, A = q / K;
4765
+ Math.abs(k - 1) > re && (this._ += "L" + (t + k * l) + "," + (e + k * u)), this._ += "A" + i + "," + i + ",0,0," + +(u * f > l * p) + "," + (this._x1 = t + A * o) + "," + (this._y1 = e + A * c);
4766
4766
  }
4767
4767
  },
4768
4768
  arc: function(t, e, n, r, i, a) {
@@ -4834,144 +4834,146 @@ const mf = "_sankeyEnergyLink_10fud_285", xf = "_sankeyLabel_10fud_323", ci = {
4834
4834
  sankeyLabel: xf
4835
4835
  };
4836
4836
  function Sf({ data: t, tooltipFormat: e }) {
4837
- const [n, r] = ot(null), [i, a] = ot(!1), [s, o] = ot(!1), c = Wt(!0), l = Wt(!0), [u, h] = he(), { width: f, height: d } = h, _ = Ae(n ? n.nodes.map((R) => R.name) : []);
4838
- _t(() => {
4839
- r((R) => {
4840
- const V = R === null ? [] : R.nodes.map((k) => k.name), S = t.nodes.map((k) => k.name);
4841
- return c.current = S.every((k) => !V.includes(k)), R !== null && (l.current = !1), t;
4837
+ const [n, r] = ct(null), [i, a] = ct(!1), [s, o] = ct(!1), c = Pt(!0), l = Pt(!0), u = Pt("data"), [h, f] = he(), { width: p, height: _ } = f, j = Ae(n ? n.nodes.map((k) => k.name) : []);
4838
+ vt(() => {
4839
+ r((k) => {
4840
+ const A = k === null ? [] : k.nodes.map((V) => V.name), O = t.nodes.map((V) => V.name);
4841
+ return c.current = O.every((V) => !A.includes(V)), k !== null && (l.current = !1), u.current = "data", t;
4842
4842
  }), s && o(!1), i && a(!1);
4843
- }, [t]);
4844
- const L = 1e3, K = Et(
4845
- (R) => {
4843
+ }, [t]), vt(() => {
4844
+ p !== 0 && _ !== 0 && (u.current = "dimension");
4845
+ }, [p, _]);
4846
+ const K = p <= 768, T = 1e3, q = Et(
4847
+ (k) => {
4846
4848
  if (!n)
4847
4849
  return;
4848
- const V = f, S = d;
4849
- if (V === 0 || S === 0)
4850
+ const A = p, O = _;
4851
+ if (A === 0 || O === 0)
4850
4852
  return;
4851
- const k = { top: 30, right: 20, bottom: 20, left: 20 }, q = S - (k.top + k.bottom), U = V - (k.left + k.right), J = q, F = U, W = n.links.map((m) => ({ ...m })), et = n.nodes.map((m) => ({ ...m }));
4852
- W.forEach(function(m) {
4853
- const g = n.nodes[m.source].name, D = n.nodes[m.target].name, w = g + " → " + D;
4854
- m.sourceName = g, m.targetName = D, m.id = w;
4853
+ const V = { top: 30, right: 20, bottom: 20, left: 20 }, J = O - (V.top + V.bottom), Z = A - (V.left + V.right), W = J, B = Z, C = n.links.map((g) => ({ ...g })), L = n.nodes.map((g) => ({ ...g }));
4854
+ C.forEach(function(g) {
4855
+ const y = n.nodes[g.source].name, b = n.nodes[g.target].name, v = y + " → " + b;
4856
+ g.sourceName = y, g.targetName = b, g.id = v;
4855
4857
  });
4856
- const j = R.select("svg");
4857
- j.node();
4858
- const E = j.select(".plot-area").attr("transform", "translate(" + k.left + "," + k.top + ")"), v = Ye(R).style("opacity", 0), z = (m) => {
4859
- const g = m.targetLinks?.reduce((w, N) => w + N.value, 0) ?? 0, D = m.sourceLinks?.reduce((w, N) => w + N.value, 0) ?? 0;
4860
- return { enteringValue: g, exitingValue: D };
4861
- }, C = af().nodeSort(
4862
- s ? (m, g) => {
4863
- const { enteringValue: D, exitingValue: w } = z(m), { enteringValue: N, exitingValue: $ } = z(g);
4864
- return Math.max(D, w) - Math.max(N, $);
4858
+ const w = k.select("svg");
4859
+ w.node();
4860
+ const E = w.select(".plot-area").attr("transform", "translate(" + V.left + "," + V.top + ")"), d = Ye(k).style("opacity", 0), R = (g) => {
4861
+ const y = g.targetLinks?.reduce((v, U) => v + U.value, 0) ?? 0, b = g.sourceLinks?.reduce((v, U) => v + U.value, 0) ?? 0;
4862
+ return { enteringValue: y, exitingValue: b };
4863
+ }, N = af().nodeSort(
4864
+ s ? (g, y) => {
4865
+ const { enteringValue: b, exitingValue: v } = R(g), { enteringValue: U, exitingValue: nt } = R(y);
4866
+ return Math.max(b, v) - Math.max(U, nt);
4865
4867
  } : null
4866
4868
  ).linkSort(
4867
- i ? (m, g) => m.value - g.value : null
4868
- ).nodeWidth(F <= 540 ? 12 : 15).nodePadding(F <= 540 ? 5 : 8).extent([[0, 0], [F, J]])({
4869
- nodes: et.map((m) => Object.assign({}, m)),
4870
- links: W.map((m) => Object.assign({}, m))
4871
- }), { nodes: M, links: A } = C;
4869
+ i ? (g, y) => g.value - y.value : null
4870
+ ).nodeWidth(B <= 540 ? 8 : B > 540 && B <= 768 ? 12 : 15).nodePadding(B <= 540 ? 5 : 8).extent([[0, 0], [B, W]])({
4871
+ nodes: L.map((g) => Object.assign({}, g)),
4872
+ links: C.map((g) => Object.assign({}, g))
4873
+ }), { nodes: x, links: S } = N;
4872
4874
  E.selectAll("linearGradient").remove();
4873
- const x = E.selectAll("linearGradient").data(A).join("linearGradient").attr("id", (m, g) => g.toString()).attr("gradientUnits", "userSpaceOnUse").attr("x1", (m) => m.source.x0).attr("x2", (m) => m.target.x0);
4874
- x.append("stop").attr("offset", "0%").attr("stop-color", (m) => {
4875
- const g = _.current.findIndex((D) => D === m.sourceName);
4876
- return xt(g, !1);
4877
- }), x.append("stop").attr("offset", "100%").attr("stop-color", (m) => {
4878
- const g = _.current.findIndex((D) => D === m.targetName);
4879
- return xt(g, !1);
4875
+ const m = E.selectAll("linearGradient").data(S).join("linearGradient").attr("id", (g, y) => y.toString()).attr("gradientUnits", "userSpaceOnUse").attr("x1", (g) => g.source.x0).attr("x2", (g) => g.target.x0);
4876
+ m.append("stop").attr("offset", "0%").attr("stop-color", (g) => {
4877
+ const y = j.current.findIndex((b) => b === g.sourceName);
4878
+ return xt(y, !1);
4879
+ }), m.append("stop").attr("offset", "100%").attr("stop-color", (g) => {
4880
+ const y = j.current.findIndex((b) => b === g.targetName);
4881
+ return xt(y, !1);
4880
4882
  });
4881
- const T = (m) => {
4882
- const g = m.source, D = m.target, w = Math.abs(D.depth - g.depth);
4883
- return F * 1.5 * w;
4884
- }, y = (m) => T(m) + " " + T(m), I = (m) => !c.current || i || s ? 0 : m.target.depth * L;
4885
- E.selectAll(".link").data(A, (m) => m.id).join(
4886
- (m) => m.append("path").attr("class", `link ${ci.sankeyEnergyLink}`).attr("d", li()).style("stroke", function(g) {
4887
- return `url(#${x.filter((N) => N.sourceName === g.sourceName && N.targetName === g.targetName).node()?.id})`;
4888
- }).attr("stroke-dasharray", y).attr("stroke-dashoffset", T).attr("stroke-width", (g) => Math.max(1, g.width)).transition().duration(L).delay(function(g) {
4889
- return !c.current && !i && !s ? L : I(g);
4883
+ const D = (g) => {
4884
+ const y = g.source, b = g.target, v = Math.abs(b.depth - y.depth);
4885
+ return B * 1.5 * v;
4886
+ }, P = (g) => D(g) + " " + D(g), F = (g) => !c.current || u.current !== "data" ? 0 : g.target.depth * T;
4887
+ E.selectAll(".link").data(S, (g) => g.id).join(
4888
+ (g) => g.append("path").attr("class", `link ${ci.sankeyEnergyLink}`).attr("d", li()).style("stroke", function(y) {
4889
+ return `url(#${m.filter((U) => U.sourceName === y.sourceName && U.targetName === y.targetName).node()?.id})`;
4890
+ }).attr("stroke-dasharray", P).attr("stroke-dashoffset", D).attr("stroke-width", (y) => Math.max(1, y.width)).transition().duration(T).delay(function(y) {
4891
+ return c.current ? F(y) : T;
4890
4892
  }).attr("stroke-dashoffset", 0).on("end", function() {
4891
4893
  ht(this).attr("stroke-dasharray", "none");
4892
4894
  }),
4893
- (m) => (m.attr("stroke-width", (g) => Math.max(1, g.width || 0)).transition().duration(L).delay(I).attr("d", li()).attr("stroke-dashoffset", 0).on("end", function() {
4895
+ (g) => (g.attr("stroke-width", (y) => Math.max(1, y.width || 0)).transition().duration(T).delay(F).attr("d", li()).attr("stroke-dashoffset", 0).on("end", function() {
4894
4896
  ht(this).attr("stroke-dasharray", "none");
4895
- }), m),
4896
- (m) => c.current ? m.remove() : m.transition().duration(L / 4).style("opacity", 0).remove()
4897
- ).on("mouseover", (m, g) => {
4898
- E.selectAll("path.link").filter((D) => D.id !== g.id).style("stroke", "#1f2937").style("stroke-opacity", 0.15), E.selectAll("text.label").filter((D) => {
4899
- const w = D;
4900
- return w.name !== g.sourceName && w.name !== g.targetName;
4901
- }).style("opacity", 0), v.style("opacity", 1), v.select("p.title").text(g.id + St(g.value, e)), v.select("p.top-label").style("display", "none"), v.select("p.bottom-label").style("display", "none");
4902
- }).on("mousemove", (m, g) => {
4903
- ei(m, v);
4904
- }).on("mouseout", (m, g) => {
4905
- v.style("opacity", 0), E.selectAll("path.link").style("stroke", function(D) {
4906
- const w = D;
4907
- return `url(#${x.filter((Q) => Q.sourceName === w.sourceName && Q.targetName === w.targetName).node()?.id})`;
4908
- }).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${tt.sankeyEnergyLink}`), E.selectAll("text.label").style("opacity", 1);
4897
+ }), g),
4898
+ (g) => c.current ? g.remove() : g.transition().duration(T / 4).style("opacity", 0).remove()
4899
+ ).on("mouseover", (g, y) => {
4900
+ E.selectAll("path.link").filter((b) => b.id !== y.id).style("stroke", "#1f2937").style("stroke-opacity", 0.15), E.selectAll("text.label").filter((b) => {
4901
+ const v = b;
4902
+ return v.name !== y.sourceName && v.name !== y.targetName;
4903
+ }).style("opacity", 0), d.style("opacity", 1), d.select("p.title").text(y.id + St(y.value, e)), d.select("p.top-label").style("display", "none"), d.select("p.bottom-label").style("display", "none");
4904
+ }).on("mousemove", (g, y) => {
4905
+ ei(g, d);
4906
+ }).on("mouseout", (g, y) => {
4907
+ d.style("opacity", 0), E.selectAll("path.link").style("stroke", function(b) {
4908
+ const v = b;
4909
+ return `url(#${m.filter((ot) => ot.sourceName === v.sourceName && ot.targetName === v.targetName).node()?.id})`;
4910
+ }).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${et.sankeyEnergyLink}`), E.selectAll("text.label").style("opacity", 1);
4909
4911
  });
4910
- const P = (m) => !c.current || m.depth === 0 || i || s ? 0 : m.depth * L + L / 4, Y = (m) => {
4911
- const { enteringValue: g, exitingValue: D } = z(m);
4912
- return { nodeState: m.sourceLinks?.length === 0 && m.targetLinks?.length === 0 ? "stray node" : m.sourceLinks?.length === 0 ? "leaf node" : m.targetLinks?.length === 0 ? "source node" : g > D ? "surplus" : g < D ? "minus" : "balanced", enteringValue: g, exitingValue: D };
4913
- }, Z = (m) => {
4914
- const { nodeState: g, enteringValue: D, exitingValue: w } = Y(m);
4915
- return { enteringValue: D, exitingValue: w, nodeState: g, stateColor: g === "surplus" ? "#4ade80" : g === "minus" ? "#f87171" : "#e7e7e7" };
4912
+ const Q = (g) => !c.current || g.depth === 0 || u.current !== "data" ? 0 : g.depth * T + T / 4, tt = (g) => {
4913
+ const { enteringValue: y, exitingValue: b } = R(g);
4914
+ return { nodeState: g.sourceLinks?.length === 0 && g.targetLinks?.length === 0 ? "stray node" : g.sourceLinks?.length === 0 ? "leaf node" : g.targetLinks?.length === 0 ? "source node" : y > b ? "surplus" : y < b ? "minus" : "balanced", enteringValue: y, exitingValue: b };
4915
+ }, z = (g) => {
4916
+ const { nodeState: y, enteringValue: b, exitingValue: v } = tt(g);
4917
+ return { enteringValue: b, exitingValue: v, nodeState: y, stateColor: y === "surplus" ? "#4ade80" : y === "minus" ? "#f87171" : "#e7e7e7" };
4916
4918
  };
4917
- E.selectAll("rect.node").data(M, ((m) => m.name)).join(
4918
- (m) => m.append("rect").attr("class", `node ${tt.baseNode}`).attr("x", (g) => g.x0).attr("y", (g) => g.y0).attr("height", (g) => c.current ? Math.abs(g.y1 - g.y0) : 0).attr("width", (g) => c.current ? 0 : g.x1 - g.x0).attr("opacity", 0).attr("stroke-width", 2.5).transition().duration(L).delay(P).attr("fill", (g) => {
4919
- const D = _.current.findIndex((w) => w === g.name);
4920
- return xt(D, !1);
4921
- }).attr("opacity", 1).attr("width", function(g) {
4922
- return g.x1 - g.x0;
4919
+ E.selectAll("rect.node").data(x, ((g) => g.name)).join(
4920
+ (g) => g.append("rect").attr("class", `node ${et.baseNode}`).attr("x", (y) => y.x0).attr("y", (y) => y.y0).attr("height", (y) => c.current ? Math.abs(y.y1 - y.y0) : 0).attr("width", (y) => c.current ? 0 : y.x1 - y.x0).attr("opacity", 0).attr("stroke-width", 2.5).transition().duration(T).delay(Q).attr("fill", (y) => {
4921
+ const b = j.current.findIndex((v) => v === y.name);
4922
+ return xt(b, !1);
4923
+ }).attr("opacity", 1).attr("width", function(y) {
4924
+ return y.x1 - y.x0;
4923
4925
  }),
4924
4926
  void 0,
4925
- (m) => c.current ? m.remove() : m.transition().duration(L / 4).style("opacity", 0).remove()
4926
- ).on("mouseover", (m, g) => {
4927
- E.selectAll("path.link").filter((Q) => {
4928
- const nt = Q;
4929
- return !(nt.sourceName === g.name || nt.targetName === g.name);
4927
+ (g) => c.current ? g.remove() : g.transition().duration(T / 4).style("opacity", 0).remove()
4928
+ ).on("mouseover", (g, y) => {
4929
+ E.selectAll("path.link").filter((ot) => {
4930
+ const lt = ot;
4931
+ return !(lt.sourceName === y.name || lt.targetName === y.name);
4930
4932
  }).style("stroke", "#1f2937").style("stroke-opacity", 0.1);
4931
- const { enteringValue: D, exitingValue: w, nodeState: N, stateColor: $ } = Z(g);
4932
- v.style("opacity", 1), v.select("p.title").text(g.name + " :"), v.select("p.top-label").style("display", "block").text("in " + St(D, e)), v.select("p.bottom-label").style("display", "block").text("out " + St(w, e)), v.select("p.small-text").style("display", "block").text(`${N}`).style("color", `${$}`);
4933
- }).on("mousemove", (m, g) => {
4934
- ei(m, v);
4935
- }).on("mouseout", (m, g) => {
4936
- v.style("opacity", 0), v.select("p.small-text").style("display", "none"), E.selectAll("path.link").style("stroke", function(D) {
4937
- const w = D;
4938
- return `url(#${x.filter((Q) => Q.sourceName === w.sourceName && Q.targetName === w.targetName).node()?.id})`;
4939
- }).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${tt.sankeyEnergyLink}`);
4940
- }).transition().duration(L).delay(P).attr("stroke-width", 2.5).style("stroke", function(m) {
4941
- const { stateColor: g, nodeState: D } = Z(m);
4942
- return D === "surplus" || D === "minus" ? g : "#52525b";
4943
- }).attr("opacity", 1).attr("x", (m) => m.x0).attr("y", (m) => m.y0).attr("height", (m) => Math.abs(m.y1 - m.y0)).attr("width", (m) => m.x1 - m.x0).attr("fill", (m) => {
4944
- const g = _.current.findIndex((D) => D === m.name);
4945
- return xt(g, !1);
4946
- }), E.selectAll("text.label").data(M, (m) => m.name).join(
4947
- (m) => m.append("text").attr("class", `label ${ci.sankeyLabel}`).attr("x", (g) => g.x0 < F / 2 ? g.x1 + 6 : g.x0 - 6).attr("y", (g) => (g.y1 + g.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (g) => g.x0 < F / 2 ? "start" : "end").style("font-size", F < 648 ? "12px" : "16px").style("font-weight", F < 648 ? "normal" : "bold").style("stroke-width", F < 648 ? "0px" : "0.25px").style("stroke", "#eff1f4").text((g) => g.name).attr("opacity", 0),
4933
+ const { enteringValue: b, exitingValue: v, nodeState: U, stateColor: nt } = z(y);
4934
+ d.style("opacity", 1), d.select("p.title").text(y.name + " :"), d.select("p.top-label").style("display", "block").text("in " + St(b, e)), d.select("p.bottom-label").style("display", "block").text("out " + St(v, e)), d.select("p.small-text").style("display", "block").text(`${U}`).style("color", `${nt}`);
4935
+ }).on("mousemove", (g, y) => {
4936
+ ei(g, d);
4937
+ }).on("mouseout", (g, y) => {
4938
+ d.style("opacity", 0), d.select("p.small-text").style("display", "none"), E.selectAll("path.link").style("stroke", function(b) {
4939
+ const v = b;
4940
+ return `url(#${m.filter((ot) => ot.sourceName === v.sourceName && ot.targetName === v.targetName).node()?.id})`;
4941
+ }).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${et.sankeyEnergyLink}`);
4942
+ }).transition().duration(T).delay(Q).attr("stroke-width", K ? 2 : 2.5).style("stroke", function(g) {
4943
+ const { stateColor: y, nodeState: b } = z(g);
4944
+ return b === "surplus" || b === "minus" ? y : "#52525b";
4945
+ }).attr("opacity", 1).attr("x", (g) => g.x0).attr("y", (g) => g.y0).attr("height", (g) => Math.abs(g.y1 - g.y0)).attr("width", (g) => g.x1 - g.x0).attr("fill", (g) => {
4946
+ const y = j.current.findIndex((b) => b === g.name);
4947
+ return xt(y, !1);
4948
+ }), E.selectAll("text.label").data(x, (g) => g.name).join(
4949
+ (g) => g.append("text").attr("class", `label ${ci.sankeyLabel}`).attr("x", (y) => y.x0 < B / 2 ? y.x1 + 6 : y.x0 - 6).attr("y", (y) => (y.y1 + y.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (y) => y.x0 < B / 2 ? "start" : "end").style("font-size", B < 648 ? "12px" : "16px").style("font-weight", B < 648 ? "normal" : "bold").style("stroke-width", B < 648 ? "0px" : "0.25px").style("stroke", "#eff1f4").text((y) => y.name).attr("opacity", 0),
4948
4950
  void 0,
4949
- (m) => m.remove()
4950
- ).style("font-size", F < 648 ? "12px" : "16px").style("font-weight", F < 648 ? "normal" : "bold").style("stroke-width", F < 648 ? "0px" : "0.25px").transition().duration(L).delay(P).attr("x", (m) => m.x0 < F / 2 ? m.x1 + 6 : m.x0 - 6).attr("y", (m) => (m.y1 + m.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (m) => m.x0 < F / 2 ? "start" : "end").attr("opacity", 1);
4951
+ (g) => g.remove()
4952
+ ).style("font-size", B < 648 ? "12px" : "16px").style("font-weight", B < 648 ? "normal" : "bold").style("stroke-width", B < 648 ? "0px" : "0.25px").transition().duration(T).delay(Q).attr("x", (g) => g.x0 < B / 2 ? g.x1 + 6 : g.x0 - 6).attr("y", (g) => (g.y1 + g.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (g) => g.x0 < B / 2 ? "start" : "end").attr("opacity", 1);
4951
4953
  },
4952
- [n, i, s, f, d, e]
4954
+ [n, i, s, p, _, e]
4953
4955
  );
4954
- return /* @__PURE__ */ O.jsx(
4956
+ return /* @__PURE__ */ H.jsx(
4955
4957
  "div",
4956
4958
  {
4957
- ref: u,
4958
- style: { width: f, height: d, display: "flex", flexDirection: "column" },
4959
- children: /* @__PURE__ */ O.jsxs(
4959
+ ref: h,
4960
+ style: { width: p, height: _, display: "flex", flexDirection: "column" },
4961
+ children: /* @__PURE__ */ H.jsxs(
4960
4962
  "div",
4961
4963
  {
4962
- ref: K,
4963
- className: `${tt["fill-container"]}`,
4964
+ ref: q,
4965
+ className: `${et["fill-container"]}`,
4964
4966
  style: { display: "flex", flexDirection: "column", position: "relative" },
4965
4967
  children: [
4966
- /* @__PURE__ */ O.jsx(
4968
+ /* @__PURE__ */ H.jsx(
4967
4969
  "svg",
4968
4970
  {
4969
- className: `${tt["chart-svg"]} ${tt["fill-container"]}`,
4970
- viewBox: `0 0 ${f} ${d}`,
4971
- children: /* @__PURE__ */ O.jsx("g", { className: "plot-area" })
4971
+ className: `${et["chart-svg"]} ${et["fill-container"]}`,
4972
+ viewBox: `0 0 ${p} ${_}`,
4973
+ children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
4972
4974
  }
4973
4975
  ),
4974
- /* @__PURE__ */ O.jsxs(
4976
+ /* @__PURE__ */ H.jsxs(
4975
4977
  "div",
4976
4978
  {
4977
4979
  style: {
@@ -4982,36 +4984,42 @@ function Sf({ data: t, tooltipFormat: e }) {
4982
4984
  alignItems: "center"
4983
4985
  },
4984
4986
  children: [
4985
- /* @__PURE__ */ O.jsxs(
4987
+ /* @__PURE__ */ H.jsxs(
4986
4988
  "label",
4987
4989
  {
4988
- className: tt["controls-label"],
4990
+ className: et["controls-label"],
4989
4991
  children: [
4990
- /* @__PURE__ */ O.jsx(
4992
+ /* @__PURE__ */ H.jsx(
4991
4993
  "input",
4992
4994
  {
4993
4995
  type: "checkbox",
4994
- className: tt["controls-checkbox"],
4996
+ className: et["controls-checkbox"],
4995
4997
  checked: i,
4996
- onChange: (R) => a(R.target.checked)
4998
+ onChange: (k) => {
4999
+ const A = k.target.checked;
5000
+ A && (u.current = "sort link"), a(A);
5001
+ }
4997
5002
  }
4998
5003
  ),
4999
5004
  "Sort link"
5000
5005
  ]
5001
5006
  }
5002
5007
  ),
5003
- /* @__PURE__ */ O.jsxs(
5008
+ /* @__PURE__ */ H.jsxs(
5004
5009
  "label",
5005
5010
  {
5006
- className: tt["controls-label"],
5011
+ className: et["controls-label"],
5007
5012
  children: [
5008
- /* @__PURE__ */ O.jsx(
5013
+ /* @__PURE__ */ H.jsx(
5009
5014
  "input",
5010
5015
  {
5011
5016
  type: "checkbox",
5012
- className: tt["controls-checkbox"],
5017
+ className: et["controls-checkbox"],
5013
5018
  checked: s,
5014
- onChange: (R) => o(R.target.checked)
5019
+ onChange: (k) => {
5020
+ const A = k.target.checked;
5021
+ A && (u.current = "sort node"), o(A);
5022
+ }
5015
5023
  }
5016
5024
  ),
5017
5025
  "Sort node"
@@ -5021,7 +5029,7 @@ function Sf({ data: t, tooltipFormat: e }) {
5021
5029
  ]
5022
5030
  }
5023
5031
  ),
5024
- /* @__PURE__ */ O.jsx(We, { pCount: 4 })
5032
+ /* @__PURE__ */ H.jsx(We, { pCount: 4 })
5025
5033
  ]
5026
5034
  }
5027
5035
  )
@@ -5030,189 +5038,189 @@ function Sf({ data: t, tooltipFormat: e }) {
5030
5038
  }
5031
5039
  const ee = {};
5032
5040
  function Mf({ data: t, tooltipFormat: e }) {
5033
- const [n, r] = ot(null), [i, a] = ot({ name: "", value: 0 }), [s, o] = ot({ name: "", value: 0 }), c = Wt(!0), [l, u] = he(), { width: h, height: f } = u, d = Wt(null), _ = Wt(null);
5034
- _t(() => {
5035
- if (!_.current || !d.current) return;
5036
- const R = d.current;
5037
- function V(k, q) {
5038
- const U = Math.max(k.length, q.length);
5041
+ const [n, r] = ct(null), [i, a] = ct({ name: "", value: 0 }), [s, o] = ct({ name: "", value: 0 }), c = Pt(!0), [l, u] = he(), { width: h, height: f } = u, p = Pt(null), _ = Pt(null);
5042
+ vt(() => {
5043
+ if (!_.current || !p.current) return;
5044
+ const T = p.current;
5045
+ function q(A, O) {
5046
+ const V = Math.max(A.length, O.length);
5039
5047
  return function(J) {
5040
- let F = "";
5041
- for (let W = 0; W < U; W++)
5042
- F += J < 0.5 ? k[W] ?? "" : q[W] ?? "";
5043
- return F;
5048
+ let Z = "";
5049
+ for (let W = 0; W < V; W++)
5050
+ Z += J < 0.5 ? A[W] ?? "" : O[W] ?? "";
5051
+ return Z;
5044
5052
  };
5045
5053
  }
5046
- ht(R).transition().duration(250).tween("text", function() {
5047
- const k = V(s.name, i.name);
5048
- return function(q) {
5049
- R.textContent = k(q);
5054
+ ht(T).transition().duration(250).tween("text", function() {
5055
+ const A = q(s.name, i.name);
5056
+ return function(O) {
5057
+ T.textContent = A(O);
5050
5058
  };
5051
5059
  });
5052
- const S = _.current;
5053
- ht(S).transition().duration(250).ease(tc).tween("text", function() {
5054
- const k = Nt(s.value, i.value);
5055
- return function(q) {
5056
- S.textContent = St(Math.round(k(q)), e).toLocaleString();
5060
+ const k = _.current;
5061
+ ht(k).transition().duration(250).ease(tc).tween("text", function() {
5062
+ const A = Nt(s.value, i.value);
5063
+ return function(O) {
5064
+ k.textContent = St(Math.round(A(O)), e).toLocaleString();
5057
5065
  };
5058
5066
  });
5059
- }, [i, s]), _t(() => {
5060
- r((R) => (R !== null && (c.current = !1), t));
5067
+ }, [i, s]), vt(() => {
5068
+ r((T) => (T !== null && (c.current = !1), t));
5061
5069
  }, [t]);
5062
- const L = 1e3, K = Et(
5063
- (R) => {
5070
+ const j = 1e3, K = Et(
5071
+ (T) => {
5064
5072
  if (!n)
5065
5073
  return;
5066
- const V = h, S = f, k = 12, q = 1.5;
5067
- if (V === 0 || S === 0)
5074
+ const q = h, k = f, A = 12, O = 1.5;
5075
+ if (q === 0 || k === 0)
5068
5076
  return;
5069
- const U = 25, J = S - U * 2, F = V - U * 2, W = J, et = F, j = { name: "branches", children: n }, E = Math.min(et, W), v = pr(j).sum(function(w) {
5070
- return w.value;
5071
- }).sort(function(w, N) {
5072
- return w.value - N.value;
5073
- }), z = Qc().size([E - 20, E - 20]).padding(2);
5074
- let p = v, C = 1, M = 1;
5075
- const A = z(v), x = A.descendants(), T = [A.x, A.y, A.r * 2 + U], y = ht("#tooltip").style("opacity", 0), I = R.select("svg");
5076
- I.node();
5077
- const P = I.select(".plot-area").attr("transform", "translate(" + V / 2 + "," + S / 2 + ")"), Y = le().domain([-1, 2]).range(["hsl(152,80%,80%)", "hsl(228,30%,40%)"]).interpolate(Yo), Z = P.selectAll("circle").data(x, (w) => w.data.name).join(
5078
- (w) => w.append("circle").attr("class", function(N) {
5079
- return N.parent ? N.children ? ee.node : `${ee.node} ${ee["node--leaf"]}` : `${ee.node} ${ee["node--root"]}`;
5080
- }).style("fill", function(N) {
5081
- return N.children ? Y(N.depth) : "#f0fdfa";
5082
- }).style("cursor", "pointer").transition().duration(L).attr("r", function(N) {
5083
- const $ = E / T[2];
5084
- return N.r * $;
5085
- }).attr("cx", function(N) {
5086
- const $ = E / T[2];
5087
- return (N.x - T[0]) * $;
5088
- }).attr("cy", function(N) {
5089
- const $ = E / T[2];
5090
- return (N.y - T[1]) * $;
5091
- }).style("stroke", "#737373").style("stroke-width", q * M).style("fill", function(N) {
5092
- return N.children ? Y(N.depth) : "#f0fdfa";
5077
+ const V = 25, J = k - V * 2, Z = q - V * 2, W = J, B = Z, C = { name: "branches", children: n }, L = Math.min(B, W), w = pr(C).sum(function(y) {
5078
+ return y.value;
5079
+ }).sort(function(y, b) {
5080
+ return y.value - b.value;
5081
+ }), E = Qc().size([L - 20, L - 20]).padding(2);
5082
+ let d = w, R = 1, M = 1;
5083
+ const N = E(w), x = N.descendants(), S = [N.x, N.y, N.r * 2 + V], m = ht("#tooltip").style("opacity", 0), D = T.select("svg");
5084
+ D.node();
5085
+ const P = D.select(".plot-area").attr("transform", "translate(" + q / 2 + "," + k / 2 + ")"), F = le().domain([-1, 2]).range(["hsl(152,80%,80%)", "hsl(228,30%,40%)"]).interpolate(Yo), Q = P.selectAll("circle").data(x, (y) => y.data.name).join(
5086
+ (y) => y.append("circle").attr("class", function(b) {
5087
+ return b.parent ? b.children ? ee.node : `${ee.node} ${ee["node--leaf"]}` : `${ee.node} ${ee["node--root"]}`;
5088
+ }).style("fill", function(b) {
5089
+ return b.children ? F(b.depth) : "#f0fdfa";
5090
+ }).style("cursor", "pointer").transition().duration(j).attr("r", function(b) {
5091
+ const v = L / S[2];
5092
+ return b.r * v;
5093
+ }).attr("cx", function(b) {
5094
+ const v = L / S[2];
5095
+ return (b.x - S[0]) * v;
5096
+ }).attr("cy", function(b) {
5097
+ const v = L / S[2];
5098
+ return (b.y - S[1]) * v;
5099
+ }).style("stroke", "#737373").style("stroke-width", O * M).style("fill", function(b) {
5100
+ return b.children ? F(b.depth) : "#f0fdfa";
5093
5101
  }),
5094
- (w) => w.transition().duration(L).attr("cx", function(N) {
5095
- const $ = E / T[2];
5096
- return (N.x - T[0]) * $;
5097
- }).attr("cy", function(N) {
5098
- const $ = E / T[2];
5099
- return (N.y - T[1]) * $;
5100
- }).attr("r", function(N) {
5101
- const $ = E / T[2];
5102
- return N.r * $;
5103
- }).style("stroke", function(N) {
5102
+ (y) => y.transition().duration(j).attr("cx", function(b) {
5103
+ const v = L / S[2];
5104
+ return (b.x - S[0]) * v;
5105
+ }).attr("cy", function(b) {
5106
+ const v = L / S[2];
5107
+ return (b.y - S[1]) * v;
5108
+ }).attr("r", function(b) {
5109
+ const v = L / S[2];
5110
+ return b.r * v;
5111
+ }).style("stroke", function(b) {
5104
5112
  return "#737373";
5105
- }).style("stroke-width", q * M).style("fill", function(N) {
5106
- return N.children ? Y(N.depth) : "#f0fdfa";
5113
+ }).style("stroke-width", O * M).style("fill", function(b) {
5114
+ return b.children ? F(b.depth) : "#f0fdfa";
5107
5115
  }),
5108
- (w) => w.transition().duration(L).style("opacity", 0).remove()
5109
- ).on("mouseover", function(w, N) {
5110
- p.parent === N ? m.filter(function($) {
5111
- return $.parent === p || this.style.display === "inline";
5112
- }).style("font-size", k * M).style("fill-opacity", function($) {
5113
- return $.parent === p ? 1 : 0;
5114
- }).style("display", function($) {
5115
- return $.parent === p ? "inline" : "none";
5116
- }) : N === p ? m.filter(function($) {
5117
- return $.parent === p || this.style.display === "inline";
5118
- }).style("font-size", k * M).style("fill-opacity", function($) {
5119
- return $.parent === p ? 1 : 0;
5120
- }).style("display", function($) {
5121
- return $.parent === p ? "inline" : "none";
5122
- }) : (m.filter(function($) {
5123
- return $.data.name != N.data.name;
5124
- }).style("fill-opacity", 0).style("display", "none"), m.filter(function($) {
5125
- return $.data.name === N.data.name;
5126
- }).style("fill-opacity", 1).style("display", "inline")), ht(this).style("stroke"), N != v && ht(this).style("stroke-width", q * M * 2.5).style("stroke", "#e4e4e7"), y.transition().duration(250).style("opacity", 1), a(($) => (o($), { name: N.data.name === "branches" ? "Total" : N.data.name, value: N.value ? N.value : 0 }));
5127
- }).on("mouseout", function(w, N) {
5128
- m.filter(function($) {
5129
- return $.parent === p || this.style.display === "inline";
5130
- }).style("fill-opacity", function($) {
5131
- return $.parent === p ? 1 : 0;
5132
- }).style("display", function($) {
5133
- return $.parent === p ? "inline" : "none";
5134
- }), ht(this).style("stroke-width", q * M).style("stroke", function($) {
5116
+ (y) => y.transition().duration(j).style("opacity", 0).remove()
5117
+ ).on("mouseover", function(y, b) {
5118
+ d.parent === b ? tt.filter(function(v) {
5119
+ return v.parent === d || this.style.display === "inline";
5120
+ }).style("font-size", A * M).style("fill-opacity", function(v) {
5121
+ return v.parent === d ? 1 : 0;
5122
+ }).style("display", function(v) {
5123
+ return v.parent === d ? "inline" : "none";
5124
+ }) : b === d ? tt.filter(function(v) {
5125
+ return v.parent === d || this.style.display === "inline";
5126
+ }).style("font-size", A * M).style("fill-opacity", function(v) {
5127
+ return v.parent === d ? 1 : 0;
5128
+ }).style("display", function(v) {
5129
+ return v.parent === d ? "inline" : "none";
5130
+ }) : (tt.filter(function(v) {
5131
+ return v.data.name != b.data.name;
5132
+ }).style("fill-opacity", 0).style("display", "none"), tt.filter(function(v) {
5133
+ return v.data.name === b.data.name;
5134
+ }).style("fill-opacity", 1).style("display", "inline")), ht(this).style("stroke"), b != w && ht(this).style("stroke-width", O * M * 2.5).style("stroke", "#e4e4e7"), m.transition().duration(250).style("opacity", 1), a((v) => (o(v), { name: b.data.name === "branches" ? "Total" : b.data.name, value: b.value ? b.value : 0 }));
5135
+ }).on("mouseout", function(y, b) {
5136
+ tt.filter(function(v) {
5137
+ return v.parent === d || this.style.display === "inline";
5138
+ }).style("fill-opacity", function(v) {
5139
+ return v.parent === d ? 1 : 0;
5140
+ }).style("display", function(v) {
5141
+ return v.parent === d ? "inline" : "none";
5142
+ }), ht(this).style("stroke-width", O * M).style("stroke", function(v) {
5135
5143
  return "#737373";
5136
- }), y.transition().duration(250).style("opacity", 0);
5137
- }).on("click", function(w, N) {
5138
- if (N === v) {
5139
- D();
5144
+ }), m.transition().duration(250).style("opacity", 0);
5145
+ }).on("click", function(y, b) {
5146
+ if (b === w) {
5147
+ g();
5140
5148
  return;
5141
5149
  }
5142
- p != N ? g(N) : D(), Z.style("stroke-width", q * M), w.stopPropagation();
5143
- }), m = P.selectAll("text").data(x, function(w) {
5144
- return w.data.name;
5150
+ d != b ? z(b) : g(), Q.style("stroke-width", O * M), y.stopPropagation();
5151
+ }), tt = P.selectAll("text").data(x, function(y) {
5152
+ return y.data.name;
5145
5153
  }).join(
5146
- (w) => w.append("text").attr("class", ee.circle_pack_label).text(function(N) {
5147
- return N.data.name;
5148
- }).style("font-size", 12).style("text-anchor", "middle").style("fill-opacity", 0).style("stroke-opacity", 0).style("display", "none").style("pointer-events", "none").style("text-shadow", "0 1px 0 lightblue, 1px 0 0 lightblue, -1px 0 0 lightblue, 0 -1px 0 lightblue").transition().duration(L).attr("transform", function(N) {
5149
- const $ = E / T[2];
5150
- return "translate(" + (N.x - T[0]) * $ + "," + (N.y - T[1]) * $ + ")";
5151
- }).style("fill-opacity", function(N) {
5152
- return N.parent === v ? 1 : 0;
5153
- }).style("display", function(N) {
5154
- return N.parent === v ? "inline" : "none";
5154
+ (y) => y.append("text").attr("class", ee.circle_pack_label).text(function(b) {
5155
+ return b.data.name;
5156
+ }).style("font-size", 12).style("text-anchor", "middle").style("fill-opacity", 0).style("stroke-opacity", 0).style("display", "none").style("pointer-events", "none").style("text-shadow", "0 1px 0 lightblue, 1px 0 0 lightblue, -1px 0 0 lightblue, 0 -1px 0 lightblue").transition().duration(j).attr("transform", function(b) {
5157
+ const v = L / S[2];
5158
+ return "translate(" + (b.x - S[0]) * v + "," + (b.y - S[1]) * v + ")";
5159
+ }).style("fill-opacity", function(b) {
5160
+ return b.parent === w ? 1 : 0;
5161
+ }).style("display", function(b) {
5162
+ return b.parent === w ? "inline" : "none";
5155
5163
  }),
5156
- (w) => w.attr("class", ee.circle_pack_label).transition().duration(L).attr("transform", function(N) {
5157
- const $ = E / T[2];
5158
- return "translate(" + (N.x - T[0]) * $ + "," + (N.y - T[1]) * $ + ")";
5159
- }).style("fill-opacity", function(N) {
5160
- return N.parent === v ? 1 : 0;
5161
- }).style("display", function(N) {
5162
- return N.parent === v ? "inline" : "none";
5164
+ (y) => y.attr("class", ee.circle_pack_label).transition().duration(j).attr("transform", function(b) {
5165
+ const v = L / S[2];
5166
+ return "translate(" + (b.x - S[0]) * v + "," + (b.y - S[1]) * v + ")";
5167
+ }).style("fill-opacity", function(b) {
5168
+ return b.parent === w ? 1 : 0;
5169
+ }).style("display", function(b) {
5170
+ return b.parent === w ? "inline" : "none";
5163
5171
  }),
5164
- (w) => w.transition().duration(L).style("opacity", 0).remove()
5172
+ (y) => y.transition().duration(j).style("opacity", 0).remove()
5165
5173
  );
5166
- m.raise();
5167
- function g(w) {
5168
- p = w;
5169
- const N = E / 2 - U, $ = V / 2, Q = S / 2, nt = E / T[2], lt = (
5174
+ tt.raise();
5175
+ function z(y) {
5176
+ d = y;
5177
+ const b = L / 2 - V, v = q / 2, U = k / 2, nt = L / S[2], ot = (
5170
5178
  /*currentData==="---"?Math.max((d.r * k),0.25):*/
5171
- w.r * nt
5179
+ y.r * nt
5172
5180
  );
5173
- M = lt / N, C = N / lt;
5174
- const ct = (w.x - T[0]) * nt, pt = $ - ct * C, ft = (w.y - T[0]) * nt, ut = Q - ft * C;
5175
- P.transition().duration(1e3).attr("transform", "translate(" + pt + "," + ut + ")scale(" + C + ")"), m.style("font-size", k * M + "px").filter(function(vt) {
5176
- return vt.parent === p || this.style.display === "inline";
5177
- }).style("fill-opacity", function(vt) {
5178
- return vt.parent === p ? 1 : 0;
5179
- }).style("display", function(vt) {
5180
- return vt.parent === p ? "inline" : "none";
5181
+ M = ot / b, R = b / ot;
5182
+ const lt = (y.x - S[0]) * nt, pt = v - lt * R, ft = (y.y - S[0]) * nt, ut = U - ft * R;
5183
+ P.transition().duration(1e3).attr("transform", "translate(" + pt + "," + ut + ")scale(" + R + ")"), tt.style("font-size", A * M + "px").filter(function(_t) {
5184
+ return _t.parent === d || this.style.display === "inline";
5185
+ }).style("fill-opacity", function(_t) {
5186
+ return _t.parent === d ? 1 : 0;
5187
+ }).style("display", function(_t) {
5188
+ return _t.parent === d ? "inline" : "none";
5181
5189
  });
5182
5190
  }
5183
- function D() {
5184
- P.transition().duration(1e3).attr("transform", "translate(" + V / 2 + ", " + S / 2 + ")scale(1)"), p = v, C = 1, M = 1, m.style("font-size", k * M + "px").filter(function(w) {
5185
- return w.parent === p || this.style.display === "inline";
5186
- }).style("fill-opacity", function(w) {
5187
- return w.parent === p ? 1 : 0;
5188
- }).style("display", function(w) {
5189
- return w.parent === p ? "inline" : "none";
5191
+ function g() {
5192
+ P.transition().duration(1e3).attr("transform", "translate(" + q / 2 + ", " + k / 2 + ")scale(1)"), d = w, R = 1, M = 1, tt.style("font-size", A * M + "px").filter(function(y) {
5193
+ return y.parent === d || this.style.display === "inline";
5194
+ }).style("fill-opacity", function(y) {
5195
+ return y.parent === d ? 1 : 0;
5196
+ }).style("display", function(y) {
5197
+ return y.parent === d ? "inline" : "none";
5190
5198
  });
5191
5199
  }
5192
5200
  },
5193
5201
  [n, h, f]
5194
5202
  );
5195
- return /* @__PURE__ */ O.jsx(
5203
+ return /* @__PURE__ */ H.jsx(
5196
5204
  "div",
5197
5205
  {
5198
5206
  ref: l,
5199
5207
  style: { width: h, height: f, display: "flex", flexDirection: "column" },
5200
- children: /* @__PURE__ */ O.jsxs(
5208
+ children: /* @__PURE__ */ H.jsxs(
5201
5209
  "div",
5202
5210
  {
5203
5211
  ref: K,
5204
- className: `${tt["fill-container"]}`,
5212
+ className: `${et["fill-container"]}`,
5205
5213
  style: { display: "flex", flexDirection: "column", position: "relative" },
5206
5214
  children: [
5207
- /* @__PURE__ */ O.jsx(
5215
+ /* @__PURE__ */ H.jsx(
5208
5216
  "svg",
5209
5217
  {
5210
- className: `${tt["chart-svg"]} ${tt["fill-container"]}`,
5218
+ className: `${et["chart-svg"]} ${et["fill-container"]}`,
5211
5219
  viewBox: `0 0 ${h} ${f}`,
5212
- children: /* @__PURE__ */ O.jsx("g", { className: "plot-area" })
5220
+ children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
5213
5221
  }
5214
5222
  ),
5215
- /* @__PURE__ */ O.jsxs(
5223
+ /* @__PURE__ */ H.jsxs(
5216
5224
  "div",
5217
5225
  {
5218
5226
  id: "tooltip",
@@ -5227,8 +5235,8 @@ function Mf({ data: t, tooltipFormat: e }) {
5227
5235
  gap: 2
5228
5236
  },
5229
5237
  children: [
5230
- /* @__PURE__ */ O.jsx("p", { ref: d, id: "name", children: "Test tooltip" }),
5231
- /* @__PURE__ */ O.jsx("p", { ref: _, id: "value", children: "Test tooltip" })
5238
+ /* @__PURE__ */ H.jsx("p", { ref: p, id: "name", children: "Test tooltip" }),
5239
+ /* @__PURE__ */ H.jsx("p", { ref: _, id: "value", children: "Test tooltip" })
5232
5240
  ]
5233
5241
  }
5234
5242
  )