/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../core/Error","../core/maybe","../geometry/projection","../geometry/support/spatialReferenceUtils","../views/3d/terrain/TilingScheme"],(function(e,i,t,n,r,l){"use strict";function o(){return!0}function c(){return 0}function s(e,o){if(t.isNone(e))return l.getMissingTileInfoError();const c=e.lods.length-1,s=e.spatialReference,a=n.canProjectToWGS84ComparableLonLat(s)||r.isMars(s)||r.isMoon(s);if(s.isWebMercator){if(!l.TilingScheme.makeWebMercatorAuxiliarySphere(c).compatibleWith(e))return new i("tilingscheme:incompatible-global-web-mercator","The tiling scheme is not compatible with the ArcGIS Online Web Mercator tiling scheme")}else{if(!a)return new i("tilingscheme:global-unsupported-spatial-reference","The tiling scheme spatial reference is not supported in global scenes");if(!l.TilingScheme.makeGCSWithTileSize(e.spatialReference,e.size[0],c).compatibleWith(e))return e.spatialReference.isWGS84?new i("tilingscheme:incompatible-global-wgs84","The tiling scheme is not compatible with the ArcGIS Online WGS84 tiling scheme"):new i("tilingscheme:incompatible-global","The tiling scheme is not compatible with the ArcGIS Online tiling scheme")}return t.isSome(o)&&!e.spatialReference.equals(o)?new i("tilingscheme:spatial-reference-mismatch","The tiling scheme does not match the spatial reference of the global scene"):void 0}const a=Object.freeze(Object.defineProperty({__proto__:null,isInsideExtent:o,tiltToExtentEdge:c,checkIfTileInfoSupportedForViewSR:s},Symbol.toStringTag,{value:"Module"}));e.checkIfTileInfoSupportedForViewSR=s,e.isInsideExtent=o,e.terrainUtilsSpherical=a,e.tiltToExtentEdge=c}));
