define(["./when-4bbc8319","./Matrix2-c6c16658","./ArcType-fc72c06c","./GeometryOffsetAttribute-821af768","./BoundingRectangle-a97789b6","./Transforms-f15de320","./RuntimeError-5b082e8f","./ComponentDatatype-3d0a0aac","./EllipsoidGeodesic-2e7ba57d","./EllipsoidTangentPlane-41514392","./GeometryAttribute-8350368e","./GeometryInstance-0b07c761","./GeometryPipeline-0fb7cb2c","./IndexDatatype-ddbc25a7","./PolygonGeometryLibrary-a02d6b0b","./PolygonPipeline-ff4d4077","./VertexFormat-7b982b01","./combine-e9466e32","./WebGLConstants-508b9636","./AxisAlignedBoundingBox-a572809f","./IntersectionTests-a4e54d9a","./Plane-26e67b94","./AttributeCompression-f7a901f9","./EncodedCartesian3-b1495e46","./arrayRemoveDuplicates-80a91d16","./EllipsoidRhumbLine-c6741351","./GeometryAttributes-7827a6c2"],(function(t,e,o,i,n,r,a,s,l,c,u,p,m,y,g,d,h,f,b,_,P,x,w,C,T,I,A){"use strict";const E=new e.Cartographic,v=new e.Cartographic;function G(t,e,o,i){const n=i.cartesianToCartographic(t,E).height,r=i.cartesianToCartographic(e,v);r.height=n,i.cartographicToCartesian(r,e);const a=i.cartesianToCartographic(o,v);a.height=n-100,i.cartographicToCartesian(a,o)}const O=new n.BoundingRectangle,V=new e.Cartesian3,F=new e.Cartesian3,D=new e.Cartesian3,L=new e.Cartesian3,N=new e.Cartesian3,H=new e.Cartesian3;let R=new e.Cartesian3,M=new e.Cartesian3,S=new e.Cartesian3;const B=new e.Cartesian2,k=new e.Cartesian2,z=new e.Cartesian3,W=new r.Quaternion,Y=new e.Matrix3,U=new e.Matrix3;function j(o){const n=o.vertexFormat,a=o.geometry,l=o.shadowVolume,c=a.attributes.position.values;let p=c.length;const m=o.wall,y=o.top||m,g=o.bottom||m;if(n.st||n.normal||n.tangent||n.bitangent||l){const t=o.boundingRectangle,i=o.tangentPlane,d=o.ellipsoid,h=o.stRotation,f=o.perPositionHeight,b=B;b.x=t.x,b.y=t.y;const _=n.st?new Float32Array(p/3*2):void 0;let P;n.normal&&(P=f&&y&&!m?a.attributes.normal.values:new Float32Array(p));const x=n.tangent?new Float32Array(p):void 0,w=n.bitangent?new Float32Array(p):void 0,C=l?new Float32Array(p):void 0;let T=0,I=0,A=F,E=D,v=L,O=!0,j=Y,Q=U;if(0!==h){let t=r.Quaternion.fromAxisAngle(i._plane.normal,h,W);j=e.Matrix3.fromQuaternion(t,j),t=r.Quaternion.fromAxisAngle(i._plane.normal,-h,W),Q=e.Matrix3.fromQuaternion(t,Q)}else j=e.Matrix3.clone(e.Matrix3.IDENTITY,j),Q=e.Matrix3.clone(e.Matrix3.IDENTITY,Q);let q=0,K=0;y&&g&&(q=p/2,K=p/3,p/=2);for(let r=0;r
K.eastOverIDL-K.westOverIDL&&(c.west=K.westOverIDL,c.east=K.eastOverIDL,c.east>s.CesiumMath.PI&&(c.east=c.east-s.CesiumMath.TWO_PI),c.west>s.CesiumMath.PI&&(c.west=c.west-s.CesiumMath.TWO_PI)),c}const X=new e.Cartographic;function $(t,e,o,i){const n=t.surfaceDistance,r=Math.ceil(n*e),a=r>0?n/(r-1):Number.POSITIVE_INFINITY;let l=0;for(let e=0;e