function positionVirtualReferenceNearCursor(event) {
    var _lastMouseMoveEvent = lastMouseMoveEvent = event,
        x = _lastMouseMoveEvent.clientX,
        y = _lastMouseMoveEvent.clientY; // Gets set once popperInstance `onCreate` has been called


    if (!currentComputedPadding) {
      return;
    } // If the instance is interactive, avoid updating the position unless it's
    // over the reference element


    var isCursorOverReference = closestCallback(event.target, function (el) {
      return el === reference;
    });
    var rect = reference.getBoundingClientRect();
    var followCursor = instance.props.followCursor;
    var isHorizontal = followCursor === 'horizontal';
    var isVertical = followCursor === 'vertical'; // The virtual reference needs some size to prevent itself from overflowing

    var isVerticalPlacement = includes(['top', 'bottom'], getBasicPlacement(popper));
    var fullPlacement = popper.getAttribute(PLACEMENT_ATTRIBUTE);
    var isVariation = fullPlacement ? !!fullPlacement.split('-')[1] : false;
    var size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;
    var halfSize = size / 2;
    var verticalIncrease = isVerticalPlacement ? 0 : isVariation ? size : halfSize;
    var horizontalIncrease = isVerticalPlacement ? isVariation ? size : halfSize : 0;

    if (isCursorOverReference || !instance.props.interactive) {
      instance.popperInstance.reference = _extends$2({}, instance.popperInstance.reference, {
        // This will exist in next Popper.js feature release to fix #532
        // @ts-ignore
        referenceNode: reference,
        // These `client` values don't get used by Popper.js if they are 0
        clientWidth: 0,
        clientHeight: 0,
        getBoundingClientRect: function getBoundingClientRect() {
          return {
            width: isVerticalPlacement ? size : 0,
            height: isVerticalPlacement ? 0 : size,
            top: (isHorizontal ? rect.top : y) - verticalIncrease,
            bottom: (isHorizontal ? rect.bottom : y) + verticalIncrease,
            left: (isVertical ? rect.left : x) - horizontalIncrease,
            right: (isVertical ? rect.right : x) + horizontalIncrease
          };
        }
      });
      instance.popperInstance.update();
    }

    if (followCursor === 'initial' && instance.state.isVisible) {
      removeFollowCursorListener();
    }
  }
/**
   * Positions the virtual reference near the cursor
   */
Positions the virtual reference near the cursor
Positions the virtual reference near the cursor
function positionVirtualReferenceNearCursor(event) {
    var _lastMouseMoveEvent = lastMouseMoveEvent = event,
        x = _lastMouseMoveEvent.clientX,
        y = _lastMouseMoveEvent.clientY; 
    if (!currentComputedPadding) {
      return;
    } 
    var isCursorOverReference = closestCallback(event.target, function (el) {
      return el === reference;
    });
    var rect = reference.getBoundingClientRect();
    var followCursor = instance.props.followCursor;
    var isHorizontal = followCursor === 'horizontal';
    var isVertical = followCursor === 'vertical'; 
    var isVerticalPlacement = includes(['top', 'bottom'], getBasicPlacement(popper));
    var fullPlacement = popper.getAttribute(PLACEMENT_ATTRIBUTE);
    var isVariation = fullPlacement ? !!fullPlacement.split('-')[1] : false;
    var size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;
    var halfSize = size / 2;
    var verticalIncrease = isVerticalPlacement ? 0 : isVariation ? size : halfSize;
    var horizontalIncrease = isVerticalPlacement ? isVariation ? size : halfSize : 0;
    if (isCursorOverReference || !instance.props.interactive) {
      instance.popperInstance.reference = _extends$2({}, instance.popperInstance.reference, {
        referenceNode: reference,
        clientWidth: 0,
        clientHeight: 0,
        getBoundingClientRect: function getBoundingClientRect() {
          return {
            width: isVerticalPlacement ? size : 0,
            height: isVerticalPlacement ? 0 : size,
            top: (isHorizontal ? rect.top : y) - verticalIncrease,
            bottom: (isHorizontal ? rect.bottom : y) + verticalIncrease,
            left: (isVertical ? rect.left : x) - horizontalIncrease,
            right: (isVertical ? rect.right : x) + horizontalIncrease
          };
        }
      });
      instance.popperInstance.update();
    }
    if (followCursor === 'initial' && instance.state.isVisible) {
      removeFollowCursorListener();
    }
  }
function positionVirtualReferenceNearCursor ( event ) { var _lastMouseMoveEvent = lastMouseMoveEvent = event , x = _lastMouseMoveEvent . clientX , y = _lastMouseMoveEvent . clientY ; if ( ! currentComputedPadding ) { return ; } var isCursorOverReference = closestCallback ( event . target , function ( el ) { return el === reference ; } ) ; var rect = reference . getBoundingClientRect ( ) ; var followCursor = instance . props . followCursor ; var isHorizontal = followCursor === 'horizontal' ; var isVertical = followCursor === 'vertical' ; var isVerticalPlacement = includes ( [ 'top' , 'bottom' ] , getBasicPlacement ( popper ) ) ; var fullPlacement = popper . getAttribute ( PLACEMENT_ATTRIBUTE ) ; var isVariation = fullPlacement ? ! ! fullPlacement . split ( '-' ) [ 1 ] : false ; var size = isVerticalPlacement ? popper . offsetWidth : popper . offsetHeight ; var halfSize = size / 2 ; var verticalIncrease = isVerticalPlacement ? 0 : isVariation ? size : halfSize ; var horizontalIncrease = isVerticalPlacement ? isVariation ? size : halfSize : 0 ; if ( isCursorOverReference || ! instance . props . interactive ) { instance . popperInstance . reference = _extends$2 ( { } , instance . popperInstance . reference , { referenceNode : reference , clientWidth : 0 , clientHeight : 0 , getBoundingClientRect : function getBoundingClientRect ( ) { return { width : isVerticalPlacement ? size : 0 , height : isVerticalPlacement ? 0 : size , top : ( isHorizontal ? rect . top : y ) - verticalIncrease , bottom : ( isHorizontal ? rect . bottom : y ) + verticalIncrease , left : ( isVertical ? rect . left : x ) - horizontalIncrease , right : ( isVertical ? rect . right : x ) + horizontalIncrease } ; } } ) ; instance . popperInstance . update ( ) ; } if ( followCursor === 'initial' && instance . state . isVisible ) { removeFollowCursorListener ( ) ; } }
Positions the virtual reference near the cursor
Positions the virtual reference near the cursor
// Gets set once popperInstance `onCreate` has been called // If the instance is interactive, avoid updating the position unless it's // over the reference element // The virtual reference needs some size to prevent itself from overflowing // This will exist in next Popper.js feature release to fix #532 // @ts-ignore // These `client` values don't get used by Popper.js if they are 0