/* Highcharts JS v5.0.6 (2016-12-07) 3D features for Highcharts JS @license: www.highcharts.com/license */ (function(D){"object"===typeof module&&module.exports?module.exports=D:D(Highcharts)})(function(D){(function(a){var q=a.deg2rad,k=a.pick;a.perspective=function(p,n,u){var m=n.options.chart.options3d,f=u?n.inverted:!1,g=n.plotWidth/2,r=n.plotHeight/2,d=m.depth/2,e=k(m.depth,1)*k(m.viewDistance,0),c=n.scale3d||1,b=q*m.beta*(f?-1:1),m=q*m.alpha*(f?-1:1),h=Math.cos(m),v=Math.cos(-b),x=Math.sin(m),y=Math.sin(-b);u||(g+=n.plotLeft,r+=n.plotTop);return a.map(p,function(b){var a,m;m=(f?b.y:b.x)-g;var n=(f? b.x:b.y)-r,k=(b.z||0)-d;a=v*m-y*k;b=-x*y*m+h*n-v*x*k;m=h*y*m+x*n+h*v*k;n=0h&&d-h>Math.PI/2+.0001?(f=f.concat(p(b,c,l,a,h,h+Math.PI/2,F,e)),f=f.concat(p(b,c,l,a,h+Math.PI/2,d,F,e))):dMath.PI/2+.0001?(f=f.concat(p(b,c,l,a,h,h-Math.PI/2,F,e)),f=f.concat(p(b,c,l,a,h-Math.PI/2,d,F,e))):["C",b+l*Math.cos(h)-l*t*H*Math.sin(h)+F,c+a*Math.sin(h)+a*t*H*Math.cos(h)+e,b+l*Math.cos(d)+l*t*H*Math.sin(d)+F,c+a*Math.sin(d)- a*t*H*Math.cos(d)+e,b+l*Math.cos(d)+F,c+a*Math.sin(d)+e]}var n=Math.cos,u=Math.PI,m=Math.sin,f=a.animObject,g=a.charts,r=a.color,d=a.defined,e=a.deg2rad,c=a.each,b=a.extend,h=a.inArray,v=a.map,x=a.merge,y=a.perspective,E=a.pick,A=a.SVGElement,G=a.SVGRenderer,B=a.wrap,t=4*(Math.sqrt(2)-1)/3/(u/2);G.prototype.toLinePath=function(b,a){var l=[];c(b,function(b){l.push("L",b.x,b.y)});b.length&&(l[0]="M",a&&l.push("Z"));return l};G.prototype.cuboid=function(b){var c=this.g();b=this.cuboidPath(b);c.attr({"stroke-linejoin":"round"}); c.front=this.path(b[0]).attr({"class":"highcharts-3d-front",zIndex:b[3]}).add(c);c.top=this.path(b[1]).attr({"class":"highcharts-3d-top",zIndex:b[4]}).add(c);c.side=this.path(b[2]).attr({"class":"highcharts-3d-side",zIndex:b[5]}).add(c);c.fillSetter=function(b){this.front.attr({fill:b});this.top.attr({fill:r(b).brighten(.1).get()});this.side.attr({fill:r(b).brighten(-.1).get()});this.color=b;return this};c.opacitySetter=function(b){this.front.attr({opacity:b});this.top.attr({opacity:b});this.side.attr({opacity:b}); return this};c.attr=function(b){if(b.shapeArgs||d(b.x))b=this.renderer.cuboidPath(b.shapeArgs||b),this.front.attr({d:b[0],zIndex:b[3]}),this.top.attr({d:b[1],zIndex:b[4]}),this.side.attr({d:b[2],zIndex:b[5]});else return a.SVGElement.prototype.attr.call(this,b);return this};c.animate=function(b,c,a){d(b.x)&&d(b.y)?(b=this.renderer.cuboidPath(b),this.front.attr({zIndex:b[3]}).animate({d:b[0]},c,a),this.top.attr({zIndex:b[4]}).animate({d:b[1]},c,a),this.side.attr({zIndex:b[5]}).animate({d:b[2]},c,a), this.attr({zIndex:-b[6]})):b.opacity?(this.front.animate(b,c,a),this.top.animate(b,c,a),this.side.animate(b,c,a)):A.prototype.animate.call(this,b,c,a);return this};c.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return null};c.attr({zIndex:-b[6]});return c};G.prototype.cuboidPath=function(b){function c(b){return m[b]}var a=b.x,h=b.y,d=b.z,e=b.height,f=b.width,r=b.depth,m=[{x:a,y:h,z:d},{x:a+f,y:h,z:d},{x:a+f,y:h+e,z:d},{x:a,y:h+e,z:d},{x:a,y:h+e,z:d+r},{x:a+f,y:h+ e,z:d+r},{x:a+f,y:h,z:d+r},{x:a,y:h,z:d+r}],m=y(m,g[this.chartIndex],b.insidePlotArea),d=function(b,a){var h=[];b=v(b,c);a=v(a,c);0>q(b)?h=b:0>q(a)&&(h=a);return h};b=d([3,2,1,0],[7,6,5,4]);a=[4,5,2,3];h=d([1,6,7,0],a);d=d([1,2,5,6],[0,7,4,3]);return[this.toLinePath(b,!0),this.toLinePath(h,!0),this.toLinePath(d,!0),k(b),k(h),k(d),9E9*k(v(a,c))]};a.SVGRenderer.prototype.arc3d=function(a){function d(b){var a=!1,c={},d;for(d in b)-1!==h(d,v)&&(c[d]=b[d],delete b[d],a=!0);return a?c:!1}var l=this.g(), m=l.renderer,v="x y r innerR start end".split(" ");a=x(a);a.alpha*=e;a.beta*=e;l.top=m.path();l.side1=m.path();l.side2=m.path();l.inn=m.path();l.out=m.path();l.onAdd=function(){var b=l.parentGroup,a=l.attr("class");l.top.add(l);c(["out","inn","side1","side2"],function(c){l[c].addClass(a+" highcharts-3d-side").add(b)})};l.setPaths=function(b){var a=l.renderer.arc3dPath(b),c=100*a.zTop;l.attribs=b;l.top.attr({d:a.top,zIndex:a.zTop});l.inn.attr({d:a.inn,zIndex:a.zInn});l.out.attr({d:a.out,zIndex:a.zOut}); l.side1.attr({d:a.side1,zIndex:a.zSide1});l.side2.attr({d:a.side2,zIndex:a.zSide2});l.zIndex=c;l.attr({zIndex:c});b.center&&(l.top.setRadialReference(b.center),delete b.center)};l.setPaths(a);l.fillSetter=function(b){var a=r(b).brighten(-.1).get();this.fill=b;this.side1.attr({fill:a});this.side2.attr({fill:a});this.inn.attr({fill:a});this.out.attr({fill:a});this.top.attr({fill:b});return this};c(["opacity","translateX","translateY","visibility"],function(b){l[b+"Setter"]=function(b,a){l[a]=b;c(["out", "inn","side1","side2","top"],function(c){l[c].attr(a,b)})}});B(l,"attr",function(a,c){var h;"object"===typeof c&&(h=d(c))&&(b(l.attribs,h),l.setPaths(l.attribs));return a.apply(this,[].slice.call(arguments,1))});B(l,"animate",function(b,a,c,h){var l,e=this.attribs,m;delete a.center;delete a.z;delete a.depth;delete a.alpha;delete a.beta;m=f(E(c,this.renderer.globalAnimation));m.duration&&(a=x(a),l=d(a),a.dummy=1,l&&(m.step=function(b,a){function c(b){return e[b]+(E(l[b],e[b])-e[b])*a.pos}"dummy"=== a.prop&&a.elem.setPaths(x(e,{x:c("x"),y:c("y"),r:c("r"),innerR:c("innerR"),start:c("start"),end:c("end")}))}),c=m);return b.call(this,a,c,h)});l.destroy=function(){this.top.destroy();this.out.destroy();this.inn.destroy();this.side1.destroy();this.side2.destroy();A.prototype.destroy.call(this)};l.hide=function(){this.top.hide();this.out.hide();this.inn.hide();this.side1.hide();this.side2.hide()};l.show=function(){this.top.show();this.out.show();this.inn.show();this.side1.show();this.side2.show()}; return l};G.prototype.arc3dPath=function(b){function a(b){b%=2*Math.PI;b>Math.PI&&(b=2*Math.PI-b);return b}var c=b.x,h=b.y,d=b.start,e=b.end-.00001,f=b.r,r=b.innerR,v=b.depth,g=b.alpha,k=b.beta,x=Math.cos(d),q=Math.sin(d);b=Math.cos(e);var y=Math.sin(e),w=f*Math.cos(k),f=f*Math.cos(g),t=r*Math.cos(k),B=r*Math.cos(g),r=v*Math.sin(k),z=v*Math.sin(g),v=["M",c+w*x,h+f*q],v=v.concat(p(c,h,w,f,d,e,0,0)),v=v.concat(["L",c+t*b,h+B*y]),v=v.concat(p(c,h,t,B,e,d,0,0)),v=v.concat(["Z"]),E=0-E?d:e>-E?-E:d,C=eA&&du-k&&dr&&(t=Math.min(t,1-Math.abs((e+f)/(r+f))%1));ck&&(t=0>k?Math.min(t,(b+g)/(-k+b+g)):Math.min(t,1-(b+g)/(k+g)%1));h=g.min&&e<=g.max:!1,m.push({x:d.plotX,y:d.plotY, z:d.plotZ});f=q(m,f,!0);for(c=0;c