import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/typeof";import o from"@babel/runtime/regenerator";import{HIGHCHARTS_V8_VERSION as i,HIGHCHARTS_V10_VERSION as n}from"./constants.js";import a from"./highcharts-contour.js";import{getHighchartsV8 as s}from"./getHighchartsV8.js";import{getHighchartsV10 as c}from"./getHighchartsV10.js";import h from"dompurify";var p=function r(o){return"string"==typeof o?h.sanitize(o):("object"===e(o)&&null!==o&&Object.entries(o).forEach((function(i){var n=t(i,2),a=n[0],s=n[1];"string"==typeof s?o[a]=h.sanitize(o[a]):Array.isArray(s)?s.forEach((function(t,e){o[a][e]=r(t)})):"object"===e(s)&&(o[a]=r(s))})),o)};function l(){return d.apply(this,arguments)}function d(){return d=r(o.mark((function r(){var t,e,h,l,d,f,m,u,g,b,v,y,j,w,H,A,T=arguments;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=T.length>0&&void 0!==T[0]?T[0]:{},e=t.version,l=(h=void 0===e?n:e)===i?s:c,[i,n].includes(h)){r.next=4;break}throw new Error("Invalid highcharts version: ".concat(h));case 4:d=l(),f=d.Highcharts,m=d.highchartsMore,u=d.HighchartsMulticolorSeries,g=d.addSolidGauge,b=d.addHeatmap,v=d.addBoost,y=d.addExporting,j=d.addXrange,w=d.addDumbbell,H=d.addPatternFill,window.Highcharts=f,f.AST&&(f.AST.bypassHTMLFiltering=!0),u(f),m(f),g(f),b(f),v(f),y(f),j(f),w(f),H(f),a(f),A=f.chart,f.chart=function(r){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length,o=new Array(e>2?e-2:0),i=2;i<e;i++)o[i-2]=arguments[i];return A.apply(void 0,[r,p(t)].concat(o))},f.setOptions({plotOptions:{series:{states:{inactive:{enabled:!1}}}}});case 20:case"end":return r.stop()}}),r)}))),d.apply(this,arguments)}export{l as initHighcharts};
//# sourceMappingURL=highcharts.js.map
