This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__SSTOKENSTRING = "@generated SignedSource<<dbe928e1275c495c1922c1bf063ffb70>>"; | |
! function(e) { | |
function t(e) { | |
function t() { | |
var t = Array.prototype.map.call(arguments, function(e) { | |
if (null == e) return null === e ? "null" : "undefined"; | |
if ("string" == typeof e) return '"' + e + '"'; | |
try { | |
return JSON.stringify(e) | |
} catch (t) { | |
if ("function" == typeof e.toString) try { | |
return e.toString() | |
} catch (t) { | |
return "unknown" | |
} | |
} | |
}).join(", "); | |
e.nativeLoggingHook(t) | |
} | |
function r(t) { | |
if (!Array.isArray(t)) { | |
var r = t; | |
t = []; | |
for (var i in r) | |
if (r.hasOwnProperty(i)) { | |
var a = r[i]; | |
a[n] = i, t.push(a) | |
} | |
} | |
if (0 === t.length) return void e.nativeLoggingHook(""); | |
var s = Object.keys(t[0]).sort(), | |
l = [], | |
u = []; | |
s.forEach(function(e, n) { | |
u[n] = e.length; | |
for (var r = 0; r < t.length; r++) { | |
var o = t[r][e].toString(); | |
l[r] = l[r] || [], l[r][n] = o, u[n] = Math.max(u[n], o.length) | |
} | |
}); | |
for (var c = function(e, t) { | |
var n = e.map(function(e, t) { | |
var n = o(" ", u[t] - e.length).join(""); | |
return e + n | |
}); | |
return t = t || " ", n.join(t + "|" + t) | |
}, d = u.map(function(e) { | |
return o("-", e).join("") | |
}), p = c(d, "-"), h = c(s), f = [h, p], m = 0; m < t.length; m++) f.push(c(l[m])); | |
e.nativeLoggingHook("\n" + f.join("\n")) | |
} | |
if (e.nativeLoggingHook) { | |
var o = function(e, t) { | |
return Array.apply(null, Array(t)).map(function() { | |
return e | |
}) | |
}; | |
e.console = { | |
error: t, | |
info: t, | |
log: t, | |
warn: t, | |
table: r | |
} | |
} | |
} | |
var n = "(index)"; | |
"undefined" != typeof module ? module.exports = t : t(e) | |
}(this), | |
function(e) { | |
function t() { | |
var t = function(t) { | |
e.console.error("Error: \n stack: " + t.stack + "\n line: " + t.line + "\n message: " + t.message, t) | |
}; | |
e.ErrorUtils.setGlobalHandler(t) | |
} | |
var n = { | |
_inGuard: 0, | |
_globalHandler: null, | |
setGlobalHandler: function(e) { | |
n._globalHandler = e | |
}, | |
reportError: function(e) { | |
Error._globalHandler && n._globalHandler(e) | |
}, | |
applyWithGuard: function(e, t, r) { | |
try { | |
return n._inGuard++, e.apply(t, r) | |
} catch (o) { | |
n._globalHandler && n._globalHandler(o) | |
} finally { | |
n._inGuard-- | |
} | |
}, | |
applyWithGuardIfNeeded: function(e, t, r) { | |
return n.inGuard() ? e.apply(t, r) : void n.applyWithGuard(e, t, r) | |
}, | |
inGuard: function() { | |
return n._inGuard | |
}, | |
guard: function(e, t, r) { | |
function o() { | |
return n.applyWithGuard(e, r || this, arguments, null, t) | |
} | |
return t = t || e.name || "<generated guard>", o | |
} | |
}; | |
e.ErrorUtils = n, t() | |
}(this), __VERSION__ = .44, __DEV__ = !1, Object.assign = function(e) { | |
if (__DEV__) { | |
if (null == e) throw new TypeError("Object.assign target cannot be null or undefined"); | |
if ("object" != typeof e && "function" != typeof e) throw new TypeError("In this environment the target of assign MUST be an object.This error is a performance optimization and not spec compliant.") | |
} | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
if (null != n) { | |
if (__DEV__ && "object" != typeof n && "function" != typeof n) throw new TypeError("In this environment the target of assign MUST be an object.This error is a performance optimization and not spec compliant."); | |
for (var r in n) { | |
if (__DEV__) { | |
var o = Object.prototype.hasOwnProperty; | |
if (!o.call(n, r)) throw new TypeError("One of the sources to assign has an enumerable key on the prototype chain. This is an edge case that we do not support. This error is a performance optimization and not spec compliant.") | |
} | |
e[r] = n[r] | |
} | |
} | |
} | |
return e | |
}, | |
function(e) { | |
function t(e) { | |
for (var t = Array.prototype.slice.call(e), n = {}; t.length;) { | |
var r = t.shift(); | |
if (!n[r]) { | |
n[r] = !0; | |
var o = p[r]; | |
if (o && o.waiting) | |
for (var i = 0; i < o.dependencies.length; i++) { | |
var a = o.dependencies[i]; | |
(!p[a] || p[a].waiting) && t.push(a) | |
} | |
} | |
} | |
for (r in n) y.call(n, r) && t.push(r); | |
return t | |
} | |
function n(e) { | |
for (var t = [], n = 0; n < e.length; n++) { | |
var r = e[n], | |
o = r, | |
i = p[r]; | |
if (i) | |
if (i.waiting) { | |
for (var a = [], s = 0; s < i.dependencies.length; s++) { | |
var l = i.dependencies[s]; | |
(!p[l] || p[l].waiting) && a.push(l) | |
} | |
o += " is waiting for " + a.join(", ") | |
} else o += " is ready"; | |
else o += " is not defined"; | |
t.push(o) | |
} | |
return t.join("\n") | |
} | |
function r(o) { | |
if (e.ErrorUtils && !e.ErrorUtils.inGuard()) return ErrorUtils.applyWithGuard(r, this, arguments); | |
var i, a, s, l = p[o]; | |
if (!p[o]) throw s = 'Requiring unknown module "' + o + '"', __DEV__ && (s += ". It may not be loaded yet. Did you forget to run arc build?"), new Error(s); | |
if (l.hasError) throw new Error('Requiring module "' + o + '" which threw an exception'); | |
if (l.waiting) { | |
if (s = 'Requiring module "' + o + '" with unresolved dependencies', __DEV__) { | |
var u = t([o]); | |
e.console && e.console.error(n(u)); | |
for (var c = [], h = 0; h < u.length; h++) { | |
var f = u[h]; | |
p[f] || c.push(f) | |
} | |
s += ": " + c.join(", ") | |
} | |
throw new Error(s) | |
} | |
if (!l.exports) { | |
var m = l.exports = {}, | |
g = l.factory; | |
if ("[object Function]" === d.call(g)) { | |
var y, v = [], | |
S = l.dependencies, | |
w = S.length; | |
l.special & _ && (w = Math.min(w, g.length)); | |
try { | |
for (a = 0; w > a; a++) i = S[a], v.push("module" === i ? l : "exports" === i ? m : r(i)); | |
y = g.apply(l.context || e, v) | |
} catch (b) { | |
throw l.hasError = !0, b | |
} | |
if (y) { | |
if (__DEV__ && "object" != typeof y && "function" != typeof y) throw new Error('Factory for module "' + o + '" returned an invalid value "' + y + '". Returned value should be either a function or an object.'); | |
l.exports = y | |
} | |
} else l.exports = g | |
} | |
return 1 === l.refcount-- && delete p[o], l.exports | |
} | |
function o(e, t, n, r, o, a) { | |
void 0 === t ? (t = [], n = e, e = s()) : void 0 === n && (n = t, "[object Array]" === d.call(e) ? (t = e, e = s()) : t = []); | |
var l = { | |
cancel: function() { | |
i(e) | |
} | |
}, | |
c = p[e]; | |
if (c) return a && (c.refcount += a), l; | |
if (!t && !n && a) return f[e] = (f[e] || 0) + a, l; | |
if (c = { | |
id: e | |
}, c.refcount = (f[e] || 0) + (a || 0), delete f[e], __DEV__) { | |
if (!n || "object" != typeof n && "function" != typeof n && "string" != typeof n) throw new Error('Invalid factory "' + n + '" for module "' + e + '". Factory should be either a function or an object.'); | |
if ("[object Array]" !== d.call(t)) throw new Error('Invalid dependencies for module "' + e + '". Dependencies must be passed as an array.') | |
} | |
return c.factory = n, c.dependencies = t, c.context = o, c.special = r, c.waitingMap = {}, c.waiting = 0, c.hasError = !1, p[e] = c, u(e), l | |
} | |
function i(e) { | |
if (p[e]) { | |
var t = p[e]; | |
delete p[e]; | |
for (var n in t.waitingMap) t.waitingMap[n] && delete h[n][e]; | |
for (var r = 0; r < t.dependencies.length; r++) n = t.dependencies[r], p[n] ? 1 === p[n].refcount-- && i(n) : f[n] && f[n] -- | |
} | |
} | |
function a(e, t, n) { | |
return o(e, t, void 0, g, n, 1) | |
} | |
function s() { | |
return "__mod__" + m++ | |
} | |
function l(e, t) { | |
e.waitingMap[t] || e.id === t || (e.waiting++, e.waitingMap[t] = 1, h[t] || (h[t] = {}), h[t][e.id] = 1) | |
} | |
function u(e) { | |
var t, n, o, i = [], | |
a = p[e]; | |
for (n = 0; n < a.dependencies.length; n++) | |
if (t = a.dependencies[n], p[t]) { | |
if (p[t].waiting) | |
for (o in p[t].waitingMap) p[t].waitingMap[o] && l(a, o) | |
} else l(a, t); | |
if (0 === a.waiting && a.special & g && i.push(e), h[e]) { | |
var s, u = h[e]; | |
h[e] = void 0; | |
for (t in u) { | |
s = p[t]; | |
for (o in a.waitingMap) a.waitingMap[o] && l(s, o); | |
s.waitingMap[e] && (s.waitingMap[e] = void 0, s.waiting--), 0 === s.waiting && s.special & g && i.push(t) | |
} | |
} | |
for (n = 0; n < i.length; n++) r(i[n]) | |
} | |
function c(e, t) { | |
p[e] = { | |
id: e | |
}, p[e].exports = t | |
} | |
if (!e.require) { | |
var d = Object.prototype.toString, | |
p = {}, | |
h = {}, | |
f = {}, | |
m = 0, | |
g = 1, | |
_ = 2, | |
y = Object.prototype.hasOwnProperty; | |
c("module", 0), c("exports", 0), c("define", o), c("global", e), c("require", r), c("requireDynamic", r), c("requireLazy", a), e.require = r, e.requireDynamic = r, e.requireLazy = a, r.__debug = { | |
modules: p, | |
deps: h | |
}; | |
var v = function(e, t, n, r) { | |
o(e, t, n, r || _) | |
}; | |
e.__d = function(e, t, n, r) { | |
t = ["global", "require", "requireDynamic", "requireLazy", "module", "exports"].concat(t), v(e, t, n, r) | |
} | |
} | |
}(this), process = { | |
env: {} | |
}, process.env.NODE_ENV = "production", __d("RKMainBundle", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("Bundler"); | |
i.registerConfig([{ | |
appKey: "GroupsFeedApp", | |
component: function() { | |
return t("GroupsFeedApp") | |
} | |
}, { | |
appKey: "GroupsPermalinkApp", | |
component: function() { | |
return t("GroupsPermalinkApp") | |
} | |
}, { | |
appKey: "GroupsPendingPostsApp", | |
component: function() { | |
return t("GroupsPendingPostsApp") | |
} | |
}, { | |
appKey: "GroupsReportedPostsApp", | |
component: function() { | |
return t("GroupsReportedPostsApp") | |
} | |
}]), o.exports = i | |
}), __d("Bundler", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() {} | |
var a = t("invariant"), | |
s = t("renderApplication"); | |
__DEV__ && t("RKRenderingPerf"); | |
var l = {}; | |
i.registerConfig = function(e) { | |
for (var t = 0; t < e.length; ++t) e[t].run ? i.registerRunnable(e[t].appKey, e[t].run) : i.registerComponent(e[t].appKey, e[t].component) | |
}, i.registerComponent = function(e, t) { | |
return l[e] = { | |
run: function(e) { | |
return s(t(), e.initialProps, e.rootTag) | |
} | |
}, e | |
}, i.registerRunnable = function(e, t) { | |
return l[e] = { | |
run: t | |
}, e | |
}, i.runApplication = function(e, t) { | |
console.log('Running application "' + e + '" with appParams: ', t), l[e] && l[e].run || a(0, "Application " + e + " has not been registered."), l[e].run(t) | |
}, o.exports = i | |
}), __d("invariant", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = function(e, t, n, r, o, i, a, s) { | |
if (__DEV__ && void 0 === t) throw new Error("invariant requires an error message argument"); | |
if (!e) { | |
var l; | |
if (void 0 === t) l = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); | |
else { | |
var u = [n, r, o, i, a, s], | |
c = 0; | |
l = new Error("Invariant Violation: " + t.replace(/%s/g, function() { | |
return u[c++] | |
})) | |
} | |
throw l.framesToPop = 1, l | |
} | |
}; | |
o.exports = i | |
}), __d("renderApplication", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t, n) { | |
n || s(0, "Expect to have a valid rootTag, instead got ", n), a.render(a.createElement(e, Object.assign({}, t)), n) | |
} | |
var a = t("React"), | |
s = t("invariant"); | |
o.exports = i | |
}), __d("React", [], function(e, t, n, r, o) { | |
"use strict"; | |
o.exports = t("ReactIOS") | |
}), __d("ReactIOS", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("ReactComponent"), | |
a = t("ReactCompositeComponent"), | |
s = t("ReactContext"), | |
l = t("ReactCurrentOwner"), | |
u = t("ReactElement"), | |
c = t("ReactElementValidator"), | |
d = t("ReactInstanceHandles"), | |
p = t("ReactIOSDefaultInjection"), | |
h = t("ReactIOSMount"), | |
f = t("ReactLegacyElement"), | |
m = t("ReactPropTypes"), | |
g = t("deprecated"), | |
_ = t("invariant"); | |
p.inject(); | |
var y = u.createElement, | |
v = u.createFactory; | |
__DEV__ && (y = c.createElement, v = c.createFactory), y = f.wrapCreateElement(y), v = f.wrapCreateFactory(v); | |
var S = function(e) { | |
var t = e.type.defaultProps, | |
n = e.props; | |
for (var r in t) void 0 === n[r] && (n[r] = t[r]) | |
}, | |
w = function(e) { | |
return __DEV__ && _(0, "This optimized path should never be used in DEV mode because it does not provide validation. Check your JSX transform."), e._owner = l.current, e._context = s.current, e.type.defaultProps && S(e), e | |
}, | |
b = function(e, t) { | |
h.renderComponent(e, t) | |
}, | |
R = { | |
hasReactIOSInitialized: !1, | |
PropTypes: m, | |
createClass: a.createClass, | |
createElement: y, | |
createFactory: v, | |
_augmentElement: w, | |
render: b, | |
unmountComponentAtNode: h.unmountComponentAtNode, | |
__internals: { | |
Component: i, | |
CurrentOwner: l, | |
InstanceHandles: d, | |
Mount: h | |
}, | |
unmountComponentAtNodeAndRemoveContainer: h.unmountComponentAtNodeAndRemoveContainer, | |
isValidClass: u.isValidFactory, | |
isValidElement: u.isValidElement, | |
renderComponent: g("React", "renderComponent", "render", this, b), | |
isValidComponent: g("React", "isValidComponent", "isValidElement", this, u.isValidElement) | |
}; | |
o.exports = R | |
}), __d("ReactComponent", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("ReactElement"), | |
a = t("ReactOwner"), | |
s = t("ReactUpdates"), | |
l = t("invariant"), | |
u = t("keyMirror"), | |
c = u({ | |
MOUNTED: null, | |
UNMOUNTED: null | |
}), | |
d = !1, | |
p = null, | |
h = null, | |
f = { | |
injection: { | |
injectEnvironment: function(e) { | |
d && l(0, "ReactComponent: injectEnvironment() can only be called once."), h = e.mountImageIntoNode, p = e.unmountIDFromEnvironment, f.BackendIDOperations = e.BackendIDOperations, d = !0 | |
} | |
}, | |
LifeCycle: c, | |
BackendIDOperations: null, | |
Mixin: { | |
isMounted: function() { | |
return this._lifeCycleState === c.MOUNTED | |
}, | |
setProps: function(e, t) { | |
var n = this._pendingElement || this._currentElement; | |
this.replaceProps(Object.assign({}, n.props, e), t) | |
}, | |
replaceProps: function(e, t) { | |
this.isMounted() || l(0, "replaceProps(...): Can only update a mounted component."), 0 !== this._mountDepth && l(0, "replaceProps(...): You called `setProps` or `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."), this._pendingElement = i.cloneAndReplaceProps(this._pendingElement || this._currentElement, e), s.enqueueUpdate(this, t) | |
}, | |
_setPropsInternal: function(e, t) { | |
var n = this._pendingElement || this._currentElement; | |
this._pendingElement = i.cloneAndReplaceProps(n, Object.assign({}, n.props, e)), s.enqueueUpdate(this, t) | |
}, | |
construct: function(e) { | |
this.props = e.props, this._owner = e._owner, this._lifeCycleState = c.UNMOUNTED, this._pendingCallbacks = null, this._currentElement = e, this._pendingElement = null | |
}, | |
mountComponent: function(e, t, n) { | |
this.isMounted() && l(0, "mountComponent(%s, ...): Can only mount an unmounted component. Make sure to avoid storing components between renders or reusing a single component instance in multiple places.", e); | |
var r = this._currentElement.ref; | |
if (null != r) { | |
var o = this._currentElement._owner; | |
a.addComponentAsRefTo(this, r, o) | |
} | |
this._rootNodeID = e, this._lifeCycleState = c.MOUNTED, this._mountDepth = n | |
}, | |
unmountComponent: function() { | |
this.isMounted() || l(0, "unmountComponent(): Can only unmount a mounted component."); | |
var e = this._currentElement.ref; | |
null != e && a.removeComponentAsRefFrom(this, e, this._owner), p(this._rootNodeID), this._rootNodeID = null, this._lifeCycleState = c.UNMOUNTED | |
}, | |
receiveComponent: function(e, t) { | |
this.isMounted() || l(0, "receiveComponent(...): Can only update a mounted component."), this._pendingElement = e, this.performUpdateIfNecessary(t) | |
}, | |
performUpdateIfNecessary: function(e) { | |
if (null != this._pendingElement) { | |
var t = this._currentElement, | |
n = this._pendingElement; | |
this._currentElement = n, this.props = n.props, this._owner = n._owner, this._pendingElement = null, this.updateComponent(e, t) | |
} | |
}, | |
updateComponent: function(e, t) { | |
var n = this._currentElement; | |
(n._owner !== t._owner || n.ref !== t.ref) && (null != t.ref && a.removeComponentAsRefFrom(this, t.ref, t._owner), null != n.ref && a.addComponentAsRefTo(this, n.ref, n._owner)) | |
}, | |
mountComponentIntoNode: function(e, t, n) { | |
var r = s.ReactReconcileTransaction.getPooled(); | |
r.perform(this._mountComponentIntoNode, this, e, t, r, n), s.ReactReconcileTransaction.release(r) | |
}, | |
_mountComponentIntoNode: function(e, t, n, r) { | |
var o = this.mountComponent(e, n, 0); | |
h(o, t, r) | |
}, | |
isOwnedBy: function(e) { | |
return this._owner === e | |
}, | |
getSiblingByRef: function(e) { | |
var t = this._owner; | |
return t && t.refs ? t.refs[e] : null | |
} | |
} | |
}; | |
o.exports = f | |
}), __d("ReactElement", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t) { | |
Object.defineProperty(e, t, { | |
configurable: !1, | |
enumerable: !0, | |
get: function() { | |
return this._store ? this._store[t] : null | |
}, | |
set: function(e) { | |
u(!1, "Don't set the " + t + " property of the component. Mutate the existing props object instead."), this._store[t] = e | |
} | |
}) | |
} | |
function a(e) { | |
try { | |
var t = { | |
props: !0 | |
}; | |
for (var n in t) i(e, n); | |
d = !0 | |
} catch (r) {} | |
} | |
var s = t("ReactContext"), | |
l = t("ReactCurrentOwner"), | |
u = t("warning"), | |
c = { | |
key: !0, | |
ref: !0 | |
}, | |
d = !1, | |
p = function(e, t, n, r, o, i) { | |
return this.type = e, this.key = t, this.ref = n, this._owner = r, this._context = o, __DEV__ && (this._store = { | |
validated: !1, | |
props: i | |
}, d) ? void Object.freeze(this) : void(this.props = i) | |
}; | |
__DEV__ && a(p.prototype), p.prototype._isReactElement = !0, p.createElement = function(e, t, n) { | |
var r, o = {}, | |
i = null, | |
a = null; | |
if (null != t) { | |
a = void 0 === t.ref ? null : t.ref, i = void 0 === t.key ? null : "" + t.key; | |
for (r in t) t.hasOwnProperty(r) && !c.hasOwnProperty(r) && (o[r] = t[r]) | |
} | |
var u = arguments.length - 2; | |
if (1 === u) o.children = n; | |
else if (u > 1) { | |
for (var d = Array(u), h = 0; u > h; h++) d[h] = arguments[h + 2]; | |
o.children = d | |
} | |
if (e.defaultProps) { | |
var f = e.defaultProps; | |
for (r in f) "undefined" == typeof o[r] && (o[r] = f[r]) | |
} | |
return new p(e, i, a, l.current, s.current, o) | |
}, p.createFactory = function(e) { | |
var t = p.createElement.bind(null, e); | |
return t.type = e, t | |
}, p.cloneAndReplaceProps = function(e, t) { | |
var n = new p(e.type, e.key, e.ref, e._owner, e._context, t); | |
return __DEV__ && (n._store.validated = e._store.validated), n | |
}, p.isValidElement = function(e) { | |
var t = !(!e || !e._isReactElement); | |
return t | |
}, o.exports = p | |
}), __d("ReactContext", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = { | |
current: {}, | |
withContext: function(e, t) { | |
var n, r = i.current; | |
i.current = Object.assign({}, r, e); | |
try { | |
n = t() | |
} finally { | |
i.current = r | |
} | |
return n | |
} | |
}; | |
o.exports = i | |
}), __d("ReactCurrentOwner", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = { | |
current: null | |
}; | |
o.exports = i | |
}), __d("warning", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("emptyFunction"), | |
a = i; | |
__DEV__ && (a = function(e, t) { | |
for (var n = [], r = 2, o = arguments.length; o > r; r++) n.push(arguments[r]); | |
if (void 0 === t) throw new Error("`warning(condition, format, ...args)` requires a warning message argument"); | |
if (!e) { | |
var i = 0; | |
console.warn("Warning: " + t.replace(/%s/g, function() { | |
return n[i++] | |
})) | |
} | |
}), o.exports = a | |
}), __d("emptyFunction", [], function(e, t, n, r, o) { | |
function i(e) { | |
return function() { | |
return e | |
} | |
} | |
function a() {} | |
Object.assign(a, { | |
thatReturns: i, | |
thatReturnsFalse: i(!1), | |
thatReturnsTrue: i(!0), | |
thatReturnsNull: i(null), | |
thatReturnsThis: function() { | |
return this | |
}, | |
thatReturnsArgument: function(e) { | |
return e | |
} | |
}), o.exports = a | |
}), __d("ReactOwner", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("emptyObject"), | |
a = t("invariant"), | |
s = { | |
isValidOwner: function(e) { | |
return !(!e || "function" != typeof e.attachRef || "function" != typeof e.detachRef) | |
}, | |
addComponentAsRefTo: function(e, t, n) { | |
s.isValidOwner(n) || a(0, "addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."), n.attachRef(t, e) | |
}, | |
removeComponentAsRefFrom: function(e, t, n) { | |
s.isValidOwner(n) || a(0, "removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This usually means that you're trying to remove a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."), n.refs[t] === e && n.detachRef(t) | |
}, | |
Mixin: { | |
construct: function() { | |
this.refs = i | |
}, | |
attachRef: function(e, t) { | |
t.isOwnedBy(this) || a(0, "attachRef(%s, ...): Only a component's owner can store a ref to it.", e); | |
var n = this.refs === i ? this.refs = {} : this.refs; | |
n[e] = t | |
}, | |
detachRef: function(e) { | |
delete this.refs[e] | |
} | |
} | |
}; | |
o.exports = s | |
}), __d("emptyObject", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = {}; | |
__DEV__ && Object.freeze(i), o.exports = i | |
}), __d("ReactUpdates", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() { | |
F.ReactReconcileTransaction && b || _(0, "ReactUpdates: must inject a reconcile transaction class and batching strategy") | |
} | |
function a() { | |
this.reinitializeTransaction(), this.dirtyComponentsLength = null, this.callbackQueue = p.getPooled(), this.reconcileTransaction = F.ReactReconcileTransaction.getPooled() | |
} | |
function s(e, t, n) { | |
i(), b.batchedUpdates(e, t, n) | |
} | |
function l(e, t) { | |
return e._mountDepth - t._mountDepth | |
} | |
function u(e) { | |
var t = e.dirtyComponentsLength; | |
t !== v.length && _(0, "Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).", t, v.length), v.sort(l); | |
for (var n = 0; t > n; n++) { | |
var r = v[n]; | |
if (r.isMounted()) { | |
var o = r._pendingCallbacks; | |
if (r._pendingCallbacks = null, r.performUpdateIfNecessary(e.reconcileTransaction), o) | |
for (var i = 0; i < o.length; i++) e.callbackQueue.enqueue(o[i], r) | |
} | |
} | |
} | |
function c(e, t) { | |
return t && "function" != typeof t && _(0, "enqueueUpdate(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."), i(), y(null == f.current, "enqueueUpdate(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."), b.isBatchingUpdates ? (v.push(e), void(t && (e._pendingCallbacks ? e._pendingCallbacks.push(t) : e._pendingCallbacks = [t]))) : void b.batchedUpdates(c, e, t) | |
} | |
function d(e, t) { | |
b.isBatchingUpdates || _(0, "ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."), S.enqueue(e, t), w = !0 | |
} | |
var p = t("CallbackQueue"), | |
h = t("PooledClass"), | |
f = t("ReactCurrentOwner"), | |
m = t("ReactPerf"), | |
g = t("Transaction"), | |
_ = t("invariant"), | |
y = t("warning"), | |
v = [], | |
S = p.getPooled(), | |
w = !1, | |
b = null, | |
R = { | |
initialize: function() { | |
this.dirtyComponentsLength = v.length | |
}, | |
close: function() { | |
this.dirtyComponentsLength !== v.length ? (v.splice(0, this.dirtyComponentsLength), D()) : v.length = 0 | |
} | |
}, | |
C = { | |
initialize: function() { | |
this.callbackQueue.reset() | |
}, | |
close: function() { | |
this.callbackQueue.notifyAll() | |
} | |
}, | |
E = [R, C]; | |
Object.assign(a.prototype, g.Mixin, { | |
getTransactionWrappers: function() { | |
return E | |
}, | |
destructor: function() { | |
this.dirtyComponentsLength = null, p.release(this.callbackQueue), this.callbackQueue = null, F.ReactReconcileTransaction.release(this.reconcileTransaction), this.reconcileTransaction = null | |
}, | |
perform: function(e, t, n) { | |
return g.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, e, t, n) | |
} | |
}), h.addPoolingTo(a); | |
var D = m.measure("ReactUpdates", "flushBatchedUpdates", function() { | |
for (; v.length || w;) { | |
if (v.length) { | |
var e = a.getPooled(); | |
e.perform(u, null, e), a.release(e) | |
} | |
if (w) { | |
w = !1; | |
var t = S; | |
S = p.getPooled(), t.notifyAll(), p.release(t) | |
} | |
} | |
}), | |
x = { | |
injectReconcileTransaction: function(e) { | |
e || _(0, "ReactUpdates: must provide a reconcile transaction class"), F.ReactReconcileTransaction = e | |
}, | |
injectBatchingStrategy: function(e) { | |
e || _(0, "ReactUpdates: must provide a batching strategy"), "function" != typeof e.batchedUpdates && _(0, "ReactUpdates: must provide a batchedUpdates() function"), "boolean" != typeof e.isBatchingUpdates && _(0, "ReactUpdates: must provide an isBatchingUpdates boolean attribute"), b = e | |
} | |
}, | |
F = { | |
ReactReconcileTransaction: null, | |
batchedUpdates: s, | |
enqueueUpdate: c, | |
flushBatchedUpdates: D, | |
injection: x, | |
asap: d | |
}; | |
o.exports = F | |
}), __d("CallbackQueue", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() { | |
this._callbacks = null, this._contexts = null | |
} | |
var a = t("PooledClass"), | |
s = t("invariant"); | |
Object.assign(i.prototype, { | |
enqueue: function(e, t) { | |
this._callbacks = this._callbacks || [], this._contexts = this._contexts || [], this._callbacks.push(e), this._contexts.push(t) | |
}, | |
notifyAll: function() { | |
var e = this._callbacks, | |
t = this._contexts; | |
if (e) { | |
e.length !== t.length && s(0, "Mismatched list of contexts in callback queue"), this._callbacks = null, this._contexts = null; | |
for (var n = 0, r = e.length; r > n; n++) e[n].call(t[n]); | |
e.length = 0, t.length = 0 | |
} | |
}, | |
reset: function() { | |
this._callbacks = null, this._contexts = null | |
}, | |
destructor: function() { | |
this.reset() | |
} | |
}), a.addPoolingTo(i), o.exports = i | |
}), __d("PooledClass", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("invariant"), | |
a = function(e) { | |
var t = this; | |
if (t.instancePool.length) { | |
var n = t.instancePool.pop(); | |
return t.call(n, e), n | |
} | |
return new t(e) | |
}, | |
s = function(e, t) { | |
var n = this; | |
if (n.instancePool.length) { | |
var r = n.instancePool.pop(); | |
return n.call(r, e, t), r | |
} | |
return new n(e, t) | |
}, | |
l = function(e, t, n) { | |
var r = this; | |
if (r.instancePool.length) { | |
var o = r.instancePool.pop(); | |
return r.call(o, e, t, n), o | |
} | |
return new r(e, t, n) | |
}, | |
u = function(e, t, n, r, o) { | |
var i = this; | |
if (i.instancePool.length) { | |
var a = i.instancePool.pop(); | |
return i.call(a, e, t, n, r, o), a | |
} | |
return new i(e, t, n, r, o) | |
}, | |
c = function(e) { | |
var t = this; | |
e instanceof t || i(0, "Trying to release an instance into a pool of a different type."), e.destructor && e.destructor(), t.instancePool.length < t.poolSize && t.instancePool.push(e) | |
}, | |
d = 10, | |
p = a, | |
h = function(e, t) { | |
var n = e; | |
return n.instancePool = [], n.getPooled = t || p, n.poolSize || (n.poolSize = d), n.release = c, n | |
}, | |
f = { | |
addPoolingTo: h, | |
oneArgumentPooler: a, | |
twoArgumentPooler: s, | |
threeArgumentPooler: l, | |
fiveArgumentPooler: u | |
}; | |
o.exports = f | |
}), __d("ReactPerf", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t, n) { | |
return n | |
} | |
var a = { | |
enableMeasure: !1, | |
storedMeasure: i, | |
measure: function(e, t, n) { | |
if (__DEV__) { | |
var r = null, | |
o = function() { | |
return a.enableMeasure ? (r || (r = a.storedMeasure(e, t, n)), r.apply(this, arguments)) : n.apply(this, arguments) | |
}; | |
return o.displayName = e + "_" + t, o | |
} | |
return n | |
}, | |
injection: { | |
injectMeasure: function(e) { | |
a.storedMeasure = e | |
} | |
} | |
}; | |
o.exports = a | |
}), __d("Transaction", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("invariant"), | |
a = { | |
reinitializeTransaction: function() { | |
this.transactionWrappers = this.getTransactionWrappers(), this.wrapperInitData ? this.wrapperInitData.length = 0 : this.wrapperInitData = [], this._isInTransaction = !1 | |
}, | |
_isInTransaction: !1, | |
getTransactionWrappers: null, | |
isInTransaction: function() { | |
return !!this._isInTransaction | |
}, | |
perform: function(e, t, n, r, o, a, s, l) { | |
this.isInTransaction() && i(0, "Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction."); | |
var u, c; | |
try { | |
this._isInTransaction = !0, u = !0, this.initializeAll(0), c = e.call(t, n, r, o, a, s, l), u = !1 | |
} finally { | |
try { | |
if (u) try { | |
this.closeAll(0) | |
} catch (d) {} else this.closeAll(0) | |
} finally { | |
this._isInTransaction = !1 | |
} | |
} | |
return c | |
}, | |
initializeAll: function(e) { | |
for (var t = this.transactionWrappers, n = e; n < t.length; n++) { | |
var r = t[n]; | |
try { | |
this.wrapperInitData[n] = s.OBSERVED_ERROR, this.wrapperInitData[n] = r.initialize ? r.initialize.call(this) : null | |
} finally { | |
if (this.wrapperInitData[n] === s.OBSERVED_ERROR) try { | |
this.initializeAll(n + 1) | |
} catch (o) {} | |
} | |
} | |
}, | |
closeAll: function(e) { | |
this.isInTransaction() || i(0, "Transaction.closeAll(): Cannot close transaction when none are open."); | |
for (var t = this.transactionWrappers, n = e; n < t.length; n++) { | |
var r, o = t[n], | |
a = this.wrapperInitData[n]; | |
try { | |
r = !0, a !== s.OBSERVED_ERROR && o.close && o.close.call(this, a), r = !1 | |
} finally { | |
if (r) try { | |
this.closeAll(n + 1) | |
} catch (l) {} | |
} | |
} | |
this.wrapperInitData.length = 0 | |
} | |
}, | |
s = { | |
Mixin: a, | |
OBSERVED_ERROR: {} | |
}; | |
o.exports = s | |
}), __d("keyMirror", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("invariant"), | |
a = function(e) { | |
var t, n = {}; | |
e instanceof Object && !Array.isArray(e) || i(0, "keyMirror(...): Argument must be an object."); | |
for (t in e) e.hasOwnProperty(t) && (n[t] = t); | |
return n | |
}; | |
o.exports = a | |
}), __d("ReactCompositeComponent", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e) { | |
var t = e._owner || null; | |
return t && t.constructor && t.constructor.displayName ? " Check the render method of `" + t.constructor.displayName + "`." : "" | |
} | |
function a(e, t, n) { | |
for (var r in t) t.hasOwnProperty(r) && "function" != typeof t[r] && I(0, "%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.", e.displayName || "ReactCompositeComponent", D[n], r) | |
} | |
function s(e, t) { | |
var n = G.hasOwnProperty(t) ? G[t] : null; | |
U.hasOwnProperty(t) && n !== O.OVERRIDE_BASE && I(0, "ReactCompositeComponentInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.", t), e.hasOwnProperty(t) && n !== O.DEFINE_MANY && n !== O.DEFINE_MANY_MERGED && I(0, "ReactCompositeComponentInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.", t) | |
} | |
function l(e) { | |
var t = e._compositeLifeCycleState; | |
e.isMounted() || t === B.MOUNTING || I(0, "replaceState(...): Can only update a mounted or mounting component."), null != g.current && I(0, "replaceState(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."), t === B.UNMOUNTING && I(0, "replaceState(...): Cannot update while unmounting component. This usually means you called setState() on an unmounted component.") | |
} | |
function u(e, t) { | |
if (t) { | |
w.isValidFactory(t) && I(0, "ReactCompositeComponent: You're attempting to use a component class as a mixin. Instead, just use a regular object."), _.isValidElement(t) && I(0, "ReactCompositeComponent: You're attempting to use a component as a mixin. Instead, just use a regular object."); | |
var n = e.prototype; | |
t.hasOwnProperty(Q) && $.mixins(e, t.mixins); | |
for (var r in t) | |
if (t.hasOwnProperty(r) && r !== Q) { | |
var o = t[r]; | |
if (s(n, r), $.hasOwnProperty(r)) $[r](e, o); | |
else { | |
var i = G.hasOwnProperty(r), | |
a = n.hasOwnProperty(r), | |
l = o && o.__reactDontBind, | |
u = "function" == typeof o, | |
c = u && !i && !a && !l; | |
if (c) n.__reactAutoBindMap || (n.__reactAutoBindMap = {}), n.__reactAutoBindMap[r] = o, n[r] = o; | |
else if (a) { | |
var d = G[r]; | |
(!i || d !== O.DEFINE_MANY_MERGED && d !== O.DEFINE_MANY) && I(0, "ReactCompositeComponent: Unexpected spec policy %s for key %s when mixing in component specs.", d, r), d === O.DEFINE_MANY_MERGED ? n[r] = p(n[r], o) : d === O.DEFINE_MANY && (n[r] = h(n[r], o)) | |
} else n[r] = o, __DEV__ && "function" == typeof o && t.displayName && (n[r].displayName = t.displayName + "_" + r) | |
} | |
} | |
} | |
} | |
function c(e, t) { | |
if (t) | |
for (var n in t) { | |
var r = t[n]; | |
if (t.hasOwnProperty(n)) { | |
var o = n in $; | |
o && I(0, 'ReactCompositeComponent: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', n); | |
var i = n in e; | |
i && I(0, "ReactCompositeComponent: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.", n), e[n] = r | |
} | |
} | |
} | |
function d(e, t) { | |
return e && t && "object" == typeof e && "object" == typeof t || I(0, "mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects"), k(t, function(t, n) { | |
void 0 !== e[n] && I(0, "mergeObjectsWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.", n), e[n] = t | |
}), e | |
} | |
function p(e, t) { | |
return function() { | |
var n = e.apply(this, arguments), | |
r = t.apply(this, arguments); | |
return null == n ? r : null == r ? n : d(n, r) | |
} | |
} | |
function h(e, t) { | |
return function() { | |
e.apply(this, arguments), t.apply(this, arguments) | |
} | |
} | |
var f = t("ReactComponent"), | |
m = t("ReactContext"), | |
g = t("ReactCurrentOwner"), | |
_ = t("ReactElement"), | |
y = t("ReactElementValidator"), | |
v = t("ReactEmptyComponent"), | |
S = t("ReactErrorUtils"), | |
w = t("ReactLegacyElement"), | |
b = t("ReactOwner"), | |
R = t("ReactPerf"), | |
C = t("ReactPropTransferer"), | |
E = t("ReactPropTypeLocations"), | |
D = t("ReactPropTypeLocationNames"), | |
x = t("ReactUpdates"), | |
F = t("instantiateReactComponent"), | |
I = t("invariant"), | |
T = t("keyMirror"), | |
P = t("keyOf"), | |
L = t("monitorCodeUse"), | |
k = t("mapObject"), | |
M = t("shouldUpdateReactComponent"), | |
A = t("warning"), | |
Q = P({ | |
mixins: null | |
}), | |
O = T({ | |
DEFINE_ONCE: null, | |
DEFINE_MANY: null, | |
OVERRIDE_BASE: null, | |
DEFINE_MANY_MERGED: null | |
}), | |
N = [], | |
G = { | |
mixins: O.DEFINE_MANY, | |
statics: O.DEFINE_MANY, | |
propTypes: O.DEFINE_MANY, | |
contextTypes: O.DEFINE_MANY, | |
childContextTypes: O.DEFINE_MANY, | |
getDefaultProps: O.DEFINE_MANY_MERGED, | |
getInitialState: O.DEFINE_MANY_MERGED, | |
getChildContext: O.DEFINE_MANY_MERGED, | |
render: O.DEFINE_ONCE, | |
componentWillMount: O.DEFINE_MANY, | |
componentDidMount: O.DEFINE_MANY, | |
componentWillReceiveProps: O.DEFINE_MANY, | |
shouldComponentUpdate: O.DEFINE_ONCE, | |
componentWillUpdate: O.DEFINE_MANY, | |
componentDidUpdate: O.DEFINE_MANY, | |
componentWillUnmount: O.DEFINE_MANY, | |
updateComponent: O.OVERRIDE_BASE | |
}, | |
$ = { | |
displayName: function(e, t) { | |
e.displayName = t | |
}, | |
mixins: function(e, t) { | |
if (t) | |
for (var n = 0; n < t.length; n++) u(e, t[n]) | |
}, | |
childContextTypes: function(e, t) { | |
a(e, t, E.childContext), e.childContextTypes = Object.assign({}, e.childContextTypes, t) | |
}, | |
contextTypes: function(e, t) { | |
a(e, t, E.context), e.contextTypes = Object.assign({}, e.contextTypes, t) | |
}, | |
getDefaultProps: function(e, t) { | |
e.getDefaultProps = e.getDefaultProps ? p(e.getDefaultProps, t) : t | |
}, | |
propTypes: function(e, t) { | |
a(e, t, E.prop), e.propTypes = Object.assign({}, e.propTypes, t) | |
}, | |
statics: function(e, t) { | |
c(e, t) | |
} | |
}, | |
B = T({ | |
MOUNTING: null, | |
UNMOUNTING: null, | |
RECEIVING_PROPS: null | |
}), | |
U = { | |
construct: function() { | |
f.Mixin.construct.apply(this, arguments), b.Mixin.construct.apply(this, arguments), this.state = null, this._pendingState = null, this.context = null, this._compositeLifeCycleState = null | |
}, | |
isMounted: function() { | |
return f.Mixin.isMounted.call(this) && this._compositeLifeCycleState !== B.MOUNTING | |
}, | |
mountComponent: R.measure("ReactCompositeComponent", "mountComponent", function(e, t, n) { | |
f.Mixin.mountComponent.call(this, e, t, n), this._compositeLifeCycleState = B.MOUNTING, this.__reactAutoBindMap && this._bindAutoBindMethods(), this.context = this._processContext(this._currentElement._context), this.props = this._processProps(this.props), this.state = this.getInitialState ? this.getInitialState() : null, ("object" != typeof this.state || Array.isArray(this.state)) && I(0, "%s.getInitialState(): must return an object or null", this.constructor.displayName || "ReactCompositeComponent"), this._pendingState = null, this._pendingForceUpdate = !1, this.componentWillMount && (this.componentWillMount(), this._pendingState && (this.state = this._pendingState, this._pendingState = null)), this._renderedComponent = F(this._renderValidatedComponent(), this._currentElement.type), this._compositeLifeCycleState = null; | |
var r = this._renderedComponent.mountComponent(e, t, n + 1); | |
return this.componentDidMount && t.getReactMountReady().enqueue(this.componentDidMount, this), r | |
}), | |
unmountComponent: function() { | |
this._compositeLifeCycleState = B.UNMOUNTING, this.componentWillUnmount && this.componentWillUnmount(), this._compositeLifeCycleState = null, this._renderedComponent.unmountComponent(), this._renderedComponent = null, f.Mixin.unmountComponent.call(this) | |
}, | |
setState: function(e, t) { | |
"object" != typeof e && null != e && I(0, "setState(...): takes an object of state variables to update."), __DEV__ && A(null != e, "setState(...): You passed an undefined or null state object; instead, use forceUpdate()."), this.replaceState(Object.assign({}, this._pendingState || this.state, e), t) | |
}, | |
replaceState: function(e, t) { | |
l(this), this._pendingState = e, this._compositeLifeCycleState !== B.MOUNTING && x.enqueueUpdate(this, t) | |
}, | |
_processContext: function(e) { | |
var t = null, | |
n = this.constructor.contextTypes; | |
if (n) { | |
t = {}; | |
for (var r in n) t[r] = e[r]; | |
__DEV__ && this._checkPropTypes(n, t, E.context) | |
} | |
return t | |
}, | |
_processChildContext: function(e) { | |
var t = this.getChildContext && this.getChildContext(), | |
n = this.constructor.displayName || "ReactCompositeComponent"; | |
if (t) { | |
"object" != typeof this.constructor.childContextTypes && I(0, "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", n), __DEV__ && this._checkPropTypes(this.constructor.childContextTypes, t, E.childContext); | |
for (var r in t) r in this.constructor.childContextTypes || I(0, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', n, r); | |
return Object.assign({}, e, t) | |
} | |
return e | |
}, | |
_processProps: function(e) { | |
if (__DEV__) { | |
var t = this.constructor.propTypes; | |
t && this._checkPropTypes(t, e, E.prop) | |
} | |
return e | |
}, | |
_checkPropTypes: function(e, t, n) { | |
var r = this.constructor.displayName; | |
for (var o in e) | |
if (e.hasOwnProperty(o)) { | |
var a = e[o](t, o, r, n); | |
if (a instanceof Error) { | |
var s = i(this); | |
A(!1, a.message + s) | |
} | |
} | |
}, | |
performUpdateIfNecessary: function(e) { | |
var t = this._compositeLifeCycleState; | |
if (t !== B.MOUNTING && t !== B.RECEIVING_PROPS && (null != this._pendingElement || null != this._pendingState || this._pendingForceUpdate)) { | |
var n = this.context, | |
r = this.props, | |
o = this._currentElement; | |
null != this._pendingElement && (o = this._pendingElement, n = this._processContext(o._context), r = this._processProps(o.props), this._pendingElement = null, this._compositeLifeCycleState = B.RECEIVING_PROPS, this.componentWillReceiveProps && this.componentWillReceiveProps(r, n)), this._compositeLifeCycleState = null; | |
var i = this._pendingState || this.state; | |
this._pendingState = null; | |
var a = this._pendingForceUpdate || !this.shouldComponentUpdate || this.shouldComponentUpdate(r, i, n); | |
__DEV__ && "undefined" == typeof a && console.warn((this.constructor.displayName || "ReactCompositeComponent") + ".shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false."), a ? (this._pendingForceUpdate = !1, this._performComponentUpdate(o, r, i, n, e)) : (this._currentElement = o, this.props = r, this.state = i, this.context = n, this._owner = o._owner) | |
} | |
}, | |
_performComponentUpdate: function(e, t, n, r, o) { | |
var i = this._currentElement, | |
a = this.props, | |
s = this.state, | |
l = this.context; | |
this.componentWillUpdate && this.componentWillUpdate(t, n, r), this._currentElement = e, this.props = t, this.state = n, this.context = r, this._owner = e._owner, this.updateComponent(o, i), this.componentDidUpdate && o.getReactMountReady().enqueue(this.componentDidUpdate.bind(this, a, s, l), this) | |
}, | |
receiveComponent: function(e, t) { | |
(e !== this._currentElement || null == e._owner) && f.Mixin.receiveComponent.call(this, e, t) | |
}, | |
updateComponent: R.measure("ReactCompositeComponent", "updateComponent", function(e, t) { | |
f.Mixin.updateComponent.call(this, e, t); | |
var n = this._renderedComponent, | |
r = n._currentElement, | |
o = this._renderValidatedComponent(); | |
if (M(r, o)) n.receiveComponent(o, e); | |
else { | |
var i = this._rootNodeID, | |
a = n._rootNodeID; | |
n.unmountComponent(), this._renderedComponent = F(o, this._currentElement.type); | |
var s = this._renderedComponent.mountComponent(i, e, this._mountDepth + 1); | |
f.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(a, s) | |
} | |
}), | |
forceUpdate: function(e) { | |
var t = this._compositeLifeCycleState; | |
this.isMounted() || t === B.MOUNTING || I(0, "forceUpdate(...): Can only force an update on mounted or mounting components."), (t === B.UNMOUNTING || null != g.current) && I(0, "forceUpdate(...): Cannot force an update while unmounting component or within a `render` function."), this._pendingForceUpdate = !0, x.enqueueUpdate(this, e) | |
}, | |
_renderValidatedComponent: R.measure("ReactCompositeComponent", "_renderValidatedComponent", function() { | |
var e, t = m.current; | |
m.current = this._processChildContext(this._currentElement._context), g.current = this; | |
try { | |
e = this.render(), null === e || e === !1 ? (e = v.getEmptyComponent(), v.registerNullComponentID(this._rootNodeID)) : v.deregisterNullComponentID(this._rootNodeID) | |
} finally { | |
m.current = t, g.current = null | |
} | |
return _.isValidElement(e) || I(0, "%s.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.", this.constructor.displayName || "ReactCompositeComponent"), e | |
}), | |
_bindAutoBindMethods: function() { | |
for (var e in this.__reactAutoBindMap) | |
if (this.__reactAutoBindMap.hasOwnProperty(e)) { | |
var t = this.__reactAutoBindMap[e]; | |
this[e] = this._bindAutoBindMethod(S.guard(t, this.constructor.displayName + "." + e)) | |
} | |
}, | |
_bindAutoBindMethod: function(e) { | |
var t = this, | |
n = e.bind(t); | |
if (__DEV__) { | |
n.__reactBoundContext = t, n.__reactBoundMethod = e, n.__reactBoundArguments = null; | |
var r = t.constructor.displayName, | |
o = n.bind; | |
n.bind = function(i) { | |
for (var a = [], s = 1, l = arguments.length; l > s; s++) a.push(arguments[s]); | |
if (i !== t && null !== i) L("react_bind_warning", { | |
component: r | |
}), console.warn("bind(): React component methods may only be bound to the component instance. See " + r); | |
else if (!a.length) return L("react_bind_warning", { | |
component: r | |
}), console.warn("bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See " + r), n; | |
var u = o.apply(n, arguments); | |
return u.__reactBoundContext = t, u.__reactBoundMethod = e, u.__reactBoundArguments = a, u | |
} | |
} | |
return n | |
} | |
}, | |
V = function() {}; | |
Object.assign(V.prototype, f.Mixin, b.Mixin, C.Mixin, U); | |
var q = { | |
LifeCycle: B, | |
Base: V, | |
createClass: function(e) { | |
var t = function() {}; | |
t.prototype = new V, t.prototype.constructor = t, N.forEach(u.bind(null, t)), u(t, e), t.getDefaultProps && (t.defaultProps = t.getDefaultProps()), t.prototype.render || I(0, "createClass(...): Class specification must implement a `render` method."), __DEV__ && t.prototype.componentShouldUpdate && (L("react_component_should_update_warning", { | |
component: e.displayName | |
}), console.warn((e.displayName || "A component") + " has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.")); | |
for (var n in G) t.prototype[n] || (t.prototype[n] = null); | |
return w.wrapFactory(__DEV__ ? y.createFactory(t) : _.createFactory(t)) | |
}, | |
injection: { | |
injectMixin: function(e) { | |
N.push(e) | |
} | |
} | |
}; | |
o.exports = q | |
}), __d("ReactElementValidator", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() { | |
var e = f.current; | |
return e && e.constructor.displayName || void 0 | |
} | |
function a(e, t) { | |
e._store.validated || null != e.key || (e._store.validated = !0, l("react_key_warning", 'Each child in an array should have a unique "key" prop.', e, t)) | |
} | |
function s(e, t, n) { | |
v.test(e) && l("react_numeric_key_warning", "Child objects should have non-numeric keys so ordering is preserved.", t, n) | |
} | |
function l(e, t, n, r) { | |
var o = i(), | |
a = r.displayName, | |
s = o || a, | |
l = g[e]; | |
if (!l.hasOwnProperty(s)) { | |
l[s] = !0, t += o ? " Check the render method of " + o + "." : " Check the renderComponent call using <" + a + ">."; | |
var u = null; | |
n._owner && n._owner !== f.current && (u = n._owner.constructor.displayName, t += " It was passed a child from " + u + "."), t += " See http://fb.me/react-warning-keys for more information.", m(e, { | |
component: s, | |
componentOwner: u | |
}), console.warn(t) | |
} | |
} | |
function u() { | |
var e = i() || ""; | |
_.hasOwnProperty(e) || (_[e] = !0, m("react_object_map_children")) | |
} | |
function c(e, t) { | |
if (Array.isArray(e)) | |
for (var n = 0; n < e.length; n++) { | |
var r = e[n]; | |
p.isValidElement(r) && a(r, t) | |
} else if (p.isValidElement(e)) e._store.validated = !0; | |
else if (e && "object" == typeof e) { | |
u(); | |
for (var o in e) s(o, e[o], t) | |
} | |
} | |
function d(e, t, n, r) { | |
for (var o in t) | |
if (t.hasOwnProperty(o)) { | |
var i; | |
try { | |
i = t[o](n, o, e, r) | |
} catch (a) { | |
i = a | |
} | |
i instanceof Error && !(i.message in y) && (y[i.message] = !0, m("react_failed_descriptor_type_check", { | |
message: i.message | |
})) | |
} | |
} | |
var p = t("ReactElement"), | |
h = t("ReactPropTypeLocations"), | |
f = t("ReactCurrentOwner"), | |
m = t("monitorCodeUse"), | |
g = { | |
react_key_warning: {}, | |
react_numeric_key_warning: {} | |
}, | |
_ = {}, | |
y = {}, | |
v = /^\d+$/, | |
S = { | |
createElement: function(e) { | |
var t = p.createElement.apply(this, arguments); | |
if (null == t) return t; | |
for (var n = 2; n < arguments.length; n++) c(arguments[n], e); | |
var r = e.displayName; | |
return e.propTypes && d(r, e.propTypes, t.props, h.prop), e.contextTypes && d(r, e.contextTypes, t._context, h.context), t | |
}, | |
createFactory: function(e) { | |
var t = S.createElement.bind(null, e); | |
return t.type = e, t | |
} | |
}; | |
o.exports = S | |
}), __d("ReactPropTypeLocations", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("keyMirror"), | |
a = i({ | |
prop: null, | |
context: null, | |
childContext: null | |
}); | |
o.exports = a | |
}), __d("monitorCodeUse", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e) { | |
(!e || /[^a-z0-9_]/.test(e)) && a(0, "You must provide an eventName using only the characters [a-z0-9_]") | |
} | |
var a = t("invariant"); | |
o.exports = i | |
}), __d("ReactEmptyComponent", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() { | |
return u || d(0, "Trying to return null from a render, but no null placeholder component was injected."), u() | |
} | |
function a(e) { | |
p[e] = !0 | |
} | |
function s(e) { | |
delete p[e] | |
} | |
function l(e) { | |
return p[e] | |
} | |
var u, c = t("ReactElement"), | |
d = t("invariant"), | |
p = {}, | |
h = { | |
injectEmptyComponent: function(e) { | |
u = c.createFactory(e) | |
} | |
}, | |
f = { | |
deregisterNullComponentID: s, | |
getEmptyComponent: i, | |
injection: h, | |
isNullComponentID: l, | |
registerNullComponentID: a | |
}; | |
o.exports = f | |
}), __d("ReactErrorUtils", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = { | |
guard: function(e) { | |
return e | |
} | |
}; | |
o.exports = i | |
}), __d("ReactLegacyElement", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() { | |
if (g._isLegacyCallWarningEnabled) { | |
var e = u.current, | |
t = e && e.constructor ? e.constructor.displayName : ""; | |
t || (t = "Something"), h.hasOwnProperty(t) || (h[t] = !0, p(!1, t + " is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory"), d("react_legacy_factory_call", { | |
version: 3, | |
name: t | |
})) | |
} | |
} | |
function a(e) { | |
var t = e.prototype && "function" == typeof e.prototype.mountComponent && "function" == typeof e.prototype.receiveComponent; | |
if (t) p(!1, "Did not expect to get a React class here. Use `Component` instead of `Component.type` or `this.constructor`."); | |
else { | |
if (!e._reactWarnedForThisType) { | |
try { | |
e._reactWarnedForThisType = !0 | |
} catch (n) {} | |
d("react_non_component_in_jsx", { | |
version: 3, | |
name: e.name | |
}) | |
} | |
p(!1, "This JSX uses a plain function. Only React components are valid in React's JSX transform.") | |
} | |
} | |
function s(e) { | |
p(!1, "Do not pass React.DOM." + e.type + ' to JSX or createFactory. Use the string "' + e + '" instead.') | |
} | |
function l(e, t) { | |
if ("function" == typeof t) | |
for (var n in t) | |
if (t.hasOwnProperty(n)) { | |
var r = t[n]; | |
if ("function" == typeof r) { | |
var o = r.bind(t); | |
for (var i in r) r.hasOwnProperty(i) && (o[i] = r[i]); | |
e[n] = o | |
} else e[n] = r | |
} | |
} | |
var u = t("ReactCurrentOwner"), | |
c = t("invariant"), | |
d = t("monitorCodeUse"), | |
p = t("warning"), | |
h = {}, | |
f = {}, | |
m = {}, | |
g = {}; | |
g.wrapCreateFactory = function(e) { | |
var t = function(t) { | |
return "function" != typeof t ? e(t) : t.isReactNonLegacyFactory ? (__DEV__ && s(t), e(t.type)) : t.isReactLegacyFactory ? e(t.type) : (__DEV__ && a(t), t) | |
}; | |
return t | |
}, g.wrapCreateElement = function(e) { | |
var t = function(t) { | |
if ("function" != typeof t) return e.apply(this, arguments); | |
var n; | |
return t.isReactNonLegacyFactory ? (__DEV__ && s(t), n = Array.prototype.slice.call(arguments, 0), n[0] = t.type, e.apply(this, n)) : t.isReactLegacyFactory ? (t._isMockFunction && (t.type._mockedReactClassConstructor = t), n = Array.prototype.slice.call(arguments, 0), n[0] = t.type, e.apply(this, n)) : (__DEV__ && a(t), t.apply(null, Array.prototype.slice.call(arguments, 1))) | |
}; | |
return t | |
}, g.wrapFactory = function(e) { | |
"function" != typeof e && c(0, "This is suppose to accept a element factory"); | |
var t = function() { | |
return __DEV__ && i(), e.apply(this, arguments) | |
}; | |
return l(t, e.type), t.isReactLegacyFactory = f, t.type = e.type, t | |
}, g.markNonLegacyFactory = function(e) { | |
return e.isReactNonLegacyFactory = m, e | |
}, g.isValidFactory = function(e) { | |
return "function" == typeof e && e.isReactLegacyFactory === f | |
}, g._isLegacyCallWarningEnabled = !0, o.exports = g | |
}), __d("ReactPropTransferer", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e) { | |
return function(t, n, r) { | |
t[n] = t.hasOwnProperty(n) ? e(t[n], r) : r | |
} | |
} | |
function a(e, t) { | |
for (var n in t) | |
if (t.hasOwnProperty(n)) { | |
var r = h[n]; | |
r && h.hasOwnProperty(n) ? r(e, n, t[n]) : e.hasOwnProperty(n) || (e[n] = t[n]) | |
} | |
return e | |
} | |
var s = t("emptyFunction"), | |
l = t("invariant"), | |
u = t("joinClasses"), | |
c = t("warning"), | |
d = !1, | |
p = i(function(e, t) { | |
return Object.assign({}, t, e) | |
}), | |
h = { | |
children: s, | |
className: i(u), | |
style: p | |
}, | |
f = { | |
TransferStrategies: h, | |
mergeProps: function(e, t) { | |
return a(Object.assign({}, e), t) | |
}, | |
Mixin: { | |
transferPropsTo: function(e) { | |
return e._owner !== this && l(0, "%s: You can't call transferPropsTo() on a component that you don't own, %s. This usually means you are calling transferPropsTo() on a component passed in as props or children.", this.constructor.displayName, "string" == typeof e.type ? e.type : e.type.displayName), __DEV__ && (d || (d = !0, c(!1, "transferPropsTo is deprecated. See http://fb.me/react-transferpropsto for more information."))), a(e.props, this.props), e | |
} | |
} | |
}; | |
o.exports = f | |
}), __d("joinClasses", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e) { | |
e || (e = ""); | |
var t, n = arguments.length; | |
if (n > 1) | |
for (var r = 1; n > r; r++) t = arguments[r], t && (e = (e ? e + " " : "") + t); | |
return e | |
} | |
o.exports = i | |
}), __d("ReactPropTypeLocationNames", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = {}; | |
__DEV__ && (i = { | |
prop: "prop", | |
context: "context", | |
childContext: "child context" | |
}), o.exports = i | |
}), __d("instantiateReactComponent", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t) { | |
var n; | |
if (__DEV__ && (a(e && ("function" == typeof e.type || "string" == typeof e.type), "Only functions or strings can be mounted as React components."), e.type._mockedReactClassConstructor)) { | |
l._isLegacyCallWarningEnabled = !1; | |
try { | |
n = new e.type._mockedReactClassConstructor(e.props) | |
} finally { | |
l._isLegacyCallWarningEnabled = !0 | |
} | |
s.isValidElement(n) && (n = new n.type(n.props)); | |
var r = n.render; | |
if (r) return r._isMockFunction && !r._getMockImplementation() && r.mockImplementation(c.getEmptyComponent), n.construct(e), n; | |
e = c.getEmptyComponent() | |
} | |
return n = "string" == typeof e.type ? u.createInstanceForTag(e.type, e.props, t) : new e.type(e.props), __DEV__ && a("function" == typeof n.construct && "function" == typeof n.mountComponent && "function" == typeof n.receiveComponent, "Only React Components can be mounted."), n.construct(e), n | |
} | |
var a = t("warning"), | |
s = t("ReactElement"), | |
l = t("ReactLegacyElement"), | |
u = t("ReactNativeComponent"), | |
c = t("ReactEmptyComponent"); | |
o.exports = i | |
}), __d("ReactNativeComponent", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t, n) { | |
var r = l[e]; | |
return null == r ? (s || a(0, "There is no registered component for the tag %s", e), new s(e, t)) : n === e ? (s || a(0, "There is no registered component for the tag %s", e), new s(e, t)) : new r.type(t) | |
} | |
var a = t("invariant"), | |
s = null, | |
l = {}, | |
u = { | |
injectGenericComponentClass: function(e) { | |
s = e | |
}, | |
injectComponentClasses: function(e) { | |
Object.assign(l, e) | |
} | |
}, | |
c = { | |
createInstanceForTag: i, | |
injection: u | |
}; | |
o.exports = c | |
}), __d("keyOf", [], function(e, t, n, r, o) { | |
var i = function(e) { | |
var t; | |
for (t in e) | |
if (e.hasOwnProperty(t)) return t; | |
return null | |
}; | |
o.exports = i | |
}), __d("mapObject", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t, n) { | |
if (!e) return null; | |
var r = {}; | |
for (var o in e) a.call(e, o) && (r[o] = t.call(n, e[o], o, e)); | |
return r | |
} | |
var a = Object.prototype.hasOwnProperty; | |
o.exports = i | |
}), __d("shouldUpdateReactComponent", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t) { | |
return e && t && e.type === t.type && e.key === t.key && e._owner === t._owner ? !0 : !1 | |
} | |
o.exports = i | |
}), __d("ReactInstanceHandles", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e) { | |
return m + e.toString(36) | |
} | |
function a(e, t) { | |
return e.charAt(t) === m || t === e.length | |
} | |
function s(e) { | |
return "" === e || e.charAt(0) === m && e.charAt(e.length - 1) !== m | |
} | |
function l(e, t) { | |
return 0 === t.indexOf(e) && a(t, e.length) | |
} | |
function u(e) { | |
return e ? e.substr(0, e.lastIndexOf(m)) : "" | |
} | |
function c(e, t) { | |
if (s(e) && s(t) || f(0, "getNextDescendantID(%s, %s): Received an invalid React DOM ID.", e, t), l(e, t) || f(0, "getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.", e, t), e === t) return e; | |
for (var n = e.length + g, r = n; r < t.length && !a(t, r); r++); | |
return t.substr(0, r) | |
} | |
function d(e, t) { | |
var n = Math.min(e.length, t.length); | |
if (0 === n) return ""; | |
for (var r = 0, o = 0; n >= o; o++) | |
if (a(e, o) && a(t, o)) r = o; | |
else if (e.charAt(o) !== t.charAt(o)) break; | |
var i = e.substr(0, r); | |
return s(i) || f(0, "getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s", e, t, i), i | |
} | |
function p(e, t, n, r, o, i) { | |
e = e || "", t = t || "", e === t && f(0, "traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.", e); | |
var a = l(t, e); | |
a || l(e, t) || f(0, "traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.", e, t); | |
for (var s = 0, d = a ? u : c, p = e;; p = d(p, t)) { | |
var h; | |
if (o && p === e || i && p === t || (h = n(p, a, r)), h === !1 || p === t) break; | |
s++ < _ || f(0, "traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s", e, t) | |
} | |
} | |
var h = t("ReactRootIndex"), | |
f = t("invariant"), | |
m = ".", | |
g = m.length, | |
_ = 100, | |
y = { | |
createReactRootID: function() { | |
return i(h.createReactRootIndex()) | |
}, | |
createReactID: function(e, t) { | |
return e + t | |
}, | |
getReactRootIDFromNodeID: function(e) { | |
if (e && e.charAt(0) === m && e.length > 1) { | |
var t = e.indexOf(m, 1); | |
return t > -1 ? e.substr(0, t) : e | |
} | |
return null | |
}, | |
traverseEnterLeave: function(e, t, n, r, o) { | |
var i = d(e, t); | |
i !== e && p(e, i, n, r, !1, !0), i !== t && p(i, t, n, o, !0, !1) | |
}, | |
traverseTwoPhase: function(e, t, n) { | |
e && (p("", e, t, n, !0, !1), p(e, "", t, n, !1, !0)) | |
}, | |
traverseTwoPhaseSkipTarget: function(e, t, n) { | |
e && (p("", e, t, n, !0, !0), p(e, "", t, n, !0, !0)) | |
}, | |
traverseAncestors: function(e, t, n) { | |
p("", e, t, n, !0, !1) | |
}, | |
_getFirstCommonAncestorID: d, | |
_getNextDescendantID: c, | |
isAncestorIDOf: l, | |
SEPARATOR: m | |
}; | |
o.exports = y | |
}), __d("ReactRootIndex", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = { | |
injectCreateReactRootIndex: function(e) { | |
a.createReactRootIndex = e | |
} | |
}, | |
a = { | |
createReactRootIndex: null, | |
injection: i | |
}; | |
o.exports = a | |
}), __d("ReactIOSDefaultInjection", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() { | |
a.injection.injectEventPluginOrder(l), a.injection.injectInstanceHandle(m), b.injection.injectGlobalResponderHandler(y), a.injection.injectEventPluginsByName({ | |
ResponderEventPlugin: b, | |
IOSNativeBridgeEventPlugin: u | |
}), w.injection.injectReconcileTransaction(g.ReactReconcileTransaction), w.injection.injectBatchingStrategy(h), d.injection.injectEnvironment(g), s.injection.injectMount(v), p.injection.injectMixin(_), S.inject(function(e) { | |
return new f(R.type, null, null, null, null, { | |
text: e | |
}) | |
}), c.injection.injectImplementation(C) | |
} | |
t("InitializeJavaScriptAppEngine"); | |
var a = t("EventPluginHub"), | |
s = t("EventPluginUtils"), | |
l = t("IOSDefaultEventPluginOrder"), | |
u = t("IOSNativeBridgeEventPlugin"), | |
c = t("NodeHandle"), | |
d = t("ReactComponent"), | |
p = t("ReactCompositeComponent"), | |
h = t("ReactDefaultBatchingStrategy"), | |
f = t("ReactElement"), | |
m = t("ReactInstanceHandles"), | |
g = t("ReactIOSComponentEnvironment"), | |
_ = t("ReactIOSComponentMixin"), | |
y = t("ReactIOSGlobalResponderHandler"), | |
v = t("ReactIOSMount"), | |
S = t("ReactTextComponent"), | |
w = t("ReactUpdates"), | |
b = t("ResponderEventPlugin"), | |
R = t("RKRawText"), | |
C = t("UniversalWorkerNodeHandle"); | |
t("RKEventEmitter"), t("RKLog"), t("RKJSTimers"), o.exports = { | |
inject: i | |
} | |
}), __d("InitializeJavaScriptAppEngine", [], function(e, t) { | |
function n(e) { | |
GLOBAL.console.error("Error: \n stack: \n" + e.stack + "\n URL: " + e.sourceURL + "\n line: " + e.line + "\n message: " + e.message), c && (c.reportUnhandledException(e.message, d(e)), __DEV__ && p(function(t) { | |
try { | |
var n = d(e, t); | |
c.updateExceptionMessage(e.message, n) | |
} catch (r) { | |
GLOBAL.console.error("#CLOWNTOWN (error while displaying error): " + r.message) | |
} | |
})) | |
} | |
function r() { | |
l.setGlobalHandler(n) | |
} | |
function o() { | |
GLOBAL.Text = void 0, GLOBAL.Image = void 0, GLOBAL.document = { | |
body: {}, | |
createElement: function() { | |
return {} | |
} | |
} | |
} | |
function i() { | |
GLOBAL.setTimeout = s.setTimeout, GLOBAL.setInterval = s.setInterval, GLOBAL.setImmediate = s.setImmediate, GLOBAL.clearTimeout = s.clearTimeout, GLOBAL.clearInterval = s.clearInterval, GLOBAL.clearImmediate = s.clearImmediate, GLOBAL.cancelAnimationFrame = s.clearInterval, GLOBAL.requestAnimationFrame = function(e) { | |
return s.requestAnimationFrame(e) | |
}, "undefined" != typeof __fbUseWebSocketMessageQueue && s.setInterval(function() {}, 0) | |
} | |
function a() { | |
GLOBAL.alert || (GLOBAL.alert = function(e) { | |
var t = { | |
title: "Alert", | |
message: "" + e, | |
buttons: [{ | |
cancel: "Okay" | |
}] | |
}; | |
u.alertWithArgs(t, null) | |
}) | |
} | |
var s = t("JSTimers"); | |
t("RKDeviceEventEmitter"); | |
var l = t("ErrorUtils"), | |
u = t("RKAlertManager"), | |
c = t("NativeModules").RKExceptionsManager, | |
d = t("errorToString"), | |
p = t("loadSourceMap"); | |
"undefined" == typeof GLOBAL && (GLOBAL = this), "undefined" == typeof window && (window = GLOBAL), r(), o(), i(), a() | |
}), __d("JSTimers", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("NativeModules").RKTiming, | |
a = t("JSTimersExecution"), | |
s = { | |
Types: a.Types, | |
_getFreeIndex: function() { | |
var e = a.timerIDs.indexOf(null); | |
return -1 === e && (e = a.timerIDs.length), e | |
}, | |
setTimeout: function(e, t) { | |
for (var n = [], r = 2, o = arguments.length; o > r; r++) n.push(arguments[r]); | |
var l = a.GUID++, | |
u = s._getFreeIndex(); | |
return a.timerIDs[u] = l, a.callbacks[u] = e, a.callbacks[u] = function() { | |
return e.apply(void 0, n) | |
}, a.types[u] = a.Type.setTimeout, i.createTimer(l, t, Date.now(), !1), l | |
}, | |
setInterval: function(e, t) { | |
for (var n = [], r = 2, o = arguments.length; o > r; r++) n.push(arguments[r]); | |
var l = a.GUID++, | |
u = s._getFreeIndex(); | |
return a.timerIDs[u] = l, a.callbacks[u] = e, a.callbacks[u] = function() { | |
return e.apply(void 0, n) | |
}, a.types[u] = a.Type.setInterval, i.createTimer(l, t, Date.now(), !0), l | |
}, | |
setImmediate: function(e) { | |
for (var t = [], n = 1, r = arguments.length; r > n; n++) t.push(arguments[n]); | |
var o = a.GUID++, | |
i = s._getFreeIndex(); | |
return a.timerIDs[i] = o, a.callbacks[i] = e, a.callbacks[i] = function() { | |
return e.apply(void 0, t) | |
}, a.types[i] = a.Type.setImmediate, a.immediates.push(o), o | |
}, | |
requestAnimationFrame: function(e) { | |
var t = a.GUID++, | |
n = s._getFreeIndex(); | |
return a.timerIDs[n] = t, a.callbacks[n] = e, a.types[n] = a.Type.requestAnimationFrame, i.createTimer(t, 0, Date.now(), !1), t | |
}, | |
clearTimeout: function(e) { | |
s._clearTimerID(e) | |
}, | |
clearInterval: function(e) { | |
s._clearTimerID(e) | |
}, | |
clearImmediate: function(e) { | |
s._clearTimerID(e), a.immediates.splice(a.immediates.indexOf(e), 1) | |
}, | |
cancelAnimationFrame: function(e) { | |
s._clearTimerID(e) | |
}, | |
_clearTimerID: function(e) { | |
var t = a.timerIDs.indexOf(e); - 1 !== t && (a._clearIndex(t), a.types[t] !== a.Type.setImmediate && i.deleteTimer(e)) | |
} | |
}; | |
o.exports = s | |
}), __d("NativeModules", [], function(e, t, n, r, o) { | |
"use strict"; | |
o.exports = t("BatchedBridge").RemoteModules | |
}), __d("BatchedBridge", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i, a = t("BatchedBridgeFactory"); | |
i = t("undefined" != typeof __fbUseWebSocketMessageQueue ? "WebSocketMessageQueue" : "MessageQueue"); | |
var s = __fbBatchedBridgeConfig.remoteModuleConfig, | |
l = __fbBatchedBridgeConfig.localModulesConfig, | |
u = a.create(i, s, l); | |
u._config = s, o.exports = u | |
}), __d("BatchedBridgeFactory", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("invariant"), | |
a = t("keyMirror"), | |
s = t("mapObject"), | |
l = t("warning"), | |
u = Array.prototype.slice, | |
c = a({ | |
remote: null, | |
local: null | |
}), | |
d = { | |
MethodTypes: c, | |
_createDeprecatedBridgedModule: function(e, t, n) { | |
var r = s(t.methods, function(t, r) { | |
return t.type === c.local ? null : function() { | |
var t = arguments.length ? arguments[arguments.length - 1] : null, | |
o = "function" == typeof t, | |
i = u.call(arguments, 0, arguments.length - (o ? 1 : 0)), | |
a = o ? t : null; | |
return e.callDeprecated(n, r, i, a) | |
} | |
}); | |
for (var o in t.constants) l(!r[o], "saw constant and method named %s", o), r[o] = t.constants[o]; | |
return r | |
}, | |
_createBridgedModule: function(e, t, n) { | |
var r = s(t.methods, function(t, r) { | |
return t.type === c.local ? null : function() { | |
var t = arguments.length > 0 ? arguments[arguments.length - 1] : null, | |
o = arguments.length > 1 ? arguments[arguments.length - 2] : null, | |
a = "function" == typeof t, | |
s = "function" == typeof o, | |
l = a; | |
a && s || !a && !s || i(0, "You must supply error callbacks and success callbacks or neither"); | |
var c = u.call(arguments, 0, arguments.length - (l ? 2 : 0)), | |
d = l ? t : null, | |
p = l ? o : null; | |
return e.call(n, r, c, p, d) | |
} | |
}); | |
for (var o in t.constants) l(!r[o], "saw constant and method named %s", o), r[o] = t.constants[o]; | |
return r | |
}, | |
create: function(e, t, n) { | |
var r = new e(t, n); | |
return { | |
callFunction: r.callFunction.bind(r), | |
callFunctionReturnFlushedQueue: r.callFunctionReturnFlushedQueue.bind(r), | |
invokeCallback: r.invokeCallback.bind(r), | |
invokeCallbackAndReturnFlushedQueue: r.invokeCallbackAndReturnFlushedQueue.bind(r), | |
flushedQueue: r.flushedQueue.bind(r), | |
RemoteModulesDeprecated: s(t, this._createDeprecatedBridgedModule.bind(this, r)), | |
RemoteModules: s(t, this._createBridgedModule.bind(this, r)), | |
setLoggingEnabled: r.setLoggingEnabled.bind(r), | |
getLoggedOutgoingItems: r.getLoggedOutgoingItems.bind(r), | |
getLoggedIncomingItems: r.getLoggedIncomingItems.bind(r), | |
replayPreviousLog: r.replayPreviousLog.bind(r) | |
} | |
} | |
}; | |
o.exports = d | |
}), __d("WebSocketMessageQueue", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() { | |
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]); | |
i.instances || (i.instances = []), i.instances.push(this), a.apply(this, e), this._ws = l(u ? i.CatalystJSRuntime(this) : i.RemoteJSRuntime(this)) | |
} | |
var a = t("MessageQueue"), | |
s = t("JSONRPC"), | |
l = t("createJSONRPCWebSocket"), | |
u = "undefined" != typeof navigator && navigator.userAgent.indexOf("Catalyst") > -1; | |
s.MessageID = u ? 2e4 : 3e4, s.Runtime = u ? "Catalyst" : "Browser", i.prototype = Object.create(a.prototype), i.CatalystJSRuntime = function(e) { | |
return { | |
url: "ws://localhost:8188", | |
onerror: function(e) { | |
console.error(e.error) | |
}, | |
methods: { | |
connected: function() { | |
this["CatalystJSRuntime init"]() | |
}, | |
clientAdded: function() { | |
this["CatalystJSRuntime init"]() | |
}, | |
"CatalystJSRuntime init": function() { | |
e._ws.unpause(), e._ws.sendMethodCall("CatalystJSRuntime connected", [{ | |
location: this["CatalystJSRuntime location get"](), | |
"NATIVELY INJECTED OBJECTS": this["CatalystJSRuntime NATIVELY INJECTED OBJECTS get"]() | |
}]), e._ws.pause() | |
}, | |
"RemoteBootstrapJSRuntime ready": function() { | |
this["CatalystJSRuntime init"]() | |
}.bind(this), | |
"RemoteJSRuntime ready": function() { | |
e._ws.unpause(), e._ws.flush() | |
}, | |
"CatalystJSRuntime NATIVELY INJECTED OBJECTS get": function() { | |
var e = document.getElementsByTagName("script")[0].innerText; | |
return e.substr(e.indexOf("/* BEGIN NATIVELY INJECTED OBJECTS */"), e.indexOf("/* END NATIVELY INJECTED OBJECTS */")) | |
}, | |
"CatalystJSRuntime location get": function() { | |
return window.location.href | |
}, | |
"CatalystJSRuntime MessageQueue$_pushRequestToOutgoingItems": function() { | |
for (var t = [], n = 0, r = arguments.length; r > n; n++) t.push(arguments[n]); | |
a.prototype._pushRequestToOutgoingItems.apply(e, t) | |
} | |
} | |
} | |
}.bind(this), i.RemoteJSRuntime = function(e) { | |
return { | |
url: "ws://localhost:8188", | |
onerror: function(e) { | |
console.error(e.error) | |
}, | |
methods: { | |
connected: function() { | |
e._ws.sendMethodCall("RemoteJSRuntime ready", [], function() { | |
e._ws.unpause(), e._ws.flush() | |
}), e._ws.flush() | |
}, | |
clientAdded: function() { | |
window.onbeforeunload = function() {}, location.reload() | |
}, | |
clientRemoved: function() {}, | |
"CatalystJSRuntime connected": function() {}, | |
"RemoteJSRuntime MessageQueue$_callFunction": function() { | |
for (var t = [], n = 0, r = arguments.length; r > n; n++) t.push(arguments[n]); | |
return a.prototype._callFunction.apply(e, t) | |
}, | |
"RemoteJSRuntime MessageQueue$_invokeCallback": function() { | |
for (var t = [], n = 0, r = arguments.length; r > n; n++) t.push(arguments[n]); | |
return a.prototype._invokeCallback.apply(e, t) | |
}, | |
"RemoteJSRuntime MessageQueue$_flushedQueueUnguarded": function() { | |
for (var t = [], n = 0, r = arguments.length; r > n; n++) t.push(arguments[n]); | |
return a.prototype._flushedQueueUnguarded.apply(e, t) | |
} | |
} | |
} | |
}, u && (i.prototype._callFunction = function() { | |
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]); | |
this._ws.sendMethodCall("RemoteJSRuntime MessageQueue$_callFunction", e) | |
}, i.prototype._invokeCallback = function() { | |
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]); | |
this._ws.sendMethodCall("RemoteJSRuntime MessageQueue$_invokeCallback", e) | |
}, i.prototype._isFlushedQueueEmpty = function() { | |
return !(this._outgoingItems.length > 0 && this._outgoingItems[0].length > 0 && this._outgoingItems[0][0].length > 0) | |
}, i.prototype._pushRequestToOutgoingItems = function() { | |
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]); | |
return console.warn("Ignored _pushRequestToOutgoingItems!", "Catalyst JS runtime is running in remote debug mode. This function should never get called."), a.prototype._pushRequestToOutgoingItems.apply(this, e) | |
}), u || (i.prototype._pushRequestToOutgoingItems = function() { | |
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]); | |
this._ws.sendMethodCall("CatalystJSRuntime MessageQueue$_pushRequestToOutgoingItems", e) | |
}), o.exports = i | |
}), __d("MessageQueue", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("ErrorUtils"), | |
a = t("invariant"), | |
s = t("warning"), | |
l = t("JSTimersExecution"), | |
u = "Error in MessageQueue implementation", | |
c = t, | |
d = function(e, t, n) { | |
return e[t].apply(e, n) | |
}, | |
p = function(e, t, n) { | |
this._requireFunc = n || c, this._initBookeeping(), this._initNamingMap(e, t) | |
}, | |
h = 0, | |
f = 1, | |
m = 2, | |
g = 3, | |
_ = 4, | |
y = function(e, t, n, r) { | |
return e && i.applyWithGuard(e, r, t), n ? i.applyWithGuard(n, r, null) : null | |
}, | |
v = function() { | |
return { | |
GUID: 1, | |
errorCallbackIDForSuccessCallbackID: function(e) { | |
return e + 1 | |
}, | |
successCallbackIDForErrorCallbackID: function(e) { | |
return e - 1 | |
}, | |
allocateCallbackIDs: function(e) { | |
e.successCallbackID = this.GUID++, e.errorCallbackID = this.GUID++ | |
}, | |
isSuccessCallback: function(e) { | |
return e % 2 === 1 | |
} | |
} | |
}, | |
S = { | |
_initNamingMap: function(e, t) { | |
function n(e, t, n, r, o) { | |
for (var i in e) { | |
var a = e[i], | |
s = a.moduleID; | |
t[i] = s, n[s] = i, r[i] = {}, o[i] = {}; | |
var l = a.methods; | |
for (var u in l) { | |
var c = l[u].methodID; | |
r[i][u] = c, o[i][c] = u | |
} | |
} | |
} | |
this._remoteModuleNameToModuleID = {}, this._remoteModuleIDToModuleName = {}, this._remoteModuleNameToMethodNameToID = {}, this._remoteModuleNameToMethodIDToName = {}, this._localModuleNameToModuleID = {}, this._localModuleIDToModuleName = {}, this._localModuleNameToMethodNameToID = {}, this._localModuleNameToMethodIDToName = {}, n(e, this._remoteModuleNameToModuleID, this._remoteModuleIDToModuleName, this._remoteModuleNameToMethodNameToID, this._remoteModuleNameToMethodIDToName), n(t, this._localModuleNameToModuleID, this._localModuleIDToModuleName, this._localModuleNameToMethodNameToID, this._localModuleNameToMethodIDToName) | |
}, | |
_initBookeeping: function() { | |
this._POOLED_CBIDS = { | |
errorCallbackID: null, | |
successCallbackID: null | |
}, this._bookkeeping = v(), this._threadLocalCallbacksByID = [], this._threadLocalScopesByID = [], this._outgoingItems = [ | |
[], | |
[], | |
[], | |
[], | |
[] | |
], this._outgoingItemsSwap = [ | |
[], | |
[], | |
[], | |
[], | |
[] | |
] | |
}, | |
invokeCallback: function(e, t) { | |
return y(this._invokeCallback, [e, t], null, this) | |
}, | |
_invokeCallback: function(e, t) { | |
try { | |
var n = this._threadLocalCallbacksByID[e], | |
r = this._threadLocalScopesByID[e]; | |
s(n, "Cannot find callback with CBID %s. Native module may have invoked both the success callback and the error callback.", e), n.apply(r, t) | |
} catch (o) { | |
throw o | |
} finally { | |
this._freeResourcesForCallbackID(e) | |
} | |
}, | |
invokeCallbackAndReturnFlushedQueue: function(e, t) { | |
return this._enableLogging && this._loggedIncomingItems.push([(new Date).getTime(), e, t]), y(this._invokeCallback, [e, t], this._flushedQueueUnguarded, this) | |
}, | |
callFunction: function(e, t, n) { | |
return y(this._callFunction, [e, t, n], null, this) | |
}, | |
_callFunction: function(e, t, n) { | |
var r = this._localModuleIDToModuleName[e], | |
o = this._localModuleNameToMethodIDToName[r][t], | |
i = d(this._requireFunc(r), o, n); | |
return i | |
}, | |
callFunctionReturnFlushedQueue: function(e, t, n) { | |
return this._enableLogging && this._loggedIncomingItems.push([(new Date).getTime(), e, t, n]), y(this._callFunction, [e, t, n], this._flushedQueueUnguarded, this) | |
}, | |
setLoggingEnabled: function(e) { | |
this._enableLogging = e, this._loggedIncomingItems = [], this._loggedOutgoingItems = [ | |
[], | |
[], | |
[], | |
[], | |
[] | |
] | |
}, | |
getLoggedIncomingItems: function() { | |
return this._loggedIncomingItems | |
}, | |
getLoggedOutgoingItems: function() { | |
return this._loggedOutgoingItems | |
}, | |
replayPreviousLog: function(e) { | |
this._outgoingItems = e | |
}, | |
_swapAndReinitializeBuffer: function() { | |
var e = this._outgoingItems, | |
t = this._outgoingItemsSwap; | |
t[h].length = 0, t[f].length = 0, t[m].length = 0, t[g].length = 0, t[_].length = 0, this._outgoingItemsSwap = e, this._outgoingItems = t | |
}, | |
_pushRequestToOutgoingItems: function(e, t, n) { | |
this._outgoingItems[h].push(e), this._outgoingItems[f].push(t), this._outgoingItems[m].push(n), this._enableLogging && (this._loggedOutgoingItems[h].push(e), this._loggedOutgoingItems[f].push(t), this._loggedOutgoingItems[m].push(n)) | |
}, | |
_pushResponseToOutgoingItems: function(e, t) { | |
this._outgoingItems[g].push(e), this._outgoingItems[_].push(t) | |
}, | |
_freeResourcesForCallbackID: function(e) { | |
var t = this._bookkeeping.isSuccessCallback(e) ? this._bookkeeping.errorCallbackIDForSuccessCallbackID(e) : this._bookkeeping.successCallbackIDForErrorCallbackID(e); | |
this._threadLocalCallbacksByID[e] = null, this._threadLocalScopesByID[e] = null, this._threadLocalCallbacksByID[t] && (this._threadLocalCallbacksByID[t] = null, this._threadLocalScopesByID[t] = null) | |
}, | |
_storeCallbacksInCurrentThread: function(e, t, n) { | |
e || t || a(0, u), this._bookkeeping.allocateCallbackIDs(this._POOLED_CBIDS); | |
var r = this._POOLED_CBIDS.successCallbackID, | |
o = this._POOLED_CBIDS.errorCallbackID; | |
this._threadLocalCallbacksByID[o] = e, this._threadLocalCallbacksByID[r] = t, this._threadLocalScopesByID[o] = n, this._threadLocalScopesByID[r] = n | |
}, | |
flushedQueue: function() { | |
return y(null, null, this._flushedQueueUnguarded, this) | |
}, | |
_flushedQueueUnguarded: function() { | |
l.callImmediates(); | |
var e = this._outgoingItems; | |
this._swapAndReinitializeBuffer(); | |
var t = e[h].length || e[_].length ? e : null; | |
return t | |
}, | |
callDeprecated: function(e, t, n, r, o) { | |
r && "function" != typeof r && a(0, "Last argument (callback) must be function"), r && (this._storeCallbacksInCurrentThread(null, r, o, this._POOLED_CBIDS), n.push(this._POOLED_CBIDS.successCallbackID)); | |
var i = this._remoteModuleNameToModuleID[e]; | |
if (void 0 === i || null === i) throw new Error("Unrecognized module name:" + e); | |
var s = this._remoteModuleNameToMethodNameToID[e][t]; | |
if (void 0 === s || null === i) throw new Error("Unrecognized method name:" + t); | |
this._pushRequestToOutgoingItems(i, s, n) | |
}, | |
call: function(e, t, n, r, o, i) { | |
(r && "function" != typeof r || o && "function" != typeof o) && a(0, "Callbacks must be functions"), (r || o) && (this._storeCallbacksInCurrentThread(r, o, i, this._POOLED_CBIDS), n.push(this._POOLED_CBIDS.errorCallbackID), n.push(this._POOLED_CBIDS.successCallbackID)); | |
var s = this._remoteModuleNameToModuleID[e]; | |
if (void 0 === s || null === s) throw new Error("Unrecognized module name:" + e); | |
var l = this._remoteModuleNameToMethodNameToID[e][t]; | |
if (void 0 === l || null === s) throw new Error("Unrecognized method name:" + t); | |
this._pushRequestToOutgoingItems(s, l, n) | |
}, | |
__numPendingCallbacksOnlyUseMeInTestCases: function() { | |
for (var e = this._threadLocalCallbacksByID, t = 0, n = 0; n < e.length; n++) e[n] && t++; | |
return t | |
} | |
}; | |
Object.assign(p.prototype, S), o.exports = p | |
}), __d("ErrorUtils", [], function(e, t, n, r, o) { | |
var i = this; | |
o.exports = i.ErrorUtils | |
}), __d("JSTimersExecution", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("invariant"), | |
a = t("keyMirror"), | |
s = t("performanceNow"), | |
l = t("warning"), | |
u = { | |
GUID: 1, | |
Type: a({ | |
setTimeout: null, | |
setInterval: null, | |
requestAnimationFrame: null, | |
setImmediate: null | |
}), | |
callbacks: [], | |
types: [], | |
timerIDs: [], | |
immediates: [], | |
callTimer: function(e) { | |
l(e <= u.GUID, "Tried to call timer with ID " + e + " but no such timer exists"); | |
var t = u.timerIDs.indexOf(e); | |
if (-1 !== t) { | |
var n = u.types[t], | |
r = u.callbacks[t]; | |
(n === u.Type.setTimeout || n === u.Type.setImmediate || n === u.Type.requestAnimationFrame) && u._clearIndex(t); | |
try { | |
if (n === u.Type.setTimeout || n === u.Type.setInterval || n === u.Type.setImmediate) r(); | |
else { | |
if (n !== u.Type.requestAnimationFrame) return void console.error("Tried to call a callback with invalid type: " + n); | |
var o = s(); | |
r(o) | |
} | |
} catch (i) { | |
u.errors = u.errors || [], u.errors.push(i) | |
} | |
} | |
}, | |
callTimers: function(e) { | |
0 === e.length && i(0, 'Probably shouldn\'t call "callTimers" with no timerIDs'), u.errors = null, e.forEach(u.callTimer); | |
var n = u.errors; | |
if (n) { | |
var r = n.length; | |
if (r > 1) | |
for (var o = 1; r > o; o++) t("JSTimers").setTimeout(function(e) { | |
throw e | |
}.bind(null, n[o]), 0); | |
throw n[0] | |
} | |
}, | |
callImmediates: function() { | |
for (u.errors = null; 0 !== u.immediates.length;) u.callTimer(u.immediates.shift()); | |
u.errors && u.errors.forEach(function(e) { | |
return t("JSTimers").setTimeout(function() { | |
throw e | |
}, 0) | |
}) | |
}, | |
_clearIndex: function(e) { | |
u.timerIDs[e] = null, u.callbacks[e] = null, u.types[e] = null | |
} | |
}; | |
o.exports = u | |
}), __d("performanceNow", [], function(e, t, n, r, o) { | |
var i = t("performance"); | |
i && i.now || (i = Date); | |
var a = i.now.bind(i); | |
o.exports = a | |
}), __d("performance", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i, a = t("ExecutionEnvironment"); | |
a.canUseDOM && (i = window.performance || window.msPerformance || window.webkitPerformance), o.exports = i || {} | |
}), __d("ExecutionEnvironment", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = !("undefined" == typeof window || !window.document || !window.document.createElement), | |
a = { | |
canUseDOM: i, | |
canUseWorkers: "undefined" != typeof Worker, | |
canUseEventListeners: i && !(!window.addEventListener && !window.attachEvent), | |
canUseViewport: i && !!window.screen, | |
isInWorker: !i | |
}; | |
o.exports = a | |
}), __d("JSONRPC", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t) { | |
return e.onmessage = function(e) { | |
this.ondata(e.data) | |
}, e.ondata = function(e) { | |
try { | |
var t = JSON.parse(e) | |
} catch (n) { | |
this.onerror({ | |
type: "error", | |
error: n | |
}) | |
} | |
t && this.onjson(t) | |
}, e.onjson = function(e) { | |
return "2.0" === e.jsonrpc ? this.onjsonrpc(e) : void 0 | |
}, e.onjsonrpc = function(n) { | |
if (null == n.method) return void("result" in n || "error" in n ? this._handleCallback(n.id, n.error, n.result) : console.warn("unhandled message", n)); | |
if ("function" != typeof t[n.method]) return void this.sendErrorMissingMethod(n.id, n.method); | |
try { | |
var r = t[n.method].apply(t, n.params); | |
null == r && (r = null), e.sendResult(n.id, r) | |
} catch (o) { | |
e.sendError(n.id, o) | |
} | |
}, e.sendResult = function(e, t) { | |
this.send(JSON.stringify({ | |
jsonrpc: "2.0", | |
runtime: i.Runtime, | |
id: e, | |
ts: Date.now(), | |
result: t | |
})) | |
}, e.sendErrorMissingMethod = function(e, t) { | |
console.warn("Ignored missing method", t), this.sendErrorRaw(e, { | |
code: -32601, | |
message: "Method not found", | |
data: t | |
}) | |
}, e.sendError = function(e, t) { | |
this.sendErrorRaw(e, { | |
code: -32e3, | |
message: t.message, | |
data: t | |
}) | |
}, e.sendErrorRaw = function(e, t) { | |
this.send(JSON.stringify({ | |
jsonrpc: "2.0", | |
runtime: i.Runtime, | |
id: e, | |
ts: Date.now(), | |
error: t | |
})) | |
}, e._outMessages = {}, e._handleCallback = function(t, n, r) { | |
var o = e._outMessages[t]; | |
o && o.callback && o.callback(n, r), delete e._outMessages[t] | |
}, e.sendMethodCall = function(t, n, r) { | |
var o = i.MessageID++, | |
a = { | |
jsonrpc: "2.0", | |
runtime: i.Runtime, | |
id: o, | |
ts: Date.now(), | |
method: t, | |
params: n, | |
callback: r | |
}; | |
e._outMessages[a.id] = a, this.send(JSON.stringify(a)) | |
}, e | |
} | |
o.exports = i | |
}), __d("createJSONRPCWebSocket", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e) { | |
var t = new WebSocket(e.url); | |
return t.methods = e.methods, a(t, t.methods), t.flush = function() { | |
if (this.readyState !== WebSocket.OPEN) throw Error("not open"); | |
t._messageQueue.forEach(function(e) { | |
return this._sendForReal(e) | |
}.bind(this)), t._messageQueue.length = 0 | |
}, t._isPaused = !0, t.unpause = function() { | |
if (this.readyState !== WebSocket.OPEN) throw Error("not open"); | |
t._isPaused = !1 | |
}, t.pause = function() { | |
t._isPaused = !0 | |
}, t._sendForReal = t.send, t.send = function(e) { | |
return this.readyState !== WebSocket.OPEN || t._isPaused ? void t._messageQueue.push(e) : void t._sendForReal(e) | |
}, t._messageQueue = [], t.onerror = e.onerror, t.onopen = e.onopen, t | |
} | |
var a = t("JSONRPC"); | |
o.exports = i | |
}), __d("RKDeviceEventEmitter", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("EventEmitter"), | |
a = new i; | |
o.exports = a | |
}), __d("EventEmitter", [], function(e, t, n, r, o) { | |
function i() { | |
"use strict"; | |
this.$EventEmitter_subscriber = new l | |
} | |
var a = t("EmitterSubscription"), | |
s = t("ErrorUtils"), | |
l = t("EventSubscriptionVendor"), | |
u = t("emptyFunction"), | |
c = t("invariant"); | |
i.prototype.addListener = function(e, t, n) { | |
"use strict"; | |
return this.$EventEmitter_subscriber.addSubscription(e, new a(this.$EventEmitter_subscriber, t, n)) | |
}, i.prototype.once = function(e, t, n) { | |
"use strict"; | |
var r = this; | |
return this.addListener(e, function() { | |
r.removeCurrentListener(), t.apply(n, arguments) | |
}) | |
}, i.prototype.removeAllListeners = function(e) { | |
"use strict"; | |
this.$EventEmitter_subscriber.removeAllSubscriptions(e) | |
}, i.prototype.removeCurrentListener = function() { | |
"use strict"; | |
this.$EventEmitter_currentSubscription || c(0, "Not in an emitting cycle; there is no current subscription"), this.$EventEmitter_subscriber.removeSubscription(this.$EventEmitter_currentSubscription) | |
}, i.prototype.listeners = function(e) { | |
"use strict"; | |
var t = this.$EventEmitter_subscriber.getSubscriptionsForType(e); | |
return t ? t.filter(u.thatReturnsTrue).map(function(e) { | |
return e.listener | |
}) : [] | |
}, i.prototype.emit = function(e) { | |
"use strict"; | |
var t = this.$EventEmitter_subscriber.getSubscriptionsForType(e); | |
if (t) { | |
for (var n = Object.keys(t), r = 0; r < n.length; r++) { | |
var o = n[r], | |
i = t[o]; | |
i && (this.$EventEmitter_currentSubscription = i, s.applyWithGuard(i.listener, i.context, Array.prototype.slice.call(arguments, 1), null, "EventEmitter:" + e)) | |
} | |
this.$EventEmitter_currentSubscription = null | |
} | |
}, o.exports = i | |
}), __d("EmitterSubscription", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e, t, n) { | |
a.call(this, e), this.listener = t, this.context = n | |
} | |
var a = t("EventSubscription"); | |
for (var s in a) a.hasOwnProperty(s) && (i[s] = a[s]); | |
var l = null === a ? null : a.prototype; | |
i.prototype = Object.create(l), i.prototype.constructor = i, i.__superConstructor__ = a, o.exports = i | |
}), __d("EventSubscription", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i(e) { | |
this.subscriber = e | |
} | |
i.prototype.remove = function() { | |
this.subscriber.removeSubscription(this) | |
}, o.exports = i | |
}), __d("EventSubscriptionVendor", [], function(e, t, n, r, o) { | |
"use strict"; | |
function i() { | |
this.$EventSubscriptionVendor_subscriptionsForType = {}, this.$EventSubscriptionVendor_currentSubscription = null | |
} | |
var a = t("invariant"); | |
i.prototype.addSubscription = function(e, t) { | |
t.subscriber !== this && a(0, "The subscriber of the subscription is incorrectly set."), this.$EventSubscriptionVendor_subscriptionsForType[e] || (this.$EventSubscriptionVendor_subscriptionsForType[e] = []); | |
var n = this.$EventSubscriptionVendor_subscriptionsForType[e].length; | |
return this.$EventSubscriptionVendor_subscriptionsForType[e].push(t), t.eventType = e, t.key = n, t | |
}, i.prototype.removeAllSubscriptions = function(e) { | |
void 0 === e ? this.$EventSubscriptionVendor_subscriptionsForType = {} : delete this.$EventSubscriptionVendor_subscriptionsForType[e] | |
}, i.prototype.removeSubscription = function(e) { | |
var t = e.eventType, | |
n = e.key, | |
r = this.$EventSubscriptionVendor_subscriptionsForType[t]; | |
r && delete r[n] | |
}, i.prototype.getSubscriptionsForType = function(e) { | |
return this.$EventSubscriptionVendor_subscriptionsForType[e] | |
}, o.exports = i | |
}), __d("RKAlertManager", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = t("NativeModulesDeprecated").RKAlertManager; | |
o.exports = i | |
}), __d("NativeModulesDeprecated", [], function(e, t, n, r, o) { | |
"use strict"; | |
o.exports = t("BatchedBridge").RemoteModulesDeprecated | |
}), __d("errorToString", [], function(e, t, n, r, o) { | |
"use strict"; | |
var i = function(e, t) { | |
for (var n = "", r = e.stack.split("\n"), o = 0, i = [], a = 0, s = r.length; s > a; a++) { | |
var l = r[a].split("@"), | |
u = l.length > 1, | |
c = u ? l[0] + " " : "<no name>"; | |
c.length > o && (o = c.length); | |
var d = "", | |
p = -1, | |
h = l[1] ? l[1] : l[0]; | |
if ("[native code]" === h) d = "native code"; | |
else { | |
var f = h.split(":"); | |
if (d = f[f.length - 3], p = parseInt(f[f.length - 2], 10), d) { | |
var m = d.match(/([a-zA-Z_]+).includeRequire.runModule.bundle$/); | |
m && (d = m[1]) | |
} | |
if (t) try { | |
var g = t.originalPositionFor({ | |
line: p, | |
column: null | |
}); | |
if (g) { | |
var _ = g.source.split("/"); | |
d = _[_.length - 1], p = g.line | |
} | |
} catch (y) {} | |
} | |
i.push([c, d, p ? p : "?"]) | |
} | |
for (var v = 0, S = i.length; S > v; v++) { | |
var w = i[v], | |
c = w[0]; | |
n += c; | |
for (var b = 0, R = o - c.length; R > b; b++) n += " "; | |
n += " " + w[1] + ":" + w[2] + "\n" | |
} | |
return n | |
}; | |
o.exports = i | |
}), __d("loadSourceMap", [], function(e, t, n, r, o) { | |
function i(t) { | |
if (void 0 !== s) return void t(s); | |
if (t && d.push(t), !p) { | |
var n = "http://localhost:8081" + e.SOURCE_MAPPING_URL; | |
p = new u, p.onreadystatechange = a, p.open("GET", n), p.send() | |
} | |
} | |
function a() { | |
if (4 === p.readyState) { | |
try { | |
200 !== p.status && c(0, "Non-OK http status code: " + p.status), s = new l(p.responseText) | |
} catch (e) { | |
console.warn("Failed to load source maps", e.message, e), s = null | |
} | |
d.forEach(function(e) { | |
return e(s) | |
}) | |
} | |
} | |
var s, l = t("SourceMap").SourceMapConsumer, | |
u = t("xmlhttprequest").XMLHttpRequest, | |
c = t("invariant"), | |
d = [], | |
p = null; | |
o.exports = i | |
}), __d("SourceMap", [], function(e, t, n, r, o) { | |
function i() { | |
function e(t, n, r) { | |
if ("string" != typeof t) throw new TypeError("Expected string, got: " + t); | |
if (2 == arguments.length && (r = n), t in e.modules) throw new Error("Module already defined: " + t); | |
e.modules[t] = r | |
} | |
function t() { | |
this.modules = {}, this._currentModule = null | |
} | |
e.modules = {}, | |
function() { | |
function n(e) { | |
for (var t = e.split("/"), n = 1; n < t.length;) ".." === t[n] ? t.splice(n - 1, 1) : "." === t[n] ? t.splice(n, 1) : n++; | |
return t.join("/") | |
} | |
function r(e, t) { | |
return e = e.trim(), t = t.trim(), /^\//.test(t) ? t : e.replace(/\/*$/, "/") + t | |
} | |
function o(e) { | |
var t = e.split("/"); | |
return t.pop(), t.join("/") | |
} | |
t.prototype.require = function(e, t) { | |
if (Array.isArray(e)) { | |
var n = e.map(function(e) { | |
return this.lookup(e) | |
}, this); | |
return void(t && t.apply(null, n)) | |
} | |
return this.lookup(e) | |
}, t.prototype.lookup = function(t) { | |
if (/^\./.test(t) && (t = n(r(o(this._currentModule), t))), t in this.modules) { | |
var i = this.modules[t]; | |
return i | |
} | |
if (!(t in e.modules)) throw new Error("Module not defined: " + t); | |
var i = e.modules[t]; | |
if ("function" == typeof i) { | |
var a = {}, | |
s = this._currentModule; | |
this._currentModule = t, i(this.require.bind(this), a, { | |
id: t, | |
uri: "" | |
}), this._currentModule = s, i = a | |
} | |
return this.modules[t] = i, i | |
} | |
}(), e.Domain = t, e.globalDomain = new t; | |
var n = e.globalDomain.require.bind(e.globalDomain); | |
e("source-map/source-map-generator", ["require", "exports", "module", "source-map/base64-vlq", "source-map/util", "source-map/array-set"], function(e, t) { | |
function n(e) { | |
this._file = o.getArg(e, "file"), this._sourceRoot = o.getArg(e, "sourceRoot", null), this._sources = new i, this._names = new i, this._mappings = [], this._sourcesContents = null | |
} | |
var r = e("./base64-vlq"), | |
o = e("./util"), | |
i = e("./array-set").ArraySet; | |
n.prototype._version = 3, n.fromSourceMap = function(e) { | |
var t = e.sourceRoot, | |
r = new n({ | |
file: e.file, | |
sourceRoot: t | |
}); | |
return e.eachMapping(function(e) { | |
var n = { | |
generated: { | |
line: e.generatedLine, | |
column: e.generatedColumn | |
} | |
}; | |
e.source && (n.source = e.source, t && (n.source = o.relative(t, n.source)), n.original = { | |
line: e.originalLine, | |
column: e.originalColumn | |
}, e.name && (n.name = e.name)), r.addMapping(n) | |
}), e.sources.forEach(function(t) { | |
var n = e.sourceContentFor(t); | |
n && r.setSourceContent(t, n) | |
}), r | |
}, n.prototype.addMapping = function(e) { | |
var t = o.getArg(e, "generated"), | |
n = o.getArg(e, "original", null), | |
r = o.getArg(e, "source", null), | |
i = o.getArg(e, "name", null); | |
this._validateMapping(t, n, r, i), r && !this._sources.has(r) && this._sources.add(r), i && !this._names.has(i) && this._names.add(i), this._mappings.push({ | |
generatedLine: t.line, | |
generatedColumn: t.column, | |
originalLine: null != n && n.line, | |
originalColumn: null != n && n.column, | |
source: r, | |
name: i | |
}) | |
}, n.prototype.setSourceContent = function(e, t) { | |
var n = e; | |
this._sourceRoot && (n = o.relative(this._sourceRoot, n)), null !== t ? (this._sourcesContents || (this._sourcesContents = {}), this._sourcesContents[o.toSetString(n)] = t) : (delete this._sourcesContents[o.toSetString(n)], 0 === Object.keys(this._sourcesContents).length && (this._sourcesContents = null)) | |
}, n.prototype.applySourceMap = function(e, t) { | |
t || (t = e.file); | |
var n = this._sourceRoot; | |
n && (t = o.relative(n, t)); | |
var r = new i, | |
a = new i; | |
this._mappings.forEach(function(i) { | |
if (i.source === t && i.originalLine) { | |
var s = e.originalPositionFor({ | |
line: i.originalLine, | |
column: i.originalColumn | |
}); | |
null !== s.source && (i.source = n ? o.relative(n, s.source) : s.source, i.originalLine = s.line, i.originalColumn = s.column, null !== s.name && null !== i.name && (i.name = s.name)) | |
} | |
var l = i.source; | |
l && !r.has(l) && r.add(l); | |
var u = i.name; | |
u && !a.has(u) && a.add(u) | |
}, this), this._sources = r, this._names = a, e.sources.forEach(function(t) { | |
var r = e.sourceContentFor(t); | |
r && (n && (t = o.relative(n, t)), this.setSourceContent(t, r)) | |
}, this) | |
}, n.prototype._validateMapping = function(e, t, n, r) { | |
if (!(e && "line" in e && "column" in e && e.line > 0 && e.column >= 0 && !t && !n && !r || e && "line" in e && "column" in e && t && "line" in t && "column" in t && e.line > 0 && e.column >= 0 && t.line > 0 && t.column >= 0 && n)) throw new Error("Invalid mapping: " + JSON.stringify({ | |
generated: e, | |
source: n, | |
orginal: t, | |
name: r | |
})) | |
}, n.prototype._serializeMappings = function() { | |
var e, t = 0, | |
n = 1, | |
i = 0, | |
a = 0, | |
s = 0, | |
l = 0, | |
u = ""; | |
this._mappings.sort(o.compareByGeneratedPositions); | |
for (var c = 0, d = this._mappings.length; d > c; c++) { | |
if (e = this._mappings[c], e.generatedLine !== n) | |
for (t = 0; e.generatedLine !== n;) u += ";", n++; | |
else if (c > 0) { | |
if (!o.compareByGeneratedPositions(e, this._mappings[c - 1])) continue; | |
u += "," | |
} | |
u += r.encode(e.generatedColumn - t), t = e.generatedColumn, e.source && (u += r.encode(this._sources.indexOf(e.source) - l), l = this._sources.indexOf(e.source), u += r.encode(e.originalLine - 1 - a), a = e.originalLine - 1, u += r.encode(e.originalColumn - i), i = e.originalColumn, e.name && (u += r.encode(this._names.indexOf(e.name) - s), s = this._names.indexOf(e.name))) | |
} | |
return u | |
}, n.prototype._generateSourcesContent = function(e, t) { | |
return e.map(function(e) { | |
if (!this._sourcesContents) return null; | |
t && (e = o.relative(t, e)); | |
var n = o.toSetString(e); | |
return Object.prototype.hasOwnProperty.call(this._sourcesContents, n) ? this._sourcesContents[n] : null | |
}, this) | |
}, n.prototype.toJSON = function() { | |
var e = { | |
version: this._version, | |
file: this._file, | |
sources: this._sources.toArray(), | |
names: this._names.toArray(), | |
mappings: this._serializeMappings() | |
}; | |
return this._sourceRoot && (e.sourceRoot = this._sourceRoot), this._sourcesContents && (e.sourcesContent = this._generateSourcesContent(e.sources, e.sourceRoot)), e | |
}, n.prototype.toString = function() { | |
return JSON.stringify(this) | |
}, t.SourceMapGenerator = n | |
}), e("source-map/base64-vlq", ["require", "exports", "module", "source-map/base64"], function(e, t) { | |
function n(e) { | |
return 0 > e ? (-e << 1) + 1 : (e << 1) + 0 | |
} | |
function r(e) { | |
var t = 1 === (1 & e), | |
n = e >> 1; | |
return t ? -n : n | |
} | |
var o = e("./base64"), | |
i = 5, | |
a = 1 << i, | |
s = a - 1, | |
l = a; | |
t.encode = function(e) { | |
var t, r = "", | |
a = n(e); | |
do t = a & s, a >>>= i, a > 0 && (t |= l), r += o.encode(t); while (a > 0); | |
return r | |
}, t.decode = function(e) { | |
var t, n, a = 0, | |
u = e.length, | |
c = 0, | |
d = 0; | |
do { | |
if (a >= u) throw new Error("Expected more digits in base 64 VLQ value."); | |
n = o.decode(e.charAt(a++)), t = !!(n & l), n &= s, c += n << d, d += i | |
} while (t); | |
return { | |
value: r(c), | |
rest: e.slice(a) | |
} | |
} | |
}), e("source-map/base64", ["require", "exports", "module"], function(e, t) { | |
var n = {}, | |
r = {}; | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(e, t) { | |
n[e] = t, r[t] = e | |
}), t.encode = function(e) { | |
if (e in r) return r[e]; | |
throw new TypeError("Must be between 0 and 63: " + e) | |
}, t.decode = function(e) { | |
if (e in n) return n[e]; | |
throw new TypeError("Not a valid base 64 digit: " + e) | |
} | |
}), e("source-map/util", ["require", "exports", "module"], function(e, t) { | |
function n(e, t, n) { | |
if (t in e) return e[t]; | |
if (3 === arguments.length) return n; | |
throw new Error('"' + t + '" is a required argument.') | |
} | |
function r(e) { | |
var t = e.match(p); | |
return t ? { | |
scheme: t[1], | |
auth: t[3], | |
host: t[4], | |
port: t[6], | |
path: t[7] | |
} : null | |
} | |
function o(e) { | |
var t = e.scheme + "://"; | |
return e.auth && (t += e.auth + "@"), e.host && (t += e.host), e.port && (t += ":" + e.port), e.path && (t += e.path), t | |
} | |
function i(e, t) { | |
var n; | |
return t.match(p) || t.match(h) ? t : "/" === t.charAt(0) && (n = r(e)) ? (n.path = t, o(n)) : e.replace(/\/$/, "") + "/" + t | |
} | |
function a(e) { | |
return "$" + e | |
} | |
function s(e) { | |
return e.substr(1) | |
} | |
function l(e, t) { | |
e = e.replace(/\/$/, ""); | |
var n = r(e); | |
return "/" == t.charAt(0) && n && "/" == n.path ? t.slice(1) : 0 === t.indexOf(e + "/") ? t.substr(e.length + 1) : t | |
} | |
function u(e, t) { | |
var n = e || "", | |
r = t || ""; | |
return (n > r) - (r > n) | |
} | |
function c(e, t, n) { | |
var r; | |
return (r = u(e.source, t.source)) ? r : (r = e.originalLine - t.originalLine) ? r : (r = e.originalColumn - t.originalColumn, r || n ? r : (r = u(e.name, t.name)) ? r : (r = e.generatedLine - t.generatedLine, r ? r : e.generatedColumn - t.generatedColumn)) | |
} | |
function d(e, t, n) { | |
var r; | |
return (r = e.generatedLine - t.generatedLine) ? r : (r = e.generatedColumn - t.generatedColumn, r || n ? r : (r = u(e.source, t.source)) ? r : (r = e.originalLine - t.originalLine) ? r : (r = e.originalColumn - t.originalColumn, r ? r : u(e.name, t.name))) | |
} | |
t.getArg = n; | |
var p = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/, | |
h = /^data:.+\,.+/; | |
t.urlParse = r, t.urlGenerate = o, t.join = i, t.toSetString = a, t.fromSetString = s, t.relative = l, t.compareByOriginalPositions = c, t.compareByGeneratedPositions = d | |
}), e("source-map/array-set", ["require", "exports", "module", "source-map/util"], function(e, t) { | |
function n() { | |
this._array = [], this._set = {} | |
} | |
var r = e("./util"); | |
n.fromArray = function(e, t) { | |
for (var r = new n, o = 0, i = e.length; i > o; o++) r.add(e[o], t); | |
return r | |
}, n.prototype.add = function(e, t) { | |
var n = this.has(e), | |
o = this._array.length; | |
(!n || t) && this._array.push(e), n || (this._set[r.toSetString(e)] = o) | |
}, n.prototype.has = function(e) { | |
return Object.prototype.hasOwnProperty.call(this._set, r.toSetString(e)) | |
}, n.prototype.indexOf = function(e) { | |
if (this.has(e)) return this._set[r.toSetString(e)]; | |
throw new Error('"' + e + '" is not in the set.') | |
}, n.prototype.at = function(e) { | |
if (e >= 0 && e < this._array.length) return this._array[e]; | |
throw new Error("No element indexed by " + e) | |
}, n.prototype.toArray = function() { | |
return this._array.slice() | |
}, t.ArraySet = n | |
}), e("source-map/source-map-consumer", ["require", "exports", "module", "source-map/util", "source-map/binary-search", "source-map/array-set", "source-map/base64-vlq"], function(e, t) { | |
function n(e) { | |
var t = e; | |
"string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ""))); | |
var n = r.getArg(t, "version"), | |
o = r.getArg(t, "sources"), | |
a = r.getArg(t, "names", []), | |
s = r.getArg(t, "sourceRoot", null), | |
l = r.getArg(t, "sourcesContent", null), | |
u = r.getArg(t, "mappings"), | |
c = r.getArg(t, "file", null); | |
if (n != this._version) throw new Error("Unsupported version: " + n); | |
this._names = i.fromArray(a, !0), this._sources = i.fromArray(o, !0), this.sourceRoot = s, this.sourcesContent = l, this._mappings = u, this.file = c | |
} | |
var r = e("./util"), | |
o = e("./binary-search"), | |
i = e("./array-set").ArraySet, | |
a = e("./base64-vlq"); | |
n.fromSourceMap = function(e) { | |
var t = Object.create(n.prototype); | |
return t._names = i.fromArray(e._names.toArray(), !0), t._sources = i.fromArray(e._sources.toArray(), !0), t.sourceRoot = e._sourceRoot, t.sourcesContent = e._generateSourcesContent(t._sources.toArray(), t.sourceRoot), t.file = e._file, t.__generatedMappings = e._mappings.slice().sort(r.compareByGeneratedPositions), t.__originalMappings = e._mappings.slice().sort(r.compareByOriginalPositions), t | |
}, n.prototype._version = 3, Object.defineProperty(n.prototype, "sources", { | |
get: function() { | |
return this._sources.toArray().map(function(e) { | |
return this.sourceRoot ? r.join(this.sourceRoot, e) : e | |
}, this) | |
} | |
}), n.prototype.__generatedMappings = null, Object.defineProperty(n.prototype, "_generatedMappings", { | |
get: function() { | |
return this.__generatedMappings || (this.__generatedMappings = [], this.__originalMappings = [], this._parseMappings(this._mappings, this.sourceRoot)), this.__generatedMappings | |
} | |
}), n.prototype.__originalMappings = null, Object.defineProperty(n.prototype, "_originalMappings", { | |
get: function() { | |
return this.__originalMappings || (this.__generatedMappings = [], this.__originalMappings = [], this._parseMappings(this._mappings, this.sourceRoot)), this.__originalMappings | |
} | |
}), n.prototype._parseMappings = function(e) { | |
for (var t, n, o = 1, i = 0, s = 0, l = 0, u = 0, c = 0, d = /^[,;]/, p = e; p.length > 0;) | |
if (";" === p.charAt(0)) o++, p = p.slice(1), i = 0; | |
else if ("," === p.charAt(0)) p = p.slice(1); | |
else { | |
if (t = {}, t.generatedLine = o, n = a.decode(p), t.generatedColumn = i + n.value, i = t.generatedColumn, p = n.rest, p.length > 0 && !d.test(p.charAt(0))) { | |
if (n = a.decode(p), t.source = this._sources.at(u + n.value), u += n.value, p = n.rest, 0 === p.length || d.test(p.charAt(0))) throw new Error("Found a source, but no line and column"); | |
if (n = a.decode(p), t.originalLine = s + n.value, s = t.originalLine, t.originalLine += 1, p = n.rest, 0 === p.length || d.test(p.charAt(0))) throw new Error("Found a source and line, but no column"); | |
n = a.decode(p), t.originalColumn = l + n.value, l = t.originalColumn, p = n.rest, p.length > 0 && !d.test(p.charAt(0)) && (n = a.decode(p), t.name = this._names.at(c + n.value), c += n.value, p = n.rest) | |
} | |
this.__generatedMappings.push(t), "number" == typeof t.originalLine && this.__originalMappings.push(t) | |
} | |
this.__originalMappings.sort(r.compareByOriginalPositions) | |
}, n.prototype._findMapping = function(e, t, n, r, i) { | |
if (e[n] <= 0) throw new TypeError("Line must be greater than or equal to 1, got " + e[n]); | |
if (e[r] < 0) throw new TypeError("Column must be greater than or equal to 0, got " + e[r]); | |
return o.search(e, t, i) | |
}, n.prototype.originalPositionFor = function(e) { | |
var t = { | |
generatedLine: r.getArg(e, "line"), | |
generatedColumn: r.getArg(e, "column") | |
}, | |
n = this._findMapping(t, this._generatedMappings, "generatedLine", "generatedColumn", r.compareByGeneratedPositions); | |
if (n) { | |
var o = r.getArg(n, "source", null); | |
return o && this.sourceRoot && (o = r.join(this.sourceRoot, o)), { | |
source: o, | |
line: r.getArg(n, "originalLine", null), | |
column: r.getArg(n, "originalColumn", null), | |
name: r.getArg(n, "name", null) | |
} | |
} | |
return { | |
source: null, | |
line: null, | |
column: null, | |
name: null | |
} | |
}, n.prototype.sourceContentFor = function(e) { | |
if (!this.sourcesContent) return null; | |
if (this.sourceRoot && (e = r.relative(this.sourceRoot, e)), this._sources.has(e)) return this.sourcesContent[this._sources.indexOf(e)]; | |
var t; | |
if (this.sourceRoot && (t = r.urlParse(this.sourceRoot))) { | |
var n = e.replace(/^file:\/\//, ""); | |
if ("file" == t.scheme && this._sources.has(n)) return this.sourcesContent[this._sources.indexOf(n)]; | |
if ((!t.path || "/" == t.path) && this._sources.has("/" + e)) return this.sourcesContent[this._sources.indexOf("/" + e)] | |
} | |
throw new Error('"' + e + '" is not in the SourceMap.') | |
}, n.prototype.generatedPositionFor = function(e) { | |
var t = { | |
source: r.getArg(e, "source"), | |
originalLine: r.getArg(e, "line"), | |
originalColumn: r.getArg(e, "column") | |
}; | |
this.sourceRoot && (t.source = r.relative(this.sourceRoot, t.source)); | |
var n = this._findMapping(t, this._originalMappings, "originalLine", "originalColumn", r.compareByOriginalPositions); | |
return n ? { | |
line: r.getArg(n, "generatedLine", null), | |
column: r.getArg(n, "generatedColumn", null) | |
} : { | |
line: null, | |
column: null | |
} | |
}, n.GENERATED_ORDER = 1, n.ORIGINAL_ORDER = 2, n.prototype.eachMapping = function(e, t, o) { | |
var i, a = t || null, | |
s = o || n.GENERATED_ORDER; | |
switch (s) { | |
case n.GENERATED_ORDER: | |
i = this._generatedMappings; | |
break; | |
case n.ORIGINAL_ORDER: | |
i = this._originalMappings; | |
break; | |
default: | |
throw new Error("Unknown order of iteration.") | |
} | |
var l = this.sourceRoot; | |
i.map(function(e) { | |
var t = e.source; | |
return t && l && (t = r.join(l, t)), { | |
source: t, | |
generatedLine: e.generatedLine, | |
generatedColumn: e.generatedColumn, | |
originalLine: e.originalLine, | |
originalColumn: e.originalColumn, | |
name: e.name | |
} | |
}).forEach(e, a) | |
}, t.SourceMapConsumer = n | |
}), e("source-map/binary-search", ["require", "exports", "module"], function(e, t) { | |
function n(e, t, r, o, i) { | |
var a = Math.floor((t - e) / 2) + e, | |
s = i(r, o[a], !0); | |
return 0 === s ? o[a] : s > 0 ? t - a > 1 ? n(a, t, r, o, i) : o[a] : a - e > 1 ? n(e, a, r, o, i) : 0 > e ? null : o[e] | |
} | |
t.search = function(e, t, r) { | |
return t.length > 0 ? n(-1, t.length, e, t, r) : null | |
} | |
}), e("source-map/source-node", ["require", "exports", "module", "source-map/source-map-generator", "source-map/util"], function(e, t) { | |
function n(e, t, n, r, o) { | |
this.children = [], this.sourceContents = {}, this.line = void 0 === e ? null : e, this.column = void 0 === t ? null : t, this.source = void 0 === n ? null : n, this.name = void 0 === o ? null : o, null != r && this.add(r) | |
} | |
var r = e("./source-map-generator").SourceMapGenerator, | |
o = e("./util"); | |
n.fromStringWithSourceMap = function(e, t) { | |
function r(e, t) { | |
o.add(null === e || void 0 === e.source ? t : new n(e.originalLine, e.originalColumn, e.source, t, e.name)) | |
} | |
var o = new n, | |
i = e.split("\n"), | |
a = 1, | |
s = 0, | |
l = null; | |
return t.eachMapping(function(e) { | |
if (null === l) { | |
for (; a < e.generatedLine;) o.add(i.shift() + "\n"), a++; | |
if (s < e.generatedColumn) { | |
var t = i[0]; | |
o.add(t.substr(0, e.generatedColumn)), i[0] = t.substr(e.generatedColumn), s = e.generatedColumn | |
} | |
} else if (a < e.generatedLine) { | |
var n = ""; | |
do n += i.shift() + "\n", a++, s = 0; while (a < e.generatedLine); | |
if (s < e.generatedColumn) { | |
var t = i[0]; | |
n += t.substr(0, e.generatedColumn), i[0] = t.substr(e.generatedColumn), s = e.generatedColumn | |
} | |
r(l, n) | |
} else { | |
var t = i[0], | |
n = t.substr(0, e.generatedColumn - s); | |
i[0] = t.substr(e.generatedColumn - s), s = e.generatedColumn, r(l, n) | |
} | |
l = e | |
}, this), r(l, i.join("\n")), t.sources.forEach(function(e) { | |
var n = t.sourceContentFor(e); | |
n && o.setSourceContent(e, n) | |
}), o | |
}, n.prototype.add = function(e) { | |
if (Array.isArray(e)) e.forEach(function(e) { | |
this.add(e) | |
}, this); | |
else { | |
if (!(e instanceof n || "string" == typeof e)) throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + e); | |
e && this.children.push(e) | |
} | |
return this | |
}, n.prototype.prepend = function(e) { | |
if (Array.isArray(e)) | |
for (var t = e.length - 1; t >= 0; t--) this.prepend(e[t]); | |
else { | |
if (!(e instanceof n || "string" == typeof e)) throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + e); | |
this.children.unshift(e) | |
} | |
return this | |
}, n.prototype.walk = function(e) { | |
for (var t, r = 0, o = this.children.length; o > r; r++) t = this.children[r], t instanceof n ? t.walk(e) : "" !== t && e(t, { | |
source: this.source, | |
line: this.line, | |
column: this.column, | |
name: this.name | |
}) | |
}, n.prototype.join = function(e) { | |
var t, n, r = this.children.length; | |
if (r > 0) { | |
for (t = [], n = 0; r - 1 > n; n++) t.push(this.children[n]), t.push(e); | |
t.push(this.children[n]), this.children = t | |
} | |
return this | |
}, n.prototype.replaceRight = function(e, t) { | |
var r = this.children[this.children.length - 1]; | |
return r instanceof n ? r.replaceRight(e, t) : "string" == typeof r ? this.children[this.children.length - 1] = r.replace(e, t) : this.children.push("".replace(e, t)), this | |
}, n.prototype.setSourceContent = function(e, t) { | |
this.sourceContents[o.toSetString(e)] = t | |
}, n.prototype.walkSourceContents = function(e) { | |
for (var t = 0, r = this.children.length; r > t; t++) this.children[t] instanceof n && this.children[t].walkSourceContents(e); | |
for (var i = Object.keys(this.sourceContents), t = 0, r = i.length; r > t; t++) e(o.fromSetString(i[t]), this.sourceContents[i[t]]) | |
}, n.prototype.toString = function() { | |
var e = ""; | |
return this.walk(function(t) { | |
e += t | |
}), e | |
}, n.prototype.toStringWithSourceMap = function(e) { | |
var t = { | |
code: "", | |
line: 1, | |
column: 0 | |
}, | |
n = new r(e), | |
o = !1, | |
i = null, | |
a = null, | |
s = null, | |
l = null; | |
return this.walk(function(e, r) { | |
t.code += e, null !== r.source && null !== r.line && null !== r.column ? ((i !== r.source || a !== r.line || s !== r.column || l !== r.name) && n.addMapping({ | |
source: r.source, | |
original: { | |
line: r.line, | |
column: r.column | |
}, | |
generated: { | |
line: t.line, | |
column: t.column | |
}, | |
name: r.name | |
}), i = r.source, a = r.line, s = r.column, l = r.name, o = !0) : o && (n.addMapping({ | |
generated: { | |
line: t.line, | |
column: t.column | |
} | |
}), i = null, o = !1), e.split("").forEach(function(e) { | |
"\n" === e ? (t.line++, t.column = 0) : t.column++ | |
}) | |
}), this.walkSourceContents(function(e, t) { | |
n.setSourceContent(e, t) | |
}), { | |
code: t.code, | |
map: n | |