define(["./when-b60132fc","./Cartesian2-47311507","./ArcType-29cf2197","./arrayFill-4513d7ad","./BoundingRectangle-3ed8ca6d","./buildModuleUrl-4e1b81e7","./Cartographic-3309dd0d","./Check-7b2a090c","./ComponentDatatype-c140a87d","./EllipsoidGeodesic-0f19ac62","./EllipsoidTangentPlane-edb321d3","./GeometryAttribute-3a88ba31","./GeometryInstance-68aae013","./GeometryOffsetAttribute-fbeb6f1a","./GeometryPipeline-9d1ef0b6","./IndexDatatype-8a5eead4","./Math-119be1a3","./PrimitiveType-a54dc62f","./PolygonGeometryLibrary-92af6f1e","./PolygonPipeline-660e1625","./VertexFormat-6446fca0","./Event-16a2dfbf","./RuntimeError-4a5c8994","./WebGLConstants-4ae0db90","./Cartesian4-3ca25aab","./IntersectionTests-7386ffbf","./Plane-7ae8294c","./FeatureDetection-c3b71206","./AttributeCompression-90851096","./EncodedCartesian3-f1396b05","./arrayRemoveDuplicates-d2f048c5","./EllipsoidRhumbLine-ed1a6bf4","./GeometryAttributes-252e9929","./earcut-2.2.1-20c8012f"],(function(e,t,r,a,o,i,n,s,l,u,c,d,p,g,y,m,h,f,b,_,v,P,x,C,w,A,T,E,I,G,V,F,H,N){"use strict";var O=new n.Cartographic,R=new n.Cartographic;function D(e,t,r,a){var o=a.cartesianToCartographic(e,O).height,i=a.cartesianToCartographic(t,R);i.height=o,a.cartographicToCartesian(i,t);var n=a.cartesianToCartographic(r,R);n.height=o-100,a.cartographicToCartesian(n,r)}var L=new o.BoundingRectangle,M=new n.Cartesian3,B=new n.Cartesian3,S=new n.Cartesian3,k=new n.Cartesian3,z=new n.Cartesian3,Y=new n.Cartesian3,U=new n.Cartesian3,W=new n.Cartesian3,j=new n.Cartesian3,Q=new t.Cartesian2,q=new t.Cartesian2,K=new n.Cartesian3,Z=new d.Quaternion,J=new f.Matrix3,X=new f.Matrix3;function $(r){var o=r.vertexFormat,i=r.geometry,s=r.shadowVolume,u=i.attributes.position.values,c=u.length,p=r.wall,y=r.top||p,m=r.bottom||p;if(o.st||o.normal||o.tangent||o.bitangent||s){var b=r.boundingRectangle,_=r.tangentPlane,v=r.ellipsoid,P=r.stRotation,x=r.perPositionHeight,C=Q;C.x=b.x,C.y=b.y;var w,A=o.st?new Float32Array(c/3*2):void 0;o.normal&&(w=x&&y&&!p?i.attributes.normal.values:new Float32Array(c));var T=o.tangent?new Float32Array(c):void 0,E=o.bitangent?new Float32Array(c):void 0,I=s?new Float32Array(c):void 0,G=0,V=0,F=B,H=S,N=k,O=!0,R=J,L=X;if(0!==P){var $=d.Quaternion.fromAxisAngle(_._plane.normal,P,Z);R=f.Matrix3.fromQuaternion($,R),$=d.Quaternion.fromAxisAngle(_._plane.normal,-P,Z),L=f.Matrix3.fromQuaternion($,L)}else R=f.Matrix3.clone(f.Matrix3.IDENTITY,R),L=f.Matrix3.clone(f.Matrix3.IDENTITY,L);var ee=0,te=0;y&&m&&(ee=c/2,te=c/3,c/=2);for(var re=0;rere.west-re.east&&(s.east=re.east,s.west=re.west),s}var ie=new n.Cartographic;function ne(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=i>0?o/(i-1):Number.POSITIVE_INFINITY,s=0,l=0;l0?Math.min(c,a.west):a.west,a.east=c<0?Math.max(c,a.east):a.east}}var se=[];function le(e,t,r,a,o,i,n,s,l,u){var d,g={walls:[]};if(i||n){var y,h,f=b.PolygonGeometryLibrary.createGeometryFromPositions(e,t,r,o,s,l),v=f.attributes.position.values,P=f.indices;if(i&&n){var x=v.concat(v);y=x.length/3,(h=m.IndexDatatype.createTypedArray(y,2*P.length)).set(P);var C=P.length,w=y/2;for(d=0;d