@data_wise/hyper-markdown 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +201 -0
  3. package/dist/_basePickBy-CU9zxouA.js +151 -0
  4. package/dist/_baseUniq-Dfv1esQT.js +614 -0
  5. package/dist/arc-c3dke9_g.js +83 -0
  6. package/dist/architecture-U656AL7Q-zgUqrnAb.js +5 -0
  7. package/dist/architectureDiagram-VXUJARFQ-Dv4YjP5o.js +4665 -0
  8. package/dist/blockDiagram-VD42YOAC-D98UGbTn.js +2265 -0
  9. package/dist/c4Diagram-YG6GDRKO-XUzUdD_2.js +1581 -0
  10. package/dist/channel-C5xtftmJ.js +5 -0
  11. package/dist/chunk-4BX2VUAB-DEeESiZ5.js +9 -0
  12. package/dist/chunk-55IACEB6-DHxOGacI.js +8 -0
  13. package/dist/chunk-B4BG7PRW-8o0v-7qo.js +1376 -0
  14. package/dist/chunk-DI55MBZ5-DW3vqV--.js +1382 -0
  15. package/dist/chunk-FMBD7UC4-DDdtUAG0.js +19 -0
  16. package/dist/chunk-QN33PNHL-CSSbo0QX.js +20 -0
  17. package/dist/chunk-QZHKN3VN-w9zLiEAG.js +15 -0
  18. package/dist/chunk-TZMSLE5B-t-rP83k8.js +64 -0
  19. package/dist/classDiagram-2ON5EDUG-e9sZhnve.js +16 -0
  20. package/dist/classDiagram-v2-WZHVMYZB-e9sZhnve.js +16 -0
  21. package/dist/clone-DiTglB0h.js +8 -0
  22. package/dist/cose-bilkent-S5V4N54A-CWVtemhp.js +2605 -0
  23. package/dist/cytoscape.esm-ZmItrg9y.js +18731 -0
  24. package/dist/dagre-6UL2VRFP-MV2ZfZta.js +447 -0
  25. package/dist/defaultLocale-D7EN2tov.js +171 -0
  26. package/dist/diagram-PSM6KHXK-5lJpUCK9.js +534 -0
  27. package/dist/diagram-QEK2KX5R-CNU6jJsS.js +221 -0
  28. package/dist/diagram-S2PKOQOG-BKjk2v_A.js +143 -0
  29. package/dist/erDiagram-Q2GNP2WA-BtAVbAYU.js +842 -0
  30. package/dist/flowDiagram-NV44I4VS-DISVIV3t.js +1627 -0
  31. package/dist/ganttDiagram-LVOFAZNH-Ddt7ksjd.js +2499 -0
  32. package/dist/gitGraph-F6HP7TQM-BAIad0GA.js +5 -0
  33. package/dist/gitGraphDiagram-NY62KEGX-C-l5siHi.js +712 -0
  34. package/dist/graph-DoqhIGWS.js +247 -0
  35. package/dist/hyper-markdown.es.js +11 -0
  36. package/dist/hyper-markdown.umd.js +3180 -0
  37. package/dist/index-D8q1QLkY.js +139643 -0
  38. package/dist/info-NVLQJR56-temdJZnQ.js +5 -0
  39. package/dist/infoDiagram-ER5ION4S-CWrTqrrP.js +24 -0
  40. package/dist/init-DjUOC4st.js +16 -0
  41. package/dist/journeyDiagram-XKPGCS4Q-033aYkz7.js +836 -0
  42. package/dist/kanban-definition-3W4ZIXB7-Dz47qxF_.js +720 -0
  43. package/dist/katex-dDbcVckU.js +11687 -0
  44. package/dist/layout-DRpSHON1.js +1335 -0
  45. package/dist/linear-BO6pDEmK.js +259 -0
  46. package/dist/mermaid-parser.core-D_tMj5cA.js +12921 -0
  47. package/dist/mindmap-definition-VGOIOE7T-BsHgjAmS.js +786 -0
  48. package/dist/ordinal-DfAQgscy.js +61 -0
  49. package/dist/packet-BFZMPI3H-Bzlf_wLW.js +5 -0
  50. package/dist/pie-7BOR55EZ-Czidi0ky.js +5 -0
  51. package/dist/pieDiagram-ADFJNKIX-CSpQeOry.js +161 -0
  52. package/dist/quadrantDiagram-AYHSOK5B-flM7H9xo.js +1024 -0
  53. package/dist/radar-NHE76QYJ-D1f__eiC.js +5 -0
  54. package/dist/requirementDiagram-UZGBJVZJ-1iG0LrwF.js +852 -0
  55. package/dist/sankeyDiagram-TZEHDZUN-0SClKoX9.js +810 -0
  56. package/dist/sequenceDiagram-WL72ISMW-Bwbc6j-1.js +2518 -0
  57. package/dist/stateDiagram-FKZM4ZOC-BuNY3ZqE.js +263 -0
  58. package/dist/stateDiagram-v2-4FDKWEC3-CB1nMpEc.js +16 -0
  59. package/dist/style.css +10 -0
  60. package/dist/timeline-definition-IT6M3QCI-CjFYKVsS.js +801 -0
  61. package/dist/treemap-KMMF4GRG-Cs8Vv-VD.js +5 -0
  62. package/dist/xychartDiagram-PRI3JC2R-B6hpuUj2.js +1340 -0
  63. package/package.json +70 -0
  64. package/types/index.d.ts +34 -0
