@epic-web/workshop-app 6.69.1 → 6.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/build/client/assets/{_-BnmXymJG.js → _-dWSrc4Ox.js} +2 -2
  2. package/build/client/assets/{_-BnmXymJG.js.map → _-dWSrc4Ox.js.map} +1 -1
  3. package/build/client/assets/{_basePickBy-D6pFkWVF.js → _basePickBy-D77BeQbR.js} +2 -2
  4. package/build/client/assets/{_basePickBy-D6pFkWVF.js.map → _basePickBy-D77BeQbR.js.map} +1 -1
  5. package/build/client/assets/{_baseUniq-BbljtzXr.js → _baseUniq-DTO-tFvD.js} +2 -2
  6. package/build/client/assets/{_baseUniq-BbljtzXr.js.map → _baseUniq-DTO-tFvD.js.map} +1 -1
  7. package/build/client/assets/{_exerciseNumber-77g7-L-x.js → _exerciseNumber-DgMb13KP.js} +2 -2
  8. package/build/client/assets/{_exerciseNumber-77g7-L-x.js.map → _exerciseNumber-DgMb13KP.js.map} +1 -1
  9. package/build/client/assets/{_exerciseNumber_._stepNumber.index-DYb7kg06.js → _exerciseNumber_._stepNumber.index-WLW-sVZ0.js} +2 -2
  10. package/build/client/assets/{_exerciseNumber_._stepNumber.index-DYb7kg06.js.map → _exerciseNumber_._stepNumber.index-WLW-sVZ0.js.map} +1 -1
  11. package/build/client/assets/{_exerciseNumber_.finished-CGoPhVVF.js → _exerciseNumber_.finished-DkAs61X_.js} +2 -2
  12. package/build/client/assets/_exerciseNumber_.finished-DkAs61X_.js.map +1 -0
  13. package/build/client/assets/_extra-fwsy2qkP.js +2 -0
  14. package/build/client/assets/_extra-fwsy2qkP.js.map +1 -0
  15. package/build/client/assets/_layout-BQ8VYaze.js +2 -0
  16. package/build/client/assets/_layout-BQ8VYaze.js.map +1 -0
  17. package/build/client/assets/_layout-DR0LQ06M.js +2 -0
  18. package/build/client/assets/_layout-DR0LQ06M.js.map +1 -0
  19. package/build/client/assets/{accordion-CzXT3k43.js → accordion-CQ7oujC6.js} +2 -2
  20. package/build/client/assets/{accordion-CzXT3k43.js.map → accordion-CQ7oujC6.js.map} +1 -1
  21. package/build/client/assets/{account-Cs3Te0is.js → account-C96cpeZR.js} +2 -2
  22. package/build/client/assets/{account-Cs3Te0is.js.map → account-C96cpeZR.js.map} +1 -1
  23. package/build/client/assets/app-CJniokic.js +2 -0
  24. package/build/client/assets/{app-TcFAQB2o.js.map → app-CJniokic.js.map} +1 -1
  25. package/build/client/assets/{arc-BHxP6xxO.js → arc-ChVm3d4e.js} +2 -2
  26. package/build/client/assets/{arc-BHxP6xxO.js.map → arc-ChVm3d4e.js.map} +1 -1
  27. package/build/client/assets/{architectureDiagram-VXUJARFQ-oEJHJt7x.js → architectureDiagram-VXUJARFQ-DkqyKZ50.js} +2 -2
  28. package/build/client/assets/{architectureDiagram-VXUJARFQ-oEJHJt7x.js.map → architectureDiagram-VXUJARFQ-DkqyKZ50.js.map} +1 -1
  29. package/build/client/assets/{blockDiagram-VD42YOAC-7xzSJqoM.js → blockDiagram-VD42YOAC-Cqa8Z0qT.js} +2 -2
  30. package/build/client/assets/{blockDiagram-VD42YOAC-7xzSJqoM.js.map → blockDiagram-VD42YOAC-Cqa8Z0qT.js.map} +1 -1
  31. package/build/client/assets/{button-CIlVtsau.js → button-Cd-ekki5.js} +2 -2
  32. package/build/client/assets/{button-CIlVtsau.js.map → button-Cd-ekki5.js.map} +1 -1
  33. package/build/client/assets/{c4Diagram-YG6GDRKO-BUdT9rCJ.js → c4Diagram-YG6GDRKO-BHQRSJ1P.js} +2 -2
  34. package/build/client/assets/{c4Diagram-YG6GDRKO-BUdT9rCJ.js.map → c4Diagram-YG6GDRKO-BHQRSJ1P.js.map} +1 -1
  35. package/build/client/assets/{cache-MJu_dqFS.js → cache-CAr50MIB.js} +2 -2
  36. package/build/client/assets/{cache-MJu_dqFS.js.map → cache-CAr50MIB.js.map} +1 -1
  37. package/build/client/assets/channel-B7uExpgv.js +2 -0
  38. package/build/client/assets/{channel-BLJkdd1O.js.map → channel-B7uExpgv.js.map} +1 -1
  39. package/build/client/assets/{chunk-4BX2VUAB-qrzenNNi.js → chunk-4BX2VUAB-BOJM4J9w.js} +2 -2
  40. package/build/client/assets/{chunk-4BX2VUAB-qrzenNNi.js.map → chunk-4BX2VUAB-BOJM4J9w.js.map} +1 -1
  41. package/build/client/assets/{chunk-55IACEB6-BOr0rES3.js → chunk-55IACEB6-CO_GT_87.js} +2 -2
  42. package/build/client/assets/{chunk-55IACEB6-BOr0rES3.js.map → chunk-55IACEB6-CO_GT_87.js.map} +1 -1
  43. package/build/client/assets/{chunk-B4BG7PRW-C2qQTBXm.js → chunk-B4BG7PRW-CqfZTumF.js} +2 -2
  44. package/build/client/assets/{chunk-B4BG7PRW-C2qQTBXm.js.map → chunk-B4BG7PRW-CqfZTumF.js.map} +1 -1
  45. package/build/client/assets/{chunk-DI55MBZ5-CSfEUcAq.js → chunk-DI55MBZ5-CxSXOmoK.js} +2 -2
  46. package/build/client/assets/{chunk-DI55MBZ5-CSfEUcAq.js.map → chunk-DI55MBZ5-CxSXOmoK.js.map} +1 -1
  47. package/build/client/assets/{chunk-FMBD7UC4-CyJoWksV.js → chunk-FMBD7UC4-ChHVMdVq.js} +2 -2
  48. package/build/client/assets/{chunk-FMBD7UC4-CyJoWksV.js.map → chunk-FMBD7UC4-ChHVMdVq.js.map} +1 -1
  49. package/build/client/assets/{chunk-QN33PNHL-BpbvTQdp.js → chunk-QN33PNHL-DKEBwj3f.js} +2 -2
  50. package/build/client/assets/{chunk-QN33PNHL-BpbvTQdp.js.map → chunk-QN33PNHL-DKEBwj3f.js.map} +1 -1
  51. package/build/client/assets/{chunk-QZHKN3VN-C2RN0CtQ.js → chunk-QZHKN3VN-Cu5tuE5n.js} +2 -2
  52. package/build/client/assets/{chunk-QZHKN3VN-C2RN0CtQ.js.map → chunk-QZHKN3VN-Cu5tuE5n.js.map} +1 -1
  53. package/build/client/assets/{chunk-TZMSLE5B-0z8lxtDn.js → chunk-TZMSLE5B-BpvH1fVS.js} +2 -2
  54. package/build/client/assets/{chunk-TZMSLE5B-0z8lxtDn.js.map → chunk-TZMSLE5B-BpvH1fVS.js.map} +1 -1
  55. package/build/client/assets/classDiagram-2ON5EDUG-BjjlpwdW.js +2 -0
  56. package/build/client/assets/{classDiagram-2ON5EDUG-_kfNpv_f.js.map → classDiagram-2ON5EDUG-BjjlpwdW.js.map} +1 -1
  57. package/build/client/assets/classDiagram-v2-WZHVMYZB-BjjlpwdW.js +2 -0
  58. package/build/client/assets/{classDiagram-v2-WZHVMYZB-_kfNpv_f.js.map → classDiagram-v2-WZHVMYZB-BjjlpwdW.js.map} +1 -1
  59. package/build/client/assets/clone-DRkw5ylZ.js +2 -0
  60. package/build/client/assets/{clone-CztDUJhf.js.map → clone-DRkw5ylZ.js.map} +1 -1
  61. package/build/client/assets/{cose-bilkent-S5V4N54A-DQM-J4RL.js → cose-bilkent-S5V4N54A-9tAqXXXx.js} +2 -2
  62. package/build/client/assets/{cose-bilkent-S5V4N54A-DQM-J4RL.js.map → cose-bilkent-S5V4N54A-9tAqXXXx.js.map} +1 -1
  63. package/build/client/assets/{dagre-6UL2VRFP-BdfvKPZ9.js → dagre-6UL2VRFP-DdQahM76.js} +2 -2
  64. package/build/client/assets/{dagre-6UL2VRFP-BdfvKPZ9.js.map → dagre-6UL2VRFP-DdQahM76.js.map} +1 -1
  65. package/build/client/assets/{db-x6v-Uxrh.js → db-DAnX-T3_.js} +2 -2
  66. package/build/client/assets/{db-x6v-Uxrh.js.map → db-DAnX-T3_.js.map} +1 -1
  67. package/build/client/assets/{diagram-PSM6KHXK-CgwBEb3G.js → diagram-PSM6KHXK-D2ghOCFR.js} +2 -2
  68. package/build/client/assets/{diagram-PSM6KHXK-CgwBEb3G.js.map → diagram-PSM6KHXK-D2ghOCFR.js.map} +1 -1
  69. package/build/client/assets/{diagram-QEK2KX5R-DEaXdLXz.js → diagram-QEK2KX5R-CVdPnwKa.js} +2 -2
  70. package/build/client/assets/{diagram-QEK2KX5R-DEaXdLXz.js.map → diagram-QEK2KX5R-CVdPnwKa.js.map} +1 -1
  71. package/build/client/assets/{diagram-S2PKOQOG-Dq5QQWqq.js → diagram-S2PKOQOG-ByHcRNai.js} +2 -2
  72. package/build/client/assets/{diagram-S2PKOQOG-Dq5QQWqq.js.map → diagram-S2PKOQOG-ByHcRNai.js.map} +1 -1
  73. package/build/client/assets/{dialog-DnpUg3VT.js → dialog-CzO65Z5w.js} +3 -3
  74. package/build/client/assets/{dialog-DnpUg3VT.js.map → dialog-CzO65Z5w.js.map} +1 -1
  75. package/build/client/assets/{diff-CxEbhF8Q.js → diff-BhWzqoVN.js} +2 -2
  76. package/build/client/assets/{diff-CxEbhF8Q.js.map → diff-BhWzqoVN.js.map} +1 -1
  77. package/build/client/assets/{diff-eAvgXb3f.js → diff-DC-wn6-x.js} +2 -2
  78. package/build/client/assets/{diff-eAvgXb3f.js.map → diff-DC-wn6-x.js.map} +1 -1
  79. package/build/client/assets/{discord-DlU9y5Iz.js → discord-BJkw0IrB.js} +2 -2
  80. package/build/client/assets/{discord-DlU9y5Iz.js.map → discord-BJkw0IrB.js.map} +1 -1
  81. package/build/client/assets/{discord-CuxZiU8E.js → discord-r3m19sUM.js} +2 -2
  82. package/build/client/assets/discord-r3m19sUM.js.map +1 -0
  83. package/build/client/assets/{epic-video-Bx8Ctiez.js → epic-video-8Hv_HMMr.js} +2 -2
  84. package/build/client/assets/{epic-video-Bx8Ctiez.js.map → epic-video-8Hv_HMMr.js.map} +1 -1
  85. package/build/client/assets/{epic-video-BVcJzJzi.js → epic-video-D0drHmgC.js} +2 -2
  86. package/build/client/assets/{epic-video-BVcJzJzi.js.map → epic-video-D0drHmgC.js.map} +1 -1
  87. package/build/client/assets/{erDiagram-Q2GNP2WA-CW73Zw0q.js → erDiagram-Q2GNP2WA-CBRWzQzK.js} +2 -2
  88. package/build/client/assets/{erDiagram-Q2GNP2WA-CW73Zw0q.js.map → erDiagram-Q2GNP2WA-CBRWzQzK.js.map} +1 -1
  89. package/build/client/assets/{error-boundary-DFBd6s0g.js → error-boundary-DVp6wKiz.js} +2 -2
  90. package/build/client/assets/{error-boundary-DFBd6s0g.js.map → error-boundary-DVp6wKiz.js.map} +1 -1
  91. package/build/client/assets/{finished-CmV4aFjA.js → finished-CiVHAeSV.js} +2 -2
  92. package/build/client/assets/{finished-CmV4aFjA.js.map → finished-CiVHAeSV.js.map} +1 -1
  93. package/build/client/assets/{flowDiagram-NV44I4VS-BbxV9VQf.js → flowDiagram-NV44I4VS-L32__tfK.js} +2 -2
  94. package/build/client/assets/{flowDiagram-NV44I4VS-BbxV9VQf.js.map → flowDiagram-NV44I4VS-L32__tfK.js.map} +1 -1
  95. package/build/client/assets/{ganttDiagram-JELNMOA3-CRBJBlE5.js → ganttDiagram-JELNMOA3-Dpp5PKJc.js} +2 -2
  96. package/build/client/assets/{ganttDiagram-JELNMOA3-CRBJBlE5.js.map → ganttDiagram-JELNMOA3-Dpp5PKJc.js.map} +1 -1
  97. package/build/client/assets/{gitGraphDiagram-NY62KEGX-CU0X3hfs.js → gitGraphDiagram-NY62KEGX-zn4IXANG.js} +2 -2
  98. package/build/client/assets/{gitGraphDiagram-NY62KEGX-CU0X3hfs.js.map → gitGraphDiagram-NY62KEGX-zn4IXANG.js.map} +1 -1
  99. package/build/client/assets/{graph-CEUh1UxC.js → graph-Da5nhwRG.js} +2 -2
  100. package/build/client/assets/{graph-CEUh1UxC.js.map → graph-Da5nhwRG.js.map} +1 -1
  101. package/build/client/assets/guide-Cinib8Ji.js +9 -0
  102. package/build/client/assets/guide-Cinib8Ji.js.map +1 -0
  103. package/build/client/assets/{index-D3zOGeBE.js → index-BKAVQvm5.js} +2 -2
  104. package/build/client/assets/{index-D3zOGeBE.js.map → index-BKAVQvm5.js.map} +1 -1
  105. package/build/client/assets/{index-BOhw3wcM.js → index-CJDOQ1bl.js} +2 -2
  106. package/build/client/assets/{index-BOhw3wcM.js.map → index-CJDOQ1bl.js.map} +1 -1
  107. package/build/client/assets/{index-B-9GR1C2.js → index-C_wcF1aP.js} +2 -2
  108. package/build/client/assets/{index-B-9GR1C2.js.map → index-C_wcF1aP.js.map} +1 -1
  109. package/build/client/assets/{index-BW8stNyh.js → index-CdzVFL-Z.js} +3 -3
  110. package/build/client/assets/{index-BW8stNyh.js.map → index-CdzVFL-Z.js.map} +1 -1
  111. package/build/client/assets/index-CmflCPTU.js +2 -0
  112. package/build/client/assets/index-CmflCPTU.js.map +1 -0
  113. package/build/client/assets/index-DuFMeXSm.js +2 -0
  114. package/build/client/assets/index-DuFMeXSm.js.map +1 -0
  115. package/build/client/assets/index-hhQHCvb9.js +2 -0
  116. package/build/client/assets/{index-EdNV8gTk.js.map → index-hhQHCvb9.js.map} +1 -1
  117. package/build/client/assets/{index-C_KjwKVt.js → index-ynYvVAOK.js} +2 -2
  118. package/build/client/assets/{index-C_KjwKVt.js.map → index-ynYvVAOK.js.map} +1 -1
  119. package/build/client/assets/{infoDiagram-WHAUD3N6-BplcSre1.js → infoDiagram-WHAUD3N6-CToPP1ur.js} +2 -2
  120. package/build/client/assets/{infoDiagram-WHAUD3N6-BplcSre1.js.map → infoDiagram-WHAUD3N6-CToPP1ur.js.map} +1 -1
  121. package/build/client/assets/{journeyDiagram-XKPGCS4Q-yxvCkf49.js → journeyDiagram-XKPGCS4Q-BBRpqEuF.js} +2 -2
  122. package/build/client/assets/{journeyDiagram-XKPGCS4Q-yxvCkf49.js.map → journeyDiagram-XKPGCS4Q-BBRpqEuF.js.map} +1 -1
  123. package/build/client/assets/{kanban-definition-3W4ZIXB7-DFEBMrRH.js → kanban-definition-3W4ZIXB7-CyGlZ-MK.js} +2 -2
  124. package/build/client/assets/{kanban-definition-3W4ZIXB7-DFEBMrRH.js.map → kanban-definition-3W4ZIXB7-CyGlZ-MK.js.map} +1 -1
  125. package/build/client/assets/{launch-editor-B2dmpkaO.js → launch-editor-D2exGfVu.js} +2 -2
  126. package/build/client/assets/{launch-editor-B2dmpkaO.js.map → launch-editor-D2exGfVu.js.map} +1 -1
  127. package/build/client/assets/{layout-CiHrgFnf.js → layout-CUEelucj.js} +2 -2
  128. package/build/client/assets/{layout-CiHrgFnf.js.map → layout-CUEelucj.js.map} +1 -1
  129. package/build/client/assets/{linear-C-81cvJP.js → linear-DzZ9bjHs.js} +2 -2
  130. package/build/client/assets/{linear-C-81cvJP.js.map → linear-DzZ9bjHs.js.map} +1 -1
  131. package/build/client/assets/{loading-CUydCGD3.js → loading-CDNzW5oO.js} +2 -2
  132. package/build/client/assets/{loading-CUydCGD3.js.map → loading-CDNzW5oO.js.map} +1 -1
  133. package/build/client/assets/{login-DvBmP_ce.js → login-mWjVXGbJ.js} +2 -2
  134. package/build/client/assets/{login-DvBmP_ce.js.map → login-mWjVXGbJ.js.map} +1 -1
  135. package/build/client/assets/manifest-970c9ad1.js +1 -0
  136. package/build/client/assets/{mdx-vrch0szL.js → mdx-BzyhMqFg.js} +3 -3
  137. package/build/client/assets/{mdx-vrch0szL.js.map → mdx-BzyhMqFg.js.map} +1 -1
  138. package/build/client/assets/{mermaid.core-D3y7PO8B.js → mermaid.core-BdxLLjl2.js} +5 -5
  139. package/build/client/assets/{mermaid.core-D3y7PO8B.js.map → mermaid.core-BdxLLjl2.js.map} +1 -1
  140. package/build/client/assets/{mindmap-definition-VGOIOE7T-VMZ6ZZlW.js → mindmap-definition-VGOIOE7T-DeKD8ncg.js} +2 -2
  141. package/build/client/assets/{mindmap-definition-VGOIOE7T-VMZ6ZZlW.js.map → mindmap-definition-VGOIOE7T-DeKD8ncg.js.map} +1 -1
  142. package/build/client/assets/{misc-DVYuZMjW.js → misc-W4055b-0.js} +2 -2
  143. package/build/client/assets/{misc-DVYuZMjW.js.map → misc-W4055b-0.js.map} +1 -1
  144. package/build/client/assets/{nav-chevrons-DlNUibJV.js → nav-chevrons-Dk4GtZwQ.js} +2 -2
  145. package/build/client/assets/{nav-chevrons-DlNUibJV.js.map → nav-chevrons-Dk4GtZwQ.js.map} +1 -1
  146. package/build/client/assets/{offline-videos-Do9PBh87.js → offline-videos-BP7_xJkO.js} +2 -2
  147. package/build/client/assets/{offline-videos-Do9PBh87.js.map → offline-videos-BP7_xJkO.js.map} +1 -1
  148. package/build/client/assets/{onboarding-indicator-CVwXz3Cn.js → onboarding-indicator-B-XR90_G.js} +2 -2
  149. package/build/client/assets/{onboarding-indicator-CVwXz3Cn.js.map → onboarding-indicator-B-XR90_G.js.map} +1 -1
  150. package/build/client/assets/{pieDiagram-ADFJNKIX-CKbrBdQs.js → pieDiagram-ADFJNKIX-BQ4sFDrB.js} +2 -2
  151. package/build/client/assets/{pieDiagram-ADFJNKIX-CKbrBdQs.js.map → pieDiagram-ADFJNKIX-BQ4sFDrB.js.map} +1 -1
  152. package/build/client/assets/playground-DmEAkxG1.js +2 -0
  153. package/build/client/assets/playground-DmEAkxG1.js.map +1 -0
  154. package/build/client/assets/{playground-window-D9a7P7rH.js → playground-window-x2mQ5o1O.js} +2 -2
  155. package/build/client/assets/{playground-window-D9a7P7rH.js.map → playground-window-x2mQ5o1O.js.map} +1 -1
  156. package/build/client/assets/{preferences-BCvK10k2.js → preferences-D6HQ5bK1.js} +2 -2
  157. package/build/client/assets/{preferences-BCvK10k2.js.map → preferences-D6HQ5bK1.js.map} +1 -1
  158. package/build/client/assets/{preview-CiDtuQCc.js → preview-fhmjENlm.js} +2 -2
  159. package/build/client/assets/{preview-CiDtuQCc.js.map → preview-fhmjENlm.js.map} +1 -1
  160. package/build/client/assets/{product-GLsnY1u3.js → product-CvyMpYD_.js} +2 -2
  161. package/build/client/assets/{product-GLsnY1u3.js.map → product-CvyMpYD_.js.map} +1 -1
  162. package/build/client/assets/{progress-fKsNxmmt.js → progress-ILaVQtOO.js} +2 -2
  163. package/build/client/assets/{progress-fKsNxmmt.js.map → progress-ILaVQtOO.js.map} +1 -1
  164. package/build/client/assets/{progress-bar-B27isaGl.js → progress-bar-DpWhcyhC.js} +2 -2
  165. package/build/client/assets/{progress-bar-B27isaGl.js.map → progress-bar-DpWhcyhC.js.map} +1 -1
  166. package/build/client/assets/{quadrantDiagram-AYHSOK5B-Bb5EtkPw.js → quadrantDiagram-AYHSOK5B-QnjodHfi.js} +2 -2
  167. package/build/client/assets/{quadrantDiagram-AYHSOK5B-Bb5EtkPw.js.map → quadrantDiagram-AYHSOK5B-QnjodHfi.js.map} +1 -1
  168. package/build/client/assets/{requirementDiagram-UZGBJVZJ-BNsXiFG2.js → requirementDiagram-UZGBJVZJ-mL9Oeda0.js} +2 -2
  169. package/build/client/assets/{requirementDiagram-UZGBJVZJ-BNsXiFG2.js.map → requirementDiagram-UZGBJVZJ-mL9Oeda0.js.map} +1 -1
  170. package/build/client/assets/{root-Ch373D3a.js → root-Bktp3RtN.js} +2 -2
  171. package/build/client/assets/{root-Ch373D3a.js.map → root-Bktp3RtN.js.map} +1 -1
  172. package/build/client/assets/{sankeyDiagram-TZEHDZUN-qlPqhk7P.js → sankeyDiagram-TZEHDZUN-B8_zpQVR.js} +2 -2
  173. package/build/client/assets/{sankeyDiagram-TZEHDZUN-qlPqhk7P.js.map → sankeyDiagram-TZEHDZUN-B8_zpQVR.js.map} +1 -1
  174. package/build/client/assets/{sequenceDiagram-WL72ISMW-C3d31B7K.js → sequenceDiagram-WL72ISMW-BDd5tjuk.js} +2 -2
  175. package/build/client/assets/{sequenceDiagram-WL72ISMW-C3d31B7K.js.map → sequenceDiagram-WL72ISMW-BDd5tjuk.js.map} +1 -1
  176. package/build/client/assets/{set-playground-DeMY9i7p.js → set-playground-BSGwH9dH.js} +2 -2
  177. package/build/client/assets/{set-playground-DeMY9i7p.js.map → set-playground-BSGwH9dH.js.map} +1 -1
  178. package/build/client/assets/{stateDiagram-FKZM4ZOC-C1eIQm_7.js → stateDiagram-FKZM4ZOC-DGPNpRbW.js} +2 -2
  179. package/build/client/assets/{stateDiagram-FKZM4ZOC-C1eIQm_7.js.map → stateDiagram-FKZM4ZOC-DGPNpRbW.js.map} +1 -1
  180. package/build/client/assets/stateDiagram-v2-4FDKWEC3-DxaFuKxL.js +2 -0
  181. package/build/client/assets/{stateDiagram-v2-4FDKWEC3-CAmcrDIS.js.map → stateDiagram-v2-4FDKWEC3-DxaFuKxL.js.map} +1 -1
  182. package/build/client/assets/status-indicator-C6DiLYL5.js +2 -0
  183. package/build/client/assets/status-indicator-C6DiLYL5.js.map +1 -0
  184. package/build/client/assets/tailwind-B97VvnKU.css +1 -0
  185. package/build/client/assets/test-DtQCjBBX.js +2 -0
  186. package/build/client/assets/{test-CdEKoDoS.js.map → test-DtQCjBBX.js.map} +1 -1
  187. package/build/client/assets/{tests-xD9PppmM.js → tests-fDISNsE-.js} +2 -2
  188. package/build/client/assets/{tests-xD9PppmM.js.map → tests-fDISNsE-.js.map} +1 -1
  189. package/build/client/assets/{timeline-definition-IT6M3QCI-Di_ZGPjO.js → timeline-definition-IT6M3QCI-BnMOh0dz.js} +2 -2
  190. package/build/client/assets/{timeline-definition-IT6M3QCI-Di_ZGPjO.js.map → timeline-definition-IT6M3QCI-BnMOh0dz.js.map} +1 -1
  191. package/build/client/assets/{tooltip-Chzzs4KB.js → tooltip-Tlsyx2YO.js} +2 -2
  192. package/build/client/assets/{tooltip-Chzzs4KB.js.map → tooltip-Tlsyx2YO.js.map} +1 -1
  193. package/build/client/assets/{treemap-KMMF4GRG-DZrMUxqR.js → treemap-KMMF4GRG-Ds3XkDP-.js} +2 -2
  194. package/build/client/assets/{treemap-KMMF4GRG-DZrMUxqR.js.map → treemap-KMMF4GRG-Ds3XkDP-.js.map} +1 -1
  195. package/build/client/assets/{workspace-structure-i_5Tiikk.js → workspace-structure-B6Rpl-B2.js} +2 -2
  196. package/build/client/assets/{workspace-structure-i_5Tiikk.js.map → workspace-structure-B6Rpl-B2.js.map} +1 -1
  197. package/build/client/assets/{xychartDiagram-PRI3JC2R-BxuKJVc7.js → xychartDiagram-PRI3JC2R-DH_JPNZp.js} +2 -2
  198. package/build/client/assets/{xychartDiagram-PRI3JC2R-BxuKJVc7.js.map → xychartDiagram-PRI3JC2R-DH_JPNZp.js.map} +1 -1
  199. package/build/server/index.js +690 -114
  200. package/build/server/index.js.map +1 -1
  201. package/package.json +3 -3
  202. package/build/client/assets/_exerciseNumber_.finished-CGoPhVVF.js.map +0 -1
  203. package/build/client/assets/_extra-BZPB_nWQ.js +0 -2
  204. package/build/client/assets/_extra-BZPB_nWQ.js.map +0 -1
  205. package/build/client/assets/_layout-BxQPZuW6.js +0 -2
  206. package/build/client/assets/_layout-BxQPZuW6.js.map +0 -1
  207. package/build/client/assets/_layout-yxOoJ6Yg.js +0 -2
  208. package/build/client/assets/_layout-yxOoJ6Yg.js.map +0 -1
  209. package/build/client/assets/app-TcFAQB2o.js +0 -2
  210. package/build/client/assets/channel-BLJkdd1O.js +0 -2
  211. package/build/client/assets/classDiagram-2ON5EDUG-_kfNpv_f.js +0 -2
  212. package/build/client/assets/classDiagram-v2-WZHVMYZB-_kfNpv_f.js +0 -2
  213. package/build/client/assets/clone-CztDUJhf.js +0 -2
  214. package/build/client/assets/discord-CuxZiU8E.js.map +0 -1
  215. package/build/client/assets/guide-B4wAqzq_.js +0 -9
  216. package/build/client/assets/guide-B4wAqzq_.js.map +0 -1
  217. package/build/client/assets/index-C6vQqVxz.js +0 -2
  218. package/build/client/assets/index-C6vQqVxz.js.map +0 -1
  219. package/build/client/assets/index-EdNV8gTk.js +0 -2
  220. package/build/client/assets/manifest-34df6718.js +0 -1
  221. package/build/client/assets/playground-C_aP_pE8.js +0 -2
  222. package/build/client/assets/playground-C_aP_pE8.js.map +0 -1
  223. package/build/client/assets/stateDiagram-v2-4FDKWEC3-CAmcrDIS.js +0 -2
  224. package/build/client/assets/tailwind-D_K12wB7.css +0 -1
  225. package/build/client/assets/test-CdEKoDoS.js +0 -2
