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