react-error-boundaries
Version:
React HOC for error boundaries.
1,036 lines (1,032 loc) • 76.7 kB
JavaScript
/*! Copyright © 2017 by Chyrain. All rights reserved. */
!function(root, factory) {
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("React"), require("ReactDOM")) : "function" == typeof define && define.amd ? define([ "React", "ReactDOM" ], factory) : "object" == typeof exports ? exports.ReactErrorBoundaries = factory(require("React"), require("ReactDOM")) : root.ReactErrorBoundaries = factory(root.React, root.ReactDOM);
}("undefined" != typeof self ? self : this, function(__WEBPACK_EXTERNAL_MODULE_16__, __WEBPACK_EXTERNAL_MODULE_97__) {
/******/
return function(modules) {
/******/
/******/
// The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/
// Check if module is in cache
/******/
if (installedModules[moduleId]) /******/
return installedModules[moduleId].exports;
/******/
// Create a new module (and put it into the cache)
/******/
var module = installedModules[moduleId] = {
/******/
i: moduleId,
/******/
l: !1,
/******/
exports: {}
};
/******/
/******/
// Return the exports of the module
/******/
/******/
/******/
// Execute the module function
/******/
/******/
/******/
// Flag the module as loaded
/******/
return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
module.l = !0, module.exports;
}
// webpackBootstrap
/******/
// The module cache
/******/
var installedModules = {};
/******/
/******/
// Load entry module and return exports
/******/
/******/
/******/
/******/
// expose the modules object (__webpack_modules__)
/******/
/******/
/******/
// expose the module cache
/******/
/******/
/******/
// define getter function for harmony exports
/******/
/******/
/******/
// getDefaultExport function for compatibility with non-harmony modules
/******/
/******/
/******/
// Object.prototype.hasOwnProperty.call
/******/
/******/
/******/
// __webpack_public_path__
/******/
return __webpack_require__.m = modules, __webpack_require__.c = installedModules,
__webpack_require__.d = function(exports, name, getter) {
/******/
__webpack_require__.o(exports, name) || /******/
Object.defineProperty(exports, name, {
/******/
configurable: !1,
/******/
enumerable: !0,
/******/
get: getter
});
}, __webpack_require__.n = function(module) {
/******/
var getter = module && module.__esModule ? /******/
function() {
return module.default;
} : /******/
function() {
return module;
};
/******/
/******/
return __webpack_require__.d(getter, "a", getter), getter;
}, __webpack_require__.o = function(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
}, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 50);
}([ /* 0 */
/***/
function(module, exports) {
var core = module.exports = {
version: "2.5.3"
};
"number" == typeof __e && (__e = core);
}, /* 1 */
/***/
function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
"number" == typeof __g && (__g = global);
}, /* 2 */
/***/
function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key) {
return hasOwnProperty.call(it, key);
};
}, /* 3 */
/***/
function(module, exports, __webpack_require__) {
var global = __webpack_require__(1), core = __webpack_require__(0), ctx = __webpack_require__(38), hide = __webpack_require__(6), $export = function(type, name, source) {
var key, own, out, IS_FORCED = type & $export.F, IS_GLOBAL = type & $export.G, IS_STATIC = type & $export.S, IS_PROTO = type & $export.P, IS_BIND = type & $export.B, IS_WRAP = type & $export.W, exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), expProto = exports.prototype, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {}).prototype;
IS_GLOBAL && (source = name);
for (key in source) // contains in native
(own = !IS_FORCED && target && void 0 !== target[key]) && key in exports || (// export native or passed
out = own ? target[key] : source[key], // prevent global pollution for namespaces
exports[key] = IS_GLOBAL && "function" != typeof target[key] ? source[key] : IS_BIND && own ? ctx(out, global) : IS_WRAP && target[key] == out ? function(C) {
var F = function(a, b, c) {
if (this instanceof C) {
switch (arguments.length) {
case 0:
return new C();
case 1:
return new C(a);
case 2:
return new C(a, b);
}
return new C(a, b, c);
}
return C.apply(this, arguments);
};
return F.prototype = C.prototype, F;
}(out) : IS_PROTO && "function" == typeof out ? ctx(Function.call, out) : out, // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
IS_PROTO && ((exports.virtual || (exports.virtual = {}))[key] = out, // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
type & $export.R && expProto && !expProto[key] && hide(expProto, key, out)));
};
// type bitmap
$export.F = 1, // forced
$export.G = 2, // global
$export.S = 4, // static
$export.P = 8, // proto
$export.B = 16, // bind
$export.W = 32, // wrap
$export.U = 64, // safe
$export.R = 128, // real proto method for `library`
module.exports = $export;
}, /* 4 */
/***/
function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(11), IE8_DOM_DEFINE = __webpack_require__(39), toPrimitive = __webpack_require__(22), dP = Object.defineProperty;
exports.f = __webpack_require__(5) ? Object.defineProperty : function(O, P, Attributes) {
if (anObject(O), P = toPrimitive(P, !0), anObject(Attributes), IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) {}
if ("get" in Attributes || "set" in Attributes) throw TypeError("Accessors not supported!");
return "value" in Attributes && (O[P] = Attributes.value), O;
};
}, /* 5 */
/***/
function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(8)(function() {
return 7 != Object.defineProperty({}, "a", {
get: function() {
return 7;
}
}).a;
});
}, /* 6 */
/***/
function(module, exports, __webpack_require__) {
var dP = __webpack_require__(4), createDesc = __webpack_require__(13);
module.exports = __webpack_require__(5) ? function(object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function(object, key, value) {
return object[key] = value, object;
};
}, /* 7 */
/***/
function(module, exports) {
module.exports = function(it) {
return "object" == typeof it ? null !== it : "function" == typeof it;
};
}, /* 8 */
/***/
function(module, exports) {
module.exports = function(exec) {
try {
return !!exec();
} catch (e) {
return !0;
}
};
}, /* 9 */
/***/
function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(45), defined = __webpack_require__(19);
module.exports = function(it) {
return IObject(defined(it));
};
}, /* 10 */
/***/
function(module, exports, __webpack_require__) {
var store = __webpack_require__(21)("wks"), uid = __webpack_require__(12), Symbol = __webpack_require__(1).Symbol, USE_SYMBOL = "function" == typeof Symbol;
(module.exports = function(name) {
return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)("Symbol." + name));
}).store = store;
}, /* 11 */
/***/
function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(7);
module.exports = function(it) {
if (!isObject(it)) throw TypeError(it + " is not an object!");
return it;
};
}, /* 12 */
/***/
function(module, exports) {
var id = 0, px = Math.random();
module.exports = function(key) {
return "Symbol(".concat(void 0 === key ? "" : key, ")_", (++id + px).toString(36));
};
}, /* 13 */
/***/
function(module, exports) {
module.exports = function(bitmap, value) {
return {
enumerable: !(1 & bitmap),
configurable: !(2 & bitmap),
writable: !(4 & bitmap),
value: value
};
};
}, /* 14 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(44), enumBugKeys = __webpack_require__(30);
module.exports = Object.keys || function(O) {
return $keys(O, enumBugKeys);
};
}, /* 15 */
/***/
function(module, exports) {
exports.f = {}.propertyIsEnumerable;
}, /* 16 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_16__;
}, /* 17 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(52),
__esModule: !0
};
}, /* 18 */
/***/
function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(19);
module.exports = function(it) {
return Object(defined(it));
};
}, /* 19 */
/***/
function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function(it) {
if (void 0 == it) throw TypeError("Can't call method on " + it);
return it;
};
}, /* 20 */
/***/
function(module, exports, __webpack_require__) {
var shared = __webpack_require__(21)("keys"), uid = __webpack_require__(12);
module.exports = function(key) {
return shared[key] || (shared[key] = uid(key));
};
}, /* 21 */
/***/
function(module, exports, __webpack_require__) {
var global = __webpack_require__(1), store = global["__core-js_shared__"] || (global["__core-js_shared__"] = {});
module.exports = function(key) {
return store[key] || (store[key] = {});
};
}, /* 22 */
/***/
function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(7);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S) {
if (!isObject(it)) return it;
var fn, val;
if (S && "function" == typeof (fn = it.toString) && !isObject(val = fn.call(it))) return val;
if ("function" == typeof (fn = it.valueOf) && !isObject(val = fn.call(it))) return val;
if (!S && "function" == typeof (fn = it.toString) && !isObject(val = fn.call(it))) return val;
throw TypeError("Can't convert object to primitive value");
};
}, /* 23 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0, exports.default = function(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
};
}, /* 24 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _defineProperty = __webpack_require__(56), _defineProperty2 = function(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}(_defineProperty);
exports.default = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), (0, _defineProperty2.default)(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}();
}, /* 25 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _typeof2 = __webpack_require__(41), _typeof3 = function(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}(_typeof2);
exports.default = function(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" !== (void 0 === call ? "undefined" : (0, _typeof3.default)(call)) && "function" != typeof call ? self : call;
};
}, /* 26 */
/***/
function(module, exports) {
// 7.1.4 ToInteger
var ceil = Math.ceil, floor = Math.floor;
module.exports = function(it) {
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
}, /* 27 */
/***/
function(module, exports) {
module.exports = !0;
}, /* 28 */
/***/
function(module, exports) {
module.exports = {};
}, /* 29 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(11), dPs = __webpack_require__(64), enumBugKeys = __webpack_require__(30), IE_PROTO = __webpack_require__(20)("IE_PROTO"), Empty = function() {}, createDict = function() {
// Thrash, waste and sodomy: IE GC bug
var iframeDocument, iframe = __webpack_require__(40)("iframe"), i = enumBugKeys.length;
for (iframe.style.display = "none", __webpack_require__(68).appendChild(iframe),
iframe.src = "javascript:", // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
iframeDocument = iframe.contentWindow.document, iframeDocument.open(), iframeDocument.write("<script>document.F=Object<\/script>"),
iframeDocument.close(), createDict = iframeDocument.F; i--; ) delete createDict.prototype[enumBugKeys[i]];
return createDict();
};
module.exports = Object.create || function(O, Properties) {
var result;
// add "__proto__" for Object.getPrototypeOf polyfill
return null !== O ? (Empty.prototype = anObject(O), result = new Empty(), Empty.prototype = null,
result[IE_PROTO] = O) : result = createDict(), void 0 === Properties ? result : dPs(result, Properties);
};
}, /* 30 */
/***/
function(module, exports) {
// IE 8- don't enum bug keys
module.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
}, /* 31 */
/***/
function(module, exports, __webpack_require__) {
var def = __webpack_require__(4).f, has = __webpack_require__(2), TAG = __webpack_require__(10)("toStringTag");
module.exports = function(it, tag, stat) {
it && !has(it = stat ? it : it.prototype, TAG) && def(it, TAG, {
configurable: !0,
value: tag
});
};
}, /* 32 */
/***/
function(module, exports, __webpack_require__) {
exports.f = __webpack_require__(10);
}, /* 33 */
/***/
function(module, exports, __webpack_require__) {
var global = __webpack_require__(1), core = __webpack_require__(0), LIBRARY = __webpack_require__(27), wksExt = __webpack_require__(32), defineProperty = __webpack_require__(4).f;
module.exports = function(name) {
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
"_" == name.charAt(0) || name in $Symbol || defineProperty($Symbol, name, {
value: wksExt.f(name)
});
};
}, /* 34 */
/***/
function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
}, /* 35 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.__esModule = !0;
var _setPrototypeOf = __webpack_require__(83), _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf), _create = __webpack_require__(87), _create2 = _interopRequireDefault(_create), _typeof2 = __webpack_require__(41), _typeof3 = _interopRequireDefault(_typeof2);
exports.default = function(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === superClass ? "undefined" : (0,
_typeof3.default)(superClass)));
subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (_setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass);
};
}, /* 36 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0, exports.default = function(obj, keys) {
var target = {};
for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
return target;
};
}, /* 37 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(2), toObject = __webpack_require__(18), IE_PROTO = __webpack_require__(20)("IE_PROTO"), ObjectProto = Object.prototype;
module.exports = Object.getPrototypeOf || function(O) {
return O = toObject(O), has(O, IE_PROTO) ? O[IE_PROTO] : "function" == typeof O.constructor && O instanceof O.constructor ? O.constructor.prototype : O instanceof Object ? ObjectProto : null;
};
}, /* 38 */
/***/
function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(55);
module.exports = function(fn, that, length) {
if (aFunction(fn), void 0 === that) return fn;
switch (length) {
case 1:
return function(a) {
return fn.call(that, a);
};
case 2:
return function(a, b) {
return fn.call(that, a, b);
};
case 3:
return function(a, b, c) {
return fn.call(that, a, b, c);
};
}
return function() {
return fn.apply(that, arguments);
};
};
}, /* 39 */
/***/
function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(5) && !__webpack_require__(8)(function() {
return 7 != Object.defineProperty(__webpack_require__(40)("div"), "a", {
get: function() {
return 7;
}
}).a;
});
}, /* 40 */
/***/
function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(7), document = __webpack_require__(1).document, is = isObject(document) && isObject(document.createElement);
module.exports = function(it) {
return is ? document.createElement(it) : {};
};
}, /* 41 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.__esModule = !0;
var _iterator = __webpack_require__(59), _iterator2 = _interopRequireDefault(_iterator), _symbol = __webpack_require__(73), _symbol2 = _interopRequireDefault(_symbol), _typeof = "function" == typeof _symbol2.default && "symbol" == typeof _iterator2.default ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" == typeof _symbol2.default && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj;
};
exports.default = "function" == typeof _symbol2.default && "symbol" === _typeof(_iterator2.default) ? function(obj) {
return void 0 === obj ? "undefined" : _typeof(obj);
} : function(obj) {
return obj && "function" == typeof _symbol2.default && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : void 0 === obj ? "undefined" : _typeof(obj);
};
}, /* 42 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(27), $export = __webpack_require__(3), redefine = __webpack_require__(43), hide = __webpack_require__(6), has = __webpack_require__(2), Iterators = __webpack_require__(28), $iterCreate = __webpack_require__(63), setToStringTag = __webpack_require__(31), getPrototypeOf = __webpack_require__(37), ITERATOR = __webpack_require__(10)("iterator"), BUGGY = !([].keys && "next" in [].keys()), returnThis = function() {
return this;
};
module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
$iterCreate(Constructor, NAME, next);
var methods, key, IteratorPrototype, getMethod = function(kind) {
if (!BUGGY && kind in proto) return proto[kind];
switch (kind) {
case "keys":
case "values":
return function() {
return new Constructor(this, kind);
};
}
return function() {
return new Constructor(this, kind);
};
}, TAG = NAME + " Iterator", DEF_VALUES = "values" == DEFAULT, VALUES_BUG = !1, proto = Base.prototype, $native = proto[ITERATOR] || proto["@@iterator"] || DEFAULT && proto[DEFAULT], $default = !BUGGY && $native || getMethod(DEFAULT), $entries = DEFAULT ? DEF_VALUES ? getMethod("entries") : $default : void 0, $anyNative = "Array" == NAME ? proto.entries || $native : $native;
if (// Fix native
$anyNative && (IteratorPrototype = getPrototypeOf($anyNative.call(new Base()))) !== Object.prototype && IteratorPrototype.next && (// Set @@toStringTag to native iterators
setToStringTag(IteratorPrototype, TAG, !0), // fix for some old engines
LIBRARY || has(IteratorPrototype, ITERATOR) || hide(IteratorPrototype, ITERATOR, returnThis)),
// fix Array#{values, @@iterator}.name in V8 / FF
DEF_VALUES && $native && "values" !== $native.name && (VALUES_BUG = !0, $default = function() {
return $native.call(this);
}), // Define iterator
LIBRARY && !FORCED || !BUGGY && !VALUES_BUG && proto[ITERATOR] || hide(proto, ITERATOR, $default),
// Plug for library
Iterators[NAME] = $default, Iterators[TAG] = returnThis, DEFAULT) if (methods = {
values: DEF_VALUES ? $default : getMethod("values"),
keys: IS_SET ? $default : getMethod("keys"),
entries: $entries
}, FORCED) for (key in methods) key in proto || redefine(proto, key, methods[key]); else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
return methods;
};
}, /* 43 */
/***/
function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(6);
}, /* 44 */
/***/
function(module, exports, __webpack_require__) {
var has = __webpack_require__(2), toIObject = __webpack_require__(9), arrayIndexOf = __webpack_require__(65)(!1), IE_PROTO = __webpack_require__(20)("IE_PROTO");
module.exports = function(object, names) {
var key, O = toIObject(object), i = 0, result = [];
for (key in O) key != IE_PROTO && has(O, key) && result.push(key);
// Don't enum bug & hidden keys
for (;names.length > i; ) has(O, key = names[i++]) && (~arrayIndexOf(result, key) || result.push(key));
return result;
};
}, /* 45 */
/***/
function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(46);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
return "String" == cof(it) ? it.split("") : Object(it);
};
}, /* 46 */
/***/
function(module, exports) {
var toString = {}.toString;
module.exports = function(it) {
return toString.call(it).slice(8, -1);
};
}, /* 47 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(44), hiddenKeys = __webpack_require__(30).concat("length", "prototype");
exports.f = Object.getOwnPropertyNames || function(O) {
return $keys(O, hiddenKeys);
};
}, /* 48 */
/***/
function(module, exports, __webpack_require__) {
var pIE = __webpack_require__(15), createDesc = __webpack_require__(13), toIObject = __webpack_require__(9), toPrimitive = __webpack_require__(22), has = __webpack_require__(2), IE8_DOM_DEFINE = __webpack_require__(39), gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__(5) ? gOPD : function(O, P) {
if (O = toIObject(O), P = toPrimitive(P, !0), IE8_DOM_DEFINE) try {
return gOPD(O, P);
} catch (e) {}
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};
}, /* 49 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _assign = __webpack_require__(91), _assign2 = function(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}(_assign);
exports.default = _assign2.default || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
};
}, /* 50 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */
(function(process) {
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function curry(fn) {
function _curry() {
var args = [].concat(_args);
if (arguments.length >= _len ? _args = [] : arguments.length + _args.length > _len && (_args = []),
_args = _args.concat([].slice.call(arguments)), _args.length === _len) {
var rst = fn.apply(null, _args);
return _args = args, rst;
}
return _curry;
}
if ("function" != typeof fn) throw Error("curry only receive function params!");
var _len = fn.length, _args = [];
return _curry.toString = function() {
return fn.toString();
}, _curry;
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _objectWithoutProperties2 = __webpack_require__(36), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _getPrototypeOf = __webpack_require__(17), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(23), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(24), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(25), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(35), _inherits3 = _interopRequireDefault(_inherits2), _react = __webpack_require__(16), _react2 = _interopRequireDefault(_react), __ErrorBoundary = void 0;
if ("development" === process.env.NODE_ENV || "development" === process.env.ERROR_ENV) {
var _require = __webpack_require__(90), ErrorBoundary = _require.ErrorBoundary, FallbackView = _require.FallbackView, withErrorHandler = curry(function(FallbackComponent, Component) {
var WithErrorHandler = function(props) {
var onError = props.onError;
return _react2.default.createElement(ErrorBoundary, {
FallbackComponent: FallbackComponent,
onError: onError
}, _react2.default.createElement(Component, props));
};
return WithErrorHandler.displayName = "WithErrorHandler(" + (Component.displayName || Component.name || "Component") + ")",
WithErrorHandler;
});
__ErrorBoundary = ErrorBoundary, exports.ErrorBoundary = ErrorBoundary, exports.FallbackView = FallbackView,
exports.withErrorHandler = withErrorHandler, exports.errorHandlerDecorator = withErrorHandler(FallbackView);
} else {
var _ErrorBoundary = function(_React$Component) {
function _ErrorBoundary() {
return (0, _classCallCheck3.default)(this, _ErrorBoundary), (0, _possibleConstructorReturn3.default)(this, (_ErrorBoundary.__proto__ || (0,
_getPrototypeOf2.default)(_ErrorBoundary)).apply(this, arguments));
}
return (0, _inherits3.default)(_ErrorBoundary, _React$Component), (0, _createClass3.default)(_ErrorBoundary, [ {
key: "componentDidCatch",
value: function(error, info) {
var _props2 = this.props, onError = _props2.onError, _props = (0, _objectWithoutProperties3.default)(_props2, [ "onError" ]);
if ("function" == typeof onError) try {
onError.call(this, error, info, _props);
} catch (e) {}
}
}, {
key: "render",
value: function() {
return this.props.children;
}
} ]), _ErrorBoundary;
}(_react2.default.Component), _withErrorHandler = curry(function(FallbackComponent, Component) {
return function(props) {
var onError = props.onError;
return _react2.default.createElement(_ErrorBoundary, {
FallbackComponent: FallbackComponent,
onError: onError
}, _react2.default.createElement(Component, props));
};
});
__ErrorBoundary = _ErrorBoundary, exports.ErrorBoundary = _ErrorBoundary, exports.withErrorHandler = _withErrorHandler,
exports.errorHandlerDecorator = _withErrorHandler(void 0);
}
exports.default = __ErrorBoundary;
}).call(exports, __webpack_require__(51));
}, /* 51 */
/***/
function(module, exports) {
function defaultSetTimout() {
throw new Error("setTimeout has not been defined");
}
function defaultClearTimeout() {
throw new Error("clearTimeout has not been defined");
}
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) //normal enviroments in sane situations
return setTimeout(fun, 0);
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) return cachedSetTimeout = setTimeout,
setTimeout(fun, 0);
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch (e) {
// 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
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) //normal enviroments in sane situations
return clearTimeout(marker);
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) return cachedClearTimeout = clearTimeout,
clearTimeout(marker);
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e) {
// 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.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
function cleanUpNextTick() {
draining && currentQueue && (draining = !1, currentQueue.length ? queue = currentQueue.concat(queue) : queueIndex = -1,
queue.length && drainQueue());
}
function drainQueue() {
if (!draining) {
var timeout = runTimeout(cleanUpNextTick);
draining = !0;
for (var len = queue.length; len; ) {
for (currentQueue = queue, queue = []; ++queueIndex < len; ) currentQueue && currentQueue[queueIndex].run();
queueIndex = -1, len = queue.length;
}
currentQueue = null, draining = !1, runClearTimeout(timeout);
}
}
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun, this.array = array;
}
function noop() {}
// shim for using process in browser
var cachedSetTimeout, cachedClearTimeout, process = module.exports = {};
!function() {
try {
cachedSetTimeout = "function" == typeof setTimeout ? setTimeout : defaultSetTimout;
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
cachedClearTimeout = "function" == typeof clearTimeout ? clearTimeout : defaultClearTimeout;
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
}();
var currentQueue, queue = [], draining = !1, queueIndex = -1;
process.nextTick = function(fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) args[i - 1] = arguments[i];
queue.push(new Item(fun, args)), 1 !== queue.length || draining || runTimeout(drainQueue);
}, Item.prototype.run = function() {
this.fun.apply(null, this.array);
}, process.title = "browser", process.browser = !0, process.env = {}, process.argv = [],
process.version = "", // empty string to avoid regexp issues
process.versions = {}, process.on = noop, process.addListener = noop, process.once = noop,
process.off = noop, process.removeListener = noop, process.removeAllListeners = noop,
process.emit = noop, process.prependListener = noop, process.prependOnceListener = noop,
process.listeners = function(name) {
return [];
}, process.binding = function(name) {
throw new Error("process.binding is not supported");
}, process.cwd = function() {
return "/";
}, process.chdir = function(dir) {
throw new Error("process.chdir is not supported");
}, process.umask = function() {
return 0;
};
}, /* 52 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(53), module.exports = __webpack_require__(0).Object.getPrototypeOf;
}, /* 53 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = __webpack_require__(18), $getPrototypeOf = __webpack_require__(37);
__webpack_require__(54)("getPrototypeOf", function() {
return function(it) {
return $getPrototypeOf(toObject(it));
};
});
}, /* 54 */
/***/
function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(3), core = __webpack_require__(0), fails = __webpack_require__(8);
module.exports = function(KEY, exec) {
var fn = (core.Object || {})[KEY] || Object[KEY], exp = {};
exp[KEY] = exec(fn), $export($export.S + $export.F * fails(function() {
fn(1);
}), "Object", exp);
};
}, /* 55 */
/***/
function(module, exports) {
module.exports = function(it) {
if ("function" != typeof it) throw TypeError(it + " is not a function!");
return it;
};
}, /* 56 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(57),
__esModule: !0
};
}, /* 57 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(58);
var $Object = __webpack_require__(0).Object;
module.exports = function(it, key, desc) {
return $Object.defineProperty(it, key, desc);
};
}, /* 58 */
/***/
function(module, exports, __webpack_require__) {
var $export = __webpack_require__(3);
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(5), "Object", {
defineProperty: __webpack_require__(4).f
});
}, /* 59 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(60),
__esModule: !0
};
}, /* 60 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(61), __webpack_require__(69), module.exports = __webpack_require__(32).f("iterator");
}, /* 61 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
var $at = __webpack_require__(62)(!0);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(42)(String, "String", function(iterated) {
this._t = String(iterated), // target
this._i = 0;
}, function() {
var point, O = this._t, index = this._i;
return index >= O.length ? {
value: void 0,
done: !0
} : (point = $at(O, index), this._i += point.length, {
value: point,
done: !1
});
});
}, /* 62 */
/***/
function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(26), defined = __webpack_require__(19);
// true -> String#at
// false -> String#codePointAt
module.exports = function(TO_STRING) {
return function(that, pos) {
var a, b, s = String(defined(that)), i = toInteger(pos), l = s.length;
return i < 0 || i >= l ? TO_STRING ? "" : void 0 : (a = s.charCodeAt(i), a < 55296 || a > 56319 || i + 1 === l || (b = s.charCodeAt(i + 1)) < 56320 || b > 57343 ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : b - 56320 + (a - 55296 << 10) + 65536);
};
};
}, /* 63 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__(29), descriptor = __webpack_require__(13), setToStringTag = __webpack_require__(31), IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(6)(IteratorPrototype, __webpack_require__(10)("iterator"), function() {
return this;
}), module.exports = function(Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, {
next: descriptor(1, next)
}), setToStringTag(Constructor, NAME + " Iterator");
};
}, /* 64 */
/***/
function(module, exports, __webpack_require__) {
var dP = __webpack_require__(4), anObject = __webpack_require__(11), getKeys = __webpack_require__(14);
module.exports = __webpack_require__(5) ? Object.defineProperties : function(O, Properties) {
anObject(O);
for (var P, keys = getKeys(Properties), length = keys.length, i = 0; length > i; ) dP.f(O, P = keys[i++], Properties[P]);
return O;
};
}, /* 65 */
/***/
function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(9), toLength = __webpack_require__(66), toAbsoluteIndex = __webpack_require__(67);
module.exports = function(IS_INCLUDES) {
return function($this, el, fromIndex) {
var value, O = toIObject($this), length = toLength(O.length), index = toAbsoluteIndex(fromIndex, length);
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) {
for (;length > index; ) // eslint-disable-next-line no-self-compare
if ((value = O[index++]) != value) return !0;
} else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
return !IS_INCLUDES && -1;
};
};
}, /* 66 */
/***/
function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(26), min = Math.min;
module.exports = function(it) {
return it > 0 ? min(toInteger(it), 9007199254740991) : 0;
};
}, /* 67 */
/***/
function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(26), max = Math.max, min = Math.min;
module.exports = function(index, length) {
return index = toInteger(index), index < 0 ? max(index + length, 0) : min(index, length);
};
}, /* 68 */
/***/
function(module, exports, __webpack_require__) {
var document = __webpack_require__(1).document;
module.exports = document && document.documentElement;
}, /* 69 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(70);
for (var global = __webpack_require__(1), hide = __webpack_require__(6), Iterators = __webpack_require__(28), TO_STRING_TAG = __webpack_require__(10)("toStringTag"), DOMIterables = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","), i = 0; i < DOMIterables.length; i++) {
var NAME = DOMIterables[i], Collection = global[NAME], proto = Collection && Collection.prototype;
proto && !proto[TO_STRING_TAG] && hide(proto, TO_STRING_TAG, NAME), Iterators[NAME] = Iterators.Array;
}
}, /* 70 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__(71), step = __webpack_require__(72), Iterators = __webpack_require__(28), toIObject = __webpack_require__(9);
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(42)(Array, "Array", function(iterated, kind) {
this._t = toIObject(iterated), // target
this._i = 0, // next index
this._k = kind;
}, function() {
var O = this._t, kind = this._k, index = this._i++;
return !O || index >= O.length ? (this._t = void 0, step(1)) : "keys" == kind ? step(0, index) : "values" == kind ? step(0, O[index]) : step(0, [ index, O[index] ]);
}, "values"), // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array, addToUnscopables("keys"), addToUnscopables("values"),
addToUnscopables("entries");
}, /* 71 */
/***/
function(module, exports) {
module.exports = function() {};
}, /* 72 */
/***/
function(module, exports) {
module.exports = function(done, value) {
return {
value: value,
done: !!done
};
};
}, /* 73 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(74),
__esModule: !0
};
}, /* 74 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(75), __webpack_require__(80), __webpack_require__(81), __webpack_r