let t,e;/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/boost-canvas
 * @requires highcharts
 *
 * Boost module
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Torstein Hønsi
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */import*as i from"../highcharts.js";var s,r={};r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let o=i.default;var n=r.n(o);let a=["area","areaspline","arearange","column","columnrange","bar","line","scatter","heatmap","bubble","treemap"],l={};a.forEach(t=>{l[t]=!0});let{doc:h,win:c}=n();function u(t,e,i,s={}){let r="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(r,"hcEvents")||(r.hcEvents={});let o=r.hcEvents;n().Point&&t instanceof n().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let a=t.addEventListener;a&&a.call(t,e,i,!!n().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==e.indexOf("touch"):s.passive,capture:!1}),o[e]||(o[e]=[]);let l={fn:i,order:"number"==typeof s.order?s.order:1/0};return o[e].push(l),o[e].sort((t,e)=>t.order-e.order),function(){!function(t,e,i){function s(e,i){let s=t.removeEventListener;s&&s.call(t,e,i,!1)}function r(i){let r,o;t.nodeName&&(e?(r={})[e]=!0:r=i,A(r,function(t,e){if(i[e])for(o=i[e].length;o--;)s(e,i[e][o].fn)}))}let o="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(o,"hcEvents")){let t=o.hcEvents;if(e){let o=t[e]||[];i?(t[e]=o.filter(function(t){return i!==t.fn}),s(e,i)):(r(t),t[e]=[])}else r(t),delete o.hcEvents}}(t,e,i)}}function d(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function g(t,e,i,s){if(i=i||{},h?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==n())){let s=h.createEvent("Events");s.initEvent(e,!0,!0),i=d(s,i),t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(e,i)}else if(t.hcEvents){i.target||d(i,{preventDefault:function(){i.defaultPrevented=!0},target:t,type:e});let s=[],r=t,o=!1;for(;r.hcEvents;)Object.hasOwnProperty.call(r,"hcEvents")&&r.hcEvents[e]&&(s.length&&(o=!0),s.unshift.apply(s,r.hcEvents[e])),r=Object.getPrototypeOf(r);o&&s.sort((t,e)=>t.order-e.order),s.forEach(e=>{!1===e.fn.call(t,i,t)&&i.preventDefault()})}s&&!i.defaultPrevented&&s.call(t,i)}function f(t){return b(t)&&"number"==typeof t.nodeType}function p(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function m(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function b(t,e){return!!t&&"object"==typeof t&&(!e||!m(t))}function x(t,...e){let i,s=[t,...e],r={},o=function(t,e){return"object"!=typeof t&&(t={}),A(e,function(i,s){if("__proto__"!==s&&"constructor"!==s){let r;!b(i,!0)||(r=i?.constructor,b(i,!0)&&!f(i)&&r?.name&&"Object"!==r.name)||f(i)?t[s]=e[s]:t[s]=o(t[s]||{},i)}}),t};!0===t&&(r=s[1],s=Array.prototype.slice.call(s,2));let n=s.length;for(i=0;i<n;i++)r=o(r,s[i]);return r}function A(t,e,i){for(let s in t)Object.hasOwnProperty.call(t,s)&&e.call(i||t[s],t[s],s,t)}function y(){let t=arguments,e=t.length;for(let i=0;i<e;i++){let e=t[i];if(null!=e)return e}}function v(t,e){return 0>t.indexOf(e)&&!!t.push(e)}function P(t,e,i){let s=t[e];t[e]=function(){let t=arguments,e=this;return i.apply(this,[function(){return s.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}Array.prototype.find;let{composed:T}=n();function C(t){let e=t.series,i=t.boost=t.boost||{},s=t.options.boost||{},r=y(s.seriesThreshold,50);if(e.length>=r)return!0;if(1===e.length)return!1;let o=s.allowForce;if(void 0===o){for(let e of(o=!0,t.xAxis))if(y(e.min,-1/0)>y(e.dataMin,-1/0)||y(e.max,1/0)<y(e.dataMax,1/0)){o=!1;break}}if(void 0!==i.forceChartBoost){if(o)return i.forceChartBoost;i.forceChartBoost=void 0}let n=0,a=0,h;for(let t of e)0!==(h=t.options).boostThreshold&&!1!==t.visible&&"heatmap"!==t.type&&(l[t.type]&&++n,function(...t){let e=-Number.MAX_VALUE;return t.forEach(t=>{if(null!=t&&void 0!==t.length&&t.length>0)return e=t.length,!0}),e}(t.getColumn("x",!0),h.data,t.points)>=(h.boostThreshold||Number.MAX_VALUE)&&++a);return i.forceChartBoost=o&&(n===e.length&&a===n||a>5),i.forceChartBoost}function E(t){function e(){t.boost&&t.boost.wgl&&C(t)&&t.boost.wgl.render(t)}u(t,"predraw",function(){t.boost=t.boost||{},t.boost.forceChartBoost=void 0,t.boosted=!1,t.axes.some(t=>t.isPanning)||t.boost.clear?.(),t.boost.canvas&&t.boost.wgl&&C(t)&&t.boost.wgl.allocateBuffer(t),t.boost.markerGroup&&t.xAxis&&t.xAxis.length>0&&t.yAxis&&t.yAxis.length>0&&t.boost.markerGroup.translate(t.xAxis[0].pos,t.yAxis[0].pos)}),u(t,"load",e,{order:-1}),u(t,"redraw",e);let i=-1,s=-1;u(t.pointer,"afterGetHoverData",e=>{let r=e.hoverPoint?.series;if(t.boost=t.boost||{},t.boost.markerGroup&&r){let e=t.inverted?r.yAxis:r.xAxis,o=t.inverted?r.xAxis:r.yAxis;(e&&e.pos!==i||o&&o.pos!==s)&&(t.series.forEach(t=>{t.halo?.hide()}),t.boost.markerGroup.translate(e.pos,o.pos),i=e.pos,s=o.pos)}})}let M={compose:function(t,e){return e&&v(T,"Boost.Chart")&&t.prototype.callbacks.push(E),t},getBoostClipRect:function(t,e){let i=t.navigator,s={x:t.plotLeft,y:t.plotTop,width:t.plotWidth,height:t.plotHeight};if(i&&t.inverted?(s.width+=i.top+i.height,i.opposite||(s.x=i.left)):i&&!t.inverted&&(s.height=i.top+i.height-t.plotTop),e.is){let{xAxis:i,yAxis:r}=e;if(s=t.getClipBox(e),t.inverted){let t=s.width;s.width=s.height,s.height=t,s.x=r.pos,s.y=i.pos}else s.x=i.pos,s.y=r.pos}if(e===t){let e=t.inverted?t.xAxis:t.yAxis;e.length<=1&&(s.y=Math.min(e[0].pos,s.y),s.height=e[0].pos-t.plotTop+e[0].len)}return s},isChartSeriesBoosting:C},S=i.default.Color;var k=r.n(S);let w={area:"LINES",arearange:"LINES",areaspline:"LINES",column:"LINES",columnrange:"LINES",bar:"LINES",line:"LINE_STRIP",scatter:"POINTS",heatmap:"TRIANGLES",treemap:"TRIANGLES",bubble:"POINTS"},R=class{constructor(t){if(this.errors=[],this.uLocations={},this.gl=t,t&&!this.createShader())return}bind(){this.gl&&this.shaderProgram&&this.gl.useProgram(this.shaderProgram)}createShader(){let t=this.stringToProgram("#version 100\n#define LN10 2.302585092994046\nprecision highp float;\nattribute vec4 aVertexPosition;\nattribute vec4 aColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform mat4 uPMatrix;\nuniform float pSize;\nuniform float translatedThreshold;\nuniform bool hasThreshold;\nuniform bool skipTranslation;\nuniform float xAxisTrans;\nuniform float xAxisMin;\nuniform float xAxisMax;\nuniform float xAxisMinPad;\nuniform float xAxisPointRange;\nuniform float xAxisLen;\nuniform bool  xAxisPostTranslate;\nuniform float xAxisOrdinalSlope;\nuniform float xAxisOrdinalOffset;\nuniform float xAxisPos;\nuniform bool  xAxisCVSCoord;\nuniform bool  xAxisIsLog;\nuniform bool  xAxisReversed;\nuniform float yAxisTrans;\nuniform float yAxisMin;\nuniform float yAxisMax;\nuniform float yAxisMinPad;\nuniform float yAxisPointRange;\nuniform float yAxisLen;\nuniform bool  yAxisPostTranslate;\nuniform float yAxisOrdinalSlope;\nuniform float yAxisOrdinalOffset;\nuniform float yAxisPos;\nuniform bool  yAxisCVSCoord;\nuniform bool  yAxisIsLog;\nuniform bool  yAxisReversed;\nuniform bool  isCircle;\nuniform bool  isBubble;\nuniform bool  bubbleSizeByArea;\nuniform float bubbleZMin;\nuniform float bubbleZMax;\nuniform float bubbleZThreshold;\nuniform float bubbleMinSize;\nuniform float bubbleMaxSize;\nuniform bool  bubbleSizeAbs;\nuniform bool  isInverted;\nfloat bubbleRadius(){\nfloat value = aVertexPosition.w;\nfloat zMax = bubbleZMax;\nfloat zMin = bubbleZMin;\nfloat radius = 0.0;\nfloat pos = 0.0;\nfloat zRange = zMax - zMin;\nif (bubbleSizeAbs){\nvalue = value - bubbleZThreshold;\nzMax = max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);\nzMin = 0.0;\n}\nif (value < zMin){\nradius = bubbleZMin / 2.0 - 1.0;\n} else {\npos = zRange > 0.0 ? (value - zMin) / zRange : 0.5;\nif (bubbleSizeByArea && pos > 0.0){\npos = sqrt(pos);\n}\nradius = ceil(bubbleMinSize + pos * (bubbleMaxSize - bubbleMinSize)) / 2.0;\n}\nreturn radius * 2.0;\n}\nfloat translate(float val,\nfloat pointPlacement,\nfloat localA,\nfloat localMin,\nfloat minPixelPadding,\nfloat pointRange,\nfloat len,\nbool  cvsCoord,\nbool  isLog,\nbool  reversed\n){\nfloat sign = 1.0;\nfloat cvsOffset = 0.0;\nif (cvsCoord) {\nsign *= -1.0;\ncvsOffset = len;\n}\nif (isLog) {\nval = log(val) / LN10;\n}\nif (reversed) {\nsign *= -1.0;\ncvsOffset -= sign * len;\n}\nreturn sign * (val - localMin) * localA + cvsOffset + \n(sign * minPixelPadding);\n}\nfloat xToPixels(float value) {\nif (skipTranslation){\nreturn value;// + xAxisPos;\n}\nreturn translate(value, 0.0, xAxisTrans, xAxisMin, xAxisMinPad, xAxisPointRange, xAxisLen, xAxisCVSCoord, xAxisIsLog, xAxisReversed);// + xAxisPos;\n}\nfloat yToPixels(float value, float checkThreshold) {\nfloat v;\nif (skipTranslation){\nv = value;// + yAxisPos;\n} else {\nv = translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord, yAxisIsLog, yAxisReversed);// + yAxisPos;\nif (v > yAxisLen) {\nv = yAxisLen;\n}\n}\nif (checkThreshold > 0.0 && hasThreshold) {\nv = min(v, translatedThreshold);\n}\nreturn v;\n}\nvoid main(void) {\nif (isBubble){\ngl_PointSize = bubbleRadius();\n} else {\ngl_PointSize = pSize;\n}\nvColor = aColor;\nif (!skipTranslation && isCircle && (\naVertexPosition.x < xAxisMin ||\naVertexPosition.x > xAxisMax ||\naVertexPosition.y < yAxisMin ||\naVertexPosition.y > yAxisMax\n)) {\ngl_Position = uPMatrix * vec4(2.0, 2.0, 2.0, 1.0);\n} else if (skipTranslation && isInverted) {\ngl_Position = uPMatrix * vec4(aVertexPosition.y + yAxisPos, aVertexPosition.x + xAxisPos, 0.0, 1.0);\n} else if (isInverted) {\ngl_Position = uPMatrix * vec4(yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, xToPixels(aVertexPosition.x) + xAxisPos, 0.0, 1.0);\n} else {\ngl_Position = uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);\n}\n}","vertex"),e=this.stringToProgram("precision highp float;\nuniform vec4 fillColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform sampler2D uSampler;\nuniform bool isCircle;\nuniform bool hasColor;\nvoid main(void) {\nvec4 col = fillColor;\nvec4 tcol = texture2D(uSampler, gl_PointCoord.st);\nif (hasColor) {\ncol = vColor;\n}\nif (isCircle) {\ncol *= tcol;\nif (tcol.r < 0.0) {\ndiscard;\n} else {\ngl_FragColor = col;\n}\n} else {\ngl_FragColor = col;\n}\n}","fragment"),i=t=>this.gl.getUniformLocation(this.shaderProgram,t);return t&&e?(this.shaderProgram=this.gl.createProgram(),this.gl.attachShader(this.shaderProgram,t),this.gl.attachShader(this.shaderProgram,e),this.gl.linkProgram(this.shaderProgram),this.gl.getProgramParameter(this.shaderProgram,this.gl.LINK_STATUS))?(this.gl.useProgram(this.shaderProgram),this.gl.bindAttribLocation(this.shaderProgram,0,"aVertexPosition"),this.pUniform=i("uPMatrix"),this.psUniform=i("pSize"),this.fcUniform=i("fillColor"),this.isBubbleUniform=i("isBubble"),this.bubbleSizeAbsUniform=i("bubbleSizeAbs"),this.bubbleSizeAreaUniform=i("bubbleSizeByArea"),this.uSamplerUniform=i("uSampler"),this.skipTranslationUniform=i("skipTranslation"),this.isCircleUniform=i("isCircle"),this.isInverted=i("isInverted"),!0):(this.errors.push(this.gl.getProgramInfoLog(this.shaderProgram)),this.handleErrors(),this.shaderProgram=!1,!1):(this.shaderProgram=!1,this.handleErrors(),!1)}handleErrors(){this.errors.length&&(0,o.error)("[highcharts boost] shader error - "+this.errors.join("\n"))}stringToProgram(t,e){let i=this.gl.createShader("vertex"===e?this.gl.VERTEX_SHADER:this.gl.FRAGMENT_SHADER);return(this.gl.shaderSource(i,t),this.gl.compileShader(i),this.gl.getShaderParameter(i,this.gl.COMPILE_STATUS))?i:(this.errors.push("when compiling "+e+" shader:\n"+this.gl.getShaderInfoLog(i)),!1)}destroy(){this.gl&&this.shaderProgram&&(this.gl.deleteProgram(this.shaderProgram),this.shaderProgram=!1)}fillColorUniform(){return this.fcUniform}getProgram(){return this.shaderProgram}pointSizeUniform(){return this.psUniform}perspectiveUniform(){return this.pUniform}reset(){this.gl&&this.shaderProgram&&(this.gl.uniform1i(this.isBubbleUniform,0),this.gl.uniform1i(this.isCircleUniform,0))}setBubbleUniforms(t,e,i,s=1){let r=t.options,o=Number.MAX_VALUE,n=-Number.MAX_VALUE;if(this.gl&&this.shaderProgram&&t.is("bubble")){var a,l;let h=t.getPxExtremes();o=y(r.zMin,(a=!1===r.displayNegative?r.zThreshold:-Number.MAX_VALUE,l=o,e>a?e<l?e:l:a)),n=y(r.zMax,Math.max(n,i)),this.gl.uniform1i(this.isBubbleUniform,1),this.gl.uniform1i(this.isCircleUniform,1),this.gl.uniform1i(this.bubbleSizeAreaUniform,"width"!==t.options.sizeBy),this.gl.uniform1i(this.bubbleSizeAbsUniform,t.options.sizeByAbsoluteValue),this.setUniform("bubbleMinSize",h.minPxSize*s),this.setUniform("bubbleMaxSize",h.maxPxSize*s),this.setUniform("bubbleZMin",o),this.setUniform("bubbleZMax",n),this.setUniform("bubbleZThreshold",t.options.zThreshold)}}setColor(t){this.gl&&this.shaderProgram&&this.gl.uniform4f(this.fcUniform,t[0]/255,t[1]/255,t[2]/255,t[3])}setDrawAsCircle(t){this.gl&&this.shaderProgram&&this.gl.uniform1i(this.isCircleUniform,+!!t)}setInverted(t){this.gl&&this.shaderProgram&&this.gl.uniform1i(this.isInverted,t)}setPMatrix(t){this.gl&&this.shaderProgram&&this.gl.uniformMatrix4fv(this.pUniform,!1,t)}setPointSize(t){this.gl&&this.shaderProgram&&this.gl.uniform1f(this.psUniform,t)}setSkipTranslation(t){this.gl&&this.shaderProgram&&this.gl.uniform1i(this.skipTranslationUniform,+(!0===t))}setTexture(t){this.gl&&this.shaderProgram&&this.gl.uniform1i(this.uSamplerUniform,t)}setUniform(t,e){if(this.gl&&this.shaderProgram){let i=this.uLocations[t]=this.uLocations[t]||this.gl.getUniformLocation(this.shaderProgram,t);this.gl.uniform1f(i,e)}}},U=class{constructor(t,e,i){this.buffer=!1,this.iterator=0,this.preAllocated=!1,this.vertAttribute=!1,this.components=i||2,this.dataComponents=i,this.gl=t,this.shader=e}allocate(t){this.iterator=-1,this.preAllocated=new Float32Array(4*t)}bind(){if(!this.buffer)return!1;this.gl.vertexAttribPointer(this.vertAttribute,this.components,this.gl.FLOAT,!1,0,0)}build(t,e,i){let s;return(this.data=t||[],this.data&&0!==this.data.length||this.preAllocated)?(this.components=i||this.components,this.buffer&&this.gl.deleteBuffer(this.buffer),this.preAllocated||(s=new Float32Array(this.data)),this.buffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.buffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.preAllocated||s,this.gl.STATIC_DRAW),this.vertAttribute=this.gl.getAttribLocation(this.shader.getProgram(),e),this.gl.enableVertexAttribArray(this.vertAttribute),s=!1,!0):(this.destroy(),!1)}destroy(){this.buffer&&(this.gl.deleteBuffer(this.buffer),this.buffer=!1,this.vertAttribute=!1),this.iterator=0,this.components=this.dataComponents||2,this.data=[]}push(t,e,i,s){this.preAllocated&&(this.preAllocated[++this.iterator]=t,this.preAllocated[++this.iterator]=e,this.preAllocated[++this.iterator]=i,this.preAllocated[++this.iterator]=s)}render(t,e,i){let s=this.preAllocated?this.preAllocated.length:this.data.length;return!!this.buffer&&!!s&&((!t||t>s||t<0)&&(t=0),(!e||e>s)&&(e=s),!(t>=e)&&(i=i||"POINTS",this.gl.drawArrays(this.gl[i],t/this.components,(e-t)/this.components),!0))}},{getBoostClipRect:L}=M,{parse:N}=k(),{doc:_,win:O}=n(),D={column:!0,columnrange:!0,bar:!0,area:!0,areaspline:!0,arearange:!0},z={scatter:!0,bubble:!0},I=["webgl","experimental-webgl","moz-webgl","webkit-3d"];class G{static orthoMatrix(t,e){return[2/t,0,0,0,0,-(2/e),0,0,0,0,-2,0,-1,1,-1,1]}static seriesPointCount(t){let e,i,s;return t.boosted?(e=!!t.options.stacking,i=(t.getColumn("x").length?t.getColumn("x"):void 0)||t.options.xData||t.getColumn("x",!0),s=(e?t.data:i||t.options.data).length,"treemap"===t.type?s*=12:"heatmap"===t.type?s*=6:D[t.type]&&(s*=2),s):0}constructor(t){this.data=[],this.height=0,this.isInited=!1,this.markerData=[],this.series=[],this.textureHandles={},this.width=0,this.postRenderCallback=t,this.settings={pointSize:1,lineWidth:1,fillColor:"#AA00AA",useAlpha:!0,usePreallocated:!1,useGPUTranslations:!1,debug:{timeRendering:!1,timeSeriesProcessing:!1,timeSetup:!1,timeBufferCopy:!1,timeKDTree:!1,showSkipSummary:!1}}}getPixelRatio(){return this.settings.pixelRatio||O.devicePixelRatio||1}setOptions(t){"pixelRatio"in t||(t.pixelRatio=1),x(!0,this.settings,t)}allocateBuffer(t){let e=this.vbuffer,i=0;this.settings.usePreallocated&&(t.series.forEach(t=>{t.boosted&&(i+=G.seriesPointCount(t))}),e&&e.allocate(i))}allocateBufferForSingleSeries(t){let e=this.vbuffer,i=0;this.settings.usePreallocated&&(t.boosted&&(i=G.seriesPointCount(t)),e&&e.allocate(i))}clear(){let t=this.gl;t&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}pushSeriesData(t,e){let i=this.data,s=this.settings,r=this.vbuffer,o=t.pointArrayMap&&"low,high"===t.pointArrayMap.join(","),{chart:n,options:a,sorted:l,xAxis:h,yAxis:c}=t,u=!!a.stacking,d=a.data,g=t.xAxis.getExtremes(),f=g.min-(t.xAxis.minPointOffset||0),p=g.max+(t.xAxis.minPointOffset||0),m=t.yAxis.getExtremes(),x=m.min-(t.yAxis.minPointOffset||0),A=m.max+(t.yAxis.minPointOffset||0),y=(t.getColumn("x").length?t.getColumn("x"):void 0)||a.xData||t.getColumn("x",!0),v=(t.getColumn("y").length?t.getColumn("y"):void 0)||a.yData||t.getColumn("y",!0),P=(t.getColumn("z").length?t.getColumn("z"):void 0)||a.zData||t.getColumn("z",!0),T=!y||0===y.length,C=t.options.colorByPoint,E=a.connectNulls,M=t.points||!1,S=u?t.data:y||d,k={x:Number.MAX_VALUE,y:0},w={x:-Number.MAX_VALUE,y:0},R=void 0===n.index,U=D[t.type],L=a.zoneAxis||"y",_=a.zones||!1,O=a.threshold,z=this.getPixelRatio(),I=t.chart.plotWidth,G=!1,B=!1,V,X,F=0,j=!1,H,Y,W,K,q=-1,Z=!1,Q=!1,J,$=!1,tt=!1,te,ti=!1,ts=!0,tr=!0,to=[],tn=!1,ta=!1,tl=0,th=0;if(a.boostData&&a.boostData.length>0)return;a.gapSize&&(ta="value"!==a.gapUnit?a.gapSize*t.closestPointRange:a.gapSize),_&&_.length&&(to=[],_.forEach((t,e)=>{if(t.color){let i=N(t.color).rgba;i[0]/=255,i[1]/=255,i[2]/=255,to[e]=i,tn||void 0!==t.value||(tn=i)}}),tn||(tn=N(t.pointAttribs&&t.pointAttribs().fill||t.color).rgba,tn[0]/=255,tn[1]/=255,tn[2]/=255)),n.inverted&&(I=t.chart.plotHeight),t.closestPointRangePx=Number.MAX_VALUE;let tc=t=>{t&&(e.colorData.push(t[0]),e.colorData.push(t[1]),e.colorData.push(t[2]),e.colorData.push(t[3]))},tu=(t,o,n,a=1,l)=>{tc(l),1!==z&&(!s.useGPUTranslations||e.skipTranslation)&&(t*=z,o*=z,a*=z),s.usePreallocated&&r?(r.push(t,o,+!!n,a),tl+=4):(i.push(t),i.push(o),i.push(n?z:0),i.push(a))},td=()=>{e.segments.length&&(e.segments[e.segments.length-1].to=i.length||tl)},tg=()=>{e.segments.length&&e.segments[e.segments.length-1].from===(i.length||tl)||(td(),e.segments.push({from:i.length||tl}))},tf=(t,e,i,s,r)=>{tc(r),tu(t+i,e),tc(r),tu(t,e),tc(r),tu(t,e+s),tc(r),tu(t,e+s),tc(r),tu(t+i,e+s),tc(r),tu(t+i,e)};if(tg(),M&&M.length>0){e.skipTranslation=!0,e.drawMode="TRIANGLES",M[0].node&&M[0].node.levelDynamic&&M.sort((t,e)=>{if(t.node){if(t.node.levelDynamic>e.node.levelDynamic)return 1;if(t.node.levelDynamic<e.node.levelDynamic)return -1}return 0}),M.forEach(e=>{let i,s,r=e.plotY;if(void 0!==r&&!isNaN(r)&&null!==e.y&&e.shapeArgs){let{x:r=0,y:o=0,width:a=0,height:l=0}=e.shapeArgs;i=(s=n.styledMode?e.series.colorAttribs(e):s=e.series.pointAttribs(e))["stroke-width"]||0,te=N(s.fill).rgba,te[0]/=255,te[1]/=255,te[2]/=255,t.is("treemap")&&(i=i||1,X=N(s.stroke).rgba,X[0]/=255,X[1]/=255,X[2]/=255,tf(r,o,a,l,X),i/=2),t.is("heatmap")&&n.inverted&&(r=h.len-r,o=c.len-o,a=-a,l=-l),tf(r+i,o+i,a-2*i,l-2*i,te)}}),td();return}for(;q<S.length-1;){if(void 0===(W=S[++q]))continue;if(R)break;let i=d&&d[q];if(!T){let e;b(i,!0)&&i.color&&(e=N(i.color).rgba);let s=t.options.keys?.indexOf("color");Array.isArray(i)&&s&&"string"==typeof i[s]?e=N(i[s]).rgba:C&&n.options.colors&&(th%=n.options.colors.length,e=N(n.options.colors[th]).rgba),e&&((te=e)[0]=e[0]/255,te[1]=e[1]/255,te[2]=e[2]/255,te[3]=e[3]),th++}if(T?(H=W[0],Y=W[1],S[q+1]&&(Q=S[q+1][0]),S[q-1]&&(Z=S[q-1][0]),W.length>=3&&(K=W[2],W[2]>e.zMax&&(e.zMax=W[2]),W[2]<e.zMin&&(e.zMin=W[2]))):(H=W,Y=v?.[q],S[q+1]&&(Q=S[q+1]),S[q-1]&&(Z=S[q-1]),P&&P.length&&(K=P[q],P[q]>e.zMax&&(e.zMax=P[q]),P[q]<e.zMin&&(e.zMin=P[q]))),!E&&(null===H||null===Y)){tg();continue}if(Q&&Q>=f&&Q<=p&&($=!0),Z&&Z>=f&&Z<=p&&(tt=!0),o?(T&&(Y=W.slice(1,3)),J=t.getColumn("low",!0)?.[q],Y=t.getColumn("high",!0)?.[q]||0):u&&(H=W.x,J=(Y=W.stackY)-W.y),null!=x&&null!=A&&(ts=Y>=x&&Y<=A),!l&&!ts||(H>p&&w.x<p&&(w.x=H,w.y=Y),H<f&&k.x>f&&(k.x=H,k.y=Y),null===Y&&E))continue;if(null===Y||!ts&&S.length>1&&!$&&!tt){tg();continue}if((l&&(Q>=f||H>=f)&&(Z<=p||H<=p)||!l&&H>=f&&H<=p)&&(ti=!0),ti||$||tt){if(ta&&H-Z>ta&&tg(),_&&_.length){let t,e,i="x"===L?H:Y;_.some((t,s)=>void 0!==t.value&&i<t.value&&(e=s,!0)),void 0!==e&&to[e]&&(t=to[e]),te=t||tn||te}if(s.useGPUTranslations||(e.skipTranslation=!0,H=h.toPixels(H,!0),Y=c.toPixels(Y,!0),!(H>I)||"POINTS"!==e.drawMode)){if(e.hasMarkers&&ti&&!1!==G&&(t.closestPointRangePx=Math.min(t.closestPointRangePx,Math.abs(H-G))),!s.useGPUTranslations&&!s.usePreallocated&&G&&1>Math.abs(H-G)&&B&&1>Math.abs(Y-B)){s.debug.showSkipSummary&&++F;continue}U&&(V=J||0,(!1===J||void 0===J)&&(V=Y<0?Y:0),(o||u)&&!c.logarithmic||(V=Math.max(null===O?x:O,x)),s.useGPUTranslations||(V=c.toPixels(V,!0)),tu(H,V,!1,0,te)),a.step&&!tr&&tu(H,B,!1,2,te),tu(H,Y,!1,"bubble"===t.type?K||1:2,te),G=H,B=Y,j=!0,tr=!1}}}s.debug.showSkipSummary&&console.log("skipped points:",F);let tp=(t,i)=>{if(s.useGPUTranslations||(e.skipTranslation=!0,t.x=h.toPixels(t.x,!0),t.y=c.toPixels(t.y,!0)),i){this.data=[t.x,t.y,0,2].concat(this.data);return}tu(t.x,t.y,0,2)};!j&&!1!==E&&"line_strip"===t.drawMode&&(k.x<Number.MAX_VALUE&&tp(k,!0),w.x>-Number.MAX_VALUE&&tp(w)),td()}pushSeries(t){let e=this.markerData,i=this.series,s=this.settings;i.length>0&&i[i.length-1].hasMarkers&&(i[i.length-1].markerTo=e.length),s.debug.timeSeriesProcessing&&console.time("building "+t.type+" series");let r={segments:[],markerFrom:e.length,colorData:[],series:t,zMin:Number.MAX_VALUE,zMax:-Number.MAX_VALUE,hasMarkers:!!t.options.marker&&!1!==t.options.marker.enabled,showMarkers:!0,drawMode:w[t.type]||"LINE_STRIP"};t.index>=i.length?i.push(r):i[t.index]=r,this.pushSeriesData(t,r),s.debug.timeSeriesProcessing&&console.timeEnd("building "+t.type+" series")}flush(){let t=this.vbuffer;this.data=[],this.markerData=[],this.series=[],t&&t.destroy()}setXAxis(t){let e=this.shader;if(!e)return;let i=this.getPixelRatio();e.setUniform("xAxisTrans",t.transA*i),e.setUniform("xAxisMin",t.min),e.setUniform("xAxisMax",t.max),e.setUniform("xAxisMinPad",t.minPixelPadding*i),e.setUniform("xAxisPointRange",t.pointRange),e.setUniform("xAxisLen",t.len*i),e.setUniform("xAxisPos",t.pos*i),e.setUniform("xAxisCVSCoord",!t.horiz),e.setUniform("xAxisIsLog",!!t.logarithmic),e.setUniform("xAxisReversed",!!t.reversed)}setYAxis(t){let e=this.shader;if(!e)return;let i=this.getPixelRatio();e.setUniform("yAxisTrans",t.transA*i),e.setUniform("yAxisMin",t.min),e.setUniform("yAxisMax",t.max),e.setUniform("yAxisMinPad",t.minPixelPadding*i),e.setUniform("yAxisPointRange",t.pointRange),e.setUniform("yAxisLen",t.len*i),e.setUniform("yAxisPos",t.pos*i),e.setUniform("yAxisCVSCoord",!t.horiz),e.setUniform("yAxisIsLog",!!t.logarithmic),e.setUniform("yAxisReversed",!!t.reversed)}setThreshold(t,e){let i=this.shader;i&&(i.setUniform("hasThreshold",t),i.setUniform("translatedThreshold",e))}renderChart(t){let e=this.gl,i=this.settings,s=this.shader,r=this.vbuffer,o=this.getPixelRatio();if(!t)return!1;this.width=t.chartWidth*o,this.height=t.chartHeight*o;let a=this.height,l=this.width;if(!e||!s||!l||!a)return!1;i.debug.timeRendering&&console.time("gl rendering"),e.canvas.width=l,e.canvas.height=a,s.bind(),e.viewport(0,0,l,a),s.setPMatrix(G.orthoMatrix(l,a)),i.lineWidth>1&&!n().isMS&&e.lineWidth(i.lineWidth),r&&(r.build(this.data,"aVertexPosition",4),r.bind()),s.setInverted(t.inverted),this.series.forEach((n,l)=>{let h=n.series.options,c=h.marker,u=void 0!==h.lineWidth?h.lineWidth:1,d=h.threshold,g=p(d),f=n.series.yAxis.getThreshold(d),m=y(h.marker?h.marker.enabled:null,!!n.series.xAxis.isRadial||null,n.series.closestPointRangePx>2*((h.marker?h.marker.radius:10)||10)),b=this.textureHandles[c&&c.symbol||n.series.symbol]||this.textureHandles.circle,x,A,v,P=[];if(0!==n.segments.length&&n.segments[0].from!==n.segments[0].to&&(b.isReady&&(e.bindTexture(e.TEXTURE_2D,b.handle),s.setTexture(b.handle)),t.styledMode?n.series.markerGroup===n.series.chart.boost?.markerGroup?(delete n.series.markerGroup,n.series.markerGroup=n.series.plotGroup("markerGroup","markers","visible",1,t.seriesGroup).addClass("highcharts-tracker"),v=n.series.markerGroup.getStyle("fill"),n.series.markerGroup.destroy(),n.series.markerGroup=n.series.chart.boost?.markerGroup):v=n.series.markerGroup?.getStyle("fill"):(v="POINTS"===n.drawMode&&n.series.pointAttribs&&n.series.pointAttribs().fill||n.series.color,h.colorByPoint&&(v=n.series.chart.options.colors[l])),n.series.fillOpacity&&h.fillOpacity&&(v=new(k())(v).setOpacity(y(h.fillOpacity,1)).get()),P=N(v).rgba,i.useAlpha||(P[3]=1),"add"===h.boostBlending?(e.blendFunc(e.SRC_ALPHA,e.ONE),e.blendEquation(e.FUNC_ADD)):"mult"===h.boostBlending||"multiply"===h.boostBlending?e.blendFunc(e.DST_COLOR,e.ZERO):"darken"===h.boostBlending?(e.blendFunc(e.ONE,e.ONE),e.blendEquation(e.FUNC_MIN)):e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),s.reset(),n.colorData.length>0?(s.setUniform("hasColor",1),(A=new U(e,s)).build(Array(n.segments[0].from).concat(n.colorData),"aColor",4),A.bind()):(s.setUniform("hasColor",0),e.disableVertexAttribArray(e.getAttribLocation(s.getProgram(),"aColor"))),s.setColor(P),this.setXAxis(n.series.xAxis),this.setYAxis(n.series.yAxis),this.setThreshold(g,f),"POINTS"===n.drawMode&&s.setPointSize(2*y(h.marker&&h.marker.radius,.5)*o),s.setSkipTranslation(n.skipTranslation),"bubble"===n.series.type&&s.setBubbleUniforms(n.series,n.zMin,n.zMax,o),s.setDrawAsCircle(z[n.series.type]||!1),r)){if(u>0||"LINE_STRIP"!==n.drawMode){let{x:i,y:s,width:l,height:h}=L(t,n.series);for(e.enable(e.SCISSOR_TEST),e.scissor(i*o,a-(s+h)*o,l*o,h*o),x=0;x<n.segments.length;x++)r.render(n.segments[x].from,n.segments[x].to,n.drawMode);e.disable(e.SCISSOR_TEST)}if(n.hasMarkers&&m)for(s.setPointSize(2*y(h.marker&&h.marker.radius,5)*o),s.setDrawAsCircle(!0),x=0;x<n.segments.length;x++)r.render(n.segments[x].from,n.segments[x].to,"POINTS")}}),i.debug.timeRendering&&console.timeEnd("gl rendering"),this.postRenderCallback&&this.postRenderCallback(this),this.flush()}render(t){if(this.clear(),t.renderer.forExport)return this.renderChart(t);this.isInited?this.renderChart(t):setTimeout(()=>{this.render(t)},1)}setSize(t,e){let i=this.shader;i&&(this.width!==t||this.height!==e)&&(this.width=t,this.height=e,i.bind(),i.setPMatrix(G.orthoMatrix(t,e)))}init(t,e){let i=this.settings;if(this.isInited=!1,!t)return!1;i.debug.timeSetup&&console.time("gl setup");for(let e=0;e<I.length&&(this.gl=t.getContext(I[e],{}),!this.gl);++e);let s=this.gl;if(!s)return!1;e||this.flush(),s.enable(s.BLEND),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),s.disable(s.DEPTH_TEST),s.depthFunc(s.LESS);let r=this.shader=new R(s);if(!r)return!1;this.vbuffer=new U(s,r);let o=(t,e)=>{let i={isReady:!1,texture:_.createElement("canvas"),handle:s.createTexture()},r=i.texture.getContext("2d");this.textureHandles[t]=i,i.texture.width=512,i.texture.height=512,r.mozImageSmoothingEnabled=!1,r.webkitImageSmoothingEnabled=!1,r.msImageSmoothingEnabled=!1,r.imageSmoothingEnabled=!1,r.strokeStyle="rgba(255, 255, 255, 0)",r.fillStyle="#FFF",e(r);try{s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,i.handle),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,i.texture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.bindTexture(s.TEXTURE_2D,null),i.isReady=!0}catch{}};return o("circle",t=>{t.beginPath(),t.arc(256,256,256,0,2*Math.PI),t.stroke(),t.fill()}),o("square",t=>{t.fillRect(0,0,512,512)}),o("diamond",t=>{t.beginPath(),t.moveTo(256,0),t.lineTo(512,256),t.lineTo(256,512),t.lineTo(0,256),t.lineTo(256,0),t.fill()}),o("triangle",t=>{t.beginPath(),t.moveTo(0,512),t.lineTo(256,0),t.lineTo(512,512),t.lineTo(0,512),t.fill()}),o("triangle-down",t=>{t.beginPath(),t.moveTo(0,0),t.lineTo(256,512),t.lineTo(512,0),t.lineTo(0,0),t.fill()}),this.isInited=!0,i.debug.timeSetup&&console.timeEnd("gl setup"),!0}destroy(){let t=this.gl,e=this.shader,i=this.vbuffer;this.flush(),i&&i.destroy(),e&&e.destroy(),t&&(A(this.textureHandles,e=>{e.handle&&t.deleteTexture(e.handle)}),t.canvas.width=1,t.canvas.height=1)}}let{setLength:B,splice:V}={convertToNumber:function(t,e){switch(typeof t){case"boolean":return+!!t;case"number":return isNaN(t)&&!e?null:t;default:return isNaN(t=parseFloat(`${t??""}`))&&!e?null:t}},setLength:function(t,e,i){return Array.isArray(t)?(t.length=e,t):t[i?"subarray":"slice"](0,e)},splice:function(t,e,i,s,r=[]){if(Array.isArray(t))return Array.isArray(r)||(r=Array.from(r)),{removed:t.splice(e,i,...r),array:t};let o=Object.getPrototypeOf(t).constructor,n=t[s?"subarray":"slice"](e,e+i),a=new o(t.length-i+r.length);return a.set(t.subarray(0,e),0),a.set(r,e),a.set(t.subarray(e+i),e+r.length),{removed:n,array:a}}},X=class{constructor(t={}){this.autoId=!t.id,this.columns={},this.id=t.id||(0,o.uniqueKey)(),this.rowCount=0,this.versionTag=(0,o.uniqueKey)();let e=0;A(t.columns||{},(t,i)=>{this.columns[i]=t.slice(),e=Math.max(e,t.length)}),this.applyRowCount(e)}applyRowCount(t){this.rowCount=t,A(this.columns,(e,i)=>{e.length!==t&&(this.columns[i]=B(e,t))})}deleteRows(t,e=1){if(e>0&&t<this.rowCount){let i=0;A(this.columns,(s,r)=>{this.columns[r]=V(s,t,e).array,i=s.length}),this.rowCount=i}g(this,"afterDeleteRows",{rowIndex:t,rowCount:e}),this.versionTag=(0,o.uniqueKey)()}getColumn(t,e){return this.columns[t]}getColumns(t,e){return(t||Object.keys(this.columns)).reduce((t,e)=>(t[e]=this.columns[e],t),{})}getRow(t,e){return(e||Object.keys(this.columns)).map(e=>this.columns[e]?.[t])}setColumn(t,e=[],i=0,s){this.setColumns({[t]:e},i,s)}setColumns(t,e,i){let s=this.rowCount;A(t,(t,e)=>{this.columns[e]=t.slice(),s=t.length}),this.applyRowCount(s),i?.silent||(g(this,"afterSetColumns"),this.versionTag=(0,o.uniqueKey)())}setRow(t,e=this.rowCount,i,s){let{columns:r}=this,n=i?this.rowCount+1:e+1,a=Object.keys(t);if(s?.addColumns!==!1)for(let t=0,e=a.length;t<e;t++){let e=a[t];r[e]||(r[e]=[])}A(r,(o,a)=>{o||s?.addColumns===!1||(o=Array(n)),o&&(i?o=V(o,e,0,!0,[t[a]??null]).array:o[e]=t[a]??null,r[a]=o)}),n>this.rowCount&&this.applyRowCount(n),s?.silent||(g(this,"afterSetRows"),this.versionTag=(0,o.uniqueKey)())}getModified(){return this.modified||this}},{getBoostClipRect:F,isChartSeriesBoosting:j}=M,{getOptions:H}=n(),{composed:Y,doc:W,noop:K,win:q}=n();function Z(t,e){let i=e.boost;t&&i&&i.target&&i.canvas&&!j(e.chart)&&t.allocateBufferForSingleSeries(e)}function Q(t){return y(t&&t.options&&t.options.boost&&t.options.boost.enabled,!0)}function J(t,i){let s=t.constructor,r=t.seriesGroup||i.group,n=t.chartWidth,a=t.chartHeight,l=t,h="u">typeof SVGForeignObjectElement,c=!1;j(t)?l=t:(l=i,c=!!(i.options.events?.click||i.options.point?.events?.click));let u=l.boost=l.boost||{};if(h=!1,e||(e=W.createElement("canvas")),!u.target&&(u.canvas=e,t.renderer.forExport||!h?(l.renderTarget=u.target=t.renderer.image("",0,0,n,a).addClass("highcharts-boost-canvas").add(r),u.clear=function(){u.target.attr({href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="})},u.copy=function(){u.resize(),u.target.attr({href:u.canvas.toDataURL("image/png")})}):(u.targetFo=t.renderer.createElement("foreignObject").add(r),l.renderTarget=u.target=W.createElement("canvas"),u.targetCtx=u.target.getContext("2d"),u.targetFo.element.appendChild(u.target),u.clear=function(){u.target.width=u.canvas.width,u.target.height=u.canvas.height},u.copy=function(){u.target.width=u.canvas.width,u.target.height=u.canvas.height,u.targetCtx.drawImage(u.canvas,0,0)}),u.resize=function(){n=t.chartWidth,a=t.chartHeight,(u.targetFo||u.target).attr({x:0,y:0,width:n,height:a}).css({pointerEvents:c?void 0:"none",mixedBlendMode:"normal",opacity:1}).addClass(c?"highcharts-tracker":""),l instanceof s&&l.boost?.markerGroup?.translate(t.plotLeft,t.plotTop)},u.clipRect=t.renderer.clipRect(),(u.targetFo||u.target).attr({zIndex:i.options.zIndex}),l instanceof s&&(l.boost.markerGroup=l.renderer.g().add(r).translate(i.xAxis.pos,i.yAxis.pos))),u.canvas.width=n,u.canvas.height=a,u.clipRect){let e=F(t,l);u.clipRect.attr(e),t.navigator||e.width!==t.clipBox.width||e.height!==t.clipBox.height?(u.targetFo||u.target).clip(u.clipRect):r?.clip(t.renderer.clipRect(e.x-4,e.y,e.width+4,e.height+4))}return u.resize(),u.clear(),!u.wgl&&(u.wgl=new G(t=>{t.settings.debug.timeBufferCopy&&console.time("buffer copy"),u.copy(),t.settings.debug.timeBufferCopy&&console.timeEnd("buffer copy")}),u.wgl.init(u.canvas)||(0,o.error)("[highcharts boost] - unable to init WebGL renderer"),u.wgl.setOptions(t.options.boost||{}),l instanceof s&&u.wgl.allocateBuffer(t)),u.wgl.setSize(n,a),u.wgl}function $(t){let e=t.points;if(e){let t,i;for(i=0;i<e.length;i+=1)(t=e[i])&&t.destroyElements&&t.destroyElements()}for(let e of(["graph","area","tracker"].forEach(e=>{let i=t[e];i&&(t[e]=i.destroy())}),t.zones))!function(t,e,i){A(t,function(s,r){s!==e&&s?.destroy&&s.destroy(),(s?.destroy||!i)&&delete t[r]})}(e,void 0,!0)}function tt(t,e,i,s,r,o){let n=(r=r||0)+(s=s||3e3),a=!0;for(;a&&r<n&&r<t.length;)a=e(t[r],r),++r;a&&(r<t.length?o?tt(t,e,i,s,r,o):q.requestAnimationFrame?q.requestAnimationFrame(function(){tt(t,e,i,s,r)}):setTimeout(tt,0,t,e,i,s,r):i&&i())}function te(t,e){let i=y(t.options.boostThreshold,Number.MAX_VALUE);if(0===i)return!1;let s=t.dataTable.getModified().rowCount,r=t.xAxis&&t.xAxis.options,o=t.yAxis&&t.yAxis.options,n=t.colorAxis&&t.colorAxis.options;return s>=i&&p(o?.min)&&p(o?.max)&&(!e||p(r?.min)&&p(r?.max))&&(!n||p(n.min)&&p(n.max))}let ti=(t,e)=>{let{options:i,forceCrop:s,chart:r}=t,o=y(i.boostThreshold,Number.MAX_VALUE);return!s&&0!==o&&(j(r)||(e?.length??0)>=o)};function ts(){let t=this,e=t.chart;e.boost&&e.boost.markerGroup===t.markerGroup&&(t.markerGroup=void 0),e.hoverPoints&&(e.hoverPoints=e.hoverPoints.filter(function(e){return e.series===t})),e.hoverPoint&&e.hoverPoint.series===t&&(e.hoverPoint=void 0)}function tr(){let t=this.boost;t&&t.canvas&&t.target&&(t.wgl&&t.wgl.clear(),t.clear&&t.clear())}function to(t){let e=t.boost;e&&e.canvas&&e.target&&e.wgl&&!j(t.chart)&&e.wgl.render(t.chart)}function tn(t,e){let i=t.options,s=t.xAxis,r=t.pointClass;if(e instanceof r)return e;let o=i.data,n=t.is("scatter"),a=(n&&t.getColumn("x",!0).length?t.getColumn("x",!0):void 0)||(t.getColumn("x").length?t.getColumn("x"):void 0)||i.xData||t.getColumn("x",!0)||!1,l=t.getColumn("y",!0)||i.yData||!1,h=e.i,c=o?.[h]?.color,u=new r(t,n&&a&&l?[a[h],l[h]]:(m(o)?o:[])[h],a?a[h]:void 0);if(n&&i?.keys?.length){let t=i.keys;for(let e=t.length-1;e>-1;e--)u[t[e]]=o[h][e]}return u.category=y(s.categories?s.categories[u.x]:u.x,u.x),u.key=u.name??u.category,u.dist=e.dist,u.distX=e.distX,u.plotX=e.plotX,u.plotY=e.plotY,u.index=h,u.percentage=e.percentage,u.isInside=t.isPointInside(u),c&&(u.color=c),u}function ta(t){let{options:e,xAxis:i,yAxis:s}=this;if(!this.isDirty&&!i.isDirty&&!s.isDirty&&!t)return!1;this.yAxis.setTickInterval();let r=e.boostThreshold||0,o=e.cropThreshold,n=this.getColumn("x"),a=i.getExtremes(),l=a.max??Number.MAX_VALUE,h=a.min??-Number.MAX_VALUE,c=this.getColumn("y"),u=s.getExtremes(),d=u.max??Number.MAX_VALUE,g=u.min??-Number.MAX_VALUE;if(!this.boosted&&i.old&&s.old&&h>=(i.old.min??-Number.MAX_VALUE)&&l<=(i.old.max??Number.MAX_VALUE)&&g>=(s.old.min??-Number.MAX_VALUE)&&d<=(s.old.max??Number.MAX_VALUE))return this.dataTable.getModified().setColumns({x:n,y:c}),!0;let f=this.dataTable.rowCount;if(!r||f<r||o&&!this.forceCrop&&!this.getExtremesFromAll&&!e.getExtremesFromAll&&f<o)return this.dataTable.getModified().setColumns({x:n,y:c}),!0;let m=[],b=[],x=[],A=!(p(a.max)||p(a.min)),y=!(p(u.max)||p(u.min)),v=!1,P,T=n[0],C=n[0],E,M=c?.[0],S=c?.[0];for(let t=0,e=n.length;t<e;++t)P=n[t],E=c?.[t],P>=h&&P<=l&&E>=g&&E<=d?(m.push({x:P,y:E}),b.push(P),x.push(E),A&&(T=Math.max(T,P),C=Math.min(C,P)),y&&(M=Math.max(M,E),S=Math.min(S,E))):v=!0;return A&&(i.dataMax=Math.max(T,i.dataMax||0),i.dataMin=Math.min(C,i.dataMin||0)),y&&(s.dataMax=Math.max(M,s.dataMax||0),s.dataMin=Math.min(S,s.dataMin||0)),this.cropped=v,this.cropStart=0,v&&!this.dataTable.modified&&(this.dataTable.modified=new X),this.dataTable.getModified().setColumns({x:b,y:x}),ti(this,b)||(this.processedData=m),!0}function tl(){let e=this.options||{},i=this.chart,s=i.boost,r=this.boost,o=this.xAxis,n=this.yAxis,a=e.xData||this.getColumn("x",!0),l=e.yData||this.getColumn("y",!0),h=this.getColumn("low",!0),c=this.getColumn("high",!0),u=this.processedData||e.data,d=o.getExtremes(),f=d.min-(o.minPointOffset||0),m=d.max+(o.minPointOffset||0),b=n.getExtremes(),x=b.min-(n.minPointOffset||0),A=b.max+(n.minPointOffset||0),v={},P=!!this.sampling,T=e.enableMouseTracking,C=e.threshold,E=this.pointArrayMap&&"low,high"===this.pointArrayMap.join(","),M=!!e.stacking,S=this.cropStart||0,k=this.requireSorting,w=!a,R="x"===e.findNearestPointBy,U=(this.getColumn("x").length?this.getColumn("x"):void 0)||this.options.xData||this.getColumn("x",!0),L=y(e.lineWidth,1),N=e.nullInteraction&&x,_=i.tooltip,O=!1,D,z=n.getThreshold(C),I,G,B,V;if(!this.boosted||(this.points?.forEach(t=>{t?.destroyElements?.()}),this.points=[],_&&!_.isHidden?(i.hoverPoint?.series===this||i.hoverPoints?.some(t=>t.series===this))&&(i.hoverPoint=i.hoverPoints=void 0,_.hide(0)):i.hoverPoints&&(i.hoverPoints=i.hoverPoints.filter(t=>t.series!==this)),o.isPanning||n.isPanning)||(O=J(i,this),i.boosted=!0,!this.visible))return;(this.points||this.graph)&&$(this),j(i)?(this.markerGroup&&this.markerGroup!==s?.markerGroup&&this.markerGroup.destroy(),this.markerGroup=s?.markerGroup,r&&r.target&&(this.renderTarget=r.target=r.target.destroy())):(this.markerGroup===s?.markerGroup&&(this.markerGroup=void 0),this.markerGroup=this.plotGroup("markerGroup","markers","visible",1,i.seriesGroup).addClass("highcharts-tracker"));let X=this.points=[],F=(e,s,r,a)=>{let l=!!U&&U[S+r],h=t=>{i.inverted&&(t=o.len-t,s=n.len-s),X.push({destroy:K,x:l,clientX:t,plotX:t,plotY:s,i:S+r,percentage:a})};e=Math.ceil(e),t=R?e:e+","+s,T&&(v[t]?l===U[U.length-1]&&(X.length--,h(e)):(v[t]=!0,h(e)))};this.buildKDTree=K,g(this,"renderCanvas"),s&&L>1&&this.is("line")&&(s.lineWidthFilter?.remove(),s.lineWidthFilter=i.renderer.definition({tagName:"filter",children:[{tagName:"feMorphology",attributes:{operator:"dilate",radius:.25*L}}],attributes:{id:"linewidth"}}),(r?.target||s.target)?.attr({filter:"url(#linewidth)"})),O&&(Z(O,this),O.pushSeries(this),to(this));let H=O.settings,Y=p(H.chunkSize)&&H.chunkSize>0?H.chunkSize:3e3,W=()=>{g(this,"renderedCanvas"),delete this.buildKDTree,this.options&&this.buildKDTree(),H.debug.timeKDTree&&console.timeEnd("kd tree building")};i.renderer.forExport||(H.debug.timeKDTree&&console.time("kd tree building"),tt(M?this.data.slice(S):a||u,function(t,e){let s=void 0===i.index,r,a,u,d,g,p=!1,b=!0;return null==t||(!s&&(w?(r=t[0],a=t[1]):(r=t,a=l[e]??N??null),E?(w&&(a=t.slice(1,3)),p=h[e],a=c[e]):M&&(r=t.x,p=(a=t.stackY)-t.y,g=t.percentage),k||(b=(a||0)>=x&&a<=A),null!==a&&r>=f&&r<=m&&b&&(u=o.toPixels(r,!0),P?((void 0===B||u===D)&&(E||(p=a),(void 0===V||a>G)&&(G=a,V=e),(void 0===B||p<I)&&(I=p,B=e)),R&&u===D||(void 0!==B&&(d=n.toPixels(G,!0),z=n.toPixels(I,!0),F(u,d,V,g),z!==d&&F(u,z,B,g)),B=V=void 0,D=u)):F(u,d=Math.ceil(n.toPixels(a,!0)),e,g))),!s)},W,Y))}function th(t){let e=!0;if(this.chart.options&&this.chart.options.boost&&(e=void 0===this.chart.options.boost.enabled||this.chart.options.boost.enabled),!e||!this.boosted)return t.call(this);this.chart.boosted=!0;let i=J(this.chart,this);i&&(Z(i,this),i.pushSeries(this)),to(this)}function tc(t){if(this.boosted){if(te(this,!0))return{};if(this.xAxis?.isPanning||this.yAxis?.isPanning)return this}return t.apply(this,[].slice.call(arguments,1))}function tu(t){let e=this.options.data;if(Q(this.chart)&&l[this.type]){let s=this.is("scatter")&&!this.is("bubble")&&!this.is("treemap")&&!this.is("heatmap");if(!ti(this,e)||s||this.is("treemap")||this.options.stacking||!te(this,!0)){if(this.boosted&&(this.xAxis?.isPanning||this.yAxis?.isPanning))return;s&&"treegrid"!==this.yAxis.type?ta.call(this,arguments[1]):t.apply(this,[].slice.call(arguments,1)),e=this.getColumn("x",!0)}if(this.boosted=ti(this,e),this.boosted){let t;this.options.data?.length&&(p(t=this.getFirstValidPoint(this.options.data))||m(t)||this.is("treemap")||(0,o.error)(12,!1,this.chart));var i=this;i.boost=i.boost||{getPoint:t=>tn(i,t)};let e=i.boost.altered=[];if(["allowDG","directTouch","stickyTracking"].forEach(t=>{e.push({prop:t,val:i[t],own:Object.hasOwnProperty.call(i,t)})}),i.allowDG=!1,i.directTouch=!1,i.stickyTracking=!0,i.finishedAnimating=!0,i.labelBySeries&&(i.labelBySeries=i.labelBySeries.destroy()),i.is("scatter")&&!i.is("treemap")&&i.data.length){for(let t of i.data)t?.destroy?.();i.data.length=0,i.points.length=0,delete i.processedData}}else!function(t){let e=t.boost,i=t.chart,s=i.boost;if(s?.markerGroup)for(let t of(s.markerGroup.destroy(),s.markerGroup=void 0,i.series))t.markerGroup=void 0,t.markerGroup=t.plotGroup("markerGroup","markers","visible",1,i.seriesGroup).addClass("highcharts-tracker");e&&((e.altered||[]).forEach(e=>{e.own?t[e.prop]=e.val:delete t[e.prop]}),e.clear&&e.clear()),(i.seriesGroup||t.group)?.clip()}(this)}else t.apply(this,[].slice.call(arguments,1))}function td(t){let e=t.apply(this,[].slice.call(arguments,1));return this.boost&&e?this.boost.getPoint(e):e}let tg={compose:function(t,e,i,s){if(v(Y,"Boost.Series")){let r=H().plotOptions,o=t.prototype;if(u(t,"destroy",ts),u(t,"hide",tr),s&&(o.renderCanvas=tl),P(o,"getExtremes",tc),P(o,"processData",tu),P(o,"searchPoint",td),["translate","generatePoints","drawTracker","drawPoints","render"].forEach(t=>(function(t,e,i){function s(t){let e=this.options.stacking&&("translate"===i||"generatePoints"===i);this.boosted&&!e&&Q(this.chart)&&"heatmap"!==this.type&&"treemap"!==this.type&&l[this.type]&&0!==this.options.boostThreshold?"render"===i&&this.renderCanvas&&this.renderCanvas():t.call(this)}if(P(t,i,s),"translate"===i)for(let t of["column","arearange","columnrange","heatmap","treemap"])e[t]&&P(e[t].prototype,i,s)})(o,e,t)),P(i.prototype,"firePointEvent",function(t,e,i){if("click"===e&&this.series.boosted){let t=i.point;if((t.dist||t.distX)>=(t.series.options.marker?.radius??10))return}return t.apply(this,[].slice.call(arguments,1))}),a.forEach(t=>{let i=r[t];i&&(i.boostThreshold=5e3,i.boostData=[],e[t].prototype.fillOpacity=!0)}),s){let{area:t,areaspline:i,bubble:s,column:r,heatmap:o,scatter:n,treemap:a}=e;if(t&&d(t.prototype,{fill:!0,fillOpacity:!0,sampling:!0}),i&&d(i.prototype,{fill:!0,fillOpacity:!0,sampling:!0}),s){let t=s.prototype;delete t.buildKDTree,P(t,"markerAttribs",function(t){return!this.boosted&&t.apply(this,[].slice.call(arguments,1))})}r&&d(r.prototype,{fill:!0,sampling:!0}),n&&(n.prototype.fill=!0),[o,a].forEach(t=>{t&&P(t.prototype,"drawPoints",th)})}}return t},destroyGraphics:$,eachAsync:tt,getPoint:tn},{getBoostClipRect:tf,isChartSeriesBoosting:tp}=M,{destroyGraphics:tm}=tg,{parse:tb}=k(),{doc:tx,noop:tA}=n();!function(t){let e,i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";function s(t,e,i,s,r){r&&e!==r.clientX&&(t.moveTo(r.clientX,r.yBottom),t.lineTo(r.clientX,r.plotY),t.lineTo(e,i),t.lineTo(e,s))}function r(t,e,i,s,r){t.moveTo(e,i),t.arc(e,i,this.radii&&this.radii[r],0,2*Math.PI,!1)}function o(t,e,i,s){t.rect(e-1,i,1,s-i)}function n(){this.boost&&this.boost.copy&&this.boost.copy()}function a(){let t=this.boost||{};t.target&&t.target.attr({href:i}),t.canvas&&t.canvas.getContext("2d").clearRect(0,0,t.canvas.width,t.canvas.height)}function l(){tp(this.chart)?this.boost&&this.boost.clear&&this.boost.clear():this.boost&&this.boost.copy?this.boost.copy():this.chart.boost&&this.chart.boost.copy&&this.chart.boost.copy()}function h(t,e,i){t.lineTo(e,i)}function c(){let t,e=this.chart,s=tp(e)?e:this,r=s===e?e.seriesGroup:e.seriesGroup||this.group,o=e.chartWidth,n=e.chartHeight,a=function(t,e,i,s,r,o,n){t.call(this,i,e,s,r,o,n)},l=s.boost=s.boost||{};return t=l.targetCtx,l.canvas||(l.canvas=tx.createElement("canvas"),l.target=e.renderer.image("",0,0,o,n).addClass("highcharts-boost-canvas").add(r),t=l.targetCtx=l.canvas.getContext("2d"),e.inverted&&["moveTo","lineTo","rect","arc"].forEach(e=>{P(t,e,a)}),l.copy=function(){l.target.attr({href:l.canvas.toDataURL("image/png")})},l.clear=function(){t.clearRect(0,0,l.canvas.width,l.canvas.height),s===l.target&&l.target.attr({href:i})},l.clipRect=e.renderer.clipRect(),l.target.clip(l.clipRect)),l.canvas.width!==o&&(l.canvas.width=o),l.canvas.height!==n&&(l.canvas.height=n),l.target.attr({x:0,y:0,width:o,height:n,style:"pointer-events: none",href:i}),l.clipRect&&l.clipRect.attr(tf(e,s)),t}function d(){let t=this,s=t.options,r=t.chart,o=t.xAxis,n=t.yAxis,a=r.options.boost||{},l={timeRendering:a.timeRendering||!1,timeSeriesProcessing:a.timeSeriesProcessing||!1,timeSetup:a.timeSetup||!1},h=t.getColumn("x",!0),c=t.getColumn("y",!0),d=s.data,f=o.getExtremes(),m=f.min,b=f.max,A=n.getExtremes(),v=A.min,P=A.max,T={},C=!!t.sampling,E=s.marker&&s.marker.radius,M=t.cvsStrokeBatch||1e3,S=s.enableMouseTracking,w=s.threshold,R=p(w),U=n.getThreshold(w),L=t.fill,N=t.pointArrayMap&&"low,high"===t.pointArrayMap.join(","),_=!!s.stacking,O=t.cropStart||0,D=r.options.loading,z=t.requireSorting,I=s.connectNulls,G=!h,B=_?t.data:h||d,V=t.fillOpacity?k().parse(t.color).setOpacity(y(s.fillOpacity,.75)).get():t.color,X="x"===s.findNearestPointBy,F=this.boost||{},j=t.cvsDrawPoint,H=s.lineWidth?t.cvsLineTo:void 0,Y=E&&E<=1?t.cvsMarkerSquare:t.cvsMarkerCircle;F.target&&F.target.attr({href:i}),(t.points||t.graph)&&tm(t),t.plotGroup("group","series",t.visible?"visible":"hidden",s.zIndex,r.seriesGroup),t.markerGroup=t.group,u(t,"destroy",function(){t.markerGroup=null});let W=this.points=[],K=this.getContext();if(t.buildKDTree=tA,F.clear&&F.clear(),!t.visible)return;if(d.length>99999){var q;r.options.loading=x(D,{labelStyle:{backgroundColor:tb("#ffffff").setOpacity(.75).get(),padding:"1em",borderRadius:"0.5em"},style:{backgroundColor:"none",opacity:1}}),null!=(q=e)&&clearTimeout(q),r.showLoading("Drawing..."),r.options.loading=D}l.timeRendering&&console.time("canvas rendering");let Z=0,Q,J,$=U,tt,te,ti,ts,tr,to,tn=function(){L?(K.fillStyle=V,K.fill()):(K.strokeStyle=t.color,K.lineWidth=s.lineWidth,K.stroke())},ta=function(e,i,s,o){0===Z&&(K.beginPath(),H&&(K.lineJoin="round")),r.scroller&&"highcharts-navigator-series"===t.options.className?(i+=r.scroller.top,s&&(s+=r.scroller.top)):i+=r.plotTop,e+=r.plotLeft,tt?K.moveTo(e,i):j?j(K,e,i,s,J):H?H(K,e,i):Y&&Y.call(t,K,e,i,E,o),(Z+=1)===M&&(tn(),Z=0),J={clientX:e,plotY:i,yBottom:s}},tl=(this.getColumn("x").length?this.getColumn("x"):void 0)||this.options.xData||!!this.getColumn("x",!0).length&&this.getColumn("x",!0),th=function(t,e,i){to=X?t:t+","+e,S&&!T[to]&&(T[to]=!0,r.inverted&&(t=o.len-t,e=n.len-e),W.push({x:!!tl&&tl[O+i],clientX:t,plotX:t,plotY:e,i:O+i}))};tg.eachAsync(B,(e,i)=>{let s=void 0===r.index,a,l,h,u,d,g,f=!1,p=!1,x=NaN,A=NaN,y=!0;return!s&&(G?(a=e[0],l=e[1],B[i+1]&&(x=B[i+1][0]),B[i-1]&&(A=B[i-1][0])):(a=e,l=c[i],B[i+1]&&(x=B[i+1]),B[i-1]&&(A=B[i-1])),x&&x>=m&&x<=b&&(f=!0),A&&A>=m&&A<=b&&(p=!0),N?(G&&(l=e.slice(1,3)),g=l[0],l=l[1]):_&&(a=e.x,g=(l=e.stackY)-e.y),d=null===l,z||(y=l>=v&&l<=P),!d&&(a>=m&&a<=b&&y||f||p)&&(h=Math.round(o.toPixels(a,!0)),C?((void 0===ts||h===Q)&&(N||(g=l),(void 0===tr||l>ti)&&(ti=l,tr=i),(void 0===ts||g<te)&&(te=g,ts=i)),h!==Q&&(void 0!==ts&&(u=n.toPixels(ti,!0),$=n.toPixels(te,!0),ta(h,R?Math.min(u,U):u,R?Math.max($,U):$,i),th(h,u,tr),$!==u&&th(h,$,ts)),ts=tr=void 0,Q=h)):(ta(h,u=Math.round(n.toPixels(l,!0)),$,i),th(h,u,i))),tt=d&&!I,i%5e4==0&&(t.boost&&t.boost.copy?t.boost.copy():t.chart.boost&&t.chart.boost.copy&&t.chart.boost.copy())),!s},function(){let i=r.loadingDiv,s=r.loadingShown;tn(),t.canvasToSVG(),l.timeRendering&&console.timeEnd("canvas rendering"),g(t,"renderedCanvas"),s&&(i.style.transition="opacity 250ms",i.opacity=0,r.loadingShown=!1,e=setTimeout(function(){i.parentNode&&i.parentNode.removeChild(i),r.loadingDiv=r.loadingSpan=null},250)),delete t.buildKDTree,t.buildKDTree()},r.renderer.forExport?Number.MAX_VALUE:void 0)}function f(t,e,i,s){t.moveTo(e,i),t.arc(e,i,s,0,2*Math.PI,!1)}function m(t,e,i,s){t.rect(e-s,i-s,2*s,2*s)}function b(){let t=this.chart,e=this.getContext(),i=this.chart.inverted,s=this.xAxis,r=this.yAxis;e?(this.points.forEach(o=>{let n=o.plotY;if(void 0!==n&&!isNaN(n)&&null!==o.y&&e){let{x:n=0,y:a=0,width:l=0,height:h=0}=o.shapeArgs||{};e.fillStyle=(t.styledMode?o.series.colorAttribs(o):o.series.pointAttribs(o)).fill,i?e.fillRect(r.len-a+s.left,s.len-n+r.top,-h,-l):e.fillRect(n+s.left,a+r.top,l,h)}}),this.canvasToSVG()):this.chart.showLoading("Your browser doesn't support HTML5 canvas, <br>please use a modern browser")}t.compose=function(t,e,i){let g=e.prototype;if(!g.renderCanvas){let{area:e,bubble:p,column:x,heatmap:A,scatter:y}=i;if(t.prototype.callbacks.push(t=>{u(t,"predraw",a),u(t,"render",n)}),g.canvasToSVG=l,g.cvsLineTo=h,g.getContext=c,g.renderCanvas=d,e){let t=e.prototype;t.cvsDrawPoint=s,t.fill=!0,t.fillOpacity=!0,t.sampling=!0}if(p){let t=p.prototype;t.cvsMarkerCircle=r,t.cvsStrokeBatch=1}if(x){let t=x.prototype;t.cvsDrawPoint=o,t.fill=!0,t.sampling=!0}if(A&&P(A.prototype,"drawPoints",b),y){let t=y.prototype;t.cvsMarkerCircle=f,t.cvsMarkerSquare=m,t.fill=!0}}}}(s||(s={}));let ty=s,tv=n();tv.initCanvasBoost=function(){ty.compose(tv.Chart,tv.Series,tv.seriesTypes)};let tP=n();export{tP as default};