UNPKG

react-infinite

Version:

A browser-ready efficient scrolling container based on UITableView

2 lines 38.8 kB
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Infinite=e()}}(function(){return function e(t,n,o){function r(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return r(n?n:e)},u,u.exports,e,t,n,o)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<o.length;a++)r(o[a]);return r}({1:[function(e,t,n){(function(n){"use strict";function o(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}var r=n.React||e("react"),i=n.PropTypes||e("prop-types"),a=n.createReactClass||e("create-react-class"),s=e("./utils/window");e("./utils/establish-polyfills");var l=e("./utils/scaleEnum"),c=e("./utils/infiniteHelpers"),u=e("lodash.isfinite"),p=e("./utils/types").preloadType,f=f=e("./utils/checkProps"),d=a({propTypes:{children:i.any,handleScroll:i.func,preloadBatchSize:p,preloadAdditionalHeight:p,elementHeight:i.oneOfType([i.number,i.arrayOf(i.number)]).isRequired,containerHeight:i.number,useWindowAsScrollContainer:i.bool,displayBottomUpwards:i.bool.isRequired,infiniteLoadBeginEdgeOffset:i.number,onInfiniteLoad:i.func,loadingSpinnerDelegate:i.node,isInfiniteLoading:i.bool,timeScrollStateLastsForAfterUserScrolls:i.number,className:i.string,styles:i.shape({scrollableStyle:i.object}).isRequired},statics:{containerHeightScaleFactor:function(e){if(!u(e))throw new Error("The scale factor must be a number.");return{type:l.CONTAINER_HEIGHT_SCALE_FACTOR,amount:e}}},computedProps:{},utils:{},shouldAttachToBottom:!1,preservedScrollState:0,loadingSpinnerHeight:0,deprecationWarned:!1,scrollable:null,topSpacer:null,bottomSpacer:null,smoothScrollingWrapper:null,loadingSpinner:null,getDefaultProps:function(){return{handleScroll:function(){},useWindowAsScrollContainer:!1,onInfiniteLoad:function(){},loadingSpinnerDelegate:r.createElement("div",null),displayBottomUpwards:!1,isInfiniteLoading:!1,timeScrollStateLastsForAfterUserScrolls:150,className:"",styles:{}}},getInitialState:function(){var e=this.recomputeInternalStateFromProps(this.props);this.computedProps=e.computedProps,this.utils=e.utils,this.shouldAttachToBottom=this.props.displayBottomUpwards;var t=e.newState;return t.scrollTimeout=void 0,t.isScrolling=!1,t},generateComputedProps:function(e){var t=e.containerHeight,n=e.preloadBatchSize,r=e.preloadAdditionalHeight,i=o(e,["containerHeight","preloadBatchSize","preloadAdditionalHeight"]),a={};t="number"==typeof t?t:0,a.containerHeight=e.useWindowAsScrollContainer?s.innerHeight:t,void 0!==i.infiniteLoadBeginBottomOffset&&(a.infiniteLoadBeginEdgeOffset=i.infiniteLoadBeginBottomOffset,this.deprecationWarned||(console.error("Warning: React Infinite's infiniteLoadBeginBottomOffset prop\n has been deprecated as of 0.6.0. Please use infiniteLoadBeginEdgeOffset.\n Because this is a rather descriptive name, a simple find and replace\n should suffice."),this.deprecationWarned=!0));var c={type:l.CONTAINER_HEIGHT_SCALE_FACTOR,amount:.5},u=n&&n.type?n:c;"number"==typeof n?a.preloadBatchSize=n:"object"==typeof u&&u.type===l.CONTAINER_HEIGHT_SCALE_FACTOR?a.preloadBatchSize=a.containerHeight*u.amount:a.preloadBatchSize=0;var p={type:l.CONTAINER_HEIGHT_SCALE_FACTOR,amount:1},f=r&&r.type?r:p;return"number"==typeof r?a.preloadAdditionalHeight=r:"object"==typeof f&&f.type===l.CONTAINER_HEIGHT_SCALE_FACTOR?a.preloadAdditionalHeight=a.containerHeight*f.amount:a.preloadAdditionalHeight=0,Object.assign(i,a)},generateComputedUtilityFunctions:function(e){var t=this,n={};return n.getLoadingSpinnerHeight=function(){var e=0;return t.loadingSpinner&&(e=t.loadingSpinner.offsetHeight||0),e},e.useWindowAsScrollContainer?(n.subscribeToScrollListener=function(){s.addEventListener("scroll",t.infiniteHandleScroll)},n.unsubscribeFromScrollListener=function(){s.removeEventListener("scroll",t.infiniteHandleScroll)},n.nodeScrollListener=function(){},n.getScrollTop=function(){return s.pageYOffset},n.setScrollTop=function(e){s.scroll(s.pageXOffset,e)},n.scrollShouldBeIgnored=function(){return!1},n.buildScrollableStyle=function(){return{}}):(n.subscribeToScrollListener=function(){},n.unsubscribeFromScrollListener=function(){},n.nodeScrollListener=this.infiniteHandleScroll,n.getScrollTop=function(){return t.scrollable?t.scrollable.scrollTop:0},n.setScrollTop=function(e){t.scrollable&&(t.scrollable.scrollTop=e)},n.scrollShouldBeIgnored=function(e){return e.target!==t.scrollable},n.buildScrollableStyle=function(){return Object.assign({},{height:t.computedProps.containerHeight,overflowX:"hidden",overflowY:"scroll",WebkitOverflowScrolling:"touch"},t.computedProps.styles.scrollableStyle||{})}),n},recomputeInternalStateFromProps:function(e){f(e);var t=this.generateComputedProps(e),n=this.generateComputedUtilityFunctions(e),o={};return o.numberOfChildren=r.Children.count(t.children),o.infiniteComputer=c.createInfiniteComputer(t.elementHeight,t.children),void 0!==t.isInfiniteLoading&&(o.isInfiniteLoading=t.isInfiniteLoading),o.preloadBatchSize=t.preloadBatchSize,o.preloadAdditionalHeight=t.preloadAdditionalHeight,o=Object.assign(o,c.recomputeApertureStateFromOptionsAndScrollTop(o,n.getScrollTop())),{computedProps:t,utils:n,newState:o}},componentWillReceiveProps:function(e){var t=this.recomputeInternalStateFromProps(e);this.computedProps=t.computedProps,this.utils=t.utils,this.setState(t.newState)},componentWillUpdate:function(){this.props.displayBottomUpwards&&(this.preservedScrollState=this.utils.getScrollTop()-this.loadingSpinnerHeight)},componentDidUpdate:function(e,t){if(this.loadingSpinnerHeight=this.utils.getLoadingSpinnerHeight(),this.props.displayBottomUpwards){var n=this.getLowestPossibleScrollTop();this.shouldAttachToBottom&&this.utils.getScrollTop()<n?this.utils.setScrollTop(n):e.isInfiniteLoading&&!this.props.isInfiniteLoading&&this.utils.setScrollTop(this.state.infiniteComputer.getTotalScrollableHeight()-t.infiniteComputer.getTotalScrollableHeight()+this.preservedScrollState)}var o=this.state.numberOfChildren!==t.numberOfChildren;if(o){var r=c.recomputeApertureStateFromOptionsAndScrollTop(this.state,this.utils.getScrollTop());this.setState(r)}o&&!this.hasAllVisibleItems()&&!this.state.isInfiniteLoading&&this.onInfiniteLoad()},componentDidMount:function(){if(this.utils.subscribeToScrollListener(),this.hasAllVisibleItems()||this.onInfiniteLoad(),this.props.displayBottomUpwards){var e=this.getLowestPossibleScrollTop();this.shouldAttachToBottom&&this.utils.getScrollTop()<e&&this.utils.setScrollTop(e)}},componentWillUnmount:function(){this.utils.unsubscribeFromScrollListener()},infiniteHandleScroll:function(e){this.utils.scrollShouldBeIgnored(e)||(this.computedProps.handleScroll(this.scrollable),this.handleScroll(this.utils.getScrollTop()))},manageScrollTimeouts:function(){this.state.scrollTimeout&&clearTimeout(this.state.scrollTimeout);var e=this,t=setTimeout(function(){e.setState({isScrolling:!1,scrollTimeout:void 0})},this.computedProps.timeScrollStateLastsForAfterUserScrolls);this.setState({isScrolling:!0,scrollTimeout:t})},getLowestPossibleScrollTop:function(){return this.state.infiniteComputer.getTotalScrollableHeight()-this.computedProps.containerHeight},hasAllVisibleItems:function(){return!(u(this.computedProps.infiniteLoadBeginEdgeOffset)&&this.state.infiniteComputer.getTotalScrollableHeight()<this.computedProps.containerHeight)},passedEdgeForInfiniteScroll:function(e){return this.computedProps.displayBottomUpwards?!this.shouldAttachToBottom&&e<this.computedProps.infiniteLoadBeginEdgeOffset:e>this.state.infiniteComputer.getTotalScrollableHeight()-this.computedProps.containerHeight-this.computedProps.infiniteLoadBeginEdgeOffset},onInfiniteLoad:function(){this.setState({isInfiniteLoading:!0}),this.computedProps.onInfiniteLoad()},handleScroll:function(e){this.shouldAttachToBottom=this.computedProps.displayBottomUpwards&&e>=this.getLowestPossibleScrollTop(),this.manageScrollTimeouts();var t=c.recomputeApertureStateFromOptionsAndScrollTop(this.state,e);this.passedEdgeForInfiniteScroll(e)&&!this.state.isInfiniteLoading?(this.setState(Object.assign({},t)),this.onInfiniteLoad()):this.setState(t)},buildHeightStyle:function(e){return{width:"100%",height:Math.ceil(e)}},render:function(){var e,t=this;e=this.state.numberOfChildren>1?this.computedProps.children.slice(this.state.displayIndexStart,this.state.displayIndexEnd+1):this.computedProps.children;var n={};this.state.isScrolling&&(n.pointerEvents="none");var o=this.state.infiniteComputer.getTopSpacerHeight(this.state.displayIndexStart),i=this.state.infiniteComputer.getBottomSpacerHeight(this.state.displayIndexEnd);if(this.computedProps.displayBottomUpwards){var a=this.computedProps.containerHeight-this.state.infiniteComputer.getTotalScrollableHeight();a>0&&(o=a-this.loadingSpinnerHeight)}var s=void 0===this.computedProps.infiniteLoadBeginEdgeOffset?null:r.createElement("div",{ref:function(e){t.loadingSpinner=e}},this.state.isInfiniteLoading?this.computedProps.loadingSpinnerDelegate:null);return r.createElement("div",{className:this.computedProps.className,ref:function(e){t.scrollable=e},style:this.utils.buildScrollableStyle(),onScroll:this.utils.nodeScrollListener},r.createElement("div",{ref:function(e){t.smoothScrollingWrapper=e},style:n},r.createElement("div",{ref:function(e){t.topSpacer=e},style:this.buildHeightStyle(o)}),this.computedProps.displayBottomUpwards&&s,e,!this.computedProps.displayBottomUpwards&&s,r.createElement("div",{ref:function(e){t.bottomSpacer=e},style:this.buildHeightStyle(i)})))}});t.exports=d,n.Infinite=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./utils/checkProps":22,"./utils/establish-polyfills":23,"./utils/infiniteHelpers":24,"./utils/scaleEnum":25,"./utils/types":26,"./utils/window":27,"create-react-class":3,"lodash.isfinite":10,"prop-types":16,react:void 0}],2:[function(e,t,n){(function(n){"use strict";function o(e){return e}function r(e,t,r){function p(e,t,o){for(var r in t)t.hasOwnProperty(r)&&"production"!==n.env.NODE_ENV&&l("function"==typeof t[r],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",c[o],r)}function f(e,t){var n=O.hasOwnProperty(t)?O[t]:null;I.hasOwnProperty(t)&&s("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&s("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function d(e,o){if(o){s("function"!=typeof o,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),s(!t(o),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;o.hasOwnProperty(u)&&w.mixins(e,o.mixins);for(var a in o)if(o.hasOwnProperty(a)&&a!==u){var c=o[a],p=r.hasOwnProperty(a);if(f(p,a),w.hasOwnProperty(a))w[a](e,c);else{var d=O.hasOwnProperty(a),h="function"==typeof c,y=h&&!d&&!p&&o.autobind!==!1;if(y)i.push(a,c),r[a]=c;else if(p){var b=O[a];s(d&&("DEFINE_MANY_MERGED"===b||"DEFINE_MANY"===b),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",b,a),"DEFINE_MANY_MERGED"===b?r[a]=m(r[a],c):"DEFINE_MANY"===b&&(r[a]=g(r[a],c))}else r[a]=c,"production"!==n.env.NODE_ENV&&"function"==typeof c&&o.displayName&&(r[a].displayName=o.displayName+"_"+a)}}}else if("production"!==n.env.NODE_ENV){var v=typeof o,S="object"===v&&null!==o;"production"!==n.env.NODE_ENV&&l(S,"%s: You're attempting to include a mixin that is either null or not an object. Check the mixins included by the component, as well as any mixins they include themselves. Expected object but got %s.",e.displayName||"ReactClass",null===o?null:v)}}function h(e,t){if(t)for(var n in t){var o=t[n];if(t.hasOwnProperty(n)){var r=n in w;s(!r,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in e;s(!i,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=o}}}function y(e,t){s(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(s(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function m(e,t){return function(){var n=e.apply(this,arguments),o=t.apply(this,arguments);if(null==n)return o;if(null==o)return n;var r={};return y(r,n),y(r,o),r}}function g(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function b(e,t){var o=t.bind(e);if("production"!==n.env.NODE_ENV){o.__reactBoundContext=e,o.__reactBoundMethod=t,o.__reactBoundArguments=null;var r=e.constructor.displayName,i=o.bind;o.bind=function(a){for(var s=arguments.length,c=Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];if(a!==e&&null!==a)"production"!==n.env.NODE_ENV&&l(!1,"bind(): React component methods may only be bound to the component instance. See %s",r);else if(!c.length)return"production"!==n.env.NODE_ENV&&l(!1,"bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See %s",r),o;var p=i.apply(o,arguments);return p.__reactBoundContext=e,p.__reactBoundMethod=t,p.__reactBoundArguments=c,p}}return o}function v(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var o=t[n],r=t[n+1];e[o]=b(e,r)}}function S(e){var t=o(function(e,o,i){"production"!==n.env.NODE_ENV&&l(this instanceof t,"Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory"),this.__reactAutoBindPairs.length&&v(this),this.props=e,this.context=o,this.refs=a,this.updater=i||r,this.state=null;var c=this.getInitialState?this.getInitialState():null;"production"!==n.env.NODE_ENV&&void 0===c&&this.getInitialState._isMockFunction&&(c=null),s("object"==typeof c&&!Array.isArray(c),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=c});t.prototype=new N,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],E.forEach(d.bind(null,t)),d(t,T),d(t,e),d(t,_),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),"production"!==n.env.NODE_ENV&&(t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved={}),t.prototype.getInitialState&&(t.prototype.getInitialState.isReactClassApproved={})),s(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),"production"!==n.env.NODE_ENV&&(l(!t.prototype.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",e.displayName||"A component"),l(!t.prototype.componentWillRecieveProps,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",e.displayName||"A component"));for(var i in O)t.prototype[i]||(t.prototype[i]=null);return t}var E=[],O={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},w={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)d(e,t[n])},childContextTypes:function(e,t){"production"!==n.env.NODE_ENV&&p(e,t,"childContext"),e.childContextTypes=i({},e.childContextTypes,t)},contextTypes:function(e,t){"production"!==n.env.NODE_ENV&&p(e,t,"context"),e.contextTypes=i({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=m(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){"production"!==n.env.NODE_ENV&&p(e,t,"prop"),e.propTypes=i({},e.propTypes,t)},statics:function(e,t){h(e,t)},autobind:function(){}},T={componentDidMount:function(){this.__isMounted=!0}},_={componentWillUnmount:function(){this.__isMounted=!1}},I={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return"production"!==n.env.NODE_ENV&&(l(this.__didWarnIsMounted,"%s: isMounted is deprecated. Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.",this.constructor&&this.constructor.displayName||this.name||"Component"),this.__didWarnIsMounted=!0),!!this.__isMounted}},N=function(){};return i(N.prototype,e.prototype,I),S}var i=e("object-assign"),a=e("fbjs/lib/emptyObject"),s=e("fbjs/lib/invariant");if("production"!==n.env.NODE_ENV)var l=e("fbjs/lib/warning");var c,u="mixins";c="production"!==n.env.NODE_ENV?{prop:"prop",context:"context",childContext:"child context"}:{},t.exports=r}).call(this,e("_process"))},{_process:12,"fbjs/lib/emptyObject":6,"fbjs/lib/invariant":7,"fbjs/lib/warning":8,"object-assign":4}],3:[function(e,t,n){"use strict";var o=e("react"),r=e("./factory");if("undefined"==typeof o)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new o.Component).updater;t.exports=r(o.Component,o.isValidElement,i)},{"./factory":2,react:void 0}],4:[function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==o.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(e,t){for(var n,r,l=o(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var u in n)a.call(n,u)&&(l[u]=n[u]);if(i){r=i(n);for(var p=0;p<r.length;p++)s.call(n,r[p])&&(l[r[p]]=n[r[p]])}}return l}},{}],5:[function(e,t,n){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},t.exports=r},{}],6:[function(e,t,n){(function(e){"use strict";var n={};"production"!==e.env.NODE_ENV&&Object.freeze(n),t.exports=n}).call(this,e("_process"))},{_process:12}],7:[function(e,t,n){(function(e){"use strict";function n(e,t,n,r,i,a,s,l){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,a,s,l],p=0;c=new Error(t.replace(/%s/g,function(){return u[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};"production"!==e.env.NODE_ENV&&(o=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),t.exports=n}).call(this,e("_process"))},{_process:12}],8:[function(e,t,n){(function(n){"use strict";var o=e("./emptyFunction"),r=o;if("production"!==n.env.NODE_ENV){var i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=0,i="Warning: "+e.replace(/%s/g,function(){return n[r++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(a){}};r=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,o=Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];i.apply(void 0,[t].concat(o))}}}t.exports=r}).call(this,e("_process"))},{"./emptyFunction":5,_process:12}],9:[function(e,t,n){function o(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return l(n)?n:void 0}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=b}function a(e){return s(e)&&y.call(e)==u}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function l(e){return null!=e&&(a(e)?m.test(d.call(e)):o(e)&&p.test(e))}var c="[object Array]",u="[object Function]",p=/^\[object .+?Constructor\]$/,f=Object.prototype,d=Function.prototype.toString,h=f.hasOwnProperty,y=f.toString,m=RegExp("^"+d.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),g=r(Array,"isArray"),b=9007199254740991,v=g||function(e){return o(e)&&i(e.length)&&y.call(e)==c};t.exports=v},{}],10:[function(e,t,n){(function(e){function n(e){return"number"==typeof e&&o(e)}var o=e.isFinite;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(e,t){for(var n,a,s=o(e),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)r.call(n,c)&&(s[c]=n[c]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(s[a[u]]=n[a[u]])}}return s}},{}],12:[function(e,t,n){function o(){if(!s){s=!0;for(var e,t=a.length;t;){e=a,a=[];for(var n=-1;++n<t;)e[n]();t=a.length}s=!1}}function r(){}var i=t.exports={},a=[],s=!1;i.nextTick=function(e){a.push(e),s||setTimeout(o,0)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=r,i.addListener=r,i.once=r,i.off=r,i.removeListener=r,i.removeAllListeners=r,i.emit=r,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],13:[function(e,t,n){(function(n){"use strict";function o(e,t,o,l,c){if("production"!==n.env.NODE_ENV)for(var u in e)if(e.hasOwnProperty(u)){var p;try{r("function"==typeof e[u],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",l||"React class",o,u),p=e[u](t,u,l,o,null,a)}catch(f){p=f}if(i(!p||p instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",o,u,typeof p),p instanceof Error&&!(p.message in s)){s[p.message]=!0;var d=c?c():"";i(!1,"Failed %s type: %s%s",o,p.message,null!=d?d:"")}}}if("production"!==n.env.NODE_ENV)var r=e("fbjs/lib/invariant"),i=e("fbjs/lib/warning"),a=e("./lib/ReactPropTypesSecret"),s={};t.exports=o}).call(this,e("_process"))},{"./lib/ReactPropTypesSecret":17,_process:12,"fbjs/lib/invariant":7,"fbjs/lib/warning":8}],14:[function(e,t,n){"use strict";var o=e("fbjs/lib/emptyFunction"),r=e("fbjs/lib/invariant"),i=e("./lib/ReactPropTypesSecret");t.exports=function(){function e(e,t,n,o,a,s){s!==i&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=o,n.PropTypes=n,n}},{"./lib/ReactPropTypesSecret":17,"fbjs/lib/emptyFunction":5,"fbjs/lib/invariant":7}],15:[function(e,t,n){(function(n){"use strict";var o=e("fbjs/lib/emptyFunction"),r=e("fbjs/lib/invariant"),i=e("fbjs/lib/warning"),a=e("./lib/ReactPropTypesSecret"),s=e("./checkPropTypes");t.exports=function(e,t){function l(e){var t=e&&(x&&e[x]||e[P]);if("function"==typeof t)return t}function c(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function u(e){this.message=e,this.stack=""}function p(e){function o(o,c,p,f,d,h,y){if(f=f||j,h=h||p,y!==a)if(t)r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==n.env.NODE_ENV&&"undefined"!=typeof console){var m=f+":"+p;!s[m]&&l<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,f),s[m]=!0,l++)}return null==c[p]?o?new u(null===c[p]?"The "+d+" `"+h+"` is marked as required "+("in `"+f+"`, but its value is `null`."):"The "+d+" `"+h+"` is marked as required in "+("`"+f+"`, but its value is `undefined`.")):null:e(c,p,f,d,h)}if("production"!==n.env.NODE_ENV)var s={},l=0;var c=o.bind(null,!1);return c.isRequired=o.bind(null,!0),c}function f(e){function t(t,n,o,r,i,a){var s=t[n],l=T(s);if(l!==e){var c=_(s);return new u("Invalid "+r+" `"+i+"` of type "+("`"+c+"` supplied to `"+o+"`, expected ")+("`"+e+"`."))}return null}return p(t)}function d(){return p(o.thatReturnsNull)}function h(e){function t(t,n,o,r,i){if("function"!=typeof e)return new u("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var l=T(s);return new u("Invalid "+r+" `"+i+"` of type "+("`"+l+"` supplied to `"+o+"`, expected an array."))}for(var c=0;c<s.length;c++){var p=e(s,c,o,r,i+"["+c+"]",a);if(p instanceof Error)return p}return null}return p(t)}function y(){function t(t,n,o,r,i){var a=t[n];if(!e(a)){var s=T(a);return new u("Invalid "+r+" `"+i+"` of type "+("`"+s+"` supplied to `"+o+"`, expected a single ReactElement."))}return null}return p(t)}function m(e){function t(t,n,o,r,i){if(!(t[n]instanceof e)){var a=e.name||j,s=N(t[n]);return new u("Invalid "+r+" `"+i+"` of type "+("`"+s+"` supplied to `"+o+"`, expected ")+("instance of `"+a+"`."))}return null}return p(t)}function g(e){function t(t,n,o,r,i){for(var a=t[n],s=0;s<e.length;s++)if(c(a,e[s]))return null;var l=JSON.stringify(e);return new u("Invalid "+r+" `"+i+"` of value `"+a+"` "+("supplied to `"+o+"`, expected one of "+l+"."))}return Array.isArray(e)?p(t):("production"!==n.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,o.thatReturnsNull)}function b(e){function t(t,n,o,r,i){if("function"!=typeof e)return new u("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[n],l=T(s);if("object"!==l)return new u("Invalid "+r+" `"+i+"` of type "+("`"+l+"` supplied to `"+o+"`, expected an object."));for(var c in s)if(s.hasOwnProperty(c)){var p=e(s,c,o,r,i+"."+c,a);if(p instanceof Error)return p}return null}return p(t)}function v(e){function t(t,n,o,r,i){for(var s=0;s<e.length;s++){var l=e[s];if(null==l(t,n,o,r,i,a))return null}return new u("Invalid "+r+" `"+i+"` supplied to "+("`"+o+"`."))}if(!Array.isArray(e))return"production"!==n.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,o.thatReturnsNull;for(var r=0;r<e.length;r++){var s=e[r];if("function"!=typeof s)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",I(s),r),o.thatReturnsNull}return p(t)}function S(){function e(e,t,n,o,r){return O(e[t])?null:new u("Invalid "+o+" `"+r+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return p(e)}function E(e){function t(t,n,o,r,i){var s=t[n],l=T(s);if("object"!==l)return new u("Invalid "+r+" `"+i+"` of type `"+l+"` "+("supplied to `"+o+"`, expected `object`."));for(var c in e){var p=e[c];if(p){var f=p(s,c,o,r,i+"."+c,a);if(f)return f}}return null}return p(t)}function O(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(O);if(null===t||e(t))return!0;var n=l(t);if(!n)return!1;var o,r=n.call(t);if(n!==t.entries){for(;!(o=r.next()).done;)if(!O(o.value))return!1}else for(;!(o=r.next()).done;){var i=o.value;if(i&&!O(i[1]))return!1}return!0;default:return!1}}function w(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function T(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":w(t,e)?"symbol":t}function _(e){if("undefined"==typeof e||null===e)return""+e;var t=T(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function I(e){var t=_(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function N(e){return e.constructor&&e.constructor.name?e.constructor.name:j}var x="function"==typeof Symbol&&Symbol.iterator,P="@@iterator",j="<<anonymous>>",A={array:f("array"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:d(),arrayOf:h,element:y(),instanceOf:m,node:S(),objectOf:b,oneOf:g,oneOfType:v,shape:E};return u.prototype=Error.prototype,A.checkPropTypes=s,A.PropTypes=A,A}}).call(this,e("_process"))},{"./checkPropTypes":13,"./lib/ReactPropTypesSecret":17,_process:12,"fbjs/lib/emptyFunction":5,"fbjs/lib/invariant":7,"fbjs/lib/warning":8}],16:[function(e,t,n){(function(n){if("production"!==n.env.NODE_ENV){var o="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,r=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},i=!0;t.exports=e("./factoryWithTypeCheckers")(r,i)}else t.exports=e("./factoryWithThrowingShims")()}).call(this,e("_process"))},{"./factoryWithThrowingShims":14,"./factoryWithTypeCheckers":15,_process:12}],17:[function(e,t,n){"use strict";var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=o},{}],18:[function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o), t}}(),a=function(e,t,n){for(var o=!0;o;){var r=e,i=t,a=n;o=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var c=Object.getPrototypeOf(r);if(null===c)return;e=c,t=i,n=a,o=!0,s=c=void 0}},s=e("./infiniteComputer.js"),l=e("../utils/binaryIndexSearch.js"),c=function(e){function t(e,n){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.prefixHeightData=this.heightData.reduce(function(e,t){return 0===e.length?[t]:(e.push(e[e.length-1]+t),e)},[])}return r(t,e),i(t,[{key:"maybeIndexToIndex",value:function(e){return void 0===e||null===e?this.prefixHeightData.length-1:e}},{key:"getTotalScrollableHeight",value:function(){var e=this.prefixHeightData.length;return 0===e?0:this.prefixHeightData[e-1]}},{key:"getDisplayIndexStart",value:function(e){var t=l.binaryIndexSearch(this.prefixHeightData,e,l.opts.CLOSEST_HIGHER);return this.maybeIndexToIndex(t)}},{key:"getDisplayIndexEnd",value:function(e){var t=l.binaryIndexSearch(this.prefixHeightData,e,l.opts.CLOSEST_HIGHER);return this.maybeIndexToIndex(t)}},{key:"getTopSpacerHeight",value:function(e){var t=e-1;return t<0?0:this.prefixHeightData[t]}},{key:"getBottomSpacerHeight",value:function(e){return-1===e?0:this.getTotalScrollableHeight()-this.prefixHeightData[e]}}]),t}(s);t.exports=c},{"../utils/binaryIndexSearch.js":21,"./infiniteComputer.js":20}],19:[function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function(e,t,n){for(var o=!0;o;){var r=e,i=t,a=n;o=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var c=Object.getPrototypeOf(r);if(null===c)return;e=c,t=i,n=a,o=!0,s=c=void 0}},s=e("./infiniteComputer.js"),l=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),i(t,[{key:"getTotalScrollableHeight",value:function(){return this.heightData*this.numberOfChildren}},{key:"getDisplayIndexStart",value:function(e){return Math.floor(e/this.heightData)}},{key:"getDisplayIndexEnd",value:function(e){var t=Math.ceil(e/this.heightData);return t>0?t-1:t}},{key:"getTopSpacerHeight",value:function(e){return e*this.heightData}},{key:"getBottomSpacerHeight",value:function(e){var t=e+1;return Math.max(0,(this.numberOfChildren-t)*this.heightData)}}]),t}(s);t.exports=l},{"./infiniteComputer.js":20}],20:[function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function(){function e(t,n){o(this,e),this.heightData=t,this.numberOfChildren=n}return r(e,[{key:"getTotalScrollableHeight",value:function(){}},{key:"getDisplayIndexStart",value:function(e){}},{key:"getDisplayIndexEnd",value:function(e){}},{key:"getTopSpacerHeight",value:function(e){}},{key:"getBottomSpacerHeight",value:function(e){}}]),e}();t.exports=i},{}],21:[function(e,t,n){"use strict";var o={CLOSEST_LOWER:1,CLOSEST_HIGHER:2},r=function(e,t,n){for(var r,i,a,s=e.length-1,l=0;l<=s;){if(i=l+Math.floor((s-l)/2),(a=e[i])===t)return i;a<t?l=i+1:a>t&&(s=i-1)}return n===o.CLOSEST_LOWER&&l>0?r=l-1:n===o.CLOSEST_HIGHER&&s<e.length-1&&(r=s+1),r};t.exports={binaryIndexSearch:r,opts:o}},{}],22:[function(e,t,n){(function(n){"use strict";var o=n.React||e("react"),r=e("lodash.isfinite");t.exports=function(e){var t="Invariant Violation: ";if(!e.containerHeight&&!e.useWindowAsScrollContainer)throw new Error(t+"Either containerHeight or useWindowAsScrollContainer must be provided.");if(!r(e.elementHeight)&&!Array.isArray(e.elementHeight))throw new Error(t+"You must provide either a number or an array of numbers as the elementHeight.");if(Array.isArray(e.elementHeight)&&o.Children.count(e.children)!==e.elementHeight.length)throw new Error(t+"There must be as many values provided in the elementHeight prop as there are children.")}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"lodash.isfinite":10,react:void 0}],23:[function(e,t,n){"use strict";Object.assign||(Object.assign=e("object-assign")),Array.isArray||(Array.isArray=e("lodash.isarray"))},{"lodash.isarray":9,"object-assign":11}],24:[function(e,t,n){(function(n){"use strict";function o(e,t){var n=s.Children.count(t);return Array.isArray(e)?new a(e,n):new i(e,n)}function r(e,t){var n=e.preloadBatchSize,o=e.preloadAdditionalHeight,r=e.infiniteComputer;return function(){var e=0===n?0:Math.floor(t/n),i=n*e,a=i+n,s=Math.max(0,i-o),l=Math.min(r.getTotalScrollableHeight(),a+o);return{displayIndexStart:r.getDisplayIndexStart(s),displayIndexEnd:r.getDisplayIndexEnd(l)}}()}var i=e("../computers/constantInfiniteComputer.js"),a=e("../computers/arrayInfiniteComputer.js"),s=n.React||e("react");t.exports={createInfiniteComputer:o,recomputeApertureStateFromOptionsAndScrollTop:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../computers/arrayInfiniteComputer.js":18,"../computers/constantInfiniteComputer.js":19,react:void 0}],25:[function(e,t,n){"use strict";t.exports={CONTAINER_HEIGHT_SCALE_FACTOR:"containerHeightScaleFactor"}},{}],26:[function(e,t,n){(function(n){"use strict";var o=n.PropTypes||e("prop-types");t.exports={preloadType:o.oneOfType([o.number,o.shape({type:o.oneOf(["containerHeightScaleFactor"]).isRequired,amount:o.number.isRequired})])}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"prop-types":16}],27:[function(e,t,n){(function(e){"use strict";var n;n="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{},t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});