/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
class t{constructor(t,e,i,s){this._editGeometry=t,this.dx=e,this.dy=i,this.dz=s,this._firstTime=!0}apply(){const t=this._firstTime?"apply":"redo";this._firstTime=!1,this._apply(t,this.dx,this.dy,this.dz)}undo(){this._apply("undo",-this.dx,-this.dy,-this.dz)}accumulate(e){const i=this._editGeometry.geometry;return e instanceof t&&e._editGeometry.geometry===i&&(this._apply("apply",e.dx,e.dy,e.dz),this.dx+=e.dx,this.dy+=e.dy,this.dz+=e.dz,!0)}_apply(t,e,i,s){const o=this._editGeometry.geometry;o.offset(e,i,s);const d=this._editGeometry.parts[0].getFirstVertex();if(!d)return;const r=this._editGeometry.coordinateHelper;d.pos=r.pointToVector(o.origin),this._editGeometry.notifyChanges({operation:t,updatedVertices:[d]})}}export{t as MoveMesh};
