define(["./when-b60132fc","./Cartesian2-47311507","./ArcType-29cf2197","./arrayFill-4513d7ad","./BoundingRectangle-01b3e970","./BoundingSphere-561b54d0","./Cartographic-3309dd0d","./Check-7b2a090c","./ComponentDatatype-c140a87d","./EllipsoidGeodesic-0f19ac62","./EllipsoidTangentPlane-b2b18d75","./GeometryAttribute-3a42bbdc","./GeometryInstance-41780fb6","./GeometryOffsetAttribute-fbeb6f1a","./GeometryPipeline-e1b82a4e","./IndexDatatype-8a5eead4","./Math-119be1a3","./PolygonGeometryLibrary-ae9ad77c","./PolygonPipeline-f49953b9","./Transforms-cb0006b0","./VertexFormat-6446fca0","./Cartesian4-3ca25aab","./RuntimeError-4a5c8994","./WebGLConstants-4ae0db90","./IntersectionTests-0c6d0a14","./Plane-097b3a8f","./PrimitiveType-39acab88","./AttributeCompression-90851096","./EncodedCartesian3-f1396b05","./arrayRemoveDuplicates-d2f048c5","./EllipsoidRhumbLine-ed1a6bf4","./GeometryAttributes-252e9929","./earcut-2.2.1-20c8012f","./buildModuleUrl-3addfe33","./FeatureDetection-c3b71206"],(function(e,t,a,r,o,i,n,s,l,u,c,p,y,d,g,m,h,f,b,v,_,P,x,C,w,T,A,E,I,G,V,F,N,H,O){"use strict";var R=new n.Cartographic,D=new n.Cartographic;function L(e,t,a,r){var o=r.cartesianToCartographic(e,R).height,i=r.cartesianToCartographic(t,D);i.height=o,r.cartographicToCartesian(i,t);var n=r.cartesianToCartographic(a,D);n.height=o-100,r.cartographicToCartesian(n,a)}var M=new o.BoundingRectangle,S=new n.Cartesian3,B=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 n.Cartesian3,q=new t.Cartesian2,K=new t.Cartesian2,Z=new n.Cartesian3,J=new v.Quaternion,X=new i.Matrix3,$=new i.Matrix3;function ee(a){var o=a.vertexFormat,s=a.geometry,u=a.shadowVolume,c=s.attributes.position.values,y=c.length,g=a.wall,m=a.top||g,f=a.bottom||g;if(o.st||o.normal||o.tangent||o.bitangent||u){var b=a.boundingRectangle,_=a.tangentPlane,P=a.ellipsoid,x=a.stRotation,C=a.perPositionHeight,w=q;w.x=b.x,w.y=b.y;var T,A=o.st?new Float32Array(y/3*2):void 0;o.normal&&(T=C&&m&&!g?s.attributes.normal.values:new Float32Array(y));var E=o.tangent?new Float32Array(y):void 0,I=o.bitangent?new Float32Array(y):void 0,G=u?new Float32Array(y):void 0,V=0,F=0,N=B,H=k,O=z,R=!0,D=X,M=$;if(0!==x){var ee=v.Quaternion.fromAxisAngle(_._plane.normal,x,J);D=i.Matrix3.fromQuaternion(ee,D),ee=v.Quaternion.fromAxisAngle(_._plane.normal,-x,J),M=i.Matrix3.fromQuaternion(ee,M)}else D=i.Matrix3.clone(i.Matrix3.IDENTITY,D),M=i.Matrix3.clone(i.Matrix3.IDENTITY,M);var te=0,ae=0;m&&f&&(te=y/2,ae=y/3,y/=2);for(var re=0;rere.west-re.east&&(s.east=re.east,s.west=re.west),s}var ne=new n.Cartographic;function se(e,t,a,r){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,r.west):r.west,r.east=c<0?Math.max(c,r.east):r.east}}var le=[];function ue(e,t,a,r,o,i,n,s,l,u){var p,d={walls:[]};if(i||n){var g,h,v=f.PolygonGeometryLibrary.createGeometryFromPositions(e,t,a,o,s,l),_=v.attributes.position.values,P=v.indices;if(i&&n){var x=_.concat(_);g=x.length/3,(h=m.IndexDatatype.createTypedArray(g,2*P.length)).set(P);var C=P.length,w=g/2;for(p=0;p