/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{m as e}from"../../chunks/vec32.js";import n from"../Point.js";import r from"./MeshGeoreferencedVertexSpace.js";import i from"./MeshLocalVertexSpace.js";function o(e){return null==e.origin}function t(e){return null!=e.origin}function c(e){return t(e.vertexSpace)}function u(e,r){if(!t(e))return null;const[i,o,c]=e.origin;return new n({x:i,y:o,z:c,spatialReference:r})}function l(e,n){const{x:o,y:t,z:c,spatialReference:u}=e,l=[o,t,c??0];return"local"===(n?.vertexSpace??f(u))?new i({origin:l}):new r({origin:l})}function f(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function a(n,r){return n.type===r.type&&(n.origin===r.origin||null!=n.origin&&null!=r.origin&&e(n.origin,r.origin))}export{o as isAbsoluteVertexSpace,c as isMeshWithRelativeVertexSpace,t as isRelativeVertexSpace,l as selectVertexSpace,a as vertexSpaceEquals,u as vertexSpaceOriginToPoint};
