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AAoI,CAAA,CAAApH,CAAA,EACA,OAAAoH,EAAAE,SAAA,CAAAtH,EAAAoH,CACA,GAAGA,EAAApH,EACH,CCHA,SAAAuH,EAAAH,CAAA,CAAAI,CAAA,EACAJ,EAAAvJ,SAAA,CAAA6B,OAAA+H,MAAA,CAAAD,EAAA3J,SAAA,EAAAuJ,EAAAvJ,SAAA,CAAA6J,WAAA,CAAAN,EAAyED,EAAcC,EAAAI,EACvF","sources":["webpack://_N_E/./node_modules/consolidated-events/lib/index.esm.js","webpack://_N_E/./node_modules/react-waypoint/es/index.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"],"sourcesContent":["var CAN_USE_DOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n// Adapted from Modernizr\n// https://github.com/Modernizr/Modernizr/blob/acb3f0d9/feature-detects/dom/passiveeventlisteners.js#L26-L37\nfunction testPassiveEventListeners() {\n  if (!CAN_USE_DOM) {\n    return false;\n  }\n\n  if (!window.addEventListener || !window.removeEventListener || !Object.defineProperty) {\n    return false;\n  }\n\n  var supportsPassiveOption = false;\n  try {\n    var opts = Object.defineProperty({}, 'passive', {\n      // eslint-disable-next-line getter-return\n      get: function () {\n        function get() {\n          supportsPassiveOption = true;\n        }\n\n        return get;\n      }()\n    });\n    var noop = function noop() {};\n    window.addEventListener('testPassiveEventSupport', noop, opts);\n    window.removeEventListener('testPassiveEventSupport', noop, opts);\n  } catch (e) {\n    // do nothing\n  }\n\n  return supportsPassiveOption;\n}\n\nvar memoized = void 0;\n\nfunction canUsePassiveEventListeners() {\n  if (memoized === undefined) {\n    memoized = testPassiveEventListeners();\n  }\n  return memoized;\n}\n\nfunction normalizeEventOptions(eventOptions) {\n  if (!eventOptions) {\n    return undefined;\n  }\n\n  if (!canUsePassiveEventListeners()) {\n    // If the browser does not support the passive option, then it is expecting\n    // a boolean for the options argument to specify whether it should use\n    // capture or not. In more modern browsers, this is passed via the `capture`\n    // option, so let's just hoist that value up.\n    return !!eventOptions.capture;\n  }\n\n  return eventOptions;\n}\n\n/* eslint-disable no-bitwise */\n\n/**\n * Generate a unique key for any set of event options\n */\nfunction eventOptionsKey(normalizedEventOptions) {\n  if (!normalizedEventOptions) {\n    return 0;\n  }\n\n  // If the browser does not support passive event listeners, the normalized\n  // event options will be a boolean.\n  if (normalizedEventOptions === true) {\n    return 100;\n  }\n\n  // At this point, the browser supports passive event listeners, so we expect\n  // the event options to be an object with possible properties of capture,\n  // passive, and once.\n  //\n  // We want to consistently return the same value, regardless of the order of\n  // these properties, so let's use binary maths to assign each property to a\n  // bit, and then add those together (with an offset to account for the\n  // booleans at the beginning of this function).\n  var capture = normalizedEventOptions.capture << 0;\n  var passive = normalizedEventOptions.passive << 1;\n  var once = normalizedEventOptions.once << 2;\n  return capture + passive + once;\n}\n\nfunction ensureCanMutateNextEventHandlers(eventHandlers) {\n  if (eventHandlers.handlers === eventHandlers.nextHandlers) {\n    // eslint-disable-next-line no-param-reassign\n    eventHandlers.nextHandlers = eventHandlers.handlers.slice();\n  }\n}\n\nfunction TargetEventHandlers(target) {\n  this.target = target;\n  this.events = {};\n}\n\nTargetEventHandlers.prototype.getEventHandlers = function () {\n  function getEventHandlers(eventName, options) {\n    var key = String(eventName) + ' ' + String(eventOptionsKey(options));\n\n    if (!this.events[key]) {\n      this.events[key] = {\n        handlers: [],\n        handleEvent: undefined\n      };\n      this.events[key].nextHandlers = this.events[key].handlers;\n    }\n\n    return this.events[key];\n  }\n\n  return getEventHandlers;\n}();\n\nTargetEventHandlers.prototype.handleEvent = function () {\n  function handleEvent(eventName, options, event) {\n    var eventHandlers = this.getEventHandlers(eventName, options);\n    eventHandlers.handlers = eventHandlers.nextHandlers;\n    eventHandlers.handlers.forEach(function (handler) {\n      if (handler) {\n        // We need to check for presence here because a handler function may\n        // cause later handlers to get removed. This can happen if you for\n        // instance have a waypoint that unmounts another waypoint as part of an\n        // onEnter/onLeave handler.\n        handler(event);\n      }\n    });\n  }\n\n  return handleEvent;\n}();\n\nTargetEventHandlers.prototype.add = function () {\n  function add(eventName, listener, options) {\n    var _this = this;\n\n    // options has already been normalized at this point.\n    var eventHandlers = this.getEventHandlers(eventName, options);\n\n    ensureCanMutateNextEventHandlers(eventHandlers);\n\n    if (eventHandlers.nextHandlers.length === 0) {\n      eventHandlers.handleEvent = this.handleEvent.bind(this, eventName, options);\n\n      this.target.addEventListener(eventName, eventHandlers.handleEvent, options);\n    }\n\n    eventHandlers.nextHandlers.push(listener);\n\n    var isSubscribed = true;\n    var unsubscribe = function () {\n      function unsubscribe() {\n        if (!isSubscribed) {\n          return;\n        }\n\n        isSubscribed = false;\n\n        ensureCanMutateNextEventHandlers(eventHandlers);\n        var index = eventHandlers.nextHandlers.indexOf(listener);\n        eventHandlers.nextHandlers.splice(index, 1);\n\n        if (eventHandlers.nextHandlers.length === 0) {\n          // All event handlers have been removed, so we want to remove the event\n          // listener from the target node.\n\n          if (_this.target) {\n            // There can be a race condition where the target may no longer exist\n            // when this function is called, e.g. when a React component is\n            // unmounting. Guarding against this prevents the following error:\n            //\n            //   Cannot read property 'removeEventListener' of undefined\n            _this.target.removeEventListener(eventName, eventHandlers.handleEvent, options);\n          }\n\n          eventHandlers.handleEvent = undefined;\n        }\n      }\n\n      return unsubscribe;\n    }();\n    return unsubscribe;\n  }\n\n  return add;\n}();\n\nvar EVENT_HANDLERS_KEY = '__consolidated_events_handlers__';\n\n// eslint-disable-next-line import/prefer-default-export\nfunction addEventListener(target, eventName, listener, options) {\n  if (!target[EVENT_HANDLERS_KEY]) {\n    // eslint-disable-next-line no-param-reassign\n    target[EVENT_HANDLERS_KEY] = new TargetEventHandlers(target);\n  }\n  var normalizedEventOptions = normalizeEventOptions(options);\n  return target[EVENT_HANDLERS_KEY].add(eventName, listener, normalizedEventOptions);\n}\n\nexport { addEventListener };\n","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport { addEventListener } from 'consolidated-events';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { isForwardRef } from 'react-is';\n\n/**\n * Attempts to parse the offset provided as a prop as a percentage. For\n * instance, if the component has been provided with the string \"20%\" as\n * a value of one of the offset props. If the value matches, then it returns\n * a numeric version of the prop. For instance, \"20%\" would become `0.2`.\n * If `str` isn't a percentage, then `undefined` will be returned.\n *\n * @param {string} str The value of an offset prop to be converted to a\n *   number.\n * @return {number|undefined} The numeric version of `str`. Undefined if `str`\n *   was not a percentage.\n */\nfunction parseOffsetAsPercentage(str) {\n  if (str.slice(-1) === '%') {\n    return parseFloat(str.slice(0, -1)) / 100;\n  }\n\n  return undefined;\n}\n\n/**\n * Attempts to parse the offset provided as a prop as a pixel value. If\n * parsing fails, then `undefined` is returned. Three examples of values that\n * will be successfully parsed are:\n * `20`\n * \"20px\"\n * \"20\"\n *\n * @param {string|number} str A string of the form \"{number}\" or \"{number}px\",\n *   or just a number.\n * @return {number|undefined} The numeric version of `str`. Undefined if `str`\n *   was neither a number nor string ending in \"px\".\n */\nfunction parseOffsetAsPixels(str) {\n  if (!isNaN(parseFloat(str)) && isFinite(str)) {\n    return parseFloat(str);\n  }\n\n  if (str.slice(-2) === 'px') {\n    return parseFloat(str.slice(0, -2));\n  }\n\n  return undefined;\n}\n\n/**\n * @param {string|number} offset\n * @param {number} contextHeight\n * @return {number} A number representing `offset` converted into pixels.\n */\n\nfunction computeOffsetPixels(offset, contextHeight) {\n  var pixelOffset = parseOffsetAsPixels(offset);\n\n  if (typeof pixelOffset === 'number') {\n    return pixelOffset;\n  }\n\n  var percentOffset = parseOffsetAsPercentage(offset);\n\n  if (typeof percentOffset === 'number') {\n    return percentOffset * contextHeight;\n  }\n\n  return undefined;\n}\n\nvar ABOVE = 'above';\nvar INSIDE = 'inside';\nvar BELOW = 'below';\nvar INVISIBLE = 'invisible';\n\nfunction debugLog() {\n  if (process.env.NODE_ENV !== 'production') {\n    var _console;\n\n    (_console = console).log.apply(_console, arguments); // eslint-disable-line no-console\n\n  }\n}\n\n/**\n * When an element's type is a string, it represents a DOM node with that tag name\n * https://facebook.github.io/react/blog/2015/12/18/react-components-elements-and-instances.html#dom-elements\n *\n * @param {React.element} Component\n * @return {bool} Whether the component is a DOM Element\n */\nfunction isDOMElement(Component) {\n  return typeof Component.type === 'string';\n}\n\nvar errorMessage = '<Waypoint> needs a DOM element to compute boundaries. The child you passed is neither a ' + 'DOM element (e.g. <div>) nor does it use the innerRef prop.\\n\\n' + 'See https://goo.gl/LrBNgw for more info.';\n/**\n * Raise an error if \"children\" is not a DOM Element and there is no ref provided to Waypoint\n *\n * @param {?React.element} children\n * @param {?HTMLElement} ref\n * @return {undefined}\n */\n\nfunction ensureRefIsProvidedByChild(children, ref) {\n  if (children && !isDOMElement(children) && !ref) {\n    throw new Error(errorMessage);\n  }\n}\n\n/**\n * @param {object} bounds An object with bounds data for the waypoint and\n *   scrollable parent\n * @return {string} The current position of the waypoint in relation to the\n *   visible portion of the scrollable parent. One of the constants `ABOVE`,\n *   `BELOW`, `INSIDE` or `INVISIBLE`.\n */\n\nfunction getCurrentPosition(bounds) {\n  if (bounds.viewportBottom - bounds.viewportTop === 0) {\n    return INVISIBLE;\n  } // top is within the viewport\n\n\n  if (bounds.viewportTop <= bounds.waypointTop && bounds.waypointTop <= bounds.viewportBottom) {\n    return INSIDE;\n  } // bottom is within the viewport\n\n\n  if (bounds.viewportTop <= bounds.waypointBottom && bounds.waypointBottom <= bounds.viewportBottom) {\n    return INSIDE;\n  } // top is above the viewport and bottom is below the viewport\n\n\n  if (bounds.waypointTop <= bounds.viewportTop && bounds.viewportBottom <= bounds.waypointBottom) {\n    return INSIDE;\n  }\n\n  if (bounds.viewportBottom < bounds.waypointTop) {\n    return BELOW;\n  }\n\n  if (bounds.waypointTop < bounds.viewportTop) {\n    return ABOVE;\n  }\n\n  return INVISIBLE;\n}\n\nvar timeout;\nvar timeoutQueue = [];\nfunction onNextTick(cb) {\n  timeoutQueue.push(cb);\n\n  if (!timeout) {\n    timeout = setTimeout(function () {\n      timeout = null; // Drain the timeoutQueue\n\n      var item; // eslint-disable-next-line no-cond-assign\n\n      while (item = timeoutQueue.shift()) {\n        item();\n      }\n    }, 0);\n  }\n\n  var isSubscribed = true;\n  return function unsubscribe() {\n    if (!isSubscribed) {\n      return;\n    }\n\n    isSubscribed = false;\n    var index = timeoutQueue.indexOf(cb);\n\n    if (index === -1) {\n      return;\n    }\n\n    timeoutQueue.splice(index, 1);\n\n    if (!timeoutQueue.length && timeout) {\n      clearTimeout(timeout);\n      timeout = null;\n    }\n  };\n}\n\nfunction resolveScrollableAncestorProp(scrollableAncestor) {\n  // When Waypoint is rendered on the server, `window` is not available.\n  // To make Waypoint easier to work with, we allow this to be specified in\n  // string form and safely convert to `window` here.\n  if (scrollableAncestor === 'window') {\n    return global.window;\n  }\n\n  return scrollableAncestor;\n}\n\nvar hasWindow = typeof window !== 'undefined';\nvar defaultProps = {\n  debug: false,\n  scrollableAncestor: undefined,\n  children: undefined,\n  topOffset: '0px',\n  bottomOffset: '0px',\n  horizontal: false,\n  onEnter: function onEnter() {},\n  onLeave: function onLeave() {},\n  onPositionChange: function onPositionChange() {},\n  fireOnRapidScroll: true\n}; // Calls a function when you scroll to the element.\n\nvar Waypoint = /*#__PURE__*/function (_React$PureComponent) {\n  _inheritsLoose(Waypoint, _React$PureComponent);\n\n  function Waypoint(props) {\n    var _this;\n\n    _this = _React$PureComponent.call(this, props) || this;\n\n    _this.refElement = function (e) {\n      _this._ref = e;\n    };\n\n    return _this;\n  }\n\n  var _proto = Waypoint.prototype;\n\n  _proto.componentDidMount = function componentDidMount() {\n    var _this2 = this;\n\n    if (!hasWindow) {\n      return;\n    } // this._ref may occasionally not be set at this time. To help ensure that\n    // this works smoothly and to avoid layout thrashing, we want to delay the\n    // initial execution until the next tick.\n\n\n    this.cancelOnNextTick = onNextTick(function () {\n      _this2.cancelOnNextTick = null;\n      var _this2$props = _this2.props,\n          children = _this2$props.children,\n          debug = _this2$props.debug; // Berofe doing anything, we want to check that this._ref is avaliable in Waypoint\n\n      ensureRefIsProvidedByChild(children, _this2._ref);\n      _this2._handleScroll = _this2._handleScroll.bind(_this2);\n      _this2.scrollableAncestor = _this2._findScrollableAncestor();\n\n      if (process.env.NODE_ENV !== 'production' && debug) {\n        debugLog('scrollableAncestor', _this2.scrollableAncestor);\n      }\n\n      _this2.scrollEventListenerUnsubscribe = addEventListener(_this2.scrollableAncestor, 'scroll', _this2._handleScroll, {\n        passive: true\n      });\n      _this2.resizeEventListenerUnsubscribe = addEventListener(window, 'resize', _this2._handleScroll, {\n        passive: true\n      });\n\n      _this2._handleScroll(null);\n    });\n  };\n\n  _proto.componentDidUpdate = function componentDidUpdate() {\n    var _this3 = this;\n\n    if (!hasWindow) {\n      return;\n    }\n\n    if (!this.scrollableAncestor) {\n      // The Waypoint has not yet initialized.\n      return;\n    } // The element may have moved, so we need to recompute its position on the\n    // page. This happens via handleScroll in a way that forces layout to be\n    // computed.\n    //\n    // We want this to be deferred to avoid forcing layout during render, which\n    // causes layout thrashing. And, if we already have this work enqueued, we\n    // can just wait for that to happen instead of enqueueing again.\n\n\n    if (this.cancelOnNextTick) {\n      return;\n    }\n\n    this.cancelOnNextTick = onNextTick(function () {\n      _this3.cancelOnNextTick = null;\n\n      _this3._handleScroll(null);\n    });\n  };\n\n  _proto.componentWillUnmount = function componentWillUnmount() {\n    if (!hasWindow) {\n      return;\n    }\n\n    if (this.scrollEventListenerUnsubscribe) {\n      this.scrollEventListenerUnsubscribe();\n    }\n\n    if (this.resizeEventListenerUnsubscribe) {\n      this.resizeEventListenerUnsubscribe();\n    }\n\n    if (this.cancelOnNextTick) {\n      this.cancelOnNextTick();\n    }\n  }\n  /**\n   * Traverses up the DOM to find an ancestor container which has an overflow\n   * style that allows for scrolling.\n   *\n   * @return {Object} the closest ancestor element with an overflow style that\n   *   allows for scrolling. If none is found, the `window` object is returned\n   *   as a fallback.\n   */\n  ;\n\n  _proto._findScrollableAncestor = function _findScrollableAncestor() {\n    var _this$props = this.props,\n        horizontal = _this$props.horizontal,\n        scrollableAncestor = _this$props.scrollableAncestor;\n\n    if (scrollableAncestor) {\n      return resolveScrollableAncestorProp(scrollableAncestor);\n    }\n\n    var node = this._ref;\n\n    while (node.parentNode) {\n      node = node.parentNode;\n\n      if (node === document.body) {\n        // We've reached all the way to the root node.\n        return window;\n      }\n\n      var style = window.getComputedStyle(node);\n      var overflowDirec = horizontal ? style.getPropertyValue('overflow-x') : style.getPropertyValue('overflow-y');\n      var overflow = overflowDirec || style.getPropertyValue('overflow');\n\n      if (overflow === 'auto' || overflow === 'scroll' || overflow === 'overlay') {\n        return node;\n      }\n    } // A scrollable ancestor element was not found, which means that we need to\n    // do stuff on window.\n\n\n    return window;\n  }\n  /**\n   * @param {Object} event the native scroll event coming from the scrollable\n   *   ancestor, or resize event coming from the window. Will be undefined if\n   *   called by a React lifecyle method\n   */\n  ;\n\n  _proto._handleScroll = function _handleScroll(event) {\n    if (!this._ref) {\n      // There's a chance we end up here after the component has been unmounted.\n      return;\n    }\n\n    var bounds = this._getBounds();\n\n    var currentPosition = getCurrentPosition(bounds);\n    var previousPosition = this._previousPosition;\n    var _this$props2 = this.props,\n        debug = _this$props2.debug,\n        onPositionChange = _this$props2.onPositionChange,\n        onEnter = _this$props2.onEnter,\n        onLeave = _this$props2.onLeave,\n        fireOnRapidScroll = _this$props2.fireOnRapidScroll;\n\n    if (process.env.NODE_ENV !== 'production' && debug) {\n      debugLog('currentPosition', currentPosition);\n      debugLog('previousPosition', previousPosition);\n    } // Save previous position as early as possible to prevent cycles\n\n\n    this._previousPosition = currentPosition;\n\n    if (previousPosition === currentPosition) {\n      // No change since last trigger\n      return;\n    }\n\n    var callbackArg = {\n      currentPosition: currentPosition,\n      previousPosition: previousPosition,\n      event: event,\n      waypointTop: bounds.waypointTop,\n      waypointBottom: bounds.waypointBottom,\n      viewportTop: bounds.viewportTop,\n      viewportBottom: bounds.viewportBottom\n    };\n    onPositionChange.call(this, callbackArg);\n\n    if (currentPosition === INSIDE) {\n      onEnter.call(this, callbackArg);\n    } else if (previousPosition === INSIDE) {\n      onLeave.call(this, callbackArg);\n    }\n\n    var isRapidScrollDown = previousPosition === BELOW && currentPosition === ABOVE;\n    var isRapidScrollUp = previousPosition === ABOVE && currentPosition === BELOW;\n\n    if (fireOnRapidScroll && (isRapidScrollDown || isRapidScrollUp)) {\n      // If the scroll event isn't fired often enough to occur while the\n      // waypoint was visible, we trigger both callbacks anyway.\n      onEnter.call(this, {\n        currentPosition: INSIDE,\n        previousPosition: previousPosition,\n        event: event,\n        waypointTop: bounds.waypointTop,\n        waypointBottom: bounds.waypointBottom,\n        viewportTop: bounds.viewportTop,\n        viewportBottom: bounds.viewportBottom\n      });\n      onLeave.call(this, {\n        currentPosition: currentPosition,\n        previousPosition: INSIDE,\n        event: event,\n        waypointTop: bounds.waypointTop,\n        waypointBottom: bounds.waypointBottom,\n        viewportTop: bounds.viewportTop,\n        viewportBottom: bounds.viewportBottom\n      });\n    }\n  };\n\n  _proto._getBounds = function _getBounds() {\n    var _this$props3 = this.props,\n        horizontal = _this$props3.horizontal,\n        debug = _this$props3.debug;\n\n    var _this$_ref$getBoundin = this._ref.getBoundingClientRect(),\n        left = _this$_ref$getBoundin.left,\n        top = _this$_ref$getBoundin.top,\n        right = _this$_ref$getBoundin.right,\n        bottom = _this$_ref$getBoundin.bottom;\n\n    var waypointTop = horizontal ? left : top;\n    var waypointBottom = horizontal ? right : bottom;\n    var contextHeight;\n    var contextScrollTop;\n\n    if (this.scrollableAncestor === window) {\n      contextHeight = horizontal ? window.innerWidth : window.innerHeight;\n      contextScrollTop = 0;\n    } else {\n      contextHeight = horizontal ? this.scrollableAncestor.offsetWidth : this.scrollableAncestor.offsetHeight;\n      contextScrollTop = horizontal ? this.scrollableAncestor.getBoundingClientRect().left : this.scrollableAncestor.getBoundingClientRect().top;\n    }\n\n    if (process.env.NODE_ENV !== 'production' && debug) {\n      debugLog('waypoint top', waypointTop);\n      debugLog('waypoint bottom', waypointBottom);\n      debugLog('scrollableAncestor height', contextHeight);\n      debugLog('scrollableAncestor scrollTop', contextScrollTop);\n    }\n\n    var _this$props4 = this.props,\n        bottomOffset = _this$props4.bottomOffset,\n        topOffset = _this$props4.topOffset;\n    var topOffsetPx = computeOffsetPixels(topOffset, contextHeight);\n    var bottomOffsetPx = computeOffsetPixels(bottomOffset, contextHeight);\n    var contextBottom = contextScrollTop + contextHeight;\n    return {\n      waypointTop: waypointTop,\n      waypointBottom: waypointBottom,\n      viewportTop: contextScrollTop + topOffsetPx,\n      viewportBottom: contextBottom - bottomOffsetPx\n    };\n  }\n  /**\n   * @return {Object}\n   */\n  ;\n\n  _proto.render = function render() {\n    var _this4 = this;\n\n    var children = this.props.children;\n\n    if (!children) {\n      // We need an element that we can locate in the DOM to determine where it is\n      // rendered relative to the top of its context.\n      return /*#__PURE__*/React.createElement(\"span\", {\n        ref: this.refElement,\n        style: {\n          fontSize: 0\n        }\n      });\n    }\n\n    if (isDOMElement(children) || isForwardRef(children)) {\n      var ref = function ref(node) {\n        _this4.refElement(node);\n\n        if (children.ref) {\n          if (typeof children.ref === 'function') {\n            children.ref(node);\n          } else {\n            children.ref.current = node;\n          }\n        }\n      };\n\n      return /*#__PURE__*/React.cloneElement(children, {\n        ref: ref\n      });\n    }\n\n    return /*#__PURE__*/React.cloneElement(children, {\n      innerRef: this.refElement\n    });\n  };\n\n  return Waypoint;\n}(React.PureComponent);\n\nif (process.env.NODE_ENV !== 'production') {\n  Waypoint.propTypes = {\n    children: PropTypes.element,\n    debug: PropTypes.bool,\n    onEnter: PropTypes.func,\n    onLeave: PropTypes.func,\n    onPositionChange: PropTypes.func,\n    fireOnRapidScroll: PropTypes.bool,\n    // eslint-disable-next-line react/forbid-prop-types\n    scrollableAncestor: PropTypes.any,\n    horizontal: PropTypes.bool,\n    // `topOffset` can either be a number, in which case its a distance from the\n    // top of the container in pixels, or a string value. Valid string values are\n    // of the form \"20px\", which is parsed as pixels, or \"20%\", which is parsed\n    // as a percentage of the height of the containing element.\n    // For instance, if you pass \"-20%\", and the containing element is 100px tall,\n    // then the waypoint will be triggered when it has been scrolled 20px beyond\n    // the top of the containing element.\n    topOffset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n    // `bottomOffset` can either be a number, in which case its a distance from the\n    // bottom of the container in pixels, or a string value. Valid string values are\n    // of the form \"20px\", which is parsed as pixels, or \"20%\", which is parsed\n    // as a percentage of the height of the containing element.\n    // For instance, if you pass \"20%\", and the containing element is 100px tall,\n    // then the waypoint will be triggered when it has been scrolled 20px beyond\n    // the bottom of the containing element.\n    // Similar to `topOffset`, but for the bottom of the container.\n    bottomOffset: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n  };\n}\n\nWaypoint.above = ABOVE;\nWaypoint.below = BELOW;\nWaypoint.inside = INSIDE;\nWaypoint.invisible = INVISIBLE;\nWaypoint.defaultProps = defaultProps;\nWaypoint.displayName = 'Waypoint';\n\nexport { Waypoint };\n","function _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };"],"names":["timeout","CAN_USE_DOM","window","document","createElement","memoized","ensureCanMutateNextEventHandlers","eventHandlers","handlers","nextHandlers","slice","TargetEventHandlers","target","events","prototype","getEventHandlers","eventName","options","key","String","normalizedEventOptions","capture","passive","once","handleEvent","undefined","event","forEach","handler","add","listener","_this","length","bind","addEventListener","push","isSubscribed","index","indexOf","splice","removeEventListener","EVENT_HANDLERS_KEY","testPassiveEventListeners","Object","defineProperty","supportsPassiveOption","opts","get","noop","e","eventOptions","computeOffsetPixels","offset","contextHeight","pixelOffset","isNaN","parseFloat","isFinite","str","percentOffset","parseOffsetAsPercentage","ABOVE","INSIDE","BELOW","INVISIBLE","isDOMElement","Component","type","timeoutQueue","onNextTick","cb","setTimeout","item","shift","clearTimeout","hasWindow","Waypoint","_React$PureComponent","props","call","refElement","_ref","inheritsLoose","Z","_proto","componentDidMount","_this2","cancelOnNextTick","_this2$props","children","debug","ensureRefIsProvidedByChild","ref","_handleScroll","scrollableAncestor","_findScrollableAncestor","scrollEventListenerUnsubscribe","resizeEventListenerUnsubscribe","componentDidUpdate","_this3","componentWillUnmount","_this$props","horizontal","__webpack_require__","g","node","parentNode","body","style","getComputedStyle","overflow","overflowDirec","getPropertyValue","bounds","_getBounds","currentPosition","viewportBottom","viewportTop","waypointTop","waypointBottom","previousPosition","_previousPosition","_this$props2","onPositionChange","onEnter","onLeave","fireOnRapidScroll","callbackArg","isRapidScrollDown","isRapidScrollUp","contextScrollTop","_this$props3","_this$_ref$getBoundin","getBoundingClientRect","left","top","right","bottom","innerWidth","innerHeight","offsetWidth","offsetHeight","_this$props4","bottomOffset","topOffsetPx","topOffset","bottomOffsetPx","contextBottom","render","_this4","react_is","isForwardRef","react","cloneElement","current","innerRef","fontSize","PureComponent","above","below","inside","invisible","defaultProps","displayName","_setPrototypeOf","t","setPrototypeOf","__proto__","_inheritsLoose","o","create","constructor"],"sourceRoot":""}