UNPKG

amit-fixed-data-table

Version:

A React table component designed to allow presenting thousands of rows of data.

13 lines (12 loc) 106 kB
/** * FixedDataTable v1.0.2 * * Copyright Schrodinger, LLC * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.FixedDataTable=t(require("react"),require("react-dom")):e.FixedDataTable=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){o(1),o(5),o(7),o(9),o(11),o(13),o(15),o(17),o(19),o(21),o(23),o(25),e.exports=o(27)},function(e,t){},,,,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i=o(28),r=n(i),a=o(81),s=n(a),l=o(79),u=n(l),c=o(78),f=n(c),h={Cell:s.default,Column:u.default,ColumnGroup:f.default,Table:r.default};h.version="0.7.17",e.exports=h},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},a=o(29),s=n(a),l=o(31),u=n(l),c=o(39),f=n(c),h=o(44),d=n(h),p=o(45),m=n(p),_=o(53),v=n(_),g=o(54),w=n(g),y=o(69),b=n(y),R=o(85),C=n(R),x=o(74),T=n(x),S=o(86),E=n(S),D=o(88),M=n(D),H=o(62),O=n(H),k=o(89),N=n(k),I=o(46),P=n(I),z=o(68),A=n(z),L=o(82),F=n(L),Y=o(84),W=n(Y),j=o(63),X=n(j),V=s.default.Children,G={},B=1,q="header",U="footer",K="cell",Z=15,J=100,$=(0,u.default)({displayName:"FixedDataTable",propTypes:{width:f.default.number.isRequired,height:f.default.number,className:f.default.string,maxHeight:f.default.number,ownerHeight:f.default.number,overflowX:f.default.oneOf(["hidden","auto"]),overflowY:f.default.oneOf(["hidden","auto"]),touchScrollEnabled:f.default.bool,showScrollbarX:f.default.bool,showScrollbarY:f.default.bool,onHorizontalScroll:f.default.func,onVerticalScroll:f.default.func,rowsCount:f.default.number.isRequired,rowHeight:f.default.number.isRequired,rowHeightGetter:f.default.func,rowClassNameGetter:f.default.func,rowKeyGetter:f.default.func,groupHeaderHeight:f.default.number,headerHeight:f.default.number.isRequired,footerHeight:f.default.number,scrollLeft:f.default.number,scrollToColumn:f.default.number,scrollTop:f.default.number,scrollToRow:f.default.number,onScrollStart:f.default.func,onScrollEnd:f.default.func,stopScrollPropagation:f.default.bool,onContentHeightChange:f.default.func,onRowClick:f.default.func,onRowDoubleClick:f.default.func,onRowMouseDown:f.default.func,onRowMouseEnter:f.default.func,onRowMouseLeave:f.default.func,onColumnResizeEndCallback:f.default.func,onColumnReorderEndCallback:f.default.func,isColumnResizing:f.default.bool,isColumnReordering:f.default.bool,bufferRowCount:f.default.number},getDefaultProps:function(){return{footerHeight:0,groupHeaderHeight:0,headerHeight:0,showScrollbarX:!0,showScrollbarY:!0,touchScrollEnabled:!1,stopScrollPropagation:!1}},componentWillMount:function(){var e=this.props,t=(void 0===e.height?e.maxHeight:e.height)-(e.headerHeight||0)-(e.footerHeight||0)-(e.groupHeaderHeight||0);this._scrollHelper=new E.default(e.rowsCount,e.rowHeight,t,e.rowHeightGetter),this._didScrollStop=(0,N.default)(this._didScrollStop,200,this),this._wheelHandler=new m.default(this._onScroll,this._shouldHandleWheelX,this._shouldHandleWheelY,e.stopScrollPropagation),this._touchHandler=new v.default(this._onScroll,this._shouldHandleTouchX,this._shouldHandleTouchY,e.stopScrollPropagation),this.setState(this._calculateState(e))},componentWillUnmount:function(){this._wheelHandler=null,this._touchHandler=null},_shouldHandleTouchX:function(e){return this.props.touchScrollEnabled&&this._shouldHandleWheelX(e)},_shouldHandleTouchY:function(e){return this.props.touchScrollEnabled&&this._shouldHandleWheelY(e)},_shouldHandleWheelX:function(e){return"hidden"!==this.props.overflowX&&(e=Math.round(e),0!==e&&(e<0&&this.state.scrollX>0||e>=0&&this.state.scrollX<this.state.maxScrollX))},_shouldHandleWheelY:function(e){return"hidden"!==this.props.overflowY&&0!==e&&(e=Math.round(e),0!==e&&(e<0&&this.state.scrollY>0||e>=0&&this.state.scrollY<this.state.maxScrollY))},_reportContentHeight:function(){var e,t=this.state.scrollContentHeight,o=this.state.reservedHeight,n=t+o,i=void 0===this.props.height;e=i&&this.props.maxHeight>n?n:this.state.height>n&&this.props.ownerHeight?Math.max(n,this.props.ownerHeight):this.state.height+this.state.maxScrollY,e!==this._contentHeight&&this.props.onContentHeightChange&&this.props.onContentHeightChange(e),this._contentHeight=e},componentDidMount:function(){this._reportContentHeight()},componentWillReceiveProps:function(e){e.overflowX,e.overflowY;this.props.ownerHeight===e.ownerHeight&&this.props.scrollTop===e.scrollTop&&this.props.scrollLeft===e.scrollLeft||this._didScrollStart(),this._didScrollStop(),this.setState(this._calculateState(e,this.state))},componentDidUpdate:function(){this._reportContentHeight()},render:function(){var e,t=this.state,o=this.props,n=o.onColumnReorderEndCallback?this._onColumnReorder:null;t.useGroupHeader&&(e=s.default.createElement(T.default,{key:"group_header",isScrolling:this._isScrolling,className:(0,F.default)((0,O.default)("fixedDataTableLayout/header"),(0,O.default)("public/fixedDataTable/header")),width:t.width,height:t.groupHeaderHeight,index:0,zIndex:1,offsetTop:0,scrollLeft:t.scrollX,fixedColumns:t.groupHeaderFixedColumns,scrollableColumns:t.groupHeaderScrollableColumns,onColumnResize:this._onColumnResize,onColumnReorder:n,onColumnReorderMove:this._onColumnReorderMove}));var i=this.state.maxScrollY,r=t.maxScrollX>0&&"hidden"!==t.overflowX&&t.showScrollbarX!==!1,a=i>0&&"hidden"!==t.overflowY&&t.showScrollbarY!==!1,l=r?w.default.SIZE:0,u=t.height-l-2*B-t.footerHeight,c=t.useGroupHeader?t.groupHeaderHeight:0,f=c+t.headerHeight;u-=f;var h=0,d=null!=o.maxHeight?f+t.bodyHeight:f+u,p=d+t.footerHeight;void 0!==o.ownerHeight&&o.ownerHeight<t.height&&(h=o.ownerHeight-t.height,d=Math.min(d,o.ownerHeight-t.footerHeight-l),u=Math.max(0,d-f));var m;a&&(m=s.default.createElement(w.default,{size:u,contentSize:u+i,onScroll:this._onVerticalScroll,verticalTop:f,position:t.scrollY}));var _;if(r){var v=t.width;_=s.default.createElement(Q,{contentSize:v+t.maxScrollX,offset:h,onScroll:this._onHorizontalScroll,position:t.scrollX,size:v})}var g=s.default.createElement(C.default,{height:t.height,initialWidth:t.columnResizingData.width||0,minWidth:t.columnResizingData.minWidth||0,maxWidth:t.columnResizingData.maxWidth||Number.MAX_VALUE,visible:!!t.isColumnResizing,leftOffset:t.columnResizingData.left||0,knobHeight:t.headerHeight,initialEvent:t.columnResizingData.initialEvent,onColumnResizeEnd:o.onColumnResizeEndCallback,columnKey:t.columnResizingData.key}),y=null;t.footerHeight&&(y=s.default.createElement(T.default,{key:"footer",isScrolling:this._isScrolling,className:(0,F.default)((0,O.default)("fixedDataTableLayout/footer"),(0,O.default)("public/fixedDataTable/footer")),width:t.width,height:t.footerHeight,index:-1,zIndex:1,offsetTop:d,fixedColumns:t.footFixedColumns,scrollableColumns:t.footScrollableColumns,scrollLeft:t.scrollX}));var b,R,x=this._renderRows(f),S=s.default.createElement(T.default,{key:"header",isScrolling:this._isScrolling,className:(0,F.default)((0,O.default)("fixedDataTableLayout/header"),(0,O.default)("public/fixedDataTable/header")),width:t.width,height:t.headerHeight,index:-1,zIndex:1,offsetTop:c,scrollLeft:t.scrollX,fixedColumns:t.headFixedColumns,scrollableColumns:t.headScrollableColumns,onColumnResize:this._onColumnResize,onColumnReorder:n,onColumnReorderMove:this._onColumnReorderMove,onColumnReorderEnd:this._onColumnReorderEnd,isColumnReordering:!!t.isColumnReordering,columnReorderingData:t.columnReorderingData});return t.scrollY&&(b=s.default.createElement("div",{className:(0,F.default)((0,O.default)("fixedDataTableLayout/topShadow"),(0,O.default)("public/fixedDataTable/topShadow")),style:{top:f}})),(null!=t.ownerHeight&&t.ownerHeight<t.height&&t.scrollContentHeight+t.reservedHeight>t.ownerHeight||t.scrollY<i)&&(R=s.default.createElement("div",{className:(0,F.default)((0,O.default)("fixedDataTableLayout/bottomShadow"),(0,O.default)("public/fixedDataTable/bottomShadow")),style:{top:d}})),s.default.createElement("div",{className:(0,F.default)(this.state.className,(0,O.default)("fixedDataTableLayout/main"),(0,O.default)("public/fixedDataTable/main")),onWheel:this._wheelHandler.onWheel,onTouchStart:this._touchHandler.onTouchStart,onTouchEnd:this._touchHandler.onTouchEnd,onTouchMove:this._touchHandler.onTouchMove,onTouchCancel:this._touchHandler.onTouchCancel,style:{height:t.height,width:t.width}},s.default.createElement("div",{className:(0,O.default)("fixedDataTableLayout/rowsContainer"),style:{height:p,width:t.width}},g,e,S,x,y,b,R),m,_)},_renderRows:function(e){var t=this.state;return s.default.createElement(b.default,{isScrolling:this._isScrolling,defaultRowHeight:t.rowHeight,firstRowIndex:t.firstRowIndex,firstRowOffset:t.firstRowOffset,fixedColumns:t.bodyFixedColumns,height:t.bodyHeight,offsetTop:e,onRowClick:t.onRowClick,onRowDoubleClick:t.onRowDoubleClick,onRowMouseDown:t.onRowMouseDown,onRowMouseEnter:t.onRowMouseEnter,onRowMouseLeave:t.onRowMouseLeave,rowClassNameGetter:t.rowClassNameGetter,rowsCount:t.rowsCount,rowGetter:t.rowGetter,rowHeightGetter:t.rowHeightGetter,rowKeyGetter:t.rowKeyGetter,scrollLeft:t.scrollX,scrollableColumns:t.bodyScrollableColumns,showLastRowBorder:!0,width:t.width,rowPositionGetter:this._scrollHelper.getRowPosition,bufferRowCount:this.state.bufferRowCount})},_onColumnResize:function(e,t,o,n,i,r,a){this.setState({isColumnResizing:!0,columnResizingData:{left:t+e-o,width:o,minWidth:n,maxWidth:i,initialEvent:{clientX:a.clientX,clientY:a.clientY,preventDefault:P.default},key:r}})},_onColumnReorder:function(e,t,o,n){var i=this.state.headFixedColumns.some(function(t){return t.props.columnKey===e});this.setState({isColumnReordering:!0,columnReorderingData:{dragDistance:0,isFixed:i,scrollStart:this.state.scrollX,columnKey:e,columnWidth:t,originalLeft:o,columnsBefore:[],columnsAfter:[]}})},_onColumnReorderMove:function(e){var t=r({},this.state.columnReorderingData);t.dragDistance=e,t.columnBefore=void 0,t.columnAfter=void 0;var o=this.state.columnReorderingData.isFixed,n=this.state.scrollX;if(!o){var i=t.originalLeft-t.scrollStart+t.dragDistance,a=this.state.bodyFixedColumns.reduce(function(e,t){return e+t.props.width},0),s=this.props.width-a;i>s-J?n=Math.min(n+Z,this.state.maxScrollX):i<=J&&(n=Math.max(n-Z,0)),t.dragDistance+=this.state.scrollX-t.scrollStart}this.setState({scrollX:n,columnReorderingData:t})},_onColumnReorderEnd:function(e,t){var o=this.state.columnReorderingData.columnBefore,n=this.state.columnReorderingData.columnAfter,i=this.state.columnReorderingData.columnKey,r=this.state.columnReorderingData.cancelReorder;if(this.setState({isColumnReordering:!1,columnReorderingData:{}}),!r){this.props.onColumnReorderEndCallback({columnBefore:o,columnAfter:n,reorderColumn:i});var a=this.props.onHorizontalScroll;this.state.columnReorderingData.scrollStart!==this.state.scrollX&&a&&a(this.state.scrollX)}},_areColumnSettingsIdentical:function(e,t){if(e.length!==t.length)return!1;for(var o=0;o<e.length;++o)if(!(0,W.default)(e[o].props,t[o].props))return!1;return!0},_populateColumnsAndColumnData:function(e,t,o){var n=!1,i=!1;o&&o.columns&&(n=this._areColumnSettingsIdentical(e,o.columns)),o&&o.columnGroups&&t&&(i=this._areColumnSettingsIdentical(t,o.columnGroups));var r={};if(n)r.bodyFixedColumns=o.bodyFixedColumns,r.bodyScrollableColumns=o.bodyScrollableColumns,r.headFixedColumns=o.headFixedColumns,r.headScrollableColumns=o.headScrollableColumns,r.footFixedColumns=o.footFixedColumns,r.footScrollableColumns=o.footScrollableColumns;else{var a=this._splitColumnTypes(e);r.bodyFixedColumns=a.fixed,r.bodyScrollableColumns=a.scrollable;var s=this._splitColumnTypes(this._selectColumnElement(q,e));r.headFixedColumns=s.fixed,r.headScrollableColumns=s.scrollable;var l=this._splitColumnTypes(this._selectColumnElement(U,e));r.footFixedColumns=l.fixed,r.footScrollableColumns=l.scrollable}if(i)r.groupHeaderFixedColumns=o.groupHeaderFixedColumns,r.groupHeaderScrollableColumns=o.groupHeaderScrollableColumns;else if(t){var u=this._splitColumnTypes(this._selectColumnElement(q,t));r.groupHeaderFixedColumns=u.fixed,r.groupHeaderScrollableColumns=u.scrollable}return r},_calculateState:function(e,t){var o=this;(0,A.default)(void 0!==e.height||void 0!==e.maxHeight,"You must set either a height or a maxHeight");var n=[];V.forEach(e.children,function(e,t){null!=e&&((0,A.default)(e.type.__TableColumnGroup__||e.type.__TableColumn__,"child type should be <FixedDataTableColumn /> or <FixedDataTableColumnGroup />"),n.push(e))});var a=!1;n.length&&n[0].type.__TableColumnGroup__&&(a=!0);var s,l=t&&t.firstRowIndex||0,u=t&&t.firstRowOffset||0,c=t?t.scrollY:0,f=t?t.scrollX:0,h=t?t.scrollLeft:0;void 0!==e.scrollLeft&&e.scrollLeft!==h&&(f=e.scrollLeft);var d=a?e.groupHeaderHeight:0;if(!t||e.rowsCount===t.rowsCount&&e.rowHeight===t.rowHeight&&e.height===t.height)t&&e.rowHeightGetter!==t.rowHeightGetter&&this._scrollHelper.setRowHeightGetter(e.rowHeightGetter);else{var p=(void 0===e.height?e.maxHeight:e.height)-(e.headerHeight||0)-(e.footerHeight||0)-(e.groupHeaderHeight||0),m=this._scrollHelper._viewportHeight;this._scrollHelper=new E.default(e.rowsCount,e.rowHeight,p,e.rowHeightGetter),s=this._scrollHelper.scrollToRow(l,u),l=s.index,u=s.offset,c=s.position}var _=t?t.scrollToRow:void 0;null==e.scrollToRow||e.scrollToRow===_&&p===m||(s=this._scrollHelper.scrollRowIntoView(e.scrollToRow),l=s.index,u=s.offset,c=s.position);var v=t?t.scrollTop:void 0;null!=e.scrollTop&&e.scrollTop!==v&&(s=this._scrollHelper.scrollTo(e.scrollTop),l=s.index,u=s.offset,c=s.position),[].concat(i(Array(e.rowsCount).keys())).forEach(function(e){o._scrollHelper._updateRowHeight(e)});var g;g=e.isColumnResizing?t&&t.columnResizingData:G;var y,b;if(a){var R=M.default.adjustColumnGroupWidths(n,e.width);y=R.columns,b=R.columnGroups}else y=M.default.adjustColumnWidths(n,e.width);var C=this._populateColumnsAndColumnData(y,b,t),x=t?t.scrollToColumn:void 0;if(null!==e.scrollToColumn&&e.scrollToColumn!==x){var T=C.bodyFixedColumns.length;if(e.scrollToColumn>=T){var S,D,H=0;for(S=0;S<C.bodyFixedColumns.length;++S)D=C.bodyFixedColumns[S],H+=D.props.width;var O=Math.min(e.scrollToColumn-T,C.bodyScrollableColumns.length-1),k=0;for(S=0;S<O;++S)D=C.bodyScrollableColumns[S],k+=D.props.width;var N=e.width-H,I=C.bodyScrollableColumns[O].props.width,P=k+I-N;f<P&&(f=P),f>k&&(f=k)}}var z=void 0===e.height,L=Math.round(z?e.maxHeight:e.height),F=e.footerHeight+e.headerHeight+d+2*B,Y=L-F,W=this._scrollHelper.getContentHeight(),j=W+F,X=M.default.getTotalWidth(y),q=X>e.width&&"hidden"!==e.overflowX&&e.showScrollbarX!==!1;q&&(Y-=w.default.SIZE,j+=w.default.SIZE,F+=w.default.SIZE);var U=Math.max(0,X-e.width),K=Math.max(0,W-Y);f=Math.min(f,U),c=Math.min(c,K),K||(z&&(L=j),Y=j-F),this._scrollHelper.setViewportHeight(Y);var Z=Math.abs(u-this._scrollHelper.getRowPosition(l));Z!==c&&(Z=K,s=this._scrollHelper.scrollTo(Z),l=s.index,u=s.offset,c=s.position);var J=r({isColumnResizing:t&&t.isColumnResizing},C,e,{columns:y,columnGroups:b,columnResizingData:g,firstRowIndex:l,firstRowOffset:u,horizontalScrollbarVisible:q,maxScrollX:U,maxScrollY:K,reservedHeight:F,scrollContentHeight:W,scrollX:f,scrollY:c,bodyHeight:Y,height:L,groupHeaderHeight:d,useGroupHeader:a});return J},_selectColumnElement:function(e,t){for(var o=[],n=0;n<t.length;++n){var i=t[n];o.push(s.default.cloneElement(i,{cell:e?i.props[e]:i.props[K]}))}return o},_splitColumnTypes:function(e){for(var t=[],o=[],n=0;n<e.length;++n)e[n].props.fixed?t.push(e[n]):o.push(e[n]);return{fixed:t,scrollable:o}},_onScroll:function(e,t){this._isScrolling||this._didScrollStart();var o=this.state.scrollX;if(Math.abs(t)>Math.abs(e)&&"hidden"!==this.props.overflowY){var n=this._scrollHelper.scrollBy(Math.round(t)),i=this.props.onVerticalScroll;if(!i||i(n.position)){var r=Math.max(0,n.contentHeight-this.state.bodyHeight);this.setState({firstRowIndex:n.index,firstRowOffset:n.offset,scrollY:n.position,scrollContentHeight:n.contentHeight,maxScrollY:r})}}else if(e&&"hidden"!==this.props.overflowX){o+=e,o=o<0?0:o,o=o>this.state.maxScrollX?this.state.maxScrollX:o;var a=this.props.onHorizontalScroll;a&&!a(o)||this.setState({scrollX:o})}this._didScrollStop()},_onHorizontalScroll:function(e){if(e!==this.state.scrollX){this._isScrolling||this._didScrollStart();var t=this.props.onHorizontalScroll;t&&!t(e)||this.setState({scrollX:e}),this._didScrollStop()}},_onVerticalScroll:function(e){if(e!==this.state.scrollY){this._isScrolling||this._didScrollStart();var t=this._scrollHelper.scrollTo(Math.round(e)),o=this.props.onVerticalScroll;o&&!o(t.position)||(this.setState({firstRowIndex:t.index,firstRowOffset:t.offset,scrollY:t.position,scrollContentHeight:t.contentHeight}),this._didScrollStop())}},_didScrollStart:function(){this._isScrolling||(this._isScrolling=!0,this.props.onScrollStart&&this.props.onScrollStart(this.state.scrollX,this.state.scrollY,this.state.firstRowIndex))},_didScrollStop:function(){this._isScrolling&&(this._isScrolling=!1,this.setState({redraw:!0}),this.props.onScrollEnd&&this.props.onScrollEnd(this.state.scrollX,this.state.scrollY,this.state.firstRowIndex))}}),Q=(0,u.default)({displayName:"HorizontalScrollbar",mixins:[d.default],propTypes:{contentSize:f.default.number.isRequired,offset:f.default.number.isRequired,onScroll:f.default.func.isRequired,position:f.default.number.isRequired,size:f.default.number.isRequired},componentWillMount:function(){this._initialRender=!0},componentDidMount:function(){this._initialRender=!1},render:function(){var e={height:w.default.SIZE,width:this.props.size},t={height:w.default.SIZE,position:"absolute",overflow:"hidden",width:this.props.size};return(0,X.default)(t,0,this.props.offset,this._initialRender),s.default.createElement("div",{className:(0,F.default)((0,O.default)("fixedDataTableLayout/horizontalScrollbar"),(0,O.default)("public/fixedDataTable/horizontalScrollbar")),style:e},s.default.createElement("div",{style:t},s.default.createElement(w.default,r({},this.props,{isOpaque:!0,orientation:"horizontal",offset:void 0}))))}});e.exports=$},function(e,t,o){"use strict";e.exports=o(30)},function(t,o){t.exports=e},function(e,t,o){"use strict";var n=o(30),i=o(32);if("undefined"==typeof n)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 r=(new n.Component).updater;e.exports=i(n.Component,n.isValidElement,r)},function(e,t,o){(function(t){"use strict";function n(e){return e}function i(e,o,i){function f(e,o,n){for(var i in o)o.hasOwnProperty(i)&&"production"!==t.env.NODE_ENV&&l("function"==typeof o[i],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",u[n],i)}function h(e,t){var o=R.hasOwnProperty(t)?R[t]:null;S.hasOwnProperty(t)&&s("OVERRIDE_BASE"===o,"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"===o||"DEFINE_MANY_MERGED"===o,"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,n){if(n){s("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),s(!o(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var i=e.prototype,r=i.__reactAutoBindPairs;n.hasOwnProperty(c)&&C.mixins(e,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==c){var u=n[a],f=i.hasOwnProperty(a);if(h(f,a),C.hasOwnProperty(a))C[a](e,u);else{var d=R.hasOwnProperty(a),p="function"==typeof u,m=p&&!d&&!f&&n.autobind!==!1;if(m)r.push(a,u),i[a]=u;else if(f){var g=R[a];s(d&&("DEFINE_MANY_MERGED"===g||"DEFINE_MANY"===g),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",g,a),"DEFINE_MANY_MERGED"===g?i[a]=_(i[a],u):"DEFINE_MANY"===g&&(i[a]=v(i[a],u))}else i[a]=u,"production"!==t.env.NODE_ENV&&"function"==typeof u&&n.displayName&&(i[a].displayName=n.displayName+"_"+a)}}}else if("production"!==t.env.NODE_ENV){var w=typeof n,y="object"===w&&null!==n;"production"!==t.env.NODE_ENV&&l(y,"%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===n?null:w)}}function p(e,t){if(t)for(var o in t){var n=t[o];if(t.hasOwnProperty(o)){var i=o in C;s(!i,'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.',o);var r=o in e;s(!r,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",o),e[o]=n}}}function m(e,t){s(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var o in t)t.hasOwnProperty(o)&&(s(void 0===e[o],"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.",o),e[o]=t[o]);return e}function _(e,t){return function(){var o=e.apply(this,arguments),n=t.apply(this,arguments);if(null==o)return n;if(null==n)return o;var i={};return m(i,o),m(i,n),i}}function v(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function g(e,o){var n=o.bind(e);if("production"!==t.env.NODE_ENV){n.__reactBoundContext=e,n.__reactBoundMethod=o,n.__reactBoundArguments=null;var i=e.constructor.displayName,r=n.bind;n.bind=function(a){for(var s=arguments.length,u=Array(s>1?s-1:0),c=1;c<s;c++)u[c-1]=arguments[c];if(a!==e&&null!==a)"production"!==t.env.NODE_ENV&&l(!1,"bind(): React component methods may only be bound to the component instance. See %s",i);else if(!u.length)return"production"!==t.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",i),n;var f=r.apply(n,arguments);return f.__reactBoundContext=e,f.__reactBoundMethod=o,f.__reactBoundArguments=u,f}}return n}function w(e){for(var t=e.__reactAutoBindPairs,o=0;o<t.length;o+=2){var n=t[o],i=t[o+1];e[n]=g(e,i)}}function y(e){var o=n(function(e,n,r){"production"!==t.env.NODE_ENV&&l(this instanceof o,"Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory"),this.__reactAutoBindPairs.length&&w(this),this.props=e,this.context=n,this.refs=a,this.updater=r||i,this.state=null;var u=this.getInitialState?this.getInitialState():null;"production"!==t.env.NODE_ENV&&void 0===u&&this.getInitialState._isMockFunction&&(u=null),s("object"==typeof u&&!Array.isArray(u),"%s.getInitialState(): must return an object or null",o.displayName||"ReactCompositeComponent"),this.state=u});o.prototype=new E,o.prototype.constructor=o,o.prototype.__reactAutoBindPairs=[],b.forEach(d.bind(null,o)),d(o,x),d(o,e),d(o,T),o.getDefaultProps&&(o.defaultProps=o.getDefaultProps()),"production"!==t.env.NODE_ENV&&(o.getDefaultProps&&(o.getDefaultProps.isReactClassApproved={}),o.prototype.getInitialState&&(o.prototype.getInitialState.isReactClassApproved={})),s(o.prototype.render,"createClass(...): Class specification must implement a `render` method."),"production"!==t.env.NODE_ENV&&(l(!o.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(!o.prototype.componentWillRecieveProps,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",e.displayName||"A component"));for(var r in R)o.prototype[r]||(o.prototype[r]=null);return o}var b=[],R={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"},C={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var o=0;o<t.length;o++)d(e,t[o])},childContextTypes:function(e,o){"production"!==t.env.NODE_ENV&&f(e,o,"childContext"),e.childContextTypes=r({},e.childContextTypes,o)},contextTypes:function(e,o){"production"!==t.env.NODE_ENV&&f(e,o,"context"),e.contextTypes=r({},e.contextTypes,o)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=_(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,o){"production"!==t.env.NODE_ENV&&f(e,o,"prop"),e.propTypes=r({},e.propTypes,o)},statics:function(e,t){p(e,t)},autobind:function(){}},x={componentDidMount:function(){this.__isMounted=!0}},T={componentWillUnmount:function(){this.__isMounted=!1}},S={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return"production"!==t.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}},E=function(){};return r(E.prototype,e.prototype,S),y}var r=o(34),a=o(35),s=o(36);if("production"!==t.env.NODE_ENV)var l=o(37);var u,c="mixins";u="production"!==t.env.NODE_ENV?{prop:"prop",context:"context",childContext:"child context"}:{},e.exports=i}).call(t,o(33))},function(e,t){function o(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===o||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function r(e){if(f===clearTimeout)return clearTimeout(e);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?p=d.concat(p):_=-1,p.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=p.length;t;){for(d=p,p=[];++_<t;)d&&d[_].run();_=-1,t=p.length}d=null,m=!1,r(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,f,h=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:o}catch(e){c=o}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(e){f=n}}();var d,p=[],m=!1,_=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];p.push(new l(e,t)),1!==p.length||m||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t){"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 n(){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={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}var i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=n()?Object.assign:function(e,t){for(var n,s,l=o(e),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var c in n)r.call(n,c)&&(l[c]=n[c]);if(i){s=i(n);for(var f=0;f<s.length;f++)a.call(n,s[f])&&(l[s[f]]=n[s[f]])}}return l}},function(e,t,o){(function(t){"use strict";var o={};"production"!==t.env.NODE_ENV&&Object.freeze(o),e.exports=o}).call(t,o(33))},function(e,t,o){(function(t){"use strict";function o(e,t,o,i,r,a,s,l){if(n(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[o,i,r,a,s,l],f=0;u=new Error(t.replace(/%s/g,function(){return c[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var n=function(e){};"production"!==t.env.NODE_ENV&&(n=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=o}).call(t,o(33))},function(e,t,o){(function(t){"use strict";var n=o(38),i=n;"production"!==t.env.NODE_ENV&&!function(){var e=function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];var i=0,r="Warning: "+e.replace(/%s/g,function(){return o[i++]});"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}};i=function(t,o){if(void 0===o)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==o.indexOf("Failed Composite propType: ")&&!t){for(var n=arguments.length,i=Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];e.apply(void 0,[o].concat(i))}}}(),e.exports=i}).call(t,o(33))},function(e,t){"use strict";function o(e){return function(){return e}}var n=function(){};n.thatReturns=o,n.thatReturnsFalse=o(!1),n.thatReturnsTrue=o(!0),n.thatReturnsNull=o(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,o){(function(t){if("production"!==t.env.NODE_ENV){var n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},r=!0;e.exports=o(40)(i,r)}else e.exports=o(43)()}).call(t,o(33))},function(e,t,o){(function(t){"use strict";var n=o(38),i=o(36),r=o(37),a=o(41),s=o(42);e.exports=function(e,o){function l(e){var t=e&&(D&&e[D]||e[M]);if("function"==typeof t)return t}function u(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function c(e){this.message=e,this.stack=""}function f(e){function n(n,u,f,h,d,p,m){if(h=h||H,p=p||f,m!==a)if(o)i(!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"!==t.env.NODE_ENV&&"undefined"!=typeof console){var _=h+":"+f;!s[_]&&l<3&&(r(!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.",p,h), s[_]=!0,l++)}return null==u[f]?n?new c(null===u[f]?"The "+d+" `"+p+"` is marked as required "+("in `"+h+"`, but its value is `null`."):"The "+d+" `"+p+"` is marked as required in "+("`"+h+"`, but its value is `undefined`.")):null:e(u,f,h,d,p)}if("production"!==t.env.NODE_ENV)var s={},l=0;var u=n.bind(null,!1);return u.isRequired=n.bind(null,!0),u}function h(e){function t(t,o,n,i,r,a){var s=t[o],l=x(s);if(l!==e){var u=T(s);return new c("Invalid "+i+" `"+r+"` of type "+("`"+u+"` supplied to `"+n+"`, expected ")+("`"+e+"`."))}return null}return f(t)}function d(){return f(n.thatReturnsNull)}function p(e){function t(t,o,n,i,r){if("function"!=typeof e)return new c("Property `"+r+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var s=t[o];if(!Array.isArray(s)){var l=x(s);return new c("Invalid "+i+" `"+r+"` of type "+("`"+l+"` supplied to `"+n+"`, expected an array."))}for(var u=0;u<s.length;u++){var f=e(s,u,n,i,r+"["+u+"]",a);if(f instanceof Error)return f}return null}return f(t)}function m(){function t(t,o,n,i,r){var a=t[o];if(!e(a)){var s=x(a);return new c("Invalid "+i+" `"+r+"` of type "+("`"+s+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return f(t)}function _(e){function t(t,o,n,i,r){if(!(t[o]instanceof e)){var a=e.name||H,s=E(t[o]);return new c("Invalid "+i+" `"+r+"` of type "+("`"+s+"` supplied to `"+n+"`, expected ")+("instance of `"+a+"`."))}return null}return f(t)}function v(e){function o(t,o,n,i,r){for(var a=t[o],s=0;s<e.length;s++)if(u(a,e[s]))return null;var l=JSON.stringify(e);return new c("Invalid "+i+" `"+r+"` of value `"+a+"` "+("supplied to `"+n+"`, expected one of "+l+"."))}return Array.isArray(e)?f(o):("production"!==t.env.NODE_ENV?r(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,n.thatReturnsNull)}function g(e){function t(t,o,n,i,r){if("function"!=typeof e)return new c("Property `"+r+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var s=t[o],l=x(s);if("object"!==l)return new c("Invalid "+i+" `"+r+"` of type "+("`"+l+"` supplied to `"+n+"`, expected an object."));for(var u in s)if(s.hasOwnProperty(u)){var f=e(s,u,n,i,r+"."+u,a);if(f instanceof Error)return f}return null}return f(t)}function w(e){function o(t,o,n,i,r){for(var s=0;s<e.length;s++){var l=e[s];if(null==l(t,o,n,i,r,a))return null}return new c("Invalid "+i+" `"+r+"` supplied to "+("`"+n+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?r(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,n.thatReturnsNull;for(var i=0;i<e.length;i++){var s=e[i];if("function"!=typeof s)return r(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",S(s),i),n.thatReturnsNull}return f(o)}function y(){function e(e,t,o,n,i){return R(e[t])?null:new c("Invalid "+n+" `"+i+"` supplied to "+("`"+o+"`, expected a ReactNode."))}return f(e)}function b(e){function t(t,o,n,i,r){var s=t[o],l=x(s);if("object"!==l)return new c("Invalid "+i+" `"+r+"` of type `"+l+"` "+("supplied to `"+n+"`, expected `object`."));for(var u in e){var f=e[u];if(f){var h=f(s,u,n,i,r+"."+u,a);if(h)return h}}return null}return f(t)}function R(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(R);if(null===t||e(t))return!0;var o=l(t);if(!o)return!1;var n,i=o.call(t);if(o!==t.entries){for(;!(n=i.next()).done;)if(!R(n.value))return!1}else for(;!(n=i.next()).done;){var r=n.value;if(r&&!R(r[1]))return!1}return!0;default:return!1}}function C(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function x(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":C(t,e)?"symbol":t}function T(e){if("undefined"==typeof e||null===e)return""+e;var t=x(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function S(e){var t=T(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function E(e){return e.constructor&&e.constructor.name?e.constructor.name:H}var D="function"==typeof Symbol&&Symbol.iterator,M="@@iterator",H="<<anonymous>>",O={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:d(),arrayOf:p,element:m(),instanceOf:_,node:y(),objectOf:g,oneOf:v,oneOfType:w,shape:b};return c.prototype=Error.prototype,O.checkPropTypes=s,O.PropTypes=O,O}}).call(t,o(33))},function(e,t){"use strict";var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=o},function(e,t,o){(function(t){"use strict";function n(e,o,n,l,u){if("production"!==t.env.NODE_ENV)for(var c in e)if(e.hasOwnProperty(c)){var f;try{i("function"==typeof e[c],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",l||"React class",n,c),f=e[c](o,c,l,n,null,a)}catch(e){f=e}if(r(!f||f 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",n,c,typeof f),f instanceof Error&&!(f.message in s)){s[f.message]=!0;var h=u?u():"";r(!1,"Failed %s type: %s%s",n,f.message,null!=h?h:"")}}}if("production"!==t.env.NODE_ENV)var i=o(36),r=o(37),a=o(41),s={};e.exports=n}).call(t,o(33))},function(e,t,o){"use strict";var n=o(38),i=o(36),r=o(41);e.exports=function(){function e(e,t,o,n,a,s){s!==r&&i(!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 o={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 o.checkPropTypes=n,o.PropTypes=o,o}},function(e,t){"use strict";function o(e,t){if(e===t)return!0;var o;for(o in e)if(e.hasOwnProperty(o)&&(!t.hasOwnProperty(o)||e[o]!==t[o]))return!1;for(o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return!1;return!0}var n={shouldComponentUpdate:function(e,t){return!o(this.props,e)||!o(this.state,t)}};e.exports=n},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(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 o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o(46),s=n(a),l=o(47),u=n(l),c=o(51),f=n(c),h=function(){function e(t,o,n,r){i(this,e),this._animationFrameID=null,this._deltaX=0,this._deltaY=0,this._didWheel=this._didWheel.bind(this),"function"!=typeof o&&(o=o?s.default.thatReturnsTrue:s.default.thatReturnsFalse),"function"!=typeof n&&(n=n?s.default.thatReturnsTrue:s.default.thatReturnsFalse),"function"!=typeof r&&(r=r?s.default.thatReturnsTrue:s.default.thatReturnsFalse),this._handleScrollX=o,this._handleScrollY=n,this._stopPropagation=r,this._onWheelCallback=t,this.onWheel=this.onWheel.bind(this)}return r(e,[{key:"onWheel",value:function(e){var t=(0,u.default)(e),o=this._deltaX+t.pixelX,n=this._deltaY+t.pixelY,i=this._handleScrollX(o,n),r=this._handleScrollY(n,o);if(i||r){this._deltaX+=i?t.pixelX:0,this._deltaY+=r?t.pixelY:0,e.preventDefault();var a;0===this._deltaX&&0===this._deltaY||(this._stopPropagation()&&e.stopPropagation(),a=!0),a===!0&&null===this._animationFrameID&&(this._animationFrameID=(0,f.default)(this._didWheel))}}},{key:"_didWheel",value:function(){this._animationFrameID=null,this._onWheelCallback(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}}]),e}();e.exports=h},function(e,t){"use strict";function o(e){return function(){return e}}function n(){}n.thatReturns=o,n.thatReturnsFalse=o(!1),n.thatReturnsTrue=o(!0),n.thatReturnsNull=o(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=0,o=0,n=0,i=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),n=t*u,i=o*u,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||i)&&e.deltaMode&&(1==e.deltaMode?(n*=c,i*=c):(n*=f,i*=f)),n&&!t&&(t=n<1?-1:1),i&&!o&&(o=i<1?-1:1),{spinX:t,spinY:o,pixelX:n,pixelY:i}}var r=o(48),a=n(r),s=o(49),l=n(s),u=10,c=40,f=800;i.getEventType=function(){return a.default.firefox()?"DOMMouseScroll":(0,l.default)("wheel")?"wheel":"mousewheel"},e.exports=i},function(e,t){"use strict";function o(){if(!g){g=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(p=/\b(iPhone|iP[ao]d)/.exec(e),m=/\b(iP[ao]d)/.exec(e),h=/Android/i.exec(e),_=/FBAN\/\w+;/i.exec(e),v=/Mobile/i.exec(e),d=!!/Win64/.exec(e),t){n=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,n&&document&&document.documentMode&&(n=document.documentMode);var w=/(?:Trident\/(\d+.\d+))/.exec(e);l=w?parseFloat(w[1])+4:n,i=t[2]?parseFloat(t[2]):NaN,r=t[3]?parseFloat(t[3]):NaN,a=t[4]?parseFloat(t[4]):NaN,a?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),s=t&&t[1]?parseFloat(t[1]):NaN):s=NaN}else n=i=r=s=a=NaN;if(o){if(o[1]){var y=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);u=!y||parseFloat(y[1].replace("_","."))}else u=!1;c=!!o[2],f=!!o[3]}else u=c=f=!1}}var n,i,r,a,s,l,u,c,f,h,d,p,m,_,v,g=!1,w={ie:function(){return o()||n},ieCompatibilityMode:function(){return o()||l>n},ie64:function(){return w.ie()&&d},firefox:function(){return o()||i},opera:function(){return o()||r},webkit:function(){return o()||a},safari:function(){return w.webkit()},chrome:function(){return o()||s},windows:function(){return o()||c},osx:function(){return o()||u},linux:function(){return o()||f},iphone:function(){return o()||p},mobile:function(){return o()||p||m||h||v},nativeApp:function(){return o()||_},android:function(){return o()||h},ipad:function(){return o()||m}};e.exports=w},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!s.default.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,n=o in document;if(!n){var i=document.createElement("div");i.setAttribute(o,"return;"),n="function"==typeof i[o]}return!n&&r&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}var r,a=o(50),s=n(a);s.default.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=i},function(e,t){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen,isInWorker:!o};e.exports=n},function(e,t,o){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i=o(46),r=n(i),a=o(52),s=n(a),l=0,u=s.default||function(e){var o=Date.now(),n=Math.max(0,16-(o-l));return l=o+n,t.setTimeout(function(){e(Date.now())},n)};u(r.default),e.exports=u}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";var o=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame;e.exports=o}).call(t,function(){return this}())},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(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 o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o(46),s=n(a),l=o(51),u=n(l),c=1.6,f=1.6,h=325,d=100,p=function(){function e(t,o,n,r){i(this,e),this._dragAnimationId=null,this._trackerId=null,this._deltaX=0,this._deltaY=0,this._lastTouchX=0,this._lastTouchY=0,this._velocityX=0,this._velocityY=0,this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=Date.now(),this._autoScrollTimestamp=Date.now(),"function"!=typeof o&&(o=o?s.default.thatReturnsTrue:s.default.thatReturnsFalse),"function"!=typeof n&&(n=n?s.default.thatReturnsTrue:s.default.thatReturnsFalse),"function"!=typeof r&&(r=r?s.default.thatReturnsTrue:s.default.thatReturnsFalse),this._handleScrollX=o,this._handleScrollY=n,this._stopPropagation=r,this._onTouchScrollCallback=t,this._didTouchMove=this._didTouchMove.bind(this),this._track=this._track.bind(this),this._autoScroll=this._autoScroll.bind(this),this._startAutoScroll=this._startAutoScroll.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this)}return r(e,[{key:"onTouchStart",value:function(e){this._lastTouchX=e.touches[0].pageX,this._lastTouchY=e.touches[0].pageY,this._velocityX=0,this._velocityY=0,this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=Date.now(),clearInterval(this._trackerId),this._trackerId=setInterval(this._track,d),this._stopPropagation()&&e.stopPropagation()}},{key:"onTouchEnd",value:function(e){clearInterval(this._trackerId),this._trackerId=null,(0,u.default)(this._startAutoScroll),this._stopPropagation()&&e.stopPropagation()}},{key:"onTouchCancel",value:function(e){clearInterval(this._trackerId),this._trackerId=null,this._stopPropagation()&&e.stopPropagation()}},{key:"onTouchMove",value:function(e){var t=e.touches[0].pageX,o=e.touches[0].pageY;this._deltaX=c*(this._lastTouchX-t),this._deltaY=c*(this._lastTouchY-o);var n=this._handleScrollX(this._deltaX,this._deltaY),i=this._handleScrollY(this._deltaY,this._deltaX);if(n||i){n?this._lastTouchX=t:this._deltaX=0,i?this._lastTouchY=o:this._deltaY=0,e.preventDefault();var r=!1;(Math.abs(this._deltaX)>2||Math.abs(this._deltaY)>2)&&(this._stopPropagation()&&e.stopPropagation(),r=!0),r===!0&&null===this._dragAnimationId&&(this._dragAnimationId=(0,u.default)(this._didTouchMove))}}},{key:"_didTouchMove",value:function(){this._dragAnimationId=null,this._onTouchScrollCallback(this._deltaX,this._deltaY),this._accumulatedDeltaX+=this._deltaX,this._accumulatedDeltaY+=this._deltaY,this._deltaX=0,this._deltaY=0}},{key:"_track",value:function(){var e=Date.now(),t=e-this._lastFrameTimestamp,o=this._velocityX,n=this._velocityY,i=.8;t<d&&(i*=t/d),0===o&&0===n&&(i=1),this._velocityX=i*(d*this._accumulatedDeltaX/(1+t)),i<1&&(this._velocityX+=(1-i)*o),this._velocityY=i*(d*this._accumulatedDeltaY/(1+t)),i<1&&(this._velocityY+=(1-i)*n),this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=e}},{key:"_startAutoScroll",value:function(){this._autoScrollTimestamp=Date.now(),(this._deltaX>0||this.deltaY>0)&&this._didTouchMove(),this._track(),this._autoScroll()}},{key:"_autoScroll",value:function(){var e=Date.now()-this._autoScrollTimestamp,t=f*Math.exp(-e/h),o=t*this._velocityX,n=t*this._velocityY;(Math.abs(o)<=5||!this._handleScrollX(o,n))&&(o=0),(Math.abs(n)<=5||!this._handleScrollY(n,o))&&(n=0),0===o&&0===n||(this._onTouchScrollCallback(o,n),(0,u.default)(this._autoScroll))}}]),e}();e.exports=p},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i=o(55),r=n(i),a=o(58),s=n(a),l=o(29),u=n(l),c=o(31),f=n(c),h=o(39),d=n(h),p=o(59),m=n(p),_=o(44),v=n(_),g=o(45),w=n(g),y=o(61),b=n(y),R=o(62),C=n(R),x=o(46),T=n(x),S=o(63),E=n(S),D={position:0,scrollable:!1},M=parseInt((0,b.default)("scrollbar-face-margin"),10),H=2*M,O=30,k=40,N=null,I=(0,f.default)({displayName:"Scrollbar",mixins:[v.default],propTypes:{contentSize:d.default.number.isRequired,defaultPosition:d.default.number,isOpaque:d.default.bool,orientation:d.default.oneOf(["vertical","horizontal"]),onScroll:d.default.func,position:d.default.number,size:d.default.number.isRequired,trackColor:d.default.oneOf(["gray"]),zIndex:d.default.number,verticalTop:d.default.number},getInitialState:function(){var e=this.props;return this._calculateState(e.position||e.defaultPosition||0,e.size,e.contentSize,e.orientation)},componentWillReceiveProps:function(e){var t=e.position;void 0===t?this._setNextState(this._calculateState(this.state.position,e.size,e.contentSize,e.orientation)):this._setNextState(this._calculateState(t,e.size,e.contentSize,e.orientation),e)},getDefaultProps:function(){return{defaultPosition:0,isOpaque:!1,onScroll:T.default,orientation:"vertical",zIndex:99}},render:function(){if(!this.state.scrollable)return null;var e,t,o=this.props.size,n=this.state.isHorizontal,i=!n,r=this.state.focused||this.state.isDragging,a=this.state.faceSize,s=this.props.isOpaque,l=this.props.verticalTop||0,c=(0,C.default)({"ScrollbarLayout/main":!0,"ScrollbarLayout/mainVertical":i,"ScrollbarLayout/mainHorizontal":n,"public/Scrollbar/main":!0,"public/Scrollbar/mainOpaque":s,"public/Scrollbar/mainActive":r}),f=(0,C.de