define(["exports","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./defaultValue-94c3e563","./WebGLConstants-7dccdc96","./Transforms-3ac41eb6"],(function(t,e,r,n,i,a){"use strict";const o={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};var s=Object.freeze(o);const u={POINTS:i.WebGLConstants.POINTS,LINES:i.WebGLConstants.LINES,LINE_LOOP:i.WebGLConstants.LINE_LOOP,LINE_STRIP:i.WebGLConstants.LINE_STRIP,TRIANGLES:i.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:i.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:i.WebGLConstants.TRIANGLE_FAN,isLines:function(t){return t===u.LINES||t===u.LINE_LOOP||t===u.LINE_STRIP},isTriangles:function(t){return t===u.TRIANGLES||t===u.TRIANGLE_STRIP||t===u.TRIANGLE_FAN},validate:function(t){return t===u.POINTS||t===u.LINES||t===u.LINE_LOOP||t===u.LINE_STRIP||t===u.TRIANGLES||t===u.TRIANGLE_STRIP||t===u.TRIANGLE_FAN}};var c=Object.freeze(u);function I(t){t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT),r.Check.typeOf.object("options.attributes",t.attributes),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=n.defaultValue(t.primitiveType,c.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=n.defaultValue(t.geometryType,s.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}I.computeNumberOfVertices=function(t){r.Check.typeOf.object("geometry",t);let e=-1;for(const i in t.attributes)if(t.attributes.hasOwnProperty(i)&&n.defined(t.attributes[i])&&n.defined(t.attributes[i].values)){const n=t.attributes[i],a=n.values.length/n.componentsPerAttribute;if(e!==a&&-1!==e)throw new r.DeveloperError("All attribute lists must have the same number of attributes.");e=a}return e};const p=new e.Cartographic,l=new e.Cartesian3,N=new e.Matrix4,f=[new e.Cartographic,new e.Cartographic,new e.Cartographic],m=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],T=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],b=new e.Cartesian3,E=new a.Quaternion,L=new e.Matrix4,h=new e.Matrix2;function d(t){if(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT),!n.defined(t.componentDatatype))throw new r.DeveloperError("options.componentDatatype is required.");if(!n.defined(t.componentsPerAttribute))throw new r.DeveloperError("options.componentsPerAttribute is required.");if(t.componentsPerAttribute<1||t.componentsPerAttribute>4)throw new r.DeveloperError("options.componentsPerAttribute must be between 1 and 4.");if(!n.defined(t.values))throw new r.DeveloperError("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=n.defaultValue(t.normalize,!1),this.values=t.values}I._textureCoordinateRotationPoints=function(t,r,n,i){let o;const s=e.Rectangle.center(i,p),u=e.Cartographic.toCartesian(s,n,l),c=a.Transforms.eastNorthUpToFixedFrame(u,n,N),I=e.Matrix4.inverse(c,N),d=m,y=f;y[0].longitude=i.west,y[0].latitude=i.south,y[1].longitude=i.west,y[1].latitude=i.north,y[2].longitude=i.east,y[2].latitude=i.south;let A=b;for(o=0;o<3;o++)e.Cartographic.toCartesian(y[o],n,A),A=e.Matrix4.multiplyByPointAsVector(I,A,A),d[o].x=A.x,d[o].y=A.y;const C=a.Quaternion.fromAxisAngle(e.Cartesian3.UNIT_Z,-r,E),P=e.Matrix3.fromQuaternion(C,L),w=t.length;let x=Number.POSITIVE_INFINITY,S=Number.POSITIVE_INFINITY,G=Number.NEGATIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(o=0;o