!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){"use strict";var b={wheelSpeed:10,wheelPropagation:!1,minScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,includePadding:!1},c=function(){var a=0;return function(){var b=a;return a+=1,".perfect-scrollbar-"+b}}();a.fn.perfectScrollbar=function(d,e){return this.each(function(){var f=a.extend(!0,{},b),g=a(this);if("object"==typeof d?a.extend(!0,f,d):e=d,"update"===e)return g.data("perfect-scrollbar-update")&&g.data("perfect-scrollbar-update")(),g;if("destroy"===e)return g.data("perfect-scrollbar-destroy")&&g.data("perfect-scrollbar-destroy")(),g;if(g.data("perfect-scrollbar"))return g.data("perfect-scrollbar");g.addClass("ps-container");var l,m,n,o,p,q,r,s,w,x,h=a("
").appendTo(g),i=a("
").appendTo(g),j=a("
").appendTo(h),k=a("
").appendTo(i),t=parseInt(h.css("bottom"),10),u=t===t,v=u?null:parseInt(h.css("top"),10),y=parseInt(i.css("right"),10),z=y===y,A=z?null:parseInt(i.css("left"),10),B="rtl"===g.css("direction"),C=c(),D=parseInt(h.css("borderLeftWidth"),10)+parseInt(h.css("borderRightWidth"),10),E=parseInt(h.css("borderTopWidth"),10)+parseInt(h.css("borderBottomWidth"),10),F=function(a,b){var c=a+b,d=o-w;x=0>c?0:c>d?d:c;var e=parseInt(x*(q-o)/(o-w),10);g.scrollTop(e),u?h.css({bottom:t-e}):h.css({top:v+e})},G=function(a,b){var c=a+b,d=n-r;s=0>c?0:c>d?d:c;var e=parseInt(s*(p-n)/(n-r),10);g.scrollLeft(e),z?i.css({right:y-e}):i.css({left:A+e})},H=function(a){return f.minScrollbarLength&&(a=Math.max(a,f.minScrollbarLength)),a},I=function(){var a={width:n,display:l?"inherit":"none"};a.left=B?g.scrollLeft()+n-p:g.scrollLeft(),u?a.bottom=t-g.scrollTop():a.top=v+g.scrollTop(),h.css(a);var b={top:g.scrollTop(),height:o,display:m?"inherit":"none"};z?b.right=B?p-g.scrollLeft()-y-k.outerWidth():y-g.scrollLeft():b.left=B?g.scrollLeft()+2*n-p-A-k.outerWidth():A+g.scrollLeft(),i.css(b),j.css({left:s,width:r-D}),k.css({top:x,height:w-E})},J=function(){n=f.includePadding?g.innerWidth():g.width(),o=f.includePadding?g.innerHeight():g.height(),p=g.prop("scrollWidth"),q=g.prop("scrollHeight"),!f.suppressScrollX&&n+f.scrollXMarginOffset=o-w&&(x=o-w),s>=n-r&&(s=n-r),I()},K=function(){var b,c;j.bind("mousedown"+C,function(a){c=a.pageX,b=j.position().left,h.addClass("in-scrolling"),a.stopPropagation(),a.preventDefault()}),a(document).bind("mousemove"+C,function(a){h.hasClass("in-scrolling")&&(G(b,a.pageX-c),a.stopPropagation(),a.preventDefault())}),a(document).bind("mouseup"+C,function(){h.hasClass("in-scrolling")&&h.removeClass("in-scrolling")}),b=c=null},L=function(){var b,c;k.bind("mousedown"+C,function(a){c=a.pageY,b=k.position().top,i.addClass("in-scrolling"),a.stopPropagation(),a.preventDefault()}),a(document).bind("mousemove"+C,function(a){i.hasClass("in-scrolling")&&(F(b,a.pageY-c),a.stopPropagation(),a.preventDefault())}),a(document).bind("mouseup"+C,function(){i.hasClass("in-scrolling")&&i.removeClass("in-scrolling")}),b=c=null},M=function(a,b){var c=g.scrollTop();if(0===a){if(!m)return!1;if(0===c&&b>0||c>=q-o&&0>b)return!f.wheelPropagation}var d=g.scrollLeft();if(0===b){if(!l)return!1;if(0===d&&0>a||d>=p-n&&a>0)return!f.wheelPropagation}return!0},N=function(){f.wheelSpeed/=10;var a=!1;g.bind("mousewheel"+C,function(b,c,d,e){var h=b.deltaX*b.deltaFactor||d,i=b.deltaY*b.deltaFactor||e;a=!1,f.useBothWheelAxes?m&&!l?(i?g.scrollTop(g.scrollTop()-i*f.wheelSpeed):g.scrollTop(g.scrollTop()+h*f.wheelSpeed),a=!0):l&&!m&&(h?g.scrollLeft(g.scrollLeft()+h*f.wheelSpeed):g.scrollLeft(g.scrollLeft()-i*f.wheelSpeed),a=!0):(g.scrollTop(g.scrollTop()-i*f.wheelSpeed),g.scrollLeft(g.scrollLeft()+h*f.wheelSpeed)),J(),a=a||M(h,i),a&&(b.stopPropagation(),b.preventDefault())}),g.bind("MozMousePixelScroll"+C,function(b){a&&b.preventDefault()})},O=function(){var b=!1;g.bind("mouseenter"+C,function(){b=!0}),g.bind("mouseleave"+C,function(){b=!1});var c=!1;a(document).bind("keydown"+C,function(d){if(b&&!a(document.activeElement).is(":input,[contenteditable]")){var e=0,f=0;switch(d.which){case 37:e=-30;break;case 38:f=30;break;case 39:e=30;break;case 40:f=-30;break;case 33:f=90;break;case 32:case 34:f=-90;break;case 35:f=-o;break;case 36:f=o;break;default:return}g.scrollTop(g.scrollTop()-f),g.scrollLeft(g.scrollLeft()+e),c=M(e,f),c&&d.preventDefault()}})},P=function(){var a=function(a){a.stopPropagation()};k.bind("click"+C,a),i.bind("click"+C,function(a){var b=parseInt(w/2,10),c=a.pageY-i.offset().top-b,d=o-w,e=c/d;0>e?e=0:e>1&&(e=1),g.scrollTop((q-o)*e)}),j.bind("click"+C,a),h.bind("click"+C,function(a){var b=parseInt(r/2,10),c=a.pageX-h.offset().left-b,d=n-r,e=c/d;0>e?e=0:e>1&&(e=1),g.scrollLeft((p-n)*e)})},Q=function(){var b=function(a,b){g.scrollTop(g.scrollTop()-b),g.scrollLeft(g.scrollLeft()-a),J()},c={},d=0,e={},f=null,h=!1;a(window).bind("touchstart"+C,function(){h=!0}),a(window).bind("touchend"+C,function(){h=!1}),g.bind("touchstart"+C,function(a){var b=a.originalEvent.targetTouches[0];c.pageX=b.pageX,c.pageY=b.pageY,d=(new Date).getTime(),null!==f&&clearInterval(f),a.stopPropagation()}),g.bind("touchmove"+C,function(a){if(!h&&1===a.originalEvent.targetTouches.length){var f=a.originalEvent.targetTouches[0],g={};g.pageX=f.pageX,g.pageY=f.pageY;var i=g.pageX-c.pageX,j=g.pageY-c.pageY;b(i,j),c=g;var k=(new Date).getTime(),l=k-d;l>0&&(e.x=i/l,e.y=j/l,d=k),a.preventDefault()}}),g.bind("touchend"+C,function(){clearInterval(f),f=setInterval(function(){return Math.abs(e.x)<.01&&Math.abs(e.y)<.01?(clearInterval(f),void 0):(b(30*e.x,30*e.y),e.x*=.8,e.y*=.8,void 0)},10)})},R=function(){g.bind("scroll"+C,function(){J()})},S=function(){g.unbind(C),a(window).unbind(C),a(document).unbind(C),g.data("perfect-scrollbar",null),g.data("perfect-scrollbar-update",null),g.data("perfect-scrollbar-destroy",null),j.remove(),k.remove(),h.remove(),i.remove(),h=i=j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z=A=B=C=null},T=function(b){g.addClass("ie").addClass("ie"+b);var c=function(){var b=function(){a(this).addClass("hover")},c=function(){a(this).removeClass("hover")};g.bind("mouseenter"+C,b).bind("mouseleave"+C,c),h.bind("mouseenter"+C,b).bind("mouseleave"+C,c),i.bind("mouseenter"+C,b).bind("mouseleave"+C,c),j.bind("mouseenter"+C,b).bind("mouseleave"+C,c),k.bind("mouseenter"+C,b).bind("mouseleave"+C,c)},d=function(){I=function(){var a={left:s+g.scrollLeft(),width:r};u?a.bottom=t:a.top=v,j.css(a);var b={top:x+g.scrollTop(),height:w};z?b.right=y:b.left=A,k.css(b),j.hide().show(),k.hide().show()}};6===b&&(c(),d())},U="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,V=function(){var a=navigator.userAgent.toLowerCase().match(/(msie) ([\w.]+)/);a&&"msie"===a[1]&&T(parseInt(a[2],10)),J(),R(),K(),L(),P(),U&&Q(),g.mousewheel&&N(),f.useKeyboard&&O(),g.data("perfect-scrollbar",g),g.data("perfect-scrollbar-update",J),g.data("perfect-scrollbar-destroy",S)};return V(),g})}});