Instant Images – One Click Unsplash Uploads - Version 4.4.0.3

Version Description

  • July 30, 2021 =
  • Fix: WP 5.8 issue resolved - added fix for Instant Images causing the Widget Block Editor to fail due to JS error.
  • Update: Code clean up.
Download this release

Release Info

Developer dcooney
Plugin Icon 128x128 Instant Images – One Click Unsplash Uploads
Version 4.4.0.3
Comparing to
See all releases

Code changes from version 4.4.0.2 to 4.4.0.3

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: dcooney, connekthq
3
  Donate link: https://connekthq.com/donate/
4
  Tags: stock photo, unsplash, prototyping, photos, upload, media library, image upload, free photos
5
  Requires at least: 4.0
6
- Tested up to: 5.7
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -125,11 +125,17 @@ How to install Instant Images.
125
 
126
  == Changelog ==
127
 
 
 
 
 
 
128
  = 4.4.0.2 - June 7, 2021 =
129
  * Fix: Added fix for CSS conflict causing issues in the WordPress menus section.
130
  * Fix: Removed browser console error with regards `activeFrame.querySelector is not a function` that could appear when creating a gallery.
131
  * Updated: Improved coding standard and overall code quality.
132
 
 
133
  = 4.4.0.1 - May 3, 2021 =
134
  * UPDATE - Updated Instant Images settings page to sanitize inputs before saving.
135
 
3
  Donate link: https://connekthq.com/donate/
4
  Tags: stock photo, unsplash, prototyping, photos, upload, media library, image upload, free photos
5
  Requires at least: 4.0
6
+ Tested up to: 5.8
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
125
 
126
  == Changelog ==
127
 
128
+ = 4.4.0.3 - July 30, 2021 =
129
+ * Fix: WP 5.8 issue resolved - added fix for Instant Images causing the Widget Block Editor to fail due to JS error.
130
+ * Update: Code clean up.
131
+
132
+
133
  = 4.4.0.2 - June 7, 2021 =
134
  * Fix: Added fix for CSS conflict causing issues in the WordPress menus section.
135
  * Fix: Removed browser console error with regards `activeFrame.querySelector is not a function` that could appear when creating a gallery.
136
  * Updated: Improved coding standard and overall code quality.
137
 
138
+
139
  = 4.4.0.1 - May 3, 2021 =
140
  * UPDATE - Updated Instant Images settings page to sanitize inputs before saving.
141
 
admin/admin.php CHANGED
@@ -28,7 +28,6 @@ function instant_images_create_page() {
28
  }
29
  add_action( 'admin_menu', 'instant_images_create_page' );
30
 
31
-
32
  /**
33
  * Settings page callback.
34
  *
@@ -99,7 +98,6 @@ function instant_images_media_upload_tabs_handler( $tabs ) {
99
  }
100
  add_filter( 'media_upload_tabs', 'instant_images_media_upload_tabs_handler' );
101
 
102
-
103
  /**
104
  * Add Instant Images media button to classic editor screens.
105
  *
@@ -122,8 +120,8 @@ add_filter( 'media_buttons', 'instant_images_media_buttons' );
122
  * @see https://developer.wordpress.org/reference/hooks/media_upload_tab/
123
  * @since 3.2.1
124
  * @author ConnektMedia <support@connekthq.com>
125
- * @codingStandardsIgnoreStart
126
  */
 
127
  function media_upload_instant_images_handler() {
128
  wp_iframe( 'instant_images_media_tab' );
129
  }
28
  }
29
  add_action( 'admin_menu', 'instant_images_create_page' );
30
 
 
31
  /**
32
  * Settings page callback.
33
  *
98
  }
99
  add_filter( 'media_upload_tabs', 'instant_images_media_upload_tabs_handler' );
100
 
 
101
  /**
102
  * Add Instant Images media button to classic editor screens.
103
  *
120
  * @see https://developer.wordpress.org/reference/hooks/media_upload_tab/
121
  * @since 3.2.1
122
  * @author ConnektMedia <support@connekthq.com>
 
123
  */
124
+ // @codingStandardsIgnoreStart
125
  function media_upload_instant_images_handler() {
126
  wp_iframe( 'instant_images_media_tab' );
127
  }
dist/css/instant-images.css CHANGED
@@ -735,7 +735,6 @@ body.media_page_instant-images #wpfooter p {
735
 
736
  #photos {
737
  width: 100%;
738
- width: -webkit-calc(100% + 10px);
739
  width: calc(100% + 10px);
740
  margin: 0 0 0 -5px;
741
  padding: 0;
@@ -1348,7 +1347,6 @@ body.media_page_instant-images #wpfooter p {
1348
 
1349
  .instant-images-settings .cnkt-sidebar .cta.ii-plugins {
1350
  width: 68.666%;
1351
- width: -webkit-calc(68.666% - 25px);
1352
  width: calc(68.666% - 25px);
1353
  float: right;
1354
  }
@@ -1482,11 +1480,9 @@ body.media_page_instant-images #wpfooter p {
1482
  .instant-images-sidebar-icon,
1483
  .instant-images-sidebar-icon svg {
1484
  display: -webkit-inline-box;
1485
- display: -webkit-inline-flex;
1486
  display: -ms-inline-flexbox;
1487
  display: inline-flex;
1488
  -webkit-box-flex: 0;
1489
- -webkit-flex: 0 0 auto;
1490
  -ms-flex: 0 0 auto;
1491
  flex: 0 0 auto;
1492
  }
@@ -1556,7 +1552,6 @@ body.media_page_instant-images #wpfooter p {
1556
 
1557
  .components-panel .control-nav li.search-field form {
1558
  height: auto;
1559
- width: -webkit-calc(100% + 16px);
1560
  width: calc(100% + 16px);
1561
  margin-left: -8px;
1562
  }
@@ -1694,11 +1689,9 @@ body.media_page_instant-images #wpfooter p {
1694
 
