@schmitech/chatbot-widget 0.5.3 → 0.5.4

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 (47) hide show
  1. package/dist/Tableau10-D7jGxypv-BNlEL2G_.js +9 -0
  2. package/dist/arc-D-ZI5fuh-CvDHBzlN.js +84 -0
  3. package/dist/blockDiagram-c4efeb88-DUnNxfIR-Bhh-x1q6.js +1221 -0
  4. package/dist/c4Diagram-c83219d4-cC4OxfBG-DRTO_jy5.js +1580 -0
  5. package/dist/channel-hcYozyrT-BSOc2Hp-.js +6 -0
  6. package/dist/chatbot-widget.bundle.js +3881 -1586
  7. package/dist/chatbot-widget.css +1 -1
  8. package/dist/chatbot-widget.es.js +12 -63659
  9. package/dist/chatbot-widget.umd.js +3880 -1585
  10. package/dist/classDiagram-beda092f-BLYhf5Mr-vk4Ko58U.js +218 -0
  11. package/dist/classDiagram-v2-2358418a-VBkbF8mr-Ca0l1fEs.js +201 -0
  12. package/dist/clone-BZIkCMuw-B9owNq6E.js +9 -0
  13. package/dist/config/index.d.ts +2 -2
  14. package/dist/createText-1719965b-UejsQ47k-B1DYw0WW.js +2955 -0
  15. package/dist/edges-96097737-1M5QvjOd-BpQVVoQN.js +1088 -0
  16. package/dist/erDiagram-0228fc6a-CjBNxHoC-DXDVlH55.js +929 -0
  17. package/dist/flowDb-c6c81e3f-Q2aoOxdz-DfrfI3H1.js +1127 -0
  18. package/dist/flowDiagram-50d868cf-zizL6ppE-BAH-_juu.js +788 -0
  19. package/dist/flowDiagram-v2-4f6560a1-DVx_vlO5-bkcRE0UW.js +18 -0
  20. package/dist/flowchart-elk-definition-6af322e1-Eyez36go-B_lk3oHt.js +48132 -0
  21. package/dist/ganttDiagram-a2739b55-C82Jv-TO-DoS-s1Yu.js +1743 -0
  22. package/dist/gitGraphDiagram-82fe8481-D9o_9-U8-DJF-ZeR8.js +1265 -0
  23. package/dist/graph-BjmGDpTe-DgbYS1Ie.js +848 -0
  24. package/dist/index-5325376f-CJL5w-Sw-BXp44Ej5.js +374 -0
  25. package/dist/index-s6Yb6o1D.js +116386 -0
  26. package/dist/infoDiagram-8eee0895-FpS-TLK_-BnvO_wUe.js +320 -0
  27. package/dist/journeyDiagram-c64418c1-CMj1efQ9-CshcRDhm.js +802 -0
  28. package/dist/layout-D_6hdlf3-B7guhEBN.js +1470 -0
  29. package/dist/mindmap-definition-8da855dc-D4SxHjUd-jFZFomnk.js +21924 -0
  30. package/dist/pieDiagram-a8764435-BF5ZqOjB-Mqzg2J4Q.js +498 -0
  31. package/dist/quadrantDiagram-1e28029f-GtQb80VU-DCy1QjzW.js +903 -0
  32. package/dist/requirementDiagram-08caed73-CHtPj3FO-AHEP0cIt.js +767 -0
  33. package/dist/sankeyDiagram-a04cb91d-CBlXzOgd-CWJTc5AX.js +802 -0
  34. package/dist/sequenceDiagram-c5b8d532-Cs1iyw97-oayOJE8v.js +2235 -0
  35. package/dist/shared/styles.d.ts +1 -1
  36. package/dist/stateDiagram-1ecb1508-CpRKICMQ-C5OFJeRZ.js +266 -0
  37. package/dist/stateDiagram-v2-c2b004d7-BtkhFyQ5-DxzE8Je5.js +185 -0
  38. package/dist/styles-b4e223ce-D0oeHeKH-BmNvk4NR.js +1090 -0
  39. package/dist/styles-ca3715f6-BouNgl-L-_qXsPDP3.js +961 -0
  40. package/dist/styles-d45a18b0-Cvhb8Ltu-43I3Cd_I.js +437 -0
  41. package/dist/svgDrawCommon-b86b1483-mg-1NjZY-DrmnILcc.js +65 -0
  42. package/dist/timeline-definition-faaaa080-3olbep_P-BqKpgsPZ.js +793 -0
  43. package/dist/ui/Message.d.ts +1 -5
  44. package/dist/ui/MessagesList.d.ts +1 -5
  45. package/dist/xychartDiagram-f5964ef8-BN6HXpmW-C-g_F1w2.js +1238 -0
  46. package/package.json +3 -3
  47. package/dist/ui/TypingEffect.d.ts +0 -18
