Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.92/designer/js/definition-builder/diagram-builder/util/getBezierEdgeCenter",["module","exports","require"],(function(e,t,r){window;{function calculateControlOffset(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function getControlWithCurvature({c:e,pos:t,x1:r,x2:o,y1:a,y2:n}){let u,l;switch(t){case"left":u=r-calculateControlOffset(r-o,e),l=a;break;case"right":u=r+calculateControlOffset(o-r,e),l=a;break;case"top":u=r,l=a-calculateControlOffset(a-n,e);break;case"bottom":u=r,l=a+calculateControlOffset(n-a,e)}return[u,l]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function getBezierEdgeCenter({curvature:e,sourcePosition:t,sourceX:r,sourceY:o,targetPosition:a,targetX:n,targetY:u}){const[l,i]=getControlWithCurvature({c:e,pos:t,x1:r,x2:n,y1:o,y2:u}),[c,s]=getControlWithCurvature({c:e,pos:a,x1:n,x2:r,y1:u,y2:o}),f=.125*r+.375*l+.375*c+.125*n,d=.125*o+.375*i+.375*s+.125*u,g=Math.abs(f-r),C=Math.abs(d-o);return[f,d,g,C]}}}));
//# sourceMappingURL=getBezierEdgeCenter.js.map