!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","../../Validation","./tools","./MapProvider","../../Hooks","esri/tasks/Geoprocessor"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("tslib"),a=e("../../Validation"),i=e("./tools"),r=e("./MapProvider"),s=e("../../Hooks"),n=o.__importDefault(e("esri/tasks/Geoprocessor")),r=(l.prototype.execute=function(e,t,o){var r=a.validation.string("url",e.url,a.validation.never),r=new n.default(r);r.outSpatialReference=o.getOutSR(e.outSpatialReference),r.processSpatialReference=o.getOutSR(e.processSpatialReference);o=a.validation.exists("arguments",e.arguments,{}),e=i.isAbortable(t.cancellationToken)?{signal:t.cancellationToken.signal}:void 0,e=r.execute(o,e);return i.schedulePromiseCancellation(t,e),i.inline(e,function(e){for(var t={},o=0,r=Array.isArray(e)?e:e.results;o<r.length;o++){var a=r[o];t[a.paramName]=a.value}return{messages:Array.isArray(e)?[]:e.messages,results:t}})},l.action="gcx:wf:arcgis::Geoprocessing",l.suite="gcx:wf:builtin",o.__decorate([s.activate(r.MapProvider)],l));function l(){}t.Geoprocessing=r});