!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","../../Validation","./tools","esri/geometry/geometryEngineAsync"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("../../Validation"),o=e("./tools"),r=e("esri/geometry/geometryEngineAsync"),e=(n.prototype.executeUsing=function(e,t,n){return e?r.geodesicLength(t,n):r.planarLength(t,n)},n.prototype.execute=function(e){var t=i.validation.exists("geometry",e.geometry),n=i.validation.boolean("geodesic",e.geodesic,!1),e=this.executeUsing(n,t,e.unit);return o.inline(e,function(e){return{length:e}})},n.action="gcx:wf:arcgis::LengthEngineTask",n.suite="gcx:wf:builtin",n);function n(){}t.LengthEngineTask=e});