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ACL+B,SAAU,KAIhB,GAAIjF,EAAae,KAAa,IAAAmE,cAAanE,GAAW,CAWpD,OAAoB,eAAmBA,EAAU,CAC/CmB,IAXQ,SAAaa,GACrBiC,EAAOrD,WAAWoB,GACdhC,EAASmB,MACiB,oBAAjBnB,EAASmB,IAClBnB,EAASmB,IAAIa,GAEbhC,EAASmB,IAAIiD,QAAUpC,EAG7B,GAIF,CACA,OAAoB,eAAmBhC,EAAU,CAC/CqE,SAAU/H,KAAKsE,YAEnB,EACOJ,CACT,CA/P4B,CA+P1B,iBA+BFA,EAAS8D,MAAQzF,EACjB2B,EAAS+D,MAAQxF,EACjByB,EAASgE,OAAS1F,EAClB0B,EAASiE,UAAYzF,EACrBwB,EAASX,aAAeA,EACxBW,EAASkE,YAAc,U","sources":["../node_modules/consolidated-events/lib/index.esm.js","../node_modules/react-waypoint/es/index.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 if (!window.addEventListener || !window.removeEventListener || !Object.defineProperty) {\n return false;\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 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 return supportsPassiveOption;\n}\nvar memoized = void 0;\nfunction canUsePassiveEventListeners() {\n if (memoized === undefined) {\n memoized = testPassiveEventListeners();\n }\n return memoized;\n}\nfunction normalizeEventOptions(eventOptions) {\n if (!eventOptions) {\n return undefined;\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 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}\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}\nfunction TargetEventHandlers(target) {\n this.target = target;\n this.events = {};\n}\nTargetEventHandlers.prototype.getEventHandlers = function () {\n function getEventHandlers(eventName, options) {\n var key = String(eventName) + ' ' + String(eventOptionsKey(options));\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 return this.events[key];\n }\n return getEventHandlers;\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 return handleEvent;\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 ensureCanMutateNextEventHandlers(eventHandlers);\n if (eventHandlers.nextHandlers.length === 0) {\n eventHandlers.handleEvent = this.handleEvent.bind(this, eventName, options);\n this.target.addEventListener(eventName, eventHandlers.handleEvent, options);\n }\n eventHandlers.nextHandlers.push(listener);\n var isSubscribed = true;\n var unsubscribe = function () {\n function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n isSubscribed = false;\n ensureCanMutateNextEventHandlers(eventHandlers);\n var index = eventHandlers.nextHandlers.indexOf(listener);\n eventHandlers.nextHandlers.splice(index, 1);\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 eventHandlers.handleEvent = undefined;\n }\n }\n return unsubscribe;\n }();\n return unsubscribe;\n }\n return add;\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}\nexport { addEventListener };","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 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 if (str.slice(-2) === 'px') {\n return parseFloat(str.slice(0, -2));\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 if (typeof pixelOffset === 'number') {\n return pixelOffset;\n }\n var percentOffset = parseOffsetAsPercentage(offset);\n if (typeof percentOffset === 'number') {\n return percentOffset * contextHeight;\n }\n return undefined;\n}\nvar ABOVE = 'above';\nvar INSIDE = 'inside';\nvar BELOW = 'below';\nvar INVISIBLE = 'invisible';\nfunction debugLog() {\n if (process.env.NODE_ENV !== 'production') {\n var _console;\n (_console = console).log.apply(_console, arguments); // eslint-disable-line no-console\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}\nvar errorMessage = ' needs a DOM element to compute boundaries. The child you passed is neither a ' + 'DOM element (e.g.
) 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 if (bounds.viewportTop <= bounds.waypointTop && bounds.waypointTop <= bounds.viewportBottom) {\n return INSIDE;\n } // bottom is within the viewport\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 if (bounds.waypointTop <= bounds.viewportTop && bounds.viewportBottom <= bounds.waypointBottom) {\n return INSIDE;\n }\n if (bounds.viewportBottom < bounds.waypointTop) {\n return BELOW;\n }\n if (bounds.waypointTop < bounds.viewportTop) {\n return ABOVE;\n }\n return INVISIBLE;\n}\nvar timeout;\nvar timeoutQueue = [];\nfunction onNextTick(cb) {\n timeoutQueue.push(cb);\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 var isSubscribed = true;\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n isSubscribed = false;\n var index = timeoutQueue.indexOf(cb);\n if (index === -1) {\n return;\n }\n timeoutQueue.splice(index, 1);\n if (!timeoutQueue.length && timeout) {\n clearTimeout(timeout);\n timeout = null;\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 return scrollableAncestor;\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 function Waypoint(props) {\n var _this;\n _this = _React$PureComponent.call(this, props) || this;\n _this.refElement = function (e) {\n _this._ref = e;\n };\n return _this;\n }\n var _proto = Waypoint.prototype;\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\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 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 if (process.env.NODE_ENV !== 'production' && debug) {\n debugLog('scrollableAncestor', _this2.scrollableAncestor);\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 _this2._handleScroll(null);\n });\n };\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this3 = this;\n if (!hasWindow) {\n return;\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 if (this.cancelOnNextTick) {\n return;\n }\n this.cancelOnNextTick = onNextTick(function () {\n _this3.cancelOnNextTick = null;\n _this3._handleScroll(null);\n });\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!hasWindow) {\n return;\n }\n if (this.scrollEventListenerUnsubscribe) {\n this.scrollEventListenerUnsubscribe();\n }\n if (this.resizeEventListenerUnsubscribe) {\n this.resizeEventListenerUnsubscribe();\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 _proto._findScrollableAncestor = function _findScrollableAncestor() {\n var _this$props = this.props,\n horizontal = _this$props.horizontal,\n scrollableAncestor = _this$props.scrollableAncestor;\n if (scrollableAncestor) {\n return resolveScrollableAncestorProp(scrollableAncestor);\n }\n var node = this._ref;\n while (node.parentNode) {\n node = node.parentNode;\n if (node === document.body) {\n // We've reached all the way to the root node.\n return window;\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 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 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 _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 var bounds = this._getBounds();\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 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 this._previousPosition = currentPosition;\n if (previousPosition === currentPosition) {\n // No change since last trigger\n return;\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 if (currentPosition === INSIDE) {\n onEnter.call(this, callbackArg);\n } else if (previousPosition === INSIDE) {\n onLeave.call(this, callbackArg);\n }\n var isRapidScrollDown = previousPosition === BELOW && currentPosition === ABOVE;\n var isRapidScrollUp = previousPosition === ABOVE && currentPosition === BELOW;\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 _proto._getBounds = function _getBounds() {\n var _this$props3 = this.props,\n horizontal = _this$props3.horizontal,\n debug = _this$props3.debug;\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 var waypointTop = horizontal ? left : top;\n var waypointBottom = horizontal ? right : bottom;\n var contextHeight;\n var contextScrollTop;\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 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 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 _proto.render = function render() {\n var _this4 = this;\n var children = this.props.children;\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 if (isDOMElement(children) || isForwardRef(children)) {\n var ref = function ref(node) {\n _this4.refElement(node);\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 return /*#__PURE__*/React.cloneElement(children, {\n ref: ref\n });\n }\n return /*#__PURE__*/React.cloneElement(children, {\n innerRef: this.refElement\n });\n };\n return Waypoint;\n}(React.PureComponent);\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}\nWaypoint.above = ABOVE;\nWaypoint.below = BELOW;\nWaypoint.inside = INSIDE;\nWaypoint.invisible = INVISIBLE;\nWaypoint.defaultProps = defaultProps;\nWaypoint.displayName = 'Waypoint';\nexport { Waypoint };"],"names":["CAN_USE_DOM","window","document","createElement","memoized","canUsePassiveEventListeners","undefined","addEventListener","removeEventListener","Object","defineProperty","supportsPassiveOption","opts","get","noop","e","testPassiveEventListeners","ensureCanMutateNextEventHandlers","eventHandlers","handlers","nextHandlers","slice","TargetEventHandlers","target","this","events","prototype","getEventHandlers","eventName","options","normalizedEventOptions","key","String","capture","passive","once","handleEvent","event","forEach","handler","add","listener","_this","length","bind","push","isSubscribed","index","indexOf","splice","EVENT_HANDLERS_KEY","eventOptions","normalizeEventOptions","computeOffsetPixels","offset","contextHeight","str","pixelOffset","isNaN","parseFloat","isFinite","percentOffset","parseOffsetAsPercentage","ABOVE","INSIDE","BELOW","INVISIBLE","isDOMElement","Component","type","timeout","timeoutQueue","onNextTick","cb","setTimeout","item","shift","clearTimeout","hasWindow","defaultProps","debug","scrollableAncestor","children","topOffset","bottomOffset","horizontal","onEnter","onLeave","onPositionChange","fireOnRapidScroll","Waypoint","_React$PureComponent","props","call","refElement","_ref","_proto","componentDidMount","_this2","cancelOnNextTick","_this2$props","ref","Error","ensureRefIsProvidedByChild","_handleScroll","_findScrollableAncestor","scrollEventListenerUnsubscribe","resizeEventListenerUnsubscribe","componentDidUpdate","_this3","componentWillUnmount","_this$props","g","resolveScrollableAncestorProp","node","parentNode","body","style","getComputedStyle","overflow","getPropertyValue","bounds","_getBounds","currentPosition","viewportBottom","viewportTop","waypointTop","waypointBottom","getCurrentPosition","previousPosition","_previousPosition","_this$props2","callbackArg","contextScrollTop","_this$props3","_this$_ref$getBoundin","getBoundingClientRect","left","top","right","bottom","innerWidth","innerHeight","offsetWidth","offsetHeight","_this$props4","render","_this4","fontSize","isForwardRef","current","innerRef","above","below","inside","invisible","displayName"],"sourceRoot":""}