@draftably/editor 0.1.0 → 0.3.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 (104) hide show
  1. package/README.md +4 -5
  2. package/dist/assets/engine.worker-BY9GKt7x.js +7505 -0
  3. package/dist/element.js +1 -1
  4. package/dist/index.js +20202 -2
  5. package/dist/types/src/cli/raster-fonts.d.ts +3 -0
  6. package/dist/types/src/components/controls.d.ts +8 -5
  7. package/dist/types/src/dsl/compile.d.ts +13 -0
  8. package/dist/types/src/dsl/corridors.d.ts +38 -0
  9. package/dist/types/src/model/types.d.ts +9 -0
  10. package/dist/types/src/state/canvas-commands.d.ts +169 -0
  11. package/dist/types/src/state/canvas-keyboard.d.ts +15 -0
  12. package/dist/types/src/state/links.d.ts +4 -1
  13. package/dist/types/src/state/workspace.d.ts +3 -0
  14. package/package.json +1 -1
  15. package/dist/assets/engine.worker-DmHew5f6.js +0 -6813
  16. package/dist/assets/import-d2.worker-CnXfFXoa.js +0 -5395
  17. package/dist/chunks/abnfDiagram-WEYOIA3C-llcpthp5.js +0 -87
  18. package/dist/chunks/arc-rJj0TtXf.js +0 -83
  19. package/dist/chunks/architectureDiagram-ZHVYKT53-CfiXg0Lk.js +0 -4781
  20. package/dist/chunks/blockDiagram-RJAE7QA3-CO-14jWz.js +0 -1440
  21. package/dist/chunks/browser-iNhbPsGc.js +0 -40
  22. package/dist/chunks/c4Diagram-XDPPPE54-DYKuxA4n.js +0 -1524
  23. package/dist/chunks/channel-qMvPU6eH.js +0 -5
  24. package/dist/chunks/chunk-2E7WHVMD-BEZwsFS3.js +0 -670
  25. package/dist/chunks/chunk-2Q5K7J3B-gqtzQ8ux.js +0 -18
  26. package/dist/chunks/chunk-4EMNKR2T-MC54CXVe.js +0 -262
  27. package/dist/chunks/chunk-55XCU76K-DkZUAaqC.js +0 -68
  28. package/dist/chunks/chunk-5VM5RSS4-CaKe4sjM.js +0 -19
  29. package/dist/chunks/chunk-JWPE2WC7-CnAFS2xF.js +0 -8
  30. package/dist/chunks/chunk-VQ5W62QI-CXRv7FiX.js +0 -19
  31. package/dist/chunks/chunk-XXDRQBXY-B-AMQgD2.js +0 -8
  32. package/dist/chunks/chunk-ZCHMQSOR-BALpdc3g.js +0 -451
  33. package/dist/chunks/classDiagram-v2-4MYWR3UA-wPjgJTg4.js +0 -1570
  34. package/dist/chunks/cose-bilkent-JH36ORCC-Bbh5ggBc.js +0 -2608
  35. package/dist/chunks/cynefin-EF2NZ3EQ-Bt6b88hY.js +0 -22361
  36. package/dist/chunks/cynefinDiagram-WF24UDRP-BHWZvxoF.js +0 -299
  37. package/dist/chunks/cytoscape.esm-CRsF_JA3.js +0 -18791
  38. package/dist/chunks/dagre-NK4GIZVX-Cz37yPrT.js +0 -2157
  39. package/dist/chunks/defaultLocale-BgPVtth8.js +0 -171
  40. package/dist/chunks/diagram-CBK3MWTC-Q2R6FJ0B.js +0 -531
  41. package/dist/chunks/diagram-I5XIIV2D-a2Kdu_wA.js +0 -153
  42. package/dist/chunks/diagram-ODIL2UCW-DTWXxcOn.js +0 -346
  43. package/dist/chunks/diagram-PFBEJUXE-DIAQQ5KX.js +0 -480
  44. package/dist/chunks/diagram-RJA3I4VV-BPD0GghS.js +0 -219
  45. package/dist/chunks/diagram-TYUNFSNR-BmdkONfG.js +0 -2586
  46. package/dist/chunks/dot-importer-B23jwEkx.js +0 -1547
  47. package/dist/chunks/ebnfDiagram-V4P3TTPT-C5IKvYlb.js +0 -109
  48. package/dist/chunks/elk-QONTBCTQ-CtdQFvh2.js +0 -49229
  49. package/dist/chunks/erDiagram-KYQIGQAA-5wguK9Dx.js +0 -1064
  50. package/dist/chunks/flowDiagram-IUGLLWBU-BijvFPku.js +0 -1771
  51. package/dist/chunks/ganttDiagram-R7GPNTJY-BaqGPz-O.js +0 -2729
  52. package/dist/chunks/gitGraphDiagram-PDYL7XHY-DZfMGyHE.js +0 -815
  53. package/dist/chunks/graph-CKJmgLki.js +0 -1541
  54. package/dist/chunks/import-core-C-I1wGfw.js +0 -145
  55. package/dist/chunks/infoDiagram-MVDRKAX5-C2vH_59e.js +0 -24
  56. package/dist/chunks/init-DjUOC4st.js +0 -16
  57. package/dist/chunks/ishikawaDiagram-HPEHV2GE-q149MFlV.js +0 -624
  58. package/dist/chunks/journeyDiagram-BOSHW7O7-D-2Z3VtR.js +0 -834
  59. package/dist/chunks/kanban-definition-FNSA4HC5-wvAjV5ub.js +0 -724
  60. package/dist/chunks/katex-BsrBVQKd.js +0 -11314
  61. package/dist/chunks/linear-4t7D_ros.js +0 -259
  62. package/dist/chunks/mermaid-facade-BoLWBerE.js +0 -289
  63. package/dist/chunks/mermaid-importer-Cgx1IhmR.js +0 -478
  64. package/dist/chunks/mermaid.core-DXv6D2Sm.js +0 -19244
  65. package/dist/chunks/mindmap-definition-6OY57UG3-r9wTKul_.js +0 -837
  66. package/dist/chunks/mount-C1Xk_GQz.js +0 -22131
  67. package/dist/chunks/ordinal-DfAQgscy.js +0 -61
  68. package/dist/chunks/pegDiagram-ECIUJNBX-CmKlFWiP.js +0 -95
  69. package/dist/chunks/pieDiagram-GNMPY74T-DNTw_qan.js +0 -208
  70. package/dist/chunks/quadrantDiagram-D57K4MC3-CT_tvVub.js +0 -1029
  71. package/dist/chunks/railroadDiagram-Y72NRBL7-C5TUvZBe.js +0 -77
  72. package/dist/chunks/requirementDiagram-EQYSW5RA-C_c65aCa.js +0 -889
  73. package/dist/chunks/sankeyDiagram-SY24JHO5-CKcbizM1.js +0 -859
  74. package/dist/chunks/sequenceDiagram-BLEHNHQU-GpVnHOjf.js +0 -2972
  75. package/dist/chunks/sizeCapture-INFHLROL-CToN3JSu.js +0 -46
  76. package/dist/chunks/stateDiagram-v2-A6IESKWZ-rJYd2FfM.js +0 -1520
  77. package/dist/chunks/swimlanes-B3ENRKFQ-C7w5pfxG.js +0 -4991
  78. package/dist/chunks/swimlanesDiagram-AYQRV4AK-BpGY_bvE.js +0 -13
  79. package/dist/chunks/timeline-definition-JXYKGLGB-ChKFPBKc.js +0 -1058
  80. package/dist/chunks/usecaseDiagram-WPOLBNNX-skXH8Dcu.js +0 -7945
  81. package/dist/chunks/vennDiagram-Q3Y3IDCW-C5KknmJf.js +0 -1578
  82. package/dist/chunks/wardleyDiagram-IVAIDKWA-DY4Lkfpu.js +0 -678
  83. package/dist/chunks/xychartDiagram-4URNHDU4-BHScsL7h.js +0 -1536
  84. package/dist/types/src/cli/png.d.ts +0 -23
  85. package/dist/types/src/import/browser.d.ts +0 -3
  86. package/dist/types/src/import/detect.d.ts +0 -31
  87. package/dist/types/src/import/dot-importer.d.ts +0 -3
  88. package/dist/types/src/import/import-core.d.ts +0 -105
  89. package/dist/types/src/import/mermaid-facade.d.ts +0 -120
  90. package/dist/types/src/import/mermaid-importer.d.ts +0 -4
  91. package/dist/types/src/import/mermaid-sequence.d.ts +0 -8
  92. package/dist/types/src/import/scratch.d.ts +0 -3
  93. package/dist/types/src/lib/source-hash.d.ts +0 -7
  94. package/dist/types/src/model/candidates.d.ts +0 -53
  95. package/dist/types/src/model/embed.d.ts +0 -17
  96. package/dist/types/src/model/examples.d.ts +0 -15
  97. package/dist/types/src/model/label-hits.d.ts +0 -27
  98. package/dist/types/src/model/static-scene.d.ts +0 -15
  99. package/dist/types/src/state/commands.d.ts +0 -529
  100. package/dist/types/src/state/comparison.d.ts +0 -151
  101. package/dist/types/src/state/files.d.ts +0 -61
  102. package/dist/types/src/state/keyboard.d.ts +0 -6
  103. package/dist/types/src/state/launch.d.ts +0 -61
  104. package/dist/types/src/state/ui.d.ts +0 -39
