/** * Highcharts Gantt JS v11.2.0 (2023-10-30) * * (c) 2017-2021 Lars Cabrera, Torstein Honsi, Jon Arild Nygard & Oystein Moseng * * License: www.highcharts.com/license */!function(t,e){"object"==typeof module&&module.exports?(e.default=e,module.exports=t.document?e(t):e):"function"==typeof define&&define.amd?define("highcharts/highcharts-gantt",function(){return e(t)}):(t.Highcharts&&t.Highcharts.error(16,!0),t.Highcharts=e(t))}("undefined"!=typeof window?window:this,function(t){"use strict";var e={};function i(e,i,o,r){e.hasOwnProperty(i)||(e[i]=r.apply(null,o),"function"==typeof CustomEvent&&t.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}return i(e,"Core/Globals.js",[],function(){var e,i;return(i=e||(e={})).SVG_NS="http://www.w3.org/2000/svg",i.product="Highcharts",i.version="11.2.0",i.win=void 0!==t?t:{},i.doc=i.win.document,i.svg=i.doc&&i.doc.createElementNS&&!!i.doc.createElementNS(i.SVG_NS,"svg").createSVGRect,i.userAgent=i.win.navigator&&i.win.navigator.userAgent||"",i.isChrome=-1!==i.userAgent.indexOf("Chrome"),i.isFirefox=-1!==i.userAgent.indexOf("Firefox"),i.isMS=/(edge|msie|trident)/i.test(i.userAgent)&&!i.win.opera,i.isSafari=!i.isChrome&&-1!==i.userAgent.indexOf("Safari"),i.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(i.userAgent),i.isWebKit=-1!==i.userAgent.indexOf("AppleWebKit"),i.deg2rad=2*Math.PI/360,i.hasBidiBug=i.isFirefox&&4>parseInt(i.userAgent.split("Firefox/")[1],10),i.hasTouch=!!i.win.TouchEvent,i.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],i.noop=function(){},i.supportsPassiveEvents=function(){var t=!1;if(!i.isMS){var e=Object.defineProperty({},"passive",{get:function(){t=!0}});i.win.addEventListener&&i.win.removeEventListener&&(i.win.addEventListener("testPassive",i.noop,e),i.win.removeEventListener("testPassive",i.noop,e))}return t}(),i.charts=[],i.dateFormats={},i.seriesTypes={},i.symbolSizes={},i.chartCount=0,e}),i(e,"Core/Utilities.js",[e["Core/Globals.js"]],function(t){var e,i,o,r=t.charts,s=t.doc,n=t.win;function a(e,i,o,r){var s=i?"Highcharts error":"Highcharts warning";32===e&&(e="".concat(s,": Deprecated member"));var h=f(e),l=h?"".concat(s," #").concat(e,": www.highcharts.com/errors/").concat(e,"/"):e.toString();if(void 0!==r){var c="";h&&(l+="?"),C(r,function(t,e){c+="\n - ".concat(e,": ").concat(t),h&&(l+=encodeURI(e)+"="+encodeURI(t))}),l+=c}A(t,"displayError",{chart:o,code:e,message:l,params:r},function(){if(i)throw Error(l);n.console&&-1===a.messages.indexOf(l)&&console.warn(l)}),a.messages.push(l)}function h(t,e){return parseInt(t,e||10)}function l(t){return"string"==typeof t}function c(t){var e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function d(t,e){return!!t&&"object"==typeof t&&(!e||!c(t))}function p(t){return d(t)&&"number"==typeof t.nodeType}function u(t){var e=t&&t.constructor;return!!(d(t,!0)&&!p(t)&&e&&e.name&&"Object"!==e.name)}function f(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function g(t){return null!=t}function m(t,e,i){var o,r=l(e)&&!g(i),s=function(e,i){g(e)?t.setAttribute(i,e):r?(o=t.getAttribute(i))||"class"!==i||(o=t.getAttribute(i+"Name")):t.removeAttribute(i)};return l(e)?s(i,e):C(e,s),o}function v(t){return c(t)?t:[t]}function x(t,e){var i;for(i in t||(t={}),e)t[i]=e[i];return t}function y(){for(var t=arguments,e=t.length,i=0;i1e14?t:parseFloat(t.toPrecision(e||14))}(a||(a={})).messages=[],Math.easeInOutSine=function(t){return -.5*(Math.cos(Math.PI*t)-1)};var S=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var i,o=t.length;for(i=0;ii&&(i=t[e]);return i},arrayMin:function(t){for(var e=t.length,i=t[0];e--;)t[e]e?t-1&&r[h]){i=v(i),s[h]=[];for(var l=0;l1)for(r=t.length-1;r>0;r--)(o=t[r]-t[r-1])<0&&!s?(null==e||e(),e=void 0):o&&(void 0===i||o=s-1&&(s=Math.floor(a)),Math.max(0,s-(t(e,"padding-left",!0)||0)-(t(e,"padding-right",!0)||0))}if("height"===i)return Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-(t(e,"padding-top",!0)||0)-(t(e,"padding-bottom",!0)||0));var l=n.getComputedStyle(e,void 0);return l&&(r=l.getPropertyValue(i),y(o,"opacity"!==i)&&(r=h(r))),r},inArray:function(t,e,i){return a(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),e.indexOf(t,i)},insertItem:function(t,e){var i,o=t.options.index,r=e.length;for(i=t.options.isInternal?r:0;i=t))&&(r||!(a<=(e[s]+(e[s+1]||e[s]))/2)));s++);return k(n*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:C,offset:function(t){var e=s.documentElement,i=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0),width:i.width,height:i.height}},pad:function(t,e,i){return Array((e||2)+1-String(t).replace("-","").length).join(i||"0")+t},pick:y,pInt:h,pushUnique:function(t,e){return 0>t.indexOf(e)&&!!t.push(e)},relativeLength:function(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)},removeEvent:w,splat:v,stableSort:function(t,e){var i,o,r=t.length;for(o=0;o0?setTimeout(t,e,i):(t.call(0,i),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:T,useSerialIds:function(t){return o=y(t,o)},wrap:function(t,e,i){var o=t[e];t[e]=function(){var t=arguments,e=this;return i.apply(this,[function(){return o.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}}}),i(e,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),i(e,"Core/Color/Palettes.js",[],function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}}),i(e,"Core/Time.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){var i=t.win,o=e.defined,r=e.error,s=e.extend,n=e.isObject,a=e.merge,h=e.objectEach,l=e.pad,c=e.pick,d=e.splat,p=e.timeUnits,u=t.isSafari&&i.Intl&&i.Intl.DateTimeFormat.prototype.formatRange,f=t.isSafari&&i.Intl&&!i.Intl.DateTimeFormat.prototype.formatRange;return function(){function e(t){this.options={},this.useUTC=!1,this.variableTimezone=!1,this.Date=i.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(t)}return e.prototype.get=function(t,e){if(this.variableTimezone||this.timezoneOffset){var i=e.getTime(),o=i-this.getTimezoneOffset(e);e.setTime(o);var r=e["getUTC"+t]();return e.setTime(i),r}return this.useUTC?e["getUTC"+t]():e["get"+t]()},e.prototype.set=function(t,e,i){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===t||"Seconds"===t||"Minutes"===t&&this.getTimezoneOffset(e)%36e5==0)return e["setUTC"+t](i);var o=this.getTimezoneOffset(e),r=e.getTime()-o;e.setTime(r),e["setUTC"+t](i);var s=this.getTimezoneOffset(e);return r=e.getTime()+s,e.setTime(r)}return this.useUTC||u&&"FullYear"===t?e["setUTC"+t](i):e["set"+t](i)},e.prototype.update=function(t){void 0===t&&(t={});var e=c(t.useUTC,!0);this.options=t=a(!0,this.options,t),this.Date=t.Date||i.Date||Date,this.useUTC=e,this.timezoneOffset=e&&t.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=e&&!!(t.getTimezoneOffset||t.timezone)},e.prototype.makeTime=function(t,e,i,o,r,s){var n,a,h;return this.useUTC?(n=this.Date.UTC.apply(0,arguments),a=this.getTimezoneOffset(n),n+=a,a!==(h=this.getTimezoneOffset(n))?n+=h-a:a-36e5!==this.getTimezoneOffset(n-36e5)||f||(n-=36e5)):n=new this.Date(t,e,c(i,1),c(o,0),c(r,0),c(s,0)).getTime(),n},e.prototype.timezoneOffsetFunction=function(){var t=this,e=this.options,o=e.getTimezoneOffset,s=e.moment||i.moment;if(!this.useUTC)return function(t){return 6e4*new Date(t.toString()).getTimezoneOffset()};if(e.timezone){if(s)return function(t){return-(6e4*s.tz(t,e.timezone).utcOffset())};r(25)}return this.useUTC&&o?function(t){return 6e4*o(t.valueOf())}:function(){return 6e4*(t.timezoneOffset||0)}},e.prototype.dateFormat=function(e,i,r){if(!o(i)||isNaN(i))return t.defaultOptions.lang&&t.defaultOptions.lang.invalidDate||"";e=c(e,"%Y-%m-%d %H:%M:%S");var n=this,a=new this.Date(i),d=this.get("Hours",a),p=this.get("Day",a),u=this.get("Date",a),f=this.get("Month",a),g=this.get("FullYear",a),m=t.defaultOptions.lang,v=m&&m.weekdays,x=m&&m.shortWeekdays;return h(s({a:x?x[p]:v[p].substr(0,3),A:v[p],d:l(u),e:l(u,2," "),w:p,b:m.shortMonths[f],B:m.months[f],m:l(f+1),o:f+1,y:g.toString().substr(2,2),Y:g,H:l(d),k:d,I:l(d%12||12),l:d%12||12,M:l(this.get("Minutes",a)),p:d<12?"AM":"PM",P:d<12?"am":"pm",S:l(this.get("Seconds",a)),L:l(Math.floor(i%1e3),3)},t.dateFormats),function(t,o){for(;-1!==e.indexOf("%"+o);)e=e.replace("%"+o,"function"==typeof t?t.call(n,i):t)}),r?e.substr(0,1).toUpperCase()+e.substr(1):e},e.prototype.resolveDTLFormat=function(t){return n(t,!0)?t:{main:(t=d(t))[0],from:t[1],to:t[2]}},e.prototype.getTimeTicks=function(t,e,i,r){var n,a,h,l,d=this,u=d.Date,f=[],g={},m=new u(e),v=t.unitRange,x=t.count||1;if(r=c(r,1),o(e)){d.set("Milliseconds",m,v>=p.second?0:x*Math.floor(d.get("Milliseconds",m)/x)),v>=p.second&&d.set("Seconds",m,v>=p.minute?0:x*Math.floor(d.get("Seconds",m)/x)),v>=p.minute&&d.set("Minutes",m,v>=p.hour?0:x*Math.floor(d.get("Minutes",m)/x)),v>=p.hour&&d.set("Hours",m,v>=p.day?0:x*Math.floor(d.get("Hours",m)/x)),v>=p.day&&d.set("Date",m,v>=p.month?1:Math.max(1,x*Math.floor(d.get("Date",m)/x))),v>=p.month&&(d.set("Month",m,v>=p.year?0:x*Math.floor(d.get("Month",m)/x)),a=d.get("FullYear",m)),v>=p.year&&(a-=a%x,d.set("FullYear",m,a)),v===p.week&&(l=d.get("Day",m),d.set("Date",m,d.get("Date",m)-l+r+(l4*p.month||d.getTimezoneOffset(e)!==d.getTimezoneOffset(i));var k=m.getTime();for(n=1;k1?k=d.makeTime(a,y,b,M+n*x):k+=v*x,n++;f.push(k),v<=p.hour&&f.length<1e4&&f.forEach(function(t){t%18e5==0&&"000000000"===d.dateFormat("%H%M%S%L",t)&&(g[t]="day")})}return f.info=s(t,{higherRanks:g,totalRange:v*x}),f},e.prototype.getDateFormat=function(t,e,i,o){var r=this.dateFormat("%m-%d %H:%M:%S.%L",e),s="01-01 00:00:00.000",n={millisecond:15,second:12,minute:9,hour:6,day:3},a="millisecond",h=a;for(a in p){if(t===p.week&&+this.dateFormat("%w",e)===i&&r.substr(6)===s.substr(6)){a="week";break}if(p[a]>t){a=h;break}if(n[a]&&r.substr(n[a])!==s.substr(n[a]))break;"week"!==a&&(h=a)}return this.resolveDTLFormat(o[a]).main},e}()}),i(e,"Core/Defaults.js",[e["Core/Chart/ChartDefaults.js"],e["Core/Globals.js"],e["Core/Color/Palettes.js"],e["Core/Time.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s=e.isTouchDevice,n=e.svg,a=r.merge,h={colors:i.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:t,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:"",align:"center",widthAdjust:-44},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:n,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %e %b, %H:%M:%S.%L",second:"%A, %e %b, %H:%M:%S",minute:"%A, %e %b, %H:%M",hour:"%A, %e %b, %H:%M",day:"%A, %e %b %Y",week:"Week from %A, %e %b %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:s?25:10,headerFormat:'{point.key}
',pointFormat:' {series.name}: {point.y}
',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};h.chart.styledMode=!1;var l=new o(h.time);return{defaultOptions:h,defaultTime:l,getOptions:function(){return h},setOptions:function(t){return a(!0,h,t),(t.time||t.global)&&(e.time?e.time.update(a(h.global,h.time,t.global,t.time)):e.time=l),h}}}),i(e,"Core/Color/Color.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){var i=e.isNumber,o=e.merge,r=e.pInt;return function(){function e(i){this.rgba=[NaN,NaN,NaN,NaN],this.input=i;var o=t.Color;if(o&&o!==e)return new o(i);this.init(i)}return e.parse=function(t){return t?new e(t):e.None},e.prototype.init=function(t){var i,o,r,s;if("object"==typeof t&&void 0!==t.stops)this.stops=t.stops.map(function(t){return new e(t[1])});else if("string"==typeof t){if(this.input=t=e.names[t.toLowerCase()]||t,"#"===t.charAt(0)){var n=t.length,a=parseInt(t.substr(1),16);7===n?o=[(16711680&a)>>16,(65280&a)>>8,255&a,1]:4===n&&(o=[(3840&a)>>4|(3840&a)>>8,(240&a)>>4|240&a,(15&a)<<4|15&a,1])}if(!o)for(r=e.parsers.length;r--&&!o;)(i=(s=e.parsers[r]).regex.exec(t))&&(o=s.parse(i))}o&&(this.rgba=o)},e.prototype.get=function(t){var e=this.input,r=this.rgba;if("object"==typeof e&&void 0!==this.stops){var s=o(e);return s.stops=[].slice.call(s.stops),this.stops.forEach(function(e,i){s.stops[i]=[s.stops[i][0],e.get(t)]}),s}return r&&i(r[0])?"rgb"!==t&&(t||1!==r[3])?"a"===t?"".concat(r[3]):"rgba("+r.join(",")+")":"rgb("+r[0]+","+r[1]+","+r[2]+")":e},e.prototype.brighten=function(t){var e=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(i(t)&&0!==t)for(var o=0;o<3;o++)e[o]+=r(255*t),e[o]<0&&(e[o]=0),e[o]>255&&(e[o]=255);return this},e.prototype.setOpacity=function(t){return this.rgba[3]=t,this},e.prototype.tweenTo=function(t,e){var o=this.rgba,r=t.rgba;if(!i(o[0])||!i(r[0]))return t.input||"none";var s=1!==r[3]||1!==o[3];return(s?"rgba(":"rgb(")+Math.round(r[0]+(o[0]-r[0])*(1-e))+","+Math.round(r[1]+(o[1]-r[1])*(1-e))+","+Math.round(r[2]+(o[2]-r[2])*(1-e))+(s?","+(r[3]+(o[3]-r[3])*(1-e)):"")+")"},e.names={white:"#ffffff",black:"#000000"},e.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),1]}}],e.None=new e(""),e}()}),i(e,"Core/Animation/Fx.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var o=t.parse,r=e.win,s=i.isNumber,n=i.objectEach;return function(){function t(t,e,i){this.pos=NaN,this.options=e,this.elem=t,this.prop=i}return t.prototype.dSetter=function(){var t=this.paths,e=t&&t[0],i=t&&t[1],o=this.now||0,r=[];if(1!==o&&e&&i){if(e.length===i.length&&o<1)for(var n=0;n=h+this.startTime?(this.now=this.end,this.pos=1,this.update(),l[this.prop]=!0,i=!0,n(l,function(t){!0!==t&&(i=!1)}),i&&a&&a.call(s),e=!1):(this.pos=r.easing((o-this.startTime)/h),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e},t.prototype.initPath=function(t,e,i){var o,r,n,a,h=t.startX,l=t.endX,c=i.slice(),d=t.isArea,p=d?2:1,u=e&&e.slice();if(!u)return[c,c];function f(t,e){for(;t.length=e},gt:function(t,e){return t>e},if:function(t){return!!t},le:function(t,e){return t<=e},lt:function(t,e){return t%_@"'= #\(\)]+)\}/g,f=/\(([a-zA-Z0-9\:\.\,;\-\/<>%_@"'= ]+)\)/g,g=[],m=/f$/,v=/\.([0-9])/,x=i.lang,y=r&&r.time||o,b=r&&r.numberFormatter||u,M=function(t){var i;return void 0===t&&(t=""),"true"===t||"false"!==t&&((i=Number(t)).toString()===t?i:s(t,e))},k=0;null!==(n=c.exec(t));){var S=f.exec(n[1]);S&&(n=S,h=!0),a&&a.isBlock||(a={ctx:e,expression:n[1],find:n[0],isBlock:"#"===n[1].charAt(0),start:n.index,startInner:n.index+n[0].length,length:n[0].length});var C=n[1].split(" ")[0].replace("#","");d[C]&&(a.isBlock&&C===a.fn&&k++,a.fn||(a.fn=C));var w="else"===n[1];if(a.isBlock&&a.fn&&(n[1]==="/".concat(a.fn)||w)){if(k)!w&&k--;else{var A=a.startInner,T=t.substr(A,n.index-A);void 0===a.body?(a.body=T,a.startInner=n.index+n[0].length):a.elseBody=T,a.find+=T+n[0],w||(g.push(a),a=void 0)}}else a.isBlock||g.push(a);if(S&&!(null==a?void 0:a.isBlock))break}return g.forEach(function(i){var o,r,s=i.body,n=i.elseBody,a=i.expression,h=i.fn;if(h){var c=[i],u=a.split(" ");for(r=d[h].length;r--;)c.unshift(M(u[r+1]));o=d[h].apply(e,c),i.isBlock&&"boolean"==typeof o&&(o=p(o?s:n,e))}else{var f=a.split(":");if(o=M(f.shift()||""),f.length&&"number"==typeof o){var g=f.join(":");if(m.test(g)){var k=parseInt((g.match(v)||["","-1"])[1],10);null!==o&&(o=b(o,k,x.decimalPoint,g.indexOf(",")>-1?x.thousandsSep:""))}else o=y.dateFormat(g,o)}}t=t.replace(i.find,l(o,""))}),h?p(t,e,r):t}function u(t,e,o,r){t=+t||0,e=+e;var s,n,h=i.lang,d=(t.toString().split(".")[1]||"").split("e")[0].length,p=t.toString().split("e"),u=e;-1===e?e=Math.min(d,20):a(e)?e&&p[1]&&p[1]<0&&((n=e+ +p[1])>=0?(p[0]=(+p[0]).toExponential(n).split("e")[0],e=n):(p[0]=p[0].split(".")[0]||0,t=e<20?(p[0]*Math.pow(10,p[1])).toFixed(e):0,p[1]=0)):e=2;var f=(Math.abs(p[1]?p[0]:t)+Math.pow(10,-Math.max(e,d)-1)).toFixed(e),g=String(c(f)),m=g.length>3?g.length%3:0;return o=l(o,h.decimalPoint),r=l(r,h.thousandsSep),s=(t<0?"-":"")+(m?g.substr(0,m)+r:""),0>+p[1]&&!u?s="0":s+=g.substr(m).replace(/(\d{3})(?=\d)/g,"$1"+r),e&&(s+=o+f.slice(-e)),p[1]&&0!=+s&&(s+="e"+p[1]),s}return{dateFormat:function(t,e,i){return o.dateFormat(t,e,i)},format:p,helpers:d,numberFormat:u}}),i(e,"Core/Renderer/RendererUtilities.js",[e["Core/Utilities.js"]],function(t){var e,i=t.clamp,o=t.pick,r=t.pushUnique,s=t.stableSort;return(e||(e={})).distribute=function t(e,n,a){var h,l,c,d,p,u,f=e,g=f.reducedLen||n,m=function(t,e){return t.target-e.target},v=[],x=e.length,y=[],b=v.push,M=!0,k=0;for(h=x;h--;)k+=e[h].size;if(k>g){for(s(e,function(t,e){return(e.rank||0)-(t.rank||0)}),c=(u=e[0].rank===e[e.length-1].rank)?x/2:-1,l=u?c:x-1;c&&k>g;)d=e[h=Math.floor(l)],r(y,h)&&(k-=d.size),l+=c,u&&l>=e.length&&(c/=2,l=c);y.sort(function(t,e){return e-t}).forEach(function(t){return b.apply(v,e.splice(t,1))})}for(s(e,m),e=e.map(function(t){return{size:t.size,targets:[t.target],align:o(t.align,.5)}});M;){for(h=e.length;h--;)d=e[h],p=(Math.min.apply(0,d.targets)+Math.max.apply(0,d.targets))/2,d.pos=i(p-d.size*d.align,0,n-d.size);for(h=e.length,M=!1;h--;)h>0&&e[h-1].pos+e[h-1].size>e[h].pos&&(e[h-1].size+=e[h].size,e[h-1].targets=e[h-1].targets.concat(e[h].targets),e[h-1].align=.5,e[h-1].pos+e[h-1].size>n&&(e[h-1].pos=n-e[h-1].size),e.splice(h,1),M=!0)}return b.apply(f,v),h=0,e.some(function(e){var i=0;return(e.targets||[]).some(function(){return(f[h].pos=e.pos+i,void 0!==a&&Math.abs(f[h].pos-f[h].target)>a)?(f.slice(0,h+1).forEach(function(t){return delete t.pos}),f.reducedLen=(f.reducedLen||n)-.1*n,f.reducedLen>.1*n&&t(f,n,a),!0):(i+=f[h].size,h++,!1)})}),s(f,m),f},e}),i(e,"Core/Renderer/SVG/SVGElement.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i,o){var r=t.animate,s=t.animObject,n=t.stop,a=i.deg2rad,h=i.doc,l=(i.noop,i.svg),c=i.SVG_NS,d=i.win,p=o.addEvent,u=o.attr,f=o.createElement,g=o.css,m=o.defined,v=o.erase,x=o.extend,y=o.fireEvent,b=o.isArray,M=o.isFunction,k=o.isObject,S=o.isString,C=o.merge,w=o.objectEach,A=o.pick,T=o.pInt,P=o.syncTimeout,O=o.uniqueKey,L=function(){function t(){this.element=void 0,this.onEvents={},this.opacity=1,this.renderer=void 0,this.SVG_NS=c}return t.prototype._defaultGetter=function(t){var e=A(this[t+"Value"],this[t],this.element?this.element.getAttribute(t):null,0);return/^[\-0-9\.]+$/.test(e)&&(e=parseFloat(e)),e},t.prototype._defaultSetter=function(t,e,i){i.setAttribute(e,t)},t.prototype.add=function(t){var e,i=this.renderer,o=this.element;return t&&(this.parentGroup=t),void 0!==this.textStr&&"text"===this.element.nodeName&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(o),this.onAdd&&this.onAdd(),this},t.prototype.addClass=function(t,e){var i=e?"":this.attr("class")||"";return(t=(t||"").split(/ /g).reduce(function(t,e){return -1===i.indexOf(e)&&t.push(e),t},i?[i]:[]).join(" "))!==i&&this.attr("class",t),this},t.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},t.prototype.align=function(t,e,i){var o,r,s,n,a,h={},l=this.renderer,c=l.alignedObjects;t?(this.alignOptions=t,this.alignByTranslate=e,(!i||S(i))&&(this.alignTo=s=i||"renderer",v(c,this),c.push(this),i=void 0)):(t=this.alignOptions,e=this.alignByTranslate,s=this.alignTo),i=A(i,l[s],"scrollablePlotBox"===s?l.plotBox:void 0,l);var d=t.align,p=t.verticalAlign;return o=(i.x||0)+(t.x||0),r=(i.y||0)+(t.y||0),"right"===d?n=1:"center"===d&&(n=2),n&&(o+=(i.width-(t.width||0))/n),h[e?"translateX":"x"]=Math.round(o),"bottom"===p?a=1:"middle"===p&&(a=2),a&&(r+=(i.height-(t.height||0))/a),h[e?"translateY":"y"]=Math.round(r),this[this.placed?"animate":"attr"](h),this.placed=!0,this.alignAttr=h,this},t.prototype.alignSetter=function(t){var e={left:"start",center:"middle",right:"end"};e[t]&&(this.alignValue=t,this.element.setAttribute("text-anchor",e[t]))},t.prototype.animate=function(t,e,i){var o=this,n=s(A(e,this.renderer.globalAnimation,!0)),a=n.defer;return h.hidden&&(n.duration=0),0!==n.duration?(i&&(n.complete=i),P(function(){o.element&&r(o,t,n)},a)):(this.attr(t,void 0,i||n.complete),w(t,function(t,e){n.step&&n.step.call(this,t,{prop:e,pos:1,elem:this})},this)),this},t.prototype.applyTextOutline=function(t){var e=this.element;-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(e.style.fill)));var o=t.split(" "),r=o[o.length-1],s=o[0];if(s&&"none"!==s&&i.svg){this.fakeTS=!0,s=s.replace(/(^[\d\.]+)(.*?)$/g,function(t,e,i){return 2*Number(e)+i}),this.removeTextOutline();var n=h.createElementNS(c,"tspan");u(n,{class:"highcharts-text-outline",fill:r,stroke:r,"stroke-width":s,"stroke-linejoin":"round"});var a=e.querySelector("textPath")||e;[].forEach.call(a.childNodes,function(t){var e=t.cloneNode(!0);e.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(function(t){return e.removeAttribute(t)}),n.appendChild(e)});var l=0;[].forEach.call(a.querySelectorAll("text tspan"),function(t){l+=Number(t.getAttribute("dy"))});var d=h.createElementNS(c,"tspan");d.textContent="​",u(d,{x:Number(e.getAttribute("x")),dy:-l}),n.appendChild(d),a.insertBefore(n,a.firstChild)}},t.prototype.attr=function(e,i,o,r){var s,a,h,l=this.element,c=t.symbolCustomAttribs,d=this;return"string"==typeof e&&void 0!==i&&(s=e,(e={})[s]=i),"string"==typeof e?d=(this[e+"Getter"]||this._defaultGetter).call(this,e,l):(w(e,function(t,i){h=!1,r||n(this,i),this.symbolName&&-1!==c.indexOf(i)&&(a||(this.symbolAttr(e),a=!0),h=!0),this.rotation&&("x"===i||"y"===i)&&(this.doTransform=!0),h||(this[i+"Setter"]||this._defaultSetter).call(this,t,i,l)},this),this.afterSetters()),o&&o.call(this),d},t.prototype.clip=function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":"none")},t.prototype.crisp=function(t,e){var i=Math.round(e=e||t.strokeWidth||0)%2/2;return t.x=Math.floor(t.x||this.x||0)+i,t.y=Math.floor(t.y||this.y||0)+i,t.width=Math.floor((t.width||this.width||0)-2*i),t.height=Math.floor((t.height||this.height||0)-2*i),m(t.strokeWidth)&&(t.strokeWidth=e),t},t.prototype.complexColor=function(t,i,o){var r,s,n,a,h,l,c,d,p,u,f,g=this.renderer,v=[];y(this.renderer,"complexColor",{args:arguments},function(){if(t.radialGradient?s="radialGradient":t.linearGradient&&(s="linearGradient"),s){if(n=t[s],h=g.gradients,l=t.stops,p=o.radialReference,b(n)&&(t[s]=n={x1:n[0],y1:n[1],x2:n[2],y2:n[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===s&&p&&!m(n.gradientUnits)&&(a=n,n=C(n,g.getRadialAttr(p,a),{gradientUnits:"userSpaceOnUse"})),w(n,function(t,e){"id"!==e&&v.push(e,t)}),w(l,function(t){v.push(t)}),h[v=v.join(",")])u=h[v].attr("id");else{n.id=u=O();var x=h[v]=g.createElement(s).attr(n).add(g.defs);x.radAttr=a,x.stops=[],l.forEach(function(t){0===t[1].indexOf("rgba")?(c=(r=e.parse(t[1])).get("rgb"),d=r.get("a")):(c=t[1],d=1);var i=g.createElement("stop").attr({offset:t[0],"stop-color":c,"stop-opacity":d}).add(x);x.stops.push(i)})}f="url("+g.url+"#"+u+")",o.setAttribute(i,f),o.gradient=v,t.toString=function(){return f}}})},t.prototype.css=function(t){var e,i=this.styles,o={},r=this.element,s=!i;if(i&&w(t,function(t,e){i&&i[e]!==t&&(o[e]=t,s=!0)}),s){i&&(t=x(i,o)),null===t.width||"auto"===t.width?delete this.textWidth:"text"===r.nodeName.toLowerCase()&&t.width&&(e=this.textWidth=T(t.width)),this.styles=t,e&&!l&&this.renderer.forExport&&delete t.width;var n=C(t);r.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","width"].forEach(function(t){return n&&delete n[t]}),n.color&&(n.fill=n.color)),g(r,n)}return this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t.textOutline&&this.applyTextOutline(t.textOutline)),this},t.prototype.dashstyleSetter=function(t){var e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){var o=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=o.length;e--;)o[e]=""+T(o[e])*A(i,NaN);t=o.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}},t.prototype.destroy=function(){var t,e,i,o=this,r=o.element||{},s=o.renderer,a=r.ownerSVGElement,h="SPAN"===r.nodeName&&o.parentGroup||void 0;if(r.onclick=r.onmouseout=r.onmouseover=r.onmousemove=r.point=null,n(o),o.clipPath&&a){var l=o.clipPath;[].forEach.call(a.querySelectorAll("[clip-path],[CLIP-PATH]"),function(t){t.getAttribute("clip-path").indexOf(l.element.id)>-1&&t.removeAttribute("clip-path")}),o.clipPath=l.destroy()}if(o.connector=null===(t=o.connector)||void 0===t?void 0:t.destroy(),o.stops){for(i=0;i0)){for(;v.length>250;)delete f[v.shift()];f[h]||v.push(h),f[h]=o}return o},t.prototype.getStyle=function(t){return d.getComputedStyle(this.element||this,"").getPropertyValue(t)},t.prototype.hasClass=function(t){return -1!==(""+this.attr("class")).split(" ").indexOf(t)},t.prototype.hide=function(){return this.attr({visibility:"hidden"})},t.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}},t.prototype.init=function(t,e){this.element="span"===e?f(e):h.createElementNS(this.SVG_NS,e),this.renderer=t,y(this,"afterInit")},t.prototype.on=function(t,e){var i=this.onEvents;return i[t]&&i[t](),i[t]=p(this.element,t,e),this},t.prototype.opacitySetter=function(t,e,i){var o=Number(Number(t).toFixed(3));this.opacity=o,i.setAttribute(e,o)},t.prototype.removeClass=function(t){return this.attr("class",(""+this.attr("class")).replace(S(t)?new RegExp("(^| )".concat(t,"( |$)")):t," ").replace(/ +/g," ").trim())},t.prototype.removeTextOutline=function(){var t=this.element.querySelector("tspan.highcharts-text-outline");t&&this.safeRemoveChild(t)},t.prototype.safeRemoveChild=function(t){var e=t.parentNode;e&&e.removeChild(t)},t.prototype.setRadialReference=function(t){var e=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this},t.prototype.setTextPath=function(t,e){var i=this;e=C(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);var o=this.renderer.url,r=this.text||this,s=r.textPath,n=e.attributes,a=e.enabled;if(t=t||s&&s.path,s&&s.undo(),t&&a){var h=p(r,"afterModifyTree",function(e){if(t&&a){var s=t.attr("id");s||t.attr("id",s=O());var h={x:0,y:0};m(n.dx)&&(h.dx=n.dx,delete n.dx),m(n.dy)&&(h.dy=n.dy,delete n.dy),r.attr(h),i.attr({transform:""}),i.box&&(i.box=i.box.destroy());var l=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:x(n,{"text-anchor":n.textAnchor,href:"".concat(o,"#").concat(s)}),children:l}}});r.textPath={path:t,undo:h}}else r.attr({dx:0,dy:0}),delete r.textPath;return this.added&&(r.textCache="",this.renderer.buildText(r)),this},t.prototype.shadow=function(t){var e,i=this.renderer,o=C((null===(e=this.parentGroup)||void 0===e?void 0:e.rotation)===90?{offsetX:-1,offsetY:-1}:{},k(t)?t:{}),r=i.shadowDefinition(o);return this.attr({filter:t?"url(".concat(i.url,"#").concat(r,")"):"none"})},t.prototype.show=function(t){return void 0===t&&(t=!0),this.attr({visibility:t?"inherit":"visible"})},t.prototype["stroke-widthSetter"]=function(t,e,i){this[e]=t,i.setAttribute(e,t)},t.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var t,e=this.getStyle("stroke-width"),i=0;return e.indexOf("px")===e.length-2?i=T(e):""!==e&&(u(t=h.createElementNS(c,"rect"),{width:e,"stroke-width":0}),this.element.parentNode.appendChild(t),i=t.getBBox().width,t.parentNode.removeChild(t)),i},t.prototype.symbolAttr=function(e){var i=this;t.symbolCustomAttribs.forEach(function(t){i[t]=A(e[t],i[t])}),i.attr({d:i.renderer.symbols[i.symbolName](i.x,i.y,i.width,i.height,i)})},t.prototype.textSetter=function(t){t!==this.textStr&&(delete this.textPxLength,this.textStr=t,this.added&&this.renderer.buildText(this))},t.prototype.titleSetter=function(t){var e=this.element,i=e.getElementsByTagName("title")[0]||h.createElementNS(this.SVG_NS,"title");e.insertBefore?e.insertBefore(i,e.firstChild):e.appendChild(i),i.textContent=String(A(t,"")).replace(/<[^>]*>/g,"").replace(/</g,"<").replace(/>/g,">")},t.prototype.toFront=function(){var t=this.element;return t.parentNode.appendChild(t),this},t.prototype.translate=function(t,e){return this.attr({translateX:t,translateY:e})},t.prototype.updateTransform=function(){var t=this.element,e=this.matrix,i=this.rotation,o=void 0===i?0:i,r=this.scaleX,s=this.scaleY,n=this.translateX,a=this.translateY,h=["translate("+(void 0===n?0:n)+","+(void 0===a?0:a)+")"];m(e)&&h.push("matrix("+e.join(",")+")"),o&&h.push("rotate("+o+" "+A(this.rotationOriginX,t.getAttribute("x"),0)+" "+A(this.rotationOriginY,t.getAttribute("y")||0)+")"),(m(r)||m(s))&&h.push("scale("+A(r,1)+" "+A(s,1)+")"),h.length&&!(this.text||this).textPath&&t.setAttribute("transform",h.join(" "))},t.prototype.visibilitySetter=function(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t},t.prototype.xGetter=function(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)},t.prototype.zIndexSetter=function(t,e){var i,o,r,s,n,a=this.renderer,h=this.parentGroup,l=(h||a).element||a.box,c=this.element,d=l===a.box,p=!1,u=this.added;if(m(t)?(c.setAttribute("data-z-index",t),t=+t,this[e]===t&&(u=!1)):m(this[e])&&c.removeAttribute("data-z-index"),this[e]=t,u){for((t=this.zIndex)&&h&&(h.handleZ=!0),n=(i=l.childNodes).length-1;n>=0&&!p;n--)s=!m(r=(o=i[n]).getAttribute("data-z-index")),o!==c&&(t<0&&s&&!d&&!n?(l.insertBefore(c,i[n]),p=!0):(T(r)<=t||s&&(!m(t)||t>=0))&&(l.insertBefore(c,i[n+1]),p=!0));p||(l.insertBefore(c,i[d?3:0]),p=!0)}return p},t.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],t}();return L.prototype.strokeSetter=L.prototype.fillSetter,L.prototype.yGetter=L.prototype.xGetter,L.prototype.matrixSetter=L.prototype.rotationOriginXSetter=L.prototype.rotationOriginYSetter=L.prototype.rotationSetter=L.prototype.scaleXSetter=L.prototype.scaleYSetter=L.prototype.translateXSetter=L.prototype.translateYSetter=L.prototype.verticalAlignSetter=function(t,e){this[e]=t,this.doTransform=!0},L}),i(e,"Core/Renderer/RendererRegistry.js",[e["Core/Globals.js"]],function(t){var e,i,o;return(i=e||(e={})).rendererTypes={},i.getRendererType=function(t){return void 0===t&&(t=o),i.rendererTypes[t]||i.rendererTypes[o]},i.registerRendererType=function(e,r,s){i.rendererTypes[e]=r,(!o||s)&&(o=e,t.Renderer=r)},e}),i(e,"Core/Renderer/SVG/SVGLabel.js",[e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(t,e){var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),r=e.defined,s=e.extend,n=e.isNumber,a=e.merge,h=e.pick,l=e.removeEvent;return function(e){function i(t,o,r,s,n,a,h,l,c,d){var p,u=e.call(this)||this;return u.paddingLeftSetter=u.paddingSetter,u.paddingRightSetter=u.paddingSetter,u.init(t,"g"),u.textStr=o,u.x=r,u.y=s,u.anchorX=a,u.anchorY=h,u.baseline=c,u.className=d,u.addClass("button"===d?"highcharts-no-tooltip":"highcharts-label"),d&&u.addClass("highcharts-"+d),u.text=t.text(void 0,0,0,l).attr({zIndex:1}),"string"==typeof n&&((p=/^url\((.*?)\)$/.test(n))||u.renderer.symbols[n])&&(u.symbolKey=n),u.bBox=i.emptyBBox,u.padding=3,u.baselineOffset=0,u.needsBox=t.styledMode||p,u.deferredAttr={},u.alignFactor=0,u}return o(i,e),i.prototype.alignSetter=function(t){var e={left:0,center:.5,right:1}[t];e!==this.alignFactor&&(this.alignFactor=e,this.bBox&&n(this.xSetting)&&this.attr({x:this.xSetting}))},i.prototype.anchorXSetter=function(t,e){this.anchorX=t,this.boxAttr(e,Math.round(t)-this.getCrispAdjust()-this.xSetting)},i.prototype.anchorYSetter=function(t,e){this.anchorY=t,this.boxAttr(e,t-this.ySetting)},i.prototype.boxAttr=function(t,e){this.box?this.box.attr(t,e):this.deferredAttr[t]=e},i.prototype.css=function(e){if(e){var o={};e=a(e),i.textProps.forEach(function(t){void 0!==e[t]&&(o[t]=e[t],delete e[t])}),this.text.css(o),"fontSize"in o||"fontWeight"in o?this.updateTextPadding():("width"in o||"textOverflow"in o)&&this.updateBoxSize()}return t.prototype.css.call(this,e)},i.prototype.destroy=function(){l(this.element,"mouseenter"),l(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),t.prototype.destroy.call(this)},i.prototype.fillSetter=function(t,e){t&&(this.needsBox=!0),this.fill=t,this.boxAttr(e,t)},i.prototype.getBBox=function(){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var t=this.padding,e=h(this.paddingLeft,t);return{width:this.width||0,height:this.height||0,x:this.bBox.x-e,y:this.bBox.y-t}},i.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2},i.prototype.heightSetter=function(t){this.heightSetting=t},i.prototype.onAdd=function(){this.text.add(this),this.attr({text:h(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&r(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})},i.prototype.paddingSetter=function(t,e){n(t)?t!==this[e]&&(this[e]=t,this.updateTextPadding()):this[e]=void 0},i.prototype.rSetter=function(t,e){this.boxAttr(e,t)},i.prototype.strokeSetter=function(t,e){this.stroke=t,this.boxAttr(e,t)},i.prototype["stroke-widthSetter"]=function(t,e){t&&(this.needsBox=!0),this["stroke-width"]=t,this.boxAttr(e,t)},i.prototype["text-alignSetter"]=function(t){this.textAlign=t},i.prototype.textSetter=function(t){void 0!==t&&this.text.attr({text:t}),this.updateTextPadding()},i.prototype.updateBoxSize=function(){var t,e=this.text,o={},a=this.padding,h=this.bBox=(!n(this.widthSetting)||!n(this.heightSetting)||this.textAlign)&&r(e.textStr)?e.getBBox():i.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||h.height||0)+2*a;var l=this.renderer.fontMetrics(e);if(this.baselineOffset=a+Math.min((this.text.firstLineMetrics||l).b,h.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-l.h)/2),this.needsBox&&!e.textPath){if(!this.box){var c=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();c.addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),c.add(this)}t=this.getCrispAdjust(),o.x=t,o.y=(this.baseline?-this.baselineOffset:0)+t,o.width=Math.round(this.width),o.height=Math.round(this.height),this.box.attr(s(o,this.deferredAttr)),this.deferredAttr={}}},i.prototype.updateTextPadding=function(){var t=this.text;if(!t.textPath){this.updateBoxSize();var e=this.baseline?0:this.baselineOffset,i=h(this.paddingLeft,this.padding);r(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(i+=({center:.5,right:1})[this.textAlign]*(this.widthSetting-this.bBox.width)),(i!==t.x||e!==t.y)&&(t.attr("x",i),t.hasBoxWidthChanged&&(this.bBox=t.getBBox(!0)),void 0!==e&&t.attr("y",e)),t.x=i,t.y=e}},i.prototype.widthSetter=function(t){this.widthSetting=n(t)?t:void 0},i.prototype.getPaddedWidth=function(){var t=this.padding,e=h(this.paddingLeft,t),i=h(this.paddingRight,t);return(this.widthSetting||this.bBox.width||0)+e+i},i.prototype.xSetter=function(t){this.x=t,this.alignFactor&&(t-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(t),this.attr("translateX",this.xSetting)},i.prototype.ySetter=function(t){this.ySetting=this.y=Math.round(t),this.attr("translateY",this.ySetting)},i.emptyBBox={width:0,height:0,x:0,y:0},i.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"],i}(t)}),i(e,"Core/Renderer/SVG/Symbols.js",[e["Core/Utilities.js"]],function(t){var e=t.defined,i=t.isNumber,o=t.pick;function r(t,i,r,s,n){var a=[];if(n){var h=n.start||0,l=o(n.r,r),c=o(n.r,s||r),d=.001>Math.abs((n.end||0)-h-2*Math.PI),p=(n.end||0)-.001,u=n.innerR,f=o(n.open,d),g=Math.cos(h),m=Math.sin(h),v=Math.cos(p),x=Math.sin(p),y=o(n.longArc,p-h-Math.PI<.001?0:1),b=["A",l,c,0,y,o(n.clockwise,1),t+l*v,i+c*x];b.params={start:h,end:p,cx:t,cy:i},a.push(["M",t+l*g,i+c*m],b),e(u)&&((b=["A",u,u,0,y,e(n.clockwise)?1-n.clockwise:0,t+u*g,i+u*m]).params={start:p,end:h,cx:t,cy:i},a.push(f?["M",t+u*v,i+u*x]:["L",t+u*v,i+u*x],b)),f||a.push(["Z"])}return a}function s(t,e,i,o,r){return r&&r.r?n(t,e,i,o,r):[["M",t,e],["L",t+i,e],["L",t+i,e+o],["L",t,e+o],["Z"]]}function n(t,e,i,o,r){var s=(null==r?void 0:r.r)||0;return[["M",t+s,e],["L",t+i-s,e],["A",s,s,0,0,1,t+i,e+s],["L",t+i,e+o-s],["A",s,s,0,0,1,t+i-s,e+o],["L",t+s,e+o],["A",s,s,0,0,1,t,e+o-s],["L",t,e+s],["A",s,s,0,0,1,t+s,e],["Z"]]}return{arc:r,callout:function(t,e,o,r,s){var a=Math.min(s&&s.r||0,o,r),h=a+6,l=s&&s.anchorX,c=s&&s.anchorY||0,d=n(t,e,o,r,{r:a});if(!i(l)||l0&&c0)return d;if(t+l>o-h){if(c>e+h&&ce+h&&c0){var p=cr&&lh&&d.splice(1,1,["L",l-6,e],["L",l,e-6],["L",l+6,e],["L",o-a,e]);return d},circle:function(t,e,i,o){return r(t+i/2,e+o/2,i/2,o/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(t,e,i,o){return[["M",t+i/2,e],["L",t+i,e+o/2],["L",t+i/2,e+o],["L",t,e+o/2],["Z"]]},rect:s,roundedRect:n,square:s,triangle:function(t,e,i,o){return[["M",t+i/2,e],["L",t+i,e+o],["L",t,e+o],["Z"]]},"triangle-down":function(t,e,i,o){return[["M",t,e],["L",t+i,e],["L",t+i/2,e+o],["Z"]]}}}),i(e,"Core/Renderer/SVG/TextBuilder.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var o=e.doc,r=e.SVG_NS,s=e.win,n=i.attr,a=i.extend,h=i.fireEvent,l=i.isString,c=i.objectEach,d=i.pick;return function(){function e(t){var e=t.styles;this.renderer=t.renderer,this.svgElement=t,this.width=t.textWidth,this.textLineHeight=e&&e.lineHeight,this.textOutline=e&&e.textOutline,this.ellipsis=!!(e&&"ellipsis"===e.textOverflow),this.noWrap=!!(e&&"nowrap"===e.whiteSpace)}return e.prototype.buildSVG=function(){var e=this.svgElement,i=e.element,r=e.renderer,s=d(e.textStr,"").toString(),n=-1!==s.indexOf("<"),a=i.childNodes,h=!e.added&&r.box,c=[s,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,e.getStyle("font-size"),this.width].join(",");if(c!==e.textCache){e.textCache=c,delete e.actualWidth;for(var p=a.length;p--;)i.removeChild(a[p]);if(n||this.ellipsis||this.width||e.textPath||-1!==s.indexOf(" ")&&(!this.noWrap||//g.test(s))){if(""!==s){h&&h.appendChild(i);var u=new t(s);this.modifyTree(u.nodes),u.addToDOM(i),this.modifyDOM(),this.ellipsis&&-1!==(i.textContent||"").indexOf("…")&&e.attr("title",this.unescapeEntities(e.textStr||"",["<",">"])),h&&h.removeChild(i)}}else i.appendChild(o.createTextNode(this.unescapeEntities(s)));l(this.textOutline)&&e.applyTextOutline&&e.applyTextOutline(this.textOutline)}},e.prototype.modifyDOM=function(){var t,e=this,i=this.svgElement,a=n(i.element,"x");for(i.firstLineMetrics=void 0;t=i.element.firstChild;)if(/^[\s\u200B]*$/.test(t.textContent||" "))i.element.removeChild(t);else break;[].forEach.call(i.element.querySelectorAll("tspan.highcharts-br"),function(t,o){t.nextSibling&&t.previousSibling&&(0===o&&1===t.previousSibling.nodeType&&(i.firstLineMetrics=i.renderer.fontMetrics(t.previousSibling)),n(t,{dy:e.getLineHeight(t.nextSibling),x:a}))});var h=this.width||0;if(h){var l=function(t,s){var l=t.textContent||"",c=l.replace(/([^\^])-/g,"$1- ").split(" "),d=!e.noWrap&&(c.length>1||i.element.childNodes.length>1),p=e.getLineHeight(s),u=0,f=i.actualWidth;if(e.ellipsis)l&&e.truncate(t,l,void 0,0,Math.max(0,h-.8*p),function(t,e){return t.substring(0,e)+"…"});else if(d){for(var g=[],m=[];s.firstChild&&s.firstChild!==t;)m.push(s.firstChild),s.removeChild(s.firstChild);for(;c.length;)c.length&&!e.noWrap&&u>0&&(g.push(t.textContent||""),t.textContent=c.join(" ").replace(/- /g,"-")),e.truncate(t,void 0,c,0===u&&f||0,h,function(t,e){return c.slice(0,e).join(" ").replace(/- /g,"-")}),f=i.actualWidth,u++;m.forEach(function(e){s.insertBefore(e,t)}),g.forEach(function(e){s.insertBefore(o.createTextNode(e),t);var i=o.createElementNS(r,"tspan");i.textContent="​",n(i,{dy:p,x:a}),s.insertBefore(i,t)})}},c=function(t){[].slice.call(t.childNodes).forEach(function(e){e.nodeType===s.Node.TEXT_NODE?l(e,t):(-1!==e.className.baseVal.indexOf("highcharts-br")&&(i.actualWidth=0),c(e))})};c(i.element)}},e.prototype.getLineHeight=function(t){var e=t.nodeType===s.Node.TEXT_NODE?t.parentElement:t;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(e||this.svgElement.element).h},e.prototype.modifyTree=function(t){var e=this,i=function(o,r){var s=o.attributes,n=void 0===s?{}:s,h=o.children,l=o.style,c=void 0===l?{}:l,d=o.tagName,p=e.renderer.styledMode;if("b"===d||"strong"===d?p?n.class="highcharts-strong":c.fontWeight="bold":("i"===d||"em"===d)&&(p?n.class="highcharts-emphasized":c.fontStyle="italic"),c&&c.color&&(c.fill=c.color),"br"===d){n.class="highcharts-br",o.textContent="​";var u=t[r+1];u&&u.textContent&&(u.textContent=u.textContent.replace(/^ +/gm,""))}else"a"===d&&h&&h.some(function(t){return"#text"===t.tagName})&&(o.children=[{children:h,tagName:"tspan"}]);"#text"!==d&&"a"!==d&&(o.tagName="tspan"),a(o,{attributes:n,style:c}),h&&h.filter(function(t){return"#text"!==t.tagName}).forEach(i)};t.forEach(i),h(this.svgElement,"afterModifyTree",{nodes:t})},e.prototype.truncate=function(t,e,i,o,r,s){var n,a,h=this.svgElement;h.renderer;var l=h.rotation,c=[],d=i?1:0,p=(e||i||"").length,u=p,f=function(e,r){var s=r||e,n=t.parentNode;if(n&&void 0===c[s]&&n.getSubStringLength)try{c[s]=o+n.getSubStringLength(0,i?s+1:s)}catch(t){}return c[s]};if(h.rotation=0,o+(a=f(t.textContent.length))>r){for(;d<=p;)u=Math.ceil((d+p)/2),i&&(n=s(i,u)),a=f(u,n&&n.length-1),d===p?d=p+1:a>r?p=u-1:d=u;0===p?t.textContent="":e&&p===e.length-1||(t.textContent=n||s(e||i,u))}i&&i.splice(0,u),h.actualWidth=a,h.rotation=l},e.prototype.unescapeEntities=function(t,e){return c(this.renderer.escapes,function(i,o){e&&-1!==e.indexOf(i)||(t=t.toString().replace(RegExp(i,"g"),o))}),t},e}()}),i(e,"Core/Renderer/SVG/SVGRenderer.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGLabel.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Renderer/SVG/TextBuilder.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n,a,h){var l,c=this&&this.__spreadArray||function(t,e,i){if(i||2==arguments.length)for(var o,r=0,s=e.length;r]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""},i.prototype.getStyle=function(t){return this.style=T({fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1rem"},t),this.style},i.prototype.setStyle=function(t){this.boxWrapper.css(this.getStyle(t))},i.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width},i.prototype.destroy=function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),A(this.gradients||{}),this.gradients=null,this.defs=t.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null},i.prototype.createElement=function(t){var e=new this.Element;return e.init(this,t),e},i.prototype.getRadialAttr=function(t,e){return{cx:t[0]-t[2]/2+(e.cx||0)*t[2],cy:t[1]-t[2]/2+(e.cy||0)*t[2],r:(e.r||0)*t[2]}},i.prototype.shadowDefinition=function(t){var e=c(["highcharts-drop-shadow-".concat(this.chartIndex)],Object.keys(t).map(function(e){return"".concat(e,"-").concat(t[e])}),!0).join("-").toLowerCase().replace(/[^a-z0-9\-]/g,""),i=D({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},t);return this.defs.element.querySelector("#".concat(e))||this.definition({tagName:"filter",attributes:{id:e,filterUnits:i.filterUnits},children:[{tagName:"feDropShadow",attributes:{dx:i.offsetX,dy:i.offsetY,"flood-color":i.color,"flood-opacity":Math.min(5*i.opacity,1),stdDeviation:i.width/2}}]}),e},i.prototype.buildText=function(t){new a(t).buildSVG()},i.prototype.getContrast=function(t){var i=e.parse(t).rgba.map(function(t){var e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}),o=.2126*i[0]+.7152*i[1]+.0722*i[2];return 1.05/(o+.05)>(o+.05)/.05?"#FFFFFF":"#000000"},i.prototype.button=function(e,i,o,r,s,n,a,h,l,c){void 0===s&&(s={});var d,p,u,f=this.label(e,i,o,l,void 0,void 0,c,void 0,"button"),m=this.styledMode,v=s.states||{},x=0;s=D(s),delete s.states;var y=D({color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},s.style);delete s.style;var b=t.filterUserAttributes(s);return f.attr(D({padding:8,r:2},b)),m||(b=D({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1},b),d=(n=D(b,{fill:"#e6e6e6"},t.filterUserAttributes(n||v.hover||{}))).style,delete n.style,p=(a=D(b,{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},t.filterUserAttributes(a||v.select||{}))).style,delete a.style,u=(h=D(b,{style:{color:"#cccccc"}},t.filterUserAttributes(h||v.disabled||{}))).style,delete h.style),M(f.element,g?"mouseover":"mouseenter",function(){3!==x&&f.setState(1)}),M(f.element,g?"mouseout":"mouseleave",function(){3!==x&&f.setState(x)}),f.setState=function(t){if(1!==t&&(f.state=x=t),f.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t||0]),!m){f.attr([b,n,a,h][t||0]);var e=[y,d,p,u][t||0];L(e)&&f.css(e)}},!m&&(f.attr(b).css(T({cursor:"default"},y)),c&&f.text.css({pointerEvents:"none"})),f.on("touchstart",function(t){return t.stopPropagation()}).on("click",function(t){3!==x&&r.call(f,t)})},i.prototype.crispLine=function(t,e,i){void 0===i&&(i="round");var o=t[0],r=t[1];return w(o[1])&&o[1]===r[1]&&(o[1]=r[1]=Math[i](o[1])-e%2/2),w(o[2])&&o[2]===r[2]&&(o[2]=r[2]=Math[i](o[2])+e%2/2),t},i.prototype.path=function(t){var e=this.styledMode?{}:{fill:"none"};return P(t)?e.d=t:L(t)&&T(e,t),this.createElement("path").attr(e)},i.prototype.circle=function(t,e,i){var o=L(t)?t:void 0===t?{}:{x:t,y:e,r:i},r=this.createElement("circle");return r.xSetter=r.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},r.attr(o)},i.prototype.arc=function(t,e,i,o,r,s){L(t)?(e=(n=t).y,i=n.r,o=n.innerR,r=n.start,s=n.end,t=n.x):n={innerR:o,start:r,end:s};var n,a=this.symbol("arc",t,e,i,i,n);return a.r=i,a},i.prototype.rect=function(t,e,i,o,r,s){var n=L(t)?t:void 0===t?{}:{x:t,y:e,r:r,width:Math.max(i||0,0),height:Math.max(o||0,0)},a=this.createElement("rect");return this.styledMode||(void 0!==s&&(n["stroke-width"]=s,T(n,a.crisp(n))),n.fill="none"),a.rSetter=function(t,e,i){a.r=t,k(i,{rx:t,ry:t})},a.rGetter=function(){return a.r||0},a.attr(n)},i.prototype.roundedRect=function(t){return this.symbol("roundedRect").attr(t)},i.prototype.setSize=function(t,e,i){this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:B(i,!0)?void 0:0}),this.alignElements()},i.prototype.g=function(t){var e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e},i.prototype.image=function(t,e,i,o,r,s){var n={preserveAspectRatio:"none"};O(e)&&(n.x=e),O(i)&&(n.y=i),O(o)&&(n.width=o),O(r)&&(n.height=r);var a=this.createElement("image").attr(n),h=function(e){a.attr({href:t}),s.call(a,e)};if(s){a.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});var l=new b.Image;M(l,"load",h),l.src=t,l.complete&&h({})}else a.attr({href:t});return a},i.prototype.symbol=function(t,e,i,o,r,s){var n,a,h,l,c=this,p=/^url\((.*?)\)$/,f=p.test(t),g=!f&&(this.symbols[t]?t:"circle"),m=g&&this.symbols[g];if(m)"number"==typeof e&&(a=m.call(this.symbols,Math.round(e||0),Math.round(i||0),o||0,r||0,s)),n=this.path(a),c.styledMode||n.attr("fill","none"),T(n,{symbolName:g||void 0,x:e,y:i,width:o,height:r}),s&&T(n,s);else if(f){h=t.match(p)[1];var v=n=this.image(h);v.imgwidth=B(s&&s.width,y[h]&&y[h].width),v.imgheight=B(s&&s.height,y[h]&&y[h].height),l=function(t){return t.attr({width:t.width,height:t.height})},["width","height"].forEach(function(t){v["".concat(t,"Setter")]=function(t,e){this[e]=t;var i=this.alignByTranslate,o=this.element,r=this.width,n=this.height,a=this.imgwidth,h=this.imgheight,l="width"===e?a:h,c=1;s&&"within"===s.backgroundSize&&r&&n&&a&&h?(c=Math.min(r/a,n/h),k(o,{width:Math.round(a*c),height:Math.round(h*c)})):o&&l&&o.setAttribute(e,l),!i&&a&&h&&this.translate(((r||0)-a*c)/2,((n||0)-h*c)/2)}}),w(e)&&v.attr({x:e,y:i}),v.isImg=!0,w(v.imgwidth)&&w(v.imgheight)?l(v):(v.attr({width:0,height:0}),S("img",{onload:function(){var t=d[c.chartIndex];0===this.width&&(C(this,{position:"absolute",top:"-999em"}),u.body.appendChild(this)),y[h]={width:this.width,height:this.height},v.imgwidth=this.width,v.imgheight=this.height,v.element&&l(v),this.parentNode&&this.parentNode.removeChild(this),c.imgCount--,c.imgCount||!t||t.hasLoaded||t.onload()},src:h}),this.imgCount++)}return n},i.prototype.clipRect=function(t,e,i,o){var r=I()+"-",s=this.createElement("clipPath").attr({id:r}).add(this.defs),n=this.rect(t,e,i,o,0).add(s);return n.id=r,n.clipPath=s,n.count=0,n},i.prototype.text=function(t,e,i,o){var r={};if(o&&(this.allowHTML||!this.forExport))return this.html(t,e,i);r.x=Math.round(e||0),i&&(r.y=Math.round(i)),w(t)&&(r.text=t);var s=this.createElement("text").attr(r);return o&&(!this.forExport||this.allowHTML)||(s.xSetter=function(t,e,i){for(var o=i.getElementsByTagName("tspan"),r=i.getAttribute(e),s=0,n=void 0;s":">","'":"'",'"':"""},symbols:n,draw:v}),o.registerRendererType("svg",R,!0),R}),i(e,"Core/Renderer/HTML/HTMLElement.js",[e["Core/Globals.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=t.isFirefox,n=t.isMS,a=t.isWebKit,h=t.win,l=i.css,c=i.defined,d=i.extend,p=i.pick,u=i.pInt,f=[];return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.compose=function(t){if(i.pushUnique(f,t)){var o=e.prototype,r=t.prototype;r.getSpanCorrection=o.getSpanCorrection,r.htmlCss=o.htmlCss,r.htmlGetBBox=o.htmlGetBBox,r.htmlUpdateTransform=o.htmlUpdateTransform,r.setSpanRotation=o.setSpanRotation}return t},e.prototype.getSpanCorrection=function(t,e,i){this.xCorr=-t*i,this.yCorr=-e},e.prototype.htmlCss=function(t){var e,i="SPAN"===this.element.tagName&&t&&"width"in t,o=p(i&&t.width,void 0);return i&&(delete t.width,this.textWidth=o,e=!0),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=d(this.styles,t),l(this.element,t),e&&this.htmlUpdateTransform(),this},e.prototype.htmlGetBBox=function(){var t=this.element;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},e.prototype.htmlUpdateTransform=function(){if(!this.added){this.alignOnAdd=!0;return}var t=this.renderer,e=this.element,i=this.translateX||0,o=this.translateY||0,r=this.x||0,s=this.y||0,n=this.textAlign||"left",a={left:0,center:.5,right:1}[n],h=this.styles,d=h&&h.whiteSpace;if(l(e,{marginLeft:i,marginTop:o}),"SPAN"===e.tagName){var p=this.rotation,f=this.textWidth&&u(this.textWidth),g=[p,n,e.innerHTML,this.textWidth,this.textAlign].join(","),m=void 0,v=!1;if(f!==this.oldTextWidth){var x=this.textPxLength?this.textPxLength:(l(e,{width:"",whiteSpace:d||"nowrap"}),e.offsetWidth);(f>this.oldTextWidth||x>f)&&(/[ \-]/.test(e.textContent||e.innerText)||"ellipsis"===e.style.textOverflow)&&(l(e,{width:x>f||p?f+"px":"auto",display:"block",whiteSpace:d||"normal"}),this.oldTextWidth=f,v=!0)}this.hasBoxWidthChanged=v,g!==this.cTT&&(m=t.fontMetrics(e).b,c(p)&&(p!==(this.oldRotation||0)||n!==this.oldAlign)&&this.setSpanRotation(p,a,m),this.getSpanCorrection(!c(p)&&this.textPxLength||e.offsetWidth,m,a,p,n)),l(e,{left:r+(this.xCorr||0)+"px",top:s+(this.yCorr||0)+"px"}),this.cTT=g,this.oldRotation=p,this.oldAlign=n}},e.prototype.setSpanRotation=function(t,e,i){var o={},r=n&&!/Edge/.test(h.navigator.userAgent)?"-ms-transform":a?"-webkit-transform":s?"MozTransform":h.opera?"-o-transform":void 0;r&&(o[r]=o.transform="rotate("+t+"deg)",o[r+(s?"Origin":"-origin")]=o.transformOrigin=100*e+"% "+i+"px",l(this.element,o))},e}(e)}),i(e,"Core/Renderer/HTML/HTMLRenderer.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(t,e,i,o){var r,s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=o.attr,a=o.createElement,h=o.extend,l=o.pick,c=[];return function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return s(r,i),r.compose=function(t){if(o.pushUnique(c,t)){var e=r.prototype;t.prototype.html=e.html}return t},r.prototype.html=function(i,o,r){var s=this.createElement("span"),c=s.element,d=s.renderer,p=function(t,i){["opacity","visibility"].forEach(function(o){t[o+"Setter"]=function(r,s,n){var a=t.div?t.div.style:i;e.prototype[o+"Setter"].call(this,r,s,n),a&&(a[s]=r)}}),t.addedSetters=!0};return s.textSetter=function(e){e!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,t.setElementHTML(this.element,l(e,"")),this.textStr=e,s.doTransform=!0)},p(s,s.element.style),s.xSetter=s.ySetter=s.alignSetter=s.rotationSetter=function(t,e){"align"===e?s.alignValue=s.textAlign=t:s[e]=t,s.doTransform=!0},s.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},s.attr({text:i,x:Math.round(o),y:Math.round(r)}).css({position:"absolute"}),d.styledMode||s.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),c.style.whiteSpace="nowrap",s.css=s.htmlCss,s.add=function(t){var e,i,o=d.box.parentNode,r=[];if(this.parentGroup=t,t){if(!(e=t.div)){for(i=t;i;)r.push(i),i=i.parentGroup;r.reverse().forEach(function(t){var i,l=n(t.element,"class"),c=t.css;function d(e,i){t[i]=e,"translateX"===i?f.left=e+"px":f.top=e+"px",t.doTransform=!0}var u=t.styles||{},f=(e=t.div=t.div||a("div",l?{className:l}:void 0,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,visibility:t.visibility},e||o)).style;h(t,{classSetter:(i=e,function(t){this.element.setAttribute("class",t),i.className=t}),css:function(e){return c.call(t,e),["cursor","pointerEvents"].forEach(function(t){e[t]&&(f[t]=e[t])}),t},on:function(){return r[0].div&&s.on.apply({element:r[0].div,onEvents:t.onEvents},arguments),t},translateXSetter:d,translateYSetter:d}),t.addedSetters||p(t),t.css(u)})}}else e=o;return e.appendChild(c),s.added=!0,s.alignOnAdd&&s.htmlUpdateTransform(),s},s},r}(i)}),i(e,"Core/Axis/AxisDefaults.js",[],function(){var t,e;return(e=t||(t={})).defaultXAxisOptions={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e %b"},week:{main:"%e %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},e.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){return(0,this.axis.chart.numberFormatter)(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},e.defaultLeftAxisOptions={title:{rotation:270}},e.defaultRightAxisOptions={title:{rotation:90}},e.defaultBottomAxisOptions={labels:{autoRotation:[-45]},margin:15,title:{rotation:0}},e.defaultTopAxisOptions={labels:{autoRotation:[-45]},margin:15,title:{rotation:0}},t}),i(e,"Core/Foundation.js",[e["Core/Utilities.js"]],function(t){var e,i=t.addEvent,o=t.isFunction,r=t.objectEach,s=t.removeEvent;return(e||(e={})).registerEventOptions=function(t,e){t.eventOptions=t.eventOptions||{},r(e.events,function(e,r){t.eventOptions[r]!==e&&(t.eventOptions[r]&&(s(t,r,t.eventOptions[r]),delete t.eventOptions[r]),o(e)&&(t.eventOptions[r]=e,i(t,r,e,{order:0})))})},e}),i(e,"Core/Axis/Tick.js",[e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var o=e.deg2rad,r=i.clamp,s=i.correctFloat,n=i.defined,a=i.destroyObjectProperties,h=i.extend,l=i.fireEvent,c=i.isNumber,d=i.merge,p=i.objectEach,u=i.pick;return function(){function e(t,e,i,o,r){this.isNew=!0,this.isNewLabel=!0,this.axis=t,this.pos=e,this.type=i||"",this.parameters=r||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,l(this,"init"),i||o||this.addLabel()}return e.prototype.addLabel=function(){var e,i,o,r=this,a=r.axis,d=a.options,p=a.chart,f=a.categories,g=a.logarithmic,m=a.names,v=r.pos,x=u(r.options&&r.options.labels,d.labels),y=a.tickPositions,b=v===y[0],M=v===y[y.length-1],k=(!x.step||1===x.step)&&1===a.tickInterval,S=y.info,C=r.label,w=this.parameters.category||(f?u(f[v],m[v],v):v);g&&c(w)&&(w=s(g.lin2log(w))),a.dateTime&&(S?e=(i=p.time.resolveDTLFormat(d.dateTimeLabelFormats[!d.grid&&S.higherRanks[v]||S.unitName])).main:c(w)&&(e=a.dateTime.getXDateFormat(w,d.dateTimeLabelFormats||{}))),r.isFirst=b,r.isLast=M;var A={axis:a,chart:p,dateTimeLabelFormat:e,isFirst:b,isLast:M,pos:v,tick:r,tickPositionInfo:S,value:w};l(this,"labelFormat",A);var T=function(e){return x.formatter?x.formatter.call(e,e):x.format?(e.text=a.defaultLabelFormatter.call(e,e),t.format(x.format,e,p)):a.defaultLabelFormatter.call(e,e)},P=T.call(A,A),O=i&&i.list;O?r.shortenLabel=function(){for(o=0;o0&&s+p*f>l&&(e=Math.round((n-s)/Math.cos(d*o))):(s-p*fl&&(v=l-t.x+v*p,x=-1),(v=Math.min(g,v))v||i.autoRotation&&(c.styles||{}).width)&&(e=v)),e&&(this.shortenLabel?this.shortenLabel():(m.width=Math.floor(e)+"px",(r.style||{}).textOverflow||(m.textOverflow="ellipsis"),c.css(m)))},e.prototype.moveLabel=function(t,e){var i,o=this,r=o.label,s=o.axis,n=!1;r&&r.textStr===t?(o.movedLabel=r,n=!0,delete o.label):p(s.ticks,function(e){n||e.isNew||e===o||!e.label||e.label.textStr!==t||(o.movedLabel=e.label,n=!0,e.labelPos=o.movedLabel.xy,delete e.label)}),!n&&(o.labelPos||r)&&(i=o.labelPos||r.xy,o.movedLabel=o.createLabel(i,t,e),o.movedLabel&&o.movedLabel.attr({opacity:0}))},e.prototype.render=function(t,e,i){var o=this.axis,r=o.horiz,s=this.pos,n=u(this.tickmarkOffset,o.tickmarkOffset),a=this.getPosition(r,s,n,e),h=a.x,c=a.y,d=r&&h===o.pos+o.len||!r&&c===o.pos?-1:1,p=u(i,this.label&&this.label.newOpacity,1);i=u(i,1),this.isActive=!0,this.renderGridLine(e,i,d),this.renderMark(a,i,d),this.renderLabel(a,e,p,t),this.isNew=!1,l(this,"afterRender")},e.prototype.renderGridLine=function(t,e,i){var o,r=this.axis,s=r.options,n={},a=this.pos,h=this.type,l=u(this.tickmarkOffset,r.tickmarkOffset),c=r.chart.renderer,d=this.gridLine,p=s.gridLineWidth,f=s.gridLineColor,g=s.gridLineDashStyle;"minor"===this.type&&(p=s.minorGridLineWidth,f=s.minorGridLineColor,g=s.minorGridLineDashStyle),d||(r.chart.styledMode||(n.stroke=f,n["stroke-width"]=p||0,n.dashstyle=g),h||(n.zIndex=1),t&&(e=0),this.gridLine=d=c.path().attr(n).addClass("highcharts-"+(h?h+"-":"")+"grid-line").add(r.gridGroup)),d&&(o=r.getPlotLinePath({value:a+l,lineWidth:d.strokeWidth()*i,force:"pass",old:t,acrossPanes:!1}))&&d[t||this.isNew?"attr":"animate"]({d:o,opacity:e})},e.prototype.renderMark=function(t,e,i){var o=this.axis,r=o.options,s=o.chart.renderer,n=this.type,a=o.tickSize(n?n+"Tick":"tick"),h=t.x,l=t.y,c=u(r["minor"!==n?"tickWidth":"minorTickWidth"],!n&&o.isXAxis?1:0),d=r["minor"!==n?"tickColor":"minorTickColor"],p=this.mark,f=!p;a&&(o.opposite&&(a[0]=-a[0]),p||(this.mark=p=s.path().addClass("highcharts-"+(n?n+"-":"")+"tick").add(o.axisGroup),o.chart.styledMode||p.attr({stroke:d,"stroke-width":c})),p[f?"attr":"animate"]({d:this.getMarkPath(h,l,a[0],p.strokeWidth()*i,o.horiz,s),opacity:e}))},e.prototype.renderLabel=function(t,e,i,o){var r=this.axis,s=r.horiz,n=r.options,a=this.label,h=n.labels,l=h.step,d=u(this.tickmarkOffset,r.tickmarkOffset),p=t.x,f=t.y,g=!0;a&&c(p)&&(a.xy=t=this.getLabelPosition(p,f,a,s,h,d,o,l),(!this.isFirst||this.isLast||n.showFirstLabel)&&(!this.isLast||this.isFirst||n.showLastLabel)?!s||h.step||h.rotation||e||0===i||this.handleOverflow(t):g=!1,l&&o%l&&(g=!1),g&&c(t.y)?(t.opacity=i,a[this.isNewLabel?"attr":"animate"](t).show(!0),this.isNewLabel=!1):(a.hide(),this.isNewLabel=!0))},e.prototype.replaceMovedLabel=function(){var t=this.label,e=this.axis;t&&!this.isNew&&(t.animate({opacity:0},void 0,t.destroy),delete this.label),e.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel},e}()}),i(e,"Core/Axis/Axis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/AxisDefaults.js"],e["Core/Color/Color.js"],e["Core/Defaults.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Axis/Tick.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n,a){var h=t.animObject,l=o.defaultOptions,c=r.registerEventOptions,d=s.deg2rad,p=a.arrayMax,u=a.arrayMin,f=a.clamp,g=a.correctFloat,m=a.defined,v=a.destroyObjectProperties,x=a.erase,y=a.error,b=a.extend,M=a.fireEvent,k=a.getClosestDistance,S=a.insertItem,C=a.isArray,w=a.isNumber,A=a.isString,T=a.merge,P=a.normalizeTickInterval,O=a.objectEach,L=a.pick,E=a.relativeLength,D=a.removeEvent,B=a.splat,j=a.syncTimeout,I=function(t,e){return P(e,void 0,void 0,L(t.options.allowDecimals,e<.5||void 0!==t.tickAmount),!!t.tickAmount)};return function(){function t(t,e,i){this.alternateBands=void 0,this.bottom=void 0,this.chart=void 0,this.closestPointRange=void 0,this.coll=void 0,this.eventOptions=void 0,this.hasNames=void 0,this.hasVisibleSeries=void 0,this.height=void 0,this.index=void 0,this.isLinked=void 0,this.labelEdge=void 0,this.labelFormatter=void 0,this.left=void 0,this.len=void 0,this.max=void 0,this.maxLabelLength=void 0,this.min=void 0,this.minorTickInterval=void 0,this.minorTicks=void 0,this.minPixelPadding=void 0,this.names=void 0,this.offset=void 0,this.options=void 0,this.overlap=void 0,this.paddedTicks=void 0,this.plotLinesAndBands=void 0,this.plotLinesAndBandsGroups=void 0,this.pointRange=void 0,this.pointRangePadding=void 0,this.pos=void 0,this.positiveValuesOnly=void 0,this.right=void 0,this.series=void 0,this.side=void 0,this.tickAmount=void 0,this.tickInterval=void 0,this.tickmarkOffset=void 0,this.tickPositions=void 0,this.tickRotCorr=void 0,this.ticks=void 0,this.top=void 0,this.transA=void 0,this.transB=void 0,this.translationSlope=void 0,this.userOptions=void 0,this.visible=void 0,this.width=void 0,this.zoomEnabled=void 0,this.init(t,e,i)}return t.prototype.init=function(t,e,i){void 0===i&&(i=this.coll);var o="xAxis"===i;this.chart=t,this.horiz=this.isZAxis||(t.inverted?!o:o),this.isXAxis=o,this.coll=i,M(this,"init",{userOptions:e}),this.opposite=L(e.opposite,this.opposite),this.side=L(e.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);var r=this.options,s=r.labels,n=r.type;this.userOptions=e,this.minPixelPadding=0,this.reversed=L(r.reversed,this.reversed),this.visible=r.visible,this.zoomEnabled=r.zoomEnabled,this.hasNames="category"===n||!0===r.categories,this.categories=r.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=m(r.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=r.minRange||r.maxZoom,this.range=r.range,this.offset=r.offset||0,this.max=null,this.min=null;var a=L(r.crosshair,B(t.options.tooltip.crosshairs)[o?0:1]);this.crosshair=!0===a?{}:a,-1===t.axes.indexOf(this)&&(o?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),S(this,t[this.coll])),t.orderItems(this.coll),this.series=this.series||[],t.inverted&&!this.isZAxis&&o&&void 0===this.reversed&&(this.reversed=!0),this.labelRotation=w(s.rotation)?s.rotation:void 0,c(this,r),M(this,"afterInit")},t.prototype.setOptions=function(t){this.options=T(e.defaultXAxisOptions,"yAxis"===this.coll&&e.defaultYAxisOptions,[e.defaultTopAxisOptions,e.defaultRightAxisOptions,e.defaultBottomAxisOptions,e.defaultLeftAxisOptions][this.side],T(l[this.coll],t)),M(this,"afterSetOptions",{userOptions:t})},t.prototype.defaultLabelFormatter=function(t){var e,i,o=this.axis,r=this.chart.numberFormatter,s=w(this.value)?this.value:NaN,n=o.chart.time,a=o.categories,h=this.dateTimeLabelFormat,c=l.lang,d=c.numericSymbols,p=c.numericSymbolMagnitude||1e3,u=o.logarithmic?Math.abs(s):o.tickInterval,f=d&&d.length;if(a)i="".concat(this.value);else if(h)i=n.dateFormat(h,s);else if(f&&u>=1e3)for(;f--&&void 0===i;)u>=(e=Math.pow(p,f+1))&&10*s%e==0&&null!==d[f]&&0!==s&&(i=r(s/e,-1)+d[f]);return void 0===i&&(i=Math.abs(s)>=1e4?r(s,-1):r(s,-1,void 0,"")),i},t.prototype.getSeriesExtremes=function(){var t,e=this;e.chart,M(this,"getSeriesExtremes",null,function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=null,e.softThreshold=!e.isXAxis,e.series.forEach(function(i){if(i.reserveSpace()){var o=i.options,r=void 0,s=o.threshold,n=void 0,a=void 0;if(e.hasVisibleSeries=!0,e.positiveValuesOnly&&s<=0&&(s=null),e.isXAxis)(r=i.xData)&&r.length&&(r=e.logarithmic?r.filter(function(t){return t>0}):r,n=(t=i.getXExtremes(r)).min,a=t.max,w(n)||n instanceof Date||(r=r.filter(w),n=(t=i.getXExtremes(r)).min,a=t.max),r.length&&(e.dataMin=Math.min(L(e.dataMin,n),n),e.dataMax=Math.max(L(e.dataMax,a),a)));else{var h=i.applyExtremes();w(h.dataMin)&&(n=h.dataMin,e.dataMin=Math.min(L(e.dataMin,n),n)),w(h.dataMax)&&(a=h.dataMax,e.dataMax=Math.max(L(e.dataMax,a),a)),m(s)&&(e.threshold=s),(!o.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1)}}})}),M(this,"afterGetSeriesExtremes")},t.prototype.translate=function(t,e,i,o,r,s){var n=this.linkedParent||this,a=o&&n.old?n.old.min:n.min;if(!w(a))return NaN;var h=n.minPixelPadding,l=(n.isOrdinal||n.brokenAxis&&n.brokenAxis.hasBreaks||n.logarithmic&&r)&&n.lin2val,c=1,d=0,p=o&&n.old?n.old.transA:n.transA,u=0;if(p||(p=n.transA),i&&(c*=-1,d=n.len),n.reversed&&(c*=-1,d-=c*(n.sector||n.len)),e)u=(t=t*c+d-h)/p+a,l&&(u=n.lin2val(u));else{l&&(t=n.val2lin(t));var f=c*(t-a)*p;u=(n.isRadial?f:g(f))+d+c*h+(w(s)?p*s:0)}return u},t.prototype.toPixels=function(t,e){return this.translate(t,!1,!this.horiz,void 0,!0)+(e?0:this.pos)},t.prototype.toValue=function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,void 0,!0)},t.prototype.getPlotLinePath=function(t){var e,i,o,r,s,n=this,a=n.chart,h=n.left,l=n.top,c=t.old,d=t.value,p=t.lineWidth,u=c&&a.oldChartHeight||a.chartHeight,g=c&&a.oldChartWidth||a.chartWidth,m=n.transB,v=t.translatedValue,x=t.force;function y(t,e,i){return"pass"!==x&&(ti)&&(x?t=f(t,e,i):s=!0),t}var b={value:d,lineWidth:p,old:c,force:x,acrossPanes:t.acrossPanes,translatedValue:v};return M(this,"getPlotLinePath",b,function(t){e=o=Math.round((v=f(v=L(v,n.translate(d,void 0,void 0,c)),-1e5,1e5))+m),i=r=Math.round(u-v-m),w(v)?n.horiz?(i=l,r=u-n.bottom,e=o=y(e,h,h+n.width)):(e=h,o=g-n.right,i=r=y(i,l,l+n.height)):(s=!0,x=!1),t.path=s&&!x?void 0:a.renderer.crispLine([["M",e,i],["L",o,r]],p||1)}),b.path||null},t.prototype.getLinearTickPositions=function(t,e,i){var o,r,s,n=g(Math.floor(e/t)*t),a=g(Math.ceil(i/t)*t),h=[];if(g(n+t)===n&&(s=20),this.single)return[e];for(o=n;o<=a&&(h.push(o),(o=g(o+t,s))!==r);)r=o;return h},t.prototype.getMinorTickInterval=function(){var t=this.options;return!0===t.minorTicks?L(t.minorTickInterval,"auto"):!1===t.minorTicks?null:t.minorTickInterval},t.prototype.getMinorTickPositions=function(){var t,e=this.options,i=this.tickPositions,o=this.minorTickInterval,r=this.pointRangePadding||0,s=this.min-r,n=this.max+r,a=n-s,h=[];if(a&&a/o=this.minRange,t=((s=this.minRange)-l+h)/2,o=[h-t,L(n.min,h-t)],e&&(o[2]=a?a.log2lin(this.dataMin):this.dataMin),r=[(h=p(o))+s,L(n.max,h+s)],e&&(r[2]=a?a.log2lin(this.dataMax):this.dataMax),(l=u(r))-h0&&(Object.keys(e.keys).forEach(function(t){delete e.keys[t]}),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(e){e.xIncrement=null,(!e.points||e.isDirtyData)&&(t.max=Math.max(t.max,e.xData.length-1),e.processData(),e.generatePoints()),e.data.forEach(function(i,o){var r;i&&i.options&&void 0!==i.name&&void 0!==(r=t.nameToX(i))&&r!==i.x&&(i.x=r,e.xData[o]=r)})}))},t.prototype.setAxisTranslation=function(){var t,e,i=this,o=i.max-i.min,r=i.linkedParent,s=!!i.categories,n=i.isXAxis,a=i.axisPointRange||0,h=0,l=0,c=i.transA;(n||s||a)&&(t=i.getClosest(),r?(h=r.minPointOffset,l=r.pointRangePadding):i.series.forEach(function(e){var o=s?1:n?L(e.options.pointRange,t,0):i.axisPointRange||0,r=e.options.pointPlacement;if(a=Math.max(a,o),!i.single||s){var c=e.is("xrange")?!n:n;h=Math.max(h,c&&A(r)?0:o/2),l=Math.max(l,c&&"on"===r?0:o)}}),e=i.ordinal&&i.ordinal.slope&&t?i.ordinal.slope/t:1,i.minPointOffset=h*=e,i.pointRangePadding=l*=e,i.pointRange=Math.min(a,i.single&&s?1:o),n&&t&&(i.closestPointRange=t)),i.translationSlope=i.transA=c=i.staticScale||i.len/(o+l||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=c*h,M(this,"afterSetAxisTranslation")},t.prototype.minFromRange=function(){return this.max-this.range},t.prototype.setTickInterval=function(t){var e,i,o,r,s,n,a=this.chart,h=this.logarithmic,l=this.options,c=this.isXAxis,d=this.isLinked,p=l.tickPixelInterval,u=this.categories,f=this.softThreshold,v=l.maxPadding,x=l.minPadding,b=w(l.tickInterval)&&l.tickInterval>=0?l.tickInterval:void 0,k=w(this.threshold)?this.threshold:null;if(this.dateTime||u||d||this.getTickAmount(),s=L(this.userMin,l.min),n=L(this.userMax,l.max),d?(this.linkedParent=a[this.coll][l.linkedTo],i=this.linkedParent.getExtremes(),this.min=L(i.min,i.dataMin),this.max=L(i.max,i.dataMax),l.type!==this.linkedParent.options.type&&y(11,1,a)):(f&&m(k)&&(this.dataMin>=k?(o=k,x=0):this.dataMax<=k&&(r=k,v=0)),this.min=L(s,o,this.dataMin),this.max=L(n,r,this.dataMax)),h&&(this.positiveValuesOnly&&!t&&0>=Math.min(this.min,L(this.dataMin,this.min))&&y(10,1,a),this.min=g(h.log2lin(this.min),16),this.max=g(h.log2lin(this.max),16)),this.range&&m(this.max)&&(this.userMin=this.min=s=Math.max(this.dataMin,this.minFromRange()),this.userMax=n=this.max,this.range=null),M(this,"foundExtremes"),this.beforePadding&&this.beforePadding(),this.adjustForMinRange(),!w(this.userMin)&&w(l.softMin)&&l.softMinthis.max&&(this.max=n=l.softMax),!u&&!this.axisPointRange&&!(this.stacking&&this.stacking.usePercentage)&&!d&&m(this.min)&&m(this.max)&&(e=this.max-this.min)&&(!m(s)&&x&&(this.min-=e*x),!m(n)&&v&&(this.max+=e*v)),!w(this.userMin)&&w(l.floor)&&(this.min=Math.max(this.min,l.floor)),!w(this.userMax)&&w(l.ceiling)&&(this.max=Math.min(this.max,l.ceiling)),f&&m(this.dataMin)&&(k=k||0,!m(s)&&this.min=k?this.min=this.options.minRange?Math.min(k,this.max-this.minRange):k:!m(n)&&this.max>k&&this.dataMax<=k&&(this.max=this.options.minRange?Math.max(k,this.min+this.minRange):k)),w(this.min)&&w(this.max)&&!this.chart.polar&&this.min>this.max&&(m(this.options.min)?this.max=this.min:m(this.options.max)&&(this.min=this.max)),this.min===this.max||void 0===this.min||void 0===this.max?this.tickInterval=1:d&&this.linkedParent&&!b&&p===this.linkedParent.options.tickPixelInterval?this.tickInterval=b=this.linkedParent.tickInterval:this.tickInterval=L(b,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,u?1:(this.max-this.min)*p/Math.max(this.len,p)),c&&!t){var S=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach(function(t){t.forceCrop=t.forceCropping&&t.forceCropping(),t.processData(S)}),M(this,"postProcessData",{hasExtremesChanged:S})}this.setAxisTranslation(),M(this,"initialAxisTranslation"),this.pointRange&&!b&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));var C=L(l.minTickInterval,this.dateTime&&!this.series.some(function(t){return t.noSharedTooltip})?this.closestPointRange:0);!b&&this.tickIntervalMath.max(2*this.len,200))l=[this.min,this.max],y(19,!1,this.chart);else if(this.dateTime)l=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,e.units),this.min,this.max,e.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0);else if(this.logarithmic)l=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else for(var c=this.tickInterval,d=c;d<=2*c;)if(l=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&l.length>this.tickAmount)this.tickInterval=I(this,d*=1.1);else break;l.length>this.len&&(l=[l[0],l[l.length-1]])[0]===l[1]&&(l.length=1),o&&(this.tickPositions=l,(t=o.apply(this,[this.min,this.max]))&&(l=t))}this.tickPositions=l,this.paddedTicks=l.slice(0),this.trimTicks(l,a,h),!this.isLinked&&w(this.min)&&w(this.max)&&(this.single&&l.length<2&&!this.categories&&!this.series.some(function(t){return t.is("heatmap")&&"between"===t.options.pointPlacement})&&(this.min-=.5,this.max+=.5),i||t||this.adjustTickAmount()),M(this,"afterSetTickPositions")},t.prototype.trimTicks=function(t,e,i){var o=t[0],r=t[t.length-1],s=!this.isOrdinal&&this.minPointOffset||0;if(M(this,"trimTicks"),!this.isLinked){if(e&&o!==-1/0)this.min=o;else for(;this.min-s>t[0];)t.shift();if(i)this.max=r;else for(;this.max+s1?s.reduce(function(t,e){return t+e},0)/s.length:void 0;i.forEach(function(t){t.thresholdAlignment=h})}return t},t.prototype.getThresholdAlignment=function(t){if((!w(this.dataMin)||this!==t&&this.series.some(function(t){return t.isDirty||t.isDirtyData}))&&this.getSeriesExtremes(),w(this.threshold)){var e=f((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(e=1-e),e}},t.prototype.getTickAmount=function(){var t=this.options,e=t.tickPixelInterval,i=t.tickAmount;m(t.tickInterval)||i||!(this.lenn||h[h.length-1]o.threshold?v():f();if(u>8*o.tickInterval)break;u*=2}x()}else if(d0&&ea&&(e=a)),m(r)&&(sa&&(s=a))),i.displayBtn=void 0!==e||void 0!==s,i.setExtremes(e,s,!1,void 0,{trigger:"zoom"})),t.zoomed=!0}),h.zoomed},t.prototype.setAxisSize=function(){var t=this.chart,e=this.options,i=e.offsets||[0,0,0,0],o=this.horiz,r=this.width=Math.round(E(L(e.width,t.plotWidth-i[3]+i[1]),t.plotWidth)),s=this.height=Math.round(E(L(e.height,t.plotHeight-i[0]+i[2]),t.plotHeight)),n=this.top=Math.round(E(L(e.top,t.plotTop+i[0]),t.plotHeight,t.plotTop)),a=this.left=Math.round(E(L(e.left,t.plotLeft+i[3]),t.plotWidth,t.plotLeft));this.bottom=t.chartHeight-s-n,this.right=t.chartWidth-r-a,this.len=Math.max(o?r:s,0),this.pos=o?a:n},t.prototype.getExtremes=function(){var t=this.logarithmic;return{min:t?g(t.lin2log(this.min)):this.min,max:t?g(t.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},t.prototype.getThreshold=function(t){var e=this.logarithmic,i=e?e.lin2log(this.min):this.min,o=e?e.lin2log(this.max):this.max;return null===t||t===-1/0?t=i:t===1/0?t=o:i>t?t=i:o15&&e<165?t.align="right":e>195&&e<345&&(t.align="left")}),i.align},t.prototype.tickSize=function(t){var e,i=this.options,o=L(i["tick"===t?"tickWidth":"minorTickWidth"],"tick"===t&&this.isXAxis&&!this.categories?1:0),r=i["tick"===t?"tickLength":"minorTickLength"];o&&r&&("inside"===i[t+"Position"]&&(r=-r),e=[r,o]);var s={tickSize:e};return M(this,"afterTickSize",s),s.tickSize},t.prototype.labelMetrics=function(){var t=this.chart.renderer,e=this.ticks,i=e[Object.keys(e)[0]]||{};return this.chart.renderer.fontMetrics(i.label||i.movedLabel||t.box)},t.prototype.unsquish=function(){var t,e,i=this.options.labels,o=this.horiz,r=this.tickInterval,s=this.len/(((this.categories?1:0)+this.max-this.min)/r),n=i.rotation,a=.75*this.labelMetrics().h,h=Math.max(this.max-this.min,0),l=function(t){var e=t/(s||1);return(e=e>1?Math.ceil(e):1)*r>h&&t!==1/0&&s!==1/0&&h&&(e=Math.ceil(h/r)),g(e*r)},c=r,p=Number.MAX_VALUE;if(o){if(!i.staggerLines&&(w(n)?e=[n]:s=-90&&x<=90)&&(f=(u=l(Math.abs(a/Math.sin(d*x))))+Math.abs(x/360))m&&(m=e.label.textPxLength)}),this.maxLabelLength=m,this.autoRotation)m>p&&m>f.h?u.rotation=this.labelRotation:this.labelRotation=0;else if(d&&(t=p,!g))for(e="clip",o=n.length;!c&&o--;)(i=a[n[o]].label)&&(i.styles&&"ellipsis"===i.styles.textOverflow?i.css({textOverflow:"clip"}):i.textPxLength>d&&i.css({width:d+"px"}),i.getBBox().height>this.len/n.length-(f.h-f.f)&&(i.specificTextOverflow="ellipsis"));u.rotation&&(t=m>.5*r.chartHeight?.33*r.chartHeight:m,g||(e="ellipsis")),this.labelAlign=h.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(u.align=this.labelAlign),n.forEach(function(i){var o=a[i],r=o&&o.label,s=l.width,n={};r&&(r.attr(u),o.shortenLabel?o.shortenLabel():t&&!s&&"nowrap"!==l.whiteSpace&&(t=this.min&&t<=this.max||this.grid&&this.grid.isColumn)&&(r[t]||(r[t]=new n(this,t)),i&&r[t].isNew&&r[t].render(e,!0,-1),r[t].render(e))},t.prototype.render=function(){var t,e,i=this,o=i.chart,r=i.logarithmic,a=o.renderer,l=i.options,c=i.isLinked,d=i.tickPositions,p=i.axisTitle,u=i.ticks,f=i.minorTicks,g=i.alternateBands,m=l.stackLabels,v=l.alternateGridColor,x=l.crossing,y=i.tickmarkOffset,b=i.axisLine,k=i.showAxis,S=h(a.globalAnimation);if(i.labelEdge.length=0,i.overlap=!1,[u,f,g].forEach(function(t){O(t,function(t){t.isActive=!1})}),w(x)){var C=this.isXAxis?o.yAxis[0]:o.xAxis[0],A=[1,-1,-1,1][this.side];if(C){var T=C.toPixels(x,!0);i.horiz&&(T=C.len-T),i.offset=A*T}}if(i.hasData()||c){var P=i.chart.hasRendered&&i.old&&w(i.old.min);i.minorTickInterval&&!i.categories&&i.getMinorTickPositions().forEach(function(t){i.renderMinorTick(t,P)}),d.length&&(d.forEach(function(t,e){i.renderTick(t,e,P)}),y&&(0===i.min||i.single)&&(u[-1]||(u[-1]=new n(i,-1,null,!0)),u[-1].render(-1))),v&&d.forEach(function(n,a){e=void 0!==d[a+1]?d[a+1]+y:i.max-y,a%2==0&&n=.5)t=Math.round(t),l=n.getLinearTickPositions(t,e,i);else if(t>=.08){var c=Math.floor(e),d=void 0,p=void 0,u=void 0,f=void 0,g=void 0,m=void 0,v=void 0;for(d=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],p=c;pe&&(!s||m<=i)&&void 0!==m&&l.push(m),m>i&&(v=!0),m=g}else{var x=this.lin2log(e),y=this.lin2log(i),b=s?n.getMinorTickInterval():h.tickInterval,M="auto"===b?null:b,k=h.tickPixelInterval/(s?5:1),S=s?a/n.tickPositions.length:a;t=o(t=r(M,this.minorAutoInterval,(y-x)*k/(S||1))),l=n.getLinearTickPositions(t,x,y).map(this.log2lin),s||(this.minorAutoInterval=t/5)}return s||(n.tickInterval=t),l},t.prototype.lin2log=function(t){return Math.pow(10,t)},t.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},t}();e.Additions=h}(e||(e={})),e}),i(e,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[e["Core/Utilities.js"]],function(t){var e,i=t.erase,o=t.extend,r=t.isNumber;return function(e){var s,n=[];function a(t){return this.addPlotBandOrLine(t,"plotBands")}function h(t,e){var i=this,o=this.userOptions,r=new s(this,t);if(this.visible&&(r=r.render()),r){if(this._addedPlotLB||(this._addedPlotLB=!0,(o.plotLines||[]).concat(o.plotBands||[]).forEach(function(t){i.addPlotBandOrLine(t)})),e){var n=o[e]||[];n.push(t),o[e]=n}this.plotLinesAndBands.push(r)}return r}function l(t){return this.addPlotBandOrLine(t,"plotLines")}function c(t,e,i){i=i||this.options;var o,s,n=this.getPlotLinePath({value:e,force:!0,acrossPanes:i.acrossPanes}),a=[],h=this.horiz,l=!r(this.min)||!r(this.max)||tthis.max&&e>this.max,c=this.getPlotLinePath({value:t,force:!0,acrossPanes:i.acrossPanes}),d=1;if(c&&n)for(l&&(s=c.toString()===n.toString(),d=0),o=0;o0&&i.height>0&&!k.isFlat?(m=h({align:o&&S&&"center",x:o?!S&&4:10,verticalAlign:!o&&S&&"middle",y:o?S?16:10:S?6:-4,rotation:o&&!S&&90},m),this.renderLabel(m,k,S,p)):v&&v.hide(),e},e.prototype.renderLabel=function(t,e,r,s){var n=this.axis,a=n.chart.renderer,l=this.label;l||(this.label=l=a.text(this.getLabelText(t),0,0,t.useHTML).attr({align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(r?"band":"line")+"-label "+(t.className||""),zIndex:s}),n.chart.styledMode||l.css(h({fontSize:"0.8em",textOverflow:"ellipsis"},t.style)),l.add());var c=e.xBounds||[e[0][1],e[1][1],r?e[2][1]:e[0][1]],d=e.yBounds||[e[0][2],e[1][2],r?e[2][2]:e[0][2]],p=o(c),u=o(d);if(l.align(t,!1,{x:p,y:u,width:i(c)-p,height:i(d)-u}),!l.alignValue||"left"===l.alignValue){var f=t.clip?n.width:n.chart.chartWidth;l.css({width:(90===l.rotation?n.height-(l.alignAttr.y-n.top):f-(l.alignAttr.x-n.left))+"px"})}l.show(!0)},e.prototype.getLabelText=function(t){return r(t.formatter)?t.formatter.call(this):t.text},e.prototype.destroy=function(){n(this.axis.plotLinesAndBands,this),delete this.axis,s(this)},e}()}),i(e,"Core/Tooltip.js",[e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s,n,a=t.format,h=e.doc,l=e.isSafari,c=i.distribute,d=r.addEvent,p=r.clamp,u=r.css,f=r.discardElement,g=r.extend,m=r.fireEvent,v=r.isArray,x=r.isNumber,y=r.isString,b=r.merge,M=r.pick,k=r.splat,S=r.syncTimeout,C=function(){function t(t,e){this.allowShared=!0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.now={},this.options={},this.outside=!1,this.chart=t,this.init(t,e)}return t.prototype.bodyFormatter=function(t){return t.map(function(t){var e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"]||"")})},t.prototype.cleanSplit=function(t){this.chart.series.forEach(function(e){var i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)})},t.prototype.defaultFormatter=function(t){var e,i=this.points||k(this);return(e=(e=[t.tooltipFooterHeaderFormatter(i[0])]).concat(t.bodyFormatter(i))).push(t.tooltipFooterHeaderFormatter(i[0],!0)),e},t.prototype.destroy=function(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),f(this.container)),r.clearTimeout(this.hideTimer),r.clearTimeout(this.tooltipTimeout)},t.prototype.getAnchor=function(t,e){var i,o=this.chart,r=o.pointer,s=o.inverted,n=o.plotTop,a=o.plotLeft;if((t=k(t))[0].series&&t[0].series.yAxis&&!t[0].series.yAxis.options.reversedStacks&&(t=t.slice().reverse()),this.followPointer&&e)void 0===e.chartX&&(e=r.normalize(e)),i=[e.chartX-a,e.chartY-n];else if(t[0].tooltipPos)i=t[0].tooltipPos;else{var h=0,l=0;t.forEach(function(t){var e=t.pos(!0);e&&(h+=e[0],l+=e[1])}),h/=t.length,l/=t.length,this.shared&&t.length>1&&e&&(s?h=e.chartX:l=e.chartY),i=[h-a,l-n]}return i.map(Math.round)},t.prototype.getClassName=function(t,e,i){var o=this.options,r=t.series,s=r.options;return[o.className,"highcharts-label",i&&"highcharts-tooltip-header",e?"highcharts-tooltip-box":"highcharts-tooltip",!i&&"highcharts-color-"+M(t.colorIndex,r.colorIndex),s&&s.className].filter(y).join(" ")},t.prototype.getLabel=function(){var t=this,i=this.chart.styledMode,r=this.options,s=this.split&&this.allowShared,n=this.container,a=this.chart.renderer;if(this.label){var h=!this.label.hasClass("highcharts-label");(!s&&h||s&&!h)&&this.destroy()}if(!this.label){if(this.outside){var l=this.chart.options.chart.style,c=o.getRendererType();this.container=n=e.doc.createElement("div"),n.className="highcharts-tooltip-container",u(n,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,(l&&l.zIndex||0)+3)}),this.renderer=a=new c(n,0,0,l,void 0,void 0,a.styledMode)}if(s?this.label=a.g("tooltip"):(this.label=a.label("",0,0,r.shape,void 0,void 0,r.useHTML,void 0,"tooltip").attr({padding:r.padding,r:r.borderRadius}),i||this.label.attr({fill:r.backgroundColor,"stroke-width":r.borderWidth||0}).css(r.style).css({pointerEvents:r.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),t.outside){var d=this.label,p=d.xSetter,f=d.ySetter;d.xSetter=function(e){p.call(d,t.distance),n&&(n.style.left=e+"px")},d.ySetter=function(e){f.call(d,t.distance),n&&(n.style.top=e+"px")}}this.label.attr({zIndex:8}).shadow(r.shadow).add()}return n&&!n.parentElement&&e.doc.body.appendChild(n),this.label},t.prototype.getPlayingField=function(){var t=h.body,e=h.documentElement,i=this.chart,o=this.distance,r=this.outside;return{width:r?Math.max(t.scrollWidth,e.scrollWidth,t.offsetWidth,e.offsetWidth,e.clientWidth)-2*o:i.chartWidth,height:r?Math.max(t.scrollHeight,e.scrollHeight,t.offsetHeight,e.offsetHeight,e.clientHeight):i.chartHeight}},t.prototype.getPosition=function(t,e,i){var o,r=this.chart,s=this.distance,n={},a=r.inverted&&i.h||0,h=this.outside,l=this.getPlayingField(),c=l.width,d=l.height,p=r.pointer.getChartPosition(),u=function(t){return t*p.scaleX},f=function(t){return t*p.scaleY},g=function(o){var n="x"===o;return[o,n?c:d,n?t:e].concat(h?[n?u(t):f(e),n?p.left-s+u(i.plotX+r.plotLeft):p.top-s+f(i.plotY+r.plotTop),0,n?c:d]:[n?t:e,n?i.plotX+r.plotLeft:i.plotY+r.plotTop,n?r.plotLeft:r.plotTop,n?r.plotLeft+r.plotWidth:r.plotTop+r.plotHeight])},m=g("y"),v=g("x"),x=!!i.negative;!r.polar&&r.hoverSeries&&r.hoverSeries.yAxis&&r.hoverSeries.yAxis.reversed&&(x=!x);var y=!this.followPointer&&M(i.ttBelow,!r.inverted===x),b=function(t,e,i,o,r,l,c){var d=h?"y"===t?f(s):u(s):s,p=(i-o)/2,g=oe?x:x+a)}},k=function(t,e,i,o,r){var a;return re-s?a=!1:re-o/2?n[t]=e-o-2:n[t]=r-i/2,a},S=function(t){var e=m;m=v,v=e,o=t},C=function(){!1!==b.apply(0,m)?!1!==k.apply(0,v)||o||(S(!0),C()):o?n.x=n.y=0:(S(!0),C())};return(r.inverted||this.len>1)&&S(),C(),n},t.prototype.hide=function(t){var e=this;r.clearTimeout(this.hideTimer),t=M(t,this.options.hideDelay),this.isHidden||(this.hideTimer=S(function(){var i=e.getLabel();e.getLabel().animate({opacity:0},{duration:t?150:t,complete:function(){i.hide(),e.container&&e.container.remove()}}),e.isHidden=!0},t))},t.prototype.init=function(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=e.split&&!t.inverted&&!t.polar,this.shared=e.shared||this.split,this.outside=M(e.outside,!!(t.scrollablePixelsX||t.scrollablePixelsY))},t.prototype.shouldStickOnContact=function(t){return!!(!this.followPointer&&this.options.stickOnContact&&(!t||this.chart.pointer.inClass(t.target,"highcharts-tooltip")))},t.prototype.move=function(t,e,i,o){var s=this,n=s.now,a=!1!==s.options.animation&&!s.isHidden&&(Math.abs(t-n.x)>1||Math.abs(e-n.y)>1),h=s.followPointer||s.len>1;g(n,{x:a?(2*n.x+t)/3:t,y:a?(n.y+e)/2:e,anchorX:h?void 0:a?(2*n.anchorX+i)/3:i,anchorY:h?void 0:a?(n.anchorY+o)/2:o}),s.getLabel().attr(n),s.drawTracker(),a&&(r.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){s&&s.move(t,e,i,o)},32))},t.prototype.refresh=function(t,e){var i=this.chart,o=this.options,s=i.pointer,n=k(t),h=n[0],l=[],c=o.format,d=o.formatter||this.defaultFormatter,p=this.shared,u=i.styledMode,f={};if(o.enabled&&h.series){r.clearTimeout(this.hideTimer),this.allowShared=!(!v(t)&&t.series&&t.series.noSharedTooltip),this.followPointer=!this.split&&h.series.tooltipOptions.followPointer;var g=this.getAnchor(t,e),x=g[0],b=g[1];p&&this.allowShared?(s.applyInactiveState(n),n.forEach(function(t){t.setState("hover"),l.push(t.getLabelConfig())}),(f=h.getLabelConfig()).points=l):f=h.getLabelConfig(),this.len=l.length;var S=y(c)?a(c,f,i):d.call(f,this),C=h.series;if(this.distance=M(C.tooltipOptions.distance,16),!1===S)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(S,n);else{var w=x,A=b;if(e&&s.isDirectTouch&&(w=e.chartX-i.plotLeft,A=e.chartY-i.plotTop),i.polar||!1===C.options.clip||n.some(function(t){return s.isDirectTouch||t.series.shouldShowTooltip(w,A)})){var T=this.getLabel();(!o.style.width||u)&&T.css({width:(this.outside?this.getPlayingField():i.spacingBox).width+"px"}),T.attr({text:S&&S.join?S.join(""):S}),T.addClass(this.getClassName(h),!0),u||T.attr({stroke:o.borderColor||h.color||C.color||"#666666"}),this.updatePosition({plotX:x,plotY:b,negative:h.negative,ttBelow:h.ttBelow,h:g[2]||0})}else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}m(this,"refresh")}},t.prototype.renderSplit=function(t,e){var i=this,o=i.chart,r=i.chart,s=r.chartWidth,n=r.chartHeight,a=r.plotHeight,d=r.plotLeft,u=r.plotTop,f=r.pointer,m=r.scrollablePixelsY,v=r.scrollablePixelsX,x=r.scrollingContainer,b=void 0===x?{scrollLeft:0,scrollTop:0}:x,k=b.scrollLeft,S=b.scrollTop,C=r.styledMode,w=i.distance,A=i.options,T=i.options.positioner,P=i.outside&&"number"!=typeof v?h.documentElement.getBoundingClientRect():{left:k,right:k+s,top:S,bottom:S+n},O=i.getLabel(),L=this.renderer||o.renderer,E=!!(o.xAxis[0]&&o.xAxis[0].opposite),D=f.getChartPosition(),B=D.left,j=D.top,I=u+S,R=0,z=a-(void 0===m?0:m);function N(t,e,o,r,s){var n,a;return void 0===s&&(s=!0),o?(n=E?0:z,a=p(t-r/2,P.left,P.right-r-(i.outside?B:0))):(n=e-I,a=p(a=s?t-r-w:t+w,s?a:P.left,P.right)),{x:a,y:n}}y(t)&&(t=[!1,t]);var G=t.slice(0,e.length+1).reduce(function(t,o,r){if(!1!==o&&""!==o){var s=e[r-1]||{isHeader:!0,plotX:e[0].plotX,plotY:a,series:{}},n=s.isHeader,h=n?i:s.series,l=h.tt=function(t,e,o){var r,s=t,n=e.isHeader,a=e.series;if(!s){var h={padding:A.padding,r:A.borderRadius};C||(h.fill=A.backgroundColor,h["stroke-width"]=null!==(r=A.borderWidth)&&void 0!==r?r:1),s=L.label("",0,0,A[n?"headerShape":"shape"],void 0,void 0,A.useHTML).addClass(i.getClassName(e,!0,n)).attr(h).add(O)}return s.isActive=!0,s.attr({text:o}),C||s.css(A.style).attr({stroke:A.borderColor||e.color||a.color||"#333333"}),s}(h.tt,s,o.toString()),c=l.getBBox(),f=c.width+l.strokeWidth();n&&(R=c.height,z+=R,E&&(I-=R));var g=function(t){var e,i,o=t.isHeader,r=t.plotX,s=void 0===r?0:r,n=t.plotY,h=void 0===n?0:n,l=t.series;if(o)e=Math.max(d+s,d),i=u+a/2;else{var c=l.xAxis,f=l.yAxis;e=c.pos+p(s,-w,c.len+w),l.shouldShowTooltip(0,f.pos-u+h,{ignoreX:!0})&&(i=f.pos+h)}return{anchorX:e=p(e,P.left-w,P.right+w),anchorY:i}}(s),m=g.anchorX,v=g.anchorY;if("number"==typeof v){var x=c.height+1,y=T?T.call(i,f,x,s):N(m,v,n,f);t.push({align:T?0:void 0,anchorX:m,anchorY:v,boxWidth:f,point:s,rank:M(y.rank,n?1:0),size:x,target:y.y,tt:l,x:y.x})}else l.isActive=!1}return t},[]);!T&&G.some(function(t){var e=(i.outside?B:0)+t.anchorX;return ee})&&(G=G.map(function(t){var e=N(t.anchorX,t.anchorY,t.point.isHeader,t.boxWidth,!1),i=e.x;return g(t,{target:e.y,x:i})})),i.cleanSplit(),c(G,z);var W={left:B,right:B};G.forEach(function(t){var e=t.x,o=t.boxWidth,r=t.isHeader;!r&&(i.outside&&B+eW.right&&(W.right=B+e))}),G.forEach(function(t){var e=t.x,o=t.anchorX,r=t.anchorY,s=t.pos,n=t.point.isHeader,a={visibility:void 0===s?"hidden":"inherit",x:e,y:(s||0)+I,anchorX:o,anchorY:r};if(i.outside&&e0&&(n||(a.x=e+h,a.anchorX=o+h),n&&(a.x=(W.right-W.left)/2,a.anchorX=o+h))}t.tt.attr(a)});var H=i.container,X=i.outside,U=i.renderer;if(X&&H&&U){var F=O.getBBox(),Y=F.width,_=F.height,V=F.x,q=F.y;U.setSize(Y+V,_+q,!1),H.style.left=W.left+"px",H.style.top=j+"px"}l&&O.attr({opacity:1===O.opacity?.999:1})},t.prototype.drawTracker=function(){if(!this.shouldStickOnContact()){this.tracker&&(this.tracker=this.tracker.destroy());return}var t=this.chart,e=this.label,i=this.shared?t.hoverPoints:t.hoverPoint;if(e&&i){var o={x:0,y:0,width:0,height:0},r=this.getAnchor(i),s=e.getBBox();r[0]+=t.plotLeft-(e.translateX||0),r[1]+=t.plotTop-(e.translateY||0),o.x=Math.min(0,r[0]),o.y=Math.min(0,r[1]),o.width=r[0]<0?Math.max(Math.abs(r[0]),s.width-r[0]):Math.max(Math.abs(r[0]),s.width),o.height=r[1]<0?Math.max(Math.abs(r[1]),s.height-Math.abs(r[1])):Math.max(Math.abs(r[1]),s.height),this.tracker?this.tracker.attr(o):(this.tracker=e.renderer.rect(o).addClass("highcharts-tracker").add(e),t.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}},t.prototype.styledModeFormat=function(t){return t.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')},t.prototype.tooltipFooterHeaderFormatter=function(t,e){var i=t.series,o=i.tooltipOptions,r=i.xAxis,s=r&&r.dateTime,n={isFooter:e,labelConfig:t},h=o.xDateFormat,l=o[e?"footerFormat":"headerFormat"];return m(this,"headerFormatter",n,function(e){s&&!h&&x(t.key)&&(h=s.getXDateFormat(t.key,o.dateTimeLabelFormats)),s&&h&&(t.point&&t.point.tooltipDateKeys||["key"]).forEach(function(t){l=l.replace("{point."+t+"}","{point."+t+":"+h+"}")}),i.chart.styledMode&&(l=this.styledModeFormat(l)),e.text=a(l,{point:t,series:i},this.chart)}),n.text},t.prototype.update=function(t){this.destroy(),this.init(this.chart,b(!0,this.options,t))},t.prototype.updatePosition=function(t){var e,i=this.chart,o=this.container,r=this.distance,s=this.options,n=this.renderer,a=this.getLabel(),h=a.height,l=void 0===h?0:h,c=a.width,d=void 0===c?0:c,p=i.pointer.getChartPosition(),f=p.left,g=p.top,m=p.scaleX,v=p.scaleY,x=(s.positioner||this.getPosition).call(this,d,l,t),y=(t.plotX||0)+i.plotLeft,b=(t.plotY||0)+i.plotTop;n&&o&&(s.positioner&&(x.x+=f-r,x.y+=g-r),e=(s.borderWidth||0)+2*r+2,n.setSize(d+e,l+e,!1),(1!==m||1!==v)&&(u(o,{transform:"scale(".concat(m,", ").concat(v,")")}),y*=m,b*=v),y+=f-x.x,b+=g-x.y),this.move(Math.round(x.x),Math.round(x.y||0),y,b)},t}();return n=[],(s=C||(C={})).compose=function(t){r.pushUnique(n,t)&&d(t,"afterInit",function(){var t=this.chart;t.options.tooltip&&(t.tooltip=new s(t,t.options.tooltip))})},C}),i(e,"Core/Series/Point.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s=e.animObject,n=i.defaultOptions,a=o.format,h=r.addEvent,l=r.defined,c=r.erase,d=r.extend,p=r.fireEvent,u=r.getNestedProperty,f=r.isArray,g=r.isFunction,m=r.isNumber,v=r.isObject,x=r.merge,y=r.objectEach,b=r.pick,M=r.syncTimeout,k=r.removeEvent,S=r.uniqueKey;return function(){function e(){this.category=void 0,this.destroyed=!1,this.formatPrefix="point",this.id=void 0,this.isNull=!1,this.name=void 0,this.options=void 0,this.percentage=void 0,this.selected=!1,this.series=void 0,this.shapeArgs=void 0,this.total=void 0,this.visible=!0,this.x=void 0}return e.prototype.animateBeforeDestroy=function(){var t=this,e={x:t.startXPos,opacity:0},i=t.getGraphicalProps();i.singular.forEach(function(i){t[i]=t[i].animate("dataLabel"===i?{x:t[i].startXPos,y:t[i].startYPos,opacity:0}:e)}),i.plural.forEach(function(e){t[e].forEach(function(e){e.element&&e.animate(d({x:t.startXPos},e.startYPos?{x:e.startXPos,y:e.startYPos}:{}))})})},e.prototype.applyOptions=function(t,i){var o=this.series,r=o.options.pointValKey||o.pointValKey;return d(this,t=e.prototype.optionsToObject.call(this,t)),this.options=this.options?d(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,r&&(this.y=e.prototype.getNestedProperty.call(this,r)),this.selected&&(this.state="select"),"name"in this&&void 0===i&&o.xAxis&&o.xAxis.hasNames&&(this.x=o.xAxis.nameToX(this)),void 0===this.x&&o?void 0===i?this.x=o.autoIncrement():this.x=i:m(t.x)&&o.options.relativeXValue&&(this.x=o.autoIncrement(t.x)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this},e.prototype.destroy=function(){if(!this.destroyed){var t=this,e=t.series,i=e.chart,o=e.options.dataSorting,r=i.hoverPoints,n=s(t.series.chart.renderer.globalAnimation),a=function(){for(var e in(t.graphic||t.graphics||t.dataLabel||t.dataLabels)&&(k(t),t.destroyElements()),t)delete t[e]};t.legendItem&&i.legend.destroyItem(t),r&&(t.setState(),c(r,t),r.length||(i.hoverPoints=null)),t===i.hoverPoint&&t.onMouseOut(),o&&o.enabled?(this.animateBeforeDestroy(),M(a,n.duration)):a(),i.pointCount--}this.destroyed=!0},e.prototype.destroyElements=function(t){var e=this,i=e.getGraphicalProps(t);i.singular.forEach(function(t){e[t]=e[t].destroy()}),i.plural.forEach(function(t){e[t].forEach(function(t){t&&t.element&&t.destroy()}),delete e[t]})},e.prototype.firePointEvent=function(t,e,i){var o=this,r=this.series.options;(r.point.events[t]||o.options&&o.options.events&&o.options.events[t])&&o.importEvents(),"click"===t&&r.allowPointSelect&&(i=function(t){!o.destroyed&&o.select&&o.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),p(o,t,e,i)},e.prototype.getClassName=function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},e.prototype.getGraphicalProps=function(t){var e,i,o=this,r=[],s={singular:[],plural:[]};for((t=t||{graphic:1,dataLabel:1}).graphic&&r.push("graphic","connector"),t.dataLabel&&r.push("dataLabel","dataLabelPath","dataLabelUpper"),i=r.length;i--;)o[e=r[i]]&&s.singular.push(e);return["graphic","dataLabel"].forEach(function(e){var i=e+"s";t[e]&&o[i]&&s.plural.push(i)}),s},e.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},e.prototype.getNestedProperty=function(t){return t?0===t.indexOf("custom.")?u(t,this.options):this[t]:void 0},e.prototype.getZone=function(){var t,e=this.series,i=e.zones,o=e.zoneAxis||"y",r=0;for(t=i[0];this[o]>=t.value;)t=i[++r];return this.nonZonedColor||(this.nonZonedColor=this.color),t&&t.color&&!this.options.color?this.color=t.color:this.color=this.nonZonedColor,t},e.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},e.prototype.init=function(t,e,i){return this.series=t,this.applyOptions(e,i),this.id=l(this.id)?this.id:S(),this.resolveColor(),t.chart.pointCount++,p(this,"afterInit"),this},e.prototype.isValid=function(){return(m(this.x)||this.x instanceof Date)&&m(this.y)},e.prototype.optionsToObject=function(t){var i,o=this.series,r=o.options.keys,s=r||o.pointArrayMap||["y"],n=s.length,a={},h=0,l=0;if(m(t)||null===t)a[s[0]]=t;else if(f(t))for(!r&&t.length>n&&("string"==(i=typeof t[0])?a.name=t[0]:"number"===i&&(a.x=t[0]),h++);l0?e.prototype.setNestedProperty(a,t[h],s[l]):a[s[l]]=t[h]),h++,l++;else"object"==typeof t&&(a=t,t.dataLabels&&(o.hasDataLabels=function(){return!0}),t.marker&&(o._hasPointMarkers=!0));return a},e.prototype.pos=function(t,e){if(void 0===e&&(e=this.plotY),!this.destroyed){var i=this.plotX,o=this.series,r=o.chart,s=o.xAxis,n=o.yAxis,a=0,h=0;if(m(i)&&m(e))return t&&(a=s?s.pos:r.plotLeft,h=n?n.pos:r.plotTop),r.inverted&&s&&n?[n.len-e+h,s.len-i+a]:[i+a,e+h]}},e.prototype.resolveColor=function(){var t,e,i,o=this.series,r=o.chart.options.chart,s=o.chart.styledMode,n=r.colorCount;delete this.nonZonedColor,o.options.colorByPoint?(s||(t=(e=o.options.colors||o.chart.options.colors)[o.colorCounter],n=e.length),i=o.colorCounter,o.colorCounter++,o.colorCounter===n&&(o.colorCounter=0)):(s||(t=o.color),i=o.colorIndex),this.colorIndex=b(this.options.colorIndex,i),this.color=b(this.options.color,t)},e.prototype.setNestedProperty=function(t,e,i){return i.split(".").reduce(function(t,i,o,r){var s=r.length-1===o;return t[i]=s?e:v(t[i],!0)?t[i]:{},t[i]},t),t},e.prototype.shouldDraw=function(){return!this.isNull},e.prototype.tooltipFormatter=function(t){var e=this.series,i=e.tooltipOptions,o=b(i.valueDecimals,""),r=i.valuePrefix||"",s=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach(function(e){e="{point."+e,(r||s)&&(t=t.replace(RegExp(e+"}","g"),r+e+"}"+s)),t=t.replace(RegExp(e+"}","g"),e+":,."+o+"f}")}),a(t,{point:this,series:this.series},e.chart)},e.prototype.update=function(t,e,i,o){var r,s=this,n=s.series,a=s.graphic,h=n.chart,l=n.options;function c(){s.applyOptions(t);var o=a&&s.hasMockGraphic,c=null===s.y?!o:o;a&&c&&(s.graphic=a.destroy(),delete s.hasMockGraphic),v(t,!0)&&(a&&a.element&&t&&t.marker&&void 0!==t.marker.symbol&&(s.graphic=a.destroy()),(null==t?void 0:t.dataLabels)&&s.dataLabel&&(s.dataLabel=s.dataLabel.destroy())),r=s.index,n.updateParallelArrays(s,r),l.data[r]=v(l.data[r],!0)||v(t,!0)?s.options:b(t,l.data[r]),n.isDirty=n.isDirtyData=!0,!n.fixedBox&&n.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===l.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}e=b(e,!0),!1===o?c():s.firePointEvent("update",{options:t},c)},e.prototype.remove=function(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)},e.prototype.select=function(t,e){var i=this,o=i.series,r=o.chart;t=b(t,!i.selected),this.selectedStaging=t,i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,o.options.data[o.data.indexOf(i)]=i.options,i.setState(t&&"select"),e||r.getSelectedPoints().forEach(function(t){var e=t.series;t.selected&&t!==i&&(t.selected=t.options.selected=!1,e.options.data[e.data.indexOf(t)]=t.options,t.setState(r.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))})}),delete this.selectedStaging},e.prototype.onMouseOver=function(t){var e=this.series.chart,i=e.pointer;t=t?i.normalize(t):i.getChartCoordinatesFromPoint(this,e.inverted),i.runPointActions(t,this)},e.prototype.onMouseOut=function(){var t=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t.hoverPoints||[]).forEach(function(t){t.setState()}),t.hoverPoints=t.hoverPoint=null},e.prototype.importEvents=function(){if(!this.hasImportedEvents){var t=this,e=x(t.series.options.point,t.options).events;t.events=e,y(e,function(e,i){g(e)&&h(t,i,e)}),this.hasImportedEvents=!0}},e.prototype.setState=function(e,i){var o,r,s,a,h=this.series,l=this.state,c=h.options.states[e||"normal"]||{},u=n.plotOptions[h.type].marker&&h.options.marker,f=u&&!1===u.enabled,g=u&&u.states&&u.states[e||"normal"]||{},v=!1===g.enabled,x=this.marker||{},y=h.chart,M=u&&h.markerAttribs,k=h.halo,S=h.stateMarkerGraphic;if(((e=e||"")!==this.state||i)&&(!this.selected||"select"===e)&&!1!==c.enabled&&(!e||!v&&(!f||!1!==g.enabled))&&(!e||!x.states||!x.states[e]||!1!==x.states[e].enabled)){if(this.state=e,M&&(o=h.markerAttribs(this,e)),this.graphic&&!this.hasMockGraphic){if(l&&this.graphic.removeClass("highcharts-point-"+l),e&&this.graphic.addClass("highcharts-point-"+e),!y.styledMode){r=h.pointAttribs(this,e),s=b(y.options.chart.animation,c.animation);var C=r.opacity;h.options.inactiveOtherPoints&&m(C)&&(this.dataLabels||[]).forEach(function(t){t&&!t.hasClass("highcharts-data-label-hidden")&&(t.animate({opacity:C},s),t.connector&&t.connector.animate({opacity:C},s))}),this.graphic.animate(r,s)}o&&this.graphic.animate(o,b(y.options.chart.animation,g.animation,u.animation)),S&&S.hide()}else e&&g&&(a=x.symbol||h.symbol,S&&S.currentSymbol!==a&&(S=S.destroy()),o&&(S?S[i?"animate":"attr"]({x:o.x,y:o.y}):a&&(h.stateMarkerGraphic=S=y.renderer.symbol(a,o.x,o.y,o.width,o.height).add(h.markerGroup),S.currentSymbol=a)),!y.styledMode&&S&&"inactive"!==this.state&&S.attr(h.pointAttribs(this,e))),S&&(S[e&&this.isInside?"show":"hide"](),S.element.point=this,S.addClass(this.getClassName(),!0));var w=c.halo,A=this.graphic||S,T=A&&A.visibility||"inherit";w&&w.size&&A&&"hidden"!==T&&!this.isCluster?(k||(h.halo=k=y.renderer.path().add(A.parentGroup)),k.show()[i?"animate":"attr"]({d:this.haloPath(w.size)}),k.attr({class:"highcharts-halo highcharts-color-"+b(this.colorIndex,h.colorIndex)+(this.className?" "+this.className:""),visibility:T,zIndex:-1}),k.point=this,y.styledMode||k.attr(d({fill:this.color||h.color,"fill-opacity":w.opacity},t.filterUserAttributes(w.attributes||{})))):k&&k.point&&k.point.haloPath&&k.animate({d:k.point.haloPath(0)},null,k.hide),p(this,"afterSetState",{state:e})}},e.prototype.haloPath=function(t){var e=this.pos();return e?this.series.chart.renderer.symbols.circle(Math.floor(e[0])-t,e[1]-t,2*t,2*t):[]},e}()}),i(e,"Core/Pointer.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r,s,n=t.parse,a=e.charts,h=e.noop,l=i.addEvent,c=i.attr,d=i.css,p=i.defined,u=i.extend,f=i.find,g=i.fireEvent,m=i.isNumber,v=i.isObject,x=i.objectEach,y=i.offset,b=i.pick,M=i.splat,k=function(){function t(t,e){this.lastValidTouch={},this.pinchDown=[],this.runChartClick=!1,this.eventsToUnbind=[],this.chart=t,this.hasDragged=!1,this.options=e,this.init(t,e)}return t.prototype.applyInactiveState=function(t){var e,i=[];(t||[]).forEach(function(t){e=t.series,i.push(e),e.linkedParent&&i.push(e.linkedParent),e.linkedSeries&&(i=i.concat(e.linkedSeries)),e.navigatorSeries&&i.push(e.navigatorSeries)}),this.chart.series.forEach(function(t){-1===i.indexOf(t)?t.setState("inactive",!0):t.options.inactiveOtherPoints&&t.setAllPointsToState("inactive")})},t.prototype.destroy=function(){var i=this;this.eventsToUnbind.forEach(function(t){return t()}),this.eventsToUnbind=[],!e.chartCount&&(t.unbindDocumentMouseUp&&(t.unbindDocumentMouseUp=t.unbindDocumentMouseUp()),t.unbindDocumentTouchEnd&&(t.unbindDocumentTouchEnd=t.unbindDocumentTouchEnd())),clearInterval(i.tooltipTimeout),x(i,function(t,e){i[e]=void 0})},t.prototype.getSelectionMarkerAttrs=function(t,e){var i=this,o={args:{chartX:t,chartY:e},attrs:{},shapeType:"rect"};return g(this,"getSelectionMarkerAttrs",o,function(o){var r,s=i.chart,n=i.mouseDownX,a=void 0===n?0:n,h=i.mouseDownY,l=void 0===h?0:h,c=i.zoomHor,d=i.zoomVert,p=o.attrs;p.x=s.plotLeft,p.y=s.plotTop,p.width=c?1:s.plotWidth,p.height=d?1:s.plotHeight,c&&(r=t-a,p.width=Math.abs(r),p.x=(r>0?0:r)+a),d&&(r=e-l,p.height=Math.abs(r),p.y=(r>0?0:r)+l)}),o},t.prototype.drag=function(t){var e,i=this.chart,o=i.options.chart,r=i.plotLeft,s=i.plotTop,a=i.plotWidth,h=i.plotHeight,l=this.mouseDownX||0,c=this.mouseDownY||0,d=v(o.panning)?o.panning&&o.panning.enabled:o.panning,p=o.panKey&&t[o.panKey+"Key"],u=t.chartX,f=t.chartY,g=this.selectionMarker;if((!g||!g.touch)&&(ur+a&&(u=r+a),fs+h&&(f=s+h),this.hasDragged=Math.sqrt(Math.pow(l-u,2)+Math.pow(c-f,2)),this.hasDragged>10)){e=i.isInsidePlot(l-r,c-s,{visiblePlotOnly:!0});var m=this.getSelectionMarkerAttrs(u,f),x=m.shapeType,y=m.attrs;(i.hasCartesianSeries||i.mapView)&&(this.zoomX||this.zoomY)&&e&&!p&&!g&&(this.selectionMarker=g=i.renderer[x](),g.attr({class:"highcharts-selection-marker",zIndex:7}).add(),i.styledMode||g.attr({fill:o.selectionMarkerFill||n("#334eff").setOpacity(.25).get()})),g&&g.attr(y),e&&!g&&d&&i.pan(t,o.panning)}},t.prototype.dragStart=function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},t.prototype.getSelectionBox=function(t){var e={args:{marker:t},result:{}};return g(this,"getSelectionBox",e,function(e){e.result={x:t.attr?+t.attr("x"):t.x,y:t.attr?+t.attr("y"):t.y,width:t.attr?t.attr("width"):t.width,height:t.attr?t.attr("height"):t.height}}),e.result},t.prototype.drop=function(t){var e=this,i=this.chart,o=this.hasPinched;if(this.selectionMarker){var r=this.getSelectionBox(this.selectionMarker),s=r.x,n=r.y,a=r.width,h=r.height,l={originalEvent:t,xAxis:[],yAxis:[],x:s,y:n,width:a,height:h},c=!!i.mapView;(this.hasDragged||o)&&(i.axes.forEach(function(i){if(i.zoomEnabled&&p(i.min)&&(o||e[({xAxis:"zoomX",yAxis:"zoomY"})[i.coll]])&&m(s)&&m(n)&&m(a)&&m(h)){var r=i.horiz,d="touchend"===t.type?i.minPixelPadding:0,u=i.toValue((r?s:n)+d),f=i.toValue((r?s+a:n+h)-d);l[i.coll].push({axis:i,min:Math.min(u,f),max:Math.max(u,f)}),c=!0}}),c&&g(i,"selection",l,function(t){i.zoom(u(t,o?{animation:!1}:null))})),m(i.index)&&(this.selectionMarker=this.selectionMarker.destroy()),o&&this.scaleGroups()}i&&m(i.index)&&(d(i.container,{cursor:i._cursor}),i.cancelClick=+this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},t.prototype.findNearestKDPoint=function(t,e,i){var o;return t.forEach(function(t){var r,s,n,a,h=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y"),l=t.searchPoint(i,h);v(l,!0)&&l.series&&(!v(o,!0)||(s=(r=o).distX-l.distX,n=r.dist-l.dist,a=(l.series.group&&l.series.group.zIndex)-(r.series.group&&r.series.group.zIndex),(0!==s&&e?s:0!==n?n:0!==a?a:r.series.index>l.series.index?-1:1)>0))&&(o=l)}),o},t.prototype.getChartCoordinatesFromPoint=function(t,e){var i=t.series,o=i.xAxis,r=i.yAxis,s=t.shapeArgs;if(o&&r){var n=b(t.clientX,t.plotX),a=t.plotY||0;return t.isNode&&s&&m(s.x)&&m(s.y)&&(n=s.x,a=s.y),e?{chartX:r.len+r.pos-a,chartY:o.len+o.pos-n}:{chartX:n+o.pos,chartY:a+r.pos}}if(s&&s.x&&s.y)return{chartX:s.x,chartY:s.y}},t.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var t=this.chart.container,e=y(t);this.chartPosition={left:e.left,top:e.top,scaleX:1,scaleY:1};var i=t.offsetWidth,o=t.offsetHeight;return i>2&&o>2&&(this.chartPosition.scaleX=e.width/i,this.chartPosition.scaleY=e.height/o),this.chartPosition},t.prototype.getCoordinates=function(t){var e={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},t.prototype.getHoverData=function(t,e,i,o,r,s){var n,a=[],h=function(t){return t.visible&&!(!r&&t.directTouch)&&b(t.options.enableMouseTracking,!0)},l=e,c={chartX:s?s.chartX:void 0,chartY:s?s.chartY:void 0,shared:r};g(this,"beforeGetHoverData",c),n=l&&!l.stickyTracking?[l]:i.filter(function(t){return t.stickyTracking&&(c.filter||h)(t)});var d=o&&t||!s?t:this.findNearestKDPoint(n,r,s);return l=d&&d.series,d&&(r&&!l.noSharedTooltip?(n=i.filter(function(t){return c.filter?c.filter(t):h(t)&&!t.noSharedTooltip})).forEach(function(t){var e=f(t.points,function(t){return t.x===d.x&&!t.isNull});v(e)&&(t.boosted&&t.boost&&(e=t.boost.getPoint(e)),a.push(e))}):a.push(d)),g(this,"afterGetHoverData",c={hoverPoint:d}),{hoverPoint:c.hoverPoint,hoverSeries:l,hoverPoints:a}},t.prototype.getPointFromEvent=function(t){for(var e,i=t.target;i&&!e;)e=i.point,i=i.parentNode;return e},t.prototype.onTrackerMouseOut=function(t){var e=this.chart,i=t.relatedTarget,o=e.hoverSeries;this.isDirectTouch=!1,!o||!i||o.stickyTracking||this.inClass(i,"highcharts-tooltip")||this.inClass(i,"highcharts-series-"+o.index)&&this.inClass(i,"highcharts-tracker")||o.onMouseOut()},t.prototype.inClass=function(t,e){for(var i,o=t;o;){if(i=c(o,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}o=o.parentElement}},t.prototype.init=function(t,e){this.options=e,this.chart=t,this.runChartClick=!!(e.chart.events&&e.chart.events.click),this.pinchDown=[],this.lastValidTouch={},this.setDOMEvents(),g(this,"afterInit")},t.prototype.normalize=function(t,e){var i=t.touches,o=i?i.length?i.item(0):b(i.changedTouches,t.changedTouches)[0]:t;e||(e=this.getChartPosition());var r=o.pageX-e.left,s=o.pageY-e.top;return u(t,{chartX:Math.round(r/=e.scaleX),chartY:Math.round(s/=e.scaleY)})},t.prototype.onContainerClick=function(t){var e=this.chart,i=e.hoverPoint,o=this.normalize(t),r=e.plotLeft,s=e.plotTop;!e.cancelClick&&(i&&this.inClass(o.target,"highcharts-tracker")?(g(i.series,"click",u(o,{point:i})),e.hoverPoint&&i.firePointEvent("click",o)):(u(o,this.getCoordinates(o)),e.isInsidePlot(o.chartX-r,o.chartY-s,{visiblePlotOnly:!0})&&g(e,"click",o)))},t.prototype.onContainerMouseDown=function(t){var i=(1&(t.buttons||t.button))==1;t=this.normalize(t),e.isFirefox&&0!==t.button&&this.onContainerMouseMove(t),(void 0===t.button||i)&&(this.zoomOption(t),i&&t.preventDefault&&t.preventDefault(),this.dragStart(t))},t.prototype.onContainerMouseLeave=function(e){var i=a[b(t.hoverChartIndex,-1)];e=this.normalize(e),this.onContainerMouseMove(e),i&&e.relatedTarget&&!this.inClass(e.relatedTarget,"highcharts-tooltip")&&(i.pointer.reset(),i.pointer.chartPosition=void 0)},t.prototype.onContainerMouseEnter=function(t){delete this.chartPosition},t.prototype.onContainerMouseMove=function(t){var e=this.chart,i=e.tooltip,o=this.normalize(t);this.setHoverChartIndex(t),("mousedown"===e.mouseIsDown||this.touchSelect(o))&&this.drag(o),!e.openMenu&&(this.inClass(o.target,"highcharts-tracker")||e.isInsidePlot(o.chartX-e.plotLeft,o.chartY-e.plotTop,{visiblePlotOnly:!0}))&&!(i&&i.shouldStickOnContact(o))&&(this.inClass(o.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(o))},t.prototype.onDocumentTouchEnd=function(e){var i=a[b(t.hoverChartIndex,-1)];i&&i.pointer.drop(e)},t.prototype.onContainerTouchMove=function(t){this.touchSelect(t)?this.onContainerMouseMove(t):this.touch(t)},t.prototype.onContainerTouchStart=function(t){this.touchSelect(t)?this.onContainerMouseDown(t):(this.zoomOption(t),this.touch(t,!0))},t.prototype.onDocumentMouseMove=function(t){var e=this.chart,i=e.tooltip,o=this.chartPosition,r=this.normalize(t,o);!o||e.isInsidePlot(r.chartX-e.plotLeft,r.chartY-e.plotTop,{visiblePlotOnly:!0})||i&&i.shouldStickOnContact(r)||this.inClass(r.target,"highcharts-tracker")||this.reset()},t.prototype.onDocumentMouseUp=function(e){var i=a[b(t.hoverChartIndex,-1)];i&&i.pointer.drop(e)},t.prototype.pinch=function(t){var e=this,i=e.chart,o=e.pinchDown,r=t.touches||[],s=r.length,n=e.lastValidTouch,a=e.hasZoom,l={},c=1===s&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),d={},p=e.chart.tooltip,f=1===s&&b(p&&p.options.followTouchMove,!0),m=e.selectionMarker;s>1?e.initiated=!0:f&&(e.initiated=!1),a&&e.initiated&&!c&&!1!==t.cancelable&&t.preventDefault(),[].map.call(r,function(t){return e.normalize(t)}),"touchstart"===t.type?([].forEach.call(r,function(t,e){o[e]={chartX:t.chartX,chartY:t.chartY}}),n.x=[o[0].chartX,o[1]&&o[1].chartX],n.y=[o[0].chartY,o[1]&&o[1].chartY],i.axes.forEach(function(t){if(t.zoomEnabled){var e=i.bounds[t.horiz?"h":"v"],o=t.minPixelPadding,r=t.toPixels(Math.min(b(t.options.min,t.dataMin),t.dataMin)),s=t.toPixels(Math.max(b(t.options.max,t.dataMax),t.dataMax)),n=Math.min(r,s),a=Math.max(r,s);e.min=Math.min(t.pos,n-o),e.max=Math.max(t.pos+t.len,a+o)}}),e.res=!0):f?this.runPointActions(e.normalize(t)):o.length&&(g(i,"touchpan",{originalEvent:t},function(){m||(e.selectionMarker=m=u({destroy:h,touch:!0},i.plotBox)),e.pinchTranslate(o,r,l,m,d,n),e.hasPinched=a,e.scaleGroups(l,d)}),e.res&&(e.res=!1,this.reset(!1,0)))},t.prototype.pinchTranslate=function(t,e,i,o,r,s){this.zoomHor&&this.pinchTranslateDirection(!0,t,e,i,o,r,s),this.zoomVert&&this.pinchTranslateDirection(!1,t,e,i,o,r,s)},t.prototype.pinchTranslateDirection=function(t,e,i,o,r,s,n,a){var h,l,c,d,p=this.chart,u=t?"x":"y",f=t?"X":"Y",g="chart"+f,m=t?"width":"height",v=p["plot"+(t?"Left":"Top")],x=p.inverted,y=p.bounds[t?"h":"v"],b=1===e.length,M=e[0][g],k=!b&&e[1][g],S=function(){"number"==typeof A&&Math.abs(M-k)>20&&(C=a||Math.abs(w-A)/Math.abs(M-k)),c=(v-w)/C+M,h=p["plot"+(t?"Width":"Height")]/C},C=a||1,w=i[0][g],A=!b&&i[1][g];S(),(l=c)y.max&&(l=y.max-h,d=!0),d?(w-=.8*(w-n[u][0]),"number"==typeof A&&(A-=.8*(A-n[u][1])),S()):n[u]=[w,A],x||(s[u]=c-v,s[m]=h);var T=x?t?"scaleY":"scaleX":"scale"+f,P=x?1/C:C;r[m]=h,r[u]=l,o[T]=C*(x&&!t?-1:1),o["translate"+f]=P*v+(w-P*M)},t.prototype.reset=function(t,e){var i=this.chart,o=i.hoverSeries,r=i.hoverPoint,s=i.hoverPoints,n=i.tooltip,a=n&&n.shared?s:r;t&&a&&M(a).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?n&&a&&M(a).length&&(n.refresh(a),n.shared&&s?s.forEach(function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):r&&(r.setState(r.state,!0),i.axes.forEach(function(t){t.crosshair&&r.series[t.coll]===t&&t.drawCrosshair(null,r)}))):(r&&r.onMouseOut(),s&&s.forEach(function(t){t.setState()}),o&&o.onMouseOut(),n&&n.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach(function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},t.prototype.runPointActions=function(e,i,o){var r=this.chart,s=r.series,n=r.tooltip&&r.tooltip.options.enabled?r.tooltip:void 0,h=!!n&&n.shared,c=i||r.hoverPoint,d=c&&c.series||r.hoverSeries,p=(!e||"touchmove"!==e.type)&&(!!i||d&&d.directTouch&&this.isDirectTouch),u=this.getHoverData(c,d,s,p,h,e);c=u.hoverPoint,d=u.hoverSeries;var g=u.hoverPoints,m=d&&d.tooltipOptions.followPointer&&!d.tooltipOptions.split,v=h&&d&&!d.noSharedTooltip;if(c&&(o||c!==r.hoverPoint||n&&n.isHidden)){if((r.hoverPoints||[]).forEach(function(t){-1===g.indexOf(t)&&t.setState()}),r.hoverSeries!==d&&d.onMouseOver(),this.applyInactiveState(g),(g||[]).forEach(function(t){t.setState("hover")}),r.hoverPoint&&r.hoverPoint.firePointEvent("mouseOut"),!c.series)return;r.hoverPoints=g,r.hoverPoint=c,c.firePointEvent("mouseOver",void 0,function(){n&&c&&n.refresh(v?g:c,e)})}else if(m&&n&&!n.isHidden){var x=n.getAnchor([{}],e);r.isInsidePlot(x[0],x[1],{visiblePlotOnly:!0})&&n.updatePosition({plotX:x[0],plotY:x[1]})}this.unDocMouseMove||(this.unDocMouseMove=l(r.container.ownerDocument,"mousemove",function(e){var i=a[t.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(e)}),this.eventsToUnbind.push(this.unDocMouseMove)),r.axes.forEach(function(t){var i,o=b((t.crosshair||{}).snap,!0);!o||(i=r.hoverPoint)&&i.series[t.coll]===t||(i=f(g,function(e){return e.series&&e.series[t.coll]===t})),i||!o?t.drawCrosshair(e,i):t.hideCrosshair()})},t.prototype.scaleGroups=function(t,e){var i=this.chart;i.series.forEach(function(o){var r=t||o.getPlotBox("series");o.group&&(o.xAxis&&o.xAxis.zoomEnabled||i.mapView)&&(o.group.attr(r),o.markerGroup&&(o.markerGroup.attr(t||o.getPlotBox("marker")),o.markerGroup.clip(e?i.clipRect:null)),o.dataLabelsGroup&&o.dataLabelsGroup.attr(r))}),i.clipRect.attr(e||i.clipBox)},t.prototype.setDOMEvents=function(){var i=this,o=this.chart.container,r=o.ownerDocument;o.onmousedown=this.onContainerMouseDown.bind(this),o.onmousemove=this.onContainerMouseMove.bind(this),o.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(l(o,"mouseenter",this.onContainerMouseEnter.bind(this))),this.eventsToUnbind.push(l(o,"mouseleave",this.onContainerMouseLeave.bind(this))),t.unbindDocumentMouseUp||(t.unbindDocumentMouseUp=l(r,"mouseup",this.onDocumentMouseUp.bind(this)));for(var s=this.chart.renderTo.parentElement;s&&"BODY"!==s.tagName;)this.eventsToUnbind.push(l(s,"scroll",function(){delete i.chartPosition})),s=s.parentElement;e.hasTouch&&(this.eventsToUnbind.push(l(o,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(l(o,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),t.unbindDocumentTouchEnd||(t.unbindDocumentTouchEnd=l(r,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))},t.prototype.setHoverChartIndex=function(i){var o=this.chart,r=e.charts[b(t.hoverChartIndex,-1)];r&&r!==o&&r.pointer.onContainerMouseLeave(i||{relatedTarget:o.container}),r&&r.mouseIsDown||(t.hoverChartIndex=o.index)},t.prototype.touch=function(t,e){var i,o,r=this.chart;this.setHoverChartIndex(),1===t.touches.length?(t=this.normalize(t),r.isInsidePlot(t.chartX-r.plotLeft,t.chartY-r.plotTop,{visiblePlotOnly:!0})&&!r.openMenu?(e&&this.runPointActions(t),"touchmove"===t.type&&(i=!!(o=this.pinchDown)[0]&&Math.sqrt(Math.pow(o[0].chartX-t.chartX,2)+Math.pow(o[0].chartY-t.chartY,2))>=4),b(i,!0)&&this.pinch(t)):e&&this.reset()):2===t.touches.length&&this.pinch(t)},t.prototype.touchSelect=function(t){return!!(this.chart.zooming.singleTouch&&t.touches&&1===t.touches.length)},t.prototype.zoomOption=function(t){var e,i,o=this.chart,r=(o.options.chart,o.inverted),s=o.zooming.type||"";/touch/.test(t.type)&&(s=b(o.zooming.pinchType,s)),this.zoomX=e=/x/.test(s),this.zoomY=i=/y/.test(s),this.zoomHor=e&&!r||i&&r,this.zoomVert=i&&!r||e&&r,this.hasZoom=e||i},t}();return r=[],s=[],(o=k||(k={})).compose=function(t){i.pushUnique(s,t)&&l(t,"beforeRender",function(){this.pointer=new o(this,this.options)})},o.dissolve=function(){for(var t=0,e=r.length;tt-6&&s1.5*S?b.height:S))},t.prototype.layoutItem=function(t){var e=this.options,i=this.padding,o="horizontal"===e.layout,r=t.itemHeight,s=this.itemMarginBottom,n=this.itemMarginTop,a=o?k(e.itemDistance,20):0,h=this.maxLegendWidth,l=e.alignColumns&&this.totalItemWidth>h?this.maxItemWidth:t.itemWidth,c=t.legendItem||{};o&&this.itemX-i+l>h&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=n+this.lastLineHeight+s),this.lastLineHeight=0),this.lastItemY=n+this.itemY+s,this.lastLineHeight=Math.max(r,this.lastLineHeight),c.x=this.itemX,c.y=this.itemY,o?this.itemX+=l:(this.itemY+=n+r+s,this.lastLineHeight=r),this.offsetWidth=this.widthOption||Math.max((o?this.itemX-i-(t.checkbox?0:a):l)+i,this.offsetWidth)},t.prototype.getAllItems=function(){var t=[];return this.chart.series.forEach(function(e){var i=e&&e.options;e&&k(i.showInLegend,!m(i.linkedTo)&&void 0,!0)&&(t=t.concat((e.legendItem||{}).labels||("point"===i.legendType?e.data:e)))}),y(this,"afterGetAllItems",{allItems:t}),t},t.prototype.getAlignment=function(){var t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)},t.prototype.adjustMargins=function(t,e){var i=this.chart,o=this.options,r=this.getAlignment();r&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(s,n){s.test(r)&&!m(t[n])&&(i[d[n]]=Math.max(i[d[n]],i.legend[(n+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][n]*o[n%2?"x":"y"]+k(o.margin,12)+e[n]+(i.titleOffset[n]||0)))})},t.prototype.proximatePositions=function(){var t,e=this.chart,i=[],o="left"===this.options.align;this.allItems.forEach(function(t){var r,s,n,a,h=o;t.yAxis&&(t.xAxis.options.reversed&&(h=!h),t.points&&(r=x(h?t.points:t.points.slice(0).reverse(),function(t){return b(t.plotY)})),s=this.itemMarginTop+t.legendItem.label.getBBox().height+this.itemMarginBottom,a=t.yAxis.top-e.plotTop,n=t.visible?(r?r.plotY:t.yAxis.height)+(a-.3*s):a+t.yAxis.height,i.push({target:n,size:s,item:t}))},this);for(var r=0,s=p(i,e.plotHeight);r-1&&(o/=2),this.maxLegendWidth=this.widthOption||o,l||(this.group=l=s.g("legend").addClass(n.className||"").attr({zIndex:7}).add(),this.contentGroup=s.g().attr({zIndex:1}).add(l),this.scrollGroup=s.g().add(this.contentGroup)),this.renderTitle(),C(h,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),n.reversed&&h.reverse(),this.allItems=h,this.display=t=!!h.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,h.forEach(this.renderItem,this),h.forEach(this.layoutItem,this),e=(this.widthOption||this.offsetWidth)+a,i=this.lastItemY+this.lastLineHeight+this.titleHeight,i=this.handleOverflow(i)+a,c||(this.box=c=s.rect().addClass("highcharts-legend-box").attr({r:n.borderRadius}).add(l)),r.styledMode||c.attr({stroke:n.borderColor,"stroke-width":n.borderWidth||0,fill:n.backgroundColor||"none"}).shadow(n.shadow),e>0&&i>0&&c[c.placed?"animate":"attr"](c.crisp.call({},{x:0,y:0,width:e,height:i},c.strokeWidth())),l[t?"show":"hide"](),r.styledMode&&"none"===l.getStyle("display")&&(e=i=0),this.legendWidth=e,this.legendHeight=i,t&&this.align(),this.proximate||this.positionItems(),y(this,"afterRender")},t.prototype.align=function(t){void 0===t&&(t=this.chart.spacingBox);var e=this.chart,i=this.options,o=t.y;/(lth|ct|rth)/.test(this.getAlignment())&&e.titleOffset[0]>0?o+=e.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&e.titleOffset[2]>0&&(o-=e.titleOffset[2]),o!==t.y&&(t=M(t,{y:o})),e.hasRendered||(this.group.placed=!1),this.group.align(M(i,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":i.verticalAlign}),!0,t)},t.prototype.handleOverflow=function(t){var e,i,o,r=this,s=this.chart,n=s.renderer,a=this.options,h=a.y,l="top"===a.verticalAlign,c=this.padding,d=a.maxHeight,p=a.navigation,u=k(p.animation,!0),f=p.arrowSize||12,g=this.pages,m=this.allItems,v=function(t){"number"==typeof t?M.attr({height:t}):M&&(r.clipRect=M.destroy(),r.contentGroup.clip()),r.contentGroup.div&&(r.contentGroup.div.style.clip=t?"rect("+c+"px,9999px,"+(c+t)+"px,0)":"auto")},x=function(t){return r[t]=n.circle(0,0,1.3*f).translate(f/2,f/2).add(b),s.styledMode||r[t].attr("fill","rgba(0,0,0,0.0001)"),r[t]},y=s.spacingBox.height+(l?-h:h)-c,b=this.nav,M=this.clipRect;return"horizontal"!==a.layout||"middle"===a.verticalAlign||a.floating||(y/=2),d&&(y=Math.min(y,d)),g.length=0,t&&y>0&&t>y&&!1!==p.enabled?(this.clipHeight=e=Math.max(y-20-this.titleHeight-c,0),this.currentPage=k(this.currentPage,1),this.fullHeight=t,m.forEach(function(t,r){var s=(o=t.legendItem||{}).y||0,n=Math.round(o.label.getBBox().height),a=g.length;(!a||s-g[a-1]>e&&(i||s)!==g[a-1])&&(g.push(i||s),a++),o.pageIx=a-1,i&&((m[r-1].legendItem||{}).pageIx=a-1),r===m.length-1&&s+n-g[a-1]>e&&s>g[a-1]&&(g.push(s),o.pageIx=a),s!==i&&(i=s)}),M||(M=r.clipRect=n.clipRect(0,c-2,9999,0),r.contentGroup.clip(M)),v(e),b||(this.nav=b=n.g().attr({zIndex:1}).add(this.group),this.up=n.symbol("triangle",0,0,f,f).add(b),x("upTracker").on("click",function(){r.scroll(-1,u)}),this.pager=n.text("",15,10).addClass("highcharts-legend-navigation"),!s.styledMode&&p.style&&this.pager.css(p.style),this.pager.add(b),this.down=n.symbol("triangle-down",0,0,f,f).add(b),x("downTracker").on("click",function(){r.scroll(1,u)})),r.scroll(0),t=y):b&&(v(),this.nav=b.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},t.prototype.scroll=function(t,e){var i=this,o=this.chart,r=this.pages,s=r.length,n=this.clipHeight,a=this.options.navigation,c=this.pager,d=this.padding,p=this.currentPage+t;p>s&&(p=s),p>0&&(void 0!==e&&l(e,o),this.nav.attr({translateX:d,translateY:n+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(t){t.attr({class:1===p?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),c.attr({text:p+"/"+s}),[this.down,this.downTracker].forEach(function(t){t.attr({x:18+this.pager.getBBox().width,class:p===s?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),o.styledMode||(this.up.attr({fill:1===p?a.inactiveColor:a.activeColor}),this.upTracker.css({cursor:1===p?"default":"pointer"}),this.down.attr({fill:p===s?a.inactiveColor:a.activeColor}),this.downTracker.css({cursor:p===s?"default":"pointer"})),this.scrollOffset=-r[p-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=p,this.positionCheckboxes(),w(function(){y(i,"afterScroll",{currentPage:p})},h(k(e,o.renderer.globalAnimation,!0)).duration))},t.prototype.setItemEvents=function(t,e,i){for(var r=this,s=t.legendItem||{},n=r.chart.renderer.boxWrapper,a=t instanceof o,h="highcharts-legend-"+(a?"point":"series")+"-active",l=r.chart.styledMode,c=i?[e,s.symbol]:[s.group],d=function(e){r.allItems.forEach(function(i){t!==i&&[i].concat(i.linkedSeries||[]).forEach(function(t){t.setState(e,!a)})})},p=0;p0},t.prototype.hasMarkerChanged=function(t,e){var i=t.marker,o=e.marker||{};return i&&(o.enabled&&!i.enabled||o.symbol!==i.symbol||o.height!==i.height||o.width!==i.width)},t.prototype.autoIncrement=function(t){var e,i,o=this.options,r=o.pointIntervalUnit,s=o.relativeXValue,n=this.chart.time,a=this.xIncrement;return(a=z(a,o.pointStart,0),this.pointInterval=i=z(this.pointInterval,o.pointInterval,1),s&&B(t)&&(i*=t),r&&(e=new n.Date(a),"day"===r?n.set("Date",e,n.get("Date",e)+i):"month"===r?n.set("Month",e,n.get("Month",e)+i):"year"===r&&n.set("FullYear",e,n.get("FullYear",e)+i),i=e.getTime()-a),s&&B(t))?a+i:(this.xIncrement=a+i,a)},t.prototype.setDataSortingOptions=function(){var t=this.options;A(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),k(t.pointRange)||(t.pointRange=1)},t.prototype.setOptions=function(t){var e,i,o,r=this.chart,s=r.options.plotOptions,n=r.userOptions||{},a=I(t),h=r.styledMode,l={plotOptions:s,userOptions:a};P(this,"setOptions",l);var c=l.plotOptions[this.type],d=n.plotOptions||{},u=d.series||{},f=p.plotOptions[this.type]||{},g=d[this.type]||{};this.userOptions=l.userOptions;var m=I(c,s.series,g,a);this.tooltipOptions=I(p.tooltip,null===(e=p.plotOptions.series)||void 0===e?void 0:e.tooltip,null==f?void 0:f.tooltip,r.userOptions.tooltip,null===(i=d.series)||void 0===i?void 0:i.tooltip,g.tooltip,a.tooltip),this.stickyTracking=z(a.stickyTracking,g.stickyTracking,u.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||m.stickyTracking),null===c.marker&&delete m.marker,this.zoneAxis=m.zoneAxis;var v=this.zones=(m.zones||[]).slice();return(m.negativeColor||m.negativeFillColor)&&!m.zones&&(o={value:m[this.zoneAxis+"Threshold"]||m.threshold||0,className:"highcharts-negative"},h||(o.color=m.negativeColor,o.fillColor=m.negativeFillColor),v.push(o)),v.length&&k(v[v.length-1].value)&&v.push(h?{}:{color:this.color,fillColor:this.fillColor}),P(this,"afterSetOptions",{options:m}),m},t.prototype.getName=function(){return z(this.options.name,"Series "+(this.index+1))},t.prototype.getCyclic=function(t,e,i){var o,r,s=this.chart,n="".concat(t,"Index"),a="".concat(t,"Counter"),h=(null==i?void 0:i.length)||s.options.chart.colorCount;!e&&(k(r=z("color"===t?this.options.colorIndex:void 0,this[n]))?o=r:(s.series.length||(s[a]=0),o=s[a]%h,s[a]+=1),i&&(e=i[o])),void 0!==o&&(this[n]=o),this[t]=e},t.prototype.getColor=function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||p.plotOptions[this.type].color,this.chart.options.colors)},t.prototype.getPointsCollection=function(){return(this.hasGroupedData?this.points:this.data)||[]},t.prototype.getSymbol=function(){var t=this.options.marker;this.getCyclic("symbol",t.symbol,this.chart.options.symbols)},t.prototype.findPointIndex=function(t,e){var i,o,r,n=t.id,a=t.x,h=this.points,l=this.options.dataSorting;if(n){var c=this.chart.get(n);c instanceof s&&(i=c)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){var d=function(e){return!e.touched&&e.index===t.index};if(l&&l.matchByName?d=function(e){return!e.touched&&e.name===t.name}:this.options.relativeXValue&&(d=function(e){return!e.touched&&e.options.x===t.x}),!(i=T(h,d)))return}return i&&void 0!==(r=i&&i.index)&&(o=!0),void 0===r&&B(a)&&(r=this.xData.indexOf(a,e)),-1!==r&&void 0!==r&&this.cropped&&(r=r>=this.cropStart?r-this.cropStart:r),!o&&B(r)&&h[r]&&h[r].touched&&(r=void 0),r},t.prototype.updateData=function(t,e){var i,o,r,s,n=this.options,a=n.dataSorting,h=this.points,l=[],c=this.requireSorting,d=t.length===h.length,p=!0;if(this.xIncrement=null,t.forEach(function(t,e){var o,r=k(t)&&this.pointClass.prototype.optionsToObject.call({series:this},t)||{},p=r.x;r.id||B(p)?(-1===(o=this.findPointIndex(r,s))||void 0===o?l.push(t):h[o]&&t!==n.data[o]?(h[o].update(t,!1,null,!1),h[o].touched=!0,c&&(s=o+1)):h[o]&&(h[o].touched=!0),(!d||e!==o||a&&a.enabled||this.hasDerivedData)&&(i=!0)):l.push(t)},this),i)for(o=h.length;o--;)(r=h[o])&&!r.touched&&r.remove&&r.remove(!1,e);else!d||a&&a.enabled?p=!1:(t.forEach(function(t,e){t===h[e].y||h[e].destroyed||h[e].update(t,!1,null,!1)}),l.length=0);return h.forEach(function(t){t&&(t.touched=!1)}),!!p&&(l.forEach(function(t){this.addPoint(t,!1,null,null,!1)},this),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=x(this.xData),this.autoIncrement()),!0)},t.prototype.setData=function(t,e,i,o){void 0===e&&(e=!0);var r,s,n,a,h,l=this,c=l.points,d=c&&c.length||0,p=l.options,u=l.chart,f=p.dataSorting,g=l.xAxis,m=p.turboThreshold,v=this.xData,x=this.yData,y=l.pointArrayMap,b=y&&y.length,M=p.keys,k=0,S=1,C=null;u.options.chart.allowMutatingData||(p.data&&delete l.options.data,l.userOptions.data&&delete l.userOptions.data,h=I(!0,t));var A=(t=h||t||[]).length;if(f&&f.enabled&&(t=this.sortData(t)),u.options.chart.allowMutatingData&&!1!==o&&A&&d&&!l.cropped&&!l.hasGroupedData&&l.visible&&!l.boosted&&(a=this.updateData(t,i)),!a){if(l.xIncrement=null,l.colorCounter=0,this.parallelArrays.forEach(function(t){l[t+"Data"].length=0}),m&&A>m){if(B(C=l.getFirstValidPoint(t)))for(s=0;s=0?k:0,S=S>=0?S:1),1===C.length&&(S=0),k===S)for(s=0;so?1:0}).forEach(function(t,e){t.x=e},this),e.linkedSeries&&e.linkedSeries.forEach(function(e){var i=e.options,r=i.data;i.dataSorting&&i.dataSorting.enabled||!r||(r.forEach(function(i,s){r[s]=o(e,i),t[s]&&(r[s].x=t[s].x,r[s].index=s)}),e.setData(r,!1))}),t},t.prototype.getProcessedData=function(t){var e,i,o,r,s,n=this,a=n.xAxis,h=n.options,l=h.cropThreshold,c=t||n.getExtremesFromAll||h.getExtremesFromAll,d=null==a?void 0:a.logarithmic,p=n.isCartesian,u=0,f=n.xData,g=n.yData,m=!1,v=f.length;a&&(r=(o=a.getExtremes()).min,s=o.max,m=!!(a.categories&&!a.names.length)),p&&n.sorted&&!c&&(!l||v>l||n.forceCrop)&&(f[v-1]s?(f=[],g=[]):n.yData&&(f[0]s)&&(f=(e=this.cropData(n.xData,n.yData,r,s)).xData,g=e.yData,u=e.start,i=!0));var x=O([d?f.map(d.log2lin):f],function(){return n.requireSorting&&!m&&w(15,!1,n.chart)});return{xData:f,yData:g,cropped:i,cropStart:u,closestPointRange:x}},t.prototype.processData=function(t){var e=this.xAxis;if(this.isCartesian&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!t)return!1;var i=this.getProcessedData();this.cropped=i.cropped,this.cropStart=i.cropStart,this.processedXData=i.xData,this.processedYData=i.yData,this.closestPointRange=this.basePointRange=i.closestPointRange,P(this,"afterProcessData")},t.prototype.cropData=function(t,e,i,o){var r,s,n=t.length,a=0,h=n;for(r=0;r=i){a=Math.max(0,r-1);break}for(s=r;so){h=s+1;break}return{xData:t.slice(a,h),yData:e.slice(a,h),start:a,end:h}},t.prototype.generatePoints=function(){var t,e,i,o,r=this.options,s=this.processedData||r.data,n=this.processedXData,a=this.processedYData,h=this.pointClass,l=n.length,c=this.cropStart||0,d=this.hasGroupedData,p=r.keys,u=[],f=r.dataGrouping&&r.dataGrouping.groupAll?c:0,g=this.data;if(!g&&!d){var m=[];m.length=s.length,g=this.data=m}for(p&&d&&(this.options.keys=!1),o=0;o0:n.length)||!f),r=e||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!l||(d[a+u]||s)>=g&&(d[a-u]||s)<=m,o&&r){if(h=n.length)for(;h--;)B(n[h])&&(p[v++]=n[h]);else p[v++]=n}var M={activeYData:p,dataMin:y(p),dataMax:x(p)};return P(this,"afterGetExtremes",{dataExtremes:M}),M},t.prototype.applyExtremes=function(){var t=this.getExtremes();return this.dataMin=t.dataMin,this.dataMax=t.dataMax,t},t.prototype.getFirstValidPoint=function(t){for(var e=t.length,i=0,o=null;null===o&&i=d.enabledThreshold*d.radius);if(!1!==d.enabled||this._hasPointMarkers)for(e=0;e0||i.hasImage)&&(i.graphic=o=h.renderer.symbol(g,a.x,a.y,a.width,a.height,n?s:d).add(p),this.enabledDataSorting&&h.hasRendered&&(o.attr({x:i.startXPos}),r="animate")),o&&"animate"===r&&o[m?"show":"hide"](m).animate(a),o){var v=this.pointAttribs(i,l||!i.selected?void 0:"select");l?c&&o.css({fill:v.fill}):o[r](v)}o&&o.addClass(i.getClassName(),!0)}else o&&(i.graphic=o.destroy())},t.prototype.markerAttribs=function(t,e){var i,o,r=this.options,s=r.marker,n=t.marker||{},a=n.symbol||s.symbol,h={},l=z(n.radius,s&&s.radius);e&&(i=s.states[e],l=z((o=n.states&&n.states[e])&&o.radius,i&&i.radius,l&&l+(i&&i.radiusPlus||0))),t.hasImage=a&&0===a.indexOf("url"),t.hasImage&&(l=0);var c=t.pos();return B(l)&&c&&(h.x=c[0]-l,h.y=c[1]-l,r.crisp&&(h.x=Math.floor(h.x))),l&&(h.width=h.height=2*l),h},t.prototype.pointAttribs=function(t,e){var i,o,r,s,n=this.options.marker,a=t&&t.options,h=a&&a.marker||{},l=a&&a.color,c=t&&t.color,d=t&&t.zone&&t.zone.color,p=this.color,u=z(h.lineWidth,n.lineWidth),f=1;return p=l||d||c||p,r=h.fillColor||n.fillColor||p,s=h.lineColor||n.lineColor||p,e=e||"normal",i=n.states[e]||{},u=z((o=h.states&&h.states[e]||{}).lineWidth,i.lineWidth,u+z(o.lineWidthPlus,i.lineWidthPlus,0)),r=o.fillColor||i.fillColor||r,{stroke:s=o.lineColor||i.lineColor||s,"stroke-width":u,fill:r,opacity:f=z(o.opacity,i.opacity,f)}},t.prototype.destroy=function(t){var e,i,o,r=this,s=r.chart,n=/AppleWebKit\/533/.test(m.navigator.userAgent),a=r.data||[];for(P(r,"destroy",{keepEventsForUpdate:t}),this.removeEvents(t),(r.axisTypes||[]).forEach(function(t){(o=r[t])&&o.series&&(C(o.series,r),o.isDirty=o.forceRedraw=!0)}),r.legendItem&&r.chart.legend.destroyItem(r),e=a.length;e--;)(i=a[e])&&i.destroy&&i.destroy();r.clips&&r.clips.forEach(function(t){return t.destroy()}),l.clearTimeout(r.animationTimeout),R(r,function(t,e){t instanceof h&&!t.survive&&t[n&&"group"===e?"hide":"destroy"]()}),s.hoverSeries===r&&(s.hoverSeries=void 0),C(s.series,r),s.orderItems("series"),R(r,function(e,i){t&&"hcEvents"===i||delete r[i]})},t.prototype.applyZones=function(){var t,e,i,o,r,s,n,a,h,l,c,d=this,p=this.chart,u=p.renderer,f=this.zones,g=this.clips||[],m=this.graph,v=this.area,x=Math.max(p.plotWidth,p.plotHeight),y=this[(this.zoneAxis||"y")+"Axis"],M=p.inverted,k=!1;f.length&&(m||v)&&y&&void 0!==y.min?(r=y.reversed,s=y.horiz,m&&!this.showLine&&m.hide(),v&&v.hide(),o=y.getExtremes(),f.forEach(function(f,S){t=r?s?p.plotWidth:0:s?0:y.toPixels(o.min)||0,t=b(z(e,t),0,x),e=b(Math.round(y.toPixels(z(f.value,o.max),!0)||0),0,x),k&&(t=e=y.toPixels(o.max)),n=Math.abs(t-e),a=Math.min(t,e),h=Math.max(t,e),y.isXAxis?(i={x:M?h:a,y:0,width:n,height:x},s||(i.x=p.plotHeight-i.x)):(i={x:0,y:M?h:a,width:x,height:n},s&&(i.y=p.plotWidth-i.y)),g[S]?g[S].animate(i):g[S]=u.clipRect(i),l=d["zone-area-"+S],c=d["zone-graph-"+S],m&&c&&c.clip(g[S]),v&&l&&l.clip(g[S]),k=f.value>o.max,d.resetZones&&0===e&&(e=void 0)}),this.clips=g):d.visible&&(m&&m.show(),v&&v.show())},t.prototype.plotGroup=function(t,e,i,o,r){var s=this[t],n=!s,a={visibility:i,zIndex:o||.1};return void 0===this.opacity||this.chart.styledMode||"inactive"===this.state||(a.opacity=this.opacity),n&&(this[t]=s=this.chart.renderer.g().add(r)),s.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(k(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(s.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),s.attr(a)[n?"attr":"animate"](this.getPlotBox(e)),s},t.prototype.getPlotBox=function(t){var e=this.xAxis,i=this.yAxis,o=this.chart,r=o.inverted&&!o.polar&&e&&!1!==this.invertible&&"series"===t;return o.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:o.plotLeft,translateY:i?i.top:o.plotTop,rotation:r?90:0,rotationOriginX:r?(e.len-i.len)/2:0,rotationOriginY:r?(e.len+i.len)/2:0,scaleX:r?-1:1,scaleY:1}},t.prototype.removeEvents=function(t){t||N(this),this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(t){t()}),this.eventsToUnbind.length=0)},t.prototype.render=function(){var t=this,e=t.chart,i=t.options,o=c(i.animation),r=t.visible?"inherit":"hidden",s=i.zIndex,n=t.hasRendered,a=e.seriesGroup;e.inverted;var h=t.finishedAnimating?0:o.duration;P(this,"render"),t.plotGroup("group","series",r,s,a),t.markerGroup=t.plotGroup("markerGroup","markers",r,s,a),!1!==i.clip&&t.setClip(),t.animate&&h&&t.animate(!0),t.drawGraph&&(t.drawGraph(),t.applyZones()),t.visible&&t.drawPoints(),t.drawDataLabels&&t.drawDataLabels(),t.redrawPoints&&t.redrawPoints(),t.drawTracker&&i.enableMouseTracking&&t.drawTracker(),t.animate&&h&&t.animate(),n||(h&&o.defer&&(h+=o.defer),t.animationTimeout=W(function(){t.afterAnimate()},h||0)),t.isDirty=!1,t.hasRendered=!0,P(t,"afterRender")},t.prototype.redraw=function(){var t=this.isDirty||this.isDirtyData;this.translate(),this.render(),t&&delete this.kdTree},t.prototype.reserveSpace=function(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries},t.prototype.searchPoint=function(t,e){var i=this.xAxis,o=this.yAxis,r=this.chart.inverted;return this.searchKDTree({clientX:r?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:r?o.len-t.chartX+o.pos:t.chartY-o.pos},e,t)},t.prototype.buildKDTree=function(t){this.buildingKdTree=!0;var e=this,i=e.options.findNearestPointBy.indexOf("y")>-1?2:1;delete e.kdTree,W(function(){e.kdTree=function t(i,o,r){var s,n,a=i&&i.length;if(a)return s=e.kdAxisArray[o%r],i.sort(function(t,e){return t[s]-e[s]}),{point:i[n=Math.floor(a/2)],left:t(i.slice(0,n),o+1,r),right:t(i.slice(n+1),o+1,r)}}(e.getValidPoints(null,!e.directTouch),i,i),e.buildingKdTree=!1},e.options.kdNow||t&&"touchstart"===t.type?0:1)},t.prototype.searchKDTree=function(t,e,i){var o=this,r=this.kdAxisArray,s=r[0],n=r[1],a=e?"distX":"dist",h=(o.options.findNearestPointBy||"").indexOf("y")>-1?2:1,l=!!o.isBubble;if(this.kdTree||this.buildingKdTree||this.buildKDTree(i),this.kdTree)return function t(e,i,r,h){var c,d,p,u,f,g,m,v,x,y,b,M=i.point,S=o.kdAxisArray[r%h],C=M;d=e[s],p=M[s],u=k(d)&&k(p)?d-p:null,f=e[n],g=M[n],m=k(f)&&k(g)?f-g:0,v=l&&(null===(c=M.marker)||void 0===c?void 0:c.radius)||0,M.dist=Math.sqrt((u&&u*u||0)+m*m)-v,M.distX=k(u)?Math.abs(u)-v:Number.MAX_VALUE;var w=(e[S]||0)-(M[S]||0)+(l&&(null===(x=M.marker)||void 0===x?void 0:x.radius)||0),A=w<0?"left":"right",T=w<0?"right":"left";return i[A]&&(C=(y=t(e,i[A],r+1,h))[a]=0&&t.plotY<=(o?o.len:e.plotHeight)&&t.plotX>=0&&t.plotX<=(i?i.len:e.plotWidth)},t.prototype.drawTracker=function(){var t=this,e=t.options,i=e.trackByArea,o=[].concat(i?t.areaPath:t.graphPath),r=t.chart,s=r.pointer,n=r.renderer,a=r.options.tooltip.snap,h=t.tracker,l=function(i){e.enableMouseTracking&&r.hoverSeries!==t&&t.onMouseOver()},c="rgba(192,192,192,"+(g?1e-4:.002)+")";h?h.attr({d:o}):t.graph&&(t.tracker=n.path(o).attr({visibility:t.visible?"inherit":"hidden",zIndex:2}).addClass(i?"highcharts-tracker-area":"highcharts-tracker-line").add(t.group),r.styledMode||t.tracker.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:c,fill:i?c:"none","stroke-width":t.graph.strokeWidth()+(i?0:2*a)}),[t.tracker,t.markerGroup,t.dataLabelsGroup].forEach(function(t){t&&(t.addClass("highcharts-tracker").on("mouseover",l).on("mouseout",function(t){s.onTrackerMouseOut(t)}),e.cursor&&!r.styledMode&&t.css({cursor:e.cursor}),f&&t.on("touchstart",l))})),P(this,"afterDrawTracker")},t.prototype.addPoint=function(t,e,i,o,r){var s,n,a=this.options,h=this.data,l=this.chart,c=this.xAxis,d=c&&c.hasNames&&c.names,p=a.data,u=this.xData;e=z(e,!0);var f={series:this};this.pointClass.prototype.applyOptions.apply(f,[t]);var g=f.x;if(n=u.length,this.requireSorting&&gg;)n--;this.updateParallelArrays(f,"splice",[n,0,0]),this.updateParallelArrays(f,n),d&&f.name&&(d[g]=f.name),p.splice(n,0,t),(s||this.processedData)&&(this.data.splice(n,0,null),this.processData()),"point"===a.legendType&&this.generatePoints(),i&&(h[0]&&h[0].remove?h[0].remove(!1):(h.shift(),this.updateParallelArrays(f,"shift"),p.shift())),!1!==r&&P(this,"addPoint",{point:f}),this.isDirty=!0,this.isDirtyData=!0,e&&l.redraw(o)},t.prototype.removePoint=function(t,e,i){var o=this,r=o.data,s=r[t],n=o.points,a=o.chart,h=function(){n&&n.length===r.length&&n.splice(t,1),r.splice(t,1),o.options.data.splice(t,1),o.updateParallelArrays(s||{series:o},"splice",[t,1]),s&&s.destroy(),o.isDirty=!0,o.isDirtyData=!0,e&&a.redraw()};d(i,a),e=z(e,!0),s?s.firePointEvent("remove",null,h):h()},t.prototype.remove=function(t,e,i,o){var r=this,s=r.chart;function n(){r.destroy(o),s.isDirtyLegend=s.isDirtyBox=!0,s.linkSeries(o),z(t,!0)&&s.redraw(e)}!1!==i?P(r,"remove",null,n):n()},t.prototype.update=function(t,e){P(this,"update",{options:t=S(t,this.userOptions)});var i,o,r,s,n=this,a=n.chart,h=n.userOptions,l=n.initialType||n.type,c=a.options.plotOptions,d=v[l].prototype,p=n.finishedAnimating&&{animation:!1},u={},f=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],g=t.type||h.type||a.options.chart.type,m=!(this.hasDerivedData||g&&g!==this.type||void 0!==t.pointStart||void 0!==t.pointInterval||void 0!==t.relativeXValue||t.joinBy||t.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some(function(t){return n.hasOptionChanged(t)}));g=g||l,m&&(f.push("data","isDirtyData","isDirtyCanvas","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","clips","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX"),!1!==t.visible&&f.push("area","graph"),n.parallelArrays.forEach(function(t){f.push(t+"Data")}),t.data&&(t.dataSorting&&A(n.options.dataSorting,t.dataSorting),this.setData(t.data,!1))),t=I(h,p,{index:void 0===h.index?n.index:h.index,pointStart:z(null===(i=null==c?void 0:c.series)||void 0===i?void 0:i.pointStart,h.pointStart,n.xData[0])},!m&&{data:n.options.data},t),m&&t.data&&(t.data=n.options.data),(f=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(f)).forEach(function(t){f[t]=n[t],delete n[t]});var x=!1;if(v[g]){if(x=g!==n.type,n.remove(!1,!1,!1,!0),x){if(Object.setPrototypeOf)Object.setPrototypeOf(n,v[g].prototype);else{var y=Object.hasOwnProperty.call(n,"hcEvents")&&n.hcEvents;for(s in d)n[s]=void 0;A(n,v[g].prototype),y?n.hcEvents=y:delete n.hcEvents}}}else w(17,!0,a,{missingModuleFor:g});if(f.forEach(function(t){n[t]=f[t]}),n.init(a,t),m&&this.points){!1===(r=n.options).visible?(u.graphic=1,u.dataLabel=1):(this.hasMarkerChanged(r,h)&&(u.graphic=1),(null===(o=n.hasDataLabels)||void 0===o?void 0:o.call(n))||(u.dataLabel=1));for(var b=0,M=this.points;b=Math.max(l+n,m.pos)&&v<=Math.min(l+n+p.width,m.pos+m.len)||(g.isInsidePlot=!1)}if(!i.ignoreY&&g.isInsidePlot){var x=!r&&i.axis&&!i.axis.isXAxis&&i.axis||d&&(r?d.xAxis:d.yAxis)||{pos:a,len:1/0},y=i.paneCoordinates?x.pos+f:a+f;y>=Math.max(c+a,x.pos)&&y<=Math.min(c+a+p.height,x.pos+x.len)||(g.isInsidePlot=!1)}return N(this,"afterIsInsidePlot",g),g.isInsidePlot},t.prototype.redraw=function(t){N(this,"beforeRedraw");var e,i,o,r,s=this.hasCartesianSeries?this.axes:this.colorAxis||[],n=this.series,a=this.pointer,h=this.legend,l=this.userOptions.legend,c=this.renderer,d=c.isHidden(),p=[],u=this.isDirtyBox,f=this.isDirtyLegend;for(c.rootFontSize=c.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),m(!!this.hasRendered&&t,this),d&&this.temporaryDisplay(),this.layOutTitles(!1),o=n.length;o--;)if(((r=n[o]).options.stacking||r.options.centerInCategory)&&(i=!0,r.isDirty)){e=!0;break}if(e)for(o=n.length;o--;)(r=n[o]).options.stacking&&(r.isDirty=!0);n.forEach(function(t){t.isDirty&&("point"===t.options.legendType?("function"==typeof t.updateTotals&&t.updateTotals(),f=!0):l&&(l.labelFormatter||l.labelFormat)&&(f=!0)),t.isDirtyData&&N(t,"updatedData")}),f&&h&&h.options.enabled&&(h.render(),this.isDirtyLegend=!1),i&&this.getStacks(),s.forEach(function(t){t.updateNames(),t.setScale()}),this.getMargins(),s.forEach(function(t){t.isDirty&&(u=!0)}),s.forEach(function(t){var e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,p.push(function(){N(t,"afterSetExtremes",R(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(u||i)&&t.redraw()}),u&&this.drawChartBox(),N(this,"predraw"),n.forEach(function(t){(u||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1}),a&&a.reset(!0),c.draw(),N(this,"redraw"),N(this,"render"),d&&this.temporaryDisplay(!0),p.forEach(function(t){t.call()})},t.prototype.get=function(t){var e=this.series;function i(e){return e.id===t||e.options&&e.options.id===t}for(var o=z(this.axes,i)||z(this.series,i),r=0;!o&&r1?o.height:400)),this.containerBox=o},t.prototype.temporaryDisplay=function(t){var e,i=this.renderTo;if(t)for(;i&&i.style;)i.hcOrigStyle&&(L(i,i.hcOrigStyle),delete i.hcOrigStyle),i.hcOrigDetached&&(k.body.removeChild(i),i.hcOrigDetached=!1),i=i.parentNode;else for(;i&&i.style&&(k.body.contains(i)||i.parentNode||(i.hcOrigDetached=!0,k.body.appendChild(i)),("none"===G(i,"display",!1)||i.hcOricDetached)&&(i.hcOrigStyle={display:i.style.display,height:i.style.height,overflow:i.style.overflow},e={display:"block",overflow:"hidden"},i!==this.renderTo&&(e.height=0),L(i,e),i.offsetWidth||i.style.setProperty("display","block","important")),(i=i.parentNode)!==k.body););},t.prototype.setClassName=function(t){this.container.className="highcharts-container "+(t||"")},t.prototype.getContainer=function(){var t,e=this.options,i=e.chart,o="data-highcharts-chart",r=J(),s=this.renderTo;s||(this.renderTo=s=i.renderTo),U(s)&&(this.renderTo=s=k.getElementById(s)),s||I(13,!0,this);var a=V(P(s,o));H(a)&&M[a]&&M[a].hasRendered&&M[a].destroy(),P(s,o,this.index),s.innerHTML=p.emptyHTML,i.skipClone||s.offsetWidth||this.temporaryDisplay(),this.getChartSize();var h=this.chartWidth,c=this.chartHeight;L(s,{overflow:"hidden"}),this.styledMode||(t=R({position:"relative",overflow:"hidden",width:h+"px",height:c+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},i.style||{}));var d=O("div",{id:r},t,s);this.container=d,this._cursor=d.style.cursor;var u=i.renderer||!C?n.getRendererType(i.renderer):l;if(this.renderer=new u(d,h,c,void 0,i.forExport,e.exporting&&e.exporting.allowHTML,this.styledMode),this.containerBox=this.getContainerBox(),m(void 0,this),this.setClassName(i.className),this.styledMode)for(var f in e.defs)this.renderer.definition(e.defs[f]);else this.renderer.setStyle(i.style);this.renderer.chartIndex=this.index,N(this,"afterGetContainer")},t.prototype.getMargins=function(t){var e=this.spacing,i=this.margin,o=this.titleOffset;this.resetMargins(),o[0]&&!E(i[0])&&(this.plotTop=Math.max(this.plotTop,o[0]+e[0])),o[2]&&!E(i[2])&&(this.marginBottom=Math.max(this.marginBottom,o[2]+e[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),N(this,"getMargins"),t||this.getAxisMargins()},t.prototype.getAxisMargins=function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.colorAxis,o=t.margin,r=function(t){t.forEach(function(t){t.visible&&t.getOffset()})};t.hasCartesianSeries?r(t.axes):i&&i.length&&r(i),S.forEach(function(i,r){E(o[r])||(t[i]+=e[r])}),t.setChartSize()},t.prototype.getOptions=function(){return D(this.userOptions,v)},t.prototype.reflow=function(t){var e=this,i=e.containerBox,o=e.getContainerBox();delete e.pointer.chartPosition,!e.isPrinting&&!e.isResizing&&i&&o.width&&((o.width!==i.width||o.height!==i.height)&&(d.clearTimeout(e.reflowTimeout),e.reflowTimeout=$(function(){e.container&&e.setSize(void 0,void 0,!1)},t?100:0)),e.containerBox=o)},t.prototype.setReflow=function(){var t=this,e=function(e){var i;(null===(i=t.options)||void 0===i?void 0:i.chart.reflow)&&t.hasLoaded&&t.reflow(e)};if("function"==typeof ResizeObserver)new ResizeObserver(e).observe(t.renderTo);else{var i=T(w,"resize",e);T(this,"destroy",i)}},t.prototype.setSize=function(t,e,i){var o=this,r=o.renderer;o.isResizing+=1,m(i,o);var s=r.globalAnimation;o.oldChartHeight=o.chartHeight,o.oldChartWidth=o.chartWidth,void 0!==t&&(o.options.chart.width=t),void 0!==e&&(o.options.chart.height=e),o.getChartSize(),o.styledMode||(s?f:L)(o.container,{width:o.chartWidth+"px",height:o.chartHeight+"px"},s),o.setChartSize(!0),r.setSize(o.chartWidth,o.chartHeight,s),o.axes.forEach(function(t){t.isDirty=!0,t.setScale()}),o.isDirtyLegend=!0,o.isDirtyBox=!0,o.layOutTitles(),o.getMargins(),o.redraw(s),o.oldChartHeight=null,N(o,"resize"),setTimeout(function(){o&&N(o,"endResize",void 0,function(){o.isResizing-=1})},g(s).duration)},t.prototype.setChartSize=function(t){var e,i,o,r,s=this.inverted,n=this.renderer,a=this.chartWidth,h=this.chartHeight,l=this.options.chart,c=this.spacing,d=this.clipOffset;this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=o=Math.max(0,Math.round(a-e-this.marginRight)),this.plotHeight=r=Math.max(0,Math.round(h-i-this.marginBottom)),this.plotSizeX=s?r:o,this.plotSizeY=s?o:r,this.plotBorderWidth=l.plotBorderWidth||0,this.spacingBox=n.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:h-c[0]-c[2]},this.plotBox=n.plotBox={x:e,y:i,width:o,height:r};var p=2*Math.floor(this.plotBorderWidth/2),u=Math.ceil(Math.max(p,d[3])/2),f=Math.ceil(Math.max(p,d[0])/2);this.clipBox={x:u,y:f,width:Math.floor(this.plotSizeX-Math.max(p,d[1])/2-u),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(p,d[2])/2-f))},t||(this.axes.forEach(function(t){t.setAxisSize(),t.setAxisTranslation()}),n.alignElements()),N(this,"afterSetChartSize",{skipAxes:t})},t.prototype.resetMargins=function(){N(this,"resetMargins");var t=this,e=t.options.chart;["margin","spacing"].forEach(function(i){var o=e[i],r=X(o)?o:[o,o,o,o];["Top","Right","Bottom","Left"].forEach(function(o,s){t[i][s]=_(e[i+o],r[s])})}),S.forEach(function(e,i){t[e]=_(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},t.prototype.drawChartBox=function(){var t,e,i,o=this.options.chart,r=this.renderer,s=this.chartWidth,n=this.chartHeight,a=this.styledMode,h=this.plotBGImage,l=o.backgroundColor,c=o.plotBackgroundColor,d=o.plotBackgroundImage,p=this.plotLeft,u=this.plotTop,f=this.plotWidth,g=this.plotHeight,m=this.plotBox,v=this.clipRect,x=this.clipBox,y=this.chartBackground,b=this.plotBackground,M=this.plotBorder,k="animate";y||(this.chartBackground=y=r.rect().addClass("highcharts-background").add(),k="attr"),a?t=e=y.strokeWidth():(e=(t=o.borderWidth||0)+(o.shadow?8:0),i={fill:l||"none"},(t||y["stroke-width"])&&(i.stroke=o.borderColor,i["stroke-width"]=t),y.attr(i).shadow(o.shadow)),y[k]({x:e/2,y:e/2,width:s-e-t%2,height:n-e-t%2,r:o.borderRadius}),k="animate",b||(k="attr",this.plotBackground=b=r.rect().addClass("highcharts-plot-background").add()),b[k](m),!a&&(b.attr({fill:c||"none"}).shadow(o.plotShadow),d&&(h?(d!==h.attr("href")&&h.attr("href",d),h.animate(m)):this.plotBGImage=r.image(d,p,u,f,g).add())),v?v.animate({width:x.width,height:x.height}):this.clipRect=r.clipRect(x),k="animate",M||(k="attr",this.plotBorder=M=r.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),a||M.attr({stroke:o.plotBorderColor,"stroke-width":o.plotBorderWidth||0,fill:"none"}),M[k](M.crisp({x:p,y:u,width:f,height:g},-M.strokeWidth())),this.isDirtyBox=!1,N(this,"afterDrawChartBox")},t.prototype.propFromSeries=function(){var t,e,i,o=this,r=o.options.chart,s=o.options.series;["inverted","angular","polar"].forEach(function(n){for(e=A[r.type],i=r[n]||e&&e.prototype[n],t=s&&s.length;!i&&t--;)(e=A[s[t].type])&&e.prototype[n]&&(i=!0);o[n]=i})},t.prototype.linkSeries=function(t){var e=this,i=e.series;i.forEach(function(t){t.linkedSeries.length=0}),i.forEach(function(t){var i=t.options.linkedTo;U(i)&&(i=":previous"===i?e.series[t.index-1]:e.get(i))&&i.linkedParent!==t&&(i.linkedSeries.push(t),t.linkedParent=i,i.enabledDataSorting&&t.setDataSortingOptions(),t.visible=_(t.options.visible,i.options.visible,t.visible))}),N(this,"afterLinkSeries",{isUpdating:t})},t.prototype.renderSeries=function(){this.series.forEach(function(t){t.translate(),t.render()})},t.prototype.render=function(){var t=this.axes,e=this.colorAxis,i=this.renderer,o=function(t){t.forEach(function(t){t.visible&&t.render()})},r=0;this.setTitle(),N(this,"beforeMargins"),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize();var s=this.plotWidth;t.some(function(t){if(t.horiz&&t.visible&&t.options.labels.enabled&&t.series.length)return r=21,!0}),this.plotHeight=Math.max(this.plotHeight-r,0);var n=this.plotHeight;t.forEach(function(t){t.setScale()}),this.getAxisMargins();var a=s/this.plotWidth>1.1,h=n/this.plotHeight>1.05;(a||h)&&(t.forEach(function(t){(t.horiz&&a||!t.horiz&&h)&&t.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries?o(t):e&&e.length&&o(e),this.seriesGroup||(this.seriesGroup=i.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},t.prototype.addCredits=function(t){var e=this,i=F(!0,this.options.credits,t);i.enabled&&!this.credits&&(this.credits=this.renderer.text(i.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){i.href&&(w.location.href=i.href)}).attr({align:i.position.align,zIndex:8}),e.styledMode||this.credits.css(i.style),this.credits.add().align(i.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})},t.prototype.destroy=function(){var t,e=this,i=e.axes,o=e.series,r=e.container,n=r&&r.parentNode;for(N(e,"destroy"),e.renderer.forExport?j(M,e):M[e.index]=void 0,s.chartCount--,e.renderTo.removeAttribute("data-highcharts-chart"),Z(e),t=i.length;t--;)i[t]=i[t].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),t=o.length;t--;)o[t]=o[t].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach(function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),r&&(r.innerHTML=p.emptyHTML,Z(r),n&&B(r)),Y(e,function(t,i){delete e[i]})},t.prototype.firstRender=function(){var t=this,e=t.options;t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes();var i=W(e.series)?e.series:[];e.series=[],i.forEach(function(e){t.initSeries(e)}),t.linkSeries(),t.setSeriesData(),N(t,"beforeRender"),t.render(),t.pointer.getChartPosition(),t.renderer.imgCount||t.hasLoaded||t.onload(),t.temporaryDisplay(!0)},t.prototype.onload=function(){this.callbacks.concat([this.callback]).forEach(function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),N(this,"load"),N(this,"render"),E(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0},t.prototype.warnIfA11yModuleNotLoaded=function(){var t=this.options,e=this.title;!t||this.accessibility||(this.renderer.boxWrapper.attr({role:"img","aria-label":(e&&e.element.textContent||"").replace(/0&&(y+=r,x=M),(r=y-k)>0&&(y=k,x-=r),e.series.length&&x!==u.min&&y!==u.max&&x>=M&&y<=k&&(e.setExtremes(x,y,!1,!1,{trigger:"pan"}),!o.resetZoomButton&&x!==M&&y!==k&&a.match("y")&&(o.showResetZoom(),e.displayBtn=!1),i=!0),s[l]=h)}}),Y(s,function(t,e){o[e]=t}),i&&o.redraw(!1),L(o.container,{cursor:"move"})})},t}();return R(Q.prototype,{callbacks:[],collectionsWithInit:{xAxis:[Q.prototype.addAxis,[!0]],yAxis:[Q.prototype.addAxis,[!1]],series:[Q.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroundColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]}),Q}),i(e,"Extensions/ScrollablePlotArea.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Chart/Chart.js"],e["Core/Series/Series.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s){var n=t.stop,a=s.addEvent,h=s.createElement,l=s.defined,c=s.merge,d=s.pick;a(i,"afterSetChartSize",function(t){var i,o,r,s=this.options.chart.scrollablePlotArea,n=s&&s.minWidth,a=s&&s.minHeight;this.renderer.forExport||(n?(this.scrollablePixelsX=i=Math.max(0,n-this.chartWidth),i&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.width=this.plotWidth+=i,this.inverted?this.clipBox.height+=i:this.clipBox.width+=i,r={1:{name:"right",value:i}})):a&&(this.scrollablePixelsY=o=Math.max(0,a-this.chartHeight),l(o)&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.height=this.plotHeight+=o,this.inverted?this.clipBox.width+=o:this.clipBox.height+=o,r={2:{name:"bottom",value:o}})),r&&!t.skipAxes&&this.axes.forEach(function(t){r[t.side]?t.getPlotLinePath=function(){var i,o=r[t.side].name,s=r[t.side].value,n=this[o];return this[o]=n-s,i=e.prototype.getPlotLinePath.apply(this,arguments),this[o]=n,i}:(t.setAxisSize(),t.setAxisTranslation())}))}),a(i,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),i.prototype.setUpScrolling=function(){var t,e=this,i={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(i.overflowX="auto"),this.scrollablePixelsY&&(i.overflowY="auto"),this.scrollingParent=h("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo),this.scrollingContainer=h("div",{className:"highcharts-scrolling"},i,this.scrollingParent),a(this.scrollingContainer,"scroll",function(){e.pointer&&(delete e.pointer.chartPosition,e.hoverPoint&&(t=e.hoverPoint),e.pointer.runPointActions(void 0,t,!0))}),this.innerContainer=h("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},i.prototype.moveFixedElements=function(){var t,e=this.container,i=this.fixedRenderer,o=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-credits",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-reset-zoom",".highcharts-drillup-button",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"];this.scrollablePixelsX&&!this.inverted?t=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted?t=".highcharts-xaxis":this.scrollablePixelsY&&!this.inverted?t=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(t=".highcharts-yaxis"),t&&o.push("".concat(t,":not(.highcharts-radial-axis)"),"".concat(t,"-labels:not(.highcharts-radial-axis-labels)")),o.forEach(function(t){[].forEach.call(e.querySelectorAll(t),function(t){(t.namespaceURI===i.SVG_NS?i.box:i.box.parentNode).appendChild(t),t.style.pointerEvents="auto"})})},i.prototype.applyFixed=function(){var t=!this.fixedDiv,e=this.options.chart,i=e.scrollablePlotArea,o=r.getRendererType();t?(this.fixedDiv=h("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(e.style&&e.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=s=new o(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),this.scrollableMask=s.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":d(i.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),a(this,"afterShowResetZoom",this.moveFixedElements),a(this,"afterApplyDrilldown",this.moveFixedElements),a(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),(this.scrollableDirty||t)&&(this.scrollableDirty=!1,this.moveFixedElements()),l=this.chartWidth+(this.scrollablePixelsX||0),c=this.chartHeight+(this.scrollablePixelsY||0),n(this.container),this.container.style.width=l+"px",this.container.style.height=c+"px",this.renderer.boxWrapper.attr({width:l,height:c,viewBox:[0,0,l,c].join(" ")}),this.chartBackground.attr({width:l,height:c}),this.scrollingContainer.style.height=this.chartHeight+"px",t&&(i.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*i.scrollPositionX),i.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*i.scrollPositionY));var s,l,c,p,u=this.axisOffset,f=this.plotTop-u[0]-1,g=this.plotLeft-u[3]-1,m=this.plotTop+this.plotHeight+u[2]+1,v=this.plotLeft+this.plotWidth+u[1]+1,x=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),y=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);p=this.scrollablePixelsX?[["M",0,f],["L",this.plotLeft-1,f],["L",this.plotLeft-1,m],["L",0,m],["Z"],["M",x,f],["L",this.chartWidth,f],["L",this.chartWidth,m],["L",x,m],["Z"]]:this.scrollablePixelsY?[["M",g,0],["L",g,this.plotTop-1],["L",v,this.plotTop-1],["L",v,0],["Z"],["M",g,y],["L",g,this.chartHeight],["L",v,this.chartHeight],["L",v,y],["Z"]]:[["M",0,0]],"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:p})},a(e,"afterInit",function(){this.chart.scrollableDirty=!0}),a(o,"show",function(){this.chart.scrollableDirty=!0})}),i(e,"Core/Axis/Stacking/StackItem.js",[e["Core/Templating.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o=t.format,r=e.series,s=i.destroyObjectProperties,n=i.fireEvent,a=i.isNumber,h=i.pick;return function(){function t(t,e,i,o,r){var s=t.chart.inverted,n=t.reversed;this.axis=t;var a=this.isNegative=!!i!=!!n;this.options=e=e||{},this.x=o,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=r,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:e.align||(s?a?"left":"right":"center"),verticalAlign:e.verticalAlign||(s?"middle":a?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(s?a?"right":"left":"center")}return t.prototype.destroy=function(){s(this,this.axis)},t.prototype.render=function(t){var e=this.axis.chart,i=this.options,r=i.format,s=r?o(r,this,e):i.formatter.call(this);if(this.label)this.label.attr({text:s,visibility:"hidden"});else{this.label=e.renderer.label(s,null,void 0,i.shape,void 0,void 0,i.useHTML,!1,"stack-labels");var a={r:i.borderRadius||0,text:s,padding:h(i.padding,5),visibility:"hidden"};e.styledMode||(a.fill=i.backgroundColor,a.stroke=i.borderColor,a["stroke-width"]=i.borderWidth,this.label.css(i.style||{})),this.label.attr(a),this.label.added||this.label.add(t)}this.label.labelrank=e.plotSizeY,n(this,"afterRender")},t.prototype.setOffset=function(t,e,i,o,s,l){var c=this.alignOptions,d=this.axis,p=this.label,u=this.options,f=this.textAlign,g=d.chart,m=this.getStackBox({xOffset:t,width:e,boxBottom:i,boxTop:o,defaultX:s,xAxis:l}),v=c.verticalAlign;if(p&&m){var x=p.getBBox(),y=p.padding,b="justify"===h(u.overflow,"justify"),M=void 0;c.x=u.x||0,c.y=u.y||0;var k=this.adjustStackPosition({labelBox:x,verticalAlign:v,textAlign:f}),S=k.x,C=k.y;m.x-=S,m.y-=C,p.align(c,!1,m),(M=g.isInsidePlot(p.alignAttr.x+c.x+S,p.alignAttr.y+c.y+C))||(b=!1),b&&r.prototype.justifyDataLabel.call(d,p,c,p.alignAttr,x,m),p.attr({x:p.alignAttr.x,y:p.alignAttr.y,rotation:u.rotation,rotationOriginX:x.width/2,rotationOriginY:x.height/2}),h(!b&&u.crop,!0)&&(M=a(p.x)&&a(p.y)&&g.isInsidePlot(p.x-y+(p.width||0),p.y)&&g.isInsidePlot(p.x+y,p.y)),p[M?"show":"hide"]()}n(this,"afterSetOffset",{xOffset:t,width:e})},t.prototype.adjustStackPosition=function(t){var e=t.labelBox,i=t.verticalAlign,o=t.textAlign,r={bottom:0,middle:1,top:2,right:1,center:0,left:-1},s=r[i],n=r[o];return{x:e.width/2+e.width/2*n,y:e.height/2*s}},t.prototype.getStackBox=function(t){var e=this.axis,i=e.chart,o=t.boxTop,r=t.defaultX,s=t.xOffset,n=t.width,l=t.boxBottom,c=e.stacking.usePercentage?100:h(o,this.total,0),d=e.toPixels(c),p=t.xAxis||i.xAxis[0],u=h(r,p.translate(this.x))+s,f=Math.abs(d-e.toPixels(l||a(e.min)&&e.logarithmic&&e.logarithmic.lin2log(e.min)||0)),g=i.inverted,m=this.isNegative;return g?{x:(m?d:d-f)-i.plotLeft,y:p.height-u-n,width:f,height:n}:{x:u+p.transB-i.plotLeft,y:(m?d-f:d)-i.plotTop,width:n,height:f}},t}()}),i(e,"Core/Axis/Stacking/StackingAxis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s,n,a=t.getDeferredAnimation,h=i.series.prototype,l=r.addEvent,c=r.correctFloat,d=r.defined,p=r.destroyObjectProperties,u=r.fireEvent,f=r.isArray,g=r.isNumber,m=r.objectEach,v=r.pick;function x(){var t=this.inverted;this.axes.forEach(function(t){t.stacking&&t.stacking.stacks&&t.hasVisibleSeries&&(t.stacking.oldStacks=t.stacking.stacks)}),this.series.forEach(function(e){var i=e.xAxis&&e.xAxis.options||{};e.options.stacking&&e.reserveSpace()&&(e.stackKey=[e.type,v(e.options.stack,""),t?i.top:i.left,t?i.height:i.width].join(","))})}function y(){var t,e=this.stacking;if(e){var i=e.stacks;m(i,function(t,e){p(t),delete i[e]}),null===(t=e.stackTotalGroup)||void 0===t||t.destroy()}}function b(){this.stacking||(this.stacking=new A(this))}function M(t,e,i,o){return!d(t)||t.x!==e||o&&t.stackKey!==o?t={x:e,index:0,key:o,stackKey:o}:t.index++,t.key=[i,e,t.index].join(","),t}function k(){var t,e=this,i=e.yAxis,o=e.stackKey||"",r=i.stacking.stacks,s=e.processedXData,n=e.options.stacking,a=e[n+"Stacker"];a&&[o,"-"+o].forEach(function(i){for(var o,n,h,l,c=s.length;c--;)n=s[c],t=e.getStackIndicator(t,n,e.index,i),(l=null==(h=null===(o=r[i])||void 0===o?void 0:o[n])?void 0:h.points[t.key||""])&&a.call(e,l,h,c)})}function S(t,e,i){var o=e.total?100/e.total:0;t[0]=c(t[0]*o),t[1]=c(t[1]*o),this.stackedYData[i]=t[1]}function C(t){this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&this.chart.series.length>1?h.setStackedPoints.call(this,t,"group"):t.stacking.resetStacks()}function w(t,e){var i,r,s,n,a,h,l,p,u,g,m,x=e||this.options.stacking;if(x&&this.reserveSpace()&&(({group:"xAxis"})[x]||"yAxis")===t.coll){var y=this.processedXData,b=this.processedYData,M=[],k=b.length,S=this.options,C=S.threshold||0,w=S.startFromThreshold?C:0,A=S.stack,T=e?"".concat(this.type,",").concat(x):this.stackKey||"",P="-"+T,O=this.negStacks,L=t.stacking,E=L.stacks,D=L.oldStacks;for(L.stacksTouched+=1,u=0;u0&&!1===this.singleStacks&&(a.points[p][0]=a.points[this.index+","+g+",0"][0])):(delete a.points[p],delete a.points[this.index]);var B=a.total||0;"percent"===x?(h=n?T:P,B=O&&(null===(r=E[h])||void 0===r?void 0:r[g])?(h=E[h][g]).total=Math.max(h.total||0,B)+Math.abs(m)||0:c(B+(Math.abs(m)||0))):"group"===x?(f(m)&&(m=m[0]),null!==m&&B++):B=c(B+(m||0)),"group"===x?a.cumulative=(B||1)-1:a.cumulative=c(v(a.cumulative,w)+(m||0)),a.total=B,null!==m&&(a.points[p].push(a.cumulative),M[u]=a.cumulative,a.hasValidPoints=!0)}"percent"===x&&(L.usePercentage=!0),"group"!==x&&(this.stackedYData=M),L.oldStacks={}}}var A=function(){function t(t){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=t}return t.prototype.buildStacks=function(){var t,e,i=this.axis,o=i.series,r="xAxis"===i.coll,s=i.options.reversedStacks,n=o.length;for(this.resetStacks(),this.usePercentage=!1,e=n;e--;)t=o[s?e:n-e-1],r&&t.setGroupedPoints(i),t.setStackedPoints(i);if(!r)for(e=0;e0?o=!n.connectNulls:m&&!e?o=!0:(0===d||o?p=[["M",c.plotX,c.plotY]]:r.getPointSpline?p=[r.getPointSpline(t,c,d)]:l?(p=1===l?[["L",g.plotX,f]]:2===l?[["L",(g.plotX+u)/2,g.plotY],["L",(g.plotX+u)/2,f]]:[["L",u,g.plotY]]).push(["L",u,f]):p=[["L",u,f]],h.push(c.x),l&&(h.push(c.x),2===l&&h.push(c.x)),a.push.apply(a,p),o=!1)}),a.xMap=h,r.graphPath=a,a},i.prototype.getZonesGraphs=function(t){return this.zones.forEach(function(e,i){var o=["zone-graph-"+i,"highcharts-graph highcharts-zone-graph-"+i+" "+(e.className||"")];this.chart.styledMode||o.push(e.color||this.color,e.dashStyle||this.options.dashStyle),t.push(o)},this),t},i.defaultOptions=n(t.defaultOptions,{legendSymbol:"lineMarker"}),i}(t);return e.registerSeriesType("line",h),h}),i(e,"Series/Area/AreaSeries.js",[e["Core/Color/Color.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});t.parse;var s=e.seriesTypes.line,n=i.extend,a=i.merge,h=i.objectEach,l=i.pick,c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return r(e,t),e.prototype.drawGraph=function(){this.areaPath=[],t.prototype.drawGraph.apply(this);var e=this,i=this.areaPath,o=this.options,r=this.zones,s=[["area","highcharts-area",this.color,o.fillColor]];r.forEach(function(t,i){s.push(["zone-area-"+i,"highcharts-area highcharts-zone-area-"+i+" "+t.className,t.color||e.color,t.fillColor||o.fillColor])}),s.forEach(function(t){var r=t[0],s={},n=e[r],a=n?"animate":"attr";n?(n.endX=e.preventGraphAnimation?null:i.xMap,n.animate({d:i})):(s.zIndex=0,(n=e[r]=e.chart.renderer.path(i).addClass(t[1]).add(e.group)).isArea=!0),e.chart.styledMode||(t[3]?s.fill=t[3]:(s.fill=t[2],s["fill-opacity"]=l(o.fillOpacity,.75))),n[a](s),n.startX=i.xMap,n.shiftUnit=o.step?2:1})},e.prototype.getGraphPath=function(t){var e,i,o,r=s.prototype.getGraphPath,n=this.options,a=n.stacking,h=this.yAxis,c=[],d=[],p=this.index,u=h.stacking.stacks[this.stackKey],f=n.threshold,g=Math.round(h.getThreshold(n.threshold)),m=l(n.connectNulls,"percent"===a),v=function(i,o,r){var s,n,l=t[i],m=a&&u[l.x].points[p],v=l[r+"Null"]||0,x=l[r+"Cliff"]||0,y=!0;x||v?(s=(v?m[0]:m[1])+x,n=m[0]+x,y=!!v):!a&&t[o]&&t[o].isNull&&(s=n=f),void 0!==s&&(d.push({plotX:e,plotY:null===s?g:h.getThreshold(s),isNull:y,isCliff:!0}),c.push({plotX:e,plotY:null===n?g:h.getThreshold(n),doCurve:!1}))};t=t||this.points,a&&(t=this.getStackPoints(t));for(var x=0,y=t.length;x=0&&v=0&&xf&&r>l?(r=Math.max(f,l),a=2*l-r):rm&&a>l?(a=Math.max(m,l),r=2*l-a):a=Math.abs(e)&&a>.5;return o=a-(e=Math.round(e)+n),h&&o&&(e-=1,o+=1),{x:t,y:e,width:i,height:o}},e.prototype.adjustForMissingColumns=function(t,e,i,o){var r,s=this;if(!i.isNull&&o.columnCount>1){var n=this.xAxis.series.filter(function(t){return t.visible}).map(function(t){return t.index}),a=0,h=0;M(null===(r=this.xAxis.stacking)||void 0===r?void 0:r.stacks,function(t){if("number"==typeof i.x){var e=t[i.x.toString()];if(e&&v(e.points[s.index])){var o=Object.keys(e.points).filter(function(t){return!t.match(",")&&e.points[t]&&e.points[t].length>1}).map(parseFloat).filter(function(t){return -1!==n.indexOf(t)}).sort(function(t,e){return e-t});a=o.indexOf(s.index),h=o.length}}});var l=(h-1)*o.paddedWidth+e;t=(i.plotX||0)+l/2-e-a*o.paddedWidth}return t},e.prototype.translate=function(){var t=this,e=t.chart,i=t.options,o=t.dense=t.closestPointRange*t.xAxis.transA<2,s=t.borderWidth=b(i.borderWidth,o?0:1),n=t.xAxis,a=t.yAxis,h=i.threshold,l=b(i.minPointLength,5),c=t.getColumnMetrics(),d=c.width,p=t.pointXOffset=c.offset,g=t.dataMin,v=t.dataMax,y=t.barW=Math.max(d,1+2*s),M=t.translatedThreshold=a.getThreshold(h);e.inverted&&(M-=.5),i.pointPadding&&(y=Math.ceil(y)),r.prototype.translate.apply(t),t.points.forEach(function(o){var r=b(o.yBottom,M),s=999+Math.abs(r),m=o.plotX||0,k=u(o.plotY,-s,a.len+s);o.stackBox;var S,C=Math.min(k,r),w=Math.max(k,r)-C,A=d,T=m+p,P=y;l&&Math.abs(w)l?r-l:M-(S?l:0)),f(o.options.pointWidth)&&(T-=Math.round(((A=P=Math.ceil(o.options.pointWidth))-d)/2)),i.centerInCategory&&!i.stacking&&(T=t.adjustForMissingColumns(T,A,o,c)),o.barX=T,o.pointWidth=A,o.tooltipPos=e.inverted?[u(a.len+a.pos-e.plotLeft-k,a.pos-e.plotLeft,a.len+a.pos-e.plotLeft),n.len+n.pos-e.plotTop-T-P/2,w]:[n.left-e.plotLeft+T+P/2,u(k+a.pos-e.plotTop,a.pos-e.plotTop,a.len+a.pos-e.plotTop),w],o.shapeType=t.pointClass.prototype.shapeType||"roundedRect",o.shapeArgs=t.crispCol(T,o.isNull?M:C,P,o.isNull?0:w)}),m(this,"afterColumnTranslate")},e.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},e.prototype.pointAttribs=function(t,e){var i,o,r,s=this.options,n=this.pointAttrToOptions||{},a=n.stroke||"borderColor",h=n["stroke-width"]||"borderWidth",l=t&&t.color||this.color,d=t&&t[a]||s[a]||l,p=t&&t.options.dashStyle||s.dashStyle,u=t&&t[h]||s[h]||this[h]||0,f=b(t&&t.opacity,s.opacity,1);t&&this.zones.length&&(o=t.getZone(),l=t.options.color||o&&(o.color||t.nonZonedColor)||this.color,o&&(d=o.borderColor||d,p=o.dashStyle||p,u=o.borderWidth||u)),e&&t&&(r=(i=y(s.states[e],t.options.states&&t.options.states[e]||{})).brightness,l=i.color||void 0!==r&&c(l).brighten(i.brightness).get()||l,d=i[a]||d,u=i[h]||u,p=i.dashStyle||p,f=b(i.opacity,f));var g={fill:l,stroke:d,"stroke-width":u,opacity:f};return p&&(g.dashstyle=p),g},e.prototype.drawPoints=function(t){void 0===t&&(t=this.points);var e,i=this,o=this.chart,r=i.options,s=o.renderer,n=r.animationLimit||250;t.forEach(function(t){var a=t.plotY,h=t.graphic,l=!!h,c=h&&o.pointCount=0)this.justifyDataLabel(e,i,l,C,o,r);else if(u(i.crop,!0)){var A=l.x,T=l.y;A+=w[0],T+=w[1],k=d.isInsidePlot(A,T,{paneCoordinates:!0,series:c})&&d.isInsidePlot(A+C.width,T+C.height,{paneCoordinates:!0,series:c})}i.shape&&!v&&e[r?"attr":"animate"]({anchorX:S[0],anchorY:S[1]})}r&&f&&(e.placed=!1),k||f&&!M?e.show():(e.hide(),e.placed=!1)}function v(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6)}function x(t){var e=this.hasRendered||0,i=this.initDataLabelsGroup().attr({opacity:+e});return!e&&i&&(this.visible&&i.show(),this.options.animation?i.animate({opacity:1},t):i.attr({opacity:1})),i}function y(t){t=t||this.points;var e,i,o,a,l=this,d=l.chart,m=l.options,v=d.renderer,x=d.options.chart,y=x.backgroundColor,b=x.plotBackgroundColor,k=d.options.plotOptions,S=v.getContrast(c(b)&&b||c(y)&&y||"#000000"),C=m.dataLabels,w=g(C=M(M(null===(e=null==k?void 0:k.series)||void 0===e?void 0:e.dataLabels,null===(i=null==k?void 0:k[l.type])||void 0===i?void 0:i.dataLabels),C))[0],A=w.animation,T=w.defer?r(d,A,l):{defer:0,duration:0};h(this,"drawDataLabels"),(null===(o=l.hasDataLabels)||void 0===o?void 0:o.call(l))&&(a=this.initDataLabels(T),t.forEach(function(t){var e,i,o=t.dataLabels||[];g(M(C,t.dlOptions||(null===(e=t.options)||void 0===e?void 0:e.dataLabels))).forEach(function(e,i){var r,h,g,x,y,b=e.enabled&&t.visible&&(!t.isNull||t.dataLabelOnNull)&&function(t,e){var i=e.filter;if(i){var o=i.operator,r=t[i.property],s=i.value;return">"===o&&r>s||"<"===o&&r="===o&&r>=s||"<="===o&&r<=s||"=="===o&&r==s||"==="===o&&r===s}return!0}(t,e),M=e.style||{},k=e.distance,C={},w=o[i],A=!w;if(b){if(g=u(e[t.formatPrefix+"Format"],e.format),h=t.getLabelConfig(),x=n(g)?s(g,h,d):(e[t.formatPrefix+"Formatter"]||e.formatter).call(h,e),y=e.rotation,!d.styledMode&&(M.color=u(e.color,M.color,c(l.color)?l.color:void 0,"#000000"),"contrast"===M.color?(t.contrastColor=v.getContrast(t.color||l.color),M.color=!n(k)&&e.inside||0>f(k||0)||m.stacking?t.contrastColor:S):delete t.contrastColor,m.cursor&&(M.cursor=m.cursor)),C={r:e.borderRadius||0,rotation:y,padding:e.padding,zIndex:1},!d.styledMode){var T=e.backgroundColor,P=e.borderColor;C.fill="auto"===T?t.color:T,C.stroke="auto"===P?t.color:P,C["stroke-width"]=e.borderWidth}p(C,function(t,e){void 0===t&&delete C[e]})}if(!w||b&&n(x)&&!!w.div==!!e.useHTML&&(w.rotation&&e.rotation||w.rotation===e.rotation)||(w=void 0,A=!0),b&&n(x)&&(w?C.text=x:(w=y?v.text(x,0,0,e.useHTML).addClass("highcharts-data-label"):v.label(x,0,0,e.shape,void 0,void 0,e.useHTML,void 0,"data-label"))&&w.addClass(" highcharts-data-label-color-"+t.colorIndex+" "+(e.className||"")+(e.useHTML?" highcharts-tracker":"")),w)){w.options=e,w.attr(C),d.styledMode||w.css(M).shadow(e.shadow);var O=e[t.formatPrefix+"TextPath"]||e.textPath;O&&!e.useHTML&&(w.setTextPath((null===(r=t.getDataLabelPath)||void 0===r?void 0:r.call(t,w))||t.graphic,O),t.dataLabelPath&&!O.enabled&&(t.dataLabelPath=t.dataLabelPath.destroy())),w.added||w.add(a),l.alignDataLabel(t,w,e,void 0,A),w.isActive=!0,o[i]&&o[i]!==w&&o[i].destroy(),o[i]=w}});for(var r=o.length;r--;)o[r]&&o[r].isActive?o[r].isActive=!1:(null===(i=o[r])||void 0===i||i.destroy(),o.splice(r,1));t.dataLabel=o[0],t.dataLabels=o})),h(this,"afterDrawDataLabels")}function b(t,e,i,o,r,s){var n,a,h=this.chart,l=e.align,c=e.verticalAlign,d=t.box?0:t.padding||0,p=e.x,u=void 0===p?0:p,f=e.y,g=void 0===f?0:f;return(n=(i.x||0)+d)<0&&("right"===l&&u>=0?(e.align="left",e.inside=!0):u-=n,a=!0),(n=(i.x||0)+o.width-d)>h.plotWidth&&("left"===l&&u<=0?(e.align="right",e.inside=!0):u+=h.plotWidth-n,a=!0),(n=i.y+d)<0&&("bottom"===c&&g>=0?(e.verticalAlign="top",e.inside=!0):g-=n,a=!0),(n=(i.y||0)+o.height-d)>h.plotHeight&&("top"===c&&g<=0?(e.verticalAlign="bottom",e.inside=!0):g+=h.plotHeight-n,a=!0),a&&(e.x=u,e.y=g,t.placed=!s,t.align(e,void 0,r)),a}function M(t,e){var i,o=[];if(l(t)&&!l(e))o=t.map(function(t){return d(t,e)});else if(l(e)&&!l(t))o=e.map(function(e){return d(t,e)});else if(l(t)||l(e)){if(l(t)&&l(e))for(i=Math.max(t.length,e.length);i--;)o[i]=d(t[i],e[i])}else o=d(t,e);return o}function k(t,e,i,o,r){var s=this.chart,n=s.inverted,a=this.xAxis,h=a.reversed,l=((n?e.height:e.width)||0)/2,c=t.pointWidth,d=c?c/2:0;e.startXPos=n?r.x:h?-l-d:a.width-l+d,e.startYPos=n?h?this.yAxis.height-l+d:-l-d:r.y,o?"hidden"===e.visibility&&(e.show(),e.attr({opacity:0}).animate({opacity:1})):e.attr({opacity:1}).animate({opacity:0},void 0,e.hide),s.hasRendered&&(i&&e.attr({x:e.startXPos,y:e.startYPos}),e.placed=!0)}t.compose=function(t){if(i.pushUnique(e,t)){var r=t.prototype;r.initDataLabelsGroup=v,r.initDataLabels=x,r.alignDataLabel=m,r.drawDataLabels=y,r.justifyDataLabel=b,r.setDataLabelStartPos=k,r.hasDataLabels=o}}}(o||(o={})),o}),i(e,"Series/Column/ColumnDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=e.series,s=i.merge,n=i.pick;return function(e){var o=[];function a(t,e,i,o,a){var h=this.chart.inverted,l=t.series,c=(l.xAxis?l.xAxis.len:this.chart.plotSizeX)||0,d=(l.yAxis?l.yAxis.len:this.chart.plotSizeY)||0,p=t.dlBox||t.shapeArgs,u=n(t.below,t.plotY>n(this.translatedThreshold,d)),f=n(i.inside,!!this.options.stacking);if(p){if(o=s(p),!("allow"===i.overflow&&!1===i.crop)){o.y<0&&(o.height+=o.y,o.y=0);var g=o.y+o.height-d;g>0&&g {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}}}),i(e,"Series/Scatter/ScatterSeries.js",[e["Series/Scatter/ScatterSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=e.seriesTypes,n=s.column,a=s.line,h=i.addEvent,l=i.extend,c=i.merge,d=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.data=void 0,t.options=void 0,t.points=void 0,t}return r(i,e),i.prototype.applyJitter=function(){var t=this,e=this.options.jitter,i=this.points.length;e&&this.points.forEach(function(o,r){["x","y"].forEach(function(s,n){var a,h,l,c,d,p="plot"+s.toUpperCase();e[s]&&!o.isNull&&(h=t[s+"Axis"],d=e[s]*h.transA,h&&!h.isLog)&&(l=Math.max(0,o[p]-d),c=Math.min(h.len,o[p]+d),o[p]=l+(c-l)*((a=1e4*Math.sin(r+n*i))-Math.floor(a)),"x"===s&&(o.clientX=o.plotX))})})},i.prototype.drawGraph=function(){this.options.lineWidth?e.prototype.drawGraph.call(this):this.graph&&(this.graph=this.graph.destroy())},i.defaultOptions=c(a.defaultOptions,t),i}(a);return l(d.prototype,{drawTracker:n.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),h(d,"afterTranslate",function(){this.applyJitter()}),e.registerSeriesType("scatter",d),d}),i(e,"Series/CenteredUtilities.js",[e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r,s=t.deg2rad,n=i.fireEvent,a=i.isNumber,h=i.pick,l=i.relativeLength;return(o=r||(r={})).getCenter=function(){var t,i,o,r=this.options,s=this.chart,c=2*(r.slicedOffset||0),d=s.plotWidth-2*c,p=s.plotHeight-2*c,u=r.center,f=Math.min(d,p),g=r.thickness,m=r.size,v=r.innerSize||0;"string"==typeof m&&(m=parseFloat(m)),"string"==typeof v&&(v=parseFloat(v));var x=[h(u[0],"50%"),h(u[1],"50%"),h(m&&m<0?void 0:r.size,"100%"),h(v&&v<0?void 0:r.innerSize||0,"0%")];for(!s.angular||this instanceof e||(x[3]=0),i=0;i<4;++i)o=x[i],t=i<2||2===i&&/%$/.test(o),x[i]=l(o,[d,p,f,x[2]][i])+(t?c:0);return x[3]>x[2]&&(x[3]=x[2]),a(g)&&2*g0&&(x[3]=x[2]-2*g),n(this,"afterGetCenter",{positions:x}),x},o.getStartAndEndRadians=function(t,e){var i=a(t)?t:0,o=a(e)&&e>i&&e-i<360?e:i+360;return{start:s*(i+-90),end:s*(o+-90)}},r}),i(e,"Series/Pie/PiePoint.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,i=1,o=arguments.length;i=0},e.prototype.setVisible=function(t,e){var i=this,o=this.series,r=o.chart,s=o.options.ignoreHiddenPoint;e=d(e,s),t!==this.visible&&(this.visible=this.options.visible=t=void 0===t?!this.visible:t,o.options.data[o.data.indexOf(this)]=this.options,["graphic","dataLabel","connector"].forEach(function(e){i[e]&&i[e][t?"show":"hide"](t)}),this.legendItem&&r.legend.colorizeItem(this,t),t||"hover"!==this.state||this.setState(""),s&&(o.isDirty=!0),e&&r.redraw())},e.prototype.slice=function(t,e,i){var o=this.series;n(i,o.chart),e=d(e,!0),this.sliced=this.options.sliced=t=h(t)?t:!this.sliced,o.options.data[o.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())},e}(e);return l(u.prototype,{connectorShapes:{fixedOffset:function(t,e,i){var o=e.breakAt,r=e.touchingSliceAt,s=i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*o.x-r.x,2*o.y-r.y,o.x,o.y]:["L",o.x,o.y];return[["M",t.x,t.y],s,["L",r.x,r.y]]},straight:function(t,e){var i=e.touchingSliceAt;return[["M",t.x,t.y],["L",i.x,i.y]]},crookedLine:function(t,e,i){var o=e.breakAt,r=e.touchingSliceAt,s=this.series,n=s.center,a=n[0],h=n[1],l=n[2]/2,c=s.chart,d=c.plotLeft,u=c.plotWidth,f="left"===t.alignment,g=t.x,m=t.y,v=o.x;if(i.crookDistance){var x=p(i.crookDistance,1);v=f?a+l+(u+d-a-l)*(1-x):d+(a-l)*x}else v=a+(h-m)*Math.tan((this.angle||0)-Math.PI/2);var y=[["M",g,m]];return(f?v<=g&&v>=o.x:v>=g&&v<=o.x)&&y.push(["L",v,m]),y.push(["L",o.x,o.y],["L",r.x,r.y]),y}}}),u}),i(e,"Series/Pie/PieSeriesDefaults.js",[],function(){return{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}}),i(e,"Series/Pie/PieSeries.js",[e["Series/CenteredUtilities.js"],e["Series/Column/ColumnSeries.js"],e["Core/Globals.js"],e["Series/Pie/PiePoint.js"],e["Series/Pie/PieSeriesDefaults.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n,a,h){var l,c=this&&this.__extends||(l=function(t,e){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),d=t.getStartAndEndRadians,p=i.noop,u=h.clamp,f=h.extend,g=h.fireEvent,m=h.merge,v=h.pick;h.relativeLength,h.splat;var x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.center=void 0,e.data=void 0,e.options=void 0,e.points=void 0,e}return c(e,t),e.prototype.animate=function(t){var e=this,i=e.points,o=e.startAngleRad;t||i.forEach(function(t){var i=t.graphic,r=t.shapeArgs;i&&r&&(i.attr({r:v(t.startR,e.center&&e.center[3]/2),start:o,end:o}),i.animate({r:r.r,start:r.start,end:r.end},e.options.animation))})},e.prototype.drawEmpty=function(){var t,e,i=this.startAngleRad,o=this.endAngleRad,r=this.options;0===this.total&&this.center?(t=this.center[0],e=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(t,e,this.center[1]/2,0,i,o).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:a.arc(t,e,this.center[2]/2,0,{start:i,end:o,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":r.borderWidth,fill:r.fillColor||"none",stroke:r.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())},e.prototype.drawPoints=function(){var t=this.chart.renderer;this.points.forEach(function(e){e.graphic&&e.hasNewShapeType()&&(e.graphic=e.graphic.destroy()),e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)})},e.prototype.generatePoints=function(){t.prototype.generatePoints.call(this),this.updateTotals()},e.prototype.getX=function(t,e,i,o){var r=this.center,s=this.radii?this.radii[i.index]||0:r[2]/2,n=o.dataLabelPosition,a=(null==n?void 0:n.distance)||0,h=Math.asin(u((t-r[1])/(s+a),-1,1));return r[0]+(e?-1:1)*(Math.cos(h)*(s+a))+(a>0?(e?-1:1)*(o.padding||0):0)},e.prototype.hasData=function(){return!!this.processedXData.length},e.prototype.redrawPoints=function(){var t,e,i,o,r=this,s=r.chart;this.drawEmpty(),r.group&&!s.styledMode&&r.group.shadow(r.options.shadow),r.points.forEach(function(n){var a={};e=n.graphic,!n.isNull&&e?(o=n.shapeArgs,t=n.getTranslate(),s.styledMode||(i=r.pointAttribs(n,n.selected&&"select")),n.delayedRendering?(e.setRadialReference(r.center).attr(o).attr(t),s.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}),n.delayedRendering=!1):(e.setRadialReference(r.center),s.styledMode||m(!0,a,i),m(!0,a,o,t),e.animate(a)),e.attr({visibility:n.visible?"inherit":"hidden"}),e.addClass(n.getClassName(),!0)):e&&(n.graphic=e.destroy())})},e.prototype.sortByAngle=function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},e.prototype.translate=function(t){g(this,"translate"),this.generatePoints();var e,i,o,r,s,n,a,h=this.options,l=h.slicedOffset,c=d(h.startAngle,h.endAngle),p=this.startAngleRad=c.start,u=(this.endAngleRad=c.end)-p,f=this.points,m=h.ignoreHiddenPoint,v=f.length,x=0;for(t||(this.center=t=this.getCenter()),n=0;n1.5*Math.PI?o-=2*Math.PI:o<-Math.PI/2&&(o+=2*Math.PI),a.slicedTranslation={translateX:Math.round(Math.cos(o)*l),translateY:Math.round(Math.sin(o)*l)},r=Math.cos(o)*t[2]/2,s=Math.sin(o)*t[2]/2,a.tooltipPos=[t[0]+.7*r,t[1]+.7*s],a.half=o<-Math.PI/2||o>Math.PI/2?1:0,a.angle=o}g(this,"afterTranslate")},e.prototype.updateTotals=function(){var t,e,i=this.points,o=i.length,r=this.options.ignoreHiddenPoint,s=0;for(t=0;t0&&(e.visible||!r)?e.y/s*100:0,e.total=s},e.defaultOptions=m(s.defaultOptions,r),e}(s);return f(x.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:e.prototype.drawTracker,getCenter:t.getCenter,getSymbol:p,isCartesian:!1,noSharedTooltip:!0,pointAttribs:e.prototype.pointAttribs,pointClass:o,requireSorting:!1,searchPoint:p,trackerGroups:["group","dataLabelsGroup"]}),n.registerSeriesType("pie",x),x}),i(e,"Series/Pie/PieDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s,n=e.noop,a=i.distribute,h=o.series,l=r.arrayMax,c=r.clamp,d=r.defined,p=r.pick,u=r.relativeLength;return function(e){var i=[],o={radialDistributionY:function(t,e){var i;return((null===(i=e.dataLabelPosition)||void 0===i?void 0:i.top)||0)+t.distributeBox.pos},radialDistributionX:function(t,e,i,o,r){var s=r.dataLabelPosition;return t.getX(i<((null==s?void 0:s.top)||0)+2||i>((null==s?void 0:s.bottom)||0)-2?o:i,e.half,e,r)},justify:function(t,e,i,o){var r;return o[0]+(t.half?-1:1)*(i+((null===(r=e.dataLabelPosition)||void 0===r?void 0:r.distance)||0))},alignToPlotEdges:function(t,e,i,o){var r=t.getBBox().width;return e?r+o:i-r-o},alignToConnectors:function(t,e,i,o){var r,s=0;return t.forEach(function(t){(r=t.dataLabel.getBBox().width)>s&&(s=r)}),e?s+o:i-s-o}};function s(t,e){var i=this.center,o=this.options,r=i[2]/2,s=t.angle||0,n=Math.cos(s),a=Math.sin(s),h=i[0]+n*r,l=i[1]+a*r,c=Math.min((o.slicedOffset||0)+(o.borderWidth||0),e/5);return{natural:{x:h+n*e,y:l+a*e},computed:{},alignment:e<0?"center":t.half?"right":"left",connectorPosition:{breakAt:{x:h+n*c,y:l+a*c},touchingSliceAt:{x:h,y:l}},distance:e}}function f(){var t,e,i,o,r=this,s=this,n=s.points,c=s.chart,f=c.plotWidth,g=c.plotHeight,m=c.plotLeft,v=Math.round(c.chartWidth/3),x=s.center,y=x[2]/2,b=x[1],M=[[],[]],k=[0,0,0,0],S=s.dataLabelPositioners,C=0;s.visible&&(null===(t=s.hasDataLabels)||void 0===t?void 0:t.call(s))&&(n.forEach(function(t){(t.dataLabels||[]).forEach(function(t){t.shortened&&(t.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.shortened=!1)})}),h.prototype.drawDataLabels.apply(s),n.forEach(function(t){(t.dataLabels||[]).forEach(function(e,i){var o,s=x[2]/2,n=e.options,a=u((null==n?void 0:n.distance)||0,s);0===i&&M[t.half].push(t),!d(null===(o=null==n?void 0:n.style)||void 0===o?void 0:o.width)&&e.getBBox().width>v&&(e.css({width:Math.round(.7*v)+"px"}),e.shortened=!0),e.dataLabelPosition=r.getDataLabelPosition(t,a),C=Math.max(C,a)})}),M.forEach(function(t,e){var r,n,h,l=t.length,u=[],v=0;l&&(s.sortByAngle(t,e-.5),C>0&&(r=Math.max(0,b-y-C),n=Math.min(b+y+C,c.plotHeight),t.forEach(function(t){(t.dataLabels||[]).forEach(function(e,i){var o,r=e.dataLabelPosition;r&&r.distance>0&&(r.top=Math.max(0,b-y-r.distance),r.bottom=Math.min(b+y+r.distance,c.plotHeight),v=e.getBBox().height||21,t.distributeBox={target:((null===(o=e.dataLabelPosition)||void 0===o?void 0:o.natural.y)||0)-r.top+v/2,size:v,rank:t.y},u.push(t.distributeBox))})}),a(u,h=n+v-r,h/5)),t.forEach(function(r){(r.dataLabels||[]).forEach(function(n){var a=n.options||{},h=r.distributeBox,l=n.dataLabelPosition,c=(null==l?void 0:l.natural.y)||0,v=a.connectorPadding||0,b=0,M=c,C="inherit";if(l){if(u&&d(h)&&l.distance>0&&(void 0===h.pos?C="hidden":(o=h.size,M=S.radialDistributionY(r,n))),a.justify)b=S.justify(r,n,y,x);else switch(a.alignTo){case"connectors":b=S.alignToConnectors(t,e,f,m);break;case"plotEdges":b=S.alignToPlotEdges(n,e,f,m);break;default:b=S.radialDistributionX(s,r,M,c,n)}if(l.attribs={visibility:C,align:l.alignment},l.posAttribs={x:b+(a.x||0)+(({left:v,right:-v})[l.alignment]||0),y:M+(a.y||0)-n.getBBox().height/2},l.computed.x=b,l.computed.y=M,p(a.crop,!0)){i=n.getBBox().width;var w=void 0;b-if-v&&0===e&&(w=Math.round(b+i-f+v),k[1]=Math.max(w,k[1])),M-o/2<0?k[0]=Math.max(Math.round(-M+o/2),k[0]):M+o/2>g&&(k[2]=Math.max(Math.round(M+o/2-g),k[2])),l.sideOverflow=w}}})}))}),(0===l(k)||this.verifyDataLabelOverflow(k))&&(this.placeDataLabels(),this.points.forEach(function(t){(t.dataLabels||[]).forEach(function(i){var o,r=i.options||{},n=r.connectorColor,a=r.connectorWidth,h=void 0===a?1:a,l=i.dataLabelPosition;if(h){var d=void 0;e=i.connector,l&&l.distance>0?(d=!e,e||(i.connector=e=c.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+t.colorIndex+(t.className?" "+t.className:"")).add(s.dataLabelsGroup)),c.styledMode||e.attr({"stroke-width":h,stroke:n||t.color||"#666666"}),e[d?"attr":"animate"]({d:t.getConnectorPath(i)}),e.attr({visibility:null===(o=l.attribs)||void 0===o?void 0:o.visibility})):e&&(i.connector=e.destroy())}})})))}function g(){this.points.forEach(function(t){(t.dataLabels||[]).forEach(function(t){var e,i=t.dataLabelPosition;i?(i.sideOverflow&&(t.css({width:Math.max(t.getBBox().width-i.sideOverflow,0)+"px",textOverflow:((null===(e=t.options)||void 0===e?void 0:e.style)||{}).textOverflow||"ellipsis"}),t.shortened=!0),t.attr(i.attribs),t[t.moved?"animate":"attr"](i.posAttribs),t.moved=!0):t&&t.attr({y:-9999})}),delete t.distributeBox},this)}function m(t){var e=this.center,i=this.options,o=i.center,r=i.minSize||80,s=r,n=null!==i.size;return!n&&(null!==o[0]?s=Math.max(e[2]-Math.max(t[1],t[3]),r):(s=Math.max(e[2]-t[1]-t[3],r),e[0]+=(t[3]-t[1])/2),null!==o[1]?s=c(s,r,e[2]-Math.max(t[0],t[2])):(s=c(s,r,e[2]-t[0]-t[2]),e[1]+=(t[0]-t[2])/2),s=n.x+n.width||a.x+a.width<=n.x||a.y>=n.y+n.height||a.y+a.height<=n.y)&&((r.labelrank0)?(o.oldOpacity=o.opacity,o.newOpacity=1,l(o,e)):i.push(o)})},r=0;r1?v:m);return s}function v(){var t,e;if(this.options.borderRadius&&!(this.chart.is3d&&this.chart.is3d()))for(var i=this.options,o=this.yAxis,s="percent"===i.stacking,n=null===(e=null===(t=r.plotOptions)||void 0===t?void 0:t[this.type])||void 0===e?void 0:e.borderRadius,l=x(i.borderRadius,h(n)?n:{}),c=o.options.reversed,p=0,u=this.points;pthis.borderWidth&&(P="all"),P||(P="end");var O=Math.min(d(l.radius,v),v/2,"all"===P?b/2:1/0)||0;"end"===P&&(T&&(k-=O),S+=O),a(g,{brBoxHeight:S,brBoxY:k,r:O})}}}function x(t,e){return h(t)||(t={radius:t||0}),l(u,e,t)}function y(){for(var t=x(this.options.borderRadius),e=0,i=this.points;e-.1?0:h,v=f-h>-.1?0:h,x=Math.max(m&&u,0),y=Math.max(v&&f,0),b=[t+m,e],M=[t+i-m,e],k=[t+i,e+m],S=[t+i,e+r-v],C=[t+i-v,e+r],w=[t+v,e+r],A=[t,e+r-v],T=[t,e+m],P=function(t,e){return Math.sqrt(Math.pow(t,2)-Math.pow(e,2))};if(x){var O=P(m,m-x);b[0]-=O,M[0]+=O,k[1]=T[1]=e+m-x}if(r=n(i.minWidth,0)&&this.chartHeight>=n(i.minHeight,0)}).call(this)&&e.push(t._id)}function c(t,e){var o,n=this,h=this.options.responsive,l=this.currentResponsive,c=[];!e&&h&&h.rules&&h.rules.forEach(function(t){void 0===t._id&&(t._id=a()),n.matchResponsiveRule(t,c)},this);var d=s.apply(void 0,c.map(function(t){return r((h||{}).rules||[],function(e){return e._id===t})}).map(function(t){return t&&t.chartOptions}));d.isResponsiveOptions=!0,c=c.toString()||void 0;var p=l&&l.ruleIds;c!==p&&(l&&this.update(l.undoOptions,t,!0),c?((o=i(d,this.options,!0,this.collectionsWithUpdate)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:c,mergedOptions:d,undoOptions:o},this.update(d,t,!0)):this.currentResponsive=void 0)}e.compose=function(e){return t.pushUnique(h,e)&&o(e.prototype,{matchResponsiveRule:l,setResponsive:c}),e}}(e||(e={})),e}),i(e,"masters/highcharts.src.js",[e["Core/Globals.js"],e["Core/Utilities.js"],e["Core/Defaults.js"],e["Core/Animation/Fx.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Renderer/HTML/AST.js"],e["Core/Templating.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Renderer/HTML/HTMLElement.js"],e["Core/Renderer/HTML/HTMLRenderer.js"],e["Core/Axis/Axis.js"],e["Core/Axis/DateTimeAxis.js"],e["Core/Axis/LogarithmicAxis.js"],e["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],e["Core/Axis/Tick.js"],e["Core/Tooltip.js"],e["Core/Series/Point.js"],e["Core/Pointer.js"],e["Core/Legend/Legend.js"],e["Core/Chart/Chart.js"],e["Core/Axis/Stacking/StackingAxis.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Column/ColumnSeries.js"],e["Series/Column/ColumnDataLabel.js"],e["Series/Pie/PieSeries.js"],e["Series/Pie/PieDataLabel.js"],e["Core/Series/DataLabel.js"],e["Extensions/OverlappingDataLabels.js"],e["Extensions/BorderRadius.js"],e["Core/Responsive.js"],e["Core/Color/Color.js"],e["Core/Time.js"]],function(t,e,i,o,r,s,n,a,h,l,c,d,p,u,f,g,m,v,x,y,b,M,k,S,C,w,A,T,P,O,L,E,D,B,j,I){return t.animate=r.animate,t.animObject=r.animObject,t.getDeferredAnimation=r.getDeferredAnimation,t.setAnimation=r.setAnimation,t.stop=r.stop,t.timers=o.timers,t.AST=s,t.Axis=p,t.Chart=M,t.chart=M.chart,t.Fx=o,t.Legend=b,t.PlotLineOrBand=g,t.Point=x,t.Pointer=y,t.Series=C,t.StackItem=S,t.SVGElement=h,t.SVGRenderer=l,t.Templating=n,t.Tick=m,t.Time=I,t.Tooltip=v,t.Color=j,t.color=j.parse,d.compose(l),c.compose(h),y.compose(M),b.compose(M),t.defaultOptions=i.defaultOptions,t.getOptions=i.getOptions,t.time=i.defaultTime,t.setOptions=i.setOptions,t.dateFormat=n.dateFormat,t.format=n.format,t.numberFormat=n.numberFormat,e.extend(t,e),t.distribute=a.distribute,t.seriesType=w.seriesType,T.compose(A),D.compose(C,P,h,l),L.compose(C),u.compose(p),f.compose(p),E.compose(M),O.compose(P),g.compose(p),B.compose(M),k.compose(p,M,C),v.compose(y),t}),i(e,"Gantt/Connection.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){var i=e.defined,o=e.error,r=e.merge,s=e.objectEach,n=t.deg2rad,a=Math.max,h=Math.min;return function(){function t(t,e,i){this.chart=void 0,this.fromPoint=void 0,this.graphics=void 0,this.pathfinder=void 0,this.toPoint=void 0,this.init(t,e,i)}return t.prototype.init=function(t,e,i){this.fromPoint=t,this.toPoint=e,this.options=i,this.chart=t.series.chart,this.pathfinder=this.chart.pathfinder},t.prototype.renderPath=function(t,e,i){var o=this.chart,r=o.styledMode,s=o.pathfinder,n=!o.options.chart.forExport&&!1!==i,a={},h=this.graphics&&this.graphics.path;s.group||(s.group=o.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(o.seriesGroup)),s.group.translate(o.plotLeft,o.plotTop),h&&h.renderer||(h=o.renderer.path().add(s.group),r||h.attr({opacity:0})),h.attr(e),a.d=t,r||(a.opacity=1),h[n?"animate":"attr"](a,i),this.graphics=this.graphics||{},this.graphics.path=h},t.prototype.addMarker=function(t,e,i){var o,r,s,a,h,l,c,d,p=this.fromPoint.series.chart,u=p.pathfinder,f=p.renderer,g="start"===t?this.fromPoint:this.toPoint,m=g.getPathfinderAnchorPoint(e);e.enabled&&((d="start"===t?i[1]:i[i.length-2])&&"M"===d[0]||"L"===d[0])&&(c={x:d[1],y:d[2]},r=g.getRadiansToVector(c,m),o=g.getMarkerVector(r,e.radius,m),s=-r/n,e.width&&e.height?(h=e.width,l=e.height):h=l=2*e.radius,this.graphics=this.graphics||{},a={x:o.x-h/2,y:o.y-l/2,width:h,height:l,rotation:s,rotationOriginX:o.x,rotationOriginY:o.y},this.graphics[t]?this.graphics[t].animate(a):(this.graphics[t]=f.symbol(e.symbol).addClass("highcharts-point-connecting-path-"+t+"-marker highcharts-color-"+this.fromPoint.colorIndex).attr(a).add(u.group),f.styledMode||this.graphics[t].attr({fill:e.color||this.fromPoint.color,stroke:e.lineColor,"stroke-width":e.lineWidth,opacity:0}).animate({opacity:1},g.series.options.animation)))},t.prototype.getPath=function(t){var e=this.pathfinder,i=this.chart,s=e.algorithms[t.type],n=e.chartObstacles;return"function"!=typeof s?(o('"'+t.type+'" is not a Pathfinder algorithm.'),{path:[],obstacles:[]}):(s.requiresObstacles&&!n&&(n=e.chartObstacles=e.getChartObstacles(t),i.options.connectors.algorithmMargin=t.algorithmMargin,e.chartObstacleMetrics=e.getObstacleMetrics(n)),s(this.fromPoint.getPathfinderAnchorPoint(t.startMarker),this.toPoint.getPathfinderAnchorPoint(t.endMarker),r({chartObstacles:n,lineObstacles:e.lineObstacles||[],obstacleMetrics:e.chartObstacleMetrics,hardBounds:{xMin:0,xMax:i.plotWidth,yMin:0,yMax:i.plotHeight},obstacleOptions:{margin:t.algorithmMargin},startDirectionX:e.getAlgorithmStartDirection(t.startMarker)},t)))},t.prototype.render=function(){var t=this.fromPoint,e=t.series,o=e.chart,s=o.pathfinder,n={},l=r(o.options.connectors,e.options.connectors,t.options.connectors,this.options);!o.styledMode&&(n.stroke=l.lineColor||t.color,n["stroke-width"]=l.lineWidth,l.dashStyle&&(n.dashstyle=l.dashStyle)),n.class="highcharts-point-connecting-path highcharts-color-"+t.colorIndex,i((l=r(n,l)).marker.radius)||(l.marker.radius=h(a(Math.ceil((l.algorithmMargin||8)/2)-1,1),5));var c=this.getPath(l),d=c.path;c.obstacles&&(s.lineObstacles=s.lineObstacles||[],s.lineObstacles=s.lineObstacles.concat(c.obstacles)),this.renderPath(d,n,e.options.animation),this.addMarker("start",r(l.marker,l.startMarker),d),this.addMarker("end",r(l.marker,l.endMarker),d)},t.prototype.destroy=function(){this.graphics&&(s(this.graphics,function(t){t.destroy()}),delete this.graphics)},t}()}),i(e,"Core/Axis/NavigatorAxisComposition.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){var i=t.isTouchDevice,o=e.addEvent,r=e.correctFloat,s=e.defined,n=e.isNumber,a=e.pick,h=[];function l(){this.navigatorAxis||(this.navigatorAxis=new d(this))}function c(t){var e=this.chart,o=e.options,r=o.navigator,n=this.navigatorAxis,a=e.zooming.pinchType,h=o.rangeSelector,l=e.zooming.type;if(this.isXAxis&&(r&&r.enabled||h&&h.enabled)){if("y"===l)t.zoomed=!1;else if((!i&&"xy"===l||i&&"xy"===a)&&this.options.range){var c=n.previousZoom;s(t.newMin)?n.previousZoom=[this.min,this.max]:c&&(t.newMin=c[0],t.newMax=c[1],n.previousZoom=void 0)}}void 0!==t.zoomed&&t.preventDefault()}var d=function(){function t(t){this.axis=t}return t.compose=function(t){e.pushUnique(h,t)&&(t.keepProps.push("navigatorAxis"),o(t,"init",l),o(t,"zoom",c))},t.prototype.destroy=function(){this.axis=void 0},t.prototype.toFixedRange=function(t,e,i,o){var h=this.axis,l=h.chart,c=a(i,h.translate(t,!0,!h.horiz)),d=a(o,h.translate(e,!0,!h.horiz)),p=l&&l.fixedRange,u=(h.pointRange||0)/2;return s(i)||(c=r(c+u)),s(o)||(d=r(d-u)),p&&h.dataMin&&h.dataMax&&(d>=h.dataMax&&(c=r(h.dataMax-p)),c<=h.dataMin&&(d=r(h.dataMin+p))),n(c)&&n(d)||(c=d=void 0),{min:c,max:d}},t}();return d}),i(e,"Stock/Navigator/NavigatorDefaults.js",[e["Core/Color/Color.js"],e["Core/Series/SeriesRegistry.js"]],function(t,e){var i=t.parse,o=e.seriesTypes;return{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:i("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:void 0===o.areaspline?"line":"areaspline",fillOpacity:.05,lineWidth:1,compare:null,sonification:{enabled:!1},dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#000000",fontSize:"0.7em",opacity:.6,textOutline:"2px contrast"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}}),i(e,"Stock/Navigator/NavigatorSymbols.js",[],function(){return{"navigator-handle":function(t,e,i,o,r){void 0===r&&(r={});var s=r.width?r.width/2:i,n=Math.round(s/3)+.5;return[["M",-s-1,.5],["L",s,.5],["L",s,(o=r.height||o)+.5],["L",-s-1,o+.5],["L",-s-1,.5],["M",-n,4],["L",-n,o-3],["M",n-1,4],["L",n-1,o-3]]}}}),i(e,"Stock/Navigator/NavigatorComposition.js",[e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Axis/NavigatorAxisComposition.js"],e["Stock/Navigator/NavigatorDefaults.js"],e["Stock/Navigator/NavigatorSymbols.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n){var a,h=t.defaultOptions,l=t.setOptions,c=e.isTouchDevice,d=s.getRendererType,p=n.addEvent,u=n.extend,f=n.merge,g=n.pick,m=[];function v(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function x(){var t,e,i,o,r=this.legend,s=this.navigator;if(s){e=r&&r.options,i=s.xAxis,o=s.yAxis;var n=s.scrollbarHeight,a=s.scrollButtonSize;this.inverted?(s.left=s.opposite?this.chartWidth-n-s.height:this.spacing[3]+n,s.top=this.plotTop+a):(s.left=g(i.left,this.plotLeft+a),s.top=s.navigatorOptions.top||this.chartHeight-s.height-n-((null===(t=this.scrollbar)||void 0===t?void 0:t.options.margin)||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(e&&"bottom"===e.verticalAlign&&"proximate"!==e.layout&&e.enabled&&!e.floating?r.legendHeight+g(e.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),i&&o&&(this.inverted?i.options.left=o.options.left=s.left:i.options.top=o.options.top=s.top,i.setAxisSize(),o.setAxisSize())}}function y(t){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new a(this),g(t.redraw,!0)&&this.redraw(t.animation))}function b(){var t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new a(this))}function M(){var t=this.options,e=t.navigator,i=t.rangeSelector;if((e&&e.enabled||i&&i.enabled)&&(!c&&"x"===this.zooming.type||c&&"x"===this.zooming.pinchType))return!1}function k(t){var e=t.navigator;if(e&&t.xAxis[0]){var i=t.xAxis[0].getExtremes();e.render(i.min,i.max)}}function S(t){var e=t.options.navigator||{},i=t.options.scrollbar||{};!this.navigator&&!this.scroller&&(e.enabled||i.enabled)&&(f(!0,this.options.navigator,e),f(!0,this.options.scrollbar,i),delete t.options.navigator,delete t.options.scrollbar)}function C(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}return{compose:function(t,e,s,c){i.compose(t),a=s,n.pushUnique(m,e)&&(e.prototype.callbacks.push(k),p(e,"afterAddSeries",v),p(e,"afterSetChartSize",x),p(e,"afterUpdate",y),p(e,"beforeRender",b),p(e,"beforeShowResetZoom",M),p(e,"update",S)),n.pushUnique(m,c)&&p(c,"afterUpdate",C),n.pushUnique(m,d)&&u(d().prototype.symbols,r),n.pushUnique(m,l)&&u(h,{navigator:o})}}}),i(e,"Core/Axis/ScrollbarAxis.js",[e["Core/Utilities.js"]],function(t){var e,i=t.addEvent,o=t.defined,r=t.pick,s=t.pushUnique;return function(t){var e,n=[];function a(t){var e=r(t.options&&t.options.min,t.min),i=r(t.options&&t.options.max,t.max);return{axisMin:e,axisMax:i,scrollMin:o(t.dataMin)?Math.min(e,t.min,t.dataMin,r(t.threshold,1/0)):e,scrollMax:o(t.dataMax)?Math.max(i,t.max,t.dataMax,r(t.threshold,-1/0)):i}}function h(){var t=this.scrollbar,e=t&&!t.options.opposite,i=this.horiz?2:e?3:1;t&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[i]+=t.size+(t.options.margin||0))}function l(){var t=this;t.options&&t.options.scrollbar&&t.options.scrollbar.enabled&&(t.options.scrollbar.vertical=!t.horiz,t.options.startOnTick=t.options.endOnTick=!1,t.scrollbar=new e(t.chart.renderer,t.options.scrollbar,t.chart),i(t.scrollbar,"changed",function(e){var i,r,s=a(t),n=s.axisMin,h=s.axisMax,l=s.scrollMin,c=s.scrollMax-l;if(o(n)&&o(h)){if(t.horiz&&!t.reversed||!t.horiz&&t.reversed?(i=l+c*this.to,r=l+c*this.from):(i=l+c*(1-this.from),r=l+c*(1-this.to)),this.shouldUpdateExtremes(e.DOMType)){var d="mousemove"!==e.DOMType&&"touchmove"!==e.DOMType&&void 0;t.setExtremes(r,i,!0,d,e)}else this.setRange(this.from,this.to)}}))}function c(){var t,e,i,r=a(this),s=r.scrollMin,n=r.scrollMax,h=this.scrollbar,l=this.axisTitleMargin+(this.titleOffset||0),c=this.chart.scrollbarsOffsets,d=this.options.margin||0;if(h&&c){if(this.horiz)this.opposite||(c[1]+=l),h.position(this.left,this.top+this.height+2+c[1]-(this.opposite?d:0),this.width,this.height),this.opposite||(c[1]+=d),t=1;else{this.opposite&&(c[0]+=l);var p=void 0;p=h.options.opposite?this.left+this.width+2+c[0]-(this.opposite?0:d):this.opposite?0:d,h.position(p,this.top,this.width,this.height),this.opposite&&(c[0]+=d),t=0}c[t]+=h.size+(h.options.margin||0),isNaN(s)||isNaN(n)||!o(this.min)||!o(this.max)||this.min===this.max?h.setRange(0,1):(e=(this.min-s)/(n-s),i=(this.max-s)/(n-s),this.horiz&&!this.reversed||!this.horiz&&this.reversed?h.setRange(e,i):h.setRange(1-i,1-e))}}t.compose=function(t,o){s(n,o)&&(e=o),s(n,t)&&(i(t,"afterGetOffset",h),i(t,"afterInit",l),i(t,"afterRender",c))}}(e||(e={})),e}),i(e,"Stock/Scrollbar/ScrollbarDefaults.js",[e["Core/Globals.js"]],function(t){return t.isTouchDevice,{height:10,barBorderRadius:5,buttonBorderRadius:0,buttonsEnabled:!1,liveRedraw:void 0,margin:void 0,minWidth:6,opposite:!0,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:0,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"none",trackBackgroundColor:"rgba(255, 255, 255, 0.001)",trackBorderColor:"#cccccc",trackBorderRadius:5,trackBorderWidth:1}}),i(e,"Stock/Scrollbar/Scrollbar.js",[e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Axis/ScrollbarAxis.js"],e["Stock/Scrollbar/ScrollbarDefaults.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s=t.defaultOptions,n=r.addEvent,a=r.correctFloat,h=r.defined,l=r.destroyObjectProperties,c=r.fireEvent,d=r.merge,p=r.pick,u=r.removeEvent,f=function(){function t(t,e,i){this._events=[],this.chart=void 0,this.chartX=0,this.chartY=0,this.from=0,this.group=void 0,this.options=void 0,this.renderer=void 0,this.scrollbar=void 0,this.scrollbarButtons=[],this.scrollbarGroup=void 0,this.scrollbarLeft=0,this.scrollbarRifles=void 0,this.scrollbarStrokeWidth=1,this.scrollbarTop=0,this.size=0,this.to=0,this.track=void 0,this.trackBorderWidth=1,this.userOptions=void 0,this.x=0,this.y=0,this.init(t,e,i)}return t.compose=function(e){i.compose(e,t)},t.swapXY=function(t,e){return e&&t.forEach(function(t){for(var e,i=t.length,o=0;othis.calculatedWidth?e.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-i),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-i)}},t.prototype.destroy=function(){var t=this,e=t.chart.scroller;t.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(e){t[e]&&t[e].destroy&&(t[e]=t[e].destroy())}),e&&t===e.scrollbar&&(e.scrollbar=null,l(e.scrollbarButtons))},t.prototype.drawScrollbarButton=function(e){var i=this.renderer,o=this.scrollbarButtons,r=this.options,s=this.size,n=i.g().add(this.group);if(o.push(n),r.buttonsEnabled){var a=i.rect().addClass("highcharts-scrollbar-button").add(n);this.chart.styledMode||a.attr({stroke:r.buttonBorderColor,"stroke-width":r.buttonBorderWidth,fill:r.buttonBackgroundColor}),a.attr(a.crisp({x:-.5,y:-.5,width:s+1,height:s+1,r:r.buttonBorderRadius},a.strokeWidth()));var h=i.path(t.swapXY([["M",s/2+(e?-1:1),s/2-3],["L",s/2+(e?-1:1),s/2+3],["L",s/2+(e?2:-2),s/2]],r.vertical)).addClass("highcharts-scrollbar-arrow").add(o[e]);this.chart.styledMode||h.attr({fill:r.buttonArrowColor})}},t.prototype.init=function(t,e,i){this.scrollbarButtons=[],this.renderer=t,this.userOptions=e,this.options=d(o,s.scrollbar,e),this.options.margin=p(this.options.margin,10),this.chart=i,this.size=p(this.options.size,this.options.height),e.enabled&&(this.render(),this.addEvents())},t.prototype.mouseDownHandler=function(t){var e=this.chart.pointer.normalize(t),i=this.cursorToScrollbarPosition(e);this.chartX=i.chartX,this.chartY=i.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0},t.prototype.mouseMoveHandler=function(t){var e,i=this.chart.pointer.normalize(t),o=this.options.vertical?"chartY":"chartX",r=this.initPositions||[];this.grabbedCenter&&(!t.touches||0!==t.touches[0][o])&&(e=this.cursorToScrollbarPosition(i)[o]-this[o],this.hasDragged=!0,this.updatePosition(r[0]+e,r[1]+e),this.hasDragged&&c(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}))},t.prototype.mouseUpHandler=function(t){this.hasDragged&&c(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}),this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null},t.prototype.position=function(t,e,i,o){var r=this.options,s=r.buttonsEnabled,n=r.margin,a=void 0===n?0:n,h=r.vertical,l=this.rendered?"animate":"attr",c=o,d=0;this.group.show(),this.x=t,this.y=e+this.trackBorderWidth,this.width=i,this.height=o,this.xOffset=c,this.yOffset=d,h?(this.width=this.yOffset=i=d=this.size,this.xOffset=c=0,this.yOffset=d=s?this.size:0,this.barWidth=o-(s?2*i:0),this.x=t+=a):(this.height=o=this.size,this.xOffset=c=s?this.size:0,this.barWidth=i-(s?2*o:0),this.y=this.y+a),this.group[l]({translateX:t,translateY:this.y}),this.track[l]({width:i,height:o}),this.scrollbarButtons[1][l]({translateX:h?0:i-c,translateY:h?o-d:0})},t.prototype.removeEvents=function(){this._events.forEach(function(t){u.apply(null,t)}),this._events.length=0},t.prototype.render=function(){var e=this.renderer,i=this.options,o=this.size,r=this.chart.styledMode,s=e.g("scrollbar").attr({zIndex:i.zIndex}).hide().add();this.group=s,this.track=e.rect().addClass("highcharts-scrollbar-track").attr({r:i.trackBorderRadius||0,height:o,width:o}).add(s),r||this.track.attr({fill:i.trackBackgroundColor,stroke:i.trackBorderColor,"stroke-width":i.trackBorderWidth});var n=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-n%2/2,y:-n%2/2}),this.scrollbarGroup=e.g().add(s),this.scrollbar=e.rect().addClass("highcharts-scrollbar-thumb").attr({height:o-n,width:o-n,r:i.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=e.path(t.swapXY([["M",-3,o/4],["L",-3,2*o/3],["M",0,o/4],["L",0,2*o/3],["M",3,o/4],["L",3,2*o/3]],i.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),r||(this.scrollbar.attr({fill:i.barBackgroundColor,stroke:i.barBorderColor,"stroke-width":i.barBorderWidth}),this.scrollbarRifles.attr({stroke:i.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2),this.drawScrollbarButton(0),this.drawScrollbarButton(1)},t.prototype.setRange=function(t,e){var i,o,r=this.options,s=r.vertical,n=r.minWidth,l=this.barWidth,c=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(h(l)){var d=l*Math.min(e,1);i=Math.ceil(l*(t=Math.max(t,0))),this.calculatedWidth=o=a(d-i),o=1?this.group.hide():this.group.show()),this.rendered=!0}},t.prototype.shouldUpdateExtremes=function(t){return p(this.options.liveRedraw,e.svg&&!e.isTouchDevice&&!this.chart.boosted)||"mouseup"===t||"touchend"===t||!h(t)},t.prototype.trackClick=function(t){var e=this.chart.pointer.normalize(t),i=this.to-this.from,o=this.y+this.scrollbarTop,r=this.x+this.scrollbarLeft;this.options.vertical&&e.chartY>o||!this.options.vertical&&e.chartX>r?this.updatePosition(this.from+i,this.to+i):this.updatePosition(this.from-i,this.to-i),c(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})},t.prototype.update=function(t){this.destroy(),this.init(this.chart.renderer,d(!0,this.options,t),this.chart)},t.prototype.updatePosition=function(t,e){e>1&&(t=a(1-a(e-t)),e=1),t<0&&(e=a(e-t),t=0),this.from=t,this.to=e},t.defaultOptions=o,t}();return s.scrollbar=d(!0,f.defaultOptions,s.scrollbar),f}),i(e,"Stock/Navigator/Navigator.js",[e["Core/Axis/Axis.js"],e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Axis/NavigatorAxisComposition.js"],e["Stock/Navigator/NavigatorComposition.js"],e["Stock/Scrollbar/Scrollbar.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n){var a=e.defaultOptions,h=i.hasTouch,l=i.isTouchDevice,c=n.addEvent,d=n.clamp,p=n.correctFloat,u=n.defined,f=n.destroyObjectProperties,g=n.erase,m=n.extend,v=n.find,x=n.fireEvent,y=n.isArray,b=n.isNumber,M=n.merge,k=n.pick,S=n.removeEvent,C=n.splat;function w(t){for(var e=[],i=1;iS&&(this.grabbedLeft?i=c.toPixels(P-S-f,!0):this.grabbedRight&&(o=c.toPixels(T+S+f,!0))),this.zoomedMax=d(Math.max(i,o),0,A),this.zoomedMin=d(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(i,o),0,A),this.range=this.zoomedMax-this.zoomedMin,A=Math.round(this.zoomedMax);var L=Math.round(this.zoomedMin);m&&(this.navigatorGroup.attr({visibility:"inherit"}),h=v&&!this.hasDragged?"animate":"attr",this.drawMasks(L,A,y,h),this.drawOutline(L,A,y,h),this.navigatorOptions.handles.enabled&&(this.drawHandle(L,0,y,h),this.drawHandle(A,1,y,h))),this.scrollbar&&(y?(n=this.top-C,s=this.left-w+(m||!g.opposite?0:(g.titleOffset||0)+g.axisTitleMargin),w=a+2*C):(n=this.top+(m?this.height:-w),s=this.left-C),this.scrollbar.position(s,n,r,w),this.scrollbar.setRange(this.zoomedMin/(a||1),this.zoomedMax/(a||1))),this.rendered=!0,x(this,"afterRender")}},e.prototype.addMouseEvents=function(){var t,e,i=this,o=i.chart,r=o.container,s=[];i.mouseMoveHandler=t=function(t){i.onMouseMove(t)},i.mouseUpHandler=e=function(t){i.onMouseUp(t)},(s=i.getPartsEvents("mousedown")).push(c(o.renderTo,"mousemove",t),c(r.ownerDocument,"mouseup",e)),h&&(s.push(c(o.renderTo,"touchmove",t),c(r.ownerDocument,"touchend",e)),s.concat(i.getPartsEvents("touchstart"))),i.eventsToUnbind=s,i.series&&i.series[0]&&s.push(c(i.series[0].xAxis,"foundExtremes",function(){o.navigator.modifyNavigatorAxisExtremes()}))},e.prototype.getPartsEvents=function(t){var e=this,i=[];return["shades","handles"].forEach(function(o){e[o].forEach(function(r,s){i.push(c(r.element,t,function(t){e[o+"Mousedown"](t,s)}))})}),i},e.prototype.shadesMousedown=function(t,e){t=this.chart.pointer.normalize(t);var i,o,r,s,n=this.chart,a=this.xAxis,h=this.zoomedMin,l=this.size,c=this.range,d=this.left,p=t.chartX;n.inverted&&(p=t.chartY,d=this.top),1===e?(this.grabbedCenter=p,this.fixedWidth=c,this.dragOffset=p-h):(s=p-d-c/2,0===e?s=Math.max(0,s):2===e&&s+c>=l&&(s=l-c,this.reversedExtremes?(s-=c,o=this.getUnionExtremes().dataMin):i=this.getUnionExtremes().dataMax),s!==h&&(this.fixedWidth=c,u((r=a.navigatorAxis.toFixedRange(s,s+c,o,i)).min)&&n.xAxis[0].setExtremes(Math.min(r.min,r.max),Math.max(r.min,r.max),!0,null,{trigger:"navigator"})))},e.prototype.handlesMousedown=function(t,e){t=this.chart.pointer.normalize(t);var i=this.chart,o=i.xAxis[0],r=this.reversedExtremes;0===e?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=r?o.min:o.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=r?o.max:o.min),i.fixedRange=null},e.prototype.onMouseMove=function(t){var e,i=this,o=i.chart,r=i.navigatorSize,s=i.range,n=i.dragOffset,a=o.inverted,h=i.left;(!t.touches||0!==t.touches[0].pageX)&&(e=(t=o.pointer.normalize(t)).chartX,a&&(h=i.top,e=t.chartY),i.grabbedLeft?(i.hasDragged=!0,i.render(0,0,e-h,i.otherHandlePos)):i.grabbedRight?(i.hasDragged=!0,i.render(0,0,i.otherHandlePos,e-h)):i.grabbedCenter&&(i.hasDragged=!0,er+n-s&&(e=r+n-s),i.render(0,0,e-n,e-n+s)),i.hasDragged&&i.scrollbar&&k(i.scrollbar.options.liveRedraw,!l&&!this.chart.boosted)&&(t.DOMType=t.type,setTimeout(function(){i.onMouseUp(t)},0)))},e.prototype.onMouseUp=function(t){var e,i,o,r,s,n,a=this.chart,h=this.xAxis,l=this.scrollbar,c=t.DOMEvent||t,d=a.inverted,p=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!l||!l.hasDragged)||"scrollbar"===t.trigger)&&(o=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?r=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(s=this.fixedExtreme),this.zoomedMax===this.size&&(s=this.reversedExtremes?o.dataMin:o.dataMax),0===this.zoomedMin&&(r=this.reversedExtremes?o.dataMax:o.dataMin),u((n=h.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,r,s)).min)&&a.xAxis[0].setExtremes(Math.min(n.min,n.max),Math.max(n.min,n.max),!0,!this.hasDragged&&null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:c})),"mousemove"!==t.DOMType&&"touchmove"!==t.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null),this.navigatorEnabled&&b(this.zoomedMin)&&b(this.zoomedMax)&&(i=Math.round(this.zoomedMin),e=Math.round(this.zoomedMax),this.shades&&this.drawMasks(i,e,d,p),this.outline&&this.drawOutline(i,e,d,p),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(i,0,d,p),this.drawHandle(e,1,d,p)))},e.prototype.removeEvents=function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(t){t()}),this.eventsToUnbind=void 0),this.removeBaseSeriesEvents()},e.prototype.removeBaseSeriesEvents=function(){var t=this.baseSeries||[];this.navigatorEnabled&&t[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&t.forEach(function(t){S(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&S(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},e.prototype.init=function(e){var i=e.options,r=i.navigator||{},n=r.enabled,a=i.scrollbar||{},h=a.enabled,l=n&&r.height||0,d=h&&a.height||0,p=a.buttonsEnabled&&d||0;this.handles=[],this.shades=[],this.chart=e,this.setBaseSeries(),this.height=l,this.scrollbarHeight=d,this.scrollButtonSize=p,this.scrollbarEnabled=h,this.navigatorEnabled=n,this.navigatorOptions=r,this.scrollbarOptions=a,this.opposite=k(r.opposite,!!(!n&&e.inverted));var u=this,f=u.baseSeries,g=e.xAxis.length,m=e.yAxis.length,v=f&&f[0]&&f[0].xAxis||e.xAxis[0]||{options:{}};if(e.isDirtyBox=!0,u.navigatorEnabled?(u.xAxis=new t(e,M({breaks:v.options.breaks,ordinal:v.options.ordinal},r.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",type:"datetime",index:g,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},e.inverted?{offsets:[p,0,-p,0],width:l}:{offsets:[0,-p,0,p],height:l}),"xAxis"),u.yAxis=new t(e,M(r.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:m,isInternal:!0,reversed:k(r.yAxis&&r.yAxis.reversed,e.yAxis[0]&&e.yAxis[0].reversed,!1),zoomEnabled:!1},e.inverted?{width:l}:{height:l}),"yAxis"),f||r.series.data?u.updateNavigatorSeries(!1):0===e.series.length&&(u.unbindRedraw=c(e,"beforeRedraw",function(){e.series.length>0&&!u.series&&(u.setBaseSeries(),u.unbindRedraw())})),u.reversedExtremes=e.inverted&&!u.xAxis.reversed||!e.inverted&&u.xAxis.reversed,u.renderElements(),u.addMouseEvents()):(u.xAxis={chart:e,navigatorAxis:{fake:!0},translate:function(t,i){var o=e.xAxis[0],r=o.getExtremes(),s=o.len-2*p,n=w("min",o.options.min,r.dataMin),a=w("max",o.options.max,r.dataMax)-n;return i?t*a/s+n:s*(t-n)/a},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)}},u.xAxis.navigatorAxis.axis=u.xAxis,u.xAxis.navigatorAxis.toFixedRange=o.prototype.toFixedRange.bind(u.xAxis.navigatorAxis)),e.options.scrollbar.enabled){var x=M(e.options.scrollbar,{vertical:e.inverted});!b(x.margin)&&u.navigatorEnabled&&(x.margin=e.inverted?-3:3),e.scrollbar=u.scrollbar=new s(e.renderer,x,e),c(u.scrollbar,"changed",function(t){var e=u.size,i=e*this.to,o=e*this.from;u.hasDragged=u.scrollbar.hasDragged,u.render(0,0,o,i),this.shouldUpdateExtremes(t.DOMType)&&setTimeout(function(){u.onMouseUp(t)})})}u.addBaseSeriesEvents(),u.addChartEvents()},e.prototype.getUnionExtremes=function(t){var e,i=this.chart.xAxis[0],o=this.xAxis,r=o.options,s=i.options;return t&&null===i.dataMin||(e={dataMin:k(r&&r.min,w("min",s.min,i.dataMin,o.dataMin,o.min)),dataMax:k(r&&r.max,w("max",s.max,i.dataMax,o.dataMax,o.max))}),e},e.prototype.setBaseSeries=function(t,e){var i=this.chart,o=this.baseSeries=[];t=t||i.options&&i.options.navigator.baseSeries||(i.series.length?v(i.series,function(t){return!t.options.isInternal}).index:0),(i.series||[]).forEach(function(e,i){!e.options.isInternal&&(e.options.showInNavigator||(i===t||e.options.id===t)&&!1!==e.options.showInNavigator)&&o.push(e)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,e)},e.prototype.updateNavigatorSeries=function(t,e){var i,o,r,s=this,n=s.chart,h=s.baseSeries,l={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},c=s.series=(s.series||[]).filter(function(t){var e=t.baseSeries;return!(0>h.indexOf(e))||(e&&(S(e,"updatedData",s.updatedDataHandler),delete e.navigatorSeries),t.chart&&t.destroy(),!1)}),d=s.navigatorOptions.series;h&&h.length&&h.forEach(function(t){var p=t.navigatorSeries,u=m({color:t.color,visible:t.visible},y(d)?a.navigator.series:d);if(!p||!1!==s.navigatorOptions.adaptToUpdatedData){l.name="Navigator "+h.length,r=(i=t.options||{}).navigatorOptions||{},u.dataLabels=C(u.dataLabels),(o=M(i,l,u,r)).pointRange=k(u.pointRange,r.pointRange,a.plotOptions[o.type||"line"].pointRange);var f=r.data||u.data;s.hasNavigatorData=s.hasNavigatorData||!!f,o.data=f||i.data&&i.data.slice(0),p&&p.options?p.update(o,e):(t.navigatorSeries=n.initSeries(o),t.navigatorSeries.baseSeries=t,c.push(t.navigatorSeries))}}),(d.data&&!(h&&h.length)||y(d))&&(s.hasNavigatorData=!1,(d=C(d)).forEach(function(t,e){l.name="Navigator "+(c.length+1),(o=M(a.navigator.series,{color:n.series[e]&&!n.series[e].options.isInternal&&n.series[e].color||n.options.colors[e]||n.options.colors[0]},l,t)).data=t.data,o.data&&(s.hasNavigatorData=!0,c.push(n.initSeries(o)))})),t&&this.addBaseSeriesEvents()},e.prototype.addBaseSeriesEvents=function(){var t=this,e=this,i=e.baseSeries||[];i[0]&&i[0].xAxis&&i[0].eventsToUnbind.push(c(i[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),i.forEach(function(i){i.eventsToUnbind.push(c(i,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),i.eventsToUnbind.push(c(i,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),!1!==t.navigatorOptions.adaptToUpdatedData&&i.xAxis&&i.eventsToUnbind.push(c(i,"updatedData",t.updatedDataHandler)),i.eventsToUnbind.push(c(i,"remove",function(){this.navigatorSeries&&(g(e.series,this.navigatorSeries),u(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})},e.prototype.getBaseSeriesMin=function(t){return this.baseSeries.reduce(function(t,e){return Math.min(t,e.xData&&e.xData.length?e.xData[0]:t)},t)},e.prototype.modifyNavigatorAxisExtremes=function(){var t=this.xAxis;if(void 0!==t.getExtremes){var e=this.getUnionExtremes(!0);e&&(e.dataMin!==t.min||e.dataMax!==t.max)&&(t.min=e.dataMin,t.max=e.dataMax)}},e.prototype.modifyBaseAxisExtremes=function(){var t,e,i=this.chart.navigator,o=this.getExtremes(),r=o.min,s=o.max,n=o.dataMin,a=o.dataMax,h=s-r,l=i.stickToMin,c=i.stickToMax,d=k(this.options.overscroll,0),p=i.series&&i.series[0],u=!!this.setExtremes;!(this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger)&&(l&&(t=(e=n)+h),c&&(t=a+d,l||(e=Math.max(n,t-h,i.getBaseSeriesMin(p&&p.xData?p.xData[0]:-Number.MAX_VALUE)))),u&&(l||c)&&b(e)&&(this.min=this.userMin=e,this.max=this.userMax=t)),i.stickToMin=i.stickToMax=null},e.prototype.updatedDataHandler=function(){var t=this.chart.navigator,e=this.navigatorSeries,i=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size);t.stickToMax=k(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,i),t.stickToMin=t.shouldStickToMin(this,t),e&&!t.hasNavigatorData&&(e.options.pointStart=this.xData[0],e.setData(this.options.data,!1,null,!1))},e.prototype.shouldStickToMin=function(t,e){var i=e.getBaseSeriesMin(t.xData[0]),o=t.xAxis,r=o.max,s=o.min,n=o.options.range;return!!(b(r)&&b(s))&&(n&&r-i>0?r-i>1].xMin)>0)n=o+1;else{if(!(r<0))return o;a=o-1}return n>0?n-1:0}function a(t,e){for(var i,o=n(t,e.x+1)+1;o--;)if(t[o].xMax>=e.x&&(i=t[o],e.x<=i.xMax&&e.x>=i.xMin&&e.y<=i.yMax&&e.y>=i.yMin))return o;return -1}function h(t){var e=[];if(t.length){e.push(["M",t[0].start.x,t[0].start.y]);for(var i=0;is(o.y-e.y))?"x":"y";function x(t,e,i,o,r){var s={x:t.x,y:t.y};return s[e]=i[o||e]+(r||0),s}function y(t,e,i){var o=s(e[i]-t[i+"Min"])>s(e[i]-t[i+"Max"]);return x(e,i,t,i+(o?"Max":"Min"),o?1:-1)}m>-1?(n={start:c=y(f[m],o,v),end:o},p=c):p=o,g>-1&&(c=y(l=f[g],e,v),u.push({start:e,end:c}),c[v]>=e[v]==c[v]>=p[v]&&(d=e[v="y"===v?"x":"y"]s(e.y-t.y)),y=x?"x":"y",b=[],M=c.obstacleMetrics,k=o(t.x,e.x)-M.maxWidth-10,S=r(t.x,e.x)+M.maxWidth+10,C=o(t.y,e.y)-M.maxHeight-10,w=r(t.y,e.y)+M.maxHeight+10,A=!1,T=c.chartObstacles,P=n(T,S),O=n(T,k);function L(t,e,i){var r,s,a,h,l=t.x0&&T[c].xMin<=s.x||l<0&&T[c].xMax>=r.x);){if(T[c].xMin<=s.x&&T[c].xMax>=r.x&&T[c].yMin<=a.y&&T[c].yMax>=h.y){if(i)return{y:t.y,x:t.x=n[h+"Max"],p=t[h+"Min"]<=n[h+"Min"],u=t[h+"Max"]>=a[h+"Max"],f=t[h+"Min"]<=a[h+"Min"],g=s(t[h+"Min"]-e[h]),m=s(t[h+"Max"]-e[h]),v=10>s(g-m)?e[h]-1&&(d=T[P],p=e,u=o(d.xMax-p.x,p.x-d.xMin)-1;)m=e[y]-t[y]<0,(v={x:e.x,y:e.y})[y]=T[P][m?y+"Max":y+"Min"]+(m?1:-1),b.push({end:e,start:v}),e=v;return{path:h(g=(g=function t(e,i,s){if(e.x===i.x&&e.y===i.y)return[];var n,h,d,p,u,f,g,m=s?"x":"y",v=c.obstacleOptions.margin,x={soft:{xMin:k,xMax:S,yMin:C,yMax:w},hard:c.hardBounds};return(u=a(T,e))>-1?(p=E(u=T[u],e,i,s,x),l(u,c.hardBounds),g=s?{y:e.y,x:u[p?"xMax":"xMin"]+(p?1:-1)}:{x:e.x,y:u[p?"yMax":"yMin"]+(p?1:-1)},(f=a(T,g))>-1&&(l(f=T[f],c.hardBounds),g[m]=p?r(u[m+"Max"]-v+1,(f[m+"Min"]+u[m+"Max"])/2):o(u[m+"Min"]+v-1,(f[m+"Max"]+u[m+"Min"])/2),e.x===g.x&&e.y===g.y?(A&&(g[m]=p?r(u[m+"Max"],f[m+"Max"])+1:o(u[m+"Min"],f[m+"Min"])-1),A=!A):A=!1),h=[{start:e,end:g}]):(n=L(e,{x:s?i.x:e.x,y:s?e.y:i.y},s),h=[{start:e,end:{x:n.x,y:n.y}}],n[s?"x":"y"]!==i[s?"x":"y"]&&(p=E(n.obstacle,n,i,!s,x),l(n.obstacle,c.hardBounds),d={x:s?n.x:n.obstacle[p?"xMax":"xMin"]+(p?1:-1),y:s?n.obstacle[p?"yMax":"yMin"]+(p?1:-1):n.y},s=!s,h=h.concat(t({x:n.x,y:n.y},d,s)))),h=h.concat(t(h[h.length-1].end,i,!s))}(t,e,x)).concat(b.reverse())),obstacles:g}}return c.requiresObstacles=!0,d.requiresObstacles=!0,{fastAvoid:d,straight:function(t,e){return{path:[["M",t.x,t.y],["L",e.x,e.y]],obstacles:[{start:t,end:e}]}},simpleConnect:c}}),i(e,"Gantt/ConnectorsDefaults.js",[],function(){return{connectors:{type:"straight",radius:0,lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}}}),i(e,"Gantt/PathfinderComposition.js",[e["Gantt/ConnectorsDefaults.js"],e["Core/Defaults.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=e.setOptions,s=i.defined,n=i.error,a=i.merge,h=i.pushUnique;function l(t){var e=t.shapeArgs;if(e)return{xMin:e.x||0,xMax:(e.x||0)+(e.width||0),yMin:e.y||0,yMax:(e.y||0)+(e.height||0)};var i=t.graphic&&t.graphic.getBBox();return i?{xMin:t.plotX-i.width/2,xMax:t.plotX+i.width/2,yMin:t.plotY-i.height/2,yMax:t.plotY+i.height/2}:null}return function(e){var i=[];function o(t){var e,i,o=l(this);switch(t.align){case"right":e="xMax";break;case"left":e="xMin"}switch(t.verticalAlign){case"top":i="yMin";break;case"bottom":i="yMax"}return{x:e?o[e]:(o.xMin+o.xMax)/2,y:i?o[i]:(o.yMin+o.yMax)/2}}function c(t,e){var i;return!s(e)&&(i=l(this))&&(e={x:(i.xMin+i.xMax)/2,y:(i.yMin+i.yMax)/2}),Math.atan2(e.y-t.y,t.x-e.x)}function d(t,e,i){for(var o=2*Math.PI,r=l(this),s=r.xMax-r.xMin,n=r.yMax-r.yMin,a=Math.atan2(n,s),h=s/2,c=n/2,d=r.xMin+h,p=r.yMin+c,u={x:d,y:p},f=t,g=1,m=!1,v=1,x=1;f<-Math.PI;)f+=o;for(;f>Math.PI;)f-=o;return g=Math.tan(f),f>-a&&f<=a?(x=-1,m=!0):f>a&&f<=Math.PI-a?x=-1:f>Math.PI-a||f<=-(Math.PI-a)?(v=-1,m=!0):v=-1,m?(u.x+=v*h,u.y+=x*h*g):(u.x+=v*(n/(2*g)),u.y+=x*c),i.x!==d&&(u.x=i.x),i.y!==p&&(u.y=i.y),{x:u.x+e*Math.cos(f),y:u.y-e*Math.sin(f)}}e.compose=function(e,s,l){if(h(i,e)&&e.prototype.callbacks.push(function(t){!1!==t.options.connectors.enabled&&((t.options.pathfinder||t.series.reduce(function(t,e){return e.options&&a(!0,e.options.connectors=e.options.connectors||{},e.options.pathfinder),t||e.options&&e.options.pathfinder},!1))&&(a(!0,t.options.connectors=t.options.connectors||{},t.options.pathfinder),n('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')),this.pathfinder=new s(this),this.pathfinder.update(!0))}),h(i,l)){var p=l.prototype;p.getMarkerVector=d,p.getPathfinderAnchorPoint=o,p.getRadiansToVector=c}h(i,r)&&r(t)}}(o||(o={})),o}),i(e,"Gantt/Pathfinder.js",[e["Gantt/Connection.js"],e["Gantt/PathfinderAlgorithms.js"],e["Gantt/PathfinderComposition.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s=r.addEvent,n=r.defined,a=r.pick,h=r.splat,l=Math.max,c=Math.min,d=function(){function e(t){this.chart=void 0,this.chartObstacles=void 0,this.chartObstacleMetrics=void 0,this.connections=void 0,this.group=void 0,this.lineObstacles=void 0,this.init(t)}return e.compose=function(t,o){i.compose(t,e,o)},e.prototype.init=function(t){this.chart=t,this.connections=[],s(t,"redraw",function(){this.pathfinder.update()})},e.prototype.update=function(e){var i=this.chart,r=this,s=r.connections;r.connections=[],i.series.forEach(function(e){e.visible&&!e.options.isInternal&&e.points.forEach(function(e){var s,n,a=e.options;a&&a.dependency&&(a.connect=a.dependency);var l=(null===(s=e.options)||void 0===s?void 0:s.connect)&&h(e.options.connect);e.visible&&!1!==e.isInside&&l&&l.forEach(function(s){(n=i.get("string"==typeof s?s:s.to))instanceof o&&n.series.visible&&n.visible&&!1!==n.isInside&&r.connections.push(new t(e,n,"string"==typeof s?{}:s))})})});for(var n=0,a=void 0,l=void 0,c=s.length,d=r.connections.length;ni.yMin-r&&e.yMin-ri.xMin-r&&e.xMin-ri.xMax?e.xMin-i.xMax:i.xMin-e.xMax:1/0,l=n?e.yMin>i.yMax?e.yMin-i.yMax:i.yMin-e.yMax:1/0;return n&&s?r?t(e,i,Math.floor(r/2)):1/0:c(h,l)}(t[r],t[s]))<80&&o.push(e);return o.push(80),l(Math.floor(o.sort(function(t,e){return t-e})[Math.floor(o.length/10)]/2-1),1)}(r),r.forEach(function(t){t.xMin-=e,t.xMax+=e,t.yMin-=e,t.yMax+=e})),r},e.prototype.getObstacleMetrics=function(t){for(var e,i,o=0,r=0,s=t.length;s--;)e=t[s].xMax-t[s].xMin,i=t[s].yMax-t[s].yMin,ol-h,S=c=({month:28,year:365})[m]*n*x-b&&r-36e5<=({month:31,year:366})[m]*n*x+b?T=!0:"ytd"===m?(T=p-d+b===r,w=!M):"all"===m&&(T=o.max-o.min>=l-h,A=!M&&v&&T);var P=!f&&(k||S||A||s),O=M&&T||T&&!v&&!w||M&&t.frozenStates;P?C=3:O&&(v=!0,C=2),y.state!==C&&(y.setState(C),i&&(i.options[a+1].disabled=P,2===C&&(i.selectedIndex=a+1)),0===C&&u===a&&t.setSelected())})},i.prototype.computeButtonRange=function(t){var e=t.type,i=t.count||1,o={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};o[e]?t._range=o[e]*i:("month"===e||"year"===e)&&(t._range=24*({month:30,year:365})[e]*36e5*i),t._offsetMin=b(t.offsetMin,0),t._offsetMax=b(t.offsetMax,0),t._range+=t._offsetMax-t._offsetMin},i.prototype.getInputValue=function(t){var e="min"===t?this.minInput:this.maxInput,i=this.chart.options.rangeSelector,o=this.chart.time;return e?("text"===e.type&&i.inputDateParser||this.defaultInputDateParser)(e.value,o.useUTC,o):0},i.prototype.setInputValue=function(t,e){var i=this.options,o=this.chart.time,r="min"===t?this.minInput:this.maxInput,s="min"===t?this.minDateBox:this.maxDateBox;if(r){var n=r.getAttribute("data-hc-time"),a=d(n)?Number(n):void 0;if(d(e)){var h=a;d(h)&&r.setAttribute("data-hc-time-previous",h),r.setAttribute("data-hc-time",e),a=e}r.value=o.dateFormat(this.inputTypeFormats[r.type]||i.inputEditDateFormat,a),s&&s.attr({text:o.dateFormat(i.inputDateFormat,a)})}},i.prototype.setInputExtremes=function(t,e,i){var o="min"===t?this.minInput:this.maxInput;if(o){var r=this.inputTypeFormats[o.type],s=this.chart.time;if(r){var n=s.dateFormat(r,e);o.min!==n&&(o.min=n);var a=s.dateFormat(r,i);o.max!==a&&(o.max=a)}}},i.prototype.showInput=function(t){var e="min"===t?this.minDateBox:this.maxDateBox,i="min"===t?this.minInput:this.maxInput;if(i&&e&&this.inputGroup){var o="text"===i.type,r=this.inputGroup,s=r.translateX,n=void 0===s?0:s,a=r.translateY,h=void 0===a?0:a,l=e.x,d=void 0===l?0:l,p=e.width,u=void 0===p?0:p,f=e.height,g=void 0===f?0:f,m=this.options.inputBoxWidth;c(i,{width:o?u+(m?-2:20)+"px":"auto",height:g-2+"px",border:"2px solid silver"}),o&&m?c(i,{left:n+d+"px",top:h+"px"}):c(i,{left:Math.min(Math.round(d+n-(i.offsetWidth-u)/2),this.chart.chartWidth-i.offsetWidth)+"px",top:h-(i.offsetHeight-g)/2+"px"})}},i.prototype.hideInput=function(t){var e="min"===t?this.minInput:this.maxInput;e&&c(e,{top:"-9999em",border:0,width:"1px",height:"1px"})},i.prototype.defaultInputDateParser=function(t,e,i){var r,s=t.split("/").join("-").split(" ").join("T");if(-1===s.indexOf("T")&&(s+="T00:00"),e)s+="Z";else if(o.isSafari&&!((r=s).length>6&&(r.lastIndexOf("-")===r.length-6||r.lastIndexOf("+")===r.length-6))){var n=new Date(s).getTimezoneOffset()/60;s+=n<=0?"+".concat(y(-n),":00"):"-".concat(y(n),":00")}var a=Date.parse(s);if(!m(a)){var h=t.split("-");a=Date.UTC(M(h[0]),M(h[1])-1,M(h[2]))}return i&&e&&m(a)&&(a+=i.getTimezoneOffset(a)),a},i.prototype.drawInput=function(t){var e=this.chart,i=this.div,r=this.inputGroup,s=this,n=e.renderer.style||{},h=e.renderer,d=e.options.rangeSelector,p=a.lang,u="min"===t;function g(){var i=s.maxInput,o=s.minInput,r=e.xAxis[0],n=e.scroller&&e.scroller.getUnionExtremes()||r,a=n.dataMin,h=n.dataMax,l=s.getInputValue(t);l!==Number(M.getAttribute("data-hc-time-previous"))&&m(l)&&(M.setAttribute("data-hc-time-previous",l),u&&i&&m(a)?l>Number(i.getAttribute("data-hc-time"))?l=void 0:lh&&(l=h)),void 0!==l&&r.setExtremes(u?l:r.min,u?r.max:l,void 0,void 0,{trigger:"rangeSelectorInput"}))}var x=p[u?"rangeSelectorFrom":"rangeSelectorTo"]||"",y=h.label(x,0).addClass("highcharts-range-label").attr({padding:x?2:0,height:x?d.inputBoxHeight:0}).add(r),b=h.label("",0).addClass("highcharts-range-input").attr({padding:2,width:d.inputBoxWidth,height:d.inputBoxHeight,"text-align":"center"}).on("click",function(){s.showInput(t),s[t+"Input"].focus()});e.styledMode||b.attr({stroke:d.inputBoxBorderColor,"stroke-width":1}),b.add(r);var M=l("input",{name:t,className:"highcharts-range-selector"},void 0,i);M.setAttribute("type",function(t){if(-1!==t.indexOf("%L"))return"text";var e=["a","A","d","e","w","b","B","m","o","y","Y"].some(function(e){return -1!==t.indexOf("%"+e)}),i=["H","k","I","l","M","S"].some(function(e){return -1!==t.indexOf("%"+e)});return e&&i?"datetime-local":e?"date":i?"time":"text"}(d.inputDateFormat||"%e %b %Y")),e.styledMode||(y.css(v(n,d.labelStyle)),b.css(v({color:"#333333"},n,d.inputStyle)),c(M,f({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:n.fontSize,fontFamily:n.fontFamily,top:"-9999em"},d.inputStyle))),M.onfocus=function(){s.showInput(t)},M.onblur=function(){M===o.doc.activeElement&&g(),s.hideInput(t),s.setInputValue(t),M.blur()};var k=!1;return M.onchange=function(){k||(g(),s.hideInput(t),M.blur())},M.onkeypress=function(t){13===t.keyCode&&g()},M.onkeydown=function(t){k=!0,(38===t.keyCode||40===t.keyCode)&&g()},M.onkeyup=function(){k=!1},{dateBox:b,input:M,label:y}},i.prototype.getPosition=function(){var t=this.chart,e=t.options.rangeSelector,i="top"===e.verticalAlign?t.plotTop-t.axisOffset[0]:0;return{buttonTop:i+e.buttonPosition.y,inputTop:i+e.inputPosition.y-10}},i.prototype.getYTDExtremes=function(t,e,i){var o=this.chart.time,r=new o.Date(t),s=o.get("FullYear",r),n=Math.max(e,i?o.Date.UTC(s,0,1):+new o.Date(s,0,1)),a=r.getTime();return{max:Math.min(t||a,a),min:n}},i.prototype.render=function(t,e){var i=this.chart,o=i.renderer,r=i.container,s=i.options,n=s.rangeSelector,a=b(s.chart.style&&s.chart.style.zIndex,0)+1,h=n.inputEnabled,c=this.rendered;if(!1!==n.enabled){if(!c&&(this.group=o.g("range-selector-group").attr({zIndex:7}).add(),this.div=l("div",void 0,{position:"relative",height:0,zIndex:a}),this.buttonOptions.length&&this.renderButtons(),r.parentNode&&r.parentNode.insertBefore(this.div,r),h)){this.inputGroup=o.g("input-group").add(this.group);var p=this.drawInput("min");this.minDateBox=p.dateBox,this.minLabel=p.label,this.minInput=p.input;var u=this.drawInput("max");this.maxDateBox=u.dateBox,this.maxLabel=u.label,this.maxInput=u.input}if(h){this.setInputValue("min",t),this.setInputValue("max",e);var f=i.scroller&&i.scroller.getUnionExtremes()||i.xAxis[0]||{};if(d(f.dataMin)&&d(f.dataMax)){var g=i.xAxis[0].minRange||0;this.setInputExtremes("min",f.dataMin,Math.min(f.dataMax,this.getInputValue("max"))-g),this.setInputExtremes("max",Math.max(f.dataMin,this.getInputValue("min"))+g,f.dataMax)}if(this.inputGroup){var m=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(function(t){if(t){var e=t.getBBox().width;e&&(t.attr({x:m}),m+=e+n.inputSpacing)}})}}this.alignElements(),this.rendered=!0}},i.prototype.renderButtons=function(){var t=this,e=this.buttons,i=this.chart,r=this.options,s=a.lang,n=i.renderer,c=v(r.buttonTheme),d=c&&c.states,p=c.width||28;delete c.width,delete c.states,this.buttonGroup=n.g("range-selector-buttons").add(this.group);var u=this.dropdown=l("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:1e-4},this.div);h(u,"touchstart",function(){u.style.fontSize="16px"}),[[o.isMS?"mouseover":"mouseenter"],[o.isMS?"mouseout":"mouseleave"],["change","click"]].forEach(function(i){var o=i[0],r=i[1];h(u,o,function(){var i=e[t.currentButtonIndex()];i&&g(i.element,r||o)})}),this.zoomText=n.label(s&&s.rangeSelectorZoom||"",0).attr({padding:r.buttonTheme.padding,height:r.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup),this.chart.styledMode||(this.zoomText.css(r.labelStyle),c["stroke-width"]=b(c["stroke-width"],0)),l("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,u),this.buttonOptions.forEach(function(i,o){l("option",{textContent:i.title||i.text},void 0,u),e[o]=n.button(i.text,0,0,function(e){var r,s=i.events&&i.events.click;s&&(r=s.call(i,e)),!1!==r&&t.clickButton(o),t.isActive=!0},c,d&&d.hover,d&&d.select,d&&d.disabled).attr({"text-align":"center",width:p}).add(t.buttonGroup),i.title&&e[o].attr("title",i.title)})},i.prototype.alignElements=function(){var t=this,e=this.buttonGroup,i=this.buttons,o=this.chart,r=this.group,s=this.inputGroup,n=this.options,a=this.zoomText,h=o.options,l=h.exporting&&!1!==h.exporting.enabled&&h.navigation&&h.navigation.buttonOptions,c=n.buttonPosition,d=n.inputPosition,p=n.verticalAlign,u=function(e,i){return l&&t.titleCollision(o)&&"top"===p&&"right"===i.align&&i.y-e.getBBox().height-12<(l.y||0)+(l.height||0)+o.spacing[0]?-40:0},f=o.plotLeft;if(r&&c&&d){var g=c.x-o.spacing[3];if(e){if(this.positionButtons(),!this.initialButtonGroupWidth){var m=0;a&&(m+=a.getBBox().width+5),i.forEach(function(t,e){m+=t.width||0,e!==i.length-1&&(m+=n.buttonSpacing)}),this.initialButtonGroupWidth=m}f-=o.spacing[3],this.updateButtonStates();var v=u(e,c);this.alignButtonGroup(v),r.placed=e.placed=o.hasLoaded}var x=0;s&&(x=u(s,d),"left"===d.align?g=f:"right"===d.align&&(g=-Math.max(o.axisOffset[1],-x)),s.align({y:d.y,width:s.getBBox().width,align:d.align,x:d.x+g-2},!0,o.spacingBox),s.placed=o.hasLoaded),this.handleCollision(x),r.align({verticalAlign:p},!0,o.spacingBox);var y=r.alignAttr.translateY,M=r.getBBox().height+20,k=0;if("bottom"===p){var S=o.legend&&o.legend.options;k=y-(M=M+(S&&"bottom"===S.verticalAlign&&S.enabled&&!S.floating?o.legend.legendHeight+b(S.margin,10):0)-20)-(n.floating?0:n.y)-(o.titleOffset?o.titleOffset[2]:0)-10}"top"===p?(n.floating&&(k=0),o.titleOffset&&o.titleOffset[0]&&(k=o.titleOffset[0]),k+=o.margin[0]-o.spacing[0]||0):"middle"===p&&(d.y===c.y?k=y:(d.y||c.y)&&(d.y<0||c.y<0?k-=Math.min(d.y,c.y):k=y-M)),r.translate(n.x,n.y+Math.floor(k));var C=this.minInput,w=this.maxInput,A=this.dropdown;n.inputEnabled&&C&&w&&(C.style.marginTop=r.translateY+"px",w.style.marginTop=r.translateY+"px"),A&&(A.style.marginTop=r.translateY+"px")}},i.prototype.alignButtonGroup=function(t,e){var i=this.chart,o=this.options,r=this.buttonGroup;this.buttons;var s=o.buttonPosition,n=i.plotLeft-i.spacing[3],a=s.x-i.spacing[3];"right"===s.align?a+=t-n:"center"===s.align&&(a-=n/2),r&&r.align({y:s.y,width:b(e,this.initialButtonGroupWidth),align:s.align,x:a},!0,i.spacingBox)},i.prototype.positionButtons=function(){var t=this.buttons,e=this.chart,i=this.options,o=this.zoomText,r=e.hasLoaded?"animate":"attr",s=i.buttonPosition,n=e.plotLeft,a=n;o&&"hidden"!==o.visibility&&(o[r]({x:b(n+s.x,n)}),a+=s.x+o.getBBox().width+5);for(var h=0,l=this.buttonOptions.length;ht&&(t=i.width)}),t},c=function(e){if(r&&o){var i=r.alignAttr.translateX+r.alignOptions.x-t+r.getBBox().x+2,s=r.alignOptions.width,a=o.alignAttr.translateX+o.getBBox().x;return a+e>i&&i+s>a&&n.y=-t?0:-t),translateY:r.alignAttr.translateY+o.getBBox().height+10})};if(o){if("always"===a){this.collapseButtons(t),c(l())&&d();return}"never"===a&&this.expandButtons()}r&&o?h.align===n.align||c(this.initialButtonGroupWidth+20)?"responsive"===a?(this.collapseButtons(t),c(l())&&d()):d():"responsive"===a&&this.expandButtons():o&&"responsive"===a&&(this.initialButtonGroupWidth>i.plotWidth?this.collapseButtons(t):this.expandButtons())},i.prototype.collapseButtons=function(t){var e=this.buttons,i=this.buttonOptions,o=this.chart,r=this.dropdown,s=this.options,n=this.zoomText,a=o.userOptions.rangeSelector&&o.userOptions.rangeSelector.buttonTheme||{},h=function(t){return{text:t?"".concat(t," ▾"):"▾",width:"auto",paddingLeft:b(s.buttonTheme.paddingLeft,a.padding,8),paddingRight:b(s.buttonTheme.paddingRight,a.padding,8)}};n&&n.hide();var l=!1;i.forEach(function(t,i){var o=e[i];2!==o.state?o.hide():(o.show(),o.attr(h(t.text)),l=!0)}),l||(r&&(r.selectedIndex=0),e[0].show(),e[0].attr(h(this.zoomText&&this.zoomText.textStr)));var c=s.buttonPosition.align;this.positionButtons(),("right"===c||"center"===c)&&this.alignButtonGroup(t,e[this.currentButtonIndex()].getBBox().width),this.showDropdown()},i.prototype.expandButtons=function(){var t=this.buttons,e=this.buttonOptions,i=this.options,o=this.zoomText;this.hideDropdown(),o&&o.show(),e.forEach(function(e,o){var r=t[o];r.show(),r.attr({text:e.text,width:i.buttonTheme.width||28,paddingLeft:b(i.buttonTheme.paddingLeft,"unset"),paddingRight:b(i.buttonTheme.paddingRight,"unset")}),r.state<2&&r.setState(0)}),this.positionButtons()},i.prototype.currentButtonIndex=function(){var t=this.dropdown;return t&&t.selectedIndex>0?t.selectedIndex-1:0},i.prototype.showDropdown=function(){var t=this.buttonGroup,e=this.buttons,i=this.chart,o=this.dropdown;if(t&&o){var r=t.translateX,s=t.translateY,n=e[this.currentButtonIndex()].getBBox();c(o,{left:i.plotLeft+(void 0===r?0:r)+"px",top:(void 0===s?0:s)+.5+"px",width:n.width+"px",height:n.height+"px"}),this.hasVisibleDropdown=!0}},i.prototype.hideDropdown=function(){var t=this.dropdown;t&&(c(t,{top:"-9999em",width:"1px",height:"1px"}),this.hasVisibleDropdown=!1)},i.prototype.getHeight=function(){var t=this.options,e=this.group,i=t.inputPosition,o=t.buttonPosition,r=t.y,s=o.y,n=i.y,a=0;if(t.height)return t.height;this.alignElements(),a=e?e.getBBox(!0).height+13+r:0;var h=Math.min(n,s);return(n<0&&s<0||n>0&&s>0)&&(a+=Math.abs(h)),a},i.prototype.titleCollision=function(t){return!(t.options.title.text||t.options.subtitle.text)},i.prototype.update=function(t){var e=this.chart;v(!0,e.options.rangeSelector,t),this.destroy(),this.init(e),this.render()},i.prototype.destroy=function(){var e=this,o=e.minInput,r=e.maxInput;e.eventsToUnbind&&(e.eventsToUnbind.forEach(function(t){return t()}),e.eventsToUnbind=void 0),p(e.buttons),o&&(o.onfocus=o.onblur=o.onchange=null),r&&(r.onfocus=r.onblur=r.onchange=null),x(e,function(o,r){o&&"chart"!==r&&(o instanceof s?o.destroy():o instanceof t.HTMLElement&&u(o)),o!==i.prototype[r]&&(e[r]=null)},this)},i}();return f(S.prototype,{defaultButtons:[{type:"month",count:1,text:"1m",title:"View 1 month"},{type:"month",count:3,text:"3m",title:"View 3 months"},{type:"month",count:6,text:"6m",title:"View 6 months"},{type:"ytd",text:"YTD",title:"View year to date"},{type:"year",count:1,text:"1y",title:"View 1 year"},{type:"all",text:"All",title:"View all"}],inputTypeFormats:{"datetime-local":"%Y-%m-%dT%H:%M:%S",date:"%Y-%m-%d",time:"%H:%M:%S"}}),S}),i(e,"Extensions/StaticScale.js",[e["Core/Utilities.js"]],function(t){var e=t.addEvent,i=t.defined,o=t.isNumber,r=t.pick,s=t.pushUnique,n=[];function a(){var t=this.chart.options.chart;!this.horiz&&o(this.options.staticScale)&&(!t.height||t.scrollablePlotArea&&t.scrollablePlotArea.minHeight)&&(this.staticScale=this.options.staticScale)}function h(){if("adjustHeight"!==this.redrawTrigger){for(var t=0,e=this.axes||[];t=1&&(e.plotHeight=n,e.redrawTrigger="adjustHeight",e.setSize(void 0,e.chartHeight+a,o)),t.series.forEach(function(t){var i=t.sharedClipKey&&e.sharedClips[t.sharedClipKey];i&&i.attr(e.inverted?{width:e.plotHeight}:{height:e.plotHeight})})}}(e[t]);this.initiatedScale=!0}this.redrawTrigger=null}return{compose:function(t,i){if(s(n,t)&&e(t,"afterSetOptions",a),s(n,i)){var o=i.prototype;o.adjustHeight=h,e(i,"render",o.adjustHeight)}}}}),i(e,"Series/XRange/XRangeSeriesDefaults.js",[e["Core/Utilities.js"]],function(t){var e=t.correctFloat,i=t.isNumber,o=t.isObject;return{colorByPoint:!0,dataLabels:{formatter:function(){var t=this.point.partialFill;if(o(t)&&(t=t.amount),i(t)&&t>0)return e(100*t)+"%"},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:'{point.x} - {point.x2}
',pointFormat:' {series.name}: {point.yCategory}
'},borderRadius:3,pointRange:0}}),i(e,"Series/XRange/XRangePoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),r=t.seriesTypes.column.prototype.pointClass,s=e.extend,n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.options=void 0,e.series=void 0,e}return o(e,t),e.getColorByCategory=function(t,e){var i=t.options.colors||t.chart.options.colors,o=i?i.length:t.chart.options.chart.colorCount,r=e.y%o,s=i&&i[r];return{colorIndex:r,color:s}},e.prototype.resolveColor=function(){var t=this.series;if(t.options.colorByPoint&&!this.options.color){var i=e.getColorByCategory(t,this);t.chart.styledMode||(this.color=i.color),this.options.colorIndex||(this.colorIndex=i.colorIndex)}else this.color||(this.color=t.color)},e.prototype.init=function(){return t.prototype.init.apply(this,arguments),this.y||(this.y=0),this},e.prototype.setState=function(){t.prototype.setState.apply(this,arguments),this.series.drawPoint(this,this.series.getAnimationVerb())},e.prototype.getLabelConfig=function(){var e=t.prototype.getLabelConfig.call(this),i=this.series.yAxis.categories;return e.x2=this.x2,e.yCategory=this.yCategory=i&&i[this.y],e.key=this.category||this.name,e},e.prototype.isValid=function(){return"number"==typeof this.x&&"number"==typeof this.x2},e}(r);return s(n.prototype,{ttBelow:!1,tooltipDateKeys:["x","x2"]}),n}),i(e,"Series/XRange/XRangeSeries.js",[e["Core/Globals.js"],e["Core/Color/Color.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"],e["Series/XRange/XRangeSeriesDefaults.js"],e["Series/XRange/XRangePoint.js"]],function(t,e,i,o,r,s){var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=t.noop,l=e.parse,c=i.seriesTypes.column,d=o.addEvent,p=o.clamp,u=o.defined,f=o.extend,g=o.find,m=o.isNumber,v=o.isObject,x=o.merge,y=o.pick,b=o.relativeLength,M=[];function k(){var t,e;if(this.isXAxis){t=y(this.dataMax,-Number.MAX_VALUE);for(var i=0,o=this.series;it&&(t=a,e=!0)}}e&&(this.dataMax=t)}}var S=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return a(e,t),e.compose=function(t){o.pushUnique(M,t)&&d(t,"afterGetSeriesExtremes",k)},e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.options.stacking=void 0},e.prototype.getColumnMetrics=function(){var e=this,i=function(){for(var t=0,i=e.chart.series;t=i&&(e-=i),e},e.prototype.alignDataLabel=function(e){var i=e.plotX;e.plotX=y(e.dlBox&&e.dlBox.centerX,e.plotX),t.prototype.alignDataLabel.apply(this,arguments),e.plotX=i},e.prototype.translatePoint=function(t){var e,i,o,r,s,n,a=this.xAxis,h=this.yAxis,l=this.columnMetrics,c=this.options,d=c.minPointLength||0,f=(t.shapeArgs&&t.shapeArgs.width||0)/2,g=this.pointXOffset=l.offset,M=y(t.x2,t.x+(t.len||0)),k=c.borderRadius,S=this.chart.plotTop,C=this.chart.plotLeft,w=t.plotX,A=a.translate(M,0,0,0,1),T=Math.abs(A-w),P=this.chart.inverted,O=y(c.borderWidth,1)%2/2,L=l.offset,E=Math.round(l.width);d&&((e=d-T)<0&&(e=0),w-=e/2,A+=e/2),w=Math.max(w,-10),A=p(A,-10,a.len+10),u(t.options.pointWidth)&&(L-=(Math.ceil(t.options.pointWidth)-E)/2,E=Math.ceil(t.options.pointWidth)),c.pointPlacement&&m(t.plotY)&&h.categories&&(t.plotY=h.translate(t.y,0,1,0,1,c.pointPlacement));var D=Math.floor(Math.min(w,A))+O,B=Math.floor(Math.max(w,A))+O-D,j=Math.min(b("object"==typeof k?k.radius:k||0,E),Math.min(B,E)/2),I={x:D,y:Math.floor(t.plotY+L)+O,width:B,height:E,r:j};t.shapeArgs=I,P?t.tooltipPos[1]+=g+f:t.tooltipPos[0]-=f+g-I.width/2,r=(o=I.x)+I.width,o<0||r>a.len?(o=p(o,0,a.len),s=(r=p(r,0,a.len))-o,t.dlBox=x(I,{x:o,width:r-o,centerX:s?s/2:null})):t.dlBox=null;var R=t.tooltipPos,z=P?1:0,N=P?0:1,G=this.columnMetrics?this.columnMetrics.offset:-l.width/2;P?R[z]+=I.width/2:R[z]=p(R[z]+(a.reversed?-1:0)*I.width,a.left-C,a.left+a.len-C-1),R[N]=p(R[N]+(P?-1:1)*G,h.top-S,h.top+h.len-S-1),(i=t.partialFill)&&(v(i)&&(i=i.amount),m(i)||(i=0),t.partShapeArgs=x(I),n=Math.max(Math.round(T*i+t.plotX-w),0),t.clipRectArgs={x:a.reversed?I.x+T-n:I.x,y:I.y,width:n,height:I.height})},e.prototype.translate=function(){t.prototype.translate.apply(this,arguments);for(var e=0,i=this.points;e=0&&r<=this.yAxis.len&&(i.x||0)+(i.width||0)>=0&&o<=this.xAxis.len:t.prototype.isPointInside.apply(this,arguments)},e.defaultOptions=x(c.defaultOptions,r),e}(c);return f(S.prototype,{pointClass:s,pointArrayMap:["x2","y"],getExtremesFromAll:!0,parallelArrays:["x","x2","y"],requireSorting:!1,type:"xrange",animate:i.series.prototype.animate,autoIncrement:h,buildKDTree:h}),i.registerSeriesType("xrange",S),S}),i(e,"Series/Gantt/GanttPoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),r=t.seriesTypes.xrange.prototype.pointClass,s=e.pick;return function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.options=void 0,e.series=void 0,e}return o(e,t),e.setGanttPointAliases=function(t){function e(e,i){void 0!==i&&(t[e]=i)}e("x",s(t.start,t.x)),e("x2",s(t.end,t.x2)),e("partialFill",s(t.completed,t.partialFill))},e.prototype.applyOptions=function(i,o){var r;return r=t.prototype.applyOptions.call(this,i,o),e.setGanttPointAliases(r),r},e.prototype.isValid=function(){return("number"==typeof this.start||"number"==typeof this.x)&&("number"==typeof this.end||"number"==typeof this.x2||this.milestone)},e}(r)}),i(e,"Core/Axis/BrokenAxis.js",[e["Core/Axis/Stacking/StackItem.js"],e["Core/Utilities.js"]],function(t,e){var i,o=e.addEvent,r=e.find,s=e.fireEvent,n=e.isArray,a=e.isNumber,h=e.pick;return function(i){var l=[];function c(){void 0!==this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function d(){var t;(null===(t=this.brokenAxis)||void 0===t?void 0:t.hasBreaks)&&(this.options.ordinal=!1)}function p(){var t=this.brokenAxis;if(null==t?void 0:t.hasBreaks){for(var e=this.tickPositions,i=this.tickPositions.info,o=[],r=0;re.to||r>e.from&&ne.from&&ne.from&&n>e.to&&n0){"value"!==this.options.gapUnit&&(s*=this.basePointRange),i&&i>s&&i>=this.basePointRange&&(s=i);for(var a=void 0,h=void 0;n--;)if(h&&!1!==h.visible||(h=o[n+1]),a=o[n],!1!==h.visible&&!1!==a.visible){if(h.x-a.x>s){var l=(a.x+h.x)/2;o.splice(n+1,0,{isNull:!0,x:l}),r.stacking&&this.options.stacking&&((r.stacking.stacks[this.stackKey][l]=new t(r,r.options.stackLabels,!1,l,this.stack)).total=0)}h=a}}return this.getGraphPath(o)}i.compose=function(t,i){if(e.pushUnique(l,t)&&(t.keepProps.push("brokenAxis"),o(t,"init",u),o(t,"afterInit",c),o(t,"afterSetTickPositions",p),o(t,"afterSetOptions",d)),e.pushUnique(l,i)){var r=i.prototype;r.drawBreaks=m,r.gappedPath=v,o(i,"afterGeneratePoints",f),o(i,"afterRender",g)}return t};var x=function(){function t(t){this.hasBreaks=!1,this.axis=t}return t.isInBreak=function(t,e){var i=t.repeat||1/0,o=t.from,r=t.to-t.from,s=e>=o?(e-o)%i:i-(o-e)%i;return t.inclusive?s<=r:s=n);s++)r.to=e)break;else if(t.isInBreak(r,e)){n-=e-r.from;break}return n},t.prototype.findBreakAt=function(t,e){return r(e,function(e){return e.fromg;)n-=i;for(;nf?this.hiddenLabels.push(v.hide()):v.show()),(v=this.ticks[g].label)&&(g-o>f?this.hiddenLabels.push(v.hide()):v.show());var y=this.ticks[g].mark;y&&g-o0&&this.ticks[g].isLast&&this.hiddenMarks.push(y.hide())}}}function S(){var t=this.tickPositions&&this.tickPositions.info,e=this.options,i=e.grid||{},o=this.userOptions.labels||{};i.enabled&&(this.horiz?(this.series.forEach(function(t){t.options.pointRange=0}),t&&e.dateTimeLabelFormats&&e.labels&&!a(o.align)&&(!1===e.dateTimeLabelFormats[t.unitName].range||t.count>1)&&(e.labels.align="left",a(o.x)||(e.labels.x=3))):"treegrid"!==this.options.type&&this.grid&&this.grid.columns&&(this.minPointOffset=this.tickInterval))}function C(t){var e,i=this.options,o=t.userOptions,r=i&&v(i.grid)?i.grid:{};!0===r.enabled&&(e=p(!0,{className:"highcharts-grid-axis "+(o.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M","%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"0.9em"}},margin:0,title:{text:null,reserveSpace:!1,rotation:0},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},o),"xAxis"===this.coll&&(a(o.linkedTo)&&!a(o.tickPixelInterval)&&(e.tickPixelInterval=350),!a(o.tickPixelInterval)&&a(o.linkedTo)&&!a(o.tickPositioner)&&!a(o.tickInterval)&&(e.tickPositioner=function(t,i){var o=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(o){for(var r=e.units||[],s=void 0,n=1,a="year",h=0;hh&&!t.startOnTick&&(o[0]=h),s>l&&s-cd?a:d,g=g+1+o.descendants,m=Math.max(o.height+1,m),o});return a&&(a.start=o(a.start,c),a.end=o(a.end,d)),e(f,{children:v,descendants:g,height:m}),"function"==typeof p&&p(f,l),f}return{getNode:r,getTree:function(t,e){return r("",null,1,null,t.reduce(function(t,e){var i=o(e.parent,"");return void 0===t[i]&&(t[i]=[]),t[i].push(e),t},{}),e)}}}),i(e,"Core/Axis/TreeGrid/TreeGridTick.js",[e["Core/Utilities.js"]],function(t){var e=t.addEvent,i=t.isObject,o=t.isNumber,r=t.pick,s=t.wrap,n=[];function a(){this.treeGrid||(this.treeGrid=new c(this))}function h(t,e,s,n,a,h,l,c,d){var p,u,f,g,m,v=r(this.options&&this.options.labels,h),x=this.pos,y=this.axis,b="treegrid"===y.options.type,M=t.apply(this,[e,s,n,a,v,l,c,d]);return b&&(p=v&&i(v.symbol,!0)?v.symbol:{},u=v&&o(v.indentation)?v.indentation:0,m=(g=(f=y.treeGrid.mapOfPosToGridNode)&&f[x])&&g.depth||1,M.x+=(p.width||0)+2*(p.padding||0)+(m-1)*u),M}function l(t){var s,n,a,h,l,c,d,p,u,f,g,m,v,x,y,b=this,M=b.pos,k=b.axis,S=b.label,C=k.treeGrid.mapOfPosToGridNode,w=k.options,A=r(b.options&&b.options.labels,w&&w.labels),T=A&&i(A.symbol,!0)?A.symbol:{},P=C&&C[M],O=P&&P.depth,L="treegrid"===w.type,E=k.tickPositions.indexOf(M)>-1,D="highcharts-treegrid-node-",B=k.chart.styledMode;L&&P&&S&&S.element&&S.addClass(D+"level-"+O),t.apply(b,Array.prototype.slice.call(arguments,1)),L&&S&&S.element&&P&&P.descendants&&P.descendants>0&&(v=k.treeGrid.isCollapsed(P),s={color:!B&&S.styles&&S.styles.color||"",collapsed:v,group:S.parentGroup,options:T,renderer:S.renderer,show:E,xy:S.xy},a=!(n=b.treeGrid).labelIcon,h=s.renderer,l=s.xy,d=(c=s.options).width||0,p=c.height||0,u={x:l.x-d/2-(c.padding||0),y:l.y-p/2},f=s.collapsed?90:180,g=s.show&&o(u.y),(m=n.labelIcon)||(n.labelIcon=m=h.path(h.symbols[c.type](c.x||0,c.y||0,d,p)).addClass("highcharts-label-icon").add(s.group)),m[g?"show":"hide"](),h.styledMode||m.attr({cursor:"pointer",fill:r(s.color,"#666666"),"stroke-width":1,stroke:c.lineColor,strokeWidth:c.lineWidth||0}),m[a?"attr":"animate"]({translateX:u.x,translateY:u.y,rotation:f}),x=D+(v?"collapsed":"expanded"),y=D+(v?"expanded":"collapsed"),S.addClass(x).removeClass(y),B||S.css({cursor:"pointer"}),[S,b.treeGrid.labelIcon].forEach(function(t){t&&!t.attachedTreeGridEvents&&(e(t.element,"mouseover",function(){S.addClass("highcharts-treegrid-node-active"),S.renderer.styledMode||S.css({textDecoration:"underline"})}),e(t.element,"mouseout",function(){var t;t=i(A.style)?A.style:{},S.removeClass("highcharts-treegrid-node-active"),S.renderer.styledMode||S.css({textDecoration:t.textDecoration})}),e(t.element,"click",function(){b.treeGrid.toggleCollapse()}),t.attachedTreeGridEvents=!0)}))}var c=function(){function i(t){this.tick=t}return i.compose=function(i){t.pushUnique(n,i)&&(e(i,"init",a),s(i.prototype,"getLabelPosition",h),s(i.prototype,"renderLabel",l),i.prototype.collapse=function(t){this.treeGrid.collapse(t)},i.prototype.expand=function(t){this.treeGrid.expand(t)},i.prototype.toggleCollapse=function(t){this.treeGrid.toggleCollapse(t)})},i.prototype.collapse=function(t){var e=this.tick,i=e.axis,o=i.brokenAxis;if(o&&i.treeGrid.mapOfPosToGridNode){var s=e.pos,n=i.treeGrid.mapOfPosToGridNode[s],a=i.treeGrid.collapse(n);o.setBreaks(a,r(t,!0))}},i.prototype.destroy=function(){this.labelIcon&&this.labelIcon.destroy()},i.prototype.expand=function(t){var e=this.tick,i=e.axis,o=i.brokenAxis;if(o&&i.treeGrid.mapOfPosToGridNode){var s=e.pos,n=i.treeGrid.mapOfPosToGridNode[s],a=i.treeGrid.expand(n);o.setBreaks(a,r(t,!0))}},i.prototype.toggleCollapse=function(t){var e=this.tick,i=e.axis,o=i.brokenAxis;if(o&&i.treeGrid.mapOfPosToGridNode){var s=e.pos,n=i.treeGrid.mapOfPosToGridNode[s],a=i.treeGrid.toggleCollapse(n);o.setBreaks(a,r(t,!0))}},i}();return c}),i(e,"Series/TreeUtilities.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],function(t,e){var i=e.extend,o=e.isArray,r=e.isNumber,s=e.isObject,n=e.merge,a=e.pick;return{getColor:function(e,i){var o,r,s,n,h,l,c,d=i.index,p=i.mapOptionsToLevel,u=i.parentColor,f=i.parentColorIndex,g=i.series,m=i.colors,v=i.siblings,x=g.points,y=g.chart.options.chart;return e&&(r=x[e.i],s=p[e.level]||{},r&&s.colorByPoint&&(h=r.index%(m?m.length:y.colorCount),n=m&&m[h]),g.chart.styledMode||(l=a(r&&r.options.color,s&&s.color,n,u&&((o=s&&s.colorVariation)&&"brightness"===o.key&&d&&v?t.parse(u).brighten(o.to*(d/v)).get():u),g.color)),c=a(r&&r.options.colorIndex,s&&s.colorIndex,h,f,i.colorIndex)),{color:l,colorIndex:c}},getLevelOptions:function(t){var e,i,h,l,c,d,p={};if(s(t))for(l=r(t.from)?t.from:1,d=t.levels,i={},e=s(t.defaults)?t.defaults:{},o(d)&&(i=d.reduce(function(t,i){var o,h,c;return s(i)&&r(i.level)&&(h=a((c=n({},i)).levelIsConstant,e.levelIsConstant),delete c.levelIsConstant,delete c.level,s(t[o=i.level+(h?0:l-1)])?n(!0,t[o],c):t[o]=c),t},{})),c=r(t.to)?t.to:1,h=0;h<=c;h++)p[h]=n({},e,s(i[h])?i[h]:{});return p},setTreeValues:function t(e,o){var r=o.before,s=o.idRoot,n=o.mapIdToNode[s],h=!1!==o.levelIsConstant,l=o.points[e.i],c=l&&l.options||{},d=[],p=0;e.levelDynamic=e.level-(h?0:n.level),e.name=a(l&&l.name,""),e.visible=s===e.id||!0===o.visible,"function"==typeof r&&(e=r(e,o)),e.children.forEach(function(r,s){var n=i({},o);i(n,{index:s,siblings:e.children.length,visible:e.visible}),r=t(r,n),d.push(r),r.visible&&(p+=r.val)});var u=a(c.value,p);return e.visible=u>=0&&(p>0||e.visible),e.children=d,e.childrenTotal=p,e.isLeaf=e.visible&&!p,e.val=u,e},updateRootId:function(t){var e,i;return s(t)&&(i=s(t.options)?t.options:{},e=a(t.rootNode,i.rootId,""),s(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e}}}),i(e,"Core/Axis/TreeGrid/TreeGridAxis.js",[e["Core/Axis/BrokenAxis.js"],e["Core/Axis/GridAxis.js"],e["Gantt/Tree.js"],e["Core/Axis/TreeGrid/TreeGridTick.js"],e["Series/TreeUtilities.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s){var n,a=r.getLevelOptions,h=s.addEvent,l=s.find,c=s.fireEvent,d=s.isArray,p=s.isObject,u=s.isString,f=s.merge,g=s.pick,m=s.wrap,v=[];function x(t,e){var i=t.collapseEnd||0,o=t.collapseStart||0;return i>=e&&(o-=.5),{from:o,to:i,showPoints:!1}}function y(t,e,o){var r,s,n=[],a=[],h={},c="boolean"==typeof e&&e,d={},f=-1,g=i.getTree(t,{after:function(t){var e=d[t.pos],i=0,o=0;e.children.forEach(function(t){o+=(t.descendants||0)+1,i=Math.max((t.height||0)+1,i)}),e.descendants=o,e.height=i,e.collapsed&&a.push(e)},before:function(t){var e,i,o=p(t.data,!0)?t.data:{},r=u(o.name)?o.name:"",s=h[t.parent],a=p(s,!0)?d[s.pos]:null;c&&p(a,!0)&&(e=l(a.children,function(t){return t.name===r}))?(i=e.pos,e.nodes.push(t)):i=f++,!d[i]&&(d[i]=e={depth:a?a.depth+1:0,name:r,id:o.id,nodes:[t],children:[],pos:i},-1!==i&&n.push(r),p(a,!0)&&a.children.push(e)),u(t.id)&&(h[t.id]=t),e&&!0===o.collapsed&&(e.collapsed=!0),t.pos=i}});return r=d,{categories:n,mapOfIdToNode:h,mapOfPosToGridNode:d=(s=function(t,e,i){var r=t.nodes,n=e+(-1===e?0:o-1),a=(n-e)/2,h=e+a;return r.forEach(function(t){var i=t.data;p(i,!0)&&(i.y=e+(i.seriesIndex||0),delete i.seriesIndex),t.pos=h}),i[h]=t,t.pos=h,t.tickmarkOffset=a+.5,t.collapseStart=n+.5,t.children.forEach(function(t){s(t,n+1,i),n=(t.collapseEnd||0)-.5}),t.collapseEnd=n+.5,i})(r["-1"],-1,{}),collapsedNodes:a,tree:g}}function b(t){t.target.axes.filter(function(t){return"treegrid"===t.options.type}).forEach(function(e){var i,o,r=e.options||{},s=r.labels,n=r.uniqueNames,h=r.max,l=!e.treeGrid.mapOfPosToGridNode||e.series.some(function(t){return!t.hasRendered||t.isDirtyData||t.isDirty}),c=0;if(l){if(i=e.series.reduce(function(t,e){return e.visible&&((e.options.data||[]).forEach(function(i){e.options.keys&&e.options.keys.length&&(i=e.pointClass.prototype.optionsToObject.call({series:e},i),e.pointClass.setGanttPointAliases(i)),p(i,!0)&&(i.seriesIndex=c,t.push(i))}),!0===n&&c++),t},[]),h&&i.length=0&&e.indexOf(t.x2)>=0&&(e=t)}),p(e,!0)?f(e):e});t.visible&&t.setData(e,!1)}),e.treeGrid.mapOptionsToLevel=a({defaults:s,from:1,levels:s&&s.levels,to:e.treeGrid.tree&&e.treeGrid.tree.height}),"beforeRender"===t.type&&(e.treeGrid.collapsedNodes=o.collapsedNodes)}})}function M(t,e){var i,o,r,s=this.treeGrid.mapOptionsToLevel||{},a="treegrid"===this.options.type,h=this.ticks,l=h[e];a&&this.treeGrid.mapOfPosToGridNode?((i=s[(r=this.treeGrid.mapOfPosToGridNode[e]).depth])&&(o={labels:i}),!l&&n?h[e]=l=new n(this,e,void 0,void 0,{category:r.name,tickmarkOffset:r.tickmarkOffset,options:o}):(l.parameters.category=r.name,l.options=o,l.addLabel())):t.apply(this,Array.prototype.slice.call(arguments,1))}function k(t,e,i,o){var r=this,s="treegrid"===i.type;r.treeGrid||(r.treeGrid=new C(r)),s&&(h(e,"beforeRender",b),h(e,"beforeRedraw",b),h(e,"addSeries",function(t){if(t.options.data){var e=y(t.options.data,i.uniqueNames||!1,1);r.treeGrid.collapsedNodes=(r.treeGrid.collapsedNodes||[]).concat(e.collapsedNodes)}}),h(r,"foundExtremes",function(){r.treeGrid.collapsedNodes&&r.treeGrid.collapsedNodes.forEach(function(t){var e=r.treeGrid.collapse(t);r.brokenAxis&&(r.brokenAxis.setBreaks(e,!1),r.treeGrid.collapsedNodes&&(r.treeGrid.collapsedNodes=r.treeGrid.collapsedNodes.filter(function(e){return t.collapseStart!==e.collapseStart||t.collapseEnd!==e.collapseEnd})))})}),h(r,"afterBreaks",function(){"yAxis"===r.coll&&!r.staticScale&&r.chart.options.chart.height&&(r.isDirty=!0)}),i=f({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10,padding:5}},uniqueNames:!1},i,{reversed:!0,grid:{columns:void 0}})),t.apply(r,[e,i,o]),s&&(r.hasNames=!0,r.options.showLastLabel=!0)}function S(t){var e=this.options;"treegrid"===e.type?(this.min=g(this.userMin,e.min,this.dataMin),this.max=g(this.userMax,e.max,this.dataMax),c(this,"foundExtremes"),this.setAxisTranslation(),this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=this.treeGrid.mapOfPosToGridNode?this.treeGrid.getTickPositions():[]):t.apply(this,Array.prototype.slice.call(arguments,1))}var C=function(){function r(t){this.axis=t}return r.compose=function(r,a,h,l){if(s.pushUnique(v,r)){-1===r.keepProps.indexOf("treeGrid")&&r.keepProps.push("treeGrid");var c=r.prototype;m(c,"generateTick",M),m(c,"init",k),m(c,"setTickInterval",S),c.utils={getNode:i.getNode}}return s.pushUnique(v,l)&&!n&&(n=l),e.compose(r,a,l),t.compose(r,h),o.compose(l),r},r.prototype.setCollapsedStatus=function(t){var e=this.axis,i=e.chart;e.series.forEach(function(e){var o=e.options.data;if(t.id&&o){var r=i.get(t.id),s=o[e.data.indexOf(r)];r&&s&&(r.collapsed=t.collapsed,s.collapsed=t.collapsed)}})},r.prototype.collapse=function(t){var e=this.axis,i=e.options.breaks||[],o=x(t,e.max);return i.push(o),t.collapsed=!0,e.treeGrid.setCollapsedStatus(t),i},r.prototype.expand=function(t){var e=this.axis,i=e.options.breaks||[],o=x(t,e.max);return t.collapsed=!1,e.treeGrid.setCollapsedStatus(t),i.reduce(function(t,e){return(e.to!==o.to||e.from!==o.from)&&t.push(e),t},[])},r.prototype.getTickPositions=function(){var t=this.axis,e=Math.floor(t.min/t.tickInterval)*t.tickInterval,i=Math.ceil(t.max/t.tickInterval)*t.tickInterval;return Object.keys(t.treeGrid.mapOfPosToGridNode||{}).reduce(function(o,r){var s=+r;return s>=e&&s<=i&&!(t.brokenAxis&&t.brokenAxis.isInAnyBreak(s))&&o.push(s),o},[])},r.prototype.isCollapsed=function(t){var e=this.axis,i=e.options.breaks||[],o=x(t,e.max);return i.some(function(t){return t.from===o.from&&t.to===o.to})},r.prototype.toggleCollapse=function(t){return this.isCollapsed(t)?this.expand(t):this.collapse(t)},r}();return C}),i(e,"Series/Gantt/GanttSeries.js",[e["Core/Axis/Axis.js"],e["Core/Chart/Chart.js"],e["Series/Gantt/GanttPoint.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Axis/Tick.js"],e["Core/Utilities.js"],e["Core/Axis/TreeGrid/TreeGridAxis.js"]],function(t,e,i,o,r,s,n){var a,h=this&&this.__extends||(a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),l=o.series,c=o.seriesTypes.xrange,d=s.extend,p=s.isNumber,u=s.merge;s.splat,n.compose(t,e,l,r);var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return h(e,t),e.prototype.drawPoint=function(t,e){var i,o=this.options,r=this.chart.renderer,s=t.shapeArgs,n=t.plotY,a=t.graphic,h=t.selected&&"select",l=o.stacking&&!o.borderRadius;t.options.milestone?p(n)&&null!==t.y&&!1!==t.visible?(i=r.symbols.diamond(s.x||0,s.y||0,s.width||0,s.height||0),a?a[e]({d:i}):t.graphic=a=r.path(i).addClass(t.getClassName(),!0).add(t.group||this.group),this.chart.styledMode||t.graphic.attr(this.pointAttribs(t,h)).shadow(o.shadow,null,l)):a&&(t.graphic=a.destroy()):c.prototype.drawPoint.call(this,t,e)},e.prototype.translatePoint=function(t){var e,i;c.prototype.translatePoint.call(this,t),t.options.milestone&&(i=(e=t.shapeArgs).height||0,t.shapeArgs={x:(e.x||0)-i/2,y:e.y,width:i,height:i})},e.defaultOptions=u(c.defaultOptions,{grouping:!1,dataLabels:{enabled:!0},tooltip:{headerFormat:'{series.name}
',pointFormat:null,pointFormatter:function(){var t,e,i=this.series,o=i.xAxis,r=i.tooltipOptions.dateTimeLabelFormats,s=o.options.startOfWeek,n=i.tooltipOptions,a=n.xDateFormat,h=this.options.milestone,l=""+(this.name||this.yCategory)+"";return n.pointFormat?this.tooltipFormatter(n.pointFormat):(!a&&p(this.start)&&(a=i.chart.time.getDateFormat(o.closestPointRange,this.start,s,r||{})),t=i.chart.time.dateFormat(a,this.start),e=i.chart.time.dateFormat(a,this.end),l+="
",h?l+=t+"
":l+="Start: "+t+"
End: "+e+"
",l)}},connectors:{type:"simpleConnect",animation:{reversed:!0},radius:0,startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:!1,align:"right"}}}),e}(c);return d(f.prototype,{pointArrayMap:["start","end","y"],pointClass:i,setData:l.prototype.setData}),o.registerSeriesType("gantt",f),f}),i(e,"Core/Chart/GanttChart.js",[e["Core/Chart/Chart.js"],e["Core/Defaults.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r,s=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=e.getOptions,a=i.isArray,h=i.merge,l=i.splat,c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.init=function(e,i){var o,r=n(),s=e.xAxis,c=e.yAxis;e.xAxis=e.yAxis=void 0;var d=h(!0,{chart:{type:"gantt"},title:{text:""},legend:{enabled:!1},navigator:{series:{type:"gantt"},yAxis:{type:"category"}}},e,{isGantt:!0});e.xAxis=s,e.yAxis=c,d.xAxis=(a(e.xAxis)?e.xAxis:[e.xAxis||{},{}]).map(function(t,e){return 1===e&&(o=0),h(r.xAxis,{grid:{enabled:!0},opposite:!0,linkedTo:o},t,{type:"datetime"})}),d.yAxis=l(e.yAxis||{}).map(function(t){return h(r.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:t.categories?t.type:"treegrid"},t)}),t.prototype.init.call(this,d,i)},e}(t);return(r=c||(c={})).ganttChart=function(t,e,i){return new r(t,e,i)},c}),i(e,"Extensions/ArrowSymbols.js",[e["Core/Utilities.js"]],function(t){var e=[];function i(t,e,i,o){return[["M",t,e+o/2],["L",t+i,e],["L",t,e+o/2],["L",t+i,e+o]]}function o(t,e,o,r){return i(t,e,o/2,r)}function r(t,e,i,o){return[["M",t+i,e],["L",t,e+o/2],["L",t+i,e+o],["Z"]]}function s(t,e,i,o){return r(t,e,i/2,o)}return{compose:function(n){if(t.pushUnique(e,n)){var a=n.prototype.symbols;a.arrow=i,a["arrow-filled"]=r,a["arrow-filled-half"]=s,a["arrow-half"]=o,a["triangle-left"]=r,a["triangle-left-half"]=s}}}}),i(e,"Extensions/CurrentDateIndication.js",[e["Core/Utilities.js"]],function(t){var e=t.addEvent,i=t.merge,o=t.wrap,r=[],s={color:"#ccd3ff",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:function(t,e){return this.axis.chart.time.dateFormat(e||"",t)},rotation:0,style:{fontSize:"0.7em"}}};function n(){var t=this.options,e=t.currentDateIndicator;if(e){var o="object"==typeof e?i(s,e):i(s);o.value=Date.now(),o.className="highcharts-current-date-indicator",t.plotLines||(t.plotLines=[]),t.plotLines.push(o)}}function a(){this.label&&this.label.attr({text:this.getLabelText(this.options.label)})}function h(t,e){var i=this.options;return i&&i.className&&-1!==i.className.indexOf("highcharts-current-date-indicator")&&i.label&&"function"==typeof i.label.formatter?(i.value=Date.now(),i.label.formatter.call(this,i.value,i.label.format)):t.call(this,e)}return{compose:function(i,s){t.pushUnique(r,i)&&e(i,"afterSetOptions",n),t.pushUnique(r,s)&&(e(s,"render",a),o(s.prototype,"getLabelText",h))}}}),i(e,"masters/modules/gantt.src.js",[e["Core/Globals.js"],e["Gantt/Connection.js"],e["Stock/Navigator/Navigator.js"],e["Gantt/Pathfinder.js"],e["Stock/Scrollbar/Scrollbar.js"],e["Stock/RangeSelector/RangeSelector.js"],e["Extensions/StaticScale.js"],e["Series/XRange/XRangeSeries.js"],e["Core/Chart/GanttChart.js"],e["Extensions/ArrowSymbols.js"],e["Extensions/CurrentDateIndication.js"]],function(t,e,i,o,r,s,n,a,h,l,c){t.Connection=e,t.GanttChart=h,t.ganttChart=h.ganttChart,t.Navigator=i,t.Pathfinder=o,t.RangeSelector=s,t.Scrollbar=r,l.compose(t.SVGRenderer),c.compose(t.Axis,t.PlotLineOrBand),o.compose(t.Chart,t.Point),i.compose(t.Axis,t.Chart,t.Series),s.compose(t.Axis,t.Chart),r.compose(t.Axis),a.compose(t.Axis),n.compose(t.Axis,t.Chart)}),i(e,"masters/highcharts-gantt.src.js",[e["masters/highcharts.src.js"]],function(t){return t.product="Highcharts Gantt",t}),e["masters/highcharts-gantt.src.js"]._modules=e,e["masters/highcharts-gantt.src.js"]});//# sourceMappingURL=highcharts-gantt.js.map