@@ -0,0 +1,903 @@
1
+ import { y as Pt, v as vt, w as At, x as Lt, b as Ct, a as zt, g as yt, O as lt, P as ft, W as Et, m as Dt, ae as E, ai as It, p as mt, q as wt } from "./index-s6Yb6o1D.js";
2
+ typeof window < "u" && (window.global = window);
3
+ var gt = function() {
4
+ var e = function($, a, r, l) {
5
+ for (r = r || {}, l = $.length; l--; r[$[l]] = a)
6
+ ;
7
+ return r;
8
+ }, s = [1, 3], o = [1, 4], u = [1, 5], f = [1, 6], c = [1, 7], h = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], g = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], i = [32, 33, 34], x = [2, 7], v = [1, 13], B = [1, 17], Q = [1, 18], D = [1, 19], q = [1, 20], I = [1, 21], O = [1, 22], L = [1, 23], Z = [1, 24], et = [1, 25], it = [1, 26], at = [1, 27], W = [1, 30], X = [1, 31], p = [1, 32], t = [1, 33], T = [1, 34], m = [1, 35], A = [1, 36], b = [1, 37], _ = [1, 38], S = [1, 39], k = [1, 40], F = [1, 41], P = [1, 42], Y = [1, 57], H = [1, 58], C = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], ot = {
9
+ trace: function() {
10
+ },
11
+ yy: {},
12
+ symbols_: { error: 2, start: 3, eol: 4, SPACE: 5, QUADRANT: 6, document: 7, line: 8, statement: 9, axisDetails: 10, quadrantDetails: 11, points: 12, title: 13, title_value: 14, acc_title: 15, acc_title_value: 16, acc_descr: 17, acc_descr_value: 18, acc_descr_multiline_value: 19, section: 20, text: 21, point_start: 22, point_x: 23, point_y: 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, QUADRANT_1: 28, QUADRANT_2: 29, QUADRANT_3: 30, QUADRANT_4: 31, NEWLINE: 32, SEMI: 33, EOF: 34, alphaNumToken: 35, textNoTagsToken: 36, STR: 37, MD_STR: 38, alphaNum: 39, PUNCTUATION: 40, AMP: 41, NUM: 42, ALPHA: 43, COMMA: 44, PLUS: 45, EQUALS: 46, MULT: 47, DOT: 48, BRKT: 49, UNDERSCORE: 50, MINUS: 51, $accept: 0, $end: 1 },
13
+ terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" },
14
+ productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]],
15
+ performAction: function($, a, r, l, y, n, N) {
16
+ var d = n.length - 1;
17
+ switch (y) {
18
+ case 12:
19
+ this.$ = n[d].trim(), l.setDiagramTitle(this.$);
20
+ break;
21
+ case 13:
22
+ this.$ = n[d].trim(), l.setAccTitle(this.$);
23
+ break;
24
+ case 14:
25
+ case 15:
26
+ this.$ = n[d].trim(), l.setAccDescription(this.$);
27
+ break;
28
+ case 16:
29
+ l.addSection(n[d].substr(8)), this.$ = n[d].substr(8);
30
+ break;
31
+ case 17:
32
+ l.addPoint(n[d - 3], n[d - 1], n[d]);
33
+ break;
34
+ case 18:
35
+ l.setXAxisLeftText(n[d - 2]), l.setXAxisRightText(n[d]);
36
+ break;
37
+ case 19:
38
+ n[d - 1].text += " ⟶ ", l.setXAxisLeftText(n[d - 1]);
39
+ break;
40
+ case 20:
41
+ l.setXAxisLeftText(n[d]);
42
+ break;
43
+ case 21:
44
+ l.setYAxisBottomText(n[d - 2]), l.setYAxisTopText(n[d]);
45
+ break;
46
+ case 22:
47
+ n[d - 1].text += " ⟶ ", l.setYAxisBottomText(n[d - 1]);
48
+ break;
49
+ case 23:
50
+ l.setYAxisBottomText(n[d]);
51
+ break;
52
+ case 24:
53
+ l.setQuadrant1Text(n[d]);
54
+ break;
55
+ case 25:
56
+ l.setQuadrant2Text(n[d]);
57
+ break;
58
+ case 26:
59
+ l.setQuadrant3Text(n[d]);
60
+ break;
61
+ case 27:
62
+ l.setQuadrant4Text(n[d]);
63
+ break;
64
+ case 31:
65
+ this.$ = { text: n[d], type: "text" };
66
+ break;
67
+ case 32:
68
+ this.$ = { text: n[d - 1].text + "" + n[d], type: n[d - 1].type };
69
+ break;
70
+ case 33:
71
+ this.$ = { text: n[d], type: "text" };
72
+ break;
73
+ case 34:
74
+ this.$ = { text: n[d], type: "markdown" };
75
+ break;
76
+ case 35:
77
+ this.$ = n[d];
78
+ break;
79
+ case 36:
80
+ this.$ = n[d - 1] + "" + n[d];
81
+ break;
82
+ }
83
+ },
84
+ table: [{ 3: 1, 4: 2, 5: s, 6: o, 32: u, 33: f, 34: c }, { 1: [3] }, { 3: 8, 4: 2, 5: s, 6: o, 32: u, 33: f, 34: c }, { 3: 9, 4: 2, 5: s, 6: o, 32: u, 33: f, 34: c }, e(h, [2, 4], { 7: 10 }), e(g, [2, 28]), e(g, [2, 29]), e(g, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, e(i, x, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: v, 13: B, 15: Q, 17: D, 19: q, 20: I, 25: O, 27: L, 28: Z, 29: et, 30: it, 31: at, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }), e(h, [2, 5]), { 4: 43, 32: u, 33: f, 34: c }, e(i, x, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: v, 13: B, 15: Q, 17: D, 19: q, 20: I, 25: O, 27: L, 28: Z, 29: et, 30: it, 31: at, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }), e(i, [2, 9]), e(i, [2, 10]), e(i, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, e(i, [2, 15]), e(i, [2, 16]), { 21: 48, 35: 29, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }, { 21: 49, 35: 29, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }, { 21: 50, 35: 29, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }, { 21: 51, 35: 29, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }, { 21: 52, 35: 29, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }, { 21: 53, 35: 29, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }, { 5: Y, 22: [1, 54], 35: 56, 36: 55, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }, e(C, [2, 31]), e(C, [2, 33]), e(C, [2, 34]), e(C, [2, 37]), e(C, [2, 38]), e(C, [2, 39]), e(C, [2, 40]), e(C, [2, 41]), e(C, [2, 42]), e(C, [2, 43]), e(C, [2, 44]), e(C, [2, 45]), e(C, [2, 46]), e(C, [2, 47]), e(h, [2, 6]), e(i, [2, 8]), e(i, [2, 12]), e(i, [2, 13]), e(i, [2, 14]), e(i, [2, 20], { 36: 55, 35: 56, 5: Y, 26: [1, 59], 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }), e(i, [2, 23], { 36: 55, 35: 56, 5: Y, 26: [1, 60], 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }), e(i, [2, 24], { 36: 55, 35: 56, 5: Y, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }), e(i, [2, 25], { 36: 55, 35: 56, 5: Y, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }), e(i, [2, 26], { 36: 55, 35: 56, 5: Y, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }), e(i, [2, 27], { 36: 55, 35: 56, 5: Y, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }), { 23: [1, 61] }, e(C, [2, 32]), e(C, [2, 48]), e(C, [2, 49]), e(C, [2, 50]), e(i, [2, 19], { 35: 29, 21: 62, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }), e(i, [2, 22], { 35: 29, 21: 63, 37: W, 38: X, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P }), { 24: [1, 64] }, e(i, [2, 18], { 36: 55, 35: 56, 5: Y, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }), e(i, [2, 21], { 36: 55, 35: 56, 5: Y, 40: p, 41: t, 42: T, 43: m, 44: A, 45: b, 46: _, 47: S, 48: k, 49: F, 50: P, 51: H }), e(i, [2, 17])],
85
+ defaultActions: { 8: [2, 1], 9: [2, 2] },
86
+ parseError: function($, a) {
87
+ if (a.recoverable)
88
+ this.trace($);
89
+ else {
90
+ var r = new Error($);
91
+ throw r.hash = a, r;
92
+ }
93
+ },
94
+ parse: function($) {
95
+ var a = this, r = [0], l = [], y = [null], n = [], N = this.table, d = "", nt = 0, pt = 0, _t = 2, qt = 1, St = n.slice.call(arguments, 1), z = Object.create(this.lexer), G = { yy: {} };
96
+ for (var ct in this.yy)
97
+ Object.prototype.hasOwnProperty.call(this.yy, ct) && (G.yy[ct] = this.yy[ct]);
98
+ z.setInput($, G.yy), G.yy.lexer = z, G.yy.parser = this, typeof z.yylloc > "u" && (z.yylloc = {});
99
+ var dt = z.yylloc;
100
+ n.push(dt);
101
+ var kt = z.options && z.options.ranges;
102
+ typeof G.yy.parseError == "function" ? this.parseError = G.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
103
+ function Ft() {
104
+ var V;
105
+ return V = l.pop() || z.lex() || qt, typeof V != "number" && (V instanceof Array && (l = V, V = l.pop()), V = a.symbols_[V] || V), V;
106
+ }
107
+ for (var U, J, M, ut, tt = {}, st, j, Tt, rt; ; ) {
108
+ if (J = r[r.length - 1], this.defaultActions[J] ? M = this.defaultActions[J] : ((U === null || typeof U > "u") && (U = Ft()), M = N[J] && N[J][U]), typeof M > "u" || !M.length || !M[0]) {
109
+ var xt = "";
110
+ rt = [];
111
+ for (st in N[J])
112
+ this.terminals_[st] && st > _t && rt.push("'" + this.terminals_[st] + "'");
113
+ z.showPosition ? xt = "Parse error on line " + (nt + 1) + `:
114
+ ` + z.showPosition() + `
115
+ Expecting ` + rt.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : xt = "Parse error on line " + (nt + 1) + ": Unexpected " + (U == qt ? "end of input" : "'" + (this.terminals_[U] || U) + "'"), this.parseError(xt, {
116
+ text: z.match,
117
+ token: this.terminals_[U] || U,
118
+ line: z.yylineno,
119
+ loc: dt,
120
+ expected: rt
121
+ });
122
+ }
123
+ if (M[0] instanceof Array && M.length > 1)
124
+ throw new Error("Parse Error: multiple actions possible at state: " + J + ", token: " + U);
125
+ switch (M[0]) {
126
+ case 1:
127
+ r.push(U), y.push(z.yytext), n.push(z.yylloc), r.push(M[1]), U = null, pt = z.yyleng, d = z.yytext, nt = z.yylineno, dt = z.yylloc;
128
+ break;
129
+ case 2:
130
+ if (j = this.productions_[M[1]][1], tt.$ = y[y.length - j], tt._$ = {
131
+ first_line: n[n.length - (j || 1)].first_line,
132
+ last_line: n[n.length - 1].last_line,
133
+ first_column: n[n.length - (j || 1)].first_column,
134
+ last_column: n[n.length - 1].last_column
135
+ }, kt && (tt._$.range = [
136
+ n[n.length - (j || 1)].range[0],
137
+ n[n.length - 1].range[1]
138
+ ]), ut = this.performAction.apply(tt, [
139
+ d,
140
+ pt,
141
+ nt,
142
+ G.yy,
143
+ M[1],
144
+ y,
145
+ n
146
+ ].concat(St)), typeof ut < "u")
147
+ return ut;
148
+ j && (r = r.slice(0, -1 * j * 2), y = y.slice(0, -1 * j), n = n.slice(0, -1 * j)), r.push(this.productions_[M[1]][0]), y.push(tt.$), n.push(tt._$), Tt = N[r[r.length - 2]][r[r.length - 1]], r.push(Tt);
149
+ break;
150
+ case 3:
151
+ return !0;
152
+ }
153
+ }
154
+ return !0;
155
+ }
156
+ }, bt = /* @__PURE__ */ function() {
157
+ var $ = {
158
+ EOF: 1,
159
+ parseError: function(a, r) {
160
+ if (this.yy.parser)
161
+ this.yy.parser.parseError(a, r);
162
+ else
163
+ throw new Error(a);
164
+ },
165
+ // resets the lexer, sets new input
166
+ setInput: function(a, r) {
167
+ return this.yy = r || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
168
+ first_line: 1,
169
+ first_column: 0,
170
+ last_line: 1,
171
+ last_column: 0
172
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
173
+ },
174
+ // consumes and returns one char from the input
175
+ input: function() {
176
+ var a = this._input[0];
177
+ this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
178
+ var r = a.match(/(?:\r\n?|\n).*/g);
179
+ return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), a;
180
+ },
181
+ // unshifts one char (or a string) into the input
182
+ unput: function(a) {
183
+ var r = a.length, l = a.split(/(?:\r\n?|\n)/g);
184
+ this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
185
+ var y = this.match.split(/(?:\r\n?|\n)/g);
186
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
187
+ var n = this.yylloc.range;
188
+ return this.yylloc = {
189
+ first_line: this.yylloc.first_line,
190
+ last_line: this.yylineno + 1,
191
+ first_column: this.yylloc.first_column,
192
+ last_column: l ? (l.length === y.length ? this.yylloc.first_column : 0) + y[y.length - l.length].length - l[0].length : this.yylloc.first_column - r
193
+ }, this.options.ranges && (this.yylloc.range = [n[0], n[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
194
+ },
195
+ // When called from action, caches matched text and appends it on next action
196
+ more: function() {
197
+ return this._more = !0, this;
198
+ },
199
+ // 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.
200
+ reject: function() {
201
+ if (this.options.backtrack_lexer)
202
+ this._backtrack = !0;
203
+ else
204
+ 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).
205
+ ` + this.showPosition(), {
206
+ text: "",
207
+ token: null,
208
+ line: this.yylineno
209
+ });
210
+ return this;
211
+ },
212
+ // retain first n characters of the match
213
+ less: function(a) {
214
+ this.unput(this.match.slice(a));
215
+ },
216
+ // displays already matched input, i.e. for error messages
217
+ pastInput: function() {
218
+ var a = this.matched.substr(0, this.matched.length - this.match.length);
219
+ return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "");
220
+ },
221
+ // displays upcoming input, i.e. for error messages
222
+ upcomingInput: function() {
223
+ var a = this.match;
224
+ return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "");
225
+ },
226
+ // displays the character position where the lexing error occurred, i.e. for error messages
227
+ showPosition: function() {
228
+ var a = this.pastInput(), r = new Array(a.length + 1).join("-");
229
+ return a + this.upcomingInput() + `
230
+ ` + r + "^";
231
+ },
232
+ // test the lexed token: return FALSE when not a match, otherwise return token
233
+ test_match: function(a, r) {
234
+ var l, y, n;
235
+ if (this.options.backtrack_lexer && (n = {
236
+ yylineno: this.yylineno,
237
+ yylloc: {
238
+ first_line: this.yylloc.first_line,
239
+ last_line: this.last_line,
240
+ first_column: this.yylloc.first_column,
241
+ last_column: this.yylloc.last_column
242
+ },
243
+ yytext: this.yytext,
244
+ match: this.match,
245
+ matches: this.matches,
246
+ matched: this.matched,
247
+ yyleng: this.yyleng,
248
+ offset: this.offset,
249
+ _more: this._more,
250
+ _input: this._input,
251
+ yy: this.yy,
252
+ conditionStack: this.conditionStack.slice(0),
253
+ done: this.done
254
+ }, this.options.ranges && (n.yylloc.range = this.yylloc.range.slice(0))), y = a[0].match(/(?:\r\n?|\n).*/g), y && (this.yylineno += y.length), this.yylloc = {
255
+ first_line: this.yylloc.last_line,
256
+ last_line: this.yylineno + 1,
257
+ first_column: this.yylloc.last_column,
258
+ last_column: y ? y[y.length - 1].length - y[y.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length
259
+ }, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[0], l = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
260
+ return l;
261
+ if (this._backtrack) {
262
+ for (var N in n)
263
+ this[N] = n[N];
264
+ return !1;
265
+ }
266
+ return !1;
267
+ },
268
+ // return next match in input
269
+ next: function() {
270
+ if (this.done)
271
+ return this.EOF;
272
+ this._input || (this.done = !0);
273
+ var a, r, l, y;
274
+ this._more || (this.yytext = "", this.match = "");
275
+ for (var n = this._currentRules(), N = 0; N < n.length; N++)
276
+ if (l = this._input.match(this.rules[n[N]]), l && (!r || l[0].length > r[0].length)) {
277
+ if (r = l, y = N, this.options.backtrack_lexer) {
278
+ if (a = this.test_match(l, n[N]), a !== !1)
279
+ return a;
280
+ if (this._backtrack) {
281
+ r = !1;
282
+ continue;
283
+ } else
284
+ return !1;
285
+ } else if (!this.options.flex)
286
+ break;
287
+ }
288
+ return r ? (a = this.test_match(r, n[y]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
289
+ ` + this.showPosition(), {
290
+ text: "",
291
+ token: null,
292
+ line: this.yylineno
293
+ });
294
+ },
295
+ // return next match that has a token
296
+ lex: function() {
297
+ var a = this.next();
298
+ return a || this.lex();
299
+ },
300
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
301
+ begin: function(a) {
302
+ this.conditionStack.push(a);
303
+ },
304
+ // pop the previously active lexer condition state off the condition stack
305
+ popState: function() {
306
+ var a = this.conditionStack.length - 1;
307
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
308
+ },
309
+ // produce the lexer rule set which is active for the currently active lexer condition state
310
+ _currentRules: function() {
311
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
312
+ },
313
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
314
+ topState: function(a) {
315
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
316
+ },
317
+ // alias for begin(condition)
318
+ pushState: function(a) {
319
+ this.begin(a);
320
+ },
321
+ // return the number of states currently on the stack
322
+ stateStackSize: function() {
323
+ return this.conditionStack.length;
324
+ },
325
+ options: { "case-insensitive": !0 },
326
+ performAction: function(a, r, l, y) {
327
+ switch (l) {
328
+ case 0:
329
+ break;
330
+ case 1:
331
+ break;
332
+ case 2:
333
+ return 32;
334
+ case 3:
335
+ break;
336
+ case 4:
337
+ return this.begin("title"), 13;
338
+ case 5:
339
+ return this.popState(), "title_value";
340
+ case 6:
341
+ return this.begin("acc_title"), 15;
342
+ case 7:
343
+ return this.popState(), "acc_title_value";
344
+ case 8:
345
+ return this.begin("acc_descr"), 17;
346
+ case 9:
347
+ return this.popState(), "acc_descr_value";
348
+ case 10:
349
+ this.begin("acc_descr_multiline");
350
+ break;
351
+ case 11:
352
+ this.popState();
353
+ break;
354
+ case 12:
355
+ return "acc_descr_multiline_value";
356
+ case 13:
357
+ return 25;
358
+ case 14:
359
+ return 27;
360
+ case 15:
361
+ return 26;
362
+ case 16:
363
+ return 28;
364
+ case 17:
365
+ return 29;
366
+ case 18:
367
+ return 30;
368
+ case 19:
369
+ return 31;
370
+ case 20:
371
+ this.begin("md_string");
372
+ break;
373
+ case 21:
374
+ return "MD_STR";
375
+ case 22:
376
+ this.popState();
377
+ break;
378
+ case 23:
379
+ this.begin("string");
380
+ break;
381
+ case 24:
382
+ this.popState();
383
+ break;
384
+ case 25:
385
+ return "STR";
386
+ case 26:
387
+ return this.begin("point_start"), 22;
388
+ case 27:
389
+ return this.begin("point_x"), 23;
390
+ case 28:
391
+ this.popState();
392
+ break;
393
+ case 29:
394
+ this.popState(), this.begin("point_y");
395
+ break;
396
+ case 30:
397
+ return this.popState(), 24;
398
+ case 31:
399
+ return 6;
400
+ case 32:
401
+ return 43;
402
+ case 33:
403
+ return "COLON";
404
+ case 34:
405
+ return 45;
406
+ case 35:
407
+ return 44;
408
+ case 36:
409
+ return 46;
410
+ case 37:
411
+ return 46;
412
+ case 38:
413
+ return 47;
414
+ case 39:
415
+ return 49;
416
+ case 40:
417
+ return 50;
418
+ case 41:
419
+ return 48;
420
+ case 42:
421
+ return 41;
422
+ case 43:
423
+ return 51;
424
+ case 44:
425
+ return 42;
426
+ case 45:
427
+ return 5;
428
+ case 46:
429
+ return 33;
430
+ case 47:
431
+ return 40;
432
+ case 48:
433
+ return 34;
434
+ }
435
+ },
436
+ rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
437
+ conditions: { point_y: { rules: [30], inclusive: !1 }, point_x: { rules: [29], inclusive: !1 }, point_start: { rules: [27, 28], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, title: { rules: [5], inclusive: !1 }, md_string: { rules: [21, 22], inclusive: !1 }, string: { rules: [24, 25], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], inclusive: !0 } }
438
+ };
439
+ return $;
440
+ }();
441
+ ot.lexer = bt;
442
+ function ht() {
443
+ this.yy = {};
444
+ }
445
+ return ht.prototype = ot, ot.Parser = ht, new ht();
446
+ }();
447
+ gt.parser = gt;
448
+ const Bt = gt, R = It();
449
+ class Rt {
450
+ constructor() {
451
+ this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData();
452
+ }
453
+ getDefaultData() {
454
+ return {
455
+ titleText: "",
456
+ quadrant1Text: "",
457
+ quadrant2Text: "",
458
+ quadrant3Text: "",
459
+ quadrant4Text: "",
460
+ xAxisLeftText: "",
461
+ xAxisRightText: "",
462
+ yAxisBottomText: "",
463
+ yAxisTopText: "",
464
+ points: []
465
+ };
466
+ }
467
+ getDefaultConfig() {
468
+ var s, o, u, f, c, h, g, i, x, v, B, Q, D, q, I, O, L, Z;
469
+ return {
470
+ showXAxis: !0,
471
+ showYAxis: !0,
472
+ showTitle: !0,
473
+ chartHeight: ((s = E.quadrantChart) == null ? void 0 : s.chartWidth) || 500,
474
+ chartWidth: ((o = E.quadrantChart) == null ? void 0 : o.chartHeight) || 500,
475
+ titlePadding: ((u = E.quadrantChart) == null ? void 0 : u.titlePadding) || 10,
476
+ titleFontSize: ((f = E.quadrantChart) == null ? void 0 : f.titleFontSize) || 20,
477
+ quadrantPadding: ((c = E.quadrantChart) == null ? void 0 : c.quadrantPadding) || 5,
478
+ xAxisLabelPadding: ((h = E.quadrantChart) == null ? void 0 : h.xAxisLabelPadding) || 5,
479
+ yAxisLabelPadding: ((g = E.quadrantChart) == null ? void 0 : g.yAxisLabelPadding) || 5,
480
+ xAxisLabelFontSize: ((i = E.quadrantChart) == null ? void 0 : i.xAxisLabelFontSize) || 16,
481
+ yAxisLabelFontSize: ((x = E.quadrantChart) == null ? void 0 : x.yAxisLabelFontSize) || 16,
482
+ quadrantLabelFontSize: ((v = E.quadrantChart) == null ? void 0 : v.quadrantLabelFontSize) || 16,
483
+ quadrantTextTopPadding: ((B = E.quadrantChart) == null ? void 0 : B.quadrantTextTopPadding) || 5,
484
+ pointTextPadding: ((Q = E.quadrantChart) == null ? void 0 : Q.pointTextPadding) || 5,
485
+ pointLabelFontSize: ((D = E.quadrantChart) == null ? void 0 : D.pointLabelFontSize) || 12,
486
+ pointRadius: ((q = E.quadrantChart) == null ? void 0 : q.pointRadius) || 5,
487
+ xAxisPosition: ((I = E.quadrantChart) == null ? void 0 : I.xAxisPosition) || "top",
488
+ yAxisPosition: ((O = E.quadrantChart) == null ? void 0 : O.yAxisPosition) || "left",
489
+ quadrantInternalBorderStrokeWidth: ((L = E.quadrantChart) == null ? void 0 : L.quadrantInternalBorderStrokeWidth) || 1,
490
+ quadrantExternalBorderStrokeWidth: ((Z = E.quadrantChart) == null ? void 0 : Z.quadrantExternalBorderStrokeWidth) || 2
491
+ };
492
+ }
493
+ getDefaultThemeConfig() {
494
+ return {
495
+ quadrant1Fill: R.quadrant1Fill,
496
+ quadrant2Fill: R.quadrant2Fill,
497
+ quadrant3Fill: R.quadrant3Fill,
498
+ quadrant4Fill: R.quadrant4Fill,
499
+ quadrant1TextFill: R.quadrant1TextFill,
500
+ quadrant2TextFill: R.quadrant2TextFill,
501
+ quadrant3TextFill: R.quadrant3TextFill,
502
+ quadrant4TextFill: R.quadrant4TextFill,
503
+ quadrantPointFill: R.quadrantPointFill,
504
+ quadrantPointTextFill: R.quadrantPointTextFill,
505
+ quadrantXAxisTextFill: R.quadrantXAxisTextFill,
506
+ quadrantYAxisTextFill: R.quadrantYAxisTextFill,
507
+ quadrantTitleFill: R.quadrantTitleFill,
508
+ quadrantInternalBorderStrokeFill: R.quadrantInternalBorderStrokeFill,
509
+ quadrantExternalBorderStrokeFill: R.quadrantExternalBorderStrokeFill
510
+ };
511
+ }
512
+ clear() {
513
+ this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), lt.info("clear called");
514
+ }
515
+ setData(s) {
516
+ this.data = { ...this.data, ...s };
517
+ }
518
+ addPoints(s) {
519
+ this.data.points = [...s, ...this.data.points];
520
+ }
521
+ setConfig(s) {
522
+ lt.trace("setConfig called with: ", s), this.config = { ...this.config, ...s };
523
+ }
524
+ setThemeConfig(s) {
525
+ lt.trace("setThemeConfig called with: ", s), this.themeConfig = { ...this.themeConfig, ...s };
526
+ }
527
+ calculateSpace(s, o, u, f) {
528
+ const c = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, h = {
529
+ top: s === "top" && o ? c : 0,
530
+ bottom: s === "bottom" && o ? c : 0
531
+ }, g = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, i = {
532
+ left: this.config.yAxisPosition === "left" && u ? g : 0,
533
+ right: this.config.yAxisPosition === "right" && u ? g : 0
534
+ }, x = this.config.titleFontSize + this.config.titlePadding * 2, v = {
535
+ top: f ? x : 0
536
+ }, B = this.config.quadrantPadding + i.left, Q = this.config.quadrantPadding + h.top + v.top, D = this.config.chartWidth - this.config.quadrantPadding * 2 - i.left - i.right, q = this.config.chartHeight - this.config.quadrantPadding * 2 - h.top - h.bottom - v.top, I = D / 2, O = q / 2;
537
+ return {
538
+ xAxisSpace: h,
539
+ yAxisSpace: i,
540
+ titleSpace: v,
541
+ quadrantSpace: {
542
+ quadrantLeft: B,
543
+ quadrantTop: Q,
544
+ quadrantWidth: D,
545
+ quadrantHalfWidth: I,
546
+ quadrantHeight: q,
547
+ quadrantHalfHeight: O
548
+ }
549
+ };
550
+ }
551
+ getAxisLabels(s, o, u, f) {
552
+ const { quadrantSpace: c, titleSpace: h } = f, {
553
+ quadrantHalfHeight: g,
554
+ quadrantHeight: i,
555
+ quadrantLeft: x,
556
+ quadrantHalfWidth: v,
557
+ quadrantTop: B,
558
+ quadrantWidth: Q
559
+ } = c, D = !!this.data.xAxisRightText, q = !!this.data.yAxisTopText, I = [];
560
+ return this.data.xAxisLeftText && o && I.push({
561
+ text: this.data.xAxisLeftText,
562
+ fill: this.themeConfig.quadrantXAxisTextFill,
563
+ x: x + (D ? v / 2 : 0),
564
+ y: s === "top" ? this.config.xAxisLabelPadding + h.top : this.config.xAxisLabelPadding + B + i + this.config.quadrantPadding,
565
+ fontSize: this.config.xAxisLabelFontSize,
566
+ verticalPos: D ? "center" : "left",
567
+ horizontalPos: "top",
568
+ rotation: 0
569
+ }), this.data.xAxisRightText && o && I.push({
570
+ text: this.data.xAxisRightText,
571
+ fill: this.themeConfig.quadrantXAxisTextFill,
572
+ x: x + v + (D ? v / 2 : 0),
573
+ y: s === "top" ? this.config.xAxisLabelPadding + h.top : this.config.xAxisLabelPadding + B + i + this.config.quadrantPadding,
574
+ fontSize: this.config.xAxisLabelFontSize,
575
+ verticalPos: D ? "center" : "left",
576
+ horizontalPos: "top",
577
+ rotation: 0
578
+ }), this.data.yAxisBottomText && u && I.push({
579
+ text: this.data.yAxisBottomText,
580
+ fill: this.themeConfig.quadrantYAxisTextFill,
581
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + x + Q + this.config.quadrantPadding,
582
+ y: B + i - (q ? g / 2 : 0),
583
+ fontSize: this.config.yAxisLabelFontSize,
584
+ verticalPos: q ? "center" : "left",
585
+ horizontalPos: "top",
586
+ rotation: -90
587
+ }), this.data.yAxisTopText && u && I.push({
588
+ text: this.data.yAxisTopText,
589
+ fill: this.themeConfig.quadrantYAxisTextFill,
590
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + x + Q + this.config.quadrantPadding,
591
+ y: B + g - (q ? g / 2 : 0),
592
+ fontSize: this.config.yAxisLabelFontSize,
593
+ verticalPos: q ? "center" : "left",
594
+ horizontalPos: "top",
595
+ rotation: -90
596
+ }), I;
597
+ }
598
+ getQuadrants(s) {
599
+ const { quadrantSpace: o } = s, { quadrantHalfHeight: u, quadrantLeft: f, quadrantHalfWidth: c, quadrantTop: h } = o, g = [
600
+ {
601
+ text: {
602
+ text: this.data.quadrant1Text,
603
+ fill: this.themeConfig.quadrant1TextFill,
604
+ x: 0,
605
+ y: 0,
606
+ fontSize: this.config.quadrantLabelFontSize,
607
+ verticalPos: "center",
608
+ horizontalPos: "middle",
609
+ rotation: 0
610
+ },
611
+ x: f + c,
612
+ y: h,
613
+ width: c,
614
+ height: u,
615
+ fill: this.themeConfig.quadrant1Fill
616
+ },
617
+ {
618
+ text: {
619
+ text: this.data.quadrant2Text,
620
+ fill: this.themeConfig.quadrant2TextFill,
621
+ x: 0,
622
+ y: 0,
623
+ fontSize: this.config.quadrantLabelFontSize,
624
+ verticalPos: "center",
625
+ horizontalPos: "middle",
626
+ rotation: 0
627
+ },
628
+ x: f,
629
+ y: h,
630
+ width: c,
631
+ height: u,
632
+ fill: this.themeConfig.quadrant2Fill
633
+ },
634
+ {
635
+ text: {
636
+ text: this.data.quadrant3Text,
637
+ fill: this.themeConfig.quadrant3TextFill,
638
+ x: 0,
639
+ y: 0,
640
+ fontSize: this.config.quadrantLabelFontSize,
641
+ verticalPos: "center",
642
+ horizontalPos: "middle",
643
+ rotation: 0
644
+ },
645
+ x: f,
646
+ y: h + u,
647
+ width: c,
648
+ height: u,
649
+ fill: this.themeConfig.quadrant3Fill
650
+ },
651
+ {
652
+ text: {
653
+ text: this.data.quadrant4Text,
654
+ fill: this.themeConfig.quadrant4TextFill,
655
+ x: 0,
656
+ y: 0,
657
+ fontSize: this.config.quadrantLabelFontSize,
658
+ verticalPos: "center",
659
+ horizontalPos: "middle",
660
+ rotation: 0
661
+ },
662
+ x: f + c,
663
+ y: h + u,
664
+ width: c,
665
+ height: u,
666
+ fill: this.themeConfig.quadrant4Fill
667
+ }
668
+ ];
669
+ for (const i of g)
670
+ i.text.x = i.x + i.width / 2, this.data.points.length === 0 ? (i.text.y = i.y + i.height / 2, i.text.horizontalPos = "middle") : (i.text.y = i.y + this.config.quadrantTextTopPadding, i.text.horizontalPos = "top");
671
+ return g;
672
+ }
673
+ getQuadrantPoints(s) {
674
+ const { quadrantSpace: o } = s, { quadrantHeight: u, quadrantLeft: f, quadrantTop: c, quadrantWidth: h } = o, g = mt().domain([0, 1]).range([f, h + f]), i = mt().domain([0, 1]).range([u + c, c]);
675
+ return this.data.points.map((x) => ({
676
+ x: g(x.x),
677
+ y: i(x.y),
678
+ fill: this.themeConfig.quadrantPointFill,
679
+ radius: this.config.pointRadius,
680
+ text: {
681
+ text: x.text,
682
+ fill: this.themeConfig.quadrantPointTextFill,
683
+ x: g(x.x),
684
+ y: i(x.y) + this.config.pointTextPadding,
685
+ verticalPos: "center",
686
+ horizontalPos: "top",
687
+ fontSize: this.config.pointLabelFontSize,
688
+ rotation: 0
689
+ }
690
+ }));
691
+ }
692
+ getBorders(s) {
693
+ const o = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: u } = s, {
694
+ quadrantHalfHeight: f,
695
+ quadrantHeight: c,
696
+ quadrantLeft: h,
697
+ quadrantHalfWidth: g,
698
+ quadrantTop: i,
699
+ quadrantWidth: x
700
+ } = u;
701
+ return [
702
+ // top border
703
+ {
704
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
705
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
706
+ x1: h - o,
707
+ y1: i,
708
+ x2: h + x + o,
709
+ y2: i
710
+ },
711
+ // right border
712
+ {
713
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
714
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
715
+ x1: h + x,
716
+ y1: i + o,
717
+ x2: h + x,
718
+ y2: i + c - o
719
+ },
720
+ // bottom border
721
+ {
722
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
723
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
724
+ x1: h - o,
725
+ y1: i + c,
726
+ x2: h + x + o,
727
+ y2: i + c
728
+ },
729
+ // left border
730
+ {
731
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
732
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
733
+ x1: h,
734
+ y1: i + o,
735
+ x2: h,
736
+ y2: i + c - o
737
+ },
738
+ // vertical inner border
739
+ {
740
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
741
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
742
+ x1: h + g,
743
+ y1: i + o,
744
+ x2: h + g,
745
+ y2: i + c - o
746
+ },
747
+ // horizontal inner border
748
+ {
749
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
750
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
751
+ x1: h + o,
752
+ y1: i + f,
753
+ x2: h + x - o,
754
+ y2: i + f
755
+ }
756
+ ];
757
+ }
758
+ getTitle(s) {
759
+ if (s)
760
+ return {
761
+ text: this.data.titleText,
762
+ fill: this.themeConfig.quadrantTitleFill,
763
+ fontSize: this.config.titleFontSize,
764
+ horizontalPos: "top",
765
+ verticalPos: "center",
766
+ rotation: 0,
767
+ y: this.config.titlePadding,
768
+ x: this.config.chartWidth / 2
769
+ };
770
+ }
771
+ build() {
772
+ const s = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), o = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), u = this.config.showTitle && !!this.data.titleText, f = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, c = this.calculateSpace(f, s, o, u);
773
+ return {
774
+ points: this.getQuadrantPoints(c),
775
+ quadrants: this.getQuadrants(c),
776
+ axisLabels: this.getAxisLabels(f, s, o, c),
777
+ borderLines: this.getBorders(c),
778
+ title: this.getTitle(u)
779
+ };
780
+ }
781
+ }
782
+ const Nt = yt();
783
+ function K(e) {
784
+ return wt(e.trim(), Nt);
785
+ }
786
+ const w = new Rt();
787
+ function Ut(e) {
788
+ w.setData({ quadrant1Text: K(e.text) });
789
+ }
790
+ function Qt(e) {
791
+ w.setData({ quadrant2Text: K(e.text) });
792
+ }
793
+ function Xt(e) {
794
+ w.setData({ quadrant3Text: K(e.text) });
795
+ }
796
+ function Wt(e) {
797
+ w.setData({ quadrant4Text: K(e.text) });
798
+ }
799
+ function Mt(e) {
800
+ w.setData({ xAxisLeftText: K(e.text) });
801
+ }
802
+ function Ot(e) {
803
+ w.setData({ xAxisRightText: K(e.text) });
804
+ }
805
+ function $t(e) {
806
+ w.setData({ yAxisTopText: K(e.text) });
807
+ }
808
+ function Yt(e) {
809
+ w.setData({ yAxisBottomText: K(e.text) });
810
+ }
811
+ function Ht(e, s, o) {
812
+ w.addPoints([{ x: s, y: o, text: K(e.text) }]);
813
+ }
814
+ function jt(e) {
815
+ w.setConfig({ chartWidth: e });
816
+ }
817
+ function Vt(e) {
818
+ w.setConfig({ chartHeight: e });
819
+ }
820
+ function Kt() {
821
+ const e = yt(), { themeVariables: s, quadrantChart: o } = e;
822
+ return o && w.setConfig(o), w.setThemeConfig({
823
+ quadrant1Fill: s.quadrant1Fill,
824
+ quadrant2Fill: s.quadrant2Fill,
825
+ quadrant3Fill: s.quadrant3Fill,
826
+ quadrant4Fill: s.quadrant4Fill,
827
+ quadrant1TextFill: s.quadrant1TextFill,
828
+ quadrant2TextFill: s.quadrant2TextFill,
829
+ quadrant3TextFill: s.quadrant3TextFill,
830
+ quadrant4TextFill: s.quadrant4TextFill,
831
+ quadrantPointFill: s.quadrantPointFill,
832
+ quadrantPointTextFill: s.quadrantPointTextFill,
833
+ quadrantXAxisTextFill: s.quadrantXAxisTextFill,
834
+ quadrantYAxisTextFill: s.quadrantYAxisTextFill,
835
+ quadrantExternalBorderStrokeFill: s.quadrantExternalBorderStrokeFill,
836
+ quadrantInternalBorderStrokeFill: s.quadrantInternalBorderStrokeFill,
837
+ quadrantTitleFill: s.quadrantTitleFill
838
+ }), w.setData({ titleText: At() }), w.build();
839
+ }
840
+ const Zt = function() {
841
+ w.clear(), Dt();
842
+ }, Gt = {
843
+ setWidth: jt,
844
+ setHeight: Vt,
845
+ setQuadrant1Text: Ut,
846
+ setQuadrant2Text: Qt,
847
+ setQuadrant3Text: Xt,
848
+ setQuadrant4Text: Wt,
849
+ setXAxisLeftText: Mt,
850
+ setXAxisRightText: Ot,
851
+ setYAxisTopText: $t,
852
+ setYAxisBottomText: Yt,
853
+ addPoint: Ht,
854
+ getQuadrantData: Kt,
855
+ clear: Zt,
856
+ setAccTitle: zt,
857
+ getAccTitle: Ct,
858
+ setDiagramTitle: Lt,
859
+ getDiagramTitle: At,
860
+ getAccDescription: vt,
861
+ setAccDescription: Pt
862
+ }, Jt = (e, s, o, u) => {
863
+ var f, c, h;
864
+ function g(t) {
865
+ return t === "top" ? "hanging" : "middle";
866
+ }
867
+ function i(t) {
868
+ return t === "left" ? "start" : "middle";
869
+ }
870
+ function x(t) {
871
+ return `translate(${t.x}, ${t.y}) rotate(${t.rotation || 0})`;
872
+ }
873
+ const v = yt();
874
+ lt.debug(`Rendering quadrant chart
875
+ ` + e);
876
+ const B = v.securityLevel;
877
+ let Q;
878
+ B === "sandbox" && (Q = ft("#i" + s));
879
+ const D = (B === "sandbox" ? ft(Q.nodes()[0].contentDocument.body) : ft("body")).select(`[id="${s}"]`), q = D.append("g").attr("class", "main"), I = ((f = v.quadrantChart) == null ? void 0 : f.chartWidth) || 500, O = ((c = v.quadrantChart) == null ? void 0 : c.chartHeight) || 500;
880
+ Et(D, O, I, ((h = v.quadrantChart) == null ? void 0 : h.useMaxWidth) || !0), D.attr("viewBox", "0 0 " + I + " " + O), u.db.setHeight(O), u.db.setWidth(I);
881
+ const L = u.db.getQuadrantData(), Z = q.append("g").attr("class", "quadrants"), et = q.append("g").attr("class", "border"), it = q.append("g").attr("class", "data-points"), at = q.append("g").attr("class", "labels"), W = q.append("g").attr("class", "title");
882
+ L.title && W.append("text").attr("x", 0).attr("y", 0).attr("fill", L.title.fill).attr("font-size", L.title.fontSize).attr("dominant-baseline", g(L.title.horizontalPos)).attr("text-anchor", i(L.title.verticalPos)).attr("transform", x(L.title)).text(L.title.text), L.borderLines && et.selectAll("line").data(L.borderLines).enter().append("line").attr("x1", (t) => t.x1).attr("y1", (t) => t.y1).attr("x2", (t) => t.x2).attr("y2", (t) => t.y2).style("stroke", (t) => t.strokeFill).style("stroke-width", (t) => t.strokeWidth);
883
+ const X = Z.selectAll("g.quadrant").data(L.quadrants).enter().append("g").attr("class", "quadrant");
884
+ X.append("rect").attr("x", (t) => t.x).attr("y", (t) => t.y).attr("width", (t) => t.width).attr("height", (t) => t.height).attr("fill", (t) => t.fill), X.append("text").attr("x", 0).attr("y", 0).attr("fill", (t) => t.text.fill).attr("font-size", (t) => t.text.fontSize).attr(
885
+ "dominant-baseline",
886
+ (t) => g(t.text.horizontalPos)
887
+ ).attr("text-anchor", (t) => i(t.text.verticalPos)).attr("transform", (t) => x(t.text)).text((t) => t.text.text), at.selectAll("g.label").data(L.axisLabels).enter().append("g").attr("class", "label").append("text").attr("x", 0).attr("y", 0).text((t) => t.text).attr("fill", (t) => t.fill).attr("font-size", (t) => t.fontSize).attr("dominant-baseline", (t) => g(t.horizontalPos)).attr("text-anchor", (t) => i(t.verticalPos)).attr("transform", (t) => x(t));
888
+ const p = it.selectAll("g.data-point").data(L.points).enter().append("g").attr("class", "data-point");
889
+ p.append("circle").attr("cx", (t) => t.x).attr("cy", (t) => t.y).attr("r", (t) => t.radius).attr("fill", (t) => t.fill), p.append("text").attr("x", 0).attr("y", 0).text((t) => t.text.text).attr("fill", (t) => t.text.fill).attr("font-size", (t) => t.text.fontSize).attr(
890
+ "dominant-baseline",
891
+ (t) => g(t.text.horizontalPos)
892
+ ).attr("text-anchor", (t) => i(t.text.verticalPos)).attr("transform", (t) => x(t.text));
893
+ }, te = {
894
+ draw: Jt
895
+ }, ie = {
896
+ parser: Bt,
897
+ db: Gt,
898
+ renderer: te,
899
+ styles: () => ""
900
+ };
901
+ export {
902
+ ie as diagram
903
+ };