// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../chunks/tslib.es6 ../Color ../symbols ../core/deprecate ../core/lang ../core/Logger ../core/scheduling ../core/screenUtils ../core/accessorSupport/decorators/property ../core/has ../core/accessorSupport/utils ../core/accessorSupport/decorators/enumeration ../core/accessorSupport/decorators/subclass ../layers/support/fieldUtils ./Renderer ./support/AuthoringInfo ./support/HeatmapColorStop ./support/HeatmapLegendOptions ./support/heatmapUtils ../symbols/SimpleMarkerSymbol".split(" "),function(c, k,b,r,n,t,u,v,d,E,w,x,y,p,z,A,h,B,l,C){function q(a){if(null!=a){const {maxDensity:e,minDensity:f,radius:g}=a;if(null!=e||null!=f||null!=g){const {blurRadius:F,maxPixelIntensity:G,minPixelIntensity:H,...D}=a;return D}}return a}var m;b=m=class extends z{constructor(a){super(a);this.authoringInfo=null;this.colorStops=[new h({ratio:0,color:new k("rgba(255, 140, 0, 0)")}),new h({ratio:.75,color:new k("rgba(255, 140, 0, 1)")}),new h({ratio:.9,color:new k("rgba(255, 0, 0, 1)")})];this.legendOptions=this.field= null;this.maxDensity=.04;this.minDensity=0;this.radius=18;this.referenceScale=0;this.type="heatmap";this.valueExpressionTitle=this.valueExpression=null;this._warnedProps={blurRadius:!1,maxPixelIntensity:!1,minPixelIntensity:!1}}normalizeCtorArgs(a){return q(a)}get blurRadius(){return l.kernelDensityRadiusPtToGaussianBlurRadiusPx(this.radius)}set blurRadius(a){const e=this.maxPixelIntensity,f=this.minPixelIntensity;this._set("radius",l.gaussianBlurRadiusPxToKernelDensityRadiusPt(a));this._warnAboutDeprecatedGaussianBlurProp("blurRadius", "radius");this._set("maxDensity",e*this._pixelIntensityToDensity);this._set("minDensity",f*this._pixelIntensityToDensity)}get maxPixelIntensity(){return this.maxDensity/this._pixelIntensityToDensity}set maxPixelIntensity(a){this._set("maxDensity",a*this._pixelIntensityToDensity);this._warnAboutDeprecatedGaussianBlurProp("maxPixelIntensity","maxDensity")}get minPixelIntensity(){return this.minDensity/this._pixelIntensityToDensity}set minPixelIntensity(a){this._set("minDensity",a*this._pixelIntensityToDensity); this._warnAboutDeprecatedGaussianBlurProp("minPixelIntensity","minDensity")}get _pixelIntensityToDensity(){return 24/(l.magicKernelDensityRadiusInflationFactor**2*this.blurRadius**4)}_warnAboutDeprecatedGaussianBlurProp(a,e){this._warnedProps[a]||"user"!==w.getProperties(this).getDefaultOrigin()||(this._warnedProps[a]=!0,u.schedule(()=>{r.deprecatedProperty(t.getLogger(this),a,{replacement:`${String(e)} (suggested value: ${this._get(e)})`,version:"4.24"})}))}read(a,e){a=q(a);super.read(a,e)}getSymbol(){return new C}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}async collectRequiredFields(a, e){const f=this.field,g=this.valueExpression;f&&"string"===typeof f&&p.collectField(a,e,f);g&&"string"===typeof g&&await p.collectArcadeFieldNames(a,e,g)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new m({authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),colorStops:n.clone(this.colorStops),field:this.field,legendOptions:n.clone(this.legendOptions),maxDensity:this.maxDensity,minDensity:this.minDensity, radius:this.radius,referenceScale:this.referenceScale,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};c.__decorate([d.property({type:A,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],b.prototype,"authoringInfo",void 0);c.__decorate([d.property({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],b.prototype,"blurRadius",null);c.__decorate([d.property({type:[h],json:{write:!0}})],b.prototype,"colorStops",void 0);c.__decorate([d.property({type:String, json:{write:!0}})],b.prototype,"field",void 0);c.__decorate([d.property({type:B.HeatmapLegendOptions,json:{write:!0}})],b.prototype,"legendOptions",void 0);c.__decorate([d.property({type:Number,json:{write:!0}})],b.prototype,"maxDensity",void 0);c.__decorate([d.property({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],b.prototype,"maxPixelIntensity",null);c.__decorate([d.property({type:Number,json:{write:!0}})],b.prototype,"minDensity",void 0);c.__decorate([d.property({type:Number, json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],b.prototype,"minPixelIntensity",null);c.__decorate([d.property({type:Number,cast:v.toPt,json:{write:!0}})],b.prototype,"radius",void 0);c.__decorate([d.property({type:Number,range:{min:0},json:{default:0,write:!0}})],b.prototype,"referenceScale",void 0);c.__decorate([x.enumeration({heatmap:"heatmap"})],b.prototype,"type",void 0);c.__decorate([d.property({type:String,json:{write:!0,origins:{"web-document":{write:!1},"portal-item":{write:!1}}}})], b.prototype,"valueExpression",void 0);c.__decorate([d.property({type:String})],b.prototype,"valueExpressionTitle",void 0);c.__decorate([d.property({readOnly:!0})],b.prototype,"_pixelIntensityToDensity",null);return b=m=c.__decorate([y.subclass("esri.renderers.HeatmapRenderer")],b)});