highcharts
Version:
JavaScript charting framework
13 lines • 19.3 kB
JavaScript
!/**
* Highcharts JS v12.6.0 (2026-04-13)
* @module highcharts/modules/data
* @requires highcharts
*
* Data module
*
* (c) 2012-2026 Highsoft AS
* Author: Torstein Hønsi
*
* A commercial license may be required depending on use.
* See www.highcharts.com/license
*/function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.Axis,e._Highcharts.Chart,e._Highcharts.Point,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/data",["highcharts/highcharts"],function(e){return t(e,e.Axis,e.Chart,e.Point,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/data"]=t(e._Highcharts,e._Highcharts.Axis,e._Highcharts.Chart,e._Highcharts.Point,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.Axis,e.Highcharts.Chart,e.Highcharts.Point,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(e,t,r,s,n)=>(()=>{"use strict";var i={260:e=>{e.exports=s},512:e=>{e.exports=n},532:e=>{e.exports=t},944:t=>{t.exports=e},960:e=>{e.exports=r}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return i[e](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};o.d(l,{default:()=>q});var h=o(944),u=o.n(h);let{doc:c,win:d}=u();function p(e,t,r,s={}){let n="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(n,"hcEvents")||(n.hcEvents={});let i=n.hcEvents;u().Point&&e instanceof u().Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);let a=e.addEventListener;a&&a.call(e,t,r,!!u().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==t.indexOf("touch"):s.passive,capture:!1}),i[t]||(i[t]=[]);let o={fn:r,order:"number"==typeof s.order?s.order:1/0};return i[t].push(o),i[t].sort((e,t)=>e.order-t.order),function(){!function(e,t,r){function s(t,r){let s=e.removeEventListener;s&&s.call(e,t,r,!1)}function n(r){let n,i;e.nodeName&&(t?(n={})[t]=!0:n=r,N(n,function(e,t){if(r[t])for(i=r[t].length;i--;)s(t,r[t][i].fn)}))}let i="function"==typeof e&&e.prototype||e;if(Object.hasOwnProperty.call(i,"hcEvents")){let e=i.hcEvents;if(t){let i=e[t]||[];r?(e[t]=i.filter(function(e){return r!==e.fn}),s(t,r)):(n(e),e[t]=[])}else n(e),delete i.hcEvents}}(e,t,r)}}function f(e){return null!=e}function m(e,t){let r;for(r in e||(e={}),t)e[r]=t[r];return e}function g(e){f(e)&&clearTimeout(e)}function x(e){return C(e)&&"number"==typeof e.nodeType}function y(e){return"number"==typeof e&&!isNaN(e)&&e<1/0&&e>-1/0}function v(e){let t=Object.prototype.toString.call(e);return"[object Array]"===t||"[object Array Iterator]"===t}function C(e,t){return!!e&&"object"==typeof e&&(!t||!v(e))}function T(e,...t){let r,s=[e,...t],n={},i=function(e,t){return"object"!=typeof e&&(e={}),N(t,function(r,s){if("__proto__"!==s&&"constructor"!==s){let n;!C(r,!0)||(n=r?.constructor,C(r,!0)&&!x(r)&&n?.name&&"Object"!==n.name)||x(r)?e[s]=t[s]:e[s]=i(e[s]||{},r)}}),e};!0===e&&(n=s[1],s=Array.prototype.slice.call(s,2));let a=s.length;for(r=0;r<a;r++)n=i(n,s[r]);return n}function N(e,t,r){for(let s in e)Object.hasOwnProperty.call(e,s)&&t.call(r||e[s],e[s],s,e)}function R(){let e=arguments,t=e.length;for(let r=0;r<t;r++){let t=e[r];if(null!=t)return t}}Array.prototype.find;let{win:A}=u(),w={ajax:function(e){let t={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"},r=new XMLHttpRequest;function s(t,r){e.error&&e.error(t,r)}if(!e.url)return!1;r.open((e.type||"get").toUpperCase(),e.url,!0),e.headers?.["Content-Type"]||r.setRequestHeader("Content-Type",t[e.dataType||"json"]||t.text),N(e.headers,function(e,t){r.setRequestHeader(t,e)}),e.responseType&&(r.responseType=e.responseType),r.onreadystatechange=function(){let t;if(4===r.readyState){if(200===r.status){if("blob"!==e.responseType&&(t=r.responseText,"json"===e.dataType))try{t=JSON.parse(t)}catch(e){if(e instanceof Error)return s(r,e)}return e.success?.(t,r)}s(r,r.responseText)}},e.data&&"string"!=typeof e.data&&(e.data=JSON.stringify(e.data)),r.send(e.data)},getJSON:function(e,t){w.ajax({url:e,success:t,dataType:"json",headers:{"Content-Type":"text/plain"}})}};w.post=async function(e,t,r){let s=new A.FormData;N(t,function(e,t){s.append(t,e)}),s.append("b64","true");let n=await A.fetch(e,{method:"POST",body:s,...r});if(n.ok){let e=await n.text(),r=document.createElement("a");r.href=`data:${t.type};base64,${e}`,r.download=t.filename,r.click(),r?.parentElement?.removeChild(r)}};var E=o(532),b=o.n(E),D=o(960),O=o.n(D),Y=o(260),U=o.n(Y),j=o(512),F=o.n(j);let{getOptions:P}=u(),{doc:H}=u(),{ajax:S}=w,{seriesTypes:L}=F();function I(e){return!!(e&&(e.rowsURL||e.csvURL||e.columnsURL))}class M{static data(e,t={},r){return new M(e,t,r)}static rowsToColumns(e){let t,r,s,n,i;if(e)for(t=0,i=[],r=e.length;t<r;t++)for(s=0,n=e[t].length;s<n;s++)i[s]||(i[s]=[]),i[s][t]=e[t][s];return i}constructor(e,t={},r){this.rowsToColumns=M.rowsToColumns,this.dateFormats={"YYYY/mm/dd":{regex:/^(\d{4})[\-\/\.](\d{1,2})[\-\/\.](\d{1,2})$/,parser:function(e){return e?Date.UTC(+e[1],e[2]-1,+e[3]):NaN}},"dd/mm/YYYY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{4})$/,parser:function(e){return e?Date.UTC(+e[3],e[2]-1,+e[1]):NaN},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{4})$/,parser:function(e){return e?Date.UTC(+e[3],e[1]-1,+e[2]):NaN}},"dd/mm/YY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{2})$/,parser:function(e){if(!e)return NaN;let t=new Date,r=+e[3];return r>t.getFullYear()-2e3?r+=1900:r+=2e3,Date.UTC(r,e[2]-1,+e[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{2})$/,parser:function(e){return e?Date.UTC(+e[3]+2e3,e[1]-1,+e[2]):NaN}}},this.chart=r,this.chartOptions=t,this.options=e,this.rawColumns=[],this.init(e,t,r)}init(e,t,r){let s=e.decimalPoint,n;t&&(this.chartOptions=t),r&&(this.chart=r),"."!==s&&","!==s&&(s=void 0),this.options=e,this.columns=e.columns||this.rowsToColumns(e.rows)||[],this.firstRowAsNames=R(e.firstRowAsNames,this.firstRowAsNames,!0),this.decimalRegex=s&&RegExp("^(-?[0-9]+)"+s+"([0-9]+)$"),void 0!==this.liveDataTimeout&&g(this.liveDataTimeout),this.rawColumns=[],this.columns.length&&(this.dataFound(),n=!I(e)),n||(n=this.fetchLiveData()),n||(n=!!this.parseCSV().length),n||(n=!!this.parseTable().length),n||(n=this.parseGoogleSpreadsheet()),!n&&e.afterComplete&&e.afterComplete(this)}getColumnDistribution(){let e=this.chartOptions,t=this.options,r=[],s=function(e="line"){return(L[e].prototype.pointArrayMap||[0]).length},n=function(e="line"){return L[e].prototype.pointArrayMap},i=e?.chart?.type,a=[],o=[],l=t?.seriesMapping||e?.series?.map(function(){return{x:0}})||[],h=0;(e?.series||[]).forEach(e=>{a.push(s(e.type||i))}),l.forEach(e=>{r.push(e.x||0)}),0===r.length&&r.push(0),l.forEach(t=>{let r=new _,l=a[h]||s(i),u=(e?.series??[])[h]??{},c=n(u.type||i),d=c??["y"];(f(t.x)||u.isCartesian||!c)&&r.addColumnReader(t.x,"x"),N(t,function(e,t){"x"!==t&&r.addColumnReader(e,t)});for(let e=0;e<l;e++)r.hasReader(d[e])||r.addColumnReader(void 0,d[e]);o.push(r),h++});let u=n(i);void 0===u&&(u=["y"]),this.valueCount={global:s(i),xColumns:r,individual:a,seriesBuilders:o,globalPointArrayMap:u}}dataFound(){this.options.switchRowsAndColumns&&(this.columns=this.rowsToColumns(this.columns)),this.getColumnDistribution(),this.parseTypes(),!1!==this.parsed()&&this.complete()}parseCSV(e){let t=this,r=this.columns=[],s=e||this.options,n=s.startColumn||0,i=s.endColumn||Number.MAX_VALUE,a=[],o={",":0,";":0," ":0},l=s.csv,h=s.startRow||0,d=s.endRow||Number.MAX_VALUE,p,f,g=0;if(l&&s.beforeParse&&(l=s.beforeParse.call(this,l,this)),l){if(f=l.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(s.lineDelimiter||"\n"),(!h||h<0)&&(h=0),(!d||d>=f.length)&&(d=f.length-1),s.itemDelimiter)p=s.itemDelimiter;else{let e,r,n;e=0,r=0,n=!1,f.some(function(t,s){let n=!1,i,a,l,h="";if(s>13)return!0;for(let s=0;s<t.length;s++){if(i=t[s],a=t[s+1],l=t[s-1],"#"===i)return;if('"'===i)if(n){if('"'!==l&&'"'!==a){for(;" "===a&&s<t.length;)a=t[++s];void 0!==o[a]&&o[a]++,n=!1}}else n=!0;else void 0!==o[i]?(isNaN(Date.parse(h=h.trim()))?(isNaN(h)||!isFinite(h))&&o[i]++:o[i]++,h=""):h+=i;","===i&&r++,"."===i&&e++}}),o[";"]>o[","]?n=";":(o[","],o[";"],n=","),s.decimalPoint||(e>r?s.decimalPoint=".":s.decimalPoint=",",t.decimalRegex=RegExp("^(-?[0-9]+)"+s.decimalPoint+"([0-9]+)$")),p=n}let e=0;for(g=h;g<=d;g++)"#"===f[g][0]?e++:function(e,t,o,l){let h=0,u="",c="",d="",f="",m=0,g=0;function x(t){u=e[t],c=e[t-1],d=e[t+1]}function y(e){a.length<g+1&&a.push([e]),a[g][a[g].length-1]!==e&&a[g].push(e)}function v(){if(n>m||m>i){++m,f="";return}s.columnTypes||(!isNaN(parseFloat(f))&&isFinite(f)?(f=parseFloat(f),y("number")):isNaN(Date.parse(f))?y("string"):(f=f.replace(/\//g,"-"),y("date"))),r.length<g+1&&r.push([]),r[g][t]=f,f="",++g,++m}if(e.trim().length&&"#"!==e.trim()[0]){for(;h<e.length;h++)if(x(h),'"'===u)for(x(++h);h<e.length&&('"'!==u||'"'===c||'"'===d);)('"'!==u||'"'===u&&'"'!==c)&&(f+=u),x(++h);else u===p?v():f+=u;v()}}(f[g],g-h-e);(!s.columnTypes||0===s.columnTypes.length)&&a.length&&a[0].length&&"date"===a[0][1]&&!s.dateFormat&&(s.dateFormat=function(e,r){let n="YYYY/mm/dd",i=[],a=[],o,l=[],h,d=0,p=!1,f;for((!r||r>e.length)&&(r=e.length);d<r;d++)if(void 0!==e[d]&&e[d]?.length)for(f=0,o=e[d].trim().replace(/\//g," ").replace(/\-/g," ").replace(/\./g," ").split(" "),l=["","",""];f<o.length;f++)f<l.length&&(o[f]=parseInt(o[f],10),o[f]&&(a[f]=!a[f]||a[f]<o[f]?o[f]:a[f],void 0!==i[f]?i[f]!==o[f]&&(i[f]=!1):i[f]=o[f],o[f]>31?o[f]<100?l[f]="YY":l[f]="YYYY":o[f]>12&&o[f]<=31?(l[f]="dd",p=!0):l[f].length||(l[f]="mm")));if(p){for(f=0;f<i.length;f++)!1!==i[f]?a[f]>12&&"YY"!==l[f]&&"YYYY"!==l[f]&&(l[f]="YY"):a[f]>12&&"mm"===l[f]&&(l[f]="dd");return(3===l.length&&"dd"===l[1]&&"dd"===l[2]&&(l[2]="YY"),h=l.join("/"),(s.dateFormats||t.dateFormats)[h])?h:(!function(e,t,r,s){if(r=r||{},c?.createEvent&&(e.dispatchEvent||e.fireEvent&&e!==u())){let s=c.createEvent("Events");s.initEvent(t,!0,!0),r=m(s,r),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(t,r)}else if(e.hcEvents){r.target||m(r,{preventDefault:function(){r.defaultPrevented=!0},target:e,type:t});let s=[],n=e,i=!1;for(;n.hcEvents;)Object.hasOwnProperty.call(n,"hcEvents")&&n.hcEvents[t]&&(s.length&&(i=!0),s.unshift.apply(s,n.hcEvents[t])),n=Object.getPrototypeOf(n);i&&s.sort((e,t)=>e.order-t.order),s.forEach(t=>{!1===t.fn.call(e,r,e)&&r.preventDefault()})}}(t,"deduceDateFailed"),n)}return n}(r[0])),this.dataFound()}return r}parseTable(){let e=this.options,t=this.columns||[],r=e.startRow||0,s=e.endRow||Number.MAX_VALUE,n=e.startColumn||0,i=e.endColumn||Number.MAX_VALUE;if(e.table){let a=e.table;"string"==typeof a&&(a=H.getElementById(a)),[].forEach.call(a.getElementsByTagName("tr"),(e,a)=>{a>=r&&a<=s&&[].forEach.call(e.children,(e,s)=>{let o=t[s-n],l=1;if(("TD"===e.tagName||"TH"===e.tagName)&&s>=n&&s<=i)for(t[s-n]||(t[s-n]=[]),t[s-n][a-r]=e.innerHTML;a-r>=l&&void 0===o[a-r-l];)o[a-r-l]=null,l++})}),this.dataFound()}return t}fetchLiveData(){let e=this,t=this.chart,r=this.options,s=r.enablePolling,n=T(r),i=0,a=1e3*(r.dataRefreshRate||2);return!!I(r)&&(a<1e3&&(a=1e3),delete r.csvURL,delete r.rowsURL,delete r.columnsURL,!function o(l){function h(n,h,u){if(!n||!/^(http|\/|\.\/|\.\.\/)/.test(n))return n&&r.error&&r.error("Invalid URL"),!1;function c(){s&&t.liveDataURL===n&&(e.liveDataTimeout=setTimeout(o,a))}return l&&(g(e.liveDataTimeout),t.liveDataURL=n),S({url:n,dataType:u||"json",success:function(e){t?.series&&h(e),c()},error:function(e,t){return++i<3&&c(),r.error?.(t,e)}}),!0}h(n.csvURL,function(e){t.update({data:{csv:e}})},"text")||h(n.rowsURL,function(e){t.update({data:{rows:e}})})||h(n.columnsURL,function(e){t.update({data:{columns:e}})})}(!0),I(r))}parseGoogleSpreadsheet(){let e=this,t=this.options,r=t.googleSpreadsheetKey,s=this.chart,n=Math.max(1e3*(t.dataRefreshRate||2),4e3);return r&&(delete t.googleSpreadsheetKey,!function s(i){S({url:["https://sheets.googleapis.com/v4/spreadsheets",r,"values",(()=>{if(t.googleSpreadsheetRange)return t.googleSpreadsheetRange;let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=(e.charAt(t.startColumn||0)||"A")+((t.startRow||0)+1),s=e.charAt(R(t.endColumn,-1))||"ZZ";return f(t.endRow)&&(s+=t.endRow+1),`${r}:${s}`})(),"?alt=json&majorDimension=COLUMNS&valueRenderOption=UNFORMATTED_VALUE&dateTimeRenderOption=FORMATTED_STRING&key="+t.googleAPIKey].join("/"),dataType:"json",success:function(r){i(r),t.enablePolling&&(e.liveDataTimeout=setTimeout(function(){s(i)},n))},error:function(e,r){return t.error?.(r,e)}})}(function(t){let r=t.values;if(!r||0===r.length)return!1;let n=r.reduce((e,t)=>Math.max(e,t.length),0);r.forEach(e=>{for(let t=0;t<n;t++)void 0===e[t]&&(e[t]=null)}),s?.series?s.update({data:{columns:r}}):(e.columns=r,e.dataFound())})),!1}trim(e,t){return"string"==typeof e&&(e=e.replace(/^\s+|\s+$/g,""),t&&/[\d\s]+/.test(e)&&(e=e.replace(/\s/g,"")),this.decimalRegex&&(e=e.replace(this.decimalRegex,"$1.$2"))),e}parseTypes(){let e=this.columns||[],t=e.length;for(;t--;)this.parseColumn(e[t],t)}parseColumn(e,t){var r;let s=this.rawColumns,n=this.columns=this.columns||[],i=this.firstRowAsNames,a=this.valueCount?.xColumns.indexOf(t)!==-1,o=[],l=this.chartOptions,h=(this.options.columnTypes||[])[t],u=a&&l?.xAxis&&"category"===(v(r=l.xAxis)?r:[r])[0].type||"string"===h,c=f(e.name),d=e.length,p,m,g,x,C,T,N;for(s[t]||(s[t]=[]);d--;)p=o[d]||e[d],g=this.trim(p),m=parseFloat(x=this.trim(p,!0)),void 0===s[t][d]&&(s[t][d]=g),u||0===d&&i&&!c?e[d]=""+g:+x===m?(e[d]=m,m>31536e6&&"float"!==h?e.isDatetime=!0:e.isNumeric=!0,void 0!==e[d+1]&&(N=m>e[d+1])):(g?.length&&(C=this.parseDate(p)),a&&y(C)&&"float"!==h?(o[d]=p,e[d]=C,e.isDatetime=!0,void 0!==e[d+1]&&((T=C>e[d+1])!==N&&void 0!==N&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,d=e.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):e.unsorted=!0),N=T)):(e[d]=""===g?null:g,0!==d&&(e.isDatetime||e.isNumeric)&&(e.mixed=!0)));if(a&&e.mixed&&(n[t]=s[t]),a&&N&&this.options.sort){for(t=0;t<n.length;t++)if(n[t].reverse(),i){let e=n[t].pop();e&&n[t].unshift(e)}}}parseDate(e){let t=this.options.parseDate,r,s,n,i=this.options.dateFormat||this.dateFormat,a;if(t)r=t(e);else if("string"==typeof e){if(i)(n=this.dateFormats[i])||(n=this.dateFormats["YYYY/mm/dd"]),(a=e.match(n.regex))&&(r=n.parser(a));else for(s in this.dateFormats)if(n=this.dateFormats[s],a=e.match(n.regex)){this.dateFormat=i=s,this.alternativeFormat=n.alternative,r=n.parser(a);break}!a&&(e.match(/:.+(GMT|UTC|[Z+\-])/)&&(e=e.replace(/\s*(?:GMT|UTC)?([+\-])(\d\d)(\d\d)$/,"$1$2:$3").replace(/(?:\s+|GMT|UTC)([+\-])/,"$1").replace(/(\d)\s*(?:GMT|UTC|Z)$/,"$1+00:00")),"object"==typeof(a=Date.parse(e))&&null!==a&&a.getTime?r=a.getTime()-6e4*a.getTimezoneOffset():y(a)&&(r=a-6e4*new Date(a).getTimezoneOffset()))}return r}getData(){if(this.columns)return this.rowsToColumns(this.columns)?.slice(1)}parsed(){if(this.options.parsed)return this.options.parsed.call(this,this.columns,this)}complete(){let e=this.columns=this.columns||[],t=this.options,r=[],s="linear",n,i,a,o,l,h,u,c,d,p,m;if([].length=e.length,t.complete||t.afterComplete){if(this.firstRowAsNames)for(a=0;a<e.length;a++){let t=e[a];f(t.name)||(t.name=R(t.shift(),"").toString())}for(h=0,n=[],d=function(e,t){let r,s,n,i=[],a=[];for(s=0;s<e;s+=1)i.push(!0);for(r=0;r<t.length;r+=1)for(s=0,n=t[r].getReferencedColumnIndexes();s<n.length;s+=1)i[n[s]]=!1;for(s=0;s<i.length;s+=1)i[s]&&a.push(s);return a}(e?.length||0,this.valueCount.seriesBuilders);h<this.valueCount.seriesBuilders.length;h++)(c=this.valueCount.seriesBuilders[h]).populateColumns(d)&&r.push(c);for(;d.length>0;){for((c=new _).addColumnReader(0,"x"),-1!==(m=d.indexOf(0))&&d.splice(m,1),a=0;a<this.valueCount.global;a++)c.addColumnReader(void 0,this.valueCount.globalPointArrayMap[a]);c.populateColumns(d)&&r.push(c)}if(r.length>0&&r[0].readers.length>0&&void 0!==(p=e?.[r[0].readers[0].columnIndex??-1])&&(p.isDatetime?s="datetime":p.isNumeric||(s="category")),"category"===s)for(h=0;h<r.length;h++)for(l=0,c=r[h];l<c.readers.length;l++)"x"===c.readers[l].configName&&(c.readers[l].configName="name");for(h=0;h<r.length;h++){for(o=0,c=r[h],i=[];o<e[0].length;o++)i[o]=c.read(e,o);n[h]={data:i,pointStart:i[0]&&(c.pointIsArray?i[0]?.[0]:i[0]?.x)||void 0},c.name&&(n[h].name=c.name),"category"===s&&(n[h].turboThreshold=0,n[h].pointStart=0)}u={series:n},"linear"!==s||this.xAxisOptions&&this.xAxisOptions.type!==s?(this.xAxisOptions={type:s},"category"===s&&(this.xAxisOptions.uniqueNames=!1)):s=this.xAxisOptions=void 0,this.chart||T(!0,u,{xAxis:this.xAxisOptions||{}}),t.complete?.(u),t.afterComplete?.(this,u)}}xAxisUpdateHandler(e){let t=this.xAxisOptions;t&&(!e.options.type&&t.type&&(e.type=t.type),e.options.uniqueNames||!1!==t.uniqueNames||(e.uniqueNames=t.uniqueNames))}update(e,t){let r=this.chart,s=r.options;e&&(e.afterComplete=function(e,s){if(!s)return;let n=r.xAxis[0],i=e.xAxisOptions;i&&n&&(n.type!==i.type&&!n.options.type||n.uniqueNames&&!1===i.uniqueNames&&void 0===n.options.uniqueNames)?n.update({},!1):(s?.series||[]).forEach(function(e){delete e.pointStart}),r.update(s,t,!0)},T(!0,s.data,e),s.data?.googleSpreadsheetKey&&!e.columns&&delete s.data.columns,this.init(s.data||{},s))}}p(b(),"afterSetOptions",function(){this.isXAxis&&(!this.chart.xAxis.length||this.chart.xAxis[0]===this)&&this.chart.data?.xAxisUpdateHandler(this)}),p(O(),"init",function(e){let t=this,r=e.args[1],s=P().data,n=e.args[0]||{};(s||n&&n.data)&&!t.hasDataDef&&(t.hasDataDef=!0,t.data=new M(m(T(s,n.data),{afterComplete:function(e,s){let i,a;if(Object.hasOwnProperty.call(n,"series"))if("object"==typeof n.series)for(i=Math.max(n.series.length,s?.series?.length??0);i--;)a=n.series[i]||{},n.series[i]=T(a,s?.series?.[i]??{});else delete n.series;n=T(s,n),t.data=e,t.init(n,r)}}),n,t),e.preventDefault())});class _{constructor(){this.readers=[],this.pointIsArray=!0}populateColumns(e){let t=!0;return this.readers.forEach(t=>{void 0===t.columnIndex&&(t.columnIndex=e.shift())}),this.readers.forEach(e=>{void 0===e.columnIndex&&(t=!1)}),t}read(e,t){let r=this.pointIsArray,s=r?[]:{};if(this.readers.forEach(n=>{let i=e[n.columnIndex][t];r?s.push(i):n.configName.indexOf(".")>0?U().prototype.setNestedProperty(s,i,n.configName):s[n.configName]=i}),void 0===this.name&&this.readers.length>=2){let t=[];this.readers.forEach(function(e){("x"===e.configName||"name"===e.configName||"y"===e.configName)&&void 0!==e.columnIndex&&t.push(e.columnIndex)}),t.length>=2&&(t.shift(),t.sort(function(e,t){return e-t})),this.name=e[R(t.shift(),0)].name}return s}addColumnReader(e,t){this.readers.push({columnIndex:e,configName:t}),"x"!==t&&"y"!==t&&void 0!==t&&(this.pointIsArray=!1)}getReferencedColumnIndexes(){let e,t,r=[];for(e=0;e<this.readers.length;e+=1)void 0!==(t=this.readers[e]).columnIndex&&r.push(t.columnIndex);return r}hasReader(e){let t;for(t=0;t<this.readers.length;t+=1)if(this.readers[t].configName===e)return!0}}let $=u();$.Data=$.Data||M,$.HttpUtilities=$.HttpUtilities||w,$.ajax=$.HttpUtilities.ajax,$.data=$.Data.data,$.getJSON=$.HttpUtilities.getJSON,$.post=$.HttpUtilities.post;let q=u();return l.default})());