/*
 Highcharts JS v7.2.0 (2019-09-03)

 Timeline series

 (c) 2010-2019 Highsoft AS
 Author: Daniel Studencki

 License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/timeline",["highcharts"],function(f){b(f);b.Highcharts=f;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function f(b,l,f,q){b.hasOwnProperty(l)||(b[l]=q.apply(null,f))}b=b?b._modules:{};f(b,"modules/timeline.src.js",[b["parts/Globals.js"],b["parts/Utilities.js"]],function(b,l){var f=l.defined,q=l.isNumber,v=l.objectEach,
p=b.addEvent,r=b.merge,n=b.pick,w=b.Point,m=b.Series;l=b.seriesType;var t=b.seriesTypes;l("timeline","line",{colorByPoint:!0,stickyTracking:!1,ignoreHiddenPoint:!0,legendType:"point",lineWidth:4,tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px"> {point.key}</span><br/>',pointFormat:"{point.description}"},states:{hover:{lineWidthPlus:0}},dataLabels:{enabled:!0,allowOverlap:!0,connectorWidth:1,backgroundColor:"#ffffff",formatter:function(){var a=this.series.chart.styledMode?
"<span>\u25cf </span>":'<span style="color:'+this.point.color+'">\u25cf </span>';return a+='<span class="highcharts-strong">'+(this.key||"")+"</span><br/>"+(this.point.label||"")},borderWidth:1,borderColor:"#999999",borderRadius:3,distance:100,alternate:!0,verticalAlign:"middle",color:"#333333",style:{textOutline:"none",fontWeight:"normal",fontSize:"12px"},shadow:!1},marker:{enabledThreshold:0,symbol:"square",radius:6,lineWidth:2,height:15},showInLegend:!1,colorKey:"x"},{trackerGroups:["markerGroup",
"dataLabelsGroup"],drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,drawTracker:b.TrackerMixin.drawTrackerPoint,init:function(){var a=this;m.prototype.init.apply(a,arguments);p(a,"afterTranslate",function(){var c,d=Number.MAX_VALUE;a.points.forEach(function(a){a.isInside=a.isInside&&a.visible;a.visible&&!a.isNull&&(f(c)&&(d=Math.min(d,Math.abs(a.plotX-c))),c=a.plotX)});a.closestPointRangePx=d});p(a,"drawDataLabels",function(){a.distributeDL()});p(a,"afterDrawDataLabels",function(){var c;a.points.forEach(function(a){if(c=
a.dataLabel)return c.animate=function(a){this.targetPosition&&(this.targetPosition=a);return b.SVGElement.prototype.animate.apply(this,arguments)},c.targetPosition||(c.targetPosition={}),a.drawConnector()})});p(a.chart,"afterHideOverlappingLabels",function(){a.points.forEach(function(a){a.connector&&a.dataLabel&&a.dataLabel.oldOpacity!==a.dataLabel.newOpacity&&a.alignConnector()})})},alignDataLabel:function(a,c){var d=this.chart.inverted,b=this.visibilityMap.filter(function(a){return a}),e=this.visiblePointsCount,
h=b.indexOf(a);b=this.options.dataLabels;var g=a.userDLOptions||{};h=b.alternate?h&&h!==e-1?2:1.5:1;e=Math.floor(this.xAxis.len/e);var u=c.padding;if(a.visible){var f=Math.abs(g.x||a.options.dataLabels.x);d?(d=2*(f-u)-a.itemHeight/2,d={width:d,textOverflow:c.width/d*c.height/2>e*h?"ellipsis":"none"}):d={width:g.width||b.width||e*h-2*u};c.css(d);this.chart.styledMode||c.shadow(b.shadow)}m.prototype.alignDataLabel.apply(this,arguments)},processData:function(){var a=0,c;this.visibilityMap=this.getVisibilityMap();
this.visibilityMap.forEach(function(c){c&&a++});this.visiblePointsCount=a;for(c=0;c<this.xData.length;c++)this.yData[c]=1;m.prototype.processData.call(this,arguments)},getXExtremes:function(a){var c=this;a=a.filter(function(a,b){return c.points[b].isValid()&&c.points[b].visible});return{min:b.arrayMin(a),max:b.arrayMax(a)}},generatePoints:function(){var a=this;m.prototype.generatePoints.apply(a);a.points.forEach(function(c,b){c.applyOptions({x:a.xData[b]},a.xData[b])})},getVisibilityMap:function(){return(this.data.length?
this.data:this.userOptions.data).map(function(a){return a&&!1!==a.visible&&!a.isNull?a:!1})},distributeDL:function(){var a=this,c=a.options.dataLabels,b,k,e={},h=1,g=c.distance;a.points.forEach(function(d){d.visible&&!d.isNull&&(b=d.options,k=d.options.dataLabels,a.hasRendered||(d.userDLOptions=r({},k)),e[a.chart.inverted?"x":"y"]=c.alternate&&h%2?-g:g,b.dataLabels=r(e,d.userDLOptions),h++)})},markerAttribs:function(a,c){var b=this.options.marker,k=a.marker||{},e=k.symbol||b.symbol,h=n(k.width,b.width,
this.closestPointRangePx),g=n(k.height,b.height),f=0;if(this.xAxis.isDatetimeAxis)return t.line.prototype.markerAttribs.call(this,a,c);c&&(b=b.states[c]||{},c=k.states&&k.states[c]||{},f=n(c.radius,b.radius,f+(b.radiusPlus||0)));a.hasImage=e&&0===e.indexOf("url");return{x:Math.floor(a.plotX)-h/2-f/2,y:a.plotY-g/2-f/2,width:h+f,height:g+f}},bindAxes:function(){var a=this;m.prototype.bindAxes.call(a);["xAxis","yAxis"].forEach(function(b){"xAxis"!==b||a[b].userOptions.type||(a[b].categories=a[b].hasNames=
!0)})}},{init:function(){var a=w.prototype.init.apply(this,arguments);a.name=n(a.name,"Event");a.y=1;return a},isValid:function(){return null!==this.options.y},setVisible:function(a,b){var c=this.series;b=n(b,c.options.ignoreHiddenPoint);t.pie.prototype.pointClass.prototype.setVisible.call(this,a,!1);c.processData();b&&c.chart.redraw()},setState:function(){var a=m.prototype.pointClass.prototype.setState;this.isNull||a.apply(this,arguments)},getConnectorPath:function(){var a=this.series.chart,b=this.series.xAxis.len,
d=a.inverted,f=d?"x2":"y2",e=this.dataLabel,h=e.targetPosition,g={x1:this.plotX,y1:this.plotY,x2:this.plotX,y2:q(h.y)?h.y:e.y},l=(e.alignAttr||e)[f[0]]<this.series.yAxis.len/2;d&&(g={x1:this.plotY,y1:b-this.plotX,x2:h.x||e.x,y2:b-this.plotX});l&&(g[f]+=e[d?"width":"height"]);v(g,function(a,b){g[b]-=(e.alignAttr||e)[b[0]]});return a.renderer.crispLine(["M",g.x1,g.y1,"L",g.x2,g.y2],e.options.connectorWidth)},drawConnector:function(){var a=this.series;this.connector||(this.connector=a.chart.renderer.path(this.getConnectorPath()).attr({zIndex:-1}).add(this.dataLabel));
this.series.chart.isInsidePlot(this.dataLabel.x,this.dataLabel.y)&&this.alignConnector()},alignConnector:function(){var a=this.series,b=this.connector,d=this.dataLabel,k=this.dataLabel.options=r(a.options.dataLabels,this.options.dataLabels),e=this.series.chart,h=b.getBBox(),g=h.x+d.translateX;h=h.y+d.translateY;e.inverted?h-=d.options.connectorWidth/2:g+=d.options.connectorWidth/2;e=e.isInsidePlot(g,h);b[e?"animate":"attr"]({d:this.getConnectorPath()});a.chart.styledMode||b.attr({stroke:k.connectorColor||
this.color,"stroke-width":k.connectorWidth,opacity:d[f(d.newOpacity)?"newOpacity":"opacity"]})}})});f(b,"masters/modules/timeline.src.js",[],function(){})});
//# sourceMappingURL=timeline.js.map