import{a as i}from"./chunk-GTKDMUJJ.mjs";var g=i(({flowchart:e})=>{let n=e?.subGraphTitleMargin?.top??0,a=e?.subGraphTitleMargin?.bottom??0,t=n+a;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:t}},"getSubGraphTitleMargins");var s={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function c(e,n){if(e===void 0||n===void 0)return{angle:0,deltaX:0,deltaY:0};e=u(e),n=u(n);let[a,t]=[e.x,e.y],[l,o]=[n.x,n.y],r=l-a,f=o-t;return{angle:Math.atan(f/r),deltaX:r,deltaY:f}}i(c,"calculateDeltaAndAngle");var u=i(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),b=i(e=>({x:i(function(n,a,t){let l=0;if(a===0&&Object.hasOwn(s,e.arrowTypeStart)){let{angle:o,deltaX:r}=c(t[0],t[1]);l=s[e.arrowTypeStart]*Math.cos(o)*(r>=0?1:-1)}else if(a===t.length-1&&Object.hasOwn(s,e.arrowTypeEnd)){let{angle:o,deltaX:r}=c(t[t.length-1],t[t.length-2]);l=s[e.arrowTypeEnd]*Math.cos(o)*(r>=0?1:-1)}return u(n).x+l},"x"),y:i(function(n,a,t){let l=0;if(a===0&&Object.hasOwn(s,e.arrowTypeStart)){let{angle:o,deltaY:r}=c(t[0],t[1]);l=s[e.arrowTypeStart]*Math.abs(Math.sin(o))*(r>=0?1:-1)}else if(a===t.length-1&&Object.hasOwn(s,e.arrowTypeEnd)){let{angle:o,deltaY:r}=c(t[t.length-1],t[t.length-2]);l=s[e.arrowTypeEnd]*Math.abs(Math.sin(o))*(r>=0?1:-1)}return u(n).y+l},"y")}),"getLineFunctionsWithOffset");export{g as a,b};
