let t;/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/navigator
 * @requires highcharts
 *
 * Standalone navigator module
 *
 * (c) 2009-2026 Highsoft AS
 * Author: Mateusz Bernacik
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */import*as i from"../highcharts.js";var e,s={};s.n=t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return s.d(i,{a:i}),i},s.d=(t,i)=>{for(var e in i)s.o(i,e)&&!s.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},s.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);let r=i.default;var a=s.n(r);let o=i.default.Chart;var n=s.n(o);let h=i.default.Axis;var l=s.n(h);let{doc:d,win:c}=a();function g(t,i,e,s={}){let r="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(r,"hcEvents")||(r.hcEvents={});let o=r.hcEvents;a().Point&&t instanceof a().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let n=t.addEventListener;n&&n.call(t,i,e,!!a().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==i.indexOf("touch"):s.passive,capture:!1}),o[i]||(o[i]=[]);let h={fn:e,order:"number"==typeof s.order?s.order:1/0};return o[i].push(h),o[i].sort((t,i)=>t.order-i.order),function(){D(t,i,e)}}function p(t,i){return t>1e14?t:parseFloat(t.toPrecision(i||14))}function u(t,i=0,e){let s=i%2/2,r=e?-1:1;return(Math.round(t*r-s)+s)*r}function x(t){return null!=t}function f(t,i,e){w(t,function(s,r){s!==i&&s?.destroy&&s.destroy(),(s?.destroy||!e)&&delete t[r]})}function v(t,i){let e=t.length;for(;e--;)if(t[e]===i){t.splice(e,1);break}}function m(t,i){let e;for(e in t||(t={}),i)t[e]=i[e];return t}function b(t,i,e,s){if(e=e||{},d?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==a())){let s=d.createEvent("Events");s.initEvent(i,!0,!0),e=m(s,e),t.dispatchEvent?t.dispatchEvent(e):t.fireEvent(i,e)}else if(t.hcEvents){e.target||m(e,{preventDefault:function(){e.defaultPrevented=!0},target:t,type:i});let s=[],r=t,a=!1;for(;r.hcEvents;)Object.hasOwnProperty.call(r,"hcEvents")&&r.hcEvents[i]&&(s.length&&(a=!0),s.unshift.apply(s,r.hcEvents[i])),r=Object.getPrototypeOf(r);a&&s.sort((t,i)=>t.order-i.order),s.forEach(i=>{!1===i.fn.call(t,e,t)&&e.preventDefault()})}s&&!e.defaultPrevented&&s.call(t,e)}let M=Array.prototype.find?function(t,i){return t.find(i)}:function(t,i){let e,s=t.length;for(e=0;e<s;e++)if(i(t[e],e))return t[e]};function y(t){return O(t)&&"number"==typeof t.nodeType}function A(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function E(t){let i=Object.prototype.toString.call(t);return"[object Array]"===i||"[object Array Iterator]"===i}function O(t,i){return!!t&&"object"==typeof t&&(!i||!E(t))}function k(t,...i){let e,s=[t,...i],r={},a=function(t,i){return"object"!=typeof t&&(t={}),w(i,function(e,s){if("__proto__"!==s&&"constructor"!==s){let r;!O(e,!0)||(r=e?.constructor,O(e,!0)&&!y(e)&&r?.name&&"Object"!==r.name)||y(e)?t[s]=i[s]:t[s]=a(t[s]||{},e)}}),t};!0===t&&(r=s[1],s=Array.prototype.slice.call(s,2));let o=s.length;for(e=0;e<o;e++)r=a(r,s[e]);return r}function w(t,i,e){for(let s in t)Object.hasOwnProperty.call(t,s)&&i.call(e||t[s],t[s],s,t)}function S(){let t=arguments,i=t.length;for(let e=0;e<i;e++){let i=t[e];if(null!=i)return i}}function z(t,i){return 0>t.indexOf(i)&&!!t.push(i)}function D(t,i,e){function s(i,e){let s=t.removeEventListener;s&&s.call(t,i,e,!1)}function r(e){let r,a;t.nodeName&&(i?(r={})[i]=!0:r=e,w(r,function(t,i){if(e[i])for(a=e[i].length;a--;)s(i,e[i][a].fn)}))}let a="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(a,"hcEvents")){let t=a.hcEvents;if(i){let a=t[i]||[];e?(t[i]=a.filter(function(t){return e!==t.fn}),s(i,e)):(r(t),t[i]=[])}else r(t),delete a.hcEvents}}let{isTouchDevice:T}=a(),R=[];function B(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function P(){let t,i,e,s=this.legend,r=this.navigator;if(r){t=s&&s.options,i=r.xAxis,e=r.yAxis;let{scrollbarHeight:a,scrollButtonSize:o}=r;this.inverted?(r.left=r.opposite?this.chartWidth-a-r.height:this.spacing[3]+a,r.top=this.plotTop+o):(r.left=S(i.left,this.plotLeft+o),r.top=r.navigatorOptions.top||this.chartHeight-r.height-a-(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+S(t.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),i&&e&&(this.inverted?i.options.left=e.options.left=r.left:i.options.top=e.options.top=r.top,i.setAxisSize(),e.setAxisSize())}}function C(i){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new t(this),S(i.redraw,!0)&&this.redraw(i.animation))}function L(){let i=this.options;(i.navigator.enabled||i.scrollbar.enabled)&&(this.scroller=this.navigator=new t(this))}function W(){let t=this.options,i=t.navigator,e=t.rangeSelector;if((i&&i.enabled||e&&e.enabled)&&(!T&&"x"===this.zooming.type||T&&"x"===this.zooming.pinchType))return!1}function U(t){let i=t.navigator;if(i&&t.xAxis[0]){let e=t.xAxis[0].getExtremes();i.render(e.min,e.max)}}function N(t){let i=t.options.navigator||{},e=t.options.scrollbar||{};!this.navigator&&!this.scroller&&(i.enabled||e.enabled)&&(k(!0,this.options.navigator,i),k(!0,this.options.scrollbar,e),delete t.options.navigator,delete t.options.scrollbar)}let H=function(i,e){if(z(R,i)){let s=i.prototype;t=e,s.callbacks.push(U),g(i,"afterAddSeries",B),g(i,"afterSetChartSize",P),g(i,"afterUpdate",C),g(i,"beforeRender",L),g(i,"beforeShowResetZoom",W),g(i,"update",N)}},{isTouchDevice:I}=a();function X(){this.navigatorAxis||(this.navigatorAxis=new j(this))}function Y(t){let i,e=this.chart,s=e.options,r=s.navigator,a=this.navigatorAxis,o=e.zooming.pinchType,n=s.rangeSelector,h=e.zooming.type;if(this.isXAxis&&(r?.enabled||n?.enabled)){if("y"===h&&"zoom"===t.trigger)i=!1;else if(("zoom"===t.trigger&&"xy"===h||I&&"xy"===o)&&this.options.range){let i=a.previousZoom;x(t.min)?a.previousZoom=[this.min,this.max]:i&&(t.min=i[0],t.max=i[1],a.previousZoom=void 0)}}void 0!==i&&t.preventDefault()}class j{static compose(t){t.keepProps.includes("navigatorAxis")||(t.keepProps.push("navigatorAxis"),g(t,"init",X),g(t,"setExtremes",Y))}constructor(t){this.axis=t}destroy(){this.axis=void 0}toFixedRange(t,i,e,s){let r=this.axis,a=(r.pointRange||0)/2,o=S(e,r.translate(t,!0,!r.horiz)),n=S(s,r.translate(i,!0,!r.horiz));return x(e)||(o=p(o+a)),x(s)||(n=p(n-a)),A(o)&&A(n)||(o=n=void 0),{min:o,max:n}}}let G=i.default.Color;var F=s.n(G);let _=i.default.SeriesRegistry;var V=s.n(_);let{parse:Z}=F(),{seriesTypes:$}=V(),q={height:40,margin:22,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:Z("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:void 0===$.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:"#e6e6e6",id:"navigator-x-axis",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#000000",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}},J={"navigator-handle":function(t,i,e,s,r={}){var a,o,n,h,l,d;let c=r.width?r.width/2:e,g=(a=r.borderRadius||0,o=Math.min(2*c,s),/%$/.test(a)?o*parseFloat(a)/100+0:parseFloat(a));return[["M",-1.5,(s=r.height||s)/2-3.5],["L",-1.5,s/2+4.5],["M",.5,s/2-3.5],["L",.5,s/2+4.5],...(n=-c-1,h=2*c+1,l=s,d={r:g},d?.r?function(t,i,e,s,r){let a=r?.r||0;return[["M",t+a,i],["L",t+e-a,i],["A",a,a,0,0,1,t+e,i+a],["L",t+e,i+s-a],["A",a,a,0,0,1,t+e-a,i+s],["L",t+a,i+s],["A",a,a,0,0,1,t,i+s-a],["L",t,i+a],["A",a,a,0,0,1,t+a,i],["Z"]]}(n,.5,h,l,d):[["M",n,.5],["L",n+h,.5],["L",n+h,.5+l],["L",n,.5+l],["Z"]])]}},K=i.default.RendererRegistry;var Q=s.n(K);let{defaultOptions:tt}=a(),{composed:ti}=a(),{getRendererType:te}=Q(),{setFixedRange:ts}={setFixedRange:function(t){let i=this.xAxis[0];x(i.dataMax)&&x(i.dataMin)&&t?this.fixedRange=Math.min(t,i.dataMax-i.dataMin):this.fixedRange=t}};function tr(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}let ta=function(t,i,e){j.compose(i),z(ti,"Navigator")&&(t.prototype.setFixedRange=ts,m(te().prototype.symbols,J),m(tt,{navigator:q}),g(e,"afterUpdate",tr))},{composed:to}=a();!function(t){let i;function e(t){let i=S(t.options?.min,t.min),e=S(t.options?.max,t.max);return{axisMin:i,axisMax:e,scrollMin:x(t.dataMin)?Math.min(i,t.min??1/0,t.dataMin,t.threshold??1/0):i,scrollMax:t.treeGrid?.adjustedMax??(x(t.dataMax)?Math.max(e,t.max??-1/0,t.dataMax,t.threshold??-1/0):e)}}function s(){let t=this.scrollbar,i=t&&!t.options.opposite,e=this.horiz?2:i?3:1;t&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[e]+=t.size+(t.options.margin||0))}function r(){let t=this;t.options?.scrollbar?.enabled&&(t.options.scrollbar.vertical=!t.horiz,t.options.startOnTick=t.options.endOnTick=!1,t.scrollbar=new i(t.chart.renderer,t.options.scrollbar,t.chart),g(t.scrollbar,"changed",function(i){let s,r,{axisMin:a,axisMax:o,scrollMin:n,scrollMax:h}=e(t),l=t.toPixels(n),d=t.toPixels(h)-l;if(x(a)&&x(o))if(t.horiz&&!t.reversed||!t.horiz&&t.reversed?(s=Math.min(h,t.toValue(l+d*this.to)),r=Math.max(n,t.toValue(l+d*this.from))):(s=Math.min(h,t.toValue(l+d*(1-this.from))),r=Math.max(n,t.toValue(l+d*(1-this.to)))),this.shouldUpdateExtremes(i.DOMType)){let e="mousemove"!==i.DOMType&&"touchmove"!==i.DOMType&&void 0;t.setExtremes(p(r),p(s),!0,e,i)}else this.setRange(this.from,this.to)}))}function a(){let t,i,s,{scrollMin:r,scrollMax:a}=e(this),o=this.scrollbar,n=(this.axisTitleMargin||0)+(this.titleOffset||0),h=this.chart.scrollbarsOffsets,l=this.options.margin||0;if(o&&h){if(this.horiz)this.opposite||(h[1]+=n),o.position(this.left,this.top+this.height+2+h[1]-(this.opposite?l:0),this.width,this.height),this.opposite||(h[1]+=l),t=1;else{let i;this.opposite&&(h[0]+=n),i=o.options.opposite?this.left+this.width+2+h[0]-(this.opposite?0:l):this.opposite?0:l,o.position(i,this.top,this.width,this.height),this.opposite&&(h[0]+=l),t=0}if(h[t]+=o.size+(o.options.margin||0),isNaN(r)||isNaN(a)||!x(this.min)||!x(this.max)||x(this.dataMin)&&this.dataMin===this.dataMax)o.setRange(0,1);else if(this.min===this.max){let t=this.pointRange/(this.dataMax+1);i=t*this.min,s=t*(this.max+1),o.setRange(i,s)}else i=(this.toPixels(this.min)-this.toPixels(r))/(this.toPixels(a)-this.toPixels(r)),s=(this.toPixels(this.max)-this.toPixels(r))/(this.toPixels(a)-this.toPixels(r)),this.horiz&&!this.reversed||!this.horiz&&this.reversed?o.setRange(i,s):o.setRange(1-s,1-i)}}t.compose=function(t,e){z(to,"Axis.Scrollbar")&&(i=e,g(t,"afterGetOffset",s),g(t,"afterInit",r),g(t,"afterRender",a))}}(e||(e={}));let tn=e,th={height:10,barBorderRadius:5,buttonBorderRadius:0,buttonsEnabled:!1,liveRedraw:void 0,margin:void 0,minWidth:6,opposite:!0,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:0,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"none",trackBackgroundColor:"rgba(255, 255, 255, 0.001)",trackBorderColor:"#cccccc",trackBorderRadius:5,trackBorderWidth:1},{defaultOptions:tl}=a(),{composed:td}=a();class tc{static compose(t){tn.compose(t,tc),z(td,"Scrollbar")&&m(tl,{scrollbar:th})}static swapXY(t,i){return i&&t.forEach(t=>{let i,e=t.length;for(let s=0;s<e;s+=2)"number"==typeof(i=t[s+1])&&(t[s+1]=t[s+2],t[s+2]=i)}),t}constructor(t,i,e){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,i,e)}addEvents(){let t=this.options.inverted?[1,0]:[0,1],i=this.scrollbarButtons,e=this.scrollbarGroup.element,s=this.track.element,r=this.mouseDownHandler.bind(this),a=this.mouseMoveHandler.bind(this),o=this.mouseUpHandler.bind(this),n=[[i[t[0]].element,"click",this.buttonToMinClick.bind(this)],[i[t[1]].element,"click",this.buttonToMaxClick.bind(this)],[s,"click",this.trackClick.bind(this)],[e,"mousedown",r],[e.ownerDocument,"mousemove",a],[e.ownerDocument,"mouseup",o],[e,"touchstart",r],[e.ownerDocument,"touchmove",a],[e.ownerDocument,"touchend",o]];n.forEach(function(t){g.apply(null,t)}),this._events=n}buttonToMaxClick(t){let i=(this.to-this.from)*S(this.options.step,.2);this.updatePosition(this.from+i,this.to+i),b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}buttonToMinClick(t){let i=p(this.to-this.from)*S(this.options.step,.2);this.updatePosition(p(this.from-i),p(this.to-i)),b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}cursorToScrollbarPosition(t){let i=this.options,e=i.minWidth>this.calculatedWidth?i.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-e),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-e)}}destroy(){let t=this,i=t.chart.scroller;t.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(i){t[i]&&t[i].destroy&&(t[i]=t[i].destroy())}),i&&t===i.scrollbar&&(i.scrollbar=null,f(i.scrollbarButtons))}drawScrollbarButton(t){let i=this.renderer,e=this.scrollbarButtons,s=this.options,r=this.size,a=i.g().add(this.group);if(e.push(a),s.buttonsEnabled){let o=i.rect().addClass("highcharts-scrollbar-button").add(a);this.chart.styledMode||o.attr({stroke:s.buttonBorderColor,"stroke-width":s.buttonBorderWidth,fill:s.buttonBackgroundColor}),o.attr(o.crisp({x:-.5,y:-.5,width:r,height:r,r:s.buttonBorderRadius},o.strokeWidth()));let n=i.path(tc.swapXY([["M",r/2+(t?-1:1),r/2-3],["L",r/2+(t?-1:1),r/2+3],["L",r/2+(t?2:-2),r/2]],s.vertical)).addClass("highcharts-scrollbar-arrow").add(e[t]);this.chart.styledMode||n.attr({fill:s.buttonArrowColor})}}init(t,i,e){this.scrollbarButtons=[],this.renderer=t,this.userOptions=i,this.options=k(th,tl.scrollbar,i),this.options.margin=S(this.options.margin,10),this.chart=e,this.size=S(this.options.size,this.options.height),i.enabled&&(this.render(),this.addEvents())}mouseDownHandler(t){let i=this.chart.pointer?.normalize(t)||t,e=this.cursorToScrollbarPosition(i);this.chartX=e.chartX,this.chartY=e.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0}mouseMoveHandler(t){let i,e=this.chart.pointer?.normalize(t)||t,s=this.options.vertical?"chartY":"chartX",r=this.initPositions||[];this.grabbedCenter&&(!t.touches||0!==t.touches[0][s])&&(i=this.cursorToScrollbarPosition(e)[s]-this[s],this.hasDragged=!0,this.updatePosition(r[0]+i,r[1]+i),this.hasDragged&&b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}))}mouseUpHandler(t){this.hasDragged&&b(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,i,e,s){let{buttonsEnabled:r,margin:a=0,vertical:o}=this.options,n=this.rendered?"animate":"attr",h=s,l=0;this.group.show(),this.x=t,this.y=i+this.trackBorderWidth,this.width=e,this.height=s,this.xOffset=h,this.yOffset=l,o?(this.width=this.yOffset=e=l=this.size,this.xOffset=h=0,this.yOffset=l=r?this.size:0,this.barWidth=s-(r?2*e:0),this.x=t+=a):(this.height=s=this.size,this.xOffset=h=r?this.size:0,this.barWidth=e-(r?2*s:0),this.y=this.y+a),this.group[n]({translateX:t,translateY:this.y}),this.track[n]({width:e,height:s}),this.scrollbarButtons[1][n]({translateX:o?0:e-h,translateY:o?s-l:0})}removeEvents(){this._events.forEach(function(t){D.apply(null,t)}),this._events.length=0}render(){let t=this.renderer,i=this.options,e=this.size,s=this.chart.styledMode,r=t.g("scrollbar").attr({zIndex:i.zIndex}).hide().add();this.group=r,this.track=t.rect().addClass("highcharts-scrollbar-track").attr({r:i.trackBorderRadius||0,height:e,width:e}).add(r),s||this.track.attr({fill:i.trackBackgroundColor,stroke:i.trackBorderColor,"stroke-width":i.trackBorderWidth});let a=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-u(0,a),y:-u(0,a)}),this.scrollbarGroup=t.g().add(r),this.scrollbar=t.rect().addClass("highcharts-scrollbar-thumb").attr({height:e-a,width:e-a,r:i.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=t.path(tc.swapXY([["M",-3,e/4],["L",-3,2*e/3],["M",0,e/4],["L",0,2*e/3],["M",3,e/4],["L",3,2*e/3]],i.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),s||(this.scrollbar.attr({fill:i.barBackgroundColor,stroke:i.barBorderColor,"stroke-width":i.barBorderWidth}),this.scrollbarRifles.attr({stroke:i.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-u(0,this.scrollbarStrokeWidth),-u(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)}setRange(t,i){let e,s,r=this.options,a=r.vertical,o=r.minWidth,n=this.barWidth,h=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(!x(n))return;let l=n*Math.min(i,1);e=Math.ceil(n*(t=Math.max(t,0))),this.calculatedWidth=s=p(l-e),s<o&&(e=(n-o+s)*t,s=o);let d=Math.floor(e+this.xOffset+this.yOffset),c=s/2-.5;this.from=t,this.to=i,a?(this.scrollbarGroup[h]({translateY:d}),this.scrollbar[h]({height:s}),this.scrollbarRifles[h]({translateY:c}),this.scrollbarTop=d,this.scrollbarLeft=0):(this.scrollbarGroup[h]({translateX:d}),this.scrollbar[h]({width:s}),this.scrollbarRifles[h]({translateX:c}),this.scrollbarLeft=d,this.scrollbarTop=0),s<=12?this.scrollbarRifles.hide():this.scrollbarRifles.show(),!1===r.showFull&&(t<=0&&i>=1?this.group.hide():this.group.show()),this.rendered=!0}shouldUpdateExtremes(t){return S(this.options.liveRedraw,a().svg&&!a().isTouchDevice&&!this.chart.boosted)||"mouseup"===t||"touchend"===t||!x(t)}trackClick(t){let i=this.chart.pointer?.normalize(t)||t,e=this.to-this.from,s=this.y+this.scrollbarTop,r=this.x+this.scrollbarLeft;this.options.vertical&&i.chartY>s||!this.options.vertical&&i.chartX>r?this.updatePosition(this.from+e,this.to+e):this.updatePosition(this.from-e,this.to-e),b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}update(t){this.destroy(),this.init(this.chart.renderer,k(!0,this.options,t),this.chart)}updatePosition(t,i){i>1&&(t=p(1-p(i-t)),i=1),t<0&&(i=p(i-t),t=0),this.from=t,this.to=i}}tc.defaultOptions=th;let{defaultOptions:tg}=a(),{isTouchDevice:tp}=a();function tu(t,...i){let e=[].filter.call(i,A);if(e.length)return Math[t].apply(0,e)}class tx{static compose(t,i,e){H(t,tx),ta(t,i,e)}constructor(t){this.isDirty=!1,this.scrollbarHeight=0,this.init(t)}drawHandle(t,i,e,s){let r=this.navigatorOptions.handles.height;this.handles[i][s](e?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-r)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-r/2-1)})}drawOutline(t,i,e,s){let r=this.navigatorOptions.maskInside,a=this.outline.strokeWidth(),o=a/2,n=a%2/2,h=this.scrollButtonSize,l=this.size,d=this.top,c=this.height,g=d-o,p=d+c,u=this.left,x,f;e?(x=d+i+n,i=d+t+n,f=[["M",u+c,d-h-n],["L",u+c,x],["L",u,x],["M",u,i],["L",u+c,i],["L",u+c,d+l+h]],r&&f.push(["M",u+c,x-o],["L",u+c,i+o])):(u-=h,t+=u+h-n,i+=u+h-n,f=[["M",u,g],["L",t,g],["L",t,p],["M",i,p],["L",i,g],["L",u+l+2*h,g]],r&&f.push(["M",t-o,g],["L",i+o,g])),this.outline[s]({d:f})}drawMasks(t,i,e,s){let r,a,o,n,h=this.left,l=this.top,d=this.height;e?(o=[h,h,h],n=[l,l+t,l+i],a=[d,d,d],r=[t,i-t,this.size-i]):(o=[h,h+t,h+i],n=[l,l,l],a=[t,i-t,this.size-i],r=[d,d,d]),this.shades.forEach((t,i)=>{t[s]({x:o[i],y:n[i],width:a[i],height:r[i]})})}renderElements(){let t=this,i=t.navigatorOptions,e=i.maskInside,s=t.chart,r=s.inverted,a=s.renderer,o={cursor:r?"ns-resize":"ew-resize"},n=t.navigatorGroup??(t.navigatorGroup=a.g("navigator").attr({zIndex:8,visibility:"hidden"}).add());if([!e,e,!e].forEach((e,r)=>{let h=t.shades[r]??(t.shades[r]=a.rect().addClass("highcharts-navigator-mask"+(1===r?"-inside":"-outside")).add(n));s.styledMode||(h.attr({fill:e?i.maskFill:"rgba(0,0,0,0)"}),1===r&&h.css(o))}),t.outline||(t.outline=a.path().addClass("highcharts-navigator-outline").add(n)),s.styledMode||t.outline.attr({"stroke-width":i.outlineWidth,stroke:i.outlineColor}),i.handles?.enabled){let e=!1,r=i.handles,{height:h,width:l}=r;[0,1].forEach(i=>{let d=r.symbols[i];(e=e||t.handles[i]?.symbolName!==d)&&(t.handles[i]?.destroy(),t.handles[i]=a.symbol(d,-l/2-1,0,l,h,r),t.handles[i].attr({zIndex:7-i}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][i]).add(n)),s.inverted&&t.handles[i].attr({rotation:90,rotationOriginX:Math.floor(-l/2),rotationOriginY:(h+l)/2}),s.styledMode||t.handles[i].attr({fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.lineWidth,width:r.width,height:r.height,x:-l/2-1,y:0}).css(o)}),e&&(t.partsEventsToUnbind?.forEach(t=>{t()}),t.partsEventsToUnbind=[...t.getPartsEvents("mousedown"),...t.getPartsEvents("touchstart")])}}update(t,i=!1){let e=this.chart,s=e.options.chart.inverted!==e.scrollbar?.options.vertical;if(k(!0,e.options.navigator,t),this.navigatorOptions=e.options.navigator||{},this.setOpposite(),x(t.enabled)||s)return this.destroy(),this.navigatorEnabled=t.enabled||this.navigatorEnabled,this.init(e);if(this.navigatorEnabled&&(this.isDirty=!0,!1===t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{D(t,"updatedData",this.updatedDataHandler)},this),t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{t.eventsToUnbind.push(g(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 i=this.getXAxisOffsets();this.xAxis.update({...t.xAxis,offsets:i,[e.inverted?"width":"height"]:this.height,[e.inverted?"height":"width"]:void 0},!1),this.yAxis.update({...t.yAxis,[e.inverted?"width":"height"]:this.height},!1)}i&&e.redraw()}render(t,i,e,s){var r,a,o,n;let h=this.chart,l=this.xAxis,d=l.pointRange||0,c=l.navigatorAxis.fake?h.xAxis[0]:l,g=this.navigatorEnabled,u=this.rendered,f=h.inverted,v=h.xAxis[0].minRange,m=h.xAxis[0].options.maxRange,M=this.scrollButtonSize,y,E,O,k=this.scrollbarHeight,w,z;if(this.hasDragged&&!x(e))return;if(this.isDirty&&this.renderElements(),t=p(t-d/2),i=p(i+d/2),!A(t)||!A(i))if(!u)return;else e=0,s=S(l.width,c.width);this.left=S(l.left,h.plotLeft+M+(f?h.plotWidth:0));let D=this.size=w=S(l.len,(f?h.plotHeight:h.plotWidth)-2*M);y=f?k:w+2*M,e=S(e,l.toPixels(t,!0)),s=S(s,l.toPixels(i,!0)),A(e)&&Math.abs(e)!==1/0||(e=0,s=y);let T=l.toValue(e,!0),R=l.toValue(s,!0),B=Math.abs(p(R-T));x(v)&&B<v?this.grabbedLeft?e=l.toPixels(R-v-d,!0):this.grabbedRight&&(s=l.toPixels(T+v+d,!0)):x(m)&&p(B-d)>m&&(this.grabbedLeft?e=l.toPixels(R-m-d,!0):this.grabbedRight&&(s=l.toPixels(T+m+d,!0))),this.zoomedMax=(r=Math.max(e,s),a=D,r>0?r<a?r:a:0),this.zoomedMin=(o=this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(e,s),n=D,o>0?o<n?o:n:0),this.range=this.zoomedMax-this.zoomedMin,D=Math.round(this.zoomedMax);let P=Math.round(this.zoomedMin);g&&(this.navigatorGroup.attr({visibility:"inherit"}),z=u&&!this.hasDragged?"animate":"attr",this.drawMasks(P,D,f,z),this.drawOutline(P,D,f,z),this.navigatorOptions.handles?.enabled&&(this.drawHandle(P,0,f,z),this.drawHandle(D,1,f,z))),this.scrollbar&&(f?(O=this.top-M,E=this.left-k+(g||!c.opposite?0:(c.titleOffset||0)+c.axisTitleMargin),k=w+2*M):(O=this.top+(g?this.height:-k),E=this.left-M),this.scrollbar.position(E,O,y,k),this.scrollbar.setRange(this.zoomedMin/(w||1),this.zoomedMax/(w||1))),this.rendered=!0,this.isDirty=!1,b(this,"afterRender")}addMouseEvents(){let t,i,e=this,s=e.chart,r=s.container,a=[];e.mouseMoveHandler=t=function(t){e.onMouseMove(t)},e.mouseUpHandler=i=function(t){e.onMouseUp(t)},a.push(g(s.renderTo,"mousemove",t),g(r.ownerDocument,"mouseup",i),g(s.renderTo,"touchmove",t),g(r.ownerDocument,"touchend",i)),e.eventsToUnbind=a,e.series&&e.series[0]&&a.push(g(e.series[0].xAxis,"foundExtremes",function(){s.navigator?.modifyNavigatorAxisExtremes()}))}getPartsEvents(t){let i=this,e=[];return["shades","handles"].forEach(s=>{i[s].forEach(function(r,a){e.push(g(r.element,t,function(t){i[`${s}Mousedown`](t,a)}))})}),e}shadesMousedown(t,i){t=this.chart.pointer?.normalize(t)||t;let e=this.chart,s=this.xAxis,r=this.zoomedMin,a=this.size,o=this.range,n=this.left,h=t.chartX,l,d,c,g;e.inverted&&(h=t.chartY,n=this.top),1===i?(this.grabbedCenter=h,this.fixedWidth=o,this.dragOffset=h-r):(g=h-n-o/2,0===i?g=Math.max(0,g):2===i&&g+o>=a&&(g=a-o,this.reversedExtremes?(g-=o,d=this.getUnionExtremes()?.dataMin):l=this.getUnionExtremes()?.dataMax),g!==r&&(this.fixedWidth=o,x((c=s.navigatorAxis.toFixedRange(g,g+o,d,l)).min)&&b(this,"setRange",{min:Math.min(c.min,c.max),max:Math.max(c.min,c.max),redraw:!0,eventArguments:{trigger:"navigator"}})))}handlesMousedown(t,i){t=this.chart.pointer?.normalize(t)||t;let e=this.chart,s=e.xAxis[0],r=this.reversedExtremes;0===i?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=r?s.min:s.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=r?s.max:s.min),e.setFixedRange(void 0)}onMouseMove(t){let i=this,e=i.chart,s=i.navigatorSize,r=i.range,a=i.dragOffset,o=e.inverted,n=i.left,h;(!t.touches||0!==t.touches[0].pageX)&&(h=(t=e.pointer?.normalize(t)||t).chartX,o&&(n=i.top,h=t.chartY),i.grabbedLeft?(i.hasDragged=!0,i.render(0,0,h-n,i.otherHandlePos)):i.grabbedRight?(i.hasDragged=!0,i.render(0,0,i.otherHandlePos,h-n)):i.grabbedCenter&&a&&(i.hasDragged=!0,h<a?h=a:h>s+a-r&&(h=s+a-r),i.render(0,0,h-a,h-a+r)),i.hasDragged&&S(i.scrollbarOptions?.liveRedraw,!tp&&!this.chart.boosted)&&(t.DOMType=t.type,setTimeout(function(){i.onMouseUp(t)},0)))}onMouseUp(t){let i,e,s,r,a,o,n=this.chart,h=this.xAxis,l=this.scrollbar,d=t.DOMEvent||t,c=n.inverted,g=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!l||!l.hasDragged)||"scrollbar"===t.trigger)&&(s=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?r=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(a=this.fixedExtreme),this.zoomedMax===this.size&&(a=this.reversedExtremes?s.dataMin:s.dataMax),0===this.zoomedMin&&(r=this.reversedExtremes?s.dataMax:s.dataMin),x((o=h.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,r,a)).min)&&b(this,"setRange",{min:Math.min(o.min,o.max),max:Math.max(o.min,o.max),redraw:!0,animation:!this.hasDragged&&null,eventArguments:{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:d}})),"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&&A(this.zoomedMin)&&A(this.zoomedMax)&&(e=Math.round(this.zoomedMin),i=Math.round(this.zoomedMax),this.shades&&this.drawMasks(e,i,c,g),this.outline&&this.drawOutline(e,i,c,g),this.navigatorOptions.handles?.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(e,0,c,g),this.drawHandle(i,1,c,g)))}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){D(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&D(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 i=t.options,e=i.navigator||{},s=e.enabled,r=i.scrollbar||{},a=r.enabled,o=s&&e.height||0,n=a&&r.height||0,h=r.buttonsEnabled&&n||0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=o,this.scrollbarHeight=n,this.scrollButtonSize=h,this.scrollbarEnabled=a,this.navigatorEnabled=!!s,this.navigatorOptions=e,this.scrollbarOptions=r,this.setOpposite();let d=this,c=d.baseSeries,p=t.xAxis.length,u=t.yAxis.length,x=c&&c[0]&&c[0].xAxis||t.xAxis[0]||{options:{}};if(t.isDirtyBox=!0,d.navigatorEnabled){let i=this.getXAxisOffsets();d.xAxis=new(l())(t,k({breaks:x.options.breaks,ordinal:x.options.ordinal,overscroll:x.options.overscroll},e.xAxis,{type:"datetime",yAxis:e.yAxis?.id,index:p,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:x.options.ordinal?0:x.options.minPadding,maxPadding:x.options.ordinal?0:x.options.maxPadding,zoomEnabled:!1},t.inverted?{offsets:i,width:o}:{offsets:i,height:o}),"xAxis"),d.yAxis=new(l())(t,k(e.yAxis,{alignTicks:!1,offset:0,index:u,isInternal:!0,reversed:S(e.yAxis&&e.yAxis.reversed,t.yAxis[0]&&t.yAxis[0].reversed,!1),zoomEnabled:!1},t.inverted?{width:o}:{height:o}),"yAxis"),c||e.series?.data?d.updateNavigatorSeries(!1):0===t.series.length&&(d.unbindRedraw=g(t,"beforeRedraw",function(){t.series.length>0&&!d.series&&(d.setBaseSeries(),d.unbindRedraw?.())})),d.reversedExtremes=t.inverted&&!d.xAxis.reversed||!t.inverted&&d.xAxis.reversed,d.renderElements(),d.addMouseEvents()}else d.xAxis={chart:t,navigatorAxis:{fake:!0},translate:function(i,e){let s=t.xAxis[0],r=s.getExtremes(),a=s.len-2*h,o=tu("min",s.options.min,r.dataMin),n=tu("max",s.options.max,r.dataMax)-o;return e?i*n/a+o:a*(i-o)/n},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)}},d.xAxis.navigatorAxis.axis=d.xAxis,d.xAxis.navigatorAxis.toFixedRange=j.prototype.toFixedRange.bind(d.xAxis.navigatorAxis);if(t.options.scrollbar?.enabled){let i=k(t.options.scrollbar,{vertical:t.inverted});A(i.margin)||(i.margin=t.inverted?-3:3),t.scrollbar=d.scrollbar=new tc(t.renderer,i,t),g(d.scrollbar,"changed",function(t){let i=d.size,e=i*this.to,s=i*this.from;d.hasDragged=d.scrollbar?.hasDragged,d.render(0,0,s,e),this.shouldUpdateExtremes(t.DOMType)&&setTimeout(function(){d.onMouseUp(t)})})}d.addBaseSeriesEvents(),d.addChartEvents()}setOpposite(){let t=this.navigatorOptions,i=this.navigatorEnabled,e=this.chart;this.opposite=S(t.opposite,!!(!i&&e.inverted))}getUnionExtremes(t){let i,e=this.chart.xAxis[0],s=this.chart.time,r=this.xAxis,a=r.options,o=e.options;return t&&null===e.dataMin||(i={dataMin:S(s.parse(a?.min),tu("min",s.parse(o.min),e.dataMin,r.dataMin,r.min)),dataMax:S(s.parse(a?.max),tu("max",s.parse(o.max),e.dataMax,r.dataMax,r.max))}),i}setBaseSeries(t,i){let e=this.chart,s=this.baseSeries=[];t=t||e.options.navigator?.baseSeries||(e.series.length?M(e.series,t=>!t.options.isInternal).index:0),(e.series||[]).forEach((i,e)=>{!i.options.isInternal&&(i.options.showInNavigator||(e===t||i.options.id===t)&&!1!==i.options.showInNavigator)&&s.push(i)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,i)}updateNavigatorSeries(t,i){let e=this,s=e.chart,r=e.baseSeries,a={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}}},o=e.series=(e.series||[]).filter(t=>{let i=t.baseSeries;return!(i&&0>r.indexOf(i))||(i&&(D(i,"updatedData",e.updatedDataHandler),delete i.navigatorSeries),t.chart&&t.destroy(),!1)}),n,h,l=e.navigatorOptions.series,d;if(r&&r.length&&r.forEach(t=>{var c;let g=t.navigatorSeries,p=m({color:t.color,visible:t.visible},E(l)?tg.navigator.series:l);if(g&&!1===e.navigatorOptions.adaptToUpdatedData)return;a.name="Navigator "+r.length,d=(n=t.options||{}).navigatorOptions||{},p.dataLabels=E(c=p.dataLabels)?c:[c],(h=k(n,a,p,d)).pointRange=S(p.pointRange,d.pointRange,tg.plotOptions[h.type||"line"]?.pointRange);let u=d.data||p.data;e.hasNavigatorData=e.hasNavigatorData||!!u,h.data=u||n.data?.slice(0),g&&g.options?g.update(h,i):(t.navigatorSeries=s.initSeries(h),s.setSortedData(),t.navigatorSeries.baseSeries=t,o.push(t.navigatorSeries))}),l?.data&&!(r&&r.length)||E(l)){var c;e.hasNavigatorData=!1,(l=E(c=l)?c:[c]).forEach((t,i)=>{a.name="Navigator "+(o.length+1),(h=k(tg.navigator?.series,{color:s.series[i]&&!s.series[i].options.isInternal&&s.series[i].color||s.options.colors?.[i]||s.options.colors?.[0]},a,t)).data=t.data,h.data&&(e.hasNavigatorData=!0,o.push(s.initSeries(h)))})}t&&this.addBaseSeriesEvents()}addBaseSeriesEvents(){let t=this,i=t.baseSeries||[];i[0]&&i[0].xAxis&&i[0].eventsToUnbind.push(g(i[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),i.forEach(e=>{e.eventsToUnbind.push(g(e,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),e.eventsToUnbind.push(g(e,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),!1!==this.navigatorOptions.adaptToUpdatedData&&e.xAxis&&e.eventsToUnbind.push(g(e,"updatedData",this.updatedDataHandler)),e.eventsToUnbind.push(g(e,"remove",function(){i&&v(i,e),this.navigatorSeries&&t.series&&(v(t.series,this.navigatorSeries),x(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})}getBaseSeriesMin(t){return this.baseSeries.reduce(function(t,i){return Math.min(t,i.getColumn("x")[0]??t)},t)}modifyNavigatorAxisExtremes(){let t=this.xAxis;if(void 0!==t.getExtremes){let i=this.getUnionExtremes(!0);i&&(i.dataMin!==t.min||i.dataMax!==t.max)&&(t.min=i.dataMin,t.max=i.dataMax)}}modifyBaseAxisExtremes(){let t,i,e=this.chart.navigator,s=this.getExtremes(),r=s.min,a=s.max,o=s.dataMin,n=s.dataMax,h=a-r,l=e?.stickToMin,d=e?.stickToMax,c=S(this.ordinal?.convertOverscroll(this.options.overscroll),0),g=e.series&&e.series[0],p=!!this.setExtremes;!(this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger)&&(l&&(t=(i=o)+h),d&&(t=n+c,l||(i=Math.max(o,t-h,e.getBaseSeriesMin(g&&g.xData?g.xData[0]:-Number.MAX_VALUE)))),p&&(l||d)&&A(i)&&(this.min=this.userMin=i,this.max=this.userMax=t)),e.stickToMin=e.stickToMax=null}updatedDataHandler(){let t=this.chart.navigator,i=this.navigatorSeries,e=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size);t.stickToMax=S(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,e),t.stickToMin=t.shouldStickToMin(this,t),i&&!t.hasNavigatorData&&(i.options.pointStart=this.getColumn("x")[0],i.setData(this.options.data,!1,void 0,!1))}shouldStickToMin(t,i){let e=i.getBaseSeriesMin(t.getColumn("x")[0]),s=t.xAxis,r=s.max,a=s.min,o=s.options.range;return!!(A(r)&&A(a))&&(o&&r-e>0?r-e<o:a<=e)}addChartEvents(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push(g(this.chart,"redraw",function(){let t=this.navigator,i=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||this.xAxis[0]);i&&t.render(i.min,i.max)}),g(this.chart,"getMargins",function(){let t=this.navigator,i=t.opposite?"plotTop":"marginBottom";this.inverted&&(i=t.opposite?"marginRight":"plotLeft"),this[i]=(this[i]||0)+(t.navigatorEnabled||!this.inverted?t.height+(this.scrollbar?.options.margin||0)+t.scrollbarHeight:0)+(t.navigatorOptions.margin||0)}),g(this,"setRange",function(t){this.chart.xAxis[0].setExtremes(t.min,t.max,t.redraw,t.animation,t.eventArguments)}))}destroy(){this.removeEvents(),this.xAxis&&(v(this.chart.xAxis,this.xAxis),v(this.chart.axes,this.xAxis)),this.yAxis&&(v(this.chart.yAxis,this.yAxis),v(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=>{f(t)}),this.baseSeries.forEach(t=>{t.navigatorSeries=void 0}),this.navigatorEnabled=!1}}let tf={chart:{height:70,margin:[0,5,0,5]},exporting:{enabled:!1},legend:{enabled:!1},navigator:{enabled:!1},plotOptions:{series:{states:{hover:{enabled:!1}},marker:{enabled:!1}}},scrollbar:{enabled:!1},title:{text:""},tooltip:{enabled:!1},xAxis:{visible:!1},yAxis:{height:0,visible:!1}};class tv{static navigator(t,i){let e=new tv(t,i);return a().navigators?a().navigators.push(e):a().navigators=[e],e}constructor(t,i){this.boundAxes=[],this.userOptions=i,this.chartOptions=k(a().getOptions(),tf,i.chart,{navigator:i}),this.chartOptions.chart&&i.height&&(this.chartOptions.chart.height=i.height);let e=new(n())(t,this.chartOptions);e.options=k(e.options,{navigator:{enabled:!0},scrollbar:{enabled:!0}}),this.chartOptions.navigator&&this.chartOptions.scrollbar&&(this.chartOptions.navigator.enabled=!0,this.chartOptions.scrollbar.enabled=!0),this.navigator=new tx(e),e.navigator=this.navigator,this.initNavigator()}bind(t,i=!0){let e=this,s=t instanceof n()?t.xAxis[0]:t;if(!(s instanceof l()))return;let{min:r,max:a}=this.navigator.xAxis,o=[];if(i){let t=g(s,"setExtremes",t=>{("pan"===t.trigger||"zoom"===t.trigger||"mousewheel"===t.trigger||"rangeSelectorButton"===t.trigger||"rangeSelectorInput"===t.trigger)&&e.setRange(t.min,t.max,!0,"pan"!==t.trigger&&"mousewheel"!==t.trigger,{trigger:s})});o.push(t)}let h=g(this.navigator,"setRange",t=>{s.setExtremes(t.min,t.max,t.redraw,t.animation)});o.push(h);let d=this.boundAxes.filter(function(t){return t.axis===s})[0];d||(d={axis:s,callbacks:[]},this.boundAxes.push(d)),d.callbacks=o,s.series.forEach(t=>{t.options.showInNavigator&&e.addSeries(t.options)}),s.setExtremes(r,a),g(s,"destroy",t=>{t.keepEvents||this.unbind(s)})}unbind(t){if(!t){this.boundAxes.forEach(({callbacks:t})=>{t.forEach(t=>t())}),this.boundAxes.length=0;return}let i=t instanceof l()?t:t.xAxis[0];for(let t=this.boundAxes.length-1;t>=0;t--)this.boundAxes[t].axis===i&&(this.boundAxes[t].callbacks.forEach(t=>t()),this.boundAxes.splice(t,1))}destroy(){this.boundAxes.forEach(({callbacks:t})=>{t.forEach(t=>t())}),this.boundAxes.length=0,this.navigator.destroy(),this.navigator.chart.destroy()}update(t,i){this.chartOptions=k(this.chartOptions,t.height&&{chart:{height:t.height}},t.chart,{navigator:t}),this.navigator.chart.update(this.chartOptions,i)}redraw(){this.navigator.chart.redraw()}addSeries(t){this.navigator.chart.addSeries(k(t,{showInNavigator:S(t.showInNavigator,!0)})),this.navigator.setBaseSeries()}initNavigator(){let t=this.navigator;t.top=1,t.xAxis.setScale(),t.yAxis.setScale(),t.xAxis.render(),t.yAxis.render(),t.series?.forEach(t=>{t.translate(),t.render(),t.redraw()});let{min:i,max:e}=this.getInitialExtremes();t.chart.xAxis[0].userMin=i,t.chart.xAxis[0].userMax=e,t.render(i,e)}getRange(){let{min:t,max:i}=this.navigator.chart.xAxis[0].getExtremes(),{userMin:e,userMax:s,min:r,max:a}=this.navigator.xAxis.getExtremes();return{min:S(t,r),max:S(i,a),dataMin:r,dataMax:a,userMin:e,userMax:s}}setRange(t,i,e,s,r){b(this.navigator,"setRange",{min:t,max:i,redraw:e,animation:s,eventArguments:k(r,{trigger:"navigator"})})}getInitialExtremes(){let{min:t,max:i}=this.navigator.xAxis.getExtremes();return{min:t,max:i}}}let tm=a();tm.StandaloneNavigator=tm.StandaloneNavigator||tv,tm.navigator=tm.StandaloneNavigator.navigator,ta(tm.Chart,tm.Axis,tm.Series);let tb=a();export{tb as default};