/*
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 o,supportsCurves as r,execute as s,executeMany as a}from"../geometry/operators/gx/operatorGeodeticDensify.js";import{geodeticCurveType as n}from"../geometry/operators/support/geodeticCurveType.js";let i,p,u,c,m;function f(){return!!i&&o()}async function y(){if(!f()){const[e]=await Promise.all([import("../geometry/operators/support/apiConverter.js"),t()]);i=e.fromGeometry,p=e.fromSpatialReference,u=e.getSpatialReference,c=e.toGeometry,m=r()}}function l(t,o,r={}){const{curveType:a="geodesic",unit:m}=r;m&&(o=e(o,m,"meters"));const f=u(t);return c(s(i(t),o,p(f),n[a]),f)}function d(t,o,r={}){const{curveType:s="geodesic",unit:m}=r;m&&(o=e(o,m,"meters"));const f=t.map(i),y=u(t);return a(f,o,p(y),n[s]).map(e=>c(e,y))}const g=Object.freeze(Object.defineProperty({__proto__:null,execute:l,executeMany:d,isLoaded:f,load:y,get supportsCurves(){return m}},Symbol.toStringTag,{value:"Module"}));export{d as a,l as e,g,f as i,y as l,m as s};
