import * as i0 from '@angular/core';
import { InjectionToken, Directive, Inject, Input, EventEmitter, inject, Injector, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Output, NgModule } from '@angular/core';
import * as i1 from '@angular/cdk/overlay';
import { CdkScrollable } from '@angular/cdk/overlay';
import { OverlayScrollbars } from 'overlayscrollbars';

const KBQ_SCROLLBAR_OPTIONS_DEFAULT_CONFIG = {
    scrollbars: {
        autoHide: 'leave',
        autoHideDelay: 100
    }
};
const KBQ_SCROLLBAR_CONFIG = new InjectionToken('KBQ_SCROLLBAR_CONFIG');
/** Default scroll behavior */
const KBQ_SCROLLBAR_OPTIONS_DEFAULT_CONFIG_PROVIDER = {
    provide: KBQ_SCROLLBAR_CONFIG,
    useValue: KBQ_SCROLLBAR_OPTIONS_DEFAULT_CONFIG
};

const createDefer = () => {
    // For SSR compatibility
    // eslint-disable-next-line no-restricted-globals
    if (typeof window === 'undefined') {
        const noop = () => { };
        return [noop, noop];
    }
    let idleId;
    let rafId;
    // eslint-disable-next-line no-restricted-globals
    const { requestIdleCallback, requestAnimationFrame, cancelAnimationFrame, cancelIdleCallback } = window;
    const idleSupported = typeof requestIdleCallback === 'function';
    const rIdle = idleSupported ? requestIdleCallback : requestAnimationFrame;
    const cIdle = idleSupported ? cancelIdleCallback : cancelAnimationFrame;
    const clear = () => {
        cIdle(idleId);
        cancelAnimationFrame(rafId);
    };
    return [
        (callback, options) => {
            clear();
            idleId = rIdle(idleSupported
                ? () => {
                    clear();
                    // inside idle its best practice to use rAF to change DOM for best performance
                    rafId = requestAnimationFrame(callback);
                }
                : callback, typeof options === 'object' ? options : { timeout: 2233 });
        },
        clear
    ];
};
/**
 * A directive for adding `overlayscrollbars` to an element.
 */
class KbqScrollbarDirective {
    set options(value) {
        this._options = value;
        if (OverlayScrollbars.valid(this.scrollbarInstance)) {
            this.scrollbarInstance.options(value || {}, true);
        }
    }
    /** Scrollbar behavior customization object */
    get options() {
        return this._options;
    }
    set events(value) {
        this._events = value;
        if (OverlayScrollbars.valid(this.scrollbarInstance)) {
            this.scrollbarInstance.on(value || {}, true);
        }
    }
    get events() {
        return this._events;
    }
    constructor(ngZone, scrollbarConfig) {
        this.ngZone = ngZone;
        this.scrollbarConfig = scrollbarConfig;
        const [requestDefer, cancelDefer] = createDefer();
        this.requestDefer = requestDefer;
        this.cancelDefer = cancelDefer;
    }
    initialize(target) {
        this.ngZone.runOutsideAngular(() => {
            const init = () => {
                this.scrollbarInstance = OverlayScrollbars(target, this.options || this.scrollbarConfig || {}, this.events || {});
            };
            if (this.defer) {
                this.requestDefer(init, this.defer);
            }
            else {
                init();
            }
        });
    }
    ngOnDestroy() {
        this.cancelDefer();
    }
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqScrollbarDirective, deps: [{ token: i0.NgZone }, { token: KBQ_SCROLLBAR_CONFIG }], target: i0.ɵɵFactoryTarget.Directive }); }
    /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqScrollbarDirective, isStandalone: true, selector: "[kbqScrollbar]", inputs: { options: "options", events: "events", defer: "defer" }, hostDirectives: [{ directive: i1.CdkScrollable }], ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqScrollbarDirective, decorators: [{
            type: Directive,
            args: [{
                    standalone: true,
                    selector: '[kbqScrollbar]',
                    hostDirectives: [CdkScrollable]
                }]
        }], ctorParameters: () => [{ type: i0.NgZone }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [KBQ_SCROLLBAR_CONFIG]
                }] }], propDecorators: { options: [{
                type: Input
            }], events: [{
                type: Input
            }], defer: [{
                type: Input
            }] } });

