{ "version": 3, "sources": ["../../../node_modules/preline/src/utils/index.ts", "../../../node_modules/preline/src/plugins/base-plugin/index.ts", "../../../node_modules/preline/src/plugins/datatable/index.ts", "../../../node_modules/preline/src/plugins/file-upload/index.ts", "../../../node_modules/preline/src/plugins/range-slider/index.ts", "../../../node_modules/clipboard/dist/clipboard.js", "../../javascript/clipboard-helpers.js", "../../../node_modules/preline/src/plugins/copy-markup/index.ts", "../../../node_modules/preline/src/plugins/accordion/index.ts", "../../../node_modules/preline/src/plugins/carousel/index.ts", "../../../node_modules/preline/src/constants.ts", "../../../node_modules/preline/src/plugins/collapse/index.ts", "../../../node_modules/preline/src/plugins/combobox/index.ts", "../../../node_modules/preline/src/plugins/dropdown/index.ts", "../../../node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/preline/src/plugins/input-number/index.ts", "../../../node_modules/preline/src/plugins/layout-splitter/index.ts", "../../../node_modules/preline/src/plugins/overlay/index.ts", "../../../node_modules/preline/src/plugins/pin-input/index.ts", "../../../node_modules/preline/src/plugins/remove-element/index.ts", "../../../node_modules/preline/src/plugins/scrollspy/index.ts", "../../../node_modules/preline/src/plugins/select/index.ts", "../../../node_modules/preline/src/plugins/stepper/index.ts", "../../../node_modules/preline/src/plugins/strong-password/index.ts", "../../../node_modules/preline/src/plugins/tabs/index.ts", "../../../node_modules/preline/src/plugins/textarea-auto-height/index.ts", "../../../node_modules/preline/src/plugins/theme-switch/index.ts", "../../../node_modules/preline/src/plugins/toggle-count/index.ts", "../../../node_modules/preline/src/plugins/toggle-password/index.ts", "../../../node_modules/preline/src/plugins/tooltip/index.ts", "../../../node_modules/preline/src/plugins/tree-view/index.ts", "../../../node_modules/preline/src/static/index.ts", "../../../node_modules/preline/src/spa/index.ts", "../../../node_modules/preline/src/index.ts", "../../javascript/preline.js"], "sourcesContent": ["/*\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nconst stringToBoolean = (string: string): boolean => {\n\treturn string === 'true' ? true : false;\n};\n\nconst getClassProperty = (el: HTMLElement, prop: string, val = '') => {\n\treturn (window.getComputedStyle(el).getPropertyValue(prop) || val).replace(\n\t\t' ',\n\t\t'',\n\t);\n};\n\nconst getClassPropertyAlt = (\n\tel: HTMLElement,\n\tprop?: string,\n\tval: string = '',\n) => {\n\tlet targetClass = '';\n\n\tel.classList.forEach((c) => {\n\t\tif (c.includes(prop)) {\n\t\t\ttargetClass = c;\n\t\t}\n\t});\n\n\treturn targetClass.match(/:(.*)]/) ? targetClass.match(/:(.*)]/)[1] : val;\n};\n\nconst getZIndex = (el: HTMLElement) => {\n\tconst computedStyle = window.getComputedStyle(el);\n\tconst zIndex = computedStyle.getPropertyValue('z-index');\n\n\treturn zIndex;\n};\n\nfunction getHighestZIndex(arr: HTMLElement[]) {\n\tlet highestZIndex = Number.NEGATIVE_INFINITY;\n\n\tarr.forEach((el) => {\n\t\tlet zIndex: string | number = getZIndex(el);\n\n\t\tif (zIndex !== 'auto') {\n\t\t\tzIndex = parseInt(zIndex, 10);\n\n\t\t\tif (zIndex > highestZIndex) highestZIndex = zIndex;\n\t\t}\n\t});\n\n\treturn highestZIndex;\n}\n\nconst isIOS = () => {\n\tif (/iPad|iPhone|iPod/.test(navigator.platform)) {\n\t\treturn true;\n\t} else {\n\t\treturn (\n\t\t\tnavigator.maxTouchPoints &&\n\t\t\tnavigator.maxTouchPoints > 2 &&\n\t\t\t/MacIntel/.test(navigator.platform)\n\t\t);\n\t}\n};\n\nconst isIpadOS = () => {\n\treturn (\n\t\tnavigator.maxTouchPoints &&\n\t\tnavigator.maxTouchPoints > 2 &&\n\t\t/MacIntel/.test(navigator.platform)\n\t);\n};\n\nconst isDirectChild = (parent: Element, child: HTMLElement) => {\n\tconst children = parent.children;\n\n\tfor (let i = 0; i < children.length; i++) {\n\t\tif (children[i] === child) return true;\n\t}\n\n\treturn false;\n};\n\nconst isEnoughSpace = (\n\tel: HTMLElement,\n\ttoggle: HTMLElement,\n\tpreferredPosition: 'top' | 'bottom' | 'auto' = 'auto',\n\tspace = 10,\n\twrapper: HTMLElement | null = null,\n) => {\n\tconst referenceRect = toggle.getBoundingClientRect();\n\tconst wrapperRect = wrapper ? wrapper.getBoundingClientRect() : null;\n\tconst viewportHeight = window.innerHeight;\n\tconst spaceAbove = wrapperRect\n\t\t? referenceRect.top - wrapperRect.top\n\t\t: referenceRect.top;\n\tconst spaceBelow =\n\t\t(wrapper ? wrapperRect.bottom : viewportHeight) - referenceRect.bottom;\n\tconst minimumSpaceRequired = el.clientHeight + space;\n\n\tif (preferredPosition === 'bottom') {\n\t\treturn spaceBelow >= minimumSpaceRequired;\n\t} else if (preferredPosition === 'top') {\n\t\treturn spaceAbove >= minimumSpaceRequired;\n\t} else {\n\t\treturn (\n\t\t\tspaceAbove >= minimumSpaceRequired || spaceBelow >= minimumSpaceRequired\n\t\t);\n\t}\n};\n\nconst isFormElement = (target: HTMLElement) => {\n\treturn (\n\t\ttarget instanceof HTMLInputElement ||\n\t\ttarget instanceof HTMLTextAreaElement ||\n\t\ttarget instanceof HTMLSelectElement\n\t);\n};\n\nconst isParentOrElementHidden = (element: any): any => {\n\tif (!element) return false;\n\n\tconst computedStyle = window.getComputedStyle(element);\n\n\tif (computedStyle.display === 'none') return true;\n\n\treturn isParentOrElementHidden(element.parentElement);\n};\n\nconst isJson = (str: string) => {\n\tif (typeof str !== 'string') return false;\n\n\tconst firstChar = str.trim()[0];\n\tconst lastChar = str.trim().slice(-1);\n\n\tif ((firstChar === '{' && lastChar === '}') || (firstChar === '[' && lastChar === ']')) {\n\t\ttry {\n\t\t\tJSON.parse(str);\n\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn false;\n};\n\nconst debounce = (func: Function, timeout = 200) => {\n\tlet timer: any;\n\n\treturn (...args: any[]) => {\n\t\tclearTimeout(timer);\n\n\t\ttimer = setTimeout(() => {\n\t\t\tfunc.apply(this, args);\n\t\t}, timeout);\n\t};\n};\n\nconst dispatch = (evt: string, element: any, payload: any = null) => {\n\tconst event = new CustomEvent(evt, {\n\t\tdetail: { payload },\n\t\tbubbles: true,\n\t\tcancelable: true,\n\t\tcomposed: false,\n\t});\n\n\telement.dispatchEvent(event);\n};\n\nconst afterTransition = (el: HTMLElement, callback: Function) => {\n\tconst handleEvent = () => {\n\t\tcallback();\n\n\t\tel.removeEventListener('transitionend', handleEvent, true);\n\t};\n\n\tconst computedStyle = window.getComputedStyle(el);\n\tconst transitionDuration = computedStyle.getPropertyValue(\n\t\t'transition-duration',\n\t);\n\tconst transitionProperty = computedStyle.getPropertyValue(\n\t\t'transition-property',\n\t);\n\tconst hasTransition =\n\t\ttransitionProperty !== 'none' && parseFloat(transitionDuration) > 0;\n\n\tif (hasTransition) el.addEventListener('transitionend', handleEvent, true);\n\telse callback();\n};\n\nconst htmlToElement = (html: string): HTMLElement => {\n\tconst template = document.createElement('template');\n\thtml = html.trim();\n\ttemplate.innerHTML = html;\n\n\treturn template.content.firstChild as HTMLElement;\n};\n\nconst classToClassList = (\n\tclasses: string,\n\ttarget: HTMLElement,\n\tsplitter = ' ',\n\taction: 'add' | 'remove' = 'add',\n) => {\n\tconst classesToArray = classes.split(splitter);\n\tclassesToArray.forEach((cl) =>\n\t\taction === 'add' ? target.classList.add(cl) : target.classList.remove(cl),\n\t);\n};\n\nconst menuSearchHistory = {\n\thistoryIndex: -1,\n\n\taddHistory(index: number) {\n\t\tthis.historyIndex = index;\n\t},\n\n\texistsInHistory(index: number) {\n\t\treturn index > this.historyIndex;\n\t},\n\n\tclearHistory() {\n\t\tthis.historyIndex = -1;\n\t},\n};\n\nexport {\n\tstringToBoolean,\n\tgetClassProperty,\n\tgetClassPropertyAlt,\n\tgetZIndex,\n\tgetHighestZIndex,\n\tisIOS,\n\tisIpadOS,\n\tisEnoughSpace,\n\tisParentOrElementHidden,\n\tisFormElement,\n\tisDirectChild,\n\tisJson,\n\tdebounce,\n\tdispatch,\n\tafterTransition,\n\thtmlToElement,\n\tclassToClassList,\n\tmenuSearchHistory,\n};\n", "/// \n\n/*\n * HSBasePlugin\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { IBasePlugin } from '../base-plugin/interfaces';\n\nexport default class HSBasePlugin\n\timplements IBasePlugin\n{\n\tconstructor(\n\t\tpublic el: E,\n\t\tpublic options: O,\n\t\tpublic events?: any,\n\t) {\n\t\tthis.el = el;\n\t\tthis.options = options;\n\t\tthis.events = {};\n\t}\n\n\tpublic createCollection(collection: any[], element: any) {\n\t\tcollection.push({\n\t\t\tid: element?.el?.id || collection.length + 1,\n\t\t\telement,\n\t\t});\n\t}\n\n\tpublic fireEvent(evt: string, payload: any = null) {\n\t\tif (this.events.hasOwnProperty(evt)) return this.events[evt](payload);\n\t}\n\n\tpublic on(evt: string, cb: Function) {\n\t\tthis.events[evt] = cb;\n\t}\n}\n", "/*\n * HSDataTable\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { Api } from 'datatables.net';\n\nimport { debounce, htmlToElement, classToClassList } from '../../utils';\n\nimport { IDataTableOptions, IDataTable } from '../datatable/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\ndeclare var DataTable: any;\n\ninterface IColumnDef {\n\ttargets: number;\n\torderable: boolean;\n}\n\nclass HSDataTable\n\textends HSBasePlugin\n\timplements IDataTable {\n\tprivate concatOptions: IDataTableOptions;\n\n\tprivate dataTable: Api;\n\n\tprivate readonly table: HTMLTableElement;\n\n\tprivate searches: HTMLElement[] | null;\n\n\tprivate pageEntitiesList: (HTMLSelectElement | HTMLInputElement)[] | null;\n\n\tprivate pagingList: HTMLElement[] | null;\n\tprivate pagingPagesList: HTMLElement[] | null;\n\n\tprivate pagingPrevList: HTMLElement[] | null;\n\tprivate pagingNextList: HTMLElement[] | null;\n\n\tprivate readonly infoList: HTMLElement[] | null;\n\n\tprivate rowSelectingAll: HTMLElement | null;\n\tprivate rowSelectingIndividual: string | null;\n\n\tprivate maxPagesToShow: number;\n\tprivate isRowSelecting: boolean;\n\tprivate readonly pageBtnClasses: string | null;\n\n\tprivate onSearchInputListener: {\n\t\tel: Element;\n\t\tfn: (evt: InputEvent) => void;\n\t}[] | null;\n\tprivate onPageEntitiesChangeListener: {\n\t\tel: Element;\n\t\tfn: (evt: InputEvent) => void;\n\t}[] | null;\n\tprivate onSinglePagingClickListener: {\n\t\tel: Element;\n\t\tfn: () => void;\n\t}[] | null;\n\tprivate onPagingPrevClickListener: {\n\t\tel: Element;\n\t\tfn: () => void;\n\t}[] | null;\n\tprivate onPagingNextClickListener: {\n\t\tel: Element;\n\t\tfn: () => void;\n\t}[] | null;\n\tprivate onRowSelectingAllChangeListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: IDataTableOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.el = typeof el === 'string' ? document.querySelector(el) : el;\n\n\t\t// Exclude columns from ordering\n\t\tconst columnDefs: IColumnDef[] = [];\n\t\tArray.from(this.el.querySelectorAll('thead th, thead td')).forEach(\n\t\t\t(th: HTMLElement, ind: number) => {\n\t\t\t\tif (th.classList.contains('--exclude-from-ordering'))\n\t\t\t\t\tcolumnDefs.push({\n\t\t\t\t\t\ttargets: ind,\n\t\t\t\t\t\torderable: false,\n\t\t\t\t\t});\n\t\t\t},\n\t\t);\n\n\t\tconst data = this.el.getAttribute('data-hs-datatable');\n\t\tconst dataOptions: IDataTableOptions = data ? JSON.parse(data) : {};\n\n\t\tthis.concatOptions = {\n\t\t\tsearching: true,\n\t\t\tlengthChange: false,\n\t\t\torder: [],\n\t\t\tcolumnDefs: [...columnDefs],\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.table = this.el.querySelector('table');\n\n\t\tthis.searches = Array.from(this.el.querySelectorAll('[data-hs-datatable-search]')) ?? null;\n\n\t\tthis.pageEntitiesList = Array.from(this.el.querySelectorAll('[data-hs-datatable-page-entities]')) ?? null;\n\n\t\tthis.pagingList = Array.from(this.el.querySelectorAll('[data-hs-datatable-paging]')) ?? null;\n\t\tthis.pagingPagesList = Array.from(this.el.querySelectorAll('[data-hs-datatable-paging-pages]')) ?? null;\n\t\tthis.pagingPrevList = Array.from(this.el.querySelectorAll('[data-hs-datatable-paging-prev]')) ?? null;\n\t\tthis.pagingNextList = Array.from(this.el.querySelectorAll('[data-hs-datatable-paging-next]')) ?? null;\n\n\t\tthis.infoList = Array.from(this.el.querySelectorAll('[data-hs-datatable-info]')) ?? null;\n\n\t\tif (this.concatOptions?.rowSelectingOptions)\n\t\t\tthis.rowSelectingAll =\n\t\t\t\t(this.concatOptions?.rowSelectingOptions?.selectAllSelector\n\t\t\t\t\t? document.querySelector(\n\t\t\t\t\t\tthis.concatOptions?.rowSelectingOptions?.selectAllSelector,\n\t\t\t\t\t)\n\t\t\t\t\t: document.querySelector('[data-hs-datatable-row-selecting-all]')) ??\n\t\t\t\tnull;\n\t\tif (this.concatOptions?.rowSelectingOptions)\n\t\t\tthis.rowSelectingIndividual =\n\t\t\t\tthis.concatOptions?.rowSelectingOptions?.individualSelector ??\n\t\t\t\t'[data-hs-datatable-row-selecting-individual]' ??\n\t\t\t\tnull;\n\n\t\tif (this.pageEntitiesList.length) this.concatOptions.pageLength = parseInt(this.pageEntitiesList[0].value);\n\n\t\tthis.maxPagesToShow = 3;\n\t\tthis.isRowSelecting = !!this.concatOptions?.rowSelectingOptions;\n\t\tthis.pageBtnClasses = this.concatOptions?.pagingOptions?.pageBtnClasses ?? null;\n\n\t\tthis.onSearchInputListener = [];\n\t\tthis.onPageEntitiesChangeListener = [];\n\t\tthis.onSinglePagingClickListener = [];\n\t\tthis.onPagingPrevClickListener = [];\n\t\tthis.onPagingNextClickListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsDataTableCollection, this);\n\n\t\tthis.initTable();\n\n\t\tif (this.searches.length) this.initSearch();\n\n\t\tif (this.pageEntitiesList.length) this.initPageEntities();\n\n\t\tif (this.pagingList.length) this.initPaging();\n\t\tif (this.pagingPagesList.length) this.buildPagingPages();\n\t\tif (this.pagingPrevList.length) this.initPagingPrev();\n\t\tif (this.pagingNextList.length) this.initPagingNext();\n\n\t\tif (this.infoList.length) this.initInfo();\n\n\t\tif (this.isRowSelecting) this.initRowSelecting();\n\t}\n\n\tprivate initTable() {\n\t\tthis.dataTable = new DataTable(this.table, this.concatOptions);\n\n\t\tif (this.isRowSelecting) this.triggerChangeEventToRow();\n\n\t\tthis.dataTable.on('draw', () => {\n\t\t\tif (this.isRowSelecting) this.updateSelectAllCheckbox();\n\t\t\tif (this.isRowSelecting) this.triggerChangeEventToRow();\n\t\t\tthis.updateInfo();\n\t\t\tthis.pagingPagesList.forEach((el) => this.updatePaging(el));\n\t\t});\n\t}\n\n\tprivate searchInput(evt: InputEvent) {\n\t\tthis.onSearchInput((evt.target as HTMLInputElement).value);\n\t}\n\n\tprivate pageEntitiesChange(evt: Event) {\n\t\tthis.onEntitiesChange(parseInt((evt.target as HTMLSelectElement).value), evt.target as HTMLSelectElement);\n\t}\n\n\tprivate pagingPrevClick() {\n\t\tthis.onPrevClick();\n\t}\n\n\tprivate pagingNextClick() {\n\t\tthis.onNextClick();\n\t}\n\n\tprivate rowSelectingAllChange() {\n\t\tthis.onSelectAllChange();\n\t}\n\n\tprivate singlePagingClick(count: number) {\n\t\tthis.onPageClick(count);\n\t}\n\n\t// Search\n\tprivate initSearch() {\n\t\tthis.searches.forEach((el) => {\n\t\t\tthis.onSearchInputListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: debounce((evt: InputEvent) => this.searchInput(evt)),\n\t\t\t});\n\n\t\t\tel.addEventListener('input', this.onSearchInputListener.find((search) => search.el === el).fn);\n\t\t});\n\t}\n\n\tprivate onSearchInput(val: string) {\n\t\tthis.dataTable.search(val).draw();\n\t}\n\n\t// Page entities\n\tprivate initPageEntities() {\n\t\tthis.pageEntitiesList.forEach((el) => {\n\t\t\tthis.onPageEntitiesChangeListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: (evt) => this.pageEntitiesChange(evt),\n\t\t\t});\n\n\t\t\tel.addEventListener('change', this.onPageEntitiesChangeListener.find((pageEntity) => pageEntity.el === el).fn);\n\t\t});\n\t}\n\n\tprivate onEntitiesChange(entities: number, target: HTMLSelectElement) {\n\t\tconst otherEntities = this.pageEntitiesList.filter((el) => el !== target);\n\n\t\tif (otherEntities.length) otherEntities.forEach((el) => {\n\t\t\tif (window.HSSelect) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tconst hsSelectInstance = window.HSSelect.getInstance(el, true);\n\t\t\t\tif (hsSelectInstance) hsSelectInstance.element.setValue(`${entities}`);\n\t\t\t} else el.value = `${entities}`;\n\t\t});\n\n\t\tthis.dataTable.page.len(entities).draw();\n\t}\n\n\t// Info\n\tprivate initInfo() {\n\t\tthis.infoList.forEach((el) => {\n\t\t\tthis.initInfoFrom(el);\n\t\t\tthis.initInfoTo(el);\n\t\t\tthis.initInfoLength(el);\n\t\t});\n\t}\n\n\tprivate initInfoFrom(el: HTMLElement) {\n\t\tconst infoFrom = el.querySelector('[data-hs-datatable-info-from]') as HTMLElement ?? null;\n\t\tconst { start } = this.dataTable.page.info();\n\n\t\tif (infoFrom) infoFrom.innerText = `${start + 1}`;\n\t}\n\n\tprivate initInfoTo(el: HTMLElement) {\n\t\tconst infoTo = el.querySelector('[data-hs-datatable-info-to]') as HTMLElement ?? null;\n\t\tconst { end } = this.dataTable.page.info();\n\n\t\tif (infoTo) infoTo.innerText = `${end}`;\n\t}\n\n\tprivate initInfoLength(el: HTMLElement) {\n\t\tconst infoLength = el.querySelector('[data-hs-datatable-info-length]') as HTMLElement ?? null;\n\t\tconst { recordsTotal } = this.dataTable.page.info();\n\n\t\tif (infoLength) infoLength.innerText = `${recordsTotal}`;\n\t}\n\n\tprivate updateInfo() {\n\t\tthis.initInfo();\n\t}\n\n\t// Paging\n\tprivate initPaging() {\n\t\tthis.pagingList.forEach((el) => this.hidePagingIfSinglePage(el));\n\t}\n\n\tprivate hidePagingIfSinglePage(el: HTMLElement) {\n\t\tconst { pages } = this.dataTable.page.info();\n\n\t\tif (pages < 2) {\n\t\t\tel.classList.add('hidden');\n\t\t\tel.style.display = 'none';\n\t\t} else {\n\t\t\tel.classList.remove('hidden');\n\t\t\tel.style.display = '';\n\t\t}\n\t}\n\n\tprivate initPagingPrev() {\n\t\tthis.pagingPrevList.forEach((el) => {\n\t\t\tthis.onPagingPrevClickListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: () => this.pagingPrevClick(),\n\t\t\t});\n\n\t\t\tel.addEventListener('click', this.onPagingPrevClickListener.find((pagingPrev) => pagingPrev.el === el).fn);\n\t\t});\n\t}\n\n\tprivate onPrevClick() {\n\t\tthis.dataTable.page('previous').draw('page');\n\t}\n\n\tprivate disablePagingArrow(el: HTMLElement, statement: boolean) {\n\t\tif (statement) {\n\t\t\tel.classList.add('disabled');\n\t\t\tel.setAttribute('disabled', 'disabled');\n\t\t} else {\n\t\t\tel.classList.remove('disabled');\n\t\t\tel.removeAttribute('disabled');\n\t\t}\n\t}\n\n\tprivate initPagingNext() {\n\t\tthis.pagingNextList.forEach((el) => {\n\t\t\tthis.onPagingNextClickListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: () => this.pagingNextClick(),\n\t\t\t});\n\n\t\t\tel.addEventListener('click', this.onPagingNextClickListener.find((pagingNext) => pagingNext.el === el).fn);\n\t\t});\n\t}\n\n\tprivate onNextClick() {\n\t\tthis.dataTable.page('next').draw('page');\n\t}\n\n\tprivate buildPagingPages() {\n\t\tthis.pagingPagesList.forEach((el) => this.updatePaging(el));\n\t}\n\n\tprivate updatePaging(pagingPages: HTMLElement) {\n\t\tconst { page, pages, length } = this.dataTable.page.info();\n\t\tconst totalRecords = this.dataTable.rows({ search: 'applied' }).count();\n\t\tconst totalPages = Math.ceil(totalRecords / length);\n\t\tconst currentPage = page + 1;\n\n\t\tlet startPage = Math.max(1, currentPage - Math.floor(this.maxPagesToShow / 2));\n\t\tlet endPage = Math.min(totalPages, startPage + (this.maxPagesToShow - 1));\n\n\t\tif (endPage - startPage + 1 < this.maxPagesToShow) {\n\t\t\tstartPage = Math.max(1, endPage - this.maxPagesToShow + 1);\n\t\t}\n\n\t\tpagingPages.innerHTML = '';\n\n\t\tif (startPage > 1) {\n\t\t\tthis.buildPagingPage(1, pagingPages);\n\n\t\t\tif (startPage > 2) pagingPages.appendChild(htmlToElement(`...`));\n\t\t}\n\n\t\tfor (let i = startPage; i <= endPage; i++) {\n\t\t\tthis.buildPagingPage(i, pagingPages);\n\t\t}\n\n\t\tif (endPage < totalPages) {\n\t\t\tif (endPage < totalPages - 1) pagingPages.appendChild(htmlToElement(`...`));\n\n\t\t\tthis.buildPagingPage(totalPages, pagingPages);\n\t\t}\n\n\t\tthis.pagingPrevList.forEach((el) => this.disablePagingArrow(el, page === 0));\n\t\tthis.pagingNextList.forEach((el) => this.disablePagingArrow(el, page === pages - 1));\n\n\t\tthis.pagingList.forEach((el) => this.hidePagingIfSinglePage(el));\n\t}\n\n\tprivate buildPagingPage(counter: number, target: HTMLElement) {\n\t\tconst { page } = this.dataTable.page.info();\n\t\tconst pageEl = htmlToElement(``);\n\t\tpageEl.innerText = `${counter}`;\n\t\tpageEl.setAttribute('data-page', `${counter}`);\n\t\tif (this.pageBtnClasses) classToClassList(this.pageBtnClasses, pageEl);\n\t\tif (page === counter - 1) pageEl.classList.add('active');\n\n\t\tthis.onSinglePagingClickListener.push({\n\t\t\tel: pageEl,\n\t\t\tfn: () => this.singlePagingClick(counter),\n\t\t});\n\n\t\tpageEl.addEventListener('click', this.onSinglePagingClickListener.find((singlePaging) => singlePaging.el === pageEl).fn);\n\n\t\ttarget.append(pageEl);\n\t}\n\n\tprivate onPageClick(counter: number) {\n\t\tthis.dataTable.page(counter - 1).draw('page');\n\t}\n\n\t// Select row\n\tprivate initRowSelecting() {\n\t\tthis.onRowSelectingAllChangeListener = () => this.rowSelectingAllChange();\n\n\t\tthis.rowSelectingAll.addEventListener(\n\t\t\t'change',\n\t\t\tthis.onRowSelectingAllChangeListener,\n\t\t);\n\t}\n\n\tprivate triggerChangeEventToRow() {\n\t\tthis.table\n\t\t\t.querySelectorAll(`tbody ${this.rowSelectingIndividual}`)\n\t\t\t.forEach((el) => {\n\t\t\t\tel.addEventListener('change', () => {\n\t\t\t\t\tthis.updateSelectAllCheckbox();\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\tprivate onSelectAllChange() {\n\t\tlet isChecked = (this.rowSelectingAll as HTMLInputElement).checked;\n\t\tconst visibleRows = Array.from(\n\t\t\tthis.dataTable.rows({ page: 'current', search: 'applied' }).nodes(),\n\t\t);\n\n\t\tvisibleRows.forEach((el) => {\n\t\t\tconst checkbox = el.querySelector(this.rowSelectingIndividual);\n\n\t\t\tif (checkbox) checkbox.checked = isChecked;\n\t\t});\n\n\t\tthis.updateSelectAllCheckbox();\n\t}\n\n\tprivate updateSelectAllCheckbox() {\n\t\tconst searchRelatedItems = this.dataTable\n\t\t\t.rows({ search: 'applied' })\n\t\t\t.count();\n\n\t\tif (!searchRelatedItems) {\n\t\t\t(this.rowSelectingAll as HTMLInputElement).checked = false;\n\n\t\t\treturn false;\n\t\t}\n\n\t\tlet isChecked = true;\n\t\tconst visibleRows = Array.from(\n\t\t\tthis.dataTable\n\t\t\t\t.rows({\n\t\t\t\t\tpage: 'current',\n\t\t\t\t\tsearch: 'applied',\n\t\t\t\t})\n\t\t\t\t.nodes(),\n\t\t);\n\n\t\tvisibleRows.forEach((el) => {\n\t\t\tconst checkbox = el.querySelector(this.rowSelectingIndividual);\n\n\t\t\tif (checkbox && !checkbox.checked) {\n\t\t\t\tisChecked = false;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\t(this.rowSelectingAll as HTMLInputElement).checked = isChecked;\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\tif (this.searches) {\n\t\t\tthis.onSearchInputListener.forEach(({ el, fn }) => el.removeEventListener('click', fn));\n\n\t\t\t// this.searches = null;\n\t\t}\n\t\tif (this.pageEntitiesList) this.onPageEntitiesChangeListener.forEach(({ el, fn }) => el.removeEventListener('change', fn));\n\t\tif (this.pagingPagesList.length) {\n\t\t\tthis.onSinglePagingClickListener.forEach(({ el, fn }) => el.removeEventListener('click', fn));\n\n\t\t\tthis.pagingPagesList.forEach((el) => el.innerHTML = '');\n\t\t}\n\t\tif (this.pagingPrevList.length) this.onPagingPrevClickListener.forEach(({ el, fn }) => el.removeEventListener('click', fn));\n\t\tif (this.pagingNextList.length) this.onPagingNextClickListener.forEach(({ el, fn }) => el.removeEventListener('click', fn));\n\t\tif (this.rowSelectingAll)\n\t\t\tthis.rowSelectingAll.removeEventListener(\n\t\t\t\t'change',\n\t\t\t\tthis.onRowSelectingAllChangeListener,\n\t\t\t);\n\n\t\tthis.dataTable.destroy();\n\n\t\tthis.rowSelectingAll = null;\n\t\tthis.rowSelectingIndividual = null;\n\n\t\twindow.$hsDataTableCollection = window.$hsDataTableCollection.filter(({ element }) => element.el !== this.el);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsDataTableCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsDataTableCollection) window.$hsDataTableCollection = [];\n\n\t\tif (window.$hsDataTableCollection)\n\t\t\twindow.$hsDataTableCollection = window.$hsDataTableCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-datatable]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsDataTableCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSDataTable(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSDataTable: Function;\n\t\t$hsDataTableCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tif (\n\t\tdocument.querySelectorAll(\n\t\t\t'[data-hs-datatable]:not(.--prevent-on-load-init)',\n\t\t).length\n\t) {\n\t\tif (typeof jQuery === 'undefined')\n\t\t\tconsole.error(\n\t\t\t\t'HSDataTable: jQuery is not available, please add it to the page.',\n\t\t\t);\n\t\tif (typeof DataTable === 'undefined')\n\t\t\tconsole.error(\n\t\t\t\t'HSDataTable: DataTable is not available, please add it to the page.',\n\t\t\t);\n\t}\n\n\tif (typeof DataTable !== 'undefined' && typeof jQuery !== 'undefined')\n\t\tHSDataTable.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Datatable collection:', window.$hsDataTableCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSDataTable = HSDataTable;\n}\n\nexport default HSDataTable;\n", "/*\n * HSFileUpload\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { DropzoneFile } from 'dropzone';\n\nimport { htmlToElement, classToClassList } from '../../utils';\n\nimport { IFileUploadOptions, IFileUpload } from '../file-upload/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\ndeclare var _: any;\ndeclare var Dropzone: any;\n\nif (typeof Dropzone !== 'undefined') Dropzone.autoDiscover = false;\n\nclass HSFileUpload\n\textends HSBasePlugin\n\timplements IFileUpload\n{\n\tprivate concatOptions: IFileUploadOptions;\n\tprivate previewTemplate: string;\n\tprivate extensions: any = {};\n\tprivate singleton: boolean;\n\n\tpublic dropzone: Dropzone | null;\n\n\tprivate onReloadButtonClickListener:\n\t\t| {\n\t\t\t\tel: Element;\n\t\t\t\tfn: (evt: MouseEvent) => void;\n\t\t }[]\n\t\t| null;\n\tprivate onTempFileInputChangeListener:\n\t\t| {\n\t\t\t\tel: HTMLElement;\n\t\t\t\tfn: (event: Event) => void;\n\t\t }[]\n\t\t| null;\n\n\tconstructor(el: HTMLElement, options?: IFileUploadOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.el = typeof el === 'string' ? document.querySelector(el) : el;\n\n\t\tconst data = this.el.getAttribute('data-hs-file-upload');\n\t\tconst dataOptions: IFileUploadOptions = data ? JSON.parse(data) : {};\n\n\t\tthis.previewTemplate =\n\t\t\tthis.el.querySelector('[data-hs-file-upload-preview]')?.innerHTML ||\n\t\t\t`\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t0%\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t`;\n\t\tthis.extensions = _.merge(\n\t\t\t{\n\t\t\t\tdefault: {\n\t\t\t\t\ticon: '',\n\t\t\t\t\tclass: 'size-5',\n\t\t\t\t},\n\t\t\t\txls: {\n\t\t\t\t\ticon: '',\n\t\t\t\t\tclass: 'size-5',\n\t\t\t\t},\n\t\t\t\tdoc: {\n\t\t\t\t\ticon: '',\n\t\t\t\t\tclass: 'size-5',\n\t\t\t\t},\n\t\t\t\tzip: {\n\t\t\t\t\ticon: '',\n\t\t\t\t\tclass: 'size-5',\n\t\t\t\t},\n\t\t\t},\n\t\t\tdataOptions.extensions,\n\t\t);\n\t\tthis.singleton = dataOptions.singleton;\n\n\t\tthis.concatOptions = {\n\t\t\tclickable: this.el.querySelector(\n\t\t\t\t'[data-hs-file-upload-trigger]',\n\t\t\t) as HTMLElement,\n\t\t\tpreviewsContainer: this.el.querySelector(\n\t\t\t\t'[data-hs-file-upload-previews]',\n\t\t\t) as HTMLElement,\n\t\t\taddRemoveLinks: false,\n\t\t\tpreviewTemplate: this.previewTemplate,\n\t\t\tautoHideTrigger: false,\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.onReloadButtonClickListener = [];\n\t\tthis.onTempFileInputChangeListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate tempFileInputChange(event: Event, file: DropzoneFile) {\n\t\tconst input = event.target as HTMLInputElement;\n\t\tconst newFile = input.files?.[0];\n\n\t\tif (newFile) {\n\t\t\tconst dzNewFile = newFile as Dropzone.DropzoneFile;\n\t\t\tdzNewFile.status = Dropzone.ADDED;\n\t\t\tdzNewFile.accepted = true;\n\t\t\tdzNewFile.previewElement = file.previewElement;\n\t\t\tdzNewFile.previewTemplate = file.previewTemplate;\n\t\t\tdzNewFile.previewsContainer = file.previewsContainer;\n\n\t\t\tthis.dropzone.removeFile(file);\n\t\t\tthis.dropzone.addFile(dzNewFile);\n\t\t}\n\t}\n\n\tprivate reloadButtonClick(evt: MouseEvent, file: DropzoneFile) {\n\t\tevt.preventDefault();\n\t\tevt.stopPropagation();\n\n\t\tconst tempFileInput = document.createElement('input');\n\t\ttempFileInput.type = 'file';\n\n\t\tthis.onTempFileInputChangeListener.push({\n\t\t\tel: tempFileInput,\n\t\t\tfn: (event: Event) => this.tempFileInputChange(event, file),\n\t\t});\n\n\t\ttempFileInput.click();\n\n\t\ttempFileInput.addEventListener(\n\t\t\t'change',\n\t\t\tthis.onTempFileInputChangeListener.find((el) => el.el === tempFileInput)\n\t\t\t\t.fn,\n\t\t);\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsFileUploadCollection, this);\n\n\t\tthis.initDropzone();\n\t}\n\n\tprivate initDropzone() {\n\t\tconst clear = this.el.querySelector(\n\t\t\t'[data-hs-file-upload-clear]',\n\t\t) as HTMLButtonElement;\n\t\tconst pseudoTriggers = Array.from(\n\t\t\tthis.el.querySelectorAll('[data-hs-file-upload-pseudo-trigger]'),\n\t\t) as HTMLButtonElement[];\n\t\tthis.dropzone = new Dropzone(this.el, this.concatOptions);\n\n\t\tthis.dropzone.on('addedfile', (file: DropzoneFile) => this.onAddFile(file));\n\t\tthis.dropzone.on('removedfile', () => this.onRemoveFile());\n\t\tthis.dropzone.on('uploadprogress', (file: DropzoneFile, progress: number) =>\n\t\t\tthis.onUploadProgress(file, progress),\n\t\t);\n\t\tthis.dropzone.on('complete', (file: DropzoneFile) => this.onComplete(file));\n\n\t\tif (clear)\n\t\t\tclear.onclick = () => {\n\t\t\t\tif (this.dropzone.files.length) this.dropzone.removeAllFiles(true);\n\t\t\t};\n\n\t\tif (pseudoTriggers.length)\n\t\t\tpseudoTriggers.forEach((el) => {\n\t\t\t\tel.onclick = () => {\n\t\t\t\t\tif (this.concatOptions?.clickable)\n\t\t\t\t\t\t(this.concatOptions?.clickable as HTMLButtonElement).click();\n\t\t\t\t};\n\t\t\t});\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\tthis.onTempFileInputChangeListener.forEach((el) => {\n\t\t\tel.el.removeEventListener('change', el.fn);\n\t\t});\n\t\tthis.onTempFileInputChangeListener = null;\n\t\tthis.onReloadButtonClickListener.forEach((el) => {\n\t\t\tel.el.removeEventListener('click', el.fn);\n\t\t});\n\t\tthis.onReloadButtonClickListener = null;\n\n\t\tthis.dropzone.destroy();\n\n\t\twindow.$hsFileUploadCollection = window.$hsFileUploadCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\tprivate onAddFile(file: DropzoneFile) {\n\t\tconst { previewElement } = file;\n\t\tconst reloadButton = file.previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-reload]',\n\t\t);\n\n\t\tif (!previewElement) return false;\n\n\t\tif (this.singleton && this.dropzone.files.length > 1)\n\t\t\tthis.dropzone.removeFile(this.dropzone.files[0]);\n\n\t\tif (reloadButton) {\n\t\t\tthis.onReloadButtonClickListener.push({\n\t\t\t\tel: reloadButton,\n\t\t\t\tfn: (evt) => this.reloadButtonClick(evt, file),\n\t\t\t});\n\n\t\t\treloadButton.addEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onReloadButtonClickListener.find((el) => el.el === reloadButton)\n\t\t\t\t\t.fn,\n\t\t\t);\n\t\t}\n\n\t\tthis.previewAccepted(file);\n\t}\n\n\tprivate previewAccepted(file: DropzoneFile) {\n\t\tconst { previewElement } = file;\n\t\tconst fileInfo = this.splitFileName(file.name);\n\n\t\tconst fileName = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-file-name]',\n\t\t);\n\t\tconst fileExt = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-file-ext]',\n\t\t);\n\t\tconst fileSize = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-file-size]',\n\t\t);\n\t\tconst fileIcon = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-file-icon]',\n\t\t) as HTMLElement;\n\t\tconst trigger = this.el.querySelector(\n\t\t\t'[data-hs-file-upload-trigger]',\n\t\t) as HTMLElement;\n\t\tconst preview = previewElement.querySelector(\n\t\t\t'[data-dz-thumbnail]',\n\t\t) as HTMLElement;\n\t\tconst remove = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-remove]',\n\t\t) as HTMLButtonElement;\n\n\t\tif (fileName) fileName.textContent = fileInfo.name;\n\t\tif (fileExt) fileExt.textContent = fileInfo.extension;\n\t\tif (fileSize) fileSize.textContent = this.formatFileSize(file.size);\n\n\t\tif (preview) {\n\t\t\tif (file.type.includes('image/')) preview.classList.remove('hidden');\n\t\t\telse this.setIcon(fileInfo.extension, fileIcon);\n\t\t}\n\n\t\tif (this.dropzone.files.length > 0 && this.concatOptions.autoHideTrigger)\n\t\t\ttrigger.style.display = 'none';\n\n\t\tif (remove) remove.onclick = () => this.dropzone.removeFile(file);\n\t}\n\n\tprivate onRemoveFile() {\n\t\tconst trigger = this.el.querySelector(\n\t\t\t'[data-hs-file-upload-trigger]',\n\t\t) as HTMLElement;\n\n\t\tif (this.dropzone.files.length === 0 && this.concatOptions.autoHideTrigger)\n\t\t\ttrigger.style.display = '';\n\t}\n\n\tprivate onUploadProgress(file: DropzoneFile, progress: number) {\n\t\tconst { previewElement } = file;\n\n\t\tif (!previewElement) return false;\n\n\t\tconst progressBar = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-progress-bar]',\n\t\t);\n\t\tconst progressBarPane = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-progress-bar-pane]',\n\t\t) as HTMLElement;\n\t\tconst progressBarValue = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-progress-bar-value]',\n\t\t) as HTMLElement;\n\n\t\tconst currentProgress = Math.floor(progress);\n\n\t\tif (progressBar)\n\t\t\tprogressBar.setAttribute('aria-valuenow', `${currentProgress}`);\n\t\tif (progressBarPane) progressBarPane.style.width = `${currentProgress}%`;\n\t\tif (progressBarValue) progressBarValue.innerText = `${currentProgress}`;\n\t}\n\n\tprivate onComplete(file: DropzoneFile) {\n\t\tconst { previewElement } = file;\n\n\t\tif (!previewElement) return false;\n\n\t\tpreviewElement.classList.add('complete');\n\t}\n\n\tprivate setIcon(ext: string, file: HTMLElement) {\n\t\tconst icon = this.createIcon(ext);\n\n\t\tfile.append(icon);\n\t}\n\n\tprivate createIcon(ext: string) {\n\t\tconst icon = this.extensions[ext]?.icon\n\t\t\t? htmlToElement(this.extensions[ext].icon)\n\t\t\t: htmlToElement(this.extensions.default.icon);\n\n\t\tclassToClassList(\n\t\t\tthis.extensions[ext]?.class\n\t\t\t\t? this.extensions[ext].class\n\t\t\t\t: this.extensions.default.class,\n\t\t\ticon,\n\t\t);\n\n\t\treturn icon;\n\t}\n\n\tprivate formatFileSize(size: number) {\n\t\tif (size < 1024) {\n\t\t\treturn size.toFixed(2) + ' B';\n\t\t} else if (size < 1024 * 1024) {\n\t\t\treturn (size / 1024).toFixed(2) + ' KB';\n\t\t} else if (size < 1024 * 1024 * 1024) {\n\t\t\treturn (size / (1024 * 1024)).toFixed(2) + ' MB';\n\t\t} else if (size < 1024 * 1024 * 1024 * 1024) {\n\t\t\treturn (size / (1024 * 1024 * 1024)).toFixed(2) + ' GB';\n\t\t} else {\n\t\t\treturn (size / (1024 * 1024 * 1024 * 1024)).toFixed(2) + ' TB';\n\t\t}\n\t}\n\n\tprivate splitFileName(file: string): {\n\t\tname: string;\n\t\textension: string;\n\t} {\n\t\tlet dotIndex = file.lastIndexOf('.');\n\n\t\tif (dotIndex == -1) return { name: file, extension: '' };\n\n\t\treturn {\n\t\t\tname: file.substring(0, dotIndex),\n\t\t\textension: file.substring(dotIndex + 1),\n\t\t};\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsFileUploadCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsFileUploadCollection) window.$hsFileUploadCollection = [];\n\n\t\tif (window.$hsFileUploadCollection)\n\t\t\twindow.$hsFileUploadCollection = window.$hsFileUploadCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-file-upload]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsFileUploadCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSFileUpload(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSFileUpload: Function;\n\t\t$hsFileUploadCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tif (\n\t\tdocument.querySelectorAll(\n\t\t\t'[data-hs-file-upload]:not(.--prevent-on-load-init)',\n\t\t).length\n\t) {\n\t\tif (typeof _ === 'undefined')\n\t\t\tconsole.error(\n\t\t\t\t'HSFileUpload: Lodash is not available, please add it to the page.',\n\t\t\t);\n\t\tif (typeof Dropzone === 'undefined')\n\t\t\tconsole.error(\n\t\t\t\t'HSFileUpload: Dropzone is not available, please add it to the page.',\n\t\t\t);\n\t}\n\n\tif (typeof _ !== 'undefined' && typeof Dropzone !== 'undefined') {\n\t\tHSFileUpload.autoInit();\n\t}\n\n\t// Uncomment for debug\n\t// console.log('File upload collection:', window.$hsFileUploadCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSFileUpload = HSFileUpload;\n}\n\nexport default HSFileUpload;\n", "/*\n * HSRangeSlider\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport type { cssClasses, target } from 'nouislider';\n\nimport {\n\tIRangeSliderCssClassesObject,\n\tIRangeSlider,\n\tIRangeSliderOptions,\n} from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSRangeSlider\n\textends HSBasePlugin\n\timplements IRangeSlider\n{\n\tprivate readonly concatOptions: IRangeSliderOptions;\n\tprivate format: any | null;\n\n\tconstructor(el: HTMLElement, options?: IRangeSliderOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tconst data = el.getAttribute('data-hs-range-slider');\n\t\tconst dataOptions: IRangeSliderOptions = data ? JSON.parse(data) : {};\n\n\t\tthis.concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t\tcssClasses: {\n\t\t\t\t...noUiSlider.cssClasses,\n\t\t\t\t...this.processClasses(dataOptions.cssClasses),\n\t\t\t},\n\t\t};\n\n\t\tthis.init();\n\t}\n\n\tget formattedValue() {\n\t\tconst values: number | string | (string | number)[] = (\n\t\t\tthis.el as target\n\t\t).noUiSlider.get();\n\n\t\tif (Array.isArray(values) && this.format) {\n\t\t\tconst updateValues: (string | number)[] = [];\n\n\t\t\tvalues.forEach((val) => {\n\t\t\t\tupdateValues.push(this.format.to(val));\n\t\t\t});\n\n\t\t\treturn updateValues;\n\t\t} else if (this.format) {\n\t\t\treturn this.format.to(values);\n\t\t} else {\n\t\t\treturn values;\n\t\t}\n\t}\n\n\tprivate processClasses(cl: typeof cssClasses) {\n\t\tconst mergedClasses: IRangeSliderCssClassesObject = {};\n\n\t\tObject.keys(cl).forEach((key: keyof typeof noUiSlider.cssClasses) => {\n\t\t\tif (key) mergedClasses[key] = `${noUiSlider.cssClasses[key]} ${cl[key]}`;\n\t\t});\n\n\t\treturn mergedClasses as typeof cssClasses;\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsRangeSliderCollection, this);\n\n\t\tif (\n\t\t\ttypeof this.concatOptions?.formatter === 'object'\n\t\t\t\t? this.concatOptions?.formatter?.type ===\n\t\t\t\t\t'thousandsSeparatorAndDecimalPoints'\n\t\t\t\t: this.concatOptions?.formatter === 'thousandsSeparatorAndDecimalPoints'\n\t\t)\n\t\t\tthis.thousandsSeparatorAndDecimalPointsFormatter();\n\t\telse if (\n\t\t\ttypeof this.concatOptions?.formatter === 'object'\n\t\t\t\t? this.concatOptions?.formatter?.type === 'integer'\n\t\t\t\t: this.concatOptions?.formatter === 'integer'\n\t\t)\n\t\t\tthis.integerFormatter();\n\t\telse if (\n\t\t\ttypeof this.concatOptions?.formatter === 'object' &&\n\t\t\t(this.concatOptions?.formatter?.prefix ||\n\t\t\t\tthis.concatOptions?.formatter?.postfix)\n\t\t)\n\t\t\tthis.prefixOrPostfixFormatter();\n\n\t\tnoUiSlider.create(this.el, this.concatOptions);\n\n\t\tif (this.concatOptions.disabled) this.setDisabled();\n\t}\n\n\tprivate formatValue(val: number | string) {\n\t\tlet result = '';\n\n\t\tif (typeof this.concatOptions?.formatter === 'object') {\n\t\t\tif (this.concatOptions?.formatter?.prefix)\n\t\t\t\tresult += this.concatOptions?.formatter?.prefix;\n\t\t\tresult += val;\n\t\t\tif (this.concatOptions?.formatter?.postfix)\n\t\t\t\tresult += this.concatOptions?.formatter?.postfix;\n\t\t} else result += val;\n\n\t\treturn result;\n\t}\n\n\tprivate integerFormatter() {\n\t\tthis.format = {\n\t\t\tto: (val: number) => this.formatValue(Math.round(val)),\n\t\t\tfrom: (val: string) => Math.round(+val),\n\t\t};\n\n\t\tif (this.concatOptions?.tooltips) this.concatOptions.tooltips = this.format;\n\t}\n\n\tprivate prefixOrPostfixFormatter() {\n\t\tthis.format = {\n\t\t\tto: (val: number) => this.formatValue(val),\n\t\t\tfrom: (val: string) => +val,\n\t\t};\n\n\t\tif (this.concatOptions?.tooltips) this.concatOptions.tooltips = this.format;\n\t}\n\n\tprivate thousandsSeparatorAndDecimalPointsFormatter() {\n\t\tthis.format = {\n\t\t\tto: (val: number) =>\n\t\t\t\tthis.formatValue(\n\t\t\t\t\tnew Intl.NumberFormat('en-US', {\n\t\t\t\t\t\tminimumFractionDigits: 2,\n\t\t\t\t\t\tmaximumFractionDigits: 2,\n\t\t\t\t\t}).format(val),\n\t\t\t\t),\n\t\t\tfrom: (val: string) => parseFloat(val.replace(/,/g, '')),\n\t\t};\n\n\t\tif (this.concatOptions?.tooltips) this.concatOptions.tooltips = this.format;\n\t}\n\n\tprivate setDisabled() {\n\t\tthis.el.setAttribute('disabled', 'disabled');\n\t\tthis.el.classList.add('disabled');\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\t(this.el as target).noUiSlider.destroy();\n\n\t\tthis.format = null;\n\n\t\twindow.$hsRangeSliderCollection = window.$hsRangeSliderCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance = false) {\n\t\tconst elInCollection = window.$hsRangeSliderCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsRangeSliderCollection) window.$hsRangeSliderCollection = [];\n\n\t\tif (window.$hsRangeSliderCollection)\n\t\t\twindow.$hsRangeSliderCollection = window.$hsRangeSliderCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-range-slider]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsRangeSliderCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSRangeSlider(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSRangeSlider: Function;\n\t\t$hsRangeSliderCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSRangeSlider.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Range slider collection:', window.$hsRangeSliderCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSRangeSlider = HSRangeSlider;\n}\n\nexport default HSRangeSlider;\n", "/*!\n * clipboard.js v2.0.11\n * https://clipboardjs.com/\n *\n * Licensed MIT \u00A9 Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ clipboard; }\n});\n\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(279);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(370);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(817);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n;// CONCATENATED MODULE: ./src/common/command.js\n/**\n * Executes a given operation type.\n * @param {String} type\n * @return {Boolean}\n */\nfunction command(type) {\n try {\n return document.execCommand(type);\n } catch (err) {\n return false;\n }\n}\n;// CONCATENATED MODULE: ./src/actions/cut.js\n\n\n/**\n * Cut action wrapper.\n * @param {String|HTMLElement} target\n * @return {String}\n */\n\nvar ClipboardActionCut = function ClipboardActionCut(target) {\n var selectedText = select_default()(target);\n command('cut');\n return selectedText;\n};\n\n/* harmony default export */ var actions_cut = (ClipboardActionCut);\n;// CONCATENATED MODULE: ./src/common/create-fake-element.js\n/**\n * Creates a fake textarea element with a value.\n * @param {String} value\n * @return {HTMLElement}\n */\nfunction createFakeElement(value) {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS\n\n fakeElement.style.fontSize = '12pt'; // Reset box model\n\n fakeElement.style.border = '0';\n fakeElement.style.padding = '0';\n fakeElement.style.margin = '0'; // Move element out of screen horizontally\n\n fakeElement.style.position = 'absolute';\n fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElement.style.top = \"\".concat(yPosition, \"px\");\n fakeElement.setAttribute('readonly', '');\n fakeElement.value = value;\n return fakeElement;\n}\n;// CONCATENATED MODULE: ./src/actions/copy.js\n\n\n\n/**\n * Create fake copy action wrapper using a fake element.\n * @param {String} target\n * @param {Object} options\n * @return {String}\n */\n\nvar fakeCopyAction = function fakeCopyAction(value, options) {\n var fakeElement = createFakeElement(value);\n options.container.appendChild(fakeElement);\n var selectedText = select_default()(fakeElement);\n command('copy');\n fakeElement.remove();\n return selectedText;\n};\n/**\n * Copy action wrapper.\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @return {String}\n */\n\n\nvar ClipboardActionCopy = function ClipboardActionCopy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n var selectedText = '';\n\n if (typeof target === 'string') {\n selectedText = fakeCopyAction(target, options);\n } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {\n // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n selectedText = fakeCopyAction(target.value, options);\n } else {\n selectedText = select_default()(target);\n command('copy');\n }\n\n return selectedText;\n};\n\n/* harmony default export */ var actions_copy = (ClipboardActionCopy);\n;// CONCATENATED MODULE: ./src/actions/default.js\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n/**\n * Inner function which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n * @param {Object} options\n */\n\nvar ClipboardActionDefault = function ClipboardActionDefault() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Defines base properties passed from constructor.\n var _options$action = options.action,\n action = _options$action === void 0 ? 'copy' : _options$action,\n container = options.container,\n target = options.target,\n text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.\n\n if (action !== 'copy' && action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n } // Sets the `target` property using an element that will be have its content copied.\n\n\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n } // Define selection strategy based on `text` property.\n\n\n if (text) {\n return actions_copy(text, {\n container: container\n });\n } // Defines which selection strategy based on `target` property.\n\n\n if (target) {\n return action === 'cut' ? actions_cut(target) : actions_copy(target, {\n container: container\n });\n }\n};\n\n/* harmony default export */ var actions_default = (ClipboardActionDefault);\n;// CONCATENATED MODULE: ./src/clipboard.js\nfunction clipboard_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return clipboard_typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\nfunction getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n}\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n\nvar Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n var _super = _createSuper(Clipboard);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n var _this;\n\n _classCallCheck(this, Clipboard);\n\n _this = _super.call(this);\n\n _this.resolveOptions(options);\n\n _this.listenClick(trigger);\n\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n _createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n var action = this.action(trigger) || 'copy';\n var text = actions_default({\n action: action,\n container: this.container,\n target: this.target(trigger),\n text: this.text(trigger)\n }); // Fires an event based on the copy operation result.\n\n this.emit(text ? 'success' : 'error', {\n action: action,\n text: text,\n trigger: trigger,\n clearSelection: function clearSelection() {\n if (trigger) {\n trigger.focus();\n }\n\n window.getSelection().removeAllRanges();\n }\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Allow fire programmatically a copy action\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @returns Text copied.\n */\n\n }, {\n key: \"defaultText\",\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n }\n }], [{\n key: \"copy\",\n value: function copy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n return actions_copy(target, options);\n }\n /**\n * Allow fire programmatically a cut action\n * @param {String|HTMLElement} target\n * @returns Text cutted.\n */\n\n }, {\n key: \"cut\",\n value: function cut(target) {\n return actions_cut(target);\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n\n return Clipboard;\n}((tiny_emitter_default()));\n\n/* harmony default export */ var clipboard = (Clipboard);\n\n/***/ }),\n\n/***/ 828:\n/***/ (function(module) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n\n/***/ 438:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar closest = __webpack_require__(828);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n\n/***/ 879:\n/***/ (function(__unused_webpack_module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n/***/ }),\n\n/***/ 370:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar is = __webpack_require__(879);\nvar delegate = __webpack_require__(438);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n\n/***/ 817:\n/***/ (function(module) {\n\nfunction select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n\n/***/ 279:\n/***/ (function(module) {\n\nfunction E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t// module exports must be returned from runtime so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(686);\n/******/ })()\n.default;\n});", "// Copied from Preline preline/dist/clipboard-helpers.js\n!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)(\"object\"==typeof exports?exports:e)[n]=o[n]}}(self,(()=>(()=>{\"use strict\";var e={};return(()=>{var t,o=e;\n /*\n * @version: 2.5.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */Object.defineProperty(o,\"__esModule\",{value:!0});var n=null!==(t=null===window||void 0===window?void 0:window.HS_CLIPBOARD_SELECTOR)&&void 0!==t?t:\".js-clipboard\";window.addEventListener(\"load\",(function(){document.querySelectorAll(n).forEach((function(e){new ClipboardJS(e,{text:function(e){var t=e.dataset.clipboardText;if(t)return t;var o=e.dataset.clipboardTarget,n=document.querySelector(o);return\"SELECT\"===n.tagName||\"INPUT\"===n.tagName||\"TEXTAREA\"===n.tagName?n.value:n.textContent}}).on(\"success\",(function(){var t,o=e.querySelector(\".js-clipboard-default\"),n=e.querySelector(\".js-clipboard-success\"),i=e.querySelector(\".js-clipboard-success-text\"),r=e.dataset.clipboardSuccessText||\"\",l=e.closest(\".hs-tooltip\");i&&(t=i.textContent,i.textContent=r),o&&n&&(o.style.display=\"none\",n.style.display=\"block\"),l&&window.HSTooltip.show(l),setTimeout((function(){i&&t&&(i.textContent=t),l&&window.HSTooltip.hide(l),o&&n&&(n.style.display=\"\",o.style.display=\"\")}),800)}))}))}))})(),e})()));", "/*\n * HSCopyMarkup\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { ICopyMarkupOptions, ICopyMarkup } from '../copy-markup/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSCopyMarkup\n\textends HSBasePlugin\n\timplements ICopyMarkup\n{\n\tprivate readonly targetSelector: string | null;\n\tprivate readonly wrapperSelector: string | null;\n\tprivate readonly limit: number | null;\n\n\tprivate target: HTMLElement | null;\n\tprivate wrapper: HTMLElement | null;\n\tprivate items: HTMLElement[] | null;\n\n\tprivate onElementClickListener: () => void;\n\tprivate onDeleteItemButtonClickListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: ICopyMarkupOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-copy-markup');\n\t\tconst dataOptions: ICopyMarkupOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.targetSelector = concatOptions?.targetSelector || null;\n\t\tthis.wrapperSelector = concatOptions?.wrapperSelector || null;\n\t\tthis.limit = concatOptions?.limit || null;\n\t\tthis.items = [];\n\n\t\tif (this.targetSelector) this.init();\n\t}\n\n\tprivate elementClick() {\n\t\tthis.copy();\n\t}\n\n\tprivate deleteItemButtonClick(item: HTMLElement) {\n\t\tthis.delete(item);\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsCopyMarkupCollection, this);\n\n\t\tthis.onElementClickListener = () => this.elementClick();\n\n\t\tthis.setTarget();\n\t\tthis.setWrapper();\n\t\tthis.addPredefinedItems();\n\n\t\tthis.el.addEventListener('click', this.onElementClickListener);\n\t}\n\n\tprivate copy() {\n\t\tif (this.limit && this.items.length >= this.limit) return false;\n\n\t\tif (this.el.hasAttribute('disabled')) this.el.setAttribute('disabled', '');\n\n\t\tconst copiedElement = this.target.cloneNode(true) as HTMLElement;\n\n\t\tthis.addToItems(copiedElement);\n\n\t\tif (this.limit && this.items.length >= this.limit)\n\t\t\tthis.el.setAttribute('disabled', 'disabled');\n\n\t\tthis.fireEvent('copy', copiedElement);\n\t\tdispatch('copy.hs.copyMarkup', copiedElement, copiedElement);\n\t}\n\n\tprivate addPredefinedItems() {\n\t\tArray.from(this.wrapper.children)\n\t\t\t.filter(\n\t\t\t\t(el: HTMLElement) => !el.classList.contains('[--ignore-for-count]'),\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tthis.addToItems(el);\n\t\t\t});\n\n\t\tif (this.limit && this.items.length >= this.limit)\n\t\t\tthis.el.setAttribute('disabled', 'disabled');\n\t}\n\n\tprivate setTarget() {\n\t\tconst target: HTMLElement =\n\t\t\ttypeof this.targetSelector === 'string'\n\t\t\t\t? (document\n\t\t\t\t\t\t.querySelector(this.targetSelector)\n\t\t\t\t\t\t.cloneNode(true) as HTMLElement)\n\t\t\t\t: ((this.targetSelector as HTMLElement).cloneNode(true) as HTMLElement);\n\n\t\ttarget.removeAttribute('id');\n\n\t\tthis.target = target;\n\t}\n\n\tprivate setWrapper() {\n\t\tthis.wrapper =\n\t\t\ttypeof this.wrapperSelector === 'string'\n\t\t\t\t? document.querySelector(this.wrapperSelector)\n\t\t\t\t: this.wrapperSelector;\n\t}\n\n\tprivate addToItems(item: HTMLElement) {\n\t\tconst deleteItemButton = item.querySelector(\n\t\t\t'[data-hs-copy-markup-delete-item]',\n\t\t);\n\n\t\tif (this.wrapper) this.wrapper.append(item);\n\t\telse this.el.before(item);\n\n\t\tif (deleteItemButton) {\n\t\t\tthis.onDeleteItemButtonClickListener = () =>\n\t\t\t\tthis.deleteItemButtonClick(item);\n\n\t\t\tdeleteItemButton.addEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onDeleteItemButtonClickListener,\n\t\t\t);\n\t\t}\n\n\t\tthis.items.push(item);\n\t}\n\n\t// Public methods\n\tpublic delete(target: HTMLElement) {\n\t\tconst index = this.items.indexOf(target);\n\n\t\tif (index !== -1) this.items.splice(index, 1);\n\n\t\ttarget.remove();\n\n\t\tthis.fireEvent('delete', target);\n\t\tdispatch('delete.hs.copyMarkup', target, target);\n\t}\n\n\tpublic destroy() {\n\t\tconst deleteItemButtons = this.wrapper.querySelectorAll(\n\t\t\t'[data-hs-copy-markup-delete-item]',\n\t\t);\n\n\t\tthis.el.removeEventListener('click', this.onElementClickListener);\n\t\tif (deleteItemButtons.length) {\n\t\t\tdeleteItemButtons.forEach((el) =>\n\t\t\t\tel.removeEventListener('click', this.onDeleteItemButtonClickListener),\n\t\t\t);\n\t\t}\n\n\t\tthis.el.removeAttribute('disabled');\n\n\t\tthis.target = null;\n\t\tthis.wrapper = null;\n\t\tthis.items = null;\n\n\t\twindow.$hsCopyMarkupCollection = window.$hsCopyMarkupCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static method\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsCopyMarkupCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsCopyMarkupCollection) window.$hsCopyMarkupCollection = [];\n\n\t\tif (window.$hsCopyMarkupCollection)\n\t\t\twindow.$hsCopyMarkupCollection = window.$hsCopyMarkupCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-copy-markup]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsCopyMarkupCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-copy-markup');\n\t\t\t\t\tconst options: ICopyMarkupOptions = data ? JSON.parse(data) : {};\n\n\t\t\t\t\tnew HSCopyMarkup(el, options);\n\t\t\t\t}\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSCopyMarkup: Function;\n\t\t$hsCopyMarkupCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSCopyMarkup.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Copy markup collection:', window.$hsCopyMarkupCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSCopyMarkup = HSCopyMarkup;\n}\n\nexport default HSCopyMarkup;\n", "/*\n * HSAccordion\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { getClassProperty, stringToBoolean, dispatch, afterTransition } from '../../utils';\n\nimport {\n\tIAccordionOptions,\n\tIAccordion,\n\tIAccordionTreeView,\n\tIAccordionTreeViewStaticOptions,\n} from '../accordion/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSAccordion\n\textends HSBasePlugin\n\timplements IAccordion {\n\tprivate toggle: HTMLElement | null;\n\tpublic content: HTMLElement | null;\n\tprivate group: HTMLElement | null;\n\tprivate isAlwaysOpened: boolean;\n\tprivate isToggleStopPropagated: boolean;\n\n\tprivate onToggleClickListener: (evt: Event) => void;\n\n\tstatic selectable: IAccordionTreeView[];\n\n\tconstructor(el: HTMLElement, options?: IAccordionOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.toggle = this.el.querySelector('.hs-accordion-toggle') || null;\n\t\tthis.content = this.el.querySelector('.hs-accordion-content') || null;\n\t\tthis.update();\n\n\t\tthis.isToggleStopPropagated = stringToBoolean(\n\t\t\tgetClassProperty(this.toggle, '--stop-propagation', 'false') || 'false',\n\t\t);\n\n\t\tif (this.toggle && this.content) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsAccordionCollection, this);\n\n\t\tthis.onToggleClickListener = (evt: Event) => this.toggleClick(evt);\n\n\t\tthis.toggle.addEventListener('click', this.onToggleClickListener);\n\t}\n\n\t// Public methods\n\tpublic toggleClick(evt: Event) {\n\t\tif (this.isToggleStopPropagated) evt.stopPropagation();\n\n\t\tif (this.el.classList.contains('active')) {\n\t\t\tthis.hide();\n\t\t} else {\n\t\t\tthis.show();\n\t\t}\n\t}\n\n\tpublic show() {\n\t\tif (\n\t\t\tthis.group &&\n\t\t\t!this.isAlwaysOpened &&\n\t\t\tthis.group.querySelector(':scope > .hs-accordion.active') &&\n\t\t\tthis.group.querySelector(':scope > .hs-accordion.active') !== this.el\n\t\t) {\n\t\t\tconst currentlyOpened = window.$hsAccordionCollection.find(\n\t\t\t\t(el) =>\n\t\t\t\t\tel.element.el ===\n\t\t\t\t\tthis.group.querySelector(':scope > .hs-accordion.active'),\n\t\t\t);\n\n\t\t\tcurrentlyOpened.element.hide();\n\t\t}\n\n\t\tif (this.el.classList.contains('active')) return false;\n\n\t\tthis.el.classList.add('active');\n\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\n\t\tthis.content.style.display = 'block';\n\t\tthis.content.style.height = '0';\n\t\tsetTimeout(() => {\n\t\t\tthis.content.style.height = `${this.content.scrollHeight}px`;\n\n\t\t\tafterTransition(this.content, () => {\n\t\t\t\tthis.content.style.display = 'block';\n\t\t\t\tthis.content.style.height = '';\n\n\t\t\t\tthis.fireEvent('open', this.el);\n\t\t\t\tdispatch('open.hs.accordion', this.el, this.el);\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic hide() {\n\t\tif (!this.el.classList.contains('active')) return false;\n\n\t\tthis.el.classList.remove('active');\n\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\n\t\tthis.content.style.height = `${this.content.scrollHeight}px`;\n\t\tsetTimeout(() => {\n\t\t\tthis.content.style.height = '0';\n\t\t});\n\n\t\tafterTransition(this.content, () => {\n\t\t\tthis.content.style.display = 'none';\n\t\t\tthis.content.style.height = '';\n\n\t\t\tthis.fireEvent('close', this.el);\n\t\t\tdispatch('close.hs.accordion', this.el, this.el);\n\t\t});\n\t}\n\n\tpublic update() {\n\t\tthis.group = this.el.closest('.hs-accordion-group') || null;\n\n\t\tif (!this.group) return false;\n\n\t\tthis.isAlwaysOpened =\n\t\t\tthis.group.hasAttribute('data-hs-accordion-always-open') || false;\n\n\t\twindow.$hsAccordionCollection.map((el) => {\n\t\t\tif (el.id === this.el.id) {\n\t\t\t\tel.element.group = this.group;\n\t\t\t\tel.element.isAlwaysOpened = this.isAlwaysOpened;\n\t\t\t}\n\n\t\t\treturn el;\n\t\t});\n\t}\n\n\tpublic destroy() {\n\t\tif (HSAccordion?.selectable?.length) {\n\t\t\tHSAccordion.selectable.forEach((item) => {\n\t\t\t\titem.listeners.forEach(({ el, listener }) => {\n\t\t\t\t\tel.removeEventListener('click', listener);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tif (this.onToggleClickListener) {\n\t\t\tthis.toggle.removeEventListener('click', this.onToggleClickListener);\n\t\t}\n\n\t\tthis.toggle = null;\n\t\tthis.content = null;\n\t\tthis.group = null;\n\n\t\tthis.onToggleClickListener = null;\n\n\t\twindow.$hsAccordionCollection = window.$hsAccordionCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tprivate static findInCollection(target: HSAccordion | HTMLElement | string): ICollectionItem | null {\n\t\treturn window.$hsAccordionCollection.find((el) => {\n\t\t\tif (target instanceof HSAccordion) return el.element.el === target.el;\n\t\t\telse if (typeof target === 'string') return el.element.el === document.querySelector(target);\n\t\t\telse return el.element.el === target;\n\t\t}) || null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsAccordionCollection) window.$hsAccordionCollection = [];\n\n\t\tif (window.$hsAccordionCollection) {\n\t\t\twindow.$hsAccordionCollection = window.$hsAccordionCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\t\t}\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-accordion:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsAccordionCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSAccordion(el);\n\t\t\t});\n\t}\n\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsAccordionCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic show(target: HSAccordion | HTMLElement | string) {\n\t\tconst instance = HSAccordion.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\tinstance.element.content.style.display !== 'block'\n\t\t) instance.element.show();\n\t}\n\n\tstatic hide(target: HSAccordion | HTMLElement | string) {\n\t\tconst instance = HSAccordion.findInCollection(target);\n\t\tconst style = instance ? window.getComputedStyle(instance.element.content) : null;\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\tstyle.display !== 'none'\n\t\t) instance.element.hide();\n\t}\n\n\tstatic onSelectableClick = (\n\t\tevt: Event,\n\t\titem: IAccordionTreeView,\n\t\tel: HTMLElement,\n\t) => {\n\t\tevt.stopPropagation();\n\n\t\tHSAccordion.toggleSelected(item, el);\n\t};\n\n\tstatic treeView() {\n\t\tif (!document.querySelectorAll('.hs-accordion-treeview-root').length)\n\t\t\treturn false;\n\n\t\tthis.selectable = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-accordion-treeview-root')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tconst data = el?.getAttribute('data-hs-accordion-options');\n\t\t\t\tconst options: IAccordionTreeViewStaticOptions = data\n\t\t\t\t\t? JSON.parse(data)\n\t\t\t\t\t: {};\n\n\t\t\t\tthis.selectable.push({\n\t\t\t\t\tel,\n\t\t\t\t\toptions: { ...options },\n\t\t\t\t\tlisteners: [],\n\t\t\t\t});\n\t\t\t});\n\n\t\tif (this.selectable.length)\n\t\t\tthis.selectable.forEach((item) => {\n\t\t\t\tconst { el } = item;\n\n\t\t\t\tel.querySelectorAll('.hs-accordion-selectable').forEach(\n\t\t\t\t\t(_el: HTMLElement) => {\n\t\t\t\t\t\tconst listener = (evt: Event) =>\n\t\t\t\t\t\t\tthis.onSelectableClick(evt, item, _el);\n\n\t\t\t\t\t\t_el.addEventListener('click', listener);\n\n\t\t\t\t\t\titem.listeners.push({ el: _el, listener });\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t});\n\t}\n\n\tstatic toggleSelected(root: IAccordionTreeView, item: HTMLElement) {\n\t\tif (item.classList.contains('selected')) item.classList.remove('selected');\n\t\telse {\n\t\t\troot.el\n\t\t\t\t.querySelectorAll('.hs-accordion-selectable')\n\t\t\t\t.forEach((el: HTMLElement) => el.classList.remove('selected'));\n\t\t\titem.classList.add('selected');\n\t\t}\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HSAccordion | HTMLElement | string, cb: Function) {\n\t\tconst instance = HSAccordion.findInCollection(target);\n\n\t\tif (instance) instance.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSAccordion: Function;\n\t\t$hsAccordionCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSAccordion.autoInit();\n\n\tif (document.querySelectorAll('.hs-accordion-treeview-root').length)\n\t\tHSAccordion.treeView();\n\n\t// Uncomment for debug\n\t// console.log('Accordion collection:', window.$hsAccordionCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSAccordion = HSAccordion;\n}\n\nexport default HSAccordion;\n", "/*\n * HSCarousel\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { classToClassList, debounce, htmlToElement } from '../../utils';\n\nimport { ICarousel, ICarouselOptions } from './interfaces';\nimport { TCarouselOptionsSlidesQty } from './types';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\nimport { BREAKPOINTS } from '../../constants';\n\nclass HSCarousel extends HSBasePlugin implements ICarousel {\n\tprivate currentIndex: number;\n\tprivate readonly loadingClasses: string | string[];\n\tprivate readonly dotsItemClasses: string;\n\tprivate readonly isAutoHeight: boolean;\n\tprivate readonly isAutoPlay: boolean;\n\tprivate readonly isCentered: boolean;\n\tprivate readonly isDraggable: boolean;\n\tprivate readonly isInfiniteLoop: boolean;\n\tprivate readonly isRTL: boolean;\n\tprivate readonly isSnap: boolean;\n\tprivate readonly hasSnapSpacers: boolean;\n\tprivate readonly slidesQty: TCarouselOptionsSlidesQty | number;\n\tprivate readonly speed: number;\n\tprivate readonly updateDelay: number;\n\n\tprivate readonly loadingClassesRemove: string | string[];\n\tprivate readonly loadingClassesAdd: string | string[];\n\tprivate readonly afterLoadingClassesAdd: string | string[];\n\n\tprivate readonly container: HTMLElement | null;\n\tprivate readonly inner: HTMLElement | null;\n\tprivate readonly slides: NodeListOf | undefined[];\n\tprivate readonly prev: HTMLElement | null;\n\tprivate readonly next: HTMLElement | null;\n\tprivate readonly dots: HTMLElement | null;\n\tprivate dotsItems: NodeListOf | undefined[] | null;\n\tprivate readonly info: HTMLElement | null;\n\tprivate readonly infoTotal: HTMLElement | null;\n\tprivate readonly infoCurrent: HTMLElement | null;\n\n\tprivate sliderWidth: number;\n\tprivate timer: any;\n\n\t// Drag events' help variables\n\tprivate isScrolling: ReturnType;\n\tprivate isDragging: boolean;\n\tprivate dragStartX: number | null;\n\tprivate initialTranslateX: number | null;\n\n\t// Touch events' help variables\n\tprivate readonly touchX: {\n\t\tstart: number;\n\t\tend: number;\n\t};\n\n\t// Resize events' help variables\n\tprivate resizeContainer: HTMLElement;\n\tpublic resizeContainerWidth: number;\n\n\t// Listeners\n\tprivate onPrevClickListener: () => void;\n\tprivate onNextClickListener: () => void;\n\tprivate onContainerScrollListener: () => void;\n\tprivate onElementTouchStartListener: (evt: TouchEvent) => void;\n\tprivate onElementTouchEndListener: (evt: TouchEvent) => void;\n\tprivate onInnerMouseDownListener: (evt: MouseEvent | TouchEvent) => void;\n\tprivate onInnerTouchStartListener: (evt: MouseEvent | TouchEvent) => void;\n\tprivate onDocumentMouseMoveListener: (evt: MouseEvent | TouchEvent) => void;\n\tprivate onDocumentTouchMoveListener: (evt: MouseEvent | TouchEvent) => void;\n\tprivate onDocumentMouseUpListener: () => void;\n\tprivate onDocumentTouchEndListener: () => void;\n\tprivate onDotClickListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: ICarouselOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-carousel');\n\t\tconst dataOptions: ICarouselOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.currentIndex = concatOptions.currentIndex || 0;\n\t\tthis.loadingClasses = concatOptions.loadingClasses\n\t\t\t? `${concatOptions.loadingClasses}`.split(',')\n\t\t\t: null;\n\t\tthis.dotsItemClasses = concatOptions.dotsItemClasses\n\t\t\t? concatOptions.dotsItemClasses\n\t\t\t: null;\n\t\tthis.isAutoHeight =\n\t\t\ttypeof concatOptions.isAutoHeight !== 'undefined'\n\t\t\t\t? concatOptions.isAutoHeight\n\t\t\t\t: false;\n\t\tthis.isAutoPlay =\n\t\t\ttypeof concatOptions.isAutoPlay !== 'undefined'\n\t\t\t\t? concatOptions.isAutoPlay\n\t\t\t\t: false;\n\t\tthis.isCentered =\n\t\t\ttypeof concatOptions.isCentered !== 'undefined'\n\t\t\t\t? concatOptions.isCentered\n\t\t\t\t: false;\n\t\tthis.isDraggable =\n\t\t\ttypeof concatOptions.isDraggable !== 'undefined'\n\t\t\t\t? concatOptions.isDraggable\n\t\t\t\t: false;\n\t\tthis.isInfiniteLoop =\n\t\t\ttypeof concatOptions.isInfiniteLoop !== 'undefined'\n\t\t\t\t? concatOptions.isInfiniteLoop\n\t\t\t\t: false;\n\t\tthis.isRTL =\n\t\t\ttypeof concatOptions.isRTL !== 'undefined' ? concatOptions.isRTL : false;\n\t\tthis.isSnap =\n\t\t\ttypeof concatOptions.isSnap !== 'undefined'\n\t\t\t\t? concatOptions.isSnap\n\t\t\t\t: false;\n\t\tthis.hasSnapSpacers =\n\t\t\ttypeof concatOptions.hasSnapSpacers !== 'undefined'\n\t\t\t\t? concatOptions.hasSnapSpacers\n\t\t\t\t: true;\n\t\tthis.speed = concatOptions.speed || 4000;\n\t\tthis.updateDelay = concatOptions.updateDelay || 0;\n\t\tthis.slidesQty = concatOptions.slidesQty || 1;\n\n\t\tthis.loadingClassesRemove = this.loadingClasses?.[0]\n\t\t\t? this.loadingClasses[0].split(' ')\n\t\t\t: 'opacity-0';\n\t\tthis.loadingClassesAdd = this.loadingClasses?.[1]\n\t\t\t? this.loadingClasses[1].split(' ')\n\t\t\t: '';\n\t\tthis.afterLoadingClassesAdd = this.loadingClasses?.[2]\n\t\t\t? this.loadingClasses[2].split(' ')\n\t\t\t: '';\n\n\t\tthis.container = this.el.querySelector('.hs-carousel') || null;\n\t\tthis.inner = this.el.querySelector('.hs-carousel-body') || null;\n\t\tthis.slides = this.el.querySelectorAll('.hs-carousel-slide') || [];\n\t\tthis.prev = this.el.querySelector('.hs-carousel-prev') || null;\n\t\tthis.next = this.el.querySelector('.hs-carousel-next') || null;\n\t\tthis.dots = this.el.querySelector('.hs-carousel-pagination') || null;\n\t\tthis.info = this.el.querySelector('.hs-carousel-info') || null;\n\t\tthis.infoTotal =\n\t\t\tthis?.info?.querySelector('.hs-carousel-info-total') || null;\n\t\tthis.infoCurrent =\n\t\t\tthis?.info?.querySelector('.hs-carousel-info-current') || null;\n\n\t\tthis.sliderWidth = this.el.getBoundingClientRect().width;\n\n\t\t// Drag events' help variables\n\t\tthis.isDragging = false;\n\t\tthis.dragStartX = null;\n\t\tthis.initialTranslateX = null;\n\n\t\t// Touch events' help variables\n\t\tthis.touchX = {\n\t\t\tstart: 0,\n\t\t\tend: 0,\n\t\t};\n\n\t\t// Resize events' help variables\n\t\tthis.resizeContainer = document.querySelector('body');\n\t\tthis.resizeContainerWidth = 0;\n\n\t\tthis.init();\n\t}\n\n\tprivate setIsSnap() {\n\t\tconst containerRect = this.container.getBoundingClientRect();\n\t\tconst containerCenter = containerRect.left + containerRect.width / 2;\n\n\t\tlet closestElement: HTMLElement | null = null;\n\t\tlet closestElementIndex: number | null = null;\n\t\tlet closestDistance = Infinity;\n\n\t\tArray.from(this.inner.children).forEach((child: HTMLElement) => {\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tconst innerContainerRect = this.inner.getBoundingClientRect();\n\t\t\tconst childCenter =\n\t\t\t\tchildRect.left + childRect.width / 2 - innerContainerRect.left;\n\t\t\tconst distance = Math.abs(\n\t\t\t\tcontainerCenter - (innerContainerRect.left + childCenter),\n\t\t\t);\n\n\t\t\tif (distance < closestDistance) {\n\t\t\t\tclosestDistance = distance;\n\t\t\t\tclosestElement = child;\n\t\t\t}\n\t\t});\n\n\t\tif (closestElement) {\n\t\t\tclosestElementIndex = Array.from(this.slides).findIndex(\n\t\t\t\t(el) => el === closestElement,\n\t\t\t);\n\t\t}\n\n\t\tthis.setIndex(closestElementIndex);\n\n\t\tif (this.dots) this.setCurrentDot();\n\t}\n\n\tprivate prevClick() {\n\t\tthis.goToPrev();\n\t\tif (this.isAutoPlay) {\n\t\t\tthis.resetTimer();\n\t\t\tthis.setTimer();\n\t\t}\n\t}\n\n\tprivate nextClick() {\n\t\tthis.goToNext();\n\t\tif (this.isAutoPlay) {\n\t\t\tthis.resetTimer();\n\t\t\tthis.setTimer();\n\t\t}\n\t}\n\n\tprivate containerScroll() {\n\t\tclearTimeout(this.isScrolling);\n\n\t\tthis.isScrolling = setTimeout(() => {\n\t\t\tthis.setIsSnap();\n\t\t}, 100);\n\t}\n\n\tprivate elementTouchStart(evt: TouchEvent) {\n\t\tthis.touchX.start = evt.changedTouches[0].screenX;\n\t}\n\n\tprivate elementTouchEnd(evt: TouchEvent) {\n\t\tthis.touchX.end = evt.changedTouches[0].screenX;\n\n\t\tthis.detectDirection();\n\t}\n\n\tprivate innerMouseDown(evt: MouseEvent | TouchEvent) {\n\t\tthis.handleDragStart(evt);\n\t}\n\n\tprivate innerTouchStart(evt: MouseEvent | TouchEvent) {\n\t\tthis.handleDragStart(evt);\n\t}\n\n\tprivate documentMouseMove(evt: MouseEvent | TouchEvent) {\n\t\tthis.handleDragMove(evt);\n\t}\n\n\tprivate documentTouchMove(evt: MouseEvent | TouchEvent) {\n\t\tthis.handleDragMove(evt);\n\t}\n\n\tprivate documentMouseUp() {\n\t\tthis.handleDragEnd();\n\t}\n\n\tprivate documentTouchEnd() {\n\t\tthis.handleDragEnd();\n\t}\n\n\tprivate dotClick(ind: number) {\n\t\tthis.goTo(ind);\n\n\t\tif (this.isAutoPlay) {\n\t\t\tthis.resetTimer();\n\t\t\tthis.setTimer();\n\t\t}\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsCarouselCollection, this);\n\n\t\tif (this.inner) {\n\t\t\tthis.calculateWidth();\n\n\t\t\tif (this.isDraggable && !this.isSnap) this.initDragHandling();\n\t\t}\n\n\t\tif (this.prev) {\n\t\t\tthis.onPrevClickListener = () => this.prevClick();\n\n\t\t\tthis.prev.addEventListener('click', this.onPrevClickListener);\n\t\t}\n\n\t\tif (this.next) {\n\t\t\tthis.onNextClickListener = () => this.nextClick();\n\n\t\t\tthis.next.addEventListener('click', this.onNextClickListener);\n\t\t}\n\n\t\tif (this.dots) this.initDots();\n\t\tif (this.info) this.buildInfo();\n\t\tif (this.slides.length) {\n\t\t\tthis.addCurrentClass();\n\t\t\tif (!this.isInfiniteLoop) this.addDisabledClass();\n\t\t\tif (this.isAutoPlay) this.autoPlay();\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tif (this.isSnap) this.setIsSnap();\n\n\t\t\tif (this.loadingClassesRemove) {\n\t\t\t\tif (typeof this.loadingClassesRemove === 'string')\n\t\t\t\t\tthis.inner.classList.remove(this.loadingClassesRemove);\n\t\t\t\telse this.inner.classList.remove(...this.loadingClassesRemove);\n\t\t\t}\n\t\t\tif (this.loadingClassesAdd) {\n\t\t\t\tif (typeof this.loadingClassesAdd === 'string')\n\t\t\t\t\tthis.inner.classList.add(this.loadingClassesAdd);\n\t\t\t\telse this.inner.classList.add(...this.loadingClassesAdd);\n\t\t\t}\n\n\t\t\tif (this.inner && this.afterLoadingClassesAdd) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (typeof this.afterLoadingClassesAdd === 'string')\n\t\t\t\t\t\tthis.inner.classList.add(this.afterLoadingClassesAdd);\n\t\t\t\t\telse this.inner.classList.add(...this.afterLoadingClassesAdd);\n\t\t\t\t});\n\t\t\t}\n\t\t}, 400);\n\n\t\tif (this.isSnap) {\n\t\t\tthis.onContainerScrollListener = () => this.containerScroll();\n\n\t\t\tthis.container.addEventListener('scroll', this.onContainerScrollListener);\n\t\t}\n\n\t\tthis.el.classList.add('init');\n\n\t\tif (!this.isSnap) {\n\t\t\tthis.onElementTouchStartListener = (evt: TouchEvent) =>\n\t\t\t\tthis.elementTouchStart(evt);\n\t\t\tthis.onElementTouchEndListener = (evt: TouchEvent) =>\n\t\t\t\tthis.elementTouchEnd(evt);\n\n\t\t\tthis.el.addEventListener('touchstart', this.onElementTouchStartListener);\n\n\t\t\tthis.el.addEventListener('touchend', this.onElementTouchEndListener);\n\t\t}\n\n\t\tthis.observeResize();\n\t}\n\n\tprivate initDragHandling(): void {\n\t\tconst scrollableElement = this.inner;\n\n\t\tthis.onInnerMouseDownListener = (evt) => this.innerMouseDown(evt);\n\t\tthis.onInnerTouchStartListener = (evt) => this.innerTouchStart(evt);\n\t\tthis.onDocumentMouseMoveListener = (evt) => this.documentMouseMove(evt);\n\t\tthis.onDocumentTouchMoveListener = (evt) => this.documentTouchMove(evt);\n\t\tthis.onDocumentMouseUpListener = () => this.documentMouseUp();\n\t\tthis.onDocumentTouchEndListener = () => this.documentTouchEnd();\n\n\t\tif (scrollableElement) {\n\t\t\tscrollableElement.addEventListener(\n\t\t\t\t'mousedown',\n\t\t\t\tthis.onInnerMouseDownListener,\n\t\t\t);\n\t\t\tscrollableElement.addEventListener(\n\t\t\t\t'touchstart',\n\t\t\t\tthis.onInnerTouchStartListener,\n\t\t\t\t{ passive: true },\n\t\t\t);\n\n\t\t\tdocument.addEventListener('mousemove', this.onDocumentMouseMoveListener);\n\t\t\tdocument.addEventListener('touchmove', this.onDocumentTouchMoveListener, {\n\t\t\t\tpassive: false,\n\t\t\t});\n\n\t\t\tdocument.addEventListener('mouseup', this.onDocumentMouseUpListener);\n\t\t\tdocument.addEventListener('touchend', this.onDocumentTouchEndListener);\n\t\t}\n\t}\n\n\tprivate getTranslateXValue(): number {\n\t\tconst transformMatrix = window.getComputedStyle(this.inner).transform;\n\n\t\tif (transformMatrix !== 'none') {\n\t\t\tconst matrixValues = transformMatrix\n\t\t\t\t.match(/matrix.*\\((.+)\\)/)?.[1]\n\t\t\t\t.split(', ');\n\n\t\t\tif (matrixValues) {\n\t\t\t\tlet translateX = parseFloat(\n\t\t\t\t\tmatrixValues.length === 6 ? matrixValues[4] : matrixValues[12],\n\t\t\t\t);\n\t\t\t\tif (this.isRTL) translateX = -translateX;\n\n\t\t\t\treturn isNaN(translateX) || translateX === 0 ? 0 : -translateX;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}\n\n\tprivate removeClickEventWhileDragging(evt: MouseEvent) {\n\t\tevt.preventDefault();\n\t}\n\n\tprivate handleDragStart(evt: MouseEvent | TouchEvent): void {\n\t\tevt.preventDefault();\n\n\t\tthis.isDragging = true;\n\t\tthis.dragStartX = this.getEventX(evt);\n\t\tthis.initialTranslateX = this.isRTL\n\t\t\t? this.getTranslateXValue()\n\t\t\t: -this.getTranslateXValue();\n\n\t\tthis.inner.classList.add('dragging');\n\t}\n\n\tprivate handleDragMove(evt: MouseEvent | TouchEvent): void {\n\t\tif (!this.isDragging) return;\n\n\t\tthis.inner.querySelectorAll('a:not(.prevented-click)').forEach((el) => {\n\t\t\tel.classList.add('prevented-click');\n\t\t\tel.addEventListener('click', this.removeClickEventWhileDragging);\n\t\t});\n\n\t\tconst currentX = this.getEventX(evt);\n\t\tlet deltaX = currentX - this.dragStartX;\n\t\tif (this.isRTL) deltaX = -deltaX;\n\t\tconst newTranslateX = this.initialTranslateX + deltaX;\n\t\tconst newTranslateXFunc = () => {\n\t\t\tlet calcWidth =\n\t\t\t\t(this.sliderWidth * this.slides.length) / this.getCurrentSlidesQty() -\n\t\t\t\tthis.sliderWidth;\n\t\t\tconst containerWidth = this.sliderWidth;\n\t\t\tconst itemWidth = containerWidth / this.getCurrentSlidesQty();\n\t\t\tconst centeredOffset = (containerWidth - itemWidth) / 2;\n\t\t\tconst limitStart = this.isCentered ? centeredOffset : 0;\n\t\t\tif (this.isCentered) calcWidth = calcWidth + centeredOffset;\n\t\t\tconst limitEnd = -calcWidth;\n\n\t\t\tif (this.isRTL) {\n\t\t\t\tif (newTranslateX < limitStart) return limitStart;\n\t\t\t\tif (newTranslateX > calcWidth) return limitEnd;\n\t\t\t\telse return -newTranslateX;\n\t\t\t} else {\n\t\t\t\tif (newTranslateX > limitStart) return limitStart;\n\t\t\t\telse if (newTranslateX < -calcWidth) return limitEnd;\n\t\t\t\telse return newTranslateX;\n\t\t\t}\n\t\t};\n\n\t\tthis.setTranslate(newTranslateXFunc());\n\t}\n\n\tprivate handleDragEnd(): void {\n\t\tif (!this.isDragging) return;\n\t\tthis.isDragging = false;\n\n\t\tconst containerWidth = this.sliderWidth;\n\t\tconst itemWidth = containerWidth / this.getCurrentSlidesQty();\n\t\tconst currentTranslateX = this.getTranslateXValue();\n\t\tlet closestIndex = Math.round(currentTranslateX / itemWidth);\n\t\tif (this.isRTL) closestIndex = Math.round(currentTranslateX / itemWidth);\n\n\t\tthis.inner.classList.remove('dragging');\n\n\t\tsetTimeout(() => {\n\t\t\tthis.calculateTransform(closestIndex);\n\t\t\tif (this.dots) this.setCurrentDot();\n\n\t\t\tthis.dragStartX = null;\n\t\t\tthis.initialTranslateX = null;\n\n\t\t\tthis.inner.querySelectorAll('a.prevented-click').forEach((el) => {\n\t\t\t\tel.classList.remove('prevented-click');\n\t\t\t\tel.removeEventListener('click', this.removeClickEventWhileDragging);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate getEventX(event: MouseEvent | TouchEvent): number {\n\t\treturn event instanceof MouseEvent\n\t\t\t? event.clientX\n\t\t\t: event.touches[0].clientX;\n\t}\n\n\tprivate getCurrentSlidesQty(): number {\n\t\tif (typeof this.slidesQty === 'object') {\n\t\t\tconst windowWidth = document.body.clientWidth;\n\t\t\tlet currentRes = 0;\n\n\t\t\tObject.keys(this.slidesQty).forEach((key: string) => {\n\t\t\t\tif (\n\t\t\t\t\twindowWidth >=\n\t\t\t\t\t(typeof key + 1 === 'number'\n\t\t\t\t\t\t? (this.slidesQty as TCarouselOptionsSlidesQty)[key]\n\t\t\t\t\t\t: BREAKPOINTS[key])\n\t\t\t\t)\n\t\t\t\t\tcurrentRes = (this.slidesQty as TCarouselOptionsSlidesQty)[key];\n\t\t\t});\n\n\t\t\treturn currentRes;\n\t\t} else {\n\t\t\treturn this.slidesQty as number;\n\t\t}\n\t}\n\n\tprivate buildSnapSpacers() {\n\t\tconst existingBefore = this.inner.querySelector('.hs-snap-before');\n\t\tconst existingAfter = this.inner.querySelector('.hs-snap-after');\n\t\tif (existingBefore) existingBefore.remove();\n\t\tif (existingAfter) existingAfter.remove();\n\n\t\tconst containerWidth = this.sliderWidth;\n\t\tconst itemWidth = containerWidth / this.getCurrentSlidesQty();\n\t\tconst spacerWidth = containerWidth / 2 - itemWidth / 2;\n\n\t\tconst before = htmlToElement(\n\t\t\t``,\n\t\t);\n\t\tconst after = htmlToElement(\n\t\t\t``,\n\t\t);\n\n\t\tthis.inner.prepend(before);\n\t\tthis.inner.appendChild(after);\n\t}\n\n\tprivate initDots() {\n\t\tif (this.el.querySelectorAll('.hs-carousel-pagination-item').length)\n\t\t\tthis.setDots();\n\t\telse this.buildDots();\n\n\t\tif (this.dots) this.setCurrentDot();\n\t}\n\n\tprivate buildDots() {\n\t\tthis.dots.innerHTML = '';\n\n\t\tconst slidesQty =\n\t\t\t!this.isCentered && this.slidesQty\n\t\t\t\t? this.slides.length - (this.getCurrentSlidesQty() - 1)\n\t\t\t\t: this.slides.length;\n\n\t\tfor (let i = 0; i < slidesQty; i++) {\n\t\t\tconst singleDot = this.buildSingleDot(i);\n\n\t\t\tthis.dots.append(singleDot);\n\t\t}\n\t}\n\n\tprivate setDots() {\n\t\tthis.dotsItems = this.dots.querySelectorAll('.hs-carousel-pagination-item');\n\n\t\tthis.dotsItems.forEach((dot, ind) => {\n\t\t\tconst targetIndex = dot.getAttribute(\n\t\t\t\t'data-carousel-pagination-item-target',\n\t\t\t);\n\n\t\t\tthis.singleDotEvents(dot, targetIndex ? +targetIndex : ind);\n\t\t});\n\t}\n\n\tprivate goToCurrentDot() {\n\t\tconst container = this.dots;\n\t\tconst containerRect = container.getBoundingClientRect();\n\t\tconst containerScrollLeft = container.scrollLeft;\n\t\tconst containerScrollTop = container.scrollTop;\n\t\tconst containerWidth = container.clientWidth;\n\t\tconst containerHeight = container.clientHeight;\n\n\t\tconst item = this.dotsItems[this.currentIndex];\n\t\tconst itemRect = item.getBoundingClientRect();\n\t\tconst itemLeft = itemRect.left - containerRect.left + containerScrollLeft;\n\t\tconst itemRight = itemLeft + item.clientWidth;\n\t\tconst itemTop = itemRect.top - containerRect.top + containerScrollTop;\n\t\tconst itemBottom = itemTop + item.clientHeight;\n\n\t\tlet scrollLeft = containerScrollLeft;\n\t\tlet scrollTop = containerScrollTop;\n\n\t\tif (\n\t\t\titemLeft < containerScrollLeft ||\n\t\t\titemRight > containerScrollLeft + containerWidth\n\t\t) {\n\t\t\tscrollLeft = itemRight - containerWidth;\n\t\t}\n\n\t\tif (\n\t\t\titemTop < containerScrollTop ||\n\t\t\titemBottom > containerScrollTop + containerHeight\n\t\t) {\n\t\t\tscrollTop = itemBottom - containerHeight;\n\t\t}\n\n\t\tcontainer.scrollTo({\n\t\t\tleft: scrollLeft,\n\t\t\ttop: scrollTop,\n\t\t\tbehavior: 'smooth',\n\t\t});\n\t}\n\n\tprivate buildInfo() {\n\t\tif (this.infoTotal) this.setInfoTotal();\n\t\tif (this.infoCurrent) this.setInfoCurrent();\n\t}\n\n\tprivate setInfoTotal() {\n\t\tthis.infoTotal.innerText = `${this.slides.length}`;\n\t}\n\n\tprivate setInfoCurrent() {\n\t\tthis.infoCurrent.innerText = `${this.currentIndex + 1}`;\n\t}\n\n\tprivate buildSingleDot(ind: number) {\n\t\tconst singleDot = htmlToElement('');\n\t\tif (this.dotsItemClasses) classToClassList(this.dotsItemClasses, singleDot);\n\n\t\tthis.singleDotEvents(singleDot, ind);\n\n\t\treturn singleDot;\n\t}\n\n\tprivate singleDotEvents(dot: HTMLElement, ind: number) {\n\t\tthis.onDotClickListener = () => this.dotClick(ind);\n\n\t\tdot.addEventListener('click', this.onDotClickListener);\n\t}\n\n\tprivate observeResize() {\n\t\tconst resizeObserver = new ResizeObserver(\n\t\t\tdebounce((entries: ResizeObserverEntry[]) => {\n\t\t\t\tfor (let entry of entries) {\n\t\t\t\t\tconst newWidth = entry.contentRect.width;\n\n\t\t\t\t\tif (newWidth !== this.resizeContainerWidth) {\n\t\t\t\t\t\tthis.recalculateWidth();\n\t\t\t\t\t\tif (this.dots) this.initDots();\n\t\t\t\t\t\tthis.addCurrentClass();\n\n\t\t\t\t\t\tthis.resizeContainerWidth = newWidth;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, this.updateDelay),\n\t\t);\n\n\t\tresizeObserver.observe(this.resizeContainer);\n\t}\n\n\tprivate calculateWidth() {\n\t\tif (!this.isSnap)\n\t\t\tthis.inner.style.width = `${(this.sliderWidth * this.slides.length) / this.getCurrentSlidesQty()}px`;\n\n\t\tthis.slides.forEach((el) => {\n\t\t\tel.style.width = `${this.sliderWidth / this.getCurrentSlidesQty()}px`;\n\t\t});\n\n\t\tthis.calculateTransform();\n\t}\n\n\tprivate addCurrentClass() {\n\t\tif (this.isSnap) {\n\t\t\tconst itemsQty = Math.floor(this.getCurrentSlidesQty() / 2);\n\n\t\t\tfor (let i = 0; i < this.slides.length; i++) {\n\t\t\t\tconst slide = this.slides[i];\n\n\t\t\t\tif (\n\t\t\t\t\ti <= this.currentIndex + itemsQty &&\n\t\t\t\t\ti >= this.currentIndex - itemsQty\n\t\t\t\t)\n\t\t\t\t\tslide.classList.add('active');\n\t\t\t\telse slide.classList.remove('active');\n\t\t\t}\n\t\t} else {\n\t\t\tconst maxIndex = this.isCentered\n\t\t\t\t? this.currentIndex +\n\t\t\t\t\tthis.getCurrentSlidesQty() +\n\t\t\t\t\t(this.getCurrentSlidesQty() - 1)\n\t\t\t\t: this.currentIndex + this.getCurrentSlidesQty();\n\n\t\t\tthis.slides.forEach((el, i) => {\n\t\t\t\tif (i >= this.currentIndex && i < maxIndex) {\n\t\t\t\t\tel.classList.add('active');\n\t\t\t\t} else {\n\t\t\t\t\tel.classList.remove('active');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate setCurrentDot() {\n\t\tconst toggleDotActive = (el: HTMLElement | Element, i: number) => {\n\t\t\tlet statement = false;\n\t\t\tconst itemsQty = Math.floor(this.getCurrentSlidesQty() / 2);\n\n\t\t\tif (this.isSnap && !this.hasSnapSpacers) {\n\t\t\t\tstatement =\n\t\t\t\t\ti ===\n\t\t\t\t\t(this.getCurrentSlidesQty() % 2 === 0\n\t\t\t\t\t\t? this.currentIndex - itemsQty + 1\n\t\t\t\t\t\t: this.currentIndex - itemsQty);\n\t\t\t} else statement = i === this.currentIndex;\n\n\t\t\tif (statement) el.classList.add('active');\n\t\t\telse el.classList.remove('active');\n\t\t};\n\n\t\tif (this.dotsItems)\n\t\t\tthis.dotsItems.forEach((el, i) => toggleDotActive(el, i));\n\t\telse\n\t\t\tthis.dots\n\t\t\t\t.querySelectorAll(':scope > *')\n\t\t\t\t.forEach((el, i) => toggleDotActive(el, i));\n\t}\n\n\tprivate setElementToDisabled(el: HTMLElement) {\n\t\tel.classList.add('disabled');\n\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\tel.setAttribute('disabled', 'disabled');\n\t}\n\n\tprivate unsetElementToDisabled(el: HTMLElement) {\n\t\tel.classList.remove('disabled');\n\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\tel.removeAttribute('disabled');\n\t}\n\n\tprivate addDisabledClass() {\n\t\tif (!this.prev || !this.next) return false;\n\n\t\tconst gapValue = getComputedStyle(this.inner).getPropertyValue('gap');\n\t\tconst itemsQty = Math.floor(this.getCurrentSlidesQty() / 2);\n\t\tlet currentIndex = 0;\n\t\tlet maxIndex = 0;\n\t\tlet statementPrev = false;\n\t\tlet statementNext = false;\n\n\t\tif (this.isSnap) {\n\t\t\tcurrentIndex = this.currentIndex;\n\t\t\tmaxIndex = this.hasSnapSpacers\n\t\t\t\t? this.slides.length - 1\n\t\t\t\t: this.slides.length - itemsQty - 1;\n\t\t\tstatementPrev = this.hasSnapSpacers\n\t\t\t\t? currentIndex === 0\n\t\t\t\t: this.getCurrentSlidesQty() % 2 === 0\n\t\t\t\t\t? currentIndex - itemsQty < 0\n\t\t\t\t\t: currentIndex - itemsQty === 0;\n\t\t\tstatementNext =\n\t\t\t\tcurrentIndex >= maxIndex &&\n\t\t\t\tthis.container.scrollLeft +\n\t\t\t\t\tthis.container.clientWidth +\n\t\t\t\t\t(parseFloat(gapValue) || 0) >=\n\t\t\t\t\tthis.container.scrollWidth;\n\t\t} else {\n\t\t\tcurrentIndex = this.currentIndex;\n\t\t\tmaxIndex = this.isCentered\n\t\t\t\t? this.slides.length -\n\t\t\t\t\tthis.getCurrentSlidesQty() +\n\t\t\t\t\t(this.getCurrentSlidesQty() - 1)\n\t\t\t\t: this.slides.length - this.getCurrentSlidesQty();\n\t\t\tstatementPrev = currentIndex === 0;\n\t\t\tstatementNext = currentIndex >= maxIndex;\n\t\t}\n\n\t\tif (statementPrev) {\n\t\t\tthis.unsetElementToDisabled(this.next);\n\t\t\tthis.setElementToDisabled(this.prev);\n\t\t} else if (statementNext) {\n\t\t\tthis.unsetElementToDisabled(this.prev);\n\t\t\tthis.setElementToDisabled(this.next);\n\t\t} else {\n\t\t\tthis.unsetElementToDisabled(this.prev);\n\t\t\tthis.unsetElementToDisabled(this.next);\n\t\t}\n\t}\n\n\tprivate autoPlay() {\n\t\tthis.setTimer();\n\t}\n\n\tprivate setTimer() {\n\t\tthis.timer = setInterval(() => {\n\t\t\tif (this.currentIndex === this.slides.length - 1) this.goTo(0);\n\t\t\telse this.goToNext();\n\t\t}, this.speed);\n\t}\n\n\tprivate resetTimer() {\n\t\tclearInterval(this.timer);\n\t}\n\n\tprivate detectDirection() {\n\t\tconst { start, end } = this.touchX;\n\n\t\tif (end < start) this.goToNext();\n\t\tif (end > start) this.goToPrev();\n\t}\n\n\tprivate calculateTransform(currentIdx?: number | undefined): void {\n\t\tif (currentIdx !== undefined) this.currentIndex = currentIdx;\n\t\tif (\n\t\t\tthis.currentIndex > this.slides.length - this.getCurrentSlidesQty() &&\n\t\t\t!this.isCentered\n\t\t)\n\t\t\tthis.currentIndex = this.slides.length - this.getCurrentSlidesQty();\n\n\t\tconst containerWidth = this.sliderWidth;\n\t\tconst itemWidth = containerWidth / this.getCurrentSlidesQty();\n\t\tlet translateX = this.currentIndex * itemWidth;\n\n\t\t// TODO:: need to test auto scrolling to the end if last on resize\n\t\tif (this.isSnap && !this.isCentered) {\n\t\t\tif (\n\t\t\t\tthis.container.scrollLeft < containerWidth &&\n\t\t\t\tthis.container.scrollLeft + itemWidth / 2 > containerWidth\n\t\t\t)\n\t\t\t\tthis.container.scrollLeft = this.container.scrollWidth;\n\t\t}\n\n\t\tif (this.isCentered && !this.isSnap) {\n\t\t\tconst centeredOffset = (containerWidth - itemWidth) / 2;\n\n\t\t\tif (this.currentIndex === 0) translateX = -centeredOffset;\n\t\t\telse if (\n\t\t\t\tthis.currentIndex >=\n\t\t\t\tthis.slides.length -\n\t\t\t\t\tthis.getCurrentSlidesQty() +\n\t\t\t\t\t(this.getCurrentSlidesQty() - 1)\n\t\t\t) {\n\t\t\t\tconst totalSlideWidth = this.slides.length * itemWidth;\n\n\t\t\t\ttranslateX = totalSlideWidth - containerWidth + centeredOffset;\n\t\t\t} else translateX = this.currentIndex * itemWidth - centeredOffset;\n\t\t}\n\n\t\tif (!this.isSnap)\n\t\t\tthis.inner.style.transform = this.isRTL\n\t\t\t\t? `translate(${translateX}px, 0px)`\n\t\t\t\t: `translate(${-translateX}px, 0px)`;\n\n\t\tif (this.isAutoHeight)\n\t\t\tthis.inner.style.height = `${this.slides[this.currentIndex].clientHeight}px`;\n\n\t\tif (this.dotsItems) this.goToCurrentDot();\n\n\t\tthis.addCurrentClass();\n\t\tif (!this.isInfiniteLoop) this.addDisabledClass();\n\t\tif (this.isSnap && this.hasSnapSpacers) this.buildSnapSpacers();\n\t\tif (this.infoCurrent) this.setInfoCurrent();\n\t}\n\n\tprivate setTranslate(val: number) {\n\t\tthis.inner.style.transform = this.isRTL\n\t\t\t? `translate(${-val}px, 0px)`\n\t\t\t: `translate(${val}px, 0px)`;\n\t}\n\n\tprivate setIndex(i: number) {\n\t\tthis.currentIndex = i;\n\n\t\tthis.addCurrentClass();\n\t\tif (!this.isInfiniteLoop) this.addDisabledClass();\n\t}\n\n\t// Public methods\n\tpublic recalculateWidth() {\n\t\tthis.sliderWidth = this.inner.parentElement.getBoundingClientRect().width;\n\n\t\tthis.calculateWidth();\n\n\t\tif (\n\t\t\tthis.sliderWidth !==\n\t\t\tthis.inner.parentElement.getBoundingClientRect().width\n\t\t)\n\t\t\tthis.recalculateWidth();\n\t}\n\n\tpublic goToPrev() {\n\t\tif (this.currentIndex > 0) {\n\t\t\tthis.currentIndex--;\n\t\t} else {\n\t\t\tthis.currentIndex = this.slides.length - this.getCurrentSlidesQty();\n\t\t}\n\n\t\tif (this.isSnap) {\n\t\t\tconst itemWidth = this.sliderWidth / this.getCurrentSlidesQty();\n\n\t\t\tthis.container.scrollBy({\n\t\t\t\tleft: Math.max(-this.container.scrollLeft, -itemWidth),\n\t\t\t\tbehavior: 'smooth',\n\t\t\t});\n\n\t\t\tthis.addCurrentClass();\n\t\t\tif (!this.isInfiniteLoop) this.addDisabledClass();\n\t\t} else this.calculateTransform();\n\n\t\tif (this.dots) this.setCurrentDot();\n\t}\n\n\tpublic goToNext() {\n\t\tconst statement = this.isCentered\n\t\t\t? this.slides.length -\n\t\t\t\tthis.getCurrentSlidesQty() +\n\t\t\t\t(this.getCurrentSlidesQty() - 1)\n\t\t\t: this.slides.length - this.getCurrentSlidesQty();\n\n\t\tif (this.currentIndex < statement) {\n\t\t\tthis.currentIndex++;\n\t\t} else {\n\t\t\tthis.currentIndex = 0;\n\t\t}\n\n\t\tif (this.isSnap) {\n\t\t\tconst itemWidth = this.sliderWidth / this.getCurrentSlidesQty();\n\t\t\tconst maxScrollLeft =\n\t\t\t\tthis.container.scrollWidth - this.container.clientWidth;\n\n\t\t\tthis.container.scrollBy({\n\t\t\t\tleft: Math.min(itemWidth, maxScrollLeft - this.container.scrollLeft),\n\t\t\t\tbehavior: 'smooth',\n\t\t\t});\n\n\t\t\tthis.addCurrentClass();\n\t\t\tif (!this.isInfiniteLoop) this.addDisabledClass();\n\t\t} else this.calculateTransform();\n\n\t\tif (this.dots) this.setCurrentDot();\n\t}\n\n\tpublic goTo(i: number) {\n\t\tconst currentIndex = this.currentIndex;\n\t\tthis.currentIndex = i;\n\n\t\tif (this.isSnap) {\n\t\t\tconst itemWidth = this.sliderWidth / this.getCurrentSlidesQty();\n\t\t\tconst index =\n\t\t\t\tcurrentIndex > this.currentIndex\n\t\t\t\t\t? currentIndex - this.currentIndex\n\t\t\t\t\t: this.currentIndex - currentIndex;\n\t\t\tconst width =\n\t\t\t\tcurrentIndex > this.currentIndex\n\t\t\t\t\t? -(itemWidth * index)\n\t\t\t\t\t: itemWidth * index;\n\n\t\t\tthis.container.scrollBy({\n\t\t\t\tleft: width,\n\t\t\t\tbehavior: 'smooth',\n\t\t\t});\n\n\t\t\tthis.addCurrentClass();\n\t\t\tif (!this.isInfiniteLoop) this.addDisabledClass();\n\t\t} else this.calculateTransform();\n\n\t\tif (this.dots) this.setCurrentDot();\n\t}\n\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tif (this.loadingClassesAdd) {\n\t\t\tif (typeof this.loadingClassesAdd === 'string')\n\t\t\t\tthis.inner.classList.remove(this.loadingClassesAdd);\n\t\t\telse this.inner.classList.remove(...this.loadingClassesAdd);\n\t\t}\n\t\tif (this.inner && this.afterLoadingClassesAdd) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (typeof this.afterLoadingClassesAdd === 'string')\n\t\t\t\t\tthis.inner.classList.remove(this.afterLoadingClassesAdd);\n\t\t\t\telse this.inner.classList.remove(...this.afterLoadingClassesAdd);\n\t\t\t});\n\t\t}\n\t\tthis.el.classList.remove('init');\n\t\tthis.inner.classList.remove('dragging');\n\t\tthis.slides.forEach((el) => el.classList.remove('active'));\n\t\tif (this?.dotsItems?.length)\n\t\t\tthis.dotsItems.forEach((el) => el.classList.remove('active'));\n\t\tthis.prev.classList.remove('disabled');\n\t\tthis.next.classList.remove('disabled');\n\n\t\t// Remove styles\n\t\tthis.inner.style.width = '';\n\t\tthis.slides.forEach((el) => (el.style.width = ''));\n\t\tif (!this.isSnap) this.inner.style.transform = '';\n\t\tif (this.isAutoHeight) this.inner.style.height = '';\n\n\t\t// Remove listeners\n\t\tthis.prev.removeEventListener('click', this.onPrevClickListener);\n\t\tthis.next.removeEventListener('click', this.onNextClickListener);\n\t\tthis.container.removeEventListener(\n\t\t\t'scroll',\n\t\t\tthis.onContainerScrollListener,\n\t\t);\n\t\tthis.el.removeEventListener('touchstart', this.onElementTouchStartListener);\n\t\tthis.el.removeEventListener('touchend', this.onElementTouchEndListener);\n\t\tthis.inner.removeEventListener('mousedown', this.onInnerMouseDownListener);\n\t\tthis.inner.removeEventListener(\n\t\t\t'touchstart',\n\t\t\tthis.onInnerTouchStartListener,\n\t\t);\n\t\tdocument.removeEventListener('mousemove', this.onDocumentMouseMoveListener);\n\t\tdocument.removeEventListener('touchmove', this.onDocumentTouchMoveListener);\n\t\tdocument.removeEventListener('mouseup', this.onDocumentMouseUpListener);\n\t\tdocument.removeEventListener('touchend', this.onDocumentTouchEndListener);\n\t\tthis.inner.querySelectorAll('a:not(.prevented-click)').forEach((el) => {\n\t\t\tel.classList.remove('prevented-click');\n\t\t\tel.removeEventListener('click', this.removeClickEventWhileDragging);\n\t\t});\n\t\tif (\n\t\t\tthis?.dotsItems?.length ||\n\t\t\tthis.dots.querySelectorAll(':scope > *').length\n\t\t) {\n\t\t\tconst dots = this?.dotsItems || this.dots.querySelectorAll(':scope > *');\n\n\t\t\tdots.forEach((el) =>\n\t\t\t\tel.removeEventListener('click', this.onDotClickListener),\n\t\t\t);\n\n\t\t\tthis.dots.innerHTML = null;\n\t\t}\n\n\t\t// Remove elements\n\t\tthis.inner.querySelector('.hs-snap-before').remove();\n\t\tthis.inner.querySelector('.hs-snap-after').remove();\n\n\t\tthis.dotsItems = null;\n\n\t\tthis.isDragging = false;\n\t\tthis.dragStartX = null;\n\t\tthis.initialTranslateX = null;\n\n\t\twindow.$hsCarouselCollection = window.$hsCarouselCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsCarouselCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsCarouselCollection) window.$hsCarouselCollection = [];\n\n\t\tif (window.$hsCarouselCollection)\n\t\t\twindow.$hsCarouselCollection = window.$hsCarouselCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-carousel]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsCarouselCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSCarousel(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSCarousel: Function;\n\t\t$hsCarouselCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSCarousel.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Carousel collection:', window.$hsCarouselCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSCarousel = HSCarousel;\n}\n\nexport default HSCarousel;\n", "export const POSITIONS: any = {\n\tauto: 'auto',\n\t'auto-start': 'auto-start',\n\t'auto-end': 'auto-end',\n\ttop: 'top',\n\t'top-left': 'top-start',\n\t'top-right': 'top-end',\n\tbottom: 'bottom',\n\t'bottom-left': 'bottom-start',\n\t'bottom-right': 'bottom-end',\n\tright: 'right',\n\t'right-start': 'right-start',\n\t'right-end': 'right-end',\n\tleft: 'left',\n\t'left-start': 'left-start',\n\t'left-end': 'left-end',\n};\n\nexport const DROPDOWN_ACCESSIBILITY_KEY_SET = [\n\t'Escape',\n\t'ArrowUp',\n\t'ArrowDown',\n\t'ArrowRight',\n\t'ArrowLeft',\n\t'Home',\n\t'End',\n\t'Enter',\n];\n\nexport const OVERLAY_ACCESSIBILITY_KEY_SET = ['Escape', 'Tab'];\n\nexport const TABS_ACCESSIBILITY_KEY_SET = [\n\t'ArrowUp',\n\t'ArrowLeft',\n\t'ArrowDown',\n\t'ArrowRight',\n\t'Home',\n\t'End',\n];\n\nexport const SELECT_ACCESSIBILITY_KEY_SET = [\n\t'ArrowUp',\n\t'ArrowLeft',\n\t'ArrowDown',\n\t'ArrowRight',\n\t'Home',\n\t'End',\n\t'Escape',\n\t'Enter',\n\t'Space',\n\t'Tab',\n];\n\nexport const COMBO_BOX_ACCESSIBILITY_KEY_SET = [\n\t'ArrowUp',\n\t'ArrowLeft',\n\t'ArrowDown',\n\t'ArrowRight',\n\t'Home',\n\t'End',\n\t'Escape',\n\t'Enter',\n];\n\nexport const BREAKPOINTS: any = {\n\txs: 0,\n\tsm: 640,\n\tmd: 768,\n\tlg: 1024,\n\txl: 1280,\n\t'2xl': 1536,\n};\n", "/*\n * HSCollapse\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch, afterTransition } from '../../utils';\n\nimport { ICollapse } from '../collapse/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSCollapse extends HSBasePlugin<{}> implements ICollapse {\n\tprivate readonly contentId: string | null;\n\tpublic content: HTMLElement | null;\n\tprivate animationInProcess: boolean;\n\n\tprivate onElementClickListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: {}, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.contentId = this.el.dataset.hsCollapse;\n\t\tthis.content = document.querySelector(this.contentId);\n\t\tthis.animationInProcess = false;\n\n\t\tif (this.content) this.init();\n\t}\n\n\tprivate elementClick() {\n\t\tif (this.content.classList.contains('open')) {\n\t\t\tthis.hide();\n\t\t} else {\n\t\t\tthis.show();\n\t\t}\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsCollapseCollection, this);\n\n\t\tthis.onElementClickListener = () => this.elementClick();\n\n\t\tif (this?.el?.ariaExpanded) {\n\t\t\tif (this.el.classList.contains('open')) this.el.ariaExpanded = 'true';\n\t\t\telse this.el.ariaExpanded = 'false';\n\t\t}\n\n\t\tthis.el.addEventListener('click', this.onElementClickListener);\n\t}\n\n\tprivate hideAllMegaMenuItems() {\n\t\tthis.content\n\t\t\t.querySelectorAll('.hs-mega-menu-content.block')\n\t\t\t.forEach((el) => {\n\t\t\t\tel.classList.remove('block');\n\t\t\t\tel.classList.add('hidden');\n\t\t\t});\n\t}\n\n\t// Public methods\n\tpublic show() {\n\t\tif (this.animationInProcess || this.el.classList.contains('open'))\n\t\t\treturn false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tthis.el.classList.add('open');\n\t\tif (this?.el?.ariaExpanded) this.el.ariaExpanded = 'true';\n\t\tthis.content.classList.add('open');\n\t\tthis.content.classList.remove('hidden');\n\n\t\tthis.content.style.height = '0';\n\t\tsetTimeout(() => {\n\t\t\tthis.content.style.height = `${this.content.scrollHeight}px`;\n\n\t\t\tthis.fireEvent('beforeOpen', this.el);\n\t\t\tdispatch('beforeOpen.hs.collapse', this.el, this.el);\n\t\t});\n\n\t\tafterTransition(this.content, () => {\n\t\t\tthis.content.style.height = '';\n\n\t\t\tthis.fireEvent('open', this.el);\n\t\t\tdispatch('open.hs.collapse', this.el, this.el);\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\t}\n\n\tpublic hide() {\n\t\tif (this.animationInProcess || !this.el.classList.contains('open'))\n\t\t\treturn false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tthis.el.classList.remove('open');\n\t\tif (this?.el?.ariaExpanded) this.el.ariaExpanded = 'false';\n\n\t\tthis.content.style.height = `${this.content.scrollHeight}px`;\n\t\tsetTimeout(() => {\n\t\t\tthis.content.style.height = '0';\n\t\t});\n\n\t\tthis.content.classList.remove('open');\n\n\t\tafterTransition(this.content, () => {\n\t\t\tthis.content.classList.add('hidden');\n\t\t\tthis.content.style.height = '';\n\n\t\t\tthis.fireEvent('hide', this.el);\n\t\t\tdispatch('hide.hs.collapse', this.el, this.el);\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tif (this.content.querySelectorAll('.hs-mega-menu-content.block').length) {\n\t\t\tthis.hideAllMegaMenuItems();\n\t\t}\n\t}\n\n\tpublic destroy() {\n\t\tthis.el.removeEventListener('click', this.onElementClickListener);\n\n\t\tthis.content = null;\n\t\tthis.animationInProcess = false;\n\n\t\twindow.$hsCollapseCollection = window.$hsCollapseCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tprivate static findInCollection(target: HSCollapse | HTMLElement | string): ICollectionItem | null {\n\t\treturn window.$hsCollapseCollection.find((el) => {\n\t\t\tif (target instanceof HSCollapse) return el.element.el === target.el;\n\t\t\telse if (typeof target === 'string') return el.element.el === document.querySelector(target);\n\t\t\telse return el.element.el === target;\n\t\t}) || null;\n\t}\n\n\tstatic getInstance(target: HTMLElement, isInstance = false) {\n\t\tconst elInCollection = window.$hsCollapseCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsCollapseCollection) window.$hsCollapseCollection = [];\n\n\t\tif (window.$hsCollapseCollection)\n\t\t\twindow.$hsCollapseCollection = window.$hsCollapseCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-collapse-toggle:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsCollapseCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSCollapse(el);\n\t\t\t});\n\t}\n\n\tstatic show(target: HSCollapse | HTMLElement | string) {\n\t\tconst instance = HSCollapse.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\tinstance.element.content.classList.contains('hidden')\n\t\t) instance.element.show();\n\t}\n\n\tstatic hide(target: HSCollapse | HTMLElement | string) {\n\t\tconst instance = HSCollapse.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\t!instance.element.content.classList.contains('hidden')\n\t\t) instance.element.hide();\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HSCollapse | HTMLElement | string, cb: Function) {\n\t\tconst instance = HSCollapse.findInCollection(target);\n\n\t\tif (instance) instance.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSCollapse: Function;\n\t\t$hsCollapseCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSCollapse.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Collapse collection:', window.$hsCollapseCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSCollapse = HSCollapse;\n}\n\nexport default HSCollapse;\n", "/*\n * HSComboBox\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tisEnoughSpace,\n\tdebounce,\n\tdispatch,\n\tafterTransition,\n\thtmlToElement,\n\tisParentOrElementHidden,\n} from '../../utils';\n\nimport {\n\tIComboBox,\n\tIComboBoxOptions,\n\tIComboBoxItemAttr,\n} from '../combobox/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { COMBO_BOX_ACCESSIBILITY_KEY_SET } from '../../constants';\n\nclass HSComboBox extends HSBasePlugin implements IComboBox {\n\tgap: number;\n\tviewport: string | HTMLElement | null;\n\tpreventVisibility: boolean;\n\tminSearchLength: number;\n\tapiUrl: string | null;\n\tapiDataPart: string | null;\n\tapiQuery: string | null;\n\tapiSearchQuery: string | null;\n\tapiSearchPath: string | null;\n\tapiSearchDefaultPath: string | null;\n\tapiHeaders: {};\n\tapiGroupField: string | null;\n\toutputItemTemplate: string | null;\n\toutputEmptyTemplate: string | null;\n\toutputLoaderTemplate: string | null;\n\tgroupingType: 'default' | 'tabs' | null;\n\tgroupingTitleTemplate: string | null;\n\ttabsWrapperTemplate: string | null;\n\tpreventSelection: boolean;\n\tpreventAutoPosition: boolean;\n\tisOpenOnFocus: boolean;\n\n\tprivate readonly input: HTMLInputElement | null;\n\tprivate readonly output: HTMLElement | null;\n\tprivate readonly itemsWrapper: HTMLElement | null;\n\tprivate items: HTMLElement[] | [];\n\tprivate tabs: HTMLElement[] | [];\n\tprivate readonly toggle: HTMLElement | null;\n\tprivate readonly toggleClose: HTMLElement | null;\n\tprivate readonly toggleOpen: HTMLElement | null;\n\tprivate outputPlaceholder: HTMLElement | null;\n\tprivate outputLoader: HTMLElement | null;\n\n\tprivate value: string | null;\n\tprivate selected: string | null;\n\tprivate currentData: {} | {}[] | null;\n\tprivate groups: any[] | null;\n\tprivate selectedGroup: string | null;\n\n\tisOpened: boolean;\n\tisCurrent: boolean;\n\tprivate animationInProcess: boolean;\n\tprivate isSearchLengthExceeded = false;\n\n\tprivate onInputFocusListener: () => void;\n\tprivate onInputInputListener: (evt: InputEvent) => void;\n\tprivate onToggleClickListener: () => void;\n\tprivate onToggleCloseClickListener: () => void;\n\tprivate onToggleOpenClickListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: IComboBoxOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\t// Data parameters\n\t\tconst data = el.getAttribute('data-hs-combo-box');\n\t\tconst dataOptions: IComboBoxOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.gap = 5;\n\t\tthis.viewport =\n\t\t\t(typeof concatOptions?.viewport === 'string'\n\t\t\t\t? (document.querySelector(concatOptions?.viewport) as HTMLElement)\n\t\t\t\t: concatOptions?.viewport) ?? null;\n\t\tthis.preventVisibility = concatOptions?.preventVisibility ?? false;\n\t\tthis.minSearchLength = concatOptions?.minSearchLength ?? 0;\n\t\tthis.apiUrl = concatOptions?.apiUrl ?? null;\n\t\tthis.apiDataPart = concatOptions?.apiDataPart ?? null;\n\t\tthis.apiQuery = concatOptions?.apiQuery ?? null;\n\t\tthis.apiSearchQuery = concatOptions?.apiSearchQuery ?? null;\n\t\tthis.apiSearchPath = concatOptions?.apiSearchPath ?? null;\n\t\tthis.apiSearchDefaultPath = concatOptions?.apiSearchDefaultPath ?? null;\n\t\tthis.apiHeaders = concatOptions?.apiHeaders ?? {};\n\t\tthis.apiGroupField = concatOptions?.apiGroupField ?? null;\n\t\tthis.outputItemTemplate =\n\t\t\tconcatOptions?.outputItemTemplate ??\n\t\t\t`\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t`;\n\t\tthis.outputEmptyTemplate =\n\t\t\tconcatOptions?.outputEmptyTemplate ??\n\t\t\t`Nothing found...`;\n\t\tthis.outputLoaderTemplate =\n\t\t\tconcatOptions?.outputLoaderTemplate ??\n\t\t\t`\n\t\t\t\t\n\t\t\t\t\tLoading...\n\t\t\t\t\n\t\t\t`;\n\t\tthis.groupingType = concatOptions?.groupingType ?? null;\n\t\tthis.groupingTitleTemplate =\n\t\t\tconcatOptions?.groupingTitleTemplate ??\n\t\t\t(this.groupingType === 'default'\n\t\t\t\t? ``\n\t\t\t\t: ``);\n\t\tthis.tabsWrapperTemplate =\n\t\t\tconcatOptions?.tabsWrapperTemplate ??\n\t\t\t``;\n\t\tthis.preventSelection = concatOptions?.preventSelection ?? false;\n\t\tthis.preventAutoPosition = concatOptions?.preventAutoPosition ?? false;\n\t\tthis.isOpenOnFocus = concatOptions?.isOpenOnFocus ?? false;\n\n\t\t// Internal parameters\n\t\tthis.input = this.el.querySelector('[data-hs-combo-box-input]') ?? null;\n\t\tthis.output = this.el.querySelector('[data-hs-combo-box-output]') ?? null;\n\t\tthis.itemsWrapper =\n\t\t\tthis.el.querySelector('[data-hs-combo-box-output-items-wrapper]') ?? null;\n\t\tthis.items =\n\t\t\tArray.from(this.el.querySelectorAll('[data-hs-combo-box-output-item]')) ??\n\t\t\t[];\n\t\tthis.tabs = [];\n\t\tthis.toggle = this.el.querySelector('[data-hs-combo-box-toggle]') ?? null;\n\t\tthis.toggleClose =\n\t\t\tthis.el.querySelector('[data-hs-combo-box-close]') ?? null;\n\t\tthis.toggleOpen = this.el.querySelector('[data-hs-combo-box-open]') ?? null;\n\t\tthis.outputPlaceholder = null;\n\n\t\tthis.selected = this.value =\n\t\t\t(this.el.querySelector('[data-hs-combo-box-input]') as HTMLInputElement)\n\t\t\t\t.value ?? '';\n\t\tthis.currentData = null;\n\t\tthis.isOpened = false;\n\t\tthis.isCurrent = false;\n\t\tthis.animationInProcess = false;\n\t\tthis.selectedGroup = 'all';\n\n\t\tthis.init();\n\t}\n\n\tprivate inputFocus() {\n\t\tif (!this.isOpened) {\n\t\t\tthis.setResultAndRender();\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tprivate inputInput(evt: InputEvent) {\n\t\tconst val = (evt.target as HTMLInputElement).value.trim();\n\n\t\tif (val.length <= this.minSearchLength) this.setResultAndRender('');\n\t\telse this.setResultAndRender(val);\n\n\t\tif (this.input.value !== '') this.el.classList.add('has-value');\n\t\telse this.el.classList.remove('has-value');\n\n\t\tif (!this.isOpened) this.open();\n\t}\n\n\tprivate toggleClick() {\n\t\tif (this.isOpened) this.close();\n\t\telse this.open(this.toggle.getAttribute('data-hs-combo-box-toggle'));\n\t}\n\n\tprivate toggleCloseClick() {\n\t\tthis.close();\n\t}\n\n\tprivate toggleOpenClick() {\n\t\tthis.open();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsComboBoxCollection, this);\n\n\t\tthis.build();\n\t}\n\n\tprivate build() {\n\t\tthis.buildInput();\n\t\tif (this.groupingType) this.setGroups();\n\t\tthis.buildItems();\n\t\tif (this.preventVisibility) {\n\t\t\t// TODO:: test the plugin while the line below is commented.\n\t\t\t// this.isOpened = true;\n\n\t\t\tif (!this.preventAutoPosition) this.recalculateDirection();\n\t\t}\n\t\tif (this.toggle) this.buildToggle();\n\t\tif (this.toggleClose) this.buildToggleClose();\n\t\tif (this.toggleOpen) this.buildToggleOpen();\n\t}\n\n\tprivate getNestedProperty(obj: T, path: string): any {\n\t\treturn path.split('.').reduce((acc: any, key: string) => acc && acc[key], obj);\n\t}\n\n\tprivate setValue(val: string, data: {} | null = null) {\n\t\tthis.selected = val;\n\t\tthis.value = val;\n\t\tthis.input.value = val;\n\n\t\tif (data) this.currentData = data;\n\n\t\tthis.fireEvent('select', this.currentData);\n\t\tdispatch('select.hs.combobox', this.el, this.currentData);\n\t}\n\n\tprivate setValueAndOpen(val: string) {\n\t\tthis.value = val;\n\n\t\tif (this.items.length) {\n\t\t\tthis.setItemsVisibility();\n\t\t}\n\t}\n\n\tprivate setValueAndClear(val: string | null, data: {} | null = null) {\n\t\tif (val) this.setValue(val, data);\n\t\telse this.setValue(this.selected, data);\n\n\t\tif (this.outputPlaceholder) this.destroyOutputPlaceholder();\n\t}\n\n\tprivate setSelectedByValue(val: string[]) {\n\t\tthis.items.forEach((el) => {\n\t\t\tif (this.isTextExists(el, val))\n\t\t\t\t(el as HTMLElement).classList.add('selected');\n\t\t\telse (el as HTMLElement).classList.remove('selected');\n\t\t});\n\t}\n\n\tprivate setResultAndRender(value = '') {\n\t\t// TODO:: test the plugin with below code added.\n\t\tlet _value = this.preventVisibility ? this.input.value : value;\n\n\t\tthis.setResults(_value);\n\n\t\tif (this.apiSearchQuery || this.apiSearchPath || this.apiSearchDefaultPath) this.itemsFromJson();\n\n\t\tif (_value === '') this.isSearchLengthExceeded = true;\n\t\telse this.isSearchLengthExceeded = false;\n\t}\n\n\tprivate setResults(val: string) {\n\t\tthis.value = val;\n\n\t\tthis.resultItems();\n\n\t\tif (this.hasVisibleItems()) this.destroyOutputPlaceholder();\n\t\telse this.buildOutputPlaceholder();\n\t}\n\n\tprivate setGroups() {\n\t\tconst groups: any[] = [];\n\n\t\tthis.items.forEach((item: HTMLElement) => {\n\t\t\tconst { group } = JSON.parse(\n\t\t\t\titem.getAttribute('data-hs-combo-box-output-item'),\n\t\t\t);\n\n\t\t\tif (!groups.some((el) => el?.name === group.name)) {\n\t\t\t\tgroups.push(group);\n\t\t\t}\n\t\t});\n\n\t\tthis.groups = groups;\n\t}\n\n\tprivate setApiGroups(items: any) {\n\t\tconst groups: any[] = [];\n\n\t\titems.forEach((item: any) => {\n\t\t\tconst group = item[this.apiGroupField];\n\n\t\t\tif (!groups.some((el) => el.name === group)) {\n\t\t\t\tgroups.push({\n\t\t\t\t\tname: group,\n\t\t\t\t\ttitle: group,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tthis.groups = groups;\n\t}\n\n\tprivate setItemsVisibility() {\n\t\tif (this.groupingType === 'tabs' && this.selectedGroup !== 'all') {\n\t\t\tthis.items.forEach((item) => {\n\t\t\t\t(item as HTMLElement).style.display = 'none';\n\t\t\t});\n\t\t}\n\n\t\tconst items =\n\t\t\tthis.groupingType === 'tabs'\n\t\t\t\t? this.selectedGroup === 'all'\n\t\t\t\t\t? this.items\n\t\t\t\t\t: this.items.filter((f: HTMLElement) => {\n\t\t\t\t\t\tconst { group } = JSON.parse(\n\t\t\t\t\t\t\tf.getAttribute('data-hs-combo-box-output-item'),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn group.name === this.selectedGroup;\n\t\t\t\t\t})\n\t\t\t\t: this.items;\n\n\t\tif (this.groupingType === 'tabs' && this.selectedGroup !== 'all') {\n\t\t\titems.forEach((item) => {\n\t\t\t\t(item as HTMLElement).style.display = 'block';\n\t\t\t});\n\t\t}\n\n\t\titems.forEach((item) => {\n\t\t\tif (!this.isTextExistsAny(item, this.value))\n\t\t\t\t(item as HTMLElement).style.display = 'none';\n\t\t\telse (item as HTMLElement).style.display = 'block';\n\t\t});\n\n\t\tif (this.groupingType === 'default') {\n\t\t\tthis.output\n\t\t\t\t.querySelectorAll('[data-hs-combo-box-group-title]')\n\t\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\t\tconst g = el.getAttribute('data-hs-combo-box-group-title');\n\t\t\t\t\tconst items = this.items.filter((f: HTMLElement) => {\n\t\t\t\t\t\tconst { group } = JSON.parse(\n\t\t\t\t\t\t\tf.getAttribute('data-hs-combo-box-output-item'),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn group.name === g && f.style.display === 'block';\n\t\t\t\t\t});\n\n\t\t\t\t\tif (items.length) el.style.display = 'block';\n\t\t\t\t\telse el.style.display = 'none';\n\t\t\t\t});\n\t\t}\n\t}\n\n\tprivate isTextExists(el: HTMLElement, val: string[]): boolean {\n\t\tconst lowerCased = val.map((v) => v.toLowerCase());\n\n\t\treturn Array.from(\n\t\t\tel.querySelectorAll('[data-hs-combo-box-search-text]'),\n\t\t).some((elI: HTMLElement) =>\n\t\t\tlowerCased.includes(\n\t\t\t\telI.getAttribute('data-hs-combo-box-search-text').toLowerCase(),\n\t\t\t),\n\t\t);\n\t}\n\n\tprivate isTextExistsAny(el: HTMLElement, val: string): boolean {\n\t\treturn Array.from(\n\t\t\tel.querySelectorAll('[data-hs-combo-box-search-text]'),\n\t\t).some((elI: HTMLElement) =>\n\t\t\telI\n\t\t\t\t.getAttribute('data-hs-combo-box-search-text')\n\t\t\t\t.toLowerCase()\n\t\t\t\t.includes(val.toLowerCase()),\n\t\t);\n\t}\n\n\tprivate hasVisibleItems() {\n\t\treturn this.items.length\n\t\t\t? this.items.some((el: HTMLElement) => el.style.display === 'block')\n\t\t\t: false;\n\t}\n\n\tprivate valuesBySelector(el: HTMLElement) {\n\t\treturn Array.from(\n\t\t\tel.querySelectorAll('[data-hs-combo-box-search-text]'),\n\t\t).reduce(\n\t\t\t(acc: any, cur: HTMLElement) => [\n\t\t\t\t...acc,\n\t\t\t\tcur.getAttribute('data-hs-combo-box-search-text'),\n\t\t\t],\n\t\t\t[],\n\t\t);\n\t}\n\n\tprivate sortItems() {\n\t\tconst compareFn = (i1: HTMLElement, i2: HTMLElement) => {\n\t\t\tconst a = i1\n\t\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t\t.getAttribute('data-hs-combo-box-search-text');\n\t\t\tconst b = i2\n\t\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t\t.getAttribute('data-hs-combo-box-search-text');\n\n\t\t\tif (a < b) {\n\t\t\t\treturn -1;\n\t\t\t} else if (a > b) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t};\n\n\t\treturn this.items.sort(compareFn);\n\t}\n\n\tprivate buildInput() {\n\t\tif (this.isOpenOnFocus) {\n\t\t\tthis.onInputFocusListener = () => this.inputFocus();\n\n\t\t\tthis.input.addEventListener('focus', this.onInputFocusListener);\n\t\t}\n\n\t\tthis.onInputInputListener = debounce((evt: InputEvent) =>\n\t\t\tthis.inputInput(evt),\n\t\t);\n\n\t\tthis.input.addEventListener('input', this.onInputInputListener);\n\t}\n\n\tprivate async buildItems() {\n\t\tthis.output.role = 'listbox';\n\t\tthis.output.tabIndex = -1;\n\t\tthis.output.ariaOrientation = 'vertical';\n\n\t\tif (this.apiUrl) await this.itemsFromJson();\n\t\telse {\n\t\t\tif (this.itemsWrapper) this.itemsWrapper.innerHTML = '';\n\t\t\telse this.output.innerHTML = '';\n\t\t\tthis.itemsFromHtml();\n\t\t}\n\n\t\tif (this.items[0].classList.contains('selected'))\n\t\t\tthis.currentData = JSON.parse(this.items[0].getAttribute('data-hs-combo-box-item-stored-data'));\n\t}\n\n\tprivate buildOutputLoader() {\n\t\tif (this.outputLoader) return false;\n\n\t\tthis.outputLoader = htmlToElement(this.outputLoaderTemplate);\n\t\tif (this.items.length || this.outputPlaceholder) {\n\t\t\tthis.outputLoader.style.position = 'absolute';\n\t\t\tthis.outputLoader.style.top = '0';\n\t\t\tthis.outputLoader.style.bottom = '0';\n\t\t\tthis.outputLoader.style.left = '0';\n\t\t\tthis.outputLoader.style.right = '0';\n\t\t\tthis.outputLoader.style.zIndex = '2';\n\t\t} else {\n\t\t\tthis.outputLoader.style.position = '';\n\t\t\tthis.outputLoader.style.top = '';\n\t\t\tthis.outputLoader.style.bottom = '';\n\t\t\tthis.outputLoader.style.left = '';\n\t\t\tthis.outputLoader.style.right = '';\n\t\t\tthis.outputLoader.style.zIndex = '';\n\t\t\tthis.outputLoader.style.height = '30px';\n\t\t}\n\n\t\tthis.output.append(this.outputLoader);\n\t}\n\n\tprivate buildToggle() {\n\t\tif (this.isOpened) {\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\t\t\tif (this?.input?.ariaExpanded) this.input.ariaExpanded = 'true';\n\t\t} else {\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\t\t\tif (this?.input?.ariaExpanded) this.input.ariaExpanded = 'false';\n\t\t}\n\n\t\tthis.onToggleClickListener = () => this.toggleClick();\n\n\t\tthis.toggle.addEventListener('click', this.onToggleClickListener);\n\t}\n\n\tprivate buildToggleClose() {\n\t\tthis.onToggleCloseClickListener = () => this.toggleCloseClick();\n\n\t\tthis.toggleClose.addEventListener('click', this.onToggleCloseClickListener);\n\t}\n\n\tprivate buildToggleOpen() {\n\t\tthis.onToggleOpenClickListener = () => this.toggleOpenClick();\n\n\t\tthis.toggleOpen.addEventListener('click', this.onToggleOpenClickListener);\n\t}\n\n\tprivate buildOutputPlaceholder() {\n\t\tif (!this.outputPlaceholder)\n\t\t\tthis.outputPlaceholder = htmlToElement(this.outputEmptyTemplate);\n\n\t\tthis.appendItemsToWrapper(this.outputPlaceholder);\n\t}\n\n\tprivate destroyOutputLoader() {\n\t\tif (this.outputLoader) this.outputLoader.remove();\n\n\t\tthis.outputLoader = null;\n\t}\n\n\tprivate itemRender(item: HTMLElement) {\n\t\tconst val = item\n\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t.getAttribute('data-hs-combo-box-search-text');\n\t\tconst data = JSON.parse(item.getAttribute('data-hs-combo-box-item-stored-data')) ?? null;\n\n\t\tif (this.itemsWrapper) this.itemsWrapper.append(item);\n\t\telse this.output.append(item);\n\n\t\tif (!this.preventSelection) {\n\t\t\titem.addEventListener('click', () => {\n\t\t\t\tthis.close(val, data);\n\t\t\t\tthis.setSelectedByValue(this.valuesBySelector(item));\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate plainRender(items: HTMLElement[]) {\n\t\titems.forEach((item: HTMLElement) => {\n\t\t\tthis.itemRender(item);\n\t\t});\n\t}\n\n\tprivate jsonItemsRender(items: any) {\n\t\titems.forEach((item: never, index: number) => {\n\t\t\tconst newItem = htmlToElement(this.outputItemTemplate);\n\t\t\tnewItem.setAttribute('data-hs-combo-box-item-stored-data', JSON.stringify(item));\n\t\t\tnewItem\n\t\t\t\t.querySelectorAll('[data-hs-combo-box-output-item-field]')\n\t\t\t\t.forEach((el) => {\n\t\t\t\t\tconst value = this.getNestedProperty(item, el.getAttribute('data-hs-combo-box-output-item-field'));\n\t\t\t\t\tconst hideIfEmpty = el.hasAttribute(\n\t\t\t\t\t\t'data-hs-combo-box-output-item-hide-if-empty',\n\t\t\t\t\t);\n\n\t\t\t\t\tel.textContent = value ?? '';\n\t\t\t\t\tif (!value && hideIfEmpty) (el as HTMLElement).style.display = 'none';\n\t\t\t\t});\n\t\t\tnewItem\n\t\t\t\t.querySelectorAll('[data-hs-combo-box-search-text]')\n\t\t\t\t.forEach((el) => {\n\t\t\t\t\tconst value = this.getNestedProperty(item, el.getAttribute('data-hs-combo-box-output-item-field'));\n\n\t\t\t\t\tel.setAttribute(\n\t\t\t\t\t\t'data-hs-combo-box-search-text',\n\t\t\t\t\t\tvalue ?? '',\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\tnewItem\n\t\t\t\t.querySelectorAll('[data-hs-combo-box-output-item-attr]')\n\t\t\t\t.forEach((el) => {\n\t\t\t\t\tconst attributes = JSON.parse(\n\t\t\t\t\t\tel.getAttribute('data-hs-combo-box-output-item-attr'),\n\t\t\t\t\t);\n\n\t\t\t\t\tattributes.forEach((attr: IComboBoxItemAttr) => {\n\t\t\t\t\t\tel.setAttribute(attr.attr, item[attr.valueFrom]);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\tnewItem.setAttribute('tabIndex', `${index}`);\n\t\t\tif (this.groupingType === 'tabs' || this.groupingType === 'default') {\n\t\t\t\tnewItem.setAttribute(\n\t\t\t\t\t'data-hs-combo-box-output-item',\n\t\t\t\t\t`{\"group\": {\"name\": \"${item[this.apiGroupField]}\", \"title\": \"${item[this.apiGroupField]\n\t\t\t\t\t}\"}}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.items = [...this.items, newItem];\n\n\t\t\tif (!this.preventSelection) {\n\t\t\t\t(newItem as HTMLElement).addEventListener('click', () => {\n\t\t\t\t\tthis.close(\n\t\t\t\t\t\t(newItem as HTMLElement)\n\t\t\t\t\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t\t\t\t\t.getAttribute('data-hs-combo-box-search-text'),\n\t\t\t\t\t\tJSON.parse((newItem as HTMLElement)\n\t\t\t\t\t\t\t.getAttribute('data-hs-combo-box-item-stored-data')),\n\t\t\t\t\t);\n\n\t\t\t\t\tthis.setSelectedByValue(this.valuesBySelector(newItem));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.appendItemsToWrapper(newItem);\n\t\t});\n\t}\n\n\tprivate groupDefaultRender() {\n\t\tthis.groups.forEach((el) => {\n\t\t\tconst title = htmlToElement(this.groupingTitleTemplate);\n\t\t\ttitle.setAttribute('data-hs-combo-box-group-title', el.name);\n\t\t\ttitle.classList.add('--exclude-accessibility');\n\t\t\ttitle.innerText = el.title;\n\n\t\t\tif (this.itemsWrapper) this.itemsWrapper.append(title);\n\t\t\telse this.output.append(title);\n\n\t\t\tconst items = this.sortItems().filter((f) => {\n\t\t\t\tconst { group } = JSON.parse(\n\t\t\t\t\tf.getAttribute('data-hs-combo-box-output-item'),\n\t\t\t\t);\n\n\t\t\t\treturn group.name === el.name;\n\t\t\t});\n\n\t\t\tthis.plainRender(items);\n\t\t});\n\t}\n\n\tprivate groupTabsRender() {\n\t\tconst tabsScroll = htmlToElement(this.tabsWrapperTemplate);\n\t\tconst tabsWrapper = htmlToElement(\n\t\t\t``,\n\t\t);\n\n\t\ttabsScroll.append(tabsWrapper);\n\t\tthis.output.insertBefore(tabsScroll, this.output.firstChild);\n\n\t\tconst tabDef = htmlToElement(this.groupingTitleTemplate);\n\t\ttabDef.setAttribute('data-hs-combo-box-group-title', 'all');\n\t\ttabDef.classList.add('--exclude-accessibility', 'active');\n\t\ttabDef.innerText = 'All';\n\t\tthis.tabs = [...this.tabs, tabDef];\n\t\ttabsWrapper.append(tabDef);\n\t\ttabDef.addEventListener('click', () => {\n\t\t\tthis.selectedGroup = 'all';\n\t\t\tconst selectedTab = this.tabs.find(\n\t\t\t\t(elI: HTMLElement) =>\n\t\t\t\t\telI.getAttribute('data-hs-combo-box-group-title') ===\n\t\t\t\t\tthis.selectedGroup,\n\t\t\t);\n\n\t\t\tthis.tabs.forEach((el: HTMLElement) => el.classList.remove('active'));\n\t\t\tselectedTab.classList.add('active');\n\t\t\tthis.setItemsVisibility();\n\t\t});\n\n\t\tthis.groups.forEach((el) => {\n\t\t\tconst tab = htmlToElement(this.groupingTitleTemplate);\n\t\t\ttab.setAttribute('data-hs-combo-box-group-title', el.name);\n\t\t\ttab.classList.add('--exclude-accessibility');\n\t\t\ttab.innerText = el.title;\n\n\t\t\tthis.tabs = [...this.tabs, tab];\n\t\t\ttabsWrapper.append(tab);\n\n\t\t\ttab.addEventListener('click', () => {\n\t\t\t\tthis.selectedGroup = el.name;\n\t\t\t\tconst selectedTab = this.tabs.find(\n\t\t\t\t\t(elI: HTMLElement) =>\n\t\t\t\t\t\telI.getAttribute('data-hs-combo-box-group-title') ===\n\t\t\t\t\t\tthis.selectedGroup,\n\t\t\t\t);\n\n\t\t\t\tthis.tabs.forEach((el: HTMLElement) => el.classList.remove('active'));\n\t\t\t\tselectedTab.classList.add('active');\n\t\t\t\tthis.setItemsVisibility();\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate itemsFromHtml() {\n\t\tif (this.groupingType === 'default') {\n\t\t\tthis.groupDefaultRender();\n\t\t} else if (this.groupingType === 'tabs') {\n\t\t\tconst items = this.sortItems();\n\n\t\t\tthis.groupTabsRender();\n\t\t\tthis.plainRender(items);\n\t\t} else {\n\t\t\tconst items = this.sortItems();\n\n\t\t\tthis.plainRender(items);\n\t\t}\n\t\tthis.setResults(this.input.value);\n\t}\n\n\tprivate async itemsFromJson() {\n\t\tif (this.isSearchLengthExceeded) return false;\n\n\t\tthis.buildOutputLoader();\n\n\t\ttry {\n\t\t\tconst query = `${this.apiQuery}`;\n\t\t\tlet searchQuery;\n\t\t\tlet searchPath;\n\t\t\tlet url = this.apiUrl;\n\n\t\t\tif (!this.apiSearchQuery && this.apiSearchPath) {\n\t\t\t\tif (this.apiSearchDefaultPath && this.value === '') {\n\t\t\t\t\tsearchPath = `/${this.apiSearchDefaultPath}`;\n\t\t\t\t} else {\n\t\t\t\t\tsearchPath = `/${this.apiSearchPath}/${this.value.toLowerCase()}`;\n\t\t\t\t}\n\n\t\t\t\tif (this.apiSearchPath || this.apiSearchDefaultPath) {\n\t\t\t\t\turl += searchPath;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsearchQuery = `${this.apiSearchQuery}=${this.value.toLowerCase()}`;\n\n\t\t\t\tif (this.apiQuery && this.apiSearchQuery) {\n\t\t\t\t\turl += `?${searchQuery}&${query}`;\n\t\t\t\t} else if (this.apiQuery) {\n\t\t\t\t\turl += `?${query}`;\n\t\t\t\t} else if (this.apiSearchQuery) {\n\t\t\t\t\turl += `?${searchQuery}`;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst res = await fetch(url, this.apiHeaders);\n\t\t\tlet items = await res.json();\n\n\t\t\tif (this.apiDataPart) {\n\t\t\t\titems = items[this.apiDataPart];\n\t\t\t}\n\t\t\tif (this.apiSearchQuery || this.apiSearchPath) {\n\t\t\t\tthis.items = [];\n\t\t\t}\n\t\t\tif (this.itemsWrapper) {\n\t\t\t\tthis.itemsWrapper.innerHTML = '';\n\t\t\t} else {\n\t\t\t\tthis.output.innerHTML = '';\n\t\t\t}\n\n\t\t\tif (this.groupingType === 'tabs') {\n\t\t\t\tthis.setApiGroups(items);\n\t\t\t\tthis.groupTabsRender();\n\t\t\t\tthis.jsonItemsRender(items);\n\t\t\t} else if (this.groupingType === 'default') {\n\t\t\t\tthis.setApiGroups(items);\n\n\t\t\t\tthis.groups.forEach((el) => {\n\t\t\t\t\tconst title = htmlToElement(this.groupingTitleTemplate);\n\t\t\t\t\ttitle.setAttribute('data-hs-combo-box-group-title', el.name);\n\t\t\t\t\ttitle.classList.add('--exclude-accessibility');\n\t\t\t\t\ttitle.innerText = el.title;\n\t\t\t\t\tconst newItems = items.filter(\n\t\t\t\t\t\t(i: any) => i[this.apiGroupField] === el.name,\n\t\t\t\t\t);\n\n\t\t\t\t\tif (this.itemsWrapper) this.itemsWrapper.append(title);\n\t\t\t\t\telse this.output.append(title);\n\n\t\t\t\t\tthis.jsonItemsRender(newItems);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.jsonItemsRender(items);\n\t\t\t}\n\n\t\t\tthis.setResults(this.input.value.length <= this.minSearchLength ? '' : this.input.value);\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\n\t\t\tthis.buildOutputPlaceholder();\n\t\t}\n\n\t\tthis.destroyOutputLoader();\n\t}\n\n\tprivate appendItemsToWrapper(item: HTMLElement) {\n\t\tif (this.itemsWrapper) {\n\t\t\tthis.itemsWrapper.append(item);\n\t\t} else {\n\t\t\tthis.output.append(item);\n\t\t}\n\t}\n\n\tprivate resultItems() {\n\t\tif (!this.items.length) return false;\n\n\t\tthis.setItemsVisibility();\n\t\tthis.setSelectedByValue([this.selected]);\n\t}\n\n\tprivate destroyOutputPlaceholder() {\n\t\tif (this.outputPlaceholder) this.outputPlaceholder.remove();\n\n\t\tthis.outputPlaceholder = null;\n\t}\n\n\t// Public methods\n\tpublic getCurrentData() {\n\t\treturn this.currentData;\n\t}\n\n\tpublic setCurrent() {\n\t\tif (window.$hsComboBoxCollection.length) {\n\t\t\twindow.$hsComboBoxCollection.map((el) => (el.element.isCurrent = false));\n\n\t\t\tthis.isCurrent = true;\n\t\t}\n\t}\n\n\tpublic open(val?: string) {\n\t\tif (this.animationInProcess) return false;\n\n\t\tif (typeof val !== 'undefined') this.setValueAndOpen(val);\n\n\t\tif (this.preventVisibility) return false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tthis.output.style.display = 'block';\n\t\tif (!this.preventAutoPosition) this.recalculateDirection();\n\n\t\tsetTimeout(() => {\n\t\t\tif (this?.input?.ariaExpanded) this.input.ariaExpanded = 'true';\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\t\t\tthis.el.classList.add('active');\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tthis.isOpened = true;\n\t}\n\n\tpublic close(val?: string | null, data: {} | null = null) {\n\t\tif (this.animationInProcess) return false;\n\n\t\tif (this.preventVisibility) {\n\t\t\tthis.setValueAndClear(val, data);\n\n\t\t\tif (this.input.value !== '') this.el.classList.add('has-value');\n\t\t\telse this.el.classList.remove('has-value');\n\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.animationInProcess = true;\n\n\t\tif (this?.input?.ariaExpanded) this.input.ariaExpanded = 'false';\n\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\t\tthis.el.classList.remove('active');\n\t\tif (!this.preventAutoPosition) {\n\t\t\tthis.output.classList.remove('bottom-full', 'top-full');\n\t\t\tthis.output.style.marginTop = '';\n\t\t\tthis.output.style.marginBottom = '';\n\t\t}\n\n\t\tafterTransition(this.output, () => {\n\t\t\tthis.output.style.display = 'none';\n\n\t\t\tthis.setValueAndClear(val, data || null);\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tif (this.input.value !== '') this.el.classList.add('has-value');\n\t\telse this.el.classList.remove('has-value');\n\n\t\tthis.isOpened = false;\n\t}\n\n\tpublic recalculateDirection() {\n\t\tif (\n\t\t\tisEnoughSpace(\n\t\t\t\tthis.output,\n\t\t\t\tthis.input,\n\t\t\t\t'bottom',\n\t\t\t\tthis.gap,\n\t\t\t\tthis.viewport as HTMLElement,\n\t\t\t)\n\t\t) {\n\t\t\tthis.output.classList.remove('bottom-full');\n\t\t\tthis.output.style.marginBottom = '';\n\t\t\tthis.output.classList.add('top-full');\n\t\t\tthis.output.style.marginTop = `${this.gap}px`;\n\t\t} else {\n\t\t\tthis.output.classList.remove('top-full');\n\t\t\tthis.output.style.marginTop = '';\n\t\t\tthis.output.classList.add('bottom-full');\n\t\t\tthis.output.style.marginBottom = `${this.gap}px`;\n\t\t}\n\t}\n\n\tpublic destroy() {\n\t\t// Remove listeners\n\t\tthis.input.removeEventListener('focus', this.onInputFocusListener);\n\t\tthis.input.removeEventListener('input', this.onInputInputListener);\n\t\tthis.toggle.removeEventListener('click', this.onToggleClickListener);\n\t\tif (this.toggleClose)\n\t\t\tthis.toggleClose.removeEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onToggleCloseClickListener,\n\t\t\t);\n\t\tif (this.toggleOpen)\n\t\t\tthis.toggleOpen.removeEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onToggleOpenClickListener,\n\t\t\t);\n\n\t\t// Remove classes\n\t\tthis.el.classList.remove('has-value', 'active');\n\t\tif (this.items.length)\n\t\t\tthis.items.forEach((el) => {\n\t\t\t\t(el as HTMLElement).classList.remove('selected');\n\t\t\t\t(el as HTMLElement).style.display = '';\n\t\t\t});\n\n\t\t// Remove attributes\n\t\tthis.output.removeAttribute('role');\n\t\tthis.output.removeAttribute('tabindex');\n\t\tthis.output.removeAttribute('aria-orientation');\n\n\t\t// Remove generated markup\n\t\tif (this.outputLoader) {\n\t\t\tthis.outputLoader.remove();\n\t\t\tthis.outputLoader = null;\n\t\t}\n\t\tif (this.outputPlaceholder) {\n\t\t\tthis.outputPlaceholder.remove();\n\t\t\tthis.outputPlaceholder = null;\n\t\t}\n\t\tif (this.apiUrl) {\n\t\t\tthis.output.innerHTML = '';\n\t\t}\n\n\t\tthis.items = [];\n\n\t\twindow.$hsComboBoxCollection = window.$hsComboBoxCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsComboBoxCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsComboBoxCollection) {\n\t\t\twindow.$hsComboBoxCollection = [];\n\n\t\t\twindow.addEventListener('click', (evt) => {\n\t\t\t\tconst evtTarget = evt.target;\n\n\t\t\t\tHSComboBox.closeCurrentlyOpened(evtTarget as HTMLElement);\n\t\t\t});\n\n\t\t\tdocument.addEventListener('keydown', (evt) =>\n\t\t\t\tHSComboBox.accessibility(evt),\n\t\t\t);\n\t\t}\n\n\t\tif (window.$hsComboBoxCollection)\n\t\t\twindow.$hsComboBoxCollection = window.$hsComboBoxCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-combo-box]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsComboBoxCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-combo-box');\n\t\t\t\t\tconst options: IComboBoxOptions = data ? JSON.parse(data) : {};\n\n\t\t\t\t\tnew HSComboBox(el, options);\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tstatic close(target: HTMLElement | string) {\n\t\tconst elInCollection = window.$hsComboBoxCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection && elInCollection.element.isOpened) {\n\t\t\telInCollection.element.close();\n\t\t}\n\t}\n\n\tstatic closeCurrentlyOpened(evtTarget: HTMLElement | null = null) {\n\t\tif (!evtTarget.closest('[data-hs-combo-box].active')) {\n\t\t\tconst currentlyOpened =\n\t\t\t\twindow.$hsComboBoxCollection.filter((el) => el.element.isOpened) ||\n\t\t\t\tnull;\n\n\t\t\tif (currentlyOpened) {\n\t\t\t\tcurrentlyOpened.forEach((el) => {\n\t\t\t\t\tel.element.close();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t// Accessibility methods\n\tprivate static getPreparedItems(\n\t\tisReversed = false,\n\t\toutput: HTMLElement | null,\n\t): Element[] | null {\n\t\tif (!output) return null;\n\n\t\tconst preparedItems = isReversed\n\t\t\t? Array.from(\n\t\t\t\toutput.querySelectorAll(':scope > *:not(.--exclude-accessibility)'),\n\t\t\t)\n\t\t\t\t.filter((el) => (el as HTMLElement).style.display !== 'none')\n\t\t\t\t.reverse()\n\t\t\t: Array.from(\n\t\t\t\toutput.querySelectorAll(':scope > *:not(.--exclude-accessibility)'),\n\t\t\t).filter((el) => (el as HTMLElement).style.display !== 'none');\n\t\tconst items = preparedItems.filter(\n\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t);\n\n\t\treturn items;\n\t}\n\n\tprivate static setHighlighted(\n\t\tprev: Element,\n\t\tcurrent: HTMLElement,\n\t\tinput: HTMLInputElement,\n\t): void {\n\t\tcurrent.focus();\n\n\t\tinput.value = current\n\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t.getAttribute('data-hs-combo-box-search-text');\n\n\t\tif (prev) prev.classList.remove('hs-combo-box-output-item-highlighted');\n\t\tcurrent.classList.add('hs-combo-box-output-item-highlighted');\n\t}\n\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tconst target = window.$hsComboBoxCollection.find((el) =>\n\t\t\tel.element.preventVisibility ? el.element.isCurrent : el.element.isOpened,\n\t\t);\n\n\t\tif (\n\t\t\ttarget &&\n\t\t\tCOMBO_BOX_ACCESSIBILITY_KEY_SET.includes(evt.code) &&\n\t\t\t!evt.metaKey\n\t\t) {\n\t\t\tswitch (evt.code) {\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEscape();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Home':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'End':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEnter(evt);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onEscape() {\n\t\tconst target = window.$hsComboBoxCollection.find(\n\t\t\t(el) => !el.element.preventVisibility && el.element.isOpened,\n\t\t);\n\n\t\tif (target) {\n\t\t\ttarget.element.close();\n\t\t\ttarget.element.input.blur();\n\t\t}\n\t}\n\n\tstatic onArrow(isArrowUp = true) {\n\t\tconst target = window.$hsComboBoxCollection.find((el) =>\n\t\t\tel.element.preventVisibility ? el.element.isCurrent : el.element.isOpened,\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst output = target.element.itemsWrapper ?? target.element.output;\n\n\t\t\tif (!output) return false;\n\n\t\t\tconst items = HSComboBox.getPreparedItems(isArrowUp, output) as Element[];\n\t\t\tconst current = output.querySelector(\n\t\t\t\t'.hs-combo-box-output-item-highlighted',\n\t\t\t);\n\t\t\tlet currentItem = null;\n\t\t\tif (!current)\n\t\t\t\titems[0].classList.add('hs-combo-box-output-item-highlighted');\n\t\t\tlet currentInd = items.findIndex((el: any) => el === current);\n\t\t\tif (currentInd + 1 < items.length) currentInd++;\n\t\t\tcurrentItem = items[currentInd] as HTMLButtonElement;\n\n\t\t\tHSComboBox.setHighlighted(current, currentItem, target.element.input);\n\t\t}\n\t}\n\n\tstatic onStartEnd(isStart = true) {\n\t\tconst target = window.$hsComboBoxCollection.find((el) =>\n\t\t\tel.element.preventVisibility ? el.element.isCurrent : el.element.isOpened,\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst output = target.element.itemsWrapper ?? target.element.output;\n\n\t\t\tif (!output) return false;\n\n\t\t\tconst items = HSComboBox.getPreparedItems(isStart, output) as Element[];\n\t\t\tconst current = output.querySelector(\n\t\t\t\t'.hs-combo-box-output-item-highlighted',\n\t\t\t);\n\n\t\t\tif (items.length)\n\t\t\t\tHSComboBox.setHighlighted(\n\t\t\t\t\tcurrent,\n\t\t\t\t\titems[0] as HTMLButtonElement,\n\t\t\t\t\ttarget.element.input,\n\t\t\t\t);\n\t\t}\n\t}\n\n\tstatic onEnter(evt: Event) {\n\t\tconst target = evt.target;\n\t\tconst opened = window.$hsComboBoxCollection.find(\n\t\t\t(el) =>\n\t\t\t\t!isParentOrElementHidden(el.element.el) &&\n\t\t\t\t(evt.target as HTMLElement).closest('[data-hs-combo-box]') ===\n\t\t\t\tel.element.el,\n\t\t);\n\n\t\tconst link: HTMLAnchorElement = opened.element.el.querySelector(\n\t\t\t'.hs-combo-box-output-item-highlighted a',\n\t\t);\n\n\t\tif ((target as HTMLElement).hasAttribute('data-hs-combo-box-input')) {\n\t\t\topened.element.close();\n\t\t\t(target as HTMLInputElement).blur();\n\t\t} else {\n\t\t\tif (!opened.element.preventSelection) {\n\t\t\t\topened.element.setSelectedByValue(\n\t\t\t\t\topened.element.valuesBySelector(evt.target as HTMLElement),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (opened.element.preventSelection && link) {\n\t\t\t\twindow.location.assign(link.getAttribute('href'));\n\t\t\t}\n\t\t\topened.element.close(\n\t\t\t\t!opened.element.preventSelection\n\t\t\t\t\t? (evt.target as HTMLElement)\n\t\t\t\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t\t\t\t.getAttribute('data-hs-combo-box-search-text')\n\t\t\t\t\t: null,\n\t\t\t\tJSON.parse((evt.target as HTMLElement).getAttribute('data-hs-combo-box-item-stored-data')) ?? null\n\t\t\t);\n\t\t}\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSComboBox: Function;\n\t\t$hsComboBoxCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSComboBox.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('ComboBox collection:', window.$hsComboBoxCollection);\n});\n\ndocument.addEventListener('scroll', () => {\n\tif (!window.$hsComboBoxCollection) return false;\n\n\tconst target = window.$hsComboBoxCollection.find((el) => el.element.isOpened);\n\n\tif (target && !target.element.preventAutoPosition)\n\t\ttarget.element.recalculateDirection();\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSComboBox = HSComboBox;\n}\n\nexport default HSComboBox;\n", "/*\n * HSDropdown\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tstringToBoolean,\n\tgetClassProperty,\n\tgetClassPropertyAlt,\n\tisIOS,\n\tisIpadOS,\n\tdispatch,\n\tafterTransition,\n\tmenuSearchHistory,\n} from '../../utils';\nimport { IMenuSearchHistory } from '../../utils/interfaces';\n\nimport {\n\tcreatePopper,\n\tPositioningStrategy,\n\tVirtualElement,\n} from '@popperjs/core';\n\nimport { IDropdown, IHTMLElementPopper } from '../dropdown/interfaces';\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { POSITIONS, DROPDOWN_ACCESSIBILITY_KEY_SET } from '../../constants';\n\nclass HSDropdown\n\textends HSBasePlugin<{}, IHTMLElementPopper>\n\timplements IDropdown {\n\tprivate static history: IMenuSearchHistory;\n\tprivate readonly toggle: HTMLElement | null;\n\tprivate readonly closers: HTMLElement[] | null;\n\tpublic menu: HTMLElement | null;\n\tprivate eventMode: string;\n\tprivate closeMode: string;\n\tprivate hasAutofocus: boolean;\n\tprivate animationInProcess: boolean;\n\n\tprivate onElementMouseEnterListener: () => void | null;\n\tprivate onElementMouseLeaveListener: () => void | null;\n\tprivate onToggleClickListener: (evt: Event) => void | null;\n\tprivate onToggleContextMenuListener: (evt: Event) => void | null;\n\tprivate onCloserClickListener:\n\t\t| {\n\t\t\tel: HTMLButtonElement;\n\t\t\tfn: () => void;\n\t\t}[]\n\t\t| null;\n\n\tconstructor(el: IHTMLElementPopper, options?: {}, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.toggle =\n\t\t\tthis.el.querySelector(':scope > .hs-dropdown-toggle') ||\n\t\t\tthis.el.querySelector(\n\t\t\t\t':scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle',\n\t\t\t) ||\n\t\t\t(this.el.children[0] as HTMLElement);\n\t\tthis.closers =\n\t\t\tArray.from(this.el.querySelectorAll(':scope .hs-dropdown-close')) || null;\n\t\tthis.menu = this.el.querySelector(':scope > .hs-dropdown-menu');\n\t\tthis.eventMode = getClassProperty(this.el, '--trigger', 'click');\n\t\tthis.closeMode = getClassProperty(this.el, '--auto-close', 'true');\n\t\tthis.hasAutofocus = stringToBoolean(\n\t\t\tgetClassProperty(this.el, '--has-autofocus', 'true') || 'true',\n\t\t);\n\t\tthis.animationInProcess = false;\n\n\t\tthis.onCloserClickListener = [];\n\n\t\tif (this.toggle && this.menu) this.init();\n\t}\n\n\tprivate elementMouseEnter() {\n\t\tthis.onMouseEnterHandler();\n\t}\n\n\tprivate elementMouseLeave() {\n\t\tthis.onMouseLeaveHandler();\n\t}\n\n\tprivate toggleClick(evt: Event) {\n\t\tthis.onClickHandler(evt);\n\t}\n\n\tprivate toggleContextMenu(evt: MouseEvent) {\n\t\tevt.preventDefault();\n\n\t\tthis.onContextMenuHandler(evt);\n\t}\n\n\tprivate closerClick() {\n\t\tthis.close();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsDropdownCollection, this);\n\n\t\tif ((this.toggle as HTMLButtonElement).disabled) return false;\n\n\t\tif (this.toggle) this.buildToggle();\n\t\tif (this.menu) this.buildMenu();\n\t\tif (this.closers) this.buildClosers();\n\n\t\tif (!isIOS() && !isIpadOS()) {\n\t\t\tthis.onElementMouseEnterListener = () => this.elementMouseEnter();\n\t\t\tthis.onElementMouseLeaveListener = () => this.elementMouseLeave();\n\n\t\t\tthis.el.addEventListener('mouseenter', this.onElementMouseEnterListener);\n\t\t\tthis.el.addEventListener('mouseleave', this.onElementMouseLeaveListener);\n\t\t}\n\t}\n\n\tresizeHandler() {\n\t\tthis.eventMode = getClassProperty(this.el, '--trigger', 'click');\n\t\tthis.closeMode = getClassProperty(this.el, '--auto-close', 'true');\n\t}\n\n\tprivate buildToggle() {\n\t\tif (this?.toggle?.ariaExpanded) {\n\t\t\tif (this.el.classList.contains('open')) this.toggle.ariaExpanded = 'true';\n\t\t\telse this.toggle.ariaExpanded = 'false';\n\t\t}\n\n\t\tif (this.eventMode === 'contextmenu') {\n\t\t\tthis.onToggleContextMenuListener = (evt: MouseEvent) =>\n\t\t\t\tthis.toggleContextMenu(evt);\n\n\t\t\tthis.toggle.addEventListener(\n\t\t\t\t'contextmenu',\n\t\t\t\tthis.onToggleContextMenuListener,\n\t\t\t);\n\t\t} else {\n\t\t\tthis.onToggleClickListener = (evt) => this.toggleClick(evt);\n\n\t\t\tthis.toggle.addEventListener('click', this.onToggleClickListener);\n\t\t}\n\t}\n\n\tprivate buildMenu() {\n\t\tthis.menu.role = this.menu.getAttribute('role') || 'menu';\n\n\t\tconst checkboxes = this.menu.querySelectorAll('[role=\"menuitemcheckbox\"]');\n\t\tconst radiobuttons = this.menu.querySelectorAll('[role=\"menuitemradio\"]');\n\n\t\tcheckboxes.forEach((el: HTMLElement) => el.addEventListener('click', () => this.selectCheckbox(el)));\n\t\tradiobuttons.forEach((el: HTMLElement) => el.addEventListener('click', () => this.selectRadio(el)));\n\t}\n\n\tprivate buildClosers() {\n\t\tthis.closers.forEach((el: HTMLButtonElement) => {\n\t\t\tthis.onCloserClickListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: () => this.closerClick(),\n\t\t\t});\n\n\t\t\tel.addEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onCloserClickListener.find((closer) => closer.el === el).fn,\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate getScrollbarSize() {\n\t\tlet div = document.createElement('div');\n\t\tdiv.style.overflow = 'scroll';\n\t\tdiv.style.width = '100px';\n\t\tdiv.style.height = '100px';\n\t\tdocument.body.appendChild(div);\n\n\t\tlet scrollbarSize = div.offsetWidth - div.clientWidth;\n\n\t\tdocument.body.removeChild(div);\n\n\t\treturn scrollbarSize;\n\t}\n\n\tprivate onContextMenuHandler(evt: MouseEvent) {\n\t\tconst virtualElement: VirtualElement = {\n\t\t\tgetBoundingClientRect: () => new DOMRect(),\n\t\t};\n\t\tvirtualElement.getBoundingClientRect = () =>\n\t\t\tnew DOMRect(evt.clientX, evt.clientY, 0, 0);\n\n\t\tHSDropdown.closeCurrentlyOpened();\n\n\t\tif (\n\t\t\tthis.el.classList.contains('open') &&\n\t\t\t!this.menu.classList.contains('hidden')\n\t\t) {\n\t\t\tthis.close();\n\n\t\t\tdocument.body.style.overflow = '';\n\t\t\tdocument.body.style.paddingRight = '';\n\t\t} else {\n\t\t\tdocument.body.style.overflow = 'hidden';\n\t\t\tdocument.body.style.paddingRight = `${this.getScrollbarSize()}px`;\n\n\t\t\tthis.open(virtualElement);\n\t\t}\n\t}\n\n\tprivate onClickHandler(evt: Event) {\n\t\tif (\n\t\t\tthis.el.classList.contains('open') &&\n\t\t\t!this.menu.classList.contains('hidden')\n\t\t) {\n\t\t\tthis.close();\n\t\t} else {\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tprivate onMouseEnterHandler() {\n\t\tif (this.eventMode !== 'hover') return false;\n\n\t\tif (this.el._popper) this.forceClearState();\n\n\t\tif (\n\t\t\t!this.el.classList.contains('open') &&\n\t\t\tthis.menu.classList.contains('hidden')\n\t\t) {\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tprivate onMouseLeaveHandler() {\n\t\tif (this.eventMode !== 'hover') return false;\n\n\t\tif (\n\t\t\tthis.el.classList.contains('open') &&\n\t\t\t!this.menu.classList.contains('hidden')\n\t\t) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tprivate destroyPopper() {\n\t\tconst scope = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--scope') || ''\n\t\t).replace(' ', '');\n\n\t\tthis.menu.classList.remove('block');\n\t\tthis.menu.classList.add('hidden');\n\n\t\tthis.menu.style.inset = null;\n\t\tthis.menu.style.position = null;\n\n\t\tif (this.el && this.el._popper) this.el._popper.destroy();\n\n\t\tif (scope === 'window') this.el.appendChild(this.menu);\n\n\t\tthis.animationInProcess = false;\n\t}\n\n\tprivate absoluteStrategyModifiers() {\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'applyStyles',\n\t\t\t\tfn: (data: any) => {\n\t\t\t\t\tconst strategy = (\n\t\t\t\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--strategy') ||\n\t\t\t\t\t\t'absolute'\n\t\t\t\t\t).replace(' ', '');\n\t\t\t\t\tconst adaptive = (\n\t\t\t\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--adaptive') ||\n\t\t\t\t\t\t'adaptive'\n\t\t\t\t\t).replace(' ', '');\n\n\t\t\t\t\tdata.state.elements.popper.style.position = strategy;\n\t\t\t\t\tdata.state.elements.popper.style.transform =\n\t\t\t\t\t\tadaptive === 'adaptive' ? data.state.styles.popper.transform : null;\n\t\t\t\t\tdata.state.elements.popper.style.top = null;\n\t\t\t\t\tdata.state.elements.popper.style.bottom = null;\n\t\t\t\t\tdata.state.elements.popper.style.left = null;\n\t\t\t\t\tdata.state.elements.popper.style.right = null;\n\t\t\t\t\tdata.state.elements.popper.style.margin = 0;\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}\n\n\tprivate focusElement() {\n\t\tconst input: HTMLInputElement = this.menu.querySelector('[autofocus]');\n\n\t\tif (!input) return false;\n\t\telse input.focus();\n\t}\n\n\tprivate setupPopper(target?: VirtualElement | HTMLElement) {\n\t\tconst _target = target || this.el;\n\t\tconst placement = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--placement') || ''\n\t\t).replace(' ', '');\n\t\tconst flip = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--flip') || 'true'\n\t\t).replace(' ', '');\n\t\tconst strategy = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--strategy') || 'fixed'\n\t\t).replace(' ', '') as PositioningStrategy;\n\t\tconst offset = parseInt(\n\t\t\t(\n\t\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--offset') || '10'\n\t\t\t).replace(' ', ''),\n\t\t);\n\t\tconst gpuAcceleration = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--gpu-acceleration') ||\n\t\t\t'true'\n\t\t).replace(' ', '');\n\t\tconst popperInstance = createPopper(_target, this.menu, {\n\t\t\tplacement: POSITIONS[placement] || 'bottom-start',\n\t\t\tstrategy: strategy,\n\t\t\tmodifiers: [\n\t\t\t\t...(strategy !== 'fixed' ? this.absoluteStrategyModifiers() : []),\n\t\t\t\t{\n\t\t\t\t\tname: 'flip',\n\t\t\t\t\tenabled: flip === 'true',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'offset',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\toffset: [0, offset],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'computeStyles',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tadaptive: strategy !== 'fixed' ? false : true,\n\t\t\t\t\t\tgpuAcceleration: gpuAcceleration === 'true',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t});\n\n\t\treturn popperInstance;\n\t}\n\n\tprivate selectCheckbox(target: HTMLElement) {\n\t\ttarget.ariaChecked = target.ariaChecked === 'true' ? 'false' : 'true';\n\t}\n\n\tprivate selectRadio(target: HTMLElement) {\n\t\tif (target.ariaChecked === 'true') return false;\n\t\tconst group = target.closest('.group');\n\t\tconst items = group.querySelectorAll('[role=\"menuitemradio\"]');\n\t\tconst otherItems = Array.from(items).filter((el) => el !== target);\n\t\totherItems.forEach((el) => {\n\t\t\tel.ariaChecked = 'false';\n\t\t});\n\t\ttarget.ariaChecked = 'true';\n\t}\n\n\t// Public methods\n\tpublic calculatePopperPosition(target?: VirtualElement | HTMLElement) {\n\t\tconst popperInstance = this.setupPopper(target);\n\t\tpopperInstance.forceUpdate();\n\n\t\tconst popperPosition = popperInstance.state.placement;\n\t\tpopperInstance.destroy();\n\n\t\treturn popperPosition;\n\t}\n\n\tpublic open(target?: VirtualElement | HTMLElement) {\n\t\tif (this.el.classList.contains('open') || this.animationInProcess) return false;\n\n\t\tconst _target = target || this.el;\n\n\t\tthis.animationInProcess = true;\n\n\t\tconst scope = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--scope') || ''\n\t\t).replace(' ', '');\n\t\tconst placement = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--placement') || ''\n\t\t).replace(' ', '');\n\t\tconst flip = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--flip') || 'true'\n\t\t).replace(' ', '');\n\t\tconst strategy = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--strategy') || 'fixed'\n\t\t).replace(' ', '') as PositioningStrategy;\n\t\tconst offset = parseInt(\n\t\t\t(\n\t\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--offset') || '10'\n\t\t\t).replace(' ', ''),\n\t\t);\n\t\tconst gpuAcceleration = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--gpu-acceleration') ||\n\t\t\t'true'\n\t\t).replace(' ', '');\n\n\t\tif (scope === 'window') document.body.appendChild(this.menu);\n\n\t\tif (strategy !== ('static' as PositioningStrategy)) {\n\t\t\tthis.el._popper = createPopper(_target, this.menu, {\n\t\t\t\tplacement: POSITIONS[placement] || 'bottom-start',\n\t\t\t\tstrategy: strategy,\n\t\t\t\tmodifiers: [\n\t\t\t\t\t...(strategy !== 'fixed' ? this.absoluteStrategyModifiers() : []),\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'flip',\n\t\t\t\t\t\tenabled: flip === 'true',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'offset',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\toffset: [0, offset],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'computeStyles',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tadaptive: strategy !== 'fixed' ? false : true,\n\t\t\t\t\t\t\tgpuAcceleration: gpuAcceleration === 'true' ? true : false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t});\n\t\t}\n\n\t\tthis.menu.style.margin = null;\n\n\t\tthis.menu.classList.remove('hidden');\n\t\tthis.menu.classList.add('block');\n\n\t\tsetTimeout(() => {\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\t\t\tthis.el.classList.add('open');\n\n\t\t\tif (scope === 'window') this.menu.classList.add('open');\n\n\t\t\tthis.animationInProcess = false;\n\n\t\t\tif (this.hasAutofocus) this.focusElement();\n\n\t\t\tthis.fireEvent('open', this.el);\n\t\t\tdispatch('open.hs.dropdown', this.el, this.el);\n\t\t});\n\n\t\t// this.fireEvent('open', this.el);\n\t\t// dispatch('open.hs.dropdown', this.el, this.el);\n\t}\n\n\tpublic close(isAnimated = true) {\n\t\tif (this.animationInProcess || !this.el.classList.contains('open'))\n\t\t\treturn false;\n\n\t\tconst scope = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--scope') || ''\n\t\t).replace(' ', '');\n\n\t\tconst clearAfterClose = () => {\n\t\t\tthis.menu.style.margin = null;\n\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\t\t\tthis.el.classList.remove('open');\n\n\t\t\tthis.fireEvent('close', this.el);\n\t\t\tdispatch('close.hs.dropdown', this.el, this.el);\n\t\t};\n\n\t\tthis.animationInProcess = true;\n\n\t\tif (scope === 'window') this.menu.classList.remove('open');\n\n\t\tif (isAnimated) {\n\t\t\tconst el: HTMLElement =\n\t\t\t\tthis.el.querySelector('[data-hs-dropdown-transition]') || this.menu;\n\n\t\t\tafterTransition(el, () => this.destroyPopper());\n\t\t} else this.destroyPopper();\n\n\t\tclearAfterClose();\n\t}\n\n\tpublic forceClearState() {\n\t\tthis.destroyPopper();\n\t\tthis.menu.style.margin = null;\n\t\tthis.el.classList.remove('open');\n\t}\n\n\tpublic destroy() {\n\t\t// Remove listeners\n\t\tif (!isIOS() && !isIpadOS()) {\n\t\t\tthis.el.removeEventListener(\n\t\t\t\t'mouseenter',\n\t\t\t\tthis.onElementMouseEnterListener,\n\t\t\t);\n\t\t\tthis.el.removeEventListener(\n\t\t\t\t'mouseleave',\n\t\t\t\t() => this.onElementMouseLeaveListener,\n\t\t\t);\n\n\t\t\tthis.onElementMouseEnterListener = null;\n\t\t\tthis.onElementMouseLeaveListener = null;\n\t\t}\n\t\tthis.toggle.removeEventListener('click', this.onToggleClickListener);\n\t\tthis.onToggleClickListener = null;\n\t\tif (this.closers.length) {\n\t\t\tthis.closers.forEach((el: HTMLButtonElement) => {\n\t\t\t\tel.removeEventListener(\n\t\t\t\t\t'click',\n\t\t\t\t\tthis.onCloserClickListener.find((closer) => closer.el === el).fn,\n\t\t\t\t);\n\t\t\t});\n\n\t\t\tthis.onCloserClickListener = null;\n\t\t}\n\n\t\t// Remove classes\n\t\tthis.el.classList.remove('open');\n\n\t\tthis.destroyPopper();\n\n\t\twindow.$hsDropdownCollection = window.$hsDropdownCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tprivate static findInCollection(target: HSDropdown | HTMLElement | string): ICollectionItem | null {\n\t\treturn window.$hsDropdownCollection.find((el) => {\n\t\t\tif (target instanceof HSDropdown) return el.element.el === target.el;\n\t\t\telse if (typeof target === 'string') return el.element.el === document.querySelector(target);\n\t\t\telse return el.element.el === target;\n\t\t}) || null;\n\t}\n\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsDropdownCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsDropdownCollection) {\n\t\t\twindow.$hsDropdownCollection = [];\n\n\t\t\tdocument.addEventListener('keydown', (evt) =>\n\t\t\t\tHSDropdown.accessibility(evt),\n\t\t\t);\n\n\t\t\twindow.addEventListener('click', (evt) => {\n\t\t\t\tconst evtTarget = evt.target;\n\n\t\t\t\tHSDropdown.closeCurrentlyOpened(evtTarget as HTMLElement);\n\t\t\t});\n\n\t\t\tlet prevWidth = window.innerWidth;\n\t\t\twindow.addEventListener('resize', () => {\n\t\t\t\tif (window.innerWidth !== prevWidth) {\n\t\t\t\t\tprevWidth = innerWidth;\n\t\t\t\t\tHSDropdown.closeCurrentlyOpened(null, false);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (window.$hsDropdownCollection)\n\t\t\twindow.$hsDropdownCollection = window.$hsDropdownCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-dropdown:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: IHTMLElementPopper) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsDropdownCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSDropdown(el);\n\t\t\t});\n\t}\n\n\tstatic open(target: HSDropdown | HTMLElement | string) {\n\t\tconst instance = HSDropdown.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\tinstance.element.menu.classList.contains('hidden')\n\t\t) instance.element.open();\n\t}\n\n\tstatic close(target: HSDropdown | HTMLElement | string) {\n\t\tconst instance = HSDropdown.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\t!instance.element.menu.classList.contains('hidden')\n\t\t) instance.element.close();\n\t}\n\n\t// Accessibility methods\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tthis.history = menuSearchHistory;\n\n\t\tconst target: ICollectionItem | null =\n\t\t\twindow.$hsDropdownCollection.find((el) =>\n\t\t\t\tel.element.el.classList.contains('open'),\n\t\t\t);\n\n\t\tif (\n\t\t\ttarget &&\n\t\t\t(DROPDOWN_ACCESSIBILITY_KEY_SET.includes(evt.code) ||\n\t\t\t\t(evt.code.length === 4 &&\n\t\t\t\t\tevt.code[evt.code.length - 1].match(/^[A-Z]*$/))) &&\n\t\t\t!evt.metaKey &&\n\t\t\t!target.element.menu.querySelector('input:focus') &&\n\t\t\t!target.element.menu.querySelector('textarea:focus')\n\t\t) {\n\t\t\tswitch (evt.code) {\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tif (!target.element.menu.querySelector('.hs-select.active')) {\n\t\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t\tthis.onEscape(evt);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif (\n\t\t\t\t\t\t!target.element.menu.querySelector('.hs-select button:focus') &&\n\t\t\t\t\t\t!target.element.menu.querySelector('.hs-collapse-toggle:focus')\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.onEnter(evt);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowRight':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrowX(evt, 'right');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowLeft':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrowX(evt, 'left');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Home':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'End':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd(false);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onFirstLetter(evt.key);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onEscape(evt: KeyboardEvent) {\n\t\tconst dropdown = (evt.target as HTMLElement).closest('.hs-dropdown.open');\n\n\t\tif (window.$hsDropdownCollection.find((el) => el.element.el === dropdown)) {\n\t\t\tconst target = window.$hsDropdownCollection.find(\n\t\t\t\t(el) => el.element.el === dropdown,\n\t\t\t);\n\n\t\t\tif (target) {\n\t\t\t\ttarget.element.close();\n\t\t\t\ttarget.element.toggle.focus();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.closeCurrentlyOpened();\n\t\t}\n\t}\n\n\tstatic onEnter(evt: KeyboardEvent) {\n\t\tconst target = evt.target as HTMLElement;\n\t\tconst { element } =\n\t\t\twindow.$hsDropdownCollection.find(\n\t\t\t\t(el) => el.element.el === target.closest('.hs-dropdown'),\n\t\t\t) ?? null;\n\n\t\tif (element && target.classList.contains('hs-dropdown-toggle')) {\n\t\t\tevt.preventDefault();\n\t\t\telement.open();\n\t\t} else if (element && target.getAttribute('role') === 'menuitemcheckbox') {\n\t\t\telement.selectCheckbox(target);\n\t\t\telement.close();\n\t\t} else if (element && target.getAttribute('role') === 'menuitemradio') {\n\t\t\telement.selectRadio(target);\n\t\t\telement.close();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tstatic onArrow(isArrowUp = true) {\n\t\tconst target = window.$hsDropdownCollection.find((el) =>\n\t\t\tel.element.el.classList.contains('open'),\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst menu = target.element.menu;\n\n\t\t\tif (!menu) return false;\n\n\t\t\tconst preparedLinks = isArrowUp\n\t\t\t\t? Array.from(\n\t\t\t\t\tmenu.querySelectorAll(\n\t\t\t\t\t\t'a:not([hidden]), .hs-dropdown > button:not([hidden]), [role=\"button\"]:not([hidden]), [role^=\"menuitem\"]:not([hidden])',\n\t\t\t\t\t),\n\t\t\t\t).reverse()\n\t\t\t\t: Array.from(\n\t\t\t\t\tmenu.querySelectorAll(\n\t\t\t\t\t\t'a:not([hidden]), .hs-dropdown > button:not([hidden]), [role=\"button\"]:not([hidden]), [role^=\"menuitem\"]:not([hidden])',\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\tconst visiblePreparedLinks = Array.from(preparedLinks).filter((item) => {\n\t\t\t\tconst el = item as HTMLElement;\n\n\t\t\t\treturn el.closest('[hidden]') === null && el.offsetParent !== null;\n\t\t\t});\n\t\t\tconst links = visiblePreparedLinks.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\t\t\tconst current = menu.querySelector(\n\t\t\t\t'a:focus, button:focus, [role=\"button\"]:focus, [role^=\"menuitem\"]:focus',\n\t\t\t);\n\t\t\tlet currentInd = links.findIndex((el: any) => el === current);\n\n\t\t\tif (currentInd + 1 < links.length) {\n\t\t\t\tcurrentInd++;\n\t\t\t}\n\n\t\t\t(links[currentInd] as HTMLButtonElement | HTMLAnchorElement).focus();\n\t\t}\n\t}\n\n\tstatic onArrowX(evt: KeyboardEvent, direction: 'right' | 'left') {\n\t\tconst toggle = evt.target as HTMLElement;\n\t\tconst closestDropdown = toggle.closest('.hs-dropdown.open');\n\t\tconst isRootDropdown =\n\t\t\t!!closestDropdown &&\n\t\t\t!closestDropdown?.parentElement.closest('.hs-dropdown');\n\t\tconst menuToOpen =\n\t\t\t(HSDropdown.getInstance(\n\t\t\t\ttoggle.closest('.hs-dropdown') as HTMLElement,\n\t\t\t\ttrue,\n\t\t\t) as ICollectionItem) ?? null;\n\t\tconst firstLink = menuToOpen.element.menu.querySelector(\n\t\t\t'a, button, [role=\"button\"], [role^=\"menuitem\"]',\n\t\t) as HTMLButtonElement;\n\n\t\tif (isRootDropdown && !toggle.classList.contains('hs-dropdown-toggle'))\n\t\t\treturn false;\n\n\t\tconst menuToClose =\n\t\t\t(HSDropdown.getInstance(\n\t\t\t\ttoggle.closest('.hs-dropdown.open') as HTMLElement,\n\t\t\t\ttrue,\n\t\t\t) as ICollectionItem) ?? null;\n\n\t\tif (\n\t\t\tmenuToOpen.element.el.classList.contains('open') &&\n\t\t\tmenuToOpen.element.el._popper.state.placement.includes(direction)\n\t\t) {\n\t\t\tfirstLink.focus();\n\n\t\t\treturn false;\n\t\t}\n\n\t\tconsole.log(menuToOpen);\n\n\t\tconst futurePosition = menuToOpen.element.calculatePopperPosition();\n\n\t\tif (isRootDropdown && !futurePosition.includes(direction)) return false;\n\n\t\tif (\n\t\t\tfuturePosition.includes(direction) &&\n\t\t\ttoggle.classList.contains('hs-dropdown-toggle')\n\t\t) {\n\t\t\tmenuToOpen.element.open();\n\t\t\tfirstLink.focus();\n\t\t} else {\n\t\t\tmenuToClose.element.close(false);\n\t\t\tmenuToClose.element.toggle.focus();\n\t\t}\n\t}\n\n\tstatic onStartEnd(isStart = true) {\n\t\tconst target = window.$hsDropdownCollection.find((el) =>\n\t\t\tel.element.el.classList.contains('open'),\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst menu = target.element.menu;\n\n\t\t\tif (!menu) return false;\n\n\t\t\tconst preparedLinks = isStart\n\t\t\t\t? Array.from(\n\t\t\t\t\tmenu.querySelectorAll(\n\t\t\t\t\t\t'a, button, [role=\"button\"], [role^=\"menuitem\"]',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\t: Array.from(\n\t\t\t\t\tmenu.querySelectorAll(\n\t\t\t\t\t\t'a, button, [role=\"button\"], [role^=\"menuitem\"]',\n\t\t\t\t\t),\n\t\t\t\t).reverse();\n\t\t\tconst links = preparedLinks.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\n\t\t\tif (links.length) {\n\t\t\t\t(links[0] as HTMLButtonElement).focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onFirstLetter(code: string) {\n\t\tconst target = window.$hsDropdownCollection.find((el) =>\n\t\t\tel.element.el.classList.contains('open'),\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst menu = target.element.menu;\n\n\t\t\tif (!menu) return false;\n\n\t\t\tconst links = Array.from(\n\t\t\t\tmenu.querySelectorAll('a, [role=\"button\"], [role^=\"menuitem\"]'),\n\t\t\t);\n\t\t\tconst getCurrentInd = () =>\n\t\t\t\tlinks.findIndex(\n\t\t\t\t\t(el, i) =>\n\t\t\t\t\t\t(el as HTMLElement).innerText.toLowerCase().charAt(0) ===\n\t\t\t\t\t\tcode.toLowerCase() && this.history.existsInHistory(i),\n\t\t\t\t);\n\t\t\tlet currentInd = getCurrentInd();\n\n\t\t\tif (currentInd === -1) {\n\t\t\t\tthis.history.clearHistory();\n\t\t\t\tcurrentInd = getCurrentInd();\n\t\t\t}\n\n\t\t\tif (currentInd !== -1) {\n\t\t\t\t(links[currentInd] as HTMLElement).focus();\n\t\t\t\tthis.history.addHistory(currentInd);\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic closeCurrentlyOpened(\n\t\tevtTarget: HTMLElement | null = null,\n\t\tisAnimated = true,\n\t) {\n\t\tconst parent =\n\t\t\tevtTarget &&\n\t\t\t\tevtTarget.closest('.hs-dropdown') &&\n\t\t\t\tevtTarget.closest('.hs-dropdown').parentElement.closest('.hs-dropdown')\n\t\t\t\t? evtTarget\n\t\t\t\t\t.closest('.hs-dropdown')\n\t\t\t\t\t.parentElement.closest('.hs-dropdown')\n\t\t\t\t: null;\n\t\tlet currentlyOpened = parent\n\t\t\t? window.$hsDropdownCollection.filter(\n\t\t\t\t(el) =>\n\t\t\t\t\tel.element.el.classList.contains('open') &&\n\t\t\t\t\tel.element.menu\n\t\t\t\t\t\t.closest('.hs-dropdown')\n\t\t\t\t\t\t.parentElement.closest('.hs-dropdown') === parent,\n\t\t\t)\n\t\t\t: window.$hsDropdownCollection.filter((el) =>\n\t\t\t\tel.element.el.classList.contains('open'),\n\t\t\t);\n\n\t\tif (\n\t\t\tevtTarget &&\n\t\t\tevtTarget.closest('.hs-dropdown') &&\n\t\t\tgetClassPropertyAlt(evtTarget.closest('.hs-dropdown'), '--auto-close') ===\n\t\t\t'inside'\n\t\t) {\n\t\t\tcurrentlyOpened = currentlyOpened.filter(\n\t\t\t\t(el) => el.element.el !== evtTarget.closest('.hs-dropdown'),\n\t\t\t);\n\t\t}\n\n\t\tif (currentlyOpened) {\n\t\t\tcurrentlyOpened.forEach((el) => {\n\t\t\t\tif (\n\t\t\t\t\tel.element.closeMode === 'false' ||\n\t\t\t\t\tel.element.closeMode === 'outside'\n\t\t\t\t)\n\t\t\t\t\treturn false;\n\n\t\t\t\tel.element.close(isAnimated);\n\t\t\t});\n\t\t}\n\n\t\tif (currentlyOpened) {\n\t\t\tcurrentlyOpened.forEach((el) => {\n\t\t\t\tif (getClassPropertyAlt(el.element.el, '--trigger') !== 'contextmenu')\n\t\t\t\t\treturn false;\n\n\t\t\t\tdocument.body.style.overflow = '';\n\t\t\t\tdocument.body.style.paddingRight = '';\n\t\t\t});\n\t\t}\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HSDropdown | HTMLElement | string, cb: Function) {\n\t\tconst instance = HSDropdown.findInCollection(target);\n\n\t\tif (instance) instance.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSDropdown: Function;\n\t\t$hsDropdownCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSDropdown.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Dropdown collection:', window.$hsDropdownCollection);\n});\n\nwindow.addEventListener('resize', () => {\n\tif (!window.$hsDropdownCollection) window.$hsDropdownCollection = [];\n\n\twindow.$hsDropdownCollection.forEach((el) => el.element.resizeHandler());\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSDropdown = HSDropdown;\n}\n\nexport default HSDropdown;\n", "export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];", "export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}", "export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}", "import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };", "import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};", "import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}", "export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;", "export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}", "import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}", "import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}", "import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}", "import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}", "import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}", "import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}", "import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}", "import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}", "export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}", "import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}", "export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};", "export default function getVariation(placement) {\n return placement.split('-')[1];\n}", "import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};", "import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};", "var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}", "var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}", "import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}", "import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}", "import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}", "import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}", "import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}", "import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}", "import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}", "import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}", "import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}", "import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases \u2013 research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};", "import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};", "import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};", "export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}", "import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};", "export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}", "import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}", "export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}", "export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}", "import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update \u2013 it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update \u2013 it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";", "/*\n * HSInputNumber\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { IInputNumberOptions, IInputNumber } from '../input-number/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\n\nclass HSInputNumber\n\textends HSBasePlugin\n\timplements IInputNumber\n{\n\tprivate readonly input: HTMLInputElement | null;\n\tprivate readonly increment: HTMLElement | null;\n\tprivate readonly decrement: HTMLElement | null;\n\tprivate inputValue: number | null;\n\tprivate readonly minInputValue: number | null;\n\tprivate readonly maxInputValue: number | null;\n\tprivate readonly step: number;\n\n\tprivate onInputInputListener: () => void;\n\tprivate onIncrementClickListener: () => void;\n\tprivate onDecrementClickListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: IInputNumberOptions) {\n\t\tsuper(el, options);\n\n\t\tthis.input = this.el.querySelector('[data-hs-input-number-input]') || null;\n\t\tthis.increment =\n\t\t\tthis.el.querySelector('[data-hs-input-number-increment]') || null;\n\t\tthis.decrement =\n\t\t\tthis.el.querySelector('[data-hs-input-number-decrement]') || null;\n\n\t\tif (this.input) this.checkIsNumberAndConvert();\n\n\t\tconst data = this.el.dataset.hsInputNumber;\n\t\tconst dataOptions: IInputNumberOptions = data\n\t\t\t? JSON.parse(data)\n\t\t\t: { step: 1 };\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.minInputValue = 'min' in concatOptions ? concatOptions.min : 0;\n\t\tthis.maxInputValue = 'max' in concatOptions ? concatOptions.max : null;\n\t\tthis.step =\n\t\t\t'step' in concatOptions && concatOptions.step > 0\n\t\t\t\t? concatOptions.step\n\t\t\t\t: 1;\n\n\t\tthis.init();\n\t}\n\n\tprivate inputInput() {\n\t\tthis.changeValue();\n\t}\n\n\tprivate incrementClick() {\n\t\tthis.changeValue('increment');\n\t}\n\n\tprivate decrementClick() {\n\t\tthis.changeValue('decrement');\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsInputNumberCollection, this);\n\n\t\tif (this.input && this.increment) this.build();\n\t}\n\n\tprivate checkIsNumberAndConvert() {\n\t\tconst value = this.input.value.trim();\n\t\tconst cleanedValue = this.cleanAndExtractNumber(value);\n\n\t\tif (cleanedValue !== null) {\n\t\t\tthis.inputValue = cleanedValue;\n\t\t\tthis.input.value = cleanedValue.toString();\n\t\t} else {\n\t\t\tthis.inputValue = 0;\n\t\t\tthis.input.value = '0';\n\t\t}\n\t}\n\n\tprivate cleanAndExtractNumber(value: string): number | null {\n\t\tconst cleanedArray: string[] = [];\n\t\tlet decimalFound = false;\n\n\t\tvalue.split('').forEach((char) => {\n\t\t\tif (char >= '0' && char <= '9') cleanedArray.push(char);\n\t\t\telse if (char === '.' && !decimalFound) {\n\t\t\t\tcleanedArray.push(char);\n\t\t\t\tdecimalFound = true;\n\t\t\t}\n\t\t});\n\n\t\tconst cleanedValue = cleanedArray.join('');\n\t\tconst number = parseFloat(cleanedValue);\n\n\t\treturn isNaN(number) ? null : number;\n\t}\n\n\tprivate build() {\n\t\tif (this.input) this.buildInput();\n\t\tif (this.increment) this.buildIncrement();\n\t\tif (this.decrement) this.buildDecrement();\n\n\t\tif (this.inputValue <= this.minInputValue) {\n\t\t\tthis.inputValue = this.minInputValue;\n\t\t\tthis.input.value = `${this.minInputValue}`;\n\t\t}\n\n\t\tif (this.inputValue <= this.minInputValue) this.changeValue();\n\n\t\tif (this.input.hasAttribute('disabled')) this.disableButtons();\n\t}\n\n\tprivate buildInput() {\n\t\tthis.onInputInputListener = () => this.inputInput();\n\n\t\tthis.input.addEventListener('input', this.onInputInputListener);\n\t}\n\n\tprivate buildIncrement() {\n\t\tthis.onIncrementClickListener = () => this.incrementClick();\n\n\t\tthis.increment.addEventListener('click', this.onIncrementClickListener);\n\t}\n\n\tprivate buildDecrement() {\n\t\tthis.onDecrementClickListener = () => this.decrementClick();\n\n\t\tthis.decrement.addEventListener('click', this.onDecrementClickListener);\n\t}\n\n\tprivate changeValue(event = 'none') {\n\t\tconst payload = { inputValue: this.inputValue };\n\t\tconst minInputValue = this.minInputValue ?? Number.MIN_SAFE_INTEGER;\n\t\tconst maxInputValue = this.maxInputValue ?? Number.MAX_SAFE_INTEGER;\n\n\t\tthis.inputValue = isNaN(this.inputValue) ? 0 : this.inputValue;\n\n\t\tswitch (event) {\n\t\t\tcase 'increment':\n\t\t\t\tconst incrementedResult = this.inputValue + this.step;\n\t\t\t\tthis.inputValue =\n\t\t\t\t\tincrementedResult >= minInputValue &&\n\t\t\t\t\tincrementedResult <= maxInputValue\n\t\t\t\t\t\t? incrementedResult\n\t\t\t\t\t\t: maxInputValue;\n\t\t\t\tthis.input.value = this.inputValue.toString();\n\t\t\t\tbreak;\n\t\t\tcase 'decrement':\n\t\t\t\tconst decrementedResult = this.inputValue - this.step;\n\t\t\t\tthis.inputValue =\n\t\t\t\t\tdecrementedResult >= minInputValue &&\n\t\t\t\t\tdecrementedResult <= maxInputValue\n\t\t\t\t\t\t? decrementedResult\n\t\t\t\t\t\t: minInputValue;\n\t\t\t\tthis.input.value = this.inputValue.toString();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconst defaultResult = isNaN(parseInt(this.input.value))\n\t\t\t\t\t? 0\n\t\t\t\t\t: parseInt(this.input.value);\n\t\t\t\tthis.inputValue =\n\t\t\t\t\tdefaultResult >= maxInputValue\n\t\t\t\t\t\t? maxInputValue\n\t\t\t\t\t\t: defaultResult <= minInputValue\n\t\t\t\t\t\t\t? minInputValue\n\t\t\t\t\t\t\t: defaultResult;\n\t\t\t\tif (this.inputValue <= minInputValue)\n\t\t\t\t\tthis.input.value = this.inputValue.toString();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tpayload.inputValue = this.inputValue;\n\n\t\tif (this.inputValue === minInputValue) {\n\t\t\tthis.el.classList.add('disabled');\n\t\t\tif (this.decrement) this.disableButtons('decrement');\n\t\t} else {\n\t\t\tthis.el.classList.remove('disabled');\n\t\t\tif (this.decrement) this.enableButtons('decrement');\n\t\t}\n\t\tif (this.inputValue === maxInputValue) {\n\t\t\tthis.el.classList.add('disabled');\n\t\t\tif (this.increment) this.disableButtons('increment');\n\t\t} else {\n\t\t\tthis.el.classList.remove('disabled');\n\t\t\tif (this.increment) this.enableButtons('increment');\n\t\t}\n\n\t\tthis.fireEvent('change', payload);\n\t\tdispatch('change.hs.inputNumber', this.el, payload);\n\t}\n\n\tprivate disableButtons(mode = 'all') {\n\t\tif (mode === 'all') {\n\t\t\tif (\n\t\t\t\tthis.increment.tagName === 'BUTTON' ||\n\t\t\t\tthis.increment.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.increment.setAttribute('disabled', 'disabled');\n\t\t\tif (\n\t\t\t\tthis.decrement.tagName === 'BUTTON' ||\n\t\t\t\tthis.decrement.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.decrement.setAttribute('disabled', 'disabled');\n\t\t} else if (mode === 'increment') {\n\t\t\tif (\n\t\t\t\tthis.increment.tagName === 'BUTTON' ||\n\t\t\t\tthis.increment.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.increment.setAttribute('disabled', 'disabled');\n\t\t} else if (mode === 'decrement') {\n\t\t\tif (\n\t\t\t\tthis.decrement.tagName === 'BUTTON' ||\n\t\t\t\tthis.decrement.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.decrement.setAttribute('disabled', 'disabled');\n\t\t}\n\t}\n\n\tprivate enableButtons(mode = 'all') {\n\t\tif (mode === 'all') {\n\t\t\tif (\n\t\t\t\tthis.increment.tagName === 'BUTTON' ||\n\t\t\t\tthis.increment.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.increment.removeAttribute('disabled');\n\t\t\tif (\n\t\t\t\tthis.decrement.tagName === 'BUTTON' ||\n\t\t\t\tthis.decrement.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.decrement.removeAttribute('disabled');\n\t\t} else if (mode === 'increment') {\n\t\t\tif (\n\t\t\t\tthis.increment.tagName === 'BUTTON' ||\n\t\t\t\tthis.increment.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.increment.removeAttribute('disabled');\n\t\t} else if (mode === 'decrement') {\n\t\t\tif (\n\t\t\t\tthis.decrement.tagName === 'BUTTON' ||\n\t\t\t\tthis.decrement.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.decrement.removeAttribute('disabled');\n\t\t}\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tthis.el.classList.remove('disabled');\n\n\t\t// Remove attributes\n\t\tthis.increment.removeAttribute('disabled');\n\t\tthis.decrement.removeAttribute('disabled');\n\n\t\t// Remove listeners\n\t\tthis.input.removeEventListener('input', this.onInputInputListener);\n\t\tthis.increment.removeEventListener('click', this.onIncrementClickListener);\n\t\tthis.decrement.removeEventListener('click', this.onDecrementClickListener);\n\n\t\twindow.$hsInputNumberCollection = window.$hsInputNumberCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Global method\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsInputNumberCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsInputNumberCollection) window.$hsInputNumberCollection = [];\n\n\t\tif (window.$hsInputNumberCollection)\n\t\t\twindow.$hsInputNumberCollection = window.$hsInputNumberCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-input-number]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsInputNumberCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSInputNumber(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSInputNumber: Function;\n\t\t$hsInputNumberCollection: {\n\t\t\tid: number;\n\t\t\telement: HSInputNumber;\n\t\t}[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSInputNumber.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Input number collection:', window.$hsInputNumberCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSInputNumber = HSInputNumber;\n}\n\nexport default HSInputNumber;\n", "/*\n * HSLayoutSplitter\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\nimport { isJson, classToClassList, htmlToElement, dispatch } from '../../utils';\n\nimport {\n\tILayoutSplitterOptions,\n\tILayoutSplitter,\n\tISingleLayoutSplitter,\n\tIControlLayoutSplitter,\n} from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSLayoutSplitter\n\textends HSBasePlugin\n\timplements ILayoutSplitter {\n\tstatic isListenersInitialized = false;\n\n\tprivate readonly horizontalSplitterClasses: string | null;\n\tprivate readonly horizontalSplitterTemplate: string;\n\tprivate readonly verticalSplitterClasses: string | null;\n\tprivate readonly verticalSplitterTemplate: string;\n\tprivate readonly isSplittersAddedManually: boolean;\n\n\tprivate horizontalSplitters: ISingleLayoutSplitter[];\n\tprivate horizontalControls: IControlLayoutSplitter[];\n\tprivate verticalSplitters: ISingleLayoutSplitter[];\n\tprivate verticalControls: IControlLayoutSplitter[];\n\n\tisDragging: boolean;\n\tactiveSplitter: IControlLayoutSplitter | null;\n\n\tprivate onControlPointerDownListener:\n\t\t| {\n\t\t\tel: HTMLElement;\n\t\t\tfn: () => void;\n\t\t}[]\n\t\t| null;\n\n\tconstructor(el: HTMLElement, options?: ILayoutSplitterOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-layout-splitter');\n\t\tconst dataOptions: ILayoutSplitterOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.horizontalSplitterClasses =\n\t\t\tconcatOptions?.horizontalSplitterClasses || null;\n\t\tthis.horizontalSplitterTemplate =\n\t\t\tconcatOptions?.horizontalSplitterTemplate || '';\n\t\tthis.verticalSplitterClasses =\n\t\t\tconcatOptions?.verticalSplitterClasses || null;\n\t\tthis.verticalSplitterTemplate =\n\t\t\tconcatOptions?.verticalSplitterTemplate || '';\n\t\tthis.isSplittersAddedManually = concatOptions?.isSplittersAddedManually ?? false;\n\n\t\tthis.horizontalSplitters = [];\n\t\tthis.horizontalControls = [];\n\t\tthis.verticalSplitters = [];\n\t\tthis.verticalControls = [];\n\n\t\tthis.isDragging = false;\n\t\tthis.activeSplitter = null;\n\n\t\tthis.onControlPointerDownListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate controlPointerDown(item: IControlLayoutSplitter) {\n\t\tthis.isDragging = true;\n\t\tthis.activeSplitter = item;\n\n\t\tthis.onPointerDownHandler(item);\n\t}\n\n\tprivate controlPointerUp() {\n\t\tthis.isDragging = false;\n\t\tthis.activeSplitter = null;\n\n\t\tthis.onPointerUpHandler();\n\t}\n\n\tprivate static onDocumentPointerMove = (evt: PointerEvent) => {\n\t\tconst draggingElement = document.querySelector(\n\t\t\t'.hs-layout-splitter-control.dragging',\n\t\t);\n\t\tif (!draggingElement) return;\n\n\t\tconst draggingInstance = HSLayoutSplitter.getInstance(\n\t\t\tdraggingElement.closest('[data-hs-layout-splitter]') as HTMLElement,\n\t\t\ttrue,\n\t\t) as ICollectionItem;\n\n\t\tif (!draggingInstance || !draggingInstance.element.isDragging) return;\n\n\t\tconst activeSplitter = draggingInstance.element.activeSplitter;\n\t\tif (!activeSplitter) return;\n\n\t\tif (activeSplitter.direction === 'vertical')\n\t\t\tdraggingInstance.element.onPointerMoveHandler(\n\t\t\t\tevt,\n\t\t\t\tactiveSplitter,\n\t\t\t\t'vertical'\n\t\t\t);\n\t\telse\n\t\t\tdraggingInstance.element.onPointerMoveHandler(\n\t\t\t\tevt,\n\t\t\t\tactiveSplitter,\n\t\t\t\t'horizontal'\n\t\t\t);\n\t};\n\n\tprivate static onDocumentPointerUp = () => {\n\t\tconst draggingElement = document.querySelector(\n\t\t\t'.hs-layout-splitter-control.dragging',\n\t\t);\n\t\tif (!draggingElement) return;\n\n\t\tconst draggingInstance = HSLayoutSplitter.getInstance(\n\t\t\tdraggingElement.closest('[data-hs-layout-splitter]') as HTMLElement,\n\t\t\ttrue,\n\t\t) as ICollectionItem;\n\n\t\tif (draggingInstance) draggingInstance.element.controlPointerUp();\n\t};\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsLayoutSplitterCollection, this);\n\t\tthis.buildSplitters();\n\n\t\tif (!HSLayoutSplitter.isListenersInitialized) {\n\t\t\tdocument.addEventListener(\n\t\t\t\t'pointermove',\n\t\t\t\tHSLayoutSplitter.onDocumentPointerMove,\n\t\t\t);\n\n\t\t\tdocument.addEventListener(\n\t\t\t\t'pointerup',\n\t\t\t\tHSLayoutSplitter.onDocumentPointerUp,\n\t\t\t);\n\n\t\t\tHSLayoutSplitter.isListenersInitialized = true;\n\t\t}\n\t}\n\n\tprivate buildSplitters() {\n\t\tthis.buildHorizontalSplitters();\n\t\tthis.buildVerticalSplitters();\n\t}\n\n\tprivate buildHorizontalSplitters() {\n\t\tconst groups = this.el.querySelectorAll(\n\t\t\t'[data-hs-layout-splitter-horizontal-group]',\n\t\t);\n\n\t\tif (groups.length) {\n\t\t\tgroups.forEach((el: HTMLElement) => {\n\t\t\t\tthis.horizontalSplitters.push({\n\t\t\t\t\tel,\n\t\t\t\t\titems: Array.from(\n\t\t\t\t\t\tel.querySelectorAll(':scope > [data-hs-layout-splitter-item]'),\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tthis.updateHorizontalSplitter();\n\t\t}\n\t}\n\n\tprivate buildVerticalSplitters() {\n\t\tconst groups = this.el.querySelectorAll(\n\t\t\t'[data-hs-layout-splitter-vertical-group]',\n\t\t);\n\n\t\tif (groups.length) {\n\t\t\tgroups.forEach((el: HTMLElement) => {\n\t\t\t\tthis.verticalSplitters.push({\n\t\t\t\t\tel,\n\t\t\t\t\titems: Array.from(\n\t\t\t\t\t\tel.querySelectorAll(':scope > [data-hs-layout-splitter-item]'),\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tthis.updateVerticalSplitter();\n\t\t}\n\t}\n\n\tprivate buildControl(\n\t\tprev: HTMLElement | null,\n\t\tnext: HTMLElement | null,\n\t\tdirection: 'horizontal' | 'vertical' = 'horizontal',\n\t) {\n\t\tlet el;\n\n\t\tif (this.isSplittersAddedManually) {\n\t\t\tel = next?.previousElementSibling as HTMLElement;\n\n\t\t\tif (!el) return false;\n\n\t\t\tel.style.display = '';\n\t\t} else {\n\t\t\tel = htmlToElement(direction === 'horizontal' ? this.horizontalSplitterTemplate : this.verticalSplitterTemplate) as HTMLElement;\n\t\t\tclassToClassList(direction === 'horizontal' ? this.horizontalSplitterClasses : this.verticalSplitterClasses, el);\n\t\t\tel.classList.add('hs-layout-splitter-control');\n\t\t}\n\n\t\tconst item = { el, direction, prev, next };\n\n\t\tif (direction === 'horizontal') this.horizontalControls.push(item);\n\t\telse this.verticalControls.push(item);\n\n\t\tthis.bindListeners(item);\n\n\t\tif (next && !this.isSplittersAddedManually) prev.insertAdjacentElement('afterend', el);\n\t}\n\n\tprivate getSplitterItemParsedParam(item: HTMLElement) {\n\t\tconst param = item.getAttribute('data-hs-layout-splitter-item');\n\n\t\treturn isJson(param) ? JSON.parse(param) : param;\n\t}\n\n\tprivate getContainerSize(container: Element, isHorizontal: boolean): number {\n\t\treturn isHorizontal ? container.getBoundingClientRect().width : container.getBoundingClientRect().height;\n\t}\n\n\tprivate getMaxFlexSize(element: HTMLElement, param: string, totalWidth: number): number {\n\t\tconst paramValue = this.getSplitterItemSingleParam(element, param);\n\n\t\treturn typeof paramValue === 'number' ? (paramValue / 100) * totalWidth : 0;\n\t}\n\n\tprivate updateHorizontalSplitter() {\n\t\tthis.horizontalSplitters.forEach(({ items }) => {\n\t\t\titems.forEach((el: HTMLElement) => {\n\t\t\t\tthis.updateSingleSplitter(el);\n\t\t\t});\n\n\t\t\titems.forEach((el: HTMLElement, index: number) => {\n\t\t\t\tif (index >= items.length - 1) this.buildControl(el, null);\n\t\t\t\telse this.buildControl(el, items[index + 1]);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate updateSingleSplitter(el: HTMLElement) {\n\t\tconst param = el.getAttribute('data-hs-layout-splitter-item');\n\t\tconst parsedParam = isJson(param) ? JSON.parse(param) : param;\n\t\tconst width = isJson(param) ? parsedParam.dynamicSize : param;\n\t\tel.style.flex = `${width} 1 0`;\n\t}\n\n\tprivate updateVerticalSplitter() {\n\t\tthis.verticalSplitters.forEach(({ items }) => {\n\t\t\titems.forEach((el: HTMLElement) => {\n\t\t\t\tthis.updateSingleSplitter(el);\n\t\t\t});\n\n\t\t\titems.forEach((el: HTMLElement, index: number) => {\n\t\t\t\tif (index >= items.length - 1) this.buildControl(el, null, 'vertical');\n\t\t\t\telse this.buildControl(el, items[index + 1], 'vertical');\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate updateSplitterItemParam(item: HTMLElement, newSize: number) {\n\t\tconst param = this.getSplitterItemParsedParam(item);\n\t\tconst newSizeFixed = newSize.toFixed(1);\n\t\tconst newParam = typeof param === 'object' ? JSON.stringify({\n\t\t\t...param,\n\t\t\tdynamicSize: +newSizeFixed,\n\t\t}) : newSizeFixed;\n\n\t\titem.setAttribute(\n\t\t\t'data-hs-layout-splitter-item',\n\t\t\tnewParam,\n\t\t);\n\t}\n\n\tprivate onPointerDownHandler(item: IControlLayoutSplitter) {\n\t\tconst { el, prev, next } = item;\n\n\t\tel.classList.add('dragging');\n\t\tprev.classList.add('dragging');\n\t\tnext.classList.add('dragging');\n\t\tdocument.body.style.userSelect = 'none';\n\t}\n\n\tprivate onPointerUpHandler() {\n\t\tdocument.body.style.userSelect = '';\n\t}\n\n\tprivate onPointerMoveHandler(\n\t\tevt: PointerEvent,\n\t\titem: IControlLayoutSplitter,\n\t\tdirection: 'horizontal' | 'vertical'\n\t) {\n\t\tconst { prev, next } = item;\n\t\tconst container = item.el.closest(\n\t\t\tdirection === 'horizontal'\n\t\t\t\t? '[data-hs-layout-splitter-horizontal-group]'\n\t\t\t\t: '[data-hs-layout-splitter-vertical-group]'\n\t\t);\n\t\tconst isHorizontal = direction === 'horizontal';\n\t\tconst totalSize = this.getContainerSize(container, isHorizontal);\n\t\tconst availableSize = this.calculateAvailableSize(container, prev, next, isHorizontal, totalSize);\n\n\t\tconst sizes = this.calculateResizedSizes(evt, prev, availableSize, isHorizontal);\n\t\tconst adjustedSizes = this.enforceLimits(sizes, prev, next, totalSize, availableSize);\n\n\t\tthis.applySizes(prev, next, adjustedSizes, totalSize);\n\t}\n\n\tprivate bindListeners(item: IControlLayoutSplitter) {\n\t\tconst { el } = item;\n\n\t\tthis.onControlPointerDownListener.push({\n\t\t\tel,\n\t\t\tfn: () => this.controlPointerDown(item),\n\t\t});\n\n\t\tel.addEventListener(\n\t\t\t'pointerdown',\n\t\t\tthis.onControlPointerDownListener.find((control) => control.el === el).fn,\n\t\t);\n\t}\n\n\tprivate calculateAvailableSize(\n\t\tcontainer: Element,\n\t\tprev: HTMLElement,\n\t\tnext: HTMLElement,\n\t\tisHorizontal: boolean,\n\t\ttotalSize: number\n\t): number {\n\t\tconst items = container.querySelectorAll(':scope > [data-hs-layout-splitter-item]');\n\t\tconst otherSize = Array.from(items).reduce((sum, item) => {\n\t\t\tif (item === prev || item === next) return sum;\n\n\t\t\tconst rect = item.getBoundingClientRect();\n\t\t\t// TODO:: Test\n\t\t\tconst computedStyle = window.getComputedStyle(item);\n\n\t\t\treturn sum + (computedStyle.position === 'fixed' ? 0 : (isHorizontal ? rect.width : rect.height));\n\t\t}, 0);\n\n\t\treturn totalSize - otherSize;\n\t}\n\n\tprivate calculateResizedSizes(\n\t\tevt: PointerEvent,\n\t\tprev: HTMLElement,\n\t\tavailableSize: number,\n\t\tisHorizontal: boolean\n\t): {\n\t\tpreviousSize: number;\n\t\tnextSize: number\n\t} {\n\t\tconst prevStart = isHorizontal ? prev.getBoundingClientRect().left : prev.getBoundingClientRect().top;\n\t\tlet previousSize = Math.max(0, Math.min((isHorizontal ? evt.clientX : evt.clientY) - prevStart, availableSize));\n\t\tlet nextSize = availableSize - previousSize;\n\n\t\treturn { previousSize, nextSize };\n\t}\n\n\tprivate enforceLimits(\n\t\tsizes: {\n\t\t\tpreviousSize: number;\n\t\t\tnextSize: number\n\t\t},\n\t\tprev: HTMLElement,\n\t\tnext: HTMLElement,\n\t\ttotalSize: number,\n\t\tavailableSize: number\n\t): {\n\t\tpreviousSize: number;\n\t\tnextSize: number;\n\t} {\n\t\tconst prevMinSize = this.getMaxFlexSize(prev, 'minSize', totalSize);\n\t\tconst nextMinSize = this.getMaxFlexSize(next, 'minSize', totalSize);\n\t\tconst prevPreLimitSize = this.getMaxFlexSize(prev, 'preLimitSize', totalSize);\n\t\tconst nextPreLimitSize = this.getMaxFlexSize(next, 'preLimitSize', totalSize);\n\n\t\tlet { previousSize, nextSize } = sizes;\n\n\t\tif (nextSize < nextMinSize) {\n\t\t\tnextSize = nextMinSize;\n\t\t\tpreviousSize = availableSize - nextSize;\n\t\t} else if (previousSize < prevMinSize) {\n\t\t\tpreviousSize = prevMinSize;\n\t\t\tnextSize = availableSize - previousSize;\n\t\t}\n\n\t\tconst payload = {\n\t\t\tprev,\n\t\t\tnext,\n\t\t\tpreviousSize: previousSize.toFixed(),\n\t\t\tpreviousFlexSize: (previousSize / totalSize) * 100,\n\t\t\tpreviousPreLimitSize: prevPreLimitSize,\n\t\t\tpreviousPreLimitFlexSize: (prevPreLimitSize / totalSize) * 100,\n\t\t\tpreviousMinSize: prevMinSize,\n\t\t\tpreviousMinFlexSize: (prevMinSize / totalSize) * 100,\n\t\t\tnextSize: nextSize.toFixed(),\n\t\t\tnextFlexSize: (nextSize / totalSize) * 100,\n\t\t\tnextPreLimitSize: nextPreLimitSize,\n\t\t\tnextPreLimitFlexSize: (nextPreLimitSize / totalSize) * 100,\n\t\t\tnextMinSize: nextMinSize,\n\t\t\tnextMinFlexSize: (nextMinSize / totalSize) * 100,\n\t\t\tstatic: {\n\t\t\t\tprev: {\n\t\t\t\t\tminSize: this.getSplitterItemSingleParam(prev, 'minSize'),\n\t\t\t\t\tpreLimitSize: this.getSplitterItemSingleParam(prev, 'preLimitSize')\n\t\t\t\t},\n\t\t\t\tnext: {\n\t\t\t\t\tminSize: this.getSplitterItemSingleParam(next, 'minSize'),\n\t\t\t\t\tpreLimitSize: this.getSplitterItemSingleParam(next, 'preLimitSize')\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (nextSize < nextMinSize) {\n\t\t\tthis.fireEvent('onNextLimit', payload);\n\t\t\tdispatch('onNextLimit.hs.layoutSplitter', this.el, payload);\n\t\t} else if (previousSize < prevMinSize) {\n\t\t\tthis.fireEvent('onPrevLimit', payload);\n\t\t\tdispatch('onPrevLimit.hs.layoutSplitter', this.el, payload);\n\t\t}\n\n\t\tif (previousSize <= prevPreLimitSize) {\n\t\t\tthis.fireEvent('onPrevPreLimit', payload);\n\t\t\tdispatch('onPrevPreLimit.hs.layoutSplitter', this.el, payload);\n\t\t}\n\t\tif (nextSize <= nextPreLimitSize) {\n\t\t\tthis.fireEvent('onNextPreLimit', payload);\n\t\t\tdispatch('onNextPreLimit.hs.layoutSplitter', this.el, payload);\n\t\t}\n\n\t\tthis.fireEvent('drag', payload);\n\t\tdispatch('drag.hs.layoutSplitter', this.el, payload);\n\n\t\treturn { previousSize, nextSize };\n\t}\n\n\tprivate applySizes(\n\t\tprev: HTMLElement,\n\t\tnext: HTMLElement,\n\t\tsizes: {\n\t\t\tpreviousSize: number;\n\t\t\tnextSize: number\n\t\t},\n\t\ttotalSize: number\n\t) {\n\t\tconst { previousSize, nextSize } = sizes;\n\n\t\tconst prevPercent = (previousSize / totalSize) * 100;\n\t\tthis.updateSplitterItemParam(prev, prevPercent);\n\t\tprev.style.flex = `${prevPercent.toFixed(1)} 1 0`;\n\n\t\tconst nextPercent = (nextSize / totalSize) * 100;\n\t\tthis.updateSplitterItemParam(next, nextPercent);\n\t\tnext.style.flex = `${nextPercent.toFixed(1)} 1 0`;\n\t}\n\n\t// Public methods\n\tpublic getSplitterItemSingleParam(item: HTMLElement, name: string) {\n\t\ttry {\n\t\t\tconst param = this.getSplitterItemParsedParam(item);\n\n\t\t\treturn param[name];\n\t\t} catch {\n\t\t\tconsole.log('There is no parameter with this name in the object.');\n\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic getData(el: HTMLElement): any {\n\t\tconst container = el.closest('[data-hs-layout-splitter-horizontal-group], [data-hs-layout-splitter-vertical-group]');\n\n\t\tif (!container) {\n\t\t\tthrow new Error('Element is not inside a valid layout splitter container.');\n\t\t}\n\n\t\tconst isHorizontal = container.matches('[data-hs-layout-splitter-horizontal-group]');\n\t\tconst totalSize = this.getContainerSize(container, isHorizontal);\n\n\t\tconst dynamicFlexSize = this.getSplitterItemSingleParam(el, 'dynamicSize') || 0;\n\t\tconst minSize = this.getMaxFlexSize(el, 'minSize', totalSize);\n\t\tconst preLimitSize = this.getMaxFlexSize(el, 'preLimitSize', totalSize);\n\n\t\tconst dynamicSize = (dynamicFlexSize / 100) * totalSize;\n\n\t\tconst minFlexSize = (minSize / totalSize) * 100;\n\t\tconst preLimitFlexSize = (preLimitSize / totalSize) * 100;\n\n\t\treturn {\n\t\t\tel,\n\n\t\t\tdynamicSize: +dynamicSize.toFixed(),\n\t\t\tdynamicFlexSize,\n\n\t\t\tminSize: +minSize.toFixed(),\n\t\t\tminFlexSize,\n\n\t\t\tpreLimitSize: +preLimitSize.toFixed(),\n\t\t\tpreLimitFlexSize,\n\n\t\t\tstatic: {\n\t\t\t\tminSize: this.getSplitterItemSingleParam(el, 'minSize') ?? null,\n\t\t\t\tpreLimitSize: this.getSplitterItemSingleParam(el, 'preLimitSize') ?? null\n\t\t\t}\n\t\t};\n\t}\n\n\tpublic setSplitterItemSize(el: HTMLElement, size: number) {\n\t\tthis.updateSplitterItemParam(el, size);\n\t\tel.style.flex = `${size.toFixed(1)} 1 0`;\n\t}\n\n\tpublic updateFlexValues(data: Array<{\n\t\tid: string;\n\t\tbreakpoints: Record;\n\t}>): void {\n\t\tlet totalFlex = 0;\n\t\tconst currentWidth = window.innerWidth;\n\t\tconst getBreakpointValue = (breakpoints: Record): number => {\n\t\t\tconst sortedBreakpoints = Object.keys(breakpoints)\n\t\t\t\t.map(Number)\n\t\t\t\t.sort((a, b) => a - b);\n\n\t\t\tfor (let i = sortedBreakpoints.length - 1; i >= 0; i--) {\n\t\t\t\tif (currentWidth >= sortedBreakpoints[i]) {\n\t\t\t\t\treturn breakpoints[sortedBreakpoints[i]];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t};\n\n\t\tdata.forEach(({ id, breakpoints }) => {\n\t\t\tconst item = document.getElementById(id);\n\n\t\t\tif (item) {\n\t\t\t\tconst flexValue = getBreakpointValue(breakpoints);\n\n\t\t\t\tthis.updateSplitterItemParam(item, flexValue);\n\t\t\t\titem.style.flex = `${flexValue.toFixed(1)} 1 0`;\n\n\t\t\t\ttotalFlex += flexValue;\n\t\t\t}\n\t\t});\n\n\t\tif (totalFlex !== 100) {\n\t\t\tconst scaleFactor = 100 / totalFlex;\n\n\t\t\tdata.forEach(({ id }) => {\n\t\t\t\tconst item = document.getElementById(id);\n\n\t\t\t\tif (item) {\n\t\t\t\t\tconst currentFlex = parseFloat(item.style.flex.split(\" \")[0]);\n\t\t\t\t\tconst adjustedFlex = currentFlex * scaleFactor;\n\n\t\t\t\t\tthis.updateSplitterItemParam(item, adjustedFlex);\n\t\t\t\t\titem.style.flex = `${adjustedFlex.toFixed(1)} 1 0`;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic destroy() {\n\t\tif (this.onControlPointerDownListener) {\n\t\t\tthis.onControlPointerDownListener.forEach(({ el, fn }) => {\n\t\t\t\tel.removeEventListener('pointerdown', fn);\n\t\t\t});\n\t\t\tthis.onControlPointerDownListener = null;\n\t\t}\n\n\t\tthis.horizontalSplitters.forEach(({ items }) => {\n\t\t\titems.forEach((el: HTMLElement) => {\n\t\t\t\tel.style.flex = '';\n\t\t\t});\n\t\t});\n\n\t\tthis.verticalSplitters.forEach(({ items }) => {\n\t\t\titems.forEach((el: HTMLElement) => {\n\t\t\t\tel.style.flex = '';\n\t\t\t});\n\t\t});\n\n\t\tthis.horizontalControls.forEach(({ el }) => {\n\t\t\tif (this.isSplittersAddedManually) el.style.display = 'none';\n\t\t\telse el.remove();\n\t\t});\n\t\tthis.verticalControls.forEach(({ el }) => {\n\t\t\tif (this.isSplittersAddedManually) el.style.display = 'none';\n\t\t\telse el.remove();\n\t\t});\n\n\t\tthis.horizontalControls = [];\n\t\tthis.verticalControls = [];\n\n\t\twindow.$hsLayoutSplitterCollection =\n\t\t\twindow.$hsLayoutSplitterCollection.filter(\n\t\t\t\t({ element }) => element.el !== this.el,\n\t\t\t);\n\n\t\tif (\n\t\t\twindow.$hsLayoutSplitterCollection.length === 0 &&\n\t\t\tHSLayoutSplitter.isListenersInitialized\n\t\t) {\n\t\t\tdocument.removeEventListener(\n\t\t\t\t'pointermove',\n\t\t\t\tHSLayoutSplitter.onDocumentPointerMove,\n\t\t\t);\n\t\t\tdocument.removeEventListener(\n\t\t\t\t'pointerup',\n\t\t\t\tHSLayoutSplitter.onDocumentPointerUp,\n\t\t\t);\n\t\t\tHSLayoutSplitter.isListenersInitialized = false;\n\t\t}\n\t}\n\n\t// Static method\n\tprivate static findInCollection(target: HSLayoutSplitter | HTMLElement | string): ICollectionItem | null {\n\t\treturn window.$hsLayoutSplitterCollection.find((el) => {\n\t\t\tif (target instanceof HSLayoutSplitter) return el.element.el === target.el;\n\t\t\telse if (typeof target === 'string') return el.element.el === document.querySelector(target);\n\t\t\telse return el.element.el === target;\n\t\t}) || null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsLayoutSplitterCollection) {\n\t\t\twindow.$hsLayoutSplitterCollection = [];\n\n\t\t\twindow.addEventListener('pointerup', () => {\n\t\t\t\tif (!window.$hsLayoutSplitterCollection) return false;\n\n\t\t\t\tconst draggingElement = document.querySelector(\n\t\t\t\t\t'.hs-layout-splitter-control.dragging',\n\t\t\t\t);\n\t\t\t\tconst draggingSections = document.querySelectorAll(\n\t\t\t\t\t'[data-hs-layout-splitter-item].dragging',\n\t\t\t\t);\n\n\t\t\t\tif (!draggingElement) return false;\n\n\t\t\t\tconst draggingInstance = HSLayoutSplitter.getInstance(\n\t\t\t\t\tdraggingElement.closest('[data-hs-layout-splitter]') as HTMLElement,\n\t\t\t\t\ttrue,\n\t\t\t\t) as ICollectionItem;\n\n\t\t\t\tdraggingElement.classList.remove('dragging');\n\t\t\t\tdraggingSections.forEach((el) => el.classList.remove('dragging'));\n\t\t\t\tdraggingInstance.element.isDragging = false;\n\t\t\t});\n\t\t}\n\n\t\tif (window.$hsLayoutSplitterCollection)\n\t\t\twindow.$hsLayoutSplitterCollection =\n\t\t\t\twindow.$hsLayoutSplitterCollection.filter(({ element }) =>\n\t\t\t\t\tdocument.contains(element.el),\n\t\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[data-hs-layout-splitter]:not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsLayoutSplitterCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSLayoutSplitter(el);\n\t\t\t});\n\t}\n\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsLayoutSplitterCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic on(evt: string, target: HSLayoutSplitter | HTMLElement | string, cb: Function) {\n\t\tconst instance = HSLayoutSplitter.findInCollection(target);\n\n\t\tif (instance) instance.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSLayoutSplitter: Function;\n\t\t$hsLayoutSplitterCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSLayoutSplitter.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Layout splitter collection:', window.$hsLayoutSplitterCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSLayoutSplitter = HSLayoutSplitter;\n}\n\nexport default HSLayoutSplitter;\n", "/*\n * HSOverlay\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tstringToBoolean,\n\tgetClassProperty,\n\tisParentOrElementHidden,\n\tisDirectChild,\n\tdispatch,\n\tafterTransition,\n} from '../../utils';\n\nimport { IOverlayOptions, IOverlay } from './interfaces';\nimport { TOverlayOptionsAutoCloseEqualityType } from './types';\nimport { ICollectionItem } from '../../interfaces';\nimport { BREAKPOINTS } from '../../constants';\n\nimport HSBasePlugin from '../base-plugin';\n\nclass HSOverlay extends HSBasePlugin<{}> implements IOverlay {\n\tprivate readonly hiddenClass: string | null;\n\tprivate readonly emulateScrollbarSpace: boolean;\n\tprivate readonly isClosePrev: boolean;\n\tprivate readonly backdropClasses: string | null;\n\tprivate readonly backdropParent: string | HTMLElement | Document;\n\tprivate readonly backdropExtraClasses: string | null;\n\tprivate readonly animationTarget: HTMLElement | null;\n\n\tprivate openNextOverlay: boolean;\n\tprivate autoHide: ReturnType | null;\n\tprivate toggleButtons: HTMLElement[];\n\n\tpublic initContainer: HTMLElement | null;\n\tpublic isCloseWhenClickInside: boolean;\n\tpublic isTabAccessibilityLimited: boolean;\n\tpublic isLayoutAffect: boolean;\n\tpublic hasAutofocus: boolean;\n\tpublic hasAbilityToCloseOnBackdropClick: boolean;\n\tpublic openedBreakpoint: number | null;\n\tpublic autoClose: number | null;\n\tpublic autoCloseEqualityType: TOverlayOptionsAutoCloseEqualityType | null;\n\tpublic moveOverlayToBody: number | null;\n\n\tprivate backdrop: HTMLElement | null;\n\n\tprivate onElementClickListener: | {\n\t\tel: HTMLElement;\n\t\tfn: () => void;\n\t}[] | null;\n\tprivate onOverlayClickListener: (evt: Event) => void;\n\tprivate onBackdropClickListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: IOverlayOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\t// Collect all data options from toggles\n\t\tthis.toggleButtons = Array.from(document.querySelectorAll(`[data-hs-overlay=\"#${this.el.id}\"]`));\n\t\tconst toggleDataOptions = this.collectToggleParameters(this.toggleButtons);\n\n\t\tconst data = el.getAttribute('data-hs-overlay-options');\n\t\tconst dataOptions: IOverlayOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...toggleDataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.hiddenClass = concatOptions?.hiddenClass || 'hidden';\n\t\tthis.emulateScrollbarSpace = concatOptions?.emulateScrollbarSpace || false;\n\t\tthis.isClosePrev = concatOptions?.isClosePrev ?? true;\n\t\tthis.backdropClasses = concatOptions?.backdropClasses ?? 'hs-overlay-backdrop transition duration fixed inset-0 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 dark:bg-neutral-900';\n\t\tthis.backdropParent = typeof concatOptions.backdropParent === 'string' ? document.querySelector(concatOptions.backdropParent) as HTMLElement : document.body;\n\t\tthis.backdropExtraClasses = concatOptions?.backdropExtraClasses ?? '';\n\t\tthis.moveOverlayToBody = concatOptions?.moveOverlayToBody || null;\n\n\t\tthis.openNextOverlay = false;\n\t\tthis.autoHide = null;\n\t\tthis.initContainer = this.el?.parentElement || null;\n\t\tthis.isCloseWhenClickInside = stringToBoolean(getClassProperty(this.el, '--close-when-click-inside', 'false') || 'false');\n\t\tthis.isTabAccessibilityLimited = stringToBoolean(getClassProperty(this.el, '--tab-accessibility-limited', 'true') || 'true');\n\t\tthis.isLayoutAffect = stringToBoolean(getClassProperty(this.el, '--is-layout-affect', 'false') || 'false');\n\t\tthis.hasAutofocus = stringToBoolean(getClassProperty(this.el, '--has-autofocus', 'true') || 'true');\n\t\tthis.hasAbilityToCloseOnBackdropClick = stringToBoolean(this.el.getAttribute('data-hs-overlay-keyboard') || 'true');\n\n\t\tconst autoCloseBreakpoint = getClassProperty(this.el, '--auto-close');\n\t\tconst autoCloseEqualityType = getClassProperty(this.el, '--auto-close-equality-type');\n\t\tconst openedBreakpoint = getClassProperty(this.el, '--opened');\n\n\t\tthis.autoClose = !isNaN(+autoCloseBreakpoint) && isFinite(+autoCloseBreakpoint) ? +autoCloseBreakpoint : BREAKPOINTS[autoCloseBreakpoint] || null;\n\t\tthis.autoCloseEqualityType = autoCloseEqualityType as TOverlayOptionsAutoCloseEqualityType ?? null;\n\t\tthis.openedBreakpoint = (!isNaN(+openedBreakpoint) && isFinite(+openedBreakpoint) ? +openedBreakpoint : BREAKPOINTS[openedBreakpoint]) || null;\n\n\t\tthis.animationTarget = this?.el?.querySelector('.hs-overlay-animation-target') || this.el;\n\n\t\tthis.onElementClickListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate elementClick() {\n\t\tif (this.el.classList.contains('opened')) this.close();\n\t\telse this.open();\n\t}\n\n\tprivate overlayClick(evt: Event) {\n\t\tif (\n\t\t\t(evt.target as HTMLElement).id &&\n\t\t\t`#${(evt.target as HTMLElement).id}` === this.el.id &&\n\t\t\tthis.isCloseWhenClickInside &&\n\t\t\tthis.hasAbilityToCloseOnBackdropClick\n\t\t) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tprivate backdropClick() {\n\t\tthis.close();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsOverlayCollection, this);\n\n\t\tif (this.isLayoutAffect && this.openedBreakpoint) {\n\t\t\tconst instance = HSOverlay.getInstance(this.el, true);\n\n\t\t\tHSOverlay.setOpened(\n\t\t\t\tthis.openedBreakpoint,\n\t\t\t\tinstance as ICollectionItem,\n\t\t\t);\n\t\t}\n\n\t\tthis.onOverlayClickListener = (evt) => this.overlayClick(evt);\n\n\t\tthis.el.addEventListener('click', this.onOverlayClickListener);\n\n\t\tif (this.toggleButtons.length) this.buildToggleButtons();\n\t}\n\n\tprivate buildToggleButtons() {\n\t\tthis.toggleButtons.forEach((el) => {\n\t\t\tif (this.el.classList.contains('opened')) el.ariaExpanded = 'true';\n\t\t\telse el.ariaExpanded = 'false';\n\n\t\t\tthis.onElementClickListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: () => this.elementClick(),\n\t\t\t});\n\n\t\t\tel.addEventListener('click', this.onElementClickListener.find((toggleButton) => toggleButton.el === el).fn,);\n\t\t});\n\t}\n\n\tprivate hideAuto() {\n\t\tconst time = parseInt(getClassProperty(this.el, '--auto-hide', '0'));\n\n\t\tif (time) {\n\t\t\tthis.autoHide = setTimeout(() => {\n\t\t\t\tthis.close();\n\t\t\t}, time);\n\t\t}\n\t}\n\n\tprivate checkTimer() {\n\t\tif (this.autoHide) {\n\t\t\tclearTimeout(this.autoHide);\n\n\t\t\tthis.autoHide = null;\n\t\t}\n\t}\n\n\tprivate buildBackdrop() {\n\t\tconst overlayClasses = this.el.classList.value.split(' ');\n\t\tconst overlayZIndex = parseInt(\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('z-index'),\n\t\t);\n\t\tconst backdropId =\n\t\t\tthis.el.getAttribute('data-hs-overlay-backdrop-container') || false;\n\t\tthis.backdrop = document.createElement('div');\n\t\tlet backdropClasses = `${this.backdropClasses} ${this.backdropExtraClasses}`;\n\t\tconst closeOnBackdrop =\n\t\t\tgetClassProperty(this.el, '--overlay-backdrop', 'true') !== 'static';\n\t\tconst disableBackdrop =\n\t\t\tgetClassProperty(this.el, '--overlay-backdrop', 'true') === 'false';\n\n\t\tthis.backdrop.id = `${this.el.id}-backdrop`;\n\t\tif ('style' in this.backdrop)\n\t\t\tthis.backdrop.style.zIndex = `${overlayZIndex - 1}`;\n\n\t\tfor (const value of overlayClasses) {\n\t\t\tif (\n\t\t\t\tvalue.startsWith('hs-overlay-backdrop-open:') ||\n\t\t\t\tvalue.includes(':hs-overlay-backdrop-open:')\n\t\t\t) {\n\t\t\t\tbackdropClasses += ` ${value}`;\n\t\t\t}\n\t\t}\n\n\t\tif (disableBackdrop) return;\n\n\t\tif (backdropId) {\n\t\t\tthis.backdrop = document\n\t\t\t\t.querySelector(backdropId)\n\t\t\t\t.cloneNode(true) as HTMLElement;\n\t\t\tthis.backdrop.classList.remove('hidden');\n\n\t\t\tbackdropClasses = `${(this.backdrop as HTMLElement).classList.toString()}`;\n\t\t\tthis.backdrop.classList.value = '';\n\t\t}\n\n\t\tif (closeOnBackdrop) {\n\t\t\tthis.onBackdropClickListener = () => this.backdropClick();\n\n\t\t\tthis.backdrop.addEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onBackdropClickListener,\n\t\t\t\ttrue,\n\t\t\t);\n\t\t}\n\n\t\tthis.backdrop.setAttribute('data-hs-overlay-backdrop-template', '');\n\n\t\t(this.backdropParent as HTMLElement).appendChild(this.backdrop);\n\n\t\tsetTimeout(() => {\n\t\t\tthis.backdrop.classList.value = backdropClasses;\n\t\t});\n\t}\n\n\tprivate destroyBackdrop() {\n\t\tconst backdrop: HTMLElement = document.querySelector(\n\t\t\t`#${this.el.id}-backdrop`,\n\t\t);\n\n\t\tif (!backdrop) return;\n\n\t\tif (this.openNextOverlay) {\n\t\t\tbackdrop.style.transitionDuration = `${parseFloat(\n\t\t\t\twindow\n\t\t\t\t\t.getComputedStyle(backdrop)\n\t\t\t\t\t.transitionDuration.replace(/[^\\d.-]/g, ''),\n\t\t\t) * 1.8\n\t\t\t\t}s`;\n\t\t}\n\n\t\tbackdrop.classList.add('opacity-0');\n\n\t\tafterTransition(backdrop, () => {\n\t\t\tbackdrop.remove();\n\t\t});\n\t}\n\n\tprivate focusElement() {\n\t\tconst input: HTMLInputElement = this.el.querySelector('[autofocus]');\n\n\t\tif (!input) return false;\n\t\telse input.focus();\n\t}\n\n\tprivate getScrollbarSize() {\n\t\tlet div = document.createElement('div');\n\t\tdiv.style.overflow = 'scroll';\n\t\tdiv.style.width = '100px';\n\t\tdiv.style.height = '100px';\n\t\tdocument.body.appendChild(div);\n\n\t\tlet scrollbarSize = div.offsetWidth - div.clientWidth;\n\n\t\tdocument.body.removeChild(div);\n\n\t\treturn scrollbarSize;\n\t}\n\n\tprivate collectToggleParameters(buttons: HTMLElement[]) {\n\t\tlet toggleData = {};\n\n\t\tbuttons.forEach((el) => {\n\t\t\tconst data = el.getAttribute('data-hs-overlay-options');\n\t\t\tconst dataOptions: IOverlayOptions = data ? JSON.parse(data) : {};\n\t\t\ttoggleData = {\n\t\t\t\t...toggleData,\n\t\t\t\t...dataOptions\n\t\t\t};\n\t\t});\n\n\t\treturn toggleData;\n\t}\n\n\t// Public methods\n\tpublic open() {\n\t\tconst openedOverlays = document.querySelectorAll('.hs-overlay.open');\n\t\tconst currentlyOpened = window.$hsOverlayCollection.find(\n\t\t\t(el) =>\n\t\t\t\tArray.from(openedOverlays).includes(el.element.el) &&\n\t\t\t\t!el.element.isLayoutAffect,\n\t\t);\n\t\tconst toggles = document.querySelectorAll(\n\t\t\t`[data-hs-overlay=\"#${this.el.id}\"]`,\n\t\t);\n\t\tconst disabledScroll =\n\t\t\tgetClassProperty(this.el, '--body-scroll', 'false') !== 'true';\n\n\t\tif (this.isClosePrev && currentlyOpened) {\n\t\t\tthis.openNextOverlay = true;\n\n\t\t\treturn currentlyOpened.element.close().then(() => {\n\t\t\t\tthis.open();\n\n\t\t\t\tthis.openNextOverlay = false;\n\t\t\t});\n\t\t}\n\n\t\tif (disabledScroll) {\n\t\t\tdocument.body.style.overflow = 'hidden';\n\t\t\tif (this.emulateScrollbarSpace)\n\t\t\t\tdocument.body.style.paddingRight = `${this.getScrollbarSize()}px`;\n\t\t}\n\n\t\tthis.buildBackdrop();\n\t\tthis.checkTimer();\n\t\tthis.hideAuto();\n\n\t\ttoggles.forEach((toggle) => {\n\t\t\tif (toggle.ariaExpanded) toggle.ariaExpanded = 'true';\n\t\t});\n\t\tthis.el.classList.remove(this.hiddenClass);\n\t\tthis.el.setAttribute('aria-overlay', 'true');\n\t\tthis.el.setAttribute('tabindex', '-1');\n\n\t\tsetTimeout(() => {\n\t\t\tif (this.el.classList.contains('opened')) return false;\n\n\t\t\tthis.el.classList.add('open', 'opened');\n\t\t\tif (this.isLayoutAffect) document.body.classList.add('hs-overlay-body-open');\n\n\t\t\tthis.fireEvent('open', this.el);\n\t\t\tdispatch('open.hs.overlay', this.el, this.el);\n\n\t\t\tif (this.hasAutofocus) this.focusElement();\n\t\t}, 50);\n\t}\n\n\tpublic close(forceClose = false) {\n\t\tif (this.isLayoutAffect)\n\t\t\tdocument.body.classList.remove('hs-overlay-body-open');\n\n\t\tconst closeFn = (cb: Function) => {\n\t\t\tif (this.el.classList.contains('open')) return false;\n\t\t\tconst toggles = document.querySelectorAll(\n\t\t\t\t`[data-hs-overlay=\"#${this.el.id}\"]`,\n\t\t\t);\n\n\t\t\ttoggles.forEach((toggle) => {\n\t\t\t\tif (toggle.ariaExpanded) toggle.ariaExpanded = 'false';\n\t\t\t});\n\t\t\tthis.el.classList.add(this.hiddenClass);\n\n\t\t\tthis.destroyBackdrop();\n\n\t\t\tthis.fireEvent('close', this.el);\n\t\t\tdispatch('close.hs.overlay', this.el, this.el);\n\n\t\t\tif (!document.querySelector('.hs-overlay.opened')) {\n\t\t\t\tdocument.body.style.overflow = '';\n\t\t\t\tif (this.emulateScrollbarSpace) document.body.style.paddingRight = '';\n\t\t\t}\n\n\t\t\tcb(this.el);\n\t\t};\n\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.el.classList.remove('open', 'opened');\n\t\t\tthis.el.removeAttribute('aria-overlay');\n\t\t\tthis.el.removeAttribute('tabindex');\n\n\t\t\tif (forceClose) closeFn(resolve);\n\t\t\telse afterTransition(this.animationTarget, () => closeFn(resolve));\n\t\t});\n\t}\n\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tthis.el.classList.remove('open', 'opened', this.hiddenClass);\n\t\tif (this.isLayoutAffect)\n\t\t\tdocument.body.classList.remove('hs-overlay-body-open');\n\n\t\t// Remove listeners\n\t\tthis.el.removeEventListener('click', this.onOverlayClickListener);\n\t\tif (this.onElementClickListener.length) {\n\t\t\tthis.onElementClickListener.forEach(({ el, fn }) => {\n\t\t\t\tel.removeEventListener('click', fn);\n\t\t\t});\n\t\t\tthis.onElementClickListener = null;\n\t\t}\n\t\tif (this.backdrop)\n\t\t\tthis.backdrop.removeEventListener('click', this.onBackdropClickListener);\n\n\t\tif (this.backdrop) {\n\t\t\tthis.backdrop.remove();\n\t\t\tthis.backdrop = null;\n\t\t}\n\n\t\twindow.$hsOverlayCollection = window.$hsOverlayCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tprivate static findInCollection(target: HSOverlay | HTMLElement | string): ICollectionItem | null {\n\t\treturn window.$hsOverlayCollection.find((el) => {\n\t\t\tif (target instanceof HSOverlay) return el.element.el === target.el;\n\t\t\telse if (typeof target === 'string') return el.element.el === document.querySelector(target);\n\t\t\telse return el.element.el === target;\n\t\t}) || null;\n\t}\n\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\t// Backward compatibility\n\t\tconst _temp = typeof target === 'string' ? document.querySelector(target) : target;\n\t\tconst _target = _temp?.getAttribute('data-hs-overlay') ? _temp.getAttribute('data-hs-overlay') : target;\n\n\t\tconst elInCollection = window.$hsOverlayCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el === (typeof _target === 'string' ? document.querySelector(_target) : _target) ||\n\t\t\t\tel.element.el === (typeof _target === 'string' ? document.querySelector(_target) : _target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsOverlayCollection) {\n\t\t\twindow.$hsOverlayCollection = [];\n\n\t\t\tdocument.addEventListener('keydown', (evt) =>\n\t\t\t\tHSOverlay.accessibility(evt),\n\t\t\t);\n\t\t}\n\n\t\tif (window.$hsOverlayCollection)\n\t\t\twindow.$hsOverlayCollection = window.$hsOverlayCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-overlay:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsOverlayCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSOverlay(el);\n\t\t\t});\n\t}\n\n\tstatic open(target: HSOverlay | HTMLElement | string) {\n\t\tconst instance = HSOverlay.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\tinstance.element.el.classList.contains(instance.element.hiddenClass)\n\t\t) instance.element.open();\n\t}\n\n\tstatic close(target: HSOverlay | HTMLElement | string) {\n\t\tconst instance = HSOverlay.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\t!instance.element.el.classList.contains(instance.element.hiddenClass)\n\t\t) instance.element.close();\n\t}\n\n\tstatic setOpened(breakpoint: number, el: ICollectionItem) {\n\t\tif (document.body.clientWidth >= breakpoint) {\n\t\t\tdocument.body.classList.add('hs-overlay-body-open');\n\t\t\tel.element.open();\n\t\t} else el.element.close(true);\n\t}\n\n\t// Accessibility methods\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tconst targets = window.$hsOverlayCollection.filter((el) =>\n\t\t\tel.element.el.classList.contains('open'),\n\t\t);\n\t\tconst target = targets[targets.length - 1];\n\t\tconst focusableElements = target?.element?.el?.querySelectorAll(\n\t\t\t'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n\t\t);\n\t\tconst notHiddenFocusableElements: HTMLElement[] = [];\n\t\tif (focusableElements?.length)\n\t\t\tfocusableElements.forEach((el: HTMLElement) => {\n\t\t\t\tif (!isParentOrElementHidden(el)) notHiddenFocusableElements.push(el);\n\t\t\t});\n\t\tconst basicCheck = target && !evt.metaKey;\n\n\t\tif (\n\t\t\tbasicCheck &&\n\t\t\t!target.element.isTabAccessibilityLimited &&\n\t\t\tevt.code === 'Tab'\n\t\t)\n\t\t\treturn false;\n\n\t\tif (basicCheck && notHiddenFocusableElements.length && evt.code === 'Tab') {\n\t\t\tevt.preventDefault();\n\t\t\tthis.onTab(target);\n\t\t}\n\t\tif (basicCheck && evt.code === 'Escape') {\n\t\t\tevt.preventDefault();\n\t\t\tthis.onEscape(target);\n\t\t}\n\t}\n\n\tstatic onEscape(target: ICollectionItem) {\n\t\tif (target && target.element.hasAbilityToCloseOnBackdropClick)\n\t\t\ttarget.element.close();\n\t}\n\n\tstatic onTab(target: ICollectionItem) {\n\t\tconst overlayElement = target.element.el;\n\t\tconst focusableElements = Array.from(\n\t\t\toverlayElement.querySelectorAll(\n\t\t\t\t'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n\t\t\t)\n\t\t);\n\n\t\tif (focusableElements.length === 0) return false;\n\n\t\tconst focusedElement = overlayElement.querySelector(':focus');\n\n\t\tif (focusedElement) {\n\t\t\tlet foundCurrent = false;\n\n\t\t\tfor (const element of focusableElements) {\n\t\t\t\tif (foundCurrent) {\n\t\t\t\t\telement.focus();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (element === focusedElement) {\n\t\t\t\t\tfoundCurrent = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfocusableElements[0].focus();\n\t\t} else {\n\t\t\tfocusableElements[0].focus();\n\t\t}\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HSOverlay | HTMLElement | string, cb: Function) {\n\t\tconst instance = HSOverlay.findInCollection(target);\n\n\t\tif (instance) instance.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSOverlay: Function;\n\t\t$hsOverlayCollection: ICollectionItem[];\n\t}\n}\n\nconst autoCloseResizeFn = () => {\n\tif (\n\t\t!window.$hsOverlayCollection.length ||\n\t\t!window.$hsOverlayCollection.find((el) => el.element.autoClose)\n\t)\n\t\treturn false;\n\n\tconst overlays = window.$hsOverlayCollection.filter(\n\t\t(el) => el.element.autoClose,\n\t);\n\n\toverlays.forEach((overlay) => {\n\t\tconst { autoCloseEqualityType, autoClose } = overlay.element;\n\t\tconst condition = autoCloseEqualityType === 'less-than'\n\t\t\t? document.body.clientWidth <= autoClose\n\t\t\t: document.body.clientWidth >= autoClose;\n\n\t\tif (condition) {\n\t\t\toverlay.element.close(true);\n\t\t}\n\t});\n};\n\nconst moveOverlayToBodyResizeFn = () => {\n\tif (\n\t\t!window.$hsOverlayCollection.length ||\n\t\t!window.$hsOverlayCollection.find((el) => el.element.moveOverlayToBody)\n\t)\n\t\treturn false;\n\n\tconst overlays = window.$hsOverlayCollection.filter(\n\t\t(el) => el.element.moveOverlayToBody,\n\t);\n\n\toverlays.forEach((overlay) => {\n\t\tconst resolution = overlay.element.moveOverlayToBody;\n\t\tconst initPlace = overlay.element.initContainer;\n\t\tconst newPlace = document.querySelector('body');\n\t\tconst target = overlay.element.el;\n\n\t\tif (!initPlace && target) return false;\n\n\t\tif (\n\t\t\tdocument.body.clientWidth <= resolution &&\n\t\t\t!isDirectChild(newPlace, target)\n\t\t)\n\t\t\tnewPlace.appendChild(target);\n\t\telse if (\n\t\t\tdocument.body.clientWidth > resolution &&\n\t\t\t!initPlace.contains(target)\n\t\t)\n\t\t\tinitPlace.appendChild(target);\n\t});\n};\n\nconst setOpenedResizeFn = () => {\n\tif (\n\t\t!window.$hsOverlayCollection.length ||\n\t\t!window.$hsOverlayCollection.find((el) => el.element.autoClose)\n\t)\n\t\treturn false;\n\n\tconst overlays = window.$hsOverlayCollection.filter(\n\t\t(el) => el.element.autoClose,\n\t);\n\n\toverlays.forEach((overlay) => {\n\t\tconst { autoCloseEqualityType, autoClose } = overlay.element;\n\t\tconst condition = autoCloseEqualityType === 'less-than'\n\t\t\t? document.body.clientWidth <= autoClose\n\t\t\t: document.body.clientWidth >= autoClose;\n\n\t\tif (condition) {\n\t\t\toverlay.element.close(true);\n\t\t}\n\t});\n};\n\nconst setBackdropZIndexResizeFn = () => {\n\tif (\n\t\t!window.$hsOverlayCollection.length ||\n\t\t!window.$hsOverlayCollection.find((el) => el.element.el.classList.contains('opened'))\n\t)\n\t\treturn false;\n\n\tconst overlays = window.$hsOverlayCollection.filter((el) => el.element.el.classList.contains('opened'));\n\n\toverlays.forEach((overlay) => {\n\t\tconst overlayZIndex = parseInt(window.getComputedStyle(overlay.element.el).getPropertyValue('z-index'));\n\t\tconst backdrop: HTMLElement = document.querySelector(`#${overlay.element.el.id}-backdrop`);\n\t\tif (!backdrop) return false;\n\n\t\tconst backdropZIndex = parseInt(window.getComputedStyle(backdrop).getPropertyValue('z-index'));\n\t\tif (overlayZIndex === backdropZIndex + 1) return false;\n\n\t\tif ('style' in backdrop) backdrop.style.zIndex = `${overlayZIndex - 1}`;\n\n\t\tdocument.body.classList.add('hs-overlay-body-open');\n\t});\n};\n\nwindow.addEventListener('load', () => {\n\tHSOverlay.autoInit();\n\n\tmoveOverlayToBodyResizeFn();\n\t// Uncomment for debug\n\t// console.log('Overlay collection:', window.$hsOverlayCollection);\n});\n\nwindow.addEventListener('resize', () => {\n\tautoCloseResizeFn();\n\tmoveOverlayToBodyResizeFn();\n\tsetOpenedResizeFn();\n\tsetBackdropZIndexResizeFn();\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSOverlay = HSOverlay;\n}\n\nexport default HSOverlay;\n", "/*\n * HSPinInput\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { IPinInputOptions, IPinInput } from '../pin-input/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSPinInput extends HSBasePlugin implements IPinInput {\n\tprivate items: NodeListOf | null;\n\tprivate currentItem: HTMLInputElement | null;\n\tprivate currentValue: string[] | null;\n\tprivate readonly placeholders: string[] | null;\n\tprivate readonly availableCharsRE: RegExp | null;\n\n\tprivate onElementInputListener:\n\t\t| {\n\t\t\t\tel: HTMLElement;\n\t\t\t\tfn: (evt: Event) => void;\n\t\t }[]\n\t\t| null;\n\tprivate onElementPasteListener:\n\t\t| {\n\t\t\t\tel: HTMLElement;\n\t\t\t\tfn: (evt: Event) => void;\n\t\t }[]\n\t\t| null;\n\tprivate onElementKeydownListener:\n\t\t| {\n\t\t\t\tel: HTMLElement;\n\t\t\t\tfn: (evt: Event) => void;\n\t\t }[]\n\t\t| null;\n\tprivate onElementFocusinListener:\n\t\t| {\n\t\t\t\tel: HTMLElement;\n\t\t\t\tfn: () => void;\n\t\t }[]\n\t\t| null;\n\tprivate onElementFocusoutListener:\n\t\t| {\n\t\t\t\tel: HTMLElement;\n\t\t\t\tfn: () => void;\n\t\t }[]\n\t\t| null;\n\n\tprivate elementInput(evt: Event, index: number) {\n\t\tthis.onInput(evt, index);\n\t}\n\n\tprivate elementPaste(evt: ClipboardEvent) {\n\t\tthis.onPaste(evt);\n\t}\n\n\tprivate elementKeydown(evt: KeyboardEvent, index: number) {\n\t\tthis.onKeydown(evt, index);\n\t}\n\n\tprivate elementFocusin(index: number) {\n\t\tthis.onFocusIn(index);\n\t}\n\n\tprivate elementFocusout(index: number) {\n\t\tthis.onFocusOut(index);\n\t}\n\n\tconstructor(el: HTMLElement, options?: IPinInputOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-pin-input');\n\t\tconst dataOptions: IPinInputOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.items = this.el.querySelectorAll('[data-hs-pin-input-item]');\n\t\tthis.currentItem = null;\n\t\tthis.currentValue = new Array(this.items.length).fill('');\n\t\tthis.placeholders = [];\n\t\tthis.availableCharsRE = new RegExp(\n\t\t\tconcatOptions?.availableCharsRE || '^[a-zA-Z0-9]+$',\n\t\t); // '^[0-9]+$'\n\n\t\tthis.onElementInputListener = [];\n\t\tthis.onElementPasteListener = [];\n\t\tthis.onElementKeydownListener = [];\n\t\tthis.onElementFocusinListener = [];\n\t\tthis.onElementFocusoutListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsPinInputCollection, this);\n\n\t\tif (this.items.length) this.build();\n\t}\n\n\tprivate build() {\n\t\tthis.buildInputItems();\n\t}\n\n\tprivate buildInputItems() {\n\t\tthis.items.forEach((el, index) => {\n\t\t\tthis.placeholders.push(el.getAttribute('placeholder') || '');\n\n\t\t\tif (el.hasAttribute('autofocus')) this.onFocusIn(index);\n\n\t\t\tthis.onElementInputListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: (evt: Event) => this.elementInput(evt, index),\n\t\t\t});\n\t\t\tthis.onElementPasteListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: (evt: ClipboardEvent) => this.elementPaste(evt),\n\t\t\t});\n\t\t\tthis.onElementKeydownListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: (evt: KeyboardEvent) => this.elementKeydown(evt, index),\n\t\t\t});\n\t\t\tthis.onElementFocusinListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: () => this.elementFocusin(index),\n\t\t\t});\n\t\t\tthis.onElementFocusoutListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: () => this.elementFocusout(index),\n\t\t\t});\n\n\t\t\tel.addEventListener(\n\t\t\t\t'input',\n\t\t\t\tthis.onElementInputListener.find((elI) => elI.el === el).fn,\n\t\t\t);\n\t\t\tel.addEventListener(\n\t\t\t\t'paste',\n\t\t\t\tthis.onElementPasteListener.find((elI) => elI.el === el).fn,\n\t\t\t);\n\t\t\tel.addEventListener(\n\t\t\t\t'keydown',\n\t\t\t\tthis.onElementKeydownListener.find((elI) => elI.el === el).fn,\n\t\t\t);\n\t\t\tel.addEventListener(\n\t\t\t\t'focusin',\n\t\t\t\tthis.onElementFocusinListener.find((elI) => elI.el === el).fn,\n\t\t\t);\n\t\t\tel.addEventListener(\n\t\t\t\t'focusout',\n\t\t\t\tthis.onElementFocusoutListener.find((elI) => elI.el === el).fn,\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate checkIfNumber(value: string) {\n\t\treturn value.match(this.availableCharsRE);\n\t}\n\n\tprivate autoFillAll(text: string) {\n\t\tArray.from(text).forEach((n, i) => {\n\t\t\tif (!this?.items[i]) return false;\n\n\t\t\t(this.items[i] as HTMLInputElement).value = n;\n\n\t\t\tthis.items[i].dispatchEvent(new Event('input', { bubbles: true }));\n\t\t});\n\t}\n\n\tprivate setCurrentValue() {\n\t\tthis.currentValue = Array.from(this.items).map(\n\t\t\t(el) => (el as HTMLInputElement).value,\n\t\t);\n\t}\n\n\tprivate toggleCompleted() {\n\t\tif (!this.currentValue.includes('')) this.el.classList.add('active');\n\t\telse this.el.classList.remove('active');\n\t}\n\n\tprivate onInput(evt: Event, index: number) {\n\t\tconst originalValue = (evt.target as HTMLInputElement).value;\n\t\tthis.currentItem = evt.target as HTMLInputElement;\n\t\tthis.currentItem.value = '';\n\t\tthis.currentItem.value = originalValue[originalValue.length - 1];\n\n\t\tif (!this.checkIfNumber(this.currentItem.value)) {\n\t\t\tthis.currentItem.value = this.currentValue[index] || '';\n\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.setCurrentValue();\n\n\t\tif (this.currentItem.value) {\n\t\t\tif (index < this.items.length - 1) this.items[index + 1].focus();\n\t\t\tif (!this.currentValue.includes('')) {\n\t\t\t\tconst payload = { currentValue: this.currentValue };\n\n\t\t\t\tthis.fireEvent('completed', payload);\n\t\t\t\tdispatch('completed.hs.pinInput', this.el, payload);\n\t\t\t}\n\n\t\t\tthis.toggleCompleted();\n\t\t} else {\n\t\t\tif (index > 0) this.items[index - 1].focus();\n\t\t}\n\t}\n\n\tprivate onKeydown(evt: KeyboardEvent, index: number) {\n\t\tif (evt.key === 'Backspace' && index > 0) {\n\t\t\tif ((this.items[index] as HTMLInputElement).value === '') {\n\t\t\t\t(this.items[index - 1] as HTMLInputElement).value = '';\n\t\t\t\t(this.items[index - 1] as HTMLInputElement).focus();\n\t\t\t} else {\n\t\t\t\t(this.items[index] as HTMLInputElement).value = '';\n\t\t\t}\n\t\t}\n\n\t\tthis.setCurrentValue();\n\t\tthis.toggleCompleted();\n\t}\n\n\tprivate onFocusIn(index: number) {\n\t\tthis.items[index].setAttribute('placeholder', '');\n\t}\n\n\tprivate onFocusOut(index: number) {\n\t\tthis.items[index].setAttribute('placeholder', this.placeholders[index]);\n\t}\n\n\tprivate onPaste(evt: ClipboardEvent) {\n\t\tevt.preventDefault();\n\n\t\tthis.items.forEach((el) => {\n\t\t\tif (document.activeElement === el)\n\t\t\t\tthis.autoFillAll(evt.clipboardData.getData('text'));\n\t\t});\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tthis.el.classList.remove('active');\n\n\t\t// Remove listeners\n\t\tif (this.items.length)\n\t\t\tthis.items.forEach((el) => {\n\t\t\t\tel.removeEventListener(\n\t\t\t\t\t'input',\n\t\t\t\t\tthis.onElementInputListener.find((elI) => elI.el === el).fn,\n\t\t\t\t);\n\t\t\t\tel.removeEventListener(\n\t\t\t\t\t'paste',\n\t\t\t\t\tthis.onElementPasteListener.find((elI) => elI.el === el).fn,\n\t\t\t\t);\n\t\t\t\tel.removeEventListener(\n\t\t\t\t\t'keydown',\n\t\t\t\t\tthis.onElementKeydownListener.find((elI) => elI.el === el).fn,\n\t\t\t\t);\n\t\t\t\tel.removeEventListener(\n\t\t\t\t\t'focusin',\n\t\t\t\t\tthis.onElementFocusinListener.find((elI) => elI.el === el).fn,\n\t\t\t\t);\n\t\t\t\tel.removeEventListener(\n\t\t\t\t\t'focusout',\n\t\t\t\t\tthis.onElementFocusoutListener.find((elI) => elI.el === el).fn,\n\t\t\t\t);\n\t\t\t});\n\n\t\tthis.items = null;\n\t\tthis.currentItem = null;\n\t\tthis.currentValue = null;\n\n\t\twindow.$hsPinInputCollection = window.$hsPinInputCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static method\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsPinInputCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsPinInputCollection) window.$hsPinInputCollection = [];\n\n\t\tif (window.$hsPinInputCollection)\n\t\t\twindow.$hsPinInputCollection = window.$hsPinInputCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-pin-input]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsPinInputCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSPinInput(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSPinInput: Function;\n\t\t$hsPinInputCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSPinInput.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('PIN input collection:', window.$hsPinInputCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSPinInput = HSPinInput;\n}\n\nexport default HSPinInput;\n", "/*\n * HSRemoveElement\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { afterTransition } from '../../utils';\n\nimport {\n\tIRemoveElementOptions,\n\tIRemoveElement,\n} from '../remove-element/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSRemoveElement\n\textends HSBasePlugin\n\timplements IRemoveElement {\n\tprivate readonly removeTargetId: string | null;\n\tprivate readonly removeTarget: HTMLElement | null;\n\tprivate readonly removeTargetAnimationClass: string;\n\n\tprivate onElementClickListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: IRemoveElementOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-remove-element-options');\n\t\tconst dataOptions: IRemoveElementOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.removeTargetId = this.el.getAttribute('data-hs-remove-element');\n\t\tthis.removeTarget = document.querySelector(this.removeTargetId);\n\t\tthis.removeTargetAnimationClass =\n\t\t\tconcatOptions?.removeTargetAnimationClass || 'hs-removing';\n\n\t\tif (this.removeTarget) this.init();\n\t}\n\n\tprivate elementClick() {\n\t\tthis.remove();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsRemoveElementCollection, this);\n\n\t\tthis.onElementClickListener = () => this.elementClick();\n\n\t\tthis.el.addEventListener('click', this.onElementClickListener);\n\t}\n\n\tprivate remove() {\n\t\tif (!this.removeTarget) return false;\n\n\t\tthis.removeTarget.classList.add(this.removeTargetAnimationClass);\n\n\t\tafterTransition(this.removeTarget, () =>\n\t\t\tsetTimeout(() => this.removeTarget.remove()),\n\t\t);\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tthis.removeTarget.classList.remove(this.removeTargetAnimationClass);\n\n\t\t// Remove listeners\n\t\tthis.el.removeEventListener('click', this.onElementClickListener);\n\n\t\twindow.$hsRemoveElementCollection =\n\t\t\twindow.$hsRemoveElementCollection.filter(\n\t\t\t\t({ element }) => element.el !== this.el,\n\t\t\t);\n\t}\n\n\t// Static method\n\tstatic getInstance(target: HTMLElement, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsRemoveElementCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t: target) ||\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t: target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsRemoveElementCollection)\n\t\t\twindow.$hsRemoveElementCollection = [];\n\n\t\tif (window.$hsRemoveElementCollection)\n\t\t\twindow.$hsRemoveElementCollection =\n\t\t\t\twindow.$hsRemoveElementCollection.filter(({ element }) =>\n\t\t\t\t\tdocument.contains(element.el),\n\t\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-remove-element]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsRemoveElementCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSRemoveElement(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSRemoveElement: Function;\n\t\t$hsRemoveElementCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSRemoveElement.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Remove element collection:', window.$hsRemoveElementCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSRemoveElement = HSRemoveElement;\n}\n\nexport default HSRemoveElement;\n", "/*\n * HSScrollspy\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { getClassProperty, dispatch } from '../../utils';\n\nimport { IScrollspy } from '../scrollspy/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSScrollspy extends HSBasePlugin<{}> implements IScrollspy {\n\tprivate activeSection: HTMLElement | null;\n\tprivate readonly contentId: string | null;\n\tprivate readonly content: HTMLElement | null;\n\tprivate readonly links: NodeListOf | null;\n\tprivate readonly sections: HTMLElement[] | null;\n\tprivate readonly scrollableId: string | null;\n\tprivate readonly scrollable: HTMLElement | Document;\n\n\tprivate onScrollableScrollListener: (evt: Event) => void;\n\tprivate onLinkClickListener:\n\t\t| {\n\t\t\t\tel: HTMLAnchorElement;\n\t\t\t\tfn: (evt: Event) => void;\n\t\t }[]\n\t\t| null;\n\n\tconstructor(el: HTMLElement, options = {}) {\n\t\tsuper(el, options);\n\n\t\tthis.activeSection = null;\n\t\tthis.contentId = this.el.getAttribute('data-hs-scrollspy');\n\t\tthis.content = document.querySelector(this.contentId);\n\t\tthis.links = this.el.querySelectorAll('[href]');\n\t\tthis.sections = [];\n\t\tthis.scrollableId = this.el.getAttribute(\n\t\t\t'data-hs-scrollspy-scrollable-parent',\n\t\t);\n\t\tthis.scrollable = this.scrollableId\n\t\t\t? (document.querySelector(this.scrollableId) as HTMLElement)\n\t\t\t: (document as Document);\n\n\t\tthis.onLinkClickListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate scrollableScroll(evt: Event) {\n\t\tArray.from(this.sections).forEach((section: HTMLElement) => {\n\t\t\tif (!section.getAttribute('id')) return false;\n\n\t\t\tthis.update(evt, section);\n\t\t});\n\t}\n\n\tprivate linkClick(evt: Event, el: HTMLAnchorElement) {\n\t\tevt.preventDefault();\n\n\t\tif (el.getAttribute('href') === 'javascript:;') return false;\n\n\t\tthis.scrollTo(el);\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsScrollspyCollection, this);\n\n\t\tthis.links.forEach((el) => {\n\t\t\tthis.sections.push(\n\t\t\t\tthis.scrollable.querySelector(el.getAttribute('href')),\n\t\t\t);\n\t\t});\n\n\t\tthis.onScrollableScrollListener = (evt) => this.scrollableScroll(evt);\n\n\t\tthis.scrollable.addEventListener('scroll', this.onScrollableScrollListener);\n\n\t\tthis.links.forEach((el) => {\n\t\t\tthis.onLinkClickListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: (evt: Event) => this.linkClick(evt, el),\n\t\t\t});\n\n\t\t\tel.addEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onLinkClickListener.find((link) => link.el === el).fn,\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate update(evt: Event, section: HTMLElement) {\n\t\tconst globalOffset = parseInt(\n\t\t\tgetClassProperty(this.el, '--scrollspy-offset', '0'),\n\t\t);\n\t\tconst userOffset =\n\t\t\tparseInt(getClassProperty(section, '--scrollspy-offset')) || globalOffset;\n\t\tconst scrollableParentOffset =\n\t\t\tevt.target === document\n\t\t\t\t? 0\n\t\t\t\t: parseInt(\n\t\t\t\t\t\tString((evt.target as HTMLElement).getBoundingClientRect().top),\n\t\t\t\t\t);\n\t\tconst topOffset =\n\t\t\tparseInt(String(section.getBoundingClientRect().top)) -\n\t\t\tuserOffset -\n\t\t\tscrollableParentOffset;\n\t\tconst height = section.offsetHeight;\n\n\t\tif (topOffset <= 0 && topOffset + height > 0) {\n\t\t\tif (this.activeSection === section) return false;\n\n\t\t\tthis.links.forEach((el) => {\n\t\t\t\tel.classList.remove('active');\n\t\t\t});\n\n\t\t\tconst current = this.el.querySelector(\n\t\t\t\t`[href=\"#${section.getAttribute('id')}\"]`,\n\t\t\t);\n\n\t\t\tif (current) {\n\t\t\t\tcurrent.classList.add('active');\n\n\t\t\t\tconst group = current.closest('[data-hs-scrollspy-group]');\n\n\t\t\t\tif (group) {\n\t\t\t\t\tconst parentLink = group.querySelector('[href]');\n\n\t\t\t\t\tif (parentLink) parentLink.classList.add('active');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.activeSection = section;\n\t\t}\n\t}\n\n\tprivate scrollTo(link: HTMLAnchorElement) {\n\t\tconst targetId = link.getAttribute('href');\n\t\tconst target: HTMLElement = document.querySelector(targetId);\n\t\tconst globalOffset = parseInt(\n\t\t\tgetClassProperty(this.el, '--scrollspy-offset', '0'),\n\t\t);\n\t\tconst userOffset =\n\t\t\tparseInt(getClassProperty(target, '--scrollspy-offset')) || globalOffset;\n\t\tconst scrollableParentOffset =\n\t\t\tthis.scrollable === document\n\t\t\t\t? 0\n\t\t\t\t: (this.scrollable as HTMLElement).offsetTop;\n\t\tconst topOffset = target.offsetTop - userOffset - scrollableParentOffset;\n\t\tconst view = this.scrollable === document ? window : this.scrollable;\n\t\tconst scrollFn = () => {\n\t\t\twindow.history.replaceState(null, null, link.getAttribute('href'));\n\n\t\t\tif ('scrollTo' in view) {\n\t\t\t\tview.scrollTo({\n\t\t\t\t\ttop: topOffset,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tconst beforeScroll = this.fireEvent('beforeScroll', this.el);\n\t\tdispatch('beforeScroll.hs.scrollspy', this.el, this.el);\n\n\t\tif (beforeScroll instanceof Promise) beforeScroll.then(() => scrollFn());\n\t\telse scrollFn();\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tconst activeLink = this.el.querySelector('[href].active');\n\t\tactiveLink.classList.remove('active');\n\n\t\t// Remove listeners\n\t\tthis.scrollable.removeEventListener(\n\t\t\t'scroll',\n\t\t\tthis.onScrollableScrollListener,\n\t\t);\n\t\tif (this.onLinkClickListener.length)\n\t\t\tthis.onLinkClickListener.forEach(({ el, fn }) => {\n\t\t\t\tel.removeEventListener('click', fn);\n\t\t\t});\n\n\t\twindow.$hsScrollspyCollection = window.$hsScrollspyCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement, isInstance = false) {\n\t\tconst elInCollection = window.$hsScrollspyCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsScrollspyCollection) window.$hsScrollspyCollection = [];\n\n\t\tif (window.$hsScrollspyCollection)\n\t\t\twindow.$hsScrollspyCollection = window.$hsScrollspyCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-scrollspy]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsScrollspyCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSScrollspy(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSScrollspy: Function;\n\t\t$hsScrollspyCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSScrollspy.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Scrollspy collection:', window.$hsScrollspyCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSScrollspy = HSScrollspy;\n}\n\nexport default HSScrollspy;\n", "/*\n * HSSelect\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tisEnoughSpace,\n\tdebounce,\n\tdispatch,\n\tafterTransition,\n\thtmlToElement,\n\tclassToClassList,\n} from '../../utils';\n\nimport {\n\tISelect,\n\tISelectOptions,\n\tISingleOption,\n\tISingleOptionOptions,\n\tIApiFieldMap,\n} from '../select/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { SELECT_ACCESSIBILITY_KEY_SET, POSITIONS } from '../../constants';\n\nclass HSSelect extends HSBasePlugin implements ISelect {\n\tvalue: string | string[] | null;\n\tprivate readonly placeholder: string | null;\n\tprivate readonly hasSearch: boolean;\n\tprivate readonly minSearchLength: number;\n\tprivate readonly preventSearchFocus: boolean;\n\tprivate readonly mode: string | null;\n\tprivate readonly viewport: HTMLElement | null;\n\n\tisOpened: boolean | null;\n\tisMultiple: boolean | null;\n\tisDisabled: boolean | null;\n\tselectedItems: string[];\n\n\tprivate readonly apiUrl: string | null;\n\tprivate readonly apiQuery: string | null;\n\tprivate readonly apiOptions: RequestInit | null;\n\tprivate readonly apiDataPart: string | null;\n\tprivate readonly apiSearchQueryKey: string | null;\n\tprivate readonly apiFieldsMap: IApiFieldMap | null;\n\tprivate readonly apiIconTag: string | null;\n\n\tprivate readonly toggleTag: string | null;\n\tprivate readonly toggleClasses: string | null;\n\tprivate readonly toggleSeparators: {\n\t\titems?: string;\n\t\tbetweenItemsAndCounter?: string;\n\t} | null;\n\tprivate readonly toggleCountText: string | null;\n\tprivate readonly toggleCountTextPlacement:\n\t\t| 'postfix'\n\t\t| 'prefix'\n\t\t| 'postfix-no-space'\n\t\t| 'prefix-no-space';\n\tprivate readonly toggleCountTextMinItems: number | null;\n\tprivate readonly toggleCountTextMode: string | null;\n\tprivate readonly wrapperClasses: string | null;\n\tprivate readonly tagsItemTemplate: string | null;\n\tprivate readonly tagsItemClasses: string | null;\n\tprivate readonly tagsInputId: string | null;\n\tprivate readonly tagsInputClasses: string | null;\n\tprivate readonly dropdownTag: string | null;\n\tprivate readonly dropdownClasses: string | null;\n\tprivate readonly dropdownDirectionClasses: {\n\t\ttop?: string;\n\t\tbottom?: string;\n\t} | null;\n\tpublic dropdownSpace: number | null;\n\tpublic readonly dropdownPlacement: string | null;\n\tpublic readonly dropdownVerticalFixedPlacement: 'top' | 'bottom' | null;\n\tpublic readonly dropdownScope: 'window' | 'parent';\n\tprivate readonly searchTemplate: string | null;\n\tprivate readonly searchWrapperTemplate: string | null;\n\tprivate readonly searchPlaceholder: string | null;\n\tprivate readonly searchId: string | null;\n\tprivate readonly searchLimit: number | typeof Infinity;\n\tprivate readonly isSearchDirectMatch: boolean;\n\tprivate readonly searchClasses: string | null;\n\tprivate readonly searchWrapperClasses: string | null;\n\tprivate readonly searchNoResultTemplate: string | null;\n\tprivate readonly searchNoResultText: string | null;\n\tprivate readonly searchNoResultClasses: string | null;\n\tprivate readonly optionAllowEmptyOption: boolean;\n\tprivate readonly optionTag: string | null;\n\tprivate readonly optionTemplate: string | null;\n\tprivate readonly optionClasses: string | null;\n\tprivate readonly descriptionClasses: string | null;\n\tprivate readonly iconClasses: string | null;\n\n\tprivate animationInProcess: boolean;\n\n\tprivate wrapper: HTMLElement | null;\n\tprivate toggle: HTMLElement | null;\n\tprivate toggleTextWrapper: HTMLElement | null;\n\tprivate tagsInput: HTMLElement | null;\n\tprivate dropdown: HTMLElement | null;\n\tprivate popperInstance: any;\n\tprivate searchWrapper: HTMLElement | null;\n\tprivate search: HTMLInputElement | null;\n\tprivate searchNoResult: HTMLElement | null;\n\tprivate selectOptions: ISingleOption[] | [];\n\tprivate extraMarkup: string | string[] | Element | null;\n\n\tprivate readonly isAddTagOnEnter: boolean;\n\n\tprivate tagsInputHelper: HTMLElement | null;\n\n\tprivate remoteOptions: unknown[];\n\n\tprivate optionId = 0;\n\n\tprivate onWrapperClickListener: (evt: Event) => void;\n\tprivate onToggleClickListener: () => void;\n\tprivate onTagsInputFocusListener: () => void;\n\tprivate onTagsInputInputListener: () => void;\n\tprivate onTagsInputInputSecondListener: (evt: InputEvent) => void;\n\tprivate onTagsInputKeydownListener: (evt: KeyboardEvent) => void;\n\tprivate onSearchInputListener: (evt: InputEvent) => void;\n\n\tconstructor(el: HTMLElement, options?: ISelectOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-select');\n\t\tconst dataOptions: ISelectOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.value =\n\t\t\tconcatOptions?.value || (this.el as HTMLSelectElement).value || null;\n\t\tthis.placeholder = concatOptions?.placeholder || 'Select...';\n\t\tthis.hasSearch = concatOptions?.hasSearch || false;\n\t\tthis.minSearchLength = concatOptions?.minSearchLength ?? 0;\n\t\tthis.preventSearchFocus = concatOptions?.preventSearchFocus || false;\n\t\tthis.mode = concatOptions?.mode || 'default';\n\t\tthis.viewport =\n\t\t\ttypeof concatOptions?.viewport !== 'undefined'\n\t\t\t\t? document.querySelector(concatOptions?.viewport)\n\t\t\t\t: null;\n\t\tthis.isOpened = Boolean(concatOptions?.isOpened) || false;\n\t\tthis.isMultiple = this.el.hasAttribute('multiple') || false;\n\t\tthis.isDisabled = this.el.hasAttribute('disabled') || false;\n\t\tthis.selectedItems = [];\n\n\t\tthis.apiUrl = concatOptions?.apiUrl || null;\n\t\tthis.apiQuery = concatOptions?.apiQuery || null;\n\t\tthis.apiOptions = concatOptions?.apiOptions || null;\n\t\tthis.apiSearchQueryKey = concatOptions?.apiSearchQueryKey || null;\n\t\tthis.apiDataPart = concatOptions?.apiDataPart || null;\n\t\tthis.apiFieldsMap = concatOptions?.apiFieldsMap || null;\n\t\tthis.apiIconTag = concatOptions?.apiIconTag || null;\n\n\t\tthis.wrapperClasses = concatOptions?.wrapperClasses || null;\n\t\tthis.toggleTag = concatOptions?.toggleTag || null;\n\t\tthis.toggleClasses = concatOptions?.toggleClasses || null;\n\t\tthis.toggleCountText =\n\t\t\ttypeof concatOptions?.toggleCountText === undefined\n\t\t\t\t? null\n\t\t\t\t: concatOptions.toggleCountText;\n\t\tthis.toggleCountTextPlacement =\n\t\t\tconcatOptions?.toggleCountTextPlacement || 'postfix';\n\t\tthis.toggleCountTextMinItems = concatOptions?.toggleCountTextMinItems || 1;\n\t\tthis.toggleCountTextMode =\n\t\t\tconcatOptions?.toggleCountTextMode || 'countAfterLimit';\n\t\tthis.toggleSeparators = {\n\t\t\titems: concatOptions?.toggleSeparators?.items || ', ',\n\t\t\tbetweenItemsAndCounter:\n\t\t\t\tconcatOptions?.toggleSeparators?.betweenItemsAndCounter || 'and',\n\t\t};\n\t\tthis.tagsItemTemplate = concatOptions?.tagsItemTemplate || null;\n\t\tthis.tagsItemClasses = concatOptions?.tagsItemClasses || null;\n\t\tthis.tagsInputId = concatOptions?.tagsInputId || null;\n\t\tthis.tagsInputClasses = concatOptions?.tagsInputClasses || null;\n\t\tthis.dropdownTag = concatOptions?.dropdownTag || null;\n\t\tthis.dropdownClasses = concatOptions?.dropdownClasses || null;\n\t\tthis.dropdownDirectionClasses =\n\t\t\tconcatOptions?.dropdownDirectionClasses || null;\n\t\tthis.dropdownSpace = concatOptions?.dropdownSpace || 10;\n\t\tthis.dropdownPlacement = concatOptions?.dropdownPlacement || null;\n\t\tthis.dropdownVerticalFixedPlacement = concatOptions?.dropdownVerticalFixedPlacement || null;\n\t\tthis.dropdownScope = concatOptions?.dropdownScope || 'parent';\n\t\tthis.searchTemplate = concatOptions?.searchTemplate || null;\n\t\tthis.searchWrapperTemplate = concatOptions?.searchWrapperTemplate || null;\n\t\tthis.searchWrapperClasses =\n\t\t\tconcatOptions?.searchWrapperClasses || 'bg-white p-2 sticky top-0';\n\t\tthis.searchId = concatOptions?.searchId || null;\n\t\tthis.searchLimit = concatOptions?.searchLimit || Infinity;\n\t\tthis.isSearchDirectMatch =\n\t\t\ttypeof concatOptions?.isSearchDirectMatch !== 'undefined'\n\t\t\t\t? concatOptions?.isSearchDirectMatch\n\t\t\t\t: true;\n\t\tthis.searchClasses =\n\t\t\tconcatOptions?.searchClasses ||\n\t\t\t'block w-[calc(100%-2rem)] text-sm border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 py-2 px-3 my-2 mx-4';\n\t\tthis.searchPlaceholder = concatOptions?.searchPlaceholder || 'Search...';\n\t\tthis.searchNoResultTemplate =\n\t\t\tconcatOptions?.searchNoResultTemplate || '';\n\t\tthis.searchNoResultText =\n\t\t\tconcatOptions?.searchNoResultText || 'No results found';\n\t\tthis.searchNoResultClasses =\n\t\t\tconcatOptions?.searchNoResultClasses ||\n\t\t\t'px-4 text-sm text-gray-800 dark:text-neutral-200';\n\t\tthis.optionAllowEmptyOption =\n\t\t\ttypeof concatOptions?.optionAllowEmptyOption !== 'undefined'\n\t\t\t\t? concatOptions?.optionAllowEmptyOption\n\t\t\t\t: false;\n\t\tthis.optionTemplate = concatOptions?.optionTemplate || null;\n\t\tthis.optionTag = concatOptions?.optionTag || null;\n\t\tthis.optionClasses = concatOptions?.optionClasses || null;\n\t\tthis.extraMarkup = concatOptions?.extraMarkup || null;\n\t\tthis.descriptionClasses = concatOptions?.descriptionClasses || null;\n\t\tthis.iconClasses = concatOptions?.iconClasses || null;\n\t\tthis.isAddTagOnEnter = concatOptions?.isAddTagOnEnter ?? true;\n\n\t\tthis.animationInProcess = false;\n\t\tthis.selectOptions = [];\n\t\tthis.remoteOptions = [];\n\n\t\tthis.tagsInputHelper = null;\n\n\t\tthis.init();\n\t}\n\n\tprivate wrapperClick(evt: Event) {\n\t\tif (\n\t\t\t!(evt.target as HTMLElement).closest('[data-hs-select-dropdown]') &&\n\t\t\t!(evt.target as HTMLElement).closest('[data-tag-value]')\n\t\t) {\n\t\t\tthis.tagsInput.focus();\n\t\t}\n\t}\n\n\tprivate toggleClick() {\n\t\tif (this.isDisabled) return false;\n\n\t\tthis.toggleFn();\n\t}\n\n\tprivate tagsInputFocus() {\n\t\tif (!this.isOpened) this.open();\n\t}\n\n\tprivate tagsInputInput() {\n\t\tthis.calculateInputWidth();\n\t}\n\n\tprivate tagsInputInputSecond(evt: InputEvent) {\n\t\tthis.searchOptions((evt.target as HTMLInputElement).value);\n\t}\n\n\tprivate tagsInputKeydown(evt: KeyboardEvent) {\n\t\tif (evt.key === 'Enter' && this.isAddTagOnEnter) {\n\t\t\tconst val = (evt.target as HTMLInputElement).value;\n\n\t\t\tif (this.selectOptions.find((el: ISingleOption) => el.val === val))\n\t\t\t\treturn false;\n\n\t\t\tthis.addSelectOption(val, val);\n\t\t\tthis.buildOption(val, val);\n\t\t\t(\n\t\t\t\tthis.dropdown.querySelector(`[data-value=\"${val}\"]`) as HTMLElement\n\t\t\t).click();\n\n\t\t\tthis.resetTagsInputField();\n\t\t\t// this.close();\n\t\t}\n\t}\n\n\tprivate searchInput(evt: InputEvent) {\n\t\tconst newVal = (evt.target as HTMLInputElement).value;\n\n\t\tif (this.apiUrl) this.remoteSearch(newVal);\n\t\telse this.searchOptions(newVal);\n\t}\n\n\tpublic setValue(val: string | string[]) {\n\t\tthis.value = val;\n\n\t\tthis.clearSelections();\n\n\t\tif (Array.isArray(val)) {\n\t\t\tif (this.mode === 'tags') {\n\t\t\t\tthis.unselectMultipleItems();\n\t\t\t\tthis.selectMultipleItems();\n\n\t\t\t\tthis.selectedItems = [];\n\n\t\t\t\tconst existingTags = this.wrapper.querySelectorAll('[data-tag-value]');\n\t\t\t\texistingTags.forEach((tag) => tag.remove());\n\n\t\t\t\tthis.setTagsItems();\n\t\t\t\tthis.reassignTagsInputPlaceholder(this.value.length ? '' : this.placeholder);\n\t\t\t} else {\n\t\t\t\tthis.toggleTextWrapper.innerHTML = this.value.length ? this.stringFromValue() : this.placeholder;\n\n\t\t\t\tthis.unselectMultipleItems();\n\t\t\t\tthis.selectMultipleItems();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.setToggleTitle();\n\n\t\t\tif (this.toggle.querySelector('[data-icon]')) this.setToggleIcon();\n\t\t\tif (this.toggle.querySelector('[data-title]')) this.setToggleTitle();\n\n\t\t\tthis.selectSingleItem();\n\t\t}\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsSelectCollection, this);\n\n\t\tthis.build();\n\t}\n\n\tprivate build() {\n\t\tthis.el.style.display = 'none';\n\n\t\tif (this.el.children) {\n\t\t\tArray.from(this.el.children)\n\t\t\t\t.filter((el: HTMLOptionElement) => this.optionAllowEmptyOption || (!this.optionAllowEmptyOption && el.value && el.value !== ''))\n\t\t\t\t.forEach((el: HTMLOptionElement) => {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-select-option');\n\n\t\t\t\t\tthis.selectOptions = [\n\t\t\t\t\t\t...this.selectOptions,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: el.textContent,\n\t\t\t\t\t\t\tval: el.value,\n\t\t\t\t\t\t\tdisabled: el.disabled,\n\t\t\t\t\t\t\toptions: data !== 'undefined' ? JSON.parse(data) : null,\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t});\n\t\t}\n\n\t\tif (this.isMultiple) {\n\t\t\tconst selectedOptions = Array.from(this.el.children).filter(\n\t\t\t\t(el: HTMLOptionElement) => el.selected,\n\t\t\t);\n\n\t\t\tif (selectedOptions) {\n\t\t\t\tconst values: string[] = [];\n\n\t\t\t\tselectedOptions.forEach((el: HTMLOptionElement) => {\n\t\t\t\t\tvalues.push(el.value);\n\t\t\t\t});\n\n\t\t\t\tthis.value = values;\n\t\t\t}\n\t\t}\n\n\t\tthis.buildWrapper();\n\t\tif (this.mode === 'tags') this.buildTags();\n\t\telse this.buildToggle();\n\t\tthis.buildDropdown();\n\t\tif (this.extraMarkup) this.buildExtraMarkup();\n\t}\n\n\tprivate buildWrapper() {\n\t\tthis.wrapper = document.createElement('div');\n\t\tthis.wrapper.classList.add('hs-select', 'relative');\n\n\t\tif (this.mode === 'tags') {\n\t\t\tthis.onWrapperClickListener = (evt) => this.wrapperClick(evt);\n\n\t\t\tthis.wrapper.addEventListener('click', this.onWrapperClickListener);\n\t\t}\n\n\t\tif (this.wrapperClasses)\n\t\t\tclassToClassList(this.wrapperClasses, this.wrapper);\n\n\t\tthis.el.before(this.wrapper);\n\n\t\tthis.wrapper.append(this.el);\n\t}\n\n\tprivate buildExtraMarkup() {\n\t\tconst appendMarkup = (markup: string): HTMLElement => {\n\t\t\tconst el = htmlToElement(markup);\n\n\t\t\tthis.wrapper.append(el);\n\n\t\t\treturn el;\n\t\t};\n\t\tconst clickHandle = (el: HTMLElement) => {\n\t\t\tif (!el.classList.contains('--prevent-click'))\n\t\t\t\tel.addEventListener('click', (evt: Event) => {\n\t\t\t\t\tevt.stopPropagation();\n\t\t\t\t\tthis.toggleFn();\n\t\t\t\t});\n\t\t};\n\n\t\tif (Array.isArray(this.extraMarkup)) {\n\t\t\tthis.extraMarkup.forEach((el) => {\n\t\t\t\tconst newEl = appendMarkup(el);\n\n\t\t\t\tclickHandle(newEl);\n\t\t\t});\n\t\t} else {\n\t\t\tconst newEl = appendMarkup(this.extraMarkup as string);\n\n\t\t\tclickHandle(newEl);\n\t\t}\n\t}\n\n\tprivate buildToggle() {\n\t\tlet icon, title;\n\t\tthis.toggleTextWrapper = document.createElement('span');\n\t\tthis.toggleTextWrapper.classList.add('truncate');\n\t\tthis.toggle = htmlToElement(this.toggleTag || '');\n\t\ticon = this.toggle.querySelector('[data-icon]');\n\t\ttitle = this.toggle.querySelector('[data-title]');\n\n\t\tif (!this.isMultiple && icon) this.setToggleIcon();\n\t\tif (!this.isMultiple && title) this.setToggleTitle();\n\t\tif (this.isMultiple) {\n\t\t\tthis.toggleTextWrapper.innerHTML = this.value.length\n\t\t\t\t? this.stringFromValue()\n\t\t\t\t: this.placeholder;\n\t\t} else {\n\t\t\tthis.toggleTextWrapper.innerHTML =\n\t\t\t\tthis.getItemByValue(this.value as string)?.title || this.placeholder;\n\t\t}\n\t\tif (!title) this.toggle.append(this.toggleTextWrapper);\n\t\tif (this.toggleClasses) classToClassList(this.toggleClasses, this.toggle);\n\t\tif (this.isDisabled) this.toggle.classList.add('disabled');\n\t\tif (this.wrapper) this.wrapper.append(this.toggle);\n\n\t\tif (this.toggle?.ariaExpanded) {\n\t\t\tif (this.isOpened) this.toggle.ariaExpanded = 'true';\n\t\t\telse this.toggle.ariaExpanded = 'false';\n\t\t}\n\n\t\tthis.onToggleClickListener = () => this.toggleClick();\n\n\t\tthis.toggle.addEventListener('click', this.onToggleClickListener);\n\t}\n\n\tprivate setToggleIcon() {\n\t\tconst item = this.getItemByValue(this.value as string) as ISingleOption &\n\t\t\tIApiFieldMap;\n\t\tconst icon = this.toggle.querySelector('[data-icon]');\n\n\t\tif (icon) {\n\t\t\ticon.innerHTML = '';\n\n\t\t\tconst img = htmlToElement(\n\t\t\t\tthis.apiUrl && this.apiIconTag\n\t\t\t\t\t? this.apiIconTag || ''\n\t\t\t\t\t: item?.options?.icon || '',\n\t\t\t) as HTMLImageElement;\n\t\t\tif (\n\t\t\t\tthis.value &&\n\t\t\t\tthis.apiUrl &&\n\t\t\t\tthis.apiIconTag &&\n\t\t\t\titem[this.apiFieldsMap.icon]\n\t\t\t)\n\t\t\t\timg.src = (item[this.apiFieldsMap.icon] as string) || '';\n\n\t\t\ticon.append(img);\n\n\t\t\tif (!img) icon.classList.add('hidden');\n\t\t\telse icon.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate setToggleTitle() {\n\t\tconst title = this.toggle.querySelector('[data-title]');\n\n\t\tif (title) {\n\t\t\ttitle.innerHTML = this.getItemByValue(this.value as string)?.title || this.placeholder;\n\t\t\ttitle.classList.add('truncate');\n\n\t\t\tthis.toggle.append(title);\n\t\t}\n\t}\n\n\tprivate buildTags() {\n\t\tif (this.isDisabled) this.wrapper.classList.add('disabled');\n\t\tthis.buildTagsInput();\n\t\tthis.setTagsItems();\n\t}\n\n\tprivate reassignTagsInputPlaceholder(placeholder: string) {\n\t\t(this.tagsInput as HTMLInputElement).placeholder = placeholder;\n\t\tthis.tagsInputHelper.innerHTML = placeholder;\n\t\tthis.calculateInputWidth();\n\t}\n\n\tprivate buildTagsItem(val: string) {\n\t\tconst item = this.getItemByValue(val) as ISingleOption & IApiFieldMap;\n\n\t\tlet template, title, remove, icon: null | HTMLElement;\n\n\t\tconst newItem = document.createElement('div');\n\t\tnewItem.setAttribute('data-tag-value', val);\n\t\tif (this.tagsItemClasses) classToClassList(this.tagsItemClasses, newItem);\n\n\t\tif (this.tagsItemTemplate) {\n\t\t\ttemplate = htmlToElement(this.tagsItemTemplate);\n\n\t\t\tnewItem.append(template);\n\t\t}\n\n\t\t// Icon\n\t\tif (item?.options?.icon || this.apiIconTag) {\n\t\t\tconst img = htmlToElement(\n\t\t\t\tthis.apiUrl && this.apiIconTag ? this.apiIconTag : item?.options?.icon,\n\t\t\t) as HTMLImageElement;\n\n\t\t\tif (this.apiUrl && this.apiIconTag && item[this.apiFieldsMap.icon])\n\t\t\t\timg.src = (item[this.apiFieldsMap.icon] as string) || '';\n\n\t\t\ticon = template\n\t\t\t\t? template.querySelector('[data-icon]')\n\t\t\t\t: document.createElement('span');\n\n\t\t\ticon.append(img);\n\n\t\t\tif (!template) newItem.append(icon);\n\t\t}\n\n\t\tif (\n\t\t\ttemplate &&\n\t\t\ttemplate.querySelector('[data-icon]') &&\n\t\t\t!item?.options?.icon &&\n\t\t\t!this.apiUrl &&\n\t\t\t!this.apiIconTag &&\n\t\t\t!item[this.apiFieldsMap?.icon]\n\t\t) {\n\t\t\ttemplate.querySelector('[data-icon]').classList.add('hidden');\n\t\t}\n\n\t\t// Title\n\t\ttitle = template\n\t\t\t? template.querySelector('[data-title]')\n\t\t\t: document.createElement('span');\n\t\ttitle.textContent = item.title || '';\n\n\t\tif (!template) newItem.append(title);\n\n\t\t// Remove\n\t\tif (template) {\n\t\t\tremove = template.querySelector('[data-remove]');\n\t\t} else {\n\t\t\tremove = document.createElement('span');\n\t\t\tremove.textContent = 'X';\n\n\t\t\tnewItem.append(remove);\n\t\t}\n\n\t\tremove.addEventListener('click', () => {\n\t\t\tthis.value = (this.value as string[]).filter((el) => el !== val);\n\t\t\tthis.selectedItems = this.selectedItems.filter((el) => el !== val);\n\n\t\t\tif (!this.value.length)\n\t\t\t\tthis.reassignTagsInputPlaceholder(this.placeholder);\n\n\t\t\tthis.unselectMultipleItems();\n\t\t\tthis.selectMultipleItems();\n\n\t\t\tnewItem.remove();\n\n\t\t\tthis.triggerChangeEventForNativeSelect();\n\t\t});\n\n\t\tthis.wrapper.append(newItem);\n\t}\n\n\tprivate getItemByValue(val: string) {\n\t\tconst value = this.apiUrl\n\t\t\t? (this.remoteOptions as (ISingleOption & IApiFieldMap)[]).find(\n\t\t\t\t(el) => `${el[this.apiFieldsMap.val]}` === val || el[this.apiFieldsMap.title] === val,\n\t\t\t)\n\t\t\t: this.selectOptions.find((el: ISingleOption) => el.val === val);\n\n\t\treturn value;\n\t}\n\n\tprivate setTagsItems() {\n\t\tif (this.value) {\n\t\t\t(this.value as string[]).forEach((val) => {\n\t\t\t\tif (!this.selectedItems.includes(val)) this.buildTagsItem(val);\n\n\t\t\t\tthis.selectedItems = !this.selectedItems.includes(val)\n\t\t\t\t\t? [...this.selectedItems, val]\n\t\t\t\t\t: this.selectedItems;\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate buildTagsInput() {\n\t\tthis.tagsInput = document.createElement('input');\n\n\t\tif (this.tagsInputId) this.tagsInput.id = this.tagsInputId;\n\t\tif (this.tagsInputClasses)\n\t\t\tclassToClassList(this.tagsInputClasses, this.tagsInput);\n\n\t\tthis.onTagsInputFocusListener = () => this.tagsInputFocus();\n\t\tthis.onTagsInputInputListener = () => this.tagsInputInput();\n\t\tthis.onTagsInputInputSecondListener = debounce((evt: InputEvent) =>\n\t\t\tthis.tagsInputInputSecond(evt),\n\t\t);\n\t\tthis.onTagsInputKeydownListener = (evt) => this.tagsInputKeydown(evt);\n\n\t\tthis.tagsInput.addEventListener('focus', this.onTagsInputFocusListener);\n\t\tthis.tagsInput.addEventListener('input', this.onTagsInputInputListener);\n\t\tthis.tagsInput.addEventListener(\n\t\t\t'input',\n\t\t\tthis.onTagsInputInputSecondListener,\n\t\t);\n\t\tthis.tagsInput.addEventListener('keydown', this.onTagsInputKeydownListener);\n\n\t\tthis.wrapper.append(this.tagsInput);\n\n\t\tsetTimeout(() => {\n\t\t\tthis.adjustInputWidth();\n\t\t\tthis.reassignTagsInputPlaceholder(\n\t\t\t\tthis.value.length ? '' : this.placeholder,\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate buildDropdown() {\n\t\tthis.dropdown = htmlToElement(this.dropdownTag || '');\n\t\tthis.dropdown.setAttribute('data-hs-select-dropdown', '');\n\n\t\tif (this.dropdownScope === 'parent') {\n\t\t\tthis.dropdown.classList.add('absolute');\n\t\t\tif (!this.dropdownVerticalFixedPlacement) this.dropdown.classList.add('top-full');\n\t\t}\n\t\tthis.dropdown.role = 'listbox';\n\t\tthis.dropdown.tabIndex = -1;\n\t\tthis.dropdown.ariaOrientation = 'vertical';\n\n\t\tif (!this.isOpened) this.dropdown.classList.add('hidden');\n\n\t\tif (this.dropdownClasses)\n\t\t\tclassToClassList(this.dropdownClasses, this.dropdown);\n\t\tif (this.wrapper) this.wrapper.append(this.dropdown);\n\t\tif (this.dropdown && this.hasSearch) this.buildSearch();\n\t\tif (this.selectOptions)\n\t\t\tthis.selectOptions.forEach((props: ISingleOption, i) =>\n\t\t\t\tthis.buildOption(\n\t\t\t\t\tprops.title,\n\t\t\t\t\tprops.val,\n\t\t\t\t\tprops.disabled,\n\t\t\t\t\tprops.selected,\n\t\t\t\t\tprops.options,\n\t\t\t\t\t`${i}`,\n\t\t\t\t),\n\t\t\t);\n\n\t\tif (this.apiUrl) this.optionsFromRemoteData();\n\n\t\tif (this.dropdownScope === 'window') this.buildPopper();\n\t}\n\n\tprivate buildPopper() {\n\t\tif (typeof Popper !== 'undefined' && Popper.createPopper) {\n\t\t\tdocument.body.appendChild(this.dropdown);\n\n\t\t\tthis.popperInstance = Popper.createPopper(\n\t\t\t\tthis.mode === 'tags' ? this.wrapper : this.toggle,\n\t\t\t\tthis.dropdown,\n\t\t\t\t{\n\t\t\t\t\tplacement: POSITIONS[this.dropdownPlacement] || 'bottom',\n\t\t\t\t\tstrategy: 'fixed',\n\t\t\t\t\tmodifiers: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'offset',\n\t\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\t\toffset: [0, 5],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate updateDropdownWidth() {\n\t\tconst toggle = this.mode === 'tags' ? this.wrapper : this.toggle;\n\n\t\tthis.dropdown.style.width = `${toggle.clientWidth}px`;\n\t}\n\n\tprivate buildSearch() {\n\t\tlet input;\n\t\tthis.searchWrapper = htmlToElement(\n\t\t\tthis.searchWrapperTemplate || '',\n\t\t);\n\t\tif (this.searchWrapperClasses)\n\t\t\tclassToClassList(this.searchWrapperClasses, this.searchWrapper);\n\t\tinput = this.searchWrapper.querySelector('[data-input]');\n\n\t\tconst search = htmlToElement(\n\t\t\tthis.searchTemplate || '',\n\t\t);\n\t\tthis.search = (\n\t\t\tsearch.tagName === 'INPUT' ? search : search.querySelector(':scope input')\n\t\t) as HTMLInputElement;\n\n\t\tthis.search.placeholder = this.searchPlaceholder;\n\t\tif (this.searchClasses) classToClassList(this.searchClasses, this.search);\n\t\tif (this.searchId) this.search.id = this.searchId;\n\n\t\tthis.onSearchInputListener = debounce((evt: InputEvent) => this.searchInput(evt));\n\n\t\tthis.search.addEventListener('input', this.onSearchInputListener);\n\n\t\tif (input) input.append(search);\n\t\telse this.searchWrapper.append(search);\n\n\t\tthis.dropdown.append(this.searchWrapper);\n\t}\n\n\tprivate buildOption(\n\t\ttitle: string,\n\t\tval: string,\n\t\tdisabled: boolean = false,\n\t\tselected: boolean = false,\n\t\toptions?: ISingleOptionOptions,\n\t\tindex: string = '1',\n\t\tid?: string,\n\t) {\n\t\tlet template: HTMLElement | null = null;\n\t\tlet titleWrapper: HTMLElement | null = null;\n\t\tlet iconWrapper: HTMLElement | null = null;\n\t\tlet descriptionWrapper: HTMLElement | null = null;\n\n\t\tconst option = htmlToElement(this.optionTag || '');\n\t\toption.setAttribute('data-value', val);\n\t\toption.setAttribute('data-title-value', title);\n\t\toption.setAttribute('tabIndex', index);\n\t\toption.classList.add('cursor-pointer');\n\t\toption.setAttribute('data-id', id || `${this.optionId}`);\n\t\tif (!id) this.optionId++;\n\t\tif (disabled) option.classList.add('disabled');\n\t\tif (selected) {\n\t\t\tif (this.isMultiple) this.value = [...(this.value as []), val];\n\t\t\telse this.value = val;\n\t\t}\n\t\tif (this.optionTemplate) {\n\t\t\ttemplate = htmlToElement(this.optionTemplate);\n\n\t\t\toption.append(template);\n\t\t}\n\t\tif (template) {\n\t\t\ttitleWrapper = template.querySelector('[data-title]');\n\t\t\ttitleWrapper.textContent = title || '';\n\t\t} else {\n\t\t\toption.textContent = title || '';\n\t\t}\n\t\tif (options) {\n\t\t\tif (options.icon) {\n\t\t\t\tconst img = htmlToElement(this.apiIconTag ?? options.icon);\n\t\t\t\timg.classList.add('max-w-full');\n\n\t\t\t\tif (this.apiUrl) {\n\t\t\t\t\timg.setAttribute('alt', title);\n\t\t\t\t\timg.setAttribute('src', options.icon);\n\t\t\t\t}\n\n\t\t\t\tif (template) {\n\t\t\t\t\ticonWrapper = template.querySelector('[data-icon]');\n\t\t\t\t\ticonWrapper.append(img);\n\t\t\t\t} else {\n\t\t\t\t\tconst icon = htmlToElement('');\n\t\t\t\t\tif (this.iconClasses) classToClassList(this.iconClasses, icon);\n\n\t\t\t\t\ticon.append(img);\n\t\t\t\t\toption.append(icon);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (options.description) {\n\t\t\t\tif (template) {\n\t\t\t\t\tdescriptionWrapper = template.querySelector('[data-description]');\n\t\t\t\t\tif (descriptionWrapper)\n\t\t\t\t\t\tdescriptionWrapper.append(options.description);\n\t\t\t\t} else {\n\t\t\t\t\tconst description = htmlToElement('');\n\t\t\t\t\tdescription.textContent = options.description;\n\t\t\t\t\tif (this.descriptionClasses)\n\t\t\t\t\t\tclassToClassList(this.descriptionClasses, description);\n\n\t\t\t\t\toption.append(description);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\ttemplate &&\n\t\t\ttemplate.querySelector('[data-icon]') &&\n\t\t\t!options &&\n\t\t\t!options?.icon\n\t\t) {\n\t\t\ttemplate.querySelector('[data-icon]').classList.add('hidden');\n\t\t}\n\n\t\tif (\n\t\t\tthis.value &&\n\t\t\t(this.isMultiple ? this.value.includes(val) : this.value === val)\n\t\t)\n\t\t\toption.classList.add('selected');\n\n\t\tif (!disabled)\n\t\t\toption.addEventListener('click', () => this.onSelectOption(val));\n\n\t\tif (this.optionClasses) classToClassList(this.optionClasses, option);\n\t\tif (this.dropdown) this.dropdown.append(option);\n\t\tif (selected) this.setNewValue();\n\t}\n\n\tprivate buildOptionFromRemoteData(\n\t\ttitle: string,\n\t\tval: string,\n\t\tdisabled: boolean = false,\n\t\tselected: boolean = false,\n\t\tindex: string = '1',\n\t\tid: string | null,\n\t\toptions?: ISingleOptionOptions,\n\t) {\n\t\tif (index) {\n\t\t\tthis.buildOption(title, val, disabled, selected, options, index, id);\n\t\t} else {\n\t\t\talert(\n\t\t\t\t'ID parameter is required for generating remote options! Please check your API endpoint have it.',\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate buildOptionsFromRemoteData(data: []) {\n\t\tdata.forEach((el: IApiFieldMap, i) => {\n\t\t\tlet id = null;\n\t\t\tlet title = '';\n\t\t\tlet value = '';\n\t\t\tconst options: IApiFieldMap & { rest: { [key: string]: unknown } } = {\n\t\t\t\tid: '',\n\t\t\t\tval: '',\n\t\t\t\ttitle: '',\n\t\t\t\ticon: null,\n\t\t\t\tdescription: null,\n\t\t\t\trest: {},\n\t\t\t};\n\n\t\t\tObject.keys(el).forEach((key: string) => {\n\t\t\t\tif (el[this.apiFieldsMap.id]) id = el[this.apiFieldsMap.id];\n\t\t\t\tif (el[this.apiFieldsMap.val] || el[this.apiFieldsMap.title]) {\n\t\t\t\t\tvalue = el[this.apiFieldsMap.val] as string || el[this.apiFieldsMap.title] as string;\n\t\t\t\t}\n\t\t\t\tif (el[this.apiFieldsMap.title])\n\t\t\t\t\ttitle = el[this.apiFieldsMap.title] as string;\n\t\t\t\tif (el[this.apiFieldsMap.icon])\n\t\t\t\t\toptions.icon = el[this.apiFieldsMap.icon] as string;\n\t\t\t\tif (el[this.apiFieldsMap?.description])\n\t\t\t\t\toptions.description = el[this.apiFieldsMap.description] as string;\n\t\t\t\toptions.rest[key] = el[key];\n\t\t\t});\n\n\t\t\tthis.buildOriginalOption(\n\t\t\t\ttitle,\n\t\t\t\t`${value}`,\n\t\t\t\tid,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\toptions as ISingleOptionOptions & IApiFieldMap,\n\t\t\t);\n\n\t\t\tthis.buildOptionFromRemoteData(\n\t\t\t\ttitle,\n\t\t\t\t`${value}`,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\t`${i}`,\n\t\t\t\tid,\n\t\t\t\toptions as ISingleOptionOptions & IApiFieldMap,\n\t\t\t);\n\t\t});\n\n\t\tthis.sortElements(this.el, 'option');\n\t\tthis.sortElements(this.dropdown, '[data-value]');\n\t}\n\n\tprivate async optionsFromRemoteData(val = '') {\n\t\tconst res = await this.apiRequest(val);\n\t\tthis.remoteOptions = res;\n\n\t\tif (res.length) this.buildOptionsFromRemoteData(this.remoteOptions as []);\n\t\telse console.log('There is no data were responded!');\n\t}\n\n\tprivate async apiRequest(val = '') {\n\t\ttry {\n\t\t\tlet url = this.apiUrl;\n\t\t\tconst search = this.apiSearchQueryKey\n\t\t\t\t? `${this.apiSearchQueryKey}=${val.toLowerCase()}`\n\t\t\t\t: null;\n\t\t\tconst query = `${this.apiQuery}`;\n\t\t\tconst options = this.apiOptions || {};\n\n\t\t\tif (search) url += `?${search}`;\n\t\t\tif (this.apiQuery) url += `${search ? '&' : '?'}${query}`;\n\n\t\t\tconst req = await fetch(url, options);\n\t\t\tconst res = await req.json();\n\n\t\t\treturn this.apiDataPart ? res[this.apiDataPart] : res;\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t}\n\t}\n\n\tprivate sortElements(container: HTMLElement, selector: string): void {\n\t\tconst items = Array.from(container.querySelectorAll(selector));\n\n\t\titems.sort((a, b) => {\n\t\t\tconst isASelected =\n\t\t\t\ta.classList.contains('selected') || a.hasAttribute('selected');\n\t\t\tconst isBSelected =\n\t\t\t\tb.classList.contains('selected') || b.hasAttribute('selected');\n\n\t\t\tif (isASelected && !isBSelected) return -1;\n\t\t\tif (!isASelected && isBSelected) return 1;\n\n\t\t\treturn 0;\n\t\t});\n\n\t\titems.forEach((item) => container.appendChild(item));\n\t}\n\n\tprivate async remoteSearch(val: string) {\n\t\tif (val.length <= this.minSearchLength) {\n\t\t\tconst res = await this.apiRequest('');\n\t\t\tthis.remoteOptions = res;\n\n\t\t\tArray.from(this.dropdown.querySelectorAll('[data-value]')).forEach(el => el.remove());\n\t\t\tArray.from(this.el.querySelectorAll('option[value]')).forEach((el: HTMLOptionElement) => {\n\t\t\t\tel.remove();\n\t\t\t});\n\n\t\t\tif (res.length) this.buildOptionsFromRemoteData(res);\n\t\t\telse console.log('No data responded!');\n\n\t\t\treturn false;\n\t\t}\n\n\t\tconst res = await this.apiRequest(val);\n\t\tthis.remoteOptions = res;\n\t\tlet newIds = res.map((item: { id: string }) => `${item.id}`);\n\t\tlet restOptions = null;\n\t\tconst pseudoOptions = this.dropdown.querySelectorAll('[data-value]');\n\t\tconst options = this.el.querySelectorAll('[data-hs-select-option]');\n\n\t\toptions.forEach((el: HTMLOptionElement) => {\n\t\t\tconst dataId = el.getAttribute('data-id');\n\t\t\tif (!newIds.includes(dataId) && !this.value?.includes(el.value))\n\t\t\t\tthis.destroyOriginalOption(el.value);\n\t\t});\n\n\t\tpseudoOptions.forEach((el: HTMLElement) => {\n\t\t\tconst dataId = el.getAttribute('data-id');\n\t\t\tif (!newIds.includes(dataId) && !this.value?.includes(el.getAttribute('data-value')))\n\t\t\t\tthis.destroyOption(el.getAttribute('data-value'));\n\t\t\telse newIds = newIds.filter((item: string) => item !== dataId);\n\t\t});\n\n\t\trestOptions = res.filter((item: { id: string }) =>\n\t\t\tnewIds.includes(`${item.id}`),\n\t\t);\n\n\t\tif (restOptions.length) this.buildOptionsFromRemoteData(restOptions as []);\n\t\telse console.log('No data responded!');\n\t}\n\n\tprivate destroyOption(val: string) {\n\t\tconst option = this.dropdown.querySelector(`[data-value=\"${val}\"]`);\n\n\t\tif (!option) return false;\n\n\t\toption.remove();\n\t}\n\n\tprivate buildOriginalOption(\n\t\ttitle: string,\n\t\tval: string,\n\t\tid?: string | null,\n\t\tdisabled?: boolean,\n\t\tselected?: boolean,\n\t\toptions?: ISingleOptionOptions,\n\t) {\n\t\tconst option = htmlToElement('');\n\t\toption.setAttribute('value', val);\n\t\tif (disabled) option.setAttribute('disabled', 'disabled');\n\t\tif (selected) option.setAttribute('selected', 'selected');\n\t\tif (id) option.setAttribute('data-id', id);\n\t\toption.setAttribute('data-hs-select-option', JSON.stringify(options));\n\t\toption.innerText = title;\n\n\t\tthis.el.append(option);\n\t}\n\n\tprivate destroyOriginalOption(val: string) {\n\t\tconst option = this.el.querySelector(`[value=\"${val}\"]`);\n\n\t\tif (!option) return false;\n\n\t\toption.remove();\n\t}\n\n\tprivate buildTagsInputHelper() {\n\t\tthis.tagsInputHelper = document.createElement('span');\n\t\tthis.tagsInputHelper.style.fontSize = window.getComputedStyle(\n\t\t\tthis.tagsInput,\n\t\t).fontSize;\n\t\tthis.tagsInputHelper.style.fontFamily = window.getComputedStyle(\n\t\t\tthis.tagsInput,\n\t\t).fontFamily;\n\t\tthis.tagsInputHelper.style.fontWeight = window.getComputedStyle(\n\t\t\tthis.tagsInput,\n\t\t).fontWeight;\n\t\tthis.tagsInputHelper.style.letterSpacing = window.getComputedStyle(\n\t\t\tthis.tagsInput,\n\t\t).letterSpacing;\n\t\tthis.tagsInputHelper.style.visibility = 'hidden';\n\t\tthis.tagsInputHelper.style.whiteSpace = 'pre';\n\t\tthis.tagsInputHelper.style.position = 'absolute';\n\n\t\tthis.wrapper.appendChild(this.tagsInputHelper);\n\t}\n\n\tprivate calculateInputWidth() {\n\t\tthis.tagsInputHelper.textContent =\n\t\t\t(this.tagsInput as HTMLInputElement).value ||\n\t\t\t(this.tagsInput as HTMLInputElement).placeholder;\n\n\t\tconst inputPadding =\n\t\t\tparseInt(window.getComputedStyle(this.tagsInput).paddingLeft) +\n\t\t\tparseInt(window.getComputedStyle(this.tagsInput).paddingRight);\n\t\tconst inputBorder =\n\t\t\tparseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth) +\n\t\t\tparseInt(window.getComputedStyle(this.tagsInput).borderRightWidth);\n\t\tconst newWidth =\n\t\t\tthis.tagsInputHelper.offsetWidth + inputPadding + inputBorder;\n\t\tconst maxWidth =\n\t\t\tthis.wrapper.offsetWidth -\n\t\t\t(parseInt(window.getComputedStyle(this.wrapper).paddingLeft) +\n\t\t\t\tparseInt(window.getComputedStyle(this.wrapper).paddingRight));\n\n\t\t(this.tagsInput as HTMLInputElement).style.width = `${Math.min(newWidth, maxWidth) + 2\n\t\t\t}px`;\n\t}\n\n\tprivate adjustInputWidth() {\n\t\tthis.buildTagsInputHelper();\n\t\tthis.calculateInputWidth();\n\t}\n\n\tprivate onSelectOption(val: string) {\n\t\tthis.clearSelections();\n\n\t\tif (this.isMultiple) {\n\t\t\tthis.value = this.value.includes(val)\n\t\t\t\t? Array.from(this.value).filter((el) => el !== val)\n\t\t\t\t: [...Array.from(this.value), val];\n\n\t\t\tthis.selectMultipleItems();\n\t\t\tthis.setNewValue();\n\t\t} else {\n\t\t\tthis.value = val;\n\n\t\t\tthis.selectSingleItem();\n\t\t\tthis.setNewValue();\n\t\t}\n\n\t\tthis.fireEvent('change', this.value);\n\t\t// TODO:: test with this line commented out\n\t\t// dispatch('change.hs.select', this.el, this.value);\n\n\t\tif (this.mode === 'tags') {\n\t\t\tconst intersection = this.selectedItems.filter(\n\t\t\t\t(x) => !(this.value as string[]).includes(x),\n\t\t\t);\n\t\t\tif (intersection.length) {\n\t\t\t\tintersection.forEach((el) => {\n\t\t\t\t\tthis.selectedItems = this.selectedItems.filter((elI) => elI !== el);\n\t\t\t\t\tthis.wrapper.querySelector(`[data-tag-value=\"${el}\"]`).remove();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.resetTagsInputField();\n\t\t}\n\n\t\tif (!this.isMultiple) {\n\t\t\tif (this.toggle.querySelector('[data-icon]')) this.setToggleIcon();\n\t\t\tif (this.toggle.querySelector('[data-title]')) this.setToggleTitle();\n\t\t\tthis.close(true);\n\t\t}\n\n\t\tif (!this.value.length && this.mode === 'tags')\n\t\t\tthis.reassignTagsInputPlaceholder(this.placeholder);\n\n\t\tif (this.isOpened && this.mode === 'tags' && this.tagsInput)\n\t\t\tthis.tagsInput.focus();\n\n\t\tthis.triggerChangeEventForNativeSelect();\n\t}\n\n\tprivate triggerChangeEventForNativeSelect() {\n\t\tconst selectChangeEvent = new Event('change', { bubbles: true });\n\t\t(this.el as HTMLSelectElement).dispatchEvent(selectChangeEvent);\n\n\t\t// TODO:: test with these lines added\n\t\tdispatch('change.hs.select', this.el, this.value);\n\t}\n\n\tprivate addSelectOption(\n\t\ttitle: string,\n\t\tval: string,\n\t\tdisabled?: boolean,\n\t\tselected?: boolean,\n\t\toptions?: ISingleOptionOptions,\n\t) {\n\t\tthis.selectOptions = [\n\t\t\t...this.selectOptions,\n\t\t\t{\n\t\t\t\ttitle,\n\t\t\t\tval,\n\t\t\t\tdisabled,\n\t\t\t\tselected,\n\t\t\t\toptions,\n\t\t\t},\n\t\t];\n\t}\n\n\tprivate removeSelectOption(val: string, isArray = false) {\n\t\tconst hasOption = !!this.selectOptions.some(\n\t\t\t(el: ISingleOption) => el.val === val,\n\t\t);\n\n\t\tif (!hasOption) return false;\n\n\t\tthis.selectOptions = this.selectOptions.filter(\n\t\t\t(el: ISingleOption) => el.val !== val,\n\t\t);\n\n\t\tthis.value = isArray\n\t\t\t? (this.value as string[]).filter((item: string) => item !== val)\n\t\t\t: val;\n\t}\n\n\tprivate resetTagsInputField() {\n\t\t(this.tagsInput as HTMLInputElement).value = '';\n\n\t\tthis.reassignTagsInputPlaceholder('');\n\t\tthis.searchOptions('');\n\t}\n\n\tprivate clearSelections() {\n\t\tArray.from(this.dropdown.children).forEach((el) => {\n\t\t\tif (el.classList.contains('selected')) el.classList.remove('selected');\n\t\t});\n\t\tArray.from(this.el.children).forEach((el) => {\n\t\t\tif ((el as HTMLOptionElement).selected)\n\t\t\t\t(el as HTMLOptionElement).selected = false;\n\t\t});\n\t}\n\n\tprivate setNewValue() {\n\t\tif (this.mode === 'tags') {\n\t\t\tthis.setTagsItems();\n\t\t} else {\n\t\t\tif (this.value?.length) {\n\t\t\t\tthis.toggleTextWrapper.innerHTML = this.stringFromValue();\n\t\t\t} else {\n\t\t\t\tthis.toggleTextWrapper.innerHTML = this.placeholder;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate stringFromValueBasic(options: ISingleOption[]) {\n\t\tconst value: string[] = [];\n\t\tlet title = '';\n\n\t\toptions.forEach((el: ISingleOption) => {\n\t\t\tif (this.isMultiple) {\n\t\t\t\tif (this.value.includes(el.val)) value.push(el.title);\n\t\t\t} else {\n\t\t\t\tif (this.value === el.val) value.push(el.title);\n\t\t\t}\n\t\t});\n\n\t\tif (\n\t\t\tthis.toggleCountText !== undefined &&\n\t\t\tthis.toggleCountText !== null &&\n\t\t\tvalue.length >= this.toggleCountTextMinItems\n\t\t) {\n\t\t\tif (this.toggleCountTextMode === 'nItemsAndCount') {\n\t\t\t\tconst nItems = value.slice(0, this.toggleCountTextMinItems - 1);\n\t\t\t\tconst tempTitle = [nItems.join(this.toggleSeparators.items)];\n\t\t\t\tconst count = `${value.length - nItems.length}`;\n\n\t\t\t\tif (this?.toggleSeparators?.betweenItemsAndCounter)\n\t\t\t\t\ttempTitle.push(this.toggleSeparators.betweenItemsAndCounter);\n\t\t\t\tif (this.toggleCountText) {\n\t\t\t\t\tswitch (this.toggleCountTextPlacement) {\n\t\t\t\t\t\tcase 'postfix-no-space':\n\t\t\t\t\t\t\ttempTitle.push(`${count}${this.toggleCountText}`);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'prefix-no-space':\n\t\t\t\t\t\t\ttempTitle.push(`${this.toggleCountText}${count}`);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'prefix':\n\t\t\t\t\t\t\ttempTitle.push(`${this.toggleCountText} ${count}`);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\ttempTitle.push(`${count} ${this.toggleCountText}`);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttitle = tempTitle.join(' ');\n\t\t\t} else {\n\t\t\t\ttitle = `${value.length} ${this.toggleCountText}`;\n\t\t\t}\n\t\t} else {\n\t\t\ttitle = value.join(this.toggleSeparators.items);\n\t\t}\n\n\t\treturn title;\n\t}\n\n\tprivate stringFromValueRemoteData() {\n\t\tconst options = this.dropdown.querySelectorAll('[data-title-value]');\n\t\tconst value: string[] = [];\n\t\tlet title = '';\n\n\t\toptions.forEach((el: HTMLElement) => {\n\t\t\tconst dataValue = el.getAttribute('data-value');\n\t\t\tconst dataTitleValue = el.getAttribute('data-title-value');\n\n\t\t\tif (this.isMultiple) {\n\t\t\t\tif (this.value.includes(dataValue)) value.push(dataTitleValue);\n\t\t\t} else {\n\t\t\t\tif (this.value === dataValue) value.push(dataTitleValue);\n\t\t\t}\n\t\t});\n\n\t\tif (\n\t\t\tthis.toggleCountText &&\n\t\t\tthis.toggleCountText !== '' &&\n\t\t\tvalue.length >= this.toggleCountTextMinItems\n\t\t) {\n\t\t\tif (this.toggleCountTextMode === 'nItemsAndCount') {\n\t\t\t\tconst nItems = value.slice(0, this.toggleCountTextMinItems - 1);\n\n\t\t\t\ttitle = `${nItems.join(this.toggleSeparators.items)} ${this.toggleSeparators.betweenItemsAndCounter} ${value.length - nItems.length} ${this.toggleCountText}`;\n\t\t\t} else {\n\t\t\t\ttitle = `${value.length} ${this.toggleCountText}`;\n\t\t\t}\n\t\t} else {\n\t\t\ttitle = value.join(this.toggleSeparators.items);\n\t\t}\n\n\t\treturn title;\n\t}\n\n\tprivate stringFromValue() {\n\t\tconst result = this.apiUrl\n\t\t\t? this.stringFromValueRemoteData()\n\t\t\t: this.stringFromValueBasic(this.selectOptions);\n\n\t\treturn result;\n\t}\n\n\tprivate selectSingleItem() {\n\t\tconst selectedOption = Array.from(this.el.children).find(\n\t\t\t(el) => this.value === (el as HTMLOptionElement).value,\n\t\t);\n\t\t(selectedOption as HTMLOptionElement).selected = true;\n\n\t\tconst selectedItem = Array.from(this.dropdown.children).find(\n\t\t\t(el) =>\n\t\t\t\tthis.value === (el as HTMLOptionElement).getAttribute('data-value'),\n\t\t);\n\n\t\tif (selectedItem) selectedItem.classList.add('selected');\n\t}\n\n\tprivate selectMultipleItems() {\n\t\tArray.from(this.dropdown.children)\n\t\t\t.filter((el) => this.value.includes(el.getAttribute('data-value')))\n\t\t\t.forEach((el) => el.classList.add('selected'));\n\n\t\tArray.from(this.el.children)\n\t\t\t.filter((el) => this.value.includes((el as HTMLOptionElement).value))\n\t\t\t.forEach((el) => ((el as HTMLOptionElement).selected = true));\n\t}\n\n\tprivate unselectMultipleItems() {\n\t\tArray.from(this.dropdown.children).forEach((el) =>\n\t\t\tel.classList.remove('selected'),\n\t\t);\n\t\tArray.from(this.el.children).forEach(\n\t\t\t(el) => ((el as HTMLOptionElement).selected = false),\n\t\t);\n\t}\n\n\tprivate searchOptions(val: string) {\n\t\tif (val.length <= this.minSearchLength) {\n\t\t\tif (this.searchNoResult) {\n\t\t\t\tthis.searchNoResult.remove();\n\t\t\t\tthis.searchNoResult = null;\n\t\t\t}\n\n\t\t\tconst options = this.dropdown.querySelectorAll('[data-value]');\n\n\t\t\toptions.forEach((el) => {\n\t\t\t\tel.classList.remove('hidden');\n\t\t\t});\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.searchNoResult) {\n\t\t\tthis.searchNoResult.remove();\n\t\t\tthis.searchNoResult = null;\n\t\t}\n\n\t\tthis.searchNoResult = htmlToElement(this.searchNoResultTemplate);\n\t\tthis.searchNoResult.innerText = this.searchNoResultText;\n\t\tclassToClassList(this.searchNoResultClasses, this.searchNoResult);\n\n\t\tconst options = this.dropdown.querySelectorAll('[data-value]');\n\t\tlet hasItems = false;\n\t\tlet countLimit: number;\n\n\t\tif (this.searchLimit) countLimit = 0;\n\n\t\toptions.forEach((el) => {\n\t\t\tconst optionVal = el.getAttribute('data-title-value').toLocaleLowerCase();\n\t\t\tconst directMatch = this.isSearchDirectMatch;\n\t\t\tlet condition;\n\n\t\t\tif (directMatch) {\n\t\t\t\tcondition = !optionVal.includes(val.toLowerCase()) || (this.searchLimit && countLimit >= this.searchLimit);\n\t\t\t} else {\n\t\t\t\tconst regexSafeVal = val ? val.split('').map((char) => (/\\w/.test(char) ? `${char}[\\\\W_]*` : '\\\\W*')).join('') : '';\n\t\t\t\tconst regex = new RegExp(regexSafeVal, 'i');\n\t\t\t\tcondition = !regex.test(optionVal.trim()) || (this.searchLimit && countLimit >= this.searchLimit);\n\t\t\t}\n\n\t\t\tif (condition) {\n\t\t\t\tel.classList.add('hidden');\n\t\t\t} else {\n\t\t\t\tel.classList.remove('hidden');\n\n\t\t\t\thasItems = true;\n\n\t\t\t\tif (this.searchLimit) countLimit++;\n\t\t\t}\n\t\t});\n\n\t\tif (!hasItems) this.dropdown.append(this.searchNoResult);\n\t}\n\n\tprivate eraseToggleIcon() {\n\t\tconst icon = this.toggle.querySelector('[data-icon]');\n\n\t\tif (icon) {\n\t\t\ticon.innerHTML = null;\n\t\t\ticon.classList.add('hidden');\n\t\t}\n\t}\n\n\tprivate eraseToggleTitle() {\n\t\tconst title = this.toggle.querySelector('[data-title]');\n\n\t\tif (title) {\n\t\t\ttitle.innerHTML = this.placeholder;\n\t\t} else {\n\t\t\tthis.toggleTextWrapper.innerHTML = this.placeholder;\n\t\t}\n\t}\n\n\tprivate toggleFn() {\n\t\tif (this.isOpened) this.close();\n\t\telse this.open();\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\t// Remove listeners\n\t\tif (this.wrapper)\n\t\t\tthis.wrapper.removeEventListener('click', this.onWrapperClickListener);\n\t\tif (this.toggle)\n\t\t\tthis.toggle.removeEventListener('click', this.onToggleClickListener);\n\t\tif (this.tagsInput) {\n\t\t\tthis.tagsInput.removeEventListener(\n\t\t\t\t'focus',\n\t\t\t\tthis.onTagsInputFocusListener,\n\t\t\t);\n\t\t\tthis.tagsInput.removeEventListener(\n\t\t\t\t'input',\n\t\t\t\tthis.onTagsInputInputListener,\n\t\t\t);\n\t\t\tthis.tagsInput.removeEventListener(\n\t\t\t\t'input',\n\t\t\t\tthis.onTagsInputInputSecondListener,\n\t\t\t);\n\t\t\tthis.tagsInput.removeEventListener(\n\t\t\t\t'keydown',\n\t\t\t\tthis.onTagsInputKeydownListener,\n\t\t\t);\n\t\t}\n\n\t\tif (this.search)\n\t\t\tthis.search.removeEventListener('input', this.onSearchInputListener);\n\n\t\tconst parent = this.el.parentElement.parentElement;\n\n\t\tthis.el.classList.remove('hidden');\n\t\tthis.el.style.display = '';\n\t\tparent.prepend(this.el);\n\t\tparent.querySelector('.hs-select').remove();\n\t\tthis.wrapper = null;\n\t}\n\n\tpublic open() {\n\t\tconst currentlyOpened =\n\t\t\twindow?.$hsSelectCollection?.find((el) => el.element.isOpened) || null;\n\n\t\tif (currentlyOpened) currentlyOpened.element.close();\n\t\tif (this.animationInProcess) return false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tif (this.dropdownScope === 'window')\n\t\t\tthis.dropdown.classList.add('invisible');\n\t\tthis.dropdown.classList.remove('hidden');\n\n\t\tthis.recalculateDirection();\n\n\t\tsetTimeout(() => {\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\t\t\tthis.wrapper.classList.add('active');\n\t\t\tthis.dropdown.classList.add('opened');\n\t\t\tif (\n\t\t\t\tthis.dropdown.classList.contains('w-full') &&\n\t\t\t\tthis.dropdownScope === 'window'\n\t\t\t)\n\t\t\t\tthis.updateDropdownWidth();\n\t\t\tif (this.popperInstance && this.dropdownScope === 'window') {\n\t\t\t\tthis.popperInstance.update();\n\t\t\t\tthis.dropdown.classList.remove('invisible');\n\t\t\t}\n\t\t\tif (this.hasSearch && !this.preventSearchFocus) this.search.focus();\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tthis.isOpened = true;\n\t}\n\n\tpublic close(forceFocus = false) {\n\t\tif (this.animationInProcess) return false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\t\tthis.wrapper.classList.remove('active');\n\t\tthis.dropdown.classList.remove('opened', 'bottom-full', 'top-full');\n\t\tif (this.dropdownDirectionClasses?.bottom)\n\t\t\tthis.dropdown.classList.remove(this.dropdownDirectionClasses.bottom);\n\t\tif (this.dropdownDirectionClasses?.top)\n\t\t\tthis.dropdown.classList.remove(this.dropdownDirectionClasses.top);\n\t\tthis.dropdown.style.marginTop = '';\n\t\tthis.dropdown.style.marginBottom = '';\n\n\t\tafterTransition(this.dropdown, () => {\n\t\t\tthis.dropdown.classList.add('hidden');\n\t\t\tif (this.hasSearch) {\n\t\t\t\tthis.search.value = '';\n\t\t\t\tthis.search.dispatchEvent(new Event('input', { bubbles: true }));\n\t\t\t\tthis.search.blur();\n\t\t\t}\n\n\t\t\tif (forceFocus) this.toggle.focus();\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tthis.dropdown\n\t\t\t.querySelector('.hs-select-option-highlighted')\n\t\t\t?.classList.remove('hs-select-option-highlighted');\n\t\tthis.isOpened = false;\n\t}\n\n\tpublic addOption(items: ISingleOption | ISingleOption[]) {\n\t\tlet i = `${this.selectOptions.length}`;\n\t\tconst addOption = (option: ISingleOption) => {\n\t\t\tconst { title, val, disabled, selected, options } = option;\n\t\t\tconst hasOption = !!this.selectOptions.some(\n\t\t\t\t(el: ISingleOption) => el.val === val,\n\t\t\t);\n\n\t\t\tif (!hasOption) {\n\t\t\t\tthis.addSelectOption(title, val, disabled, selected, options);\n\t\t\t\tthis.buildOption(title, val, disabled, selected, options, i);\n\t\t\t\tthis.buildOriginalOption(title, val, null, disabled, selected, options);\n\n\t\t\t\tif (selected && !this.isMultiple) this.onSelectOption(val);\n\t\t\t}\n\t\t};\n\n\t\tif (Array.isArray(items)) {\n\t\t\titems.forEach((option) => {\n\t\t\t\taddOption(option);\n\t\t\t});\n\t\t} else {\n\t\t\taddOption(items);\n\t\t}\n\t}\n\n\tpublic removeOption(values: string | string[]) {\n\t\tconst removeOption = (val: string, isArray = false) => {\n\t\t\tconst hasOption = !!this.selectOptions.some(\n\t\t\t\t(el: ISingleOption) => el.val === val,\n\t\t\t);\n\n\t\t\tif (hasOption) {\n\t\t\t\tthis.removeSelectOption(val, isArray);\n\t\t\t\tthis.destroyOption(val);\n\t\t\t\tthis.destroyOriginalOption(val);\n\n\t\t\t\tif (this.value === val) {\n\t\t\t\t\tthis.value = null;\n\n\t\t\t\t\tthis.eraseToggleTitle();\n\t\t\t\t\tthis.eraseToggleIcon();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (Array.isArray(values)) {\n\t\t\tvalues.forEach((val) => {\n\t\t\t\tremoveOption(val, this.isMultiple);\n\t\t\t});\n\t\t} else {\n\t\t\tremoveOption(values, this.isMultiple);\n\t\t}\n\n\t\tthis.setNewValue();\n\t}\n\n\tpublic recalculateDirection() {\n\t\tif (this?.dropdownVerticalFixedPlacement && (this.dropdown.classList.contains('bottom-full') || this.dropdown.classList.contains('top-full'))) return false;\n\n\t\tif (this?.dropdownVerticalFixedPlacement === 'top') {\n\t\t\tthis.dropdown.classList.add('bottom-full');\n\t\t\tthis.dropdown.style.marginBottom = `${this.dropdownSpace}px`;\n\t\t} else if (this?.dropdownVerticalFixedPlacement === 'bottom') {\n\t\t\tthis.dropdown.classList.add('top-full');\n\t\t\tthis.dropdown.style.marginTop = `${this.dropdownSpace}px`;\n\t\t} else if (\n\t\t\tisEnoughSpace(\n\t\t\t\tthis.dropdown,\n\t\t\t\tthis.toggle || this.tagsInput,\n\t\t\t\t'bottom',\n\t\t\t\tthis.dropdownSpace,\n\t\t\t\tthis.viewport,\n\t\t\t)\n\t\t) {\n\t\t\tthis.dropdown.classList.remove('bottom-full');\n\t\t\tif (this.dropdownDirectionClasses?.bottom)\n\t\t\t\tthis.dropdown.classList.remove(this.dropdownDirectionClasses.bottom);\n\t\t\tthis.dropdown.style.marginBottom = '';\n\t\t\tthis.dropdown.classList.add('top-full');\n\t\t\tif (this.dropdownDirectionClasses?.top)\n\t\t\t\tthis.dropdown.classList.add(this.dropdownDirectionClasses.top);\n\t\t\tthis.dropdown.style.marginTop = `${this.dropdownSpace}px`;\n\t\t} else {\n\t\t\tthis.dropdown.classList.remove('top-full');\n\t\t\tif (this.dropdownDirectionClasses?.top)\n\t\t\t\tthis.dropdown.classList.remove(this.dropdownDirectionClasses.top);\n\t\t\tthis.dropdown.style.marginTop = '';\n\t\t\tthis.dropdown.classList.add('bottom-full');\n\t\t\tif (this.dropdownDirectionClasses?.bottom)\n\t\t\t\tthis.dropdown.classList.add(this.dropdownDirectionClasses.bottom);\n\t\t\tthis.dropdown.style.marginBottom = `${this.dropdownSpace}px`;\n\t\t}\n\t}\n\n\t// Static methods\n\tprivate static findInCollection(target: HSSelect | HTMLElement | string): ICollectionItem | null {\n\t\treturn window.$hsSelectCollection.find((el) => {\n\t\t\tif (target instanceof HSSelect) return el.element.el === target.el;\n\t\t\telse if (typeof target === 'string') return el.element.el === document.querySelector(target);\n\t\t\telse return el.element.el === target;\n\t\t}) || null;\n\t}\n\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsSelectCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsSelectCollection) {\n\t\t\twindow.$hsSelectCollection = [];\n\n\t\t\twindow.addEventListener('click', (evt) => {\n\t\t\t\tconst evtTarget = evt.target;\n\n\t\t\t\tHSSelect.closeCurrentlyOpened(evtTarget as HTMLElement);\n\t\t\t});\n\n\t\t\tdocument.addEventListener('keydown', (evt) =>\n\t\t\t\tHSSelect.accessibility(evt),\n\t\t\t);\n\t\t}\n\n\t\tif (window.$hsSelectCollection)\n\t\t\twindow.$hsSelectCollection = window.$hsSelectCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-select]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsSelectCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-select');\n\t\t\t\t\tconst options: ISelectOptions = data ? JSON.parse(data) : {};\n\n\t\t\t\t\tnew HSSelect(el, options);\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tstatic open(target: HSSelect | HTMLElement | string) {\n\t\tconst instance = HSSelect.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\t!instance.element.isOpened\n\t\t) instance.element.open();\n\t}\n\n\tstatic close(target: HSSelect | HTMLElement | string) {\n\t\tconst instance = HSSelect.findInCollection(target);\n\n\t\tif (\n\t\t\tinstance &&\n\t\t\tinstance.element.isOpened\n\t\t) instance.element.close();\n\t}\n\n\tstatic closeCurrentlyOpened(evtTarget: HTMLElement | null = null) {\n\t\tif (\n\t\t\t!evtTarget.closest('.hs-select.active') &&\n\t\t\t!evtTarget.closest('[data-hs-select-dropdown].opened')\n\t\t) {\n\t\t\tconst currentlyOpened = window.$hsSelectCollection.filter((el) => el.element.isOpened) || null;\n\n\t\t\tif (currentlyOpened) currentlyOpened.forEach((el) => {\n\t\t\t\tel.element.close();\n\t\t\t});\n\t\t}\n\t}\n\n\t// Accessibility methods\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (\n\t\t\ttarget &&\n\t\t\tSELECT_ACCESSIBILITY_KEY_SET.includes(evt.code) &&\n\t\t\t!evt.metaKey\n\t\t) {\n\t\t\tswitch (evt.code) {\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEscape();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Tab':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onTab(evt.shiftKey);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Home':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'End':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEnter(evt);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Space':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEnter(evt);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onEscape() {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (target) target.element.close();\n\t}\n\n\tstatic onArrow(isArrowUp = true) {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (target) {\n\t\t\tconst dropdown = target.element.dropdown;\n\n\t\t\tif (!dropdown) return false;\n\n\t\t\tconst preparedOptions = isArrowUp\n\t\t\t\t? Array.from(\n\t\t\t\t\tdropdown.querySelectorAll(':scope > *:not(.hidden)'),\n\t\t\t\t).reverse()\n\t\t\t\t: Array.from(dropdown.querySelectorAll(':scope > *:not(.hidden)'));\n\t\t\tconst options = preparedOptions.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\t\t\tconst current =\n\t\t\t\tdropdown.querySelector('.hs-select-option-highlighted') ||\n\t\t\t\tdropdown.querySelector('.selected');\n\t\t\tif (!current) options[0].classList.add('hs-select-option-highlighted');\n\t\t\tlet currentInd = options.findIndex((el: any) => el === current);\n\n\t\t\tif (currentInd + 1 < options.length) {\n\t\t\t\tcurrentInd++;\n\t\t\t}\n\n\t\t\t(options[currentInd] as HTMLButtonElement).focus();\n\t\t\tif (current) current.classList.remove('hs-select-option-highlighted');\n\t\t\toptions[currentInd].classList.add('hs-select-option-highlighted');\n\t\t}\n\t}\n\n\tstatic onTab(isArrowUp = true) {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (target) {\n\t\t\tconst dropdown = target.element.dropdown;\n\n\t\t\tif (!dropdown) return false;\n\n\t\t\tconst preparedOptions = isArrowUp\n\t\t\t\t? Array.from(\n\t\t\t\t\tdropdown.querySelectorAll(':scope > *:not(.hidden)'),\n\t\t\t\t).reverse()\n\t\t\t\t: Array.from(dropdown.querySelectorAll(':scope > *:not(.hidden)'));\n\t\t\tconst options = preparedOptions.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\t\t\tconst current =\n\t\t\t\tdropdown.querySelector('.hs-select-option-highlighted') ||\n\t\t\t\tdropdown.querySelector('.selected');\n\t\t\tif (!current) options[0].classList.add('hs-select-option-highlighted');\n\t\t\tlet currentInd = options.findIndex((el: any) => el === current);\n\n\t\t\tif (currentInd + 1 < options.length) {\n\t\t\t\tcurrentInd++;\n\t\t\t} else {\n\t\t\t\tif (current) current.classList.remove('hs-select-option-highlighted');\n\t\t\t\ttarget.element.close();\n\t\t\t\ttarget.element.toggle.focus();\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t(options[currentInd] as HTMLButtonElement).focus();\n\t\t\tif (current) current.classList.remove('hs-select-option-highlighted');\n\t\t\toptions[currentInd].classList.add('hs-select-option-highlighted');\n\t\t}\n\t}\n\n\tstatic onStartEnd(isStart = true) {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (target) {\n\t\t\tconst dropdown = target.element.dropdown;\n\n\t\t\tif (!dropdown) return false;\n\n\t\t\tconst preparedOptions = isStart\n\t\t\t\t? Array.from(dropdown.querySelectorAll(':scope > *:not(.hidden)'))\n\t\t\t\t: Array.from(\n\t\t\t\t\tdropdown.querySelectorAll(':scope > *:not(.hidden)'),\n\t\t\t\t).reverse();\n\t\t\tconst options = preparedOptions.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\t\t\tconst current = dropdown.querySelector('.hs-select-option-highlighted');\n\n\t\t\tif (options.length) {\n\t\t\t\t(options[0] as HTMLButtonElement).focus();\n\t\t\t\tif (current) current.classList.remove('hs-select-option-highlighted');\n\t\t\t\toptions[0].classList.add('hs-select-option-highlighted');\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onEnter(evt: Event) {\n\t\tconst select = (evt.target as HTMLElement).previousSibling;\n\n\t\tif (window.$hsSelectCollection.find((el) => el.element.el === select)) {\n\t\t\tconst opened = window.$hsSelectCollection.find(\n\t\t\t\t(el) => el.element.isOpened,\n\t\t\t);\n\t\t\tconst target = window.$hsSelectCollection.find(\n\t\t\t\t(el) => el.element.el === select,\n\t\t\t);\n\n\t\t\topened.element.close();\n\t\t\ttarget.element.open();\n\t\t} else {\n\t\t\tconst target = window.$hsSelectCollection.find(\n\t\t\t\t(el) => el.element.isOpened,\n\t\t\t);\n\n\t\t\tif (target)\n\t\t\t\ttarget.element.onSelectOption(\n\t\t\t\t\t(evt.target as HTMLElement).dataset.value || '',\n\t\t\t\t);\n\t\t}\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSSelect: Function;\n\t\t$hsSelectCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSSelect.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Select collection:', window.$hsSelectCollection);\n});\n\ndocument.addEventListener('scroll', () => {\n\tif (!window.$hsSelectCollection) return false;\n\n\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\tif (target) target.element.recalculateDirection();\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSSelect = HSSelect;\n}\n\nexport default HSSelect;\n", "/*\n * HSStepper\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { IStepperOptions, IStepper, IStepperItem } from '../stepper/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSStepper extends HSBasePlugin<{}> implements IStepper {\n\tprivate currentIndex: number | null;\n\tprivate readonly mode: string | null;\n\tprivate isCompleted: boolean | null;\n\n\tprivate totalSteps: number | null;\n\n\tprivate navItems: IStepperItem[] | null;\n\tprivate contentItems: IStepperItem[] | null;\n\tprivate backBtn: HTMLElement | null;\n\tprivate nextBtn: HTMLElement | null;\n\tprivate skipBtn: HTMLElement | null;\n\tprivate completeStepBtn: HTMLElement | null;\n\tprivate completeStepBtnDefaultText: string | null;\n\tprivate finishBtn: HTMLElement | null;\n\tprivate resetBtn: HTMLElement | null;\n\n\tprivate onNavItemClickListener:\n\t\t| {\n\t\t\t\tel: HTMLElement;\n\t\t\t\tfn: () => void;\n\t\t }[]\n\t\t| null;\n\tprivate onBackClickListener: () => void;\n\tprivate onNextClickListener: () => void;\n\tprivate onSkipClickListener: () => void;\n\tprivate onCompleteStepBtnClickListener: () => void;\n\tprivate onFinishBtnClickListener: () => void;\n\tprivate onResetBtnClickListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: IStepperOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-stepper');\n\t\tconst dataOptions: IStepperOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.currentIndex = concatOptions?.currentIndex || 1;\n\t\tthis.mode = concatOptions?.mode || 'linear';\n\t\tthis.isCompleted =\n\t\t\ttypeof concatOptions?.isCompleted !== 'undefined'\n\t\t\t\t? concatOptions?.isCompleted\n\t\t\t\t: false;\n\n\t\tthis.totalSteps = 1;\n\n\t\tthis.navItems = [];\n\t\tthis.contentItems = [];\n\n\t\tthis.onNavItemClickListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate navItemClick(item: IStepperItem) {\n\t\tthis.handleNavItemClick(item);\n\t}\n\n\tprivate backClick() {\n\t\tthis.handleBackButtonClick();\n\n\t\tif (this.mode === 'linear') {\n\t\t\tconst currentNavItem = this.navItems.find(\n\t\t\t\t({ index }) => index === this.currentIndex,\n\t\t\t);\n\t\t\tconst currentContentItem = this.contentItems.find(\n\t\t\t\t({ index }) => index === this.currentIndex,\n\t\t\t);\n\n\t\t\tif (!currentNavItem || !currentContentItem) return;\n\n\t\t\tif (currentNavItem.isCompleted) {\n\t\t\t\tcurrentNavItem.isCompleted = false;\n\t\t\t\tcurrentNavItem.isSkip = false;\n\n\t\t\t\tcurrentNavItem.el.classList.remove('success', 'skipped');\n\t\t\t}\n\n\t\t\tif (currentContentItem.isCompleted) {\n\t\t\t\tcurrentContentItem.isCompleted = false;\n\t\t\t\tcurrentContentItem.isSkip = false;\n\n\t\t\t\tcurrentContentItem.el.classList.remove('success', 'skipped');\n\t\t\t}\n\n\t\t\tif (this.mode === 'linear' && this.currentIndex !== this.totalSteps) {\n\t\t\t\tif (this.nextBtn) this.nextBtn.style.display = '';\n\t\t\t\tif (this.completeStepBtn) this.completeStepBtn.style.display = '';\n\t\t\t}\n\n\t\t\tthis.showSkipButton();\n\t\t\tthis.showFinishButton();\n\t\t\tthis.showCompleteStepButton();\n\t\t}\n\t}\n\n\tprivate nextClick() {\n\t\tthis.fireEvent('beforeNext', this.currentIndex);\n\t\tdispatch('beforeNext.hs.stepper', this.el, this.currentIndex);\n\n\t\tif (this.getNavItem(this.currentIndex)?.isProcessed) {\n\t\t\tthis.disableAll();\n\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.goToNext();\n\t}\n\n\tprivate skipClick() {\n\t\tthis.handleSkipButtonClick();\n\n\t\tif (this.mode === 'linear' && this.currentIndex === this.totalSteps) {\n\t\t\tif (this.nextBtn) this.nextBtn.style.display = 'none';\n\t\t\tif (this.completeStepBtn) this.completeStepBtn.style.display = 'none';\n\t\t\tif (this.finishBtn) this.finishBtn.style.display = '';\n\t\t}\n\t}\n\n\tprivate completeStepBtnClick() {\n\t\tthis.handleCompleteStepButtonClick();\n\t}\n\n\tprivate finishBtnClick() {\n\t\tthis.handleFinishButtonClick();\n\t}\n\n\tprivate resetBtnClick() {\n\t\tthis.handleResetButtonClick();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsStepperCollection, this);\n\n\t\tthis.buildNav();\n\t\tthis.buildContent();\n\t\tthis.buildButtons();\n\t\tthis.setTotalSteps();\n\t}\n\n\tprivate getUncompletedSteps(inIncludedSkipped: boolean = false) {\n\t\treturn this.navItems.filter(({ isCompleted, isSkip }) =>\n\t\t\tinIncludedSkipped ? !isCompleted || isSkip : !isCompleted && !isSkip,\n\t\t);\n\t}\n\n\tprivate setTotalSteps() {\n\t\tthis.navItems.forEach((item) => {\n\t\t\tconst { index } = item;\n\n\t\t\tif (index > this.totalSteps) this.totalSteps = index;\n\t\t});\n\t}\n\n\t// Nav\n\tprivate buildNav() {\n\t\tthis.el\n\t\t\t.querySelectorAll('[data-hs-stepper-nav-item]')\n\t\t\t.forEach((el) => this.addNavItem(el as HTMLElement));\n\n\t\tthis.navItems.forEach((item) => this.buildNavItem(item));\n\t}\n\n\tprivate buildNavItem(item: IStepperItem) {\n\t\tconst { index, isDisabled, el } = item;\n\n\t\tif (index === this.currentIndex) this.setCurrentNavItem();\n\n\t\tif (this.mode !== 'linear' || isDisabled) {\n\t\t\tthis.onNavItemClickListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: () => this.navItemClick(item),\n\t\t\t});\n\n\t\t\tel.addEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onNavItemClickListener.find((navItem) => navItem.el === el).fn,\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate addNavItem(el: HTMLElement) {\n\t\tconst {\n\t\t\tindex,\n\t\t\tisFinal = false,\n\t\t\tisCompleted = false,\n\t\t\tisSkip = false,\n\t\t\tisOptional = false,\n\t\t\tisDisabled = false,\n\t\t\tisProcessed = false,\n\t\t\thasError = false,\n\t\t} = JSON.parse(el.getAttribute('data-hs-stepper-nav-item'));\n\n\t\tif (isCompleted) el.classList.add('success');\n\t\tif (isSkip) el.classList.add('skipped');\n\t\tif (isDisabled) {\n\t\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\t\tel.setAttribute('disabled', 'disabled');\n\n\t\t\tel.classList.add('disabled');\n\t\t}\n\t\tif (hasError) el.classList.add('error');\n\n\t\tthis.navItems.push({\n\t\t\tindex,\n\t\t\tisFinal,\n\t\t\tisCompleted,\n\t\t\tisSkip,\n\t\t\tisOptional,\n\t\t\tisDisabled,\n\t\t\tisProcessed,\n\t\t\thasError,\n\t\t\tel: el as HTMLElement,\n\t\t});\n\t}\n\n\tprivate setCurrentNavItem() {\n\t\tthis.navItems.forEach((item) => {\n\t\t\tconst { index, el } = item;\n\n\t\t\tif (index === this.currentIndex) this.setCurrentNavItemActions(el);\n\t\t\telse this.unsetCurrentNavItemActions(el);\n\t\t});\n\t}\n\n\tprivate setCurrentNavItemActions(el: HTMLElement) {\n\t\tel.classList.add('active');\n\n\t\tthis.fireEvent('active', this.currentIndex);\n\t\tdispatch('active.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\tprivate getNavItem(n = this.currentIndex) {\n\t\treturn this.navItems.find(({ index }) => index === n);\n\t}\n\n\tprivate setProcessedNavItemActions(item: IStepperItem) {\n\t\titem.isProcessed = true;\n\n\t\titem.el.classList.add('processed');\n\t}\n\n\tprivate setErrorNavItemActions(item: IStepperItem) {\n\t\titem.hasError = true;\n\n\t\titem.el.classList.add('error');\n\t}\n\n\tprivate unsetCurrentNavItemActions(el: HTMLElement) {\n\t\tel.classList.remove('active');\n\t}\n\n\tprivate handleNavItemClick(item: IStepperItem) {\n\t\tconst { index } = item;\n\n\t\tthis.currentIndex = index;\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.setCurrentContentItem();\n\n\t\tthis.checkForTheFirstStep();\n\t}\n\n\t// Content\n\tprivate buildContent() {\n\t\tthis.el\n\t\t\t.querySelectorAll('[data-hs-stepper-content-item]')\n\t\t\t.forEach((el) => this.addContentItem(el as HTMLElement));\n\n\t\tthis.navItems.forEach((item) => this.buildContentItem(item));\n\t}\n\n\tprivate buildContentItem(item: IStepperItem) {\n\t\tconst { index } = item;\n\n\t\tif (index === this.currentIndex) this.setCurrentContentItem();\n\t}\n\n\tprivate addContentItem(el: HTMLElement) {\n\t\tconst {\n\t\t\tindex,\n\t\t\tisFinal = false,\n\t\t\tisCompleted = false,\n\t\t\tisSkip = false,\n\t\t} = JSON.parse(el.getAttribute('data-hs-stepper-content-item'));\n\n\t\tif (isCompleted) el.classList.add('success');\n\t\tif (isSkip) el.classList.add('skipped');\n\n\t\tthis.contentItems.push({\n\t\t\tindex,\n\t\t\tisFinal,\n\t\t\tisCompleted,\n\t\t\tisSkip,\n\t\t\tel: el as HTMLElement,\n\t\t});\n\t}\n\n\tprivate setCurrentContentItem() {\n\t\tif (this.isCompleted) {\n\t\t\tconst finalContentItem = this.contentItems.find(({ isFinal }) => isFinal);\n\t\t\tconst otherContentItems = this.contentItems.filter(\n\t\t\t\t({ isFinal }) => !isFinal,\n\t\t\t);\n\t\t\tfinalContentItem.el.style.display = '';\n\t\t\totherContentItems.forEach(({ el }) => (el.style.display = 'none'));\n\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.contentItems.forEach((item) => {\n\t\t\tconst { index, el } = item;\n\n\t\t\tif (index === this.currentIndex) this.setCurrentContentItemActions(el);\n\t\t\telse this.unsetCurrentContentItemActions(el);\n\t\t});\n\t}\n\n\tprivate hideAllContentItems() {\n\t\tthis.contentItems.forEach(({ el }) => (el.style.display = 'none'));\n\t}\n\n\tprivate setCurrentContentItemActions(el: HTMLElement) {\n\t\tel.style.display = '';\n\t}\n\n\tprivate unsetCurrentContentItemActions(el: HTMLElement) {\n\t\tel.style.display = 'none';\n\t}\n\n\tprivate disableAll() {\n\t\tconst currentNavItem = this.getNavItem(this.currentIndex);\n\t\tcurrentNavItem.hasError = false;\n\t\tcurrentNavItem.isCompleted = false;\n\t\tcurrentNavItem.isDisabled = false;\n\t\tcurrentNavItem.el.classList.remove('error', 'success');\n\n\t\tthis.disableButtons();\n\t}\n\n\tprivate disableNavItemActions(item: IStepperItem) {\n\t\titem.isDisabled = true;\n\t\titem.el.classList.add('disabled');\n\t}\n\n\tprivate enableNavItemActions(item: IStepperItem) {\n\t\titem.isDisabled = false;\n\t\titem.el.classList.remove('disabled');\n\t}\n\n\t// Buttons\n\tprivate buildButtons() {\n\t\tthis.backBtn = this.el.querySelector('[data-hs-stepper-back-btn]');\n\t\tthis.nextBtn = this.el.querySelector('[data-hs-stepper-next-btn]');\n\t\tthis.skipBtn = this.el.querySelector('[data-hs-stepper-skip-btn]');\n\t\tthis.completeStepBtn = this.el.querySelector(\n\t\t\t'[data-hs-stepper-complete-step-btn]',\n\t\t);\n\t\tthis.finishBtn = this.el.querySelector('[data-hs-stepper-finish-btn]');\n\t\tthis.resetBtn = this.el.querySelector('[data-hs-stepper-reset-btn]');\n\n\t\tthis.buildBackButton();\n\t\tthis.buildNextButton();\n\t\tthis.buildSkipButton();\n\t\tthis.buildCompleteStepButton();\n\t\tthis.buildFinishButton();\n\t\tthis.buildResetButton();\n\t}\n\n\t// back\n\tprivate buildBackButton() {\n\t\tif (!this.backBtn) return;\n\n\t\tthis.checkForTheFirstStep();\n\n\t\tthis.onBackClickListener = () => this.backClick();\n\n\t\tthis.backBtn.addEventListener('click', this.onBackClickListener);\n\t}\n\n\tprivate handleBackButtonClick() {\n\t\tif (this.currentIndex === 1) return;\n\n\t\tif (this.mode === 'linear') {\n\t\t\tthis.removeOptionalClasses();\n\t\t}\n\n\t\tthis.currentIndex--;\n\n\t\tif (this.mode === 'linear') {\n\t\t\tthis.removeOptionalClasses();\n\t\t}\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.setCurrentContentItem();\n\n\t\tthis.checkForTheFirstStep();\n\t\tif (this.completeStepBtn)\n\t\t\tthis.changeTextAndDisableCompleteButtonIfStepCompleted();\n\n\t\tthis.fireEvent('back', this.currentIndex);\n\t\tdispatch('back.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\tprivate checkForTheFirstStep() {\n\t\tif (this.currentIndex === 1) {\n\t\t\tthis.setToDisabled(this.backBtn);\n\t\t} else {\n\t\t\tthis.setToNonDisabled(this.backBtn);\n\t\t}\n\t}\n\n\tprivate setToDisabled(el: HTMLElement) {\n\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\tel.setAttribute('disabled', 'disabled');\n\n\t\tel.classList.add('disabled');\n\t}\n\n\tprivate setToNonDisabled(el: HTMLElement) {\n\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\tel.removeAttribute('disabled');\n\n\t\tel.classList.remove('disabled');\n\t}\n\n\t// next\n\tprivate buildNextButton() {\n\t\tif (!this.nextBtn) return;\n\n\t\tthis.onNextClickListener = () => this.nextClick();\n\n\t\tthis.nextBtn.addEventListener('click', this.onNextClickListener);\n\t}\n\n\tprivate unsetProcessedNavItemActions(item: IStepperItem) {\n\t\titem.isProcessed = false;\n\n\t\titem.el.classList.remove('processed');\n\t}\n\n\tprivate handleNextButtonClick(infinite = true) {\n\t\tif (infinite) {\n\t\t\tif (this.currentIndex === this.totalSteps) this.currentIndex = 1;\n\t\t\telse this.currentIndex++;\n\t\t} else {\n\t\t\tconst nonCompletedSteps = this.getUncompletedSteps();\n\n\t\t\tif (nonCompletedSteps.length === 1) {\n\t\t\t\tconst { index } = nonCompletedSteps[0];\n\n\t\t\t\tthis.currentIndex = index;\n\t\t\t} else {\n\t\t\t\tif (this.currentIndex === this.totalSteps) return;\n\n\t\t\t\tthis.currentIndex++;\n\t\t\t}\n\t\t}\n\n\t\tif (this.mode === 'linear') {\n\t\t\tthis.removeOptionalClasses();\n\t\t}\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.setCurrentContentItem();\n\n\t\tthis.checkForTheFirstStep();\n\t\tif (this.completeStepBtn)\n\t\t\tthis.changeTextAndDisableCompleteButtonIfStepCompleted();\n\n\t\tthis.showSkipButton();\n\t\tthis.showFinishButton();\n\t\tthis.showCompleteStepButton();\n\n\t\tthis.fireEvent('next', this.currentIndex);\n\t\tdispatch('next.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\tprivate removeOptionalClasses() {\n\t\tconst currentNavItem = this.navItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\t\tconst currentContentItem = this.contentItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\n\t\tcurrentNavItem.isSkip = false;\n\t\tcurrentNavItem.hasError = false;\n\t\tcurrentNavItem.isDisabled = false;\n\t\tcurrentContentItem.isSkip = false;\n\n\t\tcurrentNavItem.el.classList.remove('skipped', 'success', 'error');\n\t\tcurrentContentItem.el.classList.remove('skipped', 'success', 'error');\n\t}\n\n\t// skip\n\tprivate buildSkipButton() {\n\t\tif (!this.skipBtn) return;\n\n\t\tthis.showSkipButton();\n\n\t\tthis.onSkipClickListener = () => this.skipClick();\n\n\t\tthis.skipBtn.addEventListener('click', this.onSkipClickListener);\n\t}\n\n\tprivate setSkipItem(n?: number) {\n\t\tconst targetNavItem = this.navItems.find(\n\t\t\t({ index }) => index === (n || this.currentIndex),\n\t\t);\n\t\tconst targetContentItem = this.contentItems.find(\n\t\t\t({ index }) => index === (n || this.currentIndex),\n\t\t);\n\n\t\tif (!targetNavItem || !targetContentItem) return;\n\n\t\tthis.setSkipItemActions(targetNavItem);\n\t\tthis.setSkipItemActions(targetContentItem);\n\t}\n\n\tprivate setSkipItemActions(item: IStepperItem) {\n\t\titem.isSkip = true;\n\n\t\titem.el.classList.add('skipped');\n\t}\n\n\tprivate showSkipButton() {\n\t\tif (!this.skipBtn) return;\n\n\t\tconst { isOptional } = this.navItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\n\t\tif (isOptional) this.skipBtn.style.display = '';\n\t\telse this.skipBtn.style.display = 'none';\n\t}\n\n\tprivate handleSkipButtonClick() {\n\t\tthis.setSkipItem();\n\t\tthis.handleNextButtonClick();\n\n\t\tthis.fireEvent('skip', this.currentIndex);\n\t\tdispatch('skip.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\t// complete\n\tprivate buildCompleteStepButton() {\n\t\tif (!this.completeStepBtn) return;\n\n\t\tthis.completeStepBtnDefaultText = this.completeStepBtn.innerText;\n\n\t\tthis.onCompleteStepBtnClickListener = () => this.completeStepBtnClick();\n\n\t\tthis.completeStepBtn.addEventListener(\n\t\t\t'click',\n\t\t\tthis.onCompleteStepBtnClickListener,\n\t\t);\n\t}\n\n\tprivate changeTextAndDisableCompleteButtonIfStepCompleted() {\n\t\tconst currentNavItem = this.navItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\t\tconst { completedText } = JSON.parse(\n\t\t\tthis.completeStepBtn.getAttribute('data-hs-stepper-complete-step-btn'),\n\t\t);\n\n\t\tif (!currentNavItem) return;\n\n\t\tif (currentNavItem.isCompleted) {\n\t\t\tthis.completeStepBtn.innerText =\n\t\t\t\tcompletedText || this.completeStepBtnDefaultText;\n\t\t\tthis.completeStepBtn.setAttribute('disabled', 'disabled');\n\t\t\tthis.completeStepBtn.classList.add('disabled');\n\t\t} else {\n\t\t\tthis.completeStepBtn.innerText = this.completeStepBtnDefaultText;\n\t\t\tthis.completeStepBtn.removeAttribute('disabled');\n\t\t\tthis.completeStepBtn.classList.remove('disabled');\n\t\t}\n\t}\n\n\tprivate setCompleteItem(n?: number) {\n\t\tconst targetNavItem = this.navItems.find(\n\t\t\t({ index }) => index === (n || this.currentIndex),\n\t\t);\n\t\tconst targetContentItem = this.contentItems.find(\n\t\t\t({ index }) => index === (n || this.currentIndex),\n\t\t);\n\n\t\tif (!targetNavItem || !targetContentItem) return;\n\n\t\tthis.setCompleteItemActions(targetNavItem);\n\t\tthis.setCompleteItemActions(targetContentItem);\n\t}\n\n\tprivate setCompleteItemActions(item: IStepperItem) {\n\t\titem.isCompleted = true;\n\n\t\titem.el.classList.add('success');\n\t}\n\n\tprivate showCompleteStepButton() {\n\t\tif (!this.completeStepBtn) return;\n\n\t\tconst nonCompletedSteps = this.getUncompletedSteps();\n\n\t\tif (nonCompletedSteps.length === 1)\n\t\t\tthis.completeStepBtn.style.display = 'none';\n\t\telse this.completeStepBtn.style.display = '';\n\t}\n\n\tprivate handleCompleteStepButtonClick() {\n\t\tthis.setCompleteItem();\n\n\t\tthis.fireEvent('complete', this.currentIndex);\n\t\tdispatch('complete.hs.stepper', this.el, this.currentIndex);\n\n\t\tthis.handleNextButtonClick(false);\n\t\tthis.showFinishButton();\n\t\tthis.showCompleteStepButton();\n\t\tthis.checkForTheFirstStep();\n\t\tif (this.completeStepBtn)\n\t\t\tthis.changeTextAndDisableCompleteButtonIfStepCompleted();\n\t\tthis.showSkipButton();\n\t}\n\n\t// finish\n\tprivate buildFinishButton() {\n\t\tif (!this.finishBtn) return;\n\n\t\tif (this.isCompleted) {\n\t\t\tthis.setCompleted();\n\t\t}\n\n\t\tthis.onFinishBtnClickListener = () => this.finishBtnClick();\n\n\t\tthis.finishBtn.addEventListener('click', this.onFinishBtnClickListener);\n\t}\n\n\tprivate setCompleted() {\n\t\tthis.el.classList.add('completed');\n\t}\n\n\tprivate unsetCompleted() {\n\t\tthis.el.classList.remove('completed');\n\t}\n\n\tprivate showFinishButton() {\n\t\tif (!this.finishBtn) return;\n\n\t\tconst nonCompletedSteps = this.getUncompletedSteps();\n\n\t\tif (nonCompletedSteps.length === 1) this.finishBtn.style.display = '';\n\t\telse this.finishBtn.style.display = 'none';\n\t}\n\n\tprivate handleFinishButtonClick() {\n\t\tconst uncompletedSteps = this.getUncompletedSteps();\n\t\tconst uncompletedOrSkipSteps = this.getUncompletedSteps(true);\n\t\tconst { el } = this.contentItems.find(({ isFinal }) => isFinal);\n\n\t\tif (uncompletedSteps.length)\n\t\t\tuncompletedSteps.forEach(({ index }) => this.setCompleteItem(index));\n\n\t\tthis.currentIndex = this.totalSteps;\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.hideAllContentItems();\n\n\t\tconst currentNavItem = this.navItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\t\tconst currentNavItemEl = currentNavItem ? currentNavItem.el : null;\n\n\t\tcurrentNavItemEl.classList.remove('active');\n\n\t\tel.style.display = 'block';\n\t\tif (this.backBtn) this.backBtn.style.display = 'none';\n\t\tif (this.nextBtn) this.nextBtn.style.display = 'none';\n\t\tif (this.skipBtn) this.skipBtn.style.display = 'none';\n\t\tif (this.completeStepBtn) this.completeStepBtn.style.display = 'none';\n\t\tif (this.finishBtn) this.finishBtn.style.display = 'none';\n\t\tif (this.resetBtn) this.resetBtn.style.display = '';\n\n\t\tif (uncompletedOrSkipSteps.length <= 1) {\n\t\t\tthis.isCompleted = true;\n\t\t\tthis.setCompleted();\n\t\t}\n\n\t\tthis.fireEvent('finish', this.currentIndex);\n\t\tdispatch('finish.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\t// reset\n\tprivate buildResetButton() {\n\t\tif (!this.resetBtn) return;\n\n\t\tthis.onResetBtnClickListener = () => this.resetBtnClick();\n\n\t\tthis.resetBtn.addEventListener('click', this.onResetBtnClickListener);\n\t}\n\n\tprivate handleResetButtonClick() {\n\t\tif (this.backBtn) this.backBtn.style.display = '';\n\t\tif (this.nextBtn) this.nextBtn.style.display = '';\n\t\tif (this.completeStepBtn) {\n\t\t\tthis.completeStepBtn.style.display = '';\n\t\t\tthis.completeStepBtn.innerText = this.completeStepBtnDefaultText;\n\t\t\tthis.completeStepBtn.removeAttribute('disabled');\n\t\t\tthis.completeStepBtn.classList.remove('disabled');\n\t\t}\n\t\tif (this.resetBtn) this.resetBtn.style.display = 'none';\n\n\t\tthis.navItems.forEach((item) => {\n\t\t\tconst { el } = item;\n\t\t\titem.isSkip = false;\n\t\t\titem.isCompleted = false;\n\n\t\t\tthis.unsetCurrentNavItemActions(el);\n\t\t\tel.classList.remove('success', 'skipped');\n\t\t});\n\n\t\tthis.contentItems.forEach((item) => {\n\t\t\tconst { el } = item;\n\t\t\titem.isSkip = false;\n\t\t\titem.isCompleted = false;\n\n\t\t\tthis.unsetCurrentContentItemActions(el);\n\t\t\tel.classList.remove('success', 'skipped');\n\t\t});\n\n\t\tthis.currentIndex = 1;\n\n\t\tthis.unsetCompleted();\n\t\tthis.isCompleted = false;\n\n\t\tthis.showSkipButton();\n\t\tthis.setCurrentNavItem();\n\t\tthis.setCurrentContentItem();\n\t\tthis.showFinishButton();\n\t\tthis.showCompleteStepButton();\n\t\tthis.checkForTheFirstStep();\n\n\t\tthis.fireEvent('reset', this.currentIndex);\n\t\tdispatch('reset.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\t// Public methods\n\tpublic setProcessedNavItem(n?: number) {\n\t\tconst targetNavItem = this.getNavItem(n);\n\n\t\tif (!targetNavItem) return;\n\n\t\tthis.setProcessedNavItemActions(targetNavItem);\n\t}\n\n\tpublic unsetProcessedNavItem(n?: number) {\n\t\tconst targetNavItem = this.getNavItem(n);\n\n\t\tif (!targetNavItem) return;\n\n\t\tthis.unsetProcessedNavItemActions(targetNavItem);\n\t}\n\n\tpublic goToNext() {\n\t\tif (this.mode === 'linear') this.setCompleteItem();\n\n\t\tthis.handleNextButtonClick(this.mode !== 'linear');\n\n\t\tif (this.mode === 'linear' && this.currentIndex === this.totalSteps) {\n\t\t\tif (this.nextBtn) this.nextBtn.style.display = 'none';\n\t\t\tif (this.completeStepBtn) this.completeStepBtn.style.display = 'none';\n\t\t}\n\t}\n\n\tpublic disableButtons() {\n\t\tif (this.backBtn) this.setToDisabled(this.backBtn);\n\t\tif (this.nextBtn) this.setToDisabled(this.nextBtn);\n\t}\n\n\tpublic enableButtons() {\n\t\tif (this.backBtn) this.setToNonDisabled(this.backBtn);\n\t\tif (this.nextBtn) this.setToNonDisabled(this.nextBtn);\n\t}\n\n\tpublic setErrorNavItem(n?: number) {\n\t\tconst targetNavItem = this.getNavItem(n);\n\n\t\tif (!targetNavItem) return;\n\n\t\tthis.setErrorNavItemActions(targetNavItem);\n\t}\n\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tthis.el.classList.remove('completed');\n\t\tthis.el.querySelectorAll('[data-hs-stepper-nav-item]').forEach((el) => {\n\t\t\tel.classList.remove('active', 'success', 'skipped', 'disabled', 'error');\n\n\t\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\t\tel.removeAttribute('disabled');\n\t\t});\n\t\tthis.el.querySelectorAll('[data-hs-stepper-content-item]').forEach((el) => {\n\t\t\tel.classList.remove('success', 'skipped');\n\t\t});\n\t\tif (this.backBtn) this.backBtn.classList.remove('disabled');\n\t\tif (this.nextBtn) this.nextBtn.classList.remove('disabled');\n\t\tif (this.completeStepBtn) this.completeStepBtn.classList.remove('disabled');\n\n\t\t// Remove attributes\n\t\tif (this.backBtn) this.backBtn.style.display = '';\n\t\tif (this.nextBtn) this.nextBtn.style.display = '';\n\t\tif (this.skipBtn) this.skipBtn.style.display = '';\n\t\tif (this.finishBtn) this.finishBtn.style.display = 'none';\n\t\tif (this.resetBtn) this.resetBtn.style.display = 'none';\n\n\t\t// Remove listeners\n\t\tif (this.onNavItemClickListener.length)\n\t\t\tthis.onNavItemClickListener.forEach(({ el, fn }) => {\n\t\t\t\tel.removeEventListener('click', fn);\n\t\t\t});\n\t\tif (this.backBtn)\n\t\t\tthis.backBtn.removeEventListener('click', this.onBackClickListener);\n\t\tif (this.nextBtn)\n\t\t\tthis.nextBtn.removeEventListener('click', this.onNextClickListener);\n\t\tif (this.skipBtn)\n\t\t\tthis.skipBtn.removeEventListener('click', this.onSkipClickListener);\n\t\tif (this.completeStepBtn)\n\t\t\tthis.completeStepBtn.removeEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onCompleteStepBtnClickListener,\n\t\t\t);\n\t\tif (this.finishBtn)\n\t\t\tthis.finishBtn.removeEventListener(\n\t\t\t\t'click',\n\t\t\t\tthis.onFinishBtnClickListener,\n\t\t\t);\n\t\tif (this.resetBtn)\n\t\t\tthis.resetBtn.removeEventListener('click', this.onResetBtnClickListener);\n\n\t\twindow.$hsStepperCollection = window.$hsStepperCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsStepperCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsStepperCollection) window.$hsStepperCollection = [];\n\n\t\tif (window.$hsStepperCollection)\n\t\t\twindow.$hsStepperCollection = window.$hsStepperCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-stepper]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsStepperCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSStepper(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSStepper: Function;\n\t\t$hsStepperCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSStepper.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Stepper collection:', window.$hsStepperCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSStepper = HSStepper;\n}\n\nexport default HSStepper;\n", "/*\n * HSStrongPassword\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tisEnoughSpace,\n\tdispatch,\n\thtmlToElement,\n\tclassToClassList,\n} from '../../utils';\n\nimport {\n\tIStrongPasswordOptions,\n\tIStrongPassword,\n} from '../strong-password/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSStrongPassword\n\textends HSBasePlugin\n\timplements IStrongPassword\n{\n\tprivate readonly target: string | HTMLInputElement | null;\n\tprivate readonly hints: string | HTMLElement | null;\n\tprivate readonly stripClasses: string | null;\n\tprivate readonly minLength: number;\n\tprivate readonly mode: string;\n\tprivate readonly popoverSpace: number;\n\tprivate readonly checksExclude: string[] | null;\n\tprivate readonly specialCharactersSet: string | null;\n\n\tpublic isOpened: boolean = false;\n\tprivate strength: number = 0;\n\tprivate passedRules: Set = new Set();\n\tprivate weakness: HTMLElement | null;\n\tprivate rules: HTMLElement[] | null;\n\tprivate availableChecks: string[] | null;\n\n\tprivate onTargetInputListener: (evt: InputEvent) => void;\n\tprivate onTargetFocusListener: () => void;\n\tprivate onTargetBlurListener: () => void;\n\tprivate onTargetInputSecondListener: () => void;\n\tprivate onTargetInputThirdListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: IStrongPasswordOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-strong-password');\n\t\tconst dataOptions: IStrongPasswordOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.target = concatOptions?.target\n\t\t\t? typeof concatOptions?.target === 'string'\n\t\t\t\t? (document.querySelector(concatOptions.target) as HTMLInputElement)\n\t\t\t\t: concatOptions.target\n\t\t\t: null;\n\t\tthis.hints = concatOptions?.hints\n\t\t\t? typeof concatOptions?.hints === 'string'\n\t\t\t\t? (document.querySelector(concatOptions.hints) as HTMLElement)\n\t\t\t\t: concatOptions.hints\n\t\t\t: null;\n\t\tthis.stripClasses = concatOptions?.stripClasses || null;\n\t\tthis.minLength = concatOptions?.minLength || 6;\n\t\tthis.mode = concatOptions?.mode || 'default';\n\t\tthis.popoverSpace = concatOptions?.popoverSpace || 10;\n\t\tthis.checksExclude = concatOptions?.checksExclude || [];\n\t\tthis.availableChecks = [\n\t\t\t'lowercase',\n\t\t\t'uppercase',\n\t\t\t'numbers',\n\t\t\t'special-characters',\n\t\t\t'min-length',\n\t\t].filter((el) => !this.checksExclude.includes(el));\n\t\tthis.specialCharactersSet =\n\t\t\tconcatOptions?.specialCharactersSet ||\n\t\t\t'!\"#$%&\\'()*+,-./:;<=>?@[\\\\\\\\\\\\]^_`{|}~';\n\n\t\tif (this.target) this.init();\n\t}\n\n\tprivate targetInput(evt: InputEvent) {\n\t\tthis.setStrength((evt.target as HTMLInputElement).value);\n\t}\n\n\tprivate targetFocus() {\n\t\tthis.isOpened = true;\n\t\t(this.hints as HTMLElement).classList.remove('hidden');\n\t\t(this.hints as HTMLElement).classList.add('block');\n\n\t\tthis.recalculateDirection();\n\t}\n\n\tprivate targetBlur() {\n\t\tthis.isOpened = false;\n\t\t(this.hints as HTMLElement).classList.remove(\n\t\t\t'block',\n\t\t\t'bottom-full',\n\t\t\t'top-full',\n\t\t);\n\t\t(this.hints as HTMLElement).classList.add('hidden');\n\t\t(this.hints as HTMLElement).style.marginTop = '';\n\t\t(this.hints as HTMLElement).style.marginBottom = '';\n\t}\n\n\tprivate targetInputSecond() {\n\t\tthis.setWeaknessText();\n\t}\n\n\tprivate targetInputThird() {\n\t\tthis.setRulesText();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsStrongPasswordCollection, this);\n\n\t\tif (this.availableChecks.length) this.build();\n\t}\n\n\tprivate build() {\n\t\tthis.buildStrips();\n\t\tif (this.hints) this.buildHints();\n\n\t\tthis.setStrength((this.target as HTMLInputElement).value);\n\n\t\tthis.onTargetInputListener = (evt) => this.targetInput(evt);\n\n\t\t(this.target as HTMLInputElement).addEventListener(\n\t\t\t'input',\n\t\t\tthis.onTargetInputListener,\n\t\t);\n\t}\n\n\tprivate buildStrips() {\n\t\tthis.el.innerHTML = '';\n\n\t\tif (this.stripClasses) {\n\t\t\tfor (let i = 0; i < this.availableChecks.length; i++) {\n\t\t\t\tconst newStrip = htmlToElement('');\n\t\t\t\tclassToClassList(this.stripClasses, newStrip);\n\n\t\t\t\tthis.el.append(newStrip);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate buildHints() {\n\t\tthis.weakness =\n\t\t\t(this.hints as HTMLElement).querySelector(\n\t\t\t\t'[data-hs-strong-password-hints-weakness-text]',\n\t\t\t) || null;\n\t\tthis.rules =\n\t\t\tArray.from(\n\t\t\t\t(this.hints as HTMLElement).querySelectorAll(\n\t\t\t\t\t'[data-hs-strong-password-hints-rule-text]',\n\t\t\t\t),\n\t\t\t) || null;\n\n\t\tthis.rules.forEach((rule) => {\n\t\t\tconst ruleValue = rule.getAttribute(\n\t\t\t\t'data-hs-strong-password-hints-rule-text',\n\t\t\t);\n\n\t\t\tif (this.checksExclude?.includes(ruleValue)) rule.remove();\n\t\t});\n\n\t\tif (this.weakness) this.buildWeakness();\n\t\tif (this.rules) this.buildRules();\n\t\tif (this.mode === 'popover') {\n\t\t\tthis.onTargetFocusListener = () => this.targetFocus();\n\t\t\tthis.onTargetBlurListener = () => this.targetBlur();\n\n\t\t\t(this.target as HTMLInputElement).addEventListener(\n\t\t\t\t'focus',\n\t\t\t\tthis.onTargetFocusListener,\n\t\t\t);\n\t\t\t(this.target as HTMLInputElement).addEventListener(\n\t\t\t\t'blur',\n\t\t\t\tthis.onTargetBlurListener,\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate buildWeakness() {\n\t\tthis.checkStrength((this.target as HTMLInputElement).value);\n\t\tthis.setWeaknessText();\n\n\t\tthis.onTargetInputSecondListener = () =>\n\t\t\tsetTimeout(() => this.targetInputSecond());\n\n\t\t(this.target as HTMLInputElement).addEventListener(\n\t\t\t'input',\n\t\t\tthis.onTargetInputSecondListener,\n\t\t);\n\t}\n\n\tprivate buildRules() {\n\t\tthis.setRulesText();\n\n\t\tthis.onTargetInputThirdListener = () =>\n\t\t\tsetTimeout(() => this.targetInputThird());\n\n\t\t(this.target as HTMLInputElement).addEventListener(\n\t\t\t'input',\n\t\t\tthis.onTargetInputThirdListener,\n\t\t);\n\t}\n\n\tprivate setWeaknessText() {\n\t\tconst weaknessText = this.weakness.getAttribute(\n\t\t\t'data-hs-strong-password-hints-weakness-text',\n\t\t);\n\t\tconst weaknessTextToJson = JSON.parse(weaknessText as string);\n\n\t\tthis.weakness.textContent = weaknessTextToJson[this.strength];\n\t}\n\n\tprivate setRulesText() {\n\t\tthis.rules.forEach((rule) => {\n\t\t\tconst ruleValue = rule.getAttribute(\n\t\t\t\t'data-hs-strong-password-hints-rule-text',\n\t\t\t);\n\n\t\t\tthis.checkIfPassed(rule, this.passedRules.has(ruleValue));\n\t\t});\n\t}\n\n\tprivate togglePopover() {\n\t\tconst popover = this.el.querySelector('.popover');\n\n\t\tif (popover) popover.classList.toggle('show');\n\t}\n\n\tprivate checkStrength(val: string): { strength: number; rules: Set } {\n\t\tconst passedRules = new Set();\n\t\tconst regexps = {\n\t\t\tlowercase: /[a-z]+/,\n\t\t\tuppercase: /[A-Z]+/,\n\t\t\tnumbers: /[0-9]+/,\n\t\t\t'special-characters': new RegExp(`[${this.specialCharactersSet}]`),\n\t\t};\n\t\tlet strength = 0;\n\n\t\tif (\n\t\t\tthis.availableChecks.includes('lowercase') &&\n\t\t\tval.match(regexps['lowercase'])\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('lowercase');\n\t\t}\n\t\tif (\n\t\t\tthis.availableChecks.includes('uppercase') &&\n\t\t\tval.match(regexps['uppercase'])\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('uppercase');\n\t\t}\n\t\tif (\n\t\t\tthis.availableChecks.includes('numbers') &&\n\t\t\tval.match(regexps['numbers'])\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('numbers');\n\t\t}\n\t\tif (\n\t\t\tthis.availableChecks.includes('special-characters') &&\n\t\t\tval.match(regexps['special-characters'])\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('special-characters');\n\t\t}\n\t\tif (\n\t\t\tthis.availableChecks.includes('min-length') &&\n\t\t\tval.length >= this.minLength\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('min-length');\n\t\t}\n\t\tif (!val.length) {\n\t\t\tstrength = 0;\n\t\t}\n\n\t\tif (strength === this.availableChecks.length)\n\t\t\tthis.el.classList.add('accepted');\n\t\telse this.el.classList.remove('accepted');\n\n\t\tthis.strength = strength;\n\t\tthis.passedRules = passedRules;\n\n\t\treturn {\n\t\t\tstrength: this.strength,\n\t\t\trules: this.passedRules,\n\t\t};\n\t}\n\n\tprivate checkIfPassed(el: HTMLElement, isRulePassed = false) {\n\t\tconst check = el.querySelector('[data-check]');\n\t\tconst uncheck = el.querySelector('[data-uncheck]');\n\n\t\tif (isRulePassed) {\n\t\t\tel.classList.add('active');\n\t\t\tcheck.classList.remove('hidden');\n\t\t\tuncheck.classList.add('hidden');\n\t\t} else {\n\t\t\tel.classList.remove('active');\n\t\t\tcheck.classList.add('hidden');\n\t\t\tuncheck.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate setStrength(val: string) {\n\t\tconst { strength, rules } = this.checkStrength(val);\n\t\tconst payload = {\n\t\t\tstrength,\n\t\t\trules,\n\t\t};\n\n\t\tthis.hideStrips(strength);\n\n\t\tthis.fireEvent('change', payload);\n\t\tdispatch('change.hs.strongPassword', this.el, payload);\n\t}\n\n\tprivate hideStrips(qty: number) {\n\t\tArray.from(this.el.children).forEach((el: HTMLElement, i: number) => {\n\t\t\tif (i < qty) el.classList.add('passed');\n\t\t\telse el.classList.remove('passed');\n\t\t});\n\t}\n\n\t// Public methods\n\tpublic recalculateDirection() {\n\t\tif (\n\t\t\tisEnoughSpace(\n\t\t\t\tthis.hints as HTMLElement,\n\t\t\t\tthis.target as HTMLInputElement,\n\t\t\t\t'bottom',\n\t\t\t\tthis.popoverSpace,\n\t\t\t)\n\t\t) {\n\t\t\t(this.hints as HTMLElement).classList.remove('bottom-full');\n\t\t\t(this.hints as HTMLElement).classList.add('top-full');\n\t\t\t(this.hints as HTMLElement).style.marginBottom = '';\n\t\t\t(this.hints as HTMLElement).style.marginTop = `${this.popoverSpace}px`;\n\t\t} else {\n\t\t\t(this.hints as HTMLElement).classList.remove('top-full');\n\t\t\t(this.hints as HTMLElement).classList.add('bottom-full');\n\t\t\t(this.hints as HTMLElement).style.marginTop = '';\n\t\t\t(this.hints as HTMLElement).style.marginBottom = `${this.popoverSpace}px`;\n\t\t}\n\t}\n\n\tpublic destroy() {\n\t\t// Remove listeners\n\t\t(this.target as HTMLInputElement).removeEventListener(\n\t\t\t'input',\n\t\t\tthis.onTargetInputListener,\n\t\t);\n\t\t(this.target as HTMLInputElement).removeEventListener(\n\t\t\t'focus',\n\t\t\tthis.onTargetFocusListener,\n\t\t);\n\t\t(this.target as HTMLInputElement).removeEventListener(\n\t\t\t'blur',\n\t\t\tthis.onTargetBlurListener,\n\t\t);\n\t\t(this.target as HTMLInputElement).removeEventListener(\n\t\t\t'input',\n\t\t\tthis.onTargetInputSecondListener,\n\t\t);\n\t\t(this.target as HTMLInputElement).removeEventListener(\n\t\t\t'input',\n\t\t\tthis.onTargetInputThirdListener,\n\t\t);\n\n\t\twindow.$hsStrongPasswordCollection =\n\t\t\twindow.$hsStrongPasswordCollection.filter(\n\t\t\t\t({ element }) => element.el !== this.el,\n\t\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsStrongPasswordCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsStrongPasswordCollection)\n\t\t\twindow.$hsStrongPasswordCollection = [];\n\n\t\tif (window.$hsStrongPasswordCollection)\n\t\t\twindow.$hsStrongPasswordCollection =\n\t\t\t\twindow.$hsStrongPasswordCollection.filter(({ element }) =>\n\t\t\t\t\tdocument.contains(element.el),\n\t\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[data-hs-strong-password]:not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsStrongPasswordCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-strong-password');\n\t\t\t\t\tconst options: IStrongPasswordOptions = data ? JSON.parse(data) : {};\n\n\t\t\t\t\tnew HSStrongPassword(el, options);\n\t\t\t\t}\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSStrongPassword: Function;\n\t\t$hsStrongPasswordCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSStrongPassword.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Strong password collection:', window.$hsStrongPasswordCollection);\n});\n\ndocument.addEventListener('scroll', () => {\n\tif (!window.$hsStrongPasswordCollection) return false;\n\n\tconst target = window.$hsStrongPasswordCollection.find(\n\t\t(el) => el.element.isOpened,\n\t);\n\n\tif (target) target.element.recalculateDirection();\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSStrongPassword = HSStrongPassword;\n}\n\nexport default HSStrongPassword;\n", "/*\n * HSTabs\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { ITabs, ITabsOnChangePayload } from '../tabs/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { TABS_ACCESSIBILITY_KEY_SET } from '../../constants';\n\nclass HSTabs extends HSBasePlugin<{}> implements ITabs {\n\tpublic toggles: NodeListOf | null;\n\tprivate readonly extraToggleId: string | null;\n\tprivate readonly extraToggle: HTMLSelectElement | null;\n\tprivate current: HTMLElement | null;\n\tprivate currentContentId: string | null;\n\tpublic currentContent: HTMLElement | null;\n\tprivate prev: HTMLElement | null;\n\tprivate prevContentId: string | null;\n\tprivate prevContent: HTMLElement | null;\n\n\tprivate onToggleClickListener:\n\t\t| {\n\t\t\tel: HTMLElement;\n\t\t\tfn: () => void;\n\t\t}[]\n\t\t| null;\n\tprivate onExtraToggleChangeListener: (evt: Event) => void;\n\n\tprivate eventType: 'click';\n\n\tconstructor(el: HTMLElement, options?: {}, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.toggles = this.el.querySelectorAll('[data-hs-tab]');\n\t\tthis.extraToggleId = this.el.getAttribute('data-hs-tab-select');\n\t\tthis.extraToggle = document.querySelector(this.extraToggleId);\n\t\tthis.current = Array.from(this.toggles).find((el) =>\n\t\t\tel.classList.contains('active'),\n\t\t);\n\t\tthis.currentContentId = this.current.getAttribute('data-hs-tab');\n\t\tthis.currentContent = document.querySelector(this.currentContentId);\n\t\tthis.prev = null;\n\t\tthis.prevContentId = null;\n\t\tthis.prevContent = null;\n\n\t\tthis.eventType = 'click';\n\n\t\tthis.onToggleClickListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate toggleClick(el: HTMLElement) {\n\t\tthis.open(el);\n\t}\n\n\tprivate extraToggleChange(evt: Event) {\n\t\tthis.change(evt);\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsTabsCollection, this);\n\n\t\tthis.toggles.forEach((el) => {\n\t\t\tthis.onToggleClickListener.push({\n\t\t\t\tel,\n\t\t\t\tfn: () => this.toggleClick(el),\n\t\t\t});\n\n\t\t\tel.addEventListener(\n\t\t\t\tthis.eventType,\n\t\t\t\tthis.onToggleClickListener.find((toggle) => toggle.el === el).fn,\n\t\t\t);\n\t\t});\n\n\t\tif (this.extraToggle) {\n\t\t\tthis.onExtraToggleChangeListener = (evt) => this.extraToggleChange(evt);\n\n\t\t\tthis.extraToggle.addEventListener(\n\t\t\t\t'change',\n\t\t\t\tthis.onExtraToggleChangeListener,\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate open(el: HTMLElement) {\n\t\tthis.prev = this.current;\n\t\tthis.prevContentId = this.currentContentId;\n\t\tthis.prevContent = this.currentContent;\n\n\t\tthis.current = el;\n\t\tthis.currentContentId = this.current.getAttribute('data-hs-tab');\n\t\tthis.currentContent = document.querySelector(this.currentContentId);\n\n\t\tif (this?.prev?.ariaSelected) this.prev.ariaSelected = 'false';\n\t\tthis.prev.classList.remove('active');\n\t\tthis.prevContent.classList.add('hidden');\n\n\t\tif (this?.current?.ariaSelected) this.current.ariaSelected = 'true';\n\t\tthis.current.classList.add('active');\n\t\tthis.currentContent.classList.remove('hidden');\n\n\t\tthis.fireEvent('change', {\n\t\t\tel,\n\t\t\tprev: this.prevContentId,\n\t\t\tcurrent: this.currentContentId,\n\t\t} as ITabsOnChangePayload);\n\t\tdispatch('change.hs.tab', el, {\n\t\t\tel,\n\t\t\tprev: this.prevContentId,\n\t\t\tcurrent: this.currentContentId,\n\t\t} as ITabsOnChangePayload);\n\t}\n\n\tprivate change(evt: Event) {\n\t\tconst toggle: HTMLElement = document.querySelector(\n\t\t\t`[data-hs-tab=\"${(evt.target as HTMLSelectElement).value}\"]`,\n\t\t);\n\n\t\tif (toggle) toggle.click();\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\t// Clear listeners\n\t\tthis.toggles.forEach((el) => {\n\t\t\tel.removeEventListener(\n\t\t\t\tthis.eventType,\n\t\t\t\tthis.onToggleClickListener.find((toggle) => toggle.el === el).fn,\n\t\t\t);\n\t\t});\n\t\tthis.onToggleClickListener = [];\n\t\tif (this.extraToggle)\n\t\t\tthis.extraToggle.removeEventListener(\n\t\t\t\t'change',\n\t\t\t\tthis.onExtraToggleChangeListener,\n\t\t\t);\n\n\t\twindow.$hsTabsCollection = window.$hsTabsCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsTabsCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsTabsCollection) {\n\t\t\twindow.$hsTabsCollection = [];\n\n\t\t\tdocument.addEventListener('keydown', (evt) => HSTabs.accessibility(evt));\n\t\t}\n\n\t\tif (window.$hsTabsCollection)\n\t\t\twindow.$hsTabsCollection = window.$hsTabsCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[role=\"tablist\"]:not(select):not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsTabsCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSTabs(el);\n\t\t\t});\n\t}\n\n\tstatic open(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsTabsCollection.find((el) =>\n\t\t\tArray.from(el.element.toggles).includes(\n\t\t\t\ttypeof target === 'string' ? document.querySelector(target) : target,\n\t\t\t),\n\t\t);\n\t\tconst targetInCollection = Array.from(elInCollection.element.toggles).find(\n\t\t\t(el) =>\n\t\t\t\tel ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (targetInCollection && !targetInCollection.classList.contains('active'))\n\t\t\telInCollection.element.open(targetInCollection);\n\t}\n\n\t// Accessibility methods\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tconst target = document.querySelector('[data-hs-tab]:focus');\n\n\t\tif (\n\t\t\ttarget &&\n\t\t\tTABS_ACCESSIBILITY_KEY_SET.includes(evt.code) &&\n\t\t\t!evt.metaKey\n\t\t) {\n\t\t\tconst isVertical = target\n\t\t\t\t.closest('[role=\"tablist\"]')\n\t\t\t\t.getAttribute('data-hs-tabs-vertical');\n\n\t\t\tevt.preventDefault();\n\n\t\t\tswitch (evt.code) {\n\t\t\t\tcase isVertical === 'true' ? 'ArrowUp' : 'ArrowLeft':\n\t\t\t\t\tthis.onArrow();\n\t\t\t\t\tbreak;\n\t\t\t\tcase isVertical === 'true' ? 'ArrowDown' : 'ArrowRight':\n\t\t\t\t\tthis.onArrow(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Home':\n\t\t\t\t\tthis.onStartEnd();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'End':\n\t\t\t\t\tthis.onStartEnd(false);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onArrow(isOpposite = true) {\n\t\tconst target = document\n\t\t\t.querySelector('[data-hs-tab]:focus')\n\t\t\t.closest('[role=\"tablist\"]');\n\t\tconst targetInCollection = window.$hsTabsCollection.find(\n\t\t\t(el) => el.element.el === target,\n\t\t);\n\n\t\tif (targetInCollection) {\n\t\t\tconst toggles = isOpposite\n\t\t\t\t? Array.from(targetInCollection.element.toggles).reverse()\n\t\t\t\t: Array.from(targetInCollection.element.toggles);\n\t\t\tconst focused = toggles.find((el) => document.activeElement === el);\n\t\t\tlet focusedInd = toggles.findIndex((el: any) => el === focused);\n\t\t\tfocusedInd = focusedInd + 1 < toggles.length ? focusedInd + 1 : 0;\n\n\t\t\ttoggles[focusedInd].focus();\n\t\t\ttoggles[focusedInd].click();\n\t\t}\n\t}\n\n\tstatic onStartEnd(isOpposite = true) {\n\t\tconst target = document\n\t\t\t.querySelector('[data-hs-tab]:focus')\n\t\t\t.closest('[role=\"tablist\"]');\n\t\tconst targetInCollection = window.$hsTabsCollection.find(\n\t\t\t(el) => el.element.el === target,\n\t\t);\n\n\t\tif (targetInCollection) {\n\t\t\tconst toggles = isOpposite\n\t\t\t\t? Array.from(targetInCollection.element.toggles)\n\t\t\t\t: Array.from(targetInCollection.element.toggles).reverse();\n\n\t\t\tif (toggles.length) {\n\t\t\t\ttoggles[0].focus();\n\t\t\t\ttoggles[0].click();\n\t\t\t}\n\t\t}\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HTMLElement, cb: Function) {\n\t\tconst elInCollection = window.$hsTabsCollection.find((el) =>\n\t\t\tArray.from(el.element.toggles).includes(\n\t\t\t\ttypeof target === 'string' ? document.querySelector(target) : target,\n\t\t\t),\n\t\t);\n\n\t\tif (elInCollection) elInCollection.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSTabs: Function;\n\t\t$hsTabsCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSTabs.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Tabs collection:', window.$hsTabsCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSTabs = HSTabs;\n}\n\nexport default HSTabs;\n", "/*\n * HSTextareaAutoHeight\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tITextareaAutoHeightOptions,\n\tITextareaAutoHeight,\n} from '../textarea-auto-height/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\nimport { ITabsOnChangePayload } from '../tabs/interfaces'\n\nclass HSTextareaAutoHeight\n\textends HSBasePlugin\n\timplements ITextareaAutoHeight {\n\tprivate readonly defaultHeight: number;\n\n\tprivate onElementInputListener: () => void;\n\n\tconstructor(el: HTMLTextAreaElement, options?: ITextareaAutoHeightOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-copy-markup');\n\t\tconst dataOptions: ITextareaAutoHeightOptions = data\n\t\t\t? JSON.parse(data)\n\t\t\t: {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.defaultHeight = concatOptions?.defaultHeight || 0;\n\n\t\tthis.init();\n\t}\n\n\tprivate elementInput() {\n\t\tthis.textareaSetHeight(3);\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsTextareaAutoHeightCollection, this);\n\n\t\tthis.setAutoHeight();\n\t}\n\n\tprivate setAutoHeight() {\n\t\tif (this.isParentHidden()) this.callbackAccordingToType();\n\t\telse this.textareaSetHeight(3);\n\n\t\tthis.onElementInputListener = () => this.elementInput();\n\n\t\tthis.el.addEventListener('input', this.onElementInputListener);\n\t}\n\n\tprivate textareaSetHeight(offsetTop = 0) {\n\t\tthis.el.style.height = 'auto';\n\t\tthis.el.style.height =\n\t\t\tthis.checkIfOneLine() && this.defaultHeight\n\t\t\t\t? `${this.defaultHeight}px`\n\t\t\t\t: `${this.el.scrollHeight + offsetTop}px`;\n\t}\n\n\tprivate checkIfOneLine(): boolean {\n\t\tconst clientHeight = this.el.clientHeight;\n\t\tconst scrollHeight = this.el.scrollHeight;\n\n\t\tif (scrollHeight > clientHeight) return false;\n\t\telse return true;\n\t}\n\n\tprivate isParentHidden() {\n\t\treturn (\n\t\t\tthis.el.closest('.hs-overlay.hidden') ||\n\t\t\tthis.el.closest('[role=\"tabpanel\"].hidden') ||\n\t\t\tthis.el.closest('.hs-collapse.hidden')\n\t\t);\n\t}\n\n\tprivate parentType(): string | boolean {\n\t\tif (this.el.closest('.hs-collapse')) return 'collapse';\n\t\telse if (this.el.closest('.hs-overlay')) return 'overlay';\n\t\telse if (this.el.closest('[role=\"tabpanel\"]')) return 'tabs';\n\t\telse return false;\n\t}\n\n\tprivate callbackAccordingToType() {\n\t\tif (this.parentType() === 'tabs') {\n\t\t\tconst tabId = this.el.closest('[role=\"tabpanel\"]')?.id;\n\t\t\tconst tab = document.querySelector(`[data-hs-tab=\"#${tabId}\"]`);\n\t\t\tconst tabs = tab.closest('[role=\"tablist\"]');\n\t\t\tconst { element } = (window.HSTabs as any).getInstance(tabs, true) || null;\n\n\t\t\telement.on('change', (payload: ITabsOnChangePayload) => {\n\t\t\t\tconst textareas = document.querySelectorAll(`${payload.current} [data-hs-textarea-auto-height]`);\n\n\t\t\t\tif (!textareas.length) return false;\n\n\t\t\t\ttextareas.forEach((el: HTMLTextAreaElement) => {\n\t\t\t\t\tconst instance = (window.HSTextareaAutoHeight as any).getInstance(el, true) || null;\n\n\t\t\t\t\tif (instance) instance.element.textareaSetHeight(3);\n\t\t\t\t});\n\t\t\t});\n\t\t} else if (this.parentType() === 'collapse') {\n\t\t\tconst collapseId = this.el.closest('.hs-collapse').id;\n\t\t\tconst { element } = (window.HSCollapse as any).getInstance(\n\t\t\t\t`[data-hs-collapse=\"#${collapseId}\"]`,\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\telement.on('beforeOpen', () => {\n\t\t\t\tif (!this.el) return false;\n\n\t\t\t\tthis.textareaSetHeight(3);\n\t\t\t});\n\t\t} else if (this.parentType() === 'overlay') {\n\t\t\tconst { element } = (window.HSOverlay as any).getInstance(\n\t\t\t\tthis.el.closest('.hs-overlay'),\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\telement.on('open', () => {\n\t\t\t\tif (!this.el) return false;\n\n\t\t\t\tthis.textareaSetHeight(3);\n\t\t\t});\n\t\t} else return false;\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\t// Remove listeners\n\t\tthis.el.removeEventListener('input', this.onElementInputListener);\n\n\t\twindow.$hsTextareaAutoHeightCollection =\n\t\t\twindow.$hsTextareaAutoHeightCollection.filter(\n\t\t\t\t({ element }) => element.el !== this.el,\n\t\t\t);\n\t}\n\n\t// Static method\n\tstatic getInstance(\n\t\ttarget: HTMLTextAreaElement | string,\n\t\tisInstance?: boolean,\n\t) {\n\t\tconst elInCollection = window.$hsTextareaAutoHeightCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsTextareaAutoHeightCollection)\n\t\t\twindow.$hsTextareaAutoHeightCollection = [];\n\n\t\tif (window.$hsTextareaAutoHeightCollection)\n\t\t\twindow.$hsTextareaAutoHeightCollection =\n\t\t\t\twindow.$hsTextareaAutoHeightCollection.filter(({ element }) =>\n\t\t\t\t\tdocument.contains(element.el),\n\t\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[data-hs-textarea-auto-height]:not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLTextAreaElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsTextareaAutoHeightCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLTextAreaElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-textarea-auto-height');\n\t\t\t\t\tconst options: ITextareaAutoHeightOptions = data\n\t\t\t\t\t\t? JSON.parse(data)\n\t\t\t\t\t\t: {};\n\n\t\t\t\t\tnew HSTextareaAutoHeight(el, options);\n\t\t\t\t}\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSTextareaAutoHeight: Function;\n\t\t$hsTextareaAutoHeightCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSTextareaAutoHeight.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Textarea Autoheight collection:', window.$hsTextareaAutoHeightCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSTextareaAutoHeight = HSTextareaAutoHeight;\n}\n\nexport default HSTextareaAutoHeight;\n", "/*\n * HSThemeSwitch\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { IThemeSwitchOptions, IThemeSwitch } from '../theme-switch/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\n\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSThemeSwitch\n\textends HSBasePlugin\n\timplements IThemeSwitch\n{\n\tpublic theme: string;\n\tpublic type: 'change' | 'click';\n\tprivate themeSet: string[];\n\n\tprivate onElementChangeListener: (evt: Event) => void;\n\tprivate onElementClickListener: () => void;\n\n\tconstructor(\n\t\tel: HTMLElement | HTMLInputElement,\n\t\toptions?: IThemeSwitchOptions,\n\t) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-theme-switch');\n\t\tconst dataOptions: IThemeSwitchOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.theme =\n\t\t\tconcatOptions?.theme || localStorage.getItem('hs_theme') || 'default';\n\t\tthis.type = concatOptions?.type || 'change';\n\t\tthis.themeSet = ['light', 'dark', 'default'];\n\n\t\tthis.init();\n\t}\n\n\tprivate elementChange(evt: Event) {\n\t\tconst theme = (evt.target as HTMLInputElement).checked ? 'dark' : 'default';\n\n\t\tthis.setAppearance(theme);\n\t\tthis.toggleObserveSystemTheme();\n\t}\n\n\tprivate elementClick(theme: string) {\n\t\tthis.setAppearance(theme);\n\t\tthis.toggleObserveSystemTheme();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsThemeSwitchCollection, this);\n\n\t\tif (this.theme !== 'default') this.setAppearance();\n\n\t\tif (this.type === 'click') this.buildSwitchTypeOfClick();\n\t\telse this.buildSwitchTypeOfChange();\n\t}\n\n\tprivate buildSwitchTypeOfChange() {\n\t\t(this.el as HTMLInputElement).checked = this.theme === 'dark';\n\n\t\tthis.toggleObserveSystemTheme();\n\n\t\tthis.onElementChangeListener = (evt) => this.elementChange(evt);\n\n\t\tthis.el.addEventListener('change', this.onElementChangeListener);\n\t}\n\n\tprivate buildSwitchTypeOfClick() {\n\t\tconst theme = this.el.getAttribute('data-hs-theme-click-value');\n\n\t\tthis.toggleObserveSystemTheme();\n\n\t\tthis.onElementClickListener = () => this.elementClick(theme);\n\n\t\tthis.el.addEventListener('click', this.onElementClickListener);\n\t}\n\n\tprivate setResetStyles() {\n\t\tconst style = document.createElement('style');\n\t\tstyle.innerText = `*{transition: unset !important;}`;\n\t\tstyle.setAttribute('data-hs-appearance-onload-styles', '');\n\n\t\tdocument.head.appendChild(style);\n\n\t\treturn style;\n\t}\n\n\tprivate addSystemThemeObserver() {\n\t\twindow\n\t\t\t.matchMedia('(prefers-color-scheme: dark)')\n\t\t\t.addEventListener('change', ({ matches }) => {\n\t\t\t\tif (matches) this.setAppearance('dark', false);\n\t\t\t\telse this.setAppearance('default', false);\n\t\t\t});\n\t}\n\n\tprivate removeSystemThemeObserver() {\n\t\twindow.matchMedia('(prefers-color-scheme: dark)').removeEventListener;\n\t}\n\n\tprivate toggleObserveSystemTheme() {\n\t\tif (localStorage.getItem('hs_theme') === 'auto')\n\t\t\tthis.addSystemThemeObserver();\n\t\telse this.removeSystemThemeObserver();\n\t}\n\n\t// Public methods\n\tpublic setAppearance(\n\t\ttheme = this.theme,\n\t\tisSaveToLocalStorage = true,\n\t\tisSetDispatchEvent = true,\n\t) {\n\t\tconst html = document.querySelector('html');\n\t\tconst resetStyles = this.setResetStyles();\n\n\t\tif (isSaveToLocalStorage) localStorage.setItem('hs_theme', theme);\n\n\t\tif (theme === 'auto')\n\t\t\ttheme = window.matchMedia('(prefers-color-scheme: dark)').matches\n\t\t\t\t? 'dark'\n\t\t\t\t: 'default';\n\n\t\thtml.classList.remove('light', 'dark', 'default', 'auto');\n\t\thtml.classList.add(theme);\n\n\t\tsetTimeout(() => resetStyles.remove());\n\n\t\tif (isSetDispatchEvent)\n\t\t\twindow.dispatchEvent(\n\t\t\t\tnew CustomEvent('on-hs-appearance-change', { detail: theme }),\n\t\t\t);\n\t}\n\n\tpublic destroy() {\n\t\t// Clear listeners\n\t\tif (this.type === 'change')\n\t\t\tthis.el.removeEventListener('change', this.onElementChangeListener);\n\t\tif (this.type === 'click')\n\t\t\tthis.el.removeEventListener('click', this.onElementClickListener);\n\n\t\twindow.$hsThemeSwitchCollection = window.$hsThemeSwitchCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsThemeSwitchCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsThemeSwitchCollection) window.$hsThemeSwitchCollection = [];\n\n\t\tif (window.$hsThemeSwitchCollection)\n\t\t\twindow.$hsThemeSwitchCollection = window.$hsThemeSwitchCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-theme-switch]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsThemeSwitchCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSThemeSwitch(el, { type: 'change' });\n\t\t\t});\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[data-hs-theme-click-value]:not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsThemeSwitchCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSThemeSwitch(el, { type: 'click' });\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSThemeSwitch: Function;\n\t\t$hsThemeSwitchCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSThemeSwitch.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Theme switch collection:', window.$hsThemeSwitchCollection);\n});\n\nif (window.$hsThemeSwitchCollection) {\n\twindow.addEventListener(\n\t\t'on-hs-appearance-change',\n\t\t(evt: Event & { detail: string }) => {\n\t\t\twindow.$hsThemeSwitchCollection.forEach((el) => {\n\t\t\t\t(el.element.el as HTMLInputElement).checked = evt.detail === 'dark';\n\t\t\t});\n\t\t},\n\t);\n}\n\nif (typeof window !== 'undefined') {\n\twindow.HSThemeSwitch = HSThemeSwitch;\n}\n\nexport default HSThemeSwitch;\n", "/*\n * HSToggleCount\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { IToggleCountOptions, IToggleCount } from '../toggle-count/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSToggleCount\n\textends HSBasePlugin\n\timplements IToggleCount\n{\n\tprivate readonly target: HTMLInputElement | null;\n\tprivate readonly min: number | null;\n\tprivate readonly max: number | null;\n\tprivate readonly duration: number | null;\n\tprivate isChecked: boolean;\n\n\tprivate onToggleChangeListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: IToggleCountOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-toggle-count');\n\t\tconst dataOptions: IToggleCountOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.target = concatOptions?.target\n\t\t\t? typeof concatOptions?.target === 'string'\n\t\t\t\t? (document.querySelector(concatOptions.target) as HTMLInputElement)\n\t\t\t\t: concatOptions.target\n\t\t\t: null;\n\t\tthis.min = concatOptions?.min || 0;\n\t\tthis.max = concatOptions?.max || 0;\n\t\tthis.duration = concatOptions?.duration || 700;\n\n\t\tthis.isChecked = (this.target as HTMLInputElement).checked || false;\n\n\t\tif (this.target) this.init();\n\t}\n\n\tprivate toggleChange() {\n\t\tthis.isChecked = !this.isChecked;\n\n\t\tthis.toggle();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsToggleCountCollection, this);\n\n\t\tif (this.isChecked) this.el.innerText = String(this.max);\n\n\t\tthis.onToggleChangeListener = () => this.toggleChange();\n\n\t\tthis.target.addEventListener('change', this.onToggleChangeListener);\n\t}\n\n\tprivate toggle() {\n\t\tif (this.isChecked) this.countUp();\n\t\telse this.countDown();\n\t}\n\n\tprivate animate(from: number, to: number) {\n\t\tlet startTimestamp = 0;\n\n\t\tconst step = (timestamp: number) => {\n\t\t\tif (!startTimestamp) startTimestamp = timestamp;\n\t\t\tconst progress = Math.min(\n\t\t\t\t(timestamp - startTimestamp) / this.duration,\n\t\t\t\t1,\n\t\t\t);\n\n\t\t\tthis.el.innerText = String(Math.floor(progress * (to - from) + from));\n\n\t\t\tif (progress < 1) window.requestAnimationFrame(step);\n\t\t};\n\n\t\twindow.requestAnimationFrame(step);\n\t}\n\n\t// Public methods\n\tpublic countUp() {\n\t\tthis.animate(this.min, this.max);\n\t}\n\n\tpublic countDown() {\n\t\tthis.animate(this.max, this.min);\n\t}\n\n\tpublic destroy() {\n\t\t// Remove listeners\n\t\tthis.target.removeEventListener('change', this.onToggleChangeListener);\n\n\t\twindow.$hsToggleCountCollection = window.$hsToggleCountCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsToggleCountCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsToggleCountCollection) window.$hsToggleCountCollection = [];\n\n\t\tif (window.$hsToggleCountCollection)\n\t\t\twindow.$hsToggleCountCollection = window.$hsToggleCountCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-toggle-count]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsToggleCountCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSToggleCount(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSToggleCount: Function;\n\t\t$hsToggleCountCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSToggleCount.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Toggle count collection:', window.$hsToggleCountCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSToggleCount = HSToggleCount;\n}\n\nexport default HSToggleCount;\n", "/*\n * HSTogglePassword\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { isFormElement, dispatch } from '../../utils';\n\nimport {\n\tITogglePasswordOptions,\n\tITogglePassword,\n} from '../toggle-password/interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSTogglePassword\n\textends HSBasePlugin\n\timplements ITogglePassword\n{\n\tprivate readonly target:\n\t\t| string\n\t\t| string[]\n\t\t| HTMLInputElement\n\t\t| HTMLInputElement[]\n\t\t| null;\n\tprivate isShown: boolean;\n\tprivate isMultiple: boolean;\n\tprivate eventType: string;\n\n\tprivate onElementActionListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: ITogglePasswordOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-toggle-password');\n\t\tconst dataOptions: ITogglePasswordOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\t\tconst targets: HTMLInputElement[] = [];\n\t\tif (concatOptions?.target && typeof concatOptions?.target === 'string') {\n\t\t\tconst ids = concatOptions?.target.split(',');\n\t\t\tids.forEach((id) => {\n\t\t\t\ttargets.push(document.querySelector(id) as HTMLInputElement);\n\t\t\t});\n\t\t} else if (\n\t\t\tconcatOptions?.target &&\n\t\t\ttypeof concatOptions?.target === 'object'\n\t\t) {\n\t\t\t(concatOptions.target as string[]).forEach((el) =>\n\t\t\t\ttargets.push(document.querySelector(el)),\n\t\t\t);\n\t\t} else {\n\t\t\t(concatOptions.target as HTMLInputElement[]).forEach((el) =>\n\t\t\t\ttargets.push(el),\n\t\t\t);\n\t\t}\n\n\t\tthis.target = targets;\n\t\tthis.isShown = this.el.hasAttribute('type')\n\t\t\t? (this.el as HTMLInputElement).checked\n\t\t\t: false;\n\t\tthis.eventType = isFormElement(this.el) ? 'change' : 'click';\n\t\tthis.isMultiple =\n\t\t\tthis.target.length > 1 &&\n\t\t\t!!this.el.closest('[data-hs-toggle-password-group]');\n\n\t\tif (this.target) this.init();\n\t}\n\n\tprivate elementAction() {\n\t\tif (this.isShown) {\n\t\t\tthis.hide();\n\t\t} else {\n\t\t\tthis.show();\n\t\t}\n\n\t\tthis.fireEvent('toggle', this.target);\n\t\tdispatch('toggle.hs.toggle-select', this.el, this.target);\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsTogglePasswordCollection, this);\n\n\t\tif (!this.isShown) {\n\t\t\tthis.hide();\n\t\t} else {\n\t\t\tthis.show();\n\t\t}\n\n\t\tthis.onElementActionListener = () => this.elementAction();\n\n\t\tthis.el.addEventListener(this.eventType, this.onElementActionListener);\n\t}\n\n\tprivate getMultipleToggles(): HSTogglePassword[] {\n\t\tconst group = this.el.closest('[data-hs-toggle-password-group]');\n\t\tconst toggles = group.querySelectorAll('[data-hs-toggle-password]');\n\t\tconst togglesInCollection: HSTogglePassword[] = [];\n\n\t\ttoggles.forEach((el: HTMLElement) => {\n\t\t\ttogglesInCollection.push(\n\t\t\t\tHSTogglePassword.getInstance(el) as HSTogglePassword,\n\t\t\t);\n\t\t});\n\n\t\treturn togglesInCollection;\n\t}\n\n\t// Public methods\n\tpublic show() {\n\t\tif (this.isMultiple) {\n\t\t\tconst toggles = this.getMultipleToggles();\n\n\t\t\ttoggles.forEach((el: HSTogglePassword) =>\n\t\t\t\tel ? (el.isShown = true) : false,\n\t\t\t);\n\n\t\t\tthis.el\n\t\t\t\t.closest('[data-hs-toggle-password-group]')\n\t\t\t\t.classList.add('active');\n\t\t} else {\n\t\t\tthis.isShown = true;\n\n\t\t\tthis.el.classList.add('active');\n\t\t}\n\t\t(this.target as HTMLInputElement[]).forEach((el) => {\n\t\t\t(el as HTMLInputElement).type = 'text';\n\t\t});\n\t}\n\n\tpublic hide() {\n\t\tif (this.isMultiple) {\n\t\t\tconst toggles = this.getMultipleToggles();\n\n\t\t\ttoggles.forEach((el: HSTogglePassword) =>\n\t\t\t\tel ? (el.isShown = false) : false,\n\t\t\t);\n\n\t\t\tthis.el\n\t\t\t\t.closest('[data-hs-toggle-password-group]')\n\t\t\t\t.classList.remove('active');\n\t\t} else {\n\t\t\tthis.isShown = false;\n\n\t\t\tthis.el.classList.remove('active');\n\t\t}\n\t\t(this.target as HTMLInputElement[]).forEach((el) => {\n\t\t\t(el as HTMLInputElement).type = 'password';\n\t\t});\n\t}\n\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tif (this.isMultiple) {\n\t\t\tthis.el\n\t\t\t\t.closest('[data-hs-toggle-password-group]')\n\t\t\t\t.classList.remove('active');\n\t\t} else {\n\t\t\tthis.el.classList.remove('active');\n\t\t}\n\n\t\t// Remove attributes\n\t\t(this.target as HTMLInputElement[]).forEach((el) => {\n\t\t\t(el as HTMLInputElement).type = 'password';\n\t\t});\n\n\t\t// Remove listeners\n\t\tthis.el.removeEventListener(this.eventType, this.onElementActionListener);\n\n\t\tthis.isShown = false;\n\n\t\twindow.$hsTogglePasswordCollection =\n\t\t\twindow.$hsTogglePasswordCollection.filter(\n\t\t\t\t({ element }) => element.el !== this.el,\n\t\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsTogglePasswordCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsTogglePasswordCollection)\n\t\t\twindow.$hsTogglePasswordCollection = [];\n\n\t\tif (window.$hsTogglePasswordCollection)\n\t\t\twindow.$hsTogglePasswordCollection =\n\t\t\t\twindow.$hsTogglePasswordCollection.filter(({ element }) =>\n\t\t\t\t\tdocument.contains(element.el),\n\t\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[data-hs-toggle-password]:not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLInputElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsTogglePasswordCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSTogglePassword(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSTogglePassword: Function;\n\t\t$hsTogglePasswordCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSTogglePassword.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Toggle password collection:', window.$hsTogglePasswordCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSTogglePassword = HSTogglePassword;\n}\n\nexport default HSTogglePassword;\n", "/*\n * HSTooltip\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { createPopper, PositioningStrategy, Instance } from '@popperjs/core';\nimport { getClassProperty, dispatch, afterTransition } from '../../utils';\n\nimport { ITooltip } from './interfaces';\nimport { TTooltipOptionsScope } from './types';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { POSITIONS } from '../../constants';\n\nclass HSTooltip extends HSBasePlugin<{}> implements ITooltip {\n\tprivate readonly toggle: HTMLElement | null;\n\tpublic content: HTMLElement | null;\n\treadonly eventMode: string;\n\tprivate readonly preventPopper: string;\n\tprivate popperInstance: Instance | null;\n\tprivate readonly placement: string;\n\tprivate readonly strategy: PositioningStrategy;\n\tprivate readonly scope: TTooltipOptionsScope;\n\n\tprivate onToggleClickListener: () => void;\n\tprivate onToggleFocusListener: () => void;\n\tprivate onToggleMouseEnterListener: () => void;\n\tprivate onToggleMouseLeaveListener: () => void;\n\tprivate onToggleHandleListener: () => void;\n\n\tconstructor(el: HTMLElement, options?: {}, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tif (this.el) {\n\t\t\tthis.toggle = this.el.querySelector('.hs-tooltip-toggle') || this.el;\n\t\t\tthis.content = this.el.querySelector('.hs-tooltip-content');\n\t\t\tthis.eventMode = getClassProperty(this.el, '--trigger') || 'hover';\n\t\t\tthis.preventPopper = getClassProperty(\n\t\t\t\tthis.el,\n\t\t\t\t'--prevent-popper',\n\t\t\t\t'false',\n\t\t\t);\n\t\t\tthis.placement = getClassProperty(this.el, '--placement');\n\t\t\tthis.strategy = getClassProperty(\n\t\t\t\tthis.el,\n\t\t\t\t'--strategy',\n\t\t\t) as PositioningStrategy;\n\t\t\tthis.scope = getClassProperty(this.el, '--scope') as TTooltipOptionsScope || 'parent';\n\t\t}\n\n\t\tif (this.el && this.toggle && this.content) this.init();\n\t}\n\n\tprivate toggleClick() {\n\t\tthis.click();\n\t}\n\n\tprivate toggleFocus() {\n\t\tthis.focus();\n\t}\n\n\tprivate toggleMouseEnter() {\n\t\tthis.enter();\n\t}\n\n\tprivate toggleMouseLeave() {\n\t\tthis.leave();\n\t}\n\n\tprivate toggleHandle() {\n\t\tthis.hide();\n\n\t\tthis.toggle.removeEventListener('click', this.onToggleHandleListener, true);\n\t\tthis.toggle.removeEventListener('blur', this.onToggleHandleListener, true);\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsTooltipCollection, this);\n\n\t\tif (this.eventMode === 'click') {\n\t\t\tthis.onToggleClickListener = () => this.toggleClick();\n\n\t\t\tthis.toggle.addEventListener('click', this.onToggleClickListener);\n\t\t} else if (this.eventMode === 'focus') {\n\t\t\tthis.onToggleFocusListener = () => this.toggleFocus();\n\n\t\t\tthis.toggle.addEventListener('click', this.onToggleFocusListener);\n\t\t} else if (this.eventMode === 'hover') {\n\t\t\tthis.onToggleMouseEnterListener = () => this.toggleMouseEnter();\n\t\t\tthis.onToggleMouseLeaveListener = () => this.toggleMouseLeave();\n\n\t\t\tthis.toggle.addEventListener(\n\t\t\t\t'mouseenter',\n\t\t\t\tthis.onToggleMouseEnterListener,\n\t\t\t);\n\t\t\tthis.toggle.addEventListener(\n\t\t\t\t'mouseleave',\n\t\t\t\tthis.onToggleMouseLeaveListener,\n\t\t\t);\n\t\t}\n\n\t\tif (this.preventPopper === 'false') this.buildPopper();\n\t}\n\n\tprivate enter() {\n\t\tthis._show();\n\t}\n\n\tprivate leave() {\n\t\tthis.hide();\n\t}\n\n\tprivate click() {\n\t\tif (this.el.classList.contains('show')) return false;\n\n\t\tthis._show();\n\n\t\tthis.onToggleHandleListener = () => {\n\t\t\tsetTimeout(() => this.toggleHandle());\n\t\t};\n\n\t\tthis.toggle.addEventListener('click', this.onToggleHandleListener, true);\n\t\tthis.toggle.addEventListener('blur', this.onToggleHandleListener, true);\n\t}\n\n\tprivate focus() {\n\t\tthis._show();\n\n\t\tconst handle = () => {\n\t\t\tthis.hide();\n\n\t\t\tthis.toggle.removeEventListener('blur', handle, true);\n\t\t};\n\n\t\tthis.toggle.addEventListener('blur', handle, true);\n\t}\n\n\tprivate buildPopper() {\n\t\tif (this.scope === 'window') document.body.appendChild(this.content);\n\n\t\tthis.popperInstance = createPopper(this.toggle, this.content, {\n\t\t\tplacement: POSITIONS[this.placement] || 'top',\n\t\t\tstrategy: this.strategy || 'fixed',\n\t\t\tmodifiers: [\n\t\t\t\t{\n\t\t\t\t\tname: 'offset',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\toffset: [0, 5],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t});\n\t}\n\n\tprivate _show() {\n\t\tthis.content.classList.remove('hidden');\n\t\tif (this.scope === 'window') this.content.classList.add('show');\n\n\t\tif (this.preventPopper === 'false') {\n\t\t\tthis.popperInstance.setOptions((options) => ({\n\t\t\t\t...options,\n\t\t\t\tmodifiers: [\n\t\t\t\t\t...options.modifiers,\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'eventListeners',\n\t\t\t\t\t\tenabled: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}));\n\n\t\t\tthis.popperInstance.update();\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tthis.el.classList.add('show');\n\n\t\t\tthis.fireEvent('show', this.el);\n\t\t\tdispatch('show.hs.tooltip', this.el, this.el);\n\t\t});\n\t}\n\n\t// Public methods\n\tpublic show() {\n\t\tswitch (this.eventMode) {\n\t\t\tcase 'click':\n\t\t\t\tthis.click();\n\t\t\t\tbreak;\n\t\t\tcase 'focus':\n\t\t\t\tthis.focus();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.enter();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.toggle.focus();\n\t\tthis.toggle.style.outline = 'none';\n\t}\n\n\tpublic hide() {\n\t\tthis.el.classList.remove('show');\n\t\tif (this.scope === 'window') this.content.classList.remove('show');\n\n\t\tif (this.preventPopper === 'false') {\n\t\t\tthis.popperInstance.setOptions((options) => ({\n\t\t\t\t...options,\n\t\t\t\tmodifiers: [\n\t\t\t\t\t...options.modifiers,\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'eventListeners',\n\t\t\t\t\t\tenabled: false,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}));\n\t\t}\n\n\t\tthis.fireEvent('hide', this.el);\n\t\tdispatch('hide.hs.tooltip', this.el, this.el);\n\n\t\tafterTransition(this.content, () => {\n\t\t\tif (this.el.classList.contains('show')) return false;\n\n\t\t\tthis.content.classList.add('hidden');\n\t\t\tthis.toggle.style.outline = '';\n\t\t});\n\t}\n\n\tpublic destroy() {\n\t\t// Remove classes\n\t\tthis.el.classList.remove('show');\n\t\tthis.content.classList.add('hidden');\n\n\t\t// Remove listeners\n\t\tif (this.eventMode === 'click') {\n\t\t\tthis.toggle.removeEventListener('click', this.onToggleClickListener);\n\t\t} else if (this.eventMode === 'focus') {\n\t\t\tthis.toggle.removeEventListener('click', this.onToggleFocusListener);\n\t\t} else if (this.eventMode === 'hover') {\n\t\t\tthis.toggle.removeEventListener(\n\t\t\t\t'mouseenter',\n\t\t\t\tthis.onToggleMouseEnterListener,\n\t\t\t);\n\t\t\tthis.toggle.removeEventListener(\n\t\t\t\t'mouseleave',\n\t\t\t\tthis.onToggleMouseLeaveListener,\n\t\t\t);\n\t\t}\n\t\tthis.toggle.removeEventListener('click', this.onToggleHandleListener, true);\n\t\tthis.toggle.removeEventListener('blur', this.onToggleHandleListener, true);\n\n\t\tthis.popperInstance.destroy();\n\t\tthis.popperInstance = null;\n\n\t\twindow.$hsTooltipCollection = window.$hsTooltipCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\t}\n\n\t// Static methods\n\tprivate static findInCollection(target: HSTooltip | HTMLElement | string): ICollectionItem | null {\n\t\treturn window.$hsTooltipCollection.find((el) => {\n\t\t\tif (target instanceof HSTooltip) return el.element.el === target.el;\n\t\t\telse if (typeof target === 'string') return el.element.el === document.querySelector(target);\n\t\t\telse return el.element.el === target;\n\t\t}) || null;\n\t}\n\n\tstatic getInstance(target: HTMLElement | string, isInstance = false) {\n\t\tconst elInCollection = window.$hsTooltipCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsTooltipCollection) window.$hsTooltipCollection = [];\n\n\t\tif (window.$hsTooltipCollection)\n\t\t\twindow.$hsTooltipCollection = window.$hsTooltipCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-tooltip:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsTooltipCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSTooltip(el);\n\t\t\t});\n\t}\n\n\tstatic show(target: HSTooltip | HTMLElement | string) {\n\t\tconst instance = HSTooltip.findInCollection(target);\n\n\t\tif (instance) instance.element.show();\n\t}\n\n\tstatic hide(target: HSTooltip | HTMLElement | string) {\n\t\tconst instance = HSTooltip.findInCollection(target);\n\n\t\tif (instance) instance.element.hide();\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HSTooltip | HTMLElement | string, cb: Function) {\n\t\tconst instance = HSTooltip.findInCollection(target);\n\n\t\tif (instance) instance.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSTooltip: Function;\n\t\t$hsTooltipCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSTooltip.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Tooltip collection:', window.$hsTooltipCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSTooltip = HSTooltip;\n}\n\nexport default HSTooltip;\n", "/*\n * HSTreeView\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport {\n\tITreeViewOptions,\n\tITreeView,\n\tITreeViewItem,\n\tITreeViewOptionsControlBy,\n} from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSTreeView extends HSBasePlugin implements ITreeView {\n\tprivate items: ITreeViewItem[] = [];\n\tprivate readonly controlBy: ITreeViewOptionsControlBy;\n\tprivate readonly autoSelectChildren: boolean;\n\tprivate readonly isIndeterminate: boolean;\n\tstatic group: number = 0;\n\n\tprivate onElementClickListener:\n\t\t| {\n\t\t\tel: Element;\n\t\t\tfn: (evt: PointerEvent) => void;\n\t\t}[]\n\t\t| null;\n\tprivate onControlChangeListener:\n\t\t| {\n\t\t\tel: Element;\n\t\t\tfn: () => void;\n\t\t}[]\n\t\t| null;\n\n\tconstructor(el: HTMLElement, options?: ITreeViewOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tconst data = el.getAttribute('data-hs-tree-view');\n\t\tconst dataOptions: ITreeView = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.controlBy = concatOptions?.controlBy || 'button';\n\t\tthis.autoSelectChildren = concatOptions?.autoSelectChildren || false;\n\t\tthis.isIndeterminate = concatOptions?.isIndeterminate || true;\n\n\t\tthis.onElementClickListener = [];\n\t\tthis.onControlChangeListener = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate elementClick(evt: PointerEvent, el: Element, data: ITreeViewItem) {\n\t\tevt.stopPropagation();\n\n\t\tif (el.classList.contains('disabled')) return false;\n\n\t\tif (!evt.metaKey && !evt.shiftKey) this.unselectItem(data);\n\t\tthis.selectItem(el, data);\n\n\t\tthis.fireEvent('click', {\n\t\t\tel,\n\t\t\tdata: data,\n\t\t});\n\t\tdispatch('click.hs.treeView', this.el, {\n\t\t\tel,\n\t\t\tdata: data,\n\t\t});\n\t}\n\n\tprivate controlChange(el: Element, data: ITreeViewItem) {\n\t\tif (this.autoSelectChildren) {\n\t\t\tthis.selectItem(el, data);\n\t\t\tif (data.isDir) this.selectChildren(el, data);\n\t\t\tthis.toggleParent(el);\n\t\t} else this.selectItem(el, data);\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsTreeViewCollection, this);\n\n\t\tHSTreeView.group += 1;\n\n\t\tthis.initItems();\n\t}\n\n\tprivate initItems() {\n\t\tthis.el.querySelectorAll('[data-hs-tree-view-item]').forEach((el, ind) => {\n\t\t\tconst data = JSON.parse(el.getAttribute('data-hs-tree-view-item'));\n\t\t\tif (!el.id) el.id = `tree-view-item-${HSTreeView.group}-${ind}`;\n\t\t\tconst concatData = {\n\t\t\t\t...data,\n\t\t\t\tid: data.id ?? el.id,\n\t\t\t\tpath: this.getPath(el),\n\t\t\t\tisSelected: data.isSelected ?? false,\n\t\t\t};\n\n\t\t\tthis.items.push(concatData);\n\n\t\t\tif (this.controlBy === 'checkbox') this.controlByCheckbox(el, concatData);\n\t\t\telse this.controlByButton(el, concatData);\n\t\t});\n\t}\n\n\tprivate controlByButton(el: Element, data: ITreeViewItem) {\n\t\tthis.onElementClickListener.push({\n\t\t\tel,\n\t\t\tfn: (evt: PointerEvent) => this.elementClick(evt, el, data),\n\t\t});\n\n\t\tel.addEventListener(\n\t\t\t'click',\n\t\t\tthis.onElementClickListener.find((elI) => elI.el === el).fn,\n\t\t);\n\t}\n\n\tprivate controlByCheckbox(el: Element, data: ITreeViewItem) {\n\t\tconst control = el.querySelector(`input[value=\"${data.value}\"]`);\n\n\t\tif (!!control) {\n\t\t\tthis.onControlChangeListener.push({\n\t\t\t\tel: control,\n\t\t\t\tfn: () => this.controlChange(el, data),\n\t\t\t});\n\n\t\t\tcontrol.addEventListener(\n\t\t\t\t'change',\n\t\t\t\tthis.onControlChangeListener.find((elI) => elI.el === control).fn,\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate getItem(id: string) {\n\t\treturn this.items.find((el) => el.id === id);\n\t}\n\n\tprivate getPath(el: Element) {\n\t\tconst path: any = [];\n\t\tlet parent = el.closest('[data-hs-tree-view-item]');\n\n\t\twhile (!!parent) {\n\t\t\tconst data = JSON.parse(parent.getAttribute('data-hs-tree-view-item'));\n\n\t\t\tpath.push(data.value);\n\n\t\t\tparent = parent.parentElement?.closest('[data-hs-tree-view-item]');\n\t\t}\n\n\t\treturn path.reverse().join('/');\n\t}\n\n\tprivate unselectItem(exception: ITreeViewItem | null = null) {\n\t\tlet selectedItems = this.getSelectedItems();\n\t\tif (exception)\n\t\t\tselectedItems = selectedItems.filter((el) => el.id !== exception.id);\n\n\t\tif (selectedItems.length) {\n\t\t\tselectedItems.forEach((el) => {\n\t\t\t\tconst selectedElement = document.querySelector(`#${el.id}`);\n\n\t\t\t\tselectedElement.classList.remove('selected');\n\t\t\t\tthis.changeItemProp(el.id, 'isSelected', false);\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate selectItem(el: Element, data: ITreeViewItem) {\n\t\tif (data.isSelected) {\n\t\t\tel.classList.remove('selected');\n\t\t\tthis.changeItemProp(data.id, 'isSelected', false);\n\t\t} else {\n\t\t\tel.classList.add('selected');\n\t\t\tthis.changeItemProp(data.id, 'isSelected', true);\n\t\t}\n\t}\n\n\tprivate selectChildren(el: Element, data: ITreeViewItem) {\n\t\tconst items = el.querySelectorAll('[data-hs-tree-view-item]');\n\n\t\tArray.from(items)\n\t\t\t.filter((elI) => !elI.classList.contains('disabled'))\n\t\t\t.forEach((elI) => {\n\t\t\t\tconst initialItemData = elI.id ? this.getItem(elI.id) : null;\n\n\t\t\t\tif (!initialItemData) return false;\n\n\t\t\t\tif (data.isSelected) {\n\t\t\t\t\telI.classList.add('selected');\n\t\t\t\t\tthis.changeItemProp(initialItemData.id, 'isSelected', true);\n\t\t\t\t} else {\n\t\t\t\t\telI.classList.remove('selected');\n\t\t\t\t\tthis.changeItemProp(initialItemData.id, 'isSelected', false);\n\t\t\t\t}\n\n\t\t\t\tconst currentItemData = this.getItem(elI.id);\n\t\t\t\tconst control: HTMLFormElement = elI.querySelector(\n\t\t\t\t\t`input[value=\"${currentItemData.value}\"]`,\n\t\t\t\t);\n\n\t\t\t\tif (this.isIndeterminate) control.indeterminate = false;\n\n\t\t\t\tif (currentItemData.isSelected) control.checked = true;\n\t\t\t\telse control.checked = false;\n\t\t\t});\n\t}\n\n\tprivate toggleParent(el: Element) {\n\t\tlet parent = el.parentElement?.closest('[data-hs-tree-view-item]');\n\n\t\twhile (!!parent) {\n\t\t\tconst items = parent.querySelectorAll(\n\t\t\t\t'[data-hs-tree-view-item]:not(.disabled)',\n\t\t\t);\n\t\t\tconst data = JSON.parse(parent.getAttribute('data-hs-tree-view-item'));\n\t\t\tconst control: HTMLFormElement = parent.querySelector(\n\t\t\t\t`input[value=\"${data.value}\"]`,\n\t\t\t);\n\t\t\tlet hasUnchecked = false;\n\t\t\tlet checkedItems = 0;\n\n\t\t\titems.forEach((elI) => {\n\t\t\t\tconst dataI = this.getItem(elI.id);\n\n\t\t\t\tif (dataI.isSelected) checkedItems += 1;\n\t\t\t\tif (!dataI.isSelected) hasUnchecked = true;\n\t\t\t});\n\n\t\t\tif (hasUnchecked) {\n\t\t\t\tparent.classList.remove('selected');\n\t\t\t\tthis.changeItemProp(parent.id, 'isSelected', false);\n\t\t\t\tcontrol.checked = false;\n\t\t\t} else {\n\t\t\t\tparent.classList.add('selected');\n\t\t\t\tthis.changeItemProp(parent.id, 'isSelected', true);\n\t\t\t\tcontrol.checked = true;\n\t\t\t}\n\n\t\t\tif (this.isIndeterminate) {\n\t\t\t\tif (checkedItems > 0 && checkedItems < items.length)\n\t\t\t\t\tcontrol.indeterminate = true;\n\t\t\t\telse control.indeterminate = false;\n\t\t\t}\n\n\t\t\tparent = parent.parentElement?.closest('[data-hs-tree-view-item]');\n\t\t}\n\t}\n\n\t// Public methods\n\tpublic update() {\n\t\tthis.items.map((el: ITreeViewItem) => {\n\t\t\tconst selector = document.querySelector(`#${el.id}`);\n\n\t\t\tif (el.path !== this.getPath(selector)) el.path = this.getPath(selector);\n\n\t\t\treturn el;\n\t\t});\n\t}\n\n\tpublic getSelectedItems() {\n\t\treturn this.items.filter((el) => el.isSelected);\n\t}\n\n\tpublic changeItemProp(id: string, prop: string, val: any) {\n\t\tthis.items.map((el) => {\n\t\t\t// @ts-ignore\n\t\t\tif (el.id === id) el[prop] = val;\n\n\t\t\treturn el;\n\t\t});\n\t}\n\n\tpublic destroy() {\n\t\t// Remove listeners\n\t\tthis.onElementClickListener.forEach(({ el, fn }) => {\n\t\t\tel.removeEventListener('click', fn);\n\t\t});\n\t\tif (this.onControlChangeListener.length)\n\t\t\tthis.onElementClickListener.forEach(({ el, fn }) => {\n\t\t\t\tel.removeEventListener('change', fn);\n\t\t\t});\n\n\t\tthis.unselectItem();\n\n\t\tthis.items = [];\n\n\t\twindow.$hsTreeViewCollection = window.$hsTreeViewCollection.filter(\n\t\t\t({ element }) => element.el !== this.el,\n\t\t);\n\n\t\tHSTreeView.group -= 1;\n\t}\n\n\t// Static methods\n\tprivate static findInCollection(target: HSTreeView | HTMLElement | string): ICollectionItem | null {\n\t\treturn window.$hsTreeViewCollection.find((el) => {\n\t\t\tif (target instanceof HSTreeView) return el.element.el === target.el;\n\t\t\telse if (typeof target === 'string') return el.element.el === document.querySelector(target);\n\t\t\telse return el.element.el === target;\n\t\t}) || null;\n\t}\n\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsTreeViewCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsTreeViewCollection) window.$hsTreeViewCollection = [];\n\n\t\tif (window.$hsTreeViewCollection)\n\t\t\twindow.$hsTreeViewCollection = window.$hsTreeViewCollection.filter(\n\t\t\t\t({ element }) => document.contains(element.el),\n\t\t\t);\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-tree-view]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsTreeViewCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSTreeView(el);\n\t\t\t});\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HSTreeView | HTMLElement | string, cb: Function) {\n\t\tconst instance = HSTreeView.findInCollection(target);\n\n\t\tconsole.log(1);\n\n\t\tif (instance) instance.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSTreeView: Function;\n\t\t$hsTreeViewCollection: ICollectionItem[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSTreeView.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Tree view collection:', window.$hsTreeViewCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSTreeView = HSTreeView;\n}\n\nexport default HSTreeView;\n", "/*\n * HSStaticMethods\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { getClassProperty, afterTransition } from '../utils';\nimport { COLLECTIONS } from '../spa/index';\nimport { IStaticMethods } from '../static/interfaces';\nimport { ICollectionItem } from '../interfaces';\nimport type HSCopyMarkup from '../plugins/copy-markup';\nimport type HSAccordion from '../plugins/accordion';\nimport type HSCarousel from '../plugins/carousel';\nimport type HSCollapse from '../plugins/collapse';\nimport type HSComboBox from '../plugins/combobox';\nimport type HSDataTable from '../plugins/datatable';\nimport type HSDropdown from '../plugins/dropdown';\nimport type HSFileUpload from '../plugins/file-upload';\nimport type HSInputNumber from '../plugins/input-number';\nimport type HSLayoutSplitter from '../plugins/layout-splitter';\nimport type HSOverlay from '../plugins/overlay';\nimport type HSPinInput from '../plugins/pin-input';\nimport type HSRangeSlider from '../plugins/range-slider';\nimport type HSRemoveElement from '../plugins/remove-element';\nimport type HSScrollspy from '../plugins/scrollspy';\nimport type HSSelect from '../plugins/select';\nimport type HSStepper from '../plugins/stepper';\nimport type HSStrongPassword from '../plugins/strong-password';\nimport type HSTabs from '../plugins/tabs';\nimport type HSTextareaAutoHeight from '../plugins/textarea-auto-height';\nimport type HSThemeSwitch from '../plugins/theme-switch';\nimport type HSToggleCount from '../plugins/toggle-count';\nimport type HSTogglePassword from '../plugins/toggle-password';\nimport type HSTooltip from '../plugins/tooltip';\nimport type HSTreeView from '../plugins/tree-view';\n\ndeclare global {\n\tinterface Window {\n\t\tHSStaticMethods: IStaticMethods;\n\t\t$hsCopyMarkupCollection: ICollectionItem[];\n\t\t$hsAccordionCollection: ICollectionItem[];\n\t\t$hsCarouselCollection: ICollectionItem[];\n\t\t$hsCollapseCollection: ICollectionItem[];\n\t\t$hsComboBoxCollection: ICollectionItem[];\n\t\t$hsDataTableCollection: ICollectionItem[];\n\t\t$hsDropdownCollection: ICollectionItem[];\n\t\t$hsFileUploadCollection: ICollectionItem[];\n\t\t$hsInputNumberCollection: { id: number; element: HSInputNumber }[];\n\t\t$hsLayoutSplitterCollection: ICollectionItem[];\n\t\t$hsOverlayCollection: ICollectionItem[];\n\t\t$hsPinInputCollection: ICollectionItem[];\n\t\t$hsRangeSliderCollection: ICollectionItem[];\n\t\t$hsRemoveElementCollection: ICollectionItem[];\n\t\t$hsScrollspyCollection: ICollectionItem[];\n\t\t$hsSelectCollection: ICollectionItem[];\n\t\t$hsStepperCollection: ICollectionItem[];\n\t\t$hsStrongPasswordCollection: ICollectionItem[];\n\t\t$hsTabsCollection: ICollectionItem[];\n\t\t$hsTextareaAutoHeightCollection: ICollectionItem[];\n\t\t$hsThemeSwitchCollection: ICollectionItem[];\n\t\t$hsToggleCountCollection: ICollectionItem[];\n\t\t$hsTogglePasswordCollection: ICollectionItem[];\n\t\t$hsTooltipCollection: ICollectionItem[];\n\t\t$hsTreeViewCollection: ICollectionItem[];\n\t}\n}\n\nconst HSStaticMethods: IStaticMethods = {\n\tgetClassProperty,\n\tafterTransition,\n\tautoInit(collection: string | string[] = 'all') {\n\t\tif (collection === 'all') {\n\t\t\tCOLLECTIONS.forEach(({ fn }) => {\n\t\t\t\tfn?.autoInit();\n\t\t\t});\n\t\t} else {\n\t\t\tCOLLECTIONS.forEach(({ key, fn }) => {\n\t\t\t\tif (collection.includes(key)) fn?.autoInit();\n\t\t\t});\n\t\t}\n\t},\n\tcleanCollection(name: string | string[] = 'all') {\n\t\tif (name === 'all') {\n\t\t\tCOLLECTIONS.forEach(({ collection }) => {\n\t\t\t\tif ((window as any)[collection] instanceof Array) {\n\t\t\t\t\t(window as any)[collection] = [];\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tCOLLECTIONS.forEach(({ key, collection }) => {\n\t\t\t\tif (\n\t\t\t\t\tname.includes(key) &&\n\t\t\t\t\t(window as any)[collection] instanceof Array\n\t\t\t\t) {\n\t\t\t\t\t(window as any)[collection] = [];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n};\n\nif (typeof window !== 'undefined') {\n\twindow.HSStaticMethods = HSStaticMethods;\n}\n\nexport default HSStaticMethods;\n", "/*\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { ISpaCollectionItem } from '../spa/interfaces';\n\nimport HSCopyMarkup from '../plugins/copy-markup';\nimport HSAccordion from '../plugins/accordion';\nimport HSCarousel from '../plugins/carousel';\nimport HSCollapse from '../plugins/collapse';\nimport HSComboBox from '../plugins/combobox';\nimport HSDataTable from '../plugins/datatable';\nimport HSDropdown from '../plugins/dropdown';\nimport HSFileUpload from '../plugins/file-upload';\nimport HSLayoutSplitter from '../plugins/layout-splitter';\nimport HSInputNumber from '../plugins/input-number';\nimport HSOverlay from '../plugins/overlay';\nimport HSPinInput from '../plugins/pin-input';\nimport HSRangeSlider from '../plugins/range-slider';\nimport HSRemoveElement from '../plugins/remove-element';\nimport HSScrollspy from '../plugins/scrollspy';\nimport HSSelect from '../plugins/select';\nimport HSStepper from '../plugins/stepper';\nimport HSStrongPassword from '../plugins/strong-password';\nimport HSTabs from '../plugins/tabs';\nimport HSTextareaAutoHeight from '../plugins/textarea-auto-height';\nimport HSThemeSwitch from '../plugins/theme-switch';\nimport HSToggleCount from '../plugins/toggle-count';\nimport HSTogglePassword from '../plugins/toggle-password';\nimport HSTooltip from '../plugins/tooltip';\nimport HSTreeView from '../plugins/tree-view';\n\nexport const COLLECTIONS: ISpaCollectionItem[] = [\n\t{\n\t\tkey: 'copy-markup',\n\t\tfn: HSCopyMarkup,\n\t\tcollection: '$hsCopyMarkupCollection',\n\t},\n\t{ key: 'accordion', fn: HSAccordion, collection: '$hsAccordionCollection' },\n\t{ key: 'carousel', fn: HSCarousel, collection: '$hsCarouselCollection' },\n\t{ key: 'collapse', fn: HSCollapse, collection: '$hsCollapseCollection' },\n\t{ key: 'combobox', fn: HSComboBox, collection: '$hsComboBoxCollection' },\n\t{ key: 'datatable', fn: HSDataTable, collection: '$hsDataTableCollection' },\n\t{ key: 'dropdown', fn: HSDropdown, collection: '$hsDropdownCollection' },\n\t{\n\t\tkey: 'file-upload',\n\t\tfn: HSFileUpload,\n\t\tcollection: '$hsFileUploadCollection',\n\t},\n\t{\n\t\tkey: 'input-number',\n\t\tfn: HSInputNumber,\n\t\tcollection: '$hsInputNumberCollection',\n\t},\n\t{\n\t\tkey: 'layout-splitter',\n\t\tfn: HSLayoutSplitter,\n\t\tcollection: '$hsLayoutSplitterCollection',\n\t},\n\t{ key: 'overlay', fn: HSOverlay, collection: '$hsOverlayCollection' },\n\t{ key: 'pin-input', fn: HSPinInput, collection: '$hsPinInputCollection' },\n\t{\n\t\tkey: 'range-slider',\n\t\tfn: HSRangeSlider,\n\t\tcollection: '$hsRangeSliderCollection',\n\t},\n\t{\n\t\tkey: 'remove-element',\n\t\tfn: HSRemoveElement,\n\t\tcollection: '$hsRemoveElementCollection',\n\t},\n\t{ key: 'scrollspy', fn: HSScrollspy, collection: '$hsScrollspyCollection' },\n\t{ key: 'select', fn: HSSelect, collection: '$hsSelectCollection' },\n\t{ key: 'stepper', fn: HSStepper, collection: '$hsStepperCollection' },\n\t{\n\t\tkey: 'strong-password',\n\t\tfn: HSStrongPassword,\n\t\tcollection: '$hsStrongPasswordCollection',\n\t},\n\t{ key: 'tabs', fn: HSTabs, collection: '$hsTabsCollection' },\n\t{\n\t\tkey: 'textarea-auto-height',\n\t\tfn: HSTextareaAutoHeight,\n\t\tcollection: '$hsTextareaAutoHeightCollection',\n\t},\n\t{\n\t\tkey: 'theme-switch',\n\t\tfn: HSThemeSwitch,\n\t\tcollection: '$hsThemeSwitchCollection',\n\t},\n\t{\n\t\tkey: 'toggle-count',\n\t\tfn: HSToggleCount,\n\t\tcollection: '$hsToggleCountCollection',\n\t},\n\t{\n\t\tkey: 'toggle-password',\n\t\tfn: HSTogglePassword,\n\t\tcollection: '$hsTogglePasswordCollection',\n\t},\n\t{ key: 'tooltip', fn: HSTooltip, collection: '$hsTooltipCollection' },\n\t{ key: 'tree-view', fn: HSTreeView, collection: '$hsTreeViewCollection' },\n];\n", "/*\n * @version: 2.7.0\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\ndeclare var _: any;\ndeclare var DataTable: any;\ndeclare var Dropzone: any;\ndeclare var noUiSlider: any;\n\nlet HSDataTableModule;\nlet HSFileUploadModule;\nlet HSRangeSliderModule;\n\nexport { default as HSCopyMarkup } from './plugins/copy-markup';\nexport { default as HSAccordion } from './plugins/accordion';\nexport { default as HSCarousel } from './plugins/carousel';\nexport { default as HSCollapse } from './plugins/collapse';\nexport { default as HSComboBox } from './plugins/combobox';\nexport { default as HSDropdown } from './plugins/dropdown';\nexport { default as HSInputNumber } from './plugins/input-number';\nexport { default as HSLayoutSplitter } from './plugins/layout-splitter';\nexport { default as HSOverlay } from './plugins/overlay';\nexport { default as HSPinInput } from './plugins/pin-input';\nexport { default as HSRemoveElement } from './plugins/remove-element';\nexport { default as HSScrollspy } from './plugins/scrollspy';\nexport { default as HSSelect } from './plugins/select';\nexport { default as HSStepper } from './plugins/stepper';\nexport { default as HSStrongPassword } from './plugins/strong-password';\nexport { default as HSTabs } from './plugins/tabs';\nexport { default as HSTextareaAutoHeight } from './plugins/textarea-auto-height';\nexport { default as HSThemeSwitch } from './plugins/theme-switch';\nexport { default as HSToggleCount } from './plugins/toggle-count';\nexport { default as HSTogglePassword } from './plugins/toggle-password';\nexport { default as HSTooltip } from './plugins/tooltip';\nexport { default as HSTreeView } from './plugins/tree-view';\nexport { default as HSStaticMethods } from './static';\n\nif (typeof DataTable !== 'undefined' && typeof jQuery !== 'undefined')\n\tHSDataTableModule = require('./plugins/datatable').default;\nelse HSDataTableModule = null;\nexport { HSDataTableModule as HSDataTable };\n\nif (typeof _ !== 'undefined' && typeof Dropzone !== 'undefined')\n\tHSFileUploadModule = require('./plugins/file-upload').default;\nelse HSFileUploadModule = null;\nexport { HSFileUploadModule as HSFileUpload };\n\nif (typeof noUiSlider !== 'undefined')\n\tHSRangeSliderModule = require('./plugins/range-slider').default;\nelse HSRangeSliderModule = null;\nexport { HSRangeSliderModule as HSRangeSlider };\n", "import \"preline\";\n\n// Need to import ClipboardJS from the window object so that helpers can use it\nimport ClipboardJS from \"clipboard\";\nwindow.ClipboardJS = ClipboardJS;\nimport \"./clipboard-helpers\";\n"], "mappings": "uqBAAA,IAOMA,GAIAC,EAOAC,GAuCAC,GAYAC,GAQAC,GAUAC,GA4BAC,GAQAC,GAUAC,GAmBAC,GAYAC,EAWAC,EAqBAC,EAQAC,EAYAC,GAxNNC,EAAAC,GAAA,KAOMjB,GAAmBkB,GACjBA,IAAW,OAGbjB,EAAmB,CAACkB,EAAiBC,EAAcC,EAAM,MACtD,OA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CAE3CI,EAAK,SAASD,CAAG,GAChB,OAAeH,CAAU,YAAa,QAEtC,OAAeA,CAAU,EAAI,CAAC,EAEjC,CAAC,CAEH,CACD,EAEI,OAAO,OAAW,MACrB,OAAO,gBAAkBH,IE5F1B,IAAIQ,GACAC,GACAC,GA0BA,OAAO,UAAc,KAAe,OAAO,OAAW,IACzDF,GAAoB,cAA+B,QAC/CA,GAAoB,KAGrB,OAAO,EAAM,KAAe,OAAO,SAAa,IACnDG,GAAqB,cAAiC,QAClDA,GAAqB,KAGtB,OAAO,WAAe,IACzBC,GAAsB,cAAkC,QACpDA,GAAsB,KCjD3B,IAAAC,GAAwB,SAExBC,GAAO,SADP,OAAO,YAAc,GAAAC", "names": ["stringToBoolean", "getClassProperty", "getClassPropertyAlt", "isIOS", "isIpadOS", "isDirectChild", "isEnoughSpace", "isFormElement", "isParentOrElementHidden", "isJson", "debounce", "dispatch", "afterTransition", "htmlToElement", "classToClassList", "menuSearchHistory", "init_utils", "__esmMin", "string", "el", "prop", "val", "targetClass", "c", "parent", "child", "children", "toggle", "preferredPosition", "space", "wrapper", "referenceRect", "wrapperRect", "viewportHeight", "spaceAbove", "spaceBelow", "minimumSpaceRequired", "target", "element", "str", "firstChar", "lastChar", "func", "timeout", "timer", "args", "evt", "payload", "event", "callback", "handleEvent", "computedStyle", "transitionDuration", "html", "template", "classes", "splitter", "action", "cl", "index", "HSBasePlugin", "init_base_plugin", "__esmMin", "el", "options", "events", "collection", "element", "evt", "payload", "cb", "datatable_exports", "__export", "datatable_default", "HSDataTable", "init_datatable", "__esmMin", "init_utils", "init_base_plugin", "_HSDataTable", "HSBasePlugin", "el", "options", "events", "columnDefs", "th", "ind", "data", "dataOptions", "evt", "count", "debounce", "search", "val", "pageEntity", "entities", "target", "otherEntities", "hsSelectInstance", "infoFrom", "start", "infoTo", "end", "infoLength", "recordsTotal", "pages", "pagingPrev", "statement", "pagingNext", "pagingPages", "page", "length", "totalRecords", "totalPages", "currentPage", "startPage", "endPage", "htmlToElement", "i", "counter", "pageEl", "classToClassList", "singlePaging", "isChecked", "checkbox", "fn", "element", "isInstance", "elInCollection", "elC", "file_upload_exports", "__export", "file_upload_default", "HSFileUpload", "init_file_upload", "__esmMin", "init_utils", "init_base_plugin", "_HSFileUpload", "HSBasePlugin", "el", "options", "events", "data", "dataOptions", "event", "file", "newFile", "dzNewFile", "evt", "tempFileInput", "clear", "pseudoTriggers", "progress", "element", "previewElement", "reloadButton", "fileInfo", "fileName", "fileExt", "fileSize", "fileIcon", "trigger", "preview", "remove", "progressBar", "progressBarPane", "progressBarValue", "currentProgress", "ext", "icon", "htmlToElement", "classToClassList", "size", "dotIndex", "target", "isInstance", "elInCollection", "elC", "range_slider_exports", "__export", "range_slider_default", "HSRangeSlider", "init_range_slider", "__esmMin", "init_base_plugin", "_HSRangeSlider", "HSBasePlugin", "el", "options", "events", "data", "dataOptions", "values", "updateValues", "val", "cl", "mergedClasses", "key", "result", "element", "target", "isInstance", "elInCollection", "elC", "require_clipboard", "__commonJSMin", "exports", "module", "root", "factory", "__webpack_modules__", "__unused_webpack_module", "__webpack_exports__", "__webpack_require__", "clipboard", "tiny_emitter", "tiny_emitter_default", "listen", "listen_default", "src_select", "select_default", "command", "type", "ClipboardActionCut", "target", "selectedText", "actions_cut", "createFakeElement", "value", "isRTL", "fakeElement", "yPosition", "fakeCopyAction", "options", "ClipboardActionCopy", "actions_copy", "_typeof", "obj", "ClipboardActionDefault", "_options$action", "action", "container", "text", "actions_default", "clipboard_typeof", "_classCallCheck", "instance", "Constructor", "_defineProperties", "props", "i", "descriptor", "_createClass", "protoProps", "staticProps", "_inherits", "subClass", "superClass", "_setPrototypeOf", "o", "p", "_createSuper", "Derived", "hasNativeReflectConstruct", "_isNativeReflectConstruct", "Super", "_getPrototypeOf", "result", "NewTarget", "_possibleConstructorReturn", "self", "call", "_assertThisInitialized", "getAttributeValue", "suffix", "element", "attribute", "Clipboard", "_Emitter", "_super", "trigger", "_this", "_this2", "e", "selector", "actions", "support", "DOCUMENT_NODE_TYPE", "proto", "closest", "__unused_webpack_exports", "_delegate", "callback", "useCapture", "listenerFn", "listener", "delegate", "elements", "is", "listenNode", "listenNodeList", "listenSelector", "node", "nodeList", "select", "isReadOnly", "selection", "range", "E", "name", "ctx", "data", "evtArr", "len", "evts", "liveEvents", "__webpack_module_cache__", "moduleId", "getter", "definition", "key", "prop", "require_clipboard_helpers", "__commonJSMin", "exports", "module", "e", "t", "o", "n", "i", "r", "l", "init_utils", "init_base_plugin", "HSCopyMarkup", "_HSCopyMarkup", "HSBasePlugin", "el", "options", "data", "concatOptions", "item", "copiedElement", "dispatch", "target", "deleteItemButton", "index", "deleteItemButtons", "element", "isInstance", "elInCollection", "elC", "copy_markup_default", "init_utils", "init_base_plugin", "HSAccordion", "_HSAccordion", "HSBasePlugin", "el", "options", "events", "stringToBoolean", "getClassProperty", "evt", "afterTransition", "dispatch", "item", "listener", "element", "target", "elC", "isInstance", "elInCollection", "instance", "style", "data", "_el", "root", "cb", "accordion_default", "init_utils", "init_base_plugin", "POSITIONS", "DROPDOWN_ACCESSIBILITY_KEY_SET", "TABS_ACCESSIBILITY_KEY_SET", "SELECT_ACCESSIBILITY_KEY_SET", "COMBO_BOX_ACCESSIBILITY_KEY_SET", "BREAKPOINTS", "HSCarousel", "_HSCarousel", "HSBasePlugin", "el", "options", "data", "concatOptions", "containerRect", "containerCenter", "closestElement", "closestElementIndex", "closestDistance", "child", "childRect", "innerContainerRect", "childCenter", "distance", "evt", "ind", "scrollableElement", "transformMatrix", "matrixValues", "translateX", "deltaX", "newTranslateX", "newTranslateXFunc", "calcWidth", "containerWidth", "itemWidth", "centeredOffset", "limitStart", "limitEnd", "currentTranslateX", "closestIndex", "event", "windowWidth", "currentRes", "key", "BREAKPOINTS", "existingBefore", "existingAfter", "spacerWidth", "before", "htmlToElement", "after", "slidesQty", "i", "singleDot", "dot", "targetIndex", "container", "containerScrollLeft", "containerScrollTop", "containerHeight", "item", "itemRect", "itemLeft", "itemRight", "itemTop", "itemBottom", "scrollLeft", "scrollTop", "classToClassList", "debounce", "entries", "entry", "newWidth", "itemsQty", "slide", "maxIndex", "toggleDotActive", "statement", "gapValue", "currentIndex", "statementPrev", "statementNext", "start", "end", "currentIdx", "val", "maxScrollLeft", "index", "width", "element", "target", "isInstance", "elInCollection", "elC", "carousel_default", "init_utils", "init_base_plugin", "HSCollapse", "_HSCollapse", "HSBasePlugin", "el", "options", "events", "dispatch", "afterTransition", "element", "target", "isInstance", "elInCollection", "elC", "instance", "evt", "cb", "collapse_default", "init_utils", "init_base_plugin", "HSComboBox", "_HSComboBox", "HSBasePlugin", "el", "options", "events", "data", "concatOptions", "evt", "val", "obj", "path", "acc", "key", "dispatch", "value", "_value", "groups", "item", "group", "items", "f", "g", "lowerCased", "v", "elI", "cur", "compareFn", "i1", "i2", "a", "b", "debounce", "htmlToElement", "index", "newItem", "hideIfEmpty", "attr", "title", "tabsScroll", "tabsWrapper", "tabDef", "selectedTab", "tab", "query", "searchQuery", "searchPath", "url", "newItems", "i", "afterTransition", "isEnoughSpace", "element", "target", "isInstance", "elInCollection", "evtTarget", "elC", "currentlyOpened", "isReversed", "output", "prev", "current", "input", "COMBO_BOX_ACCESSIBILITY_KEY_SET", "isArrowUp", "currentItem", "currentInd", "isStart", "opened", "isParentOrElementHidden", "link", "combobox_default", "init_utils", "top", "bottom", "right", "left", "auto", "basePlacements", "start", "end", "clippingParents", "viewport", "popper", "reference", "variationPlacements", "acc", "placement", "placements", "beforeRead", "read", "afterRead", "beforeMain", "main", "afterMain", "beforeWrite", "write", "afterWrite", "modifierPhases", "getNodeName", "element", "getWindow", "node", "ownerDocument", "isElement", "node", "OwnElement", "getWindow", "isHTMLElement", "isShadowRoot", "applyStyles", "_ref", "state", "name", "style", "attributes", "element", "isHTMLElement", "getNodeName", "value", "effect", "_ref2", "initialStyles", "styleProperties", "property", "attribute", "applyStyles_default", "getBasePlacement", "placement", "max", "min", "round", "getUAString", "uaData", "item", "isLayoutViewport", "getUAString", "getBoundingClientRect", "element", "includeScale", "isFixedStrategy", "clientRect", "scaleX", "scaleY", "isHTMLElement", "round", "_ref", "isElement", "getWindow", "visualViewport", "addVisualOffsets", "isLayoutViewport", "x", "y", "width", "height", "getLayoutRect", "element", "clientRect", "getBoundingClientRect", "width", "height", "contains", "parent", "child", "rootNode", "isShadowRoot", "next", "getComputedStyle", "element", "getWindow", "isTableElement", "element", "getNodeName", "getDocumentElement", "element", "isElement", "getParentNode", "element", "getNodeName", "isShadowRoot", "getDocumentElement", "getTrueOffsetParent", "element", "isHTMLElement", "getComputedStyle", "getContainingBlock", "isFirefox", "getUAString", "isIE", "elementCss", "currentNode", "getParentNode", "isShadowRoot", "getNodeName", "css", "getOffsetParent", "window", "getWindow", "offsetParent", "isTableElement", "getMainAxisFromPlacement", "placement", "within", "min", "value", "max", "withinMaxClamp", "v", "getFreshSideObject", "mergePaddingObject", "paddingObject", "getFreshSideObject", "expandToHashMap", "value", "keys", "hashMap", "key", "toPaddingObject", "padding", "state", "mergePaddingObject", "expandToHashMap", "basePlacements", "arrow", "_ref", "_state$modifiersData$", "name", "options", "arrowElement", "popperOffsets", "basePlacement", "getBasePlacement", "axis", "getMainAxisFromPlacement", "isVertical", "left", "right", "len", "paddingObject", "arrowRect", "getLayoutRect", "minProp", "top", "maxProp", "bottom", "endDiff", "startDiff", "arrowOffsetParent", "getOffsetParent", "clientSize", "centerToReference", "min", "max", "center", "offset", "within", "axisProp", "effect", "_ref2", "_options$element", "contains", "arrow_default", "getVariation", "placement", "unsetSides", "roundOffsetsByDPR", "_ref", "win", "x", "y", "dpr", "round", "mapToStyles", "_ref2", "_Object$assign2", "popper", "popperRect", "placement", "variation", "offsets", "position", "gpuAcceleration", "adaptive", "roundOffsets", "isFixed", "_offsets$x", "_offsets$y", "_ref3", "hasX", "hasY", "sideX", "left", "sideY", "top", "offsetParent", "getOffsetParent", "heightProp", "widthProp", "getWindow", "getDocumentElement", "getComputedStyle", "right", "end", "bottom", "offsetY", "offsetX", "commonStyles", "_ref4", "_Object$assign", "computeStyles", "_ref5", "state", "options", "_options$gpuAccelerat", "_options$adaptive", "_options$roundOffsets", "getBasePlacement", "getVariation", "computeStyles_default", "passive", "effect", "_ref", "state", "instance", "options", "_options$scroll", "scroll", "_options$resize", "resize", "window", "getWindow", "scrollParents", "scrollParent", "eventListeners_default", "hash", "getOppositePlacement", "placement", "matched", "hash", "getOppositeVariationPlacement", "placement", "matched", "getWindowScroll", "node", "win", "getWindow", "scrollLeft", "scrollTop", "getWindowScrollBarX", "element", "getBoundingClientRect", "getDocumentElement", "getWindowScroll", "getViewportRect", "element", "strategy", "win", "getWindow", "html", "getDocumentElement", "visualViewport", "width", "height", "x", "y", "layoutViewport", "isLayoutViewport", "getWindowScrollBarX", "getDocumentRect", "element", "_element$ownerDocumen", "html", "getDocumentElement", "winScroll", "getWindowScroll", "body", "width", "max", "height", "x", "getWindowScrollBarX", "y", "getComputedStyle", "isScrollParent", "element", "_getComputedStyle", "getComputedStyle", "overflow", "overflowX", "overflowY", "getScrollParent", "node", "getNodeName", "isHTMLElement", "isScrollParent", "getParentNode", "listScrollParents", "element", "list", "_element$ownerDocumen", "scrollParent", "getScrollParent", "isBody", "win", "getWindow", "target", "isScrollParent", "updatedList", "getParentNode", "rectToClientRect", "rect", "getInnerBoundingClientRect", "element", "strategy", "rect", "getBoundingClientRect", "getClientRectFromMixedType", "clippingParent", "viewport", "rectToClientRect", "getViewportRect", "isElement", "getDocumentRect", "getDocumentElement", "getClippingParents", "clippingParents", "listScrollParents", "getParentNode", "canEscapeClipping", "getComputedStyle", "clipperElement", "isHTMLElement", "getOffsetParent", "contains", "getNodeName", "getClippingRect", "boundary", "rootBoundary", "mainClippingParents", "firstClippingParent", "clippingRect", "accRect", "max", "min", "computeOffsets", "_ref", "reference", "element", "placement", "basePlacement", "getBasePlacement", "variation", "getVariation", "commonX", "commonY", "offsets", "top", "bottom", "right", "left", "mainAxis", "getMainAxisFromPlacement", "len", "start", "end", "detectOverflow", "state", "options", "_options", "_options$placement", "placement", "_options$strategy", "strategy", "_options$boundary", "boundary", "clippingParents", "_options$rootBoundary", "rootBoundary", "viewport", "_options$elementConte", "elementContext", "popper", "_options$altBoundary", "altBoundary", "_options$padding", "padding", "paddingObject", "mergePaddingObject", "expandToHashMap", "basePlacements", "altContext", "reference", "popperRect", "element", "clippingClientRect", "getClippingRect", "isElement", "getDocumentElement", "referenceClientRect", "getBoundingClientRect", "popperOffsets", "computeOffsets", "popperClientRect", "rectToClientRect", "elementClientRect", "overflowOffsets", "offsetData", "offset", "key", "multiply", "right", "bottom", "axis", "top", "computeAutoPlacement", "state", "options", "_options", "placement", "boundary", "rootBoundary", "padding", "flipVariations", "_options$allowedAutoP", "allowedAutoPlacements", "placements", "variation", "getVariation", "variationPlacements", "basePlacements", "allowedPlacements", "overflows", "acc", "detectOverflow", "getBasePlacement", "a", "b", "getExpandedFallbackPlacements", "placement", "getBasePlacement", "auto", "oppositePlacement", "getOppositePlacement", "getOppositeVariationPlacement", "flip", "_ref", "state", "options", "name", "_options$mainAxis", "checkMainAxis", "_options$altAxis", "checkAltAxis", "specifiedFallbackPlacements", "padding", "boundary", "rootBoundary", "altBoundary", "_options$flipVariatio", "flipVariations", "allowedAutoPlacements", "preferredPlacement", "basePlacement", "isBasePlacement", "fallbackPlacements", "placements", "acc", "computeAutoPlacement", "referenceRect", "popperRect", "checksMap", "makeFallbackChecks", "firstFittingPlacement", "i", "_basePlacement", "isStartVariation", "getVariation", "start", "isVertical", "top", "bottom", "len", "overflow", "detectOverflow", "mainVariationSide", "right", "left", "altVariationSide", "checks", "check", "numberOfChecks", "_loop", "_i", "fittingPlacement", "_ret", "flip_default", "getSideOffsets", "overflow", "rect", "preventedOffsets", "isAnySideFullyClipped", "top", "right", "bottom", "left", "side", "hide", "_ref", "state", "name", "referenceRect", "popperRect", "referenceOverflow", "detectOverflow", "popperAltOverflow", "referenceClippingOffsets", "popperEscapeOffsets", "isReferenceHidden", "hasPopperEscaped", "hide_default", "distanceAndSkiddingToXY", "placement", "rects", "offset", "basePlacement", "getBasePlacement", "invertDistance", "left", "top", "_ref", "skidding", "distance", "right", "_ref2", "state", "options", "name", "_options$offset", "data", "placements", "acc", "_data$state$placement", "x", "y", "offset_default", "popperOffsets", "_ref", "state", "name", "computeOffsets", "popperOffsets_default", "getAltAxis", "axis", "preventOverflow", "_ref", "state", "options", "name", "_options$mainAxis", "checkMainAxis", "_options$altAxis", "checkAltAxis", "boundary", "rootBoundary", "altBoundary", "padding", "_options$tether", "tether", "_options$tetherOffset", "tetherOffset", "overflow", "detectOverflow", "basePlacement", "getBasePlacement", "variation", "getVariation", "isBasePlacement", "mainAxis", "getMainAxisFromPlacement", "altAxis", "getAltAxis", "popperOffsets", "referenceRect", "popperRect", "tetherOffsetValue", "normalizedTetherOffsetValue", "offsetModifierState", "data", "_offsetModifierState$", "mainSide", "top", "left", "altSide", "bottom", "right", "len", "offset", "min", "max", "additive", "minLen", "start", "maxLen", "arrowElement", "arrowRect", "getLayoutRect", "arrowPaddingObject", "getFreshSideObject", "arrowPaddingMin", "arrowPaddingMax", "arrowLen", "within", "minOffset", "maxOffset", "arrowOffsetParent", "getOffsetParent", "clientOffset", "offsetModifierValue", "tetherMin", "tetherMax", "preventedOffset", "_offsetModifierState$2", "_mainSide", "_altSide", "_offset", "_len", "_min", "_max", "isOriginSide", "_offsetModifierValue", "_tetherMin", "_tetherMax", "_preventedOffset", "withinMaxClamp", "preventOverflow_default", "getHTMLElementScroll", "element", "getNodeScroll", "node", "getWindow", "isHTMLElement", "getWindowScroll", "getHTMLElementScroll", "isElementScaled", "element", "rect", "scaleX", "round", "scaleY", "getCompositeRect", "elementOrVirtualElement", "offsetParent", "isFixed", "isOffsetParentAnElement", "isHTMLElement", "offsetParentIsScaled", "documentElement", "getDocumentElement", "getBoundingClientRect", "scroll", "offsets", "getNodeName", "isScrollParent", "getNodeScroll", "getWindowScrollBarX", "order", "modifiers", "map", "visited", "result", "modifier", "sort", "requires", "dep", "depModifier", "orderModifiers", "orderedModifiers", "modifierPhases", "acc", "phase", "debounce", "fn", "pending", "resolve", "mergeByName", "modifiers", "merged", "current", "existing", "key", "DEFAULT_OPTIONS", "areValidElements", "_len", "args", "_key", "element", "popperGenerator", "generatorOptions", "_generatorOptions", "_generatorOptions$def", "defaultModifiers", "_generatorOptions$def2", "defaultOptions", "reference", "popper", "options", "state", "effectCleanupFns", "isDestroyed", "instance", "setOptionsAction", "cleanupModifierEffects", "isElement", "listScrollParents", "orderedModifiers", "orderModifiers", "mergeByName", "m", "runModifierEffects", "_state$elements", "getCompositeRect", "getOffsetParent", "getLayoutRect", "modifier", "index", "_state$orderedModifie", "fn", "_state$orderedModifie2", "_options", "name", "debounce", "resolve", "_ref", "_ref$options", "effect", "cleanupFn", "noopFn", "defaultModifiers", "eventListeners_default", "popperOffsets_default", "computeStyles_default", "applyStyles_default", "offset_default", "flip_default", "preventOverflow_default", "arrow_default", "hide_default", "createPopper", "popperGenerator", "init_base_plugin", "HSDropdown", "_HSDropdown", "HSBasePlugin", "el", "options", "events", "getClassProperty", "stringToBoolean", "evt", "isIOS", "isIpadOS", "checkboxes", "radiobuttons", "closer", "div", "scrollbarSize", "virtualElement", "scope", "data", "strategy", "adaptive", "input", "target", "_target", "placement", "flip", "offset", "gpuAcceleration", "createPopper", "POSITIONS", "items", "popperInstance", "popperPosition", "dispatch", "isAnimated", "clearAfterClose", "afterTransition", "element", "isInstance", "elInCollection", "evtTarget", "prevWidth", "elC", "instance", "menuSearchHistory", "DROPDOWN_ACCESSIBILITY_KEY_SET", "dropdown", "isArrowUp", "menu", "preparedLinks", "links", "item", "current", "currentInd", "direction", "toggle", "closestDropdown", "isRootDropdown", "menuToOpen", "firstLink", "menuToClose", "futurePosition", "isStart", "code", "getCurrentInd", "i", "parent", "currentlyOpened", "getClassPropertyAlt", "cb", "dropdown_default", "init_utils", "init_base_plugin", "HSInputNumber", "_HSInputNumber", "HSBasePlugin", "el", "options", "data", "concatOptions", "value", "cleanedValue", "cleanedArray", "decimalFound", "char", "number", "event", "payload", "minInputValue", "maxInputValue", "incrementedResult", "decrementedResult", "defaultResult", "dispatch", "mode", "element", "target", "isInstance", "elInCollection", "elC", "input_number_default", "init_utils", "init_base_plugin", "HSLayoutSplitter", "_HSLayoutSplitter", "HSBasePlugin", "el", "options", "data", "concatOptions", "item", "evt", "draggingElement", "draggingInstance", "activeSplitter", "groups", "prev", "next", "direction", "htmlToElement", "classToClassList", "param", "isJson", "container", "isHorizontal", "element", "totalWidth", "paramValue", "items", "index", "parsedParam", "width", "newSize", "newSizeFixed", "newParam", "totalSize", "availableSize", "sizes", "adjustedSizes", "control", "otherSize", "sum", "rect", "computedStyle", "prevStart", "previousSize", "nextSize", "prevMinSize", "nextMinSize", "prevPreLimitSize", "nextPreLimitSize", "payload", "dispatch", "prevPercent", "nextPercent", "name", "dynamicFlexSize", "minSize", "preLimitSize", "dynamicSize", "minFlexSize", "preLimitFlexSize", "size", "totalFlex", "currentWidth", "getBreakpointValue", "breakpoints", "sortedBreakpoints", "a", "b", "i", "id", "flexValue", "scaleFactor", "adjustedFlex", "fn", "target", "draggingSections", "elC", "isInstance", "elInCollection", "cb", "instance", "layout_splitter_default", "init_utils", "init_base_plugin", "HSOverlay", "_HSOverlay", "HSBasePlugin", "el", "options", "events", "toggleDataOptions", "data", "concatOptions", "stringToBoolean", "getClassProperty", "autoCloseBreakpoint", "autoCloseEqualityType", "openedBreakpoint", "BREAKPOINTS", "evt", "instance", "toggleButton", "time", "overlayClasses", "overlayZIndex", "backdropId", "backdropClasses", "closeOnBackdrop", "disableBackdrop", "value", "backdrop", "afterTransition", "input", "div", "scrollbarSize", "buttons", "toggleData", "dataOptions", "openedOverlays", "currentlyOpened", "toggles", "disabledScroll", "toggle", "dispatch", "forceClose", "closeFn", "cb", "resolve", "fn", "element", "target", "isInstance", "_temp", "_target", "elInCollection", "elC", "breakpoint", "targets", "focusableElements", "notHiddenFocusableElements", "isParentOrElementHidden", "basicCheck", "overlayElement", "focusedElement", "foundCurrent", "autoCloseResizeFn", "overlay", "autoClose", "moveOverlayToBodyResizeFn", "resolution", "initPlace", "newPlace", "isDirectChild", "setOpenedResizeFn", "setBackdropZIndexResizeFn", "backdropZIndex", "overlay_default", "init_utils", "init_base_plugin", "HSPinInput", "_HSPinInput", "HSBasePlugin", "evt", "index", "el", "options", "data", "concatOptions", "elI", "value", "text", "n", "originalValue", "payload", "dispatch", "element", "target", "isInstance", "elInCollection", "elC", "pin_input_default", "init_utils", "init_base_plugin", "HSRemoveElement", "_HSRemoveElement", "HSBasePlugin", "el", "options", "data", "concatOptions", "afterTransition", "element", "target", "isInstance", "elInCollection", "elC", "remove_element_default", "init_utils", "init_base_plugin", "HSScrollspy", "_HSScrollspy", "HSBasePlugin", "el", "options", "evt", "section", "link", "globalOffset", "getClassProperty", "userOffset", "scrollableParentOffset", "topOffset", "height", "current", "group", "parentLink", "targetId", "target", "view", "scrollFn", "beforeScroll", "dispatch", "fn", "element", "isInstance", "elInCollection", "elC", "scrollspy_default", "init_utils", "init_base_plugin", "HSSelect", "_HSSelect", "HSBasePlugin", "el", "options", "data", "concatOptions", "evt", "val", "newVal", "tag", "selectedOptions", "values", "classToClassList", "appendMarkup", "markup", "htmlToElement", "clickHandle", "newEl", "icon", "title", "item", "img", "placeholder", "template", "remove", "newItem", "debounce", "props", "i", "POSITIONS", "toggle", "input", "search", "disabled", "selected", "index", "id", "titleWrapper", "iconWrapper", "descriptionWrapper", "option", "description", "value", "key", "res", "url", "query", "container", "selector", "items", "a", "b", "isASelected", "isBSelected", "newIds", "restOptions", "pseudoOptions", "dataId", "inputPadding", "inputBorder", "newWidth", "maxWidth", "intersection", "x", "elI", "selectChangeEvent", "dispatch", "isArray", "nItems", "tempTitle", "count", "dataValue", "dataTitleValue", "selectedOption", "selectedItem", "hasItems", "countLimit", "optionVal", "directMatch", "condition", "regexSafeVal", "char", "parent", "currentlyOpened", "forceFocus", "afterTransition", "addOption", "removeOption", "isEnoughSpace", "target", "isInstance", "elInCollection", "evtTarget", "element", "elC", "instance", "SELECT_ACCESSIBILITY_KEY_SET", "isArrowUp", "dropdown", "current", "currentInd", "isStart", "select", "opened", "select_default", "init_utils", "init_base_plugin", "HSStepper", "_HSStepper", "HSBasePlugin", "el", "options", "data", "concatOptions", "item", "currentNavItem", "index", "currentContentItem", "dispatch", "inIncludedSkipped", "isCompleted", "isSkip", "isDisabled", "navItem", "isFinal", "isOptional", "isProcessed", "hasError", "n", "finalContentItem", "otherContentItems", "infinite", "nonCompletedSteps", "targetNavItem", "targetContentItem", "completedText", "uncompletedSteps", "uncompletedOrSkipSteps", "fn", "element", "target", "isInstance", "elInCollection", "elC", "stepper_default", "init_utils", "init_base_plugin", "HSStrongPassword", "_HSStrongPassword", "HSBasePlugin", "el", "options", "data", "concatOptions", "evt", "i", "newStrip", "htmlToElement", "classToClassList", "rule", "ruleValue", "weaknessText", "weaknessTextToJson", "popover", "val", "passedRules", "regexps", "strength", "isRulePassed", "check", "uncheck", "rules", "payload", "dispatch", "qty", "isEnoughSpace", "element", "target", "isInstance", "elInCollection", "elC", "strong_password_default", "init_utils", "init_base_plugin", "HSTabs", "_HSTabs", "HSBasePlugin", "el", "options", "events", "evt", "toggle", "dispatch", "element", "target", "isInstance", "elInCollection", "elC", "targetInCollection", "TABS_ACCESSIBILITY_KEY_SET", "isVertical", "isOpposite", "toggles", "focused", "focusedInd", "cb", "tabs_default", "init_base_plugin", "HSTextareaAutoHeight", "_HSTextareaAutoHeight", "HSBasePlugin", "el", "options", "data", "concatOptions", "offsetTop", "clientHeight", "tabId", "tabs", "element", "payload", "textareas", "instance", "collapseId", "target", "isInstance", "elInCollection", "elC", "textarea_auto_height_default", "init_base_plugin", "HSThemeSwitch", "_HSThemeSwitch", "HSBasePlugin", "el", "options", "data", "concatOptions", "evt", "theme", "style", "matches", "isSaveToLocalStorage", "isSetDispatchEvent", "html", "resetStyles", "element", "target", "isInstance", "elInCollection", "elC", "theme_switch_default", "init_base_plugin", "HSToggleCount", "_HSToggleCount", "HSBasePlugin", "el", "options", "data", "concatOptions", "from", "to", "startTimestamp", "step", "timestamp", "progress", "element", "target", "isInstance", "elInCollection", "elC", "toggle_count_default", "init_utils", "init_base_plugin", "HSTogglePassword", "_HSTogglePassword", "HSBasePlugin", "el", "options", "data", "concatOptions", "targets", "id", "isFormElement", "dispatch", "toggles", "togglesInCollection", "element", "target", "isInstance", "elInCollection", "elC", "toggle_password_default", "init_utils", "init_base_plugin", "HSTooltip", "_HSTooltip", "HSBasePlugin", "el", "options", "events", "getClassProperty", "handle", "createPopper", "POSITIONS", "dispatch", "afterTransition", "element", "target", "isInstance", "elInCollection", "elC", "instance", "evt", "cb", "tooltip_default", "init_utils", "init_base_plugin", "HSTreeView", "_HSTreeView", "HSBasePlugin", "el", "options", "events", "data", "concatOptions", "evt", "dispatch", "ind", "concatData", "elI", "control", "id", "path", "parent", "exception", "selectedItems", "items", "initialItemData", "currentItemData", "hasUnchecked", "checkedItems", "dataI", "selector", "prop", "val", "fn", "element", "target", "isInstance", "elInCollection", "elC", "cb", "instance", "tree_view_default", "init_utils", "init_datatable", "init_file_upload", "init_range_slider", "COLLECTIONS", "copy_markup_default", "accordion_default", "carousel_default", "collapse_default", "combobox_default", "datatable_default", "dropdown_default", "file_upload_default", "input_number_default", "layout_splitter_default", "overlay_default", "pin_input_default", "range_slider_default", "remove_element_default", "scrollspy_default", "select_default", "stepper_default", "strong_password_default", "tabs_default", "textarea_auto_height_default", "theme_switch_default", "toggle_count_default", "toggle_password_default", "tooltip_default", "tree_view_default", "HSStaticMethods", "getClassProperty", "afterTransition", "collection", "COLLECTIONS", "fn", "key", "name", "HSDataTableModule", "HSFileUploadModule", "HSRangeSliderModule", "HSFileUploadModule", "HSRangeSliderModule", "import_clipboard", "import_clipboard_helpers", "ClipboardJS"] }
\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t