define(["exports","./Matrix2-e3fb4559","./Cartesian3-7e9cc2ff","./Check-741c5f3c","./defaultValue-81eec7ed","./Matrix4-d34187af","./WebGLConstants-508b9636","./Transforms-99272364"],(function(t,e,n,a,i,r,o,s){"use strict";var u=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});const I={POINTS:o.WebGLConstants.POINTS,LINES:o.WebGLConstants.LINES,LINE_LOOP:o.WebGLConstants.LINE_LOOP,LINE_STRIP:o.WebGLConstants.LINE_STRIP,TRIANGLES:o.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:o.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:o.WebGLConstants.TRIANGLE_FAN,validate:function(t){return t===I.POINTS||t===I.LINES||t===I.LINE_LOOP||t===I.LINE_STRIP||t===I.TRIANGLES||t===I.TRIANGLE_STRIP||t===I.TRIANGLE_FAN}};var c=Object.freeze(I);function N(t){t=i.defaultValue(t,i.defaultValue.EMPTY_OBJECT),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=i.defaultValue(t.primitiveType,c.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=i.defaultValue(t.geometryType,u.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute,this.MaxPoint=t.MaxPoint,this.MinPoint=t.MinPoint}N.computeNumberOfVertices=function(t){let e=-1;for(const n in t.attributes)if(t.attributes.hasOwnProperty(n)&&i.defined(t.attributes[n])&&i.defined(t.attributes[n].values)){const a=t.attributes[n];e=a.values.length/a.componentsPerAttribute}return e};const l=new e.Cartographic,T=new n.Cartesian3,f=new r.Matrix4,p=[new e.Cartographic,new e.Cartographic,new e.Cartographic],h=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],m=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],y=new n.Cartesian3,C=new s.Quaternion,b=new r.Matrix4,E=new e.Matrix2;N._textureCoordinateRotationPoints=function(t,a,i,o){let u;const I=e.Rectangle.center(o,l),c=e.Cartographic.toCartesian(I,i,T),N=s.Transforms.eastNorthUpToFixedFrame(c,i,f),L=r.Matrix4.inverse(N,f),x=h,d=p;d[0].longitude=o.west,d[0].latitude=o.south,d[1].longitude=o.west,d[1].latitude=o.north,d[2].longitude=o.east,d[2].latitude=o.south;let P=y;for(u=0;u<3;u++)e.Cartographic.toCartesian(d[u],i,P),P=r.Matrix4.multiplyByPointAsVector(L,P,P),x[u].x=P.x,x[u].y=P.y;const A=s.Quaternion.fromAxisAngle(n.Cartesian3.UNIT_Z,-a,C),S=r.Matrix3.fromQuaternion(A,b),G=t.length;let M=Number.POSITIVE_INFINITY,w=Number.POSITIVE_INFINITY,O=Number.NEGATIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(u=0;u