@render-harness/ui 0.1.3 → 0.1.4

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 (97) hide show
  1. package/dist/static/assets/{architectureDiagram-3BPJPVTR-DLNRxqTW.js → architectureDiagram-3BPJPVTR-CFD3Y1kc.js} +2 -2
  2. package/dist/static/assets/{architectureDiagram-3BPJPVTR-DLNRxqTW.js.map → architectureDiagram-3BPJPVTR-CFD3Y1kc.js.map} +1 -1
  3. package/dist/static/assets/{blockDiagram-GPEHLZMM-CCWTkWe6.js → blockDiagram-GPEHLZMM-Elf3j5Yp.js} +3 -3
  4. package/dist/static/assets/{blockDiagram-GPEHLZMM-CCWTkWe6.js.map → blockDiagram-GPEHLZMM-Elf3j5Yp.js.map} +1 -1
  5. package/dist/static/assets/{c4Diagram-AAUBKEIU-qO0tZRXO.js → c4Diagram-AAUBKEIU-COPyA4Y2.js} +2 -2
  6. package/dist/static/assets/{c4Diagram-AAUBKEIU-qO0tZRXO.js.map → c4Diagram-AAUBKEIU-COPyA4Y2.js.map} +1 -1
  7. package/dist/static/assets/{chunk-3OPIFGDE-xcRWDOrg.js → chunk-3OPIFGDE-P0oLihOV.js} +2 -2
  8. package/dist/static/assets/{chunk-3OPIFGDE-xcRWDOrg.js.map → chunk-3OPIFGDE-P0oLihOV.js.map} +1 -1
  9. package/dist/static/assets/{chunk-5ZQYHXKU-B_3UEJ_q.js → chunk-5ZQYHXKU-CCVDVWrS.js} +2 -2
  10. package/dist/static/assets/{chunk-5ZQYHXKU-B_3UEJ_q.js.map → chunk-5ZQYHXKU-CCVDVWrS.js.map} +1 -1
  11. package/dist/static/assets/{chunk-727SXJPM-c1bbIj6N.js → chunk-727SXJPM-CNNkFQDE.js} +2 -2
  12. package/dist/static/assets/{chunk-727SXJPM-c1bbIj6N.js.map → chunk-727SXJPM-CNNkFQDE.js.map} +1 -1
  13. package/dist/static/assets/{chunk-AQP2D5EJ-Wv0w6wvH.js → chunk-AQP2D5EJ-BmW_1ljM.js} +2 -2
  14. package/dist/static/assets/{chunk-AQP2D5EJ-Wv0w6wvH.js.map → chunk-AQP2D5EJ-BmW_1ljM.js.map} +1 -1
  15. package/dist/static/assets/{chunk-KSCS5N6A-BZrceHGX.js → chunk-KSCS5N6A-B2emJsw5.js} +3 -3
  16. package/dist/static/assets/{chunk-KSCS5N6A-BZrceHGX.js.map → chunk-KSCS5N6A-B2emJsw5.js.map} +1 -1
  17. package/dist/static/assets/{chunk-L5ZTLDWV-BAcjEn3C.js → chunk-L5ZTLDWV-DZfwPtSD.js} +2 -2
  18. package/dist/static/assets/{chunk-L5ZTLDWV-BAcjEn3C.js.map → chunk-L5ZTLDWV-DZfwPtSD.js.map} +1 -1
  19. package/dist/static/assets/{chunk-O5CBEL6O-KRO56hHQ.js → chunk-O5CBEL6O-CNfA3Ek9.js} +2 -2
  20. package/dist/static/assets/{chunk-O5CBEL6O-KRO56hHQ.js.map → chunk-O5CBEL6O-CNfA3Ek9.js.map} +1 -1
  21. package/dist/static/assets/classDiagram-4FO5ZUOK-BRBJdDvt.js +2 -0
  22. package/dist/static/assets/{classDiagram-4FO5ZUOK-oexPF7ww.js.map → classDiagram-4FO5ZUOK-BRBJdDvt.js.map} +1 -1
  23. package/dist/static/assets/classDiagram-v2-Q7XG4LA2-CQjk9kLc.js +2 -0
  24. package/dist/static/assets/{classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js.map → classDiagram-v2-Q7XG4LA2-CQjk9kLc.js.map} +1 -1
  25. package/dist/static/assets/{dagre-BM42HDAG-au4dCVgC.js → dagre-BM42HDAG-DovnSGTF.js} +2 -2
  26. package/dist/static/assets/{dagre-BM42HDAG-au4dCVgC.js.map → dagre-BM42HDAG-DovnSGTF.js.map} +1 -1
  27. package/dist/static/assets/{diagram-2AECGRRQ-rJMnDhBW.js → diagram-2AECGRRQ-DL9VAGtd.js} +2 -2
  28. package/dist/static/assets/{diagram-2AECGRRQ-rJMnDhBW.js.map → diagram-2AECGRRQ-DL9VAGtd.js.map} +1 -1
  29. package/dist/static/assets/{diagram-5GNKFQAL-diIxjA-v.js → diagram-5GNKFQAL-Crr9YjF6.js} +2 -2
  30. package/dist/static/assets/{diagram-5GNKFQAL-diIxjA-v.js.map → diagram-5GNKFQAL-Crr9YjF6.js.map} +1 -1
  31. package/dist/static/assets/{diagram-KO2AKTUF-D9IYocVR.js → diagram-KO2AKTUF-B3yOnGTs.js} +2 -2
  32. package/dist/static/assets/{diagram-KO2AKTUF-D9IYocVR.js.map → diagram-KO2AKTUF-B3yOnGTs.js.map} +1 -1
  33. package/dist/static/assets/{diagram-LMA3HP47-BtdvpqaH.js → diagram-LMA3HP47-KALO7OjG.js} +2 -2
  34. package/dist/static/assets/{diagram-LMA3HP47-BtdvpqaH.js.map → diagram-LMA3HP47-KALO7OjG.js.map} +1 -1
  35. package/dist/static/assets/{diagram-OG6HWLK6-CaRkxDoj.js → diagram-OG6HWLK6-D0GPjAxV.js} +2 -2
  36. package/dist/static/assets/{diagram-OG6HWLK6-CaRkxDoj.js.map → diagram-OG6HWLK6-D0GPjAxV.js.map} +1 -1
  37. package/dist/static/assets/{erDiagram-TEJ5UH35-CgifrqeZ.js → erDiagram-TEJ5UH35-ksCvepnP.js} +2 -2
  38. package/dist/static/assets/{erDiagram-TEJ5UH35-CgifrqeZ.js.map → erDiagram-TEJ5UH35-ksCvepnP.js.map} +1 -1
  39. package/dist/static/assets/{flowDiagram-I6XJVG4X-DaguIeM_.js → flowDiagram-I6XJVG4X-BT1bpfq2.js} +2 -2
  40. package/dist/static/assets/{flowDiagram-I6XJVG4X-DaguIeM_.js.map → flowDiagram-I6XJVG4X-BT1bpfq2.js.map} +1 -1
  41. package/dist/static/assets/ganttDiagram-6RSMTGT7-Cg3QTIl7.js +293 -0
  42. package/dist/static/assets/ganttDiagram-6RSMTGT7-Cg3QTIl7.js.map +1 -0
  43. package/dist/static/assets/{gitGraphDiagram-PVQCEYII-Ht-SDjxh.js → gitGraphDiagram-PVQCEYII-AW-DbGHw.js} +2 -2
  44. package/dist/static/assets/{gitGraphDiagram-PVQCEYII-Ht-SDjxh.js.map → gitGraphDiagram-PVQCEYII-AW-DbGHw.js.map} +1 -1
  45. package/dist/static/assets/index-B1CSiQFH.js +260 -0
  46. package/dist/static/assets/index-B1CSiQFH.js.map +1 -0
  47. package/dist/static/assets/{index-luXiT-gK.css → index-BJZaWHUt.css} +1 -1
  48. package/dist/static/assets/{infoDiagram-5YYISTIA-CwLGA7Zu.js → infoDiagram-5YYISTIA-DZzRjoNy.js} +2 -2
  49. package/dist/static/assets/{infoDiagram-5YYISTIA-CwLGA7Zu.js.map → infoDiagram-5YYISTIA-DZzRjoNy.js.map} +1 -1
  50. package/dist/static/assets/init-D6CV0rqX.js +2 -0
  51. package/dist/static/assets/{init-Dfd1k18d.js.map → init-D6CV0rqX.js.map} +1 -1
  52. package/dist/static/assets/{ishikawaDiagram-YF4QCWOH-CaZCrUUR.js → ishikawaDiagram-YF4QCWOH-A-bX4Zu0.js} +2 -2
  53. package/dist/static/assets/{ishikawaDiagram-YF4QCWOH-CaZCrUUR.js.map → ishikawaDiagram-YF4QCWOH-A-bX4Zu0.js.map} +1 -1
  54. package/dist/static/assets/{kanban-definition-UN3LZRKU-DlYha85J.js → kanban-definition-UN3LZRKU-ibATe6sx.js} +2 -2
  55. package/dist/static/assets/{kanban-definition-UN3LZRKU-DlYha85J.js.map → kanban-definition-UN3LZRKU-ibATe6sx.js.map} +1 -1
  56. package/dist/static/assets/{line-GCwXS1Fi.js → line-DvIoplHa.js} +2 -2
  57. package/dist/static/assets/{line-GCwXS1Fi.js.map → line-DvIoplHa.js.map} +1 -1
  58. package/dist/static/assets/linear-D0P02-YR.js +2 -0
  59. package/dist/static/assets/{linear-CTnL8jvu.js.map → linear-D0P02-YR.js.map} +1 -1
  60. package/dist/static/assets/{mindmap-definition-RKZ34NQL-CPJIWJdQ.js → mindmap-definition-RKZ34NQL-BYhA5Frb.js} +2 -2
  61. package/dist/static/assets/{mindmap-definition-RKZ34NQL-CPJIWJdQ.js.map → mindmap-definition-RKZ34NQL-BYhA5Frb.js.map} +1 -1
  62. package/dist/static/assets/{ordinal-DjeI0KOh.js → ordinal-D-PEDSg4.js} +2 -2
  63. package/dist/static/assets/{ordinal-DjeI0KOh.js.map → ordinal-D-PEDSg4.js.map} +1 -1
  64. package/dist/static/assets/{pieDiagram-4H26LBE5-DTVmF_CH.js → pieDiagram-4H26LBE5-qud9ZeDs.js} +2 -2
  65. package/dist/static/assets/{pieDiagram-4H26LBE5-DTVmF_CH.js.map → pieDiagram-4H26LBE5-qud9ZeDs.js.map} +1 -1
  66. package/dist/static/assets/{quadrantDiagram-W4KKPZXB-Bho6zy_y.js → quadrantDiagram-W4KKPZXB-B5lPA7rJ.js} +2 -2
  67. package/dist/static/assets/{quadrantDiagram-W4KKPZXB-Bho6zy_y.js.map → quadrantDiagram-W4KKPZXB-B5lPA7rJ.js.map} +1 -1
  68. package/dist/static/assets/{requirementDiagram-4Y6WPE33-CLyoVwlh.js → requirementDiagram-4Y6WPE33-C0mLADne.js} +2 -2
  69. package/dist/static/assets/{requirementDiagram-4Y6WPE33-CLyoVwlh.js.map → requirementDiagram-4Y6WPE33-C0mLADne.js.map} +1 -1
  70. package/dist/static/assets/{sankeyDiagram-5OEKKPKP-V2yvk-0Z.js → sankeyDiagram-5OEKKPKP-vwfoPxTH.js} +2 -2
  71. package/dist/static/assets/{sankeyDiagram-5OEKKPKP-V2yvk-0Z.js.map → sankeyDiagram-5OEKKPKP-vwfoPxTH.js.map} +1 -1
  72. package/dist/static/assets/{sequenceDiagram-3UESZ5HK-Dp03aXVk.js → sequenceDiagram-3UESZ5HK-DtPUE6ba.js} +2 -2
  73. package/dist/static/assets/{sequenceDiagram-3UESZ5HK-Dp03aXVk.js.map → sequenceDiagram-3UESZ5HK-DtPUE6ba.js.map} +1 -1
  74. package/dist/static/assets/{stateDiagram-AJRCARHV-BEJW-_HK.js → stateDiagram-AJRCARHV-BaeNtGLJ.js} +2 -2
  75. package/dist/static/assets/{stateDiagram-AJRCARHV-BEJW-_HK.js.map → stateDiagram-AJRCARHV-BaeNtGLJ.js.map} +1 -1
  76. package/dist/static/assets/stateDiagram-v2-BHNVJYJU-DbTX_m6G.js +2 -0
  77. package/dist/static/assets/{stateDiagram-v2-BHNVJYJU-Bo19-vKE.js.map → stateDiagram-v2-BHNVJYJU-DbTX_m6G.js.map} +1 -1
  78. package/dist/static/assets/{timeline-definition-PNZ67QCA-C4KTq0mQ.js → timeline-definition-PNZ67QCA-C9H1UzNY.js} +2 -2
  79. package/dist/static/assets/{timeline-definition-PNZ67QCA-C4KTq0mQ.js.map → timeline-definition-PNZ67QCA-C9H1UzNY.js.map} +1 -1
  80. package/dist/static/assets/{vennDiagram-CIIHVFJN-1jmBZPSZ.js → vennDiagram-CIIHVFJN-BpQ2qCN5.js} +2 -2
  81. package/dist/static/assets/{vennDiagram-CIIHVFJN-1jmBZPSZ.js.map → vennDiagram-CIIHVFJN-BpQ2qCN5.js.map} +1 -1
  82. package/dist/static/assets/{wardleyDiagram-YWT4CUSO-A8XYzYTW.js → wardleyDiagram-YWT4CUSO-CQ8dLujr.js} +2 -2
  83. package/dist/static/assets/{wardleyDiagram-YWT4CUSO-A8XYzYTW.js.map → wardleyDiagram-YWT4CUSO-CQ8dLujr.js.map} +1 -1
  84. package/dist/static/assets/{xychartDiagram-2RQKCTM6-CuyUQvFt.js → xychartDiagram-2RQKCTM6-BCRK_Cs-.js} +4 -4
  85. package/dist/static/assets/xychartDiagram-2RQKCTM6-BCRK_Cs-.js.map +1 -0
  86. package/dist/static/index.html +14 -10
  87. package/package.json +14 -13
  88. package/dist/static/assets/classDiagram-4FO5ZUOK-oexPF7ww.js +0 -2
  89. package/dist/static/assets/classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js +0 -2
  90. package/dist/static/assets/ganttDiagram-6RSMTGT7-DIFubQTa.js +0 -293
  91. package/dist/static/assets/ganttDiagram-6RSMTGT7-DIFubQTa.js.map +0 -1
  92. package/dist/static/assets/index-D5tmHkO_.js +0 -228
  93. package/dist/static/assets/index-D5tmHkO_.js.map +0 -1
  94. package/dist/static/assets/init-Dfd1k18d.js +0 -2
  95. package/dist/static/assets/linear-CTnL8jvu.js +0 -2
  96. package/dist/static/assets/stateDiagram-v2-BHNVJYJU-Bo19-vKE.js +0 -2
  97. package/dist/static/assets/xychartDiagram-2RQKCTM6-CuyUQvFt.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{h as e}from"./src-DoMhBUqV.js";import"./chunk-CSCIHK7Q-BBzr5U3o.js";import"./chunk-5ZQYHXKU-CCVDVWrS.js";import"./chunk-BSJP7CBP-Kr5SHCan.js";import"./chunk-L5ZTLDWV-DZfwPtSD.js";import"./chunk-NZK2D7GU-DuwDtSGJ.js";import"./chunk-O5CBEL6O-CNfA3Ek9.js";import"./chunk-3OPIFGDE-P0oLihOV.js";import"./chunk-KSCS5N6A-B2emJsw5.js";import"./index-B1CSiQFH.js";import"./chunk-FMBD7UC4-CiWgEw8O.js";import"./chunk-ND2GUHAM-DHtjIa8_.js";import"./chunk-55IACEB6-aqMcRzKm.js";import"./chunk-2J33WTMH-DaEvWRZX.js";import{i as t,n,r,t as i}from"./chunk-727SXJPM-CNNkFQDE.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
