@digipair/skill-web-chatbot 0.90.0 → 0.91.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/.swcrc +28 -0
  2. package/README.md +7 -0
  3. package/eslint.config.mjs +22 -0
  4. package/package.json +22 -7
  5. package/rollup.config.cjs +28 -0
  6. package/src/digipair__engine.d.ts +2 -0
  7. package/src/handlebars.d.ts +1 -0
  8. package/src/index.html +18 -0
  9. package/src/lib/chat.element.ts +603 -0
  10. package/src/lib/common.data.ts +1 -0
  11. package/src/lib/config.ts +30 -0
  12. package/src/lib/digipair-full.data.ts +101 -0
  13. package/src/lib/digipair-full.element.ts +358 -0
  14. package/src/lib/digipair.data.ts +103 -0
  15. package/src/lib/digipair.element.ts +446 -0
  16. package/src/lib/inputs.element.ts +46 -0
  17. package/src/lib/mermaid.d.ts +1 -0
  18. package/src/lib/message.interface.ts +10 -0
  19. package/src/lib/pins/chatbot.actions.ts +32 -0
  20. package/src/lib/tools/css-selector.ts +12 -0
  21. package/tsconfig.json +13 -0
  22. package/tsconfig.lib.json +19 -0
  23. package/SAP-icons.cjs.js +0 -2489
  24. package/SAP-icons.cjs2.js +0 -2489
  25. package/SAP-icons.esm.js +0 -2482
  26. package/SAP-icons.esm2.js +0 -2482
  27. package/Tableau10-558cc280.cjs.js +0 -9
  28. package/Tableau10-558cc280.esm.js +0 -7
  29. package/arc-d1f6357e.cjs.js +0 -88
  30. package/arc-d1f6357e.esm.js +0 -86
  31. package/array-2ff2c7a6.cjs.js +0 -7
  32. package/array-2ff2c7a6.esm.js +0 -5
  33. package/blockDiagram-5dc23a45.cjs.js +0 -2921
  34. package/blockDiagram-5dc23a45.esm.js +0 -2919
  35. package/c4Diagram-1e775db3.cjs.js +0 -4387
  36. package/c4Diagram-1e775db3.esm.js +0 -4385
  37. package/channel-ebbc4130.cjs.js +0 -9
  38. package/channel-ebbc4130.esm.js +0 -7
  39. package/classDiagram-f52caa06.cjs.js +0 -209
  40. package/classDiagram-f52caa06.esm.js +0 -207
  41. package/classDiagram-v2-640c694e.cjs.js +0 -401
  42. package/classDiagram-v2-640c694e.esm.js +0 -399
  43. package/clone-afc2f047.cjs.js +0 -10
  44. package/clone-afc2f047.esm.js +0 -8
  45. package/createText-03b82060.cjs.js +0 -2936
  46. package/createText-03b82060.esm.js +0 -2933
  47. package/edges-16357fde.cjs.js +0 -1998
  48. package/edges-16357fde.esm.js +0 -1981
  49. package/erDiagram-c7ff1bec.cjs.js +0 -1807
  50. package/erDiagram-c7ff1bec.esm.js +0 -1805
  51. package/flowDb-9a89ea33.cjs.js +0 -5542
  52. package/flowDb-9a89ea33.esm.js +0 -5538
  53. package/flowDiagram-aadb13b0.cjs.js +0 -1351
  54. package/flowDiagram-aadb13b0.esm.js +0 -1349
  55. package/flowDiagram-v2-f2119625.cjs.js +0 -31
  56. package/flowDiagram-v2-f2119625.esm.js +0 -29
  57. package/flowchart-elk-definition-cf813a97.cjs.js +0 -50257
  58. package/flowchart-elk-definition-cf813a97.esm.js +0 -50255
  59. package/ganttDiagram-3c2fde2b.cjs.js +0 -3710
  60. package/ganttDiagram-3c2fde2b.esm.js +0 -3708
  61. package/gitGraphDiagram-c3a0619c.cjs.js +0 -3820
  62. package/gitGraphDiagram-c3a0619c.esm.js +0 -3818
  63. package/graph-0ee63739.cjs.js +0 -961
  64. package/graph-0ee63739.esm.js +0 -938
  65. package/index-bb6d8841.cjs.js +0 -648
  66. package/index-bb6d8841.esm.js +0 -646
  67. package/index.cjs.d.ts +0 -1
  68. package/index.cjs.js +0 -17
  69. package/index.cjs2.js +0 -60723
  70. package/index.esm.js +0 -1
  71. package/index.esm2.js +0 -60574
  72. package/infoDiagram-2f5c50c0.cjs.js +0 -460
  73. package/infoDiagram-2f5c50c0.esm.js +0 -458
  74. package/init-f9637058.cjs.js +0 -17
  75. package/init-f9637058.esm.js +0 -15
  76. package/journeyDiagram-14fe341a.cjs.js +0 -1061
  77. package/journeyDiagram-14fe341a.esm.js +0 -1059
  78. package/katex-d90b6d29.cjs.js +0 -25690
  79. package/katex-d90b6d29.esm.js +0 -25688
  80. package/layout-fd473db2.cjs.js +0 -1626
  81. package/layout-fd473db2.esm.js +0 -1619
  82. package/libs/engine/src/index.d.ts +0 -2
  83. package/libs/engine/src/lib/alias.interface.d.ts +0 -9
  84. package/libs/engine/src/lib/engine.d.ts +0 -13
  85. package/libs/engine/src/lib/pins-settings.interface.d.ts +0 -15
  86. package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +0 -28
  87. package/libs/skill-web-chatbot/src/lib/common.data.d.ts +0 -1
  88. package/libs/skill-web-chatbot/src/lib/config.d.ts +0 -9
  89. package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +0 -1
  90. package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +0 -36
  91. package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +0 -1
  92. package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +0 -44
  93. package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +0 -10
  94. package/libs/skill-web-chatbot/src/lib/message.interface.d.ts +0 -10
  95. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +0 -1
  96. package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +0 -1
  97. package/line-24d93f1b.cjs.js +0 -34
  98. package/line-24d93f1b.esm.js +0 -32
  99. package/linear-9bcf74c4.cjs.js +0 -537
  100. package/linear-9bcf74c4.esm.js +0 -531
  101. package/mindmap-definition-9399c7e6.cjs.js +0 -20489
  102. package/mindmap-definition-9399c7e6.esm.js +0 -20487
  103. package/ordinal-5695958c.cjs.js +0 -331
  104. package/ordinal-5695958c.esm.js +0 -329
  105. package/path-428ebac9.cjs.js +0 -317
  106. package/path-428ebac9.esm.js +0 -314
  107. package/pieDiagram-828dae43.cjs.js +0 -951
  108. package/pieDiagram-828dae43.esm.js +0 -949
  109. package/quadrantDiagram-5fa00455.cjs.js +0 -2410
  110. package/quadrantDiagram-5fa00455.esm.js +0 -2408
  111. package/requirementDiagram-03163dc4.cjs.js +0 -2267
  112. package/requirementDiagram-03163dc4.esm.js +0 -2265
  113. package/sankeyDiagram-52ec8976.cjs.js +0 -1848
  114. package/sankeyDiagram-52ec8976.esm.js +0 -1846
  115. package/sequenceDiagram-b517d154.cjs.js +0 -5949
  116. package/sequenceDiagram-b517d154.esm.js +0 -5947
  117. package/stateDiagram-fca82b5b.cjs.js +0 -283
  118. package/stateDiagram-fca82b5b.esm.js +0 -281
  119. package/stateDiagram-v2-ed04200a.cjs.js +0 -373
  120. package/stateDiagram-v2-ed04200a.esm.js +0 -371
  121. package/styles-11e81fdd.cjs.js +0 -3944
  122. package/styles-11e81fdd.esm.js +0 -3940
  123. package/styles-cacbff60.cjs.js +0 -2120
  124. package/styles-cacbff60.esm.js +0 -2111
  125. package/styles-e75131e4.cjs.js +0 -671
  126. package/styles-e75131e4.esm.js +0 -661
  127. package/svgDrawCommon-ecc5f780.cjs.js +0 -68
  128. package/svgDrawCommon-ecc5f780.esm.js +0 -60
  129. package/timeline-definition-4ee9bff4.cjs.js +0 -1161
  130. package/timeline-definition-4ee9bff4.esm.js +0 -1159
  131. package/xychartDiagram-e5e6b652.cjs.js +0 -3150
  132. package/xychartDiagram-e5e6b652.esm.js +0 -3148
  133. /package/{index.d.ts → src/index.d.ts} +0 -0
  134. /package/{libs/skill-web-chatbot/src/index.d.ts → src/index.ts} +0 -0
  135. /package/{schema.fr.json → src/schema.fr.json} +0 -0
  136. /package/{schema.json → src/schema.json} +0 -0