@@ -1,1570 +0,0 @@
1
- import { g as tt } from "./chunk-5VM5RSS4-CaKe4sjM.js";
2
- import { g as st } from "./chunk-XXDRQBXY-B-AMQgD2.js";
3
- import { s as it } from "./chunk-VQ5W62QI-CXRv7FiX.js";
4
- import { _ as f, l as Ie, c as F, p as at, r as rt, u as Oe, k as pe, z as nt, b as lt, a as ut, s as ot, g as ct, q as ht, t as dt, m as I, A as pt, y as At, C as ft, D as gt, E as mt, F as Ct, j as bt, Y as G } from "./mermaid.core-DXv6D2Sm.js";
5
- import { c as kt } from "./chunk-55XCU76K-DkZUAaqC.js";
6
- var we = (function() {
7
- var t = /* @__PURE__ */ f(function(O, c, d, p) {
8
- for (d = d || {}, p = O.length; p--; d[O[p]] = c) ;
9
- return d;
10
- }, "o"), i = [1, 18], a = [1, 19], r = [1, 20], n = [1, 41], o = [1, 26], h = [1, 42], u = [1, 24], g = [1, 25], m = [1, 32], _ = [1, 33], U = [1, 34], b = [1, 45], fe = [1, 35], ge = [1, 36], me = [1, 37], Ce = [1, 38], be = [1, 27], ke = [1, 28], Ee = [1, 29], Te = [1, 30], ye = [1, 31], k = [1, 44], E = [1, 46], T = [1, 43], y = [1, 47], De = [1, 9], A = [1, 8, 9], $ = [1, 58], ee = [1, 59], te = [1, 60], se = [1, 61], ie = [1, 62], Fe = [1, 63], Be = [1, 64], S = [1, 8, 9, 41], Ve = [1, 77], P = [1, 8, 9, 12, 13, 22, 39, 41, 44, 46, 68, 69, 70, 71, 72, 73, 74, 79, 81], ae = [1, 8, 9, 12, 13, 18, 20, 22, 39, 41, 44, 46, 47, 60, 68, 69, 70, 71, 72, 73, 74, 79, 81, 86, 100, 102, 103], re = [13, 60, 86, 100, 102, 103], z = [13, 60, 73, 74, 86, 100, 102, 103], Pe = [13, 60, 68, 69, 70, 71, 72, 86, 100, 102, 103], ne = [1, 103], Y = [1, 121], K = [1, 117], W = [1, 113], Q = [1, 119], j = [1, 114], X = [1, 115], q = [1, 116], H = [1, 118], J = [1, 120], Re = [22, 50, 60, 61, 82, 86, 87, 88, 89, 90], Ge = [1, 128], le = [12, 39], _e = [1, 8, 9, 39, 41, 44, 46], ue = [1, 8, 9, 22], Ue = [1, 153], ze = [1, 8, 9, 61], x = [1, 8, 9, 22, 50, 60, 61, 82, 86, 87, 88, 89, 90], Se = {
11
- trace: /* @__PURE__ */ f(function() {
12
- }, "trace"),
13
- yy: {},
14
- symbols_: { error: 2, start: 3, mermaidDoc: 4, statements: 5, graphConfig: 6, CLASS_DIAGRAM: 7, NEWLINE: 8, EOF: 9, statement: 10, classLabel: 11, SQS: 12, STR: 13, SQE: 14, namespaceName: 15, alphaNumToken: 16, classLiteralName: 17, DOT: 18, className: 19, GENERICTYPE: 20, relationStatement: 21, LABEL: 22, namespaceStatement: 23, classStatement: 24, memberStatement: 25, annotationStatement: 26, clickStatement: 27, styleStatement: 28, cssClassStatement: 29, noteStatement: 30, classDefStatement: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, namespaceIdentifier: 38, STRUCT_START: 39, classStatements: 40, STRUCT_STOP: 41, NAMESPACE: 42, classIdentifier: 43, STYLE_SEPARATOR: 44, members: 45, ANNOTATION_START: 46, ANNOTATION_END: 47, CLASS: 48, emptyBody: 49, SPACE: 50, MEMBER: 51, SEPARATOR: 52, relation: 53, NOTE_FOR: 54, noteText: 55, NOTE: 56, CLASSDEF: 57, classList: 58, stylesOpt: 59, ALPHA: 60, COMMA: 61, direction_tb: 62, direction_bt: 63, direction_rl: 64, direction_lr: 65, relationType: 66, lineType: 67, AGGREGATION: 68, EXTENSION: 69, COMPOSITION: 70, DEPENDENCY: 71, LOLLIPOP: 72, LINE: 73, DOTTED_LINE: 74, CALLBACK: 75, LINK: 76, LINK_TARGET: 77, CLICK: 78, CALLBACK_NAME: 79, CALLBACK_ARGS: 80, HREF: 81, STYLE: 82, CSSCLASS: 83, style: 84, styleComponent: 85, NUM: 86, COLON: 87, UNIT: 88, BRKT: 89, PCT: 90, commentToken: 91, textToken: 92, graphCodeTokens: 93, textNoTagsToken: 94, TAGSTART: 95, TAGEND: 96, "==": 97, "--": 98, DEFAULT: 99, MINUS: 100, keywords: 101, UNICODE_TEXT: 102, BQUOTE_STR: 103, $accept: 0, $end: 1 },
15
- terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 18: "DOT", 20: "GENERICTYPE", 22: "LABEL", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 39: "STRUCT_START", 41: "STRUCT_STOP", 42: "NAMESPACE", 44: "STYLE_SEPARATOR", 46: "ANNOTATION_START", 47: "ANNOTATION_END", 48: "CLASS", 50: "SPACE", 51: "MEMBER", 52: "SEPARATOR", 54: "NOTE_FOR", 56: "NOTE", 57: "CLASSDEF", 60: "ALPHA", 61: "COMMA", 62: "direction_tb", 63: "direction_bt", 64: "direction_rl", 65: "direction_lr", 68: "AGGREGATION", 69: "EXTENSION", 70: "COMPOSITION", 71: "DEPENDENCY", 72: "LOLLIPOP", 73: "LINE", 74: "DOTTED_LINE", 75: "CALLBACK", 76: "LINK", 77: "LINK_TARGET", 78: "CLICK", 79: "CALLBACK_NAME", 80: "CALLBACK_ARGS", 81: "HREF", 82: "STYLE", 83: "CSSCLASS", 86: "NUM", 87: "COLON", 88: "UNIT", 89: "BRKT", 90: "PCT", 93: "graphCodeTokens", 95: "TAGSTART", 96: "TAGEND", 97: "==", 98: "--", 99: "DEFAULT", 100: "MINUS", 101: "keywords", 102: "UNICODE_TEXT", 103: "BQUOTE_STR" },
16
- productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 1], [15, 3], [15, 2], [19, 1], [19, 3], [19, 1], [19, 2], [19, 2], [19, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [23, 4], [23, 5], [38, 2], [38, 3], [40, 1], [40, 2], [40, 3], [40, 1], [40, 2], [40, 3], [40, 1], [40, 2], [40, 3], [24, 1], [24, 3], [24, 4], [24, 3], [24, 6], [24, 4], [24, 7], [24, 6], [43, 2], [43, 3], [49, 0], [49, 2], [49, 2], [26, 4], [45, 1], [45, 2], [25, 1], [25, 2], [25, 1], [25, 1], [21, 3], [21, 4], [21, 4], [21, 5], [30, 3], [30, 2], [31, 3], [58, 1], [58, 3], [32, 1], [32, 1], [32, 1], [32, 1], [53, 3], [53, 2], [53, 2], [53, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [67, 1], [67, 1], [27, 3], [27, 4], [27, 3], [27, 4], [27, 4], [27, 5], [27, 3], [27, 4], [27, 4], [27, 5], [27, 4], [27, 5], [27, 5], [27, 6], [28, 3], [29, 3], [59, 1], [59, 3], [84, 1], [84, 2], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [91, 1], [91, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [94, 1], [94, 1], [94, 1], [94, 1], [16, 1], [16, 1], [16, 1], [16, 1], [17, 1], [55, 1]],
17
- performAction: /* @__PURE__ */ f(function(c, d, p, l, C, e, Z) {
18
- var s = e.length - 1;
19
- switch (C) {
20
- case 8:
21
- this.$ = e[s - 1];
22
- break;
23
- case 9:
24
- case 10:
25
- case 13:
26
- case 15:
27
- this.$ = e[s];
28
- break;
29
- case 11:
30
- case 14:
31
- this.$ = e[s - 2] + "." + e[s];
32
- break;
33
- case 12:
34
- case 16:
35
- this.$ = e[s - 1] + e[s];
36
- break;
37
- case 17:
38
- case 18:
39
- this.$ = e[s - 1] + "~" + e[s] + "~";
40
- break;
41
- case 19:
42
- l.addRelation(e[s]);
43
- break;
44
- case 20:
45
- e[s - 1].title = l.cleanupLabel(e[s]), l.addRelation(e[s - 1]);
46
- break;
47
- case 31:
48
- this.$ = e[s].trim(), l.setAccTitle(this.$);
49
- break;
50
- case 32:
51
- case 33:
52
- this.$ = e[s].trim(), l.setAccDescription(this.$);
53
- break;
54
- case 34:
55
- l.addClassesToNamespace(e[s - 3], e[s - 1][0], e[s - 1][1]), l.popNamespace();
56
- break;
57
- case 35:
58
- l.addClassesToNamespace(e[s - 4], e[s - 1][0], e[s - 1][1]), l.popNamespace();
59
- break;
60
- case 36:
61
- this.$ = l.addNamespace(e[s]);
62
- break;
63
- case 37:
64
- this.$ = l.addNamespace(e[s - 1], e[s]);
65
- break;
66
- case 38:
67
- this.$ = [[e[s]], []];
68
- break;
69
- case 39:
70
- this.$ = [[e[s - 1]], []];
71
- break;
72
- case 40:
73
- e[s][0].unshift(e[s - 2]), this.$ = e[s];
74
- break;
75
- case 41:
76
- this.$ = [[], [e[s]]];
77
- break;
78
- case 42:
79
- this.$ = [[], [e[s - 1]]];
80
- break;
81
- case 43:
82
- e[s][1].unshift(e[s - 2]), this.$ = e[s];
83
- break;
84
- case 44:
85
- case 45:
86
- this.$ = [[], []];
87
- break;
88
- case 46:
89
- this.$ = e[s];
90
- break;
91
- case 48:
92
- l.setCssClass(e[s - 2], e[s]);
93
- break;
94
- case 49:
95
- l.addMembers(e[s - 3], e[s - 1]);
96
- break;
97
- case 51:
98
- l.setCssClass(e[s - 5], e[s - 3]), l.addMembers(e[s - 5], e[s - 1]);
99
- break;
100
- case 52:
101
- l.addAnnotation(e[s - 3], e[s - 1]);
102
- break;
103
- case 53:
104
- l.addAnnotation(e[s - 6], e[s - 4]), l.addMembers(e[s - 6], e[s - 1]);
105
- break;
106
- case 54:
107
- l.addAnnotation(e[s - 5], e[s - 3]);
108
- break;
109
- case 55:
110
- this.$ = e[s], l.addClass(e[s]);
111
- break;
112
- case 56:
113
- this.$ = e[s - 1], l.addClass(e[s - 1]), l.setClassLabel(e[s - 1], e[s]);
114
- break;
115
- case 60:
116
- l.addAnnotation(e[s], e[s - 2]);
117
- break;
118
- case 61:
119
- case 74:
120
- this.$ = [e[s]];
121
- break;
122
- case 62:
123
- e[s].push(e[s - 1]), this.$ = e[s];
124
- break;
125
- case 63:
126
- break;
127
- case 64:
128
- l.addMember(e[s - 1], l.cleanupLabel(e[s]));
129
- break;
130
- case 65:
131
- break;
132
- case 66:
133
- break;
134
- case 67:
135
- this.$ = { id1: e[s - 2], id2: e[s], relation: e[s - 1], relationTitle1: "none", relationTitle2: "none" };
136
- break;
137
- case 68:
138
- this.$ = { id1: e[s - 3], id2: e[s], relation: e[s - 1], relationTitle1: e[s - 2], relationTitle2: "none" };
139
- break;
140
- case 69:
141
- this.$ = { id1: e[s - 3], id2: e[s], relation: e[s - 2], relationTitle1: "none", relationTitle2: e[s - 1] };
142
- break;
143
- case 70:
144
- this.$ = { id1: e[s - 4], id2: e[s], relation: e[s - 2], relationTitle1: e[s - 3], relationTitle2: e[s - 1] };
145
- break;
146
- case 71:
147
- this.$ = l.addNote(e[s], e[s - 1]);
148
- break;
149
- case 72:
150
- this.$ = l.addNote(e[s]);
151
- break;
152
- case 73:
153
- this.$ = e[s - 2], l.defineClass(e[s - 1], e[s]);
154
- break;
155
- case 75:
156
- this.$ = e[s - 2].concat([e[s]]);
157
- break;
158
- case 76:
159
- l.setDirection("TB");
160
- break;
161
- case 77:
162
- l.setDirection("BT");
163
- break;
164
- case 78:
165
- l.setDirection("RL");
166
- break;
167
- case 79:
168
- l.setDirection("LR");
169
- break;
170
- case 80:
171
- this.$ = { type1: e[s - 2], type2: e[s], lineType: e[s - 1] };
172
- break;
173
- case 81:
174
- this.$ = { type1: "none", type2: e[s], lineType: e[s - 1] };
175
- break;
176
- case 82:
177
- this.$ = { type1: e[s - 1], type2: "none", lineType: e[s] };
178
- break;
179
- case 83:
180
- this.$ = { type1: "none", type2: "none", lineType: e[s] };
181
- break;
182
- case 84:
183
- this.$ = l.relationType.AGGREGATION;
184
- break;
185
- case 85:
186
- this.$ = l.relationType.EXTENSION;
187
- break;
188
- case 86:
189
- this.$ = l.relationType.COMPOSITION;
190
- break;
191
- case 87:
192
- this.$ = l.relationType.DEPENDENCY;
193
- break;
194
- case 88:
195
- this.$ = l.relationType.LOLLIPOP;
196
- break;
197
- case 89:
198
- this.$ = l.lineType.LINE;
199
- break;
200
- case 90:
201
- this.$ = l.lineType.DOTTED_LINE;
202
- break;
203
- case 91:
204
- case 97:
205
- this.$ = e[s - 2], l.setClickEvent(e[s - 1], e[s]);
206
- break;
207
- case 92:
208
- case 98:
209
- this.$ = e[s - 3], l.setClickEvent(e[s - 2], e[s - 1]), l.setTooltip(e[s - 2], e[s]);
210
- break;
211
- case 93:
212
- this.$ = e[s - 2], l.setLink(e[s - 1], e[s]);
213
- break;
214
- case 94:
215
- this.$ = e[s - 3], l.setLink(e[s - 2], e[s - 1], e[s]);
216
- break;
217
- case 95:
218
- this.$ = e[s - 3], l.setLink(e[s - 2], e[s - 1]), l.setTooltip(e[s - 2], e[s]);
219
- break;
220
- case 96:
221
- this.$ = e[s - 4], l.setLink(e[s - 3], e[s - 2], e[s]), l.setTooltip(e[s - 3], e[s - 1]);
222
- break;
223
- case 99:
224
- this.$ = e[s - 3], l.setClickEvent(e[s - 2], e[s - 1], e[s]);
225
- break;
226
- case 100:
227
- this.$ = e[s - 4], l.setClickEvent(e[s - 3], e[s - 2], e[s - 1]), l.setTooltip(e[s - 3], e[s]);
228
- break;
229
- case 101:
230
- this.$ = e[s - 3], l.setLink(e[s - 2], e[s]);
231
- break;
232
- case 102:
233
- this.$ = e[s - 4], l.setLink(e[s - 3], e[s - 1], e[s]);
234
- break;
235
- case 103:
236
- this.$ = e[s - 4], l.setLink(e[s - 3], e[s - 1]), l.setTooltip(e[s - 3], e[s]);
237
- break;
238
- case 104:
239
- this.$ = e[s - 5], l.setLink(e[s - 4], e[s - 2], e[s]), l.setTooltip(e[s - 4], e[s - 1]);
240
- break;
241
- case 105:
242
- this.$ = e[s - 2], l.setCssStyle(e[s - 1], e[s]);
243
- break;
244
- case 106:
245
- l.setCssClass(e[s - 1], e[s]);
246
- break;
247
- case 107:
248
- this.$ = [e[s]];
249
- break;
250
- case 108:
251
- e[s - 2].push(e[s]), this.$ = e[s - 2];
252
- break;
253
- case 110:
254
- this.$ = e[s - 1] + e[s];
255
- break;
256
- }
257
- }, "anonymous"),
258
- table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 39, 17: 40, 19: 21, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: i, 35: a, 37: r, 38: 22, 42: n, 43: 23, 46: o, 48: h, 51: u, 52: g, 54: m, 56: _, 57: U, 60: b, 62: fe, 63: ge, 64: me, 65: Ce, 75: be, 76: ke, 78: Ee, 82: Te, 83: ye, 86: k, 100: E, 102: T, 103: y }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, t(De, [2, 5], { 8: [1, 48] }), { 8: [1, 49] }, t(A, [2, 19], { 22: [1, 50] }), t(A, [2, 21]), t(A, [2, 22]), t(A, [2, 23]), t(A, [2, 24]), t(A, [2, 25]), t(A, [2, 26]), t(A, [2, 27]), t(A, [2, 28]), t(A, [2, 29]), t(A, [2, 30]), { 34: [1, 51] }, { 36: [1, 52] }, t(A, [2, 33]), t(A, [2, 63], { 53: 53, 66: 56, 67: 57, 13: [1, 54], 22: [1, 55], 68: $, 69: ee, 70: te, 71: se, 72: ie, 73: Fe, 74: Be }), { 39: [1, 65] }, t(S, [2, 47], { 39: [1, 67], 44: [1, 66], 46: [1, 68] }), t(A, [2, 65]), t(A, [2, 66]), { 16: 69, 60: b, 86: k, 100: E, 102: T }, { 16: 39, 17: 40, 19: 70, 60: b, 86: k, 100: E, 102: T, 103: y }, { 16: 39, 17: 40, 19: 71, 60: b, 86: k, 100: E, 102: T, 103: y }, { 16: 39, 17: 40, 19: 72, 60: b, 86: k, 100: E, 102: T, 103: y }, { 60: [1, 73] }, { 13: [1, 74] }, { 16: 39, 17: 40, 19: 75, 60: b, 86: k, 100: E, 102: T, 103: y }, { 13: Ve, 55: 76 }, { 58: 78, 60: [1, 79] }, t(A, [2, 76]), t(A, [2, 77]), t(A, [2, 78]), t(A, [2, 79]), t(P, [2, 13], { 16: 39, 17: 40, 19: 81, 18: [1, 80], 20: [1, 82], 60: b, 86: k, 100: E, 102: T, 103: y }), t(P, [2, 15], { 20: [1, 83] }), { 15: 84, 16: 85, 17: 86, 60: b, 86: k, 100: E, 102: T, 103: y }, { 16: 39, 17: 40, 19: 87, 60: b, 86: k, 100: E, 102: T, 103: y }, t(ae, [2, 133]), t(ae, [2, 134]), t(ae, [2, 135]), t(ae, [2, 136]), t([1, 8, 9, 12, 13, 20, 22, 39, 41, 44, 46, 68, 69, 70, 71, 72, 73, 74, 79, 81], [2, 137]), t(De, [2, 6], { 10: 5, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 19: 21, 38: 22, 43: 23, 16: 39, 17: 40, 5: 88, 33: i, 35: a, 37: r, 42: n, 46: o, 48: h, 51: u, 52: g, 54: m, 56: _, 57: U, 60: b, 62: fe, 63: ge, 64: me, 65: Ce, 75: be, 76: ke, 78: Ee, 82: Te, 83: ye, 86: k, 100: E, 102: T, 103: y }), { 5: 89, 10: 5, 16: 39, 17: 40, 19: 21, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: i, 35: a, 37: r, 38: 22, 42: n, 43: 23, 46: o, 48: h, 51: u, 52: g, 54: m, 56: _, 57: U, 60: b, 62: fe, 63: ge, 64: me, 65: Ce, 75: be, 76: ke, 78: Ee, 82: Te, 83: ye, 86: k, 100: E, 102: T, 103: y }, t(A, [2, 20]), t(A, [2, 31]), t(A, [2, 32]), { 13: [1, 91], 16: 39, 17: 40, 19: 90, 60: b, 86: k, 100: E, 102: T, 103: y }, { 53: 92, 66: 56, 67: 57, 68: $, 69: ee, 70: te, 71: se, 72: ie, 73: Fe, 74: Be }, t(A, [2, 64]), { 67: 93, 73: Fe, 74: Be }, t(re, [2, 83], { 66: 94, 68: $, 69: ee, 70: te, 71: se, 72: ie }), t(z, [2, 84]), t(z, [2, 85]), t(z, [2, 86]), t(z, [2, 87]), t(z, [2, 88]), t(Pe, [2, 89]), t(Pe, [2, 90]), { 8: [1, 96], 23: 99, 24: 97, 30: 98, 38: 22, 40: 95, 42: n, 43: 23, 48: h, 54: m, 56: _ }, { 16: 100, 60: b, 86: k, 100: E, 102: T }, { 41: [1, 102], 45: 101, 51: ne }, { 16: 104, 60: b, 86: k, 100: E, 102: T }, { 47: [1, 105] }, { 13: [1, 106] }, { 13: [1, 107] }, { 79: [1, 108], 81: [1, 109] }, { 22: Y, 50: K, 59: 110, 60: W, 82: Q, 84: 111, 85: 112, 86: j, 87: X, 88: q, 89: H, 90: J }, { 60: [1, 122] }, { 13: Ve, 55: 123 }, t(S, [2, 72]), t(S, [2, 138]), { 22: Y, 50: K, 59: 124, 60: W, 61: [1, 125], 82: Q, 84: 111, 85: 112, 86: j, 87: X, 88: q, 89: H, 90: J }, t(Re, [2, 74]), { 16: 39, 17: 40, 19: 126, 60: b, 86: k, 100: E, 102: T, 103: y }, t(P, [2, 16]), t(P, [2, 17]), t(P, [2, 18]), { 11: 127, 12: Ge, 39: [2, 36] }, t(le, [2, 9], { 16: 85, 17: 86, 15: 130, 18: [1, 129], 60: b, 86: k, 100: E, 102: T, 103: y }), t(le, [2, 10]), t(_e, [2, 55], { 11: 131, 12: Ge }), t(De, [2, 7]), { 9: [1, 132] }, t(ue, [2, 67]), { 16: 39, 17: 40, 19: 133, 60: b, 86: k, 100: E, 102: T, 103: y }, { 13: [1, 135], 16: 39, 17: 40, 19: 134, 60: b, 86: k, 100: E, 102: T, 103: y }, t(re, [2, 82], { 66: 136, 68: $, 69: ee, 70: te, 71: se, 72: ie }), t(re, [2, 81]), { 41: [1, 137] }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 138, 42: n, 43: 23, 48: h, 54: m, 56: _ }, { 8: [1, 139], 41: [2, 38] }, { 8: [1, 140], 41: [2, 41] }, { 8: [1, 141], 41: [2, 44] }, t(S, [2, 48], { 39: [1, 142] }), { 41: [1, 143] }, t(S, [2, 50]), { 41: [2, 61], 45: 144, 51: ne }, { 47: [1, 145] }, { 16: 39, 17: 40, 19: 146, 60: b, 86: k, 100: E, 102: T, 103: y }, t(A, [2, 91], { 13: [1, 147] }), t(A, [2, 93], { 13: [1, 149], 77: [1, 148] }), t(A, [2, 97], { 13: [1, 150], 80: [1, 151] }), { 13: [1, 152] }, t(A, [2, 105], { 61: Ue }), t(ze, [2, 107], { 85: 154, 22: Y, 50: K, 60: W, 82: Q, 86: j, 87: X, 88: q, 89: H, 90: J }), t(x, [2, 109]), t(x, [2, 111]), t(x, [2, 112]), t(x, [2, 113]), t(x, [2, 114]), t(x, [2, 115]), t(x, [2, 116]), t(x, [2, 117]), t(x, [2, 118]), t(x, [2, 119]), t(A, [2, 106]), t(S, [2, 71]), t(A, [2, 73], { 61: Ue }), { 60: [1, 155] }, t(P, [2, 14]), { 39: [2, 37] }, { 13: [1, 156] }, { 15: 157, 16: 85, 17: 86, 60: b, 86: k, 100: E, 102: T, 103: y }, t(le, [2, 12]), t(_e, [2, 56]), { 1: [2, 4] }, t(ue, [2, 69]), t(ue, [2, 68]), { 16: 39, 17: 40, 19: 158, 60: b, 86: k, 100: E, 102: T, 103: y }, t(re, [2, 80]), t(S, [2, 34]), { 41: [1, 159] }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 160, 41: [2, 39], 42: n, 43: 23, 48: h, 54: m, 56: _ }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 161, 41: [2, 42], 42: n, 43: 23, 48: h, 54: m, 56: _ }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 162, 41: [2, 45], 42: n, 43: 23, 48: h, 54: m, 56: _ }, { 45: 163, 51: ne }, t(S, [2, 49]), { 41: [2, 62] }, t(S, [2, 52], { 39: [1, 164] }), t(A, [2, 60]), t(A, [2, 92]), t(A, [2, 94]), t(A, [2, 95], { 77: [1, 165] }), t(A, [2, 98]), t(A, [2, 99], { 13: [1, 166] }), t(A, [2, 101], { 13: [1, 168], 77: [1, 167] }), { 22: Y, 50: K, 60: W, 82: Q, 84: 169, 85: 112, 86: j, 87: X, 88: q, 89: H, 90: J }, t(x, [2, 110]), t(Re, [2, 75]), { 14: [1, 170] }, t(le, [2, 11]), t(ue, [2, 70]), t(S, [2, 35]), { 41: [2, 40] }, { 41: [2, 43] }, { 41: [2, 46] }, { 41: [1, 171] }, { 41: [1, 173], 45: 172, 51: ne }, t(A, [2, 96]), t(A, [2, 100]), t(A, [2, 102]), t(A, [2, 103], { 77: [1, 174] }), t(ze, [2, 108], { 85: 154, 22: Y, 50: K, 60: W, 82: Q, 86: j, 87: X, 88: q, 89: H, 90: J }), t(_e, [2, 8]), t(S, [2, 51]), { 41: [1, 175] }, t(S, [2, 54]), t(A, [2, 104]), t(S, [2, 53])],
259
- defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 127: [2, 37], 132: [2, 4], 144: [2, 62], 160: [2, 40], 161: [2, 43], 162: [2, 46] },
260
- parseError: /* @__PURE__ */ f(function(c, d) {
261
- if (d.recoverable)
262
- this.trace(c);
263
- else {
264
- var p = new Error(c);
265
- throw p.hash = d, p;
266
- }
267
- }, "parseError"),
268
- parse: /* @__PURE__ */ f(function(c) {
269
- var d = this, p = [0], l = [], C = [null], e = [], Z = this.table, s = "", ce = 0, Ye = 0, Je = 2, Ke = 1, Ze = e.slice.call(arguments, 1), D = Object.create(this.lexer), w = { yy: {} };
270
- for (var Ne in this.yy)
271
- Object.prototype.hasOwnProperty.call(this.yy, Ne) && (w.yy[Ne] = this.yy[Ne]);
272
- D.setInput(c, w.yy), w.yy.lexer = D, w.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
273
- var Le = D.yylloc;
274
- e.push(Le);
275
- var $e = D.options && D.options.ranges;
276
- typeof w.yy.parseError == "function" ? this.parseError = w.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
277
- function et(N) {
278
- p.length = p.length - 2 * N, C.length = C.length - N, e.length = e.length - N;
279
- }
280
- f(et, "popStack");
281
- function We() {
282
- var N;
283
- return N = l.pop() || D.lex() || Ke, typeof N != "number" && (N instanceof Array && (l = N, N = l.pop()), N = d.symbols_[N] || N), N;
284
- }
285
- f(We, "lex");
286
- for (var B, M, L, xe, R = {}, he, v, Qe, de; ; ) {
287
- if (M = p[p.length - 1], this.defaultActions[M] ? L = this.defaultActions[M] : ((B === null || typeof B > "u") && (B = We()), L = Z[M] && Z[M][B]), typeof L > "u" || !L.length || !L[0]) {
288
- var ve = "";
289
- de = [];
290
- for (he in Z[M])
291
- this.terminals_[he] && he > Je && de.push("'" + this.terminals_[he] + "'");
292
- D.showPosition ? ve = "Parse error on line " + (ce + 1) + `:
293
- ` + D.showPosition() + `
294
- Expecting ` + de.join(", ") + ", got '" + (this.terminals_[B] || B) + "'" : ve = "Parse error on line " + (ce + 1) + ": Unexpected " + (B == Ke ? "end of input" : "'" + (this.terminals_[B] || B) + "'"), this.parseError(ve, {
295
- text: D.match,
296
- token: this.terminals_[B] || B,
297
- line: D.yylineno,
298
- loc: Le,
299
- expected: de
300
- });
301
- }
302
- if (L[0] instanceof Array && L.length > 1)
303
- throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + B);
304
- switch (L[0]) {
305
- case 1:
306
- p.push(B), C.push(D.yytext), e.push(D.yylloc), p.push(L[1]), B = null, Ye = D.yyleng, s = D.yytext, ce = D.yylineno, Le = D.yylloc;
307
- break;
308
- case 2:
309
- if (v = this.productions_[L[1]][1], R.$ = C[C.length - v], R._$ = {
310
- first_line: e[e.length - (v || 1)].first_line,
311
- last_line: e[e.length - 1].last_line,
312
- first_column: e[e.length - (v || 1)].first_column,
313
- last_column: e[e.length - 1].last_column
314
- }, $e && (R._$.range = [
315
- e[e.length - (v || 1)].range[0],
316
- e[e.length - 1].range[1]
317
- ]), xe = this.performAction.apply(R, [
318
- s,
319
- Ye,
320
- ce,
321
- w.yy,
322
- L[1],
323
- C,
324
- e
325
- ].concat(Ze)), typeof xe < "u")
326
- return xe;
327
- v && (p = p.slice(0, -1 * v * 2), C = C.slice(0, -1 * v), e = e.slice(0, -1 * v)), p.push(this.productions_[L[1]][0]), C.push(R.$), e.push(R._$), Qe = Z[p[p.length - 2]][p[p.length - 1]], p.push(Qe);
328
- break;
329
- case 3:
330
- return !0;
331
- }
332
- }
333
- return !0;
334
- }, "parse")
335
- }, He = /* @__PURE__ */ (function() {
336
- var O = {
337
- EOF: 1,
338
- parseError: /* @__PURE__ */ f(function(d, p) {
339
- if (this.yy.parser)
340
- this.yy.parser.parseError(d, p);
341
- else
342
- throw new Error(d);
343
- }, "parseError"),
344
- // resets the lexer, sets new input
345
- setInput: /* @__PURE__ */ f(function(c, d) {
346
- return this.yy = d || this.yy || {}, this._input = c, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
347
- first_line: 1,
348
- first_column: 0,
349
- last_line: 1,
350
- last_column: 0
351
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
352
- }, "setInput"),
353
- // consumes and returns one char from the input
354
- input: /* @__PURE__ */ f(function() {
355
- var c = this._input[0];
356
- this.yytext += c, this.yyleng++, this.offset++, this.match += c, this.matched += c;
357
- var d = c.match(/(?:\r\n?|\n).*/g);
358
- return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), c;
359
- }, "input"),
360
- // unshifts one char (or a string) into the input
361
- unput: /* @__PURE__ */ f(function(c) {
362
- var d = c.length, p = c.split(/(?:\r\n?|\n)/g);
363
- this._input = c + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
364
- var l = this.match.split(/(?:\r\n?|\n)/g);
365
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), p.length - 1 && (this.yylineno -= p.length - 1);
366
- var C = this.yylloc.range;
367
- return this.yylloc = {
368
- first_line: this.yylloc.first_line,
369
- last_line: this.yylineno + 1,
370
- first_column: this.yylloc.first_column,
371
- last_column: p ? (p.length === l.length ? this.yylloc.first_column : 0) + l[l.length - p.length].length - p[0].length : this.yylloc.first_column - d
372
- }, this.options.ranges && (this.yylloc.range = [C[0], C[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
373
- }, "unput"),
374
- // When called from action, caches matched text and appends it on next action
375
- more: /* @__PURE__ */ f(function() {
376
- return this._more = !0, this;
377
- }, "more"),
378
- // 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.
379
- reject: /* @__PURE__ */ f(function() {
380
- if (this.options.backtrack_lexer)
381
- this._backtrack = !0;
382
- else
383
- 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).
384
- ` + this.showPosition(), {
385
- text: "",
386
- token: null,
387
- line: this.yylineno
388
- });
389
- return this;
390
- }, "reject"),
391
- // retain first n characters of the match
392
- less: /* @__PURE__ */ f(function(c) {
393
- this.unput(this.match.slice(c));
394
- }, "less"),
395
- // displays already matched input, i.e. for error messages
396
- pastInput: /* @__PURE__ */ f(function() {
397
- var c = this.matched.substr(0, this.matched.length - this.match.length);
398
- return (c.length > 20 ? "..." : "") + c.substr(-20).replace(/\n/g, "");
399
- }, "pastInput"),
400
- // displays upcoming input, i.e. for error messages
401
- upcomingInput: /* @__PURE__ */ f(function() {
402
- var c = this.match;
403
- return c.length < 20 && (c += this._input.substr(0, 20 - c.length)), (c.substr(0, 20) + (c.length > 20 ? "..." : "")).replace(/\n/g, "");
404
- }, "upcomingInput"),
405
- // displays the character position where the lexing error occurred, i.e. for error messages
406
- showPosition: /* @__PURE__ */ f(function() {
407
- var c = this.pastInput(), d = new Array(c.length + 1).join("-");
408
- return c + this.upcomingInput() + `
409
- ` + d + "^";
410
- }, "showPosition"),
411
- // test the lexed token: return FALSE when not a match, otherwise return token
412
- test_match: /* @__PURE__ */ f(function(c, d) {
413
- var p, l, C;
414
- if (this.options.backtrack_lexer && (C = {
415
- yylineno: this.yylineno,
416
- yylloc: {
417
- first_line: this.yylloc.first_line,
418
- last_line: this.last_line,
419
- first_column: this.yylloc.first_column,
420
- last_column: this.yylloc.last_column
421
- },
422
- yytext: this.yytext,
423
- match: this.match,
424
- matches: this.matches,
425
- matched: this.matched,
426
- yyleng: this.yyleng,
427
- offset: this.offset,
428
- _more: this._more,
429
- _input: this._input,
430
- yy: this.yy,
431
- conditionStack: this.conditionStack.slice(0),
432
- done: this.done
433
- }, this.options.ranges && (C.yylloc.range = this.yylloc.range.slice(0))), l = c[0].match(/(?:\r\n?|\n).*/g), l && (this.yylineno += l.length), this.yylloc = {
434
- first_line: this.yylloc.last_line,
435
- last_line: this.yylineno + 1,
436
- first_column: this.yylloc.last_column,
437
- last_column: l ? l[l.length - 1].length - l[l.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + c[0].length
438
- }, this.yytext += c[0], this.match += c[0], this.matches = c, 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(c[0].length), this.matched += c[0], p = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), p)
439
- return p;
440
- if (this._backtrack) {
441
- for (var e in C)
442
- this[e] = C[e];
443
- return !1;
444
- }
445
- return !1;
446
- }, "test_match"),
447
- // return next match in input
448
- next: /* @__PURE__ */ f(function() {
449
- if (this.done)
450
- return this.EOF;
451
- this._input || (this.done = !0);
452
- var c, d, p, l;
453
- this._more || (this.yytext = "", this.match = "");
454
- for (var C = this._currentRules(), e = 0; e < C.length; e++)
455
- if (p = this._input.match(this.rules[C[e]]), p && (!d || p[0].length > d[0].length)) {
456
- if (d = p, l = e, this.options.backtrack_lexer) {
457
- if (c = this.test_match(p, C[e]), c !== !1)
458
- return c;
459
- if (this._backtrack) {
460
- d = !1;
461
- continue;
462
- } else
463
- return !1;
464
- } else if (!this.options.flex)
465
- break;
466
- }
467
- return d ? (c = this.test_match(d, C[l]), c !== !1 ? c : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
468
- ` + this.showPosition(), {
469
- text: "",
470
- token: null,
471
- line: this.yylineno
472
- });
473
- }, "next"),
474
- // return next match that has a token
475
- lex: /* @__PURE__ */ f(function() {
476
- var d = this.next();
477
- return d || this.lex();
478
- }, "lex"),
479
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
480
- begin: /* @__PURE__ */ f(function(d) {
481
- this.conditionStack.push(d);
482
- }, "begin"),
483
- // pop the previously active lexer condition state off the condition stack
484
- popState: /* @__PURE__ */ f(function() {
485
- var d = this.conditionStack.length - 1;
486
- return d > 0 ? this.conditionStack.pop() : this.conditionStack[0];
487
- }, "popState"),
488
- // produce the lexer rule set which is active for the currently active lexer condition state
489
- _currentRules: /* @__PURE__ */ f(function() {
490
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
491
- }, "_currentRules"),
492
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
493
- topState: /* @__PURE__ */ f(function(d) {
494
- return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
495
- }, "topState"),
496
- // alias for begin(condition)
497
- pushState: /* @__PURE__ */ f(function(d) {
498
- this.begin(d);
499
- }, "pushState"),
500
- // return the number of states currently on the stack
501
- stateStackSize: /* @__PURE__ */ f(function() {
502
- return this.conditionStack.length;
503
- }, "stateStackSize"),
504
- options: {},
505
- performAction: /* @__PURE__ */ f(function(d, p, l, C) {
506
- switch (l) {
507
- case 0:
508
- return 62;
509
- case 1:
510
- return 63;
511
- case 2:
512
- return 64;
513
- case 3:
514
- return 65;
515
- case 4:
516
- break;
517
- case 5:
518
- break;
519
- case 6:
520
- return this.begin("acc_title"), 33;
521
- case 7:
522
- return this.popState(), "acc_title_value";
523
- case 8:
524
- return this.begin("acc_descr"), 35;
525
- case 9:
526
- return this.popState(), "acc_descr_value";
527
- case 10:
528
- this.begin("acc_descr_multiline");
529
- break;
530
- case 11:
531
- this.popState();
532
- break;
533
- case 12:
534
- return "acc_descr_multiline_value";
535
- case 13:
536
- return 8;
537
- case 14:
538
- break;
539
- case 15:
540
- return 7;
541
- case 16:
542
- return 7;
543
- case 17:
544
- return "EDGE_STATE";
545
- case 18:
546
- this.begin("callback_name");
547
- break;
548
- case 19:
549
- this.popState();
550
- break;
551
- case 20:
552
- this.popState(), this.begin("callback_args");
553
- break;
554
- case 21:
555
- return 79;
556
- case 22:
557
- this.popState();
558
- break;
559
- case 23:
560
- return 80;
561
- case 24:
562
- this.popState();
563
- break;
564
- case 25:
565
- return "STR";
566
- case 26:
567
- this.begin("string");
568
- break;
569
- case 27:
570
- return 82;
571
- case 28:
572
- return 57;
573
- case 29:
574
- return this.begin("namespace"), 42;
575
- case 30:
576
- return this.popState(), 8;
577
- case 31:
578
- break;
579
- case 32:
580
- return this.begin("namespace-body"), 39;
581
- case 33:
582
- this.popState(), this.less(0);
583
- break;
584
- case 34:
585
- return this.popState(), 41;
586
- case 35:
587
- return "EOF_IN_STRUCT";
588
- case 36:
589
- return 8;
590
- case 37:
591
- break;
592
- case 38:
593
- return "EDGE_STATE";
594
- case 39:
595
- return this.begin("class"), 48;
596
- case 40:
597
- return this.popState(), 8;
598
- case 41:
599
- break;
600
- case 42:
601
- return this.popState(), this.popState(), 41;
602
- case 43:
603
- return this.begin("class-body"), 39;
604
- case 44:
605
- return this.popState(), 41;
606
- case 45:
607
- return "EOF_IN_STRUCT";
608
- case 46:
609
- return "EDGE_STATE";
610
- case 47:
611
- return "OPEN_IN_STRUCT";
612
- case 48:
613
- break;
614
- case 49:
615
- return "MEMBER";
616
- case 50:
617
- return 83;
618
- case 51:
619
- return 75;
620
- case 52:
621
- return 76;
622
- case 53:
623
- return 78;
624
- case 54:
625
- return 54;
626
- case 55:
627
- return 56;
628
- case 56:
629
- return 46;
630
- case 57:
631
- return 47;
632
- case 58:
633
- return 81;
634
- case 59:
635
- this.popState();
636
- break;
637
- case 60:
638
- return "GENERICTYPE";
639
- case 61:
640
- this.begin("generic");
641
- break;
642
- case 62:
643
- this.popState();
644
- break;
645
- case 63:
646
- return "BQUOTE_STR";
647
- case 64:
648
- this.begin("bqstring");
649
- break;
650
- case 65:
651
- return 77;
652
- case 66:
653
- return 77;
654
- case 67:
655
- return 77;
656
- case 68:
657
- return 77;
658
- case 69:
659
- return 69;
660
- case 70:
661
- return 69;
662
- case 71:
663
- return 71;
664
- case 72:
665
- return 71;
666
- case 73:
667
- return 70;
668
- case 74:
669
- return 68;
670
- case 75:
671
- return 72;
672
- case 76:
673
- return 73;
674
- case 77:
675
- return 74;
676
- case 78:
677
- return 22;
678
- case 79:
679
- return 44;
680
- case 80:
681
- return 100;
682
- case 81:
683
- return 18;
684
- case 82:
685
- return "PLUS";
686
- case 83:
687
- return 87;
688
- case 84:
689
- return 61;
690
- case 85:
691
- return 89;
692
- case 86:
693
- return 89;
694
- case 87:
695
- return 90;
696
- case 88:
697
- return "EQUALS";
698
- case 89:
699
- return "EQUALS";
700
- case 90:
701
- return 60;
702
- case 91:
703
- return 12;
704
- case 92:
705
- return 14;
706
- case 93:
707
- return "PUNCTUATION";
708
- case 94:
709
- return 86;
710
- case 95:
711
- return 102;
712
- case 96:
713
- return 50;
714
- case 97:
715
- return 50;
716
- case 98:
717
- return 9;
718
- }
719
- }, "anonymous"),
720
- rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:classDef\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/],
721
- conditions: { "namespace-body": { rules: [26, 29, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, namespace: { rules: [26, 29, 30, 31, 32, 33, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, "class-body": { rules: [26, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, class: { rules: [26, 40, 41, 42, 43, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, acc_descr: { rules: [9, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, acc_title: { rules: [7, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, callback_args: { rules: [22, 23, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, callback_name: { rules: [19, 20, 21, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, href: { rules: [26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, struct: { rules: [26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, generic: { rules: [26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, bqstring: { rules: [26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, string: { rules: [24, 25, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 29, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98], inclusive: !0 } }
722
- };
723
- return O;
724
- })();
725
- Se.lexer = He;
726
- function oe() {
727
- this.yy = {};
728
- }
729
- return f(oe, "Parser"), oe.prototype = Se, Se.Parser = oe, new oe();
730
- })();
731
- we.parser = we;
732
- var Et = we, je = ["#", "+", "~", "-", ""], Xe = class {
733
- static {
734
- f(this, "ClassMember");
735
- }
736
- constructor(t, i) {
737
- this.memberType = i, this.visibility = "", this.classifier = "", this.text = "";
738
- const a = bt(t, F());
739
- this.parseMember(a);
740
- }
741
- getDisplayDetails() {
742
- let t = this.visibility + G(this.id);
743
- this.memberType === "method" && (t += `(${G(this.parameters.trim())})`, this.returnType && (t += " : " + G(this.returnType))), t = t.trim();
744
- const i = this.parseClassifier();
745
- return {
746
- displayText: t,
747
- cssStyle: i
748
- };
749
- }
750
- parseMember(t) {
751
- let i = "";
752
- if (this.memberType === "method") {
753
- const n = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);
754
- if (n) {
755
- const o = n[1] ? n[1].trim() : "";
756
- if (je.includes(o) && (this.visibility = o), this.id = n[2], this.parameters = n[3] ? n[3].trim() : "", i = n[4] ? n[4].trim() : "", this.returnType = n[5] ? n[5].trim() : "", i === "") {
757
- const h = this.returnType.substring(this.returnType.length - 1);
758
- /[$*]/.exec(h) && (i = h, this.returnType = this.returnType.substring(0, this.returnType.length - 1));
759
- }
760
- }
761
- } else {
762
- const r = t.length, n = t.substring(0, 1), o = t.substring(r - 1);
763
- je.includes(n) && (this.visibility = n), /[$*]/.exec(o) && (i = o), this.id = t.substring(
764
- this.visibility === "" ? 0 : 1,
765
- i === "" ? r : r - 1
766
- );
767
- }
768
- this.classifier = i, this.id = this.id.startsWith(" ") ? " " + this.id.trim() : this.id.trim();
769
- const a = `${this.visibility ? "\\" + this.visibility : ""}${G(this.id)}${this.memberType === "method" ? `(${G(this.parameters)})${this.returnType ? " : " + G(this.returnType) : ""}` : ""}`;
770
- this.text = a.replaceAll("<", "&lt;").replaceAll(">", "&gt;"), this.text.startsWith("\\&lt;") && (this.text = this.text.replace("\\&lt;", "~"));
771
- }
772
- parseClassifier() {
773
- switch (this.classifier) {
774
- case "*":
775
- return "font-style:italic;";
776
- case "$":
777
- return "text-decoration:underline;";
778
- default:
779
- return "";
780
- }
781
- }
782
- }, Ae = "classId-", qe = 0, V = /* @__PURE__ */ f((t) => I.sanitizeText(t, F()), "sanitizeText"), Tt = class Me {
783
- constructor() {
784
- this.relations = [], this.classes = /* @__PURE__ */ new Map(), this.styleClasses = /* @__PURE__ */ new Map(), this.notes = /* @__PURE__ */ new Map(), this.interfaces = [], this.namespaces = /* @__PURE__ */ new Map(), this.namespaceCounter = 0, this.namespaceStack = [], this.diagramId = "", this.functions = [], this.lineType = {
785
- LINE: 0,
786
- DOTTED_LINE: 1
787
- }, this.relationType = {
788
- AGGREGATION: 0,
789
- EXTENSION: 1,
790
- COMPOSITION: 2,
791
- DEPENDENCY: 3,
792
- LOLLIPOP: 4
793
- }, this.setupToolTips = /* @__PURE__ */ f((i) => {
794
- const a = kt();
795
- pe(i).select("svg").selectAll("g").filter(function() {
796
- return pe(this).attr("title") !== null;
797
- }).on("mouseover", (o) => {
798
- const h = pe(o.currentTarget), u = h.attr("title");
799
- if (!u)
800
- return;
801
- const g = o.currentTarget.getBoundingClientRect();
802
- a.transition().duration(200).style("opacity", ".9"), a.html(nt.sanitize(u)).style("left", `${window.scrollX + g.left + g.width / 2}px`).style("top", `${window.scrollY + g.bottom + 4}px`), h.classed("hover", !0);
803
- }).on("mouseout", (o) => {
804
- a.transition().duration(500).style("opacity", 0), pe(o.currentTarget).classed("hover", !1);
805
- });
806
- }, "setupToolTips"), this.direction = "TB", this.setAccTitle = lt, this.getAccTitle = ut, this.setAccDescription = ot, this.getAccDescription = ct, this.setDiagramTitle = ht, this.getDiagramTitle = dt, this.getConfig = /* @__PURE__ */ f(() => F().class, "getConfig"), this.functions.push(this.setupToolTips.bind(this)), this.clear(), this.addRelation = this.addRelation.bind(this), this.addClassesToNamespace = this.addClassesToNamespace.bind(this), this.addNamespace = this.addNamespace.bind(this), this.popNamespace = this.popNamespace.bind(this), this.setCssClass = this.setCssClass.bind(this), this.addMembers = this.addMembers.bind(this), this.addClass = this.addClass.bind(this), this.setClassLabel = this.setClassLabel.bind(this), this.addAnnotation = this.addAnnotation.bind(this), this.addMember = this.addMember.bind(this), this.cleanupLabel = this.cleanupLabel.bind(this), this.addNote = this.addNote.bind(this), this.defineClass = this.defineClass.bind(this), this.setDirection = this.setDirection.bind(this), this.setLink = this.setLink.bind(this), this.bindFunctions = this.bindFunctions.bind(this), this.clear = this.clear.bind(this), this.setTooltip = this.setTooltip.bind(this), this.setClickEvent = this.setClickEvent.bind(this), this.setCssStyle = this.setCssStyle.bind(this);
807
- }
808
- static {
809
- f(this, "ClassDB");
810
- }
811
- splitClassNameAndType(i) {
812
- const a = I.sanitizeText(i, F());
813
- let r = "", n = a;
814
- if (a.indexOf("~") > 0) {
815
- const o = a.split("~");
816
- n = V(o[0]), r = V(o[1]);
817
- }
818
- return { className: n, type: r };
819
- }
820
- setClassLabel(i, a) {
821
- const r = I.sanitizeText(i, F());
822
- a && (a = V(a));
823
- const { className: n } = this.splitClassNameAndType(r);
824
- this.classes.get(n).label = a, this.classes.get(n).text = `${a}${this.classes.get(n).type ? `<${this.classes.get(n).type}>` : ""}`;
825
- }
826
- /**
827
- * Function called by parser when a node definition has been found.
828
- *
829
- * @param id - ID of the class to add
830
- * @public
831
- */
832
- addClass(i) {
833
- const a = I.sanitizeText(i, F()), { className: r, type: n } = this.splitClassNameAndType(a);
834
- if (this.classes.has(r))
835
- return;
836
- const o = I.sanitizeText(r, F());
837
- this.classes.set(o, {
838
- id: o,
839
- type: n,
840
- label: o,
841
- text: `${o}${n ? `&lt;${n}&gt;` : ""}`,
842
- shape: "classBox",
843
- cssClasses: "default",
844
- methods: [],
845
- members: [],
846
- annotations: [],
847
- styles: [],
848
- domId: Ae + o + "-" + qe
849
- }), qe++;
850
- }
851
- addInterface(i, a) {
852
- const r = {
853
- id: `interface${this.interfaces.length}`,
854
- label: i,
855
- classId: a
856
- };
857
- this.interfaces.push(r);
858
- }
859
- /**
860
- * Sets the diagram's SVG element ID, used to prefix domIds for uniqueness
861
- * across multiple diagrams on the same page.
862
- */
863
- setDiagramId(i) {
864
- this.diagramId = i;
865
- }
866
- /**
867
- * Function to lookup domId from id in the graph definition.
868
- * When diagramId is set, returns the prefixed version for DOM uniqueness.
869
- *
870
- * @param id - class ID to lookup
871
- * @public
872
- */
873
- lookUpDomId(i) {
874
- const a = I.sanitizeText(i, F());
875
- if (this.classes.has(a)) {
876
- const r = this.classes.get(a).domId;
877
- return this.diagramId ? `${this.diagramId}-${r}` : r;
878
- }
879
- throw new Error("Class not found: " + a);
880
- }
881
- clear() {
882
- this.relations = [], this.classes = /* @__PURE__ */ new Map(), this.notes = /* @__PURE__ */ new Map(), this.interfaces = [], this.functions = [], this.functions.push(this.setupToolTips.bind(this)), this.namespaces = /* @__PURE__ */ new Map(), this.namespaceCounter = 0, this.namespaceStack = [], this.diagramId = "", this.direction = "TB", pt();
883
- }
884
- getClass(i) {
885
- return this.classes.get(i);
886
- }
887
- getClasses() {
888
- return this.classes;
889
- }
890
- getRelations() {
891
- return this.relations;
892
- }
893
- getNote(i) {
894
- const a = typeof i == "number" ? `note${i}` : i;
895
- return this.notes.get(a);
896
- }
897
- getNotes() {
898
- return this.notes;
899
- }
900
- addRelation(i) {
901
- Ie.debug("Adding relation: " + JSON.stringify(i));
902
- const a = [
903
- this.relationType.LOLLIPOP,
904
- this.relationType.AGGREGATION,
905
- this.relationType.COMPOSITION,
906
- this.relationType.DEPENDENCY,
907
- this.relationType.EXTENSION
908
- ];
909
- i.relation.type1 === this.relationType.LOLLIPOP && !a.includes(i.relation.type2) ? (this.addClass(i.id2), this.addInterface(i.id1, i.id2), i.id1 = `interface${this.interfaces.length - 1}`) : i.relation.type2 === this.relationType.LOLLIPOP && !a.includes(i.relation.type1) ? (this.addClass(i.id1), this.addInterface(i.id2, i.id1), i.id2 = `interface${this.interfaces.length - 1}`) : (this.addClass(i.id1), this.addClass(i.id2)), i.id1 = this.splitClassNameAndType(i.id1).className, i.id2 = this.splitClassNameAndType(i.id2).className, i.relationTitle1 = I.sanitizeText(
910
- i.relationTitle1.trim(),
911
- F()
912
- ), i.relationTitle2 = I.sanitizeText(
913
- i.relationTitle2.trim(),
914
- F()
915
- ), this.relations.push(i);
916
- }
917
- /**
918
- * Adds an annotation to the specified class Annotations mark special properties of the given type
919
- * (like 'interface' or 'service')
920
- *
921
- * @param className - The class name
922
- * @param annotation - The name of the annotation without any brackets
923
- * @public
924
- */
925
- addAnnotation(i, a) {
926
- const r = this.splitClassNameAndType(i).className;
927
- this.classes.get(r).annotations.push(a);
928
- }
929
- /**
930
- * Adds a member to the specified class
931
- *
932
- * @param className - The class name
933
- * @param member - The full name of the member. If the member is enclosed in `<<brackets>>` it is
934
- * treated as an annotation If the member is ending with a closing bracket ) it is treated as a
935
- * method Otherwise the member will be treated as a normal property
936
- * @public
937
- */
938
- addMember(i, a) {
939
- this.addClass(i);
940
- const r = this.splitClassNameAndType(i).className, n = this.classes.get(r);
941
- if (typeof a == "string") {
942
- const o = a.trim();
943
- o.startsWith("<<") && o.endsWith(">>") ? n.annotations.push(V(o.substring(2, o.length - 2))) : o.indexOf(")") > 0 ? n.methods.push(new Xe(o, "method")) : o && n.members.push(new Xe(o, "attribute"));
944
- }
945
- }
946
- addMembers(i, a) {
947
- Array.isArray(a) && (a.reverse(), a.forEach((r) => this.addMember(i, r)));
948
- }
949
- addNote(i, a) {
950
- const r = this.notes.size, n = {
951
- id: `note${r}`,
952
- class: a,
953
- text: i,
954
- index: r
955
- };
956
- return this.notes.set(n.id, n), n.id;
957
- }
958
- cleanupLabel(i) {
959
- return i.startsWith(":") && (i = i.substring(1)), V(i.trim());
960
- }
961
- /**
962
- * Called by parser when assigning cssClass to a class
963
- *
964
- * @param ids - Comma separated list of ids
965
- * @param className - Class to add
966
- */
967
- setCssClass(i, a) {
968
- i.split(",").forEach((r) => {
969
- let n = r;
970
- /\d/.exec(r[0]) && (n = Ae + n), n = this.splitClassNameAndType(n).className;
971
- const o = this.classes.get(n);
972
- o && (o.cssClasses += " " + a);
973
- });
974
- }
975
- defineClass(i, a) {
976
- for (const r of i) {
977
- let n = this.styleClasses.get(r);
978
- n === void 0 && (n = { id: r, styles: [], textStyles: [] }, this.styleClasses.set(r, n)), a && a.forEach((o) => {
979
- if (/color/.exec(o)) {
980
- const h = o.replace("fill", "bgFill");
981
- n.textStyles.push(h);
982
- }
983
- n.styles.push(o);
984
- }), this.classes.forEach((o) => {
985
- o.cssClasses.includes(r) && o.styles.push(...a.flatMap((h) => h.split(",")));
986
- });
987
- }
988
- }
989
- /**
990
- * Called by parser when a tooltip is found, e.g. a clickable element.
991
- *
992
- * @param ids - Comma separated list of ids
993
- * @param tooltip - Tooltip to add
994
- */
995
- setTooltip(i, a) {
996
- i.split(",").forEach((r) => {
997
- if (a !== void 0) {
998
- const n = this.splitClassNameAndType(r).className, o = this.classes.get(n);
999
- o && (o.tooltip = V(a));
1000
- }
1001
- });
1002
- }
1003
- getTooltip(i, a) {
1004
- return a && this.namespaces.has(a) ? this.namespaces.get(a).classes.get(i).tooltip : this.classes.get(i).tooltip;
1005
- }
1006
- /**
1007
- * Called by parser when a link is found. Adds the URL to the vertex data.
1008
- *
1009
- * @param ids - Comma separated list of ids
1010
- * @param linkStr - URL to create a link for
1011
- * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
1012
- */
1013
- setLink(i, a, r) {
1014
- const n = F();
1015
- i.split(",").forEach((o) => {
1016
- let h = o;
1017
- /\d/.exec(o[0]) && (h = Ae + h), h = this.splitClassNameAndType(h).className;
1018
- const u = this.classes.get(h);
1019
- u && (u.link = Oe.formatUrl(a, n), n.securityLevel === "sandbox" ? u.linkTarget = "_top" : typeof r == "string" ? u.linkTarget = V(r) : u.linkTarget = "_blank");
1020
- }), this.setCssClass(i, "clickable");
1021
- }
1022
- /**
1023
- * Called by parser when a click definition is found. Registers an event handler.
1024
- *
1025
- * @param ids - Comma separated list of ids
1026
- * @param functionName - Function to be called on click
1027
- * @param functionArgs - Function args the function should be called with
1028
- */
1029
- setClickEvent(i, a, r) {
1030
- i.split(",").forEach((n) => {
1031
- this.setClickFunc(n, a, r);
1032
- const o = this.splitClassNameAndType(n).className, h = this.classes.get(o);
1033
- h && (h.haveCallback = !0);
1034
- }), this.setCssClass(i, "clickable");
1035
- }
1036
- setClickFunc(i, a, r) {
1037
- const n = I.sanitizeText(i, F());
1038
- if (F().securityLevel !== "loose" || a === void 0)
1039
- return;
1040
- const h = this.splitClassNameAndType(n).className;
1041
- if (this.classes.has(h)) {
1042
- let u = [];
1043
- if (typeof r == "string") {
1044
- u = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1045
- for (let g = 0; g < u.length; g++) {
1046
- let m = u[g].trim();
1047
- m.startsWith('"') && m.endsWith('"') && (m = m.substr(1, m.length - 2)), u[g] = m;
1048
- }
1049
- }
1050
- u.length === 0 && u.push(h), this.functions.push(() => {
1051
- const g = this.lookUpDomId(h), m = document.querySelector(`[id="${g}"]`);
1052
- m !== null && m.addEventListener(
1053
- "click",
1054
- () => {
1055
- Oe.runFunc(a, ...u);
1056
- },
1057
- !1
1058
- );
1059
- });
1060
- }
1061
- }
1062
- bindFunctions(i) {
1063
- this.functions.forEach((a) => {
1064
- a(i);
1065
- });
1066
- }
1067
- // Utility function to escape HTML meta-characters
1068
- escapeHtml(i) {
1069
- return i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1070
- }
1071
- getDirection() {
1072
- return this.direction;
1073
- }
1074
- setDirection(i) {
1075
- this.direction = i;
1076
- }
1077
- static resolveQualifiedId(i, a) {
1078
- const r = a.at(-1);
1079
- return r ? `${r}.${i}` : i;
1080
- }
1081
- static getAncestorIds(i) {
1082
- const a = i.split("."), r = new Array(a.length);
1083
- r[0] = a[0];
1084
- for (let n = 1; n < a.length; n++)
1085
- r[n] = `${r[n - 1]}.${a[n]}`;
1086
- return r;
1087
- }
1088
- createNamespaceNode(i, a, r, n = !1) {
1089
- return {
1090
- id: i,
1091
- label: a,
1092
- classes: /* @__PURE__ */ new Map(),
1093
- notes: /* @__PURE__ */ new Map(),
1094
- children: /* @__PURE__ */ new Map(),
1095
- domId: Ae + i + "-" + this.namespaceCounter++,
1096
- parent: r,
1097
- explicit: n
1098
- };
1099
- }
1100
- linkParentChild(i, a) {
1101
- const r = this.namespaces.get(i), n = this.namespaces.get(a);
1102
- !r || !n || (r.children.has(a) || r.children.set(a, n), n.parent ??= i);
1103
- }
1104
- addNamespace(i, a) {
1105
- const r = Me.resolveQualifiedId(i, this.namespaceStack);
1106
- if (this.namespaceStack.push(r), this.namespaces.has(r)) {
1107
- const h = this.namespaces.get(r);
1108
- return h.explicit = !0, a && (h.label = a), r;
1109
- }
1110
- const n = r.split("."), o = Me.getAncestorIds(r);
1111
- for (let h = 0; h < o.length; h++) {
1112
- const u = o[h], g = h > 0 ? o[h - 1] : void 0, m = h === o.length - 1, _ = m && a ? a : n[h];
1113
- this.namespaces.has(u) ? m && (this.namespaces.get(u).explicit = !0) : this.namespaces.set(
1114
- u,
1115
- this.createNamespaceNode(u, _, g, m)
1116
- ), g && this.linkParentChild(g, u);
1117
- }
1118
- return r;
1119
- }
1120
- popNamespace() {
1121
- this.namespaceStack.pop();
1122
- }
1123
- getNamespace(i) {
1124
- return this.namespaces.get(i);
1125
- }
1126
- getNamespaces() {
1127
- return this.namespaces;
1128
- }
1129
- /**
1130
- * Function called by parser when a namespace definition has been found.
1131
- *
1132
- * @param id - ID of the namespace to add
1133
- * @param classNames - IDs of the class to add
1134
- * @param noteNames - IDs of the notes to add
1135
- * @public
1136
- */
1137
- addClassesToNamespace(i, a, r) {
1138
- if (this.namespaces.has(i)) {
1139
- for (const n of a) {
1140
- const { className: o } = this.splitClassNameAndType(n), h = this.getClass(o);
1141
- h.parent = i, this.namespaces.get(i).classes.set(o, h);
1142
- }
1143
- for (const n of r) {
1144
- const o = this.getNote(n);
1145
- o.parent = i, this.namespaces.get(i).notes.set(n, o);
1146
- }
1147
- }
1148
- }
1149
- setCssStyle(i, a) {
1150
- const r = this.classes.get(i);
1151
- if (!(!a || !r))
1152
- for (const n of a)
1153
- n.includes(",") ? r.styles.push(...n.split(",")) : r.styles.push(n);
1154
- }
1155
- /**
1156
- * Gets the arrow marker for a type index
1157
- *
1158
- * @param type - The type to look for
1159
- * @returns The arrow marker
1160
- */
1161
- getArrowMarker(i) {
1162
- let a;
1163
- switch (i) {
1164
- case 0:
1165
- a = "aggregation";
1166
- break;
1167
- case 1:
1168
- a = "extension";
1169
- break;
1170
- case 2:
1171
- a = "composition";
1172
- break;
1173
- case 3:
1174
- a = "dependency";
1175
- break;
1176
- case 4:
1177
- a = "lollipop";
1178
- break;
1179
- default:
1180
- a = "none";
1181
- }
1182
- return a;
1183
- }
1184
- /**
1185
- * Walks up the namespace tree from the given id and returns the nearest ancestor
1186
- * (or the id itself) that is marked as explicit. Used by compact rendering mode
1187
- * to reassign children to the nearest user-declared namespace.
1188
- */
1189
- resolveExplicitAncestor(i) {
1190
- let a = i;
1191
- for (; a; ) {
1192
- const r = this.namespaces.get(a);
1193
- if (!r)
1194
- return;
1195
- if (r.explicit)
1196
- return a;
1197
- a = r.parent;
1198
- }
1199
- }
1200
- getData() {
1201
- const i = [], a = [], r = F(), n = r.class?.hierarchicalNamespaces ?? !0;
1202
- for (const u of this.namespaces.values()) {
1203
- if (!n && !u.explicit)
1204
- continue;
1205
- const g = {
1206
- id: u.id,
1207
- label: n ? u.label : u.id,
1208
- isGroup: !0,
1209
- padding: r.class.padding ?? 16,
1210
- // parent node must be one of [rect, roundedWithTitle, noteGroup, divider]
1211
- shape: "rect",
1212
- cssStyles: [],
1213
- look: r.look,
1214
- parentId: n ? u.parent : void 0
1215
- };
1216
- i.push(g);
1217
- }
1218
- let o = 0;
1219
- for (const u of this.classes.values()) {
1220
- const g = n ? u.parent : this.resolveExplicitAncestor(u.parent), m = {
1221
- ...u,
1222
- type: void 0,
1223
- isGroup: !1,
1224
- parentId: g,
1225
- look: r.look,
1226
- colorIndex: o++
1227
- };
1228
- i.push(m);
1229
- }
1230
- for (const u of this.notes.values()) {
1231
- const g = n ? u.parent : this.resolveExplicitAncestor(u.parent), m = {
1232
- id: u.id,
1233
- label: u.text,
1234
- isGroup: !1,
1235
- shape: "note",
1236
- padding: r.class.padding ?? 6,
1237
- cssStyles: [
1238
- "text-align: left",
1239
- "white-space: nowrap",
1240
- `fill: ${r.themeVariables.noteBkgColor}`,
1241
- `stroke: ${r.themeVariables.noteBorderColor}`
1242
- ],
1243
- look: r.look,
1244
- parentId: g,
1245
- labelType: "markdown"
1246
- };
1247
- i.push(m);
1248
- const _ = this.classes.get(u.class)?.id;
1249
- if (_) {
1250
- const U = {
1251
- id: `edgeNote${u.index}`,
1252
- start: u.id,
1253
- end: _,
1254
- type: "normal",
1255
- thickness: "normal",
1256
- classes: "relation",
1257
- arrowTypeStart: "none",
1258
- arrowTypeEnd: "none",
1259
- arrowheadStyle: "",
1260
- labelStyle: [""],
1261
- style: ["fill: none"],
1262
- pattern: "dotted",
1263
- look: r.look
1264
- };
1265
- a.push(U);
1266
- }
1267
- }
1268
- for (const u of this.interfaces) {
1269
- const g = {
1270
- id: u.id,
1271
- label: u.label,
1272
- isGroup: !1,
1273
- shape: "rect",
1274
- cssStyles: ["opacity: 0;"],
1275
- look: r.look
1276
- };
1277
- i.push(g);
1278
- }
1279
- let h = 0;
1280
- for (const u of this.relations) {
1281
- h++;
1282
- const g = {
1283
- id: At(u.id1, u.id2, {
1284
- prefix: "id",
1285
- counter: h
1286
- }),
1287
- start: u.id1,
1288
- end: u.id2,
1289
- type: "normal",
1290
- label: u.title,
1291
- labelpos: "c",
1292
- thickness: "normal",
1293
- classes: "relation",
1294
- arrowTypeStart: this.getArrowMarker(u.relation.type1),
1295
- arrowTypeEnd: this.getArrowMarker(u.relation.type2),
1296
- startLabelRight: u.relationTitle1 === "none" ? "" : u.relationTitle1,
1297
- endLabelLeft: u.relationTitle2 === "none" ? "" : u.relationTitle2,
1298
- arrowheadStyle: "",
1299
- labelStyle: ["display: inline-block"],
1300
- style: u.style || "",
1301
- pattern: u.relation.lineType == 1 ? "dashed" : "solid",
1302
- look: r.look,
1303
- labelType: "markdown"
1304
- };
1305
- a.push(g);
1306
- }
1307
- return { nodes: i, edges: a, other: {}, config: r, direction: this.getDirection() };
1308
- }
1309
- }, yt = /* @__PURE__ */ f((t) => {
1310
- const { theme: i, bkgColorArray: a, borderColorArray: r } = t;
1311
- if (!ft(i, r))
1312
- return "";
1313
- const n = gt(t.look), o = mt(a);
1314
- let h = "";
1315
- for (let u = 0; u < Ct(t.THEME_COLOR_LIMIT, r); u++) {
1316
- const g = r[u % r.length];
1317
- h += `
1318
-
1319
- [data-look="${n}"][data-color-id="color-${u}"].node .outer-path path {
1320
- stroke: ${g};
1321
- ${o ? `fill: ${a[u % a.length]};` : ""}
1322
- }
1323
-
1324
- [data-look="${n}"][data-color-id="color-${u}"].node .divider path {
1325
- stroke: ${g};
1326
- }
1327
- `;
1328
- }
1329
- return h;
1330
- }, "genColor"), Dt = /* @__PURE__ */ f((t) => `${yt(t)}
1331
- g.classGroup text {
1332
- fill: ${t.nodeBorder || t.classText};
1333
- stroke: none;
1334
- font-family: ${t.fontFamily};
1335
- font-size: 10px;
1336
-
1337
- .title {
1338
- font-weight: bolder;
1339
- }
1340
-
1341
- }
1342
-
1343
- .cluster-label text {
1344
- fill: ${t.titleColor};
1345
- }
1346
- .cluster-label span {
1347
- color: ${t.titleColor};
1348
- }
1349
- .cluster-label span p {
1350
- background-color: transparent;
1351
- }
1352
-
1353
- .cluster rect {
1354
- fill: ${t.clusterBkg};
1355
- stroke: ${t.clusterBorder};
1356
- stroke-width: 1px;
1357
- }
1358
-
1359
- .cluster text {
1360
- fill: ${t.titleColor};
1361
- }
1362
-
1363
- .cluster span {
1364
- color: ${t.titleColor};
1365
- }
1366
-
1367
- .nodeLabel, .edgeLabel {
1368
- color: ${t.classText};
1369
- }
1370
-
1371
- .noteLabel .nodeLabel, .noteLabel .edgeLabel {
1372
- color: ${t.noteTextColor};
1373
- }
1374
- .edgeLabel .label rect {
1375
- fill: ${t.mainBkg};
1376
- }
1377
- .label text {
1378
- fill: ${t.classText};
1379
- }
1380
-
1381
- .labelBkg {
1382
- background: ${t.mainBkg};
1383
- }
1384
- .edgeLabel .label span {
1385
- background: ${t.mainBkg};
1386
- }
1387
-
1388
- .classTitle {
1389
- font-weight: bolder;
1390
- }
1391
- .node rect,
1392
- .node circle,
1393
- .node ellipse,
1394
- .node polygon,
1395
- .node path {
1396
- fill: ${t.mainBkg};
1397
- stroke: ${t.nodeBorder};
1398
- stroke-width: ${t.strokeWidth};
1399
- }
1400
-
1401
-
1402
- .divider {
1403
- stroke: ${t.nodeBorder};
1404
- stroke-width: 1;
1405
- }
1406
-
1407
- g.clickable {
1408
- cursor: pointer;
1409
- }
1410
-
1411
- g.classGroup rect {
1412
- fill: ${t.mainBkg};
1413
- stroke: ${t.nodeBorder};
1414
- }
1415
-
1416
- g.classGroup line {
1417
- stroke: ${t.nodeBorder};
1418
- stroke-width: 1;
1419
- }
1420
-
1421
- .classLabel .box {
1422
- stroke: none;
1423
- stroke-width: 0;
1424
- fill: ${t.mainBkg};
1425
- opacity: 0.5;
1426
- }
1427
-
1428
- .classLabel .label {
1429
- fill: ${t.nodeBorder};
1430
- font-size: 10px;
1431
- }
1432
-
1433
- .relation {
1434
- stroke: ${t.lineColor};
1435
- stroke-width: ${t.strokeWidth};
1436
- fill: none;
1437
- }
1438
-
1439
- .dashed-line{
1440
- stroke-dasharray: 3;
1441
- }
1442
-
1443
- .dotted-line{
1444
- stroke-dasharray: 1 2;
1445
- }
1446
-
1447
- [id$="-compositionStart"], .composition {
1448
- fill: ${t.lineColor} !important;
1449
- stroke: ${t.lineColor} !important;
1450
- stroke-width: 1;
1451
- }
1452
-
1453
- [id$="-compositionEnd"], .composition {
1454
- fill: ${t.lineColor} !important;
1455
- stroke: ${t.lineColor} !important;
1456
- stroke-width: 1;
1457
- }
1458
-
1459
- [id$="-dependencyStart"], .dependency {
1460
- fill: ${t.lineColor} !important;
1461
- stroke: ${t.lineColor} !important;
1462
- stroke-width: 1;
1463
- }
1464
-
1465
- [id$="-dependencyEnd"], .dependency {
1466
- fill: ${t.lineColor} !important;
1467
- stroke: ${t.lineColor} !important;
1468
- stroke-width: 1;
1469
- }
1470
-
1471
- [id$="-extensionStart"], .extension {
1472
- fill: transparent !important;
1473
- stroke: ${t.lineColor} !important;
1474
- stroke-width: 1;
1475
- }
1476
-
1477
- [id$="-extensionEnd"], .extension {
1478
- fill: transparent !important;
1479
- stroke: ${t.lineColor} !important;
1480
- stroke-width: 1;
1481
- }
1482
-
1483
- [id$="-aggregationStart"], .aggregation {
1484
- fill: transparent !important;
1485
- stroke: ${t.lineColor} !important;
1486
- stroke-width: 1;
1487
- }
1488
-
1489
- [id$="-aggregationEnd"], .aggregation {
1490
- fill: transparent !important;
1491
- stroke: ${t.lineColor} !important;
1492
- stroke-width: 1;
1493
- }
1494
-
1495
- [id$="-lollipopStart"], .lollipop {
1496
- fill: ${t.mainBkg} !important;
1497
- stroke: ${t.lineColor} !important;
1498
- stroke-width: 1;
1499
- }
1500
-
1501
- [id$="-lollipopEnd"], .lollipop {
1502
- fill: ${t.mainBkg} !important;
1503
- stroke: ${t.lineColor} !important;
1504
- stroke-width: 1;
1505
- }
1506
-
1507
- .edgeTerminals {
1508
- font-size: 11px;
1509
- line-height: initial;
1510
- }
1511
-
1512
- .classTitleText {
1513
- text-anchor: middle;
1514
- font-size: 18px;
1515
- fill: ${t.textColor};
1516
- }
1517
-
1518
- .edgeLabel[data-look="neo"] {
1519
- background-color: ${t.edgeLabelBackground};
1520
- p {
1521
- background-color: ${t.edgeLabelBackground};
1522
- }
1523
- rect {
1524
- opacity: 0.5;
1525
- background-color: ${t.edgeLabelBackground};
1526
- fill: ${t.edgeLabelBackground};
1527
- }
1528
- text-align: center;
1529
- }
1530
- ${tt()}
1531
- `, "getStyles"), Ft = Dt, Bt = /* @__PURE__ */ f((t, i = "TB") => {
1532
- if (!t.doc)
1533
- return i;
1534
- let a = i;
1535
- for (const r of t.doc)
1536
- r.stmt === "dir" && (a = r.value);
1537
- return a;
1538
- }, "getDir"), _t = /* @__PURE__ */ f(function(t, i) {
1539
- return i.db.getClasses();
1540
- }, "getClasses"), St = /* @__PURE__ */ f(async function(t, i, a, r) {
1541
- Ie.info("REF0:"), Ie.info("Drawing class diagram (v3)", i);
1542
- const { securityLevel: n, state: o, layout: h } = F();
1543
- r.db.setDiagramId(i);
1544
- const u = r.db.getData(), g = st(i, n);
1545
- u.type = r.type, u.layoutAlgorithm = at(h), u.nodeSpacing = o?.nodeSpacing || 50, u.rankSpacing = o?.rankSpacing || 50, u.markers = ["aggregation", "extension", "composition", "dependency", "lollipop"], u.diagramId = i, await rt(u, g);
1546
- const m = 8;
1547
- Oe.insertTitle(
1548
- g,
1549
- "classDiagramTitleText",
1550
- o?.titleTopMargin ?? 25,
1551
- r.db.getDiagramTitle()
1552
- ), it(g, m, "classDiagram", o?.useMaxWidth ?? !0);
1553
- }, "draw"), Nt = {
1554
- getClasses: _t,
1555
- draw: St,
1556
- getDir: Bt
1557
- }, wt = {
1558
- parser: Et,
1559
- get db() {
1560
- return new Tt();
1561
- },
1562
- renderer: Nt,
1563
- styles: Ft,
1564
- init: /* @__PURE__ */ f((t) => {
1565
- t.class || (t.class = {}), t.class.arrowMarkerAbsolute = t.arrowMarkerAbsolute;
1566
- }, "init")
1567
- };
1568
- export {
1569
- wt as diagram
1570
- };