@@ -0,0 +1,1581 @@
1
+ import { g as Se, d as De } from "./chunk-TZMSLE5B-t-rP83k8.js";
2
+ import { _ as g, s as Pe, g as Be, a as Ie, b as Me, c as Bt, d as jt, l as de, e as Le, f as Ne, h as Tt, i as ge, j as Ye, w as je, k as $t, m as fe } from "./index-D8q1QLkY.js";
3
+ var Ft = function() {
4
+ var e = /* @__PURE__ */ g(function(_t, x, m, v) {
5
+ for (m = m || {}, v = _t.length; v--; m[_t[v]] = x) ;
6
+ return m;
7
+ }, "o"), t = [1, 24], s = [1, 25], o = [1, 26], l = [1, 27], a = [1, 28], r = [1, 63], n = [1, 64], i = [1, 65], u = [1, 66], d = [1, 67], f = [1, 68], y = [1, 69], E = [1, 29], O = [1, 30], S = [1, 31], P = [1, 32], M = [1, 33], U = [1, 34], H = [1, 35], q = [1, 36], G = [1, 37], K = [1, 38], J = [1, 39], Z = [1, 40], $ = [1, 41], tt = [1, 42], et = [1, 43], at = [1, 44], it = [1, 45], nt = [1, 46], rt = [1, 47], st = [1, 48], lt = [1, 50], ot = [1, 51], ct = [1, 52], ht = [1, 53], ut = [1, 54], dt = [1, 55], ft = [1, 56], pt = [1, 57], yt = [1, 58], gt = [1, 59], bt = [1, 60], Ct = [14, 42], Qt = [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], St = [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], k = [1, 82], A = [1, 83], C = [1, 84], w = [1, 85], T = [12, 14, 42], le = [12, 14, 33, 42], Mt = [12, 14, 33, 42, 76, 77, 79, 80], vt = [12, 33], Ht = [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], qt = {
8
+ trace: /* @__PURE__ */ g(function() {
9
+ }, "trace"),
10
+ yy: {},
11
+ 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 },
12
+ 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" },
13
+ 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]],
14
+ performAction: /* @__PURE__ */ g(function(x, m, v, b, R, h, Dt) {
15
+ var p = h.length - 1;
16
+ switch (R) {
17
+ case 3:
18
+ b.setDirection("TB");
19
+ break;
20
+ case 4:
21
+ b.setDirection("BT");
22
+ break;
23
+ case 5:
24
+ b.setDirection("RL");
25
+ break;
26
+ case 6:
27
+ b.setDirection("LR");
28
+ break;
29
+ case 8:
30
+ case 9:
31
+ case 10:
32
+ case 11:
33
+ case 12:
34
+ b.setC4Type(h[p - 3]);
35
+ break;
36
+ case 19:
37
+ b.setTitle(h[p].substring(6)), this.$ = h[p].substring(6);
38
+ break;
39
+ case 20:
40
+ b.setAccDescription(h[p].substring(15)), this.$ = h[p].substring(15);
41
+ break;
42
+ case 21:
43
+ this.$ = h[p].trim(), b.setTitle(this.$);
44
+ break;
45
+ case 22:
46
+ case 23:
47
+ this.$ = h[p].trim(), b.setAccDescription(this.$);
48
+ break;
49
+ case 28:
50
+ h[p].splice(2, 0, "ENTERPRISE"), b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
51
+ break;
52
+ case 29:
53
+ h[p].splice(2, 0, "SYSTEM"), b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
54
+ break;
55
+ case 30:
56
+ b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
57
+ break;
58
+ case 31:
59
+ h[p].splice(2, 0, "CONTAINER"), b.addContainerBoundary(...h[p]), this.$ = h[p];
60
+ break;
61
+ case 32:
62
+ b.addDeploymentNode("node", ...h[p]), this.$ = h[p];
63
+ break;
64
+ case 33:
65
+ b.addDeploymentNode("nodeL", ...h[p]), this.$ = h[p];
66
+ break;
67
+ case 34:
68
+ b.addDeploymentNode("nodeR", ...h[p]), this.$ = h[p];
69
+ break;
70
+ case 35:
71
+ b.popBoundaryParseStack();
72
+ break;
73
+ case 39:
74
+ b.addPersonOrSystem("person", ...h[p]), this.$ = h[p];
75
+ break;
76
+ case 40:
77
+ b.addPersonOrSystem("external_person", ...h[p]), this.$ = h[p];
78
+ break;
79
+ case 41:
80
+ b.addPersonOrSystem("system", ...h[p]), this.$ = h[p];
81
+ break;
82
+ case 42:
83
+ b.addPersonOrSystem("system_db", ...h[p]), this.$ = h[p];
84
+ break;
85
+ case 43:
86
+ b.addPersonOrSystem("system_queue", ...h[p]), this.$ = h[p];
87
+ break;
88
+ case 44:
89
+ b.addPersonOrSystem("external_system", ...h[p]), this.$ = h[p];
90
+ break;
91
+ case 45:
92
+ b.addPersonOrSystem("external_system_db", ...h[p]), this.$ = h[p];
93
+ break;
94
+ case 46:
95
+ b.addPersonOrSystem("external_system_queue", ...h[p]), this.$ = h[p];
96
+ break;
97
+ case 47:
98
+ b.addContainer("container", ...h[p]), this.$ = h[p];
99
+ break;
100
+ case 48:
101
+ b.addContainer("container_db", ...h[p]), this.$ = h[p];
102
+ break;
103
+ case 49:
104
+ b.addContainer("container_queue", ...h[p]), this.$ = h[p];
105
+ break;
106
+ case 50:
107
+ b.addContainer("external_container", ...h[p]), this.$ = h[p];
108
+ break;
109
+ case 51:
110
+ b.addContainer("external_container_db", ...h[p]), this.$ = h[p];
111
+ break;
112
+ case 52:
113
+ b.addContainer("external_container_queue", ...h[p]), this.$ = h[p];
114
+ break;
115
+ case 53:
116
+ b.addComponent("component", ...h[p]), this.$ = h[p];
117
+ break;
118
+ case 54:
119
+ b.addComponent("component_db", ...h[p]), this.$ = h[p];
120
+ break;
121
+ case 55:
122
+ b.addComponent("component_queue", ...h[p]), this.$ = h[p];
123
+ break;
124
+ case 56:
125
+ b.addComponent("external_component", ...h[p]), this.$ = h[p];
126
+ break;
127
+ case 57:
128
+ b.addComponent("external_component_db", ...h[p]), this.$ = h[p];
129
+ break;
130
+ case 58:
131
+ b.addComponent("external_component_queue", ...h[p]), this.$ = h[p];
132
+ break;
133
+ case 60:
134
+ b.addRel("rel", ...h[p]), this.$ = h[p];
135
+ break;
136
+ case 61:
137
+ b.addRel("birel", ...h[p]), this.$ = h[p];
138
+ break;
139
+ case 62:
140
+ b.addRel("rel_u", ...h[p]), this.$ = h[p];
141
+ break;
142
+ case 63:
143
+ b.addRel("rel_d", ...h[p]), this.$ = h[p];
144
+ break;
145
+ case 64:
146
+ b.addRel("rel_l", ...h[p]), this.$ = h[p];
147
+ break;
148
+ case 65:
149
+ b.addRel("rel_r", ...h[p]), this.$ = h[p];
150
+ break;
151
+ case 66:
152
+ b.addRel("rel_b", ...h[p]), this.$ = h[p];
153
+ break;
154
+ case 67:
155
+ h[p].splice(0, 1), b.addRel("rel", ...h[p]), this.$ = h[p];
156
+ break;
157
+ case 68:
158
+ b.updateElStyle("update_el_style", ...h[p]), this.$ = h[p];
159
+ break;
160
+ case 69:
161
+ b.updateRelStyle("update_rel_style", ...h[p]), this.$ = h[p];
162
+ break;
163
+ case 70:
164
+ b.updateLayoutConfig("update_layout_config", ...h[p]), this.$ = h[p];
165
+ break;
166
+ case 71:
167
+ this.$ = [h[p]];
168
+ break;
169
+ case 72:
170
+ h[p].unshift(h[p - 1]), this.$ = h[p];
171
+ break;
172
+ case 73:
173
+ case 75:
174
+ this.$ = h[p].trim();
175
+ break;
176
+ case 74:
177
+ let Et = {};
178
+ Et[h[p - 1].trim()] = h[p].trim(), this.$ = Et;
179
+ break;
180
+ case 76:
181
+ this.$ = "";
182
+ break;
183
+ }
184
+ }, "anonymous"),
185
+ 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: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 14: [1, 74] }, e(Ct, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }), e(Ct, [2, 14]), e(Qt, [2, 16], { 12: [1, 76] }), e(Ct, [2, 36], { 12: [1, 77] }), e(St, [2, 19]), e(St, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, e(St, [2, 23]), { 35: 80, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 86, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 87, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 88, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 89, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 90, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 91, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 92, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 93, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 94, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 95, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 96, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 97, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 98, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 99, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 100, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 101, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 102, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 103, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 104, 75: 81, 76: k, 77: A, 79: C, 80: w }, e(T, [2, 59]), { 35: 105, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 106, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 107, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 108, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 109, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 110, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 111, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 112, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 113, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 114, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 115, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 120, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 121, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 122, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 123, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 124, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 125, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, e(Ct, [2, 15]), e(Qt, [2, 17], { 21: 22, 19: 130, 22: t, 23: s, 24: o, 26: l, 28: a }), e(Ct, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: t, 23: s, 24: o, 26: l, 28: a, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }), e(St, [2, 21]), e(St, [2, 22]), e(T, [2, 39]), e(le, [2, 71], { 75: 81, 35: 132, 76: k, 77: A, 79: C, 80: w }), e(Mt, [2, 73]), { 78: [1, 133] }, e(Mt, [2, 75]), e(Mt, [2, 76]), e(T, [2, 40]), e(T, [2, 41]), e(T, [2, 42]), e(T, [2, 43]), e(T, [2, 44]), e(T, [2, 45]), e(T, [2, 46]), e(T, [2, 47]), e(T, [2, 48]), e(T, [2, 49]), e(T, [2, 50]), e(T, [2, 51]), e(T, [2, 52]), e(T, [2, 53]), e(T, [2, 54]), e(T, [2, 55]), e(T, [2, 56]), e(T, [2, 57]), e(T, [2, 58]), e(T, [2, 60]), e(T, [2, 61]), e(T, [2, 62]), e(T, [2, 63]), e(T, [2, 64]), e(T, [2, 65]), e(T, [2, 66]), e(T, [2, 67]), e(T, [2, 68]), e(T, [2, 69]), e(T, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, e(vt, [2, 28]), e(vt, [2, 29]), e(vt, [2, 30]), e(vt, [2, 31]), e(vt, [2, 32]), e(vt, [2, 33]), e(vt, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, e(Qt, [2, 18]), e(Ct, [2, 38]), e(le, [2, 72]), e(Mt, [2, 74]), e(T, [2, 24]), e(T, [2, 35]), e(Ht, [2, 25]), e(Ht, [2, 26], { 12: [1, 138] }), e(Ht, [2, 27])],
186
+ 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] },
187
+ parseError: /* @__PURE__ */ g(function(x, m) {
188
+ if (m.recoverable)
189
+ this.trace(x);
190
+ else {
191
+ var v = new Error(x);
192
+ throw v.hash = m, v;
193
+ }
194
+ }, "parseError"),
195
+ parse: /* @__PURE__ */ g(function(x) {
196
+ var m = this, v = [0], b = [], R = [null], h = [], Dt = this.table, p = "", Et = 0, oe = 0, we = 2, ce = 1, Te = h.slice.call(arguments, 1), D = Object.create(this.lexer), kt = { yy: {} };
197
+ for (var Gt in this.yy)
198
+ Object.prototype.hasOwnProperty.call(this.yy, Gt) && (kt.yy[Gt] = this.yy[Gt]);
199
+ D.setInput(x, kt.yy), kt.yy.lexer = D, kt.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
200
+ var Kt = D.yylloc;
201
+ h.push(Kt);
202
+ var Oe = D.options && D.options.ranges;
203
+ typeof kt.yy.parseError == "function" ? this.parseError = kt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
204
+ function Re(L) {
205
+ v.length = v.length - 2 * L, R.length = R.length - L, h.length = h.length - L;
206
+ }
207
+ g(Re, "popStack");
208
+ function he() {
209
+ var L;
210
+ return L = b.pop() || D.lex() || ce, typeof L != "number" && (L instanceof Array && (b = L, L = b.pop()), L = m.symbols_[L] || L), L;
211
+ }
212
+ g(he, "lex");
213
+ for (var I, At, N, Jt, wt = {}, Nt, W, ue, Yt; ; ) {
214
+ if (At = v[v.length - 1], this.defaultActions[At] ? N = this.defaultActions[At] : ((I === null || typeof I > "u") && (I = he()), N = Dt[At] && Dt[At][I]), typeof N > "u" || !N.length || !N[0]) {
215
+ var Zt = "";
216
+ Yt = [];
217
+ for (Nt in Dt[At])
218
+ this.terminals_[Nt] && Nt > we && Yt.push("'" + this.terminals_[Nt] + "'");
219
+ D.showPosition ? Zt = "Parse error on line " + (Et + 1) + `:
220
+ ` + D.showPosition() + `
221
+ Expecting ` + Yt.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : Zt = "Parse error on line " + (Et + 1) + ": Unexpected " + (I == ce ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(Zt, {
222
+ text: D.match,
223
+ token: this.terminals_[I] || I,
224
+ line: D.yylineno,
225
+ loc: Kt,
226
+ expected: Yt
227
+ });
228
+ }
229
+ if (N[0] instanceof Array && N.length > 1)
230
+ throw new Error("Parse Error: multiple actions possible at state: " + At + ", token: " + I);
231
+ switch (N[0]) {
232
+ case 1:
233
+ v.push(I), R.push(D.yytext), h.push(D.yylloc), v.push(N[1]), I = null, oe = D.yyleng, p = D.yytext, Et = D.yylineno, Kt = D.yylloc;
234
+ break;
235
+ case 2:
236
+ if (W = this.productions_[N[1]][1], wt.$ = R[R.length - W], wt._$ = {
237
+ first_line: h[h.length - (W || 1)].first_line,
238
+ last_line: h[h.length - 1].last_line,
239
+ first_column: h[h.length - (W || 1)].first_column,
240
+ last_column: h[h.length - 1].last_column
241
+ }, Oe && (wt._$.range = [
242
+ h[h.length - (W || 1)].range[0],
243
+ h[h.length - 1].range[1]
244
+ ]), Jt = this.performAction.apply(wt, [
245
+ p,
246
+ oe,
247
+ Et,
248
+ kt.yy,
249
+ N[1],
250
+ R,
251
+ h
252
+ ].concat(Te)), typeof Jt < "u")
253
+ return Jt;
254
+ W && (v = v.slice(0, -1 * W * 2), R = R.slice(0, -1 * W), h = h.slice(0, -1 * W)), v.push(this.productions_[N[1]][0]), R.push(wt.$), h.push(wt._$), ue = Dt[v[v.length - 2]][v[v.length - 1]], v.push(ue);
255
+ break;
256
+ case 3:
257
+ return !0;
258
+ }
259
+ }
260
+ return !0;
261
+ }, "parse")
262
+ }, Ce = /* @__PURE__ */ function() {
263
+ var _t = {
264
+ EOF: 1,
265
+ parseError: /* @__PURE__ */ g(function(m, v) {
266
+ if (this.yy.parser)
267
+ this.yy.parser.parseError(m, v);
268
+ else
269
+ throw new Error(m);
270
+ }, "parseError"),
271
+ // resets the lexer, sets new input
272
+ setInput: /* @__PURE__ */ g(function(x, m) {
273
+ return this.yy = m || this.yy || {}, this._input = x, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
274
+ first_line: 1,
275
+ first_column: 0,
276
+ last_line: 1,
277
+ last_column: 0
278
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
279
+ }, "setInput"),
280
+ // consumes and returns one char from the input
281
+ input: /* @__PURE__ */ g(function() {
282
+ var x = this._input[0];
283
+ this.yytext += x, this.yyleng++, this.offset++, this.match += x, this.matched += x;
284
+ var m = x.match(/(?:\r\n?|\n).*/g);
285
+ return m ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), x;
286
+ }, "input"),
287
+ // unshifts one char (or a string) into the input
288
+ unput: /* @__PURE__ */ g(function(x) {
289
+ var m = x.length, v = x.split(/(?:\r\n?|\n)/g);
290
+ this._input = x + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - m), this.offset -= m;
291
+ var b = this.match.split(/(?:\r\n?|\n)/g);
292
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), v.length - 1 && (this.yylineno -= v.length - 1);
293
+ var R = this.yylloc.range;
294
+ return this.yylloc = {
295
+ first_line: this.yylloc.first_line,
296
+ last_line: this.yylineno + 1,
297
+ first_column: this.yylloc.first_column,
298
+ last_column: v ? (v.length === b.length ? this.yylloc.first_column : 0) + b[b.length - v.length].length - v[0].length : this.yylloc.first_column - m
299
+ }, this.options.ranges && (this.yylloc.range = [R[0], R[0] + this.yyleng - m]), this.yyleng = this.yytext.length, this;
300
+ }, "unput"),
301
+ // When called from action, caches matched text and appends it on next action
302
+ more: /* @__PURE__ */ g(function() {
303
+ return this._more = !0, this;
304
+ }, "more"),
305
+ // 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.
306
+ reject: /* @__PURE__ */ g(function() {
307
+ if (this.options.backtrack_lexer)
308
+ this._backtrack = !0;
309
+ else
310
+ 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).
311
+ ` + this.showPosition(), {
312
+ text: "",
313
+ token: null,
314
+ line: this.yylineno
315
+ });
316
+ return this;
317
+ }, "reject"),
318
+ // retain first n characters of the match
319
+ less: /* @__PURE__ */ g(function(x) {
320
+ this.unput(this.match.slice(x));
321
+ }, "less"),
322
+ // displays already matched input, i.e. for error messages
323
+ pastInput: /* @__PURE__ */ g(function() {
324
+ var x = this.matched.substr(0, this.matched.length - this.match.length);
325
+ return (x.length > 20 ? "..." : "") + x.substr(-20).replace(/\n/g, "");
326
+ }, "pastInput"),
327
+ // displays upcoming input, i.e. for error messages
328
+ upcomingInput: /* @__PURE__ */ g(function() {
329
+ var x = this.match;
330
+ return x.length < 20 && (x += this._input.substr(0, 20 - x.length)), (x.substr(0, 20) + (x.length > 20 ? "..." : "")).replace(/\n/g, "");
331
+ }, "upcomingInput"),
332
+ // displays the character position where the lexing error occurred, i.e. for error messages
333
+ showPosition: /* @__PURE__ */ g(function() {
334
+ var x = this.pastInput(), m = new Array(x.length + 1).join("-");
335
+ return x + this.upcomingInput() + `
336
+ ` + m + "^";
337
+ }, "showPosition"),
338
+ // test the lexed token: return FALSE when not a match, otherwise return token
339
+ test_match: /* @__PURE__ */ g(function(x, m) {
340
+ var v, b, R;
341
+ if (this.options.backtrack_lexer && (R = {
342
+ yylineno: this.yylineno,
343
+ yylloc: {
344
+ first_line: this.yylloc.first_line,
345
+ last_line: this.last_line,
346
+ first_column: this.yylloc.first_column,
347
+ last_column: this.yylloc.last_column
348
+ },
349
+ yytext: this.yytext,
350
+ match: this.match,
351
+ matches: this.matches,
352
+ matched: this.matched,
353
+ yyleng: this.yyleng,
354
+ offset: this.offset,
355
+ _more: this._more,
356
+ _input: this._input,
357
+ yy: this.yy,
358
+ conditionStack: this.conditionStack.slice(0),
359
+ done: this.done
360
+ }, this.options.ranges && (R.yylloc.range = this.yylloc.range.slice(0))), b = x[0].match(/(?:\r\n?|\n).*/g), b && (this.yylineno += b.length), this.yylloc = {
361
+ first_line: this.yylloc.last_line,
362
+ last_line: this.yylineno + 1,
363
+ first_column: this.yylloc.last_column,
364
+ last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + x[0].length
365
+ }, this.yytext += x[0], this.match += x[0], this.matches = x, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(x[0].length), this.matched += x[0], v = this.performAction.call(this, this.yy, this, m, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), v)
366
+ return v;
367
+ if (this._backtrack) {
368
+ for (var h in R)
369
+ this[h] = R[h];
370
+ return !1;
371
+ }
372
+ return !1;
373
+ }, "test_match"),
374
+ // return next match in input
375
+ next: /* @__PURE__ */ g(function() {
376
+ if (this.done)
377
+ return this.EOF;
378
+ this._input || (this.done = !0);
379
+ var x, m, v, b;
380
+ this._more || (this.yytext = "", this.match = "");
381
+ for (var R = this._currentRules(), h = 0; h < R.length; h++)
382
+ if (v = this._input.match(this.rules[R[h]]), v && (!m || v[0].length > m[0].length)) {
383
+ if (m = v, b = h, this.options.backtrack_lexer) {
384
+ if (x = this.test_match(v, R[h]), x !== !1)
385
+ return x;
386
+ if (this._backtrack) {
387
+ m = !1;
388
+ continue;
389
+ } else
390
+ return !1;
391
+ } else if (!this.options.flex)
392
+ break;
393
+ }
394
+ return m ? (x = this.test_match(m, R[b]), x !== !1 ? x : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
395
+ ` + this.showPosition(), {
396
+ text: "",
397
+ token: null,
398
+ line: this.yylineno
399
+ });
400
+ }, "next"),
401
+ // return next match that has a token
402
+ lex: /* @__PURE__ */ g(function() {
403
+ var m = this.next();
404
+ return m || this.lex();
405
+ }, "lex"),
406
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
407
+ begin: /* @__PURE__ */ g(function(m) {
408
+ this.conditionStack.push(m);
409
+ }, "begin"),
410
+ // pop the previously active lexer condition state off the condition stack
411
+ popState: /* @__PURE__ */ g(function() {
412
+ var m = this.conditionStack.length - 1;
413
+ return m > 0 ? this.conditionStack.pop() : this.conditionStack[0];
414
+ }, "popState"),
415
+ // produce the lexer rule set which is active for the currently active lexer condition state
416
+ _currentRules: /* @__PURE__ */ g(function() {
417
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
418
+ }, "_currentRules"),
419
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
420
+ topState: /* @__PURE__ */ g(function(m) {
421
+ return m = this.conditionStack.length - 1 - Math.abs(m || 0), m >= 0 ? this.conditionStack[m] : "INITIAL";
422
+ }, "topState"),
423
+ // alias for begin(condition)
424
+ pushState: /* @__PURE__ */ g(function(m) {
425
+ this.begin(m);
426
+ }, "pushState"),
427
+ // return the number of states currently on the stack
428
+ stateStackSize: /* @__PURE__ */ g(function() {
429
+ return this.conditionStack.length;
430
+ }, "stateStackSize"),
431
+ options: {},
432
+ performAction: /* @__PURE__ */ g(function(m, v, b, R) {
433
+ switch (b) {
434
+ case 0:
435
+ return 6;
436
+ case 1:
437
+ return 7;
438
+ case 2:
439
+ return 8;
440
+ case 3:
441
+ return 9;
442
+ case 4:
443
+ return 22;
444
+ case 5:
445
+ return 23;
446
+ case 6:
447
+ return this.begin("acc_title"), 24;
448
+ case 7:
449
+ return this.popState(), "acc_title_value";
450
+ case 8:
451
+ return this.begin("acc_descr"), 26;
452
+ case 9:
453
+ return this.popState(), "acc_descr_value";
454
+ case 10:
455
+ this.begin("acc_descr_multiline");
456
+ break;
457
+ case 11:
458
+ this.popState();
459
+ break;
460
+ case 12:
461
+ return "acc_descr_multiline_value";
462
+ case 13:
463
+ break;
464
+ case 14:
465
+ c;
466
+ break;
467
+ case 15:
468
+ return 12;
469
+ case 16:
470
+ break;
471
+ case 17:
472
+ return 11;
473
+ case 18:
474
+ return 15;
475
+ case 19:
476
+ return 16;
477
+ case 20:
478
+ return 17;
479
+ case 21:
480
+ return 18;
481
+ case 22:
482
+ return this.begin("person_ext"), 45;
483
+ case 23:
484
+ return this.begin("person"), 44;
485
+ case 24:
486
+ return this.begin("system_ext_queue"), 51;
487
+ case 25:
488
+ return this.begin("system_ext_db"), 50;
489
+ case 26:
490
+ return this.begin("system_ext"), 49;
491
+ case 27:
492
+ return this.begin("system_queue"), 48;
493
+ case 28:
494
+ return this.begin("system_db"), 47;
495
+ case 29:
496
+ return this.begin("system"), 46;
497
+ case 30:
498
+ return this.begin("boundary"), 37;
499
+ case 31:
500
+ return this.begin("enterprise_boundary"), 34;
501
+ case 32:
502
+ return this.begin("system_boundary"), 36;
503
+ case 33:
504
+ return this.begin("container_ext_queue"), 57;
505
+ case 34:
506
+ return this.begin("container_ext_db"), 56;
507
+ case 35:
508
+ return this.begin("container_ext"), 55;
509
+ case 36:
510
+ return this.begin("container_queue"), 54;
511
+ case 37:
512
+ return this.begin("container_db"), 53;
513
+ case 38:
514
+ return this.begin("container"), 52;
515
+ case 39:
516
+ return this.begin("container_boundary"), 38;
517
+ case 40:
518
+ return this.begin("component_ext_queue"), 63;
519
+ case 41:
520
+ return this.begin("component_ext_db"), 62;
521
+ case 42:
522
+ return this.begin("component_ext"), 61;
523
+ case 43:
524
+ return this.begin("component_queue"), 60;
525
+ case 44:
526
+ return this.begin("component_db"), 59;
527
+ case 45:
528
+ return this.begin("component"), 58;
529
+ case 46:
530
+ return this.begin("node"), 39;
531
+ case 47:
532
+ return this.begin("node"), 39;
533
+ case 48:
534
+ return this.begin("node_l"), 40;
535
+ case 49:
536
+ return this.begin("node_r"), 41;
537
+ case 50:
538
+ return this.begin("rel"), 64;
539
+ case 51:
540
+ return this.begin("birel"), 65;
541
+ case 52:
542
+ return this.begin("rel_u"), 66;
543
+ case 53:
544
+ return this.begin("rel_u"), 66;
545
+ case 54:
546
+ return this.begin("rel_d"), 67;
547
+ case 55:
548
+ return this.begin("rel_d"), 67;
549
+ case 56:
550
+ return this.begin("rel_l"), 68;
551
+ case 57:
552
+ return this.begin("rel_l"), 68;
553
+ case 58:
554
+ return this.begin("rel_r"), 69;
555
+ case 59:
556
+ return this.begin("rel_r"), 69;
557
+ case 60:
558
+ return this.begin("rel_b"), 70;
559
+ case 61:
560
+ return this.begin("rel_index"), 71;
561
+ case 62:
562
+ return this.begin("update_el_style"), 72;
563
+ case 63:
564
+ return this.begin("update_rel_style"), 73;
565
+ case 64:
566
+ return this.begin("update_layout_config"), 74;
567
+ case 65:
568
+ return "EOF_IN_STRUCT";
569
+ case 66:
570
+ return this.begin("attribute"), "ATTRIBUTE_EMPTY";
571
+ case 67:
572
+ this.begin("attribute");
573
+ break;
574
+ case 68:
575
+ this.popState(), this.popState();
576
+ break;
577
+ case 69:
578
+ return 80;
579
+ case 70:
580
+ break;
581
+ case 71:
582
+ return 80;
583
+ case 72:
584
+ this.begin("string");
585
+ break;
586
+ case 73:
587
+ this.popState();
588
+ break;
589
+ case 74:
590
+ return "STR";
591
+ case 75:
592
+ this.begin("string_kv");
593
+ break;
594
+ case 76:
595
+ return this.begin("string_kv_key"), "STR_KEY";
596
+ case 77:
597
+ this.popState(), this.begin("string_kv_value");
598
+ break;
599
+ case 78:
600
+ return "STR_VALUE";
601
+ case 79:
602
+ this.popState(), this.popState();
603
+ break;
604
+ case 80:
605
+ return "STR";
606
+ case 81:
607
+ return "LBRACE";
608
+ case 82:
609
+ return "RBRACE";
610
+ case 83:
611
+ return "SPACE";
612
+ case 84:
613
+ return "EOL";
614
+ case 85:
615
+ return 14;
616
+ }
617
+ }, "anonymous"),
618
+ 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]+)/, /^(?:$)/],
619
+ conditions: { acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, string_kv_value: { rules: [78, 79], inclusive: !1 }, string_kv_key: { rules: [77], inclusive: !1 }, string_kv: { rules: [76], inclusive: !1 }, string: { rules: [73, 74], inclusive: !1 }, attribute: { rules: [68, 69, 70, 71, 72, 75, 80], inclusive: !1 }, update_layout_config: { rules: [65, 66, 67, 68], inclusive: !1 }, update_rel_style: { rules: [65, 66, 67, 68], inclusive: !1 }, update_el_style: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_b: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_r: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_l: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_d: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_u: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_bi: { rules: [], inclusive: !1 }, rel: { rules: [65, 66, 67, 68], inclusive: !1 }, node_r: { rules: [65, 66, 67, 68], inclusive: !1 }, node_l: { rules: [65, 66, 67, 68], inclusive: !1 }, node: { rules: [65, 66, 67, 68], inclusive: !1 }, index: { rules: [], inclusive: !1 }, rel_index: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext_queue: { rules: [], inclusive: !1 }, component_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, component_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, component_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component: { rules: [65, 66, 67, 68], inclusive: !1 }, container_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, container_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container: { rules: [65, 66, 67, 68], inclusive: !1 }, birel: { rules: [65, 66, 67, 68], inclusive: !1 }, system_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, enterprise_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, system_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system: { rules: [65, 66, 67, 68], inclusive: !1 }, person_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, person: { rules: [65, 66, 67, 68], inclusive: !1 }, 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: !0 } }
620
+ };
621
+ return _t;
622
+ }();
623
+ qt.lexer = Ce;
624
+ function Lt() {
625
+ this.yy = {};
626
+ }
627
+ return g(Lt, "Parser"), Lt.prototype = qt, qt.Parser = Lt, new Lt();
628
+ }();
629
+ Ft.parser = Ft;
630
+ var Ue = Ft, V = [], xt = [""], B = "global", F = "", X = [
631
+ {
632
+ alias: "global",
633
+ label: { text: "global" },
634
+ type: { text: "global" },
635
+ tags: null,
636
+ link: null,
637
+ parentBoundary: ""
638
+ }
639
+ ], It = [], ie = "", ne = !1, Vt = 4, zt = 2, be, Fe = /* @__PURE__ */ g(function() {
640
+ return be;
641
+ }, "getC4Type"), Ve = /* @__PURE__ */ g(function(e) {
642
+ be = ge(e, Bt());
643
+ }, "setC4Type"), ze = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n, i) {
644
+ if (e == null || t === void 0 || t === null || s === void 0 || s === null || o === void 0 || o === null)
645
+ return;
646
+ let u = {};
647
+ const d = It.find((f) => f.from === t && f.to === s);
648
+ if (d ? u = d : It.push(u), u.type = e, u.from = t, u.to = s, u.label = { text: o }, l == null)
649
+ u.techn = { text: "" };
650
+ else if (typeof l == "object") {
651
+ let [f, y] = Object.entries(l)[0];
652
+ u[f] = { text: y };
653
+ } else
654
+ u.techn = { text: l };
655
+ if (a == null)
656
+ u.descr = { text: "" };
657
+ else if (typeof a == "object") {
658
+ let [f, y] = Object.entries(a)[0];
659
+ u[f] = { text: y };
660
+ } else
661
+ u.descr = { text: a };
662
+ if (typeof r == "object") {
663
+ let [f, y] = Object.entries(r)[0];
664
+ u[f] = y;
665
+ } else
666
+ u.sprite = r;
667
+ if (typeof n == "object") {
668
+ let [f, y] = Object.entries(n)[0];
669
+ u[f] = y;
670
+ } else
671
+ u.tags = n;
672
+ if (typeof i == "object") {
673
+ let [f, y] = Object.entries(i)[0];
674
+ u[f] = y;
675
+ } else
676
+ u.link = i;
677
+ u.wrap = mt();
678
+ }, "addRel"), Xe = /* @__PURE__ */ g(function(e, t, s, o, l, a, r) {
679
+ if (t === null || s === null)
680
+ return;
681
+ let n = {};
682
+ const i = V.find((u) => u.alias === t);
683
+ if (i && t === i.alias ? n = i : (n.alias = t, V.push(n)), s == null ? n.label = { text: "" } : n.label = { text: s }, o == null)
684
+ n.descr = { text: "" };
685
+ else if (typeof o == "object") {
686
+ let [u, d] = Object.entries(o)[0];
687
+ n[u] = { text: d };
688
+ } else
689
+ n.descr = { text: o };
690
+ if (typeof l == "object") {
691
+ let [u, d] = Object.entries(l)[0];
692
+ n[u] = d;
693
+ } else
694
+ n.sprite = l;
695
+ if (typeof a == "object") {
696
+ let [u, d] = Object.entries(a)[0];
697
+ n[u] = d;
698
+ } else
699
+ n.tags = a;
700
+ if (typeof r == "object") {
701
+ let [u, d] = Object.entries(r)[0];
702
+ n[u] = d;
703
+ } else
704
+ n.link = r;
705
+ n.typeC4Shape = { text: e }, n.parentBoundary = B, n.wrap = mt();
706
+ }, "addPersonOrSystem"), We = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
707
+ if (t === null || s === null)
708
+ return;
709
+ let i = {};
710
+ const u = V.find((d) => d.alias === t);
711
+ if (u && t === u.alias ? i = u : (i.alias = t, V.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
712
+ i.techn = { text: "" };
713
+ else if (typeof o == "object") {
714
+ let [d, f] = Object.entries(o)[0];
715
+ i[d] = { text: f };
716
+ } else
717
+ i.techn = { text: o };
718
+ if (l == null)
719
+ i.descr = { text: "" };
720
+ else if (typeof l == "object") {
721
+ let [d, f] = Object.entries(l)[0];
722
+ i[d] = { text: f };
723
+ } else
724
+ i.descr = { text: l };
725
+ if (typeof a == "object") {
726
+ let [d, f] = Object.entries(a)[0];
727
+ i[d] = f;
728
+ } else
729
+ i.sprite = a;
730
+ if (typeof r == "object") {
731
+ let [d, f] = Object.entries(r)[0];
732
+ i[d] = f;
733
+ } else
734
+ i.tags = r;
735
+ if (typeof n == "object") {
736
+ let [d, f] = Object.entries(n)[0];
737
+ i[d] = f;
738
+ } else
739
+ i.link = n;
740
+ i.wrap = mt(), i.typeC4Shape = { text: e }, i.parentBoundary = B;
741
+ }, "addContainer"), Qe = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
742
+ if (t === null || s === null)
743
+ return;
744
+ let i = {};
745
+ const u = V.find((d) => d.alias === t);
746
+ if (u && t === u.alias ? i = u : (i.alias = t, V.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
747
+ i.techn = { text: "" };
748
+ else if (typeof o == "object") {
749
+ let [d, f] = Object.entries(o)[0];
750
+ i[d] = { text: f };
751
+ } else
752
+ i.techn = { text: o };
753
+ if (l == null)
754
+ i.descr = { text: "" };
755
+ else if (typeof l == "object") {
756
+ let [d, f] = Object.entries(l)[0];
757
+ i[d] = { text: f };
758
+ } else
759
+ i.descr = { text: l };
760
+ if (typeof a == "object") {
761
+ let [d, f] = Object.entries(a)[0];
762
+ i[d] = f;
763
+ } else
764
+ i.sprite = a;
765
+ if (typeof r == "object") {
766
+ let [d, f] = Object.entries(r)[0];
767
+ i[d] = f;
768
+ } else
769
+ i.tags = r;
770
+ if (typeof n == "object") {
771
+ let [d, f] = Object.entries(n)[0];
772
+ i[d] = f;
773
+ } else
774
+ i.link = n;
775
+ i.wrap = mt(), i.typeC4Shape = { text: e }, i.parentBoundary = B;
776
+ }, "addComponent"), He = /* @__PURE__ */ g(function(e, t, s, o, l) {
777
+ if (e === null || t === null)
778
+ return;
779
+ let a = {};
780
+ const r = X.find((n) => n.alias === e);
781
+ if (r && e === r.alias ? a = r : (a.alias = e, X.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, s == null)
782
+ a.type = { text: "system" };
783
+ else if (typeof s == "object") {
784
+ let [n, i] = Object.entries(s)[0];
785
+ a[n] = { text: i };
786
+ } else
787
+ a.type = { text: s };
788
+ if (typeof o == "object") {
789
+ let [n, i] = Object.entries(o)[0];
790
+ a[n] = i;
791
+ } else
792
+ a.tags = o;
793
+ if (typeof l == "object") {
794
+ let [n, i] = Object.entries(l)[0];
795
+ a[n] = i;
796
+ } else
797
+ a.link = l;
798
+ a.parentBoundary = B, a.wrap = mt(), F = B, B = e, xt.push(F);
799
+ }, "addPersonOrSystemBoundary"), qe = /* @__PURE__ */ g(function(e, t, s, o, l) {
800
+ if (e === null || t === null)
801
+ return;
802
+ let a = {};
803
+ const r = X.find((n) => n.alias === e);
804
+ if (r && e === r.alias ? a = r : (a.alias = e, X.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, s == null)
805
+ a.type = { text: "container" };
806
+ else if (typeof s == "object") {
807
+ let [n, i] = Object.entries(s)[0];
808
+ a[n] = { text: i };
809
+ } else
810
+ a.type = { text: s };
811
+ if (typeof o == "object") {
812
+ let [n, i] = Object.entries(o)[0];
813
+ a[n] = i;
814
+ } else
815
+ a.tags = o;
816
+ if (typeof l == "object") {
817
+ let [n, i] = Object.entries(l)[0];
818
+ a[n] = i;
819
+ } else
820
+ a.link = l;
821
+ a.parentBoundary = B, a.wrap = mt(), F = B, B = e, xt.push(F);
822
+ }, "addContainerBoundary"), Ge = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
823
+ if (t === null || s === null)
824
+ return;
825
+ let i = {};
826
+ const u = X.find((d) => d.alias === t);
827
+ if (u && t === u.alias ? i = u : (i.alias = t, X.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
828
+ i.type = { text: "node" };
829
+ else if (typeof o == "object") {
830
+ let [d, f] = Object.entries(o)[0];
831
+ i[d] = { text: f };
832
+ } else
833
+ i.type = { text: o };
834
+ if (l == null)
835
+ i.descr = { text: "" };
836
+ else if (typeof l == "object") {
837
+ let [d, f] = Object.entries(l)[0];
838
+ i[d] = { text: f };
839
+ } else
840
+ i.descr = { text: l };
841
+ if (typeof r == "object") {
842
+ let [d, f] = Object.entries(r)[0];
843
+ i[d] = f;
844
+ } else
845
+ i.tags = r;
846
+ if (typeof n == "object") {
847
+ let [d, f] = Object.entries(n)[0];
848
+ i[d] = f;
849
+ } else
850
+ i.link = n;
851
+ i.nodeType = e, i.parentBoundary = B, i.wrap = mt(), F = B, B = t, xt.push(F);
852
+ }, "addDeploymentNode"), Ke = /* @__PURE__ */ g(function() {
853
+ B = F, xt.pop(), F = xt.pop(), xt.push(F);
854
+ }, "popBoundaryParseStack"), Je = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n, i, u, d) {
855
+ let f = V.find((y) => y.alias === t);
856
+ if (!(f === void 0 && (f = X.find((y) => y.alias === t), f === void 0))) {
857
+ if (s != null)
858
+ if (typeof s == "object") {
859
+ let [y, E] = Object.entries(s)[0];
860
+ f[y] = E;
861
+ } else
862
+ f.bgColor = s;
863
+ if (o != null)
864
+ if (typeof o == "object") {
865
+ let [y, E] = Object.entries(o)[0];
866
+ f[y] = E;
867
+ } else
868
+ f.fontColor = o;
869
+ if (l != null)
870
+ if (typeof l == "object") {
871
+ let [y, E] = Object.entries(l)[0];
872
+ f[y] = E;
873
+ } else
874
+ f.borderColor = l;
875
+ if (a != null)
876
+ if (typeof a == "object") {
877
+ let [y, E] = Object.entries(a)[0];
878
+ f[y] = E;
879
+ } else
880
+ f.shadowing = a;
881
+ if (r != null)
882
+ if (typeof r == "object") {
883
+ let [y, E] = Object.entries(r)[0];
884
+ f[y] = E;
885
+ } else
886
+ f.shape = r;
887
+ if (n != null)
888
+ if (typeof n == "object") {
889
+ let [y, E] = Object.entries(n)[0];
890
+ f[y] = E;
891
+ } else
892
+ f.sprite = n;
893
+ if (i != null)
894
+ if (typeof i == "object") {
895
+ let [y, E] = Object.entries(i)[0];
896
+ f[y] = E;
897
+ } else
898
+ f.techn = i;
899
+ if (u != null)
900
+ if (typeof u == "object") {
901
+ let [y, E] = Object.entries(u)[0];
902
+ f[y] = E;
903
+ } else
904
+ f.legendText = u;
905
+ if (d != null)
906
+ if (typeof d == "object") {
907
+ let [y, E] = Object.entries(d)[0];
908
+ f[y] = E;
909
+ } else
910
+ f.legendSprite = d;
911
+ }
912
+ }, "updateElStyle"), Ze = /* @__PURE__ */ g(function(e, t, s, o, l, a, r) {
913
+ const n = It.find((i) => i.from === t && i.to === s);
914
+ if (n !== void 0) {
915
+ if (o != null)
916
+ if (typeof o == "object") {
917
+ let [i, u] = Object.entries(o)[0];
918
+ n[i] = u;
919
+ } else
920
+ n.textColor = o;
921
+ if (l != null)
922
+ if (typeof l == "object") {
923
+ let [i, u] = Object.entries(l)[0];
924
+ n[i] = u;
925
+ } else
926
+ n.lineColor = l;
927
+ if (a != null)
928
+ if (typeof a == "object") {
929
+ let [i, u] = Object.entries(a)[0];
930
+ n[i] = parseInt(u);
931
+ } else
932
+ n.offsetX = parseInt(a);
933
+ if (r != null)
934
+ if (typeof r == "object") {
935
+ let [i, u] = Object.entries(r)[0];
936
+ n[i] = parseInt(u);
937
+ } else
938
+ n.offsetY = parseInt(r);
939
+ }
940
+ }, "updateRelStyle"), $e = /* @__PURE__ */ g(function(e, t, s) {
941
+ let o = Vt, l = zt;
942
+ if (typeof t == "object") {
943
+ const a = Object.values(t)[0];
944
+ o = parseInt(a);
945
+ } else
946
+ o = parseInt(t);
947
+ if (typeof s == "object") {
948
+ const a = Object.values(s)[0];
949
+ l = parseInt(a);
950
+ } else
951
+ l = parseInt(s);
952
+ o >= 1 && (Vt = o), l >= 1 && (zt = l);
953
+ }, "updateLayoutConfig"), t0 = /* @__PURE__ */ g(function() {
954
+ return Vt;
955
+ }, "getC4ShapeInRow"), e0 = /* @__PURE__ */ g(function() {
956
+ return zt;
957
+ }, "getC4BoundaryInRow"), a0 = /* @__PURE__ */ g(function() {
958
+ return B;
959
+ }, "getCurrentBoundaryParse"), i0 = /* @__PURE__ */ g(function() {
960
+ return F;
961
+ }, "getParentBoundaryParse"), _e = /* @__PURE__ */ g(function(e) {
962
+ return e == null ? V : V.filter((t) => t.parentBoundary === e);
963
+ }, "getC4ShapeArray"), n0 = /* @__PURE__ */ g(function(e) {
964
+ return V.find((t) => t.alias === e);
965
+ }, "getC4Shape"), r0 = /* @__PURE__ */ g(function(e) {
966
+ return Object.keys(_e(e));
967
+ }, "getC4ShapeKeys"), xe = /* @__PURE__ */ g(function(e) {
968
+ return e == null ? X : X.filter((t) => t.parentBoundary === e);
969
+ }, "getBoundaries"), s0 = xe, l0 = /* @__PURE__ */ g(function() {
970
+ return It;
971
+ }, "getRels"), o0 = /* @__PURE__ */ g(function() {
972
+ return ie;
973
+ }, "getTitle"), c0 = /* @__PURE__ */ g(function(e) {
974
+ ne = e;
975
+ }, "setWrap"), mt = /* @__PURE__ */ g(function() {
976
+ return ne;
977
+ }, "autoWrap"), h0 = /* @__PURE__ */ g(function() {
978
+ V = [], X = [
979
+ {
980
+ alias: "global",
981
+ label: { text: "global" },
982
+ type: { text: "global" },
983
+ tags: null,
984
+ link: null,
985
+ parentBoundary: ""
986
+ }
987
+ ], F = "", B = "global", xt = [""], It = [], xt = [""], ie = "", ne = !1, Vt = 4, zt = 2;
988
+ }, "clear"), u0 = {
989
+ SOLID: 0,
990
+ DOTTED: 1,
991
+ NOTE: 2,
992
+ SOLID_CROSS: 3,
993
+ DOTTED_CROSS: 4,
994
+ SOLID_OPEN: 5,
995
+ DOTTED_OPEN: 6,
996
+ LOOP_START: 10,
997
+ LOOP_END: 11,
998
+ ALT_START: 12,
999
+ ALT_ELSE: 13,
1000
+ ALT_END: 14,
1001
+ OPT_START: 15,
1002
+ OPT_END: 16,
1003
+ ACTIVE_START: 17,
1004
+ ACTIVE_END: 18,
1005
+ PAR_START: 19,
1006
+ PAR_AND: 20,
1007
+ PAR_END: 21,
1008
+ RECT_START: 22,
1009
+ RECT_END: 23,
1010
+ SOLID_POINT: 24,
1011
+ DOTTED_POINT: 25
1012
+ }, d0 = {
1013
+ FILLED: 0,
1014
+ OPEN: 1
1015
+ }, f0 = {
1016
+ LEFTOF: 0,
1017
+ RIGHTOF: 1,
1018
+ OVER: 2
1019
+ }, p0 = /* @__PURE__ */ g(function(e) {
1020
+ ie = ge(e, Bt());
1021
+ }, "setTitle"), te = {
1022
+ addPersonOrSystem: Xe,
1023
+ addPersonOrSystemBoundary: He,
1024
+ addContainer: We,
1025
+ addContainerBoundary: qe,
1026
+ addComponent: Qe,
1027
+ addDeploymentNode: Ge,
1028
+ popBoundaryParseStack: Ke,
1029
+ addRel: ze,
1030
+ updateElStyle: Je,
1031
+ updateRelStyle: Ze,
1032
+ updateLayoutConfig: $e,
1033
+ autoWrap: mt,
1034
+ setWrap: c0,
1035
+ getC4ShapeArray: _e,
1036
+ getC4Shape: n0,
1037
+ getC4ShapeKeys: r0,
1038
+ getBoundaries: xe,
1039
+ getBoundarys: s0,
1040
+ getCurrentBoundaryParse: a0,
1041
+ getParentBoundaryParse: i0,
1042
+ getRels: l0,
1043
+ getTitle: o0,
1044
+ getC4Type: Fe,
1045
+ getC4ShapeInRow: t0,
1046
+ getC4BoundaryInRow: e0,
1047
+ setAccTitle: Me,
1048
+ getAccTitle: Ie,
1049
+ getAccDescription: Be,
1050
+ setAccDescription: Pe,
1051
+ getConfig: /* @__PURE__ */ g(() => Bt().c4, "getConfig"),
1052
+ clear: h0,
1053
+ LINETYPE: u0,
1054
+ ARROWTYPE: d0,
1055
+ PLACEMENT: f0,
1056
+ setTitle: p0,
1057
+ setC4Type: Ve
1058
+ // apply,
1059
+ }, re = /* @__PURE__ */ g(function(e, t) {
1060
+ return De(e, t);
1061
+ }, "drawRect"), me = /* @__PURE__ */ g(function(e, t, s, o, l, a) {
1062
+ const r = e.append("image");
1063
+ r.attr("width", t), r.attr("height", s), r.attr("x", o), r.attr("y", l);
1064
+ let n = a.startsWith("data:image/png;base64") ? a : Ye(a);
1065
+ r.attr("xlink:href", n);
1066
+ }, "drawImage"), y0 = /* @__PURE__ */ g((e, t, s) => {
1067
+ const o = e.append("g");
1068
+ let l = 0;
1069
+ for (let a of t) {
1070
+ let r = a.textColor ? a.textColor : "#444444", n = a.lineColor ? a.lineColor : "#444444", i = a.offsetX ? parseInt(a.offsetX) : 0, u = a.offsetY ? parseInt(a.offsetY) : 0, d = "";
1071
+ if (l === 0) {
1072
+ let y = o.append("line");
1073
+ y.attr("x1", a.startPoint.x), y.attr("y1", a.startPoint.y), y.attr("x2", a.endPoint.x), y.attr("y2", a.endPoint.y), y.attr("stroke-width", "1"), y.attr("stroke", n), y.style("fill", "none"), a.type !== "rel_b" && y.attr("marker-end", "url(" + d + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && y.attr("marker-start", "url(" + d + "#arrowend)"), l = -1;
1074
+ } else {
1075
+ let y = o.append("path");
1076
+ y.attr("fill", "none").attr("stroke-width", "1").attr("stroke", n).attr(
1077
+ "d",
1078
+ "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", a.startPoint.x).replaceAll("starty", a.startPoint.y).replaceAll(
1079
+ "controlx",
1080
+ a.startPoint.x + (a.endPoint.x - a.startPoint.x) / 2 - (a.endPoint.x - a.startPoint.x) / 4
1081
+ ).replaceAll("controly", a.startPoint.y + (a.endPoint.y - a.startPoint.y) / 2).replaceAll("stopx", a.endPoint.x).replaceAll("stopy", a.endPoint.y)
1082
+ ), a.type !== "rel_b" && y.attr("marker-end", "url(" + d + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && y.attr("marker-start", "url(" + d + "#arrowend)");
1083
+ }
1084
+ let f = s.messageFont();
1085
+ Q(s)(
1086
+ a.label.text,
1087
+ o,
1088
+ Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + i,
1089
+ Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + u,
1090
+ a.label.width,
1091
+ a.label.height,
1092
+ { fill: r },
1093
+ f
1094
+ ), a.techn && a.techn.text !== "" && (f = s.messageFont(), Q(s)(
1095
+ "[" + a.techn.text + "]",
1096
+ o,
1097
+ Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + i,
1098
+ Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + s.messageFontSize + 5 + u,
1099
+ Math.max(a.label.width, a.techn.width),
1100
+ a.techn.height,
1101
+ { fill: r, "font-style": "italic" },
1102
+ f
1103
+ ));
1104
+ }
1105
+ }, "drawRels"), g0 = /* @__PURE__ */ g(function(e, t, s) {
1106
+ const o = e.append("g");
1107
+ let l = t.bgColor ? t.bgColor : "none", a = t.borderColor ? t.borderColor : "#444444", r = t.fontColor ? t.fontColor : "black", n = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
1108
+ t.nodeType && (n = { "stroke-width": 1 });
1109
+ let i = {
1110
+ x: t.x,
1111
+ y: t.y,
1112
+ fill: l,
1113
+ stroke: a,
1114
+ width: t.width,
1115
+ height: t.height,
1116
+ rx: 2.5,
1117
+ ry: 2.5,
1118
+ attrs: n
1119
+ };
1120
+ re(o, i);
1121
+ let u = s.boundaryFont();
1122
+ u.fontWeight = "bold", u.fontSize = u.fontSize + 2, u.fontColor = r, Q(s)(
1123
+ t.label.text,
1124
+ o,
1125
+ t.x,
1126
+ t.y + t.label.Y,
1127
+ t.width,
1128
+ t.height,
1129
+ { fill: "#444444" },
1130
+ u
1131
+ ), t.type && t.type.text !== "" && (u = s.boundaryFont(), u.fontColor = r, Q(s)(
1132
+ t.type.text,
1133
+ o,
1134
+ t.x,
1135
+ t.y + t.type.Y,
1136
+ t.width,
1137
+ t.height,
1138
+ { fill: "#444444" },
1139
+ u
1140
+ )), t.descr && t.descr.text !== "" && (u = s.boundaryFont(), u.fontSize = u.fontSize - 2, u.fontColor = r, Q(s)(
1141
+ t.descr.text,
1142
+ o,
1143
+ t.x,
1144
+ t.y + t.descr.Y,
1145
+ t.width,
1146
+ t.height,
1147
+ { fill: "#444444" },
1148
+ u
1149
+ ));
1150
+ }, "drawBoundary"), b0 = /* @__PURE__ */ g(function(e, t, s) {
1151
+ var f;
1152
+ let o = t.bgColor ? t.bgColor : s[t.typeC4Shape.text + "_bg_color"], l = t.borderColor ? t.borderColor : s[t.typeC4Shape.text + "_border_color"], a = t.fontColor ? t.fontColor : "#FFFFFF", r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1153
+ switch (t.typeC4Shape.text) {
1154
+ case "person":
1155
+ r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1156
+ break;
1157
+ case "external_person":
1158
+ r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
1159
+ break;
1160
+ }
1161
+ const n = e.append("g");
1162
+ n.attr("class", "person-man");
1163
+ const i = Se();
1164
+ switch (t.typeC4Shape.text) {
1165
+ case "person":
1166
+ case "external_person":
1167
+ case "system":
1168
+ case "external_system":
1169
+ case "container":
1170
+ case "external_container":
1171
+ case "component":
1172
+ case "external_component":
1173
+ i.x = t.x, i.y = t.y, i.fill = o, i.width = t.width, i.height = t.height, i.stroke = l, i.rx = 2.5, i.ry = 2.5, i.attrs = { "stroke-width": 0.5 }, re(n, i);
1174
+ break;
1175
+ case "system_db":
1176
+ case "external_system_db":
1177
+ case "container_db":
1178
+ case "external_container_db":
1179
+ case "component_db":
1180
+ case "external_component_db":
1181
+ n.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr(
1182
+ "d",
1183
+ "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", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2).replaceAll("height", t.height)
1184
+ ), n.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr(
1185
+ "d",
1186
+ "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2)
1187
+ );
1188
+ break;
1189
+ case "system_queue":
1190
+ case "external_system_queue":
1191
+ case "container_queue":
1192
+ case "external_container_queue":
1193
+ case "component_queue":
1194
+ case "external_component_queue":
1195
+ n.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr(
1196
+ "d",
1197
+ "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", t.x).replaceAll("starty", t.y).replaceAll("width", t.width).replaceAll("half", t.height / 2)
1198
+ ), n.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr(
1199
+ "d",
1200
+ "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", t.x + t.width).replaceAll("starty", t.y).replaceAll("half", t.height / 2)
1201
+ );
1202
+ break;
1203
+ }
1204
+ let u = w0(s, t.typeC4Shape.text);
1205
+ switch (n.append("text").attr("fill", a).attr("font-family", u.fontFamily).attr("font-size", u.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", t.typeC4Shape.width).attr("x", t.x + t.width / 2 - t.typeC4Shape.width / 2).attr("y", t.y + t.typeC4Shape.Y).text("<<" + t.typeC4Shape.text + ">>"), t.typeC4Shape.text) {
1206
+ case "person":
1207
+ case "external_person":
1208
+ me(
1209
+ n,
1210
+ 48,
1211
+ 48,
1212
+ t.x + t.width / 2 - 24,
1213
+ t.y + t.image.Y,
1214
+ r
1215
+ );
1216
+ break;
1217
+ }
1218
+ let d = s[t.typeC4Shape.text + "Font"]();
1219
+ return d.fontWeight = "bold", d.fontSize = d.fontSize + 2, d.fontColor = a, Q(s)(
1220
+ t.label.text,
1221
+ n,
1222
+ t.x,
1223
+ t.y + t.label.Y,
1224
+ t.width,
1225
+ t.height,
1226
+ { fill: a },
1227
+ d
1228
+ ), d = s[t.typeC4Shape.text + "Font"](), d.fontColor = a, t.techn && ((f = t.techn) == null ? void 0 : f.text) !== "" ? Q(s)(
1229
+ t.techn.text,
1230
+ n,
1231
+ t.x,
1232
+ t.y + t.techn.Y,
1233
+ t.width,
1234
+ t.height,
1235
+ { fill: a, "font-style": "italic" },
1236
+ d
1237
+ ) : t.type && t.type.text !== "" && Q(s)(
1238
+ t.type.text,
1239
+ n,
1240
+ t.x,
1241
+ t.y + t.type.Y,
1242
+ t.width,
1243
+ t.height,
1244
+ { fill: a, "font-style": "italic" },
1245
+ d
1246
+ ), t.descr && t.descr.text !== "" && (d = s.personFont(), d.fontColor = a, Q(s)(
1247
+ t.descr.text,
1248
+ n,
1249
+ t.x,
1250
+ t.y + t.descr.Y,
1251
+ t.width,
1252
+ t.height,
1253
+ { fill: a },
1254
+ d
1255
+ )), t.height;
1256
+ }, "drawC4Shape"), _0 = /* @__PURE__ */ g(function(e) {
1257
+ e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1258
+ "d",
1259
+ "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"
1260
+ );
1261
+ }, "insertDatabaseIcon"), x0 = /* @__PURE__ */ g(function(e) {
1262
+ e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1263
+ "d",
1264
+ "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"
1265
+ );
1266
+ }, "insertComputerIcon"), m0 = /* @__PURE__ */ g(function(e) {
1267
+ e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1268
+ "d",
1269
+ "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"
1270
+ );
1271
+ }, "insertClockIcon"), v0 = /* @__PURE__ */ g(function(e) {
1272
+ e.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");
1273
+ }, "insertArrowHead"), E0 = /* @__PURE__ */ g(function(e) {
1274
+ e.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");
1275
+ }, "insertArrowEnd"), k0 = /* @__PURE__ */ g(function(e) {
1276
+ e.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");
1277
+ }, "insertArrowFilledHead"), A0 = /* @__PURE__ */ g(function(e) {
1278
+ e.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);
1279
+ }, "insertDynamicNumber"), C0 = /* @__PURE__ */ g(function(e) {
1280
+ const s = e.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
1281
+ s.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"), s.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");
1282
+ }, "insertArrowCrossHead"), w0 = /* @__PURE__ */ g((e, t) => ({
1283
+ fontFamily: e[t + "FontFamily"],
1284
+ fontSize: e[t + "FontSize"],
1285
+ fontWeight: e[t + "FontWeight"]
1286
+ }), "getC4ShapeFont"), Q = /* @__PURE__ */ function() {
1287
+ function e(l, a, r, n, i, u, d) {
1288
+ const f = a.append("text").attr("x", r + i / 2).attr("y", n + u / 2 + 5).style("text-anchor", "middle").text(l);
1289
+ o(f, d);
1290
+ }
1291
+ g(e, "byText");
1292
+ function t(l, a, r, n, i, u, d, f) {
1293
+ const { fontSize: y, fontFamily: E, fontWeight: O } = f, S = l.split($t.lineBreakRegex);
1294
+ for (let P = 0; P < S.length; P++) {
1295
+ const M = P * y - y * (S.length - 1) / 2, U = a.append("text").attr("x", r + i / 2).attr("y", n).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", y).style("font-weight", O).style("font-family", E);
1296
+ U.append("tspan").attr("dy", M).text(S[P]).attr("alignment-baseline", "mathematical"), o(U, d);
1297
+ }
1298
+ }
1299
+ g(t, "byTspan");
1300
+ function s(l, a, r, n, i, u, d, f) {
1301
+ const y = a.append("switch"), O = y.append("foreignObject").attr("x", r).attr("y", n).attr("width", i).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1302
+ O.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(l), t(l, y, r, n, i, u, d, f), o(O, d);
1303
+ }
1304
+ g(s, "byFo");
1305
+ function o(l, a) {
1306
+ for (const r in a)
1307
+ a.hasOwnProperty(r) && l.attr(r, a[r]);
1308
+ }
1309
+ return g(o, "_setTextAttrs"), function(l) {
1310
+ return l.textPlacement === "fo" ? s : l.textPlacement === "old" ? e : t;
1311
+ };
1312
+ }(), z = {
1313
+ drawRect: re,
1314
+ drawBoundary: g0,
1315
+ drawC4Shape: b0,
1316
+ drawRels: y0,
1317
+ drawImage: me,
1318
+ insertArrowHead: v0,
1319
+ insertArrowEnd: E0,
1320
+ insertArrowFilledHead: k0,
1321
+ insertDynamicNumber: A0,
1322
+ insertArrowCrossHead: C0,
1323
+ insertDatabaseIcon: _0,
1324
+ insertComputerIcon: x0,
1325
+ insertClockIcon: m0
1326
+ }, Xt = 0, Wt = 0, ve = 4, ee = 2;
1327
+ Ft.yy = te;
1328
+ var _ = {}, Ot, Ee = (Ot = class {
1329
+ constructor(t) {
1330
+ this.name = "", this.data = {}, this.data.startx = void 0, this.data.stopx = void 0, this.data.starty = void 0, this.data.stopy = void 0, this.data.widthLimit = void 0, this.nextData = {}, this.nextData.startx = void 0, this.nextData.stopx = void 0, this.nextData.starty = void 0, this.nextData.stopy = void 0, this.nextData.cnt = 0, ae(t.db.getConfig());
1331
+ }
1332
+ setData(t, s, o, l) {
1333
+ this.nextData.startx = this.data.startx = t, this.nextData.stopx = this.data.stopx = s, this.nextData.starty = this.data.starty = o, this.nextData.stopy = this.data.stopy = l;
1334
+ }
1335
+ updateVal(t, s, o, l) {
1336
+ t[s] === void 0 ? t[s] = o : t[s] = l(o, t[s]);
1337
+ }
1338
+ insert(t) {
1339
+ this.nextData.cnt = this.nextData.cnt + 1;
1340
+ let s = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + t.margin : this.nextData.stopx + t.margin * 2, o = s + t.width, l = this.nextData.starty + t.margin * 2, a = l + t.height;
1341
+ (s >= this.data.widthLimit || o >= this.data.widthLimit || this.nextData.cnt > ve) && (s = this.nextData.startx + t.margin + _.nextLinePaddingX, l = this.nextData.stopy + t.margin * 2, this.nextData.stopx = o = s + t.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = a = l + t.height, this.nextData.cnt = 1), t.x = s, t.y = l, this.updateVal(this.data, "startx", s, Math.min), this.updateVal(this.data, "starty", l, Math.min), this.updateVal(this.data, "stopx", o, Math.max), this.updateVal(this.data, "stopy", a, Math.max), this.updateVal(this.nextData, "startx", s, Math.min), this.updateVal(this.nextData, "starty", l, Math.min), this.updateVal(this.nextData, "stopx", o, Math.max), this.updateVal(this.nextData, "stopy", a, Math.max);
1342
+ }
1343
+ init(t) {
1344
+ this.name = "", this.data = {
1345
+ startx: void 0,
1346
+ stopx: void 0,
1347
+ starty: void 0,
1348
+ stopy: void 0,
1349
+ widthLimit: void 0
1350
+ }, this.nextData = {
1351
+ startx: void 0,
1352
+ stopx: void 0,
1353
+ starty: void 0,
1354
+ stopy: void 0,
1355
+ cnt: 0
1356
+ }, ae(t.db.getConfig());
1357
+ }
1358
+ bumpLastMargin(t) {
1359
+ this.data.stopx += t, this.data.stopy += t;
1360
+ }
1361
+ }, g(Ot, "Bounds"), Ot), ae = /* @__PURE__ */ g(function(e) {
1362
+ Ne(_, e), e.fontFamily && (_.personFontFamily = _.systemFontFamily = _.messageFontFamily = e.fontFamily), e.fontSize && (_.personFontSize = _.systemFontSize = _.messageFontSize = e.fontSize), e.fontWeight && (_.personFontWeight = _.systemFontWeight = _.messageFontWeight = e.fontWeight);
1363
+ }, "setConf"), Pt = /* @__PURE__ */ g((e, t) => ({
1364
+ fontFamily: e[t + "FontFamily"],
1365
+ fontSize: e[t + "FontSize"],
1366
+ fontWeight: e[t + "FontWeight"]
1367
+ }), "c4ShapeFont"), Ut = /* @__PURE__ */ g((e) => ({
1368
+ fontFamily: e.boundaryFontFamily,
1369
+ fontSize: e.boundaryFontSize,
1370
+ fontWeight: e.boundaryFontWeight
1371
+ }), "boundaryFont"), T0 = /* @__PURE__ */ g((e) => ({
1372
+ fontFamily: e.messageFontFamily,
1373
+ fontSize: e.messageFontSize,
1374
+ fontWeight: e.messageFontWeight
1375
+ }), "messageFont");
1376
+ function j(e, t, s, o, l) {
1377
+ if (!t[e].width)
1378
+ if (s)
1379
+ t[e].text = je(t[e].text, l, o), t[e].textLines = t[e].text.split($t.lineBreakRegex).length, t[e].width = l, t[e].height = fe(t[e].text, o);
1380
+ else {
1381
+ let a = t[e].text.split($t.lineBreakRegex);
1382
+ t[e].textLines = a.length;
1383
+ let r = 0;
1384
+ t[e].height = 0, t[e].width = 0;
1385
+ for (const n of a)
1386
+ t[e].width = Math.max(
1387
+ Tt(n, o),
1388
+ t[e].width
1389
+ ), r = fe(n, o), t[e].height = t[e].height + r;
1390
+ }
1391
+ }
1392
+ g(j, "calcC4ShapeTextWH");
1393
+ var ke = /* @__PURE__ */ g(function(e, t, s) {
1394
+ t.x = s.data.startx, t.y = s.data.starty, t.width = s.data.stopx - s.data.startx, t.height = s.data.stopy - s.data.starty, t.label.y = _.c4ShapeMargin - 35;
1395
+ let o = t.wrap && _.wrap, l = Ut(_);
1396
+ l.fontSize = l.fontSize + 2, l.fontWeight = "bold";
1397
+ let a = Tt(t.label.text, l);
1398
+ j("label", t, o, l, a), z.drawBoundary(e, t, _);
1399
+ }, "drawBoundary"), Ae = /* @__PURE__ */ g(function(e, t, s, o) {
1400
+ let l = 0;
1401
+ for (const a of o) {
1402
+ l = 0;
1403
+ const r = s[a];
1404
+ let n = Pt(_, r.typeC4Shape.text);
1405
+ switch (n.fontSize = n.fontSize - 2, r.typeC4Shape.width = Tt(
1406
+ "«" + r.typeC4Shape.text + "»",
1407
+ n
1408
+ ), r.typeC4Shape.height = n.fontSize + 2, r.typeC4Shape.Y = _.c4ShapePadding, l = r.typeC4Shape.Y + r.typeC4Shape.height - 4, r.image = { width: 0, height: 0, Y: 0 }, r.typeC4Shape.text) {
1409
+ case "person":
1410
+ case "external_person":
1411
+ r.image.width = 48, r.image.height = 48, r.image.Y = l, l = r.image.Y + r.image.height;
1412
+ break;
1413
+ }
1414
+ r.sprite && (r.image.width = 48, r.image.height = 48, r.image.Y = l, l = r.image.Y + r.image.height);
1415
+ let i = r.wrap && _.wrap, u = _.width - _.c4ShapePadding * 2, d = Pt(_, r.typeC4Shape.text);
1416
+ if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", j("label", r, i, d, u), r.label.Y = l + 8, l = r.label.Y + r.label.height, r.type && r.type.text !== "") {
1417
+ r.type.text = "[" + r.type.text + "]";
1418
+ let E = Pt(_, r.typeC4Shape.text);
1419
+ j("type", r, i, E, u), r.type.Y = l + 5, l = r.type.Y + r.type.height;
1420
+ } else if (r.techn && r.techn.text !== "") {
1421
+ r.techn.text = "[" + r.techn.text + "]";
1422
+ let E = Pt(_, r.techn.text);
1423
+ j("techn", r, i, E, u), r.techn.Y = l + 5, l = r.techn.Y + r.techn.height;
1424
+ }
1425
+ let f = l, y = r.label.width;
1426
+ if (r.descr && r.descr.text !== "") {
1427
+ let E = Pt(_, r.typeC4Shape.text);
1428
+ j("descr", r, i, E, u), r.descr.Y = l + 20, l = r.descr.Y + r.descr.height, y = Math.max(r.label.width, r.descr.width), f = l - r.descr.textLines * 5;
1429
+ }
1430
+ y = y + _.c4ShapePadding, r.width = Math.max(r.width || _.width, y, _.width), r.height = Math.max(r.height || _.height, f, _.height), r.margin = r.margin || _.c4ShapeMargin, e.insert(r), z.drawC4Shape(t, r, _);
1431
+ }
1432
+ e.bumpLastMargin(_.c4ShapeMargin);
1433
+ }, "drawC4ShapeArray"), Rt, Y = (Rt = class {
1434
+ constructor(t, s) {
1435
+ this.x = t, this.y = s;
1436
+ }
1437
+ }, g(Rt, "Point"), Rt), pe = /* @__PURE__ */ g(function(e, t) {
1438
+ let s = e.x, o = e.y, l = t.x, a = t.y, r = s + e.width / 2, n = o + e.height / 2, i = Math.abs(s - l), u = Math.abs(o - a), d = u / i, f = e.height / e.width, y = null;
1439
+ return o == a && s < l ? y = new Y(s + e.width, n) : o == a && s > l ? y = new Y(s, n) : s == l && o < a ? y = new Y(r, o + e.height) : s == l && o > a && (y = new Y(r, o)), s > l && o < a ? f >= d ? y = new Y(s, n + d * e.width / 2) : y = new Y(
1440
+ r - i / u * e.height / 2,
1441
+ o + e.height
1442
+ ) : s < l && o < a ? f >= d ? y = new Y(s + e.width, n + d * e.width / 2) : y = new Y(
1443
+ r + i / u * e.height / 2,
1444
+ o + e.height
1445
+ ) : s < l && o > a ? f >= d ? y = new Y(s + e.width, n - d * e.width / 2) : y = new Y(r + e.height / 2 * i / u, o) : s > l && o > a && (f >= d ? y = new Y(s, n - e.width / 2 * d) : y = new Y(r - e.height / 2 * i / u, o)), y;
1446
+ }, "getIntersectPoint"), O0 = /* @__PURE__ */ g(function(e, t) {
1447
+ let s = { x: 0, y: 0 };
1448
+ s.x = t.x + t.width / 2, s.y = t.y + t.height / 2;
1449
+ let o = pe(e, s);
1450
+ s.x = e.x + e.width / 2, s.y = e.y + e.height / 2;
1451
+ let l = pe(t, s);
1452
+ return { startPoint: o, endPoint: l };
1453
+ }, "getIntersectPoints"), R0 = /* @__PURE__ */ g(function(e, t, s, o) {
1454
+ let l = 0;
1455
+ for (let a of t) {
1456
+ l = l + 1;
1457
+ let r = a.wrap && _.wrap, n = T0(_);
1458
+ o.db.getC4Type() === "C4Dynamic" && (a.label.text = l + ": " + a.label.text);
1459
+ let u = Tt(a.label.text, n);
1460
+ j("label", a, r, n, u), a.techn && a.techn.text !== "" && (u = Tt(a.techn.text, n), j("techn", a, r, n, u)), a.descr && a.descr.text !== "" && (u = Tt(a.descr.text, n), j("descr", a, r, n, u));
1461
+ let d = s(a.from), f = s(a.to), y = O0(d, f);
1462
+ a.startPoint = y.startPoint, a.endPoint = y.endPoint;
1463
+ }
1464
+ z.drawRels(e, t, _);
1465
+ }, "drawRels");
1466
+ function se(e, t, s, o, l) {
1467
+ let a = new Ee(l);
1468
+ a.data.widthLimit = s.data.widthLimit / Math.min(ee, o.length);
1469
+ for (let [r, n] of o.entries()) {
1470
+ let i = 0;
1471
+ n.image = { width: 0, height: 0, Y: 0 }, n.sprite && (n.image.width = 48, n.image.height = 48, n.image.Y = i, i = n.image.Y + n.image.height);
1472
+ let u = n.wrap && _.wrap, d = Ut(_);
1473
+ if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", j(
1474
+ "label",
1475
+ n,
1476
+ u,
1477
+ d,
1478
+ a.data.widthLimit
1479
+ ), n.label.Y = i + 8, i = n.label.Y + n.label.height, n.type && n.type.text !== "") {
1480
+ n.type.text = "[" + n.type.text + "]";
1481
+ let O = Ut(_);
1482
+ j(
1483
+ "type",
1484
+ n,
1485
+ u,
1486
+ O,
1487
+ a.data.widthLimit
1488
+ ), n.type.Y = i + 5, i = n.type.Y + n.type.height;
1489
+ }
1490
+ if (n.descr && n.descr.text !== "") {
1491
+ let O = Ut(_);
1492
+ O.fontSize = O.fontSize - 2, j(
1493
+ "descr",
1494
+ n,
1495
+ u,
1496
+ O,
1497
+ a.data.widthLimit
1498
+ ), n.descr.Y = i + 20, i = n.descr.Y + n.descr.height;
1499
+ }
1500
+ if (r == 0 || r % ee === 0) {
1501
+ let O = s.data.startx + _.diagramMarginX, S = s.data.stopy + _.diagramMarginY + i;
1502
+ a.setData(O, O, S, S);
1503
+ } else {
1504
+ let O = a.data.stopx !== a.data.startx ? a.data.stopx + _.diagramMarginX : a.data.startx, S = a.data.starty;
1505
+ a.setData(O, O, S, S);
1506
+ }
1507
+ a.name = n.alias;
1508
+ let f = l.db.getC4ShapeArray(n.alias), y = l.db.getC4ShapeKeys(n.alias);
1509
+ y.length > 0 && Ae(
1510
+ a,
1511
+ e,
1512
+ f,
1513
+ y
1514
+ ), t = n.alias;
1515
+ let E = l.db.getBoundaries(t);
1516
+ E.length > 0 && se(
1517
+ e,
1518
+ t,
1519
+ a,
1520
+ E,
1521
+ l
1522
+ ), n.alias !== "global" && ke(e, n, a), s.data.stopy = Math.max(
1523
+ a.data.stopy + _.c4ShapeMargin,
1524
+ s.data.stopy
1525
+ ), s.data.stopx = Math.max(
1526
+ a.data.stopx + _.c4ShapeMargin,
1527
+ s.data.stopx
1528
+ ), Xt = Math.max(Xt, s.data.stopx), Wt = Math.max(Wt, s.data.stopy);
1529
+ }
1530
+ }
1531
+ g(se, "drawInsideBoundary");
1532
+ var S0 = /* @__PURE__ */ g(function(e, t, s, o) {
1533
+ _ = Bt().c4;
1534
+ const l = Bt().securityLevel;
1535
+ let a;
1536
+ l === "sandbox" && (a = jt("#i" + t));
1537
+ const r = l === "sandbox" ? jt(a.nodes()[0].contentDocument.body) : jt("body");
1538
+ let n = o.db;
1539
+ o.db.setWrap(_.wrap), ve = n.getC4ShapeInRow(), ee = n.getC4BoundaryInRow(), de.debug(`C:${JSON.stringify(_, null, 2)}`);
1540
+ const i = l === "sandbox" ? r.select(`[id="${t}"]`) : jt(`[id="${t}"]`);
1541
+ z.insertComputerIcon(i), z.insertDatabaseIcon(i), z.insertClockIcon(i);
1542
+ let u = new Ee(o);
1543
+ u.setData(
1544
+ _.diagramMarginX,
1545
+ _.diagramMarginX,
1546
+ _.diagramMarginY,
1547
+ _.diagramMarginY
1548
+ ), u.data.widthLimit = screen.availWidth, Xt = _.diagramMarginX, Wt = _.diagramMarginY;
1549
+ const d = o.db.getTitle();
1550
+ let f = o.db.getBoundaries("");
1551
+ se(i, "", u, f, o), z.insertArrowHead(i), z.insertArrowEnd(i), z.insertArrowCrossHead(i), z.insertArrowFilledHead(i), R0(i, o.db.getRels(), o.db.getC4Shape, o), u.data.stopx = Xt, u.data.stopy = Wt;
1552
+ const y = u.data;
1553
+ let O = y.stopy - y.starty + 2 * _.diagramMarginY;
1554
+ const P = y.stopx - y.startx + 2 * _.diagramMarginX;
1555
+ d && i.append("text").text(d).attr("x", (y.stopx - y.startx) / 2 - 4 * _.diagramMarginX).attr("y", y.starty + _.diagramMarginY), Le(i, O, P, _.useMaxWidth);
1556
+ const M = d ? 60 : 0;
1557
+ i.attr(
1558
+ "viewBox",
1559
+ y.startx - _.diagramMarginX + " -" + (_.diagramMarginY + M) + " " + P + " " + (O + M)
1560
+ ), de.debug("models:", y);
1561
+ }, "draw"), ye = {
1562
+ drawPersonOrSystemArray: Ae,
1563
+ drawBoundary: ke,
1564
+ setConf: ae,
1565
+ draw: S0
1566
+ }, D0 = /* @__PURE__ */ g((e) => `.person {
1567
+ stroke: ${e.personBorder};
1568
+ fill: ${e.personBkg};
1569
+ }
1570
+ `, "getStyles"), P0 = D0, M0 = {
1571
+ parser: Ue,
1572
+ db: te,
1573
+ renderer: ye,
1574
+ styles: P0,
1575
+ init: /* @__PURE__ */ g(({ c4: e, wrap: t }) => {
1576
+ ye.setConf(e), te.setWrap(t);
1577
+ }, "init")
1578
+ };
1579
+ export {
1580
+ M0 as diagram
1581
+ };