!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","./esriDelegate!esri/tasks/support/BufferParameters","../../Validation","./tools","./MapProvider","../../Hooks","esri/tasks/GeometryService"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("tslib"),o=e("./esriDelegate!esri/tasks/support/BufferParameters"),n=e("../../Validation"),s=e("./tools"),r=e("./MapProvider"),a=e("../../Hooks"),u=i.__importDefault(e("esri/tasks/GeometryService")),r=(l.prototype.execute=function(e,t,i){var r=n.validation.string("url",e.url,n.validation.never),a=new o.BufferParameters;a.bufferSpatialReference=i.getOutSR(e.bufferSpatialReference),a.outSpatialReference=i.getOutSR(e.outSpatialReference),a.geometries=n.validation.array("geometry",e.geometry,[]),a.distances=n.validation.array("distance",e.distance,[]),a.geodesic=n.validation.boolean("geodesic",e.geodesic,!1),a.unit=s.toEsriUnit(e.unit),a.unionResults=n.validation.boolean("union",e.union,!1);e=new u.default(r),r=s.isAbortable(t.cancellationToken)?{signal:t.cancellationToken.signal}:void 0,r=e.buffer(a,r);return s.schedulePromiseCancellation(t,r),s.inline(r,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",i.__decorate([a.activate(r.MapProvider)],l));function l(){}t.BufferServiceTask=r});