@bytechain.cn/colamd 1.5.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 (157) hide show
  1. package/.github/workflows/release.yml +66 -0
  2. package/.trae/documents/fix-mermaid-colors-and-sankey.md +50 -0
  3. package/CLAUDE.md +87 -0
  4. package/LICENSE +21 -0
  5. package/README.md +540 -0
  6. package/README_CN.md +543 -0
  7. package/demo.md +486 -0
  8. package/dist/main/index.js +735 -0
  9. package/dist/preload/index.js +71 -0
  10. package/dist/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  11. package/dist/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  12. package/dist/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  13. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  14. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  15. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  16. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  17. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  18. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  19. package/dist/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  20. package/dist/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  21. package/dist/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  22. package/dist/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  23. package/dist/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  24. package/dist/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  25. package/dist/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  26. package/dist/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  27. package/dist/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  28. package/dist/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  29. package/dist/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  30. package/dist/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  31. package/dist/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  32. package/dist/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  33. package/dist/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  34. package/dist/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  35. package/dist/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  36. package/dist/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  37. package/dist/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  38. package/dist/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  39. package/dist/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  40. package/dist/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  41. package/dist/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  42. package/dist/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  43. package/dist/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  44. package/dist/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  45. package/dist/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  46. package/dist/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  47. package/dist/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  48. package/dist/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  49. package/dist/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  50. package/dist/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  51. package/dist/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  52. package/dist/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  53. package/dist/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  54. package/dist/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  55. package/dist/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  56. package/dist/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  57. package/dist/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  58. package/dist/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  59. package/dist/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  60. package/dist/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  61. package/dist/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  62. package/dist/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  63. package/dist/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  64. package/dist/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  65. package/dist/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  66. package/dist/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  67. package/dist/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  68. package/dist/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  69. package/dist/renderer/assets/arc-tTbbM8LO.js +131 -0
  70. package/dist/renderer/assets/architectureDiagram-3BPJPVTR-CEgYow6c.js +8720 -0
  71. package/dist/renderer/assets/blockDiagram-GPEHLZMM-LHyVtPwW.js +3825 -0
  72. package/dist/renderer/assets/c4Diagram-AAUBKEIU-C1P1eJrf.js +2482 -0
  73. package/dist/renderer/assets/channel-upve91Tq.js +7 -0
  74. package/dist/renderer/assets/chunk-2J33WTMH-lag2vhq9.js +24 -0
  75. package/dist/renderer/assets/chunk-4BX2VUAB-BXJ8Ggh-.js +16 -0
  76. package/dist/renderer/assets/chunk-55IACEB6-CiBpxRa1.js +13 -0
  77. package/dist/renderer/assets/chunk-727SXJPM-ODeKQFXC.js +2016 -0
  78. package/dist/renderer/assets/chunk-AQP2D5EJ-BK7xJolB.js +1953 -0
  79. package/dist/renderer/assets/chunk-FMBD7UC4-BxpCZPtz.js +19 -0
  80. package/dist/renderer/assets/chunk-ND2GUHAM-CqqaU9Ue.js +116 -0
  81. package/dist/renderer/assets/chunk-QZHKN3VN-Biq_K124.js +19 -0
  82. package/dist/renderer/assets/classDiagram-4FO5ZUOK-Cq95X99o.js +23 -0
  83. package/dist/renderer/assets/classDiagram-v2-Q7XG4LA2-Cq95X99o.js +23 -0
  84. package/dist/renderer/assets/cose-bilkent-S5V4N54A-XasiD0bu.js +4942 -0
  85. package/dist/renderer/assets/cytoscape.esm-CpHeHM5e.js +30269 -0
  86. package/dist/renderer/assets/dagre-BM42HDAG-Nq84Gfx4.js +705 -0
  87. package/dist/renderer/assets/defaultLocale-B2RvLBDe.js +206 -0
  88. package/dist/renderer/assets/diagram-2AECGRRQ-DwuB1GWt.js +301 -0
  89. package/dist/renderer/assets/diagram-5GNKFQAL-C2tgeI1h.js +169 -0
  90. package/dist/renderer/assets/diagram-KO2AKTUF-D5KzjNBc.js +632 -0
  91. package/dist/renderer/assets/diagram-LMA3HP47-C12xHS1c.js +212 -0
  92. package/dist/renderer/assets/diagram-OG6HWLK6-CnxI9oEa.js +851 -0
  93. package/dist/renderer/assets/erDiagram-TEJ5UH35-D_uPaKwn.js +1227 -0
  94. package/dist/renderer/assets/flowDiagram-I6XJVG4X-B6q_1-tE.js +2332 -0
  95. package/dist/renderer/assets/ganttDiagram-6RSMTGT7-CFo7ifF9.js +3720 -0
  96. package/dist/renderer/assets/gitGraphDiagram-PVQCEYII-WSexHTnq.js +1373 -0
  97. package/dist/renderer/assets/graph-DyX_9f6d.js +1988 -0
  98. package/dist/renderer/assets/index-DW7LS8C1.js +72292 -0
  99. package/dist/renderer/assets/index-dyHEFYvY.css +2184 -0
  100. package/dist/renderer/assets/infoDiagram-5YYISTIA-DaeJdLRq.js +31 -0
  101. package/dist/renderer/assets/init-ZxktEp_H.js +16 -0
  102. package/dist/renderer/assets/ishikawaDiagram-YF4QCWOH-DDCZc35f.js +967 -0
  103. package/dist/renderer/assets/journeyDiagram-JHISSGLW-BEdmpAgl.js +1255 -0
  104. package/dist/renderer/assets/kanban-definition-UN3LZRKU-BEFtQcFb.js +1052 -0
  105. package/dist/renderer/assets/layout-CAJgQHdw.js +2610 -0
  106. package/dist/renderer/assets/linear-B2ggJ8Am.js +340 -0
  107. package/dist/renderer/assets/mindmap-definition-RKZ34NQL-DSxVgHB5.js +1180 -0
  108. package/dist/renderer/assets/ordinal-DSZU4PqD.js +76 -0
  109. package/dist/renderer/assets/pieDiagram-4H26LBE5-CwYoJBuL.js +246 -0
  110. package/dist/renderer/assets/quadrantDiagram-W4KKPZXB-CST9Fvg9.js +1344 -0
  111. package/dist/renderer/assets/requirementDiagram-4Y6WPE33-DtrH52jS.js +1204 -0
  112. package/dist/renderer/assets/sankeyDiagram-5OEKKPKP-ca1tPzJ_.js +1274 -0
  113. package/dist/renderer/assets/sequenceDiagram-3UESZ5HK-Dfp1EJZ7.js +4514 -0
  114. package/dist/renderer/assets/stateDiagram-AJRCARHV-Bha2QoNB.js +450 -0
  115. package/dist/renderer/assets/stateDiagram-v2-BHNVJYJU-DWgFUYu1.js +21 -0
  116. package/dist/renderer/assets/timeline-definition-PNZ67QCA-C3h_-OTj.js +1596 -0
  117. package/dist/renderer/assets/vennDiagram-CIIHVFJN-DFzjSrZi.js +2486 -0
  118. package/dist/renderer/assets/wardley-L42UT6IY-Cx-VbqoS.js +30699 -0
  119. package/dist/renderer/assets/wardleyDiagram-YWT4CUSO-S2D9XqX6.js +975 -0
  120. package/dist/renderer/assets/xychartDiagram-2RQKCTM6-Cfxigbts.js +1932 -0
  121. package/dist/renderer/index.html +19 -0
  122. package/docs/agent-diff-view.md +48 -0
  123. package/electron-builder.yml +57 -0
  124. package/electron.vite.config.ts +30 -0
  125. package/package.json +40 -0
  126. package/resources/entitlements.mac.plist +12 -0
  127. package/resources/icon.icns +0 -0
  128. package/resources/icon.png +0 -0
  129. package/resources/icon.svg +23 -0
  130. package/resources/templates/slides/icon.png +0 -0
  131. package/resources/templates/slides/slides-template.md +74 -0
  132. package/resources/templates/slides/template.html +535 -0
  133. package/scripts/afterPack.js +13 -0
  134. package/src/main/index.ts +881 -0
  135. package/src/preload/index.ts +110 -0
  136. package/src/renderer/editor/editor.ts +204 -0
  137. package/src/renderer/editor/html-view.ts +15 -0
  138. package/src/renderer/editor/plugins/index.ts +76 -0
  139. package/src/renderer/editor/plugins/math-plugin.ts +297 -0
  140. package/src/renderer/editor/plugins/mermaid-plugin-custom.css +431 -0
  141. package/src/renderer/editor/plugins/mermaid-plugin-dark.css +428 -0
  142. package/src/renderer/editor/plugins/mermaid-plugin-elegant.css +443 -0
  143. package/src/renderer/editor/plugins/mermaid-plugin-newsprint.css +208 -0
  144. package/src/renderer/editor/plugins/mermaid-plugin.css +111 -0
  145. package/src/renderer/editor/plugins/mermaid-plugin.ts +679 -0
  146. package/src/renderer/env.d.ts +7 -0
  147. package/src/renderer/index.html +18 -0
  148. package/src/renderer/main.ts +303 -0
  149. package/src/renderer/themes/base.css +509 -0
  150. package/src/renderer/themes/theme-manager.ts +40 -0
  151. package/themes/README.md +280 -0
  152. package/themes/elegant.css +664 -0
  153. package/themes/guizang.css +732 -0
  154. package/tsconfig.json +14 -0
  155. package/tsconfig.main.json +11 -0
  156. package/tsconfig.preload.json +11 -0
  157. package/tsconfig.renderer.json +12 -0
