import{b as c,c as y,d as u,e as h}from"./chunk-HNL3EPQF.mjs";import{a as f,e as g,g as L}from"./chunk-SEEX5HTF.mjs";import{c as m}from"./chunk-2HR5LOFI.mjs";import{F as l,s as p}from"./chunk-5YUVU3PZ.mjs";import{b as i}from"./chunk-MGPAVIPZ.mjs";import{a as o}from"./chunk-VELTKBKT.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-E77IOHMT.mjs"),"loader")},{name:"cose-bilkent",loader:o(async()=>await import("./cose-bilkent-PNC4W37J.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};
