let t,e;/**
 * Highstock JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/stock
 * @requires highcharts
 *
 * Highcharts Stock as a plugin for Highcharts
 *
 * (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";import"./broken-axis.js";import"./datagrouping.js";import"./mouse-wheel-zoom.js";var s,o,r,a,n,l,h={};h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},h.d=(t,e)=>{for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let d=i.default;var p=h.n(d);let c=i.default.Point;var u=h.n(c);let g=i.default.Series;var m=h.n(g);let{tooltipFormatter:x}=u().prototype;!function(t){function e(t,e,i){!this.isXAxis&&(this.series.forEach(function(i){"compare"===t&&"boolean"!=typeof e?i.setCompare(e,!1):"cumulative"!==t||(0,d.isString)(e)||i.setCumulative(e,!1)}),(0,d.pick)(i,!0)&&this.chart.redraw())}function i(t){let e=this,{numberFormatter:i}=e.series.chart,s=function(s){t=t.replace("{point."+s+"}",(e[s]>0&&"change"===s?"+":"")+i(e[s],(0,d.pick)(e.series.tooltipOptions.changeDecimals,2)))};return(0,d.defined)(e.change)&&s("change"),(0,d.defined)(e.cumulativeSum)&&s("cumulativeSum"),x.apply(this,[t])}function s(){let t,e=this.options.linkedTo,i=this.chart;if(e){let t=":previous"===e?i.series[this.index-1]:i.get(e);t instanceof m()&&(this.options.compare=(0,d.pick)(this.userOptions.compare,t.options.compare))}let s=this.options.compare;("percent"===s||"value"===s||this.options.cumulative)&&(t=new p(this),"percent"===s||"value"===s?t.initCompare(s):t.initCumulative()),this.dataModify=t}function o(t){let e=t.dataExtremes,i=e.activeYData;if(this.dataModify&&e){let t;this.options.compare?t=[this.dataModify.modifyValue(e.dataMin),this.dataModify.modifyValue(e.dataMax)]:this.options.cumulative&&(0,d.isArray)(i)&&i.length>=2&&(t=p.getCumulativeExtremes(i)),t&&(e.dataMin=(0,d.arrayMin)(t),e.dataMax=(0,d.arrayMax)(t))}}function r(t,e){this.options.compare=this.userOptions.compare=t,this.update({},(0,d.pick)(e,!0)),this.dataModify&&("value"===t||"percent"===t)?this.dataModify.initCompare(t):this.points.forEach(t=>{delete t.change})}function a(){let t=this.getColumn(this.pointArrayMap&&(this.options.pointValKey||this.pointValKey)||"y",!0);if(this.xAxis&&t.length&&this.dataModify){let e=this.getColumn("x",!0),i=this.dataTable.rowCount,s=+(!0!==this.options.compareStart);for(let o=0;o<i-s;o++){let i=t[o];if((0,d.isNumber)(i)&&0!==i&&e[o+s]>=(this.xAxis.min||0)){this.dataModify.compareValue=i;break}}}}function n(t,e){this.setModifier("compare",t,e)}function l(t,e){t=(0,d.pick)(t,!1),this.options.cumulative=this.userOptions.cumulative=t,this.update({},(0,d.pick)(e,!0)),this.dataModify?this.dataModify.initCumulative():this.points.forEach(t=>{delete t.cumulativeSum})}function h(t,e){this.setModifier("cumulative",t,e)}t.compose=function(t,p,c){let u=p.prototype,g=c.prototype,m=t.prototype;return m.setCompare||(m.setCompare=r,m.setCumulative=l,(0,d.addEvent)(t,"afterInit",s),(0,d.addEvent)(t,"afterGetExtremes",o),(0,d.addEvent)(t,"afterProcessData",a)),u.setCompare||(u.setCompare=n,u.setModifier=e,u.setCumulative=h,g.tooltipFormatter=i),t};class p{constructor(t){this.series=t}modifyValue(){return 0}static getCumulativeExtremes(t){let e=1/0,i=-1/0;return t.reduce((t,s)=>{let o=t+s;return e=Math.min(e,o,t),i=Math.max(i,o,t),o}),[e,i]}initCompare(t){this.modifyValue=function(e,i){null===e&&(e=0);let s=this.compareValue;if(void 0!==e&&void 0!==s){if("value"===t?e-=s:e=e/Math.abs(s)*100-100*(100!==this.series.options.compareBase),void 0!==i){let t=this.series.points[i];t&&(t.change=e)}return e}return 0}}initCumulative(){this.modifyValue=function(t,e){if(null===t&&(t=0),void 0!==t&&void 0!==e){let i=e>0?this.series.points[e-1]:null;i&&i.cumulativeSum&&(t=(0,d.correctFloat)(i.cumulativeSum+t));let s=this.series.points[e],o=s.series.options.cumulativeStart,r=s.x<=this.series.xAxis.max&&s.x>=this.series.xAxis.min;return s&&(!o||r?s.cumulativeSum=t:s.cumulativeSum=void 0),t}return 0}}}t.Additions=p}(s||(s={}));let f=s,b=i.default.Axis;var v=h.n(b);let{isTouchDevice:y}=p(),M=[];function k(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function A(){let t,e,i,s=this.legend,o=this.navigator;if(o){t=s&&s.options,e=o.xAxis,i=o.yAxis;let{scrollbarHeight:r,scrollButtonSize:a}=o;this.inverted?(o.left=o.opposite?this.chartWidth-r-o.height:this.spacing[3]+r,o.top=this.plotTop+a):(o.left=(0,d.pick)(e.left,this.plotLeft+a),o.top=o.navigatorOptions.top||this.chartHeight-o.height-r-(this.scrollbar?.options.margin||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(t&&"bottom"===t.verticalAlign&&"proximate"!==t.layout&&t.enabled&&!t.floating?s.legendHeight+(0,d.pick)(t.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),e&&i&&(this.inverted?e.options.left=i.options.left=o.left:e.options.top=i.options.top=o.top,e.setAxisSize(),i.setAxisSize())}}function E(e){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new t(this),(0,d.pick)(e.redraw,!0)&&this.redraw(e.animation))}function w(){let e=this.options;(e.navigator.enabled||e.scrollbar.enabled)&&(this.scroller=this.navigator=new t(this))}function S(){let t=this.options,e=t.navigator,i=t.rangeSelector;if((e&&e.enabled||i&&i.enabled)&&(!y&&"x"===this.zooming.type||y&&"x"===this.zooming.pinchType))return!1}function O(t){let e=t.navigator;if(e&&t.xAxis[0]){let i=t.xAxis[0].getExtremes();e.render(i.min,i.max)}}function T(t){let e=t.options.navigator||{},i=t.options.scrollbar||{};!this.navigator&&!this.scroller&&(e.enabled||i.enabled)&&((0,d.merge)(!0,this.options.navigator,e),(0,d.merge)(!0,this.options.scrollbar,i),delete t.options.navigator,delete t.options.scrollbar)}let C=function(e,i){if((0,d.pushUnique)(M,e)){let s=e.prototype;t=i,s.callbacks.push(O),(0,d.addEvent)(e,"afterAddSeries",k),(0,d.addEvent)(e,"afterSetChartSize",A),(0,d.addEvent)(e,"afterUpdate",E),(0,d.addEvent)(e,"beforeRender",w),(0,d.addEvent)(e,"beforeShowResetZoom",S),(0,d.addEvent)(e,"update",T)}},{isTouchDevice:B}=p();function D(){this.navigatorAxis||(this.navigatorAxis=new R(this))}function P(t){let e,i=this.chart,s=i.options,o=s.navigator,r=this.navigatorAxis,a=i.zooming.pinchType,n=s.rangeSelector,l=i.zooming.type;if(this.isXAxis&&(o?.enabled||n?.enabled)){if("y"===l&&"zoom"===t.trigger)e=!1;else if(("zoom"===t.trigger&&"xy"===l||B&&"xy"===a)&&this.options.range){let e=r.previousZoom;(0,d.defined)(t.min)?r.previousZoom=[this.min,this.max]:e&&(t.min=e[0],t.max=e[1],r.previousZoom=void 0)}}void 0!==e&&t.preventDefault()}class R{static compose(t){t.keepProps.includes("navigatorAxis")||(t.keepProps.push("navigatorAxis"),(0,d.addEvent)(t,"init",D),(0,d.addEvent)(t,"setExtremes",P))}constructor(t){this.axis=t}destroy(){this.axis=void 0}toFixedRange(t,e,i,s){let o=this.axis,r=(o.pointRange||0)/2,a=(0,d.pick)(i,o.translate(t,!0,!o.horiz)),n=(0,d.pick)(s,o.translate(e,!0,!o.horiz));return(0,d.defined)(i)||(a=(0,d.correctFloat)(a+r)),(0,d.defined)(s)||(n=(0,d.correctFloat)(n-r)),(0,d.isNumber)(a)&&(0,d.isNumber)(n)||(a=n=void 0),{min:a,max:n}}}let L=i.default.SeriesRegistry;var z=h.n(L);let{seriesTypes:I}=z(),N={height:40,margin:22,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"var(--highcharts-neutral-color-5)",borderColor:"var(--highcharts-neutral-color-40)"},maskFill:"color-mix(var(--highcharts-highlight-color-60) 30%, transparent)",outlineColor:"var(--highcharts-neutral-color-40)",outlineWidth:1,series:{type:void 0===I.areaspline?"line":"areaspline",fillOpacity:.05,lineWidth:1,compare:null,sonification:{enabled:!1},dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"var(--highcharts-neutral-color-10)",id:"navigator-x-axis",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"var(--highcharts-neutral-color-100)",fontSize:"0.7em",opacity:.6,textOutline:"2px contrast"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,id:"navigator-y-axis",maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:void 0},tickLength:0,tickWidth:0}},W={"navigator-handle":function(t,e,i,s,o={}){var r,a,n,l;let h=o.width?o.width/2:i,p=(0,d.relativeLength)(o.borderRadius||0,Math.min(2*h,s));return[["M",-1.5,(s=o.height||s)/2-3.5],["L",-1.5,s/2+4.5],["M",.5,s/2-3.5],["L",.5,s/2+4.5],...(r=-h-1,a=2*h+1,n=s,l={r:p},l?.r?function(t,e,i,s,o){let r=o?.r||0;return[["M",t+r,e],["L",t+i-r,e],["A",r,r,0,0,1,t+i,e+r],["L",t+i,e+s-r],["A",r,r,0,0,1,t+i-r,e+s],["L",t+r,e+s],["A",r,r,0,0,1,t,e+s-r],["L",t,e+r],["A",r,r,0,0,1,t+r,e],["Z"]]}(r,.5,a,n,l):[["M",r,.5],["L",r+a,.5],["L",r+a,.5+n],["L",r,.5+n],["Z"]])]}},X=i.default.SVGRenderer;var G=h.n(X);let F={setFixedRange:function(t){let e=this.xAxis[0];(0,d.defined)(e.dataMax)&&(0,d.defined)(e.dataMin)&&t?this.fixedRange=Math.min(t,e.dataMax-e.dataMin):this.fixedRange=t}},{defaultOptions:U}=p(),{composed:Y}=p(),{setFixedRange:H}=F;function V(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}let _=function(t,e,i){R.compose(e),(0,d.pushUnique)(Y,"Navigator")&&(t.prototype.setFixedRange=H,(0,d.extend)(G().prototype.symbols,W),(0,d.extend)(U,{navigator:N}),(0,d.addEvent)(i,"afterUpdate",V))},{composed:j}=p();!function(t){let e;function i(t){let e=(0,d.pick)(t.options?.min,t.min),i=(0,d.pick)(t.options?.max,t.max);return{axisMin:e,axisMax:i,scrollMin:(0,d.defined)(t.dataMin)?Math.min(e,t.min??1/0,t.dataMin,t.threshold??1/0):e,scrollMax:t.treeGrid?.adjustedMax??((0,d.defined)(t.dataMax)?Math.max(i,t.max??-1/0,t.dataMax,t.threshold??-1/0):i)}}function s(){let t=this.scrollbar,e=t&&!t.options.opposite,i=this.horiz?2:e?3:1;t&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[i]+=t.size+(t.options.margin||0))}function o(){let t=this;t.options?.scrollbar?.enabled&&(t.options.scrollbar.vertical=!t.horiz,t.options.startOnTick=t.options.endOnTick=!1,t.scrollbar=new e(t.chart.renderer,t.options.scrollbar,t.chart),(0,d.addEvent)(t.scrollbar,"changed",function(e){let s,o,{axisMin:r,axisMax:a,scrollMin:n,scrollMax:l}=i(t),h=t.toPixels(n),p=t.toPixels(l)-h;if((0,d.defined)(r)&&(0,d.defined)(a))if(t.horiz&&!t.reversed||!t.horiz&&t.reversed?(s=Math.min(l,t.toValue(h+p*this.to)),o=Math.max(n,t.toValue(h+p*this.from))):(s=Math.min(l,t.toValue(h+p*(1-this.from))),o=Math.max(n,t.toValue(h+p*(1-this.to)))),this.shouldUpdateExtremes(e.DOMType)){let i="mousemove"!==e.DOMType&&"touchmove"!==e.DOMType&&void 0;t.setExtremes((0,d.correctFloat)(o),(0,d.correctFloat)(s),!0,i,e)}else this.setRange(this.from,this.to)}))}function r(){let t,e,s,{scrollMin:o,scrollMax:r}=i(this),a=this.scrollbar,n=(this.axisTitleMargin||0)+(this.titleOffset||0),l=this.chart.scrollbarsOffsets,h=this.options.margin||0;if(a&&l){if(this.horiz)this.opposite||(l[1]+=n),a.position(this.left,this.top+this.height+2+l[1]-(this.opposite?h:0),this.width,this.height),this.opposite||(l[1]+=h),t=1;else{let e;this.opposite&&(l[0]+=n),e=a.options.opposite?this.left+this.width+2+l[0]-(this.opposite?0:h):this.opposite?0:h,a.position(e,this.top,this.width,this.height),this.opposite&&(l[0]+=h),t=0}if(l[t]+=a.size+(a.options.margin||0),isNaN(o)||isNaN(r)||!(0,d.defined)(this.min)||!(0,d.defined)(this.max)||(0,d.defined)(this.dataMin)&&this.dataMin===this.dataMax)a.setRange(0,1);else if(this.min===this.max){let t=this.pointRange/(this.dataMax+1);e=t*this.min,s=t*(this.max+1),a.setRange(e,s)}else e=(this.toPixels(this.min)-this.toPixels(o))/(this.toPixels(r)-this.toPixels(o)),s=(this.toPixels(this.max)-this.toPixels(o))/(this.toPixels(r)-this.toPixels(o)),this.horiz&&!this.reversed||!this.horiz&&this.reversed?a.setRange(e,s):a.setRange(1-s,1-e)}}t.compose=function(t,i){(0,d.pushUnique)(j,"Axis.Scrollbar")&&(e=i,(0,d.addEvent)(t,"afterGetOffset",s),(0,d.addEvent)(t,"afterInit",o),(0,d.addEvent)(t,"afterRender",r))}}(o||(o={}));let q=o,K={height:10,barBorderRadius:5,buttonBorderRadius:0,buttonsEnabled:!1,liveRedraw:void 0,margin:void 0,minWidth:6,opposite:!0,step:.2,zIndex:3,barBackgroundColor:"var(--highcharts-neutral-color-20)",barBorderWidth:0,barBorderColor:"var(--highcharts-neutral-color-20)",buttonArrowColor:"var(--highcharts-neutral-color-80)",buttonBackgroundColor:"var(--highcharts-neutral-color-10)",buttonBorderColor:"var(--highcharts-neutral-color-20)",buttonBorderWidth:1,rifleColor:"none",trackBackgroundColor:"rgba(255, 255, 255, 0.001)",trackBorderColor:"var(--highcharts-neutral-color-20)",trackBorderRadius:5,trackBorderWidth:1},{defaultOptions:Z}=p(),{composed:$}=p();class J{static compose(t){q.compose(t,J),(0,d.pushUnique)($,"Scrollbar")&&(0,d.extend)(Z,{scrollbar:K})}static swapXY(t,e){return e&&t.forEach(t=>{let e,i=t.length;for(let s=0;s<i;s+=2)"number"==typeof(e=t[s+1])&&(t[s+1]=t[s+2],t[s+2]=e)}),t}constructor(t,e,i){this._events=[],this.chartX=0,this.chartY=0,this.from=0,this.scrollbarButtons=[],this.scrollbarLeft=0,this.scrollbarStrokeWidth=1,this.scrollbarTop=0,this.size=0,this.to=0,this.trackBorderWidth=1,this.x=0,this.y=0,this.init(t,e,i)}addEvents(){let t=this.options.inverted?[1,0]:[0,1],e=this.scrollbarButtons,i=this.scrollbarGroup.element,s=this.track.element,o=this.mouseDownHandler.bind(this),r=this.mouseMoveHandler.bind(this),a=this.mouseUpHandler.bind(this),n=[[e[t[0]].element,"click",this.buttonToMinClick.bind(this)],[e[t[1]].element,"click",this.buttonToMaxClick.bind(this)],[s,"click",this.trackClick.bind(this)],[i,"mousedown",o],[i.ownerDocument,"mousemove",r],[i.ownerDocument,"mouseup",a],[i,"touchstart",o],[i.ownerDocument,"touchmove",r],[i.ownerDocument,"touchend",a]];n.forEach(function(t){d.addEvent.apply(null,t)}),this._events=n}buttonToMaxClick(t){let e=(this.to-this.from)*(0,d.pick)(this.options.step,.2);this.updatePosition(this.from+e,this.to+e),(0,d.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}buttonToMinClick(t){let e=(0,d.correctFloat)(this.to-this.from)*(0,d.pick)(this.options.step,.2);this.updatePosition((0,d.correctFloat)(this.from-e),(0,d.correctFloat)(this.to-e)),(0,d.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}cursorToScrollbarPosition(t){let e=this.options,i=e.minWidth>this.calculatedWidth?e.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-i),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-i)}}destroy(){let t=this,e=t.chart.scroller;t.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(e){t[e]&&t[e].destroy&&(t[e]=t[e].destroy())}),e&&t===e.scrollbar&&(e.scrollbar=null,(0,d.destroyObjectProperties)(e.scrollbarButtons))}drawScrollbarButton(t){let e=this.renderer,i=this.scrollbarButtons,s=this.options,o=this.size,r=e.g().add(this.group);if(i.push(r),s.buttonsEnabled){let a=e.rect().addClass("highcharts-scrollbar-button").add(r);this.chart.styledMode||a.attr({stroke:s.buttonBorderColor,"stroke-width":s.buttonBorderWidth,fill:s.buttonBackgroundColor}),a.attr(a.crisp({x:-.5,y:-.5,width:o,height:o,r:s.buttonBorderRadius},a.strokeWidth()));let n=e.path(J.swapXY([["M",o/2+(t?-1:1),o/2-3],["L",o/2+(t?-1:1),o/2+3],["L",o/2+(t?2:-2),o/2]],s.vertical)).addClass("highcharts-scrollbar-arrow").add(i[t]);this.chart.styledMode||n.attr({fill:s.buttonArrowColor})}}init(t,e,i){this.scrollbarButtons=[],this.renderer=t,this.userOptions=e,this.options=(0,d.merge)(K,Z.scrollbar,e),this.options.margin=(0,d.pick)(this.options.margin,10),this.chart=i,this.size=(0,d.pick)(this.options.size,this.options.height),e.enabled&&(this.render(),this.addEvents())}mouseDownHandler(t){let e=this.chart.pointer?.normalize(t)||t,i=this.cursorToScrollbarPosition(e);this.chartX=i.chartX,this.chartY=i.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0}mouseMoveHandler(t){let e,i=this.chart.pointer?.normalize(t)||t,s=this.options.vertical?"chartY":"chartX",o=this.initPositions||[];this.grabbedCenter&&(!t.touches||0!==t.touches[0][s])&&(e=this.cursorToScrollbarPosition(i)[s]-this[s],this.hasDragged=!0,this.updatePosition(o[0]+e,o[1]+e),this.hasDragged&&(0,d.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}))}mouseUpHandler(t){this.hasDragged&&(0,d.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}),this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null}position(t,e,i,s){let{buttonsEnabled:o,margin:r=0,vertical:a}=this.options,n=this.rendered?"animate":"attr",l=s,h=0;this.group.show(),this.x=t,this.y=e+this.trackBorderWidth,this.width=i,this.height=s,this.xOffset=l,this.yOffset=h,a?(this.width=this.yOffset=i=h=this.size,this.xOffset=l=0,this.yOffset=h=o?this.size:0,this.barWidth=s-(o?2*i:0),this.x=t+=r):(this.height=s=this.size,this.xOffset=l=o?this.size:0,this.barWidth=i-(o?2*s:0),this.y=this.y+r),this.group[n]({translateX:t,translateY:this.y}),this.track[n]({width:i,height:s}),this.scrollbarButtons[1][n]({translateX:a?0:i-l,translateY:a?s-h:0})}removeEvents(){this._events.forEach(function(t){d.removeEvent.apply(null,t)}),this._events.length=0}render(){let t=this.renderer,e=this.options,i=this.size,s=this.chart.styledMode,o=t.g("scrollbar").attr({zIndex:e.zIndex}).hide().add();this.group=o,this.track=t.rect().addClass("highcharts-scrollbar-track").attr({r:e.trackBorderRadius||0,height:i,width:i}).add(o),s||this.track.attr({fill:e.trackBackgroundColor,stroke:e.trackBorderColor,"stroke-width":e.trackBorderWidth});let r=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-(0,d.crisp)(0,r),y:-(0,d.crisp)(0,r)}),this.scrollbarGroup=t.g().add(o),this.scrollbar=t.rect().addClass("highcharts-scrollbar-thumb").attr({height:i-r,width:i-r,r:e.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=t.path(J.swapXY([["M",-3,i/4],["L",-3,2*i/3],["M",0,i/4],["L",0,2*i/3],["M",3,i/4],["L",3,2*i/3]],e.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),s||(this.scrollbar.attr({fill:e.barBackgroundColor,stroke:e.barBorderColor,"stroke-width":e.barBorderWidth}),this.scrollbarRifles.attr({stroke:e.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-(0,d.crisp)(0,this.scrollbarStrokeWidth),-(0,d.crisp)(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)}setRange(t,e){let i,s,o=this.options,r=o.vertical,a=o.minWidth,n=this.barWidth,l=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(!(0,d.defined)(n))return;let h=n*Math.min(e,1);i=Math.ceil(n*(t=Math.max(t,0))),this.calculatedWidth=s=(0,d.correctFloat)(h-i),s<a&&(i=(n-a+s)*t,s=a);let p=Math.floor(i+this.xOffset+this.yOffset),c=s/2-.5;this.from=t,this.to=e,r?(this.scrollbarGroup[l]({translateY:p}),this.scrollbar[l]({height:s}),this.scrollbarRifles[l]({translateY:c}),this.scrollbarTop=p,this.scrollbarLeft=0):(this.scrollbarGroup[l]({translateX:p}),this.scrollbar[l]({width:s}),this.scrollbarRifles[l]({translateX:c}),this.scrollbarLeft=p,this.scrollbarTop=0),s<=12?this.scrollbarRifles.hide():this.scrollbarRifles.show(),!1===o.showFull&&(t<=0&&e>=1?this.group.hide():this.group.show()),this.rendered=!0}shouldUpdateExtremes(t){return(0,d.pick)(this.options.liveRedraw,p().svg&&!p().isTouchDevice&&!this.chart.boosted)||"mouseup"===t||"touchend"===t||!(0,d.defined)(t)}trackClick(t){let e=this.chart.pointer?.normalize(t)||t,i=this.to-this.from,s=this.y+this.scrollbarTop,o=this.x+this.scrollbarLeft;this.options.vertical&&e.chartY>s||!this.options.vertical&&e.chartX>o?this.updatePosition(this.from+i,this.to+i):this.updatePosition(this.from-i,this.to-i),(0,d.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}update(t){this.destroy(),this.init(this.chart.renderer,(0,d.merge)(!0,this.options,t),this.chart)}updatePosition(t,e){e>1&&(t=(0,d.correctFloat)(1-(0,d.correctFloat)(e-t)),e=1),t<0&&(e=(0,d.correctFloat)(e-t),t=0),this.from=t,this.to=e}}J.defaultOptions=K;let{defaultOptions:Q}=p(),{isTouchDevice:tt}=p();function te(t,...e){let i=[].filter.call(e,d.isNumber);if(i.length)return Math[t].apply(0,i)}class ti{static compose(t,e,i){C(t,ti),_(t,e,i)}constructor(t){this.isDirty=!1,this.scrollbarHeight=0,this.init(t)}drawHandle(t,e,i,s){let o=this.navigatorOptions.handles.height;this.handles[e][s](i?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-o)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-o/2-1)})}drawOutline(t,e,i,s){let o=this.navigatorOptions.maskInside,r=this.outline.strokeWidth(),a=r/2,n=r%2/2,l=this.scrollButtonSize,h=this.size,d=this.top,p=this.height,c=d-a,u=d+p,g=this.left,m,x;i?(m=d+e+n,e=d+t+n,x=[["M",g+p,d-l-n],["L",g+p,m],["L",g,m],["M",g,e],["L",g+p,e],["L",g+p,d+h+l]],o&&x.push(["M",g+p,m-a],["L",g+p,e+a])):(g-=l,t+=g+l-n,e+=g+l-n,x=[["M",g,c],["L",t,c],["L",t,u],["M",e,u],["L",e,c],["L",g+h+2*l,c]],o&&x.push(["M",t-a,c],["L",e+a,c])),this.outline[s]({d:x})}drawMasks(t,e,i,s){let o,r,a,n,l=this.left,h=this.top,d=this.height;i?(a=[l,l,l],n=[h,h+t,h+e],r=[d,d,d],o=[t,e-t,this.size-e]):(a=[l,l+t,l+e],n=[h,h,h],r=[t,e-t,this.size-e],o=[d,d,d]),this.shades.forEach((t,e)=>{t[s]({x:a[e],y:n[e],width:r[e],height:o[e]})})}renderElements(){let t=this,e=t.navigatorOptions,i=e.maskInside,s=t.chart,o=s.inverted,r=s.renderer,a={cursor:o?"ns-resize":"ew-resize"},n=t.navigatorGroup??(t.navigatorGroup=r.g("navigator").attr({zIndex:8,visibility:"hidden"}).add());if([!i,i,!i].forEach((i,o)=>{let l=t.shades[o]??(t.shades[o]=r.rect().addClass("highcharts-navigator-mask"+(1===o?"-inside":"-outside")).add(n));s.styledMode||(l.attr({fill:i?e.maskFill:"rgba(0,0,0,0)"}),1===o&&l.css(a))}),t.outline||(t.outline=r.path().addClass("highcharts-navigator-outline").add(n)),s.styledMode||t.outline.attr({"stroke-width":e.outlineWidth,stroke:e.outlineColor}),e.handles?.enabled){let i=!1,o=e.handles,{height:l,width:h}=o;[0,1].forEach(e=>{let d=o.symbols[e];(i=i||t.handles[e]?.symbolName!==d)&&(t.handles[e]?.destroy(),t.handles[e]=r.symbol(d,-h/2-1,0,h,l,o),t.handles[e].attr({zIndex:7-e}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][e]).add(n)),s.inverted&&t.handles[e].attr({rotation:90,rotationOriginX:Math.floor(-h/2),rotationOriginY:(l+h)/2}),s.styledMode||t.handles[e].attr({fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.lineWidth,width:o.width,height:o.height,x:-h/2-1,y:0}).css(a)}),i&&(t.partsEventsToUnbind?.forEach(t=>{t()}),t.partsEventsToUnbind=[...t.getPartsEvents("mousedown"),...t.getPartsEvents("touchstart")])}}update(t,e=!1){let i=this.chart,s=i.options.chart.inverted!==i.scrollbar?.options.vertical;if((0,d.merge)(!0,i.options.navigator,t),this.navigatorOptions=i.options.navigator||{},this.setOpposite(),(0,d.defined)(t.enabled)||s)return this.destroy(),this.navigatorEnabled=t.enabled||this.navigatorEnabled,this.init(i);if(this.navigatorEnabled&&(this.isDirty=!0,!1===t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{(0,d.removeEvent)(t,"updatedData",this.updatedDataHandler)},this),t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{t.eventsToUnbind.push((0,d.addEvent)(t,"updatedData",this.updatedDataHandler))},this),(t.series||t.baseSeries)&&this.setBaseSeries(void 0,!1),t.height||t.xAxis||t.yAxis)){this.height=t.height??this.height;let e=this.getXAxisOffsets();this.xAxis.update({...t.xAxis,offsets:e,[i.inverted?"width":"height"]:this.height,[i.inverted?"height":"width"]:void 0},!1),this.yAxis.update({...t.yAxis,[i.inverted?"width":"height"]:this.height},!1)}e&&i.redraw()}render(t,e,i,s){let o=this.chart,r=this.xAxis,a=r.pointRange||0,n=r.navigatorAxis.fake?o.xAxis[0]:r,l=this.navigatorEnabled,h=this.rendered,p=o.inverted,c=o.xAxis[0].minRange,u=o.xAxis[0].options.maxRange,g=this.scrollButtonSize,m,x,f,b=this.scrollbarHeight,v,y;if(this.hasDragged&&!(0,d.defined)(i))return;if(this.isDirty&&this.renderElements(),t=(0,d.correctFloat)(t-a/2),e=(0,d.correctFloat)(e+a/2),!(0,d.isNumber)(t)||!(0,d.isNumber)(e))if(!h)return;else i=0,s=(0,d.pick)(r.width,n.width);this.left=(0,d.pick)(r.left,o.plotLeft+g+(p?o.plotWidth:0));let M=this.size=v=(0,d.pick)(r.len,(p?o.plotHeight:o.plotWidth)-2*g);m=p?b:v+2*g,i=(0,d.pick)(i,r.toPixels(t,!0)),s=(0,d.pick)(s,r.toPixels(e,!0)),(0,d.isNumber)(i)&&Math.abs(i)!==1/0||(i=0,s=m);let k=r.toValue(i,!0),A=r.toValue(s,!0),E=Math.abs((0,d.correctFloat)(A-k));(0,d.defined)(c)&&E<c?this.grabbedLeft?i=r.toPixels(A-c-a,!0):this.grabbedRight&&(s=r.toPixels(k+c+a,!0)):(0,d.defined)(u)&&(0,d.correctFloat)(E-a)>u&&(this.grabbedLeft?i=r.toPixels(A-u-a,!0):this.grabbedRight&&(s=r.toPixels(k+u+a,!0))),this.zoomedMax=(0,d.clamp)(Math.max(i,s),0,M),this.zoomedMin=(0,d.clamp)(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(i,s),0,M),this.range=this.zoomedMax-this.zoomedMin,M=Math.round(this.zoomedMax);let w=Math.round(this.zoomedMin);l&&(this.navigatorGroup.attr({visibility:"inherit"}),y=h&&!this.hasDragged?"animate":"attr",this.drawMasks(w,M,p,y),this.drawOutline(w,M,p,y),this.navigatorOptions.handles?.enabled&&(this.drawHandle(w,0,p,y),this.drawHandle(M,1,p,y))),this.scrollbar&&(p?(f=this.top-g,x=this.left-b+(l||!n.opposite?0:(n.titleOffset||0)+n.axisTitleMargin),b=v+2*g):(f=this.top+(l?this.height:-b),x=this.left-g),this.scrollbar.position(x,f,m,b),this.scrollbar.setRange(this.zoomedMin/(v||1),this.zoomedMax/(v||1))),this.rendered=!0,this.isDirty=!1,(0,d.fireEvent)(this,"afterRender")}addMouseEvents(){let t,e,i=this,s=i.chart,o=s.container,r=[];i.mouseMoveHandler=t=function(t){i.onMouseMove(t)},i.mouseUpHandler=e=function(t){i.onMouseUp(t)},r.push((0,d.addEvent)(s.renderTo,"mousemove",t),(0,d.addEvent)(o.ownerDocument,"mouseup",e),(0,d.addEvent)(s.renderTo,"touchmove",t),(0,d.addEvent)(o.ownerDocument,"touchend",e)),i.eventsToUnbind=r,i.series&&i.series[0]&&r.push((0,d.addEvent)(i.series[0].xAxis,"foundExtremes",function(){s.navigator?.modifyNavigatorAxisExtremes()}))}getPartsEvents(t){let e=this,i=[];return["shades","handles"].forEach(s=>{e[s].forEach(function(o,r){i.push((0,d.addEvent)(o.element,t,function(t){e[`${s}Mousedown`](t,r)}))})}),i}shadesMousedown(t,e){t=this.chart.pointer?.normalize(t)||t;let i=this.chart,s=this.xAxis,o=this.zoomedMin,r=this.size,a=this.range,n=this.left,l=t.chartX,h,p,c,u;i.inverted&&(l=t.chartY,n=this.top),1===e?(this.grabbedCenter=l,this.fixedWidth=a,this.dragOffset=l-o):(u=l-n-a/2,0===e?u=Math.max(0,u):2===e&&u+a>=r&&(u=r-a,this.reversedExtremes?(u-=a,p=this.getUnionExtremes()?.dataMin):h=this.getUnionExtremes()?.dataMax),u!==o&&(this.fixedWidth=a,c=s.navigatorAxis.toFixedRange(u,u+a,p,h),(0,d.defined)(c.min)&&(0,d.fireEvent)(this,"setRange",{min:Math.min(c.min,c.max),max:Math.max(c.min,c.max),redraw:!0,eventArguments:{trigger:"navigator"}})))}handlesMousedown(t,e){t=this.chart.pointer?.normalize(t)||t;let i=this.chart,s=i.xAxis[0],o=this.reversedExtremes;0===e?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=o?s.min:s.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=o?s.max:s.min),i.setFixedRange(void 0)}onMouseMove(t){let e=this,i=e.chart,s=e.navigatorSize,o=e.range,r=e.dragOffset,a=i.inverted,n=e.left,l;(!t.touches||0!==t.touches[0].pageX)&&(l=(t=i.pointer?.normalize(t)||t).chartX,a&&(n=e.top,l=t.chartY),e.grabbedLeft?(e.hasDragged=!0,e.render(0,0,l-n,e.otherHandlePos)):e.grabbedRight?(e.hasDragged=!0,e.render(0,0,e.otherHandlePos,l-n)):e.grabbedCenter&&r&&(e.hasDragged=!0,l<r?l=r:l>s+r-o&&(l=s+r-o),e.render(0,0,l-r,l-r+o)),e.hasDragged&&(0,d.pick)(e.scrollbarOptions?.liveRedraw,!tt&&!this.chart.boosted)&&(t.DOMType=t.type,setTimeout(function(){e.onMouseUp(t)},0)))}onMouseUp(t){let e,i,s,o,r,a,n=this.chart,l=this.xAxis,h=this.scrollbar,p=t.DOMEvent||t,c=n.inverted,u=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!h||!h.hasDragged)||"scrollbar"===t.trigger)&&(s=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?o=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(r=this.fixedExtreme),this.zoomedMax===this.size&&(r=this.reversedExtremes?s.dataMin:s.dataMax),0===this.zoomedMin&&(o=this.reversedExtremes?s.dataMax:s.dataMin),a=l.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,o,r),(0,d.defined)(a.min)&&(0,d.fireEvent)(this,"setRange",{min:Math.min(a.min,a.max),max:Math.max(a.min,a.max),redraw:!0,animation:!this.hasDragged&&null,eventArguments:{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:p}})),"mousemove"!==t.DOMType&&"touchmove"!==t.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null),this.navigatorEnabled&&(0,d.isNumber)(this.zoomedMin)&&(0,d.isNumber)(this.zoomedMax)&&(i=Math.round(this.zoomedMin),e=Math.round(this.zoomedMax),this.shades&&this.drawMasks(i,e,c,u),this.outline&&this.drawOutline(i,e,c,u),this.navigatorOptions.handles?.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(i,0,c,u),this.drawHandle(e,1,c,u)))}removeEvents(){this.eventsToUnbind?.forEach(t=>{t()}),this.eventsToUnbind=void 0,this.removeBaseSeriesEvents()}removeBaseSeriesEvents(){let t=this.baseSeries||[];this.navigatorEnabled&&t[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&t.forEach(function(t){(0,d.removeEvent)(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&(0,d.removeEvent)(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))}getXAxisOffsets(){return this.chart.inverted?[this.scrollButtonSize,0,-this.scrollButtonSize,0]:[0,-this.scrollButtonSize,0,this.scrollButtonSize]}init(t){let e=t.options,i=e.navigator||{},s=i.enabled,o=e.scrollbar||{},r=o.enabled,a=s&&i.height||0,n=r&&o.height||0,l=o.buttonsEnabled&&n||0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=a,this.scrollbarHeight=n,this.scrollButtonSize=l,this.scrollbarEnabled=r,this.navigatorEnabled=!!s,this.navigatorOptions=i,this.scrollbarOptions=o,this.setOpposite();let h=this,p=h.baseSeries,c=t.xAxis.length,u=t.yAxis.length,g=p&&p[0]&&p[0].xAxis||t.xAxis[0]||{options:{}};if(t.isDirtyBox=!0,h.navigatorEnabled){let e=this.getXAxisOffsets();h.xAxis=new(v())(t,(0,d.merge)({breaks:g.options.breaks,ordinal:g.options.ordinal,overscroll:g.options.overscroll},i.xAxis,{type:"datetime",yAxis:i.yAxis?.id,index:c,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:g.options.ordinal?0:g.options.minPadding,maxPadding:g.options.ordinal?0:g.options.maxPadding,zoomEnabled:!1},t.inverted?{offsets:e,width:a}:{offsets:e,height:a}),"xAxis"),h.yAxis=new(v())(t,(0,d.merge)(i.yAxis,{alignTicks:!1,offset:0,index:u,isInternal:!0,reversed:(0,d.pick)(i.yAxis&&i.yAxis.reversed,t.yAxis[0]&&t.yAxis[0].reversed,!1),zoomEnabled:!1},t.inverted?{width:a}:{height:a}),"yAxis"),h.xAxis.clippable=!1,h.yAxis.clippable=!1,p||i.series?.data||i.series?.dataTable?h.updateNavigatorSeries(!1):0===t.series.length&&(h.unbindRedraw=(0,d.addEvent)(t,"beforeRedraw",function(){t.series.length>0&&!h.series&&(h.setBaseSeries(),h.unbindRedraw?.())})),h.reversedExtremes=t.inverted&&!h.xAxis.reversed||!t.inverted&&h.xAxis.reversed,h.renderElements(),h.addMouseEvents()}else h.xAxis={chart:t,navigatorAxis:{fake:!0},translate:function(e,i){let s=t.xAxis[0],o=s.getExtremes(),r=s.len-2*l,a=te("min",s.options.min,o.dataMin),n=te("max",s.options.max,o.dataMax)-a;return i?e*n/r+a:r*(e-a)/n},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)}},h.xAxis.navigatorAxis.axis=h.xAxis,h.xAxis.navigatorAxis.toFixedRange=R.prototype.toFixedRange.bind(h.xAxis.navigatorAxis);if(t.options.scrollbar?.enabled){let e=(0,d.merge)(t.options.scrollbar,{vertical:t.inverted});(0,d.isNumber)(e.margin)||(e.margin=t.inverted?-3:3),t.scrollbar=h.scrollbar=new J(t.renderer,e,t),(0,d.addEvent)(h.scrollbar,"changed",function(t){let e=h.size,i=e*this.to,s=e*this.from;h.hasDragged=h.scrollbar?.hasDragged,h.render(0,0,s,i),this.shouldUpdateExtremes(t.DOMType)&&setTimeout(function(){h.onMouseUp(t)})})}h.addBaseSeriesEvents(),h.addChartEvents()}setOpposite(){let t=this.navigatorOptions,e=this.navigatorEnabled,i=this.chart;this.opposite=(0,d.pick)(t.opposite,!!(!e&&i.inverted))}getUnionExtremes(t){let e,i=this.chart.xAxis[0],s=this.chart.time,o=this.xAxis,r=o.options,a=i.options;return t&&null===i.dataMin||(e={dataMin:(0,d.pick)(s.parse(r?.min),te("min",s.parse(a.min),i.dataMin,o.dataMin,o.min)),dataMax:(0,d.pick)(s.parse(r?.max),te("max",s.parse(a.max),i.dataMax,o.dataMax,o.max))}),e}setBaseSeries(t,e){let i=this.chart,s=this.baseSeries=[];t=t||i.options.navigator?.baseSeries||(i.series.length?(0,d.find)(i.series,t=>!t.options.isInternal).index:0),(i.series||[]).forEach((e,i)=>{!e.options.isInternal&&(e.options.showInNavigator||(i===t||e.options.id===t)&&!1!==e.options.showInNavigator)&&s.push(e)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,e)}updateNavigatorSeries(t,e){let i=this,s=i.chart,o=i.baseSeries,r={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:this.navigatorOptions.xAxis?.id,yAxis:this.navigatorOptions.yAxis?.id,showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},a=i.series=(i.series||[]).filter(t=>{let e=t.baseSeries;return!(e&&0>o.indexOf(e))||(e&&((0,d.removeEvent)(e,"updatedData",i.updatedDataHandler),delete e.navigatorSeries),t.chart&&t.destroy(),!1)}),n,l,h=i.navigatorOptions.series,p;if(o&&o.length&&o.forEach(t=>{let c=t.navigatorSeries,u=(0,d.extend)({color:t.color,visible:t.visible},(0,d.isArray)(h)?Q.navigator.series:h);if(c&&!1===i.navigatorOptions.adaptToUpdatedData)return;r.name="Navigator "+o.length,p=(n=t.options||{}).navigatorOptions||{},u.dataLabels=(0,d.splat)(u.dataLabels),(l=(0,d.merge)(n,r,u,p)).pointRange=(0,d.pick)(u.pointRange,p.pointRange,Q.plotOptions[l.type||"line"]?.pointRange);let g=p.data||u.data,m=p.dataTable||u.dataTable;i.hasNavigatorData=i.hasNavigatorData||!!g||!!m,l.data=g||n.data?.slice(0),l.dataTable=m||n.dataTable,c&&c.options?c.update(l,e):(t.navigatorSeries=s.initSeries(l),(0,d.fireEvent)(t.navigatorSeries,"afterUpdate"),t.navigatorSeries.baseSeries=t,a.push(t.navigatorSeries))}),(h?.data||h?.dataTable)&&!(o&&o.length)||(0,d.isArray)(h)){let t=s.options.colors||[];i.hasNavigatorData=!1,(h=(0,d.splat)(h)).forEach((e,o)=>{r.name="Navigator "+(a.length+1),(l=(0,d.merge)(Q.navigator?.series,{color:s.series[o]&&!s.series[o].options.isInternal&&s.series[o].color||t[o]||t[0]},r,e)).data=e.data,l.dataTable=e.dataTable,(l.data||l.dataTable)&&(i.hasNavigatorData=!0,a.push(s.initSeries(l)))})}t&&this.addBaseSeriesEvents()}addBaseSeriesEvents(){let t=this,e=t.baseSeries||[];e[0]&&e[0].xAxis&&e[0].eventsToUnbind.push((0,d.addEvent)(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),e.forEach(i=>{i.eventsToUnbind.push((0,d.addEvent)(i,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),i.eventsToUnbind.push((0,d.addEvent)(i,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),!1!==this.navigatorOptions.adaptToUpdatedData&&i.xAxis&&i.eventsToUnbind.push((0,d.addEvent)(i,"updatedData",this.updatedDataHandler)),i.eventsToUnbind.push((0,d.addEvent)(i,"remove",function(){e&&(0,d.erase)(e,i),this.navigatorSeries&&t.series&&((0,d.erase)(t.series,this.navigatorSeries),(0,d.defined)(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})}getBaseSeriesMin(t){return this.baseSeries.reduce(function(t,e){return Math.min(t,e.getColumn("x")[0]??t)},t)}modifyNavigatorAxisExtremes(){let t=this.xAxis;if(void 0!==t.getExtremes){let e=this.getUnionExtremes(!0);e&&(e.dataMin!==t.min||e.dataMax!==t.max)&&(t.min=e.dataMin,t.max=e.dataMax)}}modifyBaseAxisExtremes(){let t,e,i=this.chart.navigator,s=this.getExtremes(),o=s.min,r=s.max,a=s.dataMin,n=s.dataMax,l=r-o,h=i?.stickToMin,p=i?.stickToMax,c=(0,d.pick)(this.ordinal?.convertOverscroll(this.options.overscroll),0),u=i.series&&i.series[0],g=!!this.setExtremes;!(this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger)&&(h&&(t=(e=a)+l),p&&(t=n+c,h||(e=Math.max(a,t-l,i.getBaseSeriesMin(u&&u.xData?u.xData[0]:-Number.MAX_VALUE)))),g&&(h||p)&&(0,d.isNumber)(e)&&(this.min=this.userMin=e,this.max=this.userMax=t)),i.stickToMin=i.stickToMax=null}updatedDataHandler(){let t=this.chart.navigator,e=this.navigatorSeries,i=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size);t.stickToMax=(0,d.pick)(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,i),t.stickToMin=t.shouldStickToMin(this,t),e&&!t.hasNavigatorData&&(e.options.pointStart=this.getColumn("x")[0],e.setData(this.options.data||this.options.dataTable,!1,void 0,!1))}shouldStickToMin(t,e){let i=e.getBaseSeriesMin(t.getColumn("x")[0]),s=t.xAxis,o=s.max,r=s.min,a=s.options.range;return!!((0,d.isNumber)(o)&&(0,d.isNumber)(r))&&(a&&o-i>0?o-i<a:r<=i)}addChartEvents(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push((0,d.addEvent)(this.chart,"redraw",function(){let t=this.navigator,e=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||this.xAxis[0]);e&&t.render(e.min,e.max)}),(0,d.addEvent)(this.chart,"getMargins",function(){let t=this.navigator,e=t.opposite?"plotTop":"marginBottom";this.inverted&&(e=t.opposite?"marginRight":"plotLeft"),this[e]=(this[e]||0)+(t.navigatorEnabled||!this.inverted?t.height+(this.scrollbar?.options.margin||0)+t.scrollbarHeight:0)+(t.navigatorOptions.margin||0)}),(0,d.addEvent)(this,"setRange",function(t){this.chart.xAxis[0].setExtremes(t.min,t.max,t.redraw,t.animation,t.eventArguments)}))}destroy(){this.removeEvents(),this.xAxis&&((0,d.erase)(this.chart.xAxis,this.xAxis),(0,d.erase)(this.chart.axes,this.xAxis)),this.yAxis&&((0,d.erase)(this.chart.yAxis,this.yAxis),(0,d.erase)(this.chart.axes,this.yAxis)),(this.series||[]).forEach(t=>{t.destroy&&t.destroy()}),["series","xAxis","yAxis","shades","outline","scrollbarTrack","scrollbarRifles","scrollbarGroup","scrollbar","navigatorGroup","rendered"].forEach(t=>{this[t]&&this[t].destroy&&this[t].destroy(),this[t]=null}),[this.handles].forEach(t=>{(0,d.destroyObjectProperties)(t)}),this.baseSeries.forEach(t=>{t.navigatorSeries=void 0}),this.navigatorEnabled=!1}}let{setLength:ts,splice:to}={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,o=[]){if(Array.isArray(t))return Array.isArray(o)||(o=Array.from(o)),{removed:t.splice(e,i,...o),array:t};let r=Object.getPrototypeOf(t).constructor,a=t[s?"subarray":"slice"](e,e+i),n=new r(t.length-i+o.length);return n.set(t.subarray(0,e),0),n.set(o,e),n.set(t.subarray(e+i),e+o.length),{removed:a,array:n}}},tr=class{constructor(t={}){this.isDataTable=!0,this.autoId=!t.id,this.columns={},this.id=t.id||(0,d.uniqueKey)(),this.rowCount=0,this.versionTag=(0,d.uniqueKey)();let e=0;(0,d.objectEach)(t.columns||{},(t,i)=>{this.columns[i]=t.slice(),e=Math.max(e,t.length)}),this.applyRowCount(e)}applyRowCount(t){this.rowCount=t,(0,d.objectEach)(this.columns,(e,i)=>{e.length!==t&&(this.columns[i]=ts(e,t))})}deleteRows(t,e=1){if(e>0&&t<this.rowCount){let i=0;(0,d.objectEach)(this.columns,(s,o)=>{this.columns[o]=to(s,t,e).array,i=s.length}),this.rowCount=i}(0,d.fireEvent)(this,"afterDeleteRows",{rowIndex:t,rowCount:e}),this.versionTag=(0,d.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),{})}getRowObject(t,e){let i={},s=this.columns;for(let o of(e??(e=Object.keys(this.columns)),e))i[o]=s[o]?.[t];return i}setColumn(t,e=[],i=0,s){this.setColumns({[t]:e},i,s)}setColumns(t,e,i){let s=this.rowCount;(0,d.objectEach)(t,(t,e)=>{this.columns[e]=t.slice(),s=t.length}),this.applyRowCount(s),i?.silent||((0,d.fireEvent)(this,"afterSetColumns"),this.versionTag=(0,d.uniqueKey)())}setRow(t,e=this.rowCount,i,s){var o;let{columns:r}=this,a=i?this.rowCount+1:e+1,n=Object.keys(t);if(s?.addColumns!==!1)for(let t=0,e=n.length;t<e;t++)r[o=n[t]]||(r[o]=Array(this.rowCount));(0,d.objectEach)(r,(s,o)=>{s&&(i?s=to(s,e,0,!0,[t[o]]).array:s[e]=o in t?t[o]:s[e],r[o]=s)}),this.applyRowCount(Math.max(a,this.rowCount)),s?.silent||((0,d.fireEvent)(this,"afterSetRows",{rowIndex:e}),this.versionTag=(0,d.uniqueKey)())}getModified(){return this.modified||this}};!function(t){function e(t,i,s,o,r=[],a=0,n){let l={},h=this.options.tickPixelInterval,p=this.chart.time,c=[],u,g,m,x,f,b=0,v=[],y=-Number.MAX_VALUE;if(!this.options.ordinal&&!this.options.breaks||!r||r.length<3||void 0===i)return p.getTimeTicks.apply(p,arguments);let M=r.length;for(u=0;u<M;u++){if(f=u&&r[u-1]>s,r[u]<i&&(b=u),u===M-1||r[u+1]-r[u]>5*a||f){if(r[u]>y){for(g=p.getTimeTicks(t,r[b],r[u],o);g.length&&g[0]<=y;)g.shift();g.length&&(y=g[g.length-1]),c.push(v.length),v=v.concat(g)}b=u+1}if(f)break}if(g){if(x=g.info,n&&x.unitRange<=d.timeUnits.hour){for(b=1,u=v.length-1;b<u;b++)p.dateFormat("%d",v[b])!==p.dateFormat("%d",v[b-1])&&(l[v[b]]="day",m=!0);m&&(l[v[0]]="day"),x.boundaryTicks=l}x.segmentStarts=c,v.info=x}else(0,d.error)(12,!1,this.chart);if(n&&(0,d.defined)(h)){let t=v.length,e=[],i=[],o,r,a,n,d,p=t;for(;p--;)r=this.translate(v[p]),a&&(i[p]=a-r),e[p]=a=r;for(i.sort((t,e)=>t-e),(n=i[Math.floor(i.length/2)])<.6*h&&(n=null),p=v[t-1]>s?t-1:t,a=void 0;p--;)d=Math.abs(a-(r=e[p])),a&&d<.8*h&&(null===n||d<.8*n)?(l[v[p]]&&!l[v[p+1]]?(o=p+1,a=r):o=p,v.splice(o,1)):a=r}return v}function i(t){let e=this.ordinal.positions;if(!e)return t;let i=e.length-1,s;return(t<0?t=e[0]:t>i?t=e[i]:(i=Math.floor(t),s=t-i),void 0!==s&&void 0!==e[i])?e[i]+(s?s*(e[i+1]-e[i]):0):t}function s(t){let e=this.ordinal,i=this.old?this.old.min:this.min,s=this.old?this.old.transA:this.transA,o=e.getExtendedPositions();if(o?.length){let r=(0,d.correctFloat)((t-i)*s+this.minPixelPadding),a=(0,d.correctFloat)(e.getIndexOfPoint(r,o)),n=(0,d.correctFloat)(a%1);if(a>=0&&a<=o.length-1){let t=o[Math.floor(a)],e=o[Math.ceil(a)];return o[Math.floor(a)]+n*(e-t)}}return t}function o(e,i){let s=t.Additions.findIndexOf(e,i,!0);if(e[s]===i)return s;let o=(i-e[s])/(e[s+1]-e[s]);return s+o}function r(){this.ordinal||(this.ordinal=new t.Additions(this))}function a(){let{eventArgs:t,options:e}=this;if(this.isXAxis&&(0,d.defined)(e.overscroll)&&0!==e.overscroll&&(0,d.isNumber)(this.max)&&(0,d.isNumber)(this.min)&&(this.options.ordinal&&!this.ordinal.originalOrdinalRange&&this.ordinal.getExtendedPositions(!1),this.isFullRange=(0,d.defined)(this.dataMin)&&(0,d.defined)(this.dataMax)&&this.max-this.min==this.dataMax-this.dataMin,this.max===this.dataMax&&(t?.trigger!=="pan"||this.isInternal)&&t?.trigger!=="navigator")){let i=this.ordinal.convertOverscroll(e.overscroll);this.max+=i,!this.isInternal&&(0,d.defined)(this.userMin)&&t?.trigger!=="mousewheel"&&(this.min+=i)}}function n(){this.horiz&&!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)}function l(){this.ordinal&&(this.ordinal.beforeSetTickPositions(),this.tickInterval=this.ordinal.postProcessTickInterval(this.tickInterval))}function h(t){let e=this.xAxis[0],i=e.ordinal.convertOverscroll(e.options.overscroll),s=t.originalEvent.chartX,o=this.options.chart.panning,r=!1;if(o?.type!=="y"&&e.options.ordinal&&e.series.length&&(!t.touches||t.touches.length<=1)){let o,a,n=this.mouseDownX,l=e.getExtremes(),h=l.dataMin,p=l.dataMax,c=l.min,u=l.max,g=this.hoverPoints,m=e.closestPointRange||e.ordinal?.overscrollPointsRange,x=Math.round((n-s)/(e.translationSlope*(e.ordinal.slope||m))),f=e.ordinal.getExtendedPositions(),b={ordinal:{positions:f,extendedOrdinalPositions:f}},v=e.index2val,y=e.val2lin;if(c<=h&&x<=0||u>=p+i&&x>=0)return void t.preventDefault();b.ordinal.positions?Math.abs(x)>1&&(g&&g.forEach(function(t){t.setState()}),a=b.ordinal.positions,i&&(a=b.ordinal.positions=a.concat(e.ordinal.getOverscrollPositions())),p>a[a.length-1]&&a.push(p),this.setFixedRange(u-c),(o=e.navigatorAxis.toFixedRange(void 0,void 0,v.apply(b,[y.apply(b,[c,!0])+x]),v.apply(b,[y.apply(b,[u,!0])+x]))).min>=Math.min(a[0],c)&&o.max<=Math.max(a[a.length-1],u)+i&&e.setExtremes(o.min,o.max,!0,!1,{trigger:"pan"}),this.mouseDownX=s,(0,d.css)(this.container,{cursor:"move"})):r=!0}else r=!0;r||o&&/y/.test(o.type)?i&&(0,d.isNumber)(e.dataMax)&&(e.max=e.dataMax+i):t.preventDefault()}function c(){let t=this.xAxis;t?.options.ordinal&&(delete t.ordinal.index,delete t.ordinal.originalOrdinalRange)}function u(t,e){let i,s=this.ordinal,r=s.positions,a=s.slope,n;if(!r)return t;let l=r.length;if(r[0]<=t&&r[l-1]>=t)i=o(r,t);else{if(n=s.getExtendedPositions?.(),!n?.length)return t;let l=n.length;a||(a=(n[l-1]-n[0])/l);let h=o(n,r[0]);if(t>=n[0]&&t<=n[l-1])i=o(n,t)-h;else{if(!e)return t;i=t<n[0]?-h-(n[0]-t)/a:(t-n[l-1])/a+l-h}}return e?i:a*(i||0)+s.offset}t.compose=function(t,o,p){let g=t.prototype;return g.ordinal2lin||(g.getTimeTicks=e,g.index2val=i,g.lin2val=s,g.val2lin=u,g.ordinal2lin=g.val2lin,(0,d.addEvent)(t,"afterInit",r),(0,d.addEvent)(t,"foundExtremes",a),(0,d.addEvent)(t,"afterSetScale",n),(0,d.addEvent)(t,"initialAxisTranslation",l),(0,d.addEvent)(p,"pan",h),(0,d.addEvent)(p,"touchpan",h),(0,d.addEvent)(o,"updatedData",c)),t},t.Additions=class{constructor(t){this.index={},this.axis=t}beforeSetTickPositions(){let t=this.axis,e=t.ordinal,i=t.getExtremes(),s=i.min,o=i.max,r=t.brokenAxis?.hasBreaks,a=t.options.ordinal,n=t.options.overscroll&&t.ordinal.convertOverscroll(t.options.overscroll)||0,l,h,p,c,u,g,m,x=[],f=Number.MAX_VALUE,b=!1,v=!1,y=!1;if(a||r){let i=0;if(t.series.forEach(function(t,e){let s=t.getColumn("x",!0);if(h=[],e>0&&"highcharts-navigator-series"!==t.options.id&&s.length>1&&(v=i!==s[1]-s[0]),i=s[1]-s[0],t.boosted&&(y=t.boosted),t.reserveSpace()&&(!1!==t.takeOrdinalPosition||r)&&(l=(x=x.concat(s)).length,x.sort(function(t,e){return t-e}),f=Math.min(f,(0,d.pick)(t.closestPointRange,f)),l)){for(e=0;e<l-1;)x[e]!==x[e+1]&&h.push(x[e+1]),e++;h[0]!==x[0]&&h.unshift(x[0]),x=h}}),t.ordinal.originalOrdinalRange||(t.ordinal.originalOrdinalRange=(x.length-1)*f),v&&y&&(x.pop(),x.shift()),(l=x.length)>2){for(p=x[1]-x[0],m=l-1;m--&&!b;)x[m+1]-x[m]!==p&&(b=!0);!t.options.keepOrdinalPadding&&(x[0]-s>p||o-n-x[l-1]>p)&&(b=!0)}else t.options.overscroll&&(2===l?f=x[1]-x[0]:1===l?(f=n,x=[x[0],x[0]+f]):f=e.overscrollPointsRange);b||t.forceOrdinal?(t.options.overscroll&&(e.overscrollPointsRange=f,x=x.concat(e.getOverscrollPositions())),e.positions=x,c=t.ordinal2lin(Math.max(s,x[0]),!0),u=Math.max(t.ordinal2lin(Math.min(o,x[x.length-1]),!0),1),e.slope=g=(o-s)/(u-c),e.offset=s-c*g):(e.overscrollPointsRange=(0,d.pick)(t.closestPointRange,e.overscrollPointsRange),e.positions=t.ordinal.slope=e.offset=void 0)}t.isOrdinal=a&&b,e.groupIntervalFactor=null}static findIndexOf(t,e,i){let s=0,o=t.length-1,r;for(;s<o;)t[r=Math.ceil((s+o)/2)]<=e?s=r:o=r-1;return t[s]===e||i?s:-1}getExtendedPositions(t=!0){let e=this,i=e.axis,s=i.constructor.prototype,o=i.chart,r=i.series.reduce((t,e)=>{let i=e.currentDataGrouping;return t+(i?i.count+i.unitName:"raw")},""),a=t?i.ordinal.convertOverscroll(i.options.overscroll):0,n=i.getExtremes(),l,h,d=e.index;return d||(d=e.index={}),!d[r]&&((l={series:[],chart:o,forceOrdinal:!1,getExtremes:function(){return{min:n.dataMin,max:n.dataMax+a}},applyGrouping:s.applyGrouping,getGroupPixelWidth:s.getGroupPixelWidth,getTimeTicks:s.getTimeTicks,options:{ordinal:!0},ordinal:{getGroupIntervalFactor:this.getGroupIntervalFactor},ordinal2lin:s.ordinal2lin,getIndexOfPoint:s.getIndexOfPoint,val2lin:s.val2lin}).ordinal.axis=l,i.series.forEach(i=>{if(!1===i.takeOrdinalPosition)return;h={xAxis:l,chart:o,groupPixelWidth:i.groupPixelWidth,destroyGroupedData:p().noop,getColumn:i.getColumn,getX:p().noop,applyGrouping:i.applyGrouping,getProcessedData:i.getProcessedData,reserveSpace:i.reserveSpace,visible:i.visible};let s=i.getColumn("x"),r=(Array.isArray(s)?s:Array.from(s)).concat(t?e.getOverscrollPositions():[]);h.dataTable=new tr({columns:{x:r}}),h.options={...i.options,dataGrouping:i.currentDataGrouping?{firstAnchor:i.options.dataGrouping?.firstAnchor,anchor:i.options.dataGrouping?.anchor,lastAnchor:i.options.dataGrouping?.firstAnchor,enabled:!0,forced:!0,approximation:"open",units:[[i.currentDataGrouping.unitName,[i.currentDataGrouping.count]]]}:{enabled:!1}},l.series.push(h),i.processData.apply(h)}),l.applyGrouping({hasExtremesChanged:!0}),h?.closestPointRange!==h?.basePointRange&&h.currentDataGrouping&&(l.forceOrdinal=!0),i.ordinal.beforeSetTickPositions.apply({axis:l}),!i.ordinal.originalOrdinalRange&&l.ordinal.originalOrdinalRange&&(i.ordinal.originalOrdinalRange=l.ordinal.originalOrdinalRange),l.ordinal.positions&&(d[r]=l.ordinal.positions)),d[r]}getGroupIntervalFactor(t,e,i){let s=i.getColumn("x",!0),o=s.length,r=[],a,n,l=this.groupIntervalFactor;if(!l){for(n=0;n<o-1;n++)r[n]=s[n+1]-s[n];r.sort(function(t,e){return t-e}),a=r[Math.floor(o/2)],t=Math.max(t,s[0]),e=Math.min(e,s[o-1]),this.groupIntervalFactor=l=o*a/(e-t)}return l}getIndexOfPoint(t,e){let i=this.axis,s=i.min,r=i.minPixelPadding,a=o(e,s),n=i.translationSlope*(this.slope||i.closestPointRange||this.overscrollPointsRange);return a+(0,d.correctFloat)((t-r)/n)}getOverscrollPositions(){let t=this.axis,e=this.convertOverscroll(t.options.overscroll),i=this.overscrollPointsRange,s=[],o=t.dataMax;if((0,d.defined)(i))for(;o<t.dataMax+e;)s.push(o+=i);return s}postProcessTickInterval(t){let e=this.axis,i=this.slope,s=e.closestPointRange;return i&&s?e.options.breaks?s||t:t/(i/s):t}convertOverscroll(t=0){let e=this,i=e.axis,s=function(t){return(0,d.pick)(e.originalOrdinalRange,(0,d.defined)(i.dataMax)&&(0,d.defined)(i.dataMin)?i.dataMax-i.dataMin:0)*t};if((0,d.isString)(t)){let e=parseInt(t,10);if(!1===i.isFullRange&&(0,d.isNumber)(i.min)&&(0,d.isNumber)(i.max)&&(this.originalOrdinalRange=i.max-i.min),/%$/.test(t))return s(e/100);if(/px/.test(t)){let t=Math.min(e,.9*i.len)/i.len;return s(t/(i.isFullRange?1-t:1))}return 0}return t}}}(r||(r={}));let ta=r,tn={rangeSelectorZoom:"Zoom",rangeSelectorFrom:"",rangeSelectorTo:"→",rangeSelector:{allText:"All",allTitle:"View all",monthText:"{count}m",monthTitle:"View {count} {#eq count 1}month{else}months{/eq}",yearText:"{count}y",yearTitle:"View {count} {#eq count 1}year{else}years{/eq}",ytdText:"YTD",ytdTitle:"View year to date"}},tl={allButtonsEnabled:!1,buttons:[{type:"month",count:1},{type:"month",count:3},{type:"month",count:6},{type:"ytd"},{type:"year",count:1},{type:"all"}],buttonSpacing:5,dropdown:"responsive",enabled:void 0,verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputBoxBorderColor:"none",inputBoxHeight:17,inputBoxWidth:void 0,inputDateFormat:"%[ebY]",inputDateParser:void 0,inputEditDateFormat:"%Y-%m-%d",inputEnabled:!0,inputPosition:{align:"right",x:0,y:0},inputSpacing:5,selected:void 0,buttonPosition:{align:"left",x:0,y:0},inputStyle:{color:"var(--highcharts-highlight-color-80)",cursor:"pointer",fontSize:"0.8em"},labelStyle:{color:"var(--highcharts-neutral-color-60)",fontSize:"0.8em"}},{defaultOptions:th}=p(),{composed:td}=p(),tp=[];function tc(){let t,e,i=this.range,s=i.type,o=this.max,r=this.chart.time,a=function(t,e){let i=r.toParts(t),o=i.slice();"year"===s?o[0]+=e:o[1]+=e;let a=r.makeTime.apply(r,o),n=r.toParts(a);return"month"===s&&i[1]===n[1]&&1===Math.abs(e)&&(o[0]=i[0],o[1]=i[1],o[2]=0),(a=r.makeTime.apply(r,o))-t};(0,d.isNumber)(i)?(t=o-i,e=i):i&&(t=o+a(o,-(i.count||1)),this.chart&&this.chart.setFixedRange(o-t));let n=(0,d.pick)(this.dataMin,5e-324);return(0,d.isNumber)(t)||(t=n),t<=n&&(t=n,void 0===e&&(e=a(t,i.count)),this.newMax=Math.min(t+e,(0,d.pick)(this.dataMax,Number.MAX_VALUE))),(0,d.isNumber)(o)?!(0,d.isNumber)(i)&&i&&i._offsetMin&&(t+=i._offsetMin):t=void 0,t}function tu(){this.rangeSelector?.redrawElements()}function tg(){this.options.rangeSelector&&this.options.rangeSelector.enabled&&(this.rangeSelector=new e(this))}function tm(){let t=this.rangeSelector;if(t){(0,d.isNumber)(t.deferredYTDClick)&&(t.clickButton(t.deferredYTDClick),delete t.deferredYTDClick);let e=t.options.verticalAlign;t.options.floating||("bottom"===e?this.extraBottomMargin=!0:"top"===e&&(this.extraTopMargin=!0))}}function tx(){let t,e=this.rangeSelector;if(!e)return;let i=this.xAxis[0].getExtremes(),s=this.legend,o=e&&e.options.verticalAlign;(0,d.isNumber)(i.min)&&e.render(i.min,i.max),s?.display&&"top"===o&&o===s.options.verticalAlign&&(t=(0,d.merge)(this.spacingBox),"vertical"===s.options.layout?t.y=this.plotTop:t.y+=e.getHeight(),s.group.placed=!1,s.align(t))}function tf(){for(let t=0,e=tp.length;t<e;++t){let e=tp[t];if(e[0]===this){e[1].forEach(t=>t()),tp.splice(t,1);return}}}function tb(){let t=this.rangeSelector;if(t?.options?.enabled){let{min:e,max:i}=this.xAxis[0].getExtremes();(0,d.isNumber)(e)&&t.inputGroup&&t.inputGroup.getBBox().width<20&&t.render(e,i);let s=t.getHeight(),o=t.options.verticalAlign;t.options.floating||("bottom"===o?this.marginBottom+=s:"middle"!==o&&(this.plotTop+=s))}}function tv(t){let i=t.options.rangeSelector,s=this.extraBottomMargin,o=this.extraTopMargin,r=this.rangeSelector;if(i&&i.enabled&&!(0,d.defined)(r)&&this.options.rangeSelector&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=r=new e(this)),this.extraBottomMargin=!1,this.extraTopMargin=!1,r){let t=i&&i.verticalAlign||r.options&&r.options.verticalAlign;r.options.floating||("bottom"===t?this.extraBottomMargin=!0:"middle"!==t&&(this.extraTopMargin=!0)),(this.extraBottomMargin!==s||this.extraTopMargin!==o)&&(this.isDirtyBox=!0)}}let ty=function(t,i,s){if(e=s,(0,d.pushUnique)(td,"RangeSelector")){let e=i.prototype;t.prototype.minFromRange=tc,(0,d.addEvent)(i,"afterGetContainer",tg),(0,d.addEvent)(i,"beforeRender",tm),(0,d.addEvent)(i,"destroy",tf),(0,d.addEvent)(i,"getMargins",tb),(0,d.addEvent)(i,"redraw",tx),(0,d.addEvent)(i,"update",tv),(0,d.addEvent)(i,"beforeRedraw",tu),e.callbacks.push(tx),(0,d.extend)(th,{rangeSelector:tl}),(0,d.extend)(th.lang,tn)}},tM=i.default.SVGElement;var tk=h.n(tM);let tA=i.default.Templating;var tE=h.n(tA);let{defaultOptions:tw}=p(),{format:tS}=tE();function tO(t){let e=e=>RegExp(`%[[a-zA-Z]*${e}`).test(t);if((0,d.isString)(t)?-1!==t.indexOf("%L"):t.fractionalSecondDigits)return"text";let i=(0,d.isString)(t)?["a","A","d","e","w","b","B","m","o","y","Y"].some(e):t.dateStyle||t.day||t.month||t.year,s=(0,d.isString)(t)?["H","k","I","l","M","S"].some(e):t.timeStyle||t.hour||t.minute||t.second;return i&&s?"datetime-local":i?"date":s?"time":"text"}class tT{static compose(t,e){ty(t,e,tT)}constructor(t){this.isDirty=!1,this.buttonOptions=[],this.initialButtonGroupWidth=0,this.maxButtonWidth=()=>{let t=0;return this.buttons.forEach(e=>{let i=e.getBBox();i.width>t&&(t=i.width)}),t},this.init(t)}clickButton(t,e){let i=this.chart,s=this.buttonOptions[t],o=i.xAxis[0],r=i.scroller&&i.scroller.getUnionExtremes()||o||{},a=s.type,n=s.dataGrouping,l=r.dataMin,h=r.dataMax,p,c=(0,d.isNumber)(o?.max)?Math.round(Math.min(o.max,h??o.max)):void 0,u,g=s._range,m,x,f,b=!0;if(null!==l&&null!==h){if(this.setSelected(t),n&&(this.forcedDataGrouping=!0,v().prototype.setDataGrouping.call(o||{chart:this.chart},n,!1),this.frozenStates=s.preserveDataGrouping),"month"===a||"year"===a)o?(x={range:s,max:c,chart:i,dataMin:l,dataMax:h},p=o.minFromRange.call(x),(0,d.isNumber)(x.newMax)&&(c=x.newMax),b=!1):g=s;else if(g)(0,d.isNumber)(c)&&(c=Math.min((p=Math.max(c-g,l))+g,h),b=!1);else if("ytd"===a)if(o)!o.hasData()||(0,d.isNumber)(h)&&(0,d.isNumber)(l)||(l=Number.MAX_VALUE,h=-Number.MAX_VALUE,i.series.forEach(t=>{let e=t.getColumn("x");e.length&&(l=Math.min(e[0],l),h=Math.max(e[e.length-1],h))}),e=!1),(0,d.isNumber)(h)&&(0,d.isNumber)(l)&&(p=m=(f=this.getYTDExtremes(h,l)).min,c=f.max);else{this.deferredYTDClick=t;return}else"all"===a&&o&&(i.navigator&&i.navigator.baseSeries[0]&&(i.navigator.baseSeries[0].xAxis.options.range=void 0),p=l,c=h);if(b&&s._offsetMin&&(0,d.defined)(p)&&(p+=s._offsetMin),s._offsetMax&&(0,d.defined)(c)&&(c+=s._offsetMax),this.dropdown&&(this.dropdown.selectedIndex=t+1),o)((0,d.isNumber)(p)||(0,d.isNumber)(c))&&(o.setExtremes(p,c,(0,d.pick)(e,!0),void 0,{trigger:"rangeSelectorButton",rangeSelectorButton:s}),i.setFixedRange(s._range));else{u=(0,d.splat)(i.options.xAxis||{})[0];let t=(0,d.addEvent)(i,"afterCreateAxes",function(){let t=i.xAxis[0];t.range=t.options.range=g,t.min=t.options.min=m});(0,d.addEvent)(i,"load",function(){let e=i.xAxis[0];i.setFixedRange(s._range),e.options.range=u.range,e.options.min=u.min,t()})}(0,d.fireEvent)(this,"afterBtnClick")}}setSelected(t){this.selected=this.options.selected=t}init(t){let e=this,i=t.options.rangeSelector,s=t.options.lang,o=i.buttons,r=i.selected,a=function(){let t=e.minInput,i=e.maxInput;t&&t.blur&&(0,d.fireEvent)(t,"blur"),i&&i.blur&&(0,d.fireEvent)(i,"blur")};e.chart=t,e.options=i,e.buttons=[],e.buttonOptions=o.map(t=>(t.type&&s.rangeSelector&&(t.text??(t.text=s.rangeSelector[`${t.type}Text`]),t.title??(t.title=s.rangeSelector[`${t.type}Title`])),t.text=tS(t.text,{count:t.count||1}),t.title=tS(t.title,{count:t.count||1}),t)),this.eventsToUnbind=[],this.eventsToUnbind.push((0,d.addEvent)(t.container,"mousedown",a)),this.eventsToUnbind.push((0,d.addEvent)(t,"resize",a)),o.forEach(e.computeButtonRange),void 0!==r&&o[r]&&this.clickButton(r,!1),this.eventsToUnbind.push((0,d.addEvent)(t,"load",function(){t.xAxis&&t.xAxis[0]&&(0,d.addEvent)(t.xAxis[0],"setExtremes",function(i){(0,d.isNumber)(this.max)&&(0,d.isNumber)(this.min)&&this.max-this.min!==t.fixedRange&&"rangeSelectorButton"!==i.trigger&&"updatedData"!==i.trigger&&e.forcedDataGrouping&&!e.frozenStates&&this.setDataGrouping(!1,!1)})})),this.createElements()}updateButtonStates(){let t=this,e=this.chart,i=this.dropdown,s=this.dropdownLabel,o=e.xAxis[0],r=Math.round(o.max-o.min),a=!o.hasVisibleSeries,n=24*36e5,l=e.scroller&&e.scroller.getUnionExtremes()||o,h=l.dataMin,p=l.dataMax,c=t.getYTDExtremes(p,h),u=c.min,g=c.max,m=t.selected,x=t.options.allButtonsEnabled,f=Array(t.buttonOptions.length).fill(0),b=(0,d.isNumber)(m),v=t.buttons,y=!1,M=null;t.buttonOptions.forEach((e,i)=>{let s=e._range,l=e.type,d=e.count||1,c=e._offsetMax-e._offsetMin,v=i===m,k=s>p-h,A=s<o.minRange,E=!1,w=s===r;if(v&&k&&(y=!0),o.isOrdinal&&o.ordinal?.positions&&s&&r<s){let t=o.ordinal.positions;t[t.length-1]-t[0]>s&&(w=!0)}else("month"===l||"year"===l)&&r+36e5>=({month:28,year:365})[l]*n*d-c&&r-36e5<=({month:31,year:366})[l]*n*d+c?w=!0:"ytd"===l?(w=g-u+c===r,E=!v):"all"===l&&(w=o.max-o.min>=p-h);let S=!x&&!(y&&"all"===l)&&(k||A||a),O=y&&"all"===l||!E&&w||v&&t.frozenStates;S?f[i]=3:O&&(!b||i===m)&&(M=i)}),null!==M?(f[M]=2,t.setSelected(M),this.dropdown&&(this.dropdown.selectedIndex=M+1)):(t.setSelected(),this.dropdown&&(this.dropdown.selectedIndex=-1),s&&(s.setState(0),s.attr({text:(tw.lang.rangeSelectorZoom||"")+" ▾"})));for(let e=0;e<f.length;e++){let o=f[e],r=v[e];if(r.state!==o&&(r.setState(o),i)){i.options[e+1].disabled=3===o,2===o&&(s&&(s.setState(2),s.attr({text:t.buttonOptions[e].text+" ▾"})),i.selectedIndex=e+1);let r=s.getBBox();(0,d.css)(i,{width:`${r.width}px`,height:`${r.height}px`})}}}computeButtonRange(t){let e=t.type,i=t.count||1,s={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};s[e]?t._range=s[e]*i:("month"===e||"year"===e)&&(t._range=24*({month:30,year:365})[e]*36e5*i),t._offsetMin=(0,d.pick)(t.offsetMin,0),t._offsetMax=(0,d.pick)(t.offsetMax,0),t._range+=t._offsetMax-t._offsetMin}getInputValue(t){let e="min"===t?this.minInput:this.maxInput,i=this.chart.options.rangeSelector,s=this.chart.time;return e?("text"===e.type&&i.inputDateParser||this.defaultInputDateParser)(e.value,"UTC"===s.timezone,s):0}setInputValue(t,e){let i=this.options,s=this.chart.time,o="min"===t?this.minInput:this.maxInput,r="min"===t?this.minDateBox:this.maxDateBox;if(o){o.setAttribute("type",tO(i.inputDateFormat||"%e %b %Y"));let t=o.getAttribute("data-hc-time"),a=(0,d.defined)(t)?Number(t):void 0;if((0,d.defined)(e)){let t=a;(0,d.defined)(t)&&o.setAttribute("data-hc-time-previous",t),o.setAttribute("data-hc-time",e),a=e}o.value=s.dateFormat(this.inputTypeFormats[o.type]||i.inputEditDateFormat,a),r&&r.attr({text:s.dateFormat(i.inputDateFormat,a)})}}setInputExtremes(t,e,i){let s="min"===t?this.minInput:this.maxInput;if(s){let t=this.inputTypeFormats[s.type],o=this.chart.time;if(t){let r=o.dateFormat(t,e);s.min!==r&&(s.min=r);let a=o.dateFormat(t,i);s.max!==a&&(s.max=a)}}}showInput(t){let e="min"===t?this.minDateBox:this.maxDateBox,i="min"===t?this.minInput:this.maxInput;if(i&&e&&this.inputGroup){let t="text"===i.type,{translateX:s=0,translateY:o=0}=this.inputGroup,{x:r=0,width:a=0,height:n=0}=e,{inputBoxWidth:l}=this.options;(0,d.css)(i,{width:t?a+(l?-2:20)+"px":"auto",height:n-2+"px",border:"2px solid silver"}),t&&l?(0,d.css)(i,{left:s+r+"px",top:o+"px"}):(0,d.css)(i,{left:Math.min(Math.round(r+s-(i.offsetWidth-a)/2),this.chart.chartWidth-i.offsetWidth)+"px",top:o-(i.offsetHeight-n)/2+"px"})}}hideInput(t){let e="min"===t?this.minInput:this.maxInput;e&&(0,d.css)(e,{top:"-9999em",border:0,width:"1px",height:"1px"})}defaultInputDateParser(t,e,i){return i?.parse(t)||0}drawInput(t){let{chart:e,div:i,inputGroup:s}=this,o=this,r=e.renderer.style||{},a=e.renderer,n=e.options.rangeSelector,l=tw.lang,h="min"===t;function c(t){let{maxInput:i,minInput:s}=o,r=e.xAxis[0],a=e.scroller?.getUnionExtremes()||r,n=a.dataMin,l=a.dataMax,p=e.xAxis[0].getExtremes()[t],c=o.getInputValue(t);(0,d.isNumber)(c)&&c!==p&&(h&&i&&(0,d.isNumber)(n)?c>Number(i.getAttribute("data-hc-time"))?c=void 0:c<n&&(c=n):s&&(0,d.isNumber)(l)&&(c<Number(s.getAttribute("data-hc-time"))?c=void 0:c>l&&(c=l)),void 0!==c&&r.setExtremes(h?c:r.min,h?r.max:c,void 0,void 0,{trigger:"rangeSelectorInput"}))}let u=l[h?"rangeSelectorFrom":"rangeSelectorTo"]||"",g=a.label(u,0).addClass("highcharts-range-label").attr({padding:2*!!u,height:u?n.inputBoxHeight:0}).add(s),m=a.label("",0).addClass("highcharts-range-input").attr({padding:2,width:n.inputBoxWidth,height:n.inputBoxHeight,"text-align":"center"}).on("click",function(){o.showInput(t),o[t+"Input"].focus()});e.styledMode||m.attr({stroke:n.inputBoxBorderColor,"stroke-width":1}),m.add(s);let x=(0,d.createElement)("input",{name:t,className:"highcharts-range-selector"},void 0,i);x.setAttribute("type",tO(n.inputDateFormat||"%e %b %Y")),e.styledMode||(g.css((0,d.merge)(r,n.labelStyle)),m.css((0,d.merge)({color:"var(--highcharts-neutral-color-80)"},r,n.inputStyle)),(0,d.css)(x,(0,d.extend)({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:r.fontSize,fontFamily:r.fontFamily,top:"-9999em"},n.inputStyle))),x.onfocus=()=>{o.showInput(t)},x.onblur=()=>{x===p().doc.activeElement&&c(t),o.hideInput(t),o.setInputValue(t),x.blur()};let f=!1;return x.onchange=()=>{f||(c(t),o.hideInput(t),x.blur())},x.onkeypress=e=>{13===e.keyCode&&c(t)},x.onkeydown=e=>{f=!0,("ArrowUp"===e.key||"ArrowDown"===e.key||"Tab"===e.key)&&c(t)},x.onkeyup=()=>{f=!1},{dateBox:m,input:x,label:g}}getPosition(){let t=this.chart,e=t.options.rangeSelector,i="top"===e.verticalAlign?t.plotTop-t.axisOffset[0]:0;return{buttonTop:i+e.buttonPosition.y,inputTop:i+e.inputPosition.y-10}}getYTDExtremes(t,e){let i=this.chart.time,s=i.toParts(t)[0];return{max:t,min:Math.max(e,i.makeTime(s,0))}}createElements(){let t=this.chart,e=t.renderer,i=t.container,s=t.options,o=s.rangeSelector,r=o.inputEnabled,a=(0,d.pick)(s.chart.style?.zIndex,0)+1;!1!==o.enabled&&(this.group=e.g("range-selector-group").attr({zIndex:7}).add(),this.div=(0,d.createElement)("div",void 0,{position:"relative",height:0,zIndex:a}),this.buttonOptions.length&&this.renderButtons(),i.parentNode&&i.parentNode.insertBefore(this.div,i),r&&this.createInputs())}createInputs(){this.inputGroup=this.chart.renderer.g("input-group").add(this.group);let t=this.drawInput("min");this.minDateBox=t.dateBox,this.minLabel=t.label,this.minInput=t.input;let e=this.drawInput("max");this.maxDateBox=e.dateBox,this.maxLabel=e.label,this.maxInput=e.input}render(t,e){if(!1===this.options.enabled)return;let i=this.chart,s=i.options.rangeSelector;if(s.inputEnabled){this.inputGroup||this.createInputs(),this.setInputValue("min",t),this.setInputValue("max",e),this.chart.styledMode||(this.maxLabel?.css(s.labelStyle),this.minLabel?.css(s.labelStyle));let o=i.scroller&&i.scroller.getUnionExtremes()||i.xAxis[0]||{};if((0,d.defined)(o.dataMin)&&(0,d.defined)(o.dataMax)){let t=i.xAxis[0].minRange||0;this.setInputExtremes("min",o.dataMin,Math.min(o.dataMax,this.getInputValue("max"))-t),this.setInputExtremes("max",Math.max(o.dataMin,this.getInputValue("min"))+t,o.dataMax)}if(this.inputGroup){let t=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(e=>{if(e){let{width:i}=e.getBBox();i&&(e.attr({x:t}),t+=i+s.inputSpacing)}})}}else this.inputGroup&&(this.inputGroup.destroy(),delete this.inputGroup);!this.chart.styledMode&&this.zoomText&&this.zoomText.css(s.labelStyle),this.alignElements(),this.updateButtonStates()}renderButtons(){var t;let{chart:e,options:i}=this,s=tw.lang,o=e.renderer,r=(0,d.merge)(i.buttonTheme),a=r&&r.states;delete r.width,delete r.states,this.buttonGroup=o.g("range-selector-buttons").add(this.group);let n=this.dropdown=(0,d.createElement)("select",void 0,{position:"absolute",padding:0,border:0,cursor:"pointer",opacity:1e-4},this.div),l=e.userOptions.rangeSelector?.buttonTheme;this.dropdownLabel=o.button("",0,0,()=>{},(0,d.merge)(r,{"stroke-width":(0,d.pick)(r["stroke-width"],0),width:"auto",paddingLeft:(0,d.pick)(i.buttonTheme.paddingLeft,l?.padding,8),paddingRight:(0,d.pick)(i.buttonTheme.paddingRight,l?.padding,8)}),a&&a.hover,a&&a.select,a&&a.disabled).hide().add(this.group),(0,d.addEvent)(n,"touchstart",()=>{n.style.fontSize="16px"});let h=p().isMS?"mouseover":"mouseenter",c=p().isMS?"mouseout":"mouseleave";(0,d.addEvent)(n,h,()=>{(0,d.fireEvent)(this.dropdownLabel.element,h)}),(0,d.addEvent)(n,c,()=>{(0,d.fireEvent)(this.dropdownLabel.element,c)}),(0,d.addEvent)(n,"change",()=>{let t=this.buttons[n.selectedIndex-1];(0,d.fireEvent)(t.element,"click")}),this.zoomText=o.label(s.rangeSelectorZoom||"",0).attr({padding:i.buttonTheme.padding,height:i.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup),this.chart.styledMode||(this.zoomText.css(i.labelStyle),(t=i.buttonTheme)["stroke-width"]??(t["stroke-width"]=0)),(0,d.createElement)("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,n),this.createButtons()}createButtons(){let{options:t}=this,e=(0,d.merge)(t.buttonTheme),i=e&&e.states,s=e.width||28;delete e.width,delete e.states,this.buttonOptions.forEach((t,e)=>{this.createButton(t,e,s,i)})}createButton(t,e,i,s){let{dropdown:o,buttons:r,chart:a,options:n}=this,l=a.renderer,h=(0,d.merge)(n.buttonTheme);o?.add((0,d.createElement)("option",{textContent:t.title||t.text}),e+2),r[e]=l.button(t.text??"",0,0,i=>{let s,o=t.events&&t.events.click;o&&(s=o.call(t,i)),!1!==s&&this.clickButton(e),this.isActive=!0},h,s&&s.hover,s&&s.select,s&&s.disabled).attr({"text-align":"center",width:i}).add(this.buttonGroup),t.title&&r[e].attr("title",t.title)}alignElements(){let{buttonGroup:t,buttons:e,chart:i,group:s,inputGroup:o,options:r,zoomText:a}=this,n=i.options,l=n.exporting&&!1!==n.exporting.enabled&&n.navigation&&n.navigation.buttonOptions,{buttonPosition:h,inputPosition:p,verticalAlign:c}=r,u=(t,e,s)=>l&&this.titleCollision(i)&&"top"===c&&s&&e.y-t.getBBox().height-12<(l.y||0)+(l.height||0)+i.spacing[0]?-40:0,g=i.plotLeft;if(s&&h&&p){let n=h.x-i.spacing[3];if(t){if(this.positionButtons(),!this.initialButtonGroupWidth){let t=0;a&&(t+=a.getBBox().width+5),e.forEach((i,s)=>{t+=i.width||0,s!==e.length-1&&(t+=r.buttonSpacing)}),this.initialButtonGroupWidth=t}g-=i.spacing[3];let o=u(t,h,"right"===h.align||"right"===p.align);this.alignButtonGroup(o),this.buttonGroup?.translateY&&this.dropdownLabel.attr({y:this.buttonGroup.translateY}),s.placed=t.placed=i.hasLoaded}let l=0;r.inputEnabled&&o&&(l=u(o,p,"right"===h.align||"right"===p.align),"left"===p.align?n=g:"right"===p.align&&(n=-Math.max(i.axisOffset[1],-l)),o.align({y:p.y,width:o.getBBox().width,align:p.align,x:p.x+n-2},!0,i.spacingBox),o.placed=i.hasLoaded),this.handleCollision(l),s.align({verticalAlign:c},!0,i.spacingBox);let m=s.alignAttr.translateY,x=s.getBBox().height+20,f=0;if("bottom"===c){let t=i.legend&&i.legend.options;f=m-(x=x+(t&&"bottom"===t.verticalAlign&&t.enabled&&!t.floating?i.legend.legendHeight+(0,d.pick)(t.margin,10):0)-20)-(r.floating?0:r.y)-(i.titleOffset?i.titleOffset[2]:0)-10}"top"===c?(r.floating&&(f=0),i.titleOffset&&i.titleOffset[0]&&(f=i.titleOffset[0]),f+=i.margin[0]-i.spacing[0]||0):"middle"===c&&(p.y===h.y?f=m:(p.y||h.y)&&(p.y<0||h.y<0?f-=Math.min(p.y,h.y):f=m-x)),s.translate(r.x,r.y+Math.floor(f));let{minInput:b,maxInput:v,dropdown:y}=this;r.inputEnabled&&b&&v&&(b.style.marginTop=s.translateY+"px",v.style.marginTop=s.translateY+"px"),y&&(y.style.marginTop=s.translateY+"px")}}redrawElements(){let t=this.chart,{inputBoxHeight:e,inputBoxBorderColor:i}=this.options;if(this.maxDateBox?.attr({height:e}),this.minDateBox?.attr({height:e}),t.styledMode||(this.maxDateBox?.attr({stroke:i}),this.minDateBox?.attr({stroke:i})),this.isDirty){this.isDirty=!1,this.isCollapsed=void 0;let t=this.options.buttons??[],e=Math.min(t.length,this.buttonOptions.length),{dropdown:i,options:s}=this,o=(0,d.merge)(s.buttonTheme),r=o&&o.states,a=o.width||28;if(t.length<this.buttonOptions.length)for(let e=this.buttonOptions.length-1;e>=t.length;e--){let t=this.buttons.pop();t?.destroy(),this.dropdown?.options.remove(e+1)}for(let s=e-1;s>=0;s--){let e=t[s];this.buttons[s].destroy(),i?.options.remove(s+1),this.createButton(e,s,a,r),this.computeButtonRange(e)}if(t.length>this.buttonOptions.length)for(let e=this.buttonOptions.length;e<t.length;e++)this.createButton(t[e],e,a,r),this.computeButtonRange(t[e]);this.buttonOptions=this.options.buttons??[],(0,d.defined)(this.options.selected)&&this.buttons.length&&this.clickButton(this.options.selected,!1)}}alignButtonGroup(t,e){let{chart:i,options:s,buttonGroup:o,dropdown:r,dropdownLabel:a}=this,{buttonPosition:n}=s,l=i.plotLeft-i.spacing[3],h=n.x-i.spacing[3],p=i.plotLeft;"right"===n.align?(h+=t-l,this.hasVisibleDropdown&&(p=i.chartWidth+t-this.maxButtonWidth()-20)):"center"===n.align&&(h-=l/2,this.hasVisibleDropdown&&(p=i.chartWidth/2-this.maxButtonWidth())),r&&(0,d.css)(r,{left:p+"px",top:o?.translateY+"px"}),a?.attr({x:p}),o&&o.align({y:n.y,width:(0,d.pick)(e,this.initialButtonGroupWidth),align:n.align,x:h},!0,i.spacingBox)}positionButtons(){let{buttons:t,chart:e,options:i,zoomText:s}=this,o=e.hasLoaded?"animate":"attr",{buttonPosition:r}=i,a=e.plotLeft,n=a;s&&"hidden"!==s.visibility&&(s[o]({x:(0,d.pick)(a+r.x,a)}),n+=r.x+s.getBBox().width+5);for(let e=0,s=this.buttonOptions.length;e<s;++e)"hidden"!==t[e].visibility?(t[e][o]({x:n}),n+=(t[e].width||0)+i.buttonSpacing):t[e][o]({x:a})}handleCollision(t){let{chart:e,buttonGroup:i,inputGroup:s,initialButtonGroupWidth:o}=this,{buttonPosition:r,dropdown:a,inputPosition:n}=this.options,l=()=>{s&&i&&s.attr({translateX:s.alignAttr.translateX+(e.axisOffset[1]>=-t?0:-t),translateY:s.alignAttr.translateY+i.getBBox().height+10})};s&&i?n.align===r.align?(l(),o>e.plotWidth+t-20?this.collapseButtons():this.expandButtons()):o-t+s.getBBox().width>e.plotWidth?"responsive"===a||"always"===a?this.collapseButtons():l():this.expandButtons():i&&"responsive"===a&&(o>e.plotWidth?this.collapseButtons():this.expandButtons()),i&&("always"===a&&this.collapseButtons(),"never"===a&&this.expandButtons()),this.alignButtonGroup(t)}collapseButtons(){let{buttons:t,zoomText:e}=this;!0!==this.isCollapsed&&(this.isCollapsed=!0,e.hide(),t.forEach(t=>void t.hide()),this.showDropdown())}expandButtons(){let{buttons:t,zoomText:e}=this;!1!==this.isCollapsed&&(this.isCollapsed=!1,this.hideDropdown(),e.show(),t.forEach(t=>void t.show()),this.positionButtons())}showDropdown(){let{buttonGroup:t,dropdownLabel:e,dropdown:i}=this;t&&i&&(e.show(),(0,d.css)(i,{visibility:"inherit"}),this.hasVisibleDropdown=!0)}hideDropdown(){let{dropdown:t}=this;t&&(this.dropdownLabel.hide(),(0,d.css)(t,{visibility:"hidden"}),this.hasVisibleDropdown=!1)}getHeight(){let t=this.options,e=this.group,i=t.inputPosition,s=t.buttonPosition,o=t.y,r=s.y,a=i.y,n=0;if(t.height)return t.height;this.alignElements(),n=e?e.getBBox(!0).height+13+o:0;let l=Math.min(a,r);return(a<0&&r<0||a>0&&r>0)&&(n+=Math.abs(l)),n}titleCollision(t){return!(t.options.title.text||t.options.subtitle.text)}update(t,e=!0){let i=this.chart;if((0,d.merge)(!0,this.options,t),this.options.selected&&this.options.selected>=this.options.buttons.length&&(this.options.selected=void 0,i.options.rangeSelector.selected=void 0),(0,d.defined)(t.enabled))return this.destroy(),this.init(i);this.isDirty=!!t.buttons||!!t.buttonTheme,e&&this.render()}destroy(){let t=this,e=t.minInput,i=t.maxInput;t.eventsToUnbind&&(t.eventsToUnbind.forEach(t=>t()),t.eventsToUnbind=void 0),(0,d.destroyObjectProperties)(t.buttons),e&&(e.onfocus=e.onblur=e.onchange=null),i&&(i.onfocus=i.onblur=i.onchange=null),(0,d.objectEach)(t,function(e,i){e&&"chart"!==i&&(e instanceof tk()?e.destroy():e instanceof window.HTMLElement&&(0,d.discardElement)(e),delete t[i]),e!==tT.prototype[i]&&(t[i]=null)},this),this.buttons=[]}}(0,d.extend)(tT.prototype,{inputTypeFormats:{"datetime-local":"%Y-%m-%dT%H:%M:%S",date:"%Y-%m-%d",time:"%H:%M:%S"}});let tC=i.default.Chart;var tB=h.n(tC);let{format:tD}=tE(),{getOptions:tP}=p(),{setFixedRange:tR}=F;function tL(t,e,i){return"xAxis"===t?{minPadding:0,maxPadding:0,overscroll:0,ordinal:!0}:"yAxis"===t?{labels:{y:-2},opposite:i.opposite??e.opposite??!0,showLastLabel:!!(e.categories||"category"===e.type),title:{text:void 0}}:{}}function tz(t,e){if("xAxis"===t){let t=(0,d.pick)(e.navigator?.enabled,N.enabled,!0),i={type:"datetime",categories:void 0};return t&&(i.startOnTick=!1,i.endOnTick=!1),i}return{}}class tI extends tB(){init(t,e){let i=tP(),s=t.xAxis,o=t.yAxis,r=(0,d.pick)(t.navigator?.enabled,N.enabled,!0);t.xAxis=t.yAxis=void 0;let a=(0,d.merge)({chart:{panning:{enabled:!0,type:"x"},zooming:{pinchType:"x",mouseWheel:{type:"x"}}},navigator:{enabled:r},scrollbar:{enabled:(0,d.pick)(K.enabled,!0)},rangeSelector:{enabled:(0,d.pick)(tl.enabled,!0)},title:{text:null},tooltip:{split:(0,d.pick)(i.tooltip?.split,!0),crosshairs:!0},legend:{enabled:!1}},t,{isStock:!0});t.xAxis=s,t.yAxis=o,a.xAxis=(0,d.splat)(t.xAxis||{}).map(e=>(0,d.merge)(tL("xAxis",e,i.xAxis),e,tz("xAxis",t))),a.yAxis=(0,d.splat)(t.yAxis||{}).map(t=>(0,d.merge)(tL("yAxis",t,i.yAxis),t)),super.init(a,e)}createAxis(t,e){return e.axis=(0,d.merge)(tL(t,e.axis,tP()[t]),e.axis,tz(t,this.userOptions)),super.createAxis(t,e)}}(0,d.addEvent)(tB(),"update",function(t){let e=t.options;"scrollbar"in e&&this.navigator&&((0,d.merge)(!0,this.options.scrollbar,e.scrollbar),this.navigator.update({enabled:!!this.navigator.navigatorEnabled}),delete e.scrollbar)}),function(t){function e(t){if(!(this.crosshair?.label?.enabled&&this.cross&&(0,d.isNumber)(this.min)&&(0,d.isNumber)(this.max)))return;let e=this.chart,i=this.logarithmic,s=this.crosshair.label,o=this.horiz,r=this.opposite,a=this.left,n=this.top,l=this.width,h="inside"===this.options.tickPosition,p=!1!==this.crosshair.snap,c=t.e||this.cross?.e,u=t.point,g=this.crossLabel,m,x,f=s.format,b="",v,y=0,M=this.min,k=this.max;i&&(M=i.lin2log(this.min),k=i.lin2log(this.max));let A=o?"center":r?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";!g&&(g=this.crossLabel=e.renderer.label("",0,void 0,s.shape||"callout").addClass("highcharts-crosshair-label highcharts-color-"+(u?.series?u.series.colorIndex:this.series[0]&&this.series[0].colorIndex)).attr({align:s.align||A,padding:(0,d.pick)(s.padding,8),r:(0,d.pick)(s.borderRadius,3),zIndex:2}).add(this.labelGroup),e.styledMode||g.attr({fill:s.backgroundColor||u?.series?.color||"var(--highcharts-neutral-color-60)",stroke:s.borderColor||"","stroke-width":s.borderWidth||0}).css((0,d.extend)({color:"var(--highcharts-background-color)",fontWeight:"normal",fontSize:"0.7em",textAlign:"center"},s.style||{}))),o?(m=p?(u.plotX||0)+a:c.chartX,x=n+(r?0:this.height)):(m=a+this.offset+(r?l:0),x=p?(u.plotY||0)+n:c.chartY),f||s.formatter||(this.dateTime&&(b="%b %d, %Y"),f="{value"+(b?":"+b:"")+"}");let E=p?this.isXAxis?u.x:u.y:this.toValue(o?c.chartX:c.chartY),w=u?.series?u.series.isPointInside(u):(0,d.isNumber)(E)&&E>M&&E<k,S="";f?S=tD(f,{value:E},e):s.formatter&&(0,d.isNumber)(E)&&(S=s.formatter.call(this,E,this)),g.attr({text:S,x:m,y:x,visibility:w?"inherit":"hidden"});let O=g.getBBox();!(0,d.isNumber)(g.x)||o||r||(m=g.x-O.width/2),(0,d.isNumber)(g.y)&&(o?(h&&!r||!h&&r)&&(x=g.y-O.height):x=g.y-O.height/2),v=o?{left:a,right:a+this.width}:{left:"left"===this.labelAlign?a:0,right:"right"===this.labelAlign?a+this.width:e.chartWidth};let T=g.translateX||0;T<v.left&&(y=v.left-T),T+O.width>=v.right&&(y=-(T+O.width-v.right)),g.attr({x:Math.max(0,m+y),y:Math.max(0,x),anchorX:o?m:this.opposite?0:e.chartWidth,anchorY:o?this.opposite?e.chartHeight:0:x+O.height/2})}function i(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())}function s(t){let e=this.chart,i=this.options,s=e._labelPanes=e._labelPanes||{},o=i.labels;if(e.options.isStock&&"yAxis"===this.coll){let e=i.top+","+i.height;!s[e]&&o.enabled&&(15===o.distance&&1===this.side&&(o.distance=0),void 0===o.align&&(o.align="right"),s[e]=this,t.align="right",t.preventDefault())}}function o(){let t=this.chart,e=this.options&&this.options.top+","+this.options.height;e&&t._labelPanes&&t._labelPanes[e]===this&&delete t._labelPanes[e]}function r(t){let e=this.options,i=this.isLinked&&!this.series&&this.linkedParent?this.linkedParent.series:this.series,{chart:s,horiz:o}=this,r=s.renderer,a=[],{acrossPanes:n=!0,force:l,translatedValue:h,value:p}=t,c=(this.isXAxis?s.yAxis:s.xAxis)||[],u=o?"top":"left",g=o?"height":"width",m=(0,d.defined)(e[u])||(0,d.defined)(e[g]);function x(t,e,i){a.push(["M",o?t:e,o?e:t],["L",o?t:i,o?i:t])}let f=[],b,v;if((s.options.isStock||m)&&("xAxis"===this.coll||"yAxis"===this.coll)){let y,M;for(let o of(t.preventDefault(),M=e[y="xAxis"===this.coll?"yAxis":"xAxis"],f=n&&!e.isInternal?c.filter(t=>!t.options.isInternal):(0,d.isNumber)(M)?[s[y][M]]:(0,d.isString)(M)?[s.get(M)]:i.map(t=>t[y]),c))if(!o.options.isInternal){let t=o.isXAxis?"yAxis":"xAxis";this===((0,d.defined)(o.options[t])&&s[t][o.options[t]])&&f.push(o)}for(let t of(b=f.length?[]:[this.isXAxis?s.yAxis[0]:s.xAxis[0]],f))-1!==b.indexOf(t)||(0,d.find)(b,e=>e.pos===t.pos&&e.len===t.len)||b.push(t);if(v=(0,d.pick)(h,this.translate(p||0,void 0,void 0,t.old)),(0,d.isNumber)(v)){let t,e=o?v+this.pos:this.pos+this.len-v;if("pass"!==l&&(e<this.pos||e>this.pos+this.len)&&(l?e=(0,d.clamp)(e,this.pos,this.pos+this.len):t=!0),!t)if(m&&this[g]>0&&!n)x(e,this[u],this[u]+this[g]);else for(let t of b)x(e,t.pos,t.pos+t.len)}t.path=a.length>0?r.crispPolyLine(a,t.lineWidth||1):void 0}}function a(t){if(this.chart.options.isStock){let e;this.is("column")||this.is("columnrange")?e={borderWidth:0,shadow:!1}:this.is("scatter")||this.is("sma")||(e={marker:{enabled:!1,radius:2}}),e&&(t.plotOptions[this.type]=(0,d.merge)(t.plotOptions[this.type],e))}}function n(){let t=this.chart,e=this.options.dataGrouping;return!1!==this.allowDG&&e&&(0,d.pick)(e.enabled,t.options.isStock)}function l(t,e){for(let i=0;i<t.length;i+=2){let s=t[i],o=t[i+1];(0,d.defined)(s[1])&&s[1]===o[1]&&(s[1]=o[1]=(0,d.crisp)(s[1],e)),(0,d.defined)(s[2])&&s[2]===o[2]&&(s[2]=o[2]=(0,d.crisp)(s[2],e))}return t}t.compose=function(t,h,p,c){let u=p.prototype;u.forceCropping||((0,d.addEvent)(h,"afterDrawCrosshair",e),(0,d.addEvent)(h,"afterHideCrosshair",i),(0,d.addEvent)(h,"autoLabelAlign",s),(0,d.addEvent)(h,"destroy",o),(0,d.addEvent)(h,"getPlotLinePath",r),t.prototype.setFixedRange=tR,u.forceCropping=n,(0,d.addEvent)(p,"setOptions",a),c.prototype.crispPolyLine=l)},t.stockChart=function(e,i,s){let o=new t(e,i,s);return o.promise||o}}(tI||(tI={}));let tN=tI,{column:{prototype:{pointClass:tW}}}=z().seriesTypes,tX=class extends tW{getOrigin({x:t=0},e={}){let i=e.d,s=t-(this.plotX||0);return i?{d:i.map(t=>{let e=t.slice();return"number"==typeof e[1]&&(e[1]+=s),e})}:e}},{composed:tG}=p();(a||(a={})).compose=function(t){if((0,d.pushUnique)(tG,"Series.FinancialSymbols")){let e=t.prototype.symbols,i=(t,e,i,s,o)=>{let r=Math.round(t+i/2),a=Math.round(e+s*(o?.3:.5)),n=[["M",r,e],["L",r,e+s],["M",r,a],["L",t+i,a]];if(o){let i=Math.round(e+.7*s);n.push(["M",t,i],["L",r,i])}return n};e.hlc=(t,e,s,o)=>i(t,e,s,o),e.ohlc=(t,e,s,o)=>i(t,e,s,o,!0),e.candlestick=(t,i,s,o)=>{let r=Math.round(t+s/2),a=Math.round(i+.25*o),n=Math.round(i+.75*o),l=[["M",r,i],["L",r,a],["M",r,n],["L",r,i+o]];return e.rect&&l.push(...e.rect(t,a,s,n-a)),l}}};let tF=a,{column:tU}=z().seriesTypes,{defaultOptions:tY}=p();class tH extends tU{static compose(t,e){tF.compose(e)}extendStem(t,e,i){let s=t[0],o=t[1];"number"==typeof s[2]&&(s[2]=Math.max(i+e,s[2])),"number"==typeof o[2]&&(o[2]=Math.min(i-e,o[2]))}getPointPath(t){let e=t.series,i=e.borderWidth,s=(0,d.crisp)(t.plotX||0,i),o=Math.round(t.shapeArgs.width/2),r=[["M",s,Math.round(t.yBottom)],["L",s,Math.round(t.plotHigh)]];if(null!==t.close){let a=(0,d.crisp)(t.plotClose,i);r.push(["M",s,a],["L",s+o,a]),e.extendStem(r,i/2,a)}return r}init(){super.init.apply(this,arguments),this.options.stacking=void 0}pointAttribs(t,e){let i=super.pointAttribs.call(this,t,e);return t&&delete i.fill,i}toYData(t){return[t.high,t.low,t.close]}translate(){let t=this,e=t.yAxis,i=this.pointArrayMap&&this.pointArrayMap.slice()||[],s=i.map(t=>`plot${t.charAt(0).toUpperCase()+t.slice(1)}`),o=t.options.lineWidth??1;s.push("yBottom"),i.push("low"),super.translate.apply(t),t.borderWidth=o,t.points.concat(t.condemnedPoints).forEach(o=>{i.forEach(function(i,r){let a=o[i];null!==a&&(t.dataModify&&(a=t.dataModify.modifyValue(a)),o[s[r]]=e.toPixels(a,!0))});let{x:r=0,y:a=0,width:n=0,height:l=0}=o.shapeArgs||{};o.dlBox={x:r,y:a,width:n,height:l},o.shapeType="path",o.shapeArgs={d:t.getPointPath(o)},o.tooltipPos[1]=o.plotHigh+e.pos-t.chart.plotTop})}}tH.defaultOptions=(0,d.merge)(tU.defaultOptions,{legendSymbol:"hlc",lineWidth:1,tooltip:{pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>{series.chart.options.lang.stockHigh}: {point.high}<br/>{series.chart.options.lang.stockLow}: {point.low}<br/>{series.chart.options.lang.stockClose}: {point.close}<br/>'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0}),(0,d.extend)(tH.prototype,{pointClass:tX,animate:null,directTouch:!1,keysAffectYAxis:["low","high"],pointArrayMap:["high","low","close"],pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointValKey:"close"}),(0,d.extend)(tY.lang,{stockOpen:"Open",stockHigh:"High",stockLow:"Low",stockClose:"Close"}),z().registerSeriesType("hlc",tH);let{seriesTypes:{hlc:tV}}=z();class t_ extends tV.prototype.pointClass{getClassName(){return super.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}resolveUpColor(){this.open<this.close&&!this.options.color&&this.series.options.upColor&&(this.color=this.series.options.upColor)}resolveColor(){super.resolveColor(),this.series.is("heikinashi")||this.resolveUpColor()}getZone(){let t=super.getZone();return this.resolveUpColor(),t}applyOptions(){return super.applyOptions.apply(this,arguments),this.resolveColor&&this.resolveColor(),this}}let{composed:tj}=p(),{hlc:tq}=z().seriesTypes;function tK(t){let e=t.options,i=e.dataGrouping;i&&e.useOhlcData&&"highcharts-navigator-series"!==e.id&&(i.approximation="ohlc")}function tZ(t){let e=t.options;e.useOhlcData&&"highcharts-navigator-series"!==e.id&&(0,d.extend)(this,{pointValKey:t$.prototype.pointValKey,pointArrayMap:t$.prototype.pointArrayMap,toYData:t$.prototype.toYData})}class t$ extends tq{static compose(t){(0,d.pushUnique)(tj,"OHLCSeries")&&((0,d.addEvent)(t,"afterSetOptions",tK),(0,d.addEvent)(t,"init",tZ))}getPointPath(t){let e=super.getPointPath(t),i=this.borderWidth,s=(0,d.crisp)(t.plotX||0,i),o=Math.round(t.shapeArgs.width/2);if(null!==t.open){let r=(0,d.crisp)(t.plotOpen,i);e.push(["M",s,r],["L",s-o,r]),super.extendStem(e,i/2,r)}return e}pointAttribs(t,e){let i=super.pointAttribs.call(this,t,e),s=this.options;return delete i.fill,!t?.options.color&&s.upColor&&(t?.open||0)<(t?.close||0)&&(i.stroke=s.upColor),i}toYData(t){return[t.open,t.high,t.low,t.close]}}t$.defaultOptions=(0,d.merge)(tq.defaultOptions,{legendSymbol:"ohlc",tooltip:{pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>{series.chart.options.lang.stockOpen}: {point.open}<br/>{series.chart.options.lang.stockHigh}: {point.high}<br/>{series.chart.options.lang.stockLow}: {point.low}<br/>{series.chart.options.lang.stockClose}: {point.close}<br/>'}}),(0,d.extend)(t$.prototype,{pointClass:t_,pointArrayMap:["open","high","low","close"]}),z().registerSeriesType("ohlc",t$);let{column:tJ,ohlc:tQ}=z().seriesTypes;class t0 extends tQ{pointAttribs(t,e){let i=tJ.prototype.pointAttribs.call(this,t,e),s=this.options,o=(t?.open||0)<(t?.close||0),r=s.lineColor||this.color,a=t?.color||this.color;if(i["stroke-width"]=s.lineWidth,i.fill=t?.options.color||o&&s.upColor||a,i.stroke=t?.options.lineColor||o&&s.upLineColor||r,e){let t=s.states[e];i.fill=t.color||i.fill,i.stroke=t.lineColor||i.stroke,i["stroke-width"]=t.lineWidth||i["stroke-width"]}return i}getPointPath(t){let e=this.borderWidth,i=(0,d.crisp)(t.plotX||0,e),s=t.plotOpen,o=t.plotClose,r=Math.min(s,o),a=Math.max(s,o),n=Math.round(t.shapeArgs.width/2),l=this.yAxis.reversed,h=l?a!==t.yBottom:Math.round(r)!==Math.round(t.plotHigh||0),p=l?Math.round(r)!==Math.round(t.plotHigh||0):a!==t.yBottom,c=(0,d.crisp)(r,e),u=(0,d.crisp)(a,e),g=[];return g.push(["M",i-n,u],["L",i-n,c],["L",i+n,c],["L",i+n,u],["Z"],["M",i,c],["L",i,h?Math.round(l?t.yBottom:t.plotHigh):c],["M",i,u],["L",i,p?Math.round(l?t.plotHigh:t.yBottom):u]),g}}t0.defaultOptions=(0,d.merge)(tQ.defaultOptions,{tooltip:tQ.defaultOptions.tooltip},{states:{hover:{lineWidth:2}},threshold:null,legendSymbol:"candlestick",lineColor:"var(--highcharts-neutral-color-100)",lineWidth:1,upColor:"var(--highcharts-background-color)",stickyTracking:!0}),z().registerSeriesType("candlestick",t0);let{column:{prototype:{pointClass:t1}}}=z().seriesTypes,t2=class extends t1{constructor(){super(...arguments),this.ttBelow=!1}isValid(){return(0,d.isNumber)(this.y)||void 0===this.y}hasNewShapeType(){let t=this.options.shape||this.series.options.shape;return this.graphic&&t&&t!==this.graphic.symbolKey}},{composed:t5}=p();function t3(t,e,i,s,o){let r=o&&o.anchorX||t,a=o&&o.anchorY||e,n=this.circle(r-1,a-1,2,2);return n.push(["M",r,a],["L",t,e+s],["L",t,e],["L",t+i,e],["L",t+i,e+s],["L",t,e+s],["Z"]),n}function t6(t,e){t[e+"pin"]=function(i,s,o,r,a){let n,l=a&&a.anchorX,h=a&&a.anchorY;if("circle"===e&&r>o&&(i-=Math.round((r-o)/2),o=r),n=t[e](i,s,o,r,a),l&&h){let a=l;if("circle"===e)a=i+o/2;else{let t=n[0],e=n[1];"M"===t[0]&&"L"===e[0]&&(a=(t[1]+e[1])/2)}let d=s>h?s:s+r;n.push(["M",a,d],["L",l,h]),n=n.concat(t.circle(l-1,h-1,2,2))}return n}}(n||(n={})).compose=function(t){if((0,d.pushUnique)(t5,"Series.Flags")){let e=t.prototype.symbols;e.flag=t3,t6(e,"circle"),t6(e,"square"),e["flag-icon"]=function(t,e,i,s){return t3.call(this,t,e,i,Math.round(.6*s),{anchorX:Math.round(t),anchorY:Math.round(e+s)})}}};let t8=n,t4=i.default.Series.types.column;var t7=h.n(t4);let{composed:t9}=p(),{prototype:et}=t7(),{prototype:ee}=m();var ei=l||(l={});function es(t){return ee.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this,t)}function eo(){et.translate.apply(this);let t=this,e=t.options,i=t.chart,s=t.points,o=e.onSeries,r=o&&i.get(o),a=r&&r.options.step,n=r&&r.points,l=i.inverted,h=t.xAxis,p=t.yAxis,c=s.length-1,u,g,m=e.onKey||"y",x=n&&n.length,f=0,b,v,y,M,k;if(r&&r.visible&&x){for(f=(r.pointXOffset||0)+(r.barW||0)/2,M=r.currentDataGrouping,v=n[x-1].x+(M?M.totalRange:0),(0,d.stableSort)(s,(t,e)=>t.x-e.x),m="plot"+m[0].toUpperCase()+m.substr(1);x--&&s[c];)if(b=n[x],(u=s[c]).y=b.y,b.x<=u.x&&void 0!==b[m]){if(u.x<=v&&(u.plotY=b[m],b.x<u.x&&!a&&(y=n[x+1]))&&void 0!==y[m])if((0,d.defined)(u.plotX)&&r.is("spline")){let t=[b.plotX||0,b.plotY||0],e=[y.plotX||0,y.plotY||0],i=b.controlPoints?.high||t,s=y.controlPoints?.low||e,o=(o,r)=>Math.pow(1-o,3)*t[r]+3*(1-o)*(1-o)*o*i[r]+3*(1-o)*o*o*s[r]+o*o*o*e[r],r=0,a=1,n;for(let t=0;t<100;t++){let t=(r+a)/2,e=o(t,0);if(null===e)break;if(.25>Math.abs(e-u.plotX)){n=t;break}e<u.plotX?r=t:a=t}(0,d.defined)(n)&&(u.plotY=o(n,1),u.y=p.toValue(u.plotY,!0))}else k=(u.x-b.x)/(y.x-b.x),u.plotY+=k*(y[m]-b[m]),u.y+=k*(y.y-b.y);if(c--,x++,c<0)break}}s.forEach((e,i)=>{let o;e.plotX+=f,(void 0===e.plotY||l)&&(e.plotX>=0&&e.plotX<=h.len?l?(e.plotY=h.translate(e.x,0,1,0,1),e.plotX=(0,d.defined)(e.y)?p.translate(e.y,0,0,0,1):0):e.plotY=(h.opposite?0:t.yAxis.len)+h.offset:e.shapeArgs={}),(g=s[i-1])&&g.plotX===e.plotX&&(void 0===g.stackIndex&&(g.stackIndex=0),o=g.stackIndex+1),e.stackIndex=o}),this.onSeries=r}ei.compose=function(t){if((0,d.pushUnique)(t9,"OnSeries")){let e=t.prototype;e.getPlotBox=es,e.translate=eo}return t},ei.getPlotBox=es,ei.translate=eo;let er=l,{noop:ea}=p(),{distribute:en}=p(),{series:el,seriesTypes:{column:eh}}=z();class ed extends eh{animate(t){t&&this.setClip()}drawPoints(){let t,e,i,s,o,r,a,n,l,h,p,c=this.points,u=this.chart,g=u.renderer,m=u.inverted,x=this.options,f=x.y,b=this.yAxis,v={},y=[],M=(0,d.isNumber)(x.borderRadius)?x.borderRadius:0;for(s=c.length;s--;)o=c[s],h=(m?o.plotY:o.plotX)>this.xAxis.len,t=o.plotX,a=o.stackIndex,i=o.options.shape||x.shape,void 0!==(e=o.plotY)&&(e=o.plotY+f-(void 0!==a&&a*x.stackDistance)),o.anchorX=a?void 0:o.plotX,n=a?void 0:o.plotY,p="flag"!==i,r=o.graphic,void 0!==e&&t>=0&&!h?(r&&o.hasNewShapeType()&&(r=r.destroy()),r||(r=o.graphic=g.label("",0,void 0,i,void 0,void 0,x.useHTML).addClass(o.getClassName()).add(this.markerGroup),o.graphic.div&&(o.graphic.div.point=o),r.isNew=!0),r.attr({align:p?"center":"left",width:x.width,height:x.height,"text-align":x.textAlign,r:M}),u.styledMode||r.attr(this.pointAttribs(o)).css((0,d.merge)(x.style,o.style)).shadow(x.shadow),t>0&&(t-=r.strokeWidth()%2),l={y:e,anchorY:n},x.allowOverlapX&&(l.x=t,l.anchorX=o.anchorX),r.attr({text:o.options.title??x.title??"A"})[r.isNew?"attr":"animate"](l),x.allowOverlapX||(v[o.plotX]?v[o.plotX].size=Math.max(v[o.plotX].size,r.width||0):v[o.plotX]={align:.5*!!p,size:r.width||0,target:t,anchorX:t}),o.tooltipPos=[t,e+b.pos-u.plotTop]):r&&(o.graphic=r.destroy());if(!x.allowOverlapX){let t=100;for(let e of((0,d.objectEach)(v,function(e){e.plotX=e.anchorX,y.push(e),t=Math.max(e.size,t)}),en(y,m?b.len:this.xAxis.len,t),c)){let t=e.plotX,i=e.graphic,s=i&&v[t];s&&i&&((0,d.defined)(s.pos)?i[i.isNew?"attr":"animate"]({x:s.pos+(s.align||0)*s.size,anchorX:e.anchorX}).show().isNew=!1:i.hide().isNew=!0)}}x.useHTML&&this.markerGroup&&(0,d.wrap)(this.markerGroup,"on",function(t){return tk().prototype.on.apply(t.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})}drawTracker(){let t=this.points;for(let e of(super.drawTracker(),t)){let i=e.graphic;i&&(e.unbindMouseOver&&e.unbindMouseOver(),e.unbindMouseOver=(0,d.addEvent)(i.element,"mouseover",function(){for(let s of(e.stackIndex>0&&!e.raised&&(e._y=i.y,i.attr({y:e._y-8}),e.raised=!0),t))s!==e&&s.raised&&s.graphic&&(s.graphic.attr({y:s._y}),s.raised=!1)}))}}pointAttribs(t,e){let i=this.options,s=t&&t.color||this.color,o=i.lineColor,r=t&&t.lineWidth,a=t&&t.fillColor||i.fillColor;return e&&(a=i.states[e].fillColor,o=i.states[e].lineColor,r=i.states[e].lineWidth),{fill:a||s,stroke:o||s,"stroke-width":r||i.lineWidth||0}}setClip(){el.prototype.setClip.apply(this,arguments),!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup&&this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey])}}ed.compose=t8.compose,ed.defaultOptions=(0,d.merge)(eh.defaultOptions,{borderRadius:0,legendSymbol:"flag-icon",pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}"},threshold:null,y:-30,fillColor:"var(--highcharts-background-color)",lineWidth:1,states:{hover:{lineColor:"var(--highcharts-neutral-color-100)",fillColor:"var(--highcharts-highlight-color-20)"}},style:{color:"var(--highcharts-neutral-color-100)",fontSize:"0.7em",fontWeight:"bold"}}),er.compose(ed),(0,d.extend)(ed.prototype,{allowDG:!1,forceCrop:!0,invertible:!1,noSharedTooltip:!0,pointClass:t2,sorted:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],buildKDTree:ea,init:el.prototype.init}),z().registerSeriesType("flags",ed);let ep=p();ep.Navigator=ep.Navigator||ti,ep.OrdinalAxis=ep.OrdinalAxis||ta,ep.RangeSelector=ep.RangeSelector||tT,ep.Scrollbar=ep.Scrollbar||J,ep.stockChart=tN.stockChart,ep.StockChart=ep.StockChart||ep.stockChart,(0,d.extend)(ep.StockChart,tN),f.compose(ep.Series,ep.Axis,ep.Point),tH.compose(ep.Series,ep.SVGRenderer),ed.compose(ep.Renderer),t$.compose(ep.Series),ep.Navigator.compose(ep.Chart,ep.Axis,ep.Series),ep.OrdinalAxis.compose(ep.Axis,ep.Series,ep.Chart),ep.RangeSelector.compose(ep.Axis,ep.Chart),ep.Scrollbar.compose(ep.Axis),ep.StockChart.compose(ep.Chart,ep.Axis,ep.Series,ep.SVGRenderer);let ec=p();export{ec as default};