const filterEvents = (emits, events) => Object.keys(emits).reduce((obj, name) => {
    const emitListener = emits[name];
    const eventListener = events[name];
    // merge & check listeners
    obj[name] = [
        emitListener,
        ...(Array.isArray(eventListener) ? eventListener : [eventListener]).filter(Boolean)
    ];
    return obj;
}, {});
/**
 * The component-wrapper for `overlayscrollbars` library.
 */
class KbqScrollbar {
    get element() {
        return this.targetElement.nativeElement;
    }
    constructor(ngZone, targetElement) {
        this.ngZone = ngZone;
        this.targetElement = targetElement;
        this.onInitialize = new EventEmitter();
        /** Event triggered when options or event listeners updated */
        this.onUpdate = new EventEmitter();
        /** Event triggered when scrollbar instance destroyed */
        this.onDestroy = new EventEmitter();
        this.onScroll = new EventEmitter();
        this.injector = inject(Injector);
    }
    ngAfterViewInit() {
        afterNextRender(() => {
            if (this.element && this.contentElement.nativeElement) {
                this.kbqScrollbarDirective?.initialize(this.initializationTarget || {
                    target: this.targetElement.nativeElement,
                    elements: {
                        viewport: this.contentElement.nativeElement,
                        content: this.contentElement.nativeElement
                    }
                });
            }
        }, { injector: this.injector });
    }
    ngOnDestroy() {
        this.kbqScrollbarDirective?.scrollbarInstance?.destroy();
    }
    /** Wrapper function for native scroll */
    scrollTo(options) {
        this.contentElement.nativeElement.scroll(options);
    }
    mergeEvents() {
        const defaultListeners = {
            initialized: (...args) => this.dispatchEventIfHasObservers(this.onInitialize, args),
            updated: (...args) => this.dispatchEventIfHasObservers(this.onUpdate, args),
            destroyed: (...args) => this.dispatchEventIfHasObservers(this.onDestroy, args),
            scroll: (...args) => this.dispatchEventIfHasObservers(this.onScroll, args)
        };
        if (!this.events) {
            return defaultListeners;
        }
        // merge default listeners with custom listeners in case of Input binding
        return {
            ...defaultListeners,
            ...filterEvents(this.events, defaultListeners)
        };
    }
    dispatchEventIfHasObservers(eventEmitter, args) {
        // `observed` is available since RxJS@7.2 because `observers` is being deprecated.
        if (eventEmitter.observed || eventEmitter.observers.length > 0) {
            // This is required to re-enter the Angular zone to call the event handler in the Angular
            // zone too. This will not re-enter the Angular zone if emitter doesn't have any observers,
            // for instance, it's being listened: `<overlay-scrollbars (osInitialized)="..."`.
            // Events are dispatched outside of the Angular zone because instance is created in the
            // `<root>` zone
            this.ngZone.run(() => eventEmitter.emit(args));
        }
    }
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqScrollbar, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
    /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: KbqScrollbar, isStandalone: true, selector: "kbq-scrollbar, [kbq-scrollbar]", inputs: { initializationTarget: "initializationTarget", options: "options", events: "events", defer: "defer" }, outputs: { onInitialize: "onInitialize", onUpdate: "onUpdate", onDestroy: "onDestroy", onScroll: "onScroll" }, host: { attributes: { "data-overlayscrollbars-initialize": "" }, classAttribute: "kbq-scrollbar-component" }, viewQueries: [{ propertyName: "contentElement", first: true, predicate: ["content"], descendants: true }, { propertyName: "kbqScrollbarDirective", first: true, predicate: ["content"], descendants: true, read: KbqScrollbarDirective }], exportAs: ["kbqScrollbar"], ngImport: i0, template: `
        <div
            #content
            data-overlayscrollbars-contents=""
            kbqScrollbar
            [options]="options"
            [events]="mergeEvents()"
            [defer]="defer"
        >
            <ng-content />
        </div>
    `, isInline: true, styles: [".kbq-scrollbar-component .os-scrollbar-vertical{padding:var(--kbq-scrollbar-size-track-padding-vertical) var(--kbq-scrollbar-size-track-padding-horizontal);bottom:var(--kbq-scrollbar-size-track-dimension);width:var(--kbq-scrollbar-size-track-dimension)}.kbq-scrollbar-component .os-scrollbar-vertical .os-scrollbar-handle{transition:opacity .15s,background-color .15s,border-color .15s,width .15s;border:var(--kbq-scrollbar-size-track-padding-horizontal) solid;width:100%;min-height:var(--kbq-scrollbar-size-thumb-min-size)}.kbq-scrollbar-component .os-scrollbar-vertical:hover .os-scrollbar-handle,.kbq-scrollbar-component .os-scrollbar-vertical:active .os-scrollbar-handle{width:100%}.kbq-scrollbar-component .os-scrollbar-horizontal{padding:var(--kbq-scrollbar-size-track-padding-horizontal) var(--kbq-scrollbar-size-track-padding-vertical);right:var(--kbq-scrollbar-size-track-dimension);height:var(--kbq-scrollbar-size-track-dimension)}.kbq-scrollbar-component .os-scrollbar-horizontal .os-scrollbar-handle{transition:opacity .15s,background-color .15s,border-color .15s,height .15s;border:var(--kbq-scrollbar-size-track-padding-horizontal) solid;height:100%;min-width:var(--kbq-scrollbar-size-thumb-min-size)}.kbq-scrollbar-component .os-scrollbar-horizontal:hover .os-scrollbar-handle,.kbq-scrollbar-component .os-scrollbar-horizontal:active .os-scrollbar-handle{height:100%}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:before,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track{box-sizing:border-box;border-radius:var(--kbq-scrollbar-size-thumb-border-radius)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track{border-width:calc((var(--kbq-scrollbar-size-track-dimension) - var(--kbq-scrollbar-size-thumb-width)) / 4)!important;transition:opacity .15s,background-color .15s,border-color .15s}[data-overlayscrollbars-contents]:focus-visible{outline:none}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:before{border-color:var(--kbq-scrollbar-thumb-default-background);background-color:var(--kbq-scrollbar-thumb-default-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:hover:before{border-color:var(--kbq-scrollbar-thumb-hover-background);background-color:var(--kbq-scrollbar-thumb-hover-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:active:before{border-color:var(--kbq-scrollbar-thumb-active-background);background-color:var(--kbq-scrollbar-thumb-active-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle{border-style:solid;border-color:var(--kbq-scrollbar-track-default-border)!important;background-color:var(--kbq-scrollbar-track-default-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track:hover,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:hover{border-color:var(--kbq-scrollbar-track-hover-border);background:var(--kbq-scrollbar-track-hover-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track:active,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:active{border-color:var(--kbq-scrollbar-track-active-border);background:var(--kbq-scrollbar-track-active-background)}.os-size-observer,.os-size-observer-listener{scroll-behavior:auto!important;direction:inherit;pointer-events:none;overflow:hidden;visibility:hidden;box-sizing:border-box}.os-size-observer,.os-size-observer-listener,.os-size-observer-listener-item,.os-size-observer-listener-item-final{writing-mode:horizontal-tb;position:absolute;left:0;top:0}.os-size-observer{z-index:-1;contain:strict;display:flex;flex-direction:row;flex-wrap:nowrap;padding:inherit;border:inherit;box-sizing:inherit;margin:-133px;inset:0;transform:scale(.1)}.os-size-observer:before{content:\"\";flex:none;box-sizing:inherit;padding:10px;width:10px;height:10px}.os-size-observer-appear{animation:os-size-observer-appear-animation 1ms forwards}.os-size-observer-listener{box-sizing:border-box;position:relative;flex:auto;padding:inherit;border:inherit;margin:-133px;transform:scale(10)}.os-size-observer-listener.ltr{margin-right:-266px;margin-left:0}.os-size-observer-listener.rtl{margin-left:-266px;margin-right:0}.os-size-observer-listener:empty:before{content:\"\";width:100%;height:100%}.os-size-observer-listener:empty:before,.os-size-observer-listener>.os-size-observer-listener-item{display:block;position:relative;padding:inherit;border:inherit;box-sizing:content-box;flex:auto}.os-size-observer-listener-scroll{box-sizing:border-box;display:flex}.os-size-observer-listener-item{right:0;bottom:0;overflow:hidden;direction:ltr;flex:none}.os-size-observer-listener-item-final{transition:none}@keyframes os-size-observer-appear-animation{0%{cursor:auto}to{cursor:none}}.os-trinsic-observer{flex:none;box-sizing:border-box;position:relative;max-width:0;max-height:1px;padding:0;margin:0;border:none;overflow:hidden;z-index:-1;height:0;top:calc(100% + 1px);contain:strict}.os-trinsic-observer:not(:empty){height:calc(100% + 1px);top:-1px}.os-trinsic-observer:not(:empty)>.os-size-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-environment{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.os-environment div{width:200%;height:200%;margin:10px 0}.os-environment.os-environment-flexbox-glue{display:flex;flex-direction:row;flex-wrap:nowrap;height:auto;width:auto;min-height:200px;min-width:200px}.os-environment.os-environment-flexbox-glue div{flex:auto;width:auto;height:auto;max-height:100%;max-width:100%;margin:0}.os-environment.os-environment-flexbox-glue-max{max-height:200px}.os-environment.os-environment-flexbox-glue-max div{overflow:visible}.os-environment.os-environment-flexbox-glue-max div:before{content:\"\";display:block;height:999px;width:999px}.os-environment,[data-overlayscrollbars-viewport]{-ms-overflow-style:scrollbar!important}[data-overlayscrollbars-initialize],[data-overlayscrollbars~=scrollbarHidden],[data-overlayscrollbars-viewport~=scrollbarHidden],.os-environment-scrollbar-hidden{scrollbar-width:none!important}[data-overlayscrollbars-initialize]::-webkit-scrollbar,[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar-corner,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner,.os-environment-scrollbar-hidden::-webkit-scrollbar,.os-environment-scrollbar-hidden::-webkit-scrollbar-corner{-webkit-appearance:none!important;appearance:none!important;display:none!important;width:0!important;height:0!important}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars]):not(html):not(body){overflow:auto}html[data-overlayscrollbars]{box-sizing:border-box;margin:0}html[data-overlayscrollbars~=body],html[data-overlayscrollbars~=body]>body{width:100%;height:100%}html[data-overlayscrollbars~=viewport]>body{overflow:visible}[data-overlayscrollbars~=host],[data-overlayscrollbars-padding]{display:flex;align-items:stretch!important;flex-direction:row!important;flex-wrap:nowrap!important}[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]:before{content:\"\";position:absolute;pointer-events:none;z-index:-1;min-width:1px;min-height:1px;width:0;height:0}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{box-sizing:inherit;position:relative;flex:auto!important;height:auto;width:100%;min-width:0;padding:0;margin:0;border:none;z-index:0;overflow:hidden}[data-overlayscrollbars~=host],[data-overlayscrollbars~=viewport]{position:relative;overflow:hidden}[data-overlayscrollbars~=overflowVisible],[data-overlayscrollbars-padding~=overflowVisible],[data-overlayscrollbars-viewport~=overflowVisible]{overflow:visible}[data-overlayscrollbars-overflow-x=hidden]{overflow-x:hidden;overflow-y:hidden}[data-overlayscrollbars-overflow-x=scroll]{overflow-x:scroll}[data-overlayscrollbars-overflow-y=scroll]{overflow-y:scroll}[data-overlayscrollbars~=scrollbarPressed],[data-overlayscrollbars~=scrollbarPressed] [data-overlayscrollbars-viewport]{scroll-behavior:auto!important}[data-overlayscrollbars-content]{box-sizing:inherit}[data-overlayscrollbars-contents]:not([data-overlayscrollbars-padding]):not([data-overlayscrollbars-viewport]):not([data-overlayscrollbars-content]){display:contents}[data-overlayscrollbars-grid],[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]{display:grid;grid-template:1fr/1fr}[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding],[data-overlayscrollbars-grid]>[data-overlayscrollbars-viewport],[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding]>[data-overlayscrollbars-viewport]{height:auto!important;width:auto!important}.os-scrollbar{box-sizing:border-box;contain:size layout;contain:size layout style;transition:opacity .15s,visibility .15s,top .15s,right .15s,bottom .15s,left .15s;pointer-events:none;position:absolute;opacity:0;visibility:hidden}body>.os-scrollbar{position:fixed;z-index:99999}.os-scrollbar-transitionless{transition:none}.os-scrollbar-track{position:relative;direction:ltr!important;padding:0!important;border:none!important}.os-scrollbar-handle{position:absolute}.os-scrollbar-track,.os-scrollbar-handle{pointer-events:none;width:100%;height:100%}.os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle{pointer-events:auto;touch-action:none}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-scrollbar-rtl.os-scrollbar-horizontal{right:0}.os-scrollbar-rtl.os-scrollbar-vertical{right:auto;left:0}.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-auto-hide.os-scrollbar-auto-hide-hidden{opacity:0;visibility:hidden}.os-scrollbar-interaction.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-unusable,.os-scrollbar-unusable *,.os-scrollbar-wheel,.os-scrollbar-wheel *{pointer-events:none!important}.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important;transition:none!important}.os-scrollbar-horizontal .os-scrollbar-handle{bottom:0}.os-scrollbar-vertical .os-scrollbar-handle{right:0}.os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle{right:auto;left:0}.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl{left:0;right:0}.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl{top:0;bottom:0}.os-scrollbar .os-scrollbar-handle:before{content:\"\";position:absolute;inset:0;display:block}[data-overlayscrollbars~=updating]>.os-scrollbar,.os-theme-none.os-scrollbar{display:none!important}\n", ":where(.kbq-scrollbar-component){--kbq-scrollbar-size-track-dimension: var(--kbq-size-l);--kbq-scrollbar-size-track-padding-vertical: var(--kbq-size-3xs);--kbq-scrollbar-size-track-padding-horizontal: var(--kbq-size-3xs);--kbq-scrollbar-size-thumb-width: var(--kbq-size-s);--kbq-scrollbar-size-thumb-min-size: var(--kbq-size-xl);--kbq-scrollbar-size-thumb-border-radius: var(--kbq-size-s);--kbq-scrollbar-thumb-default-background: var(--kbq-palette-grey-50-a32);--kbq-scrollbar-thumb-hover-background: var(--kbq-palette-grey-50-a48);--kbq-scrollbar-thumb-active-background: var(--kbq-palette-grey-20-a55);--kbq-scrollbar-thumb-disabled-background: var(--kbq-states-icon-disabled);--kbq-scrollbar-track-default-border: transparent;--kbq-scrollbar-track-default-background: transparent;--kbq-scrollbar-track-hover-border: transparent;--kbq-scrollbar-track-hover-background: transparent;--kbq-scrollbar-track-active-border: transparent;--kbq-scrollbar-track-active-background: transparent}:where(.kbq-dark .kbq-scrollbar-component){--kbq-scrollbar-thumb-default-background: var(--kbq-palette-grey-50-a48);--kbq-scrollbar-thumb-hover-background: var(--kbq-palette-grey-50-a60);--kbq-scrollbar-thumb-active-background: var(--kbq-palette-grey-50-a80)}\n"], dependencies: [{ kind: "directive", type: KbqScrollbarDirective, selector: "[kbqScrollbar]", inputs: ["options", "events", "defer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqScrollbar, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [KbqScrollbarDirective], selector: 'kbq-scrollbar, [kbq-scrollbar]', exportAs: 'kbqScrollbar', host: {
                        'data-overlayscrollbars-initialize': '',
                        class: 'kbq-scrollbar-component'
                    }, template: `
        <div
            #content
            data-overlayscrollbars-contents=""
            kbqScrollbar
            [options]="options"
            [events]="mergeEvents()"
            [defer]="defer"
        >
            <ng-content />
        </div>
    `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".kbq-scrollbar-component .os-scrollbar-vertical{padding:var(--kbq-scrollbar-size-track-padding-vertical) var(--kbq-scrollbar-size-track-padding-horizontal);bottom:var(--kbq-scrollbar-size-track-dimension);width:var(--kbq-scrollbar-size-track-dimension)}.kbq-scrollbar-component .os-scrollbar-vertical .os-scrollbar-handle{transition:opacity .15s,background-color .15s,border-color .15s,width .15s;border:var(--kbq-scrollbar-size-track-padding-horizontal) solid;width:100%;min-height:var(--kbq-scrollbar-size-thumb-min-size)}.kbq-scrollbar-component .os-scrollbar-vertical:hover .os-scrollbar-handle,.kbq-scrollbar-component .os-scrollbar-vertical:active .os-scrollbar-handle{width:100%}.kbq-scrollbar-component .os-scrollbar-horizontal{padding:var(--kbq-scrollbar-size-track-padding-horizontal) var(--kbq-scrollbar-size-track-padding-vertical);right:var(--kbq-scrollbar-size-track-dimension);height:var(--kbq-scrollbar-size-track-dimension)}.kbq-scrollbar-component .os-scrollbar-horizontal .os-scrollbar-handle{transition:opacity .15s,background-color .15s,border-color .15s,height .15s;border:var(--kbq-scrollbar-size-track-padding-horizontal) solid;height:100%;min-width:var(--kbq-scrollbar-size-thumb-min-size)}.kbq-scrollbar-component .os-scrollbar-horizontal:hover .os-scrollbar-handle,.kbq-scrollbar-component .os-scrollbar-horizontal:active .os-scrollbar-handle{height:100%}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:before,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track{box-sizing:border-box;border-radius:var(--kbq-scrollbar-size-thumb-border-radius)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track{border-width:calc((var(--kbq-scrollbar-size-track-dimension) - var(--kbq-scrollbar-size-thumb-width)) / 4)!important;transition:opacity .15s,background-color .15s,border-color .15s}[data-overlayscrollbars-contents]:focus-visible{outline:none}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:before{border-color:var(--kbq-scrollbar-thumb-default-background);background-color:var(--kbq-scrollbar-thumb-default-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:hover:before{border-color:var(--kbq-scrollbar-thumb-hover-background);background-color:var(--kbq-scrollbar-thumb-hover-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:active:before{border-color:var(--kbq-scrollbar-thumb-active-background);background-color:var(--kbq-scrollbar-thumb-active-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle{border-style:solid;border-color:var(--kbq-scrollbar-track-default-border)!important;background-color:var(--kbq-scrollbar-track-default-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track:hover,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:hover{border-color:var(--kbq-scrollbar-track-hover-border);background:var(--kbq-scrollbar-track-hover-background)}.kbq-scrollbar-component .os-scrollbar .os-scrollbar-track:active,.kbq-scrollbar-component .os-scrollbar .os-scrollbar-handle:active{border-color:var(--kbq-scrollbar-track-active-border);background:var(--kbq-scrollbar-track-active-background)}.os-size-observer,.os-size-observer-listener{scroll-behavior:auto!important;direction:inherit;pointer-events:none;overflow:hidden;visibility:hidden;box-sizing:border-box}.os-size-observer,.os-size-observer-listener,.os-size-observer-listener-item,.os-size-observer-listener-item-final{writing-mode:horizontal-tb;position:absolute;left:0;top:0}.os-size-observer{z-index:-1;contain:strict;display:flex;flex-direction:row;flex-wrap:nowrap;padding:inherit;border:inherit;box-sizing:inherit;margin:-133px;inset:0;transform:scale(.1)}.os-size-observer:before{content:\"\";flex:none;box-sizing:inherit;padding:10px;width:10px;height:10px}.os-size-observer-appear{animation:os-size-observer-appear-animation 1ms forwards}.os-size-observer-listener{box-sizing:border-box;position:relative;flex:auto;padding:inherit;border:inherit;margin:-133px;transform:scale(10)}.os-size-observer-listener.ltr{margin-right:-266px;margin-left:0}.os-size-observer-listener.rtl{margin-left:-266px;margin-right:0}.os-size-observer-listener:empty:before{content:\"\";width:100%;height:100%}.os-size-observer-listener:empty:before,.os-size-observer-listener>.os-size-observer-listener-item{display:block;position:relative;padding:inherit;border:inherit;box-sizing:content-box;flex:auto}.os-size-observer-listener-scroll{box-sizing:border-box;display:flex}.os-size-observer-listener-item{right:0;bottom:0;overflow:hidden;direction:ltr;flex:none}.os-size-observer-listener-item-final{transition:none}@keyframes os-size-observer-appear-animation{0%{cursor:auto}to{cursor:none}}.os-trinsic-observer{flex:none;box-sizing:border-box;position:relative;max-width:0;max-height:1px;padding:0;margin:0;border:none;overflow:hidden;z-index:-1;height:0;top:calc(100% + 1px);contain:strict}.os-trinsic-observer:not(:empty){height:calc(100% + 1px);top:-1px}.os-trinsic-observer:not(:empty)>.os-size-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-environment{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.os-environment div{width:200%;height:200%;margin:10px 0}.os-environment.os-environment-flexbox-glue{display:flex;flex-direction:row;flex-wrap:nowrap;height:auto;width:auto;min-height:200px;min-width:200px}.os-environment.os-environment-flexbox-glue div{flex:auto;width:auto;height:auto;max-height:100%;max-width:100%;margin:0}.os-environment.os-environment-flexbox-glue-max{max-height:200px}.os-environment.os-environment-flexbox-glue-max div{overflow:visible}.os-environment.os-environment-flexbox-glue-max div:before{content:\"\";display:block;height:999px;width:999px}.os-environment,[data-overlayscrollbars-viewport]{-ms-overflow-style:scrollbar!important}[data-overlayscrollbars-initialize],[data-overlayscrollbars~=scrollbarHidden],[data-overlayscrollbars-viewport~=scrollbarHidden],.os-environment-scrollbar-hidden{scrollbar-width:none!important}[data-overlayscrollbars-initialize]::-webkit-scrollbar,[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar-corner,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner,.os-environment-scrollbar-hidden::-webkit-scrollbar,.os-environment-scrollbar-hidden::-webkit-scrollbar-corner{-webkit-appearance:none!important;appearance:none!important;display:none!important;width:0!important;height:0!important}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars]):not(html):not(body){overflow:auto}html[data-overlayscrollbars]{box-sizing:border-box;margin:0}html[data-overlayscrollbars~=body],html[data-overlayscrollbars~=body]>body{width:100%;height:100%}html[data-overlayscrollbars~=viewport]>body{overflow:visible}[data-overlayscrollbars~=host],[data-overlayscrollbars-padding]{display:flex;align-items:stretch!important;flex-direction:row!important;flex-wrap:nowrap!important}[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]:before{content:\"\";position:absolute;pointer-events:none;z-index:-1;min-width:1px;min-height:1px;width:0;height:0}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{box-sizing:inherit;position:relative;flex:auto!important;height:auto;width:100%;min-width:0;padding:0;margin:0;border:none;z-index:0;overflow:hidden}[data-overlayscrollbars~=host],[data-overlayscrollbars~=viewport]{position:relative;overflow:hidden}[data-overlayscrollbars~=overflowVisible],[data-overlayscrollbars-padding~=overflowVisible],[data-overlayscrollbars-viewport~=overflowVisible]{overflow:visible}[data-overlayscrollbars-overflow-x=hidden]{overflow-x:hidden;overflow-y:hidden}[data-overlayscrollbars-overflow-x=scroll]{overflow-x:scroll}[data-overlayscrollbars-overflow-y=scroll]{overflow-y:scroll}[data-overlayscrollbars~=scrollbarPressed],[data-overlayscrollbars~=scrollbarPressed] [data-overlayscrollbars-viewport]{scroll-behavior:auto!important}[data-overlayscrollbars-content]{box-sizing:inherit}[data-overlayscrollbars-contents]:not([data-overlayscrollbars-padding]):not([data-overlayscrollbars-viewport]):not([data-overlayscrollbars-content]){display:contents}[data-overlayscrollbars-grid],[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]{display:grid;grid-template:1fr/1fr}[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding],[data-overlayscrollbars-grid]>[data-overlayscrollbars-viewport],[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding]>[data-overlayscrollbars-viewport]{height:auto!important;width:auto!important}.os-scrollbar{box-sizing:border-box;contain:size layout;contain:size layout style;transition:opacity .15s,visibility .15s,top .15s,right .15s,bottom .15s,left .15s;pointer-events:none;position:absolute;opacity:0;visibility:hidden}body>.os-scrollbar{position:fixed;z-index:99999}.os-scrollbar-transitionless{transition:none}.os-scrollbar-track{position:relative;direction:ltr!important;padding:0!important;border:none!important}.os-scrollbar-handle{position:absolute}.os-scrollbar-track,.os-scrollbar-handle{pointer-events:none;width:100%;height:100%}.os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle{pointer-events:auto;touch-action:none}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-scrollbar-rtl.os-scrollbar-horizontal{right:0}.os-scrollbar-rtl.os-scrollbar-vertical{right:auto;left:0}.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-auto-hide.os-scrollbar-auto-hide-hidden{opacity:0;visibility:hidden}.os-scrollbar-interaction.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-unusable,.os-scrollbar-unusable *,.os-scrollbar-wheel,.os-scrollbar-wheel *{pointer-events:none!important}.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important;transition:none!important}.os-scrollbar-horizontal .os-scrollbar-handle{bottom:0}.os-scrollbar-vertical .os-scrollbar-handle{right:0}.os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle{right:auto;left:0}.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl{left:0;right:0}.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl{top:0;bottom:0}.os-scrollbar .os-scrollbar-handle:before{content:\"\";position:absolute;inset:0;display:block}[data-overlayscrollbars~=updating]>.os-scrollbar,.os-theme-none.os-scrollbar{display:none!important}\n", ":where(.kbq-scrollbar-component){--kbq-scrollbar-size-track-dimension: var(--kbq-size-l);--kbq-scrollbar-size-track-padding-vertical: var(--kbq-size-3xs);--kbq-scrollbar-size-track-padding-horizontal: var(--kbq-size-3xs);--kbq-scrollbar-size-thumb-width: var(--kbq-size-s);--kbq-scrollbar-size-thumb-min-size: var(--kbq-size-xl);--kbq-scrollbar-size-thumb-border-radius: var(--kbq-size-s);--kbq-scrollbar-thumb-default-background: var(--kbq-palette-grey-50-a32);--kbq-scrollbar-thumb-hover-background: var(--kbq-palette-grey-50-a48);--kbq-scrollbar-thumb-active-background: var(--kbq-palette-grey-20-a55);--kbq-scrollbar-thumb-disabled-background: var(--kbq-states-icon-disabled);--kbq-scrollbar-track-default-border: transparent;--kbq-scrollbar-track-default-background: transparent;--kbq-scrollbar-track-hover-border: transparent;--kbq-scrollbar-track-hover-background: transparent;--kbq-scrollbar-track-active-border: transparent;--kbq-scrollbar-track-active-background: transparent}:where(.kbq-dark .kbq-scrollbar-component){--kbq-scrollbar-thumb-default-background: var(--kbq-palette-grey-50-a48);--kbq-scrollbar-thumb-hover-background: var(--kbq-palette-grey-50-a60);--kbq-scrollbar-thumb-active-background: var(--kbq-palette-grey-50-a80)}\n"] }]
        }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ElementRef }], propDecorators: { contentElement: [{
                type: ViewChild,
                args: ['content']
            }], kbqScrollbarDirective: [{
                type: ViewChild,
                args: ['content', { read: KbqScrollbarDirective }]
            }], initializationTarget: [{
                type: Input
            }], options: [{
                type: Input
            }], events: [{
                type: Input
            }], defer: [{
                type: Input
            }], onInitialize: [{
                type: Output
            }], onUpdate: [{
                type: Output
            }], onDestroy: [{
                type: Output
            }], onScroll: [{
                type: Output
            }] } });

const COMPONENTS = [
    KbqScrollbar,
    KbqScrollbarDirective
];
class KbqScrollbarModule {
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqScrollbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: KbqScrollbarModule, imports: [KbqScrollbar,
            KbqScrollbarDirective], exports: [KbqScrollbar,
            KbqScrollbarDirective] }); }
    /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqScrollbarModule, providers: [KBQ_SCROLLBAR_OPTIONS_DEFAULT_CONFIG_PROVIDER] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqScrollbarModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: COMPONENTS,
                    exports: COMPONENTS,
                    providers: [KBQ_SCROLLBAR_OPTIONS_DEFAULT_CONFIG_PROVIDER]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { KBQ_SCROLLBAR_CONFIG, KBQ_SCROLLBAR_OPTIONS_DEFAULT_CONFIG, KBQ_SCROLLBAR_OPTIONS_DEFAULT_CONFIG_PROVIDER, KbqScrollbar, KbqScrollbarDirective, KbqScrollbarModule };
//# sourceMappingURL=koobiq-components-scrollbar.mjs.map
