define(["require","exports","tslib","./esriDelegate!esri/tasks/support/BufferParameters","../../Validation","./tools","./MapProvider","../../Hooks","esri/tasks/GeometryService"],function(e,i,t,n,o,s,a,r,u){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),u=t.__importDefault(u);l.prototype.execute=function(e,i,t){var a=o.validation.string("url",e.url,o.validation.never),r=new n.BufferParameters;r.bufferSpatialReference=t.getOutSR(e.bufferSpatialReference),r.outSpatialReference=t.getOutSR(e.outSpatialReference),r.geometries=o.validation.array("geometry",e.geometry,[]),r.distances=o.validation.array("distance",e.distance,[]),r.geodesic=o.validation.boolean("geodesic",e.geodesic,!1),r.unit=s.toEsriUnit(e.unit),r.unionResults=o.validation.boolean("union",e.union,!1);e=new u.default(a),a=s.isAbortable(i.cancellationToken)?{signal:i.cancellationToken.signal}:void 0,a=e.buffer(r,a);return s.schedulePromiseCancellation(i,a),s.inline(a,function(e){e=Array.isArray(e)?e:[e];return{geometry:e[0],results:e}})},l.action="gcx:wf:arcgis::BufferServiceTask",l.suite="gcx:wf:builtin",a=t.__decorate([r.activate(a.MapProvider)],l);function l(){}i.BufferServiceTask=a});