2
+ //# sourceMappingURL=classDiagram-4FO5ZUOK-BRBJdDvt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"classDiagram-4FO5ZUOK-oexPF7ww.js","names":[],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-4FO5ZUOK.mjs"],"sourcesContent":["import {\n ClassDB,\n classDiagram_default,\n classRenderer_v3_unified_default,\n styles_default\n} from \"./chunk-727SXJPM.mjs\";\nimport \"./chunk-FMBD7UC4.mjs\";\nimport \"./chunk-ND2GUHAM.mjs\";\nimport \"./chunk-55IACEB6.mjs\";\nimport \"./chunk-2J33WTMH.mjs\";\nimport \"./chunk-LZXEDZCA.mjs\";\nimport \"./chunk-KSCS5N6A.mjs\";\nimport \"./chunk-BSJP7CBP.mjs\";\nimport \"./chunk-3OPIFGDE.mjs\";\nimport \"./chunk-L5ZTLDWV.mjs\";\nimport \"./chunk-NZK2D7GU.mjs\";\nimport \"./chunk-O5CBEL6O.mjs\";\nimport \"./chunk-5ZQYHXKU.mjs\";\nimport \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/class/classDiagram.ts\nvar diagram = {\n parser: classDiagram_default,\n get db() {\n return new ClassDB();\n },\n renderer: classRenderer_v3_unified_default,\n styles: styles_default,\n init: /* @__PURE__ */ __name((cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n }, \"init\")\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"0jBAwBA,IAAI,EAAU,CACZ,OAAQ,EACR,IAAI,IAAK,CACP,OAAO,IAAI,GAEb,SAAU,EACV,OAAQ,EACR,KAAsB,EAAQ,GAAQ,CACpC,AACE,EAAI,QAAQ,EAAE,CAEhB,EAAI,MAAM,oBAAsB,EAAI,qBACnC,OAAO,CACX"}
1
+ {"version":3,"file":"classDiagram-4FO5ZUOK-BRBJdDvt.js","names":[],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-4FO5ZUOK.mjs"],"sourcesContent":["import {\n ClassDB,\n classDiagram_default,\n classRenderer_v3_unified_default,\n styles_default\n} from \"./chunk-727SXJPM.mjs\";\nimport \"./chunk-FMBD7UC4.mjs\";\nimport \"./chunk-ND2GUHAM.mjs\";\nimport \"./chunk-55IACEB6.mjs\";\nimport \"./chunk-2J33WTMH.mjs\";\nimport \"./chunk-LZXEDZCA.mjs\";\nimport \"./chunk-KSCS5N6A.mjs\";\nimport \"./chunk-BSJP7CBP.mjs\";\nimport \"./chunk-3OPIFGDE.mjs\";\nimport \"./chunk-L5ZTLDWV.mjs\";\nimport \"./chunk-NZK2D7GU.mjs\";\nimport \"./chunk-O5CBEL6O.mjs\";\nimport \"./chunk-5ZQYHXKU.mjs\";\nimport \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/class/classDiagram.ts\nvar diagram = {\n parser: classDiagram_default,\n get db() {\n return new ClassDB();\n },\n renderer: classRenderer_v3_unified_default,\n styles: styles_default,\n init: /* @__PURE__ */ __name((cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n }, \"init\")\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"0jBAwBA,IAAI,EAAU,CACZ,OAAQ,EACR,IAAI,IAAK,CACP,OAAO,IAAI,GAEb,SAAU,EACV,OAAQ,EACR,KAAsB,EAAQ,GAAQ,CACpC,AACE,EAAI,QAAQ,EAAE,CAEhB,EAAI,MAAM,oBAAsB,EAAI,qBACnC,OAAO,CACX"}
@@ -0,0 +1,2 @@
1
+ import{h as e}from"./src-DoMhBUqV.js";import"./chunk-CSCIHK7Q-BBzr5U3o.js";import"./chunk-5ZQYHXKU-CCVDVWrS.js";import"./chunk-BSJP7CBP-Kr5SHCan.js";import"./chunk-L5ZTLDWV-DZfwPtSD.js";import"./chunk-NZK2D7GU-DuwDtSGJ.js";import"./chunk-O5CBEL6O-CNfA3Ek9.js";import"./chunk-3OPIFGDE-P0oLihOV.js";import"./chunk-KSCS5N6A-B2emJsw5.js";import"./index-B1CSiQFH.js";import"./chunk-FMBD7UC4-CiWgEw8O.js";import"./chunk-ND2GUHAM-DHtjIa8_.js";import"./chunk-55IACEB6-aqMcRzKm.js";import"./chunk-2J33WTMH-DaEvWRZX.js";import{i as t,n,r,t as i}from"./chunk-727SXJPM-CNNkFQDE.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
2
+ //# sourceMappingURL=classDiagram-v2-Q7XG4LA2-CQjk9kLc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js","names":[],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-Q7XG4LA2.mjs"],"sourcesContent":["import {\n ClassDB,\n classDiagram_default,\n classRenderer_v3_unified_default,\n styles_default\n} from \"./chunk-727SXJPM.mjs\";\nimport \"./chunk-FMBD7UC4.mjs\";\nimport \"./chunk-ND2GUHAM.mjs\";\nimport \"./chunk-55IACEB6.mjs\";\nimport \"./chunk-2J33WTMH.mjs\";\nimport \"./chunk-LZXEDZCA.mjs\";\nimport \"./chunk-KSCS5N6A.mjs\";\nimport \"./chunk-BSJP7CBP.mjs\";\nimport \"./chunk-3OPIFGDE.mjs\";\nimport \"./chunk-L5ZTLDWV.mjs\";\nimport \"./chunk-NZK2D7GU.mjs\";\nimport \"./chunk-O5CBEL6O.mjs\";\nimport \"./chunk-5ZQYHXKU.mjs\";\nimport \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/class/classDiagram-v2.ts\nvar diagram = {\n parser: classDiagram_default,\n get db() {\n return new ClassDB();\n },\n renderer: classRenderer_v3_unified_default,\n styles: styles_default,\n init: /* @__PURE__ */ __name((cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n }, \"init\")\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"0jBAwBA,IAAI,EAAU,CACZ,OAAQ,EACR,IAAI,IAAK,CACP,OAAO,IAAI,GAEb,SAAU,EACV,OAAQ,EACR,KAAsB,EAAQ,GAAQ,CACpC,AACE,EAAI,QAAQ,EAAE,CAEhB,EAAI,MAAM,oBAAsB,EAAI,qBACnC,OAAO,CACX"}
1
+ {"version":3,"file":"classDiagram-v2-Q7XG4LA2-CQjk9kLc.js","names":[],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-Q7XG4LA2.mjs"],"sourcesContent":["import {\n ClassDB,\n classDiagram_default,\n classRenderer_v3_unified_default,\n styles_default\n} from \"./chunk-727SXJPM.mjs\";\nimport \"./chunk-FMBD7UC4.mjs\";\nimport \"./chunk-ND2GUHAM.mjs\";\nimport \"./chunk-55IACEB6.mjs\";\nimport \"./chunk-2J33WTMH.mjs\";\nimport \"./chunk-LZXEDZCA.mjs\";\nimport \"./chunk-KSCS5N6A.mjs\";\nimport \"./chunk-BSJP7CBP.mjs\";\nimport \"./chunk-3OPIFGDE.mjs\";\nimport \"./chunk-L5ZTLDWV.mjs\";\nimport \"./chunk-NZK2D7GU.mjs\";\nimport \"./chunk-O5CBEL6O.mjs\";\nimport \"./chunk-5ZQYHXKU.mjs\";\nimport \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/class/classDiagram-v2.ts\nvar diagram = {\n parser: classDiagram_default,\n get db() {\n return new ClassDB();\n },\n renderer: classRenderer_v3_unified_default,\n styles: styles_default,\n init: /* @__PURE__ */ __name((cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n }, \"init\")\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"0jBAwBA,IAAI,EAAU,CACZ,OAAQ,EACR,IAAI,IAAK,CACP,OAAO,IAAI,GAEb,SAAU,EACV,OAAQ,EACR,KAAsB,EAAQ,GAAQ,CACpC,AACE,EAAI,QAAQ,EAAE,CAEhB,EAAI,MAAM,oBAAsB,EAAI,qBACnC,OAAO,CACX"}
@@ -1,5 +1,5 @@
1
- import{g as e,h as t}from"./src-DoMhBUqV.js";import{x as n}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import"./chunk-5ZQYHXKU-B_3UEJ_q.js";import"./chunk-BSJP7CBP-Kr5SHCan.js";import{n as r}from"./chunk-L5ZTLDWV-BAcjEn3C.js";import"./chunk-NZK2D7GU-DuwDtSGJ.js";import"./chunk-O5CBEL6O-KRO56hHQ.js";import{a as i,c as a,i as o,l as s,n as c,t as l,u}from"./chunk-3OPIFGDE-xcRWDOrg.js";import{a as d,i as f,n as p,r as m,t as h}from"./chunk-KSCS5N6A-BZrceHGX.js";import{r as g,t as _}from"./graphlib-B-xHMrcv.js";import{n as v,r as y,t as b}from"./dagre-CKPhbkRL.js";var x=4;function S(e){return y(e,x)}function C(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:w(e),edges:T(e)};return g(e.graph())||(t.value=S(e.graph())),t}function w(e){return v(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return g(n)||(i.value=n),g(r)||(i.parent=r),i})}function T(e){return v(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return g(t.name)||(r.name=t.name),g(n)||(r.value=n),r})}var E=new Map,D=new Map,O=new Map,k=t(()=>{D.clear(),O.clear(),E.clear()},`clear`),A=t((t,n)=>{let r=D.get(n)||[];return e.trace(`In isDescendant`,n,` `,t,` = `,r.includes(t)),r.includes(t)},`isDescendant`),j=t((t,n)=>{let r=D.get(n)||[];return e.info(`Descendants of `,n,` is `,r),e.info(`Edge is `,t),t.v===n||t.w===n?!1:r?r.includes(t.v)||A(t.v,n)||A(t.w,n)||r.includes(t.w):(e.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),M=t((t,n,r,i)=>{e.warn(`Copying children of `,t,`root`,i,`data`,n.node(t),i);let a=n.children(t)||[];t!==i&&a.push(t),e.warn(`Copying (nodes) clusterId`,t,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)M(a,n,r,i);else{let o=n.node(a);e.info(`cp `,a,` to `,i,` with parent `,t),r.setNode(a,o),i!==n.parent(a)&&(e.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),t!==i&&a!==t?(e.debug(`Setting parent`,a,t),r.setParent(a,t)):(e.info(`In copy `,t,`root`,i,`data`,n.node(t),i),e.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,t!==i,`node!==clusterId`,a!==t));let s=n.edges(a);e.debug(`Copying Edges`,s),s.forEach(a=>{e.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);e.info(`Edge data`,o,i);try{j(a,i)?(e.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),e.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):e.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,t)}catch(t){e.error(t)}})}e.debug(`Removing node`,a),n.removeNode(a)})},`copy`),N=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)O.set(i,e),r=[...r,...N(i,t)];return r},`extractDescendants`),P=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),F=t((t,n,r)=>{let i=n.children(t);if(e.trace(`Searching children of id `,t,i),i.length<1)return t;let a;for(let e of i){let t=F(e,n,r),i=P(n,r,t);if(t)if(i.length>0)a=t;else return t}return a},`findNonClusterChild`),I=t(e=>!E.has(e)||!E.get(e).externalConnections?e:E.has(e)?E.get(e).id:e,`getAnchorId`),L=t((t,n)=>{if(!t||n>10){e.debug(`Opting out, no graph `);return}else e.debug(`Opting in, graph `);t.nodes().forEach(function(n){t.children(n).length>0&&(e.warn(`Cluster identified`,n,` Replacement id in edges: `,F(n,t,n)),D.set(n,N(n,t)),E.set(n,{id:F(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){let r=t.children(n),i=t.edges();r.length>0?(e.debug(`Cluster identified`,n,D),i.forEach(t=>{A(t.v,n)^A(t.w,n)&&(e.warn(`Edge: `,t,` leaves cluster `,n),e.warn(`Descendants of XXX `,n,`: `,D.get(n)),E.get(n).externalConnections=!0)})):e.debug(`Not a cluster `,n,D)});for(let e of E.keys()){let n=E.get(e).id,r=t.parent(n);r!==e&&E.has(r)&&!E.get(r).externalConnections&&(E.get(e).id=r)}t.edges().forEach(function(n){let r=t.edge(n);e.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),e.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(t.edge(n)));let i=n.v,a=n.w;if(e.warn(`Fix XXX`,E,`ids:`,n.v,n.w,`Translating: `,E.get(n.v),` --- `,E.get(n.w)),E.get(n.v)||E.get(n.w)){if(e.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=I(n.v),a=I(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){let e=t.parent(i);E.get(e).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let e=t.parent(a);E.get(e).externalConnections=!0,r.toCluster=n.w}e.warn(`Fix Replacing with XXX`,i,a,n.name),t.setEdge(i,a,r,n.name)}}),e.warn(`Adjusted Graph`,C(t)),R(t,0),e.trace(E)},`adjustClustersAndEdges`),R=t((t,n)=>{if(e.warn(`extractor - `,n,C(t),t.children(`D`)),n>10){e.error(`Bailing out`);return}let r=t.nodes(),i=!1;for(let e of r){let n=t.children(e);i||=n.length>0}if(!i){e.debug(`Done, no node has children`,t.nodes());return}e.debug(`Nodes = `,r,n);for(let i of r)if(e.debug(`Extracting node`,i,E,E.has(i)&&!E.get(i).externalConnections,!t.parent(i),t.node(i),t.children(`D`),` Depth `,n),!E.has(i))e.debug(`Not a cluster`,i,n);else if(!E.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){e.warn(`Cluster without external connections, without a parent and with children`,i,n);let r=t.graph().rankdir===`TB`?`LR`:`TB`;E.get(i)?.clusterData?.dir&&(r=E.get(i).clusterData.dir,e.warn(`Fixing dir`,E.get(i).clusterData.dir,r));let a=new _({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});e.warn(`Old graph before copy`,C(t)),M(i,t,a,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:a}),e.warn(`New graph after copy node: (`,i,`)`,C(a)),e.debug(`Old graph after copy`,C(t))}else e.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!E.get(i).externalConnections,` no parent: `,!t.parent(i),` children `,t.children(i)&&t.children(i).length>0,t.children(`D`),n),e.debug(E);r=t.nodes(),e.warn(`New list of nodes`,r);for(let i of r){let r=t.node(i);e.warn(` Now next level`,i,r),r?.clusterNode&&R(r.graph,n+1)}},`extractor`),z=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),B=t(e=>z(e,e.children()),`sortNodesByHierarchy`),V=t(async(n,c,l,f,h,g)=>{e.warn(`Graph in recursive render:XAX`,C(c),h);let _=c.graph().rankdir;e.trace(`Dir in recursive render - dir:`,_);let v=n.insert(`g`).attr(`class`,`root`);c.nodes()?e.info(`Recursive render XXX`,c.nodes()):e.info(`No nodes found for`,c),c.edges().length>0&&e.info(`Recursive edges`,c.edge(c.edges()[0]));let y=v.insert(`g`).attr(`class`,`clusters`),x=v.insert(`g`).attr(`class`,`edgePaths`),S=v.insert(`g`).attr(`class`,`edgeLabels`),w=v.insert(`g`).attr(`class`,`nodes`);await Promise.all(c.nodes().map(async function(t){let n=c.node(t);if(h!==void 0){let n=JSON.parse(JSON.stringify(h.clusterData));e.trace(`Setting data for parent cluster XXX
1
+ import{g as e,h as t}from"./src-DoMhBUqV.js";import{x as n}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import"./chunk-5ZQYHXKU-CCVDVWrS.js";import"./chunk-BSJP7CBP-Kr5SHCan.js";import{n as r}from"./chunk-L5ZTLDWV-DZfwPtSD.js";import"./chunk-NZK2D7GU-DuwDtSGJ.js";import"./chunk-O5CBEL6O-CNfA3Ek9.js";import{a as i,c as a,i as o,l as s,n as c,t as l,u}from"./chunk-3OPIFGDE-P0oLihOV.js";import{a as d,i as f,n as p,r as m,t as h}from"./chunk-KSCS5N6A-B2emJsw5.js";import{r as g,t as _}from"./graphlib-B-xHMrcv.js";import{n as v,r as y,t as b}from"./dagre-CKPhbkRL.js";var x=4;function S(e){return y(e,x)}function C(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:w(e),edges:T(e)};return g(e.graph())||(t.value=S(e.graph())),t}function w(e){return v(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return g(n)||(i.value=n),g(r)||(i.parent=r),i})}function T(e){return v(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return g(t.name)||(r.name=t.name),g(n)||(r.value=n),r})}var E=new Map,D=new Map,O=new Map,k=t(()=>{D.clear(),O.clear(),E.clear()},`clear`),A=t((t,n)=>{let r=D.get(n)||[];return e.trace(`In isDescendant`,n,` `,t,` = `,r.includes(t)),r.includes(t)},`isDescendant`),j=t((t,n)=>{let r=D.get(n)||[];return e.info(`Descendants of `,n,` is `,r),e.info(`Edge is `,t),t.v===n||t.w===n?!1:r?r.includes(t.v)||A(t.v,n)||A(t.w,n)||r.includes(t.w):(e.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),M=t((t,n,r,i)=>{e.warn(`Copying children of `,t,`root`,i,`data`,n.node(t),i);let a=n.children(t)||[];t!==i&&a.push(t),e.warn(`Copying (nodes) clusterId`,t,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)M(a,n,r,i);else{let o=n.node(a);e.info(`cp `,a,` to `,i,` with parent `,t),r.setNode(a,o),i!==n.parent(a)&&(e.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),t!==i&&a!==t?(e.debug(`Setting parent`,a,t),r.setParent(a,t)):(e.info(`In copy `,t,`root`,i,`data`,n.node(t),i),e.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,t!==i,`node!==clusterId`,a!==t));let s=n.edges(a);e.debug(`Copying Edges`,s),s.forEach(a=>{e.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);e.info(`Edge data`,o,i);try{j(a,i)?(e.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),e.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):e.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,t)}catch(t){e.error(t)}})}e.debug(`Removing node`,a),n.removeNode(a)})},`copy`),N=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)O.set(i,e),r=[...r,...N(i,t)];return r},`extractDescendants`),P=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),F=t((t,n,r)=>{let i=n.children(t);if(e.trace(`Searching children of id `,t,i),i.length<1)return t;let a;for(let e of i){let t=F(e,n,r),i=P(n,r,t);if(t)if(i.length>0)a=t;else return t}return a},`findNonClusterChild`),I=t(e=>!E.has(e)||!E.get(e).externalConnections?e:E.has(e)?E.get(e).id:e,`getAnchorId`),L=t((t,n)=>{if(!t||n>10){e.debug(`Opting out, no graph `);return}else e.debug(`Opting in, graph `);t.nodes().forEach(function(n){t.children(n).length>0&&(e.warn(`Cluster identified`,n,` Replacement id in edges: `,F(n,t,n)),D.set(n,N(n,t)),E.set(n,{id:F(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){let r=t.children(n),i=t.edges();r.length>0?(e.debug(`Cluster identified`,n,D),i.forEach(t=>{A(t.v,n)^A(t.w,n)&&(e.warn(`Edge: `,t,` leaves cluster `,n),e.warn(`Descendants of XXX `,n,`: `,D.get(n)),E.get(n).externalConnections=!0)})):e.debug(`Not a cluster `,n,D)});for(let e of E.keys()){let n=E.get(e).id,r=t.parent(n);r!==e&&E.has(r)&&!E.get(r).externalConnections&&(E.get(e).id=r)}t.edges().forEach(function(n){let r=t.edge(n);e.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),e.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(t.edge(n)));let i=n.v,a=n.w;if(e.warn(`Fix XXX`,E,`ids:`,n.v,n.w,`Translating: `,E.get(n.v),` --- `,E.get(n.w)),E.get(n.v)||E.get(n.w)){if(e.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=I(n.v),a=I(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){let e=t.parent(i);E.get(e).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let e=t.parent(a);E.get(e).externalConnections=!0,r.toCluster=n.w}e.warn(`Fix Replacing with XXX`,i,a,n.name),t.setEdge(i,a,r,n.name)}}),e.warn(`Adjusted Graph`,C(t)),R(t,0),e.trace(E)},`adjustClustersAndEdges`),R=t((t,n)=>{if(e.warn(`extractor - `,n,C(t),t.children(`D`)),n>10){e.error(`Bailing out`);return}let r=t.nodes(),i=!1;for(let e of r){let n=t.children(e);i||=n.length>0}if(!i){e.debug(`Done, no node has children`,t.nodes());return}e.debug(`Nodes = `,r,n);for(let i of r)if(e.debug(`Extracting node`,i,E,E.has(i)&&!E.get(i).externalConnections,!t.parent(i),t.node(i),t.children(`D`),` Depth `,n),!E.has(i))e.debug(`Not a cluster`,i,n);else if(!E.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){e.warn(`Cluster without external connections, without a parent and with children`,i,n);let r=t.graph().rankdir===`TB`?`LR`:`TB`;E.get(i)?.clusterData?.dir&&(r=E.get(i).clusterData.dir,e.warn(`Fixing dir`,E.get(i).clusterData.dir,r));let a=new _({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});e.warn(`Old graph before copy`,C(t)),M(i,t,a,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:a}),e.warn(`New graph after copy node: (`,i,`)`,C(a)),e.debug(`Old graph after copy`,C(t))}else e.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!E.get(i).externalConnections,` no parent: `,!t.parent(i),` children `,t.children(i)&&t.children(i).length>0,t.children(`D`),n),e.debug(E);r=t.nodes(),e.warn(`New list of nodes`,r);for(let i of r){let r=t.node(i);e.warn(` Now next level`,i,r),r?.clusterNode&&R(r.graph,n+1)}},`extractor`),z=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),B=t(e=>z(e,e.children()),`sortNodesByHierarchy`),V=t(async(n,c,l,f,h,g)=>{e.warn(`Graph in recursive render:XAX`,C(c),h);let _=c.graph().rankdir;e.trace(`Dir in recursive render - dir:`,_);let v=n.insert(`g`).attr(`class`,`root`);c.nodes()?e.info(`Recursive render XXX`,c.nodes()):e.info(`No nodes found for`,c),c.edges().length>0&&e.info(`Recursive edges`,c.edge(c.edges()[0]));let y=v.insert(`g`).attr(`class`,`clusters`),x=v.insert(`g`).attr(`class`,`edgePaths`),S=v.insert(`g`).attr(`class`,`edgeLabels`),w=v.insert(`g`).attr(`class`,`nodes`);await Promise.all(c.nodes().map(async function(t){let n=c.node(t);if(h!==void 0){let n=JSON.parse(JSON.stringify(h.clusterData));e.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,t,`
3
3
  data=`,n.height,`
4
4
  Parent cluster`,h.height),c.setNode(h.id,n),c.parent(t)||(e.trace(`Setting parent`,t,h.id),c.setParent(t,h.id,n))}if(e.info(`(Insert) Node XXX`+t+`: `+JSON.stringify(c.node(t))),n?.clusterNode){e.info(`Cluster identified XBX`,t,n.width,c.node(t));let{ranksep:r,nodesep:i}=c.graph();n.graph.setGraph({...n.graph.graph(),ranksep:r+25,nodesep:i});let a=await V(w,n.graph,l,f,c.node(t),g),o=a.elem;u(n,o),n.diff=a.diff||0,e.info(`New compound node after recursive render XAX`,t,`width`,n.width,`height`,n.height),s(o,n)}else c.children(t).length>0?(e.trace(`Cluster - the non recursive path XBX`,t,n.id,n,n.width,`Graph:`,c),e.trace(F(n.id,c)),E.set(n.id,{id:F(n.id,c),node:n})):(e.trace(`Node - the non recursive path XAX`,t,w,c.node(t),_),await i(w,c.node(t),{config:g,dir:_}))})),await t(async()=>{let t=c.edges().map(async function(t){let n=c.edge(t.v,t.w,t.name);e.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),e.info(`Edge `+t.v+` -> `+t.w+`: `,t,` `,JSON.stringify(c.edge(t))),e.info(`Fix`,E,`ids:`,t.v,t.w,`Translating: `,E.get(t.v),E.get(t.w)),await m(S,n)});await Promise.all(t)},`processEdges`)(),e.info(`Graph before layout:`,JSON.stringify(C(c))),e.info(`############################################# XXX`),e.info(`### Layout ### XXX`),e.info(`############################################# XXX`),b(c),e.info(`Graph after layout:`,JSON.stringify(C(c)));let T=0,{subGraphTitleTotalMargin:D}=r(g);return await Promise.all(B(c).map(async function(t){let n=c.node(t);if(e.info(`Position XBX => `+t+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=D,e.info(`A tainted cluster node XBX1`,t,n.id,n.width,n.height,n.x,n.y,c.parent(t)),E.get(n.id).node=n,a(n);else if(c.children(t).length>0){e.info(`A pure cluster node XBX1`,t,n.id,n.x,n.y,n.width,n.height,c.parent(t)),n.height+=D,c.node(n.parentId);let r=n?.padding/2||0,i=n?.labelBBox?.height||0,a=i-r||0;e.debug(`OffsetY`,a,`labelHeight`,i,`halfPadding`,r),await o(y,n),E.get(n.id).node=n}else{let t=c.node(n.parentId);n.y+=D/2,e.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,t,t?.offsetY,n),a(n)}})),c.edges().forEach(function(t){let n=c.edge(t);e.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(n),n),n.points.forEach(e=>e.y+=D/2),d(n,p(x,n,E,l,c.node(t.v),c.node(t.w),f))}),c.nodes().forEach(function(t){let n=c.node(t);e.info(t,n.type,n.diff),n.isGroup&&(T=n.diff)}),e.warn(`Returning from recursive render XAX`,v,T),{elem:v,diff:T}},`recursiveRender`),H=t(async(t,r)=>{let i=new _({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=r.select(`g`);f(a,t.markers,t.type,t.diagramId),c(),h(),l(),k(),t.nodes.forEach(e=>{i.setNode(e.id,{...e}),e.parentId&&i.setParent(e.id,e.parentId)}),e.debug(`Edges:`,t.edges),t.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,a=i.node(t);i.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),i.setParent(n,a.parentId),i.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),i.setParent(r,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e);o.label=``,o.arrowTypeEnd=`none`,o.endLabelLeft=``,o.endLabelRight=``,o.startLabelLeft=``,o.id=t+`-cyclic-special-1`,s.startLabelRight=``,s.startLabelLeft=``,s.endLabelLeft=``,s.endLabelRight=``,s.arrowTypeStart=`none`,s.arrowTypeEnd=`none`,s.id=t+`-cyclic-special-mid`,c.label=``,c.startLabelRight=``,c.startLabelLeft=``,c.arrowTypeStart=`none`,a.isGroup&&(o.fromCluster=t,c.toCluster=t),c.id=t+`-cyclic-special-2`,c.arrowTypeStart=`none`,i.setEdge(t,n,o,t+`-cyclic-special-0`),i.setEdge(n,r,s,t+`-cyclic-special-1`),i.setEdge(r,t,c,t+`-cyc<lic-special-2`)}else i.setEdge(e.start,e.end,{...e},e.id)}),e.warn(`Graph at first:`,JSON.stringify(C(i))),L(i),e.warn(`Graph after XAX:`,JSON.stringify(C(i)));let o=n();await V(a,i,t.type,t.diagramId,void 0,o)},`render`);export{H as render};
5
- //# sourceMappingURL=dagre-BM42HDAG-au4dCVgC.js.map
5
+ //# sourceMappingURL=dagre-BM42HDAG-DovnSGTF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dagre-BM42HDAG-au4dCVgC.js","names":["_.isUndefined","_.clone","_.map","graphlibJson.write","graphlib.Graph","graphlibJson2.write","graphlib2.Graph","getConfig"],"sources":["../../../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/clone.js","../../../../../node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/json.js","../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-BM42HDAG.mjs"],"sourcesContent":["import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n","import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\n/**\n * @import { NodeID, EdgeObj, GraphOptions } from './graph.js';\n */\n\nexport { write, read };\n\n/**\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n *\n * @typedef {object} GraphJSON\n * @property {Required<GraphOptions>} options - The options used to create the graph.\n * @property {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} nodes - The nodes in the graph.\n * @property {Array<EdgeObj & { value?: EdgeLabel }>} edges - The edges in the graph.\n * @property {GraphLabel} [value] - The graph's value, if any.\n */\n\n/**\n * Creates a JSON representation of the graph that can be serialized to a\n * string with\n * [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).\n * The graph can later be restored using {@link read}.\n *\n * @example\n *\n * ```js\n * var g = new graphlib.Graph();\n * g.setNode(\"a\", { label: \"node a\" });\n * g.setNode(\"b\", { label: \"node b\" });\n * g.setEdge(\"a\", \"b\", { label: \"edge a->b\" });\n * graphlib.json.write(g);\n * // Returns the object:\n * //\n * // {\n * // \"options\": {\n * // \"directed\": true,\n * // \"multigraph\": false,\n * // \"compound\": false\n * // },\n * // \"nodes\": [\n * // { \"v\": \"a\", \"value\": { \"label\": \"node a\" } },\n * // { \"v\": \"b\", \"value\": { \"label\": \"node b\" } }\n * // ],\n * // \"edges\": [\n * // { \"v\": \"a\", \"w\": \"b\", \"value\": { \"label\": \"edge a->b\" } }\n * // ]\n * // }\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {Graph<GraphLabel, NodeLabel, EdgeLabel>} g - The graph to serialize.\n * @returns {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} The JSON representation of the graph.\n */\nfunction write(g) {\n /** @type {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} */\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\n/**\n * @template NodeLabel - Label of a node.\n *\n * @param {Graph<unknown, NodeLabel, unknown>} g - The graph to serialize.\n * @returns {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} The nodes in the graph.\n */\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n /** @type {{ v: NodeID; value?: NodeLabel; parent?: NodeID }} */\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\n/**\n * @template EdgeLabel - Label of a node.\n *\n * @param {Graph<unknown, unknown, EdgeLabel>} g - The graph to serialize.\n * @returns {Array<EdgeObj & { value?: EdgeLabel }>} The edges in the graph.\n */\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n /** @type {EdgeObj & { value?: EdgeLabel }} */\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\n/**\n * Takes JSON as input and returns the graph representation.\n *\n * @example\n *\n * For example, if we have serialized the graph in {@link write}\n * to a string named `str`, we can restore it to a graph as follows:\n *\n * ```js\n * var g2 = graphlib.json.read(JSON.parse(str));\n * // or, in order to copy the graph\n * var g3 = graphlib.json.read(graphlib.json.write(g))\n *\n * g2.nodes();\n * // ['a', 'b']\n * g2.edges()\n * // [ { v: 'a', w: 'b' } ]\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} json - The JSON representation of the graph.\n * @returns {Graph<GraphLabel, NodeLabel, EdgeLabel>} The restored graph.\n */\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","import {\n clear as clear2,\n insertEdge,\n insertEdgeLabel,\n markers_default,\n positionEdgeLabel\n} from \"./chunk-KSCS5N6A.mjs\";\nimport \"./chunk-BSJP7CBP.mjs\";\nimport {\n clear,\n clear2 as clear3,\n insertCluster,\n insertNode,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-3OPIFGDE.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-L5ZTLDWV.mjs\";\nimport \"./chunk-NZK2D7GU.mjs\";\nimport \"./chunk-O5CBEL6O.mjs\";\nimport \"./chunk-5ZQYHXKU.mjs\";\nimport {\n getConfig2 as getConfig\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlibJson2 from \"dagre-d3-es/src/graphlib/json.js\";\nimport * as graphlib2 from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nimport * as graphlibJson from \"dagre-d3-es/src/graphlib/json.js\";\nvar clusterDb = /* @__PURE__ */ new Map();\nvar descendants = /* @__PURE__ */ new Map();\nvar parents = /* @__PURE__ */ new Map();\nvar clear4 = /* @__PURE__ */ __name(() => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n}, \"clear\");\nvar isDescendant = /* @__PURE__ */ __name((id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace(\"In isDescendant\", ancestorId, \" \", id, \" = \", ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n}, \"isDescendant\");\nvar edgeInCluster = /* @__PURE__ */ __name((edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info(\"Descendants of \", clusterId, \" is \", clusterDescendants);\n log.info(\"Edge is \", edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n if (!clusterDescendants) {\n log.debug(\"Tilt, \", clusterId, \",not in descendants\");\n return false;\n }\n return clusterDescendants.includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || clusterDescendants.includes(edge.w);\n}, \"edgeInCluster\");\nvar copy = /* @__PURE__ */ __name((clusterId, graph, newGraph, rootId) => {\n log.warn(\n \"Copying children of \",\n clusterId,\n \"root\",\n rootId,\n \"data\",\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n log.warn(\"Copying (nodes) clusterId\", clusterId, \"nodes\", nodes);\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info(\"cp \", node, \" to \", rootId, \" with parent \", clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn(\"Setting parent\", node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n if (clusterId !== rootId && node !== clusterId) {\n log.debug(\"Setting parent\", node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info(\"In copy \", clusterId, \"root\", rootId, \"data\", graph.node(clusterId), rootId);\n log.debug(\n \"Not Setting parent for node=\",\n node,\n \"cluster!==rootId\",\n clusterId !== rootId,\n \"node!==clusterId\",\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug(\"Copying Edges\", edges);\n edges.forEach((edge) => {\n log.info(\"Edge\", edge);\n const data2 = graph.edge(edge.v, edge.w, edge.name);\n log.info(\"Edge data\", data2, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info(\"Copying as \", edge.v, edge.w, data2, edge.name);\n newGraph.setEdge(edge.v, edge.w, data2, edge.name);\n log.info(\"newGraph edges \", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n \"Skipping copy of edge \",\n edge.v,\n \"-->\",\n edge.w,\n \" rootId: \",\n rootId,\n \" clusterId:\",\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug(\"Removing node\", node);\n graph.removeNode(node);\n });\n}, \"copy\");\nvar extractDescendants = /* @__PURE__ */ __name((id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n return res;\n}, \"extractDescendants\");\nvar findCommonEdges = /* @__PURE__ */ __name((graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n return result;\n}, \"findCommonEdges\");\nvar findNonClusterChild = /* @__PURE__ */ __name((id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace(\"Searching children of id \", id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n}, \"findNonClusterChild\");\nvar getAnchorId = /* @__PURE__ */ __name((id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n}, \"getAnchorId\");\nvar adjustClustersAndEdges = /* @__PURE__ */ __name((graph, depth) => {\n if (!graph || depth > 10) {\n log.debug(\"Opting out, no graph \");\n return;\n } else {\n log.debug(\"Opting in, graph \");\n }\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n \"Cluster identified\",\n id,\n \" Replacement id in edges: \",\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug(\"Cluster identified\", id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n if (d1 ^ d2) {\n log.warn(\"Edge: \", edge, \" leaves cluster \", id);\n log.warn(\"Descendants of XXX \", id, \": \", descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug(\"Not a cluster \", id, descendants);\n }\n });\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n let v = e.v;\n let w = e.w;\n log.warn(\n \"Fix XXX\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n \" --- \",\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn(\"Fixing and trying - removing XXX\", e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn(\"Fix Replacing with XXX\", v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn(\"Adjusted Graph\", graphlibJson.write(graph));\n extractor(graph, 0);\n log.trace(clusterDb);\n}, \"adjustClustersAndEdges\");\nvar extractor = /* @__PURE__ */ __name((graph, depth) => {\n log.warn(\"extractor - \", depth, graphlibJson.write(graph), graph.children(\"D\"));\n if (depth > 10) {\n log.error(\"Bailing out\");\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n if (!hasChildren) {\n log.debug(\"Done, no node has children\", graph.nodes());\n return;\n }\n log.debug(\"Nodes = \", nodes, depth);\n for (const node of nodes) {\n log.debug(\n \"Extracting node\",\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children(\"D\"),\n \" Depth \",\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug(\"Not a cluster\", node, depth);\n } else if (!clusterDb.get(node).externalConnections && graph.children(node) && graph.children(node).length > 0) {\n log.warn(\n \"Cluster without external connections, without a parent and with children\",\n node,\n depth\n );\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === \"TB\" ? \"LR\" : \"TB\";\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn(\"Fixing dir\", clusterDb.get(node).clusterData.dir, dir);\n }\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n log.warn(\"Old graph before copy\", graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph\n });\n log.warn(\"New graph after copy node: (\", node, \")\", graphlibJson.write(clusterGraph));\n log.debug(\"Old graph after copy\", graphlibJson.write(graph));\n } else {\n log.warn(\n \"Cluster ** \",\n node,\n \" **not meeting the criteria !externalConnections:\",\n !clusterDb.get(node).externalConnections,\n \" no parent: \",\n !graph.parent(node),\n \" children \",\n graph.children(node) && graph.children(node).length > 0,\n graph.children(\"D\"),\n depth\n );\n log.debug(clusterDb);\n }\n }\n nodes = graph.nodes();\n log.warn(\"New list of nodes\", nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(\" Now next level\", node, data);\n if (data?.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n}, \"extractor\");\nvar sorter = /* @__PURE__ */ __name((graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n return result;\n}, \"sorter\");\nvar sortNodesByHierarchy = /* @__PURE__ */ __name((graph) => sorter(graph, graph.children()), \"sortNodesByHierarchy\");\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nvar recursiveRender = /* @__PURE__ */ __name(async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.warn(\"Graph in recursive render:XAX\", graphlibJson2.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace(\"Dir in recursive render - dir:\", dir);\n const elem = _elem.insert(\"g\").attr(\"class\", \"root\");\n if (!graph.nodes()) {\n log.info(\"No nodes found for\", graph);\n } else {\n log.info(\"Recursive render XXX\", graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info(\"Recursive edges\", graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert(\"g\").attr(\"class\", \"clusters\");\n const edgePaths = elem.insert(\"g\").attr(\"class\", \"edgePaths\");\n const edgeLabels = elem.insert(\"g\").attr(\"class\", \"edgeLabels\");\n const nodes = elem.insert(\"g\").attr(\"class\", \"nodes\");\n await Promise.all(\n graph.nodes().map(async function(v) {\n const node = graph.node(v);\n if (parentCluster !== void 0) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n log.trace(\n \"Setting data for parent cluster XXX\\n Node.id = \",\n v,\n \"\\n data=\",\n data.height,\n \"\\nParent cluster\",\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace(\"Setting parent\", v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info(\"(Insert) Node XXX\" + v + \": \" + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n log.info(\"Cluster identified XBX\", v, node.width, graph.node(v));\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info(\n \"New compound node after recursive render XAX\",\n v,\n \"width\",\n // node,\n node.width,\n \"height\",\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n log.trace(\n \"Cluster - the non recursive path XBX\",\n v,\n node.id,\n node,\n node.width,\n \"Graph:\",\n graph\n );\n log.trace(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n } else {\n log.trace(\"Node - the non recursive path XAX\", v, nodes, graph.node(v), dir);\n await insertNode(nodes, graph.node(v), { config: siteConfig, dir });\n }\n }\n })\n );\n const processEdges = /* @__PURE__ */ __name(async () => {\n const edgePromises = graph.edges().map(async function(e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \", e, \" \", JSON.stringify(graph.edge(e)));\n log.info(\n \"Fix\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n await Promise.all(edgePromises);\n }, \"processEdges\");\n await processEdges();\n log.info(\"Graph before layout:\", JSON.stringify(graphlibJson2.write(graph)));\n log.info(\"############################################# XXX\");\n log.info(\"### Layout ### XXX\");\n log.info(\"############################################# XXX\");\n dagreLayout(graph);\n log.info(\"Graph after layout:\", JSON.stringify(graphlibJson2.write(graph)));\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function(v) {\n const node = graph.node(v);\n log.info(\n \"Position XBX => \" + v + \": (\" + node.x,\n \",\" + node.y,\n \") width: \",\n node.width,\n \" height: \",\n node.height\n );\n if (node?.clusterNode) {\n node.y += subGraphTitleTotalMargin;\n log.info(\n \"A tainted cluster node XBX1\",\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n if (graph.children(v).length > 0) {\n log.info(\n \"A pure cluster node XBX1\",\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug(\"OffsetY\", offsetY, \"labelHeight\", labelHeight, \"halfPadding\", halfPadding);\n await insertCluster(clusters, node);\n clusterDb.get(node.id).node = node;\n } else {\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n \"A regular node XBX1 - using the padding\",\n node.id,\n \"parent\",\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n \"offsetY\",\n node.offsetY,\n \"parent\",\n parent,\n parent?.offsetY,\n node\n );\n positionNode(node);\n }\n }\n })\n );\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(edge), edge);\n edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n graph.nodes().forEach(function(v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn(\"Returning from recursive render XAX\", elem, diff);\n return { elem, diff };\n}, \"recursiveRender\");\nvar render = /* @__PURE__ */ __name(async (data4Layout, svg) => {\n const graph = new graphlib2.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: data4Layout.direction,\n nodesep: data4Layout.config?.nodeSpacing || data4Layout.config?.flowchart?.nodeSpacing || data4Layout.nodeSpacing,\n ranksep: data4Layout.config?.rankSpacing || data4Layout.config?.flowchart?.rankSpacing || data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n const element = svg.select(\"g\");\n markers_default(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clear3();\n clear2();\n clear();\n clear4();\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n log.debug(\"Edges:\", data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n if (edge.start === edge.end) {\n const nodeId = edge.start;\n const specialId1 = nodeId + \"---\" + nodeId + \"---1\";\n const specialId2 = nodeId + \"---\" + nodeId + \"---2\";\n const node = graph.node(nodeId);\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n parentId: node.parentId,\n labelStyle: \"\",\n label: \"\",\n padding: 0,\n shape: \"labelRect\",\n // shape: 'rect',\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId1, node.parentId);\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n parentId: node.parentId,\n labelStyle: \"\",\n padding: 0,\n // shape: 'rect',\n shape: \"labelRect\",\n label: \"\",\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId2, node.parentId);\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = \"\";\n edge1.arrowTypeEnd = \"none\";\n edge1.endLabelLeft = \"\";\n edge1.endLabelRight = \"\";\n edge1.startLabelLeft = \"\";\n edge1.id = nodeId + \"-cyclic-special-1\";\n edgeMid.startLabelRight = \"\";\n edgeMid.startLabelLeft = \"\";\n edgeMid.endLabelLeft = \"\";\n edgeMid.endLabelRight = \"\";\n edgeMid.arrowTypeStart = \"none\";\n edgeMid.arrowTypeEnd = \"none\";\n edgeMid.id = nodeId + \"-cyclic-special-mid\";\n edge2.label = \"\";\n edge2.startLabelRight = \"\";\n edge2.startLabelLeft = \"\";\n edge2.arrowTypeStart = \"none\";\n if (node.isGroup) {\n edge1.fromCluster = nodeId;\n edge2.toCluster = nodeId;\n }\n edge2.id = nodeId + \"-cyclic-special-2\";\n edge2.arrowTypeStart = \"none\";\n graph.setEdge(nodeId, specialId1, edge1, nodeId + \"-cyclic-special-0\");\n graph.setEdge(specialId1, specialId2, edgeMid, nodeId + \"-cyclic-special-1\");\n graph.setEdge(specialId2, nodeId, edge2, nodeId + \"-cyc<lic-special-2\");\n } else {\n graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);\n }\n });\n log.warn(\"Graph at first:\", JSON.stringify(graphlibJson2.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn(\"Graph after XAX:\", JSON.stringify(graphlibJson2.write(graph)));\n const siteConfig = getConfig();\n await recursiveRender(\n element,\n graph,\n data4Layout.type,\n data4Layout.diagramId,\n void 0,\n siteConfig\n );\n}, \"render\");\nexport {\n render\n};\n"],"x_google_ignoreList":[0,1,2],"mappings":"8iBAGA,IAAI,EAAqB,EA4BzB,SAAS,EAAM,EAAO,CACpB,OAAO,EAAU,EAAO,EAAmB,CC2B7C,SAAS,EAAM,EAAG,CAEhB,IAAI,EAAO,CACT,QAAS,CACP,SAAU,EAAE,YAAY,CACxB,WAAY,EAAE,cAAc,CAC5B,SAAU,EAAE,YAAY,CACzB,CACD,MAAO,EAAW,EAAE,CACpB,MAAO,EAAW,EAAE,CACrB,CAID,OAHKA,EAAc,EAAE,OAAO,CAAC,GAC3B,EAAK,MAAQC,EAAQ,EAAE,OAAO,CAAC,EAE1B,EAST,SAAS,EAAW,EAAG,CACrB,OAAOC,EAAM,EAAE,OAAO,CAAE,SAAU,EAAG,CACnC,IAAI,EAAY,EAAE,KAAK,EAAE,CACrB,EAAS,EAAE,OAAO,EAAE,CAEpB,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,EAAS,oBACpB,EAAM,eAAiB,OACvB,EAAM,QAAQ,EAAQ,EAAY,EAAO,EAAS,oBAAoB,CACtE,EAAM,QAAQ,EAAY,EAAY,EAAS,EAAS,oBAAoB,CAC5E,EAAM,QAAQ,EAAY,EAAQ,EAAO,EAAS,qBAAqB,MAEvE,EAAM,QAAQ,EAAK,MAAO,EAAK,IAAK,CAAE,GAAG,EAAM,CAAE,EAAK,GAAG,EAE3D,CACF,EAAI,KAAK,kBAAmB,KAAK,UAAUD,EAAoB,EAAM,CAAC,CAAC,CACvE,EAAuB,EAAM,CAC7B,EAAI,KAAK,mBAAoB,KAAK,UAAUA,EAAoB,EAAM,CAAC,CAAC,CACxE,IAAM,EAAaE,GAAW,CAC9B,MAAM,EACJ,EACA,EACA,EAAY,KACZ,EAAY,UACZ,IAAK,GACL,EACD,EACA,SAAS"}
1
+ {"version":3,"file":"dagre-BM42HDAG-DovnSGTF.js","names":["_.isUndefined","_.clone","_.map","graphlibJson.write","graphlib.Graph","graphlibJson2.write","graphlib2.Graph","getConfig"],"sources":["../../../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/clone.js","../../../../../node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/json.js","../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-BM42HDAG.mjs"],"sourcesContent":["import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n","import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\n/**\n * @import { NodeID, EdgeObj, GraphOptions } from './graph.js';\n */\n\nexport { write, read };\n\n/**\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n *\n * @typedef {object} GraphJSON\n * @property {Required<GraphOptions>} options - The options used to create the graph.\n * @property {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} nodes - The nodes in the graph.\n * @property {Array<EdgeObj & { value?: EdgeLabel }>} edges - The edges in the graph.\n * @property {GraphLabel} [value] - The graph's value, if any.\n */\n\n/**\n * Creates a JSON representation of the graph that can be serialized to a\n * string with\n * [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).\n * The graph can later be restored using {@link read}.\n *\n * @example\n *\n * ```js\n * var g = new graphlib.Graph();\n * g.setNode(\"a\", { label: \"node a\" });\n * g.setNode(\"b\", { label: \"node b\" });\n * g.setEdge(\"a\", \"b\", { label: \"edge a->b\" });\n * graphlib.json.write(g);\n * // Returns the object:\n * //\n * // {\n * // \"options\": {\n * // \"directed\": true,\n * // \"multigraph\": false,\n * // \"compound\": false\n * // },\n * // \"nodes\": [\n * // { \"v\": \"a\", \"value\": { \"label\": \"node a\" } },\n * // { \"v\": \"b\", \"value\": { \"label\": \"node b\" } }\n * // ],\n * // \"edges\": [\n * // { \"v\": \"a\", \"w\": \"b\", \"value\": { \"label\": \"edge a->b\" } }\n * // ]\n * // }\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {Graph<GraphLabel, NodeLabel, EdgeLabel>} g - The graph to serialize.\n * @returns {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} The JSON representation of the graph.\n */\nfunction write(g) {\n /** @type {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} */\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\n/**\n * @template NodeLabel - Label of a node.\n *\n * @param {Graph<unknown, NodeLabel, unknown>} g - The graph to serialize.\n * @returns {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} The nodes in the graph.\n */\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n /** @type {{ v: NodeID; value?: NodeLabel; parent?: NodeID }} */\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\n/**\n * @template EdgeLabel - Label of a node.\n *\n * @param {Graph<unknown, unknown, EdgeLabel>} g - The graph to serialize.\n * @returns {Array<EdgeObj & { value?: EdgeLabel }>} The edges in the graph.\n */\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n /** @type {EdgeObj & { value?: EdgeLabel }} */\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\n/**\n * Takes JSON as input and returns the graph representation.\n *\n * @example\n *\n * For example, if we have serialized the graph in {@link write}\n * to a string named `str`, we can restore it to a graph as follows:\n *\n * ```js\n * var g2 = graphlib.json.read(JSON.parse(str));\n * // or, in order to copy the graph\n * var g3 = graphlib.json.read(graphlib.json.write(g))\n *\n * g2.nodes();\n * // ['a', 'b']\n * g2.edges()\n * // [ { v: 'a', w: 'b' } ]\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} json - The JSON representation of the graph.\n * @returns {Graph<GraphLabel, NodeLabel, EdgeLabel>} The restored graph.\n */\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","import {\n clear as clear2,\n insertEdge,\n insertEdgeLabel,\n markers_default,\n positionEdgeLabel\n} from \"./chunk-KSCS5N6A.mjs\";\nimport \"./chunk-BSJP7CBP.mjs\";\nimport {\n clear,\n clear2 as clear3,\n insertCluster,\n insertNode,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-3OPIFGDE.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-L5ZTLDWV.mjs\";\nimport \"./chunk-NZK2D7GU.mjs\";\nimport \"./chunk-O5CBEL6O.mjs\";\nimport \"./chunk-5ZQYHXKU.mjs\";\nimport {\n getConfig2 as getConfig\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlibJson2 from \"dagre-d3-es/src/graphlib/json.js\";\nimport * as graphlib2 from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nimport * as graphlibJson from \"dagre-d3-es/src/graphlib/json.js\";\nvar clusterDb = /* @__PURE__ */ new Map();\nvar descendants = /* @__PURE__ */ new Map();\nvar parents = /* @__PURE__ */ new Map();\nvar clear4 = /* @__PURE__ */ __name(() => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n}, \"clear\");\nvar isDescendant = /* @__PURE__ */ __name((id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace(\"In isDescendant\", ancestorId, \" \", id, \" = \", ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n}, \"isDescendant\");\nvar edgeInCluster = /* @__PURE__ */ __name((edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info(\"Descendants of \", clusterId, \" is \", clusterDescendants);\n log.info(\"Edge is \", edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n if (!clusterDescendants) {\n log.debug(\"Tilt, \", clusterId, \",not in descendants\");\n return false;\n }\n return clusterDescendants.includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || clusterDescendants.includes(edge.w);\n}, \"edgeInCluster\");\nvar copy = /* @__PURE__ */ __name((clusterId, graph, newGraph, rootId) => {\n log.warn(\n \"Copying children of \",\n clusterId,\n \"root\",\n rootId,\n \"data\",\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n log.warn(\"Copying (nodes) clusterId\", clusterId, \"nodes\", nodes);\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info(\"cp \", node, \" to \", rootId, \" with parent \", clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn(\"Setting parent\", node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n if (clusterId !== rootId && node !== clusterId) {\n log.debug(\"Setting parent\", node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info(\"In copy \", clusterId, \"root\", rootId, \"data\", graph.node(clusterId), rootId);\n log.debug(\n \"Not Setting parent for node=\",\n node,\n \"cluster!==rootId\",\n clusterId !== rootId,\n \"node!==clusterId\",\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug(\"Copying Edges\", edges);\n edges.forEach((edge) => {\n log.info(\"Edge\", edge);\n const data2 = graph.edge(edge.v, edge.w, edge.name);\n log.info(\"Edge data\", data2, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info(\"Copying as \", edge.v, edge.w, data2, edge.name);\n newGraph.setEdge(edge.v, edge.w, data2, edge.name);\n log.info(\"newGraph edges \", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n \"Skipping copy of edge \",\n edge.v,\n \"-->\",\n edge.w,\n \" rootId: \",\n rootId,\n \" clusterId:\",\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug(\"Removing node\", node);\n graph.removeNode(node);\n });\n}, \"copy\");\nvar extractDescendants = /* @__PURE__ */ __name((id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n return res;\n}, \"extractDescendants\");\nvar findCommonEdges = /* @__PURE__ */ __name((graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n return result;\n}, \"findCommonEdges\");\nvar findNonClusterChild = /* @__PURE__ */ __name((id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace(\"Searching children of id \", id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n}, \"findNonClusterChild\");\nvar getAnchorId = /* @__PURE__ */ __name((id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n}, \"getAnchorId\");\nvar adjustClustersAndEdges = /* @__PURE__ */ __name((graph, depth) => {\n if (!graph || depth > 10) {\n log.debug(\"Opting out, no graph \");\n return;\n } else {\n log.debug(\"Opting in, graph \");\n }\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n \"Cluster identified\",\n id,\n \" Replacement id in edges: \",\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug(\"Cluster identified\", id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n if (d1 ^ d2) {\n log.warn(\"Edge: \", edge, \" leaves cluster \", id);\n log.warn(\"Descendants of XXX \", id, \": \", descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug(\"Not a cluster \", id, descendants);\n }\n });\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n let v = e.v;\n let w = e.w;\n log.warn(\n \"Fix XXX\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n \" --- \",\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn(\"Fixing and trying - removing XXX\", e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn(\"Fix Replacing with XXX\", v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn(\"Adjusted Graph\", graphlibJson.write(graph));\n extractor(graph, 0);\n log.trace(clusterDb);\n}, \"adjustClustersAndEdges\");\nvar extractor = /* @__PURE__ */ __name((graph, depth) => {\n log.warn(\"extractor - \", depth, graphlibJson.write(graph), graph.children(\"D\"));\n if (depth > 10) {\n log.error(\"Bailing out\");\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n if (!hasChildren) {\n log.debug(\"Done, no node has children\", graph.nodes());\n return;\n }\n log.debug(\"Nodes = \", nodes, depth);\n for (const node of nodes) {\n log.debug(\n \"Extracting node\",\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children(\"D\"),\n \" Depth \",\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug(\"Not a cluster\", node, depth);\n } else if (!clusterDb.get(node).externalConnections && graph.children(node) && graph.children(node).length > 0) {\n log.warn(\n \"Cluster without external connections, without a parent and with children\",\n node,\n depth\n );\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === \"TB\" ? \"LR\" : \"TB\";\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn(\"Fixing dir\", clusterDb.get(node).clusterData.dir, dir);\n }\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n log.warn(\"Old graph before copy\", graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph\n });\n log.warn(\"New graph after copy node: (\", node, \")\", graphlibJson.write(clusterGraph));\n log.debug(\"Old graph after copy\", graphlibJson.write(graph));\n } else {\n log.warn(\n \"Cluster ** \",\n node,\n \" **not meeting the criteria !externalConnections:\",\n !clusterDb.get(node).externalConnections,\n \" no parent: \",\n !graph.parent(node),\n \" children \",\n graph.children(node) && graph.children(node).length > 0,\n graph.children(\"D\"),\n depth\n );\n log.debug(clusterDb);\n }\n }\n nodes = graph.nodes();\n log.warn(\"New list of nodes\", nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(\" Now next level\", node, data);\n if (data?.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n}, \"extractor\");\nvar sorter = /* @__PURE__ */ __name((graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n return result;\n}, \"sorter\");\nvar sortNodesByHierarchy = /* @__PURE__ */ __name((graph) => sorter(graph, graph.children()), \"sortNodesByHierarchy\");\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nvar recursiveRender = /* @__PURE__ */ __name(async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.warn(\"Graph in recursive render:XAX\", graphlibJson2.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace(\"Dir in recursive render - dir:\", dir);\n const elem = _elem.insert(\"g\").attr(\"class\", \"root\");\n if (!graph.nodes()) {\n log.info(\"No nodes found for\", graph);\n } else {\n log.info(\"Recursive render XXX\", graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info(\"Recursive edges\", graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert(\"g\").attr(\"class\", \"clusters\");\n const edgePaths = elem.insert(\"g\").attr(\"class\", \"edgePaths\");\n const edgeLabels = elem.insert(\"g\").attr(\"class\", \"edgeLabels\");\n const nodes = elem.insert(\"g\").attr(\"class\", \"nodes\");\n await Promise.all(\n graph.nodes().map(async function(v) {\n const node = graph.node(v);\n if (parentCluster !== void 0) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n log.trace(\n \"Setting data for parent cluster XXX\\n Node.id = \",\n v,\n \"\\n data=\",\n data.height,\n \"\\nParent cluster\",\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace(\"Setting parent\", v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info(\"(Insert) Node XXX\" + v + \": \" + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n log.info(\"Cluster identified XBX\", v, node.width, graph.node(v));\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info(\n \"New compound node after recursive render XAX\",\n v,\n \"width\",\n // node,\n node.width,\n \"height\",\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n log.trace(\n \"Cluster - the non recursive path XBX\",\n v,\n node.id,\n node,\n node.width,\n \"Graph:\",\n graph\n );\n log.trace(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n } else {\n log.trace(\"Node - the non recursive path XAX\", v, nodes, graph.node(v), dir);\n await insertNode(nodes, graph.node(v), { config: siteConfig, dir });\n }\n }\n })\n );\n const processEdges = /* @__PURE__ */ __name(async () => {\n const edgePromises = graph.edges().map(async function(e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \", e, \" \", JSON.stringify(graph.edge(e)));\n log.info(\n \"Fix\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n await Promise.all(edgePromises);\n }, \"processEdges\");\n await processEdges();\n log.info(\"Graph before layout:\", JSON.stringify(graphlibJson2.write(graph)));\n log.info(\"############################################# XXX\");\n log.info(\"### Layout ### XXX\");\n log.info(\"############################################# XXX\");\n dagreLayout(graph);\n log.info(\"Graph after layout:\", JSON.stringify(graphlibJson2.write(graph)));\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function(v) {\n const node = graph.node(v);\n log.info(\n \"Position XBX => \" + v + \": (\" + node.x,\n \",\" + node.y,\n \") width: \",\n node.width,\n \" height: \",\n node.height\n );\n if (node?.clusterNode) {\n node.y += subGraphTitleTotalMargin;\n log.info(\n \"A tainted cluster node XBX1\",\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n if (graph.children(v).length > 0) {\n log.info(\n \"A pure cluster node XBX1\",\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug(\"OffsetY\", offsetY, \"labelHeight\", labelHeight, \"halfPadding\", halfPadding);\n await insertCluster(clusters, node);\n clusterDb.get(node.id).node = node;\n } else {\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n \"A regular node XBX1 - using the padding\",\n node.id,\n \"parent\",\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n \"offsetY\",\n node.offsetY,\n \"parent\",\n parent,\n parent?.offsetY,\n node\n );\n positionNode(node);\n }\n }\n })\n );\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(edge), edge);\n edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n graph.nodes().forEach(function(v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn(\"Returning from recursive render XAX\", elem, diff);\n return { elem, diff };\n}, \"recursiveRender\");\nvar render = /* @__PURE__ */ __name(async (data4Layout, svg) => {\n const graph = new graphlib2.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: data4Layout.direction,\n nodesep: data4Layout.config?.nodeSpacing || data4Layout.config?.flowchart?.nodeSpacing || data4Layout.nodeSpacing,\n ranksep: data4Layout.config?.rankSpacing || data4Layout.config?.flowchart?.rankSpacing || data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n const element = svg.select(\"g\");\n markers_default(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clear3();\n clear2();\n clear();\n clear4();\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n log.debug(\"Edges:\", data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n if (edge.start === edge.end) {\n const nodeId = edge.start;\n const specialId1 = nodeId + \"---\" + nodeId + \"---1\";\n const specialId2 = nodeId + \"---\" + nodeId + \"---2\";\n const node = graph.node(nodeId);\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n parentId: node.parentId,\n labelStyle: \"\",\n label: \"\",\n padding: 0,\n shape: \"labelRect\",\n // shape: 'rect',\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId1, node.parentId);\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n parentId: node.parentId,\n labelStyle: \"\",\n padding: 0,\n // shape: 'rect',\n shape: \"labelRect\",\n label: \"\",\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId2, node.parentId);\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = \"\";\n edge1.arrowTypeEnd = \"none\";\n edge1.endLabelLeft = \"\";\n edge1.endLabelRight = \"\";\n edge1.startLabelLeft = \"\";\n edge1.id = nodeId + \"-cyclic-special-1\";\n edgeMid.startLabelRight = \"\";\n edgeMid.startLabelLeft = \"\";\n edgeMid.endLabelLeft = \"\";\n edgeMid.endLabelRight = \"\";\n edgeMid.arrowTypeStart = \"none\";\n edgeMid.arrowTypeEnd = \"none\";\n edgeMid.id = nodeId + \"-cyclic-special-mid\";\n edge2.label = \"\";\n edge2.startLabelRight = \"\";\n edge2.startLabelLeft = \"\";\n edge2.arrowTypeStart = \"none\";\n if (node.isGroup) {\n edge1.fromCluster = nodeId;\n edge2.toCluster = nodeId;\n }\n edge2.id = nodeId + \"-cyclic-special-2\";\n edge2.arrowTypeStart = \"none\";\n graph.setEdge(nodeId, specialId1, edge1, nodeId + \"-cyclic-special-0\");\n graph.setEdge(specialId1, specialId2, edgeMid, nodeId + \"-cyclic-special-1\");\n graph.setEdge(specialId2, nodeId, edge2, nodeId + \"-cyc<lic-special-2\");\n } else {\n graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);\n }\n });\n log.warn(\"Graph at first:\", JSON.stringify(graphlibJson2.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn(\"Graph after XAX:\", JSON.stringify(graphlibJson2.write(graph)));\n const siteConfig = getConfig();\n await recursiveRender(\n element,\n graph,\n data4Layout.type,\n data4Layout.diagramId,\n void 0,\n siteConfig\n );\n}, \"render\");\nexport {\n render\n};\n"],"x_google_ignoreList":[0,1,2],"mappings":"8iBAGA,IAAI,EAAqB,EA4BzB,SAAS,EAAM,EAAO,CACpB,OAAO,EAAU,EAAO,EAAmB,CC2B7C,SAAS,EAAM,EAAG,CAEhB,IAAI,EAAO,CACT,QAAS,CACP,SAAU,EAAE,YAAY,CACxB,WAAY,EAAE,cAAc,CAC5B,SAAU,EAAE,YAAY,CACzB,CACD,MAAO,EAAW,EAAE,CACpB,MAAO,EAAW,EAAE,CACrB,CAID,OAHKA,EAAc,EAAE,OAAO,CAAC,GAC3B,EAAK,MAAQC,EAAQ,EAAE,OAAO,CAAC,EAE1B,EAST,SAAS,EAAW,EAAG,CACrB,OAAOC,EAAM,EAAE,OAAO,CAAE,SAAU,EAAG,CACnC,IAAI,EAAY,EAAE,KAAK,EAAE,CACrB,EAAS,EAAE,OAAO,EAAE,CAEpB,EAAO,CAAK,IAAG,CAOnB,OANKF,EAAc,EAAU,GAC3B,EAAK,MAAQ,GAEVA,EAAc,EAAO,GACxB,EAAK,OAAS,GAET,GACP,CASJ,SAAS,EAAW,EAAG,CACrB,OAAOE,EAAM,EAAE,OAAO,CAAE,SAAU,EA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AAqB,MAEvE,EAAM,QAAQ,EAAK,MAAO,EAAK,IAAK,CAAE,GAAG,EAAM,CAAE,EAAK,GAAG,EAE3D,CACF,EAAI,KAAK,kBAAmB,KAAK,UAAUD,EAAoB,EAAM,CAAC,CAAC,CACvE,EAAuB,EAAM,CAC7B,EAAI,KAAK,mBAAoB,KAAK,UAAUA,EAAoB,EAAM,CAAC,CAAC,CACxE,IAAM,EAAaE,GAAW,CAC9B,MAAM,EACJ,EACA,EACA,EAAY,KACZ,EAAY,UACZ,IAAK,GACL,EACD,EACA,SAAS"}
@@ -1,4 +1,4 @@
1
- import{g as e,h as t}from"./src-DoMhBUqV.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{i as p}from"./chunk-5ZQYHXKU-B_3UEJ_q.js";import{a as m}from"./index-D5tmHkO_.js";import{t as h}from"./chunk-4BX2VUAB-BqYEJTr3.js";import{t as g}from"./mermaid-parser.core-BO_-QleW.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v={axes:[],curves:[],options:_},y=structuredClone(v),b=l.radar,x=t(()=>p({...b,...s().radar}),`getConfig`),S=t(()=>y.axes,`getAxes`),C=t(()=>y.curves,`getCurves`),w=t(()=>y.options,`getOptions`),T=t(e=>{y.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),E=t(e=>{y.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:D(e.entries)}))},`setCurves`),D=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=S();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),O={getAxes:S,getCurves:C,getOptions:w,setAxes:T,setCurves:E,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});y.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule}},`setOptions`),getConfig:x,clear:t(()=>{o(),y=structuredClone(v)},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},k=t(e=>{h(e,O);let{axes:t,curves:n,options:r}=e;O.setAxes(t),O.setCurves(n),O.setOptions(r)},`populate`),A={parse:t(async t=>{let n=await g(`radar`,t);e.debug(n),k(n)},`parse`)},j=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=M(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;N(u,a,p,s.ticks,s.graticule),P(u,a,p,c),F(u,a,o,f,d,s.graticule,c),R(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),M=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return c(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),N=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),P=t((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2;e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*Math.cos(s)).attr(`y2`,n*r.axisScaleFactor*Math.sin(s)).attr(`class`,`radarAxisLine`),e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*Math.cos(s)).attr(`y`,n*r.axisLabelFactor*Math.sin(s)).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function F(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=I(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,L(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(F,`drawCurves`);function I(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(I,`relativeRadius`);function L(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}t(L,`closedRoundCurve`);function R(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(R,`drawLegend`);var z={draw:j},B=t((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
1
+ import{g as e,h as t}from"./src-DoMhBUqV.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{i as p}from"./chunk-5ZQYHXKU-CCVDVWrS.js";import{a as m}from"./index-B1CSiQFH.js";import{t as h}from"./chunk-4BX2VUAB-BqYEJTr3.js";import{t as g}from"./mermaid-parser.core-BO_-QleW.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v={axes:[],curves:[],options:_},y=structuredClone(v),b=l.radar,x=t(()=>p({...b,...s().radar}),`getConfig`),S=t(()=>y.axes,`getAxes`),C=t(()=>y.curves,`getCurves`),w=t(()=>y.options,`getOptions`),T=t(e=>{y.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),E=t(e=>{y.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:D(e.entries)}))},`setCurves`),D=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=S();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),O={getAxes:S,getCurves:C,getOptions:w,setAxes:T,setCurves:E,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});y.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule}},`setOptions`),getConfig:x,clear:t(()=>{o(),y=structuredClone(v)},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},k=t(e=>{h(e,O);let{axes:t,curves:n,options:r}=e;O.setAxes(t),O.setCurves(n),O.setOptions(r)},`populate`),A={parse:t(async t=>{let n=await g(`radar`,t);e.debug(n),k(n)},`parse`)},j=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=M(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;N(u,a,p,s.ticks,s.graticule),P(u,a,p,c),F(u,a,o,f,d,s.graticule,c),R(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),M=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return c(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),N=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),P=t((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2;e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*Math.cos(s)).attr(`y2`,n*r.axisScaleFactor*Math.sin(s)).attr(`class`,`radarAxisLine`),e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*Math.cos(s)).attr(`y`,n*r.axisLabelFactor*Math.sin(s)).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function F(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=I(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,L(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(F,`drawCurves`);function I(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(I,`relativeRadius`);function L(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}t(L,`closedRoundCurve`);function R(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(R,`drawLegend`);var z={draw:j},B=t((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
2
2
  .radarCurve-${r} {
3
3
  color: ${i};
4
4
  fill: ${i};
@@ -41,4 +41,4 @@ import{g as e,h as t}from"./src-DoMhBUqV.js";import{D as n,H as r,K as i,U as a,
41
41
  }
42
42
  ${B(t,n)}
43
43
  `},`styles`)};export{H as diagram};
44
- //# sourceMappingURL=diagram-2AECGRRQ-rJMnDhBW.js.map
44
+ //# sourceMappingURL=diagram-2AECGRRQ-DL9VAGtd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagram-2AECGRRQ-rJMnDhBW.js","names":["getThemeVariables"],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-2AECGRRQ.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-WU5MYG2G.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getDiagramTitle,\n getThemeVariables,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/radar/db.ts\nvar defaultOptions = {\n showLegend: true,\n ticks: 5,\n max: null,\n min: 0,\n graticule: \"circle\"\n};\nvar defaultRadarData = {\n axes: [],\n curves: [],\n options: defaultOptions\n};\nvar data = structuredClone(defaultRadarData);\nvar DEFAULT_RADAR_CONFIG = defaultConfig_default.radar;\nvar getConfig2 = /* @__PURE__ */ __name(() => {\n const config = cleanAndMerge({\n ...DEFAULT_RADAR_CONFIG,\n ...getConfig().radar\n });\n return config;\n}, \"getConfig\");\nvar getAxes = /* @__PURE__ */ __name(() => data.axes, \"getAxes\");\nvar getCurves = /* @__PURE__ */ __name(() => data.curves, \"getCurves\");\nvar getOptions = /* @__PURE__ */ __name(() => data.options, \"getOptions\");\nvar setAxes = /* @__PURE__ */ __name((axes) => {\n data.axes = axes.map((axis) => {\n return {\n name: axis.name,\n label: axis.label ?? axis.name\n };\n });\n}, \"setAxes\");\nvar setCurves = /* @__PURE__ */ __name((curves) => {\n data.curves = curves.map((curve) => {\n return {\n name: curve.name,\n label: curve.label ?? curve.name,\n entries: computeCurveEntries(curve.entries)\n };\n });\n}, \"setCurves\");\nvar computeCurveEntries = /* @__PURE__ */ __name((entries) => {\n if (entries[0].axis == void 0) {\n return entries.map((entry) => entry.value);\n }\n const axes = getAxes();\n if (axes.length === 0) {\n throw new Error(\"Axes must be populated before curves for reference entries\");\n }\n return axes.map((axis) => {\n const entry = entries.find((entry2) => entry2.axis?.$refText === axis.name);\n if (entry === void 0) {\n throw new Error(\"Missing entry for axis \" + axis.label);\n }\n return entry.value;\n });\n}, \"computeCurveEntries\");\nvar setOptions = /* @__PURE__ */ __name((options) => {\n const optionMap = options.reduce(\n (acc, option) => {\n acc[option.name] = option;\n return acc;\n },\n {}\n );\n data.options = {\n showLegend: optionMap.showLegend?.value ?? defaultOptions.showLegend,\n ticks: optionMap.ticks?.value ?? defaultOptions.ticks,\n max: optionMap.max?.value ?? defaultOptions.max,\n min: optionMap.min?.value ?? defaultOptions.min,\n graticule: optionMap.graticule?.value ?? defaultOptions.graticule\n };\n}, \"setOptions\");\nvar clear2 = /* @__PURE__ */ __name(() => {\n clear();\n data = structuredClone(defaultRadarData);\n}, \"clear\");\nvar db = {\n getAxes,\n getCurves,\n getOptions,\n setAxes,\n setCurves,\n setOptions,\n getConfig: getConfig2,\n clear: clear2,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription\n};\n\n// src/diagrams/radar/parser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar populate = /* @__PURE__ */ __name((ast) => {\n populateCommonDb(ast, db);\n const { axes, curves, options } = ast;\n db.setAxes(axes);\n db.setCurves(curves);\n db.setOptions(options);\n}, \"populate\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"radar\", input);\n log.debug(ast);\n populate(ast);\n }, \"parse\")\n};\n\n// src/diagrams/radar/renderer.ts\nvar draw = /* @__PURE__ */ __name((_text, id, _version, diagram2) => {\n const db2 = diagram2.db;\n const axes = db2.getAxes();\n const curves = db2.getCurves();\n const options = db2.getOptions();\n const config = db2.getConfig();\n const title = db2.getDiagramTitle();\n const svg = selectSvgElement(id);\n const g = drawFrame(svg, config);\n const maxValue = options.max ?? Math.max(...curves.map((curve) => Math.max(...curve.entries)));\n const minValue = options.min;\n const radius = Math.min(config.width, config.height) / 2;\n drawGraticule(g, axes, radius, options.ticks, options.graticule);\n drawAxes(g, axes, radius, config);\n drawCurves(g, axes, curves, minValue, maxValue, options.graticule, config);\n drawLegend(g, curves, options.showLegend, config);\n g.append(\"text\").attr(\"class\", \"radarTitle\").text(title).attr(\"x\", 0).attr(\"y\", -config.height / 2 - config.marginTop);\n}, \"draw\");\nvar drawFrame = /* @__PURE__ */ __name((svg, config) => {\n const totalWidth = config.width + config.marginLeft + config.marginRight;\n const totalHeight = config.height + config.marginTop + config.marginBottom;\n const center = {\n x: config.marginLeft + config.width / 2,\n y: config.marginTop + config.height / 2\n };\n configureSvgSize(svg, totalHeight, totalWidth, config.useMaxWidth ?? true);\n svg.attr(\"viewBox\", `0 0 ${totalWidth} ${totalHeight}`);\n return svg.append(\"g\").attr(\"transform\", `translate(${center.x}, ${center.y})`);\n}, \"drawFrame\");\nvar drawGraticule = /* @__PURE__ */ __name((g, axes, radius, ticks, graticule) => {\n if (graticule === \"circle\") {\n for (let i = 0; i < ticks; i++) {\n const r = radius * (i + 1) / ticks;\n g.append(\"circle\").attr(\"r\", r).attr(\"class\", \"radarGraticule\");\n }\n } else if (graticule === \"polygon\") {\n const numAxes = axes.length;\n for (let i = 0; i < ticks; i++) {\n const r = radius * (i + 1) / ticks;\n const points = axes.map((_, j) => {\n const angle = 2 * j * Math.PI / numAxes - Math.PI / 2;\n const x = r * Math.cos(angle);\n const y = r * Math.sin(angle);\n return `${x},${y}`;\n }).join(\" \");\n g.append(\"polygon\").attr(\"points\", points).attr(\"class\", \"radarGraticule\");\n }\n }\n}, \"drawGraticule\");\nvar drawAxes = /* @__PURE__ */ __name((g, axes, radius, config) => {\n const numAxes = axes.length;\n for (let i = 0; i < numAxes; i++) {\n const label = axes[i].label;\n const angle = 2 * i * Math.PI / numAxes - Math.PI / 2;\n g.append(\"line\").attr(\"x1\", 0).attr(\"y1\", 0).attr(\"x2\", radius * config.axisScaleFactor * Math.cos(angle)).attr(\"y2\", radius * config.axisScaleFactor * Math.sin(angle)).attr(\"class\", \"radarAxisLine\");\n g.append(\"text\").text(label).attr(\"x\", radius * config.axisLabelFactor * Math.cos(angle)).attr(\"y\", radius * config.axisLabelFactor * Math.sin(angle)).attr(\"class\", \"radarAxisLabel\");\n }\n}, \"drawAxes\");\nfunction drawCurves(g, axes, curves, minValue, maxValue, graticule, config) {\n const numAxes = axes.length;\n const radius = Math.min(config.width, config.height) / 2;\n curves.forEach((curve, index) => {\n if (curve.entries.length !== numAxes) {\n return;\n }\n const points = curve.entries.map((entry, i) => {\n const angle = 2 * Math.PI * i / numAxes - Math.PI / 2;\n const r = relativeRadius(entry, minValue, maxValue, radius);\n const x = r * Math.cos(angle);\n const y = r * Math.sin(angle);\n return { x, y };\n });\n if (graticule === \"circle\") {\n g.append(\"path\").attr(\"d\", closedRoundCurve(points, config.curveTension)).attr(\"class\", `radarCurve-${index}`);\n } else if (graticule === \"polygon\") {\n g.append(\"polygon\").attr(\"points\", points.map((p) => `${p.x},${p.y}`).join(\" \")).attr(\"class\", `radarCurve-${index}`);\n }\n });\n}\n__name(drawCurves, \"drawCurves\");\nfunction relativeRadius(value, minValue, maxValue, radius) {\n const clippedValue = Math.min(Math.max(value, minValue), maxValue);\n return radius * (clippedValue - minValue) / (maxValue - minValue);\n}\n__name(relativeRadius, \"relativeRadius\");\nfunction closedRoundCurve(points, tension) {\n const numPoints = points.length;\n let d = `M${points[0].x},${points[0].y}`;\n for (let i = 0; i < numPoints; i++) {\n const p0 = points[(i - 1 + numPoints) % numPoints];\n const p1 = points[i];\n const p2 = points[(i + 1) % numPoints];\n const p3 = points[(i + 2) % numPoints];\n const cp1 = {\n x: p1.x + (p2.x - p0.x) * tension,\n y: p1.y + (p2.y - p0.y) * tension\n };\n const cp2 = {\n x: p2.x - (p3.x - p1.x) * tension,\n y: p2.y - (p3.y - p1.y) * tension\n };\n d += ` C${cp1.x},${cp1.y} ${cp2.x},${cp2.y} ${p2.x},${p2.y}`;\n }\n return `${d} Z`;\n}\n__name(closedRoundCurve, \"closedRoundCurve\");\nfunction drawLegend(g, curves, showLegend, config) {\n if (!showLegend) {\n return;\n }\n const legendX = (config.width / 2 + config.marginRight) * 3 / 4;\n const legendY = -(config.height / 2 + config.marginTop) * 3 / 4;\n const lineHeight = 20;\n curves.forEach((curve, index) => {\n const itemGroup = g.append(\"g\").attr(\"transform\", `translate(${legendX}, ${legendY + index * lineHeight})`);\n itemGroup.append(\"rect\").attr(\"width\", 12).attr(\"height\", 12).attr(\"class\", `radarLegendBox-${index}`);\n itemGroup.append(\"text\").attr(\"x\", 16).attr(\"y\", 0).attr(\"class\", \"radarLegendText\").text(curve.label);\n });\n}\n__name(drawLegend, \"drawLegend\");\nvar renderer = { draw };\n\n// src/diagrams/radar/styles.ts\nvar genIndexStyles = /* @__PURE__ */ __name((themeVariables, radarOptions) => {\n let sections = \"\";\n for (let i = 0; i < themeVariables.THEME_COLOR_LIMIT; i++) {\n const indexColor = themeVariables[`cScale${i}`];\n sections += `\n\t\t.radarCurve-${i} {\n\t\t\tcolor: ${indexColor};\n\t\t\tfill: ${indexColor};\n\t\t\tfill-opacity: ${radarOptions.curveOpacity};\n\t\t\tstroke: ${indexColor};\n\t\t\tstroke-width: ${radarOptions.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${i} {\n\t\t\tfill: ${indexColor};\n\t\t\tfill-opacity: ${radarOptions.curveOpacity};\n\t\t\tstroke: ${indexColor};\n\t\t}\n\t\t`;\n }\n return sections;\n}, \"genIndexStyles\");\nvar buildRadarStyleOptions = /* @__PURE__ */ __name((radar) => {\n const defaultThemeVariables = getThemeVariables();\n const currentConfig = getConfig();\n const themeVariables = cleanAndMerge(defaultThemeVariables, currentConfig.themeVariables);\n const radarOptions = cleanAndMerge(themeVariables.radar, radar);\n return { themeVariables, radarOptions };\n}, \"buildRadarStyleOptions\");\nvar styles = /* @__PURE__ */ __name(({ radar } = {}) => {\n const { themeVariables, radarOptions } = buildRadarStyleOptions(radar);\n return `\n\t.radarTitle {\n\t\tfont-size: ${themeVariables.fontSize};\n\t\tcolor: ${themeVariables.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${radarOptions.axisColor};\n\t\tstroke-width: ${radarOptions.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${radarOptions.axisLabelFontSize}px;\n\t\tcolor: ${radarOptions.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${radarOptions.graticuleColor};\n\t\tfill-opacity: ${radarOptions.graticuleOpacity};\n\t\tstroke: ${radarOptions.graticuleColor};\n\t\tstroke-width: ${radarOptions.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${radarOptions.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${genIndexStyles(themeVariables, radarOptions)}\n\t`;\n}, \"styles\");\n\n// src/diagrams/radar/diagram.ts\nvar diagram = {\n parser,\n db,\n renderer,\n styles\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"+VA4BA,IAAI,EAAiB,CACnB,WAAY,GACZ,MAAO,EACP,IAAK,KACL,IAAK,EACL,UAAW,SACZ,CACG,EAAmB,CACrB,KAAM,EAAE,CACR,OAAQ,EAAE,CACV,QAAS,EACV,CACG,EAAO,gBAAgB,EAAiB,CACxC,EAAuB,EAAsB,MAC7C,EAA6B,MAChB,EAAc,CAC3B,GAAG,EACH,GAAG,GAAW,CAAC,MAChB,CACY,CACZ,YAAY,CACX,EAA0B,MAAa,EAAK,KAAM,UAAU,CAC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AC,KAAK,EAAM,MAAM,EACtG,CAEJ,EAAO,EAAY,aAAa,CAChC,IAAI,EAAW,CAAE,OAAM,CAGnB,EAAiC,GAAQ,EAAgB,IAAiB,CAC5E,IAAI,EAAW,GACf,IAAK,IAAI,EAAI,EAAG,EAAI,EAAe,kBAAmB,IAAK,CACzD,IAAM,EAAa,EAAe,SAAS,KAC3C,GAAY;gBACA,EAAE;YACN,EAAW;WACZ,EAAW;mBACH,EAAa,aAAa;aAChC,EAAW;mBACL,EAAa,iBAAiB;;oBAE7B,EAAE;WACX,EAAW;mBACH,EAAa,aAAa;aAChC,EAAW;;IAItB,OAAO,GACN,iBAAiB,CAChB,EAAyC,EAAQ,GAAU,CAG7D,IAAM,EAAiB,EAFOA,GAE4B,CADpC,GACmD,CAAC,eAAe,CAEzF,MAAO,CAAE,iBAAgB,aADJ,EAAc,EAAe,MAAO,EACpB,CAAE,EACtC,yBAAyB,CAoCxB,EAAU,CACZ,SACA,KACA,WACA,OAvC2B,GAAQ,CAAE,SAAU,EAAE,GAAK,CACtD,GAAM,CAAE,iBAAgB,gBAAiB,EAAuB,EAAM,CACtE,MAAO;;eAEM,EAAe,SAAS;WAC5B,EAAe,WAAW;;;;;YAKzB,EAAa,UAAU;kBACjB,EAAa,gBAAgB;;;;;eAKhC,EAAa,kBAAkB;WACnC,EAAa,UAAU;;;UAGxB,EAAa,eAAe;kBACpB,EAAa,iBAAiB;YACpC,EAAa,eAAe;kBACtB,EAAa,qBAAqB;;;;eAIrC,EAAa,eAAe;;;GAGxC,EAAe,EAAgB,EAAa,CAAC;IAE7C,SAOK,CACP"}
1
+ {"version":3,"file":"diagram-2AECGRRQ-DL9VAGtd.js","names":["getThemeVariables"],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-2AECGRRQ.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-WU5MYG2G.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getDiagramTitle,\n getThemeVariables,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/radar/db.ts\nvar defaultOptions = {\n showLegend: true,\n ticks: 5,\n max: null,\n min: 0,\n graticule: \"circle\"\n};\nvar defaultRadarData = {\n axes: [],\n curves: [],\n options: defaultOptions\n};\nvar data = structuredClone(defaultRadarData);\nvar DEFAULT_RADAR_CONFIG = defaultConfig_default.radar;\nvar getConfig2 = /* @__PURE__ */ __name(() => {\n const config = cleanAndMerge({\n ...DEFAULT_RADAR_CONFIG,\n ...getConfig().radar\n });\n return config;\n}, \"getConfig\");\nvar getAxes = /* @__PURE__ */ __name(() => data.axes, \"getAxes\");\nvar getCurves = /* @__PURE__ */ __name(() => data.curves, \"getCurves\");\nvar getOptions = /* @__PURE__ */ __name(() => data.options, \"getOptions\");\nvar setAxes = /* @__PURE__ */ __name((axes) => {\n data.axes = axes.map((axis) => {\n return {\n name: axis.name,\n label: axis.label ?? axis.name\n };\n });\n}, \"setAxes\");\nvar setCurves = /* @__PURE__ */ __name((curves) => {\n data.curves = curves.map((curve) => {\n return {\n name: curve.name,\n label: curve.label ?? curve.name,\n entries: computeCurveEntries(curve.entries)\n };\n });\n}, \"setCurves\");\nvar computeCurveEntries = /* @__PURE__ */ __name((entries) => {\n if (entries[0].axis == void 0) {\n return entries.map((entry) => entry.value);\n }\n const axes = getAxes();\n if (axes.length === 0) {\n throw new Error(\"Axes must be populated before curves for reference entries\");\n }\n return axes.map((axis) => {\n const entry = entries.find((entry2) => entry2.axis?.$refText === axis.name);\n if (entry === void 0) {\n throw new Error(\"Missing entry for axis \" + axis.label);\n }\n return entry.value;\n });\n}, \"computeCurveEntries\");\nvar setOptions = /* @__PURE__ */ __name((options) => {\n const optionMap = options.reduce(\n (acc, option) => {\n acc[option.name] = option;\n return acc;\n },\n {}\n );\n data.options = {\n showLegend: optionMap.showLegend?.value ?? defaultOptions.showLegend,\n ticks: optionMap.ticks?.value ?? defaultOptions.ticks,\n max: optionMap.max?.value ?? defaultOptions.max,\n min: optionMap.min?.value ?? defaultOptions.min,\n graticule: optionMap.graticule?.value ?? defaultOptions.graticule\n };\n}, \"setOptions\");\nvar clear2 = /* @__PURE__ */ __name(() => {\n clear();\n data = structuredClone(defaultRadarData);\n}, \"clear\");\nvar db = {\n getAxes,\n getCurves,\n getOptions,\n setAxes,\n setCurves,\n setOptions,\n getConfig: getConfig2,\n clear: clear2,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription\n};\n\n// src/diagrams/radar/parser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar populate = /* @__PURE__ */ __name((ast) => {\n populateCommonDb(ast, db);\n const { axes, curves, options } = ast;\n db.setAxes(axes);\n db.setCurves(curves);\n db.setOptions(options);\n}, \"populate\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"radar\", input);\n log.debug(ast);\n populate(ast);\n }, \"parse\")\n};\n\n// src/diagrams/radar/renderer.ts\nvar draw = /* @__PURE__ */ __name((_text, id, _version, diagram2) => {\n const db2 = diagram2.db;\n const axes = db2.getAxes();\n const curves = db2.getCurves();\n const options = db2.getOptions();\n const config = db2.getConfig();\n const title = db2.getDiagramTitle();\n const svg = selectSvgElement(id);\n const g = drawFrame(svg, config);\n const maxValue = options.max ?? Math.max(...curves.map((curve) => Math.max(...curve.entries)));\n const minValue = options.min;\n const radius = Math.min(config.width, config.height) / 2;\n drawGraticule(g, axes, radius, options.ticks, options.graticule);\n drawAxes(g, axes, radius, config);\n drawCurves(g, axes, curves, minValue, maxValue, options.graticule, config);\n drawLegend(g, curves, options.showLegend, config);\n g.append(\"text\").attr(\"class\", \"radarTitle\").text(title).attr(\"x\", 0).attr(\"y\", -config.height / 2 - config.marginTop);\n}, \"draw\");\nvar drawFrame = /* @__PURE__ */ __name((svg, config) => {\n const totalWidth = config.width + config.marginLeft + config.marginRight;\n const totalHeight = config.height + config.marginTop + config.marginBottom;\n const center = {\n x: config.marginLeft + config.width / 2,\n y: config.marginTop + config.height / 2\n };\n configureSvgSize(svg, totalHeight, totalWidth, config.useMaxWidth ?? true);\n svg.attr(\"viewBox\", `0 0 ${totalWidth} ${totalHeight}`);\n return svg.append(\"g\").attr(\"transform\", `translate(${center.x}, ${center.y})`);\n}, \"drawFrame\");\nvar drawGraticule = /* @__PURE__ */ __name((g, axes, radius, ticks, graticule) => {\n if (graticule === \"circle\") {\n for (let i = 0; i < ticks; i++) {\n const r = radius * (i + 1) / ticks;\n g.append(\"circle\").attr(\"r\", r).attr(\"class\", \"radarGraticule\");\n }\n } else if (graticule === \"polygon\") {\n const numAxes = axes.length;\n for (let i = 0; i < ticks; i++) {\n const r = radius * (i + 1) / ticks;\n const points = axes.map((_, j) => {\n const angle = 2 * j * Math.PI / numAxes - Math.PI / 2;\n const x = r * Math.cos(angle);\n const y = r * Math.sin(angle);\n return `${x},${y}`;\n }).join(\" \");\n g.append(\"polygon\").attr(\"points\", points).attr(\"class\", \"radarGraticule\");\n }\n }\n}, \"drawGraticule\");\nvar drawAxes = /* @__PURE__ */ __name((g, axes, radius, config) => {\n const numAxes = axes.length;\n for (let i = 0; i < numAxes; i++) {\n const label = axes[i].label;\n const angle = 2 * i * Math.PI / numAxes - Math.PI / 2;\n g.append(\"line\").attr(\"x1\", 0).attr(\"y1\", 0).attr(\"x2\", radius * config.axisScaleFactor * Math.cos(angle)).attr(\"y2\", radius * config.axisScaleFactor * Math.sin(angle)).attr(\"class\", \"radarAxisLine\");\n g.append(\"text\").text(label).attr(\"x\", radius * config.axisLabelFactor * Math.cos(angle)).attr(\"y\", radius * config.axisLabelFactor * Math.sin(angle)).attr(\"class\", \"radarAxisLabel\");\n }\n}, \"drawAxes\");\nfunction drawCurves(g, axes, curves, minValue, maxValue, graticule, config) {\n const numAxes = axes.length;\n const radius = Math.min(config.width, config.height) / 2;\n curves.forEach((curve, index) => {\n if (curve.entries.length !== numAxes) {\n return;\n }\n const points = curve.entries.map((entry, i) => {\n const angle = 2 * Math.PI * i / numAxes - Math.PI / 2;\n const r = relativeRadius(entry, minValue, maxValue, radius);\n const x = r * Math.cos(angle);\n const y = r * Math.sin(angle);\n return { x, y };\n });\n if (graticule === \"circle\") {\n g.append(\"path\").attr(\"d\", closedRoundCurve(points, config.curveTension)).attr(\"class\", `radarCurve-${index}`);\n } else if (graticule === \"polygon\") {\n g.append(\"polygon\").attr(\"points\", points.map((p) => `${p.x},${p.y}`).join(\" \")).attr(\"class\", `radarCurve-${index}`);\n }\n });\n}\n__name(drawCurves, \"drawCurves\");\nfunction relativeRadius(value, minValue, maxValue, radius) {\n const clippedValue = Math.min(Math.max(value, minValue), maxValue);\n return radius * (clippedValue - minValue) / (maxValue - minValue);\n}\n__name(relativeRadius, \"relativeRadius\");\nfunction closedRoundCurve(points, tension) {\n const numPoints = points.length;\n let d = `M${points[0].x},${points[0].y}`;\n for (let i = 0; i < numPoints; i++) {\n const p0 = points[(i - 1 + numPoints) % numPoints];\n const p1 = points[i];\n const p2 = points[(i + 1) % numPoints];\n const p3 = points[(i + 2) % numPoints];\n const cp1 = {\n x: p1.x + (p2.x - p0.x) * tension,\n y: p1.y + (p2.y - p0.y) * tension\n };\n const cp2 = {\n x: p2.x - (p3.x - p1.x) * tension,\n y: p2.y - (p3.y - p1.y) * tension\n };\n d += ` C${cp1.x},${cp1.y} ${cp2.x},${cp2.y} ${p2.x},${p2.y}`;\n }\n return `${d} Z`;\n}\n__name(closedRoundCurve, \"closedRoundCurve\");\nfunction drawLegend(g, curves, showLegend, config) {\n if (!showLegend) {\n return;\n }\n const legendX = (config.width / 2 + config.marginRight) * 3 / 4;\n const legendY = -(config.height / 2 + config.marginTop) * 3 / 4;\n const lineHeight = 20;\n curves.forEach((curve, index) => {\n const itemGroup = g.append(\"g\").attr(\"transform\", `translate(${legendX}, ${legendY + index * lineHeight})`);\n itemGroup.append(\"rect\").attr(\"width\", 12).attr(\"height\", 12).attr(\"class\", `radarLegendBox-${index}`);\n itemGroup.append(\"text\").attr(\"x\", 16).attr(\"y\", 0).attr(\"class\", \"radarLegendText\").text(curve.label);\n });\n}\n__name(drawLegend, \"drawLegend\");\nvar renderer = { draw };\n\n// src/diagrams/radar/styles.ts\nvar genIndexStyles = /* @__PURE__ */ __name((themeVariables, radarOptions) => {\n let sections = \"\";\n for (let i = 0; i < themeVariables.THEME_COLOR_LIMIT; i++) {\n const indexColor = themeVariables[`cScale${i}`];\n sections += `\n\t\t.radarCurve-${i} {\n\t\t\tcolor: ${indexColor};\n\t\t\tfill: ${indexColor};\n\t\t\tfill-opacity: ${radarOptions.curveOpacity};\n\t\t\tstroke: ${indexColor};\n\t\t\tstroke-width: ${radarOptions.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${i} {\n\t\t\tfill: ${indexColor};\n\t\t\tfill-opacity: ${radarOptions.curveOpacity};\n\t\t\tstroke: ${indexColor};\n\t\t}\n\t\t`;\n }\n return sections;\n}, \"genIndexStyles\");\nvar buildRadarStyleOptions = /* @__PURE__ */ __name((radar) => {\n const defaultThemeVariables = getThemeVariables();\n const currentConfig = getConfig();\n const themeVariables = cleanAndMerge(defaultThemeVariables, currentConfig.themeVariables);\n const radarOptions = cleanAndMerge(themeVariables.radar, radar);\n return { themeVariables, radarOptions };\n}, \"buildRadarStyleOptions\");\nvar styles = /* @__PURE__ */ __name(({ radar } = {}) => {\n const { themeVariables, radarOptions } = buildRadarStyleOptions(radar);\n return `\n\t.radarTitle {\n\t\tfont-size: ${themeVariables.fontSize};\n\t\tcolor: ${themeVariables.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${radarOptions.axisColor};\n\t\tstroke-width: ${radarOptions.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${radarOptions.axisLabelFontSize}px;\n\t\tcolor: ${radarOptions.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${radarOptions.graticuleColor};\n\t\tfill-opacity: ${radarOptions.graticuleOpacity};\n\t\tstroke: ${radarOptions.graticuleColor};\n\t\tstroke-width: ${radarOptions.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${radarOptions.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${genIndexStyles(themeVariables, radarOptions)}\n\t`;\n}, \"styles\");\n\n// src/diagrams/radar/diagram.ts\nvar diagram = {\n parser,\n db,\n renderer,\n styles\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"+VA4BA,IAAI,EAAiB,CACnB,WAAY,GACZ,MAAO,EACP,IAAK,KACL,IAAK,EACL,UAAW,SACZ,CACG,EAAmB,CACrB,KAAM,EAAE,CACR,OAAQ,EAAE,CACV,QAAS,EACV,CACG,EAAO,gBAAgB,EAAiB,CACxC,EAAuB,EAAsB,MAC7C,EAA6B,MAChB,EAAc,CAC3B,GAAG,EACH,GAAG,GAAW,CAAC,MAChB,CACY,CACZ,YAAY,CACX,EAA0B,MAAa,EAAK,KAAM,UAAU,CAC5D,EAA4B,MAAa,EAAK,OAAQ,YAAY,CAClE,EAA6B,MAAa,EAAK,QAAS,aAAa,CACrE,EAA0B,EAAQ,GAAS,CAC7C,EAAK,KAAO,EAAK,IAAK,IACb,CACL,KAAM,EAAK,KACX,MAAO,EAAK,OAAS,EAAK,KAC3B,EACD,EACD,UAAU,CACT,EAA4B,EAAQ,GAAW,CACjD,EAAK,OAAS,EAAO,IAAK,IACjB,CACL,KAAM,EAAM,KACZ,MAAO,EAAM,OAAS,EAA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Aa,iBAAiB;;oBAE7B,EAAE;WACX,EAAW;mBACH,EAAa,aAAa;aAChC,EAAW;;IAItB,OAAO,GACN,iBAAiB,CAChB,EAAyC,EAAQ,GAAU,CAG7D,IAAM,EAAiB,EAFOA,GAE4B,CADpC,GACmD,CAAC,eAAe,CAEzF,MAAO,CAAE,iBAAgB,aADJ,EAAc,EAAe,MAAO,EACpB,CAAE,EACtC,yBAAyB,CAoCxB,EAAU,CACZ,SACA,KACA,WACA,OAvC2B,GAAQ,CAAE,SAAU,EAAE,GAAK,CACtD,GAAM,CAAE,iBAAgB,gBAAiB,EAAuB,EAAM,CACtE,MAAO;;eAEM,EAAe,SAAS;WAC5B,EAAe,WAAW;;;;;YAKzB,EAAa,UAAU;kBACjB,EAAa,gBAAgB;;;;;eAKhC,EAAa,kBAAkB;WACnC,EAAa,UAAU;;;UAGxB,EAAa,eAAe;kBACpB,EAAa,iBAAiB;YACpC,EAAa,eAAe;kBACtB,EAAa,qBAAqB;;;;eAIrC,EAAa,eAAe;;;GAGxC,EAAe,EAAgB,EAAa,CAAC;IAE7C,SAOK,CACP"}
@@ -1,4 +1,4 @@
1
- import{g as e,h as t}from"./src-DoMhBUqV.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{i as f}from"./chunk-5ZQYHXKU-B_3UEJ_q.js";import{a as p}from"./index-D5tmHkO_.js";import{t as m}from"./chunk-4BX2VUAB-BqYEJTr3.js";import{t as h}from"./mermaid-parser.core-BO_-QleW.js";import{t as g}from"./chunk-QZHKN3VN-C51sC6VA.js";var _=new g(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,children:[]}]})),v=t(()=>{_.reset(),a()},`clear`),y=t(()=>_.records.stack[0],`getRoot`),b=t(()=>_.records.cnt,`getCount`),x=c.treeView,S={clear:v,addNode:t((e,t)=>{for(;e<=_.records.stack[_.records.stack.length-1].level;)_.records.stack.pop();let n={id:_.records.cnt++,level:e,name:t,children:[]};_.records.stack[_.records.stack.length-1].children.push(n),_.records.stack.push(n)},`addNode`),getRoot:y,getCount:b,getConfig:t(()=>f(x,o().treeView),`getConfig`),getAccTitle:d,getAccDescription:l,getDiagramTitle:u,setAccDescription:n,setAccTitle:i,setDiagramTitle:r},C=t(e=>{m(e,S),e.nodes.map(e=>S.addNode(e.indent?parseInt(e.indent):0,e.name))},`populate`),w={parse:t(async t=>{let n=await h(`treeView`,t);e.debug(n),C(n)},`parse`)},T=t((e,t,n,r,i)=>{let a=r.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-label`),{height:o,width:s}=a.node().getBBox(),c=o+i.paddingY*2,l=s+i.paddingX*2;a.attr(`x`,e+i.paddingX),a.attr(`y`,t+c/2),n.BBox={x:e,y:t,width:l,height:c}},`positionLabel`),E=t((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),D=t((e,n,r)=>{let i=0,a=0,o=t((e,t,n,r)=>{let o=r*(n.rowIndent+n.paddingX);T(o,i,t,e,n);let{height:s,width:c}=t.BBox;E(e,o-n.rowIndent,i+s/2,o,i+s/2,n.lineThickness),a=Math.max(a,o+c),i+=s},`drawNode`),s=t((t,n=0)=>{o(e,t,r,n),t.children.forEach(e=>{s(e,n+1)});let{x:i,y:a,height:c}=t.BBox;if(t.children.length){let{y:n,height:o}=t.children[t.children.length-1].BBox;E(e,i+r.paddingX,a+c,i+r.paddingX,n+o/2+r.lineThickness/2,r.lineThickness)}},`processNode`);return s(n),{totalHeight:i,totalWidth:a}},`drawTree`),O={draw:t((t,n,r,i)=>{e.debug(`Rendering treeView diagram
1
+ import{g as e,h as t}from"./src-DoMhBUqV.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{i as f}from"./chunk-5ZQYHXKU-CCVDVWrS.js";import{a as p}from"./index-B1CSiQFH.js";import{t as m}from"./chunk-4BX2VUAB-BqYEJTr3.js";import{t as h}from"./mermaid-parser.core-BO_-QleW.js";import{t as g}from"./chunk-QZHKN3VN-C51sC6VA.js";var _=new g(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,children:[]}]})),v=t(()=>{_.reset(),a()},`clear`),y=t(()=>_.records.stack[0],`getRoot`),b=t(()=>_.records.cnt,`getCount`),x=c.treeView,S={clear:v,addNode:t((e,t)=>{for(;e<=_.records.stack[_.records.stack.length-1].level;)_.records.stack.pop();let n={id:_.records.cnt++,level:e,name:t,children:[]};_.records.stack[_.records.stack.length-1].children.push(n),_.records.stack.push(n)},`addNode`),getRoot:y,getCount:b,getConfig:t(()=>f(x,o().treeView),`getConfig`),getAccTitle:d,getAccDescription:l,getDiagramTitle:u,setAccDescription:n,setAccTitle:i,setDiagramTitle:r},C=t(e=>{m(e,S),e.nodes.map(e=>S.addNode(e.indent?parseInt(e.indent):0,e.name))},`populate`),w={parse:t(async t=>{let n=await h(`treeView`,t);e.debug(n),C(n)},`parse`)},T=t((e,t,n,r,i)=>{let a=r.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-label`),{height:o,width:s}=a.node().getBBox(),c=o+i.paddingY*2,l=s+i.paddingX*2;a.attr(`x`,e+i.paddingX),a.attr(`y`,t+c/2),n.BBox={x:e,y:t,width:l,height:c}},`positionLabel`),E=t((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),D=t((e,n,r)=>{let i=0,a=0,o=t((e,t,n,r)=>{let o=r*(n.rowIndent+n.paddingX);T(o,i,t,e,n);let{height:s,width:c}=t.BBox;E(e,o-n.rowIndent,i+s/2,o,i+s/2,n.lineThickness),a=Math.max(a,o+c),i+=s},`drawNode`),s=t((t,n=0)=>{o(e,t,r,n),t.children.forEach(e=>{s(e,n+1)});let{x:i,y:a,height:c}=t.BBox;if(t.children.length){let{y:n,height:o}=t.children[t.children.length-1].BBox;E(e,i+r.paddingX,a+c,i+r.paddingX,n+o/2+r.lineThickness/2,r.lineThickness)}},`processNode`);return s(n),{totalHeight:i,totalWidth:a}},`drawTree`),O={draw:t((t,n,r,i)=>{e.debug(`Rendering treeView diagram
2
2
  `+t);let a=i.db,o=a.getRoot(),c=a.getConfig(),l=p(n),u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=D(u,o,c);l.attr(`viewBox`,`-${c.lineThickness/2} 0 ${f} ${d}`),s(l,d,f,c.useMaxWidth)},`draw`)},k={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`},A={db:S,renderer:O,parser:w,styles:t(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r}=f(k,e);return`
3
3
  .treeView-node-label {
4
4
  font-size: ${t};
@@ -8,4 +8,4 @@ import{g as e,h as t}from"./src-DoMhBUqV.js";import{H as n,K as r,U as i,a,b as
8
8
  stroke: ${r};
9
9
  }
10
10
  `},`styles`)};export{A as diagram};
11
- //# sourceMappingURL=diagram-5GNKFQAL-diIxjA-v.js.map
11
+ //# sourceMappingURL=diagram-5GNKFQAL-Crr9YjF6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagram-5GNKFQAL-diIxjA-v.js","names":[],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5GNKFQAL.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-WU5MYG2G.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n ImperativeState\n} from \"./chunk-QZHKN3VN.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/treeView/db.ts\nvar state = new ImperativeState(() => ({\n cnt: 1,\n stack: [\n {\n id: 0,\n level: -1,\n name: \"/\",\n children: []\n }\n ]\n}));\nvar clear2 = /* @__PURE__ */ __name(() => {\n state.reset();\n clear();\n}, \"clear\");\nvar getRoot = /* @__PURE__ */ __name(() => {\n return state.records.stack[0];\n}, \"getRoot\");\nvar getCount = /* @__PURE__ */ __name(() => state.records.cnt, \"getCount\");\nvar defaultConfig = defaultConfig_default.treeView;\nvar getConfig2 = /* @__PURE__ */ __name(() => {\n return cleanAndMerge(defaultConfig, getConfig().treeView);\n}, \"getConfig\");\nvar addNode = /* @__PURE__ */ __name((level, name) => {\n while (level <= state.records.stack[state.records.stack.length - 1].level) {\n state.records.stack.pop();\n }\n const node = {\n id: state.records.cnt++,\n level,\n name,\n children: []\n };\n state.records.stack[state.records.stack.length - 1].children.push(node);\n state.records.stack.push(node);\n}, \"addNode\");\nvar db = {\n clear: clear2,\n addNode,\n getRoot,\n getCount,\n getConfig: getConfig2,\n getAccTitle,\n getAccDescription,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n};\nvar db_default = db;\n\n// src/diagrams/treeView/parser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar populate = /* @__PURE__ */ __name((ast) => {\n populateCommonDb(ast, db_default);\n ast.nodes.map((node) => db_default.addNode(node.indent ? parseInt(node.indent) : 0, node.name));\n}, \"populate\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"treeView\", input);\n log.debug(ast);\n populate(ast);\n }, \"parse\")\n};\n\n// src/diagrams/treeView/renderer.ts\nvar positionLabel = /* @__PURE__ */ __name((x, y, node, domElem, config) => {\n const label = domElem.append(\"text\").text(node.name).attr(\"dominant-baseline\", \"middle\").attr(\"class\", \"treeView-node-label\");\n const { height: labelHeight, width: labelWidth } = label.node().getBBox();\n const height = labelHeight + config.paddingY * 2;\n const width = labelWidth + config.paddingX * 2;\n label.attr(\"x\", x + config.paddingX);\n label.attr(\"y\", y + height / 2);\n node.BBox = {\n x,\n y,\n width,\n height\n };\n}, \"positionLabel\");\nvar positionLine = /* @__PURE__ */ __name((domElem, x1, y1, x2, y2, lineThickness) => {\n return domElem.append(\"line\").attr(\"x1\", x1).attr(\"y1\", y1).attr(\"x2\", x2).attr(\"y2\", y2).attr(\"stroke-width\", lineThickness).attr(\"class\", \"treeView-node-line\");\n}, \"positionLine\");\nvar drawTree = /* @__PURE__ */ __name((elem, root, config) => {\n let totalHeight = 0;\n let totalWidth = 0;\n const drawNode = /* @__PURE__ */ __name((elem2, node, config2, depth) => {\n const indent = depth * (config2.rowIndent + config2.paddingX);\n positionLabel(indent, totalHeight, node, elem2, config2);\n const { height, width } = node.BBox;\n positionLine(\n elem2,\n indent - config2.rowIndent,\n totalHeight + height / 2,\n indent,\n totalHeight + height / 2,\n config2.lineThickness\n );\n totalWidth = Math.max(totalWidth, indent + width);\n totalHeight += height;\n }, \"drawNode\");\n const processNode = /* @__PURE__ */ __name((node, depth = 0) => {\n drawNode(elem, node, config, depth);\n node.children.forEach((child) => {\n processNode(child, depth + 1);\n });\n const { x, y, height } = node.BBox;\n if (node.children.length) {\n const { y: endY, height: endHeight } = node.children[node.children.length - 1].BBox;\n positionLine(\n elem,\n x + config.paddingX,\n y + height,\n x + config.paddingX,\n endY + endHeight / 2 + config.lineThickness / 2,\n config.lineThickness\n );\n }\n }, \"processNode\");\n processNode(root);\n return { totalHeight, totalWidth };\n}, \"drawTree\");\nvar draw = /* @__PURE__ */ __name((text, id, _ver, diagObj) => {\n log.debug(\"Rendering treeView diagram\\n\" + text);\n const db2 = diagObj.db;\n const root = db2.getRoot();\n const config = db2.getConfig();\n const svg = selectSvgElement(id);\n const treeElem = svg.append(\"g\");\n treeElem.attr(\"class\", \"tree-view\");\n const { totalHeight, totalWidth } = drawTree(treeElem, root, config);\n svg.attr(\"viewBox\", `-${config.lineThickness / 2} 0 ${totalWidth} ${totalHeight}`);\n configureSvgSize(svg, totalHeight, totalWidth, config.useMaxWidth);\n}, \"draw\");\nvar renderer = {\n draw\n};\nvar renderer_default = renderer;\n\n// src/diagrams/treeView/styles.ts\nvar defaultTreeViewDiagramStyles = {\n labelFontSize: \"16px\",\n labelColor: \"black\",\n lineColor: \"black\"\n};\nvar styles = /* @__PURE__ */ __name(({\n treeView\n}) => {\n const { labelFontSize, labelColor, lineColor } = cleanAndMerge(\n defaultTreeViewDiagramStyles,\n treeView\n );\n return `\n .treeView-node-label {\n font-size: ${labelFontSize};\n fill: ${labelColor};\n }\n .treeView-node-line {\n stroke: ${lineColor};\n }\n `;\n}, \"styles\");\nvar styles_default = styles;\n\n// src/diagrams/treeView/diagram.ts\nvar diagram = {\n db: db_default,\n renderer: renderer_default,\n parser,\n styles: styles_default\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"yYA8BA,IAAI,EAAQ,IAAI,OAAuB,CACrC,IAAK,EACL,MAAO,CACL,CACE,GAAI,EACJ,MAAO,GACP,KAAM,IACN,SAAU,EAAE,CACb,CACF,CACF,EAAE,CACC,EAAyB,MAAa,CACxC,EAAM,OAAO,CACb,GAAO,EACN,QAAQ,CACP,EAA0B,MACrB,EAAM,QAAQ,MAAM,GAC1B,UAAU,CACT,EAA2B,MAAa,EAAM,QAAQ,IAAK,WAAW,CACtE,EAAgB,EAAsB,SA8BtC,EAAa,CAZf,MAAO,EACP,QAf4B,GAAQ,EAAO,IAAS,CACpD,KAAO,GAAS,EAAM,QAAQ,MAAM,EAAM,QAAQ,MAAM,OAAS,GAAG,OAClE,EAAM,QAAQ,MAAM,KAAK,CAE3B,IAAM,EAAO,CACX,GAAI,EAAM,QAAQ,MAClB,QACA,OACA,SAAU,EAAE,CACb,CACD,EAAM,QAAQ,MAAM,EAAM,QAAQ,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AY,EAAO,YAAY,EACjE,OAEG,CAEyB,CAG3B,EAA+B,CACjC,cAAe,OACf,WAAY,QACZ,UAAW,QACZ,CAqBG,EAAU,CACZ,GAAI,EACJ,SAAU,EACV,SACA,OAxB2B,GAAQ,CACnC,cACI,CACJ,GAAM,CAAE,gBAAe,aAAY,aAAc,EAC/C,EACA,EACD,CACD,MAAO;;qBAEY,EAAc;gBACnB,EAAW;;;kBAGT,EAAU;;OAGzB,SAQqB,CACvB"}
1
+ {"version":3,"file":"diagram-5GNKFQAL-Crr9YjF6.js","names":[],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5GNKFQAL.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-WU5MYG2G.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n ImperativeState\n} from \"./chunk-QZHKN3VN.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/treeView/db.ts\nvar state = new ImperativeState(() => ({\n cnt: 1,\n stack: [\n {\n id: 0,\n level: -1,\n name: \"/\",\n children: []\n }\n ]\n}));\nvar clear2 = /* @__PURE__ */ __name(() => {\n state.reset();\n clear();\n}, \"clear\");\nvar getRoot = /* @__PURE__ */ __name(() => {\n return state.records.stack[0];\n}, \"getRoot\");\nvar getCount = /* @__PURE__ */ __name(() => state.records.cnt, \"getCount\");\nvar defaultConfig = defaultConfig_default.treeView;\nvar getConfig2 = /* @__PURE__ */ __name(() => {\n return cleanAndMerge(defaultConfig, getConfig().treeView);\n}, \"getConfig\");\nvar addNode = /* @__PURE__ */ __name((level, name) => {\n while (level <= state.records.stack[state.records.stack.length - 1].level) {\n state.records.stack.pop();\n }\n const node = {\n id: state.records.cnt++,\n level,\n name,\n children: []\n };\n state.records.stack[state.records.stack.length - 1].children.push(node);\n state.records.stack.push(node);\n}, \"addNode\");\nvar db = {\n clear: clear2,\n addNode,\n getRoot,\n getCount,\n getConfig: getConfig2,\n getAccTitle,\n getAccDescription,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n};\nvar db_default = db;\n\n// src/diagrams/treeView/parser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar populate = /* @__PURE__ */ __name((ast) => {\n populateCommonDb(ast, db_default);\n ast.nodes.map((node) => db_default.addNode(node.indent ? parseInt(node.indent) : 0, node.name));\n}, \"populate\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"treeView\", input);\n log.debug(ast);\n populate(ast);\n }, \"parse\")\n};\n\n// src/diagrams/treeView/renderer.ts\nvar positionLabel = /* @__PURE__ */ __name((x, y, node, domElem, config) => {\n const label = domElem.append(\"text\").text(node.name).attr(\"dominant-baseline\", \"middle\").attr(\"class\", \"treeView-node-label\");\n const { height: labelHeight, width: labelWidth } = label.node().getBBox();\n const height = labelHeight + config.paddingY * 2;\n const width = labelWidth + config.paddingX * 2;\n label.attr(\"x\", x + config.paddingX);\n label.attr(\"y\", y + height / 2);\n node.BBox = {\n x,\n y,\n width,\n height\n };\n}, \"positionLabel\");\nvar positionLine = /* @__PURE__ */ __name((domElem, x1, y1, x2, y2, lineThickness) => {\n return domElem.append(\"line\").attr(\"x1\", x1).attr(\"y1\", y1).attr(\"x2\", x2).attr(\"y2\", y2).attr(\"stroke-width\", lineThickness).attr(\"class\", \"treeView-node-line\");\n}, \"positionLine\");\nvar drawTree = /* @__PURE__ */ __name((elem, root, config) => {\n let totalHeight = 0;\n let totalWidth = 0;\n const drawNode = /* @__PURE__ */ __name((elem2, node, config2, depth) => {\n const indent = depth * (config2.rowIndent + config2.paddingX);\n positionLabel(indent, totalHeight, node, elem2, config2);\n const { height, width } = node.BBox;\n positionLine(\n elem2,\n indent - config2.rowIndent,\n totalHeight + height / 2,\n indent,\n totalHeight + height / 2,\n config2.lineThickness\n );\n totalWidth = Math.max(totalWidth, indent + width);\n totalHeight += height;\n }, \"drawNode\");\n const processNode = /* @__PURE__ */ __name((node, depth = 0) => {\n drawNode(elem, node, config, depth);\n node.children.forEach((child) => {\n processNode(child, depth + 1);\n });\n const { x, y, height } = node.BBox;\n if (node.children.length) {\n const { y: endY, height: endHeight } = node.children[node.children.length - 1].BBox;\n positionLine(\n elem,\n x + config.paddingX,\n y + height,\n x + config.paddingX,\n endY + endHeight / 2 + config.lineThickness / 2,\n config.lineThickness\n );\n }\n }, \"processNode\");\n processNode(root);\n return { totalHeight, totalWidth };\n}, \"drawTree\");\nvar draw = /* @__PURE__ */ __name((text, id, _ver, diagObj) => {\n log.debug(\"Rendering treeView diagram\\n\" + text);\n const db2 = diagObj.db;\n const root = db2.getRoot();\n const config = db2.getConfig();\n const svg = selectSvgElement(id);\n const treeElem = svg.append(\"g\");\n treeElem.attr(\"class\", \"tree-view\");\n const { totalHeight, totalWidth } = drawTree(treeElem, root, config);\n svg.attr(\"viewBox\", `-${config.lineThickness / 2} 0 ${totalWidth} ${totalHeight}`);\n configureSvgSize(svg, totalHeight, totalWidth, config.useMaxWidth);\n}, \"draw\");\nvar renderer = {\n draw\n};\nvar renderer_default = renderer;\n\n// src/diagrams/treeView/styles.ts\nvar defaultTreeViewDiagramStyles = {\n labelFontSize: \"16px\",\n labelColor: \"black\",\n lineColor: \"black\"\n};\nvar styles = /* @__PURE__ */ __name(({\n treeView\n}) => {\n const { labelFontSize, labelColor, lineColor } = cleanAndMerge(\n defaultTreeViewDiagramStyles,\n treeView\n );\n return `\n .treeView-node-label {\n font-size: ${labelFontSize};\n fill: ${labelColor};\n }\n .treeView-node-line {\n stroke: ${lineColor};\n }\n `;\n}, \"styles\");\nvar styles_default = styles;\n\n// src/diagrams/treeView/diagram.ts\nvar diagram = {\n db: db_default,\n renderer: renderer_default,\n parser,\n styles: styles_default\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"yYA8BA,IAAI,EAAQ,IAAI,OAAuB,CACrC,IAAK,EACL,MAAO,CACL,CACE,GAAI,EACJ,MAAO,GACP,KAAM,IACN,SAAU,EAAE,CACb,CACF,CACF,EAAE,CACC,EAAyB,MAAa,CACxC,EAAM,OAAO,CACb,GAAO,EACN,QAAQ,CACP,EAA0B,MACrB,EAAM,QAAQ,MAAM,GAC1B,UAAU,CACT,EAA2B,MAAa,EAAM,QAAQ,IAAK,WAAW,CACtE,EAAgB,EAAsB,SA8BtC,EAAa,CAZf,MAAO,EACP,QAf4B,GAAQ,EAAO,IAAS,CACpD,KAAO,GAAS,EAAM,QAAQ,MAAM,EAAM,QAAQ,MAAM,OAAS,GAAG,OAClE,EAAM,QAAQ,MAAM,KAAK,CAE3B,IAAM,EAAO,CACX,GAAI,EAAM,QAAQ,MAClB,QACA,OACA,SAAU,EAAE,CACb,CACD,EAAM,QAAQ,MAAM,EAAM,QAAQ,MAAM,OAAS,GAAG,SAAS,KAAK,EAAK,CACvE,EAAM,QAAQ,MAAM,KAAK,EAAK,EAC7B,UAGM,CACP,UACA,WACA,UArB+B,MACxB,EAAc,EAAe,GAAW,CAAC,SAAS,CACxD,YAmBoB,CACrB,cACA,oBACA,kBACA,oBACA,cACA,kBAEiB,CAIf,EAA2B,EAAQ,GAAQ,CAC7C,EAAiB,EAAK,EAAW,CACjC,EAAI,MAAM,IAAK,GAAS,EAAW,QAAQ,EAAK,OAAS,SAAS,EAAK,OAAO,CAAG,EAAG,EAAK,KAAK,CAAC,EAC9F,WAAW,CACV,EAAS,CACX,MAAuB,EAAO,KAAO,IAAU,CAC7C,IAAM,EAAM,MAAM,EAAM,WAAY,EAAM,CAC1C,EAAI,MAAM,EAAI,CACd,EAAS,EAAI,EACZ,QAAQ,CACZ,CAGG,E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EAAK,KAC9B,GAAI,EAAK,SAAS,OAAQ,CACxB,GAAM,CAAE,EAAG,EAAM,OAAQ,GAAc,EAAK,SAAS,EAAK,SAAS,OAAS,GAAG,KAC/E,EACE,EACA,EAAI,EAAO,SACX,EAAI,EACJ,EAAI,EAAO,SACX,EAAO,EAAY,EAAI,EAAO,cAAgB,EAC9C,EAAO,cACR,GAEF,cAAc,CAEjB,OADA,EAAY,EAAK,CACV,CAAE,cAAa,aAAY,EACjC,WAAW,CAgBV,EAAmB,CAFrB,KAbyB,GAAQ,EAAM,EAAI,EAAM,IAAY,CAC7D,EAAI,MAAM;EAAiC,EAAK,CAChD,IAAM,EAAM,EAAQ,GACd,EAAO,EAAI,SAAS,CACpB,EAAS,EAAI,WAAW,CACxB,EAAM,EAAiB,EAAG,CAC1B,EAAW,EAAI,OAAO,IAAI,CAChC,EAAS,KAAK,QAAS,YAAY,CACnC,GAAM,CAAE,cAAa,cAAe,EAAS,EAAU,EAAM,EAAO,CACpE,EAAI,KAAK,UAAW,IAAI,EAAO,cAAgB,EAAE,KAAK,EAAW,GAAG,IAAc,CAClF,EAAiB,EAAK,EAAa,EAAY,EAAO,YAAY,EACjE,OAEG,CAEyB,CAG3B,EAA+B,CACjC,cAAe,OACf,WAAY,QACZ,UAAW,QACZ,CAqBG,EAAU,CACZ,GAAI,EACJ,SAAU,EACV,SACA,OAxB2B,GAAQ,CACnC,cACI,CACJ,GAAM,CAAE,gBAAe,aAAY,aAAc,EAC/C,EACA,EACD,CACD,MAAO;;qBAEY,EAAc;gBACnB,EAAW;;;kBAGT,EAAU;;OAGzB,SAQqB,CACvB"}
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,p as n}from"./src-DoMhBUqV.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{_ as h,i as g,t as ee}from"./chunk-5ZQYHXKU-B_3UEJ_q.js";import{b as te}from"./chunk-NNHCCRGN-DSaPFNsL.js";import{t as ne}from"./chunk-4BX2VUAB-BqYEJTr3.js";import{t as re}from"./mermaid-parser.core-BO_-QleW.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=t(function(t){e.debug(`options str`,t)},`setOptions`),ae=t(function(){return{}},`getOptions`),oe=t(function(){x(),s()},`clear`);function x(){S={}}t(x,`reset`);var se=l.eventmodeling,ce=t(()=>g({...se,...c().eventmodeling}),`getConfig`),S={};function C(){let t=le,{ast:n}=S,r=E();if(!n)throw Error(`No data for EventModel`);return n.frames.forEach((i,a)=>{let o=N(i,n.dataEntities,r);t=q(t,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(e.debug(`source frame`,i.sourceFrames),s=n.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(e=>{t=q(t,{$kind:y,index:a,frame:i,sourceFrame:e})})):t=q(t,{$kind:y,index:a,frame:i})}),t={...t,sortedSwimlanesArray:L(t.swimlanes)},t}t(C,`getState`);function w(e){S.ast=e}t(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}t(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}t(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}t(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}t(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}t(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}t(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=c();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}t(M,`calculateEntityVisualProps`);function N(t,n,r){let i=c(),a=m(O(t.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},l=`<b>${h(a,r.textMaxWidth,s)}</b>`;if(t.dataInlineValue&&(o=t.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=m(o,i),o=h(o,r.textMaxWidth,s),o=o.replaceAll(` `,`&nbsp;`)),t.dataReference){let e=n.find(e=>e.name===t.dataReference?.$refText);e&&(o=e.dataBlockValue,o=o.substring(o.indexOf(`{
1
+ import{g as e,h as t,p as n}from"./src-DoMhBUqV.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{_ as h,i as g,t as ee}from"./chunk-5ZQYHXKU-CCVDVWrS.js";import{b as te}from"./chunk-NNHCCRGN-DSaPFNsL.js";import{t as ne}from"./chunk-4BX2VUAB-BqYEJTr3.js";import{t as re}from"./mermaid-parser.core-BO_-QleW.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=t(function(t){e.debug(`options str`,t)},`setOptions`),ae=t(function(){return{}},`getOptions`),oe=t(function(){x(),s()},`clear`);function x(){S={}}t(x,`reset`);var se=l.eventmodeling,ce=t(()=>g({...se,...c().eventmodeling}),`getConfig`),S={};function C(){let t=le,{ast:n}=S,r=E();if(!n)throw Error(`No data for EventModel`);return n.frames.forEach((i,a)=>{let o=N(i,n.dataEntities,r);t=q(t,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(e.debug(`source frame`,i.sourceFrames),s=n.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(e=>{t=q(t,{$kind:y,index:a,frame:i,sourceFrame:e})})):t=q(t,{$kind:y,index:a,frame:i})}),t={...t,sortedSwimlanesArray:L(t.swimlanes)},t}t(C,`getState`);function w(e){S.ast=e}t(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}t(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}t(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}t(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}t(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}t(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}t(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=c();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}t(M,`calculateEntityVisualProps`);function N(t,n,r){let i=c(),a=m(O(t.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},l=`<b>${h(a,r.textMaxWidth,s)}</b>`;if(t.dataInlineValue&&(o=t.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=m(o,i),o=h(o,r.textMaxWidth,s),o=o.replaceAll(` `,`&nbsp;`)),t.dataReference){let e=n.find(e=>e.name===t.dataReference?.$refText);e&&(o=e.dataBlockValue,o=o.substring(o.indexOf(`{
2
2
  `)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=m(o,i),o=h(o,r.textMaxWidth,s),o=o.replaceAll(` `,`&nbsp;`),o+=`<br/>`)}let u=o!==void 0;u&&(l+=`<br/><br/><code style="text-align: left; display: block;max-width:${r.textMaxWidth}px">${o}</code>`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=ee(l,d),p=u?f.width/3:f.width,g={content:l,width:p,height:f.height};return e.debug(`[${t.name}] ${t.entityIdentifier} text`,g),g}t(N,`calculateTextProps`);function P(e,t){let n=t,r=M(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:v,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}t(P,`decidePositionFrame`);function F(e,t,n){return t===void 0?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:n===void 0?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}t(F,`calculateX`);function I(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}t(I,`calculateMaxRight`);function L(e){return Object.values(e).sort((e,t)=>e.index-t.index)}t(L,`sortedSwimlanesArray`);function R(e,t){let n=t,r=j(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},c=F(i,o,a),l=c+s.width+T.boxPadding,u=I(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;let d={x:c,y:T.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=L(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e<p.length;e++){let t=p[e],n=p[e-1];t.y=n.y+n.height+T.swimlaneGap}return f}t(R,`evolveFramePositioned`);function z(e,t){return e===0&&t.sourceFrames.length===0}t(z,`isFirstFrame`);function B(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}t(B,`hasSourceFrame`);function V(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}t(V,`findBoxByFrame`);function H(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}t(H,`findBoxByLineIndex`);function U(e,t){let n=t;if(te(n.frame)||z(n.index,n.frame))return[];let r=V(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let i;return i=n.sourceFrame?V(e.boxes,n.sourceFrame):H(e.boxes,r.swimlane.index,n.index-1),i===void 0?[]:[{$kind:b,frame:n.frame,index:n.index,sourceBox:i,targetBox:r}]}t(U,`decidePositionRelation`);function W(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}t(W,`evolveRelationPositioned`);var ue={[_]:P,[y]:U},de={[v]:R,[b]:W};function G(t,n){let r=ue[n.$kind];if(r==null)return[];let i=r(t,n);return e.debug(`decided events`,i),i}t(G,`decide`);function K(t,n){let r=n.reduce((e,t)=>{let n=de[t.$kind];return n==null?e:n(e,t)},t);return e.debug(`evolve events`,{state:t,newState:r,events:n}),r}t(K,`evolve`);function q(e,t){return K(e,G(e,t))}t(q,`dispatch`);var J={getConfig:ce,setOptions:ie,getOptions:ae,clear:oe,setAccTitle:a,getAccTitle:p,getAccDescription:u,setAccDescription:r,setDiagramTitle:i,getDiagramTitle:d,setAst:w,getDiagramProps:E,getState:C},fe={parse:t(async t=>{let n=await re(`eventmodeling`,t);e.debug(n),J.setAst(n),ne(n,J)},`parse`)},Y=f()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}t(X,`renderD3Box`);function Z(e,t){return e>t}t(Z,`dirUpwards`);function Q(t,n,r,i){return a=>{let o=a.sourceBox.swimlane.y+n.swimlanePadding,s=a.targetBox.swimlane.y+n.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;e.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;t.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}t(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}t($,`renderD3Swimlane`);var pe={parser:fe,db:J,renderer:{draw:t(function(t,r,i,a){if(e.debug(`in eventmodeling renderer`,t+`
3
3
  `,`id:`,r,i),!Y)throw Error(`EventModeling config not found`);let s=a.db,{themeVariables:c,eventmodeling:l}=f(),u=n(`[id="${r}"]`),d=s.getDiagramProps(),p=s.getState(),m=`em-arrowhead-${r}`,h=c.emArrowhead??`#000000`;p.sortedSwimlanesArray.forEach($(u,p.maxR,d,c)),p.boxes.forEach(X(u,d)),p.relations.forEach(Q(u,d,m,c)),u.append(`defs`).append(`marker`).attr(`id`,m).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),o(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:t(e=>``,`getStyles`)};export{pe as diagram};
4
- //# sourceMappingURL=diagram-KO2AKTUF-D9IYocVR.js.map
4
+ //# sourceMappingURL=diagram-KO2AKTUF-B3yOnGTs.js.map