/*!
 * Custom elements for Nanopore-Digital Web applications
 */
import { r as registerInstance, c as createEvent, g as getElement, a as Host } from './index-BM3Om9WE.js';
import { a as getOffset } from './dom-dlicJTEJ.js';
import { d as debounce } from './throttle-C93FMm2Z.js';
import { f as findScrollParent } from './scroll-1nFw8CNk.js';
import { t as transformTag, h } from './renderer-DpNDfhNy.js';

const stickerCss = ":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--stuck-left:initial;--stuck-right:initial;--stuck-z-index:var(--nano-z-index-menubar);--top-hide:translateY(-110%);--bottom-hide:translateY(110%);display:block;max-inline-size:100%}:host([sticky]){position:sticky;transition:0.3s ease transform;will-change:min-block-size}:host([sticky][stuck]){inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index) !important}:host([sticky][hide][placed-top]){transform:var(--top-hide)}:host([sticky][hide][placed-bottom]){transform:var(--bottom-hide)}:host([sticky][index=\"1\"]){z-index:calc(var(--stuck-z-index) + 1)}:host([sticky][index=\"2\"]){z-index:calc(var(--stuck-z-index) + 2)}:host([sticky][index=\"3\"]){z-index:calc(var(--stuck-z-index) + 3)}:host([sticky][index=\"4\"]){z-index:calc(var(--stuck-z-index) + 4)}:host([sticky][index=\"5\"]){z-index:calc(var(--stuck-z-index) + 5)}.sticker{display:inherit;max-inline-size:inherit;inline-size:100%}.sticker:not(.stuck){inline-size:auto !important}.sticker.sticky{transition:0.3s ease all;position:relative}:host([index=\"1\"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 1)}:host([index=\"2\"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 2)}:host([index=\"3\"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 3)}:host([index=\"4\"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 4)}:host([index=\"5\"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 5)}.sticker.stuck{position:fixed;inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index);transform:translateY(0)}:host([placed-top]) .sticker.stuck{inset-block-start:0}:host([placed-bottom]) .sticker.stuck{inset-block-end:0}:host([placed-top]) .sticker.stuck.hide{transform:var(--top-hide)}:host([placed-bottom]) .sticker.stuck.hide{transform:var(--bottom-hide)}.sticker-content{display:flex;flex-wrap:wrap}";

