Files
moadiran/TaxPayerFull/wwwroot/assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.js
2024-04-22 23:32:39 +03:30

7 lines
19 KiB
JavaScript

!function(t,e){for(var r in e)t[r]=e[r]}(window,function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=199)}({199:function(t,e,r){"use strict";r.r(e);var i=r(4),n=r.n(i);r.d(e,"PerfectScrollbar",(function(){return n.a}))},4:function(t,e,r){
/*!
* perfect-scrollbar v1.5.3
* Copyright 2021 Hyunje Jun, MDBootstrap and Contributors
* Licensed under MIT
*/
t.exports=function(){"use strict";function t(t){return getComputedStyle(t)}function e(t,e){for(var r in e){var i=e[r];"number"==typeof i&&(i+="px"),t.style[r]=i}return t}function r(t){var e=document.createElement("div");return e.className=t,e}var i="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function n(t,e){if(!i)throw new Error("No element matching method supported");return i.call(t,e)}function l(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function o(t,e){return Array.prototype.filter.call(t.children,(function(t){return n(t,e)}))}var s="ps",a="ps__rtl",c={thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},h={focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}},u={x:null,y:null};function d(t,e){var r=t.element.classList,i=h.scrolling(e);r.contains(i)?clearTimeout(u[e]):r.add(i)}function f(t,e){u[e]=setTimeout((function(){return t.isAlive&&t.element.classList.remove(h.scrolling(e))}),t.settings.scrollingThreshold)}var p=function(t){this.element=t,this.handlers={}},b={isEmpty:{configurable:!0}};p.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},p.prototype.unbind=function(t,e){var r=this;this.handlers[t]=this.handlers[t].filter((function(i){return!(!e||i===e)||(r.element.removeEventListener(t,i,!1),!1)}))},p.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},b.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every((function(e){return 0===t.handlers[e].length}))},Object.defineProperties(p.prototype,b);var g=function(){this.eventElements=[]};function v(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function m(t,e,r,i,n){var l;if(void 0===i&&(i=!0),void 0===n&&(n=!1),"top"===e)l=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");l=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,r,i,n){var l=r[0],o=r[1],s=r[2],a=r[3],c=r[4],h=r[5];void 0===i&&(i=!0),void 0===n&&(n=!1);var u=t.element;t.reach[a]=null,u[s]<1&&(t.reach[a]="start"),u[s]>t[l]-t[o]-1&&(t.reach[a]="end"),e&&(u.dispatchEvent(v("ps-scroll-"+a)),e<0?u.dispatchEvent(v("ps-scroll-"+c)):e>0&&u.dispatchEvent(v("ps-scroll-"+h)),i&&function(t,e){d(t,e),f(t,e)}(t,a)),t.reach[a]&&(e||n)&&u.dispatchEvent(v("ps-"+a+"-reach-"+t.reach[a]))}(t,r,l,i,n)}function Y(t){return parseInt(t,10)||0}g.prototype.eventElement=function(t){var e=this.eventElements.filter((function(e){return e.element===t}))[0];return e||(e=new p(t),this.eventElements.push(e)),e},g.prototype.bind=function(t,e,r){this.eventElement(t).bind(e,r)},g.prototype.unbind=function(t,e,r){var i=this.eventElement(t);i.unbind(e,r),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},g.prototype.unbindAll=function(){this.eventElements.forEach((function(t){return t.unbindAll()})),this.eventElements=[]},g.prototype.once=function(t,e,r){var i=this.eventElement(t),n=function(t){i.unbind(e,n),r(t)};i.bind(e,n)};var w={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function y(t){var r=t.element,i=Math.floor(r.scrollTop),n=r.getBoundingClientRect();t.containerWidth=Math.round(n.width),t.containerHeight=Math.round(n.height),t.contentWidth=r.scrollWidth,t.contentHeight=r.scrollHeight,r.contains(t.scrollbarXRail)||(o(r,c.rail("x")).forEach((function(t){return l(t)})),r.appendChild(t.scrollbarXRail)),r.contains(t.scrollbarYRail)||(o(r,c.rail("y")).forEach((function(t){return l(t)})),r.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=X(t,Y(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=Y((t.negativeScrollAdjustment+r.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=X(t,Y(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=Y(i*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,r){var i={width:r.railXWidth},n=Math.floor(t.scrollTop);r.isRtl?i.left=r.negativeScrollAdjustment+t.scrollLeft+r.containerWidth-r.contentWidth:i.left=t.scrollLeft,r.isScrollbarXUsingBottom?i.bottom=r.scrollbarXBottom-n:i.top=r.scrollbarXTop+n,e(r.scrollbarXRail,i);var l={top:n,height:r.railYHeight};r.isScrollbarYUsingRight?r.isRtl?l.right=r.contentWidth-(r.negativeScrollAdjustment+t.scrollLeft)-r.scrollbarYRight-r.scrollbarYOuterWidth-9:l.right=r.scrollbarYRight-t.scrollLeft:r.isRtl?l.left=r.negativeScrollAdjustment+t.scrollLeft+2*r.containerWidth-r.contentWidth-r.scrollbarYLeft-r.scrollbarYOuterWidth:l.left=r.scrollbarYLeft+t.scrollLeft,e(r.scrollbarYRail,l),e(r.scrollbarX,{left:r.scrollbarXLeft,width:r.scrollbarXWidth-r.railBorderXWidth}),e(r.scrollbarY,{top:r.scrollbarYTop,height:r.scrollbarYHeight-r.railBorderYWidth})}(r,t),t.scrollbarXActive?r.classList.add(h.active("x")):(r.classList.remove(h.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,r.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?r.classList.add(h.active("y")):(r.classList.remove(h.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,r.scrollTop=0)}function X(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function W(t,e){var r=e[0],i=e[1],n=e[2],l=e[3],o=e[4],s=e[5],a=e[6],c=e[7],u=e[8],p=t.element,b=null,g=null,v=null;function m(e){e.touches&&e.touches[0]&&(e[n]=e.touches[0].pageY),p[a]=b+v*(e[n]-g),d(t,c),y(t),e.stopPropagation(),e.type.startsWith("touch")&&e.changedTouches.length>1&&e.preventDefault()}function Y(){f(t,c),t[u].classList.remove(h.clicking),t.event.unbind(t.ownerDocument,"mousemove",m)}function w(e,o){b=p[a],o&&e.touches&&(e[n]=e.touches[0].pageY),g=e[n],v=(t[i]-t[r])/(t[l]-t[s]),o?t.event.bind(t.ownerDocument,"touchmove",m):(t.event.bind(t.ownerDocument,"mousemove",m),t.event.once(t.ownerDocument,"mouseup",Y),e.preventDefault()),t[u].classList.add(h.clicking),e.stopPropagation()}t.event.bind(t[o],"mousedown",(function(t){w(t)})),t.event.bind(t[o],"touchstart",(function(t){w(t,!0)}))}var L={"click-rail":function(t){t.element,t.event.bind(t.scrollbarY,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarYRail,"mousedown",(function(e){var r=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=r*t.containerHeight,y(t),e.stopPropagation()})),t.event.bind(t.scrollbarX,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarXRail,"mousedown",(function(e){var r=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=r*t.containerWidth,y(t),e.stopPropagation()}))},"drag-thumb":function(t){W(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),W(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",(function(r){if(!(r.isDefaultPrevented&&r.isDefaultPrevented()||r.defaultPrevented)&&(n(e,":hover")||n(t.scrollbarX,":focus")||n(t.scrollbarY,":focus"))){var i,l=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(l){if("IFRAME"===l.tagName)l=l.contentDocument.activeElement;else for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(n(i=l,"input,[contenteditable]")||n(i,"select,[contenteditable]")||n(i,"textarea,[contenteditable]")||n(i,"button,[contenteditable]"))return}var o=0,s=0;switch(r.which){case 37:o=r.metaKey?-t.contentWidth:r.altKey?-t.containerWidth:-30;break;case 38:s=r.metaKey?t.contentHeight:r.altKey?t.containerHeight:30;break;case 39:o=r.metaKey?t.contentWidth:r.altKey?t.containerWidth:30;break;case 40:s=r.metaKey?-t.contentHeight:r.altKey?-t.containerHeight:-30;break;case 32:s=r.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:s=t.containerHeight;break;case 34:s=-t.containerHeight;break;case 36:s=t.contentHeight;break;case 35:s=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==o||t.settings.suppressScrollY&&0!==s||(e.scrollTop-=s,e.scrollLeft+=o,y(t),function(r,i){var n=Math.floor(e.scrollTop);if(0===r){if(!t.scrollbarYActive)return!1;if(0===n&&i>0||n>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var l=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===l&&r<0||l>=t.contentWidth-t.containerWidth&&r>0)return!t.settings.wheelPropagation}return!0}(o,s)&&r.preventDefault())}}))},wheel:function(e){var r=e.element;function i(i){var n=function(t){var e=t.deltaX,r=-1*t.deltaY;return void 0!==e&&void 0!==r||(e=-1*t.wheelDeltaX/6,r=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,r*=10),e!=e&&r!=r&&(e=0,r=t.wheelDelta),t.shiftKey?[-r,-e]:[e,r]}(i),l=n[0],o=n[1];if(!function(e,i,n){if(!w.isWebKit&&r.querySelector("select:focus"))return!0;if(!r.contains(e))return!1;for(var l=e;l&&l!==r;){if(l.classList.contains(c.consuming))return!0;var o=t(l);if(n&&o.overflowY.match(/(scroll|auto)/)){var s=l.scrollHeight-l.clientHeight;if(s>0&&(l.scrollTop>0&&n<0||l.scrollTop<s&&n>0))return!0}if(i&&o.overflowX.match(/(scroll|auto)/)){var a=l.scrollWidth-l.clientWidth;if(a>0&&(l.scrollLeft>0&&i<0||l.scrollLeft<a&&i>0))return!0}l=l.parentNode}return!1}(i.target,l,o)){var s=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(o?r.scrollTop-=o*e.settings.wheelSpeed:r.scrollTop+=l*e.settings.wheelSpeed,s=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(l?r.scrollLeft+=l*e.settings.wheelSpeed:r.scrollLeft-=o*e.settings.wheelSpeed,s=!0):(r.scrollTop-=o*e.settings.wheelSpeed,r.scrollLeft+=l*e.settings.wheelSpeed),y(e),(s=s||function(t,i){var n=Math.floor(r.scrollTop),l=0===r.scrollTop,o=n+r.offsetHeight===r.scrollHeight,s=0===r.scrollLeft,a=r.scrollLeft+r.offsetWidth===r.scrollWidth;return!(Math.abs(i)>Math.abs(t)?l||o:s||a)||!e.settings.wheelPropagation}(l,o))&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault())}}void 0!==window.onwheel?e.event.bind(r,"wheel",i):void 0!==window.onmousewheel&&e.event.bind(r,"mousewheel",i)},touch:function(e){if(w.supportsTouch||w.supportsIePointer){var r=e.element,i={},n=0,l={},o=null;w.supportsTouch?(e.event.bind(r,"touchstart",u),e.event.bind(r,"touchmove",d),e.event.bind(r,"touchend",f)):w.supportsIePointer&&(window.PointerEvent?(e.event.bind(r,"pointerdown",u),e.event.bind(r,"pointermove",d),e.event.bind(r,"pointerup",f)):window.MSPointerEvent&&(e.event.bind(r,"MSPointerDown",u),e.event.bind(r,"MSPointerMove",d),e.event.bind(r,"MSPointerUp",f)))}function s(t,i){r.scrollTop-=i,r.scrollLeft-=t,y(e)}function a(t){return t.targetTouches?t.targetTouches[0]:t}function h(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function u(t){if(h(t)){var e=a(t);i.pageX=e.pageX,i.pageY=e.pageY,n=(new Date).getTime(),null!==o&&clearInterval(o)}}function d(o){if(h(o)){var u=a(o),d={pageX:u.pageX,pageY:u.pageY},f=d.pageX-i.pageX,p=d.pageY-i.pageY;if(function(e,i,n){if(!r.contains(e))return!1;for(var l=e;l&&l!==r;){if(l.classList.contains(c.consuming))return!0;var o=t(l);if(n&&o.overflowY.match(/(scroll|auto)/)){var s=l.scrollHeight-l.clientHeight;if(s>0&&(l.scrollTop>0&&n<0||l.scrollTop<s&&n>0))return!0}if(i&&o.overflowX.match(/(scroll|auto)/)){var a=l.scrollWidth-l.clientWidth;if(a>0&&(l.scrollLeft>0&&i<0||l.scrollLeft<a&&i>0))return!0}l=l.parentNode}return!1}(o.target,f,p))return;s(f,p),i=d;var b=(new Date).getTime(),g=b-n;g>0&&(l.x=f/g,l.y=p/g,n=b),function(t,i){var n=Math.floor(r.scrollTop),l=r.scrollLeft,o=Math.abs(t),s=Math.abs(i);if(s>o){if(i<0&&n===e.contentHeight-e.containerHeight||i>0&&0===n)return 0===window.scrollY&&i>0&&w.isChrome}else if(o>s&&(t<0&&l===e.contentWidth-e.containerWidth||t>0&&0===l))return!0;return!0}(f,p)&&o.preventDefault()}}function f(){e.settings.swipeEasing&&(clearInterval(o),o=setInterval((function(){e.isInitialized?clearInterval(o):l.x||l.y?Math.abs(l.x)<.01&&Math.abs(l.y)<.01?clearInterval(o):e.element?(s(30*l.x,30*l.y),l.x*=.8,l.y*=.8):clearInterval(o):clearInterval(o)}),10))}}},R=function(i,n){var l=this;if(void 0===n&&(n={}),"string"==typeof i&&(i=document.querySelector(i)),!i||!i.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var o in this.element=i,i.classList.add(s),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},n)this.settings[o]=n[o];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var u,d,f=function(){return i.classList.add(h.focus)},p=function(){return i.classList.remove(h.focus)};this.isRtl="rtl"===t(i).direction,!0===this.isRtl&&i.classList.add(a),this.isNegativeScroll=(d=i.scrollLeft,i.scrollLeft=-1,u=i.scrollLeft<0,i.scrollLeft=d,u),this.negativeScrollAdjustment=this.isNegativeScroll?i.scrollWidth-i.clientWidth:0,this.event=new g,this.ownerDocument=i.ownerDocument||document,this.scrollbarXRail=r(c.rail("x")),i.appendChild(this.scrollbarXRail),this.scrollbarX=r(c.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",f),this.event.bind(this.scrollbarX,"blur",p),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var b=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(b.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=Y(b.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=Y(b.borderLeftWidth)+Y(b.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=Y(b.marginLeft)+Y(b.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=r(c.rail("y")),i.appendChild(this.scrollbarYRail),this.scrollbarY=r(c.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",f),this.event.bind(this.scrollbarY,"blur",p),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var v=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(v.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=Y(v.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var r=t(e);return Y(r.width)+Y(r.paddingLeft)+Y(r.paddingRight)+Y(r.borderLeftWidth)+Y(r.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=Y(v.borderTopWidth)+Y(v.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=Y(v.marginTop)+Y(v.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:i.scrollLeft<=0?"start":i.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:i.scrollTop<=0?"start":i.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(t){return L[t](l)})),this.lastScrollTop=Math.floor(i.scrollTop),this.lastScrollLeft=i.scrollLeft,this.event.bind(this.element,"scroll",(function(t){return l.onScroll(t)})),y(this)};return R.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,e(this.scrollbarXRail,{display:"block"}),e(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=Y(t(this.scrollbarXRail).marginLeft)+Y(t(this.scrollbarXRail).marginRight),this.railYMarginHeight=Y(t(this.scrollbarYRail).marginTop)+Y(t(this.scrollbarYRail).marginBottom),e(this.scrollbarXRail,{display:"none"}),e(this.scrollbarYRail,{display:"none"}),y(this),m(this,"top",0,!1,!0),m(this,"left",0,!1,!0),e(this.scrollbarXRail,{display:""}),e(this.scrollbarYRail,{display:""}))},R.prototype.onScroll=function(t){this.isAlive&&(y(this),m(this,"top",this.element.scrollTop-this.lastScrollTop),m(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},R.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),l(this.scrollbarX),l(this.scrollbarY),l(this.scrollbarXRail),l(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},R.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(t){return!t.match(/^ps([-_].+|)$/)})).join(" ")},R}()}}));