/* Highcharts JS v6.1.4 (2018-09-25) 3D features for Highcharts JS @license: www.highcharts.com/license */ (function(B){"object"===typeof module&&module.exports?module.exports=B:"function"===typeof define&&define.amd?define(function(){return B}):B(Highcharts)})(function(B){(function(b){var u=b.deg2rad,y=b.pick;b.perspective3D=function(b,q,z){q=0f&&C-f>Math.PI/2+.0001?(r=r.concat(u(a,c,d,b,f,f+Math.PI/2,h,e)),r=r.concat(u(a,c,d,b,f+Math.PI/2,C,h,e))):CMath.PI/2+.0001?(r=r.concat(u(a, c,d,b,f,f-Math.PI/2,h,e)),r=r.concat(u(a,c,d,b,f-Math.PI/2,C,h,e))):["C",a+d*Math.cos(f)-d*t*E*Math.sin(f)+h,c+b*Math.sin(f)+b*t*E*Math.cos(f)+e,a+d*Math.cos(C)+d*t*E*Math.sin(C)+h,c+b*Math.sin(C)-b*t*E*Math.cos(C)+e,a+d*Math.cos(C)+h,c+b*Math.sin(C)+e]}var y=Math.cos,v=Math.PI,q=Math.sin,z=b.animObject,A=b.charts,g=b.color,n=b.defined,x=b.deg2rad,p=b.each,m=b.extend,a=b.inArray,f=b.map,k=b.merge,h=b.perspective,e=b.pick,d=b.SVGElement,c=b.SVGRenderer,l=b.wrap,t=4*(Math.sqrt(2)-1)/3/(v/2);c.prototype.toLinePath= function(a,c){var d=[];p(a,function(a){d.push("L",a.x,a.y)});a.length&&(d[0]="M",c&&d.push("Z"));return d};c.prototype.toLineSegments=function(a){var c=[],d=!0;p(a,function(a){c.push(d?"M":"L",a.x,a.y);d=!d});return c};c.prototype.face3d=function(a){var c=this,d=this.createElement("path");d.vertexes=[];d.insidePlotArea=!1;d.enabled=!0;l(d,"attr",function(a,d){if("object"===typeof d&&(n(d.enabled)||n(d.vertexes)||n(d.insidePlotArea))){this.enabled=e(d.enabled,this.enabled);this.vertexes=e(d.vertexes, this.vertexes);this.insidePlotArea=e(d.insidePlotArea,this.insidePlotArea);delete d.enabled;delete d.vertexes;delete d.insidePlotArea;var r=h(this.vertexes,A[c.chartIndex],this.insidePlotArea),f=c.toLinePath(r,!0),r=b.shapeArea(r),r=this.enabled&&0b.faces.length;)c.faces.pop().destroy();for(;c.faces.lengthb.faces.length;)c.faces.pop().destroy(); for(;c.faces.lengthb.shapeArea(a)?e=[a,0]:0>b.shapeArea(d)&&(e= [d,1]);return e};p=g([3,2,1,0],[7,6,5,4]);a=p[0];m=p[1];p=g([1,6,7,0],[4,5,2,3]);t=p[0];k=p[1];p=g([1,2,5,6],[0,7,4,3]);g=p[0];p=p[1];1===p?v+=1E4*(1E3-d):p||(v+=1E4*d);v+=10*(!k||0<=q&&180>=q||360>q&&357.5Math.PI&&(a=2*Math.PI-a);return a}var d=a.x,b=a.y,f=a.start,e=a.end-.00001,h=a.r,t=a.innerR||0,m=a.depth||0,l=a.alpha,k=a.beta,w=Math.cos(f),p=Math.sin(f);a=Math.cos(e);var g=Math.sin(e),n=h* Math.cos(k),h=h*Math.cos(l),A=t*Math.cos(k),z=t*Math.cos(l),t=m*Math.sin(k),x=m*Math.sin(l),m=["M",d+n*w,b+h*p],m=m.concat(u(d,b,n,h,f,e,0,0)),m=m.concat(["L",d+A*a,b+z*g]),m=m.concat(u(d,b,A,z,e,f,0,0)),m=m.concat(["Z"]),B=0-B?f:e>-B?-B:f,D=eF&&fv-k&&fc&&(r=Math.min(r,1-Math.abs((a+e)/(c+e))%1));ft&&(r=0>t?Math.min(r,(k+d)/(-t+k+d)):Math.min(r,1-(k+d)/(t+d)%1));ha?-1:0},l=c([{x:f,y:e,z:d},{x:k,y:e,z:d},{x:k,y:e,z:0},{x:f,y:e,z:0}]),t=c([{x:f,y:h,z:0},{x:k,y:h,z:0},{x:k,y:h,z:d},{x:f,y:h,z:d}]),w= c([{x:f,y:h,z:0},{x:f,y:h,z:d},{x:f,y:e,z:d},{x:f,y:e,z:0}]),n=c([{x:k,y:h,z:d},{x:k,y:h,z:0},{x:k,y:e,z:0},{x:k,y:e,z:d}]),r=c([{x:f,y:e,z:0},{x:k,y:e,z:0},{x:k,y:h,z:0},{x:f,y:h,z:0}]),c=c([{x:f,y:h,z:d},{x:k,y:h,z:d},{x:k,y:e,z:d},{x:f,y:e,z:d}]),v=!1,z=!1,x=!1,u=!1;q([].concat(p.xAxis,p.yAxis,p.zAxis),function(a){a&&(a.horiz?a.opposite?z=!0:v=!0:a.opposite?u=!0:x=!0)});var y=function(a,c,d){for(var b=["size","color","visible"],f={},e=0;e d*f[b][c]?b=e:d*f[e][c]===d*f[b][c]&&f[e].zthis.pos&&(b.isArray(this.start)||b.isArray(this.end))){var m=this.start||[1,0,0,1,0,0],a=this.end||[1,0,0,1,0,0];g=[];for(var f=0;6>f;f++)g.push(this.pos*a[f]+(1-this.pos)*m[f])}else g=this.end;this.elem.attr(this.prop,g,null,!0)}})(B);(function(b){function u(d,c,b){if(!d.chart.is3d()||"colorAxis"===d.coll)return c;var e=d.chart,h=A*e.options.chart.options3d.alpha,l=A*e.options.chart.options3d.beta,m=a(b&&d.options.title.position3d,d.options.labels.position3d);b=a(b&&d.options.title.skew3d, d.options.labels.skew3d);var k=e.frame3d,g=e.plotLeft,n=e.plotWidth+g,q=e.plotTop,v=e.plotHeight+q,e=!1,x=0,z=0,u={x:0,y:1,z:0};c=d.swapZ({x:c.x,y:c.y,z:0});if(d.isZAxis)if(d.opposite){if(null===k.axes.z.top)return{};z=c.y-q;c.x=k.axes.z.top.x;c.y=k.axes.z.top.y;g=k.axes.z.top.xDir;e=!k.top.frontFacing}else{if(null===k.axes.z.bottom)return{};z=c.y-v;c.x=k.axes.z.bottom.x;c.y=k.axes.z.bottom.y;g=k.axes.z.bottom.xDir;e=!k.bottom.frontFacing}else if(d.horiz)if(d.opposite){if(null===k.axes.x.top)return{}; z=c.y-q;c.y=k.axes.x.top.y;c.z=k.axes.x.top.z;g=k.axes.x.top.xDir;e=!k.top.frontFacing}else{if(null===k.axes.x.bottom)return{};z=c.y-v;c.y=k.axes.x.bottom.y;c.z=k.axes.x.bottom.z;g=k.axes.x.bottom.xDir;e=!k.bottom.frontFacing}else if(d.opposite){if(null===k.axes.y.right)return{};x=c.x-n;c.x=k.axes.y.right.x;c.z=k.axes.y.right.z;g=k.axes.y.right.xDir;g={x:g.z,y:g.y,z:-g.x}}else{if(null===k.axes.y.left)return{};x=c.x-g;c.x=k.axes.y.left.x;c.z=k.axes.y.left.z;g=k.axes.y.left.xDir}"chart"!==m&&("flap"=== m?d.horiz?(l=Math.sin(h),h=Math.cos(h),d.opposite&&(l=-l),e&&(l=-l),u={x:g.z*l,y:h,z:-g.x*l}):g={x:Math.cos(l),y:0,z:Math.sin(l)}:"ortho"===m?d.horiz?(u=Math.cos(h),m=Math.sin(l)*u,h=-Math.sin(h),l=-u*Math.cos(l),u={x:g.y*l-g.z*h,y:g.z*m-g.x*l,z:g.x*h-g.y*m},h=1/Math.sqrt(u.x*u.x+u.y*u.y+u.z*u.z),e&&(h=-h),u={x:h*u.x,y:h*u.y,z:h*u.z}):g={x:Math.cos(l),y:0,z:Math.sin(l)}:d.horiz?u={x:Math.sin(l)*Math.sin(h),y:Math.cos(h),z:-Math.cos(l)*Math.sin(h)}:g={x:Math.cos(l),y:0,z:Math.sin(l)});c.x+=x*g.x+z* u.x;c.y+=x*g.y+z*u.y;c.z+=x*g.z+z*u.z;e=p([c],d.chart)[0];b&&(0>f(p([c,{x:c.x+g.x,y:c.y+g.y,z:c.z+g.z},{x:c.x+u.x,y:c.y+u.y,z:c.z+u.z}],d.chart))&&(g={x:-g.x,y:-g.y,z:-g.z}),d=p([{x:c.x,y:c.y,z:c.z},{x:c.x+g.x,y:c.y+g.y,z:c.z+g.z},{x:c.x+u.x,y:c.y+u.y,z:c.z+u.z}],d.chart),e.matrix=[d[1].x-d[0].x,d[1].y-d[0].y,d[2].x-d[0].x,d[2].y-d[0].y,e.x,e.y],e.matrix[4]-=e.x*e.matrix[0]+e.y*e.matrix[2],e.matrix[5]-=e.x*e.matrix[1]+e.y*e.matrix[3]);return e}var y,v=b.addEvent,q=b.Axis,z=b.Chart,A=b.deg2rad,g=b.each, n=b.extend,x=b.merge,p=b.perspective,m=b.perspective3D,a=b.pick,f=b.shapeArea,k=b.splat,h=b.Tick,e=b.wrap;x(!0,q.prototype.defaultOptions,{labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}});v(q,"afterSetOptions",function(){var d;this.chart.is3d&&this.chart.is3d()&&"colorAxis"!==this.coll&&(d=this.options,d.tickWidth=a(d.tickWidth,0),d.gridLineWidth=a(d.gridLineWidth,1))});e(q.prototype,"getPlotLinePath",function(a){var c=a.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d()|| "colorAxis"===this.coll||null===c)return c;var d=this.chart,b=d.options.chart.options3d,b=this.isZAxis?d.plotWidth:b.depth,d=d.frame3d,c=[this.swapZ({x:c[1],y:c[2],z:0}),this.swapZ({x:c[1],y:c[2],z:b}),this.swapZ({x:c[4],y:c[5],z:0}),this.swapZ({x:c[4],y:c[5],z:b})],b=[];this.horiz?(this.isZAxis?(d.left.visible&&b.push(c[0],c[2]),d.right.visible&&b.push(c[1],c[3])):(d.front.visible&&b.push(c[0],c[2]),d.back.visible&&b.push(c[1],c[3])),d.top.visible&&b.push(c[0],c[1]),d.bottom.visible&&b.push(c[2], c[3])):(d.front.visible&&b.push(c[0],c[2]),d.back.visible&&b.push(c[1],c[3]),d.left.visible&&b.push(c[0],c[1]),d.right.visible&&b.push(c[2],c[3]));b=p(b,this.chart,!1);return this.chart.renderer.toLineSegments(b)});e(q.prototype,"getLinePath",function(a){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:a.apply(this,[].slice.call(arguments,1))});e(q.prototype,"getPlotBandPath",function(a){if(!this.chart.is3d()||"colorAxis"===this.coll)return a.apply(this,[].slice.call(arguments,1));var c=arguments, d=c[2],b=[],c=this.getPlotLinePath(c[1]),d=this.getPlotLinePath(d);if(c&&d)for(var e=0;e=u.min&&n<=u.max:!1):g.plotZ= 0,g.axisXpos=g.plotX,g.axisYpos=g.plotY,g.axisZpos=g.plotZ,A.push({x:g.plotX,y:g.plotY,z:g.plotZ});b=y(A,b,!0);for(x=0;xk&&(c[a[1]]+=c[a[0]]+e,c[a[0]]=-e,k=0);k+c[a[1]]>b[a[0]+"Axis"].len&&0!==c[a[1]]&&(c[a[1]]=b[a[0]+"Axis"].len-c[a[0]]);if(0!== c[a[1]]&&(c[a[0]]>=b[a[0]+"Axis"].len||c[a[0]]+c[a[1]]<=e)){for(var f in c)c[f]=0;d.outside3dPlot=!0}});d.shapeType="cuboid";c.z=h;c.depth=g;c.insidePlotArea=!0;f=q([{x:f[0],y:f[1],z:h}],a,!0)[0];d.tooltipPos=[f.x,f.y]}});b.z=h};p(g.column.prototype,"animate",function(b){if(this.chart.is3d()){var a=arguments[1],f=this.yAxis,g=this,h=this.yAxis.reversed;x&&(a?v(g.data,function(a){null!==a.y&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,h||(a.shapeArgs.y=a.stackY?a.plotY+ f.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):(v(g.data,function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,g.options.animation))}),this.drawDataLabels(),g.animate=null))}else b.apply(this,[].slice.call(arguments,1))});p(g.column.prototype,"plotGroup",function(b,a,f,g,h,e){this.chart.is3d()&&e&&!this[a]&&(this.chart.columnGroup||(this.chart.columnGroup=this.chart.renderer.g("columnGroup").add(e)),this[a]=this.chart.columnGroup, this.chart.columnGroup.attr(this.getPlotBox()),this[a].survive=!0);return b.apply(this,Array.prototype.slice.call(arguments,1))});p(g.column.prototype,"setVisible",function(b,a){var f=this,g;f.chart.is3d()&&v(f.data,function(b){g=(b.visible=b.options.visible=a=void 0===a?!b.visible:a)?"visible":"hidden";f.options.data[n(b,f.data)]=b.options;b.graphic&&b.graphic.attr({visibility:g})});b.apply(this,Array.prototype.slice.call(arguments,1))});g.column.prototype.handle3dGrouping=!0;y(A,"afterInit",function(){if(this.chart.is3d()&& this.handle3dGrouping){var b=this.options,a=b.grouping,f=b.stacking,g=z(this.yAxis.options.reversedStacks,!0),h=0;if(void 0===a||a){a=this.chart.retrieveStacks(f);h=b.stack||0;for(f=0;f