mirror of https://github.com/ColorlibHQ/AdminLTE
13 lines
41 KiB
JavaScript
13 lines
41 KiB
JavaScript
|
/*!
|
||
|
* OverlayScrollbars
|
||
|
* https://github.com/KingSora/OverlayScrollbars
|
||
|
*
|
||
|
* Version: 1.7.2
|
||
|
*
|
||
|
* Copyright KingSora.
|
||
|
* https://github.com/KingSora
|
||
|
*
|
||
|
* Released under the MIT license.
|
||
|
* Date: 10.06.2019
|
||
|
*/
|
||
|
!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(dt,ht,Si,n){"use strict";var i,o,pt="OverlayScrollbars",bt="object",mt="function",wt="array",yt="string",gt="boolean",xt="number",d="null",_t="class",zi="style",St="id",zt="length",Tt="prototype",Ti="offsetHeight",ki="clientHeight",Oi="scrollHeight",Ai="offsetWidth",Ci="clientWidth",Ni="scrollWidth",kt={o:{},u:{},s:["-webkit-","-moz-","-o-","-ms-"],v:["WebKit","Moz","O","MS"],p:function(n){var t=this.u;if(t[n])return t[n];for(var r,e,i=this.s,o=this.m(n),a=ht.createElement("div")[zi],u=0,f=0;u<i.length;u++)for(e=i[u].replace(/-/g,""),r=[n,i[u]+n,e+o,this.m(e)+o],f=0;f<r[zt];f++)if(a[r[f]]!==Si)return t[n]=r[f],r[f];return null},g:function(n,t,r){var e=this.v,i=this.o,o=0,a=i[n];if(!a){for(a=dt[n];o<e[zt];o++)a=a||dt[(t?e[o]:e[o].toLowerCase())+this.m(n)];i[n]=a}return a||r},m:function(n){return n.charAt(0).toUpperCase()+n.slice(1)}},Hi={wW:function(){return dt.innerWidth||ht.documentElement[Ci]||ht.body[Ci]},wH:function(){return dt.innerHeight||ht.documentElement[ki]||ht.body[ki]},mO:function(){return kt.g("MutationObserver",!0)},rO:function(){return kt.g("ResizeObserver",!0)},rAF:function(){return kt.g("requestAnimationFrame",!1,function(n){return dt.setTimeout(n,1e3/60)})},cAF:function(){return kt.g("cancelAnimationFrame",!1,function(n){return dt.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||ht).ownerDocument||ht,o=i.documentElement,a=i.body;if(n.touches===Si)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===Si?n.which:1&t?1:2&t?3:4&t?2:0},inA:function(n,t){for(var r=0;r<t[zt];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)==wt},type:function(n){return n===Si?n+"":null===n?n+"":Object[Tt].toString.call(n).replace(/^\[object (.+)\]$/,"$1").toLowerCase()},bind:function(n,t){if(typeof n!=mt)throw"Can't bind function!";var r=Tt,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}},Li=Math,Ri=n,Di=(n.easing,n),Ii=(i=[],o="__overlayScrollbars__",function(n,t){var r=arguments[zt];if(r<1)return i;if(t)n[o]=t,i.push(n);else{var e=Hi.inA(n,i);if(-1<e){if(!(1<r))return i[e][o];delete n[o],i.splice(e,1)}}}),r=function(){var u,f,O,n,t,r,e,a,i,c=[],vt=(a={className:["os-theme-dark",[d,yt]],resize:["none","n:none b:both h:horizontal v:vertical"],sizeAutoCapable:n=[!0,gt],clipAlways:n,normalizeRTL:n,paddingAbsolute:t=[!(O=[gt,xt,yt,wt,bt,mt,d]),gt],autoUpdate:[null,[d,gt]],autoUpdateInterval:[33,xt],nativeScrollbarsOverlaid:{showNativeScrollbars:t,initialize:n},overflowBehavior:{x:["scroll",e="v-h:visible-hidden v-s:visible-scroll s:scroll h:hidden"],y:["scroll",e]},scrollbars:{visibility:["auto","v:visible h:hidden a:auto"],autoHide:["never","n:never s:scroll l:leave m:move"],autoHideDelay:[800,xt],dragScrolling:n,clickScrolling:t,touchSupport:n,snapHandle:t},textarea:{dynWidth:t,dynHeight:t,inheritedAttrs:[["style","class"],[yt,wt,d]]},callbacks:{onInitialized:r=[null,[d,mt]],onInitializationWithdrawn:r,onDestroyed:r,onScrollStart:r,onScroll:r,onScrollStop:r,onOverflowChanged:r,onOverflowAmountChanged:r,onDirectionChanged:r,onContentSizeChanged:r,onHostSizeChanged:r,o
|