@orchidui/dashboard 1.8.1-93 → 1.8.1-96
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/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +295 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +891 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +68 -0
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +172 -0
- package/dist/CollapsibleTrigger-fCarY5DJ.js +154 -0
- package/dist/Collection-COudIl-A.js +55 -0
- package/dist/ConfigProvider-7mV0D7Sp.js +6 -0
- package/dist/Dashboard/Card/OcCard.js +1 -1
- package/dist/Dashboard/Charts/BarChart/OcBarChart.js +1 -1
- package/dist/Dashboard/Charts/BarRaceChart/OcBarRaceChart.js +1 -1
- package/dist/Dashboard/Charts/LineChart/OcLineChart.js +1 -1
- package/dist/Dashboard/Charts/PieChart/OcPieChart.js +1 -1
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +68 -0
- package/dist/DialogOverlay-Cj3UTjZ8.js +309 -0
- package/dist/DialogPortal-zAvO8zt4.js +23 -0
- package/dist/DialogTrigger-BIF1A4hk.js +72 -0
- package/dist/DismissableLayer-C7IJliOb.js +151 -0
- package/dist/FocusScope--pJ6bboI.js +121 -0
- package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +92 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +27 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +51 -0
- package/dist/ListboxItem-CjMk-mEX.js +417 -0
- package/dist/MenuSubTrigger-CUrxnPwO.js +845 -0
- package/dist/{OcBarChart-CgKo9rAM.js → OcBarChart-DFnF2-u0.js} +2 -2
- package/dist/{OcBarRaceChart-D_XrqdiO.js → OcBarRaceChart-B6S4Rrlq.js} +3 -3
- package/dist/{OcCard-BpqC7suH.js → OcCard-B3SCzVwn.js} +54 -58
- package/dist/OcCodeBlock-CBdVqav7.js +37 -0
- package/dist/{OcLineChart-dAL6sRiP.js → OcLineChart-CTDLgo1v.js} +2 -2
- package/dist/OcLottieAnimation-DeMoIDaX.js +7747 -0
- package/dist/{OcPieChart-Kn-CkXip.js → OcPieChart-NSv6CW-L.js} +4 -4
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +394 -0
- package/dist/PopperContent-BT3Svcc3.js +1465 -0
- package/dist/Presence-CxfTrw6l.js +133 -0
- package/dist/Primitive-B3twiLO1.js +44 -0
- package/dist/QuillEditor-hFQ0MJZO.js +9529 -0
- package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +297 -0
- package/dist/RovingFocusGroup-0OHdFQl0.js +92 -0
- package/dist/RovingFocusItem-s7Ug6oxb.js +82 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +1255 -0
- package/dist/Separator-DRam5i7g.js +54 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +27 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +17 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +135 -0
- package/dist/Teleport-DnUewq5H.js +25 -0
- package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +27 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +426 -0
- package/dist/VisuallyHidden-DMAU4heD.js +41 -0
- package/dist/VisuallyHiddenInput-DvJnsVHt.js +59 -0
- package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/array-CqVTtuYm.js +6 -0
- package/dist/arrays-4jDZqbdb.js +20 -0
- package/dist/check-C2tzJ0Gk.js +11 -0
- package/dist/chevron-down-CnpAlizg.js +13 -0
- package/dist/chevron-left-BOwFasou.js +13 -0
- package/dist/chevron-right-D308801z.js +13 -0
- package/dist/circle-A-6NpYiX.js +13 -0
- package/dist/clamp-BL1Rb24G.js +22 -0
- package/dist/constant-CuDQlTIy.js +3433 -0
- package/dist/createContext-CZEfaSVa.js +17 -0
- package/dist/createLucideIcon-eXqDwUWj.js +71 -0
- package/dist/ellipsis-CEG9G7eN.js +15 -0
- package/dist/getActiveElement-B-HWdUIb.js +11 -0
- package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +11 -0
- package/dist/index-B3LW8uSH.js +133 -0
- package/dist/index-BIlpXuWX.js +3430 -0
- package/dist/index-BlGEiPHj.js +1246 -0
- package/dist/index-BwPb_idr.js +574 -0
- package/dist/index-C9julNQm.js +173 -0
- package/dist/index-C_aI-Wfj.js +34 -0
- package/dist/index-CumjCvqB.js +5703 -0
- package/dist/index-LqWMCtOd.js +809 -0
- package/dist/index-OpE2oGce.js +110 -0
- package/dist/index.js +14 -14
- package/dist/isValueEqualOrExist-BDSMUv8t.js +8 -0
- package/dist/lib/utils.js +5 -0
- package/dist/nullish-CjWwlQS3.js +6 -0
- package/dist/ohash.D__AXeF1-DX2n0b2C.js +106 -0
- package/dist/plus-CgluTYQY.js +14 -0
- package/dist/text-zwICaAnx.js +743 -0
- package/dist/ui/accordion/index.js +7 -0
- package/dist/ui/alert/index.js +64 -0
- package/dist/ui/alert-dialog/index.js +356 -0
- package/dist/ui/aspect-ratio/index.js +50 -0
- package/dist/ui/auto-form/constant.js +5 -0
- package/dist/ui/auto-form/dependencies.js +61 -0
- package/dist/ui/auto-form/index.js +227 -0
- package/dist/ui/auto-form/interface.js +4 -0
- package/dist/ui/auto-form/utils.js +89 -0
- package/dist/ui/avatar/index.js +189 -0
- package/dist/ui/badge/index.js +37 -0
- package/dist/ui/breadcrumb/index.js +126 -0
- package/dist/ui/button/index.js +55 -0
- package/dist/ui/calendar/index.js +15 -0
- package/dist/ui/card/index.js +38 -0
- package/dist/ui/carousel/index.js +174 -0
- package/dist/ui/carousel/interface.js +1 -0
- package/dist/ui/carousel/useCarousel.js +1288 -0
- package/dist/ui/chart/index.js +8 -0
- package/dist/ui/chart/interface.js +1 -0
- package/dist/ui/chart-area/index.js +331 -0
- package/dist/ui/chart-bar/index.js +490 -0
- package/dist/ui/chart-donut/index.js +509 -0
- package/dist/ui/chart-line/index.js +110 -0
- package/dist/ui/checkbox/index.js +4 -0
- package/dist/ui/collapsible/index.js +60 -0
- package/dist/ui/combobox/index.js +877 -0
- package/dist/ui/command/index.js +323 -0
- package/dist/ui/context-menu/index.js +734 -0
- package/dist/ui/dialog/index.js +169 -0
- package/dist/ui/drawer/index.js +971 -0
- package/dist/ui/dropdown-menu/index.js +723 -0
- package/dist/ui/form/index.js +13 -0
- package/dist/ui/form/injectionKeys.js +4 -0
- package/dist/ui/form/useFormField.js +25 -0
- package/dist/ui/hover-card/index.js +331 -0
- package/dist/ui/input/index.js +4 -0
- package/dist/ui/label/index.js +4 -0
- package/dist/ui/menubar/index.js +862 -0
- package/dist/ui/navigation-menu/index.js +873 -0
- package/dist/ui/number-field/index.js +682 -0
- package/dist/ui/pagination/index.js +444 -0
- package/dist/ui/pin-input/index.js +308 -0
- package/dist/ui/popover/index.js +6 -0
- package/dist/ui/progress/index.js +137 -0
- package/dist/ui/radio-group/index.js +5 -0
- package/dist/ui/range-calendar/index.js +986 -0
- package/dist/ui/resizable/index.js +1432 -0
- package/dist/ui/scroll-area/index.js +775 -0
- package/dist/ui/select/index.js +135 -0
- package/dist/ui/separator/index.js +4 -0
- package/dist/ui/sheet/index.js +188 -0
- package/dist/ui/sidebar/index.js +652 -0
- package/dist/ui/sidebar/utils.js +12 -0
- package/dist/ui/skeleton/index.js +4 -0
- package/dist/ui/slider/index.js +478 -0
- package/dist/ui/sonner/index.js +892 -0
- package/dist/ui/stepper/index.js +442 -0
- package/dist/ui/switch/index.js +4 -0
- package/dist/ui/table/index.js +153 -0
- package/dist/ui/tabs/index.js +280 -0
- package/dist/ui/tags-input/index.js +449 -0
- package/dist/ui/textarea/index.js +4 -0
- package/dist/ui/toast/index.js +738 -0
- package/dist/ui/toast/use-toast.js +85 -0
- package/dist/ui/toggle/index.js +6 -0
- package/dist/ui/toggle-group/index.js +112 -0
- package/dist/ui/tooltip/index.js +29 -0
- package/dist/useArrowNavigation-BRMPveaB.js +49 -0
- package/dist/useBodyScrollLock-CazCRZjZ.js +153 -0
- package/dist/useDirection-C3C_TLKm.js +14 -0
- package/dist/useFocusGuards-CyjC9cG9.js +26 -0
- package/dist/useFormControl-CFVC51Lp.js +11 -0
- package/dist/useForwardExpose-DZT6mL_U.js +37 -0
- package/dist/useForwardPropsEmits-0XKBv1pB.js +33 -0
- package/dist/useGraceArea-D7-GP1ii.js +137 -0
- package/dist/useId-reAg216X.js +13 -0
- package/dist/useKbd-BJNupnml.js +41 -0
- package/dist/useLocale-BfU0LC8Z.js +14 -0
- package/dist/useNonce-C1ZOgOp5.js +14 -0
- package/dist/usePrimitiveElement-BjwUvHih.js +15 -0
- package/dist/useSingleOrMultipleValue-BkTAaaJB.js +43 -0
- package/dist/useSize-BnyQ8FZF.js +37 -0
- package/dist/useTypeahead-oSidjyFF.js +40 -0
- package/dist/utils-DKNaYMZh.js +57 -0
- package/dist/utils-Dx9la83v.js +35 -0
- package/dist/utils-DxQ_ywGa.js +55 -0
- package/dist/utils-SFgRDk1R.js +2748 -0
- package/dist/utils-W-UiqiPE.js +1869 -0
- package/dist/vee-validate-Cf8JDJ_k.js +2232 -0
- package/dist/x-Cl6YllUK.js +14 -0
- package/package.json +265 -3
- package/dist/OcCodeBlock-chTpuRDc.js +0 -63
- package/dist/OcLottieAnimation-EBkAB8-y.js +0 -7741
- package/dist/QuillEditor-BHWfmp5D.js +0 -9544
- /package/dist/{style.css → dashboard.css} +0 -0
|
@@ -0,0 +1,1246 @@
|
|
|
1
|
+
import { defineComponent as Tt, inject as Ot, computed as Nt, ref as Pt, createElementBlock as Ct, onMounted as Mt, nextTick as At, onUnmounted as jt, watch as K, openBlock as Et } from "vue";
|
|
2
|
+
import { w as Rt, c as S, T as tt, X as Bt, b as T, i as Dt, e as Lt, f as F, g as Ft, h as it, k as I, l as It, m as Ht, aa as Vt, s as H, p as Xt, q as Zt, r as zt } from "./index-CumjCvqB.js";
|
|
3
|
+
import { D as V } from "./index-LqWMCtOd.js";
|
|
4
|
+
import { a as Yt } from "./array-CqVTtuYm.js";
|
|
5
|
+
function ct(t) {
|
|
6
|
+
this._context = t;
|
|
7
|
+
}
|
|
8
|
+
ct.prototype = {
|
|
9
|
+
areaStart: function() {
|
|
10
|
+
this._line = 0;
|
|
11
|
+
},
|
|
12
|
+
areaEnd: function() {
|
|
13
|
+
this._line = NaN;
|
|
14
|
+
},
|
|
15
|
+
lineStart: function() {
|
|
16
|
+
this._point = 0;
|
|
17
|
+
},
|
|
18
|
+
lineEnd: function() {
|
|
19
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
20
|
+
},
|
|
21
|
+
point: function(t, i) {
|
|
22
|
+
switch (t = +t, i = +i, this._point) {
|
|
23
|
+
case 0:
|
|
24
|
+
this._point = 1, this._line ? this._context.lineTo(t, i) : this._context.moveTo(t, i);
|
|
25
|
+
break;
|
|
26
|
+
case 1:
|
|
27
|
+
this._point = 2;
|
|
28
|
+
// falls through
|
|
29
|
+
default:
|
|
30
|
+
this._context.lineTo(t, i);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
function ut(t) {
|
|
36
|
+
return new ct(t);
|
|
37
|
+
}
|
|
38
|
+
function Gt(t) {
|
|
39
|
+
return t[0];
|
|
40
|
+
}
|
|
41
|
+
function Wt(t) {
|
|
42
|
+
return t[1];
|
|
43
|
+
}
|
|
44
|
+
function qt(t, i) {
|
|
45
|
+
var e = S(!0), n = null, s = ut, o = null, a = Rt(r);
|
|
46
|
+
t = typeof t == "function" ? t : t === void 0 ? Gt : S(t), i = typeof i == "function" ? i : i === void 0 ? Wt : S(i);
|
|
47
|
+
function r(h) {
|
|
48
|
+
var c, u = (h = Yt(h)).length, _, l = !1, y;
|
|
49
|
+
for (n == null && (o = s(y = a())), c = 0; c <= u; ++c)
|
|
50
|
+
!(c < u && e(_ = h[c], c, h)) === l && ((l = !l) ? o.lineStart() : o.lineEnd()), l && o.point(+t(_, c, h), +i(_, c, h));
|
|
51
|
+
if (y) return o = null, y + "" || null;
|
|
52
|
+
}
|
|
53
|
+
return r.x = function(h) {
|
|
54
|
+
return arguments.length ? (t = typeof h == "function" ? h : S(+h), r) : t;
|
|
55
|
+
}, r.y = function(h) {
|
|
56
|
+
return arguments.length ? (i = typeof h == "function" ? h : S(+h), r) : i;
|
|
57
|
+
}, r.defined = function(h) {
|
|
58
|
+
return arguments.length ? (e = typeof h == "function" ? h : S(!!h), r) : e;
|
|
59
|
+
}, r.curve = function(h) {
|
|
60
|
+
return arguments.length ? (s = h, n != null && (o = s(n)), r) : s;
|
|
61
|
+
}, r.context = function(h) {
|
|
62
|
+
return arguments.length ? (h == null ? n = o = null : o = s(n = h), r) : n;
|
|
63
|
+
}, r;
|
|
64
|
+
}
|
|
65
|
+
function k() {
|
|
66
|
+
}
|
|
67
|
+
function M(t, i, e) {
|
|
68
|
+
t._context.bezierCurveTo(
|
|
69
|
+
(2 * t._x0 + t._x1) / 3,
|
|
70
|
+
(2 * t._y0 + t._y1) / 3,
|
|
71
|
+
(t._x0 + 2 * t._x1) / 3,
|
|
72
|
+
(t._y0 + 2 * t._y1) / 3,
|
|
73
|
+
(t._x0 + 4 * t._x1 + i) / 6,
|
|
74
|
+
(t._y0 + 4 * t._y1 + e) / 6
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
function R(t) {
|
|
78
|
+
this._context = t;
|
|
79
|
+
}
|
|
80
|
+
R.prototype = {
|
|
81
|
+
areaStart: function() {
|
|
82
|
+
this._line = 0;
|
|
83
|
+
},
|
|
84
|
+
areaEnd: function() {
|
|
85
|
+
this._line = NaN;
|
|
86
|
+
},
|
|
87
|
+
lineStart: function() {
|
|
88
|
+
this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
|
|
89
|
+
},
|
|
90
|
+
lineEnd: function() {
|
|
91
|
+
switch (this._point) {
|
|
92
|
+
case 3:
|
|
93
|
+
M(this, this._x1, this._y1);
|
|
94
|
+
// falls through
|
|
95
|
+
case 2:
|
|
96
|
+
this._context.lineTo(this._x1, this._y1);
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
100
|
+
},
|
|
101
|
+
point: function(t, i) {
|
|
102
|
+
switch (t = +t, i = +i, this._point) {
|
|
103
|
+
case 0:
|
|
104
|
+
this._point = 1, this._line ? this._context.lineTo(t, i) : this._context.moveTo(t, i);
|
|
105
|
+
break;
|
|
106
|
+
case 1:
|
|
107
|
+
this._point = 2;
|
|
108
|
+
break;
|
|
109
|
+
case 2:
|
|
110
|
+
this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
|
|
111
|
+
// falls through
|
|
112
|
+
default:
|
|
113
|
+
M(this, t, i);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = i;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
function Qt(t) {
|
|
120
|
+
return new R(t);
|
|
121
|
+
}
|
|
122
|
+
function ft(t) {
|
|
123
|
+
this._context = t;
|
|
124
|
+
}
|
|
125
|
+
ft.prototype = {
|
|
126
|
+
areaStart: k,
|
|
127
|
+
areaEnd: k,
|
|
128
|
+
lineStart: function() {
|
|
129
|
+
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
|
|
130
|
+
},
|
|
131
|
+
lineEnd: function() {
|
|
132
|
+
switch (this._point) {
|
|
133
|
+
case 1: {
|
|
134
|
+
this._context.moveTo(this._x2, this._y2), this._context.closePath();
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
case 2: {
|
|
138
|
+
this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
case 3: {
|
|
142
|
+
this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4);
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
point: function(t, i) {
|
|
148
|
+
switch (t = +t, i = +i, this._point) {
|
|
149
|
+
case 0:
|
|
150
|
+
this._point = 1, this._x2 = t, this._y2 = i;
|
|
151
|
+
break;
|
|
152
|
+
case 1:
|
|
153
|
+
this._point = 2, this._x3 = t, this._y3 = i;
|
|
154
|
+
break;
|
|
155
|
+
case 2:
|
|
156
|
+
this._point = 3, this._x4 = t, this._y4 = i, this._context.moveTo((this._x0 + 4 * this._x1 + t) / 6, (this._y0 + 4 * this._y1 + i) / 6);
|
|
157
|
+
break;
|
|
158
|
+
default:
|
|
159
|
+
M(this, t, i);
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = i;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
function Ut(t) {
|
|
166
|
+
return new ft(t);
|
|
167
|
+
}
|
|
168
|
+
function pt(t) {
|
|
169
|
+
this._context = t;
|
|
170
|
+
}
|
|
171
|
+
pt.prototype = {
|
|
172
|
+
areaStart: function() {
|
|
173
|
+
this._line = 0;
|
|
174
|
+
},
|
|
175
|
+
areaEnd: function() {
|
|
176
|
+
this._line = NaN;
|
|
177
|
+
},
|
|
178
|
+
lineStart: function() {
|
|
179
|
+
this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
|
|
180
|
+
},
|
|
181
|
+
lineEnd: function() {
|
|
182
|
+
(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
|
|
183
|
+
},
|
|
184
|
+
point: function(t, i) {
|
|
185
|
+
switch (t = +t, i = +i, this._point) {
|
|
186
|
+
case 0:
|
|
187
|
+
this._point = 1;
|
|
188
|
+
break;
|
|
189
|
+
case 1:
|
|
190
|
+
this._point = 2;
|
|
191
|
+
break;
|
|
192
|
+
case 2:
|
|
193
|
+
this._point = 3;
|
|
194
|
+
var e = (this._x0 + 4 * this._x1 + t) / 6, n = (this._y0 + 4 * this._y1 + i) / 6;
|
|
195
|
+
this._line ? this._context.lineTo(e, n) : this._context.moveTo(e, n);
|
|
196
|
+
break;
|
|
197
|
+
case 3:
|
|
198
|
+
this._point = 4;
|
|
199
|
+
// falls through
|
|
200
|
+
default:
|
|
201
|
+
M(this, t, i);
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = i;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
function $t(t) {
|
|
208
|
+
return new pt(t);
|
|
209
|
+
}
|
|
210
|
+
function yt(t, i) {
|
|
211
|
+
this._basis = new R(t), this._beta = i;
|
|
212
|
+
}
|
|
213
|
+
yt.prototype = {
|
|
214
|
+
lineStart: function() {
|
|
215
|
+
this._x = [], this._y = [], this._basis.lineStart();
|
|
216
|
+
},
|
|
217
|
+
lineEnd: function() {
|
|
218
|
+
var t = this._x, i = this._y, e = t.length - 1;
|
|
219
|
+
if (e > 0)
|
|
220
|
+
for (var n = t[0], s = i[0], o = t[e] - n, a = i[e] - s, r = -1, h; ++r <= e; )
|
|
221
|
+
h = r / e, this._basis.point(
|
|
222
|
+
this._beta * t[r] + (1 - this._beta) * (n + h * o),
|
|
223
|
+
this._beta * i[r] + (1 - this._beta) * (s + h * a)
|
|
224
|
+
);
|
|
225
|
+
this._x = this._y = null, this._basis.lineEnd();
|
|
226
|
+
},
|
|
227
|
+
point: function(t, i) {
|
|
228
|
+
this._x.push(+t), this._y.push(+i);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
const Jt = function t(i) {
|
|
232
|
+
function e(n) {
|
|
233
|
+
return i === 1 ? new R(n) : new yt(n, i);
|
|
234
|
+
}
|
|
235
|
+
return e.beta = function(n) {
|
|
236
|
+
return t(+n);
|
|
237
|
+
}, e;
|
|
238
|
+
}(0.85);
|
|
239
|
+
function A(t, i, e) {
|
|
240
|
+
t._context.bezierCurveTo(
|
|
241
|
+
t._x1 + t._k * (t._x2 - t._x0),
|
|
242
|
+
t._y1 + t._k * (t._y2 - t._y0),
|
|
243
|
+
t._x2 + t._k * (t._x1 - i),
|
|
244
|
+
t._y2 + t._k * (t._y1 - e),
|
|
245
|
+
t._x2,
|
|
246
|
+
t._y2
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
function q(t, i) {
|
|
250
|
+
this._context = t, this._k = (1 - i) / 6;
|
|
251
|
+
}
|
|
252
|
+
q.prototype = {
|
|
253
|
+
areaStart: function() {
|
|
254
|
+
this._line = 0;
|
|
255
|
+
},
|
|
256
|
+
areaEnd: function() {
|
|
257
|
+
this._line = NaN;
|
|
258
|
+
},
|
|
259
|
+
lineStart: function() {
|
|
260
|
+
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
|
|
261
|
+
},
|
|
262
|
+
lineEnd: function() {
|
|
263
|
+
switch (this._point) {
|
|
264
|
+
case 2:
|
|
265
|
+
this._context.lineTo(this._x2, this._y2);
|
|
266
|
+
break;
|
|
267
|
+
case 3:
|
|
268
|
+
A(this, this._x1, this._y1);
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
272
|
+
},
|
|
273
|
+
point: function(t, i) {
|
|
274
|
+
switch (t = +t, i = +i, this._point) {
|
|
275
|
+
case 0:
|
|
276
|
+
this._point = 1, this._line ? this._context.lineTo(t, i) : this._context.moveTo(t, i);
|
|
277
|
+
break;
|
|
278
|
+
case 1:
|
|
279
|
+
this._point = 2, this._x1 = t, this._y1 = i;
|
|
280
|
+
break;
|
|
281
|
+
case 2:
|
|
282
|
+
this._point = 3;
|
|
283
|
+
// falls through
|
|
284
|
+
default:
|
|
285
|
+
A(this, t, i);
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
const Kt = function t(i) {
|
|
292
|
+
function e(n) {
|
|
293
|
+
return new q(n, i);
|
|
294
|
+
}
|
|
295
|
+
return e.tension = function(n) {
|
|
296
|
+
return t(+n);
|
|
297
|
+
}, e;
|
|
298
|
+
}(0);
|
|
299
|
+
function Q(t, i) {
|
|
300
|
+
this._context = t, this._k = (1 - i) / 6;
|
|
301
|
+
}
|
|
302
|
+
Q.prototype = {
|
|
303
|
+
areaStart: k,
|
|
304
|
+
areaEnd: k,
|
|
305
|
+
lineStart: function() {
|
|
306
|
+
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
|
|
307
|
+
},
|
|
308
|
+
lineEnd: function() {
|
|
309
|
+
switch (this._point) {
|
|
310
|
+
case 1: {
|
|
311
|
+
this._context.moveTo(this._x3, this._y3), this._context.closePath();
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
case 2: {
|
|
315
|
+
this._context.lineTo(this._x3, this._y3), this._context.closePath();
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
case 3: {
|
|
319
|
+
this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
point: function(t, i) {
|
|
325
|
+
switch (t = +t, i = +i, this._point) {
|
|
326
|
+
case 0:
|
|
327
|
+
this._point = 1, this._x3 = t, this._y3 = i;
|
|
328
|
+
break;
|
|
329
|
+
case 1:
|
|
330
|
+
this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = i);
|
|
331
|
+
break;
|
|
332
|
+
case 2:
|
|
333
|
+
this._point = 3, this._x5 = t, this._y5 = i;
|
|
334
|
+
break;
|
|
335
|
+
default:
|
|
336
|
+
A(this, t, i);
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
const ti = function t(i) {
|
|
343
|
+
function e(n) {
|
|
344
|
+
return new Q(n, i);
|
|
345
|
+
}
|
|
346
|
+
return e.tension = function(n) {
|
|
347
|
+
return t(+n);
|
|
348
|
+
}, e;
|
|
349
|
+
}(0);
|
|
350
|
+
function U(t, i) {
|
|
351
|
+
this._context = t, this._k = (1 - i) / 6;
|
|
352
|
+
}
|
|
353
|
+
U.prototype = {
|
|
354
|
+
areaStart: function() {
|
|
355
|
+
this._line = 0;
|
|
356
|
+
},
|
|
357
|
+
areaEnd: function() {
|
|
358
|
+
this._line = NaN;
|
|
359
|
+
},
|
|
360
|
+
lineStart: function() {
|
|
361
|
+
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
|
|
362
|
+
},
|
|
363
|
+
lineEnd: function() {
|
|
364
|
+
(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
|
|
365
|
+
},
|
|
366
|
+
point: function(t, i) {
|
|
367
|
+
switch (t = +t, i = +i, this._point) {
|
|
368
|
+
case 0:
|
|
369
|
+
this._point = 1;
|
|
370
|
+
break;
|
|
371
|
+
case 1:
|
|
372
|
+
this._point = 2;
|
|
373
|
+
break;
|
|
374
|
+
case 2:
|
|
375
|
+
this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
|
|
376
|
+
break;
|
|
377
|
+
case 3:
|
|
378
|
+
this._point = 4;
|
|
379
|
+
// falls through
|
|
380
|
+
default:
|
|
381
|
+
A(this, t, i);
|
|
382
|
+
break;
|
|
383
|
+
}
|
|
384
|
+
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
const ii = function t(i) {
|
|
388
|
+
function e(n) {
|
|
389
|
+
return new U(n, i);
|
|
390
|
+
}
|
|
391
|
+
return e.tension = function(n) {
|
|
392
|
+
return t(+n);
|
|
393
|
+
}, e;
|
|
394
|
+
}(0);
|
|
395
|
+
function $(t, i, e) {
|
|
396
|
+
var n = t._x1, s = t._y1, o = t._x2, a = t._y2;
|
|
397
|
+
if (t._l01_a > tt) {
|
|
398
|
+
var r = 2 * t._l01_2a + 3 * t._l01_a * t._l12_a + t._l12_2a, h = 3 * t._l01_a * (t._l01_a + t._l12_a);
|
|
399
|
+
n = (n * r - t._x0 * t._l12_2a + t._x2 * t._l01_2a) / h, s = (s * r - t._y0 * t._l12_2a + t._y2 * t._l01_2a) / h;
|
|
400
|
+
}
|
|
401
|
+
if (t._l23_a > tt) {
|
|
402
|
+
var c = 2 * t._l23_2a + 3 * t._l23_a * t._l12_a + t._l12_2a, u = 3 * t._l23_a * (t._l23_a + t._l12_a);
|
|
403
|
+
o = (o * c + t._x1 * t._l23_2a - i * t._l12_2a) / u, a = (a * c + t._y1 * t._l23_2a - e * t._l12_2a) / u;
|
|
404
|
+
}
|
|
405
|
+
t._context.bezierCurveTo(n, s, o, a, t._x2, t._y2);
|
|
406
|
+
}
|
|
407
|
+
function xt(t, i) {
|
|
408
|
+
this._context = t, this._alpha = i;
|
|
409
|
+
}
|
|
410
|
+
xt.prototype = {
|
|
411
|
+
areaStart: function() {
|
|
412
|
+
this._line = 0;
|
|
413
|
+
},
|
|
414
|
+
areaEnd: function() {
|
|
415
|
+
this._line = NaN;
|
|
416
|
+
},
|
|
417
|
+
lineStart: function() {
|
|
418
|
+
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
|
|
419
|
+
},
|
|
420
|
+
lineEnd: function() {
|
|
421
|
+
switch (this._point) {
|
|
422
|
+
case 2:
|
|
423
|
+
this._context.lineTo(this._x2, this._y2);
|
|
424
|
+
break;
|
|
425
|
+
case 3:
|
|
426
|
+
this.point(this._x2, this._y2);
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
430
|
+
},
|
|
431
|
+
point: function(t, i) {
|
|
432
|
+
if (t = +t, i = +i, this._point) {
|
|
433
|
+
var e = this._x2 - t, n = this._y2 - i;
|
|
434
|
+
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
|
|
435
|
+
}
|
|
436
|
+
switch (this._point) {
|
|
437
|
+
case 0:
|
|
438
|
+
this._point = 1, this._line ? this._context.lineTo(t, i) : this._context.moveTo(t, i);
|
|
439
|
+
break;
|
|
440
|
+
case 1:
|
|
441
|
+
this._point = 2;
|
|
442
|
+
break;
|
|
443
|
+
case 2:
|
|
444
|
+
this._point = 3;
|
|
445
|
+
// falls through
|
|
446
|
+
default:
|
|
447
|
+
$(this, t, i);
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
const ei = function t(i) {
|
|
454
|
+
function e(n) {
|
|
455
|
+
return i ? new xt(n, i) : new q(n, 0);
|
|
456
|
+
}
|
|
457
|
+
return e.alpha = function(n) {
|
|
458
|
+
return t(+n);
|
|
459
|
+
}, e;
|
|
460
|
+
}(0.5);
|
|
461
|
+
function dt(t, i) {
|
|
462
|
+
this._context = t, this._alpha = i;
|
|
463
|
+
}
|
|
464
|
+
dt.prototype = {
|
|
465
|
+
areaStart: k,
|
|
466
|
+
areaEnd: k,
|
|
467
|
+
lineStart: function() {
|
|
468
|
+
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
|
|
469
|
+
},
|
|
470
|
+
lineEnd: function() {
|
|
471
|
+
switch (this._point) {
|
|
472
|
+
case 1: {
|
|
473
|
+
this._context.moveTo(this._x3, this._y3), this._context.closePath();
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
476
|
+
case 2: {
|
|
477
|
+
this._context.lineTo(this._x3, this._y3), this._context.closePath();
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
case 3: {
|
|
481
|
+
this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
point: function(t, i) {
|
|
487
|
+
if (t = +t, i = +i, this._point) {
|
|
488
|
+
var e = this._x2 - t, n = this._y2 - i;
|
|
489
|
+
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
|
|
490
|
+
}
|
|
491
|
+
switch (this._point) {
|
|
492
|
+
case 0:
|
|
493
|
+
this._point = 1, this._x3 = t, this._y3 = i;
|
|
494
|
+
break;
|
|
495
|
+
case 1:
|
|
496
|
+
this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = i);
|
|
497
|
+
break;
|
|
498
|
+
case 2:
|
|
499
|
+
this._point = 3, this._x5 = t, this._y5 = i;
|
|
500
|
+
break;
|
|
501
|
+
default:
|
|
502
|
+
$(this, t, i);
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
const ni = function t(i) {
|
|
509
|
+
function e(n) {
|
|
510
|
+
return i ? new dt(n, i) : new Q(n, 0);
|
|
511
|
+
}
|
|
512
|
+
return e.alpha = function(n) {
|
|
513
|
+
return t(+n);
|
|
514
|
+
}, e;
|
|
515
|
+
}(0.5);
|
|
516
|
+
function vt(t, i) {
|
|
517
|
+
this._context = t, this._alpha = i;
|
|
518
|
+
}
|
|
519
|
+
vt.prototype = {
|
|
520
|
+
areaStart: function() {
|
|
521
|
+
this._line = 0;
|
|
522
|
+
},
|
|
523
|
+
areaEnd: function() {
|
|
524
|
+
this._line = NaN;
|
|
525
|
+
},
|
|
526
|
+
lineStart: function() {
|
|
527
|
+
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
|
|
528
|
+
},
|
|
529
|
+
lineEnd: function() {
|
|
530
|
+
(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
|
|
531
|
+
},
|
|
532
|
+
point: function(t, i) {
|
|
533
|
+
if (t = +t, i = +i, this._point) {
|
|
534
|
+
var e = this._x2 - t, n = this._y2 - i;
|
|
535
|
+
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
|
|
536
|
+
}
|
|
537
|
+
switch (this._point) {
|
|
538
|
+
case 0:
|
|
539
|
+
this._point = 1;
|
|
540
|
+
break;
|
|
541
|
+
case 1:
|
|
542
|
+
this._point = 2;
|
|
543
|
+
break;
|
|
544
|
+
case 2:
|
|
545
|
+
this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
|
|
546
|
+
break;
|
|
547
|
+
case 3:
|
|
548
|
+
this._point = 4;
|
|
549
|
+
// falls through
|
|
550
|
+
default:
|
|
551
|
+
$(this, t, i);
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
const si = function t(i) {
|
|
558
|
+
function e(n) {
|
|
559
|
+
return i ? new vt(n, i) : new U(n, 0);
|
|
560
|
+
}
|
|
561
|
+
return e.alpha = function(n) {
|
|
562
|
+
return t(+n);
|
|
563
|
+
}, e;
|
|
564
|
+
}(0.5);
|
|
565
|
+
function gt(t) {
|
|
566
|
+
this._context = t;
|
|
567
|
+
}
|
|
568
|
+
gt.prototype = {
|
|
569
|
+
areaStart: k,
|
|
570
|
+
areaEnd: k,
|
|
571
|
+
lineStart: function() {
|
|
572
|
+
this._point = 0;
|
|
573
|
+
},
|
|
574
|
+
lineEnd: function() {
|
|
575
|
+
this._point && this._context.closePath();
|
|
576
|
+
},
|
|
577
|
+
point: function(t, i) {
|
|
578
|
+
t = +t, i = +i, this._point ? this._context.lineTo(t, i) : (this._point = 1, this._context.moveTo(t, i));
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
function oi(t) {
|
|
582
|
+
return new gt(t);
|
|
583
|
+
}
|
|
584
|
+
function et(t) {
|
|
585
|
+
return t < 0 ? -1 : 1;
|
|
586
|
+
}
|
|
587
|
+
function nt(t, i, e) {
|
|
588
|
+
var n = t._x1 - t._x0, s = i - t._x1, o = (t._y1 - t._y0) / (n || s < 0 && -0), a = (e - t._y1) / (s || n < 0 && -0), r = (o * s + a * n) / (n + s);
|
|
589
|
+
return (et(o) + et(a)) * Math.min(Math.abs(o), Math.abs(a), 0.5 * Math.abs(r)) || 0;
|
|
590
|
+
}
|
|
591
|
+
function st(t, i) {
|
|
592
|
+
var e = t._x1 - t._x0;
|
|
593
|
+
return e ? (3 * (t._y1 - t._y0) / e - i) / 2 : i;
|
|
594
|
+
}
|
|
595
|
+
function X(t, i, e) {
|
|
596
|
+
var n = t._x0, s = t._y0, o = t._x1, a = t._y1, r = (o - n) / 3;
|
|
597
|
+
t._context.bezierCurveTo(n + r, s + r * i, o - r, a - r * e, o, a);
|
|
598
|
+
}
|
|
599
|
+
function j(t) {
|
|
600
|
+
this._context = t;
|
|
601
|
+
}
|
|
602
|
+
j.prototype = {
|
|
603
|
+
areaStart: function() {
|
|
604
|
+
this._line = 0;
|
|
605
|
+
},
|
|
606
|
+
areaEnd: function() {
|
|
607
|
+
this._line = NaN;
|
|
608
|
+
},
|
|
609
|
+
lineStart: function() {
|
|
610
|
+
this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
|
|
611
|
+
},
|
|
612
|
+
lineEnd: function() {
|
|
613
|
+
switch (this._point) {
|
|
614
|
+
case 2:
|
|
615
|
+
this._context.lineTo(this._x1, this._y1);
|
|
616
|
+
break;
|
|
617
|
+
case 3:
|
|
618
|
+
X(this, this._t0, st(this, this._t0));
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
622
|
+
},
|
|
623
|
+
point: function(t, i) {
|
|
624
|
+
var e = NaN;
|
|
625
|
+
if (t = +t, i = +i, !(t === this._x1 && i === this._y1)) {
|
|
626
|
+
switch (this._point) {
|
|
627
|
+
case 0:
|
|
628
|
+
this._point = 1, this._line ? this._context.lineTo(t, i) : this._context.moveTo(t, i);
|
|
629
|
+
break;
|
|
630
|
+
case 1:
|
|
631
|
+
this._point = 2;
|
|
632
|
+
break;
|
|
633
|
+
case 2:
|
|
634
|
+
this._point = 3, X(this, st(this, e = nt(this, t, i)), e);
|
|
635
|
+
break;
|
|
636
|
+
default:
|
|
637
|
+
X(this, this._t0, e = nt(this, t, i));
|
|
638
|
+
break;
|
|
639
|
+
}
|
|
640
|
+
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = i, this._t0 = e;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
function bt(t) {
|
|
645
|
+
this._context = new mt(t);
|
|
646
|
+
}
|
|
647
|
+
(bt.prototype = Object.create(j.prototype)).point = function(t, i) {
|
|
648
|
+
j.prototype.point.call(this, i, t);
|
|
649
|
+
};
|
|
650
|
+
function mt(t) {
|
|
651
|
+
this._context = t;
|
|
652
|
+
}
|
|
653
|
+
mt.prototype = {
|
|
654
|
+
moveTo: function(t, i) {
|
|
655
|
+
this._context.moveTo(i, t);
|
|
656
|
+
},
|
|
657
|
+
closePath: function() {
|
|
658
|
+
this._context.closePath();
|
|
659
|
+
},
|
|
660
|
+
lineTo: function(t, i) {
|
|
661
|
+
this._context.lineTo(i, t);
|
|
662
|
+
},
|
|
663
|
+
bezierCurveTo: function(t, i, e, n, s, o) {
|
|
664
|
+
this._context.bezierCurveTo(i, t, n, e, o, s);
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
function ri(t) {
|
|
668
|
+
return new j(t);
|
|
669
|
+
}
|
|
670
|
+
function hi(t) {
|
|
671
|
+
return new bt(t);
|
|
672
|
+
}
|
|
673
|
+
function kt(t) {
|
|
674
|
+
this._context = t;
|
|
675
|
+
}
|
|
676
|
+
kt.prototype = {
|
|
677
|
+
areaStart: function() {
|
|
678
|
+
this._line = 0;
|
|
679
|
+
},
|
|
680
|
+
areaEnd: function() {
|
|
681
|
+
this._line = NaN;
|
|
682
|
+
},
|
|
683
|
+
lineStart: function() {
|
|
684
|
+
this._x = [], this._y = [];
|
|
685
|
+
},
|
|
686
|
+
lineEnd: function() {
|
|
687
|
+
var t = this._x, i = this._y, e = t.length;
|
|
688
|
+
if (e)
|
|
689
|
+
if (this._line ? this._context.lineTo(t[0], i[0]) : this._context.moveTo(t[0], i[0]), e === 2)
|
|
690
|
+
this._context.lineTo(t[1], i[1]);
|
|
691
|
+
else
|
|
692
|
+
for (var n = ot(t), s = ot(i), o = 0, a = 1; a < e; ++o, ++a)
|
|
693
|
+
this._context.bezierCurveTo(n[0][o], s[0][o], n[1][o], s[1][o], t[a], i[a]);
|
|
694
|
+
(this._line || this._line !== 0 && e === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
|
|
695
|
+
},
|
|
696
|
+
point: function(t, i) {
|
|
697
|
+
this._x.push(+t), this._y.push(+i);
|
|
698
|
+
}
|
|
699
|
+
};
|
|
700
|
+
function ot(t) {
|
|
701
|
+
var i, e = t.length - 1, n, s = new Array(e), o = new Array(e), a = new Array(e);
|
|
702
|
+
for (s[0] = 0, o[0] = 2, a[0] = t[0] + 2 * t[1], i = 1; i < e - 1; ++i) s[i] = 1, o[i] = 4, a[i] = 4 * t[i] + 2 * t[i + 1];
|
|
703
|
+
for (s[e - 1] = 2, o[e - 1] = 7, a[e - 1] = 8 * t[e - 1] + t[e], i = 1; i < e; ++i) n = s[i] / o[i - 1], o[i] -= n, a[i] -= n * a[i - 1];
|
|
704
|
+
for (s[e - 1] = a[e - 1] / o[e - 1], i = e - 2; i >= 0; --i) s[i] = (a[i] - s[i + 1]) / o[i];
|
|
705
|
+
for (o[e - 1] = (t[e] + s[e - 1]) / 2, i = 0; i < e - 1; ++i) o[i] = 2 * t[i + 1] - s[i + 1];
|
|
706
|
+
return [s, o];
|
|
707
|
+
}
|
|
708
|
+
function ai(t) {
|
|
709
|
+
return new kt(t);
|
|
710
|
+
}
|
|
711
|
+
function B(t, i) {
|
|
712
|
+
this._context = t, this._t = i;
|
|
713
|
+
}
|
|
714
|
+
B.prototype = {
|
|
715
|
+
areaStart: function() {
|
|
716
|
+
this._line = 0;
|
|
717
|
+
},
|
|
718
|
+
areaEnd: function() {
|
|
719
|
+
this._line = NaN;
|
|
720
|
+
},
|
|
721
|
+
lineStart: function() {
|
|
722
|
+
this._x = this._y = NaN, this._point = 0;
|
|
723
|
+
},
|
|
724
|
+
lineEnd: function() {
|
|
725
|
+
0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
|
|
726
|
+
},
|
|
727
|
+
point: function(t, i) {
|
|
728
|
+
switch (t = +t, i = +i, this._point) {
|
|
729
|
+
case 0:
|
|
730
|
+
this._point = 1, this._line ? this._context.lineTo(t, i) : this._context.moveTo(t, i);
|
|
731
|
+
break;
|
|
732
|
+
case 1:
|
|
733
|
+
this._point = 2;
|
|
734
|
+
// falls through
|
|
735
|
+
default: {
|
|
736
|
+
if (this._t <= 0)
|
|
737
|
+
this._context.lineTo(this._x, i), this._context.lineTo(t, i);
|
|
738
|
+
else {
|
|
739
|
+
var e = this._x * (1 - this._t) + t * this._t;
|
|
740
|
+
this._context.lineTo(e, this._y), this._context.lineTo(e, i);
|
|
741
|
+
}
|
|
742
|
+
break;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
this._x = t, this._y = i;
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
function _i(t) {
|
|
749
|
+
return new B(t, 0.5);
|
|
750
|
+
}
|
|
751
|
+
function li(t) {
|
|
752
|
+
return new B(t, 0);
|
|
753
|
+
}
|
|
754
|
+
function ci(t) {
|
|
755
|
+
return new B(t, 1);
|
|
756
|
+
}
|
|
757
|
+
function rt(t, i) {
|
|
758
|
+
var e = Object.keys(t);
|
|
759
|
+
if (Object.getOwnPropertySymbols) {
|
|
760
|
+
var n = Object.getOwnPropertySymbols(t);
|
|
761
|
+
i && (n = n.filter(function(s) {
|
|
762
|
+
return Object.getOwnPropertyDescriptor(t, s).enumerable;
|
|
763
|
+
})), e.push.apply(e, n);
|
|
764
|
+
}
|
|
765
|
+
return e;
|
|
766
|
+
}
|
|
767
|
+
function ui(t) {
|
|
768
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
769
|
+
var e = arguments[i] != null ? arguments[i] : {};
|
|
770
|
+
i % 2 ? rt(Object(e), !0).forEach(function(n) {
|
|
771
|
+
fi(t, n, e[n]);
|
|
772
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : rt(Object(e)).forEach(function(n) {
|
|
773
|
+
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n));
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
return t;
|
|
777
|
+
}
|
|
778
|
+
function N(t) {
|
|
779
|
+
"@babel/helpers - typeof";
|
|
780
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? N = function(i) {
|
|
781
|
+
return typeof i;
|
|
782
|
+
} : N = function(i) {
|
|
783
|
+
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
|
784
|
+
}, N(t);
|
|
785
|
+
}
|
|
786
|
+
function fi(t, i, e) {
|
|
787
|
+
return i in t ? Object.defineProperty(t, i, {
|
|
788
|
+
value: e,
|
|
789
|
+
enumerable: !0,
|
|
790
|
+
configurable: !0,
|
|
791
|
+
writable: !0
|
|
792
|
+
}) : t[i] = e, t;
|
|
793
|
+
}
|
|
794
|
+
function E() {
|
|
795
|
+
return E = Object.assign || function(t) {
|
|
796
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
797
|
+
var e = arguments[i];
|
|
798
|
+
for (var n in e)
|
|
799
|
+
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
|
|
800
|
+
}
|
|
801
|
+
return t;
|
|
802
|
+
}, E.apply(this, arguments);
|
|
803
|
+
}
|
|
804
|
+
function pi(t, i) {
|
|
805
|
+
if (t) {
|
|
806
|
+
if (typeof t == "string") return ht(t, i);
|
|
807
|
+
var e = Object.prototype.toString.call(t).slice(8, -1);
|
|
808
|
+
if (e === "Object" && t.constructor && (e = t.constructor.name), e === "Map" || e === "Set") return Array.from(t);
|
|
809
|
+
if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)) return ht(t, i);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
function ht(t, i) {
|
|
813
|
+
(i == null || i > t.length) && (i = t.length);
|
|
814
|
+
for (var e = 0, n = new Array(i); e < i; e++) n[e] = t[e];
|
|
815
|
+
return n;
|
|
816
|
+
}
|
|
817
|
+
function St(t, i) {
|
|
818
|
+
var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
819
|
+
if (!e) {
|
|
820
|
+
if (Array.isArray(t) || (e = pi(t)) || i) {
|
|
821
|
+
e && (t = e);
|
|
822
|
+
var n = 0, s = function() {
|
|
823
|
+
};
|
|
824
|
+
return {
|
|
825
|
+
s,
|
|
826
|
+
n: function() {
|
|
827
|
+
return n >= t.length ? {
|
|
828
|
+
done: !0
|
|
829
|
+
} : {
|
|
830
|
+
done: !1,
|
|
831
|
+
value: t[n++]
|
|
832
|
+
};
|
|
833
|
+
},
|
|
834
|
+
e: function(h) {
|
|
835
|
+
throw h;
|
|
836
|
+
},
|
|
837
|
+
f: s
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
841
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
842
|
+
}
|
|
843
|
+
var o = !0, a = !1, r;
|
|
844
|
+
return {
|
|
845
|
+
s: function() {
|
|
846
|
+
e = e.call(t);
|
|
847
|
+
},
|
|
848
|
+
n: function() {
|
|
849
|
+
var h = e.next();
|
|
850
|
+
return o = h.done, h;
|
|
851
|
+
},
|
|
852
|
+
e: function(h) {
|
|
853
|
+
a = !0, r = h;
|
|
854
|
+
},
|
|
855
|
+
f: function() {
|
|
856
|
+
try {
|
|
857
|
+
!o && e.return != null && e.return();
|
|
858
|
+
} finally {
|
|
859
|
+
if (a) throw r;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
function yi(t, i) {
|
|
865
|
+
var e = [], n = [];
|
|
866
|
+
function s(o, a) {
|
|
867
|
+
if (o.length === 1)
|
|
868
|
+
e.push(o[0]), n.push(o[0]);
|
|
869
|
+
else {
|
|
870
|
+
for (var r = Array(o.length - 1), h = 0; h < r.length; h++)
|
|
871
|
+
h === 0 && e.push(o[0]), h === r.length - 1 && n.push(o[h + 1]), r[h] = [(1 - a) * o[h][0] + a * o[h + 1][0], (1 - a) * o[h][1] + a * o[h + 1][1]];
|
|
872
|
+
s(r, a);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
return t.length && s(t, i), {
|
|
876
|
+
left: e,
|
|
877
|
+
right: n.reverse()
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
function xi(t) {
|
|
881
|
+
var i = {};
|
|
882
|
+
return t.length === 4 && (i.x2 = t[2][0], i.y2 = t[2][1]), t.length >= 3 && (i.x1 = t[1][0], i.y1 = t[1][1]), i.x = t[t.length - 1][0], i.y = t[t.length - 1][1], t.length === 4 ? i.type = "C" : t.length === 3 ? i.type = "Q" : i.type = "L", i;
|
|
883
|
+
}
|
|
884
|
+
function di(t, i) {
|
|
885
|
+
i = i || 2;
|
|
886
|
+
for (var e = [], n = t, s = 1 / i, o = 0; o < i - 1; o++) {
|
|
887
|
+
var a = s / (1 - s * o), r = yi(n, a);
|
|
888
|
+
e.push(r.left), n = r.right;
|
|
889
|
+
}
|
|
890
|
+
return e.push(n), e;
|
|
891
|
+
}
|
|
892
|
+
function vi(t, i, e) {
|
|
893
|
+
var n = [[t.x, t.y]];
|
|
894
|
+
return i.x1 != null && n.push([i.x1, i.y1]), i.x2 != null && n.push([i.x2, i.y2]), n.push([i.x, i.y]), di(n, e).map(xi);
|
|
895
|
+
}
|
|
896
|
+
var gi = /[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g, w = {
|
|
897
|
+
M: ["x", "y"],
|
|
898
|
+
L: ["x", "y"],
|
|
899
|
+
H: ["x"],
|
|
900
|
+
V: ["y"],
|
|
901
|
+
C: ["x1", "y1", "x2", "y2", "x", "y"],
|
|
902
|
+
S: ["x2", "y2", "x", "y"],
|
|
903
|
+
Q: ["x1", "y1", "x", "y"],
|
|
904
|
+
T: ["x", "y"],
|
|
905
|
+
A: ["rx", "ry", "xAxisRotation", "largeArcFlag", "sweepFlag", "x", "y"],
|
|
906
|
+
Z: []
|
|
907
|
+
};
|
|
908
|
+
Object.keys(w).forEach(function(t) {
|
|
909
|
+
w[t.toLowerCase()] = w[t];
|
|
910
|
+
});
|
|
911
|
+
function Z(t, i) {
|
|
912
|
+
for (var e = Array(t), n = 0; n < t; n++)
|
|
913
|
+
e[n] = i;
|
|
914
|
+
return e;
|
|
915
|
+
}
|
|
916
|
+
function bi(t) {
|
|
917
|
+
return "".concat(t.type).concat(w[t.type].map(function(i) {
|
|
918
|
+
return t[i];
|
|
919
|
+
}).join(","));
|
|
920
|
+
}
|
|
921
|
+
function mi(t, i) {
|
|
922
|
+
var e = {
|
|
923
|
+
x1: "x",
|
|
924
|
+
y1: "y",
|
|
925
|
+
x2: "x",
|
|
926
|
+
y2: "y"
|
|
927
|
+
}, n = ["xAxisRotation", "largeArcFlag", "sweepFlag"];
|
|
928
|
+
if (t.type !== i.type && i.type.toUpperCase() !== "M") {
|
|
929
|
+
var s = {};
|
|
930
|
+
Object.keys(i).forEach(function(o) {
|
|
931
|
+
var a = i[o], r = t[o];
|
|
932
|
+
r === void 0 && (n.includes(o) ? r = a : (r === void 0 && e[o] && (r = t[e[o]]), r === void 0 && (r = 0))), s[o] = r;
|
|
933
|
+
}), s.type = i.type, t = s;
|
|
934
|
+
}
|
|
935
|
+
return t;
|
|
936
|
+
}
|
|
937
|
+
function ki(t, i, e) {
|
|
938
|
+
var n = [];
|
|
939
|
+
if (i.type === "L" || i.type === "Q" || i.type === "C")
|
|
940
|
+
n = n.concat(vi(t, i, e));
|
|
941
|
+
else {
|
|
942
|
+
var s = E({}, t);
|
|
943
|
+
s.type === "M" && (s.type = "L"), n = n.concat(Z(e - 1).map(function() {
|
|
944
|
+
return s;
|
|
945
|
+
})), n.push(i);
|
|
946
|
+
}
|
|
947
|
+
return n;
|
|
948
|
+
}
|
|
949
|
+
function at(t, i, e) {
|
|
950
|
+
var n = t.length - 1, s = i.length - 1, o = n / s, a = Z(s).reduce(function(h, c, u) {
|
|
951
|
+
var _ = Math.floor(o * u);
|
|
952
|
+
if (e && _ < t.length - 1 && e(t[_], t[_ + 1])) {
|
|
953
|
+
var l = o * u % 1 < 0.5;
|
|
954
|
+
h[_] && (l ? _ > 0 ? _ -= 1 : _ < t.length - 1 && (_ += 1) : _ < t.length - 1 ? _ += 1 : _ > 0 && (_ -= 1));
|
|
955
|
+
}
|
|
956
|
+
return h[_] = (h[_] || 0) + 1, h;
|
|
957
|
+
}, []), r = a.reduce(function(h, c, u) {
|
|
958
|
+
if (u === t.length - 1) {
|
|
959
|
+
var _ = Z(c, E({}, t[t.length - 1]));
|
|
960
|
+
return _[0].type === "M" && _.forEach(function(l) {
|
|
961
|
+
l.type = "L";
|
|
962
|
+
}), h.concat(_);
|
|
963
|
+
}
|
|
964
|
+
return h.concat(ki(t[u], t[u + 1], c));
|
|
965
|
+
}, []);
|
|
966
|
+
return r.unshift(t[0]), r;
|
|
967
|
+
}
|
|
968
|
+
function _t(t) {
|
|
969
|
+
for (var i = (t || "").match(gi) || [], e = [], n, s, o = 0; o < i.length; ++o)
|
|
970
|
+
if (n = w[i[o]], n) {
|
|
971
|
+
s = {
|
|
972
|
+
type: i[o]
|
|
973
|
+
};
|
|
974
|
+
for (var a = 0; a < n.length; ++a)
|
|
975
|
+
s[n[a]] = +i[o + a + 1];
|
|
976
|
+
o += n.length, e.push(s);
|
|
977
|
+
}
|
|
978
|
+
return e;
|
|
979
|
+
}
|
|
980
|
+
function Si(t, i, e) {
|
|
981
|
+
var n = t == null ? [] : t.slice(), s = i == null ? [] : i.slice(), o = N(e) === "object" ? e : {
|
|
982
|
+
excludeSegment: e,
|
|
983
|
+
snapEndsToInput: !0
|
|
984
|
+
}, a = o.excludeSegment, r = o.snapEndsToInput;
|
|
985
|
+
if (!n.length && !s.length)
|
|
986
|
+
return function() {
|
|
987
|
+
return [];
|
|
988
|
+
};
|
|
989
|
+
var h = (n.length === 0 || n[n.length - 1].type === "Z") && (s.length === 0 || s[s.length - 1].type === "Z");
|
|
990
|
+
n.length > 0 && n[n.length - 1].type === "Z" && n.pop(), s.length > 0 && s[s.length - 1].type === "Z" && s.pop(), n.length ? s.length || s.push(n[0]) : n.push(s[0]);
|
|
991
|
+
var c = Math.abs(s.length - n.length);
|
|
992
|
+
c !== 0 && (s.length > n.length ? n = at(n, s, a) : s.length < n.length && (s = at(s, n, a))), n = n.map(function(_, l) {
|
|
993
|
+
return mi(_, s[l]);
|
|
994
|
+
});
|
|
995
|
+
var u = n.map(function(_) {
|
|
996
|
+
return ui({}, _);
|
|
997
|
+
});
|
|
998
|
+
return h && (u.push({
|
|
999
|
+
type: "Z"
|
|
1000
|
+
}), n.push({
|
|
1001
|
+
type: "Z"
|
|
1002
|
+
})), function(l) {
|
|
1003
|
+
if (l === 1 && r)
|
|
1004
|
+
return i ?? [];
|
|
1005
|
+
if (l === 0)
|
|
1006
|
+
return n;
|
|
1007
|
+
for (var y = 0; y < u.length; ++y) {
|
|
1008
|
+
var v = n[y], m = s[y], b = u[y], x = St(w[b.type]), d;
|
|
1009
|
+
try {
|
|
1010
|
+
for (x.s(); !(d = x.n()).done; ) {
|
|
1011
|
+
var f = d.value;
|
|
1012
|
+
b[f] = (1 - l) * v[f] + l * m[f], (f === "largeArcFlag" || f === "sweepFlag") && (b[f] = Math.round(b[f]));
|
|
1013
|
+
}
|
|
1014
|
+
} catch (g) {
|
|
1015
|
+
x.e(g);
|
|
1016
|
+
} finally {
|
|
1017
|
+
x.f();
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
return u;
|
|
1021
|
+
};
|
|
1022
|
+
}
|
|
1023
|
+
function wi(t, i, e) {
|
|
1024
|
+
var n = _t(t), s = _t(i), o = N(e) === "object" ? e : {
|
|
1025
|
+
excludeSegment: e,
|
|
1026
|
+
snapEndsToInput: !0
|
|
1027
|
+
}, a = o.excludeSegment, r = o.snapEndsToInput;
|
|
1028
|
+
if (!n.length && !s.length)
|
|
1029
|
+
return function() {
|
|
1030
|
+
return "";
|
|
1031
|
+
};
|
|
1032
|
+
var h = Si(n, s, {
|
|
1033
|
+
excludeSegment: a,
|
|
1034
|
+
snapEndsToInput: r
|
|
1035
|
+
});
|
|
1036
|
+
return function(u) {
|
|
1037
|
+
if (u === 1 && r)
|
|
1038
|
+
return i ?? "";
|
|
1039
|
+
var _ = h(u), l = "", y = St(_), v;
|
|
1040
|
+
try {
|
|
1041
|
+
for (y.s(); !(v = y.n()).done; ) {
|
|
1042
|
+
var m = v.value;
|
|
1043
|
+
l += bi(m);
|
|
1044
|
+
}
|
|
1045
|
+
} catch (b) {
|
|
1046
|
+
y.e(b);
|
|
1047
|
+
} finally {
|
|
1048
|
+
y.f();
|
|
1049
|
+
}
|
|
1050
|
+
return l;
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
var p;
|
|
1054
|
+
(function(t) {
|
|
1055
|
+
t.Basis = "basis", t.BasisClosed = "basisClosed", t.BasisOpen = "basisOpen", t.Bundle = "bundle", t.Cardinal = "cardinal", t.CardinalClosed = "cardinalClosed", t.CardinalOpen = "cardinalOpen", t.CatmullRom = "catmullRom", t.CatmullRomClosed = "catmullRomClosed", t.CatmullRomOpen = "catmullRomOpen", t.Linear = "linear", t.LinearClosed = "linearClosed", t.MonotoneX = "monotoneX", t.MonotoneY = "monotoneY", t.Natural = "natural", t.Step = "step", t.StepAfter = "stepAfter", t.StepBefore = "stepBefore";
|
|
1056
|
+
})(p || (p = {}));
|
|
1057
|
+
const lt = {
|
|
1058
|
+
[p.Basis]: Qt,
|
|
1059
|
+
[p.BasisClosed]: Ut,
|
|
1060
|
+
[p.BasisOpen]: $t,
|
|
1061
|
+
[p.Bundle]: Jt,
|
|
1062
|
+
[p.Cardinal]: Kt,
|
|
1063
|
+
[p.CardinalClosed]: ti,
|
|
1064
|
+
[p.CardinalOpen]: ii,
|
|
1065
|
+
[p.CatmullRom]: ei,
|
|
1066
|
+
[p.CatmullRomClosed]: ni,
|
|
1067
|
+
[p.CatmullRomOpen]: si,
|
|
1068
|
+
[p.Linear]: ut,
|
|
1069
|
+
[p.LinearClosed]: oi,
|
|
1070
|
+
[p.MonotoneX]: ri,
|
|
1071
|
+
[p.MonotoneY]: hi,
|
|
1072
|
+
[p.Natural]: ai,
|
|
1073
|
+
[p.Step]: _i,
|
|
1074
|
+
[p.StepAfter]: ci,
|
|
1075
|
+
[p.StepBefore]: li
|
|
1076
|
+
}, Ti = Object.assign(Object.assign({}, Bt), { curveType: p.MonotoneX, lineWidth: 2, lineDashArray: void 0, fallbackValue: void 0, highlightOnHover: !1, cursor: null, interpolateMissingData: !1 }), Oi = Dt`
|
|
1077
|
+
:root {
|
|
1078
|
+
--vis-line-cursor: default;
|
|
1079
|
+
--vis-line-stroke-dasharray: none;
|
|
1080
|
+
--vis-line-stroke-dashoffset: 0;
|
|
1081
|
+
|
|
1082
|
+
--vis-line-gapfill-stroke-dasharray: 2 3;
|
|
1083
|
+
--vis-line-gapfill-stroke-opacity: 0.8;
|
|
1084
|
+
--vis-line-gapfill-stroke-dashoffset: 0;
|
|
1085
|
+
}
|
|
1086
|
+
`, Ni = T`
|
|
1087
|
+
label: line-component;
|
|
1088
|
+
`, O = T`
|
|
1089
|
+
label: line;
|
|
1090
|
+
transition: opacity 200ms;
|
|
1091
|
+
cursor: var(--vis-line-cursor);
|
|
1092
|
+
`, z = T`
|
|
1093
|
+
label: linePath;
|
|
1094
|
+
fill: none;
|
|
1095
|
+
stroke-dasharray: var(--vis-line-stroke-dasharray);
|
|
1096
|
+
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
|
|
1097
|
+
`, Y = T`
|
|
1098
|
+
label: lineSelectionHelper;
|
|
1099
|
+
fill: none;
|
|
1100
|
+
stroke: rgba(0, 0, 0, 0);
|
|
1101
|
+
stroke-width: 8px;
|
|
1102
|
+
`, G = T`
|
|
1103
|
+
opacity: 0.2;
|
|
1104
|
+
`, W = T`
|
|
1105
|
+
label: interpolated-path;
|
|
1106
|
+
fill: none;
|
|
1107
|
+
stroke-dasharray: var(--vis-line-gapfill-stroke-dasharray);
|
|
1108
|
+
stroke-dashoffset: var(--vis-line-gapfill-stroke-dashoffset);
|
|
1109
|
+
stroke-opacity: var(--vis-line-gapfill-stroke-opacity);
|
|
1110
|
+
`, Pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1111
|
+
__proto__: null,
|
|
1112
|
+
dim: G,
|
|
1113
|
+
globalStyles: Oi,
|
|
1114
|
+
interpolatedPath: W,
|
|
1115
|
+
line: O,
|
|
1116
|
+
linePath: z,
|
|
1117
|
+
lineSelectionHelper: Y,
|
|
1118
|
+
root: Ni
|
|
1119
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1120
|
+
class P extends Lt {
|
|
1121
|
+
constructor(i) {
|
|
1122
|
+
super(), this._defaultConfig = Ti, this.config = this._defaultConfig, this.curve = lt[p.MonotoneX], this.events = {
|
|
1123
|
+
[P.selectors.line]: {
|
|
1124
|
+
mouseover: this._highlight.bind(this),
|
|
1125
|
+
mouseleave: this._resetHighlight.bind(this)
|
|
1126
|
+
}
|
|
1127
|
+
}, i && this.setConfig(i);
|
|
1128
|
+
}
|
|
1129
|
+
get bleed() {
|
|
1130
|
+
const { config: { lineWidth: i } } = this, e = this.yScale.domain(), s = (this.yScale.range()[0] > this.yScale.range()[1] ? V.North : V.South) === V.South, o = i > 3, a = i >= 10;
|
|
1131
|
+
return {
|
|
1132
|
+
top: !a && (!s && e[1] === 0 || s && e[0] === 0) ? 0 : i / 2,
|
|
1133
|
+
bottom: !a && (!s && e[0] === 0 || s && e[1] === 0) ? 0 : i / 2,
|
|
1134
|
+
left: o ? i / 2 : 0,
|
|
1135
|
+
right: o ? i / 2 : 0
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
_render(i) {
|
|
1139
|
+
super._render(i);
|
|
1140
|
+
const { config: e, datamodel: { data: n } } = this, s = F(i) ? i : e.duration;
|
|
1141
|
+
this.curve = lt[e.curveType], this.lineGen = qt().x((_) => _.x).y((_) => _.y).defined((_) => _.defined).curve(this.curve);
|
|
1142
|
+
const o = Ft(e.y) ? e.y : [e.y], a = n.map((_, l) => this.xScale(it(_, e.x, l))), r = o.map((_) => {
|
|
1143
|
+
const l = n.map((x, d) => {
|
|
1144
|
+
const f = it(x, _, d), g = (F(f) || f === null) && isFinite(f) ? f : e.fallbackValue, C = e.interpolateMissingData ? (F(f) || f === null) && isFinite(f) : isFinite(g);
|
|
1145
|
+
return {
|
|
1146
|
+
x: a[d],
|
|
1147
|
+
y: this.yScale(g ?? 0),
|
|
1148
|
+
defined: C,
|
|
1149
|
+
value: g
|
|
1150
|
+
};
|
|
1151
|
+
}), y = l.reduce((x, d) => d.defined || x, !1);
|
|
1152
|
+
let v = !1;
|
|
1153
|
+
const m = l.reduce((x, d, f) => {
|
|
1154
|
+
!d.defined && isFinite(e.fallbackValue) && x.push(Object.assign(Object.assign({}, d), { defined: !0 })), !d.defined && !v && (v = !0);
|
|
1155
|
+
const g = f > 0 && !l[f - 1].defined || f < l.length - 1 && !l[f + 1].defined;
|
|
1156
|
+
return d.defined && g && (v || x.push(Object.assign(Object.assign({}, d), { defined: !1 })), x.push(d), v = !1), x;
|
|
1157
|
+
}, []), b = y && l.some((x) => x.value !== null);
|
|
1158
|
+
return {
|
|
1159
|
+
values: l,
|
|
1160
|
+
defined: y,
|
|
1161
|
+
gaps: m,
|
|
1162
|
+
visible: b
|
|
1163
|
+
};
|
|
1164
|
+
}), h = this.g.selectAll(`.${O}`).data(r), c = h.enter().append("g").attr("class", O);
|
|
1165
|
+
c.append("path").attr("class", z).attr("stroke", (_, l) => I(n, e.color, l)).attr("stroke-opacity", 0).attr("stroke-width", e.lineWidth), c.append("path").attr("class", Y).attr("d", this._emptyPath()), c.append("path").attr("class", W).attr("d", this._emptyPath()).style("opacity", 0);
|
|
1166
|
+
const u = c.merge(h);
|
|
1167
|
+
u.style("cursor", (_, l) => It(n, e.cursor, l)), u.each((_, l, y) => {
|
|
1168
|
+
var v;
|
|
1169
|
+
const m = Ht(y[l]), b = m.select(`.${z}`), x = m.select(`.${Y}`), d = m.select(`.${W}`), f = _.visible, g = Vt(n, e.lineDashArray, l), C = H(b, s).attr("stroke", I(n, e.color, l)).attr("stroke-width", e.lineWidth).attr("stroke-opacity", f ? 1 : 0).style("stroke-dasharray", (v = g == null ? void 0 : g.join(" ")) !== null && v !== void 0 ? v : null), J = _.values.some((L) => !L.defined), D = this.lineGen(_.values);
|
|
1170
|
+
if (s && !J) {
|
|
1171
|
+
const L = b.attr("d") || this._emptyPath(), wt = D || this._emptyPath();
|
|
1172
|
+
C.attrTween("d", () => wi(L, wt));
|
|
1173
|
+
} else _.visible && C.attr("d", D);
|
|
1174
|
+
x.attr("d", D).attr("visibility", f ? null : "hidden"), J && e.interpolateMissingData ? H(d, s).attr("d", this.lineGen(_.gaps)).attr("stroke", I(n, e.color, l)).attr("stroke-width", e.lineWidth - 1).style("opacity", 1) : d.transition().duration(s).style("opacity", 0);
|
|
1175
|
+
}), H(h.exit(), s).style("opacity", 0).remove();
|
|
1176
|
+
}
|
|
1177
|
+
_emptyPath() {
|
|
1178
|
+
const i = this.xScale.range(), e = this.yScale.range();
|
|
1179
|
+
return `M${i[0]},${e[0]} L${i[1]},${e[0]}`;
|
|
1180
|
+
}
|
|
1181
|
+
_highlight(i) {
|
|
1182
|
+
const { config: e } = this;
|
|
1183
|
+
e.highlightOnHover && this.g.selectAll(`.${O}`).classed(G, (n) => n !== i);
|
|
1184
|
+
}
|
|
1185
|
+
_resetHighlight() {
|
|
1186
|
+
const { config: i } = this;
|
|
1187
|
+
i.highlightOnHover && this.g.selectAll(`.${O}`).classed(G, !1);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
P.selectors = Pi;
|
|
1191
|
+
const Ci = { "data-vis-component": "" };
|
|
1192
|
+
P.selectors;
|
|
1193
|
+
const Bi = /* @__PURE__ */ Tt({
|
|
1194
|
+
__name: "index",
|
|
1195
|
+
props: {
|
|
1196
|
+
color: {},
|
|
1197
|
+
curveType: {},
|
|
1198
|
+
lineWidth: {},
|
|
1199
|
+
lineDashArray: {},
|
|
1200
|
+
fallbackValue: {},
|
|
1201
|
+
highlightOnHover: { type: Boolean },
|
|
1202
|
+
cursor: {},
|
|
1203
|
+
interpolateMissingData: { type: Boolean },
|
|
1204
|
+
x: {},
|
|
1205
|
+
y: {},
|
|
1206
|
+
id: { type: Function },
|
|
1207
|
+
xScale: { type: [Object, Function] },
|
|
1208
|
+
yScale: { type: [Object, Function] },
|
|
1209
|
+
excludeFromDomainCalculation: { type: Boolean },
|
|
1210
|
+
duration: {},
|
|
1211
|
+
events: {},
|
|
1212
|
+
attributes: {},
|
|
1213
|
+
data: {}
|
|
1214
|
+
},
|
|
1215
|
+
setup(t, { expose: i }) {
|
|
1216
|
+
const e = Ot(Xt), n = t, s = Nt(() => e.data.value ?? n.data), o = Zt(n), a = Pt();
|
|
1217
|
+
return Mt(() => {
|
|
1218
|
+
At(() => {
|
|
1219
|
+
var r;
|
|
1220
|
+
a.value = new P(o.value), (r = a.value) == null || r.setData(s.value), e.update(a.value);
|
|
1221
|
+
});
|
|
1222
|
+
}), jt(() => {
|
|
1223
|
+
var r;
|
|
1224
|
+
(r = a.value) == null || r.destroy(), e.destroy();
|
|
1225
|
+
}), K(o, (r, h) => {
|
|
1226
|
+
var c;
|
|
1227
|
+
zt(r, h) || (c = a.value) == null || c.setConfig(o.value);
|
|
1228
|
+
}), K(s, () => {
|
|
1229
|
+
var r;
|
|
1230
|
+
(r = a.value) == null || r.setData(s.value);
|
|
1231
|
+
}), i({
|
|
1232
|
+
component: a
|
|
1233
|
+
}), (r, h) => (Et(), Ct("div", Ci));
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
export {
|
|
1237
|
+
p as C,
|
|
1238
|
+
P as L,
|
|
1239
|
+
Bi as S,
|
|
1240
|
+
lt as a,
|
|
1241
|
+
ut as c,
|
|
1242
|
+
wi as i,
|
|
1243
|
+
qt as l,
|
|
1244
|
+
Gt as x,
|
|
1245
|
+
Wt as y
|
|
1246
|
+
};
|