!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/marker-clusters
 * @requires highcharts
 *
 * Marker clusters module for Highcharts
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Wojciech Chmiel
 *
 * 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):"function"==typeof define&&define.amd?define("highcharts/modules/marker-clusters",["highcharts/highcharts"],function(t){return e(t)}):"object"==typeof exports?exports["highcharts/modules/marker-clusters"]=e(t._Highcharts):t.Highcharts=e(t.Highcharts)}("u"<typeof window?this:window,function(t){return function(){"use strict";var e,i={944:function(e){e.exports=t}},r={};function n(t){var e=r[t];if(void 0!==e)return e.exports;var a=r[t]={exports:{}};return i[t](a,a.exports,n),a.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var a={};n.d(a,{default:function(){return J}});var o,s=n(944),l=n.n(s),u={cluster:{enabled:!1,allowOverlap:!0,animation:{duration:500},drillToCluster:!0,minimumClusterSize:2,layoutAlgorithm:{gridSize:50,distance:40,kmeansThreshold:100},marker:{symbol:"cluster",radius:15,lineWidth:0,lineColor:"var(--highcharts-background-color)"},dataLabels:{enabled:!0,format:"{point.clusterPointsAmount}",verticalAlign:"middle",align:"center",style:{color:"contrast"},inside:!0}},tooltip:{clusterFormat:"<span>Clustered points: {point.clusterPointsAmount}</span><br/>"}},d=function(t,e,i){if(i||2==arguments.length)for(var r,n=0,a=e.length;n<a;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))},h=function(t,e,i,r,n){if(void 0===n&&(n=[]),Array.isArray(t))return Array.isArray(n)||(n=Array.from(n)),{removed:t.splice.apply(t,d([e,i],n,!1)),array:t};var a=Object.getPrototypeOf(t).constructor,o=t[r?"subarray":"slice"](e,e+i),s=new a(t.length-i+n.length);return s.set(t.subarray(0,e),0),s.set(n,e),s.set(t.subarray(e+i),e+n.length),{removed:o,array:s}},p=function(){function t(t){void 0===t&&(t={});var e=this;this.isDataTable=!0,this.autoId=!t.id,this.columns={},this.id=t.id||(0,s.uniqueKey)(),this.rowCount=0,this.versionTag=(0,s.uniqueKey)();var i=0;(0,s.objectEach)(t.columns||{},function(t,r){e.columns[r]=t.slice(),i=Math.max(i,t.length)}),this.applyRowCount(i)}return t.prototype.applyRowCount=function(t){var e=this;this.rowCount=t,(0,s.objectEach)(this.columns,function(i,r){var n,a;i.length!==t&&(e.columns[r]=(n=i,a=t,Array.isArray(n)?(n.length=a,n):n.slice(0,a)))})},t.prototype.deleteRows=function(t,e){var i=this;if(void 0===e&&(e=1),e>0&&t<this.rowCount){var r=0;(0,s.objectEach)(this.columns,function(n,a){i.columns[a]=h(n,t,e).array,r=n.length}),this.rowCount=r}(0,s.fireEvent)(this,"afterDeleteRows",{rowIndex:t,rowCount:e}),this.versionTag=(0,s.uniqueKey)()},t.prototype.getColumn=function(t,e){return this.columns[t]},t.prototype.getColumns=function(t,e){var i=this;return(t||Object.keys(this.columns)).reduce(function(t,e){return t[e]=i.columns[e],t},{})},t.prototype.getRowObject=function(t,e){var i,r={},n=this.columns;null!=e||(e=Object.keys(this.columns));for(var a=0,o=e;a<o.length;a++){var s=o[a];r[s]=null==(i=n[s])?void 0:i[t]}return r},t.prototype.setColumn=function(t,e,i,r){var n;void 0===e&&(e=[]),void 0===i&&(i=0),this.setColumns(((n={})[t]=e,n),i,r)},t.prototype.setColumns=function(t,e,i){var r=this,n=this.rowCount;(0,s.objectEach)(t,function(t,e){r.columns[e]=t.slice(),n=t.length}),this.applyRowCount(n),(null==i?void 0:i.silent)||((0,s.fireEvent)(this,"afterSetColumns"),this.versionTag=(0,s.uniqueKey)())},t.prototype.setRow=function(t,e,i,r){void 0===e&&(e=this.rowCount);var n,a=this.columns,o=i?this.rowCount+1:e+1,l=Object.keys(t);if((null==r?void 0:r.addColumns)!==!1)for(var u=0,d=l.length;u<d;u++)a[n=l[u]]||(a[n]=Array(this.rowCount));(0,s.objectEach)(a,function(r,n){r&&(i?r=h(r,e,0,!0,[t[n]]).array:r[e]=n in t?t[n]:r[e],a[n]=r)}),this.applyRowCount(Math.max(o,this.rowCount)),(null==r?void 0:r.silent)||((0,s.fireEvent)(this,"afterSetRows",{rowIndex:e}),this.versionTag=(0,s.uniqueKey)())},t.prototype.getModified=function(){return this.modified||this},t}(),c=l().animObject,f=u.cluster,m={grid:function(t,e,i,r){var n,a,o,s,l,u={},d=this.getGridOffset(),h=this.getScaledGridSize(r);for(l=0;l<t.length;l++){var p=R(this,{x:t[l],y:e[l]});n=p.x-d.plotLeft,a=p.y-d.plotTop,o=Math.floor(n/h),null!=u[s=Math.floor(a/h)+":"+o]||(u[s]=[]),u[s].push({dataIndex:i[l],x:t[l],y:e[l]})}return u},kmeans:function(t,e,i,r){var n,a,o=[],l=[],u={},d=Number(null!=(n=r.processedDistance)?n:(0,s.relativeLength)(r.distance||f.layoutAlgorithm.distance,this.chart.plotWidth)),h=r.iterations,p=0,c=!0,m=0,g=0,v=[];r.processedGridSize=d;var y=this.markerClusterAlgorithms?this.markerClusterAlgorithms.grid.call(this,t,e,i,r):{};for(var x in y)y[x].length>1&&(a=b(y[x]),o.push({posX:a.x,posY:a.y,oldX:0,oldY:0,startPointsLen:y[x].length,points:[]}));for(;c;){for(var C=0;C<o.length;C++)o[C].points.length=0;l.length=0;for(var I=0;I<t.length;I++)m=t[I],g=e[I],(v=this.getClusterDistancesFromPoint(o,m,g)).length&&v[0].distance<d?o[v[0].clusterIndex].points.push({x:m,y:g,dataIndex:i[I]}):l.push({x:m,y:g,dataIndex:i[I]});for(var I=0;I<o.length;I++)1===o[I].points.length&&(v=this.getClusterDistancesFromPoint(o,o[I].points[0].x,o[I].points[0].y))[1].distance<d&&(o[v[1].clusterIndex].points.push(o[I].points[0]),o[v[0].clusterIndex].points.length=0);c=!1;for(var I=0;I<o.length;I++)a=b(o[I].points),o[I].oldX=o[I].posX,o[I].oldY=o[I].posY,o[I].posX=a.x,o[I].posY=a.y,(o[I].posX>o[I].oldX+1||o[I].posX<o[I].oldX-1||o[I].posY>o[I].oldY+1||o[I].posY<o[I].oldY-1)&&(c=!0);h&&(c=p<h-1),p++}for(var I=0,k=o.length;I<k;++I)u["cluster"+I]=o[I].points;for(var I=0,k=l.length;I<k;++I)u["noise"+I]=[l[I]];return u},optimizedKmeans:function(t,e,i,r){var n,a,o,l,u,d,h,p=Number(null!=(n=r.processedDistance)?n:(0,s.relativeLength)(r.distance||f.layoutAlgorithm.gridSize,this.chart.plotWidth)),c=this.getRealExtremes(),m=(this.options.cluster||{}).marker,g={};if(!this.markerClusterInfo||this.initMaxX&&this.initMaxX<c.maxX||this.initMinX&&this.initMinX>c.minX||this.initMaxY&&this.initMaxY<c.maxY||this.initMinY&&this.initMinY>c.minY)this.initMaxX=c.maxX,this.initMinX=c.minX,this.initMaxY=c.maxY,this.initMinY=c.minY,g=this.markerClusterAlgorithms?this.markerClusterAlgorithms.kmeans.call(this,t,e,i,r):{},this.baseClusters=null;else{null!=this.baseClusters||(this.baseClusters={clusters:this.markerClusterInfo.clusters,noise:this.markerClusterInfo.noise});for(var v=0,y=this.baseClusters.clusters;v<y.length;v++){var x=y[v];x.pointsOutside=[],x.pointsInside=[];for(var C=0,b=x.data;C<b.length;C++){var I=b[C],k=R(this,I),M=R(this,x);h=Math.sqrt(Math.pow(k.x-M.x,2)+Math.pow(k.y-M.y,2));var S=null!=(d=null!=(u=null!=(l=null==(o=null==(a=x.clusterZone)?void 0:a.marker)?void 0:o.radius)?l:null==m?void 0:m.radius)?u:f.marker.radius)?d:0,A=p-S>=0?p-S:S;h>S+A&&(0,s.defined)(x.pointsOutside)?x.pointsOutside.push(I):(0,s.defined)(x.pointsInside)&&x.pointsInside.push(I)}x.pointsInside.length&&(g[x.id]=x.pointsInside);for(var w=0,X=0,Y=x.pointsOutside;X<Y.length;X++){var L=Y[X];g[x.id+"_noise"+w++]=[L]}}for(var P=0,O=this.baseClusters.noise;P<O.length;P++){var z=O[P];g[z.id]=z.data}}return g}},g=[],v=0;function y(t,e,i){t.attr({opacity:e}).animate({opacity:1},i)}function x(t,e,i,r){var n,a;C(t,r,i,!0,!0);for(var o=0;o<e.length;o++)null==(a=null==(n=e[o].point)?void 0:n.destroy)||a.call(n)}function C(t,e,i,r,n){t.point&&(r&&t.point.graphic&&(t.point.graphic.show(),y(t.point.graphic,e,i)),n&&t.point.dataLabel&&(t.point.dataLabel.show(),y(t.point.dataLabel,e,i)))}function b(t){for(var e=t.length,i=0,r=0,n=0;n<e;n++)i+=t[n].x,r+=t[n].y;return{x:i/e,y:r/e}}function I(t,e){var i=[];return i.length=e,t.clusters.forEach(function(t){t.data.forEach(function(t){i[t.dataIndex]=t})}),t.noise.forEach(function(t){i[t.data[0].dataIndex]=t.data[0]}),i}function k(){return Math.random().toString(36).substring(2,7)+"-"+v++}function M(t,e,i){t.point&&(e&&t.point.graphic&&t.point.graphic.hide(),i&&t.point.dataLabel&&t.point.dataLabel.hide())}function S(t){(t.point||t.target).firePointEvent("drillToCluster",t,function(t){var e,i,r,n,a=t.point||t.target,o=a.series,s=o.xAxis,l=o.yAxis,u=o.chart,d=u.inverted,h=u.mapView,p=u.pointer;if((null==(n=o.options.cluster)?void 0:n.drillToCluster)&&a.clusteredData){var c=a.clusteredData.map(function(t){return t.x}).sort(function(t,e){return t-e}),f=a.clusteredData.map(function(t){return t.y}).sort(function(t,e){return t-e}),m=c[0],g=c[c.length-1],v=f[0],y=f[f.length-1],x=Math.abs((g-m)*.1),C=Math.abs((y-v)*.1),b=Math.min(m,g)-x,I=Math.max(m,g)+x,k=Math.min(v,y)-C,M=Math.max(v,y)+C;if(h)h.fitToBounds({x1:b,x2:I,y1:k,y2:M});else if(s&&l){var S=s.toPixels(b),A=s.toPixels(I),w=l.toPixels(k),X=l.toPixels(M);d&&(S=(e=[w,X,S,A])[0],A=e[1],w=e[2],X=e[3]),S>A&&(S=(i=[A,S])[0],A=i[1]),w>X&&(w=(r=[X,w])[0],X=r[1]),p&&(p.zoomX=!0,p.zoomY=!0),u.transform({from:{x:S,y:w,width:A-S,height:X-w}})}}})}function A(t,e){var i=t.chart,r=t.xAxis,n=t.yAxis;return i.mapView?i.mapView.pixelsToProjectedUnits(e):{x:r?r.toValue(e.x):0,y:n?n.toValue(e.y):0}}function w(t){var e,i,r,n,a,o,l,u,d,h,p=this.chart,f=p.mapView,m=c(null==(e=this.options.cluster)?void 0:e.animation),g=m.duration||500,v=null==(i=this.markerClusterInfo)?void 0:i.pointsState,y=null==v?void 0:v.newState,b=null==v?void 0:v.oldState,I=[],k=0,S=0,A=0,w=!1,X=!1;if(b&&y){var Y=R(this,d=y[t.stateId]);S=Y.x-(f?0:p.plotLeft),A=Y.y-(f?0:p.plotTop),1===d.parentsId.length?(u=b[null==y?void 0:y[t.stateId].parentsId[0]],(null==(r=d.point)?void 0:r.graphic)&&(null==(n=u.point)?void 0:n.plotX)&&u.point.plotY&&(u.point.plotX!==d.point.plotX||u.point.plotY!==d.point.plotY)&&(h=d.point.graphic.getBBox(),k=(null==(a=d.point.graphic)?void 0:a.isImg)?0:h.width/2,d.point.graphic.attr({x:u.point.plotX-k,y:u.point.plotY-k}),d.point.graphic.animate({x:S-(d.point.graphic.radius||0),y:A-(d.point.graphic.radius||0)},m,function(){var t,e;X=!0,null==(e=null==(t=u.point)?void 0:t.destroy)||e.call(t)}),(null==(o=d.point.dataLabel)?void 0:o.alignAttr)&&(null==(l=u.point.dataLabel)?void 0:l.alignAttr)&&(d.point.dataLabel.attr({x:u.point.dataLabel.alignAttr.x,y:u.point.dataLabel.alignAttr.y}),d.point.dataLabel.animate({x:d.point.dataLabel.alignAttr.x,y:d.point.dataLabel.alignAttr.y},m)))):0===d.parentsId.length?(M(d,!0,!0),(0,s.syncTimeout)(function(){C(d,.1,m,!0,!0)},g/2)):(M(d,!0,!0),d.parentsId.forEach(function(t){var e,i,r;(null==b?void 0:b[t])&&(u=b[t],I.push(u),(null==(e=u.point)?void 0:e.graphic)&&(w=!0,u.point.graphic.show(),u.point.graphic.animate({x:S-(u.point.graphic.radius||0),y:A-(u.point.graphic.radius||0),opacity:.4},m,function(){X=!0,x(d,I,m,.7)}),u.point.dataLabel&&-9999!==u.point.dataLabel.y&&(null==(r=null==(i=d.point)?void 0:i.dataLabel)?void 0:r.alignAttr)&&(u.point.dataLabel.show(),u.point.dataLabel.animate({x:d.point.dataLabel.alignAttr.x,y:d.point.dataLabel.alignAttr.y,opacity:.4},m))))}),(0,s.syncTimeout)(function(){X||x(d,I,m,.85)},g),w||(0,s.syncTimeout)(function(){x(d,I,m,.1)},g/2))}}function X(){var t;null==(t=this.markerClusterSeriesData)||t.forEach(function(t){var e;null==(e=null==t?void 0:t.destroy)||e.call(t)}),this.markerClusterSeriesData=null}function Y(){var t,e,i,r,n,a,l,u,d,h,c,m,g,v,y,x,C,b,I,k,M=this,w=M.chart,X=w.mapView,Y=M.getColumn("x"),L=M.getColumn("y"),P=M.options.cluster,O=M.getRealExtremes(),z=[],D=[],E=[];if(X&&M.is("mappoint")&&Y&&L&&(null==(t=M.options.data)||t.forEach(function(t,e){var i=M.projectPoint(t);i&&(Y[e]=i.x,L[e]=i.y)})),(null==P?void 0:P.enabled)&&(null==Y?void 0:Y.length)&&(null==L?void 0:L.length)&&!w.polar){x=P.layoutAlgorithm.type,(I=P.layoutAlgorithm).processedGridSize=(0,s.relativeLength)(I.gridSize||f.layoutAlgorithm.gridSize,w.plotWidth),I.processedDistance=(0,s.relativeLength)(I.distance||f.layoutAlgorithm.distance,w.plotWidth),d=I.kmeansThreshold||f.layoutAlgorithm.kmeansThreshold;var T=I.processedGridSize/2,j=A(M,{x:0,y:0}),V=A(M,{x:T,y:T});h=Math.abs(j.x-V.x),c=Math.abs(j.y-V.y);for(var R=0;R<Y.length;R++)!M.dataMaxX&&((0,s.defined)(g)&&(0,s.defined)(m)&&(0,s.defined)(y)&&(0,s.defined)(v)?(0,s.isNumber)(L[R])&&(0,s.isNumber)(y)&&(0,s.isNumber)(v)&&(g=Math.max(Y[R],g),m=Math.min(Y[R],m),y=Math.max(L[R]||y,y),v=Math.min(L[R]||v,v)):(g=m=Y[R],y=v=L[R])),Y[R]>=O.minX-h&&Y[R]<=O.maxX+h&&(L[R]||O.minY)>=O.minY-c&&(L[R]||O.maxY)<=O.maxY+c&&(z.push(Y[R]),D.push(L[R]),E.push(R));(0,s.defined)(g)&&(0,s.defined)(m)&&(0,s.isNumber)(y)&&(0,s.isNumber)(v)&&(M.dataMaxX=g,M.dataMinX=m,M.dataMaxY=y,M.dataMinY=v),C=(b=((0,s.isFunction)(x)?x:M.markerClusterAlgorithms?x&&M.markerClusterAlgorithms[x]?M.markerClusterAlgorithms[x]:z.length<d?M.markerClusterAlgorithms.kmeans:M.markerClusterAlgorithms.grid:function(){return!1}).call(this,z,D,E,I))?M.getClusteredData(b,P):b,P.animation&&(null==(i=null==(e=M.markerClusterInfo)?void 0:e.pointsState)?void 0:i.oldState)?(!function(t){for(var e,i,r=0,n=Object.keys(t);r<n.length;r++)null==(i=null==(e=t[n[r]].point)?void 0:e.destroy)||i.call(e)}(M.markerClusterInfo.pointsState.oldState),a=M.markerClusterInfo.pointsState.newState):a={},l=Y.length,u=M.markerClusterInfo,C&&(M.dataTable.modified=new p({columns:{x:C.groupedXData,y:C.groupedYData}}),M.hasGroupedData=!0,M.markerClusterInfo=C,M.groupMap=C.groupMap),o.apply(this),C&&M.markerClusterInfo&&(null==(r=M.markerClusterInfo.clusters)||r.forEach(function(t){(k=M.points[t.index]).isCluster=!0,k.clusteredData=t.data,k.clusterPointsAmount=t.data.length,t.point=k,(0,s.addEvent)(k,"click",S)}),null==(n=M.markerClusterInfo.noise)||n.forEach(function(t){t.point=M.points[t.index]}),P.animation&&M.markerClusterInfo&&(M.markerClusterInfo.pointsState={oldState:a,newState:M.getPointsState(C,u,l)}),P.animation?this.hideClusteredData():this.destroyClusteredData(),this.markerClusterSeriesData=this.hasGroupedData?this.points:null)}else o.apply(this)}function L(t,e,i){for(var r=[],n=0;n<t.length;n++){var a=R(this,{x:e,y:i}),o=R(this,{x:t[n].posX,y:t[n].posY}),s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2));r.push({clusterIndex:n,distance:s})}return r.sort(function(t,e){return t.distance-e.distance})}function P(t,e){var i,r,n,a,o,l,u,d,h,p,c,m,g,v,y,x,C=this.options.data,I=[],M=[],S=[],A=[],w=[],X=Math.max(2,e.minimumClusterSize||2),Y=0;if((0,s.isFunction)(e.layoutAlgorithm.type)&&!this.isValidGroupedDataObject(t))return(0,s.error)("Highcharts marker-clusters module: The custom algorithm result is not valid!",!1,this.chart),!1;for(var L in t)if(t[L].length>=X){if(u=t[L],o=k(),h=u.length,e.zones)for(var P=0;P<e.zones.length;P++)h>=e.zones[P].from&&h<=e.zones[P].to&&((y=e.zones[P]).zoneIndex=P,v=e.zones[P].marker,x=e.zones[P].className);g=b(u),"grid"!==e.layoutAlgorithm.type||e.allowOverlap?c={x:g.x,y:g.y}:(p=this.options.marker||{},c=this.preventClusterCollisions({x:g.x,y:g.y,key:L,groupedData:t,gridSize:this.getScaledGridSize(e.layoutAlgorithm),defaultRadius:p.radius||3+(p.lineWidth||0),clusterRadius:null!=(a=null!=(n=null!=(i=null==v?void 0:v.radius)?i:null==(r=e.marker)?void 0:r.radius)?n:f.marker.radius)?a:0}));for(var P=0;P<h;P++)u[P].parentStateId=o;if(S.push({x:c.x,y:c.y,id:L,stateId:o,index:Y,data:u,clusterZone:y,clusterZoneClassName:x}),I.push(c.x),M.push(c.y),w.push({options:{formatPrefix:"cluster",dataLabels:e.dataLabels,marker:(0,s.merge)(e.marker,{states:e.states},v||{})}}),null==C?void 0:C.length)for(var P=0;P<h;P++)(0,s.isObject)(C[u[P].dataIndex])&&(u[P].options=C[u[P].dataIndex]);Y++,v=null}else for(var P=0;P<t[L].length;P++)l=t[L][P],o=k(),m=null,d=null==C?void 0:C[l.dataIndex],I.push(l.x),M.push(l.y),l.parentStateId=o,A.push({x:l.x,y:l.y,id:L,stateId:o,index:Y,data:t[L]}),m=d&&"object"==typeof d&&!(0,s.isArray)(d)?(0,s.merge)(d,{x:l.x,y:l.y}):{userOptions:d,x:l.x,y:l.y},w.push({options:m}),Y++;return{clusters:S,noise:A,groupedXData:I,groupedYData:M,groupMap:w}}function O(){var t=this.chart,e=this.xAxis,i=this.yAxis,r=0;return{plotLeft:r=e&&this.dataMinX&&this.dataMaxX?e.reversed?e.toPixels(this.dataMaxX):e.toPixels(this.dataMinX):t.plotLeft,plotTop:i&&this.dataMinY&&this.dataMaxY?i.reversed?i.toPixels(this.dataMinY):i.toPixels(this.dataMaxY):t.plotTop}}function z(t,e,i){var r,n,a,o=e?I(e,i):[],s=I(t,i),l={};g=[],t.clusters.forEach(function(t){l[t.stateId]={x:t.x,y:t.y,id:t.stateId,point:t.point,parentsId:[]}}),t.noise.forEach(function(t){l[t.stateId]={x:t.x,y:t.y,id:t.stateId,point:t.point,parentsId:[]}});for(var u=0;u<s.length;u++)n=s[u],a=o[u],(null==n?void 0:n.parentStateId)&&(null==a?void 0:a.parentStateId)&&(null==(r=l[n.parentStateId])?void 0:r.parentsId.indexOf(a.parentStateId))===-1&&(l[n.parentStateId].parentsId.push(a.parentStateId),-1===g.indexOf(a.parentStateId)&&g.push(a.parentStateId));return l}function D(){var t=this.chart,e=t.mapView?0:t.plotLeft,i=A(this,{x:e,y:t.mapView?0:t.plotTop}),r=A(this,{x:e+t.plotWidth,y:e+t.plotHeight}),n=i.x,a=r.x,o=i.y,s=r.y;return{minX:Math.min(n,a),maxX:Math.max(n,a),minY:Math.min(o,s),maxY:Math.max(o,s)}}function E(t){var e,i=this.xAxis,r=this.chart.mapView,n=Number(null!=(e=t.processedGridSize)?e:(0,s.relativeLength)(t.gridSize||f.layoutAlgorithm.gridSize,this.chart.plotWidth)),a=!0,o=1,l=1;this.gridValueSize||(r?this.gridValueSize=n/r.getScale():this.gridValueSize=Math.abs(i.toValue(n)-i.toValue(0)));for(var u=r?this.gridValueSize*r.getScale():i.toPixels(this.gridValueSize)-i.toPixels(0),d=0!==u?Math.abs(+(n/u).toFixed(14)):1;a&&1!==d;){var h=Math.pow(2,o);d>.75&&d<1.25?a=!1:d>=1/h&&d<1/h*2?(a=!1,l=h):d<=h&&d>h/2&&(a=!1,l=1/h),o++}return n/l/d}function T(){var t,e,i=this.markerClusterSeriesData,r=null==(e=null==(t=this.markerClusterInfo)?void 0:t.pointsState)?void 0:e.oldState,n=g.map(function(t){var e;return(null==(e=null==r?void 0:r[t].point)?void 0:e.id)||""});null==i||i.forEach(function(t){var e;t&&-1!==n.indexOf(t.id)?(t.graphic&&t.graphic.hide(),t.dataLabel&&t.dataLabel.hide()):null==(e=null==t?void 0:t.destroy)||e.call(t)})}function j(t){var e=!1;return!!(0,s.isObject)(t)&&((0,s.objectEach)(t,function(t){if(e=!0,!(0,s.isArray)(t)||!t.length){e=!1;return}for(var i=0;i<t.length;i++)if(!(0,s.isObject)(t[i])||!t[i].x||!t[i].y){e=!1;return}}),e)}function V(t){var e,i,r,n,a,o,l,u,d,h,p,c,m,g,v,y,x,C=t.key.split(":").map(parseFloat),I=C[0],k=C[1],M=t.gridSize,S=t.groupedData,w=t.defaultRadius,X=t.clusterRadius,Y=k*M,L=I*M,P=R(this,t),O=[],z=null==(i=this.options.cluster)?void 0:i.marker,D=null==(r=this.options.cluster)?void 0:r.zones,E=this.getGridOffset(),T=P.x,j=P.y,V=0,G=0;T-=E.plotLeft,j-=E.plotTop;for(var N=1;N<5;N++)for(c=0,u=N%2?-1:1,d=N<3?-1:1,h=Math.floor((T+u*X)/M),x=[(p=Math.floor((j+d*X)/M))+":"+h,p+":"+k,I+":"+h];c<x.length;c++)-1===O.indexOf(x[c])&&x[c]!==t.key&&O.push(x[c]);for(var F=0;F<O.length;F++){var q=O[F];if(S[q]){S[q].posX||(v=b(S[q]),S[q].posX=v.x,S[q].posY=v.y);var W=R(this,{x:S[q].posX||0,y:S[q].posY||0});if(o=W.x-E.plotLeft,l=W.y-E.plotTop,g=(e=q.split(":").map(parseFloat))[0],m=e[1],D){V=S[q].length;for(var N=0;N<D.length;N++)V>=D[N].from&&V<=D[N].to&&(G=(0,s.defined)(null==(n=D[N].marker)?void 0:n.radius)?D[N].marker.radius||0:(null==z?void 0:z.radius)?z.radius:null!=(a=f.marker.radius)?a:0)}S[q].length>1&&0===G&&(null==z?void 0:z.radius)?G=z.radius:1===S[q].length&&(G=w),y=X+G,G=0,m!==k&&Math.abs(T-o)<y&&(T=m-k<0?Y+X:Y+M-X),g!==I&&Math.abs(j-l)<y&&(j=g-I<0?L+X:L+M-X)}}var H=A(this,{x:T+E.plotLeft,y:j+E.plotTop});return S[t.key].posX=H.x,S[t.key].posY=H.y,H}function R(t,e){var i=t.chart,r=t.xAxis,n=t.yAxis;return i.mapView?i.mapView.projectedUnitsToPixels(e):{x:r?r.toPixels(e.x):0,y:n?n.toPixels(e.y):0}}var G=function(t,e){var i=e.prototype;!i.markerClusterAlgorithms&&(o=i.generatePoints,i.markerClusterAlgorithms=m,i.animateClusterPoint=w,i.destroyClusteredData=X,i.generatePoints=Y,i.getClusterDistancesFromPoint=L,i.getClusteredData=P,i.getGridOffset=O,i.getPointsState=z,i.getRealExtremes=D,i.getScaledGridSize=E,i.hideClusteredData=T,i.isValidGroupedDataObject=j,i.preventClusterCollisions=V,(0,s.addEvent)(e,"destroy",i.destroyClusteredData),t.plotOptions&&(t.plotOptions.series=(0,s.merge)(t.plotOptions.series,u)))},N=l().animObject,F=l().defaultOptions,q=l().composed;function W(){for(var t=this.chart,e=0,i=0,r=t.series;i<r.length;i++){var n=r[i];n.markerClusterInfo&&(e=N((n.options.cluster||{}).animation).duration||0)}(0,s.syncTimeout)(function(){t.tooltip&&t.tooltip.destroy()},e)}function H(){for(var t,e=0,i=this.series||[];e<i.length;e++){var r=i[e];if(r.markerClusterInfo){var n=r.options.cluster,a=((r.markerClusterInfo||{}).pointsState||{}).oldState;if((n||{}).animation&&r.markerClusterInfo&&0===((null==(t=r.chart.pointer)?void 0:t.pinchDown)||[]).length&&"pan"!==((r.xAxis||{}).eventArgs||{}).trigger&&a&&Object.keys(a).length){for(var o=0,s=r.markerClusterInfo.clusters;o<s.length;o++){var l=s[o];r.animateClusterPoint(l)}for(var u=0,d=r.markerClusterInfo.noise;u<d.length;u++){var h=d[u];r.animateClusterPoint(h)}}}}}function K(t){var e=(((t.point||t.target).series.options.cluster||{}).events||{}).drillToCluster;(0,s.isFunction)(e)&&e.call(this,t)}function Z(){if(this.dataGroup)return(0,s.error)("Highcharts marker-clusters module: Running `Point.update` when point belongs to clustered series is not supported.",!1,this.series.chart),!1}function _(){var t=(this.options.cluster||{}).drillToCluster;if(this.markerClusterInfo&&this.markerClusterInfo.clusters)for(var e=0,i=this.markerClusterInfo.clusters;e<i.length;e++){var r=i[e];r.point&&r.point.graphic&&(r.point.graphic.addClass("highcharts-cluster-point"),t&&r.point&&(r.point.graphic.css({cursor:"pointer"}),r.point.dataLabel&&r.point.dataLabel.css({cursor:"pointer"})),(0,s.defined)(r.clusterZone)&&r.point.graphic.addClass(r.clusterZoneClassName||"highcharts-cluster-zone-"+r.clusterZone.zoneIndex))}}function B(t,i,r,n){var a=r/2,o=n/2,s=e.arc(t+a,i+o,a-4,o-4,{start:.5*Math.PI,end:2.5*Math.PI,open:!1}),l=e.arc(t+a,i+o,a-3,o-3,{start:.5*Math.PI,end:2.5*Math.PI,innerR:a-2,open:!1});return e.arc(t+a,i+o,a-1,o-1,{start:.5*Math.PI,end:2.5*Math.PI,innerR:a,open:!1}).concat(l,s)}(F.plotOptions||{}).series=(0,s.merge)((F.plotOptions||{}).series,u);var U=l();({compose:function(t,e,i,r){if((0,s.pushUnique)(q,"MarkerClusters")){var n=r.prototype.pointClass,a=r.types.scatter;(0,s.addEvent)(t,"setExtremes",W),(0,s.addEvent)(e,"render",H),(0,s.addEvent)(n,"drillToCluster",K),(0,s.addEvent)(n,"update",Z),(0,s.addEvent)(r,"afterRender",_),a&&G(i,a)}}}).compose(U.Axis,U.Chart,U.defaultOptions,U.Series),({compose:function(t){(e=t.prototype.symbols).cluster=B}}).compose(U.SVGRenderer);var J=l();return a.default}()});