1/** 2 * Bundled by jsDelivr using Rollup v4.62.2 and esbuild v0.28.1. 3 * Original file: /npm/[email protected]/dist/index.mjs 4 * 5 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 */ 7import E from"can-use-dom";import o from"simplebar-core";var c=function(r,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(i[e]=n[e])},c(r,t)};function f(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");c(r,t);function i(){this.constructor=r}r.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}var d=o.helpers,h=d.getOptions,a=d.addClasses,u=(function(r){f(t,r);function t(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var e=r.apply(this,i)||this;return t.instances.set(i[0],e),e}return t.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(i){i.getAttribute("data-simplebar")!=="init"&&!t.instances.has(i)&&new t(i,h(i.attributes))})},t.removeObserver=function(){var i;(i=t.globalObserver)===null||i===void 0||i.disconnect()},t.prototype.initDOM=function(){var i=this,n,e,s;if(!Array.prototype.filter.call(this.el.children,function(m){return m.classList.contains(i.classNames.wrapper)}).length){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"),a(this.wrapperEl,this.classNames.wrapper),a(this.contentWrapperEl,this.classNames.contentWrapper),a(this.offsetEl,this.classNames.offset),a(this.maskEl,this.classNames.mask),a(this.contentEl,this.classNames.contentEl),a(this.placeholderEl,this.classNames.placeholder),a(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),a(this.heightAutoObserverEl,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),(n=this.contentWrapperEl)===null||n===void 0||n.setAttribute("tabindex","0"),(e=this.contentWrapperEl)===null||e===void 0||e.setAttribute("role","region"),(s=this.contentWrapperEl)===null||s===void 0||s.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var l=document.createElement("div"),p=document.createElement("div");a(l,this.classNames.track),a(p,this.classNames.scrollbar),l.appendChild(p),this.axis.x.track.el=l.cloneNode(!0),a(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=l.cloneNode(!0),a(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}o.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},t.prototype.unMount=function(){o.prototype.unMount.call(this),t.instances.delete(this.el)},t.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(t.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))}
7,t.handleMutations=function(i){i.forEach(function(n){n.addedNodes.forEach(function(e){e.nodeType===1&&(e.hasAttribute("data-simplebar")?!t.instances.has(e)&&document.documentElement.contains(e)&&new t(e,h(e.attributes)):e.querySelectorAll("[data-simplebar]").forEach(function(s){s.getAttribute("data-simplebar")!=="init"&&!t.instances.has(s)&&document.documentElement.contains(s)&&new t(s,h(s.attributes))}))}),n.removedNodes.forEach(function(e){e.nodeType===1&&(e.getAttribute("data-simplebar")==="init"?t.instances.has(e)&&!document.documentElement.contains(e)&&t.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),function(s){t.instances.has(s)&&!document.documentElement.contains(s)&&t.instances.get(s).unMount()}))})})},t.instances=new WeakMap,t})(o);E&&u.initHtmlApi();export{u as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.