/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{convertUnit as e}from"../../core/units.js";import{execute as t,load as r,supportsCurves as o,isLoaded as s}from"./gx/operatorGeodeticDistance.js";import{geodeticCurveType as i}from"./support/geodeticCurveType.js";let a,n,p,c;function u(){return!!a&&s()}async function m(){if(!u()){const[e]=await Promise.all([import("./support/apiConverter.js"),r()]);a=e.fromGeometry,n=e.fromSpatialReference,p=e.getSpatialReference,c=o()}}function f(r,o,s={}){const{curveType:c="geodesic",unit:u}=s,m=p(r);let f=t(a(r),a(o),n(m),i[c]);return f&&u&&(f=e(f,"meters",u)),f}export{f as execute,u as isLoaded,m as load,c as supportsCurves};
