define(["require","exports","../../Validation","./tools","esri/geometry/geometryEngineAsync"],function(e,i,o,a,u){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=(t.prototype.executeUsing=function(e,i,n,t,r){return e?u.geodesicBuffer(i,n,t,r):u.buffer(i,n,t,r)},t.prototype.execute=function(e){var i=o.validation.array("geometry",e.geometry,o.validation.never),n=o.validation.array("distance",e.distance,o.validation.never),t=o.validation.boolean("geodesic",e.geodesic,!1),r=o.validation.boolean("union",e.union,!1),r=this.executeUsing(t,i,n,e.unit,r);return a.inline(r,function(e){e=Array.isArray(e)?e:[e];return{geometry:e[0],results:e}})},t.action="gcx:wf:arcgis::BufferEngineTask",t.suite="gcx:wf:builtin",t);function t(){}i.BufferEngineTask=n});