@readme/markdown 7.10.2 → 7.10.3

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.
@@ -0,0 +1,2725 @@
1
+ "use strict";
2
+ exports.id = 551;
3
+ exports.ids = [551];
4
+ exports.modules = {
5
+
6
+ /***/ 9551:
7
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
+
9
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
+ /* harmony export */ diagram: () => (/* binding */ diagram)
11
+ /* harmony export */ });
12
+ /* harmony import */ var _chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
13
+ /* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2843);
14
+ /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6322);
15
+ /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8066);
16
+ /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6750);
17
+
18
+
19
+
20
+
21
+ // src/diagrams/c4/parser/c4Diagram.jison
22
+ var parser = function() {
23
+ var o = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(k, v, o2, l) {
24
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
25
+ return o2;
26
+ }, "o"), $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74];
27
+ var parser2 = {
28
+ trace: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function trace() {
29
+ }, "trace"),
30
+ yy: {},
31
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 },
32
+ terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" },
33
+ productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]],
34
+ performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
35
+ var $0 = $$.length - 1;
36
+ switch (yystate) {
37
+ case 3:
38
+ yy.setDirection("TB");
39
+ break;
40
+ case 4:
41
+ yy.setDirection("BT");
42
+ break;
43
+ case 5:
44
+ yy.setDirection("RL");
45
+ break;
46
+ case 6:
47
+ yy.setDirection("LR");
48
+ break;
49
+ case 8:
50
+ case 9:
51
+ case 10:
52
+ case 11:
53
+ case 12:
54
+ yy.setC4Type($$[$0 - 3]);
55
+ break;
56
+ case 19:
57
+ yy.setTitle($$[$0].substring(6));
58
+ this.$ = $$[$0].substring(6);
59
+ break;
60
+ case 20:
61
+ yy.setAccDescription($$[$0].substring(15));
62
+ this.$ = $$[$0].substring(15);
63
+ break;
64
+ case 21:
65
+ this.$ = $$[$0].trim();
66
+ yy.setTitle(this.$);
67
+ break;
68
+ case 22:
69
+ case 23:
70
+ this.$ = $$[$0].trim();
71
+ yy.setAccDescription(this.$);
72
+ break;
73
+ case 28:
74
+ $$[$0].splice(2, 0, "ENTERPRISE");
75
+ yy.addPersonOrSystemBoundary(...$$[$0]);
76
+ this.$ = $$[$0];
77
+ break;
78
+ case 29:
79
+ $$[$0].splice(2, 0, "SYSTEM");
80
+ yy.addPersonOrSystemBoundary(...$$[$0]);
81
+ this.$ = $$[$0];
82
+ break;
83
+ case 30:
84
+ yy.addPersonOrSystemBoundary(...$$[$0]);
85
+ this.$ = $$[$0];
86
+ break;
87
+ case 31:
88
+ $$[$0].splice(2, 0, "CONTAINER");
89
+ yy.addContainerBoundary(...$$[$0]);
90
+ this.$ = $$[$0];
91
+ break;
92
+ case 32:
93
+ yy.addDeploymentNode("node", ...$$[$0]);
94
+ this.$ = $$[$0];
95
+ break;
96
+ case 33:
97
+ yy.addDeploymentNode("nodeL", ...$$[$0]);
98
+ this.$ = $$[$0];
99
+ break;
100
+ case 34:
101
+ yy.addDeploymentNode("nodeR", ...$$[$0]);
102
+ this.$ = $$[$0];
103
+ break;
104
+ case 35:
105
+ yy.popBoundaryParseStack();
106
+ break;
107
+ case 39:
108
+ yy.addPersonOrSystem("person", ...$$[$0]);
109
+ this.$ = $$[$0];
110
+ break;
111
+ case 40:
112
+ yy.addPersonOrSystem("external_person", ...$$[$0]);
113
+ this.$ = $$[$0];
114
+ break;
115
+ case 41:
116
+ yy.addPersonOrSystem("system", ...$$[$0]);
117
+ this.$ = $$[$0];
118
+ break;
119
+ case 42:
120
+ yy.addPersonOrSystem("system_db", ...$$[$0]);
121
+ this.$ = $$[$0];
122
+ break;
123
+ case 43:
124
+ yy.addPersonOrSystem("system_queue", ...$$[$0]);
125
+ this.$ = $$[$0];
126
+ break;
127
+ case 44:
128
+ yy.addPersonOrSystem("external_system", ...$$[$0]);
129
+ this.$ = $$[$0];
130
+ break;
131
+ case 45:
132
+ yy.addPersonOrSystem("external_system_db", ...$$[$0]);
133
+ this.$ = $$[$0];
134
+ break;
135
+ case 46:
136
+ yy.addPersonOrSystem("external_system_queue", ...$$[$0]);
137
+ this.$ = $$[$0];
138
+ break;
139
+ case 47:
140
+ yy.addContainer("container", ...$$[$0]);
141
+ this.$ = $$[$0];
142
+ break;
143
+ case 48:
144
+ yy.addContainer("container_db", ...$$[$0]);
145
+ this.$ = $$[$0];
146
+ break;
147
+ case 49:
148
+ yy.addContainer("container_queue", ...$$[$0]);
149
+ this.$ = $$[$0];
150
+ break;
151
+ case 50:
152
+ yy.addContainer("external_container", ...$$[$0]);
153
+ this.$ = $$[$0];
154
+ break;
155
+ case 51:
156
+ yy.addContainer("external_container_db", ...$$[$0]);
157
+ this.$ = $$[$0];
158
+ break;
159
+ case 52:
160
+ yy.addContainer("external_container_queue", ...$$[$0]);
161
+ this.$ = $$[$0];
162
+ break;
163
+ case 53:
164
+ yy.addComponent("component", ...$$[$0]);
165
+ this.$ = $$[$0];
166
+ break;
167
+ case 54:
168
+ yy.addComponent("component_db", ...$$[$0]);
169
+ this.$ = $$[$0];
170
+ break;
171
+ case 55:
172
+ yy.addComponent("component_queue", ...$$[$0]);
173
+ this.$ = $$[$0];
174
+ break;
175
+ case 56:
176
+ yy.addComponent("external_component", ...$$[$0]);
177
+ this.$ = $$[$0];
178
+ break;
179
+ case 57:
180
+ yy.addComponent("external_component_db", ...$$[$0]);
181
+ this.$ = $$[$0];
182
+ break;
183
+ case 58:
184
+ yy.addComponent("external_component_queue", ...$$[$0]);
185
+ this.$ = $$[$0];
186
+ break;
187
+ case 60:
188
+ yy.addRel("rel", ...$$[$0]);
189
+ this.$ = $$[$0];
190
+ break;
191
+ case 61:
192
+ yy.addRel("birel", ...$$[$0]);
193
+ this.$ = $$[$0];
194
+ break;
195
+ case 62:
196
+ yy.addRel("rel_u", ...$$[$0]);
197
+ this.$ = $$[$0];
198
+ break;
199
+ case 63:
200
+ yy.addRel("rel_d", ...$$[$0]);
201
+ this.$ = $$[$0];
202
+ break;
203
+ case 64:
204
+ yy.addRel("rel_l", ...$$[$0]);
205
+ this.$ = $$[$0];
206
+ break;
207
+ case 65:
208
+ yy.addRel("rel_r", ...$$[$0]);
209
+ this.$ = $$[$0];
210
+ break;
211
+ case 66:
212
+ yy.addRel("rel_b", ...$$[$0]);
213
+ this.$ = $$[$0];
214
+ break;
215
+ case 67:
216
+ $$[$0].splice(0, 1);
217
+ yy.addRel("rel", ...$$[$0]);
218
+ this.$ = $$[$0];
219
+ break;
220
+ case 68:
221
+ yy.updateElStyle("update_el_style", ...$$[$0]);
222
+ this.$ = $$[$0];
223
+ break;
224
+ case 69:
225
+ yy.updateRelStyle("update_rel_style", ...$$[$0]);
226
+ this.$ = $$[$0];
227
+ break;
228
+ case 70:
229
+ yy.updateLayoutConfig("update_layout_config", ...$$[$0]);
230
+ this.$ = $$[$0];
231
+ break;
232
+ case 71:
233
+ this.$ = [$$[$0]];
234
+ break;
235
+ case 72:
236
+ $$[$0].unshift($$[$0 - 1]);
237
+ this.$ = $$[$0];
238
+ break;
239
+ case 73:
240
+ case 75:
241
+ this.$ = $$[$0].trim();
242
+ break;
243
+ case 74:
244
+ let kv = {};
245
+ kv[$$[$0 - 1].trim()] = $$[$0].trim();
246
+ this.$ = kv;
247
+ break;
248
+ case 76:
249
+ this.$ = "";
250
+ break;
251
+ }
252
+ }, "anonymous"),
253
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])],
254
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] },
255
+ parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function parseError(str, hash) {
256
+ if (hash.recoverable) {
257
+ this.trace(str);
258
+ } else {
259
+ var error = new Error(str);
260
+ error.hash = hash;
261
+ throw error;
262
+ }
263
+ }, "parseError"),
264
+ parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function parse(input) {
265
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
266
+ var args = lstack.slice.call(arguments, 1);
267
+ var lexer2 = Object.create(this.lexer);
268
+ var sharedState = { yy: {} };
269
+ for (var k in this.yy) {
270
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
271
+ sharedState.yy[k] = this.yy[k];
272
+ }
273
+ }
274
+ lexer2.setInput(input, sharedState.yy);
275
+ sharedState.yy.lexer = lexer2;
276
+ sharedState.yy.parser = this;
277
+ if (typeof lexer2.yylloc == "undefined") {
278
+ lexer2.yylloc = {};
279
+ }
280
+ var yyloc = lexer2.yylloc;
281
+ lstack.push(yyloc);
282
+ var ranges = lexer2.options && lexer2.options.ranges;
283
+ if (typeof sharedState.yy.parseError === "function") {
284
+ this.parseError = sharedState.yy.parseError;
285
+ } else {
286
+ this.parseError = Object.getPrototypeOf(this).parseError;
287
+ }
288
+ function popStack(n) {
289
+ stack.length = stack.length - 2 * n;
290
+ vstack.length = vstack.length - n;
291
+ lstack.length = lstack.length - n;
292
+ }
293
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(popStack, "popStack");
294
+ function lex() {
295
+ var token;
296
+ token = tstack.pop() || lexer2.lex() || EOF;
297
+ if (typeof token !== "number") {
298
+ if (token instanceof Array) {
299
+ tstack = token;
300
+ token = tstack.pop();
301
+ }
302
+ token = self.symbols_[token] || token;
303
+ }
304
+ return token;
305
+ }
306
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(lex, "lex");
307
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
308
+ while (true) {
309
+ state = stack[stack.length - 1];
310
+ if (this.defaultActions[state]) {
311
+ action = this.defaultActions[state];
312
+ } else {
313
+ if (symbol === null || typeof symbol == "undefined") {
314
+ symbol = lex();
315
+ }
316
+ action = table[state] && table[state][symbol];
317
+ }
318
+ if (typeof action === "undefined" || !action.length || !action[0]) {
319
+ var errStr = "";
320
+ expected = [];
321
+ for (p in table[state]) {
322
+ if (this.terminals_[p] && p > TERROR) {
323
+ expected.push("'" + this.terminals_[p] + "'");
324
+ }
325
+ }
326
+ if (lexer2.showPosition) {
327
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
328
+ } else {
329
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
330
+ }
331
+ this.parseError(errStr, {
332
+ text: lexer2.match,
333
+ token: this.terminals_[symbol] || symbol,
334
+ line: lexer2.yylineno,
335
+ loc: yyloc,
336
+ expected
337
+ });
338
+ }
339
+ if (action[0] instanceof Array && action.length > 1) {
340
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
341
+ }
342
+ switch (action[0]) {
343
+ case 1:
344
+ stack.push(symbol);
345
+ vstack.push(lexer2.yytext);
346
+ lstack.push(lexer2.yylloc);
347
+ stack.push(action[1]);
348
+ symbol = null;
349
+ if (!preErrorSymbol) {
350
+ yyleng = lexer2.yyleng;
351
+ yytext = lexer2.yytext;
352
+ yylineno = lexer2.yylineno;
353
+ yyloc = lexer2.yylloc;
354
+ if (recovering > 0) {
355
+ recovering--;
356
+ }
357
+ } else {
358
+ symbol = preErrorSymbol;
359
+ preErrorSymbol = null;
360
+ }
361
+ break;
362
+ case 2:
363
+ len = this.productions_[action[1]][1];
364
+ yyval.$ = vstack[vstack.length - len];
365
+ yyval._$ = {
366
+ first_line: lstack[lstack.length - (len || 1)].first_line,
367
+ last_line: lstack[lstack.length - 1].last_line,
368
+ first_column: lstack[lstack.length - (len || 1)].first_column,
369
+ last_column: lstack[lstack.length - 1].last_column
370
+ };
371
+ if (ranges) {
372
+ yyval._$.range = [
373
+ lstack[lstack.length - (len || 1)].range[0],
374
+ lstack[lstack.length - 1].range[1]
375
+ ];
376
+ }
377
+ r = this.performAction.apply(yyval, [
378
+ yytext,
379
+ yyleng,
380
+ yylineno,
381
+ sharedState.yy,
382
+ action[1],
383
+ vstack,
384
+ lstack
385
+ ].concat(args));
386
+ if (typeof r !== "undefined") {
387
+ return r;
388
+ }
389
+ if (len) {
390
+ stack = stack.slice(0, -1 * len * 2);
391
+ vstack = vstack.slice(0, -1 * len);
392
+ lstack = lstack.slice(0, -1 * len);
393
+ }
394
+ stack.push(this.productions_[action[1]][0]);
395
+ vstack.push(yyval.$);
396
+ lstack.push(yyval._$);
397
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
398
+ stack.push(newState);
399
+ break;
400
+ case 3:
401
+ return true;
402
+ }
403
+ }
404
+ return true;
405
+ }, "parse")
406
+ };
407
+ var lexer = /* @__PURE__ */ function() {
408
+ var lexer2 = {
409
+ EOF: 1,
410
+ parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function parseError(str, hash) {
411
+ if (this.yy.parser) {
412
+ this.yy.parser.parseError(str, hash);
413
+ } else {
414
+ throw new Error(str);
415
+ }
416
+ }, "parseError"),
417
+ // resets the lexer, sets new input
418
+ setInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(input, yy) {
419
+ this.yy = yy || this.yy || {};
420
+ this._input = input;
421
+ this._more = this._backtrack = this.done = false;
422
+ this.yylineno = this.yyleng = 0;
423
+ this.yytext = this.matched = this.match = "";
424
+ this.conditionStack = ["INITIAL"];
425
+ this.yylloc = {
426
+ first_line: 1,
427
+ first_column: 0,
428
+ last_line: 1,
429
+ last_column: 0
430
+ };
431
+ if (this.options.ranges) {
432
+ this.yylloc.range = [0, 0];
433
+ }
434
+ this.offset = 0;
435
+ return this;
436
+ }, "setInput"),
437
+ // consumes and returns one char from the input
438
+ input: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
439
+ var ch = this._input[0];
440
+ this.yytext += ch;
441
+ this.yyleng++;
442
+ this.offset++;
443
+ this.match += ch;
444
+ this.matched += ch;
445
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
446
+ if (lines) {
447
+ this.yylineno++;
448
+ this.yylloc.last_line++;
449
+ } else {
450
+ this.yylloc.last_column++;
451
+ }
452
+ if (this.options.ranges) {
453
+ this.yylloc.range[1]++;
454
+ }
455
+ this._input = this._input.slice(1);
456
+ return ch;
457
+ }, "input"),
458
+ // unshifts one char (or a string) into the input
459
+ unput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(ch) {
460
+ var len = ch.length;
461
+ var lines = ch.split(/(?:\r\n?|\n)/g);
462
+ this._input = ch + this._input;
463
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
464
+ this.offset -= len;
465
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
466
+ this.match = this.match.substr(0, this.match.length - 1);
467
+ this.matched = this.matched.substr(0, this.matched.length - 1);
468
+ if (lines.length - 1) {
469
+ this.yylineno -= lines.length - 1;
470
+ }
471
+ var r = this.yylloc.range;
472
+ this.yylloc = {
473
+ first_line: this.yylloc.first_line,
474
+ last_line: this.yylineno + 1,
475
+ first_column: this.yylloc.first_column,
476
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
477
+ };
478
+ if (this.options.ranges) {
479
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
480
+ }
481
+ this.yyleng = this.yytext.length;
482
+ return this;
483
+ }, "unput"),
484
+ // When called from action, caches matched text and appends it on next action
485
+ more: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
486
+ this._more = true;
487
+ return this;
488
+ }, "more"),
489
+ // 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.
490
+ reject: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
491
+ if (this.options.backtrack_lexer) {
492
+ this._backtrack = true;
493
+ } else {
494
+ 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(), {
495
+ text: "",
496
+ token: null,
497
+ line: this.yylineno
498
+ });
499
+ }
500
+ return this;
501
+ }, "reject"),
502
+ // retain first n characters of the match
503
+ less: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(n) {
504
+ this.unput(this.match.slice(n));
505
+ }, "less"),
506
+ // displays already matched input, i.e. for error messages
507
+ pastInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
508
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
509
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
510
+ }, "pastInput"),
511
+ // displays upcoming input, i.e. for error messages
512
+ upcomingInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
513
+ var next = this.match;
514
+ if (next.length < 20) {
515
+ next += this._input.substr(0, 20 - next.length);
516
+ }
517
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
518
+ }, "upcomingInput"),
519
+ // displays the character position where the lexing error occurred, i.e. for error messages
520
+ showPosition: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
521
+ var pre = this.pastInput();
522
+ var c2 = new Array(pre.length + 1).join("-");
523
+ return pre + this.upcomingInput() + "\n" + c2 + "^";
524
+ }, "showPosition"),
525
+ // test the lexed token: return FALSE when not a match, otherwise return token
526
+ test_match: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(match, indexed_rule) {
527
+ var token, lines, backup;
528
+ if (this.options.backtrack_lexer) {
529
+ backup = {
530
+ yylineno: this.yylineno,
531
+ yylloc: {
532
+ first_line: this.yylloc.first_line,
533
+ last_line: this.last_line,
534
+ first_column: this.yylloc.first_column,
535
+ last_column: this.yylloc.last_column
536
+ },
537
+ yytext: this.yytext,
538
+ match: this.match,
539
+ matches: this.matches,
540
+ matched: this.matched,
541
+ yyleng: this.yyleng,
542
+ offset: this.offset,
543
+ _more: this._more,
544
+ _input: this._input,
545
+ yy: this.yy,
546
+ conditionStack: this.conditionStack.slice(0),
547
+ done: this.done
548
+ };
549
+ if (this.options.ranges) {
550
+ backup.yylloc.range = this.yylloc.range.slice(0);
551
+ }
552
+ }
553
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
554
+ if (lines) {
555
+ this.yylineno += lines.length;
556
+ }
557
+ this.yylloc = {
558
+ first_line: this.yylloc.last_line,
559
+ last_line: this.yylineno + 1,
560
+ first_column: this.yylloc.last_column,
561
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
562
+ };
563
+ this.yytext += match[0];
564
+ this.match += match[0];
565
+ this.matches = match;
566
+ this.yyleng = this.yytext.length;
567
+ if (this.options.ranges) {
568
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
569
+ }
570
+ this._more = false;
571
+ this._backtrack = false;
572
+ this._input = this._input.slice(match[0].length);
573
+ this.matched += match[0];
574
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
575
+ if (this.done && this._input) {
576
+ this.done = false;
577
+ }
578
+ if (token) {
579
+ return token;
580
+ } else if (this._backtrack) {
581
+ for (var k in backup) {
582
+ this[k] = backup[k];
583
+ }
584
+ return false;
585
+ }
586
+ return false;
587
+ }, "test_match"),
588
+ // return next match in input
589
+ next: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
590
+ if (this.done) {
591
+ return this.EOF;
592
+ }
593
+ if (!this._input) {
594
+ this.done = true;
595
+ }
596
+ var token, match, tempMatch, index;
597
+ if (!this._more) {
598
+ this.yytext = "";
599
+ this.match = "";
600
+ }
601
+ var rules = this._currentRules();
602
+ for (var i = 0; i < rules.length; i++) {
603
+ tempMatch = this._input.match(this.rules[rules[i]]);
604
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
605
+ match = tempMatch;
606
+ index = i;
607
+ if (this.options.backtrack_lexer) {
608
+ token = this.test_match(tempMatch, rules[i]);
609
+ if (token !== false) {
610
+ return token;
611
+ } else if (this._backtrack) {
612
+ match = false;
613
+ continue;
614
+ } else {
615
+ return false;
616
+ }
617
+ } else if (!this.options.flex) {
618
+ break;
619
+ }
620
+ }
621
+ }
622
+ if (match) {
623
+ token = this.test_match(match, rules[index]);
624
+ if (token !== false) {
625
+ return token;
626
+ }
627
+ return false;
628
+ }
629
+ if (this._input === "") {
630
+ return this.EOF;
631
+ } else {
632
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
633
+ text: "",
634
+ token: null,
635
+ line: this.yylineno
636
+ });
637
+ }
638
+ }, "next"),
639
+ // return next match that has a token
640
+ lex: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function lex() {
641
+ var r = this.next();
642
+ if (r) {
643
+ return r;
644
+ } else {
645
+ return this.lex();
646
+ }
647
+ }, "lex"),
648
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
649
+ begin: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function begin(condition) {
650
+ this.conditionStack.push(condition);
651
+ }, "begin"),
652
+ // pop the previously active lexer condition state off the condition stack
653
+ popState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function popState() {
654
+ var n = this.conditionStack.length - 1;
655
+ if (n > 0) {
656
+ return this.conditionStack.pop();
657
+ } else {
658
+ return this.conditionStack[0];
659
+ }
660
+ }, "popState"),
661
+ // produce the lexer rule set which is active for the currently active lexer condition state
662
+ _currentRules: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function _currentRules() {
663
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
664
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
665
+ } else {
666
+ return this.conditions["INITIAL"].rules;
667
+ }
668
+ }, "_currentRules"),
669
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
670
+ topState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function topState(n) {
671
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
672
+ if (n >= 0) {
673
+ return this.conditionStack[n];
674
+ } else {
675
+ return "INITIAL";
676
+ }
677
+ }, "topState"),
678
+ // alias for begin(condition)
679
+ pushState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function pushState(condition) {
680
+ this.begin(condition);
681
+ }, "pushState"),
682
+ // return the number of states currently on the stack
683
+ stateStackSize: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function stateStackSize() {
684
+ return this.conditionStack.length;
685
+ }, "stateStackSize"),
686
+ options: {},
687
+ performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
688
+ var YYSTATE = YY_START;
689
+ switch ($avoiding_name_collisions) {
690
+ case 0:
691
+ return 6;
692
+ break;
693
+ case 1:
694
+ return 7;
695
+ break;
696
+ case 2:
697
+ return 8;
698
+ break;
699
+ case 3:
700
+ return 9;
701
+ break;
702
+ case 4:
703
+ return 22;
704
+ break;
705
+ case 5:
706
+ return 23;
707
+ break;
708
+ case 6:
709
+ this.begin("acc_title");
710
+ return 24;
711
+ break;
712
+ case 7:
713
+ this.popState();
714
+ return "acc_title_value";
715
+ break;
716
+ case 8:
717
+ this.begin("acc_descr");
718
+ return 26;
719
+ break;
720
+ case 9:
721
+ this.popState();
722
+ return "acc_descr_value";
723
+ break;
724
+ case 10:
725
+ this.begin("acc_descr_multiline");
726
+ break;
727
+ case 11:
728
+ this.popState();
729
+ break;
730
+ case 12:
731
+ return "acc_descr_multiline_value";
732
+ break;
733
+ case 13:
734
+ break;
735
+ case 14:
736
+ c;
737
+ break;
738
+ case 15:
739
+ return 12;
740
+ break;
741
+ case 16:
742
+ break;
743
+ case 17:
744
+ return 11;
745
+ break;
746
+ case 18:
747
+ return 15;
748
+ break;
749
+ case 19:
750
+ return 16;
751
+ break;
752
+ case 20:
753
+ return 17;
754
+ break;
755
+ case 21:
756
+ return 18;
757
+ break;
758
+ case 22:
759
+ this.begin("person_ext");
760
+ return 45;
761
+ break;
762
+ case 23:
763
+ this.begin("person");
764
+ return 44;
765
+ break;
766
+ case 24:
767
+ this.begin("system_ext_queue");
768
+ return 51;
769
+ break;
770
+ case 25:
771
+ this.begin("system_ext_db");
772
+ return 50;
773
+ break;
774
+ case 26:
775
+ this.begin("system_ext");
776
+ return 49;
777
+ break;
778
+ case 27:
779
+ this.begin("system_queue");
780
+ return 48;
781
+ break;
782
+ case 28:
783
+ this.begin("system_db");
784
+ return 47;
785
+ break;
786
+ case 29:
787
+ this.begin("system");
788
+ return 46;
789
+ break;
790
+ case 30:
791
+ this.begin("boundary");
792
+ return 37;
793
+ break;
794
+ case 31:
795
+ this.begin("enterprise_boundary");
796
+ return 34;
797
+ break;
798
+ case 32:
799
+ this.begin("system_boundary");
800
+ return 36;
801
+ break;
802
+ case 33:
803
+ this.begin("container_ext_queue");
804
+ return 57;
805
+ break;
806
+ case 34:
807
+ this.begin("container_ext_db");
808
+ return 56;
809
+ break;
810
+ case 35:
811
+ this.begin("container_ext");
812
+ return 55;
813
+ break;
814
+ case 36:
815
+ this.begin("container_queue");
816
+ return 54;
817
+ break;
818
+ case 37:
819
+ this.begin("container_db");
820
+ return 53;
821
+ break;
822
+ case 38:
823
+ this.begin("container");
824
+ return 52;
825
+ break;
826
+ case 39:
827
+ this.begin("container_boundary");
828
+ return 38;
829
+ break;
830
+ case 40:
831
+ this.begin("component_ext_queue");
832
+ return 63;
833
+ break;
834
+ case 41:
835
+ this.begin("component_ext_db");
836
+ return 62;
837
+ break;
838
+ case 42:
839
+ this.begin("component_ext");
840
+ return 61;
841
+ break;
842
+ case 43:
843
+ this.begin("component_queue");
844
+ return 60;
845
+ break;
846
+ case 44:
847
+ this.begin("component_db");
848
+ return 59;
849
+ break;
850
+ case 45:
851
+ this.begin("component");
852
+ return 58;
853
+ break;
854
+ case 46:
855
+ this.begin("node");
856
+ return 39;
857
+ break;
858
+ case 47:
859
+ this.begin("node");
860
+ return 39;
861
+ break;
862
+ case 48:
863
+ this.begin("node_l");
864
+ return 40;
865
+ break;
866
+ case 49:
867
+ this.begin("node_r");
868
+ return 41;
869
+ break;
870
+ case 50:
871
+ this.begin("rel");
872
+ return 64;
873
+ break;
874
+ case 51:
875
+ this.begin("birel");
876
+ return 65;
877
+ break;
878
+ case 52:
879
+ this.begin("rel_u");
880
+ return 66;
881
+ break;
882
+ case 53:
883
+ this.begin("rel_u");
884
+ return 66;
885
+ break;
886
+ case 54:
887
+ this.begin("rel_d");
888
+ return 67;
889
+ break;
890
+ case 55:
891
+ this.begin("rel_d");
892
+ return 67;
893
+ break;
894
+ case 56:
895
+ this.begin("rel_l");
896
+ return 68;
897
+ break;
898
+ case 57:
899
+ this.begin("rel_l");
900
+ return 68;
901
+ break;
902
+ case 58:
903
+ this.begin("rel_r");
904
+ return 69;
905
+ break;
906
+ case 59:
907
+ this.begin("rel_r");
908
+ return 69;
909
+ break;
910
+ case 60:
911
+ this.begin("rel_b");
912
+ return 70;
913
+ break;
914
+ case 61:
915
+ this.begin("rel_index");
916
+ return 71;
917
+ break;
918
+ case 62:
919
+ this.begin("update_el_style");
920
+ return 72;
921
+ break;
922
+ case 63:
923
+ this.begin("update_rel_style");
924
+ return 73;
925
+ break;
926
+ case 64:
927
+ this.begin("update_layout_config");
928
+ return 74;
929
+ break;
930
+ case 65:
931
+ return "EOF_IN_STRUCT";
932
+ break;
933
+ case 66:
934
+ this.begin("attribute");
935
+ return "ATTRIBUTE_EMPTY";
936
+ break;
937
+ case 67:
938
+ this.begin("attribute");
939
+ break;
940
+ case 68:
941
+ this.popState();
942
+ this.popState();
943
+ break;
944
+ case 69:
945
+ return 80;
946
+ break;
947
+ case 70:
948
+ break;
949
+ case 71:
950
+ return 80;
951
+ break;
952
+ case 72:
953
+ this.begin("string");
954
+ break;
955
+ case 73:
956
+ this.popState();
957
+ break;
958
+ case 74:
959
+ return "STR";
960
+ break;
961
+ case 75:
962
+ this.begin("string_kv");
963
+ break;
964
+ case 76:
965
+ this.begin("string_kv_key");
966
+ return "STR_KEY";
967
+ break;
968
+ case 77:
969
+ this.popState();
970
+ this.begin("string_kv_value");
971
+ break;
972
+ case 78:
973
+ return "STR_VALUE";
974
+ break;
975
+ case 79:
976
+ this.popState();
977
+ this.popState();
978
+ break;
979
+ case 80:
980
+ return "STR";
981
+ break;
982
+ case 81:
983
+ return "LBRACE";
984
+ break;
985
+ case 82:
986
+ return "RBRACE";
987
+ break;
988
+ case 83:
989
+ return "SPACE";
990
+ break;
991
+ case 84:
992
+ return "EOL";
993
+ break;
994
+ case 85:
995
+ return 14;
996
+ break;
997
+ }
998
+ }, "anonymous"),
999
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
1000
+ conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 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, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } }
1001
+ };
1002
+ return lexer2;
1003
+ }();
1004
+ parser2.lexer = lexer;
1005
+ function Parser() {
1006
+ this.yy = {};
1007
+ }
1008
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(Parser, "Parser");
1009
+ Parser.prototype = parser2;
1010
+ parser2.Parser = Parser;
1011
+ return new Parser();
1012
+ }();
1013
+ parser.parser = parser;
1014
+ var c4Diagram_default = parser;
1015
+
1016
+ // src/diagrams/c4/c4Db.js
1017
+ var c4ShapeArray = [];
1018
+ var boundaryParseStack = [""];
1019
+ var currentBoundaryParse = "global";
1020
+ var parentBoundaryParse = "";
1021
+ var boundaries = [
1022
+ {
1023
+ alias: "global",
1024
+ label: { text: "global" },
1025
+ type: { text: "global" },
1026
+ tags: null,
1027
+ link: null,
1028
+ parentBoundary: ""
1029
+ }
1030
+ ];
1031
+ var rels = [];
1032
+ var title = "";
1033
+ var wrapEnabled = false;
1034
+ var c4ShapeInRow = 4;
1035
+ var c4BoundaryInRow = 2;
1036
+ var c4Type;
1037
+ var getC4Type = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1038
+ return c4Type;
1039
+ }, "getC4Type");
1040
+ var setC4Type = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(c4TypeParam) {
1041
+ let sanitizedText = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .sanitizeText */ .jZ)(c4TypeParam, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)());
1042
+ c4Type = sanitizedText;
1043
+ }, "setC4Type");
1044
+ var addRel = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(type, from, to, label, techn, descr, sprite, tags, link) {
1045
+ if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) {
1046
+ return;
1047
+ }
1048
+ let rel = {};
1049
+ const old = rels.find((rel2) => rel2.from === from && rel2.to === to);
1050
+ if (old) {
1051
+ rel = old;
1052
+ } else {
1053
+ rels.push(rel);
1054
+ }
1055
+ rel.type = type;
1056
+ rel.from = from;
1057
+ rel.to = to;
1058
+ rel.label = { text: label };
1059
+ if (techn === void 0 || techn === null) {
1060
+ rel.techn = { text: "" };
1061
+ } else {
1062
+ if (typeof techn === "object") {
1063
+ let [key, value] = Object.entries(techn)[0];
1064
+ rel[key] = { text: value };
1065
+ } else {
1066
+ rel.techn = { text: techn };
1067
+ }
1068
+ }
1069
+ if (descr === void 0 || descr === null) {
1070
+ rel.descr = { text: "" };
1071
+ } else {
1072
+ if (typeof descr === "object") {
1073
+ let [key, value] = Object.entries(descr)[0];
1074
+ rel[key] = { text: value };
1075
+ } else {
1076
+ rel.descr = { text: descr };
1077
+ }
1078
+ }
1079
+ if (typeof sprite === "object") {
1080
+ let [key, value] = Object.entries(sprite)[0];
1081
+ rel[key] = value;
1082
+ } else {
1083
+ rel.sprite = sprite;
1084
+ }
1085
+ if (typeof tags === "object") {
1086
+ let [key, value] = Object.entries(tags)[0];
1087
+ rel[key] = value;
1088
+ } else {
1089
+ rel.tags = tags;
1090
+ }
1091
+ if (typeof link === "object") {
1092
+ let [key, value] = Object.entries(link)[0];
1093
+ rel[key] = value;
1094
+ } else {
1095
+ rel.link = link;
1096
+ }
1097
+ rel.wrap = autoWrap();
1098
+ }, "addRel");
1099
+ var addPersonOrSystem = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, alias, label, descr, sprite, tags, link) {
1100
+ if (alias === null || label === null) {
1101
+ return;
1102
+ }
1103
+ let personOrSystem = {};
1104
+ const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias);
1105
+ if (old && alias === old.alias) {
1106
+ personOrSystem = old;
1107
+ } else {
1108
+ personOrSystem.alias = alias;
1109
+ c4ShapeArray.push(personOrSystem);
1110
+ }
1111
+ if (label === void 0 || label === null) {
1112
+ personOrSystem.label = { text: "" };
1113
+ } else {
1114
+ personOrSystem.label = { text: label };
1115
+ }
1116
+ if (descr === void 0 || descr === null) {
1117
+ personOrSystem.descr = { text: "" };
1118
+ } else {
1119
+ if (typeof descr === "object") {
1120
+ let [key, value] = Object.entries(descr)[0];
1121
+ personOrSystem[key] = { text: value };
1122
+ } else {
1123
+ personOrSystem.descr = { text: descr };
1124
+ }
1125
+ }
1126
+ if (typeof sprite === "object") {
1127
+ let [key, value] = Object.entries(sprite)[0];
1128
+ personOrSystem[key] = value;
1129
+ } else {
1130
+ personOrSystem.sprite = sprite;
1131
+ }
1132
+ if (typeof tags === "object") {
1133
+ let [key, value] = Object.entries(tags)[0];
1134
+ personOrSystem[key] = value;
1135
+ } else {
1136
+ personOrSystem.tags = tags;
1137
+ }
1138
+ if (typeof link === "object") {
1139
+ let [key, value] = Object.entries(link)[0];
1140
+ personOrSystem[key] = value;
1141
+ } else {
1142
+ personOrSystem.link = link;
1143
+ }
1144
+ personOrSystem.typeC4Shape = { text: typeC4Shape };
1145
+ personOrSystem.parentBoundary = currentBoundaryParse;
1146
+ personOrSystem.wrap = autoWrap();
1147
+ }, "addPersonOrSystem");
1148
+ var addContainer = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
1149
+ if (alias === null || label === null) {
1150
+ return;
1151
+ }
1152
+ let container = {};
1153
+ const old = c4ShapeArray.find((container2) => container2.alias === alias);
1154
+ if (old && alias === old.alias) {
1155
+ container = old;
1156
+ } else {
1157
+ container.alias = alias;
1158
+ c4ShapeArray.push(container);
1159
+ }
1160
+ if (label === void 0 || label === null) {
1161
+ container.label = { text: "" };
1162
+ } else {
1163
+ container.label = { text: label };
1164
+ }
1165
+ if (techn === void 0 || techn === null) {
1166
+ container.techn = { text: "" };
1167
+ } else {
1168
+ if (typeof techn === "object") {
1169
+ let [key, value] = Object.entries(techn)[0];
1170
+ container[key] = { text: value };
1171
+ } else {
1172
+ container.techn = { text: techn };
1173
+ }
1174
+ }
1175
+ if (descr === void 0 || descr === null) {
1176
+ container.descr = { text: "" };
1177
+ } else {
1178
+ if (typeof descr === "object") {
1179
+ let [key, value] = Object.entries(descr)[0];
1180
+ container[key] = { text: value };
1181
+ } else {
1182
+ container.descr = { text: descr };
1183
+ }
1184
+ }
1185
+ if (typeof sprite === "object") {
1186
+ let [key, value] = Object.entries(sprite)[0];
1187
+ container[key] = value;
1188
+ } else {
1189
+ container.sprite = sprite;
1190
+ }
1191
+ if (typeof tags === "object") {
1192
+ let [key, value] = Object.entries(tags)[0];
1193
+ container[key] = value;
1194
+ } else {
1195
+ container.tags = tags;
1196
+ }
1197
+ if (typeof link === "object") {
1198
+ let [key, value] = Object.entries(link)[0];
1199
+ container[key] = value;
1200
+ } else {
1201
+ container.link = link;
1202
+ }
1203
+ container.wrap = autoWrap();
1204
+ container.typeC4Shape = { text: typeC4Shape };
1205
+ container.parentBoundary = currentBoundaryParse;
1206
+ }, "addContainer");
1207
+ var addComponent = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
1208
+ if (alias === null || label === null) {
1209
+ return;
1210
+ }
1211
+ let component = {};
1212
+ const old = c4ShapeArray.find((component2) => component2.alias === alias);
1213
+ if (old && alias === old.alias) {
1214
+ component = old;
1215
+ } else {
1216
+ component.alias = alias;
1217
+ c4ShapeArray.push(component);
1218
+ }
1219
+ if (label === void 0 || label === null) {
1220
+ component.label = { text: "" };
1221
+ } else {
1222
+ component.label = { text: label };
1223
+ }
1224
+ if (techn === void 0 || techn === null) {
1225
+ component.techn = { text: "" };
1226
+ } else {
1227
+ if (typeof techn === "object") {
1228
+ let [key, value] = Object.entries(techn)[0];
1229
+ component[key] = { text: value };
1230
+ } else {
1231
+ component.techn = { text: techn };
1232
+ }
1233
+ }
1234
+ if (descr === void 0 || descr === null) {
1235
+ component.descr = { text: "" };
1236
+ } else {
1237
+ if (typeof descr === "object") {
1238
+ let [key, value] = Object.entries(descr)[0];
1239
+ component[key] = { text: value };
1240
+ } else {
1241
+ component.descr = { text: descr };
1242
+ }
1243
+ }
1244
+ if (typeof sprite === "object") {
1245
+ let [key, value] = Object.entries(sprite)[0];
1246
+ component[key] = value;
1247
+ } else {
1248
+ component.sprite = sprite;
1249
+ }
1250
+ if (typeof tags === "object") {
1251
+ let [key, value] = Object.entries(tags)[0];
1252
+ component[key] = value;
1253
+ } else {
1254
+ component.tags = tags;
1255
+ }
1256
+ if (typeof link === "object") {
1257
+ let [key, value] = Object.entries(link)[0];
1258
+ component[key] = value;
1259
+ } else {
1260
+ component.link = link;
1261
+ }
1262
+ component.wrap = autoWrap();
1263
+ component.typeC4Shape = { text: typeC4Shape };
1264
+ component.parentBoundary = currentBoundaryParse;
1265
+ }, "addComponent");
1266
+ var addPersonOrSystemBoundary = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(alias, label, type, tags, link) {
1267
+ if (alias === null || label === null) {
1268
+ return;
1269
+ }
1270
+ let boundary = {};
1271
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1272
+ if (old && alias === old.alias) {
1273
+ boundary = old;
1274
+ } else {
1275
+ boundary.alias = alias;
1276
+ boundaries.push(boundary);
1277
+ }
1278
+ if (label === void 0 || label === null) {
1279
+ boundary.label = { text: "" };
1280
+ } else {
1281
+ boundary.label = { text: label };
1282
+ }
1283
+ if (type === void 0 || type === null) {
1284
+ boundary.type = { text: "system" };
1285
+ } else {
1286
+ if (typeof type === "object") {
1287
+ let [key, value] = Object.entries(type)[0];
1288
+ boundary[key] = { text: value };
1289
+ } else {
1290
+ boundary.type = { text: type };
1291
+ }
1292
+ }
1293
+ if (typeof tags === "object") {
1294
+ let [key, value] = Object.entries(tags)[0];
1295
+ boundary[key] = value;
1296
+ } else {
1297
+ boundary.tags = tags;
1298
+ }
1299
+ if (typeof link === "object") {
1300
+ let [key, value] = Object.entries(link)[0];
1301
+ boundary[key] = value;
1302
+ } else {
1303
+ boundary.link = link;
1304
+ }
1305
+ boundary.parentBoundary = currentBoundaryParse;
1306
+ boundary.wrap = autoWrap();
1307
+ parentBoundaryParse = currentBoundaryParse;
1308
+ currentBoundaryParse = alias;
1309
+ boundaryParseStack.push(parentBoundaryParse);
1310
+ }, "addPersonOrSystemBoundary");
1311
+ var addContainerBoundary = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(alias, label, type, tags, link) {
1312
+ if (alias === null || label === null) {
1313
+ return;
1314
+ }
1315
+ let boundary = {};
1316
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1317
+ if (old && alias === old.alias) {
1318
+ boundary = old;
1319
+ } else {
1320
+ boundary.alias = alias;
1321
+ boundaries.push(boundary);
1322
+ }
1323
+ if (label === void 0 || label === null) {
1324
+ boundary.label = { text: "" };
1325
+ } else {
1326
+ boundary.label = { text: label };
1327
+ }
1328
+ if (type === void 0 || type === null) {
1329
+ boundary.type = { text: "container" };
1330
+ } else {
1331
+ if (typeof type === "object") {
1332
+ let [key, value] = Object.entries(type)[0];
1333
+ boundary[key] = { text: value };
1334
+ } else {
1335
+ boundary.type = { text: type };
1336
+ }
1337
+ }
1338
+ if (typeof tags === "object") {
1339
+ let [key, value] = Object.entries(tags)[0];
1340
+ boundary[key] = value;
1341
+ } else {
1342
+ boundary.tags = tags;
1343
+ }
1344
+ if (typeof link === "object") {
1345
+ let [key, value] = Object.entries(link)[0];
1346
+ boundary[key] = value;
1347
+ } else {
1348
+ boundary.link = link;
1349
+ }
1350
+ boundary.parentBoundary = currentBoundaryParse;
1351
+ boundary.wrap = autoWrap();
1352
+ parentBoundaryParse = currentBoundaryParse;
1353
+ currentBoundaryParse = alias;
1354
+ boundaryParseStack.push(parentBoundaryParse);
1355
+ }, "addContainerBoundary");
1356
+ var addDeploymentNode = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(nodeType, alias, label, type, descr, sprite, tags, link) {
1357
+ if (alias === null || label === null) {
1358
+ return;
1359
+ }
1360
+ let boundary = {};
1361
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1362
+ if (old && alias === old.alias) {
1363
+ boundary = old;
1364
+ } else {
1365
+ boundary.alias = alias;
1366
+ boundaries.push(boundary);
1367
+ }
1368
+ if (label === void 0 || label === null) {
1369
+ boundary.label = { text: "" };
1370
+ } else {
1371
+ boundary.label = { text: label };
1372
+ }
1373
+ if (type === void 0 || type === null) {
1374
+ boundary.type = { text: "node" };
1375
+ } else {
1376
+ if (typeof type === "object") {
1377
+ let [key, value] = Object.entries(type)[0];
1378
+ boundary[key] = { text: value };
1379
+ } else {
1380
+ boundary.type = { text: type };
1381
+ }
1382
+ }
1383
+ if (descr === void 0 || descr === null) {
1384
+ boundary.descr = { text: "" };
1385
+ } else {
1386
+ if (typeof descr === "object") {
1387
+ let [key, value] = Object.entries(descr)[0];
1388
+ boundary[key] = { text: value };
1389
+ } else {
1390
+ boundary.descr = { text: descr };
1391
+ }
1392
+ }
1393
+ if (typeof tags === "object") {
1394
+ let [key, value] = Object.entries(tags)[0];
1395
+ boundary[key] = value;
1396
+ } else {
1397
+ boundary.tags = tags;
1398
+ }
1399
+ if (typeof link === "object") {
1400
+ let [key, value] = Object.entries(link)[0];
1401
+ boundary[key] = value;
1402
+ } else {
1403
+ boundary.link = link;
1404
+ }
1405
+ boundary.nodeType = nodeType;
1406
+ boundary.parentBoundary = currentBoundaryParse;
1407
+ boundary.wrap = autoWrap();
1408
+ parentBoundaryParse = currentBoundaryParse;
1409
+ currentBoundaryParse = alias;
1410
+ boundaryParseStack.push(parentBoundaryParse);
1411
+ }, "addDeploymentNode");
1412
+ var popBoundaryParseStack = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1413
+ currentBoundaryParse = parentBoundaryParse;
1414
+ boundaryParseStack.pop();
1415
+ parentBoundaryParse = boundaryParseStack.pop();
1416
+ boundaryParseStack.push(parentBoundaryParse);
1417
+ }, "popBoundaryParseStack");
1418
+ var updateElStyle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) {
1419
+ let old = c4ShapeArray.find((element) => element.alias === elementName);
1420
+ if (old === void 0) {
1421
+ old = boundaries.find((element) => element.alias === elementName);
1422
+ if (old === void 0) {
1423
+ return;
1424
+ }
1425
+ }
1426
+ if (bgColor !== void 0 && bgColor !== null) {
1427
+ if (typeof bgColor === "object") {
1428
+ let [key, value] = Object.entries(bgColor)[0];
1429
+ old[key] = value;
1430
+ } else {
1431
+ old.bgColor = bgColor;
1432
+ }
1433
+ }
1434
+ if (fontColor !== void 0 && fontColor !== null) {
1435
+ if (typeof fontColor === "object") {
1436
+ let [key, value] = Object.entries(fontColor)[0];
1437
+ old[key] = value;
1438
+ } else {
1439
+ old.fontColor = fontColor;
1440
+ }
1441
+ }
1442
+ if (borderColor !== void 0 && borderColor !== null) {
1443
+ if (typeof borderColor === "object") {
1444
+ let [key, value] = Object.entries(borderColor)[0];
1445
+ old[key] = value;
1446
+ } else {
1447
+ old.borderColor = borderColor;
1448
+ }
1449
+ }
1450
+ if (shadowing !== void 0 && shadowing !== null) {
1451
+ if (typeof shadowing === "object") {
1452
+ let [key, value] = Object.entries(shadowing)[0];
1453
+ old[key] = value;
1454
+ } else {
1455
+ old.shadowing = shadowing;
1456
+ }
1457
+ }
1458
+ if (shape !== void 0 && shape !== null) {
1459
+ if (typeof shape === "object") {
1460
+ let [key, value] = Object.entries(shape)[0];
1461
+ old[key] = value;
1462
+ } else {
1463
+ old.shape = shape;
1464
+ }
1465
+ }
1466
+ if (sprite !== void 0 && sprite !== null) {
1467
+ if (typeof sprite === "object") {
1468
+ let [key, value] = Object.entries(sprite)[0];
1469
+ old[key] = value;
1470
+ } else {
1471
+ old.sprite = sprite;
1472
+ }
1473
+ }
1474
+ if (techn !== void 0 && techn !== null) {
1475
+ if (typeof techn === "object") {
1476
+ let [key, value] = Object.entries(techn)[0];
1477
+ old[key] = value;
1478
+ } else {
1479
+ old.techn = techn;
1480
+ }
1481
+ }
1482
+ if (legendText !== void 0 && legendText !== null) {
1483
+ if (typeof legendText === "object") {
1484
+ let [key, value] = Object.entries(legendText)[0];
1485
+ old[key] = value;
1486
+ } else {
1487
+ old.legendText = legendText;
1488
+ }
1489
+ }
1490
+ if (legendSprite !== void 0 && legendSprite !== null) {
1491
+ if (typeof legendSprite === "object") {
1492
+ let [key, value] = Object.entries(legendSprite)[0];
1493
+ old[key] = value;
1494
+ } else {
1495
+ old.legendSprite = legendSprite;
1496
+ }
1497
+ }
1498
+ }, "updateElStyle");
1499
+ var updateRelStyle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) {
1500
+ const old = rels.find((rel) => rel.from === from && rel.to === to);
1501
+ if (old === void 0) {
1502
+ return;
1503
+ }
1504
+ if (textColor !== void 0 && textColor !== null) {
1505
+ if (typeof textColor === "object") {
1506
+ let [key, value] = Object.entries(textColor)[0];
1507
+ old[key] = value;
1508
+ } else {
1509
+ old.textColor = textColor;
1510
+ }
1511
+ }
1512
+ if (lineColor !== void 0 && lineColor !== null) {
1513
+ if (typeof lineColor === "object") {
1514
+ let [key, value] = Object.entries(lineColor)[0];
1515
+ old[key] = value;
1516
+ } else {
1517
+ old.lineColor = lineColor;
1518
+ }
1519
+ }
1520
+ if (offsetX !== void 0 && offsetX !== null) {
1521
+ if (typeof offsetX === "object") {
1522
+ let [key, value] = Object.entries(offsetX)[0];
1523
+ old[key] = parseInt(value);
1524
+ } else {
1525
+ old.offsetX = parseInt(offsetX);
1526
+ }
1527
+ }
1528
+ if (offsetY !== void 0 && offsetY !== null) {
1529
+ if (typeof offsetY === "object") {
1530
+ let [key, value] = Object.entries(offsetY)[0];
1531
+ old[key] = parseInt(value);
1532
+ } else {
1533
+ old.offsetY = parseInt(offsetY);
1534
+ }
1535
+ }
1536
+ }, "updateRelStyle");
1537
+ var updateLayoutConfig = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {
1538
+ let c4ShapeInRowValue = c4ShapeInRow;
1539
+ let c4BoundaryInRowValue = c4BoundaryInRow;
1540
+ if (typeof c4ShapeInRowParam === "object") {
1541
+ const value = Object.values(c4ShapeInRowParam)[0];
1542
+ c4ShapeInRowValue = parseInt(value);
1543
+ } else {
1544
+ c4ShapeInRowValue = parseInt(c4ShapeInRowParam);
1545
+ }
1546
+ if (typeof c4BoundaryInRowParam === "object") {
1547
+ const value = Object.values(c4BoundaryInRowParam)[0];
1548
+ c4BoundaryInRowValue = parseInt(value);
1549
+ } else {
1550
+ c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);
1551
+ }
1552
+ if (c4ShapeInRowValue >= 1) {
1553
+ c4ShapeInRow = c4ShapeInRowValue;
1554
+ }
1555
+ if (c4BoundaryInRowValue >= 1) {
1556
+ c4BoundaryInRow = c4BoundaryInRowValue;
1557
+ }
1558
+ }, "updateLayoutConfig");
1559
+ var getC4ShapeInRow = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1560
+ return c4ShapeInRow;
1561
+ }, "getC4ShapeInRow");
1562
+ var getC4BoundaryInRow = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1563
+ return c4BoundaryInRow;
1564
+ }, "getC4BoundaryInRow");
1565
+ var getCurrentBoundaryParse = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1566
+ return currentBoundaryParse;
1567
+ }, "getCurrentBoundaryParse");
1568
+ var getParentBoundaryParse = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1569
+ return parentBoundaryParse;
1570
+ }, "getParentBoundaryParse");
1571
+ var getC4ShapeArray = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(parentBoundary) {
1572
+ if (parentBoundary === void 0 || parentBoundary === null) {
1573
+ return c4ShapeArray;
1574
+ } else {
1575
+ return c4ShapeArray.filter((personOrSystem) => {
1576
+ return personOrSystem.parentBoundary === parentBoundary;
1577
+ });
1578
+ }
1579
+ }, "getC4ShapeArray");
1580
+ var getC4Shape = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(alias) {
1581
+ return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);
1582
+ }, "getC4Shape");
1583
+ var getC4ShapeKeys = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(parentBoundary) {
1584
+ return Object.keys(getC4ShapeArray(parentBoundary));
1585
+ }, "getC4ShapeKeys");
1586
+ var getBoundaries = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(parentBoundary) {
1587
+ if (parentBoundary === void 0 || parentBoundary === null) {
1588
+ return boundaries;
1589
+ } else {
1590
+ return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary);
1591
+ }
1592
+ }, "getBoundaries");
1593
+ var getBoundarys = getBoundaries;
1594
+ var getRels = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1595
+ return rels;
1596
+ }, "getRels");
1597
+ var getTitle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1598
+ return title;
1599
+ }, "getTitle");
1600
+ var setWrap = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(wrapSetting) {
1601
+ wrapEnabled = wrapSetting;
1602
+ }, "setWrap");
1603
+ var autoWrap = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1604
+ return wrapEnabled;
1605
+ }, "autoWrap");
1606
+ var clear = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1607
+ c4ShapeArray = [];
1608
+ boundaries = [
1609
+ {
1610
+ alias: "global",
1611
+ label: { text: "global" },
1612
+ type: { text: "global" },
1613
+ tags: null,
1614
+ link: null,
1615
+ parentBoundary: ""
1616
+ }
1617
+ ];
1618
+ parentBoundaryParse = "";
1619
+ currentBoundaryParse = "global";
1620
+ boundaryParseStack = [""];
1621
+ rels = [];
1622
+ boundaryParseStack = [""];
1623
+ title = "";
1624
+ wrapEnabled = false;
1625
+ c4ShapeInRow = 4;
1626
+ c4BoundaryInRow = 2;
1627
+ }, "clear");
1628
+ var LINETYPE = {
1629
+ SOLID: 0,
1630
+ DOTTED: 1,
1631
+ NOTE: 2,
1632
+ SOLID_CROSS: 3,
1633
+ DOTTED_CROSS: 4,
1634
+ SOLID_OPEN: 5,
1635
+ DOTTED_OPEN: 6,
1636
+ LOOP_START: 10,
1637
+ LOOP_END: 11,
1638
+ ALT_START: 12,
1639
+ ALT_ELSE: 13,
1640
+ ALT_END: 14,
1641
+ OPT_START: 15,
1642
+ OPT_END: 16,
1643
+ ACTIVE_START: 17,
1644
+ ACTIVE_END: 18,
1645
+ PAR_START: 19,
1646
+ PAR_AND: 20,
1647
+ PAR_END: 21,
1648
+ RECT_START: 22,
1649
+ RECT_END: 23,
1650
+ SOLID_POINT: 24,
1651
+ DOTTED_POINT: 25
1652
+ };
1653
+ var ARROWTYPE = {
1654
+ FILLED: 0,
1655
+ OPEN: 1
1656
+ };
1657
+ var PLACEMENT = {
1658
+ LEFTOF: 0,
1659
+ RIGHTOF: 1,
1660
+ OVER: 2
1661
+ };
1662
+ var setTitle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(txt) {
1663
+ let sanitizedText = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .sanitizeText */ .jZ)(txt, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)());
1664
+ title = sanitizedText;
1665
+ }, "setTitle");
1666
+ var c4Db_default = {
1667
+ addPersonOrSystem,
1668
+ addPersonOrSystemBoundary,
1669
+ addContainer,
1670
+ addContainerBoundary,
1671
+ addComponent,
1672
+ addDeploymentNode,
1673
+ popBoundaryParseStack,
1674
+ addRel,
1675
+ updateElStyle,
1676
+ updateRelStyle,
1677
+ updateLayoutConfig,
1678
+ autoWrap,
1679
+ setWrap,
1680
+ getC4ShapeArray,
1681
+ getC4Shape,
1682
+ getC4ShapeKeys,
1683
+ getBoundaries,
1684
+ getBoundarys,
1685
+ getCurrentBoundaryParse,
1686
+ getParentBoundaryParse,
1687
+ getRels,
1688
+ getTitle,
1689
+ getC4Type,
1690
+ getC4ShapeInRow,
1691
+ getC4BoundaryInRow,
1692
+ setAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .setAccTitle */ .SV,
1693
+ getAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getAccTitle */ .iN,
1694
+ getAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getAccDescription */ .m7,
1695
+ setAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .setAccDescription */ .EI,
1696
+ getConfig: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(() => (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().c4, "getConfig"),
1697
+ clear,
1698
+ LINETYPE,
1699
+ ARROWTYPE,
1700
+ PLACEMENT,
1701
+ setTitle,
1702
+ setC4Type
1703
+ // apply,
1704
+ };
1705
+
1706
+ // src/diagrams/c4/c4Renderer.js
1707
+
1708
+
1709
+ // src/diagrams/c4/svgDraw.js
1710
+
1711
+ var drawRect2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, rectData) {
1712
+ return (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drawRect */ .tk)(elem, rectData);
1713
+ }, "drawRect");
1714
+ var drawImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, width, height, x, y, link) {
1715
+ const imageElem = elem.append("image");
1716
+ imageElem.attr("width", width);
1717
+ imageElem.attr("height", height);
1718
+ imageElem.attr("x", x);
1719
+ imageElem.attr("y", y);
1720
+ let sanitizedLink = link.startsWith("data:image/png;base64") ? link : (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__/* .sanitizeUrl */ .J)(link);
1721
+ imageElem.attr("xlink:href", sanitizedLink);
1722
+ }, "drawImage");
1723
+ var drawRels = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((elem, rels2, conf2) => {
1724
+ const relsElem = elem.append("g");
1725
+ let i = 0;
1726
+ for (let rel of rels2) {
1727
+ let textColor = rel.textColor ? rel.textColor : "#444444";
1728
+ let strokeColor = rel.lineColor ? rel.lineColor : "#444444";
1729
+ let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;
1730
+ let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;
1731
+ let url = "";
1732
+ if (i === 0) {
1733
+ let line = relsElem.append("line");
1734
+ line.attr("x1", rel.startPoint.x);
1735
+ line.attr("y1", rel.startPoint.y);
1736
+ line.attr("x2", rel.endPoint.x);
1737
+ line.attr("y2", rel.endPoint.y);
1738
+ line.attr("stroke-width", "1");
1739
+ line.attr("stroke", strokeColor);
1740
+ line.style("fill", "none");
1741
+ if (rel.type !== "rel_b") {
1742
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
1743
+ }
1744
+ if (rel.type === "birel" || rel.type === "rel_b") {
1745
+ line.attr("marker-start", "url(" + url + "#arrowend)");
1746
+ }
1747
+ i = -1;
1748
+ } else {
1749
+ let line = relsElem.append("path");
1750
+ line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr(
1751
+ "d",
1752
+ "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll(
1753
+ "controlx",
1754
+ rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4
1755
+ ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y)
1756
+ );
1757
+ if (rel.type !== "rel_b") {
1758
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
1759
+ }
1760
+ if (rel.type === "birel" || rel.type === "rel_b") {
1761
+ line.attr("marker-start", "url(" + url + "#arrowend)");
1762
+ }
1763
+ }
1764
+ let messageConf = conf2.messageFont();
1765
+ _drawTextCandidateFunc(conf2)(
1766
+ rel.label.text,
1767
+ relsElem,
1768
+ Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
1769
+ Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY,
1770
+ rel.label.width,
1771
+ rel.label.height,
1772
+ { fill: textColor },
1773
+ messageConf
1774
+ );
1775
+ if (rel.techn && rel.techn.text !== "") {
1776
+ messageConf = conf2.messageFont();
1777
+ _drawTextCandidateFunc(conf2)(
1778
+ "[" + rel.techn.text + "]",
1779
+ relsElem,
1780
+ Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
1781
+ Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY,
1782
+ Math.max(rel.label.width, rel.techn.width),
1783
+ rel.techn.height,
1784
+ { fill: textColor, "font-style": "italic" },
1785
+ messageConf
1786
+ );
1787
+ }
1788
+ }
1789
+ }, "drawRels");
1790
+ var drawBoundary = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, boundary, conf2) {
1791
+ const boundaryElem = elem.append("g");
1792
+ let fillColor = boundary.bgColor ? boundary.bgColor : "none";
1793
+ let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444";
1794
+ let fontColor = boundary.fontColor ? boundary.fontColor : "black";
1795
+ let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
1796
+ if (boundary.nodeType) {
1797
+ attrsValue = { "stroke-width": 1 };
1798
+ }
1799
+ let rectData = {
1800
+ x: boundary.x,
1801
+ y: boundary.y,
1802
+ fill: fillColor,
1803
+ stroke: strokeColor,
1804
+ width: boundary.width,
1805
+ height: boundary.height,
1806
+ rx: 2.5,
1807
+ ry: 2.5,
1808
+ attrs: attrsValue
1809
+ };
1810
+ drawRect2(boundaryElem, rectData);
1811
+ let boundaryConf = conf2.boundaryFont();
1812
+ boundaryConf.fontWeight = "bold";
1813
+ boundaryConf.fontSize = boundaryConf.fontSize + 2;
1814
+ boundaryConf.fontColor = fontColor;
1815
+ _drawTextCandidateFunc(conf2)(
1816
+ boundary.label.text,
1817
+ boundaryElem,
1818
+ boundary.x,
1819
+ boundary.y + boundary.label.Y,
1820
+ boundary.width,
1821
+ boundary.height,
1822
+ { fill: "#444444" },
1823
+ boundaryConf
1824
+ );
1825
+ if (boundary.type && boundary.type.text !== "") {
1826
+ boundaryConf = conf2.boundaryFont();
1827
+ boundaryConf.fontColor = fontColor;
1828
+ _drawTextCandidateFunc(conf2)(
1829
+ boundary.type.text,
1830
+ boundaryElem,
1831
+ boundary.x,
1832
+ boundary.y + boundary.type.Y,
1833
+ boundary.width,
1834
+ boundary.height,
1835
+ { fill: "#444444" },
1836
+ boundaryConf
1837
+ );
1838
+ }
1839
+ if (boundary.descr && boundary.descr.text !== "") {
1840
+ boundaryConf = conf2.boundaryFont();
1841
+ boundaryConf.fontSize = boundaryConf.fontSize - 2;
1842
+ boundaryConf.fontColor = fontColor;
1843
+ _drawTextCandidateFunc(conf2)(
1844
+ boundary.descr.text,
1845
+ boundaryElem,
1846
+ boundary.x,
1847
+ boundary.y + boundary.descr.Y,
1848
+ boundary.width,
1849
+ boundary.height,
1850
+ { fill: "#444444" },
1851
+ boundaryConf
1852
+ );
1853
+ }
1854
+ }, "drawBoundary");
1855
+ var drawC4Shape = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, c4Shape, conf2) {
1856
+ let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"];
1857
+ let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"];
1858
+ let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF";
1859
+ let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1860
+ switch (c4Shape.typeC4Shape.text) {
1861
+ case "person":
1862
+ personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1863
+ break;
1864
+ case "external_person":
1865
+ personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
1866
+ break;
1867
+ }
1868
+ const c4ShapeElem = elem.append("g");
1869
+ c4ShapeElem.attr("class", "person-man");
1870
+ const rect = (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getNoteRect */ .PB)();
1871
+ switch (c4Shape.typeC4Shape.text) {
1872
+ case "person":
1873
+ case "external_person":
1874
+ case "system":
1875
+ case "external_system":
1876
+ case "container":
1877
+ case "external_container":
1878
+ case "component":
1879
+ case "external_component":
1880
+ rect.x = c4Shape.x;
1881
+ rect.y = c4Shape.y;
1882
+ rect.fill = fillColor;
1883
+ rect.width = c4Shape.width;
1884
+ rect.height = c4Shape.height;
1885
+ rect.stroke = strokeColor;
1886
+ rect.rx = 2.5;
1887
+ rect.ry = 2.5;
1888
+ rect.attrs = { "stroke-width": 0.5 };
1889
+ drawRect2(c4ShapeElem, rect);
1890
+ break;
1891
+ case "system_db":
1892
+ case "external_system_db":
1893
+ case "container_db":
1894
+ case "external_container_db":
1895
+ case "component_db":
1896
+ case "external_component_db":
1897
+ c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1898
+ "d",
1899
+ "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height)
1900
+ );
1901
+ c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1902
+ "d",
1903
+ "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2)
1904
+ );
1905
+ break;
1906
+ case "system_queue":
1907
+ case "external_system_queue":
1908
+ case "container_queue":
1909
+ case "external_container_queue":
1910
+ case "component_queue":
1911
+ case "external_component_queue":
1912
+ c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1913
+ "d",
1914
+ "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2)
1915
+ );
1916
+ c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1917
+ "d",
1918
+ "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2)
1919
+ );
1920
+ break;
1921
+ }
1922
+ let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text);
1923
+ c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>");
1924
+ switch (c4Shape.typeC4Shape.text) {
1925
+ case "person":
1926
+ case "external_person":
1927
+ drawImage(
1928
+ c4ShapeElem,
1929
+ 48,
1930
+ 48,
1931
+ c4Shape.x + c4Shape.width / 2 - 24,
1932
+ c4Shape.y + c4Shape.image.Y,
1933
+ personImg
1934
+ );
1935
+ break;
1936
+ }
1937
+ let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
1938
+ textFontConf.fontWeight = "bold";
1939
+ textFontConf.fontSize = textFontConf.fontSize + 2;
1940
+ textFontConf.fontColor = fontColor;
1941
+ _drawTextCandidateFunc(conf2)(
1942
+ c4Shape.label.text,
1943
+ c4ShapeElem,
1944
+ c4Shape.x,
1945
+ c4Shape.y + c4Shape.label.Y,
1946
+ c4Shape.width,
1947
+ c4Shape.height,
1948
+ { fill: fontColor },
1949
+ textFontConf
1950
+ );
1951
+ textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
1952
+ textFontConf.fontColor = fontColor;
1953
+ if (c4Shape.techn && c4Shape.techn?.text !== "") {
1954
+ _drawTextCandidateFunc(conf2)(
1955
+ c4Shape.techn.text,
1956
+ c4ShapeElem,
1957
+ c4Shape.x,
1958
+ c4Shape.y + c4Shape.techn.Y,
1959
+ c4Shape.width,
1960
+ c4Shape.height,
1961
+ { fill: fontColor, "font-style": "italic" },
1962
+ textFontConf
1963
+ );
1964
+ } else if (c4Shape.type && c4Shape.type.text !== "") {
1965
+ _drawTextCandidateFunc(conf2)(
1966
+ c4Shape.type.text,
1967
+ c4ShapeElem,
1968
+ c4Shape.x,
1969
+ c4Shape.y + c4Shape.type.Y,
1970
+ c4Shape.width,
1971
+ c4Shape.height,
1972
+ { fill: fontColor, "font-style": "italic" },
1973
+ textFontConf
1974
+ );
1975
+ }
1976
+ if (c4Shape.descr && c4Shape.descr.text !== "") {
1977
+ textFontConf = conf2.personFont();
1978
+ textFontConf.fontColor = fontColor;
1979
+ _drawTextCandidateFunc(conf2)(
1980
+ c4Shape.descr.text,
1981
+ c4ShapeElem,
1982
+ c4Shape.x,
1983
+ c4Shape.y + c4Shape.descr.Y,
1984
+ c4Shape.width,
1985
+ c4Shape.height,
1986
+ { fill: fontColor },
1987
+ textFontConf
1988
+ );
1989
+ }
1990
+ return c4Shape.height;
1991
+ }, "drawC4Shape");
1992
+ var insertDatabaseIcon = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
1993
+ elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1994
+ "d",
1995
+ "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
1996
+ );
1997
+ }, "insertDatabaseIcon");
1998
+ var insertComputerIcon = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
1999
+ elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
2000
+ "d",
2001
+ "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
2002
+ );
2003
+ }, "insertComputerIcon");
2004
+ var insertClockIcon = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2005
+ elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
2006
+ "d",
2007
+ "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
2008
+ );
2009
+ }, "insertClockIcon");
2010
+ var insertArrowHead = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2011
+ elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
2012
+ }, "insertArrowHead");
2013
+ var insertArrowEnd = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2014
+ elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
2015
+ }, "insertArrowEnd");
2016
+ var insertArrowFilledHead = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2017
+ elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
2018
+ }, "insertArrowFilledHead");
2019
+ var insertDynamicNumber = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2020
+ elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
2021
+ }, "insertDynamicNumber");
2022
+ var insertArrowCrossHead = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2023
+ const defs = elem.append("defs");
2024
+ const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
2025
+ marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z");
2026
+ marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
2027
+ }, "insertArrowCrossHead");
2028
+ var getC4ShapeFont = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf, typeC4Shape) => {
2029
+ return {
2030
+ fontFamily: cnf[typeC4Shape + "FontFamily"],
2031
+ fontSize: cnf[typeC4Shape + "FontSize"],
2032
+ fontWeight: cnf[typeC4Shape + "FontWeight"]
2033
+ };
2034
+ }, "getC4ShapeFont");
2035
+ var _drawTextCandidateFunc = /* @__PURE__ */ function() {
2036
+ function byText(content, g, x, y, width, height, textAttrs) {
2037
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content);
2038
+ _setTextAttrs(text, textAttrs);
2039
+ }
2040
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(byText, "byText");
2041
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
2042
+ const { fontSize, fontFamily, fontWeight } = conf2;
2043
+ const lines = content.split(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .common_default */ .Y2.lineBreakRegex);
2044
+ for (let i = 0; i < lines.length; i++) {
2045
+ const dy = i * fontSize - fontSize * (lines.length - 1) / 2;
2046
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily);
2047
+ text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical");
2048
+ _setTextAttrs(text, textAttrs);
2049
+ }
2050
+ }
2051
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(byTspan, "byTspan");
2052
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
2053
+ const s = g.append("switch");
2054
+ const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
2055
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
2056
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
2057
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
2058
+ _setTextAttrs(text, textAttrs);
2059
+ }
2060
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(byFo, "byFo");
2061
+ function _setTextAttrs(toText, fromTextAttrsDict) {
2062
+ for (const key in fromTextAttrsDict) {
2063
+ if (fromTextAttrsDict.hasOwnProperty(key)) {
2064
+ toText.attr(key, fromTextAttrsDict[key]);
2065
+ }
2066
+ }
2067
+ }
2068
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(_setTextAttrs, "_setTextAttrs");
2069
+ return function(conf2) {
2070
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
2071
+ };
2072
+ }();
2073
+ var svgDraw_default = {
2074
+ drawRect: drawRect2,
2075
+ drawBoundary,
2076
+ drawC4Shape,
2077
+ drawRels,
2078
+ drawImage,
2079
+ insertArrowHead,
2080
+ insertArrowEnd,
2081
+ insertArrowFilledHead,
2082
+ insertDynamicNumber,
2083
+ insertArrowCrossHead,
2084
+ insertDatabaseIcon,
2085
+ insertComputerIcon,
2086
+ insertClockIcon
2087
+ };
2088
+
2089
+ // src/diagrams/c4/c4Renderer.js
2090
+ var globalBoundaryMaxX = 0;
2091
+ var globalBoundaryMaxY = 0;
2092
+ var c4ShapeInRow2 = 4;
2093
+ var c4BoundaryInRow2 = 2;
2094
+ parser.yy = c4Db_default;
2095
+ var conf = {};
2096
+ var Bounds = class {
2097
+ static {
2098
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(this, "Bounds");
2099
+ }
2100
+ constructor(diagObj) {
2101
+ this.name = "";
2102
+ this.data = {};
2103
+ this.data.startx = void 0;
2104
+ this.data.stopx = void 0;
2105
+ this.data.starty = void 0;
2106
+ this.data.stopy = void 0;
2107
+ this.data.widthLimit = void 0;
2108
+ this.nextData = {};
2109
+ this.nextData.startx = void 0;
2110
+ this.nextData.stopx = void 0;
2111
+ this.nextData.starty = void 0;
2112
+ this.nextData.stopy = void 0;
2113
+ this.nextData.cnt = 0;
2114
+ setConf(diagObj.db.getConfig());
2115
+ }
2116
+ setData(startx, stopx, starty, stopy) {
2117
+ this.nextData.startx = this.data.startx = startx;
2118
+ this.nextData.stopx = this.data.stopx = stopx;
2119
+ this.nextData.starty = this.data.starty = starty;
2120
+ this.nextData.stopy = this.data.stopy = stopy;
2121
+ }
2122
+ updateVal(obj, key, val, fun) {
2123
+ if (obj[key] === void 0) {
2124
+ obj[key] = val;
2125
+ } else {
2126
+ obj[key] = fun(val, obj[key]);
2127
+ }
2128
+ }
2129
+ insert(c4Shape) {
2130
+ this.nextData.cnt = this.nextData.cnt + 1;
2131
+ let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2;
2132
+ let _stopx = _startx + c4Shape.width;
2133
+ let _starty = this.nextData.starty + c4Shape.margin * 2;
2134
+ let _stopy = _starty + c4Shape.height;
2135
+ if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow2) {
2136
+ _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;
2137
+ _starty = this.nextData.stopy + c4Shape.margin * 2;
2138
+ this.nextData.stopx = _stopx = _startx + c4Shape.width;
2139
+ this.nextData.starty = this.nextData.stopy;
2140
+ this.nextData.stopy = _stopy = _starty + c4Shape.height;
2141
+ this.nextData.cnt = 1;
2142
+ }
2143
+ c4Shape.x = _startx;
2144
+ c4Shape.y = _starty;
2145
+ this.updateVal(this.data, "startx", _startx, Math.min);
2146
+ this.updateVal(this.data, "starty", _starty, Math.min);
2147
+ this.updateVal(this.data, "stopx", _stopx, Math.max);
2148
+ this.updateVal(this.data, "stopy", _stopy, Math.max);
2149
+ this.updateVal(this.nextData, "startx", _startx, Math.min);
2150
+ this.updateVal(this.nextData, "starty", _starty, Math.min);
2151
+ this.updateVal(this.nextData, "stopx", _stopx, Math.max);
2152
+ this.updateVal(this.nextData, "stopy", _stopy, Math.max);
2153
+ }
2154
+ init(diagObj) {
2155
+ this.name = "";
2156
+ this.data = {
2157
+ startx: void 0,
2158
+ stopx: void 0,
2159
+ starty: void 0,
2160
+ stopy: void 0,
2161
+ widthLimit: void 0
2162
+ };
2163
+ this.nextData = {
2164
+ startx: void 0,
2165
+ stopx: void 0,
2166
+ starty: void 0,
2167
+ stopy: void 0,
2168
+ cnt: 0
2169
+ };
2170
+ setConf(diagObj.db.getConfig());
2171
+ }
2172
+ bumpLastMargin(margin) {
2173
+ this.data.stopx += margin;
2174
+ this.data.stopy += margin;
2175
+ }
2176
+ };
2177
+ var setConf = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(cnf) {
2178
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .assignWithDepth_default */ .hH)(conf, cnf);
2179
+ if (cnf.fontFamily) {
2180
+ conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;
2181
+ }
2182
+ if (cnf.fontSize) {
2183
+ conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;
2184
+ }
2185
+ if (cnf.fontWeight) {
2186
+ conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;
2187
+ }
2188
+ }, "setConf");
2189
+ var c4ShapeFont = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf, typeC4Shape) => {
2190
+ return {
2191
+ fontFamily: cnf[typeC4Shape + "FontFamily"],
2192
+ fontSize: cnf[typeC4Shape + "FontSize"],
2193
+ fontWeight: cnf[typeC4Shape + "FontWeight"]
2194
+ };
2195
+ }, "c4ShapeFont");
2196
+ var boundaryFont = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf) => {
2197
+ return {
2198
+ fontFamily: cnf.boundaryFontFamily,
2199
+ fontSize: cnf.boundaryFontSize,
2200
+ fontWeight: cnf.boundaryFontWeight
2201
+ };
2202
+ }, "boundaryFont");
2203
+ var messageFont = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf) => {
2204
+ return {
2205
+ fontFamily: cnf.messageFontFamily,
2206
+ fontSize: cnf.messageFontSize,
2207
+ fontWeight: cnf.messageFontWeight
2208
+ };
2209
+ }, "messageFont");
2210
+ function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {
2211
+ if (!c4Shape[textType].width) {
2212
+ if (c4ShapeTextWrap) {
2213
+ c4Shape[textType].text = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .wrapLabel */ .bH)(c4Shape[textType].text, textLimitWidth, textConf);
2214
+ c4Shape[textType].textLines = c4Shape[textType].text.split(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .common_default */ .Y2.lineBreakRegex).length;
2215
+ c4Shape[textType].width = textLimitWidth;
2216
+ c4Shape[textType].height = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextHeight */ .ru)(c4Shape[textType].text, textConf);
2217
+ } else {
2218
+ let lines = c4Shape[textType].text.split(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .common_default */ .Y2.lineBreakRegex);
2219
+ c4Shape[textType].textLines = lines.length;
2220
+ let lineHeight = 0;
2221
+ c4Shape[textType].height = 0;
2222
+ c4Shape[textType].width = 0;
2223
+ for (const line of lines) {
2224
+ c4Shape[textType].width = Math.max(
2225
+ (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(line, textConf),
2226
+ c4Shape[textType].width
2227
+ );
2228
+ lineHeight = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextHeight */ .ru)(line, textConf);
2229
+ c4Shape[textType].height = c4Shape[textType].height + lineHeight;
2230
+ }
2231
+ }
2232
+ }
2233
+ }
2234
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(calcC4ShapeTextWH, "calcC4ShapeTextWH");
2235
+ var drawBoundary2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(diagram2, boundary, bounds) {
2236
+ boundary.x = bounds.data.startx;
2237
+ boundary.y = bounds.data.starty;
2238
+ boundary.width = bounds.data.stopx - bounds.data.startx;
2239
+ boundary.height = bounds.data.stopy - bounds.data.starty;
2240
+ boundary.label.y = conf.c4ShapeMargin - 35;
2241
+ let boundaryTextWrap = boundary.wrap && conf.wrap;
2242
+ let boundaryLabelConf = boundaryFont(conf);
2243
+ boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;
2244
+ boundaryLabelConf.fontWeight = "bold";
2245
+ let textLimitWidth = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(boundary.label.text, boundaryLabelConf);
2246
+ calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);
2247
+ svgDraw_default.drawBoundary(diagram2, boundary, conf);
2248
+ }, "drawBoundary");
2249
+ var drawC4ShapeArray = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) {
2250
+ let Y = 0;
2251
+ for (const c4ShapeKey of c4ShapeKeys) {
2252
+ Y = 0;
2253
+ const c4Shape = c4ShapeArray2[c4ShapeKey];
2254
+ let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2255
+ c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;
2256
+ c4Shape.typeC4Shape.width = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(
2257
+ "\xAB" + c4Shape.typeC4Shape.text + "\xBB",
2258
+ c4ShapeTypeConf
2259
+ );
2260
+ c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;
2261
+ c4Shape.typeC4Shape.Y = conf.c4ShapePadding;
2262
+ Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;
2263
+ c4Shape.image = { width: 0, height: 0, Y: 0 };
2264
+ switch (c4Shape.typeC4Shape.text) {
2265
+ case "person":
2266
+ case "external_person":
2267
+ c4Shape.image.width = 48;
2268
+ c4Shape.image.height = 48;
2269
+ c4Shape.image.Y = Y;
2270
+ Y = c4Shape.image.Y + c4Shape.image.height;
2271
+ break;
2272
+ }
2273
+ if (c4Shape.sprite) {
2274
+ c4Shape.image.width = 48;
2275
+ c4Shape.image.height = 48;
2276
+ c4Shape.image.Y = Y;
2277
+ Y = c4Shape.image.Y + c4Shape.image.height;
2278
+ }
2279
+ let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;
2280
+ let textLimitWidth = conf.width - conf.c4ShapePadding * 2;
2281
+ let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2282
+ c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;
2283
+ c4ShapeLabelConf.fontWeight = "bold";
2284
+ calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);
2285
+ c4Shape.label.Y = Y + 8;
2286
+ Y = c4Shape.label.Y + c4Shape.label.height;
2287
+ if (c4Shape.type && c4Shape.type.text !== "") {
2288
+ c4Shape.type.text = "[" + c4Shape.type.text + "]";
2289
+ let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2290
+ calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth);
2291
+ c4Shape.type.Y = Y + 5;
2292
+ Y = c4Shape.type.Y + c4Shape.type.height;
2293
+ } else if (c4Shape.techn && c4Shape.techn.text !== "") {
2294
+ c4Shape.techn.text = "[" + c4Shape.techn.text + "]";
2295
+ let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);
2296
+ calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);
2297
+ c4Shape.techn.Y = Y + 5;
2298
+ Y = c4Shape.techn.Y + c4Shape.techn.height;
2299
+ }
2300
+ let rectHeight = Y;
2301
+ let rectWidth = c4Shape.label.width;
2302
+ if (c4Shape.descr && c4Shape.descr.text !== "") {
2303
+ let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2304
+ calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);
2305
+ c4Shape.descr.Y = Y + 20;
2306
+ Y = c4Shape.descr.Y + c4Shape.descr.height;
2307
+ rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);
2308
+ rectHeight = Y - c4Shape.descr.textLines * 5;
2309
+ }
2310
+ rectWidth = rectWidth + conf.c4ShapePadding;
2311
+ c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);
2312
+ c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);
2313
+ c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;
2314
+ currentBounds.insert(c4Shape);
2315
+ svgDraw_default.drawC4Shape(diagram2, c4Shape, conf);
2316
+ }
2317
+ currentBounds.bumpLastMargin(conf.c4ShapeMargin);
2318
+ }, "drawC4ShapeArray");
2319
+ var Point = class {
2320
+ static {
2321
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(this, "Point");
2322
+ }
2323
+ constructor(x, y) {
2324
+ this.x = x;
2325
+ this.y = y;
2326
+ }
2327
+ };
2328
+ var getIntersectPoint = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(fromNode, endPoint) {
2329
+ let x1 = fromNode.x;
2330
+ let y1 = fromNode.y;
2331
+ let x2 = endPoint.x;
2332
+ let y2 = endPoint.y;
2333
+ let fromCenterX = x1 + fromNode.width / 2;
2334
+ let fromCenterY = y1 + fromNode.height / 2;
2335
+ let dx = Math.abs(x1 - x2);
2336
+ let dy = Math.abs(y1 - y2);
2337
+ let tanDYX = dy / dx;
2338
+ let fromDYX = fromNode.height / fromNode.width;
2339
+ let returnPoint = null;
2340
+ if (y1 == y2 && x1 < x2) {
2341
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY);
2342
+ } else if (y1 == y2 && x1 > x2) {
2343
+ returnPoint = new Point(x1, fromCenterY);
2344
+ } else if (x1 == x2 && y1 < y2) {
2345
+ returnPoint = new Point(fromCenterX, y1 + fromNode.height);
2346
+ } else if (x1 == x2 && y1 > y2) {
2347
+ returnPoint = new Point(fromCenterX, y1);
2348
+ }
2349
+ if (x1 > x2 && y1 < y2) {
2350
+ if (fromDYX >= tanDYX) {
2351
+ returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2);
2352
+ } else {
2353
+ returnPoint = new Point(
2354
+ fromCenterX - dx / dy * fromNode.height / 2,
2355
+ y1 + fromNode.height
2356
+ );
2357
+ }
2358
+ } else if (x1 < x2 && y1 < y2) {
2359
+ if (fromDYX >= tanDYX) {
2360
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2);
2361
+ } else {
2362
+ returnPoint = new Point(
2363
+ fromCenterX + dx / dy * fromNode.height / 2,
2364
+ y1 + fromNode.height
2365
+ );
2366
+ }
2367
+ } else if (x1 < x2 && y1 > y2) {
2368
+ if (fromDYX >= tanDYX) {
2369
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2);
2370
+ } else {
2371
+ returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1);
2372
+ }
2373
+ } else if (x1 > x2 && y1 > y2) {
2374
+ if (fromDYX >= tanDYX) {
2375
+ returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX);
2376
+ } else {
2377
+ returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1);
2378
+ }
2379
+ }
2380
+ return returnPoint;
2381
+ }, "getIntersectPoint");
2382
+ var getIntersectPoints = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(fromNode, endNode) {
2383
+ let endIntersectPoint = { x: 0, y: 0 };
2384
+ endIntersectPoint.x = endNode.x + endNode.width / 2;
2385
+ endIntersectPoint.y = endNode.y + endNode.height / 2;
2386
+ let startPoint = getIntersectPoint(fromNode, endIntersectPoint);
2387
+ endIntersectPoint.x = fromNode.x + fromNode.width / 2;
2388
+ endIntersectPoint.y = fromNode.y + fromNode.height / 2;
2389
+ let endPoint = getIntersectPoint(endNode, endIntersectPoint);
2390
+ return { startPoint, endPoint };
2391
+ }, "getIntersectPoints");
2392
+ var drawRels2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(diagram2, rels2, getC4ShapeObj, diagObj) {
2393
+ let i = 0;
2394
+ for (let rel of rels2) {
2395
+ i = i + 1;
2396
+ let relTextWrap = rel.wrap && conf.wrap;
2397
+ let relConf = messageFont(conf);
2398
+ let diagramType = diagObj.db.getC4Type();
2399
+ if (diagramType === "C4Dynamic") {
2400
+ rel.label.text = i + ": " + rel.label.text;
2401
+ }
2402
+ let textLimitWidth = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(rel.label.text, relConf);
2403
+ calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth);
2404
+ if (rel.techn && rel.techn.text !== "") {
2405
+ textLimitWidth = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(rel.techn.text, relConf);
2406
+ calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth);
2407
+ }
2408
+ if (rel.descr && rel.descr.text !== "") {
2409
+ textLimitWidth = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(rel.descr.text, relConf);
2410
+ calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth);
2411
+ }
2412
+ let fromNode = getC4ShapeObj(rel.from);
2413
+ let endNode = getC4ShapeObj(rel.to);
2414
+ let points = getIntersectPoints(fromNode, endNode);
2415
+ rel.startPoint = points.startPoint;
2416
+ rel.endPoint = points.endPoint;
2417
+ }
2418
+ svgDraw_default.drawRels(diagram2, rels2, conf);
2419
+ }, "drawRels");
2420
+ function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) {
2421
+ let currentBounds = new Bounds(diagObj);
2422
+ currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow2, currentBoundaries.length);
2423
+ for (let [i, currentBoundary] of currentBoundaries.entries()) {
2424
+ let Y = 0;
2425
+ currentBoundary.image = { width: 0, height: 0, Y: 0 };
2426
+ if (currentBoundary.sprite) {
2427
+ currentBoundary.image.width = 48;
2428
+ currentBoundary.image.height = 48;
2429
+ currentBoundary.image.Y = Y;
2430
+ Y = currentBoundary.image.Y + currentBoundary.image.height;
2431
+ }
2432
+ let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;
2433
+ let currentBoundaryLabelConf = boundaryFont(conf);
2434
+ currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;
2435
+ currentBoundaryLabelConf.fontWeight = "bold";
2436
+ calcC4ShapeTextWH(
2437
+ "label",
2438
+ currentBoundary,
2439
+ currentBoundaryTextWrap,
2440
+ currentBoundaryLabelConf,
2441
+ currentBounds.data.widthLimit
2442
+ );
2443
+ currentBoundary.label.Y = Y + 8;
2444
+ Y = currentBoundary.label.Y + currentBoundary.label.height;
2445
+ if (currentBoundary.type && currentBoundary.type.text !== "") {
2446
+ currentBoundary.type.text = "[" + currentBoundary.type.text + "]";
2447
+ let currentBoundaryTypeConf = boundaryFont(conf);
2448
+ calcC4ShapeTextWH(
2449
+ "type",
2450
+ currentBoundary,
2451
+ currentBoundaryTextWrap,
2452
+ currentBoundaryTypeConf,
2453
+ currentBounds.data.widthLimit
2454
+ );
2455
+ currentBoundary.type.Y = Y + 5;
2456
+ Y = currentBoundary.type.Y + currentBoundary.type.height;
2457
+ }
2458
+ if (currentBoundary.descr && currentBoundary.descr.text !== "") {
2459
+ let currentBoundaryDescrConf = boundaryFont(conf);
2460
+ currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;
2461
+ calcC4ShapeTextWH(
2462
+ "descr",
2463
+ currentBoundary,
2464
+ currentBoundaryTextWrap,
2465
+ currentBoundaryDescrConf,
2466
+ currentBounds.data.widthLimit
2467
+ );
2468
+ currentBoundary.descr.Y = Y + 20;
2469
+ Y = currentBoundary.descr.Y + currentBoundary.descr.height;
2470
+ }
2471
+ if (i == 0 || i % c4BoundaryInRow2 === 0) {
2472
+ let _x = parentBounds.data.startx + conf.diagramMarginX;
2473
+ let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;
2474
+ currentBounds.setData(_x, _x, _y, _y);
2475
+ } else {
2476
+ let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx;
2477
+ let _y = currentBounds.data.starty;
2478
+ currentBounds.setData(_x, _x, _y, _y);
2479
+ }
2480
+ currentBounds.name = currentBoundary.alias;
2481
+ let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);
2482
+ let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);
2483
+ if (currentPersonOrSystemKeys.length > 0) {
2484
+ drawC4ShapeArray(
2485
+ currentBounds,
2486
+ diagram2,
2487
+ currentPersonOrSystemArray,
2488
+ currentPersonOrSystemKeys
2489
+ );
2490
+ }
2491
+ parentBoundaryAlias = currentBoundary.alias;
2492
+ let nextCurrentBoundaries = diagObj.db.getBoundarys(parentBoundaryAlias);
2493
+ if (nextCurrentBoundaries.length > 0) {
2494
+ drawInsideBoundary(
2495
+ diagram2,
2496
+ parentBoundaryAlias,
2497
+ currentBounds,
2498
+ nextCurrentBoundaries,
2499
+ diagObj
2500
+ );
2501
+ }
2502
+ if (currentBoundary.alias !== "global") {
2503
+ drawBoundary2(diagram2, currentBoundary, currentBounds);
2504
+ }
2505
+ parentBounds.data.stopy = Math.max(
2506
+ currentBounds.data.stopy + conf.c4ShapeMargin,
2507
+ parentBounds.data.stopy
2508
+ );
2509
+ parentBounds.data.stopx = Math.max(
2510
+ currentBounds.data.stopx + conf.c4ShapeMargin,
2511
+ parentBounds.data.stopx
2512
+ );
2513
+ globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);
2514
+ globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);
2515
+ }
2516
+ }
2517
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(drawInsideBoundary, "drawInsideBoundary");
2518
+ var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(_text, id, _version, diagObj) {
2519
+ conf = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().c4;
2520
+ const securityLevel = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().securityLevel;
2521
+ let sandboxElement;
2522
+ if (securityLevel === "sandbox") {
2523
+ sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("#i" + id);
2524
+ }
2525
+ const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("body");
2526
+ let db = diagObj.db;
2527
+ diagObj.db.setWrap(conf.wrap);
2528
+ c4ShapeInRow2 = db.getC4ShapeInRow();
2529
+ c4BoundaryInRow2 = db.getC4BoundaryInRow();
2530
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`C:${JSON.stringify(conf, null, 2)}`);
2531
+ const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(`[id="${id}"]`);
2532
+ svgDraw_default.insertComputerIcon(diagram2);
2533
+ svgDraw_default.insertDatabaseIcon(diagram2);
2534
+ svgDraw_default.insertClockIcon(diagram2);
2535
+ let screenBounds = new Bounds(diagObj);
2536
+ screenBounds.setData(
2537
+ conf.diagramMarginX,
2538
+ conf.diagramMarginX,
2539
+ conf.diagramMarginY,
2540
+ conf.diagramMarginY
2541
+ );
2542
+ screenBounds.data.widthLimit = screen.availWidth;
2543
+ globalBoundaryMaxX = conf.diagramMarginX;
2544
+ globalBoundaryMaxY = conf.diagramMarginY;
2545
+ const title2 = diagObj.db.getTitle();
2546
+ let currentBoundaries = diagObj.db.getBoundarys("");
2547
+ drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj);
2548
+ svgDraw_default.insertArrowHead(diagram2);
2549
+ svgDraw_default.insertArrowEnd(diagram2);
2550
+ svgDraw_default.insertArrowCrossHead(diagram2);
2551
+ svgDraw_default.insertArrowFilledHead(diagram2);
2552
+ drawRels2(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);
2553
+ screenBounds.data.stopx = globalBoundaryMaxX;
2554
+ screenBounds.data.stopy = globalBoundaryMaxY;
2555
+ const box = screenBounds.data;
2556
+ let boxHeight = box.stopy - box.starty;
2557
+ let height = boxHeight + 2 * conf.diagramMarginY;
2558
+ let boxWidth = box.stopx - box.startx;
2559
+ const width = boxWidth + 2 * conf.diagramMarginX;
2560
+ if (title2) {
2561
+ diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY);
2562
+ }
2563
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .configureSvgSize */ .a$)(diagram2, height, width, conf.useMaxWidth);
2564
+ const extraVertForTitle = title2 ? 60 : 0;
2565
+ diagram2.attr(
2566
+ "viewBox",
2567
+ box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)
2568
+ );
2569
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`models:`, box);
2570
+ }, "draw");
2571
+ var c4Renderer_default = {
2572
+ drawPersonOrSystemArray: drawC4ShapeArray,
2573
+ drawBoundary: drawBoundary2,
2574
+ setConf,
2575
+ draw
2576
+ };
2577
+
2578
+ // src/diagrams/c4/styles.js
2579
+ var getStyles = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((options) => `.person {
2580
+ stroke: ${options.personBorder};
2581
+ fill: ${options.personBkg};
2582
+ }
2583
+ `, "getStyles");
2584
+ var styles_default = getStyles;
2585
+
2586
+ // src/diagrams/c4/c4Diagram.ts
2587
+ var diagram = {
2588
+ parser: c4Diagram_default,
2589
+ db: c4Db_default,
2590
+ renderer: c4Renderer_default,
2591
+ styles: styles_default,
2592
+ init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(({ c4, wrap }) => {
2593
+ c4Renderer_default.setConf(c4);
2594
+ c4Db_default.setWrap(wrap);
2595
+ }, "init")
2596
+ };
2597
+
2598
+
2599
+
2600
+ /***/ }),
2601
+
2602
+ /***/ 242:
2603
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2604
+
2605
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2606
+ /* harmony export */ CP: () => (/* binding */ drawEmbeddedImage),
2607
+ /* harmony export */ HT: () => (/* binding */ getTextObj),
2608
+ /* harmony export */ PB: () => (/* binding */ getNoteRect),
2609
+ /* harmony export */ aC: () => (/* binding */ drawImage),
2610
+ /* harmony export */ lC: () => (/* binding */ drawBackgroundRect),
2611
+ /* harmony export */ m: () => (/* binding */ drawText),
2612
+ /* harmony export */ tk: () => (/* binding */ drawRect)
2613
+ /* harmony export */ });
2614
+ /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6322);
2615
+ /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6750);
2616
+
2617
+
2618
+ // src/diagrams/common/svgDrawCommon.ts
2619
+
2620
+ var drawRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, rectData) => {
2621
+ const rectElement = element.append("rect");
2622
+ rectElement.attr("x", rectData.x);
2623
+ rectElement.attr("y", rectData.y);
2624
+ rectElement.attr("fill", rectData.fill);
2625
+ rectElement.attr("stroke", rectData.stroke);
2626
+ rectElement.attr("width", rectData.width);
2627
+ rectElement.attr("height", rectData.height);
2628
+ if (rectData.name) {
2629
+ rectElement.attr("name", rectData.name);
2630
+ }
2631
+ if (rectData.rx) {
2632
+ rectElement.attr("rx", rectData.rx);
2633
+ }
2634
+ if (rectData.ry) {
2635
+ rectElement.attr("ry", rectData.ry);
2636
+ }
2637
+ if (rectData.attrs !== void 0) {
2638
+ for (const attrKey in rectData.attrs) {
2639
+ rectElement.attr(attrKey, rectData.attrs[attrKey]);
2640
+ }
2641
+ }
2642
+ if (rectData.class) {
2643
+ rectElement.attr("class", rectData.class);
2644
+ }
2645
+ return rectElement;
2646
+ }, "drawRect");
2647
+ var drawBackgroundRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, bounds) => {
2648
+ const rectData = {
2649
+ x: bounds.startx,
2650
+ y: bounds.starty,
2651
+ width: bounds.stopx - bounds.startx,
2652
+ height: bounds.stopy - bounds.starty,
2653
+ fill: bounds.fill,
2654
+ stroke: bounds.stroke,
2655
+ class: "rect"
2656
+ };
2657
+ const rectElement = drawRect(element, rectData);
2658
+ rectElement.lower();
2659
+ }, "drawBackgroundRect");
2660
+ var drawText = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, textData) => {
2661
+ const nText = textData.text.replace(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .lineBreakRegex */ .H1, " ");
2662
+ const textElem = element.append("text");
2663
+ textElem.attr("x", textData.x);
2664
+ textElem.attr("y", textData.y);
2665
+ textElem.attr("class", "legend");
2666
+ textElem.style("text-anchor", textData.anchor);
2667
+ if (textData.class) {
2668
+ textElem.attr("class", textData.class);
2669
+ }
2670
+ const tspan = textElem.append("tspan");
2671
+ tspan.attr("x", textData.x + textData.textMargin * 2);
2672
+ tspan.text(nText);
2673
+ return textElem;
2674
+ }, "drawText");
2675
+ var drawImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((elem, x, y, link) => {
2676
+ const imageElement = elem.append("image");
2677
+ imageElement.attr("x", x);
2678
+ imageElement.attr("y", y);
2679
+ const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .J)(link);
2680
+ imageElement.attr("xlink:href", sanitizedLink);
2681
+ }, "drawImage");
2682
+ var drawEmbeddedImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, x, y, link) => {
2683
+ const imageElement = element.append("use");
2684
+ imageElement.attr("x", x);
2685
+ imageElement.attr("y", y);
2686
+ const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .J)(link);
2687
+ imageElement.attr("xlink:href", `#${sanitizedLink}`);
2688
+ }, "drawEmbeddedImage");
2689
+ var getNoteRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
2690
+ const noteRectData = {
2691
+ x: 0,
2692
+ y: 0,
2693
+ width: 100,
2694
+ height: 100,
2695
+ fill: "#EDF2AE",
2696
+ stroke: "#666",
2697
+ anchor: "start",
2698
+ rx: 0,
2699
+ ry: 0
2700
+ };
2701
+ return noteRectData;
2702
+ }, "getNoteRect");
2703
+ var getTextObj = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
2704
+ const testObject = {
2705
+ x: 0,
2706
+ y: 0,
2707
+ width: 100,
2708
+ height: 100,
2709
+ "text-anchor": "start",
2710
+ style: "#666",
2711
+ textMargin: 0,
2712
+ rx: 0,
2713
+ ry: 0,
2714
+ tspan: true
2715
+ };
2716
+ return testObject;
2717
+ }, "getTextObj");
2718
+
2719
+
2720
+
2721
+
2722
+ /***/ })
2723
+
2724
+ };
2725
+ ;