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