!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","../../Validation","./MapProvider","../../Hooks","./tools"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("tslib"),u=e("../../Validation"),o=e("./MapProvider"),i=e("../../Hooks"),p=e("./tools"),o=(r.prototype.execute=function(t,e,o){var i=u.validation.array("geometry",t.geometry,[]),r=p.featuresToArray(t.features),i=a.__spreadArrays(i,r.map(function(e){return e.geometry})),n=o.create();return p.inline(n.load(),function(){var e=n.getViewpoint();n.getScale();return n.setViewpoint(i,t.viewpoint).then(function(){return{oldViewpoint:e,newViewpoint:n.getViewpoint()}})})},r.action="gcx:wf:arcgis::SetViewpoint",r.suite="gcx:wf:builtin",a.__decorate([i.activate(o.MapProvider)],r));function r(){}t.SetViewpoint=o});