{"ast":null,"code":"function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n  var it;\n\n  if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n      if (it) o = it;\n      var i = 0;\n      return function () {\n        if (i >= o.length) return {\n          done: true\n        };\n        return {\n          done: false,\n          value: o[i++]\n        };\n      };\n    }\n\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n\n  it = o[Symbol.iterator]();\n  return it.next.bind(it);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n\n  return arr2;\n}\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n\n  _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nimport Batchinator from \"../Batchinator\";\nimport FillRateHelper from \"../FillRateHelper\";\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport RefreshControl from \"../../../exports/RefreshControl\";\nimport ScrollView from \"../../../exports/ScrollView\";\nimport StyleSheet from \"../../../exports/StyleSheet\";\nimport UIManager from \"../../../exports/UIManager\";\nimport View from \"../../../exports/View\";\nimport ViewabilityHelper from \"../ViewabilityHelper\";\nimport findNodeHandle from \"../../../exports/findNodeHandle\";\nvar flattenStyle = StyleSheet.flatten;\nimport infoLog from \"../infoLog\";\nimport invariant from 'fbjs/lib/invariant';\nimport warning from 'fbjs/lib/warning';\nimport { computeWindowedRenderLimits } from \"../VirtualizeUtils\";\nimport { VirtualizedListCellContextProvider, VirtualizedListContext, VirtualizedListContextProvider } from \"./VirtualizedListContext.js\";\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar _usedIndexForKey = false;\nvar _keylessItemComponentName = '';\n\nvar VirtualizedList = function (_React$PureComponent) {\n  _inheritsLoose(VirtualizedList, _React$PureComponent);\n\n  var _proto = VirtualizedList.prototype;\n\n  _proto.scrollToEnd = function scrollToEnd(params) {\n    var animated = params ? params.animated : true;\n    var veryLast = this.props.getItemCount(this.props.data) - 1;\n\n    var frame = this._getFrameMetricsApprox(veryLast);\n\n    var offset = Math.max(0, frame.offset + frame.length + this._footerLength - this._scrollMetrics.visibleLength);\n\n    if (this._scrollRef == null) {\n      return;\n    }\n\n    if (this._scrollRef.scrollTo == null) {\n      console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n      return;\n    }\n\n    this._scrollRef.scrollTo(this.props.horizontal ? {\n      x: offset,\n      animated: animated\n    } : {\n      y: offset,\n      animated: animated\n    });\n  };\n\n  _proto.scrollToIndex = function scrollToIndex(params) {\n    var _this$props = this.props,\n        data = _this$props.data,\n        horizontal = _this$props.horizontal,\n        getItemCount = _this$props.getItemCount,\n        getItemLayout = _this$props.getItemLayout,\n        onScrollToIndexFailed = _this$props.onScrollToIndexFailed;\n    var animated = params.animated,\n        index = params.index,\n        viewOffset = params.viewOffset,\n        viewPosition = params.viewPosition;\n    invariant(index >= 0, \"scrollToIndex out of range: requested index \" + index + \" but minimum is 0\");\n    invariant(getItemCount(data) >= 1, \"scrollToIndex out of range: item length \" + getItemCount(data) + \" but minimum is 1\");\n    invariant(index < getItemCount(data), \"scrollToIndex out of range: requested index \" + index + \" is out of 0 to \" + (getItemCount(data) - 1));\n\n    if (!getItemLayout && index > this._highestMeasuredFrameIndex) {\n      invariant(!!onScrollToIndexFailed, 'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' + 'otherwise there is no way to know the location of offscreen indices or handle failures.');\n      onScrollToIndexFailed({\n        averageItemLength: this._averageCellLength,\n        highestMeasuredFrameIndex: this._highestMeasuredFrameIndex,\n        index: index\n      });\n      return;\n    }\n\n    var frame = this._getFrameMetricsApprox(index);\n\n    var offset = Math.max(0, frame.offset - (viewPosition || 0) * (this._scrollMetrics.visibleLength - frame.length)) - (viewOffset || 0);\n\n    if (this._scrollRef == null) {\n      return;\n    }\n\n    if (this._scrollRef.scrollTo == null) {\n      console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n      return;\n    }\n\n    this._scrollRef.scrollTo(horizontal ? {\n      x: offset,\n      animated: animated\n    } : {\n      y: offset,\n      animated: animated\n    });\n  };\n\n  _proto.scrollToItem = function scrollToItem(params) {\n    var item = params.item;\n    var _this$props2 = this.props,\n        data = _this$props2.data,\n        getItem = _this$props2.getItem,\n        getItemCount = _this$props2.getItemCount;\n    var itemCount = getItemCount(data);\n\n    for (var _index = 0; _index < itemCount; _index++) {\n      if (getItem(data, _index) === item) {\n        this.scrollToIndex(_objectSpread(_objectSpread({}, params), {}, {\n          index: _index\n        }));\n        break;\n      }\n    }\n  };\n\n  _proto.scrollToOffset = function scrollToOffset(params) {\n    var animated = params.animated,\n        offset = params.offset;\n\n    if (this._scrollRef == null) {\n      return;\n    }\n\n    if (this._scrollRef.scrollTo == null) {\n      console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n      return;\n    }\n\n    this._scrollRef.scrollTo(this.props.horizontal ? {\n      x: offset,\n      animated: animated\n    } : {\n      y: offset,\n      animated: animated\n    });\n  };\n\n  _proto.recordInteraction = function recordInteraction() {\n    this._nestedChildLists.forEach(function (childList) {\n      childList.ref && childList.ref.recordInteraction();\n    });\n\n    this._viewabilityTuples.forEach(function (t) {\n      t.viewabilityHelper.recordInteraction();\n    });\n\n    this._updateViewableItems(this.props.data);\n  };\n\n  _proto.flashScrollIndicators = function flashScrollIndicators() {\n    if (this._scrollRef == null) {\n      return;\n    }\n\n    this._scrollRef.flashScrollIndicators();\n  };\n\n  _proto.getScrollResponder = function getScrollResponder() {\n    if (this._scrollRef && this._scrollRef.getScrollResponder) {\n      return this._scrollRef.getScrollResponder();\n    }\n  };\n\n  _proto.getScrollableNode = function getScrollableNode() {\n    if (this._scrollRef && this._scrollRef.getScrollableNode) {\n      return this._scrollRef.getScrollableNode();\n    } else {\n      return findNodeHandle(this._scrollRef);\n    }\n  };\n\n  _proto.getScrollRef = function getScrollRef() {\n    if (this._scrollRef && this._scrollRef.getScrollRef) {\n      return this._scrollRef.getScrollRef();\n    } else {\n      return this._scrollRef;\n    }\n  };\n\n  _proto.setNativeProps = function setNativeProps(props) {\n    if (this._scrollRef) {\n      this._scrollRef.setNativeProps(props);\n    }\n  };\n\n  _proto._getCellKey = function _getCellKey() {\n    var _this$context;\n\n    return ((_this$context = this.context) == null ? void 0 : _this$context.cellKey) || 'rootList';\n  };\n\n  _proto._getListKey = function _getListKey() {\n    return this.props.listKey || this._getCellKey();\n  };\n\n  _proto._getDebugInfo = function _getDebugInfo() {\n    var _this$context2;\n\n    return {\n      listKey: this._getListKey(),\n      cellKey: this._getCellKey(),\n      horizontal: !!this.props.horizontal,\n      parent: (_this$context2 = this.context) == null ? void 0 : _this$context2.debugInfo\n    };\n  };\n\n  _proto.hasMore = function hasMore() {\n    return this._hasMore;\n  };\n\n  function VirtualizedList(_props) {\n    var _this;\n\n    _this = _React$PureComponent.call(this, _props) || this;\n\n    _this._getScrollMetrics = function () {\n      return _this._scrollMetrics;\n    };\n\n    _this._getOutermostParentListRef = function () {\n      if (_this._isNestedWithSameOrientation()) {\n        return _this.context.getOutermostParentListRef();\n      } else {\n        return _assertThisInitialized(_this);\n      }\n    };\n\n    _this._getNestedChildState = function (key) {\n      var existingChildData = _this._nestedChildLists.get(key);\n\n      return existingChildData && existingChildData.state;\n    };\n\n    _this._registerAsNestedChild = function (childList) {\n      var childListsInCell = _this._cellKeysToChildListKeys.get(childList.cellKey) || new Set();\n      childListsInCell.add(childList.key);\n\n      _this._cellKeysToChildListKeys.set(childList.cellKey, childListsInCell);\n\n      var existingChildData = _this._nestedChildLists.get(childList.key);\n\n      if (existingChildData && existingChildData.ref !== null) {\n        console.error('A VirtualizedList contains a cell which itself contains ' + 'more than one VirtualizedList of the same orientation as the parent ' + 'list. You must pass a unique listKey prop to each sibling list.\\n\\n' + describeNestedLists(_objectSpread(_objectSpread({}, childList), {}, {\n          horizontal: !!childList.ref.props.horizontal\n        })));\n      }\n\n      _this._nestedChildLists.set(childList.key, {\n        ref: childList.ref,\n        state: null\n      });\n\n      if (_this._hasInteracted) {\n        childList.ref.recordInteraction();\n      }\n    };\n\n    _this._unregisterAsNestedChild = function (childList) {\n      _this._nestedChildLists.set(childList.key, {\n        ref: null,\n        state: childList.state\n      });\n    };\n\n    _this._onUpdateSeparators = function (keys, newProps) {\n      keys.forEach(function (key) {\n        var ref = key != null && _this._cellRefs[key];\n        ref && ref.updateSeparatorProps(newProps);\n      });\n    };\n\n    _this._averageCellLength = 0;\n    _this._cellKeysToChildListKeys = new Map();\n    _this._cellRefs = {};\n    _this._frames = {};\n    _this._footerLength = 0;\n    _this._hasDoneInitialScroll = false;\n    _this._hasInteracted = false;\n    _this._hasMore = false;\n    _this._hasWarned = {};\n    _this._headerLength = 0;\n    _this._hiPriInProgress = false;\n    _this._highestMeasuredFrameIndex = 0;\n    _this._indicesToKeys = new Map();\n    _this._nestedChildLists = new Map();\n    _this._offsetFromParentVirtualizedList = 0;\n    _this._prevParentOffset = 0;\n    _this._scrollMetrics = {\n      contentLength: 0,\n      dOffset: 0,\n      dt: 10,\n      offset: 0,\n      timestamp: 0,\n      velocity: 0,\n      visibleLength: 0\n    };\n    _this._scrollRef = null;\n    _this._sentEndForContentLength = 0;\n    _this._totalCellLength = 0;\n    _this._totalCellsMeasured = 0;\n    _this._viewabilityTuples = [];\n\n    _this._captureScrollRef = function (ref) {\n      _this._scrollRef = ref;\n    };\n\n    _this._defaultRenderScrollComponent = function (props) {\n      var onRefresh = props.onRefresh;\n\n      if (_this._isNestedWithSameOrientation()) {\n        return React.createElement(View, props);\n      } else if (onRefresh) {\n        invariant(typeof props.refreshing === 'boolean', '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' + JSON.stringify(props.refreshing) + '`');\n        return React.createElement(ScrollView, _extends({}, props, {\n          refreshControl: props.refreshControl == null ? React.createElement(RefreshControl, {\n            refreshing: props.refreshing,\n            onRefresh: onRefresh,\n            progressViewOffset: props.progressViewOffset\n          }) : props.refreshControl\n        }));\n      } else {\n        return React.createElement(ScrollView, props);\n      }\n    };\n\n    _this._onCellUnmount = function (cellKey) {\n      var curr = _this._frames[cellKey];\n\n      if (curr) {\n        _this._frames[cellKey] = _objectSpread(_objectSpread({}, curr), {}, {\n          inLayout: false\n        });\n      }\n    };\n\n    _this._onLayout = function (e) {\n      if (_this._isNestedWithSameOrientation()) {\n        _this.measureLayoutRelativeToContainingList();\n      } else {\n        _this._scrollMetrics.visibleLength = _this._selectLength(e.nativeEvent.layout);\n      }\n\n      _this.props.onLayout && _this.props.onLayout(e);\n\n      _this._scheduleCellsToRenderUpdate();\n\n      _this._maybeCallOnEndReached();\n    };\n\n    _this._onLayoutEmpty = function (e) {\n      _this.props.onLayout && _this.props.onLayout(e);\n    };\n\n    _this._onLayoutFooter = function (e) {\n      _this._triggerRemeasureForChildListsInCell(_this._getFooterCellKey());\n\n      _this._footerLength = _this._selectLength(e.nativeEvent.layout);\n    };\n\n    _this._onLayoutHeader = function (e) {\n      _this._headerLength = _this._selectLength(e.nativeEvent.layout);\n    };\n\n    _this._onContentSizeChange = function (width, height) {\n      if (width > 0 && height > 0 && _this.props.initialScrollIndex != null && _this.props.initialScrollIndex > 0 && !_this._hasDoneInitialScroll) {\n        _this._hasDoneInitialScroll = true;\n      }\n\n      if (_this.props.onContentSizeChange) {\n        _this.props.onContentSizeChange(width, height);\n      }\n\n      _this._scrollMetrics.contentLength = _this._selectLength({\n        height: height,\n        width: width\n      });\n\n      _this._scheduleCellsToRenderUpdate();\n\n      _this._maybeCallOnEndReached();\n    };\n\n    _this._convertParentScrollMetrics = function (metrics) {\n      var offset = metrics.offset - _this._offsetFromParentVirtualizedList;\n      var visibleLength = metrics.visibleLength;\n      var dOffset = offset - _this._scrollMetrics.offset;\n      var contentLength = _this._scrollMetrics.contentLength;\n      return {\n        visibleLength: visibleLength,\n        contentLength: contentLength,\n        offset: offset,\n        dOffset: dOffset\n      };\n    };\n\n    _this._onScroll = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onScroll(e);\n      });\n\n      if (_this.props.onScroll) {\n        _this.props.onScroll(e);\n      }\n\n      var timestamp = e.timeStamp;\n\n      var visibleLength = _this._selectLength(e.nativeEvent.layoutMeasurement);\n\n      var contentLength = _this._selectLength(e.nativeEvent.contentSize);\n\n      var offset = _this._selectOffset(e.nativeEvent.contentOffset);\n\n      var dOffset = offset - _this._scrollMetrics.offset;\n\n      if (_this._isNestedWithSameOrientation()) {\n        if (_this._scrollMetrics.contentLength === 0) {\n          return;\n        }\n\n        var _this$_convertParentS = _this._convertParentScrollMetrics({\n          visibleLength: visibleLength,\n          offset: offset\n        });\n\n        visibleLength = _this$_convertParentS.visibleLength;\n        contentLength = _this$_convertParentS.contentLength;\n        offset = _this$_convertParentS.offset;\n        dOffset = _this$_convertParentS.dOffset;\n      }\n\n      var dt = _this._scrollMetrics.timestamp ? Math.max(1, timestamp - _this._scrollMetrics.timestamp) : 1;\n      var velocity = dOffset / dt;\n\n      if (dt > 500 && _this._scrollMetrics.dt > 500 && contentLength > 5 * visibleLength && !_this._hasWarned.perf) {\n        infoLog('VirtualizedList: You have a large list that is slow to update - make sure your ' + 'renderItem function renders components that follow React performance best practices ' + 'like PureComponent, shouldComponentUpdate, etc.', {\n          dt: dt,\n          prevDt: _this._scrollMetrics.dt,\n          contentLength: contentLength\n        });\n        _this._hasWarned.perf = true;\n      }\n\n      _this._scrollMetrics = {\n        contentLength: contentLength,\n        dt: dt,\n        dOffset: dOffset,\n        offset: offset,\n        timestamp: timestamp,\n        velocity: velocity,\n        visibleLength: visibleLength\n      };\n\n      _this._updateViewableItems(_this.props.data);\n\n      if (!_this.props) {\n        return;\n      }\n\n      _this._maybeCallOnEndReached();\n\n      if (velocity !== 0) {\n        _this._fillRateHelper.activate();\n      }\n\n      _this._computeBlankness();\n\n      _this._scheduleCellsToRenderUpdate();\n    };\n\n    _this._onScrollBeginDrag = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onScrollBeginDrag(e);\n      });\n\n      _this._viewabilityTuples.forEach(function (tuple) {\n        tuple.viewabilityHelper.recordInteraction();\n      });\n\n      _this._hasInteracted = true;\n      _this.props.onScrollBeginDrag && _this.props.onScrollBeginDrag(e);\n    };\n\n    _this._onScrollEndDrag = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onScrollEndDrag(e);\n      });\n\n      var velocity = e.nativeEvent.velocity;\n\n      if (velocity) {\n        _this._scrollMetrics.velocity = _this._selectOffset(velocity);\n      }\n\n      _this._computeBlankness();\n\n      _this.props.onScrollEndDrag && _this.props.onScrollEndDrag(e);\n    };\n\n    _this._onMomentumScrollBegin = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onMomentumScrollBegin(e);\n      });\n\n      _this.props.onMomentumScrollBegin && _this.props.onMomentumScrollBegin(e);\n    };\n\n    _this._onMomentumScrollEnd = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onMomentumScrollEnd(e);\n      });\n\n      _this._scrollMetrics.velocity = 0;\n\n      _this._computeBlankness();\n\n      _this.props.onMomentumScrollEnd && _this.props.onMomentumScrollEnd(e);\n    };\n\n    _this._updateCellsToRender = function () {\n      var _this$props3 = _this.props,\n          data = _this$props3.data,\n          getItemCount = _this$props3.getItemCount,\n          onEndReachedThreshold = _this$props3.onEndReachedThreshold;\n\n      var isVirtualizationDisabled = _this._isVirtualizationDisabled();\n\n      _this._updateViewableItems(data);\n\n      if (!data) {\n        return;\n      }\n\n      _this.setState(function (state) {\n        var newState;\n        var _this$_scrollMetrics = _this._scrollMetrics,\n            contentLength = _this$_scrollMetrics.contentLength,\n            offset = _this$_scrollMetrics.offset,\n            visibleLength = _this$_scrollMetrics.visibleLength;\n\n        if (!isVirtualizationDisabled) {\n          if (visibleLength > 0 && contentLength > 0) {\n            if (!_this.props.initialScrollIndex || _this._scrollMetrics.offset) {\n              newState = computeWindowedRenderLimits(_this.props, state, _this._getFrameMetricsApprox, _this._scrollMetrics);\n            }\n          }\n        } else {\n          var distanceFromEnd = contentLength - visibleLength - offset;\n          var renderAhead = distanceFromEnd < onEndReachedThreshold * visibleLength ? _this.props.maxToRenderPerBatch : 0;\n          newState = {\n            first: 0,\n            last: Math.min(state.last + renderAhead, getItemCount(data) - 1)\n          };\n        }\n\n        if (newState && _this._nestedChildLists.size > 0) {\n          var newFirst = newState.first;\n          var newLast = newState.last;\n\n          for (var ii = newFirst; ii <= newLast; ii++) {\n            var cellKeyForIndex = _this._indicesToKeys.get(ii);\n\n            var childListKeys = cellKeyForIndex && _this._cellKeysToChildListKeys.get(cellKeyForIndex);\n\n            if (!childListKeys) {\n              continue;\n            }\n\n            var someChildHasMore = false;\n\n            for (var _iterator = _createForOfIteratorHelperLoose(childListKeys), _step; !(_step = _iterator()).done;) {\n              var childKey = _step.value;\n\n              var childList = _this._nestedChildLists.get(childKey);\n\n              if (childList && childList.ref && childList.ref.hasMore()) {\n                someChildHasMore = true;\n                break;\n              }\n            }\n\n            if (someChildHasMore && newState) {\n              newState.last = ii;\n              break;\n            }\n          }\n        }\n\n        if (newState != null && newState.first === state.first && newState.last === state.last) {\n          newState = null;\n        }\n\n        return newState;\n      });\n    };\n\n    _this._createViewToken = function (index, isViewable) {\n      var _this$props4 = _this.props,\n          data = _this$props4.data,\n          getItem = _this$props4.getItem,\n          keyExtractor = _this$props4.keyExtractor;\n      var item = getItem(data, index);\n      return {\n        index: index,\n        item: item,\n        key: keyExtractor(item, index),\n        isViewable: isViewable\n      };\n    };\n\n    _this._getFrameMetricsApprox = function (index) {\n      var frame = _this._getFrameMetrics(index);\n\n      if (frame && frame.index === index) {\n        return frame;\n      } else {\n        var getItemLayout = _this.props.getItemLayout;\n        invariant(!getItemLayout, 'Should not have to estimate frames when a measurement metrics function is provided');\n        return {\n          length: _this._averageCellLength,\n          offset: _this._averageCellLength * index\n        };\n      }\n    };\n\n    _this._getFrameMetrics = function (index) {\n      var _this$props5 = _this.props,\n          data = _this$props5.data,\n          getItem = _this$props5.getItem,\n          getItemCount = _this$props5.getItemCount,\n          getItemLayout = _this$props5.getItemLayout,\n          keyExtractor = _this$props5.keyExtractor;\n      invariant(getItemCount(data) > index, 'Tried to get frame for out of range index ' + index);\n      var item = getItem(data, index);\n\n      var frame = item && _this._frames[keyExtractor(item, index)];\n\n      if (!frame || frame.index !== index) {\n        if (getItemLayout) {\n          frame = getItemLayout(data, index);\n        }\n      }\n\n      return frame;\n    };\n\n    invariant(!_props.onScroll || !_props.onScroll.__isNative, 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' + 'to support native onScroll events with useNativeDriver');\n    invariant(_props.windowSize > 0, 'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.');\n    _this._fillRateHelper = new FillRateHelper(_this._getFrameMetrics);\n    _this._updateCellsToRenderBatcher = new Batchinator(_this._updateCellsToRender, _this.props.updateCellsBatchingPeriod);\n\n    if (_this.props.viewabilityConfigCallbackPairs) {\n      _this._viewabilityTuples = _this.props.viewabilityConfigCallbackPairs.map(function (pair) {\n        return {\n          viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig),\n          onViewableItemsChanged: pair.onViewableItemsChanged\n        };\n      });\n    } else if (_this.props.onViewableItemsChanged) {\n      var onViewableItemsChanged = _this.props.onViewableItemsChanged;\n\n      _this._viewabilityTuples.push({\n        viewabilityHelper: new ViewabilityHelper(_this.props.viewabilityConfig),\n        onViewableItemsChanged: onViewableItemsChanged\n      });\n    }\n\n    var initialState = {\n      first: _this.props.initialScrollIndex || 0,\n      last: Math.min(_this.props.getItemCount(_this.props.data), (_this.props.initialScrollIndex || 0) + _this.props.initialNumToRender) - 1\n    };\n\n    if (_this._isNestedWithSameOrientation()) {\n      var storedState = _this.context.getNestedChildState(_this._getListKey());\n\n      if (storedState) {\n        initialState = storedState;\n        _this.state = storedState;\n        _this._frames = storedState.frames;\n      }\n    }\n\n    _this.state = initialState;\n    return _this;\n  }\n\n  _proto.componentDidMount = function componentDidMount() {\n    if (this._isNestedWithSameOrientation()) {\n      this.context.registerAsNestedChild({\n        cellKey: this._getCellKey(),\n        key: this._getListKey(),\n        ref: this,\n        parentDebugInfo: this.context.debugInfo\n      });\n    }\n  };\n\n  _proto.componentWillUnmount = function componentWillUnmount() {\n    if (this._isNestedWithSameOrientation()) {\n      this.context.unregisterAsNestedChild({\n        key: this._getListKey(),\n        state: {\n          first: this.state.first,\n          last: this.state.last,\n          frames: this._frames\n        }\n      });\n    }\n\n    this._updateViewableItems(null);\n\n    this._updateCellsToRenderBatcher.dispose({\n      abort: true\n    });\n\n    this._viewabilityTuples.forEach(function (tuple) {\n      tuple.viewabilityHelper.dispose();\n    });\n\n    this._fillRateHelper.deactivateAndFlush();\n  };\n\n  VirtualizedList.getDerivedStateFromProps = function getDerivedStateFromProps(newProps, prevState) {\n    var data = newProps.data,\n        getItemCount = newProps.getItemCount,\n        maxToRenderPerBatch = newProps.maxToRenderPerBatch;\n    return {\n      first: Math.max(0, Math.min(prevState.first, getItemCount(data) - 1 - maxToRenderPerBatch)),\n      last: Math.max(0, Math.min(prevState.last, getItemCount(data) - 1))\n    };\n  };\n\n  _proto._pushCells = function _pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, first, last, inversionStyle) {\n    var _this2 = this;\n\n    var _this$props6 = this.props,\n        CellRendererComponent = _this$props6.CellRendererComponent,\n        ItemSeparatorComponent = _this$props6.ItemSeparatorComponent,\n        data = _this$props6.data,\n        getItem = _this$props6.getItem,\n        getItemCount = _this$props6.getItemCount,\n        horizontal = _this$props6.horizontal,\n        keyExtractor = _this$props6.keyExtractor;\n    var stickyOffset = this.props.ListHeaderComponent ? 1 : 0;\n    var end = getItemCount(data) - 1;\n    var prevCellKey;\n    last = Math.min(end, last);\n\n    var _loop = function _loop(ii) {\n      var item = getItem(data, ii);\n      var key = keyExtractor(item, ii);\n\n      _this2._indicesToKeys.set(ii, key);\n\n      if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n        stickyHeaderIndices.push(cells.length);\n      }\n\n      cells.push(React.createElement(CellRenderer, {\n        CellRendererComponent: CellRendererComponent,\n        ItemSeparatorComponent: ii < end ? ItemSeparatorComponent : undefined,\n        cellKey: key,\n        fillRateHelper: _this2._fillRateHelper,\n        horizontal: horizontal,\n        index: ii,\n        inversionStyle: inversionStyle,\n        item: item,\n        key: key,\n        prevCellKey: prevCellKey,\n        onUpdateSeparators: _this2._onUpdateSeparators,\n        onLayout: function onLayout(e) {\n          return _this2._onCellLayout(e, key, ii);\n        },\n        onUnmount: _this2._onCellUnmount,\n        parentProps: _this2.props,\n        ref: function ref(_ref) {\n          _this2._cellRefs[key] = _ref;\n        }\n      }));\n      prevCellKey = key;\n    };\n\n    for (var ii = first; ii <= last; ii++) {\n      _loop(ii);\n    }\n  };\n\n  _proto._isVirtualizationDisabled = function _isVirtualizationDisabled() {\n    return this.props.disableVirtualization || false;\n  };\n\n  _proto._isNestedWithSameOrientation = function _isNestedWithSameOrientation() {\n    var nestedContext = this.context;\n    return !!(nestedContext && !!nestedContext.horizontal === !!this.props.horizontal);\n  };\n\n  _proto.render = function render() {\n    var _this3 = this;\n\n    if (__DEV__) {\n      var flatStyles = flattenStyle(this.props.contentContainerStyle);\n\n      if (flatStyles != null && flatStyles.flexWrap === 'wrap') {\n        console.warn('`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' + 'Consider using `numColumns` with `FlatList` instead.');\n      }\n    }\n\n    var _this$props7 = this.props,\n        ListEmptyComponent = _this$props7.ListEmptyComponent,\n        ListFooterComponent = _this$props7.ListFooterComponent,\n        ListHeaderComponent = _this$props7.ListHeaderComponent;\n    var _this$props8 = this.props,\n        data = _this$props8.data,\n        horizontal = _this$props8.horizontal;\n\n    var isVirtualizationDisabled = this._isVirtualizationDisabled();\n\n    var inversionStyle = this.props.inverted ? this.props.horizontal ? styles.horizontallyInverted : styles.verticallyInverted : null;\n    var cells = [];\n    var stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);\n    var stickyHeaderIndices = [];\n\n    if (ListHeaderComponent) {\n      if (stickyIndicesFromProps.has(0)) {\n        stickyHeaderIndices.push(0);\n      }\n\n      var element = React.isValidElement(ListHeaderComponent) ? ListHeaderComponent : React.createElement(ListHeaderComponent, null);\n      cells.push(React.createElement(VirtualizedListCellContextProvider, {\n        cellKey: this._getCellKey() + '-header',\n        key: \"$header\"\n      }, React.createElement(View, {\n        onLayout: this._onLayoutHeader,\n        style: StyleSheet.compose(inversionStyle, this.props.ListHeaderComponentStyle)\n      }, element)));\n    }\n\n    var itemCount = this.props.getItemCount(data);\n\n    if (itemCount > 0) {\n      _usedIndexForKey = false;\n      _keylessItemComponentName = '';\n      var spacerKey = !horizontal ? 'height' : 'width';\n      var lastInitialIndex = this.props.initialScrollIndex ? -1 : this.props.initialNumToRender - 1;\n      var _this$state = this.state,\n          first = _this$state.first,\n          last = _this$state.last;\n\n      this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, 0, lastInitialIndex, inversionStyle);\n\n      var firstAfterInitial = Math.max(lastInitialIndex + 1, first);\n\n      if (!isVirtualizationDisabled && first > lastInitialIndex + 1) {\n        var insertedStickySpacer = false;\n\n        if (stickyIndicesFromProps.size > 0) {\n          var stickyOffset = ListHeaderComponent ? 1 : 0;\n\n          for (var ii = firstAfterInitial - 1; ii > lastInitialIndex; ii--) {\n            if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n              var _ref2, _ref3;\n\n              var initBlock = this._getFrameMetricsApprox(lastInitialIndex);\n\n              var stickyBlock = this._getFrameMetricsApprox(ii);\n\n              var leadSpace = stickyBlock.offset - initBlock.offset - (this.props.initialScrollIndex ? 0 : initBlock.length);\n              cells.push(React.createElement(View, {\n                key: \"$sticky_lead\",\n                style: (_ref2 = {}, _ref2[spacerKey] = leadSpace, _ref2)\n              }));\n\n              this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, ii, ii, inversionStyle);\n\n              var trailSpace = this._getFrameMetricsApprox(first).offset - (stickyBlock.offset + stickyBlock.length);\n              cells.push(React.createElement(View, {\n                key: \"$sticky_trail\",\n                style: (_ref3 = {}, _ref3[spacerKey] = trailSpace, _ref3)\n              }));\n              insertedStickySpacer = true;\n              break;\n            }\n          }\n        }\n\n        if (!insertedStickySpacer) {\n          var _ref4;\n\n          var _initBlock = this._getFrameMetricsApprox(lastInitialIndex);\n\n          var firstSpace = this._getFrameMetricsApprox(first).offset - (_initBlock.offset + _initBlock.length);\n\n          cells.push(React.createElement(View, {\n            key: \"$lead_spacer\",\n            style: (_ref4 = {}, _ref4[spacerKey] = firstSpace, _ref4)\n          }));\n        }\n      }\n\n      this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, firstAfterInitial, last, inversionStyle);\n\n      if (!this._hasWarned.keys && _usedIndexForKey) {\n        console.warn('VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' + 'item or provide a custom keyExtractor.', _keylessItemComponentName);\n        this._hasWarned.keys = true;\n      }\n\n      if (!isVirtualizationDisabled && last < itemCount - 1) {\n        var _ref5;\n\n        var lastFrame = this._getFrameMetricsApprox(last);\n\n        var end = this.props.getItemLayout ? itemCount - 1 : Math.min(itemCount - 1, this._highestMeasuredFrameIndex);\n\n        var endFrame = this._getFrameMetricsApprox(end);\n\n        var tailSpacerLength = endFrame.offset + endFrame.length - (lastFrame.offset + lastFrame.length);\n        cells.push(React.createElement(View, {\n          key: \"$tail_spacer\",\n          style: (_ref5 = {}, _ref5[spacerKey] = tailSpacerLength, _ref5)\n        }));\n      }\n    } else if (ListEmptyComponent) {\n      var _element = React.isValidElement(ListEmptyComponent) ? ListEmptyComponent : React.createElement(ListEmptyComponent, null);\n\n      cells.push(React.cloneElement(_element, {\n        key: '$empty',\n        onLayout: function onLayout(event) {\n          _this3._onLayoutEmpty(event);\n\n          if (_element.props.onLayout) {\n            _element.props.onLayout(event);\n          }\n        },\n        style: StyleSheet.compose(inversionStyle, _element.props.style)\n      }));\n    }\n\n    if (ListFooterComponent) {\n      var _element2 = React.isValidElement(ListFooterComponent) ? ListFooterComponent : React.createElement(ListFooterComponent, null);\n\n      cells.push(React.createElement(VirtualizedListCellContextProvider, {\n        cellKey: this._getFooterCellKey(),\n        key: \"$footer\"\n      }, React.createElement(View, {\n        onLayout: this._onLayoutFooter,\n        style: StyleSheet.compose(inversionStyle, this.props.ListFooterComponentStyle)\n      }, _element2)));\n    }\n\n    var scrollProps = _objectSpread(_objectSpread({}, this.props), {}, {\n      onContentSizeChange: this._onContentSizeChange,\n      onLayout: this._onLayout,\n      onScroll: this._onScroll,\n      onScrollBeginDrag: this._onScrollBeginDrag,\n      onScrollEndDrag: this._onScrollEndDrag,\n      onMomentumScrollBegin: this._onMomentumScrollBegin,\n      onMomentumScrollEnd: this._onMomentumScrollEnd,\n      scrollEventThrottle: this.props.scrollEventThrottle,\n      stickyHeaderIndices: stickyHeaderIndices,\n      style: inversionStyle ? [inversionStyle, this.props.style] : this.props.style\n    });\n\n    this._hasMore = this.state.last < this.props.getItemCount(this.props.data) - 1;\n    var innerRet = React.createElement(VirtualizedListContextProvider, {\n      value: {\n        cellKey: null,\n        getScrollMetrics: this._getScrollMetrics,\n        horizontal: this.props.horizontal,\n        getOutermostParentListRef: this._getOutermostParentListRef,\n        getNestedChildState: this._getNestedChildState,\n        registerAsNestedChild: this._registerAsNestedChild,\n        unregisterAsNestedChild: this._unregisterAsNestedChild,\n        debugInfo: this._getDebugInfo()\n      }\n    }, React.cloneElement((this.props.renderScrollComponent || this._defaultRenderScrollComponent)(scrollProps), {\n      ref: this._captureScrollRef\n    }, cells));\n    var ret = innerRet;\n\n    if (this.props.debug) {\n      return React.createElement(View, {\n        style: styles.debug\n      }, ret, this._renderDebugOverlay());\n    } else {\n      return ret;\n    }\n  };\n\n  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n    var _this$props9 = this.props,\n        data = _this$props9.data,\n        extraData = _this$props9.extraData;\n\n    if (data !== prevProps.data || extraData !== prevProps.extraData) {\n      this._viewabilityTuples.forEach(function (tuple) {\n        tuple.viewabilityHelper.resetViewableIndices();\n      });\n    }\n\n    var hiPriInProgress = this._hiPriInProgress;\n\n    this._scheduleCellsToRenderUpdate();\n\n    if (hiPriInProgress) {\n      this._hiPriInProgress = false;\n    }\n  };\n\n  _proto._computeBlankness = function _computeBlankness() {\n    this._fillRateHelper.computeBlankness(this.props, this.state, this._scrollMetrics);\n  };\n\n  _proto._onCellLayout = function _onCellLayout(e, cellKey, index) {\n    var layout = e.nativeEvent.layout;\n    var next = {\n      offset: this._selectOffset(layout),\n      length: this._selectLength(layout),\n      index: index,\n      inLayout: true\n    };\n    var curr = this._frames[cellKey];\n\n    if (!curr || next.offset !== curr.offset || next.length !== curr.length || index !== curr.index) {\n      this._totalCellLength += next.length - (curr ? curr.length : 0);\n      this._totalCellsMeasured += curr ? 0 : 1;\n      this._averageCellLength = this._totalCellLength / this._totalCellsMeasured;\n      this._frames[cellKey] = next;\n      this._highestMeasuredFrameIndex = Math.max(this._highestMeasuredFrameIndex, index);\n\n      this._scheduleCellsToRenderUpdate();\n    } else {\n      this._frames[cellKey].inLayout = true;\n    }\n\n    this._triggerRemeasureForChildListsInCell(cellKey);\n\n    this._computeBlankness();\n\n    this._updateViewableItems(this.props.data);\n  };\n\n  _proto._triggerRemeasureForChildListsInCell = function _triggerRemeasureForChildListsInCell(cellKey) {\n    var childListKeys = this._cellKeysToChildListKeys.get(cellKey);\n\n    if (childListKeys) {\n      for (var _iterator2 = _createForOfIteratorHelperLoose(childListKeys), _step2; !(_step2 = _iterator2()).done;) {\n        var childKey = _step2.value;\n\n        var childList = this._nestedChildLists.get(childKey);\n\n        childList && childList.ref && childList.ref.measureLayoutRelativeToContainingList();\n      }\n    }\n  };\n\n  _proto.measureLayoutRelativeToContainingList = function measureLayoutRelativeToContainingList() {\n    var _this4 = this;\n\n    try {\n      if (!this._scrollRef) {\n        return;\n      }\n\n      this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(), function (x, y, width, height) {\n        _this4._offsetFromParentVirtualizedList = _this4._selectOffset({\n          x: x,\n          y: y\n        });\n        _this4._scrollMetrics.contentLength = _this4._selectLength({\n          width: width,\n          height: height\n        });\n\n        var scrollMetrics = _this4._convertParentScrollMetrics(_this4.context.getScrollMetrics());\n\n        _this4._scrollMetrics.visibleLength = scrollMetrics.visibleLength;\n        _this4._scrollMetrics.offset = scrollMetrics.offset;\n      }, function (error) {\n        console.warn(\"VirtualizedList: Encountered an error while measuring a list's\" + ' offset from its containing VirtualizedList.');\n      });\n    } catch (error) {\n      console.warn('measureLayoutRelativeToContainingList threw an error', error.stack);\n    }\n  };\n\n  _proto._getFooterCellKey = function _getFooterCellKey() {\n    return this._getCellKey() + '-footer';\n  };\n\n  _proto._renderDebugOverlay = function _renderDebugOverlay() {\n    var normalize = this._scrollMetrics.visibleLength / (this._scrollMetrics.contentLength || 1);\n    var framesInLayout = [];\n    var itemCount = this.props.getItemCount(this.props.data);\n\n    for (var ii = 0; ii < itemCount; ii++) {\n      var frame = this._getFrameMetricsApprox(ii);\n\n      if (frame.inLayout) {\n        framesInLayout.push(frame);\n      }\n    }\n\n    var windowTop = this._getFrameMetricsApprox(this.state.first).offset;\n\n    var frameLast = this._getFrameMetricsApprox(this.state.last);\n\n    var windowLen = frameLast.offset + frameLast.length - windowTop;\n    var visTop = this._scrollMetrics.offset;\n    var visLen = this._scrollMetrics.visibleLength;\n    return React.createElement(View, {\n      style: [styles.debugOverlayBase, styles.debugOverlay]\n    }, framesInLayout.map(function (f, ii) {\n      return React.createElement(View, {\n        key: 'f' + ii,\n        style: [styles.debugOverlayBase, styles.debugOverlayFrame, {\n          top: f.offset * normalize,\n          height: f.length * normalize\n        }]\n      });\n    }), React.createElement(View, {\n      style: [styles.debugOverlayBase, styles.debugOverlayFrameLast, {\n        top: windowTop * normalize,\n        height: windowLen * normalize\n      }]\n    }), React.createElement(View, {\n      style: [styles.debugOverlayBase, styles.debugOverlayFrameVis, {\n        top: visTop * normalize,\n        height: visLen * normalize\n      }]\n    }));\n  };\n\n  _proto._selectLength = function _selectLength(metrics) {\n    return !this.props.horizontal ? metrics.height : metrics.width;\n  };\n\n  _proto._selectOffset = function _selectOffset(metrics) {\n    return !this.props.horizontal ? metrics.y : metrics.x;\n  };\n\n  _proto._maybeCallOnEndReached = function _maybeCallOnEndReached() {\n    var _this$props10 = this.props,\n        data = _this$props10.data,\n        getItemCount = _this$props10.getItemCount,\n        onEndReached = _this$props10.onEndReached,\n        onEndReachedThreshold = _this$props10.onEndReachedThreshold;\n    var _this$_scrollMetrics2 = this._scrollMetrics,\n        contentLength = _this$_scrollMetrics2.contentLength,\n        visibleLength = _this$_scrollMetrics2.visibleLength,\n        offset = _this$_scrollMetrics2.offset;\n    var distanceFromEnd = contentLength - visibleLength - offset;\n    var threshold = onEndReachedThreshold ? onEndReachedThreshold * visibleLength : 2;\n\n    if (onEndReached && this.state.last === getItemCount(data) - 1 && distanceFromEnd < threshold && this._scrollMetrics.contentLength !== this._sentEndForContentLength) {\n      this._sentEndForContentLength = this._scrollMetrics.contentLength;\n      onEndReached({\n        distanceFromEnd: distanceFromEnd\n      });\n    } else if (distanceFromEnd > threshold) {\n      this._sentEndForContentLength = 0;\n    }\n  };\n\n  _proto._scheduleCellsToRenderUpdate = function _scheduleCellsToRenderUpdate() {\n    var _this$state2 = this.state,\n        first = _this$state2.first,\n        last = _this$state2.last;\n    var _this$_scrollMetrics3 = this._scrollMetrics,\n        offset = _this$_scrollMetrics3.offset,\n        visibleLength = _this$_scrollMetrics3.visibleLength,\n        velocity = _this$_scrollMetrics3.velocity;\n    var itemCount = this.props.getItemCount(this.props.data);\n    var hiPri = false;\n    var scrollingThreshold = this.props.onEndReachedThreshold * visibleLength / 2;\n\n    if (first > 0) {\n      var distTop = offset - this._getFrameMetricsApprox(first).offset;\n\n      hiPri = hiPri || distTop < 0 || velocity < -2 && distTop < scrollingThreshold;\n    }\n\n    if (last < itemCount - 1) {\n      var distBottom = this._getFrameMetricsApprox(last).offset - (offset + visibleLength);\n      hiPri = hiPri || distBottom < 0 || velocity > 2 && distBottom < scrollingThreshold;\n    }\n\n    if (hiPri && (this._averageCellLength || this.props.getItemLayout) && !this._hiPriInProgress) {\n      this._hiPriInProgress = true;\n\n      this._updateCellsToRenderBatcher.dispose({\n        abort: true\n      });\n\n      this._updateCellsToRender();\n\n      return;\n    } else {\n      this._updateCellsToRenderBatcher.schedule();\n    }\n  };\n\n  _proto._updateViewableItems = function _updateViewableItems(data) {\n    var _this5 = this;\n\n    var getItemCount = this.props.getItemCount;\n\n    this._viewabilityTuples.forEach(function (tuple) {\n      tuple.viewabilityHelper.onUpdate(getItemCount(data), _this5._scrollMetrics.offset, _this5._scrollMetrics.visibleLength, _this5._getFrameMetrics, _this5._createViewToken, tuple.onViewableItemsChanged, _this5.state);\n    });\n  };\n\n  return VirtualizedList;\n}(React.PureComponent);\n\nVirtualizedList.contextType = VirtualizedListContext;\nVirtualizedList.defaultProps = {\n  disableVirtualization: false,\n  horizontal: false,\n  initialNumToRender: 10,\n  keyExtractor: function keyExtractor(item, index) {\n    if (item.key != null) {\n      return item.key;\n    }\n\n    if (item.id != null) {\n      return item.id;\n    }\n\n    _usedIndexForKey = true;\n\n    if (item.type && item.type.displayName) {\n      _keylessItemComponentName = item.type.displayName;\n    }\n\n    return String(index);\n  },\n  maxToRenderPerBatch: 10,\n  onEndReachedThreshold: 2,\n  scrollEventThrottle: 50,\n  updateCellsBatchingPeriod: 50,\n  windowSize: 21\n};\n\nvar CellRenderer = function (_React$Component) {\n  _inheritsLoose(CellRenderer, _React$Component);\n\n  function CellRenderer() {\n    var _this6;\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this6 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n    _this6.state = {\n      separatorProps: {\n        highlighted: false,\n        leadingItem: _this6.props.item\n      }\n    };\n    _this6._separators = {\n      highlight: function highlight() {\n        var _this6$props = _this6.props,\n            cellKey = _this6$props.cellKey,\n            prevCellKey = _this6$props.prevCellKey;\n\n        _this6.props.onUpdateSeparators([cellKey, prevCellKey], {\n          highlighted: true\n        });\n      },\n      unhighlight: function unhighlight() {\n        var _this6$props2 = _this6.props,\n            cellKey = _this6$props2.cellKey,\n            prevCellKey = _this6$props2.prevCellKey;\n\n        _this6.props.onUpdateSeparators([cellKey, prevCellKey], {\n          highlighted: false\n        });\n      },\n      updateProps: function updateProps(select, newProps) {\n        var _this6$props3 = _this6.props,\n            cellKey = _this6$props3.cellKey,\n            prevCellKey = _this6$props3.prevCellKey;\n\n        _this6.props.onUpdateSeparators([select === 'leading' ? prevCellKey : cellKey], newProps);\n      }\n    };\n    return _this6;\n  }\n\n  CellRenderer.getDerivedStateFromProps = function getDerivedStateFromProps(props, prevState) {\n    return {\n      separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n        leadingItem: props.item\n      })\n    };\n  };\n\n  var _proto2 = CellRenderer.prototype;\n\n  _proto2.updateSeparatorProps = function updateSeparatorProps(newProps) {\n    this.setState(function (state) {\n      return {\n        separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n      };\n    });\n  };\n\n  _proto2.componentWillUnmount = function componentWillUnmount() {\n    this.props.onUnmount(this.props.cellKey);\n  };\n\n  _proto2._renderElement = function _renderElement(renderItem, ListItemComponent, item, index) {\n    if (renderItem && ListItemComponent) {\n      console.warn('VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' + ' precedence over renderItem.');\n    }\n\n    if (ListItemComponent) {\n      return React.createElement(ListItemComponent, {\n        item: item,\n        index: index,\n        separators: this._separators\n      });\n    }\n\n    if (renderItem) {\n      return renderItem({\n        item: item,\n        index: index,\n        separators: this._separators\n      });\n    }\n\n    invariant(false, 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.');\n  };\n\n  _proto2.render = function render() {\n    var _this$props11 = this.props,\n        CellRendererComponent = _this$props11.CellRendererComponent,\n        ItemSeparatorComponent = _this$props11.ItemSeparatorComponent,\n        fillRateHelper = _this$props11.fillRateHelper,\n        horizontal = _this$props11.horizontal,\n        item = _this$props11.item,\n        index = _this$props11.index,\n        inversionStyle = _this$props11.inversionStyle,\n        parentProps = _this$props11.parentProps;\n    var renderItem = parentProps.renderItem,\n        getItemLayout = parentProps.getItemLayout,\n        ListItemComponent = parentProps.ListItemComponent;\n\n    var element = this._renderElement(renderItem, ListItemComponent, item, index);\n\n    var onLayout = getItemLayout && !parentProps.debug && !fillRateHelper.enabled() ? undefined : this.props.onLayout;\n    var itemSeparator = ItemSeparatorComponent && React.createElement(ItemSeparatorComponent, this.state.separatorProps);\n    var cellStyle = inversionStyle ? horizontal ? [styles.rowReverse, inversionStyle] : [styles.columnReverse, inversionStyle] : horizontal ? [styles.row, inversionStyle] : inversionStyle;\n    var result = !CellRendererComponent ? React.createElement(View, {\n      style: cellStyle,\n      onLayout: onLayout\n    }, element, itemSeparator) : React.createElement(CellRendererComponent, _extends({}, this.props, {\n      style: cellStyle,\n      onLayout: onLayout\n    }), element, itemSeparator);\n    return React.createElement(VirtualizedListCellContextProvider, {\n      cellKey: this.props.cellKey\n    }, result);\n  };\n\n  return CellRenderer;\n}(React.Component);\n\nfunction describeNestedLists(childList) {\n  var trace = 'VirtualizedList trace:\\n' + (\"  Child (\" + (childList.horizontal ? 'horizontal' : 'vertical') + \"):\\n\") + (\"    listKey: \" + childList.key + \"\\n\") + (\"    cellKey: \" + childList.cellKey);\n  var debugInfo = childList.parentDebugInfo;\n\n  while (debugInfo) {\n    trace += \"\\n  Parent (\" + (debugInfo.horizontal ? 'horizontal' : 'vertical') + \"):\\n\" + (\"    listKey: \" + debugInfo.listKey + \"\\n\") + (\"    cellKey: \" + debugInfo.cellKey);\n    debugInfo = debugInfo.parent;\n  }\n\n  return trace;\n}\n\nvar styles = StyleSheet.create({\n  verticallyInverted: {\n    transform: [{\n      scaleY: -1\n    }]\n  },\n  horizontallyInverted: {\n    transform: [{\n      scaleX: -1\n    }]\n  },\n  row: {\n    flexDirection: 'row'\n  },\n  rowReverse: {\n    flexDirection: 'row-reverse'\n  },\n  columnReverse: {\n    flexDirection: 'column-reverse'\n  },\n  debug: {\n    flex: 1\n  },\n  debugOverlayBase: {\n    position: 'absolute',\n    top: 0,\n    right: 0\n  },\n  debugOverlay: {\n    bottom: 0,\n    width: 20,\n    borderColor: 'blue',\n    borderWidth: 1\n  },\n  debugOverlayFrame: {\n    left: 0,\n    backgroundColor: 'orange'\n  },\n  debugOverlayFrameLast: {\n    left: 0,\n    borderColor: 'green',\n    borderWidth: 2\n  },\n  debugOverlayFrameVis: {\n    left: 0,\n    borderColor: 'red',\n    borderWidth: 2\n  }\n});\nexport default VirtualizedList;","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js"],"names":["_createForOfIteratorHelperLoose","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","done","value","TypeError","next","bind","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","from","test","arr","len","arr2","_extends","assign","target","arguments","source","key","hasOwnProperty","apply","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","configurable","writable","_assertThisInitialized","self","ReferenceError","_inheritsLoose","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","__proto__","Batchinator","FillRateHelper","PropTypes","React","RefreshControl","ScrollView","StyleSheet","UIManager","View","ViewabilityHelper","findNodeHandle","flattenStyle","flatten","infoLog","invariant","warning","computeWindowedRenderLimits","VirtualizedListCellContextProvider","VirtualizedListContext","VirtualizedListContextProvider","__DEV__","process","env","NODE_ENV","_usedIndexForKey","_keylessItemComponentName","VirtualizedList","_React$PureComponent","_proto","scrollToEnd","params","animated","veryLast","props","getItemCount","data","frame","_getFrameMetricsApprox","offset","Math","max","_footerLength","_scrollMetrics","visibleLength","_scrollRef","scrollTo","console","warn","horizontal","x","y","scrollToIndex","_this$props","getItemLayout","onScrollToIndexFailed","index","viewOffset","viewPosition","_highestMeasuredFrameIndex","averageItemLength","_averageCellLength","highestMeasuredFrameIndex","scrollToItem","item","_this$props2","getItem","itemCount","_index","scrollToOffset","recordInteraction","_nestedChildLists","childList","ref","_viewabilityTuples","t","viewabilityHelper","_updateViewableItems","flashScrollIndicators","getScrollResponder","getScrollableNode","getScrollRef","setNativeProps","_getCellKey","_this$context","context","cellKey","_getListKey","listKey","_getDebugInfo","_this$context2","parent","debugInfo","hasMore","_hasMore","_props","_this","_getScrollMetrics","_getOutermostParentListRef","_isNestedWithSameOrientation","getOutermostParentListRef","_getNestedChildState","existingChildData","get","state","_registerAsNestedChild","childListsInCell","_cellKeysToChildListKeys","Set","add","set","error","describeNestedLists","_hasInteracted","_unregisterAsNestedChild","_onUpdateSeparators","newProps","_cellRefs","updateSeparatorProps","Map","_frames","_hasDoneInitialScroll","_hasWarned","_headerLength","_hiPriInProgress","_indicesToKeys","_offsetFromParentVirtualizedList","_prevParentOffset","contentLength","dOffset","dt","timestamp","velocity","_sentEndForContentLength","_totalCellLength","_totalCellsMeasured","_captureScrollRef","_defaultRenderScrollComponent","onRefresh","createElement","refreshing","JSON","stringify","refreshControl","progressViewOffset","_onCellUnmount","curr","inLayout","_onLayout","e","measureLayoutRelativeToContainingList","_selectLength","nativeEvent","layout","onLayout","_scheduleCellsToRenderUpdate","_maybeCallOnEndReached","_onLayoutEmpty","_onLayoutFooter","_triggerRemeasureForChildListsInCell","_getFooterCellKey","_onLayoutHeader","_onContentSizeChange","width","height","initialScrollIndex","onContentSizeChange","_convertParentScrollMetrics","metrics","_onScroll","onScroll","timeStamp","layoutMeasurement","contentSize","_selectOffset","contentOffset","_this$_convertParentS","perf","prevDt","_fillRateHelper","activate","_computeBlankness","_onScrollBeginDrag","tuple","onScrollBeginDrag","_onScrollEndDrag","onScrollEndDrag","_onMomentumScrollBegin","onMomentumScrollBegin","_onMomentumScrollEnd","onMomentumScrollEnd","_updateCellsToRender","_this$props3","onEndReachedThreshold","isVirtualizationDisabled","_isVirtualizationDisabled","setState","newState","_this$_scrollMetrics","distanceFromEnd","renderAhead","maxToRenderPerBatch","first","last","min","size","newFirst","newLast","ii","cellKeyForIndex","childListKeys","someChildHasMore","_iterator","_step","childKey","_createViewToken","isViewable","_this$props4","keyExtractor","_getFrameMetrics","_this$props5","__isNative","windowSize","_updateCellsToRenderBatcher","updateCellsBatchingPeriod","viewabilityConfigCallbackPairs","map","pair","viewabilityConfig","onViewableItemsChanged","initialState","initialNumToRender","storedState","getNestedChildState","frames","componentDidMount","registerAsNestedChild","parentDebugInfo","componentWillUnmount","unregisterAsNestedChild","dispose","abort","deactivateAndFlush","getDerivedStateFromProps","prevState","_pushCells","cells","stickyHeaderIndices","stickyIndicesFromProps","inversionStyle","_this2","_this$props6","CellRendererComponent","ItemSeparatorComponent","stickyOffset","ListHeaderComponent","end","prevCellKey","_loop","has","CellRenderer","undefined","fillRateHelper","onUpdateSeparators","_onCellLayout","onUnmount","parentProps","_ref","disableVirtualization","nestedContext","render","_this3","flatStyles","contentContainerStyle","flexWrap","_this$props7","ListEmptyComponent","ListFooterComponent","_this$props8","inverted","styles","horizontallyInverted","verticallyInverted","element","isValidElement","style","compose","ListHeaderComponentStyle","spacerKey","lastInitialIndex","_this$state","firstAfterInitial","insertedStickySpacer","_ref2","_ref3","initBlock","stickyBlock","leadSpace","trailSpace","_ref4","_initBlock","firstSpace","_ref5","lastFrame","endFrame","tailSpacerLength","_element","cloneElement","event","_element2","ListFooterComponentStyle","scrollProps","scrollEventThrottle","innerRet","getScrollMetrics","renderScrollComponent","ret","debug","_renderDebugOverlay","componentDidUpdate","prevProps","_this$props9","extraData","resetViewableIndices","hiPriInProgress","computeBlankness","_iterator2","_step2","_this4","measureLayout","scrollMetrics","stack","normalize","framesInLayout","windowTop","frameLast","windowLen","visTop","visLen","debugOverlayBase","debugOverlay","f","debugOverlayFrame","top","debugOverlayFrameLast","debugOverlayFrameVis","_this$props10","onEndReached","_this$_scrollMetrics2","threshold","_this$state2","_this$_scrollMetrics3","hiPri","scrollingThreshold","distTop","distBottom","schedule","_this5","onUpdate","PureComponent","contextType","defaultProps","id","type","displayName","String","_React$Component","_this6","_len","args","_key","concat","separatorProps","highlighted","leadingItem","_separators","highlight","_this6$props","unhighlight","_this6$props2","updateProps","select","_this6$props3","_proto2","_renderElement","renderItem","ListItemComponent","separators","_this$props11","enabled","itemSeparator","cellStyle","rowReverse","columnReverse","row","result","Component","trace","transform","scaleY","scaleX","flexDirection","flex","position","right","bottom","borderColor","borderWidth","left","backgroundColor"],"mappings":"AAAA,SAASA,+BAAT,CAAyCC,CAAzC,EAA4CC,cAA5C,EAA4D;AAAE,MAAIC,EAAJ;;AAAQ,MAAI,OAAOC,MAAP,KAAkB,WAAlB,IAAiCH,CAAC,CAACG,MAAM,CAACC,QAAR,CAAD,IAAsB,IAA3D,EAAiE;AAAE,QAAIC,KAAK,CAACC,OAAN,CAAcN,CAAd,MAAqBE,EAAE,GAAGK,2BAA2B,CAACP,CAAD,CAArD,KAA6DC,cAAc,IAAID,CAAlB,I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C7BjE,EAAAA,qBAAqB,EAAE;AACrBgE,IAAAA,IAAI,EAAE,CADe;AAErBF,IAAAA,WAAW,EAAE,OAFQ;AAGrBC,IAAAA,WAAW,EAAE;AAHQ,GAtCM;AA2C7B9D,EAAAA,oBAAoB,EAAE;AACpB+D,IAAAA,IAAI,EAAE,CADc;AAEpBF,IAAAA,WAAW,EAAE,KAFO;AAGpBC,IAAAA,WAAW,EAAE;AAHO;AA3CO,CAAlB,CAAb;AAiDA,eAAe5X,eAAf","sourcesContent":["function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport Batchinator from '../Batchinator';\nimport FillRateHelper from '../FillRateHelper';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport RefreshControl from '../../../exports/RefreshControl';\nimport ScrollView from '../../../exports/ScrollView';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport UIManager from '../../../exports/UIManager';\nimport View from '../../../exports/View';\nimport ViewabilityHelper from '../ViewabilityHelper';\nimport findNodeHandle from '../../../exports/findNodeHandle';\nvar flattenStyle = StyleSheet.flatten;\nimport infoLog from '../infoLog';\nimport invariant from 'fbjs/lib/invariant';\nimport warning from 'fbjs/lib/warning';\nimport { computeWindowedRenderLimits } from '../VirtualizeUtils';\nimport { VirtualizedListCellContextProvider, VirtualizedListContext, VirtualizedListContextProvider } from './VirtualizedListContext.js';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar _usedIndexForKey = false;\nvar _keylessItemComponentName = '';\n\n/**\n * Base implementation for the more convenient [`<FlatList>`](https://reactnative.dev/docs/flatlist.html)\n * and [`<SectionList>`](https://reactnative.dev/docs/sectionlist.html) components, which are also better\n * documented. In general, this should only really be used if you need more flexibility than\n * `FlatList` provides, e.g. for use with immutable data instead of plain arrays.\n *\n * Virtualization massively improves memory consumption and performance of large lists by\n * maintaining a finite render window of active items and replacing all items outside of the render\n * window with appropriately sized blank space. The window adapts to scrolling behavior, and items\n * are rendered incrementally with low-pri (after any running interactions) if they are far from the\n * visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.\n *\n * Some caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n *   your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n *   equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n *   (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n *   changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n *   offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n *   blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n *   and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` or `id` prop on each item and uses that for the React key.\n *   Alternatively, you can provide a custom `keyExtractor` prop.\n *\n */\nvar VirtualizedList = /*#__PURE__*/function (_React$PureComponent) {\n  _inheritsLoose(VirtualizedList, _React$PureComponent);\n\n  var _proto = VirtualizedList.prototype;\n\n  // scrollToEnd may be janky without getItemLayout prop\n  _proto.scrollToEnd = function scrollToEnd(params) {\n    var animated = params ? params.animated : true;\n    var veryLast = this.props.getItemCount(this.props.data) - 1;\n\n    var frame = this._getFrameMetricsApprox(veryLast);\n\n    var offset = Math.max(0, frame.offset + frame.length + this._footerLength - this._scrollMetrics.visibleLength);\n\n    if (this._scrollRef == null) {\n      return;\n    }\n\n    if (this._scrollRef.scrollTo == null) {\n      console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n      return;\n    }\n\n    this._scrollRef.scrollTo(this.props.horizontal ? {\n      x: offset,\n      animated: animated\n    } : {\n      y: offset,\n      animated: animated\n    });\n  } // scrollToIndex may be janky without getItemLayout prop\n  ;\n\n  _proto.scrollToIndex = function scrollToIndex(params) {\n    var _this$props = this.props,\n        data = _this$props.data,\n        horizontal = _this$props.horizontal,\n        getItemCount = _this$props.getItemCount,\n        getItemLayout = _this$props.getItemLayout,\n        onScrollToIndexFailed = _this$props.onScrollToIndexFailed;\n    var animated = params.animated,\n        index = params.index,\n        viewOffset = params.viewOffset,\n        viewPosition = params.viewPosition;\n    invariant(index >= 0, \"scrollToIndex out of range: requested index \" + index + \" but minimum is 0\");\n    invariant(getItemCount(data) >= 1, \"scrollToIndex out of range: item length \" + getItemCount(data) + \" but minimum is 1\");\n    invariant(index < getItemCount(data), \"scrollToIndex out of range: requested index \" + index + \" is out of 0 to \" + (getItemCount(data) - 1));\n\n    if (!getItemLayout && index > this._highestMeasuredFrameIndex) {\n      invariant(!!onScrollToIndexFailed, 'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' + 'otherwise there is no way to know the location of offscreen indices or handle failures.');\n      onScrollToIndexFailed({\n        averageItemLength: this._averageCellLength,\n        highestMeasuredFrameIndex: this._highestMeasuredFrameIndex,\n        index: index\n      });\n      return;\n    }\n\n    var frame = this._getFrameMetricsApprox(index);\n\n    var offset = Math.max(0, frame.offset - (viewPosition || 0) * (this._scrollMetrics.visibleLength - frame.length)) - (viewOffset || 0);\n\n    if (this._scrollRef == null) {\n      return;\n    }\n\n    if (this._scrollRef.scrollTo == null) {\n      console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n      return;\n    }\n\n    this._scrollRef.scrollTo(horizontal ? {\n      x: offset,\n      animated: animated\n    } : {\n      y: offset,\n      animated: animated\n    });\n  } // scrollToItem may be janky without getItemLayout prop. Required linear scan through items -\n  // use scrollToIndex instead if possible.\n  ;\n\n  _proto.scrollToItem = function scrollToItem(params) {\n    var item = params.item;\n    var _this$props2 = this.props,\n        data = _this$props2.data,\n        getItem = _this$props2.getItem,\n        getItemCount = _this$props2.getItemCount;\n    var itemCount = getItemCount(data);\n\n    for (var _index = 0; _index < itemCount; _index++) {\n      if (getItem(data, _index) === item) {\n        this.scrollToIndex(_objectSpread(_objectSpread({}, params), {}, {\n          index: _index\n        }));\n        break;\n      }\n    }\n  }\n  /**\n   * Scroll to a specific content pixel offset in the list.\n   *\n   * Param `offset` expects the offset to scroll to.\n   * In case of `horizontal` is true, the offset is the x-value,\n   * in any other case the offset is the y-value.\n   *\n   * Param `animated` (`true` by default) defines whether the list\n   * should do an animation while scrolling.\n   */\n  ;\n\n  _proto.scrollToOffset = function scrollToOffset(params) {\n    var animated = params.animated,\n        offset = params.offset;\n\n    if (this._scrollRef == null) {\n      return;\n    }\n\n    if (this._scrollRef.scrollTo == null) {\n      console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n      return;\n    }\n\n    this._scrollRef.scrollTo(this.props.horizontal ? {\n      x: offset,\n      animated: animated\n    } : {\n      y: offset,\n      animated: animated\n    });\n  };\n\n  _proto.recordInteraction = function recordInteraction() {\n    this._nestedChildLists.forEach(function (childList) {\n      childList.ref && childList.ref.recordInteraction();\n    });\n\n    this._viewabilityTuples.forEach(function (t) {\n      t.viewabilityHelper.recordInteraction();\n    });\n\n    this._updateViewableItems(this.props.data);\n  };\n\n  _proto.flashScrollIndicators = function flashScrollIndicators() {\n    if (this._scrollRef == null) {\n      return;\n    }\n\n    this._scrollRef.flashScrollIndicators();\n  }\n  /**\n   * Provides a handle to the underlying scroll responder.\n   * Note that `this._scrollRef` might not be a `ScrollView`, so we\n   * need to check that it responds to `getScrollResponder` before calling it.\n   */\n  ;\n\n  _proto.getScrollResponder = function getScrollResponder() {\n    if (this._scrollRef && this._scrollRef.getScrollResponder) {\n      return this._scrollRef.getScrollResponder();\n    }\n  };\n\n  _proto.getScrollableNode = function getScrollableNode() {\n    if (this._scrollRef && this._scrollRef.getScrollableNode) {\n      return this._scrollRef.getScrollableNode();\n    } else {\n      return findNodeHandle(this._scrollRef);\n    }\n  };\n\n  _proto.getScrollRef = function getScrollRef() {\n    if (this._scrollRef && this._scrollRef.getScrollRef) {\n      return this._scrollRef.getScrollRef();\n    } else {\n      return this._scrollRef;\n    }\n  };\n\n  _proto.setNativeProps = function setNativeProps(props) {\n    if (this._scrollRef) {\n      this._scrollRef.setNativeProps(props);\n    }\n  };\n\n  _proto._getCellKey = function _getCellKey() {\n    var _this$context;\n\n    return ((_this$context = this.context) == null ? void 0 : _this$context.cellKey) || 'rootList';\n  };\n\n  _proto._getListKey = function _getListKey() {\n    return this.props.listKey || this._getCellKey();\n  };\n\n  _proto._getDebugInfo = function _getDebugInfo() {\n    var _this$context2;\n\n    return {\n      listKey: this._getListKey(),\n      cellKey: this._getCellKey(),\n      horizontal: !!this.props.horizontal,\n      parent: (_this$context2 = this.context) == null ? void 0 : _this$context2.debugInfo\n    };\n  };\n\n  _proto.hasMore = function hasMore() {\n    return this._hasMore;\n  };\n\n  function VirtualizedList(_props) {\n    var _this;\n\n    _this = _React$PureComponent.call(this, _props) || this;\n\n    _this._getScrollMetrics = function () {\n      return _this._scrollMetrics;\n    };\n\n    _this._getOutermostParentListRef = function () {\n      if (_this._isNestedWithSameOrientation()) {\n        return _this.context.getOutermostParentListRef();\n      } else {\n        return _assertThisInitialized(_this);\n      }\n    };\n\n    _this._getNestedChildState = function (key) {\n      var existingChildData = _this._nestedChildLists.get(key);\n\n      return existingChildData && existingChildData.state;\n    };\n\n    _this._registerAsNestedChild = function (childList) {\n      // Register the mapping between this child key and the cellKey for its cell\n      var childListsInCell = _this._cellKeysToChildListKeys.get(childList.cellKey) || new Set();\n      childListsInCell.add(childList.key);\n\n      _this._cellKeysToChildListKeys.set(childList.cellKey, childListsInCell);\n\n      var existingChildData = _this._nestedChildLists.get(childList.key);\n\n      if (existingChildData && existingChildData.ref !== null) {\n        console.error('A VirtualizedList contains a cell which itself contains ' + 'more than one VirtualizedList of the same orientation as the parent ' + 'list. You must pass a unique listKey prop to each sibling list.\\n\\n' + describeNestedLists(_objectSpread(_objectSpread({}, childList), {}, {\n          // We're called from the child's componentDidMount, so it's safe to\n          // read the child's props here (albeit weird).\n          horizontal: !!childList.ref.props.horizontal\n        })));\n      }\n\n      _this._nestedChildLists.set(childList.key, {\n        ref: childList.ref,\n        state: null\n      });\n\n      if (_this._hasInteracted) {\n        childList.ref.recordInteraction();\n      }\n    };\n\n    _this._unregisterAsNestedChild = function (childList) {\n      _this._nestedChildLists.set(childList.key, {\n        ref: null,\n        state: childList.state\n      });\n    };\n\n    _this._onUpdateSeparators = function (keys, newProps) {\n      keys.forEach(function (key) {\n        var ref = key != null && _this._cellRefs[key];\n        ref && ref.updateSeparatorProps(newProps);\n      });\n    };\n\n    _this._averageCellLength = 0;\n    _this._cellKeysToChildListKeys = new Map();\n    _this._cellRefs = {};\n    _this._frames = {};\n    _this._footerLength = 0;\n    _this._hasDoneInitialScroll = false;\n    _this._hasInteracted = false;\n    _this._hasMore = false;\n    _this._hasWarned = {};\n    _this._headerLength = 0;\n    _this._hiPriInProgress = false;\n    _this._highestMeasuredFrameIndex = 0;\n    _this._indicesToKeys = new Map();\n    _this._nestedChildLists = new Map();\n    _this._offsetFromParentVirtualizedList = 0;\n    _this._prevParentOffset = 0;\n    _this._scrollMetrics = {\n      contentLength: 0,\n      dOffset: 0,\n      dt: 10,\n      offset: 0,\n      timestamp: 0,\n      velocity: 0,\n      visibleLength: 0\n    };\n    _this._scrollRef = null;\n    _this._sentEndForContentLength = 0;\n    _this._totalCellLength = 0;\n    _this._totalCellsMeasured = 0;\n    _this._viewabilityTuples = [];\n\n    _this._captureScrollRef = function (ref) {\n      _this._scrollRef = ref;\n    };\n\n    _this._defaultRenderScrollComponent = function (props) {\n      var onRefresh = props.onRefresh;\n\n      if (_this._isNestedWithSameOrientation()) {\n        // $FlowFixMe - Typing ReactNativeComponent revealed errors\n        return /*#__PURE__*/React.createElement(View, props);\n      } else if (onRefresh) {\n        invariant(typeof props.refreshing === 'boolean', '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' +\n        /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n         * an error found when Flow v0.111 was deployed. To see the error,\n         * delete this comment and run Flow. */\n        JSON.stringify(props.refreshing) + '`');\n        return (\n          /*#__PURE__*/\n          // $FlowFixMe Invalid prop usage\n          React.createElement(ScrollView, _extends({}, props, {\n            refreshControl: props.refreshControl == null ? /*#__PURE__*/React.createElement(RefreshControl, {\n              refreshing: props.refreshing,\n              onRefresh: onRefresh,\n              progressViewOffset: props.progressViewOffset\n            }) : props.refreshControl\n          }))\n        );\n      } else {\n        // $FlowFixMe Invalid prop usage\n        return /*#__PURE__*/React.createElement(ScrollView, props);\n      }\n    };\n\n    _this._onCellUnmount = function (cellKey) {\n      var curr = _this._frames[cellKey];\n\n      if (curr) {\n        _this._frames[cellKey] = _objectSpread(_objectSpread({}, curr), {}, {\n          inLayout: false\n        });\n      }\n    };\n\n    _this._onLayout = function (e) {\n      if (_this._isNestedWithSameOrientation()) {\n        // Need to adjust our scroll metrics to be relative to our containing\n        // VirtualizedList before we can make claims about list item viewability\n        _this.measureLayoutRelativeToContainingList();\n      } else {\n        _this._scrollMetrics.visibleLength = _this._selectLength(e.nativeEvent.layout);\n      }\n\n      _this.props.onLayout && _this.props.onLayout(e);\n\n      _this._scheduleCellsToRenderUpdate();\n\n      _this._maybeCallOnEndReached();\n    };\n\n    _this._onLayoutEmpty = function (e) {\n      _this.props.onLayout && _this.props.onLayout(e);\n    };\n\n    _this._onLayoutFooter = function (e) {\n      _this._triggerRemeasureForChildListsInCell(_this._getFooterCellKey());\n\n      _this._footerLength = _this._selectLength(e.nativeEvent.layout);\n    };\n\n    _this._onLayoutHeader = function (e) {\n      _this._headerLength = _this._selectLength(e.nativeEvent.layout);\n    };\n\n    _this._onContentSizeChange = function (width, height) {\n      if (width > 0 && height > 0 && _this.props.initialScrollIndex != null && _this.props.initialScrollIndex > 0 && !_this._hasDoneInitialScroll) {\n        _this._hasDoneInitialScroll = true;\n      }\n\n      if (_this.props.onContentSizeChange) {\n        _this.props.onContentSizeChange(width, height);\n      }\n\n      _this._scrollMetrics.contentLength = _this._selectLength({\n        height: height,\n        width: width\n      });\n\n      _this._scheduleCellsToRenderUpdate();\n\n      _this._maybeCallOnEndReached();\n    };\n\n    _this._convertParentScrollMetrics = function (metrics) {\n      // Offset of the top of the nested list relative to the top of its parent's viewport\n      var offset = metrics.offset - _this._offsetFromParentVirtualizedList; // Child's visible length is the same as its parent's\n\n      var visibleLength = metrics.visibleLength;\n      var dOffset = offset - _this._scrollMetrics.offset;\n      var contentLength = _this._scrollMetrics.contentLength;\n      return {\n        visibleLength: visibleLength,\n        contentLength: contentLength,\n        offset: offset,\n        dOffset: dOffset\n      };\n    };\n\n    _this._onScroll = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onScroll(e);\n      });\n\n      if (_this.props.onScroll) {\n        _this.props.onScroll(e);\n      }\n\n      var timestamp = e.timeStamp;\n\n      var visibleLength = _this._selectLength(e.nativeEvent.layoutMeasurement);\n\n      var contentLength = _this._selectLength(e.nativeEvent.contentSize);\n\n      var offset = _this._selectOffset(e.nativeEvent.contentOffset);\n\n      var dOffset = offset - _this._scrollMetrics.offset;\n\n      if (_this._isNestedWithSameOrientation()) {\n        if (_this._scrollMetrics.contentLength === 0) {\n          // Ignore scroll events until onLayout has been called and we\n          // know our offset from our offset from our parent\n          return;\n        }\n\n        var _this$_convertParentS = _this._convertParentScrollMetrics({\n          visibleLength: visibleLength,\n          offset: offset\n        });\n\n        visibleLength = _this$_convertParentS.visibleLength;\n        contentLength = _this$_convertParentS.contentLength;\n        offset = _this$_convertParentS.offset;\n        dOffset = _this$_convertParentS.dOffset;\n      }\n\n      var dt = _this._scrollMetrics.timestamp ? Math.max(1, timestamp - _this._scrollMetrics.timestamp) : 1;\n      var velocity = dOffset / dt;\n\n      if (dt > 500 && _this._scrollMetrics.dt > 500 && contentLength > 5 * visibleLength && !_this._hasWarned.perf) {\n        infoLog('VirtualizedList: You have a large list that is slow to update - make sure your ' + 'renderItem function renders components that follow React performance best practices ' + 'like PureComponent, shouldComponentUpdate, etc.', {\n          dt: dt,\n          prevDt: _this._scrollMetrics.dt,\n          contentLength: contentLength\n        });\n        _this._hasWarned.perf = true;\n      }\n\n      _this._scrollMetrics = {\n        contentLength: contentLength,\n        dt: dt,\n        dOffset: dOffset,\n        offset: offset,\n        timestamp: timestamp,\n        velocity: velocity,\n        visibleLength: visibleLength\n      };\n\n      _this._updateViewableItems(_this.props.data);\n\n      if (!_this.props) {\n        return;\n      }\n\n      _this._maybeCallOnEndReached();\n\n      if (velocity !== 0) {\n        _this._fillRateHelper.activate();\n      }\n\n      _this._computeBlankness();\n\n      _this._scheduleCellsToRenderUpdate();\n    };\n\n    _this._onScrollBeginDrag = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onScrollBeginDrag(e);\n      });\n\n      _this._viewabilityTuples.forEach(function (tuple) {\n        tuple.viewabilityHelper.recordInteraction();\n      });\n\n      _this._hasInteracted = true;\n      _this.props.onScrollBeginDrag && _this.props.onScrollBeginDrag(e);\n    };\n\n    _this._onScrollEndDrag = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onScrollEndDrag(e);\n      });\n\n      var velocity = e.nativeEvent.velocity;\n\n      if (velocity) {\n        _this._scrollMetrics.velocity = _this._selectOffset(velocity);\n      }\n\n      _this._computeBlankness();\n\n      _this.props.onScrollEndDrag && _this.props.onScrollEndDrag(e);\n    };\n\n    _this._onMomentumScrollBegin = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onMomentumScrollBegin(e);\n      });\n\n      _this.props.onMomentumScrollBegin && _this.props.onMomentumScrollBegin(e);\n    };\n\n    _this._onMomentumScrollEnd = function (e) {\n      _this._nestedChildLists.forEach(function (childList) {\n        childList.ref && childList.ref._onMomentumScrollEnd(e);\n      });\n\n      _this._scrollMetrics.velocity = 0;\n\n      _this._computeBlankness();\n\n      _this.props.onMomentumScrollEnd && _this.props.onMomentumScrollEnd(e);\n    };\n\n    _this._updateCellsToRender = function () {\n      var _this$props3 = _this.props,\n          data = _this$props3.data,\n          getItemCount = _this$props3.getItemCount,\n          onEndReachedThreshold = _this$props3.onEndReachedThreshold;\n\n      var isVirtualizationDisabled = _this._isVirtualizationDisabled();\n\n      _this._updateViewableItems(data);\n\n      if (!data) {\n        return;\n      }\n\n      _this.setState(function (state) {\n        var newState;\n        var _this$_scrollMetrics = _this._scrollMetrics,\n            contentLength = _this$_scrollMetrics.contentLength,\n            offset = _this$_scrollMetrics.offset,\n            visibleLength = _this$_scrollMetrics.visibleLength;\n\n        if (!isVirtualizationDisabled) {\n          // If we run this with bogus data, we'll force-render window {first: 0, last: 0},\n          // and wipe out the initialNumToRender rendered elements.\n          // So let's wait until the scroll view metrics have been set up. And until then,\n          // we will trust the initialNumToRender suggestion\n          if (visibleLength > 0 && contentLength > 0) {\n            // If we have a non-zero initialScrollIndex and run this before we've scrolled,\n            // we'll wipe out the initialNumToRender rendered elements starting at initialScrollIndex.\n            // So let's wait until we've scrolled the view to the right place. And until then,\n            // we will trust the initialScrollIndex suggestion.\n            if (!_this.props.initialScrollIndex || _this._scrollMetrics.offset) {\n              newState = computeWindowedRenderLimits(_this.props, state, _this._getFrameMetricsApprox, _this._scrollMetrics);\n            }\n          }\n        } else {\n          var distanceFromEnd = contentLength - visibleLength - offset;\n          var renderAhead =\n          /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses\n           * an error found when Flow v0.63 was deployed. To see the error\n           * delete this comment and run Flow. */\n          distanceFromEnd < onEndReachedThreshold * visibleLength ? _this.props.maxToRenderPerBatch : 0;\n          newState = {\n            first: 0,\n            last: Math.min(state.last + renderAhead, getItemCount(data) - 1)\n          };\n        }\n\n        if (newState && _this._nestedChildLists.size > 0) {\n          var newFirst = newState.first;\n          var newLast = newState.last; // If some cell in the new state has a child list in it, we should only render\n          // up through that item, so that we give that list a chance to render.\n          // Otherwise there's churn from multiple child lists mounting and un-mounting\n          // their items.\n\n          for (var ii = newFirst; ii <= newLast; ii++) {\n            var cellKeyForIndex = _this._indicesToKeys.get(ii);\n\n            var childListKeys = cellKeyForIndex && _this._cellKeysToChildListKeys.get(cellKeyForIndex);\n\n            if (!childListKeys) {\n              continue;\n            }\n\n            var someChildHasMore = false; // For each cell, need to check whether any child list in it has more elements to render\n\n            for (var _iterator = _createForOfIteratorHelperLoose(childListKeys), _step; !(_step = _iterator()).done;) {\n              var childKey = _step.value;\n\n              var childList = _this._nestedChildLists.get(childKey);\n\n              if (childList && childList.ref && childList.ref.hasMore()) {\n                someChildHasMore = true;\n                break;\n              }\n            }\n\n            if (someChildHasMore && newState) {\n              newState.last = ii;\n              break;\n            }\n          }\n        }\n\n        if (newState != null && newState.first === state.first && newState.last === state.last) {\n          newState = null;\n        }\n\n        return newState;\n      });\n    };\n\n    _this._createViewToken = function (index, isViewable) {\n      var _this$props4 = _this.props,\n          data = _this$props4.data,\n          getItem = _this$props4.getItem,\n          keyExtractor = _this$props4.keyExtractor;\n      var item = getItem(data, index);\n      return {\n        index: index,\n        item: item,\n        key: keyExtractor(item, index),\n        isViewable: isViewable\n      };\n    };\n\n    _this._getFrameMetricsApprox = function (index) {\n      var frame = _this._getFrameMetrics(index);\n\n      if (frame && frame.index === index) {\n        // check for invalid frames due to row re-ordering\n        return frame;\n      } else {\n        var getItemLayout = _this.props.getItemLayout;\n        invariant(!getItemLayout, 'Should not have to estimate frames when a measurement metrics function is provided');\n        return {\n          length: _this._averageCellLength,\n          offset: _this._averageCellLength * index\n        };\n      }\n    };\n\n    _this._getFrameMetrics = function (index) {\n      var _this$props5 = _this.props,\n          data = _this$props5.data,\n          getItem = _this$props5.getItem,\n          getItemCount = _this$props5.getItemCount,\n          getItemLayout = _this$props5.getItemLayout,\n          keyExtractor = _this$props5.keyExtractor;\n      invariant(getItemCount(data) > index, 'Tried to get frame for out of range index ' + index);\n      var item = getItem(data, index);\n\n      var frame = item && _this._frames[keyExtractor(item, index)];\n\n      if (!frame || frame.index !== index) {\n        if (getItemLayout) {\n          frame = getItemLayout(data, index);\n        }\n      }\n      /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n       * error found when Flow v0.63 was deployed. To see the error delete this\n       * comment and run Flow. */\n\n\n      return frame;\n    };\n\n    invariant( // $FlowFixMe\n    !_props.onScroll || !_props.onScroll.__isNative, 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' + 'to support native onScroll events with useNativeDriver');\n    invariant(_props.windowSize > 0, 'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.');\n    _this._fillRateHelper = new FillRateHelper(_this._getFrameMetrics);\n    _this._updateCellsToRenderBatcher = new Batchinator(_this._updateCellsToRender, _this.props.updateCellsBatchingPeriod);\n\n    if (_this.props.viewabilityConfigCallbackPairs) {\n      _this._viewabilityTuples = _this.props.viewabilityConfigCallbackPairs.map(function (pair) {\n        return {\n          viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig),\n          onViewableItemsChanged: pair.onViewableItemsChanged\n        };\n      });\n    } else if (_this.props.onViewableItemsChanged) {\n      var onViewableItemsChanged = _this.props.onViewableItemsChanged;\n\n      _this._viewabilityTuples.push({\n        viewabilityHelper: new ViewabilityHelper(_this.props.viewabilityConfig),\n        onViewableItemsChanged: onViewableItemsChanged\n      });\n    }\n\n    var initialState = {\n      first: _this.props.initialScrollIndex || 0,\n      last: Math.min(_this.props.getItemCount(_this.props.data), (_this.props.initialScrollIndex || 0) + _this.props.initialNumToRender) - 1\n    };\n\n    if (_this._isNestedWithSameOrientation()) {\n      var storedState = _this.context.getNestedChildState(_this._getListKey());\n\n      if (storedState) {\n        initialState = storedState;\n        _this.state = storedState;\n        _this._frames = storedState.frames;\n      }\n    }\n\n    _this.state = initialState;\n    return _this;\n  }\n\n  _proto.componentDidMount = function componentDidMount() {\n    if (this._isNestedWithSameOrientation()) {\n      this.context.registerAsNestedChild({\n        cellKey: this._getCellKey(),\n        key: this._getListKey(),\n        ref: this,\n        // NOTE: When the child mounts (here) it's not necessarily safe to read\n        // the parent's props. This is why we explicitly propagate debugInfo\n        // \"down\" via context and \"up\" again via this method call on the\n        // parent.\n        parentDebugInfo: this.context.debugInfo\n      });\n    }\n  };\n\n  _proto.componentWillUnmount = function componentWillUnmount() {\n    if (this._isNestedWithSameOrientation()) {\n      this.context.unregisterAsNestedChild({\n        key: this._getListKey(),\n        state: {\n          first: this.state.first,\n          last: this.state.last,\n          frames: this._frames\n        }\n      });\n    }\n\n    this._updateViewableItems(null);\n\n    this._updateCellsToRenderBatcher.dispose({\n      abort: true\n    });\n\n    this._viewabilityTuples.forEach(function (tuple) {\n      tuple.viewabilityHelper.dispose();\n    });\n\n    this._fillRateHelper.deactivateAndFlush();\n  };\n\n  VirtualizedList.getDerivedStateFromProps = function getDerivedStateFromProps(newProps, prevState) {\n    var data = newProps.data,\n        getItemCount = newProps.getItemCount,\n        maxToRenderPerBatch = newProps.maxToRenderPerBatch; // first and last could be stale (e.g. if a new, shorter items props is passed in), so we make\n    // sure we're rendering a reasonable range here.\n\n    return {\n      first: Math.max(0, Math.min(prevState.first, getItemCount(data) - 1 - maxToRenderPerBatch)),\n      last: Math.max(0, Math.min(prevState.last, getItemCount(data) - 1))\n    };\n  };\n\n  _proto._pushCells = function _pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, first, last, inversionStyle) {\n    var _this2 = this;\n\n    var _this$props6 = this.props,\n        CellRendererComponent = _this$props6.CellRendererComponent,\n        ItemSeparatorComponent = _this$props6.ItemSeparatorComponent,\n        data = _this$props6.data,\n        getItem = _this$props6.getItem,\n        getItemCount = _this$props6.getItemCount,\n        horizontal = _this$props6.horizontal,\n        keyExtractor = _this$props6.keyExtractor;\n    var stickyOffset = this.props.ListHeaderComponent ? 1 : 0;\n    var end = getItemCount(data) - 1;\n    var prevCellKey;\n    last = Math.min(end, last);\n\n    var _loop = function _loop(ii) {\n      var item = getItem(data, ii);\n      var key = keyExtractor(item, ii);\n\n      _this2._indicesToKeys.set(ii, key);\n\n      if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n        stickyHeaderIndices.push(cells.length);\n      }\n\n      cells.push( /*#__PURE__*/React.createElement(CellRenderer, {\n        CellRendererComponent: CellRendererComponent,\n        ItemSeparatorComponent: ii < end ? ItemSeparatorComponent : undefined,\n        cellKey: key,\n        fillRateHelper: _this2._fillRateHelper,\n        horizontal: horizontal,\n        index: ii,\n        inversionStyle: inversionStyle,\n        item: item,\n        key: key,\n        prevCellKey: prevCellKey,\n        onUpdateSeparators: _this2._onUpdateSeparators,\n        onLayout: function onLayout(e) {\n          return _this2._onCellLayout(e, key, ii);\n        },\n        onUnmount: _this2._onCellUnmount,\n        parentProps: _this2.props,\n        ref: function ref(_ref) {\n          _this2._cellRefs[key] = _ref;\n        }\n      }));\n      prevCellKey = key;\n    };\n\n    for (var ii = first; ii <= last; ii++) {\n      _loop(ii);\n    }\n  };\n\n  _proto._isVirtualizationDisabled = function _isVirtualizationDisabled() {\n    return this.props.disableVirtualization || false;\n  };\n\n  _proto._isNestedWithSameOrientation = function _isNestedWithSameOrientation() {\n    var nestedContext = this.context;\n    return !!(nestedContext && !!nestedContext.horizontal === !!this.props.horizontal);\n  };\n\n  _proto.render = function render() {\n    var _this3 = this;\n\n    if (__DEV__) {\n      var flatStyles = flattenStyle(this.props.contentContainerStyle);\n\n      if (flatStyles != null && flatStyles.flexWrap === 'wrap') {\n        console.warn('`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' + 'Consider using `numColumns` with `FlatList` instead.');\n      }\n    }\n\n    var _this$props7 = this.props,\n        ListEmptyComponent = _this$props7.ListEmptyComponent,\n        ListFooterComponent = _this$props7.ListFooterComponent,\n        ListHeaderComponent = _this$props7.ListHeaderComponent;\n    var _this$props8 = this.props,\n        data = _this$props8.data,\n        horizontal = _this$props8.horizontal;\n\n    var isVirtualizationDisabled = this._isVirtualizationDisabled();\n\n    var inversionStyle = this.props.inverted ? this.props.horizontal ? styles.horizontallyInverted : styles.verticallyInverted : null;\n    var cells = [];\n    var stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);\n    var stickyHeaderIndices = [];\n\n    if (ListHeaderComponent) {\n      if (stickyIndicesFromProps.has(0)) {\n        stickyHeaderIndices.push(0);\n      }\n\n      var element = /*#__PURE__*/React.isValidElement(ListHeaderComponent) ? ListHeaderComponent :\n      /*#__PURE__*/\n      // $FlowFixMe\n      React.createElement(ListHeaderComponent, null);\n      cells.push( /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n        cellKey: this._getCellKey() + '-header',\n        key: \"$header\"\n      }, /*#__PURE__*/React.createElement(View, {\n        onLayout: this._onLayoutHeader,\n        style: StyleSheet.compose(inversionStyle, this.props.ListHeaderComponentStyle)\n      }, // $FlowFixMe - Typing ReactNativeComponent revealed errors\n      element)));\n    }\n\n    var itemCount = this.props.getItemCount(data);\n\n    if (itemCount > 0) {\n      _usedIndexForKey = false;\n      _keylessItemComponentName = '';\n      var spacerKey = !horizontal ? 'height' : 'width';\n      var lastInitialIndex = this.props.initialScrollIndex ? -1 : this.props.initialNumToRender - 1;\n      var _this$state = this.state,\n          first = _this$state.first,\n          last = _this$state.last;\n\n      this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, 0, lastInitialIndex, inversionStyle);\n\n      var firstAfterInitial = Math.max(lastInitialIndex + 1, first);\n\n      if (!isVirtualizationDisabled && first > lastInitialIndex + 1) {\n        var insertedStickySpacer = false;\n\n        if (stickyIndicesFromProps.size > 0) {\n          var stickyOffset = ListHeaderComponent ? 1 : 0; // See if there are any sticky headers in the virtualized space that we need to render.\n\n          for (var ii = firstAfterInitial - 1; ii > lastInitialIndex; ii--) {\n            if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n              var _ref2, _ref3;\n\n              var initBlock = this._getFrameMetricsApprox(lastInitialIndex);\n\n              var stickyBlock = this._getFrameMetricsApprox(ii);\n\n              var leadSpace = stickyBlock.offset - initBlock.offset - (this.props.initialScrollIndex ? 0 : initBlock.length);\n              cells.push(\n              /*#__PURE__*/\n\n              /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n               * suppresses an error found when Flow v0.111 was deployed. To\n               * see the error, delete this comment and run Flow. */\n              React.createElement(View, {\n                key: \"$sticky_lead\",\n                style: (_ref2 = {}, _ref2[spacerKey] = leadSpace, _ref2)\n              }));\n\n              this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, ii, ii, inversionStyle);\n\n              var trailSpace = this._getFrameMetricsApprox(first).offset - (stickyBlock.offset + stickyBlock.length);\n              cells.push(\n              /*#__PURE__*/\n\n              /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n               * suppresses an error found when Flow v0.111 was deployed. To\n               * see the error, delete this comment and run Flow. */\n              React.createElement(View, {\n                key: \"$sticky_trail\",\n                style: (_ref3 = {}, _ref3[spacerKey] = trailSpace, _ref3)\n              }));\n              insertedStickySpacer = true;\n              break;\n            }\n          }\n        }\n\n        if (!insertedStickySpacer) {\n          var _ref4;\n\n          var _initBlock = this._getFrameMetricsApprox(lastInitialIndex);\n\n          var firstSpace = this._getFrameMetricsApprox(first).offset - (_initBlock.offset + _initBlock.length);\n\n          cells.push(\n          /*#__PURE__*/\n\n          /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n           * suppresses an error found when Flow v0.111 was deployed. To see\n           * the error, delete this comment and run Flow. */\n          React.createElement(View, {\n            key: \"$lead_spacer\",\n            style: (_ref4 = {}, _ref4[spacerKey] = firstSpace, _ref4)\n          }));\n        }\n      }\n\n      this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, firstAfterInitial, last, inversionStyle);\n\n      if (!this._hasWarned.keys && _usedIndexForKey) {\n        console.warn('VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' + 'item or provide a custom keyExtractor.', _keylessItemComponentName);\n        this._hasWarned.keys = true;\n      }\n\n      if (!isVirtualizationDisabled && last < itemCount - 1) {\n        var _ref5;\n\n        var lastFrame = this._getFrameMetricsApprox(last); // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to\n        // prevent the user for hyperscrolling into un-measured area because otherwise content will\n        // likely jump around as it renders in above the viewport.\n\n\n        var end = this.props.getItemLayout ? itemCount - 1 : Math.min(itemCount - 1, this._highestMeasuredFrameIndex);\n\n        var endFrame = this._getFrameMetricsApprox(end);\n\n        var tailSpacerLength = endFrame.offset + endFrame.length - (lastFrame.offset + lastFrame.length);\n        cells.push(\n        /*#__PURE__*/\n\n        /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n         * an error found when Flow v0.111 was deployed. To see the error,\n         * delete this comment and run Flow. */\n        React.createElement(View, {\n          key: \"$tail_spacer\",\n          style: (_ref5 = {}, _ref5[spacerKey] = tailSpacerLength, _ref5)\n        }));\n      }\n    } else if (ListEmptyComponent) {\n      var _element = /*#__PURE__*/React.isValidElement(ListEmptyComponent) ? ListEmptyComponent :\n      /*#__PURE__*/\n      // $FlowFixMe\n      React.createElement(ListEmptyComponent, null);\n\n      cells.push( /*#__PURE__*/React.cloneElement(_element, {\n        key: '$empty',\n        onLayout: function onLayout(event) {\n          _this3._onLayoutEmpty(event);\n\n          if (_element.props.onLayout) {\n            _element.props.onLayout(event);\n          }\n        },\n        style: StyleSheet.compose(inversionStyle, _element.props.style)\n      }));\n    }\n\n    if (ListFooterComponent) {\n      var _element2 = /*#__PURE__*/React.isValidElement(ListFooterComponent) ? ListFooterComponent :\n      /*#__PURE__*/\n      // $FlowFixMe\n      React.createElement(ListFooterComponent, null);\n\n      cells.push( /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n        cellKey: this._getFooterCellKey(),\n        key: \"$footer\"\n      }, /*#__PURE__*/React.createElement(View, {\n        onLayout: this._onLayoutFooter,\n        style: StyleSheet.compose(inversionStyle, this.props.ListFooterComponentStyle)\n      }, // $FlowFixMe - Typing ReactNativeComponent revealed errors\n      _element2)));\n    }\n\n    var scrollProps = _objectSpread(_objectSpread({}, this.props), {}, {\n      onContentSizeChange: this._onContentSizeChange,\n      onLayout: this._onLayout,\n      onScroll: this._onScroll,\n      onScrollBeginDrag: this._onScrollBeginDrag,\n      onScrollEndDrag: this._onScrollEndDrag,\n      onMomentumScrollBegin: this._onMomentumScrollBegin,\n      onMomentumScrollEnd: this._onMomentumScrollEnd,\n      scrollEventThrottle: this.props.scrollEventThrottle,\n      // TODO: Android support\n      stickyHeaderIndices: stickyHeaderIndices,\n      style: inversionStyle ? [inversionStyle, this.props.style] : this.props.style\n    });\n\n    this._hasMore = this.state.last < this.props.getItemCount(this.props.data) - 1;\n    var innerRet = /*#__PURE__*/React.createElement(VirtualizedListContextProvider, {\n      value: {\n        cellKey: null,\n        getScrollMetrics: this._getScrollMetrics,\n        horizontal: this.props.horizontal,\n        getOutermostParentListRef: this._getOutermostParentListRef,\n        getNestedChildState: this._getNestedChildState,\n        registerAsNestedChild: this._registerAsNestedChild,\n        unregisterAsNestedChild: this._unregisterAsNestedChild,\n        debugInfo: this._getDebugInfo()\n      }\n    }, /*#__PURE__*/React.cloneElement((this.props.renderScrollComponent || this._defaultRenderScrollComponent)(scrollProps), {\n      ref: this._captureScrollRef\n    }, cells));\n    var ret = innerRet;\n\n    if (this.props.debug) {\n      return /*#__PURE__*/React.createElement(View, {\n        style: styles.debug\n      }, ret, this._renderDebugOverlay());\n    } else {\n      return ret;\n    }\n  };\n\n  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n    var _this$props9 = this.props,\n        data = _this$props9.data,\n        extraData = _this$props9.extraData;\n\n    if (data !== prevProps.data || extraData !== prevProps.extraData) {\n      // clear the viewableIndices cache to also trigger\n      // the onViewableItemsChanged callback with the new data\n      this._viewabilityTuples.forEach(function (tuple) {\n        tuple.viewabilityHelper.resetViewableIndices();\n      });\n    } // The `this._hiPriInProgress` is guaranteeing a hiPri cell update will only happen\n    // once per fiber update. The `_scheduleCellsToRenderUpdate` will set it to true\n    // if a hiPri update needs to perform. If `componentDidUpdate` is triggered with\n    // `this._hiPriInProgress=true`, means it's triggered by the hiPri update. The\n    // `_scheduleCellsToRenderUpdate` will check this condition and not perform\n    // another hiPri update.\n\n\n    var hiPriInProgress = this._hiPriInProgress;\n\n    this._scheduleCellsToRenderUpdate(); // Make sure setting `this._hiPriInProgress` back to false after `componentDidUpdate`\n    // is triggered with `this._hiPriInProgress = true`\n\n\n    if (hiPriInProgress) {\n      this._hiPriInProgress = false;\n    }\n  };\n\n  _proto._computeBlankness = function _computeBlankness() {\n    this._fillRateHelper.computeBlankness(this.props, this.state, this._scrollMetrics);\n  };\n\n  _proto._onCellLayout = function _onCellLayout(e, cellKey, index) {\n    var layout = e.nativeEvent.layout;\n    var next = {\n      offset: this._selectOffset(layout),\n      length: this._selectLength(layout),\n      index: index,\n      inLayout: true\n    };\n    var curr = this._frames[cellKey];\n\n    if (!curr || next.offset !== curr.offset || next.length !== curr.length || index !== curr.index) {\n      this._totalCellLength += next.length - (curr ? curr.length : 0);\n      this._totalCellsMeasured += curr ? 0 : 1;\n      this._averageCellLength = this._totalCellLength / this._totalCellsMeasured;\n      this._frames[cellKey] = next;\n      this._highestMeasuredFrameIndex = Math.max(this._highestMeasuredFrameIndex, index);\n\n      this._scheduleCellsToRenderUpdate();\n    } else {\n      this._frames[cellKey].inLayout = true;\n    }\n\n    this._triggerRemeasureForChildListsInCell(cellKey);\n\n    this._computeBlankness();\n\n    this._updateViewableItems(this.props.data);\n  };\n\n  _proto._triggerRemeasureForChildListsInCell = function _triggerRemeasureForChildListsInCell(cellKey) {\n    var childListKeys = this._cellKeysToChildListKeys.get(cellKey);\n\n    if (childListKeys) {\n      for (var _iterator2 = _createForOfIteratorHelperLoose(childListKeys), _step2; !(_step2 = _iterator2()).done;) {\n        var childKey = _step2.value;\n\n        var childList = this._nestedChildLists.get(childKey);\n\n        childList && childList.ref && childList.ref.measureLayoutRelativeToContainingList();\n      }\n    }\n  };\n\n  _proto.measureLayoutRelativeToContainingList = function measureLayoutRelativeToContainingList() {\n    var _this4 = this;\n\n    // TODO (T35574538): findNodeHandle sometimes crashes with \"Unable to find\n    // node on an unmounted component\" during scrolling\n    try {\n      if (!this._scrollRef) {\n        return;\n      } // We are assuming that getOutermostParentListRef().getScrollRef()\n      // is a non-null reference to a ScrollView\n\n\n      this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(), function (x, y, width, height) {\n        _this4._offsetFromParentVirtualizedList = _this4._selectOffset({\n          x: x,\n          y: y\n        });\n        _this4._scrollMetrics.contentLength = _this4._selectLength({\n          width: width,\n          height: height\n        });\n\n        var scrollMetrics = _this4._convertParentScrollMetrics(_this4.context.getScrollMetrics());\n\n        _this4._scrollMetrics.visibleLength = scrollMetrics.visibleLength;\n        _this4._scrollMetrics.offset = scrollMetrics.offset;\n      }, function (error) {\n        console.warn(\"VirtualizedList: Encountered an error while measuring a list's\" + ' offset from its containing VirtualizedList.');\n      });\n    } catch (error) {\n      console.warn('measureLayoutRelativeToContainingList threw an error', error.stack);\n    }\n  };\n\n  _proto._getFooterCellKey = function _getFooterCellKey() {\n    return this._getCellKey() + '-footer';\n  };\n\n  _proto._renderDebugOverlay = function _renderDebugOverlay() {\n    var normalize = this._scrollMetrics.visibleLength / (this._scrollMetrics.contentLength || 1);\n    var framesInLayout = [];\n    var itemCount = this.props.getItemCount(this.props.data);\n\n    for (var ii = 0; ii < itemCount; ii++) {\n      var frame = this._getFrameMetricsApprox(ii);\n      /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n       * error found when Flow v0.68 was deployed. To see the error delete this\n       * comment and run Flow. */\n\n\n      if (frame.inLayout) {\n        framesInLayout.push(frame);\n      }\n    }\n\n    var windowTop = this._getFrameMetricsApprox(this.state.first).offset;\n\n    var frameLast = this._getFrameMetricsApprox(this.state.last);\n\n    var windowLen = frameLast.offset + frameLast.length - windowTop;\n    var visTop = this._scrollMetrics.offset;\n    var visLen = this._scrollMetrics.visibleLength;\n    return /*#__PURE__*/React.createElement(View, {\n      style: [styles.debugOverlayBase, styles.debugOverlay]\n    }, framesInLayout.map(function (f, ii) {\n      return /*#__PURE__*/React.createElement(View, {\n        key: 'f' + ii,\n        style: [styles.debugOverlayBase, styles.debugOverlayFrame, {\n          top: f.offset * normalize,\n          height: f.length * normalize\n        }]\n      });\n    }), /*#__PURE__*/React.createElement(View, {\n      style: [styles.debugOverlayBase, styles.debugOverlayFrameLast, {\n        top: windowTop * normalize,\n        height: windowLen * normalize\n      }]\n    }), /*#__PURE__*/React.createElement(View, {\n      style: [styles.debugOverlayBase, styles.debugOverlayFrameVis, {\n        top: visTop * normalize,\n        height: visLen * normalize\n      }]\n    }));\n  };\n\n  _proto._selectLength = function _selectLength(metrics) {\n    return !this.props.horizontal ? metrics.height : metrics.width;\n  };\n\n  _proto._selectOffset = function _selectOffset(metrics) {\n    return !this.props.horizontal ? metrics.y : metrics.x;\n  };\n\n  _proto._maybeCallOnEndReached = function _maybeCallOnEndReached() {\n    var _this$props10 = this.props,\n        data = _this$props10.data,\n        getItemCount = _this$props10.getItemCount,\n        onEndReached = _this$props10.onEndReached,\n        onEndReachedThreshold = _this$props10.onEndReachedThreshold;\n    var _this$_scrollMetrics2 = this._scrollMetrics,\n        contentLength = _this$_scrollMetrics2.contentLength,\n        visibleLength = _this$_scrollMetrics2.visibleLength,\n        offset = _this$_scrollMetrics2.offset;\n    var distanceFromEnd = contentLength - visibleLength - offset;\n    var threshold = onEndReachedThreshold ? onEndReachedThreshold * visibleLength : 2;\n\n    if (onEndReached && this.state.last === getItemCount(data) - 1 && distanceFromEnd < threshold && this._scrollMetrics.contentLength !== this._sentEndForContentLength) {\n      // Only call onEndReached once for a given content length\n      this._sentEndForContentLength = this._scrollMetrics.contentLength;\n      onEndReached({\n        distanceFromEnd: distanceFromEnd\n      });\n    } else if (distanceFromEnd > threshold) {\n      // If the user scrolls away from the end and back again cause\n      // an onEndReached to be triggered again\n      this._sentEndForContentLength = 0;\n    }\n  };\n\n  _proto._scheduleCellsToRenderUpdate = function _scheduleCellsToRenderUpdate() {\n    var _this$state2 = this.state,\n        first = _this$state2.first,\n        last = _this$state2.last;\n    var _this$_scrollMetrics3 = this._scrollMetrics,\n        offset = _this$_scrollMetrics3.offset,\n        visibleLength = _this$_scrollMetrics3.visibleLength,\n        velocity = _this$_scrollMetrics3.velocity;\n    var itemCount = this.props.getItemCount(this.props.data);\n    var hiPri = false;\n    var scrollingThreshold =\n    /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n     * error found when Flow v0.63 was deployed. To see the error delete\n     * this comment and run Flow. */\n    this.props.onEndReachedThreshold * visibleLength / 2; // Mark as high priority if we're close to the start of the first item\n    // But only if there are items before the first rendered item\n\n    if (first > 0) {\n      var distTop = offset - this._getFrameMetricsApprox(first).offset;\n\n      hiPri = hiPri || distTop < 0 || velocity < -2 && distTop < scrollingThreshold;\n    } // Mark as high priority if we're close to the end of the last item\n    // But only if there are items after the last rendered item\n\n\n    if (last < itemCount - 1) {\n      var distBottom = this._getFrameMetricsApprox(last).offset - (offset + visibleLength);\n      hiPri = hiPri || distBottom < 0 || velocity > 2 && distBottom < scrollingThreshold;\n    } // Only trigger high-priority updates if we've actually rendered cells,\n    // and with that size estimate, accurately compute how many cells we should render.\n    // Otherwise, it would just render as many cells as it can (of zero dimension),\n    // each time through attempting to render more (limited by maxToRenderPerBatch),\n    // starving the renderer from actually laying out the objects and computing _averageCellLength.\n    // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate\n    // We shouldn't do another hipri cellToRenderUpdate\n\n\n    if (hiPri && (this._averageCellLength || this.props.getItemLayout) && !this._hiPriInProgress) {\n      this._hiPriInProgress = true; // Don't worry about interactions when scrolling quickly; focus on filling content as fast\n      // as possible.\n\n      this._updateCellsToRenderBatcher.dispose({\n        abort: true\n      });\n\n      this._updateCellsToRender();\n\n      return;\n    } else {\n      this._updateCellsToRenderBatcher.schedule();\n    }\n  };\n\n  _proto._updateViewableItems = function _updateViewableItems(data) {\n    var _this5 = this;\n\n    var getItemCount = this.props.getItemCount;\n\n    this._viewabilityTuples.forEach(function (tuple) {\n      tuple.viewabilityHelper.onUpdate(getItemCount(data), _this5._scrollMetrics.offset, _this5._scrollMetrics.visibleLength, _this5._getFrameMetrics, _this5._createViewToken, tuple.onViewableItemsChanged, _this5.state);\n    });\n  };\n\n  return VirtualizedList;\n}(React.PureComponent);\n\nVirtualizedList.contextType = VirtualizedListContext;\nVirtualizedList.defaultProps = {\n  disableVirtualization: false,\n  horizontal: false,\n  initialNumToRender: 10,\n  keyExtractor: function keyExtractor(item, index) {\n    if (item.key != null) {\n      return item.key;\n    }\n\n    if (item.id != null) {\n      return item.id;\n    }\n\n    _usedIndexForKey = true;\n\n    if (item.type && item.type.displayName) {\n      _keylessItemComponentName = item.type.displayName;\n    }\n\n    return String(index);\n  },\n  maxToRenderPerBatch: 10,\n  onEndReachedThreshold: 2,\n  // multiples of length\n  scrollEventThrottle: 50,\n  updateCellsBatchingPeriod: 50,\n  windowSize: 21 // multiples of length\n\n};\n\nvar CellRenderer = /*#__PURE__*/function (_React$Component) {\n  _inheritsLoose(CellRenderer, _React$Component);\n\n  function CellRenderer() {\n    var _this6;\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this6 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n    _this6.state = {\n      separatorProps: {\n        highlighted: false,\n        leadingItem: _this6.props.item\n      }\n    };\n    _this6._separators = {\n      highlight: function highlight() {\n        var _this6$props = _this6.props,\n            cellKey = _this6$props.cellKey,\n            prevCellKey = _this6$props.prevCellKey;\n\n        _this6.props.onUpdateSeparators([cellKey, prevCellKey], {\n          highlighted: true\n        });\n      },\n      unhighlight: function unhighlight() {\n        var _this6$props2 = _this6.props,\n            cellKey = _this6$props2.cellKey,\n            prevCellKey = _this6$props2.prevCellKey;\n\n        _this6.props.onUpdateSeparators([cellKey, prevCellKey], {\n          highlighted: false\n        });\n      },\n      updateProps: function updateProps(select, newProps) {\n        var _this6$props3 = _this6.props,\n            cellKey = _this6$props3.cellKey,\n            prevCellKey = _this6$props3.prevCellKey;\n\n        _this6.props.onUpdateSeparators([select === 'leading' ? prevCellKey : cellKey], newProps);\n      }\n    };\n    return _this6;\n  }\n\n  CellRenderer.getDerivedStateFromProps = function getDerivedStateFromProps(props, prevState) {\n    return {\n      separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n        leadingItem: props.item\n      })\n    };\n  } // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not\n  // reused by SectionList and we can keep VirtualizedList simpler.\n  ;\n\n  var _proto2 = CellRenderer.prototype;\n\n  _proto2.updateSeparatorProps = function updateSeparatorProps(newProps) {\n    this.setState(function (state) {\n      return {\n        separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n      };\n    });\n  };\n\n  _proto2.componentWillUnmount = function componentWillUnmount() {\n    this.props.onUnmount(this.props.cellKey);\n  };\n\n  _proto2._renderElement = function _renderElement(renderItem, ListItemComponent, item, index) {\n    if (renderItem && ListItemComponent) {\n      console.warn('VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' + ' precedence over renderItem.');\n    }\n\n    if (ListItemComponent) {\n      /* $FlowFixMe(>=0.108.0 site=react_native_fb) This comment suppresses an\n       * error found when Flow v0.108 was deployed. To see the error, delete\n       * this comment and run Flow. */\n      return /*#__PURE__*/React.createElement(ListItemComponent, {\n        item: item,\n        index: index,\n        separators: this._separators\n      });\n    }\n\n    if (renderItem) {\n      return renderItem({\n        item: item,\n        index: index,\n        separators: this._separators\n      });\n    }\n\n    invariant(false, 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.');\n  };\n\n  _proto2.render = function render() {\n    var _this$props11 = this.props,\n        CellRendererComponent = _this$props11.CellRendererComponent,\n        ItemSeparatorComponent = _this$props11.ItemSeparatorComponent,\n        fillRateHelper = _this$props11.fillRateHelper,\n        horizontal = _this$props11.horizontal,\n        item = _this$props11.item,\n        index = _this$props11.index,\n        inversionStyle = _this$props11.inversionStyle,\n        parentProps = _this$props11.parentProps;\n    var renderItem = parentProps.renderItem,\n        getItemLayout = parentProps.getItemLayout,\n        ListItemComponent = parentProps.ListItemComponent;\n\n    var element = this._renderElement(renderItem, ListItemComponent, item, index);\n\n    var onLayout =\n    /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n     * error found when Flow v0.68 was deployed. To see the error delete this\n     * comment and run Flow. */\n    getItemLayout && !parentProps.debug && !fillRateHelper.enabled() ? undefined : this.props.onLayout; // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and\n    // called explicitly by `ScrollViewStickyHeader`.\n\n    var itemSeparator = ItemSeparatorComponent && /*#__PURE__*/React.createElement(ItemSeparatorComponent, this.state.separatorProps);\n    var cellStyle = inversionStyle ? horizontal ? [styles.rowReverse, inversionStyle] : [styles.columnReverse, inversionStyle] : horizontal ? [styles.row, inversionStyle] : inversionStyle;\n    var result = !CellRendererComponent ?\n    /*#__PURE__*/\n\n    /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an\n     * error found when Flow v0.89 was deployed. To see the error, delete\n     * this comment and run Flow. */\n    React.createElement(View, {\n      style: cellStyle,\n      onLayout: onLayout\n    }, element, itemSeparator) : /*#__PURE__*/React.createElement(CellRendererComponent, _extends({}, this.props, {\n      style: cellStyle,\n      onLayout: onLayout\n    }), element, itemSeparator);\n    return /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n      cellKey: this.props.cellKey\n    }, result);\n  };\n\n  return CellRenderer;\n}(React.Component);\n\nfunction describeNestedLists(childList) {\n  var trace = 'VirtualizedList trace:\\n' + (\"  Child (\" + (childList.horizontal ? 'horizontal' : 'vertical') + \"):\\n\") + (\"    listKey: \" + childList.key + \"\\n\") + (\"    cellKey: \" + childList.cellKey);\n  var debugInfo = childList.parentDebugInfo;\n\n  while (debugInfo) {\n    trace += \"\\n  Parent (\" + (debugInfo.horizontal ? 'horizontal' : 'vertical') + \"):\\n\" + (\"    listKey: \" + debugInfo.listKey + \"\\n\") + (\"    cellKey: \" + debugInfo.cellKey);\n    debugInfo = debugInfo.parent;\n  }\n\n  return trace;\n}\n\nvar styles = StyleSheet.create({\n  verticallyInverted: {\n    transform: [{\n      scaleY: -1\n    }]\n  },\n  horizontallyInverted: {\n    transform: [{\n      scaleX: -1\n    }]\n  },\n  row: {\n    flexDirection: 'row'\n  },\n  rowReverse: {\n    flexDirection: 'row-reverse'\n  },\n  columnReverse: {\n    flexDirection: 'column-reverse'\n  },\n  debug: {\n    flex: 1\n  },\n  debugOverlayBase: {\n    position: 'absolute',\n    top: 0,\n    right: 0\n  },\n  debugOverlay: {\n    bottom: 0,\n    width: 20,\n    borderColor: 'blue',\n    borderWidth: 1\n  },\n  debugOverlayFrame: {\n    left: 0,\n    backgroundColor: 'orange'\n  },\n  debugOverlayFrameLast: {\n    left: 0,\n    borderColor: 'green',\n    borderWidth: 2\n  },\n  debugOverlayFrameVis: {\n    left: 0,\n    borderColor: 'red',\n    borderWidth: 2\n  }\n});\nexport default VirtualizedList;"]},"metadata":{},"sourceType":"module"}