vue-data-ui 3.1.17 → 3.1.19-next.0
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/{Arrow-DFX_NfRh.js → Arrow-cyyFTTnm.js} +7 -7
- package/dist/{BaseDraggableDialog-CrCjMg89.js → BaseDraggableDialog-Bf6A6G_f.js} +2 -2
- package/dist/{BaseIcon-7s-tCFcQ.js → BaseIcon-D2f9w5Z5.js} +1 -1
- package/dist/{ColorPicker-BoLH_m_Z.js → ColorPicker-gaAecgEC.js} +6 -6
- package/dist/{DataTable-Dw6dxJk3.js → DataTable-xISHA7Pu.js} +2 -2
- package/dist/{Legend-CjdnJGHq.js → Legend-_Rv594VS.js} +2 -2
- package/dist/{NonSvgPenAndPaper-tX2IXHuz.js → NonSvgPenAndPaper-DiM4-9ju.js} +3 -3
- package/dist/{PackageVersion-D1HToLlZ.js → PackageVersion-DRpg18lg.js} +3 -3
- package/dist/{PenAndPaper-BKnXOYre.js → PenAndPaper-CtDMyIvW.js} +3 -3
- package/dist/{Shape-6PexQroB.js → Shape-BDy56-wS.js} +1 -1
- package/dist/{Slicer-BJkhMBk4.js → Slicer-BgpOhmb6.js} +31 -31
- package/dist/{SparkTooltip-BtO1j0i1.js → SparkTooltip-DOFGBHJ-.js} +1 -1
- package/dist/{Title-BVMfF0uu.js → Title-pI68ZJsq.js} +1 -1
- package/dist/{Tooltip-DBvmoYXU.js → Tooltip-Clf2K3CF.js} +1 -1
- package/dist/{UserOptions-CKzW9w0Q.js → UserOptions-Bn3u4JQu.js} +2 -2
- package/dist/components/arrow.js +5 -0
- package/dist/components/vue-ui-3d-bar.js +5 -0
- package/dist/components/vue-ui-accordion.js +5 -0
- package/dist/components/vue-ui-age-pyramid.js +5 -0
- package/dist/components/vue-ui-bullet.js +5 -0
- package/dist/components/vue-ui-candlestick.js +5 -0
- package/dist/components/vue-ui-carousel-table.js +5 -0
- package/dist/components/vue-ui-chestnut.js +5 -0
- package/dist/components/vue-ui-chord.js +5 -0
- package/dist/components/vue-ui-circle-pack.js +5 -0
- package/dist/components/vue-ui-cursor.js +5 -0
- package/dist/components/vue-ui-dashboard.js +5 -0
- package/dist/components/vue-ui-digits.js +5 -0
- package/dist/components/vue-ui-donut-evolution.js +5 -0
- package/dist/components/vue-ui-donut.js +5 -0
- package/dist/components/vue-ui-dumbbell.js +5 -0
- package/dist/components/vue-ui-flow.js +5 -0
- package/dist/components/vue-ui-funnel.js +5 -0
- package/dist/components/vue-ui-galaxy.js +5 -0
- package/dist/components/vue-ui-gauge.js +5 -0
- package/dist/components/vue-ui-gizmo.js +5 -0
- package/dist/components/vue-ui-heatmap.js +5 -0
- package/dist/components/vue-ui-history-plot.js +5 -0
- package/dist/components/vue-ui-horizontal-bar.js +5 -0
- package/dist/components/vue-ui-icon.js +5 -0
- package/dist/components/vue-ui-kpi.js +5 -0
- package/dist/components/vue-ui-mini-loader.js +5 -0
- package/dist/components/vue-ui-molecule.js +5 -0
- package/dist/components/vue-ui-mood-radar.js +5 -0
- package/dist/components/vue-ui-nested-donuts.js +5 -0
- package/dist/components/vue-ui-onion.js +5 -0
- package/dist/components/vue-ui-parallel-coordinate-plot.js +5 -0
- package/dist/components/vue-ui-pattern.js +5 -0
- package/dist/components/vue-ui-quadrant.js +5 -0
- package/dist/components/vue-ui-quick-chart.js +5 -0
- package/dist/components/vue-ui-radar.js +5 -0
- package/dist/components/vue-ui-rating.js +5 -0
- package/dist/components/vue-ui-relation-circle.js +5 -0
- package/dist/components/vue-ui-ridgeline.js +5 -0
- package/dist/components/vue-ui-rings.js +5 -0
- package/dist/components/vue-ui-scatter.js +5 -0
- package/dist/components/vue-ui-skeleton.js +5 -0
- package/dist/components/vue-ui-smiley.js +5 -0
- package/dist/components/vue-ui-spark-trend.js +5 -0
- package/dist/components/vue-ui-sparkbar.js +5 -0
- package/dist/components/vue-ui-sparkgauge.js +5 -0
- package/dist/components/vue-ui-sparkhistogram.js +5 -0
- package/dist/components/vue-ui-sparkline.js +5 -0
- package/dist/components/vue-ui-sparkstackbar.js +5 -0
- package/dist/components/vue-ui-stackbar.js +5 -0
- package/dist/components/vue-ui-strip-plot.js +5 -0
- package/dist/components/vue-ui-table-heatmap.js +5 -0
- package/dist/components/vue-ui-table-sparkline.js +5 -0
- package/dist/components/vue-ui-table.js +5 -0
- package/dist/components/vue-ui-thermometer.js +5 -0
- package/dist/components/vue-ui-timer.js +5 -0
- package/dist/components/vue-ui-tiremarks.js +5 -0
- package/dist/components/vue-ui-treemap.js +5 -0
- package/dist/components/vue-ui-vertical-bar.js +5 -0
- package/dist/components/vue-ui-waffle.js +5 -0
- package/dist/components/vue-ui-wheel.js +5 -0
- package/dist/components/vue-ui-word-cloud.js +5 -0
- package/dist/components/vue-ui-world.js +5 -0
- package/dist/components/vue-ui-xy-canvas.js +5 -0
- package/dist/components/vue-ui-xy.js +5 -0
- package/dist/{dom-to-png-D0wlWRL9.js → dom-to-png-CSg_eTqL.js} +1 -1
- package/dist/{img-CeCjiMpr.js → img-CH7J0fYg.js} +1 -1
- package/dist/lib-p5pfHmOX.js +1882 -0
- package/dist/{pdf-D5bgIg6W.js → pdf-Wd2BQz4D.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/themes-D3cUNuKw.js +53 -0
- package/dist/types/arrow.d.ts +4 -0
- package/dist/types/universal.d.ts +1 -0
- package/dist/types/vue-data-ui.d.ts +71 -21
- package/dist/types/vue-ui-3d-bar.d.ts +18 -0
- package/dist/types/vue-ui-accordion.d.ts +12 -0
- package/dist/types/vue-ui-age-pyramid.d.ts +21 -0
- package/dist/types/vue-ui-bullet.d.ts +16 -0
- package/dist/types/vue-ui-candlestick.d.ts +16 -0
- package/dist/types/vue-ui-carousel-table.d.ts +14 -0
- package/dist/types/vue-ui-chestnut.d.ts +17 -0
- package/dist/types/vue-ui-chord.d.ts +19 -0
- package/dist/types/vue-ui-circle-pack.d.ts +17 -0
- package/dist/types/vue-ui-cursor.d.ts +7 -0
- package/dist/types/vue-ui-dashboard.d.ts +14 -0
- package/dist/types/vue-ui-digits.d.ts +10 -0
- package/dist/types/vue-ui-donut-evolution.d.ts +17 -0
- package/dist/types/vue-ui-donut.d.ts +18 -0
- package/dist/types/vue-ui-dumbbell.d.ts +18 -0
- package/dist/types/vue-ui-flow.d.ts +18 -0
- package/dist/types/vue-ui-funnel.d.ts +15 -0
- package/dist/types/vue-ui-galaxy.d.ts +18 -0
- package/dist/types/vue-ui-gauge.d.ts +16 -0
- package/dist/types/vue-ui-gizmo.d.ts +14 -0
- package/dist/types/vue-ui-heatmap.d.ts +17 -0
- package/dist/types/vue-ui-history-plot.d.ts +19 -0
- package/dist/types/vue-ui-horizontal-bar.d.ts +19 -0
- package/dist/types/vue-ui-icon.d.ts +16 -0
- package/dist/types/vue-ui-kpi.d.ts +13 -0
- package/dist/types/vue-ui-mini-loader.d.ts +13 -0
- package/dist/types/vue-ui-molecule.d.ts +17 -0
- package/dist/types/vue-ui-mood-radar.d.ts +17 -0
- package/dist/types/vue-ui-nested-donuts.d.ts +18 -0
- package/dist/types/vue-ui-onion.d.ts +18 -0
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +20 -0
- package/dist/types/vue-ui-pattern.d.ts +17 -0
- package/dist/types/vue-ui-quadrant.d.ts +20 -0
- package/dist/types/vue-ui-quick-chart.d.ts +16 -0
- package/dist/types/vue-ui-radar.d.ts +22 -0
- package/dist/types/vue-ui-rating.d.ts +15 -0
- package/dist/types/vue-ui-relation-circle.d.ts +17 -0
- package/dist/types/vue-ui-ridgeline.d.ts +20 -0
- package/dist/types/vue-ui-rings.d.ts +17 -0
- package/dist/types/vue-ui-scatter.d.ts +19 -0
- package/dist/types/vue-ui-skeleton.d.ts +12 -0
- package/dist/types/vue-ui-smiley.d.ts +14 -0
- package/dist/types/vue-ui-spark-trend.d.ts +13 -0
- package/dist/types/vue-ui-sparkbar.d.ts +15 -0
- package/dist/types/vue-ui-sparkgauge.d.ts +14 -0
- package/dist/types/vue-ui-sparkhistogram.d.ts +15 -0
- package/dist/types/vue-ui-sparkline.d.ts +15 -0
- package/dist/types/vue-ui-sparkstackbar.d.ts +16 -0
- package/dist/types/vue-ui-stackbar.d.ts +18 -0
- package/dist/types/vue-ui-strip-plot.d.ts +19 -0
- package/dist/types/vue-ui-table-heatmap.d.ts +14 -0
- package/dist/types/vue-ui-table-sparkline.d.ts +14 -0
- package/dist/types/vue-ui-table.d.ts +17 -0
- package/dist/types/vue-ui-thermometer.d.ts +15 -0
- package/dist/types/vue-ui-timer.d.ts +12 -0
- package/dist/types/vue-ui-tiremarks.d.ts +15 -0
- package/dist/types/vue-ui-treemap.d.ts +18 -0
- package/dist/types/vue-ui-vertical-bar.d.ts +19 -0
- package/dist/types/vue-ui-waffle.d.ts +18 -0
- package/dist/types/vue-ui-wheel.d.ts +15 -0
- package/dist/types/vue-ui-word-cloud.d.ts +17 -0
- package/dist/types/vue-ui-world.d.ts +17 -0
- package/dist/types/vue-ui-xy-canvas.d.ts +15 -0
- package/dist/types/vue-ui-xy.d.ts +24 -0
- package/dist/universal-registry-CL8g2COA.js +70 -0
- package/dist/universal.js +5 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-BxqMb3sU.js → useAutoSizeLabelsInsideViewbox-VqESrzQg.js} +7 -7
- package/dist/useNestedProp-DF7e2h1z.js +6645 -0
- package/dist/{usePrinter-DGI4Mlad.js → usePrinter-Yeu5jOfm.js} +2 -2
- package/dist/vue-data-ui-h5C8hpE8.js +317 -0
- package/dist/vue-data-ui.js +243 -85
- package/dist/{vue-ui-3d-bar-8b3VZcUI.js → vue-ui-3d-bar-BZDLbeym.js} +103 -102
- package/dist/{vue-ui-accordion-BJG-ogQj.js → vue-ui-accordion-D-L73-T2.js} +4 -4
- package/dist/{vue-ui-age-pyramid-Cr_dhyTO.js → vue-ui-age-pyramid-C1NMeWTB.js} +28 -27
- package/dist/{vue-ui-annotator-ttaqcMTz.js → vue-ui-annotator-SoAGIAm-.js} +7 -6
- package/dist/{vue-ui-bullet-DXvTj07g.js → vue-ui-bullet-G_Y2Ryof.js} +28 -27
- package/dist/{vue-ui-candlestick-B5NqFTXr.js → vue-ui-candlestick-9sHzdqr3.js} +32 -31
- package/dist/{vue-ui-carousel-table-B0bpCRFh.js → vue-ui-carousel-table-CnGSgjPK.js} +25 -25
- package/dist/{vue-ui-chestnut-Cby7Wcbu.js → vue-ui-chestnut-C_0Y77a9.js} +41 -40
- package/dist/{vue-ui-chord-Cxg8nwzZ.js → vue-ui-chord-DqGoensA.js} +61 -60
- package/dist/{vue-ui-circle-pack-Cc5e6dE3.js → vue-ui-circle-pack-5L50If0h.js} +75 -74
- package/dist/{vue-ui-cursor-D6MvR7jD.js → vue-ui-cursor-0muOlHSh.js} +3 -3
- package/dist/{vue-ui-dashboard-CaUM9n5b.js → vue-ui-dashboard-2FyL5ac1.js} +68 -68
- package/dist/{vue-ui-digits-DsoHRv9p.js → vue-ui-digits-DOUNtmB0.js} +3 -3
- package/dist/{vue-ui-donut-Dxsq1gpz.js → vue-ui-donut-CWgiy7rq.js} +39 -38
- package/dist/{vue-ui-donut-evolution-CFu9WNVV.js → vue-ui-donut-evolution-DxH6i5aO.js} +81 -80
- package/dist/{vue-ui-dumbbell-Cgb7ijQS.js → vue-ui-dumbbell-D7nhPGxL.js} +97 -96
- package/dist/{vue-ui-flow-Ucb9PdWP.js → vue-ui-flow-C8iSww9L.js} +127 -126
- package/dist/{vue-ui-funnel-CV29tksj.js → vue-ui-funnel-D3GZcM5e.js} +39 -38
- package/dist/{vue-ui-galaxy-CVJb9_hA.js → vue-ui-galaxy-CUHEJHiw.js} +53 -52
- package/dist/{vue-ui-gauge-ofpIH29X.js → vue-ui-gauge-MM8rPNWR.js} +149 -148
- package/dist/{vue-ui-gizmo-Ci9kN9VQ.js → vue-ui-gizmo-CQ7XyocO.js} +6 -6
- package/dist/{vue-ui-heatmap-BK_jorrw.js → vue-ui-heatmap-BT5orcuT.js} +98 -97
- package/dist/{vue-ui-history-plot-Ce8BB4Tn.js → vue-ui-history-plot-BCfEt867.js} +105 -104
- package/dist/{vue-ui-kpi-DAHT9q6j.js → vue-ui-kpi-D7zdt7-g.js} +15 -15
- package/dist/{vue-ui-mini-loader-CuilTrcI.js → vue-ui-mini-loader-CteWqKM_.js} +3 -3
- package/dist/{vue-ui-molecule-C6suewK-.js → vue-ui-molecule-DekqFbQ4.js} +54 -53
- package/dist/{vue-ui-mood-radar-DPvGhgPI.js → vue-ui-mood-radar-CAC70QPW.js} +30 -29
- package/dist/{vue-ui-nested-donuts-BvPWp9Du.js → vue-ui-nested-donuts-BWj33o71.js} +69 -68
- package/dist/{vue-ui-onion-BZ0tfRV_.js → vue-ui-onion-Dq_XSxqp.js} +33 -32
- package/dist/{vue-ui-parallel-coordinate-plot-DqFj8hbo.js → vue-ui-parallel-coordinate-plot-V6jytnl0.js} +61 -60
- package/dist/{vue-ui-pattern-DsYgSZWn.js → vue-ui-pattern-D5pNvoQp.js} +1 -1
- package/dist/{vue-ui-quadrant-Cg5e73ny.js → vue-ui-quadrant-CmXgMy7I.js} +35 -34
- package/dist/{vue-ui-quick-chart-sABlk5nb.js → vue-ui-quick-chart-D2JQNfWU.js} +30 -29
- package/dist/{vue-ui-radar-DYcoGzSu.js → vue-ui-radar-BmmwGJaI.js} +90 -89
- package/dist/{vue-ui-rating-1eguB-TH.js → vue-ui-rating-CjoKP6-5.js} +9 -9
- package/dist/{vue-ui-relation-circle-BeWuQDkk.js → vue-ui-relation-circle-CcGD2bEJ.js} +44 -43
- package/dist/{vue-ui-ridgeline-CG7FefqU.js → vue-ui-ridgeline-DIOGXJ9v.js} +82 -81
- package/dist/{vue-ui-rings-2eedFGuC.js → vue-ui-rings-DS-YbQVr.js} +74 -73
- package/dist/{vue-ui-scatter-CNtgNP5j.js → vue-ui-scatter-D8kUADP7.js} +121 -120
- package/dist/{vue-ui-skeleton-fqG3bKSz.js → vue-ui-skeleton-FtA6-6zz.js} +5 -5
- package/dist/{vue-ui-smiley-D4bvSF9S.js → vue-ui-smiley-YRRY-yQp.js} +28 -28
- package/dist/vue-ui-spark-trend-qt8UvEPc.js +337 -0
- package/dist/{vue-ui-sparkbar-D1FXZyQE.js → vue-ui-sparkbar-DgHvA8ra.js} +86 -85
- package/dist/{vue-ui-sparkgauge-CHbbxg13.js → vue-ui-sparkgauge-BpMUqIL6.js} +32 -31
- package/dist/{vue-ui-sparkhistogram-BxYes64D.js → vue-ui-sparkhistogram-IhGjmoUF.js} +22 -21
- package/dist/{vue-ui-sparkline-CS3F5TFN.js → vue-ui-sparkline-BSGiRpQ9.js} +105 -104
- package/dist/{vue-ui-sparkstackbar-CUSBwkUS.js → vue-ui-sparkstackbar-ZkUUbYr5.js} +28 -27
- package/dist/{vue-ui-stackbar-CDihyp-i.js → vue-ui-stackbar-DRKIeZ1O.js} +77 -76
- package/dist/{vue-ui-strip-plot-D6MFuKnN.js → vue-ui-strip-plot-dMjWaIcs.js} +52 -51
- package/dist/{vue-ui-table-COT59wVb.js → vue-ui-table-DKHtmqLd.js} +9 -8
- package/dist/{vue-ui-table-heatmap--e8yw5yS.js → vue-ui-table-heatmap-iu6l-6rW.js} +30 -29
- package/dist/{vue-ui-table-sparkline-DnSLwUNN.js → vue-ui-table-sparkline-mMpPAUon.js} +20 -19
- package/dist/{vue-ui-thermometer-ByiRARW0.js → vue-ui-thermometer-xpHH3FWG.js} +66 -65
- package/dist/{vue-ui-timer-DOQVdVN2.js → vue-ui-timer-C4LZMTeg.js} +31 -31
- package/dist/{vue-ui-tiremarks-BFXeJQNZ.js → vue-ui-tiremarks-KQmIXYf2.js} +30 -29
- package/dist/{vue-ui-treemap-s_O9rQUT.js → vue-ui-treemap-a_Ub2bgB.js} +32 -31
- package/dist/{vue-ui-vertical-bar-Bn-m5GKU.js → vue-ui-vertical-bar-MWKYuUMN.js} +54 -53
- package/dist/{vue-ui-waffle-DmxaWHSw.js → vue-ui-waffle-CP6jUrto.js} +76 -75
- package/dist/{vue-ui-wheel-zJ5U-h_D.js → vue-ui-wheel-B59kWUZd.js} +85 -84
- package/dist/{vue-ui-word-cloud-BEnkOZdv.js → vue-ui-word-cloud-DZnuhGEw.js} +49 -48
- package/dist/{vue-ui-world-CkqoTL4V.js → vue-ui-world-B6S7X6sr.js} +19 -19
- package/dist/{vue-ui-xy-Uqdl2nk-.js → vue-ui-xy-BjzutuG2.js} +496 -505
- package/dist/{vue-ui-xy-canvas-cIU8Y1sD.js → vue-ui-xy-canvas-CSSVKhex.js} +166 -165
- package/package.json +19 -11
- package/dist/index-Lg17rmB1.js +0 -8729
- package/dist/types/vue-data-ui.d.cts +0 -9435
- package/dist/useNestedProp-DpwLJMsW.js +0 -13
- package/dist/vue-data-ui-lki09wwK.js +0 -325
- package/dist/vue-ui-spark-trend-GML5JJxY.js +0 -315
|
@@ -0,0 +1,1882 @@
|
|
|
1
|
+
import { unref as J, isRef as tt, toRaw as ut } from "vue";
|
|
2
|
+
const lt = "#COMP# dataset prop is either missing, undefined or empty.", ft = "#COMP# dataset is missing the '#ATTR#' attribute.", ht = "#COMP# dataset '#ATTR#' attribute cannot be empty.", Ft = "#COMP# dataset #KEY# item at index #INDX# is missing the '#ATTR#' attribute.", Et = "#COMP# : Chart could not be built. Dataset is not formatted correctly", gt = "#COMP# : A wrong value was provided to the #ATTR# attribute (#KEY# is not a valid value).", dt = {
|
|
3
|
+
dataset: lt,
|
|
4
|
+
datasetAttribute: ft,
|
|
5
|
+
datasetAttributeEmpty: ht,
|
|
6
|
+
datasetSerieAttribute: Ft,
|
|
7
|
+
notBuildable: Et,
|
|
8
|
+
attributeWrongValue: gt
|
|
9
|
+
};
|
|
10
|
+
function Yt(t, n, e, s, r, o = 1.99999, c = 2, i = 1.45, u = 360, l = 105.25, a = 0) {
|
|
11
|
+
const { series: f } = t;
|
|
12
|
+
if (!f || f.length === 0)
|
|
13
|
+
return [];
|
|
14
|
+
const h = f.reduce((A, p) => A + p.value, 0), F = [];
|
|
15
|
+
let E = 0;
|
|
16
|
+
for (let A = 0; A < f.length; A++) {
|
|
17
|
+
const p = f[A].value, S = f.length === 1, M = S ? 1 : h > 0 ? p / h : 0, D = M * (Math.PI * o), P = (S ? 0.5 : h > 0 ? p / 2 / h : 0.5) * (Math.PI * c), { startX: L, startY: x, endX: m, endY: C, path: b } = Z(
|
|
18
|
+
[n, e],
|
|
19
|
+
[s, r],
|
|
20
|
+
[E, D],
|
|
21
|
+
l,
|
|
22
|
+
u,
|
|
23
|
+
c
|
|
24
|
+
), g = Z(
|
|
25
|
+
[n, e],
|
|
26
|
+
[s - a, r - a],
|
|
27
|
+
[E, D],
|
|
28
|
+
l,
|
|
29
|
+
u,
|
|
30
|
+
c,
|
|
31
|
+
!0
|
|
32
|
+
), B = Z(
|
|
33
|
+
[n, e],
|
|
34
|
+
[s * i, r * i],
|
|
35
|
+
[E, P],
|
|
36
|
+
l,
|
|
37
|
+
u,
|
|
38
|
+
c
|
|
39
|
+
);
|
|
40
|
+
F.push({
|
|
41
|
+
arcSlice: `${b} L ${g.startX} ${g.startY} ${g.path} L ${L} ${x}`,
|
|
42
|
+
cx: d(n),
|
|
43
|
+
cy: d(e),
|
|
44
|
+
...f[A],
|
|
45
|
+
proportion: d(M),
|
|
46
|
+
ratio: d(D),
|
|
47
|
+
path: b.replaceAll("NaN", "0"),
|
|
48
|
+
startX: d(L),
|
|
49
|
+
startY: d(x),
|
|
50
|
+
endX: d(m),
|
|
51
|
+
endY: d(C),
|
|
52
|
+
separator: {
|
|
53
|
+
x: g.startX,
|
|
54
|
+
y: g.startY
|
|
55
|
+
},
|
|
56
|
+
firstSeparator: {
|
|
57
|
+
x: Number(g.path.split(" ").at(-2)),
|
|
58
|
+
y: Number(g.path.split(" ").at(-1))
|
|
59
|
+
},
|
|
60
|
+
center: B
|
|
61
|
+
}), E += D;
|
|
62
|
+
}
|
|
63
|
+
return F;
|
|
64
|
+
}
|
|
65
|
+
function nt([t, n], [e, s]) {
|
|
66
|
+
return [t + e, n + s];
|
|
67
|
+
}
|
|
68
|
+
function et([[t, n], [e, s]], [r, o]) {
|
|
69
|
+
return [t * r + n * o, e * r + s * o];
|
|
70
|
+
}
|
|
71
|
+
function At(t) {
|
|
72
|
+
return [
|
|
73
|
+
[Math.cos(t), -Math.sin(t)],
|
|
74
|
+
[Math.sin(t), Math.cos(t)]
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
function Z([t, n], [e, s], [r, o], c, i = 360, u = 2, l = !1) {
|
|
78
|
+
o = o % (u * Math.PI);
|
|
79
|
+
const a = At(c), [f, h] = nt(
|
|
80
|
+
et(a, [
|
|
81
|
+
e * Math.cos(r),
|
|
82
|
+
s * Math.sin(r)
|
|
83
|
+
]),
|
|
84
|
+
[t, n]
|
|
85
|
+
), [F, E] = nt(
|
|
86
|
+
et(a, [
|
|
87
|
+
e * Math.cos(r + o),
|
|
88
|
+
s * Math.sin(r + o)
|
|
89
|
+
]),
|
|
90
|
+
[t, n]
|
|
91
|
+
), A = o > Math.PI ? 1 : 0, p = o > 0 ? l ? 0 : 1 : l ? 1 : 0;
|
|
92
|
+
return {
|
|
93
|
+
startX: d(l ? F : f),
|
|
94
|
+
startY: d(l ? E : h),
|
|
95
|
+
endX: d(l ? f : F),
|
|
96
|
+
endY: d(l ? h : E),
|
|
97
|
+
path: `M${d(l ? F : f)} ${d(l ? E : h)} A ${[
|
|
98
|
+
d(e),
|
|
99
|
+
d(s),
|
|
100
|
+
d(c / (u * Math.PI) * i),
|
|
101
|
+
d(A),
|
|
102
|
+
d(p),
|
|
103
|
+
d(l ? f : F),
|
|
104
|
+
d(l ? h : E)
|
|
105
|
+
].join(" ")}`
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function pt({ defaultConfig: t, userConfig: n }) {
|
|
109
|
+
const e = { ...t };
|
|
110
|
+
return Object.keys(e).forEach((s) => {
|
|
111
|
+
if (Object.hasOwn(n, s)) {
|
|
112
|
+
const r = n[s];
|
|
113
|
+
r === null ? e[s] = null : ["boolean", "function"].includes(typeof r) ? e[s] = r : ["string", "number"].includes(typeof r) ? ct(r) && (e[s] = r) : Array.isArray(e[s]) ? yt({ userConfig: n, key: s }) && (e[s] = r) : xt({ userConfig: n, key: s }) && (e[s] = pt({
|
|
114
|
+
defaultConfig: e[s],
|
|
115
|
+
userConfig: r
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
}), Object.keys(n).forEach((s) => {
|
|
119
|
+
if (!Object.hasOwn(e, s)) {
|
|
120
|
+
const r = n[s];
|
|
121
|
+
e[s] = r && typeof r == "object" && !Array.isArray(r) ? { ...r } : r;
|
|
122
|
+
}
|
|
123
|
+
}), e;
|
|
124
|
+
}
|
|
125
|
+
function yt({ userConfig: t, key: n }) {
|
|
126
|
+
return Object.hasOwn(t, n) && Array.isArray(t[n]) && t[n].length >= 0;
|
|
127
|
+
}
|
|
128
|
+
function xt({ userConfig: t, key: n }) {
|
|
129
|
+
return Object.hasOwn(t, n) && !Array.isArray(t[n]) && typeof t[n] == "object";
|
|
130
|
+
}
|
|
131
|
+
function ct(t) {
|
|
132
|
+
return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(t);
|
|
133
|
+
}
|
|
134
|
+
function kt(t) {
|
|
135
|
+
return ![void 0, NaN, 1 / 0, -1 / 0].includes(t);
|
|
136
|
+
}
|
|
137
|
+
function Ht(t, n = 0) {
|
|
138
|
+
return ct(t) ? t : n;
|
|
139
|
+
}
|
|
140
|
+
function d(t, n = 0) {
|
|
141
|
+
return isNaN(t) ? n : t;
|
|
142
|
+
}
|
|
143
|
+
const mt = [
|
|
144
|
+
"#1f77b4",
|
|
145
|
+
"#aec7e8",
|
|
146
|
+
"#ff7f0e",
|
|
147
|
+
"#ffbb78",
|
|
148
|
+
"#2ca02c",
|
|
149
|
+
"#98df8a",
|
|
150
|
+
"#d62728",
|
|
151
|
+
"#ff9896",
|
|
152
|
+
"#9467bd",
|
|
153
|
+
"#c5b0d5",
|
|
154
|
+
"#8c564b",
|
|
155
|
+
"#c49c94",
|
|
156
|
+
"#e377c2",
|
|
157
|
+
"#f7b6d2",
|
|
158
|
+
"#7f7f7f",
|
|
159
|
+
"#c7c7c7",
|
|
160
|
+
"#bcbd22",
|
|
161
|
+
"#dbdb8d",
|
|
162
|
+
"#17becf",
|
|
163
|
+
"#9edae5",
|
|
164
|
+
"#393b79",
|
|
165
|
+
"#5254a3",
|
|
166
|
+
"#6b6ecf",
|
|
167
|
+
"#9c9ede",
|
|
168
|
+
"#637939",
|
|
169
|
+
"#8ca252",
|
|
170
|
+
"#b5cf6b",
|
|
171
|
+
"#cedb9c",
|
|
172
|
+
"#8c6d31",
|
|
173
|
+
"#bd9e39",
|
|
174
|
+
"#e7ba52",
|
|
175
|
+
"#e7cb94",
|
|
176
|
+
"#843c39",
|
|
177
|
+
"#ad494a",
|
|
178
|
+
"#d6616b",
|
|
179
|
+
"#e7969c",
|
|
180
|
+
"#7b4173",
|
|
181
|
+
"#a55194",
|
|
182
|
+
"#ce6dbd",
|
|
183
|
+
"#de9ed6"
|
|
184
|
+
];
|
|
185
|
+
function Ut(t = "default") {
|
|
186
|
+
switch (t) {
|
|
187
|
+
case "hack":
|
|
188
|
+
return X.hack;
|
|
189
|
+
case "zen":
|
|
190
|
+
return X.zen;
|
|
191
|
+
case "concrete":
|
|
192
|
+
return X.concrete;
|
|
193
|
+
case "celebration":
|
|
194
|
+
return X.celebration;
|
|
195
|
+
case "celebrationNight":
|
|
196
|
+
return X.celebrationNight;
|
|
197
|
+
default:
|
|
198
|
+
return X.default;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const X = {
|
|
202
|
+
default: mt,
|
|
203
|
+
celebration: [
|
|
204
|
+
"#D32F2F",
|
|
205
|
+
"#E64A19",
|
|
206
|
+
"#F57C00",
|
|
207
|
+
"#FF9800",
|
|
208
|
+
"#FF5722",
|
|
209
|
+
"#FFC107",
|
|
210
|
+
"#FFEB3B",
|
|
211
|
+
"#FFD54F",
|
|
212
|
+
"#FF6F00",
|
|
213
|
+
"#D84315",
|
|
214
|
+
"#BF360C",
|
|
215
|
+
"#C62828",
|
|
216
|
+
"#B71C1C",
|
|
217
|
+
"#FF7043",
|
|
218
|
+
"#FF8A65",
|
|
219
|
+
"#FFB74D",
|
|
220
|
+
"#FFA726",
|
|
221
|
+
"#FFCC80",
|
|
222
|
+
"#FFE082",
|
|
223
|
+
"#FFECB3"
|
|
224
|
+
],
|
|
225
|
+
celebrationNight: [
|
|
226
|
+
"#D32F2F",
|
|
227
|
+
"#E64A19",
|
|
228
|
+
"#F57C00",
|
|
229
|
+
"#FF9800",
|
|
230
|
+
"#FF5722",
|
|
231
|
+
"#FFC947",
|
|
232
|
+
"#FFEB3B",
|
|
233
|
+
"#FFD95B",
|
|
234
|
+
"#FF8800",
|
|
235
|
+
"#FF5722",
|
|
236
|
+
"#DD2C00",
|
|
237
|
+
"#F44336",
|
|
238
|
+
"#C62828",
|
|
239
|
+
"#FF6E6E",
|
|
240
|
+
"#FF867C",
|
|
241
|
+
"#FFB547",
|
|
242
|
+
"#FFA837",
|
|
243
|
+
"#FFD180",
|
|
244
|
+
"#FFE57F",
|
|
245
|
+
"#FFF59D"
|
|
246
|
+
],
|
|
247
|
+
concrete: [
|
|
248
|
+
"#4A6A75",
|
|
249
|
+
"#6C94A0",
|
|
250
|
+
"#7DA9B5",
|
|
251
|
+
"#8EBFCA",
|
|
252
|
+
"#9FD4E0",
|
|
253
|
+
"#B0E9F5",
|
|
254
|
+
"#C1FFFF",
|
|
255
|
+
"#5C6B5B",
|
|
256
|
+
"#6D7D6D",
|
|
257
|
+
"#7E8F7E",
|
|
258
|
+
"#8FA290",
|
|
259
|
+
"#A1B5A3",
|
|
260
|
+
"#B2C7B5",
|
|
261
|
+
"#C3DAC8",
|
|
262
|
+
"#D4ECDA",
|
|
263
|
+
"#E6FFF0",
|
|
264
|
+
"#8A9CA5",
|
|
265
|
+
"#9AA7B0",
|
|
266
|
+
"#ABB1BC",
|
|
267
|
+
"#BBCBC7",
|
|
268
|
+
"#CCD6D3",
|
|
269
|
+
"#DEE1DE",
|
|
270
|
+
"#EFECEC",
|
|
271
|
+
"#404C4D",
|
|
272
|
+
"#50605F",
|
|
273
|
+
"#617472",
|
|
274
|
+
"#718885",
|
|
275
|
+
"#829C98",
|
|
276
|
+
"#92B0AB",
|
|
277
|
+
"#A3C4BE",
|
|
278
|
+
"#B3D8D2",
|
|
279
|
+
"#C4EDE5",
|
|
280
|
+
"#D4F1E8",
|
|
281
|
+
"#404C5A",
|
|
282
|
+
"#50606C",
|
|
283
|
+
"#61747E",
|
|
284
|
+
"#718890",
|
|
285
|
+
"#829CA2",
|
|
286
|
+
"#92B0B5"
|
|
287
|
+
],
|
|
288
|
+
hack: [
|
|
289
|
+
"#004C00",
|
|
290
|
+
"#006600",
|
|
291
|
+
"#008000",
|
|
292
|
+
"#009900",
|
|
293
|
+
"#00B300",
|
|
294
|
+
"#00CC00",
|
|
295
|
+
"#00E600",
|
|
296
|
+
"#00FF00",
|
|
297
|
+
"#33FF33",
|
|
298
|
+
"#33E633",
|
|
299
|
+
"#33CC33",
|
|
300
|
+
"#33B333",
|
|
301
|
+
"#339933",
|
|
302
|
+
"#338033",
|
|
303
|
+
"#336633",
|
|
304
|
+
"#334C33",
|
|
305
|
+
"#333333",
|
|
306
|
+
"#00AF19",
|
|
307
|
+
"#19E619",
|
|
308
|
+
"#19CC19",
|
|
309
|
+
"#19B319",
|
|
310
|
+
"#199919",
|
|
311
|
+
"#198019",
|
|
312
|
+
"#196619",
|
|
313
|
+
"#194C19",
|
|
314
|
+
"#193319",
|
|
315
|
+
"#191919",
|
|
316
|
+
"#66FF66",
|
|
317
|
+
"#66E666",
|
|
318
|
+
"#66CC66",
|
|
319
|
+
"#66B366",
|
|
320
|
+
"#669966",
|
|
321
|
+
"#668066",
|
|
322
|
+
"#666666",
|
|
323
|
+
"#4CFF4C",
|
|
324
|
+
"#4CE64C",
|
|
325
|
+
"#4CCC4C",
|
|
326
|
+
"#4CB34C"
|
|
327
|
+
],
|
|
328
|
+
zen: [
|
|
329
|
+
"#B9B99D",
|
|
330
|
+
"#E0CFC3",
|
|
331
|
+
"#DFCA99",
|
|
332
|
+
"#DCB482",
|
|
333
|
+
"#C09E85",
|
|
334
|
+
"#8F837A",
|
|
335
|
+
"#858480",
|
|
336
|
+
"#B0B9A8",
|
|
337
|
+
"#606C5A",
|
|
338
|
+
"#5E5E5E",
|
|
339
|
+
"#4F5B75",
|
|
340
|
+
"#647393",
|
|
341
|
+
"#818EA9",
|
|
342
|
+
"#9FA9BE",
|
|
343
|
+
"#BBC4D3",
|
|
344
|
+
"#DCDFE7",
|
|
345
|
+
"#928A98",
|
|
346
|
+
"#8A9892",
|
|
347
|
+
"#B1A7AD",
|
|
348
|
+
"#C5B8A7",
|
|
349
|
+
"#EBD6CC",
|
|
350
|
+
"#D7E0D2",
|
|
351
|
+
"#E0D2D7",
|
|
352
|
+
"#E0DBD2",
|
|
353
|
+
"#D2E0DB",
|
|
354
|
+
"#DBD2E0",
|
|
355
|
+
"#C1B7A5",
|
|
356
|
+
"#A5AFC1",
|
|
357
|
+
"#E0DBD2",
|
|
358
|
+
"#D2D7E0",
|
|
359
|
+
"#F7EDE2",
|
|
360
|
+
"#97ACB7",
|
|
361
|
+
"#C4CBBC",
|
|
362
|
+
"#C3C5C5",
|
|
363
|
+
"#A0AC94"
|
|
364
|
+
]
|
|
365
|
+
}, rt = ["00", "03", "05", "08", "0A", "0D", "0F", "12", "14", "17", "1A", "1C", "1F", "21", "24", "26", "29", "2B", "2E", "30", "33", "36", "38", "3B", "3D", "40", "42", "45", "47", "4A", "4D", "4F", "52", "54", "57", "59", "5C", "5E", "61", "63", "66", "69", "6B", "6E", "70", "73", "75", "78", "7A", "7D", "80", "82", "85", "87", "8A", "8C", "8F", "91", "94", "96", "99", "9C", "9E", "A1", "A3", "A6", "A8", "AB", "AD", "B0", "B3", "B5", "B8", "BA", "BD", "BF", "C2", "C4", "C7", "C9", "CC", "CF", "D1", "D4", "D6", "D9", "DB", "DE", "E0", "E3", "E6", "E8", "EB", "ED", "F0", "F2", "F5", "F7", "FA", "FC", "FF"];
|
|
366
|
+
function at(t) {
|
|
367
|
+
const n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i, e = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i, s = /^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)$/i, r = /^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*([\d.]+))?\)$/i;
|
|
368
|
+
if (t == null || typeof t == "number" && isNaN(t))
|
|
369
|
+
return null;
|
|
370
|
+
if (t = tt?.(t) ? J(t) : t, t = Nt(t), Array.isArray(t)) {
|
|
371
|
+
const [i, u, l, a = 1] = t;
|
|
372
|
+
t = `rgba(${i},${u},${l},${a})`;
|
|
373
|
+
} else if (typeof t == "object")
|
|
374
|
+
if (Number.isFinite(t.r) && Number.isFinite(t.g) && Number.isFinite(t.b)) {
|
|
375
|
+
const i = Number.isFinite(t.a) ? t.a : 1;
|
|
376
|
+
t = `rgba(${t.r},${t.g},${t.b},${i})`;
|
|
377
|
+
} else
|
|
378
|
+
return null;
|
|
379
|
+
else if (typeof t == "number") {
|
|
380
|
+
const i = t >>> 0, u = i.toString(16).padStart(i <= 16777215 ? 6 : 8, "0");
|
|
381
|
+
return `#${u.length === 6 ? u + "ff" : u}`;
|
|
382
|
+
} else if (typeof t != "string")
|
|
383
|
+
return null;
|
|
384
|
+
if (t = t.trim(), t.toLowerCase() === "transparent")
|
|
385
|
+
return "#FFFFFF00";
|
|
386
|
+
t = t.replace(e, (i, u, l, a, f) => `#${u}${u}${l}${l}${a}${a}${f ? f + f : ""}`);
|
|
387
|
+
let o, c = 1;
|
|
388
|
+
if (o = t.match(n)) {
|
|
389
|
+
const [, i, u, l, a] = o;
|
|
390
|
+
return c = a ? parseInt(a, 16) / 255 : 1, `#${i}${u}${l}${G(Math.round(c * 255))}`;
|
|
391
|
+
} else if (o = t.match(s)) {
|
|
392
|
+
const [, i, u, l, a] = o;
|
|
393
|
+
return c = a ? parseFloat(a) : 1, `#${G(i)}${G(u)}${G(l)}${G(Math.round(c * 255))}`;
|
|
394
|
+
} else if (o = t.match(r)) {
|
|
395
|
+
const [, i, u, l, a] = o;
|
|
396
|
+
c = a ? parseFloat(a) : 1;
|
|
397
|
+
const [f, h, F] = bt(Number(i), Number(u), Number(l));
|
|
398
|
+
return `#${G(f)}${G(h)}${G(F)}${G(Math.round(c * 255))}`;
|
|
399
|
+
}
|
|
400
|
+
return null;
|
|
401
|
+
}
|
|
402
|
+
function G(t) {
|
|
403
|
+
const n = Number(t).toString(16);
|
|
404
|
+
return n.length === 1 ? "0" + n : n;
|
|
405
|
+
}
|
|
406
|
+
function bt(t, n, e, s = 1) {
|
|
407
|
+
t /= 360, n /= 100, e /= 100;
|
|
408
|
+
let r, o, c;
|
|
409
|
+
if (n === 0)
|
|
410
|
+
r = o = c = e;
|
|
411
|
+
else {
|
|
412
|
+
const i = (a, f, h) => (h < 0 && (h += 1), h > 1 && (h -= 1), h < 0.16666666666666666 ? a + (f - a) * 6 * h : h < 0.5 ? f : h < 0.6666666666666666 ? a + (f - a) * (0.6666666666666666 - h) * 6 : a), u = e < 0.5 ? e * (1 + n) : e + n - e * n, l = 2 * e - u;
|
|
413
|
+
r = i(l, u, t + 1 / 3), o = i(l, u, t), c = i(l, u, t - 1 / 3);
|
|
414
|
+
}
|
|
415
|
+
return [
|
|
416
|
+
Math.round(r * 255),
|
|
417
|
+
Math.round(o * 255),
|
|
418
|
+
Math.round(c * 255),
|
|
419
|
+
s
|
|
420
|
+
];
|
|
421
|
+
}
|
|
422
|
+
function Gt(t, n) {
|
|
423
|
+
const e = t.length === 9 ? t.substring(0, 7) : t, s = t.length === 9 ? t.substring(7, 9) : null, r = (f) => ({
|
|
424
|
+
r: parseInt(f.substring(1, 3), 16),
|
|
425
|
+
g: parseInt(f.substring(3, 5), 16),
|
|
426
|
+
b: parseInt(f.substring(5, 7), 16)
|
|
427
|
+
}), o = ({ r: f, g: h, b: F }) => {
|
|
428
|
+
f /= 255, h /= 255, F /= 255;
|
|
429
|
+
const E = Math.max(f, h, F), A = Math.min(f, h, F);
|
|
430
|
+
let p, S, M = (E + A) / 2;
|
|
431
|
+
if (E === A)
|
|
432
|
+
p = S = 0;
|
|
433
|
+
else {
|
|
434
|
+
const D = E - A;
|
|
435
|
+
switch (S = M > 0.5 ? D / (2 - E - A) : D / (E + A), E) {
|
|
436
|
+
case f:
|
|
437
|
+
p = (h - F) / D + (h < F ? 6 : 0);
|
|
438
|
+
break;
|
|
439
|
+
case h:
|
|
440
|
+
p = (F - f) / D + 2;
|
|
441
|
+
break;
|
|
442
|
+
case F:
|
|
443
|
+
p = (f - h) / D + 4;
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
p /= 6;
|
|
447
|
+
}
|
|
448
|
+
return { h: p, s: S, l: M };
|
|
449
|
+
}, c = ({ h: f, s: h, l: F }) => {
|
|
450
|
+
let E, A, p;
|
|
451
|
+
if (h === 0)
|
|
452
|
+
E = A = p = F;
|
|
453
|
+
else {
|
|
454
|
+
const S = (I, P, L) => (L < 0 && (L += 1), L > 1 && (L -= 1), L < 0.16666666666666666 ? I + (P - I) * 6 * L : L < 0.5 ? P : L < 0.6666666666666666 ? I + (P - I) * (0.6666666666666666 - L) * 6 : I), M = F < 0.5 ? F * (1 + h) : F + h - F * h, D = 2 * F - M;
|
|
455
|
+
E = S(D, M, f + 1 / 3), A = S(D, M, f), p = S(D, M, f - 1 / 3);
|
|
456
|
+
}
|
|
457
|
+
return {
|
|
458
|
+
r: Math.round(E * 255),
|
|
459
|
+
g: Math.round(A * 255),
|
|
460
|
+
b: Math.round(p * 255)
|
|
461
|
+
};
|
|
462
|
+
}, i = r(e || "#000000"), u = o(i);
|
|
463
|
+
u.h += n, u.h = (u.h + 1) % 1;
|
|
464
|
+
const l = c(u);
|
|
465
|
+
return `#${(l.r << 16 | l.g << 8 | l.b).toString(16).padStart(6, "0")}` + (s || "");
|
|
466
|
+
}
|
|
467
|
+
function Ct({
|
|
468
|
+
centerX: t,
|
|
469
|
+
centerY: n,
|
|
470
|
+
outerPoints: e,
|
|
471
|
+
radius: s,
|
|
472
|
+
rotation: r
|
|
473
|
+
}) {
|
|
474
|
+
const o = Math.PI / e, c = r;
|
|
475
|
+
let i = "";
|
|
476
|
+
const u = [];
|
|
477
|
+
for (let l = 0; l < e * 2; l += 1) {
|
|
478
|
+
let a = t + Math.cos(l * o + c) * s, f = n + Math.sin(l * o + c) * s;
|
|
479
|
+
i += `${a},${f} `, u.push({ x: a, y: f });
|
|
480
|
+
}
|
|
481
|
+
return {
|
|
482
|
+
path: `M${i}Z`,
|
|
483
|
+
coordinates: u
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
function Xt({
|
|
487
|
+
plot: t,
|
|
488
|
+
radius: n,
|
|
489
|
+
sides: e,
|
|
490
|
+
rotation: s = 0
|
|
491
|
+
}) {
|
|
492
|
+
const r = t.x, o = t.y, c = e / 2;
|
|
493
|
+
return Ct({
|
|
494
|
+
centerX: r,
|
|
495
|
+
centerY: o,
|
|
496
|
+
outerPoints: c,
|
|
497
|
+
radius: n + 1,
|
|
498
|
+
rotation: s
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function Mt({
|
|
502
|
+
centerX: t,
|
|
503
|
+
centerY: n,
|
|
504
|
+
innerCirclePoints: e,
|
|
505
|
+
innerRadius: s,
|
|
506
|
+
outerRadius: r
|
|
507
|
+
}) {
|
|
508
|
+
const o = Math.PI / e, c = 60, i = e * 2;
|
|
509
|
+
let u = "";
|
|
510
|
+
for (let l = 0; l < i; l += 1) {
|
|
511
|
+
let f = l % 2 == 0 ? r : s, h = t + Math.cos(l * o + c) * f, F = n + Math.sin(l * o + c) * f;
|
|
512
|
+
u += `${h},${F} `;
|
|
513
|
+
}
|
|
514
|
+
return u;
|
|
515
|
+
}
|
|
516
|
+
function vt({
|
|
517
|
+
plot: t,
|
|
518
|
+
radius: n,
|
|
519
|
+
apexes: e = 5
|
|
520
|
+
}) {
|
|
521
|
+
const s = t.x, r = t.y, o = e, c = n * 3.5 / o, u = c * 2;
|
|
522
|
+
return Mt({
|
|
523
|
+
centerX: s,
|
|
524
|
+
centerY: r,
|
|
525
|
+
innerCirclePoints: o,
|
|
526
|
+
innerRadius: c,
|
|
527
|
+
outerRadius: u
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
function jt({ series: t }) {
|
|
531
|
+
if (!Array.isArray(t) || t.length === 0) return "";
|
|
532
|
+
const n = Array.from(
|
|
533
|
+
new Map(
|
|
534
|
+
t.filter((a) => a && Number.isFinite(a.x) && Number.isFinite(a.y)).map((a) => [`${a.x},${a.y}`, { x: +a.x, y: +a.y }])
|
|
535
|
+
).values()
|
|
536
|
+
);
|
|
537
|
+
if (n.length === 0) return "";
|
|
538
|
+
if (n.length === 1) return `${Math.round(n[0].x)},${Math.round(n[0].y)} `;
|
|
539
|
+
const e = (a, f) => {
|
|
540
|
+
const h = a.x - f.x, F = a.y - f.y;
|
|
541
|
+
return h * h + F * F;
|
|
542
|
+
}, s = (a, f, h) => (f.x - a.x) * (h.y - a.y) - (f.y - a.y) * (h.x - a.x);
|
|
543
|
+
let r = n[0];
|
|
544
|
+
for (const a of n)
|
|
545
|
+
(a.x < r.x || a.x === r.x && a.y < r.y) && (r = a);
|
|
546
|
+
const o = [r];
|
|
547
|
+
let c = r;
|
|
548
|
+
const i = n.length + 2;
|
|
549
|
+
let u = 0;
|
|
550
|
+
for (; !(++u > i); ) {
|
|
551
|
+
let a = n[0] === c ? n[1] : n[0];
|
|
552
|
+
for (const f of n) {
|
|
553
|
+
if (f === c || f === a) continue;
|
|
554
|
+
const h = s(c, a, f);
|
|
555
|
+
h < 0 || (h > 0 || e(c, f) > e(c, a)) && (a = f);
|
|
556
|
+
}
|
|
557
|
+
if (a === r) break;
|
|
558
|
+
o.push(a), c = a;
|
|
559
|
+
}
|
|
560
|
+
let l = "";
|
|
561
|
+
for (const a of o)
|
|
562
|
+
l += `${Math.round(a.x)},${Math.round(a.y)} `;
|
|
563
|
+
return l;
|
|
564
|
+
}
|
|
565
|
+
function v(t) {
|
|
566
|
+
return t * Math.PI / 180;
|
|
567
|
+
}
|
|
568
|
+
function Kt(t) {
|
|
569
|
+
if (t) {
|
|
570
|
+
let n = t, e = 1;
|
|
571
|
+
if (n.startsWith("rgba")) {
|
|
572
|
+
const l = n.match(/rgba?\((\d+), (\d+), (\d+), ([\d.]+)\)/);
|
|
573
|
+
if (l) {
|
|
574
|
+
const [, a, f, h, F] = l;
|
|
575
|
+
e = parseFloat(F), n = `#${parseInt(a).toString(16).padStart(2, "0")}${parseInt(f).toString(16).padStart(2, "0")}${parseInt(h).toString(16).padStart(2, "0")}`;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
n.charAt(0) !== "#" && (n = this.rgbToHex(t)), n = n.substring(1, 7);
|
|
579
|
+
let s = parseInt(n.substring(0, 2), 16), r = parseInt(n.substring(2, 4), 16), o = parseInt(n.substring(4, 6), 16), i = [s / 255, r / 255, o / 255].map((l) => l <= 0.03928 ? l / 12.92 : Math.pow((l + 0.055) / 1.055, 2.4)), u = 0.2126 * i[0] + 0.7152 * i[1] + 0.0722 * i[2];
|
|
580
|
+
return e < 1 ? e * u + (1 - e) * 1 > 0.3 ? "#000000" : "#FFFFFF" : u > 0.3 ? "#000000" : "#FFFFFF";
|
|
581
|
+
}
|
|
582
|
+
return "#000000";
|
|
583
|
+
}
|
|
584
|
+
function K(t) {
|
|
585
|
+
return t !== null && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && (t.constructor === Object || t.constructor == null);
|
|
586
|
+
}
|
|
587
|
+
function Q(t) {
|
|
588
|
+
return !!t && (t.__v_isRef || t.__v_isReactive || t.__v_isReadonly || t.effect || t.dep || t.deps || t.subs);
|
|
589
|
+
}
|
|
590
|
+
function st(t) {
|
|
591
|
+
return t === "" ? "#000000" : t === "transparent" ? "#FFFFFF00" : at(t) ?? t;
|
|
592
|
+
}
|
|
593
|
+
function q(t, n = /* @__PURE__ */ new WeakSet()) {
|
|
594
|
+
const e = ut(t);
|
|
595
|
+
if (!K(e) || n.has(e)) return e;
|
|
596
|
+
n.add(e);
|
|
597
|
+
for (const s in e) {
|
|
598
|
+
const r = tt(e[s]) ? J(e[s]) : e[s];
|
|
599
|
+
if (s === "color" || s === "backgroundColor") {
|
|
600
|
+
typeof r == "string" && (e[s] = st(r));
|
|
601
|
+
continue;
|
|
602
|
+
}
|
|
603
|
+
if (s === "stroke") {
|
|
604
|
+
typeof r == "string" ? e[s] = st(r) : K(r) && !Q(r) && q(r, n);
|
|
605
|
+
continue;
|
|
606
|
+
}
|
|
607
|
+
if (Array.isArray(r)) {
|
|
608
|
+
for (const o of r)
|
|
609
|
+
K(o) && !Q(o) && q(o, n);
|
|
610
|
+
continue;
|
|
611
|
+
}
|
|
612
|
+
K(r) && !Q(r) && q(r, n);
|
|
613
|
+
}
|
|
614
|
+
return e;
|
|
615
|
+
}
|
|
616
|
+
function Wt(t) {
|
|
617
|
+
let n, e, s, r;
|
|
618
|
+
const o = t.length;
|
|
619
|
+
if (!t || t.length === 0)
|
|
620
|
+
return {
|
|
621
|
+
x1: 0,
|
|
622
|
+
y1: 0,
|
|
623
|
+
x2: 0,
|
|
624
|
+
y2: 0,
|
|
625
|
+
slope: 0,
|
|
626
|
+
trend: 0
|
|
627
|
+
};
|
|
628
|
+
let c = 0, i = 0, u = 0, l = 0;
|
|
629
|
+
for (const { x: F, y: E } of t)
|
|
630
|
+
c += F, i += E, u += F * E, l += F * F;
|
|
631
|
+
const a = (o * u - c * i) / (o * l - c * c), f = (i - a * c) / o;
|
|
632
|
+
n = t[0].x, s = t[o - 1].x, e = a * n + f, r = a * s + f;
|
|
633
|
+
const h = $t(t.map((F) => F.value));
|
|
634
|
+
return { x1: n, y1: e, x2: s, y2: r, slope: a, trend: h };
|
|
635
|
+
}
|
|
636
|
+
function $t(t) {
|
|
637
|
+
const n = t[0], s = t[t.length - 1] - n;
|
|
638
|
+
let r = 0;
|
|
639
|
+
for (let c = 1; c < t.length; c++) {
|
|
640
|
+
const i = Math.abs(t[c] - t[c - 1]);
|
|
641
|
+
r += i;
|
|
642
|
+
}
|
|
643
|
+
const o = s / r;
|
|
644
|
+
return isNaN(o) ? 0 : o;
|
|
645
|
+
}
|
|
646
|
+
function Vt(t) {
|
|
647
|
+
const n = Math.floor(t.length / 2), e = [...t].sort((s, r) => s - r);
|
|
648
|
+
return t.length % 2 !== 0 ? e[n] : (e[n - 1] + e[n]) / 2;
|
|
649
|
+
}
|
|
650
|
+
function _t(t) {
|
|
651
|
+
let n = [];
|
|
652
|
+
for (let e = 0; e < t.length; e += 1)
|
|
653
|
+
n.push(`${d(t[e].x)},${d(t[e].y)} `);
|
|
654
|
+
return n.join(" ").trim();
|
|
655
|
+
}
|
|
656
|
+
function zt(t) {
|
|
657
|
+
if (t.length < 2) return "0,0";
|
|
658
|
+
const n = t.length - 1, e = [`${d(t[0].x)},${d(t[0].y)}`], s = [], r = [], o = [], c = [];
|
|
659
|
+
for (let i = 0; i < n; i += 1)
|
|
660
|
+
s[i] = t[i + 1].x - t[i].x, r[i] = t[i + 1].y - t[i].y, o[i] = r[i] / s[i];
|
|
661
|
+
c[0] = o[0], c[n] = o[n - 1];
|
|
662
|
+
for (let i = 1; i < n; i += 1)
|
|
663
|
+
if (o[i - 1] * o[i] <= 0)
|
|
664
|
+
c[i] = 0;
|
|
665
|
+
else {
|
|
666
|
+
const u = 2 * o[i - 1] * o[i] / (o[i - 1] + o[i]);
|
|
667
|
+
c[i] = u;
|
|
668
|
+
}
|
|
669
|
+
for (let i = 0; i < n; i += 1) {
|
|
670
|
+
const u = t[i].x, l = t[i].y, a = t[i + 1].x, f = t[i + 1].y, h = c[i], F = c[i + 1], E = u + (a - u) / 3, A = l + h * (a - u) / 3, p = a - (a - u) / 3, S = f - F * (a - u) / 3;
|
|
671
|
+
e.push(`C ${d(E)},${d(A)} ${d(p)},${d(S)} ${d(a)},${d(f)}`);
|
|
672
|
+
}
|
|
673
|
+
return e.join(" ");
|
|
674
|
+
}
|
|
675
|
+
function Zt(t, n = 0.2) {
|
|
676
|
+
function e(c, i) {
|
|
677
|
+
const u = i.x - c.x, l = i.y - c.y;
|
|
678
|
+
return {
|
|
679
|
+
length: Math.sqrt(Math.pow(u, 2) + Math.pow(l, 2)),
|
|
680
|
+
angle: Math.atan2(l, u)
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
function s(c, i, u, l) {
|
|
684
|
+
const h = e(i || c, u || c), F = h.angle + (l ? Math.PI : 0), E = h.length * n, A = c.x + Math.cos(F) * E, p = c.y + Math.sin(F) * E;
|
|
685
|
+
return { x: A, y: p };
|
|
686
|
+
}
|
|
687
|
+
function r(c, i, u) {
|
|
688
|
+
const l = s(u[i - 1], u[i - 2], c), a = s(c, u[i - 1], u[i + 1], !0);
|
|
689
|
+
return `C ${d(l.x)},${d(l.y)} ${d(a.x)},${d(a.y)} ${d(c.x)},${d(c.y)}`;
|
|
690
|
+
}
|
|
691
|
+
return t.filter((c) => !!c).reduce(
|
|
692
|
+
(c, i, u, l) => u === 0 ? `${d(i.x)},${d(i.y)} ` : `${c} ${r(i, u, l)} `,
|
|
693
|
+
""
|
|
694
|
+
);
|
|
695
|
+
}
|
|
696
|
+
function Qt() {
|
|
697
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
698
|
+
const n = Math.random() * 16 | 0;
|
|
699
|
+
return (t == "x" ? n : n & 3 | 8).toString(16);
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
function W(t, n = !1, e = 16, s = !1) {
|
|
703
|
+
let r = 0, o = n ? e : 0, c = s ? "center" : "middle";
|
|
704
|
+
return t.center.endX > t.cx ? (r = t.center.endX + e + o, c = s ? "left" : "start") : t.center.endX < t.cx ? (r = t.center.endX - e - o, c = s ? "right" : "end") : (r = t.centerX + o, c = s ? "center" : "middle"), { x: r, anchor: c };
|
|
705
|
+
}
|
|
706
|
+
function V(t, n = 16, e = 16) {
|
|
707
|
+
return t.center.endY > t.cy ? t.center.endY + e : t.center.endY < t.cy ? t.center.endY - n : t.center.endY;
|
|
708
|
+
}
|
|
709
|
+
function qt({
|
|
710
|
+
initX: t,
|
|
711
|
+
initY: n,
|
|
712
|
+
offset: e,
|
|
713
|
+
centerX: s,
|
|
714
|
+
centerY: r
|
|
715
|
+
}) {
|
|
716
|
+
const o = Math.atan2(n - r, t - s);
|
|
717
|
+
return {
|
|
718
|
+
x: t + e * Math.cos(o),
|
|
719
|
+
y: n + e * Math.sin(o)
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
function Dt(t) {
|
|
723
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
724
|
+
n.setAttribute("d", t);
|
|
725
|
+
const e = n.getTotalLength();
|
|
726
|
+
let s = 0, r = e, o = e / 2;
|
|
727
|
+
const c = 0.01;
|
|
728
|
+
for (; r - s > c; ) {
|
|
729
|
+
const l = (s + r) / 2, f = n.getPointAtLength(l).x;
|
|
730
|
+
if (Math.abs(f - o) < c) {
|
|
731
|
+
o = l;
|
|
732
|
+
break;
|
|
733
|
+
} else f < o ? s = l : r = l;
|
|
734
|
+
}
|
|
735
|
+
const { x: i, y: u } = n.getPointAtLength(o);
|
|
736
|
+
return { x: i, y: u };
|
|
737
|
+
}
|
|
738
|
+
function Jt(t, n = !1, e = 16, s = 16, r = !1, o = !1, c = 0, i = 12, u = !1) {
|
|
739
|
+
const { x: l } = Dt(t.path), a = `${W(t).x},${V(t, e, s) - 4} `;
|
|
740
|
+
let f = "", h, F;
|
|
741
|
+
l > t.cx ? (h = W(t).x - i, F = V(t, e, s) - 4, f = `${h},${F}`) : l < t.cx ? (h = W(t).x + i, F = V(t, e, s) - 4, f = `${h},${F}`) : (h = W(t).x + i, F = V(t, e, s) - 4, f = `${h},${F}`);
|
|
742
|
+
const E = ` ${t.center.endX},${t.center.endY}`;
|
|
743
|
+
return u ? o ? `M${f} Q${f} ${E}` : `M${a} Q${f} ${E}` : `M${o ? "" : a}${f}${E}`;
|
|
744
|
+
}
|
|
745
|
+
function tn(t) {
|
|
746
|
+
return ![null, void 0, NaN].includes(t);
|
|
747
|
+
}
|
|
748
|
+
function nn(t, n) {
|
|
749
|
+
return [...t].map((e) => e[n]).reduce((e, s) => e + s, 0);
|
|
750
|
+
}
|
|
751
|
+
function en(t, n = !0, e = !1) {
|
|
752
|
+
if (!t.length) return "M0,0";
|
|
753
|
+
let s = "";
|
|
754
|
+
return t.forEach((r) => {
|
|
755
|
+
if (!r) return "";
|
|
756
|
+
s += `${r.x},${r.y} `;
|
|
757
|
+
}), e ? s.trim() : `M${s}${n ? "Z" : ""}`;
|
|
758
|
+
}
|
|
759
|
+
function rn({ csvContent: t, title: n = "vue-data-ui" }) {
|
|
760
|
+
const e = encodeURI(t), s = document.createElement("a");
|
|
761
|
+
s.setAttribute("href", e), s.setAttribute("download", `${n}.csv`), document.body.appendChild(s), s.click(), s.remove(), window.URL.revokeObjectURL(e);
|
|
762
|
+
}
|
|
763
|
+
function sn(t) {
|
|
764
|
+
return `data:text/csv;charset=utf-8,${t.map((n) => n.join(",")).join(`
|
|
765
|
+
`)}`;
|
|
766
|
+
}
|
|
767
|
+
function on(t, n) {
|
|
768
|
+
if (!/^#([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t))
|
|
769
|
+
return console.warn("lightenHexColor : Invalid hex color format"), "#000000";
|
|
770
|
+
let e = t.replace("#", "");
|
|
771
|
+
e.length === 3 && (e = e.split("").map((a) => a + a).join(""));
|
|
772
|
+
const s = parseInt(e.substring(0, 2), 16), r = parseInt(e.substring(2, 4), 16), o = parseInt(e.substring(4, 6), 16), c = Math.min(255, s + (255 - s) * n), i = Math.min(255, r + (255 - r) * n), u = Math.min(255, o + (255 - o) * n), l = `#${Math.round(c).toString(16).padStart(2, "0")}${Math.round(i).toString(16).padStart(2, "0")}${Math.round(u).toString(16).padStart(2, "0")}`;
|
|
773
|
+
if (e.length === 8) {
|
|
774
|
+
const a = e.substring(6, 8);
|
|
775
|
+
return l + a;
|
|
776
|
+
}
|
|
777
|
+
return l;
|
|
778
|
+
}
|
|
779
|
+
function cn(t, n) {
|
|
780
|
+
if (!/^#([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t))
|
|
781
|
+
return console.warn("darkenHexColor: Invalid hex color format"), "#000000";
|
|
782
|
+
let e = t.replace("#", "");
|
|
783
|
+
e.length === 3 && (e = e.split("").map((a) => a + a).join(""));
|
|
784
|
+
const s = parseInt(e.substring(0, 2), 16), r = parseInt(e.substring(2, 4), 16), o = parseInt(e.substring(4, 6), 16), c = Math.max(0, s - s * n), i = Math.max(0, r - r * n), u = Math.max(0, o - o * n), l = `#${Math.round(c).toString(16).padStart(2, "0")}${Math.round(i).toString(16).padStart(2, "0")}${Math.round(u).toString(16).padStart(2, "0")}`;
|
|
785
|
+
if (e.length === 8) {
|
|
786
|
+
const a = e.substring(6, 8);
|
|
787
|
+
return l + a;
|
|
788
|
+
}
|
|
789
|
+
return l;
|
|
790
|
+
}
|
|
791
|
+
function z(t, n) {
|
|
792
|
+
const e = Math.floor(Math.log10(t)), s = t / Math.pow(10, e);
|
|
793
|
+
let r;
|
|
794
|
+
return n ? s < 1.5 ? r = 1 : s < 3 ? r = 2 : s < 7 ? r = 5 : r = 10 : s <= 1 ? r = 1 : s <= 2 ? r = 2 : s <= 5 ? r = 5 : r = 10, r * Math.pow(10, e);
|
|
795
|
+
}
|
|
796
|
+
function an(t, n, e, s = !1) {
|
|
797
|
+
const r = s ? n - t : z(n - t, !1), o = s ? r / (e - 1) : z(r / (e - 1), !0), c = Math.floor(t / o) * o, i = Math.ceil(n / o) * o, u = [];
|
|
798
|
+
for (let l = c; l <= i; l += o)
|
|
799
|
+
u.push(l);
|
|
800
|
+
return {
|
|
801
|
+
min: c,
|
|
802
|
+
max: i,
|
|
803
|
+
tickSize: o,
|
|
804
|
+
ticks: u
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
function un(t, n, e, s = !1) {
|
|
808
|
+
const r = s ? n - t : z(n - t, !1), o = s ? r / (e - 1) : z(r / (e - 1), !0), c = Math.floor(t / o) * o, i = Math.ceil(n / o) * o;
|
|
809
|
+
let u = [], l = c;
|
|
810
|
+
for (; l <= i; )
|
|
811
|
+
l >= t && l <= n && u.push(l), l += o;
|
|
812
|
+
return u[0] !== t && (u[0] = t), u[u.length - 1] !== n && (u[u.length - 1] = n), {
|
|
813
|
+
min: t,
|
|
814
|
+
max: n,
|
|
815
|
+
tickSize: o,
|
|
816
|
+
ticks: u
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
function ln(t, n, e, s, r) {
|
|
820
|
+
const o = (h) => {
|
|
821
|
+
let F = parseInt(h.substring(1, 3), 16), E = parseInt(h.substring(3, 5), 16), A = parseInt(h.substring(5, 7), 16), p = 1;
|
|
822
|
+
return h.length === 9 && (p = parseInt(h.substring(7, 9), 16) / 255), { r: F, g: E, b: A, a: p };
|
|
823
|
+
}, c = ({ r: h, g: F, b: E, a: A }) => {
|
|
824
|
+
const p = (M) => M.toString(16).padStart(2, "0"), S = `#${p(h)}${p(F)}${p(E)}`;
|
|
825
|
+
if (A !== 1) {
|
|
826
|
+
const M = Math.round(A * 255).toString(16).padStart(2, "0");
|
|
827
|
+
return S + M;
|
|
828
|
+
}
|
|
829
|
+
return S;
|
|
830
|
+
}, i = o(t), u = o(n);
|
|
831
|
+
r = Math.min(Math.max(r, e), s);
|
|
832
|
+
const l = (r - e) / (s - e), a = {
|
|
833
|
+
r: Math.round(i.r + (u.r - i.r) * l),
|
|
834
|
+
g: Math.round(i.g + (u.g - i.g) * l),
|
|
835
|
+
b: Math.round(i.b + (u.b - i.b) * l)
|
|
836
|
+
}, f = i.a + (u.a - i.a) * l;
|
|
837
|
+
return c({ ...a, a: f });
|
|
838
|
+
}
|
|
839
|
+
function fn({ p: t = "", v: n, s: e = "", r: s = 0, space: r = !1, isAnimating: o = !1, regex: c = /[^%]/g, replacement: i = "-", locale: u = null }) {
|
|
840
|
+
const l = u ? Number(Number(n).toFixed(s)).toLocaleString(u) : Number(Number(n).toFixed(s)).toLocaleString(), a = l === 1 / 0 ? "∞" : l === -1 / 0 ? "-∞" : l, f = `${t ?? ""}${r ? " " : ""}${[void 0, null].includes(n) ? "-" : a}${r ? " " : ""}${e ?? ""}`;
|
|
841
|
+
return o ? f.replace(c, i) : f;
|
|
842
|
+
}
|
|
843
|
+
function hn({ source: t, length: n = 3 }) {
|
|
844
|
+
if (!t && t !== 0)
|
|
845
|
+
return "";
|
|
846
|
+
t = String(t);
|
|
847
|
+
const e = t.length > 1 ? t.split(" ") : [t];
|
|
848
|
+
if (e.length === 1 && e[0].length === 1)
|
|
849
|
+
return String(t).toUpperCase();
|
|
850
|
+
if (e.length === 1)
|
|
851
|
+
return t.slice(0, n).toUpperCase();
|
|
852
|
+
{
|
|
853
|
+
const s = [];
|
|
854
|
+
return e.forEach((r, o) => {
|
|
855
|
+
o < n && s.push(r.slice(0, 1));
|
|
856
|
+
}), s.join().replaceAll(",", "").toUpperCase();
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
function Fn(t) {
|
|
860
|
+
return !!t && typeof t == "function";
|
|
861
|
+
}
|
|
862
|
+
function En(t) {
|
|
863
|
+
return typeof t.apply(null, arguments) == "string";
|
|
864
|
+
}
|
|
865
|
+
function gn(t) {
|
|
866
|
+
return Array.isArray(t) ? t.length === 0 : t ? Object.keys(t).length === 0 : !0;
|
|
867
|
+
}
|
|
868
|
+
function dn({ componentName: t, type: n, property: e = "", index: s = "", key: r = "", warn: o = !0, debug: c = !0 }) {
|
|
869
|
+
if (!c) return;
|
|
870
|
+
const i = `
|
|
871
|
+
> ${dt[n].replace("#COMP#", t).replace("#ATTR#", e).replace("#INDX#", s).replace("#KEY#", r)}
|
|
872
|
+
`;
|
|
873
|
+
if (o)
|
|
874
|
+
console.warn(i);
|
|
875
|
+
else
|
|
876
|
+
throw new Error(i);
|
|
877
|
+
}
|
|
878
|
+
function Rt({ points: t, a: n, b: e, angleStep: s, startX: r, startY: o }) {
|
|
879
|
+
const c = [];
|
|
880
|
+
for (let i = 0; i < t; i++) {
|
|
881
|
+
const u = s * i, l = n + e * u, a = l * Math.cos(u) + r, f = l * Math.sin(u) + o;
|
|
882
|
+
c.push({ x: a, y: f });
|
|
883
|
+
}
|
|
884
|
+
return c;
|
|
885
|
+
}
|
|
886
|
+
function St(t) {
|
|
887
|
+
let n = 1 / 0, e = 1 / 0, s = -1 / 0, r = -1 / 0;
|
|
888
|
+
for (const o of t)
|
|
889
|
+
o.x < n && (n = o.x), o.y < e && (e = o.y), o.x > s && (s = o.x), o.y > r && (r = o.y);
|
|
890
|
+
return { minX: n, minY: e, maxX: s, maxY: r, width: s - n || 1, height: r - e || 1 };
|
|
891
|
+
}
|
|
892
|
+
function Bt(t) {
|
|
893
|
+
if (!t.length) return "";
|
|
894
|
+
let n = `M${t[0].x} ${t[0].y}`;
|
|
895
|
+
for (let e = 1; e < t.length - 2; e += 2) {
|
|
896
|
+
const s = t[e - 1], r = t[e], o = t[e + 1], c = t[e + 2], i = (s.x + r.x) / 2, u = (s.y + r.y) / 2, l = (r.x + o.x) / 2, a = (r.y + o.y) / 2, f = (o.x + c.x) / 2, h = (o.y + c.y) / 2;
|
|
897
|
+
n += ` C${i} ${u}, ${l} ${a}, ${f} ${h}`;
|
|
898
|
+
}
|
|
899
|
+
return n;
|
|
900
|
+
}
|
|
901
|
+
function An({
|
|
902
|
+
maxPoints: t,
|
|
903
|
+
a: n = 6,
|
|
904
|
+
b: e = 6,
|
|
905
|
+
angleStep: s = 0.07,
|
|
906
|
+
startX: r,
|
|
907
|
+
startY: o,
|
|
908
|
+
boxWidth: c,
|
|
909
|
+
boxHeight: i,
|
|
910
|
+
padding: u = 12
|
|
911
|
+
}) {
|
|
912
|
+
const l = Rt({ points: t, a: n, b: e, angleStep: s, startX: 0, startY: 0 }), { minX: a, minY: f, maxX: h, maxY: F, width: E, height: A } = St(l), p = (a + h) / 2, S = (f + F) / 2, M = Math.max(1, c - 2 * u), D = Math.max(1, i - 2 * u), I = Math.min(M / E, D / A), P = r - p * I, L = o - S * I;
|
|
913
|
+
return function(m) {
|
|
914
|
+
const C = Math.max(2, Math.min(Math.round(m), l.length)), b = l.slice(0, C).map((g) => ({ x: g.x * I + P, y: g.y * I + L }));
|
|
915
|
+
return Bt(b);
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
function pn({ datasetObject: t, requiredAttributes: n }) {
|
|
919
|
+
let e = [];
|
|
920
|
+
return n.forEach((s) => {
|
|
921
|
+
Object.hasOwn(t, s) || e.push(s);
|
|
922
|
+
}), e;
|
|
923
|
+
}
|
|
924
|
+
const ot = {
|
|
925
|
+
ALICEBLUE: "#F0F8FF",
|
|
926
|
+
ANTIQUEWHITE: "#FAEBD7",
|
|
927
|
+
AQUA: "#00FFFF",
|
|
928
|
+
AQUAMARINE: "#7FFFD4",
|
|
929
|
+
AZURE: "#F0FFFF",
|
|
930
|
+
BEIGE: "#F5F5DC",
|
|
931
|
+
BISQUE: "#FFE4C4",
|
|
932
|
+
BLACK: "#000000",
|
|
933
|
+
BLANCHEDALMOND: "#FFEBCD",
|
|
934
|
+
BLUE: "#0000FF",
|
|
935
|
+
BLUEVIOLET: "#8A2BE2",
|
|
936
|
+
BROWN: "#A52A2A",
|
|
937
|
+
BURLYWOOD: "#DEB887",
|
|
938
|
+
CADETBLUE: "#5F9EA0",
|
|
939
|
+
CHARTREUSE: "#7FFF00",
|
|
940
|
+
CHOCOLATE: "#D2691E",
|
|
941
|
+
CORAL: "#FF7F50",
|
|
942
|
+
CORNFLOWERBLUE: "#6495ED",
|
|
943
|
+
CORNSILK: "#FFF8DC",
|
|
944
|
+
CRIMSON: "#DC143C",
|
|
945
|
+
CYAN: "#00FFFF",
|
|
946
|
+
DARKBLUE: "#00008B",
|
|
947
|
+
DARKCYAN: "#008B8B",
|
|
948
|
+
DARKGOLDENROD: "#B8860B",
|
|
949
|
+
DARKGREY: "#A9A9A9",
|
|
950
|
+
DARKGREEN: "#006400",
|
|
951
|
+
DARKKHAKI: "#BDB76B",
|
|
952
|
+
DARKMAGENTA: "#8B008B",
|
|
953
|
+
DARKOLIVEGREEN: "#556B2F",
|
|
954
|
+
DARKORANGE: "#FF8C00",
|
|
955
|
+
DARKORCHID: "#9932CC",
|
|
956
|
+
DARKRED: "#8B0000",
|
|
957
|
+
DARKSALMON: "#E9967A",
|
|
958
|
+
DARKSEAGREEN: "#8FBC8F",
|
|
959
|
+
DARKSLATEBLUE: "#483D8B",
|
|
960
|
+
DARKSLATEGREY: "#2F4F4F",
|
|
961
|
+
DARKTURQUOISE: "#00CED1",
|
|
962
|
+
DARKVIOLET: "#9400D3",
|
|
963
|
+
DEEPPINK: "#FF1493",
|
|
964
|
+
DEEPSKYBLUE: "#00BFFF",
|
|
965
|
+
DIMGRAY: "#696969",
|
|
966
|
+
DODGERBLUE: "#1E90FF",
|
|
967
|
+
FIREBRICK: "#B22222",
|
|
968
|
+
FLORALWHITE: "#FFFAF0",
|
|
969
|
+
FORESTGREEN: "#228B22",
|
|
970
|
+
FUCHSIA: "#FF00FF",
|
|
971
|
+
GAINSBORO: "#DCDCDC",
|
|
972
|
+
GHOSTWHITE: "#F8F8FF",
|
|
973
|
+
GOLD: "#FFD700",
|
|
974
|
+
GOLDENROD: "#DAA520",
|
|
975
|
+
GREY: "#808080",
|
|
976
|
+
GREEN: "#008000",
|
|
977
|
+
GREENYELLOW: "#ADFF2F",
|
|
978
|
+
HONEYDEW: "#F0FFF0",
|
|
979
|
+
HOTPINK: "#FF69B4",
|
|
980
|
+
INDIANRED: "#CD5C5C",
|
|
981
|
+
INDIGO: "#4B0082",
|
|
982
|
+
IVORY: "#FFFFF0",
|
|
983
|
+
KHAKI: "#F0E68C",
|
|
984
|
+
LAVENDER: "#E6E6FA",
|
|
985
|
+
LAVENDERBLUSH: "#FFF0F5",
|
|
986
|
+
LAWNGREEN: "#7CFC00",
|
|
987
|
+
LEMONCHIFFON: "#FFFACD",
|
|
988
|
+
LIGHTBLUE: "#ADD8E6",
|
|
989
|
+
LIGHTCORAL: "#F08080",
|
|
990
|
+
LIGHTCYAN: "#E0FFFF",
|
|
991
|
+
LIGHTGOLDENRODYELLOW: "#FAFAD2",
|
|
992
|
+
LIGHTGREY: "#D3D3D3",
|
|
993
|
+
LIGHTGREEN: "#90EE90",
|
|
994
|
+
LIGHTPINK: "#FFB6C1",
|
|
995
|
+
LIGHTSALMON: "#FFA07A",
|
|
996
|
+
LIGHTSEAGREEN: "#20B2AA",
|
|
997
|
+
LIGHTSKYBLUE: "#87CEFA",
|
|
998
|
+
LIGHTSLATEGREY: "#778899",
|
|
999
|
+
LIGHTSTEELBLUE: "#B0C4DE",
|
|
1000
|
+
LIGHTYELLOW: "#FFFFE0",
|
|
1001
|
+
LIME: "#00FF00",
|
|
1002
|
+
LIMEGREEN: "#32CD32",
|
|
1003
|
+
LINEN: "#FAF0E6",
|
|
1004
|
+
MAGENTA: "#FF00FF",
|
|
1005
|
+
MAROON: "#800000",
|
|
1006
|
+
MEDIUMAQUAMARINE: "#66CDAA",
|
|
1007
|
+
MEDIUMBLUE: "#0000CD",
|
|
1008
|
+
MEDIUMORCHID: "#BA55D3",
|
|
1009
|
+
MEDIUMPURPLE: "#9370D8",
|
|
1010
|
+
MEDIUMSEAGREEN: "#3CB371",
|
|
1011
|
+
MEDIUMSLATEBLUE: "#7B68EE",
|
|
1012
|
+
MEDIUMSPRINGGREEN: "#00FA9A",
|
|
1013
|
+
MEDIUMTURQUOISE: "#48D1CC",
|
|
1014
|
+
MEDIUMVIOLETRED: "#C71585",
|
|
1015
|
+
MIDNIGHTBLUE: "#191970",
|
|
1016
|
+
MINTCREAM: "#F5FFFA",
|
|
1017
|
+
MISTYROSE: "#FFE4E1",
|
|
1018
|
+
MOCCASIN: "#FFE4B5",
|
|
1019
|
+
NAVAJOWHITE: "#FFDEAD",
|
|
1020
|
+
NAVY: "#000080",
|
|
1021
|
+
OLDLACE: "#FDF5E6",
|
|
1022
|
+
OLIVE: "#808000",
|
|
1023
|
+
OLIVEDRAB: "#6B8E23",
|
|
1024
|
+
ORANGE: "#FFA500",
|
|
1025
|
+
ORANGERED: "#FF4500",
|
|
1026
|
+
ORCHID: "#DA70D6",
|
|
1027
|
+
PALEGOLDENROD: "#EEE8AA",
|
|
1028
|
+
PALEGREEN: "#98FB98",
|
|
1029
|
+
PALETURQUOISE: "#AFEEEE",
|
|
1030
|
+
PALEVIOLETRED: "#D87093",
|
|
1031
|
+
PAPAYAWHIP: "#FFEFD5",
|
|
1032
|
+
PEACHPUFF: "#FFDAB9",
|
|
1033
|
+
PERU: "#CD853F",
|
|
1034
|
+
PINK: "#FFC0CB",
|
|
1035
|
+
PLUM: "#DDA0DD",
|
|
1036
|
+
POWDERBLUE: "#B0E0E6",
|
|
1037
|
+
PURPLE: "#800080",
|
|
1038
|
+
RED: "#FF0000",
|
|
1039
|
+
ROSYBROWN: "#BC8F8F",
|
|
1040
|
+
ROYALBLUE: "#4169E1",
|
|
1041
|
+
SADDLEBROWN: "#8B4513",
|
|
1042
|
+
SALMON: "#FA8072",
|
|
1043
|
+
SANDYBROWN: "#F4A460",
|
|
1044
|
+
SEAGREEN: "#2E8B57",
|
|
1045
|
+
SEASHELL: "#FFF5EE",
|
|
1046
|
+
SIENNA: "#A0522D",
|
|
1047
|
+
SILVER: "#C0C0C0",
|
|
1048
|
+
SKYBLUE: "#87CEEB",
|
|
1049
|
+
SLATEBLUE: "#6A5ACD",
|
|
1050
|
+
SLATEGREY: "#708090",
|
|
1051
|
+
SNOW: "#FFFAFA",
|
|
1052
|
+
SPRINGGREEN: "#00FF7F",
|
|
1053
|
+
STEELBLUE: "#4682B4",
|
|
1054
|
+
TAN: "#D2B48C",
|
|
1055
|
+
TEAL: "#008080",
|
|
1056
|
+
THISTLE: "#D8BFD8",
|
|
1057
|
+
TOMATO: "#FF6347",
|
|
1058
|
+
TURQUOISE: "#40E0D0",
|
|
1059
|
+
VIOLET: "#EE82EE",
|
|
1060
|
+
WHEAT: "#F5DEB3",
|
|
1061
|
+
WHITE: "#FFFFFF",
|
|
1062
|
+
WHITESMOKE: "#F5F5F5",
|
|
1063
|
+
YELLOW: "#FFFF00",
|
|
1064
|
+
YELLOWGREEN: "#9ACD32",
|
|
1065
|
+
REBECCAPURPLE: "#663399"
|
|
1066
|
+
};
|
|
1067
|
+
function Nt(t) {
|
|
1068
|
+
const n = tt?.(t) ? J(t) : t;
|
|
1069
|
+
if (typeof n != "string") return n;
|
|
1070
|
+
const e = n.trim();
|
|
1071
|
+
if (e === "" || e[0] === "#") return e;
|
|
1072
|
+
if (e.toLowerCase() === "transparent") return "#FFFFFF00";
|
|
1073
|
+
const s = e.toUpperCase(), r = s.replace(/GRAY/g, "GREY");
|
|
1074
|
+
return ot[s] || ot[r] || e;
|
|
1075
|
+
}
|
|
1076
|
+
const yn = "http://www.w3.org/2000/svg";
|
|
1077
|
+
function xn(t) {
|
|
1078
|
+
if (t.length < 2)
|
|
1079
|
+
return 0;
|
|
1080
|
+
let n = 0, e = 0;
|
|
1081
|
+
for (let r = 1; r < t.length; r++) {
|
|
1082
|
+
const o = t[r - 1], c = t[r];
|
|
1083
|
+
if ([null, void 0, 0, 1 / 0, -1 / 0].includes(o))
|
|
1084
|
+
continue;
|
|
1085
|
+
const i = (c - o) / Math.abs(o) * 100;
|
|
1086
|
+
n += i, e++;
|
|
1087
|
+
}
|
|
1088
|
+
return e === 0 ? 0 : n / e;
|
|
1089
|
+
}
|
|
1090
|
+
function mn({ content: t, fontSize: n, fill: e, x: s, y: r }) {
|
|
1091
|
+
return t.split(`
|
|
1092
|
+
`).map(
|
|
1093
|
+
(c, i) => `<tspan x="${s}" y="${r + i * n}" fill="${e}">${c}</tspan>`
|
|
1094
|
+
).join("");
|
|
1095
|
+
}
|
|
1096
|
+
function bn({ content: t, fontSize: n, fill: e, x: s }) {
|
|
1097
|
+
return t.split(`
|
|
1098
|
+
`).map((o, c) => `<tspan x="${s}" dy="${c === 0 ? 0 : n}" fill="${e}">${o}</tspan>`).join("");
|
|
1099
|
+
}
|
|
1100
|
+
function Cn({
|
|
1101
|
+
content: t,
|
|
1102
|
+
fontSize: n,
|
|
1103
|
+
fill: e,
|
|
1104
|
+
maxWords: s,
|
|
1105
|
+
x: r,
|
|
1106
|
+
y: o
|
|
1107
|
+
}) {
|
|
1108
|
+
function c(l, a) {
|
|
1109
|
+
const f = l.split(" "), h = [];
|
|
1110
|
+
for (let F = 0; F < f.length; F += a)
|
|
1111
|
+
h.push(f.slice(F, F + a).join(" "));
|
|
1112
|
+
return h;
|
|
1113
|
+
}
|
|
1114
|
+
let i = "";
|
|
1115
|
+
return c(t, s).forEach((l, a) => {
|
|
1116
|
+
const f = `<tspan x="${r}" y="${o + a * n}" fill="${e}">${l}</tspan>`;
|
|
1117
|
+
i += f;
|
|
1118
|
+
}), i;
|
|
1119
|
+
}
|
|
1120
|
+
function Mn(t) {
|
|
1121
|
+
return t.length ? t.map((n) => at(n)) : [];
|
|
1122
|
+
}
|
|
1123
|
+
function $n(t, n = null) {
|
|
1124
|
+
const e = t.replace(/[\p{P}\p{S}]+/gu, " ").trim(), c = (/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Thai}\p{Script=Lao}\p{Script=Khmer}\p{Script=Tibetan}\p{Script=Myanmar}\p{Script=Devanagari}]/u.test(t) ? [...e] : e.split(/\s+/)).filter((i) => i.trim().length > 0).reduce((i, u) => (i[u] ? i[u] += 1 : i[u] = 1, i), {});
|
|
1125
|
+
return Object.keys(c).map((i) => {
|
|
1126
|
+
let u = i;
|
|
1127
|
+
return typeof n == "function" && typeof n(i) == "string" && (u = n(i)), {
|
|
1128
|
+
name: u,
|
|
1129
|
+
value: c[i]
|
|
1130
|
+
};
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
function Dn(t) {
|
|
1134
|
+
let n = t.reduce((i, u) => i + (u.stackRatio || 0), 0), e = t.filter((i) => i.stackRatio === void 0).length, s = 1 - n, r = e > 0 ? s / e : 0, o = t.map((i) => ({
|
|
1135
|
+
...i,
|
|
1136
|
+
stackRatio: i.stackRatio !== void 0 ? i.stackRatio : r
|
|
1137
|
+
})), c = 0;
|
|
1138
|
+
return o = o.map((i, u) => (c += i.stackRatio, {
|
|
1139
|
+
...i,
|
|
1140
|
+
stackIndex: u,
|
|
1141
|
+
cumulatedStackRatio: c
|
|
1142
|
+
})), o;
|
|
1143
|
+
}
|
|
1144
|
+
function Rn(t) {
|
|
1145
|
+
function n(l, a, f, h) {
|
|
1146
|
+
const F = f - l, E = h - a;
|
|
1147
|
+
return Math.sqrt(F * F + E * E);
|
|
1148
|
+
}
|
|
1149
|
+
function e(l, a, f, h) {
|
|
1150
|
+
let E = 0, A = l.x, p = l.y;
|
|
1151
|
+
for (let S = 1; S <= 100; S += 1) {
|
|
1152
|
+
const M = S / 100, D = 1 - M, I = D * D, P = M * M, L = I * D * l.x + 3 * I * M * a.x + 3 * D * P * f.x + P * M * h.x, x = I * D * l.y + 3 * I * M * a.y + 3 * D * P * f.y + P * M * h.y;
|
|
1153
|
+
E += n(A, p, L, x), A = L, p = x;
|
|
1154
|
+
}
|
|
1155
|
+
return E;
|
|
1156
|
+
}
|
|
1157
|
+
const s = t.match(/[a-zA-Z][^a-zA-Z]*/g);
|
|
1158
|
+
let r = 0, o = 0, c = 0, i = 0, u = 0;
|
|
1159
|
+
return s.forEach((l) => {
|
|
1160
|
+
const a = l[0], f = l.slice(1).trim().split(/[\s,]+/).map(Number);
|
|
1161
|
+
let h = 0;
|
|
1162
|
+
switch (a) {
|
|
1163
|
+
case "M":
|
|
1164
|
+
for (r = f[h++], o = f[h++], c = r, i = o; h < f.length; )
|
|
1165
|
+
u += n(r, o, f[h], f[h + 1]), r = f[h++], o = f[h++];
|
|
1166
|
+
break;
|
|
1167
|
+
case "L":
|
|
1168
|
+
for (; h < f.length; )
|
|
1169
|
+
u += n(r, o, f[h], f[h + 1]), r = f[h++], o = f[h++];
|
|
1170
|
+
break;
|
|
1171
|
+
case "H":
|
|
1172
|
+
for (; h < f.length; )
|
|
1173
|
+
u += n(r, o, f[h], o), r = f[h++];
|
|
1174
|
+
break;
|
|
1175
|
+
case "V":
|
|
1176
|
+
for (; h < f.length; )
|
|
1177
|
+
u += n(r, o, r, f[h]), o = f[h++];
|
|
1178
|
+
break;
|
|
1179
|
+
case "C":
|
|
1180
|
+
for (; h < f.length; )
|
|
1181
|
+
u += e(
|
|
1182
|
+
{ x: r, y: o },
|
|
1183
|
+
{ x: f[h], y: f[h + 1] },
|
|
1184
|
+
{ x: f[h + 2], y: f[h + 3] },
|
|
1185
|
+
{ x: f[h + 4], y: f[h + 5] }
|
|
1186
|
+
), r = f[h + 4], o = f[h + 5], h += 6;
|
|
1187
|
+
break;
|
|
1188
|
+
case "Z":
|
|
1189
|
+
u += n(r, o, c, i), r = c, o = i;
|
|
1190
|
+
break;
|
|
1191
|
+
}
|
|
1192
|
+
}), u;
|
|
1193
|
+
}
|
|
1194
|
+
function Sn({
|
|
1195
|
+
relator: t,
|
|
1196
|
+
adjuster: n,
|
|
1197
|
+
source: e,
|
|
1198
|
+
threshold: s = 0,
|
|
1199
|
+
fallback: r,
|
|
1200
|
+
max: o = 24
|
|
1201
|
+
}) {
|
|
1202
|
+
const c = t / (n / e);
|
|
1203
|
+
return c > o ? o : c < s ? r : c;
|
|
1204
|
+
}
|
|
1205
|
+
function Bn(t) {
|
|
1206
|
+
return t.reduce((n, e) => (e.series.forEach((s, r) => {
|
|
1207
|
+
![void 0, null, 1 / 0, -1 / 0].includes(s) && !isNaN(s) && (n[r] = (n[r] || 0) + s);
|
|
1208
|
+
}), n), []);
|
|
1209
|
+
}
|
|
1210
|
+
function It(t, { value: n, config: e }) {
|
|
1211
|
+
let s = !1, r = n;
|
|
1212
|
+
if (typeof t == "function")
|
|
1213
|
+
try {
|
|
1214
|
+
r = t({ value: n, config: e }), ["number", "string"].includes(typeof r) ? s = !0 : r = n;
|
|
1215
|
+
} catch (o) {
|
|
1216
|
+
console.warn("Formatter could not be applied:", o), s = !1;
|
|
1217
|
+
}
|
|
1218
|
+
return {
|
|
1219
|
+
isValid: s,
|
|
1220
|
+
value: r
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
function Nn(t, n, e, s) {
|
|
1224
|
+
const { isValid: r, value: o } = It(t, { value: n, config: s });
|
|
1225
|
+
return r ? o : e;
|
|
1226
|
+
}
|
|
1227
|
+
function In(t, n) {
|
|
1228
|
+
return n.split(".").every((e) => t !== null && typeof t == "object" && e in t ? (t = t[e], !0) : !1);
|
|
1229
|
+
}
|
|
1230
|
+
function Ln(t, n = []) {
|
|
1231
|
+
function e(r) {
|
|
1232
|
+
return typeof r == "string" && isNaN(Number(r)) || typeof r == "number" && isFinite(r) ? r : 0;
|
|
1233
|
+
}
|
|
1234
|
+
function s(r) {
|
|
1235
|
+
if (Array.isArray(r))
|
|
1236
|
+
return r.map((o) => s(o));
|
|
1237
|
+
if (typeof r == "object" && r !== null) {
|
|
1238
|
+
let o = { ...r };
|
|
1239
|
+
return n.forEach((c) => {
|
|
1240
|
+
o.hasOwnProperty(c) && ![
|
|
1241
|
+
"NAME",
|
|
1242
|
+
"name",
|
|
1243
|
+
"TITLE",
|
|
1244
|
+
"title",
|
|
1245
|
+
"DESCRIPTION",
|
|
1246
|
+
"description",
|
|
1247
|
+
"LABEL",
|
|
1248
|
+
"label",
|
|
1249
|
+
"TIME",
|
|
1250
|
+
"time",
|
|
1251
|
+
"PERIOD",
|
|
1252
|
+
"period",
|
|
1253
|
+
"MONTH",
|
|
1254
|
+
"month",
|
|
1255
|
+
"YEAR",
|
|
1256
|
+
"year",
|
|
1257
|
+
"MONTHS",
|
|
1258
|
+
"months",
|
|
1259
|
+
"YEARS",
|
|
1260
|
+
"years",
|
|
1261
|
+
"DAY",
|
|
1262
|
+
"day",
|
|
1263
|
+
"DAYS",
|
|
1264
|
+
"days",
|
|
1265
|
+
"HOUR",
|
|
1266
|
+
"hour",
|
|
1267
|
+
"HOURS",
|
|
1268
|
+
"hours"
|
|
1269
|
+
].includes(c) && Array.isArray(o[c]) && (o[c] = s(o[c]));
|
|
1270
|
+
}), Object.fromEntries(
|
|
1271
|
+
Object.entries(o).map(([c, i]) => [c, s(i)])
|
|
1272
|
+
);
|
|
1273
|
+
} else
|
|
1274
|
+
return e(r);
|
|
1275
|
+
}
|
|
1276
|
+
return s(t);
|
|
1277
|
+
}
|
|
1278
|
+
function On(t, n = 100) {
|
|
1279
|
+
return t.length === 9 ? t.substring(0, 7) + rt[n] : t + rt[n];
|
|
1280
|
+
}
|
|
1281
|
+
function Tn({ series: t, center: n, maxRadius: e, hasGhost: s = !1 }) {
|
|
1282
|
+
const o = 360 / (t.length - (s ? 1 : 0));
|
|
1283
|
+
return t.map((i, u) => {
|
|
1284
|
+
const a = i * e, f = u * o, h = f + o, F = f + o / 2, E = v(f) - v(90), A = v(h) - v(90), p = v(F) - v(90), S = n.x + a * Math.cos(E), M = n.y + a * Math.sin(E), D = n.x + a * Math.cos(A), I = n.y + a * Math.sin(A), P = n.x + a * Math.cos(p), L = n.y + a * Math.sin(p);
|
|
1285
|
+
return {
|
|
1286
|
+
path: `
|
|
1287
|
+
M ${n.x} ${n.y}
|
|
1288
|
+
L ${S} ${M}
|
|
1289
|
+
A ${a} ${a} 0 0 1 ${D} ${I}
|
|
1290
|
+
Z
|
|
1291
|
+
`.trim(),
|
|
1292
|
+
middlePoint: { x: P, y: L },
|
|
1293
|
+
radius: a
|
|
1294
|
+
};
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
function Pn({ data: t, threshold: n }) {
|
|
1298
|
+
if (n >= t.length || n < 3)
|
|
1299
|
+
return t;
|
|
1300
|
+
const e = [], s = (t.length - 2) / (n - 2);
|
|
1301
|
+
let r = 0;
|
|
1302
|
+
e.push(t[r]);
|
|
1303
|
+
for (let o = 0; o < n - 2; o += 1) {
|
|
1304
|
+
const c = Math.floor((o + 1) * s) + 1, i = Math.min(Math.floor((o + 2) * s) + 1, t.length), u = t.slice(c, i);
|
|
1305
|
+
let l = 0, a = 0;
|
|
1306
|
+
for (const F of u)
|
|
1307
|
+
l += F.x, a += F.y;
|
|
1308
|
+
l /= u.length, a /= u.length;
|
|
1309
|
+
let f = -1, h = r;
|
|
1310
|
+
for (let F = c; F < i; F += 1) {
|
|
1311
|
+
const E = Math.abs(
|
|
1312
|
+
(t[r].x - l) * (t[F].y - t[r].y) - (t[r].x - t[F].x) * (a - t[r].y)
|
|
1313
|
+
);
|
|
1314
|
+
E > f && (f = E, h = F);
|
|
1315
|
+
}
|
|
1316
|
+
e.push(t[h]), r = h;
|
|
1317
|
+
}
|
|
1318
|
+
return e.push(t[t.length - 1]), e;
|
|
1319
|
+
}
|
|
1320
|
+
function wn({ data: t, threshold: n }) {
|
|
1321
|
+
if (n >= t.length || n < 3)
|
|
1322
|
+
return t;
|
|
1323
|
+
const e = [], s = (t.length - 2) / (n - 2);
|
|
1324
|
+
let r = 0;
|
|
1325
|
+
e.push(t[r]);
|
|
1326
|
+
for (let o = 0; o < n - 2; o += 1) {
|
|
1327
|
+
const c = Math.floor((o + 1) * s) + 1, i = Math.min(Math.floor((o + 2) * s) + 1, t.length), u = t.slice(c, i), l = u.reduce((h, F) => h + F, 0) / u.length;
|
|
1328
|
+
let a = -1, f = r;
|
|
1329
|
+
for (let h = c; h < i; h += 1) {
|
|
1330
|
+
const F = Math.abs((t[r] - l) * (h - r));
|
|
1331
|
+
F > a && (a = F, f = h);
|
|
1332
|
+
}
|
|
1333
|
+
e.push(t[f]), r = f;
|
|
1334
|
+
}
|
|
1335
|
+
return e.push(t[t.length - 1]), e;
|
|
1336
|
+
}
|
|
1337
|
+
function Yn({ data: t, threshold: n, key: e = "value" }) {
|
|
1338
|
+
if (n >= t.length || n < 3)
|
|
1339
|
+
return t;
|
|
1340
|
+
const s = [], r = (t.length - 2) / (n - 2);
|
|
1341
|
+
let o = 0;
|
|
1342
|
+
s.push(t[o]);
|
|
1343
|
+
for (let c = 0; c < n - 2; c += 1) {
|
|
1344
|
+
const i = Math.floor((c + 1) * r) + 1, u = Math.min(Math.floor((c + 2) * r) + 1, t.length), l = t.slice(i, u), a = l.reduce((F, E) => F + E[e], 0) / l.length;
|
|
1345
|
+
let f = -1, h = o;
|
|
1346
|
+
for (let F = i; F < u; F += 1) {
|
|
1347
|
+
const E = Math.abs((t[o][e] - a) * (F - o));
|
|
1348
|
+
E > f && (f = E, h = F);
|
|
1349
|
+
}
|
|
1350
|
+
s.push(t[h]), o = h;
|
|
1351
|
+
}
|
|
1352
|
+
return s.push(t[t.length - 1]), s;
|
|
1353
|
+
}
|
|
1354
|
+
function kn({ radius: t, centerX: n, centerY: e, percentage: s }) {
|
|
1355
|
+
s = Math.max(0, Math.min(1, s));
|
|
1356
|
+
const r = s * Math.PI, o = n - t, c = e, i = n - t * Math.cos(r), u = e - t * Math.sin(r);
|
|
1357
|
+
return `M ${n},${e} L ${o},${c} A ${t},${t} 0 0 1 ${i},${u} Z`.trim();
|
|
1358
|
+
}
|
|
1359
|
+
function Hn({ svgElement: t, x: n, y: e, offsetY: s = 0, element: r }) {
|
|
1360
|
+
if (!t || !r) return { top: 0, left: 0 };
|
|
1361
|
+
const o = t.createSVGPoint();
|
|
1362
|
+
o.x = n, o.y = e;
|
|
1363
|
+
const c = o.matrixTransform(t.getScreenCTM()), i = t.getBoundingClientRect(), u = r.getBoundingClientRect();
|
|
1364
|
+
let l = 0, a = 0;
|
|
1365
|
+
return c.x - u.width / 2 < i.left ? l = 0 : c.x + u.width > i.right ? l = -u.width : l = -u.width / 2, c.y - s - u.height < i.top ? a = s : a = -u.height - s, {
|
|
1366
|
+
top: c.y + a,
|
|
1367
|
+
left: c.x + l
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1370
|
+
function Un({ svgElement: t, x: n, y: e, element: s, position: r }) {
|
|
1371
|
+
if (!t || !s) return { top: 0, left: 0 };
|
|
1372
|
+
const o = t.createSVGPoint();
|
|
1373
|
+
o.x = n, o.y = e;
|
|
1374
|
+
const c = o.matrixTransform(t.getScreenCTM()), { height: i, width: u } = s.getBoundingClientRect();
|
|
1375
|
+
let l = r === "right" ? 0 : -u, a = -(i / 2);
|
|
1376
|
+
return {
|
|
1377
|
+
top: c.y + a,
|
|
1378
|
+
left: c.x + l
|
|
1379
|
+
};
|
|
1380
|
+
}
|
|
1381
|
+
function _(t) {
|
|
1382
|
+
if (t === null || typeof t != "object")
|
|
1383
|
+
return t;
|
|
1384
|
+
if (t instanceof Date)
|
|
1385
|
+
return new Date(t.getTime());
|
|
1386
|
+
if (t instanceof RegExp)
|
|
1387
|
+
return new RegExp(t.source, t.flags);
|
|
1388
|
+
if (t instanceof Map) {
|
|
1389
|
+
const e = /* @__PURE__ */ new Map();
|
|
1390
|
+
for (const [s, r] of t.entries())
|
|
1391
|
+
e.set(s, _(r));
|
|
1392
|
+
return e;
|
|
1393
|
+
}
|
|
1394
|
+
if (t instanceof Set) {
|
|
1395
|
+
const e = /* @__PURE__ */ new Set();
|
|
1396
|
+
for (const s of t.values())
|
|
1397
|
+
e.add(_(s));
|
|
1398
|
+
return e;
|
|
1399
|
+
}
|
|
1400
|
+
if (Array.isArray(t))
|
|
1401
|
+
return t.map((e) => _(e));
|
|
1402
|
+
const n = {};
|
|
1403
|
+
for (const e in t)
|
|
1404
|
+
Object.prototype.hasOwnProperty.call(t, e) && (n[e] = _(t[e]));
|
|
1405
|
+
return n;
|
|
1406
|
+
}
|
|
1407
|
+
function Lt(t) {
|
|
1408
|
+
const n = [];
|
|
1409
|
+
let e = [];
|
|
1410
|
+
for (const s of t)
|
|
1411
|
+
!s || s.value == null || Number.isNaN(s.x) || Number.isNaN(s.y) ? (e.length && n.push(e), e = []) : e.push(s);
|
|
1412
|
+
return e.length && n.push(e), n;
|
|
1413
|
+
}
|
|
1414
|
+
function Gn(t, n) {
|
|
1415
|
+
const e = t.filter((c) => !!c);
|
|
1416
|
+
if (!e[0]) return [-10, -10, "", -10, -10].toString();
|
|
1417
|
+
const s = { x: e[0].x, y: n }, r = { x: e.at(-1).x, y: n }, o = [];
|
|
1418
|
+
return e.forEach((c) => {
|
|
1419
|
+
o.push(`${c.x},${c.y} `);
|
|
1420
|
+
}), [s.x, s.y, ...o, r.x, r.y].toString();
|
|
1421
|
+
}
|
|
1422
|
+
function Xn(t, n) {
|
|
1423
|
+
if (!t[0]) return [-10, -10, "", -10, -10].toString();
|
|
1424
|
+
const e = Lt(t);
|
|
1425
|
+
return e.length ? e.map((s) => {
|
|
1426
|
+
const r = { x: s[0].x, y: n }, o = { x: s.at(-1).x, y: n }, c = [];
|
|
1427
|
+
return s.forEach((i) => {
|
|
1428
|
+
c.push(`${i.x},${i.y} `);
|
|
1429
|
+
}), [r.x, r.y, ...c, o.x, o.y].toString();
|
|
1430
|
+
}).join(";") : "";
|
|
1431
|
+
}
|
|
1432
|
+
function Ot(t) {
|
|
1433
|
+
const n = [];
|
|
1434
|
+
let e = [];
|
|
1435
|
+
for (const s of t)
|
|
1436
|
+
s.value == null || Number.isNaN(s.x) || Number.isNaN(s.y) ? (e.length > 1 && n.push(e), e = []) : e.push(s);
|
|
1437
|
+
return e.length > 1 && n.push(e), n;
|
|
1438
|
+
}
|
|
1439
|
+
function vn(t) {
|
|
1440
|
+
let n = "", e = !1;
|
|
1441
|
+
const s = (r) => r.value != null && Number.isFinite(r.x) && Number.isFinite(r.y);
|
|
1442
|
+
for (let r = 0; r < t.length; r++) {
|
|
1443
|
+
const o = t[r];
|
|
1444
|
+
if (!s(o))
|
|
1445
|
+
continue;
|
|
1446
|
+
const c = `${d(o.x)},${d(o.y)}`;
|
|
1447
|
+
if (!e)
|
|
1448
|
+
n += c, e = !0;
|
|
1449
|
+
else {
|
|
1450
|
+
const i = t[r - 1], u = s(i) ? "L" : "M";
|
|
1451
|
+
n += `${u}${c}`;
|
|
1452
|
+
}
|
|
1453
|
+
n += " ";
|
|
1454
|
+
}
|
|
1455
|
+
return n.trim();
|
|
1456
|
+
}
|
|
1457
|
+
function jn(t) {
|
|
1458
|
+
const n = Ot(t);
|
|
1459
|
+
if (!n.length) return "";
|
|
1460
|
+
let e = "";
|
|
1461
|
+
for (const [s, r] of n.entries()) {
|
|
1462
|
+
if (r.length < 2) continue;
|
|
1463
|
+
const o = r.length - 1, c = [], i = [], u = [], l = [];
|
|
1464
|
+
for (let a = 0; a < o; a += 1)
|
|
1465
|
+
c[a] = r[a + 1].x - r[a].x, i[a] = r[a + 1].y - r[a].y, u[a] = i[a] / c[a];
|
|
1466
|
+
l[0] = u[0], l[o] = u[o - 1];
|
|
1467
|
+
for (let a = 1; a < o; a += 1)
|
|
1468
|
+
if (u[a - 1] * u[a] <= 0)
|
|
1469
|
+
l[a] = 0;
|
|
1470
|
+
else {
|
|
1471
|
+
const f = 2 * u[a - 1] * u[a] / (u[a - 1] + u[a]);
|
|
1472
|
+
l[a] = f;
|
|
1473
|
+
}
|
|
1474
|
+
e += `${s === 0 ? "" : "M"}${d(r[0].x)},${d(r[0].y)} `;
|
|
1475
|
+
for (let a = 0; a < o; a += 1) {
|
|
1476
|
+
const f = r[a].x, h = r[a].y, F = r[a + 1].x, E = r[a + 1].y, A = l[a], p = l[a + 1], S = f + (F - f) / 3, M = h + A * (F - f) / 3, D = F - (F - f) / 3, I = E - p * (F - f) / 3;
|
|
1477
|
+
e += `C${d(S)},${d(M)} ${d(D)},${d(I)} ${d(F)},${d(E)} `;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
return e.trim();
|
|
1481
|
+
}
|
|
1482
|
+
function Kn(t, n, e = !1, s = !0) {
|
|
1483
|
+
function r(c) {
|
|
1484
|
+
const i = [];
|
|
1485
|
+
let u = [];
|
|
1486
|
+
for (const l of c)
|
|
1487
|
+
!l || l.value == null || Number.isNaN(l.x) || Number.isNaN(l.y) ? (u.length > 1 && i.push(u), u = []) : u.push(l);
|
|
1488
|
+
return u.length > 1 && i.push(u), i;
|
|
1489
|
+
}
|
|
1490
|
+
return (e ? r(t) : [t]).map((c) => {
|
|
1491
|
+
if (c.length < 2) return "";
|
|
1492
|
+
const i = c.length - 1, u = [], l = [], a = [], f = [];
|
|
1493
|
+
for (let F = 0; F < i; F += 1)
|
|
1494
|
+
u[F] = c[F + 1].x - c[F].x, l[F] = c[F + 1].y - c[F].y, a[F] = l[F] / u[F];
|
|
1495
|
+
f[0] = a[0], f[i] = a[i - 1];
|
|
1496
|
+
for (let F = 1; F < i; F += 1)
|
|
1497
|
+
if (a[F - 1] * a[F] <= 0)
|
|
1498
|
+
f[F] = 0;
|
|
1499
|
+
else {
|
|
1500
|
+
const E = 2 * a[F - 1] * a[F] / (a[F - 1] + a[F]);
|
|
1501
|
+
f[F] = E;
|
|
1502
|
+
}
|
|
1503
|
+
let h = `M${c[0].x},${n}`;
|
|
1504
|
+
h += ` L${c[0].x},${c[0].y}`;
|
|
1505
|
+
for (let F = 0; F < i; F += 1) {
|
|
1506
|
+
const E = c[F].x, A = c[F].y, p = c[F + 1].x, S = c[F + 1].y, M = f[F], D = f[F + 1], I = E + (p - E) / 3, P = A + M * (p - E) / 3, L = p - (p - E) / 3, x = S - D * (p - E) / 3;
|
|
1507
|
+
h += ` C${I},${P} ${L},${x} ${p},${S}`;
|
|
1508
|
+
}
|
|
1509
|
+
return h += ` L${c[i].x},${n} ${s ? "Z" : ""}`, h;
|
|
1510
|
+
}).filter(Boolean);
|
|
1511
|
+
}
|
|
1512
|
+
function Wn(t) {
|
|
1513
|
+
return t.toString().toLowerCase().replace(/\s+/g, "-").replace(/[^\w\-]+/g, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
|
|
1514
|
+
}
|
|
1515
|
+
function Tt(t) {
|
|
1516
|
+
return t && typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0 ? null : t;
|
|
1517
|
+
}
|
|
1518
|
+
function it(t) {
|
|
1519
|
+
if (Array.isArray(t))
|
|
1520
|
+
return t.map(it);
|
|
1521
|
+
if (t && typeof t == "object" && !Array.isArray(t)) {
|
|
1522
|
+
const n = {};
|
|
1523
|
+
for (const e in t)
|
|
1524
|
+
Object.hasOwn(t, e) && (n[e] = it(t[e]));
|
|
1525
|
+
return Tt(n);
|
|
1526
|
+
}
|
|
1527
|
+
return t;
|
|
1528
|
+
}
|
|
1529
|
+
function Vn(t) {
|
|
1530
|
+
return 1 - Math.pow(1 - t, 3);
|
|
1531
|
+
}
|
|
1532
|
+
function _n({ values: t, config: n = {} }) {
|
|
1533
|
+
const {
|
|
1534
|
+
keepInvalid: e = !0,
|
|
1535
|
+
convertInvalidToZero: s = !1
|
|
1536
|
+
} = n, r = [];
|
|
1537
|
+
let o = 0, c = 0;
|
|
1538
|
+
function i(l) {
|
|
1539
|
+
return typeof l != "number" || !Number.isFinite(l);
|
|
1540
|
+
}
|
|
1541
|
+
function u(l) {
|
|
1542
|
+
o += l, c += 1, r.push(o / c);
|
|
1543
|
+
}
|
|
1544
|
+
for (const l of t)
|
|
1545
|
+
i(l) ? s && e ? u(0) : !s && e && r.push(l) : u(l);
|
|
1546
|
+
return r;
|
|
1547
|
+
}
|
|
1548
|
+
function zn({ values: t, config: n = {} }) {
|
|
1549
|
+
const {
|
|
1550
|
+
keepInvalid: e = !0,
|
|
1551
|
+
convertInvalidToZero: s = !1
|
|
1552
|
+
} = n, r = [], o = [];
|
|
1553
|
+
function c(u) {
|
|
1554
|
+
return typeof u != "number" || !Number.isFinite(u);
|
|
1555
|
+
}
|
|
1556
|
+
function i(u) {
|
|
1557
|
+
o.push(u), o.sort((f, h) => f - h);
|
|
1558
|
+
const l = o.length, a = l >> 1;
|
|
1559
|
+
l % 2 === 1 ? r.push(o[a]) : r.push((o[a - 1] + o[a]) / 2);
|
|
1560
|
+
}
|
|
1561
|
+
for (const u of t)
|
|
1562
|
+
c(u) ? s && e ? i(0) : !s && e && r.push(u) : i(u);
|
|
1563
|
+
return r;
|
|
1564
|
+
}
|
|
1565
|
+
function Zn({
|
|
1566
|
+
el: t,
|
|
1567
|
+
bounds: n,
|
|
1568
|
+
currentFontSize: e,
|
|
1569
|
+
minFontSize: s = 6,
|
|
1570
|
+
attempts: r = 200,
|
|
1571
|
+
padding: o = 1
|
|
1572
|
+
}) {
|
|
1573
|
+
if (!t || !e) return 0;
|
|
1574
|
+
let c = e;
|
|
1575
|
+
t.setAttribute("font-size", c);
|
|
1576
|
+
const { x: i, y: u, width: l, height: a } = n, f = i + o, h = u + o, F = i + l - o, E = u + a - o;
|
|
1577
|
+
let A = t.getBBox();
|
|
1578
|
+
if (A.x >= f + o && A.y >= h + o && A.x + A.width <= F - o && A.y + A.height <= E - o)
|
|
1579
|
+
return c;
|
|
1580
|
+
let p = r;
|
|
1581
|
+
for (; p-- > 0 && c > s && (c--, t.setAttribute("font-size", c), A = t.getBBox(), !(A.x >= f + o && A.y >= h + o && A.x + A.width <= F - o && A.y + A.height <= E - o)); )
|
|
1582
|
+
;
|
|
1583
|
+
return c < s && (c = 0, t.setAttribute("font-size", c)), c;
|
|
1584
|
+
}
|
|
1585
|
+
function Qn({
|
|
1586
|
+
value: t,
|
|
1587
|
+
maxDecimals: n = 4,
|
|
1588
|
+
fallbackFormatter: e,
|
|
1589
|
+
removeTrailingZero: s = !0
|
|
1590
|
+
}) {
|
|
1591
|
+
if (t === 0)
|
|
1592
|
+
return "0";
|
|
1593
|
+
const r = Math.abs(t);
|
|
1594
|
+
if (r >= 1 && typeof e == "function") {
|
|
1595
|
+
const i = e(t);
|
|
1596
|
+
return String(i);
|
|
1597
|
+
}
|
|
1598
|
+
let o;
|
|
1599
|
+
if (r < 1) {
|
|
1600
|
+
const i = Math.floor(Math.log10(r));
|
|
1601
|
+
o = Math.min(Math.max(1 - i, 1), n);
|
|
1602
|
+
} else
|
|
1603
|
+
o = n;
|
|
1604
|
+
let c = t.toFixed(o);
|
|
1605
|
+
return s && (c = c.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, "")), c;
|
|
1606
|
+
}
|
|
1607
|
+
function qn(t) {
|
|
1608
|
+
const n = [];
|
|
1609
|
+
for (let e = 0; e < t; e += 1)
|
|
1610
|
+
n.push(e === 0 ? 0 : e === 1 ? 1 : n[e - 1] + n[e - 2]);
|
|
1611
|
+
return n;
|
|
1612
|
+
}
|
|
1613
|
+
function Jn(t, n = 20) {
|
|
1614
|
+
t = t.replace(/[\r\n]+/g, " ");
|
|
1615
|
+
const e = t.split(" ");
|
|
1616
|
+
let s = "", r = "";
|
|
1617
|
+
for (let o of e)
|
|
1618
|
+
(s + (s ? " " : "") + o).length <= n ? s += (s ? " " : "") + o : (s && (r += (r ? `
|
|
1619
|
+
` : "") + s), s = o);
|
|
1620
|
+
return s && (r += (r ? `
|
|
1621
|
+
` : "") + s), r;
|
|
1622
|
+
}
|
|
1623
|
+
function te(t) {
|
|
1624
|
+
const {
|
|
1625
|
+
lineA: n,
|
|
1626
|
+
lineB: e,
|
|
1627
|
+
colorLineA: s,
|
|
1628
|
+
// fill when A is above
|
|
1629
|
+
colorLineB: r,
|
|
1630
|
+
// fill when B is above
|
|
1631
|
+
smoothA: o = !1,
|
|
1632
|
+
smoothB: c = !1,
|
|
1633
|
+
sampleStepPx: i = 2,
|
|
1634
|
+
cutNullValues: u = !0,
|
|
1635
|
+
// break across gaps
|
|
1636
|
+
merge: l = !0
|
|
1637
|
+
// merge into large polygons
|
|
1638
|
+
} = t || {};
|
|
1639
|
+
if (!Array.isArray(n) || !Array.isArray(e) || !n.length || !e.length)
|
|
1640
|
+
return [];
|
|
1641
|
+
const a = (x) => Number.isFinite(x);
|
|
1642
|
+
function f(x) {
|
|
1643
|
+
if (!u) return [x.filter((b) => b && a(b.x) && a(b.y))];
|
|
1644
|
+
const m = [];
|
|
1645
|
+
let C = [];
|
|
1646
|
+
for (const b of x)
|
|
1647
|
+
b && a(b.x) && a(b.y) && b.value != null ? C.push({ x: b.x, y: b.y }) : (C.length > 1 && m.push(C), C = []);
|
|
1648
|
+
return C.length > 1 && m.push(C), m;
|
|
1649
|
+
}
|
|
1650
|
+
function h(x) {
|
|
1651
|
+
const m = x.length - 1, C = new Array(m), b = new Array(m), g = new Array(m), B = new Array(x.length);
|
|
1652
|
+
for (let y = 0; y < m; y += 1)
|
|
1653
|
+
C[y] = x[y + 1].x - x[y].x, b[y] = x[y + 1].y - x[y].y, g[y] = b[y] / C[y];
|
|
1654
|
+
B[0] = g[0], B[m] = g[m - 1];
|
|
1655
|
+
for (let y = 1; y < m; y += 1)
|
|
1656
|
+
g[y - 1] * g[y] <= 0 ? B[y] = 0 : B[y] = 2 * g[y - 1] * g[y] / (g[y - 1] + g[y]);
|
|
1657
|
+
return B;
|
|
1658
|
+
}
|
|
1659
|
+
function F(x, m, C, b, g) {
|
|
1660
|
+
const B = x.x, y = m.x, O = x.y, $ = m.y, T = y - B;
|
|
1661
|
+
if (T === 0) return O;
|
|
1662
|
+
const w = (g - B) / T, N = w * w, k = N * w, H = 2 * k - 3 * N + 1, R = k - 2 * N + w, Y = -2 * k + 3 * N, U = k - N;
|
|
1663
|
+
return H * O + R * (C * T) + Y * $ + U * (b * T);
|
|
1664
|
+
}
|
|
1665
|
+
function E(x, m) {
|
|
1666
|
+
const C = f(x);
|
|
1667
|
+
if (!C.length) return [];
|
|
1668
|
+
let b = 1 / 0, g = -1 / 0;
|
|
1669
|
+
for (const $ of C)
|
|
1670
|
+
b = Math.min(b, $[0].x), g = Math.max(g, $[$.length - 1].x);
|
|
1671
|
+
if (!a(b) || !a(g) || g <= b) return [];
|
|
1672
|
+
const B = Math.max(1, i), y = [];
|
|
1673
|
+
for (let $ = b; $ <= g; $ += B) y.push($);
|
|
1674
|
+
y[y.length - 1] < g && y.push(g);
|
|
1675
|
+
const O = [];
|
|
1676
|
+
for (const $ of y) {
|
|
1677
|
+
let T = null, w = !1;
|
|
1678
|
+
for (const N of C) {
|
|
1679
|
+
const k = N.length - 1;
|
|
1680
|
+
if (!($ < N[0].x - 1e-9 || $ > N[k].x + 1e-9)) {
|
|
1681
|
+
for (let H = 0; H < k; H += 1) {
|
|
1682
|
+
const R = N[H], Y = N[H + 1];
|
|
1683
|
+
if (!($ + 1e-9 < R.x || $ - 1e-9 > Y.x)) {
|
|
1684
|
+
if (m) {
|
|
1685
|
+
const U = N.__tangents || (N.__tangents = h(N));
|
|
1686
|
+
T = F(R, Y, U[H], U[H + 1], $);
|
|
1687
|
+
} else {
|
|
1688
|
+
const U = ($ - R.x) / (Y.x - R.x || 1);
|
|
1689
|
+
T = R.y + U * (Y.y - R.y);
|
|
1690
|
+
}
|
|
1691
|
+
w = !0;
|
|
1692
|
+
break;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
if (w) break;
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
T == null ? O.push({ x: $, y: null, hole: !0 }) : O.push({ x: $, y: T, hole: !1 });
|
|
1699
|
+
}
|
|
1700
|
+
return O;
|
|
1701
|
+
}
|
|
1702
|
+
function A(x, m, C) {
|
|
1703
|
+
return x + C * (m - x);
|
|
1704
|
+
}
|
|
1705
|
+
function p(x, m) {
|
|
1706
|
+
const C = [], b = [], g = Math.min(x.length, m.length);
|
|
1707
|
+
for (let B = 0; B < g - 1; B += 1) {
|
|
1708
|
+
const y = x[B], O = x[B + 1], $ = m[B], T = m[B + 1];
|
|
1709
|
+
if (C.push(y), b.push($), y.hole || O.hole || $.hole || T.hole || y.y == null || O.y == null || $.y == null || T.y == null)
|
|
1710
|
+
continue;
|
|
1711
|
+
const w = y.y - $.y, N = O.y - T.y;
|
|
1712
|
+
if (w > 0 && N < 0 || w < 0 && N > 0) {
|
|
1713
|
+
const k = w / (w - N), H = A(y.x, O.x, k), R = A(y.y, O.y, k), Y = { x: H, y: R, hole: !1 }, U = { x: H, y: R, hole: !1 };
|
|
1714
|
+
C.push(Y), b.push(U);
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
return g > 0 && (C.push(x[g - 1]), b.push(m[g - 1])), { A: C, B: b };
|
|
1718
|
+
}
|
|
1719
|
+
function S(x, m) {
|
|
1720
|
+
const C = [], b = Math.min(x.length, m.length);
|
|
1721
|
+
for (let g = 0; g < b - 1; g += 1) {
|
|
1722
|
+
const B = x[g], y = x[g + 1], O = m[g], $ = m[g + 1];
|
|
1723
|
+
if (B.hole || y.hole || O.hole || $.hole || B.y == null || y.y == null || O.y == null || $.y == null) continue;
|
|
1724
|
+
const T = B.y - O.y, w = y.y - $.y, N = T <= 0 ? B : O, k = w <= 0 ? y : $, H = w <= 0 ? $ : y, R = T <= 0 ? O : B, Y = T <= 0 ? s : r, U = [
|
|
1725
|
+
`M${N.x},${N.y}`,
|
|
1726
|
+
`L${k.x},${k.y}`,
|
|
1727
|
+
`L${H.x},${H.y}`,
|
|
1728
|
+
`L${R.x},${R.y}`,
|
|
1729
|
+
"Z"
|
|
1730
|
+
].join(" ");
|
|
1731
|
+
C.push({ d: U, color: Y });
|
|
1732
|
+
}
|
|
1733
|
+
return C;
|
|
1734
|
+
}
|
|
1735
|
+
function M(x, m) {
|
|
1736
|
+
const C = [], b = Math.min(x.length, m.length);
|
|
1737
|
+
if (b < 2) return C;
|
|
1738
|
+
let g = 0;
|
|
1739
|
+
for (; g < b - 1; ) {
|
|
1740
|
+
for (; g < b - 1; ) {
|
|
1741
|
+
const R = x[g], Y = m[g], U = x[g + 1], j = m[g + 1];
|
|
1742
|
+
if (!R.hole && !Y.hole && !U.hole && !j.hole && R.y != null && Y.y != null && U.y != null && j.y != null) break;
|
|
1743
|
+
g += 1;
|
|
1744
|
+
}
|
|
1745
|
+
if (g >= b - 1) break;
|
|
1746
|
+
const B = g, y = Math.sign(m[g].y - x[g].y || 0) || 1;
|
|
1747
|
+
for (g += 1; g < b - 1; ) {
|
|
1748
|
+
const R = x[g], Y = m[g], U = x[g + 1], j = m[g + 1];
|
|
1749
|
+
if (R.hole || Y.hole || U.hole || j.hole || R.y == null || Y.y == null || U.y == null || j.y == null || (Math.sign(Y.y - R.y || 0) || 1) !== y) break;
|
|
1750
|
+
g += 1;
|
|
1751
|
+
}
|
|
1752
|
+
const O = g + 0, $ = y >= 0 ? x : m, T = y >= 0 ? m : x, w = y >= 0 ? s : r, N = [];
|
|
1753
|
+
for (let R = B; R <= O; R += 1)
|
|
1754
|
+
N.push(`${$[R].x},${$[R].y}`);
|
|
1755
|
+
const k = [];
|
|
1756
|
+
for (let R = O; R >= B; R -= 1)
|
|
1757
|
+
k.push(`${T[R].x},${T[R].y}`);
|
|
1758
|
+
const H = `M${N[0]} L${N.slice(1).join(" L")} L${k.join(" L")} Z`;
|
|
1759
|
+
C.push({ d: H, color: w });
|
|
1760
|
+
}
|
|
1761
|
+
return C;
|
|
1762
|
+
}
|
|
1763
|
+
const D = E(n, o), I = E(e, c), { A: P, B: L } = p(D, I);
|
|
1764
|
+
return l ? M(P, L) : S(P, L);
|
|
1765
|
+
}
|
|
1766
|
+
function ne(t, n, e = {}) {
|
|
1767
|
+
const r = { ...{ bubbles: !0, cancelable: !0, composed: !0 }, ...e }, o = /* @__PURE__ */ new Set([
|
|
1768
|
+
"click",
|
|
1769
|
+
"mousedown",
|
|
1770
|
+
"mouseup",
|
|
1771
|
+
"mousemove",
|
|
1772
|
+
"mouseover",
|
|
1773
|
+
"mouseout",
|
|
1774
|
+
"mouseenter",
|
|
1775
|
+
"mouseleave",
|
|
1776
|
+
"dblclick",
|
|
1777
|
+
"contextmenu"
|
|
1778
|
+
]), c = /* @__PURE__ */ new Set([
|
|
1779
|
+
"keydown",
|
|
1780
|
+
"keyup",
|
|
1781
|
+
"keypress"
|
|
1782
|
+
]);
|
|
1783
|
+
let i;
|
|
1784
|
+
if (o.has(n))
|
|
1785
|
+
i = new MouseEvent(n, r);
|
|
1786
|
+
else if (c.has(n))
|
|
1787
|
+
i = new KeyboardEvent(n, r);
|
|
1788
|
+
else if (n === "input")
|
|
1789
|
+
try {
|
|
1790
|
+
i = new InputEvent(n, r);
|
|
1791
|
+
} catch {
|
|
1792
|
+
i = new Event(n, r);
|
|
1793
|
+
}
|
|
1794
|
+
else n.startsWith("custom:") ? i = new CustomEvent(n, { ...r, detail: r.detail }) : i = new Event(n, r);
|
|
1795
|
+
return t.dispatchEvent(i), i;
|
|
1796
|
+
}
|
|
1797
|
+
export {
|
|
1798
|
+
Zt as $,
|
|
1799
|
+
En as A,
|
|
1800
|
+
q as B,
|
|
1801
|
+
rt as C,
|
|
1802
|
+
In as D,
|
|
1803
|
+
an as E,
|
|
1804
|
+
Sn as F,
|
|
1805
|
+
Kt as G,
|
|
1806
|
+
Tn as H,
|
|
1807
|
+
qt as I,
|
|
1808
|
+
bn as J,
|
|
1809
|
+
Vn as K,
|
|
1810
|
+
Ln as L,
|
|
1811
|
+
tn as M,
|
|
1812
|
+
mn as N,
|
|
1813
|
+
nn as O,
|
|
1814
|
+
it as P,
|
|
1815
|
+
hn as Q,
|
|
1816
|
+
An as R,
|
|
1817
|
+
kn as S,
|
|
1818
|
+
_ as T,
|
|
1819
|
+
en as U,
|
|
1820
|
+
_t as V,
|
|
1821
|
+
zt as W,
|
|
1822
|
+
yn as X,
|
|
1823
|
+
Rn as Y,
|
|
1824
|
+
Pn as Z,
|
|
1825
|
+
jt as _,
|
|
1826
|
+
Nn as a,
|
|
1827
|
+
wn as a0,
|
|
1828
|
+
xn as a1,
|
|
1829
|
+
ln as a2,
|
|
1830
|
+
Yn as a3,
|
|
1831
|
+
Wt as a4,
|
|
1832
|
+
Vt as a5,
|
|
1833
|
+
Ht as a6,
|
|
1834
|
+
qn as a7,
|
|
1835
|
+
Dn as a8,
|
|
1836
|
+
Bn as a9,
|
|
1837
|
+
un as aa,
|
|
1838
|
+
Wn as ab,
|
|
1839
|
+
Kn as ac,
|
|
1840
|
+
Jn as ad,
|
|
1841
|
+
jn as ae,
|
|
1842
|
+
vn as af,
|
|
1843
|
+
ne as ag,
|
|
1844
|
+
ct as ah,
|
|
1845
|
+
Hn as ai,
|
|
1846
|
+
$n as aj,
|
|
1847
|
+
Cn as ak,
|
|
1848
|
+
Qn as al,
|
|
1849
|
+
_n as am,
|
|
1850
|
+
zn as an,
|
|
1851
|
+
Ut as ao,
|
|
1852
|
+
kt as ap,
|
|
1853
|
+
Xn as aq,
|
|
1854
|
+
Gn as ar,
|
|
1855
|
+
te as as,
|
|
1856
|
+
Un as at,
|
|
1857
|
+
X as b,
|
|
1858
|
+
Qt as c,
|
|
1859
|
+
fn as d,
|
|
1860
|
+
Mn as e,
|
|
1861
|
+
dn as f,
|
|
1862
|
+
pn as g,
|
|
1863
|
+
at as h,
|
|
1864
|
+
Gt as i,
|
|
1865
|
+
vt as j,
|
|
1866
|
+
Xt as k,
|
|
1867
|
+
Zn as l,
|
|
1868
|
+
on as m,
|
|
1869
|
+
Yt as n,
|
|
1870
|
+
gn as o,
|
|
1871
|
+
mt as p,
|
|
1872
|
+
d as q,
|
|
1873
|
+
cn as r,
|
|
1874
|
+
On as s,
|
|
1875
|
+
pt as t,
|
|
1876
|
+
Jt as u,
|
|
1877
|
+
V as v,
|
|
1878
|
+
W as w,
|
|
1879
|
+
sn as x,
|
|
1880
|
+
rn as y,
|
|
1881
|
+
Fn as z
|
|
1882
|
+
};
|