@ashwin_droid/notion-stream 1.0.0 → 1.0.2

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 (154) hide show
  1. package/dist/{_baseUniq-DSwfPiGC.js → _baseUniq-D32sgNIc.js} +1 -1
  2. package/dist/{_baseUniq-CT-tc-CG.mjs → _baseUniq-DCnQIx8G.mjs} +51 -51
  3. package/dist/{arc-BBnIBs2j.js → arc-B0uBm0sN.js} +1 -1
  4. package/dist/{arc-DmoYXidQ.mjs → arc-OrNNmmBm.mjs} +1 -1
  5. package/dist/{architecture-U656AL7Q-C0ZB2O9M.js → architecture-U656AL7Q-CLYqYgyv.js} +1 -1
  6. package/dist/{architecture-U656AL7Q-CMPtJMZ-.mjs → architecture-U656AL7Q-seCMyeyz.mjs} +1 -1
  7. package/dist/architectureDiagram-VXUJARFQ-BGsDPmi_.js +36 -0
  8. package/dist/{architectureDiagram-VXUJARFQ-BYzpbF40.mjs → architectureDiagram-VXUJARFQ-BmPLNLcs.mjs} +1846 -1850
  9. package/dist/{blockDiagram-VD42YOAC-DPVTCHn5.mjs → blockDiagram-VD42YOAC-CXKvT-9-.mjs} +913 -922
  10. package/dist/blockDiagram-VD42YOAC-NQhzFvsO.js +122 -0
  11. package/dist/c4Diagram-YG6GDRKO-CMXx6pyB.js +10 -0
  12. package/dist/{c4Diagram-YG6GDRKO-C2Y4q08p.mjs → c4Diagram-YG6GDRKO-DAGMHESb.mjs} +169 -170
  13. package/dist/{channel-DVpqhnow.mjs → channel-BXGyzQA6.mjs} +1 -1
  14. package/dist/channel-Dw8BXC8D.js +1 -0
  15. package/dist/chunk-4BX2VUAB-MnK73C0-.js +1 -0
  16. package/dist/chunk-4BX2VUAB-ZaWvd3Xe.mjs +8 -0
  17. package/dist/{chunk-55IACEB6-P_FVKIbW.js → chunk-55IACEB6-B1EpdpVW.js} +1 -1
  18. package/dist/{chunk-55IACEB6-Du1Simcj.mjs → chunk-55IACEB6-iKbZBHA5.mjs} +1 -1
  19. package/dist/chunk-B4BG7PRW-Bo_sfBKL.js +165 -0
  20. package/dist/{chunk-B4BG7PRW-BUKsa2yH.mjs → chunk-B4BG7PRW-DgqSow4f.mjs} +251 -252
  21. package/dist/{chunk-DI55MBZ5-C9h0qLVI.mjs → chunk-DI55MBZ5-BAHL-2VJ.mjs} +444 -456
  22. package/dist/chunk-DI55MBZ5-BuuMLI1S.js +220 -0
  23. package/dist/{chunk-FMBD7UC4-C08-zA06.mjs → chunk-FMBD7UC4-BE8MbNLe.mjs} +1 -1
  24. package/dist/{chunk-FMBD7UC4-48-zdz-1.js → chunk-FMBD7UC4-Cs1BNv23.js} +1 -1
  25. package/dist/chunk-QN33PNHL-MX1ZMWu-.js +1 -0
  26. package/dist/chunk-QN33PNHL-ZaWv5vaA.mjs +19 -0
  27. package/dist/{chunk-QZHKN3VN-DbO6TJSK.mjs → chunk-QZHKN3VN-D2X7PBDi.mjs} +1 -1
  28. package/dist/{chunk-QZHKN3VN-Dy2264ui.js → chunk-QZHKN3VN-Db6mVb9M.js} +1 -1
  29. package/dist/{chunk-TZMSLE5B-BPmI9i6R.mjs → chunk-TZMSLE5B-AMFXF6mq.mjs} +20 -20
  30. package/dist/{chunk-TZMSLE5B-COENnLAZ.js → chunk-TZMSLE5B-CzjtACDr.js} +1 -1
  31. package/dist/{classDiagram-v2-WZHVMYZB-mzvV1Ifg.mjs → classDiagram-2ON5EDUG-CPwvtUDj.mjs} +2 -2
  32. package/dist/{classDiagram-2ON5EDUG-CFFwYK87.js → classDiagram-2ON5EDUG-UNrH9bQo.js} +1 -1
  33. package/dist/{classDiagram-2ON5EDUG-mzvV1Ifg.mjs → classDiagram-v2-WZHVMYZB-CPwvtUDj.mjs} +2 -2
  34. package/dist/{classDiagram-v2-WZHVMYZB-CFFwYK87.js → classDiagram-v2-WZHVMYZB-UNrH9bQo.js} +1 -1
  35. package/dist/{clone-KtLCwiKH.mjs → clone-CV4F8CSW.mjs} +1 -1
  36. package/dist/clone-HVsPHeK3.js +1 -0
  37. package/dist/{code-block-37QAKDTI-sxlq94xm.js → code-block-37QAKDTI-38K5Mxo2.js} +1 -1
  38. package/dist/{code-block-37QAKDTI-CmykMxjQ.mjs → code-block-37QAKDTI-Q-OOsw6q.mjs} +1 -1
  39. package/dist/cose-bilkent-S5V4N54A-1B77PywG.js +1 -0
  40. package/dist/{cose-bilkent-S5V4N54A-BXcldnso.mjs → cose-bilkent-S5V4N54A-greBbyuM.mjs} +592 -589
  41. package/dist/cytoscape.esm-CNUX3VTg.js +321 -0
  42. package/dist/{cytoscape.esm-ZmItrg9y.mjs → cytoscape.esm-Cvf3sx9F.mjs} +56 -83
  43. package/dist/dagre-6UL2VRFP-DEQXyXKh.js +4 -0
  44. package/dist/dagre-6UL2VRFP-DN5Inkgr.mjs +443 -0
  45. package/dist/diagram-PSM6KHXK-C7tjFZpr.js +24 -0
  46. package/dist/{diagram-PSM6KHXK-DIV3jw9d.mjs → diagram-PSM6KHXK-D-GS1fTc.mjs} +45 -48
  47. package/dist/{diagram-QEK2KX5R-Q0M2_YtR.mjs → diagram-QEK2KX5R-DJXBxeH4.mjs} +10 -14
  48. package/dist/diagram-QEK2KX5R-Doa8ooC_.js +43 -0
  49. package/dist/diagram-S2PKOQOG-BN04h93a.js +24 -0
  50. package/dist/{diagram-S2PKOQOG-_WGA6s2-.mjs → diagram-S2PKOQOG-BuPevKqw.mjs} +22 -23
  51. package/dist/erDiagram-Q2GNP2WA-AS2vnQKc.js +60 -0
  52. package/dist/{erDiagram-Q2GNP2WA-CW0D_QGb.mjs → erDiagram-Q2GNP2WA-DxOmvmqL.mjs} +77 -78
  53. package/dist/flowDiagram-NV44I4VS-BChiRwcp.js +162 -0
  54. package/dist/{flowDiagram-NV44I4VS-DVQ8Ntc4.mjs → flowDiagram-NV44I4VS-Cs_jC87H.mjs} +442 -449
  55. package/dist/{ganttDiagram-JELNMOA3-Bk-dX6qT.mjs → ganttDiagram-JELNMOA3-02b_-xyZ.mjs} +1049 -1041
  56. package/dist/ganttDiagram-JELNMOA3-BGy1b6TD.js +267 -0
  57. package/dist/{gitGraph-F6HP7TQM-CsdwxYUE.mjs → gitGraph-F6HP7TQM-BWm0SBV4.mjs} +1 -1
  58. package/dist/{gitGraph-F6HP7TQM-DvIgo2TM.js → gitGraph-F6HP7TQM-DVfckSNX.js} +1 -1
  59. package/dist/gitGraphDiagram-NY62KEGX-CfzoE07P.mjs +699 -0
  60. package/dist/gitGraphDiagram-NY62KEGX-Cm9ywQoW.js +65 -0
  61. package/dist/{graph-C_T4ZBuC.mjs → graph-DEu7-ZhH.mjs} +8 -8
  62. package/dist/{graph-BNpx6ebg.js → graph-Dw_87ii6.js} +1 -1
  63. package/dist/index-BwYOYPeK.js +670 -0
  64. package/dist/{index-oe4HpmeG.mjs → index-DH3CVXwD.mjs} +22541 -22646
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.js +1 -1
  67. package/dist/index.mjs +3 -3
  68. package/dist/{info-NVLQJR56-BwFQRguW.js → info-NVLQJR56-BpKxONZx.js} +1 -1
  69. package/dist/info-NVLQJR56-MmJP3L6S.mjs +5 -0
  70. package/dist/{infoDiagram-WHAUD3N6-C-gzsm95.mjs → infoDiagram-WHAUD3N6-Bfsucvti.mjs} +2 -2
  71. package/dist/{infoDiagram-WHAUD3N6-CCb5k_S7.js → infoDiagram-WHAUD3N6-q-yX3_By.js} +1 -1
  72. package/dist/journeyDiagram-XKPGCS4Q-BqtyHvQF.js +139 -0
  73. package/dist/{journeyDiagram-XKPGCS4Q-DzkUL_YG.mjs → journeyDiagram-XKPGCS4Q-dFRLmnr-.mjs} +24 -26
  74. package/dist/kanban-definition-3W4ZIXB7-DeOl9Eme.mjs +719 -0
  75. package/dist/kanban-definition-3W4ZIXB7-DraMxv75.js +89 -0
  76. package/dist/{layout-CuWQnP5Y.js → layout-BKTUO8WZ.js} +1 -1
  77. package/dist/{layout-Cd98WJ7r.mjs → layout-CpL-hYTa.mjs} +22 -22
  78. package/dist/{linear-SU4e8MRt.mjs → linear-CLwIU3di.mjs} +20 -20
  79. package/dist/{linear-DFDw13y6.js → linear-DvM229Di.js} +1 -1
  80. package/dist/mermaid-4DMBBIKO-BpqXz0_U.mjs +4 -0
  81. package/dist/{mermaid-4DMBBIKO-BihEtyib.js → mermaid-4DMBBIKO-Cd15t2pT.js} +1 -1
  82. package/dist/mermaid-parser.core-BVlc9Lqd.js +128 -0
  83. package/dist/{mermaid-parser.core-C8Sxzqul.mjs → mermaid-parser.core-CLAapB2-.mjs} +3404 -3369
  84. package/dist/{min-C2k771MZ.mjs → min--ML-ONY_.mjs} +2 -2
  85. package/dist/{min-CppMRDFn.js → min-BQ4NUvNf.js} +1 -1
  86. package/dist/{mindmap-definition-VGOIOE7T-BUd354uH.mjs → mindmap-definition-VGOIOE7T-78K_EDCb.mjs} +170 -172
  87. package/dist/mindmap-definition-VGOIOE7T-ZHY70ZzV.js +68 -0
  88. package/dist/notion-stream.css +1 -0
  89. package/dist/{ordinal-C0oynhte.mjs → ordinal-B-KqvkJf.mjs} +1 -1
  90. package/dist/{packet-BFZMPI3H-Cz_A86d3.mjs → packet-BFZMPI3H-B34lFb6T.mjs} +1 -1
  91. package/dist/{packet-BFZMPI3H-CFx3kSkL.js → packet-BFZMPI3H-C9xcJQVN.js} +1 -1
  92. package/dist/{pie-7BOR55EZ-_1MqisBd.js → pie-7BOR55EZ-Bz_jfTd_.js} +1 -1
  93. package/dist/pie-7BOR55EZ-DW2Zgje5.mjs +5 -0
  94. package/dist/{pieDiagram-ADFJNKIX-Bg0_gu43.js → pieDiagram-ADFJNKIX-CKzchAXU.js} +2 -2
  95. package/dist/{pieDiagram-ADFJNKIX-lRs_rpwI.mjs → pieDiagram-ADFJNKIX-Ctp6QR7f.mjs} +21 -21
  96. package/dist/quadrantDiagram-AYHSOK5B-D2Rt32D2.js +7 -0
  97. package/dist/{quadrantDiagram-AYHSOK5B-D9kypJt6.mjs → quadrantDiagram-AYHSOK5B-D3U_Qicu.mjs} +230 -232
  98. package/dist/{radar-NHE76QYJ-B-PvZD0K.mjs → radar-NHE76QYJ-CO5ECFHq.mjs} +1 -1
  99. package/dist/{radar-NHE76QYJ-CdtC4C8F.js → radar-NHE76QYJ-DI4PJJjm.js} +1 -1
  100. package/dist/requirementDiagram-UZGBJVZJ-CSgb6U9N.js +64 -0
  101. package/dist/{requirementDiagram-UZGBJVZJ-B5ulaHjE.mjs → requirementDiagram-UZGBJVZJ-Da_yWSD1.mjs} +190 -192
  102. package/dist/sankeyDiagram-TZEHDZUN-C8jpBnM0.js +10 -0
  103. package/dist/{sankeyDiagram-TZEHDZUN-DprIPFbe.mjs → sankeyDiagram-TZEHDZUN-Dp3Eyl8Q.mjs} +189 -189
  104. package/dist/sequenceDiagram-WL72ISMW-BZJ7d_X4.js +145 -0
  105. package/dist/{sequenceDiagram-WL72ISMW-B4m4oag0.mjs → sequenceDiagram-WL72ISMW-yJKe02sV.mjs} +222 -229
  106. package/dist/{stateDiagram-FKZM4ZOC-BD4tnS-V.js → stateDiagram-FKZM4ZOC-Cfuygt_P.js} +1 -1
  107. package/dist/{stateDiagram-FKZM4ZOC-DjkdDbQ2.mjs → stateDiagram-FKZM4ZOC-z0IX85WL.mjs} +4 -4
  108. package/dist/{stateDiagram-v2-4FDKWEC3-AK86F3i6.mjs → stateDiagram-v2-4FDKWEC3-BDMFqSat.mjs} +2 -2
  109. package/dist/{stateDiagram-v2-4FDKWEC3-sybMoxOk.js → stateDiagram-v2-4FDKWEC3-BiriAQkj.js} +1 -1
  110. package/dist/{timeline-definition-IT6M3QCI-BFuQEeZP.mjs → timeline-definition-IT6M3QCI-BmEq-RM3.mjs} +217 -223
  111. package/dist/timeline-definition-IT6M3QCI-CBmpRgUM.js +61 -0
  112. package/dist/{treemap-KMMF4GRG-gtrnY16v.mjs → treemap-KMMF4GRG-IaHP18r_.mjs} +1 -1
  113. package/dist/{treemap-KMMF4GRG-DTnRa789.js → treemap-KMMF4GRG-qP0VzKwW.js} +1 -1
  114. package/dist/{xychartDiagram-PRI3JC2R-CjXiy6m0.mjs → xychartDiagram-PRI3JC2R-BSaI76KX.mjs} +7 -7
  115. package/dist/xychartDiagram-PRI3JC2R-CQgij0Fy.js +7 -0
  116. package/package.json +5 -5
  117. package/dist/architectureDiagram-VXUJARFQ-BPQoZmaM.js +0 -36
  118. package/dist/blockDiagram-VD42YOAC-Z3Fc3Bew.js +0 -122
  119. package/dist/c4Diagram-YG6GDRKO-LzDuCZ2V.js +0 -10
  120. package/dist/channel-6dUO0MQi.js +0 -1
  121. package/dist/chunk-4BX2VUAB-BwubFldI.js +0 -1
  122. package/dist/chunk-4BX2VUAB-DldMXCTt.mjs +0 -9
  123. package/dist/chunk-B4BG7PRW-CKX0VJ-S.js +0 -165
  124. package/dist/chunk-DI55MBZ5-CMq-O8k2.js +0 -220
  125. package/dist/chunk-QN33PNHL-B0sO38bZ.js +0 -1
  126. package/dist/chunk-QN33PNHL-B_PGnTkk.mjs +0 -20
  127. package/dist/clone-B0UaPT2Z.js +0 -1
  128. package/dist/cose-bilkent-S5V4N54A-BCaAPmuF.js +0 -1
  129. package/dist/cytoscape.esm-DkGgpG6d.js +0 -331
  130. package/dist/dagre-6UL2VRFP-By42zbLA.mjs +0 -446
  131. package/dist/dagre-6UL2VRFP-DCwfkcWi.js +0 -4
  132. package/dist/diagram-PSM6KHXK-hjXN9n1N.js +0 -24
  133. package/dist/diagram-QEK2KX5R-B04ODMim.js +0 -43
  134. package/dist/diagram-S2PKOQOG-BmCs4MZE.js +0 -24
  135. package/dist/erDiagram-Q2GNP2WA-4KtQUUuI.js +0 -60
  136. package/dist/flowDiagram-NV44I4VS-BwpfJE0U.js +0 -162
  137. package/dist/ganttDiagram-JELNMOA3-D7rI7u8B.js +0 -267
  138. package/dist/gitGraphDiagram-NY62KEGX-BDTsbSkO.mjs +0 -712
  139. package/dist/gitGraphDiagram-NY62KEGX-IQ8KriUw.js +0 -65
  140. package/dist/index-CkYZRBYn.js +0 -676
  141. package/dist/info-NVLQJR56-B5gDnSIT.mjs +0 -5
  142. package/dist/journeyDiagram-XKPGCS4Q-POnSekz9.js +0 -139
  143. package/dist/kanban-definition-3W4ZIXB7-BPr0_7wG.mjs +0 -720
  144. package/dist/kanban-definition-3W4ZIXB7-Bm064qrf.js +0 -89
  145. package/dist/mermaid-4DMBBIKO-DDxvQcE9.mjs +0 -4
  146. package/dist/mermaid-parser.core-BHAgLMGa.js +0 -128
  147. package/dist/mindmap-definition-VGOIOE7T-CV7bD4HY.js +0 -68
  148. package/dist/pie-7BOR55EZ-B0-atE_o.mjs +0 -5
  149. package/dist/quadrantDiagram-AYHSOK5B-B4gVakRV.js +0 -7
  150. package/dist/requirementDiagram-UZGBJVZJ-0zMPj-SD.js +0 -64
  151. package/dist/sankeyDiagram-TZEHDZUN-Cl8-L83T.js +0 -10
  152. package/dist/sequenceDiagram-WL72ISMW-DRQn7Fe4.js +0 -145
  153. package/dist/timeline-definition-IT6M3QCI-2X4dfyLj.js +0 -61
  154. package/dist/xychartDiagram-PRI3JC2R-BaFd1In8.js +0 -7
