/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{mars as n,moon as t,earth as r}from"./support/Ellipsoid.js";import{equals as e,isValid as i,isWKIDFromMars as c,isWKIDFromMoon as o}from"./support/spatialReferenceUtils.js";function u(n){return{wkt:`GEOCCS["Spherical geocentric",\n    DATUM["Not specified",\n      SPHEROID["Sphere",${n.radius},0]],\n    PRIMEM["Greenwich",0.0,\n      AUTHORITY["EPSG","8901"]],\n    UNIT["m",1.0],\n    AXIS["Geocentric X",OTHER],\n    AXIS["Geocentric Y",EAST],\n    AXIS["Geocentric Z",NORTH]\n  ]`}}const S=u(r),T=u(n),G=u(t),I={wkt:`GEOCCS["WGS 84",\n  DATUM["WGS_1984",\n    SPHEROID["WGS 84",${r.radius},298.257223563,\n      AUTHORITY["EPSG","7030"]],\n    AUTHORITY["EPSG","6326"]],\n  PRIMEM["Greenwich",0,\n    AUTHORITY["EPSG","8901"]],\n  UNIT["m",1.0,\n    AUTHORITY["EPSG","9001"]],\n  AXIS["Geocentric X",OTHER],\n  AXIS["Geocentric Y",OTHER],\n  AXIS["Geocentric Z",NORTH],\n  AUTHORITY["EPSG","4978"]\n]`},p=T.wkt.toUpperCase(),s=G.wkt.toUpperCase();function E(e){if(null!=e&&i(e)){const r=e.wkid,i=e.wkt2??e.wkt;if(c(r))return n;const u=i?.toUpperCase();if(i&&u===p)return n;if(o(r)||u&&u===s)return t}return r}const f=Math.cos(Math.PI/16/16);function R(e){return c(e)?n:o(e)?t:r}function A(n){return e(n,S)}function O(n){return A(n)||e(n,T)||e(n,G)}function U(n){return!(H(n)||w(n))}function H(n){return c(n?.wkid)||e(n,T)}function w(n){return o(n?.wkid)||e(n,G)}export{S as SphericalECEFSpatialReferenceLike,T as SphericalPCPFMarsLike,G as SphericalPCPFMoonLike,I as WGS84ECEFSpatialReferenceLike,E as getReferenceEllipsoid,R as getReferenceEllipsoidFromWKID,U as isEarth,H as isMars,w as isMoon,A as isSphericalECEF,O as isSphericalPCPF,f as radiusModifier};
