/* Highcharts JS v5.0.7 (2017-01-17) 3D features for Highcharts JS @license: www.highcharts.com/license */ (function(F){"object"===typeof module&&module.exports?module.exports=F:F(Highcharts)})(function(F){(function(a){var r=a.deg2rad,k=a.pick;a.perspective=function(n,m,u){var p=m.options.chart.options3d,f=u?m.inverted:!1,g=m.plotWidth/2,q=m.plotHeight/2,d=p.depth/2,e=k(p.depth,1)*k(p.viewDistance,0),c=m.scale3d||1,b=r*p.beta*(f?-1:1),p=r*p.alpha*(f?-1:1),h=Math.cos(p),w=Math.cos(-b),y=Math.sin(p),z=Math.sin(-b);u||(g+=m.plotLeft,q+=m.plotTop);return a.map(n,function(b){var a,p;p=(f?b.y:b.x)-g;var m=(f? b.x:b.y)-q,k=(b.z||0)-d;a=w*p-z*k;b=-y*z*p+h*m-w*y*k;p=h*z*p+y*m+h*w*k;m=0a&&h-a>Math.PI/2+.0001?(D=D.concat(n(b,c,l,x,a,a+Math.PI/2,d,e)),D=D.concat(n(b,c,l,x,a+Math.PI/2,h,d,e))):hMath.PI/2+.0001?(D=D.concat(n(b,c,l,x,a,a-Math.PI/2,d,e)),D=D.concat(n(b,c,l,x,a-Math.PI/2,h,d,e))):["C",b+l*Math.cos(a)-l*t*f*Math.sin(a)+d,c+x*Math.sin(a)+x*t*f*Math.cos(a)+e,b+l*Math.cos(h)+l*t*f*Math.sin(h)+d,c+x*Math.sin(h)- x*t*f*Math.cos(h)+e,b+l*Math.cos(h)+d,c+x*Math.sin(h)+e]}var m=Math.cos,u=Math.PI,p=Math.sin,f=a.animObject,g=a.charts,q=a.color,d=a.defined,e=a.deg2rad,c=a.each,b=a.extend,h=a.inArray,w=a.map,y=a.merge,z=a.perspective,G=a.pick,B=a.SVGElement,H=a.SVGRenderer,C=a.wrap,t=4*(Math.sqrt(2)-1)/3/(u/2);H.prototype.toLinePath=function(b,a){var h=[];c(b,function(b){h.push("L",b.x,b.y)});b.length&&(h[0]="M",a&&h.push("Z"));return h};H.prototype.cuboid=function(b){var c=this.g(),h=c.destroy;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:q(b).brighten(.1).get()});this.side.attr({fill:q(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)):B.prototype.animate.call(this,b,c,a);return this};c.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return h.call(this)};c.attr({zIndex:-b[6]});return c};H.prototype.cuboidPath=function(b){function c(b){return q[b]}var a=b.x,h=b.y,d=b.z,e=b.height,D=b.width,f=b.depth,q=[{x:a,y:h,z:d},{x:a+D,y:h,z:d}, {x:a+D,y:h+e,z:d},{x:a,y:h+e,z:d},{x:a,y:h+e,z:d+f},{x:a+D,y:h+e,z:d+f},{x:a+D,y:h,z:d+f},{x:a,y:h,z:d+f}],q=z(q,g[this.chartIndex],b.insidePlotArea),d=function(b,a){var h=[];b=w(b,c);a=w(a,c);0>r(b)?h=b:0>r(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(w(a,c))]};a.SVGRenderer.prototype.arc3d=function(a){function d(b){var a=!1,c={},d;for(d in b)-1!==h(d, p)&&(c[d]=b[d],delete b[d],a=!0);return a?c:!1}var l=this.g(),x=l.renderer,p="x y r innerR start end".split(" ");a=y(a);a.alpha*=e;a.beta*=e;l.top=x.path();l.side1=x.path();l.side2=x.path();l.inn=x.path();l.out=x.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=q(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)})}});C(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))});C(l,"animate",function(b,a,c,h){var l,e=this.attribs,q;delete a.center;delete a.z;delete a.depth;delete a.alpha;delete a.beta;q=f(G(c,this.renderer.globalAnimation));q.duration&&(a=y(a),l=d(a),a.dummy=1,l&&(q.step=function(b,a){function c(b){return e[b]+ (G(l[b],e[b])-e[b])*a.pos}"dummy"===a.prop&&a.elem.setPaths(y(e,{x:c("x"),y:c("y"),r:c("r"),innerR:c("innerR"),start:c("start"),end:c("end")}))}),c=q);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();B.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};H.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,q=b.innerR,w=b.depth,g=b.alpha,k=b.beta,y=Math.cos(d),r=Math.sin(d);b=Math.cos(e);var z=Math.sin(e),v=f*Math.cos(k),f=f*Math.cos(g),t=q*Math.cos(k),C=q*Math.cos(g),q=w*Math.sin(k),A=w*Math.sin(g),w=["M",c+v*y,h+f*r],w=w.concat(n(c,h,v,f,d,e,0,0)),w=w.concat(["L",c+t*b,h+C*z]),w=w.concat(n(c,h,t,C,e,d,0,0)),w=w.concat(["Z"]),G= 0-G?d:e>-G?-G:d,E=eB&&du-k&&dq&&(t=Math.min(t,1-Math.abs((e+f)/(q+f))%1));cp&&(t=0>p?Math.min(t,(b+g)/(-p+b+g)):Math.min(t,1-(b+g)/(p+g)%1));h=g.min&&e<=g.max:!1,m.push({x:d.plotX,y:d.plotY,z:d.plotZ});f=r(m,f,!0);for(c=0;c