!/**
 * Highmaps JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/tilemap
 * @requires highcharts
 * @requires highcharts/modules/map
 *
 * Tilemap module
 *
 * (c) 2010-2026 Highsoft AS
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.Color):"function"==typeof define&&define.amd?define("highcharts/modules/tilemap",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry,t.Color)}):"object"==typeof exports?exports["highcharts/modules/tilemap"]=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.Color):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry,t.Highcharts.Color)}("u"<typeof window?this:window,function(t,e,o){return function(){"use strict";var n,r,i,a={512:function(t){t.exports=e},620:function(t){t.exports=o},944:function(e){e.exports=t}},s={};function l(t){var e=s[t];if(void 0!==e)return e.exports;var o=s[t]={exports:{}};return a[t](o,o.exports,l),o.exports}l.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return l.d(e,{a:e}),e},l.d=function(t,e){for(var o in e)l.o(e,o)&&!l.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var p={};l.d(p,{default:function(){return X}});var h=l(944),c=l.n(h),d=l(512),u=l.n(d),f=l(620),y=l.n(f)().parse;!function(t){var e;function o(){var t=this,o=this.userOptions;this.colorAxis=[],o.colorAxis&&(o.colorAxis=(0,h.splat)(o.colorAxis),o.colorAxis.map(function(o){return new e(t,o)}))}function n(t){var e,o,n=this,r=this.chart.colorAxis||[],i=function(e){var o=t.allItems.indexOf(e);-1!==o&&(n.destroyItem(t.allItems[o]),t.allItems.splice(o,1))},a=[];for(r.forEach(function(t){(null==(e=t.options)?void 0:e.showInLegend)&&(e.dataClasses&&e.visible?a=a.concat(t.getDataClassLegendSymbols()):e.visible&&a.push(t),t.series.forEach(function(t){(!t.options.showInLegend||e.dataClasses)&&("point"===t.options.legendType?t.points.forEach(function(t){i(t)}):i(t))}))}),o=a.length;o--;)t.allItems.unshift(a[o])}function r(t){t.visible&&t.item.legendColor&&t.item.legendItem.symbol.attr({fill:t.item.legendColor})}function i(t){var e;null==(e=this.chart.colorAxis)||e.forEach(function(e){e.update({},t.redraw)})}function a(){var t;((null==(t=this.chart.colorAxis)?void 0:t.length)||this.colorAttribs)&&this.translateColors()}function s(){var t=this.axisTypes;t?-1===t.indexOf("colorAxis")&&t.push("colorAxis"):this.axisTypes=["colorAxis"]}function l(t){var e=this,o=t?"show":"hide";e.visible=e.options.visible=!!t,["graphic","dataLabel"].forEach(function(t){e[t]&&e[t][o]()}),this.series.buildKDTree()}function p(){var t=this,e=this.getPointsCollection(),o=this.options.nullColor,n=this.colorAxis,r=this.colorKey;e.forEach(function(e){var i=e.getNestedProperty(r),a=e.options.color||(e.isNull||null===e.value?o:n&&void 0!==i?n.toColor(i,e):e.color||t.color);a&&e.color!==a&&(e.color=a,"point"===t.options.legendType&&e.legendItem&&e.legendItem.label&&t.chart.legend.colorizeItem(e,e.visible))})}function c(){this.elem.attr("fill",y(this.start).tweenTo(y(this.end),this.pos),void 0,!0)}function d(){this.elem.attr("stroke",y(this.start).tweenTo(y(this.end),this.pos),void 0,!0)}t.compose=function(t,u,f,y,g){var x,v,m=u.prototype,b=f.prototype,A=g.prototype;m.collectionsWithUpdate.includes("colorAxis")||(e=t,m.collectionsWithUpdate.push("colorAxis"),m.collectionsWithInit.colorAxis=[m.addColorAxis],(0,h.addEvent)(u,"afterCreateAxes",o),v=(x=u).prototype.createAxis,x.prototype.createAxis=function(t,o){if("colorAxis"!==t)return v.apply(this,arguments);var n=new e(this,(0,h.merge)(o.axis,{index:this[t].length,isX:!1}));return this.isDirtyLegend=!0,this.axes.forEach(function(t){t.series=[]}),this.series.forEach(function(t){t.bindAxes(),t.isDirtyData=!0}),(0,h.pick)(o.redraw,!0)&&this.redraw(o.animation),n},b.fillSetter=c,b.strokeSetter=d,(0,h.addEvent)(y,"afterGetAllItems",n),(0,h.addEvent)(y,"afterColorizeItem",r),(0,h.addEvent)(y,"afterUpdate",i),(0,h.extend)(A,{optionalAxis:"colorAxis",translateColors:p}),(0,h.extend)(A.pointClass.prototype,{setVisible:l}),(0,h.addEvent)(g,"afterTranslate",a,{order:1}),(0,h.addEvent)(g,"bindAxes",s))},t.pointSetVisible=l}(i||(i={}));var g=i,x=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),v=u().series.prototype.pointClass,m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.haloPath=function(){return this.series.tileShape.haloPath.apply(this,arguments)},e}(u().seriesTypes.heatmap.prototype.pointClass);(0,h.extend)(m.prototype,{setState:v.prototype.setState,setVisible:g.pointSetVisible});var b={marker:null,states:{hover:{halo:{enabled:!0,size:2,opacity:.5,attributes:{zIndex:3}}}},pointPadding:2,tileShape:"hexagon"},A=c().noop,P=u().seriesTypes,M=P.heatmap,L=P.scatter;function S(t,e,o){var n=t.options;return{xPad:-((n.colsize||1)/e),yPad:-((n.rowsize||1)/o)}}var C={hexagon:{alignDataLabel:L.prototype.alignDataLabel,getSeriesPadding:function(t){return S(t,3,2)},haloPath:function(t){if(!t)return[];var e=this.tileEdges;return[["M",e.x2-t,e.y1+t],["L",e.x3+t,e.y1+t],["L",e.x4+1.5*t,e.y2],["L",e.x3+t,e.y3-t],["L",e.x2-t,e.y3-t],["L",e.x1-1.5*t,e.y2],["Z"]]},translate:function(){var t,e,o=this.options,n=this.xAxis,r=this.yAxis,i=o.pointPadding||0,a=(o.colsize||1)/3,s=(o.rowsize||1)/2;this.generatePoints();for(var l=0,p=this.points;l<p.length;l++){var c=p[l],d=(0,h.clamp)(Math.floor(n.len-n.translate(c.x-2*a,0,1,0,1)),-n.len,2*n.len),u=(0,h.clamp)(Math.floor(n.len-n.translate(c.x-a,0,1,0,1)),-n.len,2*n.len),f=(0,h.clamp)(Math.floor(n.len-n.translate(c.x+a,0,1,0,1)),-n.len,2*n.len),y=(0,h.clamp)(Math.floor(n.len-n.translate(c.x+2*a,0,1,0,1)),-n.len,2*n.len),g=(0,h.clamp)(Math.floor(r.translate(c.y-s,0,1,0,1)),-r.len,2*r.len),x=(0,h.clamp)(Math.floor(r.translate(c.y,0,1,0,1)),-r.len,2*r.len),v=(0,h.clamp)(Math.floor(r.translate(c.y+s,0,1,0,1)),-r.len,2*r.len),m=null!=(t=c.pointPadding)?t:i,b=m*Math.abs(u-d)/Math.abs(v-x),A=n.reversed?-b:b,P=n.reversed?-m:m,M=r.reversed?-m:m;c.x%2&&(e=e||Math.round(Math.abs(v-g)/2)*(r.reversed?-1:1),g+=e,x+=e,v+=e),c.plotX=c.clientX=(u+f)/2,c.plotY=x,c.tileEdges={x1:d+=A+P,x2:u+=P,x3:f-=P,x4:y-=A+P,y1:g-=M,y2:x,y3:v+=M},c.shapeType="path",c.shapeArgs={d:[["M",u,g],["L",f,g],["L",y,x],["L",f,v],["L",u,v],["L",d,x],["Z"]]}}this.translateColors()}},diamond:{alignDataLabel:L.prototype.alignDataLabel,getSeriesPadding:function(t){return S(t,2,2)},haloPath:function(t){if(!t)return[];var e=this.tileEdges;return[["M",e.x2,e.y1+t],["L",e.x3+t,e.y2],["L",e.x2,e.y3-t],["L",e.x1-t,e.y2],["Z"]]},translate:function(){var t,e=this.options,o=this.xAxis,n=this.yAxis,r=e.pointPadding||0,i=e.colsize||1,a=(e.rowsize||1)/2;this.generatePoints();for(var s=0,l=this.points;s<l.length;s++){var p=l[s],c=(0,h.clamp)(Math.round(o.len-o.translate(p.x-i,0,1,0,0)),-o.len,2*o.len),d=(0,h.clamp)(Math.round(o.len-o.translate(p.x+i,0,1,0,0)),-o.len,2*o.len),u=(0,h.clamp)(Math.round(n.translate(p.y-a,0,1,0,0)),-n.len,2*n.len),f=(0,h.clamp)(Math.round(n.translate(p.y,0,1,0,0)),-n.len,2*n.len),y=(0,h.clamp)(Math.round(n.translate(p.y+a,0,1,0,0)),-n.len,2*n.len),g=(0,h.clamp)(Math.round(o.len-o.translate(p.x,0,1,0,0)),-o.len,2*o.len),x=(0,h.pick)(p.pointPadding,r),v=x*Math.abs(g-c)/Math.abs(y-f),m=o.reversed?-v:v,b=n.reversed?-x:x;p.x%2&&(t=Math.abs(y-u)/2*(n.reversed?-1:1),u+=t,f+=t,y+=t),p.plotX=p.clientX=g,p.plotY=f,p.tileEdges={x1:c+=m,x2:g,x3:d-=m,y1:u-=b,y2:f,y3:y+=b},p.shapeType="path",p.shapeArgs={d:[["M",g,u],["L",d,f],["L",g,y],["L",c,f],["Z"]]}}this.translateColors()}},circle:{alignDataLabel:L.prototype.alignDataLabel,getSeriesPadding:function(t){return S(t,2,2)},haloPath:function(t){return L.prototype.pointClass.prototype.haloPath.call(this,t+(t&&this.radius))},translate:function(){var t,e,o,n,r=this.options,i=this.xAxis,a=this.yAxis,s=r.pointPadding||0,l=(r.rowsize||1)/2,p=r.colsize||1,c=!1;this.generatePoints();for(var d=0,u=this.points;d<u.length;d++){var f=u[d],y=(0,h.clamp)(Math.round(i.len-i.translate(f.x,0,1,0,0)),-i.len,2*i.len),g=s,x=!1,v=(0,h.clamp)(Math.round(a.translate(f.y,0,1,0,0)),-a.len,2*a.len);void 0!==f.pointPadding&&(g=f.pointPadding,x=!0,c=!0),(!n||c)&&(o=Math.floor(Math.sqrt((t=Math.abs((0,h.clamp)(Math.floor(i.len-i.translate(f.x+p,0,1,0,0)),-i.len,2*i.len)-y))*t+(e=Math.abs((0,h.clamp)(Math.floor(a.translate(f.y+l,0,1,0,0)),-a.len,2*a.len)-v))*e)/2),n=Math.min(t,o,e)-g,c&&!x&&(c=!1)),f.x%2&&(v+=e*(a.reversed?-1:1)),f.plotX=f.clientX=y,f.plotY=v,f.radius=n,f.shapeType="circle",f.shapeArgs={x:y,y:v,r:n}}this.translateColors()}},square:{alignDataLabel:M.prototype.alignDataLabel,translate:M.prototype.translate,getSeriesPadding:A,haloPath:M.prototype.pointClass.prototype.haloPath}},w=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=c().composed,T=c().noop,E=u().seriesTypes,O=E.column,D=E.heatmap,I=E.scatter;function z(){if(!this.recomputingForTilemap&&"colorAxis"!==this.coll){var t=this,e=t.series.map(function(e){return e.getSeriesPixelPadding&&e.getSeriesPixelPadding(t)}).reduce(function(t,e){return(t&&t.padding)>(e&&e.padding)?t:e},void 0)||{padding:0,axisLengthFactor:1},o=Math.round(e.padding*e.axisLengthFactor);e.padding&&(t.len-=o,t.recomputingForTilemap=!0,t.setAxisTranslation(),delete t.recomputingForTilemap,t.minPixelPadding+=e.padding,t.len+=o)}}var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.compose=function(t){(0,h.pushUnique)(_,"TilemapSeries")&&(0,h.addEvent)(t,"afterSetAxisTranslation",z)},e.prototype.alignDataLabel=function(){return this.tileShape.alignDataLabel.apply(this,arguments)},e.prototype.drawPoints=function(){O.prototype.drawPoints.call(this);for(var t=0,e=this.points;t<e.length;t++){var o=e[t];o.graphic&&o.graphic[this.chart.styledMode?"css":"animate"](this.colorAttribs(o))}},e.prototype.getSeriesPixelPadding=function(t){var e=t.isXAxis,o=this.tileShape.getSeriesPadding(this);if(!o)return{padding:0,axisLengthFactor:1};var n=Math.round(t.translate(e?2*o.xPad:o.yPad,0,1,0,1)),r=Math.round(t.translate(e?o.xPad:0,0,1,0,1));return{padding:(t.single?Math.abs(n-r)/2:Math.abs(n-r))||0,axisLengthFactor:e?2:1.1}},e.prototype.setOptions=function(){var e=t.prototype.setOptions.apply(this,arguments);return this.tileShape=C[e.tileShape],e},e.prototype.translate=function(){return this.tileShape.translate.apply(this,arguments)},e.defaultOptions=(0,h.merge)(D.defaultOptions,b),e}(D);(0,h.extend)(j.prototype,{getSymbol:T,markerAttribs:I.prototype.markerAttribs,pointAttribs:O.prototype.pointAttribs,pointClass:m}),u().registerSeriesType("tilemap",j);var H=c();j.compose(H.Axis);var X=c();return p.default}()});