define(["./Transforms-a6362ad2","./Matrix2-ae0e0b05","./RuntimeError-ffc802eb","./when-e3a49219","./ComponentDatatype-64cf6611","./ArcType-5c308c35","./arrayRemoveDuplicates-328bac4c","./EllipsoidGeodesic-524df442","./EllipsoidRhumbLine-b6518e5c","./EncodedCartesian3-f1386330","./GeometryAttribute-50aef525","./IntersectionTests-8be403d7","./Plane-2bf1bb80","./WebMercatorProjection-043b7eb3","./combine-c7a1ec8a","./PixelFormat-83d70a69","./WebGLConstants-1c8239cc"],(function(e,a,t,n,i,r,s,o,l,u,c,C,h,d,p,g,f){"use strict";function m(t){t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(t.ellipsoid,a.Ellipsoid.WGS84),this._rectangle=n.defaultValue(t.rectangle,a.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(t.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(t.numberOfLevelZeroTilesY,1),this._tileInfo=t.tileInfo}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),m.prototype.getNumberOfXTilesAtLevel=function(e){if(!n.defined(this._tileInfo))return this._numberOfLevelZeroTilesX<<e;var a=this._tileInfo.lods.filter((function(a){return a.level===e}))[0].resolution;return Math.round(360/(this._tileInfo.rows*a))},m.prototype.getNumberOfYTilesAtLevel=function(e){if(!n.defined(this._tileInfo))return this._numberOfLevelZeroTilesY<<e;var a=this._tileInfo.lods.filter((function(a){return a.level===e}))[0].resolution;return Math.round(180/(this._tileInfo.cols*a))},m.prototype.rectangleToNativeRectangle=function(e,t){var r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(t)?(t.west=r,t.south=s,t.east=o,t.north=l,t):new a.Rectangle(r,s,o,l)},m.prototype.tileXYToNativeRectangle=function(e,a,t,n){var r=this.tileXYToRectangle(e,a,t,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},m.prototype.tileXYToRectangle=function(e,t,i,r){var s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),u=s.width/o,c=e*u+s.west,C=(e+1)*u+s.west,h=s.height/l,d=s.north-t*h,p=s.north-(t+1)*h;return n.defined(r)||(r=new a.Rectangle(c,p,C,d)),r.west=c,r.south=p,r.east=C,r.north=d,r},m.prototype.positionToTileXY=function(e,t,r){var s=this._rectangle;if(a.Rectangle.contains(s,e)){var o=this.getNumberOfXTilesAtLevel(t),l=this.getNumberOfYTilesAtLevel(t),u=s.width/o,c=s.height/l,C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);var h=(C-s.west)/u|0;h>=o&&(h=o-1);var d=(s.north-e.latitude)/c|0;return d>=l&&(d=l-1),n.defined(r)?(r.x=h,r.y=d,r):new a.Cartesian2(h,d)}};var w=new a.Cartesian3,v=new a.Cartesian3,y=new a.Cartographic,M=new a.Cartesian3,T=new a.Cartesian3,E=new e.BoundingSphere,_=new m,O=[new a.Cartographic,new a.Cartographic,new a.Cartographic,new a.Cartographic],b=new a.Cartesian2,P={};function A(e){a.Cartographic.fromRadians(e.east,e.north,0,O[0]),a.Cartographic.fromRadians(e.west,e.north,0,O[1]),a.Cartographic.fromRadians(e.east,e.south,0,O[2]),a.Cartographic.fromRadians(e.west,e.south,0,O[3]);var t,n=0,i=0,r=0,s=0,o=P._terrainHeightsMaxLevel;for(t=0;t<=o;++t){for(var l=!1,u=0;u<4;++u){var c=O[u];if(_.positionToTileXY(c,t,b),0===u)r=b.x,s=b.y;else if(r!==b.x||s!==b.y){l=!0;break}}if(l)break;n=r,i=s}if(0!==t)return{x:n,y:i,level:t>o?o:t-1}}P.initialize=function(){var a=P._initPromise;return n.defined(a)||(a=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){P._terrainHeights=e})),P._initPromise=a),a},P.getMinimumMaximumHeights=function(e,t){t=n.defaultValue(t,a.Ellipsoid.WGS84);var i=A(e),r=P._defaultMinTerrainHeight,s=P._defaultMaxTerrainHeight;if(n.defined(i)){var o=i.level+"-"+i.x+"-"+i.y,l=P._terrainHeights[o];n.defined(l)&&(r=l[0],s=l[1]),t.cartographicToCartesian(a.Rectangle.northeast(e,y),w),t.cartographicToCartesian(a.Rectangle.southwest(e,y),v),a.Cartesian3.midpoint(v,w,M);var u=t.scaleToGeodeticSurface(M,T);if(n.defined(u)){var c=a.Cartesian3.distance(M,u);r=Math.min(r,-c)}else r=P._defaultMinTerrainHeight}return{minimumTerrainHeight:r=Math.max(P._defaultMinTerrainHeight,r),maximumTerrainHeight:s}},P.getBoundingSphere=function(t,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);var r=A(t),s=P._defaultMaxTerrainHeight;if(n.defined(r)){var o=r.level+"-"+r.x+"-"+r.y,l=P._terrainHeights[o];n.defined(l)&&(s=l[1])}var u=e.BoundingSphere.fromRectangle3D(t,i,0);return e.BoundingSphere.fromRectangle3D(t,i,s,E),e.BoundingSphere.union(u,E,u)},P._terrainHeightsMaxLevel=6,P._defaultMaxTerrainHeight=9e3,P._defaultMinTerrainHeight=-1e5,P._terrainHeights=void 0,P._initPromise=void 0,Object.defineProperties(P,{initialized:{get:function(){return n.defined(P._terrainHeights)}}});var k=[e.GeographicProjection,d.WebMercatorProjection],I=k.length,L=Math.cos(i.CesiumMath.toRadians(30)),S=Math.cos(i.CesiumMath.toRadians(150));function x(e){var t=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=t,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=a.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(x.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+a.Ellipsoid.packedLength+1+1}}}),x.setProjectionAndEllipsoid=function(e,a){for(var t=0,n=0;n<I;n++)if(a instanceof k[n]){t=n;break}e._projectionIndex=t,e._ellipsoid=a.ellipsoid};var N=new a.Cartesian3,R=new a.Cartesian3,D=new a.Cartesian3;function z(e,t,n,i,r){var s=F(i,e,0,N),o=F(i,e,n,R),l=F(i,t,0,D),u=q(o,s,R),c=q(l,s,D);return a.Cartesian3.cross(c,u,r),a.Cartesian3.normalize(r,r)}var H=new a.Cartographic,B=new a.Cartesian3,j=new a.Cartesian3,G=new a.Cartesian3;function V(e,t,n,i,s,u,c,C,h,d,p){if(0!==s){var g;u===r.ArcType.GEODESIC?g=new o.EllipsoidGeodesic(e,t,c):u===r.ArcType.RHUMB&&(g=new l.EllipsoidRhumbLine(e,t,c));var f=g.surfaceDistance;if(!(f<s))for(var m=z(e,t,i,c,G),w=Math.ceil(f/s),v=f/w,y=v,M=w-1,T=C.length,E=0;E<M;E++){var _=g.interpolateUsingSurfaceDistance(y,H),O=F(c,_,n,B),b=F(c,_,i,j);a.Cartesian3.pack(m,C,T),a.Cartesian3.pack(O,h,T),a.Cartesian3.pack(b,d,T),p.push(_.latitude),p.push(_.longitude),T+=3,y+=v}}}var Y=new a.Cartographic;function F(e,t,n,i){return a.Cartographic.clone(t,Y),Y.height=n,a.Cartographic.toCartesian(Y,e,i)}function q(e,t,n){return a.Cartesian3.subtract(e,t,n),a.Cartesian3.normalize(n,n),n}function X(e,t,n,i){return i=q(e,t,i),i=a.Cartesian3.cross(i,n,i),i=a.Cartesian3.normalize(i,i),i=a.Cartesian3.cross(n,i,i)}x.pack=function(e,t,i){var r=n.defaultValue(i,0),s=e._positions,o=s.length;t[r++]=o;for(var l=0;l<o;++l){var u=s[l];a.Cartesian3.pack(u,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,a.Ellipsoid.pack(e._ellipsoid,t,r),r+=a.Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},x.unpack=function(e,t,i){for(var r=n.defaultValue(t,0),s=e[r++],o=new Array(s),l=0;l<s;l++)o[l]=a.Cartesian3.unpack(e,r),r+=3;var u=e[r++],c=1===e[r++],C=e[r++],h=a.Ellipsoid.unpack(e,r);r+=a.Ellipsoid.packedLength;var d=e[r++],p=1===e[r++];return n.defined(i)||(i=new x({positions:o})),i._positions=o,i.granularity=u,i.loop=c,i.arcType=C,i._ellipsoid=h,i._projectionIndex=d,i._scene3DOnly=p,i};var W=new a.Cartesian3,U=new a.Cartesian3,Z=new a.Cartesian3,J=new a.Cartesian3;function Q(e,t,n,r,s){var o=q(n,t,J),l=X(e,t,o,W),u=X(r,t,o,U);if(i.CesiumMath.equalsEpsilon(a.Cartesian3.dot(l,u),-1,i.CesiumMath.EPSILON5))return s=a.Cartesian3.cross(o,l,s),s=a.Cartesian3.normalize(s,s);s=a.Cartesian3.add(u,l,s),s=a.Cartesian3.normalize(s,s);var c=a.Cartesian3.cross(o,s,Z);return a.Cartesian3.dot(u,c)<0&&(s=a.Cartesian3.negate(s,s)),s}var K=h.Plane.fromPointNormal(a.Cartesian3.ZERO,a.Cartesian3.UNIT_Y),$=new a.Cartesian3,ee=new a.Cartesian3,ae=new a.Cartesian3,te=new a.Cartesian3,ne=new a.Cartesian3,ie=new a.Cartesian3,re=new a.Cartographic,se=new a.Cartographic,oe=new a.Cartographic;x.createGeometry=function(t){var o,h,d,p,g,f,m=!t._scene3DOnly,w=t.loop,v=t._ellipsoid,y=t.granularity,M=t.arcType,T=new k[t._projectionIndex](v),E=1e3,_=t._positions,O=_.length;2===O&&(w=!1);var b,A,I,S=new l.EllipsoidRhumbLine(void 0,void 0,v),x=[_[0]];for(h=0;h<O-1;h++)d=_[h],p=_[h+1],b=C.IntersectionTests.lineSegmentPlane(d,p,K,ie),!n.defined(b)||a.Cartesian3.equalsEpsilon(b,d,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(b,p,i.CesiumMath.EPSILON7)||(t.arcType===r.ArcType.GEODESIC?x.push(a.Cartesian3.clone(b)):t.arcType===r.ArcType.RHUMB&&(I=v.cartesianToCartographic(b,re).longitude,g=v.cartesianToCartographic(d,re),f=v.cartesianToCartographic(p,se),S.setEndPoints(g,f),A=S.findIntersectionWithLongitude(I,oe),b=v.cartographicToCartesian(A,ie),!n.defined(b)||a.Cartesian3.equalsEpsilon(b,d,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(b,p,i.CesiumMath.EPSILON7)||x.push(a.Cartesian3.clone(b)))),x.push(p);w&&(d=_[O-1],p=_[0],b=C.IntersectionTests.lineSegmentPlane(d,p,K,ie),!n.defined(b)||a.Cartesian3.equalsEpsilon(b,d,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(b,p,i.CesiumMath.EPSILON7)||(t.arcType===r.ArcType.GEODESIC?x.push(a.Cartesian3.clone(b)):t.arcType===r.ArcType.RHUMB&&(I=v.cartesianToCartographic(b,re).longitude,g=v.cartesianToCartographic(d,re),f=v.cartesianToCartographic(p,se),S.setEndPoints(g,f),A=S.findIntersectionWithLongitude(I,oe),b=v.cartographicToCartesian(A,ie),!n.defined(b)||a.Cartesian3.equalsEpsilon(b,d,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(b,p,i.CesiumMath.EPSILON7)||x.push(a.Cartesian3.clone(b)))));var N=x.length,R=new Array(N);for(h=0;h<N;h++){var D=a.Cartographic.fromCartesian(x[h],v);D.height=0,R[h]=D}if(!((N=(R=s.arrayRemoveDuplicates(R,a.Cartographic.equalsEpsilon)).length)<2)){var H=[],B=[],j=[],G=[],Y=$,X=ee,W=ae,U=te,Z=ne,J=R[0],le=R[1];for(Y=F(v,R[N-1],0,Y),U=F(v,le,0,U),X=F(v,J,0,X),W=F(v,J,E,W),Z=w?Q(Y,X,W,U,Z):z(J,le,E,v,Z),a.Cartesian3.pack(Z,B,0),a.Cartesian3.pack(X,j,0),a.Cartesian3.pack(W,G,0),H.push(J.latitude),H.push(J.longitude),V(J,le,0,E,y,M,v,B,j,G,H),h=1;h<N-1;++h){Y=a.Cartesian3.clone(X,Y),X=a.Cartesian3.clone(U,X);var ue=R[h];F(v,ue,E,W),F(v,R[h+1],0,U),Q(Y,X,W,U,Z),o=B.length,a.Cartesian3.pack(Z,B,o),a.Cartesian3.pack(X,j,o),a.Cartesian3.pack(W,G,o),H.push(ue.latitude),H.push(ue.longitude),V(R[h],R[h+1],0,E,y,M,v,B,j,G,H)}var ce=R[N-1],he=R[N-2];if(X=F(v,ce,0,X),W=F(v,ce,E,W),w){var de=R[0];Z=Q(Y=F(v,he,0,Y),X,W,U=F(v,de,0,U),Z)}else Z=z(he,ce,E,v,Z);if(o=B.length,a.Cartesian3.pack(Z,B,o),a.Cartesian3.pack(X,j,o),a.Cartesian3.pack(W,G,o),H.push(ce.latitude),H.push(ce.longitude),w){for(V(ce,J,0,E,y,M,v,B,j,G,H),o=B.length,h=0;h<3;++h)B[o+h]=B[h],j[o+h]=j[h],G[o+h]=G[h];H.push(J.latitude),H.push(J.longitude)}return function(t,n,r,s,o,l,C){var h,d,p,g,f,m,w=n._ellipsoid,v=r.length/3-1,y=8*v,M=4*y,T=36*v,E=y>65535?new Uint32Array(T):new Uint16Array(T),_=new Float64Array(3*y),O=new Float32Array(M),b=new Float32Array(M),A=new Float32Array(M),k=new Float32Array(M),I=new Float32Array(M);C&&(p=new Float32Array(M),g=new Float32Array(M),f=new Float32Array(M),m=new Float32Array(2*y));var S=l.length/2,x=0,N=Te;N.height=0;var R=Ee;R.height=0;var D=_e,z=Oe;if(C)for(d=0,h=1;h<S;h++)N.latitude=l[d],N.longitude=l[d+1],R.latitude=l[d+2],R.longitude=l[d+3],D=n.project(N,D),z=n.project(R,z),x+=a.Cartesian3.distance(D,z),d+=2;var H=s.length/3;z=a.Cartesian3.unpack(s,0,z);var B,j=0;for(d=3,h=1;h<H;h++)D=a.Cartesian3.clone(z,D),z=a.Cartesian3.unpack(s,d,z),j+=a.Cartesian3.distance(D,z),d+=3;d=3;var G=0,V=0,Y=0,F=0,X=!1,W=a.Cartesian3.unpack(r,0,Pe),U=a.Cartesian3.unpack(s,0,Oe),Z=a.Cartesian3.unpack(o,0,ke);if(t){Ce(Z,a.Cartesian3.unpack(r,r.length-6,be),W,U)&&(Z=a.Cartesian3.negate(Z,Z))}var J=0,Q=0,K=0;for(h=0;h<v;h++){var $,ee,ae,te,ne=a.Cartesian3.clone(W,be),ie=a.Cartesian3.clone(U,_e),re=a.Cartesian3.clone(Z,Ae);if(X&&(re=a.Cartesian3.negate(re,re)),W=a.Cartesian3.unpack(r,d,Pe),U=a.Cartesian3.unpack(s,d,Oe),X=Ce(Z=a.Cartesian3.unpack(o,d,ke),ne,W,U),N.latitude=l[G],N.longitude=l[G+1],R.latitude=l[G+2],R.longitude=l[G+3],C){var se=Me(N,R);$=n.project(N,De);var oe=q(ee=n.project(R,ze),$,Ue);oe.y=Math.abs(oe.y),ae=He,te=Be,0===se||a.Cartesian3.dot(oe,a.Cartesian3.UNIT_Y)>L?(ae=ge(n,N,re,$,He),te=ge(n,R,Z,ee,Be)):1===se?(te=ge(n,R,Z,ee,Be),ae.x=0,ae.y=i.CesiumMath.sign(N.longitude-Math.abs(R.longitude)),ae.z=0):(ae=ge(n,N,re,$,He),te.x=0,te.y=i.CesiumMath.sign(N.longitude-R.longitude),te.z=0)}var le=a.Cartesian3.distance(ie,U),ue=u.EncodedCartesian3.fromCartesian(ne,Xe),ce=a.Cartesian3.subtract(W,ne,je),he=a.Cartesian3.normalize(ce,Ye),de=a.Cartesian3.subtract(ie,ne,Ge);de=a.Cartesian3.normalize(de,de);var pe=a.Cartesian3.cross(he,de,Ye);pe=a.Cartesian3.normalize(pe,pe);var fe=a.Cartesian3.cross(de,re,Fe);fe=a.Cartesian3.normalize(fe,fe);var me=a.Cartesian3.subtract(U,W,Ve);me=a.Cartesian3.normalize(me,me);var ve=a.Cartesian3.cross(Z,me,qe);ve=a.Cartesian3.normalize(ve,ve);var aa,ta,na,ia=le/j,ra=J/j,sa=0,oa=0,la=0;if(C){sa=a.Cartesian3.distance($,ee),aa=u.EncodedCartesian3.fromCartesian($,We),ta=a.Cartesian3.subtract(ee,$,Ue);var ua=(na=a.Cartesian3.normalize(ta,Ze)).x;na.x=na.y,na.y=-ua,oa=sa/x,la=Q/x}for(B=0;B<8;B++){var ca=F+4*B,Ca=V+2*B,ha=ca+3,da=B<4?1:-1,pa=2===B||3===B||6===B||7===B?1:-1;a.Cartesian3.pack(ue.high,O,ca),O[ha]=ce.x,a.Cartesian3.pack(ue.low,b,ca),b[ha]=ce.y,a.Cartesian3.pack(fe,A,ca),A[ha]=ce.z,a.Cartesian3.pack(ve,k,ca),k[ha]=ia*da,a.Cartesian3.pack(pe,I,ca);var ga=ra*pa;0===ga&&pa<0&&(ga=9),I[ha]=ga,C&&(p[ca]=aa.high.x,p[ca+1]=aa.high.y,p[ca+2]=aa.low.x,p[ca+3]=aa.low.y,f[ca]=-ae.y,f[ca+1]=ae.x,f[ca+2]=te.y,f[ca+3]=-te.x,g[ca]=ta.x,g[ca+1]=ta.y,g[ca+2]=na.x,g[ca+3]=na.y,m[Ca]=oa*da,0===(ga=la*pa)&&pa<0&&(ga=9),m[Ca+1]=ga)}var fa=Ne,ma=Re,wa=Se,va=xe,ya=a.Rectangle.fromCartographicArray(Ie,Le),Ma=P.getMinimumMaximumHeights(ya,w),Ta=Ma.minimumTerrainHeight,Ea=Ma.maximumTerrainHeight;K+=Ta,K+=Ea,we(ne,ie,Ta,Ea,fa,wa),we(W,U,Ta,Ea,ma,va);var _a=a.Cartesian3.multiplyByScalar(pe,i.CesiumMath.EPSILON5,Je);a.Cartesian3.add(fa,_a,fa),a.Cartesian3.add(ma,_a,ma),a.Cartesian3.add(wa,_a,wa),a.Cartesian3.add(va,_a,va),ye(fa,ma),ye(wa,va),a.Cartesian3.pack(fa,_,Y),a.Cartesian3.pack(ma,_,Y+3),a.Cartesian3.pack(va,_,Y+6),a.Cartesian3.pack(wa,_,Y+9),_a=a.Cartesian3.multiplyByScalar(pe,-2*i.CesiumMath.EPSILON5,Je),a.Cartesian3.add(fa,_a,fa),a.Cartesian3.add(ma,_a,ma),a.Cartesian3.add(wa,_a,wa),a.Cartesian3.add(va,_a,va),ye(fa,ma),ye(wa,va),a.Cartesian3.pack(fa,_,Y+12),a.Cartesian3.pack(ma,_,Y+15),a.Cartesian3.pack(va,_,Y+18),a.Cartesian3.pack(wa,_,Y+21),G+=2,d+=3,V+=16,Y+=24,F+=32,J+=le,Q+=sa}d=0;var Oa=0;for(h=0;h<v;h++){for(B=0;B<$e;B++)E[d+B]=Ke[B]+Oa;Oa+=8,d+=$e}var ba=Qe;e.BoundingSphere.fromVertices(r,a.Cartesian3.ZERO,3,ba[0]),e.BoundingSphere.fromVertices(s,a.Cartesian3.ZERO,3,ba[1]);var Pa=e.BoundingSphere.fromBoundingSpheres(ba);Pa.radius+=K/(2*v);var Aa={position:new c.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:_}),startHiAndForwardOffsetX:ea(O),startLoAndForwardOffsetY:ea(b),startNormalAndForwardOffsetZ:ea(A),endNormalAndTextureCoordinateNormalizationX:ea(k),rightNormalAndTextureCoordinateNormalizationY:ea(I)};C&&(Aa.startHiLo2D=ea(p),Aa.offsetAndRight2D=ea(g),Aa.startEndNormals2D=ea(f),Aa.texcoordNormalization2D=new c.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:m}));return new c.Geometry({attributes:Aa,indices:E,boundingSphere:Pa})}(w,T,j,G,B,H,m)}};var le=new a.Cartesian3,ue=new a.Matrix3,ce=new e.Quaternion;function Ce(t,n,r,s){var o=q(r,n,le),l=a.Cartesian3.dot(o,t);if(l>L||l<S){var u=q(s,r,J),c=l<S?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,C=e.Quaternion.fromAxisAngle(u,c,ce),h=a.Matrix3.fromQuaternion(C,ue);return a.Matrix3.multiplyByVector(h,t,t),!0}return!1}var he=new a.Cartographic,de=new a.Cartesian3,pe=new a.Cartesian3;function ge(e,t,n,r,s){var o=a.Cartographic.toCartesian(t,e._ellipsoid,de),l=a.Cartesian3.add(o,n,pe),u=!1,c=e._ellipsoid,C=c.cartesianToCartographic(l,he);Math.abs(t.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(u=!0,l=a.Cartesian3.subtract(o,n,pe),C=c.cartesianToCartographic(l,he)),C.height=0;var h=e.project(C,s);return(s=a.Cartesian3.subtract(h,r,s)).z=0,s=a.Cartesian3.normalize(s,s),u&&a.Cartesian3.negate(s,s),s}var fe=new a.Cartesian3,me=new a.Cartesian3;function we(e,t,n,i,r,s){var o=a.Cartesian3.subtract(t,e,fe);a.Cartesian3.normalize(o,o);var l=n-0,u=a.Cartesian3.multiplyByScalar(o,l,me);a.Cartesian3.add(e,u,r);var c=i-1e3;u=a.Cartesian3.multiplyByScalar(o,c,me),a.Cartesian3.add(t,u,s)}var ve=new a.Cartesian3;function ye(e,t){var n=h.Plane.getPointDistance(K,e),r=h.Plane.getPointDistance(K,t),s=ve;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=q(t,e,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=q(e,t,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(t,s,t))}function Me(e,a){var t=Math.abs(e.longitude),n=Math.abs(a.longitude);if(i.CesiumMath.equalsEpsilon(t,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){var r=i.CesiumMath.sign(a.longitude);return e.longitude=r*(t-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){var s=i.CesiumMath.sign(e.longitude);return a.longitude=s*(n-i.CesiumMath.EPSILON11),2}return 0}var Te=new a.Cartographic,Ee=new a.Cartographic,_e=new a.Cartesian3,Oe=new a.Cartesian3,be=new a.Cartesian3,Pe=new a.Cartesian3,Ae=new a.Cartesian3,ke=new a.Cartesian3,Ie=[Te,Ee],Le=new a.Rectangle,Se=new a.Cartesian3,xe=new a.Cartesian3,Ne=new a.Cartesian3,Re=new a.Cartesian3,De=new a.Cartesian3,ze=new a.Cartesian3,He=new a.Cartesian3,Be=new a.Cartesian3,je=new a.Cartesian3,Ge=new a.Cartesian3,Ve=new a.Cartesian3,Ye=new a.Cartesian3,Fe=new a.Cartesian3,qe=new a.Cartesian3,Xe=new u.EncodedCartesian3,We=new u.EncodedCartesian3,Ue=new a.Cartesian3,Ze=new a.Cartesian3,Je=new a.Cartesian3,Qe=[new e.BoundingSphere,new e.BoundingSphere],Ke=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],$e=Ke.length;function ea(e){return new c.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return x._projectNormal=ge,function(e,a){return P.initialize().then((function(){return n.defined(a)&&(e=x.unpack(e,a)),x.createGeometry(e)}))}}));
|