define(["exports","./Matrix2-ccd5b911","./when-4bbc8319","./RuntimeError-346a3079","./Transforms-d5c6ad6e","./ComponentDatatype-93750d1a"],function(t,m,S,n,a,X){"use strict";var w=Math.cos,M=Math.sin,Y=Math.sqrt,r={computePosition:function(t,n,a,r,e,o,s){var i=n.radiiSquared,g=t.nwCorner,u=t.boundingRectangle,h=g.latitude-t.granYCos*r+e*t.granXSin,c=w(h),C=M(h),l=i.z*C,d=g.longitude+r*t.granYSin+e*t.granXCos,n=c*w(d),g=c*M(d),c=i.x*n,i=i.y*g,C=Y(c*n+i*g+l*C);o.x=c/C,o.y=i/C,o.z=l/C,a&&(a=t.stNwCorner,S.defined(a)?(h=a.latitude-t.stGranYCos*r+e*t.stGranXSin,d=a.longitude+r*t.stGranYSin+e*t.stGranXCos,s.x=(d-t.stWest)*t.lonScalar,s.y=(h-t.stSouth)*t.latScalar):(s.x=(d-u.west)*t.lonScalar,s.y=(h-u.south)*t.latScalar))}},l=new m.Matrix2,d=new m.Cartesian3,p=new m.Cartographic,x=new m.Cartesian3,R=new a.GeographicProjection;function G(t,n,a,r,e,o,s){var i=Math.cos(n),g=r*i,u=a*i,h=Math.sin(n),c=r*h,C=a*h;d=R.project(t,d),d=m.Cartesian3.subtract(d,x,d);i=m.Matrix2.fromRotation(n,l);d=m.Matrix2.multiplyByVector(i,d,d),d=m.Cartesian3.add(d,x,d);r=(t=R.unproject(d,t)).latitude,a=r+--o*C,h=r-g*--s,n=r-g*s+o*C,i=Math.max(r,a,h,n),r=Math.min(r,a,h,n),a=t.longitude,h=a+o*u,n=a+s*c,o=a+s*c+o*u;return{north:i,south:r,east:Math.max(a,h,n,o),west:Math.min(a,h,n,o),granYCos:g,granYSin:c,granXCos:u,granXSin:C,nwCorner:t}}r.computeOptions=function(t,n,a,r,e,o,s){var i=t.east,g=t.west,u=t.north,h=t.south,c=!1,C=!1;u===X.CesiumMath.PI_OVER_TWO&&(c=!0),h===-X.CesiumMath.PI_OVER_TWO&&(C=!0);var l,d=u-h,S=(w=i