import{b as c,c as y,d as u,e as h}from"./chunk-7J6CGLKN.mjs";import{a as f,e as g,g as L}from"./chunk-KGFNY3KK.mjs";import{e as m}from"./chunk-QA3QBVWF.mjs";import{G as l,t as p}from"./chunk-67TQ5CYL.mjs";import{b as i}from"./chunk-7W6UQGC5.mjs";import{a as o}from"./chunk-AQ6EADP3.mjs";var w={common:l,getConfig:p,insertCluster:g,insertEdge:u,insertEdgeLabel:c,insertMarkers:h,insertNode:L,interpolateToCurve:m,labelHelper:f,log:i,positionEdgeLabel:y};var a={},H=o(t=>{for(let r of t)a[r.name]=r},"registerLayoutLoaders"),S=o(()=>{H([{name:"dagre",loader:o(async()=>await import("./dagre-ND4H6XIP.mjs"),"loader")},{name:"cose-bilkent",loader:o(async()=>await import("./cose-bilkent-UX7MHV2Q.mjs"),"loader")}])},"registerDefaultLayoutLoaders");S();var P=o(async(t,r)=>{if(!(t.layoutAlgorithm in a))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let A=e.domId||e.id;e.domId=`${t.diagramId}-${A}`}let n=a[t.layoutAlgorithm],x=await n.loader(),{theme:d,themeVariables:D}=t.config,{useGradient:F,gradientStart:$,gradientStop:I}=D,s=r.attr("id");if(r.append("defs").append("filter").attr("id",`${s}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),r.append("defs").append("filter").attr("id",`${s}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),F){let e=r.append("linearGradient").attr("id",r.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",$).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",I).attr("stop-opacity",1)}return x.render(t,r,w,{algorithm:n.algorithm})},"render"),M=o((t="",{fallback:r="dagre"}={})=>{if(t in a)return t;if(r in a)return i.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${t} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm");export{H as a,P as b,M as c};
