define(["exports","./arrayFill-0358accf","./buildModuleUrl-3d15f25c","./Cartographic-67e73ef9","./ComponentDatatype-81047f82","./when-92c6cf3c","./Check-52a7d806","./Rectangle-bab7abf0","./GeometryAttribute-ef657318","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-4c0e98b8","./Math-92c3b5f7","./PrimitiveType-cdfe443e"],(function(t,i,e,o,n,r,a,s,m,u,f,c,d,l){"use strict";var _=new o.t(1,1,1),h=Math.cos,p=Math.sin;function b(t){t=r.u(t,r.u.EMPTY_OBJECT);var i=r.u(t.radii,_),e=r.u(t.innerRadii,i),n=r.u(t.minimumClock,0),s=r.u(t.maximumClock,d.e.TWO_PI),m=r.u(t.minimumCone,0),u=r.u(t.maximumCone,d.e.PI),c=Math.round(r.u(t.stackPartitions,10)),l=Math.round(r.u(t.slicePartitions,8)),h=Math.round(r.u(t.subdivisions,128));if(c<1)throw new a.t("options.stackPartitions cannot be less than 1");if(l<0)throw new a.t("options.slicePartitions cannot be less than 0");if(h<0)throw new a.t("options.subdivisions must be greater than or equal to zero.");if(r.e(t.offsetAttribute)&&t.offsetAttribute===f.z.TOP)throw new a.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=o.t.clone(i),this._innerRadii=o.t.clone(e),this._minimumClock=n,this._maximumClock=s,this._minimumCone=m,this._maximumCone=u,this._stackPartitions=c,this._slicePartitions=l,this._subdivisions=h,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}b.packedLength=2*o.t.packedLength+8,b.pack=function(t,i,e){if(!r.e(t))throw new a.t("value is required");if(!r.e(i))throw new a.t("array is required");return e=r.u(e,0),o.t.pack(t._radii,i,e),e+=o.t.packedLength,o.t.pack(t._innerRadii,i,e),e+=o.t.packedLength,i[e++]=t._minimumClock,i[e++]=t._maximumClock,i[e++]=t._minimumCone,i[e++]=t._maximumCone,i[e++]=t._stackPartitions,i[e++]=t._slicePartitions,i[e++]=t._subdivisions,i[e]=r.u(t._offsetAttribute,-1),i};var v=new o.t,k=new o.t,y={radii:v,innerRadii:k,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};b.unpack=function(t,i,e){if(!r.e(t))throw new a.t("array is required");i=r.u(i,0);var n=o.t.unpack(t,i,v);i+=o.t.packedLength;var s=o.t.unpack(t,i,k);i+=o.t.packedLength;var m=t[i++],u=t[i++],f=t[i++],c=t[i++],d=t[i++],l=t[i++],_=t[i++],h=t[i];return r.e(e)?(e._radii=o.t.clone(n,e._radii),e._innerRadii=o.t.clone(s,e._innerRadii),e._minimumClock=m,e._maximumClock=u,e._minimumCone=f,e._maximumCone=c,e._stackPartitions=d,e._slicePartitions=l,e._subdivisions=_,e._offsetAttribute=-1===h?void 0:h,e):(y.minimumClock=m,y.maximumClock=u,y.minimumCone=f,y.maximumCone=c,y.stackPartitions=d,y.slicePartitions=l,y.subdivisions=_,y.offsetAttribute=-1===h?void 0:h,new b(y))},b.createGeometry=function(t){var o=t._radii;if(!(o.x<=0||o.y<=0||o.z<=0)){var a=t._innerRadii;if(!(a.x<=0||a.y<=0||a.z<=0)){var _=t._minimumClock,b=t._maximumClock,v=t._minimumCone,k=t._maximumCone,y=t._subdivisions,C=s.t.fromCartesian3(o),w=t._slicePartitions+1,x=t._stackPartitions+1;(w=Math.round(w*Math.abs(b-_)/d.e.TWO_PI))<2&&(w=2),(x=Math.round(x*Math.abs(k-v)/d.e.PI))<2&&(x=2);var P=0,A=1,g=a.x!==o.x||a.y!==o.y||a.z!==o.z,M=!1,z=!1;g&&(A=2,v>0&&(M=!0,P+=w),k