chartformers 1.0.44 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chartformers.es.js +1369 -1357
- package/dist/chartformers.umd.js +13 -13
- package/package.json +1 -6
package/dist/chartformers.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import aa, { useRef as
|
|
1
|
+
import aa, { useRef as Pt, useEffect as vt, useState as ft } from "react";
|
|
2
2
|
import { createPortal as kn } from "react-dom";
|
|
3
|
-
var
|
|
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(
|
|
49
|
-
if (
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
52
|
-
if (typeof
|
|
53
|
-
switch (
|
|
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
|
|
56
|
+
case q:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case T:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case F:
|
|
61
61
|
return "Suspense";
|
|
62
62
|
case J:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case B:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
|
-
if (typeof
|
|
68
|
-
switch (typeof
|
|
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
|
-
),
|
|
71
|
-
case
|
|
70
|
+
), m.$$typeof) {
|
|
71
|
+
case j:
|
|
72
72
|
return "Portal";
|
|
73
|
+
case A:
|
|
74
|
+
return m.displayName || "Context";
|
|
73
75
|
case k:
|
|
74
|
-
return
|
|
75
|
-
case
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return
|
|
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
|
-
|
|
83
|
+
D = m._payload, m = m._init;
|
|
84
84
|
try {
|
|
85
|
-
return t(
|
|
85
|
+
return t(m(D));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
function e(
|
|
92
|
-
return "" +
|
|
91
|
+
function e(m) {
|
|
92
|
+
return "" + m;
|
|
93
93
|
}
|
|
94
|
-
function n(
|
|
94
|
+
function n(m) {
|
|
95
95
|
try {
|
|
96
|
-
e(
|
|
97
|
-
var
|
|
96
|
+
e(m);
|
|
97
|
+
var D = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
D = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var P =
|
|
101
|
+
if (D) {
|
|
102
|
+
D = console;
|
|
103
|
+
var P = D.error, V = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
104
104
|
return P.call(
|
|
105
|
-
|
|
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
|
-
|
|
108
|
-
), e(
|
|
107
|
+
V
|
|
108
|
+
), e(m);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function r(
|
|
112
|
-
if (
|
|
113
|
-
if (typeof
|
|
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
|
|
117
|
-
return
|
|
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
|
|
124
|
-
return
|
|
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(
|
|
130
|
-
if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
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
|
|
134
|
+
return m.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function o(
|
|
136
|
+
function o(m, D) {
|
|
137
137
|
function P() {
|
|
138
|
-
|
|
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
|
-
|
|
140
|
+
D
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
P.isReactWarning = !0, Object.defineProperty(
|
|
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
|
|
150
|
-
return M[
|
|
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
|
-
)),
|
|
152
|
+
)), m = this.props.ref, m !== void 0 ? m : null;
|
|
153
153
|
}
|
|
154
|
-
function l(
|
|
155
|
-
var
|
|
156
|
-
return
|
|
157
|
-
$$typeof:
|
|
158
|
-
type:
|
|
159
|
-
key:
|
|
154
|
+
function l(m, D, P, V, Q, tt) {
|
|
155
|
+
var z = P.ref;
|
|
156
|
+
return m = {
|
|
157
|
+
$$typeof: v,
|
|
158
|
+
type: m,
|
|
159
|
+
key: D,
|
|
160
160
|
props: P,
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
161
|
+
_owner: V
|
|
162
|
+
}, (z !== void 0 ? z : null) !== null ? Object.defineProperty(m, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
get: c
|
|
165
|
-
}) : Object.defineProperty(
|
|
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(
|
|
170
|
+
}), Object.defineProperty(m, "_debugInfo", {
|
|
171
171
|
configurable: !1,
|
|
172
172
|
enumerable: !1,
|
|
173
173
|
writable: !0,
|
|
174
174
|
value: null
|
|
175
|
-
}), Object.defineProperty(
|
|
175
|
+
}), Object.defineProperty(m, "_debugStack", {
|
|
176
176
|
configurable: !1,
|
|
177
177
|
enumerable: !1,
|
|
178
178
|
writable: !0,
|
|
179
|
-
value:
|
|
180
|
-
}), Object.defineProperty(
|
|
179
|
+
value: Q
|
|
180
|
+
}), Object.defineProperty(m, "_debugTask", {
|
|
181
181
|
configurable: !1,
|
|
182
182
|
enumerable: !1,
|
|
183
183
|
writable: !0,
|
|
184
|
-
value:
|
|
185
|
-
}), Object.freeze && (Object.freeze(
|
|
184
|
+
value: tt
|
|
185
|
+
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
186
186
|
}
|
|
187
|
-
function u(
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (z
|
|
192
|
-
for (
|
|
193
|
-
h(
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function u(m, D, P, V, Q, tt) {
|
|
188
|
+
var z = D.children;
|
|
189
|
+
if (z !== void 0)
|
|
190
|
+
if (V)
|
|
191
|
+
if (E(z)) {
|
|
192
|
+
for (V = 0; V < z.length; V++)
|
|
193
|
+
h(z[V]);
|
|
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(
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
199
|
+
else h(z);
|
|
200
|
+
if (w.call(D, "key")) {
|
|
201
|
+
z = t(m);
|
|
202
|
+
var y = Object.keys(D).filter(function(_) {
|
|
203
|
+
return _ !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
V = 0 < y.length ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}", S[z + V] || (y = 0 < y.length ? "{" + y.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
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
),
|
|
212
|
+
V,
|
|
213
|
+
z,
|
|
214
|
+
y,
|
|
215
|
+
z
|
|
216
|
+
), S[z + V] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
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
|
|
221
|
-
|
|
222
|
-
} else P =
|
|
223
|
-
return
|
|
220
|
+
for (var g in D)
|
|
221
|
+
g !== "key" && (P[g] = D[g]);
|
|
222
|
+
} else P = D;
|
|
223
|
+
return z && o(
|
|
224
224
|
P,
|
|
225
|
-
typeof
|
|
225
|
+
typeof m == "function" ? m.displayName || m.name || "Unknown" : m
|
|
226
226
|
), l(
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
m,
|
|
228
|
+
z,
|
|
229
229
|
P,
|
|
230
230
|
i(),
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
Q,
|
|
232
|
+
tt
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function h(
|
|
236
|
-
f(
|
|
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(
|
|
239
|
-
return typeof
|
|
238
|
+
function f(m) {
|
|
239
|
+
return typeof m == "object" && m !== null && m.$$typeof === v;
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var p = aa, v = 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"), F = 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
|
-
|
|
245
|
-
react_stack_bottom_frame: function(
|
|
246
|
-
return
|
|
244
|
+
p = {
|
|
245
|
+
react_stack_bottom_frame: function(m) {
|
|
246
|
+
return m();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
250
|
-
|
|
249
|
+
var R, M = {}, N = p.react_stack_bottom_frame.bind(
|
|
250
|
+
p,
|
|
251
251
|
a
|
|
252
|
-
)(), x =
|
|
253
|
-
Me.Fragment = K, Me.jsx = function(
|
|
254
|
-
var
|
|
252
|
+
)(), x = d(r(a)), S = {};
|
|
253
|
+
Me.Fragment = K, Me.jsx = function(m, D, P) {
|
|
254
|
+
var V = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
255
255
|
return u(
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
m,
|
|
257
|
+
D,
|
|
258
258
|
P,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
V ? Error("react-stack-top-frame") : N,
|
|
261
|
+
V ? d(r(m)) : x
|
|
262
262
|
);
|
|
263
|
-
}, Me.jsxs = function(
|
|
264
|
-
var
|
|
263
|
+
}, Me.jsxs = function(m, D, P) {
|
|
264
|
+
var V = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return u(
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
m,
|
|
267
|
+
D,
|
|
268
268
|
P,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
V ? Error("react-stack-top-frame") : N,
|
|
271
|
+
V ? 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" ?
|
|
278
|
+
return xr || (xr = 1, process.env.NODE_ENV === "production" ? Xe.exports = sa() : Xe.exports = oa()), Xe.exports;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
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(
|
|
434
|
-
var
|
|
435
|
-
|
|
436
|
-
return isFinite(
|
|
437
|
-
}), W.attr("opacity", br).attr("transform", function(
|
|
438
|
-
var
|
|
439
|
-
return h((
|
|
440
|
-
})),
|
|
441
|
-
return h(
|
|
442
|
-
}),
|
|
443
|
-
this.__axis =
|
|
433
|
+
function f(p) {
|
|
434
|
+
var v = 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, F = O.selectAll(".domain").data([null]), J = O.selectAll(".tick").data(v, e).order(), Z = J.exit(), W = J.enter().append("g").attr("class", "tick"), B = J.select("line"), C = J.select("text");
|
|
435
|
+
F = F.merge(F.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 && (F = F.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(), F.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(
|
|
447
|
-
return arguments.length ? (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(
|
|
451
|
-
return arguments.length ? (n =
|
|
452
|
-
}, f.tickValues = function(
|
|
453
|
-
return arguments.length ? (r =
|
|
454
|
-
}, f.tickFormat = function(
|
|
455
|
-
return arguments.length ? (i =
|
|
456
|
-
}, f.tickSize = function(
|
|
457
|
-
return arguments.length ? (a = s = +
|
|
458
|
-
}, f.tickSizeInner = function(
|
|
459
|
-
return arguments.length ? (a = +
|
|
460
|
-
}, f.tickSizeOuter = function(
|
|
461
|
-
return arguments.length ? (s = +
|
|
462
|
-
}, f.tickPadding = function(
|
|
463
|
-
return arguments.length ? (o = +
|
|
464
|
-
}, f.offset = function(
|
|
465
|
-
return arguments.length ? (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
|
|
535
|
+
var Bn = "http://www.w3.org/1999/xhtml";
|
|
536
536
|
const kr = {
|
|
537
537
|
svg: "http://www.w3.org/2000/svg",
|
|
538
|
-
xhtml:
|
|
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 ===
|
|
550
|
+
return n === Bn && e.documentElement.namespaceURI === Bn ? e.createElement(t) : e.createElementNS(n, t);
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
function ja(t) {
|
|
@@ -606,29 +606,29 @@ function yi(t) {
|
|
|
606
606
|
return e.matches(t);
|
|
607
607
|
};
|
|
608
608
|
}
|
|
609
|
-
var
|
|
610
|
-
function
|
|
609
|
+
var Fa = Array.prototype.find;
|
|
610
|
+
function Va(t) {
|
|
611
611
|
return function() {
|
|
612
|
-
return
|
|
612
|
+
return Fa.call(this.children, t);
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
615
|
function Wa() {
|
|
616
616
|
return this.firstElementChild;
|
|
617
617
|
}
|
|
618
618
|
function Ya(t) {
|
|
619
|
-
return this.select(t == null ? Wa :
|
|
619
|
+
return this.select(t == null ? Wa : Va(typeof t == "function" ? t : yi(t)));
|
|
620
620
|
}
|
|
621
|
-
var
|
|
622
|
-
function
|
|
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
|
|
627
|
+
return Ba.call(this.children, t);
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
630
|
function Ua(t) {
|
|
631
|
-
return this.selectAll(t == null ?
|
|
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),
|
|
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] =
|
|
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
|
-
|
|
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,
|
|
693
|
-
n(u, h,
|
|
694
|
-
for (var
|
|
695
|
-
if (
|
|
696
|
-
for (
|
|
697
|
-
|
|
692
|
+
var u = r[l], h = i[l], f = h.length, p = rs(t.call(u, u && u.__data__, l, r)), v = p.length, j = o[l] = new Array(v), K = s[l] = new Array(v), 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 < v; ++q)
|
|
695
|
+
if (A = j[q]) {
|
|
696
|
+
for (q >= k && (k = q + 1); !(O = K[k]) && ++k < v; ) ;
|
|
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),
|
|
715
|
-
(
|
|
714
|
+
for (var l = n[c], u = r[c], h = l.length, f = o[c] = new Array(h), p, v = 0; v < h; ++v)
|
|
715
|
+
(p = l[v] || u[v]) && (f[v] = p);
|
|
716
716
|
for (; c < i; ++c)
|
|
717
717
|
o[c] = n[c];
|
|
718
718
|
return new At(o, this._parents);
|
|
@@ -933,22 +933,22 @@ function qs(t) {
|
|
|
933
933
|
this.innerHTML = e ?? "";
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Fs(t) {
|
|
937
937
|
return arguments.length ? this.each(t == null ? Hs : (typeof t == "function" ? qs : Os)(t)) : this.node().innerHTML;
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Vs() {
|
|
940
940
|
this.nextSibling && this.parentNode.appendChild(this);
|
|
941
941
|
}
|
|
942
942
|
function Ws() {
|
|
943
|
-
return this.each(
|
|
943
|
+
return this.each(Vs);
|
|
944
944
|
}
|
|
945
945
|
function Ys() {
|
|
946
946
|
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Bs() {
|
|
949
949
|
return this.each(Ys);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
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));
|
|
@@ -1091,10 +1091,10 @@ At.prototype = qe.prototype = {
|
|
|
1091
1091
|
property: Rs,
|
|
1092
1092
|
classed: Ds,
|
|
1093
1093
|
text: zs,
|
|
1094
|
-
html:
|
|
1094
|
+
html: Fs,
|
|
1095
1095
|
raise: Ws,
|
|
1096
|
-
lower:
|
|
1097
|
-
append:
|
|
1096
|
+
lower: Bs,
|
|
1097
|
+
append: Xs,
|
|
1098
1098
|
insert: Us,
|
|
1099
1099
|
remove: Gs,
|
|
1100
1100
|
clone: to,
|
|
@@ -1103,10 +1103,10 @@ At.prototype = qe.prototype = {
|
|
|
1103
1103
|
dispatch: co,
|
|
1104
1104
|
[Symbol.iterator]: uo
|
|
1105
1105
|
};
|
|
1106
|
-
function
|
|
1106
|
+
function dt(t) {
|
|
1107
1107
|
return typeof t == "string" ? new At([[document.querySelector(t)]], [document.documentElement]) : new At([[t]], $i);
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function Fe(t, e, n) {
|
|
1110
1110
|
t.prototype = e.prototype = n, n.constructor = t;
|
|
1111
1111
|
}
|
|
1112
1112
|
function An(t, e) {
|
|
@@ -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*",
|
|
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,
|
|
@@ -1266,7 +1266,7 @@ var Ie = 0.7, un = 1 / Ie, ve = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\
|
|
|
1266
1266
|
yellow: 16776960,
|
|
1267
1267
|
yellowgreen: 10145074
|
|
1268
1268
|
};
|
|
1269
|
-
|
|
1269
|
+
Fe(ue, se, {
|
|
1270
1270
|
copy(t) {
|
|
1271
1271
|
return Object.assign(new this.constructor(), this, t);
|
|
1272
1272
|
},
|
|
@@ -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
|
|
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
|
-
|
|
1315
|
+
Fe(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
|
},
|
|
@@ -1371,7 +1371,7 @@ function ko(t, e, n, r) {
|
|
|
1371
1371
|
function Rt(t, e, n, r) {
|
|
1372
1372
|
this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
|
|
1373
1373
|
}
|
|
1374
|
-
|
|
1374
|
+
Fe(Rt, ko, An(ue, {
|
|
1375
1375
|
brighter(t) {
|
|
1376
1376
|
return t = t == null ? un : Math.pow(un, t), new Rt(this.h, this.s, this.l * t, this.opacity);
|
|
1377
1377
|
},
|
|
@@ -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
|
|
1413
|
-
if (t instanceof
|
|
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
|
|
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
|
|
1419
|
+
return arguments.length === 1 ? Ci(t) : new zt(t, e, n, r ?? 1);
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function zt(t, e, n, r) {
|
|
1422
1422
|
this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
|
|
1423
1423
|
}
|
|
1424
|
-
|
|
1424
|
+
Fe(zt, So, An(ue, {
|
|
1425
1425
|
brighter(t) {
|
|
1426
|
-
return new
|
|
1426
|
+
return new zt(this.l + hn * (t ?? 1), this.a, this.b, this.opacity);
|
|
1427
1427
|
},
|
|
1428
1428
|
darker(t) {
|
|
1429
|
-
return new
|
|
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
|
|
1455
|
-
if (t instanceof
|
|
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
|
|
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
|
|
1460
|
+
return arguments.length === 1 ? Mo(t) : new Wt(t, e, n, r ?? 1);
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
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
|
|
1466
|
+
if (isNaN(t.h)) return new zt(t.l, 0, 0, t.opacity);
|
|
1467
1467
|
var e = t.h * $o;
|
|
1468
|
-
return new
|
|
1468
|
+
return new zt(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
|
|
1469
1469
|
}
|
|
1470
|
-
|
|
1470
|
+
Fe(Wt, Kn, An(ue, {
|
|
1471
1471
|
brighter(t) {
|
|
1472
|
-
return new
|
|
1472
|
+
return new Wt(this.h, this.c, this.l + hn * (t ?? 1), this.opacity);
|
|
1473
1473
|
},
|
|
1474
1474
|
darker(t) {
|
|
1475
|
-
return new
|
|
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 =
|
|
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,
|
|
1616
|
+
function a(l, u, h, f, p, v) {
|
|
1617
1617
|
if (l !== h || u !== f) {
|
|
1618
|
-
var
|
|
1619
|
-
|
|
1620
|
-
} else (h || f) &&
|
|
1618
|
+
var j = p.push("translate(", null, e, null, n);
|
|
1619
|
+
v.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,21 +1625,21 @@ 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,
|
|
1628
|
+
function c(l, u, h, f, p, v) {
|
|
1629
1629
|
if (l !== h || u !== f) {
|
|
1630
|
-
var
|
|
1631
|
-
|
|
1632
|
-
} else (h !== 1 || f !== 1) &&
|
|
1630
|
+
var j = p.push(i(p) + "scale(", null, ",", null, ")");
|
|
1631
|
+
v.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(
|
|
1637
|
-
for (var
|
|
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 v = -1, j = f.length, K; ++v < j; ) h[(K = f[v]).i] = K.x(p);
|
|
1638
1638
|
return h.join("");
|
|
1639
1639
|
};
|
|
1640
1640
|
};
|
|
1641
1641
|
}
|
|
1642
|
-
var
|
|
1642
|
+
var Fo = Ii(Oo, "px, ", "px)", "deg)"), Vo = Ii(qo, ", ", ")", ")");
|
|
1643
1643
|
function Wo(t) {
|
|
1644
1644
|
return function(e, n) {
|
|
1645
1645
|
var r = t((e = Kn(e)).h, (n = Kn(n)).h), i = Pe(e.c, n.c), a = Pe(e.l, n.l), s = Pe(e.opacity, n.opacity);
|
|
@@ -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(
|
|
1656
|
+
return oe || (Hi(Bo), oe = He.now() + Sn);
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
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
|
|
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
|
-
|
|
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
|
|
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,
|
|
1757
|
+
var u, h, f, p;
|
|
1758
1758
|
if (n.state !== jr) return c();
|
|
1759
1759
|
for (u in r)
|
|
1760
|
-
if (
|
|
1761
|
-
if (
|
|
1762
|
-
|
|
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
|
-
(
|
|
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 =
|
|
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 =
|
|
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,13 +1844,13 @@ 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 =
|
|
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];
|
|
1851
1851
|
};
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function Fi(t, e) {
|
|
1854
1854
|
var n;
|
|
1855
1855
|
return (typeof e == "number" ? Nt : e instanceof se ? dn : (n = se(e)) ? (e = n, dn) : ji)(t, e);
|
|
1856
1856
|
}
|
|
@@ -1893,7 +1893,7 @@ function cl(t, e, n) {
|
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
1895
1895
|
function ul(t, e) {
|
|
1896
|
-
var n = $n(t), r = n === "transform" ?
|
|
1896
|
+
var n = $n(t), r = n === "transform" ? Vo : Fi;
|
|
1897
1897
|
return this.attrTween(t, typeof e == "function" ? (n.local ? cl : ll)(n, r, hr(this, "attr." + t, e)) : e == null ? (n.local ? al : il)(n) : (n.local ? ol : sl)(n, r, e));
|
|
1898
1898
|
}
|
|
1899
1899
|
function fl(t, e) {
|
|
@@ -1946,12 +1946,12 @@ function xl(t) {
|
|
|
1946
1946
|
}
|
|
1947
1947
|
function vl(t, e) {
|
|
1948
1948
|
return function() {
|
|
1949
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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,
|
|
1993
|
-
(f = c[
|
|
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
|
|
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 :
|
|
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
|
|
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),
|
|
2040
|
-
(
|
|
2039
|
+
for (var f = t.call(u, u.__data__, h, c), p, v = Ct(u, n), j = 0, K = f.length; j < K; ++j)
|
|
2040
|
+
(p = f[j]) && Mn(p, e, n, j, f, v);
|
|
2041
2041
|
a.push(f), s.push(u);
|
|
2042
2042
|
}
|
|
2043
|
-
return new
|
|
2043
|
+
return new Bt(a, s, e, n);
|
|
2044
2044
|
}
|
|
2045
2045
|
var jl = qe.prototype.constructor;
|
|
2046
2046
|
function Pl() {
|
|
@@ -2053,7 +2053,7 @@ function Il(t, e) {
|
|
|
2053
2053
|
return a === s ? null : a === n && s === r ? i : i = e(n = a, r = s);
|
|
2054
2054
|
};
|
|
2055
2055
|
}
|
|
2056
|
-
function
|
|
2056
|
+
function Vi(t) {
|
|
2057
2057
|
return function() {
|
|
2058
2058
|
this.style.removeProperty(t);
|
|
2059
2059
|
};
|
|
@@ -2075,24 +2075,24 @@ 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 =
|
|
2078
|
+
var c = Ht(this, t), l = c.on, u = c.value[a] == null ? o || (o = Vi(e)) : void 0;
|
|
2079
2079
|
(l !== n || i !== u) && (r = (n = l).copy()).on(s, i = u), c.on = r;
|
|
2080
2080
|
};
|
|
2081
2081
|
}
|
|
2082
2082
|
function ql(t, e, n) {
|
|
2083
|
-
var r = (t += "") == "transform" ?
|
|
2084
|
-
return e == null ? this.styleTween(t, Il(t, r)).on("end.style." + t,
|
|
2083
|
+
var r = (t += "") == "transform" ? Fo : Fi;
|
|
2084
|
+
return e == null ? this.styleTween(t, Il(t, r)).on("end.style." + t, Vi(t)) : typeof e == "function" ? this.styleTween(t, Hl(t, r, hr(this, "style." + t, e))).each(Ol(this._id, t)) : this.styleTween(t, zl(t, r, e), n).on("end.style." + t, null);
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2086
|
+
function Fl(t, e, n) {
|
|
2087
2087
|
return function(r) {
|
|
2088
2088
|
this.style.setProperty(t, e.call(this, r), n);
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function Vl(t, e, n) {
|
|
2092
2092
|
var r, i;
|
|
2093
2093
|
function a() {
|
|
2094
2094
|
var s = e.apply(this, arguments);
|
|
2095
|
-
return s !== i && (r = (i = s) &&
|
|
2095
|
+
return s !== i && (r = (i = s) && Fl(t, s, n)), r;
|
|
2096
2096
|
}
|
|
2097
2097
|
return a._value = e, a;
|
|
2098
2098
|
}
|
|
@@ -2101,21 +2101,21 @@ function Wl(t, e, n) {
|
|
|
2101
2101
|
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
|
|
2102
2102
|
if (e == null) return this.tween(r, null);
|
|
2103
2103
|
if (typeof e != "function") throw new Error();
|
|
2104
|
-
return this.tween(r,
|
|
2104
|
+
return this.tween(r, Vl(t, e, n ?? ""));
|
|
2105
2105
|
}
|
|
2106
2106
|
function Yl(t) {
|
|
2107
2107
|
return function() {
|
|
2108
2108
|
this.textContent = t;
|
|
2109
2109
|
};
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
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
|
|
2118
|
-
return this.tween("text", typeof t == "function" ?
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
2174
|
-
|
|
2175
|
-
constructor:
|
|
2173
|
+
var Ft = qe.prototype;
|
|
2174
|
+
Bt.prototype = {
|
|
2175
|
+
constructor: Bt,
|
|
2176
2176
|
select: Ll,
|
|
2177
2177
|
selectAll: Dl,
|
|
2178
|
-
selectChild:
|
|
2179
|
-
selectChildren:
|
|
2178
|
+
selectChild: Ft.selectChild,
|
|
2179
|
+
selectChildren: Ft.selectChildren,
|
|
2180
2180
|
filter: Nl,
|
|
2181
2181
|
merge: Sl,
|
|
2182
2182
|
selection: Pl,
|
|
2183
2183
|
transition: Gl,
|
|
2184
|
-
call:
|
|
2185
|
-
nodes:
|
|
2186
|
-
node:
|
|
2187
|
-
size:
|
|
2188
|
-
empty:
|
|
2189
|
-
each:
|
|
2184
|
+
call: Ft.call,
|
|
2185
|
+
nodes: Ft.nodes,
|
|
2186
|
+
node: Ft.node,
|
|
2187
|
+
size: Ft.size,
|
|
2188
|
+
empty: Ft.empty,
|
|
2189
|
+
each: Ft.each,
|
|
2190
2190
|
on: Rl,
|
|
2191
2191
|
attr: ul,
|
|
2192
2192
|
attrTween: gl,
|
|
2193
2193
|
style: ql,
|
|
2194
2194
|
styleTween: Wl,
|
|
2195
|
-
text:
|
|
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]:
|
|
2204
|
+
[Symbol.iterator]: Ft[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
|
|
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
|
|
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
|
|
2281
|
-
Math.abs(
|
|
2280
|
+
let p = r - s, v = i - o, j = c * c + l * l, K = p * p + v * v, 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 * v)},${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
|
|
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 - (
|
|
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,
|
|
2401
|
-
|
|
2402
|
-
var
|
|
2403
|
-
|
|
2404
|
-
function
|
|
2405
|
-
var
|
|
2406
|
-
if (
|
|
2407
|
-
|
|
2400
|
+
var f = h.fill, p = h.align, v = 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 F = 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 = F, w = J, E, d, R;
|
|
2406
|
+
if (O === "c")
|
|
2407
|
+
w = Z(C) + w, C = "";
|
|
2408
2408
|
else {
|
|
2409
|
-
|
|
2410
|
-
var M =
|
|
2411
|
-
if (
|
|
2412
|
-
for (
|
|
2413
|
-
if (
|
|
2414
|
-
|
|
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 && v !== "+" && (M = !1), L = (M ? v === "(" ? v : o : v === "-" || v === "(" ? "" : v) + L, w = (O === "s" ? qr[8 + Bi / 3] : "") + w + (M && v === "(" ? ")" : ""), 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
|
-
|
|
2420
|
-
var
|
|
2421
|
-
switch (
|
|
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
|
-
|
|
2423
|
+
C = L + C + w + x;
|
|
2424
2424
|
break;
|
|
2425
2425
|
case "=":
|
|
2426
|
-
|
|
2426
|
+
C = L + x + C + w;
|
|
2427
2427
|
break;
|
|
2428
2428
|
case "^":
|
|
2429
|
-
|
|
2429
|
+
C = x.slice(0, N = x.length >> 1) + L + C + w + x.slice(N);
|
|
2430
2430
|
break;
|
|
2431
2431
|
default:
|
|
2432
|
-
|
|
2432
|
+
C = x + L + C + w;
|
|
2433
2433
|
break;
|
|
2434
2434
|
}
|
|
2435
|
-
return a(
|
|
2435
|
+
return a(C);
|
|
2436
2436
|
}
|
|
2437
|
-
return
|
|
2437
|
+
return B.toString = function() {
|
|
2438
2438
|
return h + "";
|
|
2439
|
-
},
|
|
2439
|
+
}, B;
|
|
2440
2440
|
}
|
|
2441
2441
|
function u(h, f) {
|
|
2442
|
-
var
|
|
2443
|
-
return function(
|
|
2444
|
-
return
|
|
2442
|
+
var p = l((h = xn(h), h.type = "f", h)), v = Math.max(-8, Math.min(8, Math.floor(ke(f) / 3))) * 3, j = Math.pow(10, -v), K = qr[8 + v / 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,
|
|
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,
|
|
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)));
|
|
@@ -2611,7 +2611,7 @@ function Oc(t) {
|
|
|
2611
2611
|
if (typeof t != "function") throw new Error();
|
|
2612
2612
|
return t;
|
|
2613
2613
|
}
|
|
2614
|
-
function
|
|
2614
|
+
function Fr() {
|
|
2615
2615
|
return 0;
|
|
2616
2616
|
}
|
|
2617
2617
|
function qc(t) {
|
|
@@ -2619,22 +2619,22 @@ function qc(t) {
|
|
|
2619
2619
|
return t;
|
|
2620
2620
|
};
|
|
2621
2621
|
}
|
|
2622
|
-
const
|
|
2622
|
+
const Fc = 1664525, Vc = 1013904223, Vr = 4294967296;
|
|
2623
2623
|
function Wc() {
|
|
2624
2624
|
let t = 1;
|
|
2625
|
-
return () => (t = (
|
|
2625
|
+
return () => (t = (Fc * t + Vc) % Vr) / Vr;
|
|
2626
2626
|
}
|
|
2627
2627
|
function Yc(t) {
|
|
2628
2628
|
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
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
|
|
2637
|
-
for (var n = 0, r = (t =
|
|
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,
|
|
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, v = 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 * v - f * j, F = (v * A - j * k) / (O * 2) - r, J = (j * K - v * 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 + F * J + Z * W), L = F * F + 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 +
|
|
2696
|
-
y: i +
|
|
2697
|
-
r:
|
|
2695
|
+
x: r + F + 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
|
|
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,22 +2735,22 @@ 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 =
|
|
2739
|
-
(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 =
|
|
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) {
|
|
2747
2747
|
return Math.sqrt(t.value);
|
|
2748
2748
|
}
|
|
2749
2749
|
function Qc() {
|
|
2750
|
-
var t = null, e = 1, n = 1, r =
|
|
2750
|
+
var t = null, e = 1, n = 1, r = Fr;
|
|
2751
2751
|
function i(a) {
|
|
2752
2752
|
const s = Wc();
|
|
2753
|
-
return a.x = e / 2, a.y = n / 2, t ? a.eachBefore(
|
|
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(Fr, 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
|
|
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,
|
|
2827
|
-
a = (
|
|
2828
|
-
var K = wa(f).map(function(
|
|
2829
|
-
return
|
|
2826
|
+
var f = e().length, p = i < r, v = p ? i : r, j = p ? r : i;
|
|
2827
|
+
a = (j - v) / Math.max(1, f - c + l * 2), o && (a = Math.floor(a)), v += (j - v - a * (f - c)) * u, s = a * (1 - c), o && (v = Math.round(v), s = Math.round(s));
|
|
2828
|
+
var K = wa(f).map(function(T) {
|
|
2829
|
+
return v + a * T;
|
|
2830
2830
|
});
|
|
2831
|
-
return n(
|
|
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,
|
|
2922
|
-
return r = f, i =
|
|
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),
|
|
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":
|
|
@@ -2979,12 +2979,12 @@ function le() {
|
|
|
2979
2979
|
return au(t, le());
|
|
2980
2980
|
}, gr.apply(t, arguments), cu(t);
|
|
2981
2981
|
}
|
|
2982
|
-
function
|
|
2982
|
+
function Ve(t) {
|
|
2983
2983
|
for (var e = t.length / 6 | 0, n = new Array(e), r = 0; r < e; ) n[r] = "#" + t.slice(r * 6, ++r * 6);
|
|
2984
2984
|
return n;
|
|
2985
2985
|
}
|
|
2986
|
-
const Gi =
|
|
2987
|
-
function
|
|
2986
|
+
const Gi = Ve("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"), Zi = Ve("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"), Qi = Ve("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"), ta = Ve("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"), ea = Ve("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
|
|
2987
|
+
function pt(t) {
|
|
2988
2988
|
return function() {
|
|
2989
2989
|
return t;
|
|
2990
2990
|
};
|
|
@@ -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,
|
|
3035
|
-
return
|
|
3036
|
-
cx:
|
|
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, v = n + u, j = r + h, K = (f + v) / 2, T = (p + j) / 2, q = v - f, k = j - p, A = q * q + k * k, O = i - a, F = f * j - v * p, J = (k < 0 ? -1 : 1) * ye(uu(0, O * O * A - F * F)), Z = (F * k - q * J) / A, W = (-F * q - k * J) / A, B = (F * k + q * J) / A, C = (-F * 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:
|
|
3041
|
-
y11: W * (i /
|
|
3040
|
+
x11: Z * (i / O - 1),
|
|
3041
|
+
y11: W * (i / O - 1)
|
|
3042
3042
|
};
|
|
3043
3043
|
}
|
|
3044
3044
|
function Qr() {
|
|
3045
|
-
var t = du, e = pu, n =
|
|
3045
|
+
var t = du, e = pu, n = pt(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),
|
|
3048
|
-
if (o || (o = u = c()),
|
|
3047
|
+
var u, h, f = +t.apply(this, arguments), p = +e.apply(this, arguments), v = i.apply(this, arguments) - _n, j = a.apply(this, arguments) - _n, K = Gr(j - v), T = j > v;
|
|
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(
|
|
3050
|
+
o.moveTo(p * te(v), p * Dt(v)), o.arc(0, 0, p, v, j, !T), f > wt && (o.moveTo(f * te(j), f * Dt(j)), o.arc(0, 0, f, j, v, T));
|
|
3051
3051
|
else {
|
|
3052
|
-
var
|
|
3052
|
+
var q = v, k = j, A = v, O = j, F = 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
|
|
3055
|
-
(
|
|
3054
|
+
var d = Zr(W / f * Dt(Z)), R = Zr(W / p * Dt(Z));
|
|
3055
|
+
(F -= d * 2) > wt ? (d *= T ? 1 : -1, A += d, O -= d) : (F = 0, A = O = (v + j) / 2), (J -= R * 2) > wt ? (R *= T ? 1 : -1, q += R, k -= R) : (J = 0, q = k = (v + j) / 2);
|
|
3056
3056
|
}
|
|
3057
|
-
var M =
|
|
3058
|
-
if (
|
|
3059
|
-
var
|
|
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), V = f * Dt(A), Q;
|
|
3060
3060
|
if (K < Oe)
|
|
3061
|
-
if (
|
|
3062
|
-
var
|
|
3063
|
-
|
|
3061
|
+
if (Q = xu(M, N, P, V, m, D, x, S)) {
|
|
3062
|
+
var tt = M - Q[0], z = N - Q[1], y = m - Q[0], g = D - Q[1], _ = 1 / Dt(fu((tt * y + z * g) / (ye(tt * tt + z * z) * ye(y * y + g * g))) / 2), b = ye(Q[0] * Q[0] + Q[1] * Q[1]);
|
|
3063
|
+
C = qn(B, (f - b) / (_ - 1)), L = qn(B, (p - b) / (_ + 1));
|
|
3064
3064
|
} else
|
|
3065
|
-
|
|
3065
|
+
C = L = 0;
|
|
3066
3066
|
}
|
|
3067
|
-
J > wt ?
|
|
3067
|
+
J > wt ? L > wt ? (w = tn(P, V, 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) || !(F > wt) ? o.lineTo(x, S) : C > wt ? (w = tn(x, S, m, D, f, -C, T), E = tn(M, N, P, V, 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
|
}
|
|
@@ -3072,19 +3072,19 @@ function Qr() {
|
|
|
3072
3072
|
var u = (+t.apply(this, arguments) + +e.apply(this, arguments)) / 2, h = (+i.apply(this, arguments) + +a.apply(this, arguments)) / 2 - Oe / 2;
|
|
3073
3073
|
return [te(h) * u, Dt(h) * u];
|
|
3074
3074
|
}, l.innerRadius = function(u) {
|
|
3075
|
-
return arguments.length ? (t = typeof u == "function" ? u :
|
|
3075
|
+
return arguments.length ? (t = typeof u == "function" ? u : pt(+u), l) : t;
|
|
3076
3076
|
}, l.outerRadius = function(u) {
|
|
3077
|
-
return arguments.length ? (e = typeof u == "function" ? u :
|
|
3077
|
+
return arguments.length ? (e = typeof u == "function" ? u : pt(+u), l) : e;
|
|
3078
3078
|
}, l.cornerRadius = function(u) {
|
|
3079
|
-
return arguments.length ? (n = typeof u == "function" ? u :
|
|
3079
|
+
return arguments.length ? (n = typeof u == "function" ? u : pt(+u), l) : n;
|
|
3080
3080
|
}, l.padRadius = function(u) {
|
|
3081
|
-
return arguments.length ? (r = u == null ? null : typeof u == "function" ? u :
|
|
3081
|
+
return arguments.length ? (r = u == null ? null : typeof u == "function" ? u : pt(+u), l) : r;
|
|
3082
3082
|
}, l.startAngle = function(u) {
|
|
3083
|
-
return arguments.length ? (i = typeof u == "function" ? u :
|
|
3083
|
+
return arguments.length ? (i = typeof u == "function" ? u : pt(+u), l) : i;
|
|
3084
3084
|
}, l.endAngle = function(u) {
|
|
3085
|
-
return arguments.length ? (a = typeof u == "function" ? u :
|
|
3085
|
+
return arguments.length ? (a = typeof u == "function" ? u : pt(+u), l) : a;
|
|
3086
3086
|
}, l.padAngle = function(u) {
|
|
3087
|
-
return arguments.length ? (s = typeof u == "function" ? u :
|
|
3087
|
+
return arguments.length ? (s = typeof u == "function" ? u : pt(+u), l) : s;
|
|
3088
3088
|
}, l.context = function(u) {
|
|
3089
3089
|
return arguments.length ? (o = u ?? null, l) : o;
|
|
3090
3090
|
}, l;
|
|
@@ -3099,38 +3099,38 @@ function _u(t) {
|
|
|
3099
3099
|
return t;
|
|
3100
3100
|
}
|
|
3101
3101
|
function bu() {
|
|
3102
|
-
var t = _u, e = vu, n = null, r =
|
|
3102
|
+
var t = _u, e = vu, n = null, r = pt(0), i = pt(on), a = pt(0);
|
|
3103
3103
|
function s(o) {
|
|
3104
|
-
var c, l = (o = na(o)).length, u, h, f = 0,
|
|
3104
|
+
var c, l = (o = na(o)).length, u, h, f = 0, p = new Array(l), v = 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
|
-
(
|
|
3107
|
-
for (e != null ?
|
|
3108
|
-
return e(
|
|
3109
|
-
}) : n != null &&
|
|
3110
|
-
return n(o[
|
|
3111
|
-
}), c = 0, h = f ? (K - l *
|
|
3112
|
-
u =
|
|
3106
|
+
(A = v[p[c] = c] = +t(o[c], c, o)) > 0 && (f += A);
|
|
3107
|
+
for (e != null ? p.sort(function(O, F) {
|
|
3108
|
+
return e(v[O], v[F]);
|
|
3109
|
+
}) : n != null && p.sort(function(O, F) {
|
|
3110
|
+
return n(o[O], o[F]);
|
|
3111
|
+
}), c = 0, h = f ? (K - l * k) / f : 0; c < l; ++c, j = T)
|
|
3112
|
+
u = p[c], A = v[u], T = j + (A > 0 ? A * h : 0) + k, v[u] = {
|
|
3113
3113
|
data: o[u],
|
|
3114
3114
|
index: c,
|
|
3115
|
-
value:
|
|
3116
|
-
startAngle:
|
|
3117
|
-
endAngle:
|
|
3118
|
-
padAngle:
|
|
3115
|
+
value: A,
|
|
3116
|
+
startAngle: j,
|
|
3117
|
+
endAngle: T,
|
|
3118
|
+
padAngle: q
|
|
3119
3119
|
};
|
|
3120
|
-
return
|
|
3120
|
+
return v;
|
|
3121
3121
|
}
|
|
3122
3122
|
return s.value = function(o) {
|
|
3123
|
-
return arguments.length ? (t = typeof o == "function" ? o :
|
|
3123
|
+
return arguments.length ? (t = typeof o == "function" ? o : pt(+o), s) : t;
|
|
3124
3124
|
}, s.sortValues = function(o) {
|
|
3125
3125
|
return arguments.length ? (e = o, n = null, s) : e;
|
|
3126
3126
|
}, s.sort = function(o) {
|
|
3127
3127
|
return arguments.length ? (n = o, e = null, s) : n;
|
|
3128
3128
|
}, s.startAngle = function(o) {
|
|
3129
|
-
return arguments.length ? (r = typeof o == "function" ? o :
|
|
3129
|
+
return arguments.length ? (r = typeof o == "function" ? o : pt(+o), s) : r;
|
|
3130
3130
|
}, s.endAngle = function(o) {
|
|
3131
|
-
return arguments.length ? (i = typeof o == "function" ? o :
|
|
3131
|
+
return arguments.length ? (i = typeof o == "function" ? o : pt(+o), s) : i;
|
|
3132
3132
|
}, s.padAngle = function(o) {
|
|
3133
|
-
return arguments.length ? (a = typeof o == "function" ? o :
|
|
3133
|
+
return arguments.length ? (a = typeof o == "function" ? o : pt(+o), s) : a;
|
|
3134
3134
|
}, s;
|
|
3135
3135
|
}
|
|
3136
3136
|
function rr(t, e) {
|
|
@@ -3151,7 +3151,7 @@ function ku(t) {
|
|
|
3151
3151
|
return e.key = t, e;
|
|
3152
3152
|
}
|
|
3153
3153
|
function bn() {
|
|
3154
|
-
var t =
|
|
3154
|
+
var t = pt([]), e = ir, n = rr, r = wu;
|
|
3155
3155
|
function i(a) {
|
|
3156
3156
|
var s = Array.from(t.apply(this, arguments), ku), o, c = s.length, l = -1, u;
|
|
3157
3157
|
for (const h of a)
|
|
@@ -3162,11 +3162,11 @@ function bn() {
|
|
|
3162
3162
|
return n(s, u), s;
|
|
3163
3163
|
}
|
|
3164
3164
|
return i.keys = function(a) {
|
|
3165
|
-
return arguments.length ? (t = typeof a == "function" ? a :
|
|
3165
|
+
return arguments.length ? (t = typeof a == "function" ? a : pt(Array.from(a)), i) : t;
|
|
3166
3166
|
}, i.value = function(a) {
|
|
3167
|
-
return arguments.length ? (r = typeof a == "function" ? a :
|
|
3167
|
+
return arguments.length ? (r = typeof a == "function" ? a : pt(+a), i) : r;
|
|
3168
3168
|
}, i.order = function(a) {
|
|
3169
|
-
return arguments.length ? (e = a == null ? ir : typeof a == "function" ? a :
|
|
3169
|
+
return arguments.length ? (e = a == null ? ir : typeof a == "function" ? a : pt(Array.from(a)), i) : e;
|
|
3170
3170
|
}, i.offset = function(a) {
|
|
3171
3171
|
return arguments.length ? (n = a ?? rr, i) : n;
|
|
3172
3172
|
}, i;
|
|
@@ -3221,14 +3221,14 @@ De.prototype = {
|
|
|
3221
3221
|
};
|
|
3222
3222
|
De.prototype;
|
|
3223
3223
|
const Et = (t, e) => {
|
|
3224
|
-
const n =
|
|
3225
|
-
return
|
|
3226
|
-
e !== void 0 && n.current && t(
|
|
3224
|
+
const n = Pt(null);
|
|
3225
|
+
return vt(() => {
|
|
3226
|
+
e !== void 0 && n.current && t(dt(n.current));
|
|
3227
3227
|
}, e === null ? void 0 : e), n;
|
|
3228
3228
|
};
|
|
3229
3229
|
function he() {
|
|
3230
|
-
const t =
|
|
3231
|
-
return
|
|
3230
|
+
const t = Pt(null), [e, n] = ft({ 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] =
|
|
3245
|
-
return
|
|
3244
|
+
const [t, e] = ft(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__ */
|
|
3344
|
-
!t && /* @__PURE__ */
|
|
3345
|
-
t === 2 && /* @__PURE__ */
|
|
3346
|
-
/* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
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__ */
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
/* @__PURE__ */
|
|
3352
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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
|
|
3363
|
-
h = u -
|
|
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",
|
|
3384
|
+
const Vt = "#d1d5db", Mu = "_disabled_6kkmf_99", nt = {
|
|
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 =
|
|
3398
|
-
return
|
|
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] =
|
|
3430
|
+
const [o, c] = he(), { width: l, height: u } = c, [h, f] = ft(!1), p = Ae(t.map((A) => A.label)), v = Tn(), j = l > 576, K = /* @__PURE__ */ H.jsx(
|
|
3431
3431
|
"div",
|
|
3432
3432
|
{
|
|
3433
3433
|
id: "controls",
|
|
3434
|
-
className: `${
|
|
3435
|
-
children: /* @__PURE__ */
|
|
3436
|
-
/* @__PURE__ */
|
|
3434
|
+
className: `${nt[j ? "controls-container" : "controls-container-sm"]} ${v ? nt["fill-container"] : ""}`,
|
|
3435
|
+
children: /* @__PURE__ */ H.jsxs("label", { className: nt["controls-label"], children: [
|
|
3436
|
+
/* @__PURE__ */ H.jsx(
|
|
3437
3437
|
"input",
|
|
3438
3438
|
{
|
|
3439
3439
|
type: "checkbox",
|
|
3440
|
-
className:
|
|
3440
|
+
className: nt["controls-checkbox"],
|
|
3441
3441
|
checked: h,
|
|
3442
|
-
onChange: (
|
|
3442
|
+
onChange: (A) => f(A.target.checked)
|
|
3443
3443
|
}
|
|
3444
3444
|
),
|
|
3445
3445
|
"Sort"
|
|
3446
3446
|
] })
|
|
3447
3447
|
}
|
|
3448
|
-
),
|
|
3448
|
+
), T = { idx: e, type: n }, q = 750, k = Et((A) => {
|
|
3449
3449
|
if (l === 0 || u === 0) return;
|
|
3450
|
-
const
|
|
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
|
-
},
|
|
3456
|
-
W.select(".x-axis").attr("transform", `translate(0, ${
|
|
3457
|
-
const M = r === "vertical" ? Zt(
|
|
3458
|
-
W.select(".y-axis").attr("transform", "translate(0, 0)").transition().duration(
|
|
3459
|
-
const
|
|
3460
|
-
const { idx:
|
|
3461
|
-
return xe(
|
|
3455
|
+
}, F = 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(F.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(F, (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(
|
|
3464
|
-
(x) => x.append("rect").attr("class", "bar").attr("x", function(
|
|
3465
|
-
return r === "vertical" ?
|
|
3466
|
-
}).attr("width", function(
|
|
3467
|
-
return r === "vertical" ?
|
|
3468
|
-
}).attr("y", function(
|
|
3469
|
-
return r === "vertical" ?
|
|
3463
|
+
W.selectAll(".bar").data(F, (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 :
|
|
3472
|
-
}).attr("fill",
|
|
3473
|
-
return r === "vertical" ?
|
|
3474
|
-
}).attr("width", function(
|
|
3475
|
-
return r === "vertical" ?
|
|
3476
|
-
}).attr("height", function(
|
|
3477
|
-
return r === "vertical" ?
|
|
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(
|
|
3480
|
+
(x) => x.transition().duration(q).attr("fill", Vt).attr("height", 0).attr("y", u).style("opacity", 0).remove()
|
|
3481
3481
|
).on(
|
|
3482
3482
|
"mouseover",
|
|
3483
|
-
(x,
|
|
3484
|
-
W.selectAll("rect.bar").filter((
|
|
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")(
|
|
3487
|
-
${a}`),
|
|
3486
|
+
${fe(s === "long" ? "," : "~s")(S.value)}
|
|
3487
|
+
${a}`), dt(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "bold");
|
|
3488
3488
|
}
|
|
3489
|
-
).on("mousemove", (x,
|
|
3490
|
-
Rn(
|
|
3489
|
+
).on("mousemove", (x, S) => {
|
|
3490
|
+
Rn(B, { e: x, svg: Z, yScale: d });
|
|
3491
3491
|
}).on(
|
|
3492
3492
|
"mouseout",
|
|
3493
|
-
(x,
|
|
3494
|
-
W.selectAll("rect.bar").filter((
|
|
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), dt(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "normal");
|
|
3495
3495
|
}
|
|
3496
|
-
).transition().duration(
|
|
3497
|
-
return r === "vertical" ?
|
|
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" ?
|
|
3499
|
+
return r === "vertical" ? E.bandwidth() : d(x.value);
|
|
3500
3500
|
}).attr("y", function(x) {
|
|
3501
|
-
return r === "vertical" ?
|
|
3501
|
+
return r === "vertical" ? d(x.value) : E(x.label) ?? 0;
|
|
3502
3502
|
}).attr("height", function(x) {
|
|
3503
|
-
return r === "vertical" ?
|
|
3503
|
+
return r === "vertical" ? d(0) - d(x.value) : E.bandwidth();
|
|
3504
3504
|
});
|
|
3505
|
-
}, [t,
|
|
3506
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
3513
|
-
/* @__PURE__ */
|
|
3512
|
+
v && kn(K, v),
|
|
3513
|
+
/* @__PURE__ */ H.jsxs(
|
|
3514
3514
|
"div",
|
|
3515
3515
|
{
|
|
3516
|
-
ref:
|
|
3517
|
-
className: `${
|
|
3516
|
+
ref: k,
|
|
3517
|
+
className: `${nt["fill-container"]}`,
|
|
3518
3518
|
style: { display: "flex", flexDirection: "column", position: "relative" },
|
|
3519
3519
|
children: [
|
|
3520
|
-
/* @__PURE__ */
|
|
3520
|
+
/* @__PURE__ */ H.jsx(
|
|
3521
3521
|
"svg",
|
|
3522
3522
|
{
|
|
3523
|
-
className: `${
|
|
3523
|
+
className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
|
|
3524
3524
|
style: {},
|
|
3525
3525
|
viewBox: `0 0 ${l} ${u}`,
|
|
3526
|
-
children: /* @__PURE__ */
|
|
3527
|
-
/* @__PURE__ */
|
|
3528
|
-
/* @__PURE__ */
|
|
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
|
-
!
|
|
3532
|
+
!v && /* @__PURE__ */ H.jsxs(
|
|
3533
3533
|
"label",
|
|
3534
3534
|
{
|
|
3535
|
-
className:
|
|
3535
|
+
className: nt["controls-label"],
|
|
3536
3536
|
style: { position: "absolute", right: "12px", top: "6px" },
|
|
3537
3537
|
children: [
|
|
3538
|
-
/* @__PURE__ */
|
|
3538
|
+
/* @__PURE__ */ H.jsx(
|
|
3539
3539
|
"input",
|
|
3540
3540
|
{
|
|
3541
3541
|
type: "checkbox",
|
|
3542
|
-
className:
|
|
3542
|
+
className: nt["controls-checkbox"],
|
|
3543
3543
|
checked: h,
|
|
3544
|
-
onChange: (
|
|
3544
|
+
onChange: (A) => f(A.target.checked)
|
|
3545
3545
|
}
|
|
3546
3546
|
),
|
|
3547
3547
|
"Sort"
|
|
3548
3548
|
]
|
|
3549
3549
|
}
|
|
3550
3550
|
),
|
|
3551
|
-
/* @__PURE__ */
|
|
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 =
|
|
3561
|
-
return
|
|
3560
|
+
const t = Pt(null), [e, n] = ft({ 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)), [
|
|
3596
|
-
const W = (n &&
|
|
3597
|
-
J.selectAll(".legend-item").data([...W], (
|
|
3598
|
-
(
|
|
3599
|
-
const
|
|
3600
|
-
return `${jt[
|
|
3601
|
-
}).style("left", "-10px").style("top", function(
|
|
3602
|
-
return `${
|
|
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, v] = ft([]), [j, K] = ft(!1), [T, q] = ft(""), 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
|
|
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
|
-
(
|
|
3607
|
-
${jt[
|
|
3608
|
-
return `${
|
|
3609
|
-
}).style("left", "6px").style("opacity", 1).select("div.rect").attr("class", `rect ${jt["legend-rect"]}`).style("background-color", (
|
|
3610
|
-
(
|
|
3611
|
-
).on("mouseover", (
|
|
3612
|
-
|
|
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
|
-
|
|
3614
|
+
q("");
|
|
3615
3615
|
});
|
|
3616
|
-
}, [t, r, u, h,
|
|
3616
|
+
}, [t, r, u, h, T, j, n]), O = Et((J) => {
|
|
3617
3617
|
if (u === 0 || h === 0) return;
|
|
3618
|
-
const
|
|
3619
|
-
return
|
|
3620
|
-
}).sort(function(
|
|
3621
|
-
return
|
|
3622
|
-
}), M = Mt(
|
|
3623
|
-
|
|
3624
|
-
let
|
|
3625
|
-
const
|
|
3626
|
-
|
|
3627
|
-
const P =
|
|
3628
|
-
const
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
),
|
|
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((b, U) => b + U.value, 0), d = J.select(".plot-area").attr("transform", "translate(" + Z.x + "," + Z.y + ")"), R = bu().value(function(b) {
|
|
3619
|
+
return b.value;
|
|
3620
|
+
}).sort(function(b, U) {
|
|
3621
|
+
return j ? je(b.value, U.value) : 0;
|
|
3622
|
+
}), M = Mt(B), N = R(M), x = Mt(M);
|
|
3623
|
+
v(R(x));
|
|
3624
|
+
let S = x.length > M.length;
|
|
3625
|
+
const m = p.map((b) => b.data.label), D = N.map((b) => b.data.label);
|
|
3626
|
+
m.every((b) => S ? !1 : D.includes(b) ? !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 = (b, U) => {
|
|
3628
|
+
const et = Jt(
|
|
3629
|
+
U === "exit" ? b.endAngle : b.startAngle,
|
|
3630
|
+
U === "exit" ? b.startAngle : b.endAngle
|
|
3631
|
+
), ot = b.data.label === T;
|
|
3632
3632
|
return function(ct) {
|
|
3633
|
-
return
|
|
3633
|
+
return b.endAngle = et(ct), ot ? tt(b) || "" : Q(b) || "";
|
|
3634
3634
|
};
|
|
3635
3635
|
};
|
|
3636
|
-
|
|
3637
|
-
return
|
|
3636
|
+
d.selectAll("path").data(N, function(b) {
|
|
3637
|
+
return b.data.label;
|
|
3638
3638
|
}).join(
|
|
3639
|
-
(
|
|
3640
|
-
const
|
|
3641
|
-
const
|
|
3642
|
-
return xe(
|
|
3639
|
+
(b) => {
|
|
3640
|
+
const U = b.append("path").attr("class", jt.pieSlice).attr("fill", function(et) {
|
|
3641
|
+
const ot = f.current.findIndex((ct) => ct === et.data.label) + r;
|
|
3642
|
+
return xe(ot);
|
|
3643
3643
|
});
|
|
3644
|
-
return
|
|
3644
|
+
return U.transition().duration(k).delay(P ? 0 : k).attr("d", Q).attrTween("d", function(et) {
|
|
3645
3645
|
if (!P)
|
|
3646
|
-
return
|
|
3647
|
-
const
|
|
3648
|
-
return function(
|
|
3649
|
-
return
|
|
3646
|
+
return z(et, "not exit");
|
|
3647
|
+
const ot = Jt(0, et.startAngle), ct = Jt(0, et.endAngle), ht = et.data.label === T;
|
|
3648
|
+
return function(lt) {
|
|
3649
|
+
return et.startAngle = ot(lt), et.endAngle = ct(lt), ht ? tt(et) : Q(et);
|
|
3650
3650
|
};
|
|
3651
|
-
}),
|
|
3651
|
+
}), U;
|
|
3652
3652
|
},
|
|
3653
|
-
(
|
|
3654
|
-
const
|
|
3655
|
-
return
|
|
3656
|
-
const ct = f.current.findIndex((
|
|
3653
|
+
(b) => {
|
|
3654
|
+
const U = b;
|
|
3655
|
+
return b.transition().duration(k).attr("fill", function(et, ot) {
|
|
3656
|
+
const ct = f.current.findIndex((ht) => ht === et.data.label) + r;
|
|
3657
3657
|
return xe(ct);
|
|
3658
|
-
}).attrTween("d", function(
|
|
3659
|
-
const
|
|
3660
|
-
return function(
|
|
3661
|
-
return
|
|
3658
|
+
}).attrTween("d", function(et) {
|
|
3659
|
+
const ot = p.find((Ot) => Ot.data.label === et.data.label), ct = ot && ot.startAngle ? ot.startAngle : 0, ht = Jt(ct, et.startAngle), lt = ot && ot.endAngle ? ot.endAngle : 0, ut = Jt(lt, et.endAngle), _t = et.data.label === T;
|
|
3660
|
+
return function(Ot) {
|
|
3661
|
+
return et.startAngle = ht(Ot), et.endAngle = ut(Ot), _t ? tt(et) || "" : Q(et) || "";
|
|
3662
3662
|
};
|
|
3663
|
-
}),
|
|
3663
|
+
}), U;
|
|
3664
3664
|
},
|
|
3665
|
-
(
|
|
3666
|
-
return
|
|
3665
|
+
(b) => b.attr("class", jt.pieSliceExit).transition().duration(k).attr("fill", Vt).attrTween("d", function(U) {
|
|
3666
|
+
return z(U, "exit");
|
|
3667
3667
|
}).remove()
|
|
3668
|
-
).on("mouseover", function(
|
|
3669
|
-
|
|
3668
|
+
).on("mouseover", function(b, U) {
|
|
3669
|
+
q(U.data.label);
|
|
3670
3670
|
}).on("mouseout", () => {
|
|
3671
|
-
|
|
3671
|
+
q("");
|
|
3672
3672
|
});
|
|
3673
|
-
const
|
|
3674
|
-
const
|
|
3675
|
-
return fe(".1%")(
|
|
3673
|
+
const g = (b) => B.length === 1 ? "translate(0, 0)" : `translate(${Q.centroid(b)})`, _ = (b) => {
|
|
3674
|
+
const U = b.value / E;
|
|
3675
|
+
return fe(".1%")(U);
|
|
3676
3676
|
};
|
|
3677
|
-
|
|
3678
|
-
return
|
|
3677
|
+
d.selectAll("text").data(N, function(b) {
|
|
3678
|
+
return b.data.label;
|
|
3679
3679
|
}).join(
|
|
3680
|
-
(
|
|
3681
|
-
const
|
|
3682
|
-
return
|
|
3683
|
-
|
|
3680
|
+
(b) => {
|
|
3681
|
+
const U = b.append("text").text(_).attr("class", jt.pieLabelEnter);
|
|
3682
|
+
return U.merge(U).transition().duration(k).delay(
|
|
3683
|
+
k
|
|
3684
3684
|
/* + exitDelay*/
|
|
3685
|
-
).attr("transform",
|
|
3685
|
+
).attr("transform", g), U;
|
|
3686
3686
|
},
|
|
3687
|
-
(
|
|
3688
|
-
const
|
|
3689
|
-
return
|
|
3690
|
-
const
|
|
3691
|
-
return
|
|
3692
|
-
}).attr("transform",
|
|
3687
|
+
(b) => {
|
|
3688
|
+
const U = b.text(_);
|
|
3689
|
+
return b.merge(U).attr("class", jt.pieLabelUpdate).transition().duration(T !== "" ? 250 : k).style("opacity", function(et) {
|
|
3690
|
+
const ot = T === et.data.label;
|
|
3691
|
+
return T === "" || ot ? 1 : 0;
|
|
3692
|
+
}).attr("transform", g), U;
|
|
3693
3693
|
},
|
|
3694
|
-
(
|
|
3694
|
+
(b) => b.transition().duration(k / 2).attr("class", jt.pieLabelExit).remove()
|
|
3695
3695
|
);
|
|
3696
|
-
}, [t, r, e, u, h,
|
|
3697
|
-
return /* @__PURE__ */
|
|
3696
|
+
}, [t, r, e, u, h, j, T]), F = 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:
|
|
3706
|
+
flexDirection: F ? "row" : "column",
|
|
3707
3707
|
overflow: "hidden"
|
|
3708
3708
|
},
|
|
3709
3709
|
children: [
|
|
3710
|
-
/* @__PURE__ */
|
|
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__ */
|
|
3719
|
+
children: /* @__PURE__ */ H.jsx(
|
|
3720
3720
|
"svg",
|
|
3721
3721
|
{
|
|
3722
|
-
ref:
|
|
3723
|
-
className: `${
|
|
3722
|
+
ref: O,
|
|
3723
|
+
className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
|
|
3724
3724
|
viewBox: `0 0 ${u} ${h}`,
|
|
3725
|
-
children: /* @__PURE__ */
|
|
3725
|
+
children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
|
|
3726
3726
|
}
|
|
3727
3727
|
)
|
|
3728
3728
|
}
|
|
3729
3729
|
),
|
|
3730
|
-
/* @__PURE__ */
|
|
3730
|
+
/* @__PURE__ */ H.jsx(
|
|
3731
3731
|
"div",
|
|
3732
3732
|
{
|
|
3733
3733
|
style: {
|
|
3734
|
-
width:
|
|
3735
|
-
height:
|
|
3734
|
+
width: F ? s > 480 ? "180px" : "100px" : "100%",
|
|
3735
|
+
height: F ? "100%" : o > 400 ? "180px" : "100px",
|
|
3736
3736
|
flexShrink: 0,
|
|
3737
3737
|
overflowY: "auto",
|
|
3738
3738
|
background: "rgba(255, 255, 255)",
|
|
3739
|
-
borderLeft:
|
|
3740
|
-
borderTop:
|
|
3739
|
+
borderLeft: F ? "1px solid #ddd" : "none",
|
|
3740
|
+
borderTop: F ? "none" : "1px solid #ddd",
|
|
3741
3741
|
padding: "0px"
|
|
3742
3742
|
},
|
|
3743
|
-
children: /* @__PURE__ */
|
|
3743
|
+
children: /* @__PURE__ */ H.jsx(
|
|
3744
3744
|
"div",
|
|
3745
3745
|
{
|
|
3746
|
-
ref:
|
|
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__ */
|
|
3760
|
+
/* @__PURE__ */ H.jsxs(
|
|
3761
3761
|
"label",
|
|
3762
3762
|
{
|
|
3763
|
-
className:
|
|
3763
|
+
className: nt["controls-label"],
|
|
3764
3764
|
style: { position: "absolute", left: "12px", top: "6px" },
|
|
3765
3765
|
children: [
|
|
3766
|
-
/* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ H.jsx(
|
|
3767
3767
|
"input",
|
|
3768
3768
|
{
|
|
3769
3769
|
type: "checkbox",
|
|
3770
|
-
className:
|
|
3771
|
-
checked:
|
|
3770
|
+
className: nt["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
|
|
3783
|
+
const Fu = "_rect_aemvq_277", Vu = "_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",
|
|
@@ -3790,12 +3790,12 @@ const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHo
|
|
|
3790
3790
|
"legend-container-inactive-sm": "_legend-container-inactive-sm_aemvq_63",
|
|
3791
3791
|
"legend-rect": "_legend-rect_aemvq_125",
|
|
3792
3792
|
"legend-label": "_legend-label_aemvq_159",
|
|
3793
|
-
rect:
|
|
3794
|
-
rectCard:
|
|
3793
|
+
rect: Fu,
|
|
3794
|
+
rectCard: Vu,
|
|
3795
3795
|
rectLegendNotHovered: Wu,
|
|
3796
3796
|
legend: Yu,
|
|
3797
|
-
rectHoveredLegend:
|
|
3798
|
-
rectCardLegendHovered:
|
|
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,
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
}, [
|
|
3811
|
-
|
|
3807
|
+
const [a, s] = he(), { width: o, height: c } = s, [l, u] = ce(), { height: h } = u, [f, p] = ce(), { width: v, height: j } = p, [K, T] = ft(null), [q, k] = ft(!1), [A, O] = ft(["all"]), [F, J] = ft(!1), [Z, W] = ft(""), [B, C] = ft(!1), L = Tn(), w = t;
|
|
3808
|
+
vt(() => {
|
|
3809
|
+
O(["all"]), k(!0);
|
|
3810
|
+
}, [w]), vt(() => {
|
|
3811
|
+
O(["all"]);
|
|
3812
3812
|
}, [e]);
|
|
3813
|
-
const
|
|
3814
|
-
|
|
3813
|
+
const E = 750;
|
|
3814
|
+
vt(() => {
|
|
3815
3815
|
let P;
|
|
3816
|
-
return
|
|
3817
|
-
|
|
3818
|
-
},
|
|
3816
|
+
return q && (P = setTimeout(() => {
|
|
3817
|
+
k(!1);
|
|
3818
|
+
}, E + 500)), () => {
|
|
3819
3819
|
clearTimeout(P);
|
|
3820
3820
|
};
|
|
3821
|
-
}, [
|
|
3822
|
-
const
|
|
3823
|
-
if (
|
|
3821
|
+
}, [q]);
|
|
3822
|
+
const d = [v, 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 = v > 576, S = Et((P) => {
|
|
3823
|
+
if (q)
|
|
3824
3824
|
return;
|
|
3825
|
-
const
|
|
3826
|
-
const
|
|
3825
|
+
const V = x ? 80 : 50, Q = function(z) {
|
|
3826
|
+
const y = rt[x ? "legend-container" : "legend-container-sm"], g = rt[x ? "legend-container-active" : "legend-container-active-sm"], _ = rt[x ? "legend-container-inactive" : "legend-container-inactive-sm"];
|
|
3827
3827
|
return `
|
|
3828
|
-
${
|
|
3828
|
+
${A.includes(z) ? e ? g : _ : y}
|
|
3829
3829
|
legend-item
|
|
3830
3830
|
`;
|
|
3831
3831
|
};
|
|
3832
|
-
P.selectAll(".legend-item").data([...M], (
|
|
3833
|
-
(
|
|
3834
|
-
const
|
|
3835
|
-
return
|
|
3836
|
-
if (!e &&
|
|
3832
|
+
P.selectAll(".legend-item").data([...M], (z) => z).join(
|
|
3833
|
+
(z) => {
|
|
3834
|
+
const y = z.append("div").attr("class", Q).style("left", (g, _) => `${_ * V}px`).style("top", "-53px").style("opacity", 0);
|
|
3835
|
+
return y.append("div").attr("class", rt["legend-rect"]).style("background", (g) => {
|
|
3836
|
+
if (!e && A.includes(g))
|
|
3837
3837
|
return Vt;
|
|
3838
|
-
const
|
|
3839
|
-
return xt(
|
|
3840
|
-
}),
|
|
3838
|
+
const _ = N.current.findIndex((b) => b === g) + n;
|
|
3839
|
+
return xt(_);
|
|
3840
|
+
}), y.append("span").attr("class", rt["legend-label"]).style("color", (g) => !e && A.includes(g) ? "#d1d5db" : "#333").text((g) => g), y.transition().duration(E).style("top", "0px").style("opacity", 1), y;
|
|
3841
3841
|
},
|
|
3842
|
-
(
|
|
3843
|
-
if (!e &&
|
|
3842
|
+
(z) => (z.attr("class", Q).transition().duration(E).style("top", "0px").style("left", (y, g) => `${g * V}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (y) => {
|
|
3843
|
+
if (!e && A.includes(y))
|
|
3844
3844
|
return Vt;
|
|
3845
|
-
const
|
|
3846
|
-
return xt(
|
|
3847
|
-
}),
|
|
3848
|
-
(
|
|
3849
|
-
).on("mouseover", function(
|
|
3850
|
-
|
|
3851
|
-
}).on("mouseout", function(
|
|
3852
|
-
|
|
3853
|
-
}).on("click", (
|
|
3854
|
-
|
|
3855
|
-
let
|
|
3856
|
-
return e ?
|
|
3845
|
+
const g = N.current.findIndex((_) => _ === y) + n;
|
|
3846
|
+
return xt(g);
|
|
3847
|
+
}), z.select(`.${rt["legend-label"]}`).style("color", (y) => !e && A.includes(y) ? Vt : "#333").text((y) => y), z),
|
|
3848
|
+
(z) => z.style("color", Vt).transition().duration(E).style("opacity", 0).style("top", "53px").remove()
|
|
3849
|
+
).on("mouseover", function(z, y) {
|
|
3850
|
+
q || W(y);
|
|
3851
|
+
}).on("mouseout", function(z, y) {
|
|
3852
|
+
q || (W(""), F && J(!1));
|
|
3853
|
+
}).on("click", (z, y) => {
|
|
3854
|
+
O((g) => {
|
|
3855
|
+
let _ = [];
|
|
3856
|
+
return e ? g[0] === y ? _ = ["all"] : _ = [y] : g.includes(y) ? _ = g.filter((b) => b !== y) : _ = [...g, y], _;
|
|
3857
3857
|
}), J(!0);
|
|
3858
3858
|
});
|
|
3859
|
-
}, [...
|
|
3859
|
+
}, [...d, M, q]), m = /* @__PURE__ */ H.jsxs(
|
|
3860
3860
|
"div",
|
|
3861
3861
|
{
|
|
3862
3862
|
ref: l,
|
|
3863
|
-
className: `${
|
|
3863
|
+
className: `${nt[x ? "controls-container" : "controls-container-sm"]} ${L ? nt["fill-container"] : ""}`,
|
|
3864
3864
|
children: [
|
|
3865
|
-
/* @__PURE__ */
|
|
3866
|
-
/* @__PURE__ */
|
|
3865
|
+
/* @__PURE__ */ H.jsxs("label", { className: nt["controls-label"], style: { paddingRight: "12px" }, children: [
|
|
3866
|
+
/* @__PURE__ */ H.jsx(
|
|
3867
3867
|
"input",
|
|
3868
3868
|
{
|
|
3869
3869
|
type: "checkbox",
|
|
3870
|
-
className:
|
|
3871
|
-
checked:
|
|
3872
|
-
onChange: (P) =>
|
|
3870
|
+
className: nt["controls-checkbox"],
|
|
3871
|
+
checked: B,
|
|
3872
|
+
onChange: (P) => C(P.target.checked)
|
|
3873
3873
|
}
|
|
3874
3874
|
),
|
|
3875
3875
|
"Sort"
|
|
3876
3876
|
] }),
|
|
3877
|
-
/* @__PURE__ */
|
|
3877
|
+
/* @__PURE__ */ H.jsx(
|
|
3878
3878
|
"div",
|
|
3879
3879
|
{
|
|
3880
|
-
ref:
|
|
3880
|
+
ref: S,
|
|
3881
3881
|
id: "stacked-barchart-legends",
|
|
3882
3882
|
className: `${rt["legends-container"]}`
|
|
3883
3883
|
}
|
|
3884
3884
|
)
|
|
3885
3885
|
]
|
|
3886
3886
|
}
|
|
3887
|
-
),
|
|
3888
|
-
if (
|
|
3889
|
-
const
|
|
3890
|
-
|
|
3891
|
-
const G =
|
|
3892
|
-
const bt =
|
|
3893
|
-
return
|
|
3887
|
+
), D = Et((P) => {
|
|
3888
|
+
if (v === 0 || j === 0 || Z !== "" && q) return;
|
|
3889
|
+
const V = { 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
|
-
|
|
3895
|
+
$.total = G;
|
|
3896
3896
|
});
|
|
3897
|
-
const
|
|
3898
|
-
return e ?
|
|
3899
|
-
}) :
|
|
3900
|
-
let
|
|
3901
|
-
K === null && (
|
|
3902
|
-
const ct =
|
|
3903
|
-
return
|
|
3904
|
-
}),
|
|
3905
|
-
|
|
3906
|
-
const de = r === "vertical" ? Zt(ut).ticks(4, "s").tickSize(-
|
|
3907
|
-
|
|
3908
|
-
const Qt = bn().keys(
|
|
3909
|
-
const G =
|
|
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, y = v - V.left - V.right, g = j - V.top - V.bottom, _ = P.select("svg"), b = _.node(), U = _.select(".plot-area").attr("transform", "translate(" + V.left + "," + V.top + ")"), et = Ye(P).style("opacity", 0);
|
|
3900
|
+
let ot = !1;
|
|
3901
|
+
K === null && (ot = !0, T(Mt(R)));
|
|
3902
|
+
const ct = z.map(function($) {
|
|
3903
|
+
return $.label;
|
|
3904
|
+
}), ht = $e().domain(ct).rangeRound(r === "vertical" ? [0, y] : [g, 0]).paddingInner(x ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), lt = e ? A[0] === "all" ? Yt(R, ($) => $.total) : Yt(R, ($) => $[A[0]]) : Yt(R, ($) => $.total), ut = le().domain([0, lt ?? 0]).range(r === "vertical" ? [g, 0] : [0, y]), _t = !x && r === "vertical" ? rt.rotatedAxisText : rt.axisText, Ot = [], Be = r === "vertical" ? Gt(ht).tickValues(ht.domain()).tickSizeOuter(0) : Gt(ut).ticks(4, "s").tickSizeOuter(0).tickSize(-g);
|
|
3905
|
+
U.select(".x-axis").attr("transform", `translate(0,${g})`).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(-y) : Zt(ht).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
|
|
3918
|
-
}),
|
|
3919
|
-
(
|
|
3920
|
-
const gt =
|
|
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", (
|
|
3923
|
-
if (
|
|
3922
|
+
}).style("opacity", (X) => {
|
|
3923
|
+
if (Z !== "")
|
|
3924
3924
|
if (e) {
|
|
3925
|
-
if (
|
|
3926
|
-
return
|
|
3925
|
+
if (A[0] === "all")
|
|
3926
|
+
return X.key === Z || F ? 1 : 0.25;
|
|
3927
3927
|
} else
|
|
3928
|
-
return
|
|
3929
|
-
return e ?
|
|
3930
|
-
}).style("pointer-events", (
|
|
3931
|
-
(
|
|
3932
|
-
const gt =
|
|
3928
|
+
return F ? 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", (
|
|
3935
|
-
if (
|
|
3934
|
+
}).style("opacity", (X) => {
|
|
3935
|
+
if (Z !== "")
|
|
3936
3936
|
if (e) {
|
|
3937
|
-
if (
|
|
3938
|
-
return
|
|
3937
|
+
if (A[0] === "all")
|
|
3938
|
+
return X.key === Z || F ? 1 : 0.25;
|
|
3939
3939
|
} else
|
|
3940
|
-
return
|
|
3941
|
-
return e ?
|
|
3942
|
-
}).style("pointer-events", (
|
|
3943
|
-
(
|
|
3944
|
-
), Kt = (
|
|
3945
|
-
const G = r === "vertical" ?
|
|
3946
|
-
return
|
|
3940
|
+
return F ? 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", Vt).style("opacity", 0).selectAll("rect").attr("y", g).attr("height", 0).remove()
|
|
3944
|
+
), Kt = ($) => ht($.data.label + "") ?? 0, Ut = ht.bandwidth(), qt = ($) => {
|
|
3945
|
+
const G = r === "vertical" ? g : y;
|
|
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(
|
|
3949
|
+
e && r !== "vertical" ? ut(0) : G - (ut($[0]) - ut($[1]))
|
|
3950
3950
|
);
|
|
3951
|
-
}, Lt = (
|
|
3952
|
-
const G = r === "vertical" ? ut(
|
|
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 = (
|
|
3955
|
-
if (
|
|
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(
|
|
3958
|
-
return
|
|
3959
|
-
},
|
|
3960
|
-
const G = $t(
|
|
3961
|
-
return r === "vertical" ?
|
|
3962
|
-
}, at = (
|
|
3963
|
-
|
|
3964
|
-
(
|
|
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
|
-
(
|
|
3966
|
+
($) => $.data.label
|
|
3967
3967
|
// unique key per bar
|
|
3968
3968
|
).join(
|
|
3969
|
-
(
|
|
3970
|
-
return r === "vertical" ? Tt(
|
|
3971
|
-
}).attr("width", function(
|
|
3972
|
-
return r === "vertical" ? $t(
|
|
3973
|
-
}).attr("y", (
|
|
3969
|
+
($) => $.append("rect").attr("class", `rect ${nt.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 (!
|
|
3976
|
-
const gt =
|
|
3977
|
-
return
|
|
3975
|
+
if (!Ot.includes(X.data.label)) return g;
|
|
3976
|
+
const gt = A[0] === "all" ? ut(X[1]) : X.key.startsWith(A[0]) ? g - (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 ? g - (V.bottom + V.top) : ia;
|
|
3978
3978
|
} else
|
|
3979
|
-
return X
|
|
3980
|
-
}).attr("height", function(
|
|
3981
|
-
return r === "vertical" ? 0 : it(
|
|
3982
|
-
}).attr("stroke-dasharray", st).attr("stroke-dashoffset",
|
|
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
|
-
(
|
|
3986
|
-
).attr("class", at).attr("stroke-dasharray", st).attr("stroke-dashoffset",
|
|
3985
|
+
($) => $.transition().duration(E).attr("opacity", 0).attr("y", g).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
|
-
}),
|
|
3989
|
-
|
|
3990
|
-
const
|
|
3991
|
-
|
|
3992
|
-
}).on("touch", function(
|
|
3993
|
-
|
|
3994
|
-
}).on("mousemove", (
|
|
3995
|
-
Rn(
|
|
3996
|
-
}).on("mouseout", function(
|
|
3997
|
-
|
|
3988
|
+
}), Xt.selectAll("rect").on("mouseover", function($, G) {
|
|
3989
|
+
dt(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((bt) => bt === G.data.label).attr("class", (r === "vertical" ? _t : "") + " " + rt.hoveredAxisText), et.style("opacity", 1).select("p.title").text(G.data.label);
|
|
3990
|
+
const X = G.data[G.barKey], { total: gt } = G.data;
|
|
3991
|
+
et.select("p.top-label").text(G.barKey + " : " + St(X, i)), et.select("p.bottom-label").text(A[0] === "all" ? `Total : ${St(gt, i)}` : "~");
|
|
3992
|
+
}).on("touch", function($, G) {
|
|
3993
|
+
dt(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label);
|
|
3994
|
+
}).on("mousemove", ($, G) => {
|
|
3995
|
+
Rn(et, { e: $, svg: b, yScale: ut });
|
|
3996
|
+
}).on("mouseout", function($, G) {
|
|
3997
|
+
dt(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label).attr("class", r === "vertical" ? _t : ""), et.style("opacity", 0);
|
|
3998
3998
|
});
|
|
3999
|
-
}, [...
|
|
4000
|
-
return /* @__PURE__ */
|
|
3999
|
+
}, [...d, B, R, M, Z, F, 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
|
-
|
|
4007
|
-
/* @__PURE__ */
|
|
4006
|
+
L ? kn(m, L) : m,
|
|
4007
|
+
/* @__PURE__ */ H.jsx(
|
|
4008
4008
|
"div",
|
|
4009
4009
|
{
|
|
4010
4010
|
ref: f,
|
|
4011
|
-
className: `${
|
|
4011
|
+
className: `${nt["fill-container"]}`,
|
|
4012
4012
|
style: { display: "flex", flexDirection: "column" },
|
|
4013
|
-
children: /* @__PURE__ */
|
|
4013
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
4014
4014
|
"div",
|
|
4015
4015
|
{
|
|
4016
|
-
ref:
|
|
4017
|
-
className: `${
|
|
4016
|
+
ref: D,
|
|
4017
|
+
className: `${nt["fill-container"]}`,
|
|
4018
4018
|
style: { display: "flex", flexDirection: "column" },
|
|
4019
4019
|
children: [
|
|
4020
|
-
/* @__PURE__ */
|
|
4020
|
+
/* @__PURE__ */ H.jsx(
|
|
4021
4021
|
"svg",
|
|
4022
4022
|
{
|
|
4023
|
-
className: `${
|
|
4024
|
-
viewBox: `0 0 ${
|
|
4025
|
-
children:
|
|
4026
|
-
/* @__PURE__ */
|
|
4027
|
-
/* @__PURE__ */
|
|
4028
|
-
/* @__PURE__ */
|
|
4023
|
+
className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
|
|
4024
|
+
viewBox: `0 0 ${v} ${j}`,
|
|
4025
|
+
children: v > 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__ */
|
|
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:
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
}, [
|
|
4047
|
-
const
|
|
4048
|
-
|
|
4049
|
-
let
|
|
4050
|
-
return
|
|
4051
|
-
|
|
4052
|
-
},
|
|
4053
|
-
clearTimeout(
|
|
4043
|
+
const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: v } = f, [j, K] = ft(null), [T, q] = ft(!1), [k, A] = ft("all"), [O, F] = ft(!1), [J, Z] = ft(""), [W, B] = ft(!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
|
-
}, [
|
|
4056
|
-
const
|
|
4057
|
-
if (
|
|
4058
|
-
const P =
|
|
4059
|
-
const
|
|
4055
|
+
}, [T]);
|
|
4056
|
+
const E = [p, v, 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, V = function(tt) {
|
|
4059
|
+
const z = rt[N ? "legend-container" : "legend-container-sm"], y = rt[N ? "legend-container-active" : "legend-container-active-sm"], g = rt[N ? "legend-container-inactive" : "legend-container-inactive-sm"];
|
|
4060
4060
|
return `
|
|
4061
|
-
${
|
|
4061
|
+
${k.includes(tt) ? k === tt ? y : g : z}
|
|
4062
4062
|
legend-item
|
|
4063
4063
|
`;
|
|
4064
4064
|
};
|
|
4065
|
-
|
|
4066
|
-
(
|
|
4067
|
-
const
|
|
4068
|
-
return
|
|
4069
|
-
const
|
|
4070
|
-
return xt(
|
|
4071
|
-
}),
|
|
4065
|
+
D.selectAll(".legend-item").data([...R], (tt) => tt).join(
|
|
4066
|
+
(tt) => {
|
|
4067
|
+
const z = tt.append("div").attr("class", V).style("left", (y, g) => `${g * P}px`).style("top", "-53px").style("opacity", 0);
|
|
4068
|
+
return z.append("div").attr("class", rt["legend-rect"]).style("background", (y) => {
|
|
4069
|
+
const g = M.current.findIndex((_) => _ === y) + e;
|
|
4070
|
+
return xt(g);
|
|
4071
|
+
}), z.append("span").attr("class", rt["legend-label"]).text((y) => y), z.transition().duration(w).style("top", "0px").style("opacity", 1), z;
|
|
4072
4072
|
},
|
|
4073
|
-
(
|
|
4074
|
-
const
|
|
4075
|
-
return xt(
|
|
4076
|
-
}),
|
|
4077
|
-
(
|
|
4078
|
-
).on("click", (
|
|
4079
|
-
|
|
4080
|
-
}).on("mouseover", (
|
|
4081
|
-
|
|
4082
|
-
}).on("mouseout", (
|
|
4083
|
-
|
|
4073
|
+
(tt) => (tt.attr("class", V).transition().duration(w).style("top", "0px").style("left", (z, y) => `${y * P}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (z) => {
|
|
4074
|
+
const y = M.current.findIndex((g) => g === z) + e;
|
|
4075
|
+
return xt(y);
|
|
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((y) => y === z ? (B(!1), "all") : z);
|
|
4080
|
+
}).on("mouseover", (tt, z) => {
|
|
4081
|
+
Z(z);
|
|
4082
|
+
}).on("mouseout", (tt, z) => {
|
|
4083
|
+
Z("");
|
|
4084
4084
|
});
|
|
4085
|
-
}, [...
|
|
4085
|
+
}, [...E, R, T]), S = /* @__PURE__ */ H.jsxs(
|
|
4086
4086
|
"div",
|
|
4087
4087
|
{
|
|
4088
4088
|
ref: c,
|
|
4089
|
-
className: `${
|
|
4089
|
+
className: `${nt[N ? "controls-container" : "controls-container-sm"]} ${C ? nt["fill-container"] : ""}`,
|
|
4090
4090
|
children: [
|
|
4091
|
-
/* @__PURE__ */
|
|
4092
|
-
/* @__PURE__ */
|
|
4091
|
+
/* @__PURE__ */ H.jsxs("label", { className: `${nt["controls-label"]} ${k === "all" ? nt.disabled : ""}`, style: { paddingRight: "12px" }, children: [
|
|
4092
|
+
/* @__PURE__ */ H.jsx(
|
|
4093
4093
|
"input",
|
|
4094
4094
|
{
|
|
4095
4095
|
type: "checkbox",
|
|
4096
|
-
className: `${
|
|
4096
|
+
className: `${nt["controls-checkbox"]}`,
|
|
4097
4097
|
checked: W,
|
|
4098
|
-
onChange: (
|
|
4099
|
-
disabled:
|
|
4098
|
+
onChange: (D) => B(D.target.checked),
|
|
4099
|
+
disabled: k === "all"
|
|
4100
4100
|
}
|
|
4101
4101
|
),
|
|
4102
4102
|
"Sort"
|
|
4103
4103
|
] }),
|
|
4104
|
-
/* @__PURE__ */
|
|
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
|
-
),
|
|
4115
|
-
if (
|
|
4114
|
+
), m = Et((D) => {
|
|
4115
|
+
if (p === 0 || v === 0 || J !== "" && T) return;
|
|
4116
4116
|
const P = { top: 20, right: 30, bottom: 30, left: 40 };
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
const
|
|
4120
|
-
return it + (typeof
|
|
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
|
|
4124
|
-
return Number(
|
|
4125
|
-
}) :
|
|
4126
|
-
|
|
4127
|
-
const
|
|
4128
|
-
return
|
|
4129
|
-
}), ct = $e().domain(
|
|
4130
|
-
|
|
4131
|
-
(
|
|
4132
|
-
Object.entries(
|
|
4123
|
+
const V = d, Q = W ? Mt(V).sort(function(Y, it) {
|
|
4124
|
+
return Number(Y[k]) - Number(it[k]);
|
|
4125
|
+
}) : V, tt = p - P.left - P.right, z = v - P.top - P.bottom, y = D.select("svg"), g = y.node(), _ = y.select(".plot-area").attr("transform", "translate(" + P.left + "," + P.top + ")"), b = Ye(D).style("opacity", 0);
|
|
4126
|
+
j === null && K(Mt(d));
|
|
4127
|
+
const U = k === "all", et = !N && n === "vertical" ? rt.rotatedAxisText : rt.axisText, ot = Q.map(function(Y) {
|
|
4128
|
+
return Y.label;
|
|
4129
|
+
}), ct = $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), ht = 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(
|
|
4136
|
-
|
|
4137
|
-
const
|
|
4138
|
-
|
|
4139
|
-
const
|
|
4140
|
-
(
|
|
4141
|
-
const it =
|
|
4142
|
-
...
|
|
4143
|
-
key: `${it} - ${
|
|
4135
|
+
) : Yt(d, (Y) => Y[k]), lt = le().domain([0, ht ?? 0]).range(n === "vertical" ? [z, 0] : [0, tt]), ut = n === "vertical" ? Gt(ct).tickValues(ct.domain()).tickSizeOuter(0) : Gt(lt).ticks(4, "s").tickSizeOuter(0).tickSize(-z);
|
|
4136
|
+
_.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", et).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
|
|
4137
|
+
const _t = n === "vertical" ? Zt(lt).ticks(4, "s").tickSize(-tt) : Zt(ct).tickSizeOuter(0);
|
|
4138
|
+
_.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 = (
|
|
4149
|
-
${J ===
|
|
4150
|
-
let pe =
|
|
4151
|
-
return
|
|
4148
|
+
), de = (Y) => J !== "" ? `rect
|
|
4149
|
+
${J === Y.barKey ? rt.rectLegendHovered : rt.rectLegendNotHovered}` : `rect ${rt.rect}`;
|
|
4150
|
+
let pe = _.selectAll(".serie").data(Be, function(Y) {
|
|
4151
|
+
return Y.key;
|
|
4152
4152
|
}).join(
|
|
4153
|
-
(
|
|
4154
|
-
const
|
|
4155
|
-
return xt(
|
|
4156
|
-
}).style("opacity", (st) =>
|
|
4157
|
-
(
|
|
4158
|
-
const
|
|
4159
|
-
return xt(
|
|
4160
|
-
}).style("opacity", (st) =>
|
|
4161
|
-
(
|
|
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 = (
|
|
4164
|
-
const it = ct(
|
|
4165
|
-
if (
|
|
4166
|
-
const st =
|
|
4167
|
-
return it + st * (ct.bandwidth() /
|
|
4163
|
+
const Qt = (Y) => {
|
|
4164
|
+
const it = ct(Y.data.label + "") ?? 0;
|
|
4165
|
+
if (k === "all") {
|
|
4166
|
+
const st = R.indexOf(Y.barKey) || 0;
|
|
4167
|
+
return it + st * (ct.bandwidth() / R.length);
|
|
4168
4168
|
}
|
|
4169
4169
|
return it;
|
|
4170
|
-
},
|
|
4171
|
-
const it = n === "vertical" ?
|
|
4170
|
+
}, Xt = () => k === "all" ? ct.bandwidth() / R.length : ct.bandwidth(), Kt = (Y) => n === "vertical" ? z - (lt(Y[0]) - lt(Y[1])) : lt(0), Ut = (Y) => {
|
|
4171
|
+
const it = n === "vertical" ? lt(Y[0]) - lt(Y[1]) : lt(Y[1]) - lt(Y[0]);
|
|
4172
4172
|
return isNaN(it) || it < 0 ? 0 : it;
|
|
4173
|
-
},
|
|
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
|
-
(
|
|
4176
|
-
(
|
|
4175
|
+
(Y) => Y,
|
|
4176
|
+
(Y) => Y.data.label
|
|
4177
4177
|
).join(
|
|
4178
|
-
(
|
|
4178
|
+
(Y) => {
|
|
4179
4179
|
let it;
|
|
4180
|
-
return it =
|
|
4181
|
-
return n === "vertical" ?
|
|
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" ?
|
|
4183
|
+
return n === "vertical" ? k === "all" ? ct.bandwidth() / R.length : ct.bandwidth() : 0;
|
|
4184
4184
|
}).attr("y", function(st) {
|
|
4185
|
-
return n === "vertical" ?
|
|
4185
|
+
return n === "vertical" ? z : Tt(st);
|
|
4186
4186
|
}).attr("height", function(st) {
|
|
4187
|
-
return n === "vertical" ? 0 :
|
|
4188
|
-
}).transition().duration(
|
|
4187
|
+
return n === "vertical" ? 0 : k === "all" ? ct.bandwidth() / R.length : ct.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
|
-
(
|
|
4192
|
-
).attr("class", de).transition().duration(
|
|
4193
|
-
|
|
4194
|
-
const st = it.data[it.barKey], { total:
|
|
4195
|
-
fe(".1f")(at) + "",
|
|
4196
|
-
|
|
4191
|
+
(Y) => Y.attr("fill", Vt).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
|
+
dt(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter(($) => $ === it.data.label).attr("class", (n === "vertical" ? et : "") + " " + rt.hoveredAxisText), b.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) + "", b.select("p.top-label").text(it.barKey + " : " + St(st, r)), b.select("p.bottom-label").text(
|
|
4196
|
+
k === "all" ? `Total : ${St(I, r)}` : "~"
|
|
4197
4197
|
);
|
|
4198
|
-
}).on("touch", function(
|
|
4199
|
-
|
|
4200
|
-
}).on("mousemove", (
|
|
4201
|
-
Rn(
|
|
4202
|
-
}).on("mouseout", function(
|
|
4203
|
-
|
|
4198
|
+
}).on("touch", function(Y, it) {
|
|
4199
|
+
dt(".x-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", et);
|
|
4200
|
+
}).on("mousemove", (Y, it) => {
|
|
4201
|
+
Rn(b, { e: Y, svg: g, yScale: lt });
|
|
4202
|
+
}).on("mouseout", function(Y, it) {
|
|
4203
|
+
dt(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", n === "vertical" ? et : ""), b.style("opacity", 0);
|
|
4204
4204
|
});
|
|
4205
|
-
}, [...
|
|
4206
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
4213
|
-
/* @__PURE__ */
|
|
4212
|
+
C ? kn(S, C) : S,
|
|
4213
|
+
/* @__PURE__ */ H.jsx(
|
|
4214
4214
|
"div",
|
|
4215
4215
|
{
|
|
4216
4216
|
ref: h,
|
|
4217
|
-
className: `${
|
|
4217
|
+
className: `${nt["fill-container"]}`,
|
|
4218
4218
|
style: { display: "flex", flexDirection: "column" },
|
|
4219
|
-
children: /* @__PURE__ */
|
|
4219
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
4220
4220
|
"div",
|
|
4221
4221
|
{
|
|
4222
|
-
ref:
|
|
4223
|
-
className: `${
|
|
4222
|
+
ref: m,
|
|
4223
|
+
className: `${nt["fill-container"]}`,
|
|
4224
4224
|
style: { display: "flex", flexDirection: "column" },
|
|
4225
4225
|
children: [
|
|
4226
|
-
/* @__PURE__ */
|
|
4226
|
+
/* @__PURE__ */ H.jsx(
|
|
4227
4227
|
"svg",
|
|
4228
4228
|
{
|
|
4229
|
-
className: `${
|
|
4230
|
-
viewBox: `0 0 ${
|
|
4231
|
-
children:
|
|
4232
|
-
/* @__PURE__ */
|
|
4233
|
-
/* @__PURE__ */
|
|
4234
|
-
/* @__PURE__ */
|
|
4229
|
+
className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
|
|
4230
|
+
viewBox: `0 0 ${p} ${v}`,
|
|
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__ */
|
|
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:
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
}, [
|
|
4249
|
+
const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: v } = f, [j, K] = ft(""), [T, q] = ft(!0), [k, A] = ft(!1), [O, F] = ft("all"), J = Tn(), Z = t;
|
|
4250
|
+
vt(() => {
|
|
4251
|
+
F("all"), q(!0), A(!0);
|
|
4252
|
+
}, [Z]);
|
|
4253
4253
|
const W = 750;
|
|
4254
|
-
|
|
4255
|
-
let
|
|
4256
|
-
return
|
|
4257
|
-
|
|
4254
|
+
vt(() => {
|
|
4255
|
+
let N;
|
|
4256
|
+
return k && (N = setTimeout(() => {
|
|
4257
|
+
A(!1);
|
|
4258
4258
|
}, W + 500)), () => {
|
|
4259
|
-
clearTimeout(
|
|
4259
|
+
clearTimeout(N);
|
|
4260
4260
|
};
|
|
4261
|
-
}, [
|
|
4262
|
-
const
|
|
4263
|
-
if (
|
|
4264
|
-
const x =
|
|
4265
|
-
const P = rt[
|
|
4261
|
+
}, [k]);
|
|
4262
|
+
const B = [p, v, 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"], V = rt[E ? "legend-container-active" : "legend-container-active-sm"], Q = rt[E ? "legend-container-inactive" : "legend-container-inactive-sm"];
|
|
4266
4266
|
return `
|
|
4267
|
-
${
|
|
4267
|
+
${O.includes(D) ? O === D ? V : Q : P}
|
|
4268
4268
|
legend-item
|
|
4269
4269
|
`;
|
|
4270
4270
|
};
|
|
4271
|
-
|
|
4272
|
-
(
|
|
4273
|
-
const P =
|
|
4274
|
-
return P.append("div").attr("class", rt["legend-rect"]).style("background", (
|
|
4275
|
-
const
|
|
4276
|
-
return xt(
|
|
4277
|
-
}), P.append("span").attr("class", rt["legend-label"]).text((
|
|
4271
|
+
N.selectAll(".legend-item").data([...L], (D) => D).join(
|
|
4272
|
+
(D) => {
|
|
4273
|
+
const P = D.append("div").attr("class", S).style("left", (V, Q) => `${Q * x}px`).style("top", "-53px").style("opacity", 0);
|
|
4274
|
+
return P.append("div").attr("class", rt["legend-rect"]).style("background", (V) => {
|
|
4275
|
+
const Q = w.current.findIndex((tt) => tt === V) + e;
|
|
4276
|
+
return xt(Q);
|
|
4277
|
+
}), P.append("span").attr("class", rt["legend-label"]).text((V) => V), P.transition().duration(W).style("top", "0px").style("opacity", 1), P;
|
|
4278
4278
|
},
|
|
4279
|
-
(
|
|
4280
|
-
const
|
|
4281
|
-
return xt(
|
|
4282
|
-
}),
|
|
4283
|
-
(
|
|
4284
|
-
).on("mouseover", (
|
|
4279
|
+
(D) => (D.attr("class", S).transition().duration(W).style("top", "0px").style("left", (P, V) => `${V * x}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (P) => {
|
|
4280
|
+
const V = w.current.findIndex((Q) => Q === P) + e;
|
|
4281
|
+
return xt(V);
|
|
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(
|
|
4286
|
+
}).on("mouseout", function(D) {
|
|
4287
4287
|
K("");
|
|
4288
4288
|
});
|
|
4289
|
-
}, [...
|
|
4289
|
+
}, [...B, L, k]), R = /* @__PURE__ */ H.jsxs(
|
|
4290
4290
|
"div",
|
|
4291
4291
|
{
|
|
4292
4292
|
ref: c,
|
|
4293
|
-
className: `${
|
|
4293
|
+
className: `${nt["controls-container"]} ${J ? nt["fill-container"] : ""}`,
|
|
4294
4294
|
children: [
|
|
4295
|
-
/* @__PURE__ */
|
|
4296
|
-
/* @__PURE__ */
|
|
4295
|
+
/* @__PURE__ */ H.jsxs("label", { className: nt["controls-label"], style: { paddingRight: "12px" }, children: [
|
|
4296
|
+
/* @__PURE__ */ H.jsx(
|
|
4297
4297
|
"input",
|
|
4298
4298
|
{
|
|
4299
4299
|
type: "checkbox",
|
|
4300
|
-
className:
|
|
4301
|
-
checked:
|
|
4302
|
-
onChange: (
|
|
4300
|
+
className: nt["controls-checkbox"],
|
|
4301
|
+
checked: T,
|
|
4302
|
+
onChange: (N) => q(N.target.checked)
|
|
4303
4303
|
}
|
|
4304
4304
|
),
|
|
4305
4305
|
"Percentage"
|
|
4306
4306
|
] }),
|
|
4307
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ H.jsx(
|
|
4308
4308
|
"div",
|
|
4309
4309
|
{
|
|
4310
|
-
ref:
|
|
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((
|
|
4318
|
-
if (
|
|
4317
|
+
), M = Et((N) => {
|
|
4318
|
+
if (p === 0 || v === 0 || j !== "" && k) return;
|
|
4319
4319
|
const x = { top: 20, right: 30, bottom: 30, left: 40 };
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
const G =
|
|
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
|
|
4327
|
-
return
|
|
4328
|
-
}),
|
|
4329
|
-
return
|
|
4326
|
+
const m = C.filter((I) => I?.total && I.total > 0), D = p - x.left - x.right, P = v - x.top - x.bottom, V = N.select("svg"), Q = V.node(), tt = V.select(".plot-area").attr("transform", "translate(" + x.left + "," + x.top + ")"), z = Ye(N).style("opacity", 0), y = !E && n === "vertical" ? rt.rotatedAxisText : rt.axisText, g = m.map(function(I) {
|
|
4327
|
+
return I.label;
|
|
4328
|
+
}), _ = $e().domain(g).rangeRound(n === "vertical" ? [0, D] : [P, 0]).paddingInner(E ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), b = Yt(C, (I) => I.total), U = le().domain([0, T ? 1 : b || 0]).nice().range(n === "vertical" ? [P, 0] : [0, D]), et = $e().rangeRound([0, D]).paddingInner(0.1).align(0.2), ot = m.map(function(I) {
|
|
4329
|
+
return I.label;
|
|
4330
4330
|
});
|
|
4331
|
-
|
|
4332
|
-
const ct = [],
|
|
4333
|
-
|
|
4334
|
-
const
|
|
4335
|
-
|
|
4336
|
-
const
|
|
4337
|
-
const at =
|
|
4338
|
-
const
|
|
4331
|
+
et.domain(ot);
|
|
4332
|
+
const ct = [], ht = n === "vertical" ? Gt(_).tickValues(_.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(ht).selectAll("text").style("cursor", "pointer").attr("dy", E ? "1em" : ".20em").attr("dx", E ? "0em" : "-.8em").attr("class", y).selectAll(".tick").filter((I) => I === 0).select("line").remove();
|
|
4334
|
+
const lt = Yt(C, (I) => I.total), ut = le().domain([0, T ? 1 : lt || 0]).nice().range([P, 0]), _t = n === "vertical" ? Zt(U).ticks(4, T ? ".0%" : "s").tickSize(-D) : Zt(_).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} - ${
|
|
4341
|
+
key: `${at} - ${X}`,
|
|
4342
4342
|
barKey: at
|
|
4343
4343
|
};
|
|
4344
4344
|
});
|
|
4345
|
-
return
|
|
4345
|
+
return $.key = at, $;
|
|
4346
4346
|
});
|
|
4347
|
-
let pe =
|
|
4348
|
-
return
|
|
4347
|
+
let pe = tt.selectAll(".serie").data(de, function(I) {
|
|
4348
|
+
return I.key;
|
|
4349
4349
|
}).join(
|
|
4350
|
-
(
|
|
4351
|
-
const G =
|
|
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
|
-
(
|
|
4355
|
-
const G =
|
|
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
|
-
(
|
|
4358
|
+
(I) => I.transition().duration(W).style("opacity", 0).attr("fill", Vt).selectAll("rect").attr("y", P).attr("height", 0).remove()
|
|
4359
4359
|
);
|
|
4360
|
-
const Qt = (
|
|
4361
|
-
const at = n === "vertical" ?
|
|
4360
|
+
const Qt = (I) => _(I.data.label + "") ?? 0, Xt = _.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
|
-
},
|
|
4364
|
-
function
|
|
4365
|
-
if (
|
|
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(
|
|
4368
|
-
return
|
|
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(
|
|
4371
|
-
const at = Lt(
|
|
4372
|
-
return n === "vertical" ?
|
|
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 = (
|
|
4374
|
+
const st = (I) => j !== "" && j === I.barKey ? `rect ${rt.rectLegendHovered}` : `rect ${rt.rect}`;
|
|
4375
4375
|
pe.selectAll("rect").data(
|
|
4376
|
-
(
|
|
4377
|
-
(
|
|
4376
|
+
(I) => I,
|
|
4377
|
+
(I) => I.data.label
|
|
4378
4378
|
).join(
|
|
4379
|
-
(
|
|
4379
|
+
(I) => {
|
|
4380
4380
|
let at;
|
|
4381
|
-
return at =
|
|
4382
|
-
return n === "vertical" ?
|
|
4383
|
-
}).attr("width", function(
|
|
4384
|
-
return n === "vertical" ?
|
|
4385
|
-
}).attr("y", function(
|
|
4381
|
+
return at = I.append("rect").attr("class", st).attr("x", function($) {
|
|
4382
|
+
return n === "vertical" ? et($.data.label + "") ?? 0 : U(0);
|
|
4383
|
+
}).attr("width", function($) {
|
|
4384
|
+
return n === "vertical" ? _.bandwidth() : 0;
|
|
4385
|
+
}).attr("y", function($) {
|
|
4386
4386
|
if (n === "vertical") {
|
|
4387
|
-
if (!ct.includes(
|
|
4387
|
+
if (!ct.includes($.data.label + ""))
|
|
4388
4388
|
return P;
|
|
4389
|
-
const G =
|
|
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(
|
|
4393
|
-
}).attr("height", function(
|
|
4394
|
-
return n === "vertical" ? 0 : $t(
|
|
4395
|
-
}).attr("stroke-dasharray",
|
|
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
|
-
(
|
|
4399
|
-
).attr("class", st).attr("stroke-dasharray",
|
|
4400
|
-
|
|
4401
|
-
const
|
|
4402
|
-
|
|
4403
|
-
|
|
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
|
+
dt(".x-axis").selectAll("text").filter((bt) => bt === at.data.name).attr("class", y + " " + nt.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(
|
|
4406
|
-
|
|
4407
|
-
}).on("mousemove", (
|
|
4408
|
-
Rn(
|
|
4409
|
-
}).on("mouseout", function(
|
|
4410
|
-
|
|
4405
|
+
}).on("touch", function(I, at) {
|
|
4406
|
+
dt(".x-axis").selectAll("text").filter(($) => $ === at.data.label).attr("class", y);
|
|
4407
|
+
}).on("mousemove", (I, at) => {
|
|
4408
|
+
Rn(z, { e: I, svg: Q, yScale: ut });
|
|
4409
|
+
}).on("mouseout", function(I, at) {
|
|
4410
|
+
dt(".x-axis").selectAll("text").filter(($) => $ === at.data.name).attr("class", y), z.style("opacity", 0);
|
|
4411
4411
|
});
|
|
4412
|
-
}, [...
|
|
4413
|
-
return /* @__PURE__ */
|
|
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(
|
|
4420
|
-
/* @__PURE__ */
|
|
4419
|
+
J ? kn(R, J) : R,
|
|
4420
|
+
/* @__PURE__ */ H.jsx(
|
|
4421
4421
|
"div",
|
|
4422
4422
|
{
|
|
4423
4423
|
ref: h,
|
|
4424
|
-
className: `${
|
|
4424
|
+
className: `${nt["fill-container"]}`,
|
|
4425
4425
|
style: { display: "flex", flexDirection: "column" },
|
|
4426
|
-
children: /* @__PURE__ */
|
|
4426
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
4427
4427
|
"div",
|
|
4428
4428
|
{
|
|
4429
4429
|
ref: M,
|
|
4430
|
-
className: `${
|
|
4430
|
+
className: `${nt["fill-container"]}`,
|
|
4431
4431
|
style: { display: "flex", flexDirection: "column" },
|
|
4432
4432
|
children: [
|
|
4433
|
-
/* @__PURE__ */
|
|
4433
|
+
/* @__PURE__ */ H.jsx(
|
|
4434
4434
|
"svg",
|
|
4435
4435
|
{
|
|
4436
|
-
className: `${
|
|
4437
|
-
viewBox: `0 0 ${
|
|
4438
|
-
children: /* @__PURE__ */
|
|
4439
|
-
/* @__PURE__ */
|
|
4440
|
-
/* @__PURE__ */
|
|
4441
|
-
/* @__PURE__ */
|
|
4436
|
+
className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
|
|
4437
|
+
viewBox: `0 0 ${p} ${v}`,
|
|
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__ */
|
|
4445
|
+
/* @__PURE__ */ H.jsx(We, { pCount: 3 })
|
|
4446
4446
|
]
|
|
4447
4447
|
}
|
|
4448
4448
|
)
|
|
@@ -4476,7 +4476,7 @@ function Qu(t, e) {
|
|
|
4476
4476
|
}
|
|
4477
4477
|
return n;
|
|
4478
4478
|
}
|
|
4479
|
-
function
|
|
4479
|
+
function Fn(t, e) {
|
|
4480
4480
|
let n = 0;
|
|
4481
4481
|
if (e === void 0)
|
|
4482
4482
|
for (let r of t)
|
|
@@ -4505,7 +4505,7 @@ function ii(t, e) {
|
|
|
4505
4505
|
function wn(t, e) {
|
|
4506
4506
|
return t.y0 - e.y0;
|
|
4507
4507
|
}
|
|
4508
|
-
function
|
|
4508
|
+
function Vn(t) {
|
|
4509
4509
|
return t.value;
|
|
4510
4510
|
}
|
|
4511
4511
|
function ef(t) {
|
|
@@ -4532,200 +4532,200 @@ 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,
|
|
4536
|
-
function
|
|
4537
|
-
const
|
|
4538
|
-
return
|
|
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
|
+
function v() {
|
|
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
|
-
|
|
4541
|
-
return si(
|
|
4542
|
-
},
|
|
4543
|
-
return arguments.length ? (o = typeof
|
|
4544
|
-
},
|
|
4545
|
-
return arguments.length ? (c = typeof
|
|
4546
|
-
},
|
|
4547
|
-
return arguments.length ? (l =
|
|
4548
|
-
},
|
|
4549
|
-
return arguments.length ? (i = +
|
|
4550
|
-
},
|
|
4551
|
-
return arguments.length ? (a = s = +
|
|
4552
|
-
},
|
|
4553
|
-
return arguments.length ? (h = typeof
|
|
4554
|
-
},
|
|
4555
|
-
return arguments.length ? (f = typeof
|
|
4556
|
-
},
|
|
4557
|
-
return arguments.length ? (u =
|
|
4558
|
-
},
|
|
4559
|
-
return arguments.length ? (t = e = 0, n = +
|
|
4560
|
-
},
|
|
4561
|
-
return arguments.length ? (t = +
|
|
4562
|
-
},
|
|
4563
|
-
return arguments.length ? (
|
|
4540
|
+
v.update = function(d) {
|
|
4541
|
+
return si(d), d;
|
|
4542
|
+
}, v.nodeId = function(d) {
|
|
4543
|
+
return arguments.length ? (o = typeof d == "function" ? d : nn(d), v) : o;
|
|
4544
|
+
}, v.nodeAlign = function(d) {
|
|
4545
|
+
return arguments.length ? (c = typeof d == "function" ? d : nn(d), v) : c;
|
|
4546
|
+
}, v.nodeSort = function(d) {
|
|
4547
|
+
return arguments.length ? (l = d, v) : l;
|
|
4548
|
+
}, v.nodeWidth = function(d) {
|
|
4549
|
+
return arguments.length ? (i = +d, v) : i;
|
|
4550
|
+
}, v.nodePadding = function(d) {
|
|
4551
|
+
return arguments.length ? (a = s = +d, v) : a;
|
|
4552
|
+
}, v.nodes = function(d) {
|
|
4553
|
+
return arguments.length ? (h = typeof d == "function" ? d : nn(d), v) : h;
|
|
4554
|
+
}, v.links = function(d) {
|
|
4555
|
+
return arguments.length ? (f = typeof d == "function" ? d : nn(d), v) : f;
|
|
4556
|
+
}, v.linkSort = function(d) {
|
|
4557
|
+
return arguments.length ? (u = d, v) : u;
|
|
4558
|
+
}, v.size = function(d) {
|
|
4559
|
+
return arguments.length ? (t = e = 0, n = +d[0], r = +d[1], v) : [n - t, r - e];
|
|
4560
|
+
}, v.extent = function(d) {
|
|
4561
|
+
return arguments.length ? (t = +d[0][0], n = +d[1][0], e = +d[0][1], r = +d[1][1], v) : [[t, e], [n, r]];
|
|
4562
|
+
}, v.iterations = function(d) {
|
|
4563
|
+
return arguments.length ? (p = +d, v) : p;
|
|
4564
4564
|
};
|
|
4565
|
-
function
|
|
4566
|
-
for (const [
|
|
4567
|
-
x.index =
|
|
4568
|
-
const M = new Map(
|
|
4569
|
-
for (const [
|
|
4570
|
-
x.index =
|
|
4571
|
-
let { source:
|
|
4572
|
-
typeof
|
|
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:
|
|
4576
|
-
|
|
4575
|
+
for (const { sourceLinks: N, targetLinks: x } of d)
|
|
4576
|
+
N.sort(u), x.sort(u);
|
|
4577
4577
|
}
|
|
4578
|
-
function K({ nodes:
|
|
4579
|
-
for (const
|
|
4580
|
-
|
|
4578
|
+
function K({ nodes: d }) {
|
|
4579
|
+
for (const R of d)
|
|
4580
|
+
R.value = R.fixedValue === void 0 ? Math.max(Fn(R.sourceLinks, Vn), Fn(R.targetLinks, Vn)) : R.fixedValue;
|
|
4581
4581
|
}
|
|
4582
|
-
function
|
|
4583
|
-
const
|
|
4584
|
-
let M = new Set(
|
|
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
|
|
4587
|
-
|
|
4588
|
-
for (const { target:
|
|
4589
|
-
|
|
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 >
|
|
4592
|
-
M =
|
|
4591
|
+
if (++x > R) throw new Error("circular link");
|
|
4592
|
+
M = N, N = /* @__PURE__ */ new Set();
|
|
4593
4593
|
}
|
|
4594
4594
|
}
|
|
4595
|
-
function
|
|
4596
|
-
const
|
|
4597
|
-
let M = new Set(
|
|
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
|
|
4600
|
-
|
|
4601
|
-
for (const { source:
|
|
4602
|
-
|
|
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 >
|
|
4605
|
-
M =
|
|
4604
|
+
if (++x > R) throw new Error("circular link");
|
|
4605
|
+
M = N, N = /* @__PURE__ */ new Set();
|
|
4606
4606
|
}
|
|
4607
4607
|
}
|
|
4608
|
-
function
|
|
4609
|
-
const
|
|
4610
|
-
for (const x of
|
|
4611
|
-
const
|
|
4612
|
-
x.layer =
|
|
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
|
|
4614
|
+
if (l) for (const x of N)
|
|
4615
4615
|
x.sort(l);
|
|
4616
|
-
return
|
|
4616
|
+
return N;
|
|
4617
4617
|
}
|
|
4618
|
-
function
|
|
4619
|
-
const
|
|
4620
|
-
for (const M of
|
|
4621
|
-
let
|
|
4618
|
+
function A(d) {
|
|
4619
|
+
const R = Qu(d, (M) => (r - e - (M.length - 1) * s) / Fn(M, Vn));
|
|
4620
|
+
for (const M of d) {
|
|
4621
|
+
let N = e;
|
|
4622
4622
|
for (const x of M) {
|
|
4623
|
-
x.y0 =
|
|
4624
|
-
for (const
|
|
4625
|
-
|
|
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
|
-
|
|
4627
|
+
N = (r - N + s) / (M.length + 1);
|
|
4628
4628
|
for (let x = 0; x < M.length; ++x) {
|
|
4629
|
-
const
|
|
4630
|
-
|
|
4629
|
+
const S = M[x];
|
|
4630
|
+
S.y0 += N * (x + 1), S.y1 += N * (x + 1);
|
|
4631
4631
|
}
|
|
4632
|
-
|
|
4632
|
+
L(M);
|
|
4633
4633
|
}
|
|
4634
4634
|
}
|
|
4635
|
-
function
|
|
4636
|
-
const
|
|
4637
|
-
s = Math.min(a, (r - e) / (ni(
|
|
4638
|
-
for (let M = 0; M <
|
|
4639
|
-
const
|
|
4640
|
-
J(
|
|
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), F(R, N, x);
|
|
4641
4641
|
}
|
|
4642
4642
|
}
|
|
4643
|
-
function
|
|
4644
|
-
for (let
|
|
4645
|
-
const
|
|
4646
|
-
for (const
|
|
4647
|
-
let
|
|
4648
|
-
for (const { source:
|
|
4649
|
-
let
|
|
4650
|
-
|
|
4643
|
+
function F(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
|
|
4654
|
-
|
|
4653
|
+
let V = (D / P - m.y0) * R;
|
|
4654
|
+
m.y0 += V, m.y1 += V, C(m);
|
|
4655
4655
|
}
|
|
4656
|
-
l === void 0 &&
|
|
4656
|
+
l === void 0 && S.sort(wn), Z(S, M);
|
|
4657
4657
|
}
|
|
4658
4658
|
}
|
|
4659
|
-
function J(
|
|
4660
|
-
for (let
|
|
4661
|
-
const
|
|
4662
|
-
for (const
|
|
4663
|
-
let
|
|
4664
|
-
for (const { target:
|
|
4665
|
-
let
|
|
4666
|
-
|
|
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
|
|
4670
|
-
|
|
4669
|
+
let V = (D / P - m.y0) * R;
|
|
4670
|
+
m.y0 += V, m.y1 += V, C(m);
|
|
4671
4671
|
}
|
|
4672
|
-
l === void 0 &&
|
|
4672
|
+
l === void 0 && S.sort(wn), Z(S, M);
|
|
4673
4673
|
}
|
|
4674
4674
|
}
|
|
4675
|
-
function
|
|
4676
|
-
const M =
|
|
4677
|
-
|
|
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(
|
|
4680
|
-
for (; M <
|
|
4681
|
-
const x =
|
|
4682
|
-
|
|
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
|
|
4685
|
+
function B(d, R, M, N) {
|
|
4686
4686
|
for (; M >= 0; --M) {
|
|
4687
|
-
const x =
|
|
4688
|
-
|
|
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
|
|
4691
|
+
function C({ sourceLinks: d, targetLinks: R }) {
|
|
4692
4692
|
if (u === void 0) {
|
|
4693
|
-
for (const { source: { sourceLinks: M } } of
|
|
4693
|
+
for (const { source: { sourceLinks: M } } of R)
|
|
4694
4694
|
M.sort(ii);
|
|
4695
|
-
for (const { target: { targetLinks: M } } of
|
|
4695
|
+
for (const { target: { targetLinks: M } } of d)
|
|
4696
4696
|
M.sort(ri);
|
|
4697
4697
|
}
|
|
4698
4698
|
}
|
|
4699
|
-
function
|
|
4699
|
+
function L(d) {
|
|
4700
4700
|
if (u === void 0)
|
|
4701
|
-
for (const { sourceLinks:
|
|
4702
|
-
|
|
4701
|
+
for (const { sourceLinks: R, targetLinks: M } of d)
|
|
4702
|
+
R.sort(ii), M.sort(ri);
|
|
4703
4703
|
}
|
|
4704
|
-
function
|
|
4705
|
-
let M =
|
|
4706
|
-
for (const { target:
|
|
4707
|
-
if (
|
|
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:
|
|
4711
|
-
if (
|
|
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
|
|
4717
|
-
let M =
|
|
4718
|
-
for (const { source:
|
|
4719
|
-
if (
|
|
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:
|
|
4723
|
-
if (
|
|
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;
|
|
4727
4727
|
}
|
|
4728
|
-
return
|
|
4728
|
+
return v;
|
|
4729
4729
|
}
|
|
4730
4730
|
var ar = Math.PI, sr = 2 * ar, re = 1e-6, sf = sr - re;
|
|
4731
4731
|
function or() {
|
|
@@ -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,
|
|
4765
|
-
Math.abs(
|
|
4764
|
+
var f = n - a, p = r - s, v = o * o + c * c, j = f * f + p * p, K = Math.sqrt(v), T = Math.sqrt(h), q = i * Math.tan((ar - Math.acos((v + 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,150 @@ 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] =
|
|
4838
|
-
|
|
4839
|
-
r((
|
|
4840
|
-
const
|
|
4841
|
-
return c.current =
|
|
4837
|
+
const [n, r] = ft(null), [i, a] = ft(!1), [s, o] = ft(!1), c = Pt(!0), l = Pt(!0), u = Pt("data"), [h, f] = he(), { width: p, height: v } = f, j = Ae(n ? n.nodes.map((k) => k.name) : []);
|
|
4838
|
+
vt(() => {
|
|
4839
|
+
r((k) => {
|
|
4840
|
+
const A = k === null ? [] : k.nodes.map((F) => F.name), O = t.nodes.map((F) => F.name);
|
|
4841
|
+
return c.current = O.every((F) => !A.includes(F)), k !== null && (l.current = !1), u.current = "data", t;
|
|
4842
4842
|
}), s && o(!1), i && a(!1);
|
|
4843
|
-
}, [t])
|
|
4844
|
-
|
|
4845
|
-
|
|
4843
|
+
}, [t]), vt(() => {
|
|
4844
|
+
p !== 0 && v !== 0 && (u.current = "dimension");
|
|
4845
|
+
}, [p, v]);
|
|
4846
|
+
const K = p <= 768, T = 1e3, q = Et(
|
|
4847
|
+
(k) => {
|
|
4846
4848
|
if (!n)
|
|
4847
4849
|
return;
|
|
4848
|
-
const
|
|
4849
|
-
if (
|
|
4850
|
+
const A = p, O = v;
|
|
4851
|
+
if (A === 0 || O === 0)
|
|
4850
4852
|
return;
|
|
4851
|
-
const
|
|
4852
|
-
|
|
4853
|
-
const g = n.nodes[
|
|
4854
|
-
|
|
4853
|
+
const F = { top: 30, right: 20, bottom: 20, left: 20 }, J = O - (F.top + F.bottom), Z = A - (F.left + F.right), W = J, B = Z, C = n.links.map((y) => ({ ...y })), L = n.nodes.map((y) => ({ ...y }));
|
|
4854
|
+
C.forEach(function(y) {
|
|
4855
|
+
const g = n.nodes[y.source].name, _ = n.nodes[y.target].name, b = g + " → " + _;
|
|
4856
|
+
y.sourceName = g, y.targetName = _, y.id = b;
|
|
4855
4857
|
});
|
|
4856
|
-
const
|
|
4857
|
-
|
|
4858
|
-
const E =
|
|
4859
|
-
const g =
|
|
4860
|
-
return { enteringValue: g, exitingValue:
|
|
4861
|
-
},
|
|
4862
|
-
s ? (
|
|
4863
|
-
const { enteringValue:
|
|
4864
|
-
return Math.max(
|
|
4858
|
+
const w = k.select("svg");
|
|
4859
|
+
w.node();
|
|
4860
|
+
const E = w.select(".plot-area").attr("transform", "translate(" + F.left + "," + F.top + ")"), d = Ye(k).style("opacity", 0), R = (y) => {
|
|
4861
|
+
const g = y.targetLinks?.reduce((b, U) => b + U.value, 0) ?? 0, _ = y.sourceLinks?.reduce((b, U) => b + U.value, 0) ?? 0;
|
|
4862
|
+
return { enteringValue: g, exitingValue: _ };
|
|
4863
|
+
}, N = af().nodeSort(
|
|
4864
|
+
s ? (y, g) => {
|
|
4865
|
+
const { enteringValue: _, exitingValue: b } = R(y), { enteringValue: U, exitingValue: et } = R(g);
|
|
4866
|
+
return Math.max(_, b) - Math.max(U, et);
|
|
4865
4867
|
} : null
|
|
4866
4868
|
).linkSort(
|
|
4867
|
-
i ? (
|
|
4868
|
-
).nodeWidth(
|
|
4869
|
-
nodes:
|
|
4870
|
-
links:
|
|
4871
|
-
}), { nodes:
|
|
4869
|
+
i ? (y, g) => y.value - g.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((y) => Object.assign({}, y)),
|
|
4872
|
+
links: C.map((y) => Object.assign({}, y))
|
|
4873
|
+
}), { nodes: x, links: S } = N;
|
|
4872
4874
|
E.selectAll("linearGradient").remove();
|
|
4873
|
-
const
|
|
4874
|
-
|
|
4875
|
-
const g =
|
|
4875
|
+
const m = E.selectAll("linearGradient").data(S).join("linearGradient").attr("id", (y, g) => g.toString()).attr("gradientUnits", "userSpaceOnUse").attr("x1", (y) => y.source.x0).attr("x2", (y) => y.target.x0);
|
|
4876
|
+
m.append("stop").attr("offset", "0%").attr("stop-color", (y) => {
|
|
4877
|
+
const g = j.current.findIndex((_) => _ === y.sourceName);
|
|
4876
4878
|
return xt(g, !1);
|
|
4877
|
-
}),
|
|
4878
|
-
const g =
|
|
4879
|
+
}), m.append("stop").attr("offset", "100%").attr("stop-color", (y) => {
|
|
4880
|
+
const g = j.current.findIndex((_) => _ === y.targetName);
|
|
4879
4881
|
return xt(g, !1);
|
|
4880
4882
|
});
|
|
4881
|
-
const
|
|
4882
|
-
const g =
|
|
4883
|
-
return
|
|
4884
|
-
},
|
|
4885
|
-
E.selectAll(".link").data(
|
|
4886
|
-
(
|
|
4887
|
-
return `url(#${
|
|
4888
|
-
}).attr("stroke-dasharray",
|
|
4889
|
-
return
|
|
4883
|
+
const D = (y) => {
|
|
4884
|
+
const g = y.source, _ = y.target, b = Math.abs(_.depth - g.depth);
|
|
4885
|
+
return B * 1.5 * b;
|
|
4886
|
+
}, P = (y) => D(y) + " " + D(y), V = (y) => !c.current || u.current !== "data" ? 0 : y.target.depth * T;
|
|
4887
|
+
E.selectAll(".link").data(S, (y) => y.id).join(
|
|
4888
|
+
(y) => y.append("path").attr("class", `link ${ci.sankeyEnergyLink}`).attr("d", li()).style("stroke", function(g) {
|
|
4889
|
+
return `url(#${m.filter((U) => U.sourceName === g.sourceName && U.targetName === g.targetName).node()?.id})`;
|
|
4890
|
+
}).attr("stroke-dasharray", P).attr("stroke-dashoffset", D).attr("stroke-width", (g) => Math.max(1, g.width)).transition().duration(T).delay(function(g) {
|
|
4891
|
+
return c.current ? V(g) : T;
|
|
4890
4892
|
}).attr("stroke-dashoffset", 0).on("end", function() {
|
|
4891
|
-
|
|
4893
|
+
dt(this).attr("stroke-dasharray", "none");
|
|
4892
4894
|
}),
|
|
4893
|
-
(
|
|
4894
|
-
|
|
4895
|
-
}),
|
|
4896
|
-
(
|
|
4897
|
-
).on("mouseover", (
|
|
4898
|
-
E.selectAll("path.link").filter((
|
|
4899
|
-
const
|
|
4900
|
-
return
|
|
4901
|
-
}).style("opacity", 0),
|
|
4902
|
-
}).on("mousemove", (
|
|
4903
|
-
ei(
|
|
4904
|
-
}).on("mouseout", (
|
|
4905
|
-
|
|
4906
|
-
const
|
|
4907
|
-
return `url(#${
|
|
4908
|
-
}).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${
|
|
4895
|
+
(y) => (y.attr("stroke-width", (g) => Math.max(1, g.width || 0)).transition().duration(T).delay(V).attr("d", li()).attr("stroke-dashoffset", 0).on("end", function() {
|
|
4896
|
+
dt(this).attr("stroke-dasharray", "none");
|
|
4897
|
+
}), y),
|
|
4898
|
+
(y) => c.current ? y.remove() : y.transition().duration(T / 4).style("opacity", 0).remove()
|
|
4899
|
+
).on("mouseover", (y, g) => {
|
|
4900
|
+
E.selectAll("path.link").filter((_) => _.id !== g.id).style("stroke", "#1f2937").style("stroke-opacity", 0.05), E.selectAll("text.label").filter((_) => {
|
|
4901
|
+
const b = _;
|
|
4902
|
+
return b.name !== g.sourceName && b.name !== g.targetName;
|
|
4903
|
+
}).style("opacity", 0), d.style("opacity", 1), d.select("p.title").text(g.id + St(g.value, e)), d.select("p.top-label").style("display", "none"), d.select("p.bottom-label").style("display", "none");
|
|
4904
|
+
}).on("mousemove", (y, g) => {
|
|
4905
|
+
ei(y, d);
|
|
4906
|
+
}).on("mouseout", (y, g) => {
|
|
4907
|
+
d.style("opacity", 0), E.selectAll("path.link").style("stroke", function(_) {
|
|
4908
|
+
const b = _;
|
|
4909
|
+
return `url(#${m.filter((ot) => ot.sourceName === b.sourceName && ot.targetName === b.targetName).node()?.id})`;
|
|
4910
|
+
}).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${nt.sankeyEnergyLink}`), E.selectAll("text.label").style("opacity", 1);
|
|
4909
4911
|
});
|
|
4910
|
-
const
|
|
4911
|
-
const { enteringValue: g, exitingValue:
|
|
4912
|
-
return { nodeState:
|
|
4913
|
-
},
|
|
4914
|
-
const { nodeState: g, enteringValue:
|
|
4915
|
-
return { enteringValue:
|
|
4912
|
+
const Q = (y) => !c.current || y.depth === 0 || u.current !== "data" ? 0 : y.depth * T + T / 4, tt = (y) => {
|
|
4913
|
+
const { enteringValue: g, exitingValue: _ } = R(y);
|
|
4914
|
+
return { nodeState: y.sourceLinks?.length === 0 && y.targetLinks?.length === 0 ? "stray node" : y.sourceLinks?.length === 0 ? "leaf node" : y.targetLinks?.length === 0 ? "source node" : g > _ ? "surplus" : g < _ ? "minus" : "balanced", enteringValue: g, exitingValue: _ };
|
|
4915
|
+
}, z = (y) => {
|
|
4916
|
+
const { nodeState: g, enteringValue: _, exitingValue: b } = tt(y);
|
|
4917
|
+
return { enteringValue: _, exitingValue: b, nodeState: g, stateColor: g === "surplus" ? "#4ade80" : g === "minus" ? "#f87171" : "#e7e7e7" };
|
|
4916
4918
|
};
|
|
4917
|
-
E.selectAll("rect.node").data(
|
|
4918
|
-
(
|
|
4919
|
-
const
|
|
4920
|
-
return xt(
|
|
4919
|
+
E.selectAll("rect.node").data(x, ((y) => y.name)).join(
|
|
4920
|
+
(y) => y.append("rect").attr("class", `node ${nt.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(T).delay(Q).attr("fill", (g) => {
|
|
4921
|
+
const _ = j.current.findIndex((b) => b === g.name);
|
|
4922
|
+
return xt(_, !1);
|
|
4921
4923
|
}).attr("opacity", 1).attr("width", function(g) {
|
|
4922
4924
|
return g.x1 - g.x0;
|
|
4923
4925
|
}),
|
|
4924
4926
|
void 0,
|
|
4925
|
-
(
|
|
4926
|
-
).on("mouseover", (
|
|
4927
|
-
E.selectAll("path.link").filter((
|
|
4928
|
-
const
|
|
4929
|
-
return !(
|
|
4930
|
-
}).style("stroke", "#1f2937").style("stroke-opacity", 0.
|
|
4931
|
-
const
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
}).on("
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4927
|
+
(y) => c.current ? y.remove() : y.transition().duration(T / 4).style("opacity", 0).remove()
|
|
4928
|
+
).on("mouseover", (y, g) => {
|
|
4929
|
+
E.selectAll("path.link").filter((lt) => {
|
|
4930
|
+
const ut = lt;
|
|
4931
|
+
return !(ut.sourceName === g.name || ut.targetName === g.name);
|
|
4932
|
+
}).style("stroke", "#1f2937").style("stroke-opacity", 0.05);
|
|
4933
|
+
const _ = g.sourceLinks?.map((lt) => lt.targetName) ?? [], U = [...g.targetLinks?.map((lt) => lt.sourceName) ?? [], ..._, g.name];
|
|
4934
|
+
E.selectAll("text.label").filter((lt) => !U.includes(lt.name)).style("opacity", 0.0625);
|
|
4935
|
+
const { enteringValue: et, exitingValue: ot, nodeState: ct, stateColor: ht } = z(g);
|
|
4936
|
+
d.style("opacity", 1), d.select("p.title").text(g.name + " :"), d.select("p.top-label").style("display", "block").text("in " + St(et, e)), d.select("p.bottom-label").style("display", "block").text("out " + St(ot, e)), d.select("p.small-text").style("display", "block").text(`${ct}`).style("color", `${ht}`);
|
|
4937
|
+
}).on("mousemove", (y, g) => {
|
|
4938
|
+
ei(y, d);
|
|
4939
|
+
}).on("mouseout", (y, g) => {
|
|
4940
|
+
d.style("opacity", 0), d.select("p.small-text").style("display", "none"), E.selectAll("path.link").style("stroke", function(et) {
|
|
4941
|
+
const ot = et;
|
|
4942
|
+
return `url(#${m.filter((lt) => lt.sourceName === ot.sourceName && lt.targetName === ot.targetName).node()?.id})`;
|
|
4943
|
+
}).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${nt.sankeyEnergyLink}`);
|
|
4944
|
+
const _ = g.sourceLinks?.map((et) => et.targetName) ?? [], U = [...g.targetLinks?.map((et) => et.sourceName) ?? [], ..._, g.name];
|
|
4945
|
+
E.selectAll("text.label").filter((et) => !U.includes(et.name)).style("opacity", 1);
|
|
4946
|
+
}).transition().duration(T).delay(Q).attr("stroke-width", K ? 2 : 2.5).style("stroke", function(y) {
|
|
4947
|
+
const { stateColor: g, nodeState: _ } = z(y);
|
|
4948
|
+
return _ === "surplus" || _ === "minus" ? g : "#52525b";
|
|
4949
|
+
}).attr("opacity", 1).attr("x", (y) => y.x0).attr("y", (y) => y.y0).attr("height", (y) => Math.abs(y.y1 - y.y0)).attr("width", (y) => y.x1 - y.x0).attr("fill", (y) => {
|
|
4950
|
+
const g = j.current.findIndex((_) => _ === y.name);
|
|
4945
4951
|
return xt(g, !1);
|
|
4946
|
-
}), E.selectAll("text.label").data(
|
|
4947
|
-
(
|
|
4952
|
+
}), E.selectAll("text.label").data(x, (y) => y.name).join(
|
|
4953
|
+
(y) => y.append("text").attr("class", `label ${ci.sankeyLabel}`).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").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((g) => g.name).attr("opacity", 0),
|
|
4948
4954
|
void 0,
|
|
4949
|
-
(
|
|
4950
|
-
).style("font-size",
|
|
4955
|
+
(y) => y.remove()
|
|
4956
|
+
).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", (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").attr("opacity", 1);
|
|
4951
4957
|
},
|
|
4952
|
-
[n, i, s,
|
|
4958
|
+
[n, i, s, p, v, e]
|
|
4953
4959
|
);
|
|
4954
|
-
return /* @__PURE__ */
|
|
4960
|
+
return /* @__PURE__ */ H.jsx(
|
|
4955
4961
|
"div",
|
|
4956
4962
|
{
|
|
4957
|
-
ref:
|
|
4958
|
-
style: { width:
|
|
4959
|
-
children: /* @__PURE__ */
|
|
4963
|
+
ref: h,
|
|
4964
|
+
style: { width: p, height: v, display: "flex", flexDirection: "column" },
|
|
4965
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
4960
4966
|
"div",
|
|
4961
4967
|
{
|
|
4962
|
-
ref:
|
|
4963
|
-
className: `${
|
|
4968
|
+
ref: q,
|
|
4969
|
+
className: `${nt["fill-container"]}`,
|
|
4964
4970
|
style: { display: "flex", flexDirection: "column", position: "relative" },
|
|
4965
4971
|
children: [
|
|
4966
|
-
/* @__PURE__ */
|
|
4972
|
+
/* @__PURE__ */ H.jsx(
|
|
4967
4973
|
"svg",
|
|
4968
4974
|
{
|
|
4969
|
-
className: `${
|
|
4970
|
-
viewBox: `0 0 ${
|
|
4971
|
-
children: /* @__PURE__ */
|
|
4975
|
+
className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
|
|
4976
|
+
viewBox: `0 0 ${p} ${v}`,
|
|
4977
|
+
children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
|
|
4972
4978
|
}
|
|
4973
4979
|
),
|
|
4974
|
-
/* @__PURE__ */
|
|
4980
|
+
/* @__PURE__ */ H.jsxs(
|
|
4975
4981
|
"div",
|
|
4976
4982
|
{
|
|
4977
4983
|
style: {
|
|
@@ -4982,36 +4988,42 @@ function Sf({ data: t, tooltipFormat: e }) {
|
|
|
4982
4988
|
alignItems: "center"
|
|
4983
4989
|
},
|
|
4984
4990
|
children: [
|
|
4985
|
-
/* @__PURE__ */
|
|
4991
|
+
/* @__PURE__ */ H.jsxs(
|
|
4986
4992
|
"label",
|
|
4987
4993
|
{
|
|
4988
|
-
className:
|
|
4994
|
+
className: nt["controls-label"],
|
|
4989
4995
|
children: [
|
|
4990
|
-
/* @__PURE__ */
|
|
4996
|
+
/* @__PURE__ */ H.jsx(
|
|
4991
4997
|
"input",
|
|
4992
4998
|
{
|
|
4993
4999
|
type: "checkbox",
|
|
4994
|
-
className:
|
|
5000
|
+
className: nt["controls-checkbox"],
|
|
4995
5001
|
checked: i,
|
|
4996
|
-
onChange: (
|
|
5002
|
+
onChange: (k) => {
|
|
5003
|
+
const A = k.target.checked;
|
|
5004
|
+
A && (u.current = "sort link"), a(A);
|
|
5005
|
+
}
|
|
4997
5006
|
}
|
|
4998
5007
|
),
|
|
4999
5008
|
"Sort link"
|
|
5000
5009
|
]
|
|
5001
5010
|
}
|
|
5002
5011
|
),
|
|
5003
|
-
/* @__PURE__ */
|
|
5012
|
+
/* @__PURE__ */ H.jsxs(
|
|
5004
5013
|
"label",
|
|
5005
5014
|
{
|
|
5006
|
-
className:
|
|
5015
|
+
className: nt["controls-label"],
|
|
5007
5016
|
children: [
|
|
5008
|
-
/* @__PURE__ */
|
|
5017
|
+
/* @__PURE__ */ H.jsx(
|
|
5009
5018
|
"input",
|
|
5010
5019
|
{
|
|
5011
5020
|
type: "checkbox",
|
|
5012
|
-
className:
|
|
5021
|
+
className: nt["controls-checkbox"],
|
|
5013
5022
|
checked: s,
|
|
5014
|
-
onChange: (
|
|
5023
|
+
onChange: (k) => {
|
|
5024
|
+
const A = k.target.checked;
|
|
5025
|
+
A && (u.current = "sort node"), o(A);
|
|
5026
|
+
}
|
|
5015
5027
|
}
|
|
5016
5028
|
),
|
|
5017
5029
|
"Sort node"
|
|
@@ -5021,7 +5033,7 @@ function Sf({ data: t, tooltipFormat: e }) {
|
|
|
5021
5033
|
]
|
|
5022
5034
|
}
|
|
5023
5035
|
),
|
|
5024
|
-
/* @__PURE__ */
|
|
5036
|
+
/* @__PURE__ */ H.jsx(We, { pCount: 4 })
|
|
5025
5037
|
]
|
|
5026
5038
|
}
|
|
5027
5039
|
)
|
|
@@ -5030,189 +5042,189 @@ function Sf({ data: t, tooltipFormat: e }) {
|
|
|
5030
5042
|
}
|
|
5031
5043
|
const ee = {};
|
|
5032
5044
|
function Mf({ data: t, tooltipFormat: e }) {
|
|
5033
|
-
const [n, r] =
|
|
5034
|
-
|
|
5035
|
-
if (!
|
|
5036
|
-
const
|
|
5037
|
-
function
|
|
5038
|
-
const
|
|
5045
|
+
const [n, r] = ft(null), [i, a] = ft({ name: "", value: 0 }), [s, o] = ft({ name: "", value: 0 }), c = Pt(!0), [l, u] = he(), { width: h, height: f } = u, p = Pt(null), v = Pt(null);
|
|
5046
|
+
vt(() => {
|
|
5047
|
+
if (!v.current || !p.current) return;
|
|
5048
|
+
const T = p.current;
|
|
5049
|
+
function q(A, O) {
|
|
5050
|
+
const F = Math.max(A.length, O.length);
|
|
5039
5051
|
return function(J) {
|
|
5040
|
-
let
|
|
5041
|
-
for (let W = 0; W <
|
|
5042
|
-
|
|
5043
|
-
return
|
|
5052
|
+
let Z = "";
|
|
5053
|
+
for (let W = 0; W < F; W++)
|
|
5054
|
+
Z += J < 0.5 ? A[W] ?? "" : O[W] ?? "";
|
|
5055
|
+
return Z;
|
|
5044
5056
|
};
|
|
5045
5057
|
}
|
|
5046
|
-
|
|
5047
|
-
const
|
|
5048
|
-
return function(
|
|
5049
|
-
|
|
5058
|
+
dt(T).transition().duration(250).tween("text", function() {
|
|
5059
|
+
const A = q(s.name, i.name);
|
|
5060
|
+
return function(O) {
|
|
5061
|
+
T.textContent = A(O);
|
|
5050
5062
|
};
|
|
5051
5063
|
});
|
|
5052
|
-
const
|
|
5053
|
-
|
|
5054
|
-
const
|
|
5055
|
-
return function(
|
|
5056
|
-
|
|
5064
|
+
const k = v.current;
|
|
5065
|
+
dt(k).transition().duration(250).ease(tc).tween("text", function() {
|
|
5066
|
+
const A = Nt(s.value, i.value);
|
|
5067
|
+
return function(O) {
|
|
5068
|
+
k.textContent = St(Math.round(A(O)), e).toLocaleString();
|
|
5057
5069
|
};
|
|
5058
5070
|
});
|
|
5059
|
-
}, [i, s]),
|
|
5060
|
-
r((
|
|
5071
|
+
}, [i, s]), vt(() => {
|
|
5072
|
+
r((T) => (T !== null && (c.current = !1), t));
|
|
5061
5073
|
}, [t]);
|
|
5062
|
-
const
|
|
5063
|
-
(
|
|
5074
|
+
const j = 1e3, K = Et(
|
|
5075
|
+
(T) => {
|
|
5064
5076
|
if (!n)
|
|
5065
5077
|
return;
|
|
5066
|
-
const
|
|
5067
|
-
if (
|
|
5078
|
+
const q = h, k = f, A = 12, O = 1.5;
|
|
5079
|
+
if (q === 0 || k === 0)
|
|
5068
5080
|
return;
|
|
5069
|
-
const
|
|
5070
|
-
return
|
|
5071
|
-
}).sort(function(
|
|
5072
|
-
return
|
|
5073
|
-
}),
|
|
5074
|
-
let
|
|
5075
|
-
const
|
|
5076
|
-
|
|
5077
|
-
const P =
|
|
5078
|
-
(
|
|
5079
|
-
return
|
|
5080
|
-
}).style("fill", function(
|
|
5081
|
-
return
|
|
5082
|
-
}).style("cursor", "pointer").transition().duration(
|
|
5083
|
-
const
|
|
5084
|
-
return
|
|
5085
|
-
}).attr("cx", function(
|
|
5086
|
-
const
|
|
5087
|
-
return (
|
|
5088
|
-
}).attr("cy", function(
|
|
5089
|
-
const
|
|
5090
|
-
return (
|
|
5091
|
-
}).style("stroke", "#737373").style("stroke-width",
|
|
5092
|
-
return
|
|
5081
|
+
const F = 25, J = k - F * 2, Z = q - F * 2, W = J, B = Z, C = { name: "branches", children: n }, L = Math.min(B, W), w = pr(C).sum(function(g) {
|
|
5082
|
+
return g.value;
|
|
5083
|
+
}).sort(function(g, _) {
|
|
5084
|
+
return g.value - _.value;
|
|
5085
|
+
}), E = Qc().size([L - 20, L - 20]).padding(2);
|
|
5086
|
+
let d = w, R = 1, M = 1;
|
|
5087
|
+
const N = E(w), x = N.descendants(), S = [N.x, N.y, N.r * 2 + F], m = dt("#tooltip").style("opacity", 0), D = T.select("svg");
|
|
5088
|
+
D.node();
|
|
5089
|
+
const P = D.select(".plot-area").attr("transform", "translate(" + q / 2 + "," + k / 2 + ")"), V = le().domain([-1, 2]).range(["hsl(152,80%,80%)", "hsl(228,30%,40%)"]).interpolate(Yo), Q = P.selectAll("circle").data(x, (g) => g.data.name).join(
|
|
5090
|
+
(g) => g.append("circle").attr("class", function(_) {
|
|
5091
|
+
return _.parent ? _.children ? ee.node : `${ee.node} ${ee["node--leaf"]}` : `${ee.node} ${ee["node--root"]}`;
|
|
5092
|
+
}).style("fill", function(_) {
|
|
5093
|
+
return _.children ? V(_.depth) : "#f0fdfa";
|
|
5094
|
+
}).style("cursor", "pointer").transition().duration(j).attr("r", function(_) {
|
|
5095
|
+
const b = L / S[2];
|
|
5096
|
+
return _.r * b;
|
|
5097
|
+
}).attr("cx", function(_) {
|
|
5098
|
+
const b = L / S[2];
|
|
5099
|
+
return (_.x - S[0]) * b;
|
|
5100
|
+
}).attr("cy", function(_) {
|
|
5101
|
+
const b = L / S[2];
|
|
5102
|
+
return (_.y - S[1]) * b;
|
|
5103
|
+
}).style("stroke", "#737373").style("stroke-width", O * M).style("fill", function(_) {
|
|
5104
|
+
return _.children ? V(_.depth) : "#f0fdfa";
|
|
5093
5105
|
}),
|
|
5094
|
-
(
|
|
5095
|
-
const
|
|
5096
|
-
return (
|
|
5097
|
-
}).attr("cy", function(
|
|
5098
|
-
const
|
|
5099
|
-
return (
|
|
5100
|
-
}).attr("r", function(
|
|
5101
|
-
const
|
|
5102
|
-
return
|
|
5103
|
-
}).style("stroke", function(
|
|
5106
|
+
(g) => g.transition().duration(j).attr("cx", function(_) {
|
|
5107
|
+
const b = L / S[2];
|
|
5108
|
+
return (_.x - S[0]) * b;
|
|
5109
|
+
}).attr("cy", function(_) {
|
|
5110
|
+
const b = L / S[2];
|
|
5111
|
+
return (_.y - S[1]) * b;
|
|
5112
|
+
}).attr("r", function(_) {
|
|
5113
|
+
const b = L / S[2];
|
|
5114
|
+
return _.r * b;
|
|
5115
|
+
}).style("stroke", function(_) {
|
|
5104
5116
|
return "#737373";
|
|
5105
|
-
}).style("stroke-width",
|
|
5106
|
-
return
|
|
5117
|
+
}).style("stroke-width", O * M).style("fill", function(_) {
|
|
5118
|
+
return _.children ? V(_.depth) : "#f0fdfa";
|
|
5107
5119
|
}),
|
|
5108
|
-
(
|
|
5109
|
-
).on("mouseover", function(
|
|
5110
|
-
|
|
5111
|
-
return
|
|
5112
|
-
}).style("font-size",
|
|
5113
|
-
return
|
|
5114
|
-
}).style("display", function(
|
|
5115
|
-
return
|
|
5116
|
-
}) :
|
|
5117
|
-
return
|
|
5118
|
-
}).style("font-size",
|
|
5119
|
-
return
|
|
5120
|
-
}).style("display", function(
|
|
5121
|
-
return
|
|
5122
|
-
}) : (
|
|
5123
|
-
return
|
|
5124
|
-
}).style("fill-opacity", 0).style("display", "none"),
|
|
5125
|
-
return
|
|
5126
|
-
}).style("fill-opacity", 1).style("display", "inline")),
|
|
5127
|
-
}).on("mouseout", function(
|
|
5128
|
-
|
|
5129
|
-
return
|
|
5130
|
-
}).style("fill-opacity", function(
|
|
5131
|
-
return
|
|
5132
|
-
}).style("display", function(
|
|
5133
|
-
return
|
|
5134
|
-
}),
|
|
5120
|
+
(g) => g.transition().duration(j).style("opacity", 0).remove()
|
|
5121
|
+
).on("mouseover", function(g, _) {
|
|
5122
|
+
d.parent === _ ? tt.filter(function(b) {
|
|
5123
|
+
return b.parent === d || this.style.display === "inline";
|
|
5124
|
+
}).style("font-size", A * M).style("fill-opacity", function(b) {
|
|
5125
|
+
return b.parent === d ? 1 : 0;
|
|
5126
|
+
}).style("display", function(b) {
|
|
5127
|
+
return b.parent === d ? "inline" : "none";
|
|
5128
|
+
}) : _ === d ? tt.filter(function(b) {
|
|
5129
|
+
return b.parent === d || this.style.display === "inline";
|
|
5130
|
+
}).style("font-size", A * M).style("fill-opacity", function(b) {
|
|
5131
|
+
return b.parent === d ? 1 : 0;
|
|
5132
|
+
}).style("display", function(b) {
|
|
5133
|
+
return b.parent === d ? "inline" : "none";
|
|
5134
|
+
}) : (tt.filter(function(b) {
|
|
5135
|
+
return b.data.name != _.data.name;
|
|
5136
|
+
}).style("fill-opacity", 0).style("display", "none"), tt.filter(function(b) {
|
|
5137
|
+
return b.data.name === _.data.name;
|
|
5138
|
+
}).style("fill-opacity", 1).style("display", "inline")), dt(this).style("stroke"), _ != w && dt(this).style("stroke-width", O * M * 2.5).style("stroke", "#e4e4e7"), m.transition().duration(250).style("opacity", 1), a((b) => (o(b), { name: _.data.name === "branches" ? "Total" : _.data.name, value: _.value ? _.value : 0 }));
|
|
5139
|
+
}).on("mouseout", function(g, _) {
|
|
5140
|
+
tt.filter(function(b) {
|
|
5141
|
+
return b.parent === d || this.style.display === "inline";
|
|
5142
|
+
}).style("fill-opacity", function(b) {
|
|
5143
|
+
return b.parent === d ? 1 : 0;
|
|
5144
|
+
}).style("display", function(b) {
|
|
5145
|
+
return b.parent === d ? "inline" : "none";
|
|
5146
|
+
}), dt(this).style("stroke-width", O * M).style("stroke", function(b) {
|
|
5135
5147
|
return "#737373";
|
|
5136
|
-
}),
|
|
5137
|
-
}).on("click", function(
|
|
5138
|
-
if (
|
|
5139
|
-
|
|
5148
|
+
}), m.transition().duration(250).style("opacity", 0);
|
|
5149
|
+
}).on("click", function(g, _) {
|
|
5150
|
+
if (_ === w) {
|
|
5151
|
+
y();
|
|
5140
5152
|
return;
|
|
5141
5153
|
}
|
|
5142
|
-
|
|
5143
|
-
}),
|
|
5144
|
-
return
|
|
5154
|
+
d != _ ? z(_) : y(), Q.style("stroke-width", O * M), g.stopPropagation();
|
|
5155
|
+
}), tt = P.selectAll("text").data(x, function(g) {
|
|
5156
|
+
return g.data.name;
|
|
5145
5157
|
}).join(
|
|
5146
|
-
(
|
|
5147
|
-
return
|
|
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(
|
|
5149
|
-
const
|
|
5150
|
-
return "translate(" + (
|
|
5151
|
-
}).style("fill-opacity", function(
|
|
5152
|
-
return
|
|
5153
|
-
}).style("display", function(
|
|
5154
|
-
return
|
|
5158
|
+
(g) => g.append("text").attr("class", ee.circle_pack_label).text(function(_) {
|
|
5159
|
+
return _.data.name;
|
|
5160
|
+
}).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(_) {
|
|
5161
|
+
const b = L / S[2];
|
|
5162
|
+
return "translate(" + (_.x - S[0]) * b + "," + (_.y - S[1]) * b + ")";
|
|
5163
|
+
}).style("fill-opacity", function(_) {
|
|
5164
|
+
return _.parent === w ? 1 : 0;
|
|
5165
|
+
}).style("display", function(_) {
|
|
5166
|
+
return _.parent === w ? "inline" : "none";
|
|
5155
5167
|
}),
|
|
5156
|
-
(
|
|
5157
|
-
const
|
|
5158
|
-
return "translate(" + (
|
|
5159
|
-
}).style("fill-opacity", function(
|
|
5160
|
-
return
|
|
5161
|
-
}).style("display", function(
|
|
5162
|
-
return
|
|
5168
|
+
(g) => g.attr("class", ee.circle_pack_label).transition().duration(j).attr("transform", function(_) {
|
|
5169
|
+
const b = L / S[2];
|
|
5170
|
+
return "translate(" + (_.x - S[0]) * b + "," + (_.y - S[1]) * b + ")";
|
|
5171
|
+
}).style("fill-opacity", function(_) {
|
|
5172
|
+
return _.parent === w ? 1 : 0;
|
|
5173
|
+
}).style("display", function(_) {
|
|
5174
|
+
return _.parent === w ? "inline" : "none";
|
|
5163
5175
|
}),
|
|
5164
|
-
(
|
|
5176
|
+
(g) => g.transition().duration(j).style("opacity", 0).remove()
|
|
5165
5177
|
);
|
|
5166
|
-
|
|
5167
|
-
function g
|
|
5168
|
-
|
|
5169
|
-
const
|
|
5178
|
+
tt.raise();
|
|
5179
|
+
function z(g) {
|
|
5180
|
+
d = g;
|
|
5181
|
+
const _ = L / 2 - F, b = q / 2, U = k / 2, et = L / S[2], ot = (
|
|
5170
5182
|
/*currentData==="---"?Math.max((d.r * k),0.25):*/
|
|
5171
|
-
|
|
5183
|
+
g.r * et
|
|
5172
5184
|
);
|
|
5173
|
-
M =
|
|
5174
|
-
const ct = (
|
|
5175
|
-
P.transition().duration(1e3).attr("transform", "translate(" +
|
|
5176
|
-
return
|
|
5177
|
-
}).style("fill-opacity", function(
|
|
5178
|
-
return
|
|
5179
|
-
}).style("display", function(
|
|
5180
|
-
return
|
|
5185
|
+
M = ot / _, R = _ / ot;
|
|
5186
|
+
const ct = (g.x - S[0]) * et, ht = b - ct * R, lt = (g.y - S[0]) * et, ut = U - lt * R;
|
|
5187
|
+
P.transition().duration(1e3).attr("transform", "translate(" + ht + "," + ut + ")scale(" + R + ")"), tt.style("font-size", A * M + "px").filter(function(_t) {
|
|
5188
|
+
return _t.parent === d || this.style.display === "inline";
|
|
5189
|
+
}).style("fill-opacity", function(_t) {
|
|
5190
|
+
return _t.parent === d ? 1 : 0;
|
|
5191
|
+
}).style("display", function(_t) {
|
|
5192
|
+
return _t.parent === d ? "inline" : "none";
|
|
5181
5193
|
});
|
|
5182
5194
|
}
|
|
5183
|
-
function
|
|
5184
|
-
P.transition().duration(1e3).attr("transform", "translate(" +
|
|
5185
|
-
return
|
|
5186
|
-
}).style("fill-opacity", function(
|
|
5187
|
-
return
|
|
5188
|
-
}).style("display", function(
|
|
5189
|
-
return
|
|
5195
|
+
function y() {
|
|
5196
|
+
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(g) {
|
|
5197
|
+
return g.parent === d || this.style.display === "inline";
|
|
5198
|
+
}).style("fill-opacity", function(g) {
|
|
5199
|
+
return g.parent === d ? 1 : 0;
|
|
5200
|
+
}).style("display", function(g) {
|
|
5201
|
+
return g.parent === d ? "inline" : "none";
|
|
5190
5202
|
});
|
|
5191
5203
|
}
|
|
5192
5204
|
},
|
|
5193
5205
|
[n, h, f]
|
|
5194
5206
|
);
|
|
5195
|
-
return /* @__PURE__ */
|
|
5207
|
+
return /* @__PURE__ */ H.jsx(
|
|
5196
5208
|
"div",
|
|
5197
5209
|
{
|
|
5198
5210
|
ref: l,
|
|
5199
5211
|
style: { width: h, height: f, display: "flex", flexDirection: "column" },
|
|
5200
|
-
children: /* @__PURE__ */
|
|
5212
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
5201
5213
|
"div",
|
|
5202
5214
|
{
|
|
5203
5215
|
ref: K,
|
|
5204
|
-
className: `${
|
|
5216
|
+
className: `${nt["fill-container"]}`,
|
|
5205
5217
|
style: { display: "flex", flexDirection: "column", position: "relative" },
|
|
5206
5218
|
children: [
|
|
5207
|
-
/* @__PURE__ */
|
|
5219
|
+
/* @__PURE__ */ H.jsx(
|
|
5208
5220
|
"svg",
|
|
5209
5221
|
{
|
|
5210
|
-
className: `${
|
|
5222
|
+
className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
|
|
5211
5223
|
viewBox: `0 0 ${h} ${f}`,
|
|
5212
|
-
children: /* @__PURE__ */
|
|
5224
|
+
children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
|
|
5213
5225
|
}
|
|
5214
5226
|
),
|
|
5215
|
-
/* @__PURE__ */
|
|
5227
|
+
/* @__PURE__ */ H.jsxs(
|
|
5216
5228
|
"div",
|
|
5217
5229
|
{
|
|
5218
5230
|
id: "tooltip",
|
|
@@ -5227,8 +5239,8 @@ function Mf({ data: t, tooltipFormat: e }) {
|
|
|
5227
5239
|
gap: 2
|
|
5228
5240
|
},
|
|
5229
5241
|
children: [
|
|
5230
|
-
/* @__PURE__ */
|
|
5231
|
-
/* @__PURE__ */
|
|
5242
|
+
/* @__PURE__ */ H.jsx("p", { ref: p, id: "name", children: "Test tooltip" }),
|
|
5243
|
+
/* @__PURE__ */ H.jsx("p", { ref: v, id: "value", children: "Test tooltip" })
|
|
5232
5244
|
]
|
|
5233
5245
|
}
|
|
5234
5246
|
)
|