/*
 Highcharts JS v6.1.1 (2018-06-27)

 (c) 2016 Highsoft AS
 Authors: Jon Arild Nygard

 License: www.highcharts.com/license
*/
(function(n){"object"===typeof module&&module.exports?module.exports=n:n(Highcharts)})(function(n){var E=function(){return function(a){var p=this,d=p.graphic,A=a.animate,t=a.attr,q=a.onComplete,k=a.css,w=a.group,n=a.renderer,u=a.shapeArgs;a=a.shapeType;p.shouldDraw()?(d||(p.graphic=d=n[a](u).add(w)),d.css(k).attr(t).animate(A,void 0,q)):d&&d.animate(A,void 0,function(){p.graphic=d=d.destroy();"function"===typeof q&&q()});d&&d.addClass(p.getClassName(),!0)}}(),G=function(a){var p=a.deg2rad,d=a.find,
n=a.isArray,t=a.isNumber,q=a.map,k=a.reduce,w=function(c,b){b=t(b)?b:14;b=Math.pow(10,b);return Math.round(c*b)/b},x=function(c,b){var g=b[0]-c[0];c=b[1]-c[1];return[[-c,g],[c,-g]]},u=function(c,b){c=q(c,function(c){return c[0]*b[0]+c[1]*b[1]});return{min:Math.min.apply(this,c),max:Math.max.apply(this,c)}},B=function(c,b){var g=c[0];c=c[1];var a=p*-b;b=Math.cos(a);a=Math.sin(a);return[w(g*b-c*a),w(g*a+c*b)]},C=function(c,b,a){c=B([c[0]-b[0],c[1]-b[1]],a);return[c[0]+b[0],c[1]+b[1]]},l=function(c){var b,
a=c.axes;n(a)||(a=[],b=b=c.concat([c[0]]),k(b,function(b,c){var g=x(b,c)[0];d(a,function(f){return f[0]===g[0]&&f[1]===g[1]})||a.push(g);return c}),c.axes=a);return a},F=function(c,b){c=l(c);b=l(b);return c.concat(b)};return{getBoundingBoxFromPolygon:function(c){return k(c,function(b,c){var a=c[0];c=c[1];b.left=Math.min(a,b.left);b.right=Math.max(a,b.right);b.bottom=Math.max(c,b.bottom);b.top=Math.min(c,b.top);return b},{left:Number.MAX_SAFE_INTEGER,right:Number.MIN_SAFE_INTEGER,bottom:Number.MIN_SAFE_INTEGER,
top:Number.MAX_SAFE_INTEGER})},getPolygon:function(c,b,a,d,k){var g=[c,b],f=c-a/2;c+=a/2;a=b-d/2;b+=d/2;return q([[f,a],[c,a],[c,b],[f,b]],function(f){return C(f,g,-k)})},isPolygonsColliding:function(c,b){var a=F(c,b);return!d(a,function(a){var d=u(c,a);a=u(b,a);return!!(a.min>d.max||a.max<d.min)})},movePolygon:function(c,a,d){return q(d,function(b){return[b[0]+c,b[1]+a]})},rotate2DToOrigin:B,rotate2DToPoint:C}}(n);(function(a,n,d){var p=a.each,t=a.extend,q=a.isArray,k=a.isNumber,w=a.isObject,x=a.find,
u=a.reduce,B=d.getBoundingBoxFromPolygon,C=d.getPolygon,l=d.isPolygonsColliding,F=d.movePolygon,c=a.Series,b=function(f,e){var a=!1,c=f.rect,b=f.polygon,d=f.lastCollidedWith,k=function(a){var e;e=a.rect;(e=!(e.left>c.right||e.right<c.left||e.top>c.bottom||e.bottom<c.top))&&(f.rotation%90||a.roation%90)&&(e=l(b,a.polygon));return e};d&&((a=k(d))||delete f.lastCollidedWith);a||(a=!!x(e,function(e){var a=k(e);a&&(f.lastCollidedWith=e);return a}));return a},g=function(f){var e=Math.ceil((Math.sqrt(f)-
1)/2),a=2*e+1,c=Math.pow(a,2),b=!1,a=a-1;1E4>=f&&("boolean"===typeof b&&f>=c-a&&(b={x:e-(c-f),y:-e}),c-=a,"boolean"===typeof b&&f>=c-a&&(b={x:-e,y:-e+(c-f)}),c-=a,"boolean"===typeof b&&(b=f>=c-a?{x:-e+(c-f),y:e}:{x:e,y:e-(c-f-a)}),b.x*=5,b.y*=5);return b},E=function(a,c,b){a/=c;b=u(b,function(a,b){b=b.dimensions;a.maxHeight=Math.max(a.maxHeight,b.height);a.maxWidth=Math.max(a.maxWidth,b.width);a.area+=b.width*b.height;return a},{maxHeight:0,maxWidth:0,area:0});b=1.1*Math.max(b.maxHeight,b.maxWidth,
Math.sqrt(b.area));return{width:b*a,height:b,ratio:a}},y=function(a,b,c,d){var f=!1;k(a)&&k(b)&&k(c)&&k(d)&&-1<a&&-1<b&&d>c&&(f=c+b%a*((d-c)/(a-1)));return f},G=function(a,b){var c=b.width/2,f=-(b.height/2),e=b.height/2;return!(-(b.width/2)<a.left&&c>a.right&&f<a.top&&e>a.bottom)};a.seriesType("wordcloud","column",{animation:{duration:500},borderWidth:0,clip:!1,colorByPoint:!0,minFontSize:1,maxFontSize:25,placementStrategy:"center",rotation:{from:0,orientations:2,to:90},showInLegend:!1,spiral:"rectangular",
style:{fontFamily:"sans-serif",fontWeight:"900"},tooltip:{followPointer:!0,pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.weight}\x3c/b\x3e\x3cbr/\x3e'}},{animate:c.prototype.animate,bindAxes:function(){var a={endOnTick:!1,gridLineWidth:0,lineWidth:0,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};c.prototype.bindAxes.call(this);t(this.yAxis.options,a);t(this.xAxis.options,a)},deriveFontSize:function(a,b,c){a=k(a)?a:0;b=k(b)?b:1;
c=k(c)?c:1;return Math.floor(Math.max(c,a*b))},drawPoints:function(){var a=this,c=a.hasRendered,d=a.xAxis,g=a.yAxis,n=a.group,r=a.options,q=r.animation,u=a.chart.renderer,l=u.text().add(n),x=[],y=a.placementStrategy[r.placementStrategy],A=a.spirals[r.spiral],K=r.rotation,L=a.points.map(function(a){return a.weight}),J=Math.max.apply(null,L),D=a.points.sort(function(a,b){return b.weight-a.weight}),v;p(D,function(b){var c=a.deriveFontSize(1/J*b.weight,r.maxFontSize,r.minFontSize),c=t({fontSize:c+"px"},
r.style);l.css(c).attr({x:0,y:0,text:b.name});c=l.getBBox(!0);b.dimensions={height:c.height,width:c.width}});v=E(d.len,g.len,D);p(D,function(e){var f=a.deriveFontSize(1/J*e.weight,r.maxFontSize,r.minFontSize),f=t({fontSize:f+"px",fill:e.color},r.style),d=y(e,{data:D,field:v,placed:x,rotation:K}),g={align:"center","alignment-baseline":"middle",x:d.x,y:d.y,text:e.name,rotation:d.rotation},h=C(d.x,d.y,e.dimensions.width,e.dimensions.height,d.rotation),m=B(h),d=d.rotation,H=v,p=1,l={x:0,y:0},z=e.rect=
t({},m);e.polygon=h;for(e.rotation=d;(b(e,x)||G(z,H))&&!1!==l;)l=A(4*p,{field:H}),w(l)&&(z.left=m.left+l.x,z.right=m.right+l.x,z.top=m.top+l.y,z.bottom=m.bottom+l.y,e.polygon=F(l.x,l.y,h)),p++;var h=l,I;if(w(h)){g.x+=h.x;g.y+=h.y;m.left+=h.x;m.right+=h.x;m.top+=h.y;m.bottom+=h.y;h=v;if(!k(h.left)||h.left>m.left)h.left=m.left;if(!k(h.right)||h.right<m.right)h.right=m.right;if(!k(h.top)||h.top>m.top)h.top=m.top;if(!k(h.bottom)||h.bottom<m.bottom)h.bottom=m.bottom;v=h;x.push(e);e.isNull=!1}else e.isNull=
!0;q&&(I={x:g.x,y:g.y},c?(delete g.x,delete g.y):(g.x=0,g.y=0));e.draw({animate:I,attr:g,css:f,group:n,renderer:u,shapeArgs:void 0,shapeType:"text"})});l=l.destroy();d=Math.min(1/(2*Math.max(Math.abs(v.left),Math.abs(v.right)))*d.len,1/(2*Math.max(Math.abs(v.top),Math.abs(v.bottom)))*g.len);a.group.attr({scaleX:d,scaleY:d})},hasData:function(){return w(this)&&!0===this.visible&&q(this.points)&&0<this.points.length},placementStrategy:{random:function(a,b){var c=b.field;b=b.rotation;return{x:Math.round(c.width*
(Math.random()+.5)/2)-c.width/2,y:Math.round(c.height*(Math.random()+.5)/2)-c.height/2,rotation:y(b.orientations,a.index,b.from,b.to)}},center:function(a,b){b=b.rotation;return{x:0,y:0,rotation:y(b.orientations,a.index,b.from,b.to)}}},pointArrayMap:["weight"],spirals:{archimedean:function(a,b){var c=b.field;b=!1;var c=c.width*c.width+c.height*c.height,e=.2*a;1E4>=a&&(b={x:e*Math.cos(e),y:e*Math.sin(e)},Math.min(Math.abs(b.x),Math.abs(b.y))<c||(b=!1));return b},rectangular:function(a,b){a=g(a,b);b=
b.field;a&&(a.x*=b.ratio);return a},square:g},utils:{getRotation:y,isPolygonsColliding:l,rotate2DToOrigin:d.rotate2DToOrigin,rotate2DToPoint:d.rotate2DToPoint},getPlotBox:function(){var a=this.chart,b=a.inverted,c=this[b?"yAxis":"xAxis"],b=this[b?"xAxis":"yAxis"];return{translateX:(c?c.left:a.plotLeft)+(c?c.len:a.plotWidth)/2,translateY:(b?b.top:a.plotTop)+(b?b.len:a.plotHeight)/2,scaleX:1,scaleY:1}}},{draw:n,shouldDraw:function(){return!this.isNull},weight:1})})(n,E,G)});
