hexagon-editor 0.1.5 → 0.1.6
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/README.md +24 -11
- package/dist/MarkdownEditor.vue.d.ts +28 -26
- package/dist/MarkdownEditor.vue.d.ts.map +1 -1
- package/dist/{MarkdownEditorLinkForm-C7CGgA83.js → MarkdownEditorLinkForm-B9dEX3WT.js} +1 -1
- package/dist/{base-Bnv2-Te4.js → base-BPdMUtQo.js} +141 -137
- package/dist/components/MarkdownEditorToolbar.vue.d.ts +4 -3
- package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -1
- package/dist/configure.d.ts +0 -2
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +11 -12
- package/dist/core/basic-editor-markdown.d.ts.map +1 -1
- package/dist/core/basic-editor-renderers.d.ts +6 -4
- package/dist/core/basic-editor-renderers.d.ts.map +1 -1
- package/dist/core/basic-editor-types.d.ts +2 -0
- package/dist/core/basic-editor-types.d.ts.map +1 -1
- package/dist/core/basic-editor.d.ts +1 -1
- package/dist/core/basic-editor.d.ts.map +1 -1
- package/dist/core/index.d.ts +0 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core.js +28 -31
- package/dist/extensions.js +1 -1
- package/dist/forms/MarkdownEditorImageForm.vue.d.ts +2 -2
- package/dist/forms/MarkdownEditorImageForm.vue.d.ts.map +1 -1
- package/dist/forms/MarkdownEditorLinkForm.vue.d.ts +2 -2
- package/dist/forms/MarkdownEditorTextInput.vue.d.ts +2 -2
- package/dist/forms/MarkdownEditorTextInput.vue.d.ts.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/{full-C-o2lPBX.js → full-Da8esvj2.js} +1 -1
- package/dist/{full-specs-Cl-ODShc.js → full-specs-hXKoMF-0.js} +1 -1
- package/dist/index-D_CMntQU.js +3173 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3611 -1283
- package/dist/{markup-commands-B2NMfYHE.js → markup-commands-BYsx8ADT.js} +1989 -1963
- package/dist/presets.js +2 -2
- package/dist/public-types.d.ts +22 -0
- package/dist/public-types.d.ts.map +1 -1
- package/dist/renderer/MarkdownRenderer.vue.d.ts +2 -0
- package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -1
- package/dist/renderer/markdown.d.ts +2 -1
- package/dist/renderer/markdown.d.ts.map +1 -1
- package/dist/renderer.css +1 -1
- package/dist/renderer.js +142 -146
- package/package.json +106 -108
- package/dist/MarkdownEditorLinkForm.css +0 -1
- package/dist/abnfDiagram-N423BO3Z-DCf6sPky.js +0 -87
- package/dist/arc-y6UeoJpJ.js +0 -83
- package/dist/architectureDiagram-T3A2C74G-Cc3_3-cI.js +0 -4778
- package/dist/base.css +0 -1
- package/dist/blockDiagram-VBNYF7ZC-DWVLZwXY.js +0 -2419
- package/dist/c4Diagram-5PPSVZJV-CaIN7qay.js +0 -1577
- package/dist/channel-BwXGcavV.js +0 -5
- package/dist/chunk-2GRJ4B5K-O75udjPr.js +0 -68
- package/dist/chunk-2Q5K7J3B-CySL0lOA.js +0 -15
- package/dist/chunk-5RXB4S5H-BKPnLCOJ.js +0 -1408
- package/dist/chunk-5VM5RSS4--it1VJIv.js +0 -19
- package/dist/chunk-6Q2QTUOP-DNiML-50.js +0 -664
- package/dist/chunk-GF5L2VYU-z7A-k0-V.js +0 -1533
- package/dist/chunk-JWPE2WC7-DAjx3Kjr.js +0 -8
- package/dist/chunk-KBJHAD2P-D4R1VW0r.js +0 -19
- package/dist/chunk-RYQCIY6F-DmJAYxq8.js +0 -313
- package/dist/chunk-XXDRQBXY-CK913N-t.js +0 -8
- package/dist/classDiagram-JCYQIIEL-Djipq_HJ.js +0 -16
- package/dist/classDiagram-v2-OCEON4UE-Djipq_HJ.js +0 -16
- package/dist/core/optional-renderers.d.ts +0 -9
- package/dist/core/optional-renderers.d.ts.map +0 -1
- package/dist/cose-bilkent-JH36ORCC-CXuKFbXy.js +0 -2608
- package/dist/cynefin-VYW2F7L2-Bkk-F_Js.js +0 -23766
- package/dist/cynefinDiagram-MW4NZA55-DwOK40hm.js +0 -299
- package/dist/cytoscape.esm-3W4EOjxC.js +0 -18756
- package/dist/dagre-VZM6K2ZE-0VsGm8Ag.js +0 -340
- package/dist/defaultLocale-BgPVtth8.js +0 -171
- package/dist/diagram-7IWD3JNH-BrApu1hz.js +0 -350
- package/dist/diagram-B4RE2ZJO-CVXoBg2r.js +0 -461
- package/dist/diagram-LBJQPF4R-Dp0eSz2L.js +0 -142
- package/dist/diagram-Q27KOJAE-DWIltqIH.js +0 -528
- package/dist/diagram-UB23O5K3-B7z2Lj3K.js +0 -219
- package/dist/ebnfDiagram-BXEA7PRR-CYgE6z_2.js +0 -109
- package/dist/erDiagram-JOGREHBK-D3QWrPo-.js +0 -910
- package/dist/flowDiagram-UKHOOZJN-CfjPcHNW.js +0 -1638
- package/dist/ganttDiagram-PKOTCBZU-ECmaWI-9.js +0 -2711
- package/dist/gitGraphDiagram-DS77QQ5N-DgG1RGJ8.js +0 -815
- package/dist/graph-DAHC4kPm.js +0 -1545
- package/dist/infoDiagram-6WML65LV-B1Yl3nZV.js +0 -24
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/ishikawaDiagram-WSZJBQD7-4sngaB5o.js +0 -621
- package/dist/journeyDiagram-NVQOT4AX-B_6AmR_j.js +0 -834
- package/dist/kanban-definition-27J2QSJJ-B8BO9o8J.js +0 -724
- package/dist/katex-ByXcxnHy.js +0 -14436
- package/dist/katex-DoRnZ_sp.js +0 -11682
- package/dist/layout-DBbo_M5I.js +0 -1519
- package/dist/linear-BEdRfKba.js +0 -259
- package/dist/map-DRdzG8Ho.js +0 -224
- package/dist/markup-commands.css +0 -1
- package/dist/mermaid.core-CR0bA2Wa.js +0 -16496
- package/dist/mindmap-definition-FAOFIHXS-DnPz807N.js +0 -827
- package/dist/optional-renderers-BalvqqvY.js +0 -11
- package/dist/ordinal-B6-f3MAq.js +0 -61
- package/dist/pegDiagram-VL7TDLO6-csGWlzs8.js +0 -95
- package/dist/pieDiagram-7S7Q4E2Y-Bqs8j5FX.js +0 -207
- package/dist/quadrantDiagram-CIZ2JOQS-jzP4lRrY.js +0 -1023
- package/dist/railroadDiagram-AXF67PYL-BSCyR24u.js +0 -77
- package/dist/renderer/mermaid-runtime.d.ts +0 -4
- package/dist/renderer/mermaid-runtime.d.ts.map +0 -1
- package/dist/requirementDiagram-LRYGKXZP-DmEkLYqX.js +0 -882
- package/dist/sankeyDiagram-W5VNT64P-CYvRYMTh.js +0 -847
- package/dist/sequenceDiagram-SI44F4Z6-CyWbDtPA.js +0 -2888
- package/dist/sizeCapture-X5ZJPWSS-xKhYCY84.js +0 -46
- package/dist/stateDiagram-OKZ733FA-DP44R2Dd.js +0 -263
- package/dist/stateDiagram-v2-UEYNNEHI-BvlOisND.js +0 -16
- package/dist/swimlanes-SLNWSIFB-BKFp8twH.js +0 -5332
- package/dist/swimlanesDiagram-ULZ7WXOC-CTvIFuHq.js +0 -13
- package/dist/timeline-definition-Z64GVDOM-B4137uIl.js +0 -1055
- package/dist/vennDiagram-T6HMQDX7-CPs8gXjx.js +0 -1578
- package/dist/wardleyDiagram-T6FBY63Y-BYp13hbI.js +0 -675
- package/dist/xychartDiagram-ELKLHX3M-DTT37K2u.js +0 -1388
|
@@ -1,1388 +0,0 @@
|
|
|
1
|
-
import { s as xi, g as di, o as Yt, n as fi, a as pi, b as mi, _ as n, l as Nt, D as yi, e as bi, p as Ai, y as kt, i as wi, A as Ht, B as Ci, E as Si, az as Ri, P as Ot } from "./mermaid.core-CR0bA2Wa.js";
|
|
2
|
-
import { i as _i } from "./init-DjUOC4st.js";
|
|
3
|
-
import { o as ki } from "./ordinal-B6-f3MAq.js";
|
|
4
|
-
import { l as Wt } from "./linear-BEdRfKba.js";
|
|
5
|
-
function Ti(e, t, i) {
|
|
6
|
-
e = +e, t = +t, i = (a = arguments.length) < 2 ? (t = e, e = 0, 1) : a < 3 ? 1 : +i;
|
|
7
|
-
for (var s = -1, a = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(a); ++s < a; )
|
|
8
|
-
o[s] = e + s * i;
|
|
9
|
-
return o;
|
|
10
|
-
}
|
|
11
|
-
function wt() {
|
|
12
|
-
var e = ki().unknown(void 0), t = e.domain, i = e.range, s = 0, a = 1, o, l, p = !1, d = 0, k = 0, T = 0.5;
|
|
13
|
-
delete e.unknown;
|
|
14
|
-
function _() {
|
|
15
|
-
var b = t().length, E = a < s, L = E ? a : s, P = E ? s : a;
|
|
16
|
-
o = (P - L) / Math.max(1, b - d + k * 2), p && (o = Math.floor(o)), L += (P - L - o * (b - d)) * T, l = o * (1 - d), p && (L = Math.round(L), l = Math.round(l));
|
|
17
|
-
var I = Ti(b).map(function(m) {
|
|
18
|
-
return L + o * m;
|
|
19
|
-
});
|
|
20
|
-
return i(E ? I.reverse() : I);
|
|
21
|
-
}
|
|
22
|
-
return e.domain = function(b) {
|
|
23
|
-
return arguments.length ? (t(b), _()) : t();
|
|
24
|
-
}, e.range = function(b) {
|
|
25
|
-
return arguments.length ? ([s, a] = b, s = +s, a = +a, _()) : [s, a];
|
|
26
|
-
}, e.rangeRound = function(b) {
|
|
27
|
-
return [s, a] = b, s = +s, a = +a, p = !0, _();
|
|
28
|
-
}, e.bandwidth = function() {
|
|
29
|
-
return l;
|
|
30
|
-
}, e.step = function() {
|
|
31
|
-
return o;
|
|
32
|
-
}, e.round = function(b) {
|
|
33
|
-
return arguments.length ? (p = !!b, _()) : p;
|
|
34
|
-
}, e.padding = function(b) {
|
|
35
|
-
return arguments.length ? (d = Math.min(1, k = +b), _()) : d;
|
|
36
|
-
}, e.paddingInner = function(b) {
|
|
37
|
-
return arguments.length ? (d = Math.min(1, b), _()) : d;
|
|
38
|
-
}, e.paddingOuter = function(b) {
|
|
39
|
-
return arguments.length ? (k = +b, _()) : k;
|
|
40
|
-
}, e.align = function(b) {
|
|
41
|
-
return arguments.length ? (T = Math.max(0, Math.min(1, b)), _()) : T;
|
|
42
|
-
}, e.copy = function() {
|
|
43
|
-
return wt(t(), [s, a]).round(p).paddingInner(d).paddingOuter(k).align(T);
|
|
44
|
-
}, _i.apply(_(), arguments);
|
|
45
|
-
}
|
|
46
|
-
var Ct = (function() {
|
|
47
|
-
var e = /* @__PURE__ */ n(function(F, h, u, g) {
|
|
48
|
-
for (u = u || {}, g = F.length; g--; u[F[g]] = h) ;
|
|
49
|
-
return u;
|
|
50
|
-
}, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], a = [1, 5], o = [1, 6], l = [1, 7], p = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], d = [1, 25], k = [1, 26], T = [1, 28], _ = [1, 29], b = [1, 30], E = [1, 31], L = [1, 32], P = [1, 33], I = [1, 34], m = [1, 35], D = [1, 36], c = [1, 37], B = [1, 43], W = [1, 42], X = [1, 47], Y = [1, 50], S = [1, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], H = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38], A = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], w = [1, 65], V = [26, 28], R = {
|
|
51
|
-
trace: /* @__PURE__ */ n(function() {
|
|
52
|
-
}, "trace"),
|
|
53
|
-
yy: {},
|
|
54
|
-
symbols_: { error: 2, start: 3, eol: 4, XYCHART: 5, chartConfig: 6, document: 7, CHART_ORIENTATION: 8, statement: 9, title: 10, text: 11, X_AXIS: 12, parseXAxis: 13, Y_AXIS: 14, parseYAxis: 15, LINE: 16, plotData: 17, BAR: 18, acc_title: 19, acc_title_value: 20, acc_descr: 21, acc_descr_value: 22, acc_descr_multiline_value: 23, SQUARE_BRACES_START: 24, dataPoints: 25, SQUARE_BRACES_END: 26, dataPoint: 27, COMMA: 28, NUMBER_WITH_DECIMAL: 29, STR: 30, xAxisData: 31, bandData: 32, ARROW_DELIMITER: 33, commaSeparatedTexts: 34, yAxisData: 35, NEWLINE: 36, SEMI: 37, EOF: 38, alphaNum: 39, MD_STR: 40, alphaNumToken: 41, AMP: 42, NUM: 43, ALPHA: 44, PLUS: 45, EQUALS: 46, MULT: 47, DOT: 48, BRKT: 49, MINUS: 50, UNDERSCORE: 51, $accept: 0, $end: 1 },
|
|
55
|
-
terminals_: { 2: "error", 5: "XYCHART", 8: "CHART_ORIENTATION", 10: "title", 12: "X_AXIS", 14: "Y_AXIS", 16: "LINE", 18: "BAR", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "SQUARE_BRACES_START", 26: "SQUARE_BRACES_END", 28: "COMMA", 29: "NUMBER_WITH_DECIMAL", 30: "STR", 33: "ARROW_DELIMITER", 36: "NEWLINE", 37: "SEMI", 38: "EOF", 40: "MD_STR", 42: "AMP", 43: "NUM", 44: "ALPHA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "MINUS", 51: "UNDERSCORE" },
|
|
56
|
-
productions_: [0, [3, 2], [3, 3], [3, 2], [3, 1], [6, 1], [7, 0], [7, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 3], [9, 2], [9, 3], [9, 2], [9, 2], [9, 1], [17, 3], [25, 3], [25, 1], [27, 2], [27, 1], [13, 1], [13, 2], [13, 1], [31, 1], [31, 3], [32, 3], [34, 3], [34, 1], [15, 1], [15, 2], [15, 1], [35, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [39, 1], [39, 2], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1]],
|
|
57
|
-
performAction: /* @__PURE__ */ n(function(h, u, g, x, C, r, rt) {
|
|
58
|
-
var f = r.length - 1;
|
|
59
|
-
switch (C) {
|
|
60
|
-
case 5:
|
|
61
|
-
x.setOrientation(r[f]);
|
|
62
|
-
break;
|
|
63
|
-
case 9:
|
|
64
|
-
x.setDiagramTitle(r[f].text.trim());
|
|
65
|
-
break;
|
|
66
|
-
case 12:
|
|
67
|
-
x.setLineData({ text: "", type: "text" }, r[f]);
|
|
68
|
-
break;
|
|
69
|
-
case 13:
|
|
70
|
-
x.setLineData(r[f - 1], r[f]);
|
|
71
|
-
break;
|
|
72
|
-
case 14:
|
|
73
|
-
x.setBarData({ text: "", type: "text" }, r[f]);
|
|
74
|
-
break;
|
|
75
|
-
case 15:
|
|
76
|
-
x.setBarData(r[f - 1], r[f]);
|
|
77
|
-
break;
|
|
78
|
-
case 16:
|
|
79
|
-
this.$ = r[f].trim(), x.setAccTitle(this.$);
|
|
80
|
-
break;
|
|
81
|
-
case 17:
|
|
82
|
-
case 18:
|
|
83
|
-
this.$ = r[f].trim(), x.setAccDescription(this.$);
|
|
84
|
-
break;
|
|
85
|
-
case 19:
|
|
86
|
-
this.$ = r[f - 1];
|
|
87
|
-
break;
|
|
88
|
-
case 20:
|
|
89
|
-
case 30:
|
|
90
|
-
this.$ = [r[f - 2], ...r[f]];
|
|
91
|
-
break;
|
|
92
|
-
case 21:
|
|
93
|
-
case 31:
|
|
94
|
-
this.$ = [r[f]];
|
|
95
|
-
break;
|
|
96
|
-
case 22:
|
|
97
|
-
this.$ = { value: Number(r[f - 1]), label: r[f] };
|
|
98
|
-
break;
|
|
99
|
-
case 23:
|
|
100
|
-
this.$ = { value: Number(r[f]), label: "" };
|
|
101
|
-
break;
|
|
102
|
-
case 24:
|
|
103
|
-
x.setXAxisTitle(r[f]);
|
|
104
|
-
break;
|
|
105
|
-
case 25:
|
|
106
|
-
x.setXAxisTitle(r[f - 1]);
|
|
107
|
-
break;
|
|
108
|
-
case 26:
|
|
109
|
-
x.setXAxisTitle({ type: "text", text: "" });
|
|
110
|
-
break;
|
|
111
|
-
case 27:
|
|
112
|
-
x.setXAxisBand(r[f]);
|
|
113
|
-
break;
|
|
114
|
-
case 28:
|
|
115
|
-
x.setXAxisRangeData(Number(r[f - 2]), Number(r[f]));
|
|
116
|
-
break;
|
|
117
|
-
case 29:
|
|
118
|
-
this.$ = r[f - 1];
|
|
119
|
-
break;
|
|
120
|
-
case 32:
|
|
121
|
-
x.setYAxisTitle(r[f]);
|
|
122
|
-
break;
|
|
123
|
-
case 33:
|
|
124
|
-
x.setYAxisTitle(r[f - 1]);
|
|
125
|
-
break;
|
|
126
|
-
case 34:
|
|
127
|
-
x.setYAxisTitle({ type: "text", text: "" });
|
|
128
|
-
break;
|
|
129
|
-
case 35:
|
|
130
|
-
x.setYAxisRangeData(Number(r[f - 2]), Number(r[f]));
|
|
131
|
-
break;
|
|
132
|
-
case 39:
|
|
133
|
-
this.$ = { text: r[f], type: "text" };
|
|
134
|
-
break;
|
|
135
|
-
case 40:
|
|
136
|
-
this.$ = { text: r[f], type: "text" };
|
|
137
|
-
break;
|
|
138
|
-
case 41:
|
|
139
|
-
this.$ = { text: r[f], type: "markdown" };
|
|
140
|
-
break;
|
|
141
|
-
case 42:
|
|
142
|
-
this.$ = r[f];
|
|
143
|
-
break;
|
|
144
|
-
case 43:
|
|
145
|
-
this.$ = r[f - 1] + "" + r[f];
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
}, "anonymous"),
|
|
149
|
-
table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 36: a, 37: o, 38: l }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 36: a, 37: o, 38: l }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 36: a, 37: o, 38: l }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, e(p, [2, 36]), e(p, [2, 37]), e(p, [2, 38]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 36: a, 37: o, 38: l }), { 1: [2, 3] }, e(p, [2, 5]), e(t, [2, 7], { 4: 22, 36: a, 37: o, 38: l }), { 11: 23, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 39, 13: 38, 24: B, 29: W, 30: d, 31: 40, 32: 41, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 45, 15: 44, 29: X, 30: d, 35: 46, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 49, 17: 48, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 52, 17: 51, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 20: [1, 53] }, { 22: [1, 54] }, e(S, [2, 18]), { 1: [2, 2] }, e(S, [2, 8]), e(S, [2, 9]), e(H, [2, 39], { 41: 55, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }), e(H, [2, 40]), e(H, [2, 41]), e(A, [2, 42]), e(A, [2, 44]), e(A, [2, 45]), e(A, [2, 46]), e(A, [2, 47]), e(A, [2, 48]), e(A, [2, 49]), e(A, [2, 50]), e(A, [2, 51]), e(A, [2, 52]), e(A, [2, 53]), e(S, [2, 10]), e(S, [2, 24], { 32: 41, 31: 56, 24: B, 29: W }), e(S, [2, 26]), e(S, [2, 27]), { 33: [1, 57] }, { 11: 59, 30: d, 34: 58, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 11]), e(S, [2, 32], { 35: 60, 29: X }), e(S, [2, 34]), { 33: [1, 61] }, e(S, [2, 12]), { 17: 62, 24: Y }, { 25: 63, 27: 64, 29: w }, e(S, [2, 14]), { 17: 66, 24: Y }, e(S, [2, 16]), e(S, [2, 17]), e(A, [2, 43]), e(S, [2, 25]), { 29: [1, 67] }, { 26: [1, 68] }, { 26: [2, 31], 28: [1, 69] }, e(S, [2, 33]), { 29: [1, 70] }, e(S, [2, 13]), { 26: [1, 71] }, { 26: [2, 21], 28: [1, 72] }, e(V, [2, 23], { 30: [1, 73] }), e(S, [2, 15]), e(S, [2, 28]), e(S, [2, 29]), { 11: 59, 30: d, 34: 74, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 35]), e(S, [2, 19]), { 25: 75, 27: 64, 29: w }, e(V, [2, 22]), { 26: [2, 30] }, { 26: [2, 20] }],
|
|
150
|
-
defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 74: [2, 30], 75: [2, 20] },
|
|
151
|
-
parseError: /* @__PURE__ */ n(function(h, u) {
|
|
152
|
-
if (u.recoverable)
|
|
153
|
-
this.trace(h);
|
|
154
|
-
else {
|
|
155
|
-
var g = new Error(h);
|
|
156
|
-
throw g.hash = u, g;
|
|
157
|
-
}
|
|
158
|
-
}, "parseError"),
|
|
159
|
-
parse: /* @__PURE__ */ n(function(h) {
|
|
160
|
-
var u = this, g = [0], x = [], C = [null], r = [], rt = this.table, f = "", gt = 0, Mt = 0, li = 2, zt = 1, ci = r.slice.call(arguments, 1), v = Object.create(this.lexer), $ = { yy: {} };
|
|
161
|
-
for (var mt in this.yy)
|
|
162
|
-
Object.prototype.hasOwnProperty.call(this.yy, mt) && ($.yy[mt] = this.yy[mt]);
|
|
163
|
-
v.setInput(h, $.yy), $.yy.lexer = v, $.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
|
|
164
|
-
var yt = v.yylloc;
|
|
165
|
-
r.push(yt);
|
|
166
|
-
var ui = v.options && v.options.ranges;
|
|
167
|
-
typeof $.yy.parseError == "function" ? this.parseError = $.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
168
|
-
function gi(z) {
|
|
169
|
-
g.length = g.length - 2 * z, C.length = C.length - z, r.length = r.length - z;
|
|
170
|
-
}
|
|
171
|
-
n(gi, "popStack");
|
|
172
|
-
function Bt() {
|
|
173
|
-
var z;
|
|
174
|
-
return z = x.pop() || v.lex() || zt, typeof z != "number" && (z instanceof Array && (x = z, z = x.pop()), z = u.symbols_[z] || z), z;
|
|
175
|
-
}
|
|
176
|
-
n(Bt, "lex");
|
|
177
|
-
for (var M, U, O, bt, G = {}, xt, N, Vt, dt; ; ) {
|
|
178
|
-
if (U = g[g.length - 1], this.defaultActions[U] ? O = this.defaultActions[U] : ((M === null || typeof M > "u") && (M = Bt()), O = rt[U] && rt[U][M]), typeof O > "u" || !O.length || !O[0]) {
|
|
179
|
-
var At = "";
|
|
180
|
-
dt = [];
|
|
181
|
-
for (xt in rt[U])
|
|
182
|
-
this.terminals_[xt] && xt > li && dt.push("'" + this.terminals_[xt] + "'");
|
|
183
|
-
v.showPosition ? At = "Parse error on line " + (gt + 1) + `:
|
|
184
|
-
` + v.showPosition() + `
|
|
185
|
-
Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At = "Parse error on line " + (gt + 1) + ": Unexpected " + (M == zt ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(At, {
|
|
186
|
-
text: v.match,
|
|
187
|
-
token: this.terminals_[M] || M,
|
|
188
|
-
line: v.yylineno,
|
|
189
|
-
loc: yt,
|
|
190
|
-
expected: dt
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
if (O[0] instanceof Array && O.length > 1)
|
|
194
|
-
throw new Error("Parse Error: multiple actions possible at state: " + U + ", token: " + M);
|
|
195
|
-
switch (O[0]) {
|
|
196
|
-
case 1:
|
|
197
|
-
g.push(M), C.push(v.yytext), r.push(v.yylloc), g.push(O[1]), M = null, Mt = v.yyleng, f = v.yytext, gt = v.yylineno, yt = v.yylloc;
|
|
198
|
-
break;
|
|
199
|
-
case 2:
|
|
200
|
-
if (N = this.productions_[O[1]][1], G.$ = C[C.length - N], G._$ = {
|
|
201
|
-
first_line: r[r.length - (N || 1)].first_line,
|
|
202
|
-
last_line: r[r.length - 1].last_line,
|
|
203
|
-
first_column: r[r.length - (N || 1)].first_column,
|
|
204
|
-
last_column: r[r.length - 1].last_column
|
|
205
|
-
}, ui && (G._$.range = [
|
|
206
|
-
r[r.length - (N || 1)].range[0],
|
|
207
|
-
r[r.length - 1].range[1]
|
|
208
|
-
]), bt = this.performAction.apply(G, [
|
|
209
|
-
f,
|
|
210
|
-
Mt,
|
|
211
|
-
gt,
|
|
212
|
-
$.yy,
|
|
213
|
-
O[1],
|
|
214
|
-
C,
|
|
215
|
-
r
|
|
216
|
-
].concat(ci)), typeof bt < "u")
|
|
217
|
-
return bt;
|
|
218
|
-
N && (g = g.slice(0, -1 * N * 2), C = C.slice(0, -1 * N), r = r.slice(0, -1 * N)), g.push(this.productions_[O[1]][0]), C.push(G.$), r.push(G._$), Vt = rt[g[g.length - 2]][g[g.length - 1]], g.push(Vt);
|
|
219
|
-
break;
|
|
220
|
-
case 3:
|
|
221
|
-
return !0;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return !0;
|
|
225
|
-
}, "parse")
|
|
226
|
-
}, ot = /* @__PURE__ */ (function() {
|
|
227
|
-
var F = {
|
|
228
|
-
EOF: 1,
|
|
229
|
-
parseError: /* @__PURE__ */ n(function(u, g) {
|
|
230
|
-
if (this.yy.parser)
|
|
231
|
-
this.yy.parser.parseError(u, g);
|
|
232
|
-
else
|
|
233
|
-
throw new Error(u);
|
|
234
|
-
}, "parseError"),
|
|
235
|
-
// resets the lexer, sets new input
|
|
236
|
-
setInput: /* @__PURE__ */ n(function(h, u) {
|
|
237
|
-
return this.yy = u || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
238
|
-
first_line: 1,
|
|
239
|
-
first_column: 0,
|
|
240
|
-
last_line: 1,
|
|
241
|
-
last_column: 0
|
|
242
|
-
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
243
|
-
}, "setInput"),
|
|
244
|
-
// consumes and returns one char from the input
|
|
245
|
-
input: /* @__PURE__ */ n(function() {
|
|
246
|
-
var h = this._input[0];
|
|
247
|
-
this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
|
|
248
|
-
var u = h.match(/(?:\r\n?|\n).*/g);
|
|
249
|
-
return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
|
|
250
|
-
}, "input"),
|
|
251
|
-
// unshifts one char (or a string) into the input
|
|
252
|
-
unput: /* @__PURE__ */ n(function(h) {
|
|
253
|
-
var u = h.length, g = h.split(/(?:\r\n?|\n)/g);
|
|
254
|
-
this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
|
|
255
|
-
var x = this.match.split(/(?:\r\n?|\n)/g);
|
|
256
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), g.length - 1 && (this.yylineno -= g.length - 1);
|
|
257
|
-
var C = this.yylloc.range;
|
|
258
|
-
return this.yylloc = {
|
|
259
|
-
first_line: this.yylloc.first_line,
|
|
260
|
-
last_line: this.yylineno + 1,
|
|
261
|
-
first_column: this.yylloc.first_column,
|
|
262
|
-
last_column: g ? (g.length === x.length ? this.yylloc.first_column : 0) + x[x.length - g.length].length - g[0].length : this.yylloc.first_column - u
|
|
263
|
-
}, this.options.ranges && (this.yylloc.range = [C[0], C[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
|
|
264
|
-
}, "unput"),
|
|
265
|
-
// When called from action, caches matched text and appends it on next action
|
|
266
|
-
more: /* @__PURE__ */ n(function() {
|
|
267
|
-
return this._more = !0, this;
|
|
268
|
-
}, "more"),
|
|
269
|
-
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
270
|
-
reject: /* @__PURE__ */ n(function() {
|
|
271
|
-
if (this.options.backtrack_lexer)
|
|
272
|
-
this._backtrack = !0;
|
|
273
|
-
else
|
|
274
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
275
|
-
` + this.showPosition(), {
|
|
276
|
-
text: "",
|
|
277
|
-
token: null,
|
|
278
|
-
line: this.yylineno
|
|
279
|
-
});
|
|
280
|
-
return this;
|
|
281
|
-
}, "reject"),
|
|
282
|
-
// retain first n characters of the match
|
|
283
|
-
less: /* @__PURE__ */ n(function(h) {
|
|
284
|
-
this.unput(this.match.slice(h));
|
|
285
|
-
}, "less"),
|
|
286
|
-
// displays already matched input, i.e. for error messages
|
|
287
|
-
pastInput: /* @__PURE__ */ n(function() {
|
|
288
|
-
var h = this.matched.substr(0, this.matched.length - this.match.length);
|
|
289
|
-
return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
|
|
290
|
-
}, "pastInput"),
|
|
291
|
-
// displays upcoming input, i.e. for error messages
|
|
292
|
-
upcomingInput: /* @__PURE__ */ n(function() {
|
|
293
|
-
var h = this.match;
|
|
294
|
-
return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
295
|
-
}, "upcomingInput"),
|
|
296
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
297
|
-
showPosition: /* @__PURE__ */ n(function() {
|
|
298
|
-
var h = this.pastInput(), u = new Array(h.length + 1).join("-");
|
|
299
|
-
return h + this.upcomingInput() + `
|
|
300
|
-
` + u + "^";
|
|
301
|
-
}, "showPosition"),
|
|
302
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
303
|
-
test_match: /* @__PURE__ */ n(function(h, u) {
|
|
304
|
-
var g, x, C;
|
|
305
|
-
if (this.options.backtrack_lexer && (C = {
|
|
306
|
-
yylineno: this.yylineno,
|
|
307
|
-
yylloc: {
|
|
308
|
-
first_line: this.yylloc.first_line,
|
|
309
|
-
last_line: this.last_line,
|
|
310
|
-
first_column: this.yylloc.first_column,
|
|
311
|
-
last_column: this.yylloc.last_column
|
|
312
|
-
},
|
|
313
|
-
yytext: this.yytext,
|
|
314
|
-
match: this.match,
|
|
315
|
-
matches: this.matches,
|
|
316
|
-
matched: this.matched,
|
|
317
|
-
yyleng: this.yyleng,
|
|
318
|
-
offset: this.offset,
|
|
319
|
-
_more: this._more,
|
|
320
|
-
_input: this._input,
|
|
321
|
-
yy: this.yy,
|
|
322
|
-
conditionStack: this.conditionStack.slice(0),
|
|
323
|
-
done: this.done
|
|
324
|
-
}, this.options.ranges && (C.yylloc.range = this.yylloc.range.slice(0))), x = h[0].match(/(?:\r\n?|\n).*/g), x && (this.yylineno += x.length), this.yylloc = {
|
|
325
|
-
first_line: this.yylloc.last_line,
|
|
326
|
-
last_line: this.yylineno + 1,
|
|
327
|
-
first_column: this.yylloc.last_column,
|
|
328
|
-
last_column: x ? x[x.length - 1].length - x[x.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
|
|
329
|
-
}, this.yytext += h[0], this.match += h[0], this.matches = h, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(h[0].length), this.matched += h[0], g = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), g)
|
|
330
|
-
return g;
|
|
331
|
-
if (this._backtrack) {
|
|
332
|
-
for (var r in C)
|
|
333
|
-
this[r] = C[r];
|
|
334
|
-
return !1;
|
|
335
|
-
}
|
|
336
|
-
return !1;
|
|
337
|
-
}, "test_match"),
|
|
338
|
-
// return next match in input
|
|
339
|
-
next: /* @__PURE__ */ n(function() {
|
|
340
|
-
if (this.done)
|
|
341
|
-
return this.EOF;
|
|
342
|
-
this._input || (this.done = !0);
|
|
343
|
-
var h, u, g, x;
|
|
344
|
-
this._more || (this.yytext = "", this.match = "");
|
|
345
|
-
for (var C = this._currentRules(), r = 0; r < C.length; r++)
|
|
346
|
-
if (g = this._input.match(this.rules[C[r]]), g && (!u || g[0].length > u[0].length)) {
|
|
347
|
-
if (u = g, x = r, this.options.backtrack_lexer) {
|
|
348
|
-
if (h = this.test_match(g, C[r]), h !== !1)
|
|
349
|
-
return h;
|
|
350
|
-
if (this._backtrack) {
|
|
351
|
-
u = !1;
|
|
352
|
-
continue;
|
|
353
|
-
} else
|
|
354
|
-
return !1;
|
|
355
|
-
} else if (!this.options.flex)
|
|
356
|
-
break;
|
|
357
|
-
}
|
|
358
|
-
return u ? (h = this.test_match(u, C[x]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
359
|
-
` + this.showPosition(), {
|
|
360
|
-
text: "",
|
|
361
|
-
token: null,
|
|
362
|
-
line: this.yylineno
|
|
363
|
-
});
|
|
364
|
-
}, "next"),
|
|
365
|
-
// return next match that has a token
|
|
366
|
-
lex: /* @__PURE__ */ n(function() {
|
|
367
|
-
var u = this.next();
|
|
368
|
-
return u || this.lex();
|
|
369
|
-
}, "lex"),
|
|
370
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
371
|
-
begin: /* @__PURE__ */ n(function(u) {
|
|
372
|
-
this.conditionStack.push(u);
|
|
373
|
-
}, "begin"),
|
|
374
|
-
// pop the previously active lexer condition state off the condition stack
|
|
375
|
-
popState: /* @__PURE__ */ n(function() {
|
|
376
|
-
var u = this.conditionStack.length - 1;
|
|
377
|
-
return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
378
|
-
}, "popState"),
|
|
379
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
380
|
-
_currentRules: /* @__PURE__ */ n(function() {
|
|
381
|
-
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
382
|
-
}, "_currentRules"),
|
|
383
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
384
|
-
topState: /* @__PURE__ */ n(function(u) {
|
|
385
|
-
return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
|
|
386
|
-
}, "topState"),
|
|
387
|
-
// alias for begin(condition)
|
|
388
|
-
pushState: /* @__PURE__ */ n(function(u) {
|
|
389
|
-
this.begin(u);
|
|
390
|
-
}, "pushState"),
|
|
391
|
-
// return the number of states currently on the stack
|
|
392
|
-
stateStackSize: /* @__PURE__ */ n(function() {
|
|
393
|
-
return this.conditionStack.length;
|
|
394
|
-
}, "stateStackSize"),
|
|
395
|
-
options: { "case-insensitive": !0 },
|
|
396
|
-
performAction: /* @__PURE__ */ n(function(u, g, x, C) {
|
|
397
|
-
switch (x) {
|
|
398
|
-
case 0:
|
|
399
|
-
break;
|
|
400
|
-
case 1:
|
|
401
|
-
break;
|
|
402
|
-
case 2:
|
|
403
|
-
return this.popState(), 36;
|
|
404
|
-
case 3:
|
|
405
|
-
return this.popState(), 36;
|
|
406
|
-
case 4:
|
|
407
|
-
return 36;
|
|
408
|
-
case 5:
|
|
409
|
-
break;
|
|
410
|
-
case 6:
|
|
411
|
-
return 10;
|
|
412
|
-
case 7:
|
|
413
|
-
return this.pushState("acc_title"), 19;
|
|
414
|
-
case 8:
|
|
415
|
-
return this.popState(), "acc_title_value";
|
|
416
|
-
case 9:
|
|
417
|
-
return this.pushState("acc_descr"), 21;
|
|
418
|
-
case 10:
|
|
419
|
-
return this.popState(), "acc_descr_value";
|
|
420
|
-
case 11:
|
|
421
|
-
this.pushState("acc_descr_multiline");
|
|
422
|
-
break;
|
|
423
|
-
case 12:
|
|
424
|
-
this.popState();
|
|
425
|
-
break;
|
|
426
|
-
case 13:
|
|
427
|
-
return "acc_descr_multiline_value";
|
|
428
|
-
case 14:
|
|
429
|
-
return 5;
|
|
430
|
-
case 15:
|
|
431
|
-
return 5;
|
|
432
|
-
case 16:
|
|
433
|
-
return 8;
|
|
434
|
-
case 17:
|
|
435
|
-
return this.pushState("axis_data"), "X_AXIS";
|
|
436
|
-
case 18:
|
|
437
|
-
return this.pushState("axis_data"), "Y_AXIS";
|
|
438
|
-
case 19:
|
|
439
|
-
return this.pushState("axis_band_data"), 24;
|
|
440
|
-
case 20:
|
|
441
|
-
return 33;
|
|
442
|
-
case 21:
|
|
443
|
-
return this.pushState("data"), 16;
|
|
444
|
-
case 22:
|
|
445
|
-
return this.pushState("data"), 18;
|
|
446
|
-
case 23:
|
|
447
|
-
return this.pushState("data_inner"), 24;
|
|
448
|
-
case 24:
|
|
449
|
-
return 29;
|
|
450
|
-
case 25:
|
|
451
|
-
return this.popState(), 26;
|
|
452
|
-
case 26:
|
|
453
|
-
this.popState();
|
|
454
|
-
break;
|
|
455
|
-
case 27:
|
|
456
|
-
this.pushState("string");
|
|
457
|
-
break;
|
|
458
|
-
case 28:
|
|
459
|
-
this.popState();
|
|
460
|
-
break;
|
|
461
|
-
case 29:
|
|
462
|
-
return "STR";
|
|
463
|
-
case 30:
|
|
464
|
-
return 24;
|
|
465
|
-
case 31:
|
|
466
|
-
return 26;
|
|
467
|
-
case 32:
|
|
468
|
-
return 44;
|
|
469
|
-
case 33:
|
|
470
|
-
return "COLON";
|
|
471
|
-
case 34:
|
|
472
|
-
return 45;
|
|
473
|
-
case 35:
|
|
474
|
-
return 28;
|
|
475
|
-
case 36:
|
|
476
|
-
return 46;
|
|
477
|
-
case 37:
|
|
478
|
-
return 47;
|
|
479
|
-
case 38:
|
|
480
|
-
return 49;
|
|
481
|
-
case 39:
|
|
482
|
-
return 51;
|
|
483
|
-
case 40:
|
|
484
|
-
return 48;
|
|
485
|
-
case 41:
|
|
486
|
-
return 42;
|
|
487
|
-
case 42:
|
|
488
|
-
return 50;
|
|
489
|
-
case 43:
|
|
490
|
-
return 43;
|
|
491
|
-
case 44:
|
|
492
|
-
break;
|
|
493
|
-
case 45:
|
|
494
|
-
return 37;
|
|
495
|
-
case 46:
|
|
496
|
-
return 38;
|
|
497
|
-
}
|
|
498
|
-
}, "anonymous"),
|
|
499
|
-
rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:(\r?\n))/i, /^(?:(\r?\n))/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:\})/i, /^(?:[^\}]*)/i, /^(?:xychart-beta\b)/i, /^(?:xychart\b)/i, /^(?:(?:vertical|horizontal))/i, /^(?:x-axis\b)/i, /^(?:y-axis\b)/i, /^(?:\[)/i, /^(?:-->)/i, /^(?:line\b)/i, /^(?:bar\b)/i, /^(?:\[)/i, /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i, /^(?:\])/i, /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s+)/i, /^(?:;)/i, /^(?:$)/i],
|
|
500
|
-
conditions: { data_inner: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, data: { rules: [0, 1, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 23, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, axis_band_data: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, axis_data: { rules: [0, 1, 2, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [], inclusive: !1 }, md_string: { rules: [], inclusive: !1 }, string: { rules: [28, 29], inclusive: !1 }, INITIAL: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 } }
|
|
501
|
-
};
|
|
502
|
-
return F;
|
|
503
|
-
})();
|
|
504
|
-
R.lexer = ot;
|
|
505
|
-
function q() {
|
|
506
|
-
this.yy = {};
|
|
507
|
-
}
|
|
508
|
-
return n(q, "Parser"), q.prototype = R, R.Parser = q, new q();
|
|
509
|
-
})();
|
|
510
|
-
Ct.parser = Ct;
|
|
511
|
-
var Di = Ct;
|
|
512
|
-
function St(e) {
|
|
513
|
-
return e.type === "bar";
|
|
514
|
-
}
|
|
515
|
-
n(St, "isBarPlot");
|
|
516
|
-
function ft(e) {
|
|
517
|
-
return e.type === "band";
|
|
518
|
-
}
|
|
519
|
-
n(ft, "isBandAxisData");
|
|
520
|
-
function j(e) {
|
|
521
|
-
return e.type === "linear";
|
|
522
|
-
}
|
|
523
|
-
n(j, "isLinearAxisData");
|
|
524
|
-
var Q, $t = (Q = class {
|
|
525
|
-
constructor(t) {
|
|
526
|
-
this.parentGroup = t;
|
|
527
|
-
}
|
|
528
|
-
getMaxDimension(t, i) {
|
|
529
|
-
if (!this.parentGroup)
|
|
530
|
-
return {
|
|
531
|
-
width: t.reduce((o, l) => Math.max(l.length, o), 0) * i,
|
|
532
|
-
height: i
|
|
533
|
-
};
|
|
534
|
-
const s = {
|
|
535
|
-
width: 0,
|
|
536
|
-
height: 0
|
|
537
|
-
}, a = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
|
|
538
|
-
for (const o of t) {
|
|
539
|
-
const l = Ri(a, 1, o), p = l ? l.width : o.length * i, d = l ? l.height : i;
|
|
540
|
-
s.width = Math.max(s.width, p), s.height = Math.max(s.height, d);
|
|
541
|
-
}
|
|
542
|
-
return a.remove(), s;
|
|
543
|
-
}
|
|
544
|
-
}, n(Q, "TextDimensionCalculatorWithFont"), Q), Ft = 0.7, Xt = 0.2, K, Ut = (K = class {
|
|
545
|
-
constructor(t, i, s, a) {
|
|
546
|
-
this.axisConfig = t, this.title = i, this.textDimensionCalculator = s, this.axisThemeConfig = a, this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left", this.showTitle = !1, this.showLabel = !1, this.showTick = !1, this.showAxisLine = !1, this.outerPadding = 0, this.titleTextHeight = 0, this.labelTextHeight = 0, this.normalizedLabelRotationInRad = 0, this.range = [0, 10], this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left", this.normalizedLabelRotationInRad = this.axisConfig.labelRotation >= -90 && this.axisConfig.labelRotation <= 90 ? this.axisConfig.labelRotation * Math.PI / 180 : 0;
|
|
547
|
-
}
|
|
548
|
-
setRange(t) {
|
|
549
|
-
this.range = t, this.axisPosition === "left" || this.axisPosition === "right" ? this.boundingRect.height = t[1] - t[0] : this.boundingRect.width = t[1] - t[0], this.recalculateScale();
|
|
550
|
-
}
|
|
551
|
-
getRange() {
|
|
552
|
-
return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
|
|
553
|
-
}
|
|
554
|
-
setAxisPosition(t) {
|
|
555
|
-
this.axisPosition = t, this.setRange(this.range);
|
|
556
|
-
}
|
|
557
|
-
getTickDistance() {
|
|
558
|
-
const t = this.getRange();
|
|
559
|
-
return Math.abs(t[0] - t[1]) / this.getTickValues().length;
|
|
560
|
-
}
|
|
561
|
-
getAxisOuterPadding() {
|
|
562
|
-
return this.outerPadding;
|
|
563
|
-
}
|
|
564
|
-
getLabelDimension() {
|
|
565
|
-
return this.textDimensionCalculator.getMaxDimension(
|
|
566
|
-
this.getTickValues().map((t) => t.toString()),
|
|
567
|
-
this.axisConfig.labelFontSize
|
|
568
|
-
);
|
|
569
|
-
}
|
|
570
|
-
recalculateOuterPaddingToDrawBar() {
|
|
571
|
-
Ft * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(Ft * this.getTickDistance() / 2)), this.recalculateScale();
|
|
572
|
-
}
|
|
573
|
-
calculateSpaceIfDrawnHorizontally(t) {
|
|
574
|
-
let i = t.height;
|
|
575
|
-
if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
|
|
576
|
-
const s = this.getLabelDimension(), a = Xt * t.width;
|
|
577
|
-
this.outerPadding = Math.min(s.width / 2, a);
|
|
578
|
-
let o = s.height;
|
|
579
|
-
this.axisPosition === "bottom" && this.normalizedLabelRotationInRad !== 0 && (o = Math.max(
|
|
580
|
-
o,
|
|
581
|
-
Math.abs(Math.sin(this.normalizedLabelRotationInRad) * s.width) + Math.abs(Math.cos(this.normalizedLabelRotationInRad) * s.height)
|
|
582
|
-
)), o += this.axisConfig.labelPadding * 2, this.labelTextHeight = s.height, o <= i && (i -= o, this.showLabel = !0);
|
|
583
|
-
}
|
|
584
|
-
if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
|
|
585
|
-
const s = this.textDimensionCalculator.getMaxDimension(
|
|
586
|
-
[this.title],
|
|
587
|
-
this.axisConfig.titleFontSize
|
|
588
|
-
), a = s.height + this.axisConfig.titlePadding * 2;
|
|
589
|
-
this.titleTextHeight = s.height, a <= i && (i -= a, this.showTitle = !0);
|
|
590
|
-
}
|
|
591
|
-
this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
|
|
592
|
-
}
|
|
593
|
-
calculateSpaceIfDrawnVertical(t) {
|
|
594
|
-
let i = t.width;
|
|
595
|
-
if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
|
|
596
|
-
const s = this.getLabelDimension(), a = Xt * t.height;
|
|
597
|
-
this.outerPadding = Math.min(s.height / 2, a);
|
|
598
|
-
const o = s.width + this.axisConfig.labelPadding * 2;
|
|
599
|
-
o <= i && (i -= o, this.showLabel = !0);
|
|
600
|
-
}
|
|
601
|
-
if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
|
|
602
|
-
const s = this.textDimensionCalculator.getMaxDimension(
|
|
603
|
-
[this.title],
|
|
604
|
-
this.axisConfig.titleFontSize
|
|
605
|
-
), a = s.height + this.axisConfig.titlePadding * 2;
|
|
606
|
-
this.titleTextHeight = s.height, a <= i && (i -= a, this.showTitle = !0);
|
|
607
|
-
}
|
|
608
|
-
this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
|
|
609
|
-
}
|
|
610
|
-
calculateSpace(t) {
|
|
611
|
-
return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
|
|
612
|
-
width: this.boundingRect.width,
|
|
613
|
-
height: this.boundingRect.height
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
setBoundingBoxXY(t) {
|
|
617
|
-
this.boundingRect.x = t.x, this.boundingRect.y = t.y;
|
|
618
|
-
}
|
|
619
|
-
calculateOffsetByRotation(t) {
|
|
620
|
-
const i = this.normalizedLabelRotationInRad;
|
|
621
|
-
return i === 0 ? 0 : Math.sin(i) * this.getLabelDimension()[t] / 2;
|
|
622
|
-
}
|
|
623
|
-
getDrawableElementsForLeftAxis() {
|
|
624
|
-
const t = [];
|
|
625
|
-
if (this.showAxisLine) {
|
|
626
|
-
const i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
|
|
627
|
-
t.push({
|
|
628
|
-
type: "path",
|
|
629
|
-
groupTexts: ["left-axis", "axisl-line"],
|
|
630
|
-
data: [
|
|
631
|
-
{
|
|
632
|
-
path: `M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y + this.boundingRect.height} `,
|
|
633
|
-
strokeFill: this.axisThemeConfig.axisLineColor,
|
|
634
|
-
strokeWidth: this.axisConfig.axisLineWidth
|
|
635
|
-
}
|
|
636
|
-
]
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
if (this.showLabel && t.push({
|
|
640
|
-
type: "text",
|
|
641
|
-
groupTexts: ["left-axis", "label"],
|
|
642
|
-
data: this.getTickValues().map((i) => ({
|
|
643
|
-
text: i.toString(),
|
|
644
|
-
x: this.boundingRect.x + this.boundingRect.width - (this.showLabel ? this.axisConfig.labelPadding : 0) - (this.showTick ? this.axisConfig.tickLength : 0) - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
|
|
645
|
-
y: this.getScaleValue(i),
|
|
646
|
-
fill: this.axisThemeConfig.labelColor,
|
|
647
|
-
fontSize: this.axisConfig.labelFontSize,
|
|
648
|
-
rotation: 0,
|
|
649
|
-
verticalPos: "middle",
|
|
650
|
-
horizontalPos: "right"
|
|
651
|
-
}))
|
|
652
|
-
}), this.showTick) {
|
|
653
|
-
const i = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
|
|
654
|
-
t.push({
|
|
655
|
-
type: "path",
|
|
656
|
-
groupTexts: ["left-axis", "ticks"],
|
|
657
|
-
data: this.getTickValues().map((s) => ({
|
|
658
|
-
path: `M ${i},${this.getScaleValue(s)} L ${i - this.axisConfig.tickLength},${this.getScaleValue(s)}`,
|
|
659
|
-
strokeFill: this.axisThemeConfig.tickColor,
|
|
660
|
-
strokeWidth: this.axisConfig.tickWidth
|
|
661
|
-
}))
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
return this.showTitle && t.push({
|
|
665
|
-
type: "text",
|
|
666
|
-
groupTexts: ["left-axis", "title"],
|
|
667
|
-
data: [
|
|
668
|
-
{
|
|
669
|
-
text: this.title,
|
|
670
|
-
x: this.boundingRect.x + this.axisConfig.titlePadding,
|
|
671
|
-
y: this.boundingRect.y + this.boundingRect.height / 2,
|
|
672
|
-
fill: this.axisThemeConfig.titleColor,
|
|
673
|
-
fontSize: this.axisConfig.titleFontSize,
|
|
674
|
-
rotation: 270,
|
|
675
|
-
verticalPos: "top",
|
|
676
|
-
horizontalPos: "center"
|
|
677
|
-
}
|
|
678
|
-
]
|
|
679
|
-
}), t;
|
|
680
|
-
}
|
|
681
|
-
getDrawableElementsForBottomAxis() {
|
|
682
|
-
const t = [];
|
|
683
|
-
if (this.showAxisLine) {
|
|
684
|
-
const i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
|
|
685
|
-
t.push({
|
|
686
|
-
type: "path",
|
|
687
|
-
groupTexts: ["bottom-axis", "axis-line"],
|
|
688
|
-
data: [
|
|
689
|
-
{
|
|
690
|
-
path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
|
|
691
|
-
strokeFill: this.axisThemeConfig.axisLineColor,
|
|
692
|
-
strokeWidth: this.axisConfig.axisLineWidth
|
|
693
|
-
}
|
|
694
|
-
]
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
if (this.showLabel && t.push({
|
|
698
|
-
type: "text",
|
|
699
|
-
groupTexts: ["bottom-axis", "label"],
|
|
700
|
-
data: this.getTickValues().map((i) => ({
|
|
701
|
-
text: i.toString(),
|
|
702
|
-
x: this.getScaleValue(i) + this.calculateOffsetByRotation("height"),
|
|
703
|
-
y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0) + Math.abs(this.calculateOffsetByRotation("width")),
|
|
704
|
-
fill: this.axisThemeConfig.labelColor,
|
|
705
|
-
fontSize: this.axisConfig.labelFontSize,
|
|
706
|
-
rotation: this.normalizedLabelRotationInRad * 180 / Math.PI,
|
|
707
|
-
verticalPos: "top",
|
|
708
|
-
horizontalPos: "center"
|
|
709
|
-
}))
|
|
710
|
-
}), this.showTick) {
|
|
711
|
-
const i = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
|
|
712
|
-
t.push({
|
|
713
|
-
type: "path",
|
|
714
|
-
groupTexts: ["bottom-axis", "ticks"],
|
|
715
|
-
data: this.getTickValues().map((s) => ({
|
|
716
|
-
path: `M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i + this.axisConfig.tickLength}`,
|
|
717
|
-
strokeFill: this.axisThemeConfig.tickColor,
|
|
718
|
-
strokeWidth: this.axisConfig.tickWidth
|
|
719
|
-
}))
|
|
720
|
-
});
|
|
721
|
-
}
|
|
722
|
-
return this.showTitle && t.push({
|
|
723
|
-
type: "text",
|
|
724
|
-
groupTexts: ["bottom-axis", "title"],
|
|
725
|
-
data: [
|
|
726
|
-
{
|
|
727
|
-
text: this.title,
|
|
728
|
-
x: this.range[0] + (this.range[1] - this.range[0]) / 2,
|
|
729
|
-
y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
|
|
730
|
-
fill: this.axisThemeConfig.titleColor,
|
|
731
|
-
fontSize: this.axisConfig.titleFontSize,
|
|
732
|
-
rotation: 0,
|
|
733
|
-
verticalPos: "top",
|
|
734
|
-
horizontalPos: "center"
|
|
735
|
-
}
|
|
736
|
-
]
|
|
737
|
-
}), t;
|
|
738
|
-
}
|
|
739
|
-
getDrawableElementsForTopAxis() {
|
|
740
|
-
const t = [];
|
|
741
|
-
if (this.showAxisLine) {
|
|
742
|
-
const i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
|
|
743
|
-
t.push({
|
|
744
|
-
type: "path",
|
|
745
|
-
groupTexts: ["top-axis", "axis-line"],
|
|
746
|
-
data: [
|
|
747
|
-
{
|
|
748
|
-
path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
|
|
749
|
-
strokeFill: this.axisThemeConfig.axisLineColor,
|
|
750
|
-
strokeWidth: this.axisConfig.axisLineWidth
|
|
751
|
-
}
|
|
752
|
-
]
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
if (this.showLabel && t.push({
|
|
756
|
-
type: "text",
|
|
757
|
-
groupTexts: ["top-axis", "label"],
|
|
758
|
-
data: this.getTickValues().map((i) => ({
|
|
759
|
-
text: i.toString(),
|
|
760
|
-
x: this.getScaleValue(i),
|
|
761
|
-
y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
|
|
762
|
-
fill: this.axisThemeConfig.labelColor,
|
|
763
|
-
fontSize: this.axisConfig.labelFontSize,
|
|
764
|
-
rotation: 0,
|
|
765
|
-
verticalPos: "top",
|
|
766
|
-
horizontalPos: "center"
|
|
767
|
-
}))
|
|
768
|
-
}), this.showTick) {
|
|
769
|
-
const i = this.boundingRect.y;
|
|
770
|
-
t.push({
|
|
771
|
-
type: "path",
|
|
772
|
-
groupTexts: ["top-axis", "ticks"],
|
|
773
|
-
data: this.getTickValues().map((s) => ({
|
|
774
|
-
path: `M ${this.getScaleValue(s)},${i + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(s)},${i + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
|
|
775
|
-
strokeFill: this.axisThemeConfig.tickColor,
|
|
776
|
-
strokeWidth: this.axisConfig.tickWidth
|
|
777
|
-
}))
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
return this.showTitle && t.push({
|
|
781
|
-
type: "text",
|
|
782
|
-
groupTexts: ["top-axis", "title"],
|
|
783
|
-
data: [
|
|
784
|
-
{
|
|
785
|
-
text: this.title,
|
|
786
|
-
x: this.boundingRect.x + this.boundingRect.width / 2,
|
|
787
|
-
y: this.boundingRect.y + this.axisConfig.titlePadding,
|
|
788
|
-
fill: this.axisThemeConfig.titleColor,
|
|
789
|
-
fontSize: this.axisConfig.titleFontSize,
|
|
790
|
-
rotation: 0,
|
|
791
|
-
verticalPos: "top",
|
|
792
|
-
horizontalPos: "center"
|
|
793
|
-
}
|
|
794
|
-
]
|
|
795
|
-
}), t;
|
|
796
|
-
}
|
|
797
|
-
getDrawableElements() {
|
|
798
|
-
if (this.axisPosition === "left")
|
|
799
|
-
return this.getDrawableElementsForLeftAxis();
|
|
800
|
-
if (this.axisPosition === "right")
|
|
801
|
-
throw Error("Drawing of right axis is not implemented");
|
|
802
|
-
return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
|
|
803
|
-
}
|
|
804
|
-
}, n(K, "BaseAxis"), K), Z, vi = (Z = class extends Ut {
|
|
805
|
-
constructor(t, i, s, a, o) {
|
|
806
|
-
super(t, a, o, i), this.categories = s, this.scale = wt().domain(this.categories).range(this.getRange());
|
|
807
|
-
}
|
|
808
|
-
setRange(t) {
|
|
809
|
-
super.setRange(t);
|
|
810
|
-
}
|
|
811
|
-
recalculateScale() {
|
|
812
|
-
this.scale = wt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), Nt.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
|
|
813
|
-
}
|
|
814
|
-
getTickValues() {
|
|
815
|
-
return this.categories;
|
|
816
|
-
}
|
|
817
|
-
getScaleValue(t) {
|
|
818
|
-
return this.scale(t) ?? this.getRange()[0];
|
|
819
|
-
}
|
|
820
|
-
}, n(Z, "BandAxis"), Z), J, Li = (J = class extends Ut {
|
|
821
|
-
constructor(t, i, s, a, o) {
|
|
822
|
-
super(t, a, o, i), this.domain = s, this.scale = Wt().domain(this.domain).range(this.getRange());
|
|
823
|
-
}
|
|
824
|
-
getTickValues() {
|
|
825
|
-
return this.scale.ticks();
|
|
826
|
-
}
|
|
827
|
-
recalculateScale() {
|
|
828
|
-
const t = [...this.domain];
|
|
829
|
-
this.axisPosition === "left" && t.reverse(), this.scale = Wt().domain(t).range(this.getRange());
|
|
830
|
-
}
|
|
831
|
-
getScaleValue(t) {
|
|
832
|
-
return this.scale(t);
|
|
833
|
-
}
|
|
834
|
-
}, n(J, "LinearAxis"), J);
|
|
835
|
-
function Rt(e, t, i, s) {
|
|
836
|
-
const a = new $t(s);
|
|
837
|
-
return ft(e) ? new vi(
|
|
838
|
-
t,
|
|
839
|
-
i,
|
|
840
|
-
e.categories,
|
|
841
|
-
e.title,
|
|
842
|
-
a
|
|
843
|
-
) : new Li(
|
|
844
|
-
t,
|
|
845
|
-
i,
|
|
846
|
-
[e.min, e.max],
|
|
847
|
-
e.title,
|
|
848
|
-
a
|
|
849
|
-
);
|
|
850
|
-
}
|
|
851
|
-
n(Rt, "getAxis");
|
|
852
|
-
var tt, Pi = (tt = class {
|
|
853
|
-
constructor(t, i, s, a) {
|
|
854
|
-
this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = a, this.boundingRect = {
|
|
855
|
-
x: 0,
|
|
856
|
-
y: 0,
|
|
857
|
-
width: 0,
|
|
858
|
-
height: 0
|
|
859
|
-
}, this.showChartTitle = !1;
|
|
860
|
-
}
|
|
861
|
-
setBoundingBoxXY(t) {
|
|
862
|
-
this.boundingRect.x = t.x, this.boundingRect.y = t.y;
|
|
863
|
-
}
|
|
864
|
-
calculateSpace(t) {
|
|
865
|
-
const i = this.textDimensionCalculator.getMaxDimension(
|
|
866
|
-
[this.chartData.title],
|
|
867
|
-
this.chartConfig.titleFontSize
|
|
868
|
-
), s = Math.max(i.width, t.width), a = i.height + 2 * this.chartConfig.titlePadding;
|
|
869
|
-
return i.width <= s && i.height <= a && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = s, this.boundingRect.height = a, this.showChartTitle = !0), {
|
|
870
|
-
width: this.boundingRect.width,
|
|
871
|
-
height: this.boundingRect.height
|
|
872
|
-
};
|
|
873
|
-
}
|
|
874
|
-
getDrawableElements() {
|
|
875
|
-
const t = [];
|
|
876
|
-
return this.showChartTitle && t.push({
|
|
877
|
-
groupTexts: ["chart-title"],
|
|
878
|
-
type: "text",
|
|
879
|
-
data: [
|
|
880
|
-
{
|
|
881
|
-
fontSize: this.chartConfig.titleFontSize,
|
|
882
|
-
text: this.chartData.title,
|
|
883
|
-
verticalPos: "middle",
|
|
884
|
-
horizontalPos: "center",
|
|
885
|
-
x: this.boundingRect.x + this.boundingRect.width / 2,
|
|
886
|
-
y: this.boundingRect.y + this.boundingRect.height / 2,
|
|
887
|
-
fill: this.chartThemeConfig.titleColor,
|
|
888
|
-
rotation: 0
|
|
889
|
-
}
|
|
890
|
-
]
|
|
891
|
-
}), t;
|
|
892
|
-
}
|
|
893
|
-
}, n(tt, "ChartTitle"), tt);
|
|
894
|
-
function qt(e, t, i, s) {
|
|
895
|
-
const a = new $t(s);
|
|
896
|
-
return new Pi(a, e, t, i);
|
|
897
|
-
}
|
|
898
|
-
n(qt, "getChartTitleComponent");
|
|
899
|
-
var it, Ei = (it = class {
|
|
900
|
-
constructor(t, i, s, a, o) {
|
|
901
|
-
this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = a, this.plotIndex = o;
|
|
902
|
-
}
|
|
903
|
-
getDrawableElement() {
|
|
904
|
-
const t = this.plotData.data.map((a) => [
|
|
905
|
-
this.xAxis.getScaleValue(a[0]),
|
|
906
|
-
this.yAxis.getScaleValue(a[1])
|
|
907
|
-
]);
|
|
908
|
-
let i;
|
|
909
|
-
if (this.orientation === "horizontal" ? i = Ot().y((a) => a[0]).x((a) => a[1])(t) : i = Ot().x((a) => a[0]).y((a) => a[1])(t), !i)
|
|
910
|
-
return [];
|
|
911
|
-
const s = [
|
|
912
|
-
{
|
|
913
|
-
groupTexts: ["plot", `line-plot-${this.plotIndex}`],
|
|
914
|
-
type: "path",
|
|
915
|
-
data: [
|
|
916
|
-
{
|
|
917
|
-
path: i,
|
|
918
|
-
strokeFill: this.plotData.strokeFill,
|
|
919
|
-
strokeWidth: this.plotData.strokeWidth
|
|
920
|
-
}
|
|
921
|
-
]
|
|
922
|
-
}
|
|
923
|
-
];
|
|
924
|
-
if (this.plotData.pointLabels && this.plotData.pointLabels.length > 0) {
|
|
925
|
-
const l = [];
|
|
926
|
-
for (const [p, [d, k]] of t.entries()) {
|
|
927
|
-
const T = this.plotData.pointLabels[p];
|
|
928
|
-
T && (this.orientation === "horizontal" ? l.push({
|
|
929
|
-
x: k + 10,
|
|
930
|
-
y: d,
|
|
931
|
-
text: T,
|
|
932
|
-
fill: this.plotData.strokeFill,
|
|
933
|
-
verticalPos: "middle",
|
|
934
|
-
horizontalPos: "left",
|
|
935
|
-
fontSize: 12,
|
|
936
|
-
rotation: 0
|
|
937
|
-
}) : l.push({
|
|
938
|
-
x: d,
|
|
939
|
-
y: k - 10,
|
|
940
|
-
text: T,
|
|
941
|
-
fill: this.plotData.strokeFill,
|
|
942
|
-
verticalPos: "middle",
|
|
943
|
-
horizontalPos: "center",
|
|
944
|
-
fontSize: 12,
|
|
945
|
-
rotation: 0
|
|
946
|
-
}));
|
|
947
|
-
}
|
|
948
|
-
l.length > 0 && s.push({
|
|
949
|
-
groupTexts: ["plot", `line-plot-${this.plotIndex}`, "labels"],
|
|
950
|
-
type: "text",
|
|
951
|
-
data: l
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
return s;
|
|
955
|
-
}
|
|
956
|
-
}, n(it, "LinePlot"), it), et, Ii = (et = class {
|
|
957
|
-
constructor(t, i, s, a, o, l) {
|
|
958
|
-
this.barData = t, this.boundingRect = i, this.xAxis = s, this.yAxis = a, this.orientation = o, this.plotIndex = l;
|
|
959
|
-
}
|
|
960
|
-
getDrawableElement() {
|
|
961
|
-
const t = this.barData.data.map((o) => [
|
|
962
|
-
this.xAxis.getScaleValue(o[0]),
|
|
963
|
-
this.yAxis.getScaleValue(o[1])
|
|
964
|
-
]), s = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - 0.05), a = s / 2;
|
|
965
|
-
return this.orientation === "horizontal" ? [
|
|
966
|
-
{
|
|
967
|
-
groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
|
|
968
|
-
type: "rect",
|
|
969
|
-
data: t.map((o) => ({
|
|
970
|
-
x: this.boundingRect.x,
|
|
971
|
-
y: o[0] - a,
|
|
972
|
-
height: s,
|
|
973
|
-
width: o[1] - this.boundingRect.x,
|
|
974
|
-
fill: this.barData.fill,
|
|
975
|
-
strokeWidth: 0,
|
|
976
|
-
strokeFill: this.barData.fill
|
|
977
|
-
}))
|
|
978
|
-
}
|
|
979
|
-
] : [
|
|
980
|
-
{
|
|
981
|
-
groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
|
|
982
|
-
type: "rect",
|
|
983
|
-
data: t.map((o) => ({
|
|
984
|
-
x: o[0] - a,
|
|
985
|
-
y: o[1],
|
|
986
|
-
width: s,
|
|
987
|
-
height: this.boundingRect.y + this.boundingRect.height - o[1],
|
|
988
|
-
fill: this.barData.fill,
|
|
989
|
-
strokeWidth: 0,
|
|
990
|
-
strokeFill: this.barData.fill
|
|
991
|
-
}))
|
|
992
|
-
}
|
|
993
|
-
];
|
|
994
|
-
}
|
|
995
|
-
}, n(et, "BarPlot"), et), st, Mi = (st = class {
|
|
996
|
-
constructor(t, i, s) {
|
|
997
|
-
this.chartConfig = t, this.chartData = i, this.chartThemeConfig = s, this.boundingRect = {
|
|
998
|
-
x: 0,
|
|
999
|
-
y: 0,
|
|
1000
|
-
width: 0,
|
|
1001
|
-
height: 0
|
|
1002
|
-
};
|
|
1003
|
-
}
|
|
1004
|
-
setAxes(t, i) {
|
|
1005
|
-
this.xAxis = t, this.yAxis = i;
|
|
1006
|
-
}
|
|
1007
|
-
setBoundingBoxXY(t) {
|
|
1008
|
-
this.boundingRect.x = t.x, this.boundingRect.y = t.y;
|
|
1009
|
-
}
|
|
1010
|
-
calculateSpace(t) {
|
|
1011
|
-
return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
|
|
1012
|
-
width: this.boundingRect.width,
|
|
1013
|
-
height: this.boundingRect.height
|
|
1014
|
-
};
|
|
1015
|
-
}
|
|
1016
|
-
getDrawableElements() {
|
|
1017
|
-
if (!(this.xAxis && this.yAxis))
|
|
1018
|
-
throw Error("Axes must be passed to render Plots");
|
|
1019
|
-
const t = [];
|
|
1020
|
-
for (const [i, s] of this.chartData.plots.entries())
|
|
1021
|
-
switch (s.type) {
|
|
1022
|
-
case "line":
|
|
1023
|
-
{
|
|
1024
|
-
const a = new Ei(
|
|
1025
|
-
s,
|
|
1026
|
-
this.xAxis,
|
|
1027
|
-
this.yAxis,
|
|
1028
|
-
this.chartConfig.chartOrientation,
|
|
1029
|
-
i
|
|
1030
|
-
);
|
|
1031
|
-
t.push(...a.getDrawableElement());
|
|
1032
|
-
}
|
|
1033
|
-
break;
|
|
1034
|
-
case "bar":
|
|
1035
|
-
{
|
|
1036
|
-
const a = new Ii(
|
|
1037
|
-
s,
|
|
1038
|
-
this.boundingRect,
|
|
1039
|
-
this.xAxis,
|
|
1040
|
-
this.yAxis,
|
|
1041
|
-
this.chartConfig.chartOrientation,
|
|
1042
|
-
i
|
|
1043
|
-
);
|
|
1044
|
-
t.push(...a.getDrawableElement());
|
|
1045
|
-
}
|
|
1046
|
-
break;
|
|
1047
|
-
}
|
|
1048
|
-
return t;
|
|
1049
|
-
}
|
|
1050
|
-
}, n(st, "BasePlot"), st);
|
|
1051
|
-
function Gt(e, t, i) {
|
|
1052
|
-
return new Mi(e, t, i);
|
|
1053
|
-
}
|
|
1054
|
-
n(Gt, "getPlotComponent");
|
|
1055
|
-
var at, zi = (at = class {
|
|
1056
|
-
constructor(t, i, s, a) {
|
|
1057
|
-
this.chartConfig = t, this.chartData = i, this.componentStore = {
|
|
1058
|
-
title: qt(t, i, s, a),
|
|
1059
|
-
plot: Gt(t, i, s),
|
|
1060
|
-
xAxis: Rt(
|
|
1061
|
-
i.xAxis,
|
|
1062
|
-
t.xAxis,
|
|
1063
|
-
{
|
|
1064
|
-
titleColor: s.xAxisTitleColor,
|
|
1065
|
-
labelColor: s.xAxisLabelColor,
|
|
1066
|
-
tickColor: s.xAxisTickColor,
|
|
1067
|
-
axisLineColor: s.xAxisLineColor
|
|
1068
|
-
},
|
|
1069
|
-
a
|
|
1070
|
-
),
|
|
1071
|
-
yAxis: Rt(
|
|
1072
|
-
i.yAxis,
|
|
1073
|
-
t.yAxis,
|
|
1074
|
-
{
|
|
1075
|
-
titleColor: s.yAxisTitleColor,
|
|
1076
|
-
labelColor: s.yAxisLabelColor,
|
|
1077
|
-
tickColor: s.yAxisTickColor,
|
|
1078
|
-
axisLineColor: s.yAxisLineColor
|
|
1079
|
-
},
|
|
1080
|
-
a
|
|
1081
|
-
)
|
|
1082
|
-
};
|
|
1083
|
-
}
|
|
1084
|
-
calculateVerticalSpace() {
|
|
1085
|
-
let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, a = 0, o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), l = Math.floor(
|
|
1086
|
-
i * this.chartConfig.plotReservedSpacePercent / 100
|
|
1087
|
-
), p = this.componentStore.plot.calculateSpace({
|
|
1088
|
-
width: o,
|
|
1089
|
-
height: l
|
|
1090
|
-
});
|
|
1091
|
-
t -= p.width, i -= p.height, p = this.componentStore.title.calculateSpace({
|
|
1092
|
-
width: this.chartConfig.width,
|
|
1093
|
-
height: i
|
|
1094
|
-
}), a = p.height, i -= p.height, this.componentStore.xAxis.setAxisPosition("bottom"), p = this.componentStore.xAxis.calculateSpace({
|
|
1095
|
-
width: t,
|
|
1096
|
-
height: i
|
|
1097
|
-
}), i -= p.height, this.componentStore.yAxis.setAxisPosition("left"), p = this.componentStore.yAxis.calculateSpace({
|
|
1098
|
-
width: t,
|
|
1099
|
-
height: i
|
|
1100
|
-
}), s = p.width, t -= p.width, t > 0 && (o += t, t = 0), i > 0 && (l += i, i = 0), this.componentStore.plot.calculateSpace({
|
|
1101
|
-
width: o,
|
|
1102
|
-
height: l
|
|
1103
|
-
}), this.componentStore.plot.setBoundingBoxXY({ x: s, y: a }), this.componentStore.xAxis.setRange([s, s + o]), this.componentStore.xAxis.setBoundingBoxXY({ x: s, y: a + l }), this.componentStore.yAxis.setRange([a, a + l]), this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: a }), this.chartData.plots.some((d) => St(d)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
|
|
1104
|
-
}
|
|
1105
|
-
calculateHorizontalSpace() {
|
|
1106
|
-
let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, a = 0, o = 0, l = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), p = Math.floor(
|
|
1107
|
-
i * this.chartConfig.plotReservedSpacePercent / 100
|
|
1108
|
-
), d = this.componentStore.plot.calculateSpace({
|
|
1109
|
-
width: l,
|
|
1110
|
-
height: p
|
|
1111
|
-
});
|
|
1112
|
-
t -= d.width, i -= d.height, d = this.componentStore.title.calculateSpace({
|
|
1113
|
-
width: this.chartConfig.width,
|
|
1114
|
-
height: i
|
|
1115
|
-
}), s = d.height, i -= d.height, this.componentStore.xAxis.setAxisPosition("left"), d = this.componentStore.xAxis.calculateSpace({
|
|
1116
|
-
width: t,
|
|
1117
|
-
height: i
|
|
1118
|
-
}), t -= d.width, a = d.width, this.componentStore.yAxis.setAxisPosition("top"), d = this.componentStore.yAxis.calculateSpace({
|
|
1119
|
-
width: t,
|
|
1120
|
-
height: i
|
|
1121
|
-
}), i -= d.height, o = s + d.height, t > 0 && (l += t, t = 0), i > 0 && (p += i, i = 0), this.componentStore.plot.calculateSpace({
|
|
1122
|
-
width: l,
|
|
1123
|
-
height: p
|
|
1124
|
-
}), this.componentStore.plot.setBoundingBoxXY({ x: a, y: o }), this.componentStore.yAxis.setRange([a, a + l]), this.componentStore.yAxis.setBoundingBoxXY({ x: a, y: s }), this.componentStore.xAxis.setRange([o, o + p]), this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: o }), this.chartData.plots.some((k) => St(k)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
|
|
1125
|
-
}
|
|
1126
|
-
calculateSpace() {
|
|
1127
|
-
this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
|
|
1128
|
-
}
|
|
1129
|
-
getDrawableElement() {
|
|
1130
|
-
this.calculateSpace();
|
|
1131
|
-
const t = [];
|
|
1132
|
-
this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
|
|
1133
|
-
for (const i of Object.values(this.componentStore))
|
|
1134
|
-
t.push(...i.getDrawableElements());
|
|
1135
|
-
return t;
|
|
1136
|
-
}
|
|
1137
|
-
}, n(at, "Orchestrator"), at), nt, Bi = (nt = class {
|
|
1138
|
-
static build(t, i, s, a) {
|
|
1139
|
-
return new zi(t, i, s, a).getDrawableElement();
|
|
1140
|
-
}
|
|
1141
|
-
}, n(nt, "XYChartBuilder"), nt), ht = 0, jt, lt = vt(), ct = Dt(), y = Lt(), _t = ct.plotColorPalette.split(",").map((e) => e.trim()), pt = !1, Tt = !1;
|
|
1142
|
-
function Dt() {
|
|
1143
|
-
const e = Si(), t = kt();
|
|
1144
|
-
return Ht(e.xyChart, t.themeVariables.xyChart);
|
|
1145
|
-
}
|
|
1146
|
-
n(Dt, "getChartDefaultThemeConfig");
|
|
1147
|
-
function vt() {
|
|
1148
|
-
const e = kt();
|
|
1149
|
-
return Ht(
|
|
1150
|
-
Ci.xyChart,
|
|
1151
|
-
e.xyChart
|
|
1152
|
-
);
|
|
1153
|
-
}
|
|
1154
|
-
n(vt, "getChartDefaultConfig");
|
|
1155
|
-
function Lt() {
|
|
1156
|
-
return {
|
|
1157
|
-
yAxis: {
|
|
1158
|
-
type: "linear",
|
|
1159
|
-
title: "",
|
|
1160
|
-
min: 1 / 0,
|
|
1161
|
-
max: -1 / 0
|
|
1162
|
-
},
|
|
1163
|
-
xAxis: {
|
|
1164
|
-
type: "band",
|
|
1165
|
-
title: "",
|
|
1166
|
-
categories: []
|
|
1167
|
-
},
|
|
1168
|
-
title: "",
|
|
1169
|
-
plots: []
|
|
1170
|
-
};
|
|
1171
|
-
}
|
|
1172
|
-
n(Lt, "getChartDefaultData");
|
|
1173
|
-
function ut(e) {
|
|
1174
|
-
const t = kt();
|
|
1175
|
-
return wi(e.trim(), t);
|
|
1176
|
-
}
|
|
1177
|
-
n(ut, "textSanitizer");
|
|
1178
|
-
function Qt(e) {
|
|
1179
|
-
jt = e;
|
|
1180
|
-
}
|
|
1181
|
-
n(Qt, "setTmpSVGG");
|
|
1182
|
-
function Kt(e) {
|
|
1183
|
-
e === "horizontal" ? lt.chartOrientation = "horizontal" : lt.chartOrientation = "vertical";
|
|
1184
|
-
}
|
|
1185
|
-
n(Kt, "setOrientation");
|
|
1186
|
-
function Zt(e) {
|
|
1187
|
-
y.xAxis.title = ut(e.text);
|
|
1188
|
-
}
|
|
1189
|
-
n(Zt, "setXAxisTitle");
|
|
1190
|
-
function Pt(e, t) {
|
|
1191
|
-
y.xAxis = { type: "linear", title: y.xAxis.title, min: e, max: t }, pt = !0;
|
|
1192
|
-
}
|
|
1193
|
-
n(Pt, "setXAxisRangeData");
|
|
1194
|
-
function Jt(e) {
|
|
1195
|
-
y.xAxis = {
|
|
1196
|
-
type: "band",
|
|
1197
|
-
title: y.xAxis.title,
|
|
1198
|
-
categories: e.map((t) => ut(t.text))
|
|
1199
|
-
}, pt = !0;
|
|
1200
|
-
}
|
|
1201
|
-
n(Jt, "setXAxisBand");
|
|
1202
|
-
function ti(e) {
|
|
1203
|
-
y.yAxis.title = ut(e.text);
|
|
1204
|
-
}
|
|
1205
|
-
n(ti, "setYAxisTitle");
|
|
1206
|
-
function ii(e, t) {
|
|
1207
|
-
y.yAxis = { type: "linear", title: y.yAxis.title, min: e, max: t }, Tt = !0;
|
|
1208
|
-
}
|
|
1209
|
-
n(ii, "setYAxisRangeData");
|
|
1210
|
-
function ei(e) {
|
|
1211
|
-
const t = Math.min(...e), i = Math.max(...e), s = j(y.yAxis) ? y.yAxis.min : 1 / 0, a = j(y.yAxis) ? y.yAxis.max : -1 / 0;
|
|
1212
|
-
y.yAxis = {
|
|
1213
|
-
type: "linear",
|
|
1214
|
-
title: y.yAxis.title,
|
|
1215
|
-
min: Math.min(s, t),
|
|
1216
|
-
max: Math.max(a, i)
|
|
1217
|
-
};
|
|
1218
|
-
}
|
|
1219
|
-
n(ei, "setYAxisRangeFromPlotData");
|
|
1220
|
-
function Et(e) {
|
|
1221
|
-
let t = [];
|
|
1222
|
-
if (e.length === 0)
|
|
1223
|
-
return t;
|
|
1224
|
-
if (!pt) {
|
|
1225
|
-
const i = j(y.xAxis) ? y.xAxis.min : 1 / 0, s = j(y.xAxis) ? y.xAxis.max : -1 / 0;
|
|
1226
|
-
Pt(Math.min(i, 1), Math.max(s, e.length));
|
|
1227
|
-
}
|
|
1228
|
-
if (ft(y.xAxis) && e.length > y.xAxis.categories.length && (e = e.slice(0, y.xAxis.categories.length)), Tt || ei(e), ft(y.xAxis) && (t = y.xAxis.categories.map((i, s) => [i, e[s]])), j(y.xAxis)) {
|
|
1229
|
-
const i = y.xAxis.min, s = y.xAxis.max;
|
|
1230
|
-
if (e.length === 1)
|
|
1231
|
-
t = [[`${i}`, e[0]]];
|
|
1232
|
-
else {
|
|
1233
|
-
const a = (s - i) / (e.length - 1);
|
|
1234
|
-
t = e.map((o, l) => [`${i + l * a}`, o]);
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
return t;
|
|
1238
|
-
}
|
|
1239
|
-
n(Et, "transformDataWithoutCategory");
|
|
1240
|
-
function It(e) {
|
|
1241
|
-
return _t[e === 0 ? 0 : e % _t.length];
|
|
1242
|
-
}
|
|
1243
|
-
n(It, "getPlotColorFromPalette");
|
|
1244
|
-
function si(e, t) {
|
|
1245
|
-
const i = t.map((l) => l.value), s = t.map((l) => l.label ? ut(l.label) : ""), a = Et(i), o = s.some((l) => l !== "");
|
|
1246
|
-
y.plots.push({
|
|
1247
|
-
type: "line",
|
|
1248
|
-
strokeFill: It(ht),
|
|
1249
|
-
strokeWidth: 2,
|
|
1250
|
-
data: a,
|
|
1251
|
-
...o ? { pointLabels: s } : {}
|
|
1252
|
-
}), ht++;
|
|
1253
|
-
}
|
|
1254
|
-
n(si, "setLineData");
|
|
1255
|
-
function ai(e, t) {
|
|
1256
|
-
const i = t.map((a) => a.value), s = Et(i);
|
|
1257
|
-
y.plots.push({
|
|
1258
|
-
type: "bar",
|
|
1259
|
-
fill: It(ht),
|
|
1260
|
-
data: s
|
|
1261
|
-
}), ht++;
|
|
1262
|
-
}
|
|
1263
|
-
n(ai, "setBarData");
|
|
1264
|
-
function ni() {
|
|
1265
|
-
if (y.plots.length === 0)
|
|
1266
|
-
throw Error("No Plot to render, please provide a plot with some data");
|
|
1267
|
-
return y.title = Yt(), Bi.build(lt, y, ct, jt);
|
|
1268
|
-
}
|
|
1269
|
-
n(ni, "getDrawableElem");
|
|
1270
|
-
function oi() {
|
|
1271
|
-
return ct;
|
|
1272
|
-
}
|
|
1273
|
-
n(oi, "getChartThemeConfig");
|
|
1274
|
-
function ri() {
|
|
1275
|
-
return lt;
|
|
1276
|
-
}
|
|
1277
|
-
n(ri, "getChartConfig");
|
|
1278
|
-
function hi() {
|
|
1279
|
-
return y;
|
|
1280
|
-
}
|
|
1281
|
-
n(hi, "getXYChartData");
|
|
1282
|
-
var Vi = /* @__PURE__ */ n(function() {
|
|
1283
|
-
Ai(), ht = 0, lt = vt(), y = Lt(), ct = Dt(), _t = ct.plotColorPalette.split(",").map((e) => e.trim()), pt = !1, Tt = !1;
|
|
1284
|
-
}, "clear"), Oi = {
|
|
1285
|
-
getDrawableElem: ni,
|
|
1286
|
-
clear: Vi,
|
|
1287
|
-
setAccTitle: mi,
|
|
1288
|
-
getAccTitle: pi,
|
|
1289
|
-
setDiagramTitle: fi,
|
|
1290
|
-
getDiagramTitle: Yt,
|
|
1291
|
-
getAccDescription: di,
|
|
1292
|
-
setAccDescription: xi,
|
|
1293
|
-
setOrientation: Kt,
|
|
1294
|
-
setXAxisTitle: Zt,
|
|
1295
|
-
setXAxisRangeData: Pt,
|
|
1296
|
-
setXAxisBand: Jt,
|
|
1297
|
-
setYAxisTitle: ti,
|
|
1298
|
-
setYAxisRangeData: ii,
|
|
1299
|
-
setLineData: si,
|
|
1300
|
-
setBarData: ai,
|
|
1301
|
-
setTmpSVGG: Qt,
|
|
1302
|
-
getChartThemeConfig: oi,
|
|
1303
|
-
getChartConfig: ri,
|
|
1304
|
-
getXYChartData: hi
|
|
1305
|
-
}, Wi = /* @__PURE__ */ n((e, t, i, s) => {
|
|
1306
|
-
const a = s.db, o = a.getChartThemeConfig(), l = a.getChartConfig(), p = a.getXYChartData().plots[0].data.map((m) => m[1]);
|
|
1307
|
-
function d(m) {
|
|
1308
|
-
return m === "top" ? "text-before-edge" : "middle";
|
|
1309
|
-
}
|
|
1310
|
-
n(d, "getDominantBaseLine");
|
|
1311
|
-
function k(m) {
|
|
1312
|
-
return m === "left" ? "start" : m === "right" ? "end" : "middle";
|
|
1313
|
-
}
|
|
1314
|
-
n(k, "getTextAnchor");
|
|
1315
|
-
function T(m) {
|
|
1316
|
-
return `translate(${m.x}, ${m.y}) rotate(${m.rotation || 0})`;
|
|
1317
|
-
}
|
|
1318
|
-
n(T, "getTextTransformation"), Nt.debug(`Rendering xychart chart
|
|
1319
|
-
` + e);
|
|
1320
|
-
const _ = yi(t), b = _.append("g").attr("class", "main"), E = b.append("rect").attr("width", l.width).attr("height", l.height).attr("class", "background");
|
|
1321
|
-
bi(_, l.height, l.width, !0), _.attr("viewBox", `0 0 ${l.width} ${l.height}`), E.attr("fill", o.backgroundColor), a.setTmpSVGG(_.append("g").attr("class", "mermaid-tmp-group"));
|
|
1322
|
-
const L = a.getDrawableElem(), P = {};
|
|
1323
|
-
function I(m) {
|
|
1324
|
-
let D = b, c = "";
|
|
1325
|
-
for (const [B] of m.entries()) {
|
|
1326
|
-
let W = b;
|
|
1327
|
-
B > 0 && P[c] && (W = P[c]), c += m[B], D = P[c], D || (D = P[c] = W.append("g").attr("class", m[B]));
|
|
1328
|
-
}
|
|
1329
|
-
return D;
|
|
1330
|
-
}
|
|
1331
|
-
n(I, "getGroup");
|
|
1332
|
-
for (const m of L) {
|
|
1333
|
-
if (m.data.length === 0)
|
|
1334
|
-
continue;
|
|
1335
|
-
const D = I(m.groupTexts);
|
|
1336
|
-
switch (m.type) {
|
|
1337
|
-
case "rect":
|
|
1338
|
-
if (D.selectAll("rect").data(m.data).enter().append("rect").attr("x", (c) => c.x).attr("y", (c) => c.y).attr("width", (c) => c.width).attr("height", (c) => c.height).attr("fill", (c) => c.fill).attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth), l.showDataLabel) {
|
|
1339
|
-
const c = l.showDataLabelOutsideBar;
|
|
1340
|
-
if (l.chartOrientation === "horizontal") {
|
|
1341
|
-
let B = function(w, V) {
|
|
1342
|
-
const { data: R, label: ot } = w;
|
|
1343
|
-
return V * ot.length * W <= R.width - X;
|
|
1344
|
-
};
|
|
1345
|
-
n(B, "fitsHorizontally");
|
|
1346
|
-
const W = 0.7, X = 10, Y = m.data.map((w, V) => ({ data: w, label: p[V].toString() })).filter((w) => w.data.width > 0 && w.data.height > 0), S = Y.map((w) => {
|
|
1347
|
-
const { data: V } = w;
|
|
1348
|
-
let R = V.height * 0.7;
|
|
1349
|
-
for (; !B(w, R) && R > 0; )
|
|
1350
|
-
R -= 1;
|
|
1351
|
-
return R;
|
|
1352
|
-
}), H = Math.floor(Math.min(...S)), A = /* @__PURE__ */ n((w) => c ? w.data.x + w.data.width + X : w.data.x + w.data.width - X, "determineLabelXPosition");
|
|
1353
|
-
D.selectAll("text").data(Y).enter().append("text").attr("x", A).attr("y", (w) => w.data.y + w.data.height / 2).attr("text-anchor", c ? "start" : "end").attr("dominant-baseline", "middle").attr("fill", o.dataLabelColor).attr("font-size", `${H}px`).text((w) => w.label);
|
|
1354
|
-
} else {
|
|
1355
|
-
let B = function(A, w, V) {
|
|
1356
|
-
const { data: R, label: ot } = A, F = w * ot.length * 0.7, h = R.x + R.width / 2, u = h - F / 2, g = h + F / 2, x = u >= R.x && g <= R.x + R.width, C = R.y + V + w <= R.y + R.height;
|
|
1357
|
-
return x && C;
|
|
1358
|
-
};
|
|
1359
|
-
n(B, "fitsInBar");
|
|
1360
|
-
const W = 10, X = m.data.map((A, w) => ({ data: A, label: p[w].toString() })).filter((A) => A.data.width > 0 && A.data.height > 0), Y = X.map((A) => {
|
|
1361
|
-
const { data: w, label: V } = A;
|
|
1362
|
-
let R = w.width / (V.length * 0.7);
|
|
1363
|
-
for (; !B(A, R, W) && R > 0; )
|
|
1364
|
-
R -= 1;
|
|
1365
|
-
return R;
|
|
1366
|
-
}), S = Math.floor(Math.min(...Y)), H = /* @__PURE__ */ n((A) => c ? A.data.y - W : A.data.y + W, "determineLabelYPosition");
|
|
1367
|
-
D.selectAll("text").data(X).enter().append("text").attr("x", (A) => A.data.x + A.data.width / 2).attr("y", H).attr("text-anchor", "middle").attr("dominant-baseline", c ? "auto" : "hanging").attr("fill", o.dataLabelColor).attr("font-size", `${S}px`).text((A) => A.label);
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
break;
|
|
1371
|
-
case "text":
|
|
1372
|
-
D.selectAll("text").data(m.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (c) => c.fill).attr("font-size", (c) => c.fontSize).attr("dominant-baseline", (c) => d(c.verticalPos)).attr("text-anchor", (c) => k(c.horizontalPos)).attr("transform", (c) => T(c)).text((c) => c.text);
|
|
1373
|
-
break;
|
|
1374
|
-
case "path":
|
|
1375
|
-
D.selectAll("path").data(m.data).enter().append("path").attr("d", (c) => c.path).attr("fill", (c) => c.fill ? c.fill : "none").attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth);
|
|
1376
|
-
break;
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
}, "draw"), Fi = {
|
|
1380
|
-
draw: Wi
|
|
1381
|
-
}, $i = {
|
|
1382
|
-
parser: Di,
|
|
1383
|
-
db: Oi,
|
|
1384
|
-
renderer: Fi
|
|
1385
|
-
};
|
|
1386
|
-
export {
|
|
1387
|
-
$i as diagram
|
|
1388
|
-
};
|