define(["./Transforms-b2d190a4","./Matrix2-671a840a","./RuntimeError-ac440aa5","./defaultValue-69ee94f4","./ComponentDatatype-a9820060","./ArcType-e1641d8d","./arrayRemoveDuplicates-fe254feb","./EllipsoidGeodesic-b822d46f","./EllipsoidRhumbLine-7fe7b64a","./EncodedCartesian3-ed89131b","./GeometryAttribute-77f8362f","./IntersectionTests-3c5a408d","./Plane-2cd3a9dd","./WebMercatorProjection-1099168a","./_commonjsHelpers-3aae1032-15991586","./combine-0259f56f","./PixelFormat-9ceadbf3","./WebGLConstants-f63312fc"],(function(e,t,a,n,i,r,s,o,l,c,u,C,d,h,p,f,g,m){"use strict";function w(a){a=n.defaultValue(a,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84),this._rectangle=n.defaultValue(a.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(a.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(a.numberOfLevelZeroTilesY,1),this._tileInfo=a.tileInfo}Object.defineProperties(w.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),w.prototype.getNumberOfXTilesAtLevel=function(e){if(!n.defined(this._tileInfo))return this._numberOfLevelZeroTilesX<<e;let t=this._tileInfo.lods.filter((function(t){return t.level===e}))[0].resolution;return Math.round(360/(this._tileInfo.rows*t))},w.prototype.getNumberOfYTilesAtLevel=function(e){if(!n.defined(this._tileInfo))return this._numberOfLevelZeroTilesY<<e;let t=this._tileInfo.lods.filter((function(t){return t.level===e}))[0].resolution;return Math.round(180/(this._tileInfo.cols*t))},w.prototype.rectangleToNativeRectangle=function(e,a){const 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(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},w.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,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},w.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,d=s.height/l,h=s.north-a*d,p=s.north-(a+1)*d;return n.defined(r)||(r=new t.Rectangle(u,p,C,h)),r.west=u,r.south=p,r.east=C,r.north=h,r},w.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let d=(C-s.west)/c|0;d>=o&&(d=o-1);let h=(s.north-e.latitude)/u|0;return h>=l&&(h=l-1),n.defined(r)?(r.x=d,r.y=h,r):new t.Cartesian2(d,h)};const y=new t.Cartesian3,M=new t.Cartesian3,T=new t.Cartographic,E=new t.Cartesian3,_=new t.Cartesian3,O=new e.BoundingSphere,b=new w,P=[new t.Cartographic,new t.Cartographic,new t.Cartographic,new t.Cartographic],A=new t.Cartesian2,k={};function I(e){t.Cartographic.fromRadians(e.east,e.north,0,P[0]),t.Cartographic.fromRadians(e.west,e.north,0,P[1]),t.Cartographic.fromRadians(e.east,e.south,0,P[2]),t.Cartographic.fromRadians(e.west,e.south,0,P[3]);let a=0,n=0,i=0,r=0;const s=k._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=P[t];if(b.positionToTileXY(a,o,A),0===t)i=A.x,r=A.y;else if(i!==A.x||r!==A.y){e=!0;break}}if(e)break;a=i,n=r}if(0!==o)return{x:a,y:n,level:o>s?s:o-1}}k.initialize=function(){let t=k._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){k._terrainHeights=e})),k._initPromise=t),t},k.getMinimumMaximumHeights=function(e,a){a=n.defaultValue(a,t.Ellipsoid.WGS84);const i=I(e);let r=k._defaultMinTerrainHeight,s=k._defaultMaxTerrainHeight;if(n.defined(i)){const o=`${i.level}-${i.x}-${i.y}`,l=k._terrainHeights[o];n.defined(l)&&(r=l[0],s=l[1]),a.cartographicToCartesian(t.Rectangle.northeast(e,T),y),a.cartographicToCartesian(t.Rectangle.southwest(e,T),M),t.Cartesian3.midpoint(M,y,E);const c=a.scaleToGeodeticSurface(E,_);if(n.defined(c)){const e=t.Cartesian3.distance(E,c);r=Math.min(r,-e)}else r=k._defaultMinTerrainHeight}return r=Math.max(k._defaultMinTerrainHeight,r),{minimumTerrainHeight:r,maximumTerrainHeight:s}},k.getBoundingSphere=function(a,i){i=n.defaultValue(i,t.Ellipsoid.WGS84);const r=I(a);let s=k._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=k._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(a,i,0);return e.BoundingSphere.fromRectangle3D(a,i,s,O),e.BoundingSphere.union(o,O,o)},k._terrainHeightsMaxLevel=6,k._defaultMaxTerrainHeight=9e3,k._defaultMinTerrainHeight=-1e5,k._terrainHeights=void 0,k._initPromise=void 0,Object.defineProperties(k,{initialized:{get:function(){return n.defined(k._terrainHeights)}}});const L=[e.GeographicProjection,h.WebMercatorProjection],S=L.length,x=Math.cos(i.CesiumMath.toRadians(30)),N=Math.cos(i.CesiumMath.toRadians(150));function R(e){const a=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=a,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=t.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(R.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t.Ellipsoid.packedLength+1+1}}}),R.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<S;e++)if(t instanceof L[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const D=new t.Cartesian3,v=new t.Cartesian3,z=new t.Cartesian3;function H(e,a,n,i,r){const s=q(i,e,0,D),o=q(i,e,n,v),l=q(i,a,0,z),c=X(o,s,v),u=X(l,s,z);return t.Cartesian3.cross(u,c,r),t.Cartesian3.normalize(r,r)}const j=new t.Cartographic,B=new t.Cartesian3,V=new t.Cartesian3,G=new t.Cartesian3;function Y(e,a,n,i,s,c,u,C,d,h,p){if(0===s)return;let f;c===r.ArcType.GEODESIC?f=new o.EllipsoidGeodesic(e,a,u):c===r.ArcType.RHUMB&&(f=new l.EllipsoidRhumbLine(e,a,u));const g=f.surfaceDistance;if(g<s)return;const m=H(e,a,i,u,G),w=Math.ceil(g/s),y=g/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=f.interpolateUsingSurfaceDistance(M,j),a=q(u,e,n,B),r=q(u,e,i,V);t.Cartesian3.pack(m,C,E),t.Cartesian3.pack(a,d,E),t.Cartesian3.pack(r,h,E),p.push(e.latitude),p.push(e.longitude),E+=3,M+=y}}const F=new t.Cartographic;function q(e,a,n,i){return t.Cartographic.clone(a,F),F.height=n,t.Cartographic.toCartesian(F,e,i)}function X(e,a,n){return t.Cartesian3.subtract(e,a,n),t.Cartesian3.normalize(n,n),n}function W(e,a,n,i){return i=X(e,a,i),i=t.Cartesian3.cross(i,n,i),i=t.Cartesian3.normalize(i,i),i=t.Cartesian3.cross(n,i,i)}R.pack=function(e,a,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;a[r++]=o;for(let e=0;e<o;++e){const n=s[e];t.Cartesian3.pack(n,a,r),r+=3}return a[r++]=e.granularity,a[r++]=e.loop?1:0,a[r++]=e.arcType,t.Ellipsoid.pack(e._ellipsoid,a,r),r+=t.Ellipsoid.packedLength,a[r++]=e._projectionIndex,a[r++]=e._scene3DOnly?1:0,a},R.unpack=function(e,a,i){let r=n.defaultValue(a,0);const s=e[r++],o=new Array(s);for(let a=0;a<s;a++)o[a]=t.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=t.Ellipsoid.unpack(e,r);r+=t.Ellipsoid.packedLength;const d=e[r++],h=1===e[r++];return n.defined(i)||(i=new R({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=d,i._scene3DOnly=h,i};const U=new t.Cartesian3,Z=new t.Cartesian3,$=new t.Cartesian3,J=new t.Cartesian3;function Q(e,a,n,r,s){const o=X(n,a,J),l=W(e,a,o,U),c=W(r,a,o,Z);if(i.CesiumMath.equalsEpsilon(t.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=t.Cartesian3.cross(o,l,s),s=t.Cartesian3.normalize(s,s);s=t.Cartesian3.add(c,l,s),s=t.Cartesian3.normalize(s,s);const u=t.Cartesian3.cross(o,s,$);return t.Cartesian3.dot(c,u)<0&&(s=t.Cartesian3.negate(s,s)),s}const K=d.Plane.fromPointNormal(t.Cartesian3.ZERO,t.Cartesian3.UNIT_Y),ee=new t.Cartesian3,te=new t.Cartesian3,ae=new t.Cartesian3,ne=new t.Cartesian3,ie=new t.Cartesian3,re=new t.Cartesian3,se=new t.Cartographic,oe=new t.Cartographic,le=new t.Cartographic;R.createGeometry=function(a){const o=!a._scene3DOnly;let d=a.loop;const h=a._ellipsoid,p=a.granularity,f=a.arcType,g=new L[a._projectionIndex](h),m=1e3;let w,y;const M=a._positions,T=M.length;let E,_,O,b;2===T&&(d=!1);const P=new l.EllipsoidRhumbLine(void 0,void 0,h);let A,I,S;const N=[M[0]];for(y=0;y<T-1;y++)E=M[y],_=M[y+1],A=C.IntersectionTests.lineSegmentPlane(E,_,K,re),!n.defined(A)||t.Cartesian3.equalsEpsilon(A,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(A,_,i.CesiumMath.EPSILON7)||(a.arcType===r.ArcType.GEODESIC?N.push(t.Cartesian3.clone(A)):a.arcType===r.ArcType.RHUMB&&(S=h.cartesianToCartographic(A,se).longitude,O=h.cartesianToCartographic(E,se),b=h.cartesianToCartographic(_,oe),P.setEndPoints(O,b),I=P.findIntersectionWithLongitude(S,le),A=h.cartographicToCartesian(I,re),!n.defined(A)||t.Cartesian3.equalsEpsilon(A,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(A,_,i.CesiumMath.EPSILON7)||N.push(t.Cartesian3.clone(A)))),N.push(_);d&&(E=M[T-1],_=M[0],A=C.IntersectionTests.lineSegmentPlane(E,_,K,re),!n.defined(A)||t.Cartesian3.equalsEpsilon(A,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(A,_,i.CesiumMath.EPSILON7)||(a.arcType===r.ArcType.GEODESIC?N.push(t.Cartesian3.clone(A)):a.arcType===r.ArcType.RHUMB&&(S=h.cartesianToCartographic(A,se).longitude,O=h.cartesianToCartographic(E,se),b=h.cartesianToCartographic(_,oe),P.setEndPoints(O,b),I=P.findIntersectionWithLongitude(S,le),A=h.cartographicToCartesian(I,re),!n.defined(A)||t.Cartesian3.equalsEpsilon(A,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(A,_,i.CesiumMath.EPSILON7)||N.push(t.Cartesian3.clone(A)))));let R=N.length,D=new Array(R);for(y=0;y<R;y++){const e=t.Cartographic.fromCartesian(N[y],h);e.height=0,D[y]=e}if(D=s.arrayRemoveDuplicates(D,t.Cartographic.equalsEpsilon),R=D.length,R<2)return;const v=[],z=[],j=[],B=[];let V=ee,G=te,F=ae,W=ne,U=ie;const Z=D[0],$=D[1];for(V=q(h,D[R-1],0,V),W=q(h,$,0,W),G=q(h,Z,0,G),F=q(h,Z,m,F),U=d?Q(V,G,F,W,U):H(Z,$,m,h,U),t.Cartesian3.pack(U,z,0),t.Cartesian3.pack(G,j,0),t.Cartesian3.pack(F,B,0),v.push(Z.latitude),v.push(Z.longitude),Y(Z,$,0,m,p,f,h,z,j,B,v),y=1;y<R-1;++y){V=t.Cartesian3.clone(G,V),G=t.Cartesian3.clone(W,G);const e=D[y];q(h,e,m,F),q(h,D[y+1],0,W),Q(V,G,F,W,U),w=z.length,t.Cartesian3.pack(U,z,w),t.Cartesian3.pack(G,j,w),t.Cartesian3.pack(F,B,w),v.push(e.latitude),v.push(e.longitude),Y(D[y],D[y+1],0,m,p,f,h,z,j,B,v)}const J=D[R-1],ce=D[R-2];if(G=q(h,J,0,G),F=q(h,J,m,F),d){const e=D[0];V=q(h,ce,0,V),W=q(h,e,0,W),U=Q(V,G,F,W,U)}else U=H(ce,J,m,h,U);if(w=z.length,t.Cartesian3.pack(U,z,w),t.Cartesian3.pack(G,j,w),t.Cartesian3.pack(F,B,w),v.push(J.latitude),v.push(J.longitude),d){for(Y(J,Z,0,m,p,f,h,z,j,B,v),w=z.length,y=0;y<3;++y)z[w+y]=z[y],j[w+y]=j[y],B[w+y]=B[y];v.push(Z.latitude),v.push(Z.longitude)}return function(a,n,r,s,o,l,C){let d,h;const p=n._ellipsoid,f=r.length/3-1,g=8*f,m=4*g,w=36*f,y=g>65535?new Uint32Array(w):new Uint16Array(w),M=new Float64Array(3*g),T=new Float32Array(m),E=new Float32Array(m),_=new Float32Array(m),O=new Float32Array(m),b=new Float32Array(m);let P,A,I,L;C&&(P=new Float32Array(m),A=new Float32Array(m),I=new Float32Array(m),L=new Float32Array(2*g));const S=l.length/2;let N=0;const R=_e;R.height=0;const D=Oe;D.height=0;let v=be,z=Pe;if(C)for(h=0,d=1;d<S;d++)R.latitude=l[h],R.longitude=l[h+1],D.latitude=l[h+2],D.longitude=l[h+3],v=n.project(R,v),z=n.project(D,z),N+=t.Cartesian3.distance(v,z),h+=2;const H=s.length/3;z=t.Cartesian3.unpack(s,0,z);let j,B=0;for(h=3,d=1;d<H;d++)v=t.Cartesian3.clone(z,v),z=t.Cartesian3.unpack(s,h,z),B+=t.Cartesian3.distance(v,z),h+=3;h=3;let V=0,G=0,Y=0,F=0,q=!1,W=t.Cartesian3.unpack(r,0,ke),U=t.Cartesian3.unpack(s,0,Pe),Z=t.Cartesian3.unpack(o,0,Le);if(a){de(Z,t.Cartesian3.unpack(r,r.length-6,Ae),W,U)&&(Z=t.Cartesian3.negate(Z,Z))}let $=0,J=0,Q=0;for(d=0;d<f;d++){const e=t.Cartesian3.clone(W,Ae),a=t.Cartesian3.clone(U,be);let u,d,f,g,m=t.Cartesian3.clone(Z,Ie);if(q&&(m=t.Cartesian3.negate(m,m)),W=t.Cartesian3.unpack(r,h,ke),U=t.Cartesian3.unpack(s,h,Pe),Z=t.Cartesian3.unpack(o,h,Le),q=de(Z,e,W,U),R.latitude=l[V],R.longitude=l[V+1],D.latitude=l[V+2],D.longitude=l[V+3],C){const e=Ee(R,D);u=n.project(R,ze),d=n.project(D,He);const a=X(d,u,Ze);a.y=Math.abs(a.y),f=je,g=Be,0===e||t.Cartesian3.dot(a,t.Cartesian3.UNIT_Y)>x?(f=ge(n,R,m,u,je),g=ge(n,D,Z,d,Be)):1===e?(g=ge(n,D,Z,d,Be),f.x=0,f.y=i.CesiumMath.sign(R.longitude-Math.abs(D.longitude)),f.z=0):(f=ge(n,R,m,u,je),g.x=0,g.y=i.CesiumMath.sign(R.longitude-D.longitude),g.z=0)}const w=t.Cartesian3.distance(a,U),y=c.EncodedCartesian3.fromCartesian(e,We),S=t.Cartesian3.subtract(W,e,Ve),v=t.Cartesian3.normalize(S,Fe);let z=t.Cartesian3.subtract(a,e,Ge);z=t.Cartesian3.normalize(z,z);let H=t.Cartesian3.cross(v,z,Fe);H=t.Cartesian3.normalize(H,H);let K=t.Cartesian3.cross(z,m,qe);K=t.Cartesian3.normalize(K,K);let ee=t.Cartesian3.subtract(U,W,Ye);ee=t.Cartesian3.normalize(ee,ee);let te=t.Cartesian3.cross(Z,ee,Xe);te=t.Cartesian3.normalize(te,te);const ae=w/B,ne=$/B;let ie,re,se,oe=0,le=0,ce=0;if(C){oe=t.Cartesian3.distance(u,d),ie=c.EncodedCartesian3.fromCartesian(u,Ue),re=t.Cartesian3.subtract(d,u,Ze),se=t.Cartesian3.normalize(re,$e);const e=se.x;se.x=se.y,se.y=-e,le=oe/N,ce=J/N}for(j=0;j<8;j++){const e=F+4*j,a=G+2*j,n=e+3,i=j<4?1:-1,r=2===j||3===j||6===j||7===j?1:-1;t.Cartesian3.pack(y.high,T,e),T[n]=S.x,t.Cartesian3.pack(y.low,E,e),E[n]=S.y,t.Cartesian3.pack(K,_,e),_[n]=S.z,t.Cartesian3.pack(te,O,e),O[n]=ae*i,t.Cartesian3.pack(H,b,e);let s=ne*r;0===s&&r<0&&(s=9),b[n]=s,C&&(P[e]=ie.high.x,P[e+1]=ie.high.y,P[e+2]=ie.low.x,P[e+3]=ie.low.y,I[e]=-f.y,I[e+1]=f.x,I[e+2]=g.y,I[e+3]=-g.x,A[e]=re.x,A[e+1]=re.y,A[e+2]=se.x,A[e+3]=se.y,L[a]=le*i,s=ce*r,0===s&&r<0&&(s=9),L[a+1]=s)}const ue=De,Ce=ve,he=Ne,pe=Re,fe=t.Rectangle.fromCartographicArray(Se,xe),me=k.getMinimumMaximumHeights(fe,p),we=me.minimumTerrainHeight,Me=me.maximumTerrainHeight;Q+=we,Q+=Me,ye(e,a,we,Me,ue,he),ye(W,U,we,Me,Ce,pe);let _e=t.Cartesian3.multiplyByScalar(H,i.CesiumMath.EPSILON5,Je);t.Cartesian3.add(ue,_e,ue),t.Cartesian3.add(Ce,_e,Ce),t.Cartesian3.add(he,_e,he),t.Cartesian3.add(pe,_e,pe),Te(ue,Ce),Te(he,pe),t.Cartesian3.pack(ue,M,Y),t.Cartesian3.pack(Ce,M,Y+3),t.Cartesian3.pack(pe,M,Y+6),t.Cartesian3.pack(he,M,Y+9),_e=t.Cartesian3.multiplyByScalar(H,-2*i.CesiumMath.EPSILON5,Je),t.Cartesian3.add(ue,_e,ue),t.Cartesian3.add(Ce,_e,Ce),t.Cartesian3.add(he,_e,he),t.Cartesian3.add(pe,_e,pe),Te(ue,Ce),Te(he,pe),t.Cartesian3.pack(ue,M,Y+12),t.Cartesian3.pack(Ce,M,Y+15),t.Cartesian3.pack(pe,M,Y+18),t.Cartesian3.pack(he,M,Y+21),V+=2,h+=3,G+=16,Y+=24,F+=32,$+=w,J+=oe}h=0;let K=0;for(d=0;d<f;d++){for(j=0;j<et;j++)y[h+j]=Ke[j]+K;K+=8,h+=et}const ee=Qe;e.BoundingSphere.fromVertices(r,t.Cartesian3.ZERO,3,ee[0]),e.BoundingSphere.fromVertices(s,t.Cartesian3.ZERO,3,ee[1]);const te=e.BoundingSphere.fromBoundingSpheres(ee);te.radius+=Q/(2*f);const ae={position:new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:M}),startHiAndForwardOffsetX:tt(T),startLoAndForwardOffsetY:tt(E),startNormalAndForwardOffsetZ:tt(_),endNormalAndTextureCoordinateNormalizationX:tt(O),rightNormalAndTextureCoordinateNormalizationY:tt(b)};C&&(ae.startHiLo2D=tt(P),ae.offsetAndRight2D=tt(A),ae.startEndNormals2D=tt(I),ae.texcoordNormalization2D=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:L}));return new u.Geometry({attributes:ae,indices:y,boundingSphere:te})}(d,g,j,B,z,v,o)};const ce=new t.Cartesian3,ue=new t.Matrix3,Ce=new e.Quaternion;function de(a,n,r,s){const o=X(r,n,ce),l=t.Cartesian3.dot(o,a);if(l>x||l<N){const n=X(s,r,J),o=l<N?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,Ce),u=t.Matrix3.fromQuaternion(c,ue);return t.Matrix3.multiplyByVector(u,a,a),!0}return!1}const he=new t.Cartographic,pe=new t.Cartesian3,fe=new t.Cartesian3;function ge(e,a,n,r,s){const o=t.Cartographic.toCartesian(a,e._ellipsoid,pe);let l=t.Cartesian3.add(o,n,fe),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,he);Math.abs(a.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=t.Cartesian3.subtract(o,n,fe),C=u.cartesianToCartographic(l,he)),C.height=0;const d=e.project(C,s);return(s=t.Cartesian3.subtract(d,r,s)).z=0,s=t.Cartesian3.normalize(s,s),c&&t.Cartesian3.negate(s,s),s}const me=new t.Cartesian3,we=new t.Cartesian3;function ye(e,a,n,i,r,s){const o=t.Cartesian3.subtract(a,e,me);t.Cartesian3.normalize(o,o);const l=n-0;let c=t.Cartesian3.multiplyByScalar(o,l,we);t.Cartesian3.add(e,c,r);const u=i-1e3;c=t.Cartesian3.multiplyByScalar(o,u,we),t.Cartesian3.add(a,c,s)}const Me=new t.Cartesian3;function Te(e,a){const n=d.Plane.getPointDistance(K,e),r=d.Plane.getPointDistance(K,a);let s=Me;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=X(a,e,s),t.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),t.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=X(e,a,s),t.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),t.Cartesian3.add(a,s,a))}function Ee(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const _e=new t.Cartographic,Oe=new t.Cartographic,be=new t.Cartesian3,Pe=new t.Cartesian3,Ae=new t.Cartesian3,ke=new t.Cartesian3,Ie=new t.Cartesian3,Le=new t.Cartesian3,Se=[_e,Oe],xe=new t.Rectangle,Ne=new t.Cartesian3,Re=new t.Cartesian3,De=new t.Cartesian3,ve=new t.Cartesian3,ze=new t.Cartesian3,He=new t.Cartesian3,je=new t.Cartesian3,Be=new t.Cartesian3,Ve=new t.Cartesian3,Ge=new t.Cartesian3,Ye=new t.Cartesian3,Fe=new t.Cartesian3,qe=new t.Cartesian3,Xe=new t.Cartesian3,We=new c.EncodedCartesian3,Ue=new c.EncodedCartesian3,Ze=new t.Cartesian3,$e=new t.Cartesian3,Je=new t.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],et=Ke.length;function tt(e){return new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return R._projectNormal=ge,function(e,t){return k.initialize().then((function(){return n.defined(t)&&(e=R.unpack(e,t)),R.createGeometry(e)}))}}));
|