@@ -1,188 +1,188 @@
1
- import { g as de } from "./chunk-FMBD7UC4-C08-zA06.mjs";
2
- import { _ as d, L as st, h as R, i as ge, l as m, D as ue, F as pe, f as z, ap as fe, ae as xe, af as ye, ab as be, aq as Z, ar as Ht, as as we, x as et, o as me, at as Le, au as yt, m as bt, av as Se } from "./index-oe4HpmeG.mjs";
3
- import { c as ve } from "./clone-KtLCwiKH.mjs";
4
- import { G as Ee } from "./graph-C_T4ZBuC.mjs";
5
- import { c as _e } from "./channel-DVpqhnow.mjs";
6
- var wt = function() {
7
- var e = /* @__PURE__ */ d(function(N, x, g, p) {
8
- for (g = g || {}, p = N.length; p--; g[N[p]] = x) ;
1
+ import { g as oe } from "./chunk-FMBD7UC4-BE8MbNLe.mjs";
2
+ import { _ as d, L as rt, h as O, i as he, l as L, D as de, F as ge, f as R, ap as ue, ae as pe, af as fe, ab as xe, aq as j, ar as Wt, as as ye, x as $, o as be, at as we, au as xt, m as yt, av as me } from "./index-DH3CVXwD.mjs";
3
+ import { c as Le } from "./clone-CV4F8CSW.mjs";
4
+ import { G as Se } from "./graph-DEu7-ZhH.mjs";
5
+ import { c as ke } from "./channel-BXGyzQA6.mjs";
6
+ var bt = (function() {
7
+ var e = /* @__PURE__ */ d(function(D, y, g, f) {
8
+ for (g = g || {}, f = D.length; f--; g[D[f]] = y) ;
9
9
  return g;
10
- }, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], o = [1, 18], u = [8, 30], h = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], y = [1, 23], b = [1, 24], L = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], E = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], D = [1, 49], v = {
10
+ }, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], c = [1, 18], u = [8, 30], o = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], x = [1, 23], w = [1, 24], b = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], S = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], v = [1, 49], k = {
11
11
  trace: /* @__PURE__ */ d(function() {
12
12
  }, "trace"),
13
13
  yy: {},
14
14
  symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
15
15
  terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
16
16
  productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
17
- performAction: /* @__PURE__ */ d(function(x, g, p, w, S, c, _) {
18
- var f = c.length - 1;
19
- switch (S) {
17
+ performAction: /* @__PURE__ */ d(function(y, g, f, m, E, h, W) {
18
+ var p = h.length - 1;
19
+ switch (E) {
20
20
  case 4:
21
- w.getLogger().debug("Rule: separator (NL) ");
21
+ m.getLogger().debug("Rule: separator (NL) ");
22
22
  break;
23
23
  case 5:
24
- w.getLogger().debug("Rule: separator (Space) ");
24
+ m.getLogger().debug("Rule: separator (Space) ");
25
25
  break;
26
26
  case 6:
27
- w.getLogger().debug("Rule: separator (EOF) ");
27
+ m.getLogger().debug("Rule: separator (EOF) ");
28
28
  break;
29
29
  case 7:
30
- w.getLogger().debug("Rule: hierarchy: ", c[f - 1]), w.setHierarchy(c[f - 1]);
30
+ m.getLogger().debug("Rule: hierarchy: ", h[p - 1]), m.setHierarchy(h[p - 1]);
31
31
  break;
32
32
  case 8:
33
- w.getLogger().debug("Stop NL ");
33
+ m.getLogger().debug("Stop NL ");
34
34
  break;
35
35
  case 9:
36
- w.getLogger().debug("Stop EOF ");
36
+ m.getLogger().debug("Stop EOF ");
37
37
  break;
38
38
  case 10:
39
- w.getLogger().debug("Stop NL2 ");
39
+ m.getLogger().debug("Stop NL2 ");
40
40
  break;
41
41
  case 11:
42
- w.getLogger().debug("Stop EOF2 ");
42
+ m.getLogger().debug("Stop EOF2 ");
43
43
  break;
44
44
  case 12:
45
- w.getLogger().debug("Rule: statement: ", c[f]), typeof c[f].length == "number" ? this.$ = c[f] : this.$ = [c[f]];
45
+ m.getLogger().debug("Rule: statement: ", h[p]), typeof h[p].length == "number" ? this.$ = h[p] : this.$ = [h[p]];
46
46
  break;
47
47
  case 13:
48
- w.getLogger().debug("Rule: statement #2: ", c[f - 1]), this.$ = [c[f - 1]].concat(c[f]);
48
+ m.getLogger().debug("Rule: statement #2: ", h[p - 1]), this.$ = [h[p - 1]].concat(h[p]);
49
49
  break;
50
50
  case 14:
51
- w.getLogger().debug("Rule: link: ", c[f], x), this.$ = { edgeTypeStr: c[f], label: "" };
51
+ m.getLogger().debug("Rule: link: ", h[p], y), this.$ = { edgeTypeStr: h[p], label: "" };
52
52
  break;
53
53
  case 15:
54
- w.getLogger().debug("Rule: LABEL link: ", c[f - 3], c[f - 1], c[f]), this.$ = { edgeTypeStr: c[f], label: c[f - 1] };
54
+ m.getLogger().debug("Rule: LABEL link: ", h[p - 3], h[p - 1], h[p]), this.$ = { edgeTypeStr: h[p], label: h[p - 1] };
55
55
  break;
56
56
  case 18:
57
- const A = parseInt(c[f]), O = w.generateId();
58
- this.$ = { id: O, type: "space", label: "", width: A, children: [] };
57
+ const I = parseInt(h[p]), Z = m.generateId();
58
+ this.$ = { id: Z, type: "space", label: "", width: I, children: [] };
59
59
  break;
60
60
  case 23:
61
- w.getLogger().debug("Rule: (nodeStatement link node) ", c[f - 2], c[f - 1], c[f], " typestr: ", c[f - 1].edgeTypeStr);
62
- const X = w.edgeStrToEdgeData(c[f - 1].edgeTypeStr);
61
+ m.getLogger().debug("Rule: (nodeStatement link node) ", h[p - 2], h[p - 1], h[p], " typestr: ", h[p - 1].edgeTypeStr);
62
+ const V = m.edgeStrToEdgeData(h[p - 1].edgeTypeStr);
63
63
  this.$ = [
64
- { id: c[f - 2].id, label: c[f - 2].label, type: c[f - 2].type, directions: c[f - 2].directions },
65
- { id: c[f - 2].id + "-" + c[f].id, start: c[f - 2].id, end: c[f].id, label: c[f - 1].label, type: "edge", directions: c[f].directions, arrowTypeEnd: X, arrowTypeStart: "arrow_open" },
66
- { id: c[f].id, label: c[f].label, type: w.typeStr2Type(c[f].typeStr), directions: c[f].directions }
64
+ { id: h[p - 2].id, label: h[p - 2].label, type: h[p - 2].type, directions: h[p - 2].directions },
65
+ { id: h[p - 2].id + "-" + h[p].id, start: h[p - 2].id, end: h[p].id, label: h[p - 1].label, type: "edge", directions: h[p].directions, arrowTypeEnd: V, arrowTypeStart: "arrow_open" },
66
+ { id: h[p].id, label: h[p].label, type: m.typeStr2Type(h[p].typeStr), directions: h[p].directions }
67
67
  ];
68
68
  break;
69
69
  case 24:
70
- w.getLogger().debug("Rule: nodeStatement (abc88 node size) ", c[f - 1], c[f]), this.$ = { id: c[f - 1].id, label: c[f - 1].label, type: w.typeStr2Type(c[f - 1].typeStr), directions: c[f - 1].directions, widthInColumns: parseInt(c[f], 10) };
70
+ m.getLogger().debug("Rule: nodeStatement (abc88 node size) ", h[p - 1], h[p]), this.$ = { id: h[p - 1].id, label: h[p - 1].label, type: m.typeStr2Type(h[p - 1].typeStr), directions: h[p - 1].directions, widthInColumns: parseInt(h[p], 10) };
71
71
  break;
72
72
  case 25:
73
- w.getLogger().debug("Rule: nodeStatement (node) ", c[f]), this.$ = { id: c[f].id, label: c[f].label, type: w.typeStr2Type(c[f].typeStr), directions: c[f].directions, widthInColumns: 1 };
73
+ m.getLogger().debug("Rule: nodeStatement (node) ", h[p]), this.$ = { id: h[p].id, label: h[p].label, type: m.typeStr2Type(h[p].typeStr), directions: h[p].directions, widthInColumns: 1 };
74
74
  break;
75
75
  case 26:
76
- w.getLogger().debug("APA123", this ? this : "na"), w.getLogger().debug("COLUMNS: ", c[f]), this.$ = { type: "column-setting", columns: c[f] === "auto" ? -1 : parseInt(c[f]) };
76
+ m.getLogger().debug("APA123", this ? this : "na"), m.getLogger().debug("COLUMNS: ", h[p]), this.$ = { type: "column-setting", columns: h[p] === "auto" ? -1 : parseInt(h[p]) };
77
77
  break;
78
78
  case 27:
79
- w.getLogger().debug("Rule: id-block statement : ", c[f - 2], c[f - 1]), w.generateId(), this.$ = { ...c[f - 2], type: "composite", children: c[f - 1] };
79
+ m.getLogger().debug("Rule: id-block statement : ", h[p - 2], h[p - 1]), m.generateId(), this.$ = { ...h[p - 2], type: "composite", children: h[p - 1] };
80
80
  break;
81
81
  case 28:
82
- w.getLogger().debug("Rule: blockStatement : ", c[f - 2], c[f - 1], c[f]);
83
- const P = w.generateId();
84
- this.$ = { id: P, type: "composite", label: "", children: c[f - 1] };
82
+ m.getLogger().debug("Rule: blockStatement : ", h[p - 2], h[p - 1], h[p]);
83
+ const at = m.generateId();
84
+ this.$ = { id: at, type: "composite", label: "", children: h[p - 1] };
85
85
  break;
86
86
  case 29:
87
- w.getLogger().debug("Rule: node (NODE_ID separator): ", c[f]), this.$ = { id: c[f] };
87
+ m.getLogger().debug("Rule: node (NODE_ID separator): ", h[p]), this.$ = { id: h[p] };
88
88
  break;
89
89
  case 30:
90
- w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", c[f - 1], c[f]), this.$ = { id: c[f - 1], label: c[f].label, typeStr: c[f].typeStr, directions: c[f].directions };
90
+ m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", h[p - 1], h[p]), this.$ = { id: h[p - 1], label: h[p].label, typeStr: h[p].typeStr, directions: h[p].directions };
91
91
  break;
92
92
  case 31:
93
- w.getLogger().debug("Rule: dirList: ", c[f]), this.$ = [c[f]];
93
+ m.getLogger().debug("Rule: dirList: ", h[p]), this.$ = [h[p]];
94
94
  break;
95
95
  case 32:
96
- w.getLogger().debug("Rule: dirList: ", c[f - 1], c[f]), this.$ = [c[f - 1]].concat(c[f]);
96
+ m.getLogger().debug("Rule: dirList: ", h[p - 1], h[p]), this.$ = [h[p - 1]].concat(h[p]);
97
97
  break;
98
98
  case 33:
99
- w.getLogger().debug("Rule: nodeShapeNLabel: ", c[f - 2], c[f - 1], c[f]), this.$ = { typeStr: c[f - 2] + c[f], label: c[f - 1] };
99
+ m.getLogger().debug("Rule: nodeShapeNLabel: ", h[p - 2], h[p - 1], h[p]), this.$ = { typeStr: h[p - 2] + h[p], label: h[p - 1] };
100
100
  break;
101
101
  case 34:
102
- w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", c[f - 3], c[f - 2], " #3:", c[f - 1], c[f]), this.$ = { typeStr: c[f - 3] + c[f], label: c[f - 2], directions: c[f - 1] };
102
+ m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", h[p - 3], h[p - 2], " #3:", h[p - 1], h[p]), this.$ = { typeStr: h[p - 3] + h[p], label: h[p - 2], directions: h[p - 1] };
103
103
  break;
104
104
  case 35:
105
105
  case 36:
106
- this.$ = { type: "classDef", id: c[f - 1].trim(), css: c[f].trim() };
106
+ this.$ = { type: "classDef", id: h[p - 1].trim(), css: h[p].trim() };
107
107
  break;
108
108
  case 37:
109
- this.$ = { type: "applyClass", id: c[f - 1].trim(), styleClass: c[f].trim() };
109
+ this.$ = { type: "applyClass", id: h[p - 1].trim(), styleClass: h[p].trim() };
110
110
  break;
111
111
  case 38:
112
- this.$ = { type: "applyStyles", id: c[f - 1].trim(), stylesStr: c[f].trim() };
112
+ this.$ = { type: "applyStyles", id: h[p - 1].trim(), stylesStr: h[p].trim() };
113
113
  break;
114
114
  }
115
115
  }, "anonymous"),
116
- table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }), e(h, [2, 16], { 14: 22, 15: y, 16: b }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(L, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 31: s }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(E, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 31: s }, { 31: [2, 14] }, { 17: [1, 36] }, e(L, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: y, 16: b, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(E, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(L, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: D }, { 15: [1, 50] }, e(h, [2, 27]), e(E, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: D, 38: [2, 31] }, { 31: [2, 15] }, e(E, [2, 34]), { 38: [2, 32] }],
116
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }), e(o, [2, 16], { 14: 22, 15: x, 16: w }), e(o, [2, 17]), e(o, [2, 18]), e(o, [2, 19]), e(o, [2, 20]), e(o, [2, 21]), e(o, [2, 22]), e(b, [2, 25], { 27: [1, 25] }), e(o, [2, 26]), { 19: 26, 26: 12, 31: s }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(S, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 31: s }, { 31: [2, 14] }, { 17: [1, 36] }, e(b, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: x, 16: w, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(b, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(o, [2, 28]), e(o, [2, 35]), e(o, [2, 36]), e(o, [2, 37]), e(o, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: v }, { 15: [1, 50] }, e(o, [2, 27]), e(S, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: v, 38: [2, 31] }, { 31: [2, 15] }, e(S, [2, 34]), { 38: [2, 32] }],
117
117
  defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
118
- parseError: /* @__PURE__ */ d(function(x, g) {
118
+ parseError: /* @__PURE__ */ d(function(y, g) {
119
119
  if (g.recoverable)
120
- this.trace(x);
120
+ this.trace(y);
121
121
  else {
122
- var p = new Error(x);
123
- throw p.hash = g, p;
122
+ var f = new Error(y);
123
+ throw f.hash = g, f;
124
124
  }
125
125
  }, "parseError"),
126
- parse: /* @__PURE__ */ d(function(x) {
127
- var g = this, p = [0], w = [], S = [null], c = [], _ = this.table, f = "", A = 0, O = 0, X = 2, P = 1, J = c.slice.call(arguments, 1), M = Object.create(this.lexer), Q = { yy: {} };
128
- for (var ut in this.yy)
129
- Object.prototype.hasOwnProperty.call(this.yy, ut) && (Q.yy[ut] = this.yy[ut]);
130
- M.setInput(x, Q.yy), Q.yy.lexer = M, Q.yy.parser = this, typeof M.yylloc > "u" && (M.yylloc = {});
131
- var pt = M.yylloc;
132
- c.push(pt);
133
- var oe = M.options && M.options.ranges;
134
- typeof Q.yy.parseError == "function" ? this.parseError = Q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
135
- function he(H) {
136
- p.length = p.length - 2 * H, S.length = S.length - H, c.length = c.length - H;
126
+ parse: /* @__PURE__ */ d(function(y) {
127
+ var g = this, f = [0], m = [], E = [null], h = [], W = this.table, p = "", I = 0, Z = 0, V = 2, at = 1, ne = h.slice.call(arguments, 1), z = Object.create(this.lexer), q = { yy: {} };
128
+ for (var gt in this.yy)
129
+ Object.prototype.hasOwnProperty.call(this.yy, gt) && (q.yy[gt] = this.yy[gt]);
130
+ z.setInput(y, q.yy), q.yy.lexer = z, q.yy.parser = this, typeof z.yylloc > "u" && (z.yylloc = {});
131
+ var ut = z.yylloc;
132
+ h.push(ut);
133
+ var le = z.options && z.options.ranges;
134
+ typeof q.yy.parseError == "function" ? this.parseError = q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
135
+ function ce(P) {
136
+ f.length = f.length - 2 * P, E.length = E.length - P, h.length = h.length - P;
137
137
  }
138
- d(he, "popStack");
139
- function Tt() {
140
- var H;
141
- return H = w.pop() || M.lex() || P, typeof H != "number" && (H instanceof Array && (w = H, H = w.pop()), H = g.symbols_[H] || H), H;
138
+ d(ce, "popStack");
139
+ function Nt() {
140
+ var P;
141
+ return P = m.pop() || z.lex() || at, typeof P != "number" && (P instanceof Array && (m = P, P = m.pop()), P = g.symbols_[P] || P), P;
142
142
  }
143
- d(Tt, "lex");
144
- for (var Y, $, U, ft, tt = {}, it, q, Ct, nt; ; ) {
145
- if ($ = p[p.length - 1], this.defaultActions[$] ? U = this.defaultActions[$] : ((Y === null || typeof Y > "u") && (Y = Tt()), U = _[$] && _[$][Y]), typeof U > "u" || !U.length || !U[0]) {
146
- var xt = "";
147
- nt = [];
148
- for (it in _[$])
149
- this.terminals_[it] && it > X && nt.push("'" + this.terminals_[it] + "'");
150
- M.showPosition ? xt = "Parse error on line " + (A + 1) + `:
151
- ` + M.showPosition() + `
152
- Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt = "Parse error on line " + (A + 1) + ": Unexpected " + (Y == P ? "end of input" : "'" + (this.terminals_[Y] || Y) + "'"), this.parseError(xt, {
153
- text: M.match,
154
- token: this.terminals_[Y] || Y,
155
- line: M.yylineno,
156
- loc: pt,
157
- expected: nt
143
+ d(Nt, "lex");
144
+ for (var F, J, H, pt, Q = {}, st, G, Tt, it; ; ) {
145
+ if (J = f[f.length - 1], this.defaultActions[J] ? H = this.defaultActions[J] : ((F === null || typeof F > "u") && (F = Nt()), H = W[J] && W[J][F]), typeof H > "u" || !H.length || !H[0]) {
146
+ var ft = "";
147
+ it = [];
148
+ for (st in W[J])
149
+ this.terminals_[st] && st > V && it.push("'" + this.terminals_[st] + "'");
150
+ z.showPosition ? ft = "Parse error on line " + (I + 1) + `:
151
+ ` + z.showPosition() + `
152
+ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft = "Parse error on line " + (I + 1) + ": Unexpected " + (F == at ? "end of input" : "'" + (this.terminals_[F] || F) + "'"), this.parseError(ft, {
153
+ text: z.match,
154
+ token: this.terminals_[F] || F,
155
+ line: z.yylineno,
156
+ loc: ut,
157
+ expected: it
158
158
  });
159
159
  }
160
- if (U[0] instanceof Array && U.length > 1)
161
- throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + Y);
162
- switch (U[0]) {
160
+ if (H[0] instanceof Array && H.length > 1)
161
+ throw new Error("Parse Error: multiple actions possible at state: " + J + ", token: " + F);
162
+ switch (H[0]) {
163
163
  case 1:
164
- p.push(Y), S.push(M.yytext), c.push(M.yylloc), p.push(U[1]), Y = null, O = M.yyleng, f = M.yytext, A = M.yylineno, pt = M.yylloc;
164
+ f.push(F), E.push(z.yytext), h.push(z.yylloc), f.push(H[1]), F = null, Z = z.yyleng, p = z.yytext, I = z.yylineno, ut = z.yylloc;
165
165
  break;
166
166
  case 2:
167
- if (q = this.productions_[U[1]][1], tt.$ = S[S.length - q], tt._$ = {
168
- first_line: c[c.length - (q || 1)].first_line,
169
- last_line: c[c.length - 1].last_line,
170
- first_column: c[c.length - (q || 1)].first_column,
171
- last_column: c[c.length - 1].last_column
172
- }, oe && (tt._$.range = [
173
- c[c.length - (q || 1)].range[0],
174
- c[c.length - 1].range[1]
175
- ]), ft = this.performAction.apply(tt, [
176
- f,
177
- O,
178
- A,
179
- Q.yy,
180
- U[1],
181
- S,
182
- c
183
- ].concat(J)), typeof ft < "u")
184
- return ft;
185
- q && (p = p.slice(0, -1 * q * 2), S = S.slice(0, -1 * q), c = c.slice(0, -1 * q)), p.push(this.productions_[U[1]][0]), S.push(tt.$), c.push(tt._$), Ct = _[p[p.length - 2]][p[p.length - 1]], p.push(Ct);
167
+ if (G = this.productions_[H[1]][1], Q.$ = E[E.length - G], Q._$ = {
168
+ first_line: h[h.length - (G || 1)].first_line,
169
+ last_line: h[h.length - 1].last_line,
170
+ first_column: h[h.length - (G || 1)].first_column,
171
+ last_column: h[h.length - 1].last_column
172
+ }, le && (Q._$.range = [
173
+ h[h.length - (G || 1)].range[0],
174
+ h[h.length - 1].range[1]
175
+ ]), pt = this.performAction.apply(Q, [
176
+ p,
177
+ Z,
178
+ I,
179
+ q.yy,
180
+ H[1],
181
+ E,
182
+ h
183
+ ].concat(ne)), typeof pt < "u")
184
+ return pt;
185
+ G && (f = f.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), h = h.slice(0, -1 * G)), f.push(this.productions_[H[1]][0]), E.push(Q.$), h.push(Q._$), Tt = W[f[f.length - 2]][f[f.length - 1]], f.push(Tt);
186
186
  break;
187
187
  case 3:
188
188
  return !0;
@@ -190,18 +190,18 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
190
190
  }
191
191
  return !0;
192
192
  }, "parse")
193
- }, T = /* @__PURE__ */ function() {
194
- var N = {
193
+ }, B = /* @__PURE__ */ (function() {
194
+ var D = {
195
195
  EOF: 1,
196
- parseError: /* @__PURE__ */ d(function(g, p) {
196
+ parseError: /* @__PURE__ */ d(function(g, f) {
197
197
  if (this.yy.parser)
198
- this.yy.parser.parseError(g, p);
198
+ this.yy.parser.parseError(g, f);
199
199
  else
200
200
  throw new Error(g);
201
201
  }, "parseError"),
202
202
  // resets the lexer, sets new input
203
- setInput: /* @__PURE__ */ d(function(x, g) {
204
- return this.yy = g || this.yy || {}, this._input = x, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
203
+ setInput: /* @__PURE__ */ d(function(y, g) {
204
+ return this.yy = g || this.yy || {}, this._input = y, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
205
205
  first_line: 1,
206
206
  first_column: 0,
207
207
  last_line: 1,
@@ -210,24 +210,24 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
210
210
  }, "setInput"),
211
211
  // consumes and returns one char from the input
212
212
  input: /* @__PURE__ */ d(function() {
213
- var x = this._input[0];
214
- this.yytext += x, this.yyleng++, this.offset++, this.match += x, this.matched += x;
215
- var g = x.match(/(?:\r\n?|\n).*/g);
216
- return g ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), x;
213
+ var y = this._input[0];
214
+ this.yytext += y, this.yyleng++, this.offset++, this.match += y, this.matched += y;
215
+ var g = y.match(/(?:\r\n?|\n).*/g);
216
+ return g ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), y;
217
217
  }, "input"),
218
218
  // unshifts one char (or a string) into the input
219
- unput: /* @__PURE__ */ d(function(x) {
220
- var g = x.length, p = x.split(/(?:\r\n?|\n)/g);
221
- this._input = x + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - g), this.offset -= g;
222
- var w = this.match.split(/(?:\r\n?|\n)/g);
223
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), p.length - 1 && (this.yylineno -= p.length - 1);
224
- var S = this.yylloc.range;
219
+ unput: /* @__PURE__ */ d(function(y) {
220
+ var g = y.length, f = y.split(/(?:\r\n?|\n)/g);
221
+ this._input = y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - g), this.offset -= g;
222
+ var m = this.match.split(/(?:\r\n?|\n)/g);
223
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
224
+ var E = this.yylloc.range;
225
225
  return this.yylloc = {
226
226
  first_line: this.yylloc.first_line,
227
227
  last_line: this.yylineno + 1,
228
228
  first_column: this.yylloc.first_column,
229
- last_column: p ? (p.length === w.length ? this.yylloc.first_column : 0) + w[w.length - p.length].length - p[0].length : this.yylloc.first_column - g
230
- }, this.options.ranges && (this.yylloc.range = [S[0], S[0] + this.yyleng - g]), this.yyleng = this.yytext.length, this;
229
+ last_column: f ? (f.length === m.length ? this.yylloc.first_column : 0) + m[m.length - f.length].length - f[0].length : this.yylloc.first_column - g
230
+ }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - g]), this.yyleng = this.yytext.length, this;
231
231
  }, "unput"),
232
232
  // When called from action, caches matched text and appends it on next action
233
233
  more: /* @__PURE__ */ d(function() {
@@ -247,29 +247,29 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
247
247
  return this;
248
248
  }, "reject"),
249
249
  // retain first n characters of the match
250
- less: /* @__PURE__ */ d(function(x) {
251
- this.unput(this.match.slice(x));
250
+ less: /* @__PURE__ */ d(function(y) {
251
+ this.unput(this.match.slice(y));
252
252
  }, "less"),
253
253
  // displays already matched input, i.e. for error messages
254
254
  pastInput: /* @__PURE__ */ d(function() {
255
- var x = this.matched.substr(0, this.matched.length - this.match.length);
256
- return (x.length > 20 ? "..." : "") + x.substr(-20).replace(/\n/g, "");
255
+ var y = this.matched.substr(0, this.matched.length - this.match.length);
256
+ return (y.length > 20 ? "..." : "") + y.substr(-20).replace(/\n/g, "");
257
257
  }, "pastInput"),
258
258
  // displays upcoming input, i.e. for error messages
259
259
  upcomingInput: /* @__PURE__ */ d(function() {
260
- var x = this.match;
261
- return x.length < 20 && (x += this._input.substr(0, 20 - x.length)), (x.substr(0, 20) + (x.length > 20 ? "..." : "")).replace(/\n/g, "");
260
+ var y = this.match;
261
+ return y.length < 20 && (y += this._input.substr(0, 20 - y.length)), (y.substr(0, 20) + (y.length > 20 ? "..." : "")).replace(/\n/g, "");
262
262
  }, "upcomingInput"),
263
263
  // displays the character position where the lexing error occurred, i.e. for error messages
264
264
  showPosition: /* @__PURE__ */ d(function() {
265
- var x = this.pastInput(), g = new Array(x.length + 1).join("-");
266
- return x + this.upcomingInput() + `
265
+ var y = this.pastInput(), g = new Array(y.length + 1).join("-");
266
+ return y + this.upcomingInput() + `
267
267
  ` + g + "^";
268
268
  }, "showPosition"),
269
269
  // test the lexed token: return FALSE when not a match, otherwise return token
270
- test_match: /* @__PURE__ */ d(function(x, g) {
271
- var p, w, S;
272
- if (this.options.backtrack_lexer && (S = {
270
+ test_match: /* @__PURE__ */ d(function(y, g) {
271
+ var f, m, E;
272
+ if (this.options.backtrack_lexer && (E = {
273
273
  yylineno: this.yylineno,
274
274
  yylloc: {
275
275
  first_line: this.yylloc.first_line,
@@ -288,16 +288,16 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
288
288
  yy: this.yy,
289
289
  conditionStack: this.conditionStack.slice(0),
290
290
  done: this.done
291
- }, this.options.ranges && (S.yylloc.range = this.yylloc.range.slice(0))), w = x[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
291
+ }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), m = y[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
292
292
  first_line: this.yylloc.last_line,
293
293
  last_line: this.yylineno + 1,
294
294
  first_column: this.yylloc.last_column,
295
- last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + x[0].length
296
- }, this.yytext += x[0], this.match += x[0], this.matches = x, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(x[0].length), this.matched += x[0], p = this.performAction.call(this, this.yy, this, g, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), p)
297
- return p;
295
+ last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + y[0].length
296
+ }, this.yytext += y[0], this.match += y[0], this.matches = y, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(y[0].length), this.matched += y[0], f = this.performAction.call(this, this.yy, this, g, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f)
297
+ return f;
298
298
  if (this._backtrack) {
299
- for (var c in S)
300
- this[c] = S[c];
299
+ for (var h in E)
300
+ this[h] = E[h];
301
301
  return !1;
302
302
  }
303
303
  return !1;
@@ -307,13 +307,13 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
307
307
  if (this.done)
308
308
  return this.EOF;
309
309
  this._input || (this.done = !0);
310
- var x, g, p, w;
310
+ var y, g, f, m;
311
311
  this._more || (this.yytext = "", this.match = "");
312
- for (var S = this._currentRules(), c = 0; c < S.length; c++)
313
- if (p = this._input.match(this.rules[S[c]]), p && (!g || p[0].length > g[0].length)) {
314
- if (g = p, w = c, this.options.backtrack_lexer) {
315
- if (x = this.test_match(p, S[c]), x !== !1)
316
- return x;
312
+ for (var E = this._currentRules(), h = 0; h < E.length; h++)
313
+ if (f = this._input.match(this.rules[E[h]]), f && (!g || f[0].length > g[0].length)) {
314
+ if (g = f, m = h, this.options.backtrack_lexer) {
315
+ if (y = this.test_match(f, E[h]), y !== !1)
316
+ return y;
317
317
  if (this._backtrack) {
318
318
  g = !1;
319
319
  continue;
@@ -322,7 +322,7 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
322
322
  } else if (!this.options.flex)
323
323
  break;
324
324
  }
325
- return g ? (x = this.test_match(g, S[w]), x !== !1 ? x : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
325
+ return g ? (y = this.test_match(g, E[m]), y !== !1 ? y : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
326
326
  ` + this.showPosition(), {
327
327
  text: "",
328
328
  token: null,
@@ -360,8 +360,8 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
360
360
  return this.conditionStack.length;
361
361
  }, "stateStackSize"),
362
362
  options: {},
363
- performAction: /* @__PURE__ */ d(function(g, p, w, S) {
364
- switch (w) {
363
+ performAction: /* @__PURE__ */ d(function(g, f, m, E) {
364
+ switch (m) {
365
365
  case 0:
366
366
  return g.getLogger().debug("Found block-beta"), 10;
367
367
  case 1:
@@ -369,17 +369,17 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
369
369
  case 2:
370
370
  return g.getLogger().debug("Found block"), 10;
371
371
  case 3:
372
- g.getLogger().debug(".", p.yytext);
372
+ g.getLogger().debug(".", f.yytext);
373
373
  break;
374
374
  case 4:
375
- g.getLogger().debug("_", p.yytext);
375
+ g.getLogger().debug("_", f.yytext);
376
376
  break;
377
377
  case 5:
378
378
  return 5;
379
379
  case 6:
380
- return p.yytext = -1, 28;
380
+ return f.yytext = -1, 28;
381
381
  case 7:
382
- return p.yytext = p.yytext.replace(/columns\s+/, ""), g.getLogger().debug("COLUMNS (LEX)", p.yytext), 28;
382
+ return f.yytext = f.yytext.replace(/columns\s+/, ""), g.getLogger().debug("COLUMNS (LEX)", f.yytext), 28;
383
383
  case 8:
384
384
  this.pushState("md_string");
385
385
  break;
@@ -392,14 +392,14 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
392
392
  this.pushState("string");
393
393
  break;
394
394
  case 12:
395
- g.getLogger().debug("LEX: POPPING STR:", p.yytext), this.popState();
395
+ g.getLogger().debug("LEX: POPPING STR:", f.yytext), this.popState();
396
396
  break;
397
397
  case 13:
398
- return g.getLogger().debug("LEX: STR end:", p.yytext), "STR";
398
+ return g.getLogger().debug("LEX: STR end:", f.yytext), "STR";
399
399
  case 14:
400
- return p.yytext = p.yytext.replace(/space\:/, ""), g.getLogger().debug("SPACE NUM (LEX)", p.yytext), 21;
400
+ return f.yytext = f.yytext.replace(/space\:/, ""), g.getLogger().debug("SPACE NUM (LEX)", f.yytext), 21;
401
401
  case 15:
402
- return p.yytext = "1", g.getLogger().debug("COLUMNS (LEX)", p.yytext), 21;
402
+ return f.yytext = "1", g.getLogger().debug("COLUMNS (LEX)", f.yytext), 21;
403
403
  case 16:
404
404
  return 42;
405
405
  case 17:
@@ -519,9 +519,9 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
519
519
  case 73:
520
520
  return this.pushState("BLOCK_ARROW"), g.getLogger().debug("LEX ARR START"), 37;
521
521
  case 74:
522
- return g.getLogger().debug("Lex: NODE_ID", p.yytext), 31;
522
+ return g.getLogger().debug("Lex: NODE_ID", f.yytext), 31;
523
523
  case 75:
524
- return g.getLogger().debug("Lex: EOF", p.yytext), 8;
524
+ return g.getLogger().debug("Lex: EOF", f.yytext), 8;
525
525
  case 76:
526
526
  this.pushState("md_string");
527
527
  break;
@@ -540,7 +540,7 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
540
540
  g.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
541
541
  break;
542
542
  case 82:
543
- return g.getLogger().debug("LEX: NODE_DESCR:", p.yytext), "NODE_DESCR";
543
+ return g.getLogger().debug("LEX: NODE_DESCR:", f.yytext), "NODE_DESCR";
544
544
  case 83:
545
545
  g.getLogger().debug("LEX POPPING"), this.popState();
546
546
  break;
@@ -548,126 +548,126 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
548
548
  g.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
549
549
  break;
550
550
  case 85:
551
- return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (right): dir:", p.yytext), "DIR";
551
+ return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (right): dir:", f.yytext), "DIR";
552
552
  case 86:
553
- return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (left):", p.yytext), "DIR";
553
+ return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (left):", f.yytext), "DIR";
554
554
  case 87:
555
- return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (x):", p.yytext), "DIR";
555
+ return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (x):", f.yytext), "DIR";
556
556
  case 88:
557
- return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (y):", p.yytext), "DIR";
557
+ return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (y):", f.yytext), "DIR";
558
558
  case 89:
559
- return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (up):", p.yytext), "DIR";
559
+ return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (up):", f.yytext), "DIR";
560
560
  case 90:
561
- return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (down):", p.yytext), "DIR";
561
+ return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (down):", f.yytext), "DIR";
562
562
  case 91:
563
- return p.yytext = "]>", g.getLogger().debug("Lex (ARROW_DIR end):", p.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
563
+ return f.yytext = "]>", g.getLogger().debug("Lex (ARROW_DIR end):", f.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
564
564
  case 92:
565
- return g.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
565
+ return g.getLogger().debug("Lex: LINK", "#" + f.yytext + "#"), 15;
566
566
  case 93:
567
- return g.getLogger().debug("Lex: LINK", p.yytext), 15;
567
+ return g.getLogger().debug("Lex: LINK", f.yytext), 15;
568
568
  case 94:
569
- return g.getLogger().debug("Lex: LINK", p.yytext), 15;
569
+ return g.getLogger().debug("Lex: LINK", f.yytext), 15;
570
570
  case 95:
571
- return g.getLogger().debug("Lex: LINK", p.yytext), 15;
571
+ return g.getLogger().debug("Lex: LINK", f.yytext), 15;
572
572
  case 96:
573
- return g.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
573
+ return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
574
574
  case 97:
575
- return g.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
575
+ return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
576
576
  case 98:
577
- return g.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
577
+ return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
578
578
  case 99:
579
579
  this.pushState("md_string");
580
580
  break;
581
581
  case 100:
582
582
  return g.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
583
583
  case 101:
584
- return this.popState(), g.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
584
+ return this.popState(), g.getLogger().debug("Lex: LINK", "#" + f.yytext + "#"), 15;
585
585
  case 102:
586
- return this.popState(), g.getLogger().debug("Lex: LINK", p.yytext), 15;
586
+ return this.popState(), g.getLogger().debug("Lex: LINK", f.yytext), 15;
587
587
  case 103:
588
- return this.popState(), g.getLogger().debug("Lex: LINK", p.yytext), 15;
588
+ return this.popState(), g.getLogger().debug("Lex: LINK", f.yytext), 15;
589
589
  case 104:
590
- return g.getLogger().debug("Lex: COLON", p.yytext), p.yytext = p.yytext.slice(1), 27;
590
+ return g.getLogger().debug("Lex: COLON", f.yytext), f.yytext = f.yytext.slice(1), 27;
591
591
  }
592
592
  }, "anonymous"),
593
593
  rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
594
594
  conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
595
595
  };
596
- return N;
597
- }();
598
- v.lexer = T;
599
- function k() {
596
+ return D;
597
+ })();
598
+ k.lexer = B;
599
+ function _() {
600
600
  this.yy = {};
601
601
  }
602
- return d(k, "Parser"), k.prototype = v, v.Parser = k, new k();
603
- }();
604
- wt.parser = wt;
605
- var ke = wt, V = /* @__PURE__ */ new Map(), Et = [], mt = /* @__PURE__ */ new Map(), It = "color", Bt = "fill", De = "bgFill", Kt = ",", Ne = z(), ot = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ d((e) => me.sanitizeText(e, Ne), "sanitizeText"), Ce = /* @__PURE__ */ d(function(e, t = "") {
606
- let a = ot.get(e);
607
- a || (a = { id: e, styles: [], textStyles: [] }, ot.set(e, a)), t != null && t.split(Kt).forEach((i) => {
602
+ return d(_, "Parser"), _.prototype = k, k.Parser = _, new _();
603
+ })();
604
+ bt.parser = bt;
605
+ var ve = bt, X = /* @__PURE__ */ new Map(), kt = [], wt = /* @__PURE__ */ new Map(), Bt = "color", Ct = "fill", Ee = "bgFill", Pt = ",", _e = R(), ct = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ d((e) => be.sanitizeText(e, _e), "sanitizeText"), Ne = /* @__PURE__ */ d(function(e, t = "") {
606
+ let a = ct.get(e);
607
+ a || (a = { id: e, styles: [], textStyles: [] }, ct.set(e, a)), t?.split(Pt).forEach((i) => {
608
608
  const l = i.replace(/([^;]*);/, "$1").trim();
609
- if (RegExp(It).exec(i)) {
610
- const r = l.replace(Bt, De).replace(It, Bt);
609
+ if (RegExp(Bt).exec(i)) {
610
+ const r = l.replace(Ct, Ee).replace(Bt, Ct);
611
611
  a.textStyles.push(r);
612
612
  }
613
613
  a.styles.push(l);
614
614
  });
615
- }, "addStyleClass"), Ie = /* @__PURE__ */ d(function(e, t = "") {
616
- const a = V.get(e);
617
- t != null && (a.styles = t.split(Kt));
615
+ }, "addStyleClass"), Te = /* @__PURE__ */ d(function(e, t = "") {
616
+ const a = X.get(e);
617
+ t != null && (a.styles = t.split(Pt));
618
618
  }, "addStyle2Node"), Be = /* @__PURE__ */ d(function(e, t) {
619
619
  e.split(",").forEach(function(a) {
620
- let i = V.get(a);
620
+ let i = X.get(a);
621
621
  if (i === void 0) {
622
622
  const l = a.trim();
623
- i = { id: l, type: "na", children: [] }, V.set(l, i);
623
+ i = { id: l, type: "na", children: [] }, X.set(l, i);
624
624
  }
625
625
  i.classes || (i.classes = []), i.classes.push(t);
626
626
  });
627
- }, "setCssClass"), Xt = /* @__PURE__ */ d((e, t) => {
628
- const a = e.flat(), i = [], l = a.find((r) => (r == null ? void 0 : r.type) === "column-setting"), s = (l == null ? void 0 : l.columns) ?? -1;
627
+ }, "setCssClass"), Yt = /* @__PURE__ */ d((e, t) => {
628
+ const a = e.flat(), i = [], s = a.find((r) => r?.type === "column-setting")?.columns ?? -1;
629
629
  for (const r of a) {
630
- if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s && m.warn(
630
+ if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s && L.warn(
631
631
  `Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${s}`
632
- ), r.label && (r.label = Te(r.label)), r.type === "classDef") {
633
- Ce(r.id, r.css);
632
+ ), r.label && (r.label = De(r.label)), r.type === "classDef") {
633
+ Ne(r.id, r.css);
634
634
  continue;
635
635
  }
636
636
  if (r.type === "applyClass") {
637
- Be(r.id, (r == null ? void 0 : r.styleClass) ?? "");
637
+ Be(r.id, r?.styleClass ?? "");
638
638
  continue;
639
639
  }
640
640
  if (r.type === "applyStyles") {
641
- r != null && r.stylesStr && Ie(r.id, r == null ? void 0 : r.stylesStr);
641
+ r?.stylesStr && Te(r.id, r?.stylesStr);
642
642
  continue;
643
643
  }
644
644
  if (r.type === "column-setting")
645
645
  t.columns = r.columns ?? -1;
646
646
  else if (r.type === "edge") {
647
- const n = (mt.get(r.id) ?? 0) + 1;
648
- mt.set(r.id, n), r.id = n + "-" + r.id, Et.push(r);
647
+ const n = (wt.get(r.id) ?? 0) + 1;
648
+ wt.set(r.id, n), r.id = n + "-" + r.id, kt.push(r);
649
649
  } else {
650
650
  r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
651
- const n = V.get(r.id);
652
- if (n === void 0 ? V.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Xt(r.children, r), r.type === "space") {
653
- const o = r.width ?? 1;
654
- for (let u = 0; u < o; u++) {
655
- const h = ve(r);
656
- h.id = h.id + "-" + u, V.set(h.id, h), i.push(h);
651
+ const n = X.get(r.id);
652
+ if (n === void 0 ? X.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Yt(r.children, r), r.type === "space") {
653
+ const c = r.width ?? 1;
654
+ for (let u = 0; u < c; u++) {
655
+ const o = Le(r);
656
+ o.id = o.id + "-" + u, X.set(o.id, o), i.push(o);
657
657
  }
658
658
  } else n === void 0 && i.push(r);
659
659
  }
660
660
  }
661
661
  t.children = i;
662
- }, "populateBlockDatabase"), _t = [], at = { id: "root", type: "composite", children: [], columns: -1 }, Oe = /* @__PURE__ */ d(() => {
663
- m.debug("Clear called"), ue(), at = { id: "root", type: "composite", children: [], columns: -1 }, V = /* @__PURE__ */ new Map([["root", at]]), _t = [], ot = /* @__PURE__ */ new Map(), Et = [], mt = /* @__PURE__ */ new Map();
662
+ }, "populateBlockDatabase"), vt = [], et = { id: "root", type: "composite", children: [], columns: -1 }, Ce = /* @__PURE__ */ d(() => {
663
+ L.debug("Clear called"), de(), et = { id: "root", type: "composite", children: [], columns: -1 }, X = /* @__PURE__ */ new Map([["root", et]]), vt = [], ct = /* @__PURE__ */ new Map(), kt = [], wt = /* @__PURE__ */ new Map();
664
664
  }, "clear");
665
- function Ut(e) {
666
- switch (m.debug("typeStr2Type", e), e) {
665
+ function Ht(e) {
666
+ switch (L.debug("typeStr2Type", e), e) {
667
667
  case "[]":
668
668
  return "square";
669
669
  case "()":
670
- return m.debug("we have a round"), "round";
670
+ return L.debug("we have a round"), "round";
671
671
  case "(())":
672
672
  return "circle";
673
673
  case ">]":
@@ -698,17 +698,12 @@ function Ut(e) {
698
698
  return "na";
699
699
  }
700
700
  }
701
- d(Ut, "typeStr2Type");
702
- function jt(e) {
703
- switch (m.debug("typeStr2Type", e), e) {
704
- case "==":
705
- return "thick";
706
- default:
707
- return "normal";
708
- }
701
+ d(Ht, "typeStr2Type");
702
+ function Kt(e) {
703
+ return L.debug("typeStr2Type", e), e === "==" ? "thick" : "normal";
709
704
  }
710
- d(jt, "edgeTypeStr2Type");
711
- function Vt(e) {
705
+ d(Kt, "edgeTypeStr2Type");
706
+ function Xt(e) {
712
707
  switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
713
708
  case "x":
714
709
  return "arrow_cross";
@@ -720,36 +715,36 @@ function Vt(e) {
720
715
  return "";
721
716
  }
722
717
  }
723
- d(Vt, "edgeStrToEdgeData");
724
- var Ot = 0, Re = /* @__PURE__ */ d(() => (Ot++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Ot), "generateId"), ze = /* @__PURE__ */ d((e) => {
725
- at.children = e, Xt(e, at), _t = at.children;
726
- }, "setHierarchy"), Ae = /* @__PURE__ */ d((e) => {
727
- const t = V.get(e);
718
+ d(Xt, "edgeStrToEdgeData");
719
+ var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + It), "generateId"), Oe = /* @__PURE__ */ d((e) => {
720
+ et.children = e, Yt(e, et), vt = et.children;
721
+ }, "setHierarchy"), Re = /* @__PURE__ */ d((e) => {
722
+ const t = X.get(e);
728
723
  return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
729
- }, "getColumns"), Me = /* @__PURE__ */ d(() => [...V.values()], "getBlocksFlat"), Fe = /* @__PURE__ */ d(() => _t || [], "getBlocks"), We = /* @__PURE__ */ d(() => Et, "getEdges"), Pe = /* @__PURE__ */ d((e) => V.get(e), "getBlock"), Ye = /* @__PURE__ */ d((e) => {
730
- V.set(e.id, e);
731
- }, "setBlock"), He = /* @__PURE__ */ d(() => m, "getLogger"), Ke = /* @__PURE__ */ d(function() {
732
- return ot;
733
- }, "getClasses"), Xe = {
734
- getConfig: /* @__PURE__ */ d(() => st().block, "getConfig"),
735
- typeStr2Type: Ut,
736
- edgeTypeStr2Type: jt,
737
- edgeStrToEdgeData: Vt,
738
- getLogger: He,
739
- getBlocksFlat: Me,
740
- getBlocks: Fe,
741
- getEdges: We,
742
- setHierarchy: ze,
743
- getBlock: Pe,
744
- setBlock: Ye,
745
- getColumns: Ae,
746
- getClasses: Ke,
747
- clear: Oe,
748
- generateId: Re
749
- }, Ue = Xe, lt = /* @__PURE__ */ d((e, t) => {
750
- const a = _e, i = a(e, "r"), l = a(e, "g"), s = a(e, "b");
751
- return pe(i, l, s, t);
752
- }, "fade"), je = /* @__PURE__ */ d((e) => `.label {
724
+ }, "getColumns"), ze = /* @__PURE__ */ d(() => [...X.values()], "getBlocksFlat"), Ae = /* @__PURE__ */ d(() => vt || [], "getBlocks"), Me = /* @__PURE__ */ d(() => kt, "getEdges"), Fe = /* @__PURE__ */ d((e) => X.get(e), "getBlock"), We = /* @__PURE__ */ d((e) => {
725
+ X.set(e.id, e);
726
+ }, "setBlock"), Pe = /* @__PURE__ */ d(() => L, "getLogger"), Ye = /* @__PURE__ */ d(function() {
727
+ return ct;
728
+ }, "getClasses"), He = {
729
+ getConfig: /* @__PURE__ */ d(() => rt().block, "getConfig"),
730
+ typeStr2Type: Ht,
731
+ edgeTypeStr2Type: Kt,
732
+ edgeStrToEdgeData: Xt,
733
+ getLogger: Pe,
734
+ getBlocksFlat: ze,
735
+ getBlocks: Ae,
736
+ getEdges: Me,
737
+ setHierarchy: Oe,
738
+ getBlock: Fe,
739
+ setBlock: We,
740
+ getColumns: Re,
741
+ getClasses: Ye,
742
+ clear: Ce,
743
+ generateId: Ie
744
+ }, Ke = He, nt = /* @__PURE__ */ d((e, t) => {
745
+ const a = ke, i = a(e, "r"), l = a(e, "g"), s = a(e, "b");
746
+ return ge(i, l, s, t);
747
+ }, "fade"), Xe = /* @__PURE__ */ d((e) => `.label {
753
748
  font-family: ${e.fontFamily};
754
749
  color: ${e.nodeTextColor || e.textColor};
755
750
  }
@@ -819,14 +814,14 @@ var Ot = 0, Re = /* @__PURE__ */ d(() => (Ot++, "id-" + Math.random().toString(3
819
814
 
820
815
  /* For html labels only */
821
816
  .labelBkg {
822
- background-color: ${lt(e.edgeLabelBackground, 0.5)};
817
+ background-color: ${nt(e.edgeLabelBackground, 0.5)};
823
818
  // background-color:
824
819
  }
825
820
 
826
821
  .node .cluster {
827
- // fill: ${lt(e.mainBkg, 0.5)};
828
- fill: ${lt(e.clusterBkg, 0.5)};
829
- stroke: ${lt(e.clusterBorder, 0.2)};
822
+ // fill: ${nt(e.mainBkg, 0.5)};
823
+ fill: ${nt(e.clusterBkg, 0.5)};
824
+ stroke: ${nt(e.clusterBorder, 0.2)};
830
825
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
831
826
  stroke-width: 1px;
832
827
  }
@@ -861,41 +856,41 @@ var Ot = 0, Re = /* @__PURE__ */ d(() => (Ot++, "id-" + Math.random().toString(3
861
856
  font-size: 18px;
862
857
  fill: ${e.textColor};
863
858
  }
864
- ${de()}
865
- `, "getStyles"), Ve = je, Ge = /* @__PURE__ */ d((e, t, a, i) => {
859
+ ${oe()}
860
+ `, "getStyles"), Ue = Xe, je = /* @__PURE__ */ d((e, t, a, i) => {
866
861
  t.forEach((l) => {
867
- sr[l](e, a, i);
862
+ rr[l](e, a, i);
868
863
  });
869
- }, "insertMarkers"), Ze = /* @__PURE__ */ d((e, t, a) => {
870
- m.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
871
- }, "extension"), qe = /* @__PURE__ */ d((e, t, a) => {
864
+ }, "insertMarkers"), Ve = /* @__PURE__ */ d((e, t, a) => {
865
+ L.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
866
+ }, "extension"), Ge = /* @__PURE__ */ d((e, t, a) => {
872
867
  e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
873
- }, "composition"), Je = /* @__PURE__ */ d((e, t, a) => {
868
+ }, "composition"), Ze = /* @__PURE__ */ d((e, t, a) => {
874
869
  e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
875
- }, "aggregation"), Qe = /* @__PURE__ */ d((e, t, a) => {
870
+ }, "aggregation"), qe = /* @__PURE__ */ d((e, t, a) => {
876
871
  e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
877
- }, "dependency"), $e = /* @__PURE__ */ d((e, t, a) => {
872
+ }, "dependency"), Je = /* @__PURE__ */ d((e, t, a) => {
878
873
  e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
879
- }, "lollipop"), tr = /* @__PURE__ */ d((e, t, a) => {
874
+ }, "lollipop"), Qe = /* @__PURE__ */ d((e, t, a) => {
880
875
  e.append("marker").attr("id", a + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
881
- }, "point"), er = /* @__PURE__ */ d((e, t, a) => {
876
+ }, "point"), $e = /* @__PURE__ */ d((e, t, a) => {
882
877
  e.append("marker").attr("id", a + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
883
- }, "circle"), rr = /* @__PURE__ */ d((e, t, a) => {
878
+ }, "circle"), tr = /* @__PURE__ */ d((e, t, a) => {
884
879
  e.append("marker").attr("id", a + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
885
- }, "cross"), ar = /* @__PURE__ */ d((e, t, a) => {
880
+ }, "cross"), er = /* @__PURE__ */ d((e, t, a) => {
886
881
  e.append("defs").append("marker").attr("id", a + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
887
- }, "barb"), sr = {
888
- extension: Ze,
889
- composition: qe,
890
- aggregation: Je,
891
- dependency: Qe,
892
- lollipop: $e,
893
- point: tr,
894
- circle: er,
895
- cross: rr,
896
- barb: ar
897
- }, ir = Ge, Pt, Yt, B = ((Yt = (Pt = z()) == null ? void 0 : Pt.block) == null ? void 0 : Yt.padding) ?? 8;
898
- function Gt(e, t) {
882
+ }, "barb"), rr = {
883
+ extension: Ve,
884
+ composition: Ge,
885
+ aggregation: Ze,
886
+ dependency: qe,
887
+ lollipop: Je,
888
+ point: Qe,
889
+ circle: $e,
890
+ cross: tr,
891
+ barb: er
892
+ }, ar = je, C = R()?.block?.padding ?? 8;
893
+ function Ut(e, t) {
899
894
  if (e === 0 || !Number.isInteger(e))
900
895
  throw new Error("Columns must be an integer !== 0.");
901
896
  if (t < 0 || !Number.isInteger(t))
@@ -907,12 +902,12 @@ function Gt(e, t) {
907
902
  const a = t % e, i = Math.floor(t / e);
908
903
  return { px: a, py: i };
909
904
  }
910
- d(Gt, "calculateBlockPosition");
911
- var nr = /* @__PURE__ */ d((e) => {
905
+ d(Ut, "calculateBlockPosition");
906
+ var sr = /* @__PURE__ */ d((e) => {
912
907
  let t = 0, a = 0;
913
908
  for (const i of e.children) {
914
909
  const { width: l, height: s, x: r, y: n } = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
915
- m.debug(
910
+ L.debug(
916
911
  "getMaxChildSize abc95 child:",
917
912
  i.id,
918
913
  "width:",
@@ -928,175 +923,173 @@ var nr = /* @__PURE__ */ d((e) => {
928
923
  }
929
924
  return { width: t, height: a };
930
925
  }, "getMaxChildSize");
931
- function ht(e, t, a = 0, i = 0) {
932
- var r, n, o, u, h, y, b, L, E, D, v;
933
- m.debug(
926
+ function ot(e, t, a = 0, i = 0) {
927
+ L.debug(
934
928
  "setBlockSizes abc95 (start)",
935
929
  e.id,
936
- (r = e == null ? void 0 : e.size) == null ? void 0 : r.x,
930
+ e?.size?.x,
937
931
  "block width =",
938
- e == null ? void 0 : e.size,
932
+ e?.size,
939
933
  "siblingWidth",
940
934
  a
941
- ), (n = e == null ? void 0 : e.size) != null && n.width || (e.size = {
935
+ ), e?.size?.width || (e.size = {
942
936
  width: a,
943
937
  height: i,
944
938
  x: 0,
945
939
  y: 0
946
940
  });
947
941
  let l = 0, s = 0;
948
- if (((o = e.children) == null ? void 0 : o.length) > 0) {
949
- for (const S of e.children)
950
- ht(S, t);
951
- const T = nr(e);
952
- l = T.width, s = T.height, m.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", l, s);
953
- for (const S of e.children)
954
- S.size && (m.debug(
955
- `abc95 Setting size of children of ${e.id} id=${S.id} ${l} ${s} ${JSON.stringify(S.size)}`
956
- ), S.size.width = l * (S.widthInColumns ?? 1) + B * ((S.widthInColumns ?? 1) - 1), S.size.height = s, S.size.x = 0, S.size.y = 0, m.debug(
957
- `abc95 updating size of ${e.id} children child:${S.id} maxWidth:${l} maxHeight:${s}`
942
+ if (e.children?.length > 0) {
943
+ for (const b of e.children)
944
+ ot(b, t);
945
+ const r = sr(e);
946
+ l = r.width, s = r.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", l, s);
947
+ for (const b of e.children)
948
+ b.size && (L.debug(
949
+ `abc95 Setting size of children of ${e.id} id=${b.id} ${l} ${s} ${JSON.stringify(b.size)}`
950
+ ), b.size.width = l * (b.widthInColumns ?? 1) + C * ((b.widthInColumns ?? 1) - 1), b.size.height = s, b.size.x = 0, b.size.y = 0, L.debug(
951
+ `abc95 updating size of ${e.id} children child:${b.id} maxWidth:${l} maxHeight:${s}`
958
952
  ));
959
- for (const S of e.children)
960
- ht(S, t, l, s);
961
- const k = e.columns ?? -1;
962
- let N = 0;
963
- for (const S of e.children)
964
- N += S.widthInColumns ?? 1;
965
- let x = e.children.length;
966
- k > 0 && k < N && (x = k);
967
- const g = Math.ceil(N / x);
968
- let p = x * (l + B) + B, w = g * (s + B) + B;
969
- if (p < a) {
970
- m.debug(
971
- `Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${p}`
972
- ), p = a, w = i;
973
- const S = (a - x * B - B) / x, c = (i - g * B - B) / g;
974
- m.debug("Size indata abc88", e.id, "childWidth", S, "maxWidth", l), m.debug("Size indata abc88", e.id, "childHeight", c, "maxHeight", s), m.debug("Size indata abc88 xSize", x, "padding", B);
975
- for (const _ of e.children)
976
- _.size && (_.size.width = S, _.size.height = c, _.size.x = 0, _.size.y = 0);
953
+ for (const b of e.children)
954
+ ot(b, t, l, s);
955
+ const n = e.columns ?? -1;
956
+ let c = 0;
957
+ for (const b of e.children)
958
+ c += b.widthInColumns ?? 1;
959
+ let u = e.children.length;
960
+ n > 0 && n < c && (u = n);
961
+ const o = Math.ceil(c / u);
962
+ let x = u * (l + C) + C, w = o * (s + C) + C;
963
+ if (x < a) {
964
+ L.debug(
965
+ `Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${x}`
966
+ ), x = a, w = i;
967
+ const b = (a - u * C - C) / u, S = (i - o * C - C) / o;
968
+ L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth", l), L.debug("Size indata abc88", e.id, "childHeight", S, "maxHeight", s), L.debug("Size indata abc88 xSize", u, "padding", C);
969
+ for (const v of e.children)
970
+ v.size && (v.size.width = b, v.size.height = S, v.size.x = 0, v.size.y = 0);
977
971
  }
978
- if (m.debug(
979
- `abc95 (finale calc) ${e.id} xSize ${x} ySize ${g} columns ${k}${e.children.length} width=${Math.max(p, ((u = e.size) == null ? void 0 : u.width) || 0)}`
980
- ), p < (((h = e == null ? void 0 : e.size) == null ? void 0 : h.width) || 0)) {
981
- p = ((y = e == null ? void 0 : e.size) == null ? void 0 : y.width) || 0;
982
- const S = k > 0 ? Math.min(e.children.length, k) : e.children.length;
983
- if (S > 0) {
984
- const c = (p - S * B - B) / S;
985
- m.debug("abc95 (growing to fit) width", e.id, p, (b = e.size) == null ? void 0 : b.width, c);
986
- for (const _ of e.children)
987
- _.size && (_.size.width = c);
972
+ if (L.debug(
973
+ `abc95 (finale calc) ${e.id} xSize ${u} ySize ${o} columns ${n}${e.children.length} width=${Math.max(x, e.size?.width || 0)}`
974
+ ), x < (e?.size?.width || 0)) {
975
+ x = e?.size?.width || 0;
976
+ const b = n > 0 ? Math.min(e.children.length, n) : e.children.length;
977
+ if (b > 0) {
978
+ const S = (x - b * C - C) / b;
979
+ L.debug("abc95 (growing to fit) width", e.id, x, e.size?.width, S);
980
+ for (const v of e.children)
981
+ v.size && (v.size.width = S);
988
982
  }
989
983
  }
990
984
  e.size = {
991
- width: p,
985
+ width: x,
992
986
  height: w,
993
987
  x: 0,
994
988
  y: 0
995
989
  };
996
990
  }
997
- m.debug(
991
+ L.debug(
998
992
  "setBlockSizes abc94 (done)",
999
993
  e.id,
1000
- (L = e == null ? void 0 : e.size) == null ? void 0 : L.x,
1001
- (E = e == null ? void 0 : e.size) == null ? void 0 : E.width,
1002
- (D = e == null ? void 0 : e.size) == null ? void 0 : D.y,
1003
- (v = e == null ? void 0 : e.size) == null ? void 0 : v.height
994
+ e?.size?.x,
995
+ e?.size?.width,
996
+ e?.size?.y,
997
+ e?.size?.height
1004
998
  );
1005
999
  }
1006
- d(ht, "setBlockSizes");
1007
- function kt(e, t) {
1008
- var i, l, s, r, n, o, u, h, y, b, L, E, D, v, T, k, N;
1009
- m.debug(
1010
- `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(i = e == null ? void 0 : e.size) == null ? void 0 : i.x} y: ${(l = e == null ? void 0 : e.size) == null ? void 0 : l.y} width: ${(s = e == null ? void 0 : e.size) == null ? void 0 : s.width}`
1000
+ d(ot, "setBlockSizes");
1001
+ function Et(e, t) {
1002
+ L.debug(
1003
+ `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
1011
1004
  );
1012
1005
  const a = e.columns ?? -1;
1013
- if (m.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && // find max width of children
1006
+ if (L.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && // find max width of children
1014
1007
  e.children.length > 0) {
1015
- const x = ((n = (r = e == null ? void 0 : e.children[0]) == null ? void 0 : r.size) == null ? void 0 : n.width) ?? 0, g = e.children.length * x + (e.children.length - 1) * B;
1016
- m.debug("widthOfChildren 88", g, "posX");
1017
- let p = 0;
1018
- m.debug("abc91 block?.size?.x", e.id, (o = e == null ? void 0 : e.size) == null ? void 0 : o.x);
1019
- let w = (u = e == null ? void 0 : e.size) != null && u.x ? ((h = e == null ? void 0 : e.size) == null ? void 0 : h.x) + (-((y = e == null ? void 0 : e.size) == null ? void 0 : y.width) / 2 || 0) : -B, S = 0;
1008
+ const i = e?.children[0]?.size?.width ?? 0, l = e.children.length * i + (e.children.length - 1) * C;
1009
+ L.debug("widthOfChildren 88", l, "posX");
1010
+ let s = 0;
1011
+ L.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1012
+ let r = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -C, n = 0;
1020
1013
  for (const c of e.children) {
1021
- const _ = e;
1014
+ const u = e;
1022
1015
  if (!c.size)
1023
1016
  continue;
1024
- const { width: f, height: A } = c.size, { px: O, py: X } = Gt(a, p);
1025
- if (X != S && (S = X, w = (b = e == null ? void 0 : e.size) != null && b.x ? ((L = e == null ? void 0 : e.size) == null ? void 0 : L.x) + (-((E = e == null ? void 0 : e.size) == null ? void 0 : E.width) / 2 || 0) : -B, m.debug("New row in layout for block", e.id, " and child ", c.id, S)), m.debug(
1026
- `abc89 layout blocks (child) id: ${c.id} Pos: ${p} (px, py) ${O},${X} (${(D = _ == null ? void 0 : _.size) == null ? void 0 : D.x},${(v = _ == null ? void 0 : _.size) == null ? void 0 : v.y}) parent: ${_.id} width: ${f}${B}`
1027
- ), _.size) {
1028
- const J = f / 2;
1029
- c.size.x = w + B + J, m.debug(
1030
- `abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${J} padding=${B} width=${f} halfWidth=${J} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${f * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1031
- ), w = c.size.x + J, c.size.y = _.size.y - _.size.height / 2 + X * (A + B) + A / 2 + B, m.debug(
1032
- `abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${B}${J}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${f * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1017
+ const { width: o, height: x } = c.size, { px: w, py: b } = Ut(a, s);
1018
+ if (b != n && (n = b, r = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -C, L.debug("New row in layout for block", e.id, " and child ", c.id, n)), L.debug(
1019
+ `abc89 layout blocks (child) id: ${c.id} Pos: ${s} (px, py) ${w},${b} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${o}${C}`
1020
+ ), u.size) {
1021
+ const v = o / 2;
1022
+ c.size.x = r + C + v, L.debug(
1023
+ `abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${v} padding=${C} width=${o} halfWidth=${v} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${o * (c?.widthInColumns ?? 1) / 2}`
1024
+ ), r = c.size.x + v, c.size.y = u.size.y - u.size.height / 2 + b * (x + C) + x / 2 + C, L.debug(
1025
+ `abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${C}${v}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${o * (c?.widthInColumns ?? 1) / 2}`
1033
1026
  );
1034
1027
  }
1035
- c.children && kt(c);
1036
- let P = (c == null ? void 0 : c.widthInColumns) ?? 1;
1037
- a > 0 && (P = Math.min(P, a - p % a)), p += P, m.debug("abc88 columnsPos", c, p);
1028
+ c.children && Et(c);
1029
+ let S = c?.widthInColumns ?? 1;
1030
+ a > 0 && (S = Math.min(S, a - s % a)), s += S, L.debug("abc88 columnsPos", c, s);
1038
1031
  }
1039
1032
  }
1040
- m.debug(
1041
- `layout blocks (<==layoutBlocks) ${e.id} x: ${(T = e == null ? void 0 : e.size) == null ? void 0 : T.x} y: ${(k = e == null ? void 0 : e.size) == null ? void 0 : k.y} width: ${(N = e == null ? void 0 : e.size) == null ? void 0 : N.width}`
1033
+ L.debug(
1034
+ `layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
1042
1035
  );
1043
1036
  }
1044
- d(kt, "layoutBlocks");
1045
- function Dt(e, { minX: t, minY: a, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1037
+ d(Et, "layoutBlocks");
1038
+ function _t(e, { minX: t, minY: a, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1046
1039
  if (e.size && e.id !== "root") {
1047
- const { x: s, y: r, width: n, height: o } = e.size;
1048
- s - n / 2 < t && (t = s - n / 2), r - o / 2 < a && (a = r - o / 2), s + n / 2 > i && (i = s + n / 2), r + o / 2 > l && (l = r + o / 2);
1040
+ const { x: s, y: r, width: n, height: c } = e.size;
1041
+ s - n / 2 < t && (t = s - n / 2), r - c / 2 < a && (a = r - c / 2), s + n / 2 > i && (i = s + n / 2), r + c / 2 > l && (l = r + c / 2);
1049
1042
  }
1050
1043
  if (e.children)
1051
1044
  for (const s of e.children)
1052
- ({ minX: t, minY: a, maxX: i, maxY: l } = Dt(s, { minX: t, minY: a, maxX: i, maxY: l }));
1045
+ ({ minX: t, minY: a, maxX: i, maxY: l } = _t(s, { minX: t, minY: a, maxX: i, maxY: l }));
1053
1046
  return { minX: t, minY: a, maxX: i, maxY: l };
1054
1047
  }
1055
- d(Dt, "findBounds");
1056
- function Zt(e) {
1048
+ d(_t, "findBounds");
1049
+ function jt(e) {
1057
1050
  const t = e.getBlock("root");
1058
1051
  if (!t)
1059
1052
  return;
1060
- ht(t, e, 0, 0), kt(t), m.debug("getBlocks", JSON.stringify(t, null, 2));
1061
- const { minX: a, minY: i, maxX: l, maxY: s } = Dt(t), r = s - i, n = l - a;
1053
+ ot(t, e, 0, 0), Et(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
1054
+ const { minX: a, minY: i, maxX: l, maxY: s } = _t(t), r = s - i, n = l - a;
1062
1055
  return { x: a, y: i, width: n, height: r };
1063
1056
  }
1064
- d(Zt, "layout");
1065
- function Lt(e, t) {
1057
+ d(jt, "layout");
1058
+ function mt(e, t) {
1066
1059
  t && e.attr("style", t);
1067
1060
  }
1068
- d(Lt, "applyStyle");
1069
- function qt(e, t) {
1070
- const a = R(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), i = a.append("xhtml:div"), l = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", r = i.append("span");
1071
- return r.html(bt(l, t)), Lt(r, e.labelStyle), r.attr("class", s), Lt(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), a.node();
1061
+ d(mt, "applyStyle");
1062
+ function Vt(e, t) {
1063
+ const a = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), i = a.append("xhtml:div"), l = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", r = i.append("span");
1064
+ return r.html(yt(l, t)), mt(r, e.labelStyle), r.attr("class", s), mt(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), a.node();
1072
1065
  }
1073
- d(qt, "addHtmlLabel");
1074
- var lr = /* @__PURE__ */ d(async (e, t, a, i) => {
1066
+ d(Vt, "addHtmlLabel");
1067
+ var ir = /* @__PURE__ */ d(async (e, t, a, i) => {
1075
1068
  let l = e || "";
1076
1069
  typeof l == "object" && (l = l[0]);
1077
- const s = z();
1078
- if (Z(s.flowchart.htmlLabels)) {
1079
- l = l.replace(/\\n|\n/g, "<br />"), m.debug("vertexText" + l);
1080
- const r = await Le(yt(l)), n = {
1070
+ const s = R();
1071
+ if (j(s.flowchart.htmlLabels)) {
1072
+ l = l.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + l);
1073
+ const r = await we(xt(l)), n = {
1081
1074
  isNode: i,
1082
1075
  label: r,
1083
1076
  labelStyle: t.replace("fill:", "color:")
1084
1077
  };
1085
- return qt(n, s);
1078
+ return Vt(n, s);
1086
1079
  } else {
1087
1080
  const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
1088
1081
  r.setAttribute("style", t.replace("color:", "fill:"));
1089
1082
  let n = [];
1090
1083
  typeof l == "string" ? n = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? n = l : n = [];
1091
- for (const o of n) {
1084
+ for (const c of n) {
1092
1085
  const u = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1093
- u.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), u.setAttribute("dy", "1em"), u.setAttribute("x", "0"), a ? u.setAttribute("class", "title-row") : u.setAttribute("class", "row"), u.textContent = o.trim(), r.appendChild(u);
1086
+ u.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), u.setAttribute("dy", "1em"), u.setAttribute("x", "0"), a ? u.setAttribute("class", "title-row") : u.setAttribute("class", "row"), u.textContent = c.trim(), r.appendChild(u);
1094
1087
  }
1095
1088
  return r;
1096
1089
  }
1097
- }, "createLabel"), j = lr, cr = /* @__PURE__ */ d((e, t, a, i, l) => {
1098
- t.arrowTypeStart && Rt(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && Rt(e, "end", t.arrowTypeEnd, a, i, l);
1099
- }, "addEdgeMarkers"), or = {
1090
+ }, "createLabel"), K = ir, nr = /* @__PURE__ */ d((e, t, a, i, l) => {
1091
+ t.arrowTypeStart && Ot(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && Ot(e, "end", t.arrowTypeEnd, a, i, l);
1092
+ }, "addEdgeMarkers"), lr = {
1100
1093
  arrow_cross: "cross",
1101
1094
  arrow_point: "point",
1102
1095
  arrow_barb: "barb",
@@ -1106,16 +1099,16 @@ var lr = /* @__PURE__ */ d(async (e, t, a, i) => {
1106
1099
  composition: "composition",
1107
1100
  dependency: "dependency",
1108
1101
  lollipop: "lollipop"
1109
- }, Rt = /* @__PURE__ */ d((e, t, a, i, l, s) => {
1110
- const r = or[a];
1102
+ }, Ot = /* @__PURE__ */ d((e, t, a, i, l, s) => {
1103
+ const r = lr[a];
1111
1104
  if (!r) {
1112
- m.warn(`Unknown arrow type: ${a}`);
1105
+ L.warn(`Unknown arrow type: ${a}`);
1113
1106
  return;
1114
1107
  }
1115
1108
  const n = t === "start" ? "Start" : "End";
1116
1109
  e.attr(`marker-${t}`, `url(${i}#${l}_${s}-${r}${n})`);
1117
- }, "addEdgeMarker"), St = {}, W = {}, hr = /* @__PURE__ */ d(async (e, t) => {
1118
- const a = z(), i = Z(a.flowchart.htmlLabels), l = t.labelType === "markdown" ? Ht(
1110
+ }, "addEdgeMarker"), Lt = {}, M = {}, cr = /* @__PURE__ */ d(async (e, t) => {
1111
+ const a = R(), i = j(a.flowchart.htmlLabels), l = t.labelType === "markdown" ? Wt(
1119
1112
  e,
1120
1113
  t.label,
1121
1114
  {
@@ -1124,187 +1117,187 @@ var lr = /* @__PURE__ */ d(async (e, t, a, i) => {
1124
1117
  addSvgBackground: !0
1125
1118
  },
1126
1119
  a
1127
- ) : await j(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), r = s.insert("g").attr("class", "label");
1120
+ ) : await K(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), r = s.insert("g").attr("class", "label");
1128
1121
  r.node().appendChild(l);
1129
1122
  let n = l.getBBox();
1130
1123
  if (i) {
1131
- const u = l.children[0], h = R(l);
1132
- n = u.getBoundingClientRect(), h.attr("width", n.width), h.attr("height", n.height);
1124
+ const u = l.children[0], o = O(l);
1125
+ n = u.getBoundingClientRect(), o.attr("width", n.width), o.attr("height", n.height);
1133
1126
  }
1134
- r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), St[t.id] = s, t.width = n.width, t.height = n.height;
1135
- let o;
1127
+ r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), Lt[t.id] = s, t.width = n.width, t.height = n.height;
1128
+ let c;
1136
1129
  if (t.startLabelLeft) {
1137
- const u = await j(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), y = h.insert("g").attr("class", "inner");
1138
- o = y.node().appendChild(u);
1139
- const b = u.getBBox();
1140
- y.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), W[t.id] || (W[t.id] = {}), W[t.id].startLeft = h, rt(o, t.startLabelLeft);
1130
+ const u = await K(t.startLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
1131
+ c = x.node().appendChild(u);
1132
+ const w = u.getBBox();
1133
+ x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startLeft = o, tt(c, t.startLabelLeft);
1141
1134
  }
1142
1135
  if (t.startLabelRight) {
1143
- const u = await j(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), y = h.insert("g").attr("class", "inner");
1144
- o = h.node().appendChild(u), y.node().appendChild(u);
1145
- const b = u.getBBox();
1146
- y.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), W[t.id] || (W[t.id] = {}), W[t.id].startRight = h, rt(o, t.startLabelRight);
1136
+ const u = await K(t.startLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
1137
+ c = o.node().appendChild(u), x.node().appendChild(u);
1138
+ const w = u.getBBox();
1139
+ x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startRight = o, tt(c, t.startLabelRight);
1147
1140
  }
1148
1141
  if (t.endLabelLeft) {
1149
- const u = await j(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), y = h.insert("g").attr("class", "inner");
1150
- o = y.node().appendChild(u);
1151
- const b = u.getBBox();
1152
- y.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), h.node().appendChild(u), W[t.id] || (W[t.id] = {}), W[t.id].endLeft = h, rt(o, t.endLabelLeft);
1142
+ const u = await K(t.endLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
1143
+ c = x.node().appendChild(u);
1144
+ const w = u.getBBox();
1145
+ x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), o.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endLeft = o, tt(c, t.endLabelLeft);
1153
1146
  }
1154
1147
  if (t.endLabelRight) {
1155
- const u = await j(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), y = h.insert("g").attr("class", "inner");
1156
- o = y.node().appendChild(u);
1157
- const b = u.getBBox();
1158
- y.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), h.node().appendChild(u), W[t.id] || (W[t.id] = {}), W[t.id].endRight = h, rt(o, t.endLabelRight);
1148
+ const u = await K(t.endLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
1149
+ c = x.node().appendChild(u);
1150
+ const w = u.getBBox();
1151
+ x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), o.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endRight = o, tt(c, t.endLabelRight);
1159
1152
  }
1160
1153
  return l;
1161
1154
  }, "insertEdgeLabel");
1162
- function rt(e, t) {
1163
- z().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1155
+ function tt(e, t) {
1156
+ R().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1164
1157
  }
1165
- d(rt, "setTerminalWidth");
1166
- var dr = /* @__PURE__ */ d((e, t) => {
1167
- m.debug("Moving label abc88 ", e.id, e.label, St[e.id], t);
1158
+ d(tt, "setTerminalWidth");
1159
+ var or = /* @__PURE__ */ d((e, t) => {
1160
+ L.debug("Moving label abc88 ", e.id, e.label, Lt[e.id], t);
1168
1161
  let a = t.updatedPath ? t.updatedPath : t.originalPath;
1169
- const i = z(), { subGraphTitleTotalMargin: l } = we(i);
1162
+ const i = R(), { subGraphTitleTotalMargin: l } = ye(i);
1170
1163
  if (e.label) {
1171
- const s = St[e.id];
1164
+ const s = Lt[e.id];
1172
1165
  let r = e.x, n = e.y;
1173
1166
  if (a) {
1174
- const o = et.calcLabelPosition(a);
1175
- m.debug(
1167
+ const c = $.calcLabelPosition(a);
1168
+ L.debug(
1176
1169
  "Moving label " + e.label + " from (",
1177
1170
  r,
1178
1171
  ",",
1179
1172
  n,
1180
1173
  ") to (",
1181
- o.x,
1174
+ c.x,
1182
1175
  ",",
1183
- o.y,
1176
+ c.y,
1184
1177
  ") abc88"
1185
- ), t.updatedPath && (r = o.x, n = o.y);
1178
+ ), t.updatedPath && (r = c.x, n = c.y);
1186
1179
  }
1187
1180
  s.attr("transform", `translate(${r}, ${n + l / 2})`);
1188
1181
  }
1189
1182
  if (e.startLabelLeft) {
1190
- const s = W[e.id].startLeft;
1183
+ const s = M[e.id].startLeft;
1191
1184
  let r = e.x, n = e.y;
1192
1185
  if (a) {
1193
- const o = et.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1194
- r = o.x, n = o.y;
1186
+ const c = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1187
+ r = c.x, n = c.y;
1195
1188
  }
1196
1189
  s.attr("transform", `translate(${r}, ${n})`);
1197
1190
  }
1198
1191
  if (e.startLabelRight) {
1199
- const s = W[e.id].startRight;
1192
+ const s = M[e.id].startRight;
1200
1193
  let r = e.x, n = e.y;
1201
1194
  if (a) {
1202
- const o = et.calcTerminalLabelPosition(
1195
+ const c = $.calcTerminalLabelPosition(
1203
1196
  e.arrowTypeStart ? 10 : 0,
1204
1197
  "start_right",
1205
1198
  a
1206
1199
  );
1207
- r = o.x, n = o.y;
1200
+ r = c.x, n = c.y;
1208
1201
  }
1209
1202
  s.attr("transform", `translate(${r}, ${n})`);
1210
1203
  }
1211
1204
  if (e.endLabelLeft) {
1212
- const s = W[e.id].endLeft;
1205
+ const s = M[e.id].endLeft;
1213
1206
  let r = e.x, n = e.y;
1214
1207
  if (a) {
1215
- const o = et.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1216
- r = o.x, n = o.y;
1208
+ const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1209
+ r = c.x, n = c.y;
1217
1210
  }
1218
1211
  s.attr("transform", `translate(${r}, ${n})`);
1219
1212
  }
1220
1213
  if (e.endLabelRight) {
1221
- const s = W[e.id].endRight;
1214
+ const s = M[e.id].endRight;
1222
1215
  let r = e.x, n = e.y;
1223
1216
  if (a) {
1224
- const o = et.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1225
- r = o.x, n = o.y;
1217
+ const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1218
+ r = c.x, n = c.y;
1226
1219
  }
1227
1220
  s.attr("transform", `translate(${r}, ${n})`);
1228
1221
  }
1229
- }, "positionEdgeLabel"), gr = /* @__PURE__ */ d((e, t) => {
1222
+ }, "positionEdgeLabel"), hr = /* @__PURE__ */ d((e, t) => {
1230
1223
  const a = e.x, i = e.y, l = Math.abs(t.x - a), s = Math.abs(t.y - i), r = e.width / 2, n = e.height / 2;
1231
1224
  return l >= r || s >= n;
1232
- }, "outsideNode"), ur = /* @__PURE__ */ d((e, t, a) => {
1233
- m.debug(`intersection calc abc89:
1225
+ }, "outsideNode"), dr = /* @__PURE__ */ d((e, t, a) => {
1226
+ L.debug(`intersection calc abc89:
1234
1227
  outsidePoint: ${JSON.stringify(t)}
1235
1228
  insidePoint : ${JSON.stringify(a)}
1236
1229
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1237
1230
  const i = e.x, l = e.y, s = Math.abs(i - a.x), r = e.width / 2;
1238
1231
  let n = a.x < t.x ? r - s : r + s;
1239
- const o = e.height / 2, u = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
1240
- if (Math.abs(l - t.y) * r > Math.abs(i - t.x) * o) {
1241
- let y = a.y < t.y ? t.y - o - l : l - o - t.y;
1242
- n = h * y / u;
1243
- const b = {
1244
- x: a.x < t.x ? a.x + n : a.x - h + n,
1245
- y: a.y < t.y ? a.y + u - y : a.y - u + y
1232
+ const c = e.height / 2, u = Math.abs(t.y - a.y), o = Math.abs(t.x - a.x);
1233
+ if (Math.abs(l - t.y) * r > Math.abs(i - t.x) * c) {
1234
+ let x = a.y < t.y ? t.y - c - l : l - c - t.y;
1235
+ n = o * x / u;
1236
+ const w = {
1237
+ x: a.x < t.x ? a.x + n : a.x - o + n,
1238
+ y: a.y < t.y ? a.y + u - x : a.y - u + x
1246
1239
  };
1247
- return n === 0 && (b.x = t.x, b.y = t.y), h === 0 && (b.x = t.x), u === 0 && (b.y = t.y), m.debug(`abc89 topp/bott calc, Q ${u}, q ${y}, R ${h}, r ${n}`, b), b;
1240
+ return n === 0 && (w.x = t.x, w.y = t.y), o === 0 && (w.x = t.x), u === 0 && (w.y = t.y), L.debug(`abc89 topp/bott calc, Q ${u}, q ${x}, R ${o}, r ${n}`, w), w;
1248
1241
  } else {
1249
1242
  a.x < t.x ? n = t.x - r - i : n = i - r - t.x;
1250
- let y = u * n / h, b = a.x < t.x ? a.x + h - n : a.x - h + n, L = a.y < t.y ? a.y + y : a.y - y;
1251
- return m.debug(`sides calc abc89, Q ${u}, q ${y}, R ${h}, r ${n}`, { _x: b, _y: L }), n === 0 && (b = t.x, L = t.y), h === 0 && (b = t.x), u === 0 && (L = t.y), { x: b, y: L };
1243
+ let x = u * n / o, w = a.x < t.x ? a.x + o - n : a.x - o + n, b = a.y < t.y ? a.y + x : a.y - x;
1244
+ return L.debug(`sides calc abc89, Q ${u}, q ${x}, R ${o}, r ${n}`, { _x: w, _y: b }), n === 0 && (w = t.x, b = t.y), o === 0 && (w = t.x), u === 0 && (b = t.y), { x: w, y: b };
1252
1245
  }
1253
- }, "intersection"), zt = /* @__PURE__ */ d((e, t) => {
1254
- m.debug("abc88 cutPathAtIntersect", e, t);
1246
+ }, "intersection"), Rt = /* @__PURE__ */ d((e, t) => {
1247
+ L.debug("abc88 cutPathAtIntersect", e, t);
1255
1248
  let a = [], i = e[0], l = !1;
1256
1249
  return e.forEach((s) => {
1257
- if (!gr(t, s) && !l) {
1258
- const r = ur(t, i, s);
1250
+ if (!hr(t, s) && !l) {
1251
+ const r = dr(t, i, s);
1259
1252
  let n = !1;
1260
- a.forEach((o) => {
1261
- n = n || o.x === r.x && o.y === r.y;
1262
- }), a.some((o) => o.x === r.x && o.y === r.y) || a.push(r), l = !0;
1253
+ a.forEach((c) => {
1254
+ n = n || c.x === r.x && c.y === r.y;
1255
+ }), a.some((c) => c.x === r.x && c.y === r.y) || a.push(r), l = !0;
1263
1256
  } else
1264
1257
  i = s, l || a.push(s);
1265
1258
  }), a;
1266
- }, "cutPathAtIntersect"), pr = /* @__PURE__ */ d(function(e, t, a, i, l, s, r) {
1259
+ }, "cutPathAtIntersect"), gr = /* @__PURE__ */ d(function(e, t, a, i, l, s, r) {
1267
1260
  let n = a.points;
1268
- m.debug("abc88 InsertEdge: edge=", a, "e=", t);
1269
- let o = !1;
1261
+ L.debug("abc88 InsertEdge: edge=", a, "e=", t);
1262
+ let c = !1;
1270
1263
  const u = s.node(t.v);
1271
- var h = s.node(t.w);
1272
- h != null && h.intersect && (u != null && u.intersect) && (n = n.slice(1, a.points.length - 1), n.unshift(u.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), a.toCluster && (m.debug("to cluster abc88", i[a.toCluster]), n = zt(a.points, i[a.toCluster].node), o = !0), a.fromCluster && (m.debug("from cluster abc88", i[a.fromCluster]), n = zt(n.reverse(), i[a.fromCluster].node).reverse(), o = !0);
1273
- const y = n.filter((x) => !Number.isNaN(x.y));
1274
- let b = ye;
1275
- a.curve && (l === "graph" || l === "flowchart") && (b = a.curve);
1276
- const { x: L, y: E } = fe(a), D = xe().x(L).y(E).curve(b);
1277
- let v;
1264
+ var o = s.node(t.w);
1265
+ o?.intersect && u?.intersect && (n = n.slice(1, a.points.length - 1), n.unshift(u.intersect(n[0])), n.push(o.intersect(n[n.length - 1]))), a.toCluster && (L.debug("to cluster abc88", i[a.toCluster]), n = Rt(a.points, i[a.toCluster].node), c = !0), a.fromCluster && (L.debug("from cluster abc88", i[a.fromCluster]), n = Rt(n.reverse(), i[a.fromCluster].node).reverse(), c = !0);
1266
+ const x = n.filter((y) => !Number.isNaN(y.y));
1267
+ let w = fe;
1268
+ a.curve && (l === "graph" || l === "flowchart") && (w = a.curve);
1269
+ const { x: b, y: S } = ue(a), v = pe().x(b).y(S).curve(w);
1270
+ let k;
1278
1271
  switch (a.thickness) {
1279
1272
  case "normal":
1280
- v = "edge-thickness-normal";
1273
+ k = "edge-thickness-normal";
1281
1274
  break;
1282
1275
  case "thick":
1283
- v = "edge-thickness-thick";
1276
+ k = "edge-thickness-thick";
1284
1277
  break;
1285
1278
  case "invisible":
1286
- v = "edge-thickness-thick";
1279
+ k = "edge-thickness-thick";
1287
1280
  break;
1288
1281
  default:
1289
- v = "";
1282
+ k = "";
1290
1283
  }
1291
1284
  switch (a.pattern) {
1292
1285
  case "solid":
1293
- v += " edge-pattern-solid";
1286
+ k += " edge-pattern-solid";
1294
1287
  break;
1295
1288
  case "dotted":
1296
- v += " edge-pattern-dotted";
1289
+ k += " edge-pattern-dotted";
1297
1290
  break;
1298
1291
  case "dashed":
1299
- v += " edge-pattern-dashed";
1292
+ k += " edge-pattern-dashed";
1300
1293
  break;
1301
1294
  }
1302
- const T = e.append("path").attr("d", D(y)).attr("id", a.id).attr("class", " " + v + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1303
- let k = "";
1304
- (z().flowchart.arrowMarkerAbsolute || z().state.arrowMarkerAbsolute) && (k = be(!0)), cr(T, a, k, r, l);
1305
- let N = {};
1306
- return o && (N.updatedPath = n), N.originalPath = a.points, N;
1307
- }, "insertEdge"), fr = /* @__PURE__ */ d((e) => {
1295
+ const B = e.append("path").attr("d", v(x)).attr("id", a.id).attr("class", " " + k + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1296
+ let _ = "";
1297
+ (R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = xe(!0)), nr(B, a, _, r, l);
1298
+ let D = {};
1299
+ return c && (D.updatedPath = n), D.originalPath = a.points, D;
1300
+ }, "insertEdge"), ur = /* @__PURE__ */ d((e) => {
1308
1301
  const t = /* @__PURE__ */ new Set();
1309
1302
  for (const a of e)
1310
1303
  switch (a) {
@@ -1319,28 +1312,28 @@ var dr = /* @__PURE__ */ d((e, t) => {
1319
1312
  break;
1320
1313
  }
1321
1314
  return t;
1322
- }, "expandAndDeduplicateDirections"), xr = /* @__PURE__ */ d((e, t, a) => {
1323
- const i = fr(e), l = 2, s = t.height + 2 * a.padding, r = s / l, n = t.width + 2 * r + a.padding, o = a.padding / 2;
1315
+ }, "expandAndDeduplicateDirections"), pr = /* @__PURE__ */ d((e, t, a) => {
1316
+ const i = ur(e), l = 2, s = t.height + 2 * a.padding, r = s / l, n = t.width + 2 * r + a.padding, c = a.padding / 2;
1324
1317
  return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
1325
1318
  // Bottom
1326
1319
  { x: 0, y: 0 },
1327
1320
  { x: r, y: 0 },
1328
- { x: n / 2, y: 2 * o },
1321
+ { x: n / 2, y: 2 * c },
1329
1322
  { x: n - r, y: 0 },
1330
1323
  { x: n, y: 0 },
1331
1324
  // Right
1332
1325
  { x: n, y: -s / 3 },
1333
- { x: n + 2 * o, y: -s / 2 },
1326
+ { x: n + 2 * c, y: -s / 2 },
1334
1327
  { x: n, y: -2 * s / 3 },
1335
1328
  { x: n, y: -s },
1336
1329
  // Top
1337
1330
  { x: n - r, y: -s },
1338
- { x: n / 2, y: -s - 2 * o },
1331
+ { x: n / 2, y: -s - 2 * c },
1339
1332
  { x: r, y: -s },
1340
1333
  // Left
1341
1334
  { x: 0, y: -s },
1342
1335
  { x: 0, y: -2 * s / 3 },
1343
- { x: -2 * o, y: -s / 2 },
1336
+ { x: -2 * c, y: -s / 2 },
1344
1337
  { x: 0, y: -s / 3 }
1345
1338
  ] : i.has("right") && i.has("left") && i.has("up") ? [
1346
1339
  { x: r, y: 0 },
@@ -1366,31 +1359,31 @@ var dr = /* @__PURE__ */ d((e, t) => {
1366
1359
  { x: n, y: -s }
1367
1360
  ] : i.has("right") && i.has("left") ? [
1368
1361
  { x: r, y: 0 },
1369
- { x: r, y: -o },
1370
- { x: n - r, y: -o },
1362
+ { x: r, y: -c },
1363
+ { x: n - r, y: -c },
1371
1364
  { x: n - r, y: 0 },
1372
1365
  { x: n, y: -s / 2 },
1373
1366
  { x: n - r, y: -s },
1374
- { x: n - r, y: -s + o },
1375
- { x: r, y: -s + o },
1367
+ { x: n - r, y: -s + c },
1368
+ { x: r, y: -s + c },
1376
1369
  { x: r, y: -s },
1377
1370
  { x: 0, y: -s / 2 }
1378
1371
  ] : i.has("up") && i.has("down") ? [
1379
1372
  // Bottom center
1380
1373
  { x: n / 2, y: 0 },
1381
1374
  // Left pont of bottom arrow
1382
- { x: 0, y: -o },
1383
- { x: r, y: -o },
1375
+ { x: 0, y: -c },
1376
+ { x: r, y: -c },
1384
1377
  // Left top over vertical section
1385
- { x: r, y: -s + o },
1386
- { x: 0, y: -s + o },
1378
+ { x: r, y: -s + c },
1379
+ { x: 0, y: -s + c },
1387
1380
  // Top of arrow
1388
1381
  { x: n / 2, y: -s },
1389
- { x: n, y: -s + o },
1382
+ { x: n, y: -s + c },
1390
1383
  // Top of right vertical bar
1391
- { x: n - r, y: -s + o },
1392
- { x: n - r, y: -o },
1393
- { x: n, y: -o }
1384
+ { x: n - r, y: -s + c },
1385
+ { x: n - r, y: -c },
1386
+ { x: n, y: -c }
1394
1387
  ] : i.has("right") && i.has("up") ? [
1395
1388
  { x: 0, y: 0 },
1396
1389
  { x: n, y: -r },
@@ -1408,167 +1401,167 @@ var dr = /* @__PURE__ */ d((e, t) => {
1408
1401
  { x: 0, y: 0 },
1409
1402
  { x: n, y: -s }
1410
1403
  ] : i.has("right") ? [
1411
- { x: r, y: -o },
1412
- { x: r, y: -o },
1413
- { x: n - r, y: -o },
1404
+ { x: r, y: -c },
1405
+ { x: r, y: -c },
1406
+ { x: n - r, y: -c },
1414
1407
  { x: n - r, y: 0 },
1415
1408
  { x: n, y: -s / 2 },
1416
1409
  { x: n - r, y: -s },
1417
- { x: n - r, y: -s + o },
1410
+ { x: n - r, y: -s + c },
1418
1411
  // top left corner of arrow
1419
- { x: r, y: -s + o },
1420
- { x: r, y: -s + o }
1412
+ { x: r, y: -s + c },
1413
+ { x: r, y: -s + c }
1421
1414
  ] : i.has("left") ? [
1422
1415
  { x: r, y: 0 },
1423
- { x: r, y: -o },
1416
+ { x: r, y: -c },
1424
1417
  // Two points, the right corners
1425
- { x: n - r, y: -o },
1426
- { x: n - r, y: -s + o },
1427
- { x: r, y: -s + o },
1418
+ { x: n - r, y: -c },
1419
+ { x: n - r, y: -s + c },
1420
+ { x: r, y: -s + c },
1428
1421
  { x: r, y: -s },
1429
1422
  { x: 0, y: -s / 2 }
1430
1423
  ] : i.has("up") ? [
1431
1424
  // Bottom center
1432
- { x: r, y: -o },
1425
+ { x: r, y: -c },
1433
1426
  // Left top over vertical section
1434
- { x: r, y: -s + o },
1435
- { x: 0, y: -s + o },
1427
+ { x: r, y: -s + c },
1428
+ { x: 0, y: -s + c },
1436
1429
  // Top of arrow
1437
1430
  { x: n / 2, y: -s },
1438
- { x: n, y: -s + o },
1431
+ { x: n, y: -s + c },
1439
1432
  // Top of right vertical bar
1440
- { x: n - r, y: -s + o },
1441
- { x: n - r, y: -o }
1433
+ { x: n - r, y: -s + c },
1434
+ { x: n - r, y: -c }
1442
1435
  ] : i.has("down") ? [
1443
1436
  // Bottom center
1444
1437
  { x: n / 2, y: 0 },
1445
1438
  // Left pont of bottom arrow
1446
- { x: 0, y: -o },
1447
- { x: r, y: -o },
1439
+ { x: 0, y: -c },
1440
+ { x: r, y: -c },
1448
1441
  // Left top over vertical section
1449
- { x: r, y: -s + o },
1450
- { x: n - r, y: -s + o },
1451
- { x: n - r, y: -o },
1452
- { x: n, y: -o }
1442
+ { x: r, y: -s + c },
1443
+ { x: n - r, y: -s + c },
1444
+ { x: n - r, y: -c },
1445
+ { x: n, y: -c }
1453
1446
  ] : [{ x: 0, y: 0 }];
1454
1447
  }, "getArrowPoints");
1455
- function Jt(e, t) {
1448
+ function Gt(e, t) {
1456
1449
  return e.intersect(t);
1457
1450
  }
1458
- d(Jt, "intersectNode");
1459
- var yr = Jt;
1460
- function Qt(e, t, a, i) {
1461
- var l = e.x, s = e.y, r = l - i.x, n = s - i.y, o = Math.sqrt(t * t * n * n + a * a * r * r), u = Math.abs(t * a * r / o);
1451
+ d(Gt, "intersectNode");
1452
+ var fr = Gt;
1453
+ function Zt(e, t, a, i) {
1454
+ var l = e.x, s = e.y, r = l - i.x, n = s - i.y, c = Math.sqrt(t * t * n * n + a * a * r * r), u = Math.abs(t * a * r / c);
1462
1455
  i.x < l && (u = -u);
1463
- var h = Math.abs(t * a * n / o);
1464
- return i.y < s && (h = -h), { x: l + u, y: s + h };
1456
+ var o = Math.abs(t * a * n / c);
1457
+ return i.y < s && (o = -o), { x: l + u, y: s + o };
1465
1458
  }
1466
- d(Qt, "intersectEllipse");
1467
- var $t = Qt;
1468
- function te(e, t, a) {
1469
- return $t(e, t, t, a);
1459
+ d(Zt, "intersectEllipse");
1460
+ var qt = Zt;
1461
+ function Jt(e, t, a) {
1462
+ return qt(e, t, t, a);
1470
1463
  }
1471
- d(te, "intersectCircle");
1472
- var br = te;
1473
- function ee(e, t, a, i) {
1474
- var l, s, r, n, o, u, h, y, b, L, E, D, v, T, k;
1475
- if (l = t.y - e.y, r = e.x - t.x, o = t.x * e.y - e.x * t.y, b = l * a.x + r * a.y + o, L = l * i.x + r * i.y + o, !(b !== 0 && L !== 0 && vt(b, L)) && (s = i.y - a.y, n = a.x - i.x, u = i.x * a.y - a.x * i.y, h = s * e.x + n * e.y + u, y = s * t.x + n * t.y + u, !(h !== 0 && y !== 0 && vt(h, y)) && (E = l * n - s * r, E !== 0)))
1476
- return D = Math.abs(E / 2), v = r * u - n * o, T = v < 0 ? (v - D) / E : (v + D) / E, v = s * o - l * u, k = v < 0 ? (v - D) / E : (v + D) / E, { x: T, y: k };
1464
+ d(Jt, "intersectCircle");
1465
+ var xr = Jt;
1466
+ function Qt(e, t, a, i) {
1467
+ var l, s, r, n, c, u, o, x, w, b, S, v, k, B, _;
1468
+ if (l = t.y - e.y, r = e.x - t.x, c = t.x * e.y - e.x * t.y, w = l * a.x + r * a.y + c, b = l * i.x + r * i.y + c, !(w !== 0 && b !== 0 && St(w, b)) && (s = i.y - a.y, n = a.x - i.x, u = i.x * a.y - a.x * i.y, o = s * e.x + n * e.y + u, x = s * t.x + n * t.y + u, !(o !== 0 && x !== 0 && St(o, x)) && (S = l * n - s * r, S !== 0)))
1469
+ return v = Math.abs(S / 2), k = r * u - n * c, B = k < 0 ? (k - v) / S : (k + v) / S, k = s * c - l * u, _ = k < 0 ? (k - v) / S : (k + v) / S, { x: B, y: _ };
1477
1470
  }
1478
- d(ee, "intersectLine");
1479
- function vt(e, t) {
1471
+ d(Qt, "intersectLine");
1472
+ function St(e, t) {
1480
1473
  return e * t > 0;
1481
1474
  }
1482
- d(vt, "sameSign");
1483
- var wr = ee, mr = re;
1484
- function re(e, t, a) {
1475
+ d(St, "sameSign");
1476
+ var yr = Qt, br = $t;
1477
+ function $t(e, t, a) {
1485
1478
  var i = e.x, l = e.y, s = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
1486
- typeof t.forEach == "function" ? t.forEach(function(E) {
1487
- r = Math.min(r, E.x), n = Math.min(n, E.y);
1479
+ typeof t.forEach == "function" ? t.forEach(function(S) {
1480
+ r = Math.min(r, S.x), n = Math.min(n, S.y);
1488
1481
  }) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
1489
- for (var o = i - e.width / 2 - r, u = l - e.height / 2 - n, h = 0; h < t.length; h++) {
1490
- var y = t[h], b = t[h < t.length - 1 ? h + 1 : 0], L = wr(
1482
+ for (var c = i - e.width / 2 - r, u = l - e.height / 2 - n, o = 0; o < t.length; o++) {
1483
+ var x = t[o], w = t[o < t.length - 1 ? o + 1 : 0], b = yr(
1491
1484
  e,
1492
1485
  a,
1493
- { x: o + y.x, y: u + y.y },
1494
- { x: o + b.x, y: u + b.y }
1486
+ { x: c + x.x, y: u + x.y },
1487
+ { x: c + w.x, y: u + w.y }
1495
1488
  );
1496
- L && s.push(L);
1489
+ b && s.push(b);
1497
1490
  }
1498
- return s.length ? (s.length > 1 && s.sort(function(E, D) {
1499
- var v = E.x - a.x, T = E.y - a.y, k = Math.sqrt(v * v + T * T), N = D.x - a.x, x = D.y - a.y, g = Math.sqrt(N * N + x * x);
1500
- return k < g ? -1 : k === g ? 0 : 1;
1491
+ return s.length ? (s.length > 1 && s.sort(function(S, v) {
1492
+ var k = S.x - a.x, B = S.y - a.y, _ = Math.sqrt(k * k + B * B), D = v.x - a.x, y = v.y - a.y, g = Math.sqrt(D * D + y * y);
1493
+ return _ < g ? -1 : _ === g ? 0 : 1;
1501
1494
  }), s[0]) : e;
1502
1495
  }
1503
- d(re, "intersectPolygon");
1504
- var Lr = /* @__PURE__ */ d((e, t) => {
1505
- var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, o, u;
1506
- return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), o = s === 0 ? 0 : n * l / s, u = n) : (l < 0 && (r = -r), o = r, u = l === 0 ? 0 : r * s / l), { x: a + o, y: i + u };
1507
- }, "intersectRect"), Sr = Lr, C = {
1508
- node: yr,
1509
- circle: br,
1510
- ellipse: $t,
1511
- polygon: mr,
1512
- rect: Sr
1513
- }, F = /* @__PURE__ */ d(async (e, t, a, i) => {
1514
- const l = z();
1496
+ d($t, "intersectPolygon");
1497
+ var wr = /* @__PURE__ */ d((e, t) => {
1498
+ var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, c, u;
1499
+ return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), c = s === 0 ? 0 : n * l / s, u = n) : (l < 0 && (r = -r), c = r, u = l === 0 ? 0 : r * s / l), { x: a + c, y: i + u };
1500
+ }, "intersectRect"), mr = wr, N = {
1501
+ node: fr,
1502
+ circle: xr,
1503
+ ellipse: qt,
1504
+ polygon: br,
1505
+ rect: mr
1506
+ }, A = /* @__PURE__ */ d(async (e, t, a, i) => {
1507
+ const l = R();
1515
1508
  let s;
1516
- const r = t.useHtmlLabels || Z(l.flowchart.htmlLabels);
1509
+ const r = t.useHtmlLabels || j(l.flowchart.htmlLabels);
1517
1510
  a ? s = a : s = "node default";
1518
- const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), o = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
1511
+ const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), c = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
1519
1512
  let u;
1520
1513
  t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
1521
- const h = o.node();
1522
- let y;
1523
- t.labelType === "markdown" ? y = Ht(
1524
- o,
1525
- bt(yt(u), l),
1514
+ const o = c.node();
1515
+ let x;
1516
+ t.labelType === "markdown" ? x = Wt(
1517
+ c,
1518
+ yt(xt(u), l),
1526
1519
  {
1527
1520
  useHtmlLabels: r,
1528
1521
  width: t.width || l.flowchart.wrappingWidth,
1529
1522
  classes: "markdown-node-label"
1530
1523
  },
1531
1524
  l
1532
- ) : y = h.appendChild(
1533
- await j(
1534
- bt(yt(u), l),
1525
+ ) : x = o.appendChild(
1526
+ await K(
1527
+ yt(xt(u), l),
1535
1528
  t.labelStyle,
1536
1529
  !1,
1537
1530
  i
1538
1531
  )
1539
1532
  );
1540
- let b = y.getBBox();
1541
- const L = t.padding / 2;
1542
- if (Z(l.flowchart.htmlLabels)) {
1543
- const E = y.children[0], D = R(y), v = E.getElementsByTagName("img");
1544
- if (v) {
1545
- const T = u.replace(/<img[^>]*>/g, "").trim() === "";
1533
+ let w = x.getBBox();
1534
+ const b = t.padding / 2;
1535
+ if (j(l.flowchart.htmlLabels)) {
1536
+ const S = x.children[0], v = O(x), k = S.getElementsByTagName("img");
1537
+ if (k) {
1538
+ const B = u.replace(/<img[^>]*>/g, "").trim() === "";
1546
1539
  await Promise.all(
1547
- [...v].map(
1548
- (k) => new Promise((N) => {
1549
- function x() {
1550
- if (k.style.display = "flex", k.style.flexDirection = "column", T) {
1551
- const g = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, w = parseInt(g, 10) * 5 + "px";
1552
- k.style.minWidth = w, k.style.maxWidth = w;
1540
+ [...k].map(
1541
+ (_) => new Promise((D) => {
1542
+ function y() {
1543
+ if (_.style.display = "flex", _.style.flexDirection = "column", B) {
1544
+ const g = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, m = parseInt(g, 10) * 5 + "px";
1545
+ _.style.minWidth = m, _.style.maxWidth = m;
1553
1546
  } else
1554
- k.style.width = "100%";
1555
- N(k);
1547
+ _.style.width = "100%";
1548
+ D(_);
1556
1549
  }
1557
- d(x, "setupImage"), setTimeout(() => {
1558
- k.complete && x();
1559
- }), k.addEventListener("error", x), k.addEventListener("load", x);
1550
+ d(y, "setupImage"), setTimeout(() => {
1551
+ _.complete && y();
1552
+ }), _.addEventListener("error", y), _.addEventListener("load", y);
1560
1553
  })
1561
1554
  )
1562
1555
  );
1563
1556
  }
1564
- b = E.getBoundingClientRect(), D.attr("width", b.width), D.attr("height", b.height);
1557
+ w = S.getBoundingClientRect(), v.attr("width", w.width), v.attr("height", w.height);
1565
1558
  }
1566
- return r ? o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")") : o.attr("transform", "translate(0, " + -b.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), o.insert("rect", ":first-child"), { shapeSvg: n, bbox: b, halfPadding: L, label: o };
1567
- }, "labelHelper"), I = /* @__PURE__ */ d((e, t) => {
1559
+ return r ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg: n, bbox: w, halfPadding: b, label: c };
1560
+ }, "labelHelper"), T = /* @__PURE__ */ d((e, t) => {
1568
1561
  const a = t.node().getBBox();
1569
1562
  e.width = a.width, e.height = a.height;
1570
1563
  }, "updateNodeBounds");
1571
- function G(e, t, a, i) {
1564
+ function U(e, t, a, i) {
1572
1565
  return e.insert("polygon", ":first-child").attr(
1573
1566
  "points",
1574
1567
  i.map(function(l) {
@@ -1576,27 +1569,27 @@ function G(e, t, a, i) {
1576
1569
  }).join(" ")
1577
1570
  ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
1578
1571
  }
1579
- d(G, "insertPolygonShape");
1580
- var vr = /* @__PURE__ */ d(async (e, t) => {
1581
- t.useHtmlLabels || z().flowchart.htmlLabels || (t.centerLabel = !0);
1582
- const { shapeSvg: i, bbox: l, halfPadding: s } = await F(
1572
+ d(U, "insertPolygonShape");
1573
+ var Lr = /* @__PURE__ */ d(async (e, t) => {
1574
+ t.useHtmlLabels || R().flowchart.htmlLabels || (t.centerLabel = !0);
1575
+ const { shapeSvg: i, bbox: l, halfPadding: s } = await A(
1583
1576
  e,
1584
1577
  t,
1585
1578
  "node " + t.classes,
1586
1579
  !0
1587
1580
  );
1588
- m.info("Classes = ", t.classes);
1581
+ L.info("Classes = ", t.classes);
1589
1582
  const r = i.insert("rect", ":first-child");
1590
- return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding), I(t, r), t.intersect = function(n) {
1591
- return C.rect(t, n);
1583
+ return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding), T(t, r), t.intersect = function(n) {
1584
+ return N.rect(t, n);
1592
1585
  }, i;
1593
- }, "note"), Er = vr, At = /* @__PURE__ */ d((e) => e ? " " + e : "", "formatClass"), K = /* @__PURE__ */ d((e, t) => `${t || "node default"}${At(e.classes)} ${At(
1586
+ }, "note"), Sr = Lr, zt = /* @__PURE__ */ d((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ d((e, t) => `${t || "node default"}${zt(e.classes)} ${zt(
1594
1587
  e.class
1595
- )}`, "getClassesFromNode"), Mt = /* @__PURE__ */ d(async (e, t) => {
1596
- const { shapeSvg: a, bbox: i } = await F(
1588
+ )}`, "getClassesFromNode"), At = /* @__PURE__ */ d(async (e, t) => {
1589
+ const { shapeSvg: a, bbox: i } = await A(
1597
1590
  e,
1598
1591
  t,
1599
- K(t, void 0),
1592
+ Y(t, void 0),
1600
1593
  !0
1601
1594
  ), l = i.width + t.padding, s = i.height + t.padding, r = l + s, n = [
1602
1595
  { x: r / 2, y: 0 },
@@ -1604,12 +1597,12 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
1604
1597
  { x: r / 2, y: -r },
1605
1598
  { x: 0, y: -r / 2 }
1606
1599
  ];
1607
- m.info("Question main (Circle)");
1608
- const o = G(a, r, r, n);
1609
- return o.attr("style", t.style), I(t, o), t.intersect = function(u) {
1610
- return m.warn("Intersect called"), C.polygon(t, n, u);
1600
+ L.info("Question main (Circle)");
1601
+ const c = U(a, r, r, n);
1602
+ return c.attr("style", t.style), T(t, c), t.intersect = function(u) {
1603
+ return L.warn("Intersect called"), N.polygon(t, n, u);
1611
1604
  }, a;
1612
- }, "question"), _r = /* @__PURE__ */ d((e, t) => {
1605
+ }, "question"), kr = /* @__PURE__ */ d((e, t) => {
1613
1606
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
1614
1607
  { x: 0, y: i / 2 },
1615
1608
  { x: i / 2, y: 0 },
@@ -1622,35 +1615,35 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
1622
1615
  return r.x + "," + r.y;
1623
1616
  }).join(" ")
1624
1617
  ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
1625
- return C.circle(t, 14, r);
1618
+ return N.circle(t, 14, r);
1626
1619
  }, a;
1627
- }, "choice"), kr = /* @__PURE__ */ d(async (e, t) => {
1628
- const { shapeSvg: a, bbox: i } = await F(
1620
+ }, "choice"), vr = /* @__PURE__ */ d(async (e, t) => {
1621
+ const { shapeSvg: a, bbox: i } = await A(
1629
1622
  e,
1630
1623
  t,
1631
- K(t, void 0),
1624
+ Y(t, void 0),
1632
1625
  !0
1633
- ), l = 4, s = i.height + t.padding, r = s / l, n = i.width + 2 * r + t.padding, o = [
1626
+ ), l = 4, s = i.height + t.padding, r = s / l, n = i.width + 2 * r + t.padding, c = [
1634
1627
  { x: r, y: 0 },
1635
1628
  { x: n - r, y: 0 },
1636
1629
  { x: n, y: -s / 2 },
1637
1630
  { x: n - r, y: -s },
1638
1631
  { x: r, y: -s },
1639
1632
  { x: 0, y: -s / 2 }
1640
- ], u = G(a, n, s, o);
1641
- return u.attr("style", t.style), I(t, u), t.intersect = function(h) {
1642
- return C.polygon(t, o, h);
1633
+ ], u = U(a, n, s, c);
1634
+ return u.attr("style", t.style), T(t, u), t.intersect = function(o) {
1635
+ return N.polygon(t, c, o);
1643
1636
  }, a;
1644
- }, "hexagon"), Dr = /* @__PURE__ */ d(async (e, t) => {
1645
- const { shapeSvg: a, bbox: i } = await F(e, t, void 0, !0), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, o = xr(t.directions, i, t), u = G(a, n, s, o);
1646
- return u.attr("style", t.style), I(t, u), t.intersect = function(h) {
1647
- return C.polygon(t, o, h);
1637
+ }, "hexagon"), Er = /* @__PURE__ */ d(async (e, t) => {
1638
+ const { shapeSvg: a, bbox: i } = await A(e, t, void 0, !0), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, c = pr(t.directions, i, t), u = U(a, n, s, c);
1639
+ return u.attr("style", t.style), T(t, u), t.intersect = function(o) {
1640
+ return N.polygon(t, c, o);
1648
1641
  }, a;
1649
- }, "block_arrow"), Nr = /* @__PURE__ */ d(async (e, t) => {
1650
- const { shapeSvg: a, bbox: i } = await F(
1642
+ }, "block_arrow"), _r = /* @__PURE__ */ d(async (e, t) => {
1643
+ const { shapeSvg: a, bbox: i } = await A(
1651
1644
  e,
1652
1645
  t,
1653
- K(t, void 0),
1646
+ Y(t, void 0),
1654
1647
  !0
1655
1648
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1656
1649
  { x: -s / 2, y: 0 },
@@ -1659,69 +1652,69 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
1659
1652
  { x: -s / 2, y: -s },
1660
1653
  { x: 0, y: -s / 2 }
1661
1654
  ];
1662
- return G(a, l, s, r).attr("style", t.style), t.width = l + s, t.height = s, t.intersect = function(o) {
1663
- return C.polygon(t, r, o);
1655
+ return U(a, l, s, r).attr("style", t.style), t.width = l + s, t.height = s, t.intersect = function(c) {
1656
+ return N.polygon(t, r, c);
1664
1657
  }, a;
1665
- }, "rect_left_inv_arrow"), Tr = /* @__PURE__ */ d(async (e, t) => {
1666
- const { shapeSvg: a, bbox: i } = await F(e, t, K(t), !0), l = i.width + t.padding, s = i.height + t.padding, r = [
1658
+ }, "rect_left_inv_arrow"), Dr = /* @__PURE__ */ d(async (e, t) => {
1659
+ const { shapeSvg: a, bbox: i } = await A(e, t, Y(t), !0), l = i.width + t.padding, s = i.height + t.padding, r = [
1667
1660
  { x: -2 * s / 6, y: 0 },
1668
1661
  { x: l - s / 6, y: 0 },
1669
1662
  { x: l + 2 * s / 6, y: -s },
1670
1663
  { x: s / 6, y: -s }
1671
- ], n = G(a, l, s, r);
1672
- return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1673
- return C.polygon(t, r, o);
1664
+ ], n = U(a, l, s, r);
1665
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1666
+ return N.polygon(t, r, c);
1674
1667
  }, a;
1675
- }, "lean_right"), Cr = /* @__PURE__ */ d(async (e, t) => {
1676
- const { shapeSvg: a, bbox: i } = await F(
1668
+ }, "lean_right"), Nr = /* @__PURE__ */ d(async (e, t) => {
1669
+ const { shapeSvg: a, bbox: i } = await A(
1677
1670
  e,
1678
1671
  t,
1679
- K(t, void 0),
1672
+ Y(t, void 0),
1680
1673
  !0
1681
1674
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1682
1675
  { x: 2 * s / 6, y: 0 },
1683
1676
  { x: l + s / 6, y: 0 },
1684
1677
  { x: l - 2 * s / 6, y: -s },
1685
1678
  { x: -s / 6, y: -s }
1686
- ], n = G(a, l, s, r);
1687
- return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1688
- return C.polygon(t, r, o);
1679
+ ], n = U(a, l, s, r);
1680
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1681
+ return N.polygon(t, r, c);
1689
1682
  }, a;
1690
- }, "lean_left"), Ir = /* @__PURE__ */ d(async (e, t) => {
1691
- const { shapeSvg: a, bbox: i } = await F(
1683
+ }, "lean_left"), Tr = /* @__PURE__ */ d(async (e, t) => {
1684
+ const { shapeSvg: a, bbox: i } = await A(
1692
1685
  e,
1693
1686
  t,
1694
- K(t, void 0),
1687
+ Y(t, void 0),
1695
1688
  !0
1696
1689
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1697
1690
  { x: -2 * s / 6, y: 0 },
1698
1691
  { x: l + 2 * s / 6, y: 0 },
1699
1692
  { x: l - s / 6, y: -s },
1700
1693
  { x: s / 6, y: -s }
1701
- ], n = G(a, l, s, r);
1702
- return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1703
- return C.polygon(t, r, o);
1694
+ ], n = U(a, l, s, r);
1695
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1696
+ return N.polygon(t, r, c);
1704
1697
  }, a;
1705
1698
  }, "trapezoid"), Br = /* @__PURE__ */ d(async (e, t) => {
1706
- const { shapeSvg: a, bbox: i } = await F(
1699
+ const { shapeSvg: a, bbox: i } = await A(
1707
1700
  e,
1708
1701
  t,
1709
- K(t, void 0),
1702
+ Y(t, void 0),
1710
1703
  !0
1711
1704
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1712
1705
  { x: s / 6, y: 0 },
1713
1706
  { x: l - s / 6, y: 0 },
1714
1707
  { x: l + 2 * s / 6, y: -s },
1715
1708
  { x: -2 * s / 6, y: -s }
1716
- ], n = G(a, l, s, r);
1717
- return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1718
- return C.polygon(t, r, o);
1709
+ ], n = U(a, l, s, r);
1710
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1711
+ return N.polygon(t, r, c);
1719
1712
  }, a;
1720
- }, "inv_trapezoid"), Or = /* @__PURE__ */ d(async (e, t) => {
1721
- const { shapeSvg: a, bbox: i } = await F(
1713
+ }, "inv_trapezoid"), Cr = /* @__PURE__ */ d(async (e, t) => {
1714
+ const { shapeSvg: a, bbox: i } = await A(
1722
1715
  e,
1723
1716
  t,
1724
- K(t, void 0),
1717
+ Y(t, void 0),
1725
1718
  !0
1726
1719
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1727
1720
  { x: 0, y: 0 },
@@ -1729,157 +1722,157 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
1729
1722
  { x: l, y: -s / 2 },
1730
1723
  { x: l + s / 2, y: -s },
1731
1724
  { x: 0, y: -s }
1732
- ], n = G(a, l, s, r);
1733
- return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1734
- return C.polygon(t, r, o);
1725
+ ], n = U(a, l, s, r);
1726
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1727
+ return N.polygon(t, r, c);
1735
1728
  }, a;
1736
- }, "rect_right_inv_arrow"), Rr = /* @__PURE__ */ d(async (e, t) => {
1737
- const { shapeSvg: a, bbox: i } = await F(
1729
+ }, "rect_right_inv_arrow"), Ir = /* @__PURE__ */ d(async (e, t) => {
1730
+ const { shapeSvg: a, bbox: i } = await A(
1738
1731
  e,
1739
1732
  t,
1740
- K(t, void 0),
1733
+ Y(t, void 0),
1741
1734
  !0
1742
- ), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, o = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, u = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
1743
- return I(t, u), t.intersect = function(h) {
1744
- const y = C.rect(t, h), b = y.x - t.x;
1745
- if (s != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(y.y - t.y) > t.height / 2 - r)) {
1746
- let L = r * r * (1 - b * b / (s * s));
1747
- L != 0 && (L = Math.sqrt(L)), L = r - L, h.y - t.y > 0 && (L = -L), y.y += L;
1735
+ ), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, c = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, u = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
1736
+ return T(t, u), t.intersect = function(o) {
1737
+ const x = N.rect(t, o), w = x.x - t.x;
1738
+ if (s != 0 && (Math.abs(w) < t.width / 2 || Math.abs(w) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - r)) {
1739
+ let b = r * r * (1 - w * w / (s * s));
1740
+ b != 0 && (b = Math.sqrt(b)), b = r - b, o.y - t.y > 0 && (b = -b), x.y += b;
1748
1741
  }
1749
- return y;
1742
+ return x;
1750
1743
  }, a;
1751
- }, "cylinder"), zr = /* @__PURE__ */ d(async (e, t) => {
1752
- const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
1744
+ }, "cylinder"), Or = /* @__PURE__ */ d(async (e, t) => {
1745
+ const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
1753
1746
  e,
1754
1747
  t,
1755
1748
  "node " + t.classes + " " + t.class,
1756
1749
  !0
1757
- ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
1758
- if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", u).attr("width", r).attr("height", n), t.props) {
1759
- const h = new Set(Object.keys(t.props));
1760
- t.props.borders && (dt(s, t.props.borders, r, n), h.delete("borders")), h.forEach((y) => {
1761
- m.warn(`Unknown node property ${y}`);
1750
+ ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
1751
+ if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", n), t.props) {
1752
+ const o = new Set(Object.keys(t.props));
1753
+ t.props.borders && (ht(s, t.props.borders, r, n), o.delete("borders")), o.forEach((x) => {
1754
+ L.warn(`Unknown node property ${x}`);
1762
1755
  });
1763
1756
  }
1764
- return I(t, s), t.intersect = function(h) {
1765
- return C.rect(t, h);
1757
+ return T(t, s), t.intersect = function(o) {
1758
+ return N.rect(t, o);
1766
1759
  }, a;
1767
- }, "rect"), Ar = /* @__PURE__ */ d(async (e, t) => {
1768
- const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
1760
+ }, "rect"), Rr = /* @__PURE__ */ d(async (e, t) => {
1761
+ const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
1769
1762
  e,
1770
1763
  t,
1771
1764
  "node " + t.classes,
1772
1765
  !0
1773
- ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
1774
- if (s.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", u).attr("width", r).attr("height", n), t.props) {
1775
- const h = new Set(Object.keys(t.props));
1776
- t.props.borders && (dt(s, t.props.borders, r, n), h.delete("borders")), h.forEach((y) => {
1777
- m.warn(`Unknown node property ${y}`);
1766
+ ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
1767
+ if (s.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", n), t.props) {
1768
+ const o = new Set(Object.keys(t.props));
1769
+ t.props.borders && (ht(s, t.props.borders, r, n), o.delete("borders")), o.forEach((x) => {
1770
+ L.warn(`Unknown node property ${x}`);
1778
1771
  });
1779
1772
  }
1780
- return I(t, s), t.intersect = function(h) {
1781
- return C.rect(t, h);
1773
+ return T(t, s), t.intersect = function(o) {
1774
+ return N.rect(t, o);
1782
1775
  }, a;
1783
- }, "composite"), Mr = /* @__PURE__ */ d(async (e, t) => {
1784
- const { shapeSvg: a } = await F(e, t, "label", !0);
1785
- m.trace("Classes = ", t.class);
1776
+ }, "composite"), zr = /* @__PURE__ */ d(async (e, t) => {
1777
+ const { shapeSvg: a } = await A(e, t, "label", !0);
1778
+ L.trace("Classes = ", t.class);
1786
1779
  const i = a.insert("rect", ":first-child"), l = 0, s = 0;
1787
1780
  if (i.attr("width", l).attr("height", s), a.attr("class", "label edgeLabel"), t.props) {
1788
1781
  const r = new Set(Object.keys(t.props));
1789
- t.props.borders && (dt(i, t.props.borders, l, s), r.delete("borders")), r.forEach((n) => {
1790
- m.warn(`Unknown node property ${n}`);
1782
+ t.props.borders && (ht(i, t.props.borders, l, s), r.delete("borders")), r.forEach((n) => {
1783
+ L.warn(`Unknown node property ${n}`);
1791
1784
  });
1792
1785
  }
1793
- return I(t, i), t.intersect = function(r) {
1794
- return C.rect(t, r);
1786
+ return T(t, i), t.intersect = function(r) {
1787
+ return N.rect(t, r);
1795
1788
  }, a;
1796
1789
  }, "labelRect");
1797
- function dt(e, t, a, i) {
1790
+ function ht(e, t, a, i) {
1798
1791
  const l = [], s = /* @__PURE__ */ d((n) => {
1799
1792
  l.push(n, 0);
1800
1793
  }, "addBorder"), r = /* @__PURE__ */ d((n) => {
1801
1794
  l.push(0, n);
1802
1795
  }, "skipBorder");
1803
- t.includes("t") ? (m.debug("add top border"), s(a)) : r(a), t.includes("r") ? (m.debug("add right border"), s(i)) : r(i), t.includes("b") ? (m.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (m.debug("add left border"), s(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
1796
+ t.includes("t") ? (L.debug("add top border"), s(a)) : r(a), t.includes("r") ? (L.debug("add right border"), s(i)) : r(i), t.includes("b") ? (L.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (L.debug("add left border"), s(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
1804
1797
  }
1805
- d(dt, "applyNodePropertyBorders");
1806
- var Fr = /* @__PURE__ */ d(async (e, t) => {
1798
+ d(ht, "applyNodePropertyBorders");
1799
+ var Ar = /* @__PURE__ */ d(async (e, t) => {
1807
1800
  let a;
1808
1801
  t.classes ? a = "node " + t.classes : a = "node default";
1809
1802
  const i = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), s = i.insert("line"), r = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
1810
- let o = "";
1811
- typeof n == "object" ? o = n[0] : o = n, m.info("Label text abc79", o, n, typeof n == "object");
1812
- const u = r.node().appendChild(await j(o, t.labelStyle, !0, !0));
1813
- let h = { width: 0, height: 0 };
1814
- if (Z(z().flowchart.htmlLabels)) {
1815
- const D = u.children[0], v = R(u);
1816
- h = D.getBoundingClientRect(), v.attr("width", h.width), v.attr("height", h.height);
1803
+ let c = "";
1804
+ typeof n == "object" ? c = n[0] : c = n, L.info("Label text abc79", c, n, typeof n == "object");
1805
+ const u = r.node().appendChild(await K(c, t.labelStyle, !0, !0));
1806
+ let o = { width: 0, height: 0 };
1807
+ if (j(R().flowchart.htmlLabels)) {
1808
+ const v = u.children[0], k = O(u);
1809
+ o = v.getBoundingClientRect(), k.attr("width", o.width), k.attr("height", o.height);
1817
1810
  }
1818
- m.info("Text 2", n);
1819
- const y = n.slice(1, n.length);
1820
- let b = u.getBBox();
1821
- const L = r.node().appendChild(
1822
- await j(
1823
- y.join ? y.join("<br/>") : y,
1811
+ L.info("Text 2", n);
1812
+ const x = n.slice(1, n.length);
1813
+ let w = u.getBBox();
1814
+ const b = r.node().appendChild(
1815
+ await K(
1816
+ x.join ? x.join("<br/>") : x,
1824
1817
  t.labelStyle,
1825
1818
  !0,
1826
1819
  !0
1827
1820
  )
1828
1821
  );
1829
- if (Z(z().flowchart.htmlLabels)) {
1830
- const D = L.children[0], v = R(L);
1831
- h = D.getBoundingClientRect(), v.attr("width", h.width), v.attr("height", h.height);
1822
+ if (j(R().flowchart.htmlLabels)) {
1823
+ const v = b.children[0], k = O(b);
1824
+ o = v.getBoundingClientRect(), k.attr("width", o.width), k.attr("height", o.height);
1832
1825
  }
1833
- const E = t.padding / 2;
1834
- return R(L).attr(
1826
+ const S = t.padding / 2;
1827
+ return O(b).attr(
1835
1828
  "transform",
1836
1829
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1837
- (h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height + E + 5) + ")"
1838
- ), R(u).attr(
1830
+ (o.width > w.width ? 0 : (w.width - o.width) / 2) + ", " + (w.height + S + 5) + ")"
1831
+ ), O(u).attr(
1839
1832
  "transform",
1840
1833
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1841
- (h.width < b.width ? 0 : -(b.width - h.width) / 2) + ", 0)"
1842
- ), h = r.node().getBBox(), r.attr(
1834
+ (o.width < w.width ? 0 : -(w.width - o.width) / 2) + ", 0)"
1835
+ ), o = r.node().getBBox(), r.attr(
1843
1836
  "transform",
1844
- "translate(" + -h.width / 2 + ", " + (-h.height / 2 - E + 3) + ")"
1845
- ), l.attr("class", "outer title-state").attr("x", -h.width / 2 - E).attr("y", -h.height / 2 - E).attr("width", h.width + t.padding).attr("height", h.height + t.padding), s.attr("class", "divider").attr("x1", -h.width / 2 - E).attr("x2", h.width / 2 + E).attr("y1", -h.height / 2 - E + b.height + E).attr("y2", -h.height / 2 - E + b.height + E), I(t, l), t.intersect = function(D) {
1846
- return C.rect(t, D);
1837
+ "translate(" + -o.width / 2 + ", " + (-o.height / 2 - S + 3) + ")"
1838
+ ), l.attr("class", "outer title-state").attr("x", -o.width / 2 - S).attr("y", -o.height / 2 - S).attr("width", o.width + t.padding).attr("height", o.height + t.padding), s.attr("class", "divider").attr("x1", -o.width / 2 - S).attr("x2", o.width / 2 + S).attr("y1", -o.height / 2 - S + w.height + S).attr("y2", -o.height / 2 - S + w.height + S), T(t, l), t.intersect = function(v) {
1839
+ return N.rect(t, v);
1847
1840
  }, i;
1848
- }, "rectWithTitle"), Wr = /* @__PURE__ */ d(async (e, t) => {
1849
- const { shapeSvg: a, bbox: i } = await F(
1841
+ }, "rectWithTitle"), Mr = /* @__PURE__ */ d(async (e, t) => {
1842
+ const { shapeSvg: a, bbox: i } = await A(
1850
1843
  e,
1851
1844
  t,
1852
- K(t, void 0),
1845
+ Y(t, void 0),
1853
1846
  !0
1854
1847
  ), l = i.height + t.padding, s = i.width + l / 4 + t.padding, r = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -s / 2).attr("y", -l / 2).attr("width", s).attr("height", l);
1855
- return I(t, r), t.intersect = function(n) {
1856
- return C.rect(t, n);
1848
+ return T(t, r), t.intersect = function(n) {
1849
+ return N.rect(t, n);
1857
1850
  }, a;
1858
- }, "stadium"), Pr = /* @__PURE__ */ d(async (e, t) => {
1859
- const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
1851
+ }, "stadium"), Fr = /* @__PURE__ */ d(async (e, t) => {
1852
+ const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
1860
1853
  e,
1861
1854
  t,
1862
- K(t, void 0),
1855
+ Y(t, void 0),
1863
1856
  !0
1864
1857
  ), s = a.insert("circle", ":first-child");
1865
- return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), m.info("Circle main"), I(t, s), t.intersect = function(r) {
1866
- return m.info("Circle intersect", t, i.width / 2 + l, r), C.circle(t, i.width / 2 + l, r);
1858
+ return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), L.info("Circle main"), T(t, s), t.intersect = function(r) {
1859
+ return L.info("Circle intersect", t, i.width / 2 + l, r), N.circle(t, i.width / 2 + l, r);
1867
1860
  }, a;
1868
- }, "circle"), Yr = /* @__PURE__ */ d(async (e, t) => {
1869
- const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
1861
+ }, "circle"), Wr = /* @__PURE__ */ d(async (e, t) => {
1862
+ const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
1870
1863
  e,
1871
1864
  t,
1872
- K(t, void 0),
1865
+ Y(t, void 0),
1873
1866
  !0
1874
- ), s = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), o = r.insert("circle");
1875
- return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), m.info("DoubleCircle main"), I(t, n), t.intersect = function(u) {
1876
- return m.info("DoubleCircle intersect", t, i.width / 2 + l + s, u), C.circle(t, i.width / 2 + l + s, u);
1867
+ ), s = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), c = r.insert("circle");
1868
+ return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), L.info("DoubleCircle main"), T(t, n), t.intersect = function(u) {
1869
+ return L.info("DoubleCircle intersect", t, i.width / 2 + l + s, u), N.circle(t, i.width / 2 + l + s, u);
1877
1870
  }, a;
1878
- }, "doublecircle"), Hr = /* @__PURE__ */ d(async (e, t) => {
1879
- const { shapeSvg: a, bbox: i } = await F(
1871
+ }, "doublecircle"), Pr = /* @__PURE__ */ d(async (e, t) => {
1872
+ const { shapeSvg: a, bbox: i } = await A(
1880
1873
  e,
1881
1874
  t,
1882
- K(t, void 0),
1875
+ Y(t, void 0),
1883
1876
  !0
1884
1877
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1885
1878
  { x: 0, y: 0 },
@@ -1892,159 +1885,158 @@ var Fr = /* @__PURE__ */ d(async (e, t) => {
1892
1885
  { x: l + 8, y: -s },
1893
1886
  { x: -8, y: -s },
1894
1887
  { x: -8, y: 0 }
1895
- ], n = G(a, l, s, r);
1896
- return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1897
- return C.polygon(t, r, o);
1888
+ ], n = U(a, l, s, r);
1889
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1890
+ return N.polygon(t, r, c);
1898
1891
  }, a;
1899
- }, "subroutine"), Kr = /* @__PURE__ */ d((e, t) => {
1892
+ }, "subroutine"), Yr = /* @__PURE__ */ d((e, t) => {
1900
1893
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child");
1901
- return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), I(t, i), t.intersect = function(l) {
1902
- return C.circle(t, 7, l);
1894
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), T(t, i), t.intersect = function(l) {
1895
+ return N.circle(t, 7, l);
1903
1896
  }, a;
1904
- }, "start"), Ft = /* @__PURE__ */ d((e, t, a) => {
1897
+ }, "start"), Mt = /* @__PURE__ */ d((e, t, a) => {
1905
1898
  const i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
1906
1899
  let l = 70, s = 10;
1907
1900
  a === "LR" && (l = 10, s = 70);
1908
1901
  const r = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * s / 2).attr("width", l).attr("height", s).attr("class", "fork-join");
1909
- return I(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
1910
- return C.rect(t, n);
1902
+ return T(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
1903
+ return N.rect(t, n);
1911
1904
  }, i;
1912
- }, "forkJoin"), Xr = /* @__PURE__ */ d((e, t) => {
1905
+ }, "forkJoin"), Hr = /* @__PURE__ */ d((e, t) => {
1913
1906
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child"), l = a.insert("circle", ":first-child");
1914
- return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), I(t, l), t.intersect = function(s) {
1915
- return C.circle(t, 7, s);
1907
+ return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), T(t, l), t.intersect = function(s) {
1908
+ return N.circle(t, 7, s);
1916
1909
  }, a;
1917
- }, "end"), Ur = /* @__PURE__ */ d(async (e, t) => {
1918
- var S;
1910
+ }, "end"), Kr = /* @__PURE__ */ d(async (e, t) => {
1919
1911
  const a = t.padding / 2, i = 4, l = 8;
1920
1912
  let s;
1921
1913
  t.classes ? s = "node " + t.classes : s = "node default";
1922
- const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), o = r.insert("line"), u = r.insert("line");
1923
- let h = 0, y = i;
1924
- const b = r.insert("g").attr("class", "label");
1925
- let L = 0;
1926
- const E = (S = t.classData.annotations) == null ? void 0 : S[0], D = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", v = b.node().appendChild(await j(D, t.labelStyle, !0, !0));
1927
- let T = v.getBBox();
1928
- if (Z(z().flowchart.htmlLabels)) {
1929
- const c = v.children[0], _ = R(v);
1930
- T = c.getBoundingClientRect(), _.attr("width", T.width), _.attr("height", T.height);
1914
+ const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), c = r.insert("line"), u = r.insert("line");
1915
+ let o = 0, x = i;
1916
+ const w = r.insert("g").attr("class", "label");
1917
+ let b = 0;
1918
+ const S = t.classData.annotations?.[0], v = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", k = w.node().appendChild(await K(v, t.labelStyle, !0, !0));
1919
+ let B = k.getBBox();
1920
+ if (j(R().flowchart.htmlLabels)) {
1921
+ const E = k.children[0], h = O(k);
1922
+ B = E.getBoundingClientRect(), h.attr("width", B.width), h.attr("height", B.height);
1931
1923
  }
1932
- t.classData.annotations[0] && (y += T.height + i, h += T.width);
1933
- let k = t.classData.label;
1934
- t.classData.type !== void 0 && t.classData.type !== "" && (z().flowchart.htmlLabels ? k += "&lt;" + t.classData.type + "&gt;" : k += "<" + t.classData.type + ">");
1935
- const N = b.node().appendChild(await j(k, t.labelStyle, !0, !0));
1936
- R(N).attr("class", "classTitle");
1937
- let x = N.getBBox();
1938
- if (Z(z().flowchart.htmlLabels)) {
1939
- const c = N.children[0], _ = R(N);
1940
- x = c.getBoundingClientRect(), _.attr("width", x.width), _.attr("height", x.height);
1924
+ t.classData.annotations[0] && (x += B.height + i, o += B.width);
1925
+ let _ = t.classData.label;
1926
+ t.classData.type !== void 0 && t.classData.type !== "" && (R().flowchart.htmlLabels ? _ += "&lt;" + t.classData.type + "&gt;" : _ += "<" + t.classData.type + ">");
1927
+ const D = w.node().appendChild(await K(_, t.labelStyle, !0, !0));
1928
+ O(D).attr("class", "classTitle");
1929
+ let y = D.getBBox();
1930
+ if (j(R().flowchart.htmlLabels)) {
1931
+ const E = D.children[0], h = O(D);
1932
+ y = E.getBoundingClientRect(), h.attr("width", y.width), h.attr("height", y.height);
1941
1933
  }
1942
- y += x.height + i, x.width > h && (h = x.width);
1934
+ x += y.height + i, y.width > o && (o = y.width);
1943
1935
  const g = [];
1944
- t.classData.members.forEach(async (c) => {
1945
- const _ = c.getDisplayDetails();
1946
- let f = _.displayText;
1947
- z().flowchart.htmlLabels && (f = f.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1948
- const A = b.node().appendChild(
1949
- await j(
1950
- f,
1951
- _.cssStyle ? _.cssStyle : t.labelStyle,
1936
+ t.classData.members.forEach(async (E) => {
1937
+ const h = E.getDisplayDetails();
1938
+ let W = h.displayText;
1939
+ R().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1940
+ const p = w.node().appendChild(
1941
+ await K(
1942
+ W,
1943
+ h.cssStyle ? h.cssStyle : t.labelStyle,
1952
1944
  !0,
1953
1945
  !0
1954
1946
  )
1955
1947
  );
1956
- let O = A.getBBox();
1957
- if (Z(z().flowchart.htmlLabels)) {
1958
- const X = A.children[0], P = R(A);
1959
- O = X.getBoundingClientRect(), P.attr("width", O.width), P.attr("height", O.height);
1948
+ let I = p.getBBox();
1949
+ if (j(R().flowchart.htmlLabels)) {
1950
+ const Z = p.children[0], V = O(p);
1951
+ I = Z.getBoundingClientRect(), V.attr("width", I.width), V.attr("height", I.height);
1960
1952
  }
1961
- O.width > h && (h = O.width), y += O.height + i, g.push(A);
1962
- }), y += l;
1963
- const p = [];
1964
- if (t.classData.methods.forEach(async (c) => {
1965
- const _ = c.getDisplayDetails();
1966
- let f = _.displayText;
1967
- z().flowchart.htmlLabels && (f = f.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1968
- const A = b.node().appendChild(
1969
- await j(
1970
- f,
1971
- _.cssStyle ? _.cssStyle : t.labelStyle,
1953
+ I.width > o && (o = I.width), x += I.height + i, g.push(p);
1954
+ }), x += l;
1955
+ const f = [];
1956
+ if (t.classData.methods.forEach(async (E) => {
1957
+ const h = E.getDisplayDetails();
1958
+ let W = h.displayText;
1959
+ R().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1960
+ const p = w.node().appendChild(
1961
+ await K(
1962
+ W,
1963
+ h.cssStyle ? h.cssStyle : t.labelStyle,
1972
1964
  !0,
1973
1965
  !0
1974
1966
  )
1975
1967
  );
1976
- let O = A.getBBox();
1977
- if (Z(z().flowchart.htmlLabels)) {
1978
- const X = A.children[0], P = R(A);
1979
- O = X.getBoundingClientRect(), P.attr("width", O.width), P.attr("height", O.height);
1968
+ let I = p.getBBox();
1969
+ if (j(R().flowchart.htmlLabels)) {
1970
+ const Z = p.children[0], V = O(p);
1971
+ I = Z.getBoundingClientRect(), V.attr("width", I.width), V.attr("height", I.height);
1980
1972
  }
1981
- O.width > h && (h = O.width), y += O.height + i, p.push(A);
1982
- }), y += l, E) {
1983
- let c = (h - T.width) / 2;
1984
- R(v).attr(
1973
+ I.width > o && (o = I.width), x += I.height + i, f.push(p);
1974
+ }), x += l, S) {
1975
+ let E = (o - B.width) / 2;
1976
+ O(k).attr(
1985
1977
  "transform",
1986
- "translate( " + (-1 * h / 2 + c) + ", " + -1 * y / 2 + ")"
1987
- ), L = T.height + i;
1978
+ "translate( " + (-1 * o / 2 + E) + ", " + -1 * x / 2 + ")"
1979
+ ), b = B.height + i;
1988
1980
  }
1989
- let w = (h - x.width) / 2;
1990
- return R(N).attr(
1981
+ let m = (o - y.width) / 2;
1982
+ return O(D).attr(
1991
1983
  "transform",
1992
- "translate( " + (-1 * h / 2 + w) + ", " + (-1 * y / 2 + L) + ")"
1993
- ), L += x.height + i, o.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -y / 2 - a + l + L).attr("y2", -y / 2 - a + l + L), L += l, g.forEach((c) => {
1994
- R(c).attr(
1984
+ "translate( " + (-1 * o / 2 + m) + ", " + (-1 * x / 2 + b) + ")"
1985
+ ), b += y.height + i, c.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -x / 2 - a + l + b).attr("y2", -x / 2 - a + l + b), b += l, g.forEach((E) => {
1986
+ O(E).attr(
1995
1987
  "transform",
1996
- "translate( " + -h / 2 + ", " + (-1 * y / 2 + L + l / 2) + ")"
1988
+ "translate( " + -o / 2 + ", " + (-1 * x / 2 + b + l / 2) + ")"
1997
1989
  );
1998
- const _ = c == null ? void 0 : c.getBBox();
1999
- L += ((_ == null ? void 0 : _.height) ?? 0) + i;
2000
- }), L += l, u.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -y / 2 - a + l + L).attr("y2", -y / 2 - a + l + L), L += l, p.forEach((c) => {
2001
- R(c).attr(
1990
+ const h = E?.getBBox();
1991
+ b += (h?.height ?? 0) + i;
1992
+ }), b += l, u.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -x / 2 - a + l + b).attr("y2", -x / 2 - a + l + b), b += l, f.forEach((E) => {
1993
+ O(E).attr(
2002
1994
  "transform",
2003
- "translate( " + -h / 2 + ", " + (-1 * y / 2 + L) + ")"
1995
+ "translate( " + -o / 2 + ", " + (-1 * x / 2 + b) + ")"
2004
1996
  );
2005
- const _ = c == null ? void 0 : c.getBBox();
2006
- L += ((_ == null ? void 0 : _.height) ?? 0) + i;
2007
- }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(y / 2) - a).attr("width", h + t.padding).attr("height", y + t.padding), I(t, n), t.intersect = function(c) {
2008
- return C.rect(t, c);
1997
+ const h = E?.getBBox();
1998
+ b += (h?.height ?? 0) + i;
1999
+ }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -o / 2 - a).attr("y", -(x / 2) - a).attr("width", o + t.padding).attr("height", x + t.padding), T(t, n), t.intersect = function(E) {
2000
+ return N.rect(t, E);
2009
2001
  }, r;
2010
- }, "class_box"), Wt = {
2011
- rhombus: Mt,
2012
- composite: Ar,
2013
- question: Mt,
2014
- rect: zr,
2015
- labelRect: Mr,
2016
- rectWithTitle: Fr,
2017
- choice: _r,
2018
- circle: Pr,
2019
- doublecircle: Yr,
2020
- stadium: Wr,
2021
- hexagon: kr,
2022
- block_arrow: Dr,
2023
- rect_left_inv_arrow: Nr,
2024
- lean_right: Tr,
2025
- lean_left: Cr,
2026
- trapezoid: Ir,
2002
+ }, "class_box"), Ft = {
2003
+ rhombus: At,
2004
+ composite: Rr,
2005
+ question: At,
2006
+ rect: Or,
2007
+ labelRect: zr,
2008
+ rectWithTitle: Ar,
2009
+ choice: kr,
2010
+ circle: Fr,
2011
+ doublecircle: Wr,
2012
+ stadium: Mr,
2013
+ hexagon: vr,
2014
+ block_arrow: Er,
2015
+ rect_left_inv_arrow: _r,
2016
+ lean_right: Dr,
2017
+ lean_left: Nr,
2018
+ trapezoid: Tr,
2027
2019
  inv_trapezoid: Br,
2028
- rect_right_inv_arrow: Or,
2029
- cylinder: Rr,
2030
- start: Kr,
2031
- end: Xr,
2032
- note: Er,
2033
- subroutine: Hr,
2034
- fork: Ft,
2035
- join: Ft,
2036
- class_box: Ur
2037
- }, ct = {}, ae = /* @__PURE__ */ d(async (e, t, a) => {
2020
+ rect_right_inv_arrow: Cr,
2021
+ cylinder: Ir,
2022
+ start: Yr,
2023
+ end: Hr,
2024
+ note: Sr,
2025
+ subroutine: Pr,
2026
+ fork: Mt,
2027
+ join: Mt,
2028
+ class_box: Kr
2029
+ }, lt = {}, te = /* @__PURE__ */ d(async (e, t, a) => {
2038
2030
  let i, l;
2039
2031
  if (t.link) {
2040
2032
  let s;
2041
- z().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await Wt[t.shape](i, t, a);
2033
+ R().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await Ft[t.shape](i, t, a);
2042
2034
  } else
2043
- l = await Wt[t.shape](e, t, a), i = l;
2044
- return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), ct[t.id] = i, t.haveCallback && ct[t.id].attr("class", ct[t.id].attr("class") + " clickable"), i;
2045
- }, "insertNode"), jr = /* @__PURE__ */ d((e) => {
2046
- const t = ct[e.id];
2047
- m.trace(
2035
+ l = await Ft[t.shape](e, t, a), i = l;
2036
+ return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), lt[t.id] = i, t.haveCallback && lt[t.id].attr("class", lt[t.id].attr("class") + " clickable"), i;
2037
+ }, "insertNode"), Xr = /* @__PURE__ */ d((e) => {
2038
+ const t = lt[e.id];
2039
+ L.trace(
2048
2040
  "Transforming node",
2049
2041
  e.diff,
2050
2042
  e,
@@ -2056,11 +2048,10 @@ var Fr = /* @__PURE__ */ d(async (e, t) => {
2056
2048
  "translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
2057
2049
  ) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
2058
2050
  }, "positionNode");
2059
- function Nt(e, t, a = !1) {
2060
- var b, L, E;
2051
+ function Dt(e, t, a = !1) {
2061
2052
  const i = e;
2062
2053
  let l = "default";
2063
- (((b = i == null ? void 0 : i.classes) == null ? void 0 : b.length) || 0) > 0 && (l = ((i == null ? void 0 : i.classes) ?? []).join(" ")), l = l + " flowchart-label";
2054
+ (i?.classes?.length || 0) > 0 && (l = (i?.classes ?? []).join(" ")), l = l + " flowchart-label";
2064
2055
  let s = 0, r = "", n;
2065
2056
  switch (i.type) {
2066
2057
  case "round":
@@ -2123,59 +2114,59 @@ function Nt(e, t, a = !1) {
2123
2114
  default:
2124
2115
  r = "rect";
2125
2116
  }
2126
- const o = Se((i == null ? void 0 : i.styles) ?? []), u = i.label, h = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
2117
+ const c = me(i?.styles ?? []), u = i.label, o = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
2127
2118
  return {
2128
- labelStyle: o.labelStyle,
2119
+ labelStyle: c.labelStyle,
2129
2120
  shape: r,
2130
2121
  labelText: u,
2131
2122
  rx: s,
2132
2123
  ry: s,
2133
2124
  class: l,
2134
- style: o.style,
2125
+ style: c.style,
2135
2126
  id: i.id,
2136
2127
  directions: i.directions,
2137
- width: h.width,
2138
- height: h.height,
2139
- x: h.x,
2140
- y: h.y,
2128
+ width: o.width,
2129
+ height: o.height,
2130
+ x: o.x,
2131
+ y: o.y,
2141
2132
  positioned: a,
2142
2133
  intersect: void 0,
2143
2134
  type: i.type,
2144
- padding: n ?? ((E = (L = st()) == null ? void 0 : L.block) == null ? void 0 : E.padding) ?? 0
2135
+ padding: n ?? rt()?.block?.padding ?? 0
2145
2136
  };
2146
2137
  }
2147
- d(Nt, "getNodeFromBlock");
2148
- async function se(e, t, a) {
2149
- const i = Nt(t, a, !1);
2138
+ d(Dt, "getNodeFromBlock");
2139
+ async function ee(e, t, a) {
2140
+ const i = Dt(t, a, !1);
2150
2141
  if (i.type === "group")
2151
2142
  return;
2152
- const l = st(), s = await ae(e, i, { config: l }), r = s.node().getBBox(), n = a.getBlock(i.id);
2143
+ const l = rt(), s = await te(e, i, { config: l }), r = s.node().getBBox(), n = a.getBlock(i.id);
2153
2144
  n.size = { width: r.width, height: r.height, x: 0, y: 0, node: s }, a.setBlock(n), s.remove();
2154
2145
  }
2155
- d(se, "calculateBlockSize");
2156
- async function ie(e, t, a) {
2157
- const i = Nt(t, a, !0);
2146
+ d(ee, "calculateBlockSize");
2147
+ async function re(e, t, a) {
2148
+ const i = Dt(t, a, !0);
2158
2149
  if (a.getBlock(i.id).type !== "space") {
2159
- const s = st();
2160
- await ae(e, i, { config: s }), t.intersect = i == null ? void 0 : i.intersect, jr(i);
2150
+ const s = rt();
2151
+ await te(e, i, { config: s }), t.intersect = i?.intersect, Xr(i);
2161
2152
  }
2162
2153
  }
2163
- d(ie, "insertBlockPositioned");
2164
- async function gt(e, t, a, i) {
2154
+ d(re, "insertBlockPositioned");
2155
+ async function dt(e, t, a, i) {
2165
2156
  for (const l of t)
2166
- await i(e, l, a), l.children && await gt(e, l.children, a, i);
2157
+ await i(e, l, a), l.children && await dt(e, l.children, a, i);
2167
2158
  }
2168
- d(gt, "performOperations");
2169
- async function ne(e, t, a) {
2170
- await gt(e, t, a, se);
2159
+ d(dt, "performOperations");
2160
+ async function ae(e, t, a) {
2161
+ await dt(e, t, a, ee);
2171
2162
  }
2172
- d(ne, "calculateBlockSizes");
2173
- async function le(e, t, a) {
2174
- await gt(e, t, a, ie);
2163
+ d(ae, "calculateBlockSizes");
2164
+ async function se(e, t, a) {
2165
+ await dt(e, t, a, re);
2175
2166
  }
2176
- d(le, "insertBlocks");
2177
- async function ce(e, t, a, i, l) {
2178
- const s = new Ee({
2167
+ d(se, "insertBlocks");
2168
+ async function ie(e, t, a, i, l) {
2169
+ const s = new Se({
2179
2170
  multigraph: !0,
2180
2171
  compound: !0
2181
2172
  });
@@ -2194,72 +2185,72 @@ async function ce(e, t, a, i, l) {
2194
2185
  });
2195
2186
  for (const r of t)
2196
2187
  if (r.start && r.end) {
2197
- const n = i.getBlock(r.start), o = i.getBlock(r.end);
2198
- if (n != null && n.size && (o != null && o.size)) {
2199
- const u = n.size, h = o.size, y = [
2188
+ const n = i.getBlock(r.start), c = i.getBlock(r.end);
2189
+ if (n?.size && c?.size) {
2190
+ const u = n.size, o = c.size, x = [
2200
2191
  { x: u.x, y: u.y },
2201
- { x: u.x + (h.x - u.x) / 2, y: u.y + (h.y - u.y) / 2 },
2202
- { x: h.x, y: h.y }
2192
+ { x: u.x + (o.x - u.x) / 2, y: u.y + (o.y - u.y) / 2 },
2193
+ { x: o.x, y: o.y }
2203
2194
  ];
2204
- pr(
2195
+ gr(
2205
2196
  e,
2206
2197
  { v: r.start, w: r.end, name: r.id },
2207
2198
  {
2208
2199
  ...r,
2209
2200
  arrowTypeEnd: r.arrowTypeEnd,
2210
2201
  arrowTypeStart: r.arrowTypeStart,
2211
- points: y,
2202
+ points: x,
2212
2203
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2213
2204
  },
2214
2205
  void 0,
2215
2206
  "block",
2216
2207
  s,
2217
2208
  l
2218
- ), r.label && (await hr(e, {
2209
+ ), r.label && (await cr(e, {
2219
2210
  ...r,
2220
2211
  label: r.label,
2221
2212
  labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2222
2213
  arrowTypeEnd: r.arrowTypeEnd,
2223
2214
  arrowTypeStart: r.arrowTypeStart,
2224
- points: y,
2215
+ points: x,
2225
2216
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2226
- }), dr(
2227
- { ...r, x: y[1].x, y: y[1].y },
2217
+ }), or(
2218
+ { ...r, x: x[1].x, y: x[1].y },
2228
2219
  {
2229
- originalPath: y
2220
+ originalPath: x
2230
2221
  }
2231
2222
  ));
2232
2223
  }
2233
2224
  }
2234
2225
  }
2235
- d(ce, "insertEdges");
2236
- var Vr = /* @__PURE__ */ d(function(e, t) {
2226
+ d(ie, "insertEdges");
2227
+ var Ur = /* @__PURE__ */ d(function(e, t) {
2237
2228
  return t.db.getClasses();
2238
- }, "getClasses"), Gr = /* @__PURE__ */ d(async function(e, t, a, i) {
2239
- const { securityLevel: l, block: s } = st(), r = i.db;
2229
+ }, "getClasses"), jr = /* @__PURE__ */ d(async function(e, t, a, i) {
2230
+ const { securityLevel: l, block: s } = rt(), r = i.db;
2240
2231
  let n;
2241
- l === "sandbox" && (n = R("#i" + t));
2242
- const o = l === "sandbox" ? R(n.nodes()[0].contentDocument.body) : R("body"), u = l === "sandbox" ? o.select(`[id="${t}"]`) : R(`[id="${t}"]`);
2243
- ir(u, ["point", "circle", "cross"], i.type, t);
2244
- const y = r.getBlocks(), b = r.getBlocksFlat(), L = r.getEdges(), E = u.insert("g").attr("class", "block");
2245
- await ne(E, y, r);
2246
- const D = Zt(r);
2247
- if (await le(E, y, r), await ce(E, L, b, r, t), D) {
2248
- const v = D, T = Math.max(1, Math.round(0.125 * (v.width / v.height))), k = v.height + T + 10, N = v.width + 10, { useMaxWidth: x } = s;
2249
- ge(u, k, N, !!x), m.debug("Here Bounds", D, v), u.attr(
2232
+ l === "sandbox" && (n = O("#i" + t));
2233
+ const c = l === "sandbox" ? O(n.nodes()[0].contentDocument.body) : O("body"), u = l === "sandbox" ? c.select(`[id="${t}"]`) : O(`[id="${t}"]`);
2234
+ ar(u, ["point", "circle", "cross"], i.type, t);
2235
+ const x = r.getBlocks(), w = r.getBlocksFlat(), b = r.getEdges(), S = u.insert("g").attr("class", "block");
2236
+ await ae(S, x, r);
2237
+ const v = jt(r);
2238
+ if (await se(S, x, r), await ie(S, b, w, r, t), v) {
2239
+ const k = v, B = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + B + 10, D = k.width + 10, { useMaxWidth: y } = s;
2240
+ he(u, _, D, !!y), L.debug("Here Bounds", v, k), u.attr(
2250
2241
  "viewBox",
2251
- `${v.x - 5} ${v.y - 5} ${v.width + 10} ${v.height + 10}`
2242
+ `${k.x - 5} ${k.y - 5} ${k.width + 10} ${k.height + 10}`
2252
2243
  );
2253
2244
  }
2254
- }, "draw"), Zr = {
2255
- draw: Gr,
2256
- getClasses: Vr
2257
- }, ea = {
2258
- parser: ke,
2259
- db: Ue,
2260
- renderer: Zr,
2261
- styles: Ve
2245
+ }, "draw"), Vr = {
2246
+ draw: jr,
2247
+ getClasses: Ur
2248
+ }, $r = {
2249
+ parser: ve,
2250
+ db: Ke,
2251
+ renderer: Vr,
2252
+ styles: Ue
2262
2253
  };
2263
2254
  export {
2264
- ea as diagram
2255
+ $r as diagram
2265
2256
  };