/* Highcharts JS v8.0.2 (2020-03-03) 3D features for Highcharts JS License: www.highcharts.com/license */ (function(q){"object"===typeof module&&module.exports?(q["default"]=q,module.exports=q):"function"===typeof define&&define.amd?define("highcharts/highcharts-3d",["highcharts"],function(B){q(B);q.Highcharts=B;return q}):q("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(q){function B(b,k,u,q){b.hasOwnProperty(k)||(b[k]=q.apply(null,u))}q=q?q._modules:{};B(q,"parts-3d/Math.js",[q["parts/Globals.js"],q["parts/Utilities.js"]],function(b,k){var u=k.pick,q=b.deg2rad;b.perspective3D=function(b, k,v){k=0g&&f-g>Math.PI/2+.0001?(p=p.concat(u(a,d,e,D,g,g+Math.PI/2,m,r)),p=p.concat(u(a,d,e,D,g+Math.PI/2,f,m,r))):fMath.PI/2+.0001?(p=p.concat(u(a,d,e,D,g,g-Math.PI/2,m,r)),p=p.concat(u(a,d,e,D,g-Math.PI/2,f,m,r))):["C",a+e*Math.cos(g)-e*c*E*Math.sin(g)+m,d+D*Math.sin(g)+ D*c*E*Math.cos(g)+r,a+e*Math.cos(f)+e*c*E*Math.sin(f)+m,d+D*Math.sin(f)-D*c*E*Math.cos(f)+r,a+e*Math.cos(f)+m,d+D*Math.sin(f)+r]}var q=k.animObject,t=k.defined,A=k.extend,v=k.merge,x=k.objectEach,w=k.pick,h=Math.cos,z=Math.PI,r=Math.sin,a=b.charts,f=b.color,n=b.deg2rad,l=b.perspective,d=b.SVGElement;k=b.SVGRenderer;var c=4*(Math.sqrt(2)-1)/3/(z/2);k.prototype.toLinePath=function(a,d){var e=[];a.forEach(function(a){e.push("L",a.x,a.y)});a.length&&(e[0]="M",d&&e.push("Z"));return e};k.prototype.toLineSegments= function(a){var d=[],e=!0;a.forEach(function(a){d.push(e?"M":"L",a.x,a.y);e=!e});return d};k.prototype.face3d=function(c){var p=this,e=this.createElement("path");e.vertexes=[];e.insidePlotArea=!1;e.enabled=!0;e.attr=function(e){if("object"===typeof e&&(t(e.enabled)||t(e.vertexes)||t(e.insidePlotArea))){this.enabled=w(e.enabled,this.enabled);this.vertexes=w(e.vertexes,this.vertexes);this.insidePlotArea=w(e.insidePlotArea,this.insidePlotArea);delete e.enabled;delete e.vertexes;delete e.insidePlotArea; var c=l(this.vertexes,a[p.chartIndex],this.insidePlotArea),g=p.toLinePath(c,!0);c=b.shapeArea(c);c=this.enabled&&0a.faces.length;)e.faces.pop().destroy();for(;e.faces.lengtha.faces.length;)e.faces.pop().destroy();for(;e.faces.lengtha?{x:v[a].x,y:v[a].y+10,z:v[a].z}:v[a]}function e(a){return v[a]}var g=c.x,f=c.y,p=c.z,m=c.height,r=c.width, n=c.depth,z=a[this.chartIndex],k=z.options.chart.options3d.alpha,h=0,v=[{x:g,y:f,z:p},{x:g+r,y:f,z:p},{x:g+r,y:f+m,z:p},{x:g,y:f+m,z:p},{x:g,y:f+m,z:p+n},{x:g+r,y:f+m,z:p+n},{x:g+r,y:f,z:p+n},{x:g,y:f,z:p+n}];v=l(v,z,c.insidePlotArea);var x=function(a,c){var g=[[],-1],f=a.map(e),p=c.map(e);a=a.map(d);c=c.map(d);0>b.shapeArea(a)?g=[f,0]:0>b.shapeArea(c)&&(g=[p,1]);return g};var u=x([3,2,1,0],[7,6,5,4]);c=u[0];n=u[1];u=x([1,6,7,0],[4,5,2,3]);r=u[0];var t=u[1];u=x([1,2,5,6],[0,7,4,3]);x=u[0];u=u[1]; 1===u?h+=1E6*(z.plotWidth-g):u||(h+=1E6*g);h+=10*(!t||0<=k&&180>=k||360>k&&357.5Math.PI&&(a=2*Math.PI-a);return a}var e=a.x,d=a.y,g=a.start,f=a.end-.00001,m=a.r,p=a.innerR||0,l=a.depth||0,b=a.alpha,n=a.beta,k=Math.cos(g),v=Math.sin(g);a=Math.cos(f);var x=Math.sin(f),t=m*Math.cos(n);m*=Math.cos(b);var w=p*Math.cos(n),q=p*Math.cos(b); p=l*Math.sin(n);var y=l*Math.sin(b);l=["M",e+t*k,d+m*v];l=l.concat(u(e,d,t,m,g,f,0,0));l=l.concat(["L",e+w*a,d+q*x]);l=l.concat(u(e,d,w,q,f,g,0,0));l=l.concat(["Z"]);var A=0-A?g:f>-A?-A:g;var B=fC&&gz-n&&gm&&(e=Math.min(e,1-Math.abs((a+ d)/(m+d))%1));fp&&(e=0>p?Math.min(e,(n+c)/(-p+n+c)):Math.min(e,1-(n+c)/(p+c)%1));la?-1:0},g=m([{x:f,y:d,z:c},{x:n,y:d,z:c},{x:n,y:d,z:0},{x:f,y:d,z:0}]),p=m([{x:f,y:l,z:0},{x:n,y:l,z:0},{x:n,y:l,z:c},{x:f,y:l,z:c}]),k=m([{x:f,y:l,z:0},{x:f,y:l,z:c},{x:f,y:d,z:c},{x:f,y:d,z:0}]),e=m([{x:n,y:l,z:c},{x:n,y:l,z:0},{x:n,y:d,z:0},{x:n,y:d,z:c}]),t=m([{x:f,y:d,z:0},{x:n,y:d,z:0},{x:n,y:l,z:0},{x:f,y:l,z:0}]);m=m([{x:f, y:l,z:c},{x:n,y:l,z:c},{x:n,y:d,z:c},{x:f,y:d,z:c}]);var x=!1,u=!1,q=!1,A=!1;[].concat(h.xAxis,h.yAxis,h.zAxis).forEach(function(a){a&&(a.horiz?a.opposite?u=!0:x=!0:a.opposite?A=!0:q=!0)});var y=function(a,d,c){for(var e=["size","color","visible"],g={},f=0;fc*g[e][d]?e=f:c*g[f][d]===c*g[e][d]&&g[f].zthis.pos&&(t(this.start)||t(this.end))){var b=this.start||[1,0,0,1,0,0],r=this.end||[1,0,0,1,0,0];var a=[];for(var f=0;6>f;f++)a.push(this.pos*r[f]+(1-this.pos)*b[f])}else a= this.end;this.elem.attr(this.prop,a,null,!0)};""});B(q,"parts-3d/Axis.js",[q["parts/Globals.js"],q["parts/Tick.js"],q["parts/Utilities.js"]],function(b,k,q){function u(d,c,f){if(!d.chart.is3d()||"colorAxis"===d.coll)return c;var g=d.chart,b=r*g.options.chart.options3d.alpha,m=r*g.options.chart.options3d.beta,e=x(f&&d.options.title.position3d,d.options.labels.position3d);f=x(f&&d.options.title.skew3d,d.options.labels.skew3d);var l=g.frame3d,h=g.plotLeft,k=g.plotWidth+h,v=g.plotTop,q=g.plotHeight+v; g=!1;var t=0,u=0,w={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===l.axes.z.top)return{};u=c.y-v;c.x=l.axes.z.top.x;c.y=l.axes.z.top.y;h=l.axes.z.top.xDir;g=!l.top.frontFacing}else{if(null===l.axes.z.bottom)return{};u=c.y-q;c.x=l.axes.z.bottom.x;c.y=l.axes.z.bottom.y;h=l.axes.z.bottom.xDir;g=!l.bottom.frontFacing}else if(d.horiz)if(d.opposite){if(null===l.axes.x.top)return{};u=c.y-v;c.y=l.axes.x.top.y;c.z=l.axes.x.top.z;h=l.axes.x.top.xDir;g=!l.top.frontFacing}else{if(null=== l.axes.x.bottom)return{};u=c.y-q;c.y=l.axes.x.bottom.y;c.z=l.axes.x.bottom.z;h=l.axes.x.bottom.xDir;g=!l.bottom.frontFacing}else if(d.opposite){if(null===l.axes.y.right)return{};t=c.x-k;c.x=l.axes.y.right.x;c.z=l.axes.y.right.z;h=l.axes.y.right.xDir;h={x:h.z,y:h.y,z:-h.x}}else{if(null===l.axes.y.left)return{};t=c.x-h;c.x=l.axes.y.left.x;c.z=l.axes.y.left.z;h=l.axes.y.left.xDir}"chart"!==e&&("flap"===e?d.horiz?(m=Math.sin(b),b=Math.cos(b),d.opposite&&(m=-m),g&&(m=-m),w={x:h.z*m,y:b,z:-h.x*m}):h={x:Math.cos(m), y:0,z:Math.sin(m)}:"ortho"===e?d.horiz?(w=Math.cos(b),e=Math.sin(m)*w,b=-Math.sin(b),m=-w*Math.cos(m),w={x:h.y*m-h.z*b,y:h.z*e-h.x*m,z:h.x*b-h.y*e},b=1/Math.sqrt(w.x*w.x+w.y*w.y+w.z*w.z),g&&(b=-b),w={x:b*w.x,y:b*w.y,z:b*w.z}):h={x:Math.cos(m),y:0,z:Math.sin(m)}:d.horiz?w={x:Math.sin(m)*Math.sin(b),y:Math.cos(b),z:-Math.cos(m)*Math.sin(b)}:h={x:Math.cos(m),y:0,z:Math.sin(m)});c.x+=t*h.x+u*w.x;c.y+=t*h.y+u*w.y;c.z+=t*h.z+u*w.z;g=a([c],d.chart)[0];f&&(0>n(a([c,{x:c.x+h.x,y:c.y+h.y,z:c.z+h.z},{x:c.x+ w.x,y:c.y+w.y,z:c.z+w.z}],d.chart))&&(h={x:-h.x,y:-h.y,z:-h.z}),d=a([{x:c.x,y:c.y,z:c.z},{x:c.x+h.x,y:c.y+h.y,z:c.z+h.z},{x:c.x+w.x,y:c.y+w.y,z:c.z+w.z}],d.chart),g.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,g.x,g.y],g.matrix[4]-=g.x*g.matrix[0]+g.y*g.matrix[2],g.matrix[5]-=g.x*g.matrix[1]+g.y*g.matrix[3]);return g}var t=q.addEvent,A=q.extend,v=q.merge,x=q.pick,w=q.splat;q=q.wrap;var h=b.Axis,z=b.Chart,r=b.deg2rad,a=b.perspective,f=b.perspective3D,n=b.shapeArea;v(!0,h.prototype.defaultOptions, {labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}});t(h,"afterSetOptions",function(){if(this.chart.is3d&&this.chart.is3d()&&"colorAxis"!==this.coll){var a=this.options;a.tickWidth=x(a.tickWidth,0);a.gridLineWidth=x(a.gridLineWidth,1)}});q(h.prototype,"getPlotLinePath",function(d){var c=d.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d()||"colorAxis"===this.coll||null===c)return c;var f=this.chart,g=f.options.chart.options3d;g=this.isZAxis?f.plotWidth:g.depth;f= f.frame3d;c=[this.swapZ({x:c[1],y:c[2],z:0}),this.swapZ({x:c[1],y:c[2],z:g}),this.swapZ({x:c[4],y:c[5],z:0}),this.swapZ({x:c[4],y:c[5],z:g})];g=[];this.horiz?(this.isZAxis?(f.left.visible&&g.push(c[0],c[2]),f.right.visible&&g.push(c[1],c[3])):(f.front.visible&&g.push(c[0],c[2]),f.back.visible&&g.push(c[1],c[3])),f.top.visible&&g.push(c[0],c[1]),f.bottom.visible&&g.push(c[2],c[3])):(f.front.visible&&g.push(c[0],c[2]),f.back.visible&&g.push(c[1],c[3]),f.left.visible&&g.push(c[0],c[1]),f.right.visible&& g.push(c[2],c[3]));g=a(g,this.chart,!1);return this.chart.renderer.toLineSegments(g)});q(h.prototype,"getLinePath",function(a){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:a.apply(this,[].slice.call(arguments,1))});q(h.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],g=[];c=this.getPlotLinePath({value:c[1]});d=this.getPlotLinePath({value:d});if(c&&d)for(var f=0;f=k.min&&u<=k.max:!1}else 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=t(q,b,!0);for(w=0;wk&&(g[a[1]]+=g[a[0]]+d,g[a[0]]=-d,k=0);k+g[a[1]]>b[a[0]+"Axis"].len&&0!==g[a[1]]&&(g[a[1]]=b[a[0]+"Axis"].len-g[a[0]]);if(0!==g[a[1]]&&(g[a[0]]>=b[a[0]+"Axis"].len||g[a[0]]+g[a[1]]<=d)){for(var c in g)g[c]=0;f.outside3dPlot=!0}});"rect"=== f.shapeType&&(f.shapeType="cuboid");g.z=l;g.depth=h;g.insidePlotArea=!0;c={x:g.x+g.width/2,y:g.y,z:l+h/2};a.inverted&&(c.x=g.height,c.y=f.clientX);f.plot3d=x([c],a,!0,!1)[0];m=x([{x:m[0],y:m[1],z:l+h/2}],a,!0,!1)[0];f.tooltipPos=[m.x,m.y]}});b.z=l};k(h.column.prototype,"animate",function(b){if(this.chart.is3d()){var a=arguments[1],f=this.yAxis,h=this,l=this.yAxis.reversed;z&&(a?h.data.forEach(function(a){null!==a.y&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,l||(a.shapeArgs.y= a.stackY?a.plotY+f.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):(h.data.forEach(function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,h.options.animation))}),this.drawDataLabels(),h.animate=null))}else b.apply(this,[].slice.call(arguments,1))});k(h.column.prototype,"plotGroup",function(b,a,f,h,l,d){"dataLabelsGroup"!==a&&this.chart.is3d()&&(this[a]&&delete this[a],d&&(this.chart.columnGroup||(this.chart.columnGroup= this.chart.renderer.g("columnGroup").add(d)),this[a]=this.chart.columnGroup,this.chart.columnGroup.attr(this.getPlotBox()),this[a].survive=!0,"group"===a||"markerGroup"===a))&&(arguments[3]="visible");return b.apply(this,Array.prototype.slice.call(arguments,1))});k(h.column.prototype,"setVisible",function(b,a){var f=this,h;f.chart.is3d()&&f.data.forEach(function(b){h=(b.visible=b.options.visible=a="undefined"===typeof a?!v(f.visible,b.visible):a)?"visible":"hidden";f.options.data[f.data.indexOf(b)]= b.options;b.graphic&&b.graphic.attr({visibility:h})});b.apply(this,Array.prototype.slice.call(arguments,1))});h.column.prototype.handle3dGrouping=!0;A(w,"afterInit",function(){if(this.chart.is3d()&&this.handle3dGrouping){var b=this.options,a=b.grouping,f=b.stacking,h=v(this.yAxis.options.reversedStacks,!0),l=0;if("undefined"===typeof a||a){a=this.chart.retrieveStacks(f);l=b.stack||0;for(f=0;f=g.alpha&&(c.y+=a.shapeArgs.width));c=x([c],d,!0,!1)[0];l.x=c.x-k;l.y=a.outside3dPlot?-9E9:c.y}b.apply(this,[].slice.call(arguments,1))});k(b.StackItem.prototype, "getStackBox",function(b,a,f,k,l,d,c,m){var g=b.apply(this,[].slice.call(arguments,1));if(a.is3d()&&f.base){var p=+f.base.split(",")[0],n=a.series[p];p=a.options.chart.options3d;n&&n instanceof h.column&&(n={x:g.x+(a.inverted?c:d/2),y:g.y,z:n.options.depth/2},a.inverted&&(g.width=0,90<=p.alpha&&270>=p.alpha&&(n.y+=d)),n=x([n],a,!0,!1)[0],g.x=n.x-d/2,g.y=n.y)}return g})});B(q,"parts-3d/Pie.js",[q["parts/Globals.js"],q["parts/Utilities.js"]],function(b,k){var q=k.pick;k=k.wrap;var y=b.deg2rad,t=b.seriesTypes, A=b.svg;k(t.pie.prototype,"translate",function(b){b.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var k=this,q=k.options,h=q.depth||0,t=k.chart.options.chart.options3d,r=t.alpha,a=t.beta,f=q.stacking?(q.stack||0)*h:k._i*h;f+=h/2;!1!==q.grouping&&(f=0);k.data.forEach(function(b){var l=b.shapeArgs;b.shapeType="arc3d";l.z=f;l.depth=.75*h;l.alpha=r;l.beta=a;l.center=k.center;l=(l.end+l.start)/2;b.slicedTranslation={translateX:Math.round(Math.cos(l)*q.slicedOffset*Math.cos(r*y)),translateY:Math.round(Math.sin(l)* q.slicedOffset*Math.cos(r*y))}})}});k(t.pie.prototype.pointClass.prototype,"haloPath",function(b){var k=arguments;return this.series.chart.is3d()?[]:b.call(this,k[1])});k(t.pie.prototype,"pointAttribs",function(b,k,t){b=b.call(this,k,t);t=this.options;this.chart.is3d()&&!this.chart.styledMode&&(b.stroke=t.edgeColor||k.color||this.color,b["stroke-width"]=q(t.edgeWidth,1));return b});k(t.pie.prototype,"drawDataLabels",function(b){if(this.chart.is3d()){var k=this.chart.options.chart.options3d;this.data.forEach(function(b){var h= b.shapeArgs,q=h.r,r=(h.start+h.end)/2;b=b.labelPosition;var a=b.connectorPosition,f=-q*(1-Math.cos((h.alpha||k.alpha)*y))*Math.sin(r),n=q*(Math.cos((h.beta||k.beta)*y)-1)*Math.cos(r);[b.natural,a.breakAt,a.touchingSliceAt].forEach(function(a){a.x+=n;a.y+=f})})}b.apply(this,[].slice.call(arguments,1))});k(t.pie.prototype,"addPoint",function(b){b.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&this.update(this.userOptions,!0)});k(t.pie.prototype,"animate",function(b){if(this.chart.is3d()){var k= arguments[1],q=this.options.animation,h=this.center,t=this.group,r=this.markerGroup;A&&(!0===q&&(q={}),k?(t.oldtranslateX=t.translateX,t.oldtranslateY=t.translateY,k={translateX:h[0],translateY:h[1],scaleX:.001,scaleY:.001},t.attr(k),r&&(r.attrSetters=t.attrSetters,r.attr(k))):(k={translateX:t.oldtranslateX,translateY:t.oldtranslateY,scaleX:1,scaleY:1},t.animate(k,q),r&&r.animate(k,q),this.animate=null))}else b.apply(this,[].slice.call(arguments,1))})});B(q,"parts-3d/Scatter.js",[q["parts/Globals.js"], q["parts/Point.js"],q["parts/Utilities.js"]],function(b,k,q){q=q.seriesType;var u=b.seriesTypes;q("scatter3d","scatter",{tooltip:{pointFormat:"x: {point.x}
y: {point.y}
z: {point.z}
"}},{pointAttribs:function(k){var q=u.scatter.prototype.pointAttribs.apply(this,arguments);this.chart.is3d()&&k&&(q.zIndex=b.pointCameraDistance(k,this.chart));return q},axisTypes:["xAxis","yAxis","zAxis"],pointArrayMap:["x","y","z"],parallelArrays:["x","y","z"],directTouch:!0},{applyOptions:function(){k.prototype.applyOptions.apply(this, arguments);"undefined"===typeof this.z&&(this.z=0);return this}});""});B(q,"parts-3d/VMLRenderer.js",[q["parts/Globals.js"],q["parts/Utilities.js"]],function(b,k){k=k.addEvent;var q=b.Axis,y=b.SVGRenderer,t=b.VMLRenderer;t&&(b.setOptions({animate:!1}),t.prototype.face3d=y.prototype.face3d,t.prototype.polyhedron=y.prototype.polyhedron,t.prototype.elements3d=y.prototype.elements3d,t.prototype.element3d=y.prototype.element3d,t.prototype.cuboid=y.prototype.cuboid,t.prototype.cuboidPath=y.prototype.cuboidPath, t.prototype.toLinePath=y.prototype.toLinePath,t.prototype.toLineSegments=y.prototype.toLineSegments,t.prototype.arc3d=function(b){b=y.prototype.arc3d.call(this,b);b.css({zIndex:b.zIndex});return b},b.VMLRenderer.prototype.arc3dPath=b.SVGRenderer.prototype.arc3dPath,k(q,"render",function(){this.sideFrame&&(this.sideFrame.css({zIndex:0}),this.sideFrame.front.attr({fill:this.sideFrame.color}));this.bottomFrame&&(this.bottomFrame.css({zIndex:1}),this.bottomFrame.front.attr({fill:this.bottomFrame.color})); this.backFrame&&(this.backFrame.css({zIndex:0}),this.backFrame.front.attr({fill:this.backFrame.color}))}))});B(q,"masters/highcharts-3d.src.js",[],function(){})}); //# sourceMappingURL=highcharts-3d.js.map