Simon Egersand
2018-02-09 94dde5590a472f9a671578ffd4607cd53a94b322
commit | author | age
d76f7b 1 /*
94dde5 2 react-datetime v2.12.0
be9654 3 https://github.com/YouCanBookMe/react-datetime
SE 4 MIT: https://github.com/YouCanBookMe/react-datetime/raw/master/LICENSE
d76f7b 5 */
M 6 (function webpackUniversalModuleDefinition(root, factory) {
7     if(typeof exports === 'object' && typeof module === 'object')
be31e2 8         module.exports = factory(require("React"), require("moment"), require("ReactDOM"));
d76f7b 9     else if(typeof define === 'function' && define.amd)
be31e2 10         define(["React", "moment", "ReactDOM"], factory);
d76f7b 11     else if(typeof exports === 'object')
be31e2 12         exports["Datetime"] = factory(require("React"), require("moment"), require("ReactDOM"));
d76f7b 13     else
be31e2 14         root["Datetime"] = factory(root["React"], root["moment"], root["ReactDOM"]);
94dde5 15 })(this, function(__WEBPACK_EXTERNAL_MODULE_13__, __WEBPACK_EXTERNAL_MODULE_17__, __WEBPACK_EXTERNAL_MODULE_21__) {
d76f7b 16 return /******/ (function(modules) { // webpackBootstrap
M 17 /******/     // The module cache
18 /******/     var installedModules = {};
19
20 /******/     // The require function
21 /******/     function __webpack_require__(moduleId) {
22
23 /******/         // Check if module is in cache
24 /******/         if(installedModules[moduleId])
25 /******/             return installedModules[moduleId].exports;
26
27 /******/         // Create a new module (and put it into the cache)
28 /******/         var module = installedModules[moduleId] = {
29 /******/             exports: {},
30 /******/             id: moduleId,
31 /******/             loaded: false
32 /******/         };
33
34 /******/         // Execute the module function
35 /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
36
37 /******/         // Flag the module as loaded
38 /******/         module.loaded = true;
39
40 /******/         // Return the exports of the module
41 /******/         return module.exports;
42 /******/     }
43
44
45 /******/     // expose the modules object (__webpack_modules__)
46 /******/     __webpack_require__.m = modules;
47
48 /******/     // expose the module cache
49 /******/     __webpack_require__.c = installedModules;
50
51 /******/     // __webpack_public_path__
52 /******/     __webpack_require__.p = "";
53
54 /******/     // Load entry module and return exports
55 /******/     return __webpack_require__(0);
56 /******/ })
57 /************************************************************************/
58 /******/ ([
59 /* 0 */
7392ed 60 /***/ (function(module, exports, __webpack_require__) {
d76f7b 61
be9654 62     'use strict';
SE 63
64     var assign = __webpack_require__(1),
833531 65         PropTypes = __webpack_require__(2),
94dde5 66         createClass = __webpack_require__(12),
SE 67         moment = __webpack_require__(17),
68         React = __webpack_require__(13),
69         CalendarContainer = __webpack_require__(18)
8f6f33 70         ;
be9654 71
be31e2 72     var TYPES = PropTypes;
JB 73     var Datetime = createClass({
be9654 74         propTypes: {
SE 75             // value: TYPES.object | TYPES.string,
76             // defaultValue: TYPES.object | TYPES.string,
94dde5 77             // viewDate: TYPES.object | TYPES.string,
be9654 78             onFocus: TYPES.func,
SE 79             onBlur: TYPES.func,
80             onChange: TYPES.func,
833531 81             onViewModeChange: TYPES.func,
be9654 82             locale: TYPES.string,
SE 83             utc: TYPES.bool,
84             input: TYPES.bool,
85             // dateFormat: TYPES.string | TYPES.bool,
86             // timeFormat: TYPES.string | TYPES.bool,
87             inputProps: TYPES.object,
88             timeConstraints: TYPES.object,
89             viewMode: TYPES.oneOf(['years', 'months', 'days', 'time']),
90             isValidDate: TYPES.func,
91             open: TYPES.bool,
92             strictParsing: TYPES.bool,
93             closeOnSelect: TYPES.bool,
94             closeOnTab: TYPES.bool
95         },
96
97         getInitialState: function() {
98             var state = this.getStateFromProps( this.props );
99
100             if ( state.open === undefined )
101                 state.open = !this.props.input;
102
103             state.currentView = this.props.dateFormat ? (this.props.viewMode || state.updateOn || 'days') : 'time';
104
105             return state;
106         },
107
94dde5 108         parseDate: function (date, formats) {
SE 109             var parsedDate;
110
111             if (date && typeof date === 'string')
112                 parsedDate = this.localMoment(date, formats.datetime);
113             else if (date)
114                 parsedDate = this.localMoment(date);
115
116             if (parsedDate && !parsedDate.isValid())
117                 parsedDate = null;
118
119             return parsedDate;
120         },
121
be9654 122         getStateFromProps: function( props ) {
SE 123             var formats = this.getFormats( props ),
124                 date = props.value || props.defaultValue,
125                 selectedDate, viewDate, updateOn, inputValue
8f6f33 126                 ;
be9654 127
94dde5 128             selectedDate = this.parseDate(date, formats);
be9654 129
94dde5 130             viewDate = this.parseDate(props.viewDate, formats);
be9654 131
SE 132             viewDate = selectedDate ?
133                 selectedDate.clone().startOf('month') :
94dde5 134                 viewDate ? viewDate.clone().startOf('month') : this.localMoment().startOf('month');
be9654 135
SE 136             updateOn = this.getUpdateOn(formats);
137
138             if ( selectedDate )
139                 inputValue = selectedDate.format(formats.datetime);
140             else if ( date.isValid && !date.isValid() )
141                 inputValue = '';
142             else
143                 inputValue = date || '';
144
145             return {
146                 updateOn: updateOn,
147                 inputFormat: formats.datetime,
148                 viewDate: viewDate,
149                 selectedDate: selectedDate,
150                 inputValue: inputValue,
151                 open: props.open
152             };
153         },
154
155         getUpdateOn: function( formats ) {
8f6f33 156             if ( formats.date.match(/[lLD]/) ) {
be9654 157                 return 'days';
833531 158             } else if ( formats.date.indexOf('M') !== -1 ) {
be9654 159                 return 'months';
833531 160             } else if ( formats.date.indexOf('Y') !== -1 ) {
be9654 161                 return 'years';
SE 162             }
163
164             return 'days';
165         },
166
167         getFormats: function( props ) {
168             var formats = {
169                     date: props.dateFormat || '',
170                     time: props.timeFormat || ''
171                 },
172                 locale = this.localMoment( props.date, null, props ).localeData()
8f6f33 173                 ;
be9654 174
SE 175             if ( formats.date === true ) {
176                 formats.date = locale.longDateFormat('L');
177             }
178             else if ( this.getUpdateOn(formats) !== 'days' ) {
179                 formats.time = '';
180             }
181
182             if ( formats.time === true ) {
183                 formats.time = locale.longDateFormat('LT');
184             }
185
186             formats.datetime = formats.date && formats.time ?
187                 formats.date + ' ' + formats.time :
188                 formats.date || formats.time
189             ;
190
191             return formats;
192         },
193
194         componentWillReceiveProps: function( nextProps ) {
195             var formats = this.getFormats( nextProps ),
196                 updatedState = {}
197             ;
198
199             if ( nextProps.value !== this.props.value ||
200                 formats.datetime !== this.getFormats( this.props ).datetime ) {
201                 updatedState = this.getStateFromProps( nextProps );
202             }
203
204             if ( updatedState.open === undefined ) {
94dde5 205                 if ( typeof nextProps.open !== 'undefined' ) {
SE 206                     updatedState.open = nextProps.open;
207                 } else if ( this.props.closeOnSelect && this.state.currentView !== 'time' ) {
a6752b 208                     updatedState.open = false;
7750ac 209                 } else {
a6752b 210                     updatedState.open = this.state.open;
SE 211                 }
be9654 212             }
SE 213
214             if ( nextProps.viewMode !== this.props.viewMode ) {
215                 updatedState.currentView = nextProps.viewMode;
216             }
217
218             if ( nextProps.locale !== this.props.locale ) {
219                 if ( this.state.viewDate ) {
220                     var updatedViewDate = this.state.viewDate.clone().locale( nextProps.locale );
221                     updatedState.viewDate = updatedViewDate;
222                 }
223                 if ( this.state.selectedDate ) {
224                     var updatedSelectedDate = this.state.selectedDate.clone().locale( nextProps.locale );
225                     updatedState.selectedDate = updatedSelectedDate;
226                     updatedState.inputValue = updatedSelectedDate.format( formats.datetime );
227                 }
228             }
229
230             if ( nextProps.utc !== this.props.utc ) {
231                 if ( nextProps.utc ) {
232                     if ( this.state.viewDate )
233                         updatedState.viewDate = this.state.viewDate.clone().utc();
234                     if ( this.state.selectedDate ) {
235                         updatedState.selectedDate = this.state.selectedDate.clone().utc();
236                         updatedState.inputValue = updatedState.selectedDate.format( formats.datetime );
237                     }
238                 } else {
239                     if ( this.state.viewDate )
240                         updatedState.viewDate = this.state.viewDate.clone().local();
241                     if ( this.state.selectedDate ) {
242                         updatedState.selectedDate = this.state.selectedDate.clone().local();
243                         updatedState.inputValue = updatedState.selectedDate.format(formats.datetime);
244                     }
245                 }
246             }
39b827 247             //we should only show a valid date if we are provided a isValidDate function. Removed in 2.10.3
LA 248             /*if (this.props.isValidDate) {
8f6f33 249                 updatedState.viewDate = updatedState.viewDate || this.state.viewDate;
LA 250                 while (!this.props.isValidDate(updatedState.viewDate)) {
251                     updatedState.viewDate = updatedState.viewDate.add(1, 'day');
252                 }
39b827 253             }*/
be9654 254             this.setState( updatedState );
SE 255         },
256
257         onInputChange: function( e ) {
258             var value = e.target === null ? e : e.target.value,
259                 localMoment = this.localMoment( value, this.state.inputFormat ),
260                 update = { inputValue: value }
8f6f33 261                 ;
be9654 262
SE 263             if ( localMoment.isValid() && !this.props.value ) {
264                 update.selectedDate = localMoment;
265                 update.viewDate = localMoment.clone().startOf('month');
833531 266             } else {
be9654 267                 update.selectedDate = null;
SE 268             }
269
270             return this.setState( update, function() {
271                 return this.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );
272             });
273         },
274
275         onInputKey: function( e ) {
276             if ( e.which === 9 && this.props.closeOnTab ) {
277                 this.closeCalendar();
278             }
279         },
280
281         showView: function( view ) {
282             var me = this;
283             return function() {
833531 284                 me.state.currentView !== view && me.props.onViewModeChange( view );
be9654 285                 me.setState({ currentView: view });
SE 286             };
287         },
288
289         setDate: function( type ) {
290             var me = this,
291                 nextViews = {
292                     month: 'days',
293                     year: 'months'
294                 }
295             ;
296             return function( e ) {
297                 me.setState({
298                     viewDate: me.state.viewDate.clone()[ type ]( parseInt(e.target.getAttribute('data-value'), 10) ).startOf( type ),
299                     currentView: nextViews[ type ]
300                 });
833531 301                 me.props.onViewModeChange( nextViews[ type ] );
be9654 302             };
SE 303         },
304
305         addTime: function( amount, type, toSelected ) {
306             return this.updateTime( 'add', amount, type, toSelected );
307         },
308
309         subtractTime: function( amount, type, toSelected ) {
310             return this.updateTime( 'subtract', amount, type, toSelected );
311         },
312
313         updateTime: function( op, amount, type, toSelected ) {
314             var me = this;
315
316             return function() {
317                 var update = {},
318                     date = toSelected ? 'selectedDate' : 'viewDate'
319                 ;
320
321                 update[ date ] = me.state[ date ].clone()[ op ]( amount, type );
322
323                 me.setState( update );
324             };
325         },
326
327         allowedSetTime: ['hours', 'minutes', 'seconds', 'milliseconds'],
328         setTime: function( type, value ) {
329             var index = this.allowedSetTime.indexOf( type ) + 1,
330                 state = this.state,
331                 date = (state.selectedDate || state.viewDate).clone(),
332                 nextType
8f6f33 333                 ;
be9654 334
SE 335             // It is needed to set all the time properties
336             // to not to reset the time
337             date[ type ]( value );
338             for (; index < this.allowedSetTime.length; index++) {
339                 nextType = this.allowedSetTime[index];
340                 date[ nextType ]( date[nextType]() );
341             }
342
343             if ( !this.props.value ) {
344                 this.setState({
345                     selectedDate: date,
346                     inputValue: date.format( state.inputFormat )
347                 });
348             }
349             this.props.onChange( date );
350         },
351
352         updateSelectedDate: function( e, close ) {
353             var target = e.target,
354                 modifier = 0,
355                 viewDate = this.state.viewDate,
356                 currentDate = this.state.selectedDate || viewDate,
357                 date
8f6f33 358                 ;
be9654 359
SE 360             if (target.className.indexOf('rdtDay') !== -1) {
361                 if (target.className.indexOf('rdtNew') !== -1)
362                     modifier = 1;
363                 else if (target.className.indexOf('rdtOld') !== -1)
364                     modifier = -1;
365
366                 date = viewDate.clone()
367                     .month( viewDate.month() + modifier )
368                     .date( parseInt( target.getAttribute('data-value'), 10 ) );
369             } else if (target.className.indexOf('rdtMonth') !== -1) {
370                 date = viewDate.clone()
371                     .month( parseInt( target.getAttribute('data-value'), 10 ) )
372                     .date( currentDate.date() );
373             } else if (target.className.indexOf('rdtYear') !== -1) {
374                 date = viewDate.clone()
375                     .month( currentDate.month() )
376                     .date( currentDate.date() )
377                     .year( parseInt( target.getAttribute('data-value'), 10 ) );
378             }
379
380             date.hours( currentDate.hours() )
381                 .minutes( currentDate.minutes() )
382                 .seconds( currentDate.seconds() )
383                 .milliseconds( currentDate.milliseconds() );
384
385             if ( !this.props.value ) {
7750ac 386                 var open = !( this.props.closeOnSelect && close );
JM 387                 if ( !open ) {
388                     this.props.onBlur( date );
389                 }
390
be9654 391                 this.setState({
SE 392                     selectedDate: date,
393                     viewDate: date.clone().startOf('month'),
394                     inputValue: date.format( this.state.inputFormat ),
7750ac 395                     open: open
be9654 396                 });
SE 397             } else {
7750ac 398                 if ( this.props.closeOnSelect && close ) {
be9654 399                     this.closeCalendar();
SE 400                 }
401             }
402
403             this.props.onChange( date );
404         },
405
c1a952 406         openCalendar: function( e ) {
SE 407             if ( !this.state.open ) {
be9654 408                 this.setState({ open: true }, function() {
c1a952 409                     this.props.onFocus( e );
be9654 410                 });
SE 411             }
412         },
413
414         closeCalendar: function() {
415             this.setState({ open: false }, function () {
416                 this.props.onBlur( this.state.selectedDate || this.state.inputValue );
417             });
418         },
419
420         handleClickOutside: function() {
94dde5 421             if ( this.props.input && this.state.open && !this.props.open && !this.props.disableOnClickOutside ) {
be9654 422                 this.setState({ open: false }, function() {
SE 423                     this.props.onBlur( this.state.selectedDate || this.state.inputValue );
424                 });
425             }
426         },
427
428         localMoment: function( date, format, props ) {
429             props = props || this.props;
430             var momentFn = props.utc ? moment.utc : moment;
431             var m = momentFn( date, format, props.strictParsing );
432             if ( props.locale )
433                 m.locale( props.locale );
434             return m;
435         },
436
437         componentProps: {
438             fromProps: ['value', 'isValidDate', 'renderDay', 'renderMonth', 'renderYear', 'timeConstraints'],
439             fromState: ['viewDate', 'selectedDate', 'updateOn'],
11612b 440             fromThis: ['setDate', 'setTime', 'showView', 'addTime', 'subtractTime', 'updateSelectedDate', 'localMoment', 'handleClickOutside']
be9654 441         },
SE 442
443         getComponentProps: function() {
444             var me = this,
445                 formats = this.getFormats( this.props ),
446                 props = {dateFormat: formats.date, timeFormat: formats.time}
8f6f33 447                 ;
be9654 448
SE 449             this.componentProps.fromProps.forEach( function( name ) {
450                 props[ name ] = me.props[ name ];
451             });
452             this.componentProps.fromState.forEach( function( name ) {
453                 props[ name ] = me.state[ name ];
454             });
455             this.componentProps.fromThis.forEach( function( name ) {
456                 props[ name ] = me[ name ];
457             });
458
459             return props;
460         },
461
462         render: function() {
8f6f33 463             // TODO: Make a function or clean up this code,
LA 464             // logic right now is really hard to follow
a50b2e 465             var className = 'rdt' + (this.props.className ?
be9654 466                       ( Array.isArray( this.props.className ) ?
SE 467                       ' ' + this.props.className.join( ' ' ) : ' ' + this.props.className) : ''),
8f6f33 468                 children = [];
be9654 469
SE 470             if ( this.props.input ) {
c1a952 471                 var finalInputProps = assign({
be9654 472                     type: 'text',
SE 473                     className: 'form-control',
c1a952 474                     onClick: this.openCalendar,
be9654 475                     onFocus: this.openCalendar,
SE 476                     onChange: this.onInputChange,
477                     onKeyDown: this.onInputKey,
c1a952 478                     value: this.state.inputValue,
SE 479                 }, this.props.inputProps);
480                 if ( this.props.renderInput ) {
94dde5 481                     children = [ React.createElement('div', { key: 'i' }, this.props.renderInput( finalInputProps, this.openCalendar, this.closeCalendar )) ];
c1a952 482                 } else {
SE 483                     children = [ React.createElement('input', assign({ key: 'i' }, finalInputProps ))];
484                 }
be9654 485             } else {
SE 486                 className += ' rdtStatic';
487             }
488
489             if ( this.state.open )
490                 className += ' rdtOpen';
491
c1a952 492             return React.createElement( 'div', { className: className }, children.concat(
SE 493                 React.createElement( 'div',
be9654 494                     { key: 'dt', className: 'rdtPicker' },
c1a952 495                     React.createElement( CalendarContainer, { view: this.state.currentView, viewProps: this.getComponentProps(), onClickOutside: this.handleClickOutside })
be9654 496                 )
SE 497             ));
498         }
499     });
94dde5 500
SE 501     Datetime.defaultProps = {
502         className: '',
503         defaultValue: '',
504         inputProps: {},
505         input: true,
506         onFocus: function() {},
507         onBlur: function() {},
508         onChange: function() {},
509         onViewModeChange: function() {},
510         timeFormat: true,
511         timeConstraints: {},
512         dateFormat: true,
513         strictParsing: true,
514         closeOnSelect: false,
515         closeOnTab: true,
516         utc: false
517     };
be9654 518
SE 519     // Make moment accessible through the Datetime class
520     Datetime.moment = moment;
521
522     module.exports = Datetime;
523
d76f7b 524
7392ed 525 /***/ }),
d76f7b 526 /* 1 */
7392ed 527 /***/ (function(module, exports) {
d76f7b 528
be9654 529     'use strict';
SE 530     var propIsEnumerable = Object.prototype.propertyIsEnumerable;
531
532     function ToObject(val) {
533         if (val == null) {
534             throw new TypeError('Object.assign cannot be called with null or undefined');
535         }
536
537         return Object(val);
538     }
539
540     function ownEnumerableKeys(obj) {
541         var keys = Object.getOwnPropertyNames(obj);
542
543         if (Object.getOwnPropertySymbols) {
544             keys = keys.concat(Object.getOwnPropertySymbols(obj));
545         }
546
547         return keys.filter(function (key) {
548             return propIsEnumerable.call(obj, key);
549         });
550     }
551
552     module.exports = Object.assign || function (target, source) {
553         var from;
554         var keys;
555         var to = ToObject(target);
556
557         for (var s = 1; s < arguments.length; s++) {
558             from = arguments[s];
559             keys = ownEnumerableKeys(Object(from));
560
561             for (var i = 0; i < keys.length; i++) {
562                 to[keys[i]] = from[keys[i]];
563             }
564         }
565
566         return to;
567     };
568
d76f7b 569
7392ed 570 /***/ }),
d76f7b 571 /* 2 */
7392ed 572 /***/ (function(module, exports, __webpack_require__) {
d76f7b 573
be31e2 574     /* WEBPACK VAR INJECTION */(function(process) {/**
94dde5 575      * Copyright (c) 2013-present, Facebook, Inc.
be31e2 576      *
94dde5 577      * This source code is licensed under the MIT license found in the
SE 578      * LICENSE file in the root directory of this source tree.
be31e2 579      */
JB 580
581     if (process.env.NODE_ENV !== 'production') {
582       var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
583         Symbol.for &&
584         Symbol.for('react.element')) ||
585         0xeac7;
586
587       var isValidElement = function(object) {
588         return typeof object === 'object' &&
589           object !== null &&
590           object.$$typeof === REACT_ELEMENT_TYPE;
591       };
592
593       // By explicitly using `prop-types` you are opting into new development behavior.
594       // http://fb.me/prop-types-in-prod
595       var throwOnDirectAccess = true;
596       module.exports = __webpack_require__(4)(isValidElement, throwOnDirectAccess);
597     } else {
598       // By explicitly using `prop-types` you are opting into new production behavior.
599       // http://fb.me/prop-types-in-prod
94dde5 600       module.exports = __webpack_require__(11)();
be31e2 601     }
JB 602
603     /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
d76f7b 604
7392ed 605 /***/ }),
d76f7b 606 /* 3 */
7392ed 607 /***/ (function(module, exports) {
d76f7b 608
be31e2 609     // shim for using process in browser
JB 610     var process = module.exports = {};
611
612     // cached from whatever global is present so that test runners that stub it
613     // don't break things.  But we need to wrap it in a try catch in case it is
614     // wrapped in strict mode code which doesn't define any globals.  It's inside a
615     // function because try/catches deoptimize in certain engines.
616
617     var cachedSetTimeout;
618     var cachedClearTimeout;
619
620     function defaultSetTimout() {
621         throw new Error('setTimeout has not been defined');
622     }
623     function defaultClearTimeout () {
624         throw new Error('clearTimeout has not been defined');
625     }
626     (function () {
627         try {
628             if (typeof setTimeout === 'function') {
629                 cachedSetTimeout = setTimeout;
630             } else {
631                 cachedSetTimeout = defaultSetTimout;
632             }
633         } catch (e) {
634             cachedSetTimeout = defaultSetTimout;
635         }
636         try {
637             if (typeof clearTimeout === 'function') {
638                 cachedClearTimeout = clearTimeout;
639             } else {
640                 cachedClearTimeout = defaultClearTimeout;
641             }
642         } catch (e) {
643             cachedClearTimeout = defaultClearTimeout;
644         }
645     } ())
646     function runTimeout(fun) {
647         if (cachedSetTimeout === setTimeout) {
648             //normal enviroments in sane situations
649             return setTimeout(fun, 0);
650         }
651         // if setTimeout wasn't available but was latter defined
652         if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
653             cachedSetTimeout = setTimeout;
654             return setTimeout(fun, 0);
655         }
656         try {
657             // when when somebody has screwed with setTimeout but no I.E. maddness
658             return cachedSetTimeout(fun, 0);
659         } catch(e){
660             try {
661                 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
662                 return cachedSetTimeout.call(null, fun, 0);
663             } catch(e){
664                 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
665                 return cachedSetTimeout.call(this, fun, 0);
666             }
667         }
668
669
670     }
671     function runClearTimeout(marker) {
672         if (cachedClearTimeout === clearTimeout) {
673             //normal enviroments in sane situations
674             return clearTimeout(marker);
675         }
676         // if clearTimeout wasn't available but was latter defined
677         if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
678             cachedClearTimeout = clearTimeout;
679             return clearTimeout(marker);
680         }
681         try {
682             // when when somebody has screwed with setTimeout but no I.E. maddness
683             return cachedClearTimeout(marker);
684         } catch (e){
685             try {
686                 // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
687                 return cachedClearTimeout.call(null, marker);
688             } catch (e){
689                 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
690                 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
691                 return cachedClearTimeout.call(this, marker);
692             }
693         }
694
695
696
697     }
698     var queue = [];
699     var draining = false;
700     var currentQueue;
701     var queueIndex = -1;
702
703     function cleanUpNextTick() {
704         if (!draining || !currentQueue) {
705             return;
706         }
707         draining = false;
708         if (currentQueue.length) {
709             queue = currentQueue.concat(queue);
710         } else {
711             queueIndex = -1;
712         }
713         if (queue.length) {
714             drainQueue();
715         }
716     }
717
718     function drainQueue() {
719         if (draining) {
720             return;
721         }
722         var timeout = runTimeout(cleanUpNextTick);
723         draining = true;
724
725         var len = queue.length;
726         while(len) {
727             currentQueue = queue;
728             queue = [];
729             while (++queueIndex < len) {
730                 if (currentQueue) {
731                     currentQueue[queueIndex].run();
732                 }
733             }
734             queueIndex = -1;
735             len = queue.length;
736         }
737         currentQueue = null;
738         draining = false;
739         runClearTimeout(timeout);
740     }
741
742     process.nextTick = function (fun) {
743         var args = new Array(arguments.length - 1);
744         if (arguments.length > 1) {
745             for (var i = 1; i < arguments.length; i++) {
746                 args[i - 1] = arguments[i];
747             }
748         }
749         queue.push(new Item(fun, args));
750         if (queue.length === 1 && !draining) {
751             runTimeout(drainQueue);
752         }
753     };
754
755     // v8 likes predictible objects
756     function Item(fun, array) {
757         this.fun = fun;
758         this.array = array;
759     }
760     Item.prototype.run = function () {
761         this.fun.apply(null, this.array);
762     };
763     process.title = 'browser';
764     process.browser = true;
765     process.env = {};
766     process.argv = [];
767     process.version = ''; // empty string to avoid regexp issues
768     process.versions = {};
769
770     function noop() {}
771
772     process.on = noop;
773     process.addListener = noop;
774     process.once = noop;
775     process.off = noop;
776     process.removeListener = noop;
777     process.removeAllListeners = noop;
778     process.emit = noop;
a50b2e 779     process.prependListener = noop;
GL 780     process.prependOnceListener = noop;
781
782     process.listeners = function (name) { return [] }
be31e2 783
JB 784     process.binding = function (name) {
785         throw new Error('process.binding is not supported');
786     };
787
788     process.cwd = function () { return '/' };
789     process.chdir = function (dir) {
790         throw new Error('process.chdir is not supported');
791     };
792     process.umask = function() { return 0; };
793
d76f7b 794
7392ed 795 /***/ }),
d76f7b 796 /* 4 */
7392ed 797 /***/ (function(module, exports, __webpack_require__) {
7750ac 798
be31e2 799     /* WEBPACK VAR INJECTION */(function(process) {/**
94dde5 800      * Copyright (c) 2013-present, Facebook, Inc.
be31e2 801      *
94dde5 802      * This source code is licensed under the MIT license found in the
SE 803      * LICENSE file in the root directory of this source tree.
be31e2 804      */
JB 805
806     'use strict';
807
808     var emptyFunction = __webpack_require__(5);
809     var invariant = __webpack_require__(6);
810     var warning = __webpack_require__(7);
94dde5 811     var assign = __webpack_require__(8);
be31e2 812
94dde5 813     var ReactPropTypesSecret = __webpack_require__(9);
SE 814     var checkPropTypes = __webpack_require__(10);
be31e2 815
JB 816     module.exports = function(isValidElement, throwOnDirectAccess) {
817       /* global Symbol */
818       var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
819       var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
820
821       /**
822        * Returns the iterator method function contained on the iterable object.
823        *
824        * Be sure to invoke the function with the iterable as context:
825        *
826        *     var iteratorFn = getIteratorFn(myIterable);
827        *     if (iteratorFn) {
828        *       var iterator = iteratorFn.call(myIterable);
829        *       ...
830        *     }
831        *
832        * @param {?object} maybeIterable
833        * @return {?function}
834        */
835       function getIteratorFn(maybeIterable) {
836         var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
837         if (typeof iteratorFn === 'function') {
838           return iteratorFn;
839         }
840       }
841
842       /**
843        * Collection of methods that allow declaration and validation of props that are
844        * supplied to React components. Example usage:
845        *
846        *   var Props = require('ReactPropTypes');
847        *   var MyArticle = React.createClass({
848        *     propTypes: {
849        *       // An optional string prop named "description".
850        *       description: Props.string,
851        *
852        *       // A required enum prop named "category".
853        *       category: Props.oneOf(['News','Photos']).isRequired,
854        *
855        *       // A prop named "dialog" that requires an instance of Dialog.
856        *       dialog: Props.instanceOf(Dialog).isRequired
857        *     },
858        *     render: function() { ... }
859        *   });
860        *
861        * A more formal specification of how these methods are used:
862        *
863        *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
864        *   decl := ReactPropTypes.{type}(.isRequired)?
865        *
866        * Each and every declaration produces a function with the same signature. This
867        * allows the creation of custom validation functions. For example:
868        *
869        *  var MyLink = React.createClass({
870        *    propTypes: {
871        *      // An optional string or URI prop named "href".
872        *      href: function(props, propName, componentName) {
873        *        var propValue = props[propName];
874        *        if (propValue != null && typeof propValue !== 'string' &&
875        *            !(propValue instanceof URI)) {
876        *          return new Error(
877        *            'Expected a string or an URI for ' + propName + ' in ' +
878        *            componentName
879        *          );
880        *        }
881        *      }
882        *    },
883        *    render: function() {...}
884        *  });
885        *
886        * @internal
887        */
888
889       var ANONYMOUS = '<<anonymous>>';
890
891       // Important!
892       // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
893       var ReactPropTypes = {
894         array: createPrimitiveTypeChecker('array'),
895         bool: createPrimitiveTypeChecker('boolean'),
896         func: createPrimitiveTypeChecker('function'),
897         number: createPrimitiveTypeChecker('number'),
898         object: createPrimitiveTypeChecker('object'),
899         string: createPrimitiveTypeChecker('string'),
900         symbol: createPrimitiveTypeChecker('symbol'),
901
902         any: createAnyTypeChecker(),
903         arrayOf: createArrayOfTypeChecker,
904         element: createElementTypeChecker(),
905         instanceOf: createInstanceTypeChecker,
906         node: createNodeChecker(),
907         objectOf: createObjectOfTypeChecker,
908         oneOf: createEnumTypeChecker,
909         oneOfType: createUnionTypeChecker,
94dde5 910         shape: createShapeTypeChecker,
SE 911         exact: createStrictShapeTypeChecker,
be31e2 912       };
JB 913
914       /**
915        * inlined Object.is polyfill to avoid requiring consumers ship their own
916        * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
917        */
918       /*eslint-disable no-self-compare*/
919       function is(x, y) {
920         // SameValue algorithm
921         if (x === y) {
922           // Steps 1-5, 7-10
923           // Steps 6.b-6.e: +0 != -0
924           return x !== 0 || 1 / x === 1 / y;
925         } else {
926           // Step 6.a: NaN == NaN
927           return x !== x && y !== y;
928         }
929       }
930       /*eslint-enable no-self-compare*/
931
932       /**
933        * We use an Error-like object for backward compatibility as people may call
934        * PropTypes directly and inspect their output. However, we don't use real
935        * Errors anymore. We don't inspect their stack anyway, and creating them
936        * is prohibitively expensive if they are created too often, such as what
937        * happens in oneOfType() for any type before the one that matched.
938        */
939       function PropTypeError(message) {
940         this.message = message;
941         this.stack = '';
942       }
943       // Make `instanceof Error` still work for returned errors.
944       PropTypeError.prototype = Error.prototype;
945
946       function createChainableTypeChecker(validate) {
947         if (process.env.NODE_ENV !== 'production') {
948           var manualPropTypeCallCache = {};
7392ed 949           var manualPropTypeWarningCount = 0;
be31e2 950         }
JB 951         function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
952           componentName = componentName || ANONYMOUS;
953           propFullName = propFullName || propName;
954
955           if (secret !== ReactPropTypesSecret) {
956             if (throwOnDirectAccess) {
957               // New behavior only for users of `prop-types` package
958               invariant(
959                 false,
960                 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
961                 'Use `PropTypes.checkPropTypes()` to call them. ' +
962                 'Read more at http://fb.me/use-check-prop-types'
963               );
964             } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
965               // Old behavior for people using React.PropTypes
966               var cacheKey = componentName + ':' + propName;
7392ed 967               if (
SE 968                 !manualPropTypeCallCache[cacheKey] &&
969                 // Avoid spamming the console because they are often not actionable except for lib authors
970                 manualPropTypeWarningCount < 3
971               ) {
be31e2 972                 warning(
JB 973                   false,
974                   'You are manually calling a React.PropTypes validation ' +
975                   'function for the `%s` prop on `%s`. This is deprecated ' +
976                   'and will throw in the standalone `prop-types` package. ' +
977                   'You may be seeing this warning due to a third-party PropTypes ' +
978                   'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
979                   propFullName,
980                   componentName
981                 );
982                 manualPropTypeCallCache[cacheKey] = true;
7392ed 983                 manualPropTypeWarningCount++;
be31e2 984               }
JB 985             }
986           }
987           if (props[propName] == null) {
988             if (isRequired) {
989               if (props[propName] === null) {
990                 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
991               }
992               return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
993             }
994             return null;
995           } else {
996             return validate(props, propName, componentName, location, propFullName);
997           }
998         }
999
1000         var chainedCheckType = checkType.bind(null, false);
1001         chainedCheckType.isRequired = checkType.bind(null, true);
1002
1003         return chainedCheckType;
1004       }
1005
1006       function createPrimitiveTypeChecker(expectedType) {
1007         function validate(props, propName, componentName, location, propFullName, secret) {
1008           var propValue = props[propName];
1009           var propType = getPropType(propValue);
1010           if (propType !== expectedType) {
1011             // `propValue` being instance of, say, date/regexp, pass the 'object'
1012             // check, but we can offer a more precise error message here rather than
1013             // 'of type `object`'.
1014             var preciseType = getPreciseType(propValue);
1015
1016             return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
1017           }
1018           return null;
1019         }
1020         return createChainableTypeChecker(validate);
1021       }
1022
1023       function createAnyTypeChecker() {
1024         return createChainableTypeChecker(emptyFunction.thatReturnsNull);
1025       }
1026
1027       function createArrayOfTypeChecker(typeChecker) {
1028         function validate(props, propName, componentName, location, propFullName) {
1029           if (typeof typeChecker !== 'function') {
1030             return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1031           }
1032           var propValue = props[propName];
1033           if (!Array.isArray(propValue)) {
1034             var propType = getPropType(propValue);
1035             return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1036           }
1037           for (var i = 0; i < propValue.length; i++) {
1038             var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1039             if (error instanceof Error) {
1040               return error;
1041             }
1042           }
1043           return null;
1044         }
1045         return createChainableTypeChecker(validate);
1046       }
1047
1048       function createElementTypeChecker() {
1049         function validate(props, propName, componentName, location, propFullName) {
1050           var propValue = props[propName];
1051           if (!isValidElement(propValue)) {
1052             var propType = getPropType(propValue);
1053             return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1054           }
1055           return null;
1056         }
1057         return createChainableTypeChecker(validate);
1058       }
1059
1060       function createInstanceTypeChecker(expectedClass) {
1061         function validate(props, propName, componentName, location, propFullName) {
1062           if (!(props[propName] instanceof expectedClass)) {
1063             var expectedClassName = expectedClass.name || ANONYMOUS;
1064             var actualClassName = getClassName(props[propName]);
1065             return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1066           }
1067           return null;
1068         }
1069         return createChainableTypeChecker(validate);
1070       }
1071
1072       function createEnumTypeChecker(expectedValues) {
1073         if (!Array.isArray(expectedValues)) {
1074           process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
1075           return emptyFunction.thatReturnsNull;
1076         }
1077
1078         function validate(props, propName, componentName, location, propFullName) {
1079           var propValue = props[propName];
1080           for (var i = 0; i < expectedValues.length; i++) {
1081             if (is(propValue, expectedValues[i])) {
1082               return null;
1083             }
1084           }
1085
1086           var valuesString = JSON.stringify(expectedValues);
1087           return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1088         }
1089         return createChainableTypeChecker(validate);
1090       }
1091
1092       function createObjectOfTypeChecker(typeChecker) {
1093         function validate(props, propName, componentName, location, propFullName) {
1094           if (typeof typeChecker !== 'function') {
1095             return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1096           }
1097           var propValue = props[propName];
1098           var propType = getPropType(propValue);
1099           if (propType !== 'object') {
1100             return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1101           }
1102           for (var key in propValue) {
1103             if (propValue.hasOwnProperty(key)) {
1104               var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1105               if (error instanceof Error) {
1106                 return error;
1107               }
1108             }
1109           }
1110           return null;
1111         }
1112         return createChainableTypeChecker(validate);
1113       }
1114
1115       function createUnionTypeChecker(arrayOfTypeCheckers) {
1116         if (!Array.isArray(arrayOfTypeCheckers)) {
1117           process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
1118           return emptyFunction.thatReturnsNull;
1119         }
1120
a50b2e 1121         for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
GL 1122           var checker = arrayOfTypeCheckers[i];
1123           if (typeof checker !== 'function') {
1124             warning(
1125               false,
94dde5 1126               'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
a50b2e 1127               'received %s at index %s.',
GL 1128               getPostfixForTypeWarning(checker),
1129               i
1130             );
1131             return emptyFunction.thatReturnsNull;
1132           }
1133         }
1134
be31e2 1135         function validate(props, propName, componentName, location, propFullName) {
JB 1136           for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1137             var checker = arrayOfTypeCheckers[i];
1138             if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
1139               return null;
1140             }
1141           }
1142
1143           return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
1144         }
1145         return createChainableTypeChecker(validate);
1146       }
1147
1148       function createNodeChecker() {
1149         function validate(props, propName, componentName, location, propFullName) {
1150           if (!isNode(props[propName])) {
1151             return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1152           }
1153           return null;
1154         }
1155         return createChainableTypeChecker(validate);
1156       }
1157
1158       function createShapeTypeChecker(shapeTypes) {
1159         function validate(props, propName, componentName, location, propFullName) {
1160           var propValue = props[propName];
1161           var propType = getPropType(propValue);
1162           if (propType !== 'object') {
1163             return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1164           }
1165           for (var key in shapeTypes) {
1166             var checker = shapeTypes[key];
1167             if (!checker) {
1168               continue;
1169             }
1170             var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1171             if (error) {
1172               return error;
1173             }
1174           }
1175           return null;
1176         }
94dde5 1177         return createChainableTypeChecker(validate);
SE 1178       }
1179
1180       function createStrictShapeTypeChecker(shapeTypes) {
1181         function validate(props, propName, componentName, location, propFullName) {
1182           var propValue = props[propName];
1183           var propType = getPropType(propValue);
1184           if (propType !== 'object') {
1185             return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1186           }
1187           // We need to check all keys in case some are required but missing from
1188           // props.
1189           var allKeys = assign({}, props[propName], shapeTypes);
1190           for (var key in allKeys) {
1191             var checker = shapeTypes[key];
1192             if (!checker) {
1193               return new PropTypeError(
1194                 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1195                 '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
1196                 '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
1197               );
1198             }
1199             var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1200             if (error) {
1201               return error;
1202             }
1203           }
1204           return null;
1205         }
1206
be31e2 1207         return createChainableTypeChecker(validate);
JB 1208       }
1209
1210       function isNode(propValue) {
1211         switch (typeof propValue) {
1212           case 'number':
1213           case 'string':
1214           case 'undefined':
1215             return true;
1216           case 'boolean':
1217             return !propValue;
1218           case 'object':
1219             if (Array.isArray(propValue)) {
1220               return propValue.every(isNode);
1221             }
1222             if (propValue === null || isValidElement(propValue)) {
1223               return true;
1224             }
1225
1226             var iteratorFn = getIteratorFn(propValue);
1227             if (iteratorFn) {
1228               var iterator = iteratorFn.call(propValue);
1229               var step;
1230               if (iteratorFn !== propValue.entries) {
1231                 while (!(step = iterator.next()).done) {
1232                   if (!isNode(step.value)) {
1233                     return false;
1234                   }
1235                 }
1236               } else {
1237                 // Iterator will provide entry [k,v] tuples rather than values.
1238                 while (!(step = iterator.next()).done) {
1239                   var entry = step.value;
1240                   if (entry) {
1241                     if (!isNode(entry[1])) {
1242                       return false;
1243                     }
1244                   }
1245                 }
1246               }
1247             } else {
1248               return false;
1249             }
1250
1251             return true;
1252           default:
1253             return false;
1254         }
1255       }
1256
1257       function isSymbol(propType, propValue) {
1258         // Native Symbol.
1259         if (propType === 'symbol') {
1260           return true;
1261         }
1262
1263         // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1264         if (propValue['@@toStringTag'] === 'Symbol') {
1265           return true;
1266         }
1267
1268         // Fallback for non-spec compliant Symbols which are polyfilled.
1269         if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1270           return true;
1271         }
1272
1273         return false;
1274       }
1275
1276       // Equivalent of `typeof` but with special handling for array and regexp.
1277       function getPropType(propValue) {
1278         var propType = typeof propValue;
1279         if (Array.isArray(propValue)) {
1280           return 'array';
1281         }
1282         if (propValue instanceof RegExp) {
1283           // Old webkits (at least until Android 4.0) return 'function' rather than
1284           // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1285           // passes PropTypes.object.
1286           return 'object';
1287         }
1288         if (isSymbol(propType, propValue)) {
1289           return 'symbol';
1290         }
1291         return propType;
1292       }
1293
1294       // This handles more types than `getPropType`. Only used for error messages.
1295       // See `createPrimitiveTypeChecker`.
1296       function getPreciseType(propValue) {
a50b2e 1297         if (typeof propValue === 'undefined' || propValue === null) {
GL 1298           return '' + propValue;
1299         }
be31e2 1300         var propType = getPropType(propValue);
JB 1301         if (propType === 'object') {
1302           if (propValue instanceof Date) {
1303             return 'date';
1304           } else if (propValue instanceof RegExp) {
1305             return 'regexp';
1306           }
1307         }
1308         return propType;
a50b2e 1309       }
GL 1310
1311       // Returns a string that is postfixed to a warning about an invalid type.
1312       // For example, "undefined" or "of type array"
1313       function getPostfixForTypeWarning(value) {
1314         var type = getPreciseType(value);
1315         switch (type) {
1316           case 'array':
1317           case 'object':
1318             return 'an ' + type;
1319           case 'boolean':
1320           case 'date':
1321           case 'regexp':
1322             return 'a ' + type;
1323           default:
1324             return type;
1325         }
be31e2 1326       }
JB 1327
1328       // Returns class name of the object, if any.
1329       function getClassName(propValue) {
1330         if (!propValue.constructor || !propValue.constructor.name) {
1331           return ANONYMOUS;
1332         }
1333         return propValue.constructor.name;
1334       }
1335
1336       ReactPropTypes.checkPropTypes = checkPropTypes;
1337       ReactPropTypes.PropTypes = ReactPropTypes;
1338
1339       return ReactPropTypes;
1340     };
1341
1342     /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
1343
7392ed 1344 /***/ }),
be31e2 1345 /* 5 */
7392ed 1346 /***/ (function(module, exports) {
be31e2 1347
JB 1348     "use strict";
1349
1350     /**
1351      * Copyright (c) 2013-present, Facebook, Inc.
1352      *
94dde5 1353      * This source code is licensed under the MIT license found in the
SE 1354      * LICENSE file in the root directory of this source tree.
be31e2 1355      *
JB 1356      * 
1357      */
1358
1359     function makeEmptyFunction(arg) {
1360       return function () {
1361         return arg;
1362       };
1363     }
1364
1365     /**
1366      * This function accepts and discards inputs; it has no side effects. This is
1367      * primarily useful idiomatically for overridable function endpoints which
1368      * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
1369      */
1370     var emptyFunction = function emptyFunction() {};
1371
1372     emptyFunction.thatReturns = makeEmptyFunction;
1373     emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
1374     emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
1375     emptyFunction.thatReturnsNull = makeEmptyFunction(null);
1376     emptyFunction.thatReturnsThis = function () {
1377       return this;
1378     };
1379     emptyFunction.thatReturnsArgument = function (arg) {
1380       return arg;
1381     };
1382
1383     module.exports = emptyFunction;
1384
7392ed 1385 /***/ }),
be31e2 1386 /* 6 */
7392ed 1387 /***/ (function(module, exports, __webpack_require__) {
be31e2 1388
JB 1389     /* WEBPACK VAR INJECTION */(function(process) {/**
1390      * Copyright (c) 2013-present, Facebook, Inc.
1391      *
94dde5 1392      * This source code is licensed under the MIT license found in the
SE 1393      * LICENSE file in the root directory of this source tree.
be31e2 1394      *
JB 1395      */
1396
1397     'use strict';
1398
1399     /**
1400      * Use invariant() to assert state which your program assumes to be true.
1401      *
1402      * Provide sprintf-style format (only %s is supported) and arguments
1403      * to provide information about what broke and what you were
1404      * expecting.
1405      *
1406      * The invariant message will be stripped in production, but the invariant
1407      * will remain to ensure logic does not differ in production.
1408      */
1409
1410     var validateFormat = function validateFormat(format) {};
1411
1412     if (process.env.NODE_ENV !== 'production') {
1413       validateFormat = function validateFormat(format) {
1414         if (format === undefined) {
1415           throw new Error('invariant requires an error message argument');
1416         }
1417       };
1418     }
1419
1420     function invariant(condition, format, a, b, c, d, e, f) {
1421       validateFormat(format);
1422
1423       if (!condition) {
1424         var error;
1425         if (format === undefined) {
1426           error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
1427         } else {
1428           var args = [a, b, c, d, e, f];
1429           var argIndex = 0;
1430           error = new Error(format.replace(/%s/g, function () {
1431             return args[argIndex++];
1432           }));
1433           error.name = 'Invariant Violation';
1434         }
1435
1436         error.framesToPop = 1; // we don't care about invariant's own frame
1437         throw error;
1438       }
1439     }
1440
1441     module.exports = invariant;
1442     /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
1443
7392ed 1444 /***/ }),
be31e2 1445 /* 7 */
7392ed 1446 /***/ (function(module, exports, __webpack_require__) {
be31e2 1447
JB 1448     /* WEBPACK VAR INJECTION */(function(process) {/**
94dde5 1449      * Copyright (c) 2014-present, Facebook, Inc.
be31e2 1450      *
94dde5 1451      * This source code is licensed under the MIT license found in the
SE 1452      * LICENSE file in the root directory of this source tree.
be31e2 1453      *
JB 1454      */
1455
1456     'use strict';
1457
1458     var emptyFunction = __webpack_require__(5);
1459
1460     /**
1461      * Similar to invariant but only logs a warning if the condition is not met.
1462      * This can be used to log issues in development environments in critical
1463      * paths. Removing the logging code for production environments will keep the
1464      * same logic and follow the same code paths.
1465      */
1466
1467     var warning = emptyFunction;
1468
1469     if (process.env.NODE_ENV !== 'production') {
94dde5 1470       var printWarning = function printWarning(format) {
SE 1471         for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1472           args[_key - 1] = arguments[_key];
1473         }
1474
1475         var argIndex = 0;
1476         var message = 'Warning: ' + format.replace(/%s/g, function () {
1477           return args[argIndex++];
1478         });
1479         if (typeof console !== 'undefined') {
1480           console.error(message);
1481         }
1482         try {
1483           // --- Welcome to debugging React ---
1484           // This error was thrown as a convenience so that you can use this stack
1485           // to find the callsite that caused this warning to fire.
1486           throw new Error(message);
1487         } catch (x) {}
1488       };
1489
1490       warning = function warning(condition, format) {
1491         if (format === undefined) {
1492           throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
1493         }
1494
1495         if (format.indexOf('Failed Composite propType: ') === 0) {
1496           return; // Ignore CompositeComponent proptype check.
1497         }
1498
1499         if (!condition) {
1500           for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
1501             args[_key2 - 2] = arguments[_key2];
be31e2 1502           }
JB 1503
94dde5 1504           printWarning.apply(undefined, [format].concat(args));
SE 1505         }
1506       };
be31e2 1507     }
JB 1508
1509     module.exports = warning;
1510     /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
1511
7392ed 1512 /***/ }),
be31e2 1513 /* 8 */
7392ed 1514 /***/ (function(module, exports) {
be31e2 1515
94dde5 1516     /*
SE 1517     object-assign
1518     (c) Sindre Sorhus
1519     @license MIT
1520     */
1521
1522     'use strict';
1523     /* eslint-disable no-unused-vars */
1524     var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1525     var hasOwnProperty = Object.prototype.hasOwnProperty;
1526     var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1527
1528     function toObject(val) {
1529         if (val === null || val === undefined) {
1530             throw new TypeError('Object.assign cannot be called with null or undefined');
1531         }
1532
1533         return Object(val);
1534     }
1535
1536     function shouldUseNative() {
1537         try {
1538             if (!Object.assign) {
1539                 return false;
1540             }
1541
1542             // Detect buggy property enumeration order in older V8 versions.
1543
1544             // https://bugs.chromium.org/p/v8/issues/detail?id=4118
1545             var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
1546             test1[5] = 'de';
1547             if (Object.getOwnPropertyNames(test1)[0] === '5') {
1548                 return false;
1549             }
1550
1551             // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1552             var test2 = {};
1553             for (var i = 0; i < 10; i++) {
1554                 test2['_' + String.fromCharCode(i)] = i;
1555             }
1556             var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
1557                 return test2[n];
1558             });
1559             if (order2.join('') !== '0123456789') {
1560                 return false;
1561             }
1562
1563             // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1564             var test3 = {};
1565             'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
1566                 test3[letter] = letter;
1567             });
1568             if (Object.keys(Object.assign({}, test3)).join('') !==
1569                     'abcdefghijklmnopqrst') {
1570                 return false;
1571             }
1572
1573             return true;
1574         } catch (err) {
1575             // We don't expect any of the above to throw, but better to be safe.
1576             return false;
1577         }
1578     }
1579
1580     module.exports = shouldUseNative() ? Object.assign : function (target, source) {
1581         var from;
1582         var to = toObject(target);
1583         var symbols;
1584
1585         for (var s = 1; s < arguments.length; s++) {
1586             from = Object(arguments[s]);
1587
1588             for (var key in from) {
1589                 if (hasOwnProperty.call(from, key)) {
1590                     to[key] = from[key];
1591                 }
1592             }
1593
1594             if (getOwnPropertySymbols) {
1595                 symbols = getOwnPropertySymbols(from);
1596                 for (var i = 0; i < symbols.length; i++) {
1597                     if (propIsEnumerable.call(from, symbols[i])) {
1598                         to[symbols[i]] = from[symbols[i]];
1599                     }
1600                 }
1601             }
1602         }
1603
1604         return to;
1605     };
1606
1607
1608 /***/ }),
1609 /* 9 */
1610 /***/ (function(module, exports) {
1611
be31e2 1612     /**
94dde5 1613      * Copyright (c) 2013-present, Facebook, Inc.
be31e2 1614      *
94dde5 1615      * This source code is licensed under the MIT license found in the
SE 1616      * LICENSE file in the root directory of this source tree.
be31e2 1617      */
JB 1618
1619     'use strict';
1620
1621     var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1622
1623     module.exports = ReactPropTypesSecret;
1624
1625
7392ed 1626 /***/ }),
94dde5 1627 /* 10 */
7392ed 1628 /***/ (function(module, exports, __webpack_require__) {
be31e2 1629
JB 1630     /* WEBPACK VAR INJECTION */(function(process) {/**
94dde5 1631      * Copyright (c) 2013-present, Facebook, Inc.
be31e2 1632      *
94dde5 1633      * This source code is licensed under the MIT license found in the
SE 1634      * LICENSE file in the root directory of this source tree.
be31e2 1635      */
JB 1636
1637     'use strict';
1638
1639     if (process.env.NODE_ENV !== 'production') {
1640       var invariant = __webpack_require__(6);
1641       var warning = __webpack_require__(7);
94dde5 1642       var ReactPropTypesSecret = __webpack_require__(9);
be31e2 1643       var loggedTypeFailures = {};
JB 1644     }
1645
1646     /**
1647      * Assert that the values match with the type specs.
1648      * Error messages are memorized and will only be shown once.
1649      *
1650      * @param {object} typeSpecs Map of name to a ReactPropType
1651      * @param {object} values Runtime values that need to be type-checked
1652      * @param {string} location e.g. "prop", "context", "child context"
1653      * @param {string} componentName Name of the component for error messages.
1654      * @param {?Function} getStack Returns the component stack.
1655      * @private
1656      */
1657     function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1658       if (process.env.NODE_ENV !== 'production') {
1659         for (var typeSpecName in typeSpecs) {
1660           if (typeSpecs.hasOwnProperty(typeSpecName)) {
1661             var error;
1662             // Prop type validation may throw. In case they do, we don't want to
1663             // fail the render phase where it didn't fail before. So we log it.
1664             // After these have been cleaned up, we'll let them throw.
1665             try {
1666               // This is intentionally an invariant that gets caught. It's the same
1667               // behavior as without this statement except with a better message.
94dde5 1668               invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
be31e2 1669               error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
JB 1670             } catch (ex) {
1671               error = ex;
1672             }
1673             warning(!error || error 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).', componentName || 'React class', location, typeSpecName, typeof error);
1674             if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1675               // Only monitor this failure once because there tends to be a lot of the
1676               // same error.
1677               loggedTypeFailures[error.message] = true;
1678
1679               var stack = getStack ? getStack() : '';
1680
1681               warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
1682             }
1683           }
1684         }
1685       }
1686     }
1687
1688     module.exports = checkPropTypes;
1689
1690     /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
1691
7392ed 1692 /***/ }),
94dde5 1693 /* 11 */
7392ed 1694 /***/ (function(module, exports, __webpack_require__) {
be31e2 1695
JB 1696     /**
94dde5 1697      * Copyright (c) 2013-present, Facebook, Inc.
be31e2 1698      *
94dde5 1699      * This source code is licensed under the MIT license found in the
SE 1700      * LICENSE file in the root directory of this source tree.
be31e2 1701      */
JB 1702
1703     'use strict';
1704
1705     var emptyFunction = __webpack_require__(5);
1706     var invariant = __webpack_require__(6);
94dde5 1707     var ReactPropTypesSecret = __webpack_require__(9);
be31e2 1708
JB 1709     module.exports = function() {
a50b2e 1710       function shim(props, propName, componentName, location, propFullName, secret) {
GL 1711         if (secret === ReactPropTypesSecret) {
1712           // It is still safe when called from React.
1713           return;
1714         }
be31e2 1715         invariant(
JB 1716           false,
1717           'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1718           'Use PropTypes.checkPropTypes() to call them. ' +
1719           'Read more at http://fb.me/use-check-prop-types'
1720         );
1721       };
1722       shim.isRequired = shim;
1723       function getShim() {
1724         return shim;
1725       };
a50b2e 1726       // Important!
GL 1727       // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
be31e2 1728       var ReactPropTypes = {
JB 1729         array: shim,
1730         bool: shim,
1731         func: shim,
1732         number: shim,
1733         object: shim,
1734         string: shim,
1735         symbol: shim,
1736
1737         any: shim,
1738         arrayOf: getShim,
1739         element: shim,
1740         instanceOf: getShim,
1741         node: shim,
1742         objectOf: getShim,
1743         oneOf: getShim,
1744         oneOfType: getShim,
94dde5 1745         shape: getShim,
SE 1746         exact: getShim
be31e2 1747       };
JB 1748
1749       ReactPropTypes.checkPropTypes = emptyFunction;
1750       ReactPropTypes.PropTypes = ReactPropTypes;
1751
1752       return ReactPropTypes;
1753     };
1754
1755
7392ed 1756 /***/ }),
94dde5 1757 /* 12 */
7392ed 1758 /***/ (function(module, exports, __webpack_require__) {
be31e2 1759
JB 1760     /**
94dde5 1761      * Copyright (c) 2013-present, Facebook, Inc.
be31e2 1762      *
94dde5 1763      * This source code is licensed under the MIT license found in the
SE 1764      * LICENSE file in the root directory of this source tree.
be31e2 1765      *
JB 1766      */
1767
1768     'use strict';
1769
94dde5 1770     var React = __webpack_require__(13);
SE 1771     var factory = __webpack_require__(14);
a50b2e 1772
GL 1773     if (typeof React === 'undefined') {
1774       throw Error(
1775         'create-react-class could not find the React object. If you are using script tags, ' +
1776           'make sure that React is being loaded before create-react-class.'
1777       );
1778     }
be31e2 1779
JB 1780     // Hack to grab NoopUpdateQueue from isomorphic React
1781     var ReactNoopUpdateQueue = new React.Component().updater;
1782
1783     module.exports = factory(
1784       React.Component,
1785       React.isValidElement,
1786       ReactNoopUpdateQueue
1787     );
1788
1789
7392ed 1790 /***/ }),
94dde5 1791 /* 13 */
7392ed 1792 /***/ (function(module, exports) {
be31e2 1793
94dde5 1794     module.exports = __WEBPACK_EXTERNAL_MODULE_13__;
be31e2 1795
7392ed 1796 /***/ }),
94dde5 1797 /* 14 */
7392ed 1798 /***/ (function(module, exports, __webpack_require__) {
be31e2 1799
JB 1800     /* WEBPACK VAR INJECTION */(function(process) {/**
94dde5 1801      * Copyright (c) 2013-present, Facebook, Inc.
be31e2 1802      *
94dde5 1803      * This source code is licensed under the MIT license found in the
SE 1804      * LICENSE file in the root directory of this source tree.
be31e2 1805      *
JB 1806      */
1807
1808     'use strict';
1809
94dde5 1810     var _assign = __webpack_require__(15);
be31e2 1811
94dde5 1812     var emptyObject = __webpack_require__(16);
be31e2 1813     var _invariant = __webpack_require__(6);
JB 1814
1815     if (process.env.NODE_ENV !== 'production') {
1816       var warning = __webpack_require__(7);
1817     }
1818
1819     var MIXINS_KEY = 'mixins';
1820
1821     // Helper function to allow the creation of anonymous functions which do not
1822     // have .name set to the name of the variable being assigned to.
1823     function identity(fn) {
1824       return fn;
1825     }
1826
1827     var ReactPropTypeLocationNames;
1828     if (process.env.NODE_ENV !== 'production') {
1829       ReactPropTypeLocationNames = {
1830         prop: 'prop',
1831         context: 'context',
a50b2e 1832         childContext: 'child context'
be31e2 1833       };
JB 1834     } else {
1835       ReactPropTypeLocationNames = {};
1836     }
1837
1838     function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
1839       /**
1840        * Policies that describe methods in `ReactClassInterface`.
1841        */
1842
1843       var injectedMixins = [];
1844
1845       /**
1846        * Composite components are higher-level components that compose other composite
1847        * or host components.
1848        *
1849        * To create a new type of `ReactClass`, pass a specification of
1850        * your new class to `React.createClass`. The only requirement of your class
1851        * specification is that you implement a `render` method.
1852        *
1853        *   var MyComponent = React.createClass({
1854        *     render: function() {
1855        *       return <div>Hello World</div>;
1856        *     }
1857        *   });
1858        *
1859        * The class specification supports a specific protocol of methods that have
1860        * special meaning (e.g. `render`). See `ReactClassInterface` for
1861        * more the comprehensive protocol. Any other properties and methods in the
1862        * class specification will be available on the prototype.
1863        *
1864        * @interface ReactClassInterface
1865        * @internal
1866        */
1867       var ReactClassInterface = {
1868         /**
1869          * An array of Mixin objects to include when defining your component.
1870          *
1871          * @type {array}
1872          * @optional
1873          */
1874         mixins: 'DEFINE_MANY',
1875
1876         /**
1877          * An object containing properties and methods that should be defined on
1878          * the component's constructor instead of its prototype (static methods).
1879          *
1880          * @type {object}
1881          * @optional
1882          */
1883         statics: 'DEFINE_MANY',
1884
1885         /**
1886          * Definition of prop types for this component.
1887          *
1888          * @type {object}
1889          * @optional
1890          */
1891         propTypes: 'DEFINE_MANY',
1892
1893         /**
1894          * Definition of context types for this component.
1895          *
1896          * @type {object}
1897          * @optional
1898          */
1899         contextTypes: 'DEFINE_MANY',
1900
1901         /**
1902          * Definition of context types this component sets for its children.
1903          *
1904          * @type {object}
1905          * @optional
1906          */
1907         childContextTypes: 'DEFINE_MANY',
1908
1909         // ==== Definition methods ====
1910
1911         /**
1912          * Invoked when the component is mounted. Values in the mapping will be set on
1913          * `this.props` if that prop is not specified (i.e. using an `in` check).
1914          *
1915          * This method is invoked before `getInitialState` and therefore cannot rely
1916          * on `this.state` or use `this.setState`.
1917          *
1918          * @return {object}
1919          * @optional
1920          */
1921         getDefaultProps: 'DEFINE_MANY_MERGED',
1922
1923         /**
1924          * Invoked once before the component is mounted. The return value will be used
1925          * as the initial value of `this.state`.
1926          *
1927          *   getInitialState: function() {
1928          *     return {
1929          *       isOn: false,
1930          *       fooBaz: new BazFoo()
1931          *     }
1932          *   }
1933          *
1934          * @return {object}
1935          * @optional
1936          */
1937         getInitialState: 'DEFINE_MANY_MERGED',
1938
1939         /**
1940          * @return {object}
1941          * @optional
1942          */
1943         getChildContext: 'DEFINE_MANY_MERGED',
1944
1945         /**
1946          * Uses props from `this.props` and state from `this.state` to render the
1947          * structure of the component.
1948          *
1949          * No guarantees are made about when or how often this method is invoked, so
1950          * it must not have side effects.
1951          *
1952          *   render: function() {
1953          *     var name = this.props.name;
1954          *     return <div>Hello, {name}!</div>;
1955          *   }
1956          *
1957          * @return {ReactComponent}
1958          * @required
1959          */
1960         render: 'DEFINE_ONCE',
1961
1962         // ==== Delegate methods ====
1963
1964         /**
1965          * Invoked when the component is initially created and about to be mounted.
1966          * This may have side effects, but any external subscriptions or data created
1967          * by this method must be cleaned up in `componentWillUnmount`.
1968          *
1969          * @optional
1970          */
1971         componentWillMount: 'DEFINE_MANY',
1972
1973         /**
1974          * Invoked when the component has been mounted and has a DOM representation.
1975          * However, there is no guarantee that the DOM node is in the document.
1976          *
1977          * Use this as an opportunity to operate on the DOM when the component has
1978          * been mounted (initialized and rendered) for the first time.
1979          *
1980          * @param {DOMElement} rootNode DOM element representing the component.
1981          * @optional
1982          */
1983         componentDidMount: 'DEFINE_MANY',
1984
1985         /**
1986          * Invoked before the component receives new props.
1987          *
1988          * Use this as an opportunity to react to a prop transition by updating the
1989          * state using `this.setState`. Current props are accessed via `this.props`.
1990          *
1991          *   componentWillReceiveProps: function(nextProps, nextContext) {
1992          *     this.setState({
1993          *       likesIncreasing: nextProps.likeCount > this.props.likeCount
1994          *     });
1995          *   }
1996          *
1997          * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
1998          * transition may cause a state change, but the opposite is not true. If you
1999          * need it, you are probably looking for `componentWillUpdate`.
2000          *
2001          * @param {object} nextProps
2002          * @optional
2003          */
2004         componentWillReceiveProps: 'DEFINE_MANY',
2005
2006         /**
2007          * Invoked while deciding if the component should be updated as a result of
2008          * receiving new props, state and/or context.
2009          *
2010          * Use this as an opportunity to `return false` when you're certain that the
2011          * transition to the new props/state/context will not require a component
2012          * update.
2013          *
2014          *   shouldComponentUpdate: function(nextProps, nextState, nextContext) {
2015          *     return !equal(nextProps, this.props) ||
2016          *       !equal(nextState, this.state) ||
2017          *       !equal(nextContext, this.context);
2018          *   }
2019          *
2020          * @param {object} nextProps
2021          * @param {?object} nextState
2022          * @param {?object} nextContext
2023          * @return {boolean} True if the component should update.
2024          * @optional
2025          */
2026         shouldComponentUpdate: 'DEFINE_ONCE',
2027
2028         /**
2029          * Invoked when the component is about to update due to a transition from
2030          * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
2031          * and `nextContext`.
2032          *
2033          * Use this as an opportunity to perform preparation before an update occurs.
2034          *
2035          * NOTE: You **cannot** use `this.setState()` in this method.
2036          *
2037          * @param {object} nextProps
2038          * @param {?object} nextState
2039          * @param {?object} nextContext
2040          * @param {ReactReconcileTransaction} transaction
2041          * @optional
2042          */
2043         componentWillUpdate: 'DEFINE_MANY',
2044
2045         /**
2046          * Invoked when the component's DOM representation has been updated.
2047          *
2048          * Use this as an opportunity to operate on the DOM when the component has
2049          * been updated.
2050          *
2051          * @param {object} prevProps
2052          * @param {?object} prevState
2053          * @param {?object} prevContext
2054          * @param {DOMElement} rootNode DOM element representing the component.
2055          * @optional
2056          */
2057         componentDidUpdate: 'DEFINE_MANY',
2058
2059         /**
2060          * Invoked when the component is about to be removed from its parent and have
2061          * its DOM representation destroyed.
2062          *
2063          * Use this as an opportunity to deallocate any external resources.
2064          *
2065          * NOTE: There is no `componentDidUnmount` since your component will have been
2066          * destroyed by that point.
2067          *
2068          * @optional
2069          */
2070         componentWillUnmount: 'DEFINE_MANY',
2071
94dde5 2072         /**
SE 2073          * Replacement for (deprecated) `componentWillMount`.
2074          *
2075          * @optional
2076          */
2077         UNSAFE_componentWillMount: 'DEFINE_MANY',
2078
2079         /**
2080          * Replacement for (deprecated) `componentWillReceiveProps`.
2081          *
2082          * @optional
2083          */
2084         UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
2085
2086         /**
2087          * Replacement for (deprecated) `componentWillUpdate`.
2088          *
2089          * @optional
2090          */
2091         UNSAFE_componentWillUpdate: 'DEFINE_MANY',
2092
be31e2 2093         // ==== Advanced methods ====
JB 2094
2095         /**
2096          * Updates the component's currently mounted DOM representation.
2097          *
2098          * By default, this implements React's rendering and reconciliation algorithm.
2099          * Sophisticated clients may wish to override this.
2100          *
2101          * @param {ReactReconcileTransaction} transaction
2102          * @internal
2103          * @overridable
2104          */
2105         updateComponent: 'OVERRIDE_BASE'
94dde5 2106       };
SE 2107
2108       /**
2109        * Similar to ReactClassInterface but for static methods.
2110        */
2111       var ReactClassStaticInterface = {
2112         /**
2113          * This method is invoked after a component is instantiated and when it
2114          * receives new props. Return an object to update state in response to
2115          * prop changes. Return null to indicate no change to state.
2116          *
2117          * If an object is returned, its keys will be merged into the existing state.
2118          *
2119          * @return {object || null}
2120          * @optional
2121          */
2122         getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
be31e2 2123       };
JB 2124
2125       /**
2126        * Mapping from class specification keys to special processing functions.
2127        *
2128        * Although these are declared like instance properties in the specification
2129        * when defining classes using `React.createClass`, they are actually static
2130        * and are accessible on the constructor instead of the prototype. Despite
2131        * being static, they must be defined outside of the "statics" key under
2132        * which all other static methods are defined.
2133        */
2134       var RESERVED_SPEC_KEYS = {
a50b2e 2135         displayName: function(Constructor, displayName) {
be31e2 2136           Constructor.displayName = displayName;
JB 2137         },
a50b2e 2138         mixins: function(Constructor, mixins) {
be31e2 2139           if (mixins) {
JB 2140             for (var i = 0; i < mixins.length; i++) {
2141               mixSpecIntoComponent(Constructor, mixins[i]);
2142             }
2143           }
2144         },
a50b2e 2145         childContextTypes: function(Constructor, childContextTypes) {
be31e2 2146           if (process.env.NODE_ENV !== 'production') {
JB 2147             validateTypeDef(Constructor, childContextTypes, 'childContext');
2148           }
a50b2e 2149           Constructor.childContextTypes = _assign(
GL 2150             {},
2151             Constructor.childContextTypes,
2152             childContextTypes
2153           );
be31e2 2154         },
a50b2e 2155         contextTypes: function(Constructor, contextTypes) {
be31e2 2156           if (process.env.NODE_ENV !== 'production') {
JB 2157             validateTypeDef(Constructor, contextTypes, 'context');
2158           }
a50b2e 2159           Constructor.contextTypes = _assign(
GL 2160             {},
2161             Constructor.contextTypes,
2162             contextTypes
2163           );
be31e2 2164         },
JB 2165         /**
2166          * Special case getDefaultProps which should move into statics but requires
2167          * automatic merging.
2168          */
a50b2e 2169         getDefaultProps: function(Constructor, getDefaultProps) {
be31e2 2170           if (Constructor.getDefaultProps) {
a50b2e 2171             Constructor.getDefaultProps = createMergedResultFunction(
GL 2172               Constructor.getDefaultProps,
2173               getDefaultProps
2174             );
be31e2 2175           } else {
JB 2176             Constructor.getDefaultProps = getDefaultProps;
2177           }
2178         },
a50b2e 2179         propTypes: function(Constructor, propTypes) {
be31e2 2180           if (process.env.NODE_ENV !== 'production') {
JB 2181             validateTypeDef(Constructor, propTypes, 'prop');
2182           }
2183           Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
2184         },
a50b2e 2185         statics: function(Constructor, statics) {
be31e2 2186           mixStaticSpecIntoComponent(Constructor, statics);
JB 2187         },
a50b2e 2188         autobind: function() {}
GL 2189       };
be31e2 2190
JB 2191       function validateTypeDef(Constructor, typeDef, location) {
2192         for (var propName in typeDef) {
2193           if (typeDef.hasOwnProperty(propName)) {
2194             // use a warning instead of an _invariant so components
2195             // don't show up in prod but only in __DEV__
a50b2e 2196             if (process.env.NODE_ENV !== 'production') {
GL 2197               warning(
2198                 typeof typeDef[propName] === 'function',
2199                 '%s: %s type `%s` is invalid; it must be a function, usually from ' +
2200                   'React.PropTypes.',
2201                 Constructor.displayName || 'ReactClass',
2202                 ReactPropTypeLocationNames[location],
2203                 propName
2204               );
2205             }
be31e2 2206           }
JB 2207         }
2208       }
2209
2210       function validateMethodOverride(isAlreadyDefined, name) {
a50b2e 2211         var specPolicy = ReactClassInterface.hasOwnProperty(name)
GL 2212           ? ReactClassInterface[name]
2213           : null;
be31e2 2214
JB 2215         // Disallow overriding of base class methods unless explicitly allowed.
2216         if (ReactClassMixin.hasOwnProperty(name)) {
a50b2e 2217           _invariant(
GL 2218             specPolicy === 'OVERRIDE_BASE',
2219             'ReactClassInterface: You are attempting to override ' +
2220               '`%s` from your class specification. Ensure that your method names ' +
2221               'do not overlap with React methods.',
2222             name
2223           );
be31e2 2224         }
JB 2225
2226         // Disallow defining methods more than once unless explicitly allowed.
2227         if (isAlreadyDefined) {
a50b2e 2228           _invariant(
GL 2229             specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
2230             'ReactClassInterface: You are attempting to define ' +
2231               '`%s` on your component more than once. This conflict may be due ' +
2232               'to a mixin.',
2233             name
2234           );
be31e2 2235         }
JB 2236       }
2237
2238       /**
2239        * Mixin helper which handles policy validation and reserved
2240        * specification keys when building React classes.
2241        */
2242       function mixSpecIntoComponent(Constructor, spec) {
2243         if (!spec) {
2244           if (process.env.NODE_ENV !== 'production') {
2245             var typeofSpec = typeof spec;
2246             var isMixinValid = typeofSpec === 'object' && spec !== null;
2247
a50b2e 2248             if (process.env.NODE_ENV !== 'production') {
GL 2249               warning(
2250                 isMixinValid,
2251                 "%s: You're attempting to include a mixin that is either null " +
2252                   'or not an object. Check the mixins included by the component, ' +
2253                   'as well as any mixins they include themselves. ' +
2254                   'Expected object but got %s.',
2255                 Constructor.displayName || 'ReactClass',
2256                 spec === null ? null : typeofSpec
2257               );
2258             }
be31e2 2259           }
JB 2260
2261           return;
2262         }
2263
a50b2e 2264         _invariant(
GL 2265           typeof spec !== 'function',
2266           "ReactClass: You're attempting to " +
2267             'use a component class or function as a mixin. Instead, just use a ' +
2268             'regular object.'
2269         );
2270         _invariant(
2271           !isValidElement(spec),
2272           "ReactClass: You're attempting to " +
2273             'use a component as a mixin. Instead, just use a regular object.'
2274         );
be31e2 2275
JB 2276         var proto = Constructor.prototype;
2277         var autoBindPairs = proto.__reactAutoBindPairs;
2278
2279         // By handling mixins before any other properties, we ensure the same
2280         // chaining order is applied to methods with DEFINE_MANY policy, whether
2281         // mixins are listed before or after these methods in the spec.
2282         if (spec.hasOwnProperty(MIXINS_KEY)) {
2283           RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
2284         }
2285
2286         for (var name in spec) {
2287           if (!spec.hasOwnProperty(name)) {
2288             continue;
2289           }
2290
2291           if (name === MIXINS_KEY) {
2292             // We have already handled mixins in a special case above.
2293             continue;
2294           }
2295
2296           var property = spec[name];
2297           var isAlreadyDefined = proto.hasOwnProperty(name);
2298           validateMethodOverride(isAlreadyDefined, name);
2299
2300           if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
2301             RESERVED_SPEC_KEYS[name](Constructor, property);
2302           } else {
2303             // Setup methods on prototype:
2304             // The following member methods should not be automatically bound:
2305             // 1. Expected ReactClass methods (in the "interface").
2306             // 2. Overridden methods (that were mixed in).
2307             var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
2308             var isFunction = typeof property === 'function';
a50b2e 2309             var shouldAutoBind =
GL 2310               isFunction &&
2311               !isReactClassMethod &&
2312               !isAlreadyDefined &&
2313               spec.autobind !== false;
be31e2 2314
JB 2315             if (shouldAutoBind) {
2316               autoBindPairs.push(name, property);
2317               proto[name] = property;
2318             } else {
2319               if (isAlreadyDefined) {
2320                 var specPolicy = ReactClassInterface[name];
2321
2322                 // These cases should already be caught by validateMethodOverride.
a50b2e 2323                 _invariant(
GL 2324                   isReactClassMethod &&
2325                     (specPolicy === 'DEFINE_MANY_MERGED' ||
2326                       specPolicy === 'DEFINE_MANY'),
2327                   'ReactClass: Unexpected spec policy %s for key %s ' +
2328                     'when mixing in component specs.',
2329                   specPolicy,
2330                   name
2331                 );
be31e2 2332
JB 2333                 // For methods which are defined more than once, call the existing
2334                 // methods before calling the new property, merging if appropriate.
2335                 if (specPolicy === 'DEFINE_MANY_MERGED') {
2336                   proto[name] = createMergedResultFunction(proto[name], property);
2337                 } else if (specPolicy === 'DEFINE_MANY') {
2338                   proto[name] = createChainedFunction(proto[name], property);
2339                 }
2340               } else {
2341                 proto[name] = property;
2342                 if (process.env.NODE_ENV !== 'production') {
2343                   // Add verbose displayName to the function, which helps when looking
2344                   // at profiling tools.
2345                   if (typeof property === 'function' && spec.displayName) {
2346                     proto[name].displayName = spec.displayName + '_' + name;
2347                   }
2348                 }
2349               }
2350             }
2351           }
2352         }
2353       }
2354
2355       function mixStaticSpecIntoComponent(Constructor, statics) {
2356         if (!statics) {
2357           return;
2358         }
94dde5 2359
be31e2 2360         for (var name in statics) {
JB 2361           var property = statics[name];
2362           if (!statics.hasOwnProperty(name)) {
2363             continue;
2364           }
2365
2366           var isReserved = name in RESERVED_SPEC_KEYS;
a50b2e 2367           _invariant(
GL 2368             !isReserved,
2369             'ReactClass: You are attempting to define a reserved ' +
2370               'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
2371               'as an instance property instead; it will still be accessible on the ' +
2372               'constructor.',
2373             name
2374           );
be31e2 2375
94dde5 2376           var isAlreadyDefined = name in Constructor;
SE 2377           if (isAlreadyDefined) {
2378             var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
2379               ? ReactClassStaticInterface[name]
2380               : null;
2381
2382             _invariant(
2383               specPolicy === 'DEFINE_MANY_MERGED',
2384               'ReactClass: You are attempting to define ' +
2385                 '`%s` on your component more than once. This conflict may be ' +
2386                 'due to a mixin.',
2387               name
2388             );
2389
2390             Constructor[name] = createMergedResultFunction(Constructor[name], property);
2391
2392             return;
2393           }
2394
be31e2 2395           Constructor[name] = property;
JB 2396         }
2397       }
2398
2399       /**
2400        * Merge two objects, but throw if both contain the same key.
2401        *
2402        * @param {object} one The first object, which is mutated.
2403        * @param {object} two The second object
2404        * @return {object} one after it has been mutated to contain everything in two.
2405        */
2406       function mergeIntoWithNoDuplicateKeys(one, two) {
a50b2e 2407         _invariant(
GL 2408           one && two && typeof one === 'object' && typeof two === 'object',
2409           'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
2410         );
be31e2 2411
JB 2412         for (var key in two) {
2413           if (two.hasOwnProperty(key)) {
a50b2e 2414             _invariant(
GL 2415               one[key] === undefined,
2416               'mergeIntoWithNoDuplicateKeys(): ' +
2417                 'Tried to merge two objects with the same key: `%s`. This conflict ' +
2418                 'may be due to a mixin; in particular, this may be caused by two ' +
2419                 'getInitialState() or getDefaultProps() methods returning objects ' +
2420                 'with clashing keys.',
2421               key
2422             );
be31e2 2423             one[key] = two[key];
JB 2424           }
2425         }
2426         return one;
2427       }
2428
2429       /**
2430        * Creates a function that invokes two functions and merges their return values.
2431        *
2432        * @param {function} one Function to invoke first.
2433        * @param {function} two Function to invoke second.
2434        * @return {function} Function that invokes the two argument functions.
2435        * @private
2436        */
2437       function createMergedResultFunction(one, two) {
2438         return function mergedResult() {
2439           var a = one.apply(this, arguments);
2440           var b = two.apply(this, arguments);
2441           if (a == null) {
2442             return b;
2443           } else if (b == null) {
2444             return a;
2445           }
2446           var c = {};
2447           mergeIntoWithNoDuplicateKeys(c, a);
2448           mergeIntoWithNoDuplicateKeys(c, b);
2449           return c;
2450         };
2451       }
2452
2453       /**
2454        * Creates a function that invokes two functions and ignores their return vales.
2455        *
2456        * @param {function} one Function to invoke first.
2457        * @param {function} two Function to invoke second.
2458        * @return {function} Function that invokes the two argument functions.
2459        * @private
2460        */
2461       function createChainedFunction(one, two) {
2462         return function chainedFunction() {
2463           one.apply(this, arguments);
2464           two.apply(this, arguments);
2465         };
2466       }
2467
2468       /**
2469        * Binds a method to the component.
2470        *
2471        * @param {object} component Component whose method is going to be bound.
2472        * @param {function} method Method to be bound.
2473        * @return {function} The bound method.
2474        */
2475       function bindAutoBindMethod(component, method) {
2476         var boundMethod = method.bind(component);
2477         if (process.env.NODE_ENV !== 'production') {
2478           boundMethod.__reactBoundContext = component;
2479           boundMethod.__reactBoundMethod = method;
2480           boundMethod.__reactBoundArguments = null;
2481           var componentName = component.constructor.displayName;
2482           var _bind = boundMethod.bind;
a50b2e 2483           boundMethod.bind = function(newThis) {
GL 2484             for (
2485               var _len = arguments.length,
2486                 args = Array(_len > 1 ? _len - 1 : 0),
2487                 _key = 1;
2488               _key < _len;
2489               _key++
2490             ) {
be31e2 2491               args[_key - 1] = arguments[_key];
JB 2492             }
2493
2494             // User is trying to bind() an autobound method; we effectively will
2495             // ignore the value of "this" that the user is trying to use, so
2496             // let's warn.
2497             if (newThis !== component && newThis !== null) {
a50b2e 2498               if (process.env.NODE_ENV !== 'production') {
GL 2499                 warning(
2500                   false,
2501                   'bind(): React component methods may only be bound to the ' +
2502                     'component instance. See %s',
2503                   componentName
2504                 );
2505               }
be31e2 2506             } else if (!args.length) {
a50b2e 2507               if (process.env.NODE_ENV !== 'production') {
GL 2508                 warning(
2509                   false,
2510                   'bind(): You are binding a component method to the component. ' +
2511                     'React does this for you automatically in a high-performance ' +
2512                     'way, so you can safely remove this call. See %s',
2513                   componentName
2514                 );
2515               }
be31e2 2516               return boundMethod;
JB 2517             }
2518             var reboundMethod = _bind.apply(boundMethod, arguments);
2519             reboundMethod.__reactBoundContext = component;
2520             reboundMethod.__reactBoundMethod = method;
2521             reboundMethod.__reactBoundArguments = args;
2522             return reboundMethod;
2523           };
2524         }
2525         return boundMethod;
2526       }
2527
2528       /**
2529        * Binds all auto-bound methods in a component.
2530        *
2531        * @param {object} component Component whose method is going to be bound.
2532        */
2533       function bindAutoBindMethods(component) {
2534         var pairs = component.__reactAutoBindPairs;
2535         for (var i = 0; i < pairs.length; i += 2) {
2536           var autoBindKey = pairs[i];
2537           var method = pairs[i + 1];
2538           component[autoBindKey] = bindAutoBindMethod(component, method);
2539         }
2540       }
2541
a50b2e 2542       var IsMountedPreMixin = {
GL 2543         componentDidMount: function() {
be31e2 2544           this.__isMounted = true;
a50b2e 2545         }
GL 2546       };
2547
2548       var IsMountedPostMixin = {
2549         componentWillUnmount: function() {
be31e2 2550           this.__isMounted = false;
JB 2551         }
2552       };
2553
2554       /**
2555        * Add more to the ReactClass base class. These are all legacy features and
2556        * therefore not already part of the modern ReactComponent.
2557        */
2558       var ReactClassMixin = {
2559         /**
2560          * TODO: This will be deprecated because state should always keep a consistent
2561          * type signature and the only use case for this, is to avoid that.
2562          */
a50b2e 2563         replaceState: function(newState, callback) {
be31e2 2564           this.updater.enqueueReplaceState(this, newState, callback);
JB 2565         },
2566
2567         /**
2568          * Checks whether or not this composite component is mounted.
2569          * @return {boolean} True if mounted, false otherwise.
2570          * @protected
2571          * @final
2572          */
a50b2e 2573         isMounted: function() {
be31e2 2574           if (process.env.NODE_ENV !== 'production') {
a50b2e 2575             warning(
GL 2576               this.__didWarnIsMounted,
2577               '%s: isMounted is deprecated. Instead, make sure to clean up ' +
2578                 'subscriptions and pending requests in componentWillUnmount to ' +
2579                 'prevent memory leaks.',
2580               (this.constructor && this.constructor.displayName) ||
2581                 this.name ||
2582                 'Component'
2583             );
be31e2 2584             this.__didWarnIsMounted = true;
JB 2585           }
2586           return !!this.__isMounted;
2587         }
2588       };
2589
a50b2e 2590       var ReactClassComponent = function() {};
GL 2591       _assign(
2592         ReactClassComponent.prototype,
2593         ReactComponent.prototype,
2594         ReactClassMixin
2595       );
be31e2 2596
JB 2597       /**
2598        * Creates a composite component class given a class specification.
2599        * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
2600        *
2601        * @param {object} spec Class specification (which must define `render`).
2602        * @return {function} Component constructor function.
2603        * @public
2604        */
2605       function createClass(spec) {
2606         // To keep our warnings more understandable, we'll use a little hack here to
2607         // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
2608         // unnecessarily identify a class without displayName as 'Constructor'.
a50b2e 2609         var Constructor = identity(function(props, context, updater) {
be31e2 2610           // This constructor gets overridden by mocks. The argument is used
JB 2611           // by mocks to assert on what gets mounted.
2612
2613           if (process.env.NODE_ENV !== 'production') {
a50b2e 2614             warning(
GL 2615               this instanceof Constructor,
2616               'Something is calling a React component directly. Use a factory or ' +
2617                 'JSX instead. See: https://fb.me/react-legacyfactory'
2618             );
be31e2 2619           }
JB 2620
2621           // Wire up auto-binding
2622           if (this.__reactAutoBindPairs.length) {
2623             bindAutoBindMethods(this);
2624           }
2625
2626           this.props = props;
2627           this.context = context;
2628           this.refs = emptyObject;
2629           this.updater = updater || ReactNoopUpdateQueue;
2630
2631           this.state = null;
2632
2633           // ReactClasses doesn't have constructors. Instead, they use the
2634           // getInitialState and componentWillMount methods for initialization.
2635
2636           var initialState = this.getInitialState ? this.getInitialState() : null;
2637           if (process.env.NODE_ENV !== 'production') {
2638             // We allow auto-mocks to proceed as if they're returning null.
a50b2e 2639             if (
GL 2640               initialState === undefined &&
2641               this.getInitialState._isMockFunction
2642             ) {
be31e2 2643               // This is probably bad practice. Consider warning here and
JB 2644               // deprecating this convenience.
2645               initialState = null;
2646             }
2647           }
a50b2e 2648           _invariant(
GL 2649             typeof initialState === 'object' && !Array.isArray(initialState),
2650             '%s.getInitialState(): must return an object or null',
2651             Constructor.displayName || 'ReactCompositeComponent'
2652           );
be31e2 2653
JB 2654           this.state = initialState;
2655         });
2656         Constructor.prototype = new ReactClassComponent();
2657         Constructor.prototype.constructor = Constructor;
2658         Constructor.prototype.__reactAutoBindPairs = [];
2659
2660         injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
2661
a50b2e 2662         mixSpecIntoComponent(Constructor, IsMountedPreMixin);
be31e2 2663         mixSpecIntoComponent(Constructor, spec);
a50b2e 2664         mixSpecIntoComponent(Constructor, IsMountedPostMixin);
be31e2 2665
JB 2666         // Initialize the defaultProps property after all mixins have been merged.
2667         if (Constructor.getDefaultProps) {
2668           Constructor.defaultProps = Constructor.getDefaultProps();
2669         }
2670
2671         if (process.env.NODE_ENV !== 'production') {
2672           // This is a tag to indicate that the use of these method names is ok,
2673           // since it's used with createClass. If it's not, then it's likely a
2674           // mistake so we'll warn you to use the static property, property
2675           // initializer or constructor respectively.
2676           if (Constructor.getDefaultProps) {
2677             Constructor.getDefaultProps.isReactClassApproved = {};
2678           }
2679           if (Constructor.prototype.getInitialState) {
2680             Constructor.prototype.getInitialState.isReactClassApproved = {};
2681           }
2682         }
2683
a50b2e 2684         _invariant(
GL 2685           Constructor.prototype.render,
2686           'createClass(...): Class specification must implement a `render` method.'
2687         );
be31e2 2688
JB 2689         if (process.env.NODE_ENV !== 'production') {
a50b2e 2690           warning(
GL 2691             !Constructor.prototype.componentShouldUpdate,
2692             '%s has a method called ' +
2693               'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
2694               'The name is phrased as a question because the function is ' +
2695               'expected to return a value.',
2696             spec.displayName || 'A component'
2697           );
2698           warning(
2699             !Constructor.prototype.componentWillRecieveProps,
2700             '%s has a method called ' +
2701               'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
2702             spec.displayName || 'A component'
2703           );
94dde5 2704           warning(
SE 2705             !Constructor.prototype.UNSAFE_componentWillRecieveProps,
2706             '%s has a method called UNSAFE_componentWillRecieveProps(). ' +
2707               'Did you mean UNSAFE_componentWillReceiveProps()?',
2708             spec.displayName || 'A component'
2709           );
be31e2 2710         }
JB 2711
2712         // Reduce time spent doing lookups by setting these on the prototype.
2713         for (var methodName in ReactClassInterface) {
2714           if (!Constructor.prototype[methodName]) {
2715             Constructor.prototype[methodName] = null;
2716           }
2717         }
2718
2719         return Constructor;
2720       }
2721
2722       return createClass;
2723     }
2724
2725     module.exports = factory;
2726
2727     /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
2728
7392ed 2729 /***/ }),
94dde5 2730 /* 15 */
7392ed 2731 /***/ (function(module, exports) {
be31e2 2732
JB 2733     /*
2734     object-assign
2735     (c) Sindre Sorhus
2736     @license MIT
2737     */
2738
2739     'use strict';
2740     /* eslint-disable no-unused-vars */
2741     var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2742     var hasOwnProperty = Object.prototype.hasOwnProperty;
2743     var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2744
2745     function toObject(val) {
2746         if (val === null || val === undefined) {
2747             throw new TypeError('Object.assign cannot be called with null or undefined');
2748         }
2749
2750         return Object(val);
2751     }
2752
2753     function shouldUseNative() {
2754         try {
2755             if (!Object.assign) {
2756                 return false;
2757             }
2758
2759             // Detect buggy property enumeration order in older V8 versions.
2760
2761             // https://bugs.chromium.org/p/v8/issues/detail?id=4118
2762             var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
2763             test1[5] = 'de';
2764             if (Object.getOwnPropertyNames(test1)[0] === '5') {
2765                 return false;
2766             }
2767
2768             // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2769             var test2 = {};
2770             for (var i = 0; i < 10; i++) {
2771                 test2['_' + String.fromCharCode(i)] = i;
2772             }
2773             var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
2774                 return test2[n];
2775             });
2776             if (order2.join('') !== '0123456789') {
2777                 return false;
2778             }
2779
2780             // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2781             var test3 = {};
2782             'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
2783                 test3[letter] = letter;
2784             });
2785             if (Object.keys(Object.assign({}, test3)).join('') !==
2786                     'abcdefghijklmnopqrst') {
2787                 return false;
2788             }
2789
2790             return true;
2791         } catch (err) {
2792             // We don't expect any of the above to throw, but better to be safe.
2793             return false;
2794         }
2795     }
2796
2797     module.exports = shouldUseNative() ? Object.assign : function (target, source) {
2798         var from;
2799         var to = toObject(target);
2800         var symbols;
2801
2802         for (var s = 1; s < arguments.length; s++) {
2803             from = Object(arguments[s]);
2804
2805             for (var key in from) {
2806                 if (hasOwnProperty.call(from, key)) {
2807                     to[key] = from[key];
2808                 }
2809             }
2810
2811             if (getOwnPropertySymbols) {
2812                 symbols = getOwnPropertySymbols(from);
2813                 for (var i = 0; i < symbols.length; i++) {
2814                     if (propIsEnumerable.call(from, symbols[i])) {
2815                         to[symbols[i]] = from[symbols[i]];
2816                     }
2817                 }
2818             }
2819         }
2820
2821         return to;
2822     };
2823
2824
7392ed 2825 /***/ }),
94dde5 2826 /* 16 */
7392ed 2827 /***/ (function(module, exports, __webpack_require__) {
be31e2 2828
JB 2829     /* WEBPACK VAR INJECTION */(function(process) {/**
2830      * Copyright (c) 2013-present, Facebook, Inc.
2831      *
94dde5 2832      * This source code is licensed under the MIT license found in the
SE 2833      * LICENSE file in the root directory of this source tree.
be31e2 2834      *
JB 2835      */
2836
2837     'use strict';
2838
2839     var emptyObject = {};
2840
2841     if (process.env.NODE_ENV !== 'production') {
2842       Object.freeze(emptyObject);
2843     }
2844
2845     module.exports = emptyObject;
2846     /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
2847
7392ed 2848 /***/ }),
94dde5 2849 /* 17 */
7392ed 2850 /***/ (function(module, exports) {
be31e2 2851
94dde5 2852     module.exports = __WEBPACK_EXTERNAL_MODULE_17__;
be31e2 2853
7392ed 2854 /***/ }),
94dde5 2855 /* 18 */
7392ed 2856 /***/ (function(module, exports, __webpack_require__) {
be31e2 2857
833531 2858     'use strict';
SE 2859
94dde5 2860     var React = __webpack_require__(13),
SE 2861         createClass = __webpack_require__(12),
2862         DaysView = __webpack_require__(19),
39b827 2863         MonthsView = __webpack_require__(22),
LA 2864         YearsView = __webpack_require__(23),
2865         TimeView = __webpack_require__(24)
8f6f33 2866         ;
7750ac 2867
be31e2 2868     var CalendarContainer = createClass({
7750ac 2869         viewComponents: {
JM 2870             days: DaysView,
2871             months: MonthsView,
2872             years: YearsView,
2873             time: TimeView
2874         },
2875
8f6f33 2876         render: function() {
LA 2877             return React.createElement( this.viewComponents[ this.props.view ], this.props.viewProps );
2878         }
11612b 2879     });
7750ac 2880
JM 2881     module.exports = CalendarContainer;
2882
2883
7392ed 2884 /***/ }),
94dde5 2885 /* 19 */
7392ed 2886 /***/ (function(module, exports, __webpack_require__) {
d76f7b 2887
be9654 2888     'use strict';
SE 2889
94dde5 2890     var React = __webpack_require__(13),
SE 2891         createClass = __webpack_require__(12),
2892         moment = __webpack_require__(17),
2893         onClickOutside = __webpack_require__(20).default
8f6f33 2894         ;
be9654 2895
be31e2 2896     var DateTimePickerDays = onClickOutside( createClass({
be9654 2897         render: function() {
SE 2898             var footer = this.renderFooter(),
2899                 date = this.props.viewDate,
2900                 locale = date.localeData(),
2901                 tableChildren
8f6f33 2902                 ;
be9654 2903
SE 2904             tableChildren = [
a50b2e 2905                 React.createElement('thead', { key: 'th' }, [
GL 2906                     React.createElement('tr', { key: 'h' }, [
2907                         React.createElement('th', { key: 'p', className: 'rdtPrev', onClick: this.props.subtractTime( 1, 'months' )}, React.createElement('span', {}, '‹' )),
2908                         React.createElement('th', { key: 's', className: 'rdtSwitch', onClick: this.props.showView( 'months' ), colSpan: 5, 'data-value': this.props.viewDate.month() }, locale.months( date ) + ' ' + date.year() ),
2909                         React.createElement('th', { key: 'n', className: 'rdtNext', onClick: this.props.addTime( 1, 'months' )}, React.createElement('span', {}, '›' ))
be9654 2910                     ]),
a50b2e 2911                     React.createElement('tr', { key: 'd'}, this.getDaysOfWeek( locale ).map( function( day, index ) { return React.createElement('th', { key: day + index, className: 'dow'}, day ); }) )
be9654 2912                 ]),
a50b2e 2913                 React.createElement('tbody', { key: 'tb' }, this.renderDays())
be9654 2914             ];
SE 2915
2916             if ( footer )
2917                 tableChildren.push( footer );
2918
a50b2e 2919             return React.createElement('div', { className: 'rdtDays' },
GL 2920                 React.createElement('table', {}, tableChildren )
be9654 2921             );
SE 2922         },
2923
2924         /**
2925          * Get a list of the days of the week
2926          * depending on the current locale
2927          * @return {array} A list with the shortname of the days
2928          */
2929         getDaysOfWeek: function( locale ) {
2930             var days = locale._weekdaysMin,
2931                 first = locale.firstDayOfWeek(),
2932                 dow = [],
2933                 i = 0
8f6f33 2934                 ;
be9654 2935
SE 2936             days.forEach( function( day ) {
2937                 dow[ (7 + ( i++ ) - first) % 7 ] = day;
2938             });
2939
2940             return dow;
2941         },
2942
2943         renderDays: function() {
2944             var date = this.props.viewDate,
2945                 selected = this.props.selectedDate && this.props.selectedDate.clone(),
2946                 prevMonth = date.clone().subtract( 1, 'months' ),
2947                 currentYear = date.year(),
2948                 currentMonth = date.month(),
2949                 weeks = [],
2950                 days = [],
2951                 renderer = this.props.renderDay || this.renderDay,
2952                 isValid = this.props.isValidDate || this.alwaysValidDate,
2953                 classes, isDisabled, dayProps, currentDate
8f6f33 2954                 ;
be9654 2955
SE 2956             // Go to the last week of the previous month
2957             prevMonth.date( prevMonth.daysInMonth() ).startOf( 'week' );
2958             var lastDay = prevMonth.clone().add( 42, 'd' );
2959
2960             while ( prevMonth.isBefore( lastDay ) ) {
2961                 classes = 'rdtDay';
2962                 currentDate = prevMonth.clone();
2963
2964                 if ( ( prevMonth.year() === currentYear && prevMonth.month() < currentMonth ) || ( prevMonth.year() < currentYear ) )
2965                     classes += ' rdtOld';
2966                 else if ( ( prevMonth.year() === currentYear && prevMonth.month() > currentMonth ) || ( prevMonth.year() > currentYear ) )
2967                     classes += ' rdtNew';
2968
2969                 if ( selected && prevMonth.isSame( selected, 'day' ) )
2970                     classes += ' rdtActive';
2971
7750ac 2972                 if ( prevMonth.isSame( moment(), 'day' ) )
be9654 2973                     classes += ' rdtToday';
SE 2974
2975                 isDisabled = !isValid( currentDate, selected );
2976                 if ( isDisabled )
2977                     classes += ' rdtDisabled';
2978
2979                 dayProps = {
2980                     key: prevMonth.format( 'M_D' ),
2981                     'data-value': prevMonth.date(),
2982                     className: classes
2983                 };
2984
2985                 if ( !isDisabled )
2986                     dayProps.onClick = this.updateSelectedDate;
2987
2988                 days.push( renderer( dayProps, currentDate, selected ) );
2989
2990                 if ( days.length === 7 ) {
a50b2e 2991                     weeks.push( React.createElement('tr', { key: prevMonth.format( 'M_D' )}, days ) );
be9654 2992                     days = [];
SE 2993                 }
2994
2995                 prevMonth.add( 1, 'd' );
2996             }
2997
2998             return weeks;
2999         },
3000
3001         updateSelectedDate: function( event ) {
3002             this.props.updateSelectedDate( event, true );
3003         },
3004
3005         renderDay: function( props, currentDate ) {
a50b2e 3006             return React.createElement('td',  props, currentDate.date() );
be9654 3007         },
SE 3008
3009         renderFooter: function() {
3010             if ( !this.props.timeFormat )
3011                 return '';
3012
3013             var date = this.props.selectedDate || this.props.viewDate;
3014
a50b2e 3015             return React.createElement('tfoot', { key: 'tf'},
GL 3016                 React.createElement('tr', {},
3017                     React.createElement('td', { onClick: this.props.showView( 'time' ), colSpan: 7, className: 'rdtTimeToggle' }, date.format( this.props.timeFormat ))
be9654 3018                 )
SE 3019             );
3020         },
3021
3022         alwaysValidDate: function() {
3023             return 1;
11612b 3024         },
JM 3025
8f6f33 3026         handleClickOutside: function() {
LA 3027             this.props.handleClickOutside();
3028         }
11612b 3029     }));
be9654 3030
SE 3031     module.exports = DateTimePickerDays;
3032
d76f7b 3033
7392ed 3034 /***/ }),
94dde5 3035 /* 20 */
7392ed 3036 /***/ (function(module, exports, __webpack_require__) {
d76f7b 3037
39b827 3038     'use strict';
LA 3039
94dde5 3040     Object.defineProperty(exports, '__esModule', { value: true });
39b827 3041
94dde5 3042     var react = __webpack_require__(13);
SE 3043     var reactDom = __webpack_require__(21);
39b827 3044
94dde5 3045     function _inheritsLoose(subClass, superClass) {
SE 3046       subClass.prototype = Object.create(superClass.prototype);
3047       subClass.prototype.constructor = subClass;
3048       subClass.__proto__ = superClass;
3049     }
39b827 3050
94dde5 3051     function _objectWithoutProperties(source, excluded) {
SE 3052       if (source == null) return {};
3053       var target = {};
3054       var sourceKeys = Object.keys(source);
3055       var key, i;
39b827 3056
94dde5 3057       for (i = 0; i < sourceKeys.length; i++) {
SE 3058         key = sourceKeys[i];
3059         if (excluded.indexOf(key) >= 0) continue;
3060         target[key] = source[key];
3061       }
39b827 3062
94dde5 3063       if (Object.getOwnPropertySymbols) {
SE 3064         var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
39b827 3065
94dde5 3066         for (i = 0; i < sourceSymbolKeys.length; i++) {
SE 3067           key = sourceSymbolKeys[i];
3068           if (excluded.indexOf(key) >= 0) continue;
3069           if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
3070           target[key] = source[key];
3071         }
3072       }
39b827 3073
94dde5 3074       return target;
SE 3075     }
39b827 3076
LA 3077     /**
94dde5 3078      * Check whether some DOM node is our Component's node.
7750ac 3079      */
94dde5 3080     function isNodeFound(current, componentNode, ignoreClass) {
SE 3081       if (current === componentNode) {
3082         return true;
3083       } // SVG <use/> elements do not technically reside in the rendered DOM, so
3084       // they do not have classList directly, but they offer a link to their
3085       // corresponding element, which can have classList. This extra check is for
3086       // that case.
3087       // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement
3088       // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17
be9654 3089
94dde5 3090
SE 3091       if (current.correspondingElement) {
3092         return current.correspondingElement.classList.contains(ignoreClass);
3093       }
3094
3095       return current.classList.contains(ignoreClass);
3096     }
3097     /**
3098      * Try to find our node in a hierarchy of nodes, returning the document
3099      * node as highest node if our node is not found in the path up.
3100      */
3101
3102     function findHighest(current, componentNode, ignoreClass) {
3103       if (current === componentNode) {
3104         return true;
3105       } // If source=local then this event came from 'somewhere'
3106       // inside and should be ignored. We could handle this with
3107       // a layered approach, too, but that requires going back to
3108       // thinking in terms of Dom node nesting, running counter
3109       // to React's 'you shouldn't care about the DOM' philosophy.
3110
3111
3112       while (current.parentNode) {
3113         if (isNodeFound(current, componentNode, ignoreClass)) {
3114           return true;
3115         }
3116
3117         current = current.parentNode;
3118       }
3119
3120       return current;
3121     }
3122     /**
3123      * Check if the browser scrollbar was clicked
3124      */
3125
3126     function clickedScrollbar(evt) {
3127       return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;
3128     }
3129
3130     // ideally will get replaced with external dep
3131     // when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in
3132     var testPassiveEventSupport = function testPassiveEventSupport() {
3133       if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {
3134         return;
3135       }
3136
3137       var passive = false;
3138       var options = Object.defineProperty({}, 'passive', {
3139         get: function get() {
3140           passive = true;
3141         }
3142       });
3143
3144       var noop = function noop() {};
3145
3146       window.addEventListener('testPassiveEventSupport', noop, options);
3147       window.removeEventListener('testPassiveEventSupport', noop, options);
3148       return passive;
3149     };
3150
3151     function autoInc(seed) {
3152       if (seed === void 0) {
3153         seed = 0;
3154       }
3155
3156       return function () {
3157         return ++seed;
3158       };
3159     }
3160
3161     var uid = autoInc();
3162
3163     var passiveEventSupport;
3164     var handlersMap = {};
3165     var enabledInstances = {};
39b827 3166     var touchEvents = ['touchstart', 'touchmove'];
94dde5 3167     var IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';
SE 3168     /**
3169      * Options for addEventHandler and removeEventHandler
3170      */
be9654 3171
94dde5 3172     function getEventHandlerOptions(instance, eventName) {
SE 3173       var handlerOptions = null;
3174       var isTouchEvent = touchEvents.indexOf(eventName) !== -1;
3175
3176       if (isTouchEvent && passiveEventSupport) {
3177         handlerOptions = {
3178           passive: !instance.props.preventDefault
3179         };
3180       }
3181
3182       return handlerOptions;
3183     }
39b827 3184     /**
LA 3185      * This function generates the HOC function that you'll use
3186      * in order to impart onOutsideClick listening to an
3187      * arbitrary component. It gets called at the end of the
3188      * bootstrapping code to yield an instance of the
3189      * onClickOutsideHOC function defined inside setupHOC().
3190      */
94dde5 3191
SE 3192
39b827 3193     function onClickOutsideHOC(WrappedComponent, config) {
94dde5 3194       var _class, _temp;
be9654 3195
94dde5 3196       return _temp = _class =
SE 3197       /*#__PURE__*/
3198       function (_Component) {
3199         _inheritsLoose(onClickOutside, _Component);
be9654 3200
94dde5 3201         function onClickOutside(props) {
SE 3202           var _this;
39b827 3203
94dde5 3204           _this = _Component.call(this, props) || this;
39b827 3205
94dde5 3206           _this.__outsideClickHandler = function (event) {
SE 3207             if (typeof _this.__clickOutsideHandlerProp === 'function') {
3208               _this.__clickOutsideHandlerProp(event);
39b827 3209
94dde5 3210               return;
SE 3211             }
3212
3213             var instance = _this.getInstance();
3214
3215             if (typeof instance.props.handleClickOutside === 'function') {
3216               instance.props.handleClickOutside(event);
3217               return;
3218             }
3219
3220             if (typeof instance.handleClickOutside === 'function') {
3221               instance.handleClickOutside(event);
3222               return;
3223             }
3224
3225             throw new Error('WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.');
3226           };
3227
3228           _this.enableOnClickOutside = function () {
3229             if (typeof document === 'undefined' || enabledInstances[_this._uid]) {
3230               return;
3231             }
3232
3233             if (typeof passiveEventSupport === 'undefined') {
3234               passiveEventSupport = testPassiveEventSupport();
3235             }
3236
3237             enabledInstances[_this._uid] = true;
3238             var events = _this.props.eventTypes;
3239
3240             if (!events.forEach) {
3241               events = [events];
3242             }
3243
3244             handlersMap[_this._uid] = function (event) {
3245               if (_this.props.disableOnClickOutside) return;
3246               if (_this.componentNode === null) return;
3247
3248               if (_this.props.preventDefault) {
3249                 event.preventDefault();
3250               }
3251
3252               if (_this.props.stopPropagation) {
3253                 event.stopPropagation();
3254               }
3255
3256               if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;
3257               var current = event.target;
3258
3259               if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {
3260                 return;
3261               }
3262
3263               _this.__outsideClickHandler(event);
3264             };
3265
3266             events.forEach(function (eventName) {
3267               document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));
3268             });
3269           };
3270
3271           _this.disableOnClickOutside = function () {
3272             delete enabledInstances[_this._uid];
3273             var fn = handlersMap[_this._uid];
3274
39b827 3275             if (fn && typeof document !== 'undefined') {
LA 3276               var events = _this.props.eventTypes;
94dde5 3277
39b827 3278               if (!events.forEach) {
LA 3279                 events = [events];
3280               }
3281
3282               events.forEach(function (eventName) {
94dde5 3283                 return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));
39b827 3284               });
94dde5 3285               delete handlersMap[_this._uid];
39b827 3286             }
94dde5 3287           };
SE 3288
3289           _this.getRef = function (ref) {
39b827 3290             return _this.instanceRef = ref;
94dde5 3291           };
be9654 3292
94dde5 3293           _this._uid = uid();
SE 3294           return _this;
3295         }
39b827 3296         /**
LA 3297          * Access the WrappedComponent's instance.
3298          */
94dde5 3299
SE 3300
3301         var _proto = onClickOutside.prototype;
3302
3303         _proto.getInstance = function getInstance() {
39b827 3304           if (!WrappedComponent.prototype.isReactComponent) {
LA 3305             return this;
3306           }
94dde5 3307
39b827 3308           var ref = this.instanceRef;
LA 3309           return ref.getInstance ? ref.getInstance() : ref;
3310         };
3311
3312         /**
3313          * Add click listeners to the current document,
3314          * linked to this component's state.
3315          */
94dde5 3316         _proto.componentDidMount = function componentDidMount() {
39b827 3317           // If we are in an environment without a DOM such
LA 3318           // as shallow rendering or snapshots then we exit
3319           // early to prevent any unhandled errors being thrown.
3320           if (typeof document === 'undefined' || !document.createElement) {
7750ac 3321             return;
JM 3322           }
be9654 3323
39b827 3324           var instance = this.getInstance();
be9654 3325
39b827 3326           if (config && typeof config.handleClickOutside === 'function') {
LA 3327             this.__clickOutsideHandlerProp = config.handleClickOutside(instance);
94dde5 3328
39b827 3329             if (typeof this.__clickOutsideHandlerProp !== 'function') {
LA 3330               throw new Error('WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.');
7750ac 3331             }
39b827 3332           }
7750ac 3333
94dde5 3334           this.componentNode = reactDom.findDOMNode(this.getInstance());
SE 3335           this.enableOnClickOutside();
7750ac 3336         };
JM 3337
94dde5 3338         _proto.componentDidUpdate = function componentDidUpdate() {
SE 3339           this.componentNode = reactDom.findDOMNode(this.getInstance());
39b827 3340         };
LA 3341         /**
3342          * Remove all document's event listeners for this component
3343          */
3344
3345
94dde5 3346         _proto.componentWillUnmount = function componentWillUnmount() {
SE 3347           this.disableOnClickOutside();
39b827 3348         };
LA 3349         /**
3350          * Can be called to explicitly enable event listening
3351          * for clicks and touches outside of this element.
3352          */
3353
3354
3355         /**
3356          * Pass-through render
3357          */
94dde5 3358         _proto.render = function render() {
SE 3359           // eslint-disable-next-line no-unused-vars
3360           var _props = this.props,
3361               excludeScrollbar = _props.excludeScrollbar,
3362               props = _objectWithoutProperties(_props, ["excludeScrollbar"]);
39b827 3363
LA 3364           if (WrappedComponent.prototype.isReactComponent) {
3365             props.ref = this.getRef;
3366           } else {
3367             props.wrappedRef = this.getRef;
3368           }
3369
3370           props.disableOnClickOutside = this.disableOnClickOutside;
3371           props.enableOnClickOutside = this.enableOnClickOutside;
94dde5 3372           return react.createElement(WrappedComponent, props);
39b827 3373         };
LA 3374
3375         return onClickOutside;
94dde5 3376       }(react.Component), _class.displayName = "OnClickOutside(" + (WrappedComponent.displayName || WrappedComponent.name || 'Component') + ")", _class.defaultProps = {
39b827 3377         eventTypes: ['mousedown', 'touchstart'],
LA 3378         excludeScrollbar: config && config.excludeScrollbar || false,
3379         outsideClickIgnoreClass: IGNORE_CLASS_NAME,
3380         preventDefault: false,
3381         stopPropagation: false
3382       }, _class.getClass = function () {
3383         return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;
94dde5 3384       }, _temp;
39b827 3385     }
d359eb 3386
94dde5 3387     exports.IGNORE_CLASS_NAME = IGNORE_CLASS_NAME;
SE 3388     exports['default'] = onClickOutsideHOC;
d359eb 3389
11612b 3390
7392ed 3391 /***/ }),
be31e2 3392 /* 21 */
39b827 3393 /***/ (function(module, exports) {
LA 3394
94dde5 3395     module.exports = __WEBPACK_EXTERNAL_MODULE_21__;
39b827 3396
LA 3397 /***/ }),
3398 /* 22 */
7392ed 3399 /***/ (function(module, exports, __webpack_require__) {
11612b 3400
JM 3401     'use strict';
3402
94dde5 3403     var React = __webpack_require__(13),
SE 3404         createClass = __webpack_require__(12),
3405         onClickOutside = __webpack_require__(20).default
8f6f33 3406         ;
11612b 3407
be31e2 3408     var DateTimePickerMonths = onClickOutside( createClass({
11612b 3409         render: function() {
a50b2e 3410             return React.createElement('div', { className: 'rdtMonths' }, [
GL 3411                 React.createElement('table', { key: 'a' }, React.createElement('thead', {}, React.createElement('tr', {}, [
3412                     React.createElement('th', { key: 'prev', className: 'rdtPrev', onClick: this.props.subtractTime( 1, 'years' )}, React.createElement('span', {}, '‹' )),
3413                     React.createElement('th', { key: 'year', className: 'rdtSwitch', onClick: this.props.showView( 'years' ), colSpan: 2, 'data-value': this.props.viewDate.year() }, this.props.viewDate.year() ),
3414                     React.createElement('th', { key: 'next', className: 'rdtNext', onClick: this.props.addTime( 1, 'years' )}, React.createElement('span', {}, '›' ))
11612b 3415                 ]))),
a50b2e 3416                 React.createElement('table', { key: 'months' }, React.createElement('tbody', { key: 'b' }, this.renderMonths()))
11612b 3417             ]);
JM 3418         },
3419
3420         renderMonths: function() {
3421             var date = this.props.selectedDate,
3422                 month = this.props.viewDate.month(),
3423                 year = this.props.viewDate.year(),
3424                 rows = [],
3425                 i = 0,
3426                 months = [],
3427                 renderer = this.props.renderMonth || this.renderMonth,
3428                 isValid = this.props.isValidDate || this.alwaysValidDate,
3429                 classes, props, currentMonth, isDisabled, noOfDaysInMonth, daysInMonth, validDay,
3430                 // Date is irrelevant because we're only interested in month
3431                 irrelevantDate = 1
8f6f33 3432                 ;
11612b 3433
JM 3434             while (i < 12) {
3435                 classes = 'rdtMonth';
3436                 currentMonth =
3437                     this.props.viewDate.clone().set({ year: year, month: i, date: irrelevantDate });
3438
3439                 noOfDaysInMonth = currentMonth.endOf( 'month' ).format( 'D' );
3440                 daysInMonth = Array.from({ length: noOfDaysInMonth }, function( e, i ) {
3441                     return i + 1;
3442                 });
3443
3444                 validDay = daysInMonth.find(function( d ) {
3445                     var day = currentMonth.clone().set( 'date', d );
3446                     return isValid( day );
3447                 });
3448
3449                 isDisabled = ( validDay === undefined );
3450
3451                 if ( isDisabled )
3452                     classes += ' rdtDisabled';
3453
7d7b99 3454                 if ( date && i === date.month() && year === date.year() )
11612b 3455                     classes += ' rdtActive';
JM 3456
3457                 props = {
3458                     key: i,
3459                     'data-value': i,
3460                     className: classes
3461                 };
3462
3463                 if ( !isDisabled )
3464                     props.onClick = ( this.props.updateOn === 'months' ?
3465                         this.updateSelectedMonth : this.props.setDate( 'month' ) );
3466
3467                 months.push( renderer( props, i, year, date && date.clone() ) );
3468
3469                 if ( months.length === 4 ) {
a50b2e 3470                     rows.push( React.createElement('tr', { key: month + '_' + rows.length }, months ) );
11612b 3471                     months = [];
JM 3472                 }
3473
3474                 i++;
3475             }
3476
3477             return rows;
3478         },
3479
3480         updateSelectedMonth: function( event ) {
3481             this.props.updateSelectedDate( event );
3482         },
3483
3484         renderMonth: function( props, month ) {
3485             var localMoment = this.props.viewDate;
3486             var monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );
3487             var strLength = 3;
3488             // Because some months are up to 5 characters long, we want to
3489             // use a fixed string length for consistency
3490             var monthStrFixedLength = monthStr.substring( 0, strLength );
a50b2e 3491             return React.createElement('td', props, capitalize( monthStrFixedLength ) );
11612b 3492         },
JM 3493
3494         alwaysValidDate: function() {
3495             return 1;
3496         },
3497
8f6f33 3498         handleClickOutside: function() {
LA 3499             this.props.handleClickOutside();
3500         }
11612b 3501     }));
JM 3502
3503     function capitalize( str ) {
3504         return str.charAt( 0 ).toUpperCase() + str.slice( 1 );
3505     }
3506
3507     module.exports = DateTimePickerMonths;
3508
3509
7392ed 3510 /***/ }),
39b827 3511 /* 23 */
7392ed 3512 /***/ (function(module, exports, __webpack_require__) {
11612b 3513
JM 3514     'use strict';
3515
94dde5 3516     var React = __webpack_require__(13),
SE 3517         createClass = __webpack_require__(12),
3518         onClickOutside = __webpack_require__(20).default
8f6f33 3519         ;
a50b2e 3520
be31e2 3521     var DateTimePickerYears = onClickOutside( createClass({
11612b 3522         render: function() {
JM 3523             var year = parseInt( this.props.viewDate.year() / 10, 10 ) * 10;
3524
a50b2e 3525             return React.createElement('div', { className: 'rdtYears' }, [
GL 3526                 React.createElement('table', { key: 'a' }, React.createElement('thead', {}, React.createElement('tr', {}, [
3527                     React.createElement('th', { key: 'prev', className: 'rdtPrev', onClick: this.props.subtractTime( 10, 'years' )}, React.createElement('span', {}, '‹' )),
3528                     React.createElement('th', { key: 'year', className: 'rdtSwitch', onClick: this.props.showView( 'years' ), colSpan: 2 }, year + '-' + ( year + 9 ) ),
3529                     React.createElement('th', { key: 'next', className: 'rdtNext', onClick: this.props.addTime( 10, 'years' )}, React.createElement('span', {}, '›' ))
8f6f33 3530                 ]))),
a50b2e 3531                 React.createElement('table', { key: 'years' }, React.createElement('tbody',  {}, this.renderYears( year )))
11612b 3532             ]);
JM 3533         },
3534
3535         renderYears: function( year ) {
3536             var years = [],
3537                 i = -1,
3538                 rows = [],
3539                 renderer = this.props.renderYear || this.renderYear,
3540                 selectedDate = this.props.selectedDate,
3541                 isValid = this.props.isValidDate || this.alwaysValidDate,
3542                 classes, props, currentYear, isDisabled, noOfDaysInYear, daysInYear, validDay,
3543                 // Month and date are irrelevant here because
3544                 // we're only interested in the year
3545                 irrelevantMonth = 0,
3546                 irrelevantDate = 1
8f6f33 3547                 ;
11612b 3548
JM 3549             year--;
3550             while (i < 11) {
3551                 classes = 'rdtYear';
3552                 currentYear = this.props.viewDate.clone().set(
3553                     { year: year, month: irrelevantMonth, date: irrelevantDate } );
3554
3555                 // Not sure what 'rdtOld' is for, commenting out for now as it's not working properly
3556                 // if ( i === -1 | i === 10 )
3557                     // classes += ' rdtOld';
3558
3559                 noOfDaysInYear = currentYear.endOf( 'year' ).format( 'DDD' );
3560                 daysInYear = Array.from({ length: noOfDaysInYear }, function( e, i ) {
3561                     return i + 1;
3562                 });
3563
3564                 validDay = daysInYear.find(function( d ) {
3565                     var day = currentYear.clone().dayOfYear( d );
3566                     return isValid( day );
3567                 });
3568
3569                 isDisabled = ( validDay === undefined );
3570
3571                 if ( isDisabled )
3572                     classes += ' rdtDisabled';
3573
3574                 if ( selectedDate && selectedDate.year() === year )
3575                     classes += ' rdtActive';
3576
3577                 props = {
3578                     key: year,
3579                     'data-value': year,
3580                     className: classes
3581                 };
3582
3583                 if ( !isDisabled )
3584                     props.onClick = ( this.props.updateOn === 'years' ?
3585                         this.updateSelectedYear : this.props.setDate('year') );
3586
3587                 years.push( renderer( props, year, selectedDate && selectedDate.clone() ));
3588
3589                 if ( years.length === 4 ) {
a50b2e 3590                     rows.push( React.createElement('tr', { key: i }, years ) );
11612b 3591                     years = [];
JM 3592                 }
3593
3594                 year++;
3595                 i++;
3596             }
3597
3598             return rows;
3599         },
3600
3601         updateSelectedYear: function( event ) {
3602             this.props.updateSelectedDate( event );
3603         },
3604
3605         renderYear: function( props, year ) {
a50b2e 3606             return React.createElement('td',  props, year );
11612b 3607         },
JM 3608
3609         alwaysValidDate: function() {
3610             return 1;
3611         },
3612
8f6f33 3613         handleClickOutside: function() {
LA 3614             this.props.handleClickOutside();
3615         }
11612b 3616     }));
JM 3617
3618     module.exports = DateTimePickerYears;
3619
3620
7392ed 3621 /***/ }),
39b827 3622 /* 24 */
7392ed 3623 /***/ (function(module, exports, __webpack_require__) {
11612b 3624
JM 3625     'use strict';
3626
94dde5 3627     var React = __webpack_require__(13),
SE 3628         createClass = __webpack_require__(12),
11612b 3629         assign = __webpack_require__(1),
94dde5 3630         onClickOutside = __webpack_require__(20).default
8f6f33 3631         ;
11612b 3632
be31e2 3633     var DateTimePickerTime = onClickOutside( createClass({
11612b 3634         getInitialState: function() {
JM 3635             return this.calculateState( this.props );
3636         },
3637
3638         calculateState: function( props ) {
3639             var date = props.selectedDate || props.viewDate,
3640                 format = props.timeFormat,
3641                 counters = []
8f6f33 3642                 ;
11612b 3643
JM 3644             if ( format.toLowerCase().indexOf('h') !== -1 ) {
3645                 counters.push('hours');
3646                 if ( format.indexOf('m') !== -1 ) {
3647                     counters.push('minutes');
3648                     if ( format.indexOf('s') !== -1 ) {
3649                         counters.push('seconds');
3650                     }
3651                 }
3652             }
3653
c1a952 3654             var hours = date.format( 'H' );
SE 3655             
11612b 3656             var daypart = false;
JM 3657             if ( this.state !== null && this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1 ) {
3658                 if ( this.props.timeFormat.indexOf( ' A' ) !== -1 ) {
c1a952 3659                     daypart = ( hours >= 12 ) ? 'PM' : 'AM';
11612b 3660                 } else {
c1a952 3661                     daypart = ( hours >= 12 ) ? 'pm' : 'am';
11612b 3662                 }
JM 3663             }
3664
3665             return {
c1a952 3666                 hours: hours,
11612b 3667                 minutes: date.format( 'mm' ),
JM 3668                 seconds: date.format( 'ss' ),
3669                 milliseconds: date.format( 'SSS' ),
3670                 daypart: daypart,
3671                 counters: counters
3672             };
3673         },
3674
3675         renderCounter: function( type ) {
3676             if ( type !== 'daypart' ) {
3677                 var value = this.state[ type ];
3678                 if ( type === 'hours' && this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1 ) {
3679                     value = ( value - 1 ) % 12 + 1;
3680
3681                     if ( value === 0 ) {
3682                         value = 12;
3683                     }
3684                 }
a50b2e 3685                 return React.createElement('div', { key: type, className: 'rdtCounter' }, [
94dde5 3686                     React.createElement('span', { key: 'up', className: 'rdtBtn', onTouchStart: this.onStartClicking('increase', type), onMouseDown: this.onStartClicking( 'increase', type ), onContextMenu: this.disableContextMenu }, '▲' ),
a50b2e 3687                     React.createElement('div', { key: 'c', className: 'rdtCount' }, value ),
94dde5 3688                     React.createElement('span', { key: 'do', className: 'rdtBtn', onTouchStart: this.onStartClicking('decrease', type), onMouseDown: this.onStartClicking( 'decrease', type ), onContextMenu: this.disableContextMenu }, '▼' )
11612b 3689                 ]);
JM 3690             }
3691             return '';
3692         },
3693
3694         renderDayPart: function() {
a50b2e 3695             return React.createElement('div', { key: 'dayPart', className: 'rdtCounter' }, [
94dde5 3696                 React.createElement('span', { key: 'up', className: 'rdtBtn', onTouchStart: this.onStartClicking('toggleDayPart', 'hours'), onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▲' ),
a50b2e 3697                 React.createElement('div', { key: this.state.daypart, className: 'rdtCount' }, this.state.daypart ),
94dde5 3698                 React.createElement('span', { key: 'do', className: 'rdtBtn', onTouchStart: this.onStartClicking('toggleDayPart', 'hours'), onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▼' )
11612b 3699             ]);
JM 3700         },
3701
3702         render: function() {
3703             var me = this,
3704                 counters = []
3705             ;
3706
3707             this.state.counters.forEach( function( c ) {
3708                 if ( counters.length )
a50b2e 3709                     counters.push( React.createElement('div', { key: 'sep' + counters.length, className: 'rdtCounterSeparator' }, ':' ) );
11612b 3710                 counters.push( me.renderCounter( c ) );
JM 3711             });
3712
3713             if ( this.state.daypart !== false ) {
3714                 counters.push( me.renderDayPart() );
3715             }
3716
3717             if ( this.state.counters.length === 3 && this.props.timeFormat.indexOf( 'S' ) !== -1 ) {
a50b2e 3718                 counters.push( React.createElement('div', { className: 'rdtCounterSeparator', key: 'sep5' }, ':' ) );
11612b 3719                 counters.push(
a50b2e 3720                     React.createElement('div', { className: 'rdtCounter rdtMilli', key: 'm' },
GL 3721                         React.createElement('input', { value: this.state.milliseconds, type: 'text', onChange: this.updateMilli } )
11612b 3722                         )
JM 3723                     );
3724             }
3725
a50b2e 3726             return React.createElement('div', { className: 'rdtTime' },
GL 3727                 React.createElement('table', {}, [
11612b 3728                     this.renderHeader(),
a50b2e 3729                     React.createElement('tbody', { key: 'b'}, React.createElement('tr', {}, React.createElement('td', {},
GL 3730                         React.createElement('div', { className: 'rdtCounters' }, counters )
11612b 3731                     )))
JM 3732                 ])
3733             );
3734         },
3735
3736         componentWillMount: function() {
3737             var me = this;
3738             me.timeConstraints = {
3739                 hours: {
3740                     min: 0,
3741                     max: 23,
3742                     step: 1
3743                 },
3744                 minutes: {
3745                     min: 0,
3746                     max: 59,
3747                     step: 1
3748                 },
3749                 seconds: {
3750                     min: 0,
3751                     max: 59,
3752                     step: 1
3753                 },
3754                 milliseconds: {
3755                     min: 0,
3756                     max: 999,
3757                     step: 1
3758                 }
3759             };
3760             ['hours', 'minutes', 'seconds', 'milliseconds'].forEach( function( type ) {
3761                 assign(me.timeConstraints[ type ], me.props.timeConstraints[ type ]);
3762             });
3763             this.setState( this.calculateState( this.props ) );
3764         },
3765
3766         componentWillReceiveProps: function( nextProps ) {
3767             this.setState( this.calculateState( nextProps ) );
3768         },
3769
3770         updateMilli: function( e ) {
3771             var milli = parseInt( e.target.value, 10 );
3772             if ( milli === e.target.value && milli >= 0 && milli < 1000 ) {
3773                 this.props.setTime( 'milliseconds', milli );
3774                 this.setState( { milliseconds: milli } );
3775             }
3776         },
3777
3778         renderHeader: function() {
3779             if ( !this.props.dateFormat )
3780                 return null;
3781
3782             var date = this.props.selectedDate || this.props.viewDate;
a50b2e 3783             return React.createElement('thead', { key: 'h' }, React.createElement('tr', {},
GL 3784                 React.createElement('th', { className: 'rdtSwitch', colSpan: 4, onClick: this.props.showView( 'days' ) }, date.format( this.props.dateFormat ) )
11612b 3785             ));
JM 3786         },
3787
3788         onStartClicking: function( action, type ) {
3789             var me = this;
3790
3791             return function() {
3792                 var update = {};
3793                 update[ type ] = me[ action ]( type );
3794                 me.setState( update );
3795
3796                 me.timer = setTimeout( function() {
3797                     me.increaseTimer = setInterval( function() {
3798                         update[ type ] = me[ action ]( type );
3799                         me.setState( update );
3800                     }, 70);
3801                 }, 500);
3802
3803                 me.mouseUpListener = function() {
3804                     clearTimeout( me.timer );
3805                     clearInterval( me.increaseTimer );
3806                     me.props.setTime( type, me.state[ type ] );
3807                     document.body.removeEventListener( 'mouseup', me.mouseUpListener );
94dde5 3808                     document.body.removeEventListener( 'touchend', me.mouseUpListener );
11612b 3809                 };
JM 3810
3811                 document.body.addEventListener( 'mouseup', me.mouseUpListener );
94dde5 3812                 document.body.addEventListener( 'touchend', me.mouseUpListener );
11612b 3813             };
JM 3814         },
3815
c1a952 3816         disableContextMenu: function( event ) {
SE 3817             event.preventDefault();
3818             return false;
3819         },
3820
11612b 3821         padValues: {
JM 3822             hours: 1,
3823             minutes: 2,
3824             seconds: 2,
3825             milliseconds: 3
3826         },
3827
3828         toggleDayPart: function( type ) { // type is always 'hours'
3829             var value = parseInt( this.state[ type ], 10) + 12;
3830             if ( value > this.timeConstraints[ type ].max )
3831                 value = this.timeConstraints[ type ].min + ( value - ( this.timeConstraints[ type ].max + 1 ) );
3832             return this.pad( type, value );
3833         },
3834
3835         increase: function( type ) {
3836             var value = parseInt( this.state[ type ], 10) + this.timeConstraints[ type ].step;
3837             if ( value > this.timeConstraints[ type ].max )
3838                 value = this.timeConstraints[ type ].min + ( value - ( this.timeConstraints[ type ].max + 1 ) );
3839             return this.pad( type, value );
3840         },
3841
3842         decrease: function( type ) {
3843             var value = parseInt( this.state[ type ], 10) - this.timeConstraints[ type ].step;
3844             if ( value < this.timeConstraints[ type ].min )
3845                 value = this.timeConstraints[ type ].max + 1 - ( this.timeConstraints[ type ].min - value );
3846             return this.pad( type, value );
3847         },
3848
3849         pad: function( type, value ) {
3850             var str = value + '';
3851             while ( str.length < this.padValues[ type ] )
3852                 str = '0' + str;
3853             return str;
3854         },
3855
8f6f33 3856         handleClickOutside: function() {
LA 3857             this.props.handleClickOutside();
3858         }
11612b 3859     }));
JM 3860
3861     module.exports = DateTimePickerTime;
3862
d76f7b 3863
7392ed 3864 /***/ })
d76f7b 3865 /******/ ])
M 3866 });
be9654 3867 ;