1695
  .orientation-list {
1696
  display: -webkit-box;
1697
- display: -webkit-flex;
1698
  display: -ms-flexbox;
1699
  display: flex;
1700
  -webkit-box-align: center;
1701
- -webkit-align-items: center;
1702
  -ms-flex-align: center;
1703
  align-items: center;
1704
  width: 100%;
@@ -1718,11 +1711,9 @@ body.media_page_instant-images #wpfooter p {
1718
 
1719
  .orientation-list ul {
1720
  -webkit-box-flex: 1;
1721
- -webkit-flex: 1;
1722
  -ms-flex: 1;
1723
  flex: 1;
1724
  display: -webkit-box;
1725
- display: -webkit-flex;
1726
  display: -ms-flexbox;
1727
  display: flex;
1728
  }
@@ -1761,11 +1752,9 @@ body.media_page_instant-images #wpfooter p {
1761
  .components-panel .orientation-list {
1762
  position: static;
1763
  text-align: center;
1764
- -webkit-flex-wrap: wrap;
1765
- -ms-flex-wrap: wrap;
1766
- flex-wrap: wrap;
1767
  -webkit-box-pack: center;
1768
- -webkit-justify-content: center;
1769
  -ms-flex-pack: center;
1770
  justify-content: center;
1771
  border-top: none;
@@ -1781,7 +1770,6 @@ body.media_page_instant-images #wpfooter p {
1781
  padding: 0;
1782
  width: 100%;
1783
  -webkit-box-pack: center;
1784
- -webkit-justify-content: center;
1785
  -ms-flex-pack: center;
1786
  justify-content: center;
1787
  }
735
 
736
  #photos {
737
  width: 100%;
 
738
  width: calc(100% + 10px);
739
  margin: 0 0 0 -5px;
740
  padding: 0;
1347
 
1348
  .instant-images-settings .cnkt-sidebar .cta.ii-plugins {
1349
  width: 68.666%;
 
1350
  width: calc(68.666% - 25px);
1351
  float: right;
1352
  }
1480
  .instant-images-sidebar-icon,
1481
  .instant-images-sidebar-icon svg {
1482
  display: -webkit-inline-box;
 
1483
  display: -ms-inline-flexbox;
1484
  display: inline-flex;
1485
  -webkit-box-flex: 0;
 
1486
  -ms-flex: 0 0 auto;
1487
  flex: 0 0 auto;
1488
  }
1552
 
1553
  .components-panel .control-nav li.search-field form {
1554
  height: auto;
 
1555
  width: calc(100% + 16px);
1556
  margin-left: -8px;
1557
  }
1689
 
1690
  .orientation-list {
1691
  display: -webkit-box;
 
1692
  display: -ms-flexbox;
1693
  display: flex;
1694
  -webkit-box-align: center;
 
1695
  -ms-flex-align: center;
1696
  align-items: center;
1697
  width: 100%;
1711
 
1712
  .orientation-list ul {
1713
  -webkit-box-flex: 1;
 
1714
  -ms-flex: 1;
1715
  flex: 1;
1716
  display: -webkit-box;
 
1717
  display: -ms-flexbox;
1718
  display: flex;
1719
  }
1752
  .components-panel .orientation-list {
1753
  position: static;
1754
  text-align: center;
1755
+ -ms-flex-wrap: wrap;
1756
+ flex-wrap: wrap;
 
1757
  -webkit-box-pack: center;
 
1758
  -ms-flex-pack: center;
1759
  justify-content: center;
1760
  border-top: none;
1770
  padding: 0;
1771
  width: 100%;
1772
  -webkit-box-pack: center;
 
1773
  -ms-flex-pack: center;
1774
  justify-content: center;
1775
  }
dist/js/instant-images-block.js CHANGED
@@ -1954,7 +1954,7 @@ module.exports = {
1954
  /***/ (function(module, exports, __webpack_require__) {
1955
 
1956
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1957
- Copyright (c) 2017 Jed Watson.
1958
  Licensed under the MIT License (MIT), see
1959
  http://jedwatson.github.io/classnames
1960
  */
@@ -1965,7 +1965,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1965
 
1966
  var hasOwn = {}.hasOwnProperty;
1967
 
1968
- function classNames () {
1969
  var classes = [];
1970
 
1971
  for (var i = 0; i < arguments.length; i++) {
@@ -1976,16 +1976,22 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1976
 
1977
  if (argType === 'string' || argType === 'number') {
1978
  classes.push(arg);
1979
- } else if (Array.isArray(arg) && arg.length) {
1980
- var inner = classNames.apply(null, arg);
1981
- if (inner) {
1982
- classes.push(inner);
 
 
1983
  }
1984
  } else if (argType === 'object') {
1985
- for (var key in arg) {
1986
- if (hasOwn.call(arg, key) && arg[key]) {
1987
- classes.push(key);
 
 
1988
  }
 
 
1989
  }
1990
  }
1991
  }
@@ -2008,968 +2014,450 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
2008
 
2009
  /***/ }),
2010
 
2011
- /***/ "./node_modules/create-react-class/factory.js":
2012
- /*!****************************************************!*\
2013
- !*** ./node_modules/create-react-class/factory.js ***!
2014
- \****************************************************/
2015
  /*! no static exports found */
2016
  /***/ (function(module, exports, __webpack_require__) {
2017
 
2018
- "use strict";
2019
- /**
2020
- * Copyright (c) 2013-present, Facebook, Inc.
2021
- *
2022
- * This source code is licensed under the MIT license found in the
2023
- * LICENSE file in the root directory of this source tree.
2024
- *
2025
  */
2026
 
 
2027
 
 
 
 
 
 
 
 
 
 
 
 
 
2028
 
2029
- var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
 
2030
 
2031
- var emptyObject = __webpack_require__(/*! fbjs/lib/emptyObject */ "./node_modules/fbjs/lib/emptyObject.js");
2032
- var _invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
 
 
 
 
 
 
 
 
 
 
2033
 
2034
- if (true) {
2035
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
2036
- }
 
 
 
 
 
2037
 
2038
- var MIXINS_KEY = 'mixins';
 
 
2039
 
2040
- // Helper function to allow the creation of anonymous functions which do not
2041
- // have .name set to the name of the variable being assigned to.
2042
- function identity(fn) {
2043
- return fn;
2044
- }
2045
 
2046
- var ReactPropTypeLocationNames;
2047
- if (true) {
2048
- ReactPropTypeLocationNames = {
2049
- prop: 'prop',
2050
- context: 'context',
2051
- childContext: 'child context'
2052
- };
2053
- } else {}
2054
 
2055
- function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
2056
- /**
2057
- * Policies that describe methods in `ReactClassInterface`.
2058
- */
2059
 
2060
- var injectedMixins = [];
 
 
 
 
 
2061
 
2062
- /**
2063
- * Composite components are higher-level components that compose other composite
2064
- * or host components.
2065
- *
2066
- * To create a new type of `ReactClass`, pass a specification of
2067
- * your new class to `React.createClass`. The only requirement of your class
2068
- * specification is that you implement a `render` method.
2069
- *
2070
- * var MyComponent = React.createClass({
2071
- * render: function() {
2072
- * return <div>Hello World</div>;
2073
- * }
2074
- * });
2075
- *
2076
- * The class specification supports a specific protocol of methods that have
2077
- * special meaning (e.g. `render`). See `ReactClassInterface` for
2078
- * more the comprehensive protocol. Any other properties and methods in the
2079
- * class specification will be available on the prototype.
2080
- *
2081
- * @interface ReactClassInterface
2082
- * @internal
2083
- */
2084
- var ReactClassInterface = {
2085
- /**
2086
- * An array of Mixin objects to include when defining your component.
2087
- *
2088
- * @type {array}
2089
- * @optional
2090
- */
2091
- mixins: 'DEFINE_MANY',
2092
 
2093
- /**
2094
- * An object containing properties and methods that should be defined on
2095
- * the component's constructor instead of its prototype (static methods).
2096
- *
2097
- * @type {object}
2098
- * @optional
2099
- */
2100
- statics: 'DEFINE_MANY',
2101
 
2102
- /**
2103
- * Definition of prop types for this component.
2104
- *
2105
- * @type {object}
2106
- * @optional
2107
- */
2108
- propTypes: 'DEFINE_MANY',
 
 
 
 
2109
 
2110
- /**
2111
- * Definition of context types for this component.
2112
- *
2113
- * @type {object}
2114
- * @optional
2115
- */
2116
- contextTypes: 'DEFINE_MANY',
2117
 
2118
- /**
2119
- * Definition of context types this component sets for its children.
2120
- *
2121
- * @type {object}
2122
- * @optional
2123
- */
2124
- childContextTypes: 'DEFINE_MANY',
2125
 
2126
- // ==== Definition methods ====
2127
 
2128
- /**
2129
- * Invoked when the component is mounted. Values in the mapping will be set on
2130
- * `this.props` if that prop is not specified (i.e. using an `in` check).
2131
- *
2132
- * This method is invoked before `getInitialState` and therefore cannot rely
2133
- * on `this.state` or use `this.setState`.
2134
- *
2135
- * @return {object}
2136
- * @optional
2137
- */
2138
- getDefaultProps: 'DEFINE_MANY_MERGED',
2139
 
2140
- /**
2141
- * Invoked once before the component is mounted. The return value will be used
2142
- * as the initial value of `this.state`.
2143
- *
2144
- * getInitialState: function() {
2145
- * return {
2146
- * isOn: false,
2147
- * fooBaz: new BazFoo()
2148
- * }
2149
- * }
2150
- *
2151
- * @return {object}
2152
- * @optional
2153
- */
2154
- getInitialState: 'DEFINE_MANY_MERGED',
2155
 
2156
- /**
2157
- * @return {object}
2158
- * @optional
2159
- */
2160
- getChildContext: 'DEFINE_MANY_MERGED',
2161
 
2162
- /**
2163
- * Uses props from `this.props` and state from `this.state` to render the
2164
- * structure of the component.
2165
- *
2166
- * No guarantees are made about when or how often this method is invoked, so
2167
- * it must not have side effects.
2168
- *
2169
- * render: function() {
2170
- * var name = this.props.name;
2171
- * return <div>Hello, {name}!</div>;
2172
- * }
2173
- *
2174
- * @return {ReactComponent}
2175
- * @required
2176
- */
2177
- render: 'DEFINE_ONCE',
2178
 
2179
- // ==== Delegate methods ====
 
2180
 
2181
- /**
2182
- * Invoked when the component is initially created and about to be mounted.
2183
- * This may have side effects, but any external subscriptions or data created
2184
- * by this method must be cleaned up in `componentWillUnmount`.
2185
- *
2186
- * @optional
2187
- */
2188
- componentWillMount: 'DEFINE_MANY',
 
2189
 
2190
- /**
2191
- * Invoked when the component has been mounted and has a DOM representation.
2192
- * However, there is no guarantee that the DOM node is in the document.
2193
- *
2194
- * Use this as an opportunity to operate on the DOM when the component has
2195
- * been mounted (initialized and rendered) for the first time.
2196
- *
2197
- * @param {DOMElement} rootNode DOM element representing the component.
2198
- * @optional
2199
- */
2200
- componentDidMount: 'DEFINE_MANY',
2201
 
2202
- /**
2203
- * Invoked before the component receives new props.
2204
- *
2205
- * Use this as an opportunity to react to a prop transition by updating the
2206
- * state using `this.setState`. Current props are accessed via `this.props`.
2207
- *
2208
- * componentWillReceiveProps: function(nextProps, nextContext) {
2209
- * this.setState({
2210
- * likesIncreasing: nextProps.likeCount > this.props.likeCount
2211
- * });
2212
- * }
2213
- *
2214
- * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
2215
- * transition may cause a state change, but the opposite is not true. If you
2216
- * need it, you are probably looking for `componentWillUpdate`.
2217
- *
2218
- * @param {object} nextProps
2219
- * @optional
2220
- */
2221
- componentWillReceiveProps: 'DEFINE_MANY',
2222
 
2223
- /**
2224
- * Invoked while deciding if the component should be updated as a result of
2225
- * receiving new props, state and/or context.
2226
- *
2227
- * Use this as an opportunity to `return false` when you're certain that the
2228
- * transition to the new props/state/context will not require a component
2229
- * update.
2230
- *
2231
- * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
2232
- * return !equal(nextProps, this.props) ||
2233
- * !equal(nextState, this.state) ||
2234
- * !equal(nextContext, this.context);
2235
- * }
2236
- *
2237
- * @param {object} nextProps
2238
- * @param {?object} nextState
2239
- * @param {?object} nextContext
2240
- * @return {boolean} True if the component should update.
2241
- * @optional
2242
- */
2243
- shouldComponentUpdate: 'DEFINE_ONCE',
2244
 
2245
- /**
2246
- * Invoked when the component is about to update due to a transition from
2247
- * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
2248
- * and `nextContext`.
2249
- *
2250
- * Use this as an opportunity to perform preparation before an update occurs.
2251
- *
2252
- * NOTE: You **cannot** use `this.setState()` in this method.
2253
- *
2254
- * @param {object} nextProps
2255
- * @param {?object} nextState
2256
- * @param {?object} nextContext
2257
- * @param {ReactReconcileTransaction} transaction
2258
- * @optional
2259
- */
2260
- componentWillUpdate: 'DEFINE_MANY',
2261
 
2262
- /**
2263
- * Invoked when the component's DOM representation has been updated.
2264
- *
2265
- * Use this as an opportunity to operate on the DOM when the component has
2266
- * been updated.
2267
- *
2268
- * @param {object} prevProps
2269
- * @param {?object} prevState
2270
- * @param {?object} prevContext
2271
- * @param {DOMElement} rootNode DOM element representing the component.
2272
- * @optional
2273
- */
2274
- componentDidUpdate: 'DEFINE_MANY',
2275
 
2276
- /**
2277
- * Invoked when the component is about to be removed from its parent and have
2278
- * its DOM representation destroyed.
2279
- *
2280
- * Use this as an opportunity to deallocate any external resources.
2281
- *
2282
- * NOTE: There is no `componentDidUnmount` since your component will have been
2283
- * destroyed by that point.
2284
- *
2285
- * @optional
2286
- */
2287
- componentWillUnmount: 'DEFINE_MANY',
2288
 
2289
- // ==== Advanced methods ====
2290
 
2291
- /**
2292
- * Updates the component's currently mounted DOM representation.
2293
- *
2294
- * By default, this implements React's rendering and reconciliation algorithm.
2295
- * Sophisticated clients may wish to override this.
2296
- *
2297
- * @param {ReactReconcileTransaction} transaction
2298
- * @internal
2299
- * @overridable
2300
- */
2301
- updateComponent: 'OVERRIDE_BASE'
2302
- };
2303
 
2304
- /**
2305
- * Mapping from class specification keys to special processing functions.
2306
- *
2307
- * Although these are declared like instance properties in the specification
2308
- * when defining classes using `React.createClass`, they are actually static
2309
- * and are accessible on the constructor instead of the prototype. Despite
2310
- * being static, they must be defined outside of the "statics" key under
2311
- * which all other static methods are defined.
2312
- */
2313
- var RESERVED_SPEC_KEYS = {
2314
- displayName: function(Constructor, displayName) {
2315
- Constructor.displayName = displayName;
2316
- },
2317
- mixins: function(Constructor, mixins) {
2318
- if (mixins) {
2319
- for (var i = 0; i < mixins.length; i++) {
2320
- mixSpecIntoComponent(Constructor, mixins[i]);
2321
- }
2322
- }
2323
- },
2324
- childContextTypes: function(Constructor, childContextTypes) {
2325
- if (true) {
2326
- validateTypeDef(Constructor, childContextTypes, 'childContext');
2327
- }
2328
- Constructor.childContextTypes = _assign(
2329
- {},
2330
- Constructor.childContextTypes,
2331
- childContextTypes
2332
- );
2333
- },
2334
- contextTypes: function(Constructor, contextTypes) {
2335
- if (true) {
2336
- validateTypeDef(Constructor, contextTypes, 'context');
2337
- }
2338
- Constructor.contextTypes = _assign(
2339
- {},
2340
- Constructor.contextTypes,
2341
- contextTypes
2342
- );
2343
- },
2344
- /**
2345
- * Special case getDefaultProps which should move into statics but requires
2346
- * automatic merging.
2347
- */
2348
- getDefaultProps: function(Constructor, getDefaultProps) {
2349
- if (Constructor.getDefaultProps) {
2350
- Constructor.getDefaultProps = createMergedResultFunction(
2351
- Constructor.getDefaultProps,
2352
- getDefaultProps
2353
- );
2354
- } else {
2355
- Constructor.getDefaultProps = getDefaultProps;
2356
- }
2357
- },
2358
- propTypes: function(Constructor, propTypes) {
2359
- if (true) {
2360
- validateTypeDef(Constructor, propTypes, 'prop');
2361
- }
2362
- Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
2363
- },
2364
- statics: function(Constructor, statics) {
2365
- mixStaticSpecIntoComponent(Constructor, statics);
2366
- },
2367
- autobind: function() {}
2368
- };
2369
-
2370
- function validateTypeDef(Constructor, typeDef, location) {
2371
- for (var propName in typeDef) {
2372
- if (typeDef.hasOwnProperty(propName)) {
2373
- // use a warning instead of an _invariant so components
2374
- // don't show up in prod but only in __DEV__
2375
- if (true) {
2376
- warning(
2377
- typeof typeDef[propName] === 'function',
2378
- '%s: %s type `%s` is invalid; it must be a function, usually from ' +
2379
- 'React.PropTypes.',
2380
- Constructor.displayName || 'ReactClass',
2381
- ReactPropTypeLocationNames[location],
2382
- propName
2383
- );
2384
- }
2385
- }
2386
- }
2387
- }
2388
-
2389
- function validateMethodOverride(isAlreadyDefined, name) {
2390
- var specPolicy = ReactClassInterface.hasOwnProperty(name)
2391
- ? ReactClassInterface[name]
2392
- : null;
2393
-
2394
- // Disallow overriding of base class methods unless explicitly allowed.
2395
- if (ReactClassMixin.hasOwnProperty(name)) {
2396
- _invariant(
2397
- specPolicy === 'OVERRIDE_BASE',
2398
- 'ReactClassInterface: You are attempting to override ' +
2399
- '`%s` from your class specification. Ensure that your method names ' +
2400
- 'do not overlap with React methods.',
2401
- name
2402
- );
2403
- }
2404
-
2405
- // Disallow defining methods more than once unless explicitly allowed.
2406
- if (isAlreadyDefined) {
2407
- _invariant(
2408
- specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
2409
- 'ReactClassInterface: You are attempting to define ' +
2410
- '`%s` on your component more than once. This conflict may be due ' +
2411
- 'to a mixin.',
2412
- name
2413
- );
2414
- }
2415
- }
2416
 
2417
- /**
2418
- * Mixin helper which handles policy validation and reserved
2419
- * specification keys when building React classes.
2420
- */
2421
- function mixSpecIntoComponent(Constructor, spec) {
2422
- if (!spec) {
2423
- if (true) {
2424
- var typeofSpec = typeof spec;
2425
- var isMixinValid = typeofSpec === 'object' && spec !== null;
2426
 
2427
- if (true) {
2428
- warning(
2429
- isMixinValid,
2430
- "%s: You're attempting to include a mixin that is either null " +
2431
- 'or not an object. Check the mixins included by the component, ' +
2432
- 'as well as any mixins they include themselves. ' +
2433
- 'Expected object but got %s.',
2434
- Constructor.displayName || 'ReactClass',
2435
- spec === null ? null : typeofSpec
2436
- );
2437
- }
2438
- }
2439
 
2440
- return;
2441
- }
2442
 
2443
- _invariant(
2444
- typeof spec !== 'function',
2445
- "ReactClass: You're attempting to " +
2446
- 'use a component class or function as a mixin. Instead, just use a ' +
2447
- 'regular object.'
2448
- );
2449
- _invariant(
2450
- !isValidElement(spec),
2451
- "ReactClass: You're attempting to " +
2452
- 'use a component as a mixin. Instead, just use a regular object.'
2453
- );
2454
 
2455
- var proto = Constructor.prototype;
2456
- var autoBindPairs = proto.__reactAutoBindPairs;
 
 
 
 
 
 
 
2457
 
2458
- // By handling mixins before any other properties, we ensure the same
2459
- // chaining order is applied to methods with DEFINE_MANY policy, whether
2460
- // mixins are listed before or after these methods in the spec.
2461
- if (spec.hasOwnProperty(MIXINS_KEY)) {
2462
- RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
2463
- }
2464
 
2465
- for (var name in spec) {
2466
- if (!spec.hasOwnProperty(name)) {
2467
- continue;
2468
- }
2469
 
2470
- if (name === MIXINS_KEY) {
2471
- // We have already handled mixins in a special case above.
2472
- continue;
2473
- }
2474
 
2475
- var property = spec[name];
2476
- var isAlreadyDefined = proto.hasOwnProperty(name);
2477
- validateMethodOverride(isAlreadyDefined, name);
2478
 
2479
- if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
2480
- RESERVED_SPEC_KEYS[name](Constructor, property);
2481
- } else {
2482
- // Setup methods on prototype:
2483
- // The following member methods should not be automatically bound:
2484
- // 1. Expected ReactClass methods (in the "interface").
2485
- // 2. Overridden methods (that were mixed in).
2486
- var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
2487
- var isFunction = typeof property === 'function';
2488
- var shouldAutoBind =
2489
- isFunction &&
2490
- !isReactClassMethod &&
2491
- !isAlreadyDefined &&
2492
- spec.autobind !== false;
2493
-
2494
- if (shouldAutoBind) {
2495
- autoBindPairs.push(name, property);
2496
- proto[name] = property;
2497
- } else {
2498
- if (isAlreadyDefined) {
2499
- var specPolicy = ReactClassInterface[name];
2500
-
2501
- // These cases should already be caught by validateMethodOverride.
2502
- _invariant(
2503
- isReactClassMethod &&
2504
- (specPolicy === 'DEFINE_MANY_MERGED' ||
2505
- specPolicy === 'DEFINE_MANY'),
2506
- 'ReactClass: Unexpected spec policy %s for key %s ' +
2507
- 'when mixing in component specs.',
2508
- specPolicy,
2509
- name
2510
- );
2511
-
2512
- // For methods which are defined more than once, call the existing
2513
- // methods before calling the new property, merging if appropriate.
2514
- if (specPolicy === 'DEFINE_MANY_MERGED') {
2515
- proto[name] = createMergedResultFunction(proto[name], property);
2516
- } else if (specPolicy === 'DEFINE_MANY') {
2517
- proto[name] = createChainedFunction(proto[name], property);
2518
- }
2519
- } else {
2520
- proto[name] = property;
2521
- if (true) {
2522
- // Add verbose displayName to the function, which helps when looking
2523
- // at profiling tools.
2524
- if (typeof property === 'function' && spec.displayName) {
2525
- proto[name].displayName = spec.displayName + '_' + name;
2526
- }
2527
- }
2528
- }
2529
- }
2530
- }
2531
- }
2532
  }
 
 
2533
 
2534
- function mixStaticSpecIntoComponent(Constructor, statics) {
2535
- if (!statics) {
2536
- return;
2537
- }
2538
- for (var name in statics) {
2539
- var property = statics[name];
2540
- if (!statics.hasOwnProperty(name)) {
2541
- continue;
2542
- }
2543
-
2544
- var isReserved = name in RESERVED_SPEC_KEYS;
2545
- _invariant(
2546
- !isReserved,
2547
- 'ReactClass: You are attempting to define a reserved ' +
2548
- 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
2549
- 'as an instance property instead; it will still be accessible on the ' +
2550
- 'constructor.',
2551
- name
2552
- );
2553
 
2554
- var isInherited = name in Constructor;
2555
- _invariant(
2556
- !isInherited,
2557
- 'ReactClass: You are attempting to define ' +
2558
- '`%s` on your component more than once. This conflict may be ' +
2559
- 'due to a mixin.',
2560
- name
2561
- );
2562
- Constructor[name] = property;
2563
- }
2564
- }
2565
 
2566
- /**
2567
- * Merge two objects, but throw if both contain the same key.
2568
- *
2569
- * @param {object} one The first object, which is mutated.
2570
- * @param {object} two The second object
2571
- * @return {object} one after it has been mutated to contain everything in two.
2572
- */
2573
- function mergeIntoWithNoDuplicateKeys(one, two) {
2574
- _invariant(
2575
- one && two && typeof one === 'object' && typeof two === 'object',
2576
- 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
2577
- );
2578
 
2579
- for (var key in two) {
2580
- if (two.hasOwnProperty(key)) {
2581
- _invariant(
2582
- one[key] === undefined,
2583
- 'mergeIntoWithNoDuplicateKeys(): ' +
2584
- 'Tried to merge two objects with the same key: `%s`. This conflict ' +
2585
- 'may be due to a mixin; in particular, this may be caused by two ' +
2586
- 'getInitialState() or getDefaultProps() methods returning objects ' +
2587
- 'with clashing keys.',
2588
- key
2589
- );
2590
- one[key] = two[key];
2591
- }
2592
- }
2593
- return one;
2594
- }
2595
 
2596
- /**
2597
- * Creates a function that invokes two functions and merges their return values.
2598
- *
2599
- * @param {function} one Function to invoke first.
2600
- * @param {function} two Function to invoke second.
2601
- * @return {function} Function that invokes the two argument functions.
2602
- * @private
2603
- */
2604
- function createMergedResultFunction(one, two) {
2605
- return function mergedResult() {
2606
- var a = one.apply(this, arguments);
2607
- var b = two.apply(this, arguments);
2608
- if (a == null) {
2609
- return b;
2610
- } else if (b == null) {
2611
- return a;
2612
- }
2613
- var c = {};
2614
- mergeIntoWithNoDuplicateKeys(c, a);
2615
- mergeIntoWithNoDuplicateKeys(c, b);
2616
- return c;
2617
- };
2618
  }
2619
-
2620
- /**
2621
- * Creates a function that invokes two functions and ignores their return vales.
2622
- *
2623
- * @param {function} one Function to invoke first.
2624
- * @param {function} two Function to invoke second.
2625
- * @return {function} Function that invokes the two argument functions.
2626
- * @private
2627
- */
2628
- function createChainedFunction(one, two) {
2629
- return function chainedFunction() {
2630
- one.apply(this, arguments);
2631
- two.apply(this, arguments);
2632
- };
2633
  }
2634
 
2635
- /**
2636
- * Binds a method to the component.
2637
- *
2638
- * @param {object} component Component whose method is going to be bound.
2639
- * @param {function} method Method to be bound.
2640
- * @return {function} The bound method.
2641
- */
2642
- function bindAutoBindMethod(component, method) {
2643
- var boundMethod = method.bind(component);
2644
- if (true) {
2645
- boundMethod.__reactBoundContext = component;
2646
- boundMethod.__reactBoundMethod = method;
2647
- boundMethod.__reactBoundArguments = null;
2648
- var componentName = component.constructor.displayName;
2649
- var _bind = boundMethod.bind;
2650
- boundMethod.bind = function(newThis) {
2651
- for (
2652
- var _len = arguments.length,
2653
- args = Array(_len > 1 ? _len - 1 : 0),
2654
- _key = 1;
2655
- _key < _len;
2656
- _key++
2657
- ) {
2658
- args[_key - 1] = arguments[_key];
2659
- }
2660
-
2661
- // User is trying to bind() an autobound method; we effectively will
2662
- // ignore the value of "this" that the user is trying to use, so
2663
- // let's warn.
2664
- if (newThis !== component && newThis !== null) {
2665
- if (true) {
2666
- warning(
2667
- false,
2668
- 'bind(): React component methods may only be bound to the ' +
2669
- 'component instance. See %s',
2670
- componentName
2671
- );
2672
- }
2673
- } else if (!args.length) {
2674
- if (true) {
2675
- warning(
2676
- false,
2677
- 'bind(): You are binding a component method to the component. ' +
2678
- 'React does this for you automatically in a high-performance ' +
2679
- 'way, so you can safely remove this call. See %s',
2680
- componentName
2681
- );
2682
- }
2683
- return boundMethod;
2684
- }
2685
- var reboundMethod = _bind.apply(boundMethod, arguments);
2686
- reboundMethod.__reactBoundContext = component;
2687
- reboundMethod.__reactBoundMethod = method;
2688
- reboundMethod.__reactBoundArguments = args;
2689
- return reboundMethod;
2690
- };
2691
- }
2692
- return boundMethod;
2693
  }
2694
 
2695
- /**
2696
- * Binds all auto-bound methods in a component.
2697
- *
2698
- * @param {object} component Component whose method is going to be bound.
2699
- */
2700
- function bindAutoBindMethods(component) {
2701
- var pairs = component.__reactAutoBindPairs;
2702
- for (var i = 0; i < pairs.length; i += 2) {
2703
- var autoBindKey = pairs[i];
2704
- var method = pairs[i + 1];
2705
- component[autoBindKey] = bindAutoBindMethod(component, method);
2706
- }
2707
- }
2708
 
2709
- var IsMountedPreMixin = {
2710
- componentDidMount: function() {
2711
- this.__isMounted = true;
2712
- }
2713
- };
2714
 
2715
- var IsMountedPostMixin = {
2716
- componentWillUnmount: function() {
2717
- this.__isMounted = false;
2718
- }
2719
- };
 
2720
 
2721
- /**
2722
- * Add more to the ReactClass base class. These are all legacy features and
2723
- * therefore not already part of the modern ReactComponent.
2724
- */
2725
- var ReactClassMixin = {
2726
- /**
2727
- * TODO: This will be deprecated because state should always keep a consistent
2728
- * type signature and the only use case for this, is to avoid that.
2729
- */
2730
- replaceState: function(newState, callback) {
2731
- this.updater.enqueueReplaceState(this, newState, callback);
2732
- },
2733
 
2734
- /**
2735
- * Checks whether or not this composite component is mounted.
2736
- * @return {boolean} True if mounted, false otherwise.
2737
- * @protected
2738
- * @final
2739
- */
2740
- isMounted: function() {
2741
- if (true) {
2742
- warning(
2743
- this.__didWarnIsMounted,
2744
- '%s: isMounted is deprecated. Instead, make sure to clean up ' +
2745
- 'subscriptions and pending requests in componentWillUnmount to ' +
2746
- 'prevent memory leaks.',
2747
- (this.constructor && this.constructor.displayName) ||
2748
- this.name ||
2749
- 'Component'
2750
- );
2751
- this.__didWarnIsMounted = true;
2752
- }
2753
- return !!this.__isMounted;
2754
  }
2755
- };
2756
-
2757
- var ReactClassComponent = function() {};
2758
- _assign(
2759
- ReactClassComponent.prototype,
2760
- ReactComponent.prototype,
2761
- ReactClassMixin
2762
- );
2763
-
2764
- /**
2765
- * Creates a composite component class given a class specification.
2766
- * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
2767
- *
2768
- * @param {object} spec Class specification (which must define `render`).
2769
- * @return {function} Component constructor function.
2770
- * @public
2771
- */
2772
- function createClass(spec) {
2773
- // To keep our warnings more understandable, we'll use a little hack here to
2774
- // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
2775
- // unnecessarily identify a class without displayName as 'Constructor'.
2776
- var Constructor = identity(function(props, context, updater) {
2777
- // This constructor gets overridden by mocks. The argument is used
2778
- // by mocks to assert on what gets mounted.
2779
-
2780
- if (true) {
2781
- warning(
2782
- this instanceof Constructor,
2783
- 'Something is calling a React component directly. Use a factory or ' +
2784
- 'JSX instead. See: https://fb.me/react-legacyfactory'
2785
- );
2786
- }
2787
-
2788
- // Wire up auto-binding
2789
- if (this.__reactAutoBindPairs.length) {
2790
- bindAutoBindMethods(this);
2791
- }
2792
-
2793
- this.props = props;
2794
- this.context = context;
2795
- this.refs = emptyObject;
2796
- this.updater = updater || ReactNoopUpdateQueue;
2797
 
2798
- this.state = null;
2799
 
2800
- // ReactClasses doesn't have constructors. Instead, they use the
2801
- // getInitialState and componentWillMount methods for initialization.
 
 
 
 
 
2802
 
2803
- var initialState = this.getInitialState ? this.getInitialState() : null;
2804
- if (true) {
2805
- // We allow auto-mocks to proceed as if they're returning null.
2806
- if (
2807
- initialState === undefined &&
2808
- this.getInitialState._isMockFunction
2809
- ) {
2810
- // This is probably bad practice. Consider warning here and
2811
- // deprecating this convenience.
2812
- initialState = null;
2813
- }
2814
- }
2815
- _invariant(
2816
- typeof initialState === 'object' && !Array.isArray(initialState),
2817
- '%s.getInitialState(): must return an object or null',
2818
- Constructor.displayName || 'ReactCompositeComponent'
2819
- );
2820
 
2821
- this.state = initialState;
2822
- });
2823
- Constructor.prototype = new ReactClassComponent();
2824
- Constructor.prototype.constructor = Constructor;
2825
- Constructor.prototype.__reactAutoBindPairs = [];
 
 
2826
 
2827
- injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
2828
 
2829
- mixSpecIntoComponent(Constructor, IsMountedPreMixin);
2830
- mixSpecIntoComponent(Constructor, spec);
2831
- mixSpecIntoComponent(Constructor, IsMountedPostMixin);
 
2832
 
2833
- // Initialize the defaultProps property after all mixins have been merged.
2834
- if (Constructor.getDefaultProps) {
2835
- Constructor.defaultProps = Constructor.getDefaultProps();
 
2836
  }
2837
-
2838
- if (true) {
2839
- // This is a tag to indicate that the use of these method names is ok,
2840
- // since it's used with createClass. If it's not, then it's likely a
2841
- // mistake so we'll warn you to use the static property, property
2842
- // initializer or constructor respectively.
2843
- if (Constructor.getDefaultProps) {
2844
- Constructor.getDefaultProps.isReactClassApproved = {};
2845
- }
2846
- if (Constructor.prototype.getInitialState) {
2847
- Constructor.prototype.getInitialState.isReactClassApproved = {};
2848
- }
2849
  }
2850
-
2851
- _invariant(
2852
- Constructor.prototype.render,
2853
- 'createClass(...): Class specification must implement a `render` method.'
2854
- );
2855
-
2856
- if (true) {
2857
- warning(
2858
- !Constructor.prototype.componentShouldUpdate,
2859
- '%s has a method called ' +
2860
- 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
2861
- 'The name is phrased as a question because the function is ' +
2862
- 'expected to return a value.',
2863
- spec.displayName || 'A component'
2864
- );
2865
- warning(
2866
- !Constructor.prototype.componentWillRecieveProps,
2867
- '%s has a method called ' +
2868
- 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
2869
- spec.displayName || 'A component'
2870
- );
2871
  }
2872
-
2873
- // Reduce time spent doing lookups by setting these on the prototype.
2874
- for (var methodName in ReactClassInterface) {
2875
- if (!Constructor.prototype[methodName]) {
2876
- Constructor.prototype[methodName] = null;
2877
- }
2878
  }
 
2879
 
2880
- return Constructor;
2881
- }
2882
 
2883
- return createClass;
2884
- }
2885
 
2886
- module.exports = factory;
 
 
 
 
2887
 
 
 
 
2888
 
2889
- /***/ }),
 
 
 
 
 
 
 
2890
 
2891
- /***/ "./node_modules/desandro-matches-selector/matches-selector.js":
2892
- /*!********************************************************************!*\
2893
- !*** ./node_modules/desandro-matches-selector/matches-selector.js ***!
2894
- \********************************************************************/
2895
- /*! no static exports found */
2896
- /***/ (function(module, exports, __webpack_require__) {
2897
 
2898
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2899
- * matchesSelector v2.0.2
2900
- * matchesSelector( element, '.selector' )
2901
- * MIT license
2902
- */
2903
-
2904
- /*jshint browser: true, strict: true, undef: true, unused: true */
 
 
2905
 
2906
- ( function( window, factory ) {
2907
- /*global define: false, module: false */
2908
- 'use strict';
2909
- // universal module definition
2910
- if ( true ) {
2911
- // AMD
2912
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2913
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2914
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2915
- __WEBPACK_AMD_DEFINE_FACTORY__),
2916
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2917
- } else {}
2918
 
2919
- }( window, function factory() {
2920
- 'use strict';
 
 
 
 
2921
 
2922
- var matchesMethod = ( function() {
2923
- var ElemProto = window.Element.prototype;
2924
- // check for the standard method name first
2925
- if ( ElemProto.matches ) {
2926
- return 'matches';
2927
- }
2928
- // check un-prefixed
2929
- if ( ElemProto.matchesSelector ) {
2930
- return 'matchesSelector';
2931
- }
2932
- // check vendor prefixes
2933
- var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
 
 
 
 
2934
 
2935
- for ( var i=0; i < prefixes.length; i++ ) {
2936
- var prefix = prefixes[i];
2937
- var method = prefix + 'MatchesSelector';
2938
- if ( ElemProto[ method ] ) {
2939
- return method;
 
 
 
 
 
 
 
 
2940
  }
2941
- }
2942
- })();
 
 
 
 
 
2943
 
2944
- return function matchesSelector( elem, selector ) {
2945
- return elem[ matchesMethod ]( selector );
2946
- };
 
 
 
2947
 
2948
  }));
2949
 
2950
 
2951
  /***/ }),
2952
 
2953
- /***/ "./node_modules/ev-emitter/ev-emitter.js":
2954
- /*!***********************************************!*\
2955
- !*** ./node_modules/ev-emitter/ev-emitter.js ***!
2956
- \***********************************************/
2957
  /*! no static exports found */
2958
  /***/ (function(module, exports, __webpack_require__) {
2959
 
2960
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2961
- * EvEmitter v1.1.0
2962
- * Lil' event emitter
2963
- * MIT License
2964
  */
2965
 
2966
- /* jshint unused: true, undef: true, strict: true */
 
2967
 
2968
- ( function( global, factory ) {
2969
- // universal module definition
2970
- /* jshint strict: false */ /* globals define, module, window */
2971
  if ( true ) {
2972
- // AMD - RequireJS
2973
  !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2974
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2975
  (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
@@ -2977,23733 +2465,35283 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2977
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2978
  } else {}
2979
 
2980
- }( typeof window != 'undefined' ? window : this, function() {
 
2981
 
2982
- "use strict";
2983
 
2984
- function EvEmitter() {}
 
 
 
 
 
 
2985
 
2986
- var proto = EvEmitter.prototype;
2987
 
2988
- proto.on = function( eventName, listener ) {
2989
- if ( !eventName || !listener ) {
2990
- return;
2991
- }
2992
- // set events hash
2993
- var events = this._events = this._events || {};
2994
- // set listeners array
2995
- var listeners = events[ eventName ] = events[ eventName ] || [];
2996
- // only add once
2997
- if ( listeners.indexOf( listener ) == -1 ) {
2998
- listeners.push( listener );
2999
- }
3000
 
3001
- return this;
3002
- };
3003
 
3004
- proto.once = function( eventName, listener ) {
3005
- if ( !eventName || !listener ) {
3006
- return;
3007
- }
3008
- // add event
3009
- this.on( eventName, listener );
3010
- // set once flag
3011
- // set onceEvents hash
3012
- var onceEvents = this._onceEvents = this._onceEvents || {};
3013
- // set onceListeners object
3014
- var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
3015
- // set flag
3016
- onceListeners[ listener ] = true;
 
3017
 
3018
- return this;
3019
- };
3020
 
3021
- proto.off = function( eventName, listener ) {
3022
- var listeners = this._events && this._events[ eventName ];
3023
- if ( !listeners || !listeners.length ) {
3024
- return;
3025
- }
3026
- var index = listeners.indexOf( listener );
3027
- if ( index != -1 ) {
3028
- listeners.splice( index, 1 );
 
 
 
 
3029
  }
 
 
3030
 
3031
- return this;
3032
- };
3033
 
3034
- proto.emitEvent = function( eventName, args ) {
3035
- var listeners = this._events && this._events[ eventName ];
3036
- if ( !listeners || !listeners.length ) {
3037
- return;
 
 
 
 
 
 
3038
  }
3039
- // copy over to avoid interference if .off() in listener
3040
- listeners = listeners.slice(0);
3041
- args = args || [];
3042
- // once stuff
3043
- var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
3044
 
3045
- for ( var i=0; i < listeners.length; i++ ) {
3046
- var listener = listeners[i]
3047
- var isOnce = onceListeners && onceListeners[ listener ];
3048
- if ( isOnce ) {
3049
- // remove listener
3050
- // remove before trigger to prevent recursion
3051
- this.off( eventName, listener );
3052
- // unset once flag
3053
- delete onceListeners[ listener ];
3054
- }
3055
- // trigger listener
3056
- listener.apply( this, args );
3057
- }
3058
 
3059
- return this;
3060
- };
3061
-
3062
- proto.allOff = function() {
3063
- delete this._events;
3064
- delete this._onceEvents;
3065
- };
3066
-
3067
- return EvEmitter;
3068
-
3069
- }));
3070
-
3071
-
3072
- /***/ }),
3073
-
3074
- /***/ "./node_modules/fbjs/lib/EventListener.js":
3075
- /*!************************************************!*\
3076
- !*** ./node_modules/fbjs/lib/EventListener.js ***!
3077
- \************************************************/
3078
- /*! no static exports found */
3079
- /***/ (function(module, exports, __webpack_require__) {
3080
-
3081
- "use strict";
3082
 
 
3083
 
3084
  /**
3085
- * Copyright (c) 2013-present, Facebook, Inc.
3086
- *
3087
- * This source code is licensed under the MIT license found in the
3088
- * LICENSE file in the root directory of this source tree.
3089
- *
3090
- * @typechecks
3091
  */
 
 
 
 
 
 
3092
 
3093
- var emptyFunction = __webpack_require__(/*! ./emptyFunction */ "./node_modules/fbjs/lib/emptyFunction.js");
3094
-
3095
- /**
3096
- * Upstream version of event listener. Does not take into account specific
3097
- * nature of platform.
3098
- */
3099
- var EventListener = {
3100
- /**
3101
- * Listen to DOM events during the bubble phase.
3102
- *
3103
- * @param {DOMEventTarget} target DOM element to register listener on.
3104
- * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
3105
- * @param {function} callback Callback function.
3106
- * @return {object} Object with a `remove` method.
3107
- */
3108
- listen: function listen(target, eventType, callback) {
3109
- if (target.addEventListener) {
3110
- target.addEventListener(eventType, callback, false);
3111
- return {
3112
- remove: function remove() {
3113
- target.removeEventListener(eventType, callback, false);
3114
- }
3115
- };
3116
- } else if (target.attachEvent) {
3117
- target.attachEvent('on' + eventType, callback);
3118
- return {
3119
- remove: function remove() {
3120
- target.detachEvent('on' + eventType, callback);
3121
- }
3122
- };
3123
- }
3124
- },
3125
 
3126
  /**
3127
- * Listen to DOM events during the capture phase.
3128
- *
3129
- * @param {DOMEventTarget} target DOM element to register listener on.
3130
- * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
3131
- * @param {function} callback Callback function.
3132
- * @return {object} Object with a `remove` method.
3133
  */
3134
- capture: function capture(target, eventType, callback) {
3135
- if (target.addEventListener) {
3136
- target.addEventListener(eventType, callback, true);
3137
- return {
3138
- remove: function remove() {
3139
- target.removeEventListener(eventType, callback, true);
3140
- }
3141
- };
3142
- } else {
3143
- if (true) {
3144
- console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
3145
- }
3146
- return {
3147
- remove: emptyFunction
3148
- };
3149
- }
3150
- },
3151
-
3152
- registerDefault: function registerDefault() {}
3153
- };
3154
-
3155
- module.exports = EventListener;
3156
-
3157
- /***/ }),
3158
 
3159
- /***/ "./node_modules/fbjs/lib/ExecutionEnvironment.js":
3160
- /*!*******************************************************!*\
3161
- !*** ./node_modules/fbjs/lib/ExecutionEnvironment.js ***!
3162
- \*******************************************************/
3163
- /*! no static exports found */
3164
- /***/ (function(module, exports, __webpack_require__) {
3165
 
3166
- "use strict";
3167
- /**
3168
- * Copyright (c) 2013-present, Facebook, Inc.
3169
- *
3170
- * This source code is licensed under the MIT license found in the
3171
- * LICENSE file in the root directory of this source tree.
3172
- *
3173
- */
3174
 
 
3175
 
 
 
3176
 
3177
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
 
 
 
3178
 
3179
- /**
3180
- * Simple, lightweight module assisting with the detection and context of
3181
- * Worker. Helps avoid circular dependencies and allows code to reason about
3182
- * whether or not they are in a Worker, even if they never include the main
3183
- * `ReactWorker` dependency.
3184
- */
3185
- var ExecutionEnvironment = {
3186
 
3187
- canUseDOM: canUseDOM,
3188
 
3189
- canUseWorkers: typeof Worker !== 'undefined',
 
 
 
3190
 
3191
- canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
 
 
3192
 
3193
- canUseViewport: canUseDOM && !!window.screen,
3194
 
3195
- isInWorker: !canUseDOM // For now, this is true - might change in the future.
 
 
 
 
 
 
 
3196
 
3197
- };
 
 
 
 
 
3198
 
3199
- module.exports = ExecutionEnvironment;
3200
 
3201
- /***/ }),
 
 
 
 
 
 
3202
 
3203
- /***/ "./node_modules/fbjs/lib/camelize.js":
3204
- /*!*******************************************!*\
3205
- !*** ./node_modules/fbjs/lib/camelize.js ***!
3206
- \*******************************************/
3207
- /*! no static exports found */
3208
- /***/ (function(module, exports, __webpack_require__) {
3209
 
3210
- "use strict";
 
3211
 
 
 
3212
 
3213
- /**
3214
- * Copyright (c) 2013-present, Facebook, Inc.
3215
- *
3216
- * This source code is licensed under the MIT license found in the
3217
- * LICENSE file in the root directory of this source tree.
3218
- *
3219
- * @typechecks
3220
- */
3221
 
3222
- var _hyphenPattern = /-(.)/g;
3223
 
3224
- /**
3225
- * Camelcases a hyphenated string, for example:
3226
- *
3227
- * > camelize('background-color')
3228
- * < "backgroundColor"
3229
- *
3230
- * @param {string} string
3231
- * @return {string}
3232
- */
3233
- function camelize(string) {
3234
- return string.replace(_hyphenPattern, function (_, character) {
3235
- return character.toUpperCase();
3236
- });
3237
- }
3238
 
3239
- module.exports = camelize;
3240
 
3241
  /***/ }),
3242
 
3243
- /***/ "./node_modules/fbjs/lib/camelizeStyleName.js":
3244
- /*!****************************************************!*\
3245
- !*** ./node_modules/fbjs/lib/camelizeStyleName.js ***!
3246
- \****************************************************/
3247
  /*! no static exports found */
3248
  /***/ (function(module, exports, __webpack_require__) {
3249
 
3250
- "use strict";
3251
- /**
3252
- * Copyright (c) 2013-present, Facebook, Inc.
3253
- *
3254
- * This source code is licensed under the MIT license found in the
3255
- * LICENSE file in the root directory of this source tree.
3256
- *
3257
- * @typechecks
3258
  */
3259
 
 
 
3260
 
 
3261
 
3262
- var camelize = __webpack_require__(/*! ./camelize */ "./node_modules/fbjs/lib/camelize.js");
3263
-
3264
- var msPattern = /^-ms-/;
 
 
 
 
 
 
3265
 
3266
- /**
3267
- * Camelcases a hyphenated CSS property name, for example:
3268
- *
3269
- * > camelizeStyleName('background-color')
3270
- * < "backgroundColor"
3271
- * > camelizeStyleName('-moz-transition')
3272
- * < "MozTransition"
3273
- * > camelizeStyleName('-ms-transition')
3274
- * < "msTransition"
3275
- *
3276
- * As Andi Smith suggests
3277
- * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
3278
- * is converted to lowercase `ms`.
3279
- *
3280
- * @param {string} string
3281
- * @return {string}
3282
- */
3283
- function camelizeStyleName(string) {
3284
- return camelize(string.replace(msPattern, 'ms-'));
3285
- }
3286
 
3287
- module.exports = camelizeStyleName;
3288
 
3289
- /***/ }),
3290
 
3291
- /***/ "./node_modules/fbjs/lib/containsNode.js":
3292
- /*!***********************************************!*\
3293
- !*** ./node_modules/fbjs/lib/containsNode.js ***!
3294
- \***********************************************/
3295
- /*! no static exports found */
3296
- /***/ (function(module, exports, __webpack_require__) {
3297
 
3298
- "use strict";
 
3299
 
 
3300
 
3301
- /**
3302
- * Copyright (c) 2013-present, Facebook, Inc.
3303
- *
3304
- * This source code is licensed under the MIT license found in the
3305
- * LICENSE file in the root directory of this source tree.
3306
- *
3307
- *
3308
- */
3309
 
3310
- var isTextNode = __webpack_require__(/*! ./isTextNode */ "./node_modules/fbjs/lib/isTextNode.js");
3311
 
3312
- /*eslint-disable no-bitwise */
 
 
 
 
 
3313
 
3314
- /**
3315
- * Checks if a given DOM node contains or is another DOM node.
3316
- */
3317
- function containsNode(outerNode, innerNode) {
3318
- if (!outerNode || !innerNode) {
3319
- return false;
3320
- } else if (outerNode === innerNode) {
3321
- return true;
3322
- } else if (isTextNode(outerNode)) {
3323
- return false;
3324
- } else if (isTextNode(innerNode)) {
3325
- return containsNode(outerNode, innerNode.parentNode);
3326
- } else if ('contains' in outerNode) {
3327
- return outerNode.contains(innerNode);
3328
- } else if (outerNode.compareDocumentPosition) {
3329
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
3330
- } else {
3331
- return false;
3332
  }
 
 
 
3333
  }
3334
 
3335
- module.exports = containsNode;
3336
-
3337
- /***/ }),
3338
-
3339
- /***/ "./node_modules/fbjs/lib/createArrayFromMixed.js":
3340
- /*!*******************************************************!*\
3341
- !*** ./node_modules/fbjs/lib/createArrayFromMixed.js ***!
3342
- \*******************************************************/
3343
- /*! no static exports found */
3344
- /***/ (function(module, exports, __webpack_require__) {
3345
-
3346
- "use strict";
3347
-
3348
-
3349
- /**
3350
- * Copyright (c) 2013-present, Facebook, Inc.
3351
- *
3352
- * This source code is licensed under the MIT license found in the
3353
- * LICENSE file in the root directory of this source tree.
3354
- *
3355
- * @typechecks
3356
- */
3357
-
3358
- var invariant = __webpack_require__(/*! ./invariant */ "./node_modules/fbjs/lib/invariant.js");
3359
 
3360
  /**
3361
- * Convert array-like objects to arrays.
3362
- *
3363
- * This API assumes the caller knows the contents of the data type. For less
3364
- * well defined inputs use createArrayFromMixed.
3365
- *
3366
- * @param {object|function|filelist} obj
3367
- * @return {array}
3368
  */
3369
- function toArray(obj) {
3370
- var length = obj.length;
3371
-
3372
- // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
3373
- // in old versions of Safari).
3374
- !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? true ? invariant(false, 'toArray: Array-like object expected') : undefined : void 0;
3375
-
3376
- !(typeof length === 'number') ? true ? invariant(false, 'toArray: Object needs a length property') : undefined : void 0;
3377
-
3378
- !(length === 0 || length - 1 in obj) ? true ? invariant(false, 'toArray: Object should have keys for indices') : undefined : void 0;
3379
-
3380
- !(typeof obj.callee !== 'function') ? true ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : undefined : void 0;
 
 
 
3381
 
3382
- // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
3383
- // without method will throw during the slice call and skip straight to the
3384
- // fallback.
3385
- if (obj.hasOwnProperty) {
3386
- try {
3387
- return Array.prototype.slice.call(obj);
3388
- } catch (e) {
3389
- // IE < 9 does not support Array#slice on collections objects
3390
- }
3391
  }
3392
 
3393
- // Fall back to copying key by key. This assumes all keys have a value,
3394
- // so will not preserve sparsely populated inputs.
3395
- var ret = Array(length);
3396
- for (var ii = 0; ii < length; ii++) {
3397
- ret[ii] = obj[ii];
3398
  }
3399
- return ret;
3400
- }
3401
 
3402
- /**
3403
- * Perform a heuristic test to determine if an object is "array-like".
3404
- *
3405
- * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
3406
- * Joshu replied: "Mu."
3407
- *
3408
- * This function determines if its argument has "array nature": it returns
3409
- * true if the argument is an actual array, an `arguments' object, or an
3410
- * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
3411
- *
3412
- * It will return false for other array-like objects like Filelist.
3413
- *
3414
- * @param {*} obj
3415
- * @return {boolean}
3416
- */
3417
- function hasArrayNature(obj) {
3418
- return (
3419
- // not null/false
3420
- !!obj && (
3421
- // arrays are objects, NodeLists are functions in Safari
3422
- typeof obj == 'object' || typeof obj == 'function') &&
3423
- // quacks like an array
3424
- 'length' in obj &&
3425
- // not window
3426
- !('setInterval' in obj) &&
3427
- // no DOM node should be considered an array-like
3428
- // a 'select' element has 'length' and 'item' properties on IE8
3429
- typeof obj.nodeType != 'number' && (
3430
- // a real array
3431
- Array.isArray(obj) ||
3432
- // arguments
3433
- 'callee' in obj ||
3434
- // HTMLCollection/NodeList
3435
- 'item' in obj)
3436
- );
3437
- }
3438
 
3439
- /**
3440
- * Ensure that the argument is an array by wrapping it in an array if it is not.
3441
- * Creates a copy of the argument if it is already an array.
3442
- *
3443
- * This is mostly useful idiomatically:
3444
- *
3445
- * var createArrayFromMixed = require('createArrayFromMixed');
3446
- *
3447
- * function takesOneOrMoreThings(things) {
3448
- * things = createArrayFromMixed(things);
3449
- * ...
3450
- * }
3451
- *
3452
- * This allows you to treat `things' as an array, but accept scalars in the API.
3453
- *
3454
- * If you need to convert an array-like object, like `arguments`, into an array
3455
- * use toArray instead.
3456
- *
3457
- * @param {*} obj
3458
- * @return {array}
3459
- */
3460
- function createArrayFromMixed(obj) {
3461
- if (!hasArrayNature(obj)) {
3462
- return [obj];
3463
- } else if (Array.isArray(obj)) {
3464
- return obj.slice();
3465
- } else {
3466
- return toArray(obj);
3467
  }
3468
- }
3469
 
3470
- module.exports = createArrayFromMixed;
 
 
3471
 
3472
- /***/ }),
3473
 
3474
- /***/ "./node_modules/fbjs/lib/createNodesFromMarkup.js":
3475
- /*!********************************************************!*\
3476
- !*** ./node_modules/fbjs/lib/createNodesFromMarkup.js ***!
3477
- \********************************************************/
3478
- /*! no static exports found */
3479
- /***/ (function(module, exports, __webpack_require__) {
3480
 
3481
- "use strict";
 
3482
 
 
 
 
3483
 
3484
  /**
3485
- * Copyright (c) 2013-present, Facebook, Inc.
3486
- *
3487
- * This source code is licensed under the MIT license found in the
3488
- * LICENSE file in the root directory of this source tree.
3489
- *
3490
- * @typechecks
3491
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3492
 
3493
- /*eslint-disable fb-www/unsafe-html*/
 
 
 
 
 
 
 
 
3494
 
3495
- var ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
 
 
 
 
3496
 
3497
- var createArrayFromMixed = __webpack_require__(/*! ./createArrayFromMixed */ "./node_modules/fbjs/lib/createArrayFromMixed.js");
3498
- var getMarkupWrap = __webpack_require__(/*! ./getMarkupWrap */ "./node_modules/fbjs/lib/getMarkupWrap.js");
3499
- var invariant = __webpack_require__(/*! ./invariant */ "./node_modules/fbjs/lib/invariant.js");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3500
 
3501
  /**
3502
- * Dummy container used to render all markup.
3503
  */
3504
- var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
 
 
 
3505
 
3506
- /**
3507
- * Pattern used by `getNodeName`.
3508
- */
3509
- var nodeNamePattern = /^\s*<(\w+)/;
3510
 
3511
- /**
3512
- * Extracts the `nodeName` of the first element in a string of markup.
3513
- *
3514
- * @param {string} markup String of markup.
3515
- * @return {?string} Node name of the supplied markup.
3516
- */
3517
- function getNodeName(markup) {
3518
- var nodeNameMatch = markup.match(nodeNamePattern);
3519
- return nodeNameMatch && nodeNameMatch[1].toLowerCase();
3520
- }
3521
 
3522
- /**
3523
- * Creates an array containing the nodes rendered from the supplied markup. The
3524
- * optionally supplied `handleScript` function will be invoked once for each
3525
- * <script> element that is rendered. If no `handleScript` function is supplied,
3526
- * an exception is thrown if any <script> elements are rendered.
3527
- *
3528
- * @param {string} markup A string of valid HTML markup.
3529
- * @param {?function} handleScript Invoked once for each rendered <script>.
3530
- * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
3531
- */
3532
- function createNodesFromMarkup(markup, handleScript) {
3533
- var node = dummyNode;
3534
- !!!dummyNode ? true ? invariant(false, 'createNodesFromMarkup dummy not initialized') : undefined : void 0;
3535
- var nodeName = getNodeName(markup);
3536
 
3537
- var wrap = nodeName && getMarkupWrap(nodeName);
3538
- if (wrap) {
3539
- node.innerHTML = wrap[1] + markup + wrap[2];
 
 
3540
 
3541
- var wrapDepth = wrap[0];
3542
- while (wrapDepth--) {
3543
- node = node.lastChild;
3544
- }
3545
- } else {
3546
- node.innerHTML = markup;
 
 
 
 
 
3547
  }
3548
 
3549
- var scripts = node.getElementsByTagName('script');
3550
- if (scripts.length) {
3551
- !handleScript ? true ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : undefined : void 0;
3552
- createArrayFromMixed(scripts).forEach(handleScript);
3553
  }
 
3554
 
3555
- var nodes = Array.from(node.childNodes);
3556
- while (node.lastChild) {
3557
- node.removeChild(node.lastChild);
 
 
 
 
 
3558
  }
3559
- return nodes;
3560
- }
3561
 
3562
- module.exports = createNodesFromMarkup;
3563
 
3564
- /***/ }),
 
 
3565
 
3566
- /***/ "./node_modules/fbjs/lib/emptyFunction.js":
3567
- /*!************************************************!*\
3568
- !*** ./node_modules/fbjs/lib/emptyFunction.js ***!
3569
- \************************************************/
3570
- /*! no static exports found */
3571
- /***/ (function(module, exports, __webpack_require__) {
3572
 
3573
- "use strict";
 
 
 
 
 
 
 
 
3574
 
 
 
 
 
 
 
 
 
 
3575
 
3576
- /**
3577
- * Copyright (c) 2013-present, Facebook, Inc.
3578
- *
3579
- * This source code is licensed under the MIT license found in the
3580
- * LICENSE file in the root directory of this source tree.
3581
- *
3582
- *
3583
- */
3584
 
3585
- function makeEmptyFunction(arg) {
3586
- return function () {
3587
- return arg;
3588
- };
3589
- }
3590
 
3591
- /**
3592
- * This function accepts and discards inputs; it has no side effects. This is
3593
- * primarily useful idiomatically for overridable function endpoints which
3594
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
3595
- */
3596
- var emptyFunction = function emptyFunction() {};
3597
 
3598
- emptyFunction.thatReturns = makeEmptyFunction;
3599
- emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
3600
- emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
3601
- emptyFunction.thatReturnsNull = makeEmptyFunction(null);
3602
- emptyFunction.thatReturnsThis = function () {
3603
- return this;
3604
- };
3605
- emptyFunction.thatReturnsArgument = function (arg) {
3606
- return arg;
3607
  };
3608
 
3609
- module.exports = emptyFunction;
3610
-
3611
- /***/ }),
3612
-
3613
- /***/ "./node_modules/fbjs/lib/emptyObject.js":
3614
- /*!**********************************************!*\
3615
- !*** ./node_modules/fbjs/lib/emptyObject.js ***!
3616
- \**********************************************/
3617
- /*! no static exports found */
3618
- /***/ (function(module, exports, __webpack_require__) {
3619
-
3620
- "use strict";
3621
- /**
3622
- * Copyright (c) 2013-present, Facebook, Inc.
3623
- *
3624
- * This source code is licensed under the MIT license found in the
3625
- * LICENSE file in the root directory of this source tree.
3626
- *
3627
- */
3628
 
 
 
 
 
3629
 
 
 
 
 
 
 
3630
 
3631
- var emptyObject = {};
3632
 
3633
- if (true) {
3634
- Object.freeze(emptyObject);
 
 
3635
  }
3636
 
3637
- module.exports = emptyObject;
3638
-
3639
- /***/ }),
3640
-
3641
- /***/ "./node_modules/fbjs/lib/focusNode.js":
3642
- /*!********************************************!*\
3643
- !*** ./node_modules/fbjs/lib/focusNode.js ***!
3644
- \********************************************/
3645
- /*! no static exports found */
3646
- /***/ (function(module, exports, __webpack_require__) {
3647
-
3648
- "use strict";
3649
- /**
3650
- * Copyright (c) 2013-present, Facebook, Inc.
3651
- *
3652
- * This source code is licensed under the MIT license found in the
3653
- * LICENSE file in the root directory of this source tree.
3654
- *
3655
- */
3656
-
3657
-
3658
-
3659
- /**
3660
- * @param {DOMElement} node input/textarea to focus
3661
- */
3662
-
3663
- function focusNode(node) {
3664
- // IE8 can throw "Can't move focus to the control because it is invisible,
3665
- // not enabled, or of a type that does not accept the focus." for all kinds of
3666
- // reasons that are too expensive and fragile to test.
3667
- try {
3668
- node.focus();
3669
- } catch (e) {}
3670
- }
3671
 
3672
- module.exports = focusNode;
 
 
 
 
 
 
 
 
 
 
3673
 
3674
- /***/ }),
 
 
 
3675
 
3676
- /***/ "./node_modules/fbjs/lib/getActiveElement.js":
3677
- /*!***************************************************!*\
3678
- !*** ./node_modules/fbjs/lib/getActiveElement.js ***!
3679
- \***************************************************/
3680
- /*! no static exports found */
3681
- /***/ (function(module, exports, __webpack_require__) {
3682
 
3683
- "use strict";
3684
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3685
 
3686
- /**
3687
- * Copyright (c) 2013-present, Facebook, Inc.
3688
- *
3689
- * This source code is licensed under the MIT license found in the
3690
- * LICENSE file in the root directory of this source tree.
3691
- *
3692
- * @typechecks
3693
- */
3694
 
3695
- /* eslint-disable fb-www/typeof-undefined */
3696
 
3697
- /**
3698
- * Same as document.activeElement but wraps in a try-catch block. In IE it is
3699
- * not safe to call document.activeElement if there is nothing focused.
3700
- *
3701
- * The activeElement will be null only if the document or document body is not
3702
- * yet defined.
3703
- *
3704
- * @param {?DOMDocument} doc Defaults to current document.
3705
- * @return {?DOMElement}
3706
- */
3707
- function getActiveElement(doc) /*?DOMElement*/{
3708
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
3709
- if (typeof doc === 'undefined') {
3710
- return null;
3711
- }
3712
- try {
3713
- return doc.activeElement || doc.body;
3714
- } catch (e) {
3715
- return doc.body;
3716
- }
3717
- }
3718
 
3719
- module.exports = getActiveElement;
3720
 
3721
  /***/ }),
3722
 
3723
- /***/ "./node_modules/fbjs/lib/getMarkupWrap.js":
3724
  /*!************************************************!*\
3725
- !*** ./node_modules/fbjs/lib/getMarkupWrap.js ***!
3726
  \************************************************/
3727
  /*! no static exports found */
3728
  /***/ (function(module, exports, __webpack_require__) {
3729
 
3730
- "use strict";
3731
-
3732
-
3733
- /**
3734
- * Copyright (c) 2013-present, Facebook, Inc.
3735
- *
3736
- * This source code is licensed under the MIT license found in the
3737
- * LICENSE file in the root directory of this source tree.
3738
- *
3739
  */
3740
 
3741
- /*eslint-disable fb-www/unsafe-html */
3742
-
3743
- var ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
 
 
 
 
 
 
 
 
 
 
3744
 
3745
- var invariant = __webpack_require__(/*! ./invariant */ "./node_modules/fbjs/lib/invariant.js");
3746
 
3747
- /**
3748
- * Dummy container used to detect which wraps are necessary.
3749
- */
3750
- var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
3751
 
3752
- /**
3753
- * Some browsers cannot use `innerHTML` to render certain elements standalone,
3754
- * so we wrap them, render the wrapped nodes, then extract the desired node.
3755
- *
3756
- * In IE8, certain elements cannot render alone, so wrap all elements ('*').
3757
- */
3758
 
3759
- var shouldWrap = {};
 
 
 
3760
 
3761
- var selectWrap = [1, '<select multiple="true">', '</select>'];
3762
- var tableWrap = [1, '<table>', '</table>'];
3763
- var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
3764
 
3765
- var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
 
 
 
 
3766
 
3767
- var markupWrap = {
3768
- '*': [1, '?<div>', '</div>'],
 
 
 
3769
 
3770
- 'area': [1, '<map>', '</map>'],
3771
- 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
3772
- 'legend': [1, '<fieldset>', '</fieldset>'],
3773
- 'param': [1, '<object>', '</object>'],
3774
- 'tr': [2, '<table><tbody>', '</tbody></table>'],
3775
 
3776
- 'optgroup': selectWrap,
3777
- 'option': selectWrap,
 
 
 
 
 
 
 
 
 
3778
 
3779
- 'caption': tableWrap,
3780
- 'colgroup': tableWrap,
3781
- 'tbody': tableWrap,
3782
- 'tfoot': tableWrap,
3783
- 'thead': tableWrap,
3784
 
3785
- 'td': trWrap,
3786
- 'th': trWrap
3787
- };
 
 
 
 
 
 
 
3788
 
3789
- // Initialize the SVG elements since we know they'll always need to be wrapped
3790
- // consistently. If they are created inside a <div> they will be initialized in
3791
- // the wrong namespace (and will not display).
3792
- var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
3793
- svgElements.forEach(function (nodeName) {
3794
- markupWrap[nodeName] = svgWrap;
3795
- shouldWrap[nodeName] = true;
3796
- });
 
3797
 
3798
- /**
3799
- * Gets the markup wrap configuration for the supplied `nodeName`.
3800
- *
3801
- * NOTE: This lazily detects which wraps are necessary for the current browser.
3802
- *
3803
- * @param {string} nodeName Lowercase `nodeName`.
3804
- * @return {?array} Markup wrap configuration, if applicable.
3805
- */
3806
- function getMarkupWrap(nodeName) {
3807
- !!!dummyNode ? true ? invariant(false, 'Markup wrapping node not initialized') : undefined : void 0;
3808
- if (!markupWrap.hasOwnProperty(nodeName)) {
3809
- nodeName = '*';
3810
- }
3811
- if (!shouldWrap.hasOwnProperty(nodeName)) {
3812
- if (nodeName === '*') {
3813
- dummyNode.innerHTML = '<link />';
3814
- } else {
3815
- dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
 
 
 
 
3816
  }
3817
- shouldWrap[nodeName] = !dummyNode.firstChild;
3818
- }
3819
- return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
3820
- }
3821
 
3822
- module.exports = getMarkupWrap;
 
3823
 
3824
- /***/ }),
 
 
 
3825
 
3826
- /***/ "./node_modules/fbjs/lib/getUnboundedScrollPosition.js":
3827
- /*!*************************************************************!*\
3828
- !*** ./node_modules/fbjs/lib/getUnboundedScrollPosition.js ***!
3829
- \*************************************************************/
3830
- /*! no static exports found */
3831
- /***/ (function(module, exports, __webpack_require__) {
3832
 
3833
- "use strict";
3834
- /**
3835
- * Copyright (c) 2013-present, Facebook, Inc.
3836
- *
3837
- * This source code is licensed under the MIT license found in the
3838
- * LICENSE file in the root directory of this source tree.
3839
- *
3840
- * @typechecks
3841
- */
3842
 
 
 
 
 
 
 
 
 
 
3843
 
 
 
 
 
 
 
 
 
 
3844
 
3845
- /**
3846
- * Gets the scroll position of the supplied element or window.
3847
- *
3848
- * The return values are unbounded, unlike `getScrollPosition`. This means they
3849
- * may be negative or exceed the element boundaries (which is possible using
3850
- * inertial scrolling).
3851
- *
3852
- * @param {DOMWindow|DOMElement} scrollable
3853
- * @return {object} Map with `x` and `y` keys.
3854
- */
3855
 
3856
- function getUnboundedScrollPosition(scrollable) {
3857
- if (scrollable.Window && scrollable instanceof scrollable.Window) {
3858
  return {
3859
- x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
3860
- y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
3861
  };
3862
- }
3863
- return {
3864
- x: scrollable.scrollLeft,
3865
- y: scrollable.scrollTop
3866
  };
3867
- }
3868
 
3869
- module.exports = getUnboundedScrollPosition;
 
 
 
 
 
 
 
 
 
 
 
 
 
3870
 
3871
- /***/ }),
 
 
 
 
 
 
3872
 
3873
- /***/ "./node_modules/fbjs/lib/hyphenate.js":
3874
- /*!********************************************!*\
3875
- !*** ./node_modules/fbjs/lib/hyphenate.js ***!
3876
- \********************************************/
3877
- /*! no static exports found */
3878
- /***/ (function(module, exports, __webpack_require__) {
3879
 
3880
- "use strict";
 
 
3881
 
 
 
3882
 
3883
- /**
3884
- * Copyright (c) 2013-present, Facebook, Inc.
3885
- *
3886
- * This source code is licensed under the MIT license found in the
3887
- * LICENSE file in the root directory of this source tree.
3888
- *
3889
- * @typechecks
3890
- */
 
 
 
 
 
3891
 
3892
- var _uppercasePattern = /([A-Z])/g;
 
 
 
 
3893
 
3894
- /**
3895
- * Hyphenates a camelcased string, for example:
3896
- *
3897
- * > hyphenate('backgroundColor')
3898
- * < "background-color"
3899
- *
3900
- * For CSS style names, use `hyphenateStyleName` instead which works properly
3901
- * with all vendor prefixes, including `ms`.
3902
- *
3903
- * @param {string} string
3904
- * @return {string}
3905
- */
3906
- function hyphenate(string) {
3907
- return string.replace(_uppercasePattern, '-$1').toLowerCase();
3908
- }
3909
 
3910
- module.exports = hyphenate;
3911
 
3912
  /***/ }),
3913
 
3914
- /***/ "./node_modules/fbjs/lib/hyphenateStyleName.js":
3915
- /*!*****************************************************!*\
3916
- !*** ./node_modules/fbjs/lib/hyphenateStyleName.js ***!
3917
- \*****************************************************/
3918
  /*! no static exports found */
3919
  /***/ (function(module, exports, __webpack_require__) {
3920
 
3921
  "use strict";
3922
- /**
3923
- * Copyright (c) 2013-present, Facebook, Inc.
3924
- *
3925
- * This source code is licensed under the MIT license found in the
3926
- * LICENSE file in the root directory of this source tree.
3927
- *
3928
- * @typechecks
3929
- */
3930
-
3931
 
3932
 
3933
- var hyphenate = __webpack_require__(/*! ./hyphenate */ "./node_modules/fbjs/lib/hyphenate.js");
 
 
 
3934
 
3935
- var msPattern = /^ms-/;
 
 
 
3936
 
3937
- /**
3938
- * Hyphenates a camelcased CSS property name, for example:
3939
- *
3940
- * > hyphenateStyleName('backgroundColor')
3941
- * < "background-color"
3942
- * > hyphenateStyleName('MozTransition')
3943
- * < "-moz-transition"
3944
- * > hyphenateStyleName('msTransition')
3945
- * < "-ms-transition"
3946
- *
3947
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
3948
- * is converted to `-ms-`.
3949
- *
3950
- * @param {string} string
3951
- * @return {string}
3952
- */
3953
- function hyphenateStyleName(string) {
3954
- return hyphenate(string).replace(msPattern, '-ms-');
3955
  }
3956
 
3957
- module.exports = hyphenateStyleName;
3958
-
3959
- /***/ }),
3960
-
3961
- /***/ "./node_modules/fbjs/lib/invariant.js":
3962
- /*!********************************************!*\
3963
- !*** ./node_modules/fbjs/lib/invariant.js ***!
3964
- \********************************************/
3965
- /*! no static exports found */
3966
- /***/ (function(module, exports, __webpack_require__) {
3967
-
3968
- "use strict";
3969
- /**
3970
- * Copyright (c) 2013-present, Facebook, Inc.
3971
- *
3972
- * This source code is licensed under the MIT license found in the
3973
- * LICENSE file in the root directory of this source tree.
3974
- *
3975
- */
3976
 
 
3977
 
 
 
 
 
 
 
3978
 
3979
- /**
3980
- * Use invariant() to assert state which your program assumes to be true.
3981
- *
3982
- * Provide sprintf-style format (only %s is supported) and arguments
3983
- * to provide information about what broke and what you were
3984
- * expecting.
3985
- *
3986
- * The invariant message will be stripped in production, but the invariant
3987
- * will remain to ensure logic does not differ in production.
3988
- */
 
3989
 
3990
- var validateFormat = function validateFormat(format) {};
 
 
 
 
 
 
 
 
3991
 
3992
- if (true) {
3993
- validateFormat = function validateFormat(format) {
3994
- if (format === undefined) {
3995
- throw new Error('invariant requires an error message argument');
3996
- }
3997
- };
3998
  }
3999
 
4000
- function invariant(condition, format, a, b, c, d, e, f) {
4001
- validateFormat(format);
 
 
4002
 
4003
- if (!condition) {
4004
- var error;
4005
- if (format === undefined) {
4006
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
4007
- } else {
4008
- var args = [a, b, c, d, e, f];
4009
- var argIndex = 0;
4010
- error = new Error(format.replace(/%s/g, function () {
4011
- return args[argIndex++];
4012
- }));
4013
- error.name = 'Invariant Violation';
4014
- }
4015
 
4016
- error.framesToPop = 1; // we don't care about invariant's own frame
4017
- throw error;
4018
- }
4019
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4020
 
4021
- module.exports = invariant;
4022
 
4023
  /***/ }),
4024
 
4025
- /***/ "./node_modules/fbjs/lib/isNode.js":
4026
- /*!*****************************************!*\
4027
- !*** ./node_modules/fbjs/lib/isNode.js ***!
4028
- \*****************************************/
4029
  /*! no static exports found */
4030
  /***/ (function(module, exports, __webpack_require__) {
4031
 
4032
- "use strict";
4033
-
4034
-
4035
- /**
4036
- * Copyright (c) 2013-present, Facebook, Inc.
4037
- *
4038
- * This source code is licensed under the MIT license found in the
4039
- * LICENSE file in the root directory of this source tree.
4040
- *
4041
- * @typechecks
4042
- */
4043
-
4044
- /**
4045
- * @param {*} object The object to check.
4046
- * @return {boolean} Whether or not the object is a DOM node.
4047
  */
4048
- function isNode(object) {
4049
- var doc = object ? object.ownerDocument || object : document;
4050
- var defaultView = doc.defaultView || window;
4051
- return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
4052
- }
4053
 
4054
- module.exports = isNode;
 
 
 
 
 
 
 
 
 
 
 
 
4055
 
4056
- /***/ }),
 
4057
 
4058
- /***/ "./node_modules/fbjs/lib/isTextNode.js":
4059
- /*!*********************************************!*\
4060
- !*** ./node_modules/fbjs/lib/isTextNode.js ***!
4061
- \*********************************************/
4062
- /*! no static exports found */
4063
- /***/ (function(module, exports, __webpack_require__) {
4064
 
4065
- "use strict";
 
 
 
 
 
 
4066
 
 
4067
 
4068
- /**
4069
- * Copyright (c) 2013-present, Facebook, Inc.
4070
- *
4071
- * This source code is licensed under the MIT license found in the
4072
- * LICENSE file in the root directory of this source tree.
4073
- *
4074
- * @typechecks
4075
- */
4076
 
4077
- var isNode = __webpack_require__(/*! ./isNode */ "./node_modules/fbjs/lib/isNode.js");
4078
 
4079
- /**
4080
- * @param {*} object The object to check.
4081
- * @return {boolean} Whether or not the object is a DOM text node.
4082
- */
4083
- function isTextNode(object) {
4084
- return isNode(object) && object.nodeType == 3;
4085
- }
4086
 
4087
- module.exports = isTextNode;
 
 
 
4088
 
4089
- /***/ }),
 
 
 
 
 
 
 
4090
 
4091
- /***/ "./node_modules/fbjs/lib/memoizeStringOnly.js":
4092
- /*!****************************************************!*\
4093
- !*** ./node_modules/fbjs/lib/memoizeStringOnly.js ***!
4094
- \****************************************************/
4095
- /*! no static exports found */
4096
- /***/ (function(module, exports, __webpack_require__) {
4097
 
4098
- "use strict";
4099
- /**
4100
- * Copyright (c) 2013-present, Facebook, Inc.
4101
- *
4102
- * This source code is licensed under the MIT license found in the
4103
- * LICENSE file in the root directory of this source tree.
4104
- *
4105
- *
4106
- * @typechecks static-only
4107
- */
4108
 
 
 
 
 
 
 
 
4109
 
 
 
4110
 
4111
- /**
4112
- * Memoizes the return value of a function that accepts one string argument.
4113
- */
4114
 
4115
- function memoizeStringOnly(callback) {
4116
- var cache = {};
4117
- return function (string) {
4118
- if (!cache.hasOwnProperty(string)) {
4119
- cache[string] = callback.call(this, string);
4120
- }
4121
- return cache[string];
4122
  };
4123
- }
4124
 
4125
- module.exports = memoizeStringOnly;
 
 
 
4126
 
4127
- /***/ }),
 
 
 
 
 
 
4128
 
4129
- /***/ "./node_modules/fbjs/lib/performance.js":
4130
- /*!**********************************************!*\
4131
- !*** ./node_modules/fbjs/lib/performance.js ***!
4132
- \**********************************************/
4133
- /*! no static exports found */
4134
- /***/ (function(module, exports, __webpack_require__) {
4135
 
4136
- "use strict";
4137
  /**
4138
- * Copyright (c) 2013-present, Facebook, Inc.
4139
- *
4140
- * This source code is licensed under the MIT license found in the
4141
- * LICENSE file in the root directory of this source tree.
4142
- *
4143
- * @typechecks
4144
  */
 
 
4145