/*
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 t}from"tslib";import{property as r,subclass as s}from"../../../core/accessorSupport/decorators.js";import{isTimeOnlyField as e}from"../../../layers/support/fieldUtils.js";import{isAnyDateField as a}from"../utils.js";import o from"./InMemoryLayerAdapter.js";import{getSummaryStatsQuery as i,getSummaryStatisticsFromFeatureSet as p}from"./support/utils.js";import{processSummaryStatisticsResult as m}from"../../../statistics/utils.js";let u=class extends o{constructor(){super(...arguments),this.adapterName="stream-layer-adapter"}async _summaryStatsFromClientQuery(t,r){const{signal:s,view:o}=t,u=i(this,t,r);u.outStatistics=u.outStatistics?.filter(t=>"totalcount_value"!==t.outStatisticFieldName);const l=await this._fetchFeatureSetFromMemory(u,o,s),c=p(l,a(r)||e(r));return m(c,t.outStatisticTypes)}};t([r({readOnly:!0})],u.prototype,"adapterName",void 0),u=t([s("esri.smartMapping.support.adapters.StreamLayerAdapter")],u);export{u as default};
