define(["exports","./Check-3917d765","./when-7b580518","./Math-87254c13"],function(e,i,l,n){"use strict";var p=n.CesiumMath.EPSILON10;e.arrayRemoveDuplicates=function(e,i,n,d){if(l.defined(e)){n=l.defaultValue(n,!1);var f=l.defined(d),t=e.length;if(t<2)return e;for(var r,u,s=e[0],a=0,h=-1,c=1;c<t;++c)i(s,r=e[c],p)?(l.defined(u)||(u=e.slice(0,c),a=c-1,h=0),f&&d.push(c)):(l.defined(u)&&(u.push(r),a=c,f&&(h=d.length)),s=r);return n&&i(e[0],e[t-1],p)&&(f&&(l.defined(u)?d.splice(h,0,a):d.push(t-1)),l.defined(u)?--u.length:u=e.slice(0,-1)),l.defined(u)?u:e}}});
