text: (function(a){"use strict";var p=function(){},t=a.getOptions(),d=a.each,h=a.extend,i=a.wrap,o=a.Chart,e=a.seriesTypes,r=e.pie,n=e.column,l=HighchartsAdapter.fireEvent;function c(t,i,o){var e=[Math.round(t[0]+(i[0]-t[0])*o),Math.round(t[1]+(i[1]-t[1])*o),Math.round(t[2]+(i[2]-t[2])*o),t[3]+(i[3]-t[3])*o];return"rgba("+e.join(",")+")"}h(t.lang,{drillUpText:"◁ Back to {series.name}"});t.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:"#039",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:"#039",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}};a.SVGRenderer.prototype.Element.prototype.fadeIn=function(){this.attr({opacity:.1,visibility:"visible"}).animate({opacity:1},{duration:250})};o.prototype.drilldownLevels=[];o.prototype.addSeriesAsDrilldown=function(t,i){var o=t.series,e=o.xAxis,r=o.yAxis,n,l=t.color||o.color,s,a;i=h({color:l},i);s=HighchartsAdapter.inArray(this,o.points);a={seriesOptions:o.userOptions,shapeArgs:t.shapeArgs,bBox:t.graphic.getBBox(),color:l,newSeries:i,pointOptions:o.options.data[s],pointIndex:s,oldExtremes:{xMin:e&&e.userMin,xMax:e&&e.userMax,yMin:r&&r.userMin,yMax:r&&r.userMax}};this.drilldownLevels.push(a);n=this.addSeries(i,false);if(e){e.oldPos=e.pos;e.userMin=e.userMax=null;r.userMin=r.userMax=null}if(o.type===n.type){n.animate=n.animateDrilldown||p;n.options.animation=true}o.remove(false);this.redraw();this.showDrillUpButton()};o.prototype.getDrilldownBackText=function(){var t=this.drilldownLevels[this.drilldownLevels.length-1];return this.options.lang.drillUpText.replace("{series.name}",t.seriesOptions.name)};o.prototype.showDrillUpButton=function(){var t=this,i=this.getDrilldownBackText(),o=t.options.drilldown.drillUpButton;if(!this.drillUpButton){this.drillUpButton=this.renderer.button(i,null,null,function(){t.drillUp()}).attr(h({align:o.position.align,zIndex:9},o.theme)).add().align(o.position,false,o.relativeTo||"plotBox")}else{this.drillUpButton.attr({text:i}).align()}};o.prototype.drillUp=function(){var t=this,i=t.drilldownLevels.pop(),o=t.series[0],e=i.oldExtremes,r=t.addSeries(i.seriesOptions,false);l(t,"drillup",{seriesOptions:i.seriesOptions});if(r.type===o.type){r.drilldownLevel=i;r.animate=r.animateDrillupTo||p;r.options.animation=true;if(o.animateDrillupFrom){o.animateDrillupFrom(i)}}o.remove(false);if(r.xAxis){r.xAxis.setExtremes(e.xMin,e.xMax,false);r.yAxis.setExtremes(e.yMin,e.yMax,false)}this.redraw();if(this.drilldownLevels.length===0){this.drillUpButton=this.drillUpButton.destroy()}else{this.drillUpButton.attr({text:this.getDrilldownBackText()}).align()}};r.prototype.animateDrilldown=function(t){var i=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],e=this.chart.options.drilldown.animation,r=i.shapeArgs,n=r.start,o=r.end-n,l=o/this.points.length,s=a.Color(i.color).rgba;if(!t){d(this.points,function(t,i){var o=a.Color(t.color).rgba;t.graphic.attr(a.merge(r,{start:n+i*l,end:n+(i+1)*l})).animate(t.shapeArgs,a.merge(e,{step:function(t,i){if(i.prop==="start"){this.attr({fill:c(s,o,i.pos)})}}}))})}};r.prototype.animateDrillupTo=n.prototype.animateDrillupTo=function(t){if(!t){var i=this,e=i.drilldownLevel;d(this.points,function(t){t.graphic.hide();if(t.dataLabel){t.dataLabel.hide()}if(t.connector){t.connector.hide()}});setTimeout(function(){d(i.points,function(t,i){var o=i===e.pointIndex?"show":"fadeIn";t.graphic[o]();if(t.dataLabel){t.dataLabel[o]()}if(t.connector){t.connector[o]()}})},Math.max(this.chart.options.drilldown.animation.duration-50,0));this.animate=p}};n.prototype.animateDrilldown=function(t){var i=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1].shapeArgs,o=this.chart.options.drilldown.animation;if(!t){i.x+=this.xAxis.oldPos-this.xAxis.pos;d(this.points,function(t){t.graphic.attr(i).animate(t.shapeArgs,o)})}};n.prototype.animateDrillupFrom=r.prototype.animateDrillupFrom=function(e){var r=this.chart.options.drilldown.animation,n=this.group;delete this.group;d(this.points,function(t){var i=t.graphic,o=a.Color(t.color).rgba;delete t.graphic;i.animate(e.shapeArgs,a.merge(r,{step:function(t,i){if(i.prop==="start"){this.attr({fill:c(o,a.Color(e.color).rgba,i.pos)})}},complete:function(){i.destroy();if(n){n=n.destroy()}}}))})};a.Point.prototype.doDrilldown=function(){var t=this.series,i=t.chart,o=i.options.drilldown,e=o.series.length,r;while(e--&&!r){if(o.series[e].id===this.drilldown){r=o.series[e]}}l(i,"drilldown",{point:this,seriesOptions:r});if(r){i.addSeriesAsDrilldown(this,r)}};i(a.Point.prototype,"init",function(t,i,o,e){var r=t.call(this,i,o,e),n=i.chart,l=i.xAxis&&i.xAxis.ticks[e],s=l&&l.label;if(r.drilldown){a.addEvent(r,"click",function(){r.doDrilldown()});if(s){if(!s._basicStyle){s._basicStyle=s.element.getAttribute("style")}s.addClass("highcharts-drilldown-axis-label").css(n.options.drilldown.activeAxisLabelStyle).on("click",function(){if(r.doDrilldown){r.doDrilldown()}})}}else if(s&&s._basicStyle){s.element.setAttribute("style",s._basicStyle)}return r});i(a.Series.prototype,"drawDataLabels",function(t){var i=this.chart.options.drilldown.activeDataLabelStyle;t.call(this);d(this.points,function(t){if(t.drilldown&&t.dataLabel){t.dataLabel.attr({class:"highcharts-drilldown-data-label"}).css(i).on("click",function(){t.doDrilldown()})}})});n.prototype.supportsDrilldown=true;r.prototype.supportsDrilldown=true;var s,u=function(t){t.call(this);d(this.points,function(t){if(t.drilldown&&t.graphic){t.graphic.attr({class:"highcharts-drilldown-point"}).css({cursor:"pointer"})}})};for(s in e){if(e[s].prototype.supportsDrilldown){i(e[s].prototype,"drawTracker",u)}}})(Highcharts);