/*
 Highmaps JS v9.1.1 (2021-06-03)

 (c) 2009-2021 Torstein Honsi

 License: www.highcharts.com/license
*/
'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/heatmap",["highcharts"],function(u){a(u);a.Highcharts=u;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function u(a,c,l,r){a.hasOwnProperty(c)||(a[c]=r.apply(null,l))}a=a?a._modules:{};u(a,"Mixins/ColorSeries.js",[],function(){return{colorPointMixin:{setVisible:function(a){var c=this,l=a?"show":"hide";
c.visible=c.options.visible=!!a;["graphic","dataLabel"].forEach(function(a){if(c[a])c[a][l]()});this.series.buildKDTree()}},colorSeriesMixin:{optionalAxis:"colorAxis",colorAxis:0,translateColors:function(){var a=this,c=this.options.nullColor,l=this.colorAxis,r=this.colorKey;(this.data.length?this.data:this.points).forEach(function(m){var n=m.getNestedProperty(r);(n=m.options.color||(m.isNull||null===m.value?c:l&&"undefined"!==typeof n?l.toColor(n,m):m.color||a.color))&&m.color!==n&&(m.color=n,"point"===
a.options.legendType&&m.legendItem&&a.chart.legend.colorizeItem(m,m.visible))})}}}});u(a,"Core/Axis/ColorAxis.js",[a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],a["Core/Color/Color.js"],a["Mixins/ColorSeries.js"],a["Core/Animation/Fx.js"],a["Core/Globals.js"],a["Core/Legend.js"],a["Mixins/LegendSymbol.js"],a["Core/Color/Palette.js"],a["Core/Series/Point.js"],a["Core/Series/Series.js"],a["Core/Utilities.js"]],function(a,c,l,r,m,n,w,H,C,h,k,A){var G=this&&this.__extends||function(){var f=function(b,
e){f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,q){e.__proto__=q}||function(e,q){for(var d in q)q.hasOwnProperty(d)&&(e[d]=q[d])};return f(b,e)};return function(b,e){function g(){this.constructor=b}f(b,e);b.prototype=null===e?Object.create(e):(g.prototype=e.prototype,new g)}}(),p=l.parse;l=r.colorPointMixin;r=r.colorSeriesMixin;var D=n.noop,v=A.addEvent,y=A.extend,t=A.isNumber,E=A.merge,B=A.pick,z=A.splat;"";y(k.prototype,r);y(h.prototype,l);c.prototype.collectionsWithUpdate.push("colorAxis");
c.prototype.collectionsWithInit.colorAxis=[c.prototype.addColorAxis];var b=function(f){function b(e,b){var g=f.call(this,e,b)||this;g.beforePadding=!1;g.chart=void 0;g.coll="colorAxis";g.dataClasses=void 0;g.legendItem=void 0;g.legendItems=void 0;g.name="";g.options=void 0;g.stops=void 0;g.visible=!0;g.init(e,b);return g}G(b,f);b.prototype.init=function(e,g){var q=e.options.legend||{},d=g.layout?"vertical"!==g.layout:"vertical"!==q.layout;q=E(b.defaultColorAxisOptions,g,{showEmpty:!1,title:null,visible:q.enabled&&
(g?!1!==g.visible:!0)});this.coll="colorAxis";this.side=g.side||d?2:1;this.reversed=g.reversed||!d;this.opposite=!d;f.prototype.init.call(this,e,q);g.dataClasses&&this.initDataClasses(g);this.initStops();this.horiz=d;this.zoomEnabled=!1};b.prototype.initDataClasses=function(e){var b=this.chart,q,d=0,f=b.options.chart.colorCount,a=this.options,h=e.dataClasses.length;this.dataClasses=q=[];this.legendItems=[];e.dataClasses.forEach(function(e,g){e=E(e);q.push(e);if(b.styledMode||!e.color)"category"===
a.dataClassColor?(b.styledMode||(g=b.options.colors,f=g.length,e.color=g[d]),e.colorIndex=d,d++,d===f&&(d=0)):e.color=p(a.minColor).tweenTo(p(a.maxColor),2>h?.5:g/(h-1))})};b.prototype.hasData=function(){return!!(this.tickPositions||[]).length};b.prototype.setTickPositions=function(){if(!this.dataClasses)return f.prototype.setTickPositions.call(this)};b.prototype.initStops=function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(e){e.color=
p(e[1])})};b.prototype.setOptions=function(e){f.prototype.setOptions.call(this,e);this.options.crosshair=this.options.marker};b.prototype.setAxisSize=function(){var e=this.legendSymbol,g=this.chart,f=g.options.legend||{},d,a;e?(this.left=f=e.attr("x"),this.top=d=e.attr("y"),this.width=a=e.attr("width"),this.height=e=e.attr("height"),this.right=g.chartWidth-f-a,this.bottom=g.chartHeight-d-e,this.len=this.horiz?a:e,this.pos=this.horiz?f:d):this.len=(this.horiz?f.symbolWidth:f.symbolHeight)||b.defaultLegendLength};
b.prototype.normalizedValue=function(e){this.logarithmic&&(e=this.logarithmic.log2lin(e));return 1-(this.max-e)/(this.max-this.min||1)};b.prototype.toColor=function(e,b){var g=this.dataClasses,d=this.stops,f;if(g)for(f=g.length;f--;){var a=g[f];var h=a.from;d=a.to;if(("undefined"===typeof h||e>=h)&&("undefined"===typeof d||e<=d)){var k=a.color;b&&(b.dataClass=f,b.colorIndex=a.colorIndex);break}}else{e=this.normalizedValue(e);for(f=d.length;f--&&!(e>d[f][0]););h=d[f]||d[f+1];d=d[f+1]||h;e=1-(d[0]-
e)/(d[0]-h[0]||1);k=h.color.tweenTo(d.color,e)}return k};b.prototype.getOffset=function(){var e=this.legendGroup,b=this.chart.axisOffset[this.side];e&&(this.axisParent=e,f.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=b)};b.prototype.setLegendColor=function(){var b=this.reversed,g=b?1:0;b=b?0:1;g=this.horiz?[g,0,b,0]:[0,b,0,g];this.legendColor={linearGradient:{x1:g[0],y1:g[1],x2:g[2],y2:g[3]},stops:this.stops}};
b.prototype.drawLegendSymbol=function(e,g){var f=e.padding,d=e.options,a=this.horiz,h=B(d.symbolWidth,a?b.defaultLegendLength:12),k=B(d.symbolHeight,a?12:b.defaultLegendLength),x=B(d.labelPadding,a?16:30);d=B(d.itemDistance,10);this.setLegendColor();g.legendSymbol=this.chart.renderer.rect(0,e.baseline-11,h,k).attr({zIndex:1}).add(g.legendGroup);this.legendItemWidth=h+f+(a?d:x);this.legendItemHeight=k+f+(a?x:0)};b.prototype.setState=function(b){this.series.forEach(function(e){e.setState(b)})};b.prototype.setVisible=
function(){};b.prototype.getSeriesExtremes=function(){var b=this.series,g=b.length,f;this.dataMin=Infinity;for(this.dataMax=-Infinity;g--;){var d=b[g];var a=d.colorKey=B(d.options.colorKey,d.colorKey,d.pointValKey,d.zoneAxis,"y");var h=d.pointArrayMap;var x=d[a+"Min"]&&d[a+"Max"];if(d[a+"Data"])var c=d[a+"Data"];else if(h){c=[];h=h.indexOf(a);var z=d.yData;if(0<=h&&z)for(f=0;f<z.length;f++)c.push(B(z[f][h],z[f]))}else c=d.yData;x?(d.minColorValue=d[a+"Min"],d.maxColorValue=d[a+"Max"]):(c=k.prototype.getExtremes.call(d,
c),d.minColorValue=c.dataMin,d.maxColorValue=c.dataMax);"undefined"!==typeof d.minColorValue&&(this.dataMin=Math.min(this.dataMin,d.minColorValue),this.dataMax=Math.max(this.dataMax,d.maxColorValue));x||k.prototype.applyExtremes.call(d)}};b.prototype.drawCrosshair=function(b,g){var e=g&&g.plotX,d=g&&g.plotY,a=this.pos,h=this.len;if(g){var k=this.toPixels(g.getNestedProperty(g.series.colorKey));k<a?k=a-2:k>a+h&&(k=a+h+2);g.plotX=k;g.plotY=this.len-k;f.prototype.drawCrosshair.call(this,b,g);g.plotX=
e;g.plotY=d;this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0,this.chart.styledMode||"object"!==typeof this.crosshair||this.cross.attr({fill:this.crosshair.color}))}};b.prototype.getPlotLinePath=function(b){var e=this.left,a=b.translatedValue,d=this.top;return t(a)?this.horiz?[["M",a-4,d-6],["L",a+4,d-6],["L",a,d],["Z"]]:[["M",e,a],["L",e-6,a+6],["L",e-6,a-6],["Z"]]:f.prototype.getPlotLinePath.call(this,
b)};b.prototype.update=function(b,g){var e=this.chart.legend;this.series.forEach(function(b){b.isDirtyData=!0});(b.dataClasses&&e.allItems||this.dataClasses)&&this.destroyItems();f.prototype.update.call(this,b,g);this.legendItem&&(this.setLegendColor(),e.colorizeItem(this,!0))};b.prototype.destroyItems=function(){var b=this.chart;this.legendItem?b.legend.destroyItem(this):this.legendItems&&this.legendItems.forEach(function(e){b.legend.destroyItem(e)});b.isDirtyLegend=!0};b.prototype.destroy=function(){this.chart.isDirtyLegend=
!0;this.destroyItems();f.prototype.destroy.apply(this,[].slice.call(arguments))};b.prototype.remove=function(b){this.destroyItems();f.prototype.remove.call(this,b)};b.prototype.getDataClassLegendSymbols=function(){var b=this,f=b.chart,a=b.legendItems,d=f.options.legend,h=d.valueDecimals,k=d.valueSuffix||"",c;a.length||b.dataClasses.forEach(function(d,e){var g=!0,q=d.from,x=d.to,z=f.numberFormatter;c="";"undefined"===typeof q?c="< ":"undefined"===typeof x&&(c="> ");"undefined"!==typeof q&&(c+=z(q,
h)+k);"undefined"!==typeof q&&"undefined"!==typeof x&&(c+=" - ");"undefined"!==typeof x&&(c+=z(x,h)+k);a.push(y({chart:f,name:c,options:{},drawLegendSymbol:H.drawRectangle,visible:!0,setState:D,isDataClass:!0,setVisible:function(){g=b.visible=!g;b.series.forEach(function(b){b.points.forEach(function(b){b.dataClass===e&&b.setVisible(g)})});f.legend.colorizeItem(this,g)}},d))});return a};b.defaultLegendLength=200;b.defaultColorAxisOptions={lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,
startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:C.neutralColor40},labels:{overflow:"justify",rotation:0},minColor:C.highlightColor10,maxColor:C.highlightColor100,tickLength:5,showInLegend:!0};b.keepProps=["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"];return b}(a);Array.prototype.push.apply(a.keepProps,b.keepProps);n.ColorAxis=b;["fill","stroke"].forEach(function(b){m.prototype[b+"Setter"]=function(){this.elem.attr(b,p(this.start).tweenTo(p(this.end),
this.pos),null,!0)}});v(c,"afterGetAxes",function(){var f=this,a=f.options;this.colorAxis=[];a.colorAxis&&(a.colorAxis=z(a.colorAxis),a.colorAxis.forEach(function(a,g){a.index=g;new b(f,a)}))});v(k,"bindAxes",function(){var b=this.axisTypes;b?-1===b.indexOf("colorAxis")&&b.push("colorAxis"):this.axisTypes=["colorAxis"]});v(w,"afterGetAllItems",function(b){var a=this,e=[],f,h,d=function(f){f=b.allItems.indexOf(f);-1!==f&&(a.destroyItem(b.allItems[f]),b.allItems.splice(f,1))};(this.chart.colorAxis||
[]).forEach(function(b){(f=b.options)&&f.showInLegend&&(f.dataClasses&&f.visible?e=e.concat(b.getDataClassLegendSymbols()):f.visible&&e.push(b),b.series.forEach(function(b){if(!b.options.showInLegend||f.dataClasses)"point"===b.options.legendType?b.points.forEach(function(b){d(b)}):d(b)}))});for(h=e.length;h--;)b.allItems.unshift(e[h])});v(w,"afterColorizeItem",function(b){b.visible&&b.item.legendColor&&b.item.legendSymbol.attr({fill:b.item.legendColor})});v(w,"afterUpdate",function(){var b=this.chart.colorAxis;
b&&b.forEach(function(b,a,f){b.update({},f)})});v(k,"afterTranslate",function(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()});return b});u(a,"Mixins/ColorMapSeries.js",[a["Core/Globals.js"],a["Core/Series/Point.js"],a["Core/Utilities.js"]],function(a,c,l){var r=l.defined;l=l.addEvent;var m=a.noop;a=a.seriesTypes;l(c,"afterSetState",function(a){this.moveToTopOnHover&&this.graphic&&this.graphic.attr({zIndex:a&&"hover"===a.state?1:0})});return{colorMapPointMixin:{dataLabelOnNull:!0,
moveToTopOnHover:!0,isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value}},colorMapSeriesMixin:{pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:m,parallelArrays:["x","y","value"],colorKey:"value",pointAttribs:a.column.prototype.pointAttribs,colorAttribs:function(a){var c={};!r(a.color)||a.state&&"normal"!==a.state||(c[this.colorProp||"fill"]=a.color);return c}}}});u(a,"Series/Heatmap/HeatmapPoint.js",
[a["Mixins/ColorMapSeries.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,c,l){var r=this&&this.__extends||function(){var a=function(c,h){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,h){a.__proto__=h}||function(a,h){for(var c in h)h.hasOwnProperty(c)&&(a[c]=h[c])};return a(c,h)};return function(c,h){function k(){this.constructor=c}a(c,h);c.prototype=null===h?Object.create(h):(k.prototype=h.prototype,new k)}}();a=a.colorMapPointMixin;var m=l.clamp,
n=l.extend,w=l.pick;c=function(a){function c(){var h=null!==a&&a.apply(this,arguments)||this;h.options=void 0;h.series=void 0;h.value=void 0;h.x=void 0;h.y=void 0;return h}r(c,a);c.prototype.applyOptions=function(h,c){h=a.prototype.applyOptions.call(this,h,c);h.formatPrefix=h.isNull||null===h.value?"null":"point";return h};c.prototype.getCellAttributes=function(){var a=this.series,c=a.options,l=(c.colsize||1)/2,r=(c.rowsize||1)/2,p=a.xAxis,n=a.yAxis,v=this.options.marker||a.options.marker;a=a.pointPlacementToXValue();
var y=w(this.pointPadding,c.pointPadding,0),t={x1:m(Math.round(p.len-(p.translate(this.x-l,!1,!0,!1,!0,-a)||0)),-p.len,2*p.len),x2:m(Math.round(p.len-(p.translate(this.x+l,!1,!0,!1,!0,-a)||0)),-p.len,2*p.len),y1:m(Math.round(n.translate(this.y-r,!1,!0,!1,!0)||0),-n.len,2*n.len),y2:m(Math.round(n.translate(this.y+r,!1,!0,!1,!0)||0),-n.len,2*n.len)};[["width","x"],["height","y"]].forEach(function(a){var h=a[0];a=a[1];var c=a+"1",b=a+"2",f=Math.abs(t[c]-t[b]),k=v&&v.lineWidth||0,e=Math.abs(t[c]+t[b])/
2;v[h]&&v[h]<f&&(t[c]=e-v[h]/2-k/2,t[b]=e+v[h]/2+k/2);y&&("y"===a&&(c=b,b=a+"1"),t[c]+=y,t[b]-=y)});return t};c.prototype.haloPath=function(a){if(!a)return[];var c=this.shapeArgs;return["M",c.x-a,c.y-a,"L",c.x-a,c.y+c.height+a,c.x+c.width+a,c.y+c.height+a,c.x+c.width+a,c.y-a,"Z"]};c.prototype.isValid=function(){return Infinity!==this.value&&-Infinity!==this.value};return c}(c.seriesTypes.scatter.prototype.pointClass);n(c.prototype,{dataLabelOnNull:a.dataLabelOnNull,moveToTopOnHover:a.moveToTopOnHover});
return c});u(a,"Series/Heatmap/HeatmapSeries.js",[a["Core/Color/Color.js"],a["Mixins/ColorMapSeries.js"],a["Series/Heatmap/HeatmapPoint.js"],a["Mixins/LegendSymbol.js"],a["Core/Color/Palette.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Utilities.js"]],function(a,c,l,r,m,n,w,u){var C=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var f in a)a.hasOwnProperty(f)&&
(b[f]=a[f])};return a(c,b)};return function(c,b){function f(){this.constructor=c}a(c,b);c.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)}}();c=c.colorMapSeriesMixin;var h=n.series,k=n.seriesTypes,A=k.column,F=k.scatter,p=w.prototype.symbols,D=u.extend,v=u.fireEvent,y=u.isNumber,t=u.merge,E=u.pick;w=function(c){function k(){var b=null!==c&&c.apply(this,arguments)||this;b.colorAxis=void 0;b.data=void 0;b.options=void 0;b.points=void 0;b.valueMax=NaN;b.valueMin=NaN;return b}C(k,
c);k.prototype.drawPoints=function(){var b=this;if((this.options.marker||{}).enabled||this._hasPointMarkers)h.prototype.drawPoints.call(this),this.points.forEach(function(a){a.graphic&&(a.graphic[b.chart.styledMode?"css":"animate"](b.colorAttribs(a)),b.options.borderRadius&&a.graphic.attr({r:b.options.borderRadius}),null===a.value&&a.graphic.addClass("highcharts-null-point"))})};k.prototype.getExtremes=function(){var b=h.prototype.getExtremes.call(this,this.valueData),a=b.dataMin;b=b.dataMax;y(a)&&
(this.valueMin=a);y(b)&&(this.valueMax=b);return h.prototype.getExtremes.call(this)};k.prototype.getValidPoints=function(b,a){return h.prototype.getValidPoints.call(this,b,a,!0)};k.prototype.hasData=function(){return!!this.processedXData.length};k.prototype.init=function(){h.prototype.init.apply(this,arguments);var b=this.options;b.pointRange=E(b.pointRange,b.colsize||1);this.yAxis.axisPointRange=b.rowsize||1;p.ellipse=p.circle};k.prototype.markerAttribs=function(b,a){var c=b.marker||{},e=this.options.marker||
{},f=b.shapeArgs||{},h={};if(b.hasImage)return{x:b.plotX,y:b.plotY};if(a){var d=e.states[a]||{};var k=c.states&&c.states[a]||{};[["width","x"],["height","y"]].forEach(function(a){h[a[0]]=(k[a[0]]||d[a[0]]||f[a[0]])+(k[a[0]+"Plus"]||d[a[0]+"Plus"]||0);h[a[1]]=f[a[1]]+(f[a[0]]-h[a[0]])/2})}return a?h:f};k.prototype.pointAttribs=function(b,c){var f=h.prototype.pointAttribs.call(this,b,c),e=this.options||{},g=this.chart.options.plotOptions||{},k=g.series||{},d=g.heatmap||{};g=e.borderColor||d.borderColor||
k.borderColor;k=e.borderWidth||d.borderWidth||k.borderWidth||f["stroke-width"];f.stroke=b&&b.marker&&b.marker.lineColor||e.marker&&e.marker.lineColor||g||this.color;f["stroke-width"]=k;c&&(b=t(e.states[c],e.marker&&e.marker.states[c],b&&b.options.states&&b.options.states[c]||{}),c=b.brightness,f.fill=b.color||a.parse(f.fill).brighten(c||0).get(),f.stroke=b.lineColor);return f};k.prototype.setClip=function(a){var b=this.chart;h.prototype.setClip.apply(this,arguments);(!1!==this.options.clip||a)&&this.markerGroup.clip((a||
this.clipBox)&&this.sharedClipKey?b.sharedClips[this.sharedClipKey]:b.clipRect)};k.prototype.translate=function(){var a=this.options,c=a.marker&&a.marker.symbol||"rect",h=p[c]?c:"rect",e=-1!==["circle","square"].indexOf(h);this.generatePoints();this.points.forEach(function(a){var b=a.getCellAttributes(),d={};d.x=Math.min(b.x1,b.x2);d.y=Math.min(b.y1,b.y2);d.width=Math.max(Math.abs(b.x2-b.x1),0);d.height=Math.max(Math.abs(b.y2-b.y1),0);var f=a.hasImage=0===(a.marker&&a.marker.symbol||c||"").indexOf("url");
if(e){var g=Math.abs(d.width-d.height);d.x=Math.min(b.x1,b.x2)+(d.width<d.height?0:g/2);d.y=Math.min(b.y1,b.y2)+(d.width<d.height?g/2:0);d.width=d.height=Math.min(d.width,d.height)}g={plotX:(b.x1+b.x2)/2,plotY:(b.y1+b.y2)/2,clientX:(b.x1+b.x2)/2,shapeType:"path",shapeArgs:t(!0,d,{d:p[h](d.x,d.y,d.width,d.height)})};f&&(a.marker={width:d.width,height:d.height});D(a,g)});v(this,"afterTranslate")};k.defaultOptions=t(F.defaultOptions,{animation:!1,borderRadius:0,borderWidth:0,nullColor:m.neutralColor3,
dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},marker:{symbol:"rect",radius:0,lineColor:void 0,states:{hover:{lineWidthPlus:0},select:{}}},clip:!0,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}<br/>"},states:{hover:{halo:!1,brightness:.2}}});return k}(F);D(w.prototype,{alignDataLabel:A.prototype.alignDataLabel,axisTypes:c.axisTypes,colorAttribs:c.colorAttribs,colorKey:c.colorKey,directTouch:!0,drawLegendSymbol:r.drawRectangle,
getExtremesFromAll:!0,getSymbol:h.prototype.getSymbol,parallelArrays:c.parallelArrays,pointArrayMap:["y","value"],pointClass:l,trackerGroups:c.trackerGroups});n.registerSeriesType("heatmap",w);"";"";return w});u(a,"masters/modules/heatmap.src.js",[],function(){})});
//# sourceMappingURL=heatmap.js.map