-凯发官网注册

/* perfect-scrollbar v0.6.10 */ !function t(e,n,r){function o(l,s){if(!n[l]){if(!e[l]){var a="function"==typeof require&&require;if(!s&&a)return a(l,!0);if(i)return i(l,!0);var c=new error("cannot find module '" l "'");throw c.code="module_not_found",c}var u=n[l]={exports:{}};e[l][0].call(u.exports,function(t){var n=e[l][1][t];return o(n?n:t)},u,u.exports,t,e,n,r)}return n[l].exports}for(var i="function"==typeof require&&require,l=0;l=0&&n.splice(r,1),t.classname=n.join(" ")}n.add=function(t,e){t.classlist?t.classlist.add(e):r(t,e)},n.remove=function(t,e){t.classlist?t.classlist.remove(e):o(t,e)},n.list=function(t){return t.classlist?array.prototype.slice.apply(t.classlist):t.classname.split(" ")}},{}],3:[function(t,e,n){"use strict";function r(t,e){return window.getcomputedstyle(t)[e]}function o(t,e,n){return"number"==typeof n&&(n=n.tostring() "px"),t.style[e]=n,t}function i(t,e){for(var n in e){var r=e[n];"number"==typeof r&&(r=r.tostring() "px"),t.style[n]=r}return t}var l={};l.e=function(t,e){var n=document.createelement(t);return n.classname=e,n},l.appendto=function(t,e){return e.appendchild(t),t},l.css=function(t,e,n){return"object"==typeof e?i(t,e):"undefined"==typeof n?r(t,e):o(t,e,n)},l.matches=function(t,e){return"undefined"!=typeof t.matches?t.matches(e):"undefined"!=typeof t.matchesselector?t.matchesselector(e):"undefined"!=typeof t.webkitmatchesselector?t.webkitmatchesselector(e):"undefined"!=typeof t.mozmatchesselector?t.mozmatchesselector(e):"undefined"!=typeof t.msmatchesselector?t.msmatchesselector(e):void 0},l.remove=function(t){"undefined"!=typeof t.remove?t.remove():t.parentnode&&t.parentnode.removechild(t)},l.querychildren=function(t,e){return array.prototype.filter.call(t.childnodes,function(t){return l.matches(t,e)})},e.exports=l},{}],4:[function(t,e,n){"use strict";var r=function(t){this.element=t,this.events={}};r.prototype.bind=function(t,e){"undefined"==typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e),this.element.addeventlistener(t,e,!1)},r.prototype.unbind=function(t,e){var n="undefined"!=typeof e;this.events[t]=this.events[t].filter(function(r){return n&&r!==e?!0:(this.element.removeeventlistener(t,r,!1),!1)},this)},r.prototype.unbindall=function(){for(var t in this.events)this.unbind(t)};var o=function(){this.eventelements=[]};o.prototype.eventelement=function(t){var e=this.eventelements.filter(function(e){return e.element===t})[0];return"undefined"==typeof e&&(e=new r(t),this.eventelements.push(e)),e},o.prototype.bind=function(t,e,n){this.eventelement(t).bind(e,n)},o.prototype.unbind=function(t,e,n){this.eventelement(t).unbind(e,n)},o.prototype.unbindall=function(){for(var t=0;tu?u=0:u>1&&(u=1),s(t,"top",(e.contentheight-e.containerheight)*u),l(t),r.stoppropagation()}),e.settings.stoppropagationonclick&&e.event.bind(e.scrollbarx,"click",r),e.event.bind(e.scrollbarxrail,"click",function(r){var i=o.toint(e.scrollbarxwidth/2),a=e.railxratio*(r.pagex-window.pagexoffset-n(e.scrollbarxrail).left-i),c=e.railxratio*(e.railxwidth-e.scrollbarxwidth),u=a/c;0>u?u=0:u>1&&(u=1),s(t,"left",(e.contentwidth-e.containerwidth)*u-e.negativescrolladjustment),l(t),r.stoppropagation()})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(t,e,n){"use strict";function r(t,e){function n(n){var o=r n*e.railxratio,i=math.max(0,e.scrollbarxrail.getboundingclientrect().left) e.railxratio*(e.railxwidth-e.scrollbarxwidth);0>o?e.scrollbarxleft=0:o>i?e.scrollbarxleft=i:e.scrollbarxleft=o;var s=l.toint(e.scrollbarxleft*(e.contentwidth-e.containerwidth)/(e.containerwidth-e.railxratio*e.scrollbarxwidth))-e.negativescrolladjustment;c(t,"left",s)}var r=null,o=null,s=function(e){n(e.pagex-o),a(t),e.stoppropagation(),e.preventdefault()},u=function(){l.stopscrolling(t,"x"),e.event.unbind(e.ownerdocument,"mousemove",s)};e.event.bind(e.scrollbarx,"mousedown",function(n){o=n.pagex,r=l.toint(i.css(e.scrollbarx,"left"))*e.railxratio,l.startscrolling(t,"x"),e.event.bind(e.ownerdocument,"mousemove",s),e.event.once(e.ownerdocument,"mouseup",u),n.stoppropagation(),n.preventdefault()})}function o(t,e){function n(n){var o=r n*e.railyratio,i=math.max(0,e.scrollbaryrail.getboundingclientrect().top) e.railyratio*(e.railyheight-e.scrollbaryheight);0>o?e.scrollbarytop=0:o>i?e.scrollbarytop=i:e.scrollbarytop=o;var s=l.toint(e.scrollbarytop*(e.contentheight-e.containerheight)/(e.containerheight-e.railyratio*e.scrollbaryheight));c(t,"top",s)}var r=null,o=null,s=function(e){n(e.pagey-o),a(t),e.stoppropagation(),e.preventdefault()},u=function(){l.stopscrolling(t,"y"),e.event.unbind(e.ownerdocument,"mousemove",s)};e.event.bind(e.scrollbary,"mousedown",function(n){o=n.pagey,r=l.toint(i.css(e.scrollbary,"top"))*e.railyratio,l.startscrolling(t,"y"),e.event.bind(e.ownerdocument,"mousemove",s),e.event.once(e.ownerdocument,"mouseup",u),n.stoppropagation(),n.preventdefault()})}var i=t("../../lib/dom"),l=t("../../lib/helper"),s=t("../instances"),a=t("../update-geometry"),c=t("../update-scroll");e.exports=function(t){var e=s.get(t);r(t,e),o(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrolltop;if(0===n){if(!e.scrollbaryactive)return!1;if(0===o&&r>0||o>=e.contentheight-e.containerheight&&0>r)return!e.settings.wheelpropagation}var i=t.scrollleft;if(0===r){if(!e.scrollbarxactive)return!1;if(0===i&&0>n||i>=e.contentwidth-e.containerwidth&&n>0)return!e.settings.wheelpropagation}return!0}var r=!1;e.event.bind(t,"mouseenter",function(){r=!0}),e.event.bind(t,"mouseleave",function(){r=!1});var l=!1;e.event.bind(e.ownerdocument,"keydown",function(c){if(!c.isdefaultprevented||!c.isdefaultprevented()){var u=i.matches(e.scrollbarx,":focus")||i.matches(e.scrollbary,":focus");if(r||u){var d=document.activeelement?document.activeelement:e.ownerdocument.activeelement;if(d){for(;d.shadowroot;)d=d.shadowroot.activeelement;if(o.iseditable(d))return}var p=0,f=0;switch(c.which){case 37:p=-30;break;case 38:f=30;break;case 39:p=30;break;case 40:f=-30;break;case 33:f=90;break;case 32:f=c.shiftkey?90:-90;break;case 34:f=-90;break;case 35:f=c.ctrlkey?-e.contentheight:-e.containerheight;break;case 36:f=c.ctrlkey?t.scrolltop:e.containerheight;break;default:return}a(t,"top",t.scrolltop-f),a(t,"left",t.scrollleft p),s(t),l=n(p,f),l&&c.preventdefault()}}})}var o=t("../../lib/helper"),i=t("../../lib/dom"),l=t("../instances"),s=t("../update-geometry"),a=t("../update-scroll");e.exports=function(t){var e=l.get(t);r(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrolltop;if(0===n){if(!e.scrollbaryactive)return!1;if(0===o&&r>0||o>=e.contentheight-e.containerheight&&0>r)return!e.settings.wheelpropagation}var i=t.scrollleft;if(0===r){if(!e.scrollbarxactive)return!1;if(0===i&&0>n||i>=e.contentwidth-e.containerwidth&&n>0)return!e.settings.wheelpropagation}return!0}function r(t){var e=t.deltax,n=-1*t.deltay;return("undefined"==typeof e||"undefined"==typeof n)&&(e=-1*t.wheeldeltax/6,n=t.wheeldeltay/6),t.deltamode&&1===t.deltamode&&(e*=10,n*=10),e!==e&&n!==n&&(e=0,n=t.wheeldelta),[e,n]}function o(e,n){var r=t.queryselector("textarea:hover");if(r){var o=r.scrollheight-r.clientheight;if(o>0&&!(0===r.scrolltop&&n>0||r.scrolltop===o&&0>n))return!0;var i=r.scrollleft-r.clientwidth;if(i>0&&!(0===r.scrollleft&&0>e||r.scrollleft===i&&e>0))return!0}return!1}function s(s){var c=r(s),u=c[0],d=c[1];o(u,d)||(a=!1,e.settings.usebothwheelaxes?e.scrollbaryactive&&!e.scrollbarxactive?(d?l(t,"top",t.scrolltop-d*e.settings.wheelspeed):l(t,"top",t.scrolltop u*e.settings.wheelspeed),a=!0):e.scrollbarxactive&&!e.scrollbaryactive&&(u?l(t,"left",t.scrollleft u*e.settings.wheelspeed):l(t,"left",t.scrollleft-d*e.settings.wheelspeed),a=!0):(l(t,"top",t.scrolltop-d*e.settings.wheelspeed),l(t,"left",t.scrollleft u*e.settings.wheelspeed)),i(t),a=a||n(u,d),a&&(s.stoppropagation(),s.preventdefault()))}var a=!1;"undefined"!=typeof window.onwheel?e.event.bind(t,"wheel",s):"undefined"!=typeof window.onmousewheel&&e.event.bind(t,"mousewheel",s)}var o=t("../instances"),i=t("../update-geometry"),l=t("../update-scroll");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(t,e,n){"use strict";function r(t,e){e.event.bind(t,"scroll",function(){i(t)})}var o=t("../instances"),i=t("../update-geometry");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19}],15:[function(t,e,n){"use strict";function r(t,e){function n(){var t=window.getselection?window.getselection():document.getselection?document.getselection():"";return 0===t.tostring().length?null:t.getrangeat(0).commonancestorcontainer}function r(){c||(c=setinterval(function(){return i.get(t)?(s(t,"top",t.scrolltop u.top),s(t,"left",t.scrollleft u.left),void l(t)):void clearinterval(c)},50))}function a(){c&&(clearinterval(c),c=null),o.stopscrolling(t)}var c=null,u={top:0,left:0},d=!1;e.event.bind(e.ownerdocument,"selectionchange",function(){t.contains(n())?d=!0:(d=!1,a())}),e.event.bind(window,"mouseup",function(){d&&(d=!1,a())}),e.event.bind(window,"mousemove",function(e){if(d){var n={x:e.pagex,y:e.pagey},i={left:t.offsetleft,right:t.offsetleft t.offsetwidth,top:t.offsettop,bottom:t.offsettop t.offsetheight};n.xi.right-3?(u.left=5,o.startscrolling(t,"x")):u.left=0,n.yi.bottom-3?(n.y-i.bottom 3<5?u.top=5:u.top=20,o.startscrolling(t,"y")):u.top=0,0===u.top&&0===u.left?a():r()}})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(t,e,n){"use strict";function r(t,e,n,r){function s(n,r){var o=t.scrolltop,i=t.scrollleft,l=math.abs(n),s=math.abs(r);if(s>l){if(0>r&&o===e.contentheight-e.containerheight||r>0&&0===o)return!e.settings.swipepropagation}else if(l>s&&(0>n&&i===e.contentwidth-e.containerwidth||n>0&&0===i))return!e.settings.swipepropagation;return!0}function a(e,n){l(t,"top",t.scrolltop-n),l(t,"left",t.scrollleft-e),i(t)}function c(){y=!0}function u(){y=!1}function d(t){return t.targettouches?t.targettouches[0]:t}function p(t){return t.targettouches&&1===t.targettouches.length?!0:t.pointertype&&"mouse"!==t.pointertype&&t.pointertype!==t.mspointer_type_mouse?!0:!1}function f(t){if(p(t)){w=!0;var e=d(t);v.pagex=e.pagex,v.pagey=e.pagey,g=(new date).gettime(),null!==y&&clearinterval(y),t.stoppropagation()}}function h(t){if(!y&&w&&p(t)){var e=d(t),n={pagex:e.pagex,pagey:e.pagey},r=n.pagex-v.pagex,o=n.pagey-v.pagey;a(r,o),v=n;var i=(new date).gettime(),l=i-g;l>0&&(m.x=r/l,m.y=o/l,g=i),s(r,o)&&(t.stoppropagation(),t.preventdefault())}}function b(){!y&&w&&(w=!1,clearinterval(y),y=setinterval(function(){return o.get(t)?math.abs(m.x)<.01&&math.abs(m.y)<.01?void clearinterval(y):(a(30*m.x,30*m.y),m.x*=.8,void(m.y*=.8)):void clearinterval(y)},10))}var v={},g=0,m={},y=null,y=!1,w=!1;n&&(e.event.bind(window,"touchstart",c),e.event.bind(window,"touchend",u),e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",h),e.event.bind(t,"touchend",b)),r&&(window.pointerevent?(e.event.bind(window,"pointerdown",c),e.event.bind(window,"pointerup",u),e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",h),e.event.bind(t,"pointerup",b)):window.mspointerevent&&(e.event.bind(window,"mspointerdown",c),e.event.bind(window,"mspointerup",u),e.event.bind(t,"mspointerdown",f),e.event.bind(t,"mspointermove",h),e.event.bind(t,"mspointerup",b)))}var o=t("../instances"),i=t("../update-geometry"),l=t("../update-scroll");e.exports=function(t,e,n){var i=o.get(t);r(t,i,e,n)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(t,e,n){"use strict";var r=t("../lib/class"),o=t("../lib/helper"),i=t("./instances"),l=t("./update-geometry"),s=t("./handler/click-rail"),a=t("./handler/drag-scrollbar"),c=t("./handler/keyboard"),u=t("./handler/mouse-wheel"),d=t("./handler/native-scroll"),p=t("./handler/selection"),f=t("./handler/touch");e.exports=function(t,e){e="object"==typeof e?e:{},r.add(t,"ps-container");var n=i.add(t);n.settings=o.extend(n.settings,e),r.add(t,"ps-theme-" n.settings.theme),s(t),a(t),u(t),d(t),n.settings.useselectionscroll&&p(t),(o.env.supportstouch||o.env.supportsiepointer)&&f(t,o.env.supportstouch,o.env.supportsiepointer),n.settings.usekeyboard&&c(t),l(t)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(t,e,n){"use strict";function r(t){function e(){s.add(t,"ps-focus")}function n(){s.remove(t,"ps-focus")}var r=this;r.settings=p.clone(c),r.containerwidth=null,r.containerheight=null,r.contentwidth=null,r.contentheight=null,r.isrtl="rtl"===a.css(t,"direction"),r.isnegativescroll=function(){var e=t.scrollleft,n=null;return t.scrollleft=-1,n=t.scrollleft<0,t.scrollleft=e,n}(),r.negativescrolladjustment=r.isnegativescroll?t.scrollwidth-t.clientwidth:0,r.event=new u,r.ownerdocument=t.ownerdocument||document,r.scrollbarxrail=a.appendto(a.e("div","ps-scrollbar-x-rail"),t),r.scrollbarx=a.appendto(a.e("div","ps-scrollbar-x"),r.scrollbarxrail),r.scrollbarx.setattribute("tabindex",0),r.event.bind(r.scrollbarx,"focus",e),r.event.bind(r.scrollbarx,"blur",n),r.scrollbarxactive=null,r.scrollbarxwidth=null,r.scrollbarxleft=null,r.scrollbarxbottom=p.toint(a.css(r.scrollbarxrail,"bottom")),r.isscrollbarxusingbottom=r.scrollbarxbottom===r.scrollbarxbottom,r.scrollbarxtop=r.isscrollbarxusingbottom?null:p.toint(a.css(r.scrollbarxrail,"top")),r.railborderxwidth=p.toint(a.css(r.scrollbarxrail,"borderleftwidth")) p.toint(a.css(r.scrollbarxrail,"borderrightwidth")),a.css(r.scrollbarxrail,"display","block"),r.railxmarginwidth=p.toint(a.css(r.scrollbarxrail,"marginleft")) p.toint(a.css(r.scrollbarxrail,"marginright")),a.css(r.scrollbarxrail,"display",""),r.railxwidth=null,r.railxratio=null,r.scrollbaryrail=a.appendto(a.e("div","ps-scrollbar-y-rail"),t),r.scrollbary=a.appendto(a.e("div","ps-scrollbar-y"),r.scrollbaryrail),r.scrollbary.setattribute("tabindex",0),r.event.bind(r.scrollbary,"focus",e),r.event.bind(r.scrollbary,"blur",n),r.scrollbaryactive=null,r.scrollbaryheight=null,r.scrollbarytop=null,r.scrollbaryright=p.toint(a.css(r.scrollbaryrail,"right")),r.isscrollbaryusingright=r.scrollbaryright===r.scrollbaryright,r.scrollbaryleft=r.isscrollbaryusingright?null:p.toint(a.css(r.scrollbaryrail,"left")),r.scrollbaryouterwidth=r.isrtl?p.outerwidth(r.scrollbary):null,r.railborderywidth=p.toint(a.css(r.scrollbaryrail,"bordertopwidth")) p.toint(a.css(r.scrollbaryrail,"borderbottomwidth")),a.css(r.scrollbaryrail,"display","block"),r.railymarginheight=p.toint(a.css(r.scrollbaryrail,"margintop")) p.toint(a.css(r.scrollbaryrail,"marginbottom")),a.css(r.scrollbaryrail,"display",""),r.railyheight=null,r.railyratio=null}function o(t){return"undefined"==typeof t.dataset?t.getattribute("data-ps-id"):t.dataset.psid}function i(t,e){"undefined"==typeof t.dataset?t.setattribute("data-ps-id",e):t.dataset.psid=e}function l(t){"undefined"==typeof t.dataset?t.removeattribute("data-ps-id"):delete t.dataset.psid}var s=t("../lib/class"),a=t("../lib/dom"),c=t("./default-setting"),u=t("../lib/event-manager"),d=t("../lib/guid"),p=t("../lib/helper"),f={};n.add=function(t){var e=d();return i(t,e),f[e]=new r(t),f[e]},n.remove=function(t){delete f[o(t)],l(t)},n.get=function(t){return f[o(t)]}},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(t,e,n){"use strict";function r(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 o(t,e){var n={width:e.railxwidth};e.isrtl?n.left=e.negativescrolladjustment t.scrollleft e.containerwidth-e.contentwidth:n.left=t.scrollleft,e.isscrollbarxusingbottom?n.bottom=e.scrollbarxbottom-t.scrolltop:n.top=e.scrollbarxtop t.scrolltop,l.css(e.scrollbarxrail,n);var r={top:t.scrolltop,height:e.railyheight};e.isscrollbaryusingright?e.isrtl?r.right=e.contentwidth-(e.negativescrolladjustment t.scrollleft)-e.scrollbaryright-e.scrollbaryouterwidth:r.right=e.scrollbaryright-t.scrollleft:e.isrtl?r.left=e.negativescrolladjustment t.scrollleft 2*e.containerwidth-e.contentwidth-e.scrollbaryleft-e.scrollbaryouterwidth:r.left=e.scrollbaryleft t.scrollleft,l.css(e.scrollbaryrail,r),l.css(e.scrollbarx,{left:e.scrollbarxleft,width:e.scrollbarxwidth-e.railborderxwidth}),l.css(e.scrollbary,{top:e.scrollbarytop,height:e.scrollbaryheight-e.railborderywidth})}var i=t("../lib/class"),l=t("../lib/dom"),s=t("../lib/helper"),a=t("./instances"),c=t("./update-scroll");e.exports=function(t){var e=a.get(t);e.containerwidth=t.clientwidth,e.containerheight=t.clientheight,e.contentwidth=t.scrollwidth,e.contentheight=t.scrollheight;var n;t.contains(e.scrollbarxrail)||(n=l.querychildren(t,".ps-scrollbar-x-rail"),n.length>0&&n.foreach(function(t){l.remove(t)}),l.appendto(e.scrollbarxrail,t)),t.contains(e.scrollbaryrail)||(n=l.querychildren(t,".ps-scrollbar-y-rail"),n.length>0&&n.foreach(function(t){l.remove(t)}),l.appendto(e.scrollbaryrail,t)),!e.settings.suppressscrollx&&e.containerwidth e.settings.scrollxmarginoffset=e.railxwidth-e.scrollbarxwidth&&(e.scrollbarxleft=e.railxwidth-e.scrollbarxwidth),e.scrollbarytop>=e.railyheight-e.scrollbaryheight&&(e.scrollbarytop=e.railyheight-e.scrollbaryheight),o(t,e),e.scrollbarxactive?i.add(t,"ps-active-x"):(i.remove(t,"ps-active-x"),e.scrollbarxwidth=0,e.scrollbarxleft=0,c(t,"left",0)),e.scrollbaryactive?i.add(t,"ps-active-y"):(i.remove(t,"ps-active-y"),e.scrollbaryheight=0,e.scrollbarytop=0,c(t,"top",0))}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(t,e,n){"use strict";var r,o,i=t("./instances"),l=document.createevent("event"),s=document.createevent("event"),a=document.createevent("event"),c=document.createevent("event"),u=document.createevent("event"),d=document.createevent("event"),p=document.createevent("event"),f=document.createevent("event"),h=document.createevent("event"),b=document.createevent("event");l.initevent("ps-scroll-up",!0,!0),s.initevent("ps-scroll-down",!0,!0),a.initevent("ps-scroll-left",!0,!0),c.initevent("ps-scroll-right",!0,!0),u.initevent("ps-scroll-y",!0,!0),d.initevent("ps-scroll-x",!0,!0),p.initevent("ps-x-reach-start",!0,!0),f.initevent("ps-x-reach-end",!0,!0),h.initevent("ps-y-reach-start",!0,!0),b.initevent("ps-y-reach-end",!0,!0),e.exports=function(t,e,n){if("undefined"==typeof t)throw"you must provide an element to the update-scroll function";if("undefined"==typeof e)throw"you must provide an axis to the update-scroll function";if("undefined"==typeof n)throw"you must provide a value to the update-scroll function";"top"===e&&0>=n&&(t.scrolltop=n=0,t.dispatchevent(h)),"left"===e&&0>=n&&(t.scrollleft=n=0,t.dispatchevent(p));var v=i.get(t);"top"===e&&n>=v.contentheight-v.containerheight&&(t.scrolltop=n=v.contentheight-v.containerheight,t.dispatchevent(b)),"left"===e&&n>=v.contentwidth-v.containerwidth&&(t.scrollleft=n=v.contentwidth-v.containerwidth,t.dispatchevent(f)),r||(r=t.scrolltop),o||(o=t.scrollleft),"top"===e&&r>n&&t.dispatchevent(l),"top"===e&&n>r&&t.dispatchevent(s),"left"===e&&o>n&&t.dispatchevent(a),"left"===e&&n>o&&t.dispatchevent(c),"top"===e&&(t.scrolltop=r=n,t.dispatchevent(u)),"left"===e&&(t.scrollleft=o=n,t.dispatchevent(d))}},{"./instances":18}],21:[function(t,e,n){"use strict";var r=t("../lib/dom"),o=t("../lib/helper"),i=t("./instances"),l=t("./update-geometry"),s=t("./update-scroll");e.exports=function(t){var e=i.get(t);e&&(e.negativescrolladjustment=e.isnegativescroll?t.scrollwidth-t.clientwidth:0,r.css(e.scrollbarxrail,"display","block"),r.css(e.scrollbaryrail,"display","block"),e.railxmarginwidth=o.toint(r.css(e.scrollbarxrail,"marginleft")) o.toint(r.css(e.scrollbarxrail,"marginright")),e.railymarginheight=o.toint(r.css(e.scrollbaryrail,"margintop")) o.toint(r.css(e.scrollbaryrail,"marginbottom")),r.css(e.scrollbarxrail,"display","none"),r.css(e.scrollbaryrail,"display","none"),l(t),s(t,"top",t.scrolltop),s(t,"left",t.scrollleft),r.css(e.scrollbarxrail,"display",""),r.css(e.scrollbaryrail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]);