import{validation}from"../../Validation.js";import{inline}from"./tools.js";import{nearestCoordinate}from"@arcgis/core/geometry/geometryEngineAsync";class NearestCoordinateEngineTask{execute(e){var i=validation.exists("geometry",e.geometry),e=validation.exists("point",e.point),e=nearestCoordinate(i,e);return inline(e,function(e){return{point:e.coordinate,distance:e.distance,side:e.isRightSide?"right":"left",index:e.vertexIndex,empty:e.isEmpty}})}}NearestCoordinateEngineTask.action="gcx:wf:arcgis::NearestCoordinateEngineTask",NearestCoordinateEngineTask.suite="gcx:wf:builtin";export{NearestCoordinateEngineTask};