Skip to content

Instantly share code, notes, and snippets.

@sebmarkbage
Created August 9, 2016 23:15
Show Gist options
  • Save sebmarkbage/ba707b72360dee263d0d6399009d1422 to your computer and use it in GitHub Desktop.
Save sebmarkbage/ba707b72360dee263d0d6399009d1422 to your computer and use it in GitHub Desktop.
React Isomorphic Package
/**
* React v16.0.0-alpha
*
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
(function(f) {
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = f()
} else if (typeof define === "function" && define.amd) {
define([], f)
} else {
var g;
if (typeof window !== "undefined") {
g = window
} else if (typeof global !== "undefined") {
g = global
} else if (typeof self !== "undefined") {
g = self
} else {
g = this
}
g.React = f()
}
})(function() {
var define, module, exports;
return (function e(t, n, r) {
function s(o, u) {
if (!n[o]) {
if (!t[o]) {
var a = typeof require == "function" && require;
if (!u && a) return a(o, !0);
if (i) return i(o, !0);
var f = new Error("Cannot find module '" + o + "'");
throw f.code = "MODULE_NOT_FOUND", f
}
var l = n[o] = {
exports: {}
};
t[o][0].call(l.exports, function(e) {
var n = t[o][1][e];
return s(n ? n : e)
}, l, l.exports, e, t, n, r)
}
return n[o].exports
}
var i = typeof require == "function" && require;
for (var o = 0; o < r.length; o++) s(r[o]);
return s
})({
1: [function(require, module, exports) {
"use strict";
function escape(e) {
var n = /[=:]/g,
r = {
"=": "=0",
":": "=2"
},
s = ("" + e).replace(n, function(e) {
return r[e]
});
return "$" + s
}
function unescape(e) {
var n = /(=0|=2)/g,
r = {
"=0": "=",
"=2": ":"
},
s = "." === e[0] && "$" === e[1] ? e.substring(2) : e.substring(1);
return ("" + s).replace(n, function(e) {
return r[e]
})
}
var KeyEscapeUtils = {
escape: escape,
unescape: unescape
};
module.exports = KeyEscapeUtils;
}, {}],
2: [function(require, module, exports) {
"use strict";
var _prodInvariant = require(22),
invariant = require(26),
oneArgumentPooler = function(o) {
var e = this;
if (e.instancePool.length) {
var n = e.instancePool.pop();
return e.call(n, o), n
}
return new e(o)
},
twoArgumentPooler = function(o, e) {
var n = this;
if (n.instancePool.length) {
var r = n.instancePool.pop();
return n.call(r, o, e), r
}
return new n(o, e)
},
threeArgumentPooler = function(o, e, n) {
var r = this;
if (r.instancePool.length) {
var t = r.instancePool.pop();
return r.call(t, o, e, n), t
}
return new r(o, e, n)
},
fourArgumentPooler = function(o, e, n, r) {
var t = this;
if (t.instancePool.length) {
var l = t.instancePool.pop();
return t.call(l, o, e, n, r), l
}
return new t(o, e, n, r)
},
fiveArgumentPooler = function(o, e, n, r, t) {
var l = this;
if (l.instancePool.length) {
var a = l.instancePool.pop();
return l.call(a, o, e, n, r, t), a
}
return new l(o, e, n, r, t)
},
standardReleaser = function(o) {
var e = this;
o instanceof e ? void 0 : _prodInvariant("25"), o.destructor(), e.instancePool.length < e.poolSize && e.instancePool.push(o)
},
DEFAULT_POOL_SIZE = 10,
DEFAULT_POOLER = oneArgumentPooler,
addPoolingTo = function(o, e) {
var n = o;
return n.instancePool = [], n.getPooled = e || DEFAULT_POOLER, n.poolSize || (n.poolSize = DEFAULT_POOL_SIZE), n.release = standardReleaser, n
},
PooledClass = {
addPoolingTo: addPoolingTo,
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fourArgumentPooler: fourArgumentPooler,
fiveArgumentPooler: fiveArgumentPooler
};
module.exports = PooledClass;
}, {
"22": 22,
"26": 26
}],
3: [function(require, module, exports) {
"use strict";
var _assign = require(31),
ReactChildren = require(4),
ReactComponent = require(6),
ReactPureComponent = require(16),
ReactClass = require(5),
ReactDOMFactories = require(9),
ReactElement = require(10),
ReactPropTypes = require(14),
ReactVersion = require(18),
onlyChild = require(21),
warning = require(30),
createElement = ReactElement.createElement,
createFactory = ReactElement.createFactory,
cloneElement = ReactElement.cloneElement,
ReactElementValidator, __spread = _assign,
warned, React = {
Children: {
map: ReactChildren.map,
forEach: ReactChildren.forEach,
count: ReactChildren.count,
toArray: ReactChildren.toArray,
only: onlyChild
},
Component: ReactComponent,
PureComponent: ReactPureComponent,
createElement: createElement,
cloneElement: cloneElement,
isValidElement: ReactElement.isValidElement,
PropTypes: ReactPropTypes,
createClass: ReactClass.createClass,
createFactory: createFactory,
createMixin: function(e) {
return e
},
DOM: ReactDOMFactories,
version: ReactVersion,
__spread: __spread
};
module.exports = React;
}, {
"10": 10,
"14": 14,
"16": 16,
"18": 18,
"21": 21,
"30": 30,
"31": 31,
"4": 4,
"5": 5,
"6": 6,
"9": 9
}],
4: [function(require, module, exports) {
"use strict";
function escapeUserProvidedKey(e) {
return ("" + e).replace(userProvidedKeyEscapeRegex, "$&/")
}
function ForEachBookKeeping(e, n) {
this.func = e, this.context = n, this.count = 0
}
function forEachSingleChild(e, n, t) {
var r = e.func,
o = e.context;
r.call(o, n, e.count++)
}
function forEachChildren(e, n, t) {
if (null == e) return e;
var r = ForEachBookKeeping.getPooled(n, t);
traverseAllChildren(e, forEachSingleChild, r), ForEachBookKeeping.release(r)
}
function MapBookKeeping(e, n, t, r) {
this.result = e, this.keyPrefix = n, this.func = t, this.context = r, this.count = 0
}
function mapSingleChildIntoContext(e, n, t) {
var r = e.result,
o = e.keyPrefix,
l = e.func,
i = e.context,
u = l.call(i, n, e.count++);
Array.isArray(u) ? mapIntoWithKeyPrefixInternal(u, r, t, emptyFunction.thatReturnsArgument) : null != u && (ReactElement.isValidElement(u) && (u = ReactElement.cloneAndReplaceKey(u, o + (!u.key || n && n.key === u.key ? "" : escapeUserProvidedKey(u.key) + "/") + t)), r.push(u))
}
function mapIntoWithKeyPrefixInternal(e, n, t, r, o) {
var l = "";
null != t && (l = escapeUserProvidedKey(t) + "/");
var i = MapBookKeeping.getPooled(n, l, r, o);
traverseAllChildren(e, mapSingleChildIntoContext, i), MapBookKeeping.release(i)
}
function mapChildren(e, n, t) {
if (null == e) return e;
var r = [];
return mapIntoWithKeyPrefixInternal(e, r, null, n, t), r
}
function forEachSingleChildDummy(e, n, t) {
return null
}
function countChildren(e, n) {
return traverseAllChildren(e, forEachSingleChildDummy, null)
}
function toArray(e) {
var n = [];
return mapIntoWithKeyPrefixInternal(e, n, null, emptyFunction.thatReturnsArgument), n
}
var PooledClass = require(2),
ReactElement = require(10),
emptyFunction = require(24),
traverseAllChildren = require(23),
twoArgumentPooler = PooledClass.twoArgumentPooler,
fourArgumentPooler = PooledClass.fourArgumentPooler,
userProvidedKeyEscapeRegex = /\/+/g;
ForEachBookKeeping.prototype.destructor = function() {
this.func = null, this.context = null, this.count = 0
}, PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler), MapBookKeeping.prototype.destructor = function() {
this.result = null, this.keyPrefix = null, this.func = null, this.context = null, this.count = 0
}, PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
var ReactChildren = {
forEach: forEachChildren,
map: mapChildren,
mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
count: countChildren,
toArray: toArray
};
module.exports = ReactChildren;
}, {
"10": 10,
"2": 2,
"23": 23,
"24": 24
}],
5: [function(require, module, exports) {
"use strict";
function validateTypeDef(e, t, n) {
for (var o in t) t.hasOwnProperty(o)
}
function validateMethodOverride(e, t) {
var n = ReactClassInterface.hasOwnProperty(t) ? ReactClassInterface[t] : null;
ReactClassMixin.hasOwnProperty(t) && (n !== SpecPolicy.OVERRIDE_BASE ? _prodInvariant("73", t) : void 0), e && (n !== SpecPolicy.DEFINE_MANY && n !== SpecPolicy.DEFINE_MANY_MERGED ? _prodInvariant("74", t) : void 0)
}
function mixSpecIntoComponent(e, t) {
if (t) {
"function" == typeof t ? _prodInvariant("75") : void 0, ReactElement.isValidElement(t) ? _prodInvariant("76") : void 0;
var n = e.prototype,
o = n.__reactAutoBindPairs;
t.hasOwnProperty(MIXINS_KEY) && RESERVED_SPEC_KEYS.mixins(e, t.mixins);
for (var i in t)
if (t.hasOwnProperty(i) && i !== MIXINS_KEY) {
var r = t[i],
a = n.hasOwnProperty(i);
if (validateMethodOverride(a, i), RESERVED_SPEC_KEYS.hasOwnProperty(i)) RESERVED_SPEC_KEYS[i](e, r);
else {
var p = ReactClassInterface.hasOwnProperty(i),
c = "function" == typeof r,
s = c && !p && !a && t.autobind !== !1;
if (s) o.push(i, r), n[i] = r;
else if (a) {
var l = ReactClassInterface[i];
!p || l !== SpecPolicy.DEFINE_MANY_MERGED && l !== SpecPolicy.DEFINE_MANY ? _prodInvariant("77", l, i) : void 0, l === SpecPolicy.DEFINE_MANY_MERGED ? n[i] = createMergedResultFunction(n[i], r) : l === SpecPolicy.DEFINE_MANY && (n[i] = createChainedFunction(n[i], r))
} else n[i] = r
}
}
} else;
}
function mixStaticSpecIntoComponent(e, t) {
if (t)
for (var n in t) {
var o = t[n];
if (t.hasOwnProperty(n)) {
var i = n in RESERVED_SPEC_KEYS;
i ? _prodInvariant("78", n) : void 0;
var r = n in e;
r ? _prodInvariant("79", n) : void 0, e[n] = o
}
}
}
function mergeIntoWithNoDuplicateKeys(e, t) {
e && t && "object" == typeof e && "object" == typeof t ? void 0 : _prodInvariant("80");
for (var n in t) t.hasOwnProperty(n) && (void 0 !== e[n] ? _prodInvariant("81", n) : void 0, e[n] = t[n]);
return e
}
function createMergedResultFunction(e, t) {
return function() {
var n = e.apply(this, arguments),
o = t.apply(this, arguments);
if (null == n) return o;
if (null == o) return n;
var i = {};
return mergeIntoWithNoDuplicateKeys(i, n), mergeIntoWithNoDuplicateKeys(i, o), i
}
}
function createChainedFunction(e, t) {
return function() {
e.apply(this, arguments), t.apply(this, arguments)
}
}
function bindAutoBindMethod(e, t) {
var n = t.bind(e);
return n
}
function bindAutoBindMethods(e) {
for (var t = e.__reactAutoBindPairs, n = 0; n < t.length; n += 2) {
var o = t[n],
i = t[n + 1];
e[o] = bindAutoBindMethod(e, i)
}
}
var _prodInvariant = require(22),
_assign = require(31),
ReactComponent = require(6),
ReactElement = require(10),
ReactPropTypeLocations = require(13),
ReactPropTypeLocationNames = require(12),
ReactNoopUpdateQueue = require(11),
emptyObject = require(25),
invariant = require(26),
keyMirror = require(27),
keyOf = require(28),
warning = require(30),
MIXINS_KEY = keyOf({
mixins: null
}),
SpecPolicy = keyMirror({
DEFINE_ONCE: null,
DEFINE_MANY: null,
OVERRIDE_BASE: null,
DEFINE_MANY_MERGED: null
}),
ReactClassInterface = {
mixins: SpecPolicy.DEFINE_MANY,
statics: SpecPolicy.DEFINE_MANY,
propTypes: SpecPolicy.DEFINE_MANY,
contextTypes: SpecPolicy.DEFINE_MANY,
childContextTypes: SpecPolicy.DEFINE_MANY,
getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,
getInitialState: SpecPolicy.DEFINE_MANY_MERGED,
getChildContext: SpecPolicy.DEFINE_MANY_MERGED,
render: SpecPolicy.DEFINE_ONCE,
componentWillMount: SpecPolicy.DEFINE_MANY,
componentDidMount: SpecPolicy.DEFINE_MANY,
componentWillReceiveProps: SpecPolicy.DEFINE_MANY,
shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,
componentWillUpdate: SpecPolicy.DEFINE_MANY,
componentDidUpdate: SpecPolicy.DEFINE_MANY,
componentWillUnmount: SpecPolicy.DEFINE_MANY,
updateComponent: SpecPolicy.OVERRIDE_BASE
},
RESERVED_SPEC_KEYS = {
displayName: function(e, t) {
e.displayName = t
},
mixins: function(e, t) {
if (t)
for (var n = 0; n < t.length; n++) mixSpecIntoComponent(e, t[n])
},
childContextTypes: function(e, t) {
e.childContextTypes = _assign({}, e.childContextTypes, t)
},
contextTypes: function(e, t) {
e.contextTypes = _assign({}, e.contextTypes, t)
},
getDefaultProps: function(e, t) {
e.getDefaultProps ? e.getDefaultProps = createMergedResultFunction(e.getDefaultProps, t) : e.getDefaultProps = t
},
propTypes: function(e, t) {
e.propTypes = _assign({}, e.propTypes, t)
},
statics: function(e, t) {
mixStaticSpecIntoComponent(e, t)
},
autobind: function() {}
},
ReactClassMixin = {
replaceState: function(e, t) {
this.updater.enqueueReplaceState(this, e), t && this.updater.enqueueCallback(this, t, "replaceState")
},
isMounted: function() {
return this.updater.isMounted(this)
}
},
ReactClassComponent = function() {};
_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
var ReactClass = {
createClass: function(e) {
var t = function(e, n, o) {
this.__reactAutoBindPairs.length && bindAutoBindMethods(this), this.props = e, this.context = n, this.refs = emptyObject, this.updater = o || ReactNoopUpdateQueue, this.state = null;
var i = this.getInitialState ? this.getInitialState() : null;
"object" != typeof i || Array.isArray(i) ? _prodInvariant("82", t.displayName || "ReactCompositeComponent") : void 0, this.state = i
};
t.prototype = new ReactClassComponent, t.prototype.constructor = t, t.prototype.__reactAutoBindPairs = [], mixSpecIntoComponent(t, e), t.getDefaultProps && (t.defaultProps = t.getDefaultProps()), t.prototype.render ? void 0 : _prodInvariant("83");
for (var n in ReactClassInterface) t.prototype[n] || (t.prototype[n] = null);
return t
}
};
module.exports = ReactClass;
}, {
"10": 10,
"11": 11,
"12": 12,
"13": 13,
"22": 22,
"25": 25,
"26": 26,
"27": 27,
"28": 28,
"30": 30,
"31": 31,
"6": 6
}],
6: [function(require, module, exports) {
"use strict";
function ReactComponent(e, t, n) {
this.props = e, this.context = t, this.refs = emptyObject, this.updater = n || ReactNoopUpdateQueue
}
var _prodInvariant = require(22),
ReactNoopUpdateQueue = require(11),
canDefineProperty = require(19),
emptyObject = require(25),
invariant = require(26),
warning = require(30);
ReactComponent.prototype.isReactComponent = {}, ReactComponent.prototype.setState = function(e, t) {
"object" != typeof e && "function" != typeof e && null != e ? _prodInvariant("85") : void 0, this.updater.enqueueSetState(this, e), t && this.updater.enqueueCallback(this, t, "setState")
}, ReactComponent.prototype.forceUpdate = function(e) {
this.updater.enqueueForceUpdate(this), e && this.updater.enqueueCallback(this, e, "forceUpdate")
};
var deprecatedAPIs, defineDeprecationWarning, fnName;
module.exports = ReactComponent;
}, {
"11": 11,
"19": 19,
"22": 22,
"25": 25,
"26": 26,
"30": 30
}],
7: [function(require, module, exports) {
"use strict";
function updateTree(e, n) {
tree[e] || (tree[e] = {
element: null,
parentID: null,
ownerID: null,
text: null,
childIDs: [],
displayName: "Unknown",
isMounted: !1,
updateCount: 0
}), n(tree[e])
}
function purgeDeep(e) {
var n = tree[e];
if (n) {
var t = n.childIDs;
delete tree[e], t.forEach(purgeDeep)
}
}
function describeComponentFrame(e, n, t) {
return "\n in " + e + (n ? " (at " + n.fileName.replace(/^.*[\\\/]/, "") + ":" + n.lineNumber + ")" : t ? " (created by " + t + ")" : "")
}
function describeID(e) {
var n, t = ReactComponentTreeHook.getDisplayName(e),
r = ReactComponentTreeHook.getElement(e),
o = ReactComponentTreeHook.getOwnerID(e);
return o && (n = ReactComponentTreeHook.getDisplayName(o)), describeComponentFrame(t, r && r._source, n)
}
var _prodInvariant = require(22),
ReactCurrentOwner = require(8),
invariant = require(26),
warning = require(30),
tree = {},
unmountedIDs = {},
rootIDs = {},
ReactComponentTreeHook = {
onSetDisplayName: function(e, n) {
updateTree(e, function(e) {
return e.displayName = n
})
},
onSetChildren: function(e, n) {
updateTree(e, function(t) {
t.childIDs = n, n.forEach(function(n) {
var t = tree[n];
invariant(t, "Expected hook events to fire for the child before its parent includes it in onSetChildren()."), null == t.displayName ? _prodInvariant("69") : void 0, null == t.childIDs && null == t.text ? _prodInvariant("70") : void 0, t.isMounted ? void 0 : _prodInvariant("71"), null == t.parentID && (t.parentID = e), t.parentID !== e ? _prodInvariant("72", n, t.parentID, e) : void 0
})
})
},
onSetOwner: function(e, n) {
updateTree(e, function(e) {
return e.ownerID = n
})
},
onSetParent: function(e, n) {
updateTree(e, function(e) {
return e.parentID = n
})
},
onSetText: function(e, n) {
updateTree(e, function(e) {
return e.text = n
})
},
onBeforeMountComponent: function(e, n) {
updateTree(e, function(e) {
return e.element = n
})
},
onBeforeUpdateComponent: function(e, n) {
updateTree(e, function(e) {
return e.element = n
})
},
onMountComponent: function(e) {
updateTree(e, function(e) {
return e.isMounted = !0
})
},
onMountRootComponent: function(e) {
rootIDs[e] = !0
},
onUpdateComponent: function(e) {
updateTree(e, function(e) {
return e.updateCount++
})
},
onUnmountComponent: function(e) {
updateTree(e, function(e) {
return e.isMounted = !1
}), unmountedIDs[e] = !0, delete rootIDs[e]
},
purgeUnmountedComponents: function() {
if (!ReactComponentTreeHook._preventPurging) {
for (var e in unmountedIDs) purgeDeep(e);
unmountedIDs = {}
}
},
isMounted: function(e) {
var n = tree[e];
return n ? n.isMounted : !1
},
getCurrentStackAddendum: function(e) {
var n = "";
if (e) {
var t = e.type,
r = "function" == typeof t ? t.displayName || t.name : t,
o = e._owner;
n += describeComponentFrame(r || "Unknown", e._source, o && o.getName())
}
var u = ReactCurrentOwner.current,
a = u && u._debugID;
return n += ReactComponentTreeHook.getStackAddendumByID(a)
},
getStackAddendumByID: function(e) {
for (var n = ""; e;) n += describeID(e), e = ReactComponentTreeHook.getParentID(e);
return n
},
getChildIDs: function(e) {
var n = tree[e];
return n ? n.childIDs : []
},
getDisplayName: function(e) {
var n = tree[e];
return n ? n.displayName : "Unknown"
},
getElement: function(e) {
var n = tree[e];
return n ? n.element : null
},
getOwnerID: function(e) {
var n = tree[e];
return n ? n.ownerID : null
},
getParentID: function(e) {
var n = tree[e];
return n ? n.parentID : null
},
getSource: function(e) {
var n = tree[e],
t = n ? n.element : null,
r = null != t ? t._source : null;
return r
},
getText: function(e) {
var n = tree[e];
return n ? n.text : null
},
getUpdateCount: function(e) {
var n = tree[e];
return n ? n.updateCount : 0
},
getRootIDs: function() {
return Object.keys(rootIDs)
},
getRegisteredIDs: function() {
return Object.keys(tree)
}
};
module.exports = ReactComponentTreeHook;
}, {
"22": 22,
"26": 26,
"30": 30,
"8": 8
}],
8: [function(require, module, exports) {
"use strict";
var ReactCurrentOwner = {
current: null
};
module.exports = ReactCurrentOwner;
}, {}],
9: [function(require, module, exports) {
"use strict";
function createDOMFactory(e) {
return ReactElement.createFactory(e)
}
var ReactElement = require(10),
mapObject = require(29),
ReactDOMFactories = mapObject({
a: "a",
abbr: "abbr",
address: "address",
area: "area",
article: "article",
aside: "aside",
audio: "audio",
b: "b",
base: "base",
bdi: "bdi",
bdo: "bdo",
big: "big",
blockquote: "blockquote",
body: "body",
br: "br",
button: "button",
canvas: "canvas",
caption: "caption",
cite: "cite",
code: "code",
col: "col",
colgroup: "colgroup",
data: "data",
datalist: "datalist",
dd: "dd",
del: "del",
details: "details",
dfn: "dfn",
dialog: "dialog",
div: "div",
dl: "dl",
dt: "dt",
em: "em",
embed: "embed",
fieldset: "fieldset",
figcaption: "figcaption",
figure: "figure",
footer: "footer",
form: "form",
h1: "h1",
h2: "h2",
h3: "h3",
h4: "h4",
h5: "h5",
h6: "h6",
head: "head",
header: "header",
hgroup: "hgroup",
hr: "hr",
html: "html",
i: "i",
iframe: "iframe",
img: "img",
input: "input",
ins: "ins",
kbd: "kbd",
keygen: "keygen",
label: "label",
legend: "legend",
li: "li",
link: "link",
main: "main",
map: "map",
mark: "mark",
menu: "menu",
menuitem: "menuitem",
meta: "meta",
meter: "meter",
nav: "nav",
noscript: "noscript",
object: "object",
ol: "ol",
optgroup: "optgroup",
option: "option",
output: "output",
p: "p",
param: "param",
picture: "picture",
pre: "pre",
progress: "progress",
q: "q",
rp: "rp",
rt: "rt",
ruby: "ruby",
s: "s",
samp: "samp",
script: "script",
section: "section",
select: "select",
small: "small",
source: "source",
span: "span",
strong: "strong",
style: "style",
sub: "sub",
summary: "summary",
sup: "sup",
table: "table",
tbody: "tbody",
td: "td",
textarea: "textarea",
tfoot: "tfoot",
th: "th",
thead: "thead",
time: "time",
title: "title",
tr: "tr",
track: "track",
u: "u",
ul: "ul",
"var": "var",
video: "video",
wbr: "wbr",
circle: "circle",
clipPath: "clipPath",
defs: "defs",
ellipse: "ellipse",
g: "g",
image: "image",
line: "line",
linearGradient: "linearGradient",
mask: "mask",
path: "path",
pattern: "pattern",
polygon: "polygon",
polyline: "polyline",
radialGradient: "radialGradient",
rect: "rect",
stop: "stop",
svg: "svg",
text: "text",
tspan: "tspan"
}, createDOMFactory);
module.exports = ReactDOMFactories;
}, {
"10": 10,
"29": 29
}],
10: [function(require, module, exports) {
"use strict";
function hasValidRef(e) {
return void 0 !== e.ref
}
function hasValidKey(e) {
return void 0 !== e.key
}
var _assign = require(31),
ReactCurrentOwner = require(8),
warning = require(30),
canDefineProperty = require(19),
hasOwnProperty = Object.prototype.hasOwnProperty,
REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103,
RESERVED_PROPS = {
key: !0,
ref: !0,
__self: !0,
__source: !0
},
specialPropKeyWarningShown, specialPropRefWarningShown, ReactElement = function(e, r, n, t, l, a, o) {
var i = {
$$typeof: REACT_ELEMENT_TYPE,
type: e,
key: r,
ref: n,
props: o,
_owner: a
};
return i
};
ReactElement.createElement = function(e, r, n) {
var t, l = {},
a = null,
o = null,
i = null,
c = null;
if (null != r) {
hasValidRef(r) && (o = r.ref), hasValidKey(r) && (a = "" + r.key), i = void 0 === r.__self ? null : r.__self, c = void 0 === r.__source ? null : r.__source;
for (t in r) hasOwnProperty.call(r, t) && !RESERVED_PROPS.hasOwnProperty(t) && (l[t] = r[t])
}
var f = arguments.length - 2;
if (1 === f) l.children = n;
else if (f > 1) {
for (var E = Array(f), u = 0; f > u; u++) E[u] = arguments[u + 2];
l.children = E
}
if (e && e.defaultProps) {
var s = e.defaultProps;
for (t in s) void 0 === l[t] && (l[t] = s[t])
}
return ReactElement(e, a, o, i, c, ReactCurrentOwner.current, l)
}, ReactElement.createFactory = function(e) {
var r = ReactElement.createElement.bind(null, e);
return r.type = e, r
}, ReactElement.cloneAndReplaceKey = function(e, r) {
var n = ReactElement(e.type, r, e.ref, e._self, e._source, e._owner, e.props);
return n
}, ReactElement.cloneElement = function(e, r, n) {
var t, l = _assign({}, e.props),
a = e.key,
o = e.ref,
i = e._self,
c = e._source,
f = e._owner;
if (null != r) {
hasValidRef(r) && (o = r.ref, f = ReactCurrentOwner.current), hasValidKey(r) && (a = "" + r.key);
var E;
e.type && e.type.defaultProps && (E = e.type.defaultProps);
for (t in r) hasOwnProperty.call(r, t) && !RESERVED_PROPS.hasOwnProperty(t) && (void 0 === r[t] && void 0 !== E ? l[t] = E[t] : l[t] = r[t])
}
var u = arguments.length - 2;
if (1 === u) l.children = n;
else if (u > 1) {
for (var s = Array(u), p = 0; u > p; p++) s[p] = arguments[p + 2];
l.children = s
}
return ReactElement(e.type, a, o, i, c, f, l)
}, ReactElement.isValidElement = function(e) {
return "object" == typeof e && null !== e && e.$$typeof === REACT_ELEMENT_TYPE
}, ReactElement.REACT_ELEMENT_TYPE = REACT_ELEMENT_TYPE, module.exports = ReactElement;
}, {
"19": 19,
"30": 30,
"31": 31,
"8": 8
}],
11: [function(require, module, exports) {
"use strict";
function warnNoop(e, t) {}
var warning = require(30),
ReactNoopUpdateQueue = {
isMounted: function(e) {
return !1
},
enqueueCallback: function(e, t) {},
enqueueForceUpdate: function(e) {
warnNoop(e, "forceUpdate")
},
enqueueReplaceState: function(e, t) {
warnNoop(e, "replaceState")
},
enqueueSetState: function(e, t) {
warnNoop(e, "setState")
}
};
module.exports = ReactNoopUpdateQueue;
}, {
"30": 30
}],
12: [function(require, module, exports) {
"use strict";
var ReactPropTypeLocationNames = {};
module.exports = ReactPropTypeLocationNames;
}, {}],
13: [function(require, module, exports) {
"use strict";
var keyMirror = require(27),
ReactPropTypeLocations = keyMirror({
prop: null,
context: null,
childContext: null
});
module.exports = ReactPropTypeLocations;
}, {
"27": 27
}],
14: [function(require, module, exports) {
"use strict";
function is(e, r) {
return e === r ? 0 !== e || 1 / e === 1 / r : e !== e && r !== r
}
function createChainableTypeChecker(e) {
function r(r, t, n, a, o, i, c) {
a = a || ANONYMOUS, i = i || n;
if (null == t[n]) {
var u = ReactPropTypeLocationNames[o];
return r ? null === t[n] ? new Error("The " + u + " `" + i + "` is marked as required " + ("in `" + a + "`, but its value is `null`.")) : new Error("The " + u + " `" + i + "` is marked as required in " + ("`" + a + "`, but its value is `undefined`.")) : null
}
return e(t, n, a, o, i)
}
var t = r.bind(null, !1);
return t.isRequired = r.bind(null, !0), t
}
function createPrimitiveTypeChecker(e) {
function r(r, t, n, a, o, i) {
var c = r[t],
u = getPropType(c);
if (u !== e) {
var p = ReactPropTypeLocationNames[a],
y = getPreciseType(c);
return new Error("Invalid " + p + " `" + o + "` of type " + ("`" + y + "` supplied to `" + n + "`, expected ") + ("`" + e + "`."))
}
return null
}
return createChainableTypeChecker(r)
}
function createAnyTypeChecker() {
return createChainableTypeChecker(emptyFunction.thatReturns(null))
}
function createArrayOfTypeChecker(e) {
function r(r, t, n, a, o) {
if ("function" != typeof e) return new Error("Property `" + o + "` of component `" + n + "` has invalid PropType notation inside arrayOf.");
var i = r[t];
if (!Array.isArray(i)) {
var c = ReactPropTypeLocationNames[a],
u = getPropType(i);
return new Error("Invalid " + c + " `" + o + "` of type " + ("`" + u + "` supplied to `" + n + "`, expected an array."))
}
for (var p = 0; p < i.length; p++) {
var y = e(i, p, n, a, o + "[" + p + "]", ReactPropTypesSecret);
if (y instanceof Error) return y
}
return null
}
return createChainableTypeChecker(r)
}
function createElementTypeChecker() {
function e(e, r, t, n, a) {
var o = e[r];
if (!ReactElement.isValidElement(o)) {
var i = ReactPropTypeLocationNames[n],
c = getPropType(o);
return new Error("Invalid " + i + " `" + a + "` of type " + ("`" + c + "` supplied to `" + t + "`, expected a single ReactElement."))
}
return null
}
return createChainableTypeChecker(e)
}
function createInstanceTypeChecker(e) {
function r(r, t, n, a, o) {
if (!(r[t] instanceof e)) {
var i = ReactPropTypeLocationNames[a],
c = e.name || ANONYMOUS,
u = getClassName(r[t]);
return new Error("Invalid " + i + " `" + o + "` of type " + ("`" + u + "` supplied to `" + n + "`, expected ") + ("instance of `" + c + "`."))
}
return null
}
return createChainableTypeChecker(r)
}
function createEnumTypeChecker(e) {
function r(r, t, n, a, o) {
for (var i = r[t], c = 0; c < e.length; c++)
if (is(i, e[c])) return null;
var u = ReactPropTypeLocationNames[a],
p = JSON.stringify(e);
return new Error("Invalid " + u + " `" + o + "` of value `" + i + "` " + ("supplied to `" + n + "`, expected one of " + p + "."))
}
return Array.isArray(e) ? createChainableTypeChecker(r) : emptyFunction.thatReturnsNull
}
function createObjectOfTypeChecker(e) {
function r(r, t, n, a, o) {
if ("function" != typeof e) return new Error("Property `" + o + "` of component `" + n + "` has invalid PropType notation inside objectOf.");
var i = r[t],
c = getPropType(i);
if ("object" !== c) {
var u = ReactPropTypeLocationNames[a];
return new Error("Invalid " + u + " `" + o + "` of type " + ("`" + c + "` supplied to `" + n + "`, expected an object."))
}
for (var p in i)
if (i.hasOwnProperty(p)) {
var y = e(i, p, n, a, o + "." + p, ReactPropTypesSecret);
if (y instanceof Error) return y
}
return null
}
return createChainableTypeChecker(r)
}
function createUnionTypeChecker(e) {
function r(r, t, n, a, o) {
for (var i = 0; i < e.length; i++) {
var c = e[i];
if (null == c(r, t, n, a, o, ReactPropTypesSecret)) return null
}
var u = ReactPropTypeLocationNames[a];
return new Error("Invalid " + u + " `" + o + "` supplied to " + ("`" + n + "`."))
}
return Array.isArray(e) ? createChainableTypeChecker(r) : emptyFunction.thatReturnsNull
}
function createNodeChecker() {
function e(e, r, t, n, a) {
if (!isNode(e[r])) {
var o = ReactPropTypeLocationNames[n];
return new Error("Invalid " + o + " `" + a + "` supplied to " + ("`" + t + "`, expected a ReactNode."))
}
return null
}
return createChainableTypeChecker(e)
}
function createShapeTypeChecker(e) {
function r(r, t, n, a, o) {
var i = r[t],
c = getPropType(i);
if ("object" !== c) {
var u = ReactPropTypeLocationNames[a];
return new Error("Invalid " + u + " `" + o + "` of type `" + c + "` " + ("supplied to `" + n + "`, expected `object`."))
}
for (var p in e) {
var y = e[p];
if (y) {
var l = y(i, p, n, a, o + "." + p, ReactPropTypesSecret);
if (l) return l
}
}
return null
}
return createChainableTypeChecker(r)
}
function isNode(e) {
switch (typeof e) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !e;
case "object":
if (Array.isArray(e)) return e.every(isNode);
if (null === e || ReactElement.isValidElement(e)) return !0;
var r = getIteratorFn(e);
if (!r) return !1;
var t, n = r.call(e);
if (r !== e.entries) {
for (; !(t = n.next()).done;)
if (!isNode(t.value)) return !1
} else
for (; !(t = n.next()).done;) {
var a = t.value;
if (a && !isNode(a[1])) return !1
}
return !0;
default:
return !1
}
}
function isSymbol(e, r) {
return "symbol" === e ? !0 : "Symbol" === r["@@toStringTag"] ? !0 : "function" == typeof Symbol && r instanceof Symbol
}
function getPropType(e) {
var r = typeof e;
return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : isSymbol(r, e) ? "symbol" : r
}
function getPreciseType(e) {
var r = getPropType(e);
if ("object" === r) {
if (e instanceof Date) return "date";
if (e instanceof RegExp) return "regexp"
}
return r
}
function getClassName(e) {
return e.constructor && e.constructor.name ? e.constructor.name : ANONYMOUS
}
var ReactElement = require(10),
ReactPropTypeLocationNames = require(12),
ReactPropTypesSecret = require(15),
emptyFunction = require(24),
getIteratorFn = require(20),
warning = require(30),
ANONYMOUS = "<<anonymous>>",
ReactPropTypes = {
array: createPrimitiveTypeChecker("array"),
bool: createPrimitiveTypeChecker("boolean"),
func: createPrimitiveTypeChecker("function"),
number: createPrimitiveTypeChecker("number"),
object: createPrimitiveTypeChecker("object"),
string: createPrimitiveTypeChecker("string"),
symbol: createPrimitiveTypeChecker("symbol"),
any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
element: createElementTypeChecker(),
instanceOf: createInstanceTypeChecker,
node: createNodeChecker(),
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
};
module.exports = ReactPropTypes;
}, {
"10": 10,
"12": 12,
"15": 15,
"20": 20,
"24": 24,
"30": 30
}],
15: [function(require, module, exports) {
"use strict";
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
module.exports = ReactPropTypesSecret;
}, {}],
16: [function(require, module, exports) {
"use strict";
function ReactPureComponent(e, t, o) {
this.props = e, this.context = t, this.refs = emptyObject, this.updater = o || ReactNoopUpdateQueue
}
function ComponentDummy() {}
var _assign = require(31),
ReactComponent = require(6),
ReactNoopUpdateQueue = require(11),
emptyObject = require(25);
ComponentDummy.prototype = ReactComponent.prototype, ReactPureComponent.prototype = new ComponentDummy, ReactPureComponent.prototype.constructor = ReactPureComponent, _assign(ReactPureComponent.prototype, ReactComponent.prototype), ReactPureComponent.prototype.isPureReactComponent = !0, module.exports = ReactPureComponent;
}, {
"11": 11,
"25": 25,
"31": 31,
"6": 6
}],
17: [function(require, module, exports) {
"use strict";
var _assign = require(31),
React = require(3),
ReactUMDEntry = _assign({
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
ReactCurrentOwner: require(8),
ReactComponentTreeHook: require(7)
}
}, React);
module.exports = ReactUMDEntry;
}, {
"3": 3,
"31": 31,
"7": 7,
"8": 8
}],
18: [function(require, module, exports) {
"use strict";
module.exports = "16.0.0-alpha";
}, {}],
19: [function(require, module, exports) {
"use strict";
var canDefineProperty = !1;
module.exports = canDefineProperty;
}, {}],
20: [function(require, module, exports) {
"use strict";
function getIteratorFn(t) {
var o = t && (ITERATOR_SYMBOL && t[ITERATOR_SYMBOL] || t[FAUX_ITERATOR_SYMBOL]);
return "function" == typeof o ? o : void 0
}
var ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator,
FAUX_ITERATOR_SYMBOL = "@@iterator";
module.exports = getIteratorFn;
}, {}],
21: [function(require, module, exports) {
"use strict";
function onlyChild(e) {
return ReactElement.isValidElement(e) ? void 0 : _prodInvariant("23"), e
}
var _prodInvariant = require(22),
ReactElement = require(10),
invariant = require(26);
module.exports = onlyChild;
}, {
"10": 10,
"22": 22,
"26": 26
}],
22: [function(require, module, exports) {
"use strict";
function reactProdInvariant(r) {
for (var e = arguments.length - 1, o = "Minified React error #" + r + "; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=" + r, n = 0; e > n; n++) o += "&args[]=" + encodeURIComponent(arguments[n + 1]);
o += " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
var t = new Error(o);
throw t.name = "Invariant Violation", t.framesToPop = 1, t
}
module.exports = reactProdInvariant;
}, {}],
23: [function(require, module, exports) {
"use strict";
function getComponentKey(e, r) {
return e && "object" == typeof e && null != e.key ? KeyEscapeUtils.escape(e.key) : r.toString(36)
}
function traverseAllChildrenImpl(e, r, t, n) {
var l = typeof e;
if ("undefined" !== l && "boolean" !== l || (e = null), null === e || "string" === l || "number" === l || ReactElement.isValidElement(e)) return t(n, e, "" === r ? SEPARATOR + getComponentKey(e, 0) : r), 1;
var a, i, o = 0,
s = "" === r ? SEPARATOR : r + SUBSEPARATOR;
if (Array.isArray(e))
for (var u = 0; u < e.length; u++) a = e[u], i = s + getComponentKey(a, u), o += traverseAllChildrenImpl(a, i, t, n);
else {
var c = getIteratorFn(e);
if (c) {
var v, p = c.call(e);
if (c !== e.entries)
for (var A = 0; !(v = p.next()).done;) a = v.value, i = s + getComponentKey(a, A++), o += traverseAllChildrenImpl(a, i, t, n);
else
for (; !(v = p.next()).done;) {
var d = v.value;
d && (a = d[1], i = s + KeyEscapeUtils.escape(d[0]) + SUBSEPARATOR + getComponentKey(a, 0), o += traverseAllChildrenImpl(a, i, t, n))
}
} else if ("object" === l) {
var y = "",
R = String(e);
_prodInvariant("31", "[object Object]" === R ? "object with keys {" + Object.keys(e).join(", ") + "}" : R, y)
}
}
return o
}
function traverseAllChildren(e, r, t) {
return null == e ? 0 : traverseAllChildrenImpl(e, "", r, t)
}
var _prodInvariant = require(22),
ReactCurrentOwner = require(8),
ReactElement = require(10),
getIteratorFn = require(20),
invariant = require(26),
KeyEscapeUtils = require(1),
warning = require(30),
SEPARATOR = ".",
SUBSEPARATOR = ":",
didWarnAboutMaps = !1;
module.exports = traverseAllChildren;
}, {
"1": 1,
"10": 10,
"20": 20,
"22": 22,
"26": 26,
"30": 30,
"8": 8
}],
24: [function(require, module, exports) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
function makeEmptyFunction(arg) {
return function() {
return arg;
};
}
/**
* This function accepts and discards inputs; it has no side effects. This is
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function() {
return this;
};
emptyFunction.thatReturnsArgument = function(arg) {
return arg;
};
module.exports = emptyFunction;
}, {}],
25: [function(require, module, exports) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'use strict';
var emptyObject = {};
module.exports = emptyObject;
}, {}],
26: [function(require, module, exports) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'use strict';
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
function invariant(condition, format, a, b, c, d, e, f) {
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function() {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
}, {}],
27: [function(require, module, exports) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @typechecks static-only
*/
'use strict';
var invariant = require(26);
/**
* Constructs an enumeration with keys equal to their value.
*
* For example:
*
* var COLORS = keyMirror({blue: null, red: null});
* var myColor = COLORS.blue;
* var isColorValid = !!COLORS[myColor];
*
* The last line could not be performed if the values of the generated enum were
* not equal to their keys.
*
* Input: {key1: val1, key2: val2}
* Output: {key1: key1, key2: key2}
*
* @param {object} obj
* @return {object}
*/
var keyMirror = function keyMirror(obj) {
var ret = {};
var key;
!(obj instanceof Object && !Array.isArray(obj)) ? invariant(false): void 0;
for (key in obj) {
if (!obj.hasOwnProperty(key)) {
continue;
}
ret[key] = key;
}
return ret;
};
module.exports = keyMirror;
}, {
"26": 26
}],
28: [function(require, module, exports) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
/**
* Allows extraction of a minified key. Let's the build system minify keys
* without losing the ability to dynamically use key strings as values
* themselves. Pass in an object with a single key/val pair and it will return
* you the string key of that single record. Suppose you want to grab the
* value for a key 'className' inside of an object. Key/val minification may
* have aliased that key to be 'xa12'. keyOf({className: null}) will return
* 'xa12' in that case. Resolve keys you want to use once at startup time, then
* reuse those resolutions.
*/
var keyOf = function keyOf(oneKeyObj) {
var key;
for (key in oneKeyObj) {
if (!oneKeyObj.hasOwnProperty(key)) {
continue;
}
return key;
}
return null;
};
module.exports = keyOf;
}, {}],
29: [function(require, module, exports) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'use strict';
var hasOwnProperty = Object.prototype.hasOwnProperty;
/**
* Executes the provided `callback` once for each enumerable own property in the
* object and constructs a new object from the results. The `callback` is
* invoked with three arguments:
*
* - the property value
* - the property name
* - the object being traversed
*
* Properties that are added after the call to `mapObject` will not be visited
* by `callback`. If the values of existing properties are changed, the value
* passed to `callback` will be the value at the time `mapObject` visits them.
* Properties that are deleted before being visited are not visited.
*
* @grep function objectMap()
* @grep function objMap()
*
* @param {?object} object
* @param {function} callback
* @param {*} context
* @return {?object}
*/
function mapObject(object, callback, context) {
if (!object) {
return null;
}
var result = {};
for (var name in object) {
if (hasOwnProperty.call(object, name)) {
result[name] = callback.call(context, object[name], name, object);
}
}
return result;
}
module.exports = mapObject;
}, {}],
30: [function(require, module, exports) {
/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'use strict';
var emptyFunction = require(24);
/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var warning = emptyFunction;
module.exports = warning;
}, {
"24": 24
}],
31: [function(require, module, exports) {
'use strict';
/* eslint-disable no-unused-vars */
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function(letter) {
test3[letter] = letter;
});
if (Object.keys(Object.assign({}, test3)).join('') !==
'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (e) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
}
module.exports = shouldUseNative() ? Object.assign : function(target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
to[key] = from[key];
}
}
if (Object.getOwnPropertySymbols) {
symbols = Object.getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
}, {}]
}, {}, [17])(17)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment