/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{getCursorBoundsXY as t}from"../../../geometry/support/boundsUtils.js";class e{static{this.instance=null}static local(){return null===e.instance&&(e.instance=new e),e.instance}execute(t,e,s){return new r(t,e,s)}}class r{constructor(t,e,r){this._inputGeometries=t,this._xFactor=void 0!==e.xScaleFactor?e.xScaleFactor:1.15,this._yFactor=void 0!==e.yScaleFactor?e.yScaleFactor:1.15}next(){const e=this._inputGeometries.next();if(e){if(1===this._xFactor&&1===this._yFactor)return e;if("esriGeometryPoint"===e.geometryType)return e;if(e.totalSize>0){const r=t(e),s=(r[2]+r[0])/2,o=(r[3]+r[1])/2;return e.reset(),this._scaleCursor(e.clone(),s,o)}}return null}_scaleCursor(t,e,r){for(;t.nextPath();)for(;t.nextPoint();)t.x=e+(t.x-e)*this._xFactor,t.y=r+(t.y-r)*this._yFactor;return t.reset(),t}}export{e as EffectScale};
