/*
 Highcharts JS v6.0.1 (2017-10-05)

 (c) 2016 Highsoft AS
 Authors: Jon Arild Nygard

 License: www.highcharts.com/license
*/
(function(u){"object"===typeof module&&module.exports?module.exports=u:u(Highcharts)})(function(u){(function(b){var t=b.deg2rad,e=b.isNumber,h=b.pick,x=b.relativeLength;b.CenteredSeriesMixin={getCenter:function(){var b=this.options,q=this.chart,r=2*(b.slicedOffset||0),n=q.plotWidth-2*r,q=q.plotHeight-2*r,v=b.center,v=[h(v[0],"50%"),h(v[1],"50%"),b.size||"100%",b.innerSize||0],e=Math.min(n,q),w,C;for(w=0;4>w;++w)C=v[w],b=2>w||2===w&&/%$/.test(C),v[w]=x(C,[n,q,e,v[2]][w])+(b?r:0);v[3]>v[2]&&(v[3]=v[2]);
return v},getStartAndEndRadians:function(b,q){b=e(b)?b:0;q=e(q)&&q>b&&360>q-b?q:b+360;return{start:t*(b+-90),end:t*(q+-90)}}}})(u);var M=function(){return function(b){var t=this,e=t.graphic,h=b.animate,x=b.attr,m=b.onComplete,q=b.css,r=b.group,n=b.renderer,v=b.shapeArgs;b=b.shapeType;t.shouldDraw()?(e||(t.graphic=e=n[b](v).add(r)),e.css(q).attr(x).animate(h,void 0,m)):e&&e.animate(h,void 0,function(){t.graphic=e=e.destroy();"function"===typeof m&&m()})}}(),K=function(b){var t=b.each,e=b.extend,h=
b.pick;return{getColor:function(e,m){var q=m.index,r=m.levelMap,n=m.parentColor,v=m.parentColorIndex,t=m.series,w=m.colors,C=m.siblings,g=t.points,z,F,x;if(e){g=g[e.i];e=r[e.levelDynamic]||{};(z=g&&("boolean"===typeof e.colorByPoint?e.colorByPoint:!!t.options.colorByPoint))&&(F=w[g.index%w.length]);w=g&&g.options.color;z=e&&e.color;if(r=n)r=(r=e&&e.colorVariation)&&"brightness"===r.key?b.color(n).brighten(q/C*r.to).get():n;z=h(w,z,F,r,t.color);x=h(g&&g.options.colorIndex,e&&e.colorIndex,v,m.colorIndex)}return{color:z,
colorIndex:x}},setTreeValues:function m(b,r){var n=r.before,v=r.idRoot,q=r.mapIdToNode[v],w=r.points[b.i],C=w&&w.options||{},g=0,z=[];e(b,{levelDynamic:b.level-(("boolean"===typeof r.levelIsConstant?r.levelIsConstant:1)?0:q.level),name:h(w&&w.name,""),visible:v===b.id||("boolean"===typeof r.visible?r.visible:!1)});"function"===typeof n&&(b=n(b,r));t(b.children,function(n,h){var q=e({},r);e(q,{index:h,siblings:b.children.length,visible:b.visible});n=m(n,q);z.push(n);n.visible&&(g+=n.val)});b.visible=
0<g||b.visible;n=h(C.value,g);e(b,{children:z,childrenTotal:g,isLeaf:b.visible&&!g,val:n});return b}}}(u);(function(b,t){var e=b.seriesType,h=b.seriesTypes,x=b.map,m=b.merge,q=b.extend,r=b.noop,n=b.each,v=t.getColor,u=b.grep,w=b.isNumber,C=b.isString,g=b.pick,z=b.Series,F=b.stableSort,I=function(a,f,c){c=c||this;b.objectEach(a,function(b,d){f.call(c,b,d,a)})},G=b.reduce,D=function(a,f,c){c=c||this;a=f.call(c,a);!1!==a&&D(a,f,c)};e("treemap","scatter",{showInLegend:!1,marker:!1,dataLabels:{enabled:!0,
defer:!1,verticalAlign:"middle",formatter:function(){return this.point.name||this.point.id},inside:!0},tooltip:{headerFormat:"",pointFormat:"\x3cb\x3e{point.name}\x3c/b\x3e: {point.value}\x3cbr/\x3e"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,drillUpButton:{position:{align:"right",x:-10,y:10}}},{pointArrayMap:["value"],axisTypes:h.heatmap?["xAxis","yAxis","colorAxis"]:["xAxis","yAxis"],directTouch:!0,optionalAxis:"colorAxis",
getSymbol:r,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",translateColors:h.heatmap&&h.heatmap.prototype.translateColors,colorAttribs:h.heatmap&&h.heatmap.prototype.colorAttribs,trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,f){a=G(a||[],function(a,f,d){f=g(f.parent,"");void 0===a[f]&&(a[f]=[]);a[f].push(d);return a},{});I(a,function(a,A,d){""!==A&&-1===b.inArray(A,f)&&(n(a,function(a){d[""].push(a)}),delete d[A])});return a},getTree:function(){var a=x(this.data,
function(a){return a.id}),a=this.getListOfParents(this.data,a);this.nodeMap=[];return this.buildNode("",-1,0,a,null)},init:function(a,f){z.prototype.init.call(this,a,f);this.options.allowDrillToNode&&b.addEvent(this,"click",this.onClickDrillToNode)},buildNode:function(a,f,c,b,d){var k=this,l=[],A=k.points[f],B=0,y;n(b[a]||[],function(d){y=k.buildNode(k.points[d].id,d,c+1,b,a);B=Math.max(y.height+1,B);l.push(y)});f={id:a,i:f,children:l,height:B,level:c,parent:d,visible:!1};k.nodeMap[f.id]=f;A&&(A.node=
f);return f},setTreeValues:function(a){var f=this,c=f.options,b=0,d=[],k,l=f.points[a.i];n(a.children,function(a){a=f.setTreeValues(a);d.push(a);a.ignore||(b+=a.val)});F(d,function(a,d){return a.sortIndex-d.sortIndex});k=g(l&&l.options.value,b);l&&(l.value=k);q(a,{children:d,childrenTotal:b,ignore:!(g(l&&l.visible,!0)&&0<k),isLeaf:a.visible&&!b,levelDynamic:a.level-(c.levelIsConstant?f.nodeMap[f.rootNode].level:0),name:g(l&&l.name,""),sortIndex:g(l&&l.sortIndex,-k),val:k});return a},calculateChildrenAreas:function(a,
f){var c=this,b=c.options,d=this.levelMap[a.levelDynamic+1],k=g(c[d&&d.layoutAlgorithm]&&d.layoutAlgorithm,b.layoutAlgorithm),l=b.alternateStartingDirection,L=[];a=u(a.children,function(a){return!a.ignore});d&&d.layoutStartingDirection&&(f.direction="vertical"===d.layoutStartingDirection?0:1);L=c[k](f,a);n(a,function(a,d){d=L[d];a.values=m(d,{val:a.childrenTotal,direction:l?1-f.direction:f.direction});a.pointValues=m(d,{x:d.x/c.axisRatio,width:d.width/c.axisRatio});a.children.length&&c.calculateChildrenAreas(a,
a.values)})},setPointValues:function(){var a=this.xAxis,f=this.yAxis;n(this.points,function(c){var b=c.node,d=b.pointValues,k,l;d&&b.visible?(b=Math.round(a.translate(d.x,0,0,0,1))-0,k=Math.round(a.translate(d.x+d.width,0,0,0,1))-0,l=Math.round(f.translate(d.y,0,0,0,1))-0,d=Math.round(f.translate(d.y+d.height,0,0,0,1))-0,c.shapeType="rect",c.shapeArgs={x:Math.min(b,k),y:Math.min(l,d),width:Math.abs(k-b),height:Math.abs(d-l)},c.plotX=c.shapeArgs.x+c.shapeArgs.width/2,c.plotY=c.shapeArgs.y+c.shapeArgs.height/
2):(delete c.plotX,delete c.plotY)})},setColorRecursive:function(a,f,c,b,d){var k=this,l=k&&k.chart,l=l&&l.options&&l.options.colors,A;if(a){A=v(a,{colors:l,index:b,levelMap:k.levelMap,parentColor:f,parentColorIndex:c,series:k,siblings:d});if(f=k.points[a.i])f.color=A.color,f.colorIndex=A.colorIndex;n(a.children||[],function(d,c){k.setColorRecursive(d,A.color,A.colorIndex,c,a.children.length)})}},algorithmGroup:function(a,b,c,A){this.height=a;this.width=b;this.plot=A;this.startDirection=this.direction=
c;this.lH=this.nH=this.lW=this.nW=this.total=0;this.elArr=[];this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(a,c){return Math.max(a/c,c/a)}};this.addElement=function(a){this.lP.total=this.elArr[this.elArr.length-1];this.total+=a;0===this.direction?(this.lW=this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,
this.lP.lW=this.lP.total/this.lH,this.lP.lR=this.lP.aspectRatio(this.lP.lW,this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=this.lP.aspectRatio(this.lP.nW,this.nH));this.elArr.push(a)};this.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=0}},algorithmCalcPoints:function(a,b,c,A){var d,f,l,e,B=c.lW,y=c.lH,p=c.plot,r,h=0,q=c.elArr.length-1;b?(B=c.nW,y=c.nH):r=c.elArr[c.elArr.length-1];n(c.elArr,function(a){if(b||h<q)0===c.direction?(d=p.x,f=p.y,l=B,e=a/
l):(d=p.x,f=p.y,e=y,l=a/e),A.push({x:d,y:f,width:l,height:e}),0===c.direction?p.y+=e:p.x+=l;h+=1});c.reset();0===c.direction?c.width-=B:c.height-=y;p.y=p.parent.y+(p.parent.height-c.height);p.x=p.parent.x+(p.parent.width-c.width);a&&(c.direction=1-c.direction);b||c.addElement(r)},algorithmLowAspectRatio:function(a,b,c){var f=[],d=this,k,l={x:b.x,y:b.y,parent:b},e=0,B=c.length-1,y=new this.algorithmGroup(b.height,b.width,b.direction,l);n(c,function(c){k=c.val/b.val*b.height*b.width;y.addElement(k);
y.lP.nR>y.lP.lR&&d.algorithmCalcPoints(a,!1,y,f,l);e===B&&d.algorithmCalcPoints(a,!0,y,f,l);e+=1});return f},algorithmFill:function(a,b,c){var f=[],d,k=b.direction,l=b.x,e=b.y,B=b.width,y=b.height,p,r,h,q;n(c,function(c){d=c.val/b.val*b.height*b.width;p=l;r=e;0===k?(q=y,h=d/q,B-=h,l+=h):(h=B,q=d/h,y-=q,e+=q);f.push({x:p,y:r,width:h,height:q});a&&(k=1-k)});return f},strip:function(a,b){return this.algorithmLowAspectRatio(!1,a,b)},squarified:function(a,b){return this.algorithmLowAspectRatio(!0,a,b)},
sliceAndDice:function(a,b){return this.algorithmFill(!0,a,b)},stripes:function(a,b){return this.algorithmFill(!1,a,b)},translate:function(){var a=this,b=a.rootNode=g(a.rootNode,a.options.rootId,""),c,e;z.prototype.translate.call(a);a.levelMap=G(a.options.levels||[],function(a,b){a[b.level]=b;return a},{});e=a.tree=a.getTree();c=a.nodeMap[b];""===b||c&&c.children.length||(a.drillToNode("",!1),b=a.rootNode,c=a.nodeMap[b]);D(a.nodeMap[a.rootNode],function(b){var d=!1,c=b.parent;b.visible=!0;if(c||""===
c)d=a.nodeMap[c];return d});D(a.nodeMap[a.rootNode].children,function(a){var b=!1;n(a,function(a){a.visible=!0;a.children.length&&(b=(b||[]).concat(a.children))});return b});a.setTreeValues(e);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=b={x:0,y:0,width:100,height:100};a.nodeMap[""].values=b=m(b,{width:b.width*a.axisRatio,direction:"vertical"===a.options.layoutStartingDirection?0:1,val:e.val});a.calculateChildrenAreas(e,b);a.colorAxis?a.translateColors():a.options.colorByPoint||
a.setColorRecursive(a.tree);a.options.allowDrillToNode&&(c=c.pointValues,a.xAxis.setExtremes(c.x,c.x+c.width,!1),a.yAxis.setExtremes(c.y,c.y+c.height,!1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()},drawDataLabels:function(){var a=this,b=u(a.points,function(a){return a.node.visible}),c,e;n(b,function(b){e=a.levelMap[b.node.levelDynamic];c={style:{}};b.node.isLeaf||(c.enabled=!1);e&&e.dataLabels&&(c=m(c,e.dataLabels),a._hasPointLabels=!0);b.shapeArgs&&(c.style.width=b.shapeArgs.width,
b.dataLabel&&b.dataLabel.css({width:b.shapeArgs.width+"px"}));b.dlOptions=m(c,b.options.dataLabels)});z.prototype.drawDataLabels.call(this)},alignDataLabel:function(a){h.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},drawPoints:function(){var a=this,b=u(a.points,function(a){return a.node.visible});n(b,function(b){var c="level-group-"+b.node.levelDynamic;a[c]||(a[c]=a.chart.renderer.g(c).attr({zIndex:1E3-b.node.levelDynamic}).add(a.group));
b.group=a[c]});h.column.prototype.drawPoints.call(this);this.colorAttribs&&n(this.points,function(a){a.graphic.css(this.colorAttribs(a))},this);a.options.allowDrillToNode&&n(b,function(b){b.graphic&&(b.drillId=a.options.interactByLeaf?a.drillToByLeaf(b):a.drillToByGroup(b))})},onClickDrillToNode:function(a){var b=(a=a.point)&&a.drillId;C(b)&&(a.setState(""),this.drillToNode(b))},drillToByGroup:function(a){var b=!1;1!==a.node.level-this.nodeMap[this.rootNode].level||a.node.isLeaf||(b=a.id);return b},
drillToByLeaf:function(a){var b=!1;if(a.node.parent!==this.rootNode&&a.node.isLeaf)for(a=a.node;!b;)a=this.nodeMap[a.parent],a.parent===this.rootNode&&(b=a.id);return b},drillUp:function(){var a=this.nodeMap[this.rootNode];a&&C(a.parent)&&this.drillToNode(a.parent)},drillToNode:function(a,b){var c=this.nodeMap[a];this.idPreviousRoot=this.rootNode;this.rootNode=a;""===a?this.drillUpButton=this.drillUpButton.destroy():this.showDrillUpButton(c&&c.name||a);this.isDirty=!0;g(b,!0)&&this.chart.redraw()},
showDrillUpButton:function(a){var b=this;a=a||"\x3c Back";var c=b.options.drillUpButton,e,d;c.text&&(a=c.text);this.drillUpButton?this.drillUpButton.attr({text:a}).align():(d=(e=c.theme)&&e.states,this.drillUpButton=this.chart.renderer.button(a,null,null,function(){b.drillUp()},e,d&&d.hover,d&&d.select).attr({align:c.position.align,zIndex:7}).add().align(c.position,!1,c.relativeTo||"plotBox"))},buildKDTree:r,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,getExtremes:function(){z.prototype.getExtremes.call(this,
this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;z.prototype.getExtremes.call(this)},getExtremesFromAll:!0,bindAxes:function(){var a={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,dataMin:0,minPadding:0,max:100,dataMax:100,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};z.prototype.bindAxes.call(this);b.extend(this.yAxis.options,a);b.extend(this.xAxis.options,a)},utils:{recursive:D,reduce:G}},{getClassName:function(){var a=b.Point.prototype.getClassName.call(this),
e=this.series,c=e.options;this.node.level<=e.nodeMap[e.rootNode].level?a+=" highcharts-above-level":this.node.isLeaf||g(c.interactByLeaf,!c.allowDrillToNode)?this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a},isValid:function(){return this.id||w(this.value)},setState:function(a){b.Point.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})},setVisible:h.pie.prototype.pointClass.prototype.setVisible})})(u,K);(function(b,
t,e){var h=b.CenteredSeriesMixin,x=b.Series,m=b.each,q=b.extend,r=h.getCenter,n=e.getColor,v=h.getStartAndEndRadians,u=b.grep,w=b.isNumber,C=b.isObject,g=b.isString,z=b.merge,F=b.pick,I=180/Math.PI,h=b.seriesType,G=e.setTreeValues,D=b.reduce,a=function(a,b){var c=a.start,d=a.end-c,e=a.val,f=a.x,y=a.y,p=a.r,h=p+a.radius;return D(b||[],function(b,k){k={x:f,y:y,innerR:p,r:h,radius:a.radius,start:c,end:c+1/e*k.val*d};b.push(k);c=k.end;return b},[])},f=function d(b,c){var e=[];b=u(b.children,function(a){return a.visible});
e=a(c,b);m(b,function(a,b){b=e[b];var c=b.start+(b.end-b.start)/2,k=b.innerR+(b.r-b.innerR)/2,c=0===b.innerR&&6.28<b.end-b.start?{x:b.x,y:b.y}:{x:b.x+Math.cos(c)*k,y:b.y+Math.sin(c)*k},k=a.val?a.childrenTotal>a.val?a.childrenTotal:a.val:a.childrenTotal;a.shapeArgs=z(b,{plotX:c.x,plotY:c.y});a.values=z(b,{val:k});a.children.length&&d(a,a.values)})},c=function(a,b){var c=b.mapIdToNode[a.parent],d=b.series,e=d.chart,f=d.points[a.i];b=n(a,{colors:e&&e.options&&e.options.colors,colorIndex:d.colorIndex,
colorByPoint:d.colorByPoint,index:b.index,levelMap:b.levelMap,parentColor:c&&c.color,parentColorIndex:c&&c.colorIndex,series:b.series,siblings:b.siblings});a.color=b.color;a.colorIndex=b.colorIndex;f&&(f.color=a.color,f.colorIndex=a.colorIndex);return a};h("sunburst","treemap",{center:["50%","50%"],dataLabels:{defer:!0,style:{textOverflow:"ellipsis"},rotationMode:"perpendicular"},rootId:void 0,levelIsConstant:!0},{drawDataLabels:b.noop,drawPoints:function(){var a=this,b=a.levelMap,c=a.shapeRoot,e=
a.group,f=a.hasRendered,h=a.rootNode,n=a.idPreviousRoot,r=a.nodeMap,g=r[n],v=g&&g.shapeArgs,g=a.points,t=a.startAndEndRadians,u=a.chart,u=u&&u.options&&u.options.chart||{},D="boolean"===typeof u.animation?u.animation:!0,H=a.center[3]/2,F=a.chart.renderer,G,J=!1;if(u=!!(D&&f&&h!==n&&a.dataLabelsGroup))a.dataLabelsGroup.attr({opacity:0}),G=function(){a.dataLabelsGroup&&a.dataLabelsGroup.animate({opacity:1,visibility:"visible"})};m(g,function(d){var k,l,g=d.node,p=b[g.levelDynamic];k=d.shapeExisting||
{};var m=g.shapeArgs||{},y=a.pointAttribs(d,d.selected&&"select"),u,B=!(!g.visible||!g.shapeArgs);if(f&&D){l={end:m.end,start:m.start,innerR:m.innerR,r:m.r};var x={};B?!d.graphic&&v&&(x=h===d.id?{start:t.start,end:t.end}:v.end<=m.start?{start:t.end,end:t.end}:{start:t.start,end:t.start},x.innerR=x.r=H):d.graphic&&(n===d.id?l={innerR:H,r:H}:c&&(l=c.end<=k.start?{innerR:H,r:H,start:t.end,end:t.end}:{innerR:H,r:H,start:t.start,end:t.start}));k=x}else l=m,k={};var x=[m.plotX,m.plotY],E;d.node.isLeaf||
(h===d.id?(E=r[h],E=E.parent):E=d.id);q(d,{shapeExisting:m,tooltipPos:x,drillId:E,name:""+(d.name||d.id||d.index),plotX:m.plotX,plotY:m.plotY,value:g.val,isNull:!B});x=d.options;E=a.options;g=C(m)?m:{};E=C(E)?E.dataLabels:{};x=C(x)?x.dataLabels:{};p=C(p)?p.dataLabels:{};p=z({rotationMode:"perpendicular",style:{width:g.radius}},E,p,x);w(p.rotation)||(g=g.end-(g.end-g.start)/2,g=g*I%180,"parallel"===p.rotationMode&&(g-=90),90<g&&(g-=180),p.rotation=g);0===p.rotation&&(p.rotation=.001);d.dlOptions=p;
!J&&B&&(J=!0,u=G);d.draw({animate:l,attr:q(k,y),onComplete:u,group:e,renderer:F,shapeType:"arc",shapeArgs:m})});u&&J?(a.hasRendered=!1,a.options.dataLabels.defer=!0,x.prototype.drawDataLabels.call(a),a.hasRendered=!0):x.prototype.drawDataLabels.call(a)},pointAttribs:b.seriesTypes.column.prototype.pointAttribs,translate:function(){var a=this.options,b=this.center=r.call(this),e=this.startAndEndRadians=v(a.startAngle,a.endAngle),h=b[3]/2,n=b[2]/2,m=this.rootNode=F(this.rootNode,a.rootId,""),p=this.nodeMap,
q,t=p&&p[m],u,w;this.shapeRoot=t&&t.shapeArgs;x.prototype.translate.call(this);this.levelMap=D(this.options.levels||[],function(a,b){a[b.level]=b;return a},{});w=this.tree=this.getTree();p=this.nodeMap;t=p[m];q=g(t.parent)?t.parent:"";u=p[q];G(w,{before:c,idRoot:m,levelIsConstant:a.levelIsConstant,levelMap:this.levelMap,mapIdToNode:p,points:this.points,series:this});a=p[""].shapeArgs={end:e.end,r:h,radius:(n-h)/(m===q?t.height:t.height+1),start:e.start,val:u.val,x:b[0],y:b[1]};f(u,a)},animate:function(a){var b=
this.chart,c=[b.plotWidth/2,b.plotHeight/2],d=b.plotLeft,e=b.plotTop,b=this.group;a?(a={translateX:c[0]+d,translateY:c[1]+e,scaleX:.001,scaleY:.001,rotation:10,opacity:.01},b.attr(a)):(a={translateX:d,translateY:e,scaleX:1,scaleY:1,rotation:0,opacity:1},b.animate(a,this.options.animation),this.animate=null)}},{draw:t,shouldDraw:function(){return!this.isNull}})})(u,M,K)});
