/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{convertFromFeatures as e,convertFromFeatureSet as t}from"../../../../../layers/graphics/featureConversionUtils.js";import r from"../../../../../layers/support/FieldsIndex.js";import{FeatureSetReaderJSON as s}from"./FeatureSetReaderJSON.js";import{loadDimensionGeometry as i}from"../../../../layers/support/dimensionUtils.js";class o extends s{static fromFeatures(t,r){const{geometryType:s}=r,i=e([],t,s,!1,!1,r.featureIdInfo);for(let e=0;e<i.length;e++)i[e].displayId=t[e].displayId;return o.fromOptimizedFeatures(i,r,null)}static fromFeatureSet(e,r){const s=t(e,r.featureIdInfo);return o.fromOptimizedFeatureSet(s,r)}static fromOptimizedFeatureSet(e,t){const s=o.fromOptimizedFeatures(e.features,t,e.transform);return s._exceededTransferLimit=e.exceededTransferLimit,s._fieldsIndex=new r(e.fields),s}static fromOptimizedFeatures(e,t,r){const s=new o(e,t);return s._fieldsIndex=t.fieldsIndex,i(s._features,r,t),s}}export{o as FeatureSetReaderDimensionJSON};
