@intent-hq/web 2.383.1 → 2.383.3

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 (148) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{CxFOqPFP.js → -2V-BAm8.js} +3 -3
  3. package/web/app/immutable/chunks/{nbomrtth.js → -NFtmIGG.js} +1 -1
  4. package/web/app/immutable/chunks/{CKXQrY3X.js → 0l7ZqDIV.js} +1 -1
  5. package/web/app/immutable/chunks/{WVvubfLN.js → 38Vg2YF4.js} +2 -2
  6. package/web/app/immutable/chunks/{CrFyLBfi.js → AqAgOqAP.js} +2 -2
  7. package/web/app/immutable/chunks/{Dm7KqEFT.js → Ax0sJJJl.js} +13 -13
  8. package/web/app/immutable/chunks/{BI0hvS48.js → B1Gvj9xq.js} +3 -3
  9. package/web/app/immutable/chunks/{6GlvsI2m.js → B2EqH2B9.js} +1 -1
  10. package/web/app/immutable/chunks/{CjpxPpfy.js → B4mnoVZK.js} +1 -1
  11. package/web/app/immutable/chunks/{CI9sv_EP.js → B4rcpoVl.js} +1 -1
  12. package/web/app/immutable/chunks/{W7maz5hp.js → B7AnydIV.js} +1 -1
  13. package/web/app/immutable/chunks/{DwImHc9s.js → BB5q5DsO.js} +1 -1
  14. package/web/app/immutable/chunks/{DEI5RmgA.js → BB7BFhCP.js} +1 -1
  15. package/web/app/immutable/chunks/{BFgeFHTs.js → BCo0L43p.js} +1 -1
  16. package/web/app/immutable/chunks/{Djg1-55Y.js → BD1NjrB7.js} +1 -1
  17. package/web/app/immutable/chunks/{TiuNiN7j.js → BDUjjuc4.js} +1 -1
  18. package/web/app/immutable/chunks/{zHu1d_6X.js → BDgY7Zd8.js} +2 -2
  19. package/web/app/immutable/chunks/{CJO6KBmw.js → BFU4GSWL.js} +1 -1
  20. package/web/app/immutable/chunks/{BYP8ebQS.js → BGxmHLUr.js} +1 -1
  21. package/web/app/immutable/chunks/{H9IjxeQk.js → BJA4-3TS.js} +1 -1
  22. package/web/app/immutable/chunks/{CEOBX1Pf.js → BMiKKOoz.js} +1 -1
  23. package/web/app/immutable/chunks/{CeHXXIxE.js → BOYBHPRf.js} +1 -1
  24. package/web/app/immutable/chunks/{oOhxfFIU.js → BQ9VbGlu.js} +1 -1
  25. package/web/app/immutable/chunks/{T8d_aLDP.js → BT9OtIDj.js} +1 -1
  26. package/web/app/immutable/chunks/{MQBseMlG.js → BTTEE7GF.js} +1 -1
  27. package/web/app/immutable/chunks/{DPZcepbV.js → BZ1qE3sd.js} +1 -1
  28. package/web/app/immutable/chunks/{BwtFad5m.js → BZskJqHK.js} +2 -2
  29. package/web/app/immutable/chunks/{D4FXvK9L.js → BammBnda.js} +3 -3
  30. package/web/app/immutable/chunks/{CkmRZ_MC.js → BdgSVihu.js} +1 -1
  31. package/web/app/immutable/chunks/{C9h2rwKF.js → BhHscwNa.js} +1 -1
  32. package/web/app/immutable/chunks/{C-O59F9J.js → BkfSBkLs.js} +2 -2
  33. package/web/app/immutable/chunks/{x63yRqVE.js → BktdbaP2.js} +1 -1
  34. package/web/app/immutable/chunks/{BbvEB4jz.js → Bok48R2D.js} +1 -1
  35. package/web/app/immutable/chunks/{Dsf8OM9-.js → Bp3ZrlmO.js} +1 -1
  36. package/web/app/immutable/chunks/{7GuT70Sz.js → BthP56U0.js} +1 -1
  37. package/web/app/immutable/chunks/{BLyGObAP.js → BvWOwOTx.js} +3 -3
  38. package/web/app/immutable/chunks/{BlRYe00B.js → BwOKiDn9.js} +1 -1
  39. package/web/app/immutable/chunks/{Du_rNq8q.js → BwyO9iAx.js} +1 -1
  40. package/web/app/immutable/chunks/{DJs4vEjF.js → Byun8_as.js} +1 -1
  41. package/web/app/immutable/chunks/{CBkpyV7r.js → BzVtDZxE.js} +1 -1
  42. package/web/app/immutable/chunks/{KH7BHXXb.js → C-n5-Nyi.js} +1 -1
  43. package/web/app/immutable/chunks/{C6Qw0raF.js → C19Fl1wo.js} +1 -1
  44. package/web/app/immutable/chunks/{DjHhZWUX.js → C7cQ3lDB.js} +1 -1
  45. package/web/app/immutable/chunks/{CDAoSo12.js → C89qw-SN.js} +1 -1
  46. package/web/app/immutable/chunks/{Su2XS_Ru.js → CDXv1PW9.js} +1 -1
  47. package/web/app/immutable/chunks/{D3C3nNLs.js → CEAKAkFK.js} +1 -1
  48. package/web/app/immutable/chunks/{Di8eJPr0.js → CGslv4Qq.js} +2 -2
  49. package/web/app/immutable/chunks/{DaaqgDka.js → CImg9Ht4.js} +1 -1
  50. package/web/app/immutable/chunks/{DMlkDPxV.js → CKG0fjh3.js} +1 -1
  51. package/web/app/immutable/chunks/{B6qvxAO7.js → CKOijLzA.js} +1 -1
  52. package/web/app/immutable/chunks/{CaNxJFJ1.js → CKaMWgJQ.js} +1 -1
  53. package/web/app/immutable/chunks/{DUhA4bgN.js → CLeH6OyR.js} +1 -1
  54. package/web/app/immutable/chunks/{h06E2ICA.js → CMiAv123.js} +1 -1
  55. package/web/app/immutable/chunks/{BCS2G1TZ.js → CUHgqEKH.js} +1 -1
  56. package/web/app/immutable/chunks/{Zx9hB63s.js → CW2OkXuF.js} +1 -1
  57. package/web/app/immutable/chunks/{C8JlOzbF.js → CWmACcmS.js} +1 -1
  58. package/web/app/immutable/chunks/{DSAj_NCN.js → CXR8jfrb.js} +1 -1
  59. package/web/app/immutable/chunks/{Dzk9iuw9.js → C_-1gUwp.js} +3 -3
  60. package/web/app/immutable/chunks/{CnAbYuPp.js → C_1Oardw.js} +1 -1
  61. package/web/app/immutable/chunks/{Rx5mQeGT.js → CfdQaRg7.js} +4 -4
  62. package/web/app/immutable/chunks/{Bq_wOSEp.js → CgLuwxkV.js} +1 -1
  63. package/web/app/immutable/chunks/{M-TVgx-R.js → ChUo5Z7l.js} +1 -1
  64. package/web/app/immutable/chunks/{BlVYr5cA.js → CiNhMqq1.js} +1 -1
  65. package/web/app/immutable/chunks/{B8VxRkn_.js → CiieGSUV.js} +1 -1
  66. package/web/app/immutable/chunks/{CL-lzPGU.js → CnljYLZs.js} +1 -1
  67. package/web/app/immutable/chunks/{DmXAUF0G.js → CpdAeaX0.js} +1 -1
  68. package/web/app/immutable/chunks/{DduCxuVq.js → CpxEaO9r.js} +1 -1
  69. package/web/app/immutable/chunks/{DsT1iX_Q.js → CrJMkG_1.js} +2 -2
  70. package/web/app/immutable/chunks/{BAP-Km9w.js → CslzdKY2.js} +1 -1
  71. package/web/app/immutable/chunks/{CDNvYbvS.js → CtIGR2R7.js} +1 -1
  72. package/web/app/immutable/chunks/{yaHL2zPw.js → Cuvcpuwl.js} +1 -1
  73. package/web/app/immutable/chunks/{BtHTHBJp.js → CzXkTVR8.js} +1 -1
  74. package/web/app/immutable/chunks/{CiSIqqOJ.js → D1QHqX16.js} +1 -1
  75. package/web/app/immutable/chunks/{0PdeE_M-.js → D23uZeQI.js} +1 -1
  76. package/web/app/immutable/chunks/D3a_DhRG.js +10 -0
  77. package/web/app/immutable/chunks/{q6F-1__g.js → D4QkxipA.js} +1 -1
  78. package/web/app/immutable/chunks/{BBws4Cyt.js → D59f5vu3.js} +1 -1
  79. package/web/app/immutable/chunks/{CDCEiDxP.js → D6J72aTz.js} +3 -3
  80. package/web/app/immutable/chunks/{DPzOIlu9.js → D83rapov.js} +1 -1
  81. package/web/app/immutable/chunks/{DrHfN5GT.js → DCQ9cJhS.js} +1 -1
  82. package/web/app/immutable/chunks/{Dr0V5Z_Q.js → DCq92KiG.js} +1 -1
  83. package/web/app/immutable/chunks/{Ddq8SBEz.js → DD98YGoG.js} +1 -1
  84. package/web/app/immutable/chunks/{CHXhxB4Q.js → DEIwQ6hO.js} +1 -1
  85. package/web/app/immutable/chunks/{BY9RbRJy.js → DGXU2Eur.js} +1 -1
  86. package/web/app/immutable/chunks/{CbO3oDHw.js → DKYFDagY.js} +1 -1
  87. package/web/app/immutable/chunks/{BK6a0pzX.js → DLZnxjXG.js} +1 -1
  88. package/web/app/immutable/chunks/{469banqV.js → DLbnXb7P.js} +3 -3
  89. package/web/app/immutable/chunks/{CJVoHxzN.js → DPPrfCEc.js} +1 -1
  90. package/web/app/immutable/chunks/{KSLBBJRy.js → DQ0P5vIc.js} +1 -1
  91. package/web/app/immutable/chunks/{DME_6OFx.js → DR9rgOUR.js} +1 -1
  92. package/web/app/immutable/chunks/{D-YGlaxj.js → DUdBCfQ2.js} +1 -1
  93. package/web/app/immutable/chunks/{BxVnbYG1.js → DUxx6wT8.js} +1 -1
  94. package/web/app/immutable/chunks/{DPyomP91.js → DVnAuhkJ.js} +1 -1
  95. package/web/app/immutable/chunks/{azpKokvz.js → DWG0la6r.js} +1 -1
  96. package/web/app/immutable/chunks/{BTw9kxtg.js → DcTV3q3a.js} +1 -1
  97. package/web/app/immutable/chunks/{D-dukRlA.js → Dcuzm8gD.js} +1 -1
  98. package/web/app/immutable/chunks/{DDJ_XVek.js → Df5fc__K.js} +2 -2
  99. package/web/app/immutable/chunks/{BjRQQ_jq.js → DhN_Bb70.js} +4 -4
  100. package/web/app/immutable/chunks/{DmaEU7hb.js → Dipy9ZkR.js} +1 -1
  101. package/web/app/immutable/chunks/{BvPbguyx.js → Dj5oY4MN.js} +1 -1
  102. package/web/app/immutable/chunks/{P-T74LCo.js → Dkwg3iDV.js} +3 -3
  103. package/web/app/immutable/chunks/{XHPDEELd.js → DlrDVrrH.js} +1 -1
  104. package/web/app/immutable/chunks/{MI7EtNv0.js → DpCuuI0h.js} +1 -1
  105. package/web/app/immutable/chunks/{BwhjiNjC.js → DqRH8mOo.js} +1 -1
  106. package/web/app/immutable/chunks/{bF6PpsOD.js → JhwNDffI.js} +1 -1
  107. package/web/app/immutable/chunks/{BPzekfWN.js → Jmsfhy4p.js} +1 -1
  108. package/web/app/immutable/chunks/{DOhJfAZG.js → LFBaWgJg.js} +1 -1
  109. package/web/app/immutable/chunks/{Ck2X3Rvg.js → QXKw7ybW.js} +1 -1
  110. package/web/app/immutable/chunks/{nImP7yvb.js → SDWlqEse.js} +1 -1
  111. package/web/app/immutable/chunks/{BXhT5rHA.js → WAmymGEm.js} +1 -1
  112. package/web/app/immutable/chunks/{Cxf6ur9F.js → a6nBCKTJ.js} +1 -1
  113. package/web/app/immutable/chunks/{Cofxvpdb.js → bB4pIooo.js} +1 -1
  114. package/web/app/immutable/chunks/{Ckb6le-m.js → eBfEHUcb.js} +4 -4
  115. package/web/app/immutable/chunks/{BvbTU4IL.js → gRz70TuX.js} +1 -1
  116. package/web/app/immutable/chunks/{BkITif4J.js → hrbt6TUA.js} +1 -1
  117. package/web/app/immutable/chunks/{Fdd73CJo.js → m6g2qs4v.js} +1 -1
  118. package/web/app/immutable/chunks/{DqMqjmmT.js → mlIdQnJX.js} +2 -2
  119. package/web/app/immutable/chunks/{BNkpVy97.js → p-4Usjf1.js} +1 -1
  120. package/web/app/immutable/chunks/{BI3a2AWW.js → pf1qexdH.js} +1 -1
  121. package/web/app/immutable/chunks/{Dhzl8ugO.js → sjYi8iFk.js} +1 -1
  122. package/web/app/immutable/chunks/{CnqJXAKo.js → uA-KbK5l.js} +1 -1
  123. package/web/app/immutable/chunks/{Div5PXT-.js → ufC4F9mx.js} +2 -2
  124. package/web/app/immutable/chunks/{DOUbieNj.js → v1V9O0KC.js} +1 -1
  125. package/web/app/immutable/chunks/{DlEmrQXN.js → wh8BTzW1.js} +2 -2
  126. package/web/app/immutable/chunks/{CGIQkN5K.js → yC4xveeV.js} +1 -1
  127. package/web/app/immutable/chunks/{ByfS7UIX.js → yYvyTKgb.js} +1 -1
  128. package/web/app/immutable/chunks/{BAzzHP-D.js → zw9aQKYl.js} +1 -1
  129. package/web/app/immutable/entry/{app.CgYQGiwi.js → app.CeAiZV-v.js} +2 -2
  130. package/web/app/immutable/entry/start.DrVPJx5Z.js +1 -0
  131. package/web/app/immutable/nodes/{0.DOOOI3Bo.js → 0.D2I9SFzE.js} +1 -1
  132. package/web/app/immutable/nodes/{1.DCbWOuyY.js → 1.CHeML-3-.js} +1 -1
  133. package/web/app/immutable/nodes/{10.DkhUAhty.js → 10.CPMi8QX9.js} +4 -4
  134. package/web/app/immutable/nodes/{11.DDwWhO0Z.js → 11.DOD-sh-z.js} +1 -1
  135. package/web/app/immutable/nodes/{15.Dw1bH9Zl.js → 15.BXDyjjHm.js} +1 -1
  136. package/web/app/immutable/nodes/{19.BDZr-fpl.js → 19.BEUhM4Xw.js} +2 -2
  137. package/web/app/immutable/nodes/{2.BXcXLNQd.js → 2.CeC42N_5.js} +4 -4
  138. package/web/app/immutable/nodes/{3.DSd1hRZn.js → 3.-_yjscmj.js} +1 -1
  139. package/web/app/immutable/nodes/{4.BkWwx_VF.js → 4.CdQdgUhv.js} +1 -1
  140. package/web/app/immutable/nodes/{5.y9tMc2yb.js → 5.jUP9W-D7.js} +1 -1
  141. package/web/app/immutable/nodes/{6.BosoYTZK.js → 6.B0WnMraI.js} +1 -1
  142. package/web/app/immutable/nodes/{7.BX-dUHAQ.js → 7.DAEOmrZS.js} +1 -1
  143. package/web/app/immutable/nodes/{8.DUR07SoM.js → 8.D1Q1AivC.js} +1 -1
  144. package/web/app/immutable/nodes/{9.Cw56XQ1G.js → 9.C5Qv23W5.js} +4 -4
  145. package/web/app/version.json +1 -1
  146. package/web/index.html +9 -9
  147. package/web/app/immutable/chunks/i_QPvq4q.js +0 -10
  148. package/web/app/immutable/entry/start.C_kFKw1E.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CjpxPpfy.js","/app/immutable/chunks/Ckb6le-m.js","/app/immutable/chunks/C0QTy0Sy.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BtHTHBJp.js","/app/immutable/chunks/BaujsV9k.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/tr-2J8Mf.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/DX-Wrapd.js","/app/immutable/chunks/CrD0jtXE.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/U9jJmfYa.js","/app/immutable/chunks/CUkDMZwP.js","/app/immutable/chunks/bhKPSdq4.js","/app/immutable/chunks/7UPrdiE9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/B6S6VNu7.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DCRuihKm.js","/app/immutable/chunks/C7LIHk5_.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/L_tYoUCb.js","/app/immutable/chunks/CE7dsja4.js","/app/immutable/chunks/BFgeFHTs.js","/app/immutable/chunks/BmTMWrby.js","/app/immutable/chunks/FzlZUztb.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/-K3ARgq0.js","/app/immutable/chunks/B4SiDSWP.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/DLwWVKiF.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/Di8eJPr0.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/DKHY8q_S.js","/app/immutable/chunks/S845NCb3.js","/app/immutable/chunks/DwL1A1su.js","/app/immutable/chunks/EK6zOAHM.js","/app/immutable/chunks/DCK8dPAL.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/C6mS8uZB.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/chunks/CBkpyV7r.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/fiz8N_zQ.js","/app/immutable/chunks/CAvYeStH.js","/app/immutable/chunks/BAKPnd3w.js","/app/immutable/chunks/A9niI_uA.js","/app/immutable/chunks/Co4vj0dC.js","/app/immutable/chunks/QeBH-DWE.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/lJeex2Gh.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/CJ4Z96pe.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/c5QZsH9t.js","/app/immutable/chunks/Bsh6nUhU.js","/app/immutable/chunks/CDjpuJh0.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/CHLX1QZz.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/CU5jKGma.js","/app/immutable/chunks/BwtFad5m.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/BFEzojY2.js","/app/immutable/chunks/Cf4fmkfL.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
