define(["./when-229515d6","./Matrix2-46444433","./ArcType-e1641d8d","./GeometryOffsetAttribute-4f901209","./BoundingRectangle-a0be4c02","./Transforms-ab7258fe","./RuntimeError-608565a6","./ComponentDatatype-692a36d3","./EllipsoidGeodesic-94d72244","./EllipsoidTangentPlane-4deba134","./GeometryAttribute-d3bef603","./GeometryInstance-f781740f","./GeometryPipeline-dfaf2218","./IndexDatatype-7c683b18","./PolygonGeometryLibrary-34c93283","./PolygonPipeline-259e0bdf","./VertexFormat-7272aabd","./combine-35b6d9cb","./WebGLConstants-f63312fc","./AxisAlignedBoundingBox-8f6cec20","./IntersectionTests-4cf437d5","./Plane-1f2a7880","./AttributeCompression-95366034","./EncodedCartesian3-d9d33966","./arrayRemoveDuplicates-ee080d9d","./EllipsoidRhumbLine-9cd85d72","./GeometryAttributes-b253752a"],(function(t,e,o,i,n,r,a,s,l,c,u,p,m,y,d,g,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,d=o.bottom||m;if(n.st||n.normal||n.tangent||n.bitangent||l){const t=o.boundingRectangle,i=o.tangentPlane,g=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&&d&&(q=p/2,K=p/3,p/=2);for(let r=0;rK.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=0?n:n+s.CesiumMath.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,c),i.eastOverIDL=Math.max(i.eastOverIDL,c)}}const tt=[];function et(t,e,o,i,n,r,a,s,l){const u={walls:[]};let m;if(r||a){const i=d.PolygonGeometryLibrary.createGeometryFromPositions(t,e,o,n,s,l),c=i.attributes.position.values,g=i.indices;let h,f;if(r&&a){const t=c.concat(c);h=t.length/3,f=y.IndexDatatype.createTypedArray(h,2*g.length),f.set(g);const e=g.length,o=h/2;for(m=0;m