define(["./when-cbf8cd21","./Check-35e1a91d","./Math-6a1814d8","./Cartesian2-c451a606","./Transforms-e4be2a30","./RuntimeError-f4c64df1","./WebGLConstants-95ceb4e9","./ComponentDatatype-7ee14e67","./GeometryAttribute-6f280ece","./GeometryAttributes-90846c5f","./AttributeCompression-bb3dc748","./GeometryPipeline-21a841db","./EncodedCartesian3-4930ae29","./IndexDatatype-354a5ea3","./IntersectionTests-8371bf29","./Plane-929e0674","./GeometryOffsetAttribute-84f7eff3","./VertexFormat-cc24f342","./GeometryInstance-3fa7d9ab","./arrayRemoveDuplicates-4dfa28d2","./BoundingRectangle-98202e82","./EllipsoidTangentPlane-af8ae194","./ArcType-2b58731c","./EllipsoidRhumbLine-8c93f67a","./PolygonPipeline-8cd894f7","./PolygonGeometryLibrary-b5f313e5","./EllipsoidGeodesic-19b1a191"],function(Y,e,U,j,Q,t,r,q,K,a,o,D,i,L,n,s,Z,v,N,l,u,H,c,p,R,M,y){"use strict";var m=new j.Cartographic,g=new j.Cartographic;function J(e,t,r,a){var o=a.cartesianToCartographic(e,m).height,i=a.cartesianToCartographic(t,g);i.height=o,a.cartographicToCartesian(i,t);var n=a.cartesianToCartographic(r,g);n.height=o-100,a.cartographicToCartesian(n,r)}var S=new u.BoundingRectangle,X=new j.Cartesian3,$=new j.Cartesian3,ee=new j.Cartesian3,te=new j.Cartesian3,re=new j.Cartesian3,ae=new j.Cartesian3,oe=new j.Cartesian3,ie=new j.Cartesian3,ne=new j.Cartesian3,se=new j.Cartesian2,le=new j.Cartesian2,ue=new j.Cartesian3,pe=new Q.Quaternion,ce=new Q.Matrix3,ye=new Q.Matrix3;function B(e){var t=e.vertexFormat,r=e.geometry,a=e.shadowVolume,o=r.attributes.position.values,i=o.length,n=e.wall,s=e.top||n,l=e.bottom||n;if(t.st||t.normal||t.tangent||t.bitangent||a){var u=e.boundingRectangle,p=e.tangentPlane,c=e.ellipsoid,y=e.stRotation,m=e.perPositionHeight,g=se;g.x=u.x,g.y=u.y;var d,h=t.st?new Float32Array(i/3*2):void 0;t.normal&&(d=m&&s&&!n?r.attributes.normal.values:new Float32Array(i));var f=t.tangent?new Float32Array(i):void 0,v=t.bitangent?new Float32Array(i):void 0,b=a?new Float32Array(i):void 0,_=0,P=0,C=$,w=ee,x=te,T=!0,I=ce,A=ye;if(0!==y){var E=Q.Quaternion.fromAxisAngle(p._plane.normal,y,pe);I=Q.Matrix3.fromQuaternion(E,I),E=Q.Quaternion.fromAxisAngle(p._plane.normal,-y,pe),A=Q.Matrix3.fromQuaternion(E,A)}else I=Q.Matrix3.clone(Q.Matrix3.IDENTITY,I),A=Q.Matrix3.clone(Q.Matrix3.IDENTITY,A);var G=0,O=0;s&&l&&(G=i/2,O=i/3,i/=2);for(var V=0;Vf.eastOverIDL-f.westOverIDL&&(o.west=f.westOverIDL,o.east=f.eastOverIDL,o.east>U.CesiumMath.PI&&(o.east=o.east-U.CesiumMath.TWO_PI),o.west>U.CesiumMath.PI&&(o.west=o.west-U.CesiumMath.TWO_PI)),o}var P=new j.Cartographic;function C(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=0