smart-chat-asp 2.11.1

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 (57) hide show
  1. package/README.md +364 -0
  2. package/README.zh.md +367 -0
  3. package/lib/Tableau10-2ff7471d.mjs +9 -0
  4. package/lib/arc-33fcfaff.mjs +86 -0
  5. package/lib/array-2ff2c7a6.mjs +6 -0
  6. package/lib/blockDiagram-38ab4fdb-3c912e88.mjs +1230 -0
  7. package/lib/c4Diagram-3d4e48cf-49908d37.mjs +1580 -0
  8. package/lib/channel-890a888a.mjs +5 -0
  9. package/lib/classDiagram-70f12bd4-ace7b178.mjs +221 -0
  10. package/lib/classDiagram-v2-f2320105-5848085d.mjs +207 -0
  11. package/lib/clone-59a3b16a.mjs +8 -0
  12. package/lib/createText-2e5e7dd3-898a4de3.mjs +2966 -0
  13. package/lib/edges-e0da2a9e-91b210e9.mjs +1083 -0
  14. package/lib/erDiagram-9861fffd-c13b7611.mjs +933 -0
  15. package/lib/favicon.ico +0 -0
  16. package/lib/favicon.svg +1 -0
  17. package/lib/flowDb-956e92f1-56fdcb20.mjs +1126 -0
  18. package/lib/flowDiagram-66a62f08-4023035a.mjs +798 -0
  19. package/lib/flowDiagram-v2-96b9c2cf-d28d8b17.mjs +26 -0
  20. package/lib/flowchart-elk-definition-4a651766-ab5b1391.mjs +48407 -0
  21. package/lib/ganttDiagram-c361ad54-ae59a5e3.mjs +2504 -0
  22. package/lib/gitGraphDiagram-72cf32ee-5bdf46bb.mjs +1265 -0
  23. package/lib/graph-9ea4e80a.mjs +512 -0
  24. package/lib/index-3862675e-b7177fa1.mjs +373 -0
  25. package/lib/index-958a220b.mjs +1470 -0
  26. package/lib/index-c42b0ff4.mjs +40 -0
  27. package/lib/index-f76d9453.mjs +28 -0
  28. package/lib/infoDiagram-f8f76790-5f3835f9.mjs +320 -0
  29. package/lib/init-f9637058.mjs +16 -0
  30. package/lib/journeyDiagram-49397b02-df06b21d.mjs +805 -0
  31. package/lib/layout-d3bc02b9.mjs +1495 -0
  32. package/lib/line-b044df13.mjs +34 -0
  33. package/lib/linear-e60140ad.mjs +447 -0
  34. package/lib/main-740da2e1.mjs +117801 -0
  35. package/lib/mindmap-definition-fc14e90a-3bfaf2a6.mjs +19384 -0
  36. package/lib/ordinal-980380c7.mjs +65 -0
  37. package/lib/path-428ebac9.mjs +91 -0
  38. package/lib/pieDiagram-8a3498a8-a8359c54.mjs +503 -0
  39. package/lib/pwa-192x192.png +0 -0
  40. package/lib/pwa-512x512.png +0 -0
  41. package/lib/quadrantDiagram-120e2f19-367eeae7.mjs +905 -0
  42. package/lib/requirementDiagram-deff3bca-27d1e96b.mjs +770 -0
  43. package/lib/sankeyDiagram-04a897e0-a9e993ee.mjs +818 -0
  44. package/lib/sequenceDiagram-704730f1-05f9d7b1.mjs +2235 -0
  45. package/lib/smart-chat.es.js +5 -0
  46. package/lib/smart-chat.umd.js +5444 -0
  47. package/lib/stateDiagram-587899a1-f3e4a81e.mjs +269 -0
  48. package/lib/stateDiagram-v2-d93cdb3a-763ad0ff.mjs +191 -0
  49. package/lib/style.css +1 -0
  50. package/lib/styles-6aaf32cf-e32ec570.mjs +960 -0
  51. package/lib/styles-9a916d00-18b5fd0d.mjs +1089 -0
  52. package/lib/styles-c10674c1-134300a0.mjs +433 -0
  53. package/lib/svgDrawCommon-08f97a94-f04d54dc.mjs +64 -0
  54. package/lib/timeline-definition-85554ec2-1989252c.mjs +796 -0
  55. package/lib/xychartDiagram-e933f94c-f7d5a550.mjs +1285 -0
  56. package/license +21 -0
  57. package/package.json +79 -0
