@cfasim-ui/charts 0.7.6 → 0.7.8
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/ChoroplethMap/ChoroplethMap.d.ts +33 -5
- package/dist/ChoroplethMap/canvasLayer.d.ts +8 -1
- package/dist/ChoroplethMap/cityLayout.d.ts +89 -0
- package/dist/ChoroplethMap/cityLayout.test.d.ts +1 -0
- package/dist/LineChart/LineChart.d.ts +7 -0
- package/dist/_shared/chartProps.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1406 -1142
- package/dist/us-cities/data.d.ts +2 -0
- package/dist/us-cities/index.d.ts +51 -0
- package/dist/us-cities/us-cities.test.d.ts +1 -0
- package/dist/us-cities.d.ts +1 -0
- package/dist/us-cities.js +1396 -0
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { select as M } from "d3-selection";
|
|
|
7
7
|
import "d3-transition";
|
|
8
8
|
import { feature as me, merge as he, mesh as ge } from "topojson-client";
|
|
9
9
|
//#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
10
|
+
var _e = ["aria-label"], ve = /* @__PURE__ */ l({
|
|
11
11
|
__name: "ChartMenu",
|
|
12
12
|
props: {
|
|
13
13
|
items: {},
|
|
@@ -104,44 +104,44 @@ var N = ["aria-label"], _e = /* @__PURE__ */ l({
|
|
|
104
104
|
"stroke-linecap": "round",
|
|
105
105
|
"stroke-linejoin": "round",
|
|
106
106
|
"aria-hidden": "true"
|
|
107
|
-
}, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8,
|
|
107
|
+
}, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, _e))], 2));
|
|
108
108
|
}
|
|
109
|
-
}),
|
|
109
|
+
}), N = (e, t) => {
|
|
110
110
|
let n = e.__vccOpts || e;
|
|
111
111
|
for (let [e, r] of t) n[e] = r;
|
|
112
112
|
return n;
|
|
113
|
-
},
|
|
113
|
+
}, ye = /* @__PURE__ */ N(ve, [["__scopeId", "data-v-f5743494"]]);
|
|
114
114
|
//#endregion
|
|
115
115
|
//#region src/_shared/axes.ts
|
|
116
|
-
function
|
|
116
|
+
function P(e) {
|
|
117
117
|
return Math.round(e) + .5;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function be(e, t) {
|
|
120
120
|
let n = e / t, r = 10 ** Math.floor(Math.log10(n)), i = n / r, a;
|
|
121
121
|
return a = i <= 1.5 ? 1 : i <= 3 ? 2 : i <= 7 ? 5 : 10, a * r;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function xe(e, t, n) {
|
|
124
124
|
if (!(n > 0) || !isFinite(n)) return [];
|
|
125
125
|
let r = [], i = Math.ceil(e / n) * n;
|
|
126
126
|
for (let e = 0, a = i; a <= t + 1e-9 && e < 1e3; e++, a = i + e * n) r.push(a);
|
|
127
127
|
return r;
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
131
|
-
return Math.abs(e) >= 1e3 ?
|
|
129
|
+
var Se = new Intl.NumberFormat();
|
|
130
|
+
function Ce(e) {
|
|
131
|
+
return Math.abs(e) >= 1e3 ? Se.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
|
|
132
132
|
}
|
|
133
133
|
//#endregion
|
|
134
134
|
//#region src/_shared/computeTicks.ts
|
|
135
|
-
function
|
|
135
|
+
function F(e) {
|
|
136
136
|
let { min: t, max: n, ticks: r } = e;
|
|
137
137
|
if (t === n) return [];
|
|
138
138
|
let i = e.displayOffset ?? 0;
|
|
139
139
|
if (Array.isArray(r)) return r.map((e) => e - i).filter((e) => e >= t && e <= n);
|
|
140
|
-
if (typeof r == "number") return
|
|
141
|
-
let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o =
|
|
142
|
-
return
|
|
140
|
+
if (typeof r == "number") return xe(t + i, n + i, r).map((e) => e - i);
|
|
141
|
+
let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = be(n - t, a);
|
|
142
|
+
return xe(t + i, n + i, o).map((e) => e - i);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function we(e, t, n, r) {
|
|
145
145
|
if (r === "log") {
|
|
146
146
|
let r = Math.log10(t), i = Math.log10(n) - r || 1;
|
|
147
147
|
return (Math.log10(e > 0 ? e : t) - r) / i;
|
|
@@ -149,7 +149,7 @@ function R(e, t, n, r) {
|
|
|
149
149
|
let i = n - t || 1;
|
|
150
150
|
return (e - t) / i;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Te(e, t, n, r) {
|
|
153
153
|
if (n !== "log") return {
|
|
154
154
|
min: e,
|
|
155
155
|
max: t
|
|
@@ -160,7 +160,7 @@ function Se(e, t, n, r) {
|
|
|
160
160
|
max: t > 0 ? Math.max(t, i) : i
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function I(e) {
|
|
164
164
|
let { min: t, max: n, ticks: r } = e;
|
|
165
165
|
if (!(t > 0) || !(n > 0) || t === n) return [];
|
|
166
166
|
if (Array.isArray(r)) return r.filter((e) => e > 0 && e >= t && e <= n);
|
|
@@ -173,7 +173,7 @@ function Ce(e) {
|
|
|
173
173
|
}
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region src/_shared/useChartSize.ts
|
|
176
|
-
function
|
|
176
|
+
function Ee(e = {}) {
|
|
177
177
|
let t = v(null), n = v(0), r = v(0), i = null, a = null;
|
|
178
178
|
return g(() => {
|
|
179
179
|
t.value && (n.value = t.value.clientWidth, r.value = t.value.clientHeight, i = new ResizeObserver((t) => {
|
|
@@ -192,8 +192,8 @@ function we(e = {}) {
|
|
|
192
192
|
measuredHeight: r
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
var
|
|
196
|
-
function
|
|
195
|
+
var L = .6, De = 8;
|
|
196
|
+
function Oe(e, t) {
|
|
197
197
|
return {
|
|
198
198
|
fontSize: e?.fontSize ?? t.fontSize,
|
|
199
199
|
fill: e?.color ?? "currentColor",
|
|
@@ -201,8 +201,8 @@ function Ee(e, t) {
|
|
|
201
201
|
fillOpacity: e?.color == null ? t.fillOpacity : void 0
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
var
|
|
205
|
-
function
|
|
204
|
+
var R = 7, ke = 18, Ae = 16;
|
|
205
|
+
function je(e) {
|
|
206
206
|
return e == null ? {
|
|
207
207
|
top: 0,
|
|
208
208
|
right: 0,
|
|
@@ -220,12 +220,12 @@ function Ae(e) {
|
|
|
220
220
|
left: e.left ?? 0
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function je(e) {
|
|
224
|
-
return Oe + e.length * De;
|
|
225
|
-
}
|
|
226
223
|
function Me(e) {
|
|
224
|
+
return ke + e.length * R;
|
|
225
|
+
}
|
|
226
|
+
function Ne(e) {
|
|
227
227
|
let t = n(() => {
|
|
228
|
-
let t =
|
|
228
|
+
let t = je(e.extraPadding?.());
|
|
229
229
|
return {
|
|
230
230
|
left: (e.yLabel() ? 56 : 50) + t.left,
|
|
231
231
|
right: 10 + t.right
|
|
@@ -238,11 +238,11 @@ function Me(e) {
|
|
|
238
238
|
};
|
|
239
239
|
let n = Math.max(0, r.value), i = [], a = 0, o = 0;
|
|
240
240
|
for (let e of t) {
|
|
241
|
-
let t =
|
|
241
|
+
let t = Me(e);
|
|
242
242
|
o > 0 && o + t > n && (a++, o = 0), i.push({
|
|
243
243
|
x: o,
|
|
244
244
|
row: a
|
|
245
|
-
}), o += t +
|
|
245
|
+
}), o += t + Ae;
|
|
246
246
|
}
|
|
247
247
|
return {
|
|
248
248
|
positions: i,
|
|
@@ -252,9 +252,9 @@ function Me(e) {
|
|
|
252
252
|
let t = e.title();
|
|
253
253
|
if (!t) return 10;
|
|
254
254
|
let n = e.titleStyle?.()?.lineHeight ?? 18;
|
|
255
|
-
return t.split("\n").length * n +
|
|
255
|
+
return t.split("\n").length * n + De;
|
|
256
256
|
}), o = n(() => {
|
|
257
|
-
let n =
|
|
257
|
+
let n = je(e.extraPadding?.()), r = i.value.rowCount;
|
|
258
258
|
return {
|
|
259
259
|
top: a.value + r * 20 + n.top,
|
|
260
260
|
bottom: (e.xLabel() ? 38 : 30) + n.bottom,
|
|
@@ -283,10 +283,10 @@ function Me(e) {
|
|
|
283
283
|
}
|
|
284
284
|
//#endregion
|
|
285
285
|
//#region src/tooltip-position.ts
|
|
286
|
-
var
|
|
287
|
-
function
|
|
286
|
+
var Pe = 16, z = 8;
|
|
287
|
+
function B(e, t, n, r, i, a) {
|
|
288
288
|
if (i === "none") return {
|
|
289
|
-
left: e +
|
|
289
|
+
left: e + Pe,
|
|
290
290
|
top: t
|
|
291
291
|
};
|
|
292
292
|
let o = i === "chart" && a ? {
|
|
@@ -299,15 +299,15 @@ function V(e, t, n, r, i, a) {
|
|
|
299
299
|
right: window.innerWidth,
|
|
300
300
|
top: 0,
|
|
301
301
|
bottom: window.innerHeight
|
|
302
|
-
}, s = e +
|
|
302
|
+
}, s = e + Pe + n > o.right - z ? e - Pe - n : e + Pe, c = Math.max(o.left + z, o.right - z - n), l = Math.min(Math.max(s, o.left + z), c), u = r / 2;
|
|
303
303
|
return {
|
|
304
304
|
left: l,
|
|
305
|
-
top: Math.min(Math.max(t, o.top +
|
|
305
|
+
top: Math.min(Math.max(t, o.top + z + u), o.bottom - z - u)
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
//#endregion
|
|
309
309
|
//#region src/_shared/useChartTooltip.ts
|
|
310
|
-
function
|
|
310
|
+
function Fe(e) {
|
|
311
311
|
let t = e.touchYOffset ?? 50, n = v(null), r = v(!1), i = v(null), a = v(null), o = v(null), s = null, c = "pending";
|
|
312
312
|
function l(e) {
|
|
313
313
|
return "touches" in e ? e.touches[0] ?? null : e;
|
|
@@ -328,7 +328,7 @@ function Pe(e) {
|
|
|
328
328
|
}
|
|
329
329
|
let s = i.value, c = e.containerRef.value;
|
|
330
330
|
if (!s || !c) return;
|
|
331
|
-
let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "
|
|
331
|
+
let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "window", { left: f, top: p } = B(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
|
|
332
332
|
o.value = {
|
|
333
333
|
left: f - l.left,
|
|
334
334
|
top: p - l.top
|
|
@@ -395,98 +395,98 @@ function Pe(e) {
|
|
|
395
395
|
}
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region src/ChartMenu/download.ts
|
|
398
|
-
function
|
|
398
|
+
function Ie(e, t) {
|
|
399
399
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
400
400
|
r.href = n, r.download = t, r.click(), URL.revokeObjectURL(n);
|
|
401
401
|
}
|
|
402
|
-
var
|
|
402
|
+
var V = [
|
|
403
403
|
"color",
|
|
404
404
|
"font-family",
|
|
405
405
|
"font-size",
|
|
406
406
|
"font-weight"
|
|
407
|
-
],
|
|
408
|
-
function
|
|
407
|
+
], H = ["fill", "stroke"];
|
|
408
|
+
function U(e) {
|
|
409
409
|
let t = e.match(/^\s*var\(\s*(--[\w-]+)\s*(?:,\s*([^)]*?)\s*)?\)\s*$/);
|
|
410
410
|
if (!t) return e;
|
|
411
411
|
let [, n, r] = t;
|
|
412
412
|
return window.getComputedStyle(document.documentElement).getPropertyValue(n).trim() || (r ? r.trim() : e);
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function W(e) {
|
|
415
415
|
let t = e.cloneNode(!0);
|
|
416
416
|
t.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
417
417
|
let n = window.getComputedStyle(e), r = [];
|
|
418
|
-
for (let e of
|
|
418
|
+
for (let e of V) {
|
|
419
419
|
let t = n.getPropertyValue(e);
|
|
420
420
|
t && r.push(`${e}: ${t}`);
|
|
421
421
|
}
|
|
422
422
|
let i = t.getAttribute("style") ?? "";
|
|
423
423
|
t.setAttribute("style", [i, ...r].filter(Boolean).join("; "));
|
|
424
|
-
for (let e of t.querySelectorAll("*")) for (let t of
|
|
424
|
+
for (let e of t.querySelectorAll("*")) for (let t of H) {
|
|
425
425
|
let n = e.getAttribute(t);
|
|
426
|
-
!n || !n.includes("var(") || e.setAttribute(t,
|
|
426
|
+
!n || !n.includes("var(") || e.setAttribute(t, U(n));
|
|
427
427
|
}
|
|
428
428
|
return t;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
let n =
|
|
432
|
-
|
|
430
|
+
function G(e, t) {
|
|
431
|
+
let n = W(e), r = new XMLSerializer().serializeToString(n);
|
|
432
|
+
Ie(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
let n =
|
|
434
|
+
function Le(e, t) {
|
|
435
|
+
let n = W(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
|
|
436
436
|
o.onload = () => {
|
|
437
437
|
let e = document.createElement("canvas");
|
|
438
438
|
e.width = s * 2, e.height = c * 2;
|
|
439
439
|
let n = e.getContext("2d");
|
|
440
440
|
n.scale(2, 2), n.drawImage(o, 0, 0, s, c), e.toBlob((e) => {
|
|
441
|
-
e &&
|
|
441
|
+
e && Ie(e, `${t}.png`);
|
|
442
442
|
}), URL.revokeObjectURL(a);
|
|
443
443
|
}, o.src = a;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function Re(e, t) {
|
|
446
446
|
e.toBlob((e) => {
|
|
447
|
-
e &&
|
|
447
|
+
e && Ie(e, `${t}.png`);
|
|
448
448
|
}, "image/png");
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
|
|
450
|
+
function ze(e, t) {
|
|
451
|
+
Ie(new Blob([e], { type: "text/csv" }), `${t}.csv`);
|
|
452
452
|
}
|
|
453
453
|
//#endregion
|
|
454
454
|
//#region src/_shared/touch.ts
|
|
455
|
-
function
|
|
455
|
+
function K() {
|
|
456
456
|
return typeof window < "u" && "ontouchstart" in window;
|
|
457
457
|
}
|
|
458
458
|
//#endregion
|
|
459
459
|
//#region src/_shared/useChartFullscreen.ts
|
|
460
|
-
var
|
|
461
|
-
function Ve() {
|
|
462
|
-
typeof document > "u" || (ze === 0 && (Be = document.body.style.overflow, document.body.style.overflow = "hidden"), ze++);
|
|
463
|
-
}
|
|
460
|
+
var Be = 0, Ve = "";
|
|
464
461
|
function He() {
|
|
465
|
-
typeof document > "u" ||
|
|
462
|
+
typeof document > "u" || (Be === 0 && (Ve = document.body.style.overflow, document.body.style.overflow = "hidden"), Be++);
|
|
466
463
|
}
|
|
467
|
-
var J = 0, Y = null;
|
|
468
464
|
function Ue() {
|
|
465
|
+
typeof document > "u" || Be !== 0 && (Be--, Be === 0 && (document.body.style.overflow = Ve));
|
|
466
|
+
}
|
|
467
|
+
var We = 0, Ge = null;
|
|
468
|
+
function Ke() {
|
|
469
469
|
return document.querySelector("meta[name=\"viewport\"]");
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
if (typeof document > "u" || !
|
|
473
|
-
let e =
|
|
471
|
+
function qe() {
|
|
472
|
+
if (typeof document > "u" || !K()) return;
|
|
473
|
+
let e = Ke();
|
|
474
474
|
if (e) {
|
|
475
|
-
if (
|
|
476
|
-
|
|
477
|
-
let t =
|
|
475
|
+
if (We === 0) {
|
|
476
|
+
Ge = e.getAttribute("content");
|
|
477
|
+
let t = Ge || "width=device-width, initial-scale=1";
|
|
478
478
|
e.setAttribute("content", `${t}, maximum-scale=1`);
|
|
479
479
|
}
|
|
480
|
-
|
|
480
|
+
We++;
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
function
|
|
484
|
-
if (!(typeof document > "u") &&
|
|
485
|
-
let e =
|
|
486
|
-
e &&
|
|
483
|
+
function q() {
|
|
484
|
+
if (!(typeof document > "u") && We !== 0 && (We--, We === 0)) {
|
|
485
|
+
let e = Ke();
|
|
486
|
+
e && Ge != null && e.setAttribute("content", Ge), Ge = null;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function J(e = {}) {
|
|
490
490
|
let t = v(!1), r = !1, i = v(null);
|
|
491
491
|
function a() {
|
|
492
492
|
let e = typeof window < "u" ? window.visualViewport : null;
|
|
@@ -502,7 +502,7 @@ function X(e = {}) {
|
|
|
502
502
|
t && (e ? (t.addEventListener("resize", a), t.addEventListener("scroll", a), a()) : (t.removeEventListener("resize", a), t.removeEventListener("scroll", a), i.value = null));
|
|
503
503
|
}
|
|
504
504
|
function s(e) {
|
|
505
|
-
e !== t.value && (t.value = e, e && !r ? (
|
|
505
|
+
e !== t.value && (t.value = e, e && !r ? (He(), qe(), o(!0), r = !0) : !e && r && (Ue(), q(), o(!1), r = !1));
|
|
506
506
|
}
|
|
507
507
|
function c(e) {
|
|
508
508
|
if (e.key !== "Escape" || !t.value) return;
|
|
@@ -521,7 +521,7 @@ function X(e = {}) {
|
|
|
521
521
|
return g(() => {
|
|
522
522
|
typeof document > "u" || document.addEventListener("keydown", c);
|
|
523
523
|
}), ee(() => {
|
|
524
|
-
typeof document > "u" || (document.removeEventListener("keydown", c), r &&= (
|
|
524
|
+
typeof document > "u" || (document.removeEventListener("keydown", c), r &&= (Ue(), q(), o(!1), !1));
|
|
525
525
|
}), {
|
|
526
526
|
isFullscreen: t,
|
|
527
527
|
toggle: d,
|
|
@@ -538,7 +538,7 @@ function X(e = {}) {
|
|
|
538
538
|
"z-index": "var(--cfasim-z-fullscreen, 1000)",
|
|
539
539
|
background: "var(--color-bg-0, #fff)",
|
|
540
540
|
color: "var(--color-text, inherit)",
|
|
541
|
-
padding:
|
|
541
|
+
padding: K() ? "0" : "2em",
|
|
542
542
|
"box-sizing": "border-box",
|
|
543
543
|
display: "flex",
|
|
544
544
|
"flex-direction": "column",
|
|
@@ -549,7 +549,7 @@ function X(e = {}) {
|
|
|
549
549
|
}
|
|
550
550
|
//#endregion
|
|
551
551
|
//#region src/_shared/useChartMenu.ts
|
|
552
|
-
function
|
|
552
|
+
function Je(e) {
|
|
553
553
|
let t = v(null);
|
|
554
554
|
function r() {
|
|
555
555
|
let t = e.filename();
|
|
@@ -557,23 +557,23 @@ function Ke(e) {
|
|
|
557
557
|
let n = e.legacyMenuLabel();
|
|
558
558
|
return typeof n == "string" ? n : "chart";
|
|
559
559
|
}
|
|
560
|
-
let i = e.fullscreen ?
|
|
560
|
+
let i = e.fullscreen ? J({ target: e.fullscreenTarget }) : null, a = n(() => {
|
|
561
561
|
let n = r(), a = [];
|
|
562
562
|
i && a.push(i.menuItem.value), a.push({
|
|
563
563
|
label: "Save as SVG",
|
|
564
564
|
action: () => {
|
|
565
|
-
t.value &&
|
|
565
|
+
t.value && G(t.value, n);
|
|
566
566
|
}
|
|
567
567
|
}, {
|
|
568
568
|
label: "Save as PNG",
|
|
569
569
|
action: () => {
|
|
570
|
-
t.value &&
|
|
570
|
+
t.value && Le(t.value, n);
|
|
571
571
|
}
|
|
572
572
|
});
|
|
573
573
|
let o = e.downloadButton?.();
|
|
574
574
|
return !e.downloadLink() && !o && a.push({
|
|
575
575
|
label: "Download CSV",
|
|
576
|
-
action: () =>
|
|
576
|
+
action: () => ze(e.getCsv(), n)
|
|
577
577
|
}), a;
|
|
578
578
|
}), o = n(() => {
|
|
579
579
|
if (e.downloadButton?.()) return null;
|
|
@@ -584,7 +584,7 @@ function Ke(e) {
|
|
|
584
584
|
return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
|
|
585
585
|
});
|
|
586
586
|
function l() {
|
|
587
|
-
|
|
587
|
+
ze(e.getCsv(), r());
|
|
588
588
|
}
|
|
589
589
|
return {
|
|
590
590
|
svgRef: t,
|
|
@@ -602,7 +602,7 @@ function Ke(e) {
|
|
|
602
602
|
}
|
|
603
603
|
//#endregion
|
|
604
604
|
//#region src/_shared/ChartZoomControls.vue?vue&type=script&setup=true&lang.ts
|
|
605
|
-
var
|
|
605
|
+
var Ye = ["disabled"], Y = ["disabled"], Xe = ["disabled"], Ze = /* @__PURE__ */ N(/* @__PURE__ */ l({
|
|
606
606
|
__name: "ChartZoomControls",
|
|
607
607
|
props: {
|
|
608
608
|
canZoomIn: {
|
|
@@ -645,7 +645,7 @@ var qe = ["disabled"], Z = ["disabled"], Je = ["disabled"], Ye = /* @__PURE__ */
|
|
|
645
645
|
"stroke-width": "1.5",
|
|
646
646
|
"stroke-linecap": "round",
|
|
647
647
|
"aria-hidden": "true"
|
|
648
|
-
}, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8,
|
|
648
|
+
}, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8, Ye),
|
|
649
649
|
o("button", {
|
|
650
650
|
type: "button",
|
|
651
651
|
class: "chart-zoom-button",
|
|
@@ -661,7 +661,7 @@ var qe = ["disabled"], Z = ["disabled"], Je = ["disabled"], Ye = /* @__PURE__ */
|
|
|
661
661
|
"stroke-width": "1.5",
|
|
662
662
|
"stroke-linecap": "round",
|
|
663
663
|
"aria-hidden": "true"
|
|
664
|
-
}, [o("path", { d: "M2 7h10" })], -1)]], 8,
|
|
664
|
+
}, [o("path", { d: "M2 7h10" })], -1)]], 8, Y),
|
|
665
665
|
o("button", {
|
|
666
666
|
type: "button",
|
|
667
667
|
class: "chart-zoom-button",
|
|
@@ -678,13 +678,13 @@ var qe = ["disabled"], Z = ["disabled"], Je = ["disabled"], Ye = /* @__PURE__ */
|
|
|
678
678
|
"stroke-linecap": "round",
|
|
679
679
|
"stroke-linejoin": "round",
|
|
680
680
|
"aria-hidden": "true"
|
|
681
|
-
}, [o("path", { d: "M1.75 7a5.25 5.25 0 1 0 5.25-5.25c-1.48 0-2.9.6-3.94 1.6L1.75 4.7" }), o("path", { d: "M1.75 1.75v2.95h2.95" })], -1)]], 8,
|
|
681
|
+
}, [o("path", { d: "M1.75 7a5.25 5.25 0 1 0 5.25-5.25c-1.48 0-2.9.6-3.94 1.6L1.75 4.7" }), o("path", { d: "M1.75 1.75v2.95h2.95" })], -1)]], 8, Xe)
|
|
682
682
|
], 2));
|
|
683
683
|
}
|
|
684
684
|
}), [["__scopeId", "data-v-87ceeada"]]);
|
|
685
685
|
//#endregion
|
|
686
686
|
//#region src/_shared/seriesCsv.ts
|
|
687
|
-
function
|
|
687
|
+
function Qe(e) {
|
|
688
688
|
if (e.length === 0) return "";
|
|
689
689
|
let t = 0;
|
|
690
690
|
for (let n of e) n.data.length > t && (t = n.data.length);
|
|
@@ -696,43 +696,43 @@ function Xe(e) {
|
|
|
696
696
|
}
|
|
697
697
|
return i.join("\n");
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function $e(e, t, n = "category") {
|
|
700
700
|
if (t.length === 0 || e.length === 0) return "";
|
|
701
701
|
let r = [(t.length === 1 ? [n, t[0].label || "value"] : [n, ...t.map((e, t) => e.label || `series_${t}`)]).join(",")];
|
|
702
702
|
for (let n = 0; n < e.length; n++) {
|
|
703
|
-
let i = [
|
|
703
|
+
let i = [et(e[n])];
|
|
704
704
|
for (let e of t) i.push(n < e.data.length ? String(e.data[n]) : "");
|
|
705
705
|
r.push(i.join(","));
|
|
706
706
|
}
|
|
707
707
|
return r.join("\n");
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function et(e) {
|
|
710
710
|
return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
|
|
711
711
|
}
|
|
712
712
|
//#endregion
|
|
713
713
|
//#region src/_shared/ChartAnnotations.vue?vue&type=script&setup=true&lang.ts
|
|
714
|
-
var
|
|
714
|
+
var tt = {
|
|
715
715
|
class: "chart-annotations",
|
|
716
716
|
"pointer-events": "none"
|
|
717
|
-
},
|
|
717
|
+
}, nt = ["stroke", "stroke-width"], rt = [
|
|
718
718
|
"d",
|
|
719
719
|
"stroke",
|
|
720
720
|
"stroke-width"
|
|
721
|
-
],
|
|
721
|
+
], it = [
|
|
722
722
|
"fill",
|
|
723
723
|
"stroke",
|
|
724
724
|
"stroke-width",
|
|
725
725
|
"transform"
|
|
726
|
-
],
|
|
726
|
+
], at = [
|
|
727
727
|
"stroke",
|
|
728
728
|
"stroke-width",
|
|
729
729
|
"stroke-dasharray"
|
|
730
|
-
],
|
|
730
|
+
], ot = [
|
|
731
731
|
"d",
|
|
732
732
|
"stroke",
|
|
733
733
|
"stroke-width",
|
|
734
734
|
"stroke-dasharray"
|
|
735
|
-
],
|
|
735
|
+
], st = ["fill", "transform"], ct = [
|
|
736
736
|
"x",
|
|
737
737
|
"y",
|
|
738
738
|
"text-anchor",
|
|
@@ -741,7 +741,7 @@ var $e = {
|
|
|
741
741
|
"fill",
|
|
742
742
|
"stroke",
|
|
743
743
|
"stroke-width"
|
|
744
|
-
],
|
|
744
|
+
], lt = ["x", "dy"], ut = ["font-weight", "font-style"], dt = 13, ft = "normal", pt = 700, mt = "var(--color-bg-0, #fff)", ht = 3, gt = 1, _t = 4, vt = 6, yt = 1.2, bt = .35, xt = /* @__PURE__ */ l({
|
|
745
745
|
__name: "ChartAnnotations",
|
|
746
746
|
props: {
|
|
747
747
|
annotations: { default: () => [] },
|
|
@@ -778,7 +778,7 @@ var $e = {
|
|
|
778
778
|
if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
|
|
779
779
|
let i = t.pointer ?? "curved", a = i.startsWith("rule");
|
|
780
780
|
if (a && !r.bounds) continue;
|
|
781
|
-
let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ??
|
|
781
|
+
let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? dt, g = t.fontWeight ?? ft, ee = t.outlineColor ?? mt, _ = t.outlineWidth ?? ht, v = t.lineColor ?? m, y = t.lineWidth ?? gt, te = s(t.lineDash), b = {
|
|
782
782
|
left: "start",
|
|
783
783
|
center: "middle",
|
|
784
784
|
right: "end"
|
|
@@ -793,7 +793,7 @@ var $e = {
|
|
|
793
793
|
textX: d,
|
|
794
794
|
textY: p,
|
|
795
795
|
textAnchor: b,
|
|
796
|
-
dy: h *
|
|
796
|
+
dy: h * yt,
|
|
797
797
|
fontSize: h,
|
|
798
798
|
fontWeight: g,
|
|
799
799
|
color: m,
|
|
@@ -859,11 +859,11 @@ var $e = {
|
|
|
859
859
|
}
|
|
860
860
|
function f(e, t, n, r, i, a, o) {
|
|
861
861
|
if (o === "none") return { path: "" };
|
|
862
|
-
let s = n - e, c = r - t, l = i *
|
|
862
|
+
let s = n - e, c = r - t, l = i * yt, u = (c < 0 ? r + (a - 1) * l : r) - i * bt;
|
|
863
863
|
if (s === 0 || c === 0 || o === "straight") {
|
|
864
864
|
let i = c === 0 ? r : u, a = n - e, o = i - t, s = Math.hypot(a, o);
|
|
865
865
|
if (s <= 10) return { path: "" };
|
|
866
|
-
let l = a / s, d = o / s, f = e + l *
|
|
866
|
+
let l = a / s, d = o / s, f = e + l * _t, p = t + d * _t, m = n - l * vt, h = i - d * vt, g = Math.atan2(-d, -l) * 180 / Math.PI;
|
|
867
867
|
return {
|
|
868
868
|
path: `M${f},${p} L${m},${h}`,
|
|
869
869
|
arrow: {
|
|
@@ -874,8 +874,8 @@ var $e = {
|
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
876
|
let d = u - t;
|
|
877
|
-
if (Math.abs(d) <=
|
|
878
|
-
let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p *
|
|
877
|
+
if (Math.abs(d) <= _t || Math.abs(s) <= vt) return { path: "" };
|
|
878
|
+
let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * _t, g = n - f * vt, ee = u, _ = p > 0 ? -90 : 90;
|
|
879
879
|
return {
|
|
880
880
|
path: `M${m},${h} Q${m},${u} ${g},${ee}`,
|
|
881
881
|
arrow: {
|
|
@@ -885,7 +885,7 @@ var $e = {
|
|
|
885
885
|
}
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
|
-
return (t, n) => (_(), a("g",
|
|
888
|
+
return (t, n) => (_(), a("g", tt, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
|
|
889
889
|
t.rule && t.outlineWidth > 0 ? (_(), a("line", d({
|
|
890
890
|
key: 0,
|
|
891
891
|
ref_for: !0
|
|
@@ -894,7 +894,7 @@ var $e = {
|
|
|
894
894
|
stroke: t.outlineColor,
|
|
895
895
|
"stroke-width": t.lineWidth + t.outlineWidth,
|
|
896
896
|
"stroke-linecap": "round"
|
|
897
|
-
}), null, 16,
|
|
897
|
+
}), null, 16, nt)) : i("", !0),
|
|
898
898
|
t.pointerPath && t.outlineWidth > 0 ? (_(), a("path", {
|
|
899
899
|
key: 1,
|
|
900
900
|
d: t.pointerPath,
|
|
@@ -903,7 +903,7 @@ var $e = {
|
|
|
903
903
|
stroke: t.outlineColor,
|
|
904
904
|
"stroke-width": t.lineWidth + t.outlineWidth,
|
|
905
905
|
"stroke-linecap": "round"
|
|
906
|
-
}, null, 8,
|
|
906
|
+
}, null, 8, rt)) : i("", !0),
|
|
907
907
|
t.arrowTip && t.outlineWidth > 0 ? (_(), a("polygon", {
|
|
908
908
|
key: 2,
|
|
909
909
|
points: "0,0 -6,-3 -6,3",
|
|
@@ -913,7 +913,7 @@ var $e = {
|
|
|
913
913
|
"stroke-width": t.outlineWidth,
|
|
914
914
|
"stroke-linejoin": "round",
|
|
915
915
|
transform: t.arrowTransform
|
|
916
|
-
}, null, 8,
|
|
916
|
+
}, null, 8, it)) : i("", !0),
|
|
917
917
|
t.rule ? (_(), a("line", d({
|
|
918
918
|
key: 3,
|
|
919
919
|
ref_for: !0
|
|
@@ -922,7 +922,7 @@ var $e = {
|
|
|
922
922
|
"stroke-width": t.lineWidth,
|
|
923
923
|
"stroke-dasharray": t.lineDash,
|
|
924
924
|
"stroke-linecap": "round"
|
|
925
|
-
}), null, 16,
|
|
925
|
+
}), null, 16, at)) : i("", !0),
|
|
926
926
|
t.pointerPath ? (_(), a("path", {
|
|
927
927
|
key: 4,
|
|
928
928
|
d: t.pointerPath,
|
|
@@ -931,13 +931,13 @@ var $e = {
|
|
|
931
931
|
"stroke-width": t.lineWidth,
|
|
932
932
|
"stroke-dasharray": t.lineDash,
|
|
933
933
|
"stroke-linecap": "round"
|
|
934
|
-
}, null, 8,
|
|
934
|
+
}, null, 8, ot)) : i("", !0),
|
|
935
935
|
t.arrowTip ? (_(), a("polygon", {
|
|
936
936
|
key: 5,
|
|
937
937
|
points: "0,0 -6,-3 -6,3",
|
|
938
938
|
fill: t.lineColor,
|
|
939
939
|
transform: t.arrowTransform
|
|
940
|
-
}, null, 8,
|
|
940
|
+
}, null, 8, st)) : i("", !0),
|
|
941
941
|
o("text", {
|
|
942
942
|
x: t.textX,
|
|
943
943
|
y: t.textY,
|
|
@@ -955,14 +955,14 @@ var $e = {
|
|
|
955
955
|
dy: r === 0 ? 0 : t.dy
|
|
956
956
|
}, [(_(!0), a(e, null, y(n, (e, t) => (_(), a("tspan", {
|
|
957
957
|
key: t,
|
|
958
|
-
"font-weight": e.bold ?
|
|
958
|
+
"font-weight": e.bold ? pt : void 0,
|
|
959
959
|
"font-style": e.italic ? "italic" : void 0
|
|
960
|
-
}, b(e.text), 9,
|
|
960
|
+
}, b(e.text), 9, ut))), 128))], 8, lt))), 128))], 8, ct)
|
|
961
961
|
], 64))), 128))]));
|
|
962
962
|
}
|
|
963
|
-
}),
|
|
964
|
-
function
|
|
965
|
-
let { containerRef: t, measuredWidth: r, measuredHeight: i } =
|
|
963
|
+
}), St = 400, Ct = 200;
|
|
964
|
+
function wt(e) {
|
|
965
|
+
let { containerRef: t, measuredWidth: r, measuredHeight: i } = Ee({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, downloadButtonText: l, triggerCsvDownload: u, resolvedFilename: d, isFullscreen: f, fullscreenStyle: p, teleportTarget: m, exitFullscreen: h } = Je({
|
|
966
966
|
filename: e.filename,
|
|
967
967
|
legacyMenuLabel: e.menu,
|
|
968
968
|
getCsv: e.getCsv,
|
|
@@ -970,13 +970,13 @@ function St(e) {
|
|
|
970
970
|
downloadButton: e.downloadButton,
|
|
971
971
|
fullscreen: !0,
|
|
972
972
|
fullscreenTarget: e.fullscreenTarget
|
|
973
|
-
}), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value ||
|
|
973
|
+
}), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || St)), ee = n(() => {
|
|
974
974
|
if (f.value && i.value > 0) {
|
|
975
975
|
let t = e.extraBelowHeight?.() ?? 0;
|
|
976
976
|
return i.value - t;
|
|
977
977
|
}
|
|
978
|
-
return e.height() ??
|
|
979
|
-
}), { padding: _, legendY: v, inlineLegendLayout: y, innerW: te, innerH: b, bounds: ne } =
|
|
978
|
+
return e.height() ?? Ct;
|
|
979
|
+
}), { padding: _, legendY: v, inlineLegendLayout: y, innerW: te, innerH: b, bounds: ne } = Ne({
|
|
980
980
|
title: e.title,
|
|
981
981
|
titleStyle: e.titleStyle,
|
|
982
982
|
xLabel: e.xLabel,
|
|
@@ -985,10 +985,10 @@ function St(e) {
|
|
|
985
985
|
width: () => g.value,
|
|
986
986
|
height: () => ee.value,
|
|
987
987
|
extraPadding: e.chartPadding
|
|
988
|
-
}), { hoverIndex: re, tooltipRef: x, tooltipPos: S, handlers: ie } =
|
|
988
|
+
}), { hoverIndex: re, tooltipRef: x, tooltipPos: S, handlers: ie } = Fe({
|
|
989
989
|
enabled: e.hasTooltipSlot,
|
|
990
990
|
trigger: e.tooltipTrigger,
|
|
991
|
-
clamp: () => e.tooltipClamp() ?? "
|
|
991
|
+
clamp: () => e.tooltipClamp() ?? "window",
|
|
992
992
|
pointerToIndex: e.pointerToIndex,
|
|
993
993
|
containerRef: t,
|
|
994
994
|
scrubAxis: e.scrubAxis,
|
|
@@ -1021,17 +1021,17 @@ function St(e) {
|
|
|
1021
1021
|
exitFullscreen: h
|
|
1022
1022
|
};
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function Tt(e, t) {
|
|
1025
1025
|
return (n) => {
|
|
1026
1026
|
let r = e();
|
|
1027
1027
|
if (r !== void 0) return ae(n, r);
|
|
1028
1028
|
let i = t();
|
|
1029
|
-
return i === void 0 ?
|
|
1029
|
+
return i === void 0 ? Ce(n) : ae(n, i);
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
1032
|
//#endregion
|
|
1033
1033
|
//#region src/_shared/contrast.ts
|
|
1034
|
-
function
|
|
1034
|
+
function Et(e) {
|
|
1035
1035
|
let t = e.trim();
|
|
1036
1036
|
if (t.startsWith("#")) {
|
|
1037
1037
|
let e = t.slice(1);
|
|
@@ -1058,201 +1058,201 @@ function wt(e) {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
return null;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function Dt([e, t, n]) {
|
|
1062
1062
|
let r = (e) => {
|
|
1063
1063
|
let t = e / 255;
|
|
1064
1064
|
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
1065
1065
|
};
|
|
1066
1066
|
return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
|
|
1067
1067
|
}
|
|
1068
|
-
var
|
|
1069
|
-
function
|
|
1070
|
-
let t =
|
|
1068
|
+
var Ot = null, kt = /* @__PURE__ */ new Map();
|
|
1069
|
+
function At(e) {
|
|
1070
|
+
let t = Et(e);
|
|
1071
1071
|
if (t) return t;
|
|
1072
|
-
if (
|
|
1072
|
+
if (kt.has(e)) return kt.get(e) ?? null;
|
|
1073
1073
|
if (typeof document > "u") return null;
|
|
1074
|
-
|
|
1075
|
-
let n = getComputedStyle(
|
|
1076
|
-
return
|
|
1074
|
+
Ot || (Ot = document.createElement("span"), Ot.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(Ot)), Ot.style.color = "", Ot.style.color = e;
|
|
1075
|
+
let n = getComputedStyle(Ot).color, r = Et(n);
|
|
1076
|
+
return kt.set(e, r), r;
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
let r =
|
|
1080
|
-
return r &&
|
|
1078
|
+
function jt(e, t = "#ffffff", n = "#1a1a1a") {
|
|
1079
|
+
let r = At(e);
|
|
1080
|
+
return r && Dt(r) > .179 ? n : t;
|
|
1081
1081
|
}
|
|
1082
1082
|
//#endregion
|
|
1083
1083
|
//#region src/_shared/dateAxis.ts
|
|
1084
|
-
var
|
|
1084
|
+
var Mt = /^(\d{4})-(\d{2})-(\d{2})$/, Nt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, Pt = 1e3, Ft = 60 * Pt, X = 60 * Ft, It = 24 * X, Lt = 7 * It, Rt = 30 * It, zt = 365 * It, Bt = [
|
|
1085
1085
|
{
|
|
1086
1086
|
unit: "second",
|
|
1087
1087
|
step: 1,
|
|
1088
|
-
ms: 1 *
|
|
1088
|
+
ms: 1 * Pt
|
|
1089
1089
|
},
|
|
1090
1090
|
{
|
|
1091
1091
|
unit: "second",
|
|
1092
1092
|
step: 5,
|
|
1093
|
-
ms: 5 *
|
|
1093
|
+
ms: 5 * Pt
|
|
1094
1094
|
},
|
|
1095
1095
|
{
|
|
1096
1096
|
unit: "second",
|
|
1097
1097
|
step: 15,
|
|
1098
|
-
ms: 15 *
|
|
1098
|
+
ms: 15 * Pt
|
|
1099
1099
|
},
|
|
1100
1100
|
{
|
|
1101
1101
|
unit: "second",
|
|
1102
1102
|
step: 30,
|
|
1103
|
-
ms: 30 *
|
|
1103
|
+
ms: 30 * Pt
|
|
1104
1104
|
},
|
|
1105
1105
|
{
|
|
1106
1106
|
unit: "minute",
|
|
1107
1107
|
step: 1,
|
|
1108
|
-
ms: 1 *
|
|
1108
|
+
ms: 1 * Ft
|
|
1109
1109
|
},
|
|
1110
1110
|
{
|
|
1111
1111
|
unit: "minute",
|
|
1112
1112
|
step: 5,
|
|
1113
|
-
ms: 5 *
|
|
1113
|
+
ms: 5 * Ft
|
|
1114
1114
|
},
|
|
1115
1115
|
{
|
|
1116
1116
|
unit: "minute",
|
|
1117
1117
|
step: 15,
|
|
1118
|
-
ms: 15 *
|
|
1118
|
+
ms: 15 * Ft
|
|
1119
1119
|
},
|
|
1120
1120
|
{
|
|
1121
1121
|
unit: "minute",
|
|
1122
1122
|
step: 30,
|
|
1123
|
-
ms: 30 *
|
|
1123
|
+
ms: 30 * Ft
|
|
1124
1124
|
},
|
|
1125
1125
|
{
|
|
1126
1126
|
unit: "hour",
|
|
1127
1127
|
step: 1,
|
|
1128
|
-
ms: 1 *
|
|
1128
|
+
ms: 1 * X
|
|
1129
1129
|
},
|
|
1130
1130
|
{
|
|
1131
1131
|
unit: "hour",
|
|
1132
1132
|
step: 3,
|
|
1133
|
-
ms: 3 *
|
|
1133
|
+
ms: 3 * X
|
|
1134
1134
|
},
|
|
1135
1135
|
{
|
|
1136
1136
|
unit: "hour",
|
|
1137
1137
|
step: 6,
|
|
1138
|
-
ms: 6 *
|
|
1138
|
+
ms: 6 * X
|
|
1139
1139
|
},
|
|
1140
1140
|
{
|
|
1141
1141
|
unit: "hour",
|
|
1142
1142
|
step: 12,
|
|
1143
|
-
ms: 12 *
|
|
1143
|
+
ms: 12 * X
|
|
1144
1144
|
},
|
|
1145
1145
|
{
|
|
1146
1146
|
unit: "day",
|
|
1147
1147
|
step: 1,
|
|
1148
|
-
ms: 1 *
|
|
1148
|
+
ms: 1 * It
|
|
1149
1149
|
},
|
|
1150
1150
|
{
|
|
1151
1151
|
unit: "day",
|
|
1152
1152
|
step: 2,
|
|
1153
|
-
ms: 2 *
|
|
1153
|
+
ms: 2 * It
|
|
1154
1154
|
},
|
|
1155
1155
|
{
|
|
1156
1156
|
unit: "week",
|
|
1157
1157
|
step: 1,
|
|
1158
|
-
ms: 1 *
|
|
1158
|
+
ms: 1 * Lt
|
|
1159
1159
|
},
|
|
1160
1160
|
{
|
|
1161
1161
|
unit: "month",
|
|
1162
1162
|
step: 1,
|
|
1163
|
-
ms: 1 *
|
|
1163
|
+
ms: 1 * Rt
|
|
1164
1164
|
},
|
|
1165
1165
|
{
|
|
1166
1166
|
unit: "month",
|
|
1167
1167
|
step: 3,
|
|
1168
|
-
ms: 3 *
|
|
1168
|
+
ms: 3 * Rt
|
|
1169
1169
|
},
|
|
1170
1170
|
{
|
|
1171
1171
|
unit: "month",
|
|
1172
1172
|
step: 6,
|
|
1173
|
-
ms: 6 *
|
|
1173
|
+
ms: 6 * Rt
|
|
1174
1174
|
},
|
|
1175
1175
|
{
|
|
1176
1176
|
unit: "year",
|
|
1177
1177
|
step: 1,
|
|
1178
|
-
ms: 1 *
|
|
1178
|
+
ms: 1 * zt
|
|
1179
1179
|
},
|
|
1180
1180
|
{
|
|
1181
1181
|
unit: "year",
|
|
1182
1182
|
step: 2,
|
|
1183
|
-
ms: 2 *
|
|
1183
|
+
ms: 2 * zt
|
|
1184
1184
|
},
|
|
1185
1185
|
{
|
|
1186
1186
|
unit: "year",
|
|
1187
1187
|
step: 5,
|
|
1188
|
-
ms: 5 *
|
|
1188
|
+
ms: 5 * zt
|
|
1189
1189
|
},
|
|
1190
1190
|
{
|
|
1191
1191
|
unit: "year",
|
|
1192
1192
|
step: 10,
|
|
1193
|
-
ms: 10 *
|
|
1193
|
+
ms: 10 * zt
|
|
1194
1194
|
},
|
|
1195
1195
|
{
|
|
1196
1196
|
unit: "year",
|
|
1197
1197
|
step: 25,
|
|
1198
|
-
ms: 25 *
|
|
1198
|
+
ms: 25 * zt
|
|
1199
1199
|
},
|
|
1200
1200
|
{
|
|
1201
1201
|
unit: "year",
|
|
1202
1202
|
step: 50,
|
|
1203
|
-
ms: 50 *
|
|
1203
|
+
ms: 50 * zt
|
|
1204
1204
|
},
|
|
1205
1205
|
{
|
|
1206
1206
|
unit: "year",
|
|
1207
1207
|
step: 100,
|
|
1208
|
-
ms: 100 *
|
|
1208
|
+
ms: 100 * zt
|
|
1209
1209
|
}
|
|
1210
|
-
],
|
|
1211
|
-
function
|
|
1210
|
+
], Vt = 1e3;
|
|
1211
|
+
function Ht(e, t) {
|
|
1212
1212
|
if (e instanceof Date) {
|
|
1213
1213
|
let t = e.getTime();
|
|
1214
1214
|
return Number.isFinite(t) ? t : null;
|
|
1215
1215
|
}
|
|
1216
1216
|
if (typeof e != "string") return null;
|
|
1217
|
-
let n =
|
|
1217
|
+
let n = Mt.exec(e);
|
|
1218
1218
|
if (n) {
|
|
1219
1219
|
let e = +n[1], r = n[2] - 1, i = +n[3];
|
|
1220
1220
|
return t === "utc" ? Date.UTC(e, r, i) : new Date(e, r, i).getTime();
|
|
1221
1221
|
}
|
|
1222
|
-
let r =
|
|
1222
|
+
let r = Nt.exec(e);
|
|
1223
1223
|
if (r) {
|
|
1224
1224
|
let e = +r[1], n = r[2] - 1, i = +r[3], a = +r[4], o = +r[5], s = r[6] ? +r[6] : 0, c = r[7] ? Number("0." + r[7]) * 1e3 : 0, l = r[8];
|
|
1225
1225
|
if (l) {
|
|
1226
1226
|
if (l === "Z" || l === "z") return Date.UTC(e, n, i, a, o, s, c);
|
|
1227
|
-
let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) *
|
|
1227
|
+
let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * Ft;
|
|
1228
1228
|
return Date.UTC(e, n, i, a, o, s, c) - d;
|
|
1229
1229
|
}
|
|
1230
1230
|
return t === "utc" ? Date.UTC(e, n, i, a, o, s, c) : new Date(e, n, i, a, o, s, c).getTime();
|
|
1231
1231
|
}
|
|
1232
1232
|
return null;
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1235
|
-
return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ?
|
|
1234
|
+
function Ut(e) {
|
|
1235
|
+
return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? Mt.test(e) || Nt.test(e) : !1;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Wt(e, t) {
|
|
1238
1238
|
if (e.length === 0) return !1;
|
|
1239
1239
|
for (let n = 0; n < e.length; n++) {
|
|
1240
1240
|
let r = e[n];
|
|
1241
|
-
if (!
|
|
1241
|
+
if (!Ut(r) || Ht(r, t) === null) return !1;
|
|
1242
1242
|
}
|
|
1243
1243
|
return !0;
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function Gt(e, t) {
|
|
1246
1246
|
let n = e / Math.max(1, t);
|
|
1247
|
-
for (let e of
|
|
1248
|
-
return
|
|
1247
|
+
for (let e of Bt) if (n <= e.ms) return e;
|
|
1248
|
+
return Bt[Bt.length - 1];
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function Kt(e, t, n) {
|
|
1251
1251
|
let r = new Date(e);
|
|
1252
1252
|
if (n === "utc") switch (t) {
|
|
1253
|
-
case "second": return Math.floor(e /
|
|
1254
|
-
case "minute": return Math.floor(e /
|
|
1255
|
-
case "hour": return Math.floor(e /
|
|
1253
|
+
case "second": return Math.floor(e / Pt) * Pt;
|
|
1254
|
+
case "minute": return Math.floor(e / Ft) * Ft;
|
|
1255
|
+
case "hour": return Math.floor(e / X) * X;
|
|
1256
1256
|
case "day": return Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate());
|
|
1257
1257
|
case "week": {
|
|
1258
1258
|
let e = (r.getUTCDay() + 6) % 7;
|
|
@@ -1262,8 +1262,8 @@ function Gt(e, t, n) {
|
|
|
1262
1262
|
case "year": return Date.UTC(r.getUTCFullYear(), 0, 1);
|
|
1263
1263
|
}
|
|
1264
1264
|
switch (t) {
|
|
1265
|
-
case "second": return Math.floor(e /
|
|
1266
|
-
case "minute": return Math.floor(e /
|
|
1265
|
+
case "second": return Math.floor(e / Pt) * Pt;
|
|
1266
|
+
case "minute": return Math.floor(e / Ft) * Ft;
|
|
1267
1267
|
case "hour": return new Date(r.getFullYear(), r.getMonth(), r.getDate(), r.getHours()).getTime();
|
|
1268
1268
|
case "day": return new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime();
|
|
1269
1269
|
case "week": {
|
|
@@ -1274,11 +1274,11 @@ function Gt(e, t, n) {
|
|
|
1274
1274
|
case "year": return new Date(r.getFullYear(), 0, 1).getTime();
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1278
|
-
if (t === "second") return e + n *
|
|
1279
|
-
if (t === "minute") return e + n *
|
|
1280
|
-
if (t === "hour" && r === "utc") return e + n *
|
|
1281
|
-
if (t === "week" && r === "utc") return e + n *
|
|
1277
|
+
function qt(e, t, n, r) {
|
|
1278
|
+
if (t === "second") return e + n * Pt;
|
|
1279
|
+
if (t === "minute") return e + n * Ft;
|
|
1280
|
+
if (t === "hour" && r === "utc") return e + n * X;
|
|
1281
|
+
if (t === "week" && r === "utc") return e + n * Lt;
|
|
1282
1282
|
let i = new Date(e);
|
|
1283
1283
|
if (r === "utc") switch (t) {
|
|
1284
1284
|
case "day": return Date.UTC(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate() + n, i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds());
|
|
@@ -1294,21 +1294,21 @@ function Kt(e, t, n, r) {
|
|
|
1294
1294
|
}
|
|
1295
1295
|
return e;
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function Jt(e, t, n, r) {
|
|
1298
1298
|
if (!Number.isFinite(e) || !Number.isFinite(t) || e >= t || n < 1) return {
|
|
1299
1299
|
values: [],
|
|
1300
1300
|
unit: "day"
|
|
1301
1301
|
};
|
|
1302
|
-
let { unit: i, step: a } =
|
|
1303
|
-
for (; o < e && s <
|
|
1302
|
+
let { unit: i, step: a } = Gt(t - e, n), o = Kt(e, i, r), s = 0;
|
|
1303
|
+
for (; o < e && s < Vt;) o = qt(o, i, a, r), s++;
|
|
1304
1304
|
let c = [];
|
|
1305
|
-
for (let e = 0; e <
|
|
1305
|
+
for (let e = 0; e < Vt && o <= t; e++) c.push(o), o = qt(o, i, a, r);
|
|
1306
1306
|
return {
|
|
1307
1307
|
values: c,
|
|
1308
1308
|
unit: i
|
|
1309
1309
|
};
|
|
1310
1310
|
}
|
|
1311
|
-
var
|
|
1311
|
+
var Yt = {
|
|
1312
1312
|
iso: {
|
|
1313
1313
|
year: "numeric",
|
|
1314
1314
|
month: "2-digit",
|
|
@@ -1346,7 +1346,7 @@ var Jt = {
|
|
|
1346
1346
|
hourCycle: "h23"
|
|
1347
1347
|
},
|
|
1348
1348
|
medium: { dateStyle: "medium" }
|
|
1349
|
-
},
|
|
1349
|
+
}, Xt = {
|
|
1350
1350
|
year: "year",
|
|
1351
1351
|
month: "month-year",
|
|
1352
1352
|
week: "month-day",
|
|
@@ -1355,30 +1355,30 @@ var Jt = {
|
|
|
1355
1355
|
minute: "time",
|
|
1356
1356
|
second: "time"
|
|
1357
1357
|
};
|
|
1358
|
-
function
|
|
1358
|
+
function Z(e) {
|
|
1359
1359
|
return e < 10 ? "0" + e : String(e);
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Zt(e, t) {
|
|
1362
1362
|
let n = new Date(e);
|
|
1363
|
-
return t === "utc" ? `${n.getUTCFullYear()}-${
|
|
1363
|
+
return t === "utc" ? `${n.getUTCFullYear()}-${Z(n.getUTCMonth() + 1)}-${Z(n.getUTCDate())}` : `${n.getFullYear()}-${Z(n.getMonth() + 1)}-${Z(n.getDate())}`;
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function Qt(e, t) {
|
|
1366
1366
|
let n = new Date(e);
|
|
1367
|
-
return t === "utc" ? `${n.getUTCFullYear()}-${
|
|
1367
|
+
return t === "utc" ? `${n.getUTCFullYear()}-${Z(n.getUTCMonth() + 1)}-${Z(n.getUTCDate())}T${Z(n.getUTCHours())}:${Z(n.getUTCMinutes())}:${Z(n.getUTCSeconds())}Z` : `${n.getFullYear()}-${Z(n.getMonth() + 1)}-${Z(n.getDate())}T${Z(n.getHours())}:${Z(n.getMinutes())}:${Z(n.getSeconds())}`;
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1370
|
-
return e in
|
|
1369
|
+
function $t(e) {
|
|
1370
|
+
return e in Yt;
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1372
|
+
function en(e, t, n, r) {
|
|
1373
1373
|
if (typeof t == "function") return t(e, r);
|
|
1374
1374
|
let i = null, a;
|
|
1375
|
-
if (t === void 0) i = r ?
|
|
1375
|
+
if (t === void 0) i = r ? Xt[r] : "iso", a = Yt[i];
|
|
1376
1376
|
else if (typeof t == "string") {
|
|
1377
|
-
if (
|
|
1378
|
-
i = t, a =
|
|
1377
|
+
if (!$t(t)) throw Error(`Unknown date format preset: "${t}"`);
|
|
1378
|
+
i = t, a = Yt[i];
|
|
1379
1379
|
} else a = t;
|
|
1380
|
-
if (i === "iso") return
|
|
1381
|
-
if (i === "iso-datetime") return
|
|
1380
|
+
if (i === "iso") return Zt(e, n);
|
|
1381
|
+
if (i === "iso-datetime") return Qt(e, n);
|
|
1382
1382
|
let o = n === "utc" ? {
|
|
1383
1383
|
...a,
|
|
1384
1384
|
timeZone: "UTC"
|
|
@@ -1387,73 +1387,79 @@ function $t(e, t, n, r) {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
//#endregion
|
|
1389
1389
|
//#region src/LineChart/LineChart.vue?vue&type=script&setup=true&lang.ts
|
|
1390
|
-
var
|
|
1390
|
+
var tn = {
|
|
1391
1391
|
class: "chart-sr-only",
|
|
1392
1392
|
"aria-live": "polite"
|
|
1393
|
-
},
|
|
1393
|
+
}, nn = [
|
|
1394
1394
|
"width",
|
|
1395
1395
|
"height",
|
|
1396
1396
|
"role",
|
|
1397
1397
|
"aria-label"
|
|
1398
|
-
],
|
|
1398
|
+
], rn = [
|
|
1399
1399
|
"x",
|
|
1400
1400
|
"y",
|
|
1401
1401
|
"text-anchor",
|
|
1402
1402
|
"font-size",
|
|
1403
1403
|
"font-weight",
|
|
1404
1404
|
"fill"
|
|
1405
|
-
],
|
|
1405
|
+
], an = ["x", "dy"], on = { key: 1 }, sn = [
|
|
1406
1406
|
"x1",
|
|
1407
1407
|
"y1",
|
|
1408
1408
|
"x2",
|
|
1409
1409
|
"y2",
|
|
1410
1410
|
"stroke",
|
|
1411
1411
|
"stroke-dasharray"
|
|
1412
|
-
],
|
|
1412
|
+
], cn = [
|
|
1413
|
+
"x",
|
|
1414
|
+
"y",
|
|
1415
|
+
"fill",
|
|
1416
|
+
"fill-opacity",
|
|
1417
|
+
"stroke"
|
|
1418
|
+
], ln = [
|
|
1413
1419
|
"cx",
|
|
1414
1420
|
"cy",
|
|
1415
1421
|
"fill",
|
|
1416
1422
|
"fill-opacity",
|
|
1417
1423
|
"stroke"
|
|
1418
|
-
],
|
|
1424
|
+
], un = [
|
|
1419
1425
|
"x",
|
|
1420
1426
|
"y",
|
|
1421
1427
|
"font-size",
|
|
1422
1428
|
"fill",
|
|
1423
1429
|
"font-weight"
|
|
1424
|
-
],
|
|
1430
|
+
], dn = [
|
|
1425
1431
|
"x1",
|
|
1426
1432
|
"y1",
|
|
1427
1433
|
"x2",
|
|
1428
1434
|
"y2"
|
|
1429
|
-
],
|
|
1435
|
+
], fn = [
|
|
1430
1436
|
"x1",
|
|
1431
1437
|
"y1",
|
|
1432
1438
|
"x2",
|
|
1433
1439
|
"y2"
|
|
1434
|
-
],
|
|
1440
|
+
], pn = [
|
|
1435
1441
|
"x1",
|
|
1436
1442
|
"y1",
|
|
1437
1443
|
"x2",
|
|
1438
1444
|
"y2"
|
|
1439
|
-
],
|
|
1445
|
+
], mn = [
|
|
1440
1446
|
"x1",
|
|
1441
1447
|
"y1",
|
|
1442
1448
|
"x2",
|
|
1443
1449
|
"y2"
|
|
1444
|
-
],
|
|
1450
|
+
], hn = [
|
|
1445
1451
|
"x",
|
|
1446
1452
|
"y",
|
|
1447
1453
|
"font-size",
|
|
1448
1454
|
"fill",
|
|
1449
1455
|
"font-weight",
|
|
1450
1456
|
"fill-opacity"
|
|
1451
|
-
],
|
|
1457
|
+
], gn = [
|
|
1452
1458
|
"transform",
|
|
1453
1459
|
"font-size",
|
|
1454
1460
|
"fill",
|
|
1455
1461
|
"font-weight"
|
|
1456
|
-
],
|
|
1462
|
+
], _n = [
|
|
1457
1463
|
"x",
|
|
1458
1464
|
"y",
|
|
1459
1465
|
"text-anchor",
|
|
@@ -1461,43 +1467,43 @@ var en = {
|
|
|
1461
1467
|
"fill",
|
|
1462
1468
|
"font-weight",
|
|
1463
1469
|
"fill-opacity"
|
|
1464
|
-
],
|
|
1470
|
+
], vn = [
|
|
1465
1471
|
"x",
|
|
1466
1472
|
"y",
|
|
1467
1473
|
"font-size",
|
|
1468
1474
|
"fill",
|
|
1469
1475
|
"font-weight"
|
|
1470
|
-
],
|
|
1476
|
+
], yn = [
|
|
1471
1477
|
"d",
|
|
1472
1478
|
"fill",
|
|
1473
1479
|
"fill-opacity"
|
|
1474
|
-
],
|
|
1480
|
+
], Q = [
|
|
1475
1481
|
"d",
|
|
1476
1482
|
"stroke",
|
|
1477
1483
|
"stroke-width"
|
|
1478
|
-
],
|
|
1484
|
+
], bn = [
|
|
1479
1485
|
"d",
|
|
1480
1486
|
"stroke",
|
|
1481
1487
|
"stroke-width",
|
|
1482
1488
|
"stroke-opacity",
|
|
1483
1489
|
"stroke-dasharray"
|
|
1484
|
-
],
|
|
1490
|
+
], xn = [
|
|
1485
1491
|
"cx",
|
|
1486
1492
|
"cy",
|
|
1487
1493
|
"r",
|
|
1488
1494
|
"fill",
|
|
1489
1495
|
"fill-opacity",
|
|
1490
1496
|
"stroke"
|
|
1491
|
-
],
|
|
1497
|
+
], Sn = [
|
|
1492
1498
|
"d",
|
|
1493
1499
|
"fill",
|
|
1494
1500
|
"fill-opacity"
|
|
1495
|
-
],
|
|
1501
|
+
], Cn = [
|
|
1496
1502
|
"d",
|
|
1497
1503
|
"stroke",
|
|
1498
1504
|
"stroke-width",
|
|
1499
1505
|
"stroke-dasharray"
|
|
1500
|
-
],
|
|
1506
|
+
], wn = [
|
|
1501
1507
|
"x1",
|
|
1502
1508
|
"y1",
|
|
1503
1509
|
"x2",
|
|
@@ -1505,7 +1511,7 @@ var en = {
|
|
|
1505
1511
|
"stroke",
|
|
1506
1512
|
"stroke-width",
|
|
1507
1513
|
"stroke-dasharray"
|
|
1508
|
-
],
|
|
1514
|
+
], Tn = [
|
|
1509
1515
|
"x1",
|
|
1510
1516
|
"y1",
|
|
1511
1517
|
"x2",
|
|
@@ -1513,53 +1519,53 @@ var en = {
|
|
|
1513
1519
|
"stroke",
|
|
1514
1520
|
"stroke-width",
|
|
1515
1521
|
"stroke-dasharray"
|
|
1516
|
-
],
|
|
1522
|
+
], En = [
|
|
1517
1523
|
"x1",
|
|
1518
1524
|
"y1",
|
|
1519
1525
|
"x2",
|
|
1520
1526
|
"y2"
|
|
1521
|
-
],
|
|
1527
|
+
], Dn = [
|
|
1522
1528
|
"x1",
|
|
1523
1529
|
"y1",
|
|
1524
1530
|
"x2",
|
|
1525
1531
|
"y2"
|
|
1526
|
-
],
|
|
1532
|
+
], On = [
|
|
1527
1533
|
"x1",
|
|
1528
1534
|
"y1",
|
|
1529
1535
|
"x2",
|
|
1530
1536
|
"y2"
|
|
1531
|
-
],
|
|
1537
|
+
], kn = [
|
|
1532
1538
|
"cx",
|
|
1533
1539
|
"cy",
|
|
1534
1540
|
"fill"
|
|
1535
|
-
],
|
|
1541
|
+
], An = [
|
|
1536
1542
|
"x",
|
|
1537
1543
|
"y",
|
|
1538
1544
|
"width",
|
|
1539
1545
|
"height"
|
|
1540
|
-
],
|
|
1546
|
+
], jn = [
|
|
1541
1547
|
"cx",
|
|
1542
1548
|
"cy",
|
|
1543
1549
|
"fill",
|
|
1544
1550
|
"fill-opacity",
|
|
1545
1551
|
"stroke"
|
|
1546
|
-
],
|
|
1552
|
+
], Mn = [
|
|
1547
1553
|
"x",
|
|
1548
1554
|
"y",
|
|
1549
1555
|
"font-size",
|
|
1550
1556
|
"font-weight",
|
|
1551
1557
|
"fill"
|
|
1552
|
-
],
|
|
1558
|
+
], Nn = [
|
|
1553
1559
|
"x",
|
|
1554
1560
|
"y",
|
|
1555
1561
|
"font-size",
|
|
1556
1562
|
"font-weight",
|
|
1557
1563
|
"fill",
|
|
1558
1564
|
"fill-opacity"
|
|
1559
|
-
],
|
|
1565
|
+
], Pn = { class: "line-chart-tooltip" }, Fn = {
|
|
1560
1566
|
key: 0,
|
|
1561
1567
|
class: "line-chart-tooltip-label"
|
|
1562
|
-
},
|
|
1568
|
+
}, In = ["href", "download"], Ln = 36, Rn = 12, zn = 7, Bn = 16, Vn = /* @__PURE__ */ N(/* @__PURE__ */ l({
|
|
1563
1569
|
inheritAttrs: !1,
|
|
1564
1570
|
__name: "LineChart",
|
|
1565
1571
|
props: {
|
|
@@ -1599,7 +1605,7 @@ var en = {
|
|
|
1599
1605
|
},
|
|
1600
1606
|
tooltipData: {},
|
|
1601
1607
|
tooltipTrigger: {},
|
|
1602
|
-
tooltipClamp: { default: "
|
|
1608
|
+
tooltipClamp: { default: "window" },
|
|
1603
1609
|
tooltipValueFormat: {},
|
|
1604
1610
|
csv: {},
|
|
1605
1611
|
filename: {},
|
|
@@ -1620,13 +1626,13 @@ var en = {
|
|
|
1620
1626
|
if (!e) return;
|
|
1621
1627
|
if (!t) return e;
|
|
1622
1628
|
let r = new Float64Array(e.length);
|
|
1623
|
-
for (let t = 0; t < e.length; t++) r[t] =
|
|
1629
|
+
for (let t = 0; t < e.length; t++) r[t] = Ht(e[t], n) ?? NaN;
|
|
1624
1630
|
return r;
|
|
1625
1631
|
}
|
|
1626
|
-
let ie =
|
|
1632
|
+
let ie = Tt(() => f.tooltipValueFormat, () => f.yTickFormat), C = n(() => f.timezone ?? "utc"), w = n(() => {
|
|
1627
1633
|
let e = C.value, t = !1, n = !1;
|
|
1628
1634
|
for (let r of re(f)) {
|
|
1629
|
-
if (n = !0, !
|
|
1635
|
+
if (n = !0, !Wt(r, e)) {
|
|
1630
1636
|
t = !1;
|
|
1631
1637
|
break;
|
|
1632
1638
|
}
|
|
@@ -1687,7 +1693,7 @@ var en = {
|
|
|
1687
1693
|
});
|
|
1688
1694
|
function A(e) {
|
|
1689
1695
|
let { min: t, max: n } = le.value, r = n - t || 1;
|
|
1690
|
-
return
|
|
1696
|
+
return V.value.left + (e - t) / r * W.value;
|
|
1691
1697
|
}
|
|
1692
1698
|
let ue = n(() => {
|
|
1693
1699
|
let e = Infinity, t = -Infinity, n = Infinity, r = (r) => {
|
|
@@ -1704,7 +1710,7 @@ var en = {
|
|
|
1704
1710
|
range: 1
|
|
1705
1711
|
};
|
|
1706
1712
|
f.yMin != null && f.yMin < e && (e = f.yMin);
|
|
1707
|
-
let i =
|
|
1713
|
+
let i = Te(e, t, f.yScaleType, n);
|
|
1708
1714
|
return {
|
|
1709
1715
|
min: i.min,
|
|
1710
1716
|
max: i.max,
|
|
@@ -1713,7 +1719,7 @@ var en = {
|
|
|
1713
1719
|
});
|
|
1714
1720
|
function j(e) {
|
|
1715
1721
|
let { min: t, max: n } = ue.value;
|
|
1716
|
-
return
|
|
1722
|
+
return V.value.top + G.value - we(e, t, n, f.yScaleType) * G.value;
|
|
1717
1723
|
}
|
|
1718
1724
|
function de(e) {
|
|
1719
1725
|
let t = e.data;
|
|
@@ -1761,10 +1767,10 @@ var en = {
|
|
|
1761
1767
|
return A(r ? k(r, n) : n);
|
|
1762
1768
|
}
|
|
1763
1769
|
function me(e, t = !0) {
|
|
1764
|
-
let n =
|
|
1770
|
+
let n = V.value.top + G.value;
|
|
1765
1771
|
if (e.seriesIndex == null) {
|
|
1766
1772
|
let t = M(e, "start"), r = M(e, "end");
|
|
1767
|
-
return t > r ? "" : `M${t},${
|
|
1773
|
+
return t > r ? "" : `M${t},${V.value.top}L${r},${V.value.top}L${r},${n}L${t},${n}Z`;
|
|
1768
1774
|
}
|
|
1769
1775
|
let r = E.value[e.seriesIndex];
|
|
1770
1776
|
if (!r) return "";
|
|
@@ -1780,14 +1786,14 @@ var en = {
|
|
|
1780
1786
|
labels: [],
|
|
1781
1787
|
extraHeight: 0
|
|
1782
1788
|
};
|
|
1783
|
-
let t = [], n =
|
|
1789
|
+
let t = [], n = V.value.left + W.value;
|
|
1784
1790
|
for (let r of e) {
|
|
1785
1791
|
if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
|
|
1786
|
-
let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) *
|
|
1792
|
+
let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * zn, o = M(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : E.value[r.seriesIndex]?.color ?? "currentColor"), u = Oe({
|
|
1787
1793
|
color: l,
|
|
1788
1794
|
fontWeight: 600,
|
|
1789
1795
|
...r.inlineLabelStyle
|
|
1790
|
-
}, { fontSize: 11 }), d =
|
|
1796
|
+
}, { fontSize: 11 }), d = Oe(r.inlineDescriptionStyle, {
|
|
1791
1797
|
fontSize: 11,
|
|
1792
1798
|
fillOpacity: .6
|
|
1793
1799
|
});
|
|
@@ -1807,7 +1813,7 @@ var en = {
|
|
|
1807
1813
|
let r = [];
|
|
1808
1814
|
for (let e of t) {
|
|
1809
1815
|
let t = e.cx - e.textWidth / 2, n = 0;
|
|
1810
|
-
for (; n < r.length && !(t >= r[n] +
|
|
1816
|
+
for (; n < r.length && !(t >= r[n] + Bn);) n++;
|
|
1811
1817
|
e.row = n;
|
|
1812
1818
|
let i = e.cx + e.textWidth / 2;
|
|
1813
1819
|
r[n] = Math.max(r[n] ?? -Infinity, i);
|
|
@@ -1817,7 +1823,7 @@ var en = {
|
|
|
1817
1823
|
extraHeight: 0
|
|
1818
1824
|
} : {
|
|
1819
1825
|
labels: t,
|
|
1820
|
-
extraHeight: (Math.max(...t.map((e) => e.row)) + 1) *
|
|
1826
|
+
extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Ln + Rn
|
|
1821
1827
|
};
|
|
1822
1828
|
}), ge = n(() => {
|
|
1823
1829
|
let e = [];
|
|
@@ -1827,6 +1833,12 @@ var en = {
|
|
|
1827
1833
|
type: "series",
|
|
1828
1834
|
dashed: t.dashed
|
|
1829
1835
|
});
|
|
1836
|
+
for (let t of oe.value) !t.legend || t.showInLegend === !1 || e.push({
|
|
1837
|
+
label: t.legend,
|
|
1838
|
+
color: t.color ?? "currentColor",
|
|
1839
|
+
type: "area",
|
|
1840
|
+
fillOpacity: t.opacity ?? .2
|
|
1841
|
+
});
|
|
1830
1842
|
let t = f.areaSections;
|
|
1831
1843
|
if (t) for (let n of t) {
|
|
1832
1844
|
if (n.legend !== "inline" || !n.label && !n.description) continue;
|
|
@@ -1839,38 +1851,38 @@ var en = {
|
|
|
1839
1851
|
});
|
|
1840
1852
|
}
|
|
1841
1853
|
return e;
|
|
1842
|
-
}),
|
|
1843
|
-
let { min: e, max: t } = ue.value, n = (e) => f.yTickFormat === void 0 ?
|
|
1854
|
+
}), _e = n(() => ge.value.map((e) => e.label)), ve = n(() => Ie.value + he.value.extraHeight), N = n(() => V.value.top + G.value + V.value.bottom + Rn), be = n(() => {
|
|
1855
|
+
let { min: e, max: t } = ue.value, n = (e) => f.yTickFormat === void 0 ? Ce(e) : ae(e, f.yTickFormat);
|
|
1844
1856
|
return e === t ? [{
|
|
1845
1857
|
value: n(e),
|
|
1846
|
-
y:
|
|
1847
|
-
}] : (f.yScaleType === "log" ?
|
|
1858
|
+
y: P(V.value.top + G.value / 2)
|
|
1859
|
+
}] : (f.yScaleType === "log" ? I({
|
|
1848
1860
|
min: e,
|
|
1849
1861
|
max: t,
|
|
1850
1862
|
ticks: f.yTicks
|
|
1851
|
-
}) :
|
|
1863
|
+
}) : F({
|
|
1852
1864
|
min: e,
|
|
1853
1865
|
max: t,
|
|
1854
1866
|
ticks: f.yTicks,
|
|
1855
|
-
targetTickCount:
|
|
1867
|
+
targetTickCount: G.value / 50
|
|
1856
1868
|
})).map((e) => ({
|
|
1857
1869
|
value: n(e),
|
|
1858
|
-
y:
|
|
1870
|
+
y: P(j(e))
|
|
1859
1871
|
}));
|
|
1860
1872
|
});
|
|
1861
|
-
function
|
|
1873
|
+
function xe(e, t, n) {
|
|
1862
1874
|
let r = f.xTickFormat;
|
|
1863
|
-
if (T.value) return typeof r == "function" ? r(e, t) :
|
|
1875
|
+
if (T.value) return typeof r == "function" ? r(e, t) : en(e, r, C.value, n);
|
|
1864
1876
|
let i = e + ce.value;
|
|
1865
|
-
return r === void 0 ? !O.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] :
|
|
1877
|
+
return r === void 0 ? !O.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : Ce(i) : typeof r == "function" ? r(i, t) : ae(i, r);
|
|
1866
1878
|
}
|
|
1867
|
-
let
|
|
1879
|
+
let Se = n(() => {
|
|
1868
1880
|
let { min: e, max: t } = le.value;
|
|
1869
1881
|
if (e === t) return [];
|
|
1870
|
-
let n = T.value, r = n ? 0 : ce.value, i = D.value, a =
|
|
1882
|
+
let n = T.value, r = n ? 0 : ce.value, i = D.value, a = W.value / 80, o, s;
|
|
1871
1883
|
if (n) {
|
|
1872
|
-
let n =
|
|
1873
|
-
s = n.unit, o =
|
|
1884
|
+
let n = Jt(e, t, a, C.value);
|
|
1885
|
+
s = n.unit, o = F({
|
|
1874
1886
|
min: e,
|
|
1875
1887
|
max: t,
|
|
1876
1888
|
ticks: n.values
|
|
@@ -1879,31 +1891,31 @@ var en = {
|
|
|
1879
1891
|
let e = Math.max(3, Math.floor(a)), t = Math.max(1, Math.round((i - 1) / e));
|
|
1880
1892
|
o = [];
|
|
1881
1893
|
for (let e = 0; e < i; e += t) o.push(e);
|
|
1882
|
-
} else o =
|
|
1894
|
+
} else o = F({
|
|
1883
1895
|
min: e,
|
|
1884
1896
|
max: t,
|
|
1885
1897
|
ticks: f.xTicks,
|
|
1886
1898
|
targetTickCount: a,
|
|
1887
1899
|
displayOffset: r
|
|
1888
1900
|
});
|
|
1889
|
-
let c =
|
|
1901
|
+
let c = V.value.left, l = V.value.left + W.value;
|
|
1890
1902
|
return o.map((e, t) => {
|
|
1891
|
-
let n =
|
|
1903
|
+
let n = P(A(e)), r = "middle";
|
|
1892
1904
|
return n - c <= 1 ? r = "start" : l - n <= 1 && (r = "end"), {
|
|
1893
|
-
value:
|
|
1905
|
+
value: xe(e, t, s),
|
|
1894
1906
|
x: n,
|
|
1895
1907
|
anchor: r
|
|
1896
1908
|
};
|
|
1897
1909
|
});
|
|
1898
1910
|
});
|
|
1899
|
-
function
|
|
1900
|
-
return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv :
|
|
1911
|
+
function Ee() {
|
|
1912
|
+
return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : Qe(E.value);
|
|
1901
1913
|
}
|
|
1902
|
-
let
|
|
1903
|
-
let e =
|
|
1914
|
+
let De = n(() => !!f.tooltipData || !!f.tooltipTrigger), R = n(() => {
|
|
1915
|
+
let e = Re.value, t = E.value[0];
|
|
1904
1916
|
return e === null || !t ? null : k(t, e);
|
|
1905
|
-
}),
|
|
1906
|
-
function
|
|
1917
|
+
}), ke = n(() => R.value === null ? 0 : A(R.value));
|
|
1918
|
+
function Ae(e, t) {
|
|
1907
1919
|
let n = e.data.length;
|
|
1908
1920
|
if (n === 0) return null;
|
|
1909
1921
|
let r = 0, i = Infinity;
|
|
@@ -1915,13 +1927,13 @@ var en = {
|
|
|
1915
1927
|
}
|
|
1916
1928
|
return i === Infinity ? null : r;
|
|
1917
1929
|
}
|
|
1918
|
-
let
|
|
1919
|
-
let e =
|
|
1930
|
+
let je = n(() => {
|
|
1931
|
+
let e = R.value;
|
|
1920
1932
|
if (e === null) return [];
|
|
1921
1933
|
let t = [];
|
|
1922
1934
|
for (let n of E.value) {
|
|
1923
1935
|
if (n.showInTooltip === !1) continue;
|
|
1924
|
-
let r =
|
|
1936
|
+
let r = Ae(n, e);
|
|
1925
1937
|
if (r === null) continue;
|
|
1926
1938
|
let i = n.data[r];
|
|
1927
1939
|
isFinite(i) && t.push({
|
|
@@ -1931,14 +1943,14 @@ var en = {
|
|
|
1931
1943
|
});
|
|
1932
1944
|
}
|
|
1933
1945
|
return t;
|
|
1934
|
-
}),
|
|
1935
|
-
let e =
|
|
1946
|
+
}), Me = n(() => {
|
|
1947
|
+
let e = Re.value, t = R.value;
|
|
1936
1948
|
if (e === null || t === null) return null;
|
|
1937
|
-
let n =
|
|
1949
|
+
let n = xe(t, e), r = E.value, i = [];
|
|
1938
1950
|
for (let e = 0; e < r.length; e++) {
|
|
1939
1951
|
let n = r[e];
|
|
1940
1952
|
if (n.showInTooltip === !1) continue;
|
|
1941
|
-
let a =
|
|
1953
|
+
let a = Ae(n, t);
|
|
1942
1954
|
i.push({
|
|
1943
1955
|
value: a === null ? NaN : Number(n.data[a]),
|
|
1944
1956
|
color: n.color ?? "currentColor",
|
|
@@ -1952,21 +1964,21 @@ var en = {
|
|
|
1952
1964
|
data: f.tooltipData?.[e] ?? null
|
|
1953
1965
|
};
|
|
1954
1966
|
});
|
|
1955
|
-
function
|
|
1967
|
+
function Ne(e, t) {
|
|
1956
1968
|
return !isFinite(e) || !isFinite(t) ? null : {
|
|
1957
1969
|
x: A(e - ce.value),
|
|
1958
1970
|
y: j(t)
|
|
1959
1971
|
};
|
|
1960
1972
|
}
|
|
1961
|
-
function
|
|
1962
|
-
let t =
|
|
1973
|
+
function Pe(e) {
|
|
1974
|
+
let t = z.value?.getBoundingClientRect();
|
|
1963
1975
|
if (!t) return null;
|
|
1964
1976
|
let n = E.value[0];
|
|
1965
1977
|
if (!n || n.data.length === 0) return null;
|
|
1966
1978
|
let { min: r, max: i } = le.value, a = i - r || 1;
|
|
1967
|
-
return
|
|
1979
|
+
return Ae(n, r + (e - t.left - V.value.left) / W.value * a);
|
|
1968
1980
|
}
|
|
1969
|
-
let { containerRef:
|
|
1981
|
+
let { containerRef: z, svgRef: B, width: Fe, height: Ie, padding: V, legendY: H, inlineLegendLayout: U, innerW: W, innerH: G, bounds: Le, hoverIndex: Re, tooltipRef: ze, tooltipPos: K, tooltipHandlers: Be, menuItems: Ve, downloadLinkText: He, csvHref: Ue, downloadButtonText: We, triggerCsvDownload: Ge, menuFilename: Ke, isFullscreen: qe, fullscreenStyle: q, teleportTarget: J, exitFullscreen: Je } = wt({
|
|
1970
1982
|
width: () => f.width,
|
|
1971
1983
|
height: () => f.height,
|
|
1972
1984
|
title: () => f.title,
|
|
@@ -1982,17 +1994,17 @@ var en = {
|
|
|
1982
1994
|
downloadButton: () => f.downloadButton,
|
|
1983
1995
|
fullscreenTarget: () => f.fullscreenTarget,
|
|
1984
1996
|
chartPadding: () => f.chartPadding,
|
|
1985
|
-
inlineLegendLabels: () =>
|
|
1986
|
-
hasTooltipSlot: () =>
|
|
1987
|
-
getCsv:
|
|
1988
|
-
pointerToIndex:
|
|
1997
|
+
inlineLegendLabels: () => _e.value,
|
|
1998
|
+
hasTooltipSlot: () => De.value,
|
|
1999
|
+
getCsv: Ee,
|
|
2000
|
+
pointerToIndex: Pe,
|
|
1989
2001
|
onHover: (e) => ee("hover", e),
|
|
1990
2002
|
extraBelowHeight: () => he.value.extraHeight
|
|
1991
|
-
}),
|
|
2003
|
+
}), Ye = n(() => Oe(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => Oe(f.tickLabelStyle, {
|
|
1992
2004
|
fontSize: 10,
|
|
1993
|
-
fillOpacity:
|
|
1994
|
-
})),
|
|
1995
|
-
let e = f.titleStyle, t = e?.align ?? "left", n =
|
|
2005
|
+
fillOpacity: L
|
|
2006
|
+
})), Xe = n(() => Oe(f.legendStyle, { fontSize: 11 })), Ze = n(() => {
|
|
2007
|
+
let e = f.titleStyle, t = e?.align ?? "left", n = Le.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
1996
2008
|
return {
|
|
1997
2009
|
lines: (f.title ?? "").split("\n"),
|
|
1998
2010
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -2002,8 +2014,8 @@ var en = {
|
|
|
2002
2014
|
x: r,
|
|
2003
2015
|
anchor: i
|
|
2004
2016
|
};
|
|
2005
|
-
}),
|
|
2006
|
-
let e =
|
|
2017
|
+
}), $e = n(() => {
|
|
2018
|
+
let e = U.value.positions, t = V.value.left, n = H.value;
|
|
2007
2019
|
return ge.value.map((r, i) => {
|
|
2008
2020
|
let a = e[i];
|
|
2009
2021
|
return {
|
|
@@ -2014,48 +2026,48 @@ var en = {
|
|
|
2014
2026
|
});
|
|
2015
2027
|
});
|
|
2016
2028
|
return (n, l) => (_(), r(t, {
|
|
2017
|
-
to: x(
|
|
2018
|
-
disabled: !x(
|
|
2029
|
+
to: x(J),
|
|
2030
|
+
disabled: !x(qe)
|
|
2019
2031
|
}, [o("div", d({
|
|
2020
2032
|
ref_key: "containerRef",
|
|
2021
|
-
ref:
|
|
2033
|
+
ref: z
|
|
2022
2034
|
}, n.$attrs, {
|
|
2023
|
-
class: ["line-chart-wrapper", { "is-fullscreen": x(
|
|
2024
|
-
style: x(
|
|
2035
|
+
class: ["line-chart-wrapper", { "is-fullscreen": x(qe) }],
|
|
2036
|
+
style: x(q)
|
|
2025
2037
|
}), [
|
|
2026
|
-
c.menu ? (_(), r(
|
|
2038
|
+
c.menu ? (_(), r(ye, {
|
|
2027
2039
|
key: 0,
|
|
2028
|
-
items: x(
|
|
2029
|
-
"is-fullscreen": x(
|
|
2030
|
-
onClose: x(
|
|
2040
|
+
items: x(Ve),
|
|
2041
|
+
"is-fullscreen": x(qe),
|
|
2042
|
+
onClose: x(Je)
|
|
2031
2043
|
}, null, 8, [
|
|
2032
2044
|
"items",
|
|
2033
2045
|
"is-fullscreen",
|
|
2034
2046
|
"onClose"
|
|
2035
2047
|
])) : i("", !0),
|
|
2036
|
-
o("div",
|
|
2048
|
+
o("div", tn, b(x(qe) ? "Chart expanded to fill window" : ""), 1),
|
|
2037
2049
|
(_(), a("svg", {
|
|
2038
2050
|
ref_key: "svgRef",
|
|
2039
|
-
ref:
|
|
2040
|
-
width: x(
|
|
2041
|
-
height:
|
|
2051
|
+
ref: B,
|
|
2052
|
+
width: x(Fe),
|
|
2053
|
+
height: ve.value,
|
|
2042
2054
|
role: g.value || void 0,
|
|
2043
2055
|
"aria-label": p.value || void 0
|
|
2044
2056
|
}, [
|
|
2045
2057
|
c.title ? (_(), a("text", {
|
|
2046
2058
|
key: 0,
|
|
2047
|
-
x:
|
|
2048
|
-
y:
|
|
2049
|
-
"text-anchor":
|
|
2050
|
-
"font-size":
|
|
2051
|
-
"font-weight":
|
|
2052
|
-
fill:
|
|
2053
|
-
}, [(_(!0), a(e, null, y(
|
|
2059
|
+
x: Ze.value.x,
|
|
2060
|
+
y: Ze.value.lineHeight,
|
|
2061
|
+
"text-anchor": Ze.value.anchor,
|
|
2062
|
+
"font-size": Ze.value.fontSize,
|
|
2063
|
+
"font-weight": Ze.value.fontWeight,
|
|
2064
|
+
fill: Ze.value.color
|
|
2065
|
+
}, [(_(!0), a(e, null, y(Ze.value.lines, (e, t) => (_(), a("tspan", {
|
|
2054
2066
|
key: t,
|
|
2055
|
-
x:
|
|
2056
|
-
dy: t === 0 ? 0 :
|
|
2057
|
-
}, b(e), 9,
|
|
2058
|
-
|
|
2067
|
+
x: Ze.value.x,
|
|
2068
|
+
dy: t === 0 ? 0 : Ze.value.lineHeight
|
|
2069
|
+
}, b(e), 9, an))), 128))], 8, rn)) : i("", !0),
|
|
2070
|
+
$e.value.length > 0 ? (_(), a("g", on, [(_(!0), a(e, null, y($e.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
|
|
2059
2071
|
key: 0,
|
|
2060
2072
|
x1: t.x,
|
|
2061
2073
|
y1: t.y,
|
|
@@ -2064,8 +2076,18 @@ var en = {
|
|
|
2064
2076
|
stroke: t.color,
|
|
2065
2077
|
"stroke-width": "2",
|
|
2066
2078
|
"stroke-dasharray": t.dashed ? "4 2" : void 0
|
|
2067
|
-
}, null, 8,
|
|
2079
|
+
}, null, 8, sn)) : t.type === "area" ? (_(), a("rect", {
|
|
2068
2080
|
key: 1,
|
|
2081
|
+
x: t.x,
|
|
2082
|
+
y: t.y - 4,
|
|
2083
|
+
width: "12",
|
|
2084
|
+
height: "8",
|
|
2085
|
+
fill: t.color,
|
|
2086
|
+
"fill-opacity": t.fillOpacity,
|
|
2087
|
+
stroke: t.color,
|
|
2088
|
+
"stroke-width": "1.5"
|
|
2089
|
+
}, null, 8, cn)) : (_(), a("circle", {
|
|
2090
|
+
key: 2,
|
|
2069
2091
|
cx: t.x + 4,
|
|
2070
2092
|
cy: t.y,
|
|
2071
2093
|
r: "4",
|
|
@@ -2073,89 +2095,89 @@ var en = {
|
|
|
2073
2095
|
"fill-opacity": t.fillOpacity,
|
|
2074
2096
|
stroke: t.color,
|
|
2075
2097
|
"stroke-width": "1.5"
|
|
2076
|
-
}, null, 8,
|
|
2098
|
+
}, null, 8, ln)), o("text", {
|
|
2077
2099
|
x: t.x + 18,
|
|
2078
2100
|
y: t.y + 4,
|
|
2079
|
-
"font-size":
|
|
2080
|
-
fill:
|
|
2081
|
-
"font-weight":
|
|
2082
|
-
}, b(t.label), 9,
|
|
2101
|
+
"font-size": Xe.value.fontSize,
|
|
2102
|
+
fill: Xe.value.fill,
|
|
2103
|
+
"font-weight": Xe.value.fontWeight
|
|
2104
|
+
}, b(t.label), 9, un)], 64))), 128))])) : i("", !0),
|
|
2083
2105
|
o("line", {
|
|
2084
|
-
x1: x(
|
|
2085
|
-
y1: x(
|
|
2086
|
-
x2: x(
|
|
2087
|
-
y2: x(
|
|
2106
|
+
x1: x(P)(x(V).left),
|
|
2107
|
+
y1: x(P)(x(V).top),
|
|
2108
|
+
x2: x(P)(x(V).left),
|
|
2109
|
+
y2: x(P)(x(V).top + x(G)),
|
|
2088
2110
|
stroke: "currentColor",
|
|
2089
2111
|
"stroke-opacity": "0.3"
|
|
2090
|
-
}, null, 8,
|
|
2112
|
+
}, null, 8, dn),
|
|
2091
2113
|
o("line", {
|
|
2092
|
-
x1: x(
|
|
2093
|
-
y1: x(
|
|
2094
|
-
x2: x(
|
|
2095
|
-
y2: x(
|
|
2114
|
+
x1: x(P)(x(V).left),
|
|
2115
|
+
y1: x(P)(x(V).top + x(G)),
|
|
2116
|
+
x2: x(P)(x(V).left + x(W)),
|
|
2117
|
+
y2: x(P)(x(V).top + x(G)),
|
|
2096
2118
|
stroke: "currentColor",
|
|
2097
2119
|
"stroke-opacity": "0.3"
|
|
2098
|
-
}, null, 8,
|
|
2099
|
-
c.yGrid ? (_(!0), a(e, { key: 2 }, y(
|
|
2120
|
+
}, null, 8, fn),
|
|
2121
|
+
c.yGrid ? (_(!0), a(e, { key: 2 }, y(be.value, (e, t) => (_(), a("line", {
|
|
2100
2122
|
key: "yg" + t,
|
|
2101
|
-
x1: x(
|
|
2123
|
+
x1: x(V).left,
|
|
2102
2124
|
y1: e.y,
|
|
2103
|
-
x2: x(
|
|
2125
|
+
x2: x(V).left + x(W),
|
|
2104
2126
|
y2: e.y,
|
|
2105
2127
|
stroke: "currentColor",
|
|
2106
2128
|
"stroke-opacity": "0.1"
|
|
2107
|
-
}, null, 8,
|
|
2108
|
-
c.xGrid ? (_(!0), a(e, { key: 3 }, y(
|
|
2129
|
+
}, null, 8, pn))), 128)) : i("", !0),
|
|
2130
|
+
c.xGrid ? (_(!0), a(e, { key: 3 }, y(Se.value, (e, t) => (_(), a("line", {
|
|
2109
2131
|
key: "xg" + t,
|
|
2110
2132
|
x1: e.x,
|
|
2111
|
-
y1: x(
|
|
2133
|
+
y1: x(V).top,
|
|
2112
2134
|
x2: e.x,
|
|
2113
|
-
y2: x(
|
|
2135
|
+
y2: x(V).top + x(G),
|
|
2114
2136
|
stroke: "currentColor",
|
|
2115
2137
|
"stroke-opacity": "0.1"
|
|
2116
|
-
}, null, 8,
|
|
2117
|
-
(_(!0), a(e, null, y(
|
|
2138
|
+
}, null, 8, mn))), 128)) : i("", !0),
|
|
2139
|
+
(_(!0), a(e, null, y(be.value, (e, t) => (_(), a("text", {
|
|
2118
2140
|
key: "y" + t,
|
|
2119
2141
|
"data-testid": "y-tick",
|
|
2120
|
-
x: x(
|
|
2142
|
+
x: x(V).left - 6,
|
|
2121
2143
|
y: e.y,
|
|
2122
2144
|
"text-anchor": "end",
|
|
2123
2145
|
"dominant-baseline": "middle",
|
|
2124
|
-
"font-size":
|
|
2125
|
-
fill:
|
|
2126
|
-
"font-weight":
|
|
2127
|
-
"fill-opacity":
|
|
2128
|
-
}, b(e.value), 9,
|
|
2146
|
+
"font-size": Y.value.fontSize,
|
|
2147
|
+
fill: Y.value.fill,
|
|
2148
|
+
"font-weight": Y.value.fontWeight,
|
|
2149
|
+
"fill-opacity": Y.value.fillOpacity
|
|
2150
|
+
}, b(e.value), 9, hn))), 128)),
|
|
2129
2151
|
c.yLabel ? (_(), a("text", {
|
|
2130
2152
|
key: 4,
|
|
2131
2153
|
x: 0,
|
|
2132
2154
|
y: 0,
|
|
2133
|
-
transform: `translate(14, ${x(
|
|
2155
|
+
transform: `translate(14, ${x(V).top + x(G) / 2}) rotate(-90)`,
|
|
2134
2156
|
"text-anchor": "middle",
|
|
2135
|
-
"font-size":
|
|
2136
|
-
fill:
|
|
2137
|
-
"font-weight":
|
|
2138
|
-
}, b(c.yLabel), 9,
|
|
2139
|
-
(_(!0), a(e, null, y(
|
|
2157
|
+
"font-size": Ye.value.fontSize,
|
|
2158
|
+
fill: Ye.value.fill,
|
|
2159
|
+
"font-weight": Ye.value.fontWeight
|
|
2160
|
+
}, b(c.yLabel), 9, gn)) : i("", !0),
|
|
2161
|
+
(_(!0), a(e, null, y(Se.value, (e, t) => (_(), a("text", {
|
|
2140
2162
|
key: "x" + t,
|
|
2141
2163
|
"data-testid": "x-tick",
|
|
2142
2164
|
x: e.x,
|
|
2143
|
-
y: x(
|
|
2165
|
+
y: x(V).top + x(G) + 16,
|
|
2144
2166
|
"text-anchor": e.anchor,
|
|
2145
|
-
"font-size":
|
|
2146
|
-
fill:
|
|
2147
|
-
"font-weight":
|
|
2148
|
-
"fill-opacity":
|
|
2149
|
-
}, b(e.value), 9,
|
|
2167
|
+
"font-size": Y.value.fontSize,
|
|
2168
|
+
fill: Y.value.fill,
|
|
2169
|
+
"font-weight": Y.value.fontWeight,
|
|
2170
|
+
"fill-opacity": Y.value.fillOpacity
|
|
2171
|
+
}, b(e.value), 9, _n))), 128)),
|
|
2150
2172
|
c.xLabel ? (_(), a("text", {
|
|
2151
2173
|
key: 5,
|
|
2152
|
-
x: x(
|
|
2153
|
-
y: x(
|
|
2174
|
+
x: x(V).left + x(W) / 2,
|
|
2175
|
+
y: x(Ie) - 4,
|
|
2154
2176
|
"text-anchor": "middle",
|
|
2155
|
-
"font-size":
|
|
2156
|
-
fill:
|
|
2157
|
-
"font-weight":
|
|
2158
|
-
}, b(c.xLabel), 9,
|
|
2177
|
+
"font-size": Ye.value.fontSize,
|
|
2178
|
+
fill: Ye.value.fill,
|
|
2179
|
+
"font-weight": Ye.value.fontWeight
|
|
2180
|
+
}, b(c.xLabel), 9, vn)) : i("", !0),
|
|
2159
2181
|
(_(!0), a(e, null, y(oe.value, (e, t) => (_(), a("path", {
|
|
2160
2182
|
key: "area" + t,
|
|
2161
2183
|
d: pe(e),
|
|
@@ -2163,7 +2185,7 @@ var en = {
|
|
|
2163
2185
|
"fill-opacity": e.opacity ?? .2,
|
|
2164
2186
|
stroke: "none",
|
|
2165
2187
|
style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
|
|
2166
|
-
}, null, 12,
|
|
2188
|
+
}, null, 12, yn))), 128)),
|
|
2167
2189
|
(_(!0), a(e, null, y(E.value, (t, n) => (_(), a(e, { key: n }, [
|
|
2168
2190
|
t.line !== !1 && t.outline ? (_(), a("path", {
|
|
2169
2191
|
key: 0,
|
|
@@ -2174,7 +2196,7 @@ var en = {
|
|
|
2174
2196
|
"stroke-linecap": "round",
|
|
2175
2197
|
"stroke-linejoin": "round",
|
|
2176
2198
|
"data-testid": "line-outline"
|
|
2177
|
-
}, null, 8,
|
|
2199
|
+
}, null, 8, Q)) : i("", !0),
|
|
2178
2200
|
t.line === !1 ? i("", !0) : (_(), a("path", {
|
|
2179
2201
|
key: 1,
|
|
2180
2202
|
d: de(t),
|
|
@@ -2184,7 +2206,7 @@ var en = {
|
|
|
2184
2206
|
"stroke-opacity": t.lineOpacity ?? t.opacity ?? c.lineOpacity,
|
|
2185
2207
|
"stroke-dasharray": t.dashed ? "6 3" : void 0,
|
|
2186
2208
|
style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
2187
|
-
}, null, 12,
|
|
2209
|
+
}, null, 12, bn)),
|
|
2188
2210
|
t.dots ? (_(!0), a(e, { key: 2 }, y(fe(t), (e, n) => (_(), a("circle", {
|
|
2189
2211
|
key: n,
|
|
2190
2212
|
cx: e.x,
|
|
@@ -2194,7 +2216,7 @@ var en = {
|
|
|
2194
2216
|
"fill-opacity": t.dotOpacity ?? t.opacity ?? c.lineOpacity,
|
|
2195
2217
|
stroke: t.dotStroke ?? "none",
|
|
2196
2218
|
style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
2197
|
-
}, null, 12,
|
|
2219
|
+
}, null, 12, xn))), 128)) : i("", !0)
|
|
2198
2220
|
], 64))), 128)),
|
|
2199
2221
|
(_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
|
|
2200
2222
|
o("path", {
|
|
@@ -2202,7 +2224,7 @@ var en = {
|
|
|
2202
2224
|
fill: t.color ?? (t.seriesIndex == null ? "#999" : E.value[t.seriesIndex]?.color ?? "currentColor"),
|
|
2203
2225
|
"fill-opacity": t.opacity ?? .15,
|
|
2204
2226
|
stroke: "none"
|
|
2205
|
-
}, null, 8,
|
|
2227
|
+
}, null, 8, Sn),
|
|
2206
2228
|
t.seriesIndex == null ? i("", !0) : (_(), a("path", {
|
|
2207
2229
|
key: 0,
|
|
2208
2230
|
d: me(t, !1),
|
|
@@ -2210,53 +2232,53 @@ var en = {
|
|
|
2210
2232
|
stroke: t.color ?? E.value[t.seriesIndex]?.color ?? "currentColor",
|
|
2211
2233
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2212
2234
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2213
|
-
}, null, 8,
|
|
2235
|
+
}, null, 8, Cn)),
|
|
2214
2236
|
t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
|
|
2215
|
-
x1: x(
|
|
2216
|
-
y1: x(
|
|
2217
|
-
x2: x(
|
|
2218
|
-
y2: x(
|
|
2237
|
+
x1: x(P)(M(t, "start")),
|
|
2238
|
+
y1: x(V).top,
|
|
2239
|
+
x2: x(P)(M(t, "start")),
|
|
2240
|
+
y2: x(V).top + x(G),
|
|
2219
2241
|
stroke: t.color ?? "#999",
|
|
2220
2242
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2221
2243
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2222
|
-
}, null, 8,
|
|
2223
|
-
x1: x(
|
|
2224
|
-
y1: x(
|
|
2225
|
-
x2: x(
|
|
2226
|
-
y2: x(
|
|
2244
|
+
}, null, 8, wn), o("line", {
|
|
2245
|
+
x1: x(P)(M(t, "end")),
|
|
2246
|
+
y1: x(V).top,
|
|
2247
|
+
x2: x(P)(M(t, "end")),
|
|
2248
|
+
y2: x(V).top + x(G),
|
|
2227
2249
|
stroke: t.color ?? "#999",
|
|
2228
2250
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2229
2251
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2230
|
-
}, null, 8,
|
|
2252
|
+
}, null, 8, Tn)], 64)) : i("", !0),
|
|
2231
2253
|
o("line", {
|
|
2232
|
-
x1: x(
|
|
2233
|
-
y1: x(
|
|
2234
|
-
x2: x(
|
|
2235
|
-
y2: x(
|
|
2254
|
+
x1: x(P)(M(t, "start")),
|
|
2255
|
+
y1: x(V).top + x(G) - 4,
|
|
2256
|
+
x2: x(P)(M(t, "start")),
|
|
2257
|
+
y2: x(V).top + x(G) + 4,
|
|
2236
2258
|
stroke: "currentColor",
|
|
2237
2259
|
"stroke-opacity": "0.4"
|
|
2238
|
-
}, null, 8,
|
|
2260
|
+
}, null, 8, En),
|
|
2239
2261
|
o("line", {
|
|
2240
|
-
x1: x(
|
|
2241
|
-
y1: x(
|
|
2242
|
-
x2: x(
|
|
2243
|
-
y2: x(
|
|
2262
|
+
x1: x(P)(M(t, "end")),
|
|
2263
|
+
y1: x(V).top + x(G) - 4,
|
|
2264
|
+
x2: x(P)(M(t, "end")),
|
|
2265
|
+
y2: x(V).top + x(G) + 4,
|
|
2244
2266
|
stroke: "currentColor",
|
|
2245
2267
|
"stroke-opacity": "0.4"
|
|
2246
|
-
}, null, 8,
|
|
2268
|
+
}, null, 8, Dn)
|
|
2247
2269
|
], 64))), 128)),
|
|
2248
|
-
|
|
2270
|
+
De.value && x(Re) !== null ? (_(), a("line", {
|
|
2249
2271
|
key: 6,
|
|
2250
|
-
x1: x(
|
|
2251
|
-
y1: x(
|
|
2252
|
-
x2: x(
|
|
2253
|
-
y2: x(
|
|
2272
|
+
x1: x(P)(ke.value),
|
|
2273
|
+
y1: x(V).top,
|
|
2274
|
+
x2: x(P)(ke.value),
|
|
2275
|
+
y2: x(V).top + x(G),
|
|
2254
2276
|
stroke: "currentColor",
|
|
2255
2277
|
"stroke-opacity": "0.3",
|
|
2256
2278
|
"stroke-dasharray": "4 2",
|
|
2257
2279
|
"pointer-events": "none"
|
|
2258
|
-
}, null, 8,
|
|
2259
|
-
(_(!0), a(e, null, y(
|
|
2280
|
+
}, null, 8, On)) : i("", !0),
|
|
2281
|
+
(_(!0), a(e, null, y(je.value, (e, t) => (_(), a("circle", {
|
|
2260
2282
|
key: "hd" + t,
|
|
2261
2283
|
cx: e.x,
|
|
2262
2284
|
cy: e.y,
|
|
@@ -2265,167 +2287,167 @@ var en = {
|
|
|
2265
2287
|
stroke: "var(--color-bg-0, #fff)",
|
|
2266
2288
|
"stroke-width": "2",
|
|
2267
2289
|
"pointer-events": "none"
|
|
2268
|
-
}, null, 8,
|
|
2269
|
-
|
|
2290
|
+
}, null, 8, kn))), 128)),
|
|
2291
|
+
De.value ? (_(), a("rect", d({
|
|
2270
2292
|
key: 7,
|
|
2271
|
-
x: x(
|
|
2272
|
-
y: x(
|
|
2273
|
-
width: x(
|
|
2274
|
-
height: x(
|
|
2293
|
+
x: x(V).left,
|
|
2294
|
+
y: x(V).top,
|
|
2295
|
+
width: x(W),
|
|
2296
|
+
height: x(G),
|
|
2275
2297
|
fill: "transparent",
|
|
2276
2298
|
style: {
|
|
2277
2299
|
cursor: "crosshair",
|
|
2278
2300
|
"touch-action": "pan-y"
|
|
2279
2301
|
}
|
|
2280
|
-
}, ne(x(
|
|
2281
|
-
c.annotations && c.annotations.length > 0 ? (_(), r(x(
|
|
2302
|
+
}, ne(x(Be), !0)), null, 16, An)) : i("", !0),
|
|
2303
|
+
c.annotations && c.annotations.length > 0 ? (_(), r(x(xt), {
|
|
2282
2304
|
key: 8,
|
|
2283
2305
|
annotations: c.annotations,
|
|
2284
|
-
project:
|
|
2285
|
-
bounds: x(
|
|
2306
|
+
project: Ne,
|
|
2307
|
+
bounds: x(Le)
|
|
2286
2308
|
}, null, 8, ["annotations", "bounds"])) : i("", !0),
|
|
2287
2309
|
(_(!0), a(e, null, y(he.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
|
|
2288
2310
|
o("circle", {
|
|
2289
2311
|
cx: e.cx - e.textWidth / 2 - 2,
|
|
2290
|
-
cy:
|
|
2312
|
+
cy: N.value + e.row * Ln + 4,
|
|
2291
2313
|
r: "4",
|
|
2292
2314
|
fill: e.color,
|
|
2293
2315
|
"fill-opacity": e.fillOpacity,
|
|
2294
2316
|
stroke: e.color,
|
|
2295
2317
|
"stroke-width": "1.5"
|
|
2296
|
-
}, null, 8,
|
|
2318
|
+
}, null, 8, jn),
|
|
2297
2319
|
e.labelText ? (_(), a("text", {
|
|
2298
2320
|
key: 0,
|
|
2299
2321
|
x: e.cx - e.textWidth / 2 + 8,
|
|
2300
|
-
y:
|
|
2322
|
+
y: N.value + e.row * Ln + 8,
|
|
2301
2323
|
"font-size": e.labelStyle.fontSize,
|
|
2302
2324
|
"font-weight": e.labelStyle.fontWeight,
|
|
2303
2325
|
fill: e.labelStyle.fill
|
|
2304
|
-
}, b(e.labelText), 9,
|
|
2326
|
+
}, b(e.labelText), 9, Mn)) : i("", !0),
|
|
2305
2327
|
e.descText ? (_(), a("text", {
|
|
2306
2328
|
key: 1,
|
|
2307
2329
|
x: e.cx - e.textWidth / 2 + 8,
|
|
2308
|
-
y:
|
|
2330
|
+
y: N.value + e.row * Ln + 22,
|
|
2309
2331
|
"font-size": e.descStyle.fontSize,
|
|
2310
2332
|
"font-weight": e.descStyle.fontWeight,
|
|
2311
2333
|
fill: e.descStyle.fill,
|
|
2312
2334
|
"fill-opacity": e.descStyle.fillOpacity
|
|
2313
|
-
}, b(e.descText), 9,
|
|
2335
|
+
}, b(e.descText), 9, Nn)) : i("", !0)
|
|
2314
2336
|
]))), 128))
|
|
2315
|
-
], 8,
|
|
2316
|
-
|
|
2337
|
+
], 8, nn)),
|
|
2338
|
+
De.value && x(Re) !== null && Me.value ? (_(), a("div", {
|
|
2317
2339
|
key: 1,
|
|
2318
2340
|
ref_key: "tooltipRef",
|
|
2319
|
-
ref:
|
|
2341
|
+
ref: ze,
|
|
2320
2342
|
class: "chart-tooltip-content",
|
|
2321
2343
|
style: h({
|
|
2322
2344
|
position: "absolute",
|
|
2323
2345
|
top: "0",
|
|
2324
2346
|
left: "0",
|
|
2325
2347
|
willChange: "transform",
|
|
2326
|
-
transform: x(
|
|
2327
|
-
visibility: x(
|
|
2348
|
+
transform: x(K) ? `translate3d(${x(K).left}px, ${x(K).top}px, 0) translateY(-50%)` : "translateY(-50%)",
|
|
2349
|
+
visibility: x(K) ? "visible" : "hidden"
|
|
2328
2350
|
})
|
|
2329
|
-
}, [te(n.$slots, "tooltip", m(u(
|
|
2351
|
+
}, [te(n.$slots, "tooltip", m(u(Me.value)), () => [o("div", Pn, [Me.value.xLabel ? (_(), a("div", Fn, b(Me.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(Me.value.values, (e) => (_(), a("div", {
|
|
2330
2352
|
key: e.seriesIndex,
|
|
2331
2353
|
class: "line-chart-tooltip-row"
|
|
2332
2354
|
}, [o("span", {
|
|
2333
2355
|
class: "line-chart-tooltip-swatch",
|
|
2334
2356
|
style: h({ background: e.color })
|
|
2335
2357
|
}, null, 4), s(" " + b(isFinite(e.value) ? x(ie)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
2336
|
-
x(
|
|
2358
|
+
x(He) ? (_(), a("a", {
|
|
2337
2359
|
key: 2,
|
|
2338
2360
|
class: "line-chart-download-link",
|
|
2339
|
-
href: x(
|
|
2340
|
-
download: `${x(
|
|
2341
|
-
}, b(x(
|
|
2342
|
-
x(
|
|
2361
|
+
href: x(Ue),
|
|
2362
|
+
download: `${x(Ke)()}.csv`
|
|
2363
|
+
}, b(x(He)), 9, In)) : i("", !0),
|
|
2364
|
+
x(We) ? (_(), a("button", {
|
|
2343
2365
|
key: 3,
|
|
2344
2366
|
type: "button",
|
|
2345
2367
|
class: "line-chart-download-button",
|
|
2346
|
-
onClick: l[0] ||= (...e) => x(
|
|
2347
|
-
}, b(x(
|
|
2368
|
+
onClick: l[0] ||= (...e) => x(Ge) && x(Ge)(...e)
|
|
2369
|
+
}, b(x(We)), 1)) : i("", !0)
|
|
2348
2370
|
], 16)], 8, ["to", "disabled"]));
|
|
2349
2371
|
}
|
|
2350
|
-
}), [["__scopeId", "data-v-
|
|
2372
|
+
}), [["__scopeId", "data-v-a11696bb"]]), Hn = {
|
|
2351
2373
|
class: "chart-sr-only",
|
|
2352
2374
|
"aria-live": "polite"
|
|
2353
|
-
},
|
|
2375
|
+
}, Un = [
|
|
2354
2376
|
"width",
|
|
2355
2377
|
"height",
|
|
2356
2378
|
"role",
|
|
2357
2379
|
"aria-label"
|
|
2358
|
-
],
|
|
2380
|
+
], Wn = [
|
|
2359
2381
|
"x",
|
|
2360
2382
|
"y",
|
|
2361
2383
|
"text-anchor",
|
|
2362
2384
|
"font-size",
|
|
2363
2385
|
"font-weight",
|
|
2364
2386
|
"fill"
|
|
2365
|
-
],
|
|
2387
|
+
], Gn = ["x", "dy"], Kn = [
|
|
2366
2388
|
"data-testid",
|
|
2367
2389
|
"x",
|
|
2368
2390
|
"y",
|
|
2369
2391
|
"text-anchor",
|
|
2370
2392
|
"font-size",
|
|
2371
2393
|
"fill"
|
|
2372
|
-
],
|
|
2394
|
+
], qn = { key: 1 }, Jn = [
|
|
2373
2395
|
"x",
|
|
2374
2396
|
"y",
|
|
2375
2397
|
"fill"
|
|
2376
|
-
],
|
|
2398
|
+
], Yn = [
|
|
2377
2399
|
"x1",
|
|
2378
2400
|
"y1",
|
|
2379
2401
|
"x2",
|
|
2380
2402
|
"y2",
|
|
2381
2403
|
"stroke",
|
|
2382
2404
|
"stroke-dasharray"
|
|
2383
|
-
],
|
|
2405
|
+
], Xn = [
|
|
2384
2406
|
"x",
|
|
2385
2407
|
"y",
|
|
2386
2408
|
"font-size",
|
|
2387
2409
|
"fill",
|
|
2388
2410
|
"font-weight"
|
|
2389
|
-
],
|
|
2411
|
+
], Zn = [
|
|
2390
2412
|
"x1",
|
|
2391
2413
|
"y1",
|
|
2392
2414
|
"x2",
|
|
2393
2415
|
"y2"
|
|
2394
|
-
],
|
|
2416
|
+
], Qn = [
|
|
2395
2417
|
"x1",
|
|
2396
2418
|
"y1",
|
|
2397
2419
|
"x2",
|
|
2398
2420
|
"y2"
|
|
2399
|
-
],
|
|
2421
|
+
], $n = [
|
|
2400
2422
|
"x1",
|
|
2401
2423
|
"y1",
|
|
2402
2424
|
"x2",
|
|
2403
2425
|
"y2"
|
|
2404
|
-
],
|
|
2426
|
+
], er = [
|
|
2405
2427
|
"x",
|
|
2406
2428
|
"y",
|
|
2407
2429
|
"width",
|
|
2408
2430
|
"height"
|
|
2409
|
-
],
|
|
2431
|
+
], tr = [
|
|
2410
2432
|
"x",
|
|
2411
2433
|
"y",
|
|
2412
2434
|
"font-size",
|
|
2413
2435
|
"fill",
|
|
2414
2436
|
"font-weight",
|
|
2415
2437
|
"fill-opacity"
|
|
2416
|
-
],
|
|
2438
|
+
], nr = [
|
|
2417
2439
|
"x",
|
|
2418
2440
|
"y",
|
|
2419
2441
|
"font-size",
|
|
2420
2442
|
"fill",
|
|
2421
2443
|
"font-weight",
|
|
2422
2444
|
"fill-opacity"
|
|
2423
|
-
],
|
|
2445
|
+
], rr = [
|
|
2424
2446
|
"transform",
|
|
2425
2447
|
"font-size",
|
|
2426
2448
|
"fill",
|
|
2427
2449
|
"font-weight"
|
|
2428
|
-
],
|
|
2450
|
+
], ir = [
|
|
2429
2451
|
"x",
|
|
2430
2452
|
"y",
|
|
2431
2453
|
"text-anchor",
|
|
@@ -2433,7 +2455,7 @@ var en = {
|
|
|
2433
2455
|
"fill",
|
|
2434
2456
|
"font-weight",
|
|
2435
2457
|
"fill-opacity"
|
|
2436
|
-
],
|
|
2458
|
+
], ar = [
|
|
2437
2459
|
"x",
|
|
2438
2460
|
"y",
|
|
2439
2461
|
"text-anchor",
|
|
@@ -2441,13 +2463,13 @@ var en = {
|
|
|
2441
2463
|
"fill",
|
|
2442
2464
|
"font-weight",
|
|
2443
2465
|
"fill-opacity"
|
|
2444
|
-
],
|
|
2466
|
+
], or = [
|
|
2445
2467
|
"x",
|
|
2446
2468
|
"y",
|
|
2447
2469
|
"font-size",
|
|
2448
2470
|
"fill",
|
|
2449
2471
|
"font-weight"
|
|
2450
|
-
],
|
|
2472
|
+
], sr = [
|
|
2451
2473
|
"data-category",
|
|
2452
2474
|
"data-series",
|
|
2453
2475
|
"x",
|
|
@@ -2456,34 +2478,34 @@ var en = {
|
|
|
2456
2478
|
"height",
|
|
2457
2479
|
"fill",
|
|
2458
2480
|
"fill-opacity"
|
|
2459
|
-
],
|
|
2481
|
+
], cr = [
|
|
2460
2482
|
"x",
|
|
2461
2483
|
"y",
|
|
2462
2484
|
"text-anchor",
|
|
2463
2485
|
"font-size",
|
|
2464
2486
|
"font-weight",
|
|
2465
2487
|
"fill"
|
|
2466
|
-
],
|
|
2488
|
+
], lr = [
|
|
2467
2489
|
"d",
|
|
2468
2490
|
"stroke",
|
|
2469
2491
|
"stroke-width",
|
|
2470
2492
|
"stroke-opacity",
|
|
2471
2493
|
"stroke-dasharray"
|
|
2472
|
-
],
|
|
2494
|
+
], ur = [
|
|
2473
2495
|
"cx",
|
|
2474
2496
|
"cy",
|
|
2475
2497
|
"r",
|
|
2476
2498
|
"fill",
|
|
2477
2499
|
"fill-opacity"
|
|
2478
|
-
],
|
|
2500
|
+
], dr = [
|
|
2479
2501
|
"x",
|
|
2480
2502
|
"y",
|
|
2481
2503
|
"width",
|
|
2482
2504
|
"height"
|
|
2483
|
-
],
|
|
2505
|
+
], fr = { class: "bar-chart-tooltip" }, pr = {
|
|
2484
2506
|
key: 0,
|
|
2485
2507
|
class: "bar-chart-tooltip-label"
|
|
2486
|
-
},
|
|
2508
|
+
}, $ = ["href", "download"], mr = 22, hr = 2, gr = 11, _r = .6, vr = 4, yr = 4, br = /* @__PURE__ */ N(/* @__PURE__ */ l({
|
|
2487
2509
|
inheritAttrs: !1,
|
|
2488
2510
|
__name: "BarChart",
|
|
2489
2511
|
props: {
|
|
@@ -2532,7 +2554,7 @@ var en = {
|
|
|
2532
2554
|
},
|
|
2533
2555
|
tooltipData: {},
|
|
2534
2556
|
tooltipTrigger: {},
|
|
2535
|
-
tooltipClamp: { default: "
|
|
2557
|
+
tooltipClamp: { default: "window" },
|
|
2536
2558
|
tooltipValueFormat: {},
|
|
2537
2559
|
csv: {},
|
|
2538
2560
|
filename: {},
|
|
@@ -2573,9 +2595,9 @@ var en = {
|
|
|
2573
2595
|
return t;
|
|
2574
2596
|
}), w = n(() => {
|
|
2575
2597
|
let e = f.categories;
|
|
2576
|
-
if (!e || e.length === 0 || !
|
|
2598
|
+
if (!e || e.length === 0 || !Wt(e, "utc")) return null;
|
|
2577
2599
|
let t = Array(e.length);
|
|
2578
|
-
for (let n = 0; n < e.length; n++) t[n] =
|
|
2600
|
+
for (let n = 0; n < e.length; n++) t[n] = Ht(e[n], "utc") ?? NaN;
|
|
2579
2601
|
return t;
|
|
2580
2602
|
}), T = n(() => f.orientation === "vertical"), E = n(() => {
|
|
2581
2603
|
let e = Infinity, t = -Infinity, n = Infinity, r = (e) => {
|
|
@@ -2599,13 +2621,13 @@ var en = {
|
|
|
2599
2621
|
isFinite(e) || (e = 0), isFinite(t) || (t = 0);
|
|
2600
2622
|
let i = f.valueMin ?? 0;
|
|
2601
2623
|
f.valueScaleType === "log" ? i > 0 && i < e && (e = i) : i < e && (e = i);
|
|
2602
|
-
let a =
|
|
2624
|
+
let a = Te(e, t, f.valueScaleType, n);
|
|
2603
2625
|
return {
|
|
2604
2626
|
min: a.min,
|
|
2605
2627
|
max: a.max,
|
|
2606
2628
|
range: a.max - a.min || 1
|
|
2607
2629
|
};
|
|
2608
|
-
}), oe = n(() => T.value ?
|
|
2630
|
+
}), oe = n(() => T.value ? V.value : H.value), D = n(() => T.value ? H.value : V.value), O = n(() => {
|
|
2609
2631
|
let e = ie.value;
|
|
2610
2632
|
return e > 0 ? oe.value / e : 0;
|
|
2611
2633
|
}), k = n(() => O.value * (1 - f.barPadding)), se = n(() => {
|
|
@@ -2616,15 +2638,15 @@ var en = {
|
|
|
2616
2638
|
return Math.max(1, (k.value - t) / e);
|
|
2617
2639
|
});
|
|
2618
2640
|
function ce(e) {
|
|
2619
|
-
return (T.value ?
|
|
2641
|
+
return (T.value ? B.value.left : B.value.top) + e * O.value;
|
|
2620
2642
|
}
|
|
2621
2643
|
let le = n(() => {
|
|
2622
2644
|
let { min: e, max: t } = E.value, n = f.valueMin ?? 0;
|
|
2623
2645
|
return A(Math.max(e, Math.min(t, n)));
|
|
2624
2646
|
});
|
|
2625
2647
|
function A(e) {
|
|
2626
|
-
let { min: t, max: n } = E.value, r =
|
|
2627
|
-
return T.value ?
|
|
2648
|
+
let { min: t, max: n } = E.value, r = we(e, t, n, f.valueScaleType);
|
|
2649
|
+
return T.value ? B.value.top + H.value - r * H.value : B.value.left + r * V.value;
|
|
2628
2650
|
}
|
|
2629
2651
|
function ue(e, t, n, r, i, a, o, s, c, l) {
|
|
2630
2652
|
let u = Math.min(e, t), d = Math.abs(e - t);
|
|
@@ -2664,17 +2686,17 @@ var en = {
|
|
|
2664
2686
|
let n = t[c], l = Number(n.data[i] ?? NaN);
|
|
2665
2687
|
if (!isFinite(l)) continue;
|
|
2666
2688
|
let u = l >= 0 ? o : s, d = u + l;
|
|
2667
|
-
e.push(ue(A(u), A(d), r, a, n.color ??
|
|
2689
|
+
e.push(ue(A(u), A(d), r, a, n.color ?? _e(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
|
|
2668
2690
|
}
|
|
2669
2691
|
} else if (f.layout === "overlay") for (let o = 0; o < n; o++) {
|
|
2670
2692
|
let n = t[o], s = Number(n.data[i] ?? NaN);
|
|
2671
|
-
isFinite(s) && e.push(ue(c, A(s), r, a, n.color ??
|
|
2693
|
+
isFinite(s) && e.push(ue(c, A(s), r, a, n.color ?? _e(o), n.opacity ?? 1, n.blendMode, s, i, o));
|
|
2672
2694
|
}
|
|
2673
2695
|
else for (let a = 0; a < n; a++) {
|
|
2674
2696
|
let s = t[a], l = Number(s.data[i] ?? NaN);
|
|
2675
2697
|
if (!isFinite(l)) continue;
|
|
2676
2698
|
let u = r + (n === 1 ? 0 : a * (o + f.groupGap));
|
|
2677
|
-
e.push(ue(c, A(l), u, o, s.color ??
|
|
2699
|
+
e.push(ue(c, A(l), u, o, s.color ?? _e(a), s.opacity ?? 1, s.blendMode, l, i, a));
|
|
2678
2700
|
}
|
|
2679
2701
|
}
|
|
2680
2702
|
return e;
|
|
@@ -2691,12 +2713,12 @@ var en = {
|
|
|
2691
2713
|
};
|
|
2692
2714
|
}
|
|
2693
2715
|
function fe(e, t, n) {
|
|
2694
|
-
let r = (T.value ?
|
|
2716
|
+
let r = (T.value ? B.value.left : B.value.top) + (e + .5) * O.value, i = n.max - n.min || 1, a = (t - n.min) / i;
|
|
2695
2717
|
return T.value ? {
|
|
2696
2718
|
x: r,
|
|
2697
|
-
y:
|
|
2719
|
+
y: B.value.top + H.value - a * H.value
|
|
2698
2720
|
} : {
|
|
2699
|
-
x:
|
|
2721
|
+
x: B.value.left + a * V.value,
|
|
2700
2722
|
y: r
|
|
2701
2723
|
};
|
|
2702
2724
|
}
|
|
@@ -2749,36 +2771,36 @@ var en = {
|
|
|
2749
2771
|
"var(--color-info, #6366f1)",
|
|
2750
2772
|
"var(--color-warning, #d97706)"
|
|
2751
2773
|
];
|
|
2752
|
-
function
|
|
2774
|
+
function _e(e) {
|
|
2753
2775
|
return ge[e % ge.length];
|
|
2754
2776
|
}
|
|
2755
|
-
let
|
|
2756
|
-
let { min: e, max: t } = E.value, n = (e) => f.valueTickFormat === void 0 ?
|
|
2777
|
+
let ve = Tt(() => f.tooltipValueFormat, () => f.valueTickFormat), N = n(() => {
|
|
2778
|
+
let { min: e, max: t } = E.value, n = (e) => f.valueTickFormat === void 0 ? Ce(e) : ae(e, f.valueTickFormat);
|
|
2757
2779
|
if (e === t) return [{
|
|
2758
2780
|
value: n(e),
|
|
2759
|
-
pos:
|
|
2781
|
+
pos: P(A(e))
|
|
2760
2782
|
}];
|
|
2761
2783
|
let r = T.value ? 50 : 80;
|
|
2762
|
-
return (f.valueScaleType === "log" ?
|
|
2784
|
+
return (f.valueScaleType === "log" ? I({
|
|
2763
2785
|
min: e,
|
|
2764
2786
|
max: t,
|
|
2765
2787
|
ticks: f.valueTicks
|
|
2766
|
-
}) :
|
|
2788
|
+
}) : F({
|
|
2767
2789
|
min: e,
|
|
2768
2790
|
max: t,
|
|
2769
2791
|
ticks: f.valueTicks,
|
|
2770
2792
|
targetTickCount: D.value / r
|
|
2771
2793
|
})).map((e) => ({
|
|
2772
2794
|
value: n(e),
|
|
2773
|
-
pos:
|
|
2795
|
+
pos: P(A(e))
|
|
2774
2796
|
}));
|
|
2775
|
-
}),
|
|
2797
|
+
}), be = n(() => {
|
|
2776
2798
|
let e = ie.value, t = w.value;
|
|
2777
2799
|
if (t && t.length > 0) {
|
|
2778
2800
|
let e = Infinity, n = -Infinity;
|
|
2779
2801
|
for (let r of t) Number.isFinite(r) && (r < e && (e = r), r > n && (n = r));
|
|
2780
2802
|
if (!Number.isFinite(e) || e === n) return [];
|
|
2781
|
-
let r = T.value ?
|
|
2803
|
+
let r = T.value ? V.value : H.value, i = Math.max(2, Math.floor(r / 80)), a = Jt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
|
|
2782
2804
|
for (let e of a.values) {
|
|
2783
2805
|
let n = -1, r = Infinity;
|
|
2784
2806
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -2787,7 +2809,7 @@ var en = {
|
|
|
2787
2809
|
}
|
|
2788
2810
|
if (n < 0 || c.has(n)) continue;
|
|
2789
2811
|
c.add(n);
|
|
2790
|
-
let i = ce(n) + O.value / 2, a = f.categoryFormat ? f.categoryFormat(C.value[n], n) :
|
|
2812
|
+
let i = ce(n) + O.value / 2, a = f.categoryFormat ? f.categoryFormat(C.value[n], n) : en(t[n], f.dateFormat, "utc", o);
|
|
2791
2813
|
s.push({
|
|
2792
2814
|
label: a,
|
|
2793
2815
|
pos: i,
|
|
@@ -2808,12 +2830,12 @@ var en = {
|
|
|
2808
2830
|
});
|
|
2809
2831
|
}
|
|
2810
2832
|
return n;
|
|
2811
|
-
}),
|
|
2833
|
+
}), xe = n(() => {
|
|
2812
2834
|
let e = [];
|
|
2813
2835
|
return S.value.forEach((t, n) => {
|
|
2814
2836
|
!t.legend || t.showInLegend === !1 || e.push({
|
|
2815
2837
|
label: t.legend,
|
|
2816
|
-
color: t.color ??
|
|
2838
|
+
color: t.color ?? _e(n),
|
|
2817
2839
|
kind: "bar"
|
|
2818
2840
|
});
|
|
2819
2841
|
}), pe.value.forEach((t) => {
|
|
@@ -2824,20 +2846,20 @@ var en = {
|
|
|
2824
2846
|
dashed: t.dashed
|
|
2825
2847
|
});
|
|
2826
2848
|
}), e;
|
|
2827
|
-
}),
|
|
2828
|
-
function
|
|
2849
|
+
}), Se = n(() => xe.value.map((e) => e.label));
|
|
2850
|
+
function Ee() {
|
|
2829
2851
|
if (typeof f.csv == "function") return f.csv();
|
|
2830
2852
|
if (typeof f.csv == "string") return f.csv;
|
|
2831
2853
|
let e = S.value.map((e) => ({
|
|
2832
2854
|
label: e.legend,
|
|
2833
2855
|
data: e.data
|
|
2834
2856
|
}));
|
|
2835
|
-
return
|
|
2857
|
+
return $e(C.value, e);
|
|
2836
2858
|
}
|
|
2837
|
-
let
|
|
2838
|
-
function
|
|
2859
|
+
let De = n(() => !!f.tooltipData || !!f.tooltipTrigger);
|
|
2860
|
+
function R(e, t) {
|
|
2839
2861
|
if (!isFinite(e) || !isFinite(t) || O.value === 0) return null;
|
|
2840
|
-
let n = (T.value ?
|
|
2862
|
+
let n = (T.value ? B.value.left : B.value.top) + (e + .5) * O.value, r = A(t);
|
|
2841
2863
|
return T.value ? {
|
|
2842
2864
|
x: n,
|
|
2843
2865
|
y: r
|
|
@@ -2846,16 +2868,16 @@ var en = {
|
|
|
2846
2868
|
y: n
|
|
2847
2869
|
};
|
|
2848
2870
|
}
|
|
2849
|
-
function
|
|
2850
|
-
let n =
|
|
2871
|
+
function ke(e, t) {
|
|
2872
|
+
let n = Me.value?.getBoundingClientRect();
|
|
2851
2873
|
if (!n) return null;
|
|
2852
2874
|
let r = ie.value;
|
|
2853
2875
|
if (r === 0 || O.value === 0) return null;
|
|
2854
|
-
let i = T.value ? e - n.left -
|
|
2876
|
+
let i = T.value ? e - n.left - B.value.left : t - n.top - B.value.top;
|
|
2855
2877
|
return Math.max(0, Math.min(r - 1, Math.floor(i / O.value)));
|
|
2856
2878
|
}
|
|
2857
|
-
let
|
|
2858
|
-
let e =
|
|
2879
|
+
let Ae = n(() => !!(f.categoryHeader || f.valueHeader)), je = n(() => {
|
|
2880
|
+
let e = Ae.value ? mr : 0, t = f.chartPadding;
|
|
2859
2881
|
return e ? t == null ? { top: e } : typeof t == "number" ? {
|
|
2860
2882
|
top: t + e,
|
|
2861
2883
|
right: t,
|
|
@@ -2865,7 +2887,7 @@ var en = {
|
|
|
2865
2887
|
...t,
|
|
2866
2888
|
top: (t.top ?? 0) + e
|
|
2867
2889
|
} : t;
|
|
2868
|
-
}), { containerRef:
|
|
2890
|
+
}), { containerRef: Me, svgRef: Ne, width: Pe, height: z, padding: B, legendY: Fe, inlineLegendLayout: Ie, innerW: V, innerH: H, bounds: U, hoverIndex: W, tooltipRef: G, tooltipPos: Le, tooltipHandlers: Re, menuItems: ze, downloadLinkText: K, csvHref: Be, downloadButtonText: Ve, triggerCsvDownload: He, menuFilename: Ue, isFullscreen: We, fullscreenStyle: Ge, teleportTarget: Ke, exitFullscreen: qe } = wt({
|
|
2869
2891
|
width: () => f.width,
|
|
2870
2892
|
height: () => f.height,
|
|
2871
2893
|
title: () => f.title,
|
|
@@ -2880,18 +2902,18 @@ var en = {
|
|
|
2880
2902
|
downloadLink: () => f.downloadLink,
|
|
2881
2903
|
downloadButton: () => f.downloadButton,
|
|
2882
2904
|
fullscreenTarget: () => f.fullscreenTarget,
|
|
2883
|
-
chartPadding: () =>
|
|
2884
|
-
inlineLegendLabels: () =>
|
|
2885
|
-
hasTooltipSlot: () =>
|
|
2886
|
-
getCsv:
|
|
2887
|
-
pointerToIndex:
|
|
2905
|
+
chartPadding: () => je.value,
|
|
2906
|
+
inlineLegendLabels: () => Se.value,
|
|
2907
|
+
hasTooltipSlot: () => De.value,
|
|
2908
|
+
getCsv: Ee,
|
|
2909
|
+
pointerToIndex: ke,
|
|
2888
2910
|
scrubAxis: () => T.value ? "x" : "y",
|
|
2889
2911
|
onHover: (e) => ee("hover", e)
|
|
2890
|
-
}),
|
|
2912
|
+
}), q = n(() => Oe(f.axisLabelStyle, { fontSize: 13 })), J = n(() => Oe(f.tickLabelStyle, {
|
|
2891
2913
|
fontSize: 10,
|
|
2892
|
-
fillOpacity:
|
|
2893
|
-
})),
|
|
2894
|
-
let e = f.titleStyle, t = e?.align ?? "left", n =
|
|
2914
|
+
fillOpacity: L
|
|
2915
|
+
})), Je = n(() => Oe(f.legendStyle, { fontSize: 11 })), Ye = n(() => f.categoryAlign === "start" && !T.value ? hr : B.value.left), Y = n(() => {
|
|
2916
|
+
let e = f.titleStyle, t = e?.align ?? "left", n = U.value, r = t === "left" ? Ye.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
2895
2917
|
return {
|
|
2896
2918
|
lines: (f.title ?? "").split("\n"),
|
|
2897
2919
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -2901,20 +2923,20 @@ var en = {
|
|
|
2901
2923
|
x: r,
|
|
2902
2924
|
anchor: i
|
|
2903
2925
|
};
|
|
2904
|
-
}),
|
|
2905
|
-
let e =
|
|
2926
|
+
}), Xe = n(() => {
|
|
2927
|
+
let e = W.value;
|
|
2906
2928
|
if (e === null) return;
|
|
2907
2929
|
let t = w.value;
|
|
2908
|
-
return t && Number.isFinite(t[e]) ?
|
|
2909
|
-
}),
|
|
2910
|
-
let e =
|
|
2930
|
+
return t && Number.isFinite(t[e]) ? en(t[e], f.dateFormat, "utc") : C.value[e];
|
|
2931
|
+
}), Ze = n(() => {
|
|
2932
|
+
let e = W.value;
|
|
2911
2933
|
if (e === null) return null;
|
|
2912
2934
|
let t = S.value, n = [];
|
|
2913
2935
|
for (let r = 0; r < t.length; r++) {
|
|
2914
2936
|
let i = t[r];
|
|
2915
2937
|
i.showInTooltip !== !1 && n.push({
|
|
2916
2938
|
value: Number(i.data[e] ?? NaN),
|
|
2917
|
-
color: i.color ??
|
|
2939
|
+
color: i.color ?? _e(r),
|
|
2918
2940
|
seriesIndex: r
|
|
2919
2941
|
});
|
|
2920
2942
|
}
|
|
@@ -2924,24 +2946,24 @@ var en = {
|
|
|
2924
2946
|
values: n,
|
|
2925
2947
|
data: f.tooltipData?.[e] ?? null
|
|
2926
2948
|
};
|
|
2927
|
-
}),
|
|
2928
|
-
let e =
|
|
2949
|
+
}), Qe = n(() => {
|
|
2950
|
+
let e = W.value;
|
|
2929
2951
|
if (e === null) return null;
|
|
2930
2952
|
let t = ce(e);
|
|
2931
2953
|
return T.value ? {
|
|
2932
2954
|
x: t,
|
|
2933
|
-
y:
|
|
2955
|
+
y: B.value.top,
|
|
2934
2956
|
w: O.value,
|
|
2935
|
-
h:
|
|
2957
|
+
h: H.value
|
|
2936
2958
|
} : {
|
|
2937
|
-
x:
|
|
2959
|
+
x: B.value.left,
|
|
2938
2960
|
y: t,
|
|
2939
|
-
w:
|
|
2961
|
+
w: V.value,
|
|
2940
2962
|
h: O.value
|
|
2941
2963
|
};
|
|
2942
|
-
}),
|
|
2943
|
-
let e =
|
|
2944
|
-
return
|
|
2964
|
+
}), et = n(() => {
|
|
2965
|
+
let e = Ie.value.positions, t = Ye.value, n = Fe.value;
|
|
2966
|
+
return xe.value.map((r, i) => {
|
|
2945
2967
|
let a = e[i];
|
|
2946
2968
|
return {
|
|
2947
2969
|
...r,
|
|
@@ -2949,7 +2971,7 @@ var en = {
|
|
|
2949
2971
|
y: n + a.row * 20
|
|
2950
2972
|
};
|
|
2951
2973
|
});
|
|
2952
|
-
}),
|
|
2974
|
+
}), tt = n(() => {
|
|
2953
2975
|
let e = f.barLabels;
|
|
2954
2976
|
if (!e) return null;
|
|
2955
2977
|
let t = e === !0 ? {} : e;
|
|
@@ -2960,37 +2982,37 @@ var en = {
|
|
|
2960
2982
|
align: t.align ?? "center",
|
|
2961
2983
|
overlap: t.overlap ?? "shift",
|
|
2962
2984
|
minSize: t.minSize ?? 0,
|
|
2963
|
-
fontSize: t.fontSize ??
|
|
2985
|
+
fontSize: t.fontSize ?? gr,
|
|
2964
2986
|
fontWeight: t.fontWeight
|
|
2965
2987
|
};
|
|
2966
2988
|
});
|
|
2967
|
-
function
|
|
2968
|
-
let n =
|
|
2969
|
-
return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ?
|
|
2989
|
+
function nt(e, t) {
|
|
2990
|
+
let n = tt.value?.format;
|
|
2991
|
+
return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? Ce(e) : ae(e, f.valueTickFormat) : ae(e, n);
|
|
2970
2992
|
}
|
|
2971
|
-
function
|
|
2993
|
+
function rt(e, t, n) {
|
|
2972
2994
|
for (let r = j.value.length - 1; r >= 0; r--) {
|
|
2973
2995
|
let i = j.value[r];
|
|
2974
2996
|
if (i.categoryIndex === e && t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.color;
|
|
2975
2997
|
}
|
|
2976
2998
|
return null;
|
|
2977
2999
|
}
|
|
2978
|
-
let
|
|
2979
|
-
let e =
|
|
3000
|
+
let it = n(() => {
|
|
3001
|
+
let e = tt.value;
|
|
2980
3002
|
if (!e) return [];
|
|
2981
3003
|
let t = T.value, n = e.fontSize, r = [];
|
|
2982
3004
|
for (let i of j.value) {
|
|
2983
|
-
let a =
|
|
3005
|
+
let a = nt(i.value, {
|
|
2984
3006
|
value: i.value,
|
|
2985
3007
|
categoryIndex: i.categoryIndex,
|
|
2986
3008
|
seriesIndex: i.seriesIndex,
|
|
2987
3009
|
category: C.value[i.categoryIndex] ?? String(i.categoryIndex)
|
|
2988
3010
|
});
|
|
2989
3011
|
if (!a) continue;
|
|
2990
|
-
let o = t ? i.h : i.w, s = a.length * n *
|
|
2991
|
-
if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m +
|
|
2992
|
-
else if (e.align === "start") u = h +
|
|
2993
|
-
else if (e.align === "end") d = m -
|
|
3012
|
+
let o = t ? i.h : i.w, s = a.length * n * _r, c = o >= s + 2 * vr && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
|
|
3013
|
+
if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + vr, d = u + g, p = "start";
|
|
3014
|
+
else if (e.align === "start") u = h + vr, d = u + g, p = "start";
|
|
3015
|
+
else if (e.align === "end") d = m - vr, u = d - g, p = "end";
|
|
2994
3016
|
else {
|
|
2995
3017
|
let e = (m + h) / 2;
|
|
2996
3018
|
u = e - g / 2, d = e + g / 2, p = "middle";
|
|
@@ -3007,7 +3029,7 @@ var en = {
|
|
|
3007
3029
|
hidden: !1
|
|
3008
3030
|
});
|
|
3009
3031
|
}
|
|
3010
|
-
let i = t ? -
|
|
3032
|
+
let i = t ? -B.value.top : Pe.value - 2, a = /* @__PURE__ */ new Map();
|
|
3011
3033
|
for (let e of r) {
|
|
3012
3034
|
let t = a.get(e.bar.categoryIndex);
|
|
3013
3035
|
t ? t.push(e) : a.set(e.bar.categoryIndex, [e]);
|
|
@@ -3016,12 +3038,12 @@ var en = {
|
|
|
3016
3038
|
t.sort((e, t) => e.lo - t.lo);
|
|
3017
3039
|
let n = -Infinity;
|
|
3018
3040
|
for (let r of t) {
|
|
3019
|
-
if (r.lo < n +
|
|
3041
|
+
if (r.lo < n + yr) {
|
|
3020
3042
|
if (e.overlap === "hide") {
|
|
3021
3043
|
r.hidden = !0;
|
|
3022
3044
|
continue;
|
|
3023
3045
|
}
|
|
3024
|
-
let t = n +
|
|
3046
|
+
let t = n + yr - r.lo;
|
|
3025
3047
|
r.lo += t, r.hi += t, r.inside = !1, r.svgAnchor = "start";
|
|
3026
3048
|
}
|
|
3027
3049
|
if (r.hi > i) {
|
|
@@ -3038,10 +3060,10 @@ var en = {
|
|
|
3038
3060
|
t ? (r = i.cross, a = -((i.lo + i.hi) / 2), c = "middle") : (c = i.svgAnchor, r = c === "start" ? i.lo : c === "end" ? i.hi : (i.lo + i.hi) / 2, a = i.cross);
|
|
3039
3061
|
let l;
|
|
3040
3062
|
if (!o) l = e.color;
|
|
3041
|
-
else if (i.inside) l =
|
|
3063
|
+
else if (i.inside) l = jt(i.bar.color);
|
|
3042
3064
|
else {
|
|
3043
|
-
let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r =
|
|
3044
|
-
l = r ?
|
|
3065
|
+
let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = rt(i.bar.categoryIndex, e, n);
|
|
3066
|
+
l = r ? jt(r) : "currentColor";
|
|
3045
3067
|
}
|
|
3046
3068
|
s.push({
|
|
3047
3069
|
key: `${i.bar.categoryIndex}-${i.bar.seriesIndex}`,
|
|
@@ -3055,36 +3077,36 @@ var en = {
|
|
|
3055
3077
|
});
|
|
3056
3078
|
}
|
|
3057
3079
|
return s;
|
|
3058
|
-
}),
|
|
3059
|
-
let e =
|
|
3080
|
+
}), at = n(() => {
|
|
3081
|
+
let e = B.value.left - 6;
|
|
3060
3082
|
switch (f.categoryAlign ?? "end") {
|
|
3061
3083
|
case "start": return {
|
|
3062
3084
|
anchor: "start",
|
|
3063
|
-
x:
|
|
3085
|
+
x: hr
|
|
3064
3086
|
};
|
|
3065
3087
|
case "center": return {
|
|
3066
3088
|
anchor: "middle",
|
|
3067
|
-
x: (
|
|
3089
|
+
x: (hr + e) / 2
|
|
3068
3090
|
};
|
|
3069
3091
|
default: return {
|
|
3070
3092
|
anchor: "end",
|
|
3071
3093
|
x: e
|
|
3072
3094
|
};
|
|
3073
3095
|
}
|
|
3074
|
-
}),
|
|
3075
|
-
let e = [], t =
|
|
3096
|
+
}), ot = n(() => {
|
|
3097
|
+
let e = [], t = B.value.top - 7;
|
|
3076
3098
|
if (f.valueHeader && e.push({
|
|
3077
3099
|
key: "vh",
|
|
3078
3100
|
text: f.valueHeader,
|
|
3079
|
-
x:
|
|
3101
|
+
x: B.value.left,
|
|
3080
3102
|
y: t,
|
|
3081
3103
|
anchor: "start"
|
|
3082
3104
|
}), f.categoryHeader) {
|
|
3083
|
-
let n = !T.value, r =
|
|
3105
|
+
let n = !T.value, r = at.value;
|
|
3084
3106
|
e.push({
|
|
3085
3107
|
key: "ch",
|
|
3086
3108
|
text: f.categoryHeader,
|
|
3087
|
-
x: n ? r.x :
|
|
3109
|
+
x: n ? r.x : B.value.left,
|
|
3088
3110
|
y: t,
|
|
3089
3111
|
anchor: n ? r.anchor : "start"
|
|
3090
3112
|
});
|
|
@@ -3092,65 +3114,65 @@ var en = {
|
|
|
3092
3114
|
return e;
|
|
3093
3115
|
});
|
|
3094
3116
|
return (n, l) => (_(), r(t, {
|
|
3095
|
-
to: x(
|
|
3096
|
-
disabled: !x(
|
|
3117
|
+
to: x(Ke),
|
|
3118
|
+
disabled: !x(We)
|
|
3097
3119
|
}, [o("div", d({
|
|
3098
3120
|
ref_key: "containerRef",
|
|
3099
|
-
ref:
|
|
3121
|
+
ref: Me
|
|
3100
3122
|
}, n.$attrs, {
|
|
3101
|
-
class: ["bar-chart-wrapper", { "is-fullscreen": x(
|
|
3102
|
-
style: x(
|
|
3123
|
+
class: ["bar-chart-wrapper", { "is-fullscreen": x(We) }],
|
|
3124
|
+
style: x(Ge)
|
|
3103
3125
|
}), [
|
|
3104
|
-
c.menu ? (_(), r(
|
|
3126
|
+
c.menu ? (_(), r(ye, {
|
|
3105
3127
|
key: 0,
|
|
3106
|
-
items: x(
|
|
3107
|
-
"is-fullscreen": x(
|
|
3108
|
-
onClose: x(
|
|
3128
|
+
items: x(ze),
|
|
3129
|
+
"is-fullscreen": x(We),
|
|
3130
|
+
onClose: x(qe)
|
|
3109
3131
|
}, null, 8, [
|
|
3110
3132
|
"items",
|
|
3111
3133
|
"is-fullscreen",
|
|
3112
3134
|
"onClose"
|
|
3113
3135
|
])) : i("", !0),
|
|
3114
|
-
o("div",
|
|
3136
|
+
o("div", Hn, b(x(We) ? "Chart expanded to fill window" : ""), 1),
|
|
3115
3137
|
(_(), a("svg", {
|
|
3116
3138
|
ref_key: "svgRef",
|
|
3117
|
-
ref:
|
|
3118
|
-
width: x(
|
|
3119
|
-
height: x(
|
|
3139
|
+
ref: Ne,
|
|
3140
|
+
width: x(Pe),
|
|
3141
|
+
height: x(z),
|
|
3120
3142
|
role: g.value || void 0,
|
|
3121
3143
|
"aria-label": p.value || void 0
|
|
3122
3144
|
}, [
|
|
3123
3145
|
c.title ? (_(), a("text", {
|
|
3124
3146
|
key: 0,
|
|
3125
|
-
x:
|
|
3126
|
-
y:
|
|
3127
|
-
"text-anchor":
|
|
3128
|
-
"font-size":
|
|
3129
|
-
"font-weight":
|
|
3130
|
-
fill:
|
|
3131
|
-
}, [(_(!0), a(e, null, y(
|
|
3147
|
+
x: Y.value.x,
|
|
3148
|
+
y: Y.value.lineHeight,
|
|
3149
|
+
"text-anchor": Y.value.anchor,
|
|
3150
|
+
"font-size": Y.value.fontSize,
|
|
3151
|
+
"font-weight": Y.value.fontWeight,
|
|
3152
|
+
fill: Y.value.color
|
|
3153
|
+
}, [(_(!0), a(e, null, y(Y.value.lines, (e, t) => (_(), a("tspan", {
|
|
3132
3154
|
key: t,
|
|
3133
|
-
x:
|
|
3134
|
-
dy: t === 0 ? 0 :
|
|
3135
|
-
}, b(e), 9,
|
|
3136
|
-
(_(!0), a(e, null, y(
|
|
3155
|
+
x: Y.value.x,
|
|
3156
|
+
dy: t === 0 ? 0 : Y.value.lineHeight
|
|
3157
|
+
}, b(e), 9, Gn))), 128))], 8, Wn)) : i("", !0),
|
|
3158
|
+
(_(!0), a(e, null, y(ot.value, (e) => (_(), a("text", {
|
|
3137
3159
|
key: e.key,
|
|
3138
3160
|
"data-testid": e.key === "ch" ? "category-header" : "value-header",
|
|
3139
3161
|
x: e.x,
|
|
3140
3162
|
y: e.y,
|
|
3141
3163
|
"text-anchor": e.anchor,
|
|
3142
|
-
"font-size":
|
|
3143
|
-
fill:
|
|
3164
|
+
"font-size": q.value.fontSize,
|
|
3165
|
+
fill: q.value.fill,
|
|
3144
3166
|
"font-weight": "600"
|
|
3145
|
-
}, b(e.text), 9,
|
|
3146
|
-
|
|
3167
|
+
}, b(e.text), 9, Kn))), 128)),
|
|
3168
|
+
et.value.length > 0 ? (_(), a("g", qn, [(_(!0), a(e, null, y(et.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
|
|
3147
3169
|
key: 0,
|
|
3148
3170
|
x: t.x,
|
|
3149
3171
|
y: t.y - 5,
|
|
3150
3172
|
width: "12",
|
|
3151
3173
|
height: "10",
|
|
3152
3174
|
fill: t.color
|
|
3153
|
-
}, null, 8,
|
|
3175
|
+
}, null, 8, Jn)) : (_(), a("line", {
|
|
3154
3176
|
key: 1,
|
|
3155
3177
|
x1: t.x,
|
|
3156
3178
|
y1: t.y,
|
|
@@ -3159,113 +3181,113 @@ var en = {
|
|
|
3159
3181
|
stroke: t.color,
|
|
3160
3182
|
"stroke-width": "2",
|
|
3161
3183
|
"stroke-dasharray": t.dashed ? "4 2" : void 0
|
|
3162
|
-
}, null, 8,
|
|
3184
|
+
}, null, 8, Yn)), o("text", {
|
|
3163
3185
|
x: t.x + 18,
|
|
3164
3186
|
y: t.y + 4,
|
|
3165
|
-
"font-size":
|
|
3166
|
-
fill:
|
|
3167
|
-
"font-weight":
|
|
3168
|
-
}, b(t.label), 9,
|
|
3187
|
+
"font-size": Je.value.fontSize,
|
|
3188
|
+
fill: Je.value.fill,
|
|
3189
|
+
"font-weight": Je.value.fontWeight
|
|
3190
|
+
}, b(t.label), 9, Xn)], 64))), 128))])) : i("", !0),
|
|
3169
3191
|
!T.value || c.valueAxis ? (_(), a("line", {
|
|
3170
3192
|
key: 2,
|
|
3171
|
-
x1: x(
|
|
3172
|
-
y1: x(
|
|
3173
|
-
x2: x(
|
|
3174
|
-
y2: x(
|
|
3193
|
+
x1: x(P)(x(B).left),
|
|
3194
|
+
y1: x(P)(x(B).top),
|
|
3195
|
+
x2: x(P)(x(B).left),
|
|
3196
|
+
y2: x(P)(x(B).top + x(H)),
|
|
3175
3197
|
stroke: "currentColor",
|
|
3176
3198
|
"stroke-opacity": "0.3"
|
|
3177
|
-
}, null, 8,
|
|
3199
|
+
}, null, 8, Zn)) : i("", !0),
|
|
3178
3200
|
T.value || c.valueAxis ? (_(), a("line", {
|
|
3179
3201
|
key: 3,
|
|
3180
|
-
x1: x(
|
|
3181
|
-
y1: x(
|
|
3182
|
-
x2: x(
|
|
3183
|
-
y2: x(
|
|
3202
|
+
x1: x(P)(x(B).left),
|
|
3203
|
+
y1: x(P)(x(B).top + x(H)),
|
|
3204
|
+
x2: x(P)(x(B).left + x(V)),
|
|
3205
|
+
y2: x(P)(x(B).top + x(H)),
|
|
3184
3206
|
stroke: "currentColor",
|
|
3185
3207
|
"stroke-opacity": "0.3"
|
|
3186
|
-
}, null, 8,
|
|
3187
|
-
c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(
|
|
3208
|
+
}, null, 8, Qn)) : i("", !0),
|
|
3209
|
+
c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(N.value, (e, t) => (_(), a("line", {
|
|
3188
3210
|
key: "vg" + t,
|
|
3189
|
-
x1: T.value ? x(
|
|
3190
|
-
y1: T.value ? e.pos : x(
|
|
3191
|
-
x2: T.value ? x(
|
|
3192
|
-
y2: T.value ? e.pos : x(
|
|
3211
|
+
x1: T.value ? x(B).left : e.pos,
|
|
3212
|
+
y1: T.value ? e.pos : x(B).top,
|
|
3213
|
+
x2: T.value ? x(B).left + x(V) : e.pos,
|
|
3214
|
+
y2: T.value ? e.pos : x(B).top + x(H),
|
|
3193
3215
|
stroke: "currentColor",
|
|
3194
3216
|
"stroke-opacity": "0.1"
|
|
3195
|
-
}, null, 8,
|
|
3196
|
-
|
|
3217
|
+
}, null, 8, $n))), 128)) : i("", !0),
|
|
3218
|
+
Qe.value && De.value ? (_(), a("rect", {
|
|
3197
3219
|
key: 5,
|
|
3198
|
-
x:
|
|
3199
|
-
y:
|
|
3200
|
-
width:
|
|
3201
|
-
height:
|
|
3220
|
+
x: Qe.value.x,
|
|
3221
|
+
y: Qe.value.y,
|
|
3222
|
+
width: Qe.value.w,
|
|
3223
|
+
height: Qe.value.h,
|
|
3202
3224
|
fill: "currentColor",
|
|
3203
3225
|
"fill-opacity": "0.06",
|
|
3204
3226
|
"pointer-events": "none"
|
|
3205
|
-
}, null, 8,
|
|
3206
|
-
c.valueAxis && T.value ? (_(!0), a(e, { key: 6 }, y(
|
|
3227
|
+
}, null, 8, er)) : i("", !0),
|
|
3228
|
+
c.valueAxis && T.value ? (_(!0), a(e, { key: 6 }, y(N.value, (e, t) => (_(), a("text", {
|
|
3207
3229
|
key: "vt" + t,
|
|
3208
3230
|
"data-testid": "value-tick",
|
|
3209
|
-
x: x(
|
|
3231
|
+
x: x(B).left - 6,
|
|
3210
3232
|
y: e.pos,
|
|
3211
3233
|
"text-anchor": "end",
|
|
3212
3234
|
"dominant-baseline": "middle",
|
|
3213
|
-
"font-size":
|
|
3214
|
-
fill:
|
|
3215
|
-
"font-weight":
|
|
3216
|
-
"fill-opacity":
|
|
3217
|
-
}, b(e.value), 9,
|
|
3235
|
+
"font-size": J.value.fontSize,
|
|
3236
|
+
fill: J.value.fill,
|
|
3237
|
+
"font-weight": J.value.fontWeight,
|
|
3238
|
+
"fill-opacity": J.value.fillOpacity
|
|
3239
|
+
}, b(e.value), 9, tr))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(N.value, (e, t) => (_(), a("text", {
|
|
3218
3240
|
key: "vt" + t,
|
|
3219
3241
|
"data-testid": "value-tick",
|
|
3220
3242
|
x: e.pos,
|
|
3221
|
-
y: x(
|
|
3243
|
+
y: x(B).top + x(H) + 16,
|
|
3222
3244
|
"text-anchor": "middle",
|
|
3223
|
-
"font-size":
|
|
3224
|
-
fill:
|
|
3225
|
-
"font-weight":
|
|
3226
|
-
"fill-opacity":
|
|
3227
|
-
}, b(e.value), 9,
|
|
3245
|
+
"font-size": J.value.fontSize,
|
|
3246
|
+
fill: J.value.fill,
|
|
3247
|
+
"font-weight": J.value.fontWeight,
|
|
3248
|
+
"fill-opacity": J.value.fillOpacity
|
|
3249
|
+
}, b(e.value), 9, nr))), 128)) : i("", !0),
|
|
3228
3250
|
c.yLabel ? (_(), a("text", {
|
|
3229
3251
|
key: 8,
|
|
3230
3252
|
x: 0,
|
|
3231
3253
|
y: 0,
|
|
3232
|
-
transform: `translate(14, ${x(
|
|
3254
|
+
transform: `translate(14, ${x(B).top + x(H) / 2}) rotate(-90)`,
|
|
3233
3255
|
"text-anchor": "middle",
|
|
3234
|
-
"font-size":
|
|
3235
|
-
fill:
|
|
3236
|
-
"font-weight":
|
|
3237
|
-
}, b(c.yLabel), 9,
|
|
3238
|
-
T.value ? (_(!0), a(e, { key: 9 }, y(
|
|
3256
|
+
"font-size": q.value.fontSize,
|
|
3257
|
+
fill: q.value.fill,
|
|
3258
|
+
"font-weight": q.value.fontWeight
|
|
3259
|
+
}, b(c.yLabel), 9, rr)) : i("", !0),
|
|
3260
|
+
T.value ? (_(!0), a(e, { key: 9 }, y(be.value, (e, t) => (_(), a("text", {
|
|
3239
3261
|
key: "ct" + t,
|
|
3240
3262
|
"data-testid": "category-tick",
|
|
3241
3263
|
x: e.pos,
|
|
3242
|
-
y: x(
|
|
3264
|
+
y: x(B).top + x(H) + 16,
|
|
3243
3265
|
"text-anchor": e.anchor,
|
|
3244
|
-
"font-size":
|
|
3245
|
-
fill:
|
|
3246
|
-
"font-weight":
|
|
3247
|
-
"fill-opacity":
|
|
3248
|
-
}, b(e.label), 9,
|
|
3266
|
+
"font-size": J.value.fontSize,
|
|
3267
|
+
fill: J.value.fill,
|
|
3268
|
+
"font-weight": J.value.fontWeight,
|
|
3269
|
+
"fill-opacity": J.value.fillOpacity
|
|
3270
|
+
}, b(e.label), 9, ir))), 128)) : (_(!0), a(e, { key: 10 }, y(be.value, (e, t) => (_(), a("text", {
|
|
3249
3271
|
key: "ct" + t,
|
|
3250
3272
|
"data-testid": "category-tick",
|
|
3251
|
-
x:
|
|
3273
|
+
x: at.value.x,
|
|
3252
3274
|
y: e.pos,
|
|
3253
|
-
"text-anchor":
|
|
3275
|
+
"text-anchor": at.value.anchor,
|
|
3254
3276
|
"dominant-baseline": "middle",
|
|
3255
|
-
"font-size":
|
|
3256
|
-
fill:
|
|
3257
|
-
"font-weight":
|
|
3258
|
-
"fill-opacity":
|
|
3259
|
-
}, b(e.label), 9,
|
|
3277
|
+
"font-size": J.value.fontSize,
|
|
3278
|
+
fill: J.value.fill,
|
|
3279
|
+
"font-weight": J.value.fontWeight,
|
|
3280
|
+
"fill-opacity": J.value.fillOpacity
|
|
3281
|
+
}, b(e.label), 9, ar))), 128)),
|
|
3260
3282
|
c.xLabel ? (_(), a("text", {
|
|
3261
3283
|
key: 11,
|
|
3262
|
-
x: x(
|
|
3263
|
-
y: x(
|
|
3284
|
+
x: x(B).left + x(V) / 2,
|
|
3285
|
+
y: x(z) - 4,
|
|
3264
3286
|
"text-anchor": "middle",
|
|
3265
|
-
"font-size":
|
|
3266
|
-
fill:
|
|
3267
|
-
"font-weight":
|
|
3268
|
-
}, b(c.xLabel), 9,
|
|
3287
|
+
"font-size": q.value.fontSize,
|
|
3288
|
+
fill: q.value.fill,
|
|
3289
|
+
"font-weight": q.value.fontWeight
|
|
3290
|
+
}, b(c.xLabel), 9, or)) : i("", !0),
|
|
3269
3291
|
(_(!0), a(e, null, y(j.value, (e, t) => (_(), a("rect", {
|
|
3270
3292
|
key: "bar" + t,
|
|
3271
3293
|
"data-testid": "bar",
|
|
@@ -3278,8 +3300,8 @@ var en = {
|
|
|
3278
3300
|
fill: e.color,
|
|
3279
3301
|
"fill-opacity": e.opacity,
|
|
3280
3302
|
style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
|
|
3281
|
-
}, null, 12,
|
|
3282
|
-
(_(!0), a(e, null, y(
|
|
3303
|
+
}, null, 12, sr))), 128)),
|
|
3304
|
+
(_(!0), a(e, null, y(it.value, (e) => (_(), a("text", {
|
|
3283
3305
|
key: "blbl" + e.key,
|
|
3284
3306
|
"data-testid": "bar-label",
|
|
3285
3307
|
x: e.x,
|
|
@@ -3290,7 +3312,7 @@ var en = {
|
|
|
3290
3312
|
"font-weight": e.fontWeight,
|
|
3291
3313
|
fill: e.fill,
|
|
3292
3314
|
"pointer-events": "none"
|
|
3293
|
-
}, b(e.text), 9,
|
|
3315
|
+
}, b(e.text), 9, cr))), 128)),
|
|
3294
3316
|
(_(!0), a(e, null, y(M.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
|
|
3295
3317
|
key: 0,
|
|
3296
3318
|
"data-testid": "summary-line",
|
|
@@ -3303,7 +3325,7 @@ var en = {
|
|
|
3303
3325
|
"stroke-linecap": "round",
|
|
3304
3326
|
"stroke-linejoin": "round",
|
|
3305
3327
|
style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
3306
|
-
}, null, 12,
|
|
3328
|
+
}, null, 12, lr)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
|
|
3307
3329
|
key: "sld" + n + "-" + r,
|
|
3308
3330
|
cx: e.x,
|
|
3309
3331
|
cy: e.y,
|
|
@@ -3311,71 +3333,71 @@ var en = {
|
|
|
3311
3333
|
fill: t.color,
|
|
3312
3334
|
"fill-opacity": t.opacity,
|
|
3313
3335
|
style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
3314
|
-
}, null, 12,
|
|
3315
|
-
|
|
3336
|
+
}, null, 12, ur))), 128)) : i("", !0)], 64))), 128)),
|
|
3337
|
+
De.value ? (_(), a("rect", d({
|
|
3316
3338
|
key: 12,
|
|
3317
|
-
x: x(
|
|
3318
|
-
y: x(
|
|
3319
|
-
width: x(
|
|
3320
|
-
height: x(
|
|
3339
|
+
x: x(B).left,
|
|
3340
|
+
y: x(B).top,
|
|
3341
|
+
width: x(V),
|
|
3342
|
+
height: x(H),
|
|
3321
3343
|
fill: "transparent",
|
|
3322
3344
|
style: `cursor: crosshair; touch-action: ${T.value ? "pan-y" : "pan-x"}`
|
|
3323
|
-
}, ne(x(
|
|
3324
|
-
c.annotations && c.annotations.length > 0 ? (_(), r(x(
|
|
3345
|
+
}, ne(x(Re), !0)), null, 16, dr)) : i("", !0),
|
|
3346
|
+
c.annotations && c.annotations.length > 0 ? (_(), r(x(xt), {
|
|
3325
3347
|
key: 13,
|
|
3326
3348
|
annotations: c.annotations,
|
|
3327
|
-
project:
|
|
3328
|
-
bounds: x(
|
|
3349
|
+
project: R,
|
|
3350
|
+
bounds: x(U)
|
|
3329
3351
|
}, null, 8, ["annotations", "bounds"])) : i("", !0)
|
|
3330
|
-
], 8,
|
|
3331
|
-
|
|
3352
|
+
], 8, Un)),
|
|
3353
|
+
De.value && x(W) !== null && Ze.value ? (_(), a("div", {
|
|
3332
3354
|
key: 1,
|
|
3333
3355
|
ref_key: "tooltipRef",
|
|
3334
|
-
ref:
|
|
3356
|
+
ref: G,
|
|
3335
3357
|
class: "chart-tooltip-content",
|
|
3336
3358
|
style: h({
|
|
3337
3359
|
position: "absolute",
|
|
3338
3360
|
top: "0",
|
|
3339
3361
|
left: "0",
|
|
3340
3362
|
willChange: "transform",
|
|
3341
|
-
transform: x(
|
|
3342
|
-
visibility: x(
|
|
3363
|
+
transform: x(Le) ? `translate3d(${x(Le).left}px, ${x(Le).top}px, 0) translateY(-50%)` : "translateY(-50%)",
|
|
3364
|
+
visibility: x(Le) ? "visible" : "hidden"
|
|
3343
3365
|
})
|
|
3344
|
-
}, [te(n.$slots, "tooltip", m(u(
|
|
3366
|
+
}, [te(n.$slots, "tooltip", m(u(Ze.value)), () => [o("div", fr, [Xe.value ? (_(), a("div", pr, b(Xe.value), 1)) : i("", !0), (_(!0), a(e, null, y(Ze.value.values, (e) => (_(), a("div", {
|
|
3345
3367
|
key: e.seriesIndex,
|
|
3346
3368
|
class: "bar-chart-tooltip-row"
|
|
3347
3369
|
}, [o("span", {
|
|
3348
3370
|
class: "bar-chart-tooltip-swatch",
|
|
3349
3371
|
style: h({ background: e.color })
|
|
3350
|
-
}, null, 4), s(" " + b(isFinite(e.value) ? x(
|
|
3351
|
-
x(
|
|
3372
|
+
}, null, 4), s(" " + b(isFinite(e.value) ? x(ve)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
3373
|
+
x(K) ? (_(), a("a", {
|
|
3352
3374
|
key: 2,
|
|
3353
3375
|
class: "bar-chart-download-link",
|
|
3354
|
-
href: x(
|
|
3355
|
-
download: `${x(
|
|
3356
|
-
}, b(x(
|
|
3357
|
-
x(
|
|
3376
|
+
href: x(Be),
|
|
3377
|
+
download: `${x(Ue)()}.csv`
|
|
3378
|
+
}, b(x(K)), 9, $)) : i("", !0),
|
|
3379
|
+
x(Ve) ? (_(), a("button", {
|
|
3358
3380
|
key: 3,
|
|
3359
3381
|
type: "button",
|
|
3360
3382
|
class: "bar-chart-download-button",
|
|
3361
|
-
onClick: l[0] ||= (...e) => x(
|
|
3362
|
-
}, b(x(
|
|
3383
|
+
onClick: l[0] ||= (...e) => x(He) && x(He)(...e)
|
|
3384
|
+
}, b(x(Ve)), 1)) : i("", !0)
|
|
3363
3385
|
], 16)], 8, ["to", "disabled"]));
|
|
3364
3386
|
}
|
|
3365
|
-
}), [["__scopeId", "data-v-
|
|
3387
|
+
}), [["__scopeId", "data-v-32872fa4"]]);
|
|
3366
3388
|
//#endregion
|
|
3367
3389
|
//#region src/ChoroplethMap/canvasLayer.ts
|
|
3368
|
-
function
|
|
3390
|
+
function xr(e, t) {
|
|
3369
3391
|
let n = t.dpr * t.meetScale * t.zoom.k;
|
|
3370
3392
|
e.setTransform(n, 0, 0, n, t.dpr * (t.offsetX + t.meetScale * t.zoom.x), t.dpr * (t.offsetY + t.meetScale * t.zoom.y));
|
|
3371
3393
|
}
|
|
3372
|
-
function
|
|
3394
|
+
function Sr(e) {
|
|
3373
3395
|
return (t) => t / (e.meetScale * e.zoom.k || 1);
|
|
3374
3396
|
}
|
|
3375
|
-
function
|
|
3397
|
+
function Cr(e, t, n) {
|
|
3376
3398
|
n === "dashed" ? (e.setLineDash([t(8), t(4)]), e.lineCap = "butt") : n === "dotted" ? (e.setLineDash([0, t(5)]), e.lineCap = "round") : (e.setLineDash([]), e.lineCap = "butt");
|
|
3377
3399
|
}
|
|
3378
|
-
function
|
|
3400
|
+
function wr(e, t, n, r) {
|
|
3379
3401
|
let i = [], a = /* @__PURE__ */ new Map(), o = new Path2D(), s = 0;
|
|
3380
3402
|
for (let r of e) {
|
|
3381
3403
|
let e = t(r);
|
|
@@ -3394,47 +3416,47 @@ function Cr(e, t, n, r) {
|
|
|
3394
3416
|
borders: r ? new Path2D(r) : null
|
|
3395
3417
|
};
|
|
3396
3418
|
}
|
|
3397
|
-
function
|
|
3419
|
+
function Tr(e, t, n, r, i, a) {
|
|
3398
3420
|
let o = t.indexById.get(i);
|
|
3399
3421
|
if (o == null) return;
|
|
3400
3422
|
let s = t.items[o];
|
|
3401
|
-
e.fillStyle = s.fill, e.fill(s.path), e.strokeStyle = a?.stroke ?? r.highlightStroke, e.lineWidth = n(a?.strokeWidth ?? r.strokeWidth + 1),
|
|
3423
|
+
e.fillStyle = s.fill, e.fill(s.path), e.strokeStyle = a?.stroke ?? r.highlightStroke, e.lineWidth = n(a?.strokeWidth ?? r.strokeWidth + 1), Cr(e, n, a?.style), e.stroke(s.path);
|
|
3402
3424
|
}
|
|
3403
|
-
function
|
|
3404
|
-
e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, e.canvas.width, e.canvas.height),
|
|
3425
|
+
function Er(e, t) {
|
|
3426
|
+
e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, e.canvas.width, e.canvas.height), xr(e, t), e.lineJoin = "round", e.setLineDash([]);
|
|
3405
3427
|
}
|
|
3406
|
-
function
|
|
3428
|
+
function Dr(e, t, n, r) {
|
|
3407
3429
|
let i = Math.min(r, t.items.length);
|
|
3408
3430
|
for (let r = n; r < i; r++) e.fillStyle = t.items[r].fill, e.fill(t.items[r].path);
|
|
3409
3431
|
return i;
|
|
3410
3432
|
}
|
|
3411
|
-
function
|
|
3412
|
-
let i =
|
|
3433
|
+
function Or(e, t, n, r) {
|
|
3434
|
+
let i = Sr(n);
|
|
3413
3435
|
if (e.setLineDash([]), e.lineWidth = i(r.strokeWidth), e.strokeStyle = r.strokeColor, t.outlines) e.stroke(t.outlines);
|
|
3414
3436
|
else for (let n of t.items) e.stroke(n.path);
|
|
3415
3437
|
t.borders && (e.lineWidth = i(1), e.stroke(t.borders));
|
|
3416
|
-
for (let [n, a] of r.focused)
|
|
3417
|
-
for (let t of r.overlays) e.strokeStyle = t.stroke, e.lineWidth = i(t.strokeWidth ?? r.strokeWidth + 1.5),
|
|
3438
|
+
for (let [n, a] of r.focused) Tr(e, t, i, r, n, a);
|
|
3439
|
+
for (let t of r.overlays) e.strokeStyle = t.stroke, e.lineWidth = i(t.strokeWidth ?? r.strokeWidth + 1.5), Cr(e, i, t.style), e.stroke(t.path);
|
|
3418
3440
|
e.setLineDash([]);
|
|
3419
3441
|
}
|
|
3420
|
-
function
|
|
3421
|
-
!i || r.focused.has(i) || (
|
|
3442
|
+
function kr(e, t, n, r, i) {
|
|
3443
|
+
!i || r.focused.has(i) || (xr(e, n), e.lineJoin = "round", Tr(e, t, Sr(n), r, i), e.setLineDash([]), e.setTransform(1, 0, 0, 1, 0, 0));
|
|
3422
3444
|
}
|
|
3423
|
-
function
|
|
3424
|
-
|
|
3445
|
+
function Ar(e, t, n, r) {
|
|
3446
|
+
Er(e, n), Dr(e, t, 0, t.items.length), Or(e, t, n, r);
|
|
3425
3447
|
}
|
|
3426
|
-
function
|
|
3448
|
+
function jr(e) {
|
|
3427
3449
|
let t = e + 1;
|
|
3428
3450
|
return `rgb(${t >> 16 & 255},${t >> 8 & 255},${t & 255})`;
|
|
3429
3451
|
}
|
|
3430
|
-
function
|
|
3452
|
+
function Mr(e, t, n, r) {
|
|
3431
3453
|
r.width = Math.max(1, Math.round(t)), r.height = Math.max(1, Math.round(n));
|
|
3432
3454
|
let i = r.getContext("2d", { willReadFrequently: !0 });
|
|
3433
3455
|
return i ? (i.imageSmoothingEnabled = !1, i.setTransform(1, 0, 0, 1, 0, 0), i.clearRect(0, 0, r.width, r.height), e.items.forEach((e, t) => {
|
|
3434
|
-
i.fillStyle =
|
|
3456
|
+
i.fillStyle = jr(t), i.fill(e.path);
|
|
3435
3457
|
}), i) : null;
|
|
3436
3458
|
}
|
|
3437
|
-
function
|
|
3459
|
+
function Nr(e, t, n, r) {
|
|
3438
3460
|
let i = Math.round(n), a = Math.round(r);
|
|
3439
3461
|
if (i < 0 || a < 0 || i >= e.canvas.width || a >= e.canvas.height) return null;
|
|
3440
3462
|
let o = e.getImageData(i, a, 1, 1).data;
|
|
@@ -3448,7 +3470,7 @@ function Mr(e, t, n, r) {
|
|
|
3448
3470
|
}
|
|
3449
3471
|
//#endregion
|
|
3450
3472
|
//#region src/ChoroplethMap/ChoroplethTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
3451
|
-
var
|
|
3473
|
+
var Pr = {
|
|
3452
3474
|
ref: "root",
|
|
3453
3475
|
class: "chart-tooltip-content",
|
|
3454
3476
|
style: {
|
|
@@ -3461,7 +3483,7 @@ var Nr = {
|
|
|
3461
3483
|
"pointer-events": "none",
|
|
3462
3484
|
transform: "translateY(-50%)"
|
|
3463
3485
|
}
|
|
3464
|
-
},
|
|
3486
|
+
}, Fr = /* @__PURE__ */ N(/* @__PURE__ */ l({
|
|
3465
3487
|
__name: "ChoroplethTooltip",
|
|
3466
3488
|
props: { mode: { default: "float" } },
|
|
3467
3489
|
setup(n, { expose: s }) {
|
|
@@ -3476,27 +3498,150 @@ var Nr = {
|
|
|
3476
3498
|
getEl() {
|
|
3477
3499
|
return u.value;
|
|
3478
3500
|
}
|
|
3479
|
-
}), (s, u) => (_(), a(e, null, [(_(), r(t, { to: "body" }, [o("div",
|
|
3501
|
+
}), (s, u) => (_(), a(e, null, [(_(), r(t, { to: "body" }, [o("div", Pr, [c.value && n.mode === "float" ? te(s.$slots, "default", m(d({ key: 0 }, c.value)), void 0, !0) : i("", !0)], 512)])), n.mode === "sheet" ? (_(), a("div", {
|
|
3480
3502
|
key: 0,
|
|
3481
3503
|
class: p(["chart-tooltip-sheet", { "is-open": l.value }])
|
|
3482
3504
|
}, [c.value ? te(s.$slots, "default", m(d({ key: 0 }, c.value)), void 0, !0) : i("", !0)], 2)) : i("", !0)], 64));
|
|
3483
3505
|
}
|
|
3484
|
-
}), [["__scopeId", "data-v-90392830"]]),
|
|
3506
|
+
}), [["__scopeId", "data-v-90392830"]]), Ir = {
|
|
3507
|
+
k: 1,
|
|
3508
|
+
x: 0,
|
|
3509
|
+
y: 0
|
|
3510
|
+
}, Lr = .56, Rr = 1.15;
|
|
3511
|
+
function zr(e, t) {
|
|
3512
|
+
return e.length * Lr * t;
|
|
3513
|
+
}
|
|
3514
|
+
function Br(e) {
|
|
3515
|
+
return Math.round(e * 100) / 100;
|
|
3516
|
+
}
|
|
3517
|
+
function Vr(e, t) {
|
|
3518
|
+
return !(e.x1 <= t.x0 || e.x0 >= t.x1 || e.y1 <= t.y0 || e.y0 >= t.y1);
|
|
3519
|
+
}
|
|
3520
|
+
function Hr(e, t, n) {
|
|
3521
|
+
return e.x0 >= 0 && e.y0 >= 0 && e.x1 <= t && e.y1 <= n;
|
|
3522
|
+
}
|
|
3523
|
+
function Ur(e, t, n, r, i) {
|
|
3524
|
+
let a = t - r / 2, o = t + r / 2;
|
|
3525
|
+
return i === "start" ? {
|
|
3526
|
+
x0: e,
|
|
3527
|
+
y0: a,
|
|
3528
|
+
x1: e + n,
|
|
3529
|
+
y1: o
|
|
3530
|
+
} : i === "end" ? {
|
|
3531
|
+
x0: e - n,
|
|
3532
|
+
y0: a,
|
|
3533
|
+
x1: e,
|
|
3534
|
+
y1: o
|
|
3535
|
+
} : {
|
|
3536
|
+
x0: e - n / 2,
|
|
3537
|
+
y0: a,
|
|
3538
|
+
x1: e + n / 2,
|
|
3539
|
+
y1: o
|
|
3540
|
+
};
|
|
3541
|
+
}
|
|
3542
|
+
function Wr(e, t, n = Ir, r) {
|
|
3543
|
+
let { width: i, height: a, viewScale: o, labelPx: s = 11, dotPx: c = 2.4, gapPx: l = 4, margin: u = 0 } = r, d = o || 1, f = s / d, p = c / d, m = l / d, h = f * Rr, g = [];
|
|
3544
|
+
e.forEach((e, r) => {
|
|
3545
|
+
let o = t(e.coordinates);
|
|
3546
|
+
if (!o || !Number.isFinite(o[0]) || !Number.isFinite(o[1])) return;
|
|
3547
|
+
let s = n.k * o[0] + n.x, c = n.k * o[1] + n.y;
|
|
3548
|
+
s < -u || s > i + u || c < -u || c > a + u || g.push({
|
|
3549
|
+
marker: e,
|
|
3550
|
+
x: s,
|
|
3551
|
+
y: c,
|
|
3552
|
+
radius: p,
|
|
3553
|
+
order: r
|
|
3554
|
+
});
|
|
3555
|
+
}), g.sort((e, t) => !!t.marker.capital - +!!e.marker.capital || e.order - t.order);
|
|
3556
|
+
let ee = g.map((e) => ({
|
|
3557
|
+
x0: e.x - e.radius,
|
|
3558
|
+
y0: e.y - e.radius,
|
|
3559
|
+
x1: e.x + e.radius,
|
|
3560
|
+
y1: e.y + e.radius
|
|
3561
|
+
})), _ = [], v = [];
|
|
3562
|
+
for (let e of g) {
|
|
3563
|
+
let t = zr(e.marker.name, s) / d, n = e.radius, r = [
|
|
3564
|
+
{
|
|
3565
|
+
anchorX: e.x + n + m,
|
|
3566
|
+
cy: e.y,
|
|
3567
|
+
anchor: "start"
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3570
|
+
anchorX: e.x - n - m,
|
|
3571
|
+
cy: e.y,
|
|
3572
|
+
anchor: "end"
|
|
3573
|
+
},
|
|
3574
|
+
{
|
|
3575
|
+
anchorX: e.x,
|
|
3576
|
+
cy: e.y - n - m - h / 2,
|
|
3577
|
+
anchor: "middle"
|
|
3578
|
+
},
|
|
3579
|
+
{
|
|
3580
|
+
anchorX: e.x,
|
|
3581
|
+
cy: e.y + n + m + h / 2,
|
|
3582
|
+
anchor: "middle"
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
anchorX: e.x + n * .7 + m,
|
|
3586
|
+
cy: e.y - n - m,
|
|
3587
|
+
anchor: "start"
|
|
3588
|
+
},
|
|
3589
|
+
{
|
|
3590
|
+
anchorX: e.x + n * .7 + m,
|
|
3591
|
+
cy: e.y + n + m,
|
|
3592
|
+
anchor: "start"
|
|
3593
|
+
},
|
|
3594
|
+
{
|
|
3595
|
+
anchorX: e.x - n * .7 - m,
|
|
3596
|
+
cy: e.y - n - m,
|
|
3597
|
+
anchor: "end"
|
|
3598
|
+
},
|
|
3599
|
+
{
|
|
3600
|
+
anchorX: e.x - n * .7 - m,
|
|
3601
|
+
cy: e.y + n + m,
|
|
3602
|
+
anchor: "end"
|
|
3603
|
+
}
|
|
3604
|
+
], o = !e.marker.capital, c = null;
|
|
3605
|
+
for (let e of r) {
|
|
3606
|
+
let n = Ur(e.anchorX, e.cy, t, h, e.anchor);
|
|
3607
|
+
if (Hr(n, i, a) && !_.some((e) => Vr(n, e)) && !(o && ee.some((e) => Vr(n, e)))) {
|
|
3608
|
+
c = {
|
|
3609
|
+
x: Br(e.anchorX),
|
|
3610
|
+
y: Br(e.cy),
|
|
3611
|
+
anchor: e.anchor
|
|
3612
|
+
}, _.push(n);
|
|
3613
|
+
break;
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
v.push({
|
|
3617
|
+
name: e.marker.name,
|
|
3618
|
+
capital: !!e.marker.capital,
|
|
3619
|
+
x: Br(e.x),
|
|
3620
|
+
y: Br(e.y),
|
|
3621
|
+
radius: Br(n),
|
|
3622
|
+
label: c
|
|
3623
|
+
});
|
|
3624
|
+
}
|
|
3625
|
+
return v;
|
|
3626
|
+
}
|
|
3627
|
+
//#endregion
|
|
3628
|
+
//#region src/ChoroplethMap/ChoroplethMap.vue?vue&type=script&setup=true&lang.ts
|
|
3629
|
+
var Gr = ["role", "aria-label"], Kr = {
|
|
3485
3630
|
class: "chart-sr-only",
|
|
3486
3631
|
"aria-live": "polite"
|
|
3487
|
-
},
|
|
3632
|
+
}, qr = {
|
|
3488
3633
|
key: 1,
|
|
3489
3634
|
class: "choropleth-header"
|
|
3490
|
-
},
|
|
3635
|
+
}, Jr = {
|
|
3491
3636
|
key: 0,
|
|
3492
3637
|
class: "choropleth-legend-title"
|
|
3493
|
-
},
|
|
3638
|
+
}, Yr = {
|
|
3494
3639
|
key: 2,
|
|
3495
3640
|
class: "choropleth-legend-continuous"
|
|
3496
|
-
},
|
|
3641
|
+
}, Xr = { class: "choropleth-legend-ticks" }, Zr = {
|
|
3497
3642
|
key: 2,
|
|
3498
3643
|
class: "choropleth-zoom-hint"
|
|
3499
|
-
},
|
|
3644
|
+
}, Qr = ["viewBox"], $r = ["viewBox"], ei = ["innerHTML"], ti = "http://www.w3.org/2000/svg", ni = 10, ri = 600, ii = 250, ai = 30, oi = 450, si = 2, ci = 2, li = 1e3, ui = 12, di = "light-dark(#000, #fff)", fi = 24, pi = 350, mi = 120, hi = 11, gi = 2.4, _i = 3, vi = .9, yi = 2.6, bi = /* @__PURE__ */ N(/* @__PURE__ */ l({
|
|
3500
3645
|
inheritAttrs: !1,
|
|
3501
3646
|
__name: "ChoroplethMap",
|
|
3502
3647
|
props: {
|
|
@@ -3545,7 +3690,7 @@ var Nr = {
|
|
|
3545
3690
|
tooltipTrigger: {},
|
|
3546
3691
|
tooltipFormat: {},
|
|
3547
3692
|
tooltipValueFormat: {},
|
|
3548
|
-
tooltipClamp: { default: "
|
|
3693
|
+
tooltipClamp: { default: "window" },
|
|
3549
3694
|
focus: {},
|
|
3550
3695
|
focusZoomLevel: { default: 4 },
|
|
3551
3696
|
focusZoom: {
|
|
@@ -3553,7 +3698,9 @@ var Nr = {
|
|
|
3553
3698
|
default: !0
|
|
3554
3699
|
},
|
|
3555
3700
|
renderer: { default: "svg" },
|
|
3556
|
-
fullscreenTarget: {}
|
|
3701
|
+
fullscreenTarget: {},
|
|
3702
|
+
cities: {},
|
|
3703
|
+
citiesMinZoom: { default: 2 }
|
|
3557
3704
|
},
|
|
3558
3705
|
emits: [
|
|
3559
3706
|
"stateClick",
|
|
@@ -3561,10 +3708,10 @@ var Nr = {
|
|
|
3561
3708
|
"update:focus"
|
|
3562
3709
|
],
|
|
3563
3710
|
setup(c, { emit: l }) {
|
|
3564
|
-
let p = c, ne = n(() => p.ariaLabel ?? p.title), ie = n(() => p.role ?? (ne.value ? "figure" : void 0)), T = l, E = (e) => e, oe = v(null), D = v(null), O = v(null), k = v(null), se = v(null), ce = v(null), le = S(), N = n(() => !!p.tooltipTrigger || !!p.tooltipFormat || !!
|
|
3711
|
+
let p = c, ne = n(() => p.ariaLabel ?? p.title), ie = n(() => p.role ?? (ne.value ? "figure" : void 0)), T = l, E = (e) => e, oe = v(null), D = v(null), O = v(null), k = v(null), se = v(null), ce = v(null), le = v(null), _e = v(null), ve = S(), N = n(() => !!p.tooltipTrigger || !!p.tooltipFormat || !!ve.tooltip), P = n(() => {
|
|
3565
3712
|
let e = p.legendStyle, t = {};
|
|
3566
3713
|
return e?.fontSize != null && (t["font-size"] = `${e.fontSize}px`), e?.fontWeight != null && (t["font-weight"] = String(e.fontWeight)), e?.color != null && (t.color = e.color), t;
|
|
3567
|
-
}),
|
|
3714
|
+
}), be = n(() => {
|
|
3568
3715
|
let e = p.titleStyle, t = {
|
|
3569
3716
|
"font-size": `${e?.fontSize ?? 14}px`,
|
|
3570
3717
|
"line-height": `${e?.lineHeight ?? 18}px`,
|
|
@@ -3573,88 +3720,79 @@ var Nr = {
|
|
|
3573
3720
|
width: "100%"
|
|
3574
3721
|
};
|
|
3575
3722
|
return e?.color && (t.color = e.color), t;
|
|
3576
|
-
}),
|
|
3723
|
+
}), xe = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Map(), Ce = null, F = null, we = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map(), I = n(() => p.renderer === "canvas"), Ee = v(null), L = null, De = null, Oe = null, R = null, ke = /* @__PURE__ */ new Map(), Ae = [], je = 0, Me = 0, Ne = 0, Pe = 0, z = !1, Fe = null, Ie = {
|
|
3577
3724
|
width: 0,
|
|
3578
3725
|
height: 0
|
|
3579
|
-
},
|
|
3580
|
-
function
|
|
3726
|
+
}, V = null, H = !1, U = null, W = v(!1), ze = v(1), Be = v(1), Ve = v(!1), He = n(() => p.zoomMode === "scroll"), Ue = n(() => p.zoom && (He.value || !p.touchExpand && Ve.value)), We = 0, Ge = 0, Ke = 0, qe = null, q = 0, Je = null;
|
|
3727
|
+
function Ye() {
|
|
3581
3728
|
let e = D.value, t = O.value;
|
|
3582
|
-
if (!(!e || !t) && (e.addEventListener("touchstart",
|
|
3583
|
-
if (
|
|
3584
|
-
e.addEventListener("click",
|
|
3729
|
+
if (!(!e || !t) && (e.addEventListener("touchstart", Yn, { passive: !0 }), e.addEventListener("touchend", Xn), e.addEventListener("touchcancel", Qn, { passive: !0 }), !K())) {
|
|
3730
|
+
if (I.value) {
|
|
3731
|
+
e.addEventListener("click", Un), e.addEventListener("mousemove", Kn), e.addEventListener("mouseleave", qn);
|
|
3585
3732
|
return;
|
|
3586
3733
|
}
|
|
3587
|
-
t.addEventListener("click",
|
|
3734
|
+
t.addEventListener("click", Un), t.addEventListener("mouseover", Un), t.addEventListener("mousemove", Wn), t.addEventListener("mouseout", Gn);
|
|
3588
3735
|
}
|
|
3589
3736
|
}
|
|
3590
|
-
function
|
|
3737
|
+
function Y() {
|
|
3591
3738
|
let e = D.value, t = O.value;
|
|
3592
|
-
e && (e.removeEventListener("touchstart",
|
|
3739
|
+
e && (e.removeEventListener("touchstart", Yn), e.removeEventListener("touchend", Xn), e.removeEventListener("touchcancel", Qn), e.removeEventListener("click", Un), e.removeEventListener("mousemove", Kn), e.removeEventListener("mouseleave", qn)), t && (t.removeEventListener("click", Un), t.removeEventListener("mouseover", Un), t.removeEventListener("mousemove", Wn), t.removeEventListener("mouseout", Gn));
|
|
3593
3740
|
}
|
|
3594
|
-
function
|
|
3595
|
-
|
|
3741
|
+
function Xe() {
|
|
3742
|
+
Bn();
|
|
3596
3743
|
}
|
|
3597
|
-
let
|
|
3744
|
+
let Qe = null;
|
|
3598
3745
|
g(() => {
|
|
3599
|
-
|
|
3746
|
+
Ye(), $e(), rr(), it(), nr(), tn(), D.value && typeof ResizeObserver < "u" && (Qe = new ResizeObserver((e) => {
|
|
3600
3747
|
let t = e[0]?.contentRect;
|
|
3601
3748
|
if (!t?.width) return;
|
|
3602
|
-
let n = t.height ? Math.min(t.width /
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
if (e && n) {
|
|
3606
|
-
let r = oe.value?.getBoundingClientRect(), i = n.getBoundingClientRect();
|
|
3607
|
-
e.style.top = `${i.top - (r?.top ?? 0)}px`, e.style.left = `${i.left - (r?.left ?? 0)}px`, e.style.width = `${t.width}px`, e.style.height = `${t.height}px`;
|
|
3608
|
-
let a = typeof window < "u" && window.devicePixelRatio || 1;
|
|
3609
|
-
e.width = Math.max(1, Math.round(t.width * a)), e.height = Math.max(1, Math.round(t.height * a));
|
|
3610
|
-
}
|
|
3611
|
-
bn();
|
|
3612
|
-
} else Cn();
|
|
3613
|
-
}), qe.observe(D.value)), R.value && pn(), window.addEventListener("scroll", Ke, {
|
|
3749
|
+
let n = t.height ? Math.min(t.width / bt.value, t.height / xt.value) : t.width / bt.value;
|
|
3750
|
+
Be.value = n, Ne = (t.width - n * bt.value) / 2, Pe = t.height ? (t.height - n * xt.value) / 2 : 0, I.value ? Mn(t.width, t.height) : Fn();
|
|
3751
|
+
}), Qe.observe(D.value)), I.value && vn(), window.addEventListener("scroll", Xe, {
|
|
3614
3752
|
passive: !0,
|
|
3615
3753
|
capture: !0
|
|
3616
|
-
}), window.addEventListener("resize",
|
|
3754
|
+
}), window.addEventListener("resize", Xe, { passive: !0 });
|
|
3617
3755
|
}), ee(() => {
|
|
3618
|
-
|
|
3756
|
+
Fe?.disconnect(), Qe?.disconnect(), _n?.removeEventListener("change", yn), Ke && cancelAnimationFrame(Ke), je && cancelAnimationFrame(je), Me && cancelAnimationFrame(Me), window.clearTimeout(q), Cn && window.clearTimeout(Cn), et(), Y(), window.removeEventListener("scroll", Xe, { capture: !0 }), window.removeEventListener("resize", Xe);
|
|
3619
3757
|
});
|
|
3620
|
-
function
|
|
3758
|
+
function $e() {
|
|
3621
3759
|
if (!D.value || !O.value) return;
|
|
3622
3760
|
let e = M(D.value);
|
|
3623
|
-
|
|
3624
|
-
|
|
3761
|
+
U = de().scaleExtent([1, st.value]).clickDistance(6).on("start", () => {
|
|
3762
|
+
z = !0;
|
|
3625
3763
|
}).on("zoom", (e) => {
|
|
3626
|
-
|
|
3764
|
+
Bn(), I.value ? kn() : O.value && O.value.setAttribute("transform", e.transform);
|
|
3627
3765
|
let t = e.transform;
|
|
3628
|
-
|
|
3766
|
+
ze.value = t.k, Fn(), p.cities?.length && nr(), W.value = t.k !== 1 || t.x !== 0 || t.y !== 0, W.value && (Ve.value = !0);
|
|
3629
3767
|
}).on("end", () => {
|
|
3630
|
-
|
|
3631
|
-
}),
|
|
3768
|
+
z = !1, I.value && kn();
|
|
3769
|
+
}), U.filter((e) => {
|
|
3632
3770
|
if (!p.zoom) return !1;
|
|
3633
|
-
if (!
|
|
3771
|
+
if (!He.value) {
|
|
3634
3772
|
let t = $.isFullscreen.value;
|
|
3635
3773
|
switch (e.type) {
|
|
3636
3774
|
case "wheel":
|
|
3637
3775
|
if (!t) return !1;
|
|
3638
3776
|
break;
|
|
3639
3777
|
case "dblclick":
|
|
3640
|
-
if (
|
|
3778
|
+
if (K()) return !1;
|
|
3641
3779
|
break;
|
|
3642
3780
|
case "mousedown":
|
|
3643
|
-
if (!t && !
|
|
3781
|
+
if (!t && !Ve.value) return !1;
|
|
3644
3782
|
break;
|
|
3645
3783
|
case "touchstart":
|
|
3646
|
-
if (!t && !
|
|
3784
|
+
if (!t && !Ue.value && !(!p.touchExpand && p.zoomMode !== "scroll" && e.touches.length >= 2)) return !1;
|
|
3647
3785
|
break;
|
|
3648
3786
|
}
|
|
3649
3787
|
}
|
|
3650
3788
|
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
3651
|
-
}), e.call(
|
|
3789
|
+
}), e.call(U);
|
|
3652
3790
|
}
|
|
3653
|
-
function
|
|
3654
|
-
D.value &&
|
|
3791
|
+
function et() {
|
|
3792
|
+
D.value && U && (M(D.value).on(".zoom", null), U = null);
|
|
3655
3793
|
}
|
|
3656
|
-
function
|
|
3657
|
-
let t =
|
|
3794
|
+
function tt(e) {
|
|
3795
|
+
let t = Vt.value, n = Lt.value, r = [];
|
|
3658
3796
|
for (let i of e) {
|
|
3659
3797
|
let e = i.geoType ?? p.geoType, a = t.get(e);
|
|
3660
3798
|
if (!a) continue;
|
|
@@ -3672,20 +3810,20 @@ var Nr = {
|
|
|
3672
3810
|
}
|
|
3673
3811
|
return r;
|
|
3674
3812
|
}
|
|
3675
|
-
function
|
|
3813
|
+
function nt(e) {
|
|
3676
3814
|
let t = /* @__PURE__ */ new Set();
|
|
3677
|
-
for (let n of
|
|
3815
|
+
for (let n of tt(e)) n.geoType === p.geoType && t.add(String(n.feature.id));
|
|
3678
3816
|
return t;
|
|
3679
3817
|
}
|
|
3680
|
-
let
|
|
3681
|
-
function
|
|
3682
|
-
if (!D.value || !
|
|
3683
|
-
let e =
|
|
3684
|
-
if (
|
|
3685
|
-
|
|
3686
|
-
for (let e of t)
|
|
3687
|
-
let e =
|
|
3688
|
-
|
|
3818
|
+
let rt = !1;
|
|
3819
|
+
function it() {
|
|
3820
|
+
if (!D.value || !U) return;
|
|
3821
|
+
let e = tt(Bt.value), t = e.filter((e) => e.geoType === p.geoType), n = e.filter((e) => e.geoType !== p.geoType);
|
|
3822
|
+
if (I.value) {
|
|
3823
|
+
ke.clear();
|
|
3824
|
+
for (let e of t) ke.set(String(e.feature.id), e.item);
|
|
3825
|
+
let e = X.value;
|
|
3826
|
+
Ae = n.flatMap((t) => {
|
|
3689
3827
|
let n = e(t.feature);
|
|
3690
3828
|
return n ? [{
|
|
3691
3829
|
path: new Path2D(n),
|
|
@@ -3693,88 +3831,88 @@ var Nr = {
|
|
|
3693
3831
|
strokeWidth: t.item.strokeWidth,
|
|
3694
3832
|
style: t.item.style
|
|
3695
3833
|
}] : [];
|
|
3696
|
-
}),
|
|
3834
|
+
}), wn(), kn();
|
|
3697
3835
|
} else {
|
|
3698
3836
|
let e = /* @__PURE__ */ new Map();
|
|
3699
3837
|
for (let n of t) {
|
|
3700
|
-
let t =
|
|
3838
|
+
let t = xe.get(String(n.feature.id));
|
|
3701
3839
|
t && e.set(t, n.item);
|
|
3702
3840
|
}
|
|
3703
|
-
for (let [t] of
|
|
3841
|
+
for (let [t] of we) e.has(t) || t === F || Ln(t);
|
|
3704
3842
|
for (let [t, n] of e) {
|
|
3705
|
-
let e =
|
|
3706
|
-
e != null && e.style === n.style && e.stroke === n.stroke && e.strokeWidth === n.strokeWidth && t !==
|
|
3843
|
+
let e = we.get(t);
|
|
3844
|
+
e != null && e.style === n.style && e.stroke === n.stroke && e.strokeWidth === n.strokeWidth && t !== F || t !== F && In(t, n);
|
|
3707
3845
|
}
|
|
3708
|
-
|
|
3709
|
-
for (let [t, n] of e)
|
|
3710
|
-
|
|
3846
|
+
we.clear();
|
|
3847
|
+
for (let [t, n] of e) we.set(t, n);
|
|
3848
|
+
at(n);
|
|
3711
3849
|
}
|
|
3712
3850
|
if (e.length === 0) {
|
|
3713
|
-
|
|
3851
|
+
rt = !0, Bn();
|
|
3714
3852
|
return;
|
|
3715
3853
|
}
|
|
3716
3854
|
if (p.focusZoom === !1) {
|
|
3717
|
-
|
|
3855
|
+
rt = !0;
|
|
3718
3856
|
return;
|
|
3719
3857
|
}
|
|
3720
3858
|
let r = M(D.value);
|
|
3721
3859
|
r.interrupt();
|
|
3722
|
-
let i =
|
|
3723
|
-
|
|
3724
|
-
let [[a, o], [s, c]] =
|
|
3860
|
+
let i = rt;
|
|
3861
|
+
rt = !0;
|
|
3862
|
+
let [[a, o], [s, c]] = X.value.bounds({
|
|
3725
3863
|
type: "FeatureCollection",
|
|
3726
3864
|
features: e.map((e) => e.feature)
|
|
3727
|
-
}), l = (a + s) / 2, u = (o + c) / 2, d = p.focusZoomLevel, f = fe.translate(
|
|
3865
|
+
}), l = (a + s) / 2, u = (o + c) / 2, d = p.focusZoomLevel, f = fe.translate(bt.value / 2 - d * l, xt.value / 2 - d * u).scale(d), m = t[0]?.feature ?? null, h = () => {
|
|
3728
3866
|
if (!N.value || !m) return;
|
|
3729
3867
|
let e = String(m.id);
|
|
3730
|
-
if (
|
|
3731
|
-
let t =
|
|
3732
|
-
t &&
|
|
3868
|
+
if (I.value) {
|
|
3869
|
+
let t = Pn(e);
|
|
3870
|
+
t && an(e, t.x, t.y);
|
|
3733
3871
|
return;
|
|
3734
3872
|
}
|
|
3735
|
-
let t =
|
|
3873
|
+
let t = xe.get(e);
|
|
3736
3874
|
if (!t) return;
|
|
3737
3875
|
let n = t.getBoundingClientRect();
|
|
3738
|
-
|
|
3876
|
+
an(e, n.left + n.width / 2, n.top + n.height / 2);
|
|
3739
3877
|
};
|
|
3740
|
-
i ? (
|
|
3878
|
+
i ? (sn(), r.transition().duration(oi).call(U.transform, f).on("end", h)) : (U.transform(r, f), h());
|
|
3741
3879
|
}
|
|
3742
|
-
function
|
|
3880
|
+
function at(e) {
|
|
3743
3881
|
let t = se.value;
|
|
3744
3882
|
if (!t) return;
|
|
3745
3883
|
let n = new Set(e.map((e) => e.key));
|
|
3746
|
-
for (let [e, t] of
|
|
3747
|
-
let r =
|
|
3884
|
+
for (let [e, t] of Te) n.has(e) || (t.el.remove(), Te.delete(e));
|
|
3885
|
+
let r = X.value;
|
|
3748
3886
|
for (let { item: n, feature: i, key: a } of e) {
|
|
3749
|
-
let e =
|
|
3887
|
+
let e = Te.get(a);
|
|
3750
3888
|
if (!e) {
|
|
3751
|
-
let n = document.createElementNS(
|
|
3752
|
-
n.setAttribute("d", r(i) ?? ""), n.setAttribute("fill", "none"), n.setAttribute("pointer-events", "none"), n.setAttribute("stroke-linejoin", "round"), n.setAttribute("class", "focus-overlay"), t.appendChild(n), e = { el: n },
|
|
3889
|
+
let n = document.createElementNS(ti, "path");
|
|
3890
|
+
n.setAttribute("d", r(i) ?? ""), n.setAttribute("fill", "none"), n.setAttribute("pointer-events", "none"), n.setAttribute("stroke-linejoin", "round"), n.setAttribute("class", "focus-overlay"), t.appendChild(n), e = { el: n }, Te.set(a, e);
|
|
3753
3891
|
}
|
|
3754
|
-
e.strokeWidth = n.strokeWidth, e.el.setAttribute("stroke", n.stroke ?? "#fff"),
|
|
3892
|
+
e.strokeWidth = n.strokeWidth, e.el.setAttribute("stroke", n.stroke ?? "#fff"), cn(e.el, n.style);
|
|
3755
3893
|
}
|
|
3756
|
-
|
|
3894
|
+
Fn();
|
|
3757
3895
|
}
|
|
3758
|
-
function
|
|
3759
|
-
if (!D.value || !
|
|
3760
|
-
|
|
3896
|
+
function ot() {
|
|
3897
|
+
if (!D.value || !U) return;
|
|
3898
|
+
Bt.value.length > 0 && T("update:focus", null);
|
|
3761
3899
|
let e = M(D.value);
|
|
3762
|
-
e.interrupt(),
|
|
3763
|
-
let t =
|
|
3900
|
+
e.interrupt(), sn();
|
|
3901
|
+
let t = K() && !$.isFullscreen.value && !He.value, n = e.transition().duration(oi).call(U.transform, fe);
|
|
3764
3902
|
t && n.on("end", () => {
|
|
3765
|
-
|
|
3903
|
+
Ve.value = !1;
|
|
3766
3904
|
});
|
|
3767
3905
|
}
|
|
3768
|
-
let
|
|
3906
|
+
let st = n(() => Math.max(12, p.focusZoomLevel)), ct = n(() => p.zoom && (K() ? $.isFullscreen.value || He.value || !p.touchExpand : !0)), lt = n(() => p.zoom && !K() && (He.value || Ve.value || $.isFullscreen.value)), ut = n(() => p.zoom && p.zoomHint && !He.value && !$.isFullscreen.value && (K() && p.touchExpand || !Ve.value)), dt = n(() => K() ? "Double tap to zoom" : "Double click to zoom"), ft = n(() => {
|
|
3769
3907
|
let e = {};
|
|
3770
|
-
return $.isFullscreen.value ||
|
|
3908
|
+
return $.isFullscreen.value || Ue.value ? e["touch-action"] = "none" : p.zoom && !He.value && K() && (e["touch-action"] = p.touchExpand ? "manipulation" : "pan-x pan-y"), (Ve.value || $.isFullscreen.value || p.zoom && (He.value || K())) && (e["will-change"] = "transform"), Object.keys(e).length ? e : void 0;
|
|
3771
3909
|
});
|
|
3772
|
-
function
|
|
3773
|
-
if (!D.value || !
|
|
3910
|
+
function pt(e) {
|
|
3911
|
+
if (!D.value || !U) return;
|
|
3774
3912
|
let t = M(D.value);
|
|
3775
|
-
t.interrupt(),
|
|
3913
|
+
t.interrupt(), sn(), t.transition().duration(250).call(U.scaleBy, e);
|
|
3776
3914
|
}
|
|
3777
|
-
function
|
|
3915
|
+
function mt(e, t) {
|
|
3778
3916
|
let n = D.value;
|
|
3779
3917
|
if (!n) return null;
|
|
3780
3918
|
let r = null;
|
|
@@ -3787,69 +3925,69 @@ var Nr = {
|
|
|
3787
3925
|
let n = r.inverse();
|
|
3788
3926
|
return [n.a * e + n.c * t + n.e, n.b * e + n.d * t + n.f];
|
|
3789
3927
|
}
|
|
3790
|
-
let i = n.getBoundingClientRect(), a = i.width ?
|
|
3928
|
+
let i = n.getBoundingClientRect(), a = i.width ? bt.value / i.width : 1, o = i.height ? xt.value / i.height : 1;
|
|
3791
3929
|
return [(e - i.left) * a, (t - i.top) * o];
|
|
3792
3930
|
}
|
|
3793
|
-
function
|
|
3794
|
-
let n = D.value, r =
|
|
3795
|
-
return o && ([i, a] = pe(n).invert(o)), fe.translate(
|
|
3931
|
+
function ht(e, t) {
|
|
3932
|
+
let n = D.value, r = ci, i = bt.value / 2, a = xt.value / 2, o = mt(e, t);
|
|
3933
|
+
return o && ([i, a] = pe(n).invert(o)), fe.translate(bt.value / 2 - r * i, xt.value / 2 - r * a).scale(r);
|
|
3796
3934
|
}
|
|
3797
|
-
function
|
|
3798
|
-
if (!D.value || !
|
|
3935
|
+
function gt(e) {
|
|
3936
|
+
if (!D.value || !U) return;
|
|
3799
3937
|
let t = M(D.value);
|
|
3800
|
-
t.interrupt(), t.transition().duration(
|
|
3938
|
+
t.interrupt(), t.transition().duration(oi).call(U.transform, e);
|
|
3801
3939
|
}
|
|
3802
|
-
function
|
|
3803
|
-
if (!D.value || !
|
|
3804
|
-
let n =
|
|
3805
|
-
$.enter(), f(() =>
|
|
3940
|
+
function _t(e, t) {
|
|
3941
|
+
if (!D.value || !U) return;
|
|
3942
|
+
let n = ht(e, t);
|
|
3943
|
+
$.enter(), f(() => gt(n));
|
|
3806
3944
|
}
|
|
3807
|
-
function
|
|
3808
|
-
!D.value || !
|
|
3945
|
+
function vt(e, t) {
|
|
3946
|
+
!D.value || !U || gt(ht(e, t));
|
|
3809
3947
|
}
|
|
3810
3948
|
C(() => p.focusZoomLevel, () => {
|
|
3811
|
-
|
|
3949
|
+
U && U.scaleExtent([1, st.value]), it();
|
|
3812
3950
|
}), C(() => p.state, () => {
|
|
3813
|
-
if (!D.value || !
|
|
3951
|
+
if (!D.value || !U) return;
|
|
3814
3952
|
let e = M(D.value);
|
|
3815
|
-
e.interrupt(),
|
|
3953
|
+
e.interrupt(), U.transform(e, fe);
|
|
3816
3954
|
});
|
|
3817
|
-
let
|
|
3955
|
+
let yt = n(() => p.width && p.height ? p.height / p.width : .625), bt = n(() => li), xt = n(() => li * yt.value), St = n(() => {
|
|
3818
3956
|
let e = re(p.topology), t = e?.objects?.states;
|
|
3819
3957
|
if (!t) return [];
|
|
3820
3958
|
let n = me(e, t);
|
|
3821
3959
|
return n.type === "FeatureCollection" ? n.features : [n];
|
|
3822
|
-
}),
|
|
3960
|
+
}), Ct = n(() => {
|
|
3823
3961
|
let e = p.state?.trim();
|
|
3824
3962
|
if (!e) return null;
|
|
3825
3963
|
if (/^\d{1,2}$/.test(e)) return e.padStart(2, "0");
|
|
3826
|
-
let t =
|
|
3964
|
+
let t = St.value.find((t) => t.properties?.name === e);
|
|
3827
3965
|
return t?.id == null ? null : String(t.id).padStart(2, "0");
|
|
3828
|
-
}),
|
|
3829
|
-
let e =
|
|
3830
|
-
return e ?
|
|
3966
|
+
}), wt = n(() => {
|
|
3967
|
+
let e = Ct.value;
|
|
3968
|
+
return e ? St.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
|
|
3831
3969
|
});
|
|
3832
|
-
C(() => [p.state,
|
|
3970
|
+
C(() => [p.state, Ct.value], ([e, t]) => {
|
|
3833
3971
|
e && e.trim() && !t && console.warn(`[ChoroplethMap] state="${e}" matched no state name or FIPS code; rendering the full map.`);
|
|
3834
3972
|
}, { immediate: !0 });
|
|
3835
|
-
let
|
|
3836
|
-
function
|
|
3837
|
-
return
|
|
3973
|
+
let Tt = v(null), Et = null;
|
|
3974
|
+
function Dt() {
|
|
3975
|
+
return Et ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (Tt.value = e, e)), Et;
|
|
3838
3976
|
}
|
|
3839
3977
|
C(() => {
|
|
3840
3978
|
if (p.geoType === "hsas" || p.dataGeoType === "hsas") return !0;
|
|
3841
3979
|
let e = p.focus;
|
|
3842
3980
|
return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
|
|
3843
3981
|
}, (e) => {
|
|
3844
|
-
e &&
|
|
3982
|
+
e && Dt();
|
|
3845
3983
|
}, { immediate: !0 });
|
|
3846
|
-
let
|
|
3847
|
-
let e =
|
|
3984
|
+
let Ot = n(() => {
|
|
3985
|
+
let e = Tt.value;
|
|
3848
3986
|
if (!e) return {
|
|
3849
3987
|
type: "FeatureCollection",
|
|
3850
3988
|
features: []
|
|
3851
3989
|
};
|
|
3852
|
-
let { fipsToHsa: t, hsaNames: n } = e, r = re(p.topology), i = r.objects.counties.geometries, a =
|
|
3990
|
+
let { fipsToHsa: t, hsaNames: n } = e, r = re(p.topology), i = r.objects.counties.geometries, a = Ct.value, o = /* @__PURE__ */ new Map();
|
|
3853
3991
|
for (let e of i) {
|
|
3854
3992
|
let n = String(e.id).padStart(5, "0");
|
|
3855
3993
|
if (a && n.slice(0, 2) !== a) continue;
|
|
@@ -3867,9 +4005,9 @@ var Nr = {
|
|
|
3867
4005
|
type: "FeatureCollection",
|
|
3868
4006
|
features: s
|
|
3869
4007
|
};
|
|
3870
|
-
}),
|
|
3871
|
-
if (p.geoType === "hsas") return
|
|
3872
|
-
let e =
|
|
4008
|
+
}), kt = n(() => {
|
|
4009
|
+
if (p.geoType === "hsas") return Ot.value;
|
|
4010
|
+
let e = Ct.value;
|
|
3873
4011
|
if (p.geoType === "counties") {
|
|
3874
4012
|
let t = re(p.topology), n = me(t, t.objects.counties);
|
|
3875
4013
|
return e ? {
|
|
@@ -3882,59 +4020,74 @@ var Nr = {
|
|
|
3882
4020
|
type: "FeatureCollection",
|
|
3883
4021
|
features: n.features.filter((t) => String(t.id).padStart(2, "0") === e)
|
|
3884
4022
|
} : n;
|
|
3885
|
-
}),
|
|
4023
|
+
}), jt = n(() => {
|
|
3886
4024
|
if (p.geoType !== "counties" && p.geoType !== "hsas") return null;
|
|
3887
|
-
if (
|
|
4025
|
+
if (Ct.value) return wt.value;
|
|
3888
4026
|
let e = re(p.topology);
|
|
3889
4027
|
return ge(e, e.objects.states, (e, t) => e !== t);
|
|
3890
|
-
}),
|
|
4028
|
+
}), Mt = n(() => {
|
|
3891
4029
|
let e = p.tightFit;
|
|
3892
4030
|
return e === !0 ? 1 : e ? Math.max(0, Math.min(1, Number(e))) : 0;
|
|
3893
|
-
}),
|
|
3894
|
-
if (
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
4031
|
+
}), Nt = n(() => {
|
|
4032
|
+
if (p.geoType === "hsas") {
|
|
4033
|
+
let e = Tt.value;
|
|
4034
|
+
if (!e) return null;
|
|
4035
|
+
let t = /* @__PURE__ */ new Set();
|
|
4036
|
+
for (let n in e.fipsToHsa) {
|
|
4037
|
+
let r = n.slice(0, 2);
|
|
4038
|
+
(r === "02" || r === "15") && t.add(e.fipsToHsa[n]);
|
|
4039
|
+
}
|
|
4040
|
+
return (e) => t.has(e);
|
|
4041
|
+
}
|
|
4042
|
+
let e = p.geoType === "counties" ? 5 : 2;
|
|
4043
|
+
return (t) => {
|
|
4044
|
+
let n = t.padStart(e, "0").slice(0, 2);
|
|
4045
|
+
return n === "02" || n === "15";
|
|
4046
|
+
};
|
|
4047
|
+
}), Pt = n(() => {
|
|
4048
|
+
if (Mt.value <= 0 || Ct.value) return null;
|
|
4049
|
+
let e = Nt.value;
|
|
4050
|
+
if (!e) return null;
|
|
4051
|
+
let t = kt.value, n = t.features.filter((t) => !e(String(t.id)));
|
|
4052
|
+
return n.length === t.features.length ? null : {
|
|
3900
4053
|
type: "FeatureCollection",
|
|
3901
4054
|
features: n
|
|
3902
4055
|
};
|
|
3903
|
-
}),
|
|
3904
|
-
let e =
|
|
3905
|
-
if (
|
|
3906
|
-
let t = [[
|
|
4056
|
+
}), Ft = n(() => {
|
|
4057
|
+
let e = wt.value;
|
|
4058
|
+
if (Ct.value && e) {
|
|
4059
|
+
let t = [[ui, ui], [bt.value - ui, xt.value - ui]], n = A().fitExtent(t, e), r = j(n).centroid(e);
|
|
3907
4060
|
return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : ue().fitExtent(t, e);
|
|
3908
4061
|
}
|
|
3909
|
-
let t = [[0, 0], [
|
|
4062
|
+
let t = [[0, 0], [bt.value, xt.value]], n = A().fitExtent(t, kt.value), r = Pt.value;
|
|
3910
4063
|
if (!r) return n;
|
|
3911
|
-
let i = A().fitExtent(t, r), a =
|
|
4064
|
+
let i = A().fitExtent(t, r), a = Mt.value, o = (e, t) => e + (t - e) * a, [s, c] = n.translate(), [l, u] = i.translate();
|
|
3912
4065
|
return A().scale(o(n.scale(), i.scale())).translate([o(s, l), o(c, u)]);
|
|
3913
|
-
}),
|
|
4066
|
+
}), X = n(() => j(Ft.value)), It = n(() => p.geoType === "counties" || p.geoType === "hsas" ? p.strokeWidth * .5 : p.strokeWidth), Lt = n(() => {
|
|
3914
4067
|
let e = /* @__PURE__ */ new Map();
|
|
3915
|
-
for (let [t, n] of
|
|
4068
|
+
for (let [t, n] of Vt.value) {
|
|
3916
4069
|
let r = /* @__PURE__ */ new Map();
|
|
3917
4070
|
for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
|
|
3918
4071
|
e.set(t, r);
|
|
3919
4072
|
}
|
|
3920
4073
|
return e;
|
|
3921
4074
|
});
|
|
3922
|
-
function
|
|
4075
|
+
function Rt(e) {
|
|
3923
4076
|
let t = p.dataGeoType;
|
|
3924
4077
|
if (!t || t === p.geoType) return e;
|
|
3925
|
-
if (p.geoType === "counties" && t === "hsas") return
|
|
4078
|
+
if (p.geoType === "counties" && t === "hsas") return Tt.value?.fipsToHsa[e];
|
|
3926
4079
|
if (p.geoType === "counties" && t === "states" || p.geoType === "hsas" && t === "states") return e.slice(0, 2);
|
|
3927
4080
|
}
|
|
3928
|
-
let
|
|
4081
|
+
let zt = n(() => {
|
|
3929
4082
|
let e = /* @__PURE__ */ new Map();
|
|
3930
|
-
for (let t of
|
|
4083
|
+
for (let t of kt.value.features) t.id != null && e.set(String(t.id), t);
|
|
3931
4084
|
return e;
|
|
3932
|
-
}),
|
|
4085
|
+
}), Bt = n(() => {
|
|
3933
4086
|
let e = p.focus;
|
|
3934
4087
|
return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
|
|
3935
|
-
}),
|
|
4088
|
+
}), Vt = n(() => {
|
|
3936
4089
|
let e = /* @__PURE__ */ new Map();
|
|
3937
|
-
e.set(p.geoType,
|
|
4090
|
+
e.set(p.geoType, zt.value);
|
|
3938
4091
|
let t = re(p.topology), n = t?.objects;
|
|
3939
4092
|
if (!n) return e;
|
|
3940
4093
|
let r = (e) => {
|
|
@@ -3950,18 +4103,18 @@ var Nr = {
|
|
|
3950
4103
|
let i = me(t, n.counties);
|
|
3951
4104
|
e.set("counties", r(i.features));
|
|
3952
4105
|
}
|
|
3953
|
-
return !e.has("hsas") && n.counties && e.set("hsas", r(
|
|
3954
|
-
}),
|
|
4106
|
+
return !e.has("hsas") && n.counties && e.set("hsas", r(Ot.value.features)), e;
|
|
4107
|
+
}), Ht = n(() => {
|
|
3955
4108
|
let e = /* @__PURE__ */ new Map();
|
|
3956
4109
|
if (!p.data) return e;
|
|
3957
|
-
let t = p.dataGeoType ?? p.geoType, n =
|
|
4110
|
+
let t = p.dataGeoType ?? p.geoType, n = Lt.value.get(t);
|
|
3958
4111
|
for (let t of p.data) {
|
|
3959
4112
|
e.set(t.id, t.value);
|
|
3960
4113
|
let r = n?.get(t.id);
|
|
3961
4114
|
r && e.set(r, t.value);
|
|
3962
4115
|
}
|
|
3963
4116
|
return e;
|
|
3964
|
-
}),
|
|
4117
|
+
}), Ut = n(() => {
|
|
3965
4118
|
if (!p.data || p.data.length === 0) return {
|
|
3966
4119
|
min: 0,
|
|
3967
4120
|
max: 1
|
|
@@ -3978,120 +4131,119 @@ var Nr = {
|
|
|
3978
4131
|
min: 0,
|
|
3979
4132
|
max: 1
|
|
3980
4133
|
};
|
|
3981
|
-
}),
|
|
3982
|
-
function
|
|
3983
|
-
let [t, n, r] =
|
|
4134
|
+
}), Wt = n(() => Array.isArray(p.colorScale) && p.colorScale.length > 0 && "value" in p.colorScale[0]), Gt = n(() => Array.isArray(p.colorScale) && !Wt.value), Kt = n(() => Gt.value ? "" : p.colorScale?.min ?? "#e5f0fa"), qt = n(() => Gt.value ? "" : p.colorScale?.max ?? "#08519c");
|
|
4135
|
+
function Jt(e) {
|
|
4136
|
+
let [t, n, r] = At(Kt.value) ?? [
|
|
3984
4137
|
229,
|
|
3985
4138
|
240,
|
|
3986
4139
|
250
|
|
3987
|
-
], [i, a, o] =
|
|
4140
|
+
], [i, a, o] = At(qt.value) ?? [
|
|
3988
4141
|
8,
|
|
3989
4142
|
81,
|
|
3990
4143
|
156
|
|
3991
4144
|
];
|
|
3992
4145
|
return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
|
|
3993
4146
|
}
|
|
3994
|
-
let
|
|
3995
|
-
if (!
|
|
4147
|
+
let Yt = n(() => Gt.value ? p.colorScale.slice().sort((e, t) => t.min - e.min) : null), Xt = n(() => {
|
|
4148
|
+
if (!Wt.value) return null;
|
|
3996
4149
|
let e = /* @__PURE__ */ new Map();
|
|
3997
4150
|
for (let t of p.colorScale) e.set(t.value, t.color);
|
|
3998
4151
|
return e;
|
|
3999
4152
|
});
|
|
4000
|
-
function
|
|
4001
|
-
let t =
|
|
4002
|
-
return t == null ? void 0 :
|
|
4153
|
+
function Z(e) {
|
|
4154
|
+
let t = Rt(e);
|
|
4155
|
+
return t == null ? void 0 : Ht.value.get(t);
|
|
4003
4156
|
}
|
|
4004
|
-
function
|
|
4005
|
-
let t =
|
|
4157
|
+
function Zt(e) {
|
|
4158
|
+
let t = Z(e), n = p.noDataColor;
|
|
4006
4159
|
if (t == null) return n;
|
|
4007
|
-
let r =
|
|
4160
|
+
let r = Xt.value;
|
|
4008
4161
|
if (r) return r.get(String(t)) ?? n;
|
|
4009
|
-
let i =
|
|
4162
|
+
let i = Yt.value;
|
|
4010
4163
|
if (i) {
|
|
4011
4164
|
let e = t;
|
|
4012
4165
|
for (let t of i) if (e >= t.min) return t.color;
|
|
4013
4166
|
return n;
|
|
4014
4167
|
}
|
|
4015
|
-
let { min: a, max: o } =
|
|
4016
|
-
return
|
|
4168
|
+
let { min: a, max: o } = Ut.value;
|
|
4169
|
+
return Jt((t - a) / (o - a));
|
|
4017
4170
|
}
|
|
4018
|
-
let
|
|
4019
|
-
function
|
|
4171
|
+
let Qt = (e) => e.properties?.name ?? String(e.id);
|
|
4172
|
+
function $t(e) {
|
|
4020
4173
|
return e == null ? "" : typeof e == "number" && p.tooltipValueFormat !== void 0 ? ae(e, p.tooltipValueFormat) : String(e);
|
|
4021
4174
|
}
|
|
4022
|
-
function
|
|
4023
|
-
return t == null ? e : `${e}: ${
|
|
4175
|
+
function en(e, t) {
|
|
4176
|
+
return t == null ? e : `${e}: ${$t(t)}`;
|
|
4024
4177
|
}
|
|
4025
|
-
function
|
|
4026
|
-
let e =
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
let n = ce.value?.getEl();
|
|
4178
|
+
function tn() {
|
|
4179
|
+
let e = _e.value?.getEl();
|
|
4180
|
+
e && (Fe?.disconnect(), Fe = new ResizeObserver((e) => {
|
|
4181
|
+
let t = e[0];
|
|
4182
|
+
if (!t) return;
|
|
4183
|
+
let n = t.borderBoxSize?.[0];
|
|
4184
|
+
Ie.width = n ? n.inlineSize : t.contentRect.width, Ie.height = n ? n.blockSize : t.contentRect.height, H && V && nn(V.x, V.y);
|
|
4185
|
+
}), Fe.observe(e));
|
|
4186
|
+
}
|
|
4187
|
+
function nn(e, t) {
|
|
4188
|
+
let n = _e.value?.getEl();
|
|
4037
4189
|
if (!n) return;
|
|
4038
|
-
let r = oe.value?.getBoundingClientRect(), { left: i, top: a } =
|
|
4190
|
+
let r = oe.value?.getBoundingClientRect(), { left: i, top: a } = B(e, t, Ie.width, Ie.height, p.tooltipClamp, r);
|
|
4039
4191
|
n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
|
|
4040
4192
|
let o = typeof window < "u" ? window.visualViewport : null;
|
|
4041
4193
|
if (!o || o.scale <= 1.01 && o.offsetTop < 1 && o.offsetLeft < 1) return;
|
|
4042
4194
|
let s = n.getBoundingClientRect(), c = s.left - i, l = s.top + s.height / 2 - a;
|
|
4043
4195
|
(Math.abs(c) > 1 || Math.abs(l) > 1) && (n.style.transform = `translate3d(${i - c}px, ${a - l}px, 0) translateY(-50%)`);
|
|
4044
4196
|
}
|
|
4045
|
-
let
|
|
4046
|
-
function
|
|
4047
|
-
let r =
|
|
4197
|
+
let rn = n(() => $.isFullscreen.value && K() ? "sheet" : "float");
|
|
4198
|
+
function an(e, t, n) {
|
|
4199
|
+
let r = Se.get(e);
|
|
4048
4200
|
if (!r) return;
|
|
4049
|
-
let i =
|
|
4201
|
+
let i = _e.value;
|
|
4050
4202
|
if (!i) return;
|
|
4051
|
-
if (i.setData(r),
|
|
4203
|
+
if (i.setData(r), H = !0, rn.value === "sheet") {
|
|
4052
4204
|
i.setOpen(!0);
|
|
4053
4205
|
return;
|
|
4054
4206
|
}
|
|
4055
4207
|
let a = i.getEl();
|
|
4056
|
-
a && (
|
|
4208
|
+
a && (V = {
|
|
4057
4209
|
x: t,
|
|
4058
4210
|
y: n
|
|
4059
|
-
},
|
|
4211
|
+
}, nn(t, n), a.style.visibility = "visible");
|
|
4060
4212
|
}
|
|
4061
|
-
function
|
|
4062
|
-
!
|
|
4063
|
-
|
|
4064
|
-
x:
|
|
4065
|
-
y:
|
|
4066
|
-
},
|
|
4213
|
+
function on(e, t) {
|
|
4214
|
+
!H || rn.value === "sheet" || (We = e, Ge = t, !Ke && (Ke = requestAnimationFrame(() => {
|
|
4215
|
+
Ke = 0, H && (V = {
|
|
4216
|
+
x: We,
|
|
4217
|
+
y: Ge
|
|
4218
|
+
}, nn(We, Ge));
|
|
4067
4219
|
})));
|
|
4068
4220
|
}
|
|
4069
|
-
function
|
|
4070
|
-
if (!
|
|
4071
|
-
|
|
4072
|
-
let e =
|
|
4221
|
+
function sn() {
|
|
4222
|
+
if (!H) return;
|
|
4223
|
+
H = !1, V = null, _e.value?.setOpen(!1);
|
|
4224
|
+
let e = _e.value?.getEl();
|
|
4073
4225
|
e && (e.style.visibility = "hidden");
|
|
4074
4226
|
}
|
|
4075
|
-
function
|
|
4227
|
+
function cn(e, t) {
|
|
4076
4228
|
t === "dashed" ? (e.setAttribute("stroke-dasharray", "8 4"), e.removeAttribute("stroke-linecap")) : t === "dotted" ? (e.setAttribute("stroke-dasharray", "0 5"), e.setAttribute("stroke-linecap", "round")) : (e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap"));
|
|
4077
4229
|
}
|
|
4078
|
-
function
|
|
4079
|
-
return
|
|
4230
|
+
function ln() {
|
|
4231
|
+
return ze.value * Be.value || 1;
|
|
4080
4232
|
}
|
|
4081
|
-
function
|
|
4082
|
-
return e?.strokeWidth ??
|
|
4233
|
+
function un(e) {
|
|
4234
|
+
return e?.strokeWidth ?? It.value + 1;
|
|
4083
4235
|
}
|
|
4084
|
-
function
|
|
4085
|
-
let e =
|
|
4236
|
+
function dn() {
|
|
4237
|
+
let e = At(di);
|
|
4086
4238
|
return e ? `rgb(${e[0]},${e[1]},${e[2]})` : "#000";
|
|
4087
4239
|
}
|
|
4088
|
-
function
|
|
4240
|
+
function fn() {
|
|
4089
4241
|
let e = pe(D.value);
|
|
4090
4242
|
return {
|
|
4091
4243
|
dpr: typeof window < "u" && window.devicePixelRatio || 1,
|
|
4092
|
-
meetScale:
|
|
4093
|
-
offsetX:
|
|
4094
|
-
offsetY:
|
|
4244
|
+
meetScale: Be.value,
|
|
4245
|
+
offsetX: Ne,
|
|
4246
|
+
offsetY: Pe,
|
|
4095
4247
|
zoom: {
|
|
4096
4248
|
k: e.k,
|
|
4097
4249
|
x: e.x,
|
|
@@ -4099,73 +4251,115 @@ var Nr = {
|
|
|
4099
4251
|
}
|
|
4100
4252
|
};
|
|
4101
4253
|
}
|
|
4102
|
-
function
|
|
4254
|
+
function pn() {
|
|
4103
4255
|
return {
|
|
4104
4256
|
strokeColor: p.strokeColor,
|
|
4105
|
-
strokeWidth:
|
|
4106
|
-
highlightStroke:
|
|
4107
|
-
hoveredId:
|
|
4108
|
-
focused:
|
|
4109
|
-
overlays:
|
|
4257
|
+
strokeWidth: It.value,
|
|
4258
|
+
highlightStroke: dn(),
|
|
4259
|
+
hoveredId: R,
|
|
4260
|
+
focused: ke,
|
|
4261
|
+
overlays: Ae
|
|
4110
4262
|
};
|
|
4111
4263
|
}
|
|
4112
|
-
let
|
|
4113
|
-
function
|
|
4114
|
-
typeof window > "u" || typeof window.matchMedia != "function" || (
|
|
4264
|
+
let mn = 0, hn = 0, gn = !1, _n = null;
|
|
4265
|
+
function vn() {
|
|
4266
|
+
typeof window > "u" || typeof window.matchMedia != "function" || (_n?.removeEventListener("change", yn), _n = window.matchMedia(`(resolution: ${window.devicePixelRatio || 1}dppx)`), _n.addEventListener("change", yn));
|
|
4115
4267
|
}
|
|
4116
|
-
function
|
|
4117
|
-
|
|
4118
|
-
let e =
|
|
4119
|
-
if (!
|
|
4268
|
+
function yn() {
|
|
4269
|
+
vn();
|
|
4270
|
+
let e = Ee.value, t = D.value;
|
|
4271
|
+
if (!I.value || !e || !t) return;
|
|
4120
4272
|
let n = t.getBoundingClientRect();
|
|
4121
4273
|
if (n.width) {
|
|
4122
4274
|
let t = window.devicePixelRatio || 1;
|
|
4123
4275
|
e.width = Math.max(1, Math.round(n.width * t)), e.height = Math.max(1, Math.round(n.height * t));
|
|
4124
4276
|
}
|
|
4125
|
-
|
|
4277
|
+
An();
|
|
4278
|
+
}
|
|
4279
|
+
let Q = null, bn = null, xn = 0, Sn = !0, Cn = 0;
|
|
4280
|
+
function wn() {
|
|
4281
|
+
Sn = !0;
|
|
4126
4282
|
}
|
|
4127
|
-
|
|
4128
|
-
|
|
4283
|
+
function Tn(e, t) {
|
|
4284
|
+
return e.dpr === t.dpr && e.meetScale === t.meetScale && e.offsetX === t.offsetX && e.offsetY === t.offsetY && e.zoom.k === t.zoom.k && e.zoom.x === t.zoom.x && e.zoom.y === t.zoom.y;
|
|
4285
|
+
}
|
|
4286
|
+
function En(e, t, n, r) {
|
|
4129
4287
|
let i = (e, t) => e.dpr * ((t === "x" ? e.offsetX : e.offsetY) + e.meetScale * (t === "x" ? e.zoom.x : e.zoom.y)), a = t.dpr * t.meetScale * t.zoom.k / (r.dpr * r.meetScale * r.zoom.k);
|
|
4130
4288
|
e.setTransform(a, 0, 0, a, i(t, "x") - a * i(r, "x"), i(t, "y") - a * i(r, "y")), e.drawImage(n, 0, 0), e.setTransform(1, 0, 0, 1, 0, 0);
|
|
4131
4289
|
}
|
|
4132
|
-
function
|
|
4133
|
-
|
|
4290
|
+
function Dn(e, t) {
|
|
4291
|
+
if (typeof document > "u") {
|
|
4292
|
+
bn = null;
|
|
4293
|
+
return;
|
|
4294
|
+
}
|
|
4295
|
+
Q ||= document.createElement("canvas"), Q.width !== e.width && (Q.width = e.width), Q.height !== e.height && (Q.height = e.height);
|
|
4296
|
+
let n = Q.getContext("2d");
|
|
4297
|
+
n && typeof n.drawImage == "function" ? (n.setTransform(1, 0, 0, 1, 0, 0), n.clearRect(0, 0, Q.width, Q.height), n.drawImage(e, 0, 0), bn = t) : bn = null;
|
|
4298
|
+
}
|
|
4299
|
+
function On() {
|
|
4300
|
+
let e = Ee.value;
|
|
4134
4301
|
if (!e) return;
|
|
4135
4302
|
let t = e.getContext("2d");
|
|
4136
4303
|
if (!t) return;
|
|
4137
4304
|
let n = () => typeof performance < "u" ? performance.now() : 0;
|
|
4138
|
-
if (
|
|
4139
|
-
|
|
4140
|
-
if (dn && je && hn && gn && typeof t.drawImage == "function" && n() - _n < ni) {
|
|
4141
|
-
vn(t, r, hn, gn), z && Or(t, Ce, r, cn(), z);
|
|
4305
|
+
if (!L) {
|
|
4306
|
+
t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height);
|
|
4142
4307
|
return;
|
|
4143
4308
|
}
|
|
4144
|
-
let
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4309
|
+
let r = fn(), i = typeof t.drawImage == "function";
|
|
4310
|
+
if (!Sn && i && Q && bn && Q.width === e.width && Q.height === e.height && Tn(r, bn)) {
|
|
4311
|
+
t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height), t.drawImage(Q, 0, 0), R && kr(t, L, r, pn(), R);
|
|
4312
|
+
return;
|
|
4313
|
+
}
|
|
4314
|
+
if (!Sn && gn && z && i && Q && bn && n() - xn < pi) {
|
|
4315
|
+
t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height), En(t, r, Q, bn), R && kr(t, L, r, pn(), R);
|
|
4316
|
+
return;
|
|
4317
|
+
}
|
|
4318
|
+
let a = n();
|
|
4319
|
+
Ar(t, L, r, pn());
|
|
4320
|
+
let o = n() - a;
|
|
4321
|
+
xn = a + o, Sn = !1, o > fi ? (hn = 0, ++mn >= 2 && (gn = !0)) : (mn = 0, ++hn >= 2 && (gn = !1)), Dn(e, r), R && kr(t, L, r, pn(), R);
|
|
4322
|
+
}
|
|
4323
|
+
function kn() {
|
|
4324
|
+
!I.value || je || (je = requestAnimationFrame(() => {
|
|
4325
|
+
je = 0, On();
|
|
4155
4326
|
}));
|
|
4156
4327
|
}
|
|
4157
|
-
function
|
|
4328
|
+
function An() {
|
|
4329
|
+
I.value && (je &&= (cancelAnimationFrame(je), 0), On());
|
|
4330
|
+
}
|
|
4331
|
+
function jn() {
|
|
4332
|
+
typeof window > "u" || (Cn && window.clearTimeout(Cn), Cn = window.setTimeout(() => {
|
|
4333
|
+
Cn = 0, kn();
|
|
4334
|
+
}, mi));
|
|
4335
|
+
}
|
|
4336
|
+
function Mn(e, t) {
|
|
4337
|
+
let n = Ee.value;
|
|
4338
|
+
if (!n) return;
|
|
4339
|
+
er(n);
|
|
4340
|
+
let r = typeof window < "u" && window.devicePixelRatio || 1;
|
|
4341
|
+
if (n.width = Math.max(1, Math.round(e * r)), n.height = Math.max(1, Math.round(t * r)), gn && !Sn && L && Q && bn && typeof document < "u") {
|
|
4342
|
+
let e = n.getContext("2d");
|
|
4343
|
+
if (e && typeof e.drawImage == "function") {
|
|
4344
|
+
let t = fn();
|
|
4345
|
+
e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, n.width, n.height), En(e, t, Q, bn), R && kr(e, L, t, pn(), R), jn();
|
|
4346
|
+
return;
|
|
4347
|
+
}
|
|
4348
|
+
}
|
|
4349
|
+
An();
|
|
4350
|
+
}
|
|
4351
|
+
function Nn(e, t) {
|
|
4158
4352
|
let n = D.value;
|
|
4159
|
-
if (!n || !
|
|
4160
|
-
let r =
|
|
4353
|
+
if (!n || !L || !Oe) return null;
|
|
4354
|
+
let r = mt(e, t);
|
|
4161
4355
|
if (!r) return null;
|
|
4162
|
-
let [i, a] = pe(n).invert(r), o =
|
|
4163
|
-
return o == null ? null :
|
|
4356
|
+
let [i, a] = pe(n).invert(r), o = Nr(Oe, L, i, a);
|
|
4357
|
+
return o == null ? null : L.items[o].id;
|
|
4164
4358
|
}
|
|
4165
|
-
function
|
|
4166
|
-
let t = D.value, n =
|
|
4359
|
+
function Pn(e) {
|
|
4360
|
+
let t = D.value, n = zt.value.get(e);
|
|
4167
4361
|
if (!t || !n) return null;
|
|
4168
|
-
let [[r, i], [a, o]] =
|
|
4362
|
+
let [[r, i], [a, o]] = X.value.bounds(n), [s, c] = pe(t).apply([(r + a) / 2, (i + o) / 2]), l = null;
|
|
4169
4363
|
try {
|
|
4170
4364
|
l = t.getScreenCTM();
|
|
4171
4365
|
} catch {
|
|
@@ -4176,320 +4370,377 @@ var Nr = {
|
|
|
4176
4370
|
y: l.b * s + l.d * c + l.f
|
|
4177
4371
|
} : null;
|
|
4178
4372
|
}
|
|
4179
|
-
function
|
|
4180
|
-
if (
|
|
4181
|
-
let e =
|
|
4182
|
-
k.value?.setAttribute("stroke-width", String(t / e)),
|
|
4183
|
-
for (let { el: t, strokeWidth: n } of
|
|
4184
|
-
for (let [t, n] of
|
|
4185
|
-
|
|
4373
|
+
function Fn() {
|
|
4374
|
+
if (I.value) return;
|
|
4375
|
+
let e = ln(), t = It.value;
|
|
4376
|
+
k.value?.setAttribute("stroke-width", String(t / e)), Ce?.setAttribute("stroke-width", String(1 / e)), se.value?.setAttribute("stroke-width", String((t + 1.5) / e));
|
|
4377
|
+
for (let { el: t, strokeWidth: n } of Te.values()) n == null ? t.removeAttribute("stroke-width") : t.setAttribute("stroke-width", String(n / e));
|
|
4378
|
+
for (let [t, n] of we) t.setAttribute("stroke-width", String(un(n) / e));
|
|
4379
|
+
F && !we.has(F) && F.setAttribute("stroke-width", String(un() / e));
|
|
4186
4380
|
}
|
|
4187
|
-
function
|
|
4188
|
-
e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(
|
|
4381
|
+
function In(e, t) {
|
|
4382
|
+
e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(un(t) / ln())), e.style.stroke = t?.stroke ?? di, cn(e, t?.style);
|
|
4189
4383
|
}
|
|
4190
|
-
function
|
|
4384
|
+
function Ln(e) {
|
|
4191
4385
|
e.removeAttribute("stroke-width"), e.style.stroke = "", e.setAttribute("stroke", p.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
|
|
4192
4386
|
}
|
|
4193
|
-
function
|
|
4194
|
-
|
|
4387
|
+
function Rn(e) {
|
|
4388
|
+
F !== e && (F && !we.has(F) && Ln(F), F = e, In(e, we.get(e)));
|
|
4195
4389
|
}
|
|
4196
|
-
function
|
|
4197
|
-
if (
|
|
4198
|
-
if (
|
|
4199
|
-
|
|
4390
|
+
function zn(e) {
|
|
4391
|
+
if (I.value) {
|
|
4392
|
+
if (R === e) return;
|
|
4393
|
+
R = e, kn();
|
|
4200
4394
|
return;
|
|
4201
4395
|
}
|
|
4202
|
-
let t =
|
|
4203
|
-
t &&
|
|
4396
|
+
let t = xe.get(e);
|
|
4397
|
+
t && Rn(t);
|
|
4204
4398
|
}
|
|
4205
|
-
function
|
|
4206
|
-
if (
|
|
4207
|
-
|
|
4399
|
+
function Bn() {
|
|
4400
|
+
if (I.value) {
|
|
4401
|
+
R != null && (R = null, kn(), T("stateHover", null)), sn();
|
|
4208
4402
|
return;
|
|
4209
4403
|
}
|
|
4210
|
-
if (
|
|
4211
|
-
let e =
|
|
4212
|
-
e == null ?
|
|
4404
|
+
if (F) {
|
|
4405
|
+
let e = we.get(F);
|
|
4406
|
+
e == null ? Ln(F) : In(F, e), F = null, T("stateHover", null);
|
|
4213
4407
|
}
|
|
4214
|
-
|
|
4408
|
+
sn();
|
|
4215
4409
|
}
|
|
4216
|
-
function
|
|
4410
|
+
function Vn(e) {
|
|
4217
4411
|
let t = e;
|
|
4218
4412
|
for (; t && !t.dataset?.featId;) t = t.parentElement;
|
|
4219
4413
|
return t ? t.dataset.featId ?? null : null;
|
|
4220
4414
|
}
|
|
4221
|
-
function
|
|
4415
|
+
function Hn(e) {
|
|
4222
4416
|
T("stateClick", {
|
|
4223
4417
|
id: e.id,
|
|
4224
4418
|
name: e.name,
|
|
4225
4419
|
value: e.value
|
|
4226
|
-
}), T("update:focus",
|
|
4420
|
+
}), T("update:focus", nt(Bt.value).has(e.id) ? null : e.id);
|
|
4227
4421
|
}
|
|
4228
|
-
function
|
|
4229
|
-
if (e.type === "mouseover" &&
|
|
4230
|
-
let t = e, n =
|
|
4422
|
+
function Un(e) {
|
|
4423
|
+
if (e.type === "mouseover" && z) return;
|
|
4424
|
+
let t = e, n = Jn(t.target, t.clientX, t.clientY);
|
|
4231
4425
|
if (!n) return;
|
|
4232
|
-
let r =
|
|
4426
|
+
let r = Se.get(n);
|
|
4233
4427
|
if (!r) return;
|
|
4234
4428
|
let i = {
|
|
4235
4429
|
id: r.id,
|
|
4236
4430
|
name: r.name,
|
|
4237
4431
|
value: r.value
|
|
4238
4432
|
};
|
|
4239
|
-
e.type === "click" ? p.zoom ? (window.clearTimeout(
|
|
4240
|
-
|
|
4241
|
-
},
|
|
4433
|
+
e.type === "click" ? p.zoom ? (window.clearTimeout(q), q = 0, t.detail <= 1 && (q = window.setTimeout(() => {
|
|
4434
|
+
q = 0, Hn(r);
|
|
4435
|
+
}, ii))) : Hn(r) : e.type === "mouseover" && (zn(n), N.value && an(n, t.clientX, t.clientY), T("stateHover", i));
|
|
4242
4436
|
}
|
|
4243
|
-
function
|
|
4244
|
-
|
|
4437
|
+
function Wn(e) {
|
|
4438
|
+
z || on(e.clientX, e.clientY);
|
|
4245
4439
|
}
|
|
4246
|
-
function
|
|
4440
|
+
function Gn(e) {
|
|
4247
4441
|
let t = e.relatedTarget;
|
|
4248
|
-
t && O.value?.contains(t) ||
|
|
4442
|
+
t && O.value?.contains(t) || Bn();
|
|
4249
4443
|
}
|
|
4250
|
-
function
|
|
4251
|
-
if (
|
|
4252
|
-
let t =
|
|
4253
|
-
if (t ===
|
|
4254
|
-
t &&
|
|
4444
|
+
function Kn(e) {
|
|
4445
|
+
if (z) return;
|
|
4446
|
+
let t = Nn(e.clientX, e.clientY);
|
|
4447
|
+
if (t === R) {
|
|
4448
|
+
t && on(e.clientX, e.clientY);
|
|
4255
4449
|
return;
|
|
4256
4450
|
}
|
|
4257
4451
|
if (!t) {
|
|
4258
|
-
|
|
4452
|
+
Bn();
|
|
4259
4453
|
return;
|
|
4260
4454
|
}
|
|
4261
|
-
let n =
|
|
4262
|
-
n && (
|
|
4455
|
+
let n = Se.get(t);
|
|
4456
|
+
n && (zn(t), T("stateHover", {
|
|
4263
4457
|
id: n.id,
|
|
4264
4458
|
name: n.name,
|
|
4265
4459
|
value: n.value
|
|
4266
|
-
}), N.value &&
|
|
4460
|
+
}), N.value && an(t, e.clientX, e.clientY));
|
|
4267
4461
|
}
|
|
4268
|
-
function
|
|
4269
|
-
|
|
4462
|
+
function qn() {
|
|
4463
|
+
Bn();
|
|
4270
4464
|
}
|
|
4271
|
-
function
|
|
4272
|
-
return
|
|
4465
|
+
function Jn(e, t, n) {
|
|
4466
|
+
return I.value ? Nn(t, n) : Vn(e);
|
|
4273
4467
|
}
|
|
4274
|
-
function
|
|
4468
|
+
function Yn(e) {
|
|
4275
4469
|
if (e.touches.length !== 1) {
|
|
4276
|
-
|
|
4470
|
+
qe = null;
|
|
4277
4471
|
return;
|
|
4278
4472
|
}
|
|
4279
4473
|
let t = e.touches[0];
|
|
4280
|
-
|
|
4474
|
+
qe = {
|
|
4281
4475
|
x: t.clientX,
|
|
4282
4476
|
y: t.clientY,
|
|
4283
4477
|
time: e.timeStamp,
|
|
4284
|
-
featId:
|
|
4478
|
+
featId: Jn(e.target, t.clientX, t.clientY)
|
|
4285
4479
|
};
|
|
4286
4480
|
}
|
|
4287
|
-
function
|
|
4288
|
-
let t =
|
|
4289
|
-
if (
|
|
4481
|
+
function Xn(e) {
|
|
4482
|
+
let t = qe;
|
|
4483
|
+
if (qe = null, !t || e.touches.length > 0) return;
|
|
4290
4484
|
let n = e.changedTouches[0];
|
|
4291
|
-
if (!n || Math.abs(n.clientX - t.x) >
|
|
4292
|
-
if (p.zoom && !
|
|
4485
|
+
if (!n || Math.abs(n.clientX - t.x) > ni || Math.abs(n.clientY - t.y) > ni || e.timeStamp - t.time > ri) return;
|
|
4486
|
+
if (p.zoom && !He.value && K() && !$.isFullscreen.value) {
|
|
4293
4487
|
e.cancelable && e.preventDefault();
|
|
4294
|
-
let r =
|
|
4295
|
-
if (
|
|
4488
|
+
let r = Je;
|
|
4489
|
+
if (Je = {
|
|
4296
4490
|
x: n.clientX,
|
|
4297
4491
|
y: n.clientY,
|
|
4298
4492
|
time: e.timeStamp
|
|
4299
|
-
}, r != null && e.timeStamp - r.time <=
|
|
4300
|
-
|
|
4493
|
+
}, r != null && e.timeStamp - r.time <= ii && Math.abs(n.clientX - r.x) <= ai && Math.abs(n.clientY - r.y) <= ai) {
|
|
4494
|
+
Je = null, window.clearTimeout(q), q = 0, p.touchExpand ? _t(n.clientX, n.clientY) : vt(n.clientX, n.clientY);
|
|
4301
4495
|
return;
|
|
4302
4496
|
}
|
|
4303
|
-
let i = t.featId ?
|
|
4497
|
+
let i = t.featId ? Se.get(t.featId) : void 0;
|
|
4304
4498
|
if (!i) {
|
|
4305
|
-
|
|
4499
|
+
Bn();
|
|
4306
4500
|
return;
|
|
4307
4501
|
}
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
},
|
|
4502
|
+
Zn(i, n.clientX, n.clientY), window.clearTimeout(q), q = window.setTimeout(() => {
|
|
4503
|
+
q = 0, Hn(i);
|
|
4504
|
+
}, ii);
|
|
4311
4505
|
return;
|
|
4312
4506
|
}
|
|
4313
4507
|
if (!t.featId) {
|
|
4314
|
-
|
|
4508
|
+
Bn();
|
|
4315
4509
|
return;
|
|
4316
4510
|
}
|
|
4317
|
-
let r =
|
|
4318
|
-
r && (e.cancelable && e.preventDefault(),
|
|
4511
|
+
let r = Se.get(t.featId);
|
|
4512
|
+
r && (e.cancelable && e.preventDefault(), Zn(r, n.clientX, n.clientY), Hn(r));
|
|
4319
4513
|
}
|
|
4320
|
-
function
|
|
4321
|
-
if (
|
|
4514
|
+
function Zn(e, t, n) {
|
|
4515
|
+
if (zn(e.id), T("stateHover", {
|
|
4322
4516
|
id: e.id,
|
|
4323
4517
|
name: e.name,
|
|
4324
4518
|
value: e.value
|
|
4325
4519
|
}), !N.value) return;
|
|
4326
|
-
if (
|
|
4327
|
-
let r =
|
|
4328
|
-
r ?
|
|
4520
|
+
if (I.value) {
|
|
4521
|
+
let r = Pn(e.id);
|
|
4522
|
+
r ? an(e.id, r.x, r.y) : an(e.id, t, n);
|
|
4329
4523
|
return;
|
|
4330
4524
|
}
|
|
4331
|
-
let r =
|
|
4525
|
+
let r = xe.get(e.id);
|
|
4332
4526
|
if (r) {
|
|
4333
4527
|
let t = r.getBoundingClientRect();
|
|
4334
|
-
|
|
4335
|
-
} else
|
|
4528
|
+
an(e.id, t.left + t.width / 2, t.top + t.height / 2);
|
|
4529
|
+
} else an(e.id, t, n);
|
|
4336
4530
|
}
|
|
4337
|
-
function
|
|
4338
|
-
|
|
4531
|
+
function Qn() {
|
|
4532
|
+
qe = null;
|
|
4339
4533
|
}
|
|
4340
|
-
function
|
|
4341
|
-
let t = document.createElementNS(
|
|
4534
|
+
function $n(e) {
|
|
4535
|
+
let t = document.createElementNS(ti, "path");
|
|
4342
4536
|
return e && t.setAttribute("d", e), t;
|
|
4343
4537
|
}
|
|
4344
|
-
function
|
|
4538
|
+
function er(e) {
|
|
4539
|
+
let t = D.value, n = oe.value?.getBoundingClientRect();
|
|
4540
|
+
if (!e || !t || !n) return;
|
|
4541
|
+
let r = t.getBoundingClientRect();
|
|
4542
|
+
e.style.top = `${r.top - n.top}px`, e.style.left = `${r.left - n.left}px`, e.style.width = `${r.width}px`, e.style.height = `${r.height}px`;
|
|
4543
|
+
}
|
|
4544
|
+
function tr() {
|
|
4545
|
+
let e = ce.value;
|
|
4546
|
+
if (!e) return;
|
|
4547
|
+
let t = p.cities, n = Ft.value;
|
|
4548
|
+
if (!t || t.length === 0 || !n) {
|
|
4549
|
+
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
4550
|
+
return;
|
|
4551
|
+
}
|
|
4552
|
+
for (er(le.value); e.firstChild;) e.removeChild(e.firstChild);
|
|
4553
|
+
let r = D.value ? pe(D.value) : {
|
|
4554
|
+
k: 1,
|
|
4555
|
+
x: 0,
|
|
4556
|
+
y: 0
|
|
4557
|
+
}, i = p.zoom ? t.filter((e) => r.k >= (e.minZoom ?? p.citiesMinZoom)) : t;
|
|
4558
|
+
if (i.length === 0) return;
|
|
4559
|
+
let a = Wr(i, (e) => n(e), {
|
|
4560
|
+
k: r.k,
|
|
4561
|
+
x: r.x,
|
|
4562
|
+
y: r.y
|
|
4563
|
+
}, {
|
|
4564
|
+
width: bt.value,
|
|
4565
|
+
height: xt.value,
|
|
4566
|
+
viewScale: Be.value,
|
|
4567
|
+
labelPx: hi,
|
|
4568
|
+
dotPx: gi,
|
|
4569
|
+
gapPx: _i,
|
|
4570
|
+
margin: 4
|
|
4571
|
+
}), o = Be.value || 1, s = hi / o, c = vi / o, l = yi / o, u = document.createDocumentFragment();
|
|
4572
|
+
for (let e of a) {
|
|
4573
|
+
let t = document.createElementNS(ti, "circle");
|
|
4574
|
+
if (t.setAttribute("cx", String(e.x)), t.setAttribute("cy", String(e.y)), t.setAttribute("r", String(e.radius)), t.setAttribute("class", "choropleth-city-dot"), t.setAttribute("stroke-width", String(c)), u.appendChild(t), e.label) {
|
|
4575
|
+
let t = document.createElementNS(ti, "text");
|
|
4576
|
+
t.setAttribute("x", String(e.label.x)), t.setAttribute("y", String(e.label.y)), t.setAttribute("text-anchor", e.label.anchor), t.setAttribute("dominant-baseline", "central"), t.setAttribute("font-size", String(s)), t.setAttribute("stroke-width", String(l)), t.setAttribute("class", e.capital ? "choropleth-city-label choropleth-city-label-capital" : "choropleth-city-label"), t.textContent = e.name, u.appendChild(t);
|
|
4577
|
+
}
|
|
4578
|
+
}
|
|
4579
|
+
e.appendChild(u);
|
|
4580
|
+
}
|
|
4581
|
+
function nr() {
|
|
4582
|
+
Me ||= requestAnimationFrame(() => {
|
|
4583
|
+
Me = 0, tr();
|
|
4584
|
+
});
|
|
4585
|
+
}
|
|
4586
|
+
function rr() {
|
|
4345
4587
|
let e = k.value, t = se.value;
|
|
4346
4588
|
if (!e || !t) return;
|
|
4347
4589
|
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
4348
4590
|
for (; t.firstChild;) t.removeChild(t.firstChild);
|
|
4349
|
-
|
|
4350
|
-
let n =
|
|
4591
|
+
xe.clear(), Se.clear(), Ce = null, F = null, we.clear(), Te.clear(), R = null, ke.clear(), Ae = [];
|
|
4592
|
+
let n = X.value, r = kt.value.features;
|
|
4351
4593
|
if (r.length === 0) {
|
|
4352
|
-
|
|
4594
|
+
L = null, Oe = null, bn = null, wn(), kn();
|
|
4353
4595
|
return;
|
|
4354
4596
|
}
|
|
4355
|
-
if (
|
|
4597
|
+
if (I.value) {
|
|
4356
4598
|
for (let e of r) {
|
|
4357
4599
|
let t = String(e.id);
|
|
4358
|
-
|
|
4600
|
+
Se.set(t, {
|
|
4359
4601
|
id: t,
|
|
4360
|
-
name:
|
|
4361
|
-
value:
|
|
4602
|
+
name: Qt(e),
|
|
4603
|
+
value: Z(t),
|
|
4362
4604
|
feature: e
|
|
4363
4605
|
});
|
|
4364
4606
|
}
|
|
4365
|
-
let e =
|
|
4366
|
-
|
|
4607
|
+
let e = jt.value;
|
|
4608
|
+
L = wr(r, n, Zt, e ? n(e) : null), !De && typeof document < "u" && (De = document.createElement("canvas")), Oe = De ? Mr(L, bt.value, xt.value, De) : null, wn(), kn();
|
|
4367
4609
|
return;
|
|
4368
4610
|
}
|
|
4369
4611
|
let i = p.strokeColor, a = !N.value, o = document.createDocumentFragment();
|
|
4370
4612
|
for (let e of r) {
|
|
4371
|
-
let t = String(e.id), r =
|
|
4372
|
-
if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill",
|
|
4373
|
-
let e = document.createElementNS(
|
|
4374
|
-
e.textContent =
|
|
4613
|
+
let t = String(e.id), r = Qt(e), s = Z(t), c = $n(n(e));
|
|
4614
|
+
if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill", Zt(t)), c.setAttribute("stroke", i), a) {
|
|
4615
|
+
let e = document.createElementNS(ti, "title");
|
|
4616
|
+
e.textContent = en(r, s), c.appendChild(e);
|
|
4375
4617
|
}
|
|
4376
|
-
o.appendChild(c),
|
|
4618
|
+
o.appendChild(c), xe.set(t, c), Se.set(t, {
|
|
4377
4619
|
id: t,
|
|
4378
4620
|
name: r,
|
|
4379
4621
|
value: s,
|
|
4380
4622
|
feature: e
|
|
4381
4623
|
});
|
|
4382
4624
|
}
|
|
4383
|
-
let s =
|
|
4625
|
+
let s = jt.value;
|
|
4384
4626
|
if (s) {
|
|
4385
|
-
let e =
|
|
4386
|
-
e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), o.appendChild(e),
|
|
4627
|
+
let e = $n(n(s));
|
|
4628
|
+
e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), o.appendChild(e), Ce = e;
|
|
4387
4629
|
}
|
|
4388
|
-
e.appendChild(o),
|
|
4630
|
+
e.appendChild(o), Fn();
|
|
4389
4631
|
}
|
|
4390
|
-
function
|
|
4391
|
-
if (
|
|
4392
|
-
if (
|
|
4393
|
-
for (let [e, t] of
|
|
4394
|
-
|
|
4632
|
+
function ir() {
|
|
4633
|
+
if (I.value) {
|
|
4634
|
+
if (L) for (let e of L.items) e.fill = Zt(e.id);
|
|
4635
|
+
for (let [e, t] of Se) t.value = Z(e);
|
|
4636
|
+
wn(), kn();
|
|
4395
4637
|
return;
|
|
4396
4638
|
}
|
|
4397
4639
|
let e = !N.value;
|
|
4398
|
-
for (let [t, n] of
|
|
4399
|
-
let r =
|
|
4400
|
-
if (n.setAttribute("fill",
|
|
4640
|
+
for (let [t, n] of xe) {
|
|
4641
|
+
let r = Z(t), i = Se.get(t);
|
|
4642
|
+
if (n.setAttribute("fill", Zt(t)), i && (i.value = r), e && i) {
|
|
4401
4643
|
let e = n.firstElementChild;
|
|
4402
|
-
e && (e.textContent =
|
|
4644
|
+
e && (e.textContent = en(i.name, r));
|
|
4403
4645
|
}
|
|
4404
4646
|
}
|
|
4405
4647
|
}
|
|
4406
|
-
function
|
|
4407
|
-
if (
|
|
4408
|
-
|
|
4648
|
+
function ar() {
|
|
4649
|
+
if (I.value) {
|
|
4650
|
+
wn(), kn();
|
|
4409
4651
|
return;
|
|
4410
4652
|
}
|
|
4411
|
-
for (let e of
|
|
4412
|
-
|
|
4653
|
+
for (let e of xe.values()) e === F || we.has(e) || Ln(e);
|
|
4654
|
+
Ce && Ce.setAttribute("stroke", p.strokeColor), Fn();
|
|
4413
4655
|
}
|
|
4414
|
-
function
|
|
4656
|
+
function or() {
|
|
4415
4657
|
return typeof p.menu == "string" ? p.menu : "choropleth";
|
|
4416
4658
|
}
|
|
4417
|
-
let
|
|
4659
|
+
let sr = n(() => p.legend && (Wt.value || Gt.value || p.data)), cr = n(() => p.colorScale.slice().sort((e, t) => e.min - t.min)), lr = n(() => {
|
|
4418
4660
|
let e = [];
|
|
4419
4661
|
for (let t = 0; t <= 10; t++) {
|
|
4420
4662
|
let n = t / 10;
|
|
4421
4663
|
e.push({
|
|
4422
4664
|
offset: `${(n * 100).toFixed(0)}%`,
|
|
4423
|
-
color:
|
|
4665
|
+
color: Jt(n)
|
|
4424
4666
|
});
|
|
4425
4667
|
}
|
|
4426
4668
|
return e;
|
|
4427
|
-
}),
|
|
4669
|
+
}), ur = new Intl.NumberFormat("en-US", {
|
|
4428
4670
|
notation: "compact",
|
|
4429
4671
|
maximumFractionDigits: 1
|
|
4430
|
-
}),
|
|
4431
|
-
let { min: e, max: t } =
|
|
4672
|
+
}), dr = n(() => {
|
|
4673
|
+
let { min: e, max: t } = Ut.value, n = t - e, r = [];
|
|
4432
4674
|
for (let t = 1; t <= 3; t++) {
|
|
4433
|
-
let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ?
|
|
4675
|
+
let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? ur.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
|
|
4434
4676
|
r.push({
|
|
4435
4677
|
value: o,
|
|
4436
4678
|
pct: i * 100
|
|
4437
4679
|
});
|
|
4438
4680
|
}
|
|
4439
4681
|
return r;
|
|
4440
|
-
}),
|
|
4682
|
+
}), fr = n(() => {
|
|
4441
4683
|
let e = [];
|
|
4442
|
-
if (
|
|
4684
|
+
if (Wt.value) for (let t of p.colorScale) e.push({
|
|
4443
4685
|
key: t.value,
|
|
4444
4686
|
color: t.color,
|
|
4445
4687
|
label: t.value
|
|
4446
4688
|
});
|
|
4447
|
-
else if (
|
|
4689
|
+
else if (Gt.value) for (let t of cr.value) e.push({
|
|
4448
4690
|
key: String(t.min),
|
|
4449
4691
|
color: t.color,
|
|
4450
4692
|
label: t.label ?? String(t.min)
|
|
4451
4693
|
});
|
|
4452
4694
|
return e;
|
|
4453
|
-
}),
|
|
4454
|
-
let e =
|
|
4455
|
-
return
|
|
4695
|
+
}), pr = n(() => `linear-gradient(to right, ${lr.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), $ = J({ target: () => p.fullscreenTarget }), mr = n(() => {
|
|
4696
|
+
let e = or();
|
|
4697
|
+
return I.value ? [$.menuItem.value, {
|
|
4456
4698
|
label: "Save as PNG",
|
|
4457
4699
|
action: () => {
|
|
4458
|
-
|
|
4700
|
+
Ee.value && Re(Ee.value, e);
|
|
4459
4701
|
}
|
|
4460
4702
|
}] : [
|
|
4461
4703
|
$.menuItem.value,
|
|
4462
4704
|
{
|
|
4463
4705
|
label: "Save as SVG",
|
|
4464
4706
|
action: () => {
|
|
4465
|
-
D.value &&
|
|
4707
|
+
D.value && G(D.value, e);
|
|
4466
4708
|
}
|
|
4467
4709
|
},
|
|
4468
4710
|
{
|
|
4469
4711
|
label: "Save as PNG",
|
|
4470
4712
|
action: () => {
|
|
4471
|
-
D.value &&
|
|
4713
|
+
D.value && Le(D.value, e);
|
|
4472
4714
|
}
|
|
4473
4715
|
}
|
|
4474
4716
|
];
|
|
4475
4717
|
});
|
|
4476
4718
|
return C(() => [
|
|
4477
|
-
|
|
4478
|
-
|
|
4719
|
+
kt.value,
|
|
4720
|
+
X.value,
|
|
4479
4721
|
N.value
|
|
4480
|
-
], () =>
|
|
4481
|
-
|
|
4722
|
+
], () => rr()), C(() => [
|
|
4723
|
+
Ht.value,
|
|
4482
4724
|
p.colorScale,
|
|
4483
4725
|
p.noDataColor,
|
|
4484
4726
|
p.dataGeoType
|
|
4485
|
-
], () =>
|
|
4727
|
+
], () => ir()), C(() => [p.strokeColor, It.value], () => ar()), C(() => [
|
|
4728
|
+
Bt.value,
|
|
4729
|
+
X.value,
|
|
4730
|
+
Tt.value
|
|
4731
|
+
], () => it(), { flush: "post" }), C(() => [
|
|
4732
|
+
p.cities,
|
|
4486
4733
|
Ft.value,
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4734
|
+
Be.value,
|
|
4735
|
+
p.citiesMinZoom,
|
|
4736
|
+
p.zoom,
|
|
4737
|
+
p.title,
|
|
4738
|
+
p.legend,
|
|
4739
|
+
p.legendTitle
|
|
4740
|
+
], () => nr(), { flush: "post" }), C(() => $.isFullscreen.value, (e) => {
|
|
4741
|
+
if (sn(), e || !K() || !D.value || !U) return;
|
|
4491
4742
|
let t = M(D.value);
|
|
4492
|
-
t.interrupt(),
|
|
4743
|
+
t.interrupt(), U.transform(t, fe);
|
|
4493
4744
|
}), (n, l) => (_(), r(t, {
|
|
4494
4745
|
to: x($).teleportTarget.value,
|
|
4495
4746
|
disabled: !x($).isFullscreen.value
|
|
@@ -4498,16 +4749,16 @@ var Nr = {
|
|
|
4498
4749
|
ref: oe
|
|
4499
4750
|
}, n.$attrs, {
|
|
4500
4751
|
class: ["choropleth-wrapper", {
|
|
4501
|
-
pannable:
|
|
4752
|
+
pannable: lt.value,
|
|
4502
4753
|
"is-fullscreen": x($).isFullscreen.value
|
|
4503
4754
|
}],
|
|
4504
4755
|
style: x($).fullscreenStyle.value,
|
|
4505
4756
|
role: ie.value || void 0,
|
|
4506
4757
|
"aria-label": ne.value || void 0
|
|
4507
4758
|
}), [
|
|
4508
|
-
c.menu || x($).isFullscreen.value ? (_(), r(
|
|
4759
|
+
c.menu || x($).isFullscreen.value ? (_(), r(ye, {
|
|
4509
4760
|
key: 0,
|
|
4510
|
-
items:
|
|
4761
|
+
items: mr.value,
|
|
4511
4762
|
"is-fullscreen": x($).isFullscreen.value,
|
|
4512
4763
|
onClose: x($).exit
|
|
4513
4764
|
}, null, 8, [
|
|
@@ -4515,42 +4766,42 @@ var Nr = {
|
|
|
4515
4766
|
"is-fullscreen",
|
|
4516
4767
|
"onClose"
|
|
4517
4768
|
])) : i("", !0),
|
|
4518
|
-
o("div",
|
|
4519
|
-
c.title ||
|
|
4769
|
+
o("div", Kr, b(x($).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
|
|
4770
|
+
c.title || sr.value ? (_(), a("div", qr, [c.title ? (_(), a("div", {
|
|
4520
4771
|
key: 0,
|
|
4521
4772
|
class: "choropleth-title",
|
|
4522
|
-
style: h(
|
|
4523
|
-
}, b(c.title), 5)) : i("", !0),
|
|
4773
|
+
style: h(be.value)
|
|
4774
|
+
}, b(c.title), 5)) : i("", !0), sr.value ? (_(), a("div", {
|
|
4524
4775
|
key: 1,
|
|
4525
4776
|
class: "choropleth-legend",
|
|
4526
|
-
style: h(
|
|
4527
|
-
}, [c.legendTitle ? (_(), a("span",
|
|
4777
|
+
style: h(P.value)
|
|
4778
|
+
}, [c.legendTitle ? (_(), a("span", Jr, b(c.legendTitle), 1)) : i("", !0), Wt.value || Gt.value ? (_(!0), a(e, { key: 1 }, y(fr.value, (e) => (_(), a("span", {
|
|
4528
4779
|
key: e.key,
|
|
4529
4780
|
class: "choropleth-legend-item"
|
|
4530
4781
|
}, [o("span", {
|
|
4531
4782
|
class: "choropleth-legend-swatch",
|
|
4532
4783
|
style: h({ background: e.color })
|
|
4533
|
-
}, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div",
|
|
4784
|
+
}, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div", Yr, [o("div", {
|
|
4534
4785
|
class: "choropleth-legend-gradient",
|
|
4535
|
-
style: h({ background:
|
|
4536
|
-
}, null, 4), o("div",
|
|
4786
|
+
style: h({ background: pr.value })
|
|
4787
|
+
}, null, 4), o("div", Xr, [(_(!0), a(e, null, y(dr.value, (e) => (_(), a("span", {
|
|
4537
4788
|
key: e.value,
|
|
4538
4789
|
style: h({ left: e.pct + "%" })
|
|
4539
4790
|
}, b(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
|
|
4540
|
-
|
|
4541
|
-
|
|
4791
|
+
ut.value ? (_(), a("div", Zr, b(dt.value), 1)) : i("", !0),
|
|
4792
|
+
I.value ? (_(), a("canvas", {
|
|
4542
4793
|
key: 3,
|
|
4543
4794
|
ref_key: "canvasRef",
|
|
4544
|
-
ref:
|
|
4795
|
+
ref: Ee,
|
|
4545
4796
|
class: "choropleth-canvas",
|
|
4546
4797
|
"aria-hidden": "true"
|
|
4547
4798
|
}, null, 512)) : i("", !0),
|
|
4548
4799
|
(_(), a("svg", {
|
|
4549
4800
|
ref_key: "svgRef",
|
|
4550
4801
|
ref: D,
|
|
4551
|
-
viewBox: `0 0 ${
|
|
4802
|
+
viewBox: `0 0 ${bt.value} ${xt.value}`,
|
|
4552
4803
|
preserveAspectRatio: "xMidYMid meet",
|
|
4553
|
-
style: h(
|
|
4804
|
+
style: h(ft.value)
|
|
4554
4805
|
}, [o("g", {
|
|
4555
4806
|
ref_key: "mapGroupRef",
|
|
4556
4807
|
ref: O
|
|
@@ -4560,37 +4811,50 @@ var Nr = {
|
|
|
4560
4811
|
}, null, 512), o("g", {
|
|
4561
4812
|
ref_key: "overlayGroupRef",
|
|
4562
4813
|
ref: se
|
|
4563
|
-
}, null, 512)], 512)], 12,
|
|
4564
|
-
|
|
4814
|
+
}, null, 512)], 512)], 12, Qr)),
|
|
4815
|
+
c.cities && c.cities.length ? (_(), a("svg", {
|
|
4565
4816
|
key: 4,
|
|
4566
|
-
"
|
|
4567
|
-
|
|
4568
|
-
"
|
|
4817
|
+
ref_key: "cityOverlayRef",
|
|
4818
|
+
ref: le,
|
|
4819
|
+
class: "choropleth-city-overlay",
|
|
4820
|
+
viewBox: `0 0 ${bt.value} ${xt.value}`,
|
|
4821
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
4822
|
+
"aria-hidden": "true"
|
|
4823
|
+
}, [o("g", {
|
|
4824
|
+
ref_key: "cityLayerRef",
|
|
4825
|
+
ref: ce,
|
|
4826
|
+
class: "choropleth-cities"
|
|
4827
|
+
}, null, 512)], 8, $r)) : i("", !0),
|
|
4828
|
+
ct.value ? (_(), r(x(Ze), {
|
|
4829
|
+
key: 5,
|
|
4830
|
+
"can-zoom-in": ze.value < st.value,
|
|
4831
|
+
"can-zoom-out": ze.value > 1,
|
|
4832
|
+
"can-reset": W.value,
|
|
4569
4833
|
"is-fullscreen": x($).isFullscreen.value,
|
|
4570
|
-
onZoomIn: l[0] ||= (e) =>
|
|
4571
|
-
onZoomOut: l[1] ||= (e) =>
|
|
4572
|
-
onReset:
|
|
4834
|
+
onZoomIn: l[0] ||= (e) => pt(si),
|
|
4835
|
+
onZoomOut: l[1] ||= (e) => pt(1 / si),
|
|
4836
|
+
onReset: ot
|
|
4573
4837
|
}, null, 8, [
|
|
4574
4838
|
"can-zoom-in",
|
|
4575
4839
|
"can-zoom-out",
|
|
4576
4840
|
"can-reset",
|
|
4577
4841
|
"is-fullscreen"
|
|
4578
4842
|
])) : i("", !0),
|
|
4579
|
-
N.value ? (_(), r(
|
|
4580
|
-
key:
|
|
4843
|
+
N.value ? (_(), r(Fr, {
|
|
4844
|
+
key: 6,
|
|
4581
4845
|
ref_key: "tooltipChildRef",
|
|
4582
|
-
ref:
|
|
4583
|
-
mode:
|
|
4846
|
+
ref: _e,
|
|
4847
|
+
mode: rn.value
|
|
4584
4848
|
}, {
|
|
4585
4849
|
default: w((t) => [te(n.$slots, "tooltip", m(u(E(t))), () => [c.tooltipFormat ? (_(), a("span", {
|
|
4586
4850
|
key: 0,
|
|
4587
4851
|
innerHTML: c.tooltipFormat(t)
|
|
4588
|
-
}, null, 8,
|
|
4852
|
+
}, null, 8, ei)) : t.value == null ? (_(), a(e, { key: 1 }, [s(b(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(b(t.name) + ": " + b($t(t.value)), 1)], 64))], !0)]),
|
|
4589
4853
|
_: 3
|
|
4590
4854
|
}, 8, ["mode"])) : i("", !0)
|
|
4591
|
-
], 16,
|
|
4855
|
+
], 16, Gr)], 8, ["to", "disabled"]));
|
|
4592
4856
|
}
|
|
4593
|
-
}), [["__scopeId", "data-v-
|
|
4857
|
+
}), [["__scopeId", "data-v-529f8dad"]]), xi = /* @__PURE__ */ N(/* @__PURE__ */ l({
|
|
4594
4858
|
__name: "ChartTooltip",
|
|
4595
4859
|
props: {
|
|
4596
4860
|
x: {},
|
|
@@ -4641,7 +4905,7 @@ var Nr = {
|
|
|
4641
4905
|
_: 3
|
|
4642
4906
|
}, 8, ["open"])) : i("", !0);
|
|
4643
4907
|
}
|
|
4644
|
-
}), [["__scopeId", "data-v-44377f70"]]),
|
|
4908
|
+
}), [["__scopeId", "data-v-44377f70"]]), Si = { class: "TableWrapper" }, Ci = ["href", "download"], wi = /* @__PURE__ */ N(/* @__PURE__ */ l({
|
|
4645
4909
|
__name: "DataTable",
|
|
4646
4910
|
props: {
|
|
4647
4911
|
data: {},
|
|
@@ -4735,15 +4999,15 @@ var Nr = {
|
|
|
4735
4999
|
function x() {
|
|
4736
5000
|
if (typeof c.csv == "function") return c.csv();
|
|
4737
5001
|
if (typeof c.csv == "string") return c.csv;
|
|
4738
|
-
let e = v.value, t = te.value, n = [e.map((e) =>
|
|
5002
|
+
let e = v.value, t = te.value, n = [e.map((e) => et(l(e.name))).join(",")];
|
|
4739
5003
|
for (let r = 0; r < t; r++) {
|
|
4740
|
-
let t = e.map((e) =>
|
|
5004
|
+
let t = e.map((e) => et(ne(e, r)));
|
|
4741
5005
|
n.push(t.join(","));
|
|
4742
5006
|
}
|
|
4743
5007
|
return n.join("\n");
|
|
4744
5008
|
}
|
|
4745
5009
|
function S() {
|
|
4746
|
-
|
|
5010
|
+
ze(x(), re());
|
|
4747
5011
|
}
|
|
4748
5012
|
let ie = n(() => c.downloadButton || c.downloadLink ? [] : [{
|
|
4749
5013
|
label: c.downloadMenuLink,
|
|
@@ -4757,12 +5021,12 @@ var Nr = {
|
|
|
4757
5021
|
"full-width": t.fullWidth,
|
|
4758
5022
|
"has-menu": T.value
|
|
4759
5023
|
}]) }, [
|
|
4760
|
-
T.value ? (_(), r(
|
|
5024
|
+
T.value ? (_(), r(ye, {
|
|
4761
5025
|
key: 0,
|
|
4762
5026
|
items: ie.value,
|
|
4763
5027
|
"force-dropdown": ""
|
|
4764
5028
|
}, null, 8, ["items"])) : i("", !0),
|
|
4765
|
-
o("div",
|
|
5029
|
+
o("div", Si, [o("table", { class: p(["Table", { "full-width": t.fullWidth }]) }, [
|
|
4766
5030
|
o("colgroup", null, [(_(!0), a(e, null, y(v.value, (e) => (_(), a("col", {
|
|
4767
5031
|
key: e.name,
|
|
4768
5032
|
style: h(u(e.name))
|
|
@@ -4788,9 +5052,9 @@ var Nr = {
|
|
|
4788
5052
|
class: "data-table-download-link",
|
|
4789
5053
|
href: w.value,
|
|
4790
5054
|
download: `${re()}.csv`
|
|
4791
|
-
}, b(C.value), 9,
|
|
5055
|
+
}, b(C.value), 9, Ci)) : i("", !0)
|
|
4792
5056
|
], 2));
|
|
4793
5057
|
}
|
|
4794
5058
|
}), [["__scopeId", "data-v-9b1b6a76"]]);
|
|
4795
5059
|
//#endregion
|
|
4796
|
-
export {
|
|
5060
|
+
export { br as BarChart, xi as ChartTooltip, bi as ChoroplethMap, wi as DataTable, Vn as LineChart };
|