/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.24/esri/copyright.txt for details. */ import{version as n}from"../../kernel.js";import{cloneGeometry as e,convertSquareUnitsToCode as r,convertLinearUnitsToCode as t}from"../kernel.js";import{H as l,p as i,j as o,h as u,l as f,n as a,A as s,K as c,C as g,J as m,L as h,f as w,g as p}from"../../chunks/languageUtils.js";import{centroidPolyline as A,centroidMultiPoint as E,getMetersPerVerticalUnitForSR as I,segmentLength3d as y}from"./centroid.js";import d from"../../geometry/Extent.js";import R from"../../geometry/Geometry.js";import x from"../../geometry/Multipoint.js";import N from"../../geometry/Point.js";import j from"../../geometry/Polygon.js";import L from"../../geometry/Polyline.js";import{fromJSON as k}from"../../geometry/support/jsonUtils.js";import{getMetersPerUnitForSR as M}from"../../core/unitUtils.js";let P=null;function Z(e){return 0===n.indexOf("4.")?j.fromExtent(e):new j({spatialReference:e.spatialReference,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}function b(n){P=n}function v(n,e){if("polygon"!==n.type&&"polyline"!==n.type&&"extent"!==n.type)return 0;let r=1;if(n.spatialReference.vcsWkid||n.spatialReference.latestVcsWkid){r=I(n.spatialReference)/M(n.spatialReference)}let t=0;if("polyline"===n.type)for(const i of n.paths)for(let n=1;n