highcharts
Version:
JavaScript charting framework
107 lines (104 loc) • 85.9 kB
JavaScript
/*
Highmaps JS v10.0.0 (2022-03-07)
Highmaps as a plugin for Highcharts or Highcharts Stock.
(c) 2011-2021 Torstein Honsi
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/map",["highcharts"],function(w){a(w);a.Highcharts=w;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function w(a,n,q,h){a.hasOwnProperty(n)||(a[n]=h.apply(null,q),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:n,module:a[n]}})))}a=a?a._modules:{};w(a,"Core/Axis/Color/ColorAxisComposition.js",
[a["Core/Color/Color.js"],a["Core/Utilities.js"]],function(a,n){var q=a.parse,h=n.addEvent,m=n.extend,d=n.merge,g=n.pick,u=n.splat,r;(function(l){function r(){var f=this,k=this.options;this.colorAxis=[];k.colorAxis&&(k.colorAxis=u(k.colorAxis),k.colorAxis.forEach(function(k,b){k.index=b;new B(f,k)}))}function e(f){var k=this,b=function(b){b=f.allItems.indexOf(b);-1!==b&&(k.destroyItem(f.allItems[b]),f.allItems.splice(b,1))},c=[],y,x;(this.chart.colorAxis||[]).forEach(function(f){(y=f.options)&&y.showInLegend&&
(y.dataClasses&&y.visible?c=c.concat(f.getDataClassLegendSymbols()):y.visible&&c.push(f),f.series.forEach(function(f){if(!f.options.showInLegend||y.dataClasses)"point"===f.options.legendType?f.points.forEach(function(f){b(f)}):b(f)}))});for(x=c.length;x--;)f.allItems.unshift(c[x])}function c(f){f.visible&&f.item.legendColor&&f.item.legendSymbol.attr({fill:f.item.legendColor})}function b(){var f=this.chart.colorAxis;f&&f.forEach(function(f,b,k){f.update({},k)})}function t(){(this.chart.colorAxis&&
this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function C(){var f=this.axisTypes;f?-1===f.indexOf("colorAxis")&&f.push("colorAxis"):this.axisTypes=["colorAxis"]}function F(f){var k=this,b=f?"show":"hide";k.visible=k.options.visible=!!f;["graphic","dataLabel"].forEach(function(f){if(k[f])k[f][b]()});this.series.buildKDTree()}function p(){var f=this,k=this.options.nullColor,b=this.colorAxis,c=this.colorKey;(this.data.length?this.data:this.points).forEach(function(y){var x=y.getNestedProperty(c);
(x=y.options.color||(y.isNull||null===y.value?k:b&&"undefined"!==typeof x?b.toColor(x,y):y.color||f.color))&&y.color!==x&&(y.color=x,"point"===f.options.legendType&&y.legendItem&&f.chart.legend.colorizeItem(y,y.visible))})}function z(f){var k=f.prototype.createAxis;f.prototype.createAxis=function(f,b){if("colorAxis"!==f)return k.apply(this,arguments);var c=new B(this,d(b.axis,{index:this[f].length,isX:!1}));this.isDirtyLegend=!0;this.axes.forEach(function(f){f.series=[]});this.series.forEach(function(f){f.bindAxes();
f.isDirtyData=!0});g(b.redraw,!0)&&this.redraw(b.animation);return c}}function x(){this.elem.attr("fill",q(this.start).tweenTo(q(this.end),this.pos),void 0,!0)}function f(){this.elem.attr("stroke",q(this.start).tweenTo(q(this.end),this.pos),void 0,!0)}var k=[],B;l.compose=function(l,d,g,v,y){B||(B=l);-1===k.indexOf(d)&&(k.push(d),l=d.prototype,l.collectionsWithUpdate.push("colorAxis"),l.collectionsWithInit.colorAxis=[l.addColorAxis],h(d,"afterGetAxes",r),z(d));-1===k.indexOf(g)&&(k.push(g),d=g.prototype,
d.fillSetter=x,d.strokeSetter=f);-1===k.indexOf(v)&&(k.push(v),h(v,"afterGetAllItems",e),h(v,"afterColorizeItem",c),h(v,"afterUpdate",b));-1===k.indexOf(y)&&(k.push(y),m(y.prototype,{optionalAxis:"colorAxis",translateColors:p}),m(y.prototype.pointClass.prototype,{setVisible:F}),h(y,"afterTranslate",t),h(y,"bindAxes",C))};l.pointSetVisible=F})(r||(r={}));return r});w(a,"Core/Axis/Color/ColorAxisDefaults.js",[],function(){return{lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,
startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{overflow:"justify",rotation:0},minColor:"#e6ebf5",maxColor:"#003399",tickLength:5,showInLegend:!0}});w(a,"Core/Axis/Color/ColorAxis.js",[a["Core/Axis/Axis.js"],a["Core/Color/Color.js"],a["Core/Axis/Color/ColorAxisComposition.js"],a["Core/Axis/Color/ColorAxisDefaults.js"],a["Core/Globals.js"],a["Core/Legend/LegendSymbol.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,n,
q,h,m,d,g,u){var r=this&&this.__extends||function(){var b=function(c,z){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,f){b.__proto__=f}||function(b,f){for(var k in f)f.hasOwnProperty(k)&&(b[k]=f[k])};return b(c,z)};return function(c,z){function x(){this.constructor=c}b(c,z);c.prototype=null===z?Object.create(z):(x.prototype=z.prototype,new x)}}(),l=n.parse,v=m.noop,e=g.series,c=u.extend,b=u.isNumber,t=u.merge,C=u.pick;n=function(g){function p(b,c){var f=g.call(this,b,c)||this;
f.beforePadding=!1;f.chart=void 0;f.coll="colorAxis";f.dataClasses=void 0;f.legendItem=void 0;f.legendItems=void 0;f.name="";f.options=void 0;f.stops=void 0;f.visible=!0;f.init(b,c);return f}r(p,g);p.compose=function(b,c,f,k){q.compose(p,b,c,f,k)};p.prototype.init=function(b,c){var f=b.options.legend||{},k=c.layout?"vertical"!==c.layout:"vertical"!==f.layout,e=c.visible;f=t(p.defaultColorAxisOptions,c,{showEmpty:!1,title:null,visible:f.enabled&&!1!==e});this.coll="colorAxis";this.side=c.side||k?2:
1;this.reversed=c.reversed||!k;this.opposite=!k;g.prototype.init.call(this,b,f);this.userOptions.visible=e;c.dataClasses&&this.initDataClasses(c);this.initStops();this.horiz=k;this.zoomEnabled=!1};p.prototype.initDataClasses=function(b){var c=this.chart,f=this.options,k=b.dataClasses.length,e,z=0,p=c.options.chart.colorCount;this.dataClasses=e=[];this.legendItems=[];(b.dataClasses||[]).forEach(function(b,x){b=t(b);e.push(b);if(c.styledMode||!b.color)"category"===f.dataClassColor?(c.styledMode||(x=
c.options.colors,p=x.length,b.color=x[z]),b.colorIndex=z,z++,z===p&&(z=0)):b.color=l(f.minColor).tweenTo(l(f.maxColor),2>k?.5:x/(k-1))})};p.prototype.hasData=function(){return!!(this.tickPositions||[]).length};p.prototype.setTickPositions=function(){if(!this.dataClasses)return g.prototype.setTickPositions.call(this)};p.prototype.initStops=function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(b){b.color=l(b[1])})};p.prototype.setOptions=
function(b){g.prototype.setOptions.call(this,b);this.options.crosshair=this.options.marker};p.prototype.setAxisSize=function(){var b=this.legendSymbol,c=this.chart,f=c.options.legend||{},k,e;b?(this.left=f=b.attr("x"),this.top=k=b.attr("y"),this.width=e=b.attr("width"),this.height=b=b.attr("height"),this.right=c.chartWidth-f-e,this.bottom=c.chartHeight-k-b,this.len=this.horiz?e:b,this.pos=this.horiz?f:k):this.len=(this.horiz?f.symbolWidth:f.symbolHeight)||p.defaultLegendLength};p.prototype.normalizedValue=
function(b){this.logarithmic&&(b=this.logarithmic.log2lin(b));return 1-(this.max-b)/(this.max-this.min||1)};p.prototype.toColor=function(b,c){var f=this.dataClasses,k=this.stops,e;if(f)for(e=f.length;e--;){var x=f[e];var t=x.from;k=x.to;if(("undefined"===typeof t||b>=t)&&("undefined"===typeof k||b<=k)){var p=x.color;c&&(c.dataClass=e,c.colorIndex=x.colorIndex);break}}else{b=this.normalizedValue(b);for(e=k.length;e--&&!(b>k[e][0]););t=k[e]||k[e+1];k=k[e+1]||t;b=1-(k[0]-b)/(k[0]-t[0]||1);p=t.color.tweenTo(k.color,
b)}return p};p.prototype.getOffset=function(){var b=this.legendGroup,c=this.chart.axisOffset[this.side];if(b){this.axisParent=b;g.prototype.getOffset.call(this);var f=this.chart.legend;f.allItems.forEach(function(b){b instanceof p&&b.drawLegendSymbol(f,b)});f.render();this.chart.getMargins(!0);this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width);this.chart.axisOffset[this.side]=c}};p.prototype.setLegendColor=function(){var b=this.reversed,c=b?1:0;b=b?0:1;c=this.horiz?[c,0,b,0]:
[0,b,0,c];this.legendColor={linearGradient:{x1:c[0],y1:c[1],x2:c[2],y2:c[3]},stops:this.stops}};p.prototype.drawLegendSymbol=function(b,c){var f=b.padding,k=b.options,e=this.horiz,t=C(k.symbolWidth,e?p.defaultLegendLength:12),x=C(k.symbolHeight,e?12:p.defaultLegendLength),l=C(k.labelPadding,e?16:30);k=C(k.itemDistance,10);this.setLegendColor();c.legendSymbol||(c.legendSymbol=this.chart.renderer.rect(0,b.baseline-11,t,x).attr({zIndex:1}).add(c.legendGroup));this.legendItemWidth=t+f+(e?k:this.options.labels.x+
this.maxLabelLength);this.legendItemHeight=x+f+(e?l:0)};p.prototype.setState=function(b){this.series.forEach(function(c){c.setState(b)})};p.prototype.setVisible=function(){};p.prototype.getSeriesExtremes=function(){var b=this.series,c=b.length,f;this.dataMin=Infinity;for(this.dataMax=-Infinity;c--;){var k=b[c];var t=k.colorKey=C(k.options.colorKey,k.colorKey,k.pointValKey,k.zoneAxis,"y");var p=k.pointArrayMap;var l=k[t+"Min"]&&k[t+"Max"];if(k[t+"Data"])var d=k[t+"Data"];else if(p){d=[];p=p.indexOf(t);
var g=k.yData;if(0<=p&&g)for(f=0;f<g.length;f++)d.push(C(g[f][p],g[f]))}else d=k.yData;l?(k.minColorValue=k[t+"Min"],k.maxColorValue=k[t+"Max"]):(d=e.prototype.getExtremes.call(k,d),k.minColorValue=d.dataMin,k.maxColorValue=d.dataMax);"undefined"!==typeof k.minColorValue&&(this.dataMin=Math.min(this.dataMin,k.minColorValue),this.dataMax=Math.max(this.dataMax,k.maxColorValue));l||e.prototype.applyExtremes.call(k)}};p.prototype.drawCrosshair=function(b,c){var f=c&&c.plotX,k=c&&c.plotY,e=this.pos,t=
this.len;if(c){var p=this.toPixels(c.getNestedProperty(c.series.colorKey));p<e?p=e-2:p>e+t&&(p=e+t+2);c.plotX=p;c.plotY=this.len-p;g.prototype.drawCrosshair.call(this,b,c);c.plotX=f;c.plotY=k;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}))}};p.prototype.getPlotLinePath=function(c){var e=
this.left,f=c.translatedValue,k=this.top;return b(f)?this.horiz?[["M",f-4,k-6],["L",f+4,k-6],["L",f,k],["Z"]]:[["M",e,f],["L",e-6,f+6],["L",e-6,f-6],["Z"]]:g.prototype.getPlotLinePath.call(this,c)};p.prototype.update=function(b,c){var f=this.chart.legend;this.series.forEach(function(b){b.isDirtyData=!0});(b.dataClasses&&f.allItems||this.dataClasses)&&this.destroyItems();g.prototype.update.call(this,b,c);this.legendItem&&(this.setLegendColor(),f.colorizeItem(this,!0))};p.prototype.destroyItems=function(){var b=
this.chart;this.legendItem?b.legend.destroyItem(this):this.legendItems&&this.legendItems.forEach(function(c){b.legend.destroyItem(c)});b.isDirtyLegend=!0};p.prototype.destroy=function(){this.chart.isDirtyLegend=!0;this.destroyItems();g.prototype.destroy.apply(this,[].slice.call(arguments))};p.prototype.remove=function(b){this.destroyItems();g.prototype.remove.call(this,b)};p.prototype.getDataClassLegendSymbols=function(){var b=this,e=b.chart,f=b.legendItems,k=e.options.legend,t=k.valueDecimals,p=
k.valueSuffix||"",l;f.length||b.dataClasses.forEach(function(k,g){var y=k.from,A=k.to,L=e.numberFormatter,J=!0;l="";"undefined"===typeof y?l="< ":"undefined"===typeof A&&(l="> ");"undefined"!==typeof y&&(l+=L(y,t)+p);"undefined"!==typeof y&&"undefined"!==typeof A&&(l+=" - ");"undefined"!==typeof A&&(l+=L(A,t)+p);f.push(c({chart:e,name:l,options:{},drawLegendSymbol:d.drawRectangle,visible:!0,setState:v,isDataClass:!0,setVisible:function(){J=b.visible=!J;b.series.forEach(function(b){b.points.forEach(function(b){b.dataClass===
g&&b.setVisible(J)})});e.legend.colorizeItem(this,J)}},k))});return f};p.defaultColorAxisOptions=h;p.defaultLegendLength=200;p.keepProps=["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"];return p}(a);Array.prototype.push.apply(a.keepProps,n.keepProps);"";return n});w(a,"Maps/MapNavigationOptionsDefault.js",[a["Core/DefaultOptions.js"],a["Core/Utilities.js"]],function(a,n){n=n.extend;var q={buttonOptions:{alignTo:"plotBox",align:"left",verticalAlign:"top",x:0,width:18,
height:18,padding:5,style:{fontSize:"15px",fontWeight:"bold"},theme:{"stroke-width":1,"text-align":"center"}},buttons:{zoomIn:{onclick:function(){this.mapZoom(.5)},text:"+",y:0},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:28}},mouseWheelSensitivity:1.1};n(a.defaultOptions.lang,{zoomIn:"Zoom in",zoomOut:"Zoom out"});return a.defaultOptions.mapNavigation=q});w(a,"Maps/MapNavigation.js",[a["Core/Chart/Chart.js"],a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,n,q){function h(c){c&&
(c.preventDefault&&c.preventDefault(),c.stopPropagation&&c.stopPropagation(),c.cancelBubble=!0)}function m(c){this.navButtons=[];this.init(c)}var d=n.doc,g=q.addEvent,u=q.extend,r=q.isNumber,l=q.merge,v=q.objectEach,e=q.pick;m.prototype.init=function(c){this.chart=c};m.prototype.update=function(c){var b=this,t=this.chart,d=t.options.mapNavigation,r,p,a,x,f=function(b){this.handler.call(t,b);h(b)},k=b.navButtons;c&&(d=t.options.mapNavigation=l(t.options.mapNavigation,c));for(;k.length;)k.pop().destroy();
e(d.enableButtons,d.enabled)&&!t.renderer.forExport&&(b.navButtonsGroup||(b.navButtonsGroup=t.renderer.g().attr({zIndex:4}).add()),v(d.buttons,function(c,e){c=l(d.buttonOptions,c);!t.styledMode&&c.theme&&(r=c.theme,r.style=l(c.theme.style,c.style),a=(p=r.states)&&p.hover,x=p&&p.select,delete r.states);var v=t.renderer.button(c.text||"",0,0,f,r,a,x,void 0,"zoomIn"===e?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+{zoomIn:"zoom-in",zoomOut:"zoom-out"}[e]).attr({width:c.width,
height:c.height,title:t.options.lang[e],padding:c.padding,zIndex:5}).add(b.navButtonsGroup);v.handler=c.onclick;g(v.element,"dblclick",h);k.push(v);u(c,{width:v.width,height:2*v.height});if(t.hasLoaded)v.align(c,!1,c.alignTo);else var m=g(t,"load",function(){v.element&&v.align(c,!1,c.alignTo);m()})}),c=function(){var c=t.exportingGroup&&t.exportingGroup.getBBox();if(c){var f=b.navButtonsGroup.getBBox();if(!(f.x>=c.x+c.width||f.x+f.width<=c.x||f.y>=c.y+c.height||f.y+f.height<=c.y)){var k=-f.y-f.height+
c.y-5;c=c.y+c.height-f.y+5;b.navButtonsGroup.attr({translateY:"bottom"===(d.buttonOptions&&d.buttonOptions.verticalAlign)?k:c})}}},t.hasLoaded||g(t,"render",c));this.updateEvents(d)};m.prototype.updateEvents=function(c){var b=this.chart;e(c.enableDoubleClickZoom,c.enabled)||c.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||g(b.container,"dblclick",function(c){b.pointer.onContainerDblClick(c)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick());e(c.enableMouseWheelZoom,
c.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||g(b.container,void 0!==d.onwheel?"wheel":void 0!==d.onmousewheel?"mousewheel":"DOMMouseScroll",function(c){b.pointer.inClass(c.target,"highcharts-no-mousewheel")||(b.pointer.onContainerMouseWheel(c),h(c));return!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())};u(a.prototype,{fitToBox:function(c,b){[["x","width"],["y","height"]].forEach(function(e){var t=e[0];e=e[1];c[t]+c[e]>b[t]+b[e]&&(c[e]>b[e]?(c[e]=b[e],c[t]=b[t]):
c[t]=b[t]+b[e]-c[e]);c[e]>b[e]&&(c[e]=b[e]);c[t]<b[t]&&(c[t]=b[t])});return c},mapZoom:function(c,b,e,l,d){this.mapView&&(r(c)&&(c=Math.log(c)/Math.log(.5)),this.mapView.zoomBy(c,r(b)&&r(e)?this.mapView.projection.inverse([b,e]):void 0,r(l)&&r(d)?[l,d]:void 0))}});g(a,"beforeRender",function(){this.mapNavigation=new m(this);this.mapNavigation.update()});n.MapNavigation=m});w(a,"Maps/MapPointer.js",[a["Core/Pointer.js"],a["Core/Utilities.js"]],function(a,n){var q=n.defined,h=n.extend,m=n.pick;n=n.wrap;
var d=a.prototype.normalize,g=0,u;h(a.prototype,{normalize:function(g,l){var r=this.chart;g=d.call(this,g,l);r&&r.mapView&&(l=r.mapView.pixelsToLonLat({x:g.chartX-r.plotLeft,y:g.chartY-r.plotTop}))&&h(g,l);return g},onContainerDblClick:function(d){var l=this.chart;d=this.normalize(d);l.options.mapNavigation.enableDoubleClickZoomTo?l.pointer.inClass(d.target,"highcharts-tracker")&&l.hoverPoint&&l.hoverPoint.zoomTo():l.isInsidePlot(d.chartX-l.plotLeft,d.chartY-l.plotTop)&&l.mapZoom(.5,void 0,void 0,
d.chartX,d.chartY)},onContainerMouseWheel:function(d){var l=this.chart;d=this.normalize(d);var a=q(d.wheelDelta)&&-d.wheelDelta/120||d.deltaY||d.detail;1<=Math.abs(a)&&(g+=Math.abs(a),u&&clearTimeout(u),u=setTimeout(function(){g=0},50));10>g&&l.isInsidePlot(d.chartX-l.plotLeft,d.chartY-l.plotTop)&&l.mapView&&l.mapView.zoomBy((l.options.mapNavigation.mouseWheelSensitivity-1)*-a,void 0,[d.chartX,d.chartY],1>Math.abs(a)?!1:void 0)}});n(a.prototype,"zoomOption",function(d){var l=this.chart.options.mapNavigation;
m(l.enableTouchZoom,l.enabled)&&(this.chart.options.chart.pinchType="xy");d.apply(this,[].slice.call(arguments,1))});n(a.prototype,"pinchTranslate",function(d,l,g,e,c,b,t){d.call(this,l,g,e,c,b,t);"map"===this.chart.options.chart.type&&this.hasZoom&&(d=e.scaleX>e.scaleY,this.pinchTranslateDirection(!d,l,g,e,c,b,t,d?e.scaleX:e.scaleY))})});w(a,"Series/ColorMapMixin.js",[a["Core/Globals.js"],a["Core/Series/Point.js"],a["Core/Utilities.js"]],function(a,n,q){var h=a.noop;a=a.seriesTypes;var m=q.defined;
q=q.addEvent;q(n,"afterSetState",function(d){this.moveToTopOnHover&&this.graphic&&this.graphic.attr({zIndex:d&&"hover"===d.state?1:0})});return{PointMixin:{dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value}},SeriesMixin:{pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:h,parallelArrays:["x","y","value"],colorKey:"value",pointAttribs:a.column.prototype.pointAttribs,
colorAttribs:function(d){var g={};!m(d.color)||d.state&&"normal"!==d.state||(g[this.colorProp||"fill"]=d.color);return g}}}});w(a,"Maps/MapSymbols.js",[a["Core/Renderer/SVG/SVGRenderer.js"]],function(a){function n(a,h,m,d,g,u,r,l){return[["M",a+g,h],["L",a+m-u,h],["C",a+m-u/2,h,a+m,h+u/2,a+m,h+u],["L",a+m,h+d-r],["C",a+m,h+d-r/2,a+m-r/2,h+d,a+m-r,h+d],["L",a+l,h+d],["C",a+l/2,h+d,a,h+d-l/2,a,h+d-l],["L",a,h+g],["C",a,h+g/2,a+g/2,h,a+g,h],["Z"]]}a=a.prototype.symbols;a.bottombutton=function(a,h,m,
d,g){g=g&&g.r||0;return n(a-1,h-1,m,d,0,0,g,g)};a.topbutton=function(a,h,m,d,g){g=g&&g.r||0;return n(a-1,h-1,m,d,g,g,0,0)};return a});w(a,"Core/Chart/MapChart.js",[a["Core/Chart/Chart.js"],a["Core/DefaultOptions.js"],a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Utilities.js"]],function(a,n,q,h){var m=this&&this.__extends||function(){var d=function(a,g){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,c){e.__proto__=c}||function(e,c){for(var b in c)c.hasOwnProperty(b)&&(e[b]=c[b])};
return d(a,g)};return function(a,g){function e(){this.constructor=a}d(a,g);a.prototype=null===g?Object.create(g):(e.prototype=g.prototype,new e)}}(),d=n.getOptions,g=h.merge,u=h.pick;a=function(a){function l(){return null!==a&&a.apply(this,arguments)||this}m(l,a);l.prototype.init=function(l,e){var c=d().credits;l=g({chart:{panning:{enabled:!0,type:"xy"},type:"map"},credits:{mapText:u(c.mapText,' \u00a9 <a href="{geojson.copyrightUrl}">{geojson.copyrightShort}</a>'),mapTextFull:u(c.mapTextFull,"{geojson.copyright}")},
mapView:{},tooltip:{followTouchMove:!1}},l);a.prototype.init.call(this,l,e)};return l}(a);(function(d){d.maps={};d.mapChart=function(a,g,e){return new d(a,g,e)};d.splitPath=function(d){"string"===typeof d&&(d=d.replace(/([A-Za-z])/g," $1 ").replace(/^\s*/,"").replace(/\s*$/,""),d=d.split(/[ ,;]+/).map(function(d){return/[A-za-z]/.test(d)?d:parseFloat(d)}));return q.prototype.pathToSegments(d)}})(a||(a={}));return a});w(a,"Maps/MapUtilities.js",[],function(){return{boundsFromPath:function(a){var n=
-Number.MAX_VALUE,q=Number.MAX_VALUE,h=-Number.MAX_VALUE,m=Number.MAX_VALUE,d;a.forEach(function(a){var g=a[a.length-2];a=a[a.length-1];"number"===typeof g&&"number"===typeof a&&(q=Math.min(q,g),n=Math.max(n,g),m=Math.min(m,a),h=Math.max(h,a),d=!0)});if(d)return{x1:q,y1:m,x2:n,y2:h}},pointInPolygon:function(a,n){var q,h=!1,m=a.x,d=a.y;a=0;for(q=n.length-1;a<n.length;q=a++){var g=n[a][1]>d;var u=n[q][1]>d;g!==u&&m<(n[q][0]-n[a][0])*(d-n[a][1])/(n[q][1]-n[a][1])+n[a][0]&&(h=!h)}return h}}});w(a,"Series/Map/MapPoint.js",
[a["Series/ColorMapMixin.js"],a["Maps/MapUtilities.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,n,q,h){var m=this&&this.__extends||function(){var a=function(d,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,b){c.__proto__=b}||function(c,b){for(var e in b)b.hasOwnProperty(e)&&(c[e]=b[e])};return a(d,e)};return function(d,e){function c(){this.constructor=d}a(d,e);d.prototype=null===e?Object.create(e):(c.prototype=e.prototype,new c)}}(),d=n.boundsFromPath,
g=h.extend,u=h.isNumber,r=h.pick;n=function(a){function l(){var e=null!==a&&a.apply(this,arguments)||this;e.options=void 0;e.path=void 0;e.series=void 0;return e}m(l,a);l.getProjectedPath=function(e,c){e.projectedPath||(c&&e.geometry?(c.hasCoordinates=!0,e.projectedPath=c.path(e.geometry)):e.projectedPath=e.path);return e.projectedPath||[]};l.prototype.applyOptions=function(e,c){var b=this.series;e=a.prototype.applyOptions.call(this,e,c);c=b.joinBy;b.mapData&&b.mapMap&&(c=a.prototype.getNestedProperty.call(e,
c[1]),(b="undefined"!==typeof c&&b.mapMap[c])?g(e,b):e.value=e.value||null);return e};l.prototype.getProjectedBounds=function(e){e=l.getProjectedPath(this,e);e=d(e);var c=this.properties;if(e){var b=c&&c["hc-middle-x"];c=c&&c["hc-middle-y"];e.midX=e.x1+(e.x2-e.x1)*r(this.middleX,u(b)?b:.5);b=r(this.middleY,u(c)?c:.5);this.geometry||(b=1-b);e.midY=e.y2-(e.y2-e.y1)*b;return e}};l.prototype.onMouseOver=function(e){h.clearTimeout(this.colorInterval);if(null!==this.value||this.series.options.nullInteraction)a.prototype.onMouseOver.call(this,
e);else this.series.onMouseOut(e)};l.prototype.zoomTo=function(){var e=this.series.chart;e.mapView&&this.bounds&&(e.mapView.fitToBounds(this.bounds,void 0,!1),this.series.isDirty=!0,e.redraw())};return l}(q.seriesTypes.scatter.prototype.pointClass);g(n.prototype,{dataLabelOnNull:a.PointMixin.dataLabelOnNull,isValid:a.PointMixin.isValid,moveToTopOnHover:a.PointMixin.moveToTopOnHover});return n});w(a,"Maps/MapViewOptionsDefault.js",[],function(){return{center:[0,0],maxZoom:void 0,padding:0,projection:{name:void 0,
parallels:void 0,rotation:void 0},zoom:void 0}});w(a,"Maps/MapViewInsetsOptionsDefault.js",[],function(){return{borderColor:"#cccccc",borderWidth:1,center:[0,0],padding:"10%",relativeTo:"mapBoundingBox",units:"percent"}});w(a,"Extensions/GeoJSON.js",[a["Core/Chart/Chart.js"],a["Core/FormatUtilities.js"],a["Core/Globals.js"],a["Maps/MapUtilities.js"],a["Core/Utilities.js"]],function(a,n,q,h,m){function d(c,b){b||(b=Object.keys(c.objects)[0]);b=c.objects[b];if(b["hc-decoded-geojson"])return b["hc-decoded-geojson"];
var e=c.arcs;if(c.transform){var a=c.transform,d=a.scale,p=a.translate;e=c.arcs.map(function(b){var c=0,e=0;return b.map(function(b){b=b.slice();b[0]=(c+=b[0])*d[0]+p[0];b[1]=(e+=b[1])*d[1]+p[1];return b})})}var g=function(b){return"number"===typeof b[0]?b.reduce(function(b,c,a){var f=0>c?e[~c]:e[c];0>c?(f=f.slice(0,0===a?f.length:f.length-1),f.reverse()):a&&(f=f.slice(1));return b.concat(f)},[]):b.map(g)};a=b.geometries.map(function(b){return{type:"Feature",properties:b.properties,geometry:{type:b.type,
coordinates:b.coordinates||g(b.arcs)}}});c={type:"FeatureCollection",copyright:c.copyright,copyrightShort:c.copyrightShort,copyrightUrl:c.copyrightUrl,features:a,"hc-recommended-mapview":b["hc-recommended-mapview"],bbox:c.bbox};return b["hc-decoded-geojson"]=c}function g(c,b,e){void 0===b&&(b="map");var a=[];c="Topology"===c.type?d(c):c;c.features.forEach(function(c){var e=c.geometry||{},d=e.type;e=e.coordinates;c=c.properties;var t;"map"!==b&&"mapbubble"!==b||"Polygon"!==d&&"MultiPolygon"!==d?"mapline"!==
b||"LineString"!==d&&"MultiLineString"!==d?"mappoint"===b&&"Point"===d&&e.length&&(t={geometry:{coordinates:e,type:d}}):e.length&&(t={geometry:{coordinates:e,type:d}}):e.length&&(t={geometry:{coordinates:e,type:d}});t&&(d=c&&(c.name||c.NAME),a.push(v(t,{name:"string"===typeof d?d:void 0,properties:c})))});e&&c.copyrightShort&&(e.chart.mapCredits=u(e.chart.options.credits.mapText,{geojson:c}),e.chart.mapCreditsFull=u(e.chart.options.credits.mapTextFull,{geojson:c}));return a}var u=n.format,r=q.win,
l=m.error,v=m.extend,e=m.merge;n=m.wrap;"";a.prototype.transformFromLatLon=function(c,b){var e=this.options.chart.proj4||r.proj4;if(e){var a=b.jsonmarginX;a=void 0===a?0:a;var d=b.jsonmarginY;d=void 0===d?0:d;var p=b.jsonres;p=void 0===p?1:p;var g=b.scale;g=void 0===g?1:g;var m=b.xoffset;m=void 0===m?0:m;var f=b.xpan;f=void 0===f?0:f;var k=b.yoffset;k=void 0===k?0:k;var h=b.ypan;h=void 0===h?0:h;c=e(b.crs,[c.lon,c.lat]);e=b.cosAngle||b.rotation&&Math.cos(b.rotation);var u=b.sinAngle||b.rotation&&
Math.sin(b.rotation);b=b.rotation?[c[0]*e+c[1]*u,-c[0]*u+c[1]*e]:c;return{x:((b[0]-m)*g+f)*p+a,y:-(((k-b[1])*g+h)*p-d)}}l(21,!1,this)};a.prototype.transformToLatLon=function(c,b){if(!this.options.chart.proj4&&!r.proj4)l(21,!1,this);else if(null!==c.y){var e=b.jsonmarginX,a=b.jsonmarginY,d=b.jsonres;d=void 0===d?1:d;var p=b.scale;p=void 0===p?1:p;var g=b.xoffset,m=b.xpan,f=b.yoffset,k=b.ypan;c={x:((c.x-(void 0===e?0:e))/d-(void 0===m?0:m))/p+(void 0===g?0:g),y:((c.y-(void 0===a?0:a))/d+(void 0===k?
0:k))/p+(void 0===f?0:f)};e=b.cosAngle||b.rotation&&Math.cos(b.rotation);a=b.sinAngle||b.rotation&&Math.sin(b.rotation);b=r.proj4(b.crs,"WGS84",b.rotation?{x:c.x*e+c.y*-a,y:c.x*a+c.y*e}:c);return{lat:b.y,lon:b.x}}};a.prototype.fromPointToLatLon=function(c){return this.mapView&&this.mapView.projectedUnitsToLonLat(c)};a.prototype.fromLatLonToPoint=function(c){return this.mapView&&this.mapView.lonLatToProjectedUnits(c)};n(a.prototype,"addCredits",function(c,b){b=e(!0,this.options.credits,b);this.mapCredits&&
(b.href=null);c.call(this,b);this.credits&&this.mapCreditsFull&&this.credits.attr({title:this.mapCreditsFull})});q.geojson=g;return{geojson:g,topo2geo:d}});w(a,"Core/Geometry/PolygonClip.js",[],function(){var a=function(a,m,d){return(m[0]-a[0])*(d[1]-a[1])>(m[1]-a[1])*(d[0]-a[0])},n=function(a,m,d,g){var h=[a[0]-m[0],a[1]-m[1]],r=[d[0]-g[0],d[1]-g[1]];a=a[0]*m[1]-a[1]*m[0];d=d[0]*g[1]-d[1]*g[0];g=1/(h[0]*r[1]-h[1]*r[0]);h=[(a*r[0]-d*h[0])*g,(a*r[1]-d*h[1])*g];h.isIntersection=!0;return h},q;(function(h){h.clipLineString=
function(a,d){var g=[];a=h.clipPolygon(a,d,!1);for(d=1;d<a.length;d++)a[d].isIntersection&&a[d-1].isIntersection&&(g.push(a.splice(0,d)),d=0),d===a.length-1&&g.push(a);return g};h.clipPolygon=function(m,d,g){void 0===g&&(g=!0);for(var h=d[d.length-1],r,l,v=m,e=0;e<d.length;e++){var c=v;m=d[e];v=[];r=g?c[c.length-1]:c[0];for(var b=0;b<c.length;b++)l=c[b],a(h,m,l)?(a(h,m,r)||v.push(n(h,m,r,l)),v.push(l)):a(h,m,r)&&v.push(n(h,m,r,l)),r=l;h=m}return v}})(q||(q={}));return q});w(a,"Maps/Projections/LambertConformalConic.js",
[],function(){var a=Math.sign||function(a){return 0===a?0:0<a?1:-1},n=Math.PI/180,q=Math.PI/2;return function(){function h(h){var d,g=(h.parallels||[]).map(function(a){return a*n}),m=g[0]||0;g=null!==(d=g[1])&&void 0!==d?d:m;d=Math.cos(m);"object"===typeof h.projectedBounds&&(this.projectedBounds=h.projectedBounds);h=m===g?Math.sin(m):Math.log(d/Math.cos(g))/Math.log(Math.tan((q+g)/2)/Math.tan((q+m)/2));1e-10>Math.abs(h)&&(h=1e-10*(a(h)||1));this.n=h;this.c=d*Math.pow(Math.tan((q+m)/2),h)/h}h.prototype.forward=
function(a){var d=a[0]*n,g=this.c,h=this.n,m=this.projectedBounds;a=a[1]*n;0<g?a<-q+.000001&&(a=-q+.000001):a>q-.000001&&(a=q-.000001);var l=g/Math.pow(Math.tan((q+a)/2),h);a=l*Math.sin(h*d)*63.78137;d=63.78137*(g-l*Math.cos(h*d));g=[a,d];m&&(a<m.x1||a>m.x2||d<m.y1||d>m.y2)&&(g.outside=!0);return g};h.prototype.inverse=function(h){var d=h[0]/63.78137,g=this.c,m=this.n;h=g-h[1]/63.78137;var r=a(m)*Math.sqrt(d*d+h*h),l=Math.atan2(d,Math.abs(h))*a(h);0>h*m&&(l-=Math.PI*a(d)*a(h));return[l/m/n,(2*Math.atan(Math.pow(g/
r,1/m))-q)/n]};return h}()});w(a,"Maps/Projections/EqualEarth.js",[],function(){var a=Math.sqrt(3)/2;return function(){function n(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-97.52595454902263,y2:97.52595454902263}}n.prototype.forward=function(n){var h=Math.PI/180,m=Math.asin(a*Math.sin(n[1]*h)),d=m*m,g=d*d*d;return[n[0]*h*Math.cos(m)*74.03120656864502/(a*(1.340264+3*-.081106*d+g*(7*.000893+.034164*d))),74.03120656864502*m*(1.340264+-.081106*d+g*(.000893+.003796*d))]};n.prototype.inverse=
function(n){var h=n[0]/74.03120656864502;n=n[1]/74.03120656864502;var m=180/Math.PI,d=n,g;for(g=0;12>g;++g){var q=d*d;var r=q*q*q;var l=d*(1.340264+-.081106*q+r*(.000893+.003796*q))-n;q=1.340264+3*-.081106*q+r*(7*.000893+.034164*q);d-=l/=q;if(1e-9>Math.abs(l))break}q=d*d;return[m*a*h*(1.340264+3*-.081106*q+q*q*q*(7*.000893+.034164*q))/Math.cos(d),m*Math.asin(Math.sin(d)/a)]};return n}()});w(a,"Maps/Projections/Miller.js",[],function(){var a=Math.PI/4,n=Math.PI/180;return function(){function q(){this.bounds=
{x1:-200.37508342789243,x2:200.37508342789243,y1:-146.91480769173063,y2:146.91480769173063}}q.prototype.forward=function(h){return[h[0]*n*63.78137,79.7267125*Math.log(Math.tan(a+.4*h[1]*n))]};q.prototype.inverse=function(h){return[h[0]/63.78137/n,2.5*(Math.atan(Math.exp(h[1]/63.78137*.8))-a)/n]};return q}()});w(a,"Maps/Projections/Orthographic.js",[],function(){var a=Math.PI/180;return function(){function n(){this.antimeridianCutting=!1;this.bounds={x1:-63.78460826781007,x2:63.78460826781007,y1:-63.78460826781007,
y2:63.78460826781007}}n.prototype.forward=function(n){var h=n[0];n=n[1]*a;n=[Math.cos(n)*Math.sin(h*a)*63.78460826781007,63.78460826781007*Math.sin(n)];if(-90>h||90<h)n.outside=!0;return n};n.prototype.inverse=function(n){var h=n[0]/63.78460826781007;n=n[1]/63.78460826781007;var m=Math.sqrt(h*h+n*n),d=Math.asin(m),g=Math.sin(d);return[Math.atan2(h*g,m*Math.cos(d))/a,Math.asin(m&&n*g/m)/a]};return n}()});w(a,"Maps/Projections/WebMercator.js",[],function(){var a=Math.PI/180;return function(){function n(){this.bounds=
{x1:-200.37508342789243,x2:200.37508342789243,y1:-200.3750834278071,y2:200.3750834278071};this.maxLatitude=85.0511287798}n.prototype.forward=function(n){var h=Math.sin(n[1]*a);h=[63.78137*n[0]*a,63.78137*Math.log((1+h)/(1-h))/2];85.0511287798<Math.abs(n[1])&&(h.outside=!0);return h};n.prototype.inverse=function(n){return[n[0]/(63.78137*a),(2*Math.atan(Math.exp(n[1]/63.78137))-Math.PI/2)/a]};return n}()});w(a,"Maps/Projections/ProjectionRegistry.js",[a["Maps/Projections/LambertConformalConic.js"],
a["Maps/Projections/EqualEarth.js"],a["Maps/Projections/Miller.js"],a["Maps/Projections/Orthographic.js"],a["Maps/Projections/WebMercator.js"]],function(a,n,q,h,m){return{EqualEarth:n,LambertConformalConic:a,Miller:q,Orthographic:h,WebMercator:m}});w(a,"Maps/Projection.js",[a["Core/Geometry/PolygonClip.js"],a["Maps/Projections/ProjectionRegistry.js"],a["Core/Utilities.js"]],function(a,n,q){var h=this&&this.__spreadArrays||function(){for(var a=0,e=0,c=arguments.length;e<c;e++)a+=arguments[e].length;
a=Array(a);var b=0;for(e=0;e<c;e++)for(var d=arguments[e],g=0,l=d.length;g<l;g++,b++)a[b]=d[g];return a},m=a.clipLineString,d=a.clipPolygon,g=q.clamp,u=q.erase,r=2*Math.PI/360,l=function(a){-180>a&&(a+=360);180<a&&(a-=360);return a};return function(){function a(e){void 0===e&&(e={});this.hasGeoProjection=this.hasCoordinates=!1;this.maxLatitude=90;this.options=e;var c=e.name,b=e.projectedBounds,d=e.rotation;this.rotator=d?this.getRotator(d):void 0;if(c=c?a.registry[c]:void 0)this.def=new c(e);var g=
this.def,l=this.rotator;g&&(this.maxLatitude=g.maxLatitude||90,this.hasGeoProjection=!0);l&&g?(this.forward=function(b){return g.forward(l.forward(b))},this.inverse=function(b){return l.inverse(g.inverse(b))}):g?(this.forward=function(b){return g.forward(b)},this.inverse=function(b){return g.inverse(b)}):l&&(this.forward=l.forward,this.inverse=l.inverse);this.bounds="world"===b?g&&g.bounds:b}a.add=function(e,c){a.registry[e]=c};a.greatCircle=function(a,c,b){var e=Math.atan2,d=Math.cos,g=Math.sin,
l=Math.sqrt,h=a[1]*r,n=a[0]*r,f=c[1]*r,k=c[0]*r,m=f-h,q=k-n;m=g(m/2)*g(m/2)+d(h)*d(f)*g(q/2)*g(q/2);m=2*e(l(m),l(1-m));var v=Math.round(6371E3*m/5E5);q=[];b&&q.push(a);if(1<v)for(v=a=1/v;.999>v;v+=a){var u=g((1-v)*m)/g(m),E=g(v*m)/g(m),y=u*d(h)*d(n)+E*d(f)*d(k),A=u*d(h)*g(n)+E*d(f)*g(k);u=u*g(h)+E*g(f);u=e(u,l(y*y+A*A));y=e(A,y);q.push([y/r,u/r])}b&&q.push(c);return q};a.insertGreatCircles=function(e){for(var c=e.length-1;c--;)if(10<Math.max(Math.abs(e[c][0]-e[c+1][0]),Math.abs(e[c][1]-e[c+1][1]))){var b=
a.greatCircle(e[c],e[c+1]);b.length&&e.splice.apply(e,h([c+1,0],b))}};a.toString=function(a){a=a||{};var c=a.rotation;return[a.name,c&&c.join(",")].join(";")};a.prototype.lineIntersectsBounds=function(a){var c=this.bounds||{},b=c.x2,e=c.y1,d=c.y2,g=function(b,a,c){var f=b[0];b=b[1];var e=a?0:1;if("number"===typeof c&&f[a]>=c!==b[a]>=c)return f=f[e]+(c-f[a])/(b[a]-f[a])*(b[e]-f[e]),a?[f,c]:[c,f]},l=a[0];if(c=g(a,0,c.x1))l=c,a[1]=c;else if(c=g(a,0,b))l=c,a[1]=c;if(c=g(a,1,e))l=c;else if(c=g(a,1,d))l=
c;return l};a.prototype.getRotator=function(a){var c=a[0]*r,b=(a[1]||0)*r;a=(a[2]||0)*r;var e=Math.cos(b),d=Math.sin(b),g=Math.cos(a),l=Math.sin(a);if(0!==c||0!==b||0!==a)return{forward:function(a){var b=a[0]*r+c,f=a[1]*r,k=Math.cos(f);a=Math.cos(b)*k;b=Math.sin(b)*k;f=Math.sin(f);k=f*e+a*d;return[Math.atan2(b*g-k*l,a*e-f*d)/r,Math.asin(k*g+b*l)/r]},inverse:function(a){var b=a[0]*r,f=a[1]*r,k=Math.cos(f);a=Math.cos(b)*k;b=Math.sin(b)*k;f=Math.sin(f);k=f*g-b*l;return[(Math.atan2(b*g+f*l,a*e+k*d)-c)/
r,Math.asin(k*e-a*d)/r]}}};a.prototype.forward=function(a){return a};a.prototype.inverse=function(a){return a};a.prototype.cutOnAntimeridian=function(e,c){var b=[],d=[e];e.forEach(function(a,f){var d=e[f-1];if(!f){if(!c)return;d=e[e.length-1]}var k=d[0],y=a[0];(-90>k||90<k)&&(-90>y||90<y)&&0<k!==0<y&&(y=g((180-(k+360)%360)/((y+360)%360-(k+360)%360),0,1),b.push({i:f,lat:d[1]+y*(a[1]-d[1]),direction:0>k?1:-1,previousLonLat:d,lonLat:a}))});if(b.length)if(c){if(1===b.length%2){var n=b.slice().sort(function(a,
b){return Math.abs(b.lat)-Math.abs(a.lat)})[0];u(b,n)}for(var m=b.length-2;0<=m;){var p=b[m].i,r=l(180+.000001*b[m].direction),x=l(180-.000001*b[m].direction);p=e.splice.apply(e,h([p,b[m+1].i-p],a.greatCircle([r,b[m].lat],[r,b[m+1].lat],!0)));p.push.apply(p,a.greatCircle([x,b[m+1].lat],[x,b[m].lat],!0));d.push(p);m-=2}if(n)for(r=0;r<d.length;r++){m=n.direction;var f=n.lat;x=d[r];p=x.indexOf(n.lonLat);if(-1<p){r=(0>f?-1:1)*this.maxLatitude;var k=l(180+.000001*m),q=l(180-.000001*m);f=a.greatCircle([k,
f],[k,r],!0);for(k+=120*m;-180<k&&180>k;k+=120*m)f.push([k,r]);f.push.apply(f,a.greatCircle([q,r],[q,n.lat],!0));x.splice.apply(x,h([p,0],f));break}}}else for(m=b.length;m--;)p=b[m].i,p=e.splice(p,e.length,[l(180+.000001*b[m].direction),b[m].lat]),p.unshift([l(180-.000001*b[m].direction),b[m].lat]),d.push(p);return d};a.prototype.path=function(e){var c=this,b=this.bounds,g=this.def,l=this.rotator,h=[],p="Polygon"===e.type||"MultiPolygon"===e.type,n=this.hasGeoProjection,r=!g||!1!==g.antimeridianCutting,
f=r?l:void 0,k=r?g||this:this,q;b&&(q=[[b.x1,b.y1],[b.x2,b.y1],[b.x2,b.y2],[b.x1,b.y2]]);var v=function(e){e=e.map(function(a){if(r){f&&(a=f.forward(a));var b=a[0];.000001>Math.abs(b-180)&&(b=180>b?179.999999:180.000001);a=[b,a[1]]}return a});var g=[e];n&&(a.insertGreatCircles(e),r&&(g=c.cutOnAntimeridian(e,p)));g.forEach(function(c){if(!(2>c.length)){var f=!1,e=!1,g=function(a){f?h.push(["L",a[0],a[1]]):(h.push(["M",a[0],a[1]]),f=!0)},l=!1,t=!1,x=c.map(function(a){a=k.forward(a);a.outside?l=!0:t=
!0;Infinity===a[1]?a[1]=1E10:-Infinity===a[1]&&(a[1]=-1E10);return a});if(r){p&&x.push(x[0]);if(l){if(!t)return;if(q)if(p)x=d(x,q);else if(b){m(x,q).forEach(function(a){f=!1;a.forEach(g)});return}}x.forEach(g)}else for(var K=0;K<x.length;K++){var v=c[K],u=x[K];if(u.outside)e=!0;else{if(p&&!E){var E=v;c.push(v);x.push(u)}e&&B&&(p&&n?a.greatCircle(B,v).forEach(function(a){return g(k.forward(a))}):f=!1);g(u);var B=v;e=!1}}}})};"LineString"===e.type?v(e.coordinates):"MultiLineString"===e.type?e.coordinates.forEach(function(a){return v(a)}):
"Polygon"===e.type?(e.coordinates.forEach(function(a){return v(a)}),h.length&&h.push(["Z"])):"MultiPolygon"===e.type&&(e.coordinates.forEach(function(a){a.forEach(function(a){return v(a)})}),h.length&&h.push(["Z"]));return h};a.registry=n;return a}()});w(a,"Maps/MapView.js",[a["Maps/MapViewOptionsDefault.js"],a["Maps/MapViewInsetsOptionsDefault.js"],a["Extensions/GeoJSON.js"],a["Core/Chart/MapChart.js"],a["Maps/MapUtilities.js"],a["Maps/Projection.js"],a["Core/Utilities.js"]],function(a,n,q,h,m,d,
g){var u=this&&this.__extends||function(){var a=function(b,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return a(b,c)};return function(b,c){function f(){this.constructor=b}a(b,c);b.prototype=null===c?Object.create(c):(f.prototype=c.prototype,new f)}}(),r=this&&this.__spreadArrays||function(){for(var a=0,b=0,c=arguments.length;b<c;b++)a+=arguments[b].length;a=Array(a);var f=0;for(b=0;b<c;b++)for(var e=
arguments[b],d=0,k=e.length;d<k;d++,f++)a[f]=e[d];return a},l=q.topo2geo,v=h.maps,e=m.boundsFromPath,c=m.pointInPolygon,b=g.addEvent,t=g.clamp,C=g.fireEvent,F=g.isArray,p=g.isNumber,z=g.isObject,x=g.isString,f=g.merge,k=g.pick,B=g.relativeLength,I=function(a,b){return Math.log(400.979322/Math.max((a.x2-a.x1)/(b.width/256),(a.y2-a.y1)/(b.height/256)))/Math.log(2)},G=function(){function e(c,k){var g=this;this.insets=[];this.padding=[0,0,0,0];this.eventsToUnbind=[];var y;if(!(this instanceof H)){var l=
r([c.options.chart.map],(c.options.series||[]).map(function(a){return a.mapData})).map(function(a){return g.getGeoMap(a)}),h=[];l.forEach(function(a){a&&(y||(y=a["hc-recommended-mapview"]),a.bbox&&(a=a.bbox,h.push({x1:a[0],y1:a[1],x2:a[2],y2:a[3]})))});var A=h.length&&e.compositeBounds(h);if(A){var m=A.x1;var n=A.y1,t=A.x2;A=A.y2;m=180<t-m&&90<A-n?{name:"EqualEarth"}:{name:"LambertConformalConic",parallels:[n,A],rotation:[-(m+t)/2]}}this.geoMap=l[0]}this.userOptions=k||{};l=f(a,{projection:m},y,k);
A=y&&y.insets;k=k&&k.insets;A&&k&&(l.insets=e.mergeInsets(A,k));this.chart=c;this.center=l.center;this.options=l;this.projection=new d(l.projection);this.playingField=c.plotBox;this.zoom=l.zoom||0;this.createInsets();this.eventsToUnbind.push(b(c,"afterSetChartSize",function(){g.playingField=g.getField();if(void 0===g.minZoom||g.minZoom===g.zoom)g.fitToBounds(void 0,void 0,!1),p(g.userOptions.zoom)&&(g.zoom=g.userOptions.zoom),g.userOptions.center&&f(!0,g.center,g.userOptions.center)}));this.setUpEvents()}
e.mergeInsets=function(a,b){var c=function(a){var b={};a.forEach(function(a,c){b[a&&a.id||"i"+c]=a});return b},e=f(c(a),c(b));return Object.keys(e).map(function(a){return e[a]})};e.prototype.createInsets=function(){var a=this,b=this.options,c=b.insets;c&&c.forEach(function(c){c=new H(a,f(b.insetOptions,c));a.insets.push(c)})};e.prototype.fitToBounds=function(a,b,c,f){void 0===c&&(c=!0);var e=a||this.getProjectedBounds();if(e){var d=k(b,a?0:this.options.padding);b=this.getField(!1);d=F(d)?d:[d,d,d,
d];this.padding=[B(d[0],b.height),B(d[1],b.width),B(d[2],b.height),B(d[3],b.width)];this.playingField=this.getField();b=I(e,this.playingField);a||(this.minZoom=b);a=this.projection.inverse([(e.x2+e.x1)/2,(e.y2+e.y1)/2]);this.setView(a,b,c,f)}};e.prototype.getField=function(a){void 0===a&&(a=!0);a=a?this.padding:[0,0,0,0];return{x:a[3],y:a[0],width:this.chart.plotWidth-a[1]-a[3],height:this.chart.plotHeight-a[0]-a[2]}};e.prototype.getGeoMap=function(a){if(x(a))return v[a];if(z(a,!0)){if("FeatureCollection"===
a.type)return a;if("Topology"===a.type)return l(a)}};e.prototype.getMapBBox=function(){var a=this.getProjectedBounds(),b=this.getScale();if(a){var c=this.padding,f=this.projectedUnitsToPixels({x:a.x1,y:a.y2});return{width:(a.x2-a.x1)*b+c[1]+c[3],height:(a.y2-a.y1)*b+c[0]+c[2],x:f.x-c[3],y:f.y-c[0]}}};e.prototype.getProjectedBounds=function(){var a=this.chart.series.reduce(function(a,b){var c=b.getProjectedBounds&&b.getProjectedBounds();c&&!1!==b.options.affectsMapView&&a.push(c);return a},[]);return this.projection.bounds||
e.compositeBounds(a)};e.prototype.getScale=function(){return 256/400.979322*Math.pow(2,this.zoom)};e.prototype.getSVGTransform=function(){var a=this.playingField,b=a.x,c=a.y,f=a.width;a=a.height;var e=this.projection.forward(this.center),d=this.projection.hasCoordinates?-1:1,k=this.getScale();d*=k;return{scaleX:k,scaleY:d,translateX:b+f/2-e[0]*k,translateY:c+a/2-e[1]*d}};e.prototype.lonLatToPixels=function(a){if(a=this.lonLatToProjectedUnits(a))return this.projectedUnitsToPixels(a)};e.prototype.lonLatToProjectedUnits=
function(a){var b=this.chart,f=b.mapTransforms;if(f){for(var e in f)if(Object.hasOwnProperty.call(f,e)&&f[e].hitZone){var d=b.transformFromLatLon(a,f[e]);if(d&&c(d,f[e].hitZone.coordinates[0]))return d}return b.transformFromLatLon(a,f["default"])}f=0;for(e=this.insets;f<e.length;f++)if(b=e[f],b.options.geoBounds&&c({x:a.lon,y:a.lat},b.options.geoBounds.coordinates[0]))return a=b.projection.forward([a.lon,a.lat]),a=b.projectedUnitsToPixels({x:a[0],y:a[1]}),this.pixelsToProjectedUnits(a);a=this.projection.forward([a.lon,
a.lat]);if(!a.outside)return{x:a[0],y:a[1]}};e.prototype.projectedUnitsToLonLat=function(a){var b=this.chart,f=b.mapTransforms;if(f){for(var e in f)if(Object.hasOwnProperty.call(f,e)&&f[e].hitZone&&c(a,f[e].hitZone.coordinates[0]))return b.transformToLatLon(a,f[e]);return b.transformToLatLon(a,f["default"])}f=this.projectedUnitsToPixels(a);e=0;for(var d=this.insets;e<d.length;e++)if(b=d[e],b.hitZone&&c(f,b.hitZone.coordinates[0]))return a=b.pixelsToProjectedUnits(f),a=b.projection.inverse([a.x,a.y]),
{lon:a[0],lat:a[1]};a=this.projection.inverse([a.x,a.y]);return{lon:a[0],lat:a[1]}};e.prototype.redraw=function(a){this.chart.series.forEach(function(a){a.useMapGeometry&&(a.isDirty=!0)});this.chart.redraw(a)};e.prototype.setView=function(a,b,c,f){void 0===c&&(c=!0);a&&(this.center=a);"number"===typeof b&&("number"===typeof this.minZoom&&(b=Math.max(b,this.minZoom)),"number"===typeof this.options.maxZoom&&(b=Math.min(b,this.options.maxZoom)),this.zoom=b);var e=this.getProjectedBounds();if(e){a=this.projection.forward(this.center);
var d=this.playingField;b=d.x;var k=d.y,g=d.width;d=d.height;var l=this.getScale(),h=this.projectedUnitsToPixels({x:e.x1,y:e.y1}),m=this.projectedUnitsToPixels({x:e.x2,y:e.y2});e=[(e.x1+e.x2)/2,(e.y1+e.y2)/2];var p=h.x,n=m.y;m=m.x;h=h.y;m-p<g?a[0]=e[0]:p<b&&m<b+g?a[0]+=Math.max(p-b,m-g-b)/l:m>b+g&&p>b&&(a[0]+=Math.min(m-g-b,p-b)/l);h-n<d?a[1]=e[1]:n<k&&h<k+d?a[1]-=Math.max(n-k,h-d-k)/l:h>k+d&&n>k&&(a[1]-=Math.min(h-d-k,n-k)/l);this.center=this.projection.inverse(a);this.insets.forEach(function(a){a.options.field&&
(a.hitZone=a.getHitZone(),a.playingField=a.getField())});this.render()}C(this,"afterSetView");c&&this.redraw(f)};e.prototype.projectedUnitsToPixels=function(a){var b=this.getScale(),c=this.projection.forward(this.center),f=this.playingField;return{x:f.x+f.width/2-b*(c[0]-a.x),y:f.y+f.height/2+b*(c[1]-a.y)}};e.prototype.pixelsToLonLat=function(a){return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(a))};e.prototype.pixelsToProjectedUnits=function(a){var b=a.x;a=a.y;var c=this.getScale(),
f=this.projection.forward(this.center),e=this.playingField;return{x:f[0]+(b-(e.x+e.width/2))/c,y:f[1]-(a-(e.y+e.height/2))/c}};e.prototype.setUpEvents=function(){var a=this,c=this.chart,f,e,d,k=function(b){var k=c.pointer.pinchDown,g=a.projection,l=c.mouseDownX,h=c.mouseDownY;1===k.length&&(l=k[0].chartX,h=k[0].chartY);if("number"===typeof l&&"number"===typeof h){var m=l+","+h,p=b.originalEvent;k=p.chartX;p=p.chartY;m!==e&&(e=m,f=a.projection.forward(a.center),d=(a.projection.options.rotation||[0,
0]).slice());m=(m=g.def&&g.def.bounds)&&I(m,a.playingField)||-Infinity;"Orthographic"===g.options.name&&(a.minZoom||Infinity)<1.1*m?(g=440/(a.getScale()*Math.min(c.plotWidth,c.plotHeight)),d&&(l=(l-k)*g-d[0],h=t(-d[1]-(h-p)*g,-80,80),k=a.zoom,a.update({projection:{rotation:[-l,-h]}},!1),a.zoom=k,c.redraw(!1))):(g=a.getScale(),h=a.projection.inverse([f[0]+(l-k)/g,f[1]-(h-p)/g]),a.setView(h,void 0,!0,!1));b.preventDefault()}};b(c,"pan",k);b(c,"touchpan",k);b(c,"selection",function(b){if(b.resetSelection)a.zoomBy();
else{var f=b.x-c.plotLeft,e=b.y-c.plotTop,d=a.pixelsToProjectedUnits({x:f,y:e}),k=d.y;d=d.x;f=a.pixelsToProjectedUnits({x:f+b.width,y:e+b.height});a.fitToBounds({x1:d,y1:k,x2:f.x,y2:f.y},void 0,!0,b.originalEvent.touches?!1:void 0);/^touch/.test(b.originalEvent.type)||c.showResetZoom();b.preventDefault()}})};e.prototype.render=function(){this.group||(this.group=this.chart.renderer.g("map-view").attr({zIndex:4}).add())};e.prototype.update=function(a,b,c){void 0===b&&(b=!0);var e=a.projection;e=e&&
d.toString(e)!==d.toString(this.options.projection);var k=!1;f(!0,this.userOptions,a);f(!0,this.options,a);"insets"in a&&(this.insets.forEach(function(a){return a.destroy()}),this.insets.length=0,k=!0);if(e||k)this.chart.series.forEach(function(a){var b=a.transformGroups;a.clearBounds&&a.clearBounds();a.isDirty=!0;a.isDirtyData=!0;if(k&&b)for(;1<b.length;)(a=b.pop())&&a.destroy()}),e&&(this.projection=new d(this.options.projection)),k&&this.createInsets(),a.center||p(a.zoom)||this.fitToBounds(void 0,
void 0,!1);(a.center||p(a.zoom))&&this.setView(this.options.center,a.zoom,!1);b&&this.chart.redraw(c)};e.prototype.zoomBy=function(a,b,c,f){var e=this.chart,d=this.projection.forward(this.center);b=b?this.projection.forward(b):[];var k=b[0],g=b[1];"number"===typeof a?(a=this.zoom+a,b=void 0,c&&(k=c[0],g=c[1],c=this.getScale(),k=k-e.plotLeft-e.plotWidth/2,e=g-e.plotTop-e.plotHeight/2,k=d[0]+k/c,g=d[1]+e/c),"number"===typeof k&&"number"===typeof g&&(c=1-Math.pow(2,this.zoom)/Math.pow(2,a),k=d[0]-k,
e=d[1]-g,d[0]-=k*c,d[1]+=e*c,b=this.projection.inverse(d)),this.setView(b,a,void 0,f)):this.fitToBounds(void 0,void 0,void 0,f)};e.compositeBounds=function(a){if(a.length)return a.slice(1).reduce(function(a,b){a.x1=Math.min(a.x1,b.x1);a.y1=Math.min(a.y1,b.y1);a.x2=Math.max(a.x2,b.x2);a.y2=Math.max(a.y2,b.y2);return a},f(a[0]))};return e}(),H=function(a){function b(b,c){var d=a.call(this,b.chart,c)||this;d.id=c.id;d.mapView=b;d.options=f(n,c);d.allBounds=[];d.options.geoBounds&&(b=b.projection.path(d.options.geoBounds),
d.geoBoundsProjectedBox=e(b),d.geoBoundsProjectedPolygon=b.map(function(a){return[a[1]||0,a[2]||0]}));return d}u(b,a);b.prototype.getField=function(b){void 0===b&&(b=!0);var c=this.hitZone;if(c){var f=b?this.padding:[0,0,0,0];c=c.coordinates[0];var e=c.map(function(a){return a[0]}),d=c.map(function(a){return a[1]});c=Math.min.apply(0,e)+f[3];e=Math.max.apply(0,e)-f[1];var k=Math.min.apply(0,d)+f[0];f=Math.max.apply(0,d)-f[2];if(p(c)&&p(k))return{x:c,y:k,width:e-c,height:f-k}}return a.prototype.getField.call(this,
b)};b.prototype.getHitZone=function(){var a=this.chart,b=this.mapView,c=this.options,e=(c.field||{}).coordinates;if(e){e=e[0];if("percent"===c.units){var d="mapBoundingBox"===c.relativeTo&&b.getMapBBox()||f(a.plotBox,{x:0,y:0});e=e.map(function(a){return[B(a[0]+"%",d.width,d.x),B(a[1]+"%",d.height,d.y)]})}return{type:"Polygon",coordinates:[e]}}};b.prototype.getProjectedBounds=function(){return G.compositeBounds(this.allBounds)};b.prototype.isInside=function(a){var b=this.geoBoundsProjectedBox,f=this.geoBoundsProjectedPolygon;
return!!(b&&a.x>=b.x1&&a.x<=b.x2&&a.y>=b.y1&&a.y<=b.y2&&f&&c(a,f))};b.prototype.render=function(){var a=this.chart,b=this.mapView,c=this.options,f=c.borderPath||c.field;if(f&&b.group){var e=!0;this.border||(this.border=a.renderer.path().addClass("highcharts-mapview-inset-border").add(b.group),e=!1);a.styledMode||this.border.attr({stroke:c.borderColor,"stroke-width":c.borderWidth});var d=Math.round(this.border.strokeWidth())%2/2,k="mapBoundingBox"===c.relativeTo&&b.getMapBBox()||b.playingField;b=(f.coordinates||
[]).reduce(function(b,f){return f.reduce(function(b,f,e){var g=f[0];f=f[1];"percent"===c.units&&(g=a.plotLeft+B(g+"%",k.width,k.x),f=a.plotTop+B(f+"%",k.height,k.y));g=Math.floor(g)+d;f=Math.floor(f)+d;b.push(0===e?["M",g,f]:["L",g,f]);return b},b)},[]);this.border[e?"animate":"attr"]({d:b})}};b.prototype.destroy=function(){this.border&&(this.border=this.border.destroy());this.eventsToUnbind.forEach(function(a){return a()})};b.prototype.setUpEvents=function(){};return b}(G);b(h,"afterInit",function(){this.mapView=
new G(this,this.options.mapView)});return G});w(a,"Series/Map/MapSeries.js",[a["Core/Animation/AnimationUtilities.js"],a["Series/ColorMapMixin.js"],a["Series/CenteredUtilities.js"],a["Core/Globals.js"],a["Core/Legend/LegendSymbol.js"],a["Core/Chart/MapChart.js"],a["Series/Map/MapPoint.js"],a["Maps/MapView.js"],a["Core/Series/Series.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Utilities.js"]],function(a,n,q,h,m,d,g,u,r,l,v,e){var c=this&&this.__extends||function(){var a=
function(b,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return a(b,c)};return function(b,c){function f(){this.constructor=b}a(b,c);b.prototype=null===c?Object.create(c):(f.prototype=c.prototype,new f)}}(),b=a.animObject;a=h.noop;var t=d.splitPath;d=l.seriesTypes;var C=d.column,F=d.scatter;d=e.extend;var p=e.find,z=e.fireEvent,x=e.getNestedProperty,f=e.isArray,k=e.isNumber,B=e.isObject,I=e.merge,
G=e.objectEach,H=e.pick,E=e.splat;e=function(a){function e(){var b=null!==a&&a.apply(this,arguments)||this;b.chart=void 0;b.data=void 0;b.group=void 0;b.joinBy=void 0;b.options=void 0;b.points=void 0;b.processedData=[];return b}c(e,a);e.prototype.animate=function(a){var c=this.chart,e=this.group,f=b(this.options.animation);c.renderer.isSVG&&(a?e.attr({translateX:c.plotLeft+c.plotWidth/2,translateY:c.plotTop+c.plotHeight/2,scaleX:.001,scaleY:.001}):e.animate({translateX:c.plotLeft,translateY:c.plotTop,
scaleX:1,scaleY:1},f))};e.prototype.animateDrilldown=function(a){var b=this.chart,c=this.group;b.renderer.isSVG&&(a?c.attr({translateX