UNPKG

121 kBSource Map (JSON)View Raw
1{"version":3,"file":"tippy.iife.min.js","sources":["../src/utils.ts","../src/props.ts","../src/constants.ts","../src/bindGlobalEventListeners.ts","../src/browser.ts","../src/popper.ts","../src/createTippy.ts","../src/index.ts","../src/addons/delegate.ts","../src/plugins/animateFill.ts","../src/plugins/followCursor.ts","../src/plugins/inlinePositioning.ts","../src/plugins/sticky.ts","../build/base-iife.js","../src/addons/createSingleton.ts"],"sourcesContent":["import {ReferenceElement, Targets, BasePlacement} from './types';\nimport Popper from 'popper.js';\n\n/**\n * Triggers reflow\n */\nexport function reflow(element: HTMLElement): void {\n void element.offsetHeight;\n}\n\n/**\n * Sets the innerHTML of an element\n */\nexport function setInnerHTML(element: Element, html: string): void {\n element[innerHTML()] = html;\n}\n\n/**\n * Determines if the value is a reference element\n */\nexport function isReferenceElement(value: any): value is ReferenceElement {\n return !!(value && value._tippy && value._tippy.reference === value);\n}\n\n/**\n * Safe .hasOwnProperty check, for prototype-less objects\n */\nexport function hasOwnProperty(obj: object, key: string): boolean {\n return {}.hasOwnProperty.call(obj, key);\n}\n\n/**\n * Returns an array of elements based on the value\n */\nexport function getArrayOfElements(value: Targets): Element[] {\n if (isElement(value)) {\n return [value];\n }\n\n if (isNodeList(value)) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n return arrayFrom(document.querySelectorAll(value));\n}\n\n/**\n * Returns a value at a given index depending on if it's an array or number\n */\nexport function getValueAtIndexOrReturn<T>(\n value: T | [T | null, T | null],\n index: number,\n defaultValue: T | [T, T],\n): T {\n if (Array.isArray(value)) {\n const v = value[index];\n return v == null\n ? Array.isArray(defaultValue)\n ? defaultValue[index]\n : defaultValue\n : v;\n }\n\n return value;\n}\n\n/**\n * Prevents errors from being thrown while accessing nested modifier objects\n * in `popperOptions`\n */\nexport function getModifier(obj: any, key: string): any {\n return obj && obj.modifiers && obj.modifiers[key];\n}\n\n/**\n * Determines if the value is of type\n */\nexport function isType(value: any, type: string): boolean {\n const str = {}.toString.call(value);\n return str.indexOf('[object') === 0 && str.indexOf(`${type}]`) > -1;\n}\n\n/**\n * Determines if the value is of type Element\n */\nexport function isElement(value: any): value is Element {\n return isType(value, 'Element');\n}\n\n/**\n * Determines if the value is of type NodeList\n */\nexport function isNodeList(value: any): value is NodeList {\n return isType(value, 'NodeList');\n}\n\n/**\n * Determines if the value is of type MouseEvent\n */\nexport function isMouseEvent(value: any): value is MouseEvent {\n return isType(value, 'MouseEvent');\n}\n\n/**\n * Firefox extensions don't allow setting .innerHTML directly, this will trick\n * it\n */\nexport function innerHTML(): 'innerHTML' {\n return 'innerHTML';\n}\n\n/**\n * Evaluates a function if one, or returns the value\n */\nexport function invokeWithArgsOrReturn(value: any, args: any[]): any {\n return typeof value === 'function' ? value(...args) : value;\n}\n\n/**\n * Sets a popperInstance modifier's property to a value\n */\nexport function setModifierValue(\n modifiers: any[],\n name: string,\n property: string,\n value: unknown,\n): void {\n modifiers.filter(m => m.name === name)[0][property] = value;\n}\n\n/**\n * Returns a new `div` element\n */\nexport function div(): HTMLDivElement {\n return document.createElement('div');\n}\n\n/**\n * Applies a transition duration to a list of elements\n */\nexport function setTransitionDuration(\n els: (HTMLDivElement | null)[],\n value: number,\n): void {\n els.forEach(el => {\n if (el) {\n el.style.transitionDuration = `${value}ms`;\n }\n });\n}\n\n/**\n * Sets the visibility state to elements so they can begin to transition\n */\nexport function setVisibilityState(\n els: (HTMLDivElement | null)[],\n state: 'visible' | 'hidden',\n): void {\n els.forEach(el => {\n if (el) {\n el.setAttribute('data-state', state);\n }\n });\n}\n\n/**\n * Debounce utility. To avoid bloating bundle size, we're only passing 1\n * argument here, a more generic function would pass all arguments. Only\n * `onMouseMove` uses this which takes the event object for now.\n */\nexport function debounce<T>(\n fn: (arg: T) => void,\n ms: number,\n): (arg: T) => void {\n // Avoid wrapping in `setTimeout` if ms is 0 anyway\n if (ms === 0) {\n return fn;\n }\n\n let timeout: any;\n\n return (arg): void => {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n fn(arg);\n }, ms);\n };\n}\n\n/**\n * Preserves the original function invocation when another function replaces it\n */\nexport function preserveInvocation<T>(\n originalFn: undefined | ((...args: any) => void),\n currentFn: undefined | ((...args: any) => void),\n args: T[],\n): void {\n if (originalFn && originalFn !== currentFn) {\n originalFn(...args);\n }\n}\n\n/**\n * Deletes properties from an object (pure)\n */\nexport function removeProperties<T>(obj: T, keys: Array<keyof T>): Partial<T> {\n const clone = {...obj};\n keys.forEach(key => {\n delete clone[key];\n });\n return clone;\n}\n\n/**\n * Ponyfill for Array.from - converts iterable values to an array\n */\nexport function arrayFrom(value: ArrayLike<any>): any[] {\n return [].slice.call(value);\n}\n\n/**\n * Works like Element.prototype.closest, but uses a callback instead\n */\nexport function closestCallback(\n element: Element | null,\n callback: Function,\n): Element | null {\n while (element) {\n if (callback(element)) {\n return element;\n }\n\n element = element.parentElement;\n }\n\n return null;\n}\n\n/**\n * Determines if an array or string includes a string\n */\nexport function includes(a: string[] | string, b: string): boolean {\n return a.indexOf(b) > -1;\n}\n\n/**\n * Creates an array from string of values separated by whitespace\n */\nexport function splitBySpaces(value: string): string[] {\n return value.split(/\\s+/).filter(Boolean);\n}\n\n/**\n * Returns the `nextValue` if `nextValue` is not `undefined`, otherwise returns\n * `currentValue`\n */\nexport function useIfDefined(nextValue: any, currentValue: any): any {\n return nextValue !== undefined ? nextValue : currentValue;\n}\n\n/**\n * Converts a value that's an array or single value to an array\n */\nexport function normalizeToArray<T>(value: T | T[]): T[] {\n return ([] as T[]).concat(value);\n}\n\n/**\n * Returns the ownerDocument of the first available element, otherwise global\n * document\n */\nexport function getOwnerDocument(\n elementOrElements: Element | Element[],\n): Document {\n const [element] = normalizeToArray(elementOrElements);\n return element ? element.ownerDocument || document : document;\n}\n\n/**\n * Adds item to array if array does not contain it\n */\nexport function pushIfUnique<T>(arr: T[], value: T): void {\n if (arr.indexOf(value) === -1) {\n arr.push(value);\n }\n}\n\n/**\n * Adds `px` if value is a number, or returns it directly\n */\nexport function appendPxIfNumber(value: string | number): string {\n return typeof value === 'number' ? `${value}px` : value;\n}\n\n/**\n * Filters out duplicate elements in an array\n */\nexport function unique<T>(arr: T[]): T[] {\n return arr.filter((item, index) => arr.indexOf(item) === index);\n}\n\n/**\n * Returns number from number or CSS units string\n */\nexport function getNumber(value: string | number): number {\n return typeof value === 'number' ? value : parseFloat(value);\n}\n\n/**\n * Gets number or CSS string units in pixels (e.g. `1rem` -> 16)\n */\nexport function getUnitsInPx(doc: Document, value: string | number): number {\n const isRem = typeof value === 'string' && includes(value, 'rem');\n const html = doc.documentElement;\n const rootFontSize = 16;\n\n if (html && isRem) {\n return (\n parseFloat(getComputedStyle(html).fontSize || String(rootFontSize)) *\n getNumber(value)\n );\n }\n\n return getNumber(value);\n}\n\n/**\n * Adds the `distancePx` value to the placement of a Popper.Padding object\n */\nexport function getComputedPadding(\n basePlacement: BasePlacement,\n padding: number | Popper.Padding = 5,\n distancePx: number,\n): Popper.Padding {\n const freshPaddingObject = {top: 0, right: 0, bottom: 0, left: 0};\n const keys = Object.keys(freshPaddingObject) as BasePlacement[];\n\n return keys.reduce<Popper.Padding>((obj, key) => {\n obj[key] = typeof padding === 'number' ? padding : (padding as any)[key];\n\n if (basePlacement === key) {\n obj[key] =\n typeof padding === 'number'\n ? padding + distancePx\n : (padding as any)[basePlacement] + distancePx;\n }\n\n return obj;\n }, freshPaddingObject);\n}\n","import {Props, DefaultProps, ReferenceElement, Plugin, Tippy} from './types';\nimport {\n invokeWithArgsOrReturn,\n hasOwnProperty,\n includes,\n removeProperties,\n} from './utils';\nimport {warnWhen} from './validation';\nimport {PropsV4} from './types-internal';\n\nconst pluginProps = {\n animateFill: false,\n followCursor: false,\n inlinePositioning: false,\n sticky: false,\n};\n\nexport const defaultProps: DefaultProps = {\n allowHTML: true,\n animation: 'fade',\n appendTo: () => document.body,\n aria: 'describedby',\n arrow: true,\n boundary: 'scrollParent',\n content: '',\n delay: 0,\n distance: 10,\n duration: [300, 250],\n flip: true,\n flipBehavior: 'flip',\n flipOnUpdate: false,\n hideOnClick: true,\n ignoreAttributes: false,\n inertia: false,\n interactive: false,\n interactiveBorder: 2,\n interactiveDebounce: 0,\n lazy: true,\n maxWidth: 350,\n multiple: false,\n offset: 0,\n onAfterUpdate() {},\n onBeforeUpdate() {},\n onCreate() {},\n onDestroy() {},\n onHidden() {},\n onHide() {},\n onMount() {},\n onShow() {},\n onShown() {},\n onTrigger() {},\n onUntrigger() {},\n placement: 'top',\n plugins: [],\n popperOptions: {},\n role: 'tooltip',\n showOnCreate: false,\n theme: '',\n touch: true,\n trigger: 'mouseenter focus',\n triggerTarget: null,\n updateDuration: 0,\n zIndex: 9999,\n ...pluginProps,\n};\n\nconst defaultKeys = Object.keys(defaultProps);\n\n/**\n * If the setProps() method encounters one of these, the popperInstance must be\n * recreated\n */\nexport const POPPER_INSTANCE_DEPENDENCIES: Array<keyof Props> = [\n 'arrow',\n 'boundary',\n 'distance',\n 'flip',\n 'flipBehavior',\n 'flipOnUpdate',\n 'offset',\n 'placement',\n 'popperOptions',\n];\n\n/**\n * Mutates the defaultProps object by setting the props specified\n */\nexport const setDefaultProps: Tippy['setDefaultProps'] = partialProps => {\n if (__DEV__) {\n validateProps(partialProps, []);\n }\n\n const keys = Object.keys(partialProps) as Array<keyof DefaultProps>;\n keys.forEach(key => {\n (defaultProps as any)[key] = partialProps[key];\n });\n};\n\n/**\n * Returns an extended props object including plugin props\n */\nexport function getExtendedPassedProps(\n passedProps: Partial<Props> & Record<string, unknown>,\n): Partial<Props> {\n const plugins = passedProps.plugins || [];\n const pluginProps = plugins.reduce<Record<string, unknown>>((acc, plugin) => {\n const {name, defaultValue} = plugin;\n\n if (name) {\n acc[name] =\n passedProps[name] !== undefined ? passedProps[name] : defaultValue;\n }\n\n return acc;\n }, {});\n\n return {\n ...passedProps,\n ...pluginProps,\n };\n}\n\n/**\n * Returns an object of optional props from data-tippy-* attributes\n */\nexport function getDataAttributeProps(\n reference: ReferenceElement,\n plugins: Plugin[],\n): Record<string, unknown> {\n const propKeys = plugins\n ? Object.keys(getExtendedPassedProps({...defaultProps, plugins}))\n : defaultKeys;\n\n const props = propKeys.reduce(\n (acc: Partial<Props> & Record<string, unknown>, key) => {\n const valueAsString = (\n reference.getAttribute(`data-tippy-${key}`) || ''\n ).trim();\n\n if (!valueAsString) {\n return acc;\n }\n\n if (key === 'content') {\n acc[key] = valueAsString;\n } else {\n try {\n acc[key] = JSON.parse(valueAsString);\n } catch (e) {\n acc[key] = valueAsString;\n }\n }\n\n return acc;\n },\n {},\n );\n\n return props;\n}\n\n/**\n * Evaluates the props object by merging data attributes and disabling\n * conflicting props where necessary\n */\nexport function evaluateProps(\n reference: ReferenceElement,\n props: Props,\n): Props {\n const out = {\n ...props,\n content: invokeWithArgsOrReturn(props.content, [reference]),\n ...(props.ignoreAttributes\n ? {}\n : getDataAttributeProps(reference, props.plugins)),\n };\n\n if (out.interactive) {\n out.aria = null;\n }\n\n return out;\n}\n\n/**\n * Validates props with the valid `defaultProps` object\n */\nexport function validateProps(\n partialProps: Partial<PropsV4> = {},\n plugins: Plugin[] = [],\n): void {\n const keys = Object.keys(partialProps) as Array<keyof PropsV4>;\n keys.forEach(prop => {\n const value = partialProps[prop];\n\n const didSpecifyPlacementInPopperOptions =\n prop === 'popperOptions' &&\n value !== null &&\n typeof value === 'object' &&\n hasOwnProperty(value, 'placement');\n\n const nonPluginProps = removeProperties(defaultProps, [\n 'animateFill',\n 'followCursor',\n 'inlinePositioning',\n 'sticky',\n ]);\n\n // These props have custom warnings\n const customWarningProps = [\n 'a11y',\n 'arrowType',\n 'showOnInit',\n 'size',\n 'target',\n 'touchHold',\n ];\n\n let didPassUnknownProp =\n !hasOwnProperty(nonPluginProps, prop) &&\n !includes(customWarningProps, prop);\n\n // Check if the prop exists in `plugins`\n if (didPassUnknownProp) {\n didPassUnknownProp =\n plugins.filter(plugin => plugin.name === prop).length === 0;\n }\n\n warnWhen(\n prop === 'target',\n [\n 'The `target` prop was removed in v5 and replaced with the delegate() addon',\n 'in order to conserve bundle size.',\n 'See: https://atomiks.github.io/tippyjs/addons/#event-delegation',\n ].join(' '),\n );\n\n warnWhen(\n prop === 'a11y',\n [\n 'The `a11y` prop was removed in v5. Make sure the element you are giving a',\n 'tippy to is natively focusable, such as <button> or <input>, not <div>',\n 'or <span>.',\n ].join(' '),\n );\n\n warnWhen(\n prop === 'showOnInit',\n 'The `showOnInit` prop was renamed to `showOnCreate` in v5.',\n );\n\n warnWhen(\n prop === 'arrowType',\n [\n 'The `arrowType` prop was removed in v5 in favor of overloading the `arrow`',\n 'prop.',\n '\\n\\n',\n '\"round\" string was replaced with importing the string from the package.',\n '\\n\\n',\n \"* import {roundArrow} from 'tippy.js'; (ESM version)\\n\",\n '* const {roundArrow} = tippy; (IIFE CDN version)',\n '\\n\\n',\n 'Before: {arrow: true, arrowType: \"round\"}\\n',\n 'After: {arrow: roundArrow}`',\n ].join(' '),\n );\n\n warnWhen(\n prop === 'touchHold',\n [\n 'The `touchHold` prop was removed in v5 in favor of overloading the `touch`',\n 'prop.',\n '\\n\\n',\n 'Before: {touchHold: true}\\n',\n 'After: {touch: \"hold\"}',\n ].join(' '),\n );\n\n warnWhen(\n prop === 'size',\n [\n 'The `size` prop was removed in v5. Instead, use a theme that specifies',\n 'CSS padding and font-size properties.',\n ].join(' '),\n );\n\n warnWhen(\n prop === 'theme' && value === 'google',\n 'The included theme \"google\" was renamed to \"material\" in v5.',\n );\n\n warnWhen(\n didSpecifyPlacementInPopperOptions,\n [\n 'Specifying placement in `popperOptions` is not supported. Use the base-level',\n '`placement` prop instead.',\n '\\n\\n',\n 'Before: {popperOptions: {placement: \"bottom\"}}\\n',\n 'After: {placement: \"bottom\"}',\n ].join(' '),\n );\n\n warnWhen(\n didPassUnknownProp,\n [\n `\\`${prop}\\``,\n \"is not a valid prop. You may have spelled it incorrectly, or if it's a\",\n 'plugin, forgot to pass it in an array as props.plugins.',\n '\\n\\n',\n 'In v5, the following props were turned into plugins:',\n '\\n\\n',\n '* animateFill\\n',\n '* followCursor\\n',\n '* sticky',\n '\\n\\n',\n 'All props: https://atomiks.github.io/tippyjs/all-props/\\n',\n 'Plugins: https://atomiks.github.io/tippyjs/plugins/',\n ].join(' '),\n );\n });\n}\n","export const PASSIVE = {passive: true};\n\nexport const ROUND_ARROW =\n '<svg viewBox=\"0 0 18 7\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z\"/></svg>';\n\nexport const IOS_CLASS = `__NAMESPACE_PREFIX__-iOS`;\nexport const POPPER_CLASS = `__NAMESPACE_PREFIX__-popper`;\nexport const TOOLTIP_CLASS = `__NAMESPACE_PREFIX__-tooltip`;\nexport const CONTENT_CLASS = `__NAMESPACE_PREFIX__-content`;\nexport const BACKDROP_CLASS = `__NAMESPACE_PREFIX__-backdrop`;\nexport const ARROW_CLASS = `__NAMESPACE_PREFIX__-arrow`;\nexport const SVG_ARROW_CLASS = `__NAMESPACE_PREFIX__-svg-arrow`;\n\nexport const POPPER_SELECTOR = `.${POPPER_CLASS}`;\nexport const TOOLTIP_SELECTOR = `.${TOOLTIP_CLASS}`;\nexport const CONTENT_SELECTOR = `.${CONTENT_CLASS}`;\nexport const BACKDROP_SELECTOR = `.${BACKDROP_CLASS}`;\nexport const ARROW_SELECTOR = `.${ARROW_CLASS}`;\nexport const SVG_ARROW_SELECTOR = `.${SVG_ARROW_CLASS}`;\n","import {PASSIVE} from './constants';\nimport {isReferenceElement} from './utils';\n\nexport const currentInput = {isTouch: false};\nlet lastMouseMoveTime = 0;\n\n/**\n * When a `touchstart` event is fired, it's assumed the user is using touch\n * input. We'll bind a `mousemove` event listener to listen for mouse input in\n * the future. This way, the `isTouch` property is fully dynamic and will handle\n * hybrid devices that use a mix of touch + mouse input.\n */\nexport function onDocumentTouchStart(): void {\n if (currentInput.isTouch) {\n return;\n }\n\n currentInput.isTouch = true;\n\n if (window.performance) {\n document.addEventListener('mousemove', onDocumentMouseMove);\n }\n}\n\n/**\n * When two `mousemove` event are fired consecutively within 20ms, it's assumed\n * the user is using mouse input again. `mousemove` can fire on touch devices as\n * well, but very rarely that quickly.\n */\nexport function onDocumentMouseMove(): void {\n const now = performance.now();\n\n if (now - lastMouseMoveTime < 20) {\n currentInput.isTouch = false;\n\n document.removeEventListener('mousemove', onDocumentMouseMove);\n }\n\n lastMouseMoveTime = now;\n}\n\n/**\n * When an element is in focus and has a tippy, leaving the tab/window and\n * returning causes it to show again. For mouse users this is unexpected, but\n * for keyboard use it makes sense.\n * TODO: find a better technique to solve this problem\n */\nexport function onWindowBlur(): void {\n const activeElement = document.activeElement as HTMLElement | null;\n\n if (isReferenceElement(activeElement)) {\n const instance = activeElement._tippy!;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n}\n\n/**\n * Adds the needed global event listeners\n */\nexport default function bindGlobalEventListeners(): void {\n document.addEventListener('touchstart', onDocumentTouchStart, {\n ...PASSIVE,\n capture: true,\n });\n window.addEventListener('blur', onWindowBlur);\n}\n","import {currentInput} from './bindGlobalEventListeners';\nimport {IOS_CLASS} from './constants';\n\nexport const isBrowser =\n typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst ua = isBrowser ? navigator.userAgent : '';\n\nexport const isIE = /MSIE |Trident\\//.test(ua);\nexport const isIOS = isBrowser && /iPhone|iPad|iPod/.test(navigator.platform);\n\nexport function updateIOSClass(isAdd: boolean): void {\n const shouldAdd = isAdd && isIOS && currentInput.isTouch;\n document.body.classList[shouldAdd ? 'add' : 'remove'](IOS_CLASS);\n}\n","import {\n PopperElement,\n Props,\n PopperChildren,\n BasePlacement,\n Placement,\n} from './types';\nimport {\n div,\n isElement,\n splitBySpaces,\n appendPxIfNumber,\n setInnerHTML,\n} from './utils';\nimport {\n POPPER_CLASS,\n TOOLTIP_CLASS,\n CONTENT_CLASS,\n ARROW_CLASS,\n SVG_ARROW_CLASS,\n TOOLTIP_SELECTOR,\n CONTENT_SELECTOR,\n ARROW_SELECTOR,\n SVG_ARROW_SELECTOR,\n} from './constants';\n\n/**\n * Returns the popper's placement, ignoring shifting (top-start, etc)\n */\nexport function getBasePlacement(placement: Placement): BasePlacement {\n return placement.split('-')[0] as BasePlacement;\n}\n\n/**\n * Adds `data-inertia` attribute\n */\nexport function addInertia(tooltip: PopperChildren['tooltip']): void {\n tooltip.setAttribute('data-inertia', '');\n}\n\n/**\n * Removes `data-inertia` attribute\n */\nexport function removeInertia(tooltip: PopperChildren['tooltip']): void {\n tooltip.removeAttribute('data-inertia');\n}\n\n/**\n * Adds interactive-related attributes\n */\nexport function addInteractive(tooltip: PopperChildren['tooltip']): void {\n tooltip.setAttribute('data-interactive', '');\n}\n\n/**\n * Removes interactive-related attributes\n */\nexport function removeInteractive(tooltip: PopperChildren['tooltip']): void {\n tooltip.removeAttribute('data-interactive');\n}\n\n/**\n * Sets the content of a tooltip\n */\nexport function setContent(\n contentEl: PopperChildren['content'],\n props: Props,\n): void {\n if (isElement(props.content)) {\n setInnerHTML(contentEl, '');\n contentEl.appendChild(props.content);\n } else if (typeof props.content !== 'function') {\n const key: 'innerHTML' | 'textContent' = props.allowHTML\n ? 'innerHTML'\n : 'textContent';\n contentEl[key] = props.content;\n }\n}\n\n/**\n * Returns the child elements of a popper element\n */\nexport function getChildren(popper: PopperElement): PopperChildren {\n return {\n tooltip: popper.querySelector(TOOLTIP_SELECTOR) as HTMLDivElement,\n content: popper.querySelector(CONTENT_SELECTOR) as HTMLDivElement,\n arrow:\n popper.querySelector(ARROW_SELECTOR) ||\n popper.querySelector(SVG_ARROW_SELECTOR),\n };\n}\n\n/**\n * Creates an arrow element and returns it\n */\nexport function createArrowElement(arrow: Props['arrow']): HTMLDivElement {\n const arrowElement = div();\n\n if (arrow === true) {\n arrowElement.className = ARROW_CLASS;\n } else {\n arrowElement.className = SVG_ARROW_CLASS;\n\n if (isElement(arrow)) {\n arrowElement.appendChild(arrow);\n } else {\n setInnerHTML(arrowElement, arrow as string);\n }\n }\n\n return arrowElement;\n}\n\n/**\n * Constructs the popper element and returns it\n */\nexport function createPopperElement(id: number, props: Props): PopperElement {\n const popper = div();\n popper.className = POPPER_CLASS;\n popper.style.position = 'absolute';\n popper.style.top = '0';\n popper.style.left = '0';\n\n const tooltip = div();\n tooltip.className = TOOLTIP_CLASS;\n tooltip.id = `__NAMESPACE_PREFIX__-${id}`;\n tooltip.setAttribute('data-state', 'hidden');\n tooltip.setAttribute('tabindex', '-1');\n\n updateTheme(tooltip, 'add', props.theme);\n\n const content = div();\n content.className = CONTENT_CLASS;\n content.setAttribute('data-state', 'hidden');\n\n if (props.interactive) {\n addInteractive(tooltip);\n }\n\n if (props.arrow) {\n tooltip.setAttribute('data-arrow', '');\n tooltip.appendChild(createArrowElement(props.arrow));\n }\n\n if (props.inertia) {\n addInertia(tooltip);\n }\n\n setContent(content, props);\n\n tooltip.appendChild(content);\n popper.appendChild(tooltip);\n\n updatePopperElement(popper, props, props);\n\n return popper;\n}\n\n/**\n * Updates the popper element based on the new props\n */\nexport function updatePopperElement(\n popper: PopperElement,\n prevProps: Props,\n nextProps: Props,\n): void {\n const {tooltip, content, arrow} = getChildren(popper);\n\n popper.style.zIndex = '' + nextProps.zIndex;\n\n tooltip.setAttribute('data-animation', nextProps.animation);\n tooltip.style.maxWidth = appendPxIfNumber(nextProps.maxWidth);\n\n if (nextProps.role) {\n tooltip.setAttribute('role', nextProps.role);\n } else {\n tooltip.removeAttribute('role');\n }\n\n if (prevProps.content !== nextProps.content) {\n setContent(content, nextProps);\n }\n\n // arrow\n if (!prevProps.arrow && nextProps.arrow) {\n // false to true\n tooltip.appendChild(createArrowElement(nextProps.arrow));\n tooltip.setAttribute('data-arrow', '');\n } else if (prevProps.arrow && !nextProps.arrow) {\n // true to false\n tooltip.removeChild(arrow!);\n tooltip.removeAttribute('data-arrow');\n } else if (prevProps.arrow !== nextProps.arrow) {\n // true to 'round' or vice-versa\n tooltip.removeChild(arrow!);\n tooltip.appendChild(createArrowElement(nextProps.arrow));\n }\n\n // interactive\n if (!prevProps.interactive && nextProps.interactive) {\n addInteractive(tooltip);\n } else if (prevProps.interactive && !nextProps.interactive) {\n removeInteractive(tooltip);\n }\n\n // inertia\n if (!prevProps.inertia && nextProps.inertia) {\n addInertia(tooltip);\n } else if (prevProps.inertia && !nextProps.inertia) {\n removeInertia(tooltip);\n }\n\n // theme\n if (prevProps.theme !== nextProps.theme) {\n updateTheme(tooltip, 'remove', prevProps.theme);\n updateTheme(tooltip, 'add', nextProps.theme);\n }\n}\n\n/**\n * Add/remove transitionend listener from tooltip\n */\nexport function updateTransitionEndListener(\n tooltip: PopperChildren['tooltip'],\n action: 'add' | 'remove',\n listener: (event: TransitionEvent) => void,\n): void {\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n tooltip[\n (action + 'EventListener') as 'addEventListener' | 'removeEventListener'\n ](event, listener as EventListener);\n });\n}\n\n/**\n * Adds/removes theme from tooltip's classList\n */\nexport function updateTheme(\n tooltip: PopperChildren['tooltip'],\n action: 'add' | 'remove',\n theme: Props['theme'],\n): void {\n splitBySpaces(theme).forEach(name => {\n tooltip.classList[action](`${name}-theme`);\n });\n}\n\n/**\n * Determines if the mouse cursor is outside of the popper's interactive border\n * region\n */\nexport function isCursorOutsideInteractiveBorder(\n popperTreeData: {\n popperRect: ClientRect;\n tooltipRect: ClientRect;\n interactiveBorder: Props['interactiveBorder'];\n }[],\n event: MouseEvent,\n): boolean {\n const {clientX, clientY} = event;\n\n return popperTreeData.every(\n ({popperRect, tooltipRect, interactiveBorder}) => {\n // Get min/max bounds of both the popper and tooltip rects due to\n // `distance` offset\n const mergedRect = {\n top: Math.min(popperRect.top, tooltipRect.top),\n right: Math.max(popperRect.right, tooltipRect.right),\n bottom: Math.max(popperRect.bottom, tooltipRect.bottom),\n left: Math.min(popperRect.left, tooltipRect.left),\n };\n\n const exceedsTop = mergedRect.top - clientY > interactiveBorder;\n const exceedsBottom = clientY - mergedRect.bottom > interactiveBorder;\n const exceedsLeft = mergedRect.left - clientX > interactiveBorder;\n const exceedsRight = clientX - mergedRect.right > interactiveBorder;\n\n return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight;\n },\n );\n}\n","import Popper from 'popper.js';\nimport {\n ReferenceElement,\n PopperInstance,\n Props,\n Instance,\n Content,\n LifecycleHooks,\n PopperElement,\n} from './types';\nimport {ListenerObject} from './types-internal';\nimport {isIE, updateIOSClass} from './browser';\nimport {PASSIVE, POPPER_SELECTOR} from './constants';\nimport {currentInput} from './bindGlobalEventListeners';\nimport {\n defaultProps,\n POPPER_INSTANCE_DEPENDENCIES,\n evaluateProps,\n validateProps,\n getExtendedPassedProps,\n} from './props';\nimport {\n createPopperElement,\n updatePopperElement,\n getChildren,\n getBasePlacement,\n updateTransitionEndListener,\n isCursorOutsideInteractiveBorder,\n} from './popper';\nimport {\n hasOwnProperty,\n getValueAtIndexOrReturn,\n getModifier,\n includes,\n invokeWithArgsOrReturn,\n setTransitionDuration,\n setVisibilityState,\n debounce,\n preserveInvocation,\n closestCallback,\n splitBySpaces,\n normalizeToArray,\n useIfDefined,\n isMouseEvent,\n getOwnerDocument,\n pushIfUnique,\n arrayFrom,\n unique,\n getUnitsInPx,\n reflow,\n setModifierValue,\n getComputedPadding,\n} from './utils';\nimport {warnWhen, createMemoryLeakWarning} from './validation';\n\nlet idCounter = 1;\nlet mouseMoveListeners: ((event: MouseEvent) => void)[] = [];\n\n/**\n * Used by `hideAll()`\n */\nexport let mountedInstances: Instance[] = [];\n\n/**\n * Creates and returns a Tippy object. We're using a closure pattern instead of\n * a class so that the exposed object API is clean without private members\n * prefixed with `_`.\n */\nexport default function createTippy(\n reference: ReferenceElement,\n passedProps: Partial<Props>,\n): Instance | null {\n const props: Props = evaluateProps(reference, {\n ...defaultProps,\n ...getExtendedPassedProps(passedProps),\n });\n\n // If the reference shouldn't have multiple tippys, return null early\n if (!props.multiple && reference._tippy) {\n return null;\n }\n\n /* ======================= 🔒 Private members 🔒 ======================= */\n let showTimeout: any;\n let hideTimeout: any;\n let scheduleHideAnimationFrame: number;\n let isBeingDestroyed = false;\n let isVisibleFromClick = false;\n let didHideDueToDocumentMouseDown = false;\n let popperUpdates = 0;\n let lastTriggerEvent: Event;\n let currentMountCallback: () => void;\n let currentTransitionEndListener: (event: TransitionEvent) => void;\n let listeners: ListenerObject[] = [];\n let debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);\n let currentTarget: Element;\n\n // Support iframe contexts\n // Static check that assumes any of the `triggerTarget` or `reference`\n // nodes will never change documents, even when they are updated\n const doc = getOwnerDocument(props.triggerTarget || reference);\n\n /* ======================= 🔑 Public members 🔑 ======================= */\n const id = idCounter++;\n const popper = createPopperElement(id, props);\n const popperChildren = getChildren(popper);\n const popperInstance: PopperInstance | null = null;\n const plugins = unique(props.plugins);\n\n // These two elements are static\n const {tooltip, content} = popperChildren;\n const transitionableElements = [tooltip, content];\n\n const state = {\n // The current real placement (`data-placement` attribute)\n currentPlacement: null,\n // Is the instance currently enabled?\n isEnabled: true,\n // Is the tippy currently showing and not transitioning out?\n isVisible: false,\n // Has the instance been destroyed?\n isDestroyed: false,\n // Is the tippy currently mounted to the DOM?\n isMounted: false,\n // Has the tippy finished transitioning in?\n isShown: false,\n };\n\n const instance: Instance = {\n // properties\n id,\n reference,\n popper,\n popperChildren,\n popperInstance,\n props,\n state,\n plugins,\n // methods\n clearDelayTimeouts,\n setProps,\n setContent,\n show,\n hide,\n enable,\n disable,\n destroy,\n };\n\n /* ==================== Initial instance mutations =================== */\n reference._tippy = instance;\n popper._tippy = instance;\n\n const pluginsHooks = plugins.map(plugin => plugin.fn(instance));\n const hadAriaExpandedAttributeOnCreate = reference.hasAttribute(\n 'aria-expanded',\n );\n\n addListenersToTriggerTarget();\n handleAriaExpandedAttribute();\n\n if (!props.lazy) {\n createPopperInstance();\n }\n\n invokeHook('onCreate', [instance]);\n\n if (props.showOnCreate) {\n scheduleShow();\n }\n\n // Prevent a tippy with a delay from hiding if the cursor left then returned\n // before it started hiding\n popper.addEventListener('mouseenter', () => {\n if (instance.props.interactive && instance.state.isVisible) {\n instance.clearDelayTimeouts();\n }\n });\n\n popper.addEventListener('mouseleave', event => {\n if (\n instance.props.interactive &&\n includes(instance.props.trigger, 'mouseenter')\n ) {\n debouncedOnMouseMove(event);\n doc.addEventListener('mousemove', debouncedOnMouseMove);\n }\n });\n\n return instance;\n\n /* ======================= 🔒 Private methods 🔒 ======================= */\n function getNormalizedTouchSettings(): [string | boolean, number] {\n const {touch} = instance.props;\n return Array.isArray(touch) ? touch : [touch, 0];\n }\n\n function getIsCustomTouchBehavior(): boolean {\n return getNormalizedTouchSettings()[0] === 'hold';\n }\n\n function getCurrentTarget(): Element {\n return currentTarget || reference;\n }\n\n function getDelay(isShow: boolean): number {\n // For touch or keyboard input, force `0` delay for UX reasons\n // Also if the instance is mounted but not visible (transitioning out),\n // ignore delay\n if (\n (instance.state.isMounted && !instance.state.isVisible) ||\n currentInput.isTouch ||\n (lastTriggerEvent && lastTriggerEvent.type === 'focus')\n ) {\n return 0;\n }\n\n return getValueAtIndexOrReturn(\n instance.props.delay,\n isShow ? 0 : 1,\n defaultProps.delay,\n );\n }\n\n function invokeHook(\n hook: keyof LifecycleHooks,\n args: [Instance, (Event | Partial<Props>)?],\n shouldInvokePropsHook = true,\n ): void {\n pluginsHooks.forEach(pluginHooks => {\n if (hasOwnProperty(pluginHooks, hook)) {\n // @ts-ignore\n pluginHooks[hook](...args);\n }\n });\n\n if (shouldInvokePropsHook) {\n // @ts-ignore\n instance.props[hook](...args);\n }\n }\n\n function handleAriaDescribedByAttribute(): void {\n const {aria} = instance.props;\n\n if (!aria) {\n return;\n }\n\n const attr = `aria-${aria}`;\n const id = tooltip.id;\n const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n\n nodes.forEach(node => {\n const currentValue = node.getAttribute(attr);\n\n if (instance.state.isVisible) {\n node.setAttribute(attr, currentValue ? `${currentValue} ${id}` : id);\n } else {\n const nextValue = currentValue && currentValue.replace(id, '').trim();\n\n if (nextValue) {\n node.setAttribute(attr, nextValue);\n } else {\n node.removeAttribute(attr);\n }\n }\n });\n }\n\n function handleAriaExpandedAttribute(): void {\n // If the user has specified `aria-expanded` on their reference when the\n // instance was created, we have to assume they're controlling it externally\n // themselves\n if (hadAriaExpandedAttributeOnCreate) {\n return;\n }\n\n const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n\n nodes.forEach(node => {\n if (instance.props.interactive) {\n node.setAttribute(\n 'aria-expanded',\n instance.state.isVisible && node === getCurrentTarget()\n ? 'true'\n : 'false',\n );\n } else {\n node.removeAttribute('aria-expanded');\n }\n });\n }\n\n function cleanupInteractiveMouseListeners(): void {\n doc.body.removeEventListener('mouseleave', scheduleHide);\n doc.removeEventListener('mousemove', debouncedOnMouseMove);\n mouseMoveListeners = mouseMoveListeners.filter(\n listener => listener !== debouncedOnMouseMove,\n );\n }\n\n function onDocumentMouseDown(event: MouseEvent): void {\n // Clicked on interactive popper\n if (\n instance.props.interactive &&\n popper.contains(event.target as Element)\n ) {\n return;\n }\n\n // Clicked on the event listeners target\n if (getCurrentTarget().contains(event.target as Element)) {\n if (currentInput.isTouch) {\n return;\n }\n\n if (\n instance.state.isVisible &&\n includes(instance.props.trigger, 'click')\n ) {\n return;\n }\n }\n\n if (instance.props.hideOnClick === true) {\n isVisibleFromClick = false;\n instance.clearDelayTimeouts();\n instance.hide();\n\n // `mousedown` event is fired right before `focus` if pressing the\n // currentTarget. This lets a tippy with `focus` trigger know that it\n // should not show\n didHideDueToDocumentMouseDown = true;\n setTimeout(() => {\n didHideDueToDocumentMouseDown = false;\n });\n\n // The listener gets added in `scheduleShow()`, but this may be hiding it\n // before it shows, and hide()'s early bail-out behavior can prevent it\n // from being cleaned up\n if (!instance.state.isMounted) {\n removeDocumentMouseDownListener();\n }\n }\n }\n\n function addDocumentMouseDownListener(): void {\n doc.addEventListener('mousedown', onDocumentMouseDown, true);\n }\n\n function removeDocumentMouseDownListener(): void {\n doc.removeEventListener('mousedown', onDocumentMouseDown, true);\n }\n\n function onTransitionedOut(duration: number, callback: () => void): void {\n onTransitionEnd(duration, () => {\n if (\n !instance.state.isVisible &&\n popper.parentNode &&\n popper.parentNode.contains(popper)\n ) {\n callback();\n }\n });\n }\n\n function onTransitionedIn(duration: number, callback: () => void): void {\n onTransitionEnd(duration, callback);\n }\n\n function onTransitionEnd(duration: number, callback: () => void): void {\n function listener(event: TransitionEvent): void {\n if (event.target === tooltip) {\n updateTransitionEndListener(tooltip, 'remove', listener);\n callback();\n }\n }\n\n // Make callback synchronous if duration is 0\n // `transitionend` won't fire otherwise\n if (duration === 0) {\n return callback();\n }\n\n updateTransitionEndListener(\n tooltip,\n 'remove',\n currentTransitionEndListener,\n );\n updateTransitionEndListener(tooltip, 'add', listener);\n\n currentTransitionEndListener = listener;\n }\n\n function on(\n eventType: string,\n handler: EventListener,\n options: boolean | object = false,\n ): void {\n const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n nodes.forEach(node => {\n node.addEventListener(eventType, handler, options);\n listeners.push({node, eventType, handler, options});\n });\n }\n\n function addListenersToTriggerTarget(): void {\n if (getIsCustomTouchBehavior()) {\n on('touchstart', onTrigger, PASSIVE);\n on('touchend', onMouseLeave as EventListener, PASSIVE);\n }\n\n splitBySpaces(instance.props.trigger).forEach(eventType => {\n if (eventType === 'manual') {\n return;\n }\n\n on(eventType, onTrigger);\n\n switch (eventType) {\n case 'mouseenter':\n on('mouseleave', onMouseLeave as EventListener);\n break;\n case 'focus':\n on(isIE ? 'focusout' : 'blur', onBlurOrFocusOut as EventListener);\n break;\n case 'focusin':\n on('focusout', onBlurOrFocusOut as EventListener);\n break;\n }\n });\n }\n\n function removeListenersFromTriggerTarget(): void {\n listeners.forEach(({node, eventType, handler, options}: ListenerObject) => {\n node.removeEventListener(eventType, handler, options);\n });\n listeners = [];\n }\n\n function onTrigger(event: Event): void {\n let shouldScheduleClickHide = false;\n\n if (\n !instance.state.isEnabled ||\n isEventListenerStopped(event) ||\n didHideDueToDocumentMouseDown\n ) {\n return;\n }\n\n lastTriggerEvent = event;\n currentTarget = event.currentTarget as Element;\n\n handleAriaExpandedAttribute();\n\n if (!instance.state.isVisible && isMouseEvent(event)) {\n // If scrolling, `mouseenter` events can be fired if the cursor lands\n // over a new target, but `mousemove` events don't get fired. This\n // causes interactive tooltips to get stuck open until the cursor is\n // moved\n mouseMoveListeners.forEach(listener => listener(event));\n }\n\n // Toggle show/hide when clicking click-triggered tooltips\n if (\n event.type === 'click' &&\n (!includes(instance.props.trigger, 'mouseenter') || isVisibleFromClick) &&\n instance.props.hideOnClick !== false &&\n instance.state.isVisible\n ) {\n shouldScheduleClickHide = true;\n } else {\n const [value, duration] = getNormalizedTouchSettings();\n\n if (currentInput.isTouch && value === 'hold' && duration) {\n // We can hijack the show timeout here, it will be cleared by\n // `scheduleHide()` when necessary\n showTimeout = setTimeout(() => {\n scheduleShow(event);\n }, duration);\n } else {\n scheduleShow(event);\n }\n }\n\n if (event.type === 'click') {\n isVisibleFromClick = !shouldScheduleClickHide;\n }\n\n if (shouldScheduleClickHide) {\n scheduleHide(event);\n }\n }\n\n function onMouseMove(event: MouseEvent): void {\n const isCursorOverReferenceOrPopper = closestCallback(\n event.target as Element,\n (el: Element) => el === reference || el === popper,\n );\n\n if (event.type === 'mousemove' && isCursorOverReferenceOrPopper) {\n return;\n }\n\n const popperTreeData = arrayFrom(popper.querySelectorAll(POPPER_SELECTOR))\n .concat(popper)\n .map((popper: PopperElement) => {\n const instance = popper._tippy!;\n const {tooltip} = instance.popperChildren;\n const {interactiveBorder} = instance.props;\n\n return {\n popperRect: popper.getBoundingClientRect(),\n tooltipRect: tooltip.getBoundingClientRect(),\n interactiveBorder,\n };\n });\n\n if (isCursorOutsideInteractiveBorder(popperTreeData, event)) {\n cleanupInteractiveMouseListeners();\n scheduleHide(event);\n }\n }\n\n function onMouseLeave(event: MouseEvent): void {\n if (isEventListenerStopped(event)) {\n return;\n }\n\n if (includes(instance.props.trigger, 'click') && isVisibleFromClick) {\n return;\n }\n\n if (instance.props.interactive) {\n doc.body.addEventListener('mouseleave', scheduleHide);\n doc.addEventListener('mousemove', debouncedOnMouseMove);\n pushIfUnique(mouseMoveListeners, debouncedOnMouseMove);\n debouncedOnMouseMove(event);\n\n return;\n }\n\n scheduleHide(event);\n }\n\n function onBlurOrFocusOut(event: FocusEvent): void {\n if (\n !includes(instance.props.trigger, 'focusin') &&\n event.target !== getCurrentTarget()\n ) {\n return;\n }\n\n // If focus was moved to within the popper\n if (\n instance.props.interactive &&\n event.relatedTarget &&\n popper.contains(event.relatedTarget as Element)\n ) {\n return;\n }\n\n scheduleHide(event);\n }\n\n function isEventListenerStopped(event: Event): boolean {\n const supportsTouch = 'ontouchstart' in window;\n const isTouchEvent = includes(event.type, 'touch');\n const isCustomTouch = getIsCustomTouchBehavior();\n\n return (\n (supportsTouch &&\n currentInput.isTouch &&\n isCustomTouch &&\n !isTouchEvent) ||\n (currentInput.isTouch && !isCustomTouch && isTouchEvent)\n );\n }\n\n function createPopperInstance(): void {\n const {popperOptions} = instance.props;\n const {arrow} = instance.popperChildren;\n const flipModifier = getModifier(popperOptions, 'flip');\n const preventOverflowModifier = getModifier(\n popperOptions,\n 'preventOverflow',\n );\n\n let distancePx: number;\n\n function applyMutations(data: Popper.Data): void {\n const prevPlacement = instance.state.currentPlacement;\n instance.state.currentPlacement = data.placement;\n\n if (instance.props.flip && !instance.props.flipOnUpdate) {\n if (data.flipped) {\n instance.popperInstance!.options.placement = data.placement;\n }\n\n setModifierValue(\n instance.popperInstance!.modifiers,\n 'flip',\n 'enabled',\n false,\n );\n }\n\n tooltip.setAttribute('data-placement', data.placement);\n if (data.attributes['x-out-of-boundaries'] !== false) {\n tooltip.setAttribute('data-out-of-boundaries', '');\n } else {\n tooltip.removeAttribute('data-out-of-boundaries');\n }\n\n const basePlacement = getBasePlacement(data.placement);\n\n const isVerticalPlacement = includes(['top', 'bottom'], basePlacement);\n const isSecondaryPlacement = includes(['bottom', 'right'], basePlacement);\n\n // Apply `distance` prop\n tooltip.style.top = '0';\n tooltip.style.left = '0';\n tooltip.style[isVerticalPlacement ? 'top' : 'left'] =\n (isSecondaryPlacement ? 1 : -1) * distancePx + 'px';\n\n // Careful not to cause an infinite loop here\n // Fixes https://github.com/FezVrasta/popper.js/issues/784\n if (prevPlacement && prevPlacement !== data.placement) {\n instance.popperInstance!.update();\n }\n }\n\n const config: Popper.PopperOptions = {\n eventsEnabled: false,\n placement: instance.props.placement,\n ...popperOptions,\n modifiers: {\n ...(popperOptions && popperOptions.modifiers),\n // We can't use `padding` on the popper el because of these bugs when\n // flipping from a vertical to horizontal placement or vice-versa,\n // there is severe flickering.\n // https://github.com/FezVrasta/popper.js/issues/720\n // This workaround increases bundle size by 250B minzip unfortunately,\n // due to need to custom compute the distance (since Popper rect does\n // not get affected by the inner tooltip's distance offset)\n tippyDistance: {\n enabled: true,\n order: 0,\n fn(data: Popper.Data): Popper.Data {\n // `html` fontSize may change while `popperInstance` is alive\n // e.g. on resize in media queries\n distancePx = getUnitsInPx(doc, instance.props.distance);\n\n const basePlacement = getBasePlacement(data.placement);\n\n const computedPreventOverflowPadding = getComputedPadding(\n basePlacement,\n preventOverflowModifier && preventOverflowModifier.padding,\n distancePx,\n );\n const computedFlipPadding = getComputedPadding(\n basePlacement,\n flipModifier && flipModifier.padding,\n distancePx,\n );\n\n const instanceModifiers = instance.popperInstance!.modifiers;\n\n setModifierValue(\n instanceModifiers,\n 'preventOverflow',\n 'padding',\n computedPreventOverflowPadding,\n );\n setModifierValue(\n instanceModifiers,\n 'flip',\n 'padding',\n computedFlipPadding,\n );\n\n return data;\n },\n },\n preventOverflow: {\n boundariesElement: instance.props.boundary,\n ...preventOverflowModifier,\n },\n flip: {\n enabled: instance.props.flip,\n behavior: instance.props.flipBehavior,\n ...flipModifier,\n },\n arrow: {\n element: arrow,\n enabled: !!arrow,\n ...getModifier(popperOptions, 'arrow'),\n },\n offset: {\n offset: instance.props.offset,\n ...getModifier(popperOptions, 'offset'),\n },\n },\n onCreate(data: Popper.Data): void {\n applyMutations(data);\n\n preserveInvocation(\n popperOptions && popperOptions.onCreate,\n config.onCreate,\n [data],\n );\n\n runMountCallback();\n },\n onUpdate(data: Popper.Data): void {\n applyMutations(data);\n\n preserveInvocation(\n popperOptions && popperOptions.onUpdate,\n config.onUpdate,\n [data],\n );\n\n runMountCallback();\n },\n };\n\n instance.popperInstance = new Popper(\n reference,\n popper,\n config,\n ) as PopperInstance;\n }\n\n function runMountCallback(): void {\n // Only invoke currentMountCallback after 2 updates\n // This fixes some bugs in Popper.js (TODO: aim for only 1 update)\n if (popperUpdates === 0) {\n popperUpdates++; // 1\n instance.popperInstance!.update();\n } else if (currentMountCallback && popperUpdates === 1) {\n popperUpdates++; // 2\n reflow(popper);\n currentMountCallback();\n }\n }\n\n function mount(): void {\n // The mounting callback (`currentMountCallback`) is only run due to a\n // popperInstance update/create\n popperUpdates = 0;\n\n const {appendTo} = instance.props;\n\n let parentNode: any;\n\n // By default, we'll append the popper to the triggerTargets's parentNode so\n // it's directly after the reference element so the elements inside the\n // tippy can be tabbed to\n // If there are clipping issues, the user can specify a different appendTo\n // and ensure focus management is handled correctly manually\n const node = getCurrentTarget();\n\n if (\n (instance.props.interactive && appendTo === defaultProps.appendTo) ||\n appendTo === 'parent'\n ) {\n parentNode = node.parentNode;\n } else {\n parentNode = invokeWithArgsOrReturn(appendTo, [node]);\n }\n\n // The popper element needs to exist on the DOM before its position can be\n // updated as Popper.js needs to read its dimensions\n if (!parentNode.contains(popper)) {\n parentNode.appendChild(popper);\n }\n\n if (__DEV__) {\n // Accessibility check\n warnWhen(\n instance.props.interactive &&\n appendTo === defaultProps.appendTo &&\n node.nextElementSibling !== popper,\n [\n 'Interactive tippy element may not be accessible via keyboard navigation',\n 'because it is not directly after the reference element in the DOM source',\n 'order.',\n '\\n\\n',\n 'Using a wrapper <div> or <span> tag around the reference element solves',\n 'this by creating a new parentNode context.',\n '\\n\\n',\n 'Specifying `appendTo: document.body` silences this warning, but it',\n 'assumes you are using a focus management solution to handle keyboard',\n 'navigation.',\n '\\n\\n',\n 'See: https://atomiks.github.io/tippyjs/accessibility/#interactivity',\n ].join(' '),\n );\n }\n\n setModifierValue(\n instance.popperInstance!.modifiers,\n 'flip',\n 'enabled',\n instance.props.flip,\n );\n\n instance.popperInstance!.enableEventListeners();\n\n // Mounting callback invoked in `onUpdate`\n instance.popperInstance!.update();\n }\n\n function scheduleShow(event?: Event): void {\n instance.clearDelayTimeouts();\n\n if (!instance.popperInstance) {\n createPopperInstance();\n }\n\n if (event) {\n invokeHook('onTrigger', [instance, event]);\n }\n\n addDocumentMouseDownListener();\n\n const delay = getDelay(true);\n\n if (delay) {\n showTimeout = setTimeout(() => {\n instance.show();\n }, delay);\n } else {\n instance.show();\n }\n }\n\n function scheduleHide(event: Event): void {\n instance.clearDelayTimeouts();\n\n invokeHook('onUntrigger', [instance, event]);\n\n if (!instance.state.isVisible) {\n removeDocumentMouseDownListener();\n\n return;\n }\n\n // For interactive tippies, scheduleHide is added to a document.body handler\n // from onMouseLeave so must intercept scheduled hides from mousemove/leave\n // events when trigger contains mouseenter and click, and the tip is\n // currently shown as a result of a click.\n if (\n includes(instance.props.trigger, 'mouseenter') &&\n includes(instance.props.trigger, 'click') &&\n includes(['mouseleave', 'mousemove'], event.type) &&\n isVisibleFromClick\n ) {\n return;\n }\n\n const delay = getDelay(false);\n\n if (delay) {\n hideTimeout = setTimeout(() => {\n if (instance.state.isVisible) {\n instance.hide();\n }\n }, delay);\n } else {\n // Fixes a `transitionend` problem when it fires 1 frame too\n // late sometimes, we don't want hide() to be called.\n scheduleHideAnimationFrame = requestAnimationFrame(() => {\n instance.hide();\n });\n }\n }\n\n /* ======================= 🔑 Public methods 🔑 ======================= */\n function enable(): void {\n instance.state.isEnabled = true;\n }\n\n function disable(): void {\n // Disabling the instance should also hide it\n // https://github.com/atomiks/tippy.js-react/issues/106\n instance.hide();\n instance.state.isEnabled = false;\n }\n\n function clearDelayTimeouts(): void {\n clearTimeout(showTimeout);\n clearTimeout(hideTimeout);\n cancelAnimationFrame(scheduleHideAnimationFrame);\n }\n\n function setProps(partialProps: Partial<Props>): void {\n if (__DEV__) {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('setProps'));\n }\n\n if (instance.state.isDestroyed) {\n return;\n }\n\n if (__DEV__) {\n validateProps(partialProps, plugins);\n warnWhen(\n partialProps.plugins\n ? partialProps.plugins.length !== plugins.length ||\n plugins.some((p, i) => {\n if (partialProps.plugins && partialProps.plugins[i]) {\n return p !== partialProps.plugins[i];\n } else {\n return true;\n }\n })\n : false,\n `Cannot update plugins`,\n );\n }\n\n invokeHook('onBeforeUpdate', [instance, partialProps]);\n\n removeListenersFromTriggerTarget();\n\n const prevProps = instance.props;\n const nextProps = evaluateProps(reference, {\n ...instance.props,\n ...partialProps,\n ignoreAttributes: true,\n });\n\n nextProps.ignoreAttributes = useIfDefined(\n partialProps.ignoreAttributes,\n prevProps.ignoreAttributes,\n );\n\n instance.props = nextProps;\n\n addListenersToTriggerTarget();\n\n if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {\n cleanupInteractiveMouseListeners();\n debouncedOnMouseMove = debounce(\n onMouseMove,\n nextProps.interactiveDebounce,\n );\n }\n\n updatePopperElement(popper, prevProps, nextProps);\n instance.popperChildren = getChildren(popper);\n\n // Ensure stale aria-expanded attributes are removed\n if (prevProps.triggerTarget && !nextProps.triggerTarget) {\n normalizeToArray(prevProps.triggerTarget).forEach(node => {\n node.removeAttribute('aria-expanded');\n });\n } else if (nextProps.triggerTarget) {\n reference.removeAttribute('aria-expanded');\n }\n\n handleAriaExpandedAttribute();\n\n if (instance.popperInstance) {\n if (\n POPPER_INSTANCE_DEPENDENCIES.some(prop => {\n return (\n hasOwnProperty(partialProps, prop as string) &&\n partialProps[prop] !== prevProps[prop]\n );\n })\n ) {\n const currentReference = instance.popperInstance.reference;\n instance.popperInstance.destroy();\n createPopperInstance();\n instance.popperInstance.reference = currentReference;\n\n if (instance.state.isVisible) {\n instance.popperInstance.enableEventListeners();\n }\n } else {\n instance.popperInstance.update();\n }\n }\n\n invokeHook('onAfterUpdate', [instance, partialProps]);\n }\n\n function setContent(content: Content): void {\n instance.setProps({content});\n }\n\n function show(\n duration = getValueAtIndexOrReturn(\n instance.props.duration,\n 0,\n defaultProps.duration,\n ),\n ): void {\n if (__DEV__) {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('show'));\n }\n\n // Early bail-out\n const isAlreadyVisible = instance.state.isVisible;\n const isDestroyed = instance.state.isDestroyed;\n const isDisabled = !instance.state.isEnabled;\n const isTouchAndTouchDisabled =\n currentInput.isTouch && !instance.props.touch;\n\n if (\n isAlreadyVisible ||\n isDestroyed ||\n isDisabled ||\n isTouchAndTouchDisabled\n ) {\n return;\n }\n\n // Normalize `disabled` behavior across browsers.\n // Firefox allows events on disabled elements, but Chrome doesn't.\n // Using a wrapper element (i.e. <span>) is recommended.\n if (getCurrentTarget().hasAttribute('disabled')) {\n return;\n }\n\n if (!instance.popperInstance) {\n createPopperInstance();\n }\n\n invokeHook('onShow', [instance], false);\n if (instance.props.onShow(instance) === false) {\n return;\n }\n\n addDocumentMouseDownListener();\n\n popper.style.visibility = 'visible';\n instance.state.isVisible = true;\n\n // Prevent a transition of the popper from its previous position and of the\n // elements at a different placement\n // Check if the tippy was fully unmounted before `show()` was called, to\n // allow for smooth transition for `createSingleton()`\n if (!instance.state.isMounted) {\n setTransitionDuration(transitionableElements.concat(popper), 0);\n }\n\n currentMountCallback = (): void => {\n if (!instance.state.isVisible) {\n return;\n }\n\n setTransitionDuration([popper], instance.props.updateDuration);\n setTransitionDuration(transitionableElements, duration);\n setVisibilityState(transitionableElements, 'visible');\n\n handleAriaDescribedByAttribute();\n handleAriaExpandedAttribute();\n\n pushIfUnique(mountedInstances, instance);\n\n updateIOSClass(true);\n\n instance.state.isMounted = true;\n invokeHook('onMount', [instance]);\n\n onTransitionedIn(duration, () => {\n instance.state.isShown = true;\n invokeHook('onShown', [instance]);\n });\n };\n\n mount();\n }\n\n function hide(\n duration = getValueAtIndexOrReturn(\n instance.props.duration,\n 1,\n defaultProps.duration,\n ),\n ): void {\n if (__DEV__) {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hide'));\n }\n\n // Early bail-out\n const isAlreadyHidden = !instance.state.isVisible && !isBeingDestroyed;\n const isDestroyed = instance.state.isDestroyed;\n const isDisabled = !instance.state.isEnabled && !isBeingDestroyed;\n\n if (isAlreadyHidden || isDestroyed || isDisabled) {\n return;\n }\n\n invokeHook('onHide', [instance], false);\n if (instance.props.onHide(instance) === false && !isBeingDestroyed) {\n return;\n }\n\n removeDocumentMouseDownListener();\n\n popper.style.visibility = 'hidden';\n instance.state.isVisible = false;\n instance.state.isShown = false;\n\n setTransitionDuration(transitionableElements, duration);\n setVisibilityState(transitionableElements, 'hidden');\n\n handleAriaDescribedByAttribute();\n handleAriaExpandedAttribute();\n\n onTransitionedOut(duration, () => {\n instance.popperInstance!.disableEventListeners();\n instance.popperInstance!.options.placement = instance.props.placement;\n\n popper.parentNode!.removeChild(popper);\n\n mountedInstances = mountedInstances.filter(i => i !== instance);\n\n if (mountedInstances.length === 0) {\n updateIOSClass(false);\n }\n\n instance.state.isMounted = false;\n invokeHook('onHidden', [instance]);\n });\n }\n\n function destroy(): void {\n if (__DEV__) {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('destroy'));\n }\n\n if (instance.state.isDestroyed) {\n return;\n }\n\n isBeingDestroyed = true;\n\n instance.clearDelayTimeouts();\n instance.hide(0);\n\n removeListenersFromTriggerTarget();\n\n delete reference._tippy;\n\n if (instance.popperInstance) {\n instance.popperInstance.destroy();\n }\n\n isBeingDestroyed = false;\n instance.state.isDestroyed = true;\n\n invokeHook('onDestroy', [instance]);\n }\n}\n","import {version} from '../package.json';\nimport {defaultProps, setDefaultProps, validateProps} from './props';\nimport createTippy, {mountedInstances} from './createTippy';\nimport bindGlobalEventListeners, {\n currentInput,\n} from './bindGlobalEventListeners';\nimport {getArrayOfElements, isReferenceElement, isElement} from './utils';\nimport {warnWhen, validateTargets} from './validation';\nimport {\n Props,\n Instance,\n Targets,\n HideAllOptions,\n Plugin,\n Tippy,\n HideAll,\n} from './types';\n\nfunction tippy(\n targets: Targets,\n optionalProps: Partial<Props> = {},\n /** @deprecated use Props.plugins */\n plugins: Plugin[] = [],\n): Instance | Instance[] {\n plugins = defaultProps.plugins.concat(optionalProps.plugins || plugins);\n\n if (__DEV__) {\n validateTargets(targets);\n validateProps(optionalProps, plugins);\n }\n\n bindGlobalEventListeners();\n\n const passedProps: Partial<Props> = {...optionalProps, plugins};\n\n const elements = getArrayOfElements(targets);\n\n if (__DEV__) {\n const isSingleContentElement = isElement(passedProps.content);\n const isMoreThanOneReferenceElement = elements.length > 1;\n warnWhen(\n isSingleContentElement && isMoreThanOneReferenceElement,\n [\n 'tippy() was passed an Element as the `content` prop, but more than one tippy',\n 'instance was created by this invocation. This means the content element will',\n 'only be appended to the last tippy instance.',\n '\\n\\n',\n 'Instead, pass the .innerHTML of the element, or use a function that returns a',\n 'cloned version of the element instead.',\n '\\n\\n',\n '1) content: element.innerHTML\\n',\n '2) content: () => element.cloneNode(true)',\n ].join(' '),\n );\n }\n\n const instances = elements.reduce<Instance[]>(\n (acc, reference): Instance[] => {\n const instance = reference && createTippy(reference, passedProps);\n\n if (instance) {\n acc.push(instance);\n }\n\n return acc;\n },\n [],\n );\n\n return isElement(targets) ? instances[0] : instances;\n}\n\ntippy.version = version;\ntippy.defaultProps = defaultProps;\ntippy.setDefaultProps = setDefaultProps;\ntippy.currentInput = currentInput;\n\nexport default tippy;\n\n/**\n * Hides all visible poppers on the document\n */\nexport const hideAll: HideAll = ({\n exclude: excludedReferenceOrInstance,\n duration,\n}: HideAllOptions = {}) => {\n mountedInstances.forEach(instance => {\n let isExcluded = false;\n\n if (excludedReferenceOrInstance) {\n isExcluded = isReferenceElement(excludedReferenceOrInstance)\n ? instance.reference === excludedReferenceOrInstance\n : instance.popper === (excludedReferenceOrInstance as Instance).popper;\n }\n\n if (!isExcluded) {\n instance.hide(duration);\n }\n });\n};\n\n/**\n * Returns a proxy wrapper function that passes the plugins\n * @deprecated use tippy.setDefaultProps({plugins: [...]});\n */\nexport function createTippyWithPlugins(outerPlugins: Plugin[]): Tippy {\n if (__DEV__) {\n warnWhen(\n true,\n [\n 'createTippyWithPlugins([...]) has been deprecated.',\n '\\n\\n',\n 'Use tippy.setDefaultProps({plugins: [...]}) instead.',\n ].join(' '),\n );\n }\n\n const tippyPluginsWrapper = (\n targets: Targets,\n optionalProps: Partial<Props> = {},\n innerPlugins: Plugin[] = [],\n ): Instance | Instance[] => {\n innerPlugins = optionalProps.plugins || innerPlugins;\n return tippy(targets, {\n ...optionalProps,\n plugins: [...outerPlugins, ...innerPlugins],\n });\n };\n\n tippyPluginsWrapper.version = version;\n tippyPluginsWrapper.defaultProps = defaultProps;\n tippyPluginsWrapper.setDefaultProps = setDefaultProps;\n tippyPluginsWrapper.currentInput = currentInput;\n\n // @ts-ignore\n return tippyPluginsWrapper;\n}\n","import {Instance, Targets, Plugin, Props} from '../types';\nimport tippy from '..';\nimport {errorWhen} from '../validation';\nimport {removeProperties, normalizeToArray, includes} from '../utils';\nimport {defaultProps} from '../props';\nimport {ListenerObject} from '../types-internal';\n\nconst BUBBLING_EVENTS_MAP = {\n mouseover: 'mouseenter',\n focusin: 'focus',\n click: 'click',\n};\n\n/**\n * Creates a delegate instance that controls the creation of tippy instances\n * for child elements (`target` CSS selector).\n */\nfunction delegate(\n targets: Targets,\n props: Partial<Props> & {target: string},\n /** @deprecated use Props.plugins */\n plugins: Plugin[] = [],\n): Instance | Instance[] {\n if (__DEV__) {\n errorWhen(\n !(props && props.target),\n [\n 'You must specity a `target` prop indicating a CSS selector string matching',\n 'the target elements that should receive a tippy.',\n ].join(' '),\n );\n }\n\n plugins = props.plugins || plugins;\n\n let listeners: ListenerObject[] = [];\n let childTippyInstances: Instance[] = [];\n\n const {target} = props;\n\n const nativeProps = removeProperties(props, ['target']);\n const parentProps = {...nativeProps, plugins, trigger: 'manual'};\n const childProps = {...nativeProps, plugins, showOnCreate: true};\n\n const returnValue = tippy(targets, parentProps);\n const normalizedReturnValue = normalizeToArray(returnValue);\n\n function onTrigger(event: Event): void {\n if (!event.target) {\n return;\n }\n\n const targetNode = (event.target as Element).closest(target);\n\n if (!targetNode) {\n return;\n }\n\n // Get relevant trigger with fallbacks:\n // 1. Check `data-tippy-trigger` attribute on target node\n // 2. Fallback to `trigger` passed to `delegate()`\n // 3. Fallback to `defaultProps.trigger`\n const trigger =\n targetNode.getAttribute('data-tippy-trigger') ||\n props.trigger ||\n defaultProps.trigger;\n\n // Only create the instance if the bubbling event matches the trigger type\n if (!includes(trigger, (BUBBLING_EVENTS_MAP as any)[event.type])) {\n return;\n }\n\n const instance = tippy(targetNode, childProps);\n\n if (instance) {\n childTippyInstances = childTippyInstances.concat(instance);\n }\n }\n\n function on(\n node: Element,\n eventType: string,\n handler: EventListener,\n options: object | boolean = false,\n ): void {\n node.addEventListener(eventType, handler, options);\n listeners.push({node, eventType, handler, options});\n }\n\n function addEventListeners(instance: Instance): void {\n const {reference} = instance;\n\n on(reference, 'mouseover', onTrigger);\n on(reference, 'focusin', onTrigger);\n on(reference, 'click', onTrigger);\n }\n\n function removeEventListeners(): void {\n listeners.forEach(({node, eventType, handler, options}: ListenerObject) => {\n node.removeEventListener(eventType, handler, options);\n });\n listeners = [];\n }\n\n function applyMutations(instance: Instance): void {\n const originalDestroy = instance.destroy;\n instance.destroy = (shouldDestroyChildInstances = true): void => {\n if (shouldDestroyChildInstances) {\n childTippyInstances.forEach(instance => {\n instance.destroy();\n });\n }\n\n childTippyInstances = [];\n\n removeEventListeners();\n originalDestroy();\n };\n\n addEventListeners(instance);\n }\n\n normalizedReturnValue.forEach(applyMutations);\n\n return returnValue;\n}\n\nexport default delegate;\n","import {AnimateFill} from '../types';\nimport {BACKDROP_CLASS} from '../constants';\nimport {div, setVisibilityState} from '../utils';\nimport {warnWhen} from '../validation';\n\nconst animateFill: AnimateFill = {\n name: 'animateFill',\n defaultValue: false,\n fn(instance) {\n const {tooltip, content} = instance.popperChildren;\n\n const backdrop = instance.props.animateFill\n ? createBackdropElement()\n : null;\n\n function addBackdropToPopperChildren(): void {\n instance.popperChildren.backdrop = backdrop;\n }\n\n return {\n onCreate(): void {\n if (backdrop) {\n addBackdropToPopperChildren();\n\n tooltip.insertBefore(backdrop, tooltip.firstElementChild!);\n tooltip.setAttribute('data-animatefill', '');\n tooltip.style.overflow = 'hidden';\n\n instance.setProps({animation: 'shift-away', arrow: false});\n }\n },\n onMount(): void {\n if (backdrop) {\n const {transitionDuration} = tooltip.style;\n const duration = Number(transitionDuration.replace('ms', ''));\n\n // The content should fade in after the backdrop has mostly filled the\n // tooltip element. `clip-path` is the other alternative but is not\n // well-supported and is buggy on some devices.\n content.style.transitionDelay = `${Math.round(duration / 10)}ms`;\n\n backdrop.style.transitionDuration = transitionDuration;\n setVisibilityState([backdrop], 'visible');\n\n // Warn if the stylesheets are not loaded\n if (__DEV__) {\n warnWhen(\n getComputedStyle(backdrop).position !== 'absolute',\n `The \\`tippy.js/dist/backdrop.css\\` stylesheet has not been\n imported!\n \n The \\`animateFill\\` plugin requires this stylesheet to work.`,\n );\n\n warnWhen(\n getComputedStyle(tooltip).transform === 'none',\n `The \\`tippy.js/animations/shift-away.css\\` stylesheet has not\n been imported!\n \n The \\`animateFill\\` plugin requires this stylesheet to work.`,\n );\n }\n }\n },\n onShow(): void {\n if (backdrop) {\n backdrop.style.transitionDuration = '0ms';\n }\n },\n onHide(): void {\n if (backdrop) {\n setVisibilityState([backdrop], 'hidden');\n }\n },\n onAfterUpdate(): void {\n // With this type of prop, it's highly unlikely it will be changed\n // dynamically. We'll leave out the diff/update logic it to save bytes.\n\n // `popperChildren` is assigned a new object onAfterUpdate\n addBackdropToPopperChildren();\n },\n };\n },\n};\n\nexport default animateFill;\n\nfunction createBackdropElement(): HTMLDivElement {\n const backdrop = div();\n backdrop.className = BACKDROP_CLASS;\n setVisibilityState([backdrop], 'hidden');\n return backdrop;\n}\n","import {\n PopperElement,\n Placement,\n FollowCursor,\n Props,\n ReferenceElement,\n} from '../types';\nimport {\n includes,\n closestCallback,\n useIfDefined,\n isMouseEvent,\n getOwnerDocument,\n} from '../utils';\nimport {getBasePlacement} from '../popper';\nimport {currentInput} from '../bindGlobalEventListeners';\nimport Popper from 'popper.js';\n\nconst followCursor: FollowCursor = {\n name: 'followCursor',\n defaultValue: false,\n fn(instance) {\n const {reference, popper} = instance;\n\n let originalReference:\n | ReferenceElement\n | Popper.ReferenceObject\n | null = null;\n\n // Support iframe contexts\n // Static check that assumes any of the `triggerTarget` or `reference`\n // nodes will never change documents, even when they are updated\n const doc = getOwnerDocument(instance.props.triggerTarget || reference);\n\n // Internal state\n let lastMouseMoveEvent: MouseEvent;\n let mouseCoords: {clientX: number; clientY: number} | null = null;\n let isInternallySettingControlledProp = false;\n\n // These are controlled by this plugin, so we need to store the user's\n // original prop value\n const userProps = instance.props;\n\n function setUserProps(props: Partial<Props>): void {\n const keys = Object.keys(props) as Array<keyof Props>;\n keys.forEach(prop => {\n (userProps as any)[prop] = useIfDefined(props[prop], userProps[prop]);\n });\n }\n\n function getIsManual(): boolean {\n return instance.props.trigger.trim() === 'manual';\n }\n\n function getIsEnabled(): boolean {\n // #597\n const isValidMouseEvent = getIsManual()\n ? true\n : // Check if a keyboard \"click\"\n mouseCoords !== null &&\n !(mouseCoords.clientX === 0 && mouseCoords.clientY === 0);\n\n return instance.props.followCursor && isValidMouseEvent;\n }\n\n function getIsInitialBehavior(): boolean {\n return (\n currentInput.isTouch ||\n (instance.props.followCursor === 'initial' && instance.state.isVisible)\n );\n }\n\n function resetReference(): void {\n if (instance.popperInstance && originalReference) {\n instance.popperInstance.reference = originalReference;\n }\n }\n\n function handlePlacement(): void {\n // Due to `getVirtualOffsets()`, we need to reverse the placement if it's\n // shifted (start -> end, and vice-versa)\n\n // Early bail-out\n if (!getIsEnabled() && instance.props.placement === userProps.placement) {\n return;\n }\n\n const {placement} = userProps;\n const shift = placement.split('-')[1];\n\n isInternallySettingControlledProp = true;\n\n instance.setProps({\n placement: (getIsEnabled() && shift\n ? placement.replace(shift, shift === 'start' ? 'end' : 'start')\n : placement) as Placement,\n });\n\n isInternallySettingControlledProp = false;\n }\n\n function handlePopperListeners(): void {\n if (!instance.popperInstance) {\n return;\n }\n\n // Popper's scroll listeners make sense for `true` only. TODO: work out\n // how to only listen horizontal scroll for \"horizontal\" and vertical\n // scroll for \"vertical\"\n if (getIsEnabled() && getIsInitialBehavior()) {\n instance.popperInstance.disableEventListeners();\n }\n }\n\n function handleMouseMoveListener(): void {\n if (getIsEnabled()) {\n addListener();\n } else {\n resetReference();\n }\n }\n\n function triggerLastMouseMove(): void {\n if (getIsEnabled()) {\n onMouseMove(lastMouseMoveEvent);\n }\n }\n\n function addListener(): void {\n doc.addEventListener('mousemove', onMouseMove);\n }\n\n function removeListener(): void {\n doc.removeEventListener('mousemove', onMouseMove);\n }\n\n function onMouseMove(event: MouseEvent): void {\n const {clientX, clientY} = (lastMouseMoveEvent = event);\n\n if (!instance.popperInstance || !instance.state.currentPlacement) {\n return;\n }\n\n // If the instance is interactive, avoid updating the position unless it's\n // over the reference element\n const isCursorOverReference = closestCallback(\n event.target as Element,\n (el: Element) => el === reference,\n );\n\n const {followCursor} = instance.props;\n const isHorizontal = followCursor === 'horizontal';\n const isVertical = followCursor === 'vertical';\n const isVerticalPlacement = includes(\n ['top', 'bottom'],\n getBasePlacement(instance.state.currentPlacement),\n );\n\n // The virtual reference needs some size to prevent itself from overflowing\n const {size, x, y} = getVirtualOffsets(popper, isVerticalPlacement);\n\n if (isCursorOverReference || !instance.props.interactive) {\n // Preserve custom position ReferenceObjects, which may not be the\n // original targets reference passed as an argument\n if (originalReference === null) {\n originalReference = instance.popperInstance.reference;\n }\n\n instance.popperInstance.reference = {\n referenceNode: reference,\n // These `client` values don't get used by Popper.js if they are 0\n clientWidth: 0,\n clientHeight: 0,\n getBoundingClientRect(): DOMRect | ClientRect {\n const rect = reference.getBoundingClientRect();\n return {\n width: isVerticalPlacement ? size : 0,\n height: isVerticalPlacement ? 0 : size,\n top: (isHorizontal ? rect.top : clientY) - y,\n bottom: (isHorizontal ? rect.bottom : clientY) + y,\n left: (isVertical ? rect.left : clientX) - x,\n right: (isVertical ? rect.right : clientX) + x,\n };\n },\n };\n\n instance.popperInstance.update();\n }\n\n if (getIsInitialBehavior()) {\n removeListener();\n }\n }\n\n return {\n onAfterUpdate(_, partialProps): void {\n if (!isInternallySettingControlledProp) {\n setUserProps(partialProps);\n\n if (partialProps.placement) {\n handlePlacement();\n }\n }\n\n // A new placement causes the popperInstance to be recreated\n if (partialProps.placement) {\n handlePopperListeners();\n }\n\n // Wait for `.update()` to set `instance.state.currentPlacement` to\n // the new placement\n requestAnimationFrame(triggerLastMouseMove);\n },\n onMount(): void {\n triggerLastMouseMove();\n handlePopperListeners();\n },\n onShow(): void {\n if (getIsManual()) {\n // Since there's no trigger event to use, we have to use these as\n // baseline coords\n mouseCoords = {clientX: 0, clientY: 0};\n // Ensure `lastMouseMoveEvent` doesn't access any other properties\n // of a MouseEvent here\n lastMouseMoveEvent = mouseCoords as MouseEvent;\n\n handlePlacement();\n handleMouseMoveListener();\n }\n },\n onTrigger(_, event): void {\n // Tapping on touch devices can trigger `mouseenter` then `focus`\n if (mouseCoords) {\n return;\n }\n\n if (isMouseEvent(event)) {\n mouseCoords = {clientX: event.clientX, clientY: event.clientY};\n lastMouseMoveEvent = event;\n }\n\n handlePlacement();\n handleMouseMoveListener();\n },\n onUntrigger(): void {\n // If untriggered before showing (`onHidden` will never be invoked)\n if (!instance.state.isVisible) {\n removeListener();\n mouseCoords = null;\n }\n },\n onHidden(): void {\n removeListener();\n resetReference();\n mouseCoords = null;\n },\n };\n },\n};\n\nexport default followCursor;\n\nexport function getVirtualOffsets(\n popper: PopperElement,\n isVerticalPlacement: boolean,\n): {\n size: number;\n x: number;\n y: number;\n} {\n const size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;\n\n return {\n size,\n x: isVerticalPlacement ? size : 0,\n y: isVerticalPlacement ? 0 : size,\n };\n}\n","import {InlinePositioning, BasePlacement} from '../types';\nimport {arrayFrom} from '../utils';\nimport {getBasePlacement} from '../popper';\n\n// TODO: Work on a \"cursor\" value so it chooses a rect optimal to the cursor\n// position. This will require the `followCursor` plugin's fixes for overflow\n// due to using event.clientX/Y values. (normalizedPlacement, getVirtualOffsets)\nconst inlinePositioning: InlinePositioning = {\n name: 'inlinePositioning',\n defaultValue: false,\n fn(instance) {\n const {reference} = instance;\n\n function getIsEnabled(): boolean {\n return !!instance.props.inlinePositioning;\n }\n\n return {\n onHidden(): void {\n if (getIsEnabled()) {\n instance.popperInstance!.reference = reference;\n }\n },\n onShow(): void {\n if (!getIsEnabled()) {\n return;\n }\n\n instance.popperInstance!.reference = {\n referenceNode: reference,\n // These `client` values don't get used by Popper.js if they are 0\n clientWidth: 0,\n clientHeight: 0,\n getBoundingClientRect(): ClientRect | DOMRect {\n return getInlineBoundingClientRect(\n instance.state.currentPlacement &&\n getBasePlacement(instance.state.currentPlacement),\n reference.getBoundingClientRect(),\n arrayFrom(reference.getClientRects()),\n );\n },\n };\n },\n };\n },\n};\n\nexport default inlinePositioning;\n\nexport function getInlineBoundingClientRect(\n currentBasePlacement: BasePlacement | null,\n boundingRect: ClientRect,\n clientRects: ClientRect[],\n): ClientRect {\n // Not an inline element, or placement is not yet known\n if (clientRects.length < 2 || currentBasePlacement === null) {\n return boundingRect;\n }\n\n switch (currentBasePlacement) {\n case 'top':\n case 'bottom': {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = currentBasePlacement === 'top';\n\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n\n return {top, bottom, left, right, width, height};\n }\n case 'left':\n case 'right': {\n const minLeft = Math.min(...clientRects.map(rects => rects.left));\n const maxRight = Math.max(...clientRects.map(rects => rects.right));\n const measureRects = clientRects.filter(rect =>\n currentBasePlacement === 'left'\n ? rect.left === minLeft\n : rect.right === maxRight,\n );\n\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n\n return {top, bottom, left, right, width, height};\n }\n default: {\n return boundingRect;\n }\n }\n}\n","import {Sticky, ReferenceElement} from '../types';\nimport Popper from 'popper.js';\n\nconst sticky: Sticky = {\n name: 'sticky',\n defaultValue: false,\n fn(instance) {\n const {reference, popper} = instance;\n\n function getReference(): ReferenceElement | Popper.ReferenceObject {\n return instance.popperInstance\n ? instance.popperInstance.reference\n : reference;\n }\n\n function shouldCheck(value: 'reference' | 'popper'): boolean {\n return instance.props.sticky === true || instance.props.sticky === value;\n }\n\n let prevRefRect: ClientRect | null = null;\n let prevPopRect: ClientRect | null = null;\n\n function updatePosition(): void {\n const currentRefRect = shouldCheck('reference')\n ? getReference().getBoundingClientRect()\n : null;\n const currentPopRect = shouldCheck('popper')\n ? popper.getBoundingClientRect()\n : null;\n\n if (\n (currentRefRect && areRectsDifferent(prevRefRect, currentRefRect)) ||\n (currentPopRect && areRectsDifferent(prevPopRect, currentPopRect))\n ) {\n instance.popperInstance!.update();\n }\n\n prevRefRect = currentRefRect;\n prevPopRect = currentPopRect;\n\n if (instance.state.isMounted) {\n requestAnimationFrame(updatePosition);\n }\n }\n\n return {\n onMount(): void {\n if (instance.props.sticky) {\n updatePosition();\n }\n },\n };\n },\n};\n\nexport default sticky;\n\nfunction areRectsDifferent(\n rectA: ClientRect | null,\n rectB: ClientRect | null,\n): boolean {\n if (rectA && rectB) {\n return (\n rectA.top !== rectB.top ||\n rectA.right !== rectB.right ||\n rectA.bottom !== rectB.bottom ||\n rectA.left !== rectB.left\n );\n }\n\n return true;\n}\n","import tippy, {hideAll} from '../src';\nimport createSingleton from '../src/addons/createSingleton';\nimport delegate from '../src/addons/delegate';\nimport animateFill from '../src/plugins/animateFill';\nimport followCursor from '../src/plugins/followCursor';\nimport inlinePositioning from '../src/plugins/inlinePositioning';\nimport sticky from '../src/plugins/sticky';\nimport {ROUND_ARROW} from '../src/constants';\n\ntippy.setDefaultProps({\n plugins: [animateFill, followCursor, inlinePositioning, sticky],\n});\n\ntippy.createSingleton = createSingleton;\ntippy.delegate = delegate;\ntippy.hideAll = hideAll;\ntippy.roundArrow = ROUND_ARROW;\n\nexport default tippy;\n","import {Instance, CreateSingleton, Plugin} from '../types';\nimport tippy from '..';\nimport {defaultProps} from '../props';\nimport {errorWhen} from '../validation';\nimport {div} from '../utils';\n\n/**\n * Re-uses a single tippy element for many different tippy instances.\n * Replaces v4's `tippy.group()`.\n */\nconst createSingleton: CreateSingleton = (\n tippyInstances,\n optionalProps = {},\n /** @deprecated use Props.plugins */\n plugins = [],\n) => {\n if (__DEV__) {\n errorWhen(\n !Array.isArray(tippyInstances),\n [\n 'The first argument passed to createSingleton() must be an array of tippy',\n 'instances. The passed value was',\n String(tippyInstances),\n ].join(' '),\n );\n }\n\n plugins = optionalProps.plugins || plugins;\n\n tippyInstances.forEach(instance => {\n instance.disable();\n });\n\n let userAria = {...defaultProps, ...optionalProps}.aria;\n let currentAria: string | null | undefined;\n let currentTarget: Element;\n let shouldSkipUpdate = false;\n\n const references = tippyInstances.map(instance => instance.reference);\n\n const singleton: Plugin = {\n fn(instance) {\n function handleAriaDescribedByAttribute(isShow: boolean): void {\n if (!currentAria) {\n return;\n }\n\n const attr = `aria-${currentAria}`;\n\n if (isShow && !instance.props.interactive) {\n currentTarget.setAttribute(attr, instance.popperChildren.tooltip.id);\n } else {\n currentTarget.removeAttribute(attr);\n }\n }\n\n return {\n onAfterUpdate(_, {aria}): void {\n // Ensure `aria` for the singleton instance stays `null`, while\n // changing the `userAria` value\n if (aria !== undefined && aria !== userAria) {\n if (!shouldSkipUpdate) {\n userAria = aria;\n } else {\n shouldSkipUpdate = true;\n instance.setProps({aria: null});\n shouldSkipUpdate = false;\n }\n }\n },\n onDestroy(): void {\n tippyInstances.forEach(instance => {\n instance.enable();\n });\n },\n onMount(): void {\n handleAriaDescribedByAttribute(true);\n },\n onUntrigger(): void {\n handleAriaDescribedByAttribute(false);\n },\n onTrigger(_, event): void {\n const target = event.currentTarget as Element;\n const index = references.indexOf(target);\n\n // bail-out\n if (target === currentTarget) {\n return;\n }\n\n currentTarget = target;\n currentAria = userAria;\n\n if (instance.state.isVisible) {\n handleAriaDescribedByAttribute(true);\n }\n\n instance.popperInstance!.reference = target;\n\n instance.setContent(tippyInstances[index].props.content);\n },\n };\n },\n };\n\n return tippy(div(), {\n ...optionalProps,\n plugins: [singleton, ...plugins],\n aria: null,\n triggerTarget: references,\n }) as Instance;\n};\n\nexport default createSingleton;\n"],"names":["setInnerHTML","element","html","isReferenceElement","value","_tippy","reference","hasOwnProperty","obj","key","call","getArrayOfElements","isElement","isType","isNodeList","arrayFrom","Array","isArray","document","querySelectorAll","getValueAtIndexOrReturn","index","defaultValue","v","getModifier","modifiers","type","str","toString","indexOf","isMouseEvent","invokeWithArgsOrReturn","args","setModifierValue","name","property","filter","m","div","createElement","setTransitionDuration","els","forEach","el","style","transitionDuration","setVisibilityState","state","setAttribute","debounce","fn","ms","arg","clearTimeout","timeout","setTimeout","preserveInvocation","originalFn","currentFn","slice","closestCallback","callback","parentElement","includes","a","b","splitBySpaces","split","Boolean","useIfDefined","nextValue","currentValue","undefined","normalizeToArray","concat","getOwnerDocument","elementOrElements","ownerDocument","pushIfUnique","arr","push","getNumber","parseFloat","getComputedPadding","basePlacement","padding","distancePx","freshPaddingObject","top","right","bottom","left","Object","keys","reduce","defaultProps","allowHTML","animation","appendTo","body","aria","arrow","boundary","content","delay","distance","duration","flip","flipBehavior","flipOnUpdate","hideOnClick","ignoreAttributes","inertia","interactive","interactiveBorder","interactiveDebounce","lazy","maxWidth","multiple","offset","onAfterUpdate","onBeforeUpdate","onCreate","onDestroy","onHidden","onHide","onMount","onShow","onShown","onTrigger","onUntrigger","placement","plugins","popperOptions","role","showOnCreate","theme","touch","trigger","triggerTarget","updateDuration","zIndex","animateFill","followCursor","inlinePositioning","sticky","defaultKeys","POPPER_INSTANCE_DEPENDENCIES","getExtendedPassedProps","passedProps","pluginProps","acc","plugin","evaluateProps","props","out","valueAsString","getAttribute","trim","JSON","parse","e","getDataAttributeProps","PASSIVE","passive","currentInput","isTouch","lastMouseMoveTime","onDocumentTouchStart","window","performance","addEventListener","onDocumentMouseMove","now","removeEventListener","onWindowBlur","activeElement","instance","blur","isVisible","isBrowser","ua","navigator","userAgent","isIE","test","isIOS","platform","updateIOSClass","isAdd","shouldAdd","classList","getBasePlacement","addInertia","tooltip","addInteractive","setContent","contentEl","appendChild","getChildren","popper","querySelector","createArrowElement","arrowElement","className","createPopperElement","id","position","updateTheme","updatePopperElement","prevProps","nextProps","removeAttribute","removeChild","removeInteractive","removeInertia","updateTransitionEndListener","action","listener","event","idCounter","mouseMoveListeners","mountedInstances","createTippy","showTimeout","hideTimeout","scheduleHideAnimationFrame","lastTriggerEvent","currentMountCallback","currentTransitionEndListener","currentTarget","isBeingDestroyed","isVisibleFromClick","didHideDueToDocumentMouseDown","popperUpdates","listeners","debouncedOnMouseMove","onMouseMove","doc","popperChildren","item","transitionableElements","popperInstance","currentPlacement","isEnabled","isDestroyed","isMounted","isShown","clearDelayTimeouts","cancelAnimationFrame","setProps","partialProps","invokeHook","removeListenersFromTriggerTarget","addListenersToTriggerTarget","cleanupInteractiveMouseListeners","node","handleAriaExpandedAttribute","some","prop","currentReference","destroy","createPopperInstance","enableEventListeners","update","show","isAlreadyVisible","isDisabled","isTouchAndTouchDisabled","getCurrentTarget","hasAttribute","addDocumentMouseDownListener","visibility","handleAriaDescribedByAttribute","onTransitionEnd","onTransitionedIn","parentNode","contains","mount","hide","isAlreadyHidden","removeDocumentMouseDownListener","onTransitionedOut","disableEventListeners","options","i","length","enable","disable","pluginsHooks","map","hadAriaExpandedAttributeOnCreate","scheduleShow","getNormalizedTouchSettings","getIsCustomTouchBehavior","getDelay","isShow","hook","shouldInvokePropsHook","pluginHooks","attr","replace","scheduleHide","onDocumentMouseDown","target","on","eventType","handler","onMouseLeave","onBlurOrFocusOut","shouldScheduleClickHide","isEventListenerStopped","isCursorOverReferenceOrPopper","popperTreeData","clientX","clientY","every","popperRect","tooltipRect","mergedRect","Math","min","max","isCursorOutsideInteractiveBorder","getBoundingClientRect","relatedTarget","supportsTouch","isTouchEvent","isCustomTouch","flipModifier","preventOverflowModifier","applyMutations","data","prevPlacement","flipped","attributes","isVerticalPlacement","isSecondaryPlacement","config","eventsEnabled","tippyDistance","enabled","order","isRem","documentElement","getComputedStyle","fontSize","String","getUnitsInPx","computedPreventOverflowPadding","computedFlipPadding","instanceModifiers","preventOverflow","boundariesElement","behavior","runMountCallback","onUpdate","Popper","offsetHeight","requestAnimationFrame","tippy","targets","optionalProps","capture","instances","version","setDefaultProps","BUBBLING_EVENTS_MAP","mouseover","focusin","click","backdrop","createBackdropElement","addBackdropToPopperChildren","insertBefore","firstElementChild","overflow","Number","transitionDelay","round","lastMouseMoveEvent","originalReference","mouseCoords","isInternallySettingControlledProp","userProps","getIsManual","getIsEnabled","isValidMouseEvent","getIsInitialBehavior","resetReference","handlePlacement","shift","handlePopperListeners","handleMouseMoveListener","triggerLastMouseMove","removeListener","isCursorOverReference","isHorizontal","isVertical","size","offsetWidth","x","y","getVirtualOffsets","referenceNode","clientWidth","clientHeight","rect","width","height","_","currentBasePlacement","boundingRect","clientRects","firstRect","lastRect","isTop","minLeft","rects","maxRight","measureRects","getInlineBoundingClientRect","getClientRects","shouldCheck","prevRefRect","prevPopRect","updatePosition","currentRefRect","currentPopRect","areRectsDifferent","rectA","rectB","createSingleton","tippyInstances","currentAria","userAria","_extends","shouldSkipUpdate","references","singleton","delegate","clone","childTippyInstances","nativeProps","parentProps","childProps","returnValue","targetNode","closest","originalDestroy","shouldDestroyChildInstances","addEventListeners","hideAll","excludedReferenceOrInstance","exclude","isExcluded","roundArrow"],"mappings":"+RAaO,SAASA,EAAaC,EAAkBC,GAC7CD,EAAO,UAAgBC,EAMlB,SAASC,EAAmBC,YACvBA,IAASA,EAAMC,QAAUD,EAAMC,OAAOC,YAAcF,GAMzD,SAASG,EAAeC,EAAaC,SACnC,GAAGF,eAAeG,KAAKF,EAAKC,GAM9B,SAASE,EAAmBP,UAC7BQ,EAAUR,GACL,CAACA,GA4DL,SAAoBA,UAClBS,EAAOT,EAAO,YA1DjBU,CAAWV,GACNW,EAAUX,GAGfY,MAAMC,QAAQb,GACTA,EAGFW,EAAUG,SAASC,iBAAiBf,IAMtC,SAASgB,EACdhB,EACAiB,EACAC,MAEIN,MAAMC,QAAQb,GAAQ,KAClBmB,EAAInB,EAAMiB,UACJ,MAALE,EACHP,MAAMC,QAAQK,GACZA,EAAaD,GACbC,EACFC,SAGCnB,EAOF,SAASoB,EAAYhB,EAAUC,UAC7BD,GAAOA,EAAIiB,WAAajB,EAAIiB,UAAUhB,GAMxC,SAASI,EAAOT,EAAYsB,OAC3BC,EAAM,GAAGC,SAASlB,KAAKN,UACK,IAA3BuB,EAAIE,QAAQ,YAAoBF,EAAIE,QAAWH,QAAY,EAM7D,SAASd,EAAUR,UACjBS,EAAOT,EAAO,WAahB,SAAS0B,EAAa1B,UACpBS,EAAOT,EAAO,cAchB,SAAS2B,EAAuB3B,EAAY4B,SACzB,mBAAV5B,EAAuBA,eAAS4B,GAAQ5B,EAMjD,SAAS6B,EACdR,EACAS,EACAC,EACA/B,GAEAqB,EAAUW,QAAO,SAAAC,UAAKA,EAAEH,OAASA,KAAM,GAAGC,GAAY/B,EAMjD,SAASkC,WACPpB,SAASqB,cAAc,OAMzB,SAASC,EACdC,EACArC,GAEAqC,EAAIC,SAAQ,SAAAC,GACNA,IAC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