import{i as e,r as t}from"./src-RYGCTipz.js";import{u as n}from"./chunk-5PVQY5BW-sjMtKSfN.js";import{s as r,y as i}from"./chunk-ICPOFSXX-Bh-KA0qI.js";import{a,i as o,s}from"./chunk-5FUZZQ4R-DuRWhebS.js";import{a as c,i as l,n as u,r as d}from"./chunk-ENJZ2VHE-D0Ac1Sfs.js";var f={common:r,getConfig:i,insertCluster:o,insertEdge:u,insertEdgeLabel:d,insertMarkers:l,insertNode:a,interpolateToCurve:n,labelHelper:s,log:e,positionEdgeLabel:c},p={},m=t(e=>{for(let t of e)p[t.name]=t},`registerLayoutLoaders`);t(()=>{m([{name:`dagre`,loader:t(async()=>await import(`./dagre-KV5264BT-CX3Jd1_j.js`),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await import(`./cose-bilkent-S5V4N54A-Cunt8Vr0.js`),`loader`)}])},`registerDefaultLayoutLoaders`)();var h=t(async(e,t)=>{if(!(e.layoutAlgorithm in p))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=p[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.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`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,f,{algorithm:n.algorithm})},`render`),g=t((t=``,{fallback:n=`dagre`}={})=>{if(t in p)return t;if(n in p)return e.warn(`Layout algorithm ${t} is not registered. Using ${n} as fallback.`),n;throw Error(`Both layout algorithms ${t} and ${n} are not registered.`)},`getRegisteredLayoutAlgorithm`);export{m as n,h as r,g as t};
//# sourceMappingURL=chunk-336JU56O-CgaWKYC-.js.map