/*
 Highcharts JS v7.1.1 (2019-04-09)

 Data module

 (c) 2012-2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(m){"object"===typeof module&&module.exports?(m["default"]=m,module.exports=m):"function"===typeof define&&define.amd?define("highcharts/modules/data",["highcharts"],function(x){m(x);m.Highcharts=x;return m}):m("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(m){function x(g,m,n,p){g.hasOwnProperty(m)||(g[m]=p.apply(null,n))}m=m?m._modules:{};x(m,"mixins/ajax.js",[m["parts/Globals.js"]],function(g){g.ajax=function(m){var n=g.merge(!0,{url:!1,type:"GET",dataType:"json",success:!1,
error:!1,data:!1,headers:{}},m);m={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"};var p=new XMLHttpRequest;if(!n.url)return!1;p.open(n.type.toUpperCase(),n.url,!0);p.setRequestHeader("Content-Type",m[n.dataType]||m.text);g.objectEach(n.headers,function(g,m){p.setRequestHeader(m,g)});p.onreadystatechange=function(){var g;if(4===p.readyState){if(200===p.status){g=p.responseText;if("json"===n.dataType)try{g=JSON.parse(g)}catch(C){n.error&&n.error(p,
C);return}return n.success&&n.success(g)}n.error&&n.error(p,p.responseText)}};try{n.data=JSON.stringify(n.data)}catch(H){}p.send(n.data||!0)}});x(m,"modules/data.src.js",[m["parts/Globals.js"]],function(g){var m=g.addEvent,n=g.Chart,p=g.win.document,x=g.objectEach,C=g.pick,D=g.isNumber,z=g.merge,F=g.splat,G=g.fireEvent,y,A=function(a,b,d){this.init(a,b,d)};g.extend(A.prototype,{init:function(a,b,d){var e=a.decimalPoint,f;b&&(this.chartOptions=b);d&&(this.chart=d);"."!==e&&","!==e&&(e=void 0);this.options=
a;this.columns=a.columns||this.rowsToColumns(a.rows)||[];this.firstRowAsNames=C(a.firstRowAsNames,this.firstRowAsNames,!0);this.decimalRegex=e&&new RegExp("^(-?[0-9]+)"+e+"([0-9]+)$");this.rawColumns=[];this.columns.length&&(this.dataFound(),f=!0);this.hasURLOption(a)&&(clearTimeout(this.liveDataTimeout),f=!1);f||(f=this.fetchLiveData());f||(f=!!this.parseCSV().length);f||(f=!!this.parseTable().length);f||(f=this.parseGoogleSpreadsheet());!f&&a.afterComplete&&a.afterComplete()},hasURLOption:function(a){return!(!a||
!(a.rowsURL||a.csvURL||a.columnsURL))},getColumnDistribution:function(){var a=this.chartOptions,b=this.options,d=[],e=function(a){return(g.seriesTypes[a||"line"].prototype.pointArrayMap||[0]).length},f=a&&a.chart&&a.chart.type,c=[],k=[],q=0,b=b&&b.seriesMapping||a&&a.series&&a.series.map(function(){return{x:0}})||[],h;(a&&a.series||[]).forEach(function(a){c.push(e(a.type||f))});b.forEach(function(a){d.push(a.x||0)});0===d.length&&d.push(0);b.forEach(function(b){var d=new y,m=c[q]||e(f),t=g.seriesTypes[((a&&
a.series||[])[q]||{}).type||f||"line"].prototype.pointArrayMap||["y"];d.addColumnReader(b.x,"x");x(b,function(a,b){"x"!==b&&d.addColumnReader(a,b)});for(h=0;h<m;h++)d.hasReader(t[h])||d.addColumnReader(void 0,t[h]);k.push(d);q++});b=g.seriesTypes[f||"line"].prototype.pointArrayMap;void 0===b&&(b=["y"]);this.valueCount={global:e(f),xColumns:d,individual:c,seriesBuilders:k,globalPointArrayMap:b}},dataFound:function(){this.options.switchRowsAndColumns&&(this.columns=this.rowsToColumns(this.columns));
this.getColumnDistribution();this.parseTypes();!1!==this.parsed()&&this.complete()},parseCSV:function(a){function b(a,b,d,c){function f(b){l=a[b];r=a[b-1];E=a[b+1]}function e(a){u.length<t+1&&u.push([a]);u[t][u[t].length-1]!==a&&u[t].push(a)}function h(){g>n||n>m?(++n,w=""):(!isNaN(parseFloat(w))&&isFinite(w)?(w=parseFloat(w),e("number")):isNaN(Date.parse(w))?e("string"):(w=w.replace(/\//g,"-"),e("date")),q.length<t+1&&q.push([]),d||(q[t][b]=w),w="",++t,++n)}var k=0,l="",r="",E="",w="",n=0,t=0;if(a.trim().length&&
"#"!==a.trim()[0]){for(;k<a.length;k++){f(k);if("#"===l){h();return}if('"'===l)for(f(++k);k<a.length&&('"'!==l||'"'===r||'"'===E);){if('"'!==l||'"'===l&&'"'!==r)w+=l;f(++k)}else c&&c[l]?c[l](l,w)&&h():l===B?h():w+=l}h()}}function d(a){var b=0,d=0,e=!1;a.some(function(a,c){var f=!1,e,l,k="";if(13<c)return!0;for(var h=0;h<a.length;h++){c=a[h];e=a[h+1];l=a[h-1];if("#"===c)break;if('"'===c)if(f){if('"'!==l&&'"'!==e){for(;" "===e&&h<a.length;)e=a[++h];"undefined"!==typeof v[e]&&v[e]++;f=!1}}else f=!0;
else"undefined"!==typeof v[c]?(k=k.trim(),isNaN(Date.parse(k))?!isNaN(k)&&isFinite(k)||v[c]++:v[c]++,k=""):k+=c;","===c&&d++;"."===c&&b++}});e=v[";"]>v[","]?";":",";c.decimalPoint||(c.decimalPoint=b>d?".":",",f.decimalRegex=new RegExp("^(-?[0-9]+)"+c.decimalPoint+"([0-9]+)$"));return e}function e(a,b){var d,e,k=0,h=!1,q=[],g=[],l;if(!b||b>a.length)b=a.length;for(;k<b;k++)if("undefined"!==typeof a[k]&&a[k]&&a[k].length)for(d=a[k].trim().replace(/\//g," ").replace(/\-/g," ").replace(/\./g," ").split(" "),
e=["","",""],l=0;l<d.length;l++)l<e.length&&(d[l]=parseInt(d[l],10),d[l]&&(g[l]=!g[l]||g[l]<d[l]?d[l]:g[l],"undefined"!==typeof q[l]?q[l]!==d[l]&&(q[l]=!1):q[l]=d[l],31<d[l]?e[l]=100>d[l]?"YY":"YYYY":12<d[l]&&31>=d[l]?(e[l]="dd",h=!0):e[l].length||(e[l]="mm")));if(h){for(l=0;l<q.length;l++)!1!==q[l]?12<g[l]&&"YY"!==e[l]&&"YYYY"!==e[l]&&(e[l]="YY"):12<g[l]&&"mm"===e[l]&&(e[l]="dd");3===e.length&&"dd"===e[1]&&"dd"===e[2]&&(e[2]="YY");a=e.join("/");return(c.dateFormats||f.dateFormats)[a]?a:(G("deduceDateFailed"),
"YYYY/mm/dd")}return"YYYY/mm/dd"}var f=this,c=a||this.options,k=c.csv,q;a="undefined"!==typeof c.startRow&&c.startRow?c.startRow:0;var h=c.endRow||Number.MAX_VALUE,g="undefined"!==typeof c.startColumn&&c.startColumn?c.startColumn:0,m=c.endColumn||Number.MAX_VALUE,B,t=0,u=[],v={",":0,";":0,"\t":0};q=this.columns=[];k&&c.beforeParse&&(k=c.beforeParse.call(this,k));if(k){k=k.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(c.lineDelimiter||"\n");if(!a||0>a)a=0;if(!h||h>=k.length)h=k.length-1;c.itemDelimiter?
B=c.itemDelimiter:(B=null,B=d(k));for(var n=0,t=a;t<=h;t++)"#"===k[t][0]?n++:b(k[t],t-a-n);c.columnTypes&&0!==c.columnTypes.length||!u.length||!u[0].length||"date"!==u[0][1]||c.dateFormat||(c.dateFormat=e(q[0]));this.dataFound()}return q},parseTable:function(){var a=this.options,b=a.table,d=this.columns,e=a.startRow||0,f=a.endRow||Number.MAX_VALUE,c=a.startColumn||0,k=a.endColumn||Number.MAX_VALUE;b&&("string"===typeof b&&(b=p.getElementById(b)),[].forEach.call(b.getElementsByTagName("tr"),function(a,
b){b>=e&&b<=f&&[].forEach.call(a.children,function(a,f){("TD"===a.tagName||"TH"===a.tagName)&&f>=c&&f<=k&&(d[f-c]||(d[f-c]=[]),d[f-c][b-e]=a.innerHTML)})}),this.dataFound());return d},fetchLiveData:function(){function a(h){function m(q,m,t){function u(){c&&d.liveDataURL===q&&(b.liveDataTimeout=setTimeout(a,k))}if(!q||0!==q.indexOf("http"))return q&&e.error&&e.error("Invalid URL"),!1;h&&(clearTimeout(b.liveDataTimeout),d.liveDataURL=q);g.ajax({url:q,dataType:t||"json",success:function(a){d&&d.series&&
m(a);u()},error:function(a,b){3>++f&&u();return e.error&&e.error(b,a)}});return!0}m(q.csvURL,function(a){d.update({data:{csv:a}})},"text")||m(q.rowsURL,function(a){d.update({data:{rows:a}})})||m(q.columnsURL,function(a){d.update({data:{columns:a}})})}var b=this,d=this.chart,e=this.options,f=0,c=e.enablePolling,k=1E3*(e.dataRefreshRate||2),q=z(e);if(!this.hasURLOption(e))return!1;1E3>k&&(k=1E3);delete e.csvURL;delete e.rowsURL;delete e.columnsURL;a(!0);return this.hasURLOption(e)},parseGoogleSpreadsheet:function(){function a(b){var f=
["https://spreadsheets.google.com/feeds/cells",e,c,"public/values?alt\x3djson"].join("/");g.ajax({url:f,dataType:"json",success:function(c){b(c);d.enablePolling&&setTimeout(function(){a(b)},d.dataRefreshRate)},error:function(a,b){return d.error&&d.error(b,a)}})}var b=this,d=this.options,e=d.googleSpreadsheetKey,f=this.chart,c=d.googleSpreadsheetWorksheet||1,k=d.startRow||0,q=d.endRow||Number.MAX_VALUE,h=d.startColumn||0,m=d.endColumn||Number.MAX_VALUE,n=1E3*(d.dataRefreshRate||2);4E3>n&&(n=4E3);e&&
(delete d.googleSpreadsheetKey,a(function(a){var d=[];a=a.feed.entry;var c,e=(a||[]).length,g=0,n,p,r;if(!a||0===a.length)return!1;for(r=0;r<e;r++)c=a[r],g=Math.max(g,c.gs$cell.col);for(r=0;r<g;r++)r>=h&&r<=m&&(d[r-h]=[]);for(r=0;r<e;r++)c=a[r],g=c.gs$cell.row-1,n=c.gs$cell.col-1,n>=h&&n<=m&&g>=k&&g<=q&&(p=c.gs$cell||c.content,c=null,p.numericValue?c=0<=p.$t.indexOf("/")||0<=p.$t.indexOf("-")?p.$t:0<p.$t.indexOf("%")?100*parseFloat(p.numericValue):parseFloat(p.numericValue):p.$t&&p.$t.length&&(c=
p.$t),d[n-h][g-k]=c);d.forEach(function(a){for(r=0;r<a.length;r++)void 0===a[r]&&(a[r]=null)});f&&f.series?f.update({data:{columns:d}}):(b.columns=d,b.dataFound())}));return!1},trim:function(a,b){"string"===typeof a&&(a=a.replace(/^\s+|\s+$/g,""),b&&/^[0-9\s]+$/.test(a)&&(a=a.replace(/\s/g,"")),this.decimalRegex&&(a=a.replace(this.decimalRegex,"$1.$2")));return a},parseTypes:function(){for(var a=this.columns,b=a.length;b--;)this.parseColumn(a[b],b)},parseColumn:function(a,b){var d=this.rawColumns,
e=this.columns,f=a.length,c,k,g,h,m=this.firstRowAsNames,n=-1!==this.valueCount.xColumns.indexOf(b),p,t=[],u=this.chartOptions,v,x=(this.options.columnTypes||[])[b],u=n&&(u&&u.xAxis&&"category"===F(u.xAxis)[0].type||"string"===x);for(d[b]||(d[b]=[]);f--;)c=t[f]||a[f],g=this.trim(c),h=this.trim(c,!0),k=parseFloat(h),void 0===d[b][f]&&(d[b][f]=g),u||0===f&&m?a[f]=""+g:+h===k?(a[f]=k,31536E6<k&&"float"!==x?a.isDatetime=!0:a.isNumeric=!0,void 0!==a[f+1]&&(v=k>a[f+1])):(g&&g.length&&(p=this.parseDate(c)),
n&&D(p)&&"float"!==x?(t[f]=c,a[f]=p,a.isDatetime=!0,void 0!==a[f+1]&&(c=p>a[f+1],c!==v&&void 0!==v&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,f=a.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):a.unsorted=!0),v=c)):(a[f]=""===g?null:g,0!==f&&(a.isDatetime||a.isNumeric)&&(a.mixed=!0)));n&&a.mixed&&(e[b]=d[b]);if(n&&v&&this.options.sort)for(b=0;b<e.length;b++)e[b].reverse(),m&&e[b].unshift(e[b].pop())},dateFormats:{"YYYY/mm/dd":{regex:/^([0-9]{4})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{1,2})$/,
parser:function(a){return Date.UTC(+a[1],a[2]-1,+a[3])}},"dd/mm/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(a){return Date.UTC(+a[3],a[2]-1,+a[1])},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(a){return Date.UTC(+a[3],a[1]-1,+a[2])}},"dd/mm/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(a){var b=+a[3],b=b>(new Date).getFullYear()-2E3?b+1900:b+2E3;return Date.UTC(b,
a[2]-1,+a[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(a){return Date.UTC(+a[3]+2E3,a[1]-1,+a[2])}}},parseDate:function(a){var b=this.options.parseDate,d,e,f=this.options.dateFormat||this.dateFormat,c;if(b)d=b(a);else if("string"===typeof a){if(f)(b=this.dateFormats[f])||(b=this.dateFormats["YYYY/mm/dd"]),(c=a.match(b.regex))&&(d=b.parser(c));else for(e in this.dateFormats)if(b=this.dateFormats[e],c=a.match(b.regex)){this.dateFormat=
e;this.alternativeFormat=b.alternative;d=b.parser(c);break}c||(c=Date.parse(a),"object"===typeof c&&null!==c&&c.getTime?d=c.getTime()-6E4*c.getTimezoneOffset():D(c)&&(d=c-6E4*(new Date(c)).getTimezoneOffset()))}return d},rowsToColumns:function(a){var b,d,e,f,c;if(a)for(c=[],d=a.length,b=0;b<d;b++)for(f=a[b].length,e=0;e<f;e++)c[e]||(c[e]=[]),c[e][b]=a[b][e];return c},getData:function(){if(this.columns)return this.rowsToColumns(this.columns).slice(1)},parsed:function(){if(this.options.parsed)return this.options.parsed.call(this,
this.columns)},getFreeIndexes:function(a,b){var d,e=[],f=[],c;for(d=0;d<a;d+=1)e.push(!0);for(a=0;a<b.length;a+=1)for(c=b[a].getReferencedColumnIndexes(),d=0;d<c.length;d+=1)e[c[d]]=!1;for(d=0;d<e.length;d+=1)e[d]&&f.push(d);return f},complete:function(){var a=this.columns,b,d=this.options,e,f,c,k,g=[],h;if(d.complete||d.afterComplete){if(this.firstRowAsNames)for(c=0;c<a.length;c++)a[c].name=a[c].shift();e=[];f=this.getFreeIndexes(a.length,this.valueCount.seriesBuilders);for(c=0;c<this.valueCount.seriesBuilders.length;c++)h=
this.valueCount.seriesBuilders[c],h.populateColumns(f)&&g.push(h);for(;0<f.length;){h=new y;h.addColumnReader(0,"x");c=f.indexOf(0);-1!==c&&f.splice(c,1);for(c=0;c<this.valueCount.global;c++)h.addColumnReader(void 0,this.valueCount.globalPointArrayMap[c]);h.populateColumns(f)&&g.push(h)}0<g.length&&0<g[0].readers.length&&(h=a[g[0].readers[0].columnIndex],void 0!==h&&(h.isDatetime?b="datetime":h.isNumeric||(b="category")));if("category"===b)for(c=0;c<g.length;c++)for(h=g[c],f=0;f<h.readers.length;f++)"x"===
h.readers[f].configName&&(h.readers[f].configName="name");for(c=0;c<g.length;c++){h=g[c];f=[];for(k=0;k<a[0].length;k++)f[k]=h.read(a,k);e[c]={data:f};h.name&&(e[c].name=h.name);"category"===b&&(e[c].turboThreshold=0)}a={series:e};b&&(a.xAxis={type:b},"category"===b&&(a.xAxis.uniqueNames=!1));d.complete&&d.complete(a);d.afterComplete&&d.afterComplete(a)}},update:function(a,b){var d=this.chart;a&&(a.afterComplete=function(a){a&&(a.xAxis&&d.xAxis[0]&&a.xAxis.type===d.xAxis[0].options.type&&delete a.xAxis,
d.update(a,b,!0))},z(!0,this.options,a),this.init(this.options))}});g.Data=A;g.data=function(a,b,d){return new A(a,b,d)};m(n,"init",function(a){var b=this,d=a.args[0],e=a.args[1];d&&d.data&&!b.hasDataDef&&(b.hasDataDef=!0,b.data=new A(g.extend(d.data,{afterComplete:function(a){var c,f;if(d.hasOwnProperty("series"))if("object"===typeof d.series)for(c=Math.max(d.series.length,a&&a.series?a.series.length:0);c--;)f=d.series[c]||{},d.series[c]=z(f,a&&a.series?a.series[c]:{});else delete d.series;d=z(a,
d);b.init(d,e)}}),d,b),a.preventDefault())});y=function(){this.readers=[];this.pointIsArray=!0};y.prototype.populateColumns=function(a){var b=!0;this.readers.forEach(function(b){void 0===b.columnIndex&&(b.columnIndex=a.shift())});this.readers.forEach(function(a){void 0===a.columnIndex&&(b=!1)});return b};y.prototype.read=function(a,b){var d=this.pointIsArray,e=d?[]:{},f;this.readers.forEach(function(c){var f=a[c.columnIndex][b];d?e.push(f):0<c.configName.indexOf(".")?g.Point.prototype.setNestedProperty(e,
f,c.configName):e[c.configName]=f});void 0===this.name&&2<=this.readers.length&&(f=this.getReferencedColumnIndexes(),2<=f.length&&(f.shift(),f.sort(function(a,b){return a-b}),this.name=a[f.shift()].name));return e};y.prototype.addColumnReader=function(a,b){this.readers.push({columnIndex:a,configName:b});"x"!==b&&"y"!==b&&void 0!==b&&(this.pointIsArray=!1)};y.prototype.getReferencedColumnIndexes=function(){var a,b=[],d;for(a=0;a<this.readers.length;a+=1)d=this.readers[a],void 0!==d.columnIndex&&b.push(d.columnIndex);
return b};y.prototype.hasReader=function(a){var b,d;for(b=0;b<this.readers.length;b+=1)if(d=this.readers[b],d.configName===a)return!0}});x(m,"masters/modules/data.src.js",[],function(){})});
//# sourceMappingURL=data.js.map
