{"version":3,"file":"main.js","sources":["../../../../node_modules/bootstrap.native/dist/components/dropdown-native.esm.js","../../../../node_modules/bootstrap.native/dist/components/collapse-native.esm.js","../../../../node_modules/bootstrap.native/dist/components/popover-native.esm.js","../../../../modules/add-to-cart/js/urls.js","../../../utils/fetch.js","../../../utils/template.js","../../../utils/base-view.js","../../../../modules/add-to-cart/js/views/products-list.js","../../../../modules/add-to-cart/js/views/bundles.js","../../../store/category/login-for-price.js","../../../../node_modules/bootstrap.native/dist/components/tab-native.esm.js","../../../utils/data-url-fragment.js","../../../utils/query-string.js","../../../store/category/filters-sorting-common.js","../../../utils/debounce.js","../../../store/category/scroll-paginator.js","../../../utils/throttle.js","../../../store/category/wishlist.js","../../../store/category/list-view.js","../../../store/category/product-list.js","../../../utils/check-map-pricing.js","../../../../modules/session/js/urls.js","../../../../modules/session/js/models/contact-info.js","../../../../modules/session/js/contact-info.js","../../../store/category/products-grid.js","../../../../node_modules/tiny-slider/src/helpers/raf.js","../../../../node_modules/tiny-slider/src/helpers/caf.js","../../../../node_modules/tiny-slider/src/helpers/extend.js","../../../../node_modules/tiny-slider/src/helpers/checkStorageValue.js","../../../../node_modules/tiny-slider/src/helpers/setLocalStorage.js","../../../../node_modules/tiny-slider/src/helpers/getBody.js","../../../../node_modules/tiny-slider/src/helpers/docElement.js","../../../../node_modules/tiny-slider/src/helpers/setFakeBody.js","../../../../node_modules/tiny-slider/src/helpers/resetFakeBody.js","../../../../node_modules/tiny-slider/src/helpers/addCSSRule.js","../../../../node_modules/tiny-slider/src/helpers/getCssRulesLength.js","../../../../node_modules/tiny-slider/src/helpers/forEach.js","../../../../node_modules/tiny-slider/src/helpers/classListSupport.js","../../../../node_modules/tiny-slider/src/helpers/hasClass.js","../../../../node_modules/tiny-slider/src/helpers/addClass.js","../../../../node_modules/tiny-slider/src/helpers/removeClass.js","../../../../node_modules/tiny-slider/src/helpers/hasAttr.js","../../../../node_modules/tiny-slider/src/helpers/getAttr.js","../../../../node_modules/tiny-slider/src/helpers/isNodeList.js","../../../../node_modules/tiny-slider/src/helpers/setAttrs.js","../../../../node_modules/tiny-slider/src/helpers/removeAttrs.js","../../../../node_modules/tiny-slider/src/helpers/arrayFromNodeList.js","../../../../node_modules/tiny-slider/src/helpers/hideElement.js","../../../../node_modules/tiny-slider/src/helpers/showElement.js","../../../../node_modules/tiny-slider/src/helpers/isVisible.js","../../../../node_modules/tiny-slider/src/helpers/whichProperty.js","../../../../node_modules/tiny-slider/src/helpers/getEndProperty.js","../../../../node_modules/tiny-slider/src/helpers/passiveOption.js","../../../../node_modules/tiny-slider/src/helpers/addEvents.js","../../../../node_modules/tiny-slider/src/helpers/removeEvents.js","../../../../node_modules/tiny-slider/src/helpers/events.js","../../../../node_modules/tiny-slider/src/tiny-slider.js","../../../../node_modules/tiny-slider/src/helpers/calc.js","../../../../node_modules/tiny-slider/src/helpers/percentageLayout.js","../../../../node_modules/tiny-slider/src/helpers/mediaquerySupport.js","../../../../node_modules/tiny-slider/src/helpers/has3DTransforms.js","../../../../node_modules/tiny-slider/src/helpers/createStyleSheet.js","../../../../node_modules/tiny-slider/src/helpers/getSlideId.js","../../../../node_modules/tiny-slider/src/helpers/jsTransform.js","../../../../node_modules/tiny-slider/src/helpers/removeCSSRule.js","../../../../node_modules/tiny-slider/src/helpers/toDegree.js","../../../../node_modules/tiny-slider/src/helpers/getTouchDirection.js","../../../store/category/sliders.js","../../../store/category/main.js","../../../components/sliders.js"],"sourcesContent":["/*!\n * Native JavaScript for Bootstrap - Dropdown v4.2.0 (https://thednp.github.io/bootstrap.native/)\n * Copyright 2015-2022 © dnp_theme\n * Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)\n */\n/**\n * A global namespace for aria-expanded.\n * @type {string}\n */\nconst ariaExpanded = 'aria-expanded';\n\n/**\n * A global namespace for `focus` event.\n * @type {string}\n */\nconst focusEvent = 'focus';\n\n/**\n * A global namespace for `keydown` event.\n * @type {string}\n */\nconst keydownEvent = 'keydown';\n\n/**\n * A global namespace for `keyup` event.\n * @type {string}\n */\nconst keyupEvent = 'keyup';\n\n/**\n * A global namespace for `scroll` event.\n * @type {string}\n */\nconst scrollEvent = 'scroll';\n\n/**\n * A global namespace for `resize` event.\n * @type {string}\n */\nconst resizeEvent = 'resize';\n\n/**\n * A global namespace for `click` event.\n * @type {string}\n */\nconst mouseclickEvent = 'click';\n\n/**\n * A global namespace for `ArrowUp` key.\n * @type {string} e.which = 38 equivalent\n */\nconst keyArrowUp = 'ArrowUp';\n\n/**\n * A global namespace for `ArrowDown` key.\n * @type {string} e.which = 40 equivalent\n */\nconst keyArrowDown = 'ArrowDown';\n\n/**\n * A global namespace for `Escape` key.\n * @type {string} e.which = 27 equivalent\n */\nconst keyEscape = 'Escape';\n\n/**\n * Shortcut for `HTMLElement.setAttribute()` method.\n * @param {HTMLElement} element target element\n * @param {string} attribute attribute name\n * @param {string} value attribute value\n * @returns {void}\n */\nconst setAttribute = (element, attribute, value) => element.setAttribute(attribute, value);\n\n/**\n * Shortcut for `HTMLElement.hasAttribute()` method.\n * @param {HTMLElement} element target element\n * @param {string} attribute attribute name\n * @returns {boolean} the query result\n */\nconst hasAttribute = (element, attribute) => element.hasAttribute(attribute);\n\n/**\n * Shortcut for `HTMLElement.closest` method which also works\n * with children of `ShadowRoot`. The order of the parameters\n * is intentional since they're both required.\n *\n * @see https://stackoverflow.com/q/54520554/803358\n *\n * @param {HTMLElement} element Element to look into\n * @param {string} selector the selector name\n * @return {HTMLElement?} the query result\n */\nfunction closest(element, selector) {\n return element ? (element.closest(selector)\n // break out of `ShadowRoot`\n || closest(element.getRootNode().host, selector)) : null;\n}\n\n/**\n * Checks if an object is a `Node`.\n *\n * @param {any} node the target object\n * @returns {boolean} the query result\n */\nconst isNode = (element) => (element && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n .some((x) => +element.nodeType === x)) || false;\n\n/**\n * Check if a target object is `Window`.\n * => equivalent to `object instanceof Window`\n *\n * @param {any} object the target object\n * @returns {boolean} the query result\n */\nconst isWindow = (object) => (object && object.constructor.name === 'Window') || false;\n\n/**\n * Checks if an object is a `Document`.\n * @see https://dom.spec.whatwg.org/#node\n *\n * @param {any} object the target object\n * @returns {boolean} the query result\n */\nconst isDocument = (object) => (object && object.nodeType === 9) || false;\n\n/**\n * Returns the `document` or the `#document` element.\n * @see https://github.com/floating-ui/floating-ui\n * @param {(Node | Window)=} node\n * @returns {Document}\n */\nfunction getDocument(node) {\n // node instanceof Document\n if (isDocument(node)) return node;\n // node instanceof Node\n if (isNode(node)) return node.ownerDocument;\n // node instanceof Window\n if (isWindow(node)) return node.document;\n // node is undefined | NULL\n return window.document;\n}\n\n/**\n * Utility to check if target is typeof `HTMLElement`, `Element`, `Node`\n * or find one that matches a selector.\n *\n * @param {Node | string} selector the input selector or target element\n * @param {ParentNode=} parent optional node to look into\n * @return {HTMLElement?} the `HTMLElement` or `querySelector` result\n */\nfunction querySelector(selector, parent) {\n if (isNode(selector)) {\n return selector;\n }\n const lookUp = isNode(parent) ? parent : getDocument();\n\n return lookUp.querySelector(selector);\n}\n\n/**\n * Shortcut for `HTMLElement.getElementsByClassName` method. Some `Node` elements\n * like `ShadowRoot` do not support `getElementsByClassName`.\n *\n * @param {string} selector the class name\n * @param {ParentNode=} parent optional Element to look into\n * @return {HTMLCollectionOf} the 'HTMLCollection'\n */\nfunction getElementsByClassName(selector, parent) {\n const lookUp = isNode(parent) ? parent : getDocument();\n return lookUp.getElementsByClassName(selector);\n}\n\n/**\n * A global namespace for most scroll event listeners.\n * @type {Partial}\n */\nconst passiveHandler = { passive: true };\n\n/**\n * Shortcut for `Object.assign()` static method.\n * @param {Record} obj a target object\n * @param {Record} source a source object\n */\nconst ObjectAssign = (obj, source) => Object.assign(obj, source);\n\n/**\n * Checks if an element is an `HTMLElement`.\n * @see https://dom.spec.whatwg.org/#node\n *\n * @param {any} element the target object\n * @returns {boolean} the query result\n */\nconst isHTMLElement = (element) => (element && element.nodeType === 1) || false;\n\n/** @type {Map>>} */\nconst componentData = new Map();\n/**\n * An interface for web components background data.\n * @see https://github.com/thednp/bootstrap.native/blob/master/src/components/base-component.js\n */\nconst Data = {\n /**\n * Sets web components data.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n * @param {Record} instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n\n /* istanbul ignore else */\n if (!componentData.has(component)) {\n componentData.set(component, new Map());\n }\n\n const instanceMap = componentData.get(component);\n // not undefined, but defined right above\n instanceMap.set(element, instance);\n },\n\n /**\n * Returns all instances for specified component.\n * @param {string} component the component's name or a unique key\n * @returns {Map>?} all the component instances\n */\n getAllFor: (component) => {\n const instanceMap = componentData.get(component);\n\n return instanceMap || null;\n },\n\n /**\n * Returns the instance associated with the target.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n * @returns {Record?} the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const allForC = Data.getAllFor(component);\n const instance = element && allForC && allForC.get(element);\n\n return instance || null;\n },\n\n /**\n * Removes web components data.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = componentData.get(component);\n if (!instanceMap || !isHTMLElement(element)) return;\n\n instanceMap.delete(element);\n\n /* istanbul ignore else */\n if (instanceMap.size === 0) {\n componentData.delete(component);\n }\n },\n};\n\n/**\n * An alias for `Data.get()`.\n * @type {SHORTY.getInstance}\n */\nconst getInstance = (target, component) => Data.get(target, component);\n\n/**\n * Shortcut for `Object.entries()` static method.\n * @param {Record} obj a target object\n * @returns {[string, any][]}\n */\nconst ObjectEntries = (obj) => Object.entries(obj);\n\n/**\n * Shortcut for multiple uses of `HTMLElement.style.propertyName` method.\n * @param {HTMLElement} element target element\n * @param {Partial} styles attribute value\n */\nconst setElementStyle = (element, styles) => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (key.includes('--')) {\n element.style.setProperty(key, value);\n } else {\n const propObject = {}; propObject[key] = value;\n ObjectAssign(element.style, propObject);\n }\n });\n};\n\n/**\n * Shortcut for the `Element.dispatchEvent(Event)` method.\n *\n * @param {HTMLElement} element is the target\n * @param {Event} event is the `Event` object\n */\nconst dispatchEvent = (element, event) => element.dispatchEvent(event);\n\n/**\n * Utility to focus an `HTMLElement` target.\n *\n * @param {HTMLElement} element is the target\n */\nconst focus = (element) => element.focus();\n\n/**\n * Checks if an object is an `Object`.\n *\n * @param {any} obj the target object\n * @returns {boolean} the query result\n */\nconst isObject = (obj) => (typeof obj === 'object') || false;\n\n/**\n * Returns a namespaced `CustomEvent` specific to each component.\n * @param {string} EventType Event.type\n * @param {Record=} config Event.options | Event.properties\n * @returns {SHORTY.OriginalEvent} a new namespaced event\n */\nfunction OriginalEvent(EventType, config) {\n const OriginalCustomEvent = new CustomEvent(EventType, {\n cancelable: true, bubbles: true,\n });\n\n /* istanbul ignore else */\n if (isObject(config)) {\n ObjectAssign(OriginalCustomEvent, config);\n }\n return OriginalCustomEvent;\n}\n\n/**\n * Add class to `HTMLElement.classList`.\n *\n * @param {HTMLElement} element target\n * @param {string} classNAME to add\n * @returns {void}\n */\nfunction addClass(element, classNAME) {\n element.classList.add(classNAME);\n}\n\n/**\n * Check class in `HTMLElement.classList`.\n *\n * @param {HTMLElement} element target\n * @param {string} classNAME to check\n * @returns {boolean}\n */\nfunction hasClass(element, classNAME) {\n return element.classList.contains(classNAME);\n}\n\n/**\n * Remove class from `HTMLElement.classList`.\n *\n * @param {HTMLElement} element target\n * @param {string} classNAME to remove\n * @returns {void}\n */\nfunction removeClass(element, classNAME) {\n element.classList.remove(classNAME);\n}\n\n/**\n * Returns the `document.documentElement` or the `` element.\n *\n * @param {(Node | Window)=} node\n * @returns {HTMLHtmlElement}\n */\nfunction getDocumentElement(node) {\n return getDocument(node).documentElement;\n}\n\n/**\n * Checks if a page is Right To Left.\n * @param {HTMLElement=} node the target\n * @returns {boolean} the query result\n */\nconst isRTL = (node) => getDocumentElement(node).dir === 'rtl';\n\n/**\n * Shortcut for `window.getComputedStyle(element).propertyName`\n * static method.\n *\n * * If `element` parameter is not an `HTMLElement`, `getComputedStyle`\n * throws a `ReferenceError`.\n *\n * @param {HTMLElement} element target\n * @param {string} property the css property\n * @return {string} the css property value\n */\nfunction getElementStyle(element, property) {\n const computedStyle = getComputedStyle(element);\n\n // must use camelcase strings,\n // or non-camelcase strings with `getPropertyValue`\n return property.includes('--')\n ? computedStyle.getPropertyValue(property)\n : computedStyle[property];\n}\n\n/**\n * Returns the bounding client rect of a target `HTMLElement`.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param {HTMLElement} element event.target\n * @param {boolean=} includeScale when *true*, the target scale is also computed\n * @returns {SHORTY.BoundingClientRect} the bounding client rect object\n */\nfunction getBoundingClientRect(element, includeScale) {\n const {\n width, height, top, right, bottom, left,\n } = element.getBoundingClientRect();\n let scaleX = 1;\n let scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n const { offsetWidth, offsetHeight } = element;\n scaleX = offsetWidth > 0 ? Math.round(width) / offsetWidth\n : /* istanbul ignore next */1;\n scaleY = offsetHeight > 0 ? Math.round(height) / offsetHeight\n : /* istanbul ignore next */1;\n }\n\n return {\n width: width / scaleX,\n height: height / scaleY,\n top: top / scaleY,\n right: right / scaleX,\n bottom: bottom / scaleY,\n left: left / scaleX,\n x: left / scaleX,\n y: top / scaleY,\n };\n}\n\n/**\n * Returns the `Window` object of a target node.\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param {(Node | Window)=} node target node\n * @returns {Window} the `Window` object\n */\nfunction getWindow(node) {\n // node is undefined | NULL\n if (!node) return window;\n // node instanceof Document\n if (isDocument(node)) return node.defaultView;\n // node instanceof Node\n if (isNode(node)) return node.ownerDocument.defaultView;\n // node is instanceof Window\n return node;\n}\n\n/** @type {Record} */\nconst EventRegistry = {};\n\n/**\n * The global event listener.\n *\n * @type {EventListener}\n * @this {EventTarget}\n */\nfunction globalListener(e) {\n const that = this;\n const { type } = e;\n\n [...EventRegistry[type]].forEach((elementsMap) => {\n const [element, listenersMap] = elementsMap;\n /* istanbul ignore else */\n if (element === that) {\n [...listenersMap].forEach((listenerMap) => {\n const [listener, options] = listenerMap;\n listener.apply(element, [e]);\n\n if (options && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n}\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n *\n * @type {Listener.ListenerAction}\n */\nconst addListener = (element, eventType, listener, options) => {\n // get element listeners first\n if (!EventRegistry[eventType]) {\n EventRegistry[eventType] = new Map();\n }\n const oneEventMap = EventRegistry[eventType];\n\n if (!oneEventMap.has(element)) {\n oneEventMap.set(element, new Map());\n }\n const oneElementMap = oneEventMap.get(element);\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener, options);\n\n // add listener last\n if (!size) {\n element.addEventListener(eventType, globalListener, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n * @type {Listener.ListenerAction}\n */\nconst removeListener = (element, eventType, listener, options) => {\n // get listener first\n const oneEventMap = EventRegistry[eventType];\n const oneElementMap = oneEventMap && oneEventMap.get(element);\n const savedOptions = oneElementMap && oneElementMap.get(listener);\n\n // also recover initial options\n const { options: eventOptions } = savedOptions !== undefined\n ? savedOptions\n : { options };\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener)) oneElementMap.delete(listener);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element);\n if (!oneEventMap || !oneEventMap.size) delete EventRegistry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n element.removeEventListener(eventType, globalListener, eventOptions);\n }\n};\n\n/**\n * Global namespace for most components `show` class.\n */\nconst showClass = 'show';\n\n/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = 'data-bs-toggle';\n\n/**\n * Global namespace for `Dropdown` types / classes.\n */\nconst dropdownMenuClasses = ['dropdown', 'dropup', 'dropstart', 'dropend'];\n\n/** @type {string} */\nconst dropdownComponent = 'Dropdown';\n\n/**\n * Global namespace for `.dropdown-menu`.\n */\nconst dropdownMenuClass = 'dropdown-menu';\n\n/**\n * Checks if an *event.target* or its parent has an `href=\"#\"` value.\n * We need to prevent jumping around onclick, don't we?\n *\n * @param {Node} element the target element\n * @returns {boolean} the query result\n */\nfunction isEmptyAnchor(element) {\n // `EventTarget` must be `HTMLElement`\n const parentAnchor = closest(element, 'A');\n return isHTMLElement(element)\n // anchor href starts with #\n && ((hasAttribute(element, 'href') && element.href.slice(-1) === '#')\n // OR a child of an anchor with href starts with #\n || (parentAnchor && hasAttribute(parentAnchor, 'href')\n && parentAnchor.href.slice(-1) === '#'));\n}\n\n/**\n * Shortcut for `HTMLElement.getAttribute()` method.\n * @param {HTMLElement} element target element\n * @param {string} attribute attribute name\n * @returns {string?} attribute value\n */\nconst getAttribute = (element, attribute) => element.getAttribute(attribute);\n\n/**\n * The raw value or a given component option.\n *\n * @typedef {string | HTMLElement | Function | number | boolean | null} niceValue\n */\n\n/**\n * Utility to normalize component options\n *\n * @param {any} value the input value\n * @return {niceValue} the normalized value\n */\nfunction normalizeValue(value) {\n if (['true', true].includes(value)) { // boolean\n // if ('true' === value) { // boolean\n return true;\n }\n\n if (['false', false].includes(value)) { // boolean\n // if ('false' === value) { // boolean\n return false;\n }\n\n if (value === '' || value === 'null') { // null\n return null;\n }\n\n if (value !== '' && !Number.isNaN(+value)) { // number\n return +value;\n }\n\n // string / function / HTMLElement / object\n return value;\n}\n\n/**\n * Shortcut for `Object.keys()` static method.\n * @param {Record} obj a target object\n * @returns {string[]}\n */\nconst ObjectKeys = (obj) => Object.keys(obj);\n\n/**\n * Shortcut for `String.toLowerCase()`.\n *\n * @param {string} source input string\n * @returns {string} lowercase output string\n */\nconst toLowerCase = (source) => source.toLowerCase();\n\n/**\n * Utility to normalize component options.\n *\n * @param {HTMLElement} element target\n * @param {Record} defaultOps component default options\n * @param {Record} inputOps component instance options\n * @param {string=} ns component namespace\n * @return {Record} normalized component options object\n */\nfunction normalizeOptions(element, defaultOps, inputOps, ns) {\n const data = { ...element.dataset };\n /** @type {Record} */\n const normalOps = {};\n /** @type {Record} */\n const dataOps = {};\n const title = 'title';\n\n ObjectKeys(data).forEach((k) => {\n const key = ns && k.includes(ns)\n ? k.replace(ns, '').replace(/[A-Z]/, (match) => toLowerCase(match))\n : k;\n\n dataOps[key] = normalizeValue(data[k]);\n });\n\n ObjectKeys(inputOps).forEach((k) => {\n inputOps[k] = normalizeValue(inputOps[k]);\n });\n\n ObjectKeys(defaultOps).forEach((k) => {\n /* istanbul ignore else */\n if (k in inputOps) {\n normalOps[k] = inputOps[k];\n } else if (k in dataOps) {\n normalOps[k] = dataOps[k];\n } else {\n normalOps[k] = k === title\n ? getAttribute(element, title)\n : defaultOps[k];\n }\n });\n\n return normalOps;\n}\n\nvar version = \"4.2.0\";\n\nconst Version = version;\n\n/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\n\n/** Returns a new `BaseComponent` instance. */\nclass BaseComponent {\n /**\n * @param {HTMLElement | string} target `Element` or selector string\n * @param {BSN.ComponentOptions=} config component instance options\n */\n constructor(target, config) {\n const self = this;\n const element = querySelector(target);\n\n if (!element) {\n throw Error(`${self.name} Error: \"${target}\" is not a valid selector.`);\n }\n\n /** @static @type {BSN.ComponentOptions} */\n self.options = {};\n\n const prevInstance = Data.get(element, self.name);\n if (prevInstance) prevInstance.dispose();\n\n /** @type {HTMLElement} */\n self.element = element;\n\n /* istanbul ignore else */\n if (self.defaults && ObjectKeys(self.defaults).length) {\n self.options = normalizeOptions(element, self.defaults, (config || {}), 'bs');\n }\n\n Data.set(element, self.name, self);\n }\n\n /* eslint-disable */\n /* istanbul ignore next */\n /** @static */\n get version() { return Version; }\n\n /* eslint-enable */\n /* istanbul ignore next */\n /** @static */\n get name() { return this.constructor.name; }\n\n /* istanbul ignore next */\n /** @static */\n get defaults() { return this.constructor.defaults; }\n\n /**\n * Removes component from target element;\n */\n dispose() {\n const self = this;\n Data.remove(self.element, self.name);\n ObjectKeys(self).forEach((prop) => { self[prop] = null; });\n }\n}\n\n/* Native JavaScript for Bootstrap 5 | Dropdown\n----------------------------------------------- */\n\n// DROPDOWN PRIVATE GC\n// ===================\nconst [\n dropdownString,\n dropupString,\n dropstartString,\n dropendString,\n] = dropdownMenuClasses;\nconst dropdownSelector = `[${dataBsToggle}=\"${dropdownString}\"]`;\n\n/**\n * Static method which returns an existing `Dropdown` instance associated\n * to a target `Element`.\n *\n * @type {BSN.GetInstance}\n */\nconst getDropdownInstance = (element) => getInstance(element, dropdownComponent);\n\n/**\n * A `Dropdown` initialization callback.\n * @type {BSN.InitCallback}\n */\nconst dropdownInitCallback = (element) => new Dropdown(element);\n\n// DROPDOWN PRIVATE GC\n// ===================\n// const dropdownMenuStartClass = `${dropdownMenuClass}-start`;\nconst dropdownMenuEndClass = `${dropdownMenuClass}-end`;\nconst verticalClass = [dropdownString, dropupString];\nconst horizontalClass = [dropstartString, dropendString];\nconst menuFocusTags = ['A', 'BUTTON'];\n\nconst dropdownDefaults = {\n offset: 5, // [number] 5(px)\n display: 'dynamic', // [dynamic|static]\n};\n\n// DROPDOWN CUSTOM EVENTS\n// ======================\nconst showDropdownEvent = OriginalEvent(`show.bs.${dropdownString}`);\nconst shownDropdownEvent = OriginalEvent(`shown.bs.${dropdownString}`);\nconst hideDropdownEvent = OriginalEvent(`hide.bs.${dropdownString}`);\nconst hiddenDropdownEvent = OriginalEvent(`hidden.bs.${dropdownString}`);\n\n// DROPDOWN PRIVATE METHODS\n// ========================\n/**\n * Apply specific style or class names to a `.dropdown-menu` to automatically\n * accomodate the layout and the page scroll.\n *\n * @param {Dropdown} self the `Dropdown` instance\n */\nfunction styleDropdown(self) {\n const {\n element, menu, parentElement, options,\n } = self;\n const { offset } = options;\n\n // don't apply any style on mobile view\n /* istanbul ignore next: this test requires a navbar */\n if (getElementStyle(menu, 'position') === 'static') return;\n\n const RTL = isRTL(element);\n // const menuStart = hasClass(menu, dropdownMenuStartClass);\n const menuEnd = hasClass(menu, dropdownMenuEndClass);\n\n // reset menu offset and position\n const resetProps = ['margin', 'top', 'bottom', 'left', 'right'];\n resetProps.forEach((p) => { menu.style[p] = ''; });\n\n // set initial position class\n // take into account .btn-group parent as .dropdown\n // this requires navbar/btn-group/input-group\n let positionClass = dropdownMenuClasses.find((c) => hasClass(parentElement, c))\n || /* istanbul ignore next: fallback position */ dropdownString;\n\n /** @type {Record>} */\n let dropdownMargin = {\n dropdown: [offset, 0, 0],\n dropup: [0, 0, offset],\n dropstart: RTL ? [-1, 0, 0, offset] : [-1, offset, 0],\n dropend: RTL ? [-1, offset, 0] : [-1, 0, 0, offset],\n };\n\n /** @type {Record>} */\n const dropdownPosition = {\n dropdown: { top: '100%' },\n dropup: { top: 'auto', bottom: '100%' },\n dropstart: RTL ? { left: '100%', right: 'auto' } : { left: 'auto', right: '100%' },\n dropend: RTL ? { left: 'auto', right: '100%' } : { left: '100%', right: 'auto' },\n menuStart: RTL ? { right: 0, left: 'auto' } : { right: 'auto', left: 0 },\n menuEnd: RTL ? { right: 'auto', left: 0 } : { right: 0, left: 'auto' },\n };\n\n const { offsetWidth: menuWidth, offsetHeight: menuHeight } = menu;\n\n const { clientWidth, clientHeight } = getDocumentElement(element);\n const {\n left: targetLeft, top: targetTop,\n width: targetWidth, height: targetHeight,\n } = getBoundingClientRect(element);\n\n // dropstart | dropend\n const leftFullExceed = targetLeft - menuWidth - offset < 0;\n // dropend\n const rightFullExceed = targetLeft + menuWidth + targetWidth + offset >= clientWidth;\n // dropstart | dropend\n const bottomExceed = targetTop + menuHeight + offset >= clientHeight;\n // dropdown\n const bottomFullExceed = targetTop + menuHeight + targetHeight + offset >= clientHeight;\n // dropup\n const topExceed = targetTop - menuHeight - offset < 0;\n // dropdown / dropup\n const leftExceed = ((!RTL && menuEnd) || (RTL && !menuEnd))\n && targetLeft + targetWidth - menuWidth < 0;\n const rightExceed = ((RTL && menuEnd) || (!RTL && !menuEnd))\n && targetLeft + menuWidth >= clientWidth;\n\n // recompute position\n // handle RTL as well\n if (horizontalClass.includes(positionClass) && leftFullExceed && rightFullExceed) {\n positionClass = dropdownString;\n }\n if (positionClass === dropstartString && (!RTL ? leftFullExceed : rightFullExceed)) {\n positionClass = dropendString;\n }\n if (positionClass === dropendString && (RTL ? leftFullExceed : rightFullExceed)) {\n positionClass = dropstartString;\n }\n if (positionClass === dropupString && topExceed && !bottomFullExceed) {\n positionClass = dropdownString;\n }\n if (positionClass === dropdownString && bottomFullExceed && !topExceed) {\n positionClass = dropupString;\n }\n\n // override position for horizontal classes\n if (horizontalClass.includes(positionClass) && bottomExceed) {\n ObjectAssign(dropdownPosition[positionClass], {\n top: 'auto', bottom: 0,\n });\n }\n\n // override position for vertical classes\n if (verticalClass.includes(positionClass) && (leftExceed || rightExceed)) {\n // don't realign when menu is wider than window\n // in both RTL and non-RTL readability is KING\n let posAjust;\n if (!leftExceed && rightExceed && !RTL) posAjust = { left: 'auto', right: 0 };\n if (leftExceed && !rightExceed && RTL) posAjust = { left: 0, right: 'auto' };\n if (posAjust) ObjectAssign(dropdownPosition[positionClass], posAjust);\n }\n\n dropdownMargin = dropdownMargin[positionClass];\n setElementStyle(menu, {\n ...dropdownPosition[positionClass],\n margin: `${dropdownMargin.map((x) => (x ? `${x}px` : x)).join(' ')}`,\n });\n\n // override dropdown-menu-start | dropdown-menu-end\n if (verticalClass.includes(positionClass) && menuEnd) {\n /* istanbul ignore else */\n if (menuEnd) {\n const endAdjust = (!RTL && leftExceed) || (RTL && rightExceed)\n ? 'menuStart' : /* istanbul ignore next */'menuEnd';\n setElementStyle(menu, dropdownPosition[endAdjust]);\n }\n }\n}\n\n/**\n * Returns an `Array` of focusable items in the given dropdown-menu.\n * @param {HTMLElement} menu\n * @returns {HTMLElement[]}\n */\nfunction getMenuItems(menu) {\n return [...menu.children].map((c) => {\n if (c && menuFocusTags.includes(c.tagName)) return c;\n const { firstElementChild } = c;\n if (firstElementChild && menuFocusTags.includes(firstElementChild.tagName)) {\n return firstElementChild;\n }\n return null;\n }).filter((c) => c);\n}\n\n/**\n * Toggles on/off the listeners for the events that close the dropdown\n * as well as event that request a new position for the dropdown.\n *\n * @param {Dropdown} self the `Dropdown` instance\n */\nfunction toggleDropdownDismiss(self) {\n const { element, options } = self;\n const action = self.open ? addListener : removeListener;\n const doc = getDocument(element);\n\n action(doc, mouseclickEvent, dropdownDismissHandler);\n action(doc, focusEvent, dropdownDismissHandler);\n action(doc, keydownEvent, dropdownPreventScroll);\n action(doc, keyupEvent, dropdownKeyHandler);\n\n /* istanbul ignore else */\n if (options.display === 'dynamic') {\n [scrollEvent, resizeEvent].forEach((ev) => {\n action(getWindow(element), ev, dropdownLayoutHandler, passiveHandler);\n });\n }\n}\n\n/**\n * Toggles on/off the `click` event listener of the `Dropdown`.\n *\n * @param {Dropdown} self the `Dropdown` instance\n * @param {boolean=} add when `true`, it will add the event listener\n */\nfunction toggleDropdownHandler(self, add) {\n const action = add ? addListener : removeListener;\n action(self.element, mouseclickEvent, dropdownClickHandler);\n}\n\n/**\n * Returns the currently open `.dropdown` element.\n *\n * @param {(Node | Window)=} element target\n * @returns {HTMLElement?} the query result\n */\nfunction getCurrentOpenDropdown(element) {\n const currentParent = [...dropdownMenuClasses, 'btn-group', 'input-group']\n .map((c) => getElementsByClassName(`${c} ${showClass}`, getDocument(element)))\n .find((x) => x.length);\n\n if (currentParent && currentParent.length) {\n return [...currentParent[0].children]\n .find((x) => hasAttribute(x, dataBsToggle));\n }\n return null;\n}\n\n// DROPDOWN EVENT HANDLERS\n// =======================\n/**\n * Handles the `click` event for the `Dropdown` instance.\n *\n * @param {MouseEvent} e event object\n * @this {Document}\n */\nfunction dropdownDismissHandler(e) {\n const { target, type } = e;\n\n /* istanbul ignore next: impossible to satisfy */\n if (!target || !target.closest) return; // some weird FF bug #409\n\n const element = getCurrentOpenDropdown(target);\n const self = getDropdownInstance(element);\n\n /* istanbul ignore next */\n if (!self) return;\n\n const { parentElement, menu } = self;\n\n const hasData = closest(target, dropdownSelector) !== null;\n const isForm = parentElement && parentElement.contains(target)\n && (target.tagName === 'form' || closest(target, 'form') !== null);\n\n if (type === mouseclickEvent && isEmptyAnchor(target)) {\n e.preventDefault();\n }\n if (type === focusEvent\n && (target === element || target === menu || menu.contains(target))) {\n return;\n }\n\n /* istanbul ignore else */\n if (isForm || hasData) ; else if (self) {\n self.hide();\n }\n}\n\n/**\n * Handles `click` event listener for `Dropdown`.\n * @this {HTMLElement}\n * @param {MouseEvent} e event object\n */\nfunction dropdownClickHandler(e) {\n const element = this;\n const { target } = e;\n const self = getDropdownInstance(element);\n\n /* istanbul ignore else */\n if (self) {\n self.toggle();\n /* istanbul ignore else */\n if (target && isEmptyAnchor(target)) e.preventDefault();\n }\n}\n\n/**\n * Prevents scroll when dropdown-menu is visible.\n * @param {KeyboardEvent} e event object\n */\nfunction dropdownPreventScroll(e) {\n /* istanbul ignore else */\n if ([keyArrowDown, keyArrowUp].includes(e.code)) e.preventDefault();\n}\n\n/**\n * Handles keyboard `keydown` events for `Dropdown`.\n * @param {KeyboardEvent} e keyboard key\n * @this {Document}\n */\nfunction dropdownKeyHandler(e) {\n const { code } = e;\n const element = getCurrentOpenDropdown(this);\n const self = element && getDropdownInstance(element);\n const { activeElement } = element && getDocument(element);\n /* istanbul ignore next: impossible to satisfy */\n if (!self || !activeElement) return;\n const { menu, open } = self;\n const menuItems = getMenuItems(menu);\n\n // arrow up & down\n if (menuItems && menuItems.length && [keyArrowDown, keyArrowUp].includes(code)) {\n let idx = menuItems.indexOf(activeElement);\n /* istanbul ignore else */\n if (activeElement === element) {\n idx = 0;\n } else if (code === keyArrowUp) {\n idx = idx > 1 ? idx - 1 : 0;\n } else if (code === keyArrowDown) {\n idx = idx < menuItems.length - 1 ? idx + 1 : idx;\n }\n /* istanbul ignore else */\n if (menuItems[idx]) focus(menuItems[idx]);\n }\n\n if (keyEscape === code && open) {\n self.toggle();\n focus(element);\n }\n}\n\n/**\n * @this {globalThis}\n * @returns {void}\n */\nfunction dropdownLayoutHandler() {\n const element = getCurrentOpenDropdown(this);\n const self = element && getDropdownInstance(element);\n\n /* istanbul ignore else */\n if (self && self.open) styleDropdown(self);\n}\n\n// DROPDOWN DEFINITION\n// ===================\n/** Returns a new Dropdown instance. */\nclass Dropdown extends BaseComponent {\n /**\n * @param {HTMLElement | string} target Element or string selector\n * @param {BSN.Options.Dropdown=} config the instance options\n */\n constructor(target, config) {\n super(target, config);\n // bind\n const self = this;\n\n // initialization element\n const { element } = self;\n const { parentElement } = element;\n\n // set targets\n /** @type {(Element | HTMLElement)} */\n self.parentElement = parentElement;\n /** @type {(Element | HTMLElement)} */\n self.menu = querySelector(`.${dropdownMenuClass}`, parentElement);\n\n // set initial state to closed\n /** @type {boolean} */\n self.open = false;\n\n // add event listener\n toggleDropdownHandler(self, true);\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() { return dropdownComponent; }\n /**\n * Returns component default options.\n */\n get defaults() { return dropdownDefaults; }\n /* eslint-enable */\n\n // DROPDOWN PUBLIC METHODS\n // =======================\n /** Shows/hides the dropdown menu to the user. */\n toggle() {\n const self = this;\n\n if (self.open) self.hide();\n else self.show();\n }\n\n /** Shows the dropdown menu to the user. */\n show() {\n const self = this;\n const {\n element, open, menu, parentElement,\n } = self;\n\n /* istanbul ignore next */\n if (open) return;\n\n const currentElement = getCurrentOpenDropdown(element);\n const currentInstance = currentElement && getDropdownInstance(currentElement);\n if (currentInstance) currentInstance.hide();\n\n // dispatch event\n [showDropdownEvent, shownDropdownEvent].forEach((e) => {\n e.relatedTarget = element;\n });\n dispatchEvent(parentElement, showDropdownEvent);\n if (showDropdownEvent.defaultPrevented) return;\n\n addClass(menu, showClass);\n addClass(parentElement, showClass);\n setAttribute(element, ariaExpanded, 'true');\n\n // change menu position\n styleDropdown(self);\n\n self.open = !open;\n\n focus(element); // focus the element\n toggleDropdownDismiss(self);\n dispatchEvent(parentElement, shownDropdownEvent);\n }\n\n /** Hides the dropdown menu from the user. */\n hide() {\n const self = this;\n const {\n element, open, menu, parentElement,\n } = self;\n\n /* istanbul ignore next */\n if (!open) return;\n\n [hideDropdownEvent, hiddenDropdownEvent].forEach((e) => {\n e.relatedTarget = element;\n });\n dispatchEvent(parentElement, hideDropdownEvent);\n if (hideDropdownEvent.defaultPrevented) return;\n\n removeClass(menu, showClass);\n removeClass(parentElement, showClass);\n setAttribute(element, ariaExpanded, 'false');\n\n self.open = !open;\n // only re-attach handler if the instance is not disposed\n toggleDropdownDismiss(self);\n dispatchEvent(parentElement, hiddenDropdownEvent);\n }\n\n /** Removes the `Dropdown` component from the target element. */\n dispose() {\n const self = this;\n if (self.open) self.hide();\n\n toggleDropdownHandler(self);\n\n super.dispose();\n }\n}\n\nObjectAssign(Dropdown, {\n selector: dropdownSelector,\n init: dropdownInitCallback,\n getInstance: getDropdownInstance,\n});\n\nexport { Dropdown as default };\n","/*!\n * Native JavaScript for Bootstrap - Collapse v4.2.0 (https://thednp.github.io/bootstrap.native/)\n * Copyright 2015-2022 © dnp_theme\n * Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)\n */\n/**\n * Shortcut for `HTMLElement.setAttribute()` method.\n * @param {HTMLElement} element target element\n * @param {string} attribute attribute name\n * @param {string} value attribute value\n * @returns {void}\n */\nconst setAttribute = (element, attribute, value) => element.setAttribute(attribute, value);\n\n/**\n * Checks if an object is a `Node`.\n *\n * @param {any} node the target object\n * @returns {boolean} the query result\n */\nconst isNode = (element) => (element && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n .some((x) => +element.nodeType === x)) || false;\n\n/**\n * Check if a target object is `Window`.\n * => equivalent to `object instanceof Window`\n *\n * @param {any} object the target object\n * @returns {boolean} the query result\n */\nconst isWindow = (object) => (object && object.constructor.name === 'Window') || false;\n\n/**\n * Checks if an object is a `Document`.\n * @see https://dom.spec.whatwg.org/#node\n *\n * @param {any} object the target object\n * @returns {boolean} the query result\n */\nconst isDocument = (object) => (object && object.nodeType === 9) || false;\n\n/**\n * Returns the `document` or the `#document` element.\n * @see https://github.com/floating-ui/floating-ui\n * @param {(Node | Window)=} node\n * @returns {Document}\n */\nfunction getDocument(node) {\n // node instanceof Document\n if (isDocument(node)) return node;\n // node instanceof Node\n if (isNode(node)) return node.ownerDocument;\n // node instanceof Window\n if (isWindow(node)) return node.document;\n // node is undefined | NULL\n return window.document;\n}\n\n/**\n * Shortcut for `HTMLElement.closest` method which also works\n * with children of `ShadowRoot`. The order of the parameters\n * is intentional since they're both required.\n *\n * @see https://stackoverflow.com/q/54520554/803358\n *\n * @param {HTMLElement} element Element to look into\n * @param {string} selector the selector name\n * @return {HTMLElement?} the query result\n */\nfunction closest(element, selector) {\n return element ? (element.closest(selector)\n // break out of `ShadowRoot`\n || closest(element.getRootNode().host, selector)) : null;\n}\n\n/**\n * Utility to check if target is typeof `HTMLElement`, `Element`, `Node`\n * or find one that matches a selector.\n *\n * @param {Node | string} selector the input selector or target element\n * @param {ParentNode=} parent optional node to look into\n * @return {HTMLElement?} the `HTMLElement` or `querySelector` result\n */\nfunction querySelector(selector, parent) {\n if (isNode(selector)) {\n return selector;\n }\n const lookUp = isNode(parent) ? parent : getDocument();\n\n return lookUp.querySelector(selector);\n}\n\n/**\n * A shortcut for `(document|Element).querySelectorAll`.\n *\n * @param {string} selector the input selector\n * @param {ParentNode=} parent optional node to look into\n * @return {NodeListOf} the query result\n */\nfunction querySelectorAll(selector, parent) {\n const lookUp = isNode(parent) ? parent : getDocument();\n return lookUp.querySelectorAll(selector);\n}\n\n/**\n * Add class to `HTMLElement.classList`.\n *\n * @param {HTMLElement} element target\n * @param {string} classNAME to add\n * @returns {void}\n */\nfunction addClass(element, classNAME) {\n element.classList.add(classNAME);\n}\n\n/**\n * Check class in `HTMLElement.classList`.\n *\n * @param {HTMLElement} element target\n * @param {string} classNAME to check\n * @returns {boolean}\n */\nfunction hasClass(element, classNAME) {\n return element.classList.contains(classNAME);\n}\n\n/**\n * Remove class from `HTMLElement.classList`.\n *\n * @param {HTMLElement} element target\n * @param {string} classNAME to remove\n * @returns {void}\n */\nfunction removeClass(element, classNAME) {\n element.classList.remove(classNAME);\n}\n\n/**\n * A global namespace for `click` event.\n * @type {string}\n */\nconst mouseclickEvent = 'click';\n\n/**\n * A global namespace for aria-expanded.\n * @type {string}\n */\nconst ariaExpanded = 'aria-expanded';\n\n/**\n * A global namespace for 'transitionend' string.\n * @type {string}\n */\nconst transitionEndEvent = 'transitionend';\n\n/**\n * A global namespace for 'transitionDelay' string.\n * @type {string}\n */\nconst transitionDelay = 'transitionDelay';\n\n/**\n * A global namespace for `transitionProperty` string for modern browsers.\n *\n * @type {string}\n */\nconst transitionProperty = 'transitionProperty';\n\n/**\n * Shortcut for `window.getComputedStyle(element).propertyName`\n * static method.\n *\n * * If `element` parameter is not an `HTMLElement`, `getComputedStyle`\n * throws a `ReferenceError`.\n *\n * @param {HTMLElement} element target\n * @param {string} property the css property\n * @return {string} the css property value\n */\nfunction getElementStyle(element, property) {\n const computedStyle = getComputedStyle(element);\n\n // must use camelcase strings,\n // or non-camelcase strings with `getPropertyValue`\n return property.includes('--')\n ? computedStyle.getPropertyValue(property)\n : computedStyle[property];\n}\n\n/**\n * Utility to get the computed `transitionDelay`\n * from Element in miliseconds.\n *\n * @param {HTMLElement} element target\n * @return {number} the value in miliseconds\n */\nfunction getElementTransitionDelay(element) {\n const propertyValue = getElementStyle(element, transitionProperty);\n const delayValue = getElementStyle(element, transitionDelay);\n const delayScale = delayValue.includes('ms') ? /* istanbul ignore next */1 : 1000;\n const duration = propertyValue && propertyValue !== 'none'\n ? parseFloat(delayValue) * delayScale : 0;\n\n return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;\n}\n\n/**\n * A global namespace for 'transitionDuration' string.\n * @type {string}\n */\nconst transitionDuration = 'transitionDuration';\n\n/**\n * Utility to get the computed `transitionDuration`\n * from Element in miliseconds.\n *\n * @param {HTMLElement} element target\n * @return {number} the value in miliseconds\n */\nfunction getElementTransitionDuration(element) {\n const propertyValue = getElementStyle(element, transitionProperty);\n const durationValue = getElementStyle(element, transitionDuration);\n const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;\n const duration = propertyValue && propertyValue !== 'none'\n ? parseFloat(durationValue) * durationScale : 0;\n\n return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;\n}\n\n/**\n * Shortcut for the `Element.dispatchEvent(Event)` method.\n *\n * @param {HTMLElement} element is the target\n * @param {Event} event is the `Event` object\n */\nconst dispatchEvent = (element, event) => element.dispatchEvent(event);\n\n/**\n * Utility to make sure callbacks are consistently\n * called when transition ends.\n *\n * @param {HTMLElement} element target\n * @param {EventListener} handler `transitionend` callback\n */\nfunction emulateTransitionEnd(element, handler) {\n let called = 0;\n const endEvent = new Event(transitionEndEvent);\n const duration = getElementTransitionDuration(element);\n const delay = getElementTransitionDelay(element);\n\n if (duration) {\n /**\n * Wrap the handler in on -> off callback\n * @type {EventListener} e Event object\n */\n const transitionEndWrapper = (e) => {\n /* istanbul ignore else */\n if (e.target === element) {\n handler.apply(element, [e]);\n element.removeEventListener(transitionEndEvent, transitionEndWrapper);\n called = 1;\n }\n };\n element.addEventListener(transitionEndEvent, transitionEndWrapper);\n setTimeout(() => {\n /* istanbul ignore next */\n if (!called) dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else {\n handler.apply(element, [endEvent]);\n }\n}\n\n/**\n * Utility to force re-paint of an `HTMLElement` target.\n *\n * @param {HTMLElement} element is the target\n * @return {number} the `Element.offsetHeight` value\n */\nconst reflow = (element) => element.offsetHeight;\n\n/**\n * Shortcut for `Object.assign()` static method.\n * @param {Record} obj a target object\n * @param {Record} source a source object\n */\nconst ObjectAssign = (obj, source) => Object.assign(obj, source);\n\n/**\n * Shortcut for `Object.entries()` static method.\n * @param {Record} obj a target object\n * @returns {[string, any][]}\n */\nconst ObjectEntries = (obj) => Object.entries(obj);\n\n/**\n * Shortcut for multiple uses of `HTMLElement.style.propertyName` method.\n * @param {HTMLElement} element target element\n * @param {Partial} styles attribute value\n */\nconst setElementStyle = (element, styles) => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (key.includes('--')) {\n element.style.setProperty(key, value);\n } else {\n const propObject = {}; propObject[key] = value;\n ObjectAssign(element.style, propObject);\n }\n });\n};\n\n/**\n * Checks if an element is an `HTMLElement`.\n * @see https://dom.spec.whatwg.org/#node\n *\n * @param {any} element the target object\n * @returns {boolean} the query result\n */\nconst isHTMLElement = (element) => (element && element.nodeType === 1) || false;\n\n/** @type {Map>>} */\nconst componentData = new Map();\n/**\n * An interface for web components background data.\n * @see https://github.com/thednp/bootstrap.native/blob/master/src/components/base-component.js\n */\nconst Data = {\n /**\n * Sets web components data.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n * @param {Record} instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n\n /* istanbul ignore else */\n if (!componentData.has(component)) {\n componentData.set(component, new Map());\n }\n\n const instanceMap = componentData.get(component);\n // not undefined, but defined right above\n instanceMap.set(element, instance);\n },\n\n /**\n * Returns all instances for specified component.\n * @param {string} component the component's name or a unique key\n * @returns {Map>?} all the component instances\n */\n getAllFor: (component) => {\n const instanceMap = componentData.get(component);\n\n return instanceMap || null;\n },\n\n /**\n * Returns the instance associated with the target.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n * @returns {Record?} the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const allForC = Data.getAllFor(component);\n const instance = element && allForC && allForC.get(element);\n\n return instance || null;\n },\n\n /**\n * Removes web components data.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = componentData.get(component);\n if (!instanceMap || !isHTMLElement(element)) return;\n\n instanceMap.delete(element);\n\n /* istanbul ignore else */\n if (instanceMap.size === 0) {\n componentData.delete(component);\n }\n },\n};\n\n/**\n * An alias for `Data.get()`.\n * @type {SHORTY.getInstance}\n */\nconst getInstance = (target, component) => Data.get(target, component);\n\n/** @type {Map} */\nconst TimeCache = new Map();\n/**\n * An interface for one or more `TimerHandler`s per `Element`.\n * @see https://github.com/thednp/navbar.js/\n */\nconst Timer = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n * @param {HTMLElement} element target element\n * @param {ReturnType} callback the callback\n * @param {number} delay the execution delay\n * @param {string=} key a unique key\n */\n set: (element, callback, delay, key) => {\n if (!isHTMLElement(element)) return;\n\n /* istanbul ignore else */\n if (key && key.length) {\n /* istanbul ignore else */\n if (!TimeCache.has(element)) {\n TimeCache.set(element, new Map());\n }\n const keyTimers = TimeCache.get(element);\n keyTimers.set(key, setTimeout(callback, delay));\n } else {\n TimeCache.set(element, setTimeout(callback, delay));\n }\n },\n\n /**\n * Returns the timer associated with the target.\n * @param {HTMLElement} element target element\n * @param {string=} key a unique\n * @returns {number?} the timer\n */\n get: (element, key) => {\n if (!isHTMLElement(element)) return null;\n const keyTimers = TimeCache.get(element);\n\n if (key && key.length && keyTimers && keyTimers.get) {\n return keyTimers.get(key) || /* istanbul ignore next */null;\n }\n return keyTimers || null;\n },\n\n /**\n * Clears the element's timer.\n * @param {HTMLElement} element target element\n * @param {string=} key a unique key\n */\n clear: (element, key) => {\n if (!isHTMLElement(element)) return;\n\n if (key && key.length) {\n const keyTimers = TimeCache.get(element);\n /* istanbul ignore else */\n if (keyTimers && keyTimers.get) {\n clearTimeout(keyTimers.get(key));\n keyTimers.delete(key);\n /* istanbul ignore else */\n if (keyTimers.size === 0) {\n TimeCache.delete(element);\n }\n }\n } else {\n clearTimeout(TimeCache.get(element));\n TimeCache.delete(element);\n }\n },\n};\n\n/**\n * Checks if an object is an `Object`.\n *\n * @param {any} obj the target object\n * @returns {boolean} the query result\n */\nconst isObject = (obj) => (typeof obj === 'object') || false;\n\n/**\n * Returns a namespaced `CustomEvent` specific to each component.\n * @param {string} EventType Event.type\n * @param {Record=} config Event.options | Event.properties\n * @returns {SHORTY.OriginalEvent} a new namespaced event\n */\nfunction OriginalEvent(EventType, config) {\n const OriginalCustomEvent = new CustomEvent(EventType, {\n cancelable: true, bubbles: true,\n });\n\n /* istanbul ignore else */\n if (isObject(config)) {\n ObjectAssign(OriginalCustomEvent, config);\n }\n return OriginalCustomEvent;\n}\n\n/** @type {Record} */\nconst EventRegistry = {};\n\n/**\n * The global event listener.\n *\n * @type {EventListener}\n * @this {EventTarget}\n */\nfunction globalListener(e) {\n const that = this;\n const { type } = e;\n\n [...EventRegistry[type]].forEach((elementsMap) => {\n const [element, listenersMap] = elementsMap;\n /* istanbul ignore else */\n if (element === that) {\n [...listenersMap].forEach((listenerMap) => {\n const [listener, options] = listenerMap;\n listener.apply(element, [e]);\n\n if (options && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n}\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n *\n * @type {Listener.ListenerAction}\n */\nconst addListener = (element, eventType, listener, options) => {\n // get element listeners first\n if (!EventRegistry[eventType]) {\n EventRegistry[eventType] = new Map();\n }\n const oneEventMap = EventRegistry[eventType];\n\n if (!oneEventMap.has(element)) {\n oneEventMap.set(element, new Map());\n }\n const oneElementMap = oneEventMap.get(element);\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener, options);\n\n // add listener last\n if (!size) {\n element.addEventListener(eventType, globalListener, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n * @type {Listener.ListenerAction}\n */\nconst removeListener = (element, eventType, listener, options) => {\n // get listener first\n const oneEventMap = EventRegistry[eventType];\n const oneElementMap = oneEventMap && oneEventMap.get(element);\n const savedOptions = oneElementMap && oneElementMap.get(listener);\n\n // also recover initial options\n const { options: eventOptions } = savedOptions !== undefined\n ? savedOptions\n : { options };\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener)) oneElementMap.delete(listener);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element);\n if (!oneEventMap || !oneEventMap.size) delete EventRegistry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n element.removeEventListener(eventType, globalListener, eventOptions);\n }\n};\n\n/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = 'data-bs-toggle';\n\n/**\n * Global namespace for most components `collapsing` class.\n * As used by `Collapse` / `Tab`.\n */\nconst collapsingClass = 'collapsing';\n\n/**\n * Global namespace for most components `show` class.\n */\nconst showClass = 'show';\n\n/** @type {string} */\nconst collapseString = 'collapse';\n\n/** @type {string} */\nconst collapseComponent = 'Collapse';\n\n/**\n * Shortcut for `HTMLElement.getAttribute()` method.\n * @param {HTMLElement} element target element\n * @param {string} attribute attribute name\n * @returns {string?} attribute value\n */\nconst getAttribute = (element, attribute) => element.getAttribute(attribute);\n\n/**\n * Global namespace for most components `target` option.\n */\nconst dataBsTarget = 'data-bs-target';\n\n/**\n * Global namespace for most components `parent` option.\n */\nconst dataBsParent = 'data-bs-parent';\n\n/**\n * Global namespace for most components `container` option.\n */\nconst dataBsContainer = 'data-bs-container';\n\n/**\n * Returns the `Element` that THIS one targets\n * via `data-bs-target`, `href`, `data-bs-parent` or `data-bs-container`.\n *\n * @param {HTMLElement} element the target element\n * @returns {HTMLElement?} the query result\n */\nfunction getTargetElement(element) {\n const targetAttr = [dataBsTarget, dataBsParent, dataBsContainer, 'href'];\n const doc = getDocument(element);\n\n return targetAttr.map((att) => {\n const attValue = getAttribute(element, att);\n if (attValue) {\n return att === dataBsParent ? closest(element, attValue) : querySelector(attValue, doc);\n }\n return null;\n }).filter((x) => x)[0];\n}\n\n/**\n * The raw value or a given component option.\n *\n * @typedef {string | HTMLElement | Function | number | boolean | null} niceValue\n */\n\n/**\n * Utility to normalize component options\n *\n * @param {any} value the input value\n * @return {niceValue} the normalized value\n */\nfunction normalizeValue(value) {\n if (['true', true].includes(value)) { // boolean\n // if ('true' === value) { // boolean\n return true;\n }\n\n if (['false', false].includes(value)) { // boolean\n // if ('false' === value) { // boolean\n return false;\n }\n\n if (value === '' || value === 'null') { // null\n return null;\n }\n\n if (value !== '' && !Number.isNaN(+value)) { // number\n return +value;\n }\n\n // string / function / HTMLElement / object\n return value;\n}\n\n/**\n * Shortcut for `Object.keys()` static method.\n * @param {Record} obj a target object\n * @returns {string[]}\n */\nconst ObjectKeys = (obj) => Object.keys(obj);\n\n/**\n * Shortcut for `String.toLowerCase()`.\n *\n * @param {string} source input string\n * @returns {string} lowercase output string\n */\nconst toLowerCase = (source) => source.toLowerCase();\n\n/**\n * Utility to normalize component options.\n *\n * @param {HTMLElement} element target\n * @param {Record} defaultOps component default options\n * @param {Record} inputOps component instance options\n * @param {string=} ns component namespace\n * @return {Record} normalized component options object\n */\nfunction normalizeOptions(element, defaultOps, inputOps, ns) {\n const data = { ...element.dataset };\n /** @type {Record} */\n const normalOps = {};\n /** @type {Record} */\n const dataOps = {};\n const title = 'title';\n\n ObjectKeys(data).forEach((k) => {\n const key = ns && k.includes(ns)\n ? k.replace(ns, '').replace(/[A-Z]/, (match) => toLowerCase(match))\n : k;\n\n dataOps[key] = normalizeValue(data[k]);\n });\n\n ObjectKeys(inputOps).forEach((k) => {\n inputOps[k] = normalizeValue(inputOps[k]);\n });\n\n ObjectKeys(defaultOps).forEach((k) => {\n /* istanbul ignore else */\n if (k in inputOps) {\n normalOps[k] = inputOps[k];\n } else if (k in dataOps) {\n normalOps[k] = dataOps[k];\n } else {\n normalOps[k] = k === title\n ? getAttribute(element, title)\n : defaultOps[k];\n }\n });\n\n return normalOps;\n}\n\nvar version = \"4.2.0\";\n\nconst Version = version;\n\n/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\n\n/** Returns a new `BaseComponent` instance. */\nclass BaseComponent {\n /**\n * @param {HTMLElement | string} target `Element` or selector string\n * @param {BSN.ComponentOptions=} config component instance options\n */\n constructor(target, config) {\n const self = this;\n const element = querySelector(target);\n\n if (!element) {\n throw Error(`${self.name} Error: \"${target}\" is not a valid selector.`);\n }\n\n /** @static @type {BSN.ComponentOptions} */\n self.options = {};\n\n const prevInstance = Data.get(element, self.name);\n if (prevInstance) prevInstance.dispose();\n\n /** @type {HTMLElement} */\n self.element = element;\n\n /* istanbul ignore else */\n if (self.defaults && ObjectKeys(self.defaults).length) {\n self.options = normalizeOptions(element, self.defaults, (config || {}), 'bs');\n }\n\n Data.set(element, self.name, self);\n }\n\n /* eslint-disable */\n /* istanbul ignore next */\n /** @static */\n get version() { return Version; }\n\n /* eslint-enable */\n /* istanbul ignore next */\n /** @static */\n get name() { return this.constructor.name; }\n\n /* istanbul ignore next */\n /** @static */\n get defaults() { return this.constructor.defaults; }\n\n /**\n * Removes component from target element;\n */\n dispose() {\n const self = this;\n Data.remove(self.element, self.name);\n ObjectKeys(self).forEach((prop) => { self[prop] = null; });\n }\n}\n\n/* Native JavaScript for Bootstrap 5 | Collapse\n----------------------------------------------- */\n\n// COLLAPSE GC\n// ===========\nconst collapseSelector = `.${collapseString}`;\nconst collapseToggleSelector = `[${dataBsToggle}=\"${collapseString}\"]`;\nconst collapseDefaults = { parent: null };\n\n/**\n * Static method which returns an existing `Collapse` instance associated\n * to a target `Element`.\n *\n * @type {BSN.GetInstance}\n */\nconst getCollapseInstance = (element) => getInstance(element, collapseComponent);\n\n/**\n * A `Collapse` initialization callback.\n * @type {BSN.InitCallback}\n */\nconst collapseInitCallback = (element) => new Collapse(element);\n\n// COLLAPSE CUSTOM EVENTS\n// ======================\nconst showCollapseEvent = OriginalEvent(`show.bs.${collapseString}`);\nconst shownCollapseEvent = OriginalEvent(`shown.bs.${collapseString}`);\nconst hideCollapseEvent = OriginalEvent(`hide.bs.${collapseString}`);\nconst hiddenCollapseEvent = OriginalEvent(`hidden.bs.${collapseString}`);\n\n// COLLAPSE PRIVATE METHODS\n// ========================\n/**\n * Expand the designated `Element`.\n * @param {Collapse} self the `Collapse` instance\n */\nfunction expandCollapse(self) {\n const {\n element, parent, triggers,\n } = self;\n\n dispatchEvent(element, showCollapseEvent);\n if (showCollapseEvent.defaultPrevented) return;\n\n Timer.set(element, () => {}, 17);\n if (parent) Timer.set(parent, () => {}, 17);\n\n addClass(element, collapsingClass);\n removeClass(element, collapseString);\n\n setElementStyle(element, { height: `${element.scrollHeight}px` });\n\n emulateTransitionEnd(element, () => {\n Timer.clear(element);\n if (parent) Timer.clear(parent);\n\n triggers.forEach((btn) => setAttribute(btn, ariaExpanded, 'true'));\n\n removeClass(element, collapsingClass);\n addClass(element, collapseString);\n addClass(element, showClass);\n\n setElementStyle(element, { height: '' });\n\n dispatchEvent(element, shownCollapseEvent);\n });\n}\n\n/**\n * Collapse the designated `Element`.\n * @param {Collapse} self the `Collapse` instance\n */\nfunction collapseContent(self) {\n const {\n element, parent, triggers,\n } = self;\n\n dispatchEvent(element, hideCollapseEvent);\n\n if (hideCollapseEvent.defaultPrevented) return;\n\n Timer.set(element, () => {}, 17);\n if (parent) Timer.set(parent, () => {}, 17);\n\n setElementStyle(element, { height: `${element.scrollHeight}px` });\n\n removeClass(element, collapseString);\n removeClass(element, showClass);\n addClass(element, collapsingClass);\n\n reflow(element);\n setElementStyle(element, { height: '0px' });\n\n emulateTransitionEnd(element, () => {\n Timer.clear(element);\n /* istanbul ignore else */\n if (parent) Timer.clear(parent);\n\n triggers.forEach((btn) => setAttribute(btn, ariaExpanded, 'false'));\n\n removeClass(element, collapsingClass);\n addClass(element, collapseString);\n\n setElementStyle(element, { height: '' });\n\n dispatchEvent(element, hiddenCollapseEvent);\n });\n}\n\n/**\n * Toggles on/off the event listener(s) of the `Collapse` instance.\n * @param {Collapse} self the `Collapse` instance\n * @param {boolean=} add when `true`, the event listener is added\n */\nfunction toggleCollapseHandler(self, add) {\n const action = add ? addListener : removeListener;\n const { triggers } = self;\n\n /* istanbul ignore else */\n if (triggers.length) {\n triggers.forEach((btn) => action(btn, mouseclickEvent, collapseClickHandler));\n }\n}\n\n// COLLAPSE EVENT HANDLER\n// ======================\n/**\n * Handles the `click` event for the `Collapse` instance.\n * @param {MouseEvent} e the `Event` object\n */\nfunction collapseClickHandler(e) {\n const { target } = e; // our target is `HTMLElement`\n const trigger = target && closest(target, collapseToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getCollapseInstance(element);\n /* istanbul ignore else */\n if (self) self.toggle();\n\n // event target is anchor link #398\n if (trigger && trigger.tagName === 'A') e.preventDefault();\n}\n\n// COLLAPSE DEFINITION\n// ===================\n\n/** Returns a new `Colapse` instance. */\nclass Collapse extends BaseComponent {\n /**\n * @param {HTMLElement | string} target and `Element` that matches the selector\n * @param {BSN.Options.Collapse=} config instance options\n */\n constructor(target, config) {\n super(target, config);\n // bind\n const self = this;\n\n // initialization element\n const { element, options } = self;\n const doc = getDocument(element);\n\n // set triggering elements\n /** @type {HTMLElement[]} */\n self.triggers = [...querySelectorAll(collapseToggleSelector, doc)]\n .filter((btn) => getTargetElement(btn) === element);\n\n // set parent accordion\n /** @type {HTMLElement?} */\n self.parent = querySelector(options.parent, doc)\n || getTargetElement(element) || null;\n\n // add event listeners\n toggleCollapseHandler(self, true);\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() { return collapseComponent; }\n /**\n * Returns component default options.\n */\n get defaults() { return collapseDefaults; }\n /* eslint-enable */\n\n // COLLAPSE PUBLIC METHODS\n // =======================\n /** Toggles the visibility of the collapse. */\n toggle() {\n const self = this;\n if (!hasClass(self.element, showClass)) self.show();\n else self.hide();\n }\n\n /** Hides the collapse. */\n hide() {\n const self = this;\n const { triggers, element } = self;\n if (Timer.get(element)) return;\n\n collapseContent(self);\n /* istanbul ignore else */\n if (triggers.length) {\n triggers.forEach((btn) => addClass(btn, `${collapseString}d`));\n }\n }\n\n /** Shows the collapse. */\n show() {\n const self = this;\n const {\n element, parent, triggers,\n } = self;\n let activeCollapse;\n let activeCollapseInstance;\n\n if (parent) {\n activeCollapse = [...querySelectorAll(`.${collapseString}.${showClass}`, parent)]\n .find((i) => getCollapseInstance(i));\n activeCollapseInstance = activeCollapse && getCollapseInstance(activeCollapse);\n }\n\n if ((!parent || !Timer.get(parent)) && !Timer.get(element)) {\n if (activeCollapseInstance && activeCollapse !== element) {\n collapseContent(activeCollapseInstance);\n activeCollapseInstance.triggers.forEach((btn) => {\n addClass(btn, `${collapseString}d`);\n });\n }\n\n expandCollapse(self);\n /* istanbul ignore else */\n if (triggers.length) {\n triggers.forEach((btn) => removeClass(btn, `${collapseString}d`));\n }\n }\n }\n\n /** Remove the `Collapse` component from the target `Element`. */\n dispose() {\n const self = this;\n toggleCollapseHandler(self);\n\n super.dispose();\n }\n}\n\nObjectAssign(Collapse, {\n selector: collapseSelector,\n init: collapseInitCallback,\n getInstance: getCollapseInstance,\n});\n\nexport { Collapse as default };\n","/*!\n * Native JavaScript for Bootstrap - Popover v4.2.0 (https://thednp.github.io/bootstrap.native/)\n * Copyright 2015-2022 © dnp_theme\n * Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)\n */\n/**\n * Shortcut for `Object.assign()` static method.\n * @param {Record} obj a target object\n * @param {Record} source a source object\n */\nconst ObjectAssign = (obj, source) => Object.assign(obj, source);\n\n/**\n * Utility to focus an `HTMLElement` target.\n *\n * @param {HTMLElement} element is the target\n */\nconst focus = (element) => element.focus();\n\n/**\n * Checks if an element is an `HTMLElement`.\n * @see https://dom.spec.whatwg.org/#node\n *\n * @param {any} element the target object\n * @returns {boolean} the query result\n */\nconst isHTMLElement = (element) => (element && element.nodeType === 1) || false;\n\n/** @type {Map>>} */\nconst componentData = new Map();\n/**\n * An interface for web components background data.\n * @see https://github.com/thednp/bootstrap.native/blob/master/src/components/base-component.js\n */\nconst Data = {\n /**\n * Sets web components data.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n * @param {Record} instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n\n /* istanbul ignore else */\n if (!componentData.has(component)) {\n componentData.set(component, new Map());\n }\n\n const instanceMap = componentData.get(component);\n // not undefined, but defined right above\n instanceMap.set(element, instance);\n },\n\n /**\n * Returns all instances for specified component.\n * @param {string} component the component's name or a unique key\n * @returns {Map>?} all the component instances\n */\n getAllFor: (component) => {\n const instanceMap = componentData.get(component);\n\n return instanceMap || null;\n },\n\n /**\n * Returns the instance associated with the target.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n * @returns {Record?} the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const allForC = Data.getAllFor(component);\n const instance = element && allForC && allForC.get(element);\n\n return instance || null;\n },\n\n /**\n * Removes web components data.\n * @param {HTMLElement} element target element\n * @param {string} component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = componentData.get(component);\n if (!instanceMap || !isHTMLElement(element)) return;\n\n instanceMap.delete(element);\n\n /* istanbul ignore else */\n if (instanceMap.size === 0) {\n componentData.delete(component);\n }\n },\n};\n\n/**\n * An alias for `Data.get()`.\n * @type {SHORTY.getInstance}\n */\nconst getInstance = (target, component) => Data.get(target, component);\n\n/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = 'data-bs-toggle';\n\n/** @type {string} */\nconst popoverString = 'popover';\n\n/** @type {string} */\nconst popoverComponent = 'Popover';\n\n/** @type {string} */\nconst tooltipString = 'tooltip';\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param {string} tipType the expected markup type\n * @returns {string} the template markup\n */\nfunction getTipTemplate(tipType) {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : '';\n const arrow = `
`;\n const body = `
`;\n return `
${header + arrow + body}
`;\n}\n\n/**\n * Checks if an element is an `` (or any type of SVG element),\n * `` or `