@@ -0,0 +1,770 @@
1
+ import { Y as Te, T as Ce, U as Fe, X as Me, W as De, a2 as Ne, ao as Pe, a1 as oe, a3 as Ye, a5 as ke } from "./main-740da2e1.mjs";
2
+ import { G as Ue } from "./graph-9ea4e80a.mjs";
3
+ import { l as Be } from "./layout-d3bc02b9.mjs";
4
+ import { l as Qe } from "./line-b044df13.mjs";
5
+ import "vue";
6
+ import "./array-2ff2c7a6.mjs";
7
+ import "./path-428ebac9.mjs";
8
+ var ce = function() {
9
+ var e = function(V, i, n, a) {
10
+ for (n = n || {}, a = V.length; a--; n[V[a]] = i)
11
+ ;
12
+ return n;
13
+ }, t = [1, 3], l = [1, 4], c = [1, 5], u = [1, 6], d = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], p = [1, 18], h = [2, 7], o = [1, 22], E = [1, 23], R = [1, 24], A = [1, 25], T = [1, 26], N = [1, 27], v = [1, 20], k = [1, 28], x = [1, 29], F = [62, 63], de = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], pe = [1, 47], fe = [1, 48], ye = [1, 49], _e = [1, 50], Ee = [1, 51], ge = [1, 52], Re = [1, 53], O = [53, 54], M = [1, 64], D = [1, 60], P = [1, 61], Y = [1, 62], U = [1, 63], B = [1, 65], z = [1, 69], j = [1, 70], X = [1, 67], J = [1, 68], m = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], ie = {
14
+ trace: function() {
15
+ },
16
+ yy: {},
17
+ symbols_: { error: 2, start: 3, directive: 4, NEWLINE: 5, RD: 6, diagram: 7, EOF: 8, acc_title: 9, acc_title_value: 10, acc_descr: 11, acc_descr_value: 12, acc_descr_multiline_value: 13, requirementDef: 14, elementDef: 15, relationshipDef: 16, requirementType: 17, requirementName: 18, STRUCT_START: 19, requirementBody: 20, ID: 21, COLONSEP: 22, id: 23, TEXT: 24, text: 25, RISK: 26, riskLevel: 27, VERIFYMTHD: 28, verifyType: 29, STRUCT_STOP: 30, REQUIREMENT: 31, FUNCTIONAL_REQUIREMENT: 32, INTERFACE_REQUIREMENT: 33, PERFORMANCE_REQUIREMENT: 34, PHYSICAL_REQUIREMENT: 35, DESIGN_CONSTRAINT: 36, LOW_RISK: 37, MED_RISK: 38, HIGH_RISK: 39, VERIFY_ANALYSIS: 40, VERIFY_DEMONSTRATION: 41, VERIFY_INSPECTION: 42, VERIFY_TEST: 43, ELEMENT: 44, elementName: 45, elementBody: 46, TYPE: 47, type: 48, DOCREF: 49, ref: 50, END_ARROW_L: 51, relationship: 52, LINE: 53, END_ARROW_R: 54, CONTAINS: 55, COPIES: 56, DERIVES: 57, SATISFIES: 58, VERIFIES: 59, REFINES: 60, TRACES: 61, unqString: 62, qString: 63, $accept: 0, $end: 1 },
18
+ terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" },
19
+ productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]],
20
+ performAction: function(i, n, a, r, f, s, W) {
21
+ var _ = s.length - 1;
22
+ switch (f) {
23
+ case 4:
24
+ this.$ = s[_].trim(), r.setAccTitle(this.$);
25
+ break;
26
+ case 5:
27
+ case 6:
28
+ this.$ = s[_].trim(), r.setAccDescription(this.$);
29
+ break;
30
+ case 7:
31
+ this.$ = [];
32
+ break;
33
+ case 13:
34
+ r.addRequirement(s[_ - 3], s[_ - 4]);
35
+ break;
36
+ case 14:
37
+ r.setNewReqId(s[_ - 2]);
38
+ break;
39
+ case 15:
40
+ r.setNewReqText(s[_ - 2]);
41
+ break;
42
+ case 16:
43
+ r.setNewReqRisk(s[_ - 2]);
44
+ break;
45
+ case 17:
46
+ r.setNewReqVerifyMethod(s[_ - 2]);
47
+ break;
48
+ case 20:
49
+ this.$ = r.RequirementType.REQUIREMENT;
50
+ break;
51
+ case 21:
52
+ this.$ = r.RequirementType.FUNCTIONAL_REQUIREMENT;
53
+ break;
54
+ case 22:
55
+ this.$ = r.RequirementType.INTERFACE_REQUIREMENT;
56
+ break;
57
+ case 23:
58
+ this.$ = r.RequirementType.PERFORMANCE_REQUIREMENT;
59
+ break;
60
+ case 24:
61
+ this.$ = r.RequirementType.PHYSICAL_REQUIREMENT;
62
+ break;
63
+ case 25:
64
+ this.$ = r.RequirementType.DESIGN_CONSTRAINT;
65
+ break;
66
+ case 26:
67
+ this.$ = r.RiskLevel.LOW_RISK;
68
+ break;
69
+ case 27:
70
+ this.$ = r.RiskLevel.MED_RISK;
71
+ break;
72
+ case 28:
73
+ this.$ = r.RiskLevel.HIGH_RISK;
74
+ break;
75
+ case 29:
76
+ this.$ = r.VerifyType.VERIFY_ANALYSIS;
77
+ break;
78
+ case 30:
79
+ this.$ = r.VerifyType.VERIFY_DEMONSTRATION;
80
+ break;
81
+ case 31:
82
+ this.$ = r.VerifyType.VERIFY_INSPECTION;
83
+ break;
84
+ case 32:
85
+ this.$ = r.VerifyType.VERIFY_TEST;
86
+ break;
87
+ case 33:
88
+ r.addElement(s[_ - 3]);
89
+ break;
90
+ case 34:
91
+ r.setNewElementType(s[_ - 2]);
92
+ break;
93
+ case 35:
94
+ r.setNewElementDocRef(s[_ - 2]);
95
+ break;
96
+ case 38:
97
+ r.addRelationship(s[_ - 2], s[_], s[_ - 4]);
98
+ break;
99
+ case 39:
100
+ r.addRelationship(s[_ - 2], s[_ - 4], s[_]);
101
+ break;
102
+ case 40:
103
+ this.$ = r.Relationships.CONTAINS;
104
+ break;
105
+ case 41:
106
+ this.$ = r.Relationships.COPIES;
107
+ break;
108
+ case 42:
109
+ this.$ = r.Relationships.DERIVES;
110
+ break;
111
+ case 43:
112
+ this.$ = r.Relationships.SATISFIES;
113
+ break;
114
+ case 44:
115
+ this.$ = r.Relationships.VERIFIES;
116
+ break;
117
+ case 45:
118
+ this.$ = r.Relationships.REFINES;
119
+ break;
120
+ case 46:
121
+ this.$ = r.Relationships.TRACES;
122
+ break;
123
+ }
124
+ },
125
+ table: [{ 3: 1, 4: 2, 6: t, 9: l, 11: c, 13: u }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: t, 9: l, 11: c, 13: u }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, e(d, [2, 6]), { 3: 12, 4: 2, 6: t, 9: l, 11: c, 13: u }, { 1: [2, 2] }, { 4: 17, 5: p, 7: 13, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: v, 62: k, 63: x }, e(d, [2, 4]), e(d, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: p, 7: 31, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: v, 62: k, 63: x }, { 4: 17, 5: p, 7: 32, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: v, 62: k, 63: x }, { 4: 17, 5: p, 7: 33, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: v, 62: k, 63: x }, { 4: 17, 5: p, 7: 34, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: v, 62: k, 63: x }, { 4: 17, 5: p, 7: 35, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: v, 62: k, 63: x }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, e(F, [2, 20]), e(F, [2, 21]), e(F, [2, 22]), e(F, [2, 23]), e(F, [2, 24]), e(F, [2, 25]), e(de, [2, 49]), e(de, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: pe, 56: fe, 57: ye, 58: _e, 59: Ee, 60: ge, 61: Re }, { 52: 54, 55: pe, 56: fe, 57: ye, 58: _e, 59: Ee, 60: ge, 61: Re }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, e(O, [2, 40]), e(O, [2, 41]), e(O, [2, 42]), e(O, [2, 43]), e(O, [2, 44]), e(O, [2, 45]), e(O, [2, 46]), { 54: [1, 58] }, { 5: M, 20: 59, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: z, 30: j, 46: 66, 47: X, 49: J }, { 23: 71, 62: k, 63: x }, { 23: 72, 62: k, 63: x }, e(m, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: M, 20: 77, 21: D, 24: P, 26: Y, 28: U, 30: B }, e(m, [2, 19]), e(m, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: z, 30: j, 46: 80, 47: X, 49: J }, e(m, [2, 37]), e(m, [2, 38]), e(m, [2, 39]), { 23: 81, 62: k, 63: x }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, e(m, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, e(m, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: M, 20: 106, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: M, 20: 107, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: M, 20: 108, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: M, 20: 109, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: z, 30: j, 46: 110, 47: X, 49: J }, { 5: z, 30: j, 46: 111, 47: X, 49: J }, e(m, [2, 14]), e(m, [2, 15]), e(m, [2, 16]), e(m, [2, 17]), e(m, [2, 34]), e(m, [2, 35])],
126
+ defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] },
127
+ parseError: function(i, n) {
128
+ if (n.recoverable)
129
+ this.trace(i);
130
+ else {
131
+ var a = new Error(i);
132
+ throw a.hash = n, a;
133
+ }
134
+ },
135
+ parse: function(i) {
136
+ var n = this, a = [0], r = [], f = [null], s = [], W = this.table, _ = "", Z = 0, me = 0, Ve = 2, Ie = 1, qe = s.slice.call(arguments, 1), g = Object.create(this.lexer), L = { yy: {} };
137
+ for (var ne in this.yy)
138
+ Object.prototype.hasOwnProperty.call(this.yy, ne) && (L.yy[ne] = this.yy[ne]);
139
+ g.setInput(i, L.yy), L.yy.lexer = g, L.yy.parser = this, typeof g.yylloc > "u" && (g.yylloc = {});
140
+ var se = g.yylloc;
141
+ s.push(se);
142
+ var Oe = g.options && g.options.ranges;
143
+ typeof L.yy.parseError == "function" ? this.parseError = L.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
144
+ function Le() {
145
+ var $;
146
+ return $ = r.pop() || g.lex() || Ie, typeof $ != "number" && ($ instanceof Array && (r = $, $ = r.pop()), $ = n.symbols_[$] || $), $;
147
+ }
148
+ for (var I, C, S, ae, Q = {}, ee, w, be, te; ; ) {
149
+ if (C = a[a.length - 1], this.defaultActions[C] ? S = this.defaultActions[C] : ((I === null || typeof I > "u") && (I = Le()), S = W[C] && W[C][I]), typeof S > "u" || !S.length || !S[0]) {
150
+ var le = "";
151
+ te = [];
152
+ for (ee in W[C])
153
+ this.terminals_[ee] && ee > Ve && te.push("'" + this.terminals_[ee] + "'");
154
+ g.showPosition ? le = "Parse error on line " + (Z + 1) + `:
155
+ ` + g.showPosition() + `
156
+ Expecting ` + te.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : le = "Parse error on line " + (Z + 1) + ": Unexpected " + (I == Ie ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(le, {
157
+ text: g.match,
158
+ token: this.terminals_[I] || I,
159
+ line: g.yylineno,
160
+ loc: se,
161
+ expected: te
162
+ });
163
+ }
164
+ if (S[0] instanceof Array && S.length > 1)
165
+ throw new Error("Parse Error: multiple actions possible at state: " + C + ", token: " + I);
166
+ switch (S[0]) {
167
+ case 1:
168
+ a.push(I), f.push(g.yytext), s.push(g.yylloc), a.push(S[1]), I = null, me = g.yyleng, _ = g.yytext, Z = g.yylineno, se = g.yylloc;
169
+ break;
170
+ case 2:
171
+ if (w = this.productions_[S[1]][1], Q.$ = f[f.length - w], Q._$ = {
172
+ first_line: s[s.length - (w || 1)].first_line,
173
+ last_line: s[s.length - 1].last_line,
174
+ first_column: s[s.length - (w || 1)].first_column,
175
+ last_column: s[s.length - 1].last_column
176
+ }, Oe && (Q._$.range = [
177
+ s[s.length - (w || 1)].range[0],
178
+ s[s.length - 1].range[1]
179
+ ]), ae = this.performAction.apply(Q, [
180
+ _,
181
+ me,
182
+ Z,
183
+ L.yy,
184
+ S[1],
185
+ f,
186
+ s
187
+ ].concat(qe)), typeof ae < "u")
188
+ return ae;
189
+ w && (a = a.slice(0, -1 * w * 2), f = f.slice(0, -1 * w), s = s.slice(0, -1 * w)), a.push(this.productions_[S[1]][0]), f.push(Q.$), s.push(Q._$), be = W[a[a.length - 2]][a[a.length - 1]], a.push(be);
190
+ break;
191
+ case 3:
192
+ return !0;
193
+ }
194
+ }
195
+ return !0;
196
+ }
197
+ }, $e = function() {
198
+ var V = {
199
+ EOF: 1,
200
+ parseError: function(n, a) {
201
+ if (this.yy.parser)
202
+ this.yy.parser.parseError(n, a);
203
+ else
204
+ throw new Error(n);
205
+ },
206
+ // resets the lexer, sets new input
207
+ setInput: function(i, n) {
208
+ return this.yy = n || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
209
+ first_line: 1,
210
+ first_column: 0,
211
+ last_line: 1,
212
+ last_column: 0
213
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
214
+ },
215
+ // consumes and returns one char from the input
216
+ input: function() {
217
+ var i = this._input[0];
218
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
219
+ var n = i.match(/(?:\r\n?|\n).*/g);
220
+ return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
221
+ },
222
+ // unshifts one char (or a string) into the input
223
+ unput: function(i) {
224
+ var n = i.length, a = i.split(/(?:\r\n?|\n)/g);
225
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n;
226
+ var r = this.match.split(/(?:\r\n?|\n)/g);
227
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1);
228
+ var f = this.yylloc.range;
229
+ return this.yylloc = {
230
+ first_line: this.yylloc.first_line,
231
+ last_line: this.yylineno + 1,
232
+ first_column: this.yylloc.first_column,
233
+ last_column: a ? (a.length === r.length ? this.yylloc.first_column : 0) + r[r.length - a.length].length - a[0].length : this.yylloc.first_column - n
234
+ }, this.options.ranges && (this.yylloc.range = [f[0], f[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this;
235
+ },
236
+ // When called from action, caches matched text and appends it on next action
237
+ more: function() {
238
+ return this._more = !0, this;
239
+ },
240
+ // 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.
241
+ reject: function() {
242
+ if (this.options.backtrack_lexer)
243
+ this._backtrack = !0;
244
+ else
245
+ 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).
246
+ ` + this.showPosition(), {
247
+ text: "",
248
+ token: null,
249
+ line: this.yylineno
250
+ });
251
+ return this;
252
+ },
253
+ // retain first n characters of the match
254
+ less: function(i) {
255
+ this.unput(this.match.slice(i));
256
+ },
257
+ // displays already matched input, i.e. for error messages
258
+ pastInput: function() {
259
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
260
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
261
+ },
262
+ // displays upcoming input, i.e. for error messages
263
+ upcomingInput: function() {
264
+ var i = this.match;
265
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
266
+ },
267
+ // displays the character position where the lexing error occurred, i.e. for error messages
268
+ showPosition: function() {
269
+ var i = this.pastInput(), n = new Array(i.length + 1).join("-");
270
+ return i + this.upcomingInput() + `
271
+ ` + n + "^";
272
+ },
273
+ // test the lexed token: return FALSE when not a match, otherwise return token
274
+ test_match: function(i, n) {
275
+ var a, r, f;
276
+ if (this.options.backtrack_lexer && (f = {
277
+ yylineno: this.yylineno,
278
+ yylloc: {
279
+ first_line: this.yylloc.first_line,
280
+ last_line: this.last_line,
281
+ first_column: this.yylloc.first_column,
282
+ last_column: this.yylloc.last_column
283
+ },
284
+ yytext: this.yytext,
285
+ match: this.match,
286
+ matches: this.matches,
287
+ matched: this.matched,
288
+ yyleng: this.yyleng,
289
+ offset: this.offset,
290
+ _more: this._more,
291
+ _input: this._input,
292
+ yy: this.yy,
293
+ conditionStack: this.conditionStack.slice(0),
294
+ done: this.done
295
+ }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), r = i[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
296
+ first_line: this.yylloc.last_line,
297
+ last_line: this.yylineno + 1,
298
+ first_column: this.yylloc.last_column,
299
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
300
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], a = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a)
301
+ return a;
302
+ if (this._backtrack) {
303
+ for (var s in f)
304
+ this[s] = f[s];
305
+ return !1;
306
+ }
307
+ return !1;
308
+ },
309
+ // return next match in input
310
+ next: function() {
311
+ if (this.done)
312
+ return this.EOF;
313
+ this._input || (this.done = !0);
314
+ var i, n, a, r;
315
+ this._more || (this.yytext = "", this.match = "");
316
+ for (var f = this._currentRules(), s = 0; s < f.length; s++)
317
+ if (a = this._input.match(this.rules[f[s]]), a && (!n || a[0].length > n[0].length)) {
318
+ if (n = a, r = s, this.options.backtrack_lexer) {
319
+ if (i = this.test_match(a, f[s]), i !== !1)
320
+ return i;
321
+ if (this._backtrack) {
322
+ n = !1;
323
+ continue;
324
+ } else
325
+ return !1;
326
+ } else if (!this.options.flex)
327
+ break;
328
+ }
329
+ return n ? (i = this.test_match(n, f[r]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
330
+ ` + this.showPosition(), {
331
+ text: "",
332
+ token: null,
333
+ line: this.yylineno
334
+ });
335
+ },
336
+ // return next match that has a token
337
+ lex: function() {
338
+ var n = this.next();
339
+ return n || this.lex();
340
+ },
341
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
342
+ begin: function(n) {
343
+ this.conditionStack.push(n);
344
+ },
345
+ // pop the previously active lexer condition state off the condition stack
346
+ popState: function() {
347
+ var n = this.conditionStack.length - 1;
348
+ return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];
349
+ },
350
+ // produce the lexer rule set which is active for the currently active lexer condition state
351
+ _currentRules: function() {
352
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
353
+ },
354
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
355
+ topState: function(n) {
356
+ return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
357
+ },
358
+ // alias for begin(condition)
359
+ pushState: function(n) {
360
+ this.begin(n);
361
+ },
362
+ // return the number of states currently on the stack
363
+ stateStackSize: function() {
364
+ return this.conditionStack.length;
365
+ },
366
+ options: { "case-insensitive": !0 },
367
+ performAction: function(n, a, r, f) {
368
+ switch (r) {
369
+ case 0:
370
+ return "title";
371
+ case 1:
372
+ return this.begin("acc_title"), 9;
373
+ case 2:
374
+ return this.popState(), "acc_title_value";
375
+ case 3:
376
+ return this.begin("acc_descr"), 11;
377
+ case 4:
378
+ return this.popState(), "acc_descr_value";
379
+ case 5:
380
+ this.begin("acc_descr_multiline");
381
+ break;
382
+ case 6:
383
+ this.popState();
384
+ break;
385
+ case 7:
386
+ return "acc_descr_multiline_value";
387
+ case 8:
388
+ return 5;
389
+ case 9:
390
+ break;
391
+ case 10:
392
+ break;
393
+ case 11:
394
+ break;
395
+ case 12:
396
+ return 8;
397
+ case 13:
398
+ return 6;
399
+ case 14:
400
+ return 19;
401
+ case 15:
402
+ return 30;
403
+ case 16:
404
+ return 22;
405
+ case 17:
406
+ return 21;
407
+ case 18:
408
+ return 24;
409
+ case 19:
410
+ return 26;
411
+ case 20:
412
+ return 28;
413
+ case 21:
414
+ return 31;
415
+ case 22:
416
+ return 32;
417
+ case 23:
418
+ return 33;
419
+ case 24:
420
+ return 34;
421
+ case 25:
422
+ return 35;
423
+ case 26:
424
+ return 36;
425
+ case 27:
426
+ return 37;
427
+ case 28:
428
+ return 38;
429
+ case 29:
430
+ return 39;
431
+ case 30:
432
+ return 40;
433
+ case 31:
434
+ return 41;
435
+ case 32:
436
+ return 42;
437
+ case 33:
438
+ return 43;
439
+ case 34:
440
+ return 44;
441
+ case 35:
442
+ return 55;
443
+ case 36:
444
+ return 56;
445
+ case 37:
446
+ return 57;
447
+ case 38:
448
+ return 58;
449
+ case 39:
450
+ return 59;
451
+ case 40:
452
+ return 60;
453
+ case 41:
454
+ return 61;
455
+ case 42:
456
+ return 47;
457
+ case 43:
458
+ return 49;
459
+ case 44:
460
+ return 51;
461
+ case 45:
462
+ return 54;
463
+ case 46:
464
+ return 53;
465
+ case 47:
466
+ this.begin("string");
467
+ break;
468
+ case 48:
469
+ this.popState();
470
+ break;
471
+ case 49:
472
+ return "qString";
473
+ case 50:
474
+ return a.yytext = a.yytext.trim(), 62;
475
+ }
476
+ },
477
+ rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i],
478
+ conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, unqString: { rules: [], inclusive: !1 }, token: { rules: [], inclusive: !1 }, string: { rules: [48, 49], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], inclusive: !0 } }
479
+ };
480
+ return V;
481
+ }();
482
+ ie.lexer = $e;
483
+ function re() {
484
+ this.yy = {};
485
+ }
486
+ return re.prototype = ie, ie.Parser = re, new re();
487
+ }();
488
+ ce.parser = ce;
489
+ const He = ce;
490
+ let ue = [], b = {}, K = {}, q = {}, G = {};
491
+ const We = {
492
+ REQUIREMENT: "Requirement",
493
+ FUNCTIONAL_REQUIREMENT: "Functional Requirement",
494
+ INTERFACE_REQUIREMENT: "Interface Requirement",
495
+ PERFORMANCE_REQUIREMENT: "Performance Requirement",
496
+ PHYSICAL_REQUIREMENT: "Physical Requirement",
497
+ DESIGN_CONSTRAINT: "Design Constraint"
498
+ }, Ke = {
499
+ LOW_RISK: "Low",
500
+ MED_RISK: "Medium",
501
+ HIGH_RISK: "High"
502
+ }, Ge = {
503
+ VERIFY_ANALYSIS: "Analysis",
504
+ VERIFY_DEMONSTRATION: "Demonstration",
505
+ VERIFY_INSPECTION: "Inspection",
506
+ VERIFY_TEST: "Test"
507
+ }, ze = {
508
+ CONTAINS: "contains",
509
+ COPIES: "copies",
510
+ DERIVES: "derives",
511
+ SATISFIES: "satisfies",
512
+ VERIFIES: "verifies",
513
+ REFINES: "refines",
514
+ TRACES: "traces"
515
+ }, je = (e, t) => (K[e] === void 0 && (K[e] = {
516
+ name: e,
517
+ type: t,
518
+ id: b.id,
519
+ text: b.text,
520
+ risk: b.risk,
521
+ verifyMethod: b.verifyMethod
522
+ }), b = {}, K[e]), Xe = () => K, Je = (e) => {
523
+ b !== void 0 && (b.id = e);
524
+ }, Ze = (e) => {
525
+ b !== void 0 && (b.text = e);
526
+ }, et = (e) => {
527
+ b !== void 0 && (b.risk = e);
528
+ }, tt = (e) => {
529
+ b !== void 0 && (b.verifyMethod = e);
530
+ }, it = (e) => (G[e] === void 0 && (G[e] = {
531
+ name: e,
532
+ type: q.type,
533
+ docRef: q.docRef
534
+ }, Ne.info("Added new requirement: ", e)), q = {}, G[e]), rt = () => G, nt = (e) => {
535
+ q !== void 0 && (q.type = e);
536
+ }, st = (e) => {
537
+ q !== void 0 && (q.docRef = e);
538
+ }, at = (e, t, l) => {
539
+ ue.push({
540
+ type: e,
541
+ src: t,
542
+ dst: l
543
+ });
544
+ }, lt = () => ue, ot = () => {
545
+ ue = [], b = {}, K = {}, q = {}, G = {}, Pe();
546
+ }, ct = {
547
+ RequirementType: We,
548
+ RiskLevel: Ke,
549
+ VerifyType: Ge,
550
+ Relationships: ze,
551
+ getConfig: () => Te().req,
552
+ addRequirement: je,
553
+ getRequirements: Xe,
554
+ setNewReqId: Je,
555
+ setNewReqText: Ze,
556
+ setNewReqRisk: et,
557
+ setNewReqVerifyMethod: tt,
558
+ setAccTitle: Ce,
559
+ getAccTitle: Fe,
560
+ setAccDescription: Me,
561
+ getAccDescription: De,
562
+ addElement: it,
563
+ getElements: rt,
564
+ setNewElementType: nt,
565
+ setNewElementDocRef: st,
566
+ addRelationship: at,
567
+ getRelationships: lt,
568
+ clear: ot
569
+ }, ht = (e) => `
570
+
571
+ marker {
572
+ fill: ${e.relationColor};
573
+ stroke: ${e.relationColor};
574
+ }
575
+
576
+ marker.cross {
577
+ stroke: ${e.lineColor};
578
+ }
579
+
580
+ svg {
581
+ font-family: ${e.fontFamily};
582
+ font-size: ${e.fontSize};
583
+ }
584
+
585
+ .reqBox {
586
+ fill: ${e.requirementBackground};
587
+ fill-opacity: 1.0;
588
+ stroke: ${e.requirementBorderColor};
589
+ stroke-width: ${e.requirementBorderSize};
590
+ }
591
+
592
+ .reqTitle, .reqLabel{
593
+ fill: ${e.requirementTextColor};
594
+ }
595
+ .reqLabelBox {
596
+ fill: ${e.relationLabelBackground};
597
+ fill-opacity: 1.0;
598
+ }
599
+
600
+ .req-title-line {
601
+ stroke: ${e.requirementBorderColor};
602
+ stroke-width: ${e.requirementBorderSize};
603
+ }
604
+ .relationshipLine {
605
+ stroke: ${e.relationColor};
606
+ stroke-width: 1;
607
+ }
608
+ .relationshipLabel {
609
+ fill: ${e.relationLabelColor};
610
+ }
611
+
612
+ `, ut = ht, he = {
613
+ CONTAINS: "contains",
614
+ ARROW: "arrow"
615
+ }, dt = (e, t) => {
616
+ let l = e.append("defs").append("marker").attr("id", he.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", t.line_height / 2).attr("markerWidth", t.line_height).attr("markerHeight", t.line_height).attr("orient", "auto").append("g");
617
+ l.append("circle").attr("cx", t.line_height / 2).attr("cy", t.line_height / 2).attr("r", t.line_height / 2).attr("fill", "none"), l.append("line").attr("x1", 0).attr("x2", t.line_height).attr("y1", t.line_height / 2).attr("y2", t.line_height / 2).attr("stroke-width", 1), l.append("line").attr("y1", 0).attr("y2", t.line_height).attr("x1", t.line_height / 2).attr("x2", t.line_height / 2).attr("stroke-width", 1), e.append("defs").append("marker").attr("id", he.ARROW + "_line_ending").attr("refX", t.line_height).attr("refY", 0.5 * t.line_height).attr("markerWidth", t.line_height).attr("markerHeight", t.line_height).attr("orient", "auto").append("path").attr(
618
+ "d",
619
+ `M0,0
620
+ L${t.line_height},${t.line_height / 2}
621
+ M${t.line_height},${t.line_height / 2}
622
+ L0,${t.line_height}`
623
+ ).attr("stroke-width", 1);
624
+ }, xe = {
625
+ ReqMarkers: he,
626
+ insertLineEndings: dt
627
+ };
628
+ let y = {}, Se = 0;
629
+ const Ae = (e, t) => e.insert("rect", "#" + t).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", y.rect_min_width + "px").attr("height", y.rect_min_height + "px"), ve = (e, t, l) => {
630
+ let c = y.rect_min_width / 2, u = e.append("text").attr("class", "req reqLabel reqTitle").attr("id", t).attr("x", c).attr("y", y.rect_padding).attr("dominant-baseline", "hanging"), d = 0;
631
+ l.forEach((E) => {
632
+ d == 0 ? u.append("tspan").attr("text-anchor", "middle").attr("x", y.rect_min_width / 2).attr("dy", 0).text(E) : u.append("tspan").attr("text-anchor", "middle").attr("x", y.rect_min_width / 2).attr("dy", y.line_height * 0.75).text(E), d++;
633
+ });
634
+ let p = 1.5 * y.rect_padding, h = d * y.line_height * 0.75, o = p + h;
635
+ return e.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", y.rect_min_width).attr("y1", o).attr("y2", o), {
636
+ titleNode: u,
637
+ y: o
638
+ };
639
+ }, we = (e, t, l, c) => {
640
+ let u = e.append("text").attr("class", "req reqLabel").attr("id", t).attr("x", y.rect_padding).attr("y", c).attr("dominant-baseline", "hanging"), d = 0;
641
+ const p = 30;
642
+ let h = [];
643
+ return l.forEach((o) => {
644
+ let E = o.length;
645
+ for (; E > p && d < 3; ) {
646
+ let R = o.substring(0, p);
647
+ o = o.substring(p, o.length), E = o.length, h[h.length] = R, d++;
648
+ }
649
+ if (d == 3) {
650
+ let R = h[h.length - 1];
651
+ h[h.length - 1] = R.substring(0, R.length - 4) + "...";
652
+ } else
653
+ h[h.length] = o;
654
+ d = 0;
655
+ }), h.forEach((o) => {
656
+ u.append("tspan").attr("x", y.rect_padding).attr("dy", y.line_height).text(o);
657
+ }), u;
658
+ }, pt = (e, t, l, c) => {
659
+ const u = t.node().getTotalLength(), d = t.node().getPointAtLength(u * 0.5), p = "rel" + Se;
660
+ Se++;
661
+ const o = e.append("text").attr("class", "req relationshipLabel").attr("id", p).attr("x", d.x).attr("y", d.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(c).node().getBBox();
662
+ e.insert("rect", "#" + p).attr("class", "req reqLabelBox").attr("x", d.x - o.width / 2).attr("y", d.y - o.height / 2).attr("width", o.width).attr("height", o.height).attr("fill", "white").attr("fill-opacity", "85%");
663
+ }, ft = function(e, t, l, c, u) {
664
+ const d = l.edge(H(t.src), H(t.dst)), p = Qe().x(function(o) {
665
+ return o.x;
666
+ }).y(function(o) {
667
+ return o.y;
668
+ }), h = e.insert("path", "#" + c).attr("class", "er relationshipLine").attr("d", p(d.points)).attr("fill", "none");
669
+ t.type == u.db.Relationships.CONTAINS ? h.attr(
670
+ "marker-start",
671
+ "url(" + ke.getUrl(y.arrowMarkerAbsolute) + "#" + t.type + "_line_ending)"
672
+ ) : (h.attr("stroke-dasharray", "10,7"), h.attr(
673
+ "marker-end",
674
+ "url(" + ke.getUrl(y.arrowMarkerAbsolute) + "#" + xe.ReqMarkers.ARROW + "_line_ending)"
675
+ )), pt(e, h, y, `<<${t.type}>>`);
676
+ }, yt = (e, t, l) => {
677
+ Object.keys(e).forEach((c) => {
678
+ let u = e[c];
679
+ c = H(c), Ne.info("Added new requirement: ", c);
680
+ const d = l.append("g").attr("id", c), p = "req-" + c, h = Ae(d, p);
681
+ let o = ve(d, c + "_title", [
682
+ `<<${u.type}>>`,
683
+ `${u.name}`
684
+ ]);
685
+ we(
686
+ d,
687
+ c + "_body",
688
+ [
689
+ `Id: ${u.id}`,
690
+ `Text: ${u.text}`,
691
+ `Risk: ${u.risk}`,
692
+ `Verification: ${u.verifyMethod}`
693
+ ],
694
+ o.y
695
+ );
696
+ const E = h.node().getBBox();
697
+ t.setNode(c, {
698
+ width: E.width,
699
+ height: E.height,
700
+ shape: "rect",
701
+ id: c
702
+ });
703
+ });
704
+ }, _t = (e, t, l) => {
705
+ Object.keys(e).forEach((c) => {
706
+ let u = e[c];
707
+ const d = H(c), p = l.append("g").attr("id", d), h = "element-" + d, o = Ae(p, h);
708
+ let E = ve(p, h + "_title", ["<<Element>>", `${c}`]);
709
+ we(
710
+ p,
711
+ h + "_body",
712
+ [`Type: ${u.type || "Not Specified"}`, `Doc Ref: ${u.docRef || "None"}`],
713
+ E.y
714
+ );
715
+ const R = o.node().getBBox();
716
+ t.setNode(d, {
717
+ width: R.width,
718
+ height: R.height,
719
+ shape: "rect",
720
+ id: d
721
+ });
722
+ });
723
+ }, Et = (e, t) => (e.forEach(function(l) {
724
+ let c = H(l.src), u = H(l.dst);
725
+ t.setEdge(c, u, { relationship: l });
726
+ }), e), gt = function(e, t) {
727
+ t.nodes().forEach(function(l) {
728
+ l !== void 0 && t.node(l) !== void 0 && (e.select("#" + l), e.select("#" + l).attr(
729
+ "transform",
730
+ "translate(" + (t.node(l).x - t.node(l).width / 2) + "," + (t.node(l).y - t.node(l).height / 2) + " )"
731
+ ));
732
+ });
733
+ }, H = (e) => e.replace(/\s/g, "").replace(/\./g, "_"), Rt = (e, t, l, c) => {
734
+ y = Te().requirement;
735
+ const u = y.securityLevel;
736
+ let d;
737
+ u === "sandbox" && (d = oe("#i" + t));
738
+ const h = (u === "sandbox" ? oe(d.nodes()[0].contentDocument.body) : oe("body")).select(`[id='${t}']`);
739
+ xe.insertLineEndings(h, y);
740
+ const o = new Ue({
741
+ multigraph: !1,
742
+ compound: !1,
743
+ directed: !0
744
+ }).setGraph({
745
+ rankdir: y.layoutDirection,
746
+ marginx: 20,
747
+ marginy: 20,
748
+ nodesep: 100,
749
+ edgesep: 100,
750
+ ranksep: 100
751
+ }).setDefaultEdgeLabel(function() {
752
+ return {};
753
+ });
754
+ let E = c.db.getRequirements(), R = c.db.getElements(), A = c.db.getRelationships();
755
+ yt(E, o, h), _t(R, o, h), Et(A, o), Be(o), gt(h, o), A.forEach(function(x) {
756
+ ft(h, x, o, t, c);
757
+ });
758
+ const T = y.rect_padding, N = h.node().getBBox(), v = N.width + T * 2, k = N.height + T * 2;
759
+ Ye(h, k, v, y.useMaxWidth), h.attr("viewBox", `${N.x - T} ${N.y - T} ${v} ${k}`);
760
+ }, mt = {
761
+ draw: Rt
762
+ }, At = {
763
+ parser: He,
764
+ db: ct,
765
+ renderer: mt,
766
+ styles: ut
767
+ };
768
+ export {
769
+ At as diagram
770
+ };