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