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