{"version":3,"file":"tippy.cjs.js","sources":["../src/addons/createSingleton.ts","../src/addons/delegate.ts","../src/plugins/animateFill.ts","../src/plugins/followCursor.ts","../src/plugins/inlinePositioning.ts","../src/plugins/sticky.ts"],"sourcesContent":["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","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"],"names":["createSingleton","tippyInstances","optionalProps","plugins","errorWhen","Array","isArray","String","join","forEach","instance","disable","userAria","_extends","defaultProps","aria","currentAria","currentTarget","shouldSkipUpdate","references","map","reference","singleton","fn","handleAriaDescribedByAttribute","isShow","attr","props","interactive","setAttribute","popperChildren","tooltip","id","removeAttribute","onAfterUpdate","_","undefined","setProps","onDestroy","enable","onMount","onUntrigger","onTrigger","event","target","index","indexOf","state","isVisible","popperInstance","setContent","content","tippy","div","triggerTarget","BUBBLING_EVENTS_MAP","mouseover","focusin","click","delegate","targets","listeners","childTippyInstances","nativeProps","removeProperties","parentProps","trigger","childProps","showOnCreate","returnValue","normalizedReturnValue","normalizeToArray","targetNode","closest","getAttribute","includes","type","concat","on","node","eventType","handler","options","addEventListener","push","addEventListeners","removeEventListeners","removeEventListener","applyMutations","originalDestroy","destroy","shouldDestroyChildInstances","animateFill","name","defaultValue","backdrop","createBackdropElement","addBackdropToPopperChildren","onCreate","insertBefore","firstElementChild","style","overflow","animation","arrow","transitionDuration","duration","Number","replace","transitionDelay","Math","round","setVisibilityState","warnWhen","getComputedStyle","position","transform","onShow","onHide","className","BACKDROP_CLASS","followCursor","popper","originalReference","doc","getOwnerDocument","lastMouseMoveEvent","mouseCoords","isInternallySettingControlledProp","userProps","setUserProps","keys","Object","prop","useIfDefined","getIsManual","trim","getIsEnabled","isValidMouseEvent","clientX","clientY","getIsInitialBehavior","currentInput","isTouch","resetReference","handlePlacement","placement","shift","split","handlePopperListeners","disableEventListeners","handleMouseMoveListener","addListener","triggerLastMouseMove","onMouseMove","removeListener","currentPlacement","isCursorOverReference","closestCallback","el","isHorizontal","isVertical","isVerticalPlacement","getBasePlacement","getVirtualOffsets","size","x","y","referenceNode","clientWidth","clientHeight","getBoundingClientRect","rect","width","height","top","bottom","left","right","update","partialProps","requestAnimationFrame","isMouseEvent","onHidden","offsetWidth","offsetHeight","inlinePositioning","getInlineBoundingClientRect","arrayFrom","getClientRects","currentBasePlacement","boundingRect","clientRects","length","firstRect","lastRect","isTop","minLeft","min","rects","maxRight","max","measureRects","filter","sticky","getReference","shouldCheck","value","prevRefRect","prevPopRect","updatePosition","currentRefRect","currentPopRect","areRectsDifferent","isMounted","rectA","rectB"],"mappings":";;;;;;;;;;;;AAMA;;;;;AAIA,IAAMA,eAAgC,GAAG,SAAnCA,eAAmC,CACvCC,cADuC,EAEvCC,aAFuC;;AAIvCC,OAJuC,EAKpC;MAHHD,aAGG;IAHHA,aAGG,GAHa,EAGb;;;MADHC,OACG;IADHA,OACG,GADO,EACP;;;6CACU;IACXC,eAAS,CACP,CAACC,KAAK,CAACC,OAAN,CAAcL,cAAd,CADM,EAEP,CACE,0EADF,EAEE,iCAFF,EAGEM,MAAM,CAACN,cAAD,CAHR,EAIEO,IAJF,CAIO,GAJP,CAFO,CAAT;;;EAUFL,OAAO,GAAGD,aAAa,CAACC,OAAd,IAAyBA,OAAnC;EAEAF,cAAc,CAACQ,OAAf,CAAuB,UAAAC,QAAQ,EAAI;IACjCA,QAAQ,CAACC,OAAT;GADF;;MAIIC,QAAQ,GAAGC,mBAAIC,kBAAJ,MAAqBZ,aAArB,EAAoCa,IAAnD;;MACIC,WAAJ;MACIC,aAAJ;MACIC,gBAAgB,GAAG,KAAvB;MAEMC,UAAU,GAAGlB,cAAc,CAACmB,GAAf,CAAmB,UAAAV,QAAQ;WAAIA,QAAQ,CAACW,SAAb;GAA3B,C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