text: define(["exports","./arrayRemoveDuplicates-a06fa5e2","./Cartesian2-baaaa1b2","./when-a8daa614","./Math-2bc59f31","./PolylinePipeline-de2c5e75"],(function(e,i,t,a,r,n){"use strict";var o={},l=new t.Cartographic,s=new t.Cartographic;var h=new Array(2),g=new Array(2),p={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};o.computePositions=function(e,o,u,c,d,y){var v=function(e,n,o,h){var g=(n=i.arrayRemoveDuplicates(n,t.Cartesian3.equalsEpsilon)).length;if(!(g<2)){var p=a.defined(h),u=a.defined(o),c=new Array(g),d=new Array(g),y=new Array(g),v=n[0];c[0]=v;var m=e.cartesianToCartographic(v,l);u&&(m.height=o[0]),d[0]=m.height,y[0]=p?h[0]:0;for(var P,f,A=d[0]===y[0],C=1,w=1;w<g;++w){var b=n[w],M=e.cartesianToCartographic(b,s);u&&(M.height=o[w]),A=A&&0===M.height,P=m,f=M,r.CesiumMath.equalsEpsilon(P.latitude,f.latitude,r.CesiumMath.EPSILON10)&&r.CesiumMath.equalsEpsilon(P.longitude,f.longitude,r.CesiumMath.EPSILON10)?m.height<M.height&&(d[C-1]=M.height):(c[C]=b,d[C]=M.height,y[C]=p?h[w]:0,A=A&&d[C]===y[C],t.Cartographic.clone(M,m),++C)}if(!(A||C<2))return c.length=C,d.length=C,y.length=C,{positions:c,topHeights:d,bottomHeights:y}}}(e,o,u,c);if(a.defined(v)){o=v.positions,u=v.topHeights,c=v.bottomHeights;var m=o.length,P=(v=m-2,r.CesiumMath.chordLength(d,e.maximumRadius)),f=p;if(f.minDistance=P,f.ellipsoid=e,y){for(var A=0,C=0;C<m-1;C++)A+=n.PolylinePipeline.numberOfPoints(o[C],o[C+1],P)+1;var w=new Float64Array(3*A),b=new Float64Array(3*A),M=h,E=g;f.positions=M,f.height=E;var F=0;for(C=0;C<m-1;C++){M[0]=o[C],M[1]=o[C+1],E[0]=u[C],E[1]=u[C+1];var H=n.PolylinePipeline.generateArc(f);w.set(H,F),E[0]=c[C],E[1]=c[C+1],b.set(n.PolylinePipeline.generateArc(f),F),F+=H.length}}else f.positions=o,f.height=u,w=new Float64Array(n.PolylinePipeline.generateArc(f)),f.height=c,b=new Float64Array(n.PolylinePipeline.generateArc(f));return{bottomPositions:b,topPositions:w,numCorners:v}}},e.WallGeometryLibrary=o}));