function _getScrollTop(ele) {
    return ele instanceof Document ? window.pageYOffset : ele.scrollTop;
}
function _getOffset(ele, parent) {
    const parentEle = parent instanceof Document ? document.documentElement : parent;
    return getOffset(ele, parentEle);
}
const Sticker = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.nanoStuck = createEvent(this, "nanoStuck", 7);
        this.nanoUnstuck = createEvent(this, "nanoUnstuck", 7);
        this.nanoHide = createEvent(this, "nanoHide", 7);
        this.nanoShow = createEvent(this, "nanoShow", 7);
    }
    isRtl = false;
    io;
    contentSizeObserver;
    parentSizeObserver;
    sticker;
    content;
    scrollPosCache = 0;
    scrollPosThresholdCache = 0;
    cacheOffset = 0;
    slottedContent;
    pauseResizeWatcher = false;
    listenForScrollParent = false;
    stickToEleInitSize;
    positions = [];
    pauseHide = false;
    hasBootstrapped = false;
    get host() { return getElement(this); }
    // Internal State
    isStuck = false;
    isRootSticker = true;
    hide = false;
    scrollHide = false;
    multiStickerHide = false;
    scrollingTo = false;
    quietModeIsOn = false;
    stuckCounter = 0;
    stickerIndex = 0;
    stickToEle;
    triggerPos;
    trigger;
    _offset = 0;
    // Public API
    /** Only applicable to root stickers. When applied the sticker will grow or shrink to the scrollParent size */
    autoResize = true;
    /** Manually enable / disabled sticky behaviour */
    isSticky = true;
    /** Distance the item should be stuck from the sticky edge. */
    offset = 0;
    /** The edge of the scroll-parent to stick to */
    position = 'top';
    // other opts I'd like one day. 'start' | 'end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'
    /** When applied, the sticker will hide when the scroll-parent
     * is scrolling away from the sticker's stuck position and show when scrolling toward it.
     * By default this will apply when the parent is below either the h or w dimensions */
    quietMode = {
        h: 600,
        w: 600,
    };
    /** When applied stickers will hide upon new stickers being stuck to the same position */
    hideOnNewStickers = true;
    /** The max width of the item to implement sticky behaviour. */
    breakPointMax = null;
    /** The min width of the item to implement sticky behaviour. */
    breakPointMin = null;
    /** Define which scroll element to listen & stick to.
     * By default, it will find traverse the DOM to find the closest. */
    scrollParent;
    /** Upon being stuck, attach the sticker to another sticker element.
     * JS query selector string or DOM element pointing to a `<nano-sticker>`  */
    stickTo;
    // Broadcasted Events
    /** Emitted when a sticker is stuck */
    nanoStuck;
    /** Emitted when a sticker is unstuck */
    nanoUnstuck;
    /** Emitted when a sticker is hidden */
    nanoHide;
    /** Emitted when a sticker is showing */
    nanoShow;
    // Public methods
    /**
     * Method to return the visibility status of the sticker
     * @returns boolean
     */
    async isHiding() {
        return this.hide;
    }
    /**
     * Method to return the stuck status of the sticker
     * @returns boolean
     */
    async isSticking() {
        this.shouldStick();
        return this.isStuck;
    }
    /**
     * @internal
     * @param offset
     * @returns the trigger position
     */
    async setTriggerPos(offset) {
        return (this._offset = offset);
    }
    /**
     * @internal
     * @returns the trigger position
     */
    async getTriggerPos() {
        return this.triggerPos;
    }
    /**
     * @internal
     * @param pause
     */
    async pauseHiding(pause) {
        this.pauseHide = pause;
    }
    // Watchers
    /** Keep a note of trigger position. Need this to track sticker order in the DOM */
    updateTriggerOffset() {
        if (!this.trigger || !this.scrollParent || !this.listenForScrollParent)
            return;
        this.triggerPos = _getOffset(this.trigger, this.scrollParent);
    }
    /** A root sticker is a fixed element Or this sticker is sticking to another.
     * We need a content resize watcher to make sure we maintain a correct placeholder size in the body */
    stickerResizeListener() {
        if (!this.content || !window['ResizeObserver'])
            return;
        if (this.contentSizeObserver) {
            this.contentSizeObserver.disconnect();
            this.contentSizeObserver = undefined;
        }
        this.contentSizeObserver = new ResizeObserver((entries) => {
            for (const entry of entries) {
                if (this.pauseResizeWatcher)
                    return;
                if (entry.contentRect.height) {
                    if (this.position === 'top')
                        this.host.style.height = entry.contentRect.height + 'px';
                    if (this.position === 'bottom')
                        this.host.style.minHeight = entry.contentRect.height + 'px';
                }
            }
        });
        this.contentSizeObserver.observe(this.content);
    }
    quietModeChange() {
        if (this.quietMode === 'on')
            requestAnimationFrame(() => (this.quietModeIsOn = true));
        else if (this.quietMode === 'off')
            requestAnimationFrame(() => (this.quietModeIsOn = false));
    }
    /** offset is part of the public API but we also use it to manipulate trigger points */
    setOffset() {
        if (this.trigger)
            this.trigger.setAttribute('style', '');
        let v, h, _v, _h;
        const sticker = this.isRootSticker || this.stickToEle ? this.sticker : this.host;
        if (!sticker)
            return;
        if (typeof this.offset === 'object')
            ({ v, h } = this.offset);
        else
            v = h = this.offset;
        if (typeof this._offset === 'object')
            ({ v = _v, h = _h } = this._offset);
        else
            _v = _h = this._offset;
        const setPos = (pos) => {
            const u = pos.match(/(top|bottom)/) ? v : h;
            setTriggetPos(pos);
            sticker.style[pos] = u + 'px';
            if (u)
                this.host.style.setProperty('--hide-transform-amount', `(110% + ${u}px)`);
            else
                this.host.style.setProperty('--hide-transform-amount', null);
        };
        const setTriggetPos = (pos) => {
            const u = pos.match(/(top|bottom)/) ? v + _v : h + _h;
            this.trigger.style[pos] = u * -1 + 'px';
            this.trigger.style.position = 'relative';
            this.trigger.style.minHeight = '1px';
            this.trigger.style.maxHeight = '1px';
            this.trigger.style.overflow = 'hidden';
        };
        if ((this.positions.includes('start') && this.isRtl) ||
            (this.positions.includes('end') && !this.isRtl))
            setPos('right');
        if ((this.positions.includes('end') && this.isRtl) ||
            (this.positions.includes('start') && !this.isRtl))
            setPos('left');
        if (this.positions.includes('top'))
            setPos('top');
        if (this.positions.includes('bottom'))
            setPos('bottom');
    }
    positionChange() {
        this.positions = this.position.split('-');
        this.setOffset();
    }
    /** If this sticker is attached to a 'master' sticker (stickToEle),
     * here we move the content of this sticker in and out accordingly */
    async stuckChange() {
        if (this.isStuck) {
            if (this.stickToEle) {
                const content = this.host.children;
                this.slottedContent = Array.from(content);
                this.slottedContent.forEach((child) => {
                    this.stickToEle.appendChild(child);
                    child.style.order = this.stickerIndex + '';
                });
                this.nanoStuck.emit({ sticker: this.stickToEle });
            }
            else
                this.nanoStuck.emit({ sticker: this.host });
        }
        else {
            this.scrollHide = false;
            if (this.stickToEle) {
                this.slottedContent.forEach((child) => {
                    this.host.appendChild(child);
                    child.style.order = '';
                });
                this.nanoUnstuck.emit({ sticker: this.stickToEle });
            }
            else
                this.nanoUnstuck.emit({ sticker: this.host });
        }
    }
    /** attach scroll listener. 'hides' stickers when scrolling away from trigger and 'shows' when scrolling toward */
    attachScrollListeners() {
        if (this.quietModeIsOn)
            this.scrollParent.addEventListener('scroll', this.onScroll, {
                passive: true,
                capture: false,
            });
        else if (this.scrollParent) {
            this.scrollParent.removeEventListener('scroll', this.onScroll);
            this.moveTrigger(true);
        }
    }
    /** Add / remove parent scrolling listeners. If there's stickToEle we need to remove them */
    handleParentEvents(_, oldParent = null) {
        if (!this.listenForScrollParent)
            return;
        if (oldParent)
            this.manageListenersOnParent(false, oldParent);
        if (this.scrollParent)
            this.manageListenersOnParent(!this.stickToEle);
    }
    /** Add remove specific listeners if we're sticking to a sticker.
     * We need to adjust triggers according to the status of the 'master'  */
    stickToEleChange(_, oldEle) {
        if (this.stickToEle) {
            this.stickToEle.addEventListener('nanoHide', this.onStickToDisplayEvent);
            this.stickToEle.addEventListener('nanoShow', this.onStickToDisplayEvent);
            this.stickToEle.addEventListener('nanoStuck', this.onStickToDisplayEvent);
            this.stickToEle.addEventListener('nanoUnstuck', this.onStickToDisplayEvent);
        }
        if (oldEle) {
            oldEle.removeEventListener('nanoHide', this.onStickToDisplayEvent);
            oldEle.removeEventListener('nanoShow', this.onStickToDisplayEvent);
            oldEle.removeEventListener('nanoStuck', this.onStickToDisplayEvent);
            oldEle.removeEventListener('nanoUnstuck', this.onStickToDisplayEvent);
        }
    }
    /** Find and set the stickToEle from the public, selector string */
    stickToChange() {
        if (typeof this.stickTo === 'string')
            this.stickToEle = this.scrollParent.querySelector(this.stickTo);
        else if (this.stickTo)
            this.stickToEle = this.stickTo;
        else
            this.stickToEle = undefined;
    }
    /** 2 potential criteria for hiding. Multi-stickers or quiet mode. */
    visibilityDecisionHandler() {
        if (this.multiStickerHide || this.scrollHide)
            this.hide = true;
        else
            this.hide = false;
    }
    handleHideChange() {
        if (this.hide)
            this.nanoHide.emit({ sticker: this.host });
        else
            this.nanoShow.emit({ sticker: this.host });
    }
    setupIO() {
        if (this.io) {
            this.io.disconnect();
            this.io = undefined;
        }
        if (!this.scrollParent || !this.hasBootstrapped || !this.trigger)
            return;
        this.isRootSticker = this.scrollParent instanceof Document;
        let root = this.scrollParent;
        if (this.scrollParent instanceof Document)
            root = null;
        this.io = new window.IntersectionObserver((_) => {
            if (this.pauseResizeWatcher || !this.isSticky)
                return;
            this.shouldStick(_.slice(-1)[0]);
        }, { root: root });
        this.io.observe(this.trigger);
    }
    // Private methods / handlers
    /** Assesses the public API quitemode and works out if it should be applied atm.
     * If 'small screen', or there is a breakpointmax / min it will add a resizeobserver to conditionally add behaviour */
    setupParentResizeListener = () => {
        if (!window['ResizeObserver'])
            return;
        if (this.parentSizeObserver) {
            this.parentSizeObserver.disconnect();
            this.parentSizeObserver = undefined;
        }
        this.parentSizeObserver = new ResizeObserver((entries) => {
            for (const entry of entries) {
                let height, width;
                if (entry.contentRect.height)
                    height = entry.contentRect.height;
                if (entry.contentRect.width)
                    width = entry.contentRect.width;
                if (typeof this.quietMode === 'object') {
                    if (width < this.quietMode.w || height < this.quietMode.h)
                        this.quietModeIsOn = true;
                    else
                        this.quietModeIsOn = false;
                }
                if (this.breakPointMin) {
                    if (width > this.breakPointMin)
                        this.isSticky = true;
                    else
                        this.isSticky = false;
                }
                if (this.breakPointMax) {
                    if (width < this.breakPointMax)
                        this.isSticky = true;
                    else
                        this.isSticky = false;
                }
                if (this.isRootSticker && this.sticker && this.autoResize)
                    this.sticker.style.width = this.host.scrollWidth + 'px';
            }
        });
        const toWatch = this.scrollParent instanceof Document
            ? this.scrollParent.documentElement
            : this.scrollParent;
        if (toWatch)
            this.parentSizeObserver.observe(toWatch);
    };
    /** For stickTo stickers. We listen to the events from the 'master' sticker to amend the hide/show trigger
     * Main diffs from root-stickers / non is height being on 'master' */
    onStickToDisplayEvent = (e) => {
        if (e.detail.sticker !== this.stickToEle)
            return;
        switch (e.type) {
            case 'nanoHide':
                this._offset = 0;
                this.cacheOffset = this.offset;
                this.offset = 0;
                /** trigger moves down, underneath sticker if the main sticker hides */
                if (!this.isStuck)
                    this.moveTrigger(false);
                /** If it's an actual 'position: sticky' element, we need to give the sticker an appropriate height.
                 * This minimises content jumping around as items are added */
                if (!this.isRootSticker && this.quietModeIsOn) {
                    requestAnimationFrame(() => {
                        this.stickToEle.style.minHeight =
                            this.stickToEleInitSize.height +
                                (this.host.scrollHeight +
                                    (typeof this.cacheOffset === 'object'
                                        ? this.cacheOffset.v
                                        : this.cacheOffset)) +
                                'px';
                        this.stickToEle.setTriggerPos(this.stickToEleInitSize.height * -1);
                    });
                }
                break;
            case 'nanoShow':
                this._offset = this.stickToEleInitSize.height;
                this.offset = this.cacheOffset;
                this.moveTrigger(true);
                /** reset master sticker size */
                if (!this.isRootSticker && this.quietModeIsOn) {
                    requestAnimationFrame(() => {
                        this.stickToEle.style.minHeight = '';
                        this.stickToEle.setTriggerPos(0);
                    });
                }
                break;
            case 'nanoStuck':
                this.stickToEleInitSize = this.stickToEle.getBoundingClientRect();
                this._offset = this.stickToEleInitSize.height;
                break;
        }
    };
    /** Add or removes event listeners / observers on scrolling parent
     * for when the scrolling parent changes, or, this sticker is sticking to another */
    manageListenersOnParent(addEvents, ele) {
        const scrollParent = ele || this.scrollParent;
        if (!scrollParent)
            return;
        if (!addEvents) {
            try {
                if (this.quietModeIsOn)
                    scrollParent.removeEventListener('scroll', this.onScroll);
                scrollParent.removeEventListener('nanoStuck', this.onStickEvent);
                scrollParent.removeEventListener('nanoUnstuck', this.onStickEvent);
            }
            catch (_e) {
                console.error('Events haven`t been added');
            }
        }
        else {
            scrollParent.addEventListener('nanoStuck', this.onStickEvent);
            scrollParent.addEventListener('nanoUnstuck', this.onStickEvent);
            if (this.quietModeIsOn)
                this.attachScrollListeners();
        }
        this.setupParentResizeListener();
    }
    /** Handler applied to scrolling parent. When 'hideOnNewStickers' is true, hide this sticker on subsequent stuck stickers.  */
    onStickEvent = async (e) => {
        const sticker = e.detail ? e.detail.sticker : null;
        if (!sticker || sticker.position !== this.position)
            return;
        const incomingTriggerPos = await sticker.getTriggerPos();
        if (e.type === 'nanoStuck' &&
            sticker !== this.host &&
            sticker.scrollParent === this.host.scrollParent) {
            this.stickerIndex++;
            if (!this.hideOnNewStickers)
                return;
            if ((this.positions.includes('top') &&
                this.triggerPos.top < incomingTriggerPos.top) ||
                (this.positions.includes('bottom') &&
                    this.triggerPos.top > incomingTriggerPos.top)) {
                this.multiStickerHide = true;
                this.stuckCounter++;
            }
        }
        if (e.type === 'nanoUnstuck' &&
            sticker !== this.host &&
            sticker.scrollParent === this.host.scrollParent) {
            this.stickerIndex--;
            if (!this.hideOnNewStickers)
                return;
            if ((this.positions.includes('top') &&
                this.triggerPos.top < incomingTriggerPos.top) ||
                (this.positions.includes('bottom') &&
                    this.triggerPos.top > incomingTriggerPos.top)) {
                this.stuckCounter--;
                if (this.stuckCounter < 1)
                    this.multiStickerHide = false;
            }
        }
    };
    /** Scroll handler applied to scrolling parent. Only applied when quietmode is on.
     * 'hides' stickers when scrolling over 100px away from trigger and 'shows' when scrolling toward */
    onScroll = () => {
        const y = _getScrollTop(this.scrollParent);
        // scrolling up
        if (y < this.scrollPosCache) {
            if (!this.positions.includes('bottom'))
                this.handleScrollTo();
            else
                this.handleScrollAway(y);
        }
        // scrolling down
        if (y > this.scrollPosCache) {
            if (!this.positions.includes('bottom'))
                this.handleScrollAway(y);
            else
                this.handleScrollTo();
        }
        this.scrollPosCache = y;
    };
    /** Watch for scroll direction. Only applies when quietmode is on.
     * We need to addjust the position of the trigger when the sticker is hidden */
    handleScrollTo() {
        this.scrollPosThresholdCache = null;
        if (!this.scrollHide)
            return;
        if (this.scrollingTo !== true) {
            this._offset = this.cacheOffset || this._offset;
        }
        this.scrollingTo = true;
        this.scrollHide = false;
    }
    handleScrollAway(currScroll) {
        if (this.scrollHide)
            return;
        if (!this.isStuck)
            return;
        if (this.scrollingTo !== false) {
            this.cacheOffset = this._offset;
            this._offset = 0;
        }
        this.scrollingTo = false;
        if (!this.scrollPosThresholdCache)
            this.scrollPosThresholdCache = currScroll;
        else if (!this.pauseHide &&
            Math.abs(currScroll - this.scrollPosThresholdCache) > 100)
            this.scrollHide = true;
    }
    moveTrigger(toInitial) {
        if ((this.positions.includes('bottom') && !toInitial) ||
            (!this.positions.includes('bottom') && toInitial)) {
            this.host.parentNode.insertBefore(this.trigger, this.host);
        }
        else
            this.host.parentNode.insertBefore(this.trigger, this.host.nextSibling);
    }
    shouldStick(data) {
        let scrollAmt;
        if (this.positions.includes('top')) {
            if (!this.isRootSticker) {
                scrollAmt = _getOffset(this.trigger, this.scrollParent).top;
            }
            else {
                scrollAmt = this.trigger.getBoundingClientRect().top;
            }
            this.isStuck = scrollAmt < -1;
        }
        else if (this.positions.includes('bottom')) {
            scrollAmt = this.trigger.getBoundingClientRect().top;
            const parentBounding = data && data.rootBounds
                ? data.rootBounds
                : (this.scrollParent instanceof Document
                    ? document.documentElement
                    : this.scrollParent).getBoundingClientRect();
            this.isStuck =
                !data.isIntersecting ||
                    scrollAmt > parentBounding.height + parentBounding.top;
        }
    }
    bootstrapGurantor() {
        this.hasBootstrapped = true;
        const scrollParent = this.scrollParent || findScrollParent(this.host);
        this.scrollParent =
            scrollParent === document.documentElement ? document : scrollParent;
        this.isRootSticker = this.scrollParent instanceof Document;
        this.trigger = this.trigger || document.createElement('div');
        this.trigger.innerHTML = '&nbsp;';
        this.trigger.classList.add('sticker-trigger');
        this.positionChange();
        this.moveTrigger(true);
        this.quietModeChange();
        this.listenForScrollParent = true;
        this.handleParentEvents(true);
        this.stickerIndex = Array.from(this.scrollParent.querySelectorAll(transformTag('nano-sticker')))
            .filter((sticker) => sticker.position === this.position)
            .findIndex((sticker) => sticker === this.host);
        this.setOffset();
        this.stickerResizeListener();
        this.setupParentResizeListener();
        // bit of a hack ... add default 'order'. Required for 'stickTo' elements.
        this.slottedContent = Array.from(this.host.children);
        this.slottedContent.forEach((child) => {
            child.style.order = this.stickerIndex + '';
        });
        this.updateTriggerOffset();
        this.stickToChange();
        this.setupIO();
        this.onStickToDisplayEvent = debounce(this.onStickToDisplayEvent, 50);
    }
    // Stencil methods
    connectedCallback() {
        this.isRtl =
            this.host.dir === 'rtl' || this.host.ownerDocument.dir === 'rtl';
        // this is all horrible.... shrug
        setTimeout((_) => {
            if (!this.hasBootstrapped)
                this.bootstrapGurantor();
        }, 1000);
    }
    disconnectedCallback() {
        if (this.io) {
            this.io.disconnect();
            this.io = undefined;
        }
        if (this.parentSizeObserver) {
            this.parentSizeObserver.disconnect();
            this.parentSizeObserver = undefined;
        }
        this.scrollParent = null;
        this.hasBootstrapped = false;
    }
    render() {
        return (h(Host, { key: '9760c52934c0b3d6459598dfa3a197927cf7e878', sticky: !this.isRootSticker && !this.stickToEle && this.isSticky, hide: this.hide && this.isStuck, siblings: this.stuckCounter, index: this.stickerIndex, stuck: this.isStuck && this.isSticky, "placed-bottom": this.positions.includes('bottom'), "placed-top": this.positions.includes('top'), "placed-end": this.positions.includes('end'), "placed-start": this.positions.includes('start'), class: "nano-sticker" }, h("div", { key: 'abbbd0a9b785792f00a75d411fbc3b882f605032', class: {
                sticker: true,
                sticky: this.isRootSticker && this.isSticky,
                stuck: this.isStuck && this.isRootSticker && this.isSticky,
                hide: this.isRootSticker && this.hide && this.isStuck,
            }, ref: (div) => (this.sticker = div) }, h("div", { key: 'de9552b69657aad9f2015dfa1470a197d490520c', class: "sticker-content", ref: (div) => (this.content = div) }, h("slot", { key: 'baafb74a16688cd9e1839eb617ceb46fb7e2b23f' })))));
    }
    static get watchers() { return {
        "trigger": ["updateTriggerOffset"],
        "scrollParent": ["updateTriggerOffset", "handleParentEvents", "setupIO"],
        "position": ["stickerResizeListener", "positionChange"],
        "quietMode": ["quietModeChange"],
        "offset": ["setOffset"],
        "_offset": ["setOffset"],
        "isStuck": ["stuckChange"],
        "quietModeIsOn": ["attachScrollListeners"],
        "stickToEle": ["handleParentEvents", "stickToEleChange"],
        "stickTo": ["stickToChange"],
        "multiStickerHide": ["visibilityDecisionHandler"],
        "scrollHide": ["visibilityDecisionHandler"],
        "hide": ["handleHideChange"]
    }; }
};
Sticker.style = stickerCss;

export { Sticker as nano_sticker };
