PageSourceSearch

https://www.freet.co.kr/assets/js/jquery.nicescroll.js

js freet.co.kr collected 2026-09-30 05:40:08 UTC 183,937 bytes, 2,590 lines download raw bytes

vendor: 183,937 bytes, lines 1-2590
1/* jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */
2!function (e) {
3    "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof exports ? module.exports = e(require("jquery")) : e(jQuery)
4}(function (e) {
5    "use strict";
6    var o = !1, t = !1, r = 0, i = 2e3, s = 0, n = e, l = document, a = window, c = n(a), d = [],
7        u = a.requestAnimationFrame || a.webkitRequestAnimationFrame || a.mozRequestAnimationFrame || !1,
8        h = a.cancelAnimationFrame || a.webkitCancelAnimationFrame || a.mozCancelAnimationFrame || !1;
9    if (u) a.cancelAnimationFrame || (h = function (e) {
10    }); else {
11        var p = 0;
12        u = function (e, o) {
13            var t = (new Date).getTime(), r = Math.max(0, 16 - (t - p)), i = a.setTimeout(function () {
14                e(t + r)
15            }, r);
16            return p = t + r, i
17        }, h = function (e) {
18            a.clearTimeout(e)
19        }
20    }
21    var m = a.MutationObserver || a.WebKitMutationObserver || !1, f = Date.now || function () {
22        return (new Date).getTime()
23    }, g = {
24        zindex: "auto",
25        cursoropacitymin: 0,
26        cursoropacitymax: 1,
27        cursorcolor: "#424242",
28        cursorwidth: "6px",
29        cursorborder: "1px solid #fff",
30        cursorborderradius: "5px",
31        scrollspeed: 40,
32        mousescrollstep: 27,
33        touchbehavior: !1,
34        emulatetouch: !1,
35        hwacceleration: !0,
36        usetransition: !0,
37        boxzoom: !1,
38        dblclickzoom: !0,
39        gesturezoom: !0,
40        grabcursorenabled: !0,
41        autohidemode: !0,
42        background: "",
43        iframeautoresize: !0,
44        cursorminheight: 32,
45        preservenativescrolling: !0,
46        railoffset: !1,
47        railhoffset: !1,
48        bouncescroll: !0,
49        spacebarenabled: !0,
50        railpadding: {top: 0, right: 0, left: 0, bottom: 0},
51        disableoutline: !0,
52        horizrailenabled: !0,
53        railalign: "right",
54        railvalign: "bottom",
55        enabletranslate3d: !0,
56        enablemousewheel: !0,
57        enablekeyboard: !0,
58        smoothscroll: !0,
59        sensitiverail: !0,
60        enablemouselockapi: !0,
61        cursorfixedheight: !1,
62        directionlockdeadzone: 6,
63        hidecursordelay: 400,
64        nativeparentscrolling: !0,
65        enablescrollonselection: !0,
66        overflowx: !0,
67        overflowy: !0,
68        cursordragspeed: .3,
69        rtlmode: "auto",
70        cursordragontouch: !1,
71        oneaxismousemode: "auto",
72        scriptpath: function () {
73            var e = l.currentScript || function () {
74                var e = l.getElementsByTagName("script");
75                return !!e.length && e[e.length - 1]
76            }(), o = e ? e.src.split("?")[0] : "";
77            return o.split("/").length > 0 ? o.split("/").slice(0, -1).join("/") + "/" : ""
78        }(),
79        preventmultitouchscrolling: !0,
80        disablemutationobserver: !1,
81        enableobserver: !0,
82        scrollbarid: !1
83    }, v = !1, w = function () {
84        if (v) return v;
85        var e = l.createElement("DIV"), o = e.style, t = navigator.userAgent, r = navigator.platform, i = {};
86        return i.haspointerlock = "pointerLockElement" in l || "webkitPointerLockElement" in l || "mozPointerLockElement" in l, i.isopera = "opera" in a, i.isopera12 = i.isopera && "getUserMedia" in navigator, i.isoperamini = "[object OperaMini]" === Object.prototype.toString.call(a.operamini), i.isie = "all" in l && "attachEvent" in e && !i.isopera, i.isieold = i.isie && !("msInterpolationMode" in o), i.isie7 = i.isie && !i.isieold && (!("documentMode" in l) || 7 === l.documentMode), i.isie8 = i.isie && "documentMode" in l && 8 === l.documentMode, i.isie9 = i.isie && "performance" in a && 9 === l.documentMode, i.isie10 = i.isie && "performance" in a && 10 === l.documentMode, i.isie11 = "msRequestFullscreen" in e && l.documentMode >= 11, i.ismsedge = "msCredentials" in a, i.ismozilla = "MozAppearance" in o, i.iswebkit = !i.ismsedge && "WebkitAppearance" in o, i.ischrome = i.iswebkit && "chrome" in a, i.ischrome38 = i.ischrome && "touchAction" in o, i.ischrome22 = !i.ischrome38 && i.ischrome && i.haspointerlock, i.ischrome26 = !i.ischrome38 && i.ischrome && "transition" in o, i.cantouch = "ontouchstart" in l.documentElement || "ontouchstart" in a, i.hasw3ctouch = (a.PointerEvent || !1) && (navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0), i.hasmstouch = !i.hasw3ctouch && (a.MSPointerEvent || !1), i.ismac = /^mac$/i.test(r), i.isios = i.cantouch && /iphone|ipad|ipod/i.test(r), i.isios4 = i.isios && !("seal" in Object), i.isios7 = i.isios && "webkitHidden" in l, i.isios8 = i.isios && "hidden" in l, i.isios10 = i.isios && a.Proxy, i.isandroid = /android/i.test(t), i.haseventlistener = "addEventListener" in e, i.trstyle = !1, i.hastransform = !1, i.hastranslate3d = !1, i.transitionstyle = !1, i.hastransition = !1, i.transitionend = !1, i.trstyle = "transform", i.hastransform = "transform" in o || function () {
87            for (var e = ["msTransform", "webkitTransform", "MozTransform", "OTransform"], t = 0, r = e.length; t < r; t++) if (void 0 !== o[e[t]]) {
88                i.trstyle = e[t];
89                break
90            }
91            i.hastransform = !!i.trstyle
92        }(), i.hastransform && (o[i.trstyle] = "translate3d(1px,2px,3px)", i.hastranslate3d = /translate3d/.test(o[i.trstyle])), i.transitionstyle = "transition", i.prefixstyle = "", i.transitionend = "transitionend", i.hastransition = "transition" in o || function () {
93            i.transitionend = !1;
94            for (var e = ["webkitTransition", "msTransition", "MozTransition", "OTransition", "OTransition", "KhtmlTransition"], t = ["-webkit-", "-ms-", "-moz-", "-o-", "-o", "-khtml-"], r = ["webkitTransitionEnd", "msTransitionEnd", "transitionend", "otransitionend", "oTransitionEnd", "KhtmlTransitionEnd"], s = 0, n = e.length; s < n; s++) if (e[s] in o) {
95                i.transitionstyle = e[s], i.prefixstyle = t[s], i.transitionend = r[s];
96                break
97            }
98            i.ischrome26 && (i.prefixstyle = t[1]), i.hastransition = i.transitionstyle
99        }(), i.cursorgrabvalue = function () {
100            var e = ["grab", "-webkit-grab", "-moz-grab"];
101            (i.ischrome && !i.ischrome38 || i.isie) && (e = []);
102            for (var t = 0, r = e.length; t < r; t++) {
103                var s = e[t];
104                if (o.cursor = s, o.cursor == s) return s
105            }
106            return "url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"
107        }(), i.hasmousecapture = "setCapture" in e, i.hasMutationObserver = !1 !== m, e = null, v = i, i
108    }, b = function (e, p) {
109        function v() {
110            var e = T.doc.css(P.trstyle);
111            return !(!e || "matrix" != e.substr(0, 6)) && e.replace(/^.*\((.*)\)$/g, "$1").replace(/px/g, "").split(/, +/)
112        }
113
114        function b() {
115            var e = T.win;
116            if ("zIndex" in e) return e.zIndex();
117            for (; e.length > 0;) {
118                if (9 == e[0].nodeType) return !1;
119                var o = e.css("zIndex");
120                if (!isNaN(o) && 0 !== o) return parseInt(o);
121                e = e.parent()
122            }
123            return !1
124        }
125
126        function x(e, o, t) {
127            var r = e.css(o), i = parseFloat(r);
128            if (isNaN(i)) {
129                var s = 3 == (i = I[r] || 0) ? t ? T.win.outerHeight() - T.win.innerHeight() : T.win.outerWidth() - T.win.innerWidth() : 1;
130                return T.isie8 && i && (i += 1), s ? i : 0
131            }
132            return i
133        }
134
135        function S(e, o, t, r) {
136            T._bind(e, o, function (r) {
137                var i = {
138                    original: r = r || a.event,
139                    target: r.target || r.srcElement,
140                    type: "wheel",
141                    deltaMode: "MozMousePixelScroll" == r.type ? 0 : 1,
142                    deltaX: 0,
143                    deltaZ: 0,
144                    preventDefault: function () {
145                        return r.preventDefault ? r.preventDefault() : r.returnValue = !1, !1
146                    },
147                    stopImmediatePropagation: function () {
148                        r.stopImmediatePropagation ? r.stopImmediatePropagation() : r.cancelBubble = !0
149                    }
150                };
151                return "mousewheel" == o ? (r.wheelDeltaX && (i.deltaX = -.025 * r.wheelDeltaX), r.wheelDeltaY && (i.deltaY = -.025 * r.wheelDeltaY), !i.deltaY && !i.deltaX && (i.deltaY = -.025 * r.wheelDelta)) : i.deltaY = r.detail, t.call(e, i)
152            }, r)
153        }
154
155        function z(e, o, t, r) {
156            T.scrollrunning || (T.newscrolly = T.getScrollTop(), T.newscrollx = T.getScrollLeft(), D = f());
157            var i = f() - D;
158            if (D = f(), i > 350 ? A = 1 : A += (2 - A) / 10, e = e * A | 0, o = o * A | 0, e) {
159                if (r) if (e < 0) {
160                    if (T.getScrollLeft() >= T.page.maxw) return !0
161                } else if (T.getScrollLeft() <= 0) return !0;
162                var s = e > 0 ? 1 : -1;
163                X !== s && (T.scrollmom && T.scrollmom.stop(), T.newscrollx = T.getScrollLeft(), X = s), T.lastdeltax -= e
164            }
165            if (o) {
166                if (function () {
167                    var e = T.getScrollTop();
168                    if (o < 0) {
169                        if (e >= T.page.maxh) return !0
170                    } else if (e <= 0) return !0
171                }()) {
172                    if (M.nativeparentscrolling && t && !T.ispage && !T.zoomactive) return !0;
173                    var n = T.view.h >> 1;
174                    T.newscrolly < -n ? (T.newscrolly = -n, o = -1) : T.newscrolly > T.page.maxh + n ? (T.newscrolly = T.page.maxh + n, o = 1) : o = 0
175                }
176                var l = o > 0 ? 1 : -1;
177                B !== l && (T.scrollmom && T.scrollmom.stop(), T.newscrolly = T.getScrollTop(), B = l), T.lastdeltay -= o
178            }
179            (o || e) && T.synched("relativexy", function () {
180                var e = T.lastdeltay + T.newscrolly;
181                T.lastdeltay = 0;
182                var o = T.lastdeltax + T.newscrollx;
183                T.lastdeltax = 0, T.rail.drag || T.doScrollPos(o, e)
184            })
185        }
186
187        function k(e, o, t) {
188            var r, i;
189            return !(t || !q) || (0 === e.deltaMode ? (r = -e.deltaX * (M.mousescrollstep / 54) | 0, i = -e.deltaY * (M.mousescrollstep / 54) | 0) : 1 === e.deltaMode && (r = -e.deltaX * M.mousescrollstep * 50 / 80 | 0, i = -e.deltaY * M.mousescrollstep * 50 / 80 | 0), o && M.oneaxismousemode && 0 === r && i && (r = i, i = 0, t && (r < 0 ? T.getScrollLeft() >= T.page.maxw : T.getScrollLeft() <= 0) && (i = r, r = 0)), T.isrtlmode && (r = -r), z(r, i, t, !0) ? void (t && (q = !0)) : (q = !1, e.stopImmediatePropagation(), e.preventDefault()))
190        }
191
192        var T = this;
193        this.version = "3.7.6", this.name = "nicescroll", this.me = p;
194        var E = n("body"), M = this.opt = {doc: E, win: !1};
195        if (n.extend(M, g), M.snapbackspeed = 80, e) for (var L in M) void 0 !== e[L] && (M[L] = e[L]);
196        if (M.disablemutationobserver && (m = !1), this.doc = M.doc, this.iddoc = this.doc && this.doc[0] ? this.doc[0].id || "" : "", this.ispage = /^BODY|HTML/.test(M.win ? M.win[0].nodeName : this.doc[0].nodeName), this.haswrapper = !1 !== M.win, this.win = M.win || (this.ispage ? c : this.doc), this.docscroll = this.ispage && !this.haswrapper ? c : this.win, this.body = E, this.viewport = !1, this.isfixed = !1, this.iframe = !1, this.isiframe = "IFRAME" == this.doc[0].nodeName && "IFRAME" == this.win[0].nodeName, this.istextarea = "TEXTAREA" == this.win[0].nodeName, this.forcescreen = !1, this.canshowonmouseevent = "scroll" != M.autohidemode, this.onmousedown = !1, this.onmouseup = !1, this.onmousemove = !1, this.onmousewheel = !1, this.onkeypress = !1, this.ongesturezoom = !1, this.onclick = !1, this.onscrollstart = !1, this.onscrollend = !1, this.onscrollcancel = !1, this.onzoomin = !1, this.onzoomout = !1, this.view = !1, this.page = !1, this.scroll = {
197            x: 0,
198            y: 0
199        }, this.scrollratio = {x: 0, y: 0}, this.cursorheight = 20, this.scrollvaluemax = 0, "auto" == M.rtlmode) {
200            var C = this.win[0] == a ? this.body : this.win,
201                N = C.css("writing-mode") || C.css("-webkit-writing-mode") || C.css("-ms-writing-mode") || C.css("-moz-writing-mode");
202            "horizontal-tb" == N || "lr-tb" == N || "" === N ? (this.isrtlmode = "rtl" == C.css("direction"), this.isvertical = !1) : (this.isrtlmode = "vertical-rl" == N || "tb" == N || "tb-rl" == N || "rl-tb" == N, this.isvertical = "vertical-rl" == N || "tb" == N || "tb-rl" == N)
203        } else this.isrtlmode = !0 === M.rtlmode, this.isvertical = !1;
204        if (this.scrollrunning = !1, this.scrollmom = !1, this.observer = !1, this.observerremover = !1, this.observerbody = !1, !1 !== M.scrollbarid) this.id = M.scrollbarid; else do {
205            this.id = "ascrail" + i++
206        } while (l.getElementById(this.id));
207        this.rail = !1, this.cursor = !1, this.cursorfreezed = !1, this.selectiondrag = !1, this.zoom = !1, this.zoomactive = !1, this.hasfocus = !1, this.hasmousefocus = !1, this.railslocked = !1, this.locked = !1, this.hidden = !1, this.cursoractive = !0, this.wheelprevented = !1, this.overflowx = M.overflowx, this.overflowy = M.overflowy, this.nativescrollingarea = !1, this.checkarea = 0, this.events = [], this.saved = {}, this.delaylist = {}, this.synclist = {}, this.lastdeltax = 0, this.lastdeltay = 0, this.detected = w();
208        var P = n.extend({}, this.detected);
209        this.canhwscroll = P.hastransform && M.hwacceleration, this.ishwscroll = this.canhwscroll && T.haswrapper, this.isrtlmode ? this.isvertical ? this.hasreversehr = !(P.iswebkit || P.isie || P.isie11) : this.hasreversehr = !(P.iswebkit || P.isie && !P.isie10 && !P.isie11) : this.hasreversehr = !1, this.istouchcapable = !1, P.cantouch || !P.hasw3ctouch && !P.hasmstouch ? !P.cantouch || P.isios || P.isandroid || !P.iswebkit && !P.ismozilla || (this.istouchcapable = !0) : this.istouchcapable = !0, M.enablemouselockapi || (P.hasmousecapture = !1, P.haspointerlock = !1), this.debounced = function (e, o, t) {
210            T && (T.delaylist[e] || !1 || (T.delaylist[e] = {
211                h: u(function () {
212                    T.delaylist[e].fn.call(T), T.delaylist[e] = !1
213                }, t)
214            }, o.call(T)), T.delaylist[e].fn = o)
215        }, this.synched = function (e, o) {
216            T.synclist[e] ? T.synclist[e] = o : (T.synclist[e] = o, u(function () {
217                T && (T.synclist[e] && T.synclist[e].call(T), T.synclist[e] = null)
218            }))
219        }, this.unsynched = function (e) {
220            T.synclist[e] && (T.synclist[e] = !1)
221        }, this.css = function (e, o) {
222            for (var t in o) T.saved.css.push([e, t, e.css(t)]), e.css(t, o[t])
223        }, this.scrollTop = function (e) {
224            return void 0 === e ? T.getScrollTop() : T.setScrollTop(e)
225        }, this.scrollLeft = function (e) {
226            return void 0 === e ? T.getScrollLeft() : T.setScrollLeft(e)
227        };
228        var R = function (e, o, t, r, i, s, n) {
229            this.st = e, this.ed = o, this.spd = t, this.p1 = r || 0, this.p2 = i || 1, this.p3 = s || 0, this.p4 = n || 1, this.ts = f(), this.df = o - e
230        };
231        if (R.prototype = {
232            B2: function (e) {
233                return 3 * (1 - e) * (1 - e) * e
234            }, B3: function (e) {
235                return 3 * (1 - e) * e * e
236            }, B4: function (e) {
237                return e * e * e
238            }, getPos: function () {
239                return (f() - this.ts) / this.spd
240            }, getNow: function () {
241                var e = (f() - this.ts) / this.spd, o = this.B2(e) + this.B3(e) + this.B4(e);
242                return e >= 1 ? this.ed : this.st + this.df * o | 0
243            }, update: function (e, o) {
244                return this.st = this.getNow(), this.ed = e, this.spd = o, this.ts = f(), this.df = this.ed - this.st, this
245            }
246        }, this.ishwscroll) {
247            this.doc.translate = {
248                x: 0,
249                y: 0,
250                tx: "0px",
251                ty: "0px"
252            }, P.hastranslate3d && P.isios && this.doc.css("-webkit-backface-visibility", "hidden"), this.getScrollTop = function (e) {
253                if (!e) {
254                    var o = v();
255                    if (o) return 16 == o.length ? -o[13] : -o[5];
256                    if (T.timerscroll && T.timerscroll.bz) return T.timerscroll.bz.getNow()
257                }
258                return T.doc.translate.y
259            }, this.getScrollLeft = function (e) {
260                if (!e) {
261                    var o = v();
262                    if (o) return 16 == o.length ? -o[12] : -o[4];
263                    if (T.timerscroll && T.timerscroll.bh) return T.timerscroll.bh.getNow()
264                }
265                return T.doc.translate.x
266            }, this.notifyScrollEvent = function (e) {
267                var o = l.createEvent("UIEvents");
268                o.initUIEvent("scroll", !1, !1, a, 1), o.niceevent = !0, e.dispatchEvent(o)
269            };
270            var _ = this.isrtlmode ? 1 : -1;
271            P.hastranslate3d && M.enabletranslate3d ? (this.setScrollTop = function (e, o) {
272                T.doc.translate.y = e, T.doc.translate.ty = -1 * e + "px", T.doc.css(P.trstyle, "translate3d(" + T.doc.translate.tx + "," + T.doc.translate.ty + ",0)"), o || T.notifyScrollEvent(T.win[0])
273            }, this.setScrollLeft = function (e, o) {
274                T.doc.translate.x = e, T.doc.translate.tx = e * _ + "px", T.doc.css(P.trstyle, "translate3d(" + T.doc.translate.tx + "," + T.doc.translate.ty + ",0)"), o || T.notifyScrollEvent(T.win[0])
275            }) : (this.setScrollTop = function (e, o) {
276                T.doc.translate.y = e, T.doc.translate.ty = -1 * e + "px", T.doc.css(P.trstyle, "translate(" + T.doc.translate.tx + "," + T.doc.translate.ty + ")"), o || T.notifyScrollEvent(T.win[0])
277            }, this.setScrollLeft = function (e, o) {
278                T.doc.translate.x = e, T.doc.translate.tx = e * _ + "px", T.doc.css(P.trstyle, "translate(" + T.doc.translate.tx + "," + T.doc.translate.ty + ")"), o || T.notifyScrollEvent(T.win[0])
279            })
280        } else this.getScrollTop = function () {
281            return T.docscroll.scrollTop()
282        }, this.setScrollTop = function (e) {
283            T.docscroll.scrollTop(e)
284        }, this.getScrollLeft = function () {
285            return T.hasreversehr ? T.detected.ismozilla ? T.page.maxw - Math.abs(T.docscroll.scrollLeft()) : T.page.maxw - T.docscroll.scrollLeft() : T.docscroll.scrollLeft()
286        }, this.setScrollLeft = function (e) {
287            return setTimeout(function () {
288                if (T) return T.hasreversehr && (e = T.detected.ismozilla ? -(T.page.maxw - e) : T.page.maxw - e), T.docscroll.scrollLeft(e)
289            }, 1)
290        };
291        this.getTarget = function (e) {
292            return !!e && (e.target ? e.target : !!e.srcElement && e.srcElement)
293        }, this.hasParent = function (e, o) {
294            if (!e) return !1;
295            for (var t = e.target || e.srcElement || e || !1; t && t.id != o;) t = t.parentNode || !1;
296            return !1 !== t
297        };
298        var I = {thin: 1, medium: 3, thick: 5};
299        this.getDocumentScrollOffset = function () {
300            return {
301                top: a.pageYOffset || l.documentElement.scrollTop,
302                left: a.pageXOffset || l.documentElement.scrollLeft
303            }
304        }, this.getOffset = function () {
305            if (T.isfixed) {
306                var e = T.win.offset(), o = T.getDocumentScrollOffset();
307                return e.top -= o.top, e.left -= o.left, e
308            }
309            var t = T.win.offset();
310            if (!T.viewport) return t;
311            var r = T.viewport.offset();
312            return {top: t.top - r.top, left: t.left - r.left}
313        }, this.updateScrollBar = function (e) {
314            var o, t;
315            if (T.ishwscroll) T.rail.css({height: T.win.innerHeight() - (M.railpadding.top + M.railpadding.bottom)}), T.railh && T.railh.css({width: T.win.innerWidth() - (M.railpadding.left + M.railpadding.right)}); else {
316                var r = T.getOffset();
317                if (o = {
318                    top: r.top,
319                    left: r.left - (M.railpadding.left + M.railpadding.right)
320                }, o.top += x(T.win, "border-top-width", !0), o.left += T.rail.align ? T.win.outerWidth() - x(T.win, "border-right-width") - T.rail.width : x(T.win, "border-left-width"), (t = M.railoffset) && (t.top && (o.top += t.top), t.left && (o.left += t.left)), T.railslocked || T.rail.css({
321                    top: o.top,
322                    left: o.left,
323                    height: (e ? e.h : T.win.innerHeight()) - (M.railpadding.top + M.railpadding.bottom)
324                }), T.zoom && T.zoom.css({
325                    top: o.top + 1,
326                    left: 1 == T.rail.align ? o.left - 20 : o.left + T.rail.width + 4
327                }), T.railh && !T.railslocked) {
328                    o = {
329                        top: r.top,
330                        left: r.left
331                    }, (t = M.railhoffset) && (t.top && (o.top += t.top), t.left && (o.left += t.left));
332                    var i = T.railh.align ? o.top + x(T.win, "border-top-width", !0) + T.win.innerHeight() - T.railh.height : o.top + x(T.win, "border-top-width", !0),
333                        s = o.left + x(T.win, "border-left-width");
334                    T.railh.css({top: i - (M.railpadding.top + M.railpadding.bottom), left: s, width: T.railh.width})
335                }
336            }
337        }, this.doRailClick = function (e, o, t) {
338            var r, i, s, n;
339            T.railslocked || (T.cancelEvent(e), "pageY" in e || (e.pageX = e.clientX + l.documentElement.scrollLeft, e.pageY = e.clientY + l.documentElement.scrollTop), o ? (r = t ? T.doScrollLeft : T.doScrollTop, s = t ? (e.pageX - T.railh.offset().left - T.cursorwidth / 2) * T.scrollratio.x : (e.pageY - T.rail.offset().top - T.cursorheight / 2) * T.scrollratio.y, T.unsynched("relativexy"), r(0 | s)) : (r = t ? T.doScrollLeftBy : T.doScrollBy, s = t ? T.scroll.x : T.scroll.y, n = t ? e.pageX - T.railh.offset().left : e.pageY - T.rail.offset().top, i = t ? T.view.w : T.view.h, r(s >= n ? i : -i)))
340        }, T.newscrolly = T.newscrollx = 0, T.hasanimationframe = "requestAnimationFrame" in a, T.hascancelanimationframe = "cancelAnimationFrame" in a, T.hasborderbox = !1, this.init = function () {
341            if (T.saved.css = [], P.isoperamini) return !0;
342            if (P.isandroid && !("hidden" in l)) return !0;
343            M.emulatetouch = M.emulatetouch || M.touchbehavior, T.hasborderbox = a.getComputedStyle && "border-box" === a.getComputedStyle(l.body)["box-sizing"];
344            var e = {"overflow-y": "hidden"};
345            if ((P.isie11 || P.isie10) && (e["-ms-overflow-style"] = "none"), T.ishwscroll && (this.doc.css(P.transitionstyle, P.prefixstyle + "transform 0ms ease-out"), P.transitionend && T.bind(T.doc, P.transitionend, T.onScrollTransitionEnd, !1)), T.zindex = "auto", T.ispage || "auto" != M.zindex ? T.zindex = M.zindex : T.zindex = b() || "auto", !T.ispage && "auto" != T.zindex && T.zindex > s && (s = T.zindex), T.isie && 0 === T.zindex && "auto" == M.zindex && (T.zindex = "auto"), !T.ispage || !P.isieold) {
346                var i = T.docscroll;
347                T.ispage && (i = T.haswrapper ? T.win : T.doc), T.css(i, e), T.ispage && (P.isie11 || P.isie) && T.css(n("html"), e), !P.isios || T.ispage || T.haswrapper || T.css(E, {"-webkit-overflow-scrolling": "touch"});
348                var d = n(l.createElement("div"));
349                d.css({
350                    position: "relative",
351                    top: 0,
352                    float: "right",
353                    width: M.cursorwidth,
354                    height: 0,
355                    "background-color": M.cursorcolor,
356                    border: M.cursorborder,
357                    "background-clip": "padding-box",
358                    "-webkit-border-radius": M.cursorborderradius,
359                    "-moz-border-radius": M.cursorborderradius,
360                    "border-radius": M.cursorborderradius
361                }), d.addClass("nicescroll-cursors"), T.cursor = d;
362                var u = n(l.createElement("div"));
363                u.attr("id", T.id), u.addClass("nicescroll-rails nicescroll-rails-vr");
364                var h, p, f = ["left", "right", "top", "bottom"];
365                for (var g in f) p = f[g], (h = M.railpadding[p] || 0) && u.css("padding-" + p, h + "px");
366                u.append(d), u.width = Math.max(parseFloat(M.cursorwidth), d.outerWidth()), u.css({
367                    width: u.width + "px",
368                    zIndex: T.zindex,
369                    background: M.background,
370                    cursor: "default"
371                }), u.visibility = !0, u.scrollable = !0, u.align = "left" == M.railalign ? 0 : 1, T.rail = u, T.rail.drag = !1;
372                var v = !1;
373                !M.boxzoom || T.ispage || P.isieold || (v = l.createElement("div"), T.bind(v, "click", T.doZoom), T.bind(v, "mouseenter", function () {
374                    T.zoom.css("opacity", M.cursoropacitymax)
375                }), T.bind(v, "mouseleave", function () {
376                    T.zoom.css("opacity", M.cursoropacitymin)
377                }), T.zoom = n(v), T.zoom.css({
378                    cursor: "pointer",
379                    zIndex: T.zindex,
380                    backgroundImage: "url(" + M.scriptpath + "zoomico.png)",
381                    height: 18,
382                    width: 18,
383                    backgroundPosition: "0 0"
384                }), M.dblclickzoom && T.bind(T.win, "dblclick", T.doZoom), P.cantouch && M.gesturezoom && (T.ongesturezoom = function (e) {
385                    return e.scale > 1.5 && T.doZoomIn(e), e.scale < .8 && T.doZoomOut(e), T.cancelEvent(e)
386                }, T.bind(T.win, "gestureend", T.ongesturezoom))), T.railh = !1;
387                var w;
388                if (M.horizrailenabled && (T.css(i, {overflowX: "hidden"}), (d = n(l.createElement("div"))).css({
389                    position: "absolute",
390                    top: 0,
391                    height: M.cursorwidth,
392                    width: 0,
393                    backgroundColor: M.cursorcolor,
394                    border: M.cursorborder,
395                    backgroundClip: "padding-box",
396                    "-webkit-border-radius": M.cursorborderradius,
397                    "-moz-border-radius": M.cursorborderradius,
398                    "border-radius": M.cursorborderradius
399                }), P.isieold && d.css("overflow", "hidden"), d.addClass("nicescroll-cursors"), T.cursorh = d, (w = n(l.createElement("div"))).attr("id", T.id + "-hr"), w.addClass("nicescroll-rails nicescroll-rails-hr"), w.height = Math.max(parseFloat(M.cursorwidth), d.outerHeight()), w.css({
400                    height: w.height + "px",
401                    zIndex: T.zindex,
402                    background: M.background
403                }), w.append(d), w.visibility = !0, w.scrollable = !0, w.align = "top" == M.railvalign ? 0 : 1, T.railh = w, T.railh.drag = !1), T.ispage) u.css({
404                    position: "fixed",
405                    top: 0,
406                    height: "100%"
407                }), u.css(u.align ? {right: 0} : {left: 0}), T.body.append(u), T.railh && (w.css({
408                    position: "fixed",
409                    left: 0,
410                    width: "100%"
411                }), w.css(w.align ? {bottom: 0} : {top: 0}), T.body.append(w)); else {
412                    if (T.ishwscroll) {
413                        "static" == T.win.css("position") && T.css(T.win, {position: "relative"});
414                        var x = "HTML" == T.win[0].nodeName ? T.body : T.win;
415                        n(x).scrollTop(0).scrollLeft(0), T.zoom && (T.zoom.css({
416                            position: "absolute",
417                            top: 1,
418                            right: 0,
419                            "margin-right": u.width + 4
420                        }), x.append(T.zoom)), u.css({
421                            position: "absolute",
422                            top: 0
423                        }), u.css(u.align ? {right: 0} : {left: 0}), x.append(u), w && (w.css({
424                            position: "absolute",
425                            left: 0,
426                            bottom: 0
427                        }), w.css(w.align ? {bottom: 0} : {top: 0}), x.append(w))
428                    } else {
429                        T.isfixed = "fixed" == T.win.css("position");
430                        var S = T.isfixed ? "fixed" : "absolute";
431                        T.isfixed || (T.viewport = T.getViewport(T.win[0])), T.viewport && (T.body = T.viewport, /fixed|absolute/.test(T.viewport.css("position")) || T.css(T.viewport, {position: "relative"})), u.css({position: S}), T.zoom && T.zoom.css({position: S}), T.updateScrollBar(), T.body.append(u), T.zoom && T.body.append(T.zoom), T.railh && (w.css({position: S}), T.body.append(w))
432                    }
433                    P.isios && T.css(T.win, {
434                        "-webkit-tap-highlight-color": "rgba(0,0,0,0)",
435                        "-webkit-touch-callout": "none"
436                    }), M.disableoutline && (P.isie && T.win.attr("hideFocus", "true"), P.iswebkit && T.win.css("outline", "none"))
437                }
438                if (!1 === M.autohidemode ? (T.autohidedom = !1, T.rail.css({opacity: M.cursoropacitymax}), T.railh && T.railh.css({opacity: M.cursoropacitymax})) : !0 === M.autohidemode || "leave" === M.autohidemode ? (T.autohidedom = n().add(T.rail), P.isie8 && (T.autohidedom = T.autohidedom.add(T.cursor)), T.railh && (T.autohidedom = T.autohidedom.add(T.railh)), T.railh && P.isie8 && (T.autohidedom = T.autohidedom.add(T.cursorh))) : "scroll" == M.autohidemode ? (T.autohidedom = n().add(T.rail), T.railh && (T.autohidedom = T.autohidedom.add(T.railh))) : "cursor" == M.autohidemode ? (T.autohidedom = n().add(T.cursor), T.railh && (T.autohidedom = T.autohidedom.add(T.cursorh))) : "hidden" == M.autohidemode && (T.autohidedom = !1, T.hide(), T.railslocked = !1), P.cantouch || T.istouchcapable || M.emulatetouch || P.hasmstouch) {
439                    T.scrollmom = new y(T);
440                    T.ontouchstart = function (e) {
441                        if (T.locked) return !1;
442                        if (e.pointerType && ("mouse" === e.pointerType || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return !1;
443                        if (T.hasmoving = !1, T.scrollmom.timer && (T.triggerScrollEnd(), T.scrollmom.stop()), !T.railslocked) {
444                            var o = T.getTarget(e);
445                            if (o && /INPUT/i.test(o.nodeName) && /range/i.test(o.type)) return T.stopPropagation(e);
446                            var t = "mousedown" === e.type;
447                            if (!("clientX" in e) && "changedTouches" in e && (e.clientX = e.changedTouches[0].clientX, e.clientY = e.changedTouches[0].clientY), T.forcescreen) {
448                                var r = e;
449                                (e = {original: e.original ? e.original : e}).clientX = r.screenX, e.clientY = r.screenY
450                            }
451                            if (T.rail.drag = {
452                                x: e.clientX,
453                                y: e.clientY,
454                                sx: T.scroll.x,
455                                sy: T.scroll.y,
456                                st: T.getScrollTop(),
457                                sl: T.getScrollLeft(),
458                                pt: 2,
459                                dl: !1,
460                                tg: o
461                            }, T.ispage || !M.directionlockdeadzone) T.rail.drag.dl = "f"; else {
462                                var i = {w: c.width(), h: c.height()}, s = T.getContentSize(), l = s.h - i.h,
463                                    a = s.w - i.w;
464                                T.rail.scrollable && !T.railh.scrollable ? T.rail.drag.ck = l > 0 && "v" : !T.rail.scrollable && T.railh.scrollable ? T.rail.drag.ck = a > 0 && "h" : T.rail.drag.ck = !1
465                            }
466                            if (M.emulatetouch && T.isiframe && P.isie) {
467                                var d = T.win.position();
468                                T.rail.drag.x += d.left, T.rail.drag.y += d.top
469                            }
470                            if (T.hasmoving = !1, T.lastmouseup = !1, T.scrollmom.reset(e.clientX, e.clientY), o && t) {
471                                if (!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName)) return P.hasmousecapture && o.setCapture(), M.emulatetouch ? (o.onclick && !o._onclick && (o._onclick = o.onclick, o.onclick = function (e) {
472                                    if (T.hasmoving) return !1;
473                                    o._onclick.call(this, e)
474                                }), T.cancelEvent(e)) : T.stopPropagation(e);
475                                /SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type")) && (T.preventclick = {tg: o, click: !1})
476                            }
477                        }
478                    }, T.ontouchend = function (e) {
479                        if (!T.rail.drag) return !0;
480                        if (2 == T.rail.drag.pt) {
481                            if (e.pointerType && ("mouse" === e.pointerType || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return !1;
482                            T.rail.drag = !1;
483                            var o = "mouseup" === e.type;
484                            if (T.hasmoving && (T.scrollmom.doMomentum(), T.lastmouseup = !0, T.hideCursor(), P.hasmousecapture && l.releaseCapture(), o)) return T.cancelEvent(e)
485                        } else if (1 == T.rail.drag.pt) return T.onmouseup(e)
486                    };
487                    var z = M.emulatetouch && T.isiframe && !P.hasmousecapture, k = .3 * M.directionlockdeadzone | 0;
488                    T.ontouchmove = function (e, o) {
489                        if (!T.rail.drag) return !0;
490                        if (e.targetTouches && M.preventmultitouchscrolling && e.targetTouches.length > 1) return !0;
491                        if (e.pointerType && ("mouse" === e.pointerType || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return !0;
492                        if (2 == T.rail.drag.pt) {
493                            "changedTouches" in e && (e.clientX = e.changedTouches[0].clientX, e.clientY = e.changedTouches[0].clientY);
494                            var t, r;
495                            if (r = t = 0, z && !o) {
496                                var i = T.win.position();
497                                r = -i.left, t = -i.top
498                            }
499                            var s = e.clientY + t, n = s - T.rail.drag.y, a = e.clientX + r, c = a - T.rail.drag.x,
500                                d = T.rail.drag.st - n;
501                            if (T.ishwscroll && M.bouncescroll) d < 0 ? d = Math.round(d / 2) : d > T.page.maxh && (d = T.page.maxh + Math.round((d - T.page.maxh) / 2)); else if (d < 0 ? (d = 0, s = 0) : d > T.page.maxh && (d = T.page.maxh, s = 0), 0 === s && !T.hasmoving) return T.ispage || (T.rail.drag = !1), !0;
502                            var u = T.getScrollLeft();
503                            if (T.railh && T.railh.scrollable && (u = T.isrtlmode ? c - T.rail.drag.sl : T.rail.drag.sl - c, T.ishwscroll && M.bouncescroll ? u < 0 ? u = Math.round(u / 2) : u > T.page.maxw && (u = T.page.maxw + Math.round((u - T.page.maxw) / 2)) : (u < 0 && (u = 0, a = 0), u > T.page.maxw && (u = T.page.maxw, a = 0))), !T.hasmoving) {
504                                if (T.rail.drag.y === e.clientY && T.rail.drag.x === e.clientX) return T.cancelEvent(e);
505                                var h = Math.abs(n), p = Math.abs(c), m = M.directionlockdeadzone;
506                                if (T.rail.drag.ck ? "v" == T.rail.drag.ck ? p > m && h <= k ? T.rail.drag = !1 : h > m && (T.rail.drag.dl = "v") : "h" == T.rail.drag.ck && (h > m && p <= k ? T.rail.drag = !1 : p > m && (T.rail.drag.dl = "h")) : h > m && p > m ? T.rail.drag.dl = "f" : h > m ? T.rail.drag.dl = p > k ? "f" : "v" : p > m && (T.rail.drag.dl = h > k ? "f" : "h"), !T.rail.drag.dl) return T.cancelEvent(e);
507                                T.triggerScrollStart(e.clientX, e.clientY, 0, 0, 0), T.hasmoving = !0
508                            }
509                            return T.preventclick && !T.preventclick.click && (T.preventclick.click = T.preventclick.tg.onclick || !1, T.preventclick.tg.onclick = T.onpreventclick), T.rail.drag.dl && ("v" == T.rail.drag.dl ? u = T.rail.drag.sl : "h" == T.rail.drag.dl && (d = T.rail.drag.st)), T.synched("touchmove", function () {
510                                T.rail.drag && 2 == T.rail.drag.pt && (T.prepareTransition && T.resetTransition(), T.rail.scrollable && T.setScrollTop(d), T.scrollmom.update(a, s), T.railh && T.railh.scrollable ? (T.setScrollLeft(u), T.showCursor(d, u)) : T.showCursor(d), P.isie10 && l.selection.clear())
511                            }), T.cancelEvent(e)
512                        }
513                        return 1 == T.rail.drag.pt ? T.onmousemove(e) : void 0
514                    }, T.ontouchstartCursor = function (e, o) {
515                        if (!T.rail.drag || 3 == T.rail.drag.pt) {
516                            if (T.locked) return T.cancelEvent(e);
517                            T.cancelScroll(), T.rail.drag = {
518                                x: e.touches[0].clientX,
519                                y: e.touches[0].clientY,
520                                sx: T.scroll.x,
521                                sy: T.scroll.y,
522                                pt: 3,
523                                hr: !!o
524                            };
525                            var t = T.getTarget(e);
526                            return !T.ispage && P.hasmousecapture && t.setCapture(), T.isiframe && !P.hasmousecapture && (T.saved.csspointerevents = T.doc.css("pointer-events"), T.css(T.doc, {"pointer-events": "none"})), T.cancelEvent(e)
527                        }
528                    }, T.ontouchendCursor = function (e) {
529                        if (T.rail.drag) {
530                            if (P.hasmousecapture && l.releaseCapture(), T.isiframe && !P.hasmousecapture && T.doc.css("pointer-events", T.saved.csspointerevents), 3 != T.rail.drag.pt) return;
531                            return T.rail.drag = !1, T.cancelEvent(e)
532                        }
533                    }, T.ontouchmoveCursor = function (e) {
534                        if (T.rail.drag) {
535                            if (3 != T.rail.drag.pt) return;
536                            if (T.cursorfreezed = !0, T.rail.drag.hr) {
537                                T.scroll.x = T.rail.drag.sx + (e.touches[0].clientX - T.rail.drag.x), T.scroll.x < 0 && (T.scroll.x = 0);
538                                var o = T.scrollvaluemaxw;
539                                T.scroll.x > o && (T.scroll.x = o)
540                            } else {
541                                T.scroll.y = T.rail.drag.sy + (e.touches[0].clientY - T.rail.drag.y), T.scroll.y < 0 && (T.scroll.y = 0);
542                                var t = T.scrollvaluemax;
543                                T.scroll.y > t && (T.scroll.y = t)
544                            }
545                            return T.synched("touchmove", function () {
546                                T.rail.drag && 3 == T.rail.drag.pt && (T.showCursor(), T.rail.drag.hr ? T.doScrollLeft(Math.round(T.scroll.x * T.scrollratio.x), M.cursordragspeed) : T.doScrollTop(Math.round(T.scroll.y * T.scrollratio.y), M.cursordragspeed))
547                            }), T.cancelEvent(e)
548                        }
549                    }
550                }
551                if (T.onmousedown = function (e, o) {
552                    if (!T.rail.drag || 1 == T.rail.drag.pt) {
553                        if (T.railslocked) return T.cancelEvent(e);
554                        T.cancelScroll(), T.rail.drag = {
555                            x: e.clientX,
556                            y: e.clientY,
557                            sx: T.scroll.x,
558                            sy: T.scroll.y,
559                            pt: 1,
560                            hr: o || !1
561                        };
562                        var t = T.getTarget(e);
563                        return P.hasmousecapture && t.setCapture(), T.isiframe && !P.hasmousecapture && (T.saved.csspointerevents = T.doc.css("pointer-events"), T.css(T.doc, {"pointer-events": "none"})), T.hasmoving = !1, T.cancelEvent(e)
564                    }
565                }, T.onmouseup = function (e) {
566                    if (T.rail.drag) return 1 != T.rail.drag.pt || (P.hasmousecapture && l.releaseCapture(), T.isiframe && !P.hasmousecapture && T.doc.css("pointer-events", T.saved.csspointerevents), T.rail.drag = !1, T.cursorfreezed = !1, T.hasmoving && T.triggerScrollEnd(), T.cancelEvent(e))
567                }, T.onmousemove = function (e) {
568                    if (T.rail.drag) {
569                        if (1 !== T.rail.drag.pt) return;
570                        if (P.ischrome && 0 === e.which) return T.onmouseup(e);
571                        if (T.cursorfreezed = !0, T.hasmoving || T.triggerScrollStart(e.clientX, e.clientY, 0, 0, 0), T.hasmoving = !0, T.rail.drag.hr) {
572                            T.scroll.x = T.rail.drag.sx + (e.clientX - T.rail.drag.x), T.scroll.x < 0 && (T.scroll.x = 0);
573                            var o = T.scrollvaluemaxw;
574                            T.scroll.x > o && (T.scroll.x = o)
575                        } else {
576                            T.scroll.y = T.rail.drag.sy + (e.clientY - T.rail.drag.y), T.scroll.y < 0 && (T.scroll.y = 0);
577                            var t = T.scrollvaluemax;
578                            T.scroll.y > t && (T.scroll.y = t)
579                        }
580                        return T.synched("mousemove", function () {
581                            T.cursorfreezed && (T.showCursor(), T.rail.drag.hr ? T.scrollLeft(Math.round(T.scroll.x * T.scrollratio.x)) : T.scrollTop(Math.round(T.scroll.y * T.scrollratio.y)))
582                        }), T.cancelEvent(e)
583                    }
584                    T.checkarea = 0
585                }, P.cantouch || M.emulatetouch) T.onpreventclick = function (e) {
586                    if (T.preventclick) return T.preventclick.tg.onclick = T.preventclick.click, T.preventclick = !1, T.cancelEvent(e)
587                }, T.onclick = !P.isios && function (e) {
588                    return !T.lastmouseup || (T.lastmouseup = !1, T.cancelEvent(e))
589                }, M.grabcursorenabled && P.cursorgrabvalue && (T.css(T.ispage ? T.doc : T.win, {cursor: P.cursorgrabvalue}), T.css(T.rail, {cursor: P.cursorgrabvalue})); else {
590                    var L = function (e) {
591                        if (T.selectiondrag) {
592                            if (e) {
593                                var o = T.win.outerHeight(), t = e.pageY - T.selectiondrag.top;
594                                t > 0 && t < o && (t = 0), t >= o && (t -= o), T.selectiondrag.df = t
595                            }
596                            if (0 !== T.selectiondrag.df) {
597                                var r = -2 * T.selectiondrag.df / 6 | 0;
598                                T.doScrollBy(r), T.debounced("doselectionscroll", function () {
599                                    L()
600                                }, 50)
601                            }
602                        }
603                    };
604                    T.hasTextSelected = "getSelection" in l ? function () {
605                        return l.getSelection().rangeCount > 0
606                    } : "selection" in l ? function () {
607                        return "None" != l.selection.type
608                    } : function () {
609                        return !1
610                    }, T.onselectionstart = function (e) {
611                        T.ispage || (T.selectiondrag = T.win.offset())
612                    }, T.onselectionend = function (e) {
613                        T.selectiondrag = !1
614                    }, T.onselectiondrag = function (e) {
615                        T.selectiondrag && T.hasTextSelected() && T.debounced("selectionscroll", function () {
616                            L(e)
617                        }, 250)
618                    }
619                }
620                if (P.hasw3ctouch ? (T.css(T.ispage ? n("html") : T.win, {"touch-action": "none"}), T.css(T.rail, {"touch-action": "none"}), T.css(T.cursor, {"touch-action": "none"}), T.bind(T.win, "pointerdown", T.ontouchstart), T.bind(l, "pointerup", T.ontouchend), T.delegate(l, "pointermove", T.ontouchmove)) : P.hasmstouch ? (T.css(T.ispage ? n("html") : T.win, {"-ms-touch-action": "none"}), T.css(T.rail, {"-ms-touch-action": "none"}), T.css(T.cursor, {"-ms-touch-action": "none"}), T.bind(T.win, "MSPointerDown", T.ontouchstart), T.bind(l, "MSPointerUp", T.ontouchend), T.delegate(l, "MSPointerMove", T.ontouchmove), T.bind(T.cursor, "MSGestureHold", function (e) {
621                    e.preventDefault()
622                }), T.bind(T.cursor, "contextmenu", function (e) {
623                    e.preventDefault()
624                })) : P.cantouch && (T.bind(T.win, "touchstart", T.ontouchstart, !1, !0), T.bind(l, "touchend", T.ontouchend, !1, !0), T.bind(l, "touchcancel", T.ontouchend, !1, !0), T.delegate(l, "touchmove", T.ontouchmove, !1, !0)), M.emulatetouch && (T.bind(T.win, "mousedown", T.ontouchstart, !1, !0), T.bind(l, "mouseup", T.ontouchend, !1, !0), T.bind(l, "mousemove", T.ontouchmove, !1, !0)), (M.cursordragontouch || !P.cantouch && !M.emulatetouch) && (T.rail.css({cursor: "default"}), T.railh && T.railh.css({cursor: "default"}), T.jqbind(T.rail, "mouseenter", function () {
625                    if (!T.ispage && !T.win.is(":visible")) return !1;
626                    T.canshowonmouseevent && T.showCursor(), T.rail.active = !0
627                }), T.jqbind(T.rail, "mouseleave", function () {
628                    T.rail.active = !1, T.rail.drag || T.hideCursor()
629                }), M.sensitiverail && (T.bind(T.rail, "click", function (e) {
630                    T.doRailClick(e, !1, !1)
631                }), T.bind(T.rail, "dblclick", function (e) {
632                    T.doRailClick(e, !0, !1)
633                }), T.bind(T.cursor, "click", function (e) {
634                    T.cancelEvent(e)
635                }), T.bind(T.cursor, "dblclick", function (e) {
636                    T.cancelEvent(e)
637                })), T.railh && (T.jqbind(T.railh, "mouseenter", function () {
638                    if (!T.ispage && !T.win.is(":visible")) return !1;
639                    T.canshowonmouseevent && T.showCursor(), T.rail.active = !0
640                }), T.jqbind(T.railh, "mouseleave", function () {
641                    T.rail.active = !1, T.rail.drag || T.hideCursor()
642                }), M.sensitiverail && (T.bind(T.railh, "click", function (e) {
643                    T.doRailClick(e, !1, !0)
644                }), T.bind(T.railh, "dblclick", function (e) {
645                    T.doRailClick(e, !0, !0)
646                }), T.bind(T.cursorh, "click", function (e) {
647                    T.cancelEvent(e)
648                }), T.bind(T.cursorh, "dblclick", function (e) {
649                    T.cancelEvent(e)
650                })))), M.cursordragontouch && (this.istouchcapable || P.cantouch) && (T.bind(T.cursor, "touchstart", T.ontouchstartCursor), T.bind(T.cursor, "touchmove", T.ontouchmoveCursor), T.bind(T.cursor, "touchend", T.ontouchendCursor), T.cursorh && T.bind(T.cursorh, "touchstart", function (e) {
651                    T.ontouchstartCursor(e, !0)
652                }), T.cursorh && T.bind(T.cursorh, "touchmove", T.ontouchmoveCursor), T.cursorh && T.bind(T.cursorh, "touchend", T.ontouchendCursor)), M.emulatetouch || P.isandroid || P.isios ? (T.bind(P.hasmousecapture ? T.win : l, "mouseup", T.ontouchend), T.onclick && T.bind(l, "click", T.onclick), M.cursordragontouch ? (T.bind(T.cursor, "mousedown", T.onmousedown), T.bind(T.cursor, "mouseup", T.onmouseup), T.cursorh && T.bind(T.cursorh, "mousedown", function (e) {
653                    T.onmousedown(e, !0)
654                }), T.cursorh && T.bind(T.cursorh, "mouseup", T.onmouseup)) : (T.bind(T.rail, "mousedown", function (e) {
655                    e.preventDefault()
656                }), T.railh && T.bind(T.railh, "mousedown", function (e) {
657                    e.preventDefault()
658                }))) : (T.bind(P.hasmousecapture ? T.win : l, "mouseup", T.onmouseup), T.bind(l, "mousemove", T.onmousemove), T.onclick && T.bind(l, "click", T.onclick), T.bind(T.cursor, "mousedown", T.onmousedown), T.bind(T.cursor, "mouseup", T.onmouseup), T.railh && (T.bind(T.cursorh, "mousedown", function (e) {
659                    T.onmousedown(e, !0)
660                }), T.bind(T.cursorh, "mouseup", T.onmouseup)), !T.ispage && M.enablescrollonselection && (T.bind(T.win[0], "mousedown", T.onselectionstart), T.bind(l, "mouseup", T.onselectionend), T.bind(T.cursor, "mouseup", T.onselectionend), T.cursorh && T.bind(T.cursorh, "mouseup", T.onselectionend), T.bind(l, "mousemove", T.onselectiondrag)), T.zoom && (T.jqbind(T.zoom, "mouseenter", function () {
661                    T.canshowonmouseevent && T.showCursor(), T.rail.active = !0
662                }), T.jqbind(T.zoom, "mouseleave", function () {
663                    T.rail.active = !1, T.rail.drag || T.hideCursor()
664                }))), M.enablemousewheel && (T.isiframe || T.mousewheel(P.isie && T.ispage ? l : T.win, T.onmousewheel), T.mousewheel(T.rail, T.onmousewheel), T.railh && T.mousewheel(T.railh, T.onmousewheelhr)), T.ispage || P.cantouch || /HTML|^BODY/.test(T.win[0].nodeName) || (T.win.attr("tabindex") || T.win.attr({tabindex: ++r}), T.bind(T.win, "focus", function (e) {
665                    o = T.getTarget(e).id || T.getTarget(e) || !1, T.hasfocus = !0, T.canshowonmouseevent && T.noticeCursor()
666                }), T.bind(T.win, "blur", function (e) {
667                    o = !1, T.hasfocus = !1
668                }), T.bind(T.win, "mouseenter", function (e) {
669                    t = T.getTarget(e).id || T.getTarget(e) || !1, T.hasmousefocus = !0, T.canshowonmouseevent && T.noticeCursor()
670                }), T.bind(T.win, "mouseleave", function (e) {
671                    t = !1, T.hasmousefocus = !1, T.rail.drag || T.hideCursor()
672                })), T.onkeypress = function (e) {
673                    if (T.railslocked && 0 === T.page.maxh) return !0;
674                    e = e || a.event;
675                    var r = T.getTarget(e);
676                    if (r && /INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName) && (!(r.getAttribute("type") || r.type || !1) || !/submit|button|cancel/i.tp)) return !0;
677                    if (n(r).attr("contenteditable")) return !0;
678                    if (T.hasfocus || T.hasmousefocus && !o || T.ispage && !o && !t) {
679                        var i = e.keyCode;
680                        if (T.railslocked && 27 != i) return T.cancelEvent(e);
681                        var s = e.ctrlKey || !1, l = e.shiftKey || !1, c = !1;
682                        switch (i) {
683                            case 38:
684                            case 63233:
685                                T.doScrollBy(72), c = !0;
686                                break;
687                            case 40:
688                            case 63235:
689                                T.doScrollBy(-72), c = !0;
690                                break;
691                            case 37:
692                            case 63232:
693                                T.railh && (s ? T.doScrollLeft(0) : T.doScrollLeftBy(72), c = !0);
694                                break;
695                            case 39:
696                            case 63234:
697                                T.railh && (s ? T.doScrollLeft(T.page.maxw) : T.doScrollLeftBy(-72), c = !0);
698                                break;
699                            case 33:
700                            case 63276:
701                                T.doScrollBy(T.view.h), c = !0;
702                                break;
703                            case 34:
704                            case 63277:
705                                T.doScrollBy(-T.view.h), c = !0;
706                                break;
707                            case 36:
708                            case 63273:
709                                T.railh && s ? T.doScrollPos(0, 0) : T.doScrollTo(0), c = !0;
710                                break;
711                            case 35:
712                            case 63275:
713                                T.railh && s ? T.doScrollPos(T.page.maxw, T.page.maxh) : T.doScrollTo(T.page.maxh), c = !0;
714                                break;
715                            case 32:
716                                M.spacebarenabled && (l ? T.doScrollBy(T.view.h) : T.doScrollBy(-T.view.h), c = !0);
717                                break;
718                            case 27:
719                                T.zoomactive && (T.doZoom(), c = !0)
720                        }
721                        if (c) return T.cancelEvent(e)
722                    }
723                }, M.enablekeyboard && T.bind(l, P.isopera && !P.isopera12 ? "keypress" : "keydown", T.onkeypress), T.bind(l, "keydown", function (e) {
724                    (e.ctrlKey || !1) && (T.wheelprevented = !0)
725                }), T.bind(l, "keyup", function (e) {
726                    e.ctrlKey || !1 || (T.wheelprevented = !1)
727                }), T.bind(a, "blur", function (e) {
728                    T.wheelprevented = !1
729                }), T.bind(a, "resize", T.onscreenresize), T.bind(a, "orientationchange", T.onscreenresize), T.bind(a, "load", T.lazyResize), P.ischrome && !T.ispage && !T.haswrapper) {
730                    var C = T.win.attr("style"), N = parseFloat(T.win.css("width")) + 1;
731                    T.win.css("width", N), T.synched("chromefix", function () {
732                        T.win.attr("style", C)
733                    })
734                }
735                if (T.onAttributeChange = function (e) {
736                    T.lazyResize(T.isieold ? 250 : 30)
737                }, M.enableobserver && (T.isie11 || !1 === m || (T.observerbody = new m(function (e) {
738                    if (e.forEach(function (e) {
739                        if ("attributes" == e.type) return E.hasClass("modal-open") && E.hasClass("modal-dialog") && !n.contains(n(".modal-dialog")[0], T.doc[0]) ? T.hide() : T.show()
740                    }), T.me.clientWidth != T.page.width || T.me.clientHeight != T.page.height) return T.lazyResize(30)
741                }), T.observerbody.observe(l.body, {
742                    childList: !0,
743                    subtree: !0,
744                    characterData: !1,
745                    attributes: !0,
746                    attributeFilter: ["class"]
747                })), !T.ispage && !T.haswrapper)) {
748                    var R = T.win[0];
749                    !1 !== m ? (T.observer = new m(function (e) {
750                        e.forEach(T.onAttributeChange)
751                    }), T.observer.observe(R, {
752                        childList: !0,
753                        characterData: !1,
754                        attributes: !0,
755                        subtree: !1
756                    }), T.observerremover = new m(function (e) {
757                        e.forEach(function (e) {
758                            if (e.removedNodes.length > 0) for (var o in e.removedNodes) if (T && e.removedNodes[o] === R) return T.remove()
759                        })
760                    }), T.observerremover.observe(R.parentNode, {
761                        childList: !0,
762                        characterData: !1,
763                        attributes: !1,
764                        subtree: !1
765                    })) : (T.bind(R, P.isie && !P.isie9 ? "propertychange" : "DOMAttrModified", T.onAttributeChange), P.isie9 && R.attachEvent("onpropertychange", T.onAttributeChange), T.bind(R, "DOMNodeRemoved", function (e) {
766                        e.target === R && T.remove()
767                    }))
768                }
769                !T.ispage && M.boxzoom && T.bind(a, "resize", T.resizeZoom), T.istextarea && (T.bind(T.win, "keydown", T.lazyResize), T.bind(T.win, "mouseup", T.lazyResize)), T.lazyResize(30)
770            }
771            if ("IFRAME" == this.doc[0].nodeName) {
772                var _ = function () {
773                    T.iframexd = !1;
774                    var o;
775                    try {
776                        (o = "contentDocument" in this ? this.contentDocument : this.contentWindow._doc).domain
777                    } catch (e) {
778                        T.iframexd = !0, o = !1
779                    }
780                    if (T.iframexd) return "console" in a && console.log("NiceScroll error: policy restriced iframe"), !0;
781                    if (T.forcescreen = !0, T.isiframe && (T.iframe = {
782                        doc: n(o),
783                        html: T.doc.contents().find("html")[0],
784                        body: T.doc.contents().find("body")[0]
785                    }, T.getContentSize = function () {
786                        return {
787                            w: Math.max(T.iframe.html.scrollWidth, T.iframe.body.scrollWidth),
788                            h: Math.max(T.iframe.html.scrollHeight, T.iframe.body.scrollHeight)
789                        }
790                    }, T.docscroll = n(T.iframe.body)), !P.isios && M.iframeautoresize && !T.isiframe) {
791                        T.win.scrollTop(0), T.doc.height("");
792                        var t = Math.max(o.getElementsByTagName("html")[0].scrollHeight, o.body.scrollHeight);
793                        T.doc.height(t)
794                    }
795                    T.lazyResize(30), T.css(n(T.iframe.body), e), P.isios && T.haswrapper && T.css(n(o.body), {"-webkit-transform": "translate3d(0,0,0)"}), "contentWindow" in this ? T.bind(this.contentWindow, "scroll", T.onscroll) : T.bind(o, "scroll", T.onscroll), M.enablemousewheel && T.mousewheel(o, T.onmousewheel), M.enablekeyboard && T.bind(o, P.isopera ? "keypress" : "keydown", T.onkeypress), P.cantouch ? (T.bind(o, "touchstart", T.ontouchstart), T.bind(o, "touchmove", T.ontouchmove)) : M.emulatetouch && (T.bind(o, "mousedown", T.ontouchstart), T.bind(o, "mousemove", function (e) {
796                        return T.ontouchmove(e, !0)
797                    }), M.grabcursorenabled && P.cursorgrabvalue && T.css(n(o.body), {cursor: P.cursorgrabvalue})), T.bind(o, "mouseup", T.ontouchend), T.zoom && (M.dblclickzoom && T.bind(o, "dblclick", T.doZoom), T.ongesturezoom && T.bind(o, "gestureend", T.ongesturezoom))
798                };
799                this.doc[0].readyState && "complete" === this.doc[0].readyState && setTimeout(function () {
800                    _.call(T.doc[0], !1)
801                }, 500), T.bind(this.doc, "load", _)
802            }
803        }, this.showCursor = function (e, o) {
804            if (T.cursortimeout && (clearTimeout(T.cursortimeout), T.cursortimeout = 0), T.rail) {
805                if (T.autohidedom && (T.autohidedom.stop().css({opacity: M.cursoropacitymax}), T.cursoractive = !0), T.rail.drag && 1 == T.rail.drag.pt || (void 0 !== e && !1 !== e && (T.scroll.y = e / T.scrollratio.y | 0), void 0 !== o && (T.scroll.x = o / T.scrollratio.x | 0)), T.cursor.css({
806                    height: T.cursorheight,
807                    top: T.scroll.y
808                }), T.cursorh) {
809                    var t = T.hasreversehr ? T.scrollvaluemaxw - T.scroll.x : T.scroll.x;
810                    T.cursorh.css({
811                        width: T.cursorwidth,
812                        left: !T.rail.align && T.rail.visibility ? t + T.rail.width : t
813                    }), T.cursoractive = !0
814                }
815                T.zoom && T.zoom.stop().css({opacity: M.cursoropacitymax})
816            }
817        }, this.hideCursor = function (e) {
818            T.cursortimeout || T.rail && T.autohidedom && (T.hasmousefocus && "leave" === M.autohidemode || (T.cursortimeout = setTimeout(function () {
819                T.rail.active && T.showonmouseevent || (T.autohidedom.stop().animate({opacity: M.cursoropacitymin}), T.zoom && T.zoom.stop().animate({opacity: M.cursoropacitymin}), T.cursoractive = !1), T.cursortimeout = 0
820            }, e || M.hidecursordelay)))
821        }, this.noticeCursor = function (e, o, t) {
822            T.showCursor(o, t), T.rail.active || T.hideCursor(e)
823        }, this.getContentSize = T.ispage ? function () {
824            return {
825                w: Math.max(l.body.scrollWidth, l.documentElement.scrollWidth),
826                h: Math.max(l.body.scrollHeight, l.documentElement.scrollHeight)
827            }
828        } : T.haswrapper ? function () {
829            return {w: T.doc[0].offsetWidth, h: T.doc[0].offsetHeight}
830        } : function () {
831            return {w: T.docscroll[0].scrollWidth, h: T.docscroll[0].scrollHeight}
832        }, this.onResize = function (e, o) {
833            if (!T || !T.win) return !1;
834            var t = T.page.maxh, r = T.page.maxw, i = T.view.h, s = T.view.w;
835            if (T.view = {
836                w: T.ispage ? T.win.width() : T.win[0].clientWidth,
837                h: T.ispage ? T.win.height() : T.win[0].clientHeight
838            }, T.page = o || T.getContentSize(), T.page.maxh = Math.max(0, T.page.h - T.view.h), T.page.maxw = Math.max(0, T.page.w - T.view.w), T.page.maxh == t && T.page.maxw == r && T.view.w == s && T.view.h == i) {
839                if (T.ispage) return T;
840                var n = T.win.offset();
841                if (T.lastposition) {
842                    var l = T.lastposition;
843                    if (l.top == n.top && l.left == n.left) return T
844                }
845                T.lastposition = n
846            }
847            return 0 === T.page.maxh ? (T.hideRail(), T.scrollvaluemax = 0, T.scroll.y = 0, T.scrollratio.y = 0, T.cursorheight = 0, T.setScrollTop(0), T.rail && (T.rail.scrollable = !1)) : (T.page.maxh -= M.railpadding.top + M.railpadding.bottom, T.rail.scrollable = !0), 0 === T.page.maxw ? (T.hideRailHr(), T.scrollvaluemaxw = 0, T.scroll.x = 0, T.scrollratio.x = 0, T.cursorwidth = 0, T.setScrollLeft(0), T.railh && (T.railh.scrollable = !1)) : (T.page.maxw -= M.railpadding.left + M.railpadding.right, T.railh && (T.railh.scrollable = M.horizrailenabled)), T.railslocked = T.locked || 0 === T.page.maxh && 0 === T.page.maxw, T.railslocked ? (T.ispage || T.updateScrollBar(T.view), !1) : (T.hidden || (T.rail.visibility || T.showRail(), T.railh && !T.railh.visibility && T.showRailHr()), T.istextarea && T.win.css("resize") && "none" != T.win.css("resize") && (T.view.h -= 20), T.cursorheight = Math.min(T.view.h, Math.round(T.view.h * (T.view.h / T.page.h))), T.cursorheight = M.cursorfixedheight ? M.cursorfixedheight : Math.max(M.cursorminheight, T.cursorheight), T.cursorwidth = Math.min(T.view.w, Math.round(T.view.w * (T.view.w / T.page.w))), T.cursorwidth = M.cursorfixedheight ? M.cursorfixedheight : Math.max(M.cursorminheight, T.cursorwidth), T.scrollvaluemax = T.view.h - T.cursorheight - (M.railpadding.top + M.railpadding.bottom), T.hasborderbox || (T.scrollvaluemax -= T.cursor[0].offsetHeight - T.cursor[0].clientHeight), T.railh && (T.railh.width = T.page.maxh > 0 ? T.view.w - T.rail.width : T.view.w, T.scrollvaluemaxw = T.railh.width - T.cursorwidth - (M.railpadding.left + M.railpadding.right)), T.ispage || T.updateScrollBar(T.view), T.scrollratio = {
848                x: T.page.maxw / T.scrollvaluemaxw,
849                y: T.page.maxh / T.scrollvaluemax
850            }, T.getScrollTop() > T.page.maxh ? T.doScrollTop(T.page.maxh) : (T.scroll.y = T.getScrollTop() / T.scrollratio.y | 0, T.scroll.x = T.getScrollLeft() / T.scrollratio.x | 0, T.cursoractive && T.noticeCursor()), T.scroll.y && 0 === T.getScrollTop() && T.doScrollTo(T.scroll.y * T.scrollratio.y | 0), T)
851        }, this.resize = T.onResize;
852        var O = 0;
853        this.onscreenresize = function (e) {
854            clearTimeout(O);
855            var o = !T.ispage && !T.haswrapper;
856            o && T.hideRails(), O = setTimeout(function () {
857                T && (o && T.showRails(), T.resize()), O = 0
858            }, 120)
859        }, this.lazyResize = function (e) {
860            return clearTimeout(O), e = isNaN(e) ? 240 : e, O = setTimeout(function () {
861                T && T.resize(), O = 0
862            }, e), T
863        }, this.jqbind = function (e, o, t) {
864            T.events.push({e: e, n: o, f: t, q: !0}), n(e).on(o, t)
865        }, this.mousewheel = function (e, o, t) {
866            var r = "jquery" in e ? e[0] : e;
867            if ("onwheel" in l.createElement("div")) T._bind(r, "wheel", o, t || !1); else {
868                var i = void 0 !== l.onmousewheel ? "mousewheel" : "DOMMouseScroll";
869                S(r, i, o, t || !1), "DOMMouseScroll" == i && S(r, "MozMousePixelScroll", o, t || !1)
870            }
871        };
872        var Y = !1;
873        if (P.haseventlistener) {
874            try {
875                var H = Object.defineProperty({}, "passive", {
876                    get: function () {
877                        Y = !0
878                    }
879                });
880                a.addEventListener("test", null, H)
881            } catch (e) {
882            }
883            this.stopPropagation = function (e) {
884                return !!e && ((e = e.original ? e.original : e).stopPropagation(), !1)
885            }, this.cancelEvent = function (e) {
886                return e.cancelable && e.preventDefault(), e.stopImmediatePropagation(), e.preventManipulation && e.preventManipulation(), !1
887            }
888        } else Event.prototype.preventDefault = function () {
889            this.returnValue = !1
890        }, Event.prototype.stopPropagation = function () {
891            this.cancelBubble = !0
892        }, a.constructor.prototype.addEventListener = l.constructor.prototype.addEventListener = Element.prototype.addEventListener = function (e, o, t) {
893            this.attachEvent("on" + e, o)
894        }, a.constructor.prototype.removeEventListener = l.constructor.prototype.removeEventListener = Element.prototype.removeEventListener = function (e, o, t) {
895            this.detachEvent("on" + e, o)
896        }, this.cancelEvent = function (e) {
897            return (e = e || a.event) && (e.cancelBubble = !0, e.cancel = !0, e.returnValue = !1), !1
898        }, this.stopPropagation = function (e) {
899            return (e = e || a.event) && (e.cancelBubble = !0), !1
900        };
901        this.delegate = function (e, o, t, r, i) {
902            var s = d[o] || !1;
903            s || (s = {
904                a: [], l: [], f: function (e) {
905                    for (var o = s.l, t = !1, r = o.length - 1; r >= 0; r--) if (!1 === (t = o[r].call(e.target, e))) return !1;
906                    return t
907                }
908            }, T.bind(e, o, s.f, r, i), d[o] = s), T.ispage ? (s.a = [T.id].concat(s.a), s.l = [t].concat(s.l)) : (s.a.push(T.id), s.l.push(t))
909        }, this.undelegate = function (e, o, t, r, i) {
910            var s = d[o] || !1;
911            if (s && s.l) for (var n = 0, l = s.l.length; n < l; n++) s.a[n] === T.id && (s.a.splice(n), s.l.splice(n), 0 === s.a.length && (T._unbind(e, o, s.l.f), d[o] = null))
912        }, this.bind = function (e, o, t, r, i) {
913            var s = "jquery" in e ? e[0] : e;
914            T._bind(s, o, t, r || !1, i || !1)
915        }, this._bind = function (e, o, t, r, i) {
916            T.events.push({e: e, n: o, f: t, b: r, q: !1}), Y && i ? e.addEventListener(o, t, {
917                passive: !1,
918                capture: r
919            }) : e.addEventListener(o, t, r || !1)
920        }, this._unbind = function (e, o, t, r) {
921            d[o] ? T.undelegate(e, o, t, r) : e.removeEventListener(o, t, r)
922        }, this.unbindAll = function () {
923            for (var e = 0; e < T.events.length; e++) {
924                var o = T.events[e];
925                o.q ? o.e.unbind(o.n, o.f) : T._unbind(o.e, o.n, o.f, o.b)
926            }
927        }, this.showRails = function () {
928            return T.showRail().showRailHr()
929        }, this.showRail = function () {
930            return 0 === T.page.maxh || !T.ispage && "none" == T.win.css("display") || (T.rail.visibility = !0, T.rail.css("display", "block")), T
931        }, this.showRailHr = function () {
932            return T.railh && (0 === T.page.maxw || !T.ispage && "none" == T.win.css("display") || (T.railh.visibility = !0, T.railh.css("display", "block"))), T
933        }, this.hideRails = function () {
934            return T.hideRail().hideRailHr()
935        }, this.hideRail = function () {
936            return T.rail.visibility = !1, T.rail.css("display", "none"), T
937        }, this.hideRailHr = function () {
938            return T.railh && (T.railh.visibility = !1, T.railh.css("display", "none")), T
939        }, this.show = function () {
940            return T.hidden = !1, T.railslocked = !1, T.showRails()
941        }, this.hide = function () {
942            return T.hidden = !0, T.railslocked = !0, T.hideRails()
943        }, this.toggle = function () {
944            return T.hidden ? T.show() : T.hide()
945        }, this.remove = function () {
946            T.stop(), T.cursortimeout && clearTimeout(T.cursortimeout);
947            for (var e in T.delaylist) T.delaylist[e] && h(T.delaylist[e].h);
948            T.doZoomOut(), T.unbindAll(), P.isie9 && T.win[0].detachEvent("onpropertychange", T.onAttributeChange), !1 !== T.observer && T.observer.disconnect(), !1 !== T.observerremover && T.observerremover.disconnect(), !1 !== T.observerbody && T.observerbody.disconnect(), T.events = null, T.cursor && T.cursor.remove(), T.cursorh && T.cursorh.remove(), T.rail && T.rail.remove(), T.railh && T.railh.remove(), T.zoom && T.zoom.remove();
949            for (var o = 0; o < T.saved.css.length; o++) {
950                var t = T.saved.css[o];
951                t[0].css(t[1], void 0 === t[2] ? "" : t[2])
952            }
953            T.saved = !1, T.me.data("__nicescroll", "");
954            var r = n.nicescroll;
955            r.each(function (e) {
956                if (this && this.id === T.id) {
957                    delete r[e];
958                    for (var o = ++e; o < r.length; o++, e++) r[e] = r[o];
959                    --r.length && delete r[r.length]
960                }
961            });
962            for (var i in T) T[i] = null, delete T[i];
963            T = null
964        }, this.scrollstart = function (e) {
965            return this.onscrollstart = e, T
966        }, this.scrollend = function (e) {
967            return this.onscrollend = e, T
968        }, this.scrollcancel = function (e) {
969            return this.onscrollcancel = e, T
970        }, this.zoomin = function (e) {
971            return this.onzoomin = e, T
972        }, this.zoomout = function (e) {
973            return this.onzoomout = e, T
974        }, this.isScrollable = function (e) {
975            var o = e.target ? e.target : e;
976            if ("OPTION" == o.nodeName) return !0;
977            for (; o && 1 == o.nodeType && o !== this.me[0] && !/^BODY|HTML/.test(o.nodeName);) {
978                var t = n(o), r = t.css("overflowY") || t.css("overflowX") || t.css("overflow") || "";
979                if (/scroll|auto/.test(r)) return o.clientHeight != o.scrollHeight;
980                o = !!o.parentNode && o.parentNode
981            }
982            return !1
983        }, this.getViewport = function (e) {
984            for (var o = !(!e || !e.parentNode) && e.parentNode; o && 1 == o.nodeType && !/^BODY|HTML/.test(o.nodeName);) {
985                var t = n(o);
986                if (/fixed|absolute/.test(t.css("position"))) return t;
987                var r = t.css("overflowY") || t.css("overflowX") || t.css("overflow") || "";
988                if (/scroll|auto/.test(r) && o.clientHeight != o.scrollHeight) return t;
989                if (t.getNiceScroll().length > 0) return t;
990                o = !!o.parentNode && o.parentNode
991            }
992            return !1
993        }, this.triggerScrollStart = function (e, o, t, r, i) {
994            if (T.onscrollstart) {
995                var s = {
996                    type: "scrollstart",
997                    current: {x: e, y: o},
998                    request: {x: t, y: r},
999                    end: {x: T.newscrollx, y: T.newscrolly},
1000                    speed: i
1001                };
1002                T.onscrollstart.call(T, s)
1003            }
1004        }, this.triggerScrollEnd = function () {
1005            if (T.onscrollend) {
1006                var e = T.getScrollLeft(), o = T.getScrollTop(),
1007                    t = {type: "scrollend", current: {x: e, y: o}, end: {x: e, y: o}};
1008                T.onscrollend.call(T, t)
1009            }
1010        };
1011        var B = 0, X = 0, D = 0, A = 1, q = !1;
1012        if (this.onmousewheel = function (e) {
1013            if (T.wheelprevented || T.locked) return !1;
1014            if (T.railslocked) return T.debounced("checkunlock", T.resize, 250), !1;
1015            if (T.rail.drag) return T.cancelEvent(e);
1016            if ("auto" === M.oneaxismousemode && 0 !== e.deltaX && (M.oneaxismousemode = !1), M.oneaxismousemode && 0 === e.deltaX && !T.rail.scrollable) return !T.railh || !T.railh.scrollable || T.onmousewheelhr(e);
1017            var o = f(), t = !1;
1018            if (M.preservenativescrolling && T.checkarea + 600 < o && (T.nativescrollingarea = T.isScrollable(e), t = !0), T.checkarea = o, T.nativescrollingarea) return !0;
1019            var r = k(e, !1, t);
1020            return r && (T.checkarea = 0), r
1021        }, this.onmousewheelhr = function (e) {
1022            if (!T.wheelprevented) {
1023                if (T.railslocked || !T.railh.scrollable) return !0;
1024                if (T.rail.drag) return T.cancelEvent(e);
1025                var o = f(), t = !1;
1026                return M.preservenativescrolling && T.checkarea + 600 < o && (T.nativescrollingarea = T.isScrollable(e), t = !0), T.checkarea = o, !!T.nativescrollingarea || (T.railslocked ? T.cancelEvent(e) : k(e, !0, t))
1027            }
1028        }, this.stop = function () {
1029            return T.cancelScroll(), T.scrollmon && T.scrollmon.stop(), T.cursorfreezed = !1, T.scroll.y = Math.round(T.getScrollTop() * (1 / T.scrollratio.y)), T.noticeCursor(), T
1030        }, this.getTransitionSpeed = function (e) {
1031            return 80 + e / 72 * M.scrollspeed | 0
1032        }, M.smoothscroll) if (T.ishwscroll && P.hastransition && M.usetransition && M.smoothscroll) {
1033            var j = "";
1034            this.resetTransition = function () {
1035                j = "", T.doc.css(P.prefixstyle + "transition-duration", "0ms")
1036            }, this.prepareTransition = function (e, o) {
1037                var t = o ? e : T.getTransitionSpeed(e), r = t + "ms";
1038                return j !== r && (j = r, T.doc.css(P.prefixstyle + "transition-duration", r)), t
1039            }, this.doScrollLeft = function (e, o) {
1040                var t = T.scrollrunning ? T.newscrolly : T.getScrollTop();
1041                T.doScrollPos(e, t, o)
1042            }, this.doScrollTop = function (e, o) {
1043                var t = T.scrollrunning ? T.newscrollx : T.getScrollLeft();
1044                T.doScrollPos(t, e, o)
1045            }, this.cursorupdate = {
1046                running: !1, start: function () {
1047                    var e = this;
1048                    if (!e.running) {
1049                        e.running = !0;
1050                        var o = function () {
1051                            e.running && u(o), T.showCursor(T.getScrollTop(), T.getScrollLeft()), T.notifyScrollEvent(T.win[0])
1052                        };
1053                        u(o)
1054                    }
1055                }, stop: function () {
1056                    this.running = !1
1057                }
1058            }, this.doScrollPos = function (e, o, t) {
1059                var r = T.getScrollTop(), i = T.getScrollLeft();
1060                if (((T.newscrolly - r) * (o - r) < 0 || (T.newscrollx - i) * (e - i) < 0) && T.cancelScroll(), M.bouncescroll ? (o < 0 ? o = o / 2 | 0 : o > T.page.maxh && (o = T.page.maxh + (o - T.page.maxh) / 2 | 0), e < 0 ? e = e / 2 | 0 : e > T.page.maxw && (e = T.page.maxw + (e - T.page.maxw) / 2 | 0)) : (o < 0 ? o = 0 : o > T.page.maxh && (o = T.page.maxh), e < 0 ? e = 0 : e > T.page.maxw && (e = T.page.maxw)), T.scrollrunning && e == T.newscrollx && o == T.newscrolly) return !1;
1061                T.newscrolly = o, T.newscrollx = e;
1062                var s = T.getScrollTop(), n = T.getScrollLeft(), l = {};
1063                l.x = e - n, l.y = o - s;
1064                var a = 0 | Math.sqrt(l.x * l.x + l.y * l.y), c = T.prepareTransition(a);
1065                T.scrollrunning || (T.scrollrunning = !0, T.triggerScrollStart(n, s, e, o, c), T.cursorupdate.start()), T.scrollendtrapped = !0, P.transitionend || (T.scrollendtrapped && clearTimeout(T.scrollendtrapped), T.scrollendtrapped = setTimeout(T.onScrollTransitionEnd, c)), T.setScrollTop(T.newscrolly), T.setScrollLeft(T.newscrollx)
1066            }, this.cancelScroll = function () {
1067                if (!T.scrollendtrapped) return !0;
1068                var e = T.getScrollTop(), o = T.getScrollLeft();
1069                return T.scrollrunning = !1, P.transitionend || clearTimeout(P.transitionend), T.scrollendtrapped = !1, T.resetTransition(), T.setScrollTop(e), T.railh && T.setScrollLeft(o), T.timerscroll && T.timerscroll.tm && clearInterval(T.timerscroll.tm), T.timerscroll = !1, T.cursorfreezed = !1, T.cursorupdate.stop(), T.showCursor(e, o), T
1070            }, this.onScrollTransitionEnd = function () {
1071                if (T.scrollendtrapped) {
1072                    var e = T.getScrollTop(), o = T.getScrollLeft();
1073                    if (e < 0 ? e = 0 : e > T.page.maxh && (e = T.page.maxh), o < 0 ? o = 0 : o > T.page.maxw && (o = T.page.maxw), e != T.newscrolly || o != T.newscrollx) return T.doScrollPos(o, e, M.snapbackspeed);
1074                    T.scrollrunning && T.triggerScrollEnd(), T.scrollrunning = !1, T.scrollendtrapped = !1, T.resetTransition(), T.timerscroll = !1, T.setScrollTop(e), T.railh && T.setScrollLeft(o), T.cursorupdate.stop(), T.noticeCursor(!1, e, o), T.cursorfreezed = !1
1075                }
1076            }
1077        } else this.doScrollLeft = function (e, o) {
1078            var t = T.scrollrunning ? T.newscrolly : T.getScrollTop();
1079            T.doScrollPos(e, t, o)
1080        }, this.doScrollTop = function (e, o) {
1081            var t = T.scrollrunning ? T.newscrollx : T.getScrollLeft();
1082            T.doScrollPos(t, e, o)
1083        }, this.doScrollPos = function (e, o, t) {
1084            var r = T.getScrollTop(), i = T.getScrollLeft();
1085            ((T.newscrolly - r) * (o - r) < 0 || (T.newscrollx - i) * (e - i) < 0) && T.cancelScroll();
1086            var s = !1;
1087            if (T.bouncescroll && T.rail.visibility || (o < 0 ? (o = 0, s = !0) : o > T.page.maxh && (o = T.page.maxh, s = !0)), T.bouncescroll && T.railh.visibility || (e < 0 ? (e = 0, s = !0) : e > T.page.maxw && (e = T.page.maxw, s = !0)), T.scrollrunning && T.newscrolly === o && T.newscrollx === e) return !0;
1088            T.newscrolly = o, T.newscrollx = e, T.dst = {}, T.dst.x = e - i, T.dst.y = o - r, T.dst.px = i, T.dst.py = r;
1089            var n = 0 | Math.sqrt(T.dst.x * T.dst.x + T.dst.y * T.dst.y), l = T.getTransitionSpeed(n);
1090            T.bzscroll = {};
1091            var a = s ? 1 : .58;
1092            T.bzscroll.x = new R(i, T.newscrollx, l, 0, 0, a, 1), T.bzscroll.y = new R(r, T.newscrolly, l, 0, 0, a, 1);
1093            f();
1094            var c = function () {
1095                if (T.scrollrunning) {
1096                    var e = T.bzscroll.y.getPos();
1097                    T.setScrollLeft(T.bzscroll.x.getNow()), T.setScrollTop(T.bzscroll.y.getNow()), e <= 1 ? T.timer = u(c) : (T.scrollrunning = !1, T.timer = 0, T.triggerScrollEnd())
1098                }
1099            };
1100            T.scrollrunning || (T.triggerScrollStart(i, r, e, o, l), T.scrollrunning = !0, T.timer = u(c))
1101        }, this.cancelScroll = function () {
1102            return T.timer && h(T.timer), T.timer = 0, T.bzscroll = !1, T.scrollrunning = !1, T
1103        }; else this.doScrollLeft = function (e, o) {
1104            var t = T.getScrollTop();
1105            T.doScrollPos(e, t, o)
1106        }, this.doScrollTop = function (e, o) {
1107            var t = T.getScrollLeft();
1108            T.doScrollPos(t, e, o)
1109        }, this.doScrollPos = function (e, o, t) {
1110            var r = e > T.page.maxw ? T.page.maxw : e;
1111            r < 0 && (r = 0);
1112            var i = o > T.page.maxh ? T.page.maxh : o;
1113            i < 0 && (i = 0), T.synched("scroll", function () {
1114                T.setScrollTop(i), T.setScrollLeft(r)
1115            })
1116        }, this.cancelScroll = function () {
1117        };
1118        this.doScrollBy = function (e, o) {
1119            z(0, e)
1120        }, this.doScrollLeftBy = function (e, o) {
1121            z(e, 0)
1122        }, this.doScrollTo = function (e, o) {
1123            var t = o ? Math.round(e * T.scrollratio.y) : e;
1124            t < 0 ? t = 0 : t > T.page.maxh && (t = T.page.maxh), T.cursorfreezed = !1, T.doScrollTop(e)
1125        }, this.checkContentSize = function () {
1126            var e = T.getContentSize();
1127            e.h == T.page.h && e.w == T.page.w || T.resize(!1, e)
1128        }, T.onscroll = function (e) {
1129            T.rail.drag || T.cursorfreezed || T.synched("scroll", function () {
1130                T.scroll.y = Math.round(T.getScrollTop() / T.scrollratio.y), T.railh && (T.scroll.x = Math.round(T.getScrollLeft() / T.scrollratio.x)), T.noticeCursor()
1131            })
1132        }, T.bind(T.docscroll, "scroll", T.onscroll), this.doZoomIn = function (e) {
1133            if (!T.zoomactive) {
1134                T.zoomactive = !0, T.zoomrestore = {style: {}};
1135                var o = ["position", "top", "left", "zIndex", "backgroundColor", "marginTop", "marginBottom", "marginLeft", "marginRight"],
1136                    t = T.win[0].style;
1137                for (var r in o) {
1138                    var i = o[r];
1139                    T.zoomrestore.style[i] = void 0 !== t[i] ? t[i] : ""
1140                }
1141                T.zoomrestore.style.width = T.win.css("width"), T.zoomrestore.style.height = T.win.css("height"), T.zoomrestore.padding = {
1142                    w: T.win.outerWidth() - T.win.width(),
1143                    h: T.win.outerHeight() - T.win.height()
1144                }, P.isios4 && (T.zoomrestore.scrollTop = c.scrollTop(), c.scrollTop(0)), T.win.css({
1145                    position: P.isios4 ? "absolute" : "fixed",
1146                    top: 0,
1147                    left: 0,
1148                    zIndex: s + 100,
1149                    margin: 0
1150                });
1151                var n = T.win.css("backgroundColor");
1152                return ("" === n || /transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n)) && T.win.css("backgroundColor", "#fff"), T.rail.css({zIndex: s + 101}), T.zoom.css({zIndex: s + 102}), T.zoom.css("backgroundPosition", "0 -18px"), T.resizeZoom(), T.onzoomin && T.onzoomin.call(T), T.cancelEvent(e)
1153            }
1154        }, this.doZoomOut = function (e) {
1155            if (T.zoomactive) return T.zoomactive = !1, T.win.css("margin", ""), T.win.css(T.zoomrestore.style), P.isios4 && c.scrollTop(T.zoomrestore.scrollTop), T.rail.css({"z-index": T.zindex}), T.zoom.css({"z-index": T.zindex}), T.zoomrestore = !1, T.zoom.css("backgroundPosition", "0 0"), T.onResize(), T.onzoomout && T.onzoomout.call(T), T.cancelEvent(e)
1156        }, this.doZoom = function (e) {
1157            return T.zoomactive ? T.doZoomOut(e) : T.doZoomIn(e)
1158        }, this.resizeZoom = function () {
1159            if (T.zoomactive) {
1160                var e = T.getScrollTop();
1161                T.win.css({
1162                    width: c.width() - T.zoomrestore.padding.w + "px",
1163                    height: c.height() - T.zoomrestore.padding.h + "px"
1164                }), T.onResize(), T.setScrollTop(Math.min(T.page.maxh, e))
1165            }
1166        }, this.init(), n.nicescroll.push(this)
1167    }, y = function (e) {
1168        var o = this;
1169        this.nc = e, this.lastx = 0, this.lasty = 0, this.speedx = 0, this.speedy = 0, this.lasttime = 0, this.steptime = 0, this.snapx = !1, this.snapy = !1, this.demulx = 0, this.demuly = 0, this.lastscrollx = -1, this.lastscrolly = -1, this.chkx = 0, this.chky = 0, this.timer = 0, this.reset = function (e, t) {
1170            o.stop(), o.steptime = 0, o.lasttime = f(), o.speedx = 0, o.speedy = 0, o.lastx = e, o.lasty = t, o.lastscrollx = -1, o.lastscrolly = -1
1171        }, this.update = function (e, t) {
1172            var r = f();
1173            o.steptime = r - o.lasttime, o.lasttime = r;
1174            var i = t - o.lasty, s = e - o.lastx, n = o.nc.getScrollTop() + i, l = o.nc.getScrollLeft() + s;
1175            o.snapx = l < 0 || l > o.nc.page.maxw, o.snapy = n < 0 || n > o.nc.page.maxh, o.speedx = s, o.speedy = i, o.lastx = e, o.lasty = t
1176        }, this.stop = function () {
1177            o.nc.unsynched("domomentum2d"), o.timer && clearTimeout(o.timer), o.timer = 0, o.lastscrollx = -1, o.lastscrolly = -1
1178        }, this.doSnapy = function (e, t) {
1179            var r = !1;
1180            t < 0 ? (t = 0, r = !0) : t > o.nc.page.maxh && (t = o.nc.page.maxh, r = !0), e < 0 ? (e = 0, r = !0) : e > o.nc.page.maxw && (e = o.nc.page.maxw, r = !0), r ? o.nc.doScrollPos(e, t, o.nc.opt.snapbackspeed) : o.nc.triggerScrollEnd()
1181        }, this.doMomentum = function (e) {
1182            var t = f(), r = e ? t + e : o.lasttime, i = o.nc.getScrollLeft(), s = o.nc.getScrollTop(),
1183                n = o.nc.page.maxh, l = o.nc.page.maxw;
1184            o.speedx = l > 0 ? Math.min(60, o.speedx) : 0, o.speedy = n > 0 ? Math.min(60, o.speedy) : 0;
1185            var a = r && t - r <= 60;
1186            (s < 0 || s > n || i < 0 || i > l) && (a = !1);
1187            var c = !(!o.speedy || !a) && o.speedy, d = !(!o.speedx || !a) && o.speedx;
1188            if (c || d) {
1189                var u = Math.max(16, o.steptime);
1190                if (u > 50) {
1191                    var h = u / 50;
1192                    o.speedx *= h, o.speedy *= h, u = 50
1193                }
1194                o.demulxy = 0, o.lastscrollx = o.nc.getScrollLeft(), o.chkx = o.lastscrollx, o.lastscrolly = o.nc.getScrollTop(), o.chky = o.lastscrolly;
1195                var p = o.lastscrollx, m = o.lastscrolly, g = function () {
1196                    var e = f() - t > 600 ? .04 : .02;
1197                    o.speedx && (p = Math.floor(o.lastscrollx - o.speedx * (1 - o.demulxy)), o.lastscrollx = p, (p < 0 || p > l) && (e = .1)), o.speedy && (m = Math.floor(o.lastscrolly - o.speedy * (1 - o.demulxy)), o.lastscrolly = m, (m < 0 || m > n) && (e = .1)), o.demulxy = Math.min(1, o.demulxy + e), o.nc.synched("domomentum2d", function () {
1198                        if (o.speedx) {
1199                            o.nc.getScrollLeft();
1200                            o.chkx = p, o.nc.setScrollLeft(p)
1201                        }
1202                        if (o.speedy) {
1203                            o.nc.getScrollTop();
1204                            o.chky = m, o.nc.setScrollTop(m)
1205                        }
1206                        o.timer || (o.nc.hideCursor(), o.doSnapy(p, m))
1207                    }), o.demulxy < 1 ? o.timer = setTimeout(g, u) : (o.stop(), o.nc.hideCursor(), o.doSnapy(p, m))
1208                };
1209                g()
1210            } else o.doSnapy(o.nc.getScrollLeft(), o.nc.getScrollTop())
1211        }
1212    }, x = e.fn.scrollTop;
1213    e.cssHooks.pageYOffset = {
1214        get: function (e, o, t) {
1215            var r = n.data(e, "__nicescroll") || !1;
1216            return r && r.ishwscroll ? r.getScrollTop() : x.call(e)
1217        }, set: function (e, o) {
1218            var t = n.data(e, "__nicescroll") || !1;
1219            return t && t.ishwscroll ? t.setScrollTop(parseInt(o)) : x.call(e, o), this
1220        }
1221    }, e.fn.scrollTop = function (e) {
1222        if (void 0 === e) {
1223            var o = !!this[0] && (n.data(this[0], "__nicescroll") || !1);
1224            return o && o.ishwscroll ? o.getScrollTop() : x.call(this)
1225        }
1226        return this.each(function () {
1227            var o = n.data(this, "__nicescroll") || !1;
1228            o && o.ishwscroll ? o.setScrollTop(parseInt(e)) : x.call(n(this), e)
1229        })
1230    };
1231    var S = e.fn.scrollLeft;
1232    n.cssHooks.pageXOffset = {
1233        get: function (e, o, t) {
1234            var r = n.data(e, "__nicescroll") || !1;
1235            return r && r.ishwscroll ? r.getScrollLeft() : S.call(e)
1236        }, set: function (e, o) {
1237            var t = n.data(e, "__nicescroll") || !1;
1238            return t && t.ishwscroll ? t.setScrollLeft(parseInt(o)) : S.call(e, o), this
1239        }
1240    }, e.fn.scrollLeft = function (e) {
1241        if (void 0 === e) {
1242            var o = !!this[0] && (n.data(this[0], "__nicescroll") || !1);
1243            return o && o.ishwscroll ? o.getScrollLeft() : S.call(this)
1244        }
1245        return this.each(function () {
1246            var o = n.data(this, "__nicescroll") || !1;
1247            o && o.ishwscroll ? o.setScrollLeft(parseInt(e)) : S.call(n(this), e)
1248        })
1249    };
1250    var z = function (e) {
1251        var o = this;
1252        if (this.length = 0, this.name = "nicescrollarray", this.each = function (e) {
1253            return n.each(o, e), o
1254        }, this.push = function (e) {
1255            o[o.length] = e, o.length++
1256        }, this.eq = function (e) {
1257            return o[e]
1258        }, e) for (var t = 0; t < e.length; t++) {
1259            var r = n.data(e[t], "__nicescroll") || !1;
1260            r && (this[this.length] = r, this.length++)
1261        }
1262        return this
1263    };
1264    !function (e, o, t) {
1265        for (var r = 0, i = o.length; r < i; r++) t(e, o[r])
1266    }(z.prototype, ["show", "hide", "toggle", "onResize", "resize", "remove", "stop", "doScrollPos"], function (e, o) {
1267        e[o] = function () {
1268            var e = arguments;
1269            return this.each(function () {
1270                this[o].apply(this, e)
1271            })
1272        }
1273    }), e.fn.getNiceScroll = function (e) {
1274        return void 0 === e ? new z(this) : this[e] && n.data(this[e], "__nicescroll") || !1
1275    }, (e.expr.pseudos || e.expr[":"]).nicescroll = function (e) {
1276        return void 0 !== n.data(e, "__nicescroll")
1277    }, n.fn.niceScroll = function (e, o) {
1278        void 0 !== o || "object" != typeof e || "jquery" in e || (o = e, e = !1);
1279        var t = new z;
1280        return this.each(function () {
1281            var r = n(this), i = n.extend({}, o);
1282            if (e) {
1283                var s = n(e);
1284                i.doc = s.length > 1 ? n(e, r) : s, i.win = r
1285            }
1286            !("doc" in i) || "win" in i || (i.win = r);
1287            var l = r.data("__nicescroll") || !1;
1288            l || (i.doc = i.doc || r, l = new b(i, r), r.data("__nicescroll", l)), t.push(l)
1289        }), 1 === t.length ? t[0] : t
1290    }, a.NiceScroll = {
1291        getjQuery: function () {
1292            return e
1293        }
1294    }, n.nicescroll || (n.nicescroll = new z, n.nicescroll.options = g)
1295});/* jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */
1296/* jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */
1297!function (e) {
1298    "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof exports ? module.exports = e(require("jquery")) : e(jQuery)
1299}(function (e) {
1300    "use strict";
1301    var o = !1, t = !1, r = 0, i = 2e3, s = 0, n = e, l = document, a = window, c = n(a), d = [],
1302        u = a.requestAnimationFrame || a.webkitRequestAnimationFrame || a.mozRequestAnimationFrame || !1,
1303        h = a.cancelAnimationFrame || a.webkitCancelAnimationFrame || a.mozCancelAnimationFrame || !1;
1304    if (u) a.cancelAnimationFrame || (h = function (e) {
1305    }); else {
1306        var p = 0;
1307        u = function (e, o) {
1308            var t = (new Date).getTime(), r = Math.max(0, 16 - (t - p)), i = a.setTimeout(function () {
1309                e(t + r)
1310            }, r);
1311            return p = t + r, i
1312        }, h = function (e) {
1313            a.clearTimeout(e)
1314        }
1315    }
1316    var m = a.MutationObserver || a.WebKitMutationObserver || !1, f = Date.now || function () {
1317        return (new Date).getTime()
1318    }, g = {
1319        zindex: "auto",
1320        cursoropacitymin: 0,
1321        cursoropacitymax: 1,
1322        cursorcolor: "#424242",
1323        cursorwidth: "6px",
1324        cursorborder: "1px solid #fff",
1325        cursorborderradius: "5px",
1326        scrollspeed: 40,
1327        mousescrollstep: 27,
1328        touchbehavior: !1,
1329        emulatetouch: !1,
1330        hwacceleration: !0,
1331        usetransition: !0,
1332        boxzoom: !1,
1333        dblclickzoom: !0,
1334        gesturezoom: !0,
1335        grabcursorenabled: !0,
1336        autohidemode: !0,
1337        background: "",
1338        iframeautoresize: !0,
1339        cursorminheight: 32,
1340        preservenativescrolling: !0,
1341        railoffset: !1,
1342        railhoffset: !1,
1343        bouncescroll: !0,
1344        spacebarenabled: !0,
1345        railpadding: {top: 0, right: 0, left: 0, bottom: 0},
1346        disableoutline: !0,
1347        horizrailenabled: !0,
1348        railalign: "right",
1349        railvalign: "bottom",
1350        enabletranslate3d: !0,
1351        enablemousewheel: !0,
1352        enablekeyboard: !0,
1353        smoothscroll: !0,
1354        sensitiverail: !0,
1355        enablemouselockapi: !0,
1356        cursorfixedheight: !1,
1357        directionlockdeadzone: 6,
1358        hidecursordelay: 400,
1359        nativeparentscrolling: !0,
1360        enablescrollonselection: !0,
1361        overflowx: !0,
1362        overflowy: !0,
1363        cursordragspeed: .3,
1364        rtlmode: "auto",
1365        cursordragontouch: !1,
1366        oneaxismousemode: "auto",
1367        scriptpath: function () {
1368            var e = l.currentScript || function () {
1369                var e = l.getElementsByTagName("script");
1370                return !!e.length && e[e.length - 1]
1371            }(), o = e ? e.src.split("?")[0] : "";
1372            return o.split("/").length > 0 ? o.split("/").slice(0, -1).join("/") + "/" : ""
1373        }(),
1374        preventmultitouchscrolling: !0,
1375        disablemutationobserver: !1,
1376        enableobserver: !0,
1377        scrollbarid: !1
1378    }, v = !1, w = function () {
1379        if (v) return v;
1380        var e = l.createElement("DIV"), o = e.style, t = navigator.userAgent, r = navigator.platform, i = {};
1381        return i.haspointerlock = "pointerLockElement" in l || "webkitPointerLockElement" in l || "mozPointerLockElement" in l, i.isopera = "opera" in a, i.isopera12 = i.isopera && "getUserMedia" in navigator, i.isoperamini = "[object OperaMini]" === Object.prototype.toString.call(a.operamini), i.isie = "all" in l && "attachEvent" in e && !i.isopera, i.isieold = i.isie && !("msInterpolationMode" in o), i.isie7 = i.isie && !i.isieold && (!("documentMode" in l) || 7 === l.documentMode), i.isie8 = i.isie && "documentMode" in l && 8 === l.documentMode, i.isie9 = i.isie && "performance" in a && 9 === l.documentMode, i.isie10 = i.isie && "performance" in a && 10 === l.documentMode, i.isie11 = "msRequestFullscreen" in e && l.documentMode >= 11, i.ismsedge = "msCredentials" in a, i.ismozilla = "MozAppearance" in o, i.iswebkit = !i.ismsedge && "WebkitAppearance" in o, i.ischrome = i.iswebkit && "chrome" in a, i.ischrome38 = i.ischrome && "touchAction" in o, i.ischrome22 = !i.ischrome38 && i.ischrome && i.haspointerlock, i.ischrome26 = !i.ischrome38 && i.ischrome && "transition" in o, i.cantouch = "ontouchstart" in l.documentElement || "ontouchstart" in a, i.hasw3ctouch = (a.PointerEvent || !1) && (navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0), i.hasmstouch = !i.hasw3ctouch && (a.MSPointerEvent || !1), i.ismac = /^mac$/i.test(r), i.isios = i.cantouch && /iphone|ipad|ipod/i.test(r), i.isios4 = i.isios && !("seal" in Object), i.isios7 = i.isios && "webkitHidden" in l, i.isios8 = i.isios && "hidden" in l, i.isios10 = i.isios && a.Proxy, i.isandroid = /android/i.test(t), i.haseventlistener = "addEventListener" in e, i.trstyle = !1, i.hastransform = !1, i.hastranslate3d = !1, i.transitionstyle = !1, i.hastransition = !1, i.transitionend = !1, i.trstyle = "transform", i.hastransform = "transform" in o || function () {
1382            for (var e = ["msTransform", "webkitTransform", "MozTransform", "OTransform"], t = 0, r = e.length; t < r; t++) if (void 0 !== o[e[t]]) {
1383                i.trstyle = e[t];
1384                break
1385            }
1386            i.hastransform = !!i.trstyle
1387        }(), i.hastransform && (o[i.trstyle] = "translate3d(1px,2px,3px)", i.hastranslate3d = /translate3d/.test(o[i.trstyle])), i.transitionstyle = "transition", i.prefixstyle = "", i.transitionend = "transitionend", i.hastransition = "transition" in o || function () {
1388            i.transitionend = !1;
1389            for (var e = ["webkitTransition", "msTransition", "MozTransition", "OTransition", "OTransition", "KhtmlTransition"], t = ["-webkit-", "-ms-", "-moz-", "-o-", "-o", "-khtml-"], r = ["webkitTransitionEnd", "msTransitionEnd", "transitionend", "otransitionend", "oTransitionEnd", "KhtmlTransitionEnd"], s = 0, n = e.length; s < n; s++) if (e[s] in o) {
1390                i.transitionstyle = e[s], i.prefixstyle = t[s], i.transitionend = r[s];
1391                break
1392            }
1393            i.ischrome26 && (i.prefixstyle = t[1]), i.hastransition = i.transitionstyle
1394        }(), i.cursorgrabvalue = function () {
1395            var e = ["grab", "-webkit-grab", "-moz-grab"];
1396            (i.ischrome && !i.ischrome38 || i.isie) && (e = []);
1397            for (var t = 0, r = e.length; t < r; t++) {
1398                var s = e[t];
1399                if (o.cursor = s, o.cursor == s) return s
1400            }
1401            return "url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"
1402        }(), i.hasmousecapture = "setCapture" in e, i.hasMutationObserver = !1 !== m, e = null, v = i, i
1403    }, b = function (e, p) {
1404        function v() {
1405            var e = T.doc.css(P.trstyle);
1406            return !(!e || "matrix" != e.substr(0, 6)) && e.replace(/^.*\((.*)\)$/g, "$1").replace(/px/g, "").split(/, +/)
1407        }
1408
1409        function b() {
1410            var e = T.win;
1411            if ("zIndex" in e) return e.zIndex();
1412            for (; e.length > 0;) {
1413                if (9 == e[0].nodeType) return !1;
1414                var o = e.css("zIndex");
1415                if (!isNaN(o) && 0 !== o) return parseInt(o);
1416                e = e.parent()
1417            }
1418            return !1
1419        }
1420
1421        function x(e, o, t) {
1422            var r = e.css(o), i = parseFloat(r);
1423            if (isNaN(i)) {
1424                var s = 3 == (i = I[r] || 0) ? t ? T.win.outerHeight() - T.win.innerHeight() : T.win.outerWidth() - T.win.innerWidth() : 1;
1425                return T.isie8 && i && (i += 1), s ? i : 0
1426            }
1427            return i
1428        }
1429
1430        function S(e, o, t, r) {
1431            T._bind(e, o, function (r) {
1432                var i = {
1433                    original: r = r || a.event,
1434                    target: r.target || r.srcElement,
1435                    type: "wheel",
1436                    deltaMode: "MozMousePixelScroll" == r.type ? 0 : 1,
1437                    deltaX: 0,
1438                    deltaZ: 0,
1439                    preventDefault: function () {
1440                        return r.preventDefault ? r.preventDefault() : r.returnValue = !1, !1
1441                    },
1442                    stopImmediatePropagation: function () {
1443                        r.stopImmediatePropagation ? r.stopImmediatePropagation() : r.cancelBubble = !0
1444                    }
1445                };
1446                return "mousewheel" == o ? (r.wheelDeltaX && (i.deltaX = -.025 * r.wheelDeltaX), r.wheelDeltaY && (i.deltaY = -.025 * r.wheelDeltaY), !i.deltaY && !i.deltaX && (i.deltaY = -.025 * r.wheelDelta)) : i.deltaY = r.detail, t.call(e, i)
1447            }, r)
1448        }
1449
1450        function z(e, o, t, r) {
1451            T.scrollrunning || (T.newscrolly = T.getScrollTop(), T.newscrollx = T.getScrollLeft(), D = f());
1452            var i = f() - D;
1453            if (D = f(), i > 350 ? A = 1 : A += (2 - A) / 10, e = e * A | 0, o = o * A | 0, e) {
1454                if (r) if (e < 0) {
1455                    if (T.getScrollLeft() >= T.page.maxw) return !0
1456                } else if (T.getScrollLeft() <= 0) return !0;
1457                var s = e > 0 ? 1 : -1;
1458                X !== s && (T.scrollmom && T.scrollmom.stop(), T.newscrollx = T.getScrollLeft(), X = s), T.lastdeltax -= e
1459            }
1460            if (o) {
1461                if (function () {
1462                    var e = T.getScrollTop();
1463                    if (o < 0) {
1464                        if (e >= T.page.maxh) return !0
1465                    } else if (e <= 0) return !0
1466                }()) {
1467                    if (M.nativeparentscrolling && t && !T.ispage && !T.zoomactive) return !0;
1468                    var n = T.view.h >> 1;
1469                    T.newscrolly < -n ? (T.newscrolly = -n, o = -1) : T.newscrolly > T.page.maxh + n ? (T.newscrolly = T.page.maxh + n, o = 1) : o = 0
1470                }
1471                var l = o > 0 ? 1 : -1;
1472                B !== l && (T.scrollmom && T.scrollmom.stop(), T.newscrolly = T.getScrollTop(), B = l), T.lastdeltay -= o
1473            }
1474            (o || e) && T.synched("relativexy", function () {
1475                var e = T.lastdeltay + T.newscrolly;
1476                T.lastdeltay = 0;
1477                var o = T.lastdeltax + T.newscrollx;
1478                T.lastdeltax = 0, T.rail.drag || T.doScrollPos(o, e)
1479            })
1480        }
1481
1482        function k(e, o, t) {
1483            var r, i;
1484            return !(t || !q) || (0 === e.deltaMode ? (r = -e.deltaX * (M.mousescrollstep / 54) | 0, i = -e.deltaY * (M.mousescrollstep / 54) | 0) : 1 === e.deltaMode && (r = -e.deltaX * M.mousescrollstep * 50 / 80 | 0, i = -e.deltaY * M.mousescrollstep * 50 / 80 | 0), o && M.oneaxismousemode && 0 === r && i && (r = i, i = 0, t && (r < 0 ? T.getScrollLeft() >= T.page.maxw : T.getScrollLeft() <= 0) && (i = r, r = 0)), T.isrtlmode && (r = -r), z(r, i, t, !0) ? void (t && (q = !0)) : (q = !1, e.stopImmediatePropagation(), e.preventDefault()))
1485        }
1486
1487        var T = this;
1488        this.version = "3.7.6", this.name = "nicescroll", this.me = p;
1489        var E = n("body"), M = this.opt = {doc: E, win: !1};
1490        if (n.extend(M, g), M.snapbackspeed = 80, e) for (var L in M) void 0 !== e[L] && (M[L] = e[L]);
1491        if (M.disablemutationobserver && (m = !1), this.doc = M.doc, this.iddoc = this.doc && this.doc[0] ? this.doc[0].id || "" : "", this.ispage = /^BODY|HTML/.test(M.win ? M.win[0].nodeName : this.doc[0].nodeName), this.haswrapper = !1 !== M.win, this.win = M.win || (this.ispage ? c : this.doc), this.docscroll = this.ispage && !this.haswrapper ? c : this.win, this.body = E, this.viewport = !1, this.isfixed = !1, this.iframe = !1, this.isiframe = "IFRAME" == this.doc[0].nodeName && "IFRAME" == this.win[0].nodeName, this.istextarea = "TEXTAREA" == this.win[0].nodeName, this.forcescreen = !1, this.canshowonmouseevent = "scroll" != M.autohidemode, this.onmousedown = !1, this.onmouseup = !1, this.onmousemove = !1, this.onmousewheel = !1, this.onkeypress = !1, this.ongesturezoom = !1, this.onclick = !1, this.onscrollstart = !1, this.onscrollend = !1, this.onscrollcancel = !1, this.onzoomin = !1, this.onzoomout = !1, this.view = !1, this.page = !1, this.scroll = {
1492            x: 0,
1493            y: 0
1494        }, this.scrollratio = {x: 0, y: 0}, this.cursorheight = 20, this.scrollvaluemax = 0, "auto" == M.rtlmode) {
1495            var C = this.win[0] == a ? this.body : this.win,
1496                N = C.css("writing-mode") || C.css("-webkit-writing-mode") || C.css("-ms-writing-mode") || C.css("-moz-writing-mode");
1497            "horizontal-tb" == N || "lr-tb" == N || "" === N ? (this.isrtlmode = "rtl" == C.css("direction"), this.isvertical = !1) : (this.isrtlmode = "vertical-rl" == N || "tb" == N || "tb-rl" == N || "rl-tb" == N, this.isvertical = "vertical-rl" == N || "tb" == N || "tb-rl" == N)
1498        } else this.isrtlmode = !0 === M.rtlmode, this.isvertical = !1;
1499        if (this.scrollrunning = !1, this.scrollmom = !1, this.observer = !1, this.observerremover = !1, this.observerbody = !1, !1 !== M.scrollbarid) this.id = M.scrollbarid; else do {
1500            this.id = "ascrail" + i++
1501        } while (l.getElementById(this.id));
1502        this.rail = !1, this.cursor = !1, this.cursorfreezed = !1, this.selectiondrag = !1, this.zoom = !1, this.zoomactive = !1, this.hasfocus = !1, this.hasmousefocus = !1, this.railslocked = !1, this.locked = !1, this.hidden = !1, this.cursoractive = !0, this.wheelprevented = !1, this.overflowx = M.overflowx, this.overflowy = M.overflowy, this.nativescrollingarea = !1, this.checkarea = 0, this.events = [], this.saved = {}, this.delaylist = {}, this.synclist = {}, this.lastdeltax = 0, this.lastdeltay = 0, this.detected = w();
1503        var P = n.extend({}, this.detected);
1504        this.canhwscroll = P.hastransform && M.hwacceleration, this.ishwscroll = this.canhwscroll && T.haswrapper, this.isrtlmode ? this.isvertical ? this.hasreversehr = !(P.iswebkit || P.isie || P.isie11) : this.hasreversehr = !(P.iswebkit || P.isie && !P.isie10 && !P.isie11) : this.hasreversehr = !1, this.istouchcapable = !1, P.cantouch || !P.hasw3ctouch && !P.hasmstouch ? !P.cantouch || P.isios || P.isandroid || !P.iswebkit && !P.ismozilla || (this.istouchcapable = !0) : this.istouchcapable = !0, M.enablemouselockapi || (P.hasmousecapture = !1, P.haspointerlock = !1), this.debounced = function (e, o, t) {
1505            T && (T.delaylist[e] || !1 || (T.delaylist[e] = {
1506                h: u(function () {
1507                    T.delaylist[e].fn.call(T), T.delaylist[e] = !1
1508                }, t)
1509            }, o.call(T)), T.delaylist[e].fn = o)
1510        }, this.synched = function (e, o) {
1511            T.synclist[e] ? T.synclist[e] = o : (T.synclist[e] = o, u(function () {
1512                T && (T.synclist[e] && T.synclist[e].call(T), T.synclist[e] = null)
1513            }))
1514        }, this.unsynched = function (e) {
1515            T.synclist[e] && (T.synclist[e] = !1)
1516        }, this.css = function (e, o) {
1517            for (var t in o) T.saved.css.push([e, t, e.css(t)]), e.css(t, o[t])
1518        }, this.scrollTop = function (e) {
1519            return void 0 === e ? T.getScrollTop() : T.setScrollTop(e)
1520        }, this.scrollLeft = function (e) {
1521            return void 0 === e ? T.getScrollLeft() : T.setScrollLeft(e)
1522        };
1523        var R = function (e, o, t, r, i, s, n) {
1524            this.st = e, this.ed = o, this.spd = t, this.p1 = r || 0, this.p2 = i || 1, this.p3 = s || 0, this.p4 = n || 1, this.ts = f(), this.df = o - e
1525        };
1526        if (R.prototype = {
1527            B2: function (e) {
1528                return 3 * (1 - e) * (1 - e) * e
1529            }, B3: function (e) {
1530                return 3 * (1 - e) * e * e
1531            }, B4: function (e) {
1532                return e * e * e
1533            }, getPos: function () {
1534                return (f() - this.ts) / this.spd
1535            }, getNow: function () {
1536                var e = (f() - this.ts) / this.spd, o = this.B2(e) + this.B3(e) + this.B4(e);
1537                return e >= 1 ? this.ed : this.st + this.df * o | 0
1538            }, update: function (e, o) {
1539                return this.st = this.getNow(), this.ed = e, this.spd = o, this.ts = f(), this.df = this.ed - this.st, this
1540            }
1541        }, this.ishwscroll) {
1542            this.doc.translate = {
1543                x: 0,
1544                y: 0,
1545                tx: "0px",
1546                ty: "0px"
1547            }, P.hastranslate3d && P.isios && this.doc.css("-webkit-backface-visibility", "hidden"), this.getScrollTop = function (e) {
1548                if (!e) {
1549                    var o = v();
1550                    if (o) return 16 == o.length ? -o[13] : -o[5];
1551                    if (T.timerscroll && T.timerscroll.bz) return T.timerscroll.bz.getNow()
1552                }
1553                return T.doc.translate.y
1554            }, this.getScrollLeft = function (e) {
1555                if (!e) {
1556                    var o = v();
1557                    if (o) return 16 == o.length ? -o[12] : -o[4];
1558                    if (T.timerscroll && T.timerscroll.bh) return T.timerscroll.bh.getNow()
1559                }
1560                return T.doc.translate.x
1561            }, this.notifyScrollEvent = function (e) {
1562                var o = l.createEvent("UIEvents");
1563                o.initUIEvent("scroll", !1, !1, a, 1), o.niceevent = !0, e.dispatchEvent(o)
1564            };
1565            var _ = this.isrtlmode ? 1 : -1;
1566            P.hastranslate3d && M.enabletranslate3d ? (this.setScrollTop = function (e, o) {
1567                T.doc.translate.y = e, T.doc.translate.ty = -1 * e + "px", T.doc.css(P.trstyle, "translate3d(" + T.doc.translate.tx + "," + T.doc.translate.ty + ",0)"), o || T.notifyScrollEvent(T.win[0])
1568            }, this.setScrollLeft = function (e, o) {
1569                T.doc.translate.x = e, T.doc.translate.tx = e * _ + "px", T.doc.css(P.trstyle, "translate3d(" + T.doc.translate.tx + "," + T.doc.translate.ty + ",0)"), o || T.notifyScrollEvent(T.win[0])
1570            }) : (this.setScrollTop = function (e, o) {
1571                T.doc.translate.y = e, T.doc.translate.ty = -1 * e + "px", T.doc.css(P.trstyle, "translate(" + T.doc.translate.tx + "," + T.doc.translate.ty + ")"), o || T.notifyScrollEvent(T.win[0])
1572            }, this.setScrollLeft = function (e, o) {
1573                T.doc.translate.x = e, T.doc.translate.tx = e * _ + "px", T.doc.css(P.trstyle, "translate(" + T.doc.translate.tx + "," + T.doc.translate.ty + ")"), o || T.notifyScrollEvent(T.win[0])
1574            })
1575        } else this.getScrollTop = function () {
1576            return T.docscroll.scrollTop()
1577        }, this.setScrollTop = function (e) {
1578            T.docscroll.scrollTop(e)
1579        }, this.getScrollLeft = function () {
1580            return T.hasreversehr ? T.detected.ismozilla ? T.page.maxw - Math.abs(T.docscroll.scrollLeft()) : T.page.maxw - T.docscroll.scrollLeft() : T.docscroll.scrollLeft()
1581        }, this.setScrollLeft = function (e) {
1582            return setTimeout(function () {
1583                if (T) return T.hasreversehr && (e = T.detected.ismozilla ? -(T.page.maxw - e) : T.page.maxw - e), T.docscroll.scrollLeft(e)
1584            }, 1)
1585        };
1586        this.getTarget = function (e) {
1587            return !!e && (e.target ? e.target : !!e.srcElement && e.srcElement)
1588        }, this.hasParent = function (e, o) {
1589            if (!e) return !1;
1590            for (var t = e.target || e.srcElement || e || !1; t && t.id != o;) t = t.parentNode || !1;
1591            return !1 !== t
1592        };
1593        var I = {thin: 1, medium: 3, thick: 5};
1594        this.getDocumentScrollOffset = function () {
1595            return {
1596                top: a.pageYOffset || l.documentElement.scrollTop,
1597                left: a.pageXOffset || l.documentElement.scrollLeft
1598            }
1599        }, this.getOffset = function () {
1600            if (T.isfixed) {
1601                var e = T.win.offset(), o = T.getDocumentScrollOffset();
1602                return e.top -= o.top, e.left -= o.left, e
1603            }
1604            var t = T.win.offset();
1605            if (!T.viewport) return t;
1606            var r = T.viewport.offset();
1607            return {top: t.top - r.top, left: t.left - r.left}
1608        }, this.updateScrollBar = function (e) {
1609            var o, t;
1610            if (T.ishwscroll) T.rail.css({height: T.win.innerHeight() - (M.railpadding.top + M.railpadding.bottom)}), T.railh && T.railh.css({width: T.win.innerWidth() - (M.railpadding.left + M.railpadding.right)}); else {
1611                var r = T.getOffset();
1612                if (o = {
1613                    top: r.top,
1614                    left: r.left - (M.railpadding.left + M.railpadding.right)
1615                }, o.top += x(T.win, "border-top-width", !0), o.left += T.rail.align ? T.win.outerWidth() - x(T.win, "border-right-width") - T.rail.width : x(T.win, "border-left-width"), (t = M.railoffset) && (t.top && (o.top += t.top), t.left && (o.left += t.left)), T.railslocked || T.rail.css({
1616                    top: o.top,
1617                    left: o.left,
1618                    height: (e ? e.h : T.win.innerHeight()) - (M.railpadding.top + M.railpadding.bottom)
1619                }), T.zoom && T.zoom.css({
1620                    top: o.top + 1,
1621                    left: 1 == T.rail.align ? o.left - 20 : o.left + T.rail.width + 4
1622                }), T.railh && !T.railslocked) {
1623                    o = {
1624                        top: r.top,
1625                        left: r.left
1626                    }, (t = M.railhoffset) && (t.top && (o.top += t.top), t.left && (o.left += t.left));
1627                    var i = T.railh.align ? o.top + x(T.win, "border-top-width", !0) + T.win.innerHeight() - T.railh.height : o.top + x(T.win, "border-top-width", !0),
1628                        s = o.left + x(T.win, "border-left-width");
1629                    T.railh.css({top: i - (M.railpadding.top + M.railpadding.bottom), left: s, width: T.railh.width})
1630                }
1631            }
1632        }, this.doRailClick = function (e, o, t) {
1633            var r, i, s, n;
1634            T.railslocked || (T.cancelEvent(e), "pageY" in e || (e.pageX = e.clientX + l.documentElement.scrollLeft, e.pageY = e.clientY + l.documentElement.scrollTop), o ? (r = t ? T.doScrollLeft : T.doScrollTop, s = t ? (e.pageX - T.railh.offset().left - T.cursorwidth / 2) * T.scrollratio.x : (e.pageY - T.rail.offset().top - T.cursorheight / 2) * T.scrollratio.y, T.unsynched("relativexy"), r(0 | s)) : (r = t ? T.doScrollLeftBy : T.doScrollBy, s = t ? T.scroll.x : T.scroll.y, n = t ? e.pageX - T.railh.offset().left : e.pageY - T.rail.offset().top, i = t ? T.view.w : T.view.h, r(s >= n ? i : -i)))
1635        }, T.newscrolly = T.newscrollx = 0, T.hasanimationframe = "requestAnimationFrame" in a, T.hascancelanimationframe = "cancelAnimationFrame" in a, T.hasborderbox = !1, this.init = function () {
1636            if (T.saved.css = [], P.isoperamini) return !0;
1637            if (P.isandroid && !("hidden" in l)) return !0;
1638            M.emulatetouch = M.emulatetouch || M.touchbehavior, T.hasborderbox = a.getComputedStyle && "border-box" === a.getComputedStyle(l.body)["box-sizing"];
1639            var e = {"overflow-y": "hidden"};
1640            if ((P.isie11 || P.isie10) && (e["-ms-overflow-style"] = "none"), T.ishwscroll && (this.doc.css(P.transitionstyle, P.prefixstyle + "transform 0ms ease-out"), P.transitionend && T.bind(T.doc, P.transitionend, T.onScrollTransitionEnd, !1)), T.zindex = "auto", T.ispage || "auto" != M.zindex ? T.zindex = M.zindex : T.zindex = b() || "auto", !T.ispage && "auto" != T.zindex && T.zindex > s && (s = T.zindex), T.isie && 0 === T.zindex && "auto" == M.zindex && (T.zindex = "auto"), !T.ispage || !P.isieold) {
1641                var i = T.docscroll;
1642                T.ispage && (i = T.haswrapper ? T.win : T.doc), T.css(i, e), T.ispage && (P.isie11 || P.isie) && T.css(n("html"), e), !P.isios || T.ispage || T.haswrapper || T.css(E, {"-webkit-overflow-scrolling": "touch"});
1643                var d = n(l.createElement("div"));
1644                d.css({
1645                    position: "relative",
1646                    top: 0,
1647                    float: "right",
1648                    width: M.cursorwidth,
1649                    height: 0,
1650                    "background-color": M.cursorcolor,
1651                    border: M.cursorborder,
1652                    "background-clip": "padding-box",
1653                    "-webkit-border-radius": M.cursorborderradius,
1654                    "-moz-border-radius": M.cursorborderradius,
1655                    "border-radius": M.cursorborderradius
1656                }), d.addClass("nicescroll-cursors"), T.cursor = d;
1657                var u = n(l.createElement("div"));
1658                u.attr("id", T.id), u.addClass("nicescroll-rails nicescroll-rails-vr");
1659                var h, p, f = ["left", "right", "top", "bottom"];
1660                for (var g in f) p = f[g], (h = M.railpadding[p] || 0) && u.css("padding-" + p, h + "px");
1661                u.append(d), u.width = Math.max(parseFloat(M.cursorwidth), d.outerWidth()), u.css({
1662                    width: u.width + "px",
1663                    zIndex: T.zindex,
1664                    background: M.background,
1665                    cursor: "default"
1666                }), u.visibility = !0, u.scrollable = !0, u.align = "left" == M.railalign ? 0 : 1, T.rail = u, T.rail.drag = !1;
1667                var v = !1;
1668                !M.boxzoom || T.ispage || P.isieold || (v = l.createElement("div"), T.bind(v, "click", T.doZoom), T.bind(v, "mouseenter", function () {
1669                    T.zoom.css("opacity", M.cursoropacitymax)
1670                }), T.bind(v, "mouseleave", function () {
1671                    T.zoom.css("opacity", M.cursoropacitymin)
1672                }), T.zoom = n(v), T.zoom.css({
1673                    cursor: "pointer",
1674                    zIndex: T.zindex,
1675                    backgroundImage: "url(" + M.scriptpath + "zoomico.png)",
1676                    height: 18,
1677                    width: 18,
1678                    backgroundPosition: "0 0"
1679                }), M.dblclickzoom && T.bind(T.win, "dblclick", T.doZoom), P.cantouch && M.gesturezoom && (T.ongesturezoom = function (e) {
1680                    return e.scale > 1.5 && T.doZoomIn(e), e.scale < .8 && T.doZoomOut(e), T.cancelEvent(e)
1681                }, T.bind(T.win, "gestureend", T.ongesturezoom))), T.railh = !1;
1682                var w;
1683                if (M.horizrailenabled && (T.css(i, {overflowX: "hidden"}), (d = n(l.createElement("div"))).css({
1684                    position: "absolute",
1685                    top: 0,
1686                    height: M.cursorwidth,
1687                    width: 0,
1688                    backgroundColor: M.cursorcolor,
1689                    border: M.cursorborder,
1690                    backgroundClip: "padding-box",
1691                    "-webkit-border-radius": M.cursorborderradius,
1692                    "-moz-border-radius": M.cursorborderradius,
1693                    "border-radius": M.cursorborderradius
1694                }), P.isieold && d.css("overflow", "hidden"), d.addClass("nicescroll-cursors"), T.cursorh = d, (w = n(l.createElement("div"))).attr("id", T.id + "-hr"), w.addClass("nicescroll-rails nicescroll-rails-hr"), w.height = Math.max(parseFloat(M.cursorwidth), d.outerHeight()), w.css({
1695                    height: w.height + "px",
1696                    zIndex: T.zindex,
1697                    background: M.background
1698                }), w.append(d), w.visibility = !0, w.scrollable = !0, w.align = "top" == M.railvalign ? 0 : 1, T.railh = w, T.railh.drag = !1), T.ispage) u.css({
1699                    position: "fixed",
1700                    top: 0,
1701                    height: "100%"
1702                }), u.css(u.align ? {right: 0} : {left: 0}), T.body.append(u), T.railh && (w.css({
1703                    position: "fixed",
1704                    left: 0,
1705                    width: "100%"
1706                }), w.css(w.align ? {bottom: 0} : {top: 0}), T.body.append(w)); else {
1707                    if (T.ishwscroll) {
1708                        "static" == T.win.css("position") && T.css(T.win, {position: "relative"});
1709                        var x = "HTML" == T.win[0].nodeName ? T.body : T.win;
1710                        n(x).scrollTop(0).scrollLeft(0), T.zoom && (T.zoom.css({
1711                            position: "absolute",
1712                            top: 1,
1713                            right: 0,
1714                            "margin-right": u.width + 4
1715                        }), x.append(T.zoom)), u.css({
1716                            position: "absolute",
1717                            top: 0
1718                        }), u.css(u.align ? {right: 0} : {left: 0}), x.append(u), w && (w.css({
1719                            position: "absolute",
1720                            left: 0,
1721                            bottom: 0
1722                        }), w.css(w.align ? {bottom: 0} : {top: 0}), x.append(w))
1723                    } else {
1724                        T.isfixed = "fixed" == T.win.css("position");
1725                        var S = T.isfixed ? "fixed" : "absolute";
1726                        T.isfixed || (T.viewport = T.getViewport(T.win[0])), T.viewport && (T.body = T.viewport, /fixed|absolute/.test(T.viewport.css("position")) || T.css(T.viewport, {position: "relative"})), u.css({position: S}), T.zoom && T.zoom.css({position: S}), T.updateScrollBar(), T.body.append(u), T.zoom && T.body.append(T.zoom), T.railh && (w.css({position: S}), T.body.append(w))
1727                    }
1728                    P.isios && T.css(T.win, {
1729                        "-webkit-tap-highlight-color": "rgba(0,0,0,0)",
1730                        "-webkit-touch-callout": "none"
1731                    }), M.disableoutline && (P.isie && T.win.attr("hideFocus", "true"), P.iswebkit && T.win.css("outline", "none"))
1732                }
1733                if (!1 === M.autohidemode ? (T.autohidedom = !1, T.rail.css({opacity: M.cursoropacitymax}), T.railh && T.railh.css({opacity: M.cursoropacitymax})) : !0 === M.autohidemode || "leave" === M.autohidemode ? (T.autohidedom = n().add(T.rail), P.isie8 && (T.autohidedom = T.autohidedom.add(T.cursor)), T.railh && (T.autohidedom = T.autohidedom.add(T.railh)), T.railh && P.isie8 && (T.autohidedom = T.autohidedom.add(T.cursorh))) : "scroll" == M.autohidemode ? (T.autohidedom = n().add(T.rail), T.railh && (T.autohidedom = T.autohidedom.add(T.railh))) : "cursor" == M.autohidemode ? (T.autohidedom = n().add(T.cursor), T.railh && (T.autohidedom = T.autohidedom.add(T.cursorh))) : "hidden" == M.autohidemode && (T.autohidedom = !1, T.hide(), T.railslocked = !1), P.cantouch || T.istouchcapable || M.emulatetouch || P.hasmstouch) {
1734                    T.scrollmom = new y(T);
1735                    T.ontouchstart = function (e) {
1736                        if (T.locked) return !1;
1737                        if (e.pointerType && ("mouse" === e.pointerType || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return !1;
1738                        if (T.hasmoving = !1, T.scrollmom.timer && (T.triggerScrollEnd(), T.scrollmom.stop()), !T.railslocked) {
1739                            var o = T.getTarget(e);
1740                            if (o && /INPUT/i.test(o.nodeName) && /range/i.test(o.type)) return T.stopPropagation(e);
1741                            var t = "mousedown" === e.type;
1742                            if (!("clientX" in e) && "changedTouches" in e && (e.clientX = e.changedTouches[0].clientX, e.clientY = e.changedTouches[0].clientY), T.forcescreen) {
1743                                var r = e;
1744                                (e = {original: e.original ? e.original : e}).clientX = r.screenX, e.clientY = r.screenY
1745                            }
1746                            if (T.rail.drag = {
1747                                x: e.clientX,
1748                                y: e.clientY,
1749                                sx: T.scroll.x,
1750                                sy: T.scroll.y,
1751                                st: T.getScrollTop(),
1752                                sl: T.getScrollLeft(),
1753                                pt: 2,
1754                                dl: !1,
1755                                tg: o
1756                            }, T.ispage || !M.directionlockdeadzone) T.rail.drag.dl = "f"; else {
1757                                var i = {w: c.width(), h: c.height()}, s = T.getContentSize(), l = s.h - i.h,
1758                                    a = s.w - i.w;
1759                                T.rail.scrollable && !T.railh.scrollable ? T.rail.drag.ck = l > 0 && "v" : !T.rail.scrollable && T.railh.scrollable ? T.rail.drag.ck = a > 0 && "h" : T.rail.drag.ck = !1
1760                            }
1761                            if (M.emulatetouch && T.isiframe && P.isie) {
1762                                var d = T.win.position();
1763                                T.rail.drag.x += d.left, T.rail.drag.y += d.top
1764                            }
1765                            if (T.hasmoving = !1, T.lastmouseup = !1, T.scrollmom.reset(e.clientX, e.clientY), o && t) {
1766                                if (!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName)) return P.hasmousecapture && o.setCapture(), M.emulatetouch ? (o.onclick && !o._onclick && (o._onclick = o.onclick, o.onclick = function (e) {
1767                                    if (T.hasmoving) return !1;
1768                                    o._onclick.call(this, e)
1769                                }), T.cancelEvent(e)) : T.stopPropagation(e);
1770                                /SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type")) && (T.preventclick = {tg: o, click: !1})
1771                            }
1772                        }
1773                    }, T.ontouchend = function (e) {
1774                        if (!T.rail.drag) return !0;
1775                        if (2 == T.rail.drag.pt) {
1776                            if (e.pointerType && ("mouse" === e.pointerType || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return !1;
1777                            T.rail.drag = !1;
1778                            var o = "mouseup" === e.type;
1779                            if (T.hasmoving && (T.scrollmom.doMomentum(), T.lastmouseup = !0, T.hideCursor(), P.hasmousecapture && l.releaseCapture(), o)) return T.cancelEvent(e)
1780                        } else if (1 == T.rail.drag.pt) return T.onmouseup(e)
1781                    };
1782                    var z = M.emulatetouch && T.isiframe && !P.hasmousecapture, k = .3 * M.directionlockdeadzone | 0;
1783                    T.ontouchmove = function (e, o) {
1784                        if (!T.rail.drag) return !0;
1785                        if (e.targetTouches && M.preventmultitouchscrolling && e.targetTouches.length > 1) return !0;
1786                        if (e.pointerType && ("mouse" === e.pointerType || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return !0;
1787                        if (2 == T.rail.drag.pt) {
1788                            "changedTouches" in e && (e.clientX = e.changedTouches[0].clientX, e.clientY = e.changedTouches[0].clientY);
1789                            var t, r;
1790                            if (r = t = 0, z && !o) {
1791                                var i = T.win.position();
1792                                r = -i.left, t = -i.top
1793                            }
1794                            var s = e.clientY + t, n = s - T.rail.drag.y, a = e.clientX + r, c = a - T.rail.drag.x,
1795                                d = T.rail.drag.st - n;
1796                            if (T.ishwscroll && M.bouncescroll) d < 0 ? d = Math.round(d / 2) : d > T.page.maxh && (d = T.page.maxh + Math.round((d - T.page.maxh) / 2)); else if (d < 0 ? (d = 0, s = 0) : d > T.page.maxh && (d = T.page.maxh, s = 0), 0 === s && !T.hasmoving) return T.ispage || (T.rail.drag = !1), !0;
1797                            var u = T.getScrollLeft();
1798                            if (T.railh && T.railh.scrollable && (u = T.isrtlmode ? c - T.rail.drag.sl : T.rail.drag.sl - c, T.ishwscroll && M.bouncescroll ? u < 0 ? u = Math.round(u / 2) : u > T.page.maxw && (u = T.page.maxw + Math.round((u - T.page.maxw) / 2)) : (u < 0 && (u = 0, a = 0), u > T.page.maxw && (u = T.page.maxw, a = 0))), !T.hasmoving) {
1799                                if (T.rail.drag.y === e.clientY && T.rail.drag.x === e.clientX) return T.cancelEvent(e);
1800                                var h = Math.abs(n), p = Math.abs(c), m = M.directionlockdeadzone;
1801                                if (T.rail.drag.ck ? "v" == T.rail.drag.ck ? p > m && h <= k ? T.rail.drag = !1 : h > m && (T.rail.drag.dl = "v") : "h" == T.rail.drag.ck && (h > m && p <= k ? T.rail.drag = !1 : p > m && (T.rail.drag.dl = "h")) : h > m && p > m ? T.rail.drag.dl = "f" : h > m ? T.rail.drag.dl = p > k ? "f" : "v" : p > m && (T.rail.drag.dl = h > k ? "f" : "h"), !T.rail.drag.dl) return T.cancelEvent(e);
1802                                T.triggerScrollStart(e.clientX, e.clientY, 0, 0, 0), T.hasmoving = !0
1803                            }
1804                            return T.preventclick && !T.preventclick.click && (T.preventclick.click = T.preventclick.tg.onclick || !1, T.preventclick.tg.onclick = T.onpreventclick), T.rail.drag.dl && ("v" == T.rail.drag.dl ? u = T.rail.drag.sl : "h" == T.rail.drag.dl && (d = T.rail.drag.st)), T.synched("touchmove", function () {
1805                                T.rail.drag && 2 == T.rail.drag.pt && (T.prepareTransition && T.resetTransition(), T.rail.scrollable && T.setScrollTop(d), T.scrollmom.update(a, s), T.railh && T.railh.scrollable ? (T.setScrollLeft(u), T.showCursor(d, u)) : T.showCursor(d), P.isie10 && l.selection.clear())
1806                            }), T.cancelEvent(e)
1807                        }
1808                        return 1 == T.rail.drag.pt ? T.onmousemove(e) : void 0
1809                    }, T.ontouchstartCursor = function (e, o) {
1810                        if (!T.rail.drag || 3 == T.rail.drag.pt) {
1811                            if (T.locked) return T.cancelEvent(e);
1812                            T.cancelScroll(), T.rail.drag = {
1813                                x: e.touches[0].clientX,
1814                                y: e.touches[0].clientY,
1815                                sx: T.scroll.x,
1816                                sy: T.scroll.y,
1817                                pt: 3,
1818                                hr: !!o
1819                            };
1820                            var t = T.getTarget(e);
1821                            return !T.ispage && P.hasmousecapture && t.setCapture(), T.isiframe && !P.hasmousecapture && (T.saved.csspointerevents = T.doc.css("pointer-events"), T.css(T.doc, {"pointer-events": "none"})), T.cancelEvent(e)
1822                        }
1823                    }, T.ontouchendCursor = function (e) {
1824                        if (T.rail.drag) {
1825                            if (P.hasmousecapture && l.releaseCapture(), T.isiframe && !P.hasmousecapture && T.doc.css("pointer-events", T.saved.csspointerevents), 3 != T.rail.drag.pt) return;
1826                            return T.rail.drag = !1, T.cancelEvent(e)
1827                        }
1828                    }, T.ontouchmoveCursor = function (e) {
1829                        if (T.rail.drag) {
1830                            if (3 != T.rail.drag.pt) return;
1831                            if (T.cursorfreezed = !0, T.rail.drag.hr) {
1832                                T.scroll.x = T.rail.drag.sx + (e.touches[0].clientX - T.rail.drag.x), T.scroll.x < 0 && (T.scroll.x = 0);
1833                                var o = T.scrollvaluemaxw;
1834                                T.scroll.x > o && (T.scroll.x = o)
1835                            } else {
1836                                T.scroll.y = T.rail.drag.sy + (e.touches[0].clientY - T.rail.drag.y), T.scroll.y < 0 && (T.scroll.y = 0);
1837                                var t = T.scrollvaluemax;
1838                                T.scroll.y > t && (T.scroll.y = t)
1839                            }
1840                            return T.synched("touchmove", function () {
1841                                T.rail.drag && 3 == T.rail.drag.pt && (T.showCursor(), T.rail.drag.hr ? T.doScrollLeft(Math.round(T.scroll.x * T.scrollratio.x), M.cursordragspeed) : T.doScrollTop(Math.round(T.scroll.y * T.scrollratio.y), M.cursordragspeed))
1842                            }), T.cancelEvent(e)
1843                        }
1844                    }
1845                }
1846                if (T.onmousedown = function (e, o) {
1847                    if (!T.rail.drag || 1 == T.rail.drag.pt) {
1848                        if (T.railslocked) return T.cancelEvent(e);
1849                        T.cancelScroll(), T.rail.drag = {
1850                            x: e.clientX,
1851                            y: e.clientY,
1852                            sx: T.scroll.x,
1853                            sy: T.scroll.y,
1854                            pt: 1,
1855                            hr: o || !1
1856                        };
1857                        var t = T.getTarget(e);
1858                        return P.hasmousecapture && t.setCapture(), T.isiframe && !P.hasmousecapture && (T.saved.csspointerevents = T.doc.css("pointer-events"), T.css(T.doc, {"pointer-events": "none"})), T.hasmoving = !1, T.cancelEvent(e)
1859                    }
1860                }, T.onmouseup = function (e) {
1861                    if (T.rail.drag) return 1 != T.rail.drag.pt || (P.hasmousecapture && l.releaseCapture(), T.isiframe && !P.hasmousecapture && T.doc.css("pointer-events", T.saved.csspointerevents), T.rail.drag = !1, T.cursorfreezed = !1, T.hasmoving && T.triggerScrollEnd(), T.cancelEvent(e))
1862                }, T.onmousemove = function (e) {
1863                    if (T.rail.drag) {
1864                        if (1 !== T.rail.drag.pt) return;
1865                        if (P.ischrome && 0 === e.which) return T.onmouseup(e);
1866                        if (T.cursorfreezed = !0, T.hasmoving || T.triggerScrollStart(e.clientX, e.clientY, 0, 0, 0), T.hasmoving = !0, T.rail.drag.hr) {
1867                            T.scroll.x = T.rail.drag.sx + (e.clientX - T.rail.drag.x), T.scroll.x < 0 && (T.scroll.x = 0);
1868                            var o = T.scrollvaluemaxw;
1869                            T.scroll.x > o && (T.scroll.x = o)
1870                        } else {
1871                            T.scroll.y = T.rail.drag.sy + (e.clientY - T.rail.drag.y), T.scroll.y < 0 && (T.scroll.y = 0);
1872                            var t = T.scrollvaluemax;
1873                            T.scroll.y > t && (T.scroll.y = t)
1874                        }
1875                        return T.synched("mousemove", function () {
1876                            T.cursorfreezed && (T.showCursor(), T.rail.drag.hr ? T.scrollLeft(Math.round(T.scroll.x * T.scrollratio.x)) : T.scrollTop(Math.round(T.scroll.y * T.scrollratio.y)))
1877                        }), T.cancelEvent(e)
1878                    }
1879                    T.checkarea = 0
1880                }, P.cantouch || M.emulatetouch) T.onpreventclick = function (e) {
1881                    if (T.preventclick) return T.preventclick.tg.onclick = T.preventclick.click, T.preventclick = !1, T.cancelEvent(e)
1882                }, T.onclick = !P.isios && function (e) {
1883                    return !T.lastmouseup || (T.lastmouseup = !1, T.cancelEvent(e))
1884                }, M.grabcursorenabled && P.cursorgrabvalue && (T.css(T.ispage ? T.doc : T.win, {cursor: P.cursorgrabvalue}), T.css(T.rail, {cursor: P.cursorgrabvalue})); else {
1885                    var L = function (e) {
1886                        if (T.selectiondrag) {
1887                            if (e) {
1888                                var o = T.win.outerHeight(), t = e.pageY - T.selectiondrag.top;
1889                                t > 0 && t < o && (t = 0), t >= o && (t -= o), T.selectiondrag.df = t
1890                            }
1891                            if (0 !== T.selectiondrag.df) {
1892                                var r = -2 * T.selectiondrag.df / 6 | 0;
1893                                T.doScrollBy(r), T.debounced("doselectionscroll", function () {
1894                                    L()
1895                                }, 50)
1896                            }
1897                        }
1898                    };
1899                    T.hasTextSelected = "getSelection" in l ? function () {
1900                        return l.getSelection().rangeCount > 0
1901                    } : "selection" in l ? function () {
1902                        return "None" != l.selection.type
1903                    } : function () {
1904                        return !1
1905                    }, T.onselectionstart = function (e) {
1906                        T.ispage || (T.selectiondrag = T.win.offset())
1907                    }, T.onselectionend = function (e) {
1908                        T.selectiondrag = !1
1909                    }, T.onselectiondrag = function (e) {
1910                        T.selectiondrag && T.hasTextSelected() && T.debounced("selectionscroll", function () {
1911                            L(e)
1912                        }, 250)
1913                    }
1914                }
1915                if (P.hasw3ctouch ? (T.css(T.ispage ? n("html") : T.win, {"touch-action": "none"}), T.css(T.rail, {"touch-action": "none"}), T.css(T.cursor, {"touch-action": "none"}), T.bind(T.win, "pointerdown", T.ontouchstart), T.bind(l, "pointerup", T.ontouchend), T.delegate(l, "pointermove", T.ontouchmove)) : P.hasmstouch ? (T.css(T.ispage ? n("html") : T.win, {"-ms-touch-action": "none"}), T.css(T.rail, {"-ms-touch-action": "none"}), T.css(T.cursor, {"-ms-touch-action": "none"}), T.bind(T.win, "MSPointerDown", T.ontouchstart), T.bind(l, "MSPointerUp", T.ontouchend), T.delegate(l, "MSPointerMove", T.ontouchmove), T.bind(T.cursor, "MSGestureHold", function (e) {
1916                    e.preventDefault()
1917                }), T.bind(T.cursor, "contextmenu", function (e) {
1918                    e.preventDefault()
1919                })) : P.cantouch && (T.bind(T.win, "touchstart", T.ontouchstart, !1, !0), T.bind(l, "touchend", T.ontouchend, !1, !0), T.bind(l, "touchcancel", T.ontouchend, !1, !0), T.delegate(l, "touchmove", T.ontouchmove, !1, !0)), M.emulatetouch && (T.bind(T.win, "mousedown", T.ontouchstart, !1, !0), T.bind(l, "mouseup", T.ontouchend, !1, !0), T.bind(l, "mousemove", T.ontouchmove, !1, !0)), (M.cursordragontouch || !P.cantouch && !M.emulatetouch) && (T.rail.css({cursor: "default"}), T.railh && T.railh.css({cursor: "default"}), T.jqbind(T.rail, "mouseenter", function () {
1920                    if (!T.ispage && !T.win.is(":visible")) return !1;
1921                    T.canshowonmouseevent && T.showCursor(), T.rail.active = !0
1922                }), T.jqbind(T.rail, "mouseleave", function () {
1923                    T.rail.active = !1, T.rail.drag || T.hideCursor()
1924                }), M.sensitiverail && (T.bind(T.rail, "click", function (e) {
1925                    T.doRailClick(e, !1, !1)
1926                }), T.bind(T.rail, "dblclick", function (e) {
1927                    T.doRailClick(e, !0, !1)
1928                }), T.bind(T.cursor, "click", function (e) {
1929                    T.cancelEvent(e)
1930                }), T.bind(T.cursor, "dblclick", function (e) {
1931                    T.cancelEvent(e)
1932                })), T.railh && (T.jqbind(T.railh, "mouseenter", function () {
1933                    if (!T.ispage && !T.win.is(":visible")) return !1;
1934                    T.canshowonmouseevent && T.showCursor(), T.rail.active = !0
1935                }), T.jqbind(T.railh, "mouseleave", function () {
1936                    T.rail.active = !1, T.rail.drag || T.hideCursor()
1937                }), M.sensitiverail && (T.bind(T.railh, "click", function (e) {
1938                    T.doRailClick(e, !1, !0)
1939                }), T.bind(T.railh, "dblclick", function (e) {
1940                    T.doRailClick(e, !0, !0)
1941                }), T.bind(T.cursorh, "click", function (e) {
1942                    T.cancelEvent(e)
1943                }), T.bind(T.cursorh, "dblclick", function (e) {
1944                    T.cancelEvent(e)
1945                })))), M.cursordragontouch && (this.istouchcapable || P.cantouch) && (T.bind(T.cursor, "touchstart", T.ontouchstartCursor), T.bind(T.cursor, "touchmove", T.ontouchmoveCursor), T.bind(T.cursor, "touchend", T.ontouchendCursor), T.cursorh && T.bind(T.cursorh, "touchstart", function (e) {
1946                    T.ontouchstartCursor(e, !0)
1947                }), T.cursorh && T.bind(T.cursorh, "touchmove", T.ontouchmoveCursor), T.cursorh && T.bind(T.cursorh, "touchend", T.ontouchendCursor)), M.emulatetouch || P.isandroid || P.isios ? (T.bind(P.hasmousecapture ? T.win : l, "mouseup", T.ontouchend), T.onclick && T.bind(l, "click", T.onclick), M.cursordragontouch ? (T.bind(T.cursor, "mousedown", T.onmousedown), T.bind(T.cursor, "mouseup", T.onmouseup), T.cursorh && T.bind(T.cursorh, "mousedown", function (e) {
1948                    T.onmousedown(e, !0)
1949                }), T.cursorh && T.bind(T.cursorh, "mouseup", T.onmouseup)) : (T.bind(T.rail, "mousedown", function (e) {
1950                    e.preventDefault()
1951                }), T.railh && T.bind(T.railh, "mousedown", function (e) {
1952                    e.preventDefault()
1953                }))) : (T.bind(P.hasmousecapture ? T.win : l, "mouseup", T.onmouseup), T.bind(l, "mousemove", T.onmousemove), T.onclick && T.bind(l, "click", T.onclick), T.bind(T.cursor, "mousedown", T.onmousedown), T.bind(T.cursor, "mouseup", T.onmouseup), T.railh && (T.bind(T.cursorh, "mousedown", function (e) {
1954                    T.onmousedown(e, !0)
1955                }), T.bind(T.cursorh, "mouseup", T.onmouseup)), !T.ispage && M.enablescrollonselection && (T.bind(T.win[0], "mousedown", T.onselectionstart), T.bind(l, "mouseup", T.onselectionend), T.bind(T.cursor, "mouseup", T.onselectionend), T.cursorh && T.bind(T.cursorh, "mouseup", T.onselectionend), T.bind(l, "mousemove", T.onselectiondrag)), T.zoom && (T.jqbind(T.zoom, "mouseenter", function () {
1956                    T.canshowonmouseevent && T.showCursor(), T.rail.active = !0
1957                }), T.jqbind(T.zoom, "mouseleave", function () {
1958                    T.rail.active = !1, T.rail.drag || T.hideCursor()
1959                }))), M.enablemousewheel && (T.isiframe || T.mousewheel(P.isie && T.ispage ? l : T.win, T.onmousewheel), T.mousewheel(T.rail, T.onmousewheel), T.railh && T.mousewheel(T.railh, T.onmousewheelhr)), T.ispage || P.cantouch || /HTML|^BODY/.test(T.win[0].nodeName) || (T.win.attr("tabindex") || T.win.attr({tabindex: ++r}), T.bind(T.win, "focus", function (e) {
1960                    o = T.getTarget(e).id || T.getTarget(e) || !1, T.hasfocus = !0, T.canshowonmouseevent && T.noticeCursor()
1961                }), T.bind(T.win, "blur", function (e) {
1962                    o = !1, T.hasfocus = !1
1963                }), T.bind(T.win, "mouseenter", function (e) {
1964                    t = T.getTarget(e).id || T.getTarget(e) || !1, T.hasmousefocus = !0, T.canshowonmouseevent && T.noticeCursor()
1965                }), T.bind(T.win, "mouseleave", function (e) {
1966                    t = !1, T.hasmousefocus = !1, T.rail.drag || T.hideCursor()
1967                })), T.onkeypress = function (e) {
1968                    if (T.railslocked && 0 === T.page.maxh) return !0;
1969                    e = e || a.event;
1970                    var r = T.getTarget(e);
1971                    if (r && /INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName) && (!(r.getAttribute("type") || r.type || !1) || !/submit|button|cancel/i.tp)) return !0;
1972                    if (n(r).attr("contenteditable")) return !0;
1973                    if (T.hasfocus || T.hasmousefocus && !o || T.ispage && !o && !t) {
1974                        var i = e.keyCode;
1975                        if (T.railslocked && 27 != i) return T.cancelEvent(e);
1976                        var s = e.ctrlKey || !1, l = e.shiftKey || !1, c = !1;
1977                        switch (i) {
1978                            case 38:
1979                            case 63233:
1980                                T.doScrollBy(72), c = !0;
1981                                break;
1982                            case 40:
1983                            case 63235:
1984                                T.doScrollBy(-72), c = !0;
1985                                break;
1986                            case 37:
1987                            case 63232:
1988                                T.railh && (s ? T.doScrollLeft(0) : T.doScrollLeftBy(72), c = !0);
1989                                break;
1990                            case 39:
1991                            case 63234:
1992                                T.railh && (s ? T.doScrollLeft(T.page.maxw) : T.doScrollLeftBy(-72), c = !0);
1993                                break;
1994                            case 33:
1995                            case 63276:
1996                                T.doScrollBy(T.view.h), c = !0;
1997                                break;
1998                            case 34:
1999                            case 63277:
2000                                T.doScrollBy(-T.view.h), c = !0;
2001                                break;
2002                            case 36:
2003                            case 63273:
2004                                T.railh && s ? T.doScrollPos(0, 0) : T.doScrollTo(0), c = !0;
2005                                break;
2006                            case 35:
2007                            case 63275:
2008                                T.railh && s ? T.doScrollPos(T.page.maxw, T.page.maxh) : T.doScrollTo(T.page.maxh), c = !0;
2009                                break;
2010                            case 32:
2011                                M.spacebarenabled && (l ? T.doScrollBy(T.view.h) : T.doScrollBy(-T.view.h), c = !0);
2012                                break;
2013                            case 27:
2014                                T.zoomactive && (T.doZoom(), c = !0)
2015                        }
2016                        if (c) return T.cancelEvent(e)
2017                    }
2018                }, M.enablekeyboard && T.bind(l, P.isopera && !P.isopera12 ? "keypress" : "keydown", T.onkeypress), T.bind(l, "keydown", function (e) {
2019                    (e.ctrlKey || !1) && (T.wheelprevented = !0)
2020                }), T.bind(l, "keyup", function (e) {
2021                    e.ctrlKey || !1 || (T.wheelprevented = !1)
2022                }), T.bind(a, "blur", function (e) {
2023                    T.wheelprevented = !1
2024                }), T.bind(a, "resize", T.onscreenresize), T.bind(a, "orientationchange", T.onscreenresize), T.bind(a, "load", T.lazyResize), P.ischrome && !T.ispage && !T.haswrapper) {
2025                    var C = T.win.attr("style"), N = parseFloat(T.win.css("width")) + 1;
2026                    T.win.css("width", N), T.synched("chromefix", function () {
2027                        T.win.attr("style", C)
2028                    })
2029                }
2030                if (T.onAttributeChange = function (e) {
2031                    T.lazyResize(T.isieold ? 250 : 30)
2032                }, M.enableobserver && (T.isie11 || !1 === m || (T.observerbody = new m(function (e) {
2033                    if (e.forEach(function (e) {
2034                        if ("attributes" == e.type) return E.hasClass("modal-open") && E.hasClass("modal-dialog") && !n.contains(n(".modal-dialog")[0], T.doc[0]) ? T.hide() : T.show()
2035                    }), T.me.clientWidth != T.page.width || T.me.clientHeight != T.page.height) return T.lazyResize(30)
2036                }), T.observerbody.observe(l.body, {
2037                    childList: !0,
2038                    subtree: !0,
2039                    characterData: !1,
2040                    attributes: !0,
2041                    attributeFilter: ["class"]
2042                })), !T.ispage && !T.haswrapper)) {
2043                    var R = T.win[0];
2044                    !1 !== m ? (T.observer = new m(function (e) {
2045                        e.forEach(T.onAttributeChange)
2046                    }), T.observer.observe(R, {
2047                        childList: !0,
2048                        characterData: !1,
2049                        attributes: !0,
2050                        subtree: !1
2051                    }), T.observerremover = new m(function (e) {
2052                        e.forEach(function (e) {
2053                            if (e.removedNodes.length > 0) for (var o in e.removedNodes) if (T && e.removedNodes[o] === R) return T.remove()
2054                        })
2055                    }), T.observerremover.observe(R.parentNode, {
2056                        childList: !0,
2057                        characterData: !1,
2058                        attributes: !1,
2059                        subtree: !1
2060                    })) : (T.bind(R, P.isie && !P.isie9 ? "propertychange" : "DOMAttrModified", T.onAttributeChange), P.isie9 && R.attachEvent("onpropertychange", T.onAttributeChange), T.bind(R, "DOMNodeRemoved", function (e) {
2061                        e.target === R && T.remove()
2062                    }))
2063                }
2064                !T.ispage && M.boxzoom && T.bind(a, "resize", T.resizeZoom), T.istextarea && (T.bind(T.win, "keydown", T.lazyResize), T.bind(T.win, "mouseup", T.lazyResize)), T.lazyResize(30)
2065            }
2066            if ("IFRAME" == this.doc[0].nodeName) {
2067                var _ = function () {
2068                    T.iframexd = !1;
2069                    var o;
2070                    try {
2071                        (o = "contentDocument" in this ? this.contentDocument : this.contentWindow._doc).domain
2072                    } catch (e) {
2073                        T.iframexd = !0, o = !1
2074                    }
2075                    if (T.iframexd) return "console" in a && console.log("NiceScroll error: policy restriced iframe"), !0;
2076                    if (T.forcescreen = !0, T.isiframe && (T.iframe = {
2077                        doc: n(o),
2078                        html: T.doc.contents().find("html")[0],
2079                        body: T.doc.contents().find("body")[0]
2080                    }, T.getContentSize = function () {
2081                        return {
2082                            w: Math.max(T.iframe.html.scrollWidth, T.iframe.body.scrollWidth),
2083                            h: Math.max(T.iframe.html.scrollHeight, T.iframe.body.scrollHeight)
2084                        }
2085                    }, T.docscroll = n(T.iframe.body)), !P.isios && M.iframeautoresize && !T.isiframe) {
2086                        T.win.scrollTop(0), T.doc.height("");
2087                        var t = Math.max(o.getElementsByTagName("html")[0].scrollHeight, o.body.scrollHeight);
2088                        T.doc.height(t)
2089                    }
2090                    T.lazyResize(30), T.css(n(T.iframe.body), e), P.isios && T.haswrapper && T.css(n(o.body), {"-webkit-transform": "translate3d(0,0,0)"}), "contentWindow" in this ? T.bind(this.contentWindow, "scroll", T.onscroll) : T.bind(o, "scroll", T.onscroll), M.enablemousewheel && T.mousewheel(o, T.onmousewheel), M.enablekeyboard && T.bind(o, P.isopera ? "keypress" : "keydown", T.onkeypress), P.cantouch ? (T.bind(o, "touchstart", T.ontouchstart), T.bind(o, "touchmove", T.ontouchmove)) : M.emulatetouch && (T.bind(o, "mousedown", T.ontouchstart), T.bind(o, "mousemove", function (e) {
2091                        return T.ontouchmove(e, !0)
2092                    }), M.grabcursorenabled && P.cursorgrabvalue && T.css(n(o.body), {cursor: P.cursorgrabvalue})), T.bind(o, "mouseup", T.ontouchend), T.zoom && (M.dblclickzoom && T.bind(o, "dblclick", T.doZoom), T.ongesturezoom && T.bind(o, "gestureend", T.ongesturezoom))
2093                };
2094                this.doc[0].readyState && "complete" === this.doc[0].readyState && setTimeout(function () {
2095                    _.call(T.doc[0], !1)
2096                }, 500), T.bind(this.doc, "load", _)
2097            }
2098        }, this.showCursor = function (e, o) {
2099            if (T.cursortimeout && (clearTimeout(T.cursortimeout), T.cursortimeout = 0), T.rail) {
2100                if (T.autohidedom && (T.autohidedom.stop().css({opacity: M.cursoropacitymax}), T.cursoractive = !0), T.rail.drag && 1 == T.rail.drag.pt || (void 0 !== e && !1 !== e && (T.scroll.y = e / T.scrollratio.y | 0), void 0 !== o && (T.scroll.x = o / T.scrollratio.x | 0)), T.cursor.css({
2101                    height: T.cursorheight,
2102                    top: T.scroll.y
2103                }), T.cursorh) {
2104                    var t = T.hasreversehr ? T.scrollvaluemaxw - T.scroll.x : T.scroll.x;
2105                    T.cursorh.css({
2106                        width: T.cursorwidth,
2107                        left: !T.rail.align && T.rail.visibility ? t + T.rail.width : t
2108                    }), T.cursoractive = !0
2109                }
2110                T.zoom && T.zoom.stop().css({opacity: M.cursoropacitymax})
2111            }
2112        }, this.hideCursor = function (e) {
2113            T.cursortimeout || T.rail && T.autohidedom && (T.hasmousefocus && "leave" === M.autohidemode || (T.cursortimeout = setTimeout(function () {
2114                T.rail.active && T.showonmouseevent || (T.autohidedom.stop().animate({opacity: M.cursoropacitymin}), T.zoom && T.zoom.stop().animate({opacity: M.cursoropacitymin}), T.cursoractive = !1), T.cursortimeout = 0
2115            }, e || M.hidecursordelay)))
2116        }, this.noticeCursor = function (e, o, t) {
2117            T.showCursor(o, t), T.rail.active || T.hideCursor(e)
2118        }, this.getContentSize = T.ispage ? function () {
2119            return {
2120                w: Math.max(l.body.scrollWidth, l.documentElement.scrollWidth),
2121                h: Math.max(l.body.scrollHeight, l.documentElement.scrollHeight)
2122            }
2123        } : T.haswrapper ? function () {
2124            return {w: T.doc[0].offsetWidth, h: T.doc[0].offsetHeight}
2125        } : function () {
2126            return {w: T.docscroll[0].scrollWidth, h: T.docscroll[0].scrollHeight}
2127        }, this.onResize = function (e, o) {
2128            if (!T || !T.win) return !1;
2129            var t = T.page.maxh, r = T.page.maxw, i = T.view.h, s = T.view.w;
2130            if (T.view = {
2131                w: T.ispage ? T.win.width() : T.win[0].clientWidth,
2132                h: T.ispage ? T.win.height() : T.win[0].clientHeight
2133            }, T.page = o || T.getContentSize(), T.page.maxh = Math.max(0, T.page.h - T.view.h), T.page.maxw = Math.max(0, T.page.w - T.view.w), T.page.maxh == t && T.page.maxw == r && T.view.w == s && T.view.h == i) {
2134                if (T.ispage) return T;
2135                var n = T.win.offset();
2136                if (T.lastposition) {
2137                    var l = T.lastposition;
2138                    if (l.top == n.top && l.left == n.left) return T
2139                }
2140                T.lastposition = n
2141            }
2142            return 0 === T.page.maxh ? (T.hideRail(), T.scrollvaluemax = 0, T.scroll.y = 0, T.scrollratio.y = 0, T.cursorheight = 0, T.setScrollTop(0), T.rail && (T.rail.scrollable = !1)) : (T.page.maxh -= M.railpadding.top + M.railpadding.bottom, T.rail.scrollable = !0), 0 === T.page.maxw ? (T.hideRailHr(), T.scrollvaluemaxw = 0, T.scroll.x = 0, T.scrollratio.x = 0, T.cursorwidth = 0, T.setScrollLeft(0), T.railh && (T.railh.scrollable = !1)) : (T.page.maxw -= M.railpadding.left + M.railpadding.right, T.railh && (T.railh.scrollable = M.horizrailenabled)), T.railslocked = T.locked || 0 === T.page.maxh && 0 === T.page.maxw, T.railslocked ? (T.ispage || T.updateScrollBar(T.view), !1) : (T.hidden || (T.rail.visibility || T.showRail(), T.railh && !T.railh.visibility && T.showRailHr()), T.istextarea && T.win.css("resize") && "none" != T.win.css("resize") && (T.view.h -= 20), T.cursorheight = Math.min(T.view.h, Math.round(T.view.h * (T.view.h / T.page.h))), T.cursorheight = M.cursorfixedheight ? M.cursorfixedheight : Math.max(M.cursorminheight, T.cursorheight), T.cursorwidth = Math.min(T.view.w, Math.round(T.view.w * (T.view.w / T.page.w))), T.cursorwidth = M.cursorfixedheight ? M.cursorfixedheight : Math.max(M.cursorminheight, T.cursorwidth), T.scrollvaluemax = T.view.h - T.cursorheight - (M.railpadding.top + M.railpadding.bottom), T.hasborderbox || (T.scrollvaluemax -= T.cursor[0].offsetHeight - T.cursor[0].clientHeight), T.railh && (T.railh.width = T.page.maxh > 0 ? T.view.w - T.rail.width : T.view.w, T.scrollvaluemaxw = T.railh.width - T.cursorwidth - (M.railpadding.left + M.railpadding.right)), T.ispage || T.updateScrollBar(T.view), T.scrollratio = {
2143                x: T.page.maxw / T.scrollvaluemaxw,
2144                y: T.page.maxh / T.scrollvaluemax
2145            }, T.getScrollTop() > T.page.maxh ? T.doScrollTop(T.page.maxh) : (T.scroll.y = T.getScrollTop() / T.scrollratio.y | 0, T.scroll.x = T.getScrollLeft() / T.scrollratio.x | 0, T.cursoractive && T.noticeCursor()), T.scroll.y && 0 === T.getScrollTop() && T.doScrollTo(T.scroll.y * T.scrollratio.y | 0), T)
2146        }, this.resize = T.onResize;
2147        var O = 0;
2148        this.onscreenresize = function (e) {
2149            clearTimeout(O);
2150            var o = !T.ispage && !T.haswrapper;
2151            o && T.hideRails(), O = setTimeout(function () {
2152                T && (o && T.showRails(), T.resize()), O = 0
2153            }, 120)
2154        }, this.lazyResize = function (e) {
2155            return clearTimeout(O), e = isNaN(e) ? 240 : e, O = setTimeout(function () {
2156                T && T.resize(), O = 0
2157            }, e), T
2158        }, this.jqbind = function (e, o, t) {
2159            T.events.push({e: e, n: o, f: t, q: !0}), n(e).on(o, t)
2160        }, this.mousewheel = function (e, o, t) {
2161            var r = "jquery" in e ? e[0] : e;
2162            if ("onwheel" in l.createElement("div")) T._bind(r, "wheel", o, t || !1); else {
2163                var i = void 0 !== l.onmousewheel ? "mousewheel" : "DOMMouseScroll";
2164                S(r, i, o, t || !1), "DOMMouseScroll" == i && S(r, "MozMousePixelScroll", o, t || !1)
2165            }
2166        };
2167        var Y = !1;
2168        if (P.haseventlistener) {
2169            try {
2170                var H = Object.defineProperty({}, "passive", {
2171                    get: function () {
2172                        Y = !0
2173                    }
2174                });
2175                a.addEventListener("test", null, H)
2176            } catch (e) {
2177            }
2178            this.stopPropagation = function (e) {
2179                return !!e && ((e = e.original ? e.original : e).stopPropagation(), !1)
2180            }, this.cancelEvent = function (e) {
2181                return e.cancelable && e.preventDefault(), e.stopImmediatePropagation(), e.preventManipulation && e.preventManipulation(), !1
2182            }
2183        } else Event.prototype.preventDefault = function () {
2184            this.returnValue = !1
2185        }, Event.prototype.stopPropagation = function () {
2186            this.cancelBubble = !0
2187        }, a.constructor.prototype.addEventListener = l.constructor.prototype.addEventListener = Element.prototype.addEventListener = function (e, o, t) {
2188            this.attachEvent("on" + e, o)
2189        }, a.constructor.prototype.removeEventListener = l.constructor.prototype.removeEventListener = Element.prototype.removeEventListener = function (e, o, t) {
2190            this.detachEvent("on" + e, o)
2191        }, this.cancelEvent = function (e) {
2192            return (e = e || a.event) && (e.cancelBubble = !0, e.cancel = !0, e.returnValue = !1), !1
2193        }, this.stopPropagation = function (e) {
2194            return (e = e || a.event) && (e.cancelBubble = !0), !1
2195        };
2196        this.delegate = function (e, o, t, r, i) {
2197            var s = d[o] || !1;
2198            s || (s = {
2199                a: [], l: [], f: function (e) {
2200                    for (var o = s.l, t = !1, r = o.length - 1; r >= 0; r--) if (!1 === (t = o[r].call(e.target, e))) return !1;
2201                    return t
2202                }
2203            }, T.bind(e, o, s.f, r, i), d[o] = s), T.ispage ? (s.a = [T.id].concat(s.a), s.l = [t].concat(s.l)) : (s.a.push(T.id), s.l.push(t))
2204        }, this.undelegate = function (e, o, t, r, i) {
2205            var s = d[o] || !1;
2206            if (s && s.l) for (var n = 0, l = s.l.length; n < l; n++) s.a[n] === T.id && (s.a.splice(n), s.l.splice(n), 0 === s.a.length && (T._unbind(e, o, s.l.f), d[o] = null))
2207        }, this.bind = function (e, o, t, r, i) {
2208            var s = "jquery" in e ? e[0] : e;
2209            T._bind(s, o, t, r || !1, i || !1)
2210        }, this._bind = function (e, o, t, r, i) {
2211            T.events.push({e: e, n: o, f: t, b: r, q: !1}), Y && i ? e.addEventListener(o, t, {
2212                passive: !1,
2213                capture: r
2214            }) : e.addEventListener(o, t, r || !1)
2215        }, this._unbind = function (e, o, t, r) {
2216            d[o] ? T.undelegate(e, o, t, r) : e.removeEventListener(o, t, r)
2217        }, this.unbindAll = function () {
2218            for (var e = 0; e < T.events.length; e++) {
2219                var o = T.events[e];
2220                o.q ? o.e.unbind(o.n, o.f) : T._unbind(o.e, o.n, o.f, o.b)
2221            }
2222        }, this.showRails = function () {
2223            return T.showRail().showRailHr()
2224        }, this.showRail = function () {
2225            return 0 === T.page.maxh || !T.ispage && "none" == T.win.css("display") || (T.rail.visibility = !0, T.rail.css("display", "block")), T
2226        }, this.showRailHr = function () {
2227            return T.railh && (0 === T.page.maxw || !T.ispage && "none" == T.win.css("display") || (T.railh.visibility = !0, T.railh.css("display", "block"))), T
2228        }, this.hideRails = function () {
2229            return T.hideRail().hideRailHr()
2230        }, this.hideRail = function () {
2231            return T.rail.visibility = !1, T.rail.css("display", "none"), T
2232        }, this.hideRailHr = function () {
2233            return T.railh && (T.railh.visibility = !1, T.railh.css("display", "none")), T
2234        }, this.show = function () {
2235            return T.hidden = !1, T.railslocked = !1, T.showRails()
2236        }, this.hide = function () {
2237            return T.hidden = !0, T.railslocked = !0, T.hideRails()
2238        }, this.toggle = function () {
2239            return T.hidden ? T.show() : T.hide()
2240        }, this.remove = function () {
2241            T.stop(), T.cursortimeout && clearTimeout(T.cursortimeout);
2242            for (var e in T.delaylist) T.delaylist[e] && h(T.delaylist[e].h);
2243            T.doZoomOut(), T.unbindAll(), P.isie9 && T.win[0].detachEvent("onpropertychange", T.onAttributeChange), !1 !== T.observer && T.observer.disconnect(), !1 !== T.observerremover && T.observerremover.disconnect(), !1 !== T.observerbody && T.observerbody.disconnect(), T.events = null, T.cursor && T.cursor.remove(), T.cursorh && T.cursorh.remove(), T.rail && T.rail.remove(), T.railh && T.railh.remove(), T.zoom && T.zoom.remove();
2244            for (var o = 0; o < T.saved.css.length; o++) {
2245                var t = T.saved.css[o];
2246                t[0].css(t[1], void 0 === t[2] ? "" : t[2])
2247            }
2248            T.saved = !1, T.me.data("__nicescroll", "");
2249            var r = n.nicescroll;
2250            r.each(function (e) {
2251                if (this && this.id === T.id) {
2252                    delete r[e];
2253                    for (var o = ++e; o < r.length; o++, e++) r[e] = r[o];
2254                    --r.length && delete r[r.length]
2255                }
2256            });
2257            for (var i in T) T[i] = null, delete T[i];
2258            T = null
2259        }, this.scrollstart = function (e) {
2260            return this.onscrollstart = e, T
2261        }, this.scrollend = function (e) {
2262            return this.onscrollend = e, T
2263        }, this.scrollcancel = function (e) {
2264            return this.onscrollcancel = e, T
2265        }, this.zoomin = function (e) {
2266            return this.onzoomin = e, T
2267        }, this.zoomout = function (e) {
2268            return this.onzoomout = e, T
2269        }, this.isScrollable = function (e) {
2270            var o = e.target ? e.target : e;
2271            if ("OPTION" == o.nodeName) return !0;
2272            for (; o && 1 == o.nodeType && o !== this.me[0] && !/^BODY|HTML/.test(o.nodeName);) {
2273                var t = n(o), r = t.css("overflowY") || t.css("overflowX") || t.css("overflow") || "";
2274                if (/scroll|auto/.test(r)) return o.clientHeight != o.scrollHeight;
2275                o = !!o.parentNode && o.parentNode
2276            }
2277            return !1
2278        }, this.getViewport = function (e) {
2279            for (var o = !(!e || !e.parentNode) && e.parentNode; o && 1 == o.nodeType && !/^BODY|HTML/.test(o.nodeName);) {
2280                var t = n(o);
2281                if (/fixed|absolute/.test(t.css("position"))) return t;
2282                var r = t.css("overflowY") || t.css("overflowX") || t.css("overflow") || "";
2283                if (/scroll|auto/.test(r) && o.clientHeight != o.scrollHeight) return t;
2284                if (t.getNiceScroll().length > 0) return t;
2285                o = !!o.parentNode && o.parentNode
2286            }
2287            return !1
2288        }, this.triggerScrollStart = function (e, o, t, r, i) {
2289            if (T.onscrollstart) {
2290                var s = {
2291                    type: "scrollstart",
2292                    current: {x: e, y: o},
2293                    request: {x: t, y: r},
2294                    end: {x: T.newscrollx, y: T.newscrolly},
2295                    speed: i
2296                };
2297                T.onscrollstart.call(T, s)
2298            }
2299        }, this.triggerScrollEnd = function () {
2300            if (T.onscrollend) {
2301                var e = T.getScrollLeft(), o = T.getScrollTop(),
2302                    t = {type: "scrollend", current: {x: e, y: o}, end: {x: e, y: o}};
2303                T.onscrollend.call(T, t)
2304            }
2305        };
2306        var B = 0, X = 0, D = 0, A = 1, q = !1;
2307        if (this.onmousewheel = function (e) {
2308            if (T.wheelprevented || T.locked) return !1;
2309            if (T.railslocked) return T.debounced("checkunlock", T.resize, 250), !1;
2310            if (T.rail.drag) return T.cancelEvent(e);
2311            if ("auto" === M.oneaxismousemode && 0 !== e.deltaX && (M.oneaxismousemode = !1), M.oneaxismousemode && 0 === e.deltaX && !T.rail.scrollable) return !T.railh || !T.railh.scrollable || T.onmousewheelhr(e);
2312            var o = f(), t = !1;
2313            if (M.preservenativescrolling && T.checkarea + 600 < o && (T.nativescrollingarea = T.isScrollable(e), t = !0), T.checkarea = o, T.nativescrollingarea) return !0;
2314            var r = k(e, !1, t);
2315            return r && (T.checkarea = 0), r
2316        }, this.onmousewheelhr = function (e) {
2317            if (!T.wheelprevented) {
2318                if (T.railslocked || !T.railh.scrollable) return !0;
2319                if (T.rail.drag) return T.cancelEvent(e);
2320                var o = f(), t = !1;
2321                return M.preservenativescrolling && T.checkarea + 600 < o && (T.nativescrollingarea = T.isScrollable(e), t = !0), T.checkarea = o, !!T.nativescrollingarea || (T.railslocked ? T.cancelEvent(e) : k(e, !0, t))
2322            }
2323        }, this.stop = function () {
2324            return T.cancelScroll(), T.scrollmon && T.scrollmon.stop(), T.cursorfreezed = !1, T.scroll.y = Math.round(T.getScrollTop() * (1 / T.scrollratio.y)), T.noticeCursor(), T
2325        }, this.getTransitionSpeed = function (e) {
2326            return 80 + e / 72 * M.scrollspeed | 0
2327        }, M.smoothscroll) if (T.ishwscroll && P.hastransition && M.usetransition && M.smoothscroll) {
2328            var j = "";
2329            this.resetTransition = function () {
2330                j = "", T.doc.css(P.prefixstyle + "transition-duration", "0ms")
2331            }, this.prepareTransition = function (e, o) {
2332                var t = o ? e : T.getTransitionSpeed(e), r = t + "ms";
2333                return j !== r && (j = r, T.doc.css(P.prefixstyle + "transition-duration", r)), t
2334            }, this.doScrollLeft = function (e, o) {
2335                var t = T.scrollrunning ? T.newscrolly : T.getScrollTop();
2336                T.doScrollPos(e, t, o)
2337            }, this.doScrollTop = function (e, o) {
2338                var t = T.scrollrunning ? T.newscrollx : T.getScrollLeft();
2339                T.doScrollPos(t, e, o)
2340            }, this.cursorupdate = {
2341                running: !1, start: function () {
2342                    var e = this;
2343                    if (!e.running) {
2344                        e.running = !0;
2345                        var o = function () {
2346                            e.running && u(o), T.showCursor(T.getScrollTop(), T.getScrollLeft()), T.notifyScrollEvent(T.win[0])
2347                        };
2348                        u(o)
2349                    }
2350                }, stop: function () {
2351                    this.running = !1
2352                }
2353            }, this.doScrollPos = function (e, o, t) {
2354                var r = T.getScrollTop(), i = T.getScrollLeft();
2355                if (((T.newscrolly - r) * (o - r) < 0 || (T.newscrollx - i) * (e - i) < 0) && T.cancelScroll(), M.bouncescroll ? (o < 0 ? o = o / 2 | 0 : o > T.page.maxh && (o = T.page.maxh + (o - T.page.maxh) / 2 | 0), e < 0 ? e = e / 2 | 0 : e > T.page.maxw && (e = T.page.maxw + (e - T.page.maxw) / 2 | 0)) : (o < 0 ? o = 0 : o > T.page.maxh && (o = T.page.maxh), e < 0 ? e = 0 : e > T.page.maxw && (e = T.page.maxw)), T.scrollrunning && e == T.newscrollx && o == T.newscrolly) return !1;
2356                T.newscrolly = o, T.newscrollx = e;
2357                var s = T.getScrollTop(), n = T.getScrollLeft(), l = {};
2358                l.x = e - n, l.y = o - s;
2359                var a = 0 | Math.sqrt(l.x * l.x + l.y * l.y), c = T.prepareTransition(a);
2360                T.scrollrunning || (T.scrollrunning = !0, T.triggerScrollStart(n, s, e, o, c), T.cursorupdate.start()), T.scrollendtrapped = !0, P.transitionend || (T.scrollendtrapped && clearTimeout(T.scrollendtrapped), T.scrollendtrapped = setTimeout(T.onScrollTransitionEnd, c)), T.setScrollTop(T.newscrolly), T.setScrollLeft(T.newscrollx)
2361            }, this.cancelScroll = function () {
2362                if (!T.scrollendtrapped) return !0;
2363                var e = T.getScrollTop(), o = T.getScrollLeft();
2364                return T.scrollrunning = !1, P.transitionend || clearTimeout(P.transitionend), T.scrollendtrapped = !1, T.resetTransition(), T.setScrollTop(e), T.railh && T.setScrollLeft(o), T.timerscroll && T.timerscroll.tm && clearInterval(T.timerscroll.tm), T.timerscroll = !1, T.cursorfreezed = !1, T.cursorupdate.stop(), T.showCursor(e, o), T
2365            }, this.onScrollTransitionEnd = function () {
2366                if (T.scrollendtrapped) {
2367                    var e = T.getScrollTop(), o = T.getScrollLeft();
2368                    if (e < 0 ? e = 0 : e > T.page.maxh && (e = T.page.maxh), o < 0 ? o = 0 : o > T.page.maxw && (o = T.page.maxw), e != T.newscrolly || o != T.newscrollx) return T.doScrollPos(o, e, M.snapbackspeed);
2369                    T.scrollrunning && T.triggerScrollEnd(), T.scrollrunning = !1, T.scrollendtrapped = !1, T.resetTransition(), T.timerscroll = !1, T.setScrollTop(e), T.railh && T.setScrollLeft(o), T.cursorupdate.stop(), T.noticeCursor(!1, e, o), T.cursorfreezed = !1
2370                }
2371            }
2372        } else this.doScrollLeft = function (e, o) {
2373            var t = T.scrollrunning ? T.newscrolly : T.getScrollTop();
2374            T.doScrollPos(e, t, o)
2375        }, this.doScrollTop = function (e, o) {
2376            var t = T.scrollrunning ? T.newscrollx : T.getScrollLeft();
2377            T.doScrollPos(t, e, o)
2378        }, this.doScrollPos = function (e, o, t) {
2379            var r = T.getScrollTop(), i = T.getScrollLeft();
2380            ((T.newscrolly - r) * (o - r) < 0 || (T.newscrollx - i) * (e - i) < 0) && T.cancelScroll();
2381            var s = !1;
2382            if (T.bouncescroll && T.rail.visibility || (o < 0 ? (o = 0, s = !0) : o > T.page.maxh && (o = T.page.maxh, s = !0)), T.bouncescroll && T.railh.visibility || (e < 0 ? (e = 0, s = !0) : e > T.page.maxw && (e = T.page.maxw, s = !0)), T.scrollrunning && T.newscrolly === o && T.newscrollx === e) return !0;
2383            T.newscrolly = o, T.newscrollx = e, T.dst = {}, T.dst.x = e - i, T.dst.y = o - r, T.dst.px = i, T.dst.py = r;
2384            var n = 0 | Math.sqrt(T.dst.x * T.dst.x + T.dst.y * T.dst.y), l = T.getTransitionSpeed(n);
2385            T.bzscroll = {};
2386            var a = s ? 1 : .58;
2387            T.bzscroll.x = new R(i, T.newscrollx, l, 0, 0, a, 1), T.bzscroll.y = new R(r, T.newscrolly, l, 0, 0, a, 1);
2388            f();
2389            var c = function () {
2390                if (T.scrollrunning) {
2391                    var e = T.bzscroll.y.getPos();
2392                    T.setScrollLeft(T.bzscroll.x.getNow()), T.setScrollTop(T.bzscroll.y.getNow()), e <= 1 ? T.timer = u(c) : (T.scrollrunning = !1, T.timer = 0, T.triggerScrollEnd())
2393                }
2394            };
2395            T.scrollrunning || (T.triggerScrollStart(i, r, e, o, l), T.scrollrunning = !0, T.timer = u(c))
2396        }, this.cancelScroll = function () {
2397            return T.timer && h(T.timer), T.timer = 0, T.bzscroll = !1, T.scrollrunning = !1, T
2398        }; else this.doScrollLeft = function (e, o) {
2399            var t = T.getScrollTop();
2400            T.doScrollPos(e, t, o)
2401        }, this.doScrollTop = function (e, o) {
2402            var t = T.getScrollLeft();
2403            T.doScrollPos(t, e, o)
2404        }, this.doScrollPos = function (e, o, t) {
2405            var r = e > T.page.maxw ? T.page.maxw : e;
2406            r < 0 && (r = 0);
2407            var i = o > T.page.maxh ? T.page.maxh : o;
2408            i < 0 && (i = 0), T.synched("scroll", function () {
2409                T.setScrollTop(i), T.setScrollLeft(r)
2410            })
2411        }, this.cancelScroll = function () {
2412        };
2413        this.doScrollBy = function (e, o) {
2414            z(0, e)
2415        }, this.doScrollLeftBy = function (e, o) {
2416            z(e, 0)
2417        }, this.doScrollTo = function (e, o) {
2418            var t = o ? Math.round(e * T.scrollratio.y) : e;
2419            t < 0 ? t = 0 : t > T.page.maxh && (t = T.page.maxh), T.cursorfreezed = !1, T.doScrollTop(e)
2420        }, this.checkContentSize = function () {
2421            var e = T.getContentSize();
2422            e.h == T.page.h && e.w == T.page.w || T.resize(!1, e)
2423        }, T.onscroll = function (e) {
2424            T.rail.drag || T.cursorfreezed || T.synched("scroll", function () {
2425                T.scroll.y = Math.round(T.getScrollTop() / T.scrollratio.y), T.railh && (T.scroll.x = Math.round(T.getScrollLeft() / T.scrollratio.x)), T.noticeCursor()
2426            })
2427        }, T.bind(T.docscroll, "scroll", T.onscroll), this.doZoomIn = function (e) {
2428            if (!T.zoomactive) {
2429                T.zoomactive = !0, T.zoomrestore = {style: {}};
2430                var o = ["position", "top", "left", "zIndex", "backgroundColor", "marginTop", "marginBottom", "marginLeft", "marginRight"],
2431                    t = T.win[0].style;
2432                for (var r in o) {
2433                    var i = o[r];
2434                    T.zoomrestore.style[i] = void 0 !== t[i] ? t[i] : ""
2435                }
2436                T.zoomrestore.style.width = T.win.css("width"), T.zoomrestore.style.height = T.win.css("height"), T.zoomrestore.padding = {
2437                    w: T.win.outerWidth() - T.win.width(),
2438                    h: T.win.outerHeight() - T.win.height()
2439                }, P.isios4 && (T.zoomrestore.scrollTop = c.scrollTop(), c.scrollTop(0)), T.win.css({
2440                    position: P.isios4 ? "absolute" : "fixed",
2441                    top: 0,
2442                    left: 0,
2443                    zIndex: s + 100,
2444                    margin: 0
2445                });
2446                var n = T.win.css("backgroundColor");
2447                return ("" === n || /transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n)) && T.win.css("backgroundColor", "#fff"), T.rail.css({zIndex: s + 101}), T.zoom.css({zIndex: s + 102}), T.zoom.css("backgroundPosition", "0 -18px"), T.resizeZoom(), T.onzoomin && T.onzoomin.call(T), T.cancelEvent(e)
2448            }
2449        }, this.doZoomOut = function (e) {
2450            if (T.zoomactive) return T.zoomactive = !1, T.win.css("margin", ""), T.win.css(T.zoomrestore.style), P.isios4 && c.scrollTop(T.zoomrestore.scrollTop), T.rail.css({"z-index": T.zindex}), T.zoom.css({"z-index": T.zindex}), T.zoomrestore = !1, T.zoom.css("backgroundPosition", "0 0"), T.onResize(), T.onzoomout && T.onzoomout.call(T), T.cancelEvent(e)
2451        }, this.doZoom = function (e) {
2452            return T.zoomactive ? T.doZoomOut(e) : T.doZoomIn(e)
2453        }, this.resizeZoom = function () {
2454            if (T.zoomactive) {
2455                var e = T.getScrollTop();
2456                T.win.css({
2457                    width: c.width() - T.zoomrestore.padding.w + "px",
2458                    height: c.height() - T.zoomrestore.padding.h + "px"
2459                }), T.onResize(), T.setScrollTop(Math.min(T.page.maxh, e))
2460            }
2461        }, this.init(), n.nicescroll.push(this)
2462    }, y = function (e) {
2463        var o = this;
2464        this.nc = e, this.lastx = 0, this.lasty = 0, this.speedx = 0, this.speedy = 0, this.lasttime = 0, this.steptime = 0, this.snapx = !1, this.snapy = !1, this.demulx = 0, this.demuly = 0, this.lastscrollx = -1, this.lastscrolly = -1, this.chkx = 0, this.chky = 0, this.timer = 0, this.reset = function (e, t) {
2465            o.stop(), o.steptime = 0, o.lasttime = f(), o.speedx = 0, o.speedy = 0, o.lastx = e, o.lasty = t, o.lastscrollx = -1, o.lastscrolly = -1
2466        }, this.update = function (e, t) {
2467            var r = f();
2468            o.steptime = r - o.lasttime, o.lasttime = r;
2469            var i = t - o.lasty, s = e - o.lastx, n = o.nc.getScrollTop() + i, l = o.nc.getScrollLeft() + s;
2470            o.snapx = l < 0 || l > o.nc.page.maxw, o.snapy = n < 0 || n > o.nc.page.maxh, o.speedx = s, o.speedy = i, o.lastx = e, o.lasty = t
2471        }, this.stop = function () {
2472            o.nc.unsynched("domomentum2d"), o.timer && clearTimeout(o.timer), o.timer = 0, o.lastscrollx = -1, o.lastscrolly = -1
2473        }, this.doSnapy = function (e, t) {
2474            var r = !1;
2475            t < 0 ? (t = 0, r = !0) : t > o.nc.page.maxh && (t = o.nc.page.maxh, r = !0), e < 0 ? (e = 0, r = !0) : e > o.nc.page.maxw && (e = o.nc.page.maxw, r = !0), r ? o.nc.doScrollPos(e, t, o.nc.opt.snapbackspeed) : o.nc.triggerScrollEnd()
2476        }, this.doMomentum = function (e) {
2477            var t = f(), r = e ? t + e : o.lasttime, i = o.nc.getScrollLeft(), s = o.nc.getScrollTop(),
2478                n = o.nc.page.maxh, l = o.nc.page.maxw;
2479            o.speedx = l > 0 ? Math.min(60, o.speedx) : 0, o.speedy = n > 0 ? Math.min(60, o.speedy) : 0;
2480            var a = r && t - r <= 60;
2481            (s < 0 || s > n || i < 0 || i > l) && (a = !1);
2482            var c = !(!o.speedy || !a) && o.speedy, d = !(!o.speedx || !a) && o.speedx;
2483            if (c || d) {
2484                var u = Math.max(16, o.steptime);
2485                if (u > 50) {
2486                    var h = u / 50;
2487                    o.speedx *= h, o.speedy *= h, u = 50
2488                }
2489                o.demulxy = 0, o.lastscrollx = o.nc.getScrollLeft(), o.chkx = o.lastscrollx, o.lastscrolly = o.nc.getScrollTop(), o.chky = o.lastscrolly;
2490                var p = o.lastscrollx, m = o.lastscrolly, g = function () {
2491                    var e = f() - t > 600 ? .04 : .02;
2492                    o.speedx && (p = Math.floor(o.lastscrollx - o.speedx * (1 - o.demulxy)), o.lastscrollx = p, (p < 0 || p > l) && (e = .1)), o.speedy && (m = Math.floor(o.lastscrolly - o.speedy * (1 - o.demulxy)), o.lastscrolly = m, (m < 0 || m > n) && (e = .1)), o.demulxy = Math.min(1, o.demulxy + e), o.nc.synched("domomentum2d", function () {
2493                        if (o.speedx) {
2494                            o.nc.getScrollLeft();
2495                            o.chkx = p, o.nc.setScrollLeft(p)
2496                        }
2497                        if (o.speedy) {
2498                            o.nc.getScrollTop();
2499                            o.chky = m, o.nc.setScrollTop(m)
2500                        }
2501                        o.timer || (o.nc.hideCursor(), o.doSnapy(p, m))
2502                    }), o.demulxy < 1 ? o.timer = setTimeout(g, u) : (o.stop(), o.nc.hideCursor(), o.doSnapy(p, m))
2503                };
2504                g()
2505            } else o.doSnapy(o.nc.getScrollLeft(), o.nc.getScrollTop())
2506        }
2507    }, x = e.fn.scrollTop;
2508    e.cssHooks.pageYOffset = {
2509        get: function (e, o, t) {
2510            var r = n.data(e, "__nicescroll") || !1;
2511            return r && r.ishwscroll ? r.getScrollTop() : x.call(e)
2512        }, set: function (e, o) {
2513            var t = n.data(e, "__nicescroll") || !1;
2514            return t && t.ishwscroll ? t.setScrollTop(parseInt(o)) : x.call(e, o), this
2515        }
2516    }, e.fn.scrollTop = function (e) {
2517        if (void 0 === e) {
2518            var o = !!this[0] && (n.data(this[0], "__nicescroll") || !1);
2519            return o && o.ishwscroll ? o.getScrollTop() : x.call(this)
2520        }
2521        return this.each(function () {
2522            var o = n.data(this, "__nicescroll") || !1;
2523            o && o.ishwscroll ? o.setScrollTop(parseInt(e)) : x.call(n(this), e)
2524        })
2525    };
2526    var S = e.fn.scrollLeft;
2527    n.cssHooks.pageXOffset = {
2528        get: function (e, o, t) {
2529            var r = n.data(e, "__nicescroll") || !1;
2530            return r && r.ishwscroll ? r.getScrollLeft() : S.call(e)
2531        }, set: function (e, o) {
2532            var t = n.data(e, "__nicescroll") || !1;
2533            return t && t.ishwscroll ? t.setScrollLeft(parseInt(o)) : S.call(e, o), this
2534        }
2535    }, e.fn.scrollLeft = function (e) {
2536        if (void 0 === e) {
2537            var o = !!this[0] && (n.data(this[0], "__nicescroll") || !1);
2538            return o && o.ishwscroll ? o.getScrollLeft() : S.call(this)
2539        }
2540        return this.each(function () {
2541            var o = n.data(this, "__nicescroll") || !1;
2542            o && o.ishwscroll ? o.setScrollLeft(parseInt(e)) : S.call(n(this), e)
2543        })
2544    };
2545    var z = function (e) {
2546        var o = this;
2547        if (this.length = 0, this.name = "nicescrollarray", this.each = function (e) {
2548            return n.each(o, e), o
2549        }, this.push = function (e) {
2550            o[o.length] = e, o.length++
2551        }, this.eq = function (e) {
2552            return o[e]
2553        }, e) for (var t = 0; t < e.length; t++) {
2554            var r = n.data(e[t], "__nicescroll") || !1;
2555            r && (this[this.length] = r, this.length++)
2556        }
2557        return this
2558    };
2559    !function (e, o, t) {
2560        for (var r = 0, i = o.length; r < i; r++) t(e, o[r])
2561    }(z.prototype, ["show", "hide", "toggle", "onResize", "resize", "remove", "stop", "doScrollPos"], function (e, o) {
2562        e[o] = function () {
2563            var e = arguments;
2564            return this.each(function () {
2565                this[o].apply(this, e)
2566            })
2567        }
2568    }), e.fn.getNiceScroll = function (e) {
2569        return void 0 === e ? new z(this) : this[e] && n.data(this[e], "__nicescroll") || !1
2570    }, (e.expr.pseudos || e.expr[":"]).nicescroll = function (e) {
2571        return void 0 !== n.data(e, "__nicescroll")
2572    }, n.fn.niceScroll = function (e, o) {
2573        void 0 !== o || "object" != typeof e || "jquery" in e || (o = e, e = !1);
2574        var t = new z;
2575        return this.each(function () {
2576            var r = n(this), i = n.extend({}, o);
2577            if (e) {
2578                var s = n(e);
2579                i.doc = s.length > 1 ? n(e, r) : s, i.win = r
2580            }
2581            !("doc" in i) || "win" in i || (i.win = r);
2582            var l = r.data("__nicescroll") || !1;
2583            l || (i.doc = i.doc || r, l = new b(i, r), r.data("__nicescroll", l)), t.push(l)
2584        }), 1 === t.length ? t[0] : t
2585    }, a.NiceScroll = {
2586        getjQuery: function () {
2587            return e
2588        }
2589    }, n.nicescroll || (n.nicescroll = new z, n.nicescroll.options = g)
2590});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.