!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"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("tslib"),p=e("../../Validation"),x=e("./tools"),o=e("./MapProvider"),e=e("../../Hooks"),o=(a.prototype.execute=function(e,t,i){var o=p.validation.string("url",e.url,p.validation.never),o=x.addToPath(o,"findAddressCandidates"),a=p.validation.number("timeout",e.timeout,void 0),n=p.validation.number("maxLocations",e.maxLocations,void 0),r=p.validation.exists("outFields",e.outFields,"*"),d=p.validation.exists("searchExtent",e.searchExtent,void 0),s=p.validation.exists("location",e.location,void 0),c=p.validation.number("distance",e.distance,void 0),l=e.address,u={maxLocations:n,singleLine:"string"==typeof l?l:void 0,outSR:i.getOutSR(e.outSpatialReference),outFields:r instanceof Array?r.toString():r,searchExtent:d instanceof Array?d.toString():d,location:s instanceof Array?s.toString():s,distance:c};if("object"==typeof l&&null!==l)for(var f in l){var v=l[f];"string"==typeof v&&(u[f]=v)}a=x.fetch(o,u,a,t.cancellationToken.signal);return x.schedulePromiseCancellation(t,a),x.inline(a,function(e){var t=e.candidates;return{candidate:t[0],candidates:t,spatialReference:e.spatialReference}})},a.action="gcx:wf:arcgis::Geocode",a.suite="gcx:wf:builtin",i.__decorate([e.activate(o.MapProvider)],a));function a(){}t.Geocode=o});