/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as e}from"tslib";import{property as t,subclass as r}from"../../core/accessorSupport/decorators.js";import{extentContainsXYZ as n}from"../../geometry/support/contains.js";import{GroundViewElevationSampler as i}from"./GroundViewElevationSampler.js";let l=class extends i{get demResolution(){return this.view.basemapTerrain.demResolution}get extent(){return this.view.map.allLayers.reduce((e,t)=>"integrated-mesh"!==t.type&&"integrated-mesh-3dtiles"!==t.type||!t.fullExtent?e:e?e.union(t.fullExtent):t.fullExtent.clone(),null)}get spatialReference(){return this.view.spatialReference}elevationAt(e,t){return null!=this.extent&&n(this.extent,e,t)?this.view.elevationProvider.getElevation(e,t,0,this.spatialReference,"im")??this.noDataValue:this.noDataValue}};e([t({readOnly:!0})],l.prototype,"demResolution",null),e([t({readOnly:!0})],l.prototype,"extent",null),e([t()],l.prototype,"spatialReference",null),l=e([r("esri.views.support.IntegratedMeshElevationSampler")],l);export{l as IntegratedMeshElevationSampler};
