// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define(["exports"],function(v){class c{static local(){null===c.instance&&(c.instance=new c);return c.instance}execute(a,b,e,n,p){return new y(a,b,e)}}c.instance=null;class y{constructor(a,b,e){this._inputGeometries=a;this._angleTolerance=void 0!==b.angleTolerance?b.angleTolerance:120;this._maxCosAngle=Math.cos((1-Math.abs(this._angleTolerance)/180)*Math.PI)}next(){let a=this._inputGeometries.next();for(;a;){if("esriGeometryPolygon"===a.geometryType)this._isClosed=!0;else if("esriGeometryPolyline"=== a.geometryType)this._isClosed=!1;else if("esriGeometryEnvelope"===a.geometryType){if(this._maxCosAngle)return a;this._isClosed=!0}else{a=this._inputGeometries.next();continue}for(;a.nextPath();)this._processPath(a);a.reset();return a}return null}_processPath(a){if(a.nextPoint()){const b=a.x,e=a.y;let n=b,p=e,q=a.pathSize,r=0,t=0,f=0,w=0,x=0,u=0;this._isClosed&&++q;for(let d=1;a.nextPoint()||d