define(["exports","./Matrix2-fc7e9822","./EllipsoidTangentPlane-53e32153","./ComponentDatatype-4a60b8d6","./PolylinePipeline-0e310844","./Transforms-3ac41eb6","./defaultValue-94c3e563","./RuntimeError-c581ca93"],(function(e,t,a,n,r,i,o,s){"use strict";const l={ROUNDED:0,MITERED:1,BEVELED:2};var c=Object.freeze(l);const C={};function u(e,t){if(!o.defined(e))throw new s.DeveloperError("identifier is required.");o.defined(C[e])||(C[e]=!0,console.warn(o.defaultValue(t,e)))}u.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",u.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",u.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",u.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";const d=[new t.Cartesian3,new t.Cartesian3],g=new t.Cartesian3,y=new t.Cartesian3,f=new t.Cartesian3,m=new t.Cartesian3,h=new t.Cartesian3,p=new t.Cartesian3,w=new t.Cartesian3,x=new t.Cartesian3,E=new t.Cartesian3,P=new t.Cartesian3,M=new t.Cartesian3,b={};let T=new t.Cartographic;function B(e,t){const a=new Array(e.length);for(let n=0;n=0?-c:c}const R=new t.Cartesian3(-1,0,0);let O=new t.Matrix4;const V=new t.Matrix4;let I=new t.Matrix3;const v=t.Matrix3.IDENTITY.clone(),N=new t.Cartesian3,G=new t.Cartesian4,H=new t.Cartesian3;function L(e,a,n,r,o,s,l,c){let C=N,u=G;O=i.Transforms.eastNorthUpToFixedFrame(e,o,O),C=t.Matrix4.multiplyByPointAsVector(O,R,C),C=t.Cartesian3.normalize(C,C);const d=D(C,a,e,o);I=t.Matrix3.fromRotationZ(d,I),H.z=s,O=t.Matrix4.multiplyTransformation(O,t.Matrix4.fromRotationTranslation(I,H,V),O);const g=v;g[0]=l;for(let i=0;i0){const n=g?2:1;for(let r=0;r=0};const Y=new t.Cartesian3,k=new t.Cartesian3;b.computePositions=function(e,a,i,o,s){const l=o._ellipsoid,C=B(e,l),M=o._granularity,T=o._cornerType,S=s?Q(a,i):F(a,i),A=s?F(a,i):void 0,D=i.height/2,R=i.width/2;let O=e.length,V=[],I=s?[]:void 0,v=g,N=y,G=f,H=m,j=h,U=p,_=w,Z=x,J=E,K=e[0],X=e[1];H=l.geodeticSurfaceNormal(K,H),v=t.Cartesian3.subtract(X,K,v),v=t.Cartesian3.normalize(v,v),Z=t.Cartesian3.cross(H,v,Z),Z=t.Cartesian3.normalize(Z,Z);let $,ee,te=C[0],ae=C[1];s&&(I=L(K,Z,A,I,l,te+D,1,1)),J=t.Cartesian3.clone(K,J),K=X,N=t.Cartesian3.negate(v,N);for(let g=1;g