simplebar-react
Advanced tools
Comparing version 1.3.0-alpha.1 to 2.0.0-alpha.0
/** | ||
* simplebar-react - v1.3.0-alpha.1 | ||
* simplebar-react - v2.0.0-alpha.0 | ||
* React component for SimpleBar | ||
@@ -12,3 +12,3 @@ * https://grsmto.github.io/simplebar/ | ||
import PropTypes from 'prop-types'; | ||
import SimpleBarJS from 'simplebar'; | ||
import SimpleBarJS from 'simplebar/dist/simplebar-core.esm'; | ||
@@ -48,16 +48,31 @@ function _defineProperty(obj, key, value) { | ||
function _objectSpread(target) { | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var ownKeys = Object.keys(source); | ||
if (typeof Object.getOwnPropertySymbols === 'function') { | ||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(source, sym).enumerable; | ||
})); | ||
if (i % 2) { | ||
ownKeys(source, true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(source).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
ownKeys.forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} | ||
@@ -104,24 +119,80 @@ | ||
/* Deprecated | ||
* Hardcore this here until we can safely deprecated it. | ||
* Helper function to retrieve options from element attributes | ||
*/ | ||
var getOptions = function getOptions(obj) { | ||
var options = Array.prototype.reduce.call(obj, function (acc, attribute) { | ||
var option = attribute.name.match(/data-simplebar-(.+)/); | ||
if (option) { | ||
var key = option[1].replace(/\W+(.)/g, function (x, chr) { | ||
return chr.toUpperCase(); | ||
}); | ||
switch (attribute.value) { | ||
case 'true': | ||
acc[key] = true; | ||
break; | ||
case 'false': | ||
acc[key] = false; | ||
break; | ||
case undefined: | ||
acc[key] = true; | ||
break; | ||
default: | ||
acc[key] = attribute.value; | ||
} | ||
} | ||
return acc; | ||
}, {}); | ||
return options; | ||
}; | ||
function SimpleBar(_ref) { | ||
var children = _ref.children, | ||
className = _ref.className, | ||
style = _ref.style, | ||
scrollableNodeProps = _ref.scrollableNodeProps, | ||
options = _objectWithoutProperties(_ref, ["children", "className", "style", "scrollableNodeProps"]); | ||
_ref$scrollableNodePr = _ref.scrollableNodeProps, | ||
scrollableNodeProps = _ref$scrollableNodePr === void 0 ? {} : _ref$scrollableNodePr, | ||
otherProps = _objectWithoutProperties(_ref, ["children", "scrollableNodeProps"]); | ||
var elRef = useRef(); | ||
var scrollableNodeRef = useRef(); | ||
var scrollableNodeRef = scrollableNodeProps.ref || useRef(); | ||
var contentNodeRef = useRef(); | ||
var options = {}; | ||
var rest = {}; | ||
var deprecatedOptions = []; | ||
Object.keys(otherProps).forEach(function (key) { | ||
if (Object.prototype.hasOwnProperty.call(SimpleBarJS.defaultOptions, key)) { | ||
options[key] = otherProps[key]; | ||
} else if (key.match(/data-simplebar-(.+)/)) { | ||
deprecatedOptions.push({ | ||
name: key, | ||
value: otherProps[key] | ||
}); | ||
} else { | ||
rest[key] = otherProps[key]; | ||
} | ||
}); | ||
if (deprecatedOptions.length) { | ||
console.warn("simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:\n 'data-simplebar-auto-hide=\"false\"' \u2014> 'autoHide=\"false\"'\n "); | ||
} | ||
useEffect(function () { | ||
new SimpleBarJS(elRef.current, _objectSpread({}, options, scrollableNodeRef.current && { | ||
scrollableNode: scrollableNodeRef.current | ||
}, contentNodeRef.current && { | ||
contentNode: contentNodeRef.current | ||
})); | ||
if (elRef.current) { | ||
new SimpleBarJS(elRef.current, _objectSpread2({}, getOptions(deprecatedOptions), {}, options, {}, scrollableNodeRef.current && { | ||
scrollableNode: scrollableNodeRef.current | ||
}, {}, contentNodeRef.current && { | ||
contentNode: contentNodeRef.current | ||
})); | ||
} | ||
}); | ||
return React.createElement("div", { | ||
ref: elRef, | ||
className: className, | ||
style: style | ||
}, React.createElement("div", { | ||
return React.createElement("div", _extends({ | ||
ref: elRef | ||
}, rest), React.createElement("div", { | ||
className: "simplebar-wrapper" | ||
@@ -140,3 +211,3 @@ }, React.createElement("div", { | ||
}) : React.createElement("div", _extends({}, scrollableNodeProps, { | ||
className: "simplebar-content-wrapper".concat(scrollableNodeProps && scrollableNodeProps.className ? " ".concat(scrollableNodeProps.className) : '') | ||
className: "simplebar-content-wrapper".concat(scrollableNodeProps.className ? " ".concat(scrollableNodeProps.className) : '') | ||
}), React.createElement("div", { | ||
@@ -158,4 +229,2 @@ className: "simplebar-content" | ||
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]), | ||
className: PropTypes.string, | ||
style: PropTypes.object, | ||
scrollableNodeProps: PropTypes.object | ||
@@ -162,0 +231,0 @@ }; |
/** | ||
* simplebar-react - v1.3.0-alpha.1 | ||
* simplebar-react - v2.0.0-alpha.0 | ||
* React component for SimpleBar | ||
@@ -10,2 +10,2 @@ * https://grsmto.github.io/simplebar/ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("prop-types"),require("simplebar")):"function"==typeof define&&define.amd?define(["react","prop-types","simplebar"],r):(e=e||self).SimpleBar=r(e.React,e.PropTypes,e.SimpleBarJS)}(this,function(e,r,t){"use strict";var a="default"in e?e.default:e;function l(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(){return(n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function c(e,r){if(null==e)return{};var t,a,l=function(e,r){if(null==e)return{};var t,a,l={},n=Object.keys(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||(l[t]=e[t]);return l}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}function s(r){var s=r.children,o=r.className,i=r.style,p=r.scrollableNodeProps,m=c(r,["children","className","style","scrollableNodeProps"]),u=e.useRef(),f=e.useRef(),b=e.useRef();return e.useEffect(function(){new t(u.current,function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.forEach(function(r){l(e,r,t[r])})}return e}({},m,f.current&&{scrollableNode:f.current},b.current&&{contentNode:b.current}))}),a.createElement("div",{ref:u,className:o,style:i},a.createElement("div",{className:"simplebar-wrapper"},a.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},a.createElement("div",{className:"simplebar-height-auto-observer"})),a.createElement("div",{className:"simplebar-mask"},a.createElement("div",{className:"simplebar-offset"},"function"==typeof s?s({scrollableNodeRef:f,contentNodeRef:b}):a.createElement("div",n({},p,{className:"simplebar-content-wrapper".concat(p&&p.className?" ".concat(p.className):"")}),a.createElement("div",{className:"simplebar-content"},s)))),a.createElement("div",{className:"simplebar-placeholder"})),a.createElement("div",{className:"simplebar-track simplebar-horizontal"},a.createElement("div",{className:"simplebar-scrollbar"})),a.createElement("div",{className:"simplebar-track simplebar-vertical"},a.createElement("div",{className:"simplebar-scrollbar"})))}return r=r&&r.hasOwnProperty("default")?r.default:r,t=t&&t.hasOwnProperty("default")?t.default:t,s.propTypes={children:r.oneOfType([r.node,r.func]),className:r.string,style:r.object,scrollableNodeProps:r.object},s}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],e):(t=t||self).SimpleBar=e(t.React,t.PropTypes)}(this,(function(t,e){"use strict";var r="default"in t?t.default:t;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function s(t,e){if(null==t)return{};var r,i,n=function(t,e){if(null==t)return{};var r,i,n={},o=Object.keys(t);for(i=0;i<o.length;i++)r=o[i],e.indexOf(r)>=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}e=e&&e.hasOwnProperty("default")?e.default:e;var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var l,u,f,h="object",p=function(t){return t&&t.Math==Math&&t},d=p(typeof globalThis==h&&globalThis)||p(typeof window==h&&window)||p(typeof self==h&&self)||p(typeof a==h&&a)||Function("return this")(),v=function(t){try{return!!t()}catch(t){return!0}},b=!v((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),y={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,m={f:g&&!y.call({1:2},1)?function(t){var e=g(this,t);return!!e&&e.enumerable}:y},x=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},w={}.toString,E=function(t){return w.call(t).slice(8,-1)},O="".split,_=v((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==E(t)?O.call(t,""):Object(t)}:Object,S=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},A=function(t){return _(S(t))},k=function(t){return"object"==typeof t?null!==t:"function"==typeof t},j=function(t,e){if(!k(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!k(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!k(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!k(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")},L={}.hasOwnProperty,M=function(t,e){return L.call(t,e)},T=d.document,N=k(T)&&k(T.createElement),R=function(t){return N?T.createElement(t):{}},z=!b&&!v((function(){return 7!=Object.defineProperty(R("div"),"a",{get:function(){return 7}}).a})),W=Object.getOwnPropertyDescriptor,P={f:b?W:function(t,e){if(t=A(t),e=j(e,!0),z)try{return W(t,e)}catch(t){}if(M(t,e))return x(!m.f.call(t,e),t[e])}},C=function(t){if(!k(t))throw TypeError(String(t)+" is not an object");return t},I=Object.defineProperty,D={f:b?I:function(t,e,r){if(C(t),e=j(e,!0),C(r),z)try{return I(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},V=b?function(t,e,r){return D.f(t,e,x(1,r))}:function(t,e,r){return t[e]=r,t},F=function(t,e){try{V(d,t,e)}catch(r){d[t]=e}return e},H=c((function(t){var e=d["__core-js_shared__"]||F("__core-js_shared__",{});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),B=H("native-function-to-string",Function.toString),q=d.WeakMap,G="function"==typeof q&&/native code/.test(B.call(q)),X=0,Y=Math.random(),$=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+Y).toString(36)},U=H("keys"),Q=function(t){return U[t]||(U[t]=$(t))},K={},J=d.WeakMap;if(G){var Z=new J,tt=Z.get,et=Z.has,rt=Z.set;l=function(t,e){return rt.call(Z,t,e),e},u=function(t){return tt.call(Z,t)||{}},f=function(t){return et.call(Z,t)}}else{var it=Q("state");K[it]=!0,l=function(t,e){return V(t,it,e),e},u=function(t){return M(t,it)?t[it]:{}},f=function(t){return M(t,it)}}var nt={set:l,get:u,has:f,enforce:function(t){return f(t)?u(t):l(t,{})},getterFor:function(t){return function(e){var r;if(!k(e)||(r=u(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ot=c((function(t){var e=nt.get,r=nt.enforce,i=String(B).split("toString");H("inspectSource",(function(t){return B.call(t)})),(t.exports=function(t,e,n,o){var s=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||M(n,"name")||V(n,"name",e),r(n).source=i.join("string"==typeof e?e:"")),t!==d?(s?!c&&t[e]&&(a=!0):delete t[e],a?t[e]=n:V(t,e,n)):a?t[e]=n:F(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||B.call(this)}))})),st=d,at=function(t){return"function"==typeof t?t:void 0},ct=function(t,e){return arguments.length<2?at(st[t])||at(d[t]):st[t]&&st[t][e]||d[t]&&d[t][e]},lt=Math.ceil,ut=Math.floor,ft=function(t){return isNaN(t=+t)?0:(t>0?ut:lt)(t)},ht=Math.min,pt=function(t){return t>0?ht(ft(t),9007199254740991):0},dt=Math.max,vt=Math.min,bt=function(t){return function(e,r,i){var n,o=A(e),s=pt(o.length),a=function(t,e){var r=ft(t);return r<0?dt(r+e,0):vt(r,e)}(i,s);if(t&&r!=r){for(;s>a;)if((n=o[a++])!=n)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},yt={includes:bt(!0),indexOf:bt(!1)}.indexOf,gt=function(t,e){var r,i=A(t),n=0,o=[];for(r in i)!M(K,r)&&M(i,r)&&o.push(r);for(;e.length>n;)M(i,r=e[n++])&&(~yt(o,r)||o.push(r));return o},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xt=mt.concat("length","prototype"),wt={f:Object.getOwnPropertyNames||function(t){return gt(t,xt)}},Et={f:Object.getOwnPropertySymbols},Ot=ct("Reflect","ownKeys")||function(t){var e=wt.f(C(t)),r=Et.f;return r?e.concat(r(t)):e},_t=function(t,e){for(var r=Ot(e),i=D.f,n=P.f,o=0;o<r.length;o++){var s=r[o];M(t,s)||i(t,s,n(e,s))}},St=/#|\.prototype\./,At=function(t,e){var r=jt[kt(t)];return r==Mt||r!=Lt&&("function"==typeof e?v(e):!!e)},kt=At.normalize=function(t){return String(t).replace(St,".").toLowerCase()},jt=At.data={},Lt=At.NATIVE="N",Mt=At.POLYFILL="P",Tt=At,Nt=P.f,Rt=function(t,e){var r,i,n,o,s,a=t.target,c=t.global,l=t.stat;if(r=c?d:l?d[a]||F(a,{}):(d[a]||{}).prototype)for(i in e){if(o=e[i],n=t.noTargetGet?(s=Nt(r,i))&&s.value:r[i],!Tt(c?i:a+(l?".":"#")+i,t.forced)&&void 0!==n){if(typeof o==typeof n)continue;_t(o,n)}(t.sham||n&&n.sham)&&V(o,"sham",!0),ot(r,i,o,t)}},zt=function(t,e,r){if(function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function")}(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,i){return t.call(e,r,i)};case 3:return function(r,i,n){return t.call(e,r,i,n)}}return function(){return t.apply(e,arguments)}},Wt=function(t){return Object(S(t))},Pt=Array.isArray||function(t){return"Array"==E(t)},Ct=!!Object.getOwnPropertySymbols&&!v((function(){return!String(Symbol())})),It=d.Symbol,Dt=H("wks"),Vt=function(t){return Dt[t]||(Dt[t]=Ct&&It[t]||(Ct?It:$)("Symbol."+t))},Ft=Vt("species"),Ht=function(t,e){var r;return Pt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Pt(r.prototype)?k(r)&&null===(r=r[Ft])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Bt=[].push,qt=function(t){var e=1==t,r=2==t,i=3==t,n=4==t,o=6==t,s=5==t||o;return function(a,c,l,u){for(var f,h,p=Wt(a),d=_(p),v=zt(c,l,3),b=pt(d.length),y=0,g=u||Ht,m=e?g(a,b):r?g(a,0):void 0;b>y;y++)if((s||y in d)&&(h=v(f=d[y],y,p),t))if(e)m[y]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:Bt.call(m,f)}else if(n)return!1;return o?-1:i||n?n:m}},Gt={forEach:qt(0),map:qt(1),filter:qt(2),some:qt(3),every:qt(4),find:qt(5),findIndex:qt(6)},Xt=Vt("species"),Yt=Gt.filter;Rt({target:"Array",proto:!0,forced:!function(t){return!v((function(){var e=[];return(e.constructor={})[Xt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("filter")},{filter:function(t){return Yt(this,t,arguments.length>1?arguments[1]:void 0)}});var $t=Gt.forEach,Ut=function(t,e){var r=[][t];return!r||!v((function(){r.call(null,e||function(){throw 1},1)}))}("forEach")?function(t){return $t(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach;Rt({target:"Array",proto:!0,forced:[].forEach!=Ut},{forEach:Ut});var Qt=Object.keys||function(t){return gt(t,mt)},Kt=b?Object.defineProperties:function(t,e){C(t);for(var r,i=Qt(e),n=i.length,o=0;n>o;)D.f(t,r=i[o++],e[r]);return t},Jt=ct("document","documentElement"),Zt=Q("IE_PROTO"),te=function(){},ee=function(){var t,e=R("iframe"),r=mt.length;for(e.style.display="none",Jt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),ee=t.F;r--;)delete ee.prototype[mt[r]];return ee()},re=Object.create||function(t,e){var r;return null!==t?(te.prototype=C(t),r=new te,te.prototype=null,r[Zt]=t):r=ee(),void 0===e?r:Kt(r,e)};K[Zt]=!0;var ie=Vt("unscopables"),ne=Array.prototype;null==ne[ie]&&V(ne,ie,re(null));var oe,se,ae,ce=function(t){ne[ie][t]=!0},le={},ue=!v((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),fe=Q("IE_PROTO"),he=Object.prototype,pe=ue?Object.getPrototypeOf:function(t){return t=Wt(t),M(t,fe)?t[fe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?he:null},de=Vt("iterator"),ve=!1;[].keys&&("next"in(ae=[].keys())?(se=pe(pe(ae)))!==Object.prototype&&(oe=se):ve=!0),null==oe&&(oe={}),M(oe,de)||V(oe,de,(function(){return this}));var be={IteratorPrototype:oe,BUGGY_SAFARI_ITERATORS:ve},ye=D.f,ge=Vt("toStringTag"),me=function(t,e,r){t&&!M(t=r?t:t.prototype,ge)&&ye(t,ge,{configurable:!0,value:e})},xe=be.IteratorPrototype,we=function(){return this},Ee=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return C(r),function(t){if(!k(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(i),e?t.call(r,i):r.__proto__=i,r}}():void 0),Oe=be.IteratorPrototype,_e=be.BUGGY_SAFARI_ITERATORS,Se=Vt("iterator"),Ae=function(){return this},ke=function(t,e,r,i,n,o,s){!function(t,e,r){var i=e+" Iterator";t.prototype=re(xe,{next:x(1,r)}),me(t,i,!1),le[i]=we}(r,e,i);var a,c,l,u=function(t){if(t===n&&v)return v;if(!_e&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",h=!1,p=t.prototype,d=p[Se]||p["@@iterator"]||n&&p[n],v=!_e&&d||u(n),b="Array"==e&&p.entries||d;if(b&&(a=pe(b.call(new t)),Oe!==Object.prototype&&a.next&&(pe(a)!==Oe&&(Ee?Ee(a,Oe):"function"!=typeof a[Se]&&V(a,Se,Ae)),me(a,f,!0))),"values"==n&&d&&"values"!==d.name&&(h=!0,v=function(){return d.call(this)}),p[Se]!==v&&V(p,Se,v),le[e]=v,n)if(c={values:u("values"),keys:o?v:u("keys"),entries:u("entries")},s)for(l in c)!_e&&!h&&l in p||ot(p,l,c[l]);else Rt({target:e,proto:!0,forced:_e||h},c);return c},je=nt.set,Le=nt.getterFor("Array Iterator"),Me=ke(Array,"Array",(function(t,e){je(this,{type:"Array Iterator",target:A(t),index:0,kind:e})}),(function(){var t=Le(this),e=t.target,r=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:i,done:!1}:"values"==r?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values");le.Arguments=le.Array,ce("keys"),ce("values"),ce("entries");var Te=Object.assign,Ne=!Te||v((function(){var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=Te({},t)[r]||"abcdefghijklmnopqrst"!=Qt(Te({},e)).join("")}))?function(t,e){for(var r=Wt(t),i=arguments.length,n=1,o=Et.f,s=m.f;i>n;)for(var a,c=_(arguments[n++]),l=o?Qt(c).concat(o(c)):Qt(c),u=l.length,f=0;u>f;)a=l[f++],b&&!s.call(c,a)||(r[a]=c[a]);return r}:Te;Rt({target:"Object",stat:!0,forced:Object.assign!==Ne},{assign:Ne});var Re=Vt("toStringTag"),ze="Arguments"==E(function(){return arguments}()),We=function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Re))?r:ze?E(e):"Object"==(i=E(e))&&"function"==typeof e.callee?"Arguments":i},Pe={};Pe[Vt("toStringTag")]="z";var Ce="[object z]"!==String(Pe)?function(){return"[object "+We(this)+"]"}:Pe.toString,Ie=Object.prototype;Ce!==Ie.toString&&ot(Ie,"toString",Ce,{unsafe:!0});var De="\t\n\v\f\r \u2028\u2029\ufeff",Ve="["+De+"]",Fe=RegExp("^"+Ve+Ve+"*"),He=RegExp(Ve+Ve+"*$"),Be=function(t){return function(e){var r=String(S(e));return 1&t&&(r=r.replace(Fe,"")),2&t&&(r=r.replace(He,"")),r}},qe={start:Be(1),end:Be(2),trim:Be(3)}.trim,Ge=d.parseInt,Xe=/^[+-]?0[Xx]/,Ye=8!==Ge(De+"08")||22!==Ge(De+"0x16")?function(t,e){var r=qe(String(t));return Ge(r,e>>>0||(Xe.test(r)?16:10))}:Ge;Rt({global:!0,forced:parseInt!=Ye},{parseInt:Ye});var $e=function(t){return function(e,r){var i,n,o=String(S(e)),s=ft(r),a=o.length;return s<0||s>=a?t?"":void 0:(i=o.charCodeAt(s))<55296||i>56319||s+1===a||(n=o.charCodeAt(s+1))<56320||n>57343?t?o.charAt(s):i:t?o.slice(s,s+2):n-56320+(i-55296<<10)+65536}},Ue={codeAt:$e(!1),charAt:$e(!0)}.charAt,Qe=nt.set,Ke=nt.getterFor("String Iterator");ke(String,"String",(function(t){Qe(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Ke(this),r=e.string,i=e.index;return i>=r.length?{value:void 0,done:!0}:(t=Ue(r,i),e.index+=t.length,{value:t,done:!1})}));var Je=function(t,e,r){for(var i in e)ot(t,i,e[i],r);return t},Ze=!v((function(){return Object.isExtensible(Object.preventExtensions({}))})),tr=c((function(t){var e=D.f,r=$("meta"),i=0,n=Object.isExtensible||function(){return!0},o=function(t){e(t,r,{value:{objectID:"O"+ ++i,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!k(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!M(t,r)){if(!n(t))return"F";if(!e)return"E";o(t)}return t[r].objectID},getWeakData:function(t,e){if(!M(t,r)){if(!n(t))return!0;if(!e)return!1;o(t)}return t[r].weakData},onFreeze:function(t){return Ze&&s.REQUIRED&&n(t)&&!M(t,r)&&o(t),t}};K[r]=!0})),er=(tr.REQUIRED,tr.fastKey,tr.getWeakData,tr.onFreeze,Vt("iterator")),rr=Array.prototype,ir=Vt("iterator"),nr=function(t,e,r,i){try{return i?e(C(r)[0],r[1]):e(r)}catch(e){var n=t.return;throw void 0!==n&&C(n.call(t)),e}},or=c((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,r,i,n,o){var s,a,c,l,u,f,h,p=zt(r,i,n?2:1);if(o)s=t;else{if("function"!=typeof(a=function(t){if(null!=t)return t[ir]||t["@@iterator"]||le[We(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(h=a)&&(le.Array===h||rr[er]===h)){for(c=0,l=pt(t.length);l>c;c++)if((u=n?p(C(f=t[c])[0],f[1]):p(t[c]))&&u instanceof e)return u;return new e(!1)}s=a.call(t)}for(;!(f=s.next()).done;)if((u=nr(s,p,f.value,n))&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}})),sr=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},ar=Vt("iterator"),cr=!1;try{var lr=0,ur={next:function(){return{done:!!lr++}},return:function(){cr=!0}};ur[ar]=function(){return this},Array.from(ur,(function(){throw 2}))}catch(t){}var fr=function(t,e,r,i,n){var o=d[t],s=o&&o.prototype,a=o,c=i?"set":"add",l={},u=function(t){var e=s[t];ot(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(n&&!k(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return n&&!k(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(n&&!k(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(Tt(t,"function"!=typeof o||!(n||s.forEach&&!v((function(){(new o).entries().next()})))))a=r.getConstructor(e,t,i,c),tr.REQUIRED=!0;else if(Tt(t,!0)){var f=new a,h=f[c](n?{}:-0,1)!=f,p=v((function(){f.has(1)})),b=function(t,e){if(!e&&!cr)return!1;var r=!1;try{var i={};i[ar]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}((function(t){new o(t)})),y=!n&&v((function(){for(var t=new o,e=5;e--;)t[c](e,e);return!t.has(-0)}));b||((a=e((function(e,r){sr(e,a,t);var n=function(t,e,r){var i,n;return Ee&&"function"==typeof(i=e.constructor)&&i!==r&&k(n=i.prototype)&&n!==r.prototype&&Ee(t,n),t}(new o,e,a);return null!=r&&or(r,n[c],n,i),n}))).prototype=s,s.constructor=a),(p||y)&&(u("delete"),u("has"),i&&u("get")),(y||h)&&u(c),n&&s.clear&&delete s.clear}return l[t]=a,Rt({global:!0,forced:a!=o},l),me(a,t),n||r.setStrong(a,t,i),a},hr=tr.getWeakData,pr=nt.set,dr=nt.getterFor,vr=Gt.find,br=Gt.findIndex,yr=0,gr=function(t){return t.frozen||(t.frozen=new mr)},mr=function(){this.entries=[]},xr=function(t,e){return vr(t.entries,(function(t){return t[0]===e}))};mr.prototype={get:function(t){var e=xr(this,t);if(e)return e[1]},has:function(t){return!!xr(this,t)},set:function(t,e){var r=xr(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=br(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}};var wr={getConstructor:function(t,e,r,i){var n=t((function(t,o){sr(t,n,e),pr(t,{type:e,id:yr++,frozen:void 0}),null!=o&&or(o,t[i],t,r)})),o=dr(e),s=function(t,e,r){var i=o(t),n=hr(C(e),!0);return!0===n?gr(i).set(e,r):n[i.id]=r,t};return Je(n.prototype,{delete:function(t){var e=o(this);if(!k(t))return!1;var r=hr(t);return!0===r?gr(e).delete(t):r&&M(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!k(t))return!1;var r=hr(t);return!0===r?gr(e).has(t):r&&M(r,e.id)}}),Je(n.prototype,r?{get:function(t){var e=o(this);if(k(t)){var r=hr(t);return!0===r?gr(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),n}},Er=(c((function(t){var e,r=nt.enforce,i=!d.ActiveXObject&&"ActiveXObject"in d,n=Object.isExtensible,o=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},s=t.exports=fr("WeakMap",o,wr,!0,!0);if(G&&i){e=wr.getConstructor(o,"WeakMap",!0),tr.REQUIRED=!0;var a=s.prototype,c=a.delete,l=a.has,u=a.get,f=a.set;Je(a,{delete:function(t){if(k(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),c.call(this,t)||i.frozen.delete(t)}return c.call(this,t)},has:function(t){if(k(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),l.call(this,t)||i.frozen.has(t)}return l.call(this,t)},get:function(t){if(k(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),l.call(this,t)?u.call(this,t):i.frozen.get(t)}return u.call(this,t)},set:function(t,i){if(k(t)&&!n(t)){var o=r(this);o.frozen||(o.frozen=new e),l.call(this,t)?f.call(this,t,i):o.frozen.set(t,i)}else f.call(this,t,i);return this}})}})),{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Or=Vt("iterator"),_r=Vt("toStringTag"),Sr=Me.values;for(var Ar in Er){var kr=d[Ar],jr=kr&&kr.prototype;if(jr){if(jr[Or]!==Sr)try{V(jr,Or,Sr)}catch(t){jr[Or]=Sr}if(jr[_r]||V(jr,_r,Ar),Er[Ar])for(var Lr in Me)if(jr[Lr]!==Me[Lr])try{V(jr,Lr,Me[Lr])}catch(t){jr[Lr]=Me[Lr]}}}var Mr="Expected a function",Tr=NaN,Nr="[object Symbol]",Rr=/^\s+|\s+$/g,zr=/^[-+]0x[0-9a-f]+$/i,Wr=/^0b[01]+$/i,Pr=/^0o[0-7]+$/i,Cr=parseInt,Ir="object"==typeof a&&a&&a.Object===Object&&a,Dr="object"==typeof self&&self&&self.Object===Object&&self,Vr=Ir||Dr||Function("return this")(),Fr=Object.prototype.toString,Hr=Math.max,Br=Math.min,qr=function(){return Vr.Date.now()};function Gr(t,e,r){var i,n,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Mr);function p(e){var r=i,o=n;return i=n=void 0,l=e,s=t.apply(o,r)}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=qr();if(d(t))return b(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?Br(r,o-(t-l)):r}(t))}function b(t){return a=void 0,h&&i?p(t):(i=n=void 0,s)}function y(){var t=qr(),r=d(t);if(i=arguments,n=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?p(t):s}(c);if(f)return a=setTimeout(v,e),p(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=Yr(e)||0,Xr(r)&&(u=!!r.leading,o=(f="maxWait"in r)?Hr(Yr(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=n=a=void 0},y.flush=function(){return void 0===a?s:b(qr())},y}function Xr(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Yr(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&Fr.call(t)==Nr}(t))return Tr;if(Xr(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Xr(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Rr,"");var r=Wr.test(t);return r||Pr.test(t)?Cr(t.slice(2),r?2:8):zr.test(t)?Tr:+t}var $r=function(t,e,r){var i=!0,n=!0;if("function"!=typeof t)throw new TypeError(Mr);return Xr(r)&&(i="leading"in r?!!r.leading:i,n="trailing"in r?!!r.trailing:n),Gr(t,e,{leading:i,maxWait:e,trailing:n})},Ur="Expected a function",Qr=NaN,Kr="[object Symbol]",Jr=/^\s+|\s+$/g,Zr=/^[-+]0x[0-9a-f]+$/i,ti=/^0b[01]+$/i,ei=/^0o[0-7]+$/i,ri=parseInt,ii="object"==typeof a&&a&&a.Object===Object&&a,ni="object"==typeof self&&self&&self.Object===Object&&self,oi=ii||ni||Function("return this")(),si=Object.prototype.toString,ai=Math.max,ci=Math.min,li=function(){return oi.Date.now()};function ui(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function fi(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&si.call(t)==Kr}(t))return Qr;if(ui(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ui(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Jr,"");var r=ti.test(t);return r||ei.test(t)?ri(t.slice(2),r?2:8):Zr.test(t)?Qr:+t}var hi=function(t,e,r){var i,n,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Ur);function p(e){var r=i,o=n;return i=n=void 0,l=e,s=t.apply(o,r)}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=li();if(d(t))return b(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?ci(r,o-(t-l)):r}(t))}function b(t){return a=void 0,h&&i?p(t):(i=n=void 0,s)}function y(){var t=li(),r=d(t);if(i=arguments,n=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?p(t):s}(c);if(f)return a=setTimeout(v,e),p(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=fi(e)||0,ui(r)&&(u=!!r.leading,o=(f="maxWait"in r)?ai(fi(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=n=a=void 0},y.flush=function(){return void 0===a?s:b(li())},y},pi="Expected a function",di="__lodash_hash_undefined__",vi="[object Function]",bi="[object GeneratorFunction]",yi=/^\[object .+?Constructor\]$/,gi="object"==typeof a&&a&&a.Object===Object&&a,mi="object"==typeof self&&self&&self.Object===Object&&self,xi=gi||mi||Function("return this")();var wi=Array.prototype,Ei=Function.prototype,Oi=Object.prototype,_i=xi["__core-js_shared__"],Si=function(){var t=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ai=Ei.toString,ki=Oi.hasOwnProperty,ji=Oi.toString,Li=RegExp("^"+Ai.call(ki).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mi=wi.splice,Ti=Di(xi,"Map"),Ni=Di(Object,"create");function Ri(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function zi(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Wi(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Pi(t,e){for(var r,i,n=t.length;n--;)if((r=t[n][0])===(i=e)||r!=r&&i!=i)return n;return-1}function Ci(t){return!(!Fi(t)||(e=t,Si&&Si in e))&&(function(t){var e=Fi(t)?ji.call(t):"";return e==vi||e==bi}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?Li:yi).test(function(t){if(null!=t){try{return Ai.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Ii(t,e){var r,i,n=t.__data__;return("string"==(i=typeof(r=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?n["string"==typeof e?"string":"hash"]:n.map}function Di(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Ci(r)?r:void 0}function Vi(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(pi);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=t.apply(this,i);return r.cache=o.set(n,s),s};return r.cache=new(Vi.Cache||Wi),r}function Fi(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Ri.prototype.clear=function(){this.__data__=Ni?Ni(null):{}},Ri.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Ri.prototype.get=function(t){var e=this.__data__;if(Ni){var r=e[t];return r===di?void 0:r}return ki.call(e,t)?e[t]:void 0},Ri.prototype.has=function(t){var e=this.__data__;return Ni?void 0!==e[t]:ki.call(e,t)},Ri.prototype.set=function(t,e){return this.__data__[t]=Ni&&void 0===e?di:e,this},zi.prototype.clear=function(){this.__data__=[]},zi.prototype.delete=function(t){var e=this.__data__,r=Pi(e,t);return!(r<0)&&(r==e.length-1?e.pop():Mi.call(e,r,1),!0)},zi.prototype.get=function(t){var e=this.__data__,r=Pi(e,t);return r<0?void 0:e[r][1]},zi.prototype.has=function(t){return Pi(this.__data__,t)>-1},zi.prototype.set=function(t,e){var r=this.__data__,i=Pi(r,t);return i<0?r.push([t,e]):r[i][1]=e,this},Wi.prototype.clear=function(){this.__data__={hash:new Ri,map:new(Ti||zi),string:new Ri}},Wi.prototype.delete=function(t){return Ii(this,t).delete(t)},Wi.prototype.get=function(t){return Ii(this,t).get(t)},Wi.prototype.has=function(t){return Ii(this,t).has(t)},Wi.prototype.set=function(t,e){return Ii(this,t).set(t,e),this},Vi.Cache=Wi;var Hi=Vi,Bi=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var r=-1;return t.some((function(t,i){return t[0]===e&&(r=i,!0)})),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var r=t(this.__entries__,e),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(e,r){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=r:this.__entries__.push([e,r])},e.prototype.delete=function(e){var r=this.__entries__,i=t(r,e);~i&&r.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var r=0,i=this.__entries__;r<i.length;r++){var n=i[r];t.call(e,n[1],n[0])}},e}()}(),qi="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Gi="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Xi="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Gi):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Yi=2;var $i=20,Ui=["top","right","bottom","left","width","height","size","weight"],Qi="undefined"!=typeof MutationObserver,Ki=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var r=!1,i=!1,n=0;function o(){r&&(r=!1,t()),i&&a()}function s(){Xi(o)}function a(){var t=Date.now();if(r){if(t-n<Yi)return;i=!0}else r=!0,i=!1,setTimeout(s,e);n=t}return a}(this.refresh.bind(this),$i)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,r=e.indexOf(t);~r&&e.splice(r,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){qi&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Qi?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){qi&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,r=void 0===e?"":e;Ui.some((function(t){return!!~r.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Ji=function(t,e){for(var r=0,i=Object.keys(e);r<i.length;r++){var n=i[r];Object.defineProperty(t,n,{value:e[n],enumerable:!1,writable:!1,configurable:!0})}return t},Zi=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Gi},tn=an(0,0,0,0);function en(t){return parseFloat(t)||0}function rn(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce((function(e,r){return e+en(t["border-"+r+"-width"])}),0)}function nn(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return tn;var i=Zi(t).getComputedStyle(t),n=function(t){for(var e={},r=0,i=["top","right","bottom","left"];r<i.length;r++){var n=i[r],o=t["padding-"+n];e[n]=en(o)}return e}(i),o=n.left+n.right,s=n.top+n.bottom,a=en(i.width),c=en(i.height);if("border-box"===i.boxSizing&&(Math.round(a+o)!==e&&(a-=rn(i,"left","right")+o),Math.round(c+s)!==r&&(c-=rn(i,"top","bottom")+s)),!function(t){return t===Zi(t).document.documentElement}(t)){var l=Math.round(a+o)-e,u=Math.round(c+s)-r;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return an(n.left,n.top,a,c)}var on="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Zi(t).SVGGraphicsElement}:function(t){return t instanceof Zi(t).SVGElement&&"function"==typeof t.getBBox};function sn(t){return qi?on(t)?function(t){var e=t.getBBox();return an(0,0,e.width,e.height)}(t):nn(t):tn}function an(t,e,r,i){return{x:t,y:e,width:r,height:i}}var cn=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=an(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=sn(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),ln=function(t,e){var r,i,n,o,s,a,c,l=(i=(r=e).x,n=r.y,o=r.width,s=r.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),Ji(c,{x:i,y:n,width:o,height:s,top:n,right:i+o,bottom:s+n,left:i}),c);Ji(this,{target:t,contentRect:l})},un=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new Bi,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Zi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new cn(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Zi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new ln(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),fn="undefined"!=typeof WeakMap?new WeakMap:new Bi,hn=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Ki.getInstance(),i=new un(e,r,this);fn.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){hn.prototype[t]=function(){var e;return(e=fn.get(this))[t].apply(e,arguments)}}));var pn=void 0!==Gi.ResizeObserver?Gi.ResizeObserver:hn,dn=!("undefined"==typeof window||!window.document||!window.document.createElement),vn=null,bn=null;function yn(){if(null===vn){if("undefined"==typeof document||/AppleWebKit/.test(navigator.userAgent)||"scrollbarWidth"in document.documentElement.style)return vn=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var r=e.getBoundingClientRect().right;t.removeChild(e),vn=r}return vn}window.addEventListener("resize",(function(){bn!==window.devicePixelRatio&&(bn=window.devicePixelRatio,vn=null)}));var gn=function(){function t(e,r){var i=this;this.onScroll=function(){i.scrollXTicking||(window.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(window.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(t){i.mouseX=t.clientX,i.mouseY=t.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=yn(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,r;i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(r=i.isWithinBounds(i.axis.x.scrollbar.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(e=i.isWithinBounds(i.axis.y.scrollbar.rect)),(e||r)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&i.onDragStart(t,"y"),r&&i.onDragStart(t,"x")))},this.drag=function(e){var r=i.axis[i.draggedAxis].track,n=r.rect[i.axis[i.draggedAxis].sizeAttr],o=i.axis[i.draggedAxis].scrollbar,s=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],a=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var c=(("y"===i.draggedAxis?e.pageY:e.pageX)-r.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset)/(n-o.size)*(s-a);"x"===i.draggedAxis&&(c=i.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c-(n+o.size):c,c=i.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-c:c),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=c},this.onEndDrag=function(t){t.preventDefault(),t.stopPropagation(),i.el.classList.remove(i.classNames.dragging),document.removeEventListener("mousemove",i.drag,!0),document.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=window.setTimeout((function(){document.removeEventListener("click",i.preventClick,!0),document.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},r),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=$r(this.recalculate.bind(this),64),this.onMouseMove=$r(this.onMouseMove.bind(this),64),this.hideScrollbars=hi(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=hi(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=Hi(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var r=e.firstElementChild;document.body.appendChild(r);var i=r.firstElementChild;r.scrollLeft=0;var n=t.getOffset(r),o=t.getOffset(i);r.scrollLeft=999;var s=t.getOffset(i);return{isRtlScrollingInverted:n.left!==o.left&&o.left-s.left!=0,isRtlScrollbarInverted:n.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),dn&&(this.initDOM(),this.scrollbarWidth=yn(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.el.querySelector("."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),r=document.createElement("div");e.classList.add(this.classNames.track),r.classList.add(this.classNames.scrollbar),e.appendChild(r),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this;this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onWindowResize);var e=0;this.resizeObserver=new pn((function(){1!==++e&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),this.mutationObserver=new MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){this.elStyles=window.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,e=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,n=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,a=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=e?r+"px":"auto",this.placeholderEl.style.height=s+"px";var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=a>r,this.axis.y.isOverflowing=s>c,this.axis.x.isOverflowing="hidden"!==n&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==o&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var l=this.axis.x.isOverflowing?this.scrollbarWidth:0,u=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&a>i-u,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>c-l,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,r=this.contentEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr],n=i/r;return e=Math.max(~~(n*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],i=this.axis[e].track.el[this.axis[e].offsetSizeAttr],n=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(r-n),c=~~((i-o.size)*a);c="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c+(i-o.size):c,o.el.style.transform="x"===e?"translate3d("+c+"px, 0, 0)":"translate3d(0, "+c+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,r=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var r=this.axis[e].scrollbar,i="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=i-r.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),document.addEventListener("mousemove",this.drag,!0),document.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(document.addEventListener("click",this.preventClick,!0),document.addEventListener("dblclick",this.preventClick,!0)):(window.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.removeListeners=function(){var t=this;this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onWindowResize),this.mutationObserver.disconnect(),this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return r.call(t,e)}))[0]},t}();gn.defaultOptions={autoHide:!0,forceVisible:!1,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},gn.instances=new WeakMap;var mn=function(t){return Array.prototype.reduce.call(t,(function(t,e){var r=e.name.match(/data-simplebar-(.+)/);if(r){var i=r[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[i]=!0;break;case"false":t[i]=!1;break;case void 0:t[i]=!0;break;default:t[i]=e.value}}return t}),{})};function xn(e){var a=e.children,c=e.scrollableNodeProps,l=void 0===c?{}:c,u=s(e,["children","scrollableNodeProps"]),f=t.useRef(),h=l.ref||t.useRef(),p=t.useRef(),d={},v={},b=[];return Object.keys(u).forEach((function(t){Object.prototype.hasOwnProperty.call(gn.defaultOptions,t)?d[t]=u[t]:t.match(/data-simplebar-(.+)/)?b.push({name:t,value:u[t]}):v[t]=u[t]})),b.length&&console.warn("simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:\n 'data-simplebar-auto-hide=\"false\"' —> 'autoHide=\"false\"'\n "),t.useEffect((function(){f.current&&new gn(f.current,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(r,!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},mn(b),{},d,{},h.current&&{scrollableNode:h.current},{},p.current&&{contentNode:p.current}))})),r.createElement("div",n({ref:f},v),r.createElement("div",{className:"simplebar-wrapper"},r.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},r.createElement("div",{className:"simplebar-height-auto-observer"})),r.createElement("div",{className:"simplebar-mask"},r.createElement("div",{className:"simplebar-offset"},"function"==typeof a?a({scrollableNodeRef:h,contentNodeRef:p}):r.createElement("div",n({},l,{className:"simplebar-content-wrapper".concat(l.className?" ".concat(l.className):"")}),r.createElement("div",{className:"simplebar-content"},a)))),r.createElement("div",{className:"simplebar-placeholder"})),r.createElement("div",{className:"simplebar-track simplebar-horizontal"},r.createElement("div",{className:"simplebar-scrollbar"})),r.createElement("div",{className:"simplebar-track simplebar-vertical"},r.createElement("div",{className:"simplebar-scrollbar"})))}return xn.propTypes={children:e.oneOfType([e.node,e.func]),scrollableNodeProps:e.object},xn})); |
{ | ||
"name": "simplebar-react", | ||
"version": "1.3.0-alpha.1", | ||
"version": "2.0.0-alpha.0", | ||
"description": "React component for SimpleBar", | ||
@@ -22,10 +22,11 @@ "files": [ | ||
"scripts": { | ||
"build": "rollup -c", | ||
"build": "rollup -c && cp simplebar-react.d.ts dist/simplebar-react.d.t", | ||
"dev": "rollup -c -w", | ||
"test": "jest", | ||
"version": "yarn build" | ||
"version": "yarn build", | ||
"precommit": "lint-staged" | ||
}, | ||
"dependencies": { | ||
"prop-types": "^15.6.1", | ||
"simplebar": "^4.3.0-alpha.0" | ||
"simplebar": "^4.3.0-alpha.1" | ||
}, | ||
@@ -37,17 +38,11 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"react-test-renderer": "^16.3.2", | ||
"rollup-plugin-copy": "^3.0.0" | ||
"@testing-library/jest-dom": "^4.1.0", | ||
"@testing-library/react": "^9.2.0" | ||
}, | ||
"jest": { | ||
"transform": { | ||
"^.+\\.js?$": "babel-jest" | ||
}, | ||
"transformIgnorePatterns": [ | ||
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$" | ||
], | ||
"moduleFileExtensions": [ | ||
"js" | ||
"lint-staged": { | ||
"*.{js,jsx,json}": [ | ||
"prettier-eslint --write", | ||
"git add" | ||
] | ||
}, | ||
"gitHead": "22f1451424062db9040a4de63d31713662ae487d" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
61692
414
6
Updatedsimplebar@^4.3.0-alpha.1