/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{fromValues as r,create as t}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{mul as o}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{toEllipticArc7 as e}from"../../../../geometry/support/curves/circularArcUtils.js";import{isCircularArc as s}from"../../../../geometry/support/curves/curveUtils.js";import{transformEllipticArc as i}from"../../../../geometry/support/curves/ellipticArc7Utils.js";function m(r,t,o,m,p,u,l,a){const f=t??o.leftVertex.pos,n=s(r)?e(f,r):r,[g,j,v,x,y,h,U]=n.a,b=y??0,A=h??Math.hypot(g[0]-j[0],g[1]-j[1]),M=U??1,V=c(m[0],m[1],p[0],p[1],u[0],u[1],l,a);return i(f,{a:[g,j,v,x,b,A,M]},V)}function c(e,s,i,m,c,p,u,l){const a=r(1,0,0,0,1,0,-e,-s,1),f=u-1,n=r(i*i*f+1,m*i*f,0,i*m*f,m*m*f+1,0,0,0,1),g=l-1,j=r(c*c*g+1,p*c*g,0,c*p*g,p*p*g+1,0,0,0,1),v=r(1,0,0,0,1,0,e,s,1),x=t();return o(x,n,a),o(x,j,x),o(x,v,x),x}export{c as getScaleTransform,m as scaleArc};
