!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(window.jq)}(function(h){var a,u,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in window.document||9<=window.document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(h.event.fixHooks)for(var n=e.length;n;)h.event.fixHooks[e[--n]]=h.event.mouseHooks;var f=h.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;h.data(this,"mousewheel-line-height",f.getLineHeight(this)),h.data(this,"mousewheel-page-height",f.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;h.removeData(this,"mousewheel-line-height"),h.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var e=h(e),t=e["offsetParent"in h.fn?"offsetParent":"parent"]();return t.length||(t=h("body")),parseInt(t.css("fontSize"),10)||parseInt(e.css("fontSize"),10)||16},getPageHeight:function(e){return h(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=r.call(arguments,1),o=0,l=0,s=0;if((e=h.event.fix(n)).type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(l=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(l=-1*s,s=0),o=0===s?l:s,"deltaY"in n&&(o=s=-1*n.deltaY),"deltaX"in n&&(l=n.deltaX,0===s)&&(o=-1*l),0!==s||0!==l)return 1===n.deltaMode?(o*=t=h.data(this,"mousewheel-line-height"),s*=t,l*=t):2===n.deltaMode&&(o*=t=h.data(this,"mousewheel-page-height"),s*=t,l*=t),t=Math.max(Math.abs(s),Math.abs(l)),(!u||t<u)&&w(n,u=t)&&(u/=40),w(n,t)&&(o/=40,l/=40,s/=40),o=Math[1<=o?"floor":"ceil"](o/u),l=Math[1<=l?"floor":"ceil"](l/u),s=Math[1<=s?"floor":"ceil"](s/u),f.settings.normalizeOffset&&this.getBoundingClientRect&&(n=this.getBoundingClientRect(),e.offsetX=e.clientX-n.left,e.offsetY=e.clientY-n.top),e.deltaX=l,e.deltaY=s,e.deltaFactor=u,e.deltaMode=0,i.unshift(e,o,l,s),a&&window.clearTimeout(a),a=window.setTimeout(d,200),(h.event.dispatch||h.event.handle).apply(this,i)}function d(){u=null}function w(e,t){return f.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}h.fn.extend({mousewheel:function(e){return e?this.on("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.off("mousewheel",e)}})});