/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{AComputedField as e}from"./AComputedField.js";class r extends e{constructor(e,r){super(),this._field=e,this._normalizationInfo=r}resize(e){throw new Error("Method not implemented.")}read(e,r){return this._readNormalized(e)}readWithDefault(e,r){return this._readNormalized(e)}hasArcadeDependency(e){return!1}_readNormalized(e){const r=e.readAttribute(this._field);if(null==r)return null;const{normalizationField:t,normalizationTotal:i,normalizationType:o}=this._normalizationInfo,a=e.readAttribute(t);switch(o??"esriNormalizeByField"){case"esriNormalizeByField":return a?a?r/a:void 0:null;case"esriNormalizeByLog":return Math.log(r)*Math.LOG10E;case"esriNormalizeByPercentOfTotal":return i?r/i*100:null}}}export{r as NormalizedField};
