月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-07-07 3c23ce2d0214a1246664e61fd51466033e25481e
1
define(["exports","./defaultValue-865ac579","./Math-76ce6367"],(function(e,t,n){"use strict";function i(e,n,i){this.x=t.defaultValue(e,0),this.y=t.defaultValue(n,0),this.z=t.defaultValue(i,0)}i.fromSpherical=function(e,n){t.defined(n)||(n=new i);const r=e.clock,a=e.cone,o=t.defaultValue(e.magnitude,1),u=o*Math.sin(a);return n.x=u*Math.cos(r),n.y=u*Math.sin(r),n.z=o*Math.cos(a),n},i.fromElements=function(e,n,r,a){return t.defined(a)?(a.x=e,a.y=n,a.z=r,a):new i(e,n,r)},i.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n):new i(e.x,e.y,e.z)},i.fromCartesian4=i.clone,i.packedLength=3,i.pack=function(e,n,i){return i=t.defaultValue(i,0),n[i++]=e.x,n[i++]=e.y,n[i]=e.z,n},i.unpack=function(e,n,r){return n=t.defaultValue(n,0),t.defined(r)||(r=new i),r.x=e[n++],r.y=e[n++],r.z=e[n],r},i.packArray=function(e,n){const r=e.length,a=3*r;t.defined(n)?(Array.isArray(n)||n.length===a)&&n.length!==a&&(n.length=a):n=new Array(a);for(let t=0;t<r;++t)i.pack(e[t],n,3*t);return n},i.unpackArray=function(e,n){const r=e.length;t.defined(n)?n.length=r/3:n=new Array(r/3);for(let t=0;t<r;t+=3){const r=t/3;n[r]=i.unpack(e,t,n[r])}return n},i.fromArray=i.unpack,i.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},i.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},i.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n},i.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n},i.clamp=function(e,t,i,r){const a=n.CesiumMath.clamp(e.x,t.x,i.x),o=n.CesiumMath.clamp(e.y,t.y,i.y),u=n.CesiumMath.clamp(e.z,t.z,i.z);return r.x=a,r.y=o,r.z=u,r},i.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},i.magnitude=function(e){return Math.sqrt(i.magnitudeSquared(e))};const r=new i;i.distance=function(e,t){return i.subtract(e,t,r),i.magnitude(r)},i.distanceSquared=function(e,t){return i.subtract(e,t,r),i.magnitudeSquared(r)},i.normalize=function(e,t){const n=i.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t},i.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},i.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n},i.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n},i.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n},i.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n},i.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n},i.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n},i.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},i.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};const a=new i;i.lerp=function(e,t,n,r){return i.multiplyByScalar(t,n,a),r=i.multiplyByScalar(e,1-n,r),i.add(a,r,r)};const o=new i,u=new i;i.angleBetween=function(e,t){i.normalize(e,o),i.normalize(t,u);const n=i.dot(o,u),r=i.magnitude(i.cross(o,u,o));return Math.atan2(r,n)};const s=new i;i.mostOrthogonalAxis=function(e,t){const n=i.normalize(e,s);return i.abs(n,n),t=n.x<=n.y?n.x<=n.z?i.clone(i.UNIT_X,t):i.clone(i.UNIT_Z,t):n.y<=n.z?i.clone(i.UNIT_Y,t):i.clone(i.UNIT_Z,t)},i.projectVector=function(e,t,n){const r=i.dot(e,t)/i.dot(t,t);return i.multiplyByScalar(t,r,n)},i.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z},i.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]},i.equalsEpsilon=function(e,i,r,a){return e===i||t.defined(e)&&t.defined(i)&&n.CesiumMath.equalsEpsilon(e.x,i.x,r,a)&&n.CesiumMath.equalsEpsilon(e.y,i.y,r,a)&&n.CesiumMath.equalsEpsilon(e.z,i.z,r,a)},i.cross=function(e,t,n){const i=e.x,r=e.y,a=e.z,o=t.x,u=t.y,s=t.z,c=r*s-a*u,d=a*o-i*s,l=i*u-r*o;return n.x=c,n.y=d,n.z=l,n},i.midpoint=function(e,t,n){return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),n.z=.5*(e.z+t.z),n},i.fromDegrees=function(e,t,r,a,o){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),i.fromRadians(e,t,r,a,o)};let c=new i,d=new i;const l=new i(40680631590769,40680631590769,40408299984661.445);i.fromCGCS2000Degrees=function(e,t,r,a){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),i.fromcgcs2000Radians(e,t,r,a)};const f=new i(40680631590769,40680631590769,40408299983328.77);i.fromcgcs2000Radians=function(e,n,r,a){r=t.defaultValue(r,0);const o=f,u=Math.cos(n);c.x=u*Math.cos(e),c.y=u*Math.sin(e),c.z=Math.sin(n),c=i.normalize(c,c),i.multiplyComponents(o,c,d);const s=Math.sqrt(i.dot(c,d));return d=i.divideByScalar(d,s,d),c=i.multiplyByScalar(c,r,c),t.defined(a)||(a=new i),i.add(d,c,a)},c=new i,d=new i;const h=new i(301855876e4,301855876e4,301855876e4);i.fromRadians=function(e,n,r,a,o){r=t.defaultValue(r,0);let u=null;u="CGCS2000"===globalThis?.ellipsoidCoordinates?f:"MOON"===globalThis?.ellipsoidCoordinates?h:t.defined(a)?a.radiiSquared:l;const s=Math.cos(n);c.x=s*Math.cos(e),c.y=s*Math.sin(e),c.z=Math.sin(n),c=i.normalize(c,c),i.multiplyComponents(u,c,d);const m=Math.sqrt(i.dot(c,d));return d=i.divideByScalar(d,m,d),c=i.multiplyByScalar(c,r,c),t.defined(o)||(o=new i),i.add(d,c,o)},i.fromDegreesArray=function(e,n,r){const a=e.length;t.defined(r)?r.length=a/2:r=new Array(a/2);for(let t=0;t<a;t+=2){const a=e[t],o=e[t+1],u=t/2;r[u]=i.fromDegrees(a,o,0,n,r[u])}return r},i.fromRadiansArray=function(e,n,r){const a=e.length;t.defined(r)?r.length=a/2:r=new Array(a/2);for(let t=0;t<a;t+=2){const a=e[t],o=e[t+1],u=t/2;r[u]=i.fromRadians(a,o,0,n,r[u])}return r},i.fromDegreesArrayHeights=function(e,n,r){const a=e.length;t.defined(r)?r.length=a/3:r=new Array(a/3);for(let t=0;t<a;t+=3){const a=e[t],o=e[t+1],u=e[t+2],s=t/3;r[s]=i.fromDegrees(a,o,u,n,r[s])}return r},i.fromRadiansArrayHeights=function(e,n,r){const a=e.length;t.defined(r)?r.length=a/3:r=new Array(a/3);for(let t=0;t<a;t+=3){const a=e[t],o=e[t+1],u=e[t+2],s=t/3;r[s]=i.fromRadians(a,o,u,n,r[s])}return r},i.ZERO=Object.freeze(new i(0,0,0)),i.ONE=Object.freeze(new i(1,1,1)),i.UNIT_X=Object.freeze(new i(1,0,0)),i.UNIT_Y=Object.freeze(new i(0,1,0)),i.UNIT_Z=Object.freeze(new i(0,0,1)),i.prototype.clone=function(e){return i.clone(this,e)},i.prototype.equals=function(e){return i.equals(this,e)},i.prototype.equalsEpsilon=function(e,t,n){return i.equalsEpsilon(this,e,t,n)},i.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};const m=new i,y=new i;function p(e,r,a,o,u){const s=e.x,c=e.y,d=e.z,l=r.x,f=r.y,h=r.z,p=s*s*l*l,g=c*c*f*f,x=d*d*h*h,z=p+g+x,M=Math.sqrt(1/z),w=i.multiplyByScalar(e,M,m);if(z<o)return isFinite(M)?i.clone(w,u):void 0;const S=a.x,C=a.y,R=a.z,q=y;q.x=w.x*S*2,q.y=w.y*C*2,q.z=w.z*R*2;let O,_,b,T,E,A,v,N,I,V,U,k=(1-M)*i.magnitude(e)/(.5*i.magnitude(q)),L=0;do{k-=L,b=1/(1+k*S),T=1/(1+k*C),E=1/(1+k*R),A=b*b,v=T*T,N=E*E,I=A*b,V=v*T,U=N*E,O=p*A+g*v+x*N-1,_=p*I*S+g*V*C+x*U*R;L=O/(-2*_)}while(Math.abs(O)>n.CesiumMath.EPSILON12);return t.defined(u)?(u.x=s*b,u.y=c*T,u.z=d*E,u):new i(s*b,c*T,d*E)}function g(e,n,i){this.longitude=t.defaultValue(e,0),this.latitude=t.defaultValue(n,0),this.height=t.defaultValue(i,0)}g.fromRadians=function(e,n,i,r){return i=t.defaultValue(i,0),t.defined(r)?(r.longitude=e,r.latitude=n,r.height=i,r):new g(e,n,i)},g.fromDegrees=function(e,t,i,r){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),g.fromRadians(e,t,i,r)};const x=new i,z=new i,M=new i,w=new i(1/6378137,1/6378137,1/6356752.314245179),S=new i(1/40680631590769,1/40680631590769,1/40408299984661.445),C=new i(1/1737400,1/1737400,1/1737400),R=new i(1/301855876e4,1/301855876e4,1/301855876e4),q=new i(1/6378137,1/6378137,1/6356752.314140356),O=new i(1/40680631590769,1/40680631590769,1/40408299983328.77),_=n.CesiumMath.EPSILON1;function b(e,r,a,o){r=t.defaultValue(r,0),a=t.defaultValue(a,0),o=t.defaultValue(o,0),e._radii=new i(r,a,o),e._radiiSquared=new i(r*r,a*a,o*o),e._radiiToTheFourth=new i(r*r*r*r,a*a*a*a,o*o*o*o),e._oneOverRadii=new i(0===r?0:1/r,0===a?0:1/a,0===o?0:1/o),e._oneOverRadiiSquared=new i(0===r?0:1/(r*r),0===a?0:1/(a*a),0===o?0:1/(o*o)),e._minimumRadius=Math.min(r,a,o),e._maximumRadius=Math.max(r,a,o),e._centerToleranceSquared=n.CesiumMath.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function T(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,b(this,e,t,n)}g.fromCartesian=function(e,r,a){let o=null,u=null;const s=t.defined(r)?r._centerToleranceSquared:_;"CGCS2000"===globalThis?.ellipsoidCoordinates?(o=q,u=O):"MOON"===globalThis?.ellipsoidCoordinates?(o=C,u=R):(o=t.defined(r)?r.oneOverRadii:w,u=t.defined(r)?r.oneOverRadiiSquared:S);const c=p(e,o,u,s,z);if(!t.defined(c))return;let d=i.multiplyComponents(c,u,x);d=i.normalize(d,d);const l=i.subtract(e,c,M),f=Math.atan2(d.y,d.x),h=Math.asin(d.z),m=n.CesiumMath.sign(i.dot(l,e))*i.magnitude(l);return t.defined(a)?(a.longitude=f,a.latitude=h,a.height=m,a):new g(f,h,m)},g.toCartesian=function(e,t,n){return i.fromRadians(e.longitude,e.latitude,e.height,t,n)},g.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n.longitude=e.longitude,n.latitude=e.latitude,n.height=e.height,n):new g(e.longitude,e.latitude,e.height)},g.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e.longitude===n.longitude&&e.latitude===n.latitude&&e.height===n.height},g.equalsEpsilon=function(e,n,i){return i=t.defaultValue(i,0),e===n||t.defined(e)&&t.defined(n)&&Math.abs(e.longitude-n.longitude)<=i&&Math.abs(e.latitude-n.latitude)<=i&&Math.abs(e.height-n.height)<=i},g.ZERO=Object.freeze(new g(0,0,0)),g.prototype.clone=function(e){return g.clone(this,e)},g.prototype.equals=function(e){return g.equals(this,e)},g.prototype.equalsEpsilon=function(e,t){return g.equalsEpsilon(this,e,t)},g.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`},Object.defineProperties(T.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),T.clone=function(e,n){if(!t.defined(e))return;const r=e._radii;return t.defined(n)?(i.clone(r,n._radii),i.clone(e._radiiSquared,n._radiiSquared),i.clone(e._radiiToTheFourth,n._radiiToTheFourth),i.clone(e._oneOverRadii,n._oneOverRadii),i.clone(e._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=e._minimumRadius,n._maximumRadius=e._maximumRadius,n._centerToleranceSquared=e._centerToleranceSquared,n):new T(r.x,r.y,r.z)},T.fromCartesian3=function(e,n){return t.defined(n)||(n=new T),t.defined(e)?(b(n,e.x,e.y,e.z),n):n},T.WGS84=Object.freeze(new T(6378137,6378137,6356752.314245179)),T.CGCS2000=Object.freeze(new T(6378137,6378137,6356752.314140356)),T.MOON2023=Object.freeze(new T(1737400,1737400,1737400)),T.UNIT_SPHERE=Object.freeze(new T(1,1,1)),T.MOON=Object.freeze(new T(n.CesiumMath.LUNAR_RADIUS,n.CesiumMath.LUNAR_RADIUS,n.CesiumMath.LUNAR_RADIUS)),T.prototype.clone=function(e){return T.clone(this,e)},T.packedLength=i.packedLength,T.pack=function(e,n,r){return r=t.defaultValue(r,0),i.pack(e._radii,n,r),n},T.unpack=function(e,n,r){n=t.defaultValue(n,0);const a=i.unpack(e,n);return T.fromCartesian3(a,r)},T.prototype.geocentricSurfaceNormal=i.normalize,T.prototype.geodeticSurfaceNormalCartographic=function(e,n){const r=e.longitude,a=e.latitude,o=Math.cos(a),u=o*Math.cos(r),s=o*Math.sin(r),c=Math.sin(a);return t.defined(n)||(n=new i),n.x=u,n.y=s,n.z=c,i.normalize(n,n)},T.prototype.geodeticSurfaceNormal=function(e,r){if(!i.equalsEpsilon(e,i.ZERO,n.CesiumMath.EPSILON14))return t.defined(r)||(r=new i),r=i.multiplyComponents(e,this._oneOverRadiiSquared,r),i.normalize(r,r)};const E=new i,A=new i;T.prototype.cartographicToCartesian=function(e,n){const r=E,a=A;this.geodeticSurfaceNormalCartographic(e,r),i.multiplyComponents(this._radiiSquared,r,a);const o=Math.sqrt(i.dot(r,a));return i.divideByScalar(a,o,a),i.multiplyByScalar(r,e.height,r),t.defined(n)||(n=new i),i.add(a,r,n)},T.prototype.cartographicArrayToCartesianArray=function(e,n){const i=e.length;t.defined(n)?n.length=i:n=new Array(i);for(let t=0;t<i;t++)n[t]=this.cartographicToCartesian(e[t],n[t]);return n};const v=new i,N=new i,I=new i;T.prototype.cartesianToCartographic=function(e,r){const a=this.scaleToGeodeticSurface(e,N);if(!t.defined(a))return;const o=this.geodeticSurfaceNormal(a,v),u=i.subtract(e,a,I),s=Math.atan2(o.y,o.x),c=Math.asin(o.z),d=n.CesiumMath.sign(i.dot(u,e))*i.magnitude(u);return t.defined(r)?(r.longitude=s,r.latitude=c,r.height=d,r):new g(s,c,d)},T.prototype.cartesianArrayToCartographicArray=function(e,n){const i=e.length;t.defined(n)?n.length=i:n=new Array(i);for(let t=0;t<i;++t)n[t]=this.cartesianToCartographic(e[t],n[t]);return n},T.prototype.scaleToGeodeticSurface=function(e,t){return p(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},T.prototype.scaleToGeocentricSurface=function(e,n){t.defined(n)||(n=new i);const r=e.x,a=e.y,o=e.z,u=this._oneOverRadiiSquared,s=1/Math.sqrt(r*r*u.x+a*a*u.y+o*o*u.z);return i.multiplyByScalar(e,s,n)},T.prototype.transformPositionToScaledSpace=function(e,n){return t.defined(n)||(n=new i),i.multiplyComponents(e,this._oneOverRadii,n)},T.prototype.transformPositionFromScaledSpace=function(e,n){return t.defined(n)||(n=new i),i.multiplyComponents(e,this._radii,n)},T.prototype.equals=function(e){return this===e||t.defined(e)&&i.equals(this._radii,e._radii)},T.prototype.toString=function(){return this._radii.toString()},T.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,n,r){n=t.defaultValue(n,0);const a=this._squaredXOverSquaredZ;if(t.defined(r)||(r=new i),r.x=0,r.y=0,r.z=e.z*(1-a),!(Math.abs(r.z)>=this._radii.z-n))return r};const V=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],U=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function k(e,t,n){const i=.5*(t+e),r=.5*(t-e);let a=0;for(let e=0;e<5;e++){const t=r*V[e];a+=U[e]*(n(i+t)+n(i-t))}return a*=r,a}function L(e,n,i,r,a,o,u,s,c){this[0]=t.defaultValue(e,0),this[1]=t.defaultValue(r,0),this[2]=t.defaultValue(u,0),this[3]=t.defaultValue(n,0),this[4]=t.defaultValue(a,0),this[5]=t.defaultValue(s,0),this[6]=t.defaultValue(i,0),this[7]=t.defaultValue(o,0),this[8]=t.defaultValue(c,0)}T.prototype.surfaceArea=function(e){const t=e.west;let i=e.east;const r=e.south,a=e.north;for(;i<t;)i+=n.CesiumMath.TWO_PI;const o=this._radiiSquared,u=o.x,s=o.y,c=o.z,d=u*s;return k(r,a,(function(e){const n=Math.cos(e),r=Math.sin(e);return Math.cos(e)*k(t,i,(function(e){const t=Math.cos(e),i=Math.sin(e);return Math.sqrt(d*r*r+c*(s*t*t+u*i*i)*n*n)}))}))},L.packedLength=9,L.pack=function(e,n,i){return i=t.defaultValue(i,0),n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i++]=e[3],n[i++]=e[4],n[i++]=e[5],n[i++]=e[6],n[i++]=e[7],n[i++]=e[8],n},L.unpack=function(e,n,i){return n=t.defaultValue(n,0),t.defined(i)||(i=new L),i[0]=e[n++],i[1]=e[n++],i[2]=e[n++],i[3]=e[n++],i[4]=e[n++],i[5]=e[n++],i[6]=e[n++],i[7]=e[n++],i[8]=e[n++],i},L.packArray=function(e,n){const i=e.length,r=9*i;t.defined(n)?(Array.isArray(n)||n.length===r)&&n.length!==r&&(n.length=r):n=new Array(r);for(let t=0;t<i;++t)L.pack(e[t],n,9*t);return n},L.unpackArray=function(e,n){const i=e.length;t.defined(n)?n.length=i/9:n=new Array(i/9);for(let t=0;t<i;t+=9){const i=t/9;n[i]=L.unpack(e,t,n[i])}return n},L.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n):new L(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},L.fromArray=L.unpack,L.fromColumnMajorArray=function(e,t){return L.clone(e,t)},L.fromRowMajorArray=function(e,n){return t.defined(n)?(n[0]=e[0],n[1]=e[3],n[2]=e[6],n[3]=e[1],n[4]=e[4],n[5]=e[7],n[6]=e[2],n[7]=e[5],n[8]=e[8],n):new L(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},L.fromQuaternion=function(e,n){const i=e.x*e.x,r=e.x*e.y,a=e.x*e.z,o=e.x*e.w,u=e.y*e.y,s=e.y*e.z,c=e.y*e.w,d=e.z*e.z,l=e.z*e.w,f=e.w*e.w,h=i-u-d+f,m=2*(r-l),y=2*(a+c),p=2*(r+l),g=-i+u-d+f,x=2*(s-o),z=2*(a-c),M=2*(s+o),w=-i-u+d+f;return t.defined(n)?(n[0]=h,n[1]=p,n[2]=z,n[3]=m,n[4]=g,n[5]=M,n[6]=y,n[7]=x,n[8]=w,n):new L(h,m,y,p,g,x,z,M,w)},L.fromHeadingPitchRoll=function(e,n){const i=Math.cos(-e.pitch),r=Math.cos(-e.heading),a=Math.cos(e.roll),o=Math.sin(-e.pitch),u=Math.sin(-e.heading),s=Math.sin(e.roll),c=i*r,d=-a*u+s*o*r,l=s*u+a*o*r,f=i*u,h=a*r+s*o*u,m=-s*r+a*o*u,y=-o,p=s*i,g=a*i;return t.defined(n)?(n[0]=c,n[1]=f,n[2]=y,n[3]=d,n[4]=h,n[5]=p,n[6]=l,n[7]=m,n[8]=g,n):new L(c,d,l,f,h,m,y,p,g)},L.fromScale=function(e,n){return t.defined(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=0,n[4]=e.y,n[5]=0,n[6]=0,n[7]=0,n[8]=e.z,n):new L(e.x,0,0,0,e.y,0,0,0,e.z)},L.fromUniformScale=function(e,n){return t.defined(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=0,n[4]=e,n[5]=0,n[6]=0,n[7]=0,n[8]=e,n):new L(e,0,0,0,e,0,0,0,e)},L.fromCrossProduct=function(e,n){return t.defined(n)?(n[0]=0,n[1]=e.z,n[2]=-e.y,n[3]=-e.z,n[4]=0,n[5]=e.x,n[6]=e.y,n[7]=-e.x,n[8]=0,n):new L(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},L.fromRotationX=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=i,n[5]=r,n[6]=0,n[7]=-r,n[8]=i,n):new L(1,0,0,0,i,-r,0,r,i)},L.fromRotationY=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=i,n[1]=0,n[2]=-r,n[3]=0,n[4]=1,n[5]=0,n[6]=r,n[7]=0,n[8]=i,n):new L(i,0,r,0,1,0,-r,0,i)},L.fromRotationZ=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=i,n[1]=r,n[2]=0,n[3]=-r,n[4]=i,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new L(i,-r,0,r,i,0,0,0,1)},L.toArray=function(e,n){return t.defined(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},L.getElementIndex=function(e,t){return 3*e+t},L.getColumn=function(e,t,n){const i=3*t,r=e[i],a=e[i+1],o=e[i+2];return n.x=r,n.y=a,n.z=o,n},L.setColumn=function(e,t,n,i){const r=3*t;return(i=L.clone(e,i))[r]=n.x,i[r+1]=n.y,i[r+2]=n.z,i},L.getRow=function(e,t,n){const i=e[t],r=e[t+3],a=e[t+6];return n.x=i,n.y=r,n.z=a,n},L.setRow=function(e,t,n,i){return(i=L.clone(e,i))[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};const B=new i;L.setScale=function(e,t,n){const i=L.getScale(e,B),r=t.x/i.x,a=t.y/i.y,o=t.z/i.z;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=e[3]*a,n[4]=e[4]*a,n[5]=e[5]*a,n[6]=e[6]*o,n[7]=e[7]*o,n[8]=e[8]*o,n};const j=new i;L.setUniformScale=function(e,t,n){const i=L.getScale(e,j),r=t/i.x,a=t/i.y,o=t/i.z;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=e[3]*a,n[4]=e[4]*a,n[5]=e[5]*a,n[6]=e[6]*o,n[7]=e[7]*o,n[8]=e[8]*o,n};const $=new i;L.getScale=function(e,t){return t.x=i.magnitude(i.fromElements(e[0],e[1],e[2],$)),t.y=i.magnitude(i.fromElements(e[3],e[4],e[5],$)),t.z=i.magnitude(i.fromElements(e[6],e[7],e[8],$)),t};const D=new i;L.getMaximumScale=function(e){return L.getScale(e,D),i.maximumComponent(D)};const P=new i;L.setRotation=function(e,t,n){const i=L.getScale(e,P);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};const W=new i;L.getRotation=function(e,t){const n=L.getScale(e,W);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t},L.multiply=function(e,t,n){const i=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],a=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],o=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],u=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],s=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],c=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],d=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],l=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=i,n[1]=r,n[2]=a,n[3]=o,n[4]=u,n[5]=s,n[6]=c,n[7]=d,n[8]=l,n},L.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},L.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},L.multiplyByVector=function(e,t,n){const i=t.x,r=t.y,a=t.z,o=e[0]*i+e[3]*r+e[6]*a,u=e[1]*i+e[4]*r+e[7]*a,s=e[2]*i+e[5]*r+e[8]*a;return n.x=o,n.y=u,n.z=s,n},L.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},L.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},L.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},L.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},L.transpose=function(e,t){const n=e[0],i=e[3],r=e[6],a=e[1],o=e[4],u=e[7],s=e[2],c=e[5],d=e[8];return t[0]=n,t[1]=i,t[2]=r,t[3]=a,t[4]=o,t[5]=u,t[6]=s,t[7]=c,t[8]=d,t};const Z=[1,0,0],F=[2,2,1];function G(e){let t=0;for(let n=0;n<3;++n){const i=e[L.getElementIndex(F[n],Z[n])];t+=2*i*i}return Math.sqrt(t)}function X(e,t){const i=n.CesiumMath.EPSILON15;let r=0,a=1;for(let t=0;t<3;++t){const n=Math.abs(e[L.getElementIndex(F[t],Z[t])]);n>r&&(a=t,r=n)}let o=1,u=0;const s=Z[a],c=F[a];if(Math.abs(e[L.getElementIndex(c,s)])>i){const t=(e[L.getElementIndex(c,c)]-e[L.getElementIndex(s,s)])/2/e[L.getElementIndex(c,s)];let n;n=t<0?-1/(-t+Math.sqrt(1+t*t)):1/(t+Math.sqrt(1+t*t)),o=1/Math.sqrt(1+n*n),u=n*o}return(t=L.clone(L.IDENTITY,t))[L.getElementIndex(s,s)]=t[L.getElementIndex(c,c)]=o,t[L.getElementIndex(c,s)]=u,t[L.getElementIndex(s,c)]=-u,t}const Y=new L,H=new L;L.computeEigenDecomposition=function(e,i){const r=n.CesiumMath.EPSILON20;let a=0,o=0;t.defined(i)||(i={});const u=i.unitary=L.clone(L.IDENTITY,i.unitary),s=i.diagonal=L.clone(e,i.diagonal),c=r*function(e){let t=0;for(let n=0;n<9;++n){const i=e[n];t+=i*i}return Math.sqrt(t)}(s);for(;o<10&&G(s)>c;)X(s,Y),L.transpose(Y,H),L.multiply(s,Y,s),L.multiply(H,s,s),L.multiply(u,Y,u),++a>2&&(++o,a=0);return i},L.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},L.determinant=function(e){const t=e[0],n=e[3],i=e[6],r=e[1],a=e[4],o=e[7],u=e[2],s=e[5],c=e[8];return t*(a*c-s*o)+r*(s*i-n*c)+u*(n*o-a*i)},L.inverse=function(e,t){const n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],u=e[5],s=e[6],c=e[7],d=e[8],l=L.determinant(e);t[0]=o*d-c*u,t[1]=c*r-i*d,t[2]=i*u-o*r,t[3]=s*u-a*d,t[4]=n*d-s*r,t[5]=a*r-n*u,t[6]=a*c-s*o,t[7]=s*i-n*c,t[8]=n*o-a*i;const f=1/l;return L.multiplyByScalar(t,f,t)};const Q=new L;L.inverseTranspose=function(e,t){return L.inverse(L.transpose(e,Q),t)},L.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[3]===n[3]&&e[4]===n[4]&&e[5]===n[5]&&e[6]===n[6]&&e[7]===n[7]&&e[8]===n[8]},L.equalsEpsilon=function(e,n,i){return i=t.defaultValue(i,0),e===n||t.defined(e)&&t.defined(n)&&Math.abs(e[0]-n[0])<=i&&Math.abs(e[1]-n[1])<=i&&Math.abs(e[2]-n[2])<=i&&Math.abs(e[3]-n[3])<=i&&Math.abs(e[4]-n[4])<=i&&Math.abs(e[5]-n[5])<=i&&Math.abs(e[6]-n[6])<=i&&Math.abs(e[7]-n[7])<=i&&Math.abs(e[8]-n[8])<=i},L.IDENTITY=Object.freeze(new L(1,0,0,0,1,0,0,0,1)),L.ZERO=Object.freeze(new L(0,0,0,0,0,0,0,0,0)),L.COLUMN0ROW0=0,L.COLUMN0ROW1=1,L.COLUMN0ROW2=2,L.COLUMN1ROW0=3,L.COLUMN1ROW1=4,L.COLUMN1ROW2=5,L.COLUMN2ROW0=6,L.COLUMN2ROW1=7,L.COLUMN2ROW2=8,Object.defineProperties(L.prototype,{length:{get:function(){return L.packedLength}}}),L.prototype.clone=function(e){return L.clone(this,e)},L.prototype.equals=function(e){return L.equals(this,e)},L.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]},L.prototype.equalsEpsilon=function(e,t){return L.equalsEpsilon(this,e,t)},L.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`},e.Cartesian3=i,e.Cartographic=g,e.Ellipsoid=T,e.Matrix3=L}));