/**
 * Highcharts JS v11.3.0 (2024-01-10)
 *
 * Mousewheel zoom module
 *
 * (c) 2023 Askel Eirik Johansson
 *
 * License: www.highcharts.com/license
 */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/mouse-wheel-zoom",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,n){t.hasOwnProperty(e)||(t[e]=n.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Extensions/Annotations/NavigationBindingsUtilities.js",[e["Core/Utilities.js"]],function(t){let{defined:e,isNumber:i,pick:n}=t,o={backgroundColor:"string",borderColor:"string",borderRadius:"string",color:"string",fill:"string",fontSize:"string",labels:"string",name:"string",stroke:"string",title:"string"};return{annotationsFieldsTypes:o,getAssignedAxis:function(t){return t.filter(t=>{let e=t.axis.getExtremes(),o=e.min,s=e.max,r=n(t.axis.minPointOffset,0);return i(o)&&i(s)&&t.value>=o-r&&t.value<=s+r&&!t.axis.options.isInternal})[0]},getFieldType:function(t,i){let n=o[t],s=typeof i;return e(n)&&(s=n),({string:"text",number:"number",boolean:"checkbox"})[s]}}}),i(e,"Extensions/MouseWheelZoom/MouseWheelZoom.js",[e["Core/Utilities.js"],e["Extensions/Annotations/NavigationBindingsUtilities.js"]],function(t,e){let i,n,o;let{addEvent:s,isObject:r,pick:a,defined:l,merge:d,isNumber:u}=t,{getAssignedAxis:m}=e,g=[],c={enabled:!0,sensitivity:1.1},h=t=>r(t)?d(c,t):d(c,{enabled:!l(t)||t}),f=(t,e,i,n)=>(i+n>t+e&&(n>e?(n=e,i=t):i=t+e-n),n>e&&(n=e),i<t&&(i=t),{rangeStart:i,rangeWidth:n}),p=function(t){let e=t.options;l(i)&&clearTimeout(i),l(n)||(n=e.startOnTick,o=e.endOnTick),(n||o)&&(e.startOnTick=!1,e.endOnTick=!1),i=setTimeout(()=>{if(l(n)&&l(o)){e.startOnTick=n,e.endOnTick=o;let{min:i,max:s}=t.getExtremes();t.forceRedraw=!0,t.setExtremes(i,s),n=o=void 0}},400)},x=function(t,e,i){if(!l(i))return .5;let n=(i-e.minPixelPadding-e.pos)/(e.len-2*e.minPixelPadding),o=e.isXAxis;return o&&!e.reversed!=!t.inverted||!o&&e.reversed?1-n:n},v=function(t,e,i,n,o){let s=e.isXAxis,r=!1;if(l(e.max)&&l(e.min)&&l(e.dataMax)&&l(e.dataMin)){s||p(e);let d=e.max-e.min,m=u(o)?o:e.min+d/2,g=x(t,e,i),c=d*n,h=m-c*g,v=a(e.options.max,e.dataMax)-a(e.options.min,e.dataMin),y=e.options.min?0:v*e.options.minPadding,b=e.options.max?0:v*e.options.maxPadding,E=a(e.options.min,e.dataMin)-y,C=v+b+y,M=f(E,C,h,c),w=M.rangeStart<a(e.options.min,E)||M.rangeStart===e.min&&M.rangeWidth>C&&M.rangeStart+M.rangeWidth<a(e.options.max,Number.MIN_VALUE)||M.rangeWidth===e.max-e.min;l(n)&&!w?(e.setExtremes(M.rangeStart,M.rangeStart+M.rangeWidth,!1),r=!0):e.setExtremes(void 0,void 0,!1)}return r},y=function(t,e,i,n,o,s,r){let l=a(r.type,t.zooming.type,""),d=/x/.test(l),u=/y/.test(l),m=i.toValue(o),g=n.toValue(s);if(t.inverted){let t=n.pos+n.len;m=i.toValue(s),g=n.toValue(o);let e=o;o=s,s=t-e+n.pos}let c=d&&v(t,i,o,e,m),h=u&&v(t,n,s,e,g),f=c||h;return f&&t.redraw(!1),f};function b(){let t=this,e=h(t.zooming.mouseWheel);e.enabled&&s(this.container,"wheel",i=>{i=this.pointer.normalize(i);let n=!t.pointer.inClass(i.target,"highcharts-no-mousewheel");if(t.isInsidePlot(i.chartX-t.plotLeft,i.chartY-t.plotTop)&&n){let n=e.sensitivity||1.1,o=i.detail||(i.deltaY||0)/120,s=m(this.pointer.getCoordinates(i).xAxis),r=m(this.pointer.getCoordinates(i).yAxis),a=y(t,Math.pow(n,o),s?s.axis:t.xAxis[0],r?r.axis:t.yAxis[0],i.chartX,i.chartY,e);a&&i.preventDefault&&i.preventDefault()}})}return{compose:function(t){-1===g.indexOf(t)&&(g.push(t),s(t,"afterGetContainer",b))}}}),i(e,"masters/modules/mouse-wheel-zoom.src.js",[e["Core/Globals.js"],e["Extensions/MouseWheelZoom/MouseWheelZoom.js"]],function(t,e){e.compose(t.Chart)})});