text: /**
   * Cesium - https://github.com/AnalyticalGraphicsInc/cesium
   *
   * Copyright 2011-2020 Cesium Contributors
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   *
   * Columbus View (Pat. Pend.)
   *
   * Portions licensed separately.
   * See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
   */
  define(["exports","./when-4ca4e419","./Check-430b3551","./Math-c0afb7aa","./Cartesian2-0cd32dae","./defineProperties-24e785e9","./RuntimeError-443472b0"],function(e,I,n,X,P,t,H){"use strict";function r(e){this._ellipsoid=I.defaultValue(e,P.Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}t.defineProperties(r.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),r.prototype.project=function(e,t){var n=this._semimajorAxis,r=e.longitude*n,a=e.latitude*n,i=e.height;return I.defined(t)?(t.x=r,t.y=a,t.z=i,t):new P.Cartesian3(r,a,i)},r.prototype.unproject=function(e,t){var n=this._oneOverSemimajorAxis,r=e.x*n,a=e.y*n,i=e.z;return I.defined(t)?(t.longitude=r,t.latitude=a,t.height=i,t):new P.Cartographic(r,a,i)};var s=I.freezeObject({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function o(e,t){this.start=I.defaultValue(e,0),this.stop=I.defaultValue(t,0)}function J(e,t,n,r,a,i,s,o,u){this[0]=I.defaultValue(e,0),this[1]=I.defaultValue(r,0),this[2]=I.defaultValue(s,0),this[3]=I.defaultValue(t,0),this[4]=I.defaultValue(a,0),this[5]=I.defaultValue(o,0),this[6]=I.defaultValue(n,0),this[7]=I.defaultValue(i,0),this[8]=I.defaultValue(u,0)}J.packedLength=9,J.pack=function(e,t,n){return n=I.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t},J.unpack=function(e,t,n){return t=I.defaultValue(t,0),I.defined(n)||(n=new J),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n},J.clone=function(e,t){if(I.defined(e))return I.defined(t)?(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):new J(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},J.fromArray=function(e,t,n){return t=I.defaultValue(t,0),I.defined(n)||(n=new J),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n[4]=e[t+4],n[5]=e[t+5],n[6]=e[t+6],n[7]=e[t+7],n[8]=e[t+8],n},J.fromColumnMajorArray=function(e,t){return J.clone(e,t)},J.fromRowMajorArray=function(e,t){return I.defined(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new J(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},J.fromQuaternion=function(e,t){var n=e.x*e.x,r=e.x*e.y,a=e.x*e.z,i=e.x*e.w,s=e.y*e.y,o=e.y*e.z,u=e.y*e.w,l=e.z*e.z,c=e.z*e.w,d=e.w*e.w,f=n-s-l+d,h=2*(r-c),p=2*(a+u),m=2*(r+c),y=s-n-l+d,v=2*(o-i),C=2*(a-u),w=2*(o+i),g=-n-s+l+d;return I.defined(t)?(t[0]=f,t[1]=m,t[2]=C,t[3]=h,t[4]=y,t[5]=w,t[6]=p,t[7]=v,t[8]=g,t):new J(f,h,p,m,y,v,C,w,g)},J.fromHeadingPitchRoll=function(e,t){var n=Math.cos(-e.pitch),r=Math.cos(-e.heading),a=Math.cos(e.roll),i=Math.sin(-e.pitch),s=Math.sin(-e.heading),o=Math.sin(e.roll),u=n*r,l=-a*s+o*i*r,c=o*s+a*i*r,d=n*s,f=a*r+o*i*s,h=-o*r+a*i*s,p=-i,m=o*n,y=a*n;return I.defined(t)?(t[0]=u,t[1]=d,t[2]=p,t[3]=l,t[4]=f,t[5]=m,t[6]=c,t[7]=h,t[8]=y,t):new J(u,l,c,d,f,h,p,m,y)},J.fromScale=function(e,t){return I.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new J(e.x,0,0,0,e.y,0,0,0,e.z)},J.fromUniformScale=function(e,t){return I.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new J(e,0,0,0,e,0,0,0,e)},J.fromCrossProduct=function(e,t){return I.defined(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new J(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},J.fromRotationX=function(e,t){var n=Math.cos(e),r=Math.sin(e);return I.defined(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=r,t[6]=0,t[7]=-r,t[8]=n,t):new J(1,0,0,0,n,-r,0,r,n)},J.fromRotationY=function(e,t){var n=Math.cos(e),r=Math.sin(e);return I.defined(t)?(t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=1,t[5]=0,t[6]=r,t[7]=0,t[8]=n,t):new J(n,0,r,0,1,0,-r,0,n)},J.fromRotationZ=function(e,t){var n=Math.cos(e),r=Math.sin(e);return I.defined(t)?(t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new J(n,-r,0,r,n,0,0,0,1)},J.toArray=function(e,t){return I.defined(t)?(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):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},J.getElementIndex=function(e,t){return 3*e+t},J.getColumn=function(e,t,n){var r=3*t,a=e[r],i=e[1+r],s=e[2+r];return n.x=a,n.y=i,n.z=s,n},J.setColumn=function(e,t,n,r){var a=3*t;return(r=J.clone(e,r))[a]=n.x,r[1+a]=n.y,r[2+a]=n.z,r},J.getRow=function(e,t,n){var r=e[t],a=e[t+3],i=e[t+6];return n.x=r,n.y=a,n.z=i,n},J.setRow=function(e,t,n,r){return(r=J.clone(e,r))[t]=n.x,r[t+3]=n.y,r[t+6]=n.z,r};var a=new P.Cartesian3;J.getScale=function(e,t){return t.x=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[0],e[1],e[2],a)),t.y=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[3],e[4],e[5],a)),t.z=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[6],e[7],e[8],a)),t};var i=new P.Cartesian3;J.getMaximumScale=function(e){return J.getScale(e,i),P.Cartesian3.maximumComponent(i)},J.multiply=function(e,t,n){var r=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],a=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],i=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],s=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],o=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],u=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],l=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],c=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],d=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=r,n[1]=a,n[2]=i,n[3]=s,n[4]=o,n[5]=u,n[6]=l,n[7]=c,n[8]=d,n},J.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},J.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},J.multiplyByVector=function(e,t,n){var r=t.x,a=t.y,i=t.z,s=e[0]*r+e[3]*a+e[6]*i,o=e[1]*r+e[4]*a+e[7]*i,u=e[2]*r+e[5]*a+e[8]*i;return n.x=s,n.y=o,n.z=u,n},J.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},J.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},J.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},J.transpose=function(e,t){var n=e[0],r=e[3],a=e[6],i=e[1],s=e[4],o=e[7],u=e[2],l=e[5],c=e[8];return t[0]=n,t[1]=r,t[2]=a,t[3]=i,t[4]=s,t[5]=o,t[6]=u,t[7]=l,t[8]=c,t};var u=new P.Cartesian3(1,1,1);J.getRotation=function(e,t){var n=P.Cartesian3.divideComponents(u,J.getScale(e,i),i);return t=J.multiplyByScale(e,n,t)};var h=[1,0,0],p=[2,2,1];function l(e){for(var t=0,n=0;n<3;++n){var r=e[J.getElementIndex(p[n],h[n])];t+=2*r*r}return Math.sqrt(t)}function c(e,t){for(var n=X.CesiumMath.EPSILON15,r=0,a=1,i=0;i<3;++i){var s=Math.abs(e[J.getElementIndex(p[i],h[i])]);r<s&&(a=i,r=s)}var o=1,u=0,l=h[a],c=p[a];if(Math.abs(e[J.getElementIndex(c,l)])>n){var d,f=(e[J.getElementIndex(c,c)]-e[J.getElementIndex(l,l)])/2/e[J.getElementIndex(c,l)];u=(d=f<0?-1/(-f+Math.sqrt(1+f*f)):1/(f+Math.sqrt(1+f*f)))*(o=1/Math.sqrt(1+d*d))}return(t=J.clone(J.IDENTITY,t))[J.getElementIndex(l,l)]=t[J.getElementIndex(c,c)]=o,t[J.getElementIndex(c,l)]=u,t[J.getElementIndex(l,c)]=-u,t}var d=new J,f=new J;function G(e,t,n,r){this.x=I.defaultValue(e,0),this.y=I.defaultValue(t,0),this.z=I.defaultValue(n,0),this.w=I.defaultValue(r,0)}J.computeEigenDecomposition=function(e,t){var n=X.CesiumMath.EPSILON20,r=0,a=0;I.defined(t)||(t={});for(var i=t.unitary=J.clone(J.IDENTITY,t.unitary),s=t.diagonal=J.clone(e,t.diagonal),o=n*function(e){for(var t=0,n=0;n<9;++n){var r=e[n];t+=r*r}return Math.sqrt(t)}(s);a<10&&l(s)>o;)c(s,d),J.transpose(d,f),J.multiply(s,d,s),J.multiply(f,s,s),J.multiply(i,d,i),2<++r&&(++a,r=0);return t},J.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},J.determinant=function(e){var t=e[0],n=e[3],r=e[6],a=e[1],i=e[4],s=e[7],o=e[2],u=e[5],l=e[8];return t*(i*l-u*s)+a*(u*r-n*l)+o*(n*s-i*r)},J.inverse=function(e,t){var n=e[0],r=e[1],a=e[2],i=e[3],s=e[4],o=e[5],u=e[6],l=e[7],c=e[8],d=J.determinant(e);return t[0]=s*c-l*o,t[1]=l*a-r*c,t[2]=r*o-s*a,t[3]=u*o-i*c,t[4]=n*c-u*a,t[5]=i*a-n*o,t[6]=i*l-u*s,t[7]=u*r-n*l,t[8]=n*s-i*r,J.multiplyByScalar(t,1/d,t)},J.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},J.equalsEpsilon=function(e,t,n){return e===t||I.defined(e)&&I.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n},J.IDENTITY=I.freezeObject(new J(1,0,0,0,1,0,0,0,1)),J.ZERO=I.freezeObject(new J(0,0,0,0,0,0,0,0,0)),J.COLUMN0ROW0=0,J.COLUMN0ROW1=1,J.COLUMN0ROW2=2,J.COLUMN1ROW0=3,J.COLUMN1ROW1=4,J.COLUMN1ROW2=5,J.COLUMN2ROW0=6,J.COLUMN2ROW1=7,J.COLUMN2ROW2=8,t.defineProperties(J.prototype,{length:{get:function(){return J.packedLength}}}),J.prototype.clone=function(e){return J.clone(this,e)},J.prototype.equals=function(e){return J.equals(this,e)},J.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]},J.prototype.equalsEpsilon=function(e,t){return J.equalsEpsilon(this,e,t)},J.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},G.fromElements=function(e,t,n,r,a){return I.defined(a)?(a.x=e,a.y=t,a.z=n,a.w=r,a):new G(e,t,n,r)},G.fromColor=function(e,t){return I.defined(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new G(e.red,e.green,e.blue,e.alpha)},G.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new G(e.x,e.y,e.z,e.w)},G.packedLength=4,G.pack=function(e,t,n){return n=I.defaultValue(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},G.unpack=function(e,t,n){return t=I.defaultValue(t,0),I.defined(n)||(n=new G),n.x=e[t++],n.y=e[t++],n.z=e[t++],n.w=e[t],n},G.packArray=function(e,t){var n=e.length;I.defined(t)?t.length=4*n:t=new Array(4*n);for(var r=0;r<n;++r)G.pack(e[r],t,4*r);return t},G.unpackArray=function(e,t){var n=e.length;I.defined(t)?t.length=n/4:t=new Array(n/4);for(var r=0;r<n;r+=4){var a=r/4;t[a]=G.unpack(e,r,t[a])}return t},G.fromArray=G.unpack,G.maximumComponent=function(e){return Math.max(e.x,e.y,e.z,e.w)},G.minimumComponent=function(e){return Math.min(e.x,e.y,e.z,e.w)},G.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.w=Math.min(e.w,t.w),n},G.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.w=Math.max(e.w,t.w),n},G.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},G.magnitude=function(e){return Math.sqrt(G.magnitudeSquared(e))};var m=new G;G.distance=function(e,t){return G.subtract(e,t,m),G.magnitude(m)},G.distanceSquared=function(e,t){return G.subtract(e,t,m),G.magnitudeSquared(m)},G.normalize=function(e,t){var n=G.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,t},G.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},G.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.w=e.w*t.w,n},G.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.w=e.w/t.w,n},G.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.w=e.w+t.w,n},G.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.w=e.w-t.w,n},G.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},G.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},G.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},G.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var y=new G;G.lerp=function(e,t,n,r){return G.multiplyByScalar(t,n,y),r=G.multiplyByScalar(e,1-n,r),G.add(y,r,r)};var v=new G;G.mostOrthogonalAxis=function(e,t){var n=G.normalize(e,v);return G.abs(n,n),t=n.x<=n.y?n.x<=n.z?n.x<=n.w?G.clone(G.UNIT_X,t):G.clone(G.UNIT_W,t):n.z<=n.w?G.clone(G.UNIT_Z,t):G.clone(G.UNIT_W,t):n.y<=n.z?n.y<=n.w?G.clone(G.UNIT_Y,t):G.clone(G.UNIT_W,t):n.z<=n.w?G.clone(G.UNIT_Z,t):G.clone(G.UNIT_W,t)},G.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},G.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]&&e.w===t[n+3]},G.equalsEpsilon=function(e,t,n,r){return e===t||I.defined(e)&&I.defined(t)&&X.CesiumMath.equalsEpsilon(e.x,t.x,n,r)&&X.CesiumMath.equalsEpsilon(e.y,t.y,n,r)&&X.CesiumMath.equalsEpsilon(e.z,t.z,n,r)&&X.CesiumMath.equalsEpsilon(e.w,t.w,n,r)},G.ZERO=I.freezeObject(new G(0,0,0,0)),G.UNIT_X=I.freezeObject(new G(1,0,0,0)),G.UNIT_Y=I.freezeObject(new G(0,1,0,0)),G.UNIT_Z=I.freezeObject(new G(0,0,1,0)),G.UNIT_W=I.freezeObject(new G(0,0,0,1)),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,n){return G.equalsEpsilon(this,e,t,n)},G.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var C=new Float32Array(1),w=256;function Q(e,t,n,r,a,i,s,o,u,l,c,d,f,h,p,m){this[0]=I.defaultValue(e,0),this[1]=I.defaultValue(a,0),this[2]=I.defaultValue(u,0),this[3]=I.defaultValue(f,0),this[4]=I.defaultValue(t,0),this[5]=I.defaultValue(i,0),this[6]=I.defaultValue(l,0),this[7]=I.defaultValue(h,0),this[8]=I.defaultValue(n,0),this[9]=I.defaultValue(s,0),this[10]=I.defaultValue(c,0),this[11]=I.defaultValue(p,0),this[12]=I.defaultValue(r,0),this[13]=I.defaultValue(o,0),this[14]=I.defaultValue(d,0),this[15]=I.defaultValue(m,0)}G.packFloat=function(e,t){if(I.defined(t)||(t=new G),C[0]=e,0===(e=C[0]))return G.clone(G.ZERO,t);var n,r=e<0?1:0;isFinite(e)?(e=Math.abs(e),n=Math.floor(X.CesiumMath.logBase(e,10))+1,e/=Math.pow(10,n)):(e=.1,n=38);var a=e*w;return t.x=Math.floor(a),a=(a-t.x)*w,t.y=Math.floor(a),a=(a-t.y)*w,t.z=Math.floor(a),t.w=2*(n+38)+r,t},G.unpackFloat=function(e){var t=e.w/2,n=Math.floor(t),r=2*(t-n);if(r=-(r=2*r-1),38<=(n-=38))return r<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var a=r*e.x*.00390625;return a+=r*e.y*(1/65536),(a+=r*e.z*(1/16777216))*Math.pow(10,n)},Q.packedLength=16,Q.pack=function(e,t,n){return n=I.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t},Q.unpack=function(e,t,n){return t=I.defaultValue(t,0),I.defined(n)||(n=new Q),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n},Q.clone=function(e,t){if(I.defined(e))return I.defined(t)?(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[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new Q(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},Q.fromArray=Q.unpack,Q.fromColumnMajorArray=function(e,t){return Q.clone(e,t)},Q.fromRowMajorArray=function(e,t){return I.defined(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new Q(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},Q.fromRotationTranslation=function(e,t,n){return t=I.defaultValue(t,P.Cartesian3.ZERO),I.defined(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=0,n[4]=e[3],n[5]=e[4],n[6]=e[5],n[7]=0,n[8]=e[6],n[9]=e[7],n[10]=e[8],n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,n):new Q(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},Q.fromTranslationQuaternionRotationScale=function(e,t,n,r){I.defined(r)||(r=new Q);var a=n.x,i=n.y,s=n.z,o=t.x*t.x,u=t.x*t.y,l=t.x*t.z,c=t.x*t.w,d=t.y*t.y,f=t.y*t.z,h=t.y*t.w,p=t.z*t.z,m=t.z*t.w,y=t.w*t.w,v=o-d-p+y,C=2*(u-m),w=2*(l+h),g=2*(u+m),x=d-o-p+y,E=2*(f-c),O=2*(l-h),_=2*(f+c),S=-o-d+p+y;return r[0]=v*a,r[1]=g*a,r[2]=O*a,r[3]=0,r[4]=C*i,r[5]=x*i,r[6]=_*i,r[7]=0,r[8]=w*s,r[9]=E*s,r[10]=S*s,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,r},Q.fromTranslationRotationScale=function(e,t){return Q.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},Q.fromTranslation=function(e,t){return Q.fromRotationTranslation(J.IDENTITY,e,t)},Q.fromScale=function(e,t){return I.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new Q(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},Q.fromUniformScale=function(e,t){return I.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new Q(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var g=new P.Cartesian3,x=new P.Cartesian3,E=new P.Cartesian3;Q.fromCamera=function(e,t){var n=e.position,r=e.direction,a=e.up;P.Cartesian3.normalize(r,g),P.Cartesian3.normalize(P.Cartesian3.cross(g,a,x),x),P.Cartesian3.normalize(P.Cartesian3.cross(x,g,E),E);var i=x.x,s=x.y,o=x.z,u=g.x,l=g.y,c=g.z,d=E.x,f=E.y,h=E.z,p=n.x,m=n.y,y=n.z,v=i*-p+s*-m+o*-y,C=d*-p+f*-m+h*-y,w=u*p+l*m+c*y;return I.defined(t)?(t[0]=i,t[1]=d,t[2]=-u,t[3]=0,t[4]=s,t[5]=f,t[6]=-l,t[7]=0,t[8]=o,t[9]=h,t[10]=-c,t[11]=0,t[12]=v,t[13]=C,t[14]=w,t[15]=1,t):new Q(i,s,o,v,d,f,h,C,-u,-l,-c,w,0,0,0,1)},Q.computePerspectiveFieldOfView=function(e,t,n,r,a){var i=1/Math.tan(.5*e),s=i/t,o=(r+n)/(n-r),u=2*r*n/(n-r);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=i,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=o,a[11]=-1,a[12]=0,a[13]=0,a[14]=u,a[15]=0,a},Q.computeOrthographicOffCenter=function(e,t,n,r,a,i,s){var o=1/(t-e),u=1/(r-n),l=1/(i-a),c=-(t+e)*o,d=-(r+n)*u,f=-(i+a)*l;return o*=2,u*=2,l*=-2,s[0]=o,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=l,s[11]=0,s[12]=c,s[13]=d,s[14]=f,s[15]=1,s},Q.computePerspectiveOffCenter=function(e,t,n,r,a,i,s){var o=2*a/(t-e),u=2*a/(r-n),l=(t+e)/(t-e),c=(r+n)/(r-n),d=-(i+a)/(i-a),f=-2*i*a/(i-a);return s[0]=o,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=l,s[9]=c,s[10]=d,s[11]=-1,s[12]=0,s[13]=0,s[14]=f,s[15]=0,s},Q.computeInfinitePerspectiveOffCenter=function(e,t,n,r,a,i){var s=2*a/(t-e),o=2*a/(r-n),u=(t+e)/(t-e),l=(r+n)/(r-n),c=-2*a;return i[0]=s,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=u,i[9]=l,i[10]=-1,i[11]=-1,i[12]=0,i[13]=0,i[14]=c,i[15]=0,i},Q.computeViewportTransformation=function(e,t,n,r){e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT);var a=I.defaultValue(e.x,0),i=I.defaultValue(e.y,0),s=I.defaultValue(e.width,0),o=I.defaultValue(e.height,0);t=I.defaultValue(t,0);var u=.5*s,l=.5*o,c=.5*((n=I.defaultValue(n,1))-t),d=u,f=l,h=c,p=a+u,m=i+l,y=t+c;return r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=f,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=h,r[11]=0,r[12]=p,r[13]=m,r[14]=y,r[15]=1,r},Q.computeView=function(e,t,n,r,a){return a[0]=r.x,a[1]=n.x,a[2]=-t.x,a[3]=0,a[4]=r.y,a[5]=n.y,a[6]=-t.y,a[7]=0,a[8]=r.z,a[9]=n.z,a[10]=-t.z,a[11]=0,a[12]=-P.Cartesian3.dot(r,e),a[13]=-P.Cartesian3.dot(n,e),a[14]=P.Cartesian3.dot(t,e),a[15]=1,a},Q.toArray=function(e,t){return I.defined(t)?(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[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},Q.getElementIndex=function(e,t){return 4*e+t},Q.getColumn=function(e,t,n){var r=4*t,a=e[r],i=e[1+r],s=e[2+r],o=e[3+r];return n.x=a,n.y=i,n.z=s,n.w=o,n},Q.setColumn=function(e,t,n,r){var a=4*t;return(r=Q.clone(e,r))[a]=n.x,r[1+a]=n.y,r[2+a]=n.z,r[3+a]=n.w,r},Q.setTranslation=function(e,t,n){return 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[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};var O=new P.Cartesian3;Q.setScale=function(e,t,n){var r=Q.getScale(e,O),a=P.Cartesian3.divideComponents(t,r,O);return Q.multiplyByScale(e,a,n)},Q.getRow=function(e,t,n){var r=e[t],a=e[t+4],i=e[t+8],s=e[t+12];return n.x=r,n.y=a,n.z=i,n.w=s,n},Q.setRow=function(e,t,n,r){return(r=Q.clone(e,r))[t]=n.x,r[t+4]=n.y,r[t+8]=n.z,r[t+12]=n.w,r};var _=new P.Cartesian3;Q.getScale=function(e,t){return t.x=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[0],e[1],e[2],_)),t.y=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[4],e[5],e[6],_)),t.z=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[8],e[9],e[10],_)),t};var S=new P.Cartesian3;Q.getMaximumScale=function(e){return Q.getScale(e,S),P.Cartesian3.maximumComponent(S)},Q.multiply=function(e,t,n){var r=e[0],a=e[1],i=e[2],s=e[3],o=e[4],u=e[5],l=e[6],c=e[7],d=e[8],f=e[9],h=e[10],p=e[11],m=e[12],y=e[13],v=e[14],C=e[15],w=t[0],g=t[1],x=t[2],E=t[3],O=t[4],_=t[5],S=t[6],b=t[7],M=t[8],R=t[9],A=t[10],T=t[11],q=t[12],z=t[13],I=t[14],P=t[15],D=r*w+o*g+d*x+m*E,N=a*w+u*g+f*x+y*E,U=i*w+l*g+h*x+v*E,F=s*w+c*g+p*x+C*E,V=r*O+o*_+d*S+m*b,L=a*O+u*_+f*S+y*b,B=i*O+l*_+h*S+v*b,W=s*O+c*_+p*S+C*b,j=r*M+o*R+d*A+m*T,k=a*M+u*R+f*A+y*T,Y=i*M+l*R+h*A+v*T,Z=s*M+c*R+p*A+C*T,X=r*q+o*z+d*I+m*P,H=a*q+u*z+f*I+y*P,J=i*q+l*z+h*I+v*P,G=s*q+c*z+p*I+C*P;return n[0]=D,n[1]=N,n[2]=U,n[3]=F,n[4]=V,n[5]=L,n[6]=B,n[7]=W,n[8]=j,n[9]=k,n[10]=Y,n[11]=Z,n[12]=X,n[13]=H,n[14]=J,n[15]=G,n},Q.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[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n},Q.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[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n},Q.multiplyTransformation=function(e,t,n){var r=e[0],a=e[1],i=e[2],s=e[4],o=e[5],u=e[6],l=e[8],c=e[9],d=e[10],f=e[12],h=e[13],p=e[14],m=t[0],y=t[1],v=t[2],C=t[4],w=t[5],g=t[6],x=t[8],E=t[9],O=t[10],_=t[12],S=t[13],b=t[14],M=r*m+s*y+l*v,R=a*m+o*y+c*v,A=i*m+u*y+d*v,T=r*C+s*w+l*g,q=a*C+o*w+c*g,z=i*C+u*w+d*g,I=r*x+s*E+l*O,P=a*x+o*E+c*O,D=i*x+u*E+d*O,N=r*_+s*S+l*b+f,U=a*_+o*S+c*b+h,F=i*_+u*S+d*b+p;return n[0]=M,n[1]=R,n[2]=A,n[3]=0,n[4]=T,n[5]=q,n[6]=z,n[7]=0,n[8]=I,n[9]=P,n[10]=D,n[11]=0,n[12]=N,n[13]=U,n[14]=F,n[15]=1,n},Q.multiplyByMatrix3=function(e,t,n){var r=e[0],a=e[1],i=e[2],s=e[4],o=e[5],u=e[6],l=e[8],c=e[9],d=e[10],f=t[0],h=t[1],p=t[2],m=t[3],y=t[4],v=t[5],C=t[6],w=t[7],g=t[8],x=r*f+s*h+l*p,E=a*f+o*h+c*p,O=i*f+u*h+d*p,_=r*m+s*y+l*v,S=a*m+o*y+c*v,b=i*m+u*y+d*v,M=r*C+s*w+l*g,R=a*C+o*w+c*g,A=i*C+u*w+d*g;return n[0]=x,n[1]=E,n[2]=O,n[3]=0,n[4]=_,n[5]=S,n[6]=b,n[7]=0,n[8]=M,n[9]=R,n[10]=A,n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n},Q.multiplyByTranslation=function(e,t,n){var r=t.x,a=t.y,i=t.z,s=r*e[0]+a*e[4]+i*e[8]+e[12],o=r*e[1]+a*e[5]+i*e[9]+e[13],u=r*e[2]+a*e[6]+i*e[10]+e[14];return 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[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=s,n[13]=o,n[14]=u,n[15]=e[15],n};var b=new P.Cartesian3;Q.multiplyByUniformScale=function(e,t,n){return b.x=t,b.y=t,b.z=t,Q.multiplyByScale(e,b,n)},Q.multiplyByScale=function(e,t,n){var r=t.x,a=t.y,i=t.z;return 1===r&&1===a&&1===i?Q.clone(e,n):(n[0]=r*e[0],n[1]=r*e[1],n[2]=r*e[2],n[3]=0,n[4]=a*e[4],n[5]=a*e[5],n[6]=a*e[6],n[7]=0,n[8]=i*e[8],n[9]=i*e[9],n[10]=i*e[10],n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=1,n)},Q.multiplyByVector=function(e,t,n){var r=t.x,a=t.y,i=t.z,s=t.w,o=e[0]*r+e[4]*a+e[8]*i+e[12]*s,u=e[1]*r+e[5]*a+e[9]*i+e[13]*s,l=e[2]*r+e[6]*a+e[10]*i+e[14]*s,c=e[3]*r+e[7]*a+e[11]*i+e[15]*s;return n.x=o,n.y=u,n.z=l,n.w=c,n},Q.multiplyByPointAsVector=function(e,t,n){var r=t.x,a=t.y,i=t.z,s=e[0]*r+e[4]*a+e[8]*i,o=e[1]*r+e[5]*a+e[9]*i,u=e[2]*r+e[6]*a+e[10]*i;return n.x=s,n.y=o,n.z=u,n},Q.multiplyByPoint=function(e,t,n){var r=t.x,a=t.y,i=t.z,s=e[0]*r+e[4]*a+e[8]*i+e[12],o=e[1]*r+e[5]*a+e[9]*i+e[13],u=e[2]*r+e[6]*a+e[10]*i+e[14];return n.x=s,n.y=o,n.z=u,n},Q.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[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n},Q.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[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},Q.transpose=function(e,t){var n=e[1],r=e[2],a=e[3],i=e[6],s=e[7],o=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=i,t[10]=e[10],t[11]=e[14],t[12]=a,t[13]=s,t[14]=o,t[15]=e[15],t},Q.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[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},Q.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},Q.equalsEpsilon=function(e,t,n){return e===t||I.defined(e)&&I.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n&&Math.abs(e[9]-t[9])<=n&&Math.abs(e[10]-t[10])<=n&&Math.abs(e[11]-t[11])<=n&&Math.abs(e[12]-t[12])<=n&&Math.abs(e[13]-t[13])<=n&&Math.abs(e[14]-t[14])<=n&&Math.abs(e[15]-t[15])<=n},Q.getTranslation=function(e,t){return t.x=e[12],t.y=e[13],t.z=e[14],t},Q.getMatrix3=function(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var K=new J,$=new J,ee=new G,te=new G(0,0,0,1);function D(e,t){this.center=P.Cartesian3.clone(I.defaultValue(e,P.Cartesian3.ZERO)),this.radius=I.defaultValue(t,0)}Q.inverse=function(e,t){var n=e[0],r=e[4],a=e[8],i=e[12],s=e[1],o=e[5],u=e[9],l=e[13],c=e[2],d=e[6],f=e[10],h=e[14],p=e[3],m=e[7],y=e[11],v=e[15],C=f*v,w=h*y,g=d*v,x=h*m,E=d*y,O=f*m,_=c*v,S=h*p,b=c*y,M=f*p,R=c*m,A=d*p,T=C*o+x*u+E*l-(w*o+g*u+O*l),q=w*s+_*u+M*l-(C*s+S*u+b*l),z=g*s+S*o+R*l-(x*s+_*o+A*l),I=O*s+b*o+A*u-(E*s+M*o+R*u),P=w*r+g*a+O*i-(C*r+x*a+E*i),D=C*n+S*a+b*i-(w*n+_*a+M*i),N=x*n+_*r+A*i-(g*n+S*r+R*i),U=E*n+M*r+R*a-(O*n+b*r+A*a),F=(C=a*l)*m+(x=i*o)*y+(E=r*u)*v-((w=i*u)*m+(g=r*l)*y+(O=a*o)*v),V=w*p+(_=n*l)*y+(M=a*s)*v-(C*p+(S=i*s)*y+(b=n*u)*v),L=g*p+S*m+(R=n*o)*v-(x*p+_*m+(A=r*s)*v),B=O*p+b*m+A*y-(E*p+M*m+R*y),W=g*f+O*h+w*d-(E*h+C*d+x*f),j=b*h+C*c+S*f-(_*f+M*h+w*c),k=_*d+A*h+x*c-(R*h+g*c+S*d),Y=R*f+E*c+M*d-(b*d+A*f+O*c),Z=n*T+r*q+a*z+i*I;if(Math.abs(Z)<X.CesiumMath.EPSILON21){if(J.equalsEpsilon(Q.getMatrix3(e,K),$,X.CesiumMath.EPSILON7)&&G.equals(Q.getRow(e,3,ee),te))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new H.RuntimeError("matrix is not invertible because its determinate is zero.")}return Z=1/Z,t[0]=T*Z,t[1]=q*Z,t[2]=z*Z,t[3]=I*Z,t[4]=P*Z,t[5]=D*Z,t[6]=N*Z,t[7]=U*Z,t[8]=F*Z,t[9]=V*Z,t[10]=L*Z,t[11]=B*Z,t[12]=W*Z,t[13]=j*Z,t[14]=k*Z,t[15]=Y*Z,t},Q.inverseTransformation=function(e,t){var n=e[0],r=e[1],a=e[2],i=e[4],s=e[5],o=e[6],u=e[8],l=e[9],c=e[10],d=e[12],f=e[13],h=e[14],p=-n*d-r*f-a*h,m=-i*d-s*f-o*h,y=-u*d-l*f-c*h;return t[0]=n,t[1]=i,t[2]=u,t[3]=0,t[4]=r,t[5]=s,t[6]=l,t[7]=0,t[8]=a,t[9]=o,t[10]=c,t[11]=0,t[12]=p,t[13]=m,t[14]=y,t[15]=1,t},Q.IDENTITY=I.freezeObject(new Q(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),Q.ZERO=I.freezeObject(new Q(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),Q.COLUMN0ROW0=0,Q.COLUMN0ROW1=1,Q.COLUMN0ROW2=2,Q.COLUMN0ROW3=3,Q.COLUMN1ROW0=4,Q.COLUMN1ROW1=5,Q.COLUMN1ROW2=6,Q.COLUMN1ROW3=7,Q.COLUMN2ROW0=8,Q.COLUMN2ROW1=9,Q.COLUMN2ROW2=10,Q.COLUMN2ROW3=11,Q.COLUMN3ROW0=12,Q.COLUMN3ROW1=13,Q.COLUMN3ROW2=14,Q.COLUMN3ROW3=15,t.defineProperties(Q.prototype,{length:{get:function(){return Q.packedLength}}}),Q.prototype.clone=function(e){return Q.clone(this,e)},Q.prototype.equals=function(e){return Q.equals(this,e)},Q.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]&&e[9]===t[n+9]&&e[10]===t[n+10]&&e[11]===t[n+11]&&e[12]===t[n+12]&&e[13]===t[n+13]&&e[14]===t[n+14]&&e[15]===t[n+15]},Q.prototype.equalsEpsilon=function(e,t){return Q.equalsEpsilon(this,e,t)},Q.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"};var N=new P.Cartesian3,U=new P.Cartesian3,F=new P.Cartesian3,V=new P.Cartesian3,L=new P.Cartesian3,B=new P.Cartesian3,W=new P.Cartesian3,j=new P.Cartesian3,k=new P.Cartesian3,Y=new P.Cartesian3,Z=new P.Cartesian3,ne=new P.Cartesian3,M=4/3*X.CesiumMath.PI;D.fromPoints=function(e,t){if(I.defined(t)||(t=new D),!I.defined(e)||0===e.length)return t.center=P.Cartesian3.clone(P.Cartesian3.ZERO,t.center),t.radius=0,t;var n,r=P.Cartesian3.clone(e[0],W),a=P.Cartesian3.clone(r,N),i=P.Cartesian3.clone(r,U),s=P.Cartesian3.clone(r,F),o=P.Cartesian3.clone(r,V),u=P.Cartesian3.clone(r,L),l=P.Cartesian3.clone(r,B),c=e.length;for(n=1;n<c;n++){P.Cartesian3.clone(e[n],r);var d=r.x,f=r.y,h=r.z;d<a.x&&P.Cartesian3.clone(r,a),d>o.x&&P.Cartesian3.clone(r,o),f<i.y&&P.Cartesian3.clone(r,i),f>u.y&&P.Cartesian3.clone(r,u),h<s.z&&P.Cartesian3.clone(r,s),h>l.z&&P.Cartesian3.clone(r,l)}var p=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(o,a,j)),m=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(u,i,j)),y=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(l,s,j)),v=a,C=o,w=p;w<m&&(w=m,v=i,C=u),w<y&&(w=y,v=s,C=l);var g=k;g.x=.5*(v.x+C.x),g.y=.5*(v.y+C.y),g.z=.5*(v.z+C.z);var x=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(C,g,j)),E=Math.sqrt(x),O=Y;O.x=a.x,O.y=i.y,O.z=s.z;var _=Z;_.x=o.x,_.y=u.y,_.z=l.z;var S=P.Cartesian3.midpoint(O,_,ne),b=0;for(n=0;n<c;n++){P.Cartesian3.clone(e[n],r);var M=P.Cartesian3.magnitude(P.Cartesian3.subtract(r,S,j));b<M&&(b=M);var R=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(r,g,j));if(x<R){var A=Math.sqrt(R);x=(E=.5*(E+A))*E;var T=A-E;g.x=(E*g.x+T*r.x)/A,g.y=(E*g.y+T*r.y)/A,g.z=(E*g.z+T*r.z)/A}}return E<b?(P.Cartesian3.clone(g,t.center),t.radius=E):(P.Cartesian3.clone(S,t.center),t.radius=b),t};var R=new r,A=new P.Cartesian3,T=new P.Cartesian3,q=new P.Cartographic,z=new P.Cartographic;D.fromRectangle2D=function(e,t,n){return D.fromRectangleWithHeights2D(e,t,0,0,n)},D.fromRectangleWithHeights2D=function(e,t,n,r,a){if(I.defined(a)||(a=new D),!I.defined(e))return a.center=P.Cartesian3.clone(P.Cartesian3.ZERO,a.center),a.radius=0,a;t=I.defaultValue(t,R),P.Rectangle.southwest(e,q),q.height=n,P.Rectangle.northeast(e,z),z.height=r;var i=t.project(q,A),s=t.project(z,T),o=s.x-i.x,u=s.y-i.y,l=s.z-i.z;a.radius=.5*Math.sqrt(o*o+u*u+l*l);var c=a.center;return c.x=i.x+.5*o,c.y=i.y+.5*u,c.z=i.z+.5*l,a};var re=[];D.fromRectangle3D=function(e,t,n,r){if(t=I.defaultValue(t,P.Ellipsoid.WGS84),n=I.defaultValue(n,0),I.defined(r)||(r=new D),!I.defined(e))return r.center=P.Cartesian3.clone(P.Cartesian3.ZERO,r.center),r.radius=0,r;var a=P.Rectangle.subsample(e,t,n,re);return D.fromPoints(a,r)},D.fromVertices=function(e,t,n,r){if(I.defined(r)||(r=new D),!I.defined(e)||0===e.length)return r.center=P.Cartesian3.clone(P.Cartesian3.ZERO,r.center),r.radius=0,r;t=I.defaultValue(t,P.Cartesian3.ZERO),n=I.defaultValue(n,3);var a=W;a.x=e[0]+t.x,a.y=e[1]+t.y,a.z=e[2]+t.z;var i,s=P.Cartesian3.clone(a,N),o=P.Cartesian3.clone(a,U),u=P.Cartesian3.clone(a,F),l=P.Cartesian3.clone(a,V),c=P.Cartesian3.clone(a,L),d=P.Cartesian3.clone(a,B),f=e.length;for(i=0;i<f;i+=n){var h=e[i]+t.x,p=e[i+1]+t.y,m=e[i+2]+t.z;a.x=h,a.y=p,a.z=m,h<s.x&&P.Cartesian3.clone(a,s),h>l.x&&P.Cartesian3.clone(a,l),p<o.y&&P.Cartesian3.clone(a,o),p>c.y&&P.Cartesian3.clone(a,c),m<u.z&&P.Cartesian3.clone(a,u),m>d.z&&P.Cartesian3.clone(a,d)}var y=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(l,s,j)),v=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(c,o,j)),C=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(d,u,j)),w=s,g=l,x=y;x<v&&(x=v,w=o,g=c),x<C&&(x=C,w=u,g=d);var E=k;E.x=.5*(w.x+g.x),E.y=.5*(w.y+g.y),E.z=.5*(w.z+g.z);var O=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(g,E,j)),_=Math.sqrt(O),S=Y;S.x=s.x,S.y=o.y,S.z=u.z;var b=Z;b.x=l.x,b.y=c.y,b.z=d.z;var M=P.Cartesian3.midpoint(S,b,ne),R=0;for(i=0;i<f;i+=n){a.x=e[i]+t.x,a.y=e[i+1]+t.y,a.z=e[i+2]+t.z;var A=P.Cartesian3.magnitude(P.Cartesian3.subtract(a,M,j));R<A&&(R=A);var T=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(a,E,j));if(O<T){var q=Math.sqrt(T);O=(_=.5*(_+q))*_;var z=q-_;E.x=(_*E.x+z*a.x)/q,E.y=(_*E.y+z*a.y)/q,E.z=(_*E.z+z*a.z)/q}}return _<R?(P.Cartesian3.clone(E,r.center),r.radius=_):(P.Cartesian3.clone(M,r.center),r.radius=R),r},D.fromEncodedCartesianVertices=function(e,t,n){if(I.defined(n)||(n=new D),!I.defined(e)||!I.defined(t)||e.length!==t.length||0===e.length)return n.center=P.Cartesian3.clone(P.Cartesian3.ZERO,n.center),n.radius=0,n;var r=W;r.x=e[0]+t[0],r.y=e[1]+t[1],r.z=e[2]+t[2];var a,i=P.Cartesian3.clone(r,N),s=P.Cartesian3.clone(r,U),o=P.Cartesian3.clone(r,F),u=P.Cartesian3.clone(r,V),l=P.Cartesian3.clone(r,L),c=P.Cartesian3.clone(r,B),d=e.length;for(a=0;a<d;a+=3){var f=e[a]+t[a],h=e[a+1]+t[a+1],p=e[a+2]+t[a+2];r.x=f,r.y=h,r.z=p,f<i.x&&P.Cartesian3.clone(r,i),f>u.x&&P.Cartesian3.clone(r,u),h<s.y&&P.Cartesian3.clone(r,s),h>l.y&&P.Cartesian3.clone(r,l),p<o.z&&P.Cartesian3.clone(r,o),p>c.z&&P.Cartesian3.clone(r,c)}var m=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(u,i,j)),y=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(l,s,j)),v=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(c,o,j)),C=i,w=u,g=m;g<y&&(g=y,C=s,w=l),g<v&&(g=v,C=o,w=c);var x=k;x.x=.5*(C.x+w.x),x.y=.5*(C.y+w.y),x.z=.5*(C.z+w.z);var E=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(w,x,j)),O=Math.sqrt(E),_=Y;_.x=i.x,_.y=s.y,_.z=o.z;var S=Z;S.x=u.x,S.y=l.y,S.z=c.z;var b=P.Cartesian3.midpoint(_,S,ne),M=0;for(a=0;a<d;a+=3){r.x=e[a]+t[a],r.y=e[a+1]+t[a+1],r.z=e[a+2]+t[a+2];var R=P.Cartesian3.magnitude(P.Cartesian3.subtract(r,b,j));M<R&&(M=R);var A=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(r,x,j));if(E<A){var T=Math.sqrt(A);E=(O=.5*(O+T))*O;var q=T-O;x.x=(O*x.x+q*r.x)/T,x.y=(O*x.y+q*r.y)/T,x.z=(O*x.z+q*r.z)/T}}return O<M?(P.Cartesian3.clone(x,n.center),n.radius=O):(P.Cartesian3.clone(b,n.center),n.radius=M),n},D.fromCornerPoints=function(e,t,n){I.defined(n)||(n=new D);var r=P.Cartesian3.midpoint(e,t,n.center);return n.radius=P.Cartesian3.distance(r,t),n},D.fromEllipsoid=function(e,t){return I.defined(t)||(t=new D),P.Cartesian3.clone(P.Cartesian3.ZERO,t.center),t.radius=e.maximumRadius,t};var ae=new P.Cartesian3;D.fromBoundingSpheres=function(e,t){if(I.defined(t)||(t=new D),!I.defined(e)||0===e.length)return t.center=P.Cartesian3.clone(P.Cartesian3.ZERO,t.center),t.radius=0,t;var n=e.length;if(1===n)return D.clone(e[0],t);if(2===n)return D.union(e[0],e[1],t);var r,a=[];for(r=0;r<n;r++)a.push(e[r].center);var i=(t=D.fromPoints(a,t)).center,s=t.radius;for(r=0;r<n;r++){var o=e[r];s=Math.max(s,P.Cartesian3.distance(i,o.center,ae)+o.radius)}return t.radius=s,t};var ie=new P.Cartesian3,se=new P.Cartesian3,oe=new P.Cartesian3;D.fromOrientedBoundingBox=function(e,t){I.defined(t)||(t=new D);var n=e.halfAxes,r=J.getColumn(n,0,ie),a=J.getColumn(n,1,se),i=J.getColumn(n,2,oe);return P.Cartesian3.add(r,a,r),P.Cartesian3.add(r,i,r),t.center=P.Cartesian3.clone(e.center,t.center),t.radius=P.Cartesian3.magnitude(r),t},D.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.center=P.Cartesian3.clone(e.center,t.center),t.radius=e.radius,t):new D(e.center,e.radius)},D.packedLength=4,D.pack=function(e,t,n){n=I.defaultValue(n,0);var r=e.center;return t[n++]=r.x,t[n++]=r.y,t[n++]=r.z,t[n]=e.radius,t},D.unpack=function(e,t,n){t=I.defaultValue(t,0),I.defined(n)||(n=new D);var r=n.center;return r.x=e[t++],r.y=e[t++],r.z=e[t++],n.radius=e[t],n};var ue=new P.Cartesian3,le=new P.Cartesian3;D.union=function(e,t,n){I.defined(n)||(n=new D);var r=e.center,a=e.radius,i=t.center,s=t.radius,o=P.Cartesian3.subtract(i,r,ue),u=P.Cartesian3.magnitude(o);if(u+s<=a)return e.clone(n),n;if(u+a<=s)return t.clone(n),n;var l=.5*(a+u+s),c=P.Cartesian3.multiplyByScalar(o,(l-a)/u,le);return P.Cartesian3.add(c,r,c),P.Cartesian3.clone(c,n.center),n.radius=l,n};var ce=new P.Cartesian3;D.expand=function(e,t,n){n=D.clone(e,n);var r=P.Cartesian3.magnitude(P.Cartesian3.subtract(t,n.center,ce));return r>n.radius&&(n.radius=r),n},D.intersectPlane=function(e,t){var n=e.center,r=e.radius,a=t.normal,i=P.Cartesian3.dot(a,n)+t.distance;return i<-r?s.OUTSIDE:i<r?s.INTERSECTING:s.INSIDE},D.transform=function(e,t,n){return I.defined(n)||(n=new D),n.center=Q.multiplyByPoint(t,e.center,n.center),n.radius=Q.getMaximumScale(t)*e.radius,n};var de=new P.Cartesian3;D.distanceSquaredTo=function(e,t){var n=P.Cartesian3.subtract(e.center,t,de);return P.Cartesian3.magnitudeSquared(n)-e.radius*e.radius},D.transformWithoutScale=function(e,t,n){return I.defined(n)||(n=new D),n.center=Q.multiplyByPoint(t,e.center,n.center),n.radius=e.radius,n};var fe=new P.Cartesian3;D.computePlaneDistances=function(e,t,n,r){I.defined(r)||(r=new o);var a=P.Cartesian3.subtract(e.center,t,fe),i=P.Cartesian3.dot(n,a);return r.start=i-e.radius,r.stop=i+e.radius,r};for(var he=new P.Cartesian3,pe=new P.Cartesian3,me=new P.Cartesian3,ye=new P.Cartesian3,ve=new P.Cartesian3,Ce=new P.Cartographic,we=new Array(8),ge=0;ge<8;++ge)we[ge]=new P.Cartesian3;var xe,Ee=new r;D.projectTo2D=function(e,t,n){var r,a=(t=I.defaultValue(t,Ee)).ellipsoid,i=e.center,s=e.radius;r=P.Cartesian3.equals(i,P.Cartesian3.ZERO)?P.Cartesian3.clone(P.Cartesian3.UNIT_X,he):a.geodeticSurfaceNormal(i,he);var o=P.Cartesian3.cross(P.Cartesian3.UNIT_Z,r,pe);P.Cartesian3.normalize(o,o);var u=P.Cartesian3.cross(r,o,me);P.Cartesian3.normalize(u,u),P.Cartesian3.multiplyByScalar(r,s,r),P.Cartesian3.multiplyByScalar(u,s,u),P.Cartesian3.multiplyByScalar(o,s,o);var l=P.Cartesian3.negate(u,ve),c=P.Cartesian3.negate(o,ye),d=we,f=d[0];P.Cartesian3.add(r,u,f),P.Cartesian3.add(f,o,f),f=d[1],P.Cartesian3.add(r,u,f),P.Cartesian3.add(f,c,f),f=d[2],P.Cartesian3.add(r,l,f),P.Cartesian3.add(f,c,f),f=d[3],P.Cartesian3.add(r,l,f),P.Cartesian3.add(f,o,f),P.Cartesian3.negate(r,r),f=d[4],P.Cartesian3.add(r,u,f),P.Cartesian3.add(f,o,f),f=d[5],P.Cartesian3.add(r,u,f),P.Cartesian3.add(f,c,f),f=d[6],P.Cartesian3.add(r,l,f),P.Cartesian3.add(f,c,f),f=d[7],P.Cartesian3.add(r,l,f),P.Cartesian3.add(f,o,f);for(var h=d.length,p=0;p<h;++p){var m=d[p];P.Cartesian3.add(i,m,m);var y=a.cartesianToCartographic(m,Ce);t.project(y,m)}var v=(i=(n=D.fromPoints(d,n)).center).x,C=i.y,w=i.z;return i.x=w,i.y=v,i.z=C,n},D.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)},D.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&P.Cartesian3.equals(e.center,t.center)&&e.radius===t.radius},D.prototype.intersectPlane=function(e){return D.intersectPlane(this,e)},D.prototype.distanceSquaredTo=function(e){return D.distanceSquaredTo(this,e)},D.prototype.computePlaneDistances=function(e,t,n){return D.computePlaneDistances(this,e,t,n)},D.prototype.isOccluded=function(e){return D.isOccluded(this,e)},D.prototype.equals=function(e){return D.equals(this,e)},D.prototype.clone=function(e){return D.clone(this,e)},D.prototype.volume=function(){var e=this.radius;return M*e*e*e};var Oe,_e,Se,be,Me,Re,Ae,Te,qe,ze,Ie,Pe,De,Ne,Ue,Fe,Ve,Le={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Be={};function We(e){for(var t=e.split("."),n=0,r=t.length;n<r;++n)t[n]=parseInt(t[n],10);return t}function je(){if(!I.defined(_e)&&(_e=!1,!Xe())){var e=/ Chrome\/([\.0-9]+)/.exec(Oe.userAgent);null!==e&&(_e=!0,Se=We(e[1]))}return _e}function ke(){if(!I.defined(be)&&(be=!1,!je()&&!Xe()&&/ Safari\/[\.0-9]+/.test(Oe.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(Oe.userAgent);null!==e&&(be=!0,Me=We(e[1]))}return be}function Ye(){if(!I.defined(Re)){Re=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Oe.userAgent);null!==e&&(Re=!0,(Ae=We(e[1])).isNightly=!!e[2])}return Re}function Ze(){var e;I.defined(Te)||(Te=!1,"Microsoft Internet Explorer"===Oe.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Oe.userAgent))&&(Te=!0,qe=We(e[1])):"Netscape"===Oe.appName&&null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Oe.userAgent))&&(Te=!0,qe=We(e[1])));return Te}function Xe(){if(!I.defined(ze)){ze=!1;var e=/ Edge\/([\.0-9]+)/.exec(Oe.userAgent);null!==e&&(ze=!0,Ie=We(e[1]))}return ze}function He(){if(!I.defined(Pe)){Pe=!1;var e=/Firefox\/([\.0-9]+)/.exec(Oe.userAgent);null!==e&&(Pe=!0,De=We(e[1]))}return Pe}function Je(){if(!I.defined(Ve)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(Ve=I.defined(t)&&""!==t)&&(Fe=t)}return Ve}function Ge(){return Ge._result}t.defineProperties(Be,{element:{get:function(){if(Be.supportsFullscreen())return document[Le.fullscreenElement]}},changeEventName:{get:function(){if(Be.supportsFullscreen())return Le.fullscreenchange}},errorEventName:{get:function(){if(Be.supportsFullscreen())return Le.fullscreenerror}},enabled:{get:function(){if(Be.supportsFullscreen())return document[Le.fullscreenEnabled]}},fullscreen:{get:function(){if(Be.supportsFullscreen())return null!==Be.element}}}),Be.supportsFullscreen=function(){if(I.defined(xe))return xe;xe=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return Le.requestFullscreen="requestFullscreen",Le.exitFullscreen="exitFullscreen",Le.fullscreenEnabled="fullscreenEnabled",Le.fullscreenElement="fullscreenElement",Le.fullscreenchange="fullscreenchange",Le.fullscreenerror="fullscreenerror",xe=!0;for(var t,n=["webkit","moz","o","ms","khtml"],r=0,a=n.length;r<a;++r){var i=n[r];"function"==typeof e[t=i+"RequestFullscreen"]?(Le.requestFullscreen=t,xe=!0):"function"==typeof e[t=i+"RequestFullScreen"]&&(Le.requestFullscreen=t,xe=!0),t=i+"ExitFullscreen","function"==typeof document[t]?Le.exitFullscreen=t:(t=i+"CancelFullScreen","function"==typeof document[t]&&(Le.exitFullscreen=t)),t=i+"FullscreenEnabled",void 0!==document[t]?Le.fullscreenEnabled=t:(t=i+"FullScreenEnabled",void 0!==document[t]&&(Le.fullscreenEnabled=t)),t=i+"FullscreenElement",void 0!==document[t]?Le.fullscreenElement=t:(t=i+"FullScreenElement",void 0!==document[t]&&(Le.fullscreenElement=t)),t=i+"fullscreenchange",void 0!==document["on"+t]&&("ms"===i&&(t="MSFullscreenChange"),Le.fullscreenchange=t),t=i+"fullscreenerror",void 0!==document["on"+t]&&("ms"===i&&(t="MSFullscreenError"),Le.fullscreenerror=t)}return xe},Be.requestFullscreen=function(e,t){Be.supportsFullscreen()&&e[Le.requestFullscreen]({vrDisplay:t})},Be.exitFullscreen=function(){Be.supportsFullscreen()&&document[Le.exitFullscreen]()},Be._names=Le,Oe="undefined"!=typeof navigator?navigator:{},Ge._promise=void 0,Ge._result=void 0,Ge.initialize=function(){if(I.defined(Ge._promise))return Ge._promise;var e=I.when.defer();if(Ge._promise=e.promise,Xe())return Ge._result=!1,e.resolve(Ge._result),e.promise;var t=new Image;return t.onload=function(){Ge._result=0<t.width&&0<t.height,e.resolve(Ge._result)},t.onerror=function(){Ge._result=!1,e.resolve(Ge._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.promise},t.defineProperties(Ge,{initialized:{get:function(){return I.defined(Ge._result)}}});var Qe=[];"undefined"!=typeof ArrayBuffer&&(Qe.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&Qe.push(Uint8ClampedArray),"undefined"!=typeof CanvasPixelArray&&Qe.push(CanvasPixelArray));var Ke={isChrome:je,chromeVersion:function(){return je()&&Se},isSafari:ke,safariVersion:function(){return ke()&&Me},isWebkit:Ye,webkitVersion:function(){return Ye()&&Ae},isInternetExplorer:Ze,internetExplorerVersion:function(){return Ze()&&qe},isEdge:Xe,edgeVersion:function(){return Xe()&&Ie},isFirefox:He,firefoxVersion:function(){return He()&&De},isWindows:function(){return I.defined(Ne)||(Ne=/Windows/i.test(Oe.appVersion)),Ne},hardwareConcurrency:I.defaultValue(Oe.hardwareConcurrency,3),supportsPointerEvents:function(){return I.defined(Ue)||(Ue=!He()&&"undefined"!=typeof PointerEvent&&(!I.defined(Oe.pointerEnabled)||Oe.pointerEnabled)),Ue},supportsImageRenderingPixelated:Je,supportsWebP:Ge,imageRenderingValue:function(){return Je()?Fe:void 0},typedArrayTypes:Qe};function $e(e,t,n,r){this.x=I.defaultValue(e,0),this.y=I.defaultValue(t,0),this.z=I.defaultValue(n,0),this.w=I.defaultValue(r,0)}Ke.supportsFullscreen=function(){return Be.supportsFullscreen()},Ke.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},Ke.supportsWebWorkers=function(){return"undefined"!=typeof Worker},Ke.supportsWebAssembly=function(){return"undefined"!=typeof WebAssembly&&!Ke.isEdge()};var et=new P.Cartesian3;$e.fromAxisAngle=function(e,t,n){var r=t/2,a=Math.sin(r),i=(et=P.Cartesian3.normalize(e,et)).x*a,s=et.y*a,o=et.z*a,u=Math.cos(r);return I.defined(n)?(n.x=i,n.y=s,n.z=o,n.w=u,n):new $e(i,s,o,u)};var tt=[1,2,0],nt=new Array(3);$e.fromRotationMatrix=function(e,t){var n,r,a,i,s,o=e[J.COLUMN0ROW0],u=e[J.COLUMN1ROW1],l=e[J.COLUMN2ROW2],c=o+u+l;if(0<c)s=.5*(n=Math.sqrt(c+1)),n=.5/n,r=(e[J.COLUMN1ROW2]-e[J.COLUMN2ROW1])*n,a=(e[J.COLUMN2ROW0]-e[J.COLUMN0ROW2])*n,i=(e[J.COLUMN0ROW1]-e[J.COLUMN1ROW0])*n;else{var d=0;o<u&&(d=1),o<l&&u<l&&(d=2);var f=tt[d],h=tt[f];n=Math.sqrt(e[J.getElementIndex(d,d)]-e[J.getElementIndex(f,f)]-e[J.getElementIndex(h,h)]+1);var p=nt;p[d]=.5*n,n=.5/n,s=(e[J.getElementIndex(h,f)]-e[J.getElementIndex(f,h)])*n,p[f]=(e[J.getElementIndex(f,d)]+e[J.getElementIndex(d,f)])*n,p[h]=(e[J.getElementIndex(h,d)]+e[J.getElementIndex(d,h)])*n,r=-p[0],a=-p[1],i=-p[2]}return I.defined(t)?(t.x=r,t.y=a,t.z=i,t.w=s,t):new $e(r,a,i,s)};var rt=new $e,at=new $e,it=new $e,st=new $e;$e.fromHeadingPitchRoll=function(e,t){return st=$e.fromAxisAngle(P.Cartesian3.UNIT_X,e.roll,rt),it=$e.fromAxisAngle(P.Cartesian3.UNIT_Y,-e.pitch,t),t=$e.multiply(it,st,it),at=$e.fromAxisAngle(P.Cartesian3.UNIT_Z,-e.heading,rt),$e.multiply(at,t,t)};var ot=new P.Cartesian3,ut=new P.Cartesian3,lt=new $e,ct=new $e,dt=new $e;$e.packedLength=4,$e.pack=function(e,t,n){return n=I.defaultValue(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},$e.unpack=function(e,t,n){return t=I.defaultValue(t,0),I.defined(n)||(n=new $e),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},$e.packedInterpolationLength=3,$e.convertPackedArrayForInterpolation=function(e,t,n,r){$e.unpack(e,4*n,dt),$e.conjugate(dt,dt);for(var a=0,i=n-t+1;a<i;a++){var s=3*a;$e.unpack(e,4*(t+a),lt),$e.multiply(lt,dt,lt),lt.w<0&&$e.negate(lt,lt),$e.computeAxis(lt,ot);var o=$e.computeAngle(lt);r[s]=ot.x*o,r[1+s]=ot.y*o,r[2+s]=ot.z*o}},$e.unpackInterpolationResult=function(e,t,n,r,a){I.defined(a)||(a=new $e),P.Cartesian3.fromArray(e,0,ut);var i=P.Cartesian3.magnitude(ut);return $e.unpack(t,4*r,ct),0===i?$e.clone($e.IDENTITY,lt):$e.fromAxisAngle(ut,i,lt),$e.multiply(lt,ct,a)},$e.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new $e(e.x,e.y,e.z,e.w)},$e.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},$e.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},$e.magnitude=function(e){return Math.sqrt($e.magnitudeSquared(e))},$e.normalize=function(e,t){var n=1/$e.magnitude(e),r=e.x*n,a=e.y*n,i=e.z*n,s=e.w*n;return t.x=r,t.y=a,t.z=i,t.w=s,t},$e.inverse=function(e,t){var n=$e.magnitudeSquared(e);return t=$e.conjugate(e,t),$e.multiplyByScalar(t,1/n,t)},$e.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.w=e.w+t.w,n},$e.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.w=e.w-t.w,n},$e.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},$e.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},$e.multiply=function(e,t,n){var r=e.x,a=e.y,i=e.z,s=e.w,o=t.x,u=t.y,l=t.z,c=t.w,d=s*o+r*c+a*l-i*u,f=s*u-r*l+a*c+i*o,h=s*l+r*u-a*o+i*c,p=s*c-r*o-a*u-i*l;return n.x=d,n.y=f,n.z=h,n.w=p,n},$e.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},$e.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},$e.computeAxis=function(e,t){var n=e.w;if(Math.abs(n-1)<X.CesiumMath.EPSILON6)return t.x=t.y=t.z=0,t;var r=1/Math.sqrt(1-n*n);return t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t},$e.computeAngle=function(e){return Math.abs(e.w-1)<X.CesiumMath.EPSILON6?0:2*Math.acos(e.w)};var ft=new $e;$e.lerp=function(e,t,n,r){return ft=$e.multiplyByScalar(t,n,ft),r=$e.multiplyByScalar(e,1-n,r),$e.add(ft,r,r)};var ht=new $e,pt=new $e,mt=new $e;$e.slerp=function(e,t,n,r){var a=$e.dot(e,t),i=t;if(a<0&&(a=-a,i=ht=$e.negate(t,ht)),1-a<X.CesiumMath.EPSILON6)return $e.lerp(e,i,n,r);var s=Math.acos(a);return pt=$e.multiplyByScalar(e,Math.sin((1-n)*s),pt),mt=$e.multiplyByScalar(i,Math.sin(n*s),mt),r=$e.add(pt,mt,r),$e.multiplyByScalar(r,1/Math.sin(s),r)},$e.log=function(e,t){var n=X.CesiumMath.acosClamped(e.w),r=0;return 0!==n&&(r=n/Math.sin(n)),P.Cartesian3.multiplyByScalar(e,r,t)},$e.exp=function(e,t){var n=P.Cartesian3.magnitude(e),r=0;return 0!==n&&(r=Math.sin(n)/n),t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t.w=Math.cos(n),t};var yt=new P.Cartesian3,vt=new P.Cartesian3,Ct=new $e,wt=new $e;$e.computeInnerQuadrangle=function(e,t,n,r){var a=$e.conjugate(t,Ct);$e.multiply(a,n,wt);var i=$e.log(wt,yt);$e.multiply(a,e,wt);var s=$e.log(wt,vt);return P.Cartesian3.add(i,s,i),P.Cartesian3.multiplyByScalar(i,.25,i),P.Cartesian3.negate(i,i),$e.exp(i,Ct),$e.multiply(t,Ct,r)},$e.squad=function(e,t,n,r,a,i){var s=$e.slerp(e,t,a,Ct),o=$e.slerp(n,r,a,wt);return $e.slerp(s,o,2*a*(1-a),i)};for(var gt=new $e,xt=1.9011074535173003,Et=Ke.supportsTypedArrays()?new Float32Array(8):[],Ot=Ke.supportsTypedArrays()?new Float32Array(8):[],_t=Ke.supportsTypedArrays()?new Float32Array(8):[],St=Ke.supportsTypedArrays()?new Float32Array(8):[],bt=0;bt<7;++bt){var Mt=bt+1,Rt=2*Mt+1;Et[bt]=1/(Mt*Rt),Ot[bt]=Mt/Rt}function At(e,t,n){for(var r,a,i=0,s=e.length-1;i<=s;)if((a=n(e[r=~~((i+s)/2)],t))<0)i=1+r;else{if(!(0<a))return r;s=r-1}return~(s+1)}function Tt(e,t,n,r,a){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=r,this.ut1MinusUtc=a}function qt(){function w(e,t,n,r){n=n||" ";var a=e.length>=t?"":Array(1+t-e.length>>>0).join(n);return r?e+a:a+e}function g(e,t,n,r,a,i){var s=r-e.length;return 0<s&&(e=n||!a?w(e,r,i,n):e.slice(0,t.length)+w("",s,"0",!0)+e.slice(t.length)),e}function x(e,t,n,r,a,i,s){var o=e>>>0;return e=(n=n&&o&&{2:"0b",8:"0",16:"0x"}[t]||"")+w(o.toString(t),i||0,"0",!1),g(e,n,r,a,s)}function E(e,t,n,r,a,i){return null!=r&&(e=e.slice(0,r)),g(e,"",t,n,a,i)}var O=arguments,_=0,e=O[_++];return e.replace(/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,function(e,t,n,r,a,i,s){var o,u,l,c,d;if("%%"==e)return"%";for(var f=!1,h="",p=!1,m=!1,y=" ",v=n.length,C=0;n&&C<v;C++)switch(n.charAt(C)){case" ":h=" ";break;case"+":h="+";break;case"-":f=!0;break;case"'":y=n.charAt(C+1);break;case"0":p=!0;break;case"#":m=!0}if((r=r?"*"==r?+O[_++]:"*"==r.charAt(0)?+O[r.slice(1,-1)]:+r:0)<0&&(r=-r,f=!0),!isFinite(r))throw new Error("sprintf: (minimum-)width must be finite");switch(i=i?"*"==i?+O[_++]:"*"==i.charAt(0)?+O[i.slice(1,-1)]:+i:-1<"fFeE".indexOf(s)?6:"d"==s?0:void 0,d=t?O[t.slice(0,-1)]:O[_++],s){case"s":return E(String(d),f,r,i,p,y);case"c":return E(String.fromCharCode(+d),f,r,i,p);case"b":return x(d,2,m,f,r,i,p);case"o":return x(d,8,m,f,r,i,p);case"x":return x(d,16,m,f,r,i,p);case"X":return x(d,16,m,f,r,i,p).toUpperCase();case"u":return x(d,10,m,f,r,i,p);case"i":case"d":return o=+d||0,d=(u=(o=Math.round(o-o%1))<0?"-":h)+w(String(Math.abs(o)),i,"0",!1),g(d,u,f,r,p);case"e":case"E":case"f":case"F":case"g":case"G":return u=(o=+d)<0?"-":h,l=["toExponential","toFixed","toPrecision"]["efg".indexOf(s.toLowerCase())],c=["toString","toUpperCase"]["eEfFgG".indexOf(s)%2],d=u+Math.abs(o)[l](i),g(d,u,f,r,p)[c]();default:return e}})}function zt(e,t,n,r,a,i,s,o){this.year=e,this.month=t,this.day=n,this.hour=r,this.minute=a,this.second=i,this.millisecond=s,this.isLeapSecond=o}function It(e){return e%4==0&&e%100!=0||e%400==0}function Pt(e,t){this.julianDate=e,this.offset=t}Et[7]=xt/136,Ot[7]=8*xt/17,$e.fastSlerp=function(e,t,n,r){var a,i=$e.dot(e,t);0<=i?a=1:(a=-1,i=-i);for(var s=i-1,o=1-n,u=n*n,l=o*o,c=7;0<=c;--c)_t[c]=(Et[c]*u-Ot[c])*s,St[c]=(Et[c]*l-Ot[c])*s;var d=a*n*(1+_t[0]*(1+_t[1]*(1+_t[2]*(1+_t[3]*(1+_t[4]*(1+_t[5]*(1+_t[6]*(1+_t[7])))))))),f=o*(1+St[0]*(1+St[1]*(1+St[2]*(1+St[3]*(1+St[4]*(1+St[5]*(1+St[6]*(1+St[7])))))))),h=$e.multiplyByScalar(e,f,gt);return $e.multiplyByScalar(t,d,r),$e.add(h,r,r)},$e.fastSquad=function(e,t,n,r,a,i){var s=$e.fastSlerp(e,t,a,Ct),o=$e.fastSlerp(n,r,a,wt);return $e.fastSlerp(s,o,2*a*(1-a),i)},$e.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},$e.equalsEpsilon=function(e,t,n){return e===t||I.defined(e)&&I.defined(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},$e.ZERO=I.freezeObject(new $e(0,0,0,0)),$e.IDENTITY=I.freezeObject(new $e(0,0,0,1)),$e.prototype.clone=function(e){return $e.clone(this,e)},$e.prototype.equals=function(e){return $e.equals(this,e)},$e.prototype.equalsEpsilon=function(e,t){return $e.equalsEpsilon(this,e,t)},$e.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var Dt=I.freezeObject({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5}),Nt=I.freezeObject({UTC:0,TAI:1}),Ut=new zt,Ft=[31,28,31,30,31,30,31,31,30,31,30,31];function Vt(e,t){return en.compare(e.julianDate,t.julianDate)}var Lt=new Pt;function Bt(e){Lt.julianDate=e;var t=en.leapSeconds,n=At(t,Lt,Vt);n<0&&(n=~n),n>=t.length&&(n=t.length-1);var r=t[n].offset;0<n&&r<en.secondsDifference(t[n].julianDate,e)&&(r=t[--n].offset);en.addSeconds(e,r,e)}function Wt(e,t){Lt.julianDate=e;var n=en.leapSeconds,r=At(n,Lt,Vt);if(r<0&&(r=~r),0===r)return en.addSeconds(e,-n[0].offset,t);if(r>=n.length)return en.addSeconds(e,-n[r-1].offset,t);var a=en.secondsDifference(n[r].julianDate,e);return 0===a?en.addSeconds(e,-n[r].offset,t):a<=1?void 0:en.addSeconds(e,-n[--r].offset,t)}function jt(e,t,n){var r=t/Dt.SECONDS_PER_DAY|0;return e+=r,(t-=Dt.SECONDS_PER_DAY*r)<0&&(e--,t+=Dt.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function kt(e,t,n,r,a,i,s){var o=(t-14)/12|0,u=e+4800+o,l=(1461*u/4|0)+(367*(t-2-12*o)/12|0)-(3*((u+100)/100|0)/4|0)+n-32075;(r-=12)<0&&(r+=24);var c=i+(r*Dt.SECONDS_PER_HOUR+a*Dt.SECONDS_PER_MINUTE+s*Dt.SECONDS_PER_MILLISECOND);return 43200<=c&&(l-=1),[l,c]}var Yt=/^(\d{4})$/,Zt=/^(\d{4})-(\d{2})$/,Xt=/^(\d{4})-?(\d{3})$/,Ht=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,Jt=/^(\d{4})-?(\d{2})-?(\d{2})$/,Gt=/([Z+\-])?(\d{2})?:?(\d{2})?$/,Qt=/^(\d{2})(\.\d+)?/.source+Gt.source,Kt=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Gt.source,$t=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Gt.source;function en(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=I.defaultValue(e,0),t=I.defaultValue(t,0),n=I.defaultValue(n,Nt.UTC);var r=0|e;jt(r,t+=(e-r)*Dt.SECONDS_PER_DAY,this),n===Nt.UTC&&Bt(this)}en.fromGregorianDate=function(e,t){var n=kt(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return I.defined(t)?(jt(n[0],n[1],t),Bt(t),t):new en(n[0],n[1],Nt.UTC)},en.fromDate=function(e,t){var n=kt(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return I.defined(t)?(jt(n[0],n[1],t),Bt(t),t):new en(n[0],n[1],Nt.UTC)},en.fromIso8601=function(e,t){var n,r,a,i,s=(e=e.replace(",",".")).split("T"),o=1,u=1,l=0,c=0,d=0,f=0,h=s[0],p=s[1];if(null!==(s=h.match(Jt)))n=+s[1],o=+s[2],u=+s[3];else if(null!==(s=h.match(Zt)))n=+s[1],o=+s[2];else if(null!==(s=h.match(Yt)))n=+s[1];else{var m;if(null!==(s=h.match(Xt)))n=+s[1],m=+s[2],a=It(n);else if(null!==(s=h.match(Ht)))n=+s[1],m=7*+s[2]+(+s[3]||0)-new Date(Date.UTC(n,0,4)).getUTCDay()-3;(r=new Date(Date.UTC(n,0,1))).setUTCDate(m),o=r.getUTCMonth()+1,u=r.getUTCDate()}if(a=It(n),I.defined(p)){null!==(s=p.match($t))?(l=+s[1],c=+s[2],d=+s[3],f=1e3*+(s[4]||0),i=5):null!==(s=p.match(Kt))?(l=+s[1],c=+s[2],d=60*+(s[3]||0),i=4):null!==(s=p.match(Qt))&&(l=+s[1],c=60*+(s[2]||0),i=3);var y=s[i],v=+s[i+1],C=+(s[i+2]||0);switch(y){case"+":l-=v,c-=C;break;case"-":l+=v,c+=C;break;case"Z":break;default:c+=new Date(Date.UTC(n,o-1,u,l,c)).getTimezoneOffset()}}var w=60===d;for(w&&d--;60<=c;)c-=60,l++;for(;24<=l;)l-=24,u++;for(r=a&&2===o?29:Ft[o-1];r<u;)u-=r,12<++o&&(o-=12,n++),r=a&&2===o?29:Ft[o-1];for(;c<0;)c+=60,l--;for(;l<0;)l+=24,u--;for(;u<1;)--o<1&&(o+=12,n--),u+=r=a&&2===o?29:Ft[o-1];var g=kt(n,o,u,l,c,d,f);return I.defined(t)?(jt(g[0],g[1],t),Bt(t)):t=new en(g[0],g[1],Nt.UTC),w&&en.addSeconds(t,1,t),t},en.now=function(e){return en.fromDate(new Date,e)};var tn=new en(0,0,Nt.TAI);function nn(e){if(e instanceof nn)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=rn.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}en.toGregorianDate=function(e,t){var n=!1,r=Wt(e,tn);I.defined(r)||(en.addSeconds(e,-1,tn),r=Wt(tn,tn),n=!0);var a=r.dayNumber,i=r.secondsOfDay;43200<=i&&(a+=1);var s=a+68569|0,o=4*s/146097|0,u=4e3*((s=s-((146097*o+3)/4|0)|0)+1)/1461001|0,l=80*(s=s-(1461*u/4|0)+31|0)/2447|0,c=s-(2447*l/80|0)|0,d=2+l-12*(s=l/11|0)|0,f=100*(o-49)+u+s|0,h=i/Dt.SECONDS_PER_HOUR|0,p=i-h*Dt.SECONDS_PER_HOUR,m=p/Dt.SECONDS_PER_MINUTE|0,y=0|(p-=m*Dt.SECONDS_PER_MINUTE),v=(p-y)/Dt.SECONDS_PER_MILLISECOND;return 23<(h+=12)&&(h-=24),n&&(y+=1),I.defined(t)?(t.year=f,t.month=d,t.day=c,t.hour=h,t.minute=m,t.second=y,t.millisecond=v,t.isLeapSecond=n,t):new zt(f,d,c,h,m,y,v,n)},en.toDate=function(e){var t=en.toGregorianDate(e,Ut),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))},en.toIso8601=function(e,t){var n=en.toGregorianDate(e,Ut),r=n.year,a=n.month,i=n.day,s=n.hour,o=n.minute,u=n.second,l=n.millisecond;return 1e4===r&&1===a&&1===i&&0===s&&0===o&&0===u&&0===l&&(r=9999,a=12,i=31,s=24),I.defined(t)||0===l?I.defined(t)&&0!==t?qt("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",r,a,i,s,o,u,(.01*l).toFixed(t).replace(".","").slice(0,t)):qt("%04d-%02d-%02dT%02d:%02d:%02dZ",r,a,i,s,o,u):qt("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",r,a,i,s,o,u,(.01*l).toString().replace(".",""))},en.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new en(e.dayNumber,e.secondsOfDay,Nt.TAI)},en.compare=function(e,t){var n=e.dayNumber-t.dayNumber;return 0!=n?n:e.secondsOfDay-t.secondsOfDay},en.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},en.equalsEpsilon=function(e,t,n){return e===t||I.defined(e)&&I.defined(t)&&Math.abs(en.secondsDifference(e,t))<=n},en.totalDays=function(e){return e.dayNumber+e.secondsOfDay/Dt.SECONDS_PER_DAY},en.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*Dt.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},en.daysDifference=function(e,t){return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/Dt.SECONDS_PER_DAY},en.computeTaiMinusUtc=function(e){Lt.julianDate=e;var t=en.leapSeconds,n=At(t,Lt,Vt);return n<0&&(n=~n,--n<0&&(n=0)),t[n].offset},en.addSeconds=function(e,t,n){return jt(e.dayNumber,e.secondsOfDay+t,n)},en.addMinutes=function(e,t,n){var r=e.secondsOfDay+t*Dt.SECONDS_PER_MINUTE;return jt(e.dayNumber,r,n)},en.addHours=function(e,t,n){var r=e.secondsOfDay+t*Dt.SECONDS_PER_HOUR;return jt(e.dayNumber,r,n)},en.addDays=function(e,t,n){return jt(e.dayNumber+t,e.secondsOfDay,n)},en.lessThan=function(e,t){return en.compare(e,t)<0},en.lessThanOrEquals=function(e,t){return en.compare(e,t)<=0},en.greaterThan=function(e,t){return 0<en.compare(e,t)},en.greaterThanOrEquals=function(e,t){return 0<=en.compare(e,t)},en.prototype.clone=function(e){return en.clone(this,e)},en.prototype.equals=function(e){return en.equals(this,e)},en.prototype.equalsEpsilon=function(e,t){return en.equalsEpsilon(this,e,t)},en.prototype.toString=function(){return en.toIso8601(this)},en.leapSeconds=[new Pt(new en(2441317,43210,Nt.TAI),10),new Pt(new en(2441499,43211,Nt.TAI),11),new Pt(new en(2441683,43212,Nt.TAI),12),new Pt(new en(2442048,43213,Nt.TAI),13),new Pt(new en(2442413,43214,Nt.TAI),14),new Pt(new en(2442778,43215,Nt.TAI),15),new Pt(new en(2443144,43216,Nt.TAI),16),new Pt(new en(2443509,43217,Nt.TAI),17),new Pt(new en(2443874,43218,Nt.TAI),18),new Pt(new en(2444239,43219,Nt.TAI),19),new Pt(new en(2444786,43220,Nt.TAI),20),new Pt(new en(2445151,43221,Nt.TAI),21),new Pt(new en(2445516,43222,Nt.TAI),22),new Pt(new en(2446247,43223,Nt.TAI),23),new Pt(new en(2447161,43224,Nt.TAI),24),new Pt(new en(2447892,43225,Nt.TAI),25),new Pt(new en(2448257,43226,Nt.TAI),26),new Pt(new en(2448804,43227,Nt.TAI),27),new Pt(new en(2449169,43228,Nt.TAI),28),new Pt(new en(2449534,43229,Nt.TAI),29),new Pt(new en(2450083,43230,Nt.TAI),30),new Pt(new en(2450630,43231,Nt.TAI),31),new Pt(new en(2451179,43232,Nt.TAI),32),new Pt(new en(2453736,43233,Nt.TAI),33),new Pt(new en(2454832,43234,Nt.TAI),34),new Pt(new en(2456109,43235,Nt.TAI),35),new Pt(new en(2457204,43236,Nt.TAI),36),new Pt(new en(2457754,43237,Nt.TAI),37)],nn.prototype.scheme=null,nn.prototype.authority=null,nn.prototype.path="",nn.prototype.query=null,nn.prototype.fragment=null;var rn=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");nn.prototype.getScheme=function(){return this.scheme},nn.prototype.getAuthority=function(){return this.authority},nn.prototype.getPath=function(){return this.path},nn.prototype.getQuery=function(){return this.query},nn.prototype.getFragment=function(){return this.fragment},nn.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},nn.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},nn.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},nn.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(on,ln).replace(an,un)),this.path&&(this.path=this.path.replace(an,un)),this.query&&(this.query=this.query.replace(an,un)),this.fragment&&(this.fragment=this.fragment.replace(an,un))};var an=/%[0-9a-z]{2}/gi,sn=/[a-zA-Z0-9\-\._~]/,on=/(.*@)?([^@:]*)(:.*)?/;function un(e){var t=unescape(e);return sn.test(t)?t:e.toUpperCase()}function ln(e,t,n,r){return(t||"")+n.toLowerCase()+(r||"")}function cn(e,t){if(null===e||"object"!=typeof e)return e;t=I.defaultValue(t,!1);var n=new e.constructor;for(var r in e)if(e.hasOwnProperty(r)){var a=e[r];t&&(a=cn(a,t)),n[r]=a}return n}function dn(e,t,n){n=I.defaultValue(n,!1);var r,a,i,s={},o=I.defined(e),u=I.defined(t);if(o)for(r in e)e.hasOwnProperty(r)&&(a=e[r],u&&n&&"object"==typeof a&&t.hasOwnProperty(r)?(i=t[r],s[r]="object"==typeof i?dn(a,i,n):a):s[r]=a);if(u)for(r in t)t.hasOwnProperty(r)&&!s.hasOwnProperty(r)&&(i=t[r],s[r]=i);return s}function fn(e,t){var n;return"undefined"!=typeof document&&(n=document),fn._implementation(e,t,n)}nn.prototype.resolve=function(e){var t=new nn;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?t.path=this.path:e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments(),t.query=this.query))),t.fragment=this.fragment,t},nn.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),n=[],r=""==t[0];r&&t.shift();for(""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?n.pop():"."!=e&&n.push(e);"."!=e&&".."!=e||n.push(""),r&&n.unshift(""),this.path=n.join("/")},nn.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},fn._implementation=function(e,t,n){if(!I.defined(t)){if(void 0===n)return e;t=I.defaultValue(n.baseURI,n.location.href)}var r=new nn(t);return new nn(e).resolve(r).toString()};var hn,pn=/^blob:/i;function mn(e){return pn.test(e)}var yn=/^data:/i;function vn(e){return yn.test(e)}var Cn=Array.isArray;I.defined(Cn)||(Cn=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var wn=Cn;var gn=I.freezeObject({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),xn=I.freezeObject({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3});function En(e){e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT);var t=I.defaultValue(e.throttleByServer,!1),n=I.defaultValue(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=I.defaultValue(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=I.defaultValue(e.type,xn.OTHER),this.serverKey=void 0,this.state=gn.UNISSUED,this.deferred=void 0,this.cancelled=!1}function On(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,"string"==typeof this.responseHeaders&&(this.responseHeaders=function(e){var t={};if(!e)return t;for(var n=e.split("\r\n"),r=0;r<n.length;++r){var a=n[r],i=a.indexOf(": ");if(0<i){var s=a.substring(0,i),o=a.substring(i+2);t[s]=o}}return t}(this.responseHeaders))}function _n(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function Sn(e,t){return t-e}function bn(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function Mn(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}En.prototype.cancel=function(){this.cancelled=!0},En.prototype.clone=function(e){return I.defined(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new En(this)},On.prototype.toString=function(){var e="Request has failed.";return I.defined(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},t.defineProperties(_n.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),_n.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);var n=this;return function(){n.removeEventListener(e,t)}},_n.prototype.removeEventListener=function(e,t){for(var n=this._listeners,r=this._scopes,a=-1,i=0;i<n.length;i++)if(n[i]===e&&r[i]===t){a=i;break}return-1!==a&&(this._insideRaiseEvent?(this._toRemove.push(a),n[a]=void 0,r[a]=void 0):(n.splice(a,1),r.splice(a,1)),!0)},_n.prototype.raiseEvent=function(){var e;this._insideRaiseEvent=!0;var t=this._listeners,n=this._scopes,r=t.length;for(e=0;e<r;e++){var a=t[e];I.defined(a)&&t[e].apply(n[e],arguments)}var i=this._toRemove;if(0<(r=i.length)){for(i.sort(Sn),e=0;e<r;e++){var s=i[e];t.splice(s,1),n.splice(s,1)}i.length=0}this._insideRaiseEvent=!1},t.defineProperties(bn.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){this._maximumLength=e,this._length>e&&0<e&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),bn.prototype.reserve=function(e){e=I.defaultValue(e,this._length),this._array.length=e},bn.prototype.heapify=function(e){e=I.defaultValue(e,0);for(var t=this._length,n=this._comparator,r=this._array,a=-1,i=!0;i;){var s=2*(e+1),o=s-1;a=o<t&&n(r[o],r[e])<0?o:e,s<t&&n(r[s],r[a])<0&&(a=s),a!==e?(Mn(r,a,e),e=a):i=!1}},bn.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);0<=t;--t)this.heapify(t)},bn.prototype.insert=function(e){var t,n=this._array,r=this._comparator,a=this._maximumLength,i=this._length++;for(i<n.length?n[i]=e:n.push(e);0!==i;){var s=Math.floor((i-1)/2);if(!(r(n[i],n[s])<0))break;Mn(n,i,s),i=s}return I.defined(a)&&this._length>a&&(t=n[a],this._length=a),t},bn.prototype.pop=function(e){if(e=I.defaultValue(e,0),0!==this._length){var t=this._array,n=t[e];return Mn(t,e,--this._length),this.heapify(e),n}};var Rn={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},An=20,Tn=new bn({comparator:function(e,t){return e.priority-t.priority}});Tn.maximumLength=An,Tn.reserve(An);var qn=[],zn={},In="undefined"!=typeof document?new nn(document.location.href):new nn,Pn=new _n;function Dn(){}function Nn(e){I.defined(e.priorityFunction)&&(e.priority=e.priorityFunction())}function Un(e){var t=I.defaultValue(Dn.requestsByServer[e],Dn.maximumRequestsPerServer);return zn[e]<t}function Fn(e){return e.state===gn.UNISSUED&&(e.state=gn.ISSUED,e.deferred=I.when.defer()),e.deferred.promise}function Vn(e){var t=Fn(e);return e.state=gn.ACTIVE,qn.push(e),++Rn.numberOfActiveRequests,++Rn.numberOfActiveRequestsEver,++zn[e.serverKey],e.requestFunction().then(function(t){return function(e){t.state!==gn.CANCELLED&&(--Rn.numberOfActiveRequests,--zn[t.serverKey],Pn.raiseEvent(),t.state=gn.RECEIVED,t.deferred.resolve(e))}}(e)).otherwise(function(t){return function(e){t.state!==gn.CANCELLED&&(++Rn.numberOfFailedRequests,--Rn.numberOfActiveRequests,--zn[t.serverKey],Pn.raiseEvent(e),t.state=gn.FAILED,t.deferred.reject(e))}}(e)),t}function Ln(e){var t=e.state===gn.ACTIVE;e.state=gn.CANCELLED,++Rn.numberOfCancelledRequests,e.deferred.reject(),t&&(--Rn.numberOfActiveRequests,--zn[e.serverKey],++Rn.numberOfCancelledActiveRequests),I.defined(e.cancelFunction)&&e.cancelFunction()}Dn.maximumRequests=50,Dn.maximumRequestsPerServer=6,Dn.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},Dn.throttleRequests=!0,Dn.debugShowStatistics=!1,Dn.requestCompletedEvent=Pn,t.defineProperties(Dn,{statistics:{get:function(){return Rn}},priorityHeapLength:{get:function(){return An},set:function(e){if(e<An)for(;Tn.length>e;){Ln(Tn.pop())}An=e,Tn.maximumLength=e,Tn.reserve(e)}}}),Dn.update=function(){var e,t,n=0,r=qn.length;for(e=0;e<r;++e)(t=qn[e]).cancelled&&Ln(t),t.state===gn.ACTIVE?0<n&&(qn[e-n]=t):++n;qn.length-=n;var a=Tn.internalArray,i=Tn.length;for(e=0;e<i;++e)Nn(a[e]);Tn.resort();for(var s=Math.max(Dn.maximumRequests-qn.length,0),o=0;o<s&&0<Tn.length;)(t=Tn.pop()).cancelled?Ln(t):!t.throttleByServer||Un(t.serverKey)?(Vn(t),++o):Ln(t);!function(){if(!Dn.debugShowStatistics)return;0===Rn.numberOfActiveRequests&&0<Rn.lastNumberOfActiveRequests&&(0<Rn.numberOfAttemptedRequests&&(console.log("Number of attempted requests: "+Rn.numberOfAttemptedRequests),Rn.numberOfAttemptedRequests=0),0<Rn.numberOfCancelledRequests&&(console.log("Number of cancelled requests: "+Rn.numberOfCancelledRequests),Rn.numberOfCancelledRequests=0),0<Rn.numberOfCancelledActiveRequests&&(console.log("Number of cancelled active requests: "+Rn.numberOfCancelledActiveRequests),Rn.numberOfCancelledActiveRequests=0),0<Rn.numberOfFailedRequests&&(console.log("Number of failed requests: "+Rn.numberOfFailedRequests),Rn.numberOfFailedRequests=0));Rn.lastNumberOfActiveRequests=Rn.numberOfActiveRequests}()},Dn.getServerKey=function(e){var t=new nn(e).resolve(In);t.normalize();var n=t.authority;/:/.test(n)||(n=n+":"+("https"===t.scheme?"443":"80"));var r=zn[n];return I.defined(r)||(zn[n]=0),n},Dn.request=function(e){if(vn(e.url)||mn(e.url))return Pn.raiseEvent(),e.state=gn.RECEIVED,e.requestFunction();if(++Rn.numberOfAttemptedRequests,I.defined(e.serverKey)||(e.serverKey=Dn.getServerKey(e.url)),!Dn.throttleRequests||!e.throttleByServer||Un(e.serverKey)){if(!Dn.throttleRequests||!e.throttle)return Vn(e);if(!(qn.length>=Dn.maximumRequests)){Nn(e);var t=Tn.insert(e);if(I.defined(t)){if(t===e)return;Ln(t)}return Fn(e)}}},Dn.clearForSpecs=function(){for(;0<Tn.length;){Ln(Tn.pop())}for(var e=qn.length,t=0;t<e;++t)Ln(qn[t]);qn.length=0,zn={},Rn.numberOfAttemptedRequests=0,Rn.numberOfActiveRequests=0,Rn.numberOfCancelledRequests=0,Rn.numberOfCancelledActiveRequests=0,Rn.numberOfFailedRequests=0,Rn.numberOfActiveRequestsEver=0,Rn.lastNumberOfActiveRequests=0},Dn.numberOfActiveRequestsByServer=function(e){return zn[e]},Dn.requestHeap=Tn;var Bn={},Wn={};Bn.add=function(e,t){var n=e.toLowerCase()+":"+t;I.defined(Wn[n])||(Wn[n]=!0)},Bn.remove=function(e,t){var n=e.toLowerCase()+":"+t;I.defined(Wn[n])&&delete Wn[n]},Bn.contains=function(e){var t=function(e){var t=new nn(e);t.normalize();var n=t.getAuthority();if(I.defined(n)){if(-1!==n.indexOf("@"))n=n.split("@")[1];if(-1===n.indexOf(":")){var r=t.getScheme();if(I.defined(r)||(r=(r=window.location.protocol).substring(0,r.length-1)),"http"===r)n+=":80";else{if("https"!==r)return;n+=":443"}}return n}}(e);return!(!I.defined(t)||!I.defined(Wn[t]))},Bn.clear=function(){Wn={}};var jn,kn=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),(e.responseType="blob")===e.responseType}catch(e){return!1}}();function Yn(e,t,n,r){var a,i=e.query;if(!I.defined(i)||0===i.length)return{};if(-1===i.indexOf("=")){var s={};s[i]=void 0,a=s}else a=function(e){var t={};if(""===e)return t;for(var n=e.replace(/\+/g,"%20").split(/[&;]/),r=0,a=n.length;r<a;++r){var i=n[r].split("="),s=decodeURIComponent(i[0]),o=i[1];o=I.defined(o)?decodeURIComponent(o):"";var u=t[s];"string"==typeof u?t[s]=[u,o]:wn(u)?u.push(o):t[s]=o}return t}(i);t._queryParameters=n?Jn(a,t._queryParameters,r):a,e.query=void 0}function Zn(e,t){var n=t._queryParameters,r=Object.keys(n);1!==r.length||I.defined(n[r[0]])?e.query=function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],a=encodeURIComponent(n)+"=";if(wn(r))for(var i=0,s=r.length;i<s;++i)t+=a+encodeURIComponent(r[i])+"&";else t+=a+encodeURIComponent(r)+"&"}return t=t.slice(0,-1)}(n):e.query=r[0]}function Xn(e,t){return I.defined(e)?I.defined(e.clone)?e.clone():cn(e):t}function Hn(e){if(e.state===gn.ISSUED||e.state===gn.ACTIVE)throw new H.RuntimeError("The Resource is already being fetched.");e.state=gn.UNISSUED,e.deferred=void 0}function Jn(e,t,n){if(!n)return dn(e,t);var r=cn(e,!0);for(var a in t)if(t.hasOwnProperty(a)){var i=r[a],s=t[a];I.defined(i)?(Array.isArray(i)||(i=r[a]=[i]),r[a]=i.concat(s)):r[a]=Array.isArray(s)?s.slice():s}return r}function Gn(e){"string"==typeof(e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT))&&(e={url:e}),this._url=void 0,this._templateValues=Xn(e.templateValues,{}),this._queryParameters=Xn(e.queryParameters,{}),this.headers=Xn(e.headers,{}),this.request=I.defaultValue(e.request,new En),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=I.defaultValue(e.retryAttempts,0),this._retryCount=0;var t=new nn(e.url);Yn(t,this,!0,!0),t.fragment=void 0,this._url=t.toString()}function Qn(e){var n=e.resource,r=e.flipY,a=e.preferImageBitmap,i=n.request;i.url=n.url,i.requestFunction=function(){var e=!1;n.isDataUri||n.isBlobUri||(e=n.isCrossOriginUrl);var t=I.when.defer();return Gn._Implementations.createImage(i,e,t,r,a),t.promise};var t=Dn.request(i);if(I.defined(t))return t.otherwise(function(t){return i.state!==gn.FAILED?I.when.reject(t):n.retryOnError(t).then(function(e){return e?(i.state=gn.UNISSUED,i.deferred=void 0,Qn({resource:n,flipY:r,preferImageBitmap:a})):I.when.reject(t)})})}Gn.createIfNeeded=function(e){return e instanceof Gn?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new Gn({url:e})},Gn.supportsImageBitmapOptions=function(){if(I.defined(jn))return jn;if("function"!=typeof createImageBitmap)return jn=I.when.resolve(!1);return jn=Gn.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then(function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none"})}).then(function(e){return!0}).otherwise(function(){return!1})},t.defineProperties(Gn,{isBlobSupported:{get:function(){return kn}}}),t.defineProperties(Gn.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){var t=new nn(e);Yn(t,this,!1),t.fragment=void 0,this._url=t.toString()}},extension:{get:function(){return function(e){var t=new nn(e);t.normalize();var n=t.path,r=n.lastIndexOf("/");return-1!==r&&(n=n.substr(r+1)),n=-1===(r=n.lastIndexOf("."))?"":n.substr(r+1)}(this._url)}},isDataUri:{get:function(){return vn(this._url)}},isBlobUri:{get:function(){return mn(this._url)}},isCrossOriginUrl:{get:function(){return function(e){I.defined(hn)||(hn=document.createElement("a")),hn.href=window.location.href;var t=hn.host,n=hn.protocol;return hn.href=e,hn.href=hn.href,n!==hn.protocol||t!==hn.host}(this._url)}},hasHeaders:{get:function(){return 0<Object.keys(this.headers).length}}}),Gn.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var n=new nn(this._url);e&&Zn(n,this);var r=n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),a=this._templateValues;return r=r.replace(/{(.*?)}/g,function(e,t){var n=a[t];return I.defined(n)?encodeURIComponent(n):e}),t&&I.defined(this.proxy)&&(r=this.proxy.getURL(r)),r},Gn.prototype.setQueryParameters=function(e,t){this._queryParameters=t?Jn(this._queryParameters,e,!1):Jn(e,this._queryParameters,!1)},Gn.prototype.appendQueryParameters=function(e){this._queryParameters=Jn(e,this._queryParameters,!0)},Gn.prototype.setTemplateValues=function(e,t){this._templateValues=t?dn(this._templateValues,e):dn(e,this._templateValues)},Gn.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,I.defined(e.url)){var n=new nn(e.url);Yn(n,t,!0,I.defaultValue(e.preserveQueryParameters,!1)),n.fragment=void 0,t._url=n.resolve(new nn(fn(this._url))).toString()}return I.defined(e.queryParameters)&&(t._queryParameters=dn(e.queryParameters,t._queryParameters)),I.defined(e.templateValues)&&(t._templateValues=dn(e.templateValues,t.templateValues)),I.defined(e.headers)&&(t.headers=dn(e.headers,t.headers)),I.defined(e.proxy)&&(t.proxy=e.proxy),I.defined(e.request)&&(t.request=e.request),I.defined(e.retryCallback)&&(t.retryCallback=e.retryCallback),I.defined(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},Gn.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return I.when(!1);var n=this;return I.when(t(this,e)).then(function(e){return++n._retryCount,e})},Gn.prototype.clone=function(e){return I.defined(e)||(e=new Gn({url:this._url})),e._url=this._url,e._queryParameters=cn(this._queryParameters),e._templateValues=cn(this._templateValues),e.headers=cn(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},Gn.prototype.getBaseUri=function(e){return function(e,t){var n="",r=e.lastIndexOf("/");return-1!==r&&(n=e.substring(0,r+1)),t&&(e=new nn(e),I.defined(e.query)&&(n+="?"+e.query),I.defined(e.fragment)&&(n+="#"+e.fragment)),n}(this.getUrlComponent(e),e)},Gn.prototype.appendForwardSlash=function(){this._url=function(e){return 0!==e.length&&"/"===e[e.length-1]||(e+="/"),e}(this._url)},Gn.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Gn.fetchArrayBuffer=function(e){return new Gn(e).fetchArrayBuffer()},Gn.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Gn.fetchBlob=function(e){return new Gn(e).fetchBlob()},Gn.prototype.fetchImage=function(e){e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT);var t=I.defaultValue(e.preferImageBitmap,!1),n=I.defaultValue(e.preferBlob,!1),r=I.defaultValue(e.flipY,!1);if(Hn(this.request),!kn||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return Qn({resource:this,flipY:r,preferImageBitmap:t});var a,i,s,o=this.fetchBlob();return I.defined(o)?Gn.supportsImageBitmapOptions().then(function(e){return a=e&&t,o}).then(function(e){if(I.defined(e)){if(s=e,a)return Gn.createImageBitmapFromBlob(e,{flipY:r,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return Qn({resource:i=new Gn({url:t}),flipY:r,preferImageBitmap:!1})}}).then(function(e){if(I.defined(e))return e.blob=s,a||window.URL.revokeObjectURL(i.url),e}).otherwise(function(e){return I.defined(i)&&window.URL.revokeObjectURL(i.url),e.blob=s,I.when.reject(e)}):void 0},Gn.fetchImage=function(e){return new Gn(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Gn.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Gn.fetchText=function(e){return new Gn(e).fetchText()},Gn.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(I.defined(e))return e.then(function(e){if(I.defined(e))return JSON.parse(e)})},Gn.fetchJson=function(e){return new Gn(e).fetchJson()},Gn.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Gn.fetchXML=function(e){return new Gn(e).fetchXML()},Gn.prototype.fetchJsonp=function(e){var t;for(e=I.defaultValue(e,"callback"),Hn(this.request);t="loadJsonp"+Math.random().toString().substring(2,8),I.defined(window[t]););return function n(r,a,i){var e={};e[a]=i;r.setQueryParameters(e);var s=r.request;s.url=r.url;s.requestFunction=function(){var t=I.when.defer();return window[i]=function(e){t.resolve(e);try{delete window[i]}catch(e){window[i]=void 0}},Gn._Implementations.loadAndExecuteScript(r.url,i,t),t.promise};var t=Dn.request(s);if(!I.defined(t))return;return t.otherwise(function(t){return s.state!==gn.FAILED?I.when.reject(t):r.retryOnError(t).then(function(e){return e?(s.state=gn.UNISSUED,s.deferred=void 0,n(r,a,i)):I.when.reject(t)})})}(this,e,t)},Gn.fetchJsonp=function(e){return new Gn(e).fetchJsonp(e.callbackParameterName)},Gn.prototype._makeRequest=function(o){var u=this;Hn(u.request);var l=u.request;l.url=u.url,l.requestFunction=function(){var e=o.responseType,t=dn(o.headers,u.headers),n=o.overrideMimeType,r=o.method,a=o.data,i=I.when.defer(),s=Gn._Implementations.loadWithXhr(u.url,e,r,a,t,i,n);return I.defined(s)&&I.defined(s.abort)&&(l.cancelFunction=function(){s.abort()}),i.promise};var e=Dn.request(l);if(I.defined(e))return e.then(function(e){return e}).otherwise(function(t){return l.state!==gn.FAILED?I.when.reject(t):u.retryOnError(t).then(function(e){return e?(l.state=gn.UNISSUED,l.deferred=void 0,u.fetch(o)):I.when.reject(t)})})};var Kn=/^data:(.*?)(;base64)?,(.*)$/;function $n(e,t){var n=decodeURIComponent(t);return e?atob(n):n}function er(e,t){for(var n=$n(e,t),r=new ArrayBuffer(n.length),a=new Uint8Array(r),i=0;i<n.length;i++)a[i]=n.charCodeAt(i);return r}function tr(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}Gn.prototype.fetch=function(e){return(e=Xn(e,{})).method="GET",this._makeRequest(e)},Gn.fetch=function(e){return new Gn(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Gn.prototype.delete=function(e){return(e=Xn(e,{})).method="DELETE",this._makeRequest(e)},Gn.delete=function(e){return new Gn(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},Gn.prototype.head=function(e){return(e=Xn(e,{})).method="HEAD",this._makeRequest(e)},Gn.head=function(e){return new Gn(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Gn.prototype.options=function(e){return(e=Xn(e,{})).method="OPTIONS",this._makeRequest(e)},Gn.options=function(e){return new Gn(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Gn.prototype.post=function(e,t){return n.Check.defined("data",e),(t=Xn(t,{})).method="POST",t.data=e,this._makeRequest(t)},Gn.post=function(e){return new Gn(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Gn.prototype.put=function(e,t){return n.Check.defined("data",e),(t=Xn(t,{})).method="PUT",t.data=e,this._makeRequest(t)},Gn.put=function(e){return new Gn(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Gn.prototype.patch=function(e,t){return n.Check.defined("data",e),(t=Xn(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},Gn.patch=function(e){return new Gn(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},(Gn._Implementations={}).createImage=function(r,a,i,s,o){var u=r.url;Gn.supportsImageBitmapOptions().then(function(e){if(e&&o){var t=I.when.defer(),n=Gn._Implementations.loadWithXhr(u,"blob","GET",void 0,void 0,t,void 0,void 0,void 0);return I.defined(n)&&I.defined(n.abort)&&(r.cancelFunction=function(){n.abort()}),t.promise.then(function(e){if(I.defined(e))return Gn.createImageBitmapFromBlob(e,{flipY:s,premultiplyAlpha:!1});i.reject(new H.RuntimeError("Successfully retrieved "+u+" but it contained no content."))}).then(i.resolve)}!function(e,t,n){var r=new Image;r.onload=function(){n.resolve(r)},r.onerror=function(e){n.reject(e)},t&&(Bn.contains(e)?r.crossOrigin="use-credentials":r.crossOrigin=""),r.src=e}(u,a,i)}).otherwise(i.reject)},Gn.createImageBitmapFromBlob=function(e,t){return n.Check.defined("options",t),n.Check.typeOf.bool("options.flipY",t.flipY),n.Check.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var nr="undefined"==typeof XMLHttpRequest;function rr(e){if(e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=I.defaultValue(e.addNewLeapSeconds,!0),I.defined(e.data))ir(this,e.data);else if(I.defined(e.url)){var t=Gn.createIfNeeded(e.url),n=this;this._downloadPromise=I.when(t.fetchJson(),function(e){ir(n,e)},function(){n._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."})}else ir(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function ar(e,t){return en.compare(e.julianDate,t)}function ir(e,t){if(I.defined(t.columnNames))if(I.defined(t.samples)){var n=t.columnNames.indexOf("modifiedJulianDateUtc"),r=t.columnNames.indexOf("xPoleWanderRadians"),a=t.columnNames.indexOf("yPoleWanderRadians"),i=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),o=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||r<0||a<0||i<0||s<0||o<0||u<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var l,c=e._samples=t.samples,d=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=r,e._yPoleWanderRadiansColumn=a,e._ut1MinusUtcSecondsColumn=i,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=o,e._taiMinusUtcSecondsColumn=u,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var f=e._addNewLeapSeconds,h=0,p=c.length;h<p;h+=e._columnCount){var m=c[h+n],y=c[h+u],v=new en(m+Dt.MODIFIED_JULIAN_DATE_DIFFERENCE,y,Nt.TAI);if(d.push(v),f){if(y!==l&&I.defined(l)){var C=en.leapSeconds,w=At(C,v,ar);if(w<0){var g=new Pt(v,y);C.splice(~w,0,g)}}l=y}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function sr(e,t,n,r,a){var i=n*r;a.xPoleWander=t[i+e._xPoleWanderRadiansColumn],a.yPoleWander=t[i+e._yPoleWanderRadiansColumn],a.xPoleOffset=t[i+e._xCelestialPoleOffsetRadiansColumn],a.yPoleOffset=t[i+e._yCelestialPoleOffsetRadiansColumn],a.ut1MinusUtc=t[i+e._ut1MinusUtcSecondsColumn]}function or(e,t,n){return t+e*(n-t)}function ur(e,t,n,r,a,i,s){var o=e._columnCount;if(i>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;var u=t[a],l=t[i];if(u.equals(l)||r.equals(u))return sr(e,n,a,o,s),s;if(r.equals(l))return sr(e,n,i,o,s),s;var c=en.secondsDifference(r,u)/en.secondsDifference(l,u),d=a*o,f=i*o,h=n[d+e._ut1MinusUtcSecondsColumn],p=n[f+e._ut1MinusUtcSecondsColumn],m=p-h;if(.5<m||m<-.5){var y=n[d+e._taiMinusUtcSecondsColumn],v=n[f+e._taiMinusUtcSecondsColumn];y!==v&&(l.equals(r)?h=p:p-=v-y)}return s.xPoleWander=or(c,n[d+e._xPoleWanderRadiansColumn],n[f+e._xPoleWanderRadiansColumn]),s.yPoleWander=or(c,n[d+e._yPoleWanderRadiansColumn],n[f+e._yPoleWanderRadiansColumn]),s.xPoleOffset=or(c,n[d+e._xCelestialPoleOffsetRadiansColumn],n[f+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=or(c,n[d+e._yCelestialPoleOffsetRadiansColumn],n[f+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=or(c,h,p),s}function lr(e,t,n){this.heading=I.defaultValue(e,0),this.pitch=I.defaultValue(t,0),this.roll=I.defaultValue(n,0)}Gn._Implementations.loadWithXhr=function(e,a,i,t,n,s,r){var o=Kn.exec(e);if(null===o){if(!nr){var u=new XMLHttpRequest;if(Bn.contains(e)&&(u.withCredentials=!0),u.open(i,e,!0),I.defined(r)&&I.defined(u.overrideMimeType)&&u.overrideMimeType(r),I.defined(n))for(var l in n)n.hasOwnProperty(l)&&u.setRequestHeader(l,n[l]);I.defined(a)&&(u.responseType=a);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")||"undefined"!=typeof window&&"file://"===window.location.origin),u.onload=function(){if(!(u.status<200||300<=u.status)||c&&0===u.status){var e=u.response,t=u.responseType;if("HEAD"===i||"OPTIONS"===i){var n=u.getAllResponseHeaders().trim().split(/[\r\n]+/),r={};return n.forEach(function(e){var t=e.split(": "),n=t.shift();r[n]=t.join(": ")}),void s.resolve(r)}if(204===u.status)s.resolve();else if(!I.defined(e)||I.defined(a)&&t!==a)if("json"===a&&"string"==typeof e)try{s.resolve(JSON.parse(e))}catch(e){s.reject(e)}else(""===t||"document"===t)&&I.defined(u.responseXML)&&u.responseXML.hasChildNodes()?s.resolve(u.responseXML):""!==t&&"text"!==t||!I.defined(u.responseText)?s.reject(new H.RuntimeError("Invalid XMLHttpRequest response type.")):s.resolve(u.responseText);else s.resolve(e)}else s.reject(new On(u.status,u.response,u.getAllResponseHeaders()))},u.onerror=function(e){s.reject(new On)},u.send(t),u}!function(e,r,t,n,a,i){var s=global.require,o=s("url").parse(e),u="https:"===o.protocol?s("https"):s("http"),l=s("zlib"),c={protocol:o.protocol,hostname:o.hostname,port:o.port,path:o.path,query:o.query,method:t,headers:a};u.request(c).on("response",function(t){if(t.statusCode<200||300<=t.statusCode)i.reject(new On(t.statusCode,t,t.headers));else{var n=[];t.on("data",function(e){n.push(e)}),t.on("end",function(){var e=Buffer.concat(n);"gzip"===t.headers["content-encoding"]?l.gunzip(e,function(e,t){e?i.reject(new H.RuntimeError("Error decompressing response.")):i.resolve(tr(t,r))}):i.resolve(tr(e,r))})}}).on("error",function(e){i.reject(new On)}).end()}(e,a,i,0,n,s)}else s.resolve(function(e,t){t=I.defaultValue(t,"");var n=e[1],r=!!e[2],a=e[3];switch(t){case"":case"text":return $n(r,a);case"arraybuffer":return er(r,a);case"blob":var i=er(r,a);return new Blob([i],{type:n});case"document":return(new DOMParser).parseFromString($n(r,a),n);case"json":return JSON.parse($n(r,a))}}(o,a))},Gn._Implementations.loadAndExecuteScript=function(e,t,n){return function(e){var t=I.when.defer(),n=document.createElement("script");n.async=!0,n.src=e;var r=document.getElementsByTagName("head")[0];return n.onload=function(){n.onload=void 0,r.removeChild(n),t.resolve()},n.onerror=function(e){t.reject(e)},r.appendChild(n),t.promise}(e).otherwise(n.reject)},(Gn._DefaultImplementations={}).createImage=Gn._Implementations.createImage,Gn._DefaultImplementations.loadWithXhr=Gn._Implementations.loadWithXhr,Gn._DefaultImplementations.loadAndExecuteScript=Gn._Implementations.loadAndExecuteScript,Gn.DEFAULT=I.freezeObject(new Gn({url:"undefined"==typeof document?"":document.location.href.split("?")[0]})),rr.NONE=I.freezeObject({getPromiseToLoad:function(){return I.when()},compute:function(e,t){return I.defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new Tt(0,0,0,0,0),t}}),rr.prototype.getPromiseToLoad=function(){return I.when(this._downloadPromise)},rr.prototype.compute=function(e,t){if(I.defined(this._samples)){if(I.defined(t)||(t=new Tt(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var n=this._dates,r=this._lastIndex,a=0,i=0;if(I.defined(r)){var s=n[r],o=n[r+1],u=en.lessThanOrEquals(s,e),l=!I.defined(o),c=l||en.greaterThanOrEquals(o,e);if(u&&c)return a=r,!l&&o.equals(e)&&++a,i=a+1,ur(this,n,this._samples,e,a,i,t),t}var d=At(n,e,en.compare,this._dateColumn);return 0<=d?(d<n.length-1&&n[d+1].equals(e)&&++d,i=a=d):(a=(i=~d)-1)<0&&(a=0),this._lastIndex=a,ur(this,n,this._samples,e,a,i,t),t}if(I.defined(this._dataError))throw new H.RuntimeError(this._dataError)},lr.fromQuaternion=function(e,t){I.defined(t)||(t=new lr);var n=2*(e.w*e.y-e.z*e.x),r=1-2*(e.x*e.x+e.y*e.y),a=2*(e.w*e.x+e.y*e.z),i=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,i),t.roll=Math.atan2(a,r),t.pitch=-X.CesiumMath.asinClamped(n),t},lr.fromDegrees=function(e,t,n,r){return I.defined(r)||(r=new lr),r.heading=e*X.CesiumMath.RADIANS_PER_DEGREE,r.pitch=t*X.CesiumMath.RADIANS_PER_DEGREE,r.roll=n*X.CesiumMath.RADIANS_PER_DEGREE,r},lr.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new lr(e.heading,e.pitch,e.roll)},lr.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},lr.equalsEpsilon=function(e,t,n,r){return e===t||I.defined(e)&&I.defined(t)&&X.CesiumMath.equalsEpsilon(e.heading,t.heading,n,r)&&X.CesiumMath.equalsEpsilon(e.pitch,t.pitch,n,r)&&X.CesiumMath.equalsEpsilon(e.roll,t.roll,n,r)},lr.prototype.clone=function(e){return lr.clone(this,e)},lr.prototype.equals=function(e){return lr.equals(this,e)},lr.prototype.equalsEpsilon=function(e,t,n){return lr.equalsEpsilon(this,e,t,n)},lr.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var cr,dr,fr,hr=/((?:.*\/)|^)Cesium\.js$/;function pr(e){return"undefined"==typeof document?e:(I.defined(cr)||(cr=document.createElement("a")),cr.href=e,cr.href=cr.href,cr.href)}function mr(){return I.defined(dr)||(e="undefined"!=typeof CESIUM_BASE_URL?CESIUM_BASE_URL:"object"==typeof define&&I.defined(define.amd)&&!define.amd.toUrlUndefined&&I.defined(require.toUrl)?fn("..",Cr("Core/buildModuleUrl.js")):function(){for(var e=document.getElementsByTagName("script"),t=0,n=e.length;t<n;++t){var r=e[t].getAttribute("src"),a=hr.exec(r);if(null!==a)return a[1]}}(),(dr=new Gn({url:pr(e)})).appendForwardSlash()),dr;var e}function yr(e){return pr(require.toUrl("../"+e))}function vr(e){return mr().getDerivedResource({url:e}).url}function Cr(e){return I.defined(fr)||(fr="object"==typeof define&&I.defined(define.amd)&&!define.amd.toUrlUndefined&&I.defined(require.toUrl)?yr:vr),fr(e)}function wr(e,t,n){this.x=e,this.y=t,this.s=n}function gr(e){e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT),this._xysFileUrlTemplate=Gn.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=I.defaultValue(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=I.defaultValue(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new en(this._sampleZeroJulianEphemerisDate,0,Nt.TAI),this._stepSizeDays=I.defaultValue(e.stepSizeDays,1),this._samplesPerXysFile=I.defaultValue(e.samplesPerXysFile,1e3),this._totalSamples=I.defaultValue(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,n=this._denominators=new Array(t+1),r=this._xTable=new Array(t+1),a=Math.pow(this._stepSizeDays,t),i=0;i<=t;++i){n[i]=a,r[i]=i*this._stepSizeDays;for(var s=0;s<=t;++s)s!==i&&(n[i]*=i-s);n[i]=1/n[i]}this._work=new Array(t+1),this._coef=new Array(t+1)}Cr._cesiumScriptRegex=hr,Cr._buildModuleUrlFromBaseUrl=vr,Cr._clearBaseResource=function(){dr=void 0},Cr.setBaseUrl=function(e){dr=Gn.DEFAULT.getDerivedResource({url:e})},Cr.getCesiumBaseUrl=mr;var xr=new en(0,0,Nt.TAI);function Er(e,t,n){var r=xr;return r.dayNumber=t,r.secondsOfDay=n,en.daysDifference(r,e._sampleZeroDateTT)}function Or(s,o){if(s._chunkDownloadsInProgress[o])return s._chunkDownloadsInProgress[o];var e,u=I.when.defer();s._chunkDownloadsInProgress[o]=u;var t=s._xysFileUrlTemplate;return e=I.defined(t)?t.getDerivedResource({templateValues:{0:o}}):new Gn({url:Cr("Assets/IAU2006_XYS/IAU2006_XYS_"+o+".json")}),I.when(e.fetchJson(),function(e){s._chunkDownloadsInProgress[o]=!1;for(var t=s._samples,n=e.samples,r=o*s._samplesPerXysFile*3,a=0,i=n.length;a<i;++a)t[r+a]=n[a];u.resolve()}),u.promise}gr.prototype.preload=function(e,t,n,r){var a=Er(this,e,t),i=Er(this,n,r),s=a/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);var o=i/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;o>=this._totalSamples&&(o=this._totalSamples-1);for(var u=s/this._samplesPerXysFile|0,l=o/this._samplesPerXysFile|0,c=[],d=u;d<=l;++d)c.push(Or(this,d));return I.when.all(c)},gr.prototype.computeXysRadians=function(e,t,n){var r=Er(this,e,t);if(!(r<0)){var a=r/this._stepSizeDays|0;if(!(a>=this._totalSamples)){var i=this._interpolationOrder,s=a-(i/2|0);s<0&&(s=0);var o=s+i;o>=this._totalSamples&&(s=(o=this._totalSamples-1)-i)<0&&(s=0);var u=!1,l=this._samples;if(I.defined(l[3*s])||(Or(this,s/this._samplesPerXysFile|0),u=!0),I.defined(l[3*o])||(Or(this,o/this._samplesPerXysFile|0),u=!0),!u){I.defined(n)?(n.x=0,n.y=0,n.s=0):n=new wr(0,0,0);var c,d,f=r-s*this._stepSizeDays,h=this._work,p=this._denominators,m=this._coef,y=this._xTable;for(c=0;c<=i;++c)h[c]=f-y[c];for(c=0;c<=i;++c){for(m[c]=1,d=0;d<=i;++d)d!==c&&(m[c]*=h[d]);m[c]*=p[c];var v=3*(s+c);n.x+=m[c]*l[v++],n.y+=m[c]*l[v++],n.s+=m[c]*l[v]}return n}}}};var _r={},Sr={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},br={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Mr={},Rr={east:new P.Cartesian3,north:new P.Cartesian3,up:new P.Cartesian3,west:new P.Cartesian3,south:new P.Cartesian3,down:new P.Cartesian3},Ar=new P.Cartesian3,Tr=new P.Cartesian3,qr=new P.Cartesian3;_r.localFrameToFixedFrameGenerator=function(s,o){if(!Sr.hasOwnProperty(s)||!Sr[s].hasOwnProperty(o))throw new n.DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");var e,u=Sr[s][o],t=s+o;return I.defined(Mr[t])?e=Mr[t]:(e=function(e,t,n){if(I.defined(n)||(n=new Q),P.Cartesian3.equalsEpsilon(e,P.Cartesian3.ZERO,X.CesiumMath.EPSILON14))P.Cartesian3.unpack(br[s],0,Ar),P.Cartesian3.unpack(br[o],0,Tr),P.Cartesian3.unpack(br[u],0,qr);else if(X.CesiumMath.equalsEpsilon(e.x,0,X.CesiumMath.EPSILON14)&&X.CesiumMath.equalsEpsilon(e.y,0,X.CesiumMath.EPSILON14)){var r=X.CesiumMath.sign(e.z);P.Cartesian3.unpack(br[s],0,Ar),"east"!==s&&"west"!==s&&P.Cartesian3.multiplyByScalar(Ar,r,Ar),P.Cartesian3.unpack(br[o],0,Tr),"east"!==o&&"west"!==o&&P.Cartesian3.multiplyByScalar(Tr,r,Tr),P.Cartesian3.unpack(br[u],0,qr),"east"!==u&&"west"!==u&&P.Cartesian3.multiplyByScalar(qr,r,qr)}else{(t=I.defaultValue(t,P.Ellipsoid.WGS84)).geodeticSurfaceNormal(e,Rr.up);var a=Rr.up,i=Rr.east;i.x=-e.y,i.y=e.x,i.z=0,P.Cartesian3.normalize(i,Rr.east),P.Cartesian3.cross(a,i,Rr.north),P.Cartesian3.multiplyByScalar(Rr.up,-1,Rr.down),P.Cartesian3.multiplyByScalar(Rr.east,-1,Rr.west),P.Cartesian3.multiplyByScalar(Rr.north,-1,Rr.south),Ar=Rr[s],Tr=Rr[o],qr=Rr[u]}return n[0]=Ar.x,n[1]=Ar.y,n[2]=Ar.z,n[3]=0,n[4]=Tr.x,n[5]=Tr.y,n[6]=Tr.z,n[7]=0,n[8]=qr.x,n[9]=qr.y,n[10]=qr.z,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n},Mr[t]=e),e},_r.eastNorthUpToFixedFrame=_r.localFrameToFixedFrameGenerator("east","north"),_r.northEastDownToFixedFrame=_r.localFrameToFixedFrameGenerator("north","east"),_r.northUpEastToFixedFrame=_r.localFrameToFixedFrameGenerator("north","up"),_r.northWestUpToFixedFrame=_r.localFrameToFixedFrameGenerator("north","west");var zr=new $e,Ir=new P.Cartesian3(1,1,1),Pr=new Q;_r.headingPitchRollToFixedFrame=function(e,t,n,r,a){r=I.defaultValue(r,_r.eastNorthUpToFixedFrame);var i=$e.fromHeadingPitchRoll(t,zr),s=Q.fromTranslationQuaternionRotationScale(P.Cartesian3.ZERO,i,Ir,Pr);return a=r(e,n,a),Q.multiply(a,s,a)};var Dr=new Q,Nr=new J;_r.headingPitchRollQuaternion=function(e,t,n,r,a){var i=_r.headingPitchRollToFixedFrame(e,t,n,r,Dr),s=Q.getMatrix3(i,Nr);return $e.fromRotationMatrix(s,a)};var Ur=new P.Cartesian3(1,1,1),Fr=new P.Cartesian3,Vr=new Q,Lr=new Q,Br=new J,Wr=new $e;_r.fixedFrameToHeadingPitchRoll=function(e,t,n,r){t=I.defaultValue(t,P.Ellipsoid.WGS84),n=I.defaultValue(n,_r.eastNorthUpToFixedFrame),I.defined(r)||(r=new lr);var a=Q.getTranslation(e,Fr);if(P.Cartesian3.equals(a,P.Cartesian3.ZERO))return r.heading=0,r.pitch=0,r.roll=0,r;var i=Q.inverseTransformation(n(a,t,Vr),Vr),s=Q.setScale(e,Ur,Lr);s=Q.setTranslation(s,P.Cartesian3.ZERO,s),i=Q.multiply(i,s,i);var o=$e.fromRotationMatrix(Q.getMatrix3(i,Br),Wr);return o=$e.normalize(o,o),lr.fromQuaternion(o,r)};var jr=X.CesiumMath.TWO_PI/86400,kr=new en;_r.computeTemeToPseudoFixedMatrix=function(e,t){var n,r=(kr=en.addSeconds(e,-en.computeTaiMinusUtc(e),kr)).dayNumber,a=kr.secondsOfDay,i=r-2451545,s=(24110.54841+(n=43200<=a?(.5+i)/Dt.DAYS_PER_JULIAN_CENTURY:(i-.5)/Dt.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+n*(.093104+-62e-7*n)))*jr%X.CesiumMath.TWO_PI+(72921158553e-15+11772758384668e-32*(r-2451545.5))*((a+.5*Dt.SECONDS_PER_DAY)%Dt.SECONDS_PER_DAY),o=Math.cos(s),u=Math.sin(s);return I.defined(t)?(t[0]=o,t[1]=-u,t[2]=0,t[3]=u,t[4]=o,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new J(o,u,0,-u,o,0,0,0,1)},_r.iau2006XysData=new gr,_r.earthOrientationParameters=rr.NONE;var Yr=32.184;_r.preloadIcrfFixed=function(e){var t=e.start.dayNumber,n=e.start.secondsOfDay+Yr,r=e.stop.dayNumber,a=e.stop.secondsOfDay+Yr,i=_r.iau2006XysData.preload(t,n,r,a),s=_r.earthOrientationParameters.getPromiseToLoad();return I.when.all([i,s])},_r.computeIcrfToFixedMatrix=function(e,t){I.defined(t)||(t=new J);var n=_r.computeFixedToIcrfMatrix(e,t);if(I.defined(n))return J.transpose(n,t)};var Zr=new wr(0,0,0),Xr=new Tt(0,0,0,0,0,0),Hr=new J,Jr=new J;_r.computeFixedToIcrfMatrix=function(e,t){I.defined(t)||(t=new J);var n=_r.earthOrientationParameters.compute(e,Xr);if(I.defined(n)){var r=e.dayNumber,a=e.secondsOfDay+Yr,i=_r.iau2006XysData.computeXysRadians(r,a,Zr);if(I.defined(i)){var s=i.x+n.xPoleOffset,o=i.y+n.yPoleOffset,u=1/(1+Math.sqrt(1-s*s-o*o)),l=Hr;l[0]=1-u*s*s,l[3]=-u*s*o,l[6]=s,l[1]=-u*s*o,l[4]=1-u*o*o,l[7]=o,l[2]=-s,l[5]=-o,l[8]=1-u*(s*s+o*o);var c=J.fromRotationZ(-i.s,Jr),d=J.multiply(l,c,Hr),f=e.dayNumber-2451545,h=(e.secondsOfDay-en.computeTaiMinusUtc(e)+n.ut1MinusUtc)/Dt.SECONDS_PER_DAY,p=.779057273264+h+.00273781191135448*(f+h);p=p%1*X.CesiumMath.TWO_PI;var m=J.fromRotationZ(p,Jr),y=J.multiply(d,m,Hr),v=Math.cos(n.xPoleWander),C=Math.cos(n.yPoleWander),w=Math.sin(n.xPoleWander),g=Math.sin(n.yPoleWander),x=r-2451545+a/Dt.SECONDS_PER_DAY,E=-47e-6*(x/=36525)*X.CesiumMath.RADIANS_PER_DEGREE/3600,O=Math.cos(E),_=Math.sin(E),S=Jr;return S[0]=v*O,S[1]=v*_,S[2]=w,S[3]=-C*_+g*w*O,S[4]=C*O+g*w*_,S[5]=-g*v,S[6]=-g*_-C*w*O,S[7]=g*O-C*w*_,S[8]=C*v,J.multiply(y,S,t)}}};var Gr=new G;_r.pointToWindowCoordinates=function(e,t,n,r){return(r=_r.pointToGLWindowCoordinates(e,t,n,r)).y=2*t[5]-r.y,r},_r.pointToGLWindowCoordinates=function(e,t,n,r){I.defined(r)||(r=new P.Cartesian2);var a=Gr;return Q.multiplyByVector(e,G.fromElements(n.x,n.y,n.z,1,a),a),G.multiplyByScalar(a,1/a.w,a),Q.multiplyByVector(t,a,a),P.Cartesian2.fromCartesian4(a,r)};var Qr=new P.Cartesian3,Kr=new P.Cartesian3,$r=new P.Cartesian3;_r.rotationMatrixFromPositionVelocity=function(e,t,n,r){var a=I.defaultValue(n,P.Ellipsoid.WGS84).geodeticSurfaceNormal(e,Qr),i=P.Cartesian3.cross(t,a,Kr);P.Cartesian3.equalsEpsilon(i,P.Cartesian3.ZERO,X.CesiumMath.EPSILON6)&&(i=P.Cartesian3.clone(P.Cartesian3.UNIT_X,i));var s=P.Cartesian3.cross(i,t,$r);return P.Cartesian3.normalize(s,s),P.Cartesian3.cross(t,s,i),P.Cartesian3.negate(i,i),P.Cartesian3.normalize(i,i),I.defined(r)||(r=new J),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=i.x,r[4]=i.y,r[5]=i.z,r[6]=s.x,r[7]=s.y,r[8]=s.z,r};var ea=new Q(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),ta=new P.Cartographic,na=new P.Cartesian3,ra=new P.Cartesian3,aa=new J,ia=new Q,sa=new Q;_r.basisTo2D=function(e,t,n){var r=Q.getTranslation(t,ra),a=e.ellipsoid,i=a.cartesianToCartographic(r,ta),s=e.project(i,na);P.Cartesian3.fromElements(s.z,s.x,s.y,s);var o=_r.eastNorthUpToFixedFrame(r,a,ia),u=Q.inverseTransformation(o,sa),l=Q.getMatrix3(t,aa),c=Q.multiplyByMatrix3(u,l,n);return Q.multiply(ea,c,n),Q.setTranslation(n,s,n),n},_r.wgs84To2DModelMatrix=function(e,t,n){var r=e.ellipsoid,a=_r.eastNorthUpToFixedFrame(t,r,ia),i=Q.inverseTransformation(a,sa),s=r.cartesianToCartographic(t,ta),o=e.project(s,na);P.Cartesian3.fromElements(o.z,o.x,o.y,o);var u=Q.fromTranslation(o,ia);return Q.multiply(ea,i,n),Q.multiply(u,n,n),n},e.BoundingSphere=D,e.Cartesian4=G,e.FeatureDetection=Ke,e.GeographicProjection=r,e.Intersect=s,e.Interval=o,e.Matrix3=J,e.Matrix4=Q,e.Quaternion=$e,e.Resource=Gn,e.Transforms=_r,e.buildModuleUrl=Cr,e.isArray=wn});
  