/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{convertUnit as e}from"../../core/units.js";import{load as t,isLoaded as r,supportsCurves as o,execute as s}from"./gx/operatorGeodeticDistance.js";import{geodeticCurveType as i}from"./support/geodeticCurveType.js";let a,n,p,c;function u(){return!!a&&r()}async function m(){if(!u()){const[e]=await Promise.all([import("./support/apiConverter.js"),t()]);a=e.fromGeometry,n=e.fromSpatialReference,p=e.getSpatialReference,c=o()}}function f(t,r,o={}){const{curveType:c="geodesic",unit:u}=o,m=p(t);let f=s(a(t),a(r),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};