@@ -1,5 +1,5 @@
1
- import{_ as w,aw as F,ax as Y,ay as _,az as H,l as i,c as V,aA as z,aB as U,ai as $,an as q,aj as P,ah as K,aC as Q,aD as W,aE as Z}from"./mermaid.core-D3y7PO8B.js";import{G as B}from"./graph-CEUh1UxC.js";import{l as I}from"./layout-CiHrgFnf.js";import{i as b}from"./_baseUniq-BbljtzXr.js";import{c as L}from"./clone-CztDUJhf.js";import{m as A}from"./_basePickBy-D6pFkWVF.js";import"./preload-helper-BXl3LOEh.js";import"./misc-DVYuZMjW.js";import"./jsx-runtime-C5WNSv3b.js";import"./index-CqIc3cxq.js";import"./chunk-EPOLDU6W-BCLmut3y.js";function h(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return b(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),r={v:t};return b(n)||(r.value=n),b(a)||(r.parent=a),r})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return b(t.name)||(a.name=t.name),b(n)||(a.value=n),a})}var d=new Map,X=new Map,J=new Map,te=w(()=>{X.clear(),J.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=X.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=w((e,t)=>{const n=X.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{i.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const r=t.children(e)||[];e!==a&&r.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",r),r.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);i.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(i.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",a,"data",t.node(e),a),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);i.debug("Copying Edges",u),u.forEach(c=>{i.info("Edge",c);const m=t.edge(c.v,c.w,c.name);i.info("Edge data",m,a);try{se(c,a)?(i.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(v){i.error(v)}})}i.debug("Removing node",o),t.removeNode(o)})},"copy"),R=w((e,t)=>{const n=t.children(e);let a=[...n];for(const r of n)J.set(r,e),a=[...a,...R(r,t)];return a},"extractDescendants"),ie=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),r=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=r.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(i.trace("Searching children of id ",e,a),a.length<1)return e;let r;for(const o of a){const l=C(o,t,n),u=ie(t,n,l);if(l)if(u.length>0)r=l;else return l}return r},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),re=w((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),X.set(n,R(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),r=e.edges();a.length>0?(i.debug("Cluster identified",n,X),r.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",X.get(n)),d.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,X)});for(let n of d.keys()){const a=d.get(n).id,r=e.parent(a);r!==n&&d.has(r)&&!d.get(r).externalConnections&&(d.get(n).id=r)}e.edges().forEach(function(n){const a=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,o=n.w;if(i.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const l=e.parent(r);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}i.warn("Fix Replacing with XXX",r,o,n.name),e.setEdge(r,o,a,n.name)}}),i.warn("Adjusted Graph",h(e)),T(e,0),i.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(i.warn("extractor - ",t,h(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),a=!1;for(const r of n){const o=e.children(r);a=a||o.length>0}if(!a){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,d,d.has(r)&&!d.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!d.has(r))i.debug("Not a cluster",r,t);else if(!d.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(r)?.clusterData?.dir&&(l=d.get(r).clusterData.dir,i.warn("Fixing dir",d.get(r).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",h(e)),G(r,e,u,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:d.get(r).clusterData,label:d.get(r).label,graph:u}),i.warn("New graph after copy node: (",r,")",h(u)),i.debug("Old graph after copy",h(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!d.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(d);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const o=e.node(r);i.warn(" Now next level",r,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),M=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const r=e.children(a),o=M(e,r);n=[...n,...o]}),n},"sorter"),oe=w(e=>M(e,e.children()),"sortNodesByHierarchy"),j=w(async(e,t,n,a,r,o)=>{i.warn("Graph in recursive render:XAX",h(t),r);const l=t.graph().rankdir;i.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),v=u.insert("g").attr("class","edgeLabels"),p=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(r!==void 0){const g=JSON.parse(JSON.stringify(r.clusterData));i.trace(`Setting data for parent cluster XXX
1
+ import{_ as w,aw as F,ax as Y,ay as _,az as H,l as i,c as V,aA as z,aB as U,ai as $,an as q,aj as P,ah as K,aC as Q,aD as W,aE as Z}from"./mermaid.core-BdxLLjl2.js";import{G as B}from"./graph-Da5nhwRG.js";import{l as I}from"./layout-CUEelucj.js";import{i as b}from"./_baseUniq-DTO-tFvD.js";import{c as L}from"./clone-DRkw5ylZ.js";import{m as A}from"./_basePickBy-D77BeQbR.js";import"./preload-helper-BXl3LOEh.js";import"./misc-W4055b-0.js";import"./jsx-runtime-C5WNSv3b.js";import"./index-CqIc3cxq.js";import"./chunk-EPOLDU6W-BCLmut3y.js";function h(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return b(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),r={v:t};return b(n)||(r.value=n),b(a)||(r.parent=a),r})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return b(t.name)||(a.name=t.name),b(n)||(a.value=n),a})}var d=new Map,X=new Map,J=new Map,te=w(()=>{X.clear(),J.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=X.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=w((e,t)=>{const n=X.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{i.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const r=t.children(e)||[];e!==a&&r.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",r),r.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);i.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(i.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",a,"data",t.node(e),a),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);i.debug("Copying Edges",u),u.forEach(c=>{i.info("Edge",c);const m=t.edge(c.v,c.w,c.name);i.info("Edge data",m,a);try{se(c,a)?(i.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(v){i.error(v)}})}i.debug("Removing node",o),t.removeNode(o)})},"copy"),R=w((e,t)=>{const n=t.children(e);let a=[...n];for(const r of n)J.set(r,e),a=[...a,...R(r,t)];return a},"extractDescendants"),ie=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),r=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=r.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(i.trace("Searching children of id ",e,a),a.length<1)return e;let r;for(const o of a){const l=C(o,t,n),u=ie(t,n,l);if(l)if(u.length>0)r=l;else return l}return r},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),re=w((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),X.set(n,R(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),r=e.edges();a.length>0?(i.debug("Cluster identified",n,X),r.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",X.get(n)),d.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,X)});for(let n of d.keys()){const a=d.get(n).id,r=e.parent(a);r!==n&&d.has(r)&&!d.get(r).externalConnections&&(d.get(n).id=r)}e.edges().forEach(function(n){const a=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,o=n.w;if(i.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const l=e.parent(r);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}i.warn("Fix Replacing with XXX",r,o,n.name),e.setEdge(r,o,a,n.name)}}),i.warn("Adjusted Graph",h(e)),T(e,0),i.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(i.warn("extractor - ",t,h(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),a=!1;for(const r of n){const o=e.children(r);a=a||o.length>0}if(!a){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,d,d.has(r)&&!d.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!d.has(r))i.debug("Not a cluster",r,t);else if(!d.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(r)?.clusterData?.dir&&(l=d.get(r).clusterData.dir,i.warn("Fixing dir",d.get(r).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",h(e)),G(r,e,u,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:d.get(r).clusterData,label:d.get(r).label,graph:u}),i.warn("New graph after copy node: (",r,")",h(u)),i.debug("Old graph after copy",h(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!d.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(d);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const o=e.node(r);i.warn(" Now next level",r,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),M=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const r=e.children(a),o=M(e,r);n=[...n,...o]}),n},"sorter"),oe=w(e=>M(e,e.children()),"sortNodesByHierarchy"),j=w(async(e,t,n,a,r,o)=>{i.warn("Graph in recursive render:XAX",h(t),r);const l=t.graph().rankdir;i.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),v=u.insert("g").attr("class","edgeLabels"),p=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(r!==void 0){const g=JSON.parse(JSON.stringify(r.clusterData));i.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,f,`
3
3
  data=`,g.height,`
4
4
  Parent cluster`,r.height),t.setNode(r.id,g),t.parent(f)||(i.trace("Setting parent",f,r.id),t.setParent(f,r.id,g))}if(i.info("(Insert) Node XXX"+f+": "+JSON.stringify(t.node(f))),s?.clusterNode){i.info("Cluster identified XBX",f,s.width,t.node(f));const{ranksep:g,nodesep:E}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:g+25,nodesep:E});const N=await j(p,s.graph,n,a,t.node(f),o),x=N.elem;z(s,x),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",f,"width",s.width,"height",s.height),U(x,s)}else t.children(f).length>0?(i.trace("Cluster - the non recursive path XBX",f,s.id,s,s.width,"Graph:",t),i.trace(C(s.id,t)),d.set(s.id,{id:C(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",f,p,t.node(f),l),await $(p,t.node(f),{config:o,dir:l}))})),await w(async()=>{const f=t.edges().map(async function(s){const g=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",d,"ids:",s.v,s.w,"Translating: ",d.get(s.v),d.get(s.w)),await Z(v,g)});await Promise.all(f)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(h(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(h(t)));let O=0,{subGraphTitleTotalMargin:S}=q(o);return await Promise.all(oe(t).map(async function(f){const s=t.node(f);if(i.info("Position XBX => "+f+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s?.clusterNode)s.y+=S,i.info("A tainted cluster node XBX1",f,s.id,s.width,s.height,s.x,s.y,t.parent(f)),d.get(s.id).node=s,P(s);else if(t.children(f).length>0){i.info("A pure cluster node XBX1",f,s.id,s.x,s.y,s.width,s.height,t.parent(f)),s.height+=S,t.node(s.parentId);const g=s?.padding/2||0,E=s?.labelBBox?.height||0,N=E-g||0;i.debug("OffsetY",N,"labelHeight",E,"halfPadding",g),await K(c,s),d.get(s.id).node=s}else{const g=t.node(s.parentId);s.y+=S/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",g,g?.offsetY,s),P(s)}})),t.edges().forEach(function(f){const s=t.edge(f);i.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=S/2);const g=t.node(f.v);var E=t.node(f.w);const N=Q(m,s,d,n,g,E,a);W(s,N)}),t.nodes().forEach(function(f){const s=t.node(f);i.info(f,s.type,s.diff),s.isGroup&&(O=s.diff)}),i.warn("Returning from recursive render XAX",u,O),{elem:u,diff:O}},"recursiveRender"),pe=w(async(e,t)=>{const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select("g");F(a,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(o=>{n.setNode(o.id,{...o}),o.parentId&&n.setParent(o.id,o.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(o=>{if(o.start===o.end){const l=o.start,u=l+"---"+l+"---1",c=l+"---"+l+"---2",m=n.node(l);n.setNode(u,{domId:u,id:u,parentId:m.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(u,m.parentId),n.setNode(c,{domId:c,id:c,parentId:m.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(c,m.parentId);const v=structuredClone(o),p=structuredClone(o),y=structuredClone(o);v.label="",v.arrowTypeEnd="none",v.id=l+"-cyclic-special-1",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=l+"-cyclic-special-mid",y.label="",m.isGroup&&(v.fromCluster=l,y.toCluster=l),y.id=l+"-cyclic-special-2",y.arrowTypeStart="none",n.setEdge(l,u,v,l+"-cyclic-special-0"),n.setEdge(u,c,p,l+"-cyclic-special-1"),n.setEdge(c,l,y,l+"-cyc<lic-special-2")}else n.setEdge(o.start,o.end,{...o},o.id)}),i.warn("Graph at first:",JSON.stringify(h(n))),re(n),i.warn("Graph after XAX:",JSON.stringify(h(n)));const r=V();await j(a,n,e.type,e.diagramId,void 0,r)},"render");export{pe as render};
5
- //# sourceMappingURL=dagre-6UL2VRFP-BdfvKPZ9.js.map
5
+ //# sourceMappingURL=dagre-6UL2VRFP-DdQahM76.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dagre-6UL2VRFP-BdfvKPZ9.js","sources":["../../../../../node_modules/dagre-d3-es/src/graphlib/json.js","../../../../../node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.mjs"],"sourcesContent":["import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\nexport { write, read };\n\nfunction write(g) {\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\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\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\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\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\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-QXUST7PY.mjs\";\nimport \"./chunk-HN2XXSSU.mjs\";\nimport {\n clear,\n clear2 as clear3,\n insertCluster,\n insertNode,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-JZLCHNYA.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-CVBHYZKI.mjs\";\nimport \"./chunk-ATLVNIR6.mjs\";\nimport \"./chunk-JA3XYJ7Z.mjs\";\nimport \"./chunk-S3R3BYOJ.mjs\";\nimport {\n getConfig2 as getConfig\n} from \"./chunk-ABZYJK2D.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.id = nodeId + \"-cyclic-special-1\";\n edgeMid.arrowTypeStart = \"none\";\n edgeMid.arrowTypeEnd = \"none\";\n edgeMid.id = nodeId + \"-cyclic-special-mid\";\n edge2.label = \"\";\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"],"names":["write","g","json","writeNodes","writeEdges","_.isUndefined","_.clone","_.map","v","nodeValue","parent","node","e","edgeValue","edge","clusterDb","descendants","parents","clear4","__name","isDescendant","id","ancestorId","ancestorDescendants","log","edgeInCluster","clusterId","clusterDescendants","copy","graph","newGraph","rootId","nodes","data","edges","data2","extractDescendants","children","res","child","findCommonEdges","id1","id2","edges1","edges2","edges1Prim","edges2Prim","edgeIn1","findNonClusterChild","reserve","_id","commonEdges","getAnchorId","adjustClustersAndEdges","depth","d1","d2","nonClusterChild","w","graphlibJson.write","extractor","hasChildren","dir","clusterGraph","graphlib.Graph","sorter","result","sorted","sortNodesByHierarchy","recursiveRender","_elem","diagramType","parentCluster","siteConfig","graphlibJson2.write","elem","clusters","edgePaths","edgeLabels","ranksep","nodesep","o","newEl","updateNodeBounds","setNodeElem","insertNode","edgePromises","insertEdgeLabel","dagreLayout","diff","subGraphTitleTotalMargin","getSubGraphTitleMargins","positionNode","halfPadding","labelHeight","offsetY","insertCluster","point","startNode","endNode","paths","insertEdge","positionEdgeLabel","n","render","data4Layout","svg","graphlib2.Graph","element","markers_default","cl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ASJ,EAAS,mBAAmB,EAC3EpF,EAAM,QAAQsF,EAAYF,EAAQK,EAAOL,EAAS,oBAAoB,CACxE,MACEpF,EAAM,QAAQf,EAAK,MAAOA,EAAK,IAAK,CAAE,GAAGA,CAAI,EAAIA,EAAK,EAAE,CAE5D,CAAC,EACDU,EAAI,KAAK,kBAAmB,KAAK,UAAUkD,EAAoB7C,CAAK,CAAC,CAAC,EACtEwB,GAAuBxB,CAAK,EAC5BL,EAAI,KAAK,mBAAoB,KAAK,UAAUkD,EAAoB7C,CAAK,CAAC,CAAC,EACvE,MAAM4C,EAAa8C,EAAS,EAC5B,MAAMlD,EACJuC,EACA/E,EACA4E,EAAY,KACZA,EAAY,UACZ,OACAhC,CACJ,CACA,EAAG,QAAQ","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"dagre-6UL2VRFP-DdQahM76.js","sources":["../../../../../node_modules/dagre-d3-es/src/graphlib/json.js","../../../../../node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.mjs"],"sourcesContent":["import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\nexport { write, read };\n\nfunction write(g) {\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\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\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\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\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\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-QXUST7PY.mjs\";\nimport \"./chunk-HN2XXSSU.mjs\";\nimport {\n clear,\n clear2 as clear3,\n insertCluster,\n insertNode,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-JZLCHNYA.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-CVBHYZKI.mjs\";\nimport \"./chunk-ATLVNIR6.mjs\";\nimport \"./chunk-JA3XYJ7Z.mjs\";\nimport \"./chunk-S3R3BYOJ.mjs\";\nimport {\n getConfig2 as getConfig\n} from \"./chunk-ABZYJK2D.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.id = nodeId + \"-cyclic-special-1\";\n edgeMid.arrowTypeStart = \"none\";\n edgeMid.arrowTypeEnd = \"none\";\n edgeMid.id = nodeId + \"-cyclic-special-mid\";\n edge2.label = \"\";\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"],"names":["write","g","json","writeNodes","writeEdges","_.isUndefined","_.clone","_.map","v","nodeValue","parent","node","e","edgeValue","edge","clusterDb","descendants","parents","clear4","__name","isDescendant","id","ancestorId","ancestorDescendants","log","edgeInCluster","clusterId","clusterDescendants","copy","graph","newGraph","rootId","nodes","data","edges","data2","extractDescendants","children","res","child","findCommonEdges","id1","id2","edges1","edges2","edges1Prim","edges2Prim","edgeIn1","findNonClusterChild","reserve","_id","commonEdges","getAnchorId","adjustClustersAndEdges","depth","d1","d2","nonClusterChild","w","graphlibJson.write","extractor","hasChildren","dir","clusterGraph","graphlib.Graph","sorter","result","sorted","sortNodesByHierarchy","recursiveRender","_elem","diagramType","parentCluster","siteConfig","graphlibJson2.write","elem","clusters","edgePaths","edgeLabels","ranksep","nodesep","o","newEl","updateNodeBounds","setNodeElem","insertNode","edgePromises","insertEdgeLabel","dagreLayout","diff","subGraphTitleTotalMargin","getSubGraphTitleMargins","positionNode","halfPadding","labelHeight","offsetY","insertCluster","point","startNode","endNode","paths","insertEdge","positionEdgeLabel","n","render","data4Layout","svg","graphlib2.Graph","element","markers_default","clear3","clear2","clear","nodeId","specialId1","specialId2","edge1","edgeMid","edge2","getConfig"],"mappings":"2hBAKA,SAASA,EAAMC,EAAG,CAChB,IAAIC,EAAO,CACT,QAAS,CACP,SAAUD,EAAE,WAAU,EACtB,WAAYA,EAAE,aAAY,EAC1B,SAAUA,EAAE,WAAU,CAC5B,EACI,MAAOE,GAAWF,CAAC,EACnB,MAAOG,GAAWH,CAAC,CACvB,EACE,OAAKI,EAAcJ,EAAE,MAAK,CAAE,IAC1BC,EAAK,MAAQI,EAAQL,EAAE,MAAK,CAAE,GAEzBC,CACT,CAEA,SAASC,GAAWF,EAAG,CACrB,OAAOM,EAAMN,EAAE,MAAK,EAAI,SAAUO,EAAG,CACnC,IAAIC,EAAYR,EAAE,KAAKO,CAAC,EACpBE,EAAST,EAAE,OAAOO,CAAC,EACnBG,EAAO,CAAE,EAAGH,CAAC,EACjB,OAAKH,EAAcI,CAAS,IA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-C5WNSv3b.js";import{I as a}from"./misc-DVYuZMjW.js";import{S as i}from"./tooltip-Chzzs4KB.js";import{L as n}from"./launch-editor-B2dmpkaO.js";import"./index-CqIc3cxq.js";import"./index-vDCSPjrM.js";import"./progress-bar-B27isaGl.js";import"./pe-CIZUOJMr.js";import"./root-loader-BOzEMapJ.js";const g=s(function({loaderData:r}){const{db:o,filepath:t}=r;return e.jsxs("main",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Database"}),e.jsx("div",{className:"prose mt-4",children:e.jsxs("callout-danger",{children:[e.jsx("strong",{children:"Warning:"})," Editing the database directly can corrupt your data. Be very careful!"]})}),e.jsxs(n,{file:t,className:"flex max-w-full items-center gap-2",children:[e.jsx(i,{content:"Open the database file in your editor",children:e.jsx(a,{name:"Files",className:"h-4 w-4",title:"Open in editor"})}),e.jsx("span",{className:"truncate",title:t,children:t})]}),e.jsx("pre",{className:"bg-muted text-foreground mt-4 max-h-[400px] w-full overflow-auto rounded border p-4 text-sm",children:JSON.stringify(o,null,2)})]})});export{g as default};
2
- //# sourceMappingURL=db-x6v-Uxrh.js.map
1
+ import{w as s}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{I as a}from"./misc-W4055b-0.js";import{S as i}from"./tooltip-Tlsyx2YO.js";import{L as n}from"./launch-editor-D2exGfVu.js";import"./index-CqIc3cxq.js";import"./index-vDCSPjrM.js";import"./progress-bar-DpWhcyhC.js";import"./pe-CIZUOJMr.js";import"./root-loader-BOzEMapJ.js";const g=s(function({loaderData:r}){const{db:o,filepath:t}=r;return e.jsxs("main",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Database"}),e.jsx("div",{className:"prose mt-4",children:e.jsxs("callout-danger",{children:[e.jsx("strong",{children:"Warning:"})," Editing the database directly can corrupt your data. Be very careful!"]})}),e.jsxs(n,{file:t,className:"flex max-w-full items-center gap-2",children:[e.jsx(i,{content:"Open the database file in your editor",children:e.jsx(a,{name:"Files",className:"h-4 w-4",title:"Open in editor"})}),e.jsx("span",{className:"truncate",title:t,children:t})]}),e.jsx("pre",{className:"bg-muted text-foreground mt-4 max-h-[400px] w-full overflow-auto rounded border p-4 text-sm",children:JSON.stringify(o,null,2)})]})});export{g as default};
2
+ //# sourceMappingURL=db-DAnX-T3_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"db-x6v-Uxrh.js","sources":["../../../app/routes/admin+/db.tsx"],"sourcesContent":["import { loadJSON } from '@epic-web/workshop-utils/data-storage.server'\nimport { readDb } from '@epic-web/workshop-utils/db.server'\nimport { Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\nimport { LaunchEditor } from '../launch-editor.tsx'\nimport { type Route } from './+types/db.ts'\n\nexport async function loader() {\n\tensureUndeployed()\n\tconst db = await readDb()\n\tconst { path: filepath } = await loadJSON()\n\n\treturn { db, filepath }\n}\n\nexport default function DbRoute({ loaderData }: Route.ComponentProps) {\n\tconst { db, filepath } = loaderData\n\treturn (\n\t\t<main>\n\t\t\t<h1 className=\"text-2xl font-bold\">Database</h1>\n\t\t\t<div className=\"prose mt-4\">\n\t\t\t\t<callout-danger>\n\t\t\t\t\t<strong>Warning:</strong> Editing the database directly can corrupt\n\t\t\t\t\tyour data. Be very careful!\n\t\t\t\t</callout-danger>\n\t\t\t</div>\n\t\t\t<LaunchEditor\n\t\t\t\tfile={filepath}\n\t\t\t\tclassName=\"flex max-w-full items-center gap-2\"\n\t\t\t>\n\t\t\t\t<SimpleTooltip content=\"Open the database file in your editor\">\n\t\t\t\t\t<Icon name=\"Files\" className=\"h-4 w-4\" title=\"Open in editor\" />\n\t\t\t\t</SimpleTooltip>\n\t\t\t\t<span className=\"truncate\" title={filepath}>\n\t\t\t\t\t{filepath}\n\t\t\t\t</span>\n\t\t\t</LaunchEditor>\n\t\t\t<pre className=\"bg-muted text-foreground mt-4 max-h-[400px] w-full overflow-auto rounded border p-4 text-sm\">\n\t\t\t\t{JSON.stringify(db, null, 2)}\n\t\t\t</pre>\n\t\t</main>\n\t)\n}\n"],"names":["db","_UNSAFE_withComponentProps","loaderData","filepath","children","jsx","className","jsxs","LaunchEditor","file","SimpleTooltip","content","Icon","name","title","stringify"],"mappings":"sXAgBA,MAAAA,EAAAC,EAAA,SAAgC,CAAEC,WAAAA,CAAW,EAAyB,CACrE,KAAM,CAAEF,GAAAA,EAAIG,SAAAA,CAAS,EAAID,EACzB,cACE,OAAA,CACAE,SAAA,CAAAC,EAAAA,IAAC,KAAA,CAAGC,UAAU,qBAAqBF,SAAA,UAAA,CAAQ,EAC3CC,EAAAA,IAAC,MAAA,CAAIC,UAAU,aACdF,gBAAC,iBAAA,CACAA,SAAA,CAAAC,EAAAA,IAAC,UAAOD,SAAA,WAAQ,EAAS,wEAAA,EAE1B,CAAA,CACD,EACAG,EAAAA,KAACC,EAAA,CACAC,KAAMN,EACNG,UAAU,qCAEVF,SAAA,CAAAC,EAAAA,IAACK,EAAA,CAAcC,QAAQ,wCACtBP,SAAAC,EAAAA,IAACO,EAAA,CAAKC,KAAK,QAAQP,UAAU,UAAUQ,MAAM,iBAAiB,CAAA,CAC/D,QACC,OAAA,CAAKR,UAAU,WAAWQ,MAAOX,EAChCC,SAAAD,CAAA,CACF,CAAA,CAAA,CACD,EACAE,EAAAA,IAAC,OAAIC,UAAU,8FACbF,cAAKW,UAAUf,EAAI,KAAM,CAAC,CAAA,CAC5B,CAAA,CAAA,CACD,CAEF,CAAA"}
1
+ {"version":3,"file":"db-DAnX-T3_.js","sources":["../../../app/routes/admin+/db.tsx"],"sourcesContent":["import { loadJSON } from '@epic-web/workshop-utils/data-storage.server'\nimport { readDb } from '@epic-web/workshop-utils/db.server'\nimport { Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\nimport { LaunchEditor } from '../launch-editor.tsx'\nimport { type Route } from './+types/db.ts'\n\nexport async function loader() {\n\tensureUndeployed()\n\tconst db = await readDb()\n\tconst { path: filepath } = await loadJSON()\n\n\treturn { db, filepath }\n}\n\nexport default function DbRoute({ loaderData }: Route.ComponentProps) {\n\tconst { db, filepath } = loaderData\n\treturn (\n\t\t<main>\n\t\t\t<h1 className=\"text-2xl font-bold\">Database</h1>\n\t\t\t<div className=\"prose mt-4\">\n\t\t\t\t<callout-danger>\n\t\t\t\t\t<strong>Warning:</strong> Editing the database directly can corrupt\n\t\t\t\t\tyour data. Be very careful!\n\t\t\t\t</callout-danger>\n\t\t\t</div>\n\t\t\t<LaunchEditor\n\t\t\t\tfile={filepath}\n\t\t\t\tclassName=\"flex max-w-full items-center gap-2\"\n\t\t\t>\n\t\t\t\t<SimpleTooltip content=\"Open the database file in your editor\">\n\t\t\t\t\t<Icon name=\"Files\" className=\"h-4 w-4\" title=\"Open in editor\" />\n\t\t\t\t</SimpleTooltip>\n\t\t\t\t<span className=\"truncate\" title={filepath}>\n\t\t\t\t\t{filepath}\n\t\t\t\t</span>\n\t\t\t</LaunchEditor>\n\t\t\t<pre className=\"bg-muted text-foreground mt-4 max-h-[400px] w-full overflow-auto rounded border p-4 text-sm\">\n\t\t\t\t{JSON.stringify(db, null, 2)}\n\t\t\t</pre>\n\t\t</main>\n\t)\n}\n"],"names":["db","_UNSAFE_withComponentProps","loaderData","filepath","children","jsx","className","jsxs","LaunchEditor","file","SimpleTooltip","content","Icon","name","title","stringify"],"mappings":"sXAgBA,MAAAA,EAAAC,EAAA,SAAgC,CAAEC,WAAAA,CAAW,EAAyB,CACrE,KAAM,CAAEF,GAAAA,EAAIG,SAAAA,CAAS,EAAID,EACzB,cACE,OAAA,CACAE,SAAA,CAAAC,EAAAA,IAAC,KAAA,CAAGC,UAAU,qBAAqBF,SAAA,UAAA,CAAQ,EAC3CC,EAAAA,IAAC,MAAA,CAAIC,UAAU,aACdF,gBAAC,iBAAA,CACAA,SAAA,CAAAC,EAAAA,IAAC,UAAOD,SAAA,WAAQ,EAAS,wEAAA,EAE1B,CAAA,CACD,EACAG,EAAAA,KAACC,EAAA,CACAC,KAAMN,EACNG,UAAU,qCAEVF,SAAA,CAAAC,EAAAA,IAACK,EAAA,CAAcC,QAAQ,wCACtBP,SAAAC,EAAAA,IAACO,EAAA,CAAKC,KAAK,QAAQP,UAAU,UAAUQ,MAAM,iBAAiB,CAAA,CAC/D,QACC,OAAA,CAAKR,UAAU,WAAWQ,MAAOX,EAChCC,SAAAD,CAAA,CACF,CAAA,CAAA,CACD,EACAE,EAAAA,IAAC,OAAIC,UAAU,8FACbF,cAAKW,UAAUf,EAAI,KAAM,CAAC,CAAA,CAC5B,CAAA,CAAA,CACD,CAEF,CAAA"}
@@ -1,4 +1,4 @@
1
- import{_ as w,F as te,G as ae,K as he,e as pe,l as J,aZ as P,d as Y,b as ue,a as fe,q as me,t as ge,g as ye,s as Se,H as ve,a_ as xe,z as be}from"./mermaid.core-D3y7PO8B.js";import{s as we}from"./chunk-QN33PNHL-BpbvTQdp.js";import{p as Ce}from"./chunk-4BX2VUAB-qrzenNNi.js";import{p as Te}from"./treemap-KMMF4GRG-DZrMUxqR.js";import{b as O}from"./defaultLocale-C4B-KCzX.js";import{o as U}from"./ordinal-Cboi1Yqb.js";import"./preload-helper-BXl3LOEh.js";import"./misc-DVYuZMjW.js";import"./jsx-runtime-C5WNSv3b.js";import"./index-CqIc3cxq.js";import"./chunk-EPOLDU6W-BCLmut3y.js";import"./_baseUniq-BbljtzXr.js";import"./_basePickBy-D6pFkWVF.js";import"./clone-CztDUJhf.js";import"./init-Gi6I4Gst.js";function Le(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function $e(){return this.eachAfter(Le)}function Ae(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Fe(t,a){for(var l=this,n=[l],o,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function ke(t,a){for(var l=this,n=[l],o=[],s,d,h,m=-1;l=n.pop();)if(o.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=o.pop();)t.call(a,l,++m,this);return this}function Ne(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Me(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,o=n&&n.length;--o>=0;)l+=n[o].value;a.value=l})}function _e(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=Ve(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var o=n.length;t!==l;)n.splice(o,0,t),t=t.parent;return n}function Ve(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),o=null;for(t=l.pop(),a=n.pop();t===a;)o=t,t=l.pop(),a=n.pop();return o}function De(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Pe(){return Array.from(this)}function Be(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Re(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ee(){var t=this,a,l=[t],n,o,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(o=0,s=n.length;o<s;++o)l.push(n[o]);while(l.length)}function Q(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ie)):a===void 0&&(a=He);for(var l=new Z(t),n,o=[l],s,d,h,m;n=o.pop();)if((d=a(n.data))&&(m=(d=Array.from(d)).length))for(n.children=d,h=m-1;h>=0;--h)o.push(s=d[h]=new Z(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ge)}function We(){return Q(this).eachBefore(Oe)}function He(t){return t.children}function Ie(t){return Array.isArray(t)?t[1]:null}function Oe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ge(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=Q.prototype={constructor:Z,count:$e,each:Ae,eachAfter:ke,eachBefore:Fe,find:Ne,sum:Me,sort:_e,path:ze,ancestors:De,descendants:Pe,leaves:Be,links:Re,copy:We,[Symbol.iterator]:Ee};function qe(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Xe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,o){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(n-a)/t.value;++h<m;)d=s[h],d.y0=l,d.y1=o,d.x0=a,d.x1=a+=d.value*c}function Ye(t,a,l,n,o){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(o-l)/t.value;++h<m;)d=s[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ze=(1+Math.sqrt(5))/2;function Ke(t,a,l,n,o,s){for(var d=[],h=a.children,m,c,p=0,b=0,r=h.length,x,S,v=a.value,u,g,N,k,V,E,M;p<r;){x=o-l,S=s-n;do u=h[b++].value;while(!u&&b<r);for(g=N=u,E=Math.max(S/x,x/S)/(v*t),M=u*u*E,V=Math.max(N/M,M/g);b<r;++b){if(u+=c=h[b].value,c<g&&(g=c),c>N&&(N=c),M=u*u*E,k=Math.max(N/M,M/g),k>V){u-=c;break}V=k}d.push(m={value:u,dice:x<S,children:h.slice(p,b)}),m.dice?je(m,l,n,o,v?n+=S*u/v:s):Ye(m,l,n,v?l+=x*u/v:o,s),v-=u,p=b}return d}const Ue=(function t(a){function l(n,o,s,d,h){Ke(a,n,o,s,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ze);function Je(){var t=Ue,a=!1,l=1,n=1,o=[0],s=G,d=G,h=G,m=G,c=G;function p(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),o=[0],a&&r.eachBefore(Xe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,u=r.x1-x,g=r.y1-x;u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),r.x0=S,r.y0=v,r.x1=u,r.y1=g,r.children&&(x=o[r.depth+1]=s(r)/2,S+=c(r)-x,v+=d(r)-x,u-=h(r)-x,g-=m(r)-x,u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),t(r,S,v,u,g))}return p.round=function(r){return arguments.length?(a=!!r,p):a},p.size=function(r){return arguments.length?(l=+r[0],n=+r[1],p):[l,n]},p.tile=function(r){return arguments.length?(t=qe(r),p):t},p.padding=function(r){return arguments.length?p.paddingInner(r).paddingOuter(r):p.paddingInner()},p.paddingInner=function(r){return arguments.length?(s=typeof r=="function"?r:q(+r),p):s},p.paddingOuter=function(r){return arguments.length?p.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):p.paddingTop()},p.paddingTop=function(r){return arguments.length?(d=typeof r=="function"?r:q(+r),p):d},p.paddingRight=function(r){return arguments.length?(h=typeof r=="function"?r:q(+r),p):h},p.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:q(+r),p):m},p.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:q(+r),p):c},p}var R,ne=(R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=me,this.getDiagramTitle=ge,this.getAccDescription=ye,this.setAccDescription=Se}getNodes(){return this.nodes}getConfig(){const a=ve,l=ae();return te({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},o=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(s=>{xe(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const o={name:n.name,children:n.type==="Leaf"?void 0:[]};for(o.classSelector=n?.classSelector,n?.cssCompiledStyles&&(o.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(o.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(o);else{const s=l[l.length-1].node;s.children?s.children.push(o):s.children=[o]}n.type!=="Leaf"&&l.push({node:o,level:n.level})}),a}w(le,"buildHierarchy");var Qe=w((t,a)=>{Ce(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,m=et(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],p=c.length>0?c.join(";"):void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};l.push(b)}const n=le(l),o=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(n,0)},"populate"),et=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{try{const l=await Te("treemap",t);J.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(l,n)}catch(a){throw J.error("Error parsing treemap:",a),a}},"parse")},tt=10,B=10,X=25,at=w((t,a,l,n)=>{const o=n.db,s=o.getConfig(),d=s.padding??tt,h=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=ae();if(!m)return;const p=h?30:0,b=he(a),r=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=r,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,s.useMaxWidth);let u;try{const e=s.valueFormat||",";if(e==="$0,0")u=w(i=>"$"+O(",")(i),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const i=/\.\d+/.exec(e),f=i?i[0]:"";u=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const i=e.substring(1);u=w(f=>"$"+O(i||"")(f),"valueFormat")}else u=O(e)}catch(e){J.error("Error creating format function:",e),u=O(",")}const g=U().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=U().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=U().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=Q(m).sum(e=>e.value??0).sort((e,i)=>(i.value??0)-(e.value??0)),ee=Je().size([r,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(E),se=ee.descendants().filter(e=>e.children&&e.children.length>0),W=V.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,i)=>`treemapSection section${i}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const i=P({cssCompiledStyles:e.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const i=Y(this),f=e.data.name;i.text(f);const C=e.x1-e.x0,L=6;let $;s.showValues!==!1&&e.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=i.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){i.text("..."),y.getComputedTextLength()>A&&i.text("");break}if(i.text(T+"..."),y.getComputedTextLength()<=A)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?u(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const ie=ee.leaves(),j=V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,i)=>`treemapNode treemapLeafGroup leaf${i}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,i)=>`clip-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,i)=>`url(#clip-${a}-${i})`).text(e=>e.data.name).each(function(e){const i=Y(this),f=e.x1-e.x0,C=e.y1-e.y0,L=i.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,F=28,T=.6,z=6,H=2;for(;L.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let I=Math.max(z,Math.min(F,Math.round(y*T))),K=y+H+I;for(;K>A&&y>_&&(y--,I=Math.max(z,Math.min(F,Math.round(y*T))),!(I<z&&y===_));)i.style("font-size",`${y}px`),K=y+H+I;i.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&i.style("display","none")}),s.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(i.y1-i.y0)/2+$/2+_;f.attr("y",z);const H=i.x1-i.x0,ce=i.y1-i.y0-4,de=H-8;f.node().getComputedTextLength()>de||z+F>ce||F<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;we(b,oe,"flowchart",s?.useMaxWidth||!1)},"draw"),nt=w(function(t,a){return a.db.getClasses()},"getClasses"),lt={draw:at,getClasses:nt},rt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},st=w(({treemap:t}={})=>{const a=te(rt,t);return`
1
+ import{_ as w,F as te,G as ae,K as he,e as pe,l as J,aZ as P,d as Y,b as ue,a as fe,q as me,t as ge,g as ye,s as Se,H as ve,a_ as xe,z as be}from"./mermaid.core-BdxLLjl2.js";import{s as we}from"./chunk-QN33PNHL-DKEBwj3f.js";import{p as Ce}from"./chunk-4BX2VUAB-BOJM4J9w.js";import{p as Te}from"./treemap-KMMF4GRG-Ds3XkDP-.js";import{b as O}from"./defaultLocale-C4B-KCzX.js";import{o as U}from"./ordinal-Cboi1Yqb.js";import"./preload-helper-BXl3LOEh.js";import"./misc-W4055b-0.js";import"./jsx-runtime-C5WNSv3b.js";import"./index-CqIc3cxq.js";import"./chunk-EPOLDU6W-BCLmut3y.js";import"./_baseUniq-DTO-tFvD.js";import"./_basePickBy-D77BeQbR.js";import"./clone-DRkw5ylZ.js";import"./init-Gi6I4Gst.js";function Le(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function $e(){return this.eachAfter(Le)}function Ae(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Fe(t,a){for(var l=this,n=[l],o,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function ke(t,a){for(var l=this,n=[l],o=[],s,d,h,m=-1;l=n.pop();)if(o.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=o.pop();)t.call(a,l,++m,this);return this}function Ne(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Me(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,o=n&&n.length;--o>=0;)l+=n[o].value;a.value=l})}function _e(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=Ve(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var o=n.length;t!==l;)n.splice(o,0,t),t=t.parent;return n}function Ve(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),o=null;for(t=l.pop(),a=n.pop();t===a;)o=t,t=l.pop(),a=n.pop();return o}function De(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Pe(){return Array.from(this)}function Be(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Re(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ee(){var t=this,a,l=[t],n,o,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(o=0,s=n.length;o<s;++o)l.push(n[o]);while(l.length)}function Q(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ie)):a===void 0&&(a=He);for(var l=new Z(t),n,o=[l],s,d,h,m;n=o.pop();)if((d=a(n.data))&&(m=(d=Array.from(d)).length))for(n.children=d,h=m-1;h>=0;--h)o.push(s=d[h]=new Z(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ge)}function We(){return Q(this).eachBefore(Oe)}function He(t){return t.children}function Ie(t){return Array.isArray(t)?t[1]:null}function Oe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ge(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=Q.prototype={constructor:Z,count:$e,each:Ae,eachAfter:ke,eachBefore:Fe,find:Ne,sum:Me,sort:_e,path:ze,ancestors:De,descendants:Pe,leaves:Be,links:Re,copy:We,[Symbol.iterator]:Ee};function qe(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Xe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,o){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(n-a)/t.value;++h<m;)d=s[h],d.y0=l,d.y1=o,d.x0=a,d.x1=a+=d.value*c}function Ye(t,a,l,n,o){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(o-l)/t.value;++h<m;)d=s[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ze=(1+Math.sqrt(5))/2;function Ke(t,a,l,n,o,s){for(var d=[],h=a.children,m,c,p=0,b=0,r=h.length,x,S,v=a.value,u,g,N,k,V,E,M;p<r;){x=o-l,S=s-n;do u=h[b++].value;while(!u&&b<r);for(g=N=u,E=Math.max(S/x,x/S)/(v*t),M=u*u*E,V=Math.max(N/M,M/g);b<r;++b){if(u+=c=h[b].value,c<g&&(g=c),c>N&&(N=c),M=u*u*E,k=Math.max(N/M,M/g),k>V){u-=c;break}V=k}d.push(m={value:u,dice:x<S,children:h.slice(p,b)}),m.dice?je(m,l,n,o,v?n+=S*u/v:s):Ye(m,l,n,v?l+=x*u/v:o,s),v-=u,p=b}return d}const Ue=(function t(a){function l(n,o,s,d,h){Ke(a,n,o,s,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ze);function Je(){var t=Ue,a=!1,l=1,n=1,o=[0],s=G,d=G,h=G,m=G,c=G;function p(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),o=[0],a&&r.eachBefore(Xe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,u=r.x1-x,g=r.y1-x;u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),r.x0=S,r.y0=v,r.x1=u,r.y1=g,r.children&&(x=o[r.depth+1]=s(r)/2,S+=c(r)-x,v+=d(r)-x,u-=h(r)-x,g-=m(r)-x,u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),t(r,S,v,u,g))}return p.round=function(r){return arguments.length?(a=!!r,p):a},p.size=function(r){return arguments.length?(l=+r[0],n=+r[1],p):[l,n]},p.tile=function(r){return arguments.length?(t=qe(r),p):t},p.padding=function(r){return arguments.length?p.paddingInner(r).paddingOuter(r):p.paddingInner()},p.paddingInner=function(r){return arguments.length?(s=typeof r=="function"?r:q(+r),p):s},p.paddingOuter=function(r){return arguments.length?p.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):p.paddingTop()},p.paddingTop=function(r){return arguments.length?(d=typeof r=="function"?r:q(+r),p):d},p.paddingRight=function(r){return arguments.length?(h=typeof r=="function"?r:q(+r),p):h},p.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:q(+r),p):m},p.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:q(+r),p):c},p}var R,ne=(R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=me,this.getDiagramTitle=ge,this.getAccDescription=ye,this.setAccDescription=Se}getNodes(){return this.nodes}getConfig(){const a=ve,l=ae();return te({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},o=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(s=>{xe(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const o={name:n.name,children:n.type==="Leaf"?void 0:[]};for(o.classSelector=n?.classSelector,n?.cssCompiledStyles&&(o.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(o.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(o);else{const s=l[l.length-1].node;s.children?s.children.push(o):s.children=[o]}n.type!=="Leaf"&&l.push({node:o,level:n.level})}),a}w(le,"buildHierarchy");var Qe=w((t,a)=>{Ce(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,m=et(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],p=c.length>0?c.join(";"):void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};l.push(b)}const n=le(l),o=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(n,0)},"populate"),et=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{try{const l=await Te("treemap",t);J.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(l,n)}catch(a){throw J.error("Error parsing treemap:",a),a}},"parse")},tt=10,B=10,X=25,at=w((t,a,l,n)=>{const o=n.db,s=o.getConfig(),d=s.padding??tt,h=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=ae();if(!m)return;const p=h?30:0,b=he(a),r=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=r,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,s.useMaxWidth);let u;try{const e=s.valueFormat||",";if(e==="$0,0")u=w(i=>"$"+O(",")(i),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const i=/\.\d+/.exec(e),f=i?i[0]:"";u=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const i=e.substring(1);u=w(f=>"$"+O(i||"")(f),"valueFormat")}else u=O(e)}catch(e){J.error("Error creating format function:",e),u=O(",")}const g=U().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=U().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=U().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=Q(m).sum(e=>e.value??0).sort((e,i)=>(i.value??0)-(e.value??0)),ee=Je().size([r,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(E),se=ee.descendants().filter(e=>e.children&&e.children.length>0),W=V.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,i)=>`treemapSection section${i}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const i=P({cssCompiledStyles:e.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const i=Y(this),f=e.data.name;i.text(f);const C=e.x1-e.x0,L=6;let $;s.showValues!==!1&&e.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=i.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){i.text("..."),y.getComputedTextLength()>A&&i.text("");break}if(i.text(T+"..."),y.getComputedTextLength()<=A)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?u(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const ie=ee.leaves(),j=V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,i)=>`treemapNode treemapLeafGroup leaf${i}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,i)=>`clip-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,i)=>`url(#clip-${a}-${i})`).text(e=>e.data.name).each(function(e){const i=Y(this),f=e.x1-e.x0,C=e.y1-e.y0,L=i.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,F=28,T=.6,z=6,H=2;for(;L.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let I=Math.max(z,Math.min(F,Math.round(y*T))),K=y+H+I;for(;K>A&&y>_&&(y--,I=Math.max(z,Math.min(F,Math.round(y*T))),!(I<z&&y===_));)i.style("font-size",`${y}px`),K=y+H+I;i.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&i.style("display","none")}),s.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(i.y1-i.y0)/2+$/2+_;f.attr("y",z);const H=i.x1-i.x0,ce=i.y1-i.y0-4,de=H-8;f.node().getComputedTextLength()>de||z+F>ce||F<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;we(b,oe,"flowchart",s?.useMaxWidth||!1)},"draw"),nt=w(function(t,a){return a.db.getClasses()},"getClasses"),lt={draw:at,getClasses:nt},rt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},st=w(({treemap:t}={})=>{const a=te(rt,t);return`
2
2
  .treemapNode.section {
3
3
  stroke: ${a.sectionStrokeColor};
4
4
  stroke-width: ${a.sectionStrokeWidth};
@@ -22,4 +22,4 @@ import{_ as w,F as te,G as ae,K as he,e as pe,l as J,aZ as P,d as Y,b as ue,a as
22
22
  font-size: ${a.titleFontSize};
23
23
  }
24
24
  `},"getStyles"),it=st,Tt={parser:re,get db(){return new ne},renderer:lt,styles:it};export{Tt as diagram};
25
- //# sourceMappingURL=diagram-PSM6KHXK-CgwBEb3G.js.map
25
+ //# sourceMappingURL=diagram-PSM6KHXK-D2ghOCFR.js.map