2
- import{_ as Z}from"./C0QTy0Sy.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./Ckb6le-m.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./CjpxPpfy.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/B4mnoVZK.js","/app/immutable/chunks/eBfEHUcb.js","/app/immutable/chunks/C0QTy0Sy.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/CzXkTVR8.js","/app/immutable/chunks/BaujsV9k.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/tr-2J8Mf.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/DX-Wrapd.js","/app/immutable/chunks/CrD0jtXE.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/U9jJmfYa.js","/app/immutable/chunks/CUkDMZwP.js","/app/immutable/chunks/bhKPSdq4.js","/app/immutable/chunks/7UPrdiE9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/B6S6VNu7.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DCRuihKm.js","/app/immutable/chunks/C7LIHk5_.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/L_tYoUCb.js","/app/immutable/chunks/CE7dsja4.js","/app/immutable/chunks/BCo0L43p.js","/app/immutable/chunks/BmTMWrby.js","/app/immutable/chunks/FzlZUztb.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/-K3ARgq0.js","/app/immutable/chunks/B4SiDSWP.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/DLwWVKiF.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/CGslv4Qq.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/DKHY8q_S.js","/app/immutable/chunks/S845NCb3.js","/app/immutable/chunks/DwL1A1su.js","/app/immutable/chunks/EK6zOAHM.js","/app/immutable/chunks/DCK8dPAL.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/C6mS8uZB.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/chunks/BzVtDZxE.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/fiz8N_zQ.js","/app/immutable/chunks/CAvYeStH.js","/app/immutable/chunks/BAKPnd3w.js","/app/immutable/chunks/A9niI_uA.js","/app/immutable/chunks/Co4vj0dC.js","/app/immutable/chunks/QeBH-DWE.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/lJeex2Gh.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/CJ4Z96pe.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/c5QZsH9t.js","/app/immutable/chunks/Bsh6nUhU.js","/app/immutable/chunks/CDjpuJh0.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/CHLX1QZz.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/CU5jKGma.js","/app/immutable/chunks/BZskJqHK.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/BFEzojY2.js","/app/immutable/chunks/Cf4fmkfL.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
2
+ import{_ as Z}from"./C0QTy0Sy.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./eBfEHUcb.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./B4mnoVZK.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};