@@ -0,0 +1,2016 @@
1
+ import { g as getIconStyles } from "./chunk-FMBD7UC4-BxpCZPtz.js";
2
+ import { c as createTooltip } from "./chunk-ND2GUHAM-CqqaU9Ue.js";
3
+ import { g as getDiagramElement } from "./chunk-55IACEB6-CiBpxRa1.js";
4
+ import { s as setupViewPortForSVG } from "./chunk-2J33WTMH-lag2vhq9.js";
5
+ import { _ as __name, l as log, c as getConfig2, o as getRegisteredLayoutAlgorithm, r as render, u as utils_default, d as select, y as purify, b as setAccTitle, a as getAccTitle, s as setAccDescription, g as getAccDescription, p as setDiagramTitle, q as getDiagramTitle, k as common_default, z as clear, x as getEdgeId, i as sanitizeText, Q as parseGenericTypes } from "./index-DW7LS8C1.js";
6
+ var parser = (function() {
7
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
8
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
9
+ return o2;
10
+ }, "o"), $V0 = [1, 18], $V1 = [1, 19], $V2 = [1, 20], $V3 = [1, 41], $V4 = [1, 26], $V5 = [1, 42], $V6 = [1, 24], $V7 = [1, 25], $V8 = [1, 32], $V9 = [1, 33], $Va = [1, 34], $Vb = [1, 45], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 37], $Vf = [1, 38], $Vg = [1, 27], $Vh = [1, 28], $Vi = [1, 29], $Vj = [1, 30], $Vk = [1, 31], $Vl = [1, 44], $Vm = [1, 46], $Vn = [1, 43], $Vo = [1, 47], $Vp = [1, 9], $Vq = [1, 8, 9], $Vr = [1, 58], $Vs = [1, 59], $Vt = [1, 60], $Vu = [1, 61], $Vv = [1, 62], $Vw = [1, 63], $Vx = [1, 64], $Vy = [1, 8, 9, 41], $Vz = [1, 77], $VA = [1, 8, 9, 12, 13, 22, 39, 41, 44, 46, 68, 69, 70, 71, 72, 73, 74, 79, 81], $VB = [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], $VC = [13, 60, 86, 100, 102, 103], $VD = [13, 60, 73, 74, 86, 100, 102, 103], $VE = [13, 60, 68, 69, 70, 71, 72, 86, 100, 102, 103], $VF = [1, 103], $VG = [1, 121], $VH = [1, 117], $VI = [1, 113], $VJ = [1, 119], $VK = [1, 114], $VL = [1, 115], $VM = [1, 116], $VN = [1, 118], $VO = [1, 120], $VP = [22, 50, 60, 61, 82, 86, 87, 88, 89, 90], $VQ = [1, 128], $VR = [12, 39], $VS = [1, 8, 9, 39, 41, 44, 46], $VT = [1, 8, 9, 22], $VU = [1, 153], $VV = [1, 8, 9, 61], $VW = [1, 8, 9, 22, 50, 60, 61, 82, 86, 87, 88, 89, 90];
11
+ var parser2 = {
12
+ trace: /* @__PURE__ */ __name(function trace() {
13
+ }, "trace"),
14
+ yy: {},
15
+ 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 },
16
+ 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" },
17
+ 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]],
18
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
19
+ var $0 = $$.length - 1;
20
+ switch (yystate) {
21
+ case 8:
22
+ this.$ = $$[$0 - 1];
23
+ break;
24
+ case 9:
25
+ case 10:
26
+ case 13:
27
+ case 15:
28
+ this.$ = $$[$0];
29
+ break;
30
+ case 11:
31
+ case 14:
32
+ this.$ = $$[$0 - 2] + "." + $$[$0];
33
+ break;
34
+ case 12:
35
+ case 16:
36
+ this.$ = $$[$0 - 1] + $$[$0];
37
+ break;
38
+ case 17:
39
+ case 18:
40
+ this.$ = $$[$0 - 1] + "~" + $$[$0] + "~";
41
+ break;
42
+ case 19:
43
+ yy.addRelation($$[$0]);
44
+ break;
45
+ case 20:
46
+ $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
47
+ yy.addRelation($$[$0 - 1]);
48
+ break;
49
+ case 31:
50
+ this.$ = $$[$0].trim();
51
+ yy.setAccTitle(this.$);
52
+ break;
53
+ case 32:
54
+ case 33:
55
+ this.$ = $$[$0].trim();
56
+ yy.setAccDescription(this.$);
57
+ break;
58
+ case 34:
59
+ yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1][0], $$[$0 - 1][1]);
60
+ yy.popNamespace();
61
+ break;
62
+ case 35:
63
+ yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1][0], $$[$0 - 1][1]);
64
+ yy.popNamespace();
65
+ break;
66
+ case 36:
67
+ this.$ = yy.addNamespace($$[$0]);
68
+ break;
69
+ case 37:
70
+ this.$ = yy.addNamespace($$[$0 - 1], $$[$0]);
71
+ break;
72
+ case 38:
73
+ this.$ = [[$$[$0]], []];
74
+ break;
75
+ case 39:
76
+ this.$ = [[$$[$0 - 1]], []];
77
+ break;
78
+ case 40:
79
+ $$[$0][0].unshift($$[$0 - 2]);
80
+ this.$ = $$[$0];
81
+ break;
82
+ case 41:
83
+ this.$ = [[], [$$[$0]]];
84
+ break;
85
+ case 42:
86
+ this.$ = [[], [$$[$0 - 1]]];
87
+ break;
88
+ case 43:
89
+ $$[$0][1].unshift($$[$0 - 2]);
90
+ this.$ = $$[$0];
91
+ break;
92
+ case 44:
93
+ case 45:
94
+ this.$ = [[], []];
95
+ break;
96
+ case 46:
97
+ this.$ = $$[$0];
98
+ break;
99
+ case 48:
100
+ yy.setCssClass($$[$0 - 2], $$[$0]);
101
+ break;
102
+ case 49:
103
+ yy.addMembers($$[$0 - 3], $$[$0 - 1]);
104
+ break;
105
+ case 51:
106
+ yy.setCssClass($$[$0 - 5], $$[$0 - 3]);
107
+ yy.addMembers($$[$0 - 5], $$[$0 - 1]);
108
+ break;
109
+ case 52:
110
+ yy.addAnnotation($$[$0 - 3], $$[$0 - 1]);
111
+ break;
112
+ case 53:
113
+ yy.addAnnotation($$[$0 - 6], $$[$0 - 4]);
114
+ yy.addMembers($$[$0 - 6], $$[$0 - 1]);
115
+ break;
116
+ case 54:
117
+ yy.addAnnotation($$[$0 - 5], $$[$0 - 3]);
118
+ break;
119
+ case 55:
120
+ this.$ = $$[$0];
121
+ yy.addClass($$[$0]);
122
+ break;
123
+ case 56:
124
+ this.$ = $$[$0 - 1];
125
+ yy.addClass($$[$0 - 1]);
126
+ yy.setClassLabel($$[$0 - 1], $$[$0]);
127
+ break;
128
+ case 60:
129
+ yy.addAnnotation($$[$0], $$[$0 - 2]);
130
+ break;
131
+ case 61:
132
+ case 74:
133
+ this.$ = [$$[$0]];
134
+ break;
135
+ case 62:
136
+ $$[$0].push($$[$0 - 1]);
137
+ this.$ = $$[$0];
138
+ break;
139
+ case 63:
140
+ break;
141
+ case 64:
142
+ yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
143
+ break;
144
+ case 65:
145
+ break;
146
+ case 66:
147
+ break;
148
+ case 67:
149
+ this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" };
150
+ break;
151
+ case 68:
152
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" };
153
+ break;
154
+ case 69:
155
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] };
156
+ break;
157
+ case 70:
158
+ this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };
159
+ break;
160
+ case 71:
161
+ this.$ = yy.addNote($$[$0], $$[$0 - 1]);
162
+ break;
163
+ case 72:
164
+ this.$ = yy.addNote($$[$0]);
165
+ break;
166
+ case 73:
167
+ this.$ = $$[$0 - 2];
168
+ yy.defineClass($$[$0 - 1], $$[$0]);
169
+ break;
170
+ case 75:
171
+ this.$ = $$[$0 - 2].concat([$$[$0]]);
172
+ break;
173
+ case 76:
174
+ yy.setDirection("TB");
175
+ break;
176
+ case 77:
177
+ yy.setDirection("BT");
178
+ break;
179
+ case 78:
180
+ yy.setDirection("RL");
181
+ break;
182
+ case 79:
183
+ yy.setDirection("LR");
184
+ break;
185
+ case 80:
186
+ this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };
187
+ break;
188
+ case 81:
189
+ this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] };
190
+ break;
191
+ case 82:
192
+ this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] };
193
+ break;
194
+ case 83:
195
+ this.$ = { type1: "none", type2: "none", lineType: $$[$0] };
196
+ break;
197
+ case 84:
198
+ this.$ = yy.relationType.AGGREGATION;
199
+ break;
200
+ case 85:
201
+ this.$ = yy.relationType.EXTENSION;
202
+ break;
203
+ case 86:
204
+ this.$ = yy.relationType.COMPOSITION;
205
+ break;
206
+ case 87:
207
+ this.$ = yy.relationType.DEPENDENCY;
208
+ break;
209
+ case 88:
210
+ this.$ = yy.relationType.LOLLIPOP;
211
+ break;
212
+ case 89:
213
+ this.$ = yy.lineType.LINE;
214
+ break;
215
+ case 90:
216
+ this.$ = yy.lineType.DOTTED_LINE;
217
+ break;
218
+ case 91:
219
+ case 97:
220
+ this.$ = $$[$0 - 2];
221
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
222
+ break;
223
+ case 92:
224
+ case 98:
225
+ this.$ = $$[$0 - 3];
226
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);
227
+ yy.setTooltip($$[$0 - 2], $$[$0]);
228
+ break;
229
+ case 93:
230
+ this.$ = $$[$0 - 2];
231
+ yy.setLink($$[$0 - 1], $$[$0]);
232
+ break;
233
+ case 94:
234
+ this.$ = $$[$0 - 3];
235
+ yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);
236
+ break;
237
+ case 95:
238
+ this.$ = $$[$0 - 3];
239
+ yy.setLink($$[$0 - 2], $$[$0 - 1]);
240
+ yy.setTooltip($$[$0 - 2], $$[$0]);
241
+ break;
242
+ case 96:
243
+ this.$ = $$[$0 - 4];
244
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
245
+ yy.setTooltip($$[$0 - 3], $$[$0 - 1]);
246
+ break;
247
+ case 99:
248
+ this.$ = $$[$0 - 3];
249
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
250
+ break;
251
+ case 100:
252
+ this.$ = $$[$0 - 4];
253
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
254
+ yy.setTooltip($$[$0 - 3], $$[$0]);
255
+ break;
256
+ case 101:
257
+ this.$ = $$[$0 - 3];
258
+ yy.setLink($$[$0 - 2], $$[$0]);
259
+ break;
260
+ case 102:
261
+ this.$ = $$[$0 - 4];
262
+ yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]);
263
+ break;
264
+ case 103:
265
+ this.$ = $$[$0 - 4];
266
+ yy.setLink($$[$0 - 3], $$[$0 - 1]);
267
+ yy.setTooltip($$[$0 - 3], $$[$0]);
268
+ break;
269
+ case 104:
270
+ this.$ = $$[$0 - 5];
271
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
272
+ yy.setTooltip($$[$0 - 4], $$[$0 - 1]);
273
+ break;
274
+ case 105:
275
+ this.$ = $$[$0 - 2];
276
+ yy.setCssStyle($$[$0 - 1], $$[$0]);
277
+ break;
278
+ case 106:
279
+ yy.setCssClass($$[$0 - 1], $$[$0]);
280
+ break;
281
+ case 107:
282
+ this.$ = [$$[$0]];
283
+ break;
284
+ case 108:
285
+ $$[$0 - 2].push($$[$0]);
286
+ this.$ = $$[$0 - 2];
287
+ break;
288
+ case 110:
289
+ this.$ = $$[$0 - 1] + $$[$0];
290
+ break;
291
+ }
292
+ }, "anonymous"),
293
+ 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: $V0, 35: $V1, 37: $V2, 38: 22, 42: $V3, 43: 23, 46: $V4, 48: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vp, [2, 5], { 8: [1, 48] }), { 8: [1, 49] }, o($Vq, [2, 19], { 22: [1, 50] }), o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), o($Vq, [2, 25]), o($Vq, [2, 26]), o($Vq, [2, 27]), o($Vq, [2, 28]), o($Vq, [2, 29]), o($Vq, [2, 30]), { 34: [1, 51] }, { 36: [1, 52] }, o($Vq, [2, 33]), o($Vq, [2, 63], { 53: 53, 66: 56, 67: 57, 13: [1, 54], 22: [1, 55], 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }), { 39: [1, 65] }, o($Vy, [2, 47], { 39: [1, 67], 44: [1, 66], 46: [1, 68] }), o($Vq, [2, 65]), o($Vq, [2, 66]), { 16: 69, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn }, { 16: 39, 17: 40, 19: 70, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 71, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 72, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 60: [1, 73] }, { 13: [1, 74] }, { 16: 39, 17: 40, 19: 75, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 13: $Vz, 55: 76 }, { 58: 78, 60: [1, 79] }, o($Vq, [2, 76]), o($Vq, [2, 77]), o($Vq, [2, 78]), o($Vq, [2, 79]), o($VA, [2, 13], { 16: 39, 17: 40, 19: 81, 18: [1, 80], 20: [1, 82], 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }), o($VA, [2, 15], { 20: [1, 83] }), { 15: 84, 16: 85, 17: 86, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 87, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VB, [2, 133]), o($VB, [2, 134]), o($VB, [2, 135]), o($VB, [2, 136]), o([1, 8, 9, 12, 13, 20, 22, 39, 41, 44, 46, 68, 69, 70, 71, 72, 73, 74, 79, 81], [2, 137]), o($Vp, [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: $V0, 35: $V1, 37: $V2, 42: $V3, 46: $V4, 48: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }), { 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: $V0, 35: $V1, 37: $V2, 38: 22, 42: $V3, 43: 23, 46: $V4, 48: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($Vq, [2, 20]), o($Vq, [2, 31]), o($Vq, [2, 32]), { 13: [1, 91], 16: 39, 17: 40, 19: 90, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 53: 92, 66: 56, 67: 57, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }, o($Vq, [2, 64]), { 67: 93, 73: $Vw, 74: $Vx }, o($VC, [2, 83], { 66: 94, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VD, [2, 84]), o($VD, [2, 85]), o($VD, [2, 86]), o($VD, [2, 87]), o($VD, [2, 88]), o($VE, [2, 89]), o($VE, [2, 90]), { 8: [1, 96], 23: 99, 24: 97, 30: 98, 38: 22, 40: 95, 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 16: 100, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn }, { 41: [1, 102], 45: 101, 51: $VF }, { 16: 104, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn }, { 47: [1, 105] }, { 13: [1, 106] }, { 13: [1, 107] }, { 79: [1, 108], 81: [1, 109] }, { 22: $VG, 50: $VH, 59: 110, 60: $VI, 82: $VJ, 84: 111, 85: 112, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, { 60: [1, 122] }, { 13: $Vz, 55: 123 }, o($Vy, [2, 72]), o($Vy, [2, 138]), { 22: $VG, 50: $VH, 59: 124, 60: $VI, 61: [1, 125], 82: $VJ, 84: 111, 85: 112, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, o($VP, [2, 74]), { 16: 39, 17: 40, 19: 126, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 18]), { 11: 127, 12: $VQ, 39: [2, 36] }, o($VR, [2, 9], { 16: 85, 17: 86, 15: 130, 18: [1, 129], 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }), o($VR, [2, 10]), o($VS, [2, 55], { 11: 131, 12: $VQ }), o($Vp, [2, 7]), { 9: [1, 132] }, o($VT, [2, 67]), { 16: 39, 17: 40, 19: 133, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 13: [1, 135], 16: 39, 17: 40, 19: 134, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VC, [2, 82], { 66: 136, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VC, [2, 81]), { 41: [1, 137] }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 138, 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 8: [1, 139], 41: [2, 38] }, { 8: [1, 140], 41: [2, 41] }, { 8: [1, 141], 41: [2, 44] }, o($Vy, [2, 48], { 39: [1, 142] }), { 41: [1, 143] }, o($Vy, [2, 50]), { 41: [2, 61], 45: 144, 51: $VF }, { 47: [1, 145] }, { 16: 39, 17: 40, 19: 146, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($Vq, [2, 91], { 13: [1, 147] }), o($Vq, [2, 93], { 13: [1, 149], 77: [1, 148] }), o($Vq, [2, 97], { 13: [1, 150], 80: [1, 151] }), { 13: [1, 152] }, o($Vq, [2, 105], { 61: $VU }), o($VV, [2, 107], { 85: 154, 22: $VG, 50: $VH, 60: $VI, 82: $VJ, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }), o($VW, [2, 109]), o($VW, [2, 111]), o($VW, [2, 112]), o($VW, [2, 113]), o($VW, [2, 114]), o($VW, [2, 115]), o($VW, [2, 116]), o($VW, [2, 117]), o($VW, [2, 118]), o($VW, [2, 119]), o($Vq, [2, 106]), o($Vy, [2, 71]), o($Vq, [2, 73], { 61: $VU }), { 60: [1, 155] }, o($VA, [2, 14]), { 39: [2, 37] }, { 13: [1, 156] }, { 15: 157, 16: 85, 17: 86, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VR, [2, 12]), o($VS, [2, 56]), { 1: [2, 4] }, o($VT, [2, 69]), o($VT, [2, 68]), { 16: 39, 17: 40, 19: 158, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VC, [2, 80]), o($Vy, [2, 34]), { 41: [1, 159] }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 160, 41: [2, 39], 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 161, 41: [2, 42], 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 162, 41: [2, 45], 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 45: 163, 51: $VF }, o($Vy, [2, 49]), { 41: [2, 62] }, o($Vy, [2, 52], { 39: [1, 164] }), o($Vq, [2, 60]), o($Vq, [2, 92]), o($Vq, [2, 94]), o($Vq, [2, 95], { 77: [1, 165] }), o($Vq, [2, 98]), o($Vq, [2, 99], { 13: [1, 166] }), o($Vq, [2, 101], { 13: [1, 168], 77: [1, 167] }), { 22: $VG, 50: $VH, 60: $VI, 82: $VJ, 84: 169, 85: 112, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, o($VW, [2, 110]), o($VP, [2, 75]), { 14: [1, 170] }, o($VR, [2, 11]), o($VT, [2, 70]), o($Vy, [2, 35]), { 41: [2, 40] }, { 41: [2, 43] }, { 41: [2, 46] }, { 41: [1, 171] }, { 41: [1, 173], 45: 172, 51: $VF }, o($Vq, [2, 96]), o($Vq, [2, 100]), o($Vq, [2, 102]), o($Vq, [2, 103], { 77: [1, 174] }), o($VV, [2, 108], { 85: 154, 22: $VG, 50: $VH, 60: $VI, 82: $VJ, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }), o($VS, [2, 8]), o($Vy, [2, 51]), { 41: [1, 175] }, o($Vy, [2, 54]), o($Vq, [2, 104]), o($Vy, [2, 53])],
294
+ 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] },
295
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
296
+ if (hash.recoverable) {
297
+ this.trace(str);
298
+ } else {
299
+ var error = new Error(str);
300
+ error.hash = hash;
301
+ throw error;
302
+ }
303
+ }, "parseError"),
304
+ parse: /* @__PURE__ */ __name(function parse(input) {
305
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
306
+ var args = lstack.slice.call(arguments, 1);
307
+ var lexer2 = Object.create(this.lexer);
308
+ var sharedState = { yy: {} };
309
+ for (var k in this.yy) {
310
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
311
+ sharedState.yy[k] = this.yy[k];
312
+ }
313
+ }
314
+ lexer2.setInput(input, sharedState.yy);
315
+ sharedState.yy.lexer = lexer2;
316
+ sharedState.yy.parser = this;
317
+ if (typeof lexer2.yylloc == "undefined") {
318
+ lexer2.yylloc = {};
319
+ }
320
+ var yyloc = lexer2.yylloc;
321
+ lstack.push(yyloc);
322
+ var ranges = lexer2.options && lexer2.options.ranges;
323
+ if (typeof sharedState.yy.parseError === "function") {
324
+ this.parseError = sharedState.yy.parseError;
325
+ } else {
326
+ this.parseError = Object.getPrototypeOf(this).parseError;
327
+ }
328
+ function popStack(n) {
329
+ stack.length = stack.length - 2 * n;
330
+ vstack.length = vstack.length - n;
331
+ lstack.length = lstack.length - n;
332
+ }
333
+ __name(popStack, "popStack");
334
+ function lex() {
335
+ var token;
336
+ token = tstack.pop() || lexer2.lex() || EOF;
337
+ if (typeof token !== "number") {
338
+ if (token instanceof Array) {
339
+ tstack = token;
340
+ token = tstack.pop();
341
+ }
342
+ token = self.symbols_[token] || token;
343
+ }
344
+ return token;
345
+ }
346
+ __name(lex, "lex");
347
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
348
+ while (true) {
349
+ state = stack[stack.length - 1];
350
+ if (this.defaultActions[state]) {
351
+ action = this.defaultActions[state];
352
+ } else {
353
+ if (symbol === null || typeof symbol == "undefined") {
354
+ symbol = lex();
355
+ }
356
+ action = table[state] && table[state][symbol];
357
+ }
358
+ if (typeof action === "undefined" || !action.length || !action[0]) {
359
+ var errStr = "";
360
+ expected = [];
361
+ for (p in table[state]) {
362
+ if (this.terminals_[p] && p > TERROR) {
363
+ expected.push("'" + this.terminals_[p] + "'");
364
+ }
365
+ }
366
+ if (lexer2.showPosition) {
367
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
368
+ } else {
369
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
370
+ }
371
+ this.parseError(errStr, {
372
+ text: lexer2.match,
373
+ token: this.terminals_[symbol] || symbol,
374
+ line: lexer2.yylineno,
375
+ loc: yyloc,
376
+ expected
377
+ });
378
+ }
379
+ if (action[0] instanceof Array && action.length > 1) {
380
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
381
+ }
382
+ switch (action[0]) {
383
+ case 1:
384
+ stack.push(symbol);
385
+ vstack.push(lexer2.yytext);
386
+ lstack.push(lexer2.yylloc);
387
+ stack.push(action[1]);
388
+ symbol = null;
389
+ {
390
+ yyleng = lexer2.yyleng;
391
+ yytext = lexer2.yytext;
392
+ yylineno = lexer2.yylineno;
393
+ yyloc = lexer2.yylloc;
394
+ }
395
+ break;
396
+ case 2:
397
+ len = this.productions_[action[1]][1];
398
+ yyval.$ = vstack[vstack.length - len];
399
+ yyval._$ = {
400
+ first_line: lstack[lstack.length - (len || 1)].first_line,
401
+ last_line: lstack[lstack.length - 1].last_line,
402
+ first_column: lstack[lstack.length - (len || 1)].first_column,
403
+ last_column: lstack[lstack.length - 1].last_column
404
+ };
405
+ if (ranges) {
406
+ yyval._$.range = [
407
+ lstack[lstack.length - (len || 1)].range[0],
408
+ lstack[lstack.length - 1].range[1]
409
+ ];
410
+ }
411
+ r = this.performAction.apply(yyval, [
412
+ yytext,
413
+ yyleng,
414
+ yylineno,
415
+ sharedState.yy,
416
+ action[1],
417
+ vstack,
418
+ lstack
419
+ ].concat(args));
420
+ if (typeof r !== "undefined") {
421
+ return r;
422
+ }
423
+ if (len) {
424
+ stack = stack.slice(0, -1 * len * 2);
425
+ vstack = vstack.slice(0, -1 * len);
426
+ lstack = lstack.slice(0, -1 * len);
427
+ }
428
+ stack.push(this.productions_[action[1]][0]);
429
+ vstack.push(yyval.$);
430
+ lstack.push(yyval._$);
431
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
432
+ stack.push(newState);
433
+ break;
434
+ case 3:
435
+ return true;
436
+ }
437
+ }
438
+ return true;
439
+ }, "parse")
440
+ };
441
+ var lexer = /* @__PURE__ */ (function() {
442
+ var lexer2 = {
443
+ EOF: 1,
444
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
445
+ if (this.yy.parser) {
446
+ this.yy.parser.parseError(str, hash);
447
+ } else {
448
+ throw new Error(str);
449
+ }
450
+ }, "parseError"),
451
+ // resets the lexer, sets new input
452
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
453
+ this.yy = yy || this.yy || {};
454
+ this._input = input;
455
+ this._more = this._backtrack = this.done = false;
456
+ this.yylineno = this.yyleng = 0;
457
+ this.yytext = this.matched = this.match = "";
458
+ this.conditionStack = ["INITIAL"];
459
+ this.yylloc = {
460
+ first_line: 1,
461
+ first_column: 0,
462
+ last_line: 1,
463
+ last_column: 0
464
+ };
465
+ if (this.options.ranges) {
466
+ this.yylloc.range = [0, 0];
467
+ }
468
+ this.offset = 0;
469
+ return this;
470
+ }, "setInput"),
471
+ // consumes and returns one char from the input
472
+ input: /* @__PURE__ */ __name(function() {
473
+ var ch = this._input[0];
474
+ this.yytext += ch;
475
+ this.yyleng++;
476
+ this.offset++;
477
+ this.match += ch;
478
+ this.matched += ch;
479
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
480
+ if (lines) {
481
+ this.yylineno++;
482
+ this.yylloc.last_line++;
483
+ } else {
484
+ this.yylloc.last_column++;
485
+ }
486
+ if (this.options.ranges) {
487
+ this.yylloc.range[1]++;
488
+ }
489
+ this._input = this._input.slice(1);
490
+ return ch;
491
+ }, "input"),
492
+ // unshifts one char (or a string) into the input
493
+ unput: /* @__PURE__ */ __name(function(ch) {
494
+ var len = ch.length;
495
+ var lines = ch.split(/(?:\r\n?|\n)/g);
496
+ this._input = ch + this._input;
497
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
498
+ this.offset -= len;
499
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
500
+ this.match = this.match.substr(0, this.match.length - 1);
501
+ this.matched = this.matched.substr(0, this.matched.length - 1);
502
+ if (lines.length - 1) {
503
+ this.yylineno -= lines.length - 1;
504
+ }
505
+ var r = this.yylloc.range;
506
+ this.yylloc = {
507
+ first_line: this.yylloc.first_line,
508
+ last_line: this.yylineno + 1,
509
+ first_column: this.yylloc.first_column,
510
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
511
+ };
512
+ if (this.options.ranges) {
513
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
514
+ }
515
+ this.yyleng = this.yytext.length;
516
+ return this;
517
+ }, "unput"),
518
+ // When called from action, caches matched text and appends it on next action
519
+ more: /* @__PURE__ */ __name(function() {
520
+ this._more = true;
521
+ return this;
522
+ }, "more"),
523
+ // 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.
524
+ reject: /* @__PURE__ */ __name(function() {
525
+ if (this.options.backtrack_lexer) {
526
+ this._backtrack = true;
527
+ } else {
528
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
529
+ text: "",
530
+ token: null,
531
+ line: this.yylineno
532
+ });
533
+ }
534
+ return this;
535
+ }, "reject"),
536
+ // retain first n characters of the match
537
+ less: /* @__PURE__ */ __name(function(n) {
538
+ this.unput(this.match.slice(n));
539
+ }, "less"),
540
+ // displays already matched input, i.e. for error messages
541
+ pastInput: /* @__PURE__ */ __name(function() {
542
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
543
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
544
+ }, "pastInput"),
545
+ // displays upcoming input, i.e. for error messages
546
+ upcomingInput: /* @__PURE__ */ __name(function() {
547
+ var next = this.match;
548
+ if (next.length < 20) {
549
+ next += this._input.substr(0, 20 - next.length);
550
+ }
551
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
552
+ }, "upcomingInput"),
553
+ // displays the character position where the lexing error occurred, i.e. for error messages
554
+ showPosition: /* @__PURE__ */ __name(function() {
555
+ var pre = this.pastInput();
556
+ var c = new Array(pre.length + 1).join("-");
557
+ return pre + this.upcomingInput() + "\n" + c + "^";
558
+ }, "showPosition"),
559
+ // test the lexed token: return FALSE when not a match, otherwise return token
560
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
561
+ var token, lines, backup;
562
+ if (this.options.backtrack_lexer) {
563
+ backup = {
564
+ yylineno: this.yylineno,
565
+ yylloc: {
566
+ first_line: this.yylloc.first_line,
567
+ last_line: this.last_line,
568
+ first_column: this.yylloc.first_column,
569
+ last_column: this.yylloc.last_column
570
+ },
571
+ yytext: this.yytext,
572
+ match: this.match,
573
+ matches: this.matches,
574
+ matched: this.matched,
575
+ yyleng: this.yyleng,
576
+ offset: this.offset,
577
+ _more: this._more,
578
+ _input: this._input,
579
+ yy: this.yy,
580
+ conditionStack: this.conditionStack.slice(0),
581
+ done: this.done
582
+ };
583
+ if (this.options.ranges) {
584
+ backup.yylloc.range = this.yylloc.range.slice(0);
585
+ }
586
+ }
587
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
588
+ if (lines) {
589
+ this.yylineno += lines.length;
590
+ }
591
+ this.yylloc = {
592
+ first_line: this.yylloc.last_line,
593
+ last_line: this.yylineno + 1,
594
+ first_column: this.yylloc.last_column,
595
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
596
+ };
597
+ this.yytext += match[0];
598
+ this.match += match[0];
599
+ this.matches = match;
600
+ this.yyleng = this.yytext.length;
601
+ if (this.options.ranges) {
602
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
603
+ }
604
+ this._more = false;
605
+ this._backtrack = false;
606
+ this._input = this._input.slice(match[0].length);
607
+ this.matched += match[0];
608
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
609
+ if (this.done && this._input) {
610
+ this.done = false;
611
+ }
612
+ if (token) {
613
+ return token;
614
+ } else if (this._backtrack) {
615
+ for (var k in backup) {
616
+ this[k] = backup[k];
617
+ }
618
+ return false;
619
+ }
620
+ return false;
621
+ }, "test_match"),
622
+ // return next match in input
623
+ next: /* @__PURE__ */ __name(function() {
624
+ if (this.done) {
625
+ return this.EOF;
626
+ }
627
+ if (!this._input) {
628
+ this.done = true;
629
+ }
630
+ var token, match, tempMatch, index;
631
+ if (!this._more) {
632
+ this.yytext = "";
633
+ this.match = "";
634
+ }
635
+ var rules = this._currentRules();
636
+ for (var i = 0; i < rules.length; i++) {
637
+ tempMatch = this._input.match(this.rules[rules[i]]);
638
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
639
+ match = tempMatch;
640
+ index = i;
641
+ if (this.options.backtrack_lexer) {
642
+ token = this.test_match(tempMatch, rules[i]);
643
+ if (token !== false) {
644
+ return token;
645
+ } else if (this._backtrack) {
646
+ match = false;
647
+ continue;
648
+ } else {
649
+ return false;
650
+ }
651
+ } else if (!this.options.flex) {
652
+ break;
653
+ }
654
+ }
655
+ }
656
+ if (match) {
657
+ token = this.test_match(match, rules[index]);
658
+ if (token !== false) {
659
+ return token;
660
+ }
661
+ return false;
662
+ }
663
+ if (this._input === "") {
664
+ return this.EOF;
665
+ } else {
666
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
667
+ text: "",
668
+ token: null,
669
+ line: this.yylineno
670
+ });
671
+ }
672
+ }, "next"),
673
+ // return next match that has a token
674
+ lex: /* @__PURE__ */ __name(function lex() {
675
+ var r = this.next();
676
+ if (r) {
677
+ return r;
678
+ } else {
679
+ return this.lex();
680
+ }
681
+ }, "lex"),
682
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
683
+ begin: /* @__PURE__ */ __name(function begin(condition) {
684
+ this.conditionStack.push(condition);
685
+ }, "begin"),
686
+ // pop the previously active lexer condition state off the condition stack
687
+ popState: /* @__PURE__ */ __name(function popState() {
688
+ var n = this.conditionStack.length - 1;
689
+ if (n > 0) {
690
+ return this.conditionStack.pop();
691
+ } else {
692
+ return this.conditionStack[0];
693
+ }
694
+ }, "popState"),
695
+ // produce the lexer rule set which is active for the currently active lexer condition state
696
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
697
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
698
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
699
+ } else {
700
+ return this.conditions["INITIAL"].rules;
701
+ }
702
+ }, "_currentRules"),
703
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
704
+ topState: /* @__PURE__ */ __name(function topState(n) {
705
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
706
+ if (n >= 0) {
707
+ return this.conditionStack[n];
708
+ } else {
709
+ return "INITIAL";
710
+ }
711
+ }, "topState"),
712
+ // alias for begin(condition)
713
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
714
+ this.begin(condition);
715
+ }, "pushState"),
716
+ // return the number of states currently on the stack
717
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
718
+ return this.conditionStack.length;
719
+ }, "stateStackSize"),
720
+ options: {},
721
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
722
+ switch ($avoiding_name_collisions) {
723
+ case 0:
724
+ return 62;
725
+ case 1:
726
+ return 63;
727
+ case 2:
728
+ return 64;
729
+ case 3:
730
+ return 65;
731
+ case 4:
732
+ break;
733
+ case 5:
734
+ break;
735
+ case 6:
736
+ this.begin("acc_title");
737
+ return 33;
738
+ case 7:
739
+ this.popState();
740
+ return "acc_title_value";
741
+ case 8:
742
+ this.begin("acc_descr");
743
+ return 35;
744
+ case 9:
745
+ this.popState();
746
+ return "acc_descr_value";
747
+ case 10:
748
+ this.begin("acc_descr_multiline");
749
+ break;
750
+ case 11:
751
+ this.popState();
752
+ break;
753
+ case 12:
754
+ return "acc_descr_multiline_value";
755
+ case 13:
756
+ return 8;
757
+ case 14:
758
+ break;
759
+ case 15:
760
+ return 7;
761
+ case 16:
762
+ return 7;
763
+ case 17:
764
+ return "EDGE_STATE";
765
+ case 18:
766
+ this.begin("callback_name");
767
+ break;
768
+ case 19:
769
+ this.popState();
770
+ break;
771
+ case 20:
772
+ this.popState();
773
+ this.begin("callback_args");
774
+ break;
775
+ case 21:
776
+ return 79;
777
+ case 22:
778
+ this.popState();
779
+ break;
780
+ case 23:
781
+ return 80;
782
+ case 24:
783
+ this.popState();
784
+ break;
785
+ case 25:
786
+ return "STR";
787
+ case 26:
788
+ this.begin("string");
789
+ break;
790
+ case 27:
791
+ return 82;
792
+ case 28:
793
+ return 57;
794
+ case 29:
795
+ this.begin("namespace");
796
+ return 42;
797
+ case 30:
798
+ this.popState();
799
+ return 8;
800
+ case 31:
801
+ break;
802
+ case 32:
803
+ this.begin("namespace-body");
804
+ return 39;
805
+ case 33:
806
+ this.popState();
807
+ this.less(0);
808
+ break;
809
+ case 34:
810
+ this.popState();
811
+ return 41;
812
+ case 35:
813
+ return "EOF_IN_STRUCT";
814
+ case 36:
815
+ return 8;
816
+ case 37:
817
+ break;
818
+ case 38:
819
+ return "EDGE_STATE";
820
+ case 39:
821
+ this.begin("class");
822
+ return 48;
823
+ case 40:
824
+ this.popState();
825
+ return 8;
826
+ case 41:
827
+ break;
828
+ case 42:
829
+ this.popState();
830
+ this.popState();
831
+ return 41;
832
+ case 43:
833
+ this.begin("class-body");
834
+ return 39;
835
+ case 44:
836
+ this.popState();
837
+ return 41;
838
+ case 45:
839
+ return "EOF_IN_STRUCT";
840
+ case 46:
841
+ return "EDGE_STATE";
842
+ case 47:
843
+ return "OPEN_IN_STRUCT";
844
+ case 48:
845
+ break;
846
+ case 49:
847
+ return "MEMBER";
848
+ case 50:
849
+ return 83;
850
+ case 51:
851
+ return 75;
852
+ case 52:
853
+ return 76;
854
+ case 53:
855
+ return 78;
856
+ case 54:
857
+ return 54;
858
+ case 55:
859
+ return 56;
860
+ case 56:
861
+ return 46;
862
+ case 57:
863
+ return 47;
864
+ case 58:
865
+ return 81;
866
+ case 59:
867
+ this.popState();
868
+ break;
869
+ case 60:
870
+ return "GENERICTYPE";
871
+ case 61:
872
+ this.begin("generic");
873
+ break;
874
+ case 62:
875
+ this.popState();
876
+ break;
877
+ case 63:
878
+ return "BQUOTE_STR";
879
+ case 64:
880
+ this.begin("bqstring");
881
+ break;
882
+ case 65:
883
+ return 77;
884
+ case 66:
885
+ return 77;
886
+ case 67:
887
+ return 77;
888
+ case 68:
889
+ return 77;
890
+ case 69:
891
+ return 69;
892
+ case 70:
893
+ return 69;
894
+ case 71:
895
+ return 71;
896
+ case 72:
897
+ return 71;
898
+ case 73:
899
+ return 70;
900
+ case 74:
901
+ return 68;
902
+ case 75:
903
+ return 72;
904
+ case 76:
905
+ return 73;
906
+ case 77:
907
+ return 74;
908
+ case 78:
909
+ return 22;
910
+ case 79:
911
+ return 44;
912
+ case 80:
913
+ return 100;
914
+ case 81:
915
+ return 18;
916
+ case 82:
917
+ return "PLUS";
918
+ case 83:
919
+ return 87;
920
+ case 84:
921
+ return 61;
922
+ case 85:
923
+ return 89;
924
+ case 86:
925
+ return 89;
926
+ case 87:
927
+ return 90;
928
+ case 88:
929
+ return "EQUALS";
930
+ case 89:
931
+ return "EQUALS";
932
+ case 90:
933
+ return 60;
934
+ case 91:
935
+ return 12;
936
+ case 92:
937
+ return 14;
938
+ case 93:
939
+ return "PUNCTUATION";
940
+ case 94:
941
+ return 86;
942
+ case 95:
943
+ return 102;
944
+ case 96:
945
+ return 50;
946
+ case 97:
947
+ return 50;
948
+ case 98:
949
+ return 9;
950
+ }
951
+ }, "anonymous"),
952
+ 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)/, /^(?:$)/],
953
+ 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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": false }, "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": true } }
954
+ };
955
+ return lexer2;
956
+ })();
957
+ parser2.lexer = lexer;
958
+ function Parser() {
959
+ this.yy = {};
960
+ }
961
+ __name(Parser, "Parser");
962
+ Parser.prototype = parser2;
963
+ parser2.Parser = Parser;
964
+ return new Parser();
965
+ })();
966
+ parser.parser = parser;
967
+ var classDiagram_default = parser;
968
+ var visibilityValues = ["#", "+", "~", "-", ""];
969
+ var ClassMember = class {
970
+ static {
971
+ __name(this, "ClassMember");
972
+ }
973
+ constructor(input, memberType) {
974
+ this.memberType = memberType;
975
+ this.visibility = "";
976
+ this.classifier = "";
977
+ this.text = "";
978
+ const sanitizedInput = sanitizeText(input, getConfig2());
979
+ this.parseMember(sanitizedInput);
980
+ }
981
+ getDisplayDetails() {
982
+ let displayText = this.visibility + parseGenericTypes(this.id);
983
+ if (this.memberType === "method") {
984
+ displayText += `(${parseGenericTypes(this.parameters.trim())})`;
985
+ if (this.returnType) {
986
+ displayText += " : " + parseGenericTypes(this.returnType);
987
+ }
988
+ }
989
+ displayText = displayText.trim();
990
+ const cssStyle = this.parseClassifier();
991
+ return {
992
+ displayText,
993
+ cssStyle
994
+ };
995
+ }
996
+ parseMember(input) {
997
+ let potentialClassifier = "";
998
+ if (this.memberType === "method") {
999
+ const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/;
1000
+ const match = methodRegEx.exec(input);
1001
+ if (match) {
1002
+ const detectedVisibility = match[1] ? match[1].trim() : "";
1003
+ if (visibilityValues.includes(detectedVisibility)) {
1004
+ this.visibility = detectedVisibility;
1005
+ }
1006
+ this.id = match[2];
1007
+ this.parameters = match[3] ? match[3].trim() : "";
1008
+ potentialClassifier = match[4] ? match[4].trim() : "";
1009
+ this.returnType = match[5] ? match[5].trim() : "";
1010
+ if (potentialClassifier === "") {
1011
+ const lastChar = this.returnType.substring(this.returnType.length - 1);
1012
+ if (/[$*]/.exec(lastChar)) {
1013
+ potentialClassifier = lastChar;
1014
+ this.returnType = this.returnType.substring(0, this.returnType.length - 1);
1015
+ }
1016
+ }
1017
+ }
1018
+ } else {
1019
+ const length = input.length;
1020
+ const firstChar = input.substring(0, 1);
1021
+ const lastChar = input.substring(length - 1);
1022
+ if (visibilityValues.includes(firstChar)) {
1023
+ this.visibility = firstChar;
1024
+ }
1025
+ if (/[$*]/.exec(lastChar)) {
1026
+ potentialClassifier = lastChar;
1027
+ }
1028
+ this.id = input.substring(
1029
+ this.visibility === "" ? 0 : 1,
1030
+ potentialClassifier === "" ? length : length - 1
1031
+ );
1032
+ }
1033
+ this.classifier = potentialClassifier;
1034
+ this.id = this.id.startsWith(" ") ? " " + this.id.trim() : this.id.trim();
1035
+ const combinedText = `${this.visibility ? "\\" + this.visibility : ""}${parseGenericTypes(this.id)}${this.memberType === "method" ? `(${parseGenericTypes(this.parameters)})${this.returnType ? " : " + parseGenericTypes(this.returnType) : ""}` : ""}`;
1036
+ this.text = combinedText.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
1037
+ if (this.text.startsWith("\\&lt;")) {
1038
+ this.text = this.text.replace("\\&lt;", "~");
1039
+ }
1040
+ }
1041
+ parseClassifier() {
1042
+ switch (this.classifier) {
1043
+ case "*":
1044
+ return "font-style:italic;";
1045
+ case "$":
1046
+ return "text-decoration:underline;";
1047
+ default:
1048
+ return "";
1049
+ }
1050
+ }
1051
+ };
1052
+ var MERMAID_DOM_ID_PREFIX = "classId-";
1053
+ var classCounter = 0;
1054
+ var sanitizeText2 = /* @__PURE__ */ __name((txt) => common_default.sanitizeText(txt, getConfig2()), "sanitizeText");
1055
+ var ClassDB = class _ClassDB {
1056
+ constructor() {
1057
+ this.relations = [];
1058
+ this.classes = /* @__PURE__ */ new Map();
1059
+ this.styleClasses = /* @__PURE__ */ new Map();
1060
+ this.notes = /* @__PURE__ */ new Map();
1061
+ this.interfaces = [];
1062
+ this.namespaces = /* @__PURE__ */ new Map();
1063
+ this.namespaceCounter = 0;
1064
+ this.namespaceStack = [];
1065
+ this.diagramId = "";
1066
+ this.functions = [];
1067
+ this.lineType = {
1068
+ LINE: 0,
1069
+ DOTTED_LINE: 1
1070
+ };
1071
+ this.relationType = {
1072
+ AGGREGATION: 0,
1073
+ EXTENSION: 1,
1074
+ COMPOSITION: 2,
1075
+ DEPENDENCY: 3,
1076
+ LOLLIPOP: 4
1077
+ };
1078
+ this.setupToolTips = /* @__PURE__ */ __name((element) => {
1079
+ const tooltipElem = createTooltip();
1080
+ const svg = select(element).select("svg");
1081
+ const nodes = svg.selectAll("g").filter(function() {
1082
+ return select(this).attr("title") !== null;
1083
+ });
1084
+ nodes.on("mouseover", (event) => {
1085
+ const el = select(event.currentTarget);
1086
+ const title = el.attr("title");
1087
+ if (!title) {
1088
+ return;
1089
+ }
1090
+ const rect = event.currentTarget.getBoundingClientRect();
1091
+ tooltipElem.transition().duration(200).style("opacity", ".9");
1092
+ tooltipElem.html(purify.sanitize(title)).style("left", `${window.scrollX + rect.left + rect.width / 2}px`).style("top", `${window.scrollY + rect.bottom + 4}px`);
1093
+ el.classed("hover", true);
1094
+ }).on("mouseout", (event) => {
1095
+ tooltipElem.transition().duration(500).style("opacity", 0);
1096
+ select(event.currentTarget).classed("hover", false);
1097
+ });
1098
+ }, "setupToolTips");
1099
+ this.direction = "TB";
1100
+ this.setAccTitle = setAccTitle;
1101
+ this.getAccTitle = getAccTitle;
1102
+ this.setAccDescription = setAccDescription;
1103
+ this.getAccDescription = getAccDescription;
1104
+ this.setDiagramTitle = setDiagramTitle;
1105
+ this.getDiagramTitle = getDiagramTitle;
1106
+ this.getConfig = /* @__PURE__ */ __name(() => getConfig2().class, "getConfig");
1107
+ this.functions.push(this.setupToolTips.bind(this));
1108
+ this.clear();
1109
+ this.addRelation = this.addRelation.bind(this);
1110
+ this.addClassesToNamespace = this.addClassesToNamespace.bind(this);
1111
+ this.addNamespace = this.addNamespace.bind(this);
1112
+ this.popNamespace = this.popNamespace.bind(this);
1113
+ this.setCssClass = this.setCssClass.bind(this);
1114
+ this.addMembers = this.addMembers.bind(this);
1115
+ this.addClass = this.addClass.bind(this);
1116
+ this.setClassLabel = this.setClassLabel.bind(this);
1117
+ this.addAnnotation = this.addAnnotation.bind(this);
1118
+ this.addMember = this.addMember.bind(this);
1119
+ this.cleanupLabel = this.cleanupLabel.bind(this);
1120
+ this.addNote = this.addNote.bind(this);
1121
+ this.defineClass = this.defineClass.bind(this);
1122
+ this.setDirection = this.setDirection.bind(this);
1123
+ this.setLink = this.setLink.bind(this);
1124
+ this.bindFunctions = this.bindFunctions.bind(this);
1125
+ this.clear = this.clear.bind(this);
1126
+ this.setTooltip = this.setTooltip.bind(this);
1127
+ this.setClickEvent = this.setClickEvent.bind(this);
1128
+ this.setCssStyle = this.setCssStyle.bind(this);
1129
+ }
1130
+ static {
1131
+ __name(this, "ClassDB");
1132
+ }
1133
+ splitClassNameAndType(_id) {
1134
+ const id = common_default.sanitizeText(_id, getConfig2());
1135
+ let genericType = "";
1136
+ let className = id;
1137
+ if (id.indexOf("~") > 0) {
1138
+ const split = id.split("~");
1139
+ className = sanitizeText2(split[0]);
1140
+ genericType = sanitizeText2(split[1]);
1141
+ }
1142
+ return { className, type: genericType };
1143
+ }
1144
+ setClassLabel(_id, label) {
1145
+ const id = common_default.sanitizeText(_id, getConfig2());
1146
+ if (label) {
1147
+ label = sanitizeText2(label);
1148
+ }
1149
+ const { className } = this.splitClassNameAndType(id);
1150
+ this.classes.get(className).label = label;
1151
+ this.classes.get(className).text = `${label}${this.classes.get(className).type ? `<${this.classes.get(className).type}>` : ""}`;
1152
+ }
1153
+ /**
1154
+ * Function called by parser when a node definition has been found.
1155
+ *
1156
+ * @param id - ID of the class to add
1157
+ * @public
1158
+ */
1159
+ addClass(_id) {
1160
+ const id = common_default.sanitizeText(_id, getConfig2());
1161
+ const { className, type } = this.splitClassNameAndType(id);
1162
+ if (this.classes.has(className)) {
1163
+ return;
1164
+ }
1165
+ const name = common_default.sanitizeText(className, getConfig2());
1166
+ this.classes.set(name, {
1167
+ id: name,
1168
+ type,
1169
+ label: name,
1170
+ text: `${name}${type ? `&lt;${type}&gt;` : ""}`,
1171
+ shape: "classBox",
1172
+ cssClasses: "default",
1173
+ methods: [],
1174
+ members: [],
1175
+ annotations: [],
1176
+ styles: [],
1177
+ domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter
1178
+ });
1179
+ classCounter++;
1180
+ }
1181
+ addInterface(label, classId) {
1182
+ const classInterface = {
1183
+ id: `interface${this.interfaces.length}`,
1184
+ label,
1185
+ classId
1186
+ };
1187
+ this.interfaces.push(classInterface);
1188
+ }
1189
+ /**
1190
+ * Sets the diagram's SVG element ID, used to prefix domIds for uniqueness
1191
+ * across multiple diagrams on the same page.
1192
+ */
1193
+ setDiagramId(svgElementId) {
1194
+ this.diagramId = svgElementId;
1195
+ }
1196
+ /**
1197
+ * Function to lookup domId from id in the graph definition.
1198
+ * When diagramId is set, returns the prefixed version for DOM uniqueness.
1199
+ *
1200
+ * @param id - class ID to lookup
1201
+ * @public
1202
+ */
1203
+ lookUpDomId(_id) {
1204
+ const id = common_default.sanitizeText(_id, getConfig2());
1205
+ if (this.classes.has(id)) {
1206
+ const domId = this.classes.get(id).domId;
1207
+ return this.diagramId ? `${this.diagramId}-${domId}` : domId;
1208
+ }
1209
+ throw new Error("Class not found: " + id);
1210
+ }
1211
+ clear() {
1212
+ this.relations = [];
1213
+ this.classes = /* @__PURE__ */ new Map();
1214
+ this.notes = /* @__PURE__ */ new Map();
1215
+ this.interfaces = [];
1216
+ this.functions = [];
1217
+ this.functions.push(this.setupToolTips.bind(this));
1218
+ this.namespaces = /* @__PURE__ */ new Map();
1219
+ this.namespaceCounter = 0;
1220
+ this.namespaceStack = [];
1221
+ this.diagramId = "";
1222
+ this.direction = "TB";
1223
+ clear();
1224
+ }
1225
+ getClass(id) {
1226
+ return this.classes.get(id);
1227
+ }
1228
+ getClasses() {
1229
+ return this.classes;
1230
+ }
1231
+ getRelations() {
1232
+ return this.relations;
1233
+ }
1234
+ getNote(id) {
1235
+ const key = typeof id === "number" ? `note${id}` : id;
1236
+ return this.notes.get(key);
1237
+ }
1238
+ getNotes() {
1239
+ return this.notes;
1240
+ }
1241
+ addRelation(classRelation) {
1242
+ log.debug("Adding relation: " + JSON.stringify(classRelation));
1243
+ const invalidTypes = [
1244
+ this.relationType.LOLLIPOP,
1245
+ this.relationType.AGGREGATION,
1246
+ this.relationType.COMPOSITION,
1247
+ this.relationType.DEPENDENCY,
1248
+ this.relationType.EXTENSION
1249
+ ];
1250
+ if (classRelation.relation.type1 === this.relationType.LOLLIPOP && !invalidTypes.includes(classRelation.relation.type2)) {
1251
+ this.addClass(classRelation.id2);
1252
+ this.addInterface(classRelation.id1, classRelation.id2);
1253
+ classRelation.id1 = `interface${this.interfaces.length - 1}`;
1254
+ } else if (classRelation.relation.type2 === this.relationType.LOLLIPOP && !invalidTypes.includes(classRelation.relation.type1)) {
1255
+ this.addClass(classRelation.id1);
1256
+ this.addInterface(classRelation.id2, classRelation.id1);
1257
+ classRelation.id2 = `interface${this.interfaces.length - 1}`;
1258
+ } else {
1259
+ this.addClass(classRelation.id1);
1260
+ this.addClass(classRelation.id2);
1261
+ }
1262
+ classRelation.id1 = this.splitClassNameAndType(classRelation.id1).className;
1263
+ classRelation.id2 = this.splitClassNameAndType(classRelation.id2).className;
1264
+ classRelation.relationTitle1 = common_default.sanitizeText(
1265
+ classRelation.relationTitle1.trim(),
1266
+ getConfig2()
1267
+ );
1268
+ classRelation.relationTitle2 = common_default.sanitizeText(
1269
+ classRelation.relationTitle2.trim(),
1270
+ getConfig2()
1271
+ );
1272
+ this.relations.push(classRelation);
1273
+ }
1274
+ /**
1275
+ * Adds an annotation to the specified class Annotations mark special properties of the given type
1276
+ * (like 'interface' or 'service')
1277
+ *
1278
+ * @param className - The class name
1279
+ * @param annotation - The name of the annotation without any brackets
1280
+ * @public
1281
+ */
1282
+ addAnnotation(className, annotation) {
1283
+ const validatedClassName = this.splitClassNameAndType(className).className;
1284
+ this.classes.get(validatedClassName).annotations.push(annotation);
1285
+ }
1286
+ /**
1287
+ * Adds a member to the specified class
1288
+ *
1289
+ * @param className - The class name
1290
+ * @param member - The full name of the member. If the member is enclosed in `<<brackets>>` it is
1291
+ * treated as an annotation If the member is ending with a closing bracket ) it is treated as a
1292
+ * method Otherwise the member will be treated as a normal property
1293
+ * @public
1294
+ */
1295
+ addMember(className, member) {
1296
+ this.addClass(className);
1297
+ const validatedClassName = this.splitClassNameAndType(className).className;
1298
+ const theClass = this.classes.get(validatedClassName);
1299
+ if (typeof member === "string") {
1300
+ const memberString = member.trim();
1301
+ if (memberString.startsWith("<<") && memberString.endsWith(">>")) {
1302
+ theClass.annotations.push(sanitizeText2(memberString.substring(2, memberString.length - 2)));
1303
+ } else if (memberString.indexOf(")") > 0) {
1304
+ theClass.methods.push(new ClassMember(memberString, "method"));
1305
+ } else if (memberString) {
1306
+ theClass.members.push(new ClassMember(memberString, "attribute"));
1307
+ }
1308
+ }
1309
+ }
1310
+ addMembers(className, members) {
1311
+ if (Array.isArray(members)) {
1312
+ members.reverse();
1313
+ members.forEach((member) => this.addMember(className, member));
1314
+ }
1315
+ }
1316
+ addNote(text, className) {
1317
+ const index = this.notes.size;
1318
+ const note = {
1319
+ id: `note${index}`,
1320
+ class: className,
1321
+ text,
1322
+ index
1323
+ };
1324
+ this.notes.set(note.id, note);
1325
+ return note.id;
1326
+ }
1327
+ cleanupLabel(label) {
1328
+ if (label.startsWith(":")) {
1329
+ label = label.substring(1);
1330
+ }
1331
+ return sanitizeText2(label.trim());
1332
+ }
1333
+ /**
1334
+ * Called by parser when assigning cssClass to a class
1335
+ *
1336
+ * @param ids - Comma separated list of ids
1337
+ * @param className - Class to add
1338
+ */
1339
+ setCssClass(ids, className) {
1340
+ ids.split(",").forEach((_id) => {
1341
+ let id = _id;
1342
+ if (/\d/.exec(_id[0])) {
1343
+ id = MERMAID_DOM_ID_PREFIX + id;
1344
+ }
1345
+ const classNode = this.classes.get(id);
1346
+ if (classNode) {
1347
+ classNode.cssClasses += " " + className;
1348
+ }
1349
+ });
1350
+ }
1351
+ defineClass(ids, style) {
1352
+ for (const id of ids) {
1353
+ let styleClass = this.styleClasses.get(id);
1354
+ if (styleClass === void 0) {
1355
+ styleClass = { id, styles: [], textStyles: [] };
1356
+ this.styleClasses.set(id, styleClass);
1357
+ }
1358
+ if (style) {
1359
+ style.forEach((s) => {
1360
+ if (/color/.exec(s)) {
1361
+ const newStyle = s.replace("fill", "bgFill");
1362
+ styleClass.textStyles.push(newStyle);
1363
+ }
1364
+ styleClass.styles.push(s);
1365
+ });
1366
+ }
1367
+ this.classes.forEach((value) => {
1368
+ if (value.cssClasses.includes(id)) {
1369
+ value.styles.push(...style.flatMap((s) => s.split(",")));
1370
+ }
1371
+ });
1372
+ }
1373
+ }
1374
+ /**
1375
+ * Called by parser when a tooltip is found, e.g. a clickable element.
1376
+ *
1377
+ * @param ids - Comma separated list of ids
1378
+ * @param tooltip - Tooltip to add
1379
+ */
1380
+ setTooltip(ids, tooltip) {
1381
+ ids.split(",").forEach((id) => {
1382
+ if (tooltip !== void 0) {
1383
+ this.classes.get(id).tooltip = sanitizeText2(tooltip);
1384
+ }
1385
+ });
1386
+ }
1387
+ getTooltip(id, namespace) {
1388
+ if (namespace && this.namespaces.has(namespace)) {
1389
+ return this.namespaces.get(namespace).classes.get(id).tooltip;
1390
+ }
1391
+ return this.classes.get(id).tooltip;
1392
+ }
1393
+ /**
1394
+ * Called by parser when a link is found. Adds the URL to the vertex data.
1395
+ *
1396
+ * @param ids - Comma separated list of ids
1397
+ * @param linkStr - URL to create a link for
1398
+ * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
1399
+ */
1400
+ setLink(ids, linkStr, target) {
1401
+ const config = getConfig2();
1402
+ ids.split(",").forEach((_id) => {
1403
+ let id = _id;
1404
+ if (/\d/.exec(_id[0])) {
1405
+ id = MERMAID_DOM_ID_PREFIX + id;
1406
+ }
1407
+ const theClass = this.classes.get(id);
1408
+ if (theClass) {
1409
+ theClass.link = utils_default.formatUrl(linkStr, config);
1410
+ if (config.securityLevel === "sandbox") {
1411
+ theClass.linkTarget = "_top";
1412
+ } else if (typeof target === "string") {
1413
+ theClass.linkTarget = sanitizeText2(target);
1414
+ } else {
1415
+ theClass.linkTarget = "_blank";
1416
+ }
1417
+ }
1418
+ });
1419
+ this.setCssClass(ids, "clickable");
1420
+ }
1421
+ /**
1422
+ * Called by parser when a click definition is found. Registers an event handler.
1423
+ *
1424
+ * @param ids - Comma separated list of ids
1425
+ * @param functionName - Function to be called on click
1426
+ * @param functionArgs - Function args the function should be called with
1427
+ */
1428
+ setClickEvent(ids, functionName, functionArgs) {
1429
+ ids.split(",").forEach((id) => {
1430
+ this.setClickFunc(id, functionName, functionArgs);
1431
+ this.classes.get(id).haveCallback = true;
1432
+ });
1433
+ this.setCssClass(ids, "clickable");
1434
+ }
1435
+ setClickFunc(_domId, functionName, functionArgs) {
1436
+ const domId = common_default.sanitizeText(_domId, getConfig2());
1437
+ const config = getConfig2();
1438
+ if (config.securityLevel !== "loose") {
1439
+ return;
1440
+ }
1441
+ if (functionName === void 0) {
1442
+ return;
1443
+ }
1444
+ const id = domId;
1445
+ if (this.classes.has(id)) {
1446
+ let argList = [];
1447
+ if (typeof functionArgs === "string") {
1448
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1449
+ for (let i = 0; i < argList.length; i++) {
1450
+ let item = argList[i].trim();
1451
+ if (item.startsWith('"') && item.endsWith('"')) {
1452
+ item = item.substr(1, item.length - 2);
1453
+ }
1454
+ argList[i] = item;
1455
+ }
1456
+ }
1457
+ if (argList.length === 0) {
1458
+ argList.push(id);
1459
+ }
1460
+ this.functions.push(() => {
1461
+ const elemId = this.lookUpDomId(id);
1462
+ const elem = document.querySelector(`[id="${elemId}"]`);
1463
+ if (elem !== null) {
1464
+ elem.addEventListener(
1465
+ "click",
1466
+ () => {
1467
+ utils_default.runFunc(functionName, ...argList);
1468
+ },
1469
+ false
1470
+ );
1471
+ }
1472
+ });
1473
+ }
1474
+ }
1475
+ bindFunctions(element) {
1476
+ this.functions.forEach((fun) => {
1477
+ fun(element);
1478
+ });
1479
+ }
1480
+ // Utility function to escape HTML meta-characters
1481
+ escapeHtml(str) {
1482
+ return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1483
+ }
1484
+ getDirection() {
1485
+ return this.direction;
1486
+ }
1487
+ setDirection(dir) {
1488
+ this.direction = dir;
1489
+ }
1490
+ static resolveQualifiedId(id, stack) {
1491
+ const prefix = stack.at(-1);
1492
+ return prefix ? `${prefix}.${id}` : id;
1493
+ }
1494
+ static getAncestorIds(qualifiedId) {
1495
+ const parts = qualifiedId.split(".");
1496
+ const ids = new Array(parts.length);
1497
+ ids[0] = parts[0];
1498
+ for (let i = 1; i < parts.length; i++) {
1499
+ ids[i] = `${ids[i - 1]}.${parts[i]}`;
1500
+ }
1501
+ return ids;
1502
+ }
1503
+ createNamespaceNode(id, label, parentId, explicit = false) {
1504
+ return {
1505
+ id,
1506
+ label,
1507
+ classes: /* @__PURE__ */ new Map(),
1508
+ notes: /* @__PURE__ */ new Map(),
1509
+ children: /* @__PURE__ */ new Map(),
1510
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + this.namespaceCounter++,
1511
+ parent: parentId,
1512
+ explicit
1513
+ };
1514
+ }
1515
+ linkParentChild(parentId, childId) {
1516
+ const parent = this.namespaces.get(parentId);
1517
+ const child = this.namespaces.get(childId);
1518
+ if (!parent || !child) {
1519
+ return;
1520
+ }
1521
+ if (!parent.children.has(childId)) {
1522
+ parent.children.set(childId, child);
1523
+ }
1524
+ child.parent ??= parentId;
1525
+ }
1526
+ addNamespace(id, label) {
1527
+ const qualifiedId = _ClassDB.resolveQualifiedId(id, this.namespaceStack);
1528
+ this.namespaceStack.push(qualifiedId);
1529
+ if (this.namespaces.has(qualifiedId)) {
1530
+ const existing = this.namespaces.get(qualifiedId);
1531
+ existing.explicit = true;
1532
+ if (label) {
1533
+ existing.label = label;
1534
+ }
1535
+ return qualifiedId;
1536
+ }
1537
+ const parts = qualifiedId.split(".");
1538
+ const ancestorIds = _ClassDB.getAncestorIds(qualifiedId);
1539
+ for (let i = 0; i < ancestorIds.length; i++) {
1540
+ const currentId = ancestorIds[i];
1541
+ const parentId = i > 0 ? ancestorIds[i - 1] : void 0;
1542
+ const isLeaf = i === ancestorIds.length - 1;
1543
+ const nodeLabel = isLeaf && label ? label : parts[i];
1544
+ if (!this.namespaces.has(currentId)) {
1545
+ this.namespaces.set(
1546
+ currentId,
1547
+ this.createNamespaceNode(currentId, nodeLabel, parentId, isLeaf)
1548
+ );
1549
+ } else if (isLeaf) {
1550
+ this.namespaces.get(currentId).explicit = true;
1551
+ }
1552
+ if (parentId) {
1553
+ this.linkParentChild(parentId, currentId);
1554
+ }
1555
+ }
1556
+ return qualifiedId;
1557
+ }
1558
+ popNamespace() {
1559
+ this.namespaceStack.pop();
1560
+ }
1561
+ getNamespace(name) {
1562
+ return this.namespaces.get(name);
1563
+ }
1564
+ getNamespaces() {
1565
+ return this.namespaces;
1566
+ }
1567
+ /**
1568
+ * Function called by parser when a namespace definition has been found.
1569
+ *
1570
+ * @param id - ID of the namespace to add
1571
+ * @param classNames - IDs of the class to add
1572
+ * @param noteNames - IDs of the notes to add
1573
+ * @public
1574
+ */
1575
+ addClassesToNamespace(id, classNames, noteNames) {
1576
+ if (!this.namespaces.has(id)) {
1577
+ return;
1578
+ }
1579
+ for (const name of classNames) {
1580
+ const { className } = this.splitClassNameAndType(name);
1581
+ const classNode = this.getClass(className);
1582
+ classNode.parent = id;
1583
+ this.namespaces.get(id).classes.set(className, classNode);
1584
+ }
1585
+ for (const noteName of noteNames) {
1586
+ const noteNode = this.getNote(noteName);
1587
+ noteNode.parent = id;
1588
+ this.namespaces.get(id).notes.set(noteName, noteNode);
1589
+ }
1590
+ }
1591
+ setCssStyle(id, styles) {
1592
+ const thisClass = this.classes.get(id);
1593
+ if (!styles || !thisClass) {
1594
+ return;
1595
+ }
1596
+ for (const s of styles) {
1597
+ if (s.includes(",")) {
1598
+ thisClass.styles.push(...s.split(","));
1599
+ } else {
1600
+ thisClass.styles.push(s);
1601
+ }
1602
+ }
1603
+ }
1604
+ /**
1605
+ * Gets the arrow marker for a type index
1606
+ *
1607
+ * @param type - The type to look for
1608
+ * @returns The arrow marker
1609
+ */
1610
+ getArrowMarker(type) {
1611
+ let marker;
1612
+ switch (type) {
1613
+ case 0:
1614
+ marker = "aggregation";
1615
+ break;
1616
+ case 1:
1617
+ marker = "extension";
1618
+ break;
1619
+ case 2:
1620
+ marker = "composition";
1621
+ break;
1622
+ case 3:
1623
+ marker = "dependency";
1624
+ break;
1625
+ case 4:
1626
+ marker = "lollipop";
1627
+ break;
1628
+ default:
1629
+ marker = "none";
1630
+ }
1631
+ return marker;
1632
+ }
1633
+ /**
1634
+ * Walks up the namespace tree from the given id and returns the nearest ancestor
1635
+ * (or the id itself) that is marked as explicit. Used by compact rendering mode
1636
+ * to reassign children to the nearest user-declared namespace.
1637
+ */
1638
+ resolveExplicitAncestor(id) {
1639
+ let current = id;
1640
+ while (current) {
1641
+ const ns = this.namespaces.get(current);
1642
+ if (!ns) {
1643
+ return void 0;
1644
+ }
1645
+ if (ns.explicit) {
1646
+ return current;
1647
+ }
1648
+ current = ns.parent;
1649
+ }
1650
+ return void 0;
1651
+ }
1652
+ getData() {
1653
+ const nodes = [];
1654
+ const edges = [];
1655
+ const config = getConfig2();
1656
+ const hierarchical = config.class?.hierarchicalNamespaces ?? true;
1657
+ for (const namespace of this.namespaces.values()) {
1658
+ if (!hierarchical && !namespace.explicit) {
1659
+ continue;
1660
+ }
1661
+ const node = {
1662
+ id: namespace.id,
1663
+ label: hierarchical ? namespace.label : namespace.id,
1664
+ isGroup: true,
1665
+ padding: config.class.padding ?? 16,
1666
+ // parent node must be one of [rect, roundedWithTitle, noteGroup, divider]
1667
+ shape: "rect",
1668
+ cssStyles: [],
1669
+ look: config.look,
1670
+ parentId: hierarchical ? namespace.parent : void 0
1671
+ };
1672
+ nodes.push(node);
1673
+ }
1674
+ for (const classNode of this.classes.values()) {
1675
+ const parentId = hierarchical ? classNode.parent : this.resolveExplicitAncestor(classNode.parent);
1676
+ const node = {
1677
+ ...classNode,
1678
+ type: void 0,
1679
+ isGroup: false,
1680
+ parentId,
1681
+ look: config.look
1682
+ };
1683
+ nodes.push(node);
1684
+ }
1685
+ for (const note of this.notes.values()) {
1686
+ const noteParentId = hierarchical ? note.parent : this.resolveExplicitAncestor(note.parent);
1687
+ const noteNode = {
1688
+ id: note.id,
1689
+ label: note.text,
1690
+ isGroup: false,
1691
+ shape: "note",
1692
+ padding: config.class.padding ?? 6,
1693
+ cssStyles: [
1694
+ "text-align: left",
1695
+ "white-space: nowrap",
1696
+ `fill: ${config.themeVariables.noteBkgColor}`,
1697
+ `stroke: ${config.themeVariables.noteBorderColor}`
1698
+ ],
1699
+ look: config.look,
1700
+ parentId: noteParentId,
1701
+ labelType: "markdown"
1702
+ };
1703
+ nodes.push(noteNode);
1704
+ const noteClassId = this.classes.get(note.class)?.id;
1705
+ if (noteClassId) {
1706
+ const edge = {
1707
+ id: `edgeNote${note.index}`,
1708
+ start: note.id,
1709
+ end: noteClassId,
1710
+ type: "normal",
1711
+ thickness: "normal",
1712
+ classes: "relation",
1713
+ arrowTypeStart: "none",
1714
+ arrowTypeEnd: "none",
1715
+ arrowheadStyle: "",
1716
+ labelStyle: [""],
1717
+ style: ["fill: none"],
1718
+ pattern: "dotted",
1719
+ look: config.look
1720
+ };
1721
+ edges.push(edge);
1722
+ }
1723
+ }
1724
+ for (const _interface of this.interfaces) {
1725
+ const interfaceNode = {
1726
+ id: _interface.id,
1727
+ label: _interface.label,
1728
+ isGroup: false,
1729
+ shape: "rect",
1730
+ cssStyles: ["opacity: 0;"],
1731
+ look: config.look
1732
+ };
1733
+ nodes.push(interfaceNode);
1734
+ }
1735
+ let cnt = 0;
1736
+ for (const classRelation of this.relations) {
1737
+ cnt++;
1738
+ const edge = {
1739
+ id: getEdgeId(classRelation.id1, classRelation.id2, {
1740
+ prefix: "id",
1741
+ counter: cnt
1742
+ }),
1743
+ start: classRelation.id1,
1744
+ end: classRelation.id2,
1745
+ type: "normal",
1746
+ label: classRelation.title,
1747
+ labelpos: "c",
1748
+ thickness: "normal",
1749
+ classes: "relation",
1750
+ arrowTypeStart: this.getArrowMarker(classRelation.relation.type1),
1751
+ arrowTypeEnd: this.getArrowMarker(classRelation.relation.type2),
1752
+ startLabelRight: classRelation.relationTitle1 === "none" ? "" : classRelation.relationTitle1,
1753
+ endLabelLeft: classRelation.relationTitle2 === "none" ? "" : classRelation.relationTitle2,
1754
+ arrowheadStyle: "",
1755
+ labelStyle: ["display: inline-block"],
1756
+ style: classRelation.style || "",
1757
+ pattern: classRelation.relation.lineType == 1 ? "dashed" : "solid",
1758
+ look: config.look,
1759
+ labelType: "markdown"
1760
+ };
1761
+ edges.push(edge);
1762
+ }
1763
+ return { nodes, edges, other: {}, config, direction: this.getDirection() };
1764
+ }
1765
+ };
1766
+ var getStyles = /* @__PURE__ */ __name((options) => `g.classGroup text {
1767
+ fill: ${options.nodeBorder || options.classText};
1768
+ stroke: none;
1769
+ font-family: ${options.fontFamily};
1770
+ font-size: 10px;
1771
+
1772
+ .title {
1773
+ font-weight: bolder;
1774
+ }
1775
+
1776
+ }
1777
+
1778
+ .cluster-label text {
1779
+ fill: ${options.titleColor};
1780
+ }
1781
+ .cluster-label span {
1782
+ color: ${options.titleColor};
1783
+ }
1784
+ .cluster-label span p {
1785
+ background-color: transparent;
1786
+ }
1787
+
1788
+ .cluster rect {
1789
+ fill: ${options.clusterBkg};
1790
+ stroke: ${options.clusterBorder};
1791
+ stroke-width: 1px;
1792
+ }
1793
+
1794
+ .cluster text {
1795
+ fill: ${options.titleColor};
1796
+ }
1797
+
1798
+ .cluster span {
1799
+ color: ${options.titleColor};
1800
+ }
1801
+
1802
+ .nodeLabel, .edgeLabel {
1803
+ color: ${options.classText};
1804
+ }
1805
+
1806
+ .noteLabel .nodeLabel, .noteLabel .edgeLabel {
1807
+ color: ${options.noteTextColor};
1808
+ }
1809
+ .edgeLabel .label rect {
1810
+ fill: ${options.mainBkg};
1811
+ }
1812
+ .label text {
1813
+ fill: ${options.classText};
1814
+ }
1815
+
1816
+ .labelBkg {
1817
+ background: ${options.mainBkg};
1818
+ }
1819
+ .edgeLabel .label span {
1820
+ background: ${options.mainBkg};
1821
+ }
1822
+
1823
+ .classTitle {
1824
+ font-weight: bolder;
1825
+ }
1826
+ .node rect,
1827
+ .node circle,
1828
+ .node ellipse,
1829
+ .node polygon,
1830
+ .node path {
1831
+ fill: ${options.mainBkg};
1832
+ stroke: ${options.nodeBorder};
1833
+ stroke-width: ${options.strokeWidth};
1834
+ }
1835
+
1836
+
1837
+ .divider {
1838
+ stroke: ${options.nodeBorder};
1839
+ stroke-width: 1;
1840
+ }
1841
+
1842
+ g.clickable {
1843
+ cursor: pointer;
1844
+ }
1845
+
1846
+ g.classGroup rect {
1847
+ fill: ${options.mainBkg};
1848
+ stroke: ${options.nodeBorder};
1849
+ }
1850
+
1851
+ g.classGroup line {
1852
+ stroke: ${options.nodeBorder};
1853
+ stroke-width: 1;
1854
+ }
1855
+
1856
+ .classLabel .box {
1857
+ stroke: none;
1858
+ stroke-width: 0;
1859
+ fill: ${options.mainBkg};
1860
+ opacity: 0.5;
1861
+ }
1862
+
1863
+ .classLabel .label {
1864
+ fill: ${options.nodeBorder};
1865
+ font-size: 10px;
1866
+ }
1867
+
1868
+ .relation {
1869
+ stroke: ${options.lineColor};
1870
+ stroke-width: ${options.strokeWidth};
1871
+ fill: none;
1872
+ }
1873
+
1874
+ .dashed-line{
1875
+ stroke-dasharray: 3;
1876
+ }
1877
+
1878
+ .dotted-line{
1879
+ stroke-dasharray: 1 2;
1880
+ }
1881
+
1882
+ [id$="-compositionStart"], .composition {
1883
+ fill: ${options.lineColor} !important;
1884
+ stroke: ${options.lineColor} !important;
1885
+ stroke-width: 1;
1886
+ }
1887
+
1888
+ [id$="-compositionEnd"], .composition {
1889
+ fill: ${options.lineColor} !important;
1890
+ stroke: ${options.lineColor} !important;
1891
+ stroke-width: 1;
1892
+ }
1893
+
1894
+ [id$="-dependencyStart"], .dependency {
1895
+ fill: ${options.lineColor} !important;
1896
+ stroke: ${options.lineColor} !important;
1897
+ stroke-width: 1;
1898
+ }
1899
+
1900
+ [id$="-dependencyEnd"], .dependency {
1901
+ fill: ${options.lineColor} !important;
1902
+ stroke: ${options.lineColor} !important;
1903
+ stroke-width: 1;
1904
+ }
1905
+
1906
+ [id$="-extensionStart"], .extension {
1907
+ fill: transparent !important;
1908
+ stroke: ${options.lineColor} !important;
1909
+ stroke-width: 1;
1910
+ }
1911
+
1912
+ [id$="-extensionEnd"], .extension {
1913
+ fill: transparent !important;
1914
+ stroke: ${options.lineColor} !important;
1915
+ stroke-width: 1;
1916
+ }
1917
+
1918
+ [id$="-aggregationStart"], .aggregation {
1919
+ fill: transparent !important;
1920
+ stroke: ${options.lineColor} !important;
1921
+ stroke-width: 1;
1922
+ }
1923
+
1924
+ [id$="-aggregationEnd"], .aggregation {
1925
+ fill: transparent !important;
1926
+ stroke: ${options.lineColor} !important;
1927
+ stroke-width: 1;
1928
+ }
1929
+
1930
+ [id$="-lollipopStart"], .lollipop {
1931
+ fill: ${options.mainBkg} !important;
1932
+ stroke: ${options.lineColor} !important;
1933
+ stroke-width: 1;
1934
+ }
1935
+
1936
+ [id$="-lollipopEnd"], .lollipop {
1937
+ fill: ${options.mainBkg} !important;
1938
+ stroke: ${options.lineColor} !important;
1939
+ stroke-width: 1;
1940
+ }
1941
+
1942
+ .edgeTerminals {
1943
+ font-size: 11px;
1944
+ line-height: initial;
1945
+ }
1946
+
1947
+ .classTitleText {
1948
+ text-anchor: middle;
1949
+ font-size: 18px;
1950
+ fill: ${options.textColor};
1951
+ }
1952
+
1953
+ .edgeLabel[data-look="neo"] {
1954
+ background-color: ${options.edgeLabelBackground};
1955
+ p {
1956
+ background-color: ${options.edgeLabelBackground};
1957
+ }
1958
+ rect {
1959
+ opacity: 0.5;
1960
+ background-color: ${options.edgeLabelBackground};
1961
+ fill: ${options.edgeLabelBackground};
1962
+ }
1963
+ text-align: center;
1964
+ }
1965
+ ${getIconStyles()}
1966
+ `, "getStyles");
1967
+ var styles_default = getStyles;
1968
+ var getDir = /* @__PURE__ */ __name((parsedItem, defaultDir = "TB") => {
1969
+ if (!parsedItem.doc) {
1970
+ return defaultDir;
1971
+ }
1972
+ let dir = defaultDir;
1973
+ for (const parsedItemDoc of parsedItem.doc) {
1974
+ if (parsedItemDoc.stmt === "dir") {
1975
+ dir = parsedItemDoc.value;
1976
+ }
1977
+ }
1978
+ return dir;
1979
+ }, "getDir");
1980
+ var getClasses = /* @__PURE__ */ __name(function(text, diagramObj) {
1981
+ return diagramObj.db.getClasses();
1982
+ }, "getClasses");
1983
+ var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {
1984
+ log.info("REF0:");
1985
+ log.info("Drawing class diagram (v3)", id);
1986
+ const { securityLevel, state: conf, layout } = getConfig2();
1987
+ diag.db.setDiagramId(id);
1988
+ const data4Layout = diag.db.getData();
1989
+ const svg = getDiagramElement(id, securityLevel);
1990
+ data4Layout.type = diag.type;
1991
+ data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
1992
+ data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
1993
+ data4Layout.rankSpacing = conf?.rankSpacing || 50;
1994
+ data4Layout.markers = ["aggregation", "extension", "composition", "dependency", "lollipop"];
1995
+ data4Layout.diagramId = id;
1996
+ await render(data4Layout, svg);
1997
+ const padding = 8;
1998
+ utils_default.insertTitle(
1999
+ svg,
2000
+ "classDiagramTitleText",
2001
+ conf?.titleTopMargin ?? 25,
2002
+ diag.db.getDiagramTitle()
2003
+ );
2004
+ setupViewPortForSVG(svg, padding, "classDiagram", conf?.useMaxWidth ?? true);
2005
+ }, "draw");
2006
+ var classRenderer_v3_unified_default = {
2007
+ getClasses,
2008
+ draw,
2009
+ getDir
2010
+ };
2011
+ export {
2012
+ ClassDB as C,
2013
+ classDiagram_default as a,
2014
+ classRenderer_v3_unified_default as c,
2015
+ styles_default as s
2016
+ };