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