@@ -1,3150 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index.cjs2.js');
4
- var createText03b82060 = require('./createText-03b82060.cjs.js');
5
- var initF9637058 = require('./init-f9637058.cjs.js');
6
- var ordinal5695958c = require('./ordinal-5695958c.cjs.js');
7
- var linear9bcf74c4 = require('./linear-9bcf74c4.cjs.js');
8
- var line24d93f1b = require('./line-24d93f1b.cjs.js');
9
- require('./array-2ff2c7a6.cjs.js');
10
- require('./path-428ebac9.cjs.js');
11
-
12
- function _array_like_to_array(arr, len) {
13
- if (len == null || len > arr.length) len = arr.length;
14
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
15
- return arr2;
16
- }
17
- function _array_with_holes(arr) {
18
- if (Array.isArray(arr)) return arr;
19
- }
20
- function _array_without_holes(arr) {
21
- if (Array.isArray(arr)) return _array_like_to_array(arr);
22
- }
23
- function _assert_this_initialized(self) {
24
- if (self === void 0) {
25
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
26
- }
27
- return self;
28
- }
29
- function _class_call_check(instance, Constructor) {
30
- if (!(instance instanceof Constructor)) {
31
- throw new TypeError("Cannot call a class as a function");
32
- }
33
- }
34
- function _defineProperties(target, props) {
35
- for(var i = 0; i < props.length; i++){
36
- var descriptor = props[i];
37
- descriptor.enumerable = descriptor.enumerable || false;
38
- descriptor.configurable = true;
39
- if ("value" in descriptor) descriptor.writable = true;
40
- Object.defineProperty(target, descriptor.key, descriptor);
41
- }
42
- }
43
- function _create_class(Constructor, protoProps, staticProps) {
44
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
45
- if (staticProps) _defineProperties(Constructor, staticProps);
46
- return Constructor;
47
- }
48
- function _get(target, property, receiver) {
49
- if (typeof Reflect !== "undefined" && Reflect.get) {
50
- _get = Reflect.get;
51
- } else {
52
- _get = function get(target, property, receiver) {
53
- var base = _super_prop_base(target, property);
54
- if (!base) return;
55
- var desc = Object.getOwnPropertyDescriptor(base, property);
56
- if (desc.get) {
57
- return desc.get.call(receiver || target);
58
- }
59
- return desc.value;
60
- };
61
- }
62
- return _get(target, property, receiver || target);
63
- }
64
- function _get_prototype_of(o) {
65
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
66
- return o.__proto__ || Object.getPrototypeOf(o);
67
- };
68
- return _get_prototype_of(o);
69
- }
70
- function _inherits(subClass, superClass) {
71
- if (typeof superClass !== "function" && superClass !== null) {
72
- throw new TypeError("Super expression must either be null or a function");
73
- }
74
- subClass.prototype = Object.create(superClass && superClass.prototype, {
75
- constructor: {
76
- value: subClass,
77
- writable: true,
78
- configurable: true
79
- }
80
- });
81
- if (superClass) _set_prototype_of(subClass, superClass);
82
- }
83
- function _instanceof(left, right) {
84
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
85
- return !!right[Symbol.hasInstance](left);
86
- } else {
87
- return left instanceof right;
88
- }
89
- }
90
- function _iterable_to_array(iter) {
91
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
92
- }
93
- function _iterable_to_array_limit(arr, i) {
94
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
95
- if (_i == null) return;
96
- var _arr = [];
97
- var _n = true;
98
- var _d = false;
99
- var _s, _e;
100
- try {
101
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
102
- _arr.push(_s.value);
103
- if (i && _arr.length === i) break;
104
- }
105
- } catch (err) {
106
- _d = true;
107
- _e = err;
108
- } finally{
109
- try {
110
- if (!_n && _i["return"] != null) _i["return"]();
111
- } finally{
112
- if (_d) throw _e;
113
- }
114
- }
115
- return _arr;
116
- }
117
- function _non_iterable_rest() {
118
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
119
- }
120
- function _non_iterable_spread() {
121
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
122
- }
123
- function _possible_constructor_return(self, call) {
124
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
125
- return call;
126
- }
127
- return _assert_this_initialized(self);
128
- }
129
- function _set_prototype_of(o, p) {
130
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
131
- o.__proto__ = p;
132
- return o;
133
- };
134
- return _set_prototype_of(o, p);
135
- }
136
- function _sliced_to_array(arr, i) {
137
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
138
- }
139
- function _super_prop_base(object, property) {
140
- while(!Object.prototype.hasOwnProperty.call(object, property)){
141
- object = _get_prototype_of(object);
142
- if (object === null) break;
143
- }
144
- return object;
145
- }
146
- function _to_consumable_array(arr) {
147
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
148
- }
149
- function _type_of(obj) {
150
- "@swc/helpers - typeof";
151
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
152
- }
153
- function _unsupported_iterable_to_array(o, minLen) {
154
- if (!o) return;
155
- if (typeof o === "string") return _array_like_to_array(o, minLen);
156
- var n = Object.prototype.toString.call(o).slice(8, -1);
157
- if (n === "Object" && o.constructor) n = o.constructor.name;
158
- if (n === "Map" || n === "Set") return Array.from(n);
159
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
160
- }
161
- function _is_native_reflect_construct() {
162
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
163
- if (Reflect.construct.sham) return false;
164
- if (typeof Proxy === "function") return true;
165
- try {
166
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
167
- return true;
168
- } catch (e) {
169
- return false;
170
- }
171
- }
172
- function _create_super(Derived) {
173
- var hasNativeReflectConstruct = _is_native_reflect_construct();
174
- return function _createSuperInternal() {
175
- var Super = _get_prototype_of(Derived), result;
176
- if (hasNativeReflectConstruct) {
177
- var NewTarget = _get_prototype_of(this).constructor;
178
- result = Reflect.construct(Super, arguments, NewTarget);
179
- } else {
180
- result = Super.apply(this, arguments);
181
- }
182
- return _possible_constructor_return(this, result);
183
- };
184
- }
185
- function Jt(e, t, i) {
186
- e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
187
- for(var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n;)o[s] = e + s * i;
188
- return o;
189
- }
190
- function st() {
191
- var e = ordinal5695958c.h().unknown(void 0), t = e.domain, i = e.range, s = 0, n = 1, o, c, f = !1, d = 0, R = 0, _ = 0.5;
192
- delete e.unknown;
193
- function A() {
194
- var m = t().length, T = n < s, S = T ? n : s, P = T ? s : n;
195
- o = (P - S) / Math.max(1, m - d + R * 2), f && (o = Math.floor(o)), S += (P - S - o * (m - d)) * _, c = o * (1 - d), f && (S = Math.round(S), c = Math.round(c));
196
- var p = Jt(m).map(function(C) {
197
- return S + o * C;
198
- });
199
- return i(T ? p.reverse() : p);
200
- }
201
- return e.domain = function(m) {
202
- return arguments.length ? (t(m), A()) : t();
203
- }, e.range = function(m) {
204
- var ref;
205
- return arguments.length ? (ref = _sliced_to_array(m, 2), s = ref[0], n = ref[1], s = +s, n = +n, A()) : [
206
- s,
207
- n
208
- ];
209
- }, e.rangeRound = function(m) {
210
- var ref;
211
- return ref = _sliced_to_array(m, 2), s = ref[0], n = ref[1], s = +s, n = +n, f = !0, A();
212
- }, e.bandwidth = function() {
213
- return c;
214
- }, e.step = function() {
215
- return o;
216
- }, e.round = function(m) {
217
- return arguments.length ? (f = !!m, A()) : f;
218
- }, e.padding = function(m) {
219
- return arguments.length ? (d = Math.min(1, R = +m), A()) : d;
220
- }, e.paddingInner = function(m) {
221
- return arguments.length ? (d = Math.min(1, m), A()) : d;
222
- }, e.paddingOuter = function(m) {
223
- return arguments.length ? (R = +m, A()) : R;
224
- }, e.align = function(m) {
225
- return arguments.length ? (_ = Math.max(0, Math.min(1, m)), A()) : _;
226
- }, e.copy = function() {
227
- return st(t(), [
228
- s,
229
- n
230
- ]).round(f).paddingInner(d).paddingOuter(R).align(_);
231
- }, initF9637058.t.apply(A(), arguments);
232
- }
233
- var nt = function() {
234
- var e = function e(V, r, l, u) {
235
- for(l = l || {}, u = V.length; u--; l[V[u]] = r);
236
- return l;
237
- }, t = [
238
- 1,
239
- 10,
240
- 12,
241
- 14,
242
- 16,
243
- 18,
244
- 19,
245
- 21,
246
- 23
247
- ], i = [
248
- 2,
249
- 6
250
- ], s = [
251
- 1,
252
- 3
253
- ], n = [
254
- 1,
255
- 5
256
- ], o = [
257
- 1,
258
- 6
259
- ], c = [
260
- 1,
261
- 7
262
- ], f = [
263
- 1,
264
- 5,
265
- 10,
266
- 12,
267
- 14,
268
- 16,
269
- 18,
270
- 19,
271
- 21,
272
- 23,
273
- 34,
274
- 35,
275
- 36
276
- ], d = [
277
- 1,
278
- 25
279
- ], R = [
280
- 1,
281
- 26
282
- ], _ = [
283
- 1,
284
- 28
285
- ], A = [
286
- 1,
287
- 29
288
- ], m = [
289
- 1,
290
- 30
291
- ], T = [
292
- 1,
293
- 31
294
- ], S = [
295
- 1,
296
- 32
297
- ], P = [
298
- 1,
299
- 33
300
- ], p = [
301
- 1,
302
- 34
303
- ], C = [
304
- 1,
305
- 35
306
- ], h = [
307
- 1,
308
- 36
309
- ], L = [
310
- 1,
311
- 37
312
- ], z = [
313
- 1,
314
- 43
315
- ], lt = [
316
- 1,
317
- 42
318
- ], ct = [
319
- 1,
320
- 47
321
- ], U = [
322
- 1,
323
- 50
324
- ], w = [
325
- 1,
326
- 10,
327
- 12,
328
- 14,
329
- 16,
330
- 18,
331
- 19,
332
- 21,
333
- 23,
334
- 34,
335
- 35,
336
- 36
337
- ], Q = [
338
- 1,
339
- 10,
340
- 12,
341
- 14,
342
- 16,
343
- 18,
344
- 19,
345
- 21,
346
- 23,
347
- 24,
348
- 26,
349
- 27,
350
- 28,
351
- 34,
352
- 35,
353
- 36
354
- ], E = [
355
- 1,
356
- 10,
357
- 12,
358
- 14,
359
- 16,
360
- 18,
361
- 19,
362
- 21,
363
- 23,
364
- 24,
365
- 26,
366
- 27,
367
- 28,
368
- 34,
369
- 35,
370
- 36,
371
- 41,
372
- 42,
373
- 43,
374
- 44,
375
- 45,
376
- 46,
377
- 47,
378
- 48,
379
- 49,
380
- 50
381
- ], ut = [
382
- 1,
383
- 64
384
- ], K = {
385
- trace: function trace() {},
386
- yy: {},
387
- symbols_: {
388
- error: 2,
389
- start: 3,
390
- eol: 4,
391
- XYCHART: 5,
392
- chartConfig: 6,
393
- document: 7,
394
- CHART_ORIENTATION: 8,
395
- statement: 9,
396
- title: 10,
397
- text: 11,
398
- X_AXIS: 12,
399
- parseXAxis: 13,
400
- Y_AXIS: 14,
401
- parseYAxis: 15,
402
- LINE: 16,
403
- plotData: 17,
404
- BAR: 18,
405
- acc_title: 19,
406
- acc_title_value: 20,
407
- acc_descr: 21,
408
- acc_descr_value: 22,
409
- acc_descr_multiline_value: 23,
410
- SQUARE_BRACES_START: 24,
411
- commaSeparatedNumbers: 25,
412
- SQUARE_BRACES_END: 26,
413
- NUMBER_WITH_DECIMAL: 27,
414
- COMMA: 28,
415
- xAxisData: 29,
416
- bandData: 30,
417
- ARROW_DELIMITER: 31,
418
- commaSeparatedTexts: 32,
419
- yAxisData: 33,
420
- NEWLINE: 34,
421
- SEMI: 35,
422
- EOF: 36,
423
- alphaNum: 37,
424
- STR: 38,
425
- MD_STR: 39,
426
- alphaNumToken: 40,
427
- AMP: 41,
428
- NUM: 42,
429
- ALPHA: 43,
430
- PLUS: 44,
431
- EQUALS: 45,
432
- MULT: 46,
433
- DOT: 47,
434
- BRKT: 48,
435
- MINUS: 49,
436
- UNDERSCORE: 50,
437
- $accept: 0,
438
- $end: 1
439
- },
440
- terminals_: {
441
- 2: "error",
442
- 5: "XYCHART",
443
- 8: "CHART_ORIENTATION",
444
- 10: "title",
445
- 12: "X_AXIS",
446
- 14: "Y_AXIS",
447
- 16: "LINE",
448
- 18: "BAR",
449
- 19: "acc_title",
450
- 20: "acc_title_value",
451
- 21: "acc_descr",
452
- 22: "acc_descr_value",
453
- 23: "acc_descr_multiline_value",
454
- 24: "SQUARE_BRACES_START",
455
- 26: "SQUARE_BRACES_END",
456
- 27: "NUMBER_WITH_DECIMAL",
457
- 28: "COMMA",
458
- 31: "ARROW_DELIMITER",
459
- 34: "NEWLINE",
460
- 35: "SEMI",
461
- 36: "EOF",
462
- 38: "STR",
463
- 39: "MD_STR",
464
- 41: "AMP",
465
- 42: "NUM",
466
- 43: "ALPHA",
467
- 44: "PLUS",
468
- 45: "EQUALS",
469
- 46: "MULT",
470
- 47: "DOT",
471
- 48: "BRKT",
472
- 49: "MINUS",
473
- 50: "UNDERSCORE"
474
- },
475
- productions_: [
476
- 0,
477
- [
478
- 3,
479
- 2
480
- ],
481
- [
482
- 3,
483
- 3
484
- ],
485
- [
486
- 3,
487
- 2
488
- ],
489
- [
490
- 3,
491
- 1
492
- ],
493
- [
494
- 6,
495
- 1
496
- ],
497
- [
498
- 7,
499
- 0
500
- ],
501
- [
502
- 7,
503
- 2
504
- ],
505
- [
506
- 9,
507
- 2
508
- ],
509
- [
510
- 9,
511
- 2
512
- ],
513
- [
514
- 9,
515
- 2
516
- ],
517
- [
518
- 9,
519
- 2
520
- ],
521
- [
522
- 9,
523
- 2
524
- ],
525
- [
526
- 9,
527
- 3
528
- ],
529
- [
530
- 9,
531
- 2
532
- ],
533
- [
534
- 9,
535
- 3
536
- ],
537
- [
538
- 9,
539
- 2
540
- ],
541
- [
542
- 9,
543
- 2
544
- ],
545
- [
546
- 9,
547
- 1
548
- ],
549
- [
550
- 17,
551
- 3
552
- ],
553
- [
554
- 25,
555
- 3
556
- ],
557
- [
558
- 25,
559
- 1
560
- ],
561
- [
562
- 13,
563
- 1
564
- ],
565
- [
566
- 13,
567
- 2
568
- ],
569
- [
570
- 13,
571
- 1
572
- ],
573
- [
574
- 29,
575
- 1
576
- ],
577
- [
578
- 29,
579
- 3
580
- ],
581
- [
582
- 30,
583
- 3
584
- ],
585
- [
586
- 32,
587
- 3
588
- ],
589
- [
590
- 32,
591
- 1
592
- ],
593
- [
594
- 15,
595
- 1
596
- ],
597
- [
598
- 15,
599
- 2
600
- ],
601
- [
602
- 15,
603
- 1
604
- ],
605
- [
606
- 33,
607
- 3
608
- ],
609
- [
610
- 4,
611
- 1
612
- ],
613
- [
614
- 4,
615
- 1
616
- ],
617
- [
618
- 4,
619
- 1
620
- ],
621
- [
622
- 11,
623
- 1
624
- ],
625
- [
626
- 11,
627
- 1
628
- ],
629
- [
630
- 11,
631
- 1
632
- ],
633
- [
634
- 37,
635
- 1
636
- ],
637
- [
638
- 37,
639
- 2
640
- ],
641
- [
642
- 40,
643
- 1
644
- ],
645
- [
646
- 40,
647
- 1
648
- ],
649
- [
650
- 40,
651
- 1
652
- ],
653
- [
654
- 40,
655
- 1
656
- ],
657
- [
658
- 40,
659
- 1
660
- ],
661
- [
662
- 40,
663
- 1
664
- ],
665
- [
666
- 40,
667
- 1
668
- ],
669
- [
670
- 40,
671
- 1
672
- ],
673
- [
674
- 40,
675
- 1
676
- ],
677
- [
678
- 40,
679
- 1
680
- ]
681
- ],
682
- performAction: function performAction(r, l, u, g, b, a, F) {
683
- var x = a.length - 1;
684
- switch(b){
685
- case 5:
686
- g.setOrientation(a[x]);
687
- break;
688
- case 9:
689
- g.setDiagramTitle(a[x].text.trim());
690
- break;
691
- case 12:
692
- g.setLineData({
693
- text: "",
694
- type: "text"
695
- }, a[x]);
696
- break;
697
- case 13:
698
- g.setLineData(a[x - 1], a[x]);
699
- break;
700
- case 14:
701
- g.setBarData({
702
- text: "",
703
- type: "text"
704
- }, a[x]);
705
- break;
706
- case 15:
707
- g.setBarData(a[x - 1], a[x]);
708
- break;
709
- case 16:
710
- this.$ = a[x].trim(), g.setAccTitle(this.$);
711
- break;
712
- case 17:
713
- case 18:
714
- this.$ = a[x].trim(), g.setAccDescription(this.$);
715
- break;
716
- case 19:
717
- this.$ = a[x - 1];
718
- break;
719
- case 20:
720
- this.$ = [
721
- Number(a[x - 2])
722
- ].concat(_to_consumable_array(a[x]));
723
- break;
724
- case 21:
725
- this.$ = [
726
- Number(a[x])
727
- ];
728
- break;
729
- case 22:
730
- g.setXAxisTitle(a[x]);
731
- break;
732
- case 23:
733
- g.setXAxisTitle(a[x - 1]);
734
- break;
735
- case 24:
736
- g.setXAxisTitle({
737
- type: "text",
738
- text: ""
739
- });
740
- break;
741
- case 25:
742
- g.setXAxisBand(a[x]);
743
- break;
744
- case 26:
745
- g.setXAxisRangeData(Number(a[x - 2]), Number(a[x]));
746
- break;
747
- case 27:
748
- this.$ = a[x - 1];
749
- break;
750
- case 28:
751
- this.$ = [
752
- a[x - 2]
753
- ].concat(_to_consumable_array(a[x]));
754
- break;
755
- case 29:
756
- this.$ = [
757
- a[x]
758
- ];
759
- break;
760
- case 30:
761
- g.setYAxisTitle(a[x]);
762
- break;
763
- case 31:
764
- g.setYAxisTitle(a[x - 1]);
765
- break;
766
- case 32:
767
- g.setYAxisTitle({
768
- type: "text",
769
- text: ""
770
- });
771
- break;
772
- case 33:
773
- g.setYAxisRangeData(Number(a[x - 2]), Number(a[x]));
774
- break;
775
- case 37:
776
- this.$ = {
777
- text: a[x],
778
- type: "text"
779
- };
780
- break;
781
- case 38:
782
- this.$ = {
783
- text: a[x],
784
- type: "text"
785
- };
786
- break;
787
- case 39:
788
- this.$ = {
789
- text: a[x],
790
- type: "markdown"
791
- };
792
- break;
793
- case 40:
794
- this.$ = a[x];
795
- break;
796
- case 41:
797
- this.$ = a[x - 1] + "" + a[x];
798
- break;
799
- }
800
- },
801
- table: [
802
- e(t, i, {
803
- 3: 1,
804
- 4: 2,
805
- 7: 4,
806
- 5: s,
807
- 34: n,
808
- 35: o,
809
- 36: c
810
- }),
811
- {
812
- 1: [
813
- 3
814
- ]
815
- },
816
- e(t, i, {
817
- 4: 2,
818
- 7: 4,
819
- 3: 8,
820
- 5: s,
821
- 34: n,
822
- 35: o,
823
- 36: c
824
- }),
825
- e(t, i, {
826
- 4: 2,
827
- 7: 4,
828
- 6: 9,
829
- 3: 10,
830
- 5: s,
831
- 8: [
832
- 1,
833
- 11
834
- ],
835
- 34: n,
836
- 35: o,
837
- 36: c
838
- }),
839
- {
840
- 1: [
841
- 2,
842
- 4
843
- ],
844
- 9: 12,
845
- 10: [
846
- 1,
847
- 13
848
- ],
849
- 12: [
850
- 1,
851
- 14
852
- ],
853
- 14: [
854
- 1,
855
- 15
856
- ],
857
- 16: [
858
- 1,
859
- 16
860
- ],
861
- 18: [
862
- 1,
863
- 17
864
- ],
865
- 19: [
866
- 1,
867
- 18
868
- ],
869
- 21: [
870
- 1,
871
- 19
872
- ],
873
- 23: [
874
- 1,
875
- 20
876
- ]
877
- },
878
- e(f, [
879
- 2,
880
- 34
881
- ]),
882
- e(f, [
883
- 2,
884
- 35
885
- ]),
886
- e(f, [
887
- 2,
888
- 36
889
- ]),
890
- {
891
- 1: [
892
- 2,
893
- 1
894
- ]
895
- },
896
- e(t, i, {
897
- 4: 2,
898
- 7: 4,
899
- 3: 21,
900
- 5: s,
901
- 34: n,
902
- 35: o,
903
- 36: c
904
- }),
905
- {
906
- 1: [
907
- 2,
908
- 3
909
- ]
910
- },
911
- e(f, [
912
- 2,
913
- 5
914
- ]),
915
- e(t, [
916
- 2,
917
- 7
918
- ], {
919
- 4: 22,
920
- 34: n,
921
- 35: o,
922
- 36: c
923
- }),
924
- {
925
- 11: 23,
926
- 37: 24,
927
- 38: d,
928
- 39: R,
929
- 40: 27,
930
- 41: _,
931
- 42: A,
932
- 43: m,
933
- 44: T,
934
- 45: S,
935
- 46: P,
936
- 47: p,
937
- 48: C,
938
- 49: h,
939
- 50: L
940
- },
941
- {
942
- 11: 39,
943
- 13: 38,
944
- 24: z,
945
- 27: lt,
946
- 29: 40,
947
- 30: 41,
948
- 37: 24,
949
- 38: d,
950
- 39: R,
951
- 40: 27,
952
- 41: _,
953
- 42: A,
954
- 43: m,
955
- 44: T,
956
- 45: S,
957
- 46: P,
958
- 47: p,
959
- 48: C,
960
- 49: h,
961
- 50: L
962
- },
963
- {
964
- 11: 45,
965
- 15: 44,
966
- 27: ct,
967
- 33: 46,
968
- 37: 24,
969
- 38: d,
970
- 39: R,
971
- 40: 27,
972
- 41: _,
973
- 42: A,
974
- 43: m,
975
- 44: T,
976
- 45: S,
977
- 46: P,
978
- 47: p,
979
- 48: C,
980
- 49: h,
981
- 50: L
982
- },
983
- {
984
- 11: 49,
985
- 17: 48,
986
- 24: U,
987
- 37: 24,
988
- 38: d,
989
- 39: R,
990
- 40: 27,
991
- 41: _,
992
- 42: A,
993
- 43: m,
994
- 44: T,
995
- 45: S,
996
- 46: P,
997
- 47: p,
998
- 48: C,
999
- 49: h,
1000
- 50: L
1001
- },
1002
- {
1003
- 11: 52,
1004
- 17: 51,
1005
- 24: U,
1006
- 37: 24,
1007
- 38: d,
1008
- 39: R,
1009
- 40: 27,
1010
- 41: _,
1011
- 42: A,
1012
- 43: m,
1013
- 44: T,
1014
- 45: S,
1015
- 46: P,
1016
- 47: p,
1017
- 48: C,
1018
- 49: h,
1019
- 50: L
1020
- },
1021
- {
1022
- 20: [
1023
- 1,
1024
- 53
1025
- ]
1026
- },
1027
- {
1028
- 22: [
1029
- 1,
1030
- 54
1031
- ]
1032
- },
1033
- e(w, [
1034
- 2,
1035
- 18
1036
- ]),
1037
- {
1038
- 1: [
1039
- 2,
1040
- 2
1041
- ]
1042
- },
1043
- e(w, [
1044
- 2,
1045
- 8
1046
- ]),
1047
- e(w, [
1048
- 2,
1049
- 9
1050
- ]),
1051
- e(Q, [
1052
- 2,
1053
- 37
1054
- ], {
1055
- 40: 55,
1056
- 41: _,
1057
- 42: A,
1058
- 43: m,
1059
- 44: T,
1060
- 45: S,
1061
- 46: P,
1062
- 47: p,
1063
- 48: C,
1064
- 49: h,
1065
- 50: L
1066
- }),
1067
- e(Q, [
1068
- 2,
1069
- 38
1070
- ]),
1071
- e(Q, [
1072
- 2,
1073
- 39
1074
- ]),
1075
- e(E, [
1076
- 2,
1077
- 40
1078
- ]),
1079
- e(E, [
1080
- 2,
1081
- 42
1082
- ]),
1083
- e(E, [
1084
- 2,
1085
- 43
1086
- ]),
1087
- e(E, [
1088
- 2,
1089
- 44
1090
- ]),
1091
- e(E, [
1092
- 2,
1093
- 45
1094
- ]),
1095
- e(E, [
1096
- 2,
1097
- 46
1098
- ]),
1099
- e(E, [
1100
- 2,
1101
- 47
1102
- ]),
1103
- e(E, [
1104
- 2,
1105
- 48
1106
- ]),
1107
- e(E, [
1108
- 2,
1109
- 49
1110
- ]),
1111
- e(E, [
1112
- 2,
1113
- 50
1114
- ]),
1115
- e(E, [
1116
- 2,
1117
- 51
1118
- ]),
1119
- e(w, [
1120
- 2,
1121
- 10
1122
- ]),
1123
- e(w, [
1124
- 2,
1125
- 22
1126
- ], {
1127
- 30: 41,
1128
- 29: 56,
1129
- 24: z,
1130
- 27: lt
1131
- }),
1132
- e(w, [
1133
- 2,
1134
- 24
1135
- ]),
1136
- e(w, [
1137
- 2,
1138
- 25
1139
- ]),
1140
- {
1141
- 31: [
1142
- 1,
1143
- 57
1144
- ]
1145
- },
1146
- {
1147
- 11: 59,
1148
- 32: 58,
1149
- 37: 24,
1150
- 38: d,
1151
- 39: R,
1152
- 40: 27,
1153
- 41: _,
1154
- 42: A,
1155
- 43: m,
1156
- 44: T,
1157
- 45: S,
1158
- 46: P,
1159
- 47: p,
1160
- 48: C,
1161
- 49: h,
1162
- 50: L
1163
- },
1164
- e(w, [
1165
- 2,
1166
- 11
1167
- ]),
1168
- e(w, [
1169
- 2,
1170
- 30
1171
- ], {
1172
- 33: 60,
1173
- 27: ct
1174
- }),
1175
- e(w, [
1176
- 2,
1177
- 32
1178
- ]),
1179
- {
1180
- 31: [
1181
- 1,
1182
- 61
1183
- ]
1184
- },
1185
- e(w, [
1186
- 2,
1187
- 12
1188
- ]),
1189
- {
1190
- 17: 62,
1191
- 24: U
1192
- },
1193
- {
1194
- 25: 63,
1195
- 27: ut
1196
- },
1197
- e(w, [
1198
- 2,
1199
- 14
1200
- ]),
1201
- {
1202
- 17: 65,
1203
- 24: U
1204
- },
1205
- e(w, [
1206
- 2,
1207
- 16
1208
- ]),
1209
- e(w, [
1210
- 2,
1211
- 17
1212
- ]),
1213
- e(E, [
1214
- 2,
1215
- 41
1216
- ]),
1217
- e(w, [
1218
- 2,
1219
- 23
1220
- ]),
1221
- {
1222
- 27: [
1223
- 1,
1224
- 66
1225
- ]
1226
- },
1227
- {
1228
- 26: [
1229
- 1,
1230
- 67
1231
- ]
1232
- },
1233
- {
1234
- 26: [
1235
- 2,
1236
- 29
1237
- ],
1238
- 28: [
1239
- 1,
1240
- 68
1241
- ]
1242
- },
1243
- e(w, [
1244
- 2,
1245
- 31
1246
- ]),
1247
- {
1248
- 27: [
1249
- 1,
1250
- 69
1251
- ]
1252
- },
1253
- e(w, [
1254
- 2,
1255
- 13
1256
- ]),
1257
- {
1258
- 26: [
1259
- 1,
1260
- 70
1261
- ]
1262
- },
1263
- {
1264
- 26: [
1265
- 2,
1266
- 21
1267
- ],
1268
- 28: [
1269
- 1,
1270
- 71
1271
- ]
1272
- },
1273
- e(w, [
1274
- 2,
1275
- 15
1276
- ]),
1277
- e(w, [
1278
- 2,
1279
- 26
1280
- ]),
1281
- e(w, [
1282
- 2,
1283
- 27
1284
- ]),
1285
- {
1286
- 11: 59,
1287
- 32: 72,
1288
- 37: 24,
1289
- 38: d,
1290
- 39: R,
1291
- 40: 27,
1292
- 41: _,
1293
- 42: A,
1294
- 43: m,
1295
- 44: T,
1296
- 45: S,
1297
- 46: P,
1298
- 47: p,
1299
- 48: C,
1300
- 49: h,
1301
- 50: L
1302
- },
1303
- e(w, [
1304
- 2,
1305
- 33
1306
- ]),
1307
- e(w, [
1308
- 2,
1309
- 19
1310
- ]),
1311
- {
1312
- 25: 73,
1313
- 27: ut
1314
- },
1315
- {
1316
- 26: [
1317
- 2,
1318
- 28
1319
- ]
1320
- },
1321
- {
1322
- 26: [
1323
- 2,
1324
- 20
1325
- ]
1326
- }
1327
- ],
1328
- defaultActions: {
1329
- 8: [
1330
- 2,
1331
- 1
1332
- ],
1333
- 10: [
1334
- 2,
1335
- 3
1336
- ],
1337
- 21: [
1338
- 2,
1339
- 2
1340
- ],
1341
- 72: [
1342
- 2,
1343
- 28
1344
- ],
1345
- 73: [
1346
- 2,
1347
- 20
1348
- ]
1349
- },
1350
- parseError: function parseError(r, l) {
1351
- if (l.recoverable) this.trace(r);
1352
- else {
1353
- var u = new Error(r);
1354
- throw u.hash = l, u;
1355
- }
1356
- },
1357
- parse: function parse(r) {
1358
- var l = this, u = [
1359
- 0
1360
- ], g = [], b = [
1361
- null
1362
- ], a = [], F = this.table, x = "", $ = 0, gt = 0, Vt = 2, xt = 1, Wt = a.slice.call(arguments, 1), k = Object.create(this.lexer), W = {
1363
- yy: {}
1364
- };
1365
- for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy, J) && (W.yy[J] = this.yy[J]);
1366
- k.setInput(r, W.yy), W.yy.lexer = k, W.yy.parser = this, _type_of(k.yylloc) > "u" && (k.yylloc = {});
1367
- var tt = k.yylloc;
1368
- a.push(tt);
1369
- var Bt = k.options && k.options.ranges;
1370
- typeof W.yy.parseError == "function" ? this.parseError = W.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1371
- function Ot() {
1372
- var I;
1373
- return I = g.pop() || k.lex() || xt, typeof I != "number" && (_instanceof(I, Array) && (g = I, I = g.pop()), I = l.symbols_[I] || I), I;
1374
- }
1375
- for(var D, B, v, it, O = {}, q, M, dt, j;;){
1376
- if (B = u[u.length - 1], this.defaultActions[B] ? v = this.defaultActions[B] : ((D === null || (typeof D === "undefined" ? "undefined" : _type_of(D)) > "u") && (D = Ot()), v = F[B] && F[B][D]), (typeof v === "undefined" ? "undefined" : _type_of(v)) > "u" || !v.length || !v[0]) {
1377
- var et = "";
1378
- j = [];
1379
- for(q in F[B])this.terminals_[q] && q > Vt && j.push("'" + this.terminals_[q] + "'");
1380
- k.showPosition ? et = "Parse error on line " + ($ + 1) + ":\n" + k.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[D] || D) + "'" : et = "Parse error on line " + ($ + 1) + ": Unexpected " + (D == xt ? "end of input" : "'" + (this.terminals_[D] || D) + "'"), this.parseError(et, {
1381
- text: k.match,
1382
- token: this.terminals_[D] || D,
1383
- line: k.yylineno,
1384
- loc: tt,
1385
- expected: j
1386
- });
1387
- }
1388
- if (_instanceof(v[0], Array) && v.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + B + ", token: " + D);
1389
- switch(v[0]){
1390
- case 1:
1391
- u.push(D), b.push(k.yytext), a.push(k.yylloc), u.push(v[1]), D = null, gt = k.yyleng, x = k.yytext, $ = k.yylineno, tt = k.yylloc;
1392
- break;
1393
- case 2:
1394
- if (M = this.productions_[v[1]][1], O.$ = b[b.length - M], O._$ = {
1395
- first_line: a[a.length - (M || 1)].first_line,
1396
- last_line: a[a.length - 1].last_line,
1397
- first_column: a[a.length - (M || 1)].first_column,
1398
- last_column: a[a.length - 1].last_column
1399
- }, Bt && (O._$.range = [
1400
- a[a.length - (M || 1)].range[0],
1401
- a[a.length - 1].range[1]
1402
- ]), it = this.performAction.apply(O, [
1403
- x,
1404
- gt,
1405
- $,
1406
- W.yy,
1407
- v[1],
1408
- b,
1409
- a
1410
- ].concat(Wt)), (typeof it === "undefined" ? "undefined" : _type_of(it)) < "u") return it;
1411
- M && (u = u.slice(0, -1 * M * 2), b = b.slice(0, -1 * M), a = a.slice(0, -1 * M)), u.push(this.productions_[v[1]][0]), b.push(O.$), a.push(O._$), dt = F[u[u.length - 2]][u[u.length - 1]], u.push(dt);
1412
- break;
1413
- case 3:
1414
- return !0;
1415
- }
1416
- }
1417
- return !0;
1418
- }
1419
- }, It = function() {
1420
- var V = {
1421
- EOF: 1,
1422
- parseError: function parseError(l, u) {
1423
- if (this.yy.parser) this.yy.parser.parseError(l, u);
1424
- else throw new Error(l);
1425
- },
1426
- // resets the lexer, sets new input
1427
- setInput: function setInput(r, l) {
1428
- return this.yy = l || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = [
1429
- "INITIAL"
1430
- ], this.yylloc = {
1431
- first_line: 1,
1432
- first_column: 0,
1433
- last_line: 1,
1434
- last_column: 0
1435
- }, this.options.ranges && (this.yylloc.range = [
1436
- 0,
1437
- 0
1438
- ]), this.offset = 0, this;
1439
- },
1440
- // consumes and returns one char from the input
1441
- input: function input() {
1442
- var r = this._input[0];
1443
- this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
1444
- var l = r.match(/(?:\r\n?|\n).*/g);
1445
- return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
1446
- },
1447
- // unshifts one char (or a string) into the input
1448
- unput: function unput(r) {
1449
- var l = r.length, u = r.split(/(?:\r\n?|\n)/g);
1450
- this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
1451
- var g = this.match.split(/(?:\r\n?|\n)/g);
1452
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), u.length - 1 && (this.yylineno -= u.length - 1);
1453
- var b = this.yylloc.range;
1454
- return this.yylloc = {
1455
- first_line: this.yylloc.first_line,
1456
- last_line: this.yylineno + 1,
1457
- first_column: this.yylloc.first_column,
1458
- last_column: u ? (u.length === g.length ? this.yylloc.first_column : 0) + g[g.length - u.length].length - u[0].length : this.yylloc.first_column - l
1459
- }, this.options.ranges && (this.yylloc.range = [
1460
- b[0],
1461
- b[0] + this.yyleng - l
1462
- ]), this.yyleng = this.yytext.length, this;
1463
- },
1464
- // When called from action, caches matched text and appends it on next action
1465
- more: function more() {
1466
- return this._more = !0, this;
1467
- },
1468
- // 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.
1469
- reject: function reject() {
1470
- if (this.options.backtrack_lexer) this._backtrack = !0;
1471
- else 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).\n" + this.showPosition(), {
1472
- text: "",
1473
- token: null,
1474
- line: this.yylineno
1475
- });
1476
- return this;
1477
- },
1478
- // retain first n characters of the match
1479
- less: function less(r) {
1480
- this.unput(this.match.slice(r));
1481
- },
1482
- // displays already matched input, i.e. for error messages
1483
- pastInput: function pastInput() {
1484
- var r = this.matched.substr(0, this.matched.length - this.match.length);
1485
- return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
1486
- },
1487
- // displays upcoming input, i.e. for error messages
1488
- upcomingInput: function upcomingInput() {
1489
- var r = this.match;
1490
- return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
1491
- },
1492
- // displays the character position where the lexing error occurred, i.e. for error messages
1493
- showPosition: function showPosition() {
1494
- var r = this.pastInput(), l = new Array(r.length + 1).join("-");
1495
- return r + this.upcomingInput() + "\n" + l + "^";
1496
- },
1497
- // test the lexed token: return FALSE when not a match, otherwise return token
1498
- test_match: function test_match(r, l) {
1499
- var u, g, b;
1500
- if (this.options.backtrack_lexer && (b = {
1501
- yylineno: this.yylineno,
1502
- yylloc: {
1503
- first_line: this.yylloc.first_line,
1504
- last_line: this.last_line,
1505
- first_column: this.yylloc.first_column,
1506
- last_column: this.yylloc.last_column
1507
- },
1508
- yytext: this.yytext,
1509
- match: this.match,
1510
- matches: this.matches,
1511
- matched: this.matched,
1512
- yyleng: this.yyleng,
1513
- offset: this.offset,
1514
- _more: this._more,
1515
- _input: this._input,
1516
- yy: this.yy,
1517
- conditionStack: this.conditionStack.slice(0),
1518
- done: this.done
1519
- }, this.options.ranges && (b.yylloc.range = this.yylloc.range.slice(0))), g = r[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
1520
- first_line: this.yylloc.last_line,
1521
- last_line: this.yylineno + 1,
1522
- first_column: this.yylloc.last_column,
1523
- last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
1524
- }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [
1525
- this.offset,
1526
- this.offset += this.yyleng
1527
- ]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], u = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u) return u;
1528
- if (this._backtrack) {
1529
- for(var a in b)this[a] = b[a];
1530
- return !1;
1531
- }
1532
- return !1;
1533
- },
1534
- // return next match in input
1535
- next: function next() {
1536
- if (this.done) return this.EOF;
1537
- this._input || (this.done = !0);
1538
- var r, l, u, g;
1539
- this._more || (this.yytext = "", this.match = "");
1540
- for(var b = this._currentRules(), a = 0; a < b.length; a++)if (u = this._input.match(this.rules[b[a]]), u && (!l || u[0].length > l[0].length)) {
1541
- if (l = u, g = a, this.options.backtrack_lexer) {
1542
- if (r = this.test_match(u, b[a]), r !== !1) return r;
1543
- if (this._backtrack) {
1544
- l = !1;
1545
- continue;
1546
- } else return !1;
1547
- } else if (!this.options.flex) break;
1548
- }
1549
- return l ? (r = this.test_match(l, b[g]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1550
- text: "",
1551
- token: null,
1552
- line: this.yylineno
1553
- });
1554
- },
1555
- // return next match that has a token
1556
- lex: function lex() {
1557
- var l = this.next();
1558
- return l || this.lex();
1559
- },
1560
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1561
- begin: function begin(l) {
1562
- this.conditionStack.push(l);
1563
- },
1564
- // pop the previously active lexer condition state off the condition stack
1565
- popState: function popState() {
1566
- var l = this.conditionStack.length - 1;
1567
- return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1568
- },
1569
- // produce the lexer rule set which is active for the currently active lexer condition state
1570
- _currentRules: function _currentRules() {
1571
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1572
- },
1573
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1574
- topState: function topState(l) {
1575
- return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
1576
- },
1577
- // alias for begin(condition)
1578
- pushState: function pushState(l) {
1579
- this.begin(l);
1580
- },
1581
- // return the number of states currently on the stack
1582
- stateStackSize: function stateStackSize() {
1583
- return this.conditionStack.length;
1584
- },
1585
- options: {
1586
- "case-insensitive": !0
1587
- },
1588
- performAction: function performAction(l, u, g, b) {
1589
- switch(g){
1590
- case 0:
1591
- break;
1592
- case 1:
1593
- break;
1594
- case 2:
1595
- return this.popState(), 34;
1596
- case 3:
1597
- return this.popState(), 34;
1598
- case 4:
1599
- return 34;
1600
- case 5:
1601
- break;
1602
- case 6:
1603
- return 10;
1604
- case 7:
1605
- return this.pushState("acc_title"), 19;
1606
- case 8:
1607
- return this.popState(), "acc_title_value";
1608
- case 9:
1609
- return this.pushState("acc_descr"), 21;
1610
- case 10:
1611
- return this.popState(), "acc_descr_value";
1612
- case 11:
1613
- this.pushState("acc_descr_multiline");
1614
- break;
1615
- case 12:
1616
- this.popState();
1617
- break;
1618
- case 13:
1619
- return "acc_descr_multiline_value";
1620
- case 14:
1621
- return 5;
1622
- case 15:
1623
- return 8;
1624
- case 16:
1625
- return this.pushState("axis_data"), "X_AXIS";
1626
- case 17:
1627
- return this.pushState("axis_data"), "Y_AXIS";
1628
- case 18:
1629
- return this.pushState("axis_band_data"), 24;
1630
- case 19:
1631
- return 31;
1632
- case 20:
1633
- return this.pushState("data"), 16;
1634
- case 21:
1635
- return this.pushState("data"), 18;
1636
- case 22:
1637
- return this.pushState("data_inner"), 24;
1638
- case 23:
1639
- return 27;
1640
- case 24:
1641
- return this.popState(), 26;
1642
- case 25:
1643
- this.popState();
1644
- break;
1645
- case 26:
1646
- this.pushState("string");
1647
- break;
1648
- case 27:
1649
- this.popState();
1650
- break;
1651
- case 28:
1652
- return "STR";
1653
- case 29:
1654
- return 24;
1655
- case 30:
1656
- return 26;
1657
- case 31:
1658
- return 43;
1659
- case 32:
1660
- return "COLON";
1661
- case 33:
1662
- return 44;
1663
- case 34:
1664
- return 28;
1665
- case 35:
1666
- return 45;
1667
- case 36:
1668
- return 46;
1669
- case 37:
1670
- return 48;
1671
- case 38:
1672
- return 50;
1673
- case 39:
1674
- return 47;
1675
- case 40:
1676
- return 41;
1677
- case 41:
1678
- return 49;
1679
- case 42:
1680
- return 42;
1681
- case 43:
1682
- break;
1683
- case 44:
1684
- return 35;
1685
- case 45:
1686
- return 36;
1687
- }
1688
- },
1689
- rules: [
1690
- /^(?:%%(?!\{)[^\n]*)/i,
1691
- /^(?:[^\}]%%[^\n]*)/i,
1692
- /^(?:(\r?\n))/i,
1693
- /^(?:(\r?\n))/i,
1694
- /^(?:[\n\r]+)/i,
1695
- /^(?:%%[^\n]*)/i,
1696
- /^(?:title\b)/i,
1697
- /^(?:accTitle\s*:\s*)/i,
1698
- /^(?:(?!\n||)*[^\n]*)/i,
1699
- /^(?:accDescr\s*:\s*)/i,
1700
- /^(?:(?!\n||)*[^\n]*)/i,
1701
- /^(?:accDescr\s*\{\s*)/i,
1702
- /^(?:\{)/i,
1703
- /^(?:[^\}]*)/i,
1704
- /^(?:xychart-beta\b)/i,
1705
- /^(?:(?:vertical|horizontal))/i,
1706
- /^(?:x-axis\b)/i,
1707
- /^(?:y-axis\b)/i,
1708
- /^(?:\[)/i,
1709
- /^(?:-->)/i,
1710
- /^(?:line\b)/i,
1711
- /^(?:bar\b)/i,
1712
- /^(?:\[)/i,
1713
- /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,
1714
- /^(?:\])/i,
1715
- /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,
1716
- /^(?:["])/i,
1717
- /^(?:["])/i,
1718
- /^(?:[^"]*)/i,
1719
- /^(?:\[)/i,
1720
- /^(?:\])/i,
1721
- /^(?:[A-Za-z]+)/i,
1722
- /^(?::)/i,
1723
- /^(?:\+)/i,
1724
- /^(?:,)/i,
1725
- /^(?:=)/i,
1726
- /^(?:\*)/i,
1727
- /^(?:#)/i,
1728
- /^(?:[\_])/i,
1729
- /^(?:\.)/i,
1730
- /^(?:&)/i,
1731
- /^(?:-)/i,
1732
- /^(?:[0-9]+)/i,
1733
- /^(?:\s+)/i,
1734
- /^(?:;)/i,
1735
- /^(?:$)/i
1736
- ],
1737
- conditions: {
1738
- data_inner: {
1739
- rules: [
1740
- 0,
1741
- 1,
1742
- 4,
1743
- 5,
1744
- 6,
1745
- 7,
1746
- 9,
1747
- 11,
1748
- 14,
1749
- 15,
1750
- 16,
1751
- 17,
1752
- 20,
1753
- 21,
1754
- 23,
1755
- 24,
1756
- 25,
1757
- 26,
1758
- 29,
1759
- 30,
1760
- 31,
1761
- 32,
1762
- 33,
1763
- 34,
1764
- 35,
1765
- 36,
1766
- 37,
1767
- 38,
1768
- 39,
1769
- 40,
1770
- 41,
1771
- 42,
1772
- 43,
1773
- 44,
1774
- 45
1775
- ],
1776
- inclusive: !0
1777
- },
1778
- data: {
1779
- rules: [
1780
- 0,
1781
- 1,
1782
- 3,
1783
- 4,
1784
- 5,
1785
- 6,
1786
- 7,
1787
- 9,
1788
- 11,
1789
- 14,
1790
- 15,
1791
- 16,
1792
- 17,
1793
- 20,
1794
- 21,
1795
- 22,
1796
- 25,
1797
- 26,
1798
- 29,
1799
- 30,
1800
- 31,
1801
- 32,
1802
- 33,
1803
- 34,
1804
- 35,
1805
- 36,
1806
- 37,
1807
- 38,
1808
- 39,
1809
- 40,
1810
- 41,
1811
- 42,
1812
- 43,
1813
- 44,
1814
- 45
1815
- ],
1816
- inclusive: !0
1817
- },
1818
- axis_band_data: {
1819
- rules: [
1820
- 0,
1821
- 1,
1822
- 4,
1823
- 5,
1824
- 6,
1825
- 7,
1826
- 9,
1827
- 11,
1828
- 14,
1829
- 15,
1830
- 16,
1831
- 17,
1832
- 20,
1833
- 21,
1834
- 24,
1835
- 25,
1836
- 26,
1837
- 29,
1838
- 30,
1839
- 31,
1840
- 32,
1841
- 33,
1842
- 34,
1843
- 35,
1844
- 36,
1845
- 37,
1846
- 38,
1847
- 39,
1848
- 40,
1849
- 41,
1850
- 42,
1851
- 43,
1852
- 44,
1853
- 45
1854
- ],
1855
- inclusive: !0
1856
- },
1857
- axis_data: {
1858
- rules: [
1859
- 0,
1860
- 1,
1861
- 2,
1862
- 4,
1863
- 5,
1864
- 6,
1865
- 7,
1866
- 9,
1867
- 11,
1868
- 14,
1869
- 15,
1870
- 16,
1871
- 17,
1872
- 18,
1873
- 19,
1874
- 20,
1875
- 21,
1876
- 23,
1877
- 25,
1878
- 26,
1879
- 29,
1880
- 30,
1881
- 31,
1882
- 32,
1883
- 33,
1884
- 34,
1885
- 35,
1886
- 36,
1887
- 37,
1888
- 38,
1889
- 39,
1890
- 40,
1891
- 41,
1892
- 42,
1893
- 43,
1894
- 44,
1895
- 45
1896
- ],
1897
- inclusive: !0
1898
- },
1899
- acc_descr_multiline: {
1900
- rules: [
1901
- 12,
1902
- 13
1903
- ],
1904
- inclusive: !1
1905
- },
1906
- acc_descr: {
1907
- rules: [
1908
- 10
1909
- ],
1910
- inclusive: !1
1911
- },
1912
- acc_title: {
1913
- rules: [
1914
- 8
1915
- ],
1916
- inclusive: !1
1917
- },
1918
- title: {
1919
- rules: [],
1920
- inclusive: !1
1921
- },
1922
- md_string: {
1923
- rules: [],
1924
- inclusive: !1
1925
- },
1926
- string: {
1927
- rules: [
1928
- 27,
1929
- 28
1930
- ],
1931
- inclusive: !1
1932
- },
1933
- INITIAL: {
1934
- rules: [
1935
- 0,
1936
- 1,
1937
- 4,
1938
- 5,
1939
- 6,
1940
- 7,
1941
- 9,
1942
- 11,
1943
- 14,
1944
- 15,
1945
- 16,
1946
- 17,
1947
- 20,
1948
- 21,
1949
- 25,
1950
- 26,
1951
- 29,
1952
- 30,
1953
- 31,
1954
- 32,
1955
- 33,
1956
- 34,
1957
- 35,
1958
- 36,
1959
- 37,
1960
- 38,
1961
- 39,
1962
- 40,
1963
- 41,
1964
- 42,
1965
- 43,
1966
- 44,
1967
- 45
1968
- ],
1969
- inclusive: !0
1970
- }
1971
- }
1972
- };
1973
- return V;
1974
- }();
1975
- K.lexer = It;
1976
- function Z() {
1977
- this.yy = {};
1978
- }
1979
- return Z.prototype = K, K.Parser = Z, new Z();
1980
- }();
1981
- nt.parser = nt;
1982
- var ti = nt;
1983
- function mt(e) {
1984
- return e.type === "bar";
1985
- }
1986
- function _t(e) {
1987
- return e.type === "band";
1988
- }
1989
- function N(e) {
1990
- return e.type === "linear";
1991
- }
1992
- var kt = /*#__PURE__*/ function() {
1993
- function kt(t) {
1994
- _class_call_check(this, kt);
1995
- this.parentGroup = t;
1996
- }
1997
- _create_class(kt, [
1998
- {
1999
- key: "getMaxDimension",
2000
- value: function getMaxDimension(t, i) {
2001
- if (!this.parentGroup) return {
2002
- width: t.reduce(function(o, c) {
2003
- return Math.max(c.length, o);
2004
- }, 0) * i,
2005
- height: i
2006
- };
2007
- var s = {
2008
- width: 0,
2009
- height: 0
2010
- }, n = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
2011
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2012
- try {
2013
- for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2014
- var o = _step.value;
2015
- var c = createText03b82060.Qr(n, 1, o), f = c ? c.width : o.length * i, d = c ? c.height : i;
2016
- s.width = Math.max(s.width, f), s.height = Math.max(s.height, d);
2017
- }
2018
- } catch (err) {
2019
- _didIteratorError = true;
2020
- _iteratorError = err;
2021
- } finally{
2022
- try {
2023
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2024
- _iterator.return();
2025
- }
2026
- } finally{
2027
- if (_didIteratorError) {
2028
- throw _iteratorError;
2029
- }
2030
- }
2031
- }
2032
- return n.remove(), s;
2033
- }
2034
- }
2035
- ]);
2036
- return kt;
2037
- }();
2038
- var yt = 0.7, bt = 0.2;
2039
- var Rt = /*#__PURE__*/ function() {
2040
- function Rt(t, i, s, n) {
2041
- _class_call_check(this, Rt);
2042
- this.axisConfig = t, this.title = i, this.textDimensionCalculator = s, this.axisThemeConfig = n, this.boundingRect = {
2043
- x: 0,
2044
- y: 0,
2045
- width: 0,
2046
- height: 0
2047
- }, 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.range = [
2048
- 0,
2049
- 10
2050
- ], this.boundingRect = {
2051
- x: 0,
2052
- y: 0,
2053
- width: 0,
2054
- height: 0
2055
- }, this.axisPosition = "left";
2056
- }
2057
- _create_class(Rt, [
2058
- {
2059
- key: "setRange",
2060
- value: function setRange(t) {
2061
- 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();
2062
- }
2063
- },
2064
- {
2065
- key: "getRange",
2066
- value: function getRange() {
2067
- return [
2068
- this.range[0] + this.outerPadding,
2069
- this.range[1] - this.outerPadding
2070
- ];
2071
- }
2072
- },
2073
- {
2074
- key: "setAxisPosition",
2075
- value: function setAxisPosition(t) {
2076
- this.axisPosition = t, this.setRange(this.range);
2077
- }
2078
- },
2079
- {
2080
- key: "getTickDistance",
2081
- value: function getTickDistance() {
2082
- var t = this.getRange();
2083
- return Math.abs(t[0] - t[1]) / this.getTickValues().length;
2084
- }
2085
- },
2086
- {
2087
- key: "getAxisOuterPadding",
2088
- value: function getAxisOuterPadding() {
2089
- return this.outerPadding;
2090
- }
2091
- },
2092
- {
2093
- key: "getLabelDimension",
2094
- value: function getLabelDimension() {
2095
- return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(function(t) {
2096
- return t.toString();
2097
- }), this.axisConfig.labelFontSize);
2098
- }
2099
- },
2100
- {
2101
- key: "recalculateOuterPaddingToDrawBar",
2102
- value: function recalculateOuterPaddingToDrawBar() {
2103
- yt * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(yt * this.getTickDistance() / 2)), this.recalculateScale();
2104
- }
2105
- },
2106
- {
2107
- key: "calculateSpaceIfDrawnHorizontally",
2108
- value: function calculateSpaceIfDrawnHorizontally(t) {
2109
- var i = t.height;
2110
- if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
2111
- var s = this.getLabelDimension(), n = bt * t.width;
2112
- this.outerPadding = Math.min(s.width / 2, n);
2113
- var o = s.height + this.axisConfig.labelPadding * 2;
2114
- this.labelTextHeight = s.height, o <= i && (i -= o, this.showLabel = !0);
2115
- }
2116
- if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
2117
- var s1 = this.textDimensionCalculator.getMaxDimension([
2118
- this.title
2119
- ], this.axisConfig.titleFontSize), n1 = s1.height + this.axisConfig.titlePadding * 2;
2120
- this.titleTextHeight = s1.height, n1 <= i && (i -= n1, this.showTitle = !0);
2121
- }
2122
- this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
2123
- }
2124
- },
2125
- {
2126
- key: "calculateSpaceIfDrawnVertical",
2127
- value: function calculateSpaceIfDrawnVertical(t) {
2128
- var i = t.width;
2129
- if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
2130
- var s = this.getLabelDimension(), n = bt * t.height;
2131
- this.outerPadding = Math.min(s.height / 2, n);
2132
- var o = s.width + this.axisConfig.labelPadding * 2;
2133
- o <= i && (i -= o, this.showLabel = !0);
2134
- }
2135
- if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
2136
- var s1 = this.textDimensionCalculator.getMaxDimension([
2137
- this.title
2138
- ], this.axisConfig.titleFontSize), n1 = s1.height + this.axisConfig.titlePadding * 2;
2139
- this.titleTextHeight = s1.height, n1 <= i && (i -= n1, this.showTitle = !0);
2140
- }
2141
- this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
2142
- }
2143
- },
2144
- {
2145
- key: "calculateSpace",
2146
- value: function calculateSpace(t) {
2147
- return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
2148
- width: this.boundingRect.width,
2149
- height: this.boundingRect.height
2150
- };
2151
- }
2152
- },
2153
- {
2154
- key: "setBoundingBoxXY",
2155
- value: function setBoundingBoxXY(t) {
2156
- this.boundingRect.x = t.x, this.boundingRect.y = t.y;
2157
- }
2158
- },
2159
- {
2160
- key: "getDrawableElementsForLeftAxis",
2161
- value: function getDrawableElementsForLeftAxis() {
2162
- var _this = this;
2163
- var t = [];
2164
- if (this.showAxisLine) {
2165
- var i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
2166
- t.push({
2167
- type: "path",
2168
- groupTexts: [
2169
- "left-axis",
2170
- "axisl-line"
2171
- ],
2172
- data: [
2173
- {
2174
- path: "M ".concat(i, ",").concat(this.boundingRect.y, " L ").concat(i, ",").concat(this.boundingRect.y + this.boundingRect.height, " "),
2175
- strokeFill: this.axisThemeConfig.axisLineColor,
2176
- strokeWidth: this.axisConfig.axisLineWidth
2177
- }
2178
- ]
2179
- });
2180
- }
2181
- if (this.showLabel && t.push({
2182
- type: "text",
2183
- groupTexts: [
2184
- "left-axis",
2185
- "label"
2186
- ],
2187
- data: this.getTickValues().map(function(i) {
2188
- return {
2189
- text: i.toString(),
2190
- 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),
2191
- y: _this.getScaleValue(i),
2192
- fill: _this.axisThemeConfig.labelColor,
2193
- fontSize: _this.axisConfig.labelFontSize,
2194
- rotation: 0,
2195
- verticalPos: "middle",
2196
- horizontalPos: "right"
2197
- };
2198
- })
2199
- }), this.showTick) {
2200
- var i1 = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
2201
- t.push({
2202
- type: "path",
2203
- groupTexts: [
2204
- "left-axis",
2205
- "ticks"
2206
- ],
2207
- data: this.getTickValues().map(function(s) {
2208
- return {
2209
- path: "M ".concat(i1, ",").concat(_this.getScaleValue(s), " L ").concat(i1 - _this.axisConfig.tickLength, ",").concat(_this.getScaleValue(s)),
2210
- strokeFill: _this.axisThemeConfig.tickColor,
2211
- strokeWidth: _this.axisConfig.tickWidth
2212
- };
2213
- })
2214
- });
2215
- }
2216
- return this.showTitle && t.push({
2217
- type: "text",
2218
- groupTexts: [
2219
- "left-axis",
2220
- "title"
2221
- ],
2222
- data: [
2223
- {
2224
- text: this.title,
2225
- x: this.boundingRect.x + this.axisConfig.titlePadding,
2226
- y: this.boundingRect.y + this.boundingRect.height / 2,
2227
- fill: this.axisThemeConfig.titleColor,
2228
- fontSize: this.axisConfig.titleFontSize,
2229
- rotation: 270,
2230
- verticalPos: "top",
2231
- horizontalPos: "center"
2232
- }
2233
- ]
2234
- }), t;
2235
- }
2236
- },
2237
- {
2238
- key: "getDrawableElementsForBottomAxis",
2239
- value: function getDrawableElementsForBottomAxis() {
2240
- var _this = this;
2241
- var t = [];
2242
- if (this.showAxisLine) {
2243
- var i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
2244
- t.push({
2245
- type: "path",
2246
- groupTexts: [
2247
- "bottom-axis",
2248
- "axis-line"
2249
- ],
2250
- data: [
2251
- {
2252
- path: "M ".concat(this.boundingRect.x, ",").concat(i, " L ").concat(this.boundingRect.x + this.boundingRect.width, ",").concat(i),
2253
- strokeFill: this.axisThemeConfig.axisLineColor,
2254
- strokeWidth: this.axisConfig.axisLineWidth
2255
- }
2256
- ]
2257
- });
2258
- }
2259
- if (this.showLabel && t.push({
2260
- type: "text",
2261
- groupTexts: [
2262
- "bottom-axis",
2263
- "label"
2264
- ],
2265
- data: this.getTickValues().map(function(i) {
2266
- return {
2267
- text: i.toString(),
2268
- x: _this.getScaleValue(i),
2269
- y: _this.boundingRect.y + _this.axisConfig.labelPadding + (_this.showTick ? _this.axisConfig.tickLength : 0) + (_this.showAxisLine ? _this.axisConfig.axisLineWidth : 0),
2270
- fill: _this.axisThemeConfig.labelColor,
2271
- fontSize: _this.axisConfig.labelFontSize,
2272
- rotation: 0,
2273
- verticalPos: "top",
2274
- horizontalPos: "center"
2275
- };
2276
- })
2277
- }), this.showTick) {
2278
- var i1 = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
2279
- t.push({
2280
- type: "path",
2281
- groupTexts: [
2282
- "bottom-axis",
2283
- "ticks"
2284
- ],
2285
- data: this.getTickValues().map(function(s) {
2286
- return {
2287
- path: "M ".concat(_this.getScaleValue(s), ",").concat(i1, " L ").concat(_this.getScaleValue(s), ",").concat(i1 + _this.axisConfig.tickLength),
2288
- strokeFill: _this.axisThemeConfig.tickColor,
2289
- strokeWidth: _this.axisConfig.tickWidth
2290
- };
2291
- })
2292
- });
2293
- }
2294
- return this.showTitle && t.push({
2295
- type: "text",
2296
- groupTexts: [
2297
- "bottom-axis",
2298
- "title"
2299
- ],
2300
- data: [
2301
- {
2302
- text: this.title,
2303
- x: this.range[0] + (this.range[1] - this.range[0]) / 2,
2304
- y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
2305
- fill: this.axisThemeConfig.titleColor,
2306
- fontSize: this.axisConfig.titleFontSize,
2307
- rotation: 0,
2308
- verticalPos: "top",
2309
- horizontalPos: "center"
2310
- }
2311
- ]
2312
- }), t;
2313
- }
2314
- },
2315
- {
2316
- key: "getDrawableElementsForTopAxis",
2317
- value: function getDrawableElementsForTopAxis() {
2318
- var _this = this;
2319
- var t = [];
2320
- if (this.showAxisLine) {
2321
- var i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
2322
- t.push({
2323
- type: "path",
2324
- groupTexts: [
2325
- "top-axis",
2326
- "axis-line"
2327
- ],
2328
- data: [
2329
- {
2330
- path: "M ".concat(this.boundingRect.x, ",").concat(i, " L ").concat(this.boundingRect.x + this.boundingRect.width, ",").concat(i),
2331
- strokeFill: this.axisThemeConfig.axisLineColor,
2332
- strokeWidth: this.axisConfig.axisLineWidth
2333
- }
2334
- ]
2335
- });
2336
- }
2337
- if (this.showLabel && t.push({
2338
- type: "text",
2339
- groupTexts: [
2340
- "top-axis",
2341
- "label"
2342
- ],
2343
- data: this.getTickValues().map(function(i) {
2344
- return {
2345
- text: i.toString(),
2346
- x: _this.getScaleValue(i),
2347
- y: _this.boundingRect.y + (_this.showTitle ? _this.titleTextHeight + _this.axisConfig.titlePadding * 2 : 0) + _this.axisConfig.labelPadding,
2348
- fill: _this.axisThemeConfig.labelColor,
2349
- fontSize: _this.axisConfig.labelFontSize,
2350
- rotation: 0,
2351
- verticalPos: "top",
2352
- horizontalPos: "center"
2353
- };
2354
- })
2355
- }), this.showTick) {
2356
- var i1 = this.boundingRect.y;
2357
- t.push({
2358
- type: "path",
2359
- groupTexts: [
2360
- "top-axis",
2361
- "ticks"
2362
- ],
2363
- data: this.getTickValues().map(function(s) {
2364
- return {
2365
- path: "M ".concat(_this.getScaleValue(s), ",").concat(i1 + _this.boundingRect.height - (_this.showAxisLine ? _this.axisConfig.axisLineWidth : 0), " L ").concat(_this.getScaleValue(s), ",").concat(i1 + _this.boundingRect.height - _this.axisConfig.tickLength - (_this.showAxisLine ? _this.axisConfig.axisLineWidth : 0)),
2366
- strokeFill: _this.axisThemeConfig.tickColor,
2367
- strokeWidth: _this.axisConfig.tickWidth
2368
- };
2369
- })
2370
- });
2371
- }
2372
- return this.showTitle && t.push({
2373
- type: "text",
2374
- groupTexts: [
2375
- "top-axis",
2376
- "title"
2377
- ],
2378
- data: [
2379
- {
2380
- text: this.title,
2381
- x: this.boundingRect.x + this.boundingRect.width / 2,
2382
- y: this.boundingRect.y + this.axisConfig.titlePadding,
2383
- fill: this.axisThemeConfig.titleColor,
2384
- fontSize: this.axisConfig.titleFontSize,
2385
- rotation: 0,
2386
- verticalPos: "top",
2387
- horizontalPos: "center"
2388
- }
2389
- ]
2390
- }), t;
2391
- }
2392
- },
2393
- {
2394
- key: "getDrawableElements",
2395
- value: function getDrawableElements() {
2396
- if (this.axisPosition === "left") return this.getDrawableElementsForLeftAxis();
2397
- if (this.axisPosition === "right") throw Error("Drawing of right axis is not implemented");
2398
- return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
2399
- }
2400
- }
2401
- ]);
2402
- return Rt;
2403
- }();
2404
- var ii = /*#__PURE__*/ function(Rt) {
2405
- _inherits(ii, Rt);
2406
- var _super = _create_super(ii);
2407
- function ii(t, i, s, n, o) {
2408
- _class_call_check(this, ii);
2409
- var _this;
2410
- _this = _super.call(this, t, n, o, i), _this.categories = s, _this.scale = st().domain(_this.categories).range(_this.getRange());
2411
- return _possible_constructor_return(_this);
2412
- }
2413
- _create_class(ii, [
2414
- {
2415
- key: "setRange",
2416
- value: function setRange(t) {
2417
- _get(_get_prototype_of(ii.prototype), "setRange", this).call(this, t);
2418
- }
2419
- },
2420
- {
2421
- key: "recalculateScale",
2422
- value: function recalculateScale() {
2423
- this.scale = st().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), index.L.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
2424
- }
2425
- },
2426
- {
2427
- key: "getTickValues",
2428
- value: function getTickValues() {
2429
- return this.categories;
2430
- }
2431
- },
2432
- {
2433
- key: "getScaleValue",
2434
- value: function getScaleValue(t) {
2435
- return this.scale(t) || this.getRange()[0];
2436
- }
2437
- }
2438
- ]);
2439
- return ii;
2440
- }(Rt);
2441
- var ei = /*#__PURE__*/ function(Rt) {
2442
- _inherits(ei, Rt);
2443
- var _super = _create_super(ei);
2444
- function ei(t, i, s, n, o) {
2445
- _class_call_check(this, ei);
2446
- var _this;
2447
- _this = _super.call(this, t, n, o, i), _this.domain = s, _this.scale = linear9bcf74c4.Hn().domain(_this.domain).range(_this.getRange());
2448
- return _possible_constructor_return(_this);
2449
- }
2450
- _create_class(ei, [
2451
- {
2452
- key: "getTickValues",
2453
- value: function getTickValues() {
2454
- return this.scale.ticks();
2455
- }
2456
- },
2457
- {
2458
- key: "recalculateScale",
2459
- value: function recalculateScale() {
2460
- var t = _to_consumable_array(this.domain);
2461
- this.axisPosition === "left" && t.reverse(), this.scale = linear9bcf74c4.Hn().domain(t).range(this.getRange());
2462
- }
2463
- },
2464
- {
2465
- key: "getScaleValue",
2466
- value: function getScaleValue(t) {
2467
- return this.scale(t);
2468
- }
2469
- }
2470
- ]);
2471
- return ei;
2472
- }(Rt);
2473
- function At(e, t, i, s) {
2474
- var n = new kt(s);
2475
- return _t(e) ? new ii(t, i, e.categories, e.title, n) : new ei(t, i, [
2476
- e.min,
2477
- e.max
2478
- ], e.title, n);
2479
- }
2480
- var si = /*#__PURE__*/ function() {
2481
- function si(t, i, s, n) {
2482
- _class_call_check(this, si);
2483
- this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = n, this.boundingRect = {
2484
- x: 0,
2485
- y: 0,
2486
- width: 0,
2487
- height: 0
2488
- }, this.showChartTitle = !1;
2489
- }
2490
- _create_class(si, [
2491
- {
2492
- key: "setBoundingBoxXY",
2493
- value: function setBoundingBoxXY(t) {
2494
- this.boundingRect.x = t.x, this.boundingRect.y = t.y;
2495
- }
2496
- },
2497
- {
2498
- key: "calculateSpace",
2499
- value: function calculateSpace(t) {
2500
- var i = this.textDimensionCalculator.getMaxDimension([
2501
- this.chartData.title
2502
- ], this.chartConfig.titleFontSize), s = Math.max(i.width, t.width), n = i.height + 2 * this.chartConfig.titlePadding;
2503
- return i.width <= s && i.height <= n && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = s, this.boundingRect.height = n, this.showChartTitle = !0), {
2504
- width: this.boundingRect.width,
2505
- height: this.boundingRect.height
2506
- };
2507
- }
2508
- },
2509
- {
2510
- key: "getDrawableElements",
2511
- value: function getDrawableElements() {
2512
- var t = [];
2513
- return this.showChartTitle && t.push({
2514
- groupTexts: [
2515
- "chart-title"
2516
- ],
2517
- type: "text",
2518
- data: [
2519
- {
2520
- fontSize: this.chartConfig.titleFontSize,
2521
- text: this.chartData.title,
2522
- verticalPos: "middle",
2523
- horizontalPos: "center",
2524
- x: this.boundingRect.x + this.boundingRect.width / 2,
2525
- y: this.boundingRect.y + this.boundingRect.height / 2,
2526
- fill: this.chartThemeConfig.titleColor,
2527
- rotation: 0
2528
- }
2529
- ]
2530
- }), t;
2531
- }
2532
- }
2533
- ]);
2534
- return si;
2535
- }();
2536
- function ni(e, t, i, s) {
2537
- var n = new kt(s);
2538
- return new si(n, e, t, i);
2539
- }
2540
- var ai = /*#__PURE__*/ function() {
2541
- function ai(t, i, s, n, o) {
2542
- _class_call_check(this, ai);
2543
- this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = n, this.plotIndex = o;
2544
- }
2545
- _create_class(ai, [
2546
- {
2547
- key: "getDrawableElement",
2548
- value: function getDrawableElement() {
2549
- var _this = this;
2550
- var t = this.plotData.data.map(function(s) {
2551
- return [
2552
- _this.xAxis.getScaleValue(s[0]),
2553
- _this.yAxis.getScaleValue(s[1])
2554
- ];
2555
- });
2556
- var i;
2557
- return this.orientation === "horizontal" ? i = line24d93f1b.P().y(function(s) {
2558
- return s[0];
2559
- }).x(function(s) {
2560
- return s[1];
2561
- })(t) : i = line24d93f1b.P().x(function(s) {
2562
- return s[0];
2563
- }).y(function(s) {
2564
- return s[1];
2565
- })(t), i ? [
2566
- {
2567
- groupTexts: [
2568
- "plot",
2569
- "line-plot-".concat(this.plotIndex)
2570
- ],
2571
- type: "path",
2572
- data: [
2573
- {
2574
- path: i,
2575
- strokeFill: this.plotData.strokeFill,
2576
- strokeWidth: this.plotData.strokeWidth
2577
- }
2578
- ]
2579
- }
2580
- ] : [];
2581
- }
2582
- }
2583
- ]);
2584
- return ai;
2585
- }();
2586
- var oi = /*#__PURE__*/ function() {
2587
- function oi(t, i, s, n, o, c) {
2588
- _class_call_check(this, oi);
2589
- this.barData = t, this.boundingRect = i, this.xAxis = s, this.yAxis = n, this.orientation = o, this.plotIndex = c;
2590
- }
2591
- _create_class(oi, [
2592
- {
2593
- key: "getDrawableElement",
2594
- value: function getDrawableElement() {
2595
- var _this = this;
2596
- var t = this.barData.data.map(function(o) {
2597
- return [
2598
- _this.xAxis.getScaleValue(o[0]),
2599
- _this.yAxis.getScaleValue(o[1])
2600
- ];
2601
- }), i = 0.05, s = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - i), n = s / 2;
2602
- return this.orientation === "horizontal" ? [
2603
- {
2604
- groupTexts: [
2605
- "plot",
2606
- "bar-plot-".concat(this.plotIndex)
2607
- ],
2608
- type: "rect",
2609
- data: t.map(function(o) {
2610
- return {
2611
- x: _this.boundingRect.x,
2612
- y: o[0] - n,
2613
- height: s,
2614
- width: o[1] - _this.boundingRect.x,
2615
- fill: _this.barData.fill,
2616
- strokeWidth: 0,
2617
- strokeFill: _this.barData.fill
2618
- };
2619
- })
2620
- }
2621
- ] : [
2622
- {
2623
- groupTexts: [
2624
- "plot",
2625
- "bar-plot-".concat(this.plotIndex)
2626
- ],
2627
- type: "rect",
2628
- data: t.map(function(o) {
2629
- return {
2630
- x: o[0] - n,
2631
- y: o[1],
2632
- width: s,
2633
- height: _this.boundingRect.y + _this.boundingRect.height - o[1],
2634
- fill: _this.barData.fill,
2635
- strokeWidth: 0,
2636
- strokeFill: _this.barData.fill
2637
- };
2638
- })
2639
- }
2640
- ];
2641
- }
2642
- }
2643
- ]);
2644
- return oi;
2645
- }();
2646
- var ri = /*#__PURE__*/ function() {
2647
- function ri(t, i, s) {
2648
- _class_call_check(this, ri);
2649
- this.chartConfig = t, this.chartData = i, this.chartThemeConfig = s, this.boundingRect = {
2650
- x: 0,
2651
- y: 0,
2652
- width: 0,
2653
- height: 0
2654
- };
2655
- }
2656
- _create_class(ri, [
2657
- {
2658
- key: "setAxes",
2659
- value: function setAxes(t, i) {
2660
- this.xAxis = t, this.yAxis = i;
2661
- }
2662
- },
2663
- {
2664
- key: "setBoundingBoxXY",
2665
- value: function setBoundingBoxXY(t) {
2666
- this.boundingRect.x = t.x, this.boundingRect.y = t.y;
2667
- }
2668
- },
2669
- {
2670
- key: "calculateSpace",
2671
- value: function calculateSpace(t) {
2672
- return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
2673
- width: this.boundingRect.width,
2674
- height: this.boundingRect.height
2675
- };
2676
- }
2677
- },
2678
- {
2679
- key: "getDrawableElements",
2680
- value: function getDrawableElements() {
2681
- if (!(this.xAxis && this.yAxis)) throw Error("Axes must be passed to render Plots");
2682
- var t = [];
2683
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2684
- try {
2685
- for(var _iterator = this.chartData.plots.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2686
- var _step_value = _sliced_to_array(_step.value, 2), i = _step_value[0], s = _step_value[1];
2687
- switch(s.type){
2688
- case "line":
2689
- {
2690
- var _t;
2691
- var n = new ai(s, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, i);
2692
- (_t = t).push.apply(_t, _to_consumable_array(n.getDrawableElement()));
2693
- }
2694
- break;
2695
- case "bar":
2696
- {
2697
- var _t1;
2698
- var n1 = new oi(s, this.boundingRect, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, i);
2699
- (_t1 = t).push.apply(_t1, _to_consumable_array(n1.getDrawableElement()));
2700
- }
2701
- break;
2702
- }
2703
- }
2704
- } catch (err) {
2705
- _didIteratorError = true;
2706
- _iteratorError = err;
2707
- } finally{
2708
- try {
2709
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2710
- _iterator.return();
2711
- }
2712
- } finally{
2713
- if (_didIteratorError) {
2714
- throw _iteratorError;
2715
- }
2716
- }
2717
- }
2718
- return t;
2719
- }
2720
- }
2721
- ]);
2722
- return ri;
2723
- }();
2724
- function hi(e, t, i) {
2725
- return new ri(e, t, i);
2726
- }
2727
- var li = /*#__PURE__*/ function() {
2728
- function li(t, i, s, n) {
2729
- _class_call_check(this, li);
2730
- this.chartConfig = t, this.chartData = i, this.componentStore = {
2731
- title: ni(t, i, s, n),
2732
- plot: hi(t, i, s),
2733
- xAxis: At(i.xAxis, t.xAxis, {
2734
- titleColor: s.xAxisTitleColor,
2735
- labelColor: s.xAxisLabelColor,
2736
- tickColor: s.xAxisTickColor,
2737
- axisLineColor: s.xAxisLineColor
2738
- }, n),
2739
- yAxis: At(i.yAxis, t.yAxis, {
2740
- titleColor: s.yAxisTitleColor,
2741
- labelColor: s.yAxisLabelColor,
2742
- tickColor: s.yAxisTickColor,
2743
- axisLineColor: s.yAxisLineColor
2744
- }, n)
2745
- };
2746
- }
2747
- _create_class(li, [
2748
- {
2749
- key: "calculateVerticalSpace",
2750
- value: function calculateVerticalSpace() {
2751
- var t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), c = Math.floor(i * this.chartConfig.plotReservedSpacePercent / 100), f = this.componentStore.plot.calculateSpace({
2752
- width: o,
2753
- height: c
2754
- });
2755
- t -= f.width, i -= f.height, f = this.componentStore.title.calculateSpace({
2756
- width: this.chartConfig.width,
2757
- height: i
2758
- }), n = f.height, i -= f.height, this.componentStore.xAxis.setAxisPosition("bottom"), f = this.componentStore.xAxis.calculateSpace({
2759
- width: t,
2760
- height: i
2761
- }), i -= f.height, this.componentStore.yAxis.setAxisPosition("left"), f = this.componentStore.yAxis.calculateSpace({
2762
- width: t,
2763
- height: i
2764
- }), s = f.width, t -= f.width, t > 0 && (o += t, t = 0), i > 0 && (c += i, i = 0), this.componentStore.plot.calculateSpace({
2765
- width: o,
2766
- height: c
2767
- }), this.componentStore.plot.setBoundingBoxXY({
2768
- x: s,
2769
- y: n
2770
- }), this.componentStore.xAxis.setRange([
2771
- s,
2772
- s + o
2773
- ]), this.componentStore.xAxis.setBoundingBoxXY({
2774
- x: s,
2775
- y: n + c
2776
- }), this.componentStore.yAxis.setRange([
2777
- n,
2778
- n + c
2779
- ]), this.componentStore.yAxis.setBoundingBoxXY({
2780
- x: 0,
2781
- y: n
2782
- }), this.chartData.plots.some(function(d) {
2783
- return mt(d);
2784
- }) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
2785
- }
2786
- },
2787
- {
2788
- key: "calculateHorizontalSpace",
2789
- value: function calculateHorizontalSpace() {
2790
- var t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = 0, c = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), f = Math.floor(i * this.chartConfig.plotReservedSpacePercent / 100), d = this.componentStore.plot.calculateSpace({
2791
- width: c,
2792
- height: f
2793
- });
2794
- t -= d.width, i -= d.height, d = this.componentStore.title.calculateSpace({
2795
- width: this.chartConfig.width,
2796
- height: i
2797
- }), s = d.height, i -= d.height, this.componentStore.xAxis.setAxisPosition("left"), d = this.componentStore.xAxis.calculateSpace({
2798
- width: t,
2799
- height: i
2800
- }), t -= d.width, n = d.width, this.componentStore.yAxis.setAxisPosition("top"), d = this.componentStore.yAxis.calculateSpace({
2801
- width: t,
2802
- height: i
2803
- }), i -= d.height, o = s + d.height, t > 0 && (c += t, t = 0), i > 0 && (f += i, i = 0), this.componentStore.plot.calculateSpace({
2804
- width: c,
2805
- height: f
2806
- }), this.componentStore.plot.setBoundingBoxXY({
2807
- x: n,
2808
- y: o
2809
- }), this.componentStore.yAxis.setRange([
2810
- n,
2811
- n + c
2812
- ]), this.componentStore.yAxis.setBoundingBoxXY({
2813
- x: n,
2814
- y: s
2815
- }), this.componentStore.xAxis.setRange([
2816
- o,
2817
- o + f
2818
- ]), this.componentStore.xAxis.setBoundingBoxXY({
2819
- x: 0,
2820
- y: o
2821
- }), this.chartData.plots.some(function(R) {
2822
- return mt(R);
2823
- }) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
2824
- }
2825
- },
2826
- {
2827
- key: "calculateSpace",
2828
- value: function calculateSpace() {
2829
- this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
2830
- }
2831
- },
2832
- {
2833
- key: "getDrawableElement",
2834
- value: function getDrawableElement() {
2835
- var _t;
2836
- this.calculateSpace();
2837
- var t = [];
2838
- this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
2839
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2840
- try {
2841
- for(var _iterator = Object.values(this.componentStore)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2842
- var i = _step.value;
2843
- (_t = t).push.apply(_t, _to_consumable_array(i.getDrawableElements()));
2844
- }
2845
- } catch (err) {
2846
- _didIteratorError = true;
2847
- _iteratorError = err;
2848
- } finally{
2849
- try {
2850
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2851
- _iterator.return();
2852
- }
2853
- } finally{
2854
- if (_didIteratorError) {
2855
- throw _iteratorError;
2856
- }
2857
- }
2858
- }
2859
- return t;
2860
- }
2861
- }
2862
- ]);
2863
- return li;
2864
- }();
2865
- var ci = /*#__PURE__*/ function() {
2866
- function ci() {
2867
- _class_call_check(this, ci);
2868
- }
2869
- _create_class(ci, null, [
2870
- {
2871
- key: "build",
2872
- value: function build(t, i, s, n) {
2873
- return new li(t, i, s, n).getDrawableElement();
2874
- }
2875
- }
2876
- ]);
2877
- return ci;
2878
- }();
2879
- var X = 0, Tt, Y = Pt(), H = Dt(), y = Lt(), at = H.plotColorPalette.split(",").map(function(e) {
2880
- return e.trim();
2881
- }), G = !1, rt = !1;
2882
- function Dt() {
2883
- var e = index.up(), t = index.$t();
2884
- return index.nl(e.xyChart, t.themeVariables.xyChart);
2885
- }
2886
- function Pt() {
2887
- var e = index.$t();
2888
- return index.nl(index.yp.xyChart, e.xyChart);
2889
- }
2890
- function Lt() {
2891
- return {
2892
- yAxis: {
2893
- type: "linear",
2894
- title: "",
2895
- min: 1 / 0,
2896
- max: -1 / 0
2897
- },
2898
- xAxis: {
2899
- type: "band",
2900
- title: "",
2901
- categories: []
2902
- },
2903
- title: "",
2904
- plots: []
2905
- };
2906
- }
2907
- function ht(e) {
2908
- var t = index.$t();
2909
- return index.ai(e.trim(), t);
2910
- }
2911
- function ui(e) {
2912
- Tt = e;
2913
- }
2914
- function gi(e) {
2915
- e === "horizontal" ? Y.chartOrientation = "horizontal" : Y.chartOrientation = "vertical";
2916
- }
2917
- function xi(e) {
2918
- y.xAxis.title = ht(e.text);
2919
- }
2920
- function Et(e, t) {
2921
- y.xAxis = {
2922
- type: "linear",
2923
- title: y.xAxis.title,
2924
- min: e,
2925
- max: t
2926
- }, G = !0;
2927
- }
2928
- function di(e) {
2929
- y.xAxis = {
2930
- type: "band",
2931
- title: y.xAxis.title,
2932
- categories: e.map(function(t) {
2933
- return ht(t.text);
2934
- })
2935
- }, G = !0;
2936
- }
2937
- function fi(e) {
2938
- y.yAxis.title = ht(e.text);
2939
- }
2940
- function pi(e, t) {
2941
- y.yAxis = {
2942
- type: "linear",
2943
- title: y.yAxis.title,
2944
- min: e,
2945
- max: t
2946
- }, rt = !0;
2947
- }
2948
- function mi(e) {
2949
- var _Math, _Math1;
2950
- var t = (_Math = Math).min.apply(_Math, _to_consumable_array(e)), i = (_Math1 = Math).max.apply(_Math1, _to_consumable_array(e)), s = N(y.yAxis) ? y.yAxis.min : 1 / 0, n = N(y.yAxis) ? y.yAxis.max : -1 / 0;
2951
- y.yAxis = {
2952
- type: "linear",
2953
- title: y.yAxis.title,
2954
- min: Math.min(s, t),
2955
- max: Math.max(n, i)
2956
- };
2957
- }
2958
- function vt(e) {
2959
- var t = [];
2960
- if (e.length === 0) return t;
2961
- if (!G) {
2962
- var i = N(y.xAxis) ? y.xAxis.min : 1 / 0, s = N(y.xAxis) ? y.xAxis.max : -1 / 0;
2963
- Et(Math.min(i, 1), Math.max(s, e.length));
2964
- }
2965
- if (rt || mi(e), _t(y.xAxis) && (t = y.xAxis.categories.map(function(i, s) {
2966
- return [
2967
- i,
2968
- e[s]
2969
- ];
2970
- })), N(y.xAxis)) {
2971
- var i1 = y.xAxis.min, s1 = y.xAxis.max, n = (s1 - i1 + 1) / e.length, o = [];
2972
- for(var c = i1; c <= s1; c += n)o.push("".concat(c));
2973
- t = o.map(function(c, f) {
2974
- return [
2975
- c,
2976
- e[f]
2977
- ];
2978
- });
2979
- }
2980
- return t;
2981
- }
2982
- function Mt(e) {
2983
- return at[e === 0 ? 0 : e % at.length];
2984
- }
2985
- function yi(e, t) {
2986
- var i = vt(t);
2987
- y.plots.push({
2988
- type: "line",
2989
- strokeFill: Mt(X),
2990
- strokeWidth: 2,
2991
- data: i
2992
- }), X++;
2993
- }
2994
- function bi(e, t) {
2995
- var i = vt(t);
2996
- y.plots.push({
2997
- type: "bar",
2998
- fill: Mt(X),
2999
- data: i
3000
- }), X++;
3001
- }
3002
- function Ai() {
3003
- if (y.plots.length === 0) throw Error("No Plot to render, please provide a plot with some data");
3004
- return y.title = index.O_(), ci.build(Y, y, H, Tt);
3005
- }
3006
- function wi() {
3007
- return H;
3008
- }
3009
- function Si() {
3010
- return Y;
3011
- }
3012
- var Ci = function Ci() {
3013
- index.B_(), X = 0, Y = Pt(), y = Lt(), H = Dt(), at = H.plotColorPalette.split(",").map(function(e) {
3014
- return e.trim();
3015
- }), G = !1, rt = !1;
3016
- }, _i = {
3017
- getDrawableElem: Ai,
3018
- clear: Ci,
3019
- setAccTitle: index.F_,
3020
- getAccTitle: index.A_,
3021
- setDiagramTitle: index.M_,
3022
- getDiagramTitle: index.O_,
3023
- getAccDescription: index.E_,
3024
- setAccDescription: index.L_,
3025
- setOrientation: gi,
3026
- setXAxisTitle: xi,
3027
- setXAxisRangeData: Et,
3028
- setXAxisBand: di,
3029
- setYAxisTitle: fi,
3030
- setYAxisRangeData: pi,
3031
- setLineData: yi,
3032
- setBarData: bi,
3033
- setTmpSVGG: ui,
3034
- getChartThemeConfig: wi,
3035
- getChartConfig: Si
3036
- }, ki = function(e, t, i, s) {
3037
- var f = function f(p) {
3038
- return p === "top" ? "text-before-edge" : "middle";
3039
- };
3040
- var d = function d(p) {
3041
- return p === "left" ? "start" : p === "right" ? "end" : "middle";
3042
- };
3043
- var R = function R(p) {
3044
- return "translate(".concat(p.x, ", ").concat(p.y, ") rotate(").concat(p.rotation || 0, ")");
3045
- };
3046
- var P = function P(p) {
3047
- var C = A, h = "";
3048
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
3049
- try {
3050
- for(var _iterator = p.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
3051
- var _step_value = _sliced_to_array(_step.value, 1), L = _step_value[0];
3052
- var z = A;
3053
- L > 0 && S[h] && (z = S[h]), h += p[L], C = S[h], C || (C = S[h] = z.append("g").attr("class", p[L]));
3054
- }
3055
- } catch (err) {
3056
- _didIteratorError = true;
3057
- _iteratorError = err;
3058
- } finally{
3059
- try {
3060
- if (!_iteratorNormalCompletion && _iterator.return != null) {
3061
- _iterator.return();
3062
- }
3063
- } finally{
3064
- if (_didIteratorError) {
3065
- throw _iteratorError;
3066
- }
3067
- }
3068
- }
3069
- return C;
3070
- };
3071
- var n = s.db, o = n.getChartThemeConfig(), c = n.getChartConfig();
3072
- index.L.debug("Rendering xychart chart\n" + e);
3073
- var _ = index.z_(t), A = _.append("g").attr("class", "main"), m = A.append("rect").attr("width", c.width).attr("height", c.height).attr("class", "background");
3074
- index.Ol(_, c.height, c.width, !0), _.attr("viewBox", "0 0 ".concat(c.width, " ").concat(c.height)), m.attr("fill", o.backgroundColor), n.setTmpSVGG(_.append("g").attr("class", "mermaid-tmp-group"));
3075
- var T = n.getDrawableElem(), S = {};
3076
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
3077
- try {
3078
- for(var _iterator = T[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
3079
- var p = _step.value;
3080
- if (p.data.length === 0) continue;
3081
- var C = P(p.groupTexts);
3082
- switch(p.type){
3083
- case "rect":
3084
- C.selectAll("rect").data(p.data).enter().append("rect").attr("x", function(h) {
3085
- return h.x;
3086
- }).attr("y", function(h) {
3087
- return h.y;
3088
- }).attr("width", function(h) {
3089
- return h.width;
3090
- }).attr("height", function(h) {
3091
- return h.height;
3092
- }).attr("fill", function(h) {
3093
- return h.fill;
3094
- }).attr("stroke", function(h) {
3095
- return h.strokeFill;
3096
- }).attr("stroke-width", function(h) {
3097
- return h.strokeWidth;
3098
- });
3099
- break;
3100
- case "text":
3101
- C.selectAll("text").data(p.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", function(h) {
3102
- return h.fill;
3103
- }).attr("font-size", function(h) {
3104
- return h.fontSize;
3105
- }).attr("dominant-baseline", function(h) {
3106
- return f(h.verticalPos);
3107
- }).attr("text-anchor", function(h) {
3108
- return d(h.horizontalPos);
3109
- }).attr("transform", function(h) {
3110
- return R(h);
3111
- }).text(function(h) {
3112
- return h.text;
3113
- });
3114
- break;
3115
- case "path":
3116
- C.selectAll("path").data(p.data).enter().append("path").attr("d", function(h) {
3117
- return h.path;
3118
- }).attr("fill", function(h) {
3119
- return h.fill ? h.fill : "none";
3120
- }).attr("stroke", function(h) {
3121
- return h.strokeFill;
3122
- }).attr("stroke-width", function(h) {
3123
- return h.strokeWidth;
3124
- });
3125
- break;
3126
- }
3127
- }
3128
- } catch (err) {
3129
- _didIteratorError = true;
3130
- _iteratorError = err;
3131
- } finally{
3132
- try {
3133
- if (!_iteratorNormalCompletion && _iterator.return != null) {
3134
- _iterator.return();
3135
- }
3136
- } finally{
3137
- if (_didIteratorError) {
3138
- throw _iteratorError;
3139
- }
3140
- }
3141
- }
3142
- }, Ri = {
3143
- draw: ki
3144
- }, Vi = {
3145
- parser: ti,
3146
- db: _i,
3147
- renderer: Ri
3148
- };
3149
-
3150
- exports.diagram = Vi;