/* Highcharts JS v8.0.4 (2020-03-10) Exporting module (c) 2010-2019 Torstein Honsi License: www.highcharts.com/license */ (function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/export-data",["highcharts","highcharts/modules/exporting"],function(k){c(k);c.Highcharts=k;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function k(b,a,c,u){b.hasOwnProperty(a)||(b[a]=u.apply(null,c))}c=c?c._modules:{};k(c,"mixins/ajax.js",[c["parts/Globals.js"],c["parts/Utilities.js"]],function(b,a){var c=a.merge, u=a.objectEach;b.ajax=function(b){var a=c(!0,{url:!1,type:"get",dataType:"json",success:!1,error:!1,data:!1,headers:{}},b);b={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"};var d=new XMLHttpRequest;if(!a.url)return!1;d.open(a.type.toUpperCase(),a.url,!0);a.headers["Content-Type"]||d.setRequestHeader("Content-Type",b[a.dataType]||b.text);u(a.headers,function(a,b){d.setRequestHeader(b,a)});d.onreadystatechange=function(){if(4===d.readyState){if(200=== d.status){var b=d.responseText;if("json"===a.dataType)try{b=JSON.parse(b)}catch(e){a.error&&a.error(d,e);return}return a.success&&a.success(b)}a.error&&a.error(d,d.responseText)}};try{a.data=JSON.stringify(a.data)}catch(A){}d.send(a.data||!0)};b.getJSON=function(a,c){b.ajax({url:a,success:c,dataType:"json",headers:{"Content-Type":"text/plain"}})}});k(c,"mixins/download-url.js",[c["parts/Globals.js"]],function(b){var a=b.win,c=a.navigator,u=a.document,k=a.URL||a.webkitURL||a,v=/Edge\/\d+/.test(c.userAgent); b.dataURLtoBlob=function(b){if((b=b.match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3c.userAgent.indexOf("Chrome"), e=d.URL||d.webkitURL||d;try{if(c.msSaveOrOpenBlob&&d.MSBlobBuilder){var p=new d.MSBlobBuilder;p.append(a);return p.getBlob("image/svg+xml")}if(!m)return e.createObjectURL(new d.Blob(["\ufeff"+a],{type:b}))}catch(G){}}var k=a.defined,F=a.extend,v=a.pick,d=b.win,A=d.document,e=b.seriesTypes,f=b.downloadURL,z=b.fireEvent;b.setOptions({exporting:{csv:{columnHeaderFormatter:null,dateFormat:"%Y-%m-%d %H:%M:%S",decimalPoint:null,itemDelimiter:null,lineDelimiter:"\n"},showTable:!1,useMultiLevelHeaders:!0, useRowspanHeaders:!0},lang:{downloadCSV:"Download CSV",downloadXLS:"Download XLS",viewData:"View data table"}});b.addEvent(b.Chart,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&!this.options.chart.forExport&&this.viewData()});b.Chart.prototype.setUpKeyToAxis=function(){e.arearange&&(e.arearange.prototype.keyToAxis={low:"y",high:"y"});e.gantt&&(e.gantt.prototype.keyToAxis={start:"x",end:"x"})};b.Chart.prototype.getDataRows=function(a){var c=this.hasParallelCoordinates, d=this.time,e=this.options.exporting&&this.options.exporting.csv||{},m=this.xAxis,p={},f=[],B=[],w=[],r,C=function(h,c,d){if(e.columnHeaderFormatter){var g=e.columnHeaderFormatter(h,c,d);if(!1!==g)return g}return h?h instanceof b.Axis?h.options.title&&h.options.title.text||(h.isDatetimeAxis?"DateTime":"Category"):a?{columnTitle:1',c=this.options,d=a?(1.1).toLocaleString()[1]:".",e=v(c.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(e);var f=0,k=e?a.shift():null,m=a.shift(),w=function(a,b,c,e){var g=v(e,"");b="text"+(b?" "+b:"");"number"===typeof g?(g=g.toString(),","===d&&(g=g.replace(".",d)),b="number"):e||(b="empty");return"<"+a+(c?" "+c:"")+' class="'+b+'">'+g+""};!1!==c.exporting.tableCaption&&(b+= ''+v(c.exporting.tableCaption,c.title.text?c.title.text.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/"):"Chart")+"");for(var r=0,u=a.length;rf&&(f=a[r].length);b+=function(a,b,d){var f="",g=0;d=d||b&&b.length;var l,k=0;if(l=e&&a&&b){a:if(l=a.length,b.length===l){for(;l--;)if(a[l]!==b[l]){l=!1;break a}l=!0}else l=!1;l=!l}if(l){for(f+="";g< d;++g){l=a[g];var m=a[g+1];l===m?++k:k?(f+=w("th","highcharts-table-topheading",'scope="col" colspan="'+(k+1)+'"',l),k=0):(l===b[g]?c.exporting.useRowspanHeaders?(m=2,delete b[g]):(m=1,b[g]=""):m=1,f+=w("th","highcharts-table-topheading",'scope="col"'+(1"}return f+""}(k,m,Math.max(f,m.length));b+="";a.forEach(function(a){b+= "";for(var c=0;c"});b+="";a={html:b};z(this,"afterGetTable",a);return a.html};b.Chart.prototype.downloadCSV=function(){var a=this.getCSV(!0);f(c(a,"text/csv")||"data:text/csv,\ufeff"+encodeURIComponent(a),this.getFilename()+".csv")};b.Chart.prototype.downloadXLS=function(){var a='\x3c!--[if gte mso 9]>Ark1td{border:none;font-family: Calibri, sans-serif;} .number{mso-number-format:"0.00";} .text{ mso-number-format:"@";}'+ this.getTable(!0)+"";f(c(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+d.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};b.Chart.prototype.viewData=function(){this.dataTableDiv||(this.dataTableDiv=A.createElement("div"),this.dataTableDiv.className="highcharts-data-table",this.renderTo.parentNode.insertBefore(this.dataTableDiv,this.renderTo.nextSibling));this.dataTableDiv.innerHTML=this.getTable();z(this,"afterViewData",this.dataTableDiv)};if(a= b.getOptions().exporting)F(a.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.viewData()}}}),a.buttons&&a.buttons.contextButton.menuItems.push("separator","downloadCSV","downloadXLS","viewData");e.map&&(e.map.prototype.exportKey="name");e.mapbubble&&(e.mapbubble.prototype.exportKey="name");e.treemap&&(e.treemap.prototype.exportKey= "name")});k(c,"masters/modules/export-data.src.js",[],function(){})}); //# sourceMappingURL=export-data.js.map