staffmanager/public/vendor/overlayScrollbars/js/jquery.overlayScrollbars.min.js

13 lines
41 KiB
JavaScript
Raw Permalink Normal View History

/*!
* OverlayScrollbars
* https://github.com/KingSora/OverlayScrollbars
*
* Version: 1.11.0
*
* Copyright KingSora | Rene Haas.
* https://github.com/KingSora
*
* Released under the MIT license.
* Date: 29.02.2020
*/
!function(t,r){"function"==typeof define&&define.amd?define(["jquery"],function(n){return r(t,t.document,undefined,n)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=r(t,t.document,undefined,require("jquery")):r(t,t.document,undefined,t.jQuery)}("undefined"!=typeof window?window:this,function(gt,mt,bi,n){"use strict";var o,f,c,a,yt="object",wt="function",xt="array",_t="string",St="boolean",zt="number",t="null",gi={c:"class",s:"style",i:"id",l:"length",p:"prototype",ti:"tabindex",oH:"offsetHeight",cH:"clientHeight",sH:"scrollHeight",oW:"offsetWidth",cW:"clientWidth",sW:"scrollWidth",hOP:"hasOwnProperty",bCR:"getBoundingClientRect"},Tt=(o={},f={},{e:c=["-webkit-","-moz-","-o-","-ms-"],o:a=["WebKit","Moz","O","MS"],u:function(n){var t=f[n];if(f[gi.hOP](n))return t;for(var r,e,i,o=l(n),a=mt.createElement("div")[gi.s],u=0;u<c.length;u++)for(i=c[u].replace(/-/g,""),r=[n,c[u]+n,i+o,l(i)+o],e=0;e<r[gi.l];e++)if(a[r[e]]!==bi){t=r[e];break}return f[n]=t},v:function(n,t,r){var e=0,i=o[n];if(!o[gi.hOP](n)){for(i=gt[n];e<a[gi.l];e++)i=i||gt[(t?a[e]:a[e].toLowerCase())+l(n)];o[n]=i}return i||r}});function l(n){return n.charAt(0).toUpperCase()+n.slice(1)}var mi={wW:e(r,0,!0),wH:e(r,0),mO:e(Tt.v,0,"MutationObserver",!0),rO:e(Tt.v,0,"ResizeObserver",!0),rAF:e(Tt.v,0,"requestAnimationFrame",!1,function(n){return gt.setTimeout(n,1e3/60)}),cAF:e(Tt.v,0,"cancelAnimationFrame",!1,function(n){return gt.clearTimeout(n)}),now:function(){return Date.now&&Date.now()||(new Date).getTime()},stpP:function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},prvD:function(n){n.preventDefault&&n.cancelable?n.preventDefault():n.returnValue=!1},page:function(n){var t="page",r="client",e="X",i=((n=n.originalEvent||n).target||n.srcElement||mt).ownerDocument||mt,o=i.documentElement,a=i.body;if(n.touches===bi)return!n[t+e]&&n[r+e]&&null!=n[r+e]?{x:n[r+e]+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),y:n[r+"Y"]+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.clientTop||0)}:{x:n[t+e],y:n.pageY};var u=n.touches[0];return{x:u[t+e],y:u.pageY}},mBtn:function(n){var t=n.button;return n.which||t===bi?n.which:1&t?1:2&t?3:4&t?2:0},inA:function(n,t){for(var r=0;r<t[gi.l];r++)try{if(t[r]===n)return r}catch(e){}return-1},isA:function(n){var t=Array.isArray;return t?t(n):this.type(n)==xt},type:function(n){return n===bi||null===n?n+"":Object[gi.p].toString.call(n).replace(/^\[object (.+)\]$/,"$1").toLowerCase()},bind:e};function r(n){return n?gt.innerWidth||mt.documentElement[gi.cW]||mt.body[gi.cW]:gt.innerHeight||mt.documentElement[gi.cH]||mt.body[gi.cH]}function e(n,t){if(typeof n!=wt)throw"Can't bind function!";var r=gi.p,e=Array[r].slice.call(arguments,2),i=function(){},o=function(){return n.apply(this instanceof i?this:t,e.concat(Array[r].slice.call(arguments)))};return n[r]&&(i[r]=n[r]),o[r]=new i,o}var i,u,yi,s,v,R,L,d,h,p,b,g,m,y,wi,xi=Math,_i=n,Si=(n.easing,n),zi=(i=[],u="__overlayScrollbars__",function(n,t){var r=arguments[gi.l];if(r<1)return i;if(t)n[u]=t,i.push(n);else{var e=mi.inA(n,i);if(-1<e){if(!(1<r))return i[e][u];delete n[u],i.splice(e,1)}}}),w=(y=[],R=mi.type,g={className:["os-theme-dark",[t,_t]],resize:["none","n:none b:both h:horizontal v:vertical"],sizeAutoCapable:d=[!0,St],clipAlways:d,normalizeRTL:d,paddingAbsolute:h=[!(L=[St,zt,_t,xt,yt,wt,t]),St],autoUpdate:[null,[t,St]],autoUpdateInterval:[33,zt],nativeScrollbarsOverlaid:{showNativeScrollbars:h,initialize:d},overflowBehavior:{x:["scroll",b="v-h:visible-hidden v-s:visible-scroll s:scroll h:hidden"],y:["scroll",b]},scrollbars:{visibility:["auto","v:visible h:hidden a:auto"],autoHide:["never","n:never s:scroll l:leave m:move"],autoHideDelay:[800,zt],dragScrolling:d,clickScrolling:h,touchSupport:d,snapHandle:h},textarea:{dynWidth:h,dynHeight:h,inheritedAttrs:[["style","class"],[_t,xt,t]]},callbacks:{onInitialized:p=[null,[t,wt]],onInitializationWithdrawn:p,onDestroyed:p,onScrollStart:p,onScroll:p,onScrollStop:p,onOverflowChanged:p,onOverflowAmountChanged:p,onDirectionChanged:p,onContentSizeChanged:p,onHostSizeChanged:p,onUpdat