{"version":3,"file":"shorty.cjs","sources":["../src/strings/ariaChecked.ts","../src/strings/ariaDescription.ts","../src/strings/ariaDescribedBy.ts","../src/strings/ariaExpanded.ts","../src/strings/ariaHasPopup.ts","../src/strings/ariaHidden.ts","../src/strings/ariaLabel.ts","../src/strings/ariaLabelledBy.ts","../src/strings/ariaModal.ts","../src/strings/ariaPressed.ts","../src/strings/ariaSelected.ts","../src/strings/ariaValueMin.ts","../src/strings/ariaValueMax.ts","../src/strings/ariaValueNow.ts","../src/strings/ariaValueText.ts","../src/strings/abortEvent.ts","../src/strings/beforeunloadEvent.ts","../src/strings/blurEvent.ts","../src/strings/changeEvent.ts","../src/strings/contextmenuEvent.ts","../src/strings/DOMContentLoadedEvent.ts","../src/strings/DOMMouseScrollEvent.ts","../src/strings/errorEvent.ts","../src/strings/focusEvent.ts","../src/strings/focusinEvent.ts","../src/strings/focusoutEvent.ts","../src/strings/gesturechangeEvent.ts","../src/strings/gestureendEvent.ts","../src/strings/gesturestartEvent.ts","../src/strings/keydownEvent.ts","../src/strings/keypressEvent.ts","../src/strings/keyupEvent.ts","../src/strings/loadEvent.ts","../src/strings/mouseclickEvent.ts","../src/strings/mousedblclickEvent.ts","../src/strings/mousedownEvent.ts","../src/strings/mouseupEvent.ts","../src/strings/mousehoverEvent.ts","../src/strings/mouseenterEvent.ts","../src/strings/mouseleaveEvent.ts","../src/strings/mouseinEvent.ts","../src/strings/mouseoutEvent.ts","../src/strings/mouseoverEvent.ts","../src/strings/mousemoveEvent.ts","../src/strings/mousewheelEvent.ts","../src/strings/moveEvent.ts","../src/strings/orientationchangeEvent.ts","../src/strings/pointercancelEvent.ts","../src/strings/pointerdownEvent.ts","../src/strings/pointerleaveEvent.ts","../src/strings/pointermoveEvent.ts","../src/strings/pointerupEvent.ts","../src/strings/readystatechangeEvent.ts","../src/strings/resetEvent.ts","../src/strings/resizeEvent.ts","../src/strings/selectEvent.ts","../src/strings/selectendEvent.ts","../src/strings/selectstartEvent.ts","../src/strings/scrollEvent.ts","../src/strings/submitEvent.ts","../src/strings/touchstartEvent.ts","../src/strings/touchmoveEvent.ts","../src/strings/touchcancelEvent.ts","../src/strings/touchendEvent.ts","../src/strings/unloadEvent.ts","../src/strings/nativeEvents.ts","../src/strings/dragEvent.ts","../src/strings/dragstartEvent.ts","../src/strings/dragenterEvent.ts","../src/strings/dragleaveEvent.ts","../src/strings/dragoverEvent.ts","../src/strings/dragendEvent.ts","../src/strings/loadstartEvent.ts","../src/strings/mouseSwipeEvents.ts","../src/strings/mouseClickEvents.ts","../src/strings/mouseHoverEvents.ts","../src/strings/touchEvents.ts","../src/strings/focusEvents.ts","../src/strings/focusableSelector.ts","../src/strings/keyboardEventKeys.ts","../src/strings/keyAlt.ts","../src/strings/keyArrowDown.ts","../src/strings/keyArrowUp.ts","../src/strings/keyArrowLeft.ts","../src/strings/keyArrowRight.ts","../src/strings/keyBackspace.ts","../src/strings/keyCapsLock.ts","../src/strings/keyControl.ts","../src/strings/keyDelete.ts","../src/strings/keyEnter.ts","../src/strings/keyNumpadEnter.ts","../src/strings/keyEscape.ts","../src/strings/keyInsert.ts","../src/strings/keyMeta.ts","../src/strings/keyPause.ts","../src/strings/keyScrollLock.ts","../src/strings/keyShift.ts","../src/strings/keySpace.ts","../src/strings/keyTab.ts","../src/strings/animationDuration.ts","../src/strings/animationDelay.ts","../src/strings/animationName.ts","../src/strings/animationEndEvent.ts","../src/strings/transitionDuration.ts","../src/strings/transitionDelay.ts","../src/strings/transitionEndEvent.ts","../src/strings/transitionProperty.ts","../src/strings/addEventListener.ts","../src/strings/removeEventListener.ts","../src/strings/bezierEasings.ts","../src/strings/offsetHeight.ts","../src/strings/offsetWidth.ts","../src/strings/scrollHeight.ts","../src/strings/scrollWidth.ts","../src/strings/tabindex.ts","../src/strings/userAgentData.ts","../src/strings/userAgent.ts","../src/boolean/isMobile.ts","../src/boolean/isApple.ts","../src/boolean/isFirefox.ts","../src/boolean/isWebKit.ts","../src/boolean/support3DTransform.ts","../src/misc/noop.ts","../src/event/on.ts","../src/event/off.ts","../src/event/one.ts","../src/boolean/supportPassive.ts","../src/boolean/supportTransform.ts","../src/boolean/supportTouch.ts","../src/boolean/supportAnimation.ts","../src/boolean/supportTransition.ts","../src/attr/getAttribute.ts","../src/attr/getAttributeNS.ts","../src/attr/hasAttribute.ts","../src/attr/hasAttributeNS.ts","../src/attr/setAttribute.ts","../src/attr/setAttributeNS.ts","../src/attr/removeAttribute.ts","../src/attr/removeAttributeNS.ts","../src/class/addClass.ts","../src/class/removeClass.ts","../src/class/hasClass.ts","../src/blocks/documentBody.ts","../src/blocks/documentElement.ts","../src/blocks/documentHead.ts","../src/misc/ArrayFrom.ts","../src/is/isObject.ts","../src/is/isNode.ts","../src/is/isElement.ts","../src/misc/data.ts","../src/misc/getInstance.ts","../src/misc/capitalize.ts","../src/misc/camelCase.ts","../src/is/isString.ts","../src/is/isWindow.ts","../src/is/isDocument.ts","../src/get/getDocument.ts","../src/misc/ObjectAssign.ts","../src/misc/createElement.ts","../src/misc/createElementNS.ts","../src/misc/dispatchEvent.ts","../src/misc/distinct.ts","../src/get/getElementStyle.ts","../src/get/getElementAnimationDelay.ts","../src/get/getElementAnimationDuration.ts","../src/misc/emulateAnimationEnd.ts","../src/get/getElementTransitionDelay.ts","../src/get/getElementTransitionDuration.ts","../src/misc/emulateTransitionEnd.ts","../src/misc/Float32ArrayFrom.ts","../src/misc/Float64ArrayFrom.ts","../src/misc/focus.ts","../src/misc/kebabCase.ts","../src/misc/normalizeValue.ts","../src/misc/ObjectEntries.ts","../src/misc/normalizeOptions.ts","../src/misc/ObjectHasOwn.ts","../src/misc/ObjectKeys.ts","../src/misc/ObjectValues.ts","../src/misc/ObjectFromEntries.ts","../src/misc/createCustomEvent.ts","../src/misc/passiveHandler.ts","../src/misc/reflow.ts","../src/misc/setElementStyle.ts","../src/is/isMap.ts","../src/is/isNumber.ts","../src/misc/timer.ts","../src/misc/toLowerCase.ts","../src/misc/toUpperCase.ts","../src/selectors/querySelectorAll.ts","../src/misc/focusTrap.ts","../src/is/isHTMLElement.ts","../src/get/getBoundingClientRect.ts","../src/get/getDocumentBody.ts","../src/get/getDocumentElement.ts","../src/get/getDocumentHead.ts","../src/get/getNodeName.ts","../src/get/getNodeScroll.ts","../src/is/isShadowRoot.ts","../src/get/getParentNode.ts","../src/get/getWindow.ts","../src/is/isTableElement.ts","../src/selectors/matches.ts","../src/get/getOffsetParent.ts","../src/is/isScaledElement.ts","../src/get/getRectRelativeToOffsetParent.ts","../src/get/getUID.ts","../src/is/isArray.ts","../src/is/isCanvas.ts","../src/is/isCustomElement.ts","../src/is/isElementInScrollRange.ts","../src/is/isElementInViewport.ts","../src/is/isElementsArray.ts","../src/is/isFunction.ts","../src/is/isHTMLCollection.ts","../src/is/isHTMLImageElement.ts","../src/is/isJSON.ts","../src/is/isWeakMap.ts","../src/is/isMedia.ts","../src/is/isNodeList.ts","../src/is/isRTL.ts","../src/is/isSVGElement.ts","../src/selectors/closest.ts","../src/selectors/querySelector.ts","../src/selectors/getElementsByTagName.ts","../src/selectors/getCustomElements.ts","../src/selectors/getElementById.ts","../src/selectors/getElementsByClassName.ts"],"sourcesContent":["/**\n * A global namespace for aria-checked.\n */\nconst ariaChecked = \"aria-checked\";\nexport default ariaChecked;\n","/**\n * A global namespace for aria-description.\n */\nconst ariaDescription = \"aria-description\";\nexport default ariaDescription;\n","/**\n * A global namespace for aria-describedby.\n */\nconst ariaDescribedBy = \"aria-describedby\";\nexport default ariaDescribedBy;\n","/**\n * A global namespace for aria-expanded.\n */\nconst ariaExpanded = \"aria-expanded\";\nexport default ariaExpanded;\n","/**\n * A global namespace for aria-haspopup.\n */\nconst ariaHasPopup = \"aria-haspopup\";\nexport default ariaHasPopup;\n","/**\n * A global namespace for aria-hidden.\n */\nconst ariaHidden = \"aria-hidden\";\nexport default ariaHidden;\n","/**\n * A global namespace for aria-label.\n */\nconst ariaLabel = \"aria-label\";\nexport default ariaLabel;\n","/**\n * A global namespace for aria-labelledby.\n */\nconst ariaLabelledBy = \"aria-labelledby\";\nexport default ariaLabelledBy;\n","/**\n * A global namespace for aria-modal.\n */\nconst ariaModal = \"aria-modal\";\nexport default ariaModal;\n","/**\n * A global namespace for aria-pressed.\n */\nconst ariaPressed = \"aria-pressed\";\nexport default ariaPressed;\n","/**\n * A global namespace for aria-selected.\n */\nconst ariaSelected = \"aria-selected\";\nexport default ariaSelected;\n","/**\n * A global namespace for aria-valuemin.\n */\nconst ariaValueMin = \"aria-valuemin\";\nexport default ariaValueMin;\n","/**\n * A global namespace for aria-valuemax.\n */\nconst ariaValueMax = \"aria-valuemax\";\nexport default ariaValueMax;\n","/**\n * A global namespace for aria-valuenow.\n */\nconst ariaValueNow = \"aria-valuenow\";\nexport default ariaValueNow;\n","/**\n * A global namespace for aria-valuetext.\n */\nconst ariaValueText = \"aria-valuetext\";\nexport default ariaValueText;\n","/**\n * A global namespace for `abort` event.\n */\nconst abortEvent = \"abort\";\nexport default abortEvent;\n","/**\n * A global namespace for `beforeunload` event.\n */\nconst beforeunloadEvent = \"beforeunload\";\nexport default beforeunloadEvent;\n","/**\n * A global namespace for `blur` event.\n */\nconst blurEvent = \"blur\";\nexport default blurEvent;\n","/**\n * A global namespace for `change` event.\n */\nconst changeEvent = \"change\";\nexport default changeEvent;\n","/**\n * A global namespace for `contextmenu` event.\n */\nconst contextmenuEvent = \"contextmenu\";\nexport default contextmenuEvent;\n","/**\n * A global namespace for `DOMContentLoaded` event.\n */\nconst DOMContentLoadedEvent = \"DOMContentLoaded\";\nexport default DOMContentLoadedEvent;\n","/**\n * A global namespace for `DOMMouseScroll` event.\n */\nconst DOMMouseScrollEvent = \"DOMMouseScroll\";\nexport default DOMMouseScrollEvent;\n","/**\n * A global namespace for `error` event.\n */\nconst errorEvent = \"error\";\nexport default errorEvent;\n","/**\n * A global namespace for `focus` event.\n */\nconst focusEvent = \"focus\";\nexport default focusEvent;\n","/**\n * A global namespace for `focusin` event.\n */\nconst focusinEvent = \"focusin\";\nexport default focusinEvent;\n","/**\n * A global namespace for `focusout` event.\n */\nconst focusoutEvent = \"focusout\";\nexport default focusoutEvent;\n","/**\n * A global namespace for `gesturechange` event.\n */\nconst gesturechangeEvent = \"gesturechange\";\nexport default gesturechangeEvent;\n","/**\n * A global namespace for `gestureend` event.\n */\nconst gestureendEvent = \"gestureend\";\nexport default gestureendEvent;\n","/**\n * A global namespace for `gesturestart` event.\n */\nconst gesturestartEvent = \"gesturestart\";\nexport default gesturestartEvent;\n","/**\n * A global namespace for `keydown` event.\n */\nconst keydownEvent = \"keydown\";\nexport default keydownEvent;\n","/**\n * A global namespace for `keypress` event.\n */\nconst keypressEvent = \"keypress\";\nexport default keypressEvent;\n","/**\n * A global namespace for `keyup` event.\n */\nconst keyupEvent = \"keyup\";\nexport default keyupEvent;\n","/**\n * A global namespace for `load` event.\n */\nconst loadEvent = \"load\";\nexport default loadEvent;\n","/**\n * A global namespace for `click` event.\n */\nconst mouseclickEvent = \"click\";\nexport default mouseclickEvent;\n","/**\n * A global namespace for `dblclick` event.\n */\nconst mousedblclickEvent = \"dblclick\";\nexport default mousedblclickEvent;\n","/**\n * A global namespace for `mousedown` event.\n */\nconst mousedownEvent = \"mousedown\";\nexport default mousedownEvent;\n","/**\n * A global namespace for `mouseup` event.\n */\nconst mouseupEvent = \"mouseup\";\nexport default mouseupEvent;\n","/**\n * A global namespace for `hover` event.\n */\nconst mousehoverEvent = \"hover\";\nexport default mousehoverEvent;\n","/**\n * A global namespace for `mouseenter` event.\n */\nconst mouseenterEvent = \"mouseenter\";\nexport default mouseenterEvent;\n","/**\n * A global namespace for `mouseleave` event.\n */\nconst mouseleaveEvent = \"mouseleave\";\nexport default mouseleaveEvent;\n","/**\n * A global namespace for `mousein` event.\n */\nconst mouseinEvent = \"mousein\";\nexport default mouseinEvent;\n","/**\n * A global namespace for `mouseout` event.\n */\nconst mouseoutEvent = \"mouseout\";\nexport default mouseoutEvent;\n","/**\n * A global namespace for `mouseover` event.\n */\nconst mouseoverEvent = \"mouseover\";\nexport default mouseoverEvent;\n","/**\n * A global namespace for `mousemove` event.\n */\nconst mousemoveEvent = \"mousemove\";\nexport default mousemoveEvent;\n","/**\n * A global namespace for `mousewheel` event.\n */\nconst mousewheelEvent = \"mousewheel\";\nexport default mousewheelEvent;\n","/**\n * A global namespace for `move` event.\n */\nconst moveEvent = \"move\";\nexport default moveEvent;\n","/**\n * A global namespace for `orientationchange` event.\n */\nconst orientationchangeEvent = \"orientationchange\";\nexport default orientationchangeEvent;\n","/**\n * A global namespace for `pointercancel` event.\n */\nconst pointercancelEvent = \"pointercancel\";\nexport default pointercancelEvent;\n","/**\n * A global namespace for `pointerdown` event.\n */\nconst pointerdownEvent = \"pointerdown\";\nexport default pointerdownEvent;\n","/**\n * A global namespace for `pointerleave` event.\n */\nconst pointerleaveEvent = \"pointerleave\";\nexport default pointerleaveEvent;\n","/**\n * A global namespace for `pointermove` event.\n */\nconst pointermoveEvent = \"pointermove\";\nexport default pointermoveEvent;\n","/**\n * A global namespace for `pointerup` event.\n */\nconst pointerupEvent = \"pointerup\";\nexport default pointerupEvent;\n","/**\n * A global namespace for `readystatechange` event.\n */\nconst readystatechangeEvent = \"readystatechange\";\nexport default readystatechangeEvent;\n","/**\n * A global namespace for `reset` event.\n */\nconst resetEvent = \"reset\";\nexport default resetEvent;\n","/**\n * A global namespace for `resize` event.\n */\nconst resizeEvent = \"resize\";\nexport default resizeEvent;\n","/**\n * A global namespace for `select` event.\n */\nconst selectEvent = \"select\";\nexport default selectEvent;\n","/**\n * A global namespace for the `selectend` event.\n */\nconst selectendEvent = \"selectend\";\nexport default selectendEvent;\n","/**\n * A global namespace for the `selectstart` event.\n */\nconst selectstartEvent = \"selectstart\";\nexport default selectstartEvent;\n","/**\n * A global namespace for `scroll` event.\n */\nconst scrollEvent = \"scroll\";\nexport default scrollEvent;\n","/**\n * A global namespace for `submit` event.\n */\nconst submitEvent = \"submit\";\nexport default submitEvent;\n","/**\n * A global namespace for `touchstart` event.\n */\nconst touchstartEvent = \"touchstart\";\nexport default touchstartEvent;\n","/**\n * A global namespace for `touchmove` event.\n */\nconst touchmoveEvent = \"touchmove\";\nexport default touchmoveEvent;\n","/**\n * A global namespace for `touchcancel` event.\n */\nconst touchcancelEvent = \"touchcancel\";\nexport default touchcancelEvent;\n","/**\n * A global namespace for `touchend` event.\n */\nconst touchendEvent = \"touchend\";\nexport default touchendEvent;\n","/**\n * A global namespace for `unload` event.\n */\nconst unloadEvent = \"unload\";\nexport default unloadEvent;\n","import abort from \"./abortEvent\";\nimport beforeunload from \"./beforeunloadEvent\";\nimport blur from \"./blurEvent\";\nimport change from \"./changeEvent\";\nimport contextmenu from \"./contextmenuEvent\";\nimport DOMContentLoaded from \"./DOMContentLoadedEvent\";\nimport DOMMouseScroll from \"./DOMMouseScrollEvent\";\nimport error from \"./errorEvent\";\nimport focus from \"./focusEvent\";\nimport focusin from \"./focusinEvent\";\nimport focusout from \"./focusoutEvent\";\nimport gesturechange from \"./gesturechangeEvent\";\nimport gestureend from \"./gestureendEvent\";\nimport gesturestart from \"./gesturestartEvent\";\nimport keydown from \"./keydownEvent\";\nimport keypress from \"./keypressEvent\";\nimport keyup from \"./keyupEvent\";\nimport load from \"./loadEvent\";\nimport click from \"./mouseclickEvent\";\nimport dblclick from \"./mousedblclickEvent\";\nimport mousedown from \"./mousedownEvent\";\nimport mouseup from \"./mouseupEvent\";\nimport hover from \"./mousehoverEvent\";\nimport mouseenter from \"./mouseenterEvent\";\nimport mouseleave from \"./mouseleaveEvent\";\nimport mousein from \"./mouseinEvent\";\nimport mouseout from \"./mouseoutEvent\";\nimport mouseover from \"./mouseoverEvent\";\nimport mousemove from \"./mousemoveEvent\";\nimport mousewheel from \"./mousewheelEvent\";\nimport move from \"./moveEvent\";\nimport orientationchange from \"./orientationchangeEvent\";\nimport pointercancel from \"./pointercancelEvent\";\nimport pointerdown from \"./pointerdownEvent\";\nimport pointerleave from \"./pointerleaveEvent\";\nimport pointermove from \"./pointermoveEvent\";\nimport pointerup from \"./pointerupEvent\";\nimport readystatechange from \"./readystatechangeEvent\";\nimport reset from \"./resetEvent\";\nimport resize from \"./resizeEvent\";\nimport select from \"./selectEvent\";\nimport selectend from \"./selectendEvent\";\nimport selectstart from \"./selectstartEvent\";\nimport scroll from \"./scrollEvent\";\nimport submit from \"./submitEvent\";\nimport touchstart from \"./touchstartEvent\";\nimport touchmove from \"./touchmoveEvent\";\nimport touchcancel from \"./touchcancelEvent\";\nimport touchend from \"./touchendEvent\";\nimport unload from \"./unloadEvent\";\n\n/**\n * A global namespace for all browser native events.\n */\nconst nativeEvents = {\n DOMContentLoaded,\n DOMMouseScroll,\n abort,\n beforeunload,\n blur,\n change,\n click,\n contextmenu,\n dblclick,\n error,\n focus,\n focusin,\n focusout,\n gesturechange,\n gestureend,\n gesturestart,\n hover,\n keydown,\n keypress,\n keyup,\n load,\n mousedown,\n mousemove,\n mousein,\n mouseout,\n mouseenter,\n mouseleave,\n mouseover,\n mouseup,\n mousewheel,\n move,\n orientationchange,\n pointercancel,\n pointerdown,\n pointerleave,\n pointermove,\n pointerup,\n readystatechange,\n reset,\n resize,\n scroll,\n select,\n selectend,\n selectstart,\n submit,\n touchcancel,\n touchend,\n touchmove,\n touchstart,\n unload,\n};\n\nexport default nativeEvents;\n","/**\n * A global namespace for `drag` event.\n */\nconst dragEvent = \"drag\";\nexport default dragEvent;\n","/**\n * A global namespace for `dragstart` event.\n */\nconst dragstartEvent = \"dragstart\";\nexport default dragstartEvent;\n","/**\n * A global namespace for `dragenter` event.\n */\nconst dragenterEvent = \"dragenter\";\nexport default dragenterEvent;\n","/**\n * A global namespace for `dragleave` event.\n */\nconst dragleaveEvent = \"dragleave\";\nexport default dragleaveEvent;\n","/**\n * A global namespace for `dragover` event.\n */\nconst dragoverEvent = \"dragover\";\nexport default dragoverEvent;\n","/**\n * A global namespace for `dragend` event.\n */\nconst dragendEvent = \"dragend\";\nexport default dragendEvent;\n","/**\n * A global namespace for `loadstart` event.\n */\nconst loadstartEvent = \"loadstart\";\nexport default loadstartEvent;\n","/**\n * A global namespace for mouse events equivalent to touch events.\n */\nconst mouseSwipeEvents = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\",\n};\nexport default mouseSwipeEvents;\n","/**\n * A global namespace for mouse click events.\n */\nconst mouseClickEvents = { down: \"mousedown\", up: \"mouseup\" };\nexport default mouseClickEvents;\n","/**\n * A global namespace for mouse hover events.\n */\nconst mouseHoverEvents = \"onmouseleave\" in document\n ? [\"mouseenter\", \"mouseleave\"]\n : /* istanbul ignore next @preserve */ [\"mouseover\", \"mouseout\"];\nexport default mouseHoverEvents;\n","/**\n * A global namespace for touch events.\n */\nconst touchEvents = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\",\n};\nexport default touchEvents;\n","/**\n * A global namespace for focus event names.\n */\nconst focusEvents = { in: \"focusin\", out: \"focusout\" };\nexport default focusEvents;\n","const focusableSelector =\n 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]';\n\nexport default focusableSelector;\n","/**\n * A global namespace for keyboard event keys.\n */\nconst keyboardEventKeys = {\n Backspace: \"Backspace\", // 8\n Tab: \"Tab\", // 9\n Enter: \"Enter\", // 13\n Shift: \"Shift\", // 16\n Control: \"Control\", // 17\n Alt: \"Alt\", // 18\n Pause: \"Pause\", // 19\n CapsLock: \"CapsLock\", // 20\n Escape: \"Escape\", // 27\n Scape: \"Space\", // 32\n ArrowLeft: \"ArrowLeft\", // 37\n ArrowUp: \"ArrowUp\", // 38\n ArrowRight: \"ArrowRight\", // 39\n ArrowDown: \"ArrowDown\", // 40\n Insert: \"Insert\", // 45\n Delete: \"Delete\", // 46\n Meta: \"Meta\", // 91 windows key\n ContextMenu: \"ContextMenu\", // 93\n ScrollLock: \"ScrollLock\", // 145\n};\n\nexport default keyboardEventKeys;\n","/**\n * A global namespace for `Alt` key.\n * e.which = 18\n */\nconst keyAlt = \"Alt\";\n\nexport default keyAlt;\n","/**\n * A global namespace for `ArrowDown` key.\n * e.which = 40 equivalent\n */\nconst keyArrowDown = \"ArrowDown\";\n\nexport default keyArrowDown;\n","/**\n * A global namespace for `ArrowUp` key.\n * e.which = 38 equivalent\n */\nconst keyArrowUp = \"ArrowUp\";\n\nexport default keyArrowUp;\n","/**\n * A global namespace for `ArrowLeft` key.\n * e.which = 37 equivalent\n */\nconst keyArrowLeft = \"ArrowLeft\";\n\nexport default keyArrowLeft;\n","/**\n * A global namespace for `ArrowRight` key.\n * e.which = 39 equivalent\n */\nconst keyArrowRight = \"ArrowRight\";\n\nexport default keyArrowRight;\n","/**\n * A global namespace for `Backspace` key.\n * e.which === 8 equivalent\n */\nconst keyBackspace = \"Backspace\";\n\nexport default keyBackspace;\n","/**\n * A global namespace for `CapsLock` key.\n * e.which = 20 equivalent\n */\nconst keyCapsLock = \"CapsLock\";\n\nexport default keyCapsLock;\n","/**\n * A global namespace for `Control` key.\n * e.which = 17\n */\nconst keyControl = \"Control\";\n\nexport default keyControl;\n","/**\n * A global namespace for `Delete` key.\n * e.which = 46 equivalent\n */\nconst keyDelete = \"Delete\";\n\nexport default keyDelete;\n","/**\n * A global namespace for `Enter` key.\n * e.which = 13 equivalent\n */\nconst keyEnter = \"Enter\";\n\nexport default keyEnter;\n","/**\n * A global namespace for `Enter` key.\n * e.which = 13 equivalent\n */\nconst keyNumpadEnter = \"NumpadEnter\";\n\nexport default keyNumpadEnter;\n","/**\n * A global namespace for `Escape` key.\n * e.which = 27 equivalent\n */\nconst keyEscape = \"Escape\";\n\nexport default keyEscape;\n","/**\n * A global namespace for `Insert` key.\n * e.which = 45 equivalent\n */\nconst keyInsert = \"Insert\";\n\nexport default keyInsert;\n","/**\n * A global namespace for `Meta` key.\n * e.which = 93 equivalent\n */\nconst keyMeta = \"Meta\";\n\nexport default keyMeta;\n","/**\n * A global namespace for `Pause` key.\n * e.which = 19\n */\nconst keyPause = \"Pause\";\n\nexport default keyPause;\n","/**\n * A global namespace for `ScrollLock` key.\n * e.which = 145 equivalent\n */\nconst keyScrollLock = \"ScrollLock\";\n\nexport default keyScrollLock;\n","/**\n * A global namespace for `Shift` key.\n * e.which = 16\n */\nconst keyShift = \"Shift\";\n\nexport default keyShift;\n","/**\n * A global namespace for `Space` key.\n * e.which = 32 equivalent\n */\nconst keySpace = \"Space\";\n\nexport default keySpace;\n","/**\n * A global namespace for `Tab` key.\n * e.which = 9 equivalent\n */\nconst keyTab = \"Tab\";\n\nexport default keyTab;\n","/**\n * A global namespace for 'animationDuration' string.\n */\nconst animationDuration = \"animationDuration\";\nexport default animationDuration;\n","/**\n * A global namespace for 'animationDelay' string.\n */\nconst animationDelay = \"animationDelay\";\nexport default animationDelay;\n","/**\n * A global namespace for 'animationName' string.\n */\nconst animationName = \"animationName\";\nexport default animationName;\n","/**\n * A global namespace for 'animationend' string.\n */\nconst animationEndEvent = \"animationend\";\nexport default animationEndEvent;\n","/**\n * A global namespace for 'transitionDuration' string.\n */\nconst transitionDuration = \"transitionDuration\";\nexport default transitionDuration;\n","/**\n * A global namespace for 'transitionDelay' string.\n */\nconst transitionDelay = \"transitionDelay\";\nexport default transitionDelay;\n","/**\n * A global namespace for 'transitionend' string.\n */\nconst transitionEndEvent = \"transitionend\";\nexport default transitionEndEvent;\n","/**\n * A global namespace for `transitionProperty` string for modern browsers.\n */\nconst transitionProperty = \"transitionProperty\";\nexport default transitionProperty;\n","/**\n * A global namespace for 'addEventListener' string.\n */\nconst addEventListener = \"addEventListener\";\nexport default addEventListener;\n","/**\n * A global namespace for 'removeEventListener' string.\n */\nconst removeEventListener = \"removeEventListener\";\nexport default removeEventListener;\n","/**\n * A global namespace for predefined\n * CSS3 'cubic-bezier()' easing functions.\n */\nconst bezierEasings = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\",\n};\nexport default bezierEasings;\n","/**\n * A global namespace for `offsetHeight` property.\n */\nconst offsetHeight = \"offsetHeight\";\nexport default offsetHeight;\n","/**\n * A global namespace for `offsetWidth` property.\n */\nconst offsetWidth = \"offsetWidth\";\nexport default offsetWidth;\n","/**\n * A global namespace for `scrollHeight` property.\n */\nconst scrollHeight = \"scrollHeight\";\nexport default scrollHeight;\n","/**\n * A global namespace for `scrollWidth` property.\n */\nconst scrollWidth = \"scrollWidth\";\nexport default scrollWidth;\n","/**\n * A global namespace for `touchcancel` event.\n */\nconst tabindex = \"tabindex\";\nexport default tabindex;\n","import type { NavigatorUA } from \"../interface/navigatorUA\";\n\n/**\n * A global namespace for `userAgentData` object.\n */\nconst userAgentData: NavigatorUA[\"userAgentData\"] =\n (navigator as NavigatorUA).userAgentData;\nexport default userAgentData;\n","const { userAgent: userAgentString } = navigator;\n\n/**\n * A global namespace for `navigator.userAgent` string.\n */\nconst userAgent = userAgentString;\nexport default userAgent;\n","import type { NavigatorUA } from \"../interface/navigatorUA\";\n\n/**\n * An accessor that checks for mobile detection.\n */\nconst isMobile = () => {\n const mobileBrands = /iPhone|iPad|iPod|Android/i;\n\n return (navigator as NavigatorUA)?.userAgentData?.brands.some((x) =>\n mobileBrands.test(x.brand)\n ) ||\n mobileBrands.test(navigator?.userAgent) || false;\n};\nexport default isMobile;\n","import type { NavigatorUA } from \"../interface/navigatorUA\";\n\n/**\n * An accessor that checks for Apple browsers.\n */\nconst isApple = () => {\n const appleBrands = /(iPhone|iPod|iPad)/;\n return (navigator as NavigatorUA)?.userAgentData?.brands.some((x) =>\n appleBrands.test(x.brand)\n ) || /* istanbul ignore next @preserve */\n appleBrands.test(\n navigator?.userAgent,\n ) || false;\n};\nexport default isApple;\n","/**\n * An accessor that checks for Gecko browsers. When writing this file,\n * Gecko was not supporting `userAgentData`.\n */\nconst isFirefox = () =>\n navigator?.userAgent?.includes(\"Firefox\") ||\n /* istanbul ignore next @preserve */ false;\n\nexport default isFirefox;\n","const isWebKit = () => {\n /* istanbul ignore next @preserve - this case should be tested in Internet Exploder */\n if (typeof CSS === \"undefined\" || !CSS.supports) return false;\n return CSS.supports(\"-webkit-backdrop-filter\", \"none\");\n};\n\nexport default isWebKit;\n","/**\n * An accessor that checks for CSS3 3D transform support.\n */\nconst support3DTransform = () =>\n [\"webkitPerspective\", \"perspective\"].some((p) => p in document.head.style);\n\nexport default support3DTransform;\n","/** A generic function with empty body. */\nconst noop = () => {\n // this is a noop\n};\n\nexport default noop;\n","/**\n * Add eventListener to an `EventTarget` object.\n */\nconst on = (\n element: T,\n eventName: string,\n listener: L,\n options?: AddEventListenerOptions,\n) => {\n const ops = options || false;\n element.addEventListener(\n eventName,\n listener as EventListenerOrEventListenerObject,\n ops,\n );\n};\n\nexport default on;\n","/**\n * Remove eventListener from an `EventTarget` object.\n */\nconst off = (\n element: T,\n eventName: string,\n listener: L,\n options?: AddEventListenerOptions,\n) => {\n const ops = options || false;\n element.removeEventListener(\n eventName,\n listener as EventListenerOrEventListenerObject,\n ops,\n );\n};\n\nexport default off;\n","import on from \"./on\";\nimport off from \"./off\";\nimport { NativeEventHandler } from \"../interface/event\";\n\n/**\n * Add an `eventListener` to an `EventTarget`\n * element and remove it once callback is called.\n */\nconst one = (\n element: T,\n eventName: string,\n listener: L,\n options?: AddEventListenerOptions,\n) => {\n /** Wrap the listener for easy on -> off */\n const handlerWrapper: NativeEventHandler = (e) => {\n /* istanbul ignore else @preserve */\n if (e.target === element || e.currentTarget === element) {\n (listener as NativeEventHandler).apply(element, [e]);\n off(element, eventName, handlerWrapper, options);\n }\n };\n on(element, eventName, handlerWrapper, options);\n};\n\nexport default one;\n","import noop from \"../misc/noop\";\nimport one from \"../event/one\";\nimport DOMContentLoadedEvent from \"../strings/DOMContentLoadedEvent\";\n\n/**\n * An accessor that checks for passive events support,\n * in general event options are not suited for scroll prevention.\n *\n * @see https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n */\nconst supportPassive = () => {\n let result = false;\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get: () => {\n result = true;\n return result;\n },\n });\n /* istanbul ignore next @preserve */\n one(document, DOMContentLoadedEvent, noop, opts);\n } catch (_e) {\n // throw Error('Passive events are not supported');\n }\n\n return result;\n};\n\nexport default supportPassive;\n","/**\n * An accessor that checks for CSS3 transform support.\n */\nconst supportTransform = () =>\n [\"webkitTransform\", \"transform\"].some((p) => p in document.head.style);\n\nexport default supportTransform;\n","/**\n * An accessor that checks for touch events support.\n */\nconst supportTouch = () =>\n \"ontouchstart\" in window ||\n /* istanbul ignore next @preserve */\n \"msMaxTouchPoints\" in navigator;\n\nexport default supportTouch;\n","/**\n * An accessor that checks for CSS3 animation support.\n */\nconst supportAnimation = () =>\n [\"webkitAnimation\", \"animation\"].some((p) => p in document.head.style);\n\nexport default supportAnimation;\n","/**\n * An accessor that checks for CSS3 transition support.\n */\nconst supportTransition = () =>\n [\"webkitTransition\", \"transition\"].some((p) => p in document.head.style);\n\nexport default supportTransition;\n","/**\n * Shortcut for `Element.getAttribute()` method.\n *\n * @param element target element\n * @param att attribute name\n * @returns attribute value\n */\nconst getAttribute = (element: Element, att: string): string | null =>\n element.getAttribute(att);\n\nexport default getAttribute;\n","/**\n * Shortcut for `Element.getAttributeNS()` method.\n *\n * @param ns attribute namespace\n * @param element target element\n * @param att attribute name\n * @returns attribute value\n */\nconst getAttributeNS = (ns: string, element: Element, att: string) =>\n element.getAttributeNS(ns, att);\n\nexport default getAttributeNS;\n","/**\n * Shortcut for `Element.hasAttribute()` method.\n *\n * @param element target element\n * @param att attribute name\n * @returns the query result\n */\nconst hasAttribute = (element: Element, att: string): boolean =>\n element.hasAttribute(att);\n\nexport default hasAttribute;\n","/**\n * Shortcut for `Element.hasAttributeNS()` method.\n *\n * @param ns attribute namespace\n * @param element target element\n * @param att attribute name\n * @returns the query result\n */\nconst hasAttributeNS = (\n ns: string,\n element: Element,\n att: string,\n): boolean => element.hasAttributeNS(ns, att);\n\nexport default hasAttributeNS;\n","/**\n * Shortcut for `Element.setAttribute()` method.\n *\n * @param element target element\n * @param att attribute name\n * @param value attribute value\n */\nconst setAttribute = (element: Element, att: string, value: string) =>\n element.setAttribute(att, value);\n\nexport default setAttribute;\n","/**\n * Shortcut for `Element.setAttributeNS()` method.\n *\n * @param ns attribute namespace\n * @param element target element\n * @param att attribute name\n * @param value attribute value\n */\nconst setAttributeNS = (\n ns: string,\n element: Element,\n att: string,\n value: string,\n): void => element.setAttributeNS(ns, att, value);\n\nexport default setAttributeNS;\n","/**\n * Shortcut for `Element.removeAttribute()` method.\n *\n * @param element target element\n * @param att attribute name\n */\nconst removeAttribute = (element: Element, att: string): void =>\n element.removeAttribute(att);\n\nexport default removeAttribute;\n","/**\n * Shortcut for `Element.removeAttributeNS()` method.\n *\n * @param ns attribute namespace\n * @param element target element\n * @param att attribute name\n */\nconst removeAttributeNS = (\n ns: string,\n element: Element,\n att: string,\n): void => element.removeAttributeNS(ns, att);\n\nexport default removeAttributeNS;\n","/**\n * Add one or more CSS classes to `Element.classList`.\n *\n * @param element target\n * @param classNAME to add\n */\nconst addClass = (element: Element, ...classNAME: string[]): void => {\n element.classList.add(...classNAME);\n};\n\nexport default addClass;\n","/**\n * Remove one or more classes from `Element.classList`.\n *\n * @param element target\n * @param classNAME to remove\n */\nconst removeClass = (element: Element, ...classNAME: string[]): void => {\n element.classList.remove(...classNAME);\n};\n\nexport default removeClass;\n","/**\n * Check class in `Element.classList`.\n *\n * @param element target\n * @param classNAME to check\n */\nconst hasClass = (element: Element, classNAME: string): boolean => {\n return element.classList.contains(classNAME);\n};\n\nexport default hasClass;\n","/**\n * A global namespace for `document.body`.\n */\nconst { body: documentBody } = document;\nexport default documentBody;\n","/**\n * A global namespace for `document.documentElement` or the ``.\n */\nconst { documentElement } = document;\nexport default documentElement;\n","/**\n * A global namespace for `document.head`.\n */\nconst { head: documentHead } = document;\nexport default documentHead;\n","/**\n * Shortie for `Array.from()` static method.\n * The utility should also work with any typed arrays\n * like Float64Array or Int32Array.\n *\n * @param arr array-like iterable object\n * @returns a new array from iterable object\n */\nconst ArrayFrom = (arr: ArrayLike | Iterable): T[] => Array.from(arr);\n\nexport default ArrayFrom;\n","/**\n * Checks if a value is an `Object`.\n *\n * @param obj the target object\n * @returns the query result\n */\nconst isObject = (obj?: unknown): obj is object =>\n (obj !== null && obj !== undefined && typeof obj === \"object\") || false;\n\nexport default isObject;\n","import isObject from \"./isObject\";\n\ntype NodeObject = object & { nodeType: number };\n\n/**\n * Checks if an object is a `Node`.\n *\n * @param node the target object\n * @see https://dom.spec.whatwg.org/#node\n *\n * ```\n * ELEMENT_NODE = 1;\n * ATTRIBUTE_NODE = 2;\n * TEXT_NODE = 3;\n * CDATA_SECTION_NODE = 4;\n * ENTITY_REFERENCE_NODE = 5; // legacy\n * ENTITY_NODE = 6; // legacy\n * PROCESSING_INSTRUCTION_NODE = 7;\n * COMMENT_NODE = 8;\n * DOCUMENT_NODE = 9;\n * DOCUMENT_TYPE_NODE = 10;\n * DOCUMENT_FRAGMENT_NODE = 11;\n * @returns the query result\n */\nconst isNode = (node?: unknown): node is Node =>\n (isObject(node) &&\n typeof (node as NodeObject).nodeType === \"number\" &&\n [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((x) =>\n (node as NodeObject).nodeType === x\n )) ||\n false;\n\nexport default isNode;\n","import isNode from \"./isNode\";\n\n/**\n * Checks if an object is an `Element`.\n *\n * @param element the target object\n * @returns the query result\n */\nconst isElement = (element?: unknown): element is Element =>\n (isNode(element) && element.nodeType === 1) || false;\n\nexport default isElement;\n","import isElement from \"../is/isElement\";\n\nconst componentData = new Map>();\n\n/**\n * An interface for web components background data.\n *\n * @see https://github.com/thednp/bootstrap.native/blob/master/src/components/base-component.js\n */\nconst Data = {\n data: componentData,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (element: Element, component: string, instance: T): void => {\n if (!isElement(element)) return;\n\n /* istanbul ignore else @preserve */\n if (!componentData.has(component)) {\n componentData.set(component, new Map());\n }\n\n const instanceMap = componentData.get(component) as Map;\n // not undefined, but defined right above\n instanceMap.set(element, instance);\n },\n\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (component: string): Map | null => {\n const instanceMap = componentData.get(component) as Map;\n\n return instanceMap || null;\n },\n\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (element: Element, component: string): T | null => {\n if (!isElement(element) || !component) return null;\n const instanceMap = Data.getAllFor(component);\n\n const instance = element && instanceMap && instanceMap.get(element);\n\n return instance || null;\n },\n\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (element: Element, component: string): void => {\n const instanceMap = Data.getAllFor(component);\n\n if (!instanceMap || !isElement(element)) return;\n\n instanceMap.delete(element);\n\n /* istanbul ignore else @preserve */\n if (instanceMap.size === 0) {\n componentData.delete(component);\n }\n },\n};\n\nexport default Data;\n","import Data from \"./data\";\n\n/**\n * An alias for `Data.get()`.\n */\nconst getInstance = (target: Element, component: string): T | null =>\n Data.get(target, component);\n\nexport default getInstance;\n","/**\n * Capitalize first character in a string.\n * @param input source string\n */\nconst capitalize = (input: string) =>\n input?.charAt(0).toUpperCase() + input?.slice(1);\n\nexport default capitalize;\n","/**\n * Transform a string to camel case.\n * @param input source string\n */\nconst camelCase = (input: string) =>\n input?.trim().replace(\n /(?:^\\w|[A-Z]|\\b\\w)/g,\n (word, index) => index === 0 ? word.toLowerCase() : word.toUpperCase(),\n ).replace(/\\s+/g, \"\");\n\nexport default camelCase;\n","/**\n * Shortie for `typeof SOMETHING === \"string\"`.\n *\n * @param str input value\n * @returns the query result\n */\nconst isString = (str?: unknown): str is string =>\n typeof str === \"string\" || false;\n\nexport default isString;\n","import isObject from \"./isObject\";\n\n/**\n * Check if a target object is `Window`.\n * => equivalent to `object instanceof Window`\n *\n * @param obj the target object\n * @returns the query result\n */\nconst isWindow = (obj?: unknown): obj is Window =>\n (isObject(obj) && obj.constructor.name === \"Window\") || false;\n\nexport default isWindow;\n","import isNode from \"./isNode\";\n\n/**\n * Checks if an object is a `Document`.\n *\n * @see https://dom.spec.whatwg.org/#node\n *\n * @param obj the target object\n * @returns the query result\n */\nconst isDocument = (obj?: unknown): obj is Document =>\n (isNode(obj) && obj.nodeType === 9) || false;\n\nexport default isDocument;\n","import isNode from \"../is/isNode\";\nimport isWindow from \"../is/isWindow\";\nimport isDocument from \"../is/isDocument\";\n\n/**\n * Returns the `document` or the `#document` element.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param node the reference node\n * @returns the parent document of the given node\n */\nconst getDocument = (node?: Node | Document | Window): Document => {\n // node instanceof Document\n if (isDocument(node)) return node;\n // node instanceof Node\n if (isNode(node)) return node.ownerDocument as Document;\n // node instanceof Window\n if (isWindow(node)) return node.document;\n // node is undefined | NULL\n return globalThis.document;\n};\n\nexport default getDocument;\n","/**\n * Overloads for Object.assign.\n *\n * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/object-assign/index.d.ts\n */\ndeclare function ObjectAssignTyped(target: T, source: U): T & U;\ndeclare function ObjectAssignTyped(\n target: T,\n source1: U,\n source2: V,\n): T & U & V;\ndeclare function ObjectAssignTyped(\n target: T,\n source1: U,\n source2: V,\n source3: W,\n): T & U & V & W;\ndeclare function ObjectAssignTyped(\n target: T,\n source1: U,\n source2: V,\n source3: W,\n source4: Q,\n): T & U & V & W & Q;\ndeclare function ObjectAssignTyped(\n target: T,\n source1: U,\n source2: V,\n source3: W,\n source4: Q,\n source5: R,\n): T & U & V & W & Q & R;\ndeclare function ObjectAssignTyped(\n target: unknown,\n ...sources: unknown[]\n): unknown;\n\n/**\n * Shortcut for `Object.assign()` static method.\n *\n * @param obj a target object\n * @param source source object(s)\n * @see https://github.com/devinrhode2/ObjectTyped/blob/master/src/index.ts\n */\nconst ObjectAssign: typeof ObjectAssignTyped = <\n A extends Record,\n B,\n>(\n obj: A,\n ...source: B[]\n): B extends Record[] ? unknown : A & B =>\n Object.assign(obj, ...source);\n\nexport default ObjectAssign;\n","import isString from \"../is/isString\";\nimport getDocument from \"../get/getDocument\";\nimport ObjectAssign from \"./ObjectAssign\";\n\n/**\n * Shortie for `document.createElement` method\n * which allows you to create a new `HTMLElement` for a given `tagName`\n * or based on an object with specific non-readonly attributes with string values:\n * `id`, `className`, `textContent`, `style`, etc.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement\n *\n * @param param `tagName` or object\n * @return a new `HTMLElement`\n */\nconst createElement = (\n param?: string | Partial,\n): T | undefined => {\n if (!param) return undefined;\n\n if (isString(param)) {\n return getDocument().createElement(param) as T;\n }\n\n const { tagName } = param;\n const newElement = createElement(tagName as string);\n\n if (!newElement) return undefined;\n\n const attr = { ...(param as Record) };\n delete attr.tagName;\n\n return ObjectAssign(newElement, attr) as unknown as T;\n};\n\nexport default createElement;\n","import getDocument from \"../get/getDocument\";\nimport ObjectAssign from \"./ObjectAssign\";\nimport isString from \"../is/isString\";\n\n/**\n * Shortie for `document.createElementNS` method\n * which allows you to create a new `Element` for a given `tagName`\n * or based on an object with specific non-readonly attributes with string values:\n * `id`, `className`, `textContent`, `style`, etc.\n * Note: some elements resulted from this function call may not be compatible with\n * some attributes.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS\n *\n * @param ns `namespaceURI` to associate with the new `Element`\n * @param param `tagName` or object\n * @return a new `Element`\n */\nconst createElementNS = (\n ns: string,\n param?: string | Partial,\n): T | undefined => {\n if (!ns || !param) return undefined;\n\n if (isString(param)) {\n return getDocument().createElementNS(ns, param) as T;\n }\n\n const { tagName } = param;\n const newElement = createElementNS(ns, tagName);\n\n if (!newElement) return undefined;\n\n const attr = { ...(param as Record) };\n delete attr.tagName;\n\n return ObjectAssign(newElement, attr) as unknown as T;\n};\n\nexport default createElementNS;\n","/**\n * Shortcut for the `Element.dispatchEvent(Event)` method.\n *\n * @param element is the target\n * @param event is the `Event` object\n */\nconst dispatchEvent = (element: EventTarget, event: Event): boolean =>\n element.dispatchEvent(event);\n\nexport default dispatchEvent;\n","/**\n * JavaScript `Array` distinct.\n *\n * @see https://codeburst.io/javascript-array-distinct-5edc93501dc4\n *\n * @example\n * ```\n * [0,1,1,2].filter(distinct)\n * // => [0,1,2]\n * ```\n * @param value array item value\n * @param index array item index\n * @param arr a clone of the target array\n * @returns the query result\n */\nconst distinct = (value: T, index: number, arr: T[]): boolean =>\n arr.indexOf(value) === index;\n\nexport default distinct;\n","// import CSS4Declaration from \"../interface/css4Declaration\";\n\n/**\n * Shortcut for `window.getComputedStyle(element).propertyName`\n * static method.\n *\n * * If `element` parameter is not an `Element`, `getComputedStyle`\n * throws a `ReferenceError`.\n *\n * @param element target `Element`\n * @param property the css property\n * @param pseudoElt pseudo-elements\n * @return the css property value\n */\nconst getElementStyle = (\n element: Element,\n property: string,\n pseudoElt?: string | null,\n): string => {\n const computedStyle = getComputedStyle(element, pseudoElt);\n const prop = property\n .replace(\"webkit\", \"Webkit\")\n .replace(/([A-Z])/g, \"-$1\")\n .toLowerCase();\n\n // modern browsers only\n return computedStyle.getPropertyValue(prop);\n};\n\nexport default getElementStyle;\n","import animationDelay from \"../strings/animationDelay\";\nimport animationName from \"../strings/animationName\";\nimport getElementStyle from \"./getElementStyle\";\n\n/**\n * Utility to get the computed `animationDelay`\n * from Element in miliseconds.\n *\n * @param element target\n * @return the `animationDelay` value in miliseconds\n */\nconst getElementAnimationDelay = (\n element: Element,\n): number => {\n const propertyValue = getElementStyle(element, animationName);\n const durationValue = getElementStyle(element, animationDelay);\n const durationScale = durationValue.includes(\"ms\")\n ? /* istanbul ignore next @preserve */ 1\n : 1000;\n const duration = propertyValue && propertyValue !== \"none\"\n ? parseFloat(durationValue) * durationScale\n : 0;\n\n return !Number.isNaN(duration)\n ? duration\n : /* istanbul ignore next @preserve */ 0;\n};\n\nexport default getElementAnimationDelay;\n","import animationDuration from \"../strings/animationDuration\";\nimport animationName from \"../strings/animationName\";\nimport getElementStyle from \"./getElementStyle\";\n\n/**\n * Utility to get the computed `animationDuration`\n * from `Element` in miliseconds.\n *\n * @param element target\n * @return the `animationDuration` value in miliseconds\n */\nconst getElementAnimationDuration = (\n element: Element,\n): number => {\n const propertyValue = getElementStyle(element, animationName);\n const durationValue = getElementStyle(element, animationDuration);\n const durationScale = durationValue.includes(\"ms\")\n ? /* istanbul ignore next @preserve */ 1\n : 1000;\n const duration = propertyValue && propertyValue !== \"none\"\n ? parseFloat(durationValue) * durationScale\n : 0;\n\n return !Number.isNaN(duration)\n ? duration\n : /* istanbul ignore next @preserve */ 0;\n};\n\nexport default getElementAnimationDuration;\n","import animationEndEvent from \"../strings/animationEndEvent\";\nimport getElementAnimationDelay from \"../get/getElementAnimationDelay\";\nimport getElementAnimationDuration from \"../get/getElementAnimationDuration\";\nimport dispatchEvent from \"./dispatchEvent\";\n\n/**\n * Utility to make sure callbacks are consistently\n * called when animation ends.\n *\n * @param element target\n * @param handler `animationend` callback\n */\nconst emulateAnimationEnd = (\n element: Element,\n handler: EventListener,\n): void => {\n let called = 0;\n const endEvent = new Event(animationEndEvent);\n const duration = getElementAnimationDuration(element);\n const delay = getElementAnimationDelay(element);\n\n if (duration) {\n // Wrap the handler in on -> off callback\n const animationEndWrapper = (e: Event): void => {\n /* istanbul ignore else @preserve */\n if (e.target === element) {\n handler.apply(element, [e]);\n element.removeEventListener(animationEndEvent, animationEndWrapper);\n called = 1;\n }\n };\n element.addEventListener(animationEndEvent, animationEndWrapper);\n setTimeout(() => {\n /* istanbul ignore next @preserve */\n if (!called) dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else {\n /* istanbul ignore next @preserve */\n handler.apply(element, [endEvent]);\n }\n};\n\nexport default emulateAnimationEnd;\n","import transitionDelay from \"../strings/transitionDelay\";\nimport transitionProperty from \"../strings/transitionProperty\";\nimport getElementStyle from \"./getElementStyle\";\n\n/**\n * Utility to get the computed `transitionDelay`\n * from Element in miliseconds.\n *\n * @param element target\n * @return the `transitionDelay` value in miliseconds\n */\nconst getElementTransitionDelay = (element: Element) => {\n const propertyValue = getElementStyle(element, transitionProperty);\n const delayValue = getElementStyle(element, transitionDelay);\n const delayScale = delayValue.includes(\"ms\")\n ? /* istanbul ignore next @preserve */ 1\n : 1000;\n const duration = propertyValue && propertyValue !== \"none\"\n ? parseFloat(delayValue) * delayScale\n : /* istanbul ignore next @preserve */ 0;\n\n return !Number.isNaN(duration)\n ? duration\n : /* istanbul ignore next @preserve */ 0;\n};\n\nexport default getElementTransitionDelay;\n","import transitionDuration from \"../strings/transitionDuration\";\nimport transitionProperty from \"../strings/transitionProperty\";\nimport getElementStyle from \"./getElementStyle\";\n\n/**\n * Utility to get the computed `transitionDuration`\n * from Element in miliseconds.\n *\n * @param element target\n * @return the `transitionDuration` value in miliseconds\n */\nconst getElementTransitionDuration = (element: Element) => {\n const propertyValue = getElementStyle(element, transitionProperty);\n const durationValue = getElementStyle(element, transitionDuration);\n const durationScale = durationValue.includes(\"ms\")\n ? /* istanbul ignore next @preserve */ 1\n : 1000;\n const duration = propertyValue && propertyValue !== \"none\"\n ? parseFloat(durationValue) * durationScale\n : /* istanbul ignore next @preserve */ 0;\n\n return !Number.isNaN(duration)\n ? duration\n : /* istanbul ignore next @preserve */ 0;\n};\n\nexport default getElementTransitionDuration;\n","import transitionEndEvent from \"../strings/transitionEndEvent\";\nimport getElementTransitionDelay from \"../get/getElementTransitionDelay\";\nimport getElementTransitionDuration from \"../get/getElementTransitionDuration\";\nimport dispatchEvent from \"./dispatchEvent\";\n\n/**\n * Utility to make sure callbacks are consistently\n * called when transition ends.\n *\n * @param element element target\n * @param handler `transitionend` callback\n */\nconst emulateTransitionEnd = (\n element: Element,\n handler: EventListener,\n): void => {\n let called = 0;\n const endEvent = new Event(transitionEndEvent);\n const duration = getElementTransitionDuration(element);\n const delay = getElementTransitionDelay(element);\n\n if (duration) {\n // Wrap the handler in on -> off callback\n const transitionEndWrapper = (e: Event): void => {\n /* istanbul ignore else @preserve */\n if (e.target === element) {\n handler.apply(element, [e]);\n element.removeEventListener(transitionEndEvent, transitionEndWrapper);\n called = 1;\n }\n };\n element.addEventListener(transitionEndEvent, transitionEndWrapper);\n setTimeout(() => {\n /* istanbul ignore next @preserve */\n if (!called) dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else {\n handler.apply(element, [endEvent]);\n }\n};\n\nexport default emulateTransitionEnd;\n","/**\n * Shortcut for `Float32Array.from()` static method.\n *\n * @param arr array-like iterable object\n * @returns a new Float32Array\n */\nconst Float32ArrayFrom = (\n arr: ArrayLike | Iterable,\n): Float32Array => Float32Array.from(Array.from(arr));\n\nexport default Float32ArrayFrom;\n","/**\n * Shortcut for `Float64Array.from()` static method.\n *\n * @param arr array-like iterable object\n * @returns a new Float64Array\n */\nconst Float64ArrayFrom = (\n arr: ArrayLike | Iterable,\n): Float64Array => Float64Array.from(Array.from(arr));\n\nexport default Float64ArrayFrom;\n","/**\n * Shortie for `HTMLOrSVGElement.focus()` method.\n *\n * @param element is the target\n * @param options allows to pass additional options such as `preventScroll: boolean`\n */\nconst focus = (element: HTMLOrSVGElement, options?: FocusOptions): void =>\n element.focus(options);\n\nexport default focus;\n","/**\n * Transform a string to kebab case.\n * @param input source string\n */\nconst kebabCase = (input: string) =>\n input?.trim().replace(/([a-z])([A-Z])/g, \"$1-$2\")\n .replace(/\\s+/g, \"-\")\n .toLowerCase();\n\nexport default kebabCase;\n","import { Fn } from \"../interface/fn\";\n\ntype NormalValue = boolean | number | string | Fn | null;\n\n/**\n * Utility to normalize component options\n *\n * @param value the input value\n * @return the normalized value\n */\nconst normalizeValue = (value?: unknown): NormalValue => {\n if ([\"true\", true].includes(value as boolean)) {\n return true;\n }\n\n if ([\"false\", false].includes(value as boolean)) {\n return false;\n }\n\n if ([\"null\", \"\", null, undefined].includes(value as string | undefined)) {\n return null;\n }\n\n if (value !== \"\" && !Number.isNaN(+(value as string))) {\n return +(value as string);\n }\n\n // string / function / Element / object / undefined\n return value as NormalValue;\n};\n\nexport default normalizeValue;\n","/**\n * Shortcut for `Object.entries()` static method.\n *\n * @param obj a target object\n * @returns the entries of an object in an array format [key, value][]\n * @see https://github.com/devinrhode2/ObjectTyped/blob/master/src/index.ts\n */\nconst ObjectEntries = >(obj: O) =>\n Object.entries(obj) as [keyof O, O[keyof O]][];\n\nexport default ObjectEntries;\n","import isElement from \"../is/isElement\";\nimport getAttribute from \"../attr/getAttribute\";\nimport normalizeValue from \"./normalizeValue\";\nimport ObjectEntries from \"./ObjectEntries\";\nimport camelCase from \"./camelCase\";\n\n/**\n * Utility to normalize component options.\n *\n * @param element target\n * @param defaultOps component default options\n * @param inputOps component instance options\n * @param ns component namespace\n * @return normalized component options object\n */\nconst normalizeOptions = (\n element: Element,\n defaultOps: T,\n inputOps: Partial,\n ns?: string,\n): T => {\n /* istanbul ignore next @preserve */\n if (!isElement(element)) return defaultOps;\n\n const INPUT = { ...inputOps } as T;\n // typescript is not sure if Element.dataset is supported\n const data = { ...(element as HTMLElement).dataset };\n const normalOps = { ...defaultOps };\n const dataOps: Partial = {};\n const title = \"title\";\n\n ObjectEntries(data).forEach(([k, v]) => {\n const key: keyof T = ns && typeof k === \"string\" && k.includes(ns)\n ? camelCase(k.replace(ns, \"\"))\n : /* istanbul ignore next @preserve */ camelCase(k as string);\n\n dataOps[key] = normalizeValue(v) as T[keyof T];\n });\n\n ObjectEntries(INPUT).forEach(([k, v]) => {\n INPUT[k] = normalizeValue(v) as T[keyof T];\n });\n\n ObjectEntries(defaultOps).forEach(([k, v]) => {\n /* istanbul ignore else @preserve */\n if (k in INPUT) {\n normalOps[k] = INPUT[k] as T[keyof T];\n } else if (k in dataOps) {\n normalOps[k] = dataOps[k] as T[keyof T];\n } else {\n normalOps[k] =\n (k === title ? getAttribute(element, title) : v) as T[keyof T];\n }\n });\n\n return normalOps;\n};\n\nexport default normalizeOptions;\n","import isObject from \"../is/isObject\";\n\n/**\n * A shortcut to `Object.hasOwn()` static method to work\n * with regular `Object` elements.\n *\n * @see https://fettblog.eu/typescript-hasownproperty/\n * @param obj the target object\n * @param prop the property to check\n * @returns the query result\n */\nconst ObjectHasOwn = (\n obj: T,\n prop: K,\n): obj is T & Record =>\n isObject(obj) && (Object.hasOwn(obj, prop) || prop in obj);\n\nexport default ObjectHasOwn;\n","/**\n * Shortcut for `Object.keys()` static method.\n *\n * @param obj a target object\n * @returns an array with object keys\n * @see https://github.com/devinrhode2/ObjectTyped/blob/master/src/index.ts\n */\nconst ObjectKeys = >(obj: O) =>\n Object.keys(obj) as (keyof O)[];\n\nexport default ObjectKeys;\n","/**\n * Shortcut for `Object.values()` static method.\n *\n * @param obj a target object\n * @returns an array with the object values\n * @see https://github.com/devinrhode2/ObjectTyped/blob/master/src/index.ts\n */\nconst ObjectValues = >(\n obj: O,\n): O[keyof O][] => Object.values(obj) as O[keyof O][];\n\nexport default ObjectValues;\n","/**\n * Shortcut for `Object.fromEntries()` static method.\n *\n * @param entries a target entries object\n * @returns a new Object created from the specified entries in array format [key, value][]\n * @see https://github.com/devinrhode2/ObjectTyped/blob/master/src/index.ts\n */\nconst ObjectFromEntries = (entries: [K, V][]) =>\n Object.fromEntries(entries) as Record;\n\nexport default ObjectFromEntries;\n","import type { OriginalEvent } from \"../interface/originalEvent\";\nimport isObject from \"../is/isObject\";\nimport ObjectAssign from \"./ObjectAssign\";\n\n/**\n * Returns a namespaced `CustomEvent` specific to each component.\n *\n * @param eventType Event.type\n * @param config Event.options | Event.properties\n * @returns a new namespaced event\n */\nconst createCustomEvent = <\n O extends unknown & Record,\n T extends OriginalEvent,\n>(\n eventType: string,\n config?: O,\n): T => {\n const OriginalCustomEvent = new CustomEvent(eventType, {\n cancelable: true,\n bubbles: true,\n }) as T;\n\n /* istanbul ignore else @preserve */\n if (isObject(config)) {\n ObjectAssign(OriginalCustomEvent, config);\n }\n return OriginalCustomEvent;\n};\n\nexport default createCustomEvent;\n","/**\n * A global namespace for most scroll event listeners.\n */\nconst passiveHandler: Partial = { passive: true };\n\nexport default passiveHandler;\n","/**\n * Utility to force re-paint of an `HTMLElement` target.\n *\n * @param element is the target\n * @return the `Element.offsetHeight` value\n */\nconst reflow = (element: HTMLElement): number => element.offsetHeight;\n\nexport default reflow;\n","import ObjectAssign from \"./ObjectAssign\";\nimport ObjectEntries from \"./ObjectEntries\";\nimport isString from \"../is/isString\";\nimport type { CSS4Declaration } from \"../interface/css4Declaration\";\n\n/**\n * Shortcut for multiple uses of `HTMLElement.style.propertyName` method.\n *\n * @param element target element\n * @param styles attribute value\n */\nconst setElementStyle = (\n element: Element,\n styles: Partial,\n): void => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (value && isString(key as string) && (key as string).includes(\"--\")) {\n // typescript allows getting the style of Element but not set?\n (element as HTMLElement).style.setProperty(key as string, value);\n } else {\n const propObject: Partial = {};\n propObject[key] = value;\n ObjectAssign((element as HTMLElement).style, propObject);\n }\n });\n};\nexport default setElementStyle;\n","import isObject from \"./isObject\";\n\n/**\n * Checks if an element is a `Map`.\n *\n * @param obj the target object\n * @returns the query result\n */\nconst isMap = (obj?: unknown): obj is Map =>\n (isObject(obj) && obj.constructor.name === \"Map\") || false;\nexport default isMap;\n","/**\n * Shortie for `typeof SOMETHING === \"number\"`.\n *\n * @param num input value\n * @returns the query result\n */\nconst isNumber = (num?: unknown): num is number =>\n typeof num === \"number\" || false;\n\nexport default isNumber;\n","import isMap from \"../is/isMap\";\nimport isElement from \"../is/isElement\";\nimport isNumber from \"../is/isNumber\";\n\ntype KeyMap = Map;\ntype TimeMap = Map;\n\nconst TimeCache: TimeMap = new Map() as TimeMap;\n/**\n * An interface for one or more `TimerHandler`s per `Element`.\n *\n * @see https://github.com/thednp/navbar/\n */\nconst Timer = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (\n element: Element,\n callback: TimerHandler,\n delay: number,\n key?: string,\n ): void => {\n if (!isElement(element)) return;\n\n // @legal test comment\n // @license test comment\n /* @legal comment */\n /* @license comment */\n /* test @legal comment */\n /* test @license comment */\n\n /* istanbul ignore else @preserve */\n if (key && key.length) {\n /* istanbul ignore else @preserve */\n if (!TimeCache.has(element)) {\n TimeCache.set(element, new Map());\n }\n (TimeCache.get(element) as KeyMap).set(key, setTimeout(callback, delay));\n } else {\n TimeCache.set(element, setTimeout(callback, delay));\n }\n },\n\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (element: Element, key?: string): number | null => {\n if (!isElement(element)) return null;\n const keyTimers = TimeCache.get(element);\n\n if (key && keyTimers && isMap(keyTimers as KeyMap)) {\n return (keyTimers as KeyMap).get(key) ||\n /* istanbul ignore next @preserve */\n null;\n } else if (isNumber(keyTimers as number)) {\n return keyTimers as number;\n }\n return null;\n },\n\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (element: Element, key?: string): void => {\n if (!isElement(element)) return;\n\n const keyTimers = TimeCache.get(element);\n\n if (key && key.length && isMap(keyTimers as KeyMap)) {\n clearTimeout((keyTimers as KeyMap).get(key));\n (keyTimers as KeyMap).delete(key);\n /* istanbul ignore else @preserve */\n if ((keyTimers as KeyMap).size === 0) {\n TimeCache.delete(element);\n }\n } else {\n clearTimeout(keyTimers as number);\n TimeCache.delete(element);\n }\n },\n};\n\nexport default Timer;\n","/**\n * Shortcut for `String.toLowerCase()`.\n *\n * @param source input string\n * @returns lowercase output string\n */\nconst toLowerCase = (source: string): string => source.toLowerCase();\n\nexport default toLowerCase;\n","/**\n * Shortcut for `String.toUpperCase()`.\n *\n * @param source input string\n * @returns uppercase output string\n */\nconst toUpperCase = (source: string): string => source.toUpperCase();\n\nexport default toUpperCase;\n","import getDocument from \"../get/getDocument\";\nimport isNode from \"../is/isNode\";\n\n/**\n * A shortcut for `(document|Element).querySelectorAll`.\n *\n * @param selector the input selector\n * @param parent optional node to look into\n * @return the query result\n */\nconst querySelectorAll = (\n selector: string,\n parent?: ParentNode,\n) => {\n const lookUp = isNode(parent) ? parent : getDocument();\n return lookUp.querySelectorAll(selector);\n};\n\nexport default querySelectorAll;\n","import ariaHidden from \"../strings/ariaHidden\";\nimport focusableSelector from \"../strings/focusableSelector\";\nimport querySelectorAll from \"../selectors/querySelectorAll\";\nimport getAttribute from \"../attr/getAttribute\";\nimport hasAttribute from \"../attr/hasAttribute\";\nimport off from \"../event/off\";\nimport on from \"../event/on\";\nimport getDocument from \"../get/getDocument\";\nimport { KeyboardEvent } from \"../interface/event\";\n\nconst focusTrapMap = new Map();\n\nexport type FocusableElement =\n | HTMLAnchorElement\n | HTMLButtonElement\n | HTMLInputElement\n | HTMLTextAreaElement\n | HTMLDataListElement\n | HTMLDetailsElement\n | HTMLSelectElement;\n\nexport function handleKeyboardNavigation(\n this: T,\n event: KeyboardEvent,\n) {\n const { shiftKey, code } = event;\n const doc = getDocument(this);\n const focusableElements = [\n ...querySelectorAll(focusableSelector, this),\n ].filter(\n (el) => !hasAttribute(el, \"disabled\") && !getAttribute(el, ariaHidden),\n );\n\n if (!focusableElements.length) return;\n const firstFocusable = focusableElements[0];\n const lastFocusable = focusableElements[focusableElements.length - 1];\n\n /* istanbul ignore else @preserve */\n if (code === \"Tab\") {\n if (shiftKey && doc.activeElement === firstFocusable) {\n lastFocusable.focus();\n event.preventDefault();\n } else if (!shiftKey && doc.activeElement === lastFocusable) {\n firstFocusable.focus();\n event.preventDefault();\n }\n }\n}\n\n/**\n * Utility to check if a designated element is affected by focus trap;\n * @param target\n */\nexport const hasFocusTrap = (target: Element) =>\n focusTrapMap.has(target) === true;\n\n/**\n * Utility to add focus trap inside a designated target element;\n * @param target\n */\nexport const addFocusTrap = (target: Element) => {\n if (hasFocusTrap(target)) return;\n on(target, \"keydown\", handleKeyboardNavigation);\n focusTrapMap.set(target, true);\n};\n\n/**\n * Utility to remove focus trap inside a designated target element;\n * @param target\n */\nexport const removeFocusTrap = (target: Element) => {\n if (!hasFocusTrap(target)) return;\n off(target, \"keydown\", handleKeyboardNavigation);\n focusTrapMap.delete(target);\n};\n\n/**\n * Utility to toggle focus trap inside a designated target element;\n * @param target\n */\nexport const toggleFocusTrap = (target: Element) => {\n if (hasFocusTrap(target)) removeFocusTrap(target);\n else addFocusTrap(target);\n};\n","import isElement from \"./isElement\";\n\n/**\n * Checks if an element is an `HTMLElement`.\n *\n * @see https://dom.spec.whatwg.org/#node\n *\n * @param element the target object\n * @returns the query result\n */\nconst isHTMLElement = (element?: unknown): element is HTMLElement =>\n (isElement(element) && \"offsetWidth\" in element) || false;\nexport default isHTMLElement;\n","import isHTMLElement from \"../is/isHTMLElement\";\nimport type { BoundingClientRect } from \"../interface/boundingClientRect\";\n\n/**\n * Returns the bounding client rect of a target `Element`.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element event.target\n * @param includeScale when *true*, the target scale is also computed\n * @returns the bounding client rect object\n */\nconst getBoundingClientRect = (\n element: Element,\n includeScale?: boolean,\n): BoundingClientRect => {\n const { width, height, top, right, bottom, left } = element\n .getBoundingClientRect();\n let scaleX = 1;\n let scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n const { offsetWidth, offsetHeight } = element;\n scaleX = offsetWidth > 0\n ? Math.round(width) / offsetWidth\n : /* istanbul ignore next @preserve */ 1;\n scaleY = offsetHeight > 0\n ? Math.round(height) / offsetHeight\n : /* istanbul ignore next @preserve */ 1;\n }\n\n return {\n width: width / scaleX,\n height: height / scaleY,\n top: top / scaleY,\n right: right / scaleX,\n bottom: bottom / scaleY,\n left: left / scaleX,\n x: left / scaleX,\n y: top / scaleY,\n };\n};\n\nexport default getBoundingClientRect;\n","import getDocument from \"./getDocument\";\n\n/**\n * Returns the `document.body` or the `` element.\n *\n * @param node the reference node\n * @returns the parent `` of the specified node\n */\nconst getDocumentBody = (node?: Node | Document | Window) => {\n return getDocument(node).body;\n};\n\nexport default getDocumentBody;\n","import getDocument from \"./getDocument\";\n\n/**\n * Returns the `document.documentElement` or the `` element.\n *\n * @param node the reference node\n * @returns the parent `` of the node's parent document\n */\nconst getDocumentElement = (node?: Node | Document | Window) => {\n return getDocument(node).documentElement;\n};\n\nexport default getDocumentElement;\n","import getDocument from \"./getDocument\";\n/**\n * Returns the `document.head` or the `` element.\n *\n * @param node the reference node\n * @returns the `` of the node's parent document\n */\nconst getDocumentHead = (\n node?: Node | Document | Window,\n) => {\n return getDocument(node).head;\n};\n\nexport default getDocumentHead;\n","import isNode from \"../is/isNode\";\n\n/**\n * Returns the value of `node.nodeName` for the given node.\n * @param node target node\n * @returns the node name\n */\nconst getNodeName = (node: Node | Window) => {\n /* istanbul ignore else @preserve */\n if (isNode(node)) {\n return (node.nodeName || /* istanbul ignore next @preserve */ \"\")\n .toLowerCase();\n }\n /* istanbul ignore next @preserve */\n return \"#document\";\n};\n\nexport default getNodeName;\n","import isWindow from \"../is/isWindow\";\n\n/**\n * Returns an `{x, y}` object with the target\n * `Element` / `Node` scroll position.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element target node / element\n * @returns the scroll tuple\n */\nconst getNodeScroll = (\n element: Element | Window,\n): { x: number; y: number } => {\n const isWin = isWindow(element);\n const x = isWin ? element.scrollX : element.scrollLeft;\n const y = isWin ? element.scrollY : element.scrollTop;\n\n return { x, y };\n};\n\nexport default getNodeScroll;\n","import isNode from \"./isNode\";\n\n/**\n * Check if target is a `ShadowRoot`.\n *\n * @param element target\n * @returns the query result\n */\nconst isShadowRoot = (element?: unknown): element is ShadowRoot =>\n (isNode(element) && element.constructor.name === \"ShadowRoot\") || false;\n\nexport default isShadowRoot;\n","import getDocumentElement from \"./getDocumentElement\";\nimport isShadowRoot from \"../is/isShadowRoot\";\nimport isElement from \"../is/isElement\";\nimport isNode from \"../is/isNode\";\n\n/**\n * Returns the `parentNode` also going through `ShadowRoot`.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param node the target node\n * @returns the apropriate parent node\n */\nconst getParentNode = (node: Node) => {\n if (node.nodeName === \"HTML\") {\n return node as HTMLElement;\n }\n\n // this is a quicker (but less type safe) way to save quite some bytes from the bundle\n return (\n (isElement(node) && node.assignedSlot) || // step into the shadow DOM of the parent of a slotted node\n (isNode(node) && node.parentNode) || // DOM Element detected\n (isShadowRoot(node) && node.host) || // ShadowRoot detected\n getDocumentElement(node) // fallback to \n );\n};\n\nexport default getParentNode;\n","import isDocument from \"../is/isDocument\";\nimport isNode from \"../is/isNode\";\n\n/**\n * Returns the `Window` object of a target node.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param node target node\n * @returns the `Window` object\n */\nconst getWindow = (node?: Node): Window => {\n // node is undefined | NULL\n if (!node) return window;\n // node instanceof Document\n if (isDocument(node)) return node.defaultView as Window;\n // node instanceof Node\n if (isNode(node)) return node?.ownerDocument?.defaultView as Window;\n // node is instanceof Window\n return node;\n};\n\nexport default getWindow;\n","import isNode from \"./isNode\";\n\n/**\n * Check if a target element is a ``, `
` or ``.\n * This specific check is important for determining\n * the `offsetParent` of a given element.\n *\n * @param element the target element\n * @returns the query result\n */\nconst isTableElement = (\n element?: unknown,\n): element is HTMLTableElement | HTMLTableCellElement =>\n (isNode(element) && [\"TABLE\", \"TD\", \"TH\"].includes(element.nodeName)) ||\n false;\n\nexport default isTableElement;\n","/**\n * Check if element matches a CSS selector.\n *\n * @param target the target element\n * @param selector the selector to match\n * @returns the query result\n */\nconst matches = (target: Element, selector: string) => target.matches(selector);\n\nexport default matches;\n","import isElement from \"../is/isElement\";\nimport isHTMLElement from \"../is/isHTMLElement\";\nimport getElementStyle from \"./getElementStyle\";\nimport getParentNode from \"./getParentNode\";\nimport getWindow from \"./getWindow\";\nimport getDocumentElement from \"./getDocumentElement\";\nimport isTableElement from \"../is/isTableElement\";\nimport isWebKit from \"../boolean/isWebKit\";\nimport matches from \"../selectors/matches\";\nimport getNodeName from \"./getNodeName\";\nimport isNode from \"../is/isNode\";\n\nconst isStaticPositioned = (element: Element) => {\n return getElementStyle(element, \"position\") === \"static\";\n};\n\nconst isFixedPositioned = (element: Element) => {\n return getElementStyle(element, \"position\") === \"fixed\";\n};\n\nconst isTopLayer = (element: Element) => {\n return [\":popover-open\", \":modal\"].some((selector) => {\n try {\n return matches(element, selector);\n } catch (_) {\n return false;\n }\n });\n};\n\nconst isContainingBlock = (\n elementOrCss: Element | CSSStyleDeclaration,\n) => {\n const webkit = isWebKit();\n const css = isElement(elementOrCss)\n ? getComputedStyle(elementOrCss)\n : /* istanbul ignore next */ elementOrCss;\n\n return (\n css.transform !== \"none\" ||\n css.perspective !== \"none\" ||\n (css.containerType\n ? css.containerType !== \"normal\"\n : /* istanbul ignore next */ false) ||\n (!webkit &&\n (css.backdropFilter\n ? css.backdropFilter !== \"none\"\n : /* istanbul ignore next */ false)) ||\n (!webkit &&\n (css.filter\n ? css.filter !== \"none\"\n : /* istanbul ignore next */ false)) ||\n [\"transform\", \"perspective\", \"filter\"].some((value) =>\n (css.willChange || /* istanbul ignore next */ \"\").includes(value)\n ) ||\n [\"paint\", \"layout\", \"strict\", \"content\"].some((value) =>\n (css.contain || /* istanbul ignore next */ \"\").includes(value)\n )\n );\n};\n\nconst getContainingBlock = (element: Element) => {\n let currentNode: Node | null = getParentNode(element);\n /* istanbul ignore next @preserve */\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n\n currentNode = getParentNode(currentNode);\n }\n\n return null;\n};\n\nconst isLastTraversableNode = (node: Node): boolean => {\n return [\"html\", \"body\", \"#document\"].includes(getNodeName(node));\n};\n\nconst getTrueOffsetParent = (element: Element) => {\n if (\n !isHTMLElement(element) ||\n isFixedPositioned(element)\n ) {\n return null;\n }\n\n let rawOffsetParent = element.offsetParent;\n\n /* istanbul ignore if @preserve - no idea how to test this either */\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n\n return rawOffsetParent;\n};\n\n/**\n * Returns the `offsetParent` for a given target.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target node\n * @returns the offset parent node\n */\nconst getOffsetParent = (element: Element) => {\n const win = getWindow(element);\n\n if (!isNode(element) || isTopLayer(element)) {\n return win;\n }\n\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n\n let offsetParent = getTrueOffsetParent(element);\n\n while (\n offsetParent &&\n isTableElement(offsetParent) &&\n isStaticPositioned(offsetParent)\n ) {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n /* istanbul ignore else @preserve */\n if (\n offsetParent &&\n isLastTraversableNode(offsetParent) &&\n isStaticPositioned(offsetParent) &&\n !isContainingBlock(offsetParent)\n ) {\n return win;\n }\n\n return offsetParent || getContainingBlock(element) || win;\n};\n\nexport default getOffsetParent;\n","import isHTMLElement from \"./isHTMLElement\";\nimport getBoundingClientRect from \"../get/getBoundingClientRect\";\n\n/**\n * Checks if a target `Element` is affected by scale.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element target\n * @returns the query result\n */\nconst isScaledElement = (element?: Element): boolean => {\n if (!isHTMLElement(element)) return false;\n const { width, height } = getBoundingClientRect(element);\n const { offsetWidth, offsetHeight } = element;\n return Math.round(width) !== offsetWidth ||\n Math.round(height) !== offsetHeight;\n};\n\nexport default isScaledElement;\n","import type { OffsetRect } from \"../interface/offsetRect\";\nimport isScaledElement from \"../is/isScaledElement\";\nimport isHTMLElement from \"../is/isHTMLElement\";\nimport getBoundingClientRect from \"./getBoundingClientRect\";\n\n/**\n * Returns the rect relative to a given offset parent and its scroll position.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element target\n * @param offsetParent the container / offset parent\n * @param scroll the offsetParent scroll position\n * @returns a DOMRect like object\n */\nconst getRectRelativeToOffsetParent = (\n element: Element,\n offsetParent: Element | Window,\n scroll: { x: number; y: number },\n): OffsetRect => {\n const isParentAnElement = isHTMLElement(offsetParent);\n const rect = getBoundingClientRect(\n element,\n isParentAnElement && isScaledElement(offsetParent),\n );\n const offsets = { x: 0, y: 0 };\n\n /* istanbul ignore else @preserve */\n if (isParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n\n return {\n x: rect.left + scroll.x - offsets.x,\n y: rect.top + scroll.y - offsets.y,\n width: rect.width,\n height: rect.height,\n };\n};\n\nexport default getRectRelativeToOffsetParent;\n","import isMap from \"../is/isMap\";\n\nlet elementUID = 0;\nlet elementMapUID = 0;\n\ntype KeyIdMap = Map;\ntype IDMap = Map;\n\nconst elementIDMap: IDMap = new Map();\n\n/**\n * Returns a unique identifier for popover, tooltip, scrollspy.\n *\n * @param element target element\n * @param key optional identifier key\n * @returns an existing or new unique ID\n */\nconst getUID = (element: Element, key?: string): number => {\n let result = key ? elementUID : elementMapUID;\n\n if (key) {\n const elID = getUID(element);\n const elMap = elementIDMap.get(elID) || (new Map() as KeyIdMap);\n if (!elementIDMap.has(elID)) {\n elementIDMap.set(elID, elMap);\n }\n if (isMap(elMap as KeyIdMap) && !(elMap as KeyIdMap).has(key)) {\n (elMap as KeyIdMap).set(key, result);\n elementUID += 1;\n } else result = (elMap as KeyIdMap).get(key) as number;\n } else {\n const elkey = element.id || element;\n\n if (!elementIDMap.has(elkey)) {\n elementIDMap.set(elkey, result);\n elementMapUID += 1;\n } else result = elementIDMap.get(elkey) as number;\n }\n return result;\n};\n\nexport default getUID;\n","/**\n * Shortie for the `Array.isArray()` static method.\n *\n * @param obj array-like iterable object\n * @returns the query result\n */\nconst isArray = (obj?: unknown): obj is unknown[] =>\n Array.isArray(obj) || false;\n\nexport default isArray;\n","import isNode from \"./isNode\";\n\n/**\n * Checks if an element is an `HTMLCanvasElement` or ``.\n *\n * @param element the target element\n * @returns the query result\n */\n\nconst isCanvas = (element?: unknown): element is HTMLCanvasElement =>\n (isNode(element) && element.nodeName === \"CANVAS\") || false;\n\nexport default isCanvas;\n","import isHTMLElement from \"./isHTMLElement\";\nimport type { CustomElement } from \"../interface/customElement\";\n\n/**\n * Checks if an object is a `CustomElement`.\n *\n * @param element the target object\n * @returns the query result\n */\nconst isCustomElement = (\n element?: unknown,\n): element is T =>\n (isHTMLElement(element) && !!(element as T).shadowRoot) || false;\n\nexport default isCustomElement;\n","import getBoundingClientRect from \"../get/getBoundingClientRect\";\nimport getDocumentElement from \"../get/getDocumentElement\";\nimport isNode from \"./isNode\";\n\n/**\n * Utility to determine if an `Element`\n * is partially visible in viewport.\n *\n * @param element target\n * @return the query result\n */\nconst isElementInScrollRange = (element?: Element): boolean => {\n if (!isNode(element)) return false;\n\n const { top, bottom } = getBoundingClientRect(element);\n const { clientHeight } = getDocumentElement(element);\n return top <= clientHeight && bottom >= 0;\n};\n\nexport default isElementInScrollRange;\n","import getBoundingClientRect from \"../get/getBoundingClientRect\";\nimport getDocumentElement from \"../get/getDocumentElement\";\nimport isElement from \"./isElement\";\n\n/**\n * Utility to determine if an `Element`\n * is fully visible in the viewport.\n *\n * @param element target\n * @return the query result\n */\nconst isElementInViewport = (element?: Element): boolean => {\n if (!isElement(element)) return false;\n\n const { clientWidth, clientHeight } = getDocumentElement(element);\n const { top, left, bottom, right } = getBoundingClientRect(element, true);\n\n return top >= 0 && left >= 0 && bottom <= clientHeight &&\n right <= clientWidth;\n};\nexport default isElementInViewport;\n","import isElement from \"./isElement\";\nimport isArray from \"./isArray\";\n\n/**\n * Checks if an object is an `Array` in which all items are `Element`.\n *\n * @param obj the target object\n * @returns the query result\n */\nconst isElementsArray = (obj?: unknown): obj is Element[] =>\n (isArray(obj) && obj.every(isElement)) || false;\n\nexport default isElementsArray;\n","import { Fn } from \"../interface/fn\";\n\n/**\n * Checks if an object is a `Function`.\n *\n * @param fn the target object\n * @returns the query result\n */\nconst isFunction = (fn?: unknown): fn is Fn =>\n typeof fn === \"function\" || false;\n\nexport default isFunction;\n","import isObject from \"./isObject\";\n\n/**\n * Checks if an object is an `HTMLCollection`.\n *\n * @param obj the target object\n * @returns the query result\n */\nconst isHTMLCollection = (obj?: unknown): obj is HTMLCollection =>\n (isObject(obj) && obj.constructor.name === \"HTMLCollection\") || false;\n\nexport default isHTMLCollection;\n","import isHTMLElement from \"./isHTMLElement\";\n\n/**\n * Check if a target element is an ``.\n *\n * @param element the target element\n * @returns the query result\n */\nconst isHTMLImageElement = (element?: unknown): element is HTMLImageElement =>\n (isHTMLElement(element) && element.tagName === \"IMG\") || false;\n\nexport default isHTMLImageElement;\n","import isString from \"./isString\";\n\n/**\n * Checks if a string is a `JSON` string.\n *\n * @param str the target string\n * @returns the query result\n */\nconst isJSON = (str?: string): boolean => {\n if (!isString(str)) return false;\n\n try {\n JSON.parse(str);\n } catch (_e) {\n return false;\n }\n return true;\n};\n\nexport default isJSON;\n","import isObject from \"./isObject\";\n\n/**\n * Checks if an element is a `WeakMap`.\n *\n * @param obj the target object\n * @returns the query result\n */\nconst isWeakMap = (obj?: unknown): obj is WeakMap =>\n (isObject(obj) && obj.constructor.name === \"WeakMap\") || false;\nexport default isWeakMap;\n","import isNode from \"./isNode\";\n\n/**\n * Checks if an element is an `` (or any type of SVG element),\n * ``, `