Created
March 12, 2015 07:38
-
-
Save qdsang/91dbcb188234406b1e1d to your computer and use it in GitHub Desktop.
Facebook Groups React Native
This file has been truncated, but you can view the full file.
This file contains hidden or 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
__DEV__ = !1, | |
function(e) { | |
function t(e) { | |
for (var t, n, r, i, o = Array.prototype.slice.call(e), a = {}; o.length;) | |
if (n = o.shift(), !a[n] && (a[n] = !0, r = h[n], r && r.waiting)) | |
for (t = 0; t < r.dependencies.length; t++) i = r.dependencies[t], (!h[i] || h[i].waiting) && o.push(i); | |
for (n in a) v.call(a, n) && o.push(n); | |
var s = []; | |
for (t = 0; t < o.length; t++) { | |
n = o[t]; | |
var l = n; | |
if (r = h[n]) | |
if (r.waiting) { | |
for (var u = [], c = 0; c < r.dependencies.length; c++) i = r.dependencies[c], (!h[i] || h[i].waiting) && u.push(i); | |
l += " is waiting for " + u.join(", ") | |
} else l += " is ready"; | |
else l += " is not defined"; | |
s.push(l) | |
} | |
return s.join("\n") | |
} | |
function n(e) { | |
this.name = "ModuleError", this.message = e, this.stack = Error(e).stack, this.framesToPop = 2 | |
} | |
function r(i) { | |
var o, a, s, l = h[i]; | |
if (l && l.exports) return 1 === l.refcount-- && delete h[i], l.exports; | |
if (e.ErrorUtils && !e.ErrorUtils.inGuard()) return ErrorUtils.applyWithGuard(r, this, arguments); | |
if (!l) throw s = 'Requiring unknown module "' + i + '"', p && (s += ". It may not be loaded yet. Did you forget to run arc build?"), new n(s); | |
if (l.hasError) throw new n('Requiring module "' + i + '" which threw an exception'); | |
if (l.waiting) throw new n('Requiring module "' + i + '" with unresolved dependencies: ' + t([i])); | |
var u = l.exports = {}, | |
c = l.factory; | |
if ("[object Function]" === d.call(c)) { | |
var f, m = [], | |
g = l.dependencies, | |
_ = g.length; | |
l.special & y && (_ = Math.min(_, c.length)); | |
try { | |
for (a = 0; m.length < _; a++) o = g[a], l.inlineRequires[o] || m.push("module" === o ? l : "exports" === o ? u : r.call(null, o)); | |
++C, 0 === R++ && (w -= b()); | |
try { | |
f = c.apply(l.context || e, m) | |
} catch (v) { | |
if (h.ex && h.erx) { | |
var S = r.call(null, "ex"), | |
E = r.call(null, "erx"), | |
D = E(v.message); | |
D[0].indexOf(' from module "%s"') < 0 && (D[0] += ' from module "%s"', D[D.length] = i), v.message = S.apply(null, D) | |
} | |
throw v | |
} finally { | |
0 === --R && (w += b()) | |
} | |
} catch (v) { | |
throw l.hasError = !0, l.exports = null, v | |
} | |
if (f) { | |
if (p && "object" != typeof f && "function" != typeof f) throw new n('Factory for module "' + i + '" returned an invalid value "' + f + '". Returned value should be either a function or an object.'); | |
l.exports = f | |
} | |
} else l.exports = c; | |
return 1 === l.refcount-- && delete h[i], l.exports | |
} | |
function i(e, t, r, i, a, l, c) { | |
void 0 === t ? (t = [], r = e, e = s()) : void 0 === r && (r = t, "[object Array]" === d.call(e) ? (t = e, e = s()) : t = []); | |
var f = { | |
cancel: o.bind(this, e) | |
}, | |
g = h[e]; | |
if (g) return l && (g.refcount += l), f; | |
if (!t && !r && l) return m[e] = (m[e] || 0) + l, f; | |
if (g = { | |
id: e | |
}, g.refcount = (m[e] || 0) + (l || 0), delete m[e], p) { | |
if (!r || "object" != typeof r && "function" != typeof r && "string" != typeof r) throw new n('Invalid factory "' + r + '" for module "' + e + '". Factory should be either a function or an object.'); | |
if ("[object Array]" !== d.call(t)) throw new n('Invalid dependencies for module "' + e + '". Dependencies must be passed as an array.') | |
} | |
return g.factory = r, g.dependencies = t, g.context = a, g.special = i, g.inlineRequires = c || {}, g.waitingMap = {}, g.waiting = 0, g.hasError = !1, h[e] = g, u(e), f | |
} | |
function o(e) { | |
if (h[e]) { | |
var t = h[e]; | |
delete h[e]; | |
for (var n in t.waitingMap) t.waitingMap[n] && delete f[n][e]; | |
for (var r = 0; r < t.dependencies.length; r++) n = t.dependencies[r], h[n] ? 1 === h[n].refcount-- && o(n) : m[n] && m[n] -- | |
} | |
} | |
function a(e, t, n) { | |
return i(e, t, void 0, _, n, 1) | |
} | |
function s() { | |
return "__mod__" + g++ | |
} | |
function l(e, t) { | |
e.waitingMap[t] || e.id === t || (e.waiting++, e.waitingMap[t] = 1, f[t] || (f[t] = {}), f[t][e.id] = 1) | |
} | |
function u(e) { | |
var t, n, i, o = [], | |
a = h[e]; | |
for (n = 0; n < a.dependencies.length; n++) | |
if (t = a.dependencies[n], h[t]) { | |
if (h[t].waiting) | |
for (i in h[t].waitingMap) h[t].waitingMap[i] && l(a, i) | |
} else l(a, t); | |
if (0 === a.waiting && a.special & _ && o.push(e), f[e]) { | |
var s, u = f[e]; | |
f[e] = void 0; | |
for (t in u) { | |
s = h[t]; | |
for (i in a.waitingMap) a.waitingMap[i] && l(s, i); | |
s.waitingMap[e] && (s.waitingMap[e] = void 0, s.waiting--), 0 === s.waiting && s.special & _ && o.push(t) | |
} | |
} | |
for (n = 0; n < o.length; n++) r.call(null, o[n]) | |
} | |
function c(e, t) { | |
var n = h[e] = { | |
id: e | |
}; | |
n.exports = t, n.refcount = 0 | |
} | |
if (!e.require) { | |
var p = e.__DEV__, | |
d = Object.prototype.toString, | |
h = {}, | |
f = {}, | |
m = {}, | |
g = 0, | |
_ = 1, | |
y = 2, | |
v = Object.prototype.hasOwnProperty; | |
n.prototype = Object.create(Error.prototype), n.prototype.constructor = n; | |
var S = e.performance || e.msPerformance || e.webkitPerformance || {}; | |
S.now || (S = e.Date); | |
var b = S ? S.now.bind(S) : function() { | |
return 0 | |
}, | |
R = 0, | |
w = 0, | |
C = 0; | |
r.__getFactoryTime = function() { | |
return (R ? b() : 0) + w | |
}, r.__getTotalFactories = function() { | |
return C | |
}, c("module", 0), c("exports", 0), c("define", i), c("global", e), c("require", r), c("requireDynamic", r), c("requireLazy", a), i.amd = {}, e.define = i, e.require = r, e.requireDynamic = r, e.requireLazy = a, r.__debug = { | |
modules: h, | |
deps: f, | |
printDependencyInfo: function() { | |
if (e.console) { | |
var n = Object.keys(r.__debug.deps); | |
e.console.log(t(n)) | |
} | |
} | |
}, e.__d = function(e, t, n, r, o) { | |
var a = ["global", "require", "requireDynamic", "requireLazy", "module", "exports"]; | |
i(e, a.concat(t), n, r || y, null, null, o) | |
} | |
} | |
}(this), 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 i = Object.prototype.hasOwnProperty; | |
if (!i.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) { | |
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 o in r) | |
if (r.hasOwnProperty(o)) { | |
var a = r[o]; | |
a[n] = o, 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 i = t[r][e].toString(); | |
l[r] = l[r] || [], l[r][n] = i, u[n] = Math.max(u[n], i.length) | |
} | |
}); | |
for (var c = function(e, t) { | |
var n = e.map(function(e, t) { | |
var n = i(" ", u[t] - e.length).join(""); | |
return e + n | |
}); | |
return t = t || " ", n.join(t + "|" + t) | |
}, p = u.map(function(e) { | |
return i("-", e).join("") | |
}), d = c(p, "-"), h = c(s), f = [h, d], m = 0; m < t.length; m++) f.push(c(l[m])); | |
e.nativeLoggingHook("\n" + f.join("\n")) | |
} | |
if (e.nativeLoggingHook) { | |
var i = 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 (i) { | |
n._globalHandler && n._globalHandler(i) | |
} 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 i() { | |
return n.applyWithGuard(e, r || this, arguments, null, t) | |
} | |
return "function" != typeof e ? (console.warn("A function must be passed to ErrorUtils.guard, got ", e), null) : (t = t || e.name || "<generated guard>", i) | |
} | |
}; | |
e.ErrorUtils = n, t() | |
}(this), __d("RCTMainBundle", ["Bundler", "GroupsFeedApp", "GroupsPermalinkApp", "GroupsPendingPostsApp", "GroupsPostSearchApp", "GroupsReportedPostsApp", "DliteCatalystProfiler"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("Bundler"); | |
o.registerConfig([{ | |
appKey: "GroupsFeedApp", | |
component: function() { | |
return t("GroupsFeedApp") | |
} | |
}, { | |
appKey: "GroupsPermalinkApp", | |
component: function() { | |
return t("GroupsPermalinkApp") | |
} | |
}, { | |
appKey: "GroupsPendingPostsApp", | |
component: function() { | |
return t("GroupsPendingPostsApp") | |
} | |
}, { | |
appKey: "GroupsPostSearchApp", | |
component: function() { | |
return t("GroupsPostSearchApp") | |
} | |
}, { | |
appKey: "GroupsReportedPostsApp", | |
component: function() { | |
return t("GroupsReportedPostsApp") | |
} | |
}]), t("DliteCatalystProfiler").install(), i.exports = o | |
}), __d("Bundler", ["invariant", "renderApplication", "RCTRenderingPerf"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() {} | |
var a = t("invariant"), | |
s = t("renderApplication"); | |
__DEV__ && t("RCTRenderingPerf"); | |
var l = {}; | |
o.registerConfig = function(e) { | |
for (var t = 0; t < e.length; ++t) e[t].run ? o.registerRunnable(e[t].appKey, e[t].run) : o.registerComponent(e[t].appKey, e[t].component) | |
}, o.registerComponent = function(e, t) { | |
return l[e] = { | |
run: function(e) { | |
return s(t(), e.initialProps, e.rootTag) | |
} | |
}, e | |
}, o.registerRunnable = function(e, t) { | |
return l[e] = { | |
run: t | |
}, e | |
}, o.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) | |
}, i.exports = o | |
}), __d("invariant", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function(e, t, n, r, i, o, 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, i, o, a, s], | |
c = 0; | |
l = new Error("Invariant Violation: " + t.replace(/%s/g, function() { | |
return u[c++] | |
})) | |
} | |
throw l.framesToPop = 1, l | |
} | |
}; | |
i.exports = o | |
}), __d("renderApplication", ["React", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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"); | |
i.exports = o | |
}), __d("React", ["ReactIOS"], function(e, t, n, r, i) { | |
"use strict"; | |
i.exports = t("ReactIOS") | |
}), __d("ReactIOS", ["ReactComponent", "ReactCompositeComponent", "ReactContext", "ReactCurrentOwner", "ReactElement", "ReactElementValidator", "ReactInstanceHandles", "ReactIOSDefaultInjection", "ReactIOSMount", "ReactLegacyElement", "ReactPropTypes", "deprecated", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactComponent"), | |
a = t("ReactCompositeComponent"), | |
s = t("ReactContext"), | |
l = t("ReactCurrentOwner"), | |
u = t("ReactElement"), | |
c = t("ReactElementValidator"), | |
p = t("ReactInstanceHandles"), | |
d = t("ReactIOSDefaultInjection"), | |
h = t("ReactIOSMount"), | |
f = t("ReactLegacyElement"), | |
m = t("ReactPropTypes"), | |
g = t("deprecated"), | |
_ = t("invariant"); | |
d.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]) | |
}, | |
b = 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 | |
}, | |
R = function(e, t) { | |
h.renderComponent(e, t) | |
}, | |
w = { | |
hasReactIOSInitialized: !1, | |
PropTypes: m, | |
createClass: a.createClass, | |
createElement: y, | |
createFactory: v, | |
_augmentElement: b, | |
render: R, | |
unmountComponentAtNode: h.unmountComponentAtNode, | |
__internals: { | |
Component: o, | |
CurrentOwner: l, | |
InstanceHandles: p, | |
Mount: h | |
}, | |
__spread: Object.assign, | |
unmountComponentAtNodeAndRemoveContainer: h.unmountComponentAtNodeAndRemoveContainer, | |
isValidClass: u.isValidFactory, | |
isValidElement: u.isValidElement, | |
renderComponent: g("React", "renderComponent", "render", this, R), | |
isValidComponent: g("React", "isValidComponent", "isValidElement", this, u.isValidElement) | |
}; | |
i.exports = w | |
}), __d("ReactComponent", ["ReactElement", "ReactOwner", "ReactUpdates", "invariant", "keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactElement"), | |
a = t("ReactOwner"), | |
s = t("ReactUpdates"), | |
l = t("invariant"), | |
u = t("keyMirror"), | |
c = u({ | |
MOUNTED: null, | |
UNMOUNTED: null | |
}), | |
p = !1, | |
d = null, | |
h = null, | |
f = { | |
injection: { | |
injectEnvironment: function(e) { | |
p && l(0, "ReactComponent: injectEnvironment() can only be called once."), h = e.mountImageIntoNode, d = e.unmountIDFromEnvironment, f.BackendIDOperations = e.BackendIDOperations, p = !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 = o.cloneAndReplaceProps(this._pendingElement || this._currentElement, e), s.enqueueUpdate(this, t) | |
}, | |
_setPropsInternal: function(e, t) { | |
var n = this._pendingElement || this._currentElement; | |
this._pendingElement = o.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 i = this._currentElement._owner; | |
a.addComponentAsRefTo(this, r, i) | |
} | |
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), d(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 i = this.mountComponent(e, n, 0); | |
h(i, t, r) | |
}, | |
isOwnedBy: function(e) { | |
return this._owner === e | |
}, | |
getSiblingByRef: function(e) { | |
var t = this._owner; | |
return t && t.refs ? t.refs[e] : null | |
} | |
} | |
}; | |
i.exports = f | |
}), __d("ReactElement", ["ReactContext", "ReactCurrentOwner", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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) o(e, n); | |
p = !0 | |
} catch (r) {} | |
} | |
var s = t("ReactContext"), | |
l = t("ReactCurrentOwner"), | |
u = t("warning"), | |
c = { | |
key: !0, | |
ref: !0 | |
}, | |
p = !1, | |
d = function(e, t, n, r, i, o) { | |
return this.type = e, this.key = t, this.ref = n, this._owner = r, this._context = i, __DEV__ && (this._store = { | |
validated: !1, | |
props: o | |
}, p) ? void Object.freeze(this) : void(this.props = o) | |
}; | |
__DEV__ && a(d.prototype), d.prototype._isReactElement = !0, d.createElement = function(e, t, n) { | |
var r, i = {}, | |
o = null, | |
a = null; | |
if (null != t) { | |
a = void 0 === t.ref ? null : t.ref, o = void 0 === t.key ? null : "" + t.key; | |
for (r in t) t.hasOwnProperty(r) && !c.hasOwnProperty(r) && (i[r] = t[r]) | |
} | |
var u = arguments.length - 2; | |
if (1 === u) i.children = n; | |
else if (u > 1) { | |
for (var p = Array(u), h = 0; u > h; h++) p[h] = arguments[h + 2]; | |
i.children = p | |
} | |
if (e.defaultProps) { | |
var f = e.defaultProps; | |
for (r in f) "undefined" == typeof i[r] && (i[r] = f[r]) | |
} | |
return new d(e, o, a, l.current, s.current, i) | |
}, d.createFactory = function(e) { | |
var t = d.createElement.bind(null, e); | |
return t.type = e, t | |
}, d.cloneAndReplaceProps = function(e, t) { | |
var n = new d(e.type, e.key, e.ref, e._owner, e._context, t); | |
return __DEV__ && (n._store.validated = e._store.validated), n | |
}, d.isValidElement = function(e) { | |
var t = !(!e || !e._isReactElement); | |
return t | |
}, i.exports = d | |
}), __d("ReactContext", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
current: {}, | |
withContext: function(e, t) { | |
var n, r = o.current; | |
o.current = Object.assign({}, r, e); | |
try { | |
n = t() | |
} finally { | |
o.current = r | |
} | |
return n | |
} | |
}; | |
i.exports = o | |
}), __d("ReactCurrentOwner", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
current: null | |
}; | |
i.exports = o | |
}), __d("warning", ["emptyFunction"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("emptyFunction"), | |
a = o; | |
__DEV__ && (a = function(e, t) { | |
for (var n = [], r = 2, i = arguments.length; i > 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 o = 0; | |
console.warn("Warning: " + t.replace(/%s/g, function() { | |
return n[o++] | |
})) | |
} | |
}), i.exports = a | |
}), __d("emptyFunction", [], function(e, t, n, r, i) { | |
function o(e) { | |
return function() { | |
return e | |
} | |
} | |
function a() {} | |
Object.assign(a, { | |
thatReturns: o, | |
thatReturnsFalse: o(!1), | |
thatReturnsTrue: o(!0), | |
thatReturnsNull: o(null), | |
thatReturnsThis: function() { | |
return this | |
}, | |
thatReturnsArgument: function(e) { | |
return e | |
} | |
}), i.exports = a | |
}), __d("ReactOwner", ["emptyObject", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = 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 = o | |
}, | |
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 === o ? this.refs = {} : this.refs; | |
n[e] = t | |
}, | |
detachRef: function(e) { | |
delete this.refs[e] | |
} | |
} | |
}; | |
i.exports = s | |
}), __d("emptyObject", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = {}; | |
__DEV__ && Object.freeze(o), i.exports = o | |
}), __d("ReactUpdates", ["CallbackQueue", "PooledClass", "ReactCurrentOwner", "ReactPerf", "Transaction", "invariant", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
x.ReactReconcileTransaction && R || _(0, "ReactUpdates: must inject a reconcile transaction class and batching strategy") | |
} | |
function a() { | |
this.reinitializeTransaction(), this.dirtyComponentsLength = null, this.callbackQueue = d.getPooled(), this.reconcileTransaction = x.ReactReconcileTransaction.getPooled() | |
} | |
function s(e, t, n) { | |
o(), R.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 i = r._pendingCallbacks; | |
if (r._pendingCallbacks = null, r.performUpdateIfNecessary(e.reconcileTransaction), i) | |
for (var o = 0; o < i.length; o++) e.callbackQueue.enqueue(i[o], 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."), o(), 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."), R.isBatchingUpdates ? (v.push(e), void(t && (e._pendingCallbacks ? e._pendingCallbacks.push(t) : e._pendingCallbacks = [t]))) : void R.batchedUpdates(c, e, t) | |
} | |
function p(e, t) { | |
R.isBatchingUpdates || _(0, "ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."), S.enqueue(e, t), b = !0 | |
} | |
var d = t("CallbackQueue"), | |
h = t("PooledClass"), | |
f = t("ReactCurrentOwner"), | |
m = t("ReactPerf"), | |
g = t("Transaction"), | |
_ = t("invariant"), | |
y = t("warning"), | |
v = [], | |
S = d.getPooled(), | |
b = !1, | |
R = null, | |
w = { | |
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 = [w, C]; | |
Object.assign(a.prototype, g.Mixin, { | |
getTransactionWrappers: function() { | |
return E | |
}, | |
destructor: function() { | |
this.dirtyComponentsLength = null, d.release(this.callbackQueue), this.callbackQueue = null, x.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 || b;) { | |
if (v.length) { | |
var e = a.getPooled(); | |
e.perform(u, null, e), a.release(e) | |
} | |
if (b) { | |
b = !1; | |
var t = S; | |
S = d.getPooled(), t.notifyAll(), d.release(t) | |
} | |
} | |
}), | |
T = { | |
injectReconcileTransaction: function(e) { | |
e || _(0, "ReactUpdates: must provide a reconcile transaction class"), x.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"), R = e | |
} | |
}, | |
x = { | |
ReactReconcileTransaction: null, | |
batchedUpdates: s, | |
enqueueUpdate: c, | |
flushBatchedUpdates: D, | |
injection: T, | |
asap: p | |
}; | |
i.exports = x | |
}), __d("CallbackQueue", ["PooledClass", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this._callbacks = null, this._contexts = null | |
} | |
var a = t("PooledClass"), | |
s = t("invariant"); | |
Object.assign(o.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(o), i.exports = o | |
}), __d("PooledClass", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = 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 i = r.instancePool.pop(); | |
return r.call(i, e, t, n), i | |
} | |
return new r(e, t, n) | |
}, | |
u = function(e, t, n, r, i) { | |
var o = this; | |
if (o.instancePool.length) { | |
var a = o.instancePool.pop(); | |
return o.call(a, e, t, n, r, i), a | |
} | |
return new o(e, t, n, r, i) | |
}, | |
c = function(e) { | |
var t = this; | |
e instanceof t || o(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) | |
}, | |
p = 10, | |
d = a, | |
h = function(e, t) { | |
var n = e; | |
return n.instancePool = [], n.getPooled = t || d, n.poolSize || (n.poolSize = p), n.release = c, n | |
}, | |
f = { | |
addPoolingTo: h, | |
oneArgumentPooler: a, | |
twoArgumentPooler: s, | |
threeArgumentPooler: l, | |
fiveArgumentPooler: u | |
}; | |
i.exports = f | |
}), __d("ReactPerf", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
return n | |
} | |
var a = { | |
enableMeasure: !1, | |
storedMeasure: o, | |
measure: function(e, t, n) { | |
if (__DEV__) { | |
var r = null, | |
i = function() { | |
return a.enableMeasure ? (r || (r = a.storedMeasure(e, t, n)), r.apply(this, arguments)) : n.apply(this, arguments) | |
}; | |
return i.displayName = e + "_" + t, i | |
} | |
return n | |
}, | |
injection: { | |
injectMeasure: function(e) { | |
a.storedMeasure = e | |
} | |
} | |
}; | |
i.exports = a | |
}), __d("Transaction", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = 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, i, a, s, l) { | |
this.isInTransaction() && o(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, i, a, s, l), u = !1 | |
} finally { | |
try { | |
if (u) try { | |
this.closeAll(0) | |
} catch (p) {} 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 (i) {} | |
} | |
} | |
}, | |
closeAll: function(e) { | |
this.isInTransaction() || o(0, "Transaction.closeAll(): Cannot close transaction when none are open."); | |
for (var t = this.transactionWrappers, n = e; n < t.length; n++) { | |
var r, i = t[n], | |
a = this.wrapperInitData[n]; | |
try { | |
r = !0, a !== s.OBSERVED_ERROR && i.close && i.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: {} | |
}; | |
i.exports = s | |
}), __d("keyMirror", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = function(e) { | |
var t, n = {}; | |
e instanceof Object && !Array.isArray(e) || o(0, "keyMirror(...): Argument must be an object."); | |
for (t in e) e.hasOwnProperty(t) && (n[t] = t); | |
return n | |
}; | |
i.exports = a | |
}), __d("ReactCompositeComponent", ["ReactComponent", "ReactContext", "ReactCurrentOwner", "ReactElement", "ReactElementValidator", "ReactEmptyComponent", "ReactErrorUtils", "ReactLegacyElement", "ReactOwner", "ReactPerf", "ReactPropTransferer", "ReactPropTypeLocations", "ReactPropTypeLocationNames", "ReactUpdates", "instantiateReactComponent", "invariant", "keyMirror", "keyOf", "monitorCodeUse", "mapObject", "shouldUpdateReactComponent", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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] && P(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; | |
H.hasOwnProperty(t) && n !== O.OVERRIDE_BASE && P(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 && P(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 || P(0, "replaceState(...): Can only update a mounted or mounting component."), null != g.current && P(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 && P(0, "replaceState(...): Cannot update while unmounting component. This usually means you called setState() on an unmounted component.") | |
} | |
function u(e, t) { | |
if (t) { | |
b.isValidFactory(t) && P(0, "ReactCompositeComponent: You're attempting to use a component class as a mixin. Instead, just use a regular object."), _.isValidElement(t) && P(0, "ReactCompositeComponent: You're attempting to use a component as a mixin. Instead, just use a regular object."); | |
var n = e.prototype; | |
t.hasOwnProperty(k) && $.mixins(e, t.mixins); | |
for (var r in t) | |
if (t.hasOwnProperty(r) && r !== k) { | |
var i = t[r]; | |
if (s(n, r), $.hasOwnProperty(r)) $[r](e, i); | |
else { | |
var o = G.hasOwnProperty(r), | |
a = n.hasOwnProperty(r), | |
l = i && i.__reactDontBind, | |
u = "function" == typeof i, | |
c = u && !o && !a && !l; | |
if (c) n.__reactAutoBindMap || (n.__reactAutoBindMap = {}), n.__reactAutoBindMap[r] = i, n[r] = i; | |
else if (a) { | |
var p = G[r]; | |
(!o || p !== O.DEFINE_MANY_MERGED && p !== O.DEFINE_MANY) && P(0, "ReactCompositeComponent: Unexpected spec policy %s for key %s when mixing in component specs.", p, r), p === O.DEFINE_MANY_MERGED ? n[r] = d(n[r], i) : p === O.DEFINE_MANY && (n[r] = h(n[r], i)) | |
} else n[r] = i, __DEV__ && "function" == typeof i && 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 i = n in $; | |
i && P(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 o = n in e; | |
o && P(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 p(e, t) { | |
return e && t && "object" == typeof e && "object" == typeof t || P(0, "mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects"), M(t, function(t, n) { | |
void 0 !== e[n] && P(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 d(e, t) { | |
return function() { | |
var n = e.apply(this, arguments), | |
r = t.apply(this, arguments); | |
return null == n ? r : null == r ? n : p(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"), | |
b = t("ReactLegacyElement"), | |
R = t("ReactOwner"), | |
w = t("ReactPerf"), | |
C = t("ReactPropTransferer"), | |
E = t("ReactPropTypeLocations"), | |
D = t("ReactPropTypeLocationNames"), | |
T = t("ReactUpdates"), | |
x = t("instantiateReactComponent"), | |
P = t("invariant"), | |
I = t("keyMirror"), | |
F = t("keyOf"), | |
L = t("monitorCodeUse"), | |
M = t("mapObject"), | |
Q = t("shouldUpdateReactComponent"), | |
A = t("warning"), | |
k = F({ | |
mixins: null | |
}), | |
O = I({ | |
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 ? d(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 = I({ | |
MOUNTING: null, | |
UNMOUNTING: null, | |
RECEIVING_PROPS: null | |
}), | |
H = { | |
construct: function() { | |
f.Mixin.construct.apply(this, arguments), R.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: w.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)) && P(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 = x(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 && P(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 && T.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 && P(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 || P(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 i in e) | |
if (e.hasOwnProperty(i)) { | |
var a = e[i](t, i, r, n); | |
if (a instanceof Error) { | |
var s = o(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, | |
i = this._currentElement; | |
null != this._pendingElement && (i = this._pendingElement, n = this._processContext(i._context), r = this._processProps(i.props), this._pendingElement = null, this._compositeLifeCycleState = B.RECEIVING_PROPS, this.componentWillReceiveProps && this.componentWillReceiveProps(r, n)), this._compositeLifeCycleState = null; | |
var o = this._pendingState || this.state; | |
this._pendingState = null; | |
var a = this._pendingForceUpdate || !this.shouldComponentUpdate || this.shouldComponentUpdate(r, o, 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(i, r, o, n, e)) : (this._currentElement = i, this.props = r, this.state = o, this.context = n, this._owner = i._owner) | |
} | |
}, | |
_performComponentUpdate: function(e, t, n, r, i) { | |
var o = 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(i, o), this.componentDidUpdate && i.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: w.measure("ReactCompositeComponent", "updateComponent", function(e, t) { | |
f.Mixin.updateComponent.call(this, e, t); | |
var n = this._renderedComponent, | |
r = n._currentElement, | |
i = this._renderValidatedComponent(); | |
if (Q(r, i)) n.receiveComponent(i, e); | |
else { | |
var o = this._rootNodeID, | |
a = n._rootNodeID; | |
n.unmountComponent(), this._renderedComponent = x(i, this._currentElement.type); | |
var s = this._renderedComponent.mountComponent(o, e, this._mountDepth + 1); | |
f.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(a, s) | |
} | |
}), | |
forceUpdate: function(e) { | |
var t = this._compositeLifeCycleState; | |
this.isMounted() || t === B.MOUNTING || P(0, "forceUpdate(...): Can only force an update on mounted or mounting components."), (t === B.UNMOUNTING || null != g.current) && P(0, "forceUpdate(...): Cannot force an update while unmounting component or within a `render` function."), this._pendingForceUpdate = !0, T.enqueueUpdate(this, e) | |
}, | |
_renderValidatedComponent: w.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) || P(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, | |
i = n.bind; | |
n.bind = function(o) { | |
for (var a = [], s = 1, l = arguments.length; l > s; s++) a.push(arguments[s]); | |
if (o !== t && null !== o) 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 = i.apply(n, arguments); | |
return u.__reactBoundContext = t, u.__reactBoundMethod = e, u.__reactBoundArguments = a, u | |
} | |
} | |
return n | |
} | |
}, | |
V = function() {}; | |
Object.assign(V.prototype, f.Mixin, R.Mixin, C.Mixin, H); | |
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 || P(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 b.wrapFactory(__DEV__ ? y.createFactory(t) : _.createFactory(t)) | |
}, | |
injection: { | |
injectMixin: function(e) { | |
N.push(e) | |
} | |
} | |
}; | |
i.exports = q | |
}), __d("ReactElementValidator", ["ReactElement", "ReactPropTypeLocations", "ReactCurrentOwner", "monitorCodeUse"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
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 i = o(), | |
a = r.displayName, | |
s = i || a, | |
l = g[e]; | |
if (!l.hasOwnProperty(s)) { | |
l[s] = !0, t += i ? " Check the render method of " + i + "." : " 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 = o() || ""; | |
_.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]; | |
d.isValidElement(r) && a(r, t) | |
} else if (d.isValidElement(e)) e._store.validated = !0; | |
else if (e && "object" == typeof e) { | |
u(); | |
for (var i in e) s(i, e[i], t) | |
} | |
} | |
function p(e, t, n, r) { | |
for (var i in t) | |
if (t.hasOwnProperty(i)) { | |
var o; | |
try { | |
o = t[i](n, i, e, r) | |
} catch (a) { | |
o = a | |
} | |
o instanceof Error && !(o.message in y) && (y[o.message] = !0, m("react_failed_descriptor_type_check", { | |
message: o.message | |
})) | |
} | |
} | |
var d = 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 = d.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 && p(r, e.propTypes, t.props, h.prop), e.contextTypes && p(r, e.contextTypes, t._context, h.context), t | |
}, | |
createFactory: function(e) { | |
var t = S.createElement.bind(null, e); | |
return t.type = e, t | |
} | |
}; | |
i.exports = S | |
}), __d("ReactPropTypeLocations", ["keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("keyMirror"), | |
a = o({ | |
prop: null, | |
context: null, | |
childContext: null | |
}); | |
i.exports = a | |
}), __d("monitorCodeUse", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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"); | |
i.exports = o | |
}), __d("ReactEmptyComponent", ["ReactElement", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
return u || p(0, "Trying to return null from a render, but no null placeholder component was injected."), u() | |
} | |
function a(e) { | |
d[e] = !0 | |
} | |
function s(e) { | |
delete d[e] | |
} | |
function l(e) { | |
return d[e] | |
} | |
var u, c = t("ReactElement"), | |
p = t("invariant"), | |
d = {}, | |
h = { | |
injectEmptyComponent: function(e) { | |
u = c.createFactory(e) | |
} | |
}, | |
f = { | |
deregisterNullComponentID: s, | |
getEmptyComponent: o, | |
injection: h, | |
isNullComponentID: l, | |
registerNullComponentID: a | |
}; | |
i.exports = f | |
}), __d("ReactErrorUtils", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
guard: function(e) { | |
return e | |
} | |
}; | |
i.exports = o | |
}), __d("ReactLegacyElement", ["ReactCurrentOwner", "invariant", "monitorCodeUse", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
if (g._isLegacyCallWarningEnabled) { | |
var e = u.current, | |
t = e && e.constructor ? e.constructor.displayName : ""; | |
t || (t = "Something"), h.hasOwnProperty(t) || (h[t] = !0, d(!1, t + " is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory"), p("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) d(!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) {} | |
p("react_non_component_in_jsx", { | |
version: 3, | |
name: e.name | |
}) | |
} | |
d(!1, "This JSX uses a plain function. Only React components are valid in React's JSX transform.") | |
} | |
} | |
function s(e) { | |
d(!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 i = r.bind(t); | |
for (var o in r) r.hasOwnProperty(o) && (i[o] = r[o]); | |
e[n] = i | |
} else e[n] = r | |
} | |
} | |
var u = t("ReactCurrentOwner"), | |
c = t("invariant"), | |
p = t("monitorCodeUse"), | |
d = 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__ && o(), 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, i.exports = g | |
}), __d("ReactPropTransferer", ["emptyFunction", "invariant", "joinClasses", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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"), | |
p = !1, | |
d = o(function(e, t) { | |
return Object.assign({}, t, e) | |
}), | |
h = { | |
children: s, | |
className: o(u), | |
style: d | |
}, | |
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__ && (p || (p = !0, c(!1, "transferPropsTo is deprecated. See http://fb.me/react-transferpropsto for more information."))), a(e.props, this.props), e | |
} | |
} | |
}; | |
i.exports = f | |
}), __d("joinClasses", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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 | |
} | |
i.exports = o | |
}), __d("ReactPropTypeLocationNames", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = {}; | |
__DEV__ && (o = { | |
prop: "prop", | |
context: "context", | |
childContext: "child context" | |
}), i.exports = o | |
}), __d("instantiateReactComponent", ["warning", "ReactElement", "ReactLegacyElement", "ReactNativeComponent", "ReactEmptyComponent"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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"); | |
i.exports = o | |
}), __d("ReactNativeComponent", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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: o, | |
injection: u | |
}; | |
i.exports = c | |
}), __d("keyOf", [], function(e, t, n, r, i) { | |
var o = function(e) { | |
var t; | |
for (t in e) | |
if (e.hasOwnProperty(t)) return t; | |
return null | |
}; | |
i.exports = o | |
}), __d("mapObject", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
if (!e) return null; | |
var r = {}; | |
for (var i in e) a.call(e, i) && (r[i] = t.call(n, e[i], i, e)); | |
return r | |
} | |
var a = Object.prototype.hasOwnProperty; | |
i.exports = o | |
}), __d("shouldUpdateReactComponent", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
return e && t && e.type === t.type && e.key === t.key && e._owner === t._owner ? !0 : !1 | |
} | |
i.exports = o | |
}), __d("ReactInstanceHandles", ["ReactRootIndex", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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 p(e, t) { | |
var n = Math.min(e.length, t.length); | |
if (0 === n) return ""; | |
for (var r = 0, i = 0; n >= i; i++) | |
if (a(e, i) && a(t, i)) r = i; | |
else if (e.charAt(i) !== t.charAt(i)) break; | |
var o = e.substr(0, r); | |
return s(o) || f(0, "getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s", e, t, o), o | |
} | |
function d(e, t, n, r, i, o) { | |
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, p = a ? u : c, d = e;; d = p(d, t)) { | |
var h; | |
if (i && d === e || o && d === t || (h = n(d, a, r)), h === !1 || d === 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 o(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, i) { | |
var o = p(e, t); | |
o !== e && d(e, o, n, r, !1, !0), o !== t && d(o, t, n, i, !0, !1) | |
}, | |
traverseTwoPhase: function(e, t, n) { | |
e && (d("", e, t, n, !0, !1), d(e, "", t, n, !1, !0)) | |
}, | |
traverseTwoPhaseSkipTarget: function(e, t, n) { | |
e && (d("", e, t, n, !0, !0), d(e, "", t, n, !0, !0)) | |
}, | |
traverseAncestors: function(e, t, n) { | |
d("", e, t, n, !0, !1) | |
}, | |
_getFirstCommonAncestorID: p, | |
_getNextDescendantID: c, | |
isAncestorIDOf: l, | |
SEPARATOR: m | |
}; | |
i.exports = y | |
}), __d("ReactRootIndex", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
injectCreateReactRootIndex: function(e) { | |
a.createReactRootIndex = e | |
} | |
}, | |
a = { | |
createReactRootIndex: null, | |
injection: o | |
}; | |
i.exports = a | |
}), __d("ReactIOSDefaultInjection", ["InitializeJavaScriptAppEngine", "EventPluginHub", "EventPluginUtils", "IOSDefaultEventPluginOrder", "IOSNativeBridgeEventPlugin", "NodeHandle", "ReactComponent", "ReactCompositeComponent", "ReactDefaultBatchingStrategy", "ReactElement", "ReactInstanceHandles", "ReactIOSComponentEnvironment", "ReactIOSComponentMixin", "ReactIOSGlobalInteractionHandler", "ReactIOSGlobalResponderHandler", "ReactIOSMount", "ReactTextComponent", "ReactUpdates", "ResponderEventPlugin", "RKRawText", "UniversalWorkerNodeHandle", "RCTEventEmitter", "RCTLog", "RCTJSTimers"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
a.injection.injectEventPluginOrder(l), a.injection.injectInstanceHandle(m), w.injection.injectGlobalResponderHandler(v), w.injection.injectGlobalInteractionHandler(y), a.injection.injectEventPluginsByName({ | |
ResponderEventPlugin: w, | |
IOSNativeBridgeEventPlugin: u | |
}), R.injection.injectReconcileTransaction(g.ReactReconcileTransaction), R.injection.injectBatchingStrategy(h), p.injection.injectEnvironment(g), s.injection.injectMount(S), d.injection.injectMixin(_), b.inject(function(e) { | |
return new f(C.type, null, null, null, null, { | |
text: e | |
}) | |
}), c.injection.injectImplementation(E) | |
} | |
t("InitializeJavaScriptAppEngine"); | |
var a = t("EventPluginHub"), | |
s = t("EventPluginUtils"), | |
l = t("IOSDefaultEventPluginOrder"), | |
u = t("IOSNativeBridgeEventPlugin"), | |
c = t("NodeHandle"), | |
p = t("ReactComponent"), | |
d = t("ReactCompositeComponent"), | |
h = t("ReactDefaultBatchingStrategy"), | |
f = t("ReactElement"), | |
m = t("ReactInstanceHandles"), | |
g = t("ReactIOSComponentEnvironment"), | |
_ = t("ReactIOSComponentMixin"), | |
y = t("ReactIOSGlobalInteractionHandler"), | |
v = t("ReactIOSGlobalResponderHandler"), | |
S = t("ReactIOSMount"), | |
b = t("ReactTextComponent"), | |
R = t("ReactUpdates"), | |
w = t("ResponderEventPlugin"), | |
C = t("RKRawText"), | |
E = t("UniversalWorkerNodeHandle"); | |
t("RCTEventEmitter"), t("RCTLog"), t("RCTJSTimers"), i.exports = { | |
inject: o | |
} | |
}), __d("InitializeJavaScriptAppEngine", ["JSTimers", "RCTDeviceEventEmitter", "ErrorUtils", "RKAlertManager", "NativeModules", "errorToString", "loadSourceMap", "Promise", "XMLHttpRequest", "fetch"], function(e, t) { | |
function n(e) { | |
if (GLOBAL.console.error("Error: \n stack: \n" + e.stack + "\n URL: " + e.sourceURL + "\n line: " + e.line + "\n message: " + e.message), d && (d.reportUnhandledException(e.message, h(e)), __DEV__)) try { | |
var t = f(), | |
n = h(e, t); | |
d.updateExceptionMessage(e.message, n) | |
} catch (r) { | |
GLOBAL.console.error("#CLOWNTOWN (error while displaying error): " + r.message) | |
} | |
} | |
function r() { | |
c.setGlobalHandler(n) | |
} | |
function i() { | |
function e(e) { | |
return new Error("You are trying to render the global " + e + " variable as a React element. You probably forgot to require " + e + ".") | |
} | |
GLOBAL.Text = {get defaultProps() { | |
throw e("Text") | |
} | |
}, GLOBAL.Image = {get defaultProps() { | |
throw e("Image") | |
} | |
}, GLOBAL.document = { | |
body: {}, | |
createElement: function() { | |
return {} | |
} | |
} | |
} | |
function o() { | |
GLOBAL.setTimeout = u.setTimeout, GLOBAL.setInterval = u.setInterval, GLOBAL.setImmediate = u.setImmediate, GLOBAL.clearTimeout = u.clearTimeout, GLOBAL.clearInterval = u.clearInterval, GLOBAL.clearImmediate = u.clearImmediate, GLOBAL.cancelAnimationFrame = u.clearInterval, GLOBAL.requestAnimationFrame = function(e) { | |
return u.requestAnimationFrame(e) | |
} | |
} | |
function a() { | |
GLOBAL.alert || (GLOBAL.alert = function(e) { | |
var t = { | |
title: "Alert", | |
message: "" + e, | |
buttons: [{ | |
cancel: "Okay" | |
}] | |
}; | |
p.alertWithArgs(t, null) | |
}) | |
} | |
function s() { | |
GLOBAL.Promise = t("Promise") | |
} | |
function l() { | |
GLOBAL.XMLHttpRequest = t("XMLHttpRequest"), GLOBAL.fetch = t("fetch") | |
} | |
var u = t("JSTimers"); | |
t("RCTDeviceEventEmitter"); | |
var c = t("ErrorUtils"), | |
p = t("RKAlertManager"), | |
d = t("NativeModules").RKExceptionsManager, | |
h = t("errorToString"), | |
f = t("loadSourceMap"); | |
"undefined" == typeof GLOBAL && (GLOBAL = this), "undefined" == typeof window && (window = GLOBAL), r(), i(), o(), a(), s(), l() | |
}), __d("JSTimers", ["NativeModules", "JSTimersExecution"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = 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, i = arguments.length; i > 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, o.createTimer(l, t, Date.now(), !1), l | |
}, | |
setInterval: function(e, t) { | |
for (var n = [], r = 2, i = arguments.length; i > 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, o.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 i = a.GUID++, | |
o = s._getFreeIndex(); | |
return a.timerIDs[o] = i, a.callbacks[o] = e, a.callbacks[o] = function() { | |
return e.apply(void 0, t) | |
}, a.types[o] = a.Type.setImmediate, a.immediates.push(i), i | |
}, | |
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, o.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) { | |
if (null != e) { | |
var t = a.timerIDs.indexOf(e); - 1 !== t && (a._clearIndex(t), a.types[t] !== a.Type.setImmediate && o.deleteTimer(e)) | |
} | |
} | |
}; | |
i.exports = s | |
}), __d("NativeModules", ["BatchedBridge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("BatchedBridge").RemoteModules; | |
Object.keys(o).forEach(function(e) { | |
var t = e.replace(/^RCT/, "RK"); | |
o[t] = o[e] | |
}), i.exports = o | |
}), __d("BatchedBridge", ["BatchedBridgeFactory", "MessageQueue"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("BatchedBridgeFactory"), | |
a = t("MessageQueue"), | |
s = __fbBatchedBridgeConfig.remoteModuleConfig, | |
l = __fbBatchedBridgeConfig.localModulesConfig, | |
u = o.create(a, s, l); | |
u._config = s, i.exports = u | |
}), __d("BatchedBridgeFactory", ["invariant", "keyMirror", "mapObject", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = t("keyMirror"), | |
s = t("mapObject"), | |
l = t("warning"), | |
u = Array.prototype.slice, | |
c = a({ | |
remote: null, | |
local: null | |
}), | |
p = { | |
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, | |
i = "function" == typeof t, | |
o = u.call(arguments, 0, arguments.length - (i ? 1 : 0)), | |
a = i ? t : null; | |
return e.callDeprecated(n, r, o, a) | |
} | |
}); | |
for (var i in t.constants) l(!r[i], "saw constant and method named %s", i), r[i] = t.constants[i]; | |
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, | |
i = arguments.length > 1 ? arguments[arguments.length - 2] : null, | |
a = "function" == typeof t, | |
s = "function" == typeof i, | |
l = a; | |
a && s || !a && !s || o(0, "You must supply error callbacks and success callbacks or neither"); | |
var c = u.call(arguments, 0, arguments.length - (l ? 2 : 0)), | |
p = l ? t : null, | |
d = l ? i : null; | |
return e.call(n, r, c, d, p) | |
} | |
}); | |
for (var i in t.constants) l(!r[i], "saw constant and method named %s", i), r[i] = t.constants[i]; | |
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) | |
} | |
} | |
}; | |
i.exports = p | |
}), __d("MessageQueue", ["ErrorUtils", "invariant", "warning", "JSTimersExecution"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ErrorUtils"), | |
a = t("invariant"), | |
s = t("warning"), | |
l = t("JSTimersExecution"), | |
u = "Error in MessageQueue implementation", | |
c = t, | |
p = function(e, t, n) { | |
return e[t].apply(e, n) | |
}, | |
d = 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 && o.applyWithGuard(e, r, t), n ? o.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, i) { | |
for (var o in e) { | |
var a = e[o], | |
s = a.moduleID; | |
t[o] = s, n[s] = o, r[o] = {}, i[o] = {}; | |
var l = a.methods; | |
for (var u in l) { | |
var c = l[u].methodID; | |
r[o][u] = c, i[o][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 (i) { | |
throw i | |
} 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], | |
i = this._localModuleNameToMethodIDToName[r][t], | |
o = p(this._requireFunc(r), i, n); | |
return o | |
}, | |
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, | |
i = this._POOLED_CBIDS.errorCallbackID; | |
this._threadLocalCallbacksByID[i] = e, this._threadLocalCallbacksByID[r] = t, this._threadLocalScopesByID[i] = 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, i) { | |
r && "function" != typeof r && a(0, "Last argument (callback) must be function"), r && (this._storeCallbacksInCurrentThread(null, r, i, this._POOLED_CBIDS), n.push(this._POOLED_CBIDS.successCallbackID)); | |
var o = this._remoteModuleNameToModuleID[e]; | |
if (void 0 === o || null === o) throw new Error("Unrecognized module name:" + e); | |
var s = this._remoteModuleNameToMethodNameToID[e][t]; | |
if (void 0 === s || null === o) throw new Error("Unrecognized method name:" + t); | |
this._pushRequestToOutgoingItems(o, s, n) | |
}, | |
call: function(e, t, n, r, i, o) { | |
(r && "function" != typeof r || i && "function" != typeof i) && a(0, "Callbacks must be functions"), (r || i) && (this._storeCallbacksInCurrentThread(r, i, o, 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(d.prototype, S), i.exports = d | |
}), __d("ErrorUtils", [], function(e, t, n, r, i) { | |
var o = this; | |
i.exports = o.ErrorUtils | |
}), __d("JSTimersExecution", ["invariant", "keyMirror", "performanceNow", "warning", "JSTimers", "JSTimers"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = 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 i = s(); | |
r(i) | |
} | |
} catch (o) { | |
u.errors = u.errors || [], u.errors.push(o) | |
} | |
} | |
}, | |
callTimers: function(e) { | |
0 === e.length && o(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 i = 1; r > i; i++) t("JSTimers").setTimeout(function(e) { | |
throw e | |
}.bind(null, n[i]), 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 | |
} | |
}; | |
i.exports = u | |
}), __d("performanceNow", ["performance"], function(e, t, n, r, i) { | |
var o = t("performance"); | |
o && o.now || (o = Date); | |
var a = o.now.bind(o); | |
i.exports = a | |
}), __d("performance", ["ExecutionEnvironment"], function(e, t, n, r, i) { | |
"use strict"; | |
var o, a = t("ExecutionEnvironment"); | |
a.canUseDOM && (o = window.performance || window.msPerformance || window.webkitPerformance), i.exports = o || {} | |
}), __d("ExecutionEnvironment", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = !1, | |
a = { | |
canUseDOM: o, | |
canUseWorkers: "undefined" != typeof Worker, | |
canUseEventListeners: o && !(!window.addEventListener && !window.attachEvent), | |
canUseViewport: o && !!window.screen, | |
isInWorker: !o | |
}; | |
i.exports = a | |
}), __d("RCTDeviceEventEmitter", ["EventEmitter"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("EventEmitter"), | |
a = new o; | |
i.exports = a | |
}), __d("EventEmitter", ["EmitterSubscription", "ErrorUtils", "EventSubscriptionVendor", "emptyFunction", "invariant"], function(e, t, n, r, i) { | |
function o() { | |
"use strict"; | |
this.$EventEmitter_subscriber = new l | |
} | |
var a = t("EmitterSubscription"), | |
s = t("ErrorUtils"), | |
l = t("EventSubscriptionVendor"), | |
u = t("emptyFunction"), | |
c = t("invariant"); | |
o.prototype.addListener = function(e, t, n) { | |
"use strict"; | |
return this.$EventEmitter_subscriber.addSubscription(e, new a(this.$EventEmitter_subscriber, t, n)) | |
}, o.prototype.once = function(e, t, n) { | |
"use strict"; | |
var r = this; | |
return this.addListener(e, function() { | |
r.removeCurrentListener(), t.apply(n, arguments) | |
}) | |
}, o.prototype.removeAllListeners = function(e) { | |
"use strict"; | |
this.$EventEmitter_subscriber.removeAllSubscriptions(e) | |
}, o.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) | |
}, o.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 | |
}) : [] | |
}, o.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 i = n[r], | |
o = t[i]; | |
o && (this.$EventEmitter_currentSubscription = o, s.applyWithGuard(o.listener, o.context, Array.prototype.slice.call(arguments, 1), null, "EventEmitter:" + e)) | |
} | |
this.$EventEmitter_currentSubscription = null | |
} | |
}, i.exports = o | |
}), __d("EmitterSubscription", ["EventSubscription"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(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) && (o[s] = a[s]); | |
var l = null === a ? null : a.prototype; | |
o.prototype = Object.create(l), o.prototype.constructor = o, o.__superConstructor__ = a, i.exports = o | |
}), __d("EventSubscription", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
this.subscriber = e | |
} | |
o.prototype.remove = function() { | |
this.subscriber.removeSubscription(this) | |
}, i.exports = o | |
}), __d("EventSubscriptionVendor", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.$EventSubscriptionVendor_subscriptionsForType = {}, this.$EventSubscriptionVendor_currentSubscription = null | |
} | |
var a = t("invariant"); | |
o.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 | |
}, o.prototype.removeAllSubscriptions = function(e) { | |
void 0 === e ? this.$EventSubscriptionVendor_subscriptionsForType = {} : delete this.$EventSubscriptionVendor_subscriptionsForType[e] | |
}, o.prototype.removeSubscription = function(e) { | |
var t = e.eventType, | |
n = e.key, | |
r = this.$EventSubscriptionVendor_subscriptionsForType[t]; | |
r && delete r[n] | |
}, o.prototype.getSubscriptionsForType = function(e) { | |
return this.$EventSubscriptionVendor_subscriptionsForType[e] | |
}, i.exports = o | |
}), __d("RKAlertManager", ["NativeModulesDeprecated"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeModulesDeprecated").RKAlertManager; | |
i.exports = o | |
}), __d("NativeModulesDeprecated", ["BatchedBridge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("BatchedBridge").RemoteModulesDeprecated; | |
Object.keys(o).forEach(function(e) { | |
var t = e.replace(/^RCT/, "RK"); | |
o[t] = o[e] | |
}), i.exports = o | |
}), __d("errorToString", ["Platform", "stacktrace-parser/index"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = e.file.split("/"), | |
n = t[t.length - 1]; | |
return e.methodName + "\n in " + n + ":" + e.lineNumber + "\n" | |
} | |
function a(e, t) { | |
try { | |
var n = e.originalPositionFor({ | |
line: t.lineNumber, | |
column: t.column | |
}); | |
n && (t.file = n.source, t.lineNumber = n.line, t.column = n.column) | |
} catch (r) {} | |
} | |
function s(e, t) { | |
for (var n = u.parse(e.stack), r = e.framesToPop || 0; r--;) n.shift(); | |
return t && n.forEach(a.bind(null, t)), "android" === l.OS ? n.map(o).join("\n") : n | |
} | |
var l = t("Platform"), | |
u = t("stacktrace-parser/index"); | |
i.exports = s | |
}), __d("Platform", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
OS: "ios" | |
}; | |
i.exports = o | |
}), __d("stacktrace-parser/index", ["stacktrace-parser/lib/stacktrace-parser"], function(e, t, n, r, i) { | |
i.exports = t("stacktrace-parser/lib/stacktrace-parser") | |
}), __d("stacktrace-parser/lib/stacktrace-parser", [], function(e, t, n, r, i) { | |
var o = "<unknown>", | |
a = { | |
parse: function(e) { | |
for (var t, n, r = /^\s*at (?:(?:(?:Anonymous function)?|((?:\[object object\])?\S+(?: \[as \S+\])?)) )?\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i, i = /^(?:\s*(\S*)(?:\((.*?)\))?@)?((?:file|http|https).*?):(\d+)(?::(\d+))?\s*$/i, a = /^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i, s = e.split("\n"), l = [], u = 0, c = s.length; c > u; ++u) { | |
if (t = i.exec(s[u])) n = { | |
file: t[3], | |
methodName: t[1] || o, | |
lineNumber: +t[4], | |
column: t[5] ? +t[5] : null | |
}; | |
else if (t = r.exec(s[u])) n = { | |
file: t[2], | |
methodName: t[1] || o, | |
lineNumber: +t[3], | |
column: t[4] ? +t[4] : null | |
}; | |
else { | |
if (!(t = a.exec(s[u]))) continue; | |
n = { | |
file: t[2], | |
methodName: t[1] || o, | |
lineNumber: +t[3], | |
column: t[4] ? +t[4] : null | |
} | |
} | |
l.push(n) | |
} | |
return l | |
} | |
}; | |
i.exports = a | |
}), __d("loadSourceMap", ["SourceMap"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
return void 0 !== a ? a : e.RAW_SOURCE_MAP ? a = new s(e.RAW_SOURCE_MAP) : null | |
} | |
var a, s = t("SourceMap").SourceMapConsumer; | |
i.exports = o | |
}), __d("SourceMap", [], function(e, t, n, r, i) { | |
function o() { | |
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 i(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(i(this._currentModule), t))), t in this.modules) { | |
var o = this.modules[t]; | |
return o | |
} | |
if (!(t in e.modules)) throw new Error("Module not defined: " + t); | |
var o = e.modules[t]; | |
if ("function" == typeof o) { | |
var a = {}, | |
s = this._currentModule; | |
this._currentModule = t, o(this.require.bind(this), a, { | |
id: t, | |
uri: "" | |
}), this._currentModule = s, o = a | |
} | |
return this.modules[t] = o, o | |
} | |
}(), 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 = i.getArg(e, "file"), this._sourceRoot = i.getArg(e, "sourceRoot", null), this._sources = new o, this._names = new o, this._mappings = [], this._sourcesContents = null | |
} | |
var r = e("./base64-vlq"), | |
i = e("./util"), | |
o = 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 = i.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 = i.getArg(e, "generated"), | |
n = i.getArg(e, "original", null), | |
r = i.getArg(e, "source", null), | |
o = i.getArg(e, "name", null); | |
this._validateMapping(t, n, r, o), r && !this._sources.has(r) && this._sources.add(r), o && !this._names.has(o) && this._names.add(o), this._mappings.push({ | |
generatedLine: t.line, | |
generatedColumn: t.column, | |
originalLine: null != n && n.line, | |
originalColumn: null != n && n.column, | |
source: r, | |
name: o | |
}) | |
}, n.prototype.setSourceContent = function(e, t) { | |
var n = e; | |
this._sourceRoot && (n = i.relative(this._sourceRoot, n)), null !== t ? (this._sourcesContents || (this._sourcesContents = {}), this._sourcesContents[i.toSetString(n)] = t) : (delete this._sourcesContents[i.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 = i.relative(n, t)); | |
var r = new o, | |
a = new o; | |
this._mappings.forEach(function(o) { | |
if (o.source === t && o.originalLine) { | |
var s = e.originalPositionFor({ | |
line: o.originalLine, | |
column: o.originalColumn | |
}); | |
null !== s.source && (o.source = n ? i.relative(n, s.source) : s.source, o.originalLine = s.line, o.originalColumn = s.column, null !== s.name && null !== o.name && (o.name = s.name)) | |
} | |
var l = o.source; | |
l && !r.has(l) && r.add(l); | |
var u = o.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 = i.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, | |
o = 0, | |
a = 0, | |
s = 0, | |
l = 0, | |
u = ""; | |
this._mappings.sort(i.compareByGeneratedPositions); | |
for (var c = 0, p = this._mappings.length; p > c; c++) { | |
if (e = this._mappings[c], e.generatedLine !== n) | |
for (t = 0; e.generatedLine !== n;) u += ";", n++; | |
else if (c > 0) { | |
if (!i.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 - o), o = 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 = i.relative(t, e)); | |
var n = i.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 i = e("./base64"), | |
o = 5, | |
a = 1 << o, | |
s = a - 1, | |
l = a; | |
t.encode = function(e) { | |
var t, r = "", | |
a = n(e); | |
do t = a & s, a >>>= o, a > 0 && (t |= l), r += i.encode(t); while (a > 0); | |
return r | |
}, t.decode = function(e) { | |
var t, n, a = 0, | |
u = e.length, | |
c = 0, | |
p = 0; | |
do { | |
if (a >= u) throw new Error("Expected more digits in base 64 VLQ value."); | |
n = i.decode(e.charAt(a++)), t = !!(n & l), n &= s, c += n << p, p += o | |
} 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(d); | |
return t ? { | |
scheme: t[1], | |
auth: t[3], | |
host: t[4], | |
port: t[6], | |
path: t[7] | |
} : null | |
} | |
function i(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 o(e, t) { | |
var n; | |
return t.match(d) || t.match(h) ? t : "/" === t.charAt(0) && (n = r(e)) ? (n.path = t, i(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 p(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 d = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/, | |
h = /^data:.+\,.+/; | |
t.urlParse = r, t.urlGenerate = i, t.join = o, t.toSetString = a, t.fromSetString = s, t.relative = l, t.compareByOriginalPositions = c, t.compareByGeneratedPositions = p | |
}), 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, i = 0, o = e.length; o > i; i++) r.add(e[i], t); | |
return r | |
}, n.prototype.add = function(e, t) { | |
var n = this.has(e), | |
i = this._array.length; | |
(!n || t) && this._array.push(e), n || (this._set[r.toSetString(e)] = i) | |
}, 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"), | |
i = 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 = o.fromArray(a, !0), this._sources = o.fromArray(i, !0), this.sourceRoot = s, this.sourcesContent = l, this._mappings = u, this.file = c | |
} | |
var r = e("./util"), | |
i = e("./binary-search"), | |
o = e("./array-set").ArraySet, | |
a = e("./base64-vlq"); | |
n.fromSourceMap = function(e) { | |
var t = Object.create(n.prototype); | |
return t._names = o.fromArray(e._names.toArray(), !0), t._sources = o.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, i = 1, o = 0, s = 0, l = 0, u = 0, c = 0, p = /^[,;]/, d = e; d.length > 0;) | |
if (";" === d.charAt(0)) i++, d = d.slice(1), o = 0; | |
else if ("," === d.charAt(0)) d = d.slice(1); | |
else { | |
if (t = {}, t.generatedLine = i, n = a.decode(d), t.generatedColumn = o + n.value, o = t.generatedColumn, d = n.rest, d.length > 0 && !p.test(d.charAt(0))) { | |
if (n = a.decode(d), t.source = this._sources.at(u + n.value), u += n.value, d = n.rest, 0 === d.length || p.test(d.charAt(0))) throw new Error("Found a source, but no line and column"); | |
if (n = a.decode(d), t.originalLine = s + n.value, s = t.originalLine, t.originalLine += 1, d = n.rest, 0 === d.length || p.test(d.charAt(0))) throw new Error("Found a source and line, but no column"); | |
n = a.decode(d), t.originalColumn = l + n.value, l = t.originalColumn, d = n.rest, d.length > 0 && !p.test(d.charAt(0)) && (n = a.decode(d), t.name = this._names.at(c + n.value), c += n.value, d = 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, o) { | |
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 i.search(e, t, o) | |
}, 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 i = r.getArg(n, "source", null); | |
return i && this.sourceRoot && (i = r.join(this.sourceRoot, i)), { | |
source: i, | |
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, i) { | |
var o, a = t || null, | |
s = i || n.GENERATED_ORDER; | |
switch (s) { | |
case n.GENERATED_ORDER: | |
o = this._generatedMappings; | |
break; | |
case n.ORIGINAL_ORDER: | |
o = this._originalMappings; | |
break; | |
default: | |
throw new Error("Unknown order of iteration.") | |
} | |
var l = this.sourceRoot; | |
o.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, i, o) { | |
var a = Math.floor((t - e) / 2) + e, | |
s = o(r, i[a], !0); | |
return 0 === s ? i[a] : s > 0 ? t - a > 1 ? n(a, t, r, i, o) : i[a] : a - e > 1 ? n(e, a, r, i, o) : 0 > e ? null : i[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, i) { | |
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 === i ? null : i, null != r && this.add(r) | |
} | |
var r = e("./source-map-generator").SourceMapGenerator, | |
i = e("./util"); | |
n.fromStringWithSourceMap = function(e, t) { | |
function r(e, t) { | |
i.add(null === e || void 0 === e.source ? t : new n(e.originalLine, e.originalColumn, e.source, t, e.name)) | |
} | |
var i = new n, | |
o = e.split("\n"), | |
a = 1, | |
s = 0, | |
l = null; | |
return t.eachMapping(function(e) { | |
if (null === l) { | |
for (; a < e.generatedLine;) i.add(o.shift() + "\n"), a++; | |
if (s < e.generatedColumn) { | |
var t = o[0]; | |
i.add(t.substr(0, e.generatedColumn)), o[0] = t.substr(e.generatedColumn), s = e.generatedColumn | |
} | |
} else if (a < e.generatedLine) { | |
var n = ""; | |
do n += o.shift() + "\n", a++, s = 0; while (a < e.generatedLine); | |
if (s < e.generatedColumn) { | |
var t = o[0]; | |
n += t.substr(0, e.generatedColumn), o[0] = t.substr(e.generatedColumn), s = e.generatedColumn | |
} | |
r(l, n) | |
} else { | |
var t = o[0], | |
n = t.substr(0, e.generatedColumn - s); | |
o[0] = t.substr(e.generatedColumn - s), s = e.generatedColumn, r(l, n) | |
} | |
l = e | |
}, this), r(l, o.join("\n")), t.sources.forEach(function(e) { | |
var n = t.sourceContentFor(e); | |
n && i.setSourceContent(e, n) | |
}), i | |
}, 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, i = this.children.length; i > 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[i.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 o = Object.keys(this.sourceContents), t = 0, r = o.length; r > t; t++) e(i.fromSetString(o[t]), this.sourceContents[o[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), | |
i = !1, | |
o = 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 ? ((o !== 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 | |
}), o = r.source, a = r.line, s = r.column, l = r.name, i = !0) : i && (n.addMapping({ | |
generated: { | |
line: t.line, | |
column: t.column | |
} | |
}), o = null, i = !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 | |
} | |
}, t.SourceNode = n | |
}), this.sourceMap = { | |
SourceMapConsumer: n("source-map/source-map-consumer").SourceMapConsumer, | |
SourceMapGenerator: n("source-map/source-map-generator").SourceMapGenerator, | |
SourceNode: n("source-map/source-node").SourceNode | |
} | |
} | |
var a = {}; | |
o.call(a), i.exports = a.sourceMap | |
}), __d("Promise", ["ES6Promise", "invariant", "setImmediate", "throwImmediate"], function(e, t, n, r, i) { | |
var o = t("ES6Promise"), | |
a = o.prototype, | |
s = t("invariant"), | |
l = (t("setImmediate"), t("throwImmediate")); | |
a.finally = function(e) { | |
return this.then(e, e) | |
}, a.done = function(e, t) { | |
this.then(e, t).then(null, l) | |
}, o.allObject = function(e) { | |
Array.isArray(e) && s(0, "expected an object, got an array instead"); | |
var t = Object.keys(e); | |
return o.all(t.map(function(t) { | |
return e[t] | |
})).then(function(e) { | |
var n = {}; | |
return e.forEach(function(e, r) { | |
n[t[r]] = e | |
}), n | |
}) | |
}, i.exports = o | |
}), __d("ES6Promise", ["setImmediate"], function(e, t, n, r, i) { | |
i.exports = function(e, n) { | |
"use strict"; | |
function r(e) { | |
var t = e[f]; | |
if (!t && (e[f] = t = {}, Object.defineProperty)) try { | |
Object.defineProperty(e, f, { | |
value: t | |
}) | |
} catch (n) {} | |
return t | |
} | |
function i(e) { | |
return e | |
} | |
function o(e) { | |
throw e | |
} | |
function a(e) { | |
var t = r(this); | |
t.state = p, t.fulfillReactions = [], t.rejectReactions = []; | |
var n = s(this), | |
i = n.reject; | |
try { | |
e(n.resolve, i) | |
} catch (o) { | |
i(o) | |
} | |
} | |
function s(e) { | |
var t = !1; | |
return { | |
resolve: function(n) { | |
if (!t) { | |
if (t = !0, n === e) return l(e, h, new TypeError("Cannot resolve promise with itself")); | |
if (!n || "object" != typeof n || "function" != typeof n.then) return l(e, d, n); | |
var r = s(e), | |
i = r.reject; | |
try { | |
n.then(r.resolve, i) | |
} catch (o) { | |
i(o) | |
} | |
} | |
}, | |
reject: function(n) { | |
t || (t = !0, l(e, h, n)) | |
} | |
} | |
} | |
function l(e, t, i) { | |
var o = r(e); | |
if (o.state !== p) throw new Error("Settling a " + o.state + " promise"); | |
var a; | |
t === d ? a = o.fulfillReactions : t === h && (a = o.rejectReactions), o.result = i, o.fulfillReactions = n, o.rejectReactions = n, o.state = t; | |
var s = a.length; | |
s && c(function() { | |
for (var e = 0; s > e; ++e) a[e](o.result) | |
}) | |
} | |
function u(e, t, n, r) { | |
var i = arguments.length > 3; | |
return function(o) { | |
try { | |
o = n(i ? r : o) | |
} catch (a) { | |
return void t(a) | |
} | |
e(o) | |
} | |
} | |
var c = t("setImmediate"), | |
p = "pending", | |
d = "fulfilled", | |
h = "rejected", | |
f = "__slots$" + Math.random().toString(36).slice(2); | |
a.all = function(e) { | |
var t = this; | |
return new t(function(n, r) { | |
var i = [], | |
o = 0; | |
e.forEach(function(e, a) { | |
++o, t.resolve(e).then(function(e) { | |
i.hasOwnProperty(a) || (i[a] = e, --o || n(i)) | |
}, r) | |
}), o || n(i) | |
}) | |
}, a.race = function(e) { | |
var t = this; | |
return new t(function(n, r) { | |
e.forEach(function(e) { | |
t.resolve(e).then(n, r) | |
}) | |
}) | |
}, a.resolve = function(e) { | |
return e instanceof a && e.constructor === this ? e : new this(function(t) { | |
t(e) | |
}) | |
}, a.reject = function(e) { | |
return new this(function(t, n) { | |
n(e) | |
}) | |
}; | |
var m = a.prototype; | |
return m.then = function(e, t) { | |
var a, s, l = new this.constructor(function(e, t) { | |
a = e, s = t | |
}); | |
if ("function" != typeof a) throw new TypeError("Uncallable Promise resolve function"); | |
if ("function" != typeof s) throw new TypeError("Uncallable Promise reject function"); | |
(e === n || null === e) && (e = i), (t === n || null === t) && (t = o); | |
var f = r(this), | |
m = f.state; | |
return m === p ? (f.fulfillReactions.push(u(a, s, e)), f.rejectReactions.push(u(a, s, t))) : (m === d || m === h) && c(u(a, s, m === d ? e : t, f.result)), l | |
}, m["catch"] = function(e) { | |
return this.then(n, e) | |
}, m.toString = function() { | |
return "[object Promise]" | |
}, a | |
}(Function("return this")()) | |
}), __d("setImmediate", ["ImmediateImplementation"], function(e, t, n, r, i) { | |
i.exports = e.setImmediate || t("ImmediateImplementation").setImmediate | |
}), __d("ImmediateImplementation", [], function(e, t, n, r, i, o) { | |
! function(e, t) { | |
"use strict"; | |
function n(e) { | |
var n = e[0]; | |
return e = Array.prototype.slice.call(e, 1), h[d] = function() { | |
n.apply(t, e) | |
}, m = m.next = { | |
handle: d++ | |
}, m.handle | |
} | |
function r() { | |
for (var e, t; !g && (e = f.next);) | |
if (f = e, t = h[e.handle]) { | |
g = !0; | |
try { | |
t(), g = !1 | |
} finally { | |
i(e.handle), g && (g = !1, f.next && p(r)) | |
} | |
} | |
} | |
function i(e) { | |
delete h[e] | |
} | |
function a() { | |
if (e.postMessage && !e.importScripts) { | |
var t = !0, | |
n = function() { | |
t = !1, e.removeEventListener ? e.removeEventListener("message", n, !1) : e.detachEvent("onmessage", n) | |
}; | |
if (e.addEventListener) e.addEventListener("message", n, !1); | |
else { | |
if (!e.attachEvent) return !1; | |
e.attachEvent("onmessage", n) | |
} | |
return e.postMessage("", "*"), t | |
} | |
} | |
function s() { | |
var t = "setImmediate$" + Math.random() + "$", | |
i = function(n) { | |
n.source === e && "string" == typeof n.data && 0 === n.data.indexOf(t) && r() | |
}; | |
e.addEventListener ? e.addEventListener("message", i, !1) : e.attachEvent("onmessage", i), p = function() { | |
var r = n(arguments); | |
return e.postMessage(t + r, "*"), r | |
} | |
} | |
function l() { | |
var e = new MessageChannel; | |
e.port1.onmessage = r, p = function() { | |
var t = n(arguments); | |
return e.port2.postMessage(t), t | |
} | |
} | |
function u() { | |
var e = _.documentElement; | |
p = function() { | |
var t = n(arguments), | |
i = _.createElement("script"); | |
return i.onreadystatechange = function() { | |
i.onreadystatechange = null, e.removeChild(i), i = null, r() | |
}, e.appendChild(i), t | |
} | |
} | |
function c() { | |
p = function() { | |
return setTimeout(r, 0), n(arguments) | |
} | |
} | |
var p, d = 1, | |
h = {}, | |
f = {}, | |
m = f, | |
g = !1, | |
_ = e.document; | |
a() ? s() : e.MessageChannel ? l() : _ && "onreadystatechange" in _.createElement("script") ? u() : c(), o.setImmediate = p, o.clearImmediate = i | |
}(Function("return this")()) | |
}), __d("throwImmediate", ["setImmediate"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
throw e | |
} | |
function a(e) { | |
s(o, e) | |
} | |
var s = t("setImmediate"); | |
i.exports = a | |
}), __d("XMLHttpRequest", ["NativeModulesDeprecated", "crc32"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.UNSENT = 0, this.OPENED = 1, this.HEADERS_RECEIVED = 2, this.LOADING = 3, this.DONE = 4, this.onreadystatechange = void 0, this.upload = void 0, this.readyState = this.UNSENT, this.responseHeaders = void 0, this.responseText = void 0, this.status = void 0, this.$XMLHttpRequest_method = null, this.$XMLHttpRequest_url = null, this.$XMLHttpRequest_headers = {}, this.$XMLHttpRequest_sent = !1, this.$XMLHttpRequest_aborted = !1 | |
} | |
var a = t("NativeModulesDeprecated").RKDataManager, | |
s = t("crc32"); | |
o.prototype.getAllResponseHeaders = function() { | |
return "" | |
}, o.prototype.getResponseHeader = function() { | |
return "" | |
}, o.prototype.setRequestHeader = function(e, t) { | |
this.$XMLHttpRequest_headers[e] = t | |
}, o.prototype.open = function(e, t, n) { | |
if (this.readyState !== this.UNSENT) throw new Error("Cannot open, already sending"); | |
if (void 0 !== n && !n) throw new Error("Synchronous http requests are not supported"); | |
this.$XMLHttpRequest_method = e, this.$XMLHttpRequest_url = t, this.$XMLHttpRequest_aborted = !1, this.$XMLHttpRequest_setReadyState(this.OPENED) | |
}, o.prototype.send = function(e) { | |
if (this.readyState !== this.OPENED) throw new Error("Request has not been opened"); | |
if (this.$XMLHttpRequest_sent) throw new Error("Request has already been sent"); | |
this.$XMLHttpRequest_sent = !0, a.queryData("http", JSON.stringify({ | |
method: this.$XMLHttpRequest_method, | |
url: this.$XMLHttpRequest_url, | |
data: e, | |
headers: this.$XMLHttpRequest_headers | |
}), "h" + s(this.$XMLHttpRequest_method + "|" + this.$XMLHttpRequest_url + "|" + e), function(e) { | |
e = JSON.parse(e), this.$XMLHttpRequest_callback(e.status, e.responseHeaders, e.responseText) | |
}.bind(this)) | |
}, o.prototype.abort = function() { | |
console.warn("XMLHttpRequest: abort() cancels JS callbacks but not native HTTP request."), this.readyState === this.UNSENT || this.readyState === this.OPENED && !this.$XMLHttpRequest_sent || this.readyState === this.DONE || (this.$XMLHttpRequest_sent = !1, this.$XMLHttpRequest_setReadyState(this.DONE)), this.readyState === this.DONE && this.$XMLHttpRequest_sendLoad(), this.readyState = this.UNSENT, this.$XMLHttpRequest_aborted = !0 | |
}, o.prototype.$XMLHttpRequest_setReadyState = function(e) { | |
this.readyState = e; | |
var t = this.onreadystatechange; | |
t && t(null) | |
}, o.prototype.$XMLHttpRequest_sendLoad = function() { | |
var e = this.onload; | |
e && e(null) | |
}, o.prototype.$XMLHttpRequest_callback = function(e, t, n) { | |
this.$XMLHttpRequest_aborted || (this.status = e, this.responseHeaders = t, this.responseText = n, this.$XMLHttpRequest_setReadyState(this.DONE), this.$XMLHttpRequest_sendLoad()) | |
}, i.exports = o | |
}), __d("crc32", [], function(e, t, n, r, i) { | |
function o(e) { | |
var t = 0, | |
n = 0, | |
r = 0; | |
t = -1 ^ t; | |
for (var i = 0, o = e.length; o > i; i++) n = 255 & (t ^ e.charCodeAt(i)), r = "0x" + a.substr(9 * n, 8), t = t >>> 8 ^ r; | |
return -1 ^ t | |
} | |
var a = "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D"; | |
i.exports = o | |
}), __d("fetch", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = {}; | |
! function() { | |
function e(t) { | |
this.map = {}; | |
var n = this; | |
t instanceof e ? t.forEach(function(e, t) { | |
t.forEach(function(t) { | |
n.append(e, t) | |
}) | |
}) : t && Object.getOwnPropertyNames(t).forEach(function(e) { | |
n.append(e, t[e]) | |
}) | |
} | |
function t(e) { | |
return e.bodyUsed ? Promise.reject(new TypeError("Already read")) : void(e.bodyUsed = !0) | |
} | |
function n(e) { | |
return new Promise(function(t, n) { | |
e.onload = function() { | |
t(e.result) | |
}, e.onerror = function() { | |
n(e.error) | |
} | |
}) | |
} | |
function r(e) { | |
var t = new FileReader; | |
return t.readAsArrayBuffer(e), n(t) | |
} | |
function i(e) { | |
var t = new FileReader; | |
return t.readAsText(e), n(t) | |
} | |
function a() { | |
return this.bodyUsed = !1, d ? (this.blob = function() { | |
var e = t(this); | |
return e ? e : Promise.resolve(this._bodyBlob) | |
}, this.arrayBuffer = function() { | |
return this.blob().then(r) | |
}, this.text = function() { | |
return this.blob().then(i) | |
}) : this.text = function() { | |
var e = t(this); | |
return e ? e : Promise.resolve(this._bodyText) | |
}, "FormData" in o && (this.formData = function() { | |
return this.text().then(u) | |
}), this.json = function() { | |
return this.text().then(JSON.parse) | |
}, this | |
} | |
function s(e) { | |
var t = e.toUpperCase(); | |
return h.indexOf(t) > -1 ? t : e | |
} | |
function l(t, n) { | |
n = n || {}, this.url = t, this._body = n.body, this.credentials = n.credentials || "omit", this.headers = new e(n.headers), this.method = s(n.method || "GET"), this.mode = n.mode || null, this.referrer = null | |
} | |
function u(e) { | |
var t = new FormData; | |
return e.trim().split("&").forEach(function(e) { | |
if (e) { | |
var n = e.split("="), | |
r = n.shift().replace(/\+/g, " "), | |
i = n.join("=").replace(/\+/g, " "); | |
t.append(decodeURIComponent(r), decodeURIComponent(i)) | |
} | |
}), t | |
} | |
function c(t) { | |
var n = new e, | |
r = t.getAllResponseHeaders().trim().split("\n"); | |
return r.forEach(function(e) { | |
var t = e.trim().split(":"), | |
r = t.shift().trim(), | |
i = t.join(":").trim(); | |
n.append(r, i) | |
}), n | |
} | |
function p(e, t) { | |
t || (t = {}), d ? this._bodyBlob = "string" == typeof e ? new Blob([e]) : e : this._bodyText = e, this.type = "default", this.url = null, this.status = t.status, this.statusText = t.statusText, this.headers = t.headers, this.url = t.url || "" | |
} | |
if (!o.fetch) { | |
e.prototype.append = function(e, t) { | |
e = e.toLowerCase(); | |
var n = this.map[e]; | |
n || (n = [], this.map[e] = n), n.push(t) | |
}, e.prototype["delete"] = function(e) { | |
delete this.map[e.toLowerCase()] | |
}, e.prototype.get = function(e) { | |
var t = this.map[e.toLowerCase()]; | |
return t ? t[0] : null | |
}, e.prototype.getAll = function(e) { | |
return this.map[e.toLowerCase()] || [] | |
}, e.prototype.has = function(e) { | |
return this.map.hasOwnProperty(e.toLowerCase()) | |
}, e.prototype.set = function(e, t) { | |
this.map[e.toLowerCase()] = [t] | |
}, e.prototype.forEach = function(e) { | |
var t = this; | |
Object.getOwnPropertyNames(this.map).forEach(function(n) { | |
e(n, t.map[n]) | |
}) | |
}; | |
var d = "FileReader" in o && "Blob" in o && function() { | |
try { | |
return new Blob, !0 | |
} catch (e) { | |
return !1 | |
} | |
}(), | |
h = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; | |
l.prototype.fetch = function() { | |
var e = this; | |
return new Promise(function(t, n) { | |
function r() { | |
return "responseURL" in i ? i.responseURL : /^X-Request-URL:/m.test(i.getAllResponseHeaders()) ? i.getResponseHeader("X-Request-URL") : void 0 | |
} | |
var i = new XMLHttpRequest; | |
i.onload = function() { | |
var e = 1223 === i.status ? 204 : i.status; | |
if (100 > e || e > 599) return void n(new TypeError("Network request failed")); | |
var o = { | |
status: e, | |
statusText: i.statusText, | |
headers: c(i), | |
url: r() | |
}, | |
a = "response" in i ? i.response : i.responseText; | |
t(new p(a, o)) | |
}, i.onerror = function() { | |
n(new TypeError("Network request failed")) | |
}, i.open(e.method, e.url), "responseType" in i && d && (i.responseType = "blob"), e.headers.forEach(function(e, t) { | |
t.forEach(function(t) { | |
i.setRequestHeader(e, t) | |
}) | |
}), i.send(void 0 === e._body ? null : e._body) | |
}) | |
}, a.call(l.prototype), a.call(p.prototype), o.Headers = e, o.Request = l, o.Response = p, o.fetch = function(e, t) { | |
return new l(e, t).fetch() | |
}, o.fetch.polyfill = !0 | |
} | |
}(), i.exports = o.fetch | |
}), __d("EventPluginHub", ["EventPluginRegistry", "EventPluginUtils", "accumulateInto", "forEachAccumulated", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
var e = !f || !f.traverseTwoPhase || !f.traverseEnterLeave; | |
if (e) throw new Error("InstanceHandle not injected before use!") | |
} | |
var a = t("EventPluginRegistry"), | |
s = t("EventPluginUtils"), | |
l = t("accumulateInto"), | |
u = t("forEachAccumulated"), | |
c = t("invariant"), | |
p = {}, | |
d = null, | |
h = function(e) { | |
if (e) { | |
var t = s.executeDispatch, | |
n = a.getPluginModuleForEvent(e); | |
n && n.executeDispatch && (t = n.executeDispatch), s.executeDispatchesInOrder(e, t), e.isPersistent() || e.constructor.release(e) | |
} | |
}, | |
f = null, | |
m = { | |
injection: { | |
injectMount: s.injection.injectMount, | |
injectInstanceHandle: function(e) { | |
f = e, __DEV__ && o() | |
}, | |
getInstanceHandle: function() { | |
return __DEV__ && o(), f | |
}, | |
injectEventPluginOrder: a.injectEventPluginOrder, | |
injectEventPluginsByName: a.injectEventPluginsByName | |
}, | |
eventNameDispatchConfigs: a.eventNameDispatchConfigs, | |
registrationNameModules: a.registrationNameModules, | |
putListener: function(e, t, n) { | |
n && "function" != typeof n && c(0, "Expected %s listener to be a function, instead got type %s", t, typeof n); | |
var r = p[t] || (p[t] = {}); | |
r[e] = n | |
}, | |
getListener: function(e, t) { | |
var n = p[t]; | |
return n && n[e] | |
}, | |
deleteListener: function(e, t) { | |
var n = p[t]; | |
n && delete n[e] | |
}, | |
deleteAllListeners: function(e) { | |
for (var t in p) delete p[t][e] | |
}, | |
extractEvents: function(e, t, n, r) { | |
for (var i, o = a.plugins, s = 0, u = o.length; u > s; s++) { | |
var c = o[s]; | |
if (c) { | |
var p = c.extractEvents(e, t, n, r); | |
p && (i = l(i, p)) | |
} | |
} | |
return i | |
}, | |
enqueueEvents: function(e) { | |
e && (d = l(d, e)) | |
}, | |
processEventQueue: function() { | |
var e = d; | |
d = null, u(e, h), d && c(0, "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.") | |
}, | |
__purge: function() { | |
p = {} | |
}, | |
__getListenerBank: function() { | |
return p | |
} | |
}; | |
i.exports = m | |
}), __d("EventPluginRegistry", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
if (u) | |
for (var e in c) { | |
var t = c[e], | |
n = u.indexOf(e); | |
if (n > -1 || l(0, "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.", e), !p.plugins[n]) { | |
t.extractEvents || l(0, "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.", e), p.plugins[n] = t; | |
var r = t.eventTypes; | |
for (var i in r) a(r[i], t, i) || l(0, "EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.", i, e) | |
} | |
} | |
} | |
function a(e, t, n) { | |
p.eventNameDispatchConfigs.hasOwnProperty(n) && l(0, "EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.", n), p.eventNameDispatchConfigs[n] = e; | |
var r = e.phasedRegistrationNames; | |
if (r) { | |
for (var i in r) | |
if (r.hasOwnProperty(i)) { | |
var o = r[i]; | |
s(o, t, n) | |
} | |
return !0 | |
} | |
return e.registrationName ? (s(e.registrationName, t, n), !0) : !1 | |
} | |
function s(e, t, n) { | |
p.registrationNameModules[e] && l(0, "EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.", e), p.registrationNameModules[e] = t, p.registrationNameDependencies[e] = t.eventTypes[n].dependencies | |
} | |
var l = t("invariant"), | |
u = null, | |
c = {}, | |
p = { | |
plugins: [], | |
eventNameDispatchConfigs: {}, | |
registrationNameModules: {}, | |
registrationNameDependencies: {}, | |
injectEventPluginOrder: function(e) { | |
u && l(0, "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."), u = Array.prototype.slice.call(e), o() | |
}, | |
injectEventPluginsByName: function(e) { | |
var t = !1; | |
for (var n in e) | |
if (e.hasOwnProperty(n)) { | |
var r = e[n]; | |
c.hasOwnProperty(n) && c[n] === r || (c[n] && l(0, "EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.", n), c[n] = r, t = !0) | |
} | |
t && o() | |
}, | |
getPluginModuleForEvent: function(e) { | |
var t = e.dispatchConfig; | |
if (t.registrationName) return p.registrationNameModules[t.registrationName] || null; | |
for (var n in t.phasedRegistrationNames) | |
if (t.phasedRegistrationNames.hasOwnProperty(n)) { | |
var r = p.registrationNameModules[t.phasedRegistrationNames[n]]; | |
if (r) return r | |
} | |
return null | |
}, | |
_resetEventPlugins: function() { | |
u = null; | |
for (var e in c) c.hasOwnProperty(e) && delete c[e]; | |
p.plugins.length = 0; | |
var t = p.eventNameDispatchConfigs; | |
for (var n in t) t.hasOwnProperty(n) && delete t[n]; | |
var r = p.registrationNameModules; | |
for (var i in r) r.hasOwnProperty(i) && delete r[i] | |
} | |
}; | |
i.exports = p | |
}), __d("EventPluginUtils", ["EventConstants", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return e === v.topMouseUp || e === v.topTouchEnd || e === v.topTouchCancel | |
} | |
function a(e) { | |
return e === v.topMouseMove || e === v.topTouchMove | |
} | |
function s(e) { | |
return e === v.topMouseDown || e === v.topTouchStart | |
} | |
function l(e, t) { | |
var n = e._dispatchListeners, | |
r = e._dispatchIDs; | |
if (__DEV__ && m(e), Array.isArray(n)) | |
for (var i = 0; i < n.length && !e.isPropagationStopped(); i++) t(e, n[i], r[i]); | |
else n && t(e, n, r) | |
} | |
function u(e, t, n) { | |
e.currentTarget = y.Mount.getNode(n); | |
var r = t(e, n); | |
return e.currentTarget = null, r | |
} | |
function c(e, t) { | |
l(e, t), e._dispatchListeners = null, e._dispatchIDs = null | |
} | |
function p(e) { | |
var t = e._dispatchListeners, | |
n = e._dispatchIDs; | |
if (__DEV__ && m(e), Array.isArray(t)) { | |
for (var r = 0; r < t.length && !e.isPropagationStopped(); r++) | |
if (t[r](e, n[r])) return n[r] | |
} else if (t && t(e, n)) return n; | |
return null | |
} | |
function d(e) { | |
var t = p(e); | |
return e._dispatchIDs = null, e._dispatchListeners = null, t | |
} | |
function h(e) { | |
__DEV__ && m(e); | |
var t = e._dispatchListeners, | |
n = e._dispatchIDs; | |
Array.isArray(t) && _(0, "executeDirectDispatch(...): Invalid `event`."); | |
var r = t ? t(e, n) : null; | |
return e._dispatchListeners = null, e._dispatchIDs = null, r | |
} | |
function f(e) { | |
return !!e._dispatchListeners | |
} | |
var m, g = t("EventConstants"), | |
_ = t("invariant"), | |
y = { | |
Mount: null, | |
injectMount: function(e) { | |
y.Mount = e, __DEV__ && (e && e.getNode || _(0, "EventPluginUtils.injection.injectMount(...): Injected Mount module is missing getNode.")) | |
} | |
}, | |
v = g.topLevelTypes; | |
__DEV__ && (m = function(e) { | |
var t = e._dispatchListeners, | |
n = e._dispatchIDs, | |
r = Array.isArray(t), | |
i = Array.isArray(n), | |
o = i ? n.length : n ? 1 : 0, | |
a = r ? t.length : t ? 1 : 0; | |
(i !== r || o !== a) && _(0, "EventPluginUtils: Invalid `event`.") | |
}); | |
var S = { | |
isEndish: o, | |
isMoveish: a, | |
isStartish: s, | |
executeDirectDispatch: h, | |
executeDispatch: u, | |
executeDispatchesInOrder: c, | |
executeDispatchesInOrderStopAtTrue: d, | |
hasDispatches: f, | |
injection: y, | |
useTouchEvents: !1 | |
}; | |
i.exports = S | |
}), __d("EventConstants", ["keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("keyMirror"), | |
a = o({ | |
bubbled: null, | |
captured: null | |
}), | |
s = o({ | |
topBlur: null, | |
topChange: null, | |
topClick: null, | |
topCompositionEnd: null, | |
topCompositionStart: null, | |
topCompositionUpdate: null, | |
topContextMenu: null, | |
topCopy: null, | |
topCut: null, | |
topDoubleClick: null, | |
topDrag: null, | |
topDragEnd: null, | |
topDragEnter: null, | |
topDragExit: null, | |
topDragLeave: null, | |
topDragOver: null, | |
topDragStart: null, | |
topDrop: null, | |
topError: null, | |
topFocus: null, | |
topInput: null, | |
topKeyDown: null, | |
topKeyPress: null, | |
topKeyUp: null, | |
topLoad: null, | |
topMouseDown: null, | |
topMouseMove: null, | |
topMouseOut: null, | |
topMouseOver: null, | |
topMouseUp: null, | |
topPaste: null, | |
topReset: null, | |
topScroll: null, | |
topSelectionChange: null, | |
topSubmit: null, | |
topTextInput: null, | |
topTouchCancel: null, | |
topTouchEnd: null, | |
topTouchMove: null, | |
topTouchStart: null, | |
topWheel: null | |
}), | |
l = { | |
topLevelTypes: s, | |
PropagationPhases: a | |
}; | |
i.exports = l | |
}), __d("accumulateInto", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
if (null == t && a(0, "accumulateInto(...): Accumulated items must not be null or undefined."), null == e) return t; | |
var n = Array.isArray(e), | |
r = Array.isArray(t); | |
return n && r ? (e.push.apply(e, t), e) : n ? (e.push(t), e) : r ? [e].concat(t) : [e, t] | |
} | |
var a = t("invariant"); | |
i.exports = o | |
}), __d("forEachAccumulated", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function(e, t, n) { | |
Array.isArray(e) ? e.forEach(t, n) : e && t.call(n, e) | |
}; | |
i.exports = o | |
}), __d("IOSDefaultEventPluginOrder", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = ["ResponderEventPlugin", "IOSNativeBridgeEventPlugin"]; | |
i.exports = o | |
}), __d("IOSNativeBridgeEventPlugin", ["EventPropagators", "NativeModulesDeprecated", "SyntheticEvent", "merge", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("EventPropagators"), | |
a = t("NativeModulesDeprecated"), | |
s = t("SyntheticEvent"), | |
l = t("merge"), | |
u = t("warning"), | |
c = a.RKUIManager, | |
p = c.customBubblingEventTypes, | |
d = c.customDirectEventTypes, | |
h = {}; | |
for (var f in p) h[f] = p[f]; | |
for (var m in d) u(!p[m], "Event cannot be both direct and bubbling: %s", m), h[m] = d[m]; | |
var g = { | |
eventTypes: l(p, d), | |
extractEvents: function(e, t, n, r) { | |
var i = p[e], | |
a = d[e], | |
l = s.getPooled(i || a, n, r); | |
if (i) o.accumulateTwoPhaseDispatches(l); | |
else { | |
if (!a) return null; | |
o.accumulateDirectDispatches(l) | |
} | |
return l | |
} | |
}; | |
i.exports = g | |
}), __d("EventPropagators", ["EventConstants", "EventPluginHub", "accumulateInto", "forEachAccumulated"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
var r = t.dispatchConfig.phasedRegistrationNames[n]; | |
return S(e, r) | |
} | |
function a(e, t, n) { | |
if (__DEV__ && !e) throw new Error("Dispatching id must not be null"); | |
var r = t ? v.bubbled : v.captured, | |
i = o(e, n, r); | |
i && (n._dispatchListeners = _(n._dispatchListeners, i), n._dispatchIDs = _(n._dispatchIDs, e)) | |
} | |
function s(e) { | |
e && e.dispatchConfig.phasedRegistrationNames && g.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker, a, e) | |
} | |
function l(e) { | |
e && e.dispatchConfig.phasedRegistrationNames && g.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker, a, e) | |
} | |
function u(e, t, n) { | |
if (n && n.dispatchConfig.registrationName) { | |
var r = n.dispatchConfig.registrationName, | |
i = S(e, r); | |
i && (n._dispatchListeners = _(n._dispatchListeners, i), n._dispatchIDs = _(n._dispatchIDs, e)) | |
} | |
} | |
function c(e) { | |
e && e.dispatchConfig.registrationName && u(e.dispatchMarker, null, e) | |
} | |
function p(e) { | |
y(e, s) | |
} | |
function d(e) { | |
y(e, l) | |
} | |
function h(e, t, n, r) { | |
g.injection.getInstanceHandle().traverseEnterLeave(n, r, u, e, t) | |
} | |
function f(e) { | |
y(e, c) | |
} | |
var m = t("EventConstants"), | |
g = t("EventPluginHub"), | |
_ = t("accumulateInto"), | |
y = t("forEachAccumulated"), | |
v = m.PropagationPhases, | |
S = g.getListener, | |
b = { | |
accumulateTwoPhaseDispatches: p, | |
accumulateTwoPhaseDispatchesSkipTarget: d, | |
accumulateDirectDispatches: f, | |
accumulateEnterLeaveDispatches: h | |
}; | |
i.exports = b | |
}), __d("SyntheticEvent", ["PooledClass", "emptyFunction", "getEventTarget"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
this.dispatchConfig = e, this.dispatchMarker = t, this.nativeEvent = n; | |
var r = this.constructor.Interface; | |
for (var i in r) | |
if (r.hasOwnProperty(i)) { | |
var o = r[i]; | |
this[i] = o ? o(n) : n[i] | |
} | |
var a = null != n.defaultPrevented ? n.defaultPrevented : n.returnValue === !1; | |
this.isDefaultPrevented = a ? s.thatReturnsTrue : s.thatReturnsFalse, this.isPropagationStopped = s.thatReturnsFalse | |
} | |
var a = t("PooledClass"), | |
s = t("emptyFunction"), | |
l = t("getEventTarget"), | |
u = { | |
type: null, | |
target: l, | |
currentTarget: s.thatReturnsNull, | |
eventPhase: null, | |
bubbles: null, | |
cancelable: null, | |
timeStamp: function(e) { | |
return e.timeStamp || Date.now() | |
}, | |
defaultPrevented: null, | |
isTrusted: null | |
}; | |
Object.assign(o.prototype, { | |
preventDefault: function() { | |
this.defaultPrevented = !0; | |
var e = this.nativeEvent; | |
e.preventDefault ? e.preventDefault() : e.returnValue = !1, this.isDefaultPrevented = s.thatReturnsTrue | |
}, | |
stopPropagation: function() { | |
var e = this.nativeEvent; | |
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0, this.isPropagationStopped = s.thatReturnsTrue | |
}, | |
persist: function() { | |
this.isPersistent = s.thatReturnsTrue | |
}, | |
isPersistent: s.thatReturnsFalse, | |
destructor: function() { | |
var e = this.constructor.Interface; | |
for (var t in e) this[t] = null; | |
this.dispatchConfig = null, this.dispatchMarker = null, this.nativeEvent = null | |
} | |
}), o.Interface = u, o.augmentClass = function(e, t) { | |
var n = this, | |
r = Object.create(n.prototype); | |
Object.assign(r, e.prototype), e.prototype = r, e.prototype.constructor = e, e.Interface = Object.assign({}, n.Interface, t), e.augmentClass = n.augmentClass, a.addPoolingTo(e, a.threeArgumentPooler) | |
}, a.addPoolingTo(o, a.threeArgumentPooler), i.exports = o | |
}), __d("getEventTarget", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = e.target || e.srcElement || window; | |
return 3 === t.nodeType ? t.parentNode : t | |
} | |
i.exports = o | |
}), __d("merge", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function(e, t) { | |
return Object.assign({}, e, t) | |
}; | |
i.exports = o | |
}), __d("NodeHandle", [], function(e, t, n, r, i) { | |
var o = { | |
injection: { | |
injectImplementation: function(e) { | |
o._Implementation = e | |
} | |
}, | |
_Implementation: null, | |
getRootNodeID: function(e) { | |
return o._Implementation.getRootNodeID(e) | |
} | |
}; | |
i.exports = o | |
}), __d("ReactDefaultBatchingStrategy", ["ReactUpdates", "Transaction", "emptyFunction"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.reinitializeTransaction() | |
} | |
var a = t("ReactUpdates"), | |
s = t("Transaction"), | |
l = t("emptyFunction"), | |
u = { | |
initialize: l, | |
close: function() { | |
h.isBatchingUpdates = !1 | |
} | |
}, | |
c = { | |
initialize: l, | |
close: a.flushBatchedUpdates.bind(a) | |
}, | |
p = [c, u]; | |
Object.assign(o.prototype, s.Mixin, { | |
getTransactionWrappers: function() { | |
return p | |
} | |
}); | |
var d = new o, | |
h = { | |
isBatchingUpdates: !1, | |
batchedUpdates: function(e, t, n) { | |
var r = h.isBatchingUpdates; | |
h.isBatchingUpdates = !0, r ? e(t, n) : d.perform(e, null, t, n) | |
} | |
}; | |
i.exports = h | |
}), __d("ReactIOSComponentEnvironment", ["NativeModulesDeprecated", "ReactIOSDOMIDOperations", "ReactIOSReconcileTransaction", "ReactIOSTagHandles", "ReactPerf"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeModulesDeprecated").RKUIManager, | |
a = t("ReactIOSDOMIDOperations"), | |
s = t("ReactIOSReconcileTransaction"), | |
l = t("ReactIOSTagHandles"), | |
u = t("ReactPerf"), | |
c = { | |
BackendIDOperations: a, | |
unmountIDFromEnvironment: function() {}, | |
clearNode: function() {}, | |
mountImageIntoNode: u.measure("ReactComponentBrowserEnvironment", "mountImageIntoNode", function(e, t) { | |
l.associateRootNodeIDWithMountedNodeHandle(e.rootNodeID, e.tag); | |
var n = [e.tag], | |
r = [0]; | |
o.manageChildren(l.mostRecentMountedNodeHandleForRootNodeID(t), null, null, n, r, null) | |
}), | |
ReactReconcileTransaction: s | |
}; | |
i.exports = c | |
}), __d("ReactIOSDOMIDOperations", ["ReactIOSTagHandles", "ReactMultiChildUpdateTypes", "NativeModulesDeprecated", "ReactPerf"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactIOSTagHandles"), | |
a = t("ReactMultiChildUpdateTypes"), | |
s = t("NativeModulesDeprecated").RKUIManager, | |
l = t("ReactPerf"), | |
u = function(e, t) { | |
if (e.length) { | |
for (var n = {}, r = 0; r < e.length; r++) { | |
var i = e[r], | |
l = o.mostRecentMountedNodeHandleForRootNodeID(i.parentID), | |
u = n[l] || (n[l] = {}); | |
if (i.type === a.MOVE_EXISTING)(u.moveFromIndices || (u.moveFromIndices = [])).push(i.fromIndex), (u.moveToIndices || (u.moveToIndices = [])).push(i.toIndex); | |
else if (i.type === a.REMOVE_NODE)(u.removeAtIndices || (u.removeAtIndices = [])).push(i.fromIndex); | |
else if (i.type === a.INSERT_MARKUP) { | |
var c = t[i.markupIndex], | |
p = c.tag, | |
d = c.rootNodeID; | |
o.associateRootNodeIDWithMountedNodeHandle(d, p), (u.addAtIndices || (u.addAtIndices = [])).push(i.toIndex), (u.addChildTags || (u.addChildTags = [])).push(p) | |
} | |
} | |
for (var h in n) { | |
var f = +h, | |
m = n[f]; | |
s.manageChildren(f, m.moveFromIndices, m.moveToIndices, m.addChildTags, m.addAtIndices, m.removeAtIndices) | |
} | |
} | |
}, | |
c = { | |
dangerouslyProcessChildrenUpdates: l.measure("ReactDOMIDOperations", "dangerouslyProcessChildrenUpdates", u), | |
dangerouslyReplaceNodeWithMarkupByID: l.measure("ReactDOMIDOperations", "dangerouslyReplaceNodeWithMarkupByID", function(e, t) { | |
var n = o.mostRecentMountedNodeHandleForRootNodeID(e); | |
s.replaceExistingNonRootView(n, t.tag), o.associateRootNodeIDWithMountedNodeHandle(e, t.tag) | |
}) | |
}; | |
i.exports = c | |
}), __d("ReactIOSTagHandles", ["invariant", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = t("warning"), | |
s = 1, | |
l = { | |
tagsStartAt: s, | |
tagCount: s, | |
allocateTag: function() { | |
for (; this.reactTagIsNativeTopRootID(l.tagCount);) l.tagCount++; | |
var e = l.tagCount; | |
return l.tagCount++, e | |
}, | |
associateRootNodeIDWithMountedNodeHandle: function(e, t) { | |
a(e && t, "Root node or tag is null when associating"), l.tagToRootNodeID[t] = e, l.rootNodeIDToTag[e] = t | |
}, | |
allocateRootNodeIDForTag: function(e) { | |
return this.reactTagIsNativeTopRootID(e) || o(0, "Expect a native root tag, instead got ", e), ".r[" + e + "]{TOP_LEVEL}" | |
}, | |
reactTagIsNativeTopRootID: function(e) { | |
return e % 10 === 1 | |
}, | |
mostRecentMountedNodeHandleForRootNodeID: function(e) { | |
return l.rootNodeIDToTag[e] | |
}, | |
tagToRootNodeID: [], | |
rootNodeIDToTag: {} | |
}; | |
i.exports = l | |
}), __d("ReactMultiChildUpdateTypes", ["keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("keyMirror"), | |
a = o({ | |
INSERT_MARKUP: null, | |
MOVE_EXISTING: null, | |
REMOVE_NODE: null, | |
TEXT_CONTENT: null | |
}); | |
i.exports = a | |
}), __d("ReactIOSReconcileTransaction", ["CallbackQueue", "PooledClass", "Transaction"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.reinitializeTransaction(), this.reactMountReady = a.getPooled(null) | |
} | |
var a = t("CallbackQueue"), | |
s = t("PooledClass"), | |
l = t("Transaction"), | |
u = { | |
initialize: function() { | |
this.reactMountReady.reset() | |
}, | |
close: function() { | |
this.reactMountReady.notifyAll() | |
} | |
}, | |
c = [u], | |
p = { | |
getTransactionWrappers: function() { | |
return c | |
}, | |
getReactMountReady: function() { | |
return this.reactMountReady | |
}, | |
destructor: function() { | |
a.release(this.reactMountReady), this.reactMountReady = null | |
} | |
}; | |
Object.assign(o.prototype, l.Mixin, o, p), s.addPoolingTo(o), i.exports = o | |
}), __d("ReactIOSComponentMixin", ["ReactIOSTagHandles"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactIOSTagHandles"), | |
a = { | |
getNativeNode: function() { | |
return o.rootNodeIDToTag[this._rootNodeID] | |
}, | |
getNodeHandle: function() { | |
return o.rootNodeIDToTag[this._rootNodeID] | |
} | |
}; | |
i.exports = a | |
}), __d("ReactIOSGlobalInteractionHandler", ["InteractionManager"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("InteractionManager"), | |
a = null, | |
s = { | |
onChange: function(e) { | |
0 === e ? a && (o.clearInteractionHandle(a), a = null) : a || (a = o.createInteractionHandle()) | |
} | |
}; | |
i.exports = s | |
}), __d("InteractionManager", ["ErrorUtils", "EventEmitter", "Set", "invariant", "keyMirror", "setImmediate"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
_ || (_ = d(a)) | |
} | |
function a() { | |
var e = f.size; | |
m.forEach(function(e) { | |
return f.add(e) | |
}), g.forEach(function(e) { | |
return f.delete(e) | |
}); | |
var t = f.size; | |
0 !== e && 0 === t ? h.emit(S.Events.interactionComplete) : 0 === e && 0 !== t && h.emit(S.Events.interactionStart), 0 === t && (y.forEach(function(e) { | |
s.applyWithGuard(e) | |
}), y = []), _ = null, m.clear(), g.clear() | |
} | |
var s = t("ErrorUtils"), | |
l = t("EventEmitter"), | |
u = t("Set"), | |
c = t("invariant"), | |
p = t("keyMirror"), | |
d = t("setImmediate"), | |
h = new l, | |
f = new u, | |
m = new u, | |
g = new u, | |
_ = null, | |
y = [], | |
v = 0, | |
S = { | |
Events: p({ | |
interactionStart: !0, | |
interactionComplete: !0 | |
}), | |
createInteractionHandle: function() { | |
o(); | |
var e = ++v; | |
return m.add(e), e | |
}, | |
clearInteractionHandle: function(e) { | |
e || c(0, "Must provide a handle to clear."), o(), m.delete(e), g.add(e) | |
}, | |
runAfterInteractions: function(e) { | |
"function" != typeof e && c(0, "Must specify a function to schedule."), o(), y.push(e) | |
}, | |
addListener: h.addListener.bind(h) | |
}; | |
i.exports = S | |
}), __d("Set", ["Map", "toIterator", "_shouldPolyfillES6Collection"], function(e, t, n, r, i) { | |
var o = t("Map"), | |
a = t("toIterator"), | |
s = t("_shouldPolyfillES6Collection"); | |
i.exports = function(e) { | |
function t(e) { | |
"use strict"; | |
if (null == this || "object" != typeof this && "function" != typeof this) throw new TypeError("Wrong set object type."); | |
if (n(this), null != e) | |
for (var t, r = a(e); !(t = r.next()).done;) this.add(t.value) | |
} | |
function n(e) { | |
e._map = new o, e.size = e._map.size | |
} | |
return s("Set") ? (t.prototype.add = function(e) { | |
"use strict"; | |
return this._map.set(e, e), this.size = this._map.size, this | |
}, t.prototype.clear = function() { | |
"use strict"; | |
n(this) | |
}, t.prototype["delete"] = function(e) { | |
"use strict"; | |
var t = this._map.delete(e); | |
return this.size = this._map.size, t | |
}, t.prototype.entries = function() { | |
"use strict"; | |
return this._map.entries() | |
}, t.prototype.forEach = function(e) { | |
"use strict"; | |
for (var t, n = arguments[1], r = this._map.keys(); !(t = r.next()).done;) e.call(n, t.value, t.value, this) | |
}, t.prototype.has = function(e) { | |
"use strict"; | |
return this._map.has(e) | |
}, t.prototype.values = function() { | |
"use strict"; | |
return this._map.values() | |
}, t.prototype[a.ITERATOR_SYMBOL] = t.prototype.values, t.prototype.keys = t.prototype.values, t) : e.Set | |
}(Function("return this")()) | |
}), __d("Map", ["guid", "isNode", "toIterator", "_shouldPolyfillES6Collection"], function(e, t, n, r, i) { | |
var o = t("guid"), | |
a = t("isNode"), | |
s = t("toIterator"), | |
l = t("_shouldPolyfillES6Collection"); | |
i.exports = function(e, t) { | |
function n(e) { | |
"use strict"; | |
if (!p(this)) throw new TypeError("Wrong map object type."); | |
if (c(this), null != e) | |
for (var t, n = s(e); !(t = n.next()).done;) { | |
if (!p(t.value)) throw new TypeError("Expected iterable items to be pair objects."); | |
this.set(t.value[0], t.value[1]) | |
} | |
} | |
function r(e, t) { | |
"use strict"; | |
if (!p(e) || !e._mapData) throw new TypeError("Object is not a map."); | |
if (-1 === [g, y, _].indexOf(t)) throw new Error("Invalid iteration kind."); | |
this._map = e, this._nextIndex = 0, this._kind = t | |
} | |
function i(e, t) { | |
if (p(t)) { | |
var n = R(t); | |
return e._objectIndex[n] | |
} | |
var r = v + t; | |
return "string" == typeof t ? e._stringIndex[r] : e._otherIndex[r] | |
} | |
function u(e, t, n) { | |
var r = null == n; | |
if (p(t)) { | |
var i = R(t); | |
r ? delete e._objectIndex[i] : e._objectIndex[i] = n | |
} else { | |
var o = v + t; | |
"string" == typeof t ? r ? delete e._stringIndex[o] : e._stringIndex[o] = n : r ? delete e._otherIndex[o] : e._otherIndex[o] = n | |
} | |
} | |
function c(e) { | |
return e._mapData = [], e._objectIndex = {}, e._stringIndex = {}, e._otherIndex = {}, __DEV__ && b ? void(e.hasOwnProperty(m) ? e[m] = 0 : (Object.defineProperty(e, m, { | |
value: 0, | |
writable: !0 | |
}), Object.defineProperty(e, "size", { | |
set: function() { | |
throw console.error("PLEASE FIX ME: You are changing the map size property which should not be writable and will break in production."), new Error("The map size property is not writable.") | |
}, | |
get: function() { | |
return e[m] | |
} | |
}))) : void(e.size = 0) | |
} | |
function p(e) { | |
return null != e && ("object" == typeof e || "function" == typeof e) | |
} | |
function d(e, t) { | |
return { | |
value: e, | |
done: t | |
} | |
} | |
function h(e) { | |
return b ? Object.isExtensible(e) : !0 | |
} | |
function f(e) { | |
var t; | |
switch (e.nodeType) { | |
case 1: | |
t = e.uniqueID; | |
break; | |
case 9: | |
t = e.documentElement.uniqueID; | |
break; | |
default: | |
return null | |
} | |
return t ? S + t : null | |
} | |
if (!l("Map")) return e.Map; | |
var m, g = "key", | |
_ = "value", | |
y = "key+value", | |
v = "$map_"; | |
__DEV__ && (m = "$size" + o()); | |
var S = "IE_HASH_"; | |
n.prototype.clear = function() { | |
"use strict"; | |
c(this) | |
}, n.prototype.has = function(e) { | |
"use strict"; | |
var t = i(this, e); | |
return !(null == t || !this._mapData[t]) | |
}, n.prototype.set = function(e, t) { | |
"use strict"; | |
var n = i(this, e); | |
return null != n && this._mapData[n] ? this._mapData[n][1] = t : (n = this._mapData.push([e, t]) - 1, u(this, e, n), __DEV__ ? this[m] += 1 : this.size += 1), this | |
}, n.prototype.get = function(e) { | |
"use strict"; | |
var n = i(this, e); | |
return null == n ? t : this._mapData[n][1] | |
}, n.prototype["delete"] = function(e) { | |
"use strict"; | |
var n = i(this, e); | |
return null != n && this._mapData[n] ? (u(this, e, t), this._mapData[n] = t, __DEV__ ? this[m] -= 1 : this.size -= 1, !0) : !1 | |
}, n.prototype.entries = function() { | |
"use strict"; | |
return new r(this, y) | |
}, n.prototype.keys = function() { | |
"use strict"; | |
return new r(this, g) | |
}, n.prototype.values = function() { | |
"use strict"; | |
return new r(this, _) | |
}, n.prototype.forEach = function(e, n) { | |
"use strict"; | |
if ("function" != typeof e) throw new TypeError("Callback must be callable."); | |
for (var r = e.bind(n || t), i = this._mapData, o = 0; o < i.length; o++) { | |
var a = i[o]; | |
null != a && r(a[1], a[0], this) | |
} | |
}, n.prototype[s.ITERATOR_SYMBOL] = n.prototype.entries, r.prototype.next = function() { | |
"use strict"; | |
if (!this instanceof n) throw new TypeError("Expected to be called on a MapIterator."); | |
var e = this._map, | |
r = this._nextIndex, | |
i = this._kind; | |
if (null == e) return d(t, !0); | |
for (var o = e._mapData; r < o.length;) { | |
var a = o[r]; | |
if (r += 1, this._nextIndex = r, a) { | |
if (i === g) return d(a[0], !1); | |
if (i === _) return d(a[1], !1); | |
if (i) return d(a, !1) | |
} | |
} | |
return this._map = t, d(t, !0) | |
}, r.prototype[s.ITERATOR_SYMBOL] = function() { | |
return this | |
}; | |
var b = function() { | |
try { | |
return Object.defineProperty({}, "x", {}), !0 | |
} catch (e) { | |
return !1 | |
} | |
}(), | |
R = function() { | |
var e = Object.prototype.propertyIsEnumerable, | |
t = o(), | |
n = 0; | |
return function(r) { | |
if (r[t]) return r[t]; | |
if (!b && r.propertyIsEnumerable && r.propertyIsEnumerable[t]) return r.propertyIsEnumerable[t]; | |
if (!b && a(r) && f(r)) return f(r); | |
if (!b && r[t]) return r[t]; | |
if (h(r)) { | |
if (n += 1, b) Object.defineProperty(r, t, { | |
enumerable: !1, | |
writable: !1, | |
configurable: !1, | |
value: n | |
}); | |
else if (r.propertyIsEnumerable) r.propertyIsEnumerable = function() { | |
return e.apply(this, arguments) | |
}, r.propertyIsEnumerable[t] = n; | |
else { | |
if (!a(r)) throw new Error("Unable to set a non-enumerable property on object."); | |
r[t] = n | |
} | |
return n | |
} | |
throw new Error("Non-extensible objects are not allowed as keys.") | |
} | |
}(); | |
return n | |
}(Function("return this")()) | |
}), __d("guid", [], function(e, t, n, r, i) { | |
function o() { | |
return "f" + (Math.random() * (1 << 30)).toString(16).replace(".", "") | |
} | |
i.exports = o | |
}), __d("isNode", [], function(e, t, n, r, i) { | |
function o(e) { | |
return !(!e || !("function" == typeof Node ? e instanceof Node : "object" == typeof e && "number" == typeof e.nodeType && "string" == typeof e.nodeName)) | |
} | |
i.exports = o | |
}), __d("toIterator", [], function(e, t, n, r, i) { | |
var o = "key", | |
a = "value", | |
s = "key+value", | |
l = "function" == typeof Symbol ? Symbol.iterator : "@@iterator", | |
u = function() { | |
return Array.prototype[l] && String.prototype[l] ? function(e) { | |
return e[l]() | |
} : function() { | |
function e(e, t) { | |
"use strict"; | |
if (!Array.isArray(e)) throw new TypeError("Object is not an Array"); | |
this.$ArrayIterator_iteratedObject = e, this.$ArrayIterator_kind = t, this.$ArrayIterator_nextIndex = 0 | |
} | |
function t(e) { | |
"use strict"; | |
if ("string" != typeof e) throw new TypeError("Object is not a string"); | |
this.$StringIterator_iteratedString = e, this.$StringIterator_nextIndex = 0 | |
} | |
function n(e, t) { | |
return { | |
value: e, | |
done: t | |
} | |
} | |
return e.prototype.next = function() { | |
"use strict"; | |
if (!this instanceof e) throw new TypeError("Object is not an ArrayIterator"); | |
if (null == this.$ArrayIterator_iteratedObject) return n(void 0, !0); | |
var t = this.$ArrayIterator_iteratedObject, | |
r = this.$ArrayIterator_iteratedObject.length, | |
i = this.$ArrayIterator_nextIndex, | |
l = this.$ArrayIterator_kind; | |
return i >= r ? (this.$ArrayIterator_iteratedObject = void 0, n(void 0, !0)) : (this.$ArrayIterator_nextIndex = i + 1, l === o ? n(i, !1) : l === a ? n(t[i], !1) : l === s ? n([i, t[i]], !1) : void 0) | |
}, e.prototype["@@iterator"] = function() { | |
"use strict"; | |
return this | |
}, t.prototype.next = function() { | |
"use strict"; | |
if (!this instanceof t) throw new TypeError("Object is not a StringIterator"); | |
if (null == this.$StringIterator_iteratedString) return n(void 0, !0); | |
var e = this.$StringIterator_nextIndex, | |
r = this.$StringIterator_iteratedString, | |
i = r.length; | |
if (e >= i) return this.$StringIterator_iteratedString = void 0, n(void 0, !0); | |
var o, a = r.charCodeAt(e); | |
if (55296 > a || a > 56319 || e + 1 === i) o = r[e]; | |
else { | |
var s = r.charCodeAt(e + 1); | |
o = 56320 > s || s > 57343 ? r[e] : r[e] + r[e + 1] | |
} | |
return this.$StringIterator_nextIndex = e + o.length, n(o, !1) | |
}, t.prototype["@@iterator"] = function() { | |
"use strict"; | |
return this | |
}, | |
function(n, r) { | |
return "string" == typeof n ? new t(n) : Array.isArray(n) ? new e(n, r || a) : n[l]() | |
} | |
}() | |
}(); | |
Object.assign(u, { | |
KIND_KEY: o, | |
KIND_VALUE: a, | |
KIND_KEY_VAL: s, | |
ITERATOR_SYMBOL: l | |
}), i.exports = u | |
}), __d("_shouldPolyfillES6Collection", [], function(e, t, n, r, i) { | |
function o(t) { | |
var n = e[t]; | |
if (null == n) return !0; | |
var r = n.prototype; | |
return null == n || "function" != typeof n || "function" != typeof r.clear || 0 !== (new n).size || "function" != typeof r.keys || "function" != typeof r.forEach || s(n) || !a(n) | |
} | |
function a(e) { | |
function t() { | |
"use strict"; | |
null !== e && e.apply(this, arguments) | |
} | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]); | |
var r = null === e ? null : e.prototype; | |
t.prototype = Object.create(r), t.prototype.constructor = t, t.__superConstructor__ = e; | |
try { | |
var i = new t([]); | |
return i.size, i instanceof e | |
} catch (o) { | |
return !1 | |
} | |
} | |
function s(e) { | |
try { | |
e() | |
} catch (t) { | |
return !1 | |
} | |
return !0 | |
} | |
i.exports = o | |
}), __d("ReactIOSGlobalResponderHandler", ["NativeModules", "ReactIOSTagHandles"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeModules").RKUIManager, | |
a = t("ReactIOSTagHandles"), | |
s = { | |
onChange: function(e, t) { | |
null !== t ? o.setJSResponder(a.mostRecentMountedNodeHandleForRootNodeID(t)) : o.clearJSResponder() | |
} | |
}; | |
i.exports = s | |
}), __d("ReactIOSMount", ["NativeModulesDeprecated", "ReactIOSTagHandles", "ReactPerf", "instantiateReactComponent", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
return e + "[" + t + "]" | |
} | |
var a = t("NativeModulesDeprecated").RKUIManager, | |
s = t("ReactIOSTagHandles"), | |
l = t("ReactPerf"), | |
u = t("instantiateReactComponent"), | |
c = t("invariant"), | |
p = {}, | |
d = { | |
instanceCount: 0, | |
_instancesByContainerID: {}, | |
renderComponent: function(e, t) { | |
var n = u(e); | |
if (!s.reactTagIsNativeTopRootID(t)) return void console.error("You cannot render into anything but a top root"); | |
var r = s.allocateRootNodeIDForTag(t); | |
s.associateRootNodeIDWithMountedNodeHandle(r, t), p[r] = !0; | |
var i = o(r, d.instanceCount++); | |
d._instancesByContainerID[r] = n, n.mountComponentIntoNode(i, r) | |
}, | |
unmountComponentAtNodeAndRemoveContainer: function(e) { | |
d.unmountComponentAtNode(e), a.removeRootView(e) | |
}, | |
unmountComponentAtNode: function(e) { | |
var t = s.tagToRootNodeID[e]; | |
p[t] || c(0, "We only currently support removing components from the root node"); | |
var n = d._instancesByContainerID[t]; | |
return n ? (d.unmountComponentFromNode(n, t), delete d._instancesByContainerID[t], delete p[t], !0) : (console.error("Tried to unmount a component that does not exist"), !1) | |
}, | |
unmountComponentFromNode: function(e, t) { | |
e.unmountComponent(); | |
var n = s.mostRecentMountedNodeHandleForRootNodeID(t); | |
a.removeSubviewsFromContainerWithID(n) | |
}, | |
getNode: function(e) { | |
return e | |
} | |
}; | |
d.renderComponent = l.measure("ReactMount", "_renderNewRootComponent", d.renderComponent), i.exports = d | |
}), __d("ReactTextComponent", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = null, | |
a = function() { | |
return o.apply(this, arguments) | |
}; | |
a.inject = function(e) { | |
o = e | |
}, i.exports = a | |
}), __d("ResponderEventPlugin", ["EventConstants", "EventPluginUtils", "EventPropagators", "NodeHandle", "ReactInstanceHandles", "ResponderSyntheticEvent", "ResponderTouchHistoryStore", "accumulate", "invariant", "keyOf"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
var r = y(e) ? x.startShouldSetResponder : v(e) ? x.moveShouldSetResponder : e === l.topLevelTypes.topSelectionChange ? x.selectionChangeShouldSetResponder : x.scrollShouldSetResponder, | |
i = C ? d._getFirstCommonAncestorID(C, t) : t, | |
o = i === C, | |
a = h.getPooled(r, i, n); | |
a.touchHistory = f.touchHistory, o ? c.accumulateTwoPhaseDispatchesSkipTarget(a) : c.accumulateTwoPhaseDispatches(a); | |
var s = w(a); | |
if (a.isPersistent() || a.constructor.release(a), !s || s === C) return null; | |
var u, p = h.getPooled(x.responderGrant, s, n); | |
if (p.touchHistory = f.touchHistory, c.accumulateDirectDispatches(p), C) { | |
var g = h.getPooled(x.responderTerminationRequest, C, n); | |
g.touchHistory = f.touchHistory, c.accumulateDirectDispatches(g); | |
var _ = !R(g) || b(g); | |
if (g.isPersistent() || g.constructor.release(g), _) { | |
var S = x.responderTerminate, | |
E = h.getPooled(S, C, n); | |
E.touchHistory = f.touchHistory, c.accumulateDirectDispatches(E), u = m(u, [p, E]), T(s) | |
} else { | |
var D = h.getPooled(x.responderReject, s, n); | |
D.touchHistory = f.touchHistory, c.accumulateDirectDispatches(D), u = m(u, D) | |
} | |
} else u = m(u, p), T(s); | |
return u | |
} | |
function a(e, t) { | |
return t && (e === l.topLevelTypes.topScroll || E > 0 && e === l.topLevelTypes.topSelectionChange || y(e) || v(e)) | |
} | |
function s(e) { | |
var t = e.touches; | |
if (!t || 0 === t.length) return !0; | |
for (var n = 0; n < t.length; n++) { | |
var r = t[n], | |
i = r.target; | |
if (null !== i && void 0 !== i && 0 !== i) { | |
var o = d._getFirstCommonAncestorID(C, p.getRootNodeID(i)); | |
if (o === C) return !1 | |
} | |
} | |
return !0 | |
} | |
var l = t("EventConstants"), | |
u = t("EventPluginUtils"), | |
c = t("EventPropagators"), | |
p = t("NodeHandle"), | |
d = t("ReactInstanceHandles"), | |
h = t("ResponderSyntheticEvent"), | |
f = t("ResponderTouchHistoryStore"), | |
m = t("accumulate"), | |
g = t("invariant"), | |
_ = t("keyOf"), | |
y = u.isStartish, | |
v = u.isMoveish, | |
S = u.isEndish, | |
b = u.executeDirectDispatch, | |
R = u.hasDispatches, | |
w = u.executeDispatchesInOrderStopAtTrue, | |
C = null, | |
E = 0, | |
D = 0, | |
T = function(e) { | |
var t = C; | |
C = e, null !== P.GlobalResponderHandler && P.GlobalResponderHandler.onChange(t, e) | |
}, | |
x = { | |
startShouldSetResponder: { | |
phasedRegistrationNames: { | |
bubbled: _({ | |
onStartShouldSetResponder: null | |
}), | |
captured: _({ | |
onStartShouldSetResponderCapture: null | |
}) | |
} | |
}, | |
scrollShouldSetResponder: { | |
phasedRegistrationNames: { | |
bubbled: _({ | |
onScrollShouldSetResponder: null | |
}), | |
captured: _({ | |
onScrollShouldSetResponderCapture: null | |
}) | |
} | |
}, | |
selectionChangeShouldSetResponder: { | |
phasedRegistrationNames: { | |
bubbled: _({ | |
onSelectionChangeShouldSetResponder: null | |
}), | |
captured: _({ | |
onSelectionChangeShouldSetResponderCapture: null | |
}) | |
} | |
}, | |
moveShouldSetResponder: { | |
phasedRegistrationNames: { | |
bubbled: _({ | |
onMoveShouldSetResponder: null | |
}), | |
captured: _({ | |
onMoveShouldSetResponderCapture: null | |
}) | |
} | |
}, | |
responderStart: { | |
registrationName: _({ | |
onResponderStart: null | |
}) | |
}, | |
responderMove: { | |
registrationName: _({ | |
onResponderMove: null | |
}) | |
}, | |
responderEnd: { | |
registrationName: _({ | |
onResponderEnd: null | |
}) | |
}, | |
responderRelease: { | |
registrationName: _({ | |
onResponderRelease: null | |
}) | |
}, | |
responderTerminationRequest: { | |
registrationName: _({ | |
onResponderTerminationRequest: null | |
}) | |
}, | |
responderGrant: { | |
registrationName: _({ | |
onResponderGrant: null | |
}) | |
}, | |
responderReject: { | |
registrationName: _({ | |
onResponderReject: null | |
}) | |
}, | |
responderTerminate: { | |
registrationName: _({ | |
onResponderTerminate: null | |
}) | |
} | |
}, | |
P = { | |
getResponderID: function() { | |
return C | |
}, | |
eventTypes: x, | |
extractEvents: function(e, t, n, r) { | |
y(e) ? E += 1 : S(e) && (E -= 1, E >= 0 || g(0, "Ended a touch event which was not counted in trackedTouchCount.")), f.recordTouchTrack(e, r); | |
var i = a(e, n) ? o(e, n, r) : null, | |
u = C && y(e), | |
p = C && v(e), | |
d = C && S(e), | |
_ = u ? x.responderStart : p ? x.responderMove : d ? x.responderEnd : null; | |
if (_) { | |
var b = h.getPooled(_, C, r); | |
b.touchHistory = f.touchHistory, c.accumulateDirectDispatches(b), i = m(i, b) | |
} | |
var R = C && e === l.topLevelTypes.topTouchCancel, | |
w = C && !R && S(e) && s(r), | |
I = R ? x.responderTerminate : w ? x.responderRelease : null; | |
if (I) { | |
var F = h.getPooled(I, C, r); | |
F.touchHistory = f.touchHistory, c.accumulateDirectDispatches(F), i = m(i, F), T(null) | |
} | |
var L = f.touchHistory.numberActiveTouches; | |
return P.GlobalInteractionHandler && L !== D && P.GlobalInteractionHandler.onChange(L), D = L, i | |
}, | |
GlobalResponderHandler: null, | |
GlobalInteractionHandler: null, | |
injection: { | |
injectGlobalResponderHandler: function(e) { | |
P.GlobalResponderHandler = e | |
}, | |
injectGlobalInteractionHandler: function(e) { | |
P.GlobalInteractionHandler = e | |
} | |
} | |
}; | |
i.exports = P | |
}), __d("ResponderSyntheticEvent", ["SyntheticEvent"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
a.call(this, e, t, n) | |
} | |
var a = t("SyntheticEvent"), | |
s = { | |
touchHistory: function() { | |
return null | |
} | |
}; | |
a.augmentClass(o, s), i.exports = o | |
}), __d("ResponderTouchHistoryStore", ["EventPluginUtils", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("EventPluginUtils"), | |
a = t("invariant"), | |
s = o.isMoveish, | |
l = o.isStartish, | |
u = o.isEndish, | |
c = 20, | |
p = { | |
touchBank: [], | |
numberActiveTouches: 0, | |
indexOfSingleActiveTouch: -1, | |
mostRecentTimeStamp: 0 | |
}, | |
d = function(e) { | |
return { | |
touchActive: !0, | |
startTimeStamp: e.timeStamp, | |
startPageX: e.pageX, | |
startPageY: e.pageY, | |
currentPageX: e.pageX, | |
currentPageY: e.pageY, | |
currentTimeStamp: e.timeStamp, | |
previousPageX: e.pageX, | |
previousPageY: e.pageY, | |
previousTimeStamp: e.timeStamp | |
} | |
}, | |
h = function(e, t) { | |
e.touchActive = !0, e.startTimeStamp = t.timeStamp, e.startPageX = t.pageX, e.startPageY = t.pageY, e.currentPageX = t.pageX, e.currentPageY = t.pageY, e.currentTimeStamp = t.timeStamp, e.previousPageX = t.pageX, e.previousPageY = t.pageY, e.previousTimeStamp = t.timeStamp | |
}, | |
f = function(e) { | |
var t = e.identifier; | |
null == t && a(0, "Touch object is missing identifier"), t > c && console.warn("Touch identifier " + t + " is greater than maximum supported " + c + " which causes performance issues backfilling array locations for all of the indices.") | |
}, | |
m = function(e) { | |
var t = p.touchBank, | |
n = e.identifier, | |
r = t[n]; | |
__DEV__ && f(e), r ? h(r, e) : t[e.identifier] = d(e), p.mostRecentTimeStamp = e.timeStamp | |
}, | |
g = function(e) { | |
var t = p.touchBank, | |
n = t[e.identifier]; | |
__DEV__ && (f(e), n || a(0, "Touch data should have been recorded on start")), n.touchActive = !0, n.previousPageX = n.currentPageX, n.previousPageY = n.currentPageY, n.previousTimeStamp = n.currentTimeStamp, n.currentPageX = e.pageX, n.currentPageY = e.pageY, n.currentTimeStamp = e.timeStamp, p.mostRecentTimeStamp = e.timeStamp | |
}, | |
_ = function(e) { | |
var t = p.touchBank, | |
n = t[e.identifier]; | |
__DEV__ && (f(e), n || a(0, "Touch data should have been recorded on start")), n.previousPageX = n.currentPageX, n.previousPageY = n.currentPageY, n.previousTimeStamp = n.currentTimeStamp, n.currentPageX = e.pageX, n.currentPageY = e.pageY, n.currentTimeStamp = e.timeStamp, n.touchActive = !1, p.mostRecentTimeStamp = e.timeStamp | |
}, | |
y = { | |
recordTouchTrack: function(e, t) { | |
var n = p.touchBank; | |
if (s(e)) t.changedTouches.forEach(g); | |
else if (l(e)) t.changedTouches.forEach(m), p.numberActiveTouches = t.touches.length, 1 === p.numberActiveTouches && (p.indexOfSingleActiveTouch = t.touches[0].identifier); | |
else if (u(e) && (t.changedTouches.forEach(_), p.numberActiveTouches = t.touches.length, 1 === p.numberActiveTouches)) { | |
for (var r = 0; r < n.length; r++) { | |
var i = n[r]; | |
if (null != i && i.touchActive) { | |
p.indexOfSingleActiveTouch = r; | |
break | |
} | |
} | |
if (__DEV__) { | |
var o = n[p.indexOfSingleActiveTouch], | |
c = null != o && !!o.touchActive; | |
c || a(0, "Cannot find single active touch") | |
} | |
} | |
}, | |
touchHistory: p | |
}; | |
i.exports = y | |
}), __d("accumulate", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
if (null == t && a(0, "accumulate(...): Accumulated items must be not be null or undefined."), null == e) return t; | |
var n = Array.isArray(e), | |
r = Array.isArray(t); | |
return n ? e.concat(t) : r ? [e].concat(t) : [e, t] | |
} | |
var a = t("invariant"); | |
i.exports = o | |
}), __d("RKRawText", ["ReactIOSViewAttributes", "createReactIOSNativeComponentClass"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = (t("ReactIOSViewAttributes"), t("createReactIOSNativeComponentClass")), | |
a = o({ | |
validAttributes: { | |
text: !0 | |
}, | |
uiViewClassName: "RCTRawText" | |
}); | |
i.exports = a | |
}), __d("ReactIOSViewAttributes", ["merge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("merge"), | |
a = {}; | |
a.UIView = { | |
pointerEvents: !0, | |
accessible: !0, | |
accessibilityLabel: !0, | |
testID: !0 | |
}, a.RKView = o(a.UIView, { | |
removeClippedSubviews: !0 | |
}), i.exports = a | |
}), __d("createReactIOSNativeComponentClass", ["ReactElement", "ReactLegacyElement", "ReactIOSNativeComponent"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactElement"), | |
a = t("ReactLegacyElement"), | |
s = t("ReactIOSNativeComponent"), | |
l = function(e) { | |
var t = function() {}; | |
return t.displayName = e.uiViewClassName, t.prototype = new s(e), t.prototype.constructor = t, a.wrapFactory(o.createFactory(t)) | |
}; | |
i.exports = l | |
}), __d("ReactIOSNativeComponent", ["NativeMethodsMixin", "ReactComponent", "ReactIOSComponentMixin", "ReactIOSEventEmitter", "ReactIOSStyleAttributes", "ReactIOSTagHandles", "ReactMultiChild", "NativeModulesDeprecated", "styleDiffer", "deepFreezeAndThrowOnMutationInDev", "diffRawProperties", "flattenStyle", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeMethodsMixin"), | |
a = t("ReactComponent"), | |
s = t("ReactIOSComponentMixin"), | |
l = t("ReactIOSEventEmitter"), | |
u = t("ReactIOSStyleAttributes"), | |
c = t("ReactIOSTagHandles"), | |
p = t("ReactMultiChild"), | |
d = t("NativeModulesDeprecated").RKUIManager, | |
h = t("styleDiffer"), | |
f = t("deepFreezeAndThrowOnMutationInDev"), | |
m = t("diffRawProperties"), | |
g = t("flattenStyle"), | |
_ = t("warning"), | |
y = l.registrationNames, | |
v = l.putListener, | |
S = l.deleteAllListeners, | |
b = function(e) { | |
this.viewConfig = e, this.props = null, this.previousFlattenedStyle = null | |
}, | |
R = function(e) { | |
var t = R._cache[e]; | |
if (t) return t; | |
for (var n = [], r = 0; e > r; r++) n[r] = r; | |
return R._cache[e] = n | |
}; | |
R._cache = {}, b.Mixin = { | |
unmountComponent: function() { | |
S(this._rootNodeID), a.Mixin.unmountComponent.call(this), this.unmountChildren() | |
}, | |
initializeChildren: function(e, t, n) { | |
var r = this.mountChildren(e, n); | |
if (r.length) { | |
for (var i = R(r.length), o = [], a = 0; a < r.length; a++) { | |
var s = r[a], | |
l = s.tag, | |
u = s.rootNodeID; | |
_(s && s.rootNodeID && s.tag, "Mount image returned does not have required data"), c.associateRootNodeIDWithMountedNodeHandle(u, l), o[a] = s.tag | |
} | |
d.manageChildren(t, null, null, o, i, null) | |
} | |
}, | |
computeUpdatedProperties: function(e, t, n) { | |
if (__DEV__) | |
for (var r in t) t.hasOwnProperty(r) && t[r] && n[r] && f(t[r]); | |
var i = m(null, e, t, n); | |
if (h(t.style, e.style)) { | |
var o = g(t.style); | |
i = m(i, this.previousFlattenedStyle, o, u), this.previousFlattenedStyle = o | |
} | |
return i | |
}, | |
updateComponent: function(e, t) { | |
a.Mixin.updateComponent.call(this, e, t); | |
var n = this._currentElement, | |
r = this.computeUpdatedProperties(t.props, n.props, this.viewConfig.validAttributes); | |
r && d.updateView(c.mostRecentMountedNodeHandleForRootNodeID(this._rootNodeID), this.viewConfig.uiViewClassName, r), this._reconcileListenersUponUpdate(t.props, n.props), this.updateChildren(this.props.children, e) | |
}, | |
_registerListenersUponCreation: function(e) { | |
for (var t in e) | |
if (y[t] && e[t]) { | |
var n = e[t]; | |
v(this._rootNodeID, t, n) | |
} | |
}, | |
_reconcileListenersUponUpdate: function(e, t) { | |
for (var n in t) y[n] && t[n] != e[n] && v(this._rootNodeID, n, t[n]) | |
}, | |
mountComponent: function(e, t, n) { | |
a.Mixin.mountComponent.call(this, e, t, n); | |
var r = c.allocateTag(); | |
this.previousFlattenedStyle = {}; | |
var i = this.computeUpdatedProperties({}, this.props, this.viewConfig.validAttributes); | |
return d.createView(r, this.viewConfig.uiViewClassName, i), this._registerListenersUponCreation(this.props), this.initializeChildren(this.props.children, r, t), { | |
rootNodeID: e, | |
tag: r | |
} | |
} | |
}, Object.assign(b.prototype, a.Mixin, p.Mixin, b.Mixin, o, s), i.exports = b | |
}), __d("NativeMethodsMixin", ["NativeModules", "NativeModulesDeprecated", "TextInputState", "flattenStyle", "invariant", "mergeFast"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
if (void 0 !== t.styles) { | |
var n = e._owner || null, | |
r = e.constructor.displayName, | |
i = "`styles` is not a supported property of `" + r + "`, did you mean `style` (singular)?"; | |
throw n && n.constructor && n.constructor.displayName && (i += "\n\nCheck the `" + n.constructor.displayName + "` parent component."), new Error(i) | |
} | |
} | |
var a = t("NativeModules"), | |
s = t("NativeModulesDeprecated"), | |
l = a.RKUIManager, | |
u = s.RKUIManager, | |
c = s.RKPOPAnimationManager, | |
p = t("TextInputState"), | |
d = t("flattenStyle"), | |
h = t("invariant"), | |
f = t("mergeFast"), | |
m = function(e, t) { | |
t || h(0, e + ' must be called with a valid animation ID returned from POPAnimation.createAnimation, received: "' + t + '"') | |
}, | |
g = { | |
addAnimation: function(e, t) { | |
m("addAnimation", e), c.addAnimation(this.getNodeHandle(), e, t) | |
}, | |
removeAnimation: function(e) { | |
m("removeAnimation", e), c.removeAnimation(this.getNodeHandle(), e) | |
}, | |
measure: function(e) { | |
u.measure(this.getNodeHandle(), e) | |
}, | |
measureLayout: function(e, t, n) { | |
l.measureLayout(this.getNodeHandle(), e, n, t) | |
}, | |
setNativeProps: function(e) { | |
var t = !0; | |
for (var n in e) | |
if ("style" !== n) { | |
t = !1; | |
break | |
} | |
var r = d(e.style), | |
i = null; | |
i = t ? r : r ? f(e, r) : e, u.updateView(this.getNodeHandle(), this.viewConfig.uiViewClassName, i) | |
}, | |
focus: function() { | |
p.focusTextInput(this.getNodeHandle()) | |
}, | |
blur: function() { | |
p.blurTextInput(this.getNodeHandle()) | |
} | |
}; | |
__DEV__ && ((g.componentWillMount || g.componentWillReceiveProps) && h(0, "Do not override existing functions."), g.componentWillMount = function() { | |
o(this, this.props) | |
}, g.componentWillReceiveProps = function(e) { | |
o(this, e) | |
}), i.exports = g | |
}), __d("TextInputState", ["NativeModulesDeprecated"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeModulesDeprecated").RKUIManager, | |
a = { | |
_currentlyFocusedID: null, | |
currentlyFocusedField: function() { | |
return this._currentlyFocusedID | |
}, | |
focusTextInput: function(e) { | |
this._currentlyFocusedID != e && null != e && (this._currentlyFocusedID = e, o.focus(e)) | |
}, | |
blurTextInput: function(e) { | |
this._currentlyFocusedID == e && null != e && (this._currentlyFocusedID = null, o.blur(e)) | |
} | |
}; | |
i.exports = a | |
}), __d("flattenStyle", ["StyleSheetRegistry", "mergeIntoFast"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return "number" == typeof e ? s.getStyleByID(e) : e | |
} | |
function a(e) { | |
if (!e) return void 0; | |
if (!Array.isArray(e)) return o(e); | |
for (var t = {}, n = 0; n < e.length; ++n) { | |
var r = a(e[n]); | |
r && l(t, r) | |
} | |
return t | |
} | |
var s = t("StyleSheetRegistry"), | |
l = t("mergeIntoFast"); | |
i.exports = a | |
}), __d("StyleSheetRegistry", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o() {} | |
var a = {}, | |
s = 1, | |
l = {}; | |
o.registerStyle = function(e) { | |
var t = ++s; | |
return __DEV__ && Object.freeze(e), a[t] = e, t | |
}, o.getStyleByID = function(e) { | |
if (!e) return l; | |
var t = a[e]; | |
return t ? t : (console.warn("Invalid style with id `" + e + "`. Skipping ..."), l) | |
}, i.exports = o | |
}), __d("mergeIntoFast", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function(e, t) { | |
for (var n in t) e[n] = t[n] | |
}; | |
i.exports = o | |
}), __d("mergeFast", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function(e, t) { | |
var n = {}; | |
for (var r in e) n[r] = e[r]; | |
for (var i in t) n[i] = t[i]; | |
return n | |
}; | |
i.exports = o | |
}), __d("ReactIOSEventEmitter", ["EventPluginHub", "ReactEventEmitterMixin", "ReactIOSTagHandles", "NodeHandle", "EventConstants", "merge", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("EventPluginHub"), | |
a = t("ReactEventEmitterMixin"), | |
s = t("ReactIOSTagHandles"), | |
l = t("NodeHandle"), | |
u = t("EventConstants"), | |
c = t("merge"), | |
p = t("warning"), | |
d = u.topLevelTypes, | |
h = {}, | |
f = function(e, t) { | |
for (var n = [], r = 0; r < t.length; r++) n.push(e[t[r]]); | |
return n | |
}, | |
m = function(e, t) { | |
for (var n = [], r = 0; r < t.length; r++) { | |
var i = t[r]; | |
n.push(e[i]), e[i] = null | |
} | |
for (var o = 0, a = 0; a < e.length; a++) { | |
var s = e[a]; | |
null !== s && (e[o++] = s) | |
} | |
return e.length = o, n | |
}, | |
g = c(a, { | |
registrationNames: o.registrationNameModules, | |
putListener: o.putListener, | |
getListener: o.getListener, | |
deleteListener: o.deleteListener, | |
deleteAllListeners: o.deleteAllListeners, | |
_receiveRootNodeIDEvent: function(e, t, n) { | |
var r = n || h; | |
g.handleTopLevel(t, e, e, r) | |
}, | |
receiveEvent: function(e, t, n) { | |
var r = s.tagToRootNodeID[e]; | |
g._receiveRootNodeIDEvent(r, t, n) | |
}, | |
receiveTouches: function(e, t, n) { | |
for (var r = e === d.topTouchEnd || e === d.topTouchCancel ? m(t, n) : f(t, n), i = 0; i < r.length; i++) { | |
var o = r[i]; | |
o.changedTouches = r, o.touches = t; | |
var a = o, | |
u = null, | |
c = a.target; | |
if (null !== c && void 0 !== c) { | |
if (c < s.tagsStartAt) { | |
__DEV__ && 0 === i && p(!1, "A view is reporting that a touch occured on tag zero."); | |
continue | |
} | |
u = l.getRootNodeID(c) | |
} | |
g._receiveRootNodeIDEvent(u, e, a) | |
} | |
} | |
}); | |
i.exports = g | |
}), __d("ReactEventEmitterMixin", ["EventPluginHub"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
a.enqueueEvents(e), a.processEventQueue() | |
} | |
var a = t("EventPluginHub"), | |
s = { | |
handleTopLevel: function(e, t, n, r) { | |
var i = a.extractEvents(e, t, n, r); | |
o(i) | |
} | |
}; | |
i.exports = s | |
}), __d("ReactIOSStyleAttributes", ["TextStylePropTypes", "ViewStylePropTypes", "deepDiffer", "keyMirror", "matricesDiffer", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("TextStylePropTypes"), | |
a = t("ViewStylePropTypes"), | |
s = t("deepDiffer"), | |
l = t("keyMirror"), | |
u = t("matricesDiffer"), | |
c = t("merge"), | |
p = c(l(a), l(o)); | |
p.transformMatrix = { | |
diff: u | |
}, p.shadowOffset = { | |
diff: s | |
}, i.exports = p | |
}), __d("TextStylePropTypes", ["ReactPropTypes", "ViewStylePropTypes", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactPropTypes"), | |
a = t("ViewStylePropTypes"), | |
s = t("merge"), | |
l = s(a, { | |
fontFamily: o.string, | |
fontSize: o.number, | |
fontWeight: o.oneOf(["normal", "bold"]), | |
lineHeight: o.number, | |
color: o.string, | |
containerBackgroundColor: o.string, | |
textAlign: o.oneOf(["auto", "left", "right", "center"]), | |
writingDirection: o.oneOf(["auto", "ltr", "rtl"]) | |
}), | |
u = Object.keys({ | |
padding: null, | |
paddingTop: null, | |
paddingLeft: null, | |
paddingRight: null, | |
paddingBottom: null, | |
paddingVertical: null, | |
paddingHorizontal: null | |
}); | |
for (var c in u) delete l[c]; | |
i.exports = l | |
}), __d("ReactPropTypes", ["ReactElement", "ReactPropTypeLocationNames", "emptyFunction"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
function t(t, n, r, i, o) { | |
if (i = i || R, null != n[r]) return e(n, r, i, o); | |
var a = S[o]; | |
return t ? new Error("Required " + a + " `" + r + "` was not specified in " + ("`" + i + "`.")) : void 0 | |
} | |
var n = t.bind(null, !1); | |
return n.isRequired = t.bind(null, !0), n | |
} | |
function a(e) { | |
function t(t, n, r, i) { | |
var o = t[n], | |
a = _(o); | |
if (a !== e) { | |
var s = S[i], | |
l = y(o); | |
return new Error("Invalid " + s + " `" + n + "` of type `" + l + "` " + ("supplied to `" + r + "`, expected `" + e + "`.")) | |
} | |
} | |
return o(t) | |
} | |
function s() { | |
return o(b.thatReturns()) | |
} | |
function l(e) { | |
function t(t, n, r, i) { | |
var o = t[n]; | |
if (!Array.isArray(o)) { | |
var a = S[i], | |
s = _(o); | |
return new Error("Invalid " + a + " `" + n + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected an array.")) | |
} | |
for (var l = 0; l < o.length; l++) { | |
var u = e(o, l, r, i); | |
if (u instanceof Error) return u | |
} | |
} | |
return o(t) | |
} | |
function u() { | |
function e(e, t, n, r) { | |
if (!v.isValidElement(e[t])) { | |
var i = S[r]; | |
return new Error("Invalid " + i + " `" + t + "` supplied to " + ("`" + n + "`, expected a React component.")) | |
} | |
} | |
return o(e) | |
} | |
function c(e) { | |
function t(t, n, r, i) { | |
if (!(t[n] instanceof e)) { | |
var o = S[i], | |
a = e.name || R; | |
return new Error("Invalid " + o + " `" + n + "` supplied to " + ("`" + r + "`, expected instance of `" + a + "`.")) | |
} | |
} | |
return o(t) | |
} | |
function p(e) { | |
function t(t, n, r, i) { | |
for (var o = t[n], a = 0; a < e.length; a++) | |
if (o === e[a]) return; | |
var s = S[i], | |
l = JSON.stringify(e); | |
return new Error("Invalid " + s + " `" + n + "` of value `" + o + "` " + ("supplied to `" + r + "`, expected one of " + l + ".")) | |
} | |
return o(t) | |
} | |
function d(e) { | |
function t(t, n, r, i) { | |
var o = t[n], | |
a = _(o); | |
if ("object" !== a) { | |
var s = S[i]; | |
return new Error("Invalid " + s + " `" + n + "` of type " + ("`" + a + "` supplied to `" + r + "`, expected an object.")) | |
} | |
for (var l in o) | |
if (o.hasOwnProperty(l)) { | |
var u = e(o, l, r, i); | |
if (u instanceof Error) return u | |
} | |
} | |
return o(t) | |
} | |
function h(e) { | |
function t(t, n, r, i) { | |
for (var o = 0; o < e.length; o++) { | |
var a = e[o]; | |
if (null == a(t, n, r, i)) return | |
} | |
var s = S[i]; | |
return new Error("Invalid " + s + " `" + n + "` supplied to " + ("`" + r + "`.")) | |
} | |
return o(t) | |
} | |
function f() { | |
function e(e, t, n, r) { | |
if (!g(e[t])) { | |
var i = S[r]; | |
return new Error("Invalid " + i + " `" + t + "` supplied to " + ("`" + n + "`, expected a renderable prop.")) | |
} | |
} | |
return o(e) | |
} | |
function m(e) { | |
function t(t, n, r, i) { | |
var o = t[n], | |
a = _(o); | |
if ("object" !== a) { | |
var s = S[i]; | |
return new Error("Invalid " + s + " `" + n + "` of type `" + a + "` " + ("supplied to `" + r + "`, expected `object`.")) | |
} | |
for (var l in e) { | |
var u = e[l]; | |
if (u) { | |
var c = u(o, l, r, i); | |
if (c) return c | |
} | |
} | |
} | |
return o(t, "expected `object`") | |
} | |
function g(e) { | |
switch (typeof e) { | |
case "number": | |
case "string": | |
return !0; | |
case "boolean": | |
return !e; | |
case "object": | |
if (Array.isArray(e)) return e.every(g); | |
if (v.isValidElement(e)) return !0; | |
for (var t in e) | |
if (!g(e[t])) return !1; | |
return !0; | |
default: | |
return !1 | |
} | |
} | |
function _(e) { | |
var t = typeof e; | |
return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : t | |
} | |
function y(e) { | |
var t = _(e); | |
if ("object" === t) { | |
if (e instanceof Date) return "date"; | |
if (e instanceof RegExp) return "regexp" | |
} | |
return t | |
} | |
var v = t("ReactElement"), | |
S = t("ReactPropTypeLocationNames"), | |
b = t("emptyFunction"), | |
R = "<<anonymous>>", | |
w = { | |
array: a("array"), | |
bool: a("boolean"), | |
func: a("function"), | |
number: a("number"), | |
object: a("object"), | |
string: a("string"), | |
any: s(), | |
arrayOf: l, | |
component: u(), | |
instanceOf: c, | |
objectOf: d, | |
oneOf: p, | |
oneOfType: h, | |
renderable: f(), | |
shape: m | |
}; | |
i.exports = w | |
}), __d("ViewStylePropTypes", ["LayoutPropTypes", "ReactPropTypes", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("LayoutPropTypes"), | |
a = t("ReactPropTypes"), | |
s = t("merge"), | |
l = s(o, { | |
backgroundColor: a.string, | |
borderColor: a.string, | |
borderTopColor: a.string, | |
borderRightColor: a.string, | |
borderBottomColor: a.string, | |
borderLeftColor: a.string, | |
borderRadius: a.number, | |
opacity: a.number, | |
overflow: a.oneOf(["visible", "hidden"]), | |
shadowColor: a.string, | |
shadowOffset: a.shape({ | |
h: a.number, | |
w: a.number | |
}), | |
shadowOpacity: a.number, | |
shadowRadius: a.number, | |
transformMatrix: a.arrayOf(a.number), | |
rotation: a.number, | |
scaleX: a.number, | |
scaleY: a.number, | |
translateX: a.number, | |
translateY: a.number | |
}); | |
i.exports = l | |
}), __d("LayoutPropTypes", ["ReactPropTypes"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactPropTypes"), | |
a = { | |
width: o.number, | |
height: o.number, | |
top: o.number, | |
left: o.number, | |
right: o.number, | |
bottom: o.number, | |
margin: o.number, | |
marginVertical: o.number, | |
marginHorizontal: o.number, | |
marginTop: o.number, | |
marginBottom: o.number, | |
marginLeft: o.number, | |
marginRight: o.number, | |
padding: o.number, | |
paddingVertical: o.number, | |
paddingHorizontal: o.number, | |
paddingTop: o.number, | |
paddingBottom: o.number, | |
paddingLeft: o.number, | |
paddingRight: o.number, | |
borderWidth: o.number, | |
borderTopWidth: o.number, | |
borderRightWidth: o.number, | |
borderBottomWidth: o.number, | |
borderLeftWidth: o.number, | |
position: o.oneOf(["absolute", "relative"]), | |
flexDirection: o.oneOf(["row", "column"]), | |
flexWrap: o.oneOf(["wrap", "nowrap"]), | |
justifyContent: o.oneOf(["flex-start", "flex-end", "center", "space-between", "space-around"]), | |
alignItems: o.oneOf(["flex-start", "flex-end", "center", "stretch"]), | |
alignSelf: o.oneOf(["auto", "flex-start", "flex-end", "center", "stretch"]), | |
flex: o.number | |
}; | |
i.exports = a | |
}), __d("deepDiffer", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function(e, t) { | |
if (e === t) return !1; | |
if ("function" == typeof e && "function" == typeof t) return !1; | |
if ("object" != typeof e || null === e) return e !== t; | |
if ("object" != typeof t || null === t) return !0; | |
if (e.constructor !== t.constructor) return !0; | |
for (var n in e) | |
if (o(e[n], t[n])) return !0; | |
for (var r in t) | |
if (void 0 === e[r]) return !0; | |
return !1 | |
}; | |
i.exports = o | |
}), __d("matricesDiffer", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function(e, t) { | |
return e === t ? !1 : !e || !t || e[12] !== t[12] || e[13] !== t[13] || e[14] !== t[14] || e[5] !== t[5] || e[10] !== t[10] || e[1] !== t[1] || e[2] !== t[2] || e[3] !== t[3] || e[4] !== t[4] || e[6] !== t[6] || e[7] !== t[7] || e[8] !== t[8] || e[9] !== t[9] || e[11] !== t[11] || e[15] !== t[15] | |
}; | |
i.exports = o | |
}), __d("ReactMultiChild", ["ReactComponent", "ReactMultiChildUpdateTypes", "flattenChildren", "instantiateReactComponent", "shouldUpdateReactComponent"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
_.push({ | |
parentID: e, | |
parentNode: null, | |
type: d.INSERT_MARKUP, | |
markupIndex: y.push(t) - 1, | |
textContent: null, | |
fromIndex: null, | |
toIndex: n | |
}) | |
} | |
function a(e, t, n) { | |
_.push({ | |
parentID: e, | |
parentNode: null, | |
type: d.MOVE_EXISTING, | |
markupIndex: null, | |
textContent: null, | |
fromIndex: t, | |
toIndex: n | |
}) | |
} | |
function s(e, t) { | |
_.push({ | |
parentID: e, | |
parentNode: null, | |
type: d.REMOVE_NODE, | |
markupIndex: null, | |
textContent: null, | |
fromIndex: t, | |
toIndex: null | |
}) | |
} | |
function l(e, t) { | |
_.push({ | |
parentID: e, | |
parentNode: null, | |
type: d.TEXT_CONTENT, | |
markupIndex: null, | |
textContent: t, | |
fromIndex: null, | |
toIndex: null | |
}) | |
} | |
function u() { | |
_.length && (p.BackendIDOperations.dangerouslyProcessChildrenUpdates(_, y), c()) | |
} | |
function c() { | |
_.length = 0, y.length = 0 | |
} | |
var p = t("ReactComponent"), | |
d = t("ReactMultiChildUpdateTypes"), | |
h = t("flattenChildren"), | |
f = t("instantiateReactComponent"), | |
m = t("shouldUpdateReactComponent"), | |
g = 0, | |
_ = [], | |
y = [], | |
v = { | |
Mixin: { | |
mountChildren: function(e, t) { | |
var n = h(e), | |
r = [], | |
i = 0; | |
this._renderedChildren = n; | |
for (var o in n) { | |
var a = n[o]; | |
if (n.hasOwnProperty(o)) { | |
var s = f(a, null); | |
n[o] = s; | |
var l = this._rootNodeID + o, | |
u = s.mountComponent(l, t, this._mountDepth + 1); | |
s._mountIndex = i, r.push(u), i++ | |
} | |
} | |
return r | |
}, | |
updateTextContent: function(e) { | |
g++; | |
var t = !0; | |
try { | |
var n = this._renderedChildren; | |
for (var r in n) n.hasOwnProperty(r) && this._unmountChildByName(n[r], r); | |
this.setTextContent(e), t = !1 | |
} finally { | |
g--, g || (t ? c() : u()) | |
} | |
}, | |
updateChildren: function(e, t) { | |
g++; | |
var n = !0; | |
try { | |
this._updateChildren(e, t), n = !1 | |
} finally { | |
g--, g || (n ? c() : u()) | |
} | |
}, | |
_updateChildren: function(e, t) { | |
var n = h(e), | |
r = this._renderedChildren; | |
if (n || r) { | |
var i, o = 0, | |
a = 0; | |
for (i in n) | |
if (n.hasOwnProperty(i)) { | |
var s = r && r[i], | |
l = s && s._currentElement, | |
u = n[i]; | |
if (m(l, u)) this.moveChild(s, a, o), o = Math.max(s._mountIndex, o), s.receiveComponent(u, t), s._mountIndex = a; | |
else { | |
s && (o = Math.max(s._mountIndex, o), this._unmountChildByName(s, i)); | |
var c = f(u, null); | |
this._mountChildByNameAtIndex(c, i, a, t) | |
} | |
a++ | |
} | |
for (i in r) !r.hasOwnProperty(i) || n && n[i] || this._unmountChildByName(r[i], i) | |
} | |
}, | |
unmountChildren: function() { | |
var e = this._renderedChildren; | |
for (var t in e) { | |
var n = e[t]; | |
n.unmountComponent && n.unmountComponent() | |
} | |
this._renderedChildren = null | |
}, | |
moveChild: function(e, t, n) { | |
e._mountIndex < n && a(this._rootNodeID, e._mountIndex, t) | |
}, | |
createChild: function(e, t) { | |
o(this._rootNodeID, t, e._mountIndex) | |
}, | |
removeChild: function(e) { | |
s(this._rootNodeID, e._mountIndex) | |
}, | |
setTextContent: function(e) { | |
l(this._rootNodeID, e) | |
}, | |
_mountChildByNameAtIndex: function(e, t, n, r) { | |
var i = this._rootNodeID + t, | |
o = e.mountComponent(i, r, this._mountDepth + 1); | |
e._mountIndex = n, this.createChild(e, o), this._renderedChildren = this._renderedChildren || {}, this._renderedChildren[t] = e | |
}, | |
_unmountChildByName: function(e, t) { | |
this.removeChild(e), e._mountIndex = null, e.unmountComponent(), delete this._renderedChildren[t] | |
} | |
} | |
}; | |
i.exports = v | |
}), __d("flattenChildren", ["ReactTextComponent", "traverseAllChildren", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
var r = e, | |
i = !r.hasOwnProperty(n); | |
if (u(i, "flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.", n), i && null != t) { | |
var o, a = typeof t; | |
o = "string" === a ? s(t) : "number" === a ? s("" + t) : t, r[n] = o | |
} | |
} | |
function a(e) { | |
if (null == e) return e; | |
var t = {}; | |
return l(e, o, t), t | |
} | |
var s = t("ReactTextComponent"), | |
l = t("traverseAllChildren"), | |
u = t("warning"); | |
i.exports = a | |
}), __d("traverseAllChildren", ["ReactElement", "ReactInstanceHandles", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return m[e] | |
} | |
function a(e, t) { | |
return e && null != e.key ? l(e.key) : t.toString(36) | |
} | |
function s(e) { | |
return ("" + e).replace(g, o) | |
} | |
function l(e) { | |
return "$" + s(e) | |
} | |
function u(e, t, n) { | |
return null == e ? 0 : _(e, "", 0, t, n) | |
} | |
var c = t("ReactElement"), | |
p = t("ReactInstanceHandles"), | |
d = t("invariant"), | |
h = p.SEPARATOR, | |
f = ":", | |
m = { | |
"=": "=0", | |
".": "=1", | |
":": "=2" | |
}, | |
g = /[=.:]/g, | |
_ = function(e, t, n, r, i) { | |
var o, s, u = 0; | |
if (Array.isArray(e)) | |
for (var p = 0; p < e.length; p++) { | |
var m = e[p]; | |
o = t + (t ? f : h) + a(m, p), s = n + u, u += _(m, o, s, r, i) | |
} else { | |
var g = typeof e, | |
y = "" === t, | |
v = y ? h + a(e, 0) : t; | |
if (null == e || "boolean" === g) r(i, null, v, n), u = 1; | |
else if ("string" === g || "number" === g || c.isValidElement(e)) r(i, e, v, n), u = 1; | |
else if ("object" === g) { | |
e && 1 === e.nodeType && d(0, "traverseAllChildren(...): Encountered an invalid child; DOM elements are not valid children of React components."); | |
for (var S in e) e.hasOwnProperty(S) && (o = t + (t ? f : h) + l(S) + f + a(e[S], 0), s = n + u, u += _(e[S], o, s, r, i)) | |
} | |
} | |
return u | |
}; | |
i.exports = u | |
}), __d("styleDiffer", ["deepDiffer"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
return !a(e, t) | |
} | |
function a(e, t) { | |
if (!e) return !t; | |
if (!t) return !e; | |
if (typeof e != typeof t) return !1; | |
if ("number" == typeof e) return e === t; | |
if (Array.isArray(e)) { | |
if (!Array.isArray(t) || e.length !== t.length) return !1; | |
for (var n = 0; n < e.length; ++n) | |
if (!a(e[n], t[n])) return !1; | |
return !0 | |
} | |
for (var r in e) | |
if (s(e[r], t[r])) return !1; | |
for (var r in t) | |
if (!e.hasOwnProperty(r)) return !1; | |
return !0 | |
} | |
var s = t("deepDiffer"); | |
i.exports = o | |
}), __d("deepFreezeAndThrowOnMutationInDev", [], function(e, t, n, r, i) { | |
function o(e) { | |
if (__DEV__) { | |
if ("object" != typeof e || null === e || Object.isFrozen(e) || Object.isSealed(e)) return; | |
for (var t in e) e.hasOwnProperty(t) && (e.__defineGetter__(t, s.bind(null, e[t])), e.__defineSetter__(t, a.bind(null, t)), o(e[t])); | |
Object.freeze(e), Object.seal(e) | |
} | |
} | |
function a(e, t) { | |
throw Error("You attempted to set the key `" + e + "` with the value `" + JSON.stringify(t) + "` on an object that is meant to be immutable and has been frozen.") | |
} | |
function s(e) { | |
return e | |
} | |
i.exports = o | |
}), __d("diffRawProperties", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n, r) { | |
var i, o, a, s, l; | |
for (var u in n) i = r[u], i && (a = t && t[u], o = n[u], a !== o && (s = "object" != typeof o || null === o, l = s || !a || i.diff && i.diff(a, o), l && (e = e || {}, e[u] = o))); | |
for (var u in t) i = r[u], i && (e && void 0 !== e[u] || (a = t[u], o = n && n[u], a !== o && (void 0 === o && (o = null), s = "object" != typeof o || null === o, l = s && a !== o || i.diff && i.diff(a, o), l && (e = e || {}, e[u] = o)))); | |
return e | |
} | |
i.exports = o | |
}), __d("UniversalWorkerNodeHandle", ["ReactIOSTagHandles", "invariant"], function(e, t, n, r, i) { | |
var o = t("ReactIOSTagHandles"), | |
a = t("invariant"), | |
s = { | |
getRootNodeID: function(e) { | |
return (void 0 === e || null === e || 0 === e) && a(0, "No node handle defined"), o.tagToRootNodeID[e] | |
} | |
}; | |
i.exports = s | |
}), __d("RCTEventEmitter", ["ReactIOSEventEmitter"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactIOSEventEmitter"); | |
i.exports = o | |
}), __d("RCTLog", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() {} | |
var a = t("invariant"), | |
s = { | |
log: "log", | |
info: "info", | |
warn: "warn", | |
error: "error", | |
mustfix: "error" | |
}; | |
o.logIfNoNativeHook = function() { | |
var e = Array.prototype.slice.call(arguments), | |
t = e.shift(), | |
n = s[t]; | |
return n || a(0, 'Level "' + t + '" not one of ' + Object.keys(s)), "undefined" == typeof nativeLoggingHook && console[n].apply(console, e), !0 | |
}, i.exports = o | |
}), __d("RCTJSTimers", ["JSTimersExecution"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("JSTimersExecution"), | |
a = o; | |
i.exports = a | |
}), __d("deprecated", ["warning"], function(e, t, n, r, i) { | |
function o(e, t, n, r, i) { | |
var o = !1; | |
if (__DEV__) { | |
var s = function() { | |
return a(o, e + "." + t + " will be deprecated in a future version. " + ("Use " + e + "." + n + " instead.")), o = !0, i.apply(r, arguments) | |
}; | |
return s.displayName = e + "_" + t, s | |
} | |
return i | |
} | |
var a = t("warning"); | |
i.exports = o | |
}), __d("RCTRenderingPerf", ["ReactDefaultPerf", "ReactPerf", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactDefaultPerf"), | |
a = t("ReactPerf"), | |
s = t("invariant"), | |
l = [], | |
u = { | |
toggle: function() { | |
a.enableMeasure ? (o.stop(), o.printInclusive(), o.printWasted(), l.forEach(function(e) { | |
return e.stop() | |
})) : (o.start(), console.log("Render perfomance measurements started"), l.forEach(function(e) { | |
return e.start() | |
})) | |
}, | |
register: function(e) { | |
"function" != typeof e.start && s(0, "Perf module should have start() function"), "function" != typeof e.stop && s(0, "Perf module should have stop() function"), l.push(e) | |
} | |
}; | |
i.exports = u | |
}), __d("ReactDefaultPerf", ["DOMProperty", "ReactDefaultPerfAnalysis", "ReactMount", "ReactPerf", "performanceNow"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return Math.floor(100 * e) / 100 | |
} | |
function a(e, t, n) { | |
e[t] = (e[t] || 0) + n | |
} | |
var s = t("DOMProperty"), | |
l = t("ReactDefaultPerfAnalysis"), | |
u = t("ReactMount"), | |
c = t("ReactPerf"), | |
p = t("performanceNow"), | |
d = { | |
_allMeasurements: [], | |
_mountStack: [0], | |
_injected: !1, | |
start: function() { | |
d._injected || c.injection.injectMeasure(d.measure), d._allMeasurements.length = 0, c.enableMeasure = !0 | |
}, | |
stop: function() { | |
c.enableMeasure = !1 | |
}, | |
getLastMeasurements: function() { | |
return d._allMeasurements | |
}, | |
printExclusive: function(e) { | |
e = e || d._allMeasurements; | |
var t = l.getExclusiveSummary(e); | |
console.table(t.map(function(e) { | |
return { | |
"Component class name": e.componentName, | |
"Total inclusive time (ms)": o(e.inclusive), | |
"Exclusive mount time (ms)": o(e.exclusive), | |
"Exclusive render time (ms)": o(e.render), | |
"Mount time per instance (ms)": o(e.exclusive / e.count), | |
"Render time per instance (ms)": o(e.render / e.count), | |
Instances: e.count | |
} | |
})) | |
}, | |
printInclusive: function(e) { | |
e = e || d._allMeasurements; | |
var t = l.getInclusiveSummary(e); | |
console.table(t.map(function(e) { | |
return { | |
"Owner > component": e.componentName, | |
"Inclusive time (ms)": o(e.time), | |
Instances: e.count | |
} | |
})), console.log("Total time:", l.getTotalTime(e).toFixed(2) + " ms") | |
}, | |
getMeasurementsSummaryMap: function(e) { | |
var t = l.getInclusiveSummary(e, !0); | |
return t.map(function(e) { | |
return { | |
"Owner > component": e.componentName, | |
"Wasted time (ms)": e.time, | |
Instances: e.count | |
} | |
}) | |
}, | |
printWasted: function(e) { | |
e = e || d._allMeasurements, console.table(d.getMeasurementsSummaryMap(e)), console.log("Total time:", l.getTotalTime(e).toFixed(2) + " ms") | |
}, | |
printDOM: function(e) { | |
e = e || d._allMeasurements; | |
var t = l.getDOMSummary(e); | |
console.table(t.map(function(e) { | |
var t = {}; | |
return t[s.ID_ATTRIBUTE_NAME] = e.id, t.type = e.type, t.args = JSON.stringify(e.args), t | |
})), console.log("Total time:", l.getTotalTime(e).toFixed(2) + " ms") | |
}, | |
_recordWrite: function(e, t, n, r) { | |
var i = d._allMeasurements[d._allMeasurements.length - 1].writes; | |
i[e] = i[e] || [], i[e].push({ | |
type: t, | |
time: n, | |
args: r | |
}) | |
}, | |
measure: function(e, t, n) { | |
return function() { | |
for (var r = [], i = 0, o = arguments.length; o > i; i++) r.push(arguments[i]); | |
var s, l, c; | |
if ("_renderNewRootComponent" === t || "flushBatchedUpdates" === t) return d._allMeasurements.push({ | |
exclusive: {}, | |
inclusive: {}, | |
render: {}, | |
counts: {}, | |
writes: {}, | |
displayNames: {}, | |
totalTime: 0 | |
}), c = p(), l = n.apply(this, r), d._allMeasurements[d._allMeasurements.length - 1].totalTime = p() - c, l; | |
if ("ReactDOMIDOperations" === e || "ReactComponentBrowserEnvironment" === e) { | |
if (c = p(), l = n.apply(this, r), s = p() - c, "mountImageIntoNode" === t) { | |
var h = u.getID(r[1]); | |
d._recordWrite(h, t, s, r[0]) | |
} else "dangerouslyProcessChildrenUpdates" === t ? r[0].forEach(function(e) { | |
var t = {}; | |
null !== e.fromIndex && (t.fromIndex = e.fromIndex), null !== e.toIndex && (t.toIndex = e.toIndex), null !== e.textContent && (t.textContent = e.textContent), null !== e.markupIndex && (t.markup = r[1][e.markupIndex]), d._recordWrite(e.parentID, e.type, s, t) | |
}) : d._recordWrite(r[0], t, s, Array.prototype.slice.call(r, 1)); | |
return l | |
} | |
if ("ReactCompositeComponent" !== e || "mountComponent" !== t && "updateComponent" !== t && "_renderValidatedComponent" !== t) return n.apply(this, r); | |
var f = "mountComponent" === t ? r[0] : this._rootNodeID, | |
m = "_renderValidatedComponent" === t, | |
g = "mountComponent" === t, | |
_ = d._mountStack, | |
y = d._allMeasurements[d._allMeasurements.length - 1]; | |
if (m ? a(y.counts, f, 1) : g && _.push(0), c = p(), l = n.apply(this, r), s = p() - c, m) a(y.render, f, s); | |
else if (g) { | |
var v = _.pop(); | |
_[_.length - 1] += s, a(y.exclusive, f, s - v), a(y.inclusive, f, s) | |
} else a(y.inclusive, f, s); | |
return y.displayNames[f] = { | |
current: this.constructor.displayName, | |
owner: this._owner ? this._owner.constructor.displayName : "<root>" | |
}, l | |
} | |
} | |
}; | |
i.exports = d | |
}), __d("DOMProperty", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
return (e & t) === t | |
} | |
var a = t("invariant"), | |
s = { | |
MUST_USE_ATTRIBUTE: 1, | |
MUST_USE_PROPERTY: 2, | |
HAS_SIDE_EFFECTS: 4, | |
HAS_BOOLEAN_VALUE: 8, | |
HAS_NUMERIC_VALUE: 16, | |
HAS_POSITIVE_NUMERIC_VALUE: 48, | |
HAS_OVERLOADED_BOOLEAN_VALUE: 64, | |
injectDOMPropertyConfig: function(e) { | |
var t = e.Properties || {}, | |
n = e.DOMAttributeNames || {}, | |
r = e.DOMPropertyNames || {}, | |
i = e.DOMMutationMethods || {}; | |
e.isCustomAttribute && u._isCustomAttributeFunctions.push(e.isCustomAttribute); | |
for (var l in t) { | |
u.isStandardName.hasOwnProperty(l) && a(0, "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.", l), u.isStandardName[l] = !0; | |
var c = l.toLowerCase(); | |
if (u.getPossibleStandardName[c] = l, n.hasOwnProperty(l)) { | |
var p = n[l]; | |
u.getPossibleStandardName[p] = l, u.getAttributeName[l] = p | |
} else u.getAttributeName[l] = c; | |
u.getPropertyName[l] = r.hasOwnProperty(l) ? r[l] : l, u.getMutationMethod[l] = i.hasOwnProperty(l) ? i[l] : null; | |
var d = t[l]; | |
u.mustUseAttribute[l] = o(d, s.MUST_USE_ATTRIBUTE), u.mustUseProperty[l] = o(d, s.MUST_USE_PROPERTY), u.hasSideEffects[l] = o(d, s.HAS_SIDE_EFFECTS), u.hasBooleanValue[l] = o(d, s.HAS_BOOLEAN_VALUE), u.hasNumericValue[l] = o(d, s.HAS_NUMERIC_VALUE), u.hasPositiveNumericValue[l] = o(d, s.HAS_POSITIVE_NUMERIC_VALUE), u.hasOverloadedBooleanValue[l] = o(d, s.HAS_OVERLOADED_BOOLEAN_VALUE), u.mustUseAttribute[l] && u.mustUseProperty[l] && a(0, "DOMProperty: Cannot require using both attribute and property: %s", l), !u.mustUseProperty[l] && u.hasSideEffects[l] && a(0, "DOMProperty: Properties that have side effects must use property: %s", l), !!u.hasBooleanValue[l] + !!u.hasNumericValue[l] + !!u.hasOverloadedBooleanValue[l] <= 1 || a(0, "DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s", l) | |
} | |
} | |
}, | |
l = {}, | |
u = { | |
ID_ATTRIBUTE_NAME: "data-reactid", | |
isStandardName: {}, | |
getPossibleStandardName: {}, | |
getAttributeName: {}, | |
getPropertyName: {}, | |
getMutationMethod: {}, | |
mustUseAttribute: {}, | |
mustUseProperty: {}, | |
hasSideEffects: {}, | |
hasBooleanValue: {}, | |
hasNumericValue: {}, | |
hasPositiveNumericValue: {}, | |
hasOverloadedBooleanValue: {}, | |
_isCustomAttributeFunctions: [], | |
isCustomAttribute: function(e) { | |
for (var t = 0; t < u._isCustomAttributeFunctions.length; t++) { | |
var n = u._isCustomAttributeFunctions[t]; | |
if (n(e)) return !0 | |
} | |
return !1 | |
}, | |
getDefaultValueForProperty: function(e, t) { | |
var n, r = l[e]; | |
return r || (l[e] = r = {}), t in r || (n = document.createElement(e), r[t] = n[t]), r[t] | |
}, | |
injection: s | |
}; | |
i.exports = u | |
}), __d("ReactDefaultPerfAnalysis", [], function(e, t, n, r, i) { | |
function o(e) { | |
for (var t = 0, n = 0; n < e.length; n++) { | |
var r = e[n]; | |
t += r.totalTime | |
} | |
return t | |
} | |
function a(e) { | |
for (var t = [], n = 0; n < e.length; n++) { | |
var r, i = e[n]; | |
for (r in i.writes) i.writes[r].forEach(function(e) { | |
t.push({ | |
id: r, | |
type: p[e.type] || e.type, | |
args: e.args | |
}) | |
}) | |
} | |
return t | |
} | |
function s(e) { | |
for (var t, n = {}, r = 0; r < e.length; r++) { | |
var i = e[r], | |
o = Object.assign({}, i.exclusive, i.inclusive); | |
for (var a in o) t = i.displayNames[a].current, n[t] = n[t] || { | |
componentName: t, | |
inclusive: 0, | |
exclusive: 0, | |
render: 0, | |
count: 0 | |
}, i.render[a] && (n[t].render += i.render[a]), i.exclusive[a] && (n[t].exclusive += i.exclusive[a]), i.inclusive[a] && (n[t].inclusive += i.inclusive[a]), i.counts[a] && (n[t].count += i.counts[a]) | |
} | |
var s = []; | |
for (t in n) n[t].exclusive >= c && s.push(n[t]); | |
return s.sort(function(e, t) { | |
return t.exclusive - e.exclusive | |
}), s | |
} | |
function l(e, t) { | |
for (var n, r = {}, i = 0; i < e.length; i++) { | |
var o, a = e[i], | |
s = Object.assign({}, a.exclusive, a.inclusive); | |
t && (o = u(a)); | |
for (var l in s) | |
if (!t || o[l]) { | |
var p = a.displayNames[l]; | |
n = p.owner + " > " + p.current, r[n] = r[n] || { | |
componentName: n, | |
time: 0, | |
count: 0 | |
}, a.inclusive[l] && (r[n].time += a.inclusive[l]), a.counts[l] && (r[n].count += a.counts[l]) | |
} | |
} | |
var d = []; | |
for (n in r) r[n].time >= c && d.push(r[n]); | |
return d.sort(function(e, t) { | |
return t.time - e.time | |
}), d | |
} | |
function u(e) { | |
var t = {}, | |
n = Object.keys(e.writes), | |
r = Object.assign({}, e.exclusive, e.inclusive); | |
for (var i in r) { | |
for (var o = !1, a = 0; a < n.length; a++) | |
if (0 === n[a].indexOf(i)) { | |
o = !0; | |
break | |
}!o && e.counts[i] > 0 && (t[i] = !0) | |
} | |
return t | |
} | |
var c = 1.2, | |
p = { | |
mountImageIntoNode: "set innerHTML", | |
INSERT_MARKUP: "set innerHTML", | |
MOVE_EXISTING: "move", | |
REMOVE_NODE: "remove", | |
TEXT_CONTENT: "set textContent", | |
updatePropertyByID: "update attribute", | |
deletePropertyByID: "delete attribute", | |
updateStylesByID: "update styles", | |
updateInnerHTMLByID: "set innerHTML", | |
dangerouslyReplaceNodeWithMarkupByID: "replace" | |
}, | |
d = { | |
getExclusiveSummary: s, | |
getInclusiveSummary: l, | |
getDOMSummary: a, | |
getTotalTime: o | |
}; | |
i.exports = d | |
}), __d("ReactMount", ["DOMProperty", "ReactBrowserEventEmitter", "ReactCurrentOwner", "ReactElement", "ReactLegacyElement", "ReactInstanceHandles", "ReactPerf", "containsNode", "deprecated", "getReactRootElementInContainer", "instantiateReactComponent", "invariant", "shouldUpdateReactComponent", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = w(e); | |
return t && G.getID(t) | |
} | |
function a(e) { | |
var t = s(e); | |
if (t) | |
if (F.hasOwnProperty(t)) { | |
var n = F[t]; | |
n !== e && (c(n, t) && E(0, "ReactMount: Two valid but unequal nodes with the same `%s`: %s", I, t), F[t] = e) | |
} else F[t] = e; | |
return t | |
} | |
function s(e) { | |
return e && e.getAttribute && e.getAttribute(I) || "" | |
} | |
function l(e, t) { | |
var n = s(e); | |
n !== t && delete F[n], e.setAttribute(I, t), F[t] = e | |
} | |
function u(e) { | |
return F.hasOwnProperty(e) && c(F[e], e) || (F[e] = G.findReactNodeByID(e)), F[e] | |
} | |
function c(e, t) { | |
if (e) { | |
s(e) !== t && E(0, "ReactMount: Unexpected modification of `%s`", I); | |
var n = G.findReactContainerForID(t); | |
if (n && b(n, e)) return !0 | |
} | |
return !1 | |
} | |
function p(e) { | |
delete F[e] | |
} | |
function d(e) { | |
var t = F[e]; | |
return t && c(t, e) ? void(N = t) : !1 | |
} | |
function h(e) { | |
N = null, v.traverseAncestors(e, d); | |
var t = N; | |
return N = null, t | |
} | |
var f = t("DOMProperty"), | |
m = t("ReactBrowserEventEmitter"), | |
g = t("ReactCurrentOwner"), | |
_ = t("ReactElement"), | |
y = t("ReactLegacyElement"), | |
v = t("ReactInstanceHandles"), | |
S = t("ReactPerf"), | |
b = t("containsNode"), | |
R = t("deprecated"), | |
w = t("getReactRootElementInContainer"), | |
C = t("instantiateReactComponent"), | |
E = t("invariant"), | |
D = t("shouldUpdateReactComponent"), | |
T = t("warning"), | |
x = y.wrapCreateElement(_.createElement), | |
P = v.SEPARATOR, | |
I = f.ID_ATTRIBUTE_NAME, | |
F = {}, | |
L = 1, | |
M = 9, | |
Q = {}, | |
A = {}; | |
if (__DEV__) var k = {}; | |
var O = [], | |
N = null, | |
G = { | |
_instancesByReactRootID: Q, | |
scrollMonitor: function(e, t) { | |
t() | |
}, | |
_updateRootComponent: function(e, t, n, r) { | |
var i = t.props; | |
return G.scrollMonitor(n, function() { | |
e.replaceProps(i, r) | |
}), __DEV__ && (k[o(n)] = w(n)), e | |
}, | |
_registerComponent: function(e, t) { | |
(!t || t.nodeType !== L && t.nodeType !== M) && E(0, "_registerComponent(...): Target container is not a DOM element."), m.ensureScrollValueMonitoring(); | |
var n = G.registerContainer(t); | |
return Q[n] = e, n | |
}, | |
_renderNewRootComponent: S.measure("ReactMount", "_renderNewRootComponent", function(e, t, n) { | |
T(null == g.current, "_renderNewRootComponent(): 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."); | |
var r = C(e, null), | |
i = G._registerComponent(r, t); | |
return r.mountComponentIntoNode(i, t, n), __DEV__ && (k[i] = w(t)), r | |
}), | |
render: function(e, t, n) { | |
_.isValidElement(e) || E(0, "renderComponent(): Invalid component element.%s", "string" == typeof e ? " Instead of passing an element string, make sure to instantiate it by passing it to React.createElement." : y.isValidFactory(e) ? " Instead of passing a component class, make sure to instantiate it by passing it to React.createElement." : "undefined" != typeof e.props ? " This may be caused by unintentionally loading two independent copies of React." : ""); | |
var r = Q[o(t)]; | |
if (r) { | |
var i = r._currentElement; | |
if (D(i, e)) return G._updateRootComponent(r, e, t, n); | |
G.unmountComponentAtNode(t) | |
} | |
var a = w(t), | |
s = a && G.isRenderedByReact(a), | |
l = s && !r, | |
u = G._renderNewRootComponent(e, t, l); | |
return n && n.call(u), u | |
}, | |
constructAndRenderComponent: function(e, t, n) { | |
var r = x(e, t); | |
return G.render(r, n) | |
}, | |
constructAndRenderComponentByID: function(e, t, n) { | |
var r = document.getElementById(n); | |
return r || E(0, 'Tried to get element with id of "%s" but it is not present on the page.', n), G.constructAndRenderComponent(e, t, r) | |
}, | |
registerContainer: function(e) { | |
var t = o(e); | |
return t && (t = v.getReactRootIDFromNodeID(t)), t || (t = v.createReactRootID()), A[t] = e, t | |
}, | |
unmountComponentAtNode: function(e) { | |
T(null == g.current, "unmountComponentAtNode(): 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."); | |
var t = o(e), | |
n = Q[t]; | |
return n ? (G.unmountComponentFromNode(n, e), delete Q[t], delete A[t], __DEV__ && delete k[t], !0) : !1 | |
}, | |
unmountComponentFromNode: function(e, t) { | |
for (e.unmountComponent(), t.nodeType === M && (t = t.documentElement); t.lastChild;) t.removeChild(t.lastChild) | |
}, | |
findReactContainerForID: function(e) { | |
var t = v.getReactRootIDFromNodeID(e), | |
n = A[t]; | |
if (__DEV__) { | |
var r = k[t]; | |
if (r && r.parentNode !== n) { | |
s(r) !== t && E(0, "ReactMount: Root element ID differed from reactRootID."); | |
var i = n.firstChild; | |
i && t === s(i) ? k[t] = i : console.warn("ReactMount: Root element has been removed from its original container. New container:", r.parentNode) | |
} | |
} | |
return n | |
}, | |
findReactNodeByID: function(e) { | |
var t = G.findReactContainerForID(e); | |
return G.findComponentRoot(t, e) | |
}, | |
isRenderedByReact: function(e) { | |
if (1 !== e.nodeType) return !1; | |
var t = G.getID(e); | |
return t ? t.charAt(0) === P : !1 | |
}, | |
getFirstReactDOM: function(e) { | |
for (var t = e; t && t.parentNode !== t;) { | |
if (G.isRenderedByReact(t)) return t; | |
t = t.parentNode | |
} | |
return null | |
}, | |
findComponentRoot: function(e, t) { | |
var n = O, | |
r = 0, | |
i = h(t) || e; | |
for (n[0] = i.firstChild, n.length = 1; r < n.length;) { | |
for (var o, a = n[r++]; a;) { | |
var s = G.getID(a); | |
s ? t === s ? o = a : v.isAncestorIDOf(s, t) && (n.length = r = 0, n.push(a.firstChild)) : n.push(a.firstChild), a = a.nextSibling | |
} | |
if (o) return n.length = 0, o | |
} | |
n.length = 0, E(0, "findComponentRoot(..., %s): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.", t, G.getID(e)) | |
}, | |
getReactRootID: o, | |
getID: a, | |
setID: l, | |
getNode: u, | |
purgeID: p | |
}; | |
G.renderComponent = R("ReactMount", "renderComponent", "render", this, G.render), i.exports = G | |
}), __d("ReactBrowserEventEmitter", ["EventConstants", "EventPluginHub", "EventPluginRegistry", "ReactEventEmitterMixin", "ViewportMetrics", "isEventSupported"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return Object.prototype.hasOwnProperty.call(e, g) || (e[g] = f++, d[e[g]] = {}), d[e[g]] | |
} | |
var a = t("EventConstants"), | |
s = t("EventPluginHub"), | |
l = t("EventPluginRegistry"), | |
u = t("ReactEventEmitterMixin"), | |
c = t("ViewportMetrics"), | |
p = t("isEventSupported"), | |
d = {}, | |
h = !1, | |
f = 0, | |
m = { | |
topBlur: "blur", | |
topChange: "change", | |
topClick: "click", | |
topCompositionEnd: "compositionend", | |
topCompositionStart: "compositionstart", | |
topCompositionUpdate: "compositionupdate", | |
topContextMenu: "contextmenu", | |
topCopy: "copy", | |
topCut: "cut", | |
topDoubleClick: "dblclick", | |
topDrag: "drag", | |
topDragEnd: "dragend", | |
topDragEnter: "dragenter", | |
topDragExit: "dragexit", | |
topDragLeave: "dragleave", | |
topDragOver: "dragover", | |
topDragStart: "dragstart", | |
topDrop: "drop", | |
topFocus: "focus", | |
topInput: "input", | |
topKeyDown: "keydown", | |
topKeyPress: "keypress", | |
topKeyUp: "keyup", | |
topMouseDown: "mousedown", | |
topMouseMove: "mousemove", | |
topMouseOut: "mouseout", | |
topMouseOver: "mouseover", | |
topMouseUp: "mouseup", | |
topPaste: "paste", | |
topScroll: "scroll", | |
topSelectionChange: "selectionchange", | |
topTextInput: "textInput", | |
topTouchCancel: "touchcancel", | |
topTouchEnd: "touchend", | |
topTouchMove: "touchmove", | |
topTouchStart: "touchstart", | |
topWheel: "wheel" | |
}, | |
g = "_reactListenersID" + String(Math.random()).slice(2), | |
_ = Object.assign({}, u, { | |
ReactEventListener: null, | |
injection: { | |
injectReactEventListener: function(e) { | |
e.setHandleTopLevel(_.handleTopLevel), _.ReactEventListener = e | |
} | |
}, | |
setEnabled: function(e) { | |
_.ReactEventListener && _.ReactEventListener.setEnabled(e) | |
}, | |
isEnabled: function() { | |
return !(!_.ReactEventListener || !_.ReactEventListener.isEnabled()) | |
}, | |
listenTo: function(e, t) { | |
for (var n = t, r = o(n), i = l.registrationNameDependencies[e], s = a.topLevelTypes, u = 0, c = i.length; c > u; u++) { | |
var d = i[u]; | |
r.hasOwnProperty(d) && r[d] || (d === s.topWheel ? p("wheel") ? _.ReactEventListener.trapBubbledEvent(s.topWheel, "wheel", n) : p("mousewheel") ? _.ReactEventListener.trapBubbledEvent(s.topWheel, "mousewheel", n) : _.ReactEventListener.trapBubbledEvent(s.topWheel, "DOMMouseScroll", n) : d === s.topScroll ? p("scroll", !0) ? _.ReactEventListener.trapCapturedEvent(s.topScroll, "scroll", n) : _.ReactEventListener.trapBubbledEvent(s.topScroll, "scroll", _.ReactEventListener.WINDOW_HANDLE) : d === s.topFocus || d === s.topBlur ? (p("focus", !0) ? (_.ReactEventListener.trapCapturedEvent(s.topFocus, "focus", n), _.ReactEventListener.trapCapturedEvent(s.topBlur, "blur", n)) : p("focusin") && (_.ReactEventListener.trapBubbledEvent(s.topFocus, "focusin", n), _.ReactEventListener.trapBubbledEvent(s.topBlur, "focusout", n)), r[s.topBlur] = !0, r[s.topFocus] = !0) : m.hasOwnProperty(d) && _.ReactEventListener.trapBubbledEvent(d, m[d], n), r[d] = !0) | |
} | |
}, | |
trapBubbledEvent: function(e, t, n) { | |
return _.ReactEventListener.trapBubbledEvent(e, t, n) | |
}, | |
trapCapturedEvent: function(e, t, n) { | |
return _.ReactEventListener.trapCapturedEvent(e, t, n) | |
}, | |
ensureScrollValueMonitoring: function() { | |
if (!h) { | |
var e = c.refreshScrollValues; | |
_.ReactEventListener.monitorScrollValue(e), h = !0 | |
} | |
}, | |
eventNameDispatchConfigs: s.eventNameDispatchConfigs, | |
registrationNameModules: s.registrationNameModules, | |
putListener: s.putListener, | |
getListener: s.getListener, | |
deleteListener: s.deleteListener, | |
deleteAllListeners: s.deleteAllListeners | |
}); | |
i.exports = _ | |
}), __d("ViewportMetrics", ["getUnboundedScrollPosition"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("getUnboundedScrollPosition"), | |
a = { | |
currentScrollLeft: 0, | |
currentScrollTop: 0, | |
refreshScrollValues: function() { | |
var e = o(window); | |
a.currentScrollLeft = e.x, a.currentScrollTop = e.y | |
} | |
}; | |
i.exports = a | |
}), __d("getUnboundedScrollPosition", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return e === window ? { | |
x: window.pageXOffset || document.documentElement.scrollLeft, | |
y: window.pageYOffset || document.documentElement.scrollTop | |
} : { | |
x: e.scrollLeft, | |
y: e.scrollTop | |
} | |
} | |
i.exports = o | |
}), __d("isEventSupported", ["ExecutionEnvironment"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
if (!s.canUseDOM || t && !("addEventListener" in document)) return !1; | |
var n = "on" + e, | |
r = n in document; | |
if (!r) { | |
var i = document.createElement("div"); | |
i.setAttribute(n, "return;"), r = "function" == typeof i[n] | |
} | |
return !r && a && "wheel" === e && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r | |
} | |
var a, s = t("ExecutionEnvironment"); | |
s.canUseDOM && (a = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0), i.exports = o | |
}), __d("containsNode", ["isTextNode"], function(e, t, n, r, i) { | |
function o(e, t) { | |
return e && t ? e === t ? !0 : a(e) ? !1 : a(t) ? o(e, t.parentNode) : e.contains ? e.contains(t) : e.compareDocumentPosition ? !!(16 & e.compareDocumentPosition(t)) : !1 : !1 | |
} | |
var a = t("isTextNode"); | |
i.exports = o | |
}), __d("isTextNode", ["isNode"], function(e, t, n, r, i) { | |
function o(e) { | |
return a(e) && 3 == e.nodeType | |
} | |
var a = t("isNode"); | |
i.exports = o | |
}), __d("getReactRootElementInContainer", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return e ? e.nodeType === a ? e.documentElement : e.firstChild : null | |
} | |
var a = 9; | |
i.exports = o | |
}), __d("GroupsFeedApp", ["DliteLoadingComponent", "GroupRoute", "React", "THGroupView", "View", "THRoutingConfig"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DliteLoadingComponent"), | |
a = t("GroupRoute"), | |
s = t("React"), | |
l = t("THGroupView"), | |
u = t("View"); | |
t("THRoutingConfig").initialize(); | |
var c = s.createClass({ | |
displayName: "GroupsFeedApp", | |
render: function() { | |
var e = s.createElement(u, { | |
style: { | |
paddingTop: this.props.topInset | |
} | |
}, l.getFakeStoryView()); | |
return s.createElement(o, { | |
component: l, | |
route: new a(null, { | |
group: this.props.group | |
}), | |
loadingView: e, | |
refetchRoute: !0, | |
passProps: this.props | |
}) | |
} | |
}); | |
i.exports = c | |
}), __d("DliteLoadingComponent", ["Dlite", "FBSpinner", "React", "StyleSheet", "StyleSheetPropType", "TimerMixin", "View", "emptyFunction", "keyMirror", "merge", "performanceNow"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("Dlite"), | |
a = t("FBSpinner"), | |
s = t("React"), | |
l = t("StyleSheet"), | |
u = t("StyleSheetPropType"), | |
c = t("TimerMixin"), | |
p = t("View"), | |
d = t("emptyFunction"), | |
h = t("keyMirror"), | |
f = t("merge"), | |
m = (t("performanceNow"), h({ | |
LOADING: null, | |
READY: null, | |
ERROR: null | |
})), | |
g = l.create({ | |
spinner: { | |
alignItems: "center", | |
paddingTop: 200 | |
} | |
}), | |
_ = s.createClass({ | |
displayName: "DliteLoadingComponent", | |
mixins: [c], | |
propTypes: { | |
loadingView: s.PropTypes.component, | |
failedView: s.PropTypes.component, | |
refetchRoute: s.PropTypes.bool, | |
onComponentRef: s.PropTypes.func, | |
onFailure: s.PropTypes.func, | |
onResolvable: s.PropTypes.func, | |
onBlockingRequest: s.PropTypes.func, | |
onSuccess: s.PropTypes.func, | |
passProps: s.PropTypes.object, | |
style: u, | |
navigator: s.PropTypes.object, | |
navigationOperations: s.PropTypes.object | |
}, | |
getComponent: function() { | |
return this._component | |
}, | |
reload: function() { | |
this.setState({ | |
loadingState: m.LOADING | |
}), this._runQueries(this.props) | |
}, | |
getInitialState: function() { | |
return { | |
loadingState: m.LOADING | |
} | |
}, | |
getDefaultProps: function() { | |
return { | |
loadingView: s.createElement(p, { | |
style: g.spinner | |
}, s.createElement(a, null)), | |
refetchRoute: !1, | |
onComponentRef: d, | |
onFailure: d, | |
onResolvable: d, | |
onBlockingRequest: d, | |
onSuccess: d | |
} | |
}, | |
shouldComponentUpdate: function(e, t) { | |
return t.loadingState !== this.state.loadingState || e.style !== this.props.style || e.passProps !== this.props.passProps | |
}, | |
componentWillReceiveProps: function(e) { | |
this.props.route !== e.route && (this.setState({ | |
loadingState: m.LOADING | |
}), this._runQueries(e)) | |
}, | |
componentWillMount: function() { | |
this._runQueries(this.props) | |
}, | |
componentWillUnmount: function() { | |
this.pendingQuery && (this.pendingQuery.abort(), this.pendingQuery = null) | |
}, | |
_runQueries: function(e) { | |
var t = e.component, | |
n = { | |
refetch: e.refetchRoute | |
}; | |
this.pendingQuery && this.pendingQuery.abort(), this.pendingQuery = o.createAndExecuteQueries(t, e.route, n, { | |
onResolvable: this._onResolvable.bind(this, e), | |
onSuccess: this._onSuccess.bind(this, e), | |
onFailure: this._onFailure.bind(this, e), | |
onBlockingRequest: this._onBlockingRequest.bind(this, e) | |
}) | |
}, | |
_onBlockingRequest: function(e) { | |
var t = e.route; | |
this.isMounted() && t === this.props.route && this.props.onBlockingRequest() | |
}, | |
_onResolvable: function(e) { | |
var t = e.route; | |
this.isMounted() && t === this.props.route && (this.props.onResolvable(), this.setState({ | |
loadingState: m.READY | |
})) | |
}, | |
_onSuccess: function(e) { | |
this.pendingQuery = null; | |
var t = e.route; | |
this.isMounted() && t === this.props.route && (this.props.onSuccess(), this.setState({ | |
loadingState: m.READY | |
})) | |
}, | |
_onFailure: function(e, t) { | |
this.pendingQuery = null; | |
var n = e.route; | |
this.isMounted() && n === this.props.route && (this.props.onFailure(t), this.setState({ | |
loadingState: m.ERROR | |
})) | |
}, | |
_reloadDataForChild: function(e) { | |
this.pendingQuery && this.pendingQuery.abort(), this.pendingQuery = o.createAndExecuteQueries(this.props.component, this.props.route, { | |
refetch: !0 | |
}, e || {}) | |
}, | |
_onComponentRef: function(e) { | |
this._component = e, this.props.onComponentRef(this._component) | |
}, | |
render: function() { | |
var e, t = this.props.component, | |
n = f({ | |
navigator: this.props.navigationOperations || this.props.navigator, | |
forceUpdate: this._reloadDataForChild | |
}, this.props.passProps), | |
r = this._onComponentRef; | |
return e = this.state.loadingState === m.LOADING ? this.props.loadingView : this.state.loadingState === m.ERROR ? this.props.failedView : o.createComponent(t, this.props.route, n, r), s.createElement(p, { | |
style: this.props.style | |
}, e) | |
} | |
}); | |
i.exports = _ | |
}), __d("Dlite", ["DliteLogger", "DliteRouter", "DliteRoutingWrapper", "GraphQLQueryRunner", "GraphQLStore", "React", "extendArray", "forEachObject", "mapObject", "splitDeferredQueries"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
return f(t, function(t, n) { | |
var r = e + "." + n; | |
return function() { | |
var e = a.logClientEvent(r), | |
n = t.apply(this, arguments); | |
return e.stop(), n | |
} | |
}) | |
} | |
var a = t("DliteLogger"), | |
s = t("DliteRouter"), | |
l = t("DliteRoutingWrapper"), | |
u = t("GraphQLQueryRunner"), | |
c = t("GraphQLStore"), | |
p = t("React"), | |
d = t("extendArray"), | |
h = t("forEachObject"), | |
f = t("mapObject"), | |
m = t("splitDeferredQueries"), | |
g = { | |
createAndExecuteQueries: function(e, t, n, r) { | |
var i = g.createQueries(e, t); | |
return n.refetch ? u.forceFetch(i, r) : u.run(i, r) | |
}, | |
createQueries: function(e, t) { | |
return e.getQueriesForRoute(t) | |
}, | |
createComponent: function(e, t, n, r) { | |
return s.addRoute(t.constructor), Object.assign(n, f(g.createQueries(e, t), function(e) { | |
if (e) { | |
var t = c.resolvePointersForQuery(e), | |
n = Object.keys(t)[0]; | |
return t[n] | |
} | |
return null | |
})), p.createElement(l, { | |
childFactory: function() { | |
return p.createElement(e, Object.assign({}, n)) | |
}, | |
onRef: r, | |
route: t | |
}) | |
}, | |
createDeferredQueries: function(e, t) { | |
var n = []; | |
return h(e.getQueriesForRoute(t), function(e) { | |
e && d(n, m(e)) | |
}), n | |
}, | |
insertQueryResponses: function(e, t) { | |
h(e, function(e, n) { | |
c.handleUpdate(t[n], e) | |
}) | |
} | |
}; | |
i.exports = o("Dlite", g) | |
}), __d("DliteLogger", ["invariant", "keyMirror", "mixInEventEmitter"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n, r, i) { | |
var o = m[t] = m[t] || 0, | |
s = { | |
type: e, | |
name: o ? t + " " + o : t, | |
depth: d, | |
startTime: n, | |
endTime: r, | |
insertOrder: h.length, | |
data: i || {} | |
}; | |
return d++, h.push(s), m[t] ++, isNaN(s.endTime) || a(s), s | |
} | |
function a(e) { | |
f.push(e), _.emitAndHold(_.Events.completedEvent, e) | |
} | |
function s(e, t) { | |
if (__DEV__) | |
for (var n = 0; n < g.length; n++) { | |
var r = g[n]; | |
if (-1 !== e.indexOf(r)) { | |
var i = (t ? "Starting event " : "Ending event ") + '"' + e + '" matches breakpoint "' + r + '"'; | |
return void console.log(i) | |
} | |
} | |
} | |
var l = t("invariant"), | |
u = t("keyMirror"), | |
c = t("mixInEventEmitter"), | |
p = u({ | |
CLIENT: null, | |
SERVER: null | |
}), | |
d = 0, | |
h = [], | |
f = [], | |
m = {}, | |
g = [], | |
_ = { | |
Events: u({ | |
completedEvent: null | |
}), | |
logClientEventRetroactive: function(e, t, n, r) { | |
s(e, !0), console.timeStamp && console.timeStamp(e); | |
var i = o(p.CLIENT, e, t, n, r); | |
return { | |
stop: function() { | |
isNaN(i.endTime) || l(0, "Cannot end `%s` more than once.", e), -1 !== h.indexOf(i) && d--, i.endTime = Date.now(), a(i), s(e, !1) | |
} | |
} | |
}, | |
logClientEvent: function(e, t) { | |
return _.logClientEventRetroactive(e, Date.now(), 0 / 0, t) | |
}, | |
breakOnClientEvent: function(e) { | |
g.push(e) | |
}, | |
flushCompletedEvents: function() { | |
var e = f; | |
return d = 0, f = [], e | |
}, | |
flush: function() { | |
var e = h.concat(f); | |
return d = 0, h = [], f = [], m = {}, e | |
} | |
}; | |
c(_, _.Events), i.exports = _ | |
}), __d("mixInEventEmitter", ["EventEmitter", "EventEmitterWithHolding", "EventHolder", "EventValidator", "copyProperties", "invariant", "keyOf"], function(e, t, n, r, i) { | |
function o(e, t) { | |
t || p(0, "Must supply set of valid event types"), this.__eventEmitter && p(0, "An active emitter is already mixed in"); | |
var n = e.prototype || e, | |
r = e.constructor; | |
r && r !== Object && r !== Function && p(0, "Mix EventEmitter into a class, not an instance"), n.hasOwnProperty(h) ? c(n.__types, t) : n.__types = n.__types ? c({}, n.__types, t) : t, c(n, f) | |
} | |
var a = t("EventEmitter"), | |
s = t("EventEmitterWithHolding"), | |
l = t("EventHolder"), | |
u = t("EventValidator"), | |
c = t("copyProperties"), | |
p = t("invariant"), | |
d = t("keyOf"), | |
h = d({ | |
__types: !0 | |
}), | |
f = { | |
emit: function(e, t, n, r, i, o, a) { | |
return this.__getEventEmitter().emit(e, t, n, r, i, o, a) | |
}, | |
emitAndHold: function(e, t, n, r, i, o, a) { | |
return this.__getEventEmitter().emitAndHold(e, t, n, r, i, o, a) | |
}, | |
addListener: function(e, t, n) { | |
return this.__getEventEmitter().addListener(e, t, n) | |
}, | |
once: function(e, t, n) { | |
return this.__getEventEmitter().once(e, t, n) | |
}, | |
addRetroactiveListener: function(e, t, n) { | |
return this.__getEventEmitter().addRetroactiveListener(e, t, n) | |
}, | |
addListenerMap: function(e, t) { | |
return this.__getEventEmitter().addListenerMap(e, t) | |
}, | |
addRetroactiveListenerMap: function(e, t) { | |
return this.__getEventEmitter().addListenerMap(e, t) | |
}, | |
removeAllListeners: function() { | |
this.__getEventEmitter().removeAllListeners() | |
}, | |
removeCurrentListener: function() { | |
this.__getEventEmitter().removeCurrentListener() | |
}, | |
releaseHeldEventType: function(e) { | |
this.__getEventEmitter().releaseHeldEventType(e) | |
}, | |
__getEventEmitter: function() { | |
if (!this.__eventEmitter) { | |
var e = new a; | |
e = u.addValidation(e, this.__types); | |
var t = new l; | |
this.__eventEmitter = new s(e, t) | |
} | |
return this.__eventEmitter | |
} | |
}; | |
i.exports = o | |
}), __d("EventEmitterWithHolding", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
this.$EventEmitterWithHolding_emitter = e, this.$EventEmitterWithHolding_eventHolder = t, this.$EventEmitterWithHolding_currentEventToken = null, this.$EventEmitterWithHolding_emittingHeldEvents = !1 | |
} | |
o.prototype.addListener = function(e, t, n) { | |
return this.$EventEmitterWithHolding_emitter.addListener(e, t, n) | |
}, o.prototype.once = function(e, t, n) { | |
return this.$EventEmitterWithHolding_emitter.once(e, t, n) | |
}, o.prototype.addRetroactiveListener = function(e, t, n) { | |
var r = this.$EventEmitterWithHolding_emitter.addListener(e, t, n); | |
return this.$EventEmitterWithHolding_emittingHeldEvents = !0, this.$EventEmitterWithHolding_eventHolder.emitToListener(e, t, n), this.$EventEmitterWithHolding_emittingHeldEvents = !1, r | |
}, o.prototype.removeAllListeners = function(e) { | |
this.$EventEmitterWithHolding_emitter.removeAllListeners(e) | |
}, o.prototype.removeCurrentListener = function() { | |
this.$EventEmitterWithHolding_emitter.removeCurrentListener() | |
}, o.prototype.listeners = function(e) { | |
return this.$EventEmitterWithHolding_emitter.listeners(e) | |
}, o.prototype.emit = function(e, t, n, r, i, o, a) { | |
this.$EventEmitterWithHolding_emitter.emit(e, t, n, r, i, o, a) | |
}, o.prototype.emitAndHold = function(e, t, n, r, i, o, a) { | |
this.$EventEmitterWithHolding_currentEventToken = this.$EventEmitterWithHolding_eventHolder.holdEvent(e, t, n, r, i, o, a), this.$EventEmitterWithHolding_emitter.emit(e, t, n, r, i, o, a), this.$EventEmitterWithHolding_currentEventToken = null | |
}, o.prototype.releaseCurrentEvent = function() { | |
null !== this.$EventEmitterWithHolding_currentEventToken ? this.$EventEmitterWithHolding_eventHolder.releaseEvent(this.$EventEmitterWithHolding_currentEventToken) : this.$EventEmitterWithHolding_emittingHeldEvents && this.$EventEmitterWithHolding_eventHolder.releaseCurrentEvent() | |
}, o.prototype.releaseHeldEventType = function(e) { | |
this.$EventEmitterWithHolding_eventHolder.releaseEventType(e) | |
}, i.exports = o | |
}), __d("EventHolder", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.$EventHolder_heldEvents = {}, this.$EventHolder_currentEventKey = null | |
} | |
var a = t("invariant"); | |
o.prototype.holdEvent = function(e, t, n, r, i, o, a) { | |
this.$EventHolder_heldEvents[e] = this.$EventHolder_heldEvents[e] || []; | |
var s = this.$EventHolder_heldEvents[e], | |
l = { | |
eventType: e, | |
index: s.length | |
}; | |
return s.push([t, n, r, i, o, a]), l | |
}, o.prototype.emitToListener = function(e, t, n) { | |
var r = this.$EventHolder_heldEvents[e]; | |
if (r) { | |
var i = this.$EventHolder_currentEventKey; | |
r.forEach(function(r, i) { | |
r && (this.$EventHolder_currentEventKey = { | |
eventType: e, | |
index: i | |
}, t.apply(n, r)) | |
}.bind(this)), this.$EventHolder_currentEventKey = i | |
} | |
}, o.prototype.releaseCurrentEvent = function() { | |
null === this.$EventHolder_currentEventKey && a(0, "Not in an emitting cycle; there is no current event"), this.releaseEvent(this.$EventHolder_currentEventKey) | |
}, o.prototype.releaseEvent = function(e) { | |
delete this.$EventHolder_heldEvents[e.eventType][e.index] | |
}, o.prototype.releaseEventType = function(e) { | |
this.$EventHolder_heldEvents[e] = [] | |
}, i.exports = o | |
}), __d("EventValidator", ["copyProperties"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
if (-1 === t.indexOf(e)) throw new TypeError(a(e, t)) | |
} | |
function a(e, t) { | |
var n = 'Unknown event type "' + e + '". '; | |
return __DEV__ && (n += u(e, t)), n += "Known event types: " + t.join(", ") + "." | |
} | |
var s = t("copyProperties"), | |
l = { | |
addValidation: function(e, t) { | |
var n = Object.keys(t), | |
r = Object.create(e); | |
return s(r, { | |
emit: function(t, r, i, a, s, l, u) { | |
return o(t, n), e.emit.call(this, t, r, i, a, s, l, u) | |
} | |
}), r | |
} | |
}; | |
if (__DEV__) var u = function(e, t) { | |
var n = c(e, t); | |
return h(n, e) ? 'Did you mean "' + n.type + '"? ' : "" | |
}, | |
c = function(e, t) { | |
var n = t.map(p.bind(this, e)); | |
return n.sort(d)[0] | |
}, | |
p = function(e, t) { | |
return { | |
type: t, | |
distance: f(e, t) | |
} | |
}, | |
d = function(e, t) { | |
return e.distance < t.distance ? -1 : e.distance > t.distance ? 1 : 0 | |
}, | |
h = function(e, t) { | |
return e.distance / t.length < .334 | |
}, | |
f = function(e, t) { | |
var n, r, i = []; | |
for (n = 0; n <= e.length; n++) i[n] = [n]; | |
for (r = 1; r <= t.length; r++) i[0][r] = r; | |
for (n = 1; n <= e.length; n++) | |
for (r = 1; r <= t.length; r++) { | |
var o = e.charAt(n - 1) === t.charAt(r - 1) ? 0 : 1; | |
i[n][r] = Math.min(i[n - 1][r] + 1, i[n][r - 1] + 1, i[n - 1][r - 1] + o), n > 1 && r > 1 && e.charAt(n - 1) == t.charAt(r - 2) && e.charAt(n - 2) == t.charAt(r - 1) && (i[n][r] = Math.min(i[n][r], i[n - 2][r - 2] + o)) | |
} | |
return i[e.length][t.length] | |
}; | |
i.exports = l | |
}), __d("copyProperties", [], function(e, t, n, r, i) { | |
function o(e, t, n, r, i, o, a) { | |
if (e = e || {}, __DEV__ && a) throw new Error("Too many arguments passed to copyProperties"); | |
for (var s, l = [t, n, r, i, o], u = 0; l[u];) { | |
s = l[u++]; | |
for (var c in s) e[c] = s[c]; | |
s.hasOwnProperty && s.hasOwnProperty("toString") && "undefined" != typeof s.toString && e.toString !== s.toString && (e.toString = s.toString) | |
} | |
return e | |
} | |
i.exports = o | |
}), __d("DliteRouter", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
var r = e.getSortKey(), | |
i = n - t; | |
if (0 === i) return t; | |
var a = t + i / 2 | 0; | |
return s(r, u[a].getSortKey()) <= 0 ? o(e, t, a) : o(e, a + 1, n) | |
} | |
function a(e) { | |
for (var t = [], n = 0, r = 0, i = 0; n < e.length; n++) switch (e.charAt(n)) { | |
case "/": | |
i || (n - r > 0 && t.push(e.slice(r, n)), "?" === e.charAt(n + 1) && n++, r = n + 1); | |
break; | |
case "(": | |
i++ || (n - r > 0 && t.push(e.slice(r, n)), r = n); | |
break; | |
case ")": | |
--i || ("?" === e.charAt(n + 1) && n++, t.push(e.slice(r, n + 1)), r = n + 1) | |
} | |
return t | |
} | |
function s(e, t) { | |
e = a(e), t = a(t); | |
for (var n = 0; n < Math.min(e.length, t.length); n++) { | |
var r = e[n], | |
i = t[n], | |
o = l(r) - l(i); | |
if (o) return o; | |
var s = r.toLowerCase(), | |
u = i.toLowerCase(); | |
if (s !== u) return u > s ? -1 : 1; | |
if (r !== i) return i > r ? -1 : 1 | |
} | |
return e.length - t.length | |
} | |
function l(e) { | |
return "<<vanity>>" == e ? 3 : (e = e.replace(/\\\./, "x"), /[.+*?\[\](){}=!|:]/.test(e) ? -1 !== e.indexOf("\\d") ? 1 : 2 : 0) | |
} | |
var u = [], | |
c = { | |
addRoute: function(e) { | |
var t = o(e, 0, u.length); | |
u[t] !== e && u.splice(t, 0, e) | |
}, | |
__getRoutes: function() { | |
return u | |
}, | |
getRoute: function(e) { | |
for (var t = 0; t < u.length; t++) { | |
var n = u[t], | |
r = n.parse(e); | |
if (null !== r) return new n(e, r) | |
} | |
return null | |
}, | |
orderExpressions: s | |
}; | |
i.exports = c | |
}), __d("DliteRoutingWrapper", ["DliteRoute", "DliteRouteProvider", "React", "cloneWithProps"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DliteRoute"), | |
a = t("DliteRouteProvider"), | |
s = t("React"), | |
l = t("cloneWithProps"), | |
u = s.createClass({ | |
displayName: "DliteRoutingWrapper", | |
mixins: [a.Mixin], | |
propTypes: { | |
route: s.PropTypes.instanceOf(o).isRequired, | |
childFactory: s.PropTypes.func.isRequired, | |
onRef: s.PropTypes.func | |
}, | |
componentDidMount: function() { | |
this.props.onRef && this.props.onRef(this.refs.root) | |
}, | |
componentWillUnmount: function() { | |
this.props.onRef && this.props.onRef(null) | |
}, | |
getDliteRoute: function() { | |
return this.props.route | |
}, | |
render: function() { | |
return l(this.props.childFactory(), { | |
ref: "root" | |
}) | |
} | |
}); | |
i.exports = u | |
}), __d("DliteRoute", ["DliteRouteInitialData", "DliteRouteRegExps", "DliteRouter", "GraphQL_EXPERIMENTAL", "ReactGraphQLQueryBuilder", "URI", "XControllerURIBuilder", "invariant", "mapObject", "merge", "stableStringify"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
this.$DliteRoute_data = t || this.constructor.parse(e) || this.constructor.__defaultData, this.$DliteRoute_uri = e, this.$DliteRoute_cacheKey = null | |
} | |
function a(e) { | |
return (e + "").replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1") | |
} | |
var s = t("DliteRouteInitialData"), | |
l = t("DliteRouteRegExps"), | |
u = t("DliteRouter"), | |
c = t("GraphQL_EXPERIMENTAL"), | |
p = t("ReactGraphQLQueryBuilder"), | |
d = (t("URI"), t("XControllerURIBuilder")), | |
h = t("invariant"), | |
f = t("mapObject"), | |
m = t("merge"), | |
g = t("stableStringify"), | |
_ = { | |
viewer: !0 | |
}; | |
o.create = function(e) { | |
null == e.path || e.path.match("^/") || h(0, "Route `path` must begin with a slash"), null == e.path || "/" === e.path || e.path.match("[^/]$") || h(0, "Route `path` must not end with a slash"); | |
var t = function() { | |
o.apply(this, arguments) | |
}; | |
return Object.assign(t, o), t.prototype = Object.create(o.prototype), t.prototype.constructor = t, t.__name = e.name, t.__path = e.path, t.__paramDefinitions = e.paramDefinitions, t.__queries = e.queries, t.__renderTitle = e.renderTitle, t.__component = e.component, t.__defaultData = e.defaultData, t | |
}, o.getName = function() { | |
return this.__name | |
}, o.register = function() { | |
null == this.__path && h(0, "Path must be defined in route spec for %s", this.__name), this.$DliteRoute_routeRegistered || (u.addRoute(this), this.$DliteRoute_routeRegistered = !0) | |
}, o.getURIBuilder = function() { | |
return null == this.__path && h(0, "Path must be defined in route spec for %s", this.__name), this.register(), new d(this.__path, this.__paramDefinitions) | |
}, o.getSortKey = function() { | |
var e = this.$DliteRoute_getRegexAndCaptureNames(); | |
return e.regexString | |
}, o.parse = function(e) { | |
var t = e.getDomain(); | |
if (t && t !== s.domain) return null; | |
var n = this.$DliteRoute_getRegexAndCaptureNames(), | |
r = n.regex, | |
i = n.captureNames, | |
o = e.getPath(), | |
a = r.exec(o); | |
if (!a) return null; | |
for (var l = m(e.getQueryData()), u = 1; u < a.length; u++) l[i[u - 1]] = a[u]; | |
return l | |
}, o.prototype.clone = function() { | |
return new this.constructor(this.$DliteRoute_uri, this.$DliteRoute_data) | |
}, o.prototype.getName = function() { | |
return this.constructor.__name | |
}, o.prototype.getData = function() { | |
return this.$DliteRoute_data | |
}, o.prototype.getQuery = function(e, t) { | |
var n = this.$DliteRoute_data[e], | |
r = this.constructor.__queries, | |
i = r && r[e]; | |
if (!i && "viewer" === e) { | |
var o = t && [t.getQueryFragment(this)]; | |
return new c.QueryWithValues(new c.Query("viewer", null, null, o, null, this.getName())) | |
} | |
if (!i) return null; | |
if (!_.hasOwnProperty(e)) { | |
var a = this.constructor.__paramDefinitions; | |
if (null == n && a.hasOwnProperty(e) && !a[e].required) return null; | |
null == n && h(0, 'Required param "%s" for %s is %s. Check your URI.', e, this.getName(), null === n ? "null" : "undefined") | |
} | |
return new c.QueryWithValues(i(n, t, p.getQueryInterpreter(this))) | |
}, o.prototype.getQueries = function() { | |
return f(this.constructor.__queries, function(e, t) { | |
return this.getQuery(t) | |
}.bind(this)) | |
}, o.prototype.hasQuery = function(e) { | |
var t = this.constructor.__queries; | |
return "viewer" === e || !(!t || !t[e]) | |
}, o.prototype.getURI = function() { | |
return this.$DliteRoute_uri | |
}, o.prototype.getCacheKey = function() { | |
return this.$DliteRoute_cacheKey || (this.$DliteRoute_cacheKey = g({ | |
route: this.getName(), | |
args: this.getData() | |
})), this.$DliteRoute_cacheKey | |
}, o.prototype.isA = function(e) { | |
return this.getName() === e | |
}, o.prototype.renderTitle = function(e) { | |
var t = this.constructor.__renderTitle; | |
return t && t(e) | |
}, o.prototype.getComponent = function() { | |
return this.constructor.__component | |
}, o.$DliteRoute_getRegexAndCaptureNames = function() { | |
if (null == this.__path && h(0, "Path must be defined in route spec for %s", this.__name), !this.$DliteRoute_regex) { | |
if (this.$DliteRoute_captureNames = [], "/" === this.__path) this.$DliteRoute_regexString = "^/$"; | |
else { | |
var e = this.__path.slice(1).split("/"), | |
t = e.map(function(e) { | |
if (l.PATH_COMPONENT.test(e)) return "/" + a(e); | |
var t = "?" == e[1], | |
n = e.slice(t ? 2 : 1, -1), | |
r = this.__paramDefinitions[n], | |
i = l.COMPONENT_VALUE[r.type], | |
o = "(" + i + ")"; | |
return this.$DliteRoute_captureNames.push(n), t ? "(?:/" + o + ")?" : "/" + o | |
}.bind(this), this); | |
this.$DliteRoute_regexString = "^" + t.join("") + "/?$" | |
} | |
this.$DliteRoute_regex = new RegExp(this.$DliteRoute_regexString) | |
} | |
return { | |
regex: this.$DliteRoute_regex, | |
regexString: this.$DliteRoute_regexString, | |
captureNames: this.$DliteRoute_captureNames | |
} | |
}, i.exports = o | |
}), __d("DliteRouteInitialData", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
domain: "www.facebook.com" | |
}; | |
i.exports = o | |
}), __d("DliteRouteRegExps", [], function(e, t, n, r, i) { | |
var o = { | |
PATH_COMPONENT: /^[^\/{}]+$/, | |
COMPONENT_VALUE: { | |
Float: "-?(?:\\.\\d+|\\d+(?:\\.\\d+)?)", | |
Int: "-?\\d+", | |
Path: ".+?", | |
String: "[^/]+" | |
} | |
}; | |
i.exports = o | |
}), __d("GraphQL_EXPERIMENTAL", ["generateRQLFieldAlias", "invariant", "isEmpty"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
if (this.$GraphQLNode_fields = e || M, this.$GraphQLNode_fieldMap = L, this.$GraphQLNode_fragments = t && t.length > 0 ? t.filter(v) : M, this.$GraphQLNode_hasNestedVariables = !1, this.$GraphQLNode_numNestedFragmentsWithVariables = 0, e && e.length > 0) { | |
this.$GraphQLNode_fieldMap = {}; | |
for (var n = 0; n < e.length; n++) { | |
var r = e[n], | |
i = r.getGeneratedAlias(); | |
void 0 !== this.$GraphQLNode_fieldMap[i] && I(0, 'Field "%s" is already in fields with the same calls.', r.getFieldName()), this.$GraphQLNode_fieldMap[i] = r, (r.hasVariables() || r.$GraphQLNode_hasNestedVariables) && (this.$GraphQLNode_hasNestedVariables = !0), this.$GraphQLNode_numNestedFragmentsWithVariables += r.$GraphQLNode_numNestedFragmentsWithVariables | |
} | |
} | |
for (var o = 0; o < this.$GraphQLNode_fragments.length; o++)(this.$GraphQLNode_fragments[o].$GraphQLNode_hasNestedVariables || this.$GraphQLNode_fragments[o].$GraphQLNode_numNestedFragmentsWithVariables) && (this.$GraphQLNode_numNestedFragmentsWithVariables += 1) | |
} | |
function a(e, t, n) { | |
this.$GraphQLCallvNode_name = e, this.$GraphQLCallvNode_metadata = n || L, this.isVarArgs() && t && 1 === t.length && Array.isArray(t[0]) && (t = t[0]), this.$GraphQLCallvNode_args = t ? t.map(S) : M | |
} | |
function s(e) { | |
for (var t = [], n = 1, r = arguments.length; r > n; n++) t.push(arguments[n]); | |
a.call(this, e, t) | |
} | |
function l(e) { | |
this.$GraphQLCallValue_callValue = e + "" | |
} | |
function u(e, t) { | |
this.$GraphQLBatchCallVariable_sourceQueryID = e, this.$GraphQLBatchCallVariable_jsonPath = t | |
} | |
function c(e) { | |
this.$GraphQLCallVariable_callVariableName = e | |
} | |
function p(e, t, n, r, i, a, s) { | |
o.call(this, t, n), A.test(e) || I(0, '"%s" is not a valid field name', e), k.test(i) || I(0, '"%s" is not a valid alias name', i), this.$GraphQLFieldNode_fieldName = e, this.$GraphQLFieldNode_calls = r || M, this.$GraphQLFieldNode_alias = i || null, this.$GraphQLFieldNode_condition = a || null, this.$GraphQLFieldNode_metadata = s || L, this.$GraphQLFieldNode_generatedAlias = null, this.$GraphQLFieldNode_generatedFieldName = null, this.$GraphQLFieldNode_hasVariables = this.$GraphQLFieldNode_calls.some(w) | |
} | |
function d(e, t, n, r, i) { | |
o.call(this, n, r), this.$GraphQLQueryFragment_name = e, this.$GraphQLQueryFragment_type = t, this.$GraphQLQueryFragment_metadata = i || L, this.$GraphQLQueryFragment_isDeferred = null, this.$GraphQLQueryFragment_deferredCopy = null | |
} | |
function h(e, t, n, r, i, s) { | |
o.call(this, n, r), this.$GraphQLQuery_rootCall = e, this.$GraphQLQuery_metadata = i || L; | |
var l = this.$GraphQLQuery_metadata.varargs ? { | |
varargs: this.$GraphQLQuery_metadata.varargs | |
} : null; | |
this.$GraphQLQuery_rootNode = new a(e, t, l), this.$GraphQLQuery_queryName = s, this.$GraphQLQuery_allFragmentNames = null, this.$GraphQLQuery_deferredFragmentNames = null, this.$GraphQLQuery_description = null | |
} | |
function f(e, t) { | |
this.$GraphQLQueryWithValues_query = e, this.$GraphQLQueryWithValues_values = t | |
} | |
function m(e, t, n, r, i) { | |
o.call(this, r, i), this.$GraphQLMutation_name = e, this.$GraphQLMutation_responseType = t, this.$GraphQLMutation_mutationCall = n | |
} | |
function g(e) { | |
var t = ""; | |
return e.getCondition() && (t += e.getCondition() + "?"), t += e.getFieldName(), 0 !== e.getCalls().length && (t += "." + e.getCalls().join("."), t += " as " + e.getGeneratedAlias()), t | |
} | |
function _(e) { | |
var t = y(e); | |
if (0 === t.length) return ""; | |
for (var n = [], r = 0; r < t.length; r++) { | |
var i = t[r]; | |
n.push(Array.isArray(i) ? g(i[0]) + _(i) : i.toString()) | |
} | |
return "{" + n.join(",") + "}" | |
} | |
function y(e) { | |
for (var t = null, n = 0; e.length > 0;) { | |
n++ < 1e4 || I(0, "Endless loop!"); | |
for (var r = e.shift(), i = r.getFragments(), o = 0; o < i.length; o++) e.push(i[o]); | |
for (var a = r.getOwnFields(), s = 0; s < a.length; s++) { | |
var l = a[s], | |
u = l.getGeneratedAlias(); | |
t = t || {}, t.hasOwnProperty(u) ? (Array.isArray(t[u]) || (t[u] = [t[u]]), t[u].push(l)) : t[u] = l | |
} | |
} | |
if (!t) return M; | |
for (var c = [], p = Object.keys(t).sort(), d = 0; d < p.length; d++) c.push(t[p[d]]); | |
return c | |
} | |
function v(e) { | |
return !!e | |
} | |
function S(e) { | |
var t = typeof e; | |
if (null === e ? e = new c("__null__") : ("string" === t || "number" === t || "boolean" === t) && (e = new l(e + "")), !(e instanceof l || e instanceof c || e instanceof u)) throw new TypeError("Unable to cast argument to GraphQL.Callv, got " + Object.prototype.toString.call(e)); | |
return e | |
} | |
function b(e) { | |
for (var t = -1, n = e.length - 1; n >= 0; n--) | |
if (null !== e[n]) { | |
t = n; | |
break | |
} | |
return e.length = t + 1, e | |
} | |
function R(e) { | |
var t = e[0]; | |
switch (t) { | |
case N.CALL_VALUE: | |
return l.fromJSON(e); | |
case N.CALL_VARIABLE: | |
return c.fromJSON(e); | |
case N.BATCH_VARIABLE: | |
return u.fromJSON(e); | |
default: | |
throw new Error("Unknown type") | |
} | |
} | |
function w(e) { | |
return e.getArgs().some(T) | |
} | |
function C(e) { | |
return e instanceof u | |
} | |
function E(e) { | |
return e.getRefParam() | |
} | |
function D(e) { | |
return e.getSourceQueryID() | |
} | |
function T(e) { | |
return e instanceof c | |
} | |
function x(e) { | |
return e.replace(/[)(}{><,.\\]/g, "\\$&") | |
} | |
var P = t("generateRQLFieldAlias"), | |
I = t("invariant"), | |
F = t("isEmpty"), | |
L = {}, | |
M = [], | |
Q = "skip", | |
A = /^[a-z_][a-z0-9_:\-]*$/, | |
k = /^[\w-]+$/, | |
O = "ref_"; | |
__DEV__ && (Object.freeze(L), Object.freeze(M)); | |
var N = { | |
QUERY: 1, | |
FRAGMENT: 2, | |
FIELD: 3, | |
CALL: 4, | |
CALL_VALUE: 5, | |
CALL_VARIABLE: 6, | |
BATCH_VARIABLE: 7, | |
MUTATION: 8, | |
QUERY_WITH_VALUES: 9 | |
}, | |
G = 0; | |
o.prototype.getOwnFields = function() { | |
return this.$GraphQLNode_fields | |
}, o.prototype.getUnaliasedFields = function(e) { | |
return this.$GraphQLNode_collectFields(this.getOwnUnaliasedFields, e) | |
}, o.prototype.$GraphQLNode_collectFields = function(e, t, n) { | |
n || (n = []); | |
for (var r = e.call(this, t), i = 0; i < r.length; i++) n.push(r[i]); | |
for (var o = this.getFragments(), a = 0; a < o.length; a++) o[a].$GraphQLNode_collectFields(e, t, n); | |
return n | |
}, o.prototype.getOwnField = function(e) { | |
return this.$GraphQLNode_fieldMap[e] || null | |
}, o.prototype.hasFields = function() { | |
return this.$GraphQLNode_someFields(this.hasOwnFields, this.hasFields) | |
}, o.prototype.hasOwnFields = function() { | |
for (var e in this.$GraphQLNode_fieldMap) return !0; | |
return !1 | |
}, o.prototype.hasOwnField = function(e) { | |
return this.$GraphQLNode_fieldMap.hasOwnProperty(e) | |
}, o.prototype.hasUnaliasedField = function(e) { | |
return this.$GraphQLNode_someFields(this.hasOwnUnaliasedField, this.hasUnaliasedField, e) | |
}, o.prototype.getOwnUnaliasedFields = function(e) { | |
for (var t = this.$GraphQLNode_fields, n = [], r = 0; r < t.length; r++) t[r].getFieldName() === e && n.push(t[r]); | |
return n | |
}, o.prototype.hasOwnUnaliasedField = function(e) { | |
return this.getOwnUnaliasedFields(e).length > 0 | |
}, o.prototype.getFragments = function() { | |
return this.$GraphQLNode_fragments | |
}, o.prototype.hasNestedVariables = function() { | |
return this.$GraphQLNode_hasNestedVariables | |
}, o.prototype.getNumNestedFragmentsWithVariables = function() { | |
return this.$GraphQLNode_numNestedFragmentsWithVariables | |
}, o.prototype.equals = function(e) { | |
if (!e || this.$GraphQLNode_fields.length !== e.$GraphQLNode_fields.length || this.$GraphQLNode_fragments.length !== e.$GraphQLNode_fragments.length) return !1; | |
if (this !== e) { | |
for (var t = 0; t < this.$GraphQLNode_fields.length; t++) | |
if (!this.$GraphQLNode_fields[t].equals(e.$GraphQLNode_fields[t])) return !1; | |
for (var n = 0; n < this.$GraphQLNode_fragments.length; n++) | |
if (!this.$GraphQLNode_fragments[n].equals(e.$GraphQLNode_fragments[n])) return !1 | |
} | |
return !0 | |
}, o.prototype.$GraphQLNode_someFields = function(e, t, n) { | |
if (e.call(this, n)) return !0; | |
for (var r = 0; r < this.$GraphQLNode_fragments.length; r++) | |
if (t.call(this.$GraphQLNode_fragments[r], n)) return !0; | |
return !1 | |
}, a.prototype.getName = function() { | |
return this.$GraphQLCallvNode_name | |
}, a.prototype.getArgs = function() { | |
return this.$GraphQLCallvNode_args | |
}, a.prototype.hasRefParam = function() { | |
return !F(this.getRefParams()) | |
}, a.prototype.getRefParams = function() { | |
if (!this.$GraphQLCallvNode_refParams) { | |
var e = this.$GraphQLCallvNode_args.filter(C).map(E); | |
e.length <= 1 || I(0, "GraphQLQuery may have at most one BatchCallVariable root argument"), this.$GraphQLCallvNode_refParams = e.length ? e[0] : null | |
} | |
return this.$GraphQLCallvNode_refParams | |
}, a.prototype.getRefTarget = function() { | |
var e = this.getRefParams(); | |
if (e) { | |
var t = Object.keys(e); | |
if (t.length) return e[t[0]].target | |
} | |
return null | |
}, a.prototype.getSourceQueryID = function() { | |
var e = this.$GraphQLCallvNode_args.filter(C).map(D); | |
return e.length < 2 || I(0, "GraphQLCallvNode.getSourceQueryID a query can only have one source query"), e.length ? e[0] : null | |
}, a.prototype.isVarArgs = function() { | |
return !!this.$GraphQLCallvNode_metadata.varargs | |
}, a.prototype.toString = function(e) { | |
var t = this.$GraphQLCallvNode_args.map(function(t) { | |
return t.toString(e) | |
}); | |
return this.$GraphQLCallvNode_name + "(" + t.join(",") + ")" | |
}, a.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2], | |
o = t[3]; | |
return n !== N.CALL && I(0, "Expected call descriptor"), new a(r, i ? i.map(R) : null, o) | |
}, a.prototype.toJSON = function() { | |
return b([N.CALL, this.getName(), this.$GraphQLCallvNode_args.length ? this.$GraphQLCallvNode_args : null, this.$GraphQLCallvNode_metadata === L ? null : this.$GraphQLCallvNode_metadata]) | |
}, a.prototype.equals = function(e) { | |
var t = this.getArgs(), | |
n = e.getArgs(); | |
if (this.getName() !== e.getName() || t.length !== n.length) return !1; | |
for (var r = 0; r < t.length; r++) | |
if (!t[r].equals(n[r])) return !1; | |
return !0 | |
}; | |
for (var $ in a) a.hasOwnProperty($) && (s[$] = a[$]); | |
var B = null === a ? null : a.prototype; | |
s.prototype = Object.create(B), s.prototype.constructor = s, s.__superConstructor__ = a, l.prototype.getCallValue = function() { | |
return this.$GraphQLCallValue_callValue | |
}, l.prototype.equals = function(e) { | |
return e instanceof l && e.getCallValue() === this.getCallValue() | |
}, l.prototype.toString = function() { | |
return x(this.$GraphQLCallValue_callValue) | |
}, l.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1]; | |
return n !== N.CALL_VALUE && I(0, "Expected value descriptor"), new l(r) | |
}, l.prototype.toJSON = function() { | |
return [N.CALL_VALUE, this.$GraphQLCallValue_callValue] | |
}, u.prototype.getSourceQueryID = function() { | |
return this.$GraphQLBatchCallVariable_sourceQueryID | |
}, u.prototype.getRefParam = function() { | |
if (!this.$GraphQLBatchCallVariable_refParam) { | |
var e = {}; | |
e[O + this.$GraphQLBatchCallVariable_sourceQueryID] = { | |
query: this.$GraphQLBatchCallVariable_sourceQueryID, | |
target: this.$GraphQLBatchCallVariable_jsonPath, | |
fallback: Q | |
}, this.$GraphQLBatchCallVariable_refParam = e | |
} | |
return this.$GraphQLBatchCallVariable_refParam | |
}, u.prototype.getJSONPath = function() { | |
return this.$GraphQLBatchCallVariable_jsonPath | |
}, u.prototype.equals = function(e) { | |
return e instanceof u && e.getSourceQueryID() == this.getSourceQueryID() && e.getJSONPath() == this.getJSONPath() | |
}, u.prototype.toString = function() { | |
return "<" + O + this.$GraphQLBatchCallVariable_sourceQueryID + ">" | |
}, u.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2]; | |
return n !== N.BATCH_VARIABLE && I(0, "Expected batch variable descriptor"), new u(r, i) | |
}, u.prototype.toJSON = function() { | |
return [N.BATCH_VARIABLE, this.$GraphQLBatchCallVariable_sourceQueryID, this.$GraphQLBatchCallVariable_jsonPath] | |
}, c.prototype.getCallVariableName = function() { | |
return this.$GraphQLCallVariable_callVariableName | |
}, c.prototype.equals = function(e) { | |
return e instanceof c && e.getCallVariableName() == this.getCallVariableName() | |
}, c.prototype.toString = function(e) { | |
var t = this.$GraphQLCallVariable_callVariableName; | |
return e && t in e ? x(e[t]) : "<" + t + ">" | |
}, c.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1]; | |
return n !== N.CALL_VARIABLE && I(0, "Expected variable descriptor"), new c(r) | |
}, c.prototype.toJSON = function() { | |
return [N.CALL_VARIABLE, this.$GraphQLCallVariable_callVariableName] | |
}; | |
for (var H in o) o.hasOwnProperty(H) && (p[H] = o[H]); | |
var V = null === o ? null : o.prototype; | |
p.prototype = Object.create(V), p.prototype.constructor = p, p.__superConstructor__ = o, p.prototype.getFieldName = function() { | |
return this.$GraphQLFieldNode_fieldName | |
}, p.prototype.getAlias = function() { | |
return this.$GraphQLFieldNode_alias | |
}, p.prototype.getNameForClient = function() { | |
return this.$GraphQLFieldNode_alias || this.$GraphQLFieldNode_fieldName | |
}, p.prototype.getCalls = function() { | |
return this.$GraphQLFieldNode_calls | |
}, p.prototype.getCall = function(e) { | |
for (var t = 0; t < this.$GraphQLFieldNode_calls.length; t++) | |
if (this.$GraphQLFieldNode_calls[t].getName() === e) return this.$GraphQLFieldNode_calls[t] | |
}, p.prototype.getCondition = function() { | |
return this.$GraphQLFieldNode_condition | |
}, p.prototype.getInferredRootCallName = function() { | |
return this.$GraphQLFieldNode_metadata.rootCall || null | |
}, p.prototype.getInferredPrimaryKey = function() { | |
return this.$GraphQLFieldNode_metadata.pk || null | |
}, p.prototype.getEdgesID = function() { | |
return this.$GraphQLFieldNode_metadata.edgesID | |
}, p.prototype.isPlural = function() { | |
return !!this.$GraphQLFieldNode_metadata.plural | |
}, p.prototype.isConnection = function() { | |
return !!this.$GraphQLFieldNode_metadata.connection | |
}, p.prototype.isFindable = function() { | |
return this.isConnection() && !this.$GraphQLFieldNode_metadata.nonFindable | |
}, p.prototype.isLimitable = function() { | |
return this.isConnection() && !this.$GraphQLFieldNode_metadata.nonLimitable | |
}, p.prototype.isGenerated = function() { | |
return !!this.$GraphQLFieldNode_metadata.generated | |
}, p.prototype.isRequisite = function() { | |
return !!this.$GraphQLFieldNode_metadata.requisite | |
}, p.prototype.hasVariables = function() { | |
return this.$GraphQLFieldNode_hasVariables | |
}, p.prototype.shallowClone = function(e, t, n) { | |
return new p(this.$GraphQLFieldNode_fieldName, e, t, n || this.getCalls(), this.$GraphQLFieldNode_alias, this.$GraphQLFieldNode_condition, this.$GraphQLFieldNode_metadata) | |
}, p.prototype.getGeneratedAlias = function() { | |
return this.$GraphQLFieldNode_generatedAlias || (this.$GraphQLFieldNode_generatedAlias = P(this.getGeneratedFieldName())), this.$GraphQLFieldNode_generatedAlias | |
}, p.prototype.getGeneratedFieldName = function() { | |
if (!this.$GraphQLFieldNode_generatedFieldName) { | |
var e = this.getFieldName(); | |
0 !== this.$GraphQLFieldNode_calls.length && (e += "." + this.$GraphQLFieldNode_calls.join(".")), this.$GraphQLFieldNode_generatedFieldName = e | |
} | |
return this.$GraphQLFieldNode_generatedFieldName | |
}, p.prototype.equals = function(e) { | |
if (!e || this.$GraphQLFieldNode_fieldName !== e.$GraphQLFieldNode_fieldName || this.$GraphQLFieldNode_alias !== e.$GraphQLFieldNode_alias) return !1; | |
var t = e.getCalls(); | |
if (this.$GraphQLFieldNode_calls.length !== t.length) return !1; | |
for (var n = 0; n < this.$GraphQLFieldNode_calls.length; n++) | |
if (!this.$GraphQLFieldNode_calls[n].equals(t[n])) return !1; | |
return V.equals.call(this, e) | |
}, p.prototype.toString = function() { | |
return g(this) + _([this]) | |
}, p.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2], | |
o = t[3], | |
s = t[4], | |
l = t[5], | |
u = t[6], | |
c = t[7]; | |
return n !== N.FIELD && I(0, "Expected field descriptor"), new p(r, i ? i.map(p.fromJSON) : null, o ? o.map(d.fromJSON) : null, s ? s.map(a.fromJSON) : null, l, u, c) | |
}, p.prototype.toJSON = function() { | |
var e = this.getFragments(); | |
return b([N.FIELD, this.getFieldName(), this.hasOwnFields() ? this.getOwnFields() : null, e.length ? e : null, this.$GraphQLFieldNode_calls.length ? this.$GraphQLFieldNode_calls : null, this.getAlias(), this.$GraphQLFieldNode_condition, this.$GraphQLFieldNode_metadata === L ? null : this.$GraphQLFieldNode_metadata]) | |
}; | |
for (H in o) o.hasOwnProperty(H) && (d[H] = o[H]); | |
d.prototype = Object.create(V), d.prototype.constructor = d, d.__superConstructor__ = o, d.prototype.getName = function() { | |
return this.$GraphQLQueryFragment_name | |
}, d.prototype.type = function() { | |
return this.$GraphQLQueryFragment_type | |
}, d.prototype.getScope = function() { | |
return this.$GraphQLQueryFragment_metadata.scope || null | |
}, d.prototype.isDeferred = function() { | |
return !!this.$GraphQLQueryFragment_isDeferred | |
}, d.prototype.getDeferredFragmentNames = function() { | |
function e(n) { | |
n.isDeferred() && (t[n.getName()] = n.getName()); | |
for (var r = n.getFragments(), i = 0; i < r.length; i++) e(r[i]) | |
} | |
var t = {}; | |
return e(this), t | |
}, d.prototype.isPlural = function() { | |
return !!this.$GraphQLQueryFragment_metadata.isPlural | |
}, d.prototype.defer = function() { | |
return this.$GraphQLQueryFragment_deferredCopy || (this.$GraphQLQueryFragment_deferredCopy = this.shallowClone(this.getOwnFields(), this.getFragments()), this.$GraphQLQueryFragment_deferredCopy.$GraphQLQueryFragment_isDeferred = !0), this.$GraphQLQueryFragment_deferredCopy | |
}, d.prototype.shallowClone = function(e, t) { | |
var n = new d(this.getName(), this.type(), e, t, this.$GraphQLQueryFragment_metadata); | |
return this.isDeferred() && (n.$GraphQLQueryFragment_isDeferred = !0), n | |
}, d.prototype.toString = function() { | |
return "QueryFragment " + this.getName() + " : " + this.type() + " " + _([this]) | |
}, d.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2], | |
o = t[3], | |
a = t[4], | |
s = t[5]; | |
n !== N.FRAGMENT && I(0, "Expected fragment descriptor"); | |
var l = new d(r, i, a ? a.map(p.fromJSON) : null, s ? s.map(d.fromJSON) : null); | |
return o && (l.$GraphQLQueryFragment_isDeferred = !0), l | |
}, d.prototype.toJSON = function() { | |
var e = this.getFragments(); | |
return b([N.FRAGMENT, this.getName(), this.type(), this.isDeferred() ? 1 : 0, this.hasOwnFields() ? this.getOwnFields() : null, e.length ? e : null]) | |
}; | |
for (H in o) o.hasOwnProperty(H) && (h[H] = o[H]); | |
h.prototype = Object.create(V), h.prototype.constructor = h, h.__superConstructor__ = o, h.prototype.getID = function() { | |
return this.$GraphQLQuery_id || (this.$GraphQLQuery_id = "q" + G++), this.$GraphQLQuery_id | |
}, h.prototype.getQueryName = function() { | |
return this.$GraphQLQuery_queryName | |
}, h.prototype.getDescription = function() { | |
if (!this.$GraphQLQuery_description) { | |
var e = this.getID(), | |
t = this.getAllFragmentNames(!0); | |
t && (e = e + ":" + Object.keys(t).join(":")), this.$GraphQLQuery_description = e | |
} | |
return this.$GraphQLQuery_description | |
}, h.prototype.rootCall = function() { | |
return this.$GraphQLQuery_rootNode | |
}, h.prototype.getAllFragmentNames = function() { | |
return this.$GraphQLQuery_allFragmentNames || (this.$GraphQLQuery_allFragmentNames = this.$GraphQLQuery_getFragmentNames(!0)), this.$GraphQLQuery_allFragmentNames | |
}, h.prototype.getDeferredFragmentNames = function() { | |
return this.$GraphQLQuery_deferredFragmentNames || (this.$GraphQLQuery_deferredFragmentNames = this.$GraphQLQuery_getFragmentNames(!1)), this.$GraphQLQuery_deferredFragmentNames | |
}, h.prototype.isDeferred = function() { | |
return !!this.$GraphQLQuery_metadata.isDeferred | |
}, h.prototype.isRefQueryDependency = function() { | |
return !!this.$GraphQLQuery_metadata.isRefQueryDependency | |
}, h.prototype.$GraphQLQuery_getFragmentNames = function(e) { | |
function t(r) { | |
var i; | |
r instanceof d && (e || r.isDeferred()) && (n = n || {}, i = r.getName(), n[i] = i); | |
for (var o = r.getOwnFields(), a = 0; a < o.length; a++) t(o[a]); | |
for (var s = r.getFragments(), l = 0; l < s.length; l++) t(s[l]) | |
} | |
var n = null; | |
return t(this), n | |
}, h.prototype.shallowClone = function(e, t, n, r) { | |
var i = this.rootCall(); | |
return new h(i.getName(), i.getArgs(), e, t, n ? Object.assign({}, this.$GraphQLQuery_metadata, n) : this.$GraphQLQuery_metadata, r || this.$GraphQLQuery_queryName) | |
}, h.prototype.shallowCloneWithSameID = function(e, t, n) { | |
var r = this.shallowClone(e, t, n); | |
return r.$GraphQLQuery_id = this.getID(), r | |
}, h.prototype.toString = function() { | |
return this.$GraphQLQuery_queryName ? "Query " + this.$GraphQLQuery_queryName + " {" + this.toStringWithoutName() + "}" : this.toStringWithoutName() | |
}, h.prototype.toStringWithoutName = function() { | |
return this.$GraphQLQuery_rootNode.toString() + _([this]) | |
}, h.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2], | |
o = t[3], | |
a = t[4], | |
s = t[5], | |
l = t[6]; | |
return n !== N.QUERY && I(0, "Expected query descriptor"), new h(r, i ? i.map(R) : null, o ? o.map(p.fromJSON) : null, a ? a.map(d.fromJSON) : null, s, l) | |
}, h.prototype.toJSON = function() { | |
var e = this.rootCall(), | |
t = e.getArgs(), | |
n = this.getFragments(); | |
return b([N.QUERY, e.getName(), t.length ? t : null, this.hasOwnFields() ? this.getOwnFields() : null, n.length ? n : null, this.$GraphQLQuery_metadata !== L ? this.$GraphQLQuery_metadata : null, this.$GraphQLQuery_queryName ? this.$GraphQLQuery_queryName : null]) | |
}, f.prototype.getQuery = function() { | |
return this.$GraphQLQueryWithValues_query | |
}, f.prototype.getValues = function() { | |
return this.$GraphQLQueryWithValues_values | |
}, f.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2]; | |
return n !== N.QUERY_WITH_VALUES && I(0, "Expected query descriptor"), new f(h.fromJSON(r), i) | |
}, f.prototype.toJSON = function() { | |
return b([N.QUERY_WITH_VALUES, this.getQuery(), this.getValues()]) | |
}; | |
for (H in o) o.hasOwnProperty(H) && (m[H] = o[H]); | |
m.prototype = Object.create(V), m.prototype.constructor = m, m.__superConstructor__ = o, m.prototype.getName = function() { | |
return this.$GraphQLMutation_name | |
}, m.prototype.getResponseType = function() { | |
return this.$GraphQLMutation_responseType | |
}, m.prototype.getCall = function() { | |
return this.$GraphQLMutation_mutationCall | |
}, m.prototype.shallowClone = function(e, t) { | |
return new m(this.getName(), this.getResponseType(), this.getCall(), e, t) | |
}, m.prototype.toString = function() { | |
return "Mutation " + this.getName() + " : " + this.getResponseType() + " {" + this.getCall().toString() + _([this]) + "}" | |
}, m.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2], | |
o = t[3], | |
s = t[4], | |
l = t[5]; | |
return n !== N.MUTATION && I(0, "Expected mutation descriptor"), new m(r, i, a.fromJSON(o), s ? s.map(p.fromJSON) : null, l ? l.map(d.fromJSON) : null) | |
}, m.prototype.toJSON = function() { | |
var e = this.getFragments(); | |
return b([N.MUTATION, this.getName(), this.getResponseType(), this.getCall(), this.hasOwnFields() ? this.getOwnFields() : null, e.length ? e : null]) | |
}; | |
var q = { | |
BatchCallVariable: u, | |
Call: s, | |
Callv: a, | |
CallValue: l, | |
CallVariable: c, | |
Field: p, | |
Mutation: m, | |
Query: h, | |
QueryFragment: d, | |
QueryWithValues: f | |
}; | |
i.exports = q | |
}), __d("generateRQLFieldAlias", ["crc32"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = e.indexOf("."); | |
return -1 === t ? e : s + e.substr(0, t) + a(e).toString(36) | |
} | |
var a = t("crc32"), | |
s = "_"; | |
i.exports = o | |
}), __d("isEmpty", [], function(e, t, n, r, i) { | |
function o(e) { | |
if (Array.isArray(e)) return 0 === e.length; | |
if ("object" == typeof e) { | |
for (var t in e) return !1; | |
return !0 | |
} | |
return !e | |
} | |
i.exports = o | |
}), __d("ReactGraphQLQueryBuilder", ["GraphQL_EXPERIMENTAL", "invariant", "keyOf", "mapObject", "stableStringify"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
this.$ReactGraphQLQueryBuilder_Component = e, this.$ReactGraphQLQueryBuilder_queryFunction = t, this.$ReactGraphQLQueryBuilder_initialParams = n, this.$ReactGraphQLQueryBuilder_deferred = !1, this.$ReactGraphQLQueryBuilder_deepQueryFragmentCacheKey = null | |
} | |
function a(e, t) { | |
return e.getCacheKey() + ":" + d(t) | |
} | |
var s, l = t("GraphQL_EXPERIMENTAL"), | |
u = t("invariant"), | |
c = t("keyOf"), | |
p = t("mapObject"), | |
d = t("stableStringify"), | |
h = {}; | |
o.get = function(e, t, n) { | |
e.displayName || u(0, "Cannot create cache key for component without `displayName`."); | |
var r = e.displayName + ":" + t; | |
if (n) { | |
var i = o.$ReactGraphQLQueryBuilder_getValueKey(); | |
n = p(n, function(e) { | |
return "object" == typeof e && i in e ? e[i] : e | |
}), r += ":" + d(n) | |
} | |
if (!h[r]) { | |
e.queries.hasOwnProperty(t) || u(0, "ReactGraphQL.Mixin.getQuery: %s does not have a query defined for %s.", e.displayName, t); | |
var a = e.queries[t], | |
s = e.queryParams || {}, | |
l = n ? Object.assign({}, s, n) : s; | |
h[r] = a ? new o(e, a, l) : null | |
} | |
return h[r] | |
}, o.getQueryInterpreter = function(e) { | |
function t() { | |
throw new Error("ReactGraphQL transform failed! Did you forget to run arc build?") | |
} | |
var n = o.$ReactGraphQLQueryBuilder_getValueKey(); | |
return t.__GraphQL = l, t.__frag = function(t) { | |
return t instanceof o && (t = t.getQueryFragment(e)), t | |
}, t.__var = function(e) { | |
var t = typeof e; | |
if ("undefined" === t) throw new TypeError("Variables must not be undefined (they can be null, though)"); | |
return "object" === t && e.hasOwnProperty(n) ? e.$ReactGraphQLQueryBuilder_value : e | |
}, t | |
}, o.$ReactGraphQLQueryBuilder_getValueKey = function() { | |
return s || (s = c({ | |
$ReactGraphQLQueryBuilder_value: null | |
})), s | |
}, o.prototype.defer = function() { | |
return this.$ReactGraphQLQueryBuilder_deferredBuilder || (this.$ReactGraphQLQueryBuilder_deferredBuilder = new o(this.$ReactGraphQLQueryBuilder_Component, this.$ReactGraphQLQueryBuilder_queryFunction, this.$ReactGraphQLQueryBuilder_initialParams), this.$ReactGraphQLQueryBuilder_deferredBuilder.$ReactGraphQLQueryBuilder_deferred = !0), this.$ReactGraphQLQueryBuilder_deferredBuilder | |
}, o.prototype.getQueryFragment = function(e, t) { | |
t = t || this.$ReactGraphQLQueryBuilder_initialParams; | |
var n = a(e, t); | |
if (n !== this.$ReactGraphQLQueryBuilder_deepQueryFragmentCacheKey) { | |
var r = o.getQueryInterpreter(e); | |
if (this.$ReactGraphQLQueryBuilder_Component.processQueryParams) | |
if (__DEV__) { | |
var i = Object.freeze(Object.assign({}, t)), | |
s = this.$ReactGraphQLQueryBuilder_Component.processQueryParams(e, i); | |
s !== i && (t = s) | |
} else t = this.$ReactGraphQLQueryBuilder_Component.processQueryParams(e, t); | |
var l = p(this.$ReactGraphQLQueryBuilder_initialParams, function(e, n) { | |
return { | |
$ReactGraphQLQueryBuilder_value: t[n] | |
} | |
}), | |
u = this.$ReactGraphQLQueryBuilder_queryFunction(e, r, l); | |
u && this.$ReactGraphQLQueryBuilder_deferred && (u = u.defer()), this.$ReactGraphQLQueryBuilder_deepQueryFragment = u, this.$ReactGraphQLQueryBuilder_deepQueryFragmentCacheKey = n | |
} | |
return this.$ReactGraphQLQueryBuilder_deepQueryFragment | |
}, o.prototype["if"] = function(e) { | |
return e.$ReactGraphQLQueryBuilder_value ? this : null | |
}, o.prototype.unless = function(e) { | |
return e.$ReactGraphQLQueryBuilder_value ? null : this | |
}, i.exports = o | |
}), __d("stableStringify", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return null !== e && "[object Object]" === Object.prototype.toString.call(e) | |
} | |
function a(e) { | |
var t = Object.keys(e); | |
if (t.length) { | |
var n = []; | |
t.sort(); | |
for (var r = 0; r < t.length; r++) { | |
var i = t[r], | |
s = e[i]; | |
s = o(s) || Array.isArray(s) ? a(s) : JSON.stringify(s), n.push(i + ":" + s) | |
} | |
return Array.isArray(e) ? "[" + n.join(",") + "]" : "{" + n.join(",") + "}" | |
} | |
return JSON.stringify(e) | |
} | |
i.exports = a | |
}), __d("URI", ["PHPQuerySerializer", "URIBase", "isFacebookURI", "unqualifyURI", "areSameOrigin", "copyProperties", "goURI"], function(e, t, n, r, i) { | |
function o(e) { | |
"use strict"; | |
return this instanceof o ? void s.call(this, e || "", a) : new o(e || window.location.href) | |
} | |
var a = t("PHPQuerySerializer"), | |
s = t("URIBase"), | |
l = t("isFacebookURI"), | |
u = t("unqualifyURI"), | |
c = t("areSameOrigin"), | |
p = t("copyProperties"), | |
d = t("goURI"); | |
for (var h in s) s.hasOwnProperty(h) && (o[h] = s[h]); | |
var f = null === s ? null : s.prototype; | |
o.prototype = Object.create(f), o.prototype.constructor = o, o.__superConstructor__ = s, o.prototype.setPath = function(e) { | |
"use strict"; | |
return this.path = e, f.setPath.call(this, e) | |
}, o.prototype.getPath = function() { | |
"use strict"; | |
var e = f.getPath.call(this); | |
return e ? e.replace(/^\/+/, "/") : e | |
}, o.prototype.setProtocol = function(e) { | |
"use strict"; | |
return this.protocol = e, f.setProtocol.call(this, e) | |
}, o.prototype.setDomain = function(e) { | |
"use strict"; | |
return this.domain = e, f.setDomain.call(this, e) | |
}, o.prototype.setPort = function(e) { | |
"use strict"; | |
return this.port = e, f.setPort.call(this, e) | |
}, o.prototype.setFragment = function(e) { | |
"use strict"; | |
return this.fragment = e, f.setFragment.call(this, e) | |
}, o.prototype.valueOf = function() { | |
"use strict"; | |
return this.toString() | |
}, o.prototype.isFacebookURI = function() { | |
"use strict"; | |
if (__DEV__) throw new Error("URI.prototype.isFacebookURI is deprecated, use isFacebookURI mirco-module instead"); | |
return l(this) | |
}, o.prototype.isLinkshimURI = function() { | |
"use strict"; | |
return !l(this) || "/l.php" !== this.getPath() && 0 !== this.getPath().indexOf("/si/ajax/l/") && 0 !== this.getPath().indexOf("/l/") && 0 !== this.getPath().indexOf("l/") ? !1 : !0 | |
}, o.prototype.getRegisteredDomain = function() { | |
"use strict"; | |
if (!this.getDomain()) return ""; | |
if (!l(this)) return null; | |
var e = this.getDomain().split("."), | |
t = e.indexOf("facebook"); | |
return e.slice(t).join(".") | |
}, o.prototype.getUnqualifiedURI = function() { | |
"use strict"; | |
var e = new o(this); | |
return u(e), e | |
}, o.prototype.getQualifiedURI = function() { | |
"use strict"; | |
return new o(this).$URI_qualify() | |
}, o.prototype.$URI_qualify = function() { | |
"use strict"; | |
if (!this.getDomain()) { | |
var e = o(); | |
this.setProtocol(e.getProtocol()).setDomain(e.getDomain()).setPort(e.getPort()) | |
} | |
return this | |
}, o.prototype.isSameOrigin = function(e) { | |
"use strict"; | |
var t = e || window.location.href; | |
return t instanceof o || (t = new o(t.toString())), c(this, t) | |
}, o.prototype.go = function(e) { | |
"use strict"; | |
d(this, e) | |
}, o.prototype.setSubdomain = function(e) { | |
"use strict"; | |
var t = this.$URI_qualify().getDomain().split("."); | |
return t.length <= 2 ? t.unshift(e) : t[0] = e, this.setDomain(t.join(".")) | |
}, o.prototype.getSubdomain = function() { | |
"use strict"; | |
if (!this.getDomain()) return ""; | |
var e = this.getDomain().split("."); | |
return e.length <= 2 ? "" : e[0] | |
}, o.isValidURI = function(e) { | |
"use strict"; | |
return s.isValidURI(e, a) | |
}, p(o, { | |
getRequestURI: function(t, n) { | |
t = void 0 === t || t; | |
var r = e.PageTransitions; | |
return t && r && r.isInitialized() ? r.getCurrentURI(!!n).getQualifiedURI() : new o(window.location.href) | |
}, | |
getMostRecentURI: function() { | |
var t = e.PageTransitions; | |
return t && t.isInitialized() ? t.getMostRecentURI().getQualifiedURI() : new o(window.location.href) | |
}, | |
getNextURI: function() { | |
var t = e.PageTransitions; | |
return t && t.isInitialized() ? t._next_uri.getQualifiedURI() : new o(window.location.href) | |
}, | |
expression: /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/, | |
arrayQueryExpression: /^(\w+)((?:\[\w*\])+)=?(.*)/, | |
encodeComponent: function(e) { | |
return encodeURIComponent(e).replace(/%5D/g, "]").replace(/%5B/g, "[") | |
}, | |
decodeComponent: function(e) { | |
return decodeURIComponent(e.replace(/\+/g, " ")) | |
} | |
}), __DEV__ && o.prototype.__defineGetter__ && o.prototype._defineSetter__ && (o.prototype.__defineGetter__("path", function() { | |
return console.warn("URI: Do not access the path property directly use getPath(). Fix URI.prototype."), this.path | |
}), o.prototype.__defineSetter__("path", function(e) { | |
this.path = e | |
}), o.prototype.__defineGetter__("protocol", function() { | |
return console.warn("URI: Do not access the protocol property directly use getProtocol(). Fix URI.prototype."), this.protocol | |
}), o.prototype.__defineSetter__("protocol", function(e) { | |
this.protocol = e | |
}), o.prototype.__defineGetter__("domain", function() { | |
return console.warn("URI: Do not access the domain property directly use getDomain(). Fix URI.prototype."), this.domain | |
}), o.prototype.__defineSetter__("domain", function(e) { | |
this.domain = e | |
}), o.prototype.__defineGetter__("port", function() { | |
return console.warn("URI: Do not access the port property directly use getPort(). Fix URI.prototype."), this.port | |
}), o.prototype.__defineSetter__("port", function(e) { | |
this.port = e | |
}), o.prototype.__defineGetter__("fragment", function() { | |
return console.warn("URI: Do not access the fragment property directly use getFragment(). Fix URI.prototype."), this.fragment | |
}), o.prototype.__defineSetter__("fragment", function(e) { | |
this.fragment = e | |
})), i.exports = o | |
}), __d("PHPQuerySerializer", ["invariant"], function(e, t, n, r, i) { | |
function o(e) { | |
return a(e, null) | |
} | |
function a(e, t) { | |
t = t || ""; | |
var n = []; | |
if (null === e || void 0 === e) n.push(s(t)); | |
else if ("object" == typeof e) { | |
("nodeName" in e || "nodeType" in e) && c(0, "PHPQuerySerializer serializing a DOM element, not good ..."); | |
for (var r in e) e.hasOwnProperty(r) && void 0 !== e[r] && n.push(a(e[r], t ? t + "[" + r + "]" : r)) | |
} else n.push(s(t) + "=" + s(e)); | |
return n.join("&") | |
} | |
function s(e) { | |
return encodeURIComponent(e).replace(/%5D/g, "]").replace(/%5B/g, "[") | |
} | |
function l(e) { | |
if (!e) return {}; | |
var t = {}; | |
e = e.replace(/%5B/gi, "[").replace(/%5D/gi, "]"), e = e.split("&"); | |
for (var n = Object.prototype.hasOwnProperty, r = 0, i = e.length; i > r; r++) { | |
var o = e[r].match(p); | |
if (o) { | |
var a = o[2].split(/\]\[|\[|\]/).slice(0, -1), | |
s = o[1], | |
l = u(o[3] || ""); | |
a[0] = s; | |
for (var c = t, d = 0; d < a.length - 1; d++) | |
if (a[d]) { | |
if (!n.call(c, a[d])) { | |
var h = a[d + 1] && !a[d + 1].match(/^\d{1,3}$/) ? {} : []; | |
if (c[a[d]] = h, c[a[d]] !== h) return t | |
} | |
c = c[a[d]] | |
} else c.push(a[d + 1] && !a[d + 1].match(/^\d{1,3}$/) ? {} : []), c = c[c.length - 1]; | |
c instanceof Array && "" === a[a.length - 1] ? c.push(l) : c[a[a.length - 1]] = l | |
} else { | |
var f = e[r].split("="); | |
t[u(f[0])] = void 0 === f[1] ? null : u(f[1]) | |
} | |
} | |
return t | |
} | |
function u(e) { | |
return decodeURIComponent(e.replace(/\+/g, " ")) | |
} | |
var c = t("invariant"), | |
p = /^([-_\w]+)((?:\[[-_\w]*\])+)=?(.*)/, | |
d = { | |
serialize: o, | |
encodeComponent: s, | |
deserialize: l, | |
decodeComponent: u | |
}; | |
i.exports = d | |
}), __d("URIBase", ["URIRFC3986", "URISchemes", "copyProperties", "ex", "invariant"], function(e, t, n, r, i) { | |
function o(e, t, n, r) { | |
if (!t) return !0; | |
if (t instanceof a) return e.setProtocol(t.getProtocol()), e.setDomain(t.getDomain()), e.setPort(t.getPort()), e.setPath(t.getPath()), e.setQueryData(r.deserialize(r.serialize(t.getQueryData()))), e.setFragment(t.getFragment()), !0; | |
t = t.toString().trim(); | |
var i = s.parse(t) || {}; | |
if (!n && !l.isAllowed(i.scheme)) return !1; | |
if (e.setProtocol(i.scheme || ""), !n && d.test(i.host)) return !1; | |
if (e.setDomain(i.host || ""), e.setPort(i.port || ""), e.setPath(i.path || ""), n) e.setQueryData(r.deserialize(i.query) || {}); | |
else try { | |
e.setQueryData(r.deserialize(i.query) || {}) | |
} catch (o) { | |
return !1 | |
} | |
if (e.setFragment(i.fragment || ""), null !== i.userinfo) { | |
if (n) throw new Error(c("URI.parse: invalid URI (userinfo is not allowed in a URI): %s", e.toString())); | |
return !1 | |
} | |
if (!e.getDomain() && -1 !== e.getPath().indexOf("\\")) { | |
if (n) throw new Error(c("URI.parse: invalid URI (no domain but multiple back-slashes): %s", e.toString())); | |
return !1 | |
} | |
if (!e.getProtocol() && h.test(t)) { | |
if (n) throw new Error(c("URI.parse: invalid URI (unsafe protocol-relative URLs): %s", e.toString())); | |
return !1 | |
} | |
return !0 | |
} | |
function a(e, t) { | |
"use strict"; | |
t || p(0, "no serializer set"), this.$URIBase_serializer = t, this.$URIBase_protocol = "", this.$URIBase_domain = "", this.$URIBase_port = "", this.$URIBase_path = "", this.$URIBase_fragment = "", this.$URIBase_queryData = {}, o(this, e, !0, t) | |
} | |
var s = t("URIRFC3986"), | |
l = t("URISchemes"), | |
u = t("copyProperties"), | |
c = t("ex"), | |
p = t("invariant"), | |
d = new RegExp("[\\x00-\\x2c\\x2f\\x3b-\\x40\\x5c\\x5e\\x60\\x7b-\\x7f\\uFDD0-\\uFDEF\\uFFF0-\\uFFFF\\u2047\\u2048\\uFE56\\uFE5F\\uFF03\\uFF0F\\uFF1F]"), | |
h = new RegExp("^(?:[^/]*:|[\\x00-\\x1f]*/[\\x00-\\x1f]*/)"); | |
a.prototype.setProtocol = function(e) { | |
"use strict"; | |
return l.isAllowed(e) || p(0, '"%s" is not a valid protocol for a URI.', e), this.$URIBase_protocol = e, this | |
}, a.prototype.getProtocol = function() { | |
"use strict"; | |
return this.$URIBase_protocol | |
}, a.prototype.setSecure = function(e) { | |
"use strict"; | |
return this.setProtocol(e ? "https" : "http") | |
}, a.prototype.isSecure = function() { | |
"use strict"; | |
return "https" === this.getProtocol() | |
}, a.prototype.setDomain = function(e) { | |
"use strict"; | |
if (d.test(e)) throw new Error(c("URI.setDomain: unsafe domain specified: %s for url %s", e, this.toString())); | |
return this.$URIBase_domain = e, this | |
}, a.prototype.getDomain = function() { | |
"use strict"; | |
return this.$URIBase_domain | |
}, a.prototype.setPort = function(e) { | |
"use strict"; | |
return this.$URIBase_port = e, this | |
}, a.prototype.getPort = function() { | |
"use strict"; | |
return this.$URIBase_port | |
}, a.prototype.setPath = function(e) { | |
"use strict"; | |
return __DEV__ && e && "/" !== e.charAt(0) && console.warn('Path does not begin with a "/" which means this URI will likely be malformed. Ensure any string passed to .setPath() leads with "/"'), this.$URIBase_path = e, this | |
}, a.prototype.getPath = function() { | |
"use strict"; | |
return this.$URIBase_path | |
}, a.prototype.addQueryData = function(e, t) { | |
"use strict"; | |
return "[object Object]" === Object.prototype.toString.call(e) ? u(this.$URIBase_queryData, e) : this.$URIBase_queryData[e] = t, this | |
}, a.prototype.setQueryData = function(e) { | |
"use strict"; | |
return this.$URIBase_queryData = e, this | |
}, a.prototype.getQueryData = function() { | |
"use strict"; | |
return this.$URIBase_queryData | |
}, a.prototype.removeQueryData = function(e) { | |
"use strict"; | |
Array.isArray(e) || (e = [e]); | |
for (var t = 0, n = e.length; n > t; ++t) delete this.$URIBase_queryData[e[t]]; | |
return this | |
}, a.prototype.setFragment = function(e) { | |
"use strict"; | |
return this.$URIBase_fragment = e, this | |
}, a.prototype.getFragment = function() { | |
"use strict"; | |
return this.$URIBase_fragment | |
}, a.prototype.isEmpty = function() { | |
"use strict"; | |
return !(this.getPath() || this.getProtocol() || this.getDomain() || this.getPort() || Object.keys(this.getQueryData()).length > 0 || this.getFragment()) | |
}, a.prototype.toString = function() { | |
"use strict"; | |
var e = ""; | |
this.$URIBase_protocol && (e += this.$URIBase_protocol + "://"), this.$URIBase_domain && (e += this.$URIBase_domain), this.$URIBase_port && (e += ":" + this.$URIBase_port), this.$URIBase_path ? e += this.$URIBase_path : e && (e += "/"); | |
var t = this.$URIBase_serializer.serialize(this.$URIBase_queryData); | |
return t && (e += "?" + t), this.$URIBase_fragment && (e += "#" + this.$URIBase_fragment), e | |
}, a.prototype.getOrigin = function() { | |
"use strict"; | |
return this.$URIBase_protocol + "://" + this.$URIBase_domain + (this.$URIBase_port ? ":" + this.$URIBase_port : "") | |
}, a.isValidURI = function(e, t) { | |
return o(new a(null, t), e, !1, t) | |
}, i.exports = a | |
}), __d("URIRFC3986", [], function(e, t, n, r, i) { | |
var o = new RegExp("^([^:/?#]+:)?(//([^\\\\/?#@]*@)?(\\[[A-Fa-f0-9:.]+\\]|[^\\/?#:]*)(:[0-9]*)?)?([^?#]*)(\\?[^#]*)?(#.*)?"), | |
a = { | |
parse: function(e) { | |
if ("" === e.trim()) return null; | |
var t = e.match(o), | |
n = {}; | |
return n.uri = t[0] ? t[0] : null, n.scheme = t[1] ? t[1].substr(0, t[1].length - 1) : null, n.authority = t[2] ? t[2].substr(2) : null, n.userinfo = t[3] ? t[3].substr(0, t[3].length - 1) : null, n.host = t[2] ? t[4] : null, n.port = t[5] ? t[5].substr(1) ? parseInt(t[5].substr(1), 10) : null : null, n.path = t[6] ? t[6] : null, n.query = t[7] ? t[7].substr(1) : null, n.fragment = t[8] ? t[8].substr(1) : null, n.isGenericURI = null === n.authority && !!n.scheme, n | |
} | |
}; | |
i.exports = a | |
}), __d("URISchemes", ["createObjectFrom"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("createObjectFrom"), | |
a = o(["fb", "fb-ama", "fb-messenger", "fbcf", "fbconnect", "fbrpc", "file", "ftp", "http", "https", "mailto", "ms-app", "itms", "itms-apps", "itms-services", "market", "svn+ssh", "fbstaging", "tel", "sms", "pebblejs", "react"]), | |
s = { | |
isAllowed: function(e) { | |
return e ? a.hasOwnProperty(e.toLowerCase()) : !0 | |
} | |
}; | |
i.exports = s | |
}), __d("createObjectFrom", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
if (__DEV__ && !Array.isArray(e)) throw new TypeError("Must pass an array of keys."); | |
var n = {}, | |
r = Array.isArray(t); | |
"undefined" == typeof t && (t = !0); | |
for (var i = e.length; i--;) n[e[i]] = r ? t[i] : t; | |
return n | |
} | |
i.exports = o | |
}), __d("ex", ["eprintf"], function(e, t, n, r, i) { | |
var o = t("eprintf"), | |
a = function() { | |
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]); | |
return e = e.map(function(e) { | |
return String(e) | |
}), e[0].split("%s").length !== e.length ? a("ex args number mismatch: %s", JSON.stringify(e)) : __DEV__ ? o.apply(null, e) : a._prefix + JSON.stringify(e) + a._suffix | |
}; | |
a._prefix = "<![EX[", a._suffix = "]]>", i.exports = a | |
}), __d("eprintf", [], function(e, t, n, r, i) { | |
var o = function(e) { | |
var t = Array.prototype.slice.call(arguments).map(function(e) { | |
return String(e) | |
}), | |
n = e.split("%s").length - 1; | |
if (n !== t.length - 1) return o("eprintf args number mismatch: %s", JSON.stringify(t)); | |
var r = 1; | |
return e.replace(/%s/g, function() { | |
return String(t[r++]) | |
}) | |
}; | |
i.exports = o | |
}), __d("isFacebookURI", [], function(e, t, n, r, i) { | |
function o(e) { | |
return a || (a = new RegExp("(^|\\.)facebook\\.com$", "i")), e.isEmpty() && "#" !== e.toString() ? !1 : e.getDomain() || e.getProtocol() ? -1 !== s.indexOf(e.getProtocol()) && a.test(e.getDomain()) : !0 | |
} | |
var a = null, | |
s = ["http", "https"]; | |
o.setRegex = function(e) { | |
a = e | |
}, i.exports = o | |
}), __d("unqualifyURI", [], function(e, t, n, r, i) { | |
function o(e) { | |
e.setProtocol(null).setDomain(null).setPort(null) | |
} | |
i.exports = o | |
}), __d("areSameOrigin", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
return e.isEmpty() || t.isEmpty() ? !1 : e.getProtocol() && e.getProtocol() != t.getProtocol() ? !1 : e.getDomain() && e.getDomain() != t.getDomain() ? !1 : e.getPort() && e.getPort() != t.getPort() ? !1 : !0 | |
} | |
i.exports = o | |
}), __d("goURI", ["URISchemes"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
throw new Error("goURI() behavior is undefined in Catalyst") | |
} | |
t("URISchemes"); | |
i.exports = o | |
}), __d("XControllerURIBuilder", ["URI", "invariant"], function(e, t, n, r, i) { | |
function o(e, t) { | |
"use strict"; | |
this.$XControllerURIBuilder_path = e, this.$XControllerURIBuilder_paramDefinitions = t, this.$XControllerURIBuilder_params = {} | |
} | |
var a = t("URI"), | |
s = t("invariant"); | |
o.prototype.setInt = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "Int", t) | |
}, o.prototype.setFloat = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "Float", t) | |
}, o.prototype.setString = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "String", t) | |
}, o.prototype.setExists = function(e, t) { | |
"use strict"; | |
return t === !1 && (t = void 0), this.__setParam(e, "Exists", t) | |
}, o.prototype.setBool = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "Bool", t) | |
}, o.prototype.setEnum = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "Enum", t) | |
}, o.prototype.setIntVector = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "IntVector", t) | |
}, o.prototype.setFloatVector = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "FloatVector", t) | |
}, o.prototype.setStringVector = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "StringVector", t) | |
}, o.prototype.setEnumVector = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "EnumVector", t) | |
}, o.prototype.setIntToIntMap = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "IntToIntMap", t) | |
}, o.prototype.setIntToFloatMap = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "IntToFloatMap", t) | |
}, o.prototype.setIntToStringMap = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "IntToStringMap", t) | |
}, o.prototype.setIntToBoolMap = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "IntToBoolMap", t) | |
}, o.prototype.setStringToIntMap = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "StringToIntMap", t) | |
}, o.prototype.setStringToFloatMap = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "StringToFloatMap", t) | |
}, o.prototype.setStringToStringMap = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "StringToStringMap", t) | |
}, o.prototype.setStringToBoolMap = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "StringToBoolMap", t) | |
}, o.prototype.setHackType = function(e, t) { | |
"use strict"; | |
return this.__setParam(e, "HackType", t) | |
}, o.prototype.__validateRequiredParamsExistence = function() { | |
"use strict"; | |
for (var e in this.$XControllerURIBuilder_paramDefinitions) this.$XControllerURIBuilder_paramDefinitions[e].required && !this.$XControllerURIBuilder_params.hasOwnProperty(e) && s(0, "Missing required parameter: %s", e) | |
}, o.prototype.__setParam = function(e, t, n) { | |
"use strict"; | |
e in this.$XControllerURIBuilder_paramDefinitions || s(0, 'Attempting to set invalid param "%s". Make sure the param is defined in the controller\'s getParamDefinition() method.', e); | |
var r = this.$XControllerURIBuilder_paramDefinitions[e].type; | |
return r !== t && s(0, 'Attempting to set param "%s" as %s, but it is defined in the controller\'s getParamDefinition() method as %s.', e, t, r), this.__setParamInt(e, n), this | |
}, o.prototype.__setParamInt = function(e, t) { | |
"use strict"; | |
this.$XControllerURIBuilder_params[e] = t | |
}, o.prototype.getURI = function() { | |
"use strict"; | |
this.__validateRequiredParamsExistence(); | |
for (var e = {}, t = "", n = new RegExp(/^\{(\?)?(\*)?(.+?)\}$/), r = this.$XControllerURIBuilder_path.split("/"), i = !1, o = 0; o < r.length; o++) { | |
var l = r[o]; | |
if ("" !== l) { | |
var u = n.exec(l); | |
if (u) { | |
var c = "?" === u[1], | |
p = ("*" === u[2], u[3]), | |
d = this.$XControllerURIBuilder_paramDefinitions[p]; | |
if (d || s(0, 'Found unknown token "%s" in path "%s". Ensure it is defined in getParamDefinition().', p, this.$XControllerURIBuilder_path), c && i) continue; | |
var h = this.$XControllerURIBuilder_params[p]; | |
if (null == h && c) { | |
i = !0; | |
continue | |
} | |
null == h && s(0, "Missing required template parameter: %s", p), t += "/" + h, e[p] = !0 | |
} else t += "/" + l | |
} | |
} | |
"/" === this.$XControllerURIBuilder_path.slice(-1) && (t += "/"); | |
var f = new a(t); | |
for (d in this.$XControllerURIBuilder_params) | |
if (h = this.$XControllerURIBuilder_params[d], !e[d] && null != h) { | |
var m = this.$XControllerURIBuilder_paramDefinitions[d]; | |
f.addQueryData(d, m && "Exists" === m.type ? null : h) | |
} | |
return f | |
}, o.create = function(e, t) { | |
return o.bind(null, e, t) | |
}, i.exports = o | |
}), __d("DliteRouteProvider", ["DliteRoute", "React", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DliteRoute"), | |
a = t("React"), | |
s = t("invariant"), | |
l = a.PropTypes, | |
u = { | |
Mixin: { | |
childContextTypes: { | |
route: l.instanceOf(o).isRequired | |
}, | |
getChildContext: function() { | |
return "function" != typeof this.getDliteRoute && s(0, "DliteRouteProvider mixin requires getDliteRoute to be implemented"), { | |
route: this.getDliteRoute() | |
} | |
} | |
} | |
}; | |
i.exports = u | |
}), __d("cloneWithProps", ["ReactElement", "ReactPropTransferer", "keyOf", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
__DEV__ && u(!e.ref, "You are calling cloneWithProps() on a child with a ref. This is dangerous because you're creating a new child which will not be added as a ref to its parent."); | |
var n = s.mergeProps(t, e.props); | |
return !n.hasOwnProperty(c) && e.props.hasOwnProperty(c) && (n.children = e.props.children), a.createElement(e.type, n) | |
} | |
var a = t("ReactElement"), | |
s = t("ReactPropTransferer"), | |
l = t("keyOf"), | |
u = t("warning"), | |
c = l({ | |
children: null | |
}); | |
i.exports = o | |
}), __d("GraphQLQueryRunner", ["DliteFetchModeConstants", "DliteLog", "DliteLogger", "DliteProfiler", "DliteTaskScheduler", "GraphQL_EXPERIMENTAL", "GraphQLDeferredQueryTracker", "GraphQLStore", "Promise", "PromiseMap", "containsQueryRootCall", "extendArray", "fetchRQL", "forEachObject", "generateForceIndex", "mapObject", "setImmediate", "splitDeferredQueries", "subtractQuery", "throwImmediate"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return !!e | |
} | |
function a(e) { | |
var t = [], | |
n = e.getQuery().rootCall(); | |
return F.every(function(r) { | |
var i = r.query; | |
if (b(i.getQuery().rootCall(), n)) { | |
var o = P(e, i); | |
o !== e && (t.push(r.promise), e = o) | |
} | |
return null !== e | |
}), { | |
query: e, | |
dependencies: t | |
} | |
} | |
function s(e) { | |
var t = e.getOwnFields(); | |
return 1 !== t.length || "id" !== t[0].getFieldName() ? !0 : e.getFragments().some(s) | |
} | |
function l(e) { | |
var t = e.getQuery(); | |
return "node" === t.rootCall().getName() && !s(t) | |
} | |
function u(e) { | |
return e.getQuery().isDeferred() | |
} | |
function c(e, t, n, r) { | |
var i = t.onBlockingRequest, | |
o = t.onResolvable, | |
s = t.onSuccess, | |
c = t.onFailure, | |
p = 0; | |
g.await(function() { | |
var t = []; | |
e.forEach(function(e) { | |
x(e).forEach(function(e) { | |
l(e) || (u(e) || p++, t.push(e)) | |
}) | |
}); | |
var f = r === d.FETCH_MODE_REFETCH ? E() : null, | |
m = function(e) { | |
if (u(e) || p--, !p) try { | |
o() | |
} catch (t) { | |
I(t) | |
} | |
}, | |
g = function(e, t) { | |
return e.map(r === d.FETCH_MODE_CLIENT || r === d.FETCH_MODE_REFETCH ? function(e) { | |
var n = a(e); | |
return n.query && n.dependencies.push(M.add(n.query, w(n.query), t, f)), v.all(n.dependencies).then(function() { | |
return m(e) | |
}) | |
} : function(e) { | |
return M.add(e, L.get(e.getQuery().getID()), t, null).then(function() { | |
return m(e) | |
}) | |
}) | |
}; | |
if (t.length) { | |
var _ = u(t[0]) ? [] : t.splice(0, 1), | |
y = g(_, []), | |
S = g(t, y); | |
v.all(y.concat(S)).done(function() { | |
n.stop(), s() | |
}, function(e) { | |
n.stop(), c(e), h.warn(e.message) | |
}), T(p ? i : o) | |
} else T(o), T(s) | |
}) | |
} | |
function p(e) { | |
var t = e.onBlockingRequest, | |
n = e.onResolvable, | |
r = e.onSuccess, | |
i = e.onFailure, | |
o = !1; | |
return { | |
abort: function() { | |
o = !0 | |
}, | |
abortableCallbacks: D({ | |
onBlockingRequest: t, | |
onResolvable: n, | |
onSuccess: r, | |
onFailure: i | |
}, function(e) { | |
return function() { | |
return e && !o ? e.apply(null, arguments) : void 0 | |
} | |
}) | |
} | |
} | |
var d = t("DliteFetchModeConstants"), | |
h = t("DliteLog"), | |
f = t("DliteLogger"), | |
m = t("DliteProfiler"), | |
g = t("DliteTaskScheduler"), | |
_ = (t("GraphQL_EXPERIMENTAL"), t("GraphQLDeferredQueryTracker")), | |
y = t("GraphQLStore"), | |
v = t("Promise"), | |
S = t("PromiseMap"), | |
b = t("containsQueryRootCall"), | |
R = t("extendArray"), | |
w = t("fetchRQL"), | |
C = t("forEachObject"), | |
E = t("generateForceIndex"), | |
D = t("mapObject"), | |
T = t("setImmediate"), | |
x = t("splitDeferredQueries"), | |
P = t("subtractQuery"), | |
I = t("throwImmediate"), | |
F = [], | |
L = new S, | |
M = { | |
run: function(e, t, n) { | |
var r = p(t), | |
i = r.abort, | |
o = r.abortableCallbacks; | |
y.emit(y.Events.beginQuery, e); | |
var a = f.logClientEvent("GraphQLQueryRunner.run"); | |
n = n || d.FETCH_MODE_CLIENT; | |
var s = []; | |
return n === d.FETCH_MODE_CLIENT ? C(e, function(e) { | |
e && R(s, y.getDiffQueries(e)) | |
}) : C(e, function(e) { | |
e && s.push(e) | |
}), c(s, o, a, n), y.emit(y.Events.endQuery), { | |
abort: i | |
} | |
}, | |
forceFetch: function(e, t) { | |
var n = p(t), | |
r = n.abort, | |
i = n.abortableCallbacks; | |
y.emit(y.Events.beginQuery, e); | |
var o = f.logClientEvent("GraphQLQueryRunner.forceFetch"), | |
a = []; | |
C(e, function(e) { | |
e && R(a, y.getDiffQueries(e)) | |
}), 0 === a.length && (T(i.onResolvable), i.onBlockingRequest = function() {}); | |
var s = []; | |
return C(e, function(e) { | |
e && s.push(e) | |
}), c(s, i, o, d.FETCH_MODE_REFETCH), y.emit(y.Events.endQuery), { | |
abort: r | |
} | |
}, | |
add: function(e, t, n, r) { | |
_.recordQuery(e); | |
var i = F.length, | |
o = v.all(n).finally(function() { | |
return t.then(function(t) { | |
return g.await(function() { | |
var n = t.response; | |
y.emit(y.Events.dataFromServer, n), y.handleUpdate(n, e, null, r), _.resolveQuery(e, n), delete F[i] | |
}) | |
}, function(t) { | |
if (_.rejectQuery(e, t), delete F[i], h.warn(t.message), !u(e)) throw t | |
}) | |
}); | |
return F[i] = { | |
query: e, | |
promise: o | |
}, o | |
}, | |
resetPending: function() { | |
F = [], _.reset() | |
}, | |
resolveQueryByID: function(e, t) { | |
L.resolveKey(e, t) | |
}, | |
rejectQueryByID: function(e, t) { | |
L.rejectKey(e, t) | |
}, | |
hasPendingQueries: function() { | |
return F.some(o) | |
}, | |
hasPendingQuery: function(e) { | |
return _.isQueryPending(e) | |
} | |
}; | |
m.instrumentMethods(M, { | |
hasPendingQuery: "GraphQLQueryRunner.hasPendingQuery" | |
}), i.exports = M | |
}), __d("DliteFetchModeConstants", ["keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("keyMirror"), | |
a = o({ | |
FETCH_MODE_CLIENT: null, | |
FETCH_MODE_PRELOAD: null, | |
FETCH_MODE_REFETCH: null | |
}); | |
i.exports = a | |
}), __d("DliteLog", ["DliteLogLevel", "ex", "keyMirror", "mixInEventEmitter"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DliteLogLevel"), | |
a = t("ex"), | |
s = t("keyMirror"), | |
l = t("mixInEventEmitter"), | |
u = { | |
Events: s({ | |
loggedError: null | |
}), | |
warn: function() { | |
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]); | |
var r = new Error(a.apply(null, e)); | |
r.framesToPop = 1, r.type = o.WARNING, __DEV__ && console.warn.apply(console, e), this.emitAndHold(u.Events.loggedError, r) | |
} | |
}; | |
l(u, u.Events), i.exports = u | |
}), __d("DliteLogLevel", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
MUSTFIX: "mustfix", | |
WARNING: "warn" | |
}; | |
i.exports = o | |
}), __d("DliteProfiler", ["emptyFunction", "forEachObject", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("emptyFunction"), | |
a = t("forEachObject"), | |
s = t("invariant"), | |
l = {}, | |
u = {}, | |
c = { | |
stop: o | |
}, | |
p = { | |
instrumentMethods: function(e, t) { | |
a(t, function(t, n) { | |
e[n] = p.instrument(t, e[n]) | |
}) | |
}, | |
instrument: function(e, t) { | |
if (__DEV__) { | |
var n = [], | |
r = function() { | |
var r = l, | |
i = arguments, | |
o = function() { | |
r = t.apply(this, i) | |
}.bind(this); | |
if (n.forEach(function(t) { | |
o = t.bind(this, e, o) | |
}, this), o(), r === l) throw new Error("DliteProfiler: Handler did not invoke original function."); | |
return r | |
}; | |
return r.attachHandler = function(e) { | |
n.push(e) | |
}, r.detachHandler = function(e) { | |
var t = n.indexOf(e); | |
t >= 0 && n.splice(t, 1) | |
}, r.displayName = "(instrumented " + e + ")", r | |
} | |
return t.attachHandler = o, t.detachHandler = o, t | |
}, | |
instrumentAsync: function(e) { | |
return __DEV__ ? (u[e] && u[e].onStart(), { | |
stop: function() { | |
u[e] && u[e].onStop() | |
} | |
}) : c | |
}, | |
attachAsyncHandler: function(e, t) { | |
__DEV__ && (u.hasOwnProperty(e) && s(0, "DliteProfiler: Async handler with name `%s` already exists.", e), u[e] = t) | |
}, | |
detachAsyncHandler: function(e) { | |
__DEV__ && (u.hasOwnProperty(e) || s(0, "DliteProfiler: Async handler with name `%s` does not exist.", e), delete u[e]) | |
} | |
}; | |
i.exports = p | |
}), __d("forEachObject", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
for (var r in e) a.call(e, r) && t.call(n, e[r], r, e) | |
} | |
var a = Object.prototype.hasOwnProperty; | |
i.exports = o | |
}), __d("DliteTaskScheduler", ["Promise", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
d || (p.length ? (d = !0, u.resolve().done(function() { | |
var e = a(p.shift()); | |
l ? l(e) : e() | |
})) : d = !1) | |
} | |
function a(e) { | |
var t = !1; | |
return function() { | |
t && c(0, "DliteTaskScheduler: Tasks can only be executed once."), t = !0, s(e), d = !1, o() | |
} | |
} | |
function s(e) { | |
var t = p; | |
p = []; | |
try { | |
e() | |
} finally { | |
Array.prototype.unshift.apply(t, p), p = t | |
} | |
} | |
var l, u = t("Promise"), | |
c = t("invariant"), | |
p = [], | |
d = !1, | |
h = { | |
injectScheduler: function(e) { | |
l = e | |
}, | |
await: function() { | |
var e = arguments, | |
t = new u(function(t) { | |
function n(i) { | |
p.push(function() { | |
var o = e[r++](i); | |
r < e.length ? n(o) : t(o) | |
}) | |
} | |
var r = 0; | |
n() | |
}); | |
return o(), t | |
} | |
}; | |
i.exports = h | |
}), __d("GraphQLDeferredQueryTracker", ["ErrorUtils", "GraphQL_EXPERIMENTAL", "GraphQLCodedError", "GraphQLStore", "Map", "forEachObject", "invariant", "isEmpty", "setImmediate"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
var n = e.getQuery(), | |
r = n.getDeferredFragmentNames(); | |
if (r) { | |
var i = n.rootCall().hasRefParam() ? D.get(n.getID()) || {} : g.getIDsFromQuery(e); | |
y(i, function(e) { | |
var n = C.get(e) || {}; | |
y(r, function(r) { | |
delete n[r], t(e, r) | |
}), S(n) ? C.delete(e) : C.set(e, n) | |
}) | |
} | |
} | |
function a(e) { | |
var t = f(e), | |
n = E.get(t) || []; | |
n = n.filter(function(t) { | |
return t !== e | |
}), n.length ? E.set(t, n) : E.delete(t), D.delete(e.getQuery().getID()) | |
} | |
function s(e, t) { | |
for (var n = e.getQuery(), r = E.get(n.getID()) || [], i = 0; i < r.length; i++) { | |
var o = r[i], | |
a = o.getQuery(), | |
s = a.getDeferredFragmentNames(), | |
l = d(t, o); | |
D.set(a.getID(), l), y(l, function(e) { | |
var t = C.get(e) || {}; | |
Object.assign(t, s), C.set(e, t) | |
}) | |
} | |
} | |
function l(e) { | |
for (var t = e.getQuery().getID(), n = E.get(t) || [], r = 0; r < n.length; r++) D.delete(n[r].getQuery().getID()); | |
E.delete(t) | |
} | |
function u(e, t) { | |
w || (w = [], b(p)), w.push({ | |
dataID: e, | |
fragmentName: t, | |
error: null | |
}) | |
} | |
function c(e, t, n) { | |
w || (w = [], b(p)), w.push({ | |
dataID: e, | |
fragmentName: t, | |
error: n | |
}) | |
} | |
function p() { | |
if (w) { | |
for (var e = 0; e < R.length; e++) | |
for (var t = R[e], n = 0; n < w.length; n++) { | |
var r, i, o = w[n], | |
a = o.dataID, | |
s = o.error, | |
l = o.fragmentName; | |
s ? (r = t.callbacks.onFailure, i = [a, l, s]) : (r = t.callbacks.onSuccess, i = [a, l]), m.applyWithGuard(r, null, i, null, "GraphQLDeferredQueryTracker") | |
} | |
w = null | |
} | |
} | |
function d(e, t) { | |
var n = t.getQuery().rootCall().getRefTarget(); | |
if (!n) return {}; | |
var r = {}, | |
i = n.split("."); | |
return h(r, e, i, 1), r | |
} | |
function h(e, t, n, r) { | |
if (r === n.length && "string" == typeof t) return void(e[t] = t); | |
if (!(r >= n.length || !t || "object" != typeof t || Array.isArray(t))) { | |
var i = n[r]; | |
"*" === i ? y(t, function(t) { | |
h(e, t, n, r + 1) | |
}) : t.hasOwnProperty(i) && h(e, t[i], n, r + 1) | |
} | |
} | |
function f(e) { | |
return e.getQuery().rootCall().getSourceQueryID() | |
} | |
var m = t("ErrorUtils"), | |
g = (t("GraphQL_EXPERIMENTAL"), t("GraphQLCodedError"), t("GraphQLStore")), | |
_ = t("Map"), | |
y = t("forEachObject"), | |
v = t("invariant"), | |
S = t("isEmpty"), | |
b = t("setImmediate"), | |
R = [], | |
w = null, | |
C = new _, | |
E = new _, | |
D = new _, | |
T = { | |
addListenerForFragment: function(e, t, n) { | |
var r = { | |
callbacks: n, | |
dataID: e, | |
fragmentName: t | |
}; | |
return R.push(r), { | |
remove: function() { | |
var e = R.indexOf(r); | |
e >= 0 || v(0, "remove() can only be called once"), R.splice(e, 1) | |
} | |
} | |
}, | |
recordQuery: function(e) { | |
var t = f(e); | |
if (t) { | |
var n = E.get(t) || []; | |
n.push(e), E.set(t, n) | |
} else { | |
var r = e.getQuery().getDeferredFragmentNames(); | |
if (r) { | |
var i = g.getIDsFromQuery(e); | |
y(i, function(e) { | |
var t = C.get(e) || {}; | |
Object.assign(t, r), C.set(e, t) | |
}) | |
} | |
} | |
}, | |
resolveQuery: function(e, t) { | |
var n = f(e); | |
e.getQuery().isDeferred() ? (o(e, u), n && a(e)) : t && s(e, t) | |
}, | |
rejectQuery: function(e, t) { | |
var n = f(e); | |
e.getQuery().isDeferred() ? (o(e, function(e, n) { | |
c(e, n, t) | |
}), n && a(e)) : l(e) | |
}, | |
isQueryPending: function(e) { | |
var t = e.getQuery().getAllFragmentNames(), | |
n = g.getIDsFromQuery(e); | |
for (var r in n) | |
if (n.hasOwnProperty(r) && C.has(n[r])) { | |
var i = C.get(n[r]); | |
for (var o in t) | |
if (t.hasOwnProperty(o) && i.hasOwnProperty(o)) return !0 | |
} | |
return !1 | |
}, | |
reset: function() { | |
C = new _, D = new _, E = new _, R = [], w = [] | |
} | |
}; | |
i.exports = T | |
}), __d("GraphQLCodedError", ["ex"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
this.name = "GraphQLCodedError", this.code = e.code, this.summary = e.summary, this.userMessage = e.description, this.debugInfo = e.debug_info, this.message = a(this.name + "(" + this.code + "): %s description: %s debug_info: %s", this.summary, this.userMessage, this.debugInfo), Error.captureStackTrace ? Error.captureStackTrace(this) : this.stack = (new Error).stack | |
} | |
var a = t("ex"); | |
for (var s in Error) Error.hasOwnProperty(s) && (o[s] = Error[s]); | |
var l = null === Error ? null : Error.prototype; | |
o.prototype = Object.create(l), o.prototype.constructor = o, o.__superConstructor__ = Error, i.exports = o | |
}), __d("GraphQLStore", ["ActionCollisionMap", "ActionQueue", "DiffQueryBuilder", "DliteLogger", "DliteProfiler", "GraphQL_EXPERIMENTAL", "GraphQLConstants", "GraphQLMutationDataHandler", "GraphQLMutationProperties", "GraphQLMutatorConstants", "GraphQLMutatorHub", "GraphQLQueryTracker", "GraphQLStatusConstants", "GraphQLStoreChangeEmitter", "GraphQLStoreDataHandler", "GraphQLStoreNodeRangeTracker", "GraphQLStoreQueryPath", "GraphQLStoreReader", "GraphQLStoreWriter", "generateClientID", "generateForceIndex", "invariant", "isEmpty", "keyMirror", "mapObject", "mixInEventEmitter"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
return new I(H, V, U, j, N, e, E.broadcastChangeForID, t) | |
} | |
function a(e, t, n) { | |
var r = v.getMutationType(e); | |
e = e[r], t instanceof _.Mutation || M(0, "must pass a mutation into handleMutationResult"); | |
for (var i = R.getConfigs(r), a = o(n, L()), s = 0; s < i.length; s++) { | |
var l = i[s]; | |
switch (l.handlerType) { | |
case b.NODE_DELETE_HANDLER: | |
a.handleNodeDeleteMutation(e, l.config); | |
break; | |
case b.RANGE_ADD_HANDLER: | |
a.handleRangeAddMutation(e, t, l.config, S.getRangeConfigForType(r)); | |
break; | |
case b.RANGE_DELETE_HANDLER: | |
a.handleRangeDeleteMutation(e, l.config); | |
break; | |
default: | |
console.error('"%s" is not mapped to a mutation handler', l.handlerType) | |
} | |
} | |
a.handleMergeMutation(e, t, r) | |
} | |
function s(e) { | |
a(e.getOptimisticPayload(), e.getOptimisticPayloadQuery(), b.OPTIMISTIC_UPDATE); | |
var t = e.getClientMutationID(), | |
n = G[t]; | |
n && l(n, C.ERROR) | |
} | |
function l(e, t) { | |
t in C || M(0, '"%s" is not a valid GraphQLStatusConstant.', t); | |
var n = V[e]; | |
n || M(0, "Invalid dataID %s was passed to `setStatusForID`. Can only set status for queued node.", e), n.__status__ = t, E.broadcastChangeForID(e) | |
} | |
function u(e) { | |
var t = V[e]; | |
t || M(0, "Invalid dataID %s was passed to `clearStatusForID`. Can only set status for queued node.", e), delete t.__status__, E.broadcastChangeForID(e) | |
} | |
function c(e) { | |
for (var t in V) V.hasOwnProperty(t) && (delete V[t], e && e(t)) | |
} | |
function p(e) { | |
var t = d.getKeyForClientMutationID(e); | |
t && (d.shiftActionForKey(t), d.iterateOverActionsForKey(t, function(e) { | |
h.removeFromQueue(e.getClientMutationID()) | |
}), d.clearActionsForKey(t)) | |
} | |
var d = t("ActionCollisionMap"), | |
h = t("ActionQueue"), | |
f = t("DiffQueryBuilder"), | |
m = t("DliteLogger"), | |
g = t("DliteProfiler"), | |
_ = t("GraphQL_EXPERIMENTAL"), | |
y = t("GraphQLConstants"), | |
v = t("GraphQLMutationDataHandler"), | |
S = t("GraphQLMutationProperties"), | |
b = t("GraphQLMutatorConstants"), | |
R = t("GraphQLMutatorHub"), | |
w = t("GraphQLQueryTracker"), | |
C = t("GraphQLStatusConstants"), | |
E = t("GraphQLStoreChangeEmitter"), | |
D = t("GraphQLStoreDataHandler"), | |
T = t("GraphQLStoreNodeRangeTracker"), | |
x = t("GraphQLStoreQueryPath"), | |
P = t("GraphQLStoreReader"), | |
I = t("GraphQLStoreWriter"), | |
F = t("generateClientID"), | |
L = t("generateForceIndex"), | |
M = t("invariant"), | |
Q = t("isEmpty"), | |
A = t("keyMirror"), | |
k = t("mapObject"), | |
O = t("mixInEventEmitter"), | |
N = {}, | |
G = {}, | |
$ = {}, | |
B = {}, | |
H = {}, | |
V = {}, | |
q = {}, | |
U = new w, | |
j = new T, | |
W = y.NODE, | |
K = y.NODES, | |
z = y.VIEWER, | |
X = y.CUSTOM_ROOTCALLS, | |
Y = y.IDLESS_ROOTCALLS, | |
J = { | |
Events: A({ | |
beginQuery: !0, | |
dataFromServer: !0, | |
endQuery: !0 | |
}), | |
handleOptimisticMutation: function(e) { | |
h.appendToQueue(e), s(e) | |
}, | |
handleServerMutation: function(e, t) { | |
var n = v.getMutationType(e), | |
r = e[n].client_mutation_id, | |
i = d.getKeyForClientMutationID(r); | |
if (i) { | |
var o = d.shiftActionForKey(i); | |
o.getClientMutationID() !== r && M(0, "action sent to server must be first in the list for its key"); | |
var l = d.getFirstActionForKey(i); | |
l && l.rerunServerAction() | |
} | |
var u = h.getActionByID(r); | |
u && (h.removeFromQueue(r), c(), h.iterateOverQueue(s)), a(e, t, b.SERVER_UPDATE), delete G[r] | |
}, | |
handleMutationRollback: function(e) { | |
var t = h.getActionByID(e); | |
t && h.removeFromQueue(e), p(e), c(E.broadcastChangeForID), h.iterateOverQueue(s) | |
}, | |
handleMutationError: function(e) { | |
p(e), c(), h.iterateOverQueue(s) | |
}, | |
setRangeAddErrorStatus: function(e) { | |
var t = v.getMutationType(e); | |
e = e[t]; | |
var n = R.getConfigs(t); | |
n.some(function(e) { | |
return e.handlerType === b.RANGE_ADD_HANDLER | |
}) || M(0, "GraphQLStore.setRangeAddErrorStatus expects a range-add payload"); | |
var r = e.client_mutation_id, | |
i = N[r]; | |
l(i, C.ERROR), $[i] = r, G[r] = i | |
}, | |
handleMutationRetry: function(e) { | |
var t = $[e]; | |
t || M(0, "Can only retry mutations that encountered errors"); | |
var n = h.getActionByID(t); | |
n || M(0, "Cannot retry a mutation that has not previously been tried"), delete $[e], u(e), n.rerunServerAction() | |
}, | |
handleUpdate: function(e, t, n, r) { | |
t = t.getQuery(); | |
var i, a = m.logClientEvent("GraphQLStore.handleUpdate:" + t.getDescription()), | |
s = t.rootCall().getName(); | |
if (s === z) i = o(n, r), i.storeNodeWithID(t, e.viewer, y.VIEWER_CLIENT_ID, new x(t)); | |
else { | |
if (!(s === W || s === K || s in X)) throw new Error("Unsupported graphQL root call: use viewer, username, group, node, or nodes"); | |
for (var l in e) { | |
i = o(n, r); | |
var u = e[l]; | |
if (null === u) i.deleteNodeWithID(l); | |
else { | |
var c = l; | |
if (s !== K && s !== W) { | |
var p = t.rootCall().getArgs(); | |
if (1 !== p.length) throw new Error("Custom root calls must request with only one argument"); | |
var d = p[0].getCallValue(); | |
if (q[s] = q[s] || {}, c = q[s][d], !c) { | |
if (c = s in Y ? F() : u.id, !c) throw new Error("Root calls that has an id field must request for id"); | |
q[s][d] = c | |
} | |
} | |
var h = new x(s === K ? new _.Query("node", [c]) : t); | |
i.storeNodeWithID(t, u, c, h) | |
} | |
} | |
} | |
a.stop() | |
}, | |
buildFragmentQueryForDataID: function(e, t) { | |
if (D.isClientID(t)) { | |
var n = H[t] || V[t]; | |
return n.__path__.getQueryForFragment(e) | |
} | |
return new x(new _.Query("node", [t])).getQueryForFragment(e) | |
}, | |
resolveQueryFromStore: function(e) { | |
var t = J.getIDsFromQuery(e), | |
n = {}; | |
for (var r in t) { | |
var i = J.getDeepNodeByID(t[r], e.getQuery()); | |
void 0 !== i && (n[r] = i) | |
} | |
return n | |
}, | |
canResolveQueriesFromStore: function(e) { | |
for (var t in e) | |
if (e.hasOwnProperty(t) && e[t] && J.getDiffQueries(e[t]).length) return !1; | |
return !0 | |
}, | |
getDiffQueries: function(e) { | |
var t = new f(H, U); | |
return t.getDiffQueries(e, J.getIDsFromQuery(e)) | |
}, | |
resolvePointersForQuery: function(e) { | |
return k(J.getIDsFromQuery(e), D.createPointerWithID) | |
}, | |
injectCachingConfig: function(e) { | |
B = e | |
}, | |
isValidNodeID: function(e) { | |
return H.hasOwnProperty(e) || V.hasOwnProperty(e) | |
}, | |
isQueuedNodeID: function(e) { | |
return V.hasOwnProperty(e) | |
}, | |
getDeepNodeFromData: function(e, t, n, r) { | |
var i = new P(H, V, n); | |
return i.retrieveData(e, t, r) | |
}, | |
getDeepNodeByID: function(e, t, n) { | |
return J.getDeepNodeFromData(t, D.createPointerWithID(e), n) | |
}, | |
__debug: { | |
nodeData: H, | |
queuedData: V | |
}, | |
getTrackedQueryByID: function(e) { | |
return Array.isArray(e) || (e = [e]), U.getQueryForIDs(e) | |
}, | |
getIDsFromQuery: function(e) { | |
e = e.getQuery(); | |
var t = {}, | |
n = e.rootCall(), | |
r = n.getName(); | |
if (r === z) t.viewer = y.VIEWER_CLIENT_ID; | |
else if (r === W || r === K || r in X) | |
for (var i = n.getArgs(), o = 0; o < i.length; o++) | |
if (!(i[o] instanceof _.BatchCallVariable)) { | |
var a = i[o].getCallValue(); | |
q[r] && q[r][a] && (a = q[r][a]), t[i[o].getCallValue()] = a | |
} | |
return Q(t) && M(0, "Unsupported graphQL root call: use viewer, username, group, node, or nodes"), t | |
} | |
}; | |
g.instrumentMethods(J, { | |
handleUpdate: "GraphQLStore.handleUpdate", | |
getDiffQueries: "GraphQLStore.getDiffQueries", | |
resolveQueryFromStore: "GraphQLStore.resolveQueryFromStore" | |
}), O(J, J.Events), i.exports = J | |
}), __d("ActionCollisionMap", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = {}, | |
s = {}, | |
l = { | |
hasPendingActionForKey: function(e) { | |
return !(!a[e] || !a[e].length) | |
}, | |
appendActionForKey: function(e, t) { | |
var n = t.getClientMutationID(); | |
l.existsInMap(n) && o(0, "Cannot append an action that's already in the map"), s[n] = e; | |
var r = a[e] || []; | |
r.push(t), a[e] = r | |
}, | |
getFirstActionForKey: function(e) { | |
var t = a[e]; | |
return t && t.length ? t[0] : null | |
}, | |
shiftActionForKey: function(e) { | |
var t = a[e]; | |
t && t.length || o(0, "Cannot shift unless there are actions"); | |
var n = t.shift(); | |
return 0 === t.length && delete a[e], delete s[n.getClientMutationID()], n | |
}, | |
iterateOverActionsForKey: function(e, t) { | |
var n = a[e] || []; | |
n.forEach(t) | |
}, | |
clearActionsForKey: function(e) { | |
for (var t = a[e] || [], n = 0; n < t.length; n++) delete s[t[n].getClientMutationID()]; | |
delete a[e] | |
}, | |
getKeyForClientMutationID: function(e) { | |
return s[e] || null | |
}, | |
existsInMap: function(e) { | |
return !!l.getKeyForClientMutationID(e) | |
} | |
}; | |
i.exports = l | |
}), __d("ActionQueue", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = [], | |
s = {}, | |
l = { | |
appendToQueue: function(e) { | |
var t = e.getClientMutationID(); | |
t in s && o(0, "Cannot add an action to the queue that was already added"), a.push(t), s[t] = e | |
}, | |
removeFromQueue: function(e) { | |
e in s || o(0, "Cannot remove something not in the queue from the queue"), delete s[e]; | |
var t = a.indexOf(e); | |
t >= 0 || o(0, "clientMutationID most occur somewhere in the queue"), a.splice(t, 1) | |
}, | |
iterateOverQueue: function(e) { | |
for (var t = 0; t < a.length; t++) { | |
var n = s[a[t]]; | |
e(n) | |
} | |
}, | |
getQueueLength: function() { | |
return a.length | |
}, | |
getActionByID: function(e) { | |
return s[e] | |
} | |
}; | |
i.exports = l | |
}), __d("DiffQueryBuilder", ["DliteLog", "GraphQL_EXPERIMENTAL", "GraphQLConstants", "GraphQLRangeTracker", "GraphQLStoreDataHandler", "GraphQLStoreRangeUtils"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
this.$DiffQueryBuilder_store = e, this.$DiffQueryBuilder_queryTracker = t, this.$DiffQueryBuilder_rootFragments = null | |
} | |
var a = t("DliteLog"), | |
s = t("GraphQL_EXPERIMENTAL"), | |
l = t("GraphQLConstants"), | |
u = t("GraphQLRangeTracker"), | |
c = t("GraphQLStoreDataHandler"), | |
p = t("GraphQLStoreRangeUtils"), | |
d = [], | |
h = new s.QueryFragment("DiffQueryFragment", "UnknownConnection", [new s.Field("edges", [new s.Field("node", [new s.Field("id")])])]); | |
o.prototype.getDiffQueries = function(e, t) { | |
var n = e.getQuery(), | |
r = n.rootCall().getName(), | |
i = []; | |
for (var o in t) { | |
var a = t[o], | |
l = this.$DiffQueryBuilder_diffNode(n, a), | |
u = l.nodes; | |
null === u && (u = [n]); | |
for (var c = 0; c < u.length; c++) { | |
var p = u[c].getFragments(), | |
d = u[c].getOwnFields(), | |
h = null; | |
h = 1 === p.length && 0 === d.length ? p[0].getName() : u[c].getQueryName(), h = "diff_" + h, i.push(new s.QueryWithValues(new s.Query(r, "viewer" === r ? null : [o], d, p, null, h))) | |
} | |
} | |
if (this.$DiffQueryBuilder_rootFragments) | |
for (var f in this.$DiffQueryBuilder_rootFragments) i.push(new s.QueryWithValues(new s.Query("node", [f], null, this.$DiffQueryBuilder_rootFragments[f]))); | |
return this.$DiffQueryBuilder_rootFragments = null, i | |
}, o.prototype.$DiffQueryBuilder_diffNode = function(e, t, n) { | |
var r = null, | |
i = null, | |
o = !1, | |
p = null, | |
f = null, | |
m = null, | |
g = null, | |
_ = null, | |
y = e.getOwnFields(), | |
v = e.getFragments(), | |
S = this.$DiffQueryBuilder_store[t]; | |
if (!S) return { | |
nodes: null === S ? [] : [e], | |
trackedField: m | |
}; | |
for (var b = this.$DiffQueryBuilder_getRangeInfo(e, S), R = b.diffCalls, w = b.filterCalls, C = b.requestedEdges, E = 0; E < y.length; E++) { | |
var D = null, | |
T = null, | |
x = y[E], | |
P = x.getFieldName(); | |
if ("node" === P && n) D = d; | |
else if ("edges" === P) { | |
if (C) { | |
var I, F, L = x.getOwnField("node"), | |
M = x.getEdgesID(); | |
!M && e instanceof s.Field && a.warn("DiffQueryBuilder: `%s`'s `edges` fields does not have an `EdgesID`", e.getFieldName()); | |
for (var Q = C.length > u.THRESHOLD, A = 0; A < C.length; A++) { | |
var k = C[A], | |
O = k.__dataID__; | |
if (!M || !u.hasEdge(x, O)) { | |
var N = k.node.__dataID__; | |
if (!c.isClientID(N)) { | |
if (e.isFindable()) { | |
var G = this.$DiffQueryBuilder_diffNode(x, O, !0), | |
$ = G.nodes, | |
B = G.trackedField; | |
$ || ($ = [x]), $.length && (r = r || [], r.push(e.shallowClone($, [h], w.concat(new s.Call("find", N))))), B && (F = F || [], F.push(new s.QueryFragment("DiffQueryBuilderTrackedQuery", "UnknownConnectionEdge", B.getOwnFields(), B.getFragments()))) | |
} | |
var H = this.$DiffQueryBuilder_getFragmentForNewQuery(L, N); | |
H && (I = I || [], I.push(H)), M && Q && u.trackEdge(x, O, t) | |
} | |
} | |
}(I || F) && (T = x.shallowClone(I ? [L.shallowClone(null, I)] : null, F)) | |
} | |
D = R ? null : d | |
} else if ("page_info" === P) D = R ? null : d; | |
else { | |
var V = this.$DiffQueryBuilder_diffField(x, S); | |
D = V.fields, T = V.trackedField | |
} | |
"id" === P && (o = !!D, i = x, D = null), (p || D) && (p = p || y.slice(0, E), null === D ? p.push(x) : D.length > 0 && p.push.apply(p, D)), T && (g = g || [], g.push(T)) | |
} | |
for (var q = 0; q < v.length; q++) { | |
var U = v[q], | |
j = this.$DiffQueryBuilder_diffNode(U, t), | |
W = j.nodes, | |
K = j.trackedField; | |
(f || W) && (f = f || v.slice(0, q), null === W ? f.push(U) : W.length > 0 && f.push.apply(f, W)), K && (_ = _ || [], _.push(K)) | |
} | |
return p = p || y, f = f || v, 0 === f.length && (0 === p.length || o && 1 === p.length && p[0] === i) ? r = r || [] : p === y && f === v ? R ? (r = r || [], r.push(e.shallowClone(y, v, R))) : r && r.push(e) : (r = r || [], r.push(R ? e.shallowClone(p, f, R) : e.shallowClone(p, f))), (g || _) && (m = e.shallowClone(g, _), e instanceof s.QueryFragment || t !== l.VIEWER_CLIENT_ID && c.isClientID(t) || this.$DiffQueryBuilder_queryTracker.addQueryForID(t, m)), { | |
nodes: r, | |
trackedField: m | |
} | |
}, o.prototype.$DiffQueryBuilder_diffField = function(e, t) { | |
var n, r, i = p.getStorageKeyForField(e, {}), | |
o = t[i]; | |
if (void 0 === o) n = null; | |
else if (e.isPlural()) | |
if (null === o || 0 === o.length) n = d; | |
else if (e.hasFields()) | |
if ("node" === e.getInferredRootCallName()) n = d, r = this.$DiffQueryBuilder_getFragmentsForNewQuery(e, o); | |
else { | |
var a = o[0].__dataID__; | |
if (a && a in this.$DiffQueryBuilder_store) { | |
var s = this.$DiffQueryBuilder_diffNode(e, a); | |
n = s.nodes, r = s.trackedField | |
} | |
} else n = d; | |
else if (null !== o && e.hasFields()) { | |
var l = this.$DiffQueryBuilder_diffNode(e, o.__dataID__); | |
n = l.nodes, r = l.trackedField | |
} else n = d; | |
return { | |
fields: n, | |
trackedField: r | |
} | |
}, o.prototype.$DiffQueryBuilder_getFragmentsForNewQuery = function(e, t) { | |
for (var n = null, r = 0; r < t.length; r++) { | |
var i = t[r].__dataID__, | |
o = this.$DiffQueryBuilder_getFragmentForNewQuery(e, i); | |
o && (n = n || [], n.push(o)) | |
} | |
return n ? e.shallowClone(null, n) : null | |
}, o.prototype.$DiffQueryBuilder_getFragmentForNewQuery = function(e, t) { | |
var n = this.$DiffQueryBuilder_diffNode(e, t), | |
r = n.nodes, | |
i = n.trackedField; | |
null === r && (r = [e]); | |
for (var o, a = 0; a < r.length; a++) o = new s.QueryFragment("DiffQueryBuilder", "Node", r[a].getOwnFields(), r[a].getFragments()), this.$DiffQueryBuilder_rootFragments = this.$DiffQueryBuilder_rootFragments || {}, this.$DiffQueryBuilder_rootFragments[t] = this.$DiffQueryBuilder_rootFragments[t] || [], this.$DiffQueryBuilder_rootFragments[t].push(o); | |
if (i || o) { | |
var l; | |
return l = i && o ? i.getFragments().concat(o) : i ? i.getFragments() : [o], new s.QueryFragment("DiffQueryBuilderTrackedQuery", "Node", i ? i.getOwnFields() : null, l) | |
} | |
return null | |
}, o.prototype.$DiffQueryBuilder_getRangeInfo = function(e, t) { | |
var n, r, i; | |
if (p.isRangeNode(e)) { | |
var o = e.getCalls(); | |
if (t.__range__) { | |
var a = t.__range__.retrieveRangeInfoForQuery(o, {}); | |
i = t.__filterCalls__ || [], a.diffCalls && a.diffCalls.length && (n = i.concat(a.diffCalls)), r = a.requestedEdges | |
} else o && o.length && (n = o) | |
} | |
return { | |
diffCalls: n, | |
filterCalls: i, | |
requestedEdges: r | |
} | |
}, i.exports = o | |
}), __d("GraphQLConstants", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
CHECKIN_SEARCH_QUERY: "checkin_search_query", | |
CLIENT_SESSION: "client_session", | |
CLIENT_SESSION_ID: "client_session_id", | |
CURSOR: "cursor", | |
EDGES: "edges", | |
ENTITY_SEARCH: "entities_named", | |
GRAPH_SEARCH_QUERY: "graph_search_query", | |
GROUP: "group_address", | |
NODE: "node", | |
NODES: "nodes", | |
PAGE_INFO: "page_info", | |
STORY: "story", | |
USERNAME: "username", | |
VIEWER: "viewer", | |
CUSTOM_ROOTCALLS: {}, | |
IDLESS_ROOTCALLS: {}, | |
RANGE_CALLS: { | |
after: !0, | |
before: !0, | |
client_session: !0, | |
find: !0, | |
first: !0, | |
last: !0, | |
surrounds: !0, | |
wrapper: !0 | |
}, | |
VIEWER_CLIENT_ID: "client:viewer", | |
DUMMY_CURSOR_ID: "client:cursor" | |
}; | |
o.CUSTOM_ROOTCALLS[o.ENTITY_SEARCH] = !0, o.CUSTOM_ROOTCALLS[o.GROUP] = !0, o.CUSTOM_ROOTCALLS[o.STORY] = !0, o.CUSTOM_ROOTCALLS[o.USERNAME] = !0, o.CUSTOM_ROOTCALLS[o.CHECKIN_SEARCH_QUERY] = !0, o.CUSTOM_ROOTCALLS[o.GRAPH_SEARCH_QUERY] = !0, o.IDLESS_ROOTCALLS[o.CHECKIN_SEARCH_QUERY] = !0, i.exports = o | |
}), __d("GraphQLRangeTracker", ["DliteLog"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
return e + "." + t | |
} | |
function a(e, t) { | |
return e + "." + t | |
} | |
function s(e) { | |
l.warn("GraphQLRangeTracker can only track `edges` fields with `EdgesID` fieldName: %s inferredRootCallName: %s inferredPrimaryKey: %s isPlural: %s isConnection: %s isFindable: %s isLimitable: %s isGenerated: %s", e.getFieldName(), e.getInferredRootCallName(), e.getInferredPrimaryKey(), e.isPlural(), e.isConnection(), e.isFindable(), e.isLimitable(), e.isGenerated()) | |
} | |
var l = t("DliteLog"), | |
u = {}, | |
c = {}, | |
p = { | |
THRESHOLD: 10, | |
trackEdge: function(e, t, n) { | |
var r = e.getEdgesID(); | |
if (!r) return void s(e); | |
var i = a(r, t); | |
u[i] = e; | |
var l = o(r, n); | |
c[l] = !0 | |
}, | |
hasEdge: function(e, t) { | |
var n = e.getEdgesID(); | |
if (!n) return s(e), !1; | |
var r = a(n, t); | |
return u.hasOwnProperty(r) && u[r].equals(e) | |
}, | |
isFieldTracked: function(e, t) { | |
var n = e.getEdgesID(); | |
return n ? c.hasOwnProperty(o(n, t)) : (s(e), !1) | |
} | |
}; | |
i.exports = p | |
}), __d("GraphQLStoreDataHandler", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = {}, | |
a = { | |
__dataID__: !0, | |
__masked__: !0, | |
__range__: !0, | |
__status__: !0 | |
}, | |
s = { | |
getID: function(e) { | |
return e.__dataID__ | |
}, | |
createPointerWithID: function(e) { | |
return { | |
__dataID__: e | |
} | |
}, | |
isClientID: function(e) { | |
return "client:" === e.substring(0, 7) | |
}, | |
isClientOnlyID: function(e) { | |
return this.isClientID(e) && !o[e] | |
}, | |
updateClientServerIDMap: function(e, t) { | |
o[e] = t | |
}, | |
getServerIDForClientID: function(e) { | |
return o[e] || null | |
}, | |
isMetadataKey: function(e) { | |
return a[e] || !1 | |
} | |
}; | |
i.exports = s | |
}), __d("GraphQLStoreRangeUtils", ["GraphQL_EXPERIMENTAL", "GraphQLConstants"], function(e, t, n, r, i) { | |
var o = t("GraphQL_EXPERIMENTAL"), | |
a = t("GraphQLConstants"), | |
s = {}, | |
l = { | |
isRangeClientID: function(e) { | |
return !!s[e] | |
}, | |
getClientIDForRangeWithID: function(e, t, n) { | |
var r = e.getCalls().map(function(e) { | |
return e.toString(t) | |
}).join(","), | |
i = n + "_" + r, | |
o = s[i]; | |
return o || (s[i] = { | |
dataID: n, | |
calls: e.getCalls(), | |
callValues: t | |
}), i | |
}, | |
parseRangeClientID: function(e) { | |
return s[e] || null | |
}, | |
isRangeNode: function(e) { | |
if (!(e instanceof o.Field && e.isLimitable())) return !1; | |
if (e.hasUnaliasedField(a.EDGES) || e.hasUnaliasedField(a.PAGE_INFO)) return !0; | |
var t = e.getCalls(); | |
if (t.length) | |
for (var n = 0; n < t.length; n++) | |
if (t[n].getName() in a.RANGE_CALLS) return !0; | |
return !1 | |
}, | |
getStorageKeyForField: function(e, t) { | |
var n = e.getFieldName(), | |
r = e.getCalls(); | |
return r.length && (l.isRangeNode(e) && (r = l.getFilterCalls(r)), r.length && (n += "." + r.map(function(e) { | |
return e.toString(t) | |
}).join("."))), n | |
}, | |
getFilterCalls: function(e) { | |
for (var t = [], n = 0; n < e.length; n++) a.RANGE_CALLS[e[n].getName()] || t.push(e[n]); | |
return t | |
} | |
}; | |
i.exports = l | |
}), __d("GraphQLMutationDataHandler", ["invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = { | |
getMutationType: function(e) { | |
return e && 1 === Object.keys(e).length || o(0, "malformed mutation result payload received"), Object.keys(e)[0] | |
} | |
}; | |
i.exports = a | |
}), __d("GraphQLMutationProperties", ["GraphQLMutatorConstants", "invariant", "rql"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("GraphQLMutatorConstants"), | |
a = t("invariant"), | |
s = t("rql"), | |
l = {}, | |
u = {}, | |
c = {}; | |
u.actor_subscribe = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "ActorSubscribeResponsePayload", [new e.Field("subscribee", [new e.Field("subscribers", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.actor_unsubscribe = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "ActorUnsubscribeResponsePayload", [new e.Field("unsubscribee", [new e.Field("subscribers", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.comment_create = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "CommentCreateResponsePayload", [new e.Field("feedback", [new e.Field("comments", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("top_level_comments", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("comment", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("feedback_comment_edge", [new e.Field("cursor", null, null, null, null, null, { | |
requisite: !0 | |
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
requisite: !0 | |
}), new e.Field("source", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})])]) | |
}() | |
}, c.comment_create = { | |
"": o.PREPEND | |
}, u.undirected_story_create = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "UndirectedStoryCreateResponsePayload", [new e.Field("story", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("feed_story_edge", [new e.Field("cursor", null, null, null, null, null, { | |
requisite: !0 | |
}), new e.Field("node", null, null, null, null, null, { | |
requisite: !0 | |
}), new e.Field("source")])]) | |
}() | |
}, c.undirected_story_create = { | |
"environment(tablet_site)": o.PREPEND | |
}, u.story_delete = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "StoryDeleteResponsePayload", [new e.Field("deleted_story_id")]) | |
}() | |
}, u.comment_delete = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "CommentDeleteResponsePayload", [new e.Field("feedback", [new e.Field("comments", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("top_level_comments", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.comment_edit = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "CommentEditResponsePayload", [new e.Field("comment", [new e.Field("body"), new e.Field("edit_history", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("attachments", null, null, null, null, null, { | |
plural: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.feedback_like = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FeedbackLikeResponsePayload", [new e.Field("feedback", [new e.Field("does_viewer_like"), new e.Field("likers", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("like_sentence"), new e.Field("viewer_likes_sentence"), new e.Field("viewer_does_not_like_sentence"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.feedback_unlike = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FeedbackUnlikeResponsePayload", [new e.Field("feedback", [new e.Field("does_viewer_like"), new e.Field("likers", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("like_sentence"), new e.Field("viewer_likes_sentence"), new e.Field("viewer_does_not_like_sentence"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.friend_remove = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FriendRemoveResponsePayload", [new e.Field("unfriended_user", [new e.Field("friends", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("friendship_status"), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.viewer_friend_requests_mark_all_seen = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "ViewerFriendRequestsMarkAllSeenResponsePayload", [new e.Field("viewer", [new e.Field("friending_possibilities", [new e.Field("unseen_count")], null, null, null, null, { | |
connection: !0 | |
})])]) | |
}() | |
}, u.friend_request_accept = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FriendRequestAcceptResponsePayload", [new e.Field("viewer", [new e.Field("friending_possibilities", null, null, null, null, null, { | |
connection: !0 | |
})]), new e.Field("friend_requester", [new e.Field("friends", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("friendship_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.friend_request_cancel = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FriendRequestCancelResponsePayload", [new e.Field("cancelled_friend_requestee", [new e.Field("friendship_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.friend_request_delete = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FriendRequestDeleteResponsePayload", [new e.Field("friend_requester", [new e.Field("friendship_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.friend_request_send = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FriendRequestSendResponsePayload", [new e.Field("friend_requestees", [new e.Field("friendship_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
plural: !0 | |
})]) | |
}() | |
}, u.group_request_to_join = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "GroupRequestToJoinResponsePayload", [new e.Field("group", [new e.Field("group_members", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("viewer_join_state"), new e.Field("viewer_subscription_level"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.group_leave = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "GroupLeaveResponsePayload", [new e.Field("group", [new e.Field("group_members", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("viewer_join_state"), new e.Field("viewer_subscription_level"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.viewer_messages_mark_all_seen = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "ViewerMessagesMarkAllSeenResponsePayload", [new e.Field("viewer", [new e.Field("message_threads", [new e.Field("unseen_count")], null, null, null, null, { | |
connection: !0 | |
})])]) | |
}() | |
}, u.message_thread_update_read_state = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "MessageThreadUpdateReadStateResponsePayload", [new e.Field("thread", [new e.Field("messages", [new e.Field("unread_count")], null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("viewer", [new e.Field("message_threads", [new e.Field("unseen_count")], null, null, null, null, { | |
connection: !0 | |
})])]) | |
}() | |
}, u.notification_story_mark_read = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "NotificationStoryMarkReadResponsePayload", [new e.Field("story", [new e.Field("seen_state"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.viewer_notifications_update_all_seen_state = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "ViewerNotificationsUpdateAllSeenStateResponsePayload", [new e.Field("viewer", [new e.Field("notification_stories", [new e.Field("unseen_count")], null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
})]), new e.Field("stories", [new e.Field("seen_state"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
plural: !0 | |
})]) | |
}() | |
}, u.feedback_subscribe = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FeedbackSubscribeResponsePayload", [new e.Field("feedback", [new e.Field("can_viewer_subscribe"), new e.Field("is_viewer_subscribed"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.feedback_unsubscribe = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "FeedbackUnsubscribeResponsePayload", [new e.Field("feedback", [new e.Field("can_viewer_subscribe"), new e.Field("is_viewer_subscribed"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.message_send = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "MessageSendResponsePayload", [new e.Field("thread", [new e.Field("messages", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("message", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("thread_message_edge", [new e.Field("cursor", null, null, null, null, null, { | |
requisite: !0 | |
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
requisite: !0 | |
}), new e.Field("source", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})])]) | |
}() | |
}, c.message_send = { | |
"": o.APPEND | |
}, c.instagram_business_invite = { | |
"": o.PREPEND | |
}, c.instagram_user_role_create = { | |
"": o.PREPEND | |
}, c.instagram_ad_account_group_role_create = { | |
"": o.PREPEND | |
}, u.page_like = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "PageLikeResponsePayload", [new e.Field("page", [new e.Field("does_viewer_like"), new e.Field("page_likers", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.page_unlike = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "PageUnlikeResponsePayload", [new e.Field("page", [new e.Field("does_viewer_like"), new e.Field("page_likers", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.event_rsvp = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "EventRsvpResponsePayload", [new e.Field("event", [new e.Field("can_view_members"), new e.Field("can_viewer_invite"), new e.Field("can_viewer_join"), new e.Field("can_viewer_post"), new e.Field("can_viewer_share"), new e.Field("event_declines", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("event_decline_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("event_invitees", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("event_maybes", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("event_members", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("event_viewer_capability"), new e.Field("viewer_guest_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.event_invite = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "EventInviteResponsePayload", [new e.Field("event", [new e.Field("event_invitees", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("invitee_candidates", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.event_remove = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "EventRemoveResponsePayload", [new e.Field("event", [new e.Field("can_view_members"), new e.Field("can_viewer_invite"), new e.Field("can_viewer_join"), new e.Field("can_viewer_post"), new e.Field("can_viewer_share"), new e.Field("event_declines", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("event_decline_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("event_invitees", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("event_maybes", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("event_members", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("event_viewer_capability"), new e.Field("viewer_guest_status"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.story_take_negative_action = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "StoryTakeNegativeActionResponsePayload", [new e.Field("negative_feedback_action", [new e.Field("already_completed"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.story_undo_negative_action = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "StoryUndoNegativeActionResponsePayload", [new e.Field("negative_feedback_action", [new e.Field("already_completed"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_account_select_mobile_preference = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAccountSelectMobilePreferenceResponsePayload", [new e.Field("viewer", [new e.Field("ad_accounts", null, null, null, null, null, { | |
connection: !0 | |
})])]) | |
}() | |
}, u.ad_campaign_pause = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdCampaignPauseResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("ad_campaign", [new e.Field("run_status_info"), new e.Field("adgroups", [new e.Field("edges", [new e.Field("node", [new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
requisite: !0 | |
}), new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
plural: !0 | |
}), new e.Field("page_info", [new e.Field("has_next_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("has_previous_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_campaign_activate = u.ad_campaign_pause, u.ad_campaign_group_pause = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdCampaignGroupPauseResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("run_status_info"), new e.Field("ad_campaigns", [new e.Field("edges", [new e.Field("node", [new e.Field("run_status_info"), new e.Field("adgroups", [new e.Field("edges", [new e.Field("node", [new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
requisite: !0 | |
}), new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
plural: !0 | |
}), new e.Field("page_info", [new e.Field("has_next_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("has_previous_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
requisite: !0 | |
}), new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
plural: !0 | |
}), new e.Field("page_info", [new e.Field("has_next_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("has_previous_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_campaign_group_activate = u.ad_campaign_group_pause, u.ad_campaign_group_edit = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdCampaignGroupEditResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("name"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.adgroup_pause = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdgroupPauseResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("ad_campaign", [new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("adgroup", [new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.adgroup_activate = u.adgroup_pause, u.adgroup_edit = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdgroupEditResponsePayload", [new e.Field("adgroup", [new e.Field("name"), new e.Field("preview_image"), new e.Field("creative", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("ad_campaign", [new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("ad_campaign_group", [new e.Field("run_status_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_account_edit_spend_limit = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAccountEditSpendLimitResponsePayload", [new e.Field("ad_account", [new e.Field("spend_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_account_remove_spend_limit = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAccountRemoveSpendLimitResponsePayload", [new e.Field("ad_account", [new e.Field("spend_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_account_reset_spend_limit = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAccountResetSpendLimitResponsePayload", [new e.Field("ad_account", [new e.Field("spend_info"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_account_notifications_update_seen_state = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAccountNotificationsUpdateSeenStateResponsePayload", [new e.Field("ad_account", [new e.Field("adalerts_and_tips", [new e.Field("unseen_count")], null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("stories", [new e.Field("seen_state"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
plural: !0 | |
})]) | |
}() | |
}, u.ad_audience_create = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAudienceCreateResponsePayload", [new e.Field("ad_account_ad_audiences_edge", [new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
generated: !0, | |
requisite: !0 | |
})])]) | |
}() | |
}, c.ad_audience_create = { | |
"": o.PREPEND, | |
"orderby(last_updated)": o.PREPEND | |
}, u.ad_audience_edit = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAudienceEditResponsePayload", [new e.Field("ad_audience", [new e.Field("name"), new e.Field("target_spec"), new e.Field("updated"), new e.Field("reach_estimate"), new e.Field("targeting_sentences", null, null, null, null, null, { | |
plural: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_campaign_edit = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdCampaignEditResponsePayload", [new e.Field("ad_campaign", [new e.Field("name"), new e.Field("run_status_info"), new e.Field("daily_budget"), new e.Field("lifetime_budget"), new e.Field("lifetime_target_spend"), new e.Field("time_range"), new e.Field("today_target_spend"), new e.Field("target_spec"), new e.Field("adgroups", [new e.Field("edges", [new e.Field("node", [new e.Field("run_status_info"), new e.Field("lifetime_target_spend"), new e.Field("today_target_spend"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
requisite: !0 | |
}), new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
plural: !0 | |
}), new e.Field("page_info", [new e.Field("has_next_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("has_previous_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("ad_campaign_group", [new e.Field("run_status_info"), new e.Field("lifetime_target_spend"), new e.Field("today_target_spend"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_campaign_group_create = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdCampaignGroupCreateResponsePayload", [new e.Field("ad_account_ad_campaign_groups_edge", [new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
generated: !0, | |
requisite: !0 | |
})]), new e.Field("ad_account", [new e.Field("currency"), new e.Field("timezone_info"), new e.Field("can_update_currency"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, c.ad_campaign_group_create = { | |
"orderby(ad_activity_status,reverse_start_time).for_run_status(ALL_NOT_ARCHIVED_OR_DELETED)": o.PREPEND | |
}, u.ad_account_enable_notification = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAccountEnableNotificationResponsePayload", [new e.Field("ad_account", [new e.Field("notification_settings", [new e.Field("settings", [new e.Field("enabled")], null, null, null, null, { | |
plural: !0 | |
})]), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_account_disable_notification = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAccountDisableNotificationResponsePayload", [new e.Field("ad_account", [new e.Field("notification_settings", [new e.Field("settings", [new e.Field("enabled")], null, null, null, null, { | |
plural: !0 | |
})]), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.ad_account_mute_notifications = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "AdAccountMuteNotificationsResponsePayload", [new e.Field("ad_account", [new e.Field("notification_settings", [new e.Field("muted_until")]), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.instagram_business_invite = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramBusinessInviteResponsePayload", [new e.Field("instagram_business_role_set_edge", [new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
generated: !0, | |
requisite: !0 | |
})])]) | |
}() | |
}, u.instagram_user_role_update = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramUserRoleUpdateResponsePayload", [new e.Field("instagram_user_role", [new e.Field("user_permission_role"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.instagram_user_role_create = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramUserRoleCreateResponsePayload", [new e.Field("instagram_role_set_instagram_user_role", [new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
generated: !0, | |
requisite: !0 | |
})])]) | |
}() | |
}, u.instagram_user_role_delete = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramUserRoleDeleteResponsePayload", [new e.Field("instagram_role_set", [new e.Field("instagram_user_roles", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.instagram_role_set_update = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramRoleSetUpdateResponsePayload", [new e.Field("instagram_role_set", [new e.Field("permission_role"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.instagram_role_set_delete = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramRoleSetDeleteResponsePayload", [new e.Field("instagram_business", [new e.Field("role_sets", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("instagram_users", [new e.Field("edges", [new e.Field("node", [new e.Field("assigned_user_roles", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
requisite: !0 | |
}), new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
plural: !0 | |
}), new e.Field("page_info", [new e.Field("has_next_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("has_previous_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.instagram_ad_account_group_role_create = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramAdAccountGroupRoleCreateResponsePayload", [new e.Field("instagram_role_set_ad_account_group_role_edge", [new e.Field("cursor", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
generated: !0, | |
requisite: !0 | |
})])]) | |
}() | |
}, u.instagram_ad_account_group_role_update = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramAdAccountGroupRoleUpdateResponsePayload", [new e.Field("instagram_ad_account_group_role", [new e.Field("ad_account_group_permission_role"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.instagram_ad_account_group_role_delete = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "InstagramAdAccountGroupRoleDeleteResponsePayload", [new e.Field("instagram_role_set", [new e.Field("ad_account_group_roles", null, null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.group_pin_story = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "GroupPinStoryResponsePayload", [new e.Field("group", [new e.Field("admin_aware_group", [new e.Field("group_pinned_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("group_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("group_pinned_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("group_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.group_unpin_story = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "GroupUnpinStoryResponsePayload", [new e.Field("group", [new e.Field("admin_aware_group", [new e.Field("group_pinned_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("group_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new e.Field("group_pinned_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("group_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.group_block = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "GroupBlockResponsePayload", [new e.Field("group", [new e.Field("group_stories", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("group_members", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.group_remove_member = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "GroupRemoveMemberResponsePayload", [new e.Field("group", [new e.Field("group_members", null, null, null, null, null, { | |
connection: !0 | |
}), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.support_dashboard_item_mark_as_read = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "SupportDashboardItemMarkAsReadResponsePayload", [new e.Field("support_dashboard_item", [new e.Field("is_unread"), new e.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})]) | |
}() | |
}, u.support_dashboard_item_delete = function() { | |
return function() { | |
var e = s.__GraphQL; | |
return new e.QueryFragment("GraphQLMutationProperties_f0", "SupportDashboardItemDeleteResponsePayload", [new e.Field("deleted_support_dashboard_item_id")]) | |
}() | |
}; | |
var p = { | |
getFatQueryForType: function(e) { | |
if (e in u || a(0, "Must have a fat query for the mutation type %s. Please see https://our.intern.facebook.com/intern/dex/graphql-mutations/mutations-in-dlite/.", e), !(e in l)) { | |
var t = u[e]; | |
l[e] = t() | |
} | |
return l[e] | |
}, | |
getRangeConfigForType: function(e) { | |
var t = c[e]; | |
if (!t) return {}; | |
for (var n in t) t[n] !== o.PREPEND && t[n] !== o.APPEND && a(0, "range config must map to either GraphQLMutatorConstants.APPEND/PREPEND"); | |
return t | |
}, | |
__getAllRangeConfigs: function() { | |
return c | |
}, | |
setTemporaryFatQueryFactoryForType: function(e, t) { | |
(u[e] || l[e]) && a(0, "Cannot set temporary fat query for mutation type %s which already has a fat query.", e), u[e] = t | |
}, | |
setTemporaryRangeConfigForType: function(e, t) { | |
c[e] && a(0, "Cannot set temporary range config for mutation type %s which already has a range config.", e); | |
for (var n in t) t[n] !== o.PREPEND && t[n] !== o.APPEND && a(0, "range config must map to either GraphQLMutatorConstants.APPEND/PREPEND"); | |
c[e] = t | |
} | |
}; | |
i.exports = p | |
}), __d("GraphQLMutatorConstants", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
APPEND: "append", | |
PREPEND: "prepend", | |
REMOVE: "remove", | |
NODE_DELETE_HANDLER: "node_delete", | |
RANGE_ADD_HANDLER: "range_add", | |
RANGE_DELETE_HANDLER: "range_delete", | |
HANDLER_TYPES: {}, | |
OPTIMISTIC_UPDATE: "optimistic", | |
SERVER_UPDATE: "server", | |
POLLER_UPDATE: "poller", | |
UPDATE_TYPES: {}, | |
RANGE_OPERATIONS: {} | |
}; | |
o.HANDLER_TYPES[o.NODE_DELETE_HANDLER] = !0, o.HANDLER_TYPES[o.RANGE_ADD_HANDLER] = !0, o.HANDLER_TYPES[o.RANGE_DELETE_HANDLER] = !0, o.UPDATE_TYPES[o.OPTIMISTIC_UPDATE] = !0, o.UPDATE_TYPES[o.SERVER_UPDATE] = !0, o.UPDATE_TYPES[o.POLLER_UPDATE] = !0, o.RANGE_OPERATIONS[o.APPEND] = !0, o.RANGE_OPERATIONS[o.PREPEND] = !0, o.RANGE_OPERATIONS[o.REMOVE] = !0, i.exports = o | |
}), __d("rql", ["GraphQL_EXPERIMENTAL"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
throw new Error("rql transform failure!") | |
} | |
var a = t("GraphQL_EXPERIMENTAL"); | |
o.__GraphQL = a, o.__var = o.__frag = function(e) { | |
return e | |
}, i.exports = o | |
}), __d("GraphQLMutatorHub", ["GraphQLMutatorConstants", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
"string" != typeof e.deletedIDFieldName && c(0, "Node delete mutation config must have valid types on register") | |
} | |
function a(e) { | |
(e.sourceID && "string" != typeof e.sourceID || "string" != typeof e.connectionName || "string" != typeof e.edgeName) && c(0, "Range add mutation config must have valid types on register") | |
} | |
function s(e) { | |
Array.isArray(e.pathToConnection) && e.pathToConnection.length >= 2 && "string" == typeof e.deletedIDFieldName || c(0, "Range delete mutation config must have valid types on register") | |
} | |
function l(e, t, n) { | |
t in u.HANDLER_TYPES || c(0, "Cannot register invalid handler type"), void 0 === p[e] && (p[e] = []), p[e].push({ | |
handlerType: t, | |
config: n | |
}) | |
} | |
var u = t("GraphQLMutatorConstants"), | |
c = t("invariant"), | |
p = {}, | |
d = { | |
registerForRangeAddMutationType: function(e, t) { | |
a(t), l(e, u.RANGE_ADD_HANDLER, t) | |
}, | |
registerForRangeDeleteMutationType: function(e, t) { | |
s(t), l(e, u.RANGE_DELETE_HANDLER, t) | |
}, | |
registerForNodeDeleteMutationType: function(e, t) { | |
o(t), l(e, u.NODE_DELETE_HANDLER, t) | |
}, | |
getConfigs: function(e) { | |
return p[e] ? p[e] : [] | |
} | |
}; | |
i.exports = d | |
}), __d("GraphQLQueryTracker", ["GraphQL_EXPERIMENTAL", "GraphQLConstants", "GraphQLStoreDataHandler"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.$GraphQLQueryTracker_trackedQueriesByID = {} | |
} | |
function a(e, t) { | |
return new l.Field("tracked_field", e, t) | |
} | |
function s(e) { | |
return new l.QueryFragment("FakeTrackedFragment", "FakeNode", e.getOwnFields(), e.getFragments()) | |
} | |
var l = t("GraphQL_EXPERIMENTAL"), | |
u = t("GraphQLConstants"), | |
c = t("GraphQLStoreDataHandler"); | |
o.prototype.addQueryForID = function(e, t) { | |
if (e === u.VIEWER_CLIENT_ID || !c.isClientID(e)) { | |
var n = this.$GraphQLQueryTracker_trackedQueriesByID; | |
if (n.hasOwnProperty(e)) { | |
if (t.getFieldName && "__type__" === t.getFieldName()) return | |
} else n[e] = []; | |
n[e].push(t) | |
} | |
}, o.prototype.getQueryForIDs = function(e) { | |
for (var t = null, n = this.$GraphQLQueryTracker_trackedQueriesByID, r = 0; r < e.length; r++) { | |
var i = e[r]; | |
if (n.hasOwnProperty(i)) { | |
t = t || []; | |
for (var o = n[i], l = 0; l < o.length; l++) t.push(s(o[l])) | |
} | |
} | |
return t ? a(null, t) : null | |
}, i.exports = o | |
}), __d("GraphQLStatusConstants", ["keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("keyMirror"), | |
a = o({ | |
ERROR: null | |
}); | |
i.exports = a | |
}), __d("GraphQLStoreChangeEmitter", ["DliteProfiler", "ErrorUtils", "GraphQLStoreRangeUtils", "setImmediate"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
m(a), f = null | |
} | |
function a() { | |
h.forEach(s) | |
} | |
function s(e, t) { | |
var n = e.subscribedIDs, | |
r = e.callback; | |
if (f) | |
for (var i in f) | |
if (f.hasOwnProperty(i)) { | |
var o = f[i]; | |
if (t > o) break; | |
if (n.indexOf(i) >= 0) { | |
c.applyWithGuard(r, null, null, null, "GraphQLStoreChangeEmitter"); | |
break | |
} | |
} | |
} | |
function l(e) { | |
var t = p.parseRangeClientID(e); | |
return t ? t.dataID : e | |
} | |
var u = t("DliteProfiler"), | |
c = t("ErrorUtils"), | |
p = t("GraphQLStoreRangeUtils"), | |
d = t("setImmediate"), | |
h = [], | |
f = null, | |
m = function(e) { | |
return e() | |
}, | |
g = { | |
addListenerForIDs: function(e, t) { | |
var n = e.map(l), | |
r = h.length; | |
return h.push({ | |
subscribedIDs: n, | |
callback: t | |
}), { | |
remove: function() { | |
delete h[r] | |
} | |
} | |
}, | |
broadcastChangeForID: function(e) { | |
null === f && (d(o), f = {}), f[l(e)] = h.length - 1 | |
}, | |
injectBatchingStrategy: function(e) { | |
m = e | |
}, | |
_processSubscribers: a | |
}; | |
u.instrumentMethods(g, { | |
addListenerForIDs: "GraphQLStoreChangeEmitter.addListenerForIDs", | |
broadcastChangeForID: "GraphQLStoreChangeEmitter.broadcastChangeForID", | |
_processSubscribers: "GraphQLStoreChangeEmitter.processSubscribers" | |
}), i.exports = g | |
}), __d("GraphQLStoreNodeRangeTracker", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID = {} | |
} | |
var a = Object.freeze([]); | |
o.prototype.addRangeIDForNodeID = function(e, t) { | |
this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[t] = this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[t] || {}, this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[t][e] = !0 | |
}, o.prototype.getRangeIDsForNodeID = function(e) { | |
var t = this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[e]; | |
return t ? Object.keys(t) : a | |
}, o.prototype.clearRangeIDsForNodeID = function(e) { | |
var t = this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[e]; | |
t && delete this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[e] | |
}, i.exports = o | |
}), __d("GraphQLStoreQueryPath", ["GraphQL_EXPERIMENTAL", "GraphQLConstants", "GraphQLStoreDataHandler", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
this.$GraphQLStoreQueryPath_root = e, this.$GraphQLStoreQueryPath_fields = [] | |
} | |
var a = t("GraphQL_EXPERIMENTAL"), | |
s = t("GraphQLConstants"), | |
l = t("GraphQLStoreDataHandler"), | |
u = t("invariant"); | |
o.prunePathForDataID = function(e, t) { | |
return t && 1 === t.getLength() ? t : e === s.VIEWER_CLIENT_ID ? new o(new a.Query("viewer")) : l.isClientID(e) ? (t || u(0, "Cannot prune a path to a client ID without a current path"), t) : new o(new a.Query("node", [e])) | |
}, o.prototype.withField = function(e, t) { | |
var n = this.$GraphQLStoreQueryPath_fields[this.$GraphQLStoreQueryPath_fields.length - 1]; | |
this.pushField(e); | |
var r = t(); | |
return this.popField(), this.$GraphQLStoreQueryPath_fields[this.$GraphQLStoreQueryPath_fields.length - 1] !== n && u(0, "Popped unexpected field from currentPath"), r | |
}, o.prototype.pushField = function(e) { | |
return this.$GraphQLStoreQueryPath_fields.push(e), this | |
}, o.prototype.popField = function() { | |
this.$GraphQLStoreQueryPath_fields.length > 0 || u(0, "No fields to pop!"), this.$GraphQLStoreQueryPath_fields.pop() | |
}, o.prototype.getLength = function() { | |
return this.$GraphQLStoreQueryPath_fields.length + 1 | |
}, o.prototype.clone = function() { | |
for (var e = new o(this.$GraphQLStoreQueryPath_root), t = 0; t < this.$GraphQLStoreQueryPath_fields.length; t++) e.pushField(this.$GraphQLStoreQueryPath_fields[t]); | |
return e | |
}, o.prototype.getQueryForFragment = function(e) { | |
var t = this.$GraphQLStoreQueryPath_fields; | |
if (0 === t.length) return new a.QueryWithValues(this.$GraphQLStoreQueryPath_root.shallowClone(this.$GraphQLStoreQueryPath_root.getOwnUnaliasedFields("id"), [e])); | |
var n = t[t.length - 1], | |
r = n.getInferredPrimaryKey(); | |
n = r ? n.shallowClone(n.getOwnUnaliasedFields(r), [e]) : n.shallowClone(null, [e]); | |
for (var i = t.length - 2; i >= 0; i--) { | |
var o = t[i]; | |
r = o.getInferredPrimaryKey(), n = o.shallowClone(r ? o.getOwnUnaliasedFields(r).concat(n) : [n]) | |
} | |
return new a.QueryWithValues(this.$GraphQLStoreQueryPath_root.shallowClone(this.$GraphQLStoreQueryPath_root.getOwnUnaliasedFields("id").concat(n))) | |
}, o.prototype.getJSONPath = function() { | |
for (var e = ["$", "*"], t = 0; t < this.$GraphQLStoreQueryPath_fields.length; t++) { | |
var n = this.$GraphQLStoreQueryPath_fields[t], | |
r = n.getAlias() || n.getFieldName(); | |
e.push(r), n.isPlural() && e.push("*") | |
} | |
return e.join(".") | |
}, o.prototype.toJSON = function() { | |
return [this.$GraphQLStoreQueryPath_root.shallowClone(), this.$GraphQLStoreQueryPath_fields.map(function(e) { | |
return e.shallowClone() | |
})] | |
}, o.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = new o(a.Query.fromJSON(n)); | |
return i.$GraphQLStoreQueryPath_fields = r.map(a.Field.fromJSON), i | |
}, i.exports = o | |
}), __d("GraphQLStoreReader", ["DliteLog", "DliteProfiler", "GraphQLConstants", "GraphQLRange", "GraphQLStoreDataHandler", "GraphQLStoreRangeUtils", "emptyFunction", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
this.$GraphQLStoreReader_store = e, this.$GraphQLStoreReader_queuedStore = t, this.$GraphQLStoreReader_fragmentFilter = n || g.thatReturnsTrue | |
} | |
function a(e, t) { | |
var n = Object.keys(e).sort().filter(u), | |
r = Object.keys(t).sort().filter(u); | |
return n.length !== r.length ? !1 : n.every(function(n, i) { | |
return r[i] === n && s(e[n], t[n]) | |
}) | |
} | |
function s(e, t) { | |
return e === t ? !0 : Array.isArray(e) && Array.isArray(t) && e.length === t.length && e.every(function(e, n) { | |
return e === t[n] | |
}) | |
} | |
function l(e, t) { | |
for (var n = {}, r = [], i = 0; i < e.length; i++) { | |
var o = e[i]; | |
o.__dataID__ || (o = _(o), o.__dataID__ = "fakeEdge:" + i), n[o.__dataID__] = o, r.push(o) | |
} | |
var a = new h(n); | |
return a.addItems(t, {}, r, { | |
has_previous_page: !1, | |
has_next_page: !1 | |
}), a | |
} | |
function u(e) { | |
return !f.isMetadataKey(e) | |
} | |
var c = t("DliteLog"), | |
p = t("DliteProfiler"), | |
d = t("GraphQLConstants"), | |
h = t("GraphQLRange"), | |
f = t("GraphQLStoreDataHandler"), | |
m = t("GraphQLStoreRangeUtils"), | |
g = t("emptyFunction"), | |
_ = t("merge"), | |
y = d.CLIENT_SESSION_ID, | |
v = d.EDGES, | |
S = d.NODE, | |
b = d.PAGE_INFO; | |
o.prototype.retrieveData = function(e, t, n) { | |
return this.$GraphQLStoreReader_retrieveData(e, t, null, n) | |
}, o.prototype.$GraphQLStoreReader_retrieveData = function(e, t, n, r) { | |
var i, o, a, s = t.__dataID__; | |
!s && t.__masked__ && (t = t.__masked__); | |
var u = s && s in this.$GraphQLStoreReader_queuedStore ? this.$GraphQLStoreReader_queuedStore[s] : {}; | |
if (null === u) return null; | |
if (s && m.isRangeClientID(s)) { | |
var c = m.parseRangeClientID(s); | |
t = this.$GraphQLStoreReader_store[c.dataID], o = c.calls, i = !0 | |
} else i = m.isRangeNode(e), s && (t = s in this.$GraphQLStoreReader_store ? this.$GraphQLStoreReader_store[s] : this.$GraphQLStoreReader_queuedStore[s]), i && (o = e.getCalls()); | |
if (!t) return t; | |
if (i) { | |
if (0 === o.length) throw new Error("The field " + e.getFieldName() + " is a range node, and thus expected to have a first() or last() filter call."); | |
var p; | |
t.__range__ ? p = t.__range__ : !s && t[v] && (p = l(t[v], o)), p && (a = p.retrieveRangeInfoForQuery(o, {}, u)) | |
} | |
var d; | |
if (__DEV__ && (d = {}), n = this.$GraphQLStoreReader_traverseNode(e, t, u, a, n, r, d), n === r) n.__status__ !== t.__status__ && (n = Object.assign({}, n, { | |
__status__: t.__status__ | |
})); | |
else { | |
var h = s && i && !m.isRangeClientID(s); | |
n.__dataID__ = h ? m.getClientIDForRangeWithID(e, {}, s) : s, n.__masked__ = s ? void 0 : t, n.__status__ = t.__status__ | |
} | |
return n | |
}, o.prototype.$GraphQLStoreReader_traverseNode = function(e, t, n, r, i, o, s) { | |
return i = Object.assign({}, i), e.getOwnFields().forEach(function(e) { | |
__DEV__ && R(e, s); | |
var a = e.getNameForClient(), | |
l = this.$GraphQLStoreReader_retrieveSubfield(e, t, n, r, i, o); | |
void 0 !== l && (i[a] = l) | |
}.bind(this)), e.getFragments().filter(this.$GraphQLStoreReader_fragmentFilter).forEach(function(e) { | |
i = this.$GraphQLStoreReader_traverseNode(e, t, n, r, i, o, s) | |
}.bind(this)), o && a(i, o) && (i = o), i | |
}, o.prototype.$GraphQLStoreReader_retrieveSubfield = function(e, t, n, r, i, o) { | |
if (!e.isGenerated()) { | |
var a = e.getFieldName(), | |
s = e.getNameForClient(), | |
l = m.isRangeNode(e), | |
u = m.getStorageKeyForField(e, {}), | |
p = t[u], | |
d = n[u]; | |
return a === y ? r ? r.sessionID : null : a === b ? r ? this.$GraphQLStoreReader_retrieveData(e, r.pageInfo, i && i[s], o && o[s]) : void 0 : a === v && r ? this.$GraphQLStoreReader_retrieveRangeData(e, r, i && i[s], o && o[s]) : null === p ? null : void 0 === p && void 0 === d ? void(!t.__dataID__ && t.hasOwnProperty(a) && c.warn("Data source has key '%s' but GraphQLStore expected '%s'.", a, u)) : Array.isArray(p) ? this.$GraphQLStoreReader_retrieveArrayData(e, p, i && i[s], o && o[s]) : e.hasFields() ? this.$GraphQLStoreReader_retrieveData(e, p || d, i && i[s], o && o[s]) : l ? f.createPointerWithID(m.getClientIDForRangeWithID(e, {}, p.__dataID__)) : void 0 !== d ? d : p | |
} | |
}, o.prototype.$GraphQLStoreReader_retrieveArrayData = function(e, t, n, r) { | |
for (var i = [], o = 0; o < t.length; o++) { | |
var a; | |
a = t[o] && "object" == typeof t[o] ? this.$GraphQLStoreReader_retrieveData(e, t[o], n && n[o], r && r[o]) : t[o], i.push(a) | |
} | |
return s(i, r) && (i = r), i | |
}, o.prototype.$GraphQLStoreReader_retrieveRangeData = function(e, t, n, r) { | |
for (var i = t.requestedEdges, o = 0, a = [], l = 0; l < i.length; l++) { | |
var u = i[l]; | |
if (u) { | |
var p = u[S].__dataID__; | |
!p || null !== this.$GraphQLStoreReader_queuedStore[p] && (this.$GraphQLStoreReader_store[p] || this.$GraphQLStoreReader_queuedStore[p]) ? (0 === u.__dataID__.indexOf("fakeEdge:") && delete u.__dataID__, a[o] = this.$GraphQLStoreReader_retrieveData(e, u, n && n[o], r && r[o]), o++) : c.warn("dataID %s has no data, but is still referenced in range", p) | |
} else c.warn("Received a null edge from the range") | |
} | |
return s(a, r) && (a = r), a | |
}, p.instrumentMethods(o.prototype, { | |
retrieveData: "GraphQLStoreReader.retrieveData" | |
}); | |
var R; | |
__DEV__ && (R = function(e, t) { | |
var n = e.getNameForClient(), | |
r = e.getGeneratedAlias(), | |
i = t[n]; | |
i ? i !== r && console.error("`%s` is used as an alias twice. Please rename one of them.", n) : t[n] = r | |
}), i.exports = o | |
}), __d("GraphQLRange", ["DliteLog", "GraphQL_EXPERIMENTAL", "GraphQLMutatorConstants", "GraphQLSegment", "GraphQLStoreDataHandler", "invariant", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
for (var n = {}, r = 0; r < e.length; r++) { | |
var i = e[r].getName(), | |
o = e[r].getArgs(); | |
if (o.length) { | |
var a = o[0] instanceof f.CallVariable ? t[o[0].getCallVariableName()] : o[0].getCallValue(); | |
if (null === a) continue; | |
n[i] = a | |
} | |
} | |
return n.first ? (isNaN(n.first) && y(0, "Argument for first query must be a number"), n.first = +n.first) : n.last && (isNaN(n.last) && y(0, "Argument for last query must be a number"), n.last = +n.last), n.client_session && (isNaN(n.client_session) && y(0, "Argument for sessionID call must be a number"), n.client_session = +n.client_session), n | |
} | |
function a(e) { | |
return e.hasOwnProperty("surrounds") || e.hasOwnProperty("find") | |
} | |
function s(e) { | |
var t = e.hasOwnProperty("first"), | |
n = e.hasOwnProperty("last"); | |
return (t || n) && !(t && n) | |
} | |
function l(e) { | |
return e.hasOwnProperty("first") && e.first > 0 || e.hasOwnProperty("last") && e.last > 0 | |
} | |
function u(e) { | |
void 0 === _.getID(e) && y(0, "GraphQLStore: `edge` must have a data id"), void 0 === e.node && y(0, "GraphQLStore: `edge` must have `node` field") | |
} | |
function c(e) { | |
e.forEach(u) | |
} | |
function p(e) { | |
this.$GraphQLRange_dataStore = e, this.reset() | |
} | |
function d(e, t) { | |
return e.map(function(e) { | |
return e.toString(t) | |
}).join(",") | |
} | |
var h = t("DliteLog"), | |
f = t("GraphQL_EXPERIMENTAL"), | |
m = t("GraphQLMutatorConstants"), | |
g = t("GraphQLSegment"), | |
_ = t("GraphQLStoreDataHandler"), | |
y = t("invariant"), | |
v = t("merge"), | |
S = { | |
start_cursor: void 0, | |
end_cursor: void 0, | |
has_next_page: !1, | |
has_previous_page: !1 | |
}, | |
b = 1e3; | |
p.prototype.setDataStore = function(e) { | |
this.$GraphQLRange_dataStore = e | |
}, p.prototype.reset = function() { | |
this.$GraphQLRange_orderedSegments = [new g, new g], this.$GraphQLRange_staticQueriesMap = {}, this.$GraphQLRange_hasFirst = !1, this.$GraphQLRange_hasLast = !1, this.$GraphQLRange_sessionID = b | |
}, p.prototype.$GraphQLRange_resetSegment = function(e) { | |
e >= 0 && e < this.$GraphQLRange_orderedSegments.length || y(0, "cannot reset non-existent segment"), this.$GraphQLRange_orderedSegments[e] = new g(this.$GraphQLRange_orderedSegments[e].getSessionID()) | |
}, p.prototype.$GraphQLRange_getSegmentIndexByCursor = function(e) { | |
for (var t = 0; t < this.$GraphQLRange_orderedSegments.length; t++) | |
if (this.$GraphQLRange_orderedSegments[t].containsEdgeWithCursor(e)) return t; | |
return null | |
}, p.prototype.$GraphQLRange_getSegmentIndexByID = function(e) { | |
for (var t = 0; t < this.$GraphQLRange_orderedSegments.length; t++) | |
if (this.$GraphQLRange_orderedSegments[t].containsEdgeWithID(e)) return t; | |
return null | |
}, p.prototype.$GraphQLRange_addStaticEdges = function(e, t, n) { | |
for (var r = d(e, t), i = [], o = [], a = 0; a < n.length; a++) { | |
var s = n[a]; | |
i.push(_.getID(s)), o.push(s.cursor) | |
} | |
this.$GraphQLRange_staticQueriesMap[r] = { | |
edgeIDs: i, | |
cursors: o | |
} | |
}, p.prototype.addItems = function(e, t, n, r) { | |
c(n); | |
var i, l, u = o(e, t); | |
return a(u) ? void this.$GraphQLRange_addStaticEdges(e, t, n) : s(u) ? null === u.before || null === u.after ? void console.error("GraphQLRange received null as a cursor.") : (this.$GraphQLRange_sessionID++, void(u.first ? u.before && !u.after ? r.has_next_page === !0 ? (0 === this.$GraphQLRange_getSegmentIndexByCursor(u.before) && this.$GraphQLRange_orderedSegments.unshift(new g(this.$GraphQLRange_sessionID)), this.$GraphQLRange_addAfterFirstItems(n, r.has_next_page, void 0, u.before, null)) : this.$GraphQLRange_addBeforeLastItems(n, r.has_previous_page, u.before, void 0, this.$GraphQLRange_sessionID) : (u.after || (l = 0, i = this.getFirstSegment().getCount(), i && (u.first > i || n.length > i) && !this.getFirstSegment().getFirstCursor() && this.$GraphQLRange_resetSegment(l)), this.$GraphQLRange_addAfterFirstItems(n, r.has_next_page, u.after, u.before, null)) : u.last && (u.after && !u.before ? r.has_previous_page === !0 ? (this.$GraphQLRange_getSegmentIndexByCursor(u.after) === this.$GraphQLRange_orderedSegments.length - 1 && this.$GraphQLRange_orderedSegments.push(new g(this.$GraphQLRange_sessionID)), this.$GraphQLRange_addBeforeLastItems(n, r.has_previous_page, void 0, u.after, null)) : this.$GraphQLRange_addAfterFirstItems(n, r.has_next_page, u.after, void 0, this.$GraphQLRange_sessionID) : (u.before || (l = this.$GraphQLRange_orderedSegments.length - 1, i = this.getLastSegment().getCount(), i && (u.last > i || n.length > i) && !this.getLastSegment().getLastCursor() && this.$GraphQLRange_resetSegment(l)), this.$GraphQLRange_addBeforeLastItems(n, r.has_previous_page, u.before, u.after, null))))) : void console.error("GraphQLRange currently only handles first(<count>), after(<cursor>).first(<count>), last(<count>), before(<cursor>).last(<count>), before(<cursor>).first(<count>), and after(<cursor>).last(<count>)") | |
}, p.prototype.getFirstSegment = function() { | |
return this.$GraphQLRange_orderedSegments[0] | |
}, p.prototype.getLastSegment = function() { | |
return this.$GraphQLRange_orderedSegments[this.$GraphQLRange_orderedSegments.length - 1] | |
}, p.prototype.$GraphQLRange_concatSegments = function(e) { | |
e + 1 < this.$GraphQLRange_orderedSegments.length && e >= 0 || y(0, "GraphQLRange cannot concat segments outside the range of orderedSegments"); | |
var t = this.$GraphQLRange_orderedSegments[e], | |
n = this.$GraphQLRange_orderedSegments[e + 1]; | |
t.concatSegment(n) ? this.$GraphQLRange_orderedSegments.splice(e + 1, 1) : console.error("GraphQLRange was unable to concat segment %d and segment %d", e, e + 1) | |
}, p.prototype.prependEdge = function(e) { | |
u(e), this.$GraphQLRange_sessionID++, this.$GraphQLRange_hasFirst = !0; | |
var t = this.getFirstSegment(); | |
this.$GraphQLRange_removeEdgeIfApplicable(e, this.$GraphQLRange_sessionID), t.prependEdge(e, this.$GraphQLRange_sessionID) | |
}, p.prototype.appendEdge = function(e) { | |
u(e), this.$GraphQLRange_sessionID++, this.$GraphQLRange_hasLast = !0; | |
var t = this.getLastSegment(); | |
this.$GraphQLRange_removeEdgeIfApplicable(e, this.$GraphQLRange_sessionID), t.appendEdge(e, this.$GraphQLRange_sessionID) | |
}, p.prototype.$GraphQLRange_removeEdgeIfApplicable = function(e, t) { | |
var n = _.getID(e), | |
r = this.$GraphQLRange_getSegmentIndexByID(n); | |
null != r && this.$GraphQLRange_orderedSegments[r].removeEdge(n, t) | |
}, p.prototype.$GraphQLRange_removeEdgesIfApplicable = function(e, t) { | |
for (var n = 0; n < e.length; n++) this.$GraphQLRange_removeEdgeIfApplicable(e[n], t ? t : b) | |
}, p.prototype.$GraphQLRange_addAfterFirstItems = function(e, t, n, r, i) { | |
var o, a, s; | |
if (void 0 !== n) { | |
if (a = this.$GraphQLRange_getSegmentIndexByCursor(n), null == a) return void console.error("GraphQLRange cannot find a segment that has the cursor: " + n); | |
if (o = this.$GraphQLRange_orderedSegments[a], s = o.getLastCursor(), s !== n && (e = this.$GraphQLRange_reconcileAfterFirstEdges(o, e, n), n = s, !e)) return | |
} else if (a = 0, o = this.$GraphQLRange_orderedSegments[a], s = o.getLastCursor(), void 0 !== s && (e = this.$GraphQLRange_reconcileAfterFirstEdges(o, e), n = s, !e)) return; | |
if (void 0 !== r) { | |
if (a === this.$GraphQLRange_orderedSegments.length - 1) return void console.error("GraphQLRange cannot add because there is no next segment"); | |
if (this.$GraphQLRange_orderedSegments[a + 1].getFirstCursor() !== r) return void console.error("GraphQLRange cannot add because beforeCursor does not match first cursor of the next segment") | |
} | |
void 0 === n && (this.$GraphQLRange_hasFirst = !0), i = i || o.getSessionID(), this.$GraphQLRange_removeEdgesIfApplicable(e, i), o.addEdgesAfterCursor(e, n, i), t || (void 0 !== r ? this.$GraphQLRange_concatSegments(a) : (this.$GraphQLRange_hasLast = !0, this.$GraphQLRange_orderedSegments.splice(a + 1, this.$GraphQLRange_orderedSegments.length - 1 - a))) | |
}, p.prototype.$GraphQLRange_reconcileAfterFirstEdges = function(e, t, n) { | |
var r = e.getMetadataAfterCursor(t.length + 1, n), | |
i = r.edgeIDs; | |
if (i.length > t.length) return void 0; | |
for (var o = 0; o < i.length; o++) | |
if (i[o] !== _.getID(t[o])) return void h.warn("GraphQLRange cannot reconcile input because there is an id mismatch at index %s", o); | |
return t.slice(i.length) | |
}, p.prototype.$GraphQLRange_addBeforeLastItems = function(e, t, n, r, i) { | |
var o, a, s; | |
if (void 0 !== n) { | |
if (a = this.$GraphQLRange_getSegmentIndexByCursor(n), null == a) return void console.error("GraphQLRange cannot find a segment that has the cursor: " + n); | |
if (o = this.$GraphQLRange_orderedSegments[a], s = o.getFirstCursor(), s !== n && (e = this.$GraphQLRange_reconcileBeforeLastEdges(o, e, n), n = s, !e)) return | |
} else if (a = this.$GraphQLRange_orderedSegments.length - 1, o = this.$GraphQLRange_orderedSegments[a], s = o.getFirstCursor(), void 0 !== s && (e = this.$GraphQLRange_reconcileBeforeLastEdges(o, e, n), n = s, !e)) return; | |
if (void 0 !== r) { | |
if (0 === a) return void console.error("GraphQLRange cannot add because there is no previous segment"); | |
if (this.$GraphQLRange_orderedSegments[a - 1].getLastCursor() !== r) return void console.error("GraphQLRange cannot add because afterCursor does not match last cursor of the previous segment") | |
} | |
void 0 === n && (this.$GraphQLRange_hasLast = !0), i = i || o.getSessionID(), this.$GraphQLRange_removeEdgesIfApplicable(e, i), o.addEdgesBeforeCursor(e, n, i), t || (void 0 !== r ? this.$GraphQLRange_concatSegments(a - 1) : (this.$GraphQLRange_hasFirst = !0, this.$GraphQLRange_orderedSegments.splice(0, a))) | |
}, p.prototype.$GraphQLRange_reconcileBeforeLastEdges = function(e, t, n) { | |
var r = e.getMetadataBeforeCursor(t.length + 1, n), | |
i = r.edgeIDs; | |
if (i.length > t.length) return void 0; | |
for (var o = 1; o <= i.length; o++) | |
if (i[i.length - o] !== _.getID(t[t.length - o])) return void h.warn("GraphQLRange cannot reconcile input because there is an id mismatch at index %s", o); | |
return t.slice(0, t.length - i.length) | |
}, p.prototype.removeEdgeWithID = function(e) { | |
for (var t = 0; t < this.$GraphQLRange_orderedSegments.length; t++) this.$GraphQLRange_orderedSegments[t].removeAllEdges(e, b) | |
}, p.prototype.retrieveRangeInfoForQuery = function(e, t, n) { | |
var r = o(e, t); | |
return a(r) ? this.$GraphQLRange_retrieveRangeInfoForStaticCalls(e, t) : s(r) ? r.first && r.before || r.last && r.after ? (console.error("GraphQLRange does not currently handle retrieval for before(<cursor>).first(<count>) and after(<cursor>).last(<count>)"), { | |
requestedEdges: [], | |
diffCalls: [], | |
pageInfo: S, | |
sessionID: this.$GraphQLRange_sessionID | |
}) : l(r) ? r.first ? this.$GraphQLRange_retrieveRangeInfoForFirstQuery(e, t, n) : r.last ? this.$GraphQLRange_retrieveRangeInfoForLastQuery(e, t, n) : void 0 : (console.error("GraphQLRange only supports first(<count>) or last(<count>) where count is greater than 0"), { | |
requestedEdges: [], | |
diffCalls: [], | |
pageInfo: S, | |
sessionID: this.$GraphQLRange_sessionID | |
}) : (console.error("GraphQLRange currently only handles first(<count>), after(<cursor>).first(<count>), last(<count>), before(<cursor>).last(<count>), before(<cursor>).first(<count>), and after(<cursor>).last(<count>)"), { | |
requestedEdges: [], | |
diffCalls: [], | |
pageInfo: S, | |
sessionID: this.$GraphQLRange_sessionID | |
}) | |
}, p.prototype.$GraphQLRange_getEdgeByID = function(e) { | |
return this.$GraphQLRange_dataStore[e] | |
}, p.prototype.$GraphQLRange_retrieveRangeInfoForStaticCalls = function(e, t) { | |
var n = d(e, t), | |
r = this.$GraphQLRange_staticQueriesMap[n]; | |
if (r) { | |
var i = { | |
has_next_page: !0, | |
has_previous_page: !0 | |
}; | |
return i.start_cursor = r.cursors[0], i.end_cursor = r.cursors[r.cursors.length - 1], { | |
requestedEdges: r.edgeIDs.map(this.$GraphQLRange_getEdgeByID, this), | |
diffCalls: [], | |
pageInfo: i, | |
sessionID: this.$GraphQLRange_sessionID | |
} | |
} | |
return { | |
requestedEdges: [], | |
diffCalls: e, | |
pageInfo: S, | |
sessionID: this.$GraphQLRange_sessionID | |
} | |
}, p.prototype.$GraphQLRange_retrieveRangeInfoForFirstQuery = function(e, t, n) { | |
var r = [], | |
i = []; | |
n && (r = n[m.PREPEND] || [], i = n[m.REMOVE] || []); | |
var a, s, l = o(e, t), | |
u = l.first + i.length, | |
c = v(S); | |
c.sessionID = this.$GraphQLRange_sessionID; | |
var p = l.client_session ? l.client_session : null, | |
d = l.after; | |
if (void 0 !== d) { | |
if (s = this.$GraphQLRange_getSegmentIndexByCursor(d), null == s) return console.error("GraphQLRange cannot find a segment that has the cursor: " + d), { | |
requestedEdges: [], | |
diffCalls: [], | |
pageInfo: c, | |
sessionID: this.$GraphQLRange_sessionID | |
}; | |
a = this.$GraphQLRange_orderedSegments[s] | |
} else { | |
var h = r.length; | |
if (u -= h, s = 0, a = this.$GraphQLRange_orderedSegments[s], p) | |
for (; s < this.$GraphQLRange_orderedSegments.length - 1 && a.getSessionID() > p;) s++, a = this.$GraphQLRange_orderedSegments[s] | |
} | |
var g = a.getMetadataAfterCursor(u, d, p), | |
y = g.edgeIDs, | |
b = g.cursors, | |
R = []; | |
b.length && (c.start_cursor = b[0], c.end_cursor = b[b.length - 1]); | |
var w = y[y.length - 1]; | |
if ((!this.$GraphQLRange_hasLast || s !== this.$GraphQLRange_orderedSegments.length - 1 || w && w !== a.getLastID(p)) && (c.has_next_page = !0, y.length < u)) { | |
u -= y.length; | |
var C = a.getLastCursor(); | |
if (null === C) R.push(new f.Call("first", l.first)); | |
else { | |
if (void 0 !== C && R.push(new f.Call("after", C)), s !== this.$GraphQLRange_orderedSegments.length - 1) { | |
var E = this.$GraphQLRange_orderedSegments[s + 1], | |
D = E.getFirstCursor(); | |
void 0 !== D && R.push(new f.Call("before", D)) | |
} | |
R.push(new f.Call("first", u)) | |
} | |
} | |
var T = y.map(this.$GraphQLRange_getEdgeByID, this); | |
return l.after || (T = r.concat(T)), i.length && (T = T.filter(function(e) { | |
var t = _.getID(e); | |
return -1 == i.indexOf(t) | |
})), { | |
requestedEdges: T, | |
diffCalls: R, | |
pageInfo: c, | |
sessionID: this.$GraphQLRange_sessionID | |
} | |
}, p.prototype.$GraphQLRange_retrieveRangeInfoForLastQuery = function(e, t, n) { | |
var r = [], | |
i = []; | |
n && (r = n[m.APPEND] || [], i = n[m.REMOVE] || []); | |
var a, s, l = o(e, t), | |
u = l.last + i.length, | |
c = v(S); | |
c.sessionID = this.$GraphQLRange_sessionID; | |
var p = l.client_session ? l.client_session : null, | |
d = l.before; | |
if (void 0 !== d) { | |
if (s = this.$GraphQLRange_getSegmentIndexByCursor(d), null == s) return console.error("GraphQLRange cannot find a segment that has the cursor: " + d), { | |
requestedEdges: [], | |
diffCalls: [], | |
pageInfo: c, | |
sessionID: this.$GraphQLRange_sessionID | |
}; | |
a = this.$GraphQLRange_orderedSegments[s] | |
} else { | |
var h = r.length; | |
if (u -= h, s = this.$GraphQLRange_orderedSegments.length - 1, a = this.$GraphQLRange_orderedSegments[s], p) | |
for (; s > 0 && a.getSessionID() > p;) s--, a = this.$GraphQLRange_orderedSegments[s] | |
} | |
var g = a.getMetadataBeforeCursor(u, d, p), | |
y = g.edgeIDs, | |
b = g.cursors, | |
R = []; | |
b.length && (c.start_cursor = b[0], c.end_cursor = b[b.length - 1]); | |
var w = y[0]; | |
if ((!this.$GraphQLRange_hasFirst || 0 !== s || w && w !== a.getFirstID(p)) && (c.has_previous_page = !0, y.length < u)) { | |
u -= y.length; | |
var C = a.getFirstCursor(); | |
if (null === C) R.push(new f.Call("last", l.last)); | |
else { | |
if (void 0 !== C && R.push(new f.Call("before", C)), 0 !== s) { | |
var E = this.$GraphQLRange_orderedSegments[s - 1], | |
D = E.getLastCursor(); | |
void 0 !== D && R.push(new f.Call("after", D)) | |
} | |
R.push(new f.Call("last", u)) | |
} | |
} | |
var T = y.map(this.$GraphQLRange_getEdgeByID, this); | |
return l.before || (T = T.concat(r)), i.length && (T = T.filter(function(e) { | |
var t = _.getID(e); | |
return -1 == i.indexOf(t) | |
})), { | |
requestedEdges: T, | |
diffCalls: R, | |
pageInfo: c, | |
sessionID: this.$GraphQLRange_sessionID | |
} | |
}, p.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2], | |
o = t[3], | |
a = t[4], | |
s = new p; | |
return s.$GraphQLRange_hasFirst = n, s.$GraphQLRange_hasLast = r, s.$GraphQLRange_sessionID = i, s.$GraphQLRange_staticQueriesMap = o, s.$GraphQLRange_orderedSegments = a.map(function(e) { | |
return g.fromJSON(e) | |
}), s | |
}, p.prototype.toJSON = function() { | |
return [this.$GraphQLRange_hasFirst, this.$GraphQLRange_hasLast, this.$GraphQLRange_sessionID, this.$GraphQLRange_staticQueriesMap, this.$GraphQLRange_orderedSegments] | |
}, p.prototype.__debug = function() { | |
return { | |
dataStore: this.$GraphQLRange_dataStore, | |
orderedSegments: this.$GraphQLRange_orderedSegments | |
} | |
}, i.exports = p | |
}), __d("GraphQLSegment", ["GraphQLConstants", "GraphQLStoreDataHandler"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
this.$GraphQLSegment_indexToMetadataMap = {}, this.$GraphQLSegment_idToIndicesMap = {}, this.$GraphQLSegment_cursorToIndexMap = {}, this.$GraphQLSegment_count = 0, this.$GraphQLSegment_minIndex = null, this.$GraphQLSegment_maxIndex = null, this.$GraphQLSegment_sessionID = e | |
} | |
var a = t("GraphQLConstants"), | |
s = t("GraphQLStoreDataHandler"); | |
o.prototype.$GraphQLSegment_getIndexForCursor = function(e) { | |
return this.$GraphQLSegment_cursorToIndexMap[e] | |
}, o.prototype.$GraphQLSegment_getIndexForID = function(e) { | |
var t = this.$GraphQLSegment_idToIndicesMap[e]; | |
return t && t[0] | |
}, o.prototype.getFirstCursor = function(e) { | |
if (this.getLength()) | |
for (var t = this.$GraphQLSegment_minIndex; t <= this.$GraphQLSegment_maxIndex; t++) { | |
var n = this.$GraphQLSegment_indexToMetadataMap[t]; | |
if (this.$GraphQLSegment_edgeExistsAtSession(n, e)) return n.cursor | |
} | |
}, o.prototype.getLastCursor = function(e) { | |
if (this.getLength()) | |
for (var t = this.$GraphQLSegment_maxIndex; t >= this.$GraphQLSegment_minIndex; t--) { | |
var n = this.$GraphQLSegment_indexToMetadataMap[t]; | |
if (this.$GraphQLSegment_edgeExistsAtSession(n, e)) return n.cursor | |
} | |
}, o.prototype.getFirstID = function(e) { | |
if (this.getLength()) | |
for (var t = this.$GraphQLSegment_minIndex; t <= this.$GraphQLSegment_maxIndex; t++) { | |
var n = this.$GraphQLSegment_indexToMetadataMap[t]; | |
if (this.$GraphQLSegment_edgeExistsAtSession(n, e)) return n.edgeID | |
} | |
}, o.prototype.getLastID = function(e) { | |
if (this.getLength()) | |
for (var t = this.$GraphQLSegment_maxIndex; t >= this.$GraphQLSegment_minIndex; t--) { | |
var n = this.$GraphQLSegment_indexToMetadataMap[t]; | |
if (this.$GraphQLSegment_edgeExistsAtSession(n, e)) return n.edgeID | |
} | |
}, o.prototype.$GraphQLSegment_getEdgeAtIndex = function(e) { | |
var t = this.$GraphQLSegment_indexToMetadataMap[e]; | |
return t && !t.removalTime ? t : null | |
}, o.prototype.containsEdgeWithID = function(e) { | |
var t = this.$GraphQLSegment_getIndexForID(e); | |
return void 0 === t ? !1 : !!this.$GraphQLSegment_getEdgeAtIndex(t) | |
}, o.prototype.containsEdgeWithCursor = function(e) { | |
var t = this.$GraphQLSegment_getIndexForCursor(e); | |
return void 0 === t ? !1 : !!this.$GraphQLSegment_getEdgeAtIndex(t) | |
}, o.prototype.$GraphQLSegment_edgeExistsAtSession = function(e, t) { | |
return null == t ? !e.removalTime : e.cursor === a.DUMMY_CURSOR_ID ? !e.removalTime || e.removalTime > t : (!e.removalTime || e.removalTime > t) && (!e.insertionTime || e.insertionTime <= t) | |
}, o.prototype.getMetadataAfterCursor = function(e, t, n) { | |
if (!this.getLength()) return { | |
edgeIDs: [], | |
cursors: [] | |
}; | |
var r = this.$GraphQLSegment_minIndex; | |
if (t) { | |
var i = this.$GraphQLSegment_getIndexForCursor(t); | |
if (void 0 === i) return console.error("This segment does not have a cursor %s", t), { | |
edgeIDs: [], | |
cursors: [] | |
}; | |
r = i + 1 | |
} | |
for (var o = 0, a = [], s = []; r <= this.$GraphQLSegment_maxIndex && e > o;) { | |
var l = this.$GraphQLSegment_indexToMetadataMap[r]; | |
this.$GraphQLSegment_edgeExistsAtSession(l, n) && (a.push(l.edgeID), s.push(l.cursor), o++), r++ | |
} | |
return { | |
edgeIDs: a, | |
cursors: s | |
} | |
}, o.prototype.getMetadataBeforeCursor = function(e, t, n) { | |
if (!this.getLength()) return { | |
edgeIDs: [], | |
cursors: [] | |
}; | |
var r = this.$GraphQLSegment_maxIndex; | |
if (t) { | |
var i = this.$GraphQLSegment_getIndexForCursor(t); | |
if (void 0 === i) return console.error("This segment does not have a cursor %s", t), { | |
edgeIDs: [], | |
cursors: [] | |
}; | |
r = i - 1 | |
} | |
for (var o = 0, a = [], s = []; r >= this.$GraphQLSegment_minIndex && e > o;) { | |
var l = this.$GraphQLSegment_indexToMetadataMap[r]; | |
this.$GraphQLSegment_edgeExistsAtSession(l, n) && (a.push(l.edgeID), s.push(l.cursor), o++), r-- | |
} | |
return { | |
edgeIDs: a.reverse(), | |
cursors: s.reverse() | |
} | |
}, o.prototype.$GraphQLSegment_addEdgeAtIndex = function(e, t, n) { | |
if (0 === this.getLength()) this.$GraphQLSegment_minIndex = t, this.$GraphQLSegment_maxIndex = t; | |
else if (this.$GraphQLSegment_minIndex == t + 1) this.$GraphQLSegment_minIndex = t; | |
else { | |
if (this.$GraphQLSegment_maxIndex != t - 1) return void console.error("Attempted to add noncontiguous index to GraphQLSegment: " + t + " to (" + this.$GraphQLSegment_minIndex + ", " + this.$GraphQLSegment_maxIndex + ")"); | |
this.$GraphQLSegment_maxIndex = t | |
} | |
var r = s.getID(e), | |
i = e.cursor, | |
o = this.$GraphQLSegment_getIndexForID(r); | |
return void 0 !== o && this.$GraphQLSegment_getEdgeAtIndex(o) ? void console.error("Attempted to add an ID already in GraphQLSegment: %s", r) : (this.$GraphQLSegment_indexToMetadataMap[t] = { | |
edgeID: r, | |
cursor: i, | |
insertionTime: n || null, | |
removalTime: null | |
}, this.$GraphQLSegment_idToIndicesMap[r] = this.$GraphQLSegment_idToIndicesMap[r] || [], this.$GraphQLSegment_idToIndicesMap[r].unshift(t), this.$GraphQLSegment_count++, void(i && (this.$GraphQLSegment_cursorToIndexMap[i] = t))) | |
}, o.prototype.prependEdge = function(e, t) { | |
this.$GraphQLSegment_addEdgeAtIndex(e, null !== this.$GraphQLSegment_minIndex ? this.$GraphQLSegment_minIndex - 1 : 0, t) | |
}, o.prototype.appendEdge = function(e, t) { | |
this.$GraphQLSegment_addEdgeAtIndex(e, null !== this.$GraphQLSegment_maxIndex ? this.$GraphQLSegment_maxIndex + 1 : 0, t) | |
}, o.prototype.removeEdge = function(e, t) { | |
var n = this.$GraphQLSegment_getIndexForID(e); | |
if (void 0 === n) return void console.error("Attempted to remove edge with ID that was never in GraphQLSegment: " + e); | |
var r = this.$GraphQLSegment_indexToMetadataMap[n]; | |
return r.removalTime ? void console.error("Attempted to remove edge with ID that was already removed: " + e) : (r.removalTime = t, void this.$GraphQLSegment_count--) | |
}, o.prototype.removeAllEdges = function(e, t) { | |
var n = this.$GraphQLSegment_idToIndicesMap[e]; | |
if (n) | |
for (var r = 0; r < n.length; r++) { | |
var i = this.$GraphQLSegment_indexToMetadataMap[n[r]]; | |
i.removalTime ? i.removalTime > t && (i.removalTime = t) : (i.removalTime = t, this.$GraphQLSegment_count--) | |
} | |
}, o.prototype.addEdgesAfterCursor = function(e, t, n) { | |
var r = -1; | |
if (t && (r = this.$GraphQLSegment_getIndexForCursor(t), void 0 === r)) return void console.error("This segment does not have a cursor %s", t); | |
for (; null !== this.$GraphQLSegment_maxIndex && r < this.$GraphQLSegment_maxIndex;) { | |
var i = this.$GraphQLSegment_indexToMetadataMap[r + 1]; | |
if (!i.removalTime) return void console.error("Attempted to do an overwrite to GraphQLSegment: last index is " + this.$GraphQLSegment_maxIndex + " trying to add edges before " + r); | |
r++ | |
} | |
for (var o = r + 1, a = 0; a < e.length; a++) { | |
var s = e[a]; | |
this.$GraphQLSegment_addEdgeAtIndex(s, o + a, n) | |
} | |
}, o.prototype.addEdgesBeforeCursor = function(e, t, n) { | |
var r = 1; | |
if (t && (r = this.$GraphQLSegment_getIndexForCursor(t), void 0 === r)) return void console.error("This segment does not have a cursor %s", t); | |
for (; null !== this.$GraphQLSegment_minIndex && r > this.$GraphQLSegment_minIndex;) { | |
var i = this.$GraphQLSegment_indexToMetadataMap[r - 1]; | |
if (!i.removalTime) return void console.error("Attempted to do an overwrite to GraphQLSegment: first index is " + this.$GraphQLSegment_minIndex + " trying to add edges after " + r); | |
r-- | |
} | |
for (var o = r - 1, a = 0; a < e.length; a++) { | |
var s = e[e.length - a - 1]; | |
this.$GraphQLSegment_addEdgeAtIndex(s, o - a, n) | |
} | |
}, o.prototype.getLength = function() { | |
return null === this.$GraphQLSegment_minIndex && null === this.$GraphQLSegment_maxIndex ? 0 : this.$GraphQLSegment_maxIndex - this.$GraphQLSegment_minIndex + 1 | |
}, o.prototype.getCount = function() { | |
return this.$GraphQLSegment_count | |
}, o.prototype.getSessionID = function() { | |
return this.$GraphQLSegment_sessionID | |
}, o.prototype.$GraphQLSegment_rollback = function(e, t, n) { | |
Object.assign(this.$GraphQLSegment_cursorToIndexMap, e), Object.assign(this.$GraphQLSegment_idToIndicesMap, t), this.$GraphQLSegment_count = n.count, this.$GraphQLSegment_maxIndex = n.maxIndex, this.$GraphQLSegment_minIndex = n.minIndex | |
}, o.prototype.$GraphQLSegment_getCounterState = function() { | |
return { | |
count: this.$GraphQLSegment_count, | |
maxIndex: this.$GraphQLSegment_maxIndex, | |
minIndex: this.$GraphQLSegment_minIndex | |
} | |
}, o.prototype.concatSegment = function(e) { | |
if (!e.getLength()) return !0; | |
for (var t = {}, n = {}, r = this.$GraphQLSegment_getCounterState(), i = e.$GraphQLSegment_indexToMetadataMap, o = e.$GraphQLSegment_minIndex; o <= e.$GraphQLSegment_maxIndex; o++) { | |
var a; | |
this.getLength() ? a = this.$GraphQLSegment_maxIndex + 1 : (a = 0, this.$GraphQLSegment_minIndex = 0), this.$GraphQLSegment_maxIndex = a; | |
var s = i[o], | |
l = this.$GraphQLSegment_getIndexForID(s.edgeID); | |
if (t.hasOwnProperty(s.edgeID) || (t[s.edgeID] = this.$GraphQLSegment_idToIndicesMap[s.edgeID] ? this.$GraphQLSegment_idToIndicesMap[s.edgeID].slice() : void 0), void 0 !== l) { | |
var u = this.$GraphQLSegment_indexToMetadataMap[l]; | |
if (u.removalTime && (!s.removalTime || u.removalTime < s.removalTime)) this.$GraphQLSegment_idToIndicesMap[s.edgeID].unshift(a); | |
else { | |
if (!s.removalTime) return console.error("Attempt to concat an ID already in GraphQLSegment: %s", s.edgeID), this.$GraphQLSegment_rollback(n, t, r), !1; | |
this.$GraphQLSegment_idToIndicesMap[s.edgeID] = this.$GraphQLSegment_idToIndicesMap[s.edgeID] || [], this.$GraphQLSegment_idToIndicesMap[s.edgeID].push(a) | |
} | |
} else this.$GraphQLSegment_idToIndicesMap[s.edgeID] = this.$GraphQLSegment_idToIndicesMap[s.edgeID] || [], this.$GraphQLSegment_idToIndicesMap[s.edgeID].unshift(a); | |
var c = this.$GraphQLSegment_getIndexForCursor(s.cursor); | |
if (void 0 !== c) { | |
var p = this.$GraphQLSegment_indexToMetadataMap[c]; | |
if (p.removalTime && (!s.removalTime || p.removalTime < s.removalTime)) n[s.cursor] = this.$GraphQLSegment_cursorToIndexMap[s.cursor], this.$GraphQLSegment_cursorToIndexMap[s.cursor] = a; | |
else if (!s.removalTime) return console.error("Attempt to concat a cursor already in GraphQLSegment: %s", s.cursor), this.$GraphQLSegment_rollback(n, t, r), !1 | |
} else s.cursor && (n[s.cursor] = this.$GraphQLSegment_cursorToIndexMap[s.cursor], this.$GraphQLSegment_cursorToIndexMap[s.cursor] = a); | |
s.removalTime || this.$GraphQLSegment_count++, this.$GraphQLSegment_indexToMetadataMap[a] = Object.assign({}, s) | |
} | |
return this.getSessionID() && (!e.getSessionID() || e.getSessionID() < this.getSessionID()) && (this.$GraphQLSegment_sessionID = e.getSessionID()), !0 | |
}, o.prototype.toJSON = function() { | |
return [this.$GraphQLSegment_sessionID, this.$GraphQLSegment_indexToMetadataMap, this.$GraphQLSegment_idToIndicesMap, this.$GraphQLSegment_cursorToIndexMap, this.$GraphQLSegment_minIndex, this.$GraphQLSegment_maxIndex, this.$GraphQLSegment_count] | |
}, o.fromJSON = function(e) { | |
var t = e, | |
n = t[0], | |
r = t[1], | |
i = t[2], | |
a = t[3], | |
s = t[4], | |
l = t[5], | |
u = t[6], | |
c = new o(n); | |
return c.$GraphQLSegment_indexToMetadataMap = r, c.$GraphQLSegment_idToIndicesMap = i, c.$GraphQLSegment_cursorToIndexMap = a, c.$GraphQLSegment_minIndex = s, c.$GraphQLSegment_maxIndex = l, c.$GraphQLSegment_count = u, c | |
}, o.prototype.__debug = function() { | |
return { | |
metadata: this.$GraphQLSegment_indexToMetadataMap, | |
idToIndices: this.$GraphQLSegment_idToIndicesMap, | |
cursorToIndex: this.$GraphQLSegment_cursorToIndexMap | |
} | |
}, i.exports = o | |
}), __d("GraphQLStoreWriter", ["DliteLog", "GraphQL_EXPERIMENTAL", "GraphQLConstants", "GraphQLMutatorConstants", "GraphQLRange", "GraphQLRangeTracker", "GraphQLStoreDataHandler", "GraphQLStoreQueryPath", "GraphQLStoreRangeUtils", "generateClientID", "generateClientEdgeID", "invariant", "isEmpty"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n, r, i, o, a, s) { | |
this.$GraphQLStoreWriter_nodeData = e, this.$GraphQLStoreWriter_queuedData = t, this.$GraphQLStoreWriter_queryTracker = n, this.$GraphQLStoreWriter_nodeRangeTracker = r, this.$GraphQLStoreWriter_mutationIDToClientNodeIDMap = i, this.$GraphQLStoreWriter_onChange = a, this.$GraphQLStoreWriter_forceIndex = s || null, !o || o in d.UPDATE_TYPES || S(0, "Invalid mutation update type %s passed into GraphQLStore", o), this.$GraphQLStoreWriter_shouldUpdateTrackedQueries = !o, this.$GraphQLStoreWriter_isOptimisticUpdate = o === d.OPTIMISTIC_UPDATE, this.$GraphQLStoreWriter_newlyAddedIDs = {} | |
} | |
function a(e) { | |
return e.split(".")[0] | |
} | |
function s(e, t) { | |
if (1 === e.length && e[0] === D) return p.VIEWER_CLIENT_ID; | |
for (var n = 0; n < e.length; n++) { | |
var r = e[n]; | |
if (!t || !t.hasOwnProperty(r)) return null; | |
t = t[r] | |
} | |
return t && t.id && "string" == typeof t.id ? t.id : null | |
} | |
function l(e, t) { | |
for (var n in e) | |
if (n === t) return e[n]; | |
return null | |
} | |
var u = t("DliteLog"), | |
c = t("GraphQL_EXPERIMENTAL"), | |
p = t("GraphQLConstants"), | |
d = t("GraphQLMutatorConstants"), | |
h = t("GraphQLRange"), | |
f = t("GraphQLRangeTracker"), | |
m = t("GraphQLStoreDataHandler"), | |
g = t("GraphQLStoreQueryPath"), | |
_ = t("GraphQLStoreRangeUtils"), | |
y = t("generateClientID"), | |
v = t("generateClientEdgeID"), | |
S = t("invariant"), | |
b = t("isEmpty"), | |
R = p.EDGES, | |
w = p.NODE, | |
C = p.NODES, | |
E = p.PAGE_INFO, | |
D = p.VIEWER, | |
T = { | |
error: !0, | |
client_mutation_id: !0 | |
}, | |
x = new c.Field(R, null, null, null, null, null, { | |
plural: !0 | |
}); | |
o.prototype.handleFieldMergeMutation = function(e, t) { | |
var n = Object.keys(e).filter(function(e) { | |
return !T[e] | |
}); | |
1 !== n.length && S(0, "Simple mutations must have exactly one top-level payload field."); | |
var r, i = n[0]; | |
i === D && (r = g.prunePathForDataID(p.VIEWER_CLIENT_ID)); | |
var o = function(n) { | |
var a = n.getOwnField(i); | |
a && this.$GraphQLStoreWriter_storeField(t, a, e, {}, r), n.getFragments().forEach(o) | |
}.bind(this); | |
o(t) | |
}, o.prototype.handleMergeMutation = function(e, t) { | |
for (var n in e) | |
if (e.hasOwnProperty(n)) { | |
var r = e[n]; | |
if ("object" == typeof r && ("id" in r || n === p.VIEWER || Array.isArray(r))) { | |
var i = {}; | |
i[n] = r, this.handleFieldMergeMutation(i, t) | |
} | |
} | |
}, o.prototype.handleRangeAddMutation = function(e, t, n, r) { | |
var i = e[n.edgeName]; | |
i.node || S(0, "newly added edge must have node field"); | |
var o; | |
n.sourceID ? o = n.sourceID : (i.source.id || S(0, "add mutation without sourceID in the config must have an id in the source field of the new edge"), o = i.source.id); | |
var a = e.client_mutation_id, | |
s = this.$GraphQLStoreWriter_getRanges(o, n.connectionName), | |
u = i.node.id ? i.node.id : y(); | |
i.node.__dataID__ = u, this.$GraphQLStoreWriter_isOptimisticUpdate ? i.node.id = u : this.$GraphQLStoreWriter_shouldUpdateTrackedQueries = !0, i.cursor = i.cursor || p.DUMMY_CURSOR_ID; | |
for (var c = 0; c < s.length; c++) { | |
var h = l(r, s[c].calls.toString()); | |
if (h) { | |
var f = s[c].rangeID, | |
g = this.$GraphQLStoreWriter_nodeData[f].__path__.clone(); | |
g.pushField(x); | |
var _ = v(f, u), | |
b = !1, | |
R = function(e) { | |
var t = e.getOwnField(n.edgeName); | |
t && (this.storeNodeWithID(t, i, _, g), b = !0), e.getFragments().forEach(R) | |
}.bind(this); | |
if (R(t), b || S(0, "Mutation query must include the relevant edge"), this.$GraphQLStoreWriter_isOptimisticUpdate) this.$GraphQLStoreWriter_handleOptimisticRangeUpdate(this.$GraphQLStoreWriter_queuedData[_], f, h); | |
else { | |
var w = this.$GraphQLStoreWriter_nodeData[_]; | |
switch (h) { | |
case d.PREPEND: | |
s[c].range.prependEdge(w); | |
break; | |
case d.APPEND: | |
s[c].range.appendEdge(w); | |
break; | |
default: | |
console.error("Invalid GraphQLRange operation") | |
} | |
this.$GraphQLStoreWriter_nodeRangeTracker.addRangeIDForNodeID(f, u); | |
var C = this.$GraphQLStoreWriter_mutationIDToClientNodeIDMap[a]; | |
C && (m.updateClientServerIDMap(C, w.node.__dataID__), delete this.$GraphQLStoreWriter_mutationIDToClientNodeIDMap[a]) | |
} | |
} | |
} | |
this.$GraphQLStoreWriter_isOptimisticUpdate && (this.$GraphQLStoreWriter_mutationIDToClientNodeIDMap[a] = u), this.$GraphQLStoreWriter_notifyOnChange(o) | |
}, o.prototype.handleRangeDeleteMutation = function(e, t) { | |
var n = e[t.deletedIDFieldName]; | |
void 0 === n && S(0, "deleted id must be in the payload"); | |
var r = t.pathToConnection.pop(), | |
i = s(t.pathToConnection, e); | |
if (t.pathToConnection.push(r), i) | |
for (var o = this.$GraphQLStoreWriter_getRanges(i, r), a = 0; a < o.length; a++) this.deleteNodeFromRangeWithID(n, o[a].rangeID) | |
}, o.prototype.handleNodeDeleteMutation = function(e, t) { | |
var n = e[t.deletedIDFieldName]; | |
void 0 === n && S(0, "deleted id must be in the payload"), this.deleteNodeWithID(n) | |
}, o.prototype.deleteNodeFromRangeWithID = function(e, t) { | |
var n = v(t, e); | |
if (this.$GraphQLStoreWriter_isOptimisticUpdate) this.$GraphQLStoreWriter_handleOptimisticRangeUpdate(n, t, d.REMOVE); | |
else { | |
var r = this.$GraphQLStoreWriter_nodeData[t]; | |
r.__range__.removeEdgeWithID(n) | |
} | |
this.$GraphQLStoreWriter_notifyOnChange(t), this.deleteNodeWithID(n) | |
}, o.prototype.deleteNodeWithID = function(e) { | |
var t = this.$GraphQLStoreWriter_queuedData[e] || this.$GraphQLStoreWriter_nodeData[e]; | |
if (null !== t) { | |
var n = this.$GraphQLStoreWriter_getNodeSink(); | |
null !== n[e] && (n[e] = null, this.$GraphQLStoreWriter_nodeRangeTracker.getRangeIDsForNodeID(e).forEach(function(t) { | |
this.deleteNodeFromRangeWithID(e, t) | |
}.bind(this)), this.$GraphQLStoreWriter_isOptimisticUpdate || this.$GraphQLStoreWriter_nodeRangeTracker.clearRangeIDsForNodeID(e), this.$GraphQLStoreWriter_notifyOnChange(e)) | |
} | |
}, o.prototype.storeNodeWithID = function(e, t, n, r) { | |
r = g.prunePathForDataID(n, r); | |
var i = this.$GraphQLStoreWriter_getNodeSink(); | |
i[n] || (i[n] = m.createPointerWithID(n), this.$GraphQLStoreWriter_shouldUpdateTrackedQueries || (this.$GraphQLStoreWriter_newlyAddedIDs[n] = !0)), m.isClientID(n) && !i[n].__path__ && (i[n].__path__ = r.clone()), this.$GraphQLStoreWriter_traverseNode(e, t, i[n], r), (this.$GraphQLStoreWriter_shouldUpdateTrackedQueries || this.$GraphQLStoreWriter_newlyAddedIDs[n]) && this.$GraphQLStoreWriter_queryTracker.addQueryForID(n, e) | |
}, o.prototype.$GraphQLStoreWriter_traverseNode = function(e, t, n, r, i) { | |
for (var o = e.getOwnFields(), a = 0; a < o.length; a++) { | |
var s = o[a]; | |
r.withField(s, function() { | |
this.$GraphQLStoreWriter_storeField(i || e, s, t, n, r) | |
}.bind(this)) | |
} | |
for (var l = e.getFragments(), u = 0; u < l.length; u++) this.$GraphQLStoreWriter_traverseNode(l[u], t, n, r, i || e) | |
}, o.prototype.$GraphQLStoreWriter_storeField = function(e, t, n, r, i) { | |
var o, a, s = r.__dataID__, | |
l = _.getStorageKeyForField(t, {}), | |
u = t.getGeneratedAlias(); | |
if (o = n.hasOwnProperty(u) ? n[u] : n[t.getGeneratedFieldName()], Array.isArray(o)) | |
if (l == R && _.isRangeNode(e)) { | |
var c = e.getCalls(); | |
if (b(c)) return void console.error("The field %s is a range node, and thus expected to have a first() or last() filter call", e.getFieldName()); | |
s || S(0, "Parent of edges must have an ID"); | |
for (var d, g = t.getEdgesID() && f.isFieldTracked(t, s), T = 0; T < o.length; T++) { | |
var x = o[T], | |
P = x.node; | |
if (null === P) d = d || o.slice(0, T); | |
else { | |
var I = P.id || P.__dataID__ || y(), | |
F = v(s, I); | |
P.__dataID__ = I, x.__dataID__ = F, this.$GraphQLStoreWriter_nodeRangeTracker.addRangeIDForNodeID(s, I), this.storeNodeWithID(t, x, F, i), d && d.push(x), g && f.trackEdge(t, F, s) | |
} | |
} | |
o = d || o; | |
var L = !1, | |
M = this.$GraphQLStoreWriter_nodeData[s] || r, | |
Q = this.$GraphQLStoreWriter_forceIndex && (void 0 === M.__forceIndex__ || this.$GraphQLStoreWriter_forceIndex > M.__forceIndex__); | |
!M.__range__ || Q ? (r.__range__ = new h(this.$GraphQLStoreWriter_nodeData), r.__filterCalls__ = _.getFilterCalls(c), L = !0, Q && (r.__forceIndex__ = this.$GraphQLStoreWriter_forceIndex)) : r.__range__ = M.__range__; | |
var A = n[E]; | |
A || (A = { | |
has_previous_page: !1, | |
has_next_page: !1 | |
}), r.__range__.addItems(c, {}, o, A), b(M) || b(o) || this.$GraphQLStoreWriter_notifyOnChange(s) | |
} else { | |
if (l == C) throw new Error("Request edges instead of nodes, cursor field is required"); | |
var k = !1; | |
r[l] ? r[l].length > o.length && (r[l].length = o.length, this.$GraphQLStoreWriter_notifyOnChange(s), k = !0) : (r[l] = [], this.$GraphQLStoreWriter_notifyOnChange(s), k = !0); | |
for (var O = 0; O < o.length; O++) | |
if ("object" != typeof o[O]) r[l][O] !== o[O] && (r[l][O] = o[O], k || (this.$GraphQLStoreWriter_notifyOnChange(s), k = !0)); | |
else { | |
if (a = null, o[O].id) a = o[O].id; | |
else { | |
var N = this.$GraphQLStoreWriter_nodeData[s] || r; | |
N && Array.isArray(N[l]) && N[l][O] && (a = N[l][O].__dataID__) | |
} | |
a || (a = y()), r[l][O] && r[l][O].__dataID__ === a || (r[l][O] = m.createPointerWithID(a), k || (this.$GraphQLStoreWriter_notifyOnChange(s), k = !0)), this.storeNodeWithID(t, o[O], a, i) | |
} | |
} else if (t.hasFields()) { | |
if (a = null, l == E) return; | |
if (void 0 === o || null === o) return void this.$GraphQLStoreWriter_writeData(r, l, o); | |
l === D ? a = p.VIEWER_CLIENT_ID : l == w ? a = o.__dataID__ || o.id || y() : (a = o.id, !a && s && (N = this.$GraphQLStoreWriter_nodeData[s], N && N[l] ? a = N[l].__dataID__ : r && r[l] && (a = r[l].__dataID__)), a || (a = y())), this.$GraphQLStoreWriter_writePointer(r, l, a), this.storeNodeWithID(t, o, a, i) | |
} else this.$GraphQLStoreWriter_writeData(r, l, o) | |
}, o.prototype.$GraphQLStoreWriter_handleOptimisticRangeUpdate = function(e, t, n) { | |
n in d.RANGE_OPERATIONS || S(0, "Invalid operation %s provided", n), n === d.REMOVE && "string" == typeof e || n !== d.REMOVE && "object" == typeof e || S(0, "Incorrect edge information provided"); | |
var r = this.$GraphQLStoreWriter_queuedData; | |
t in r || (r[t] = {}), n in r[t] || (r[t][n] = []), n === d.PREPEND ? r[t][n].unshift(e) : r[t][n].push(e) | |
}, o.prototype.$GraphQLStoreWriter_getRanges = function(e, t) { | |
var n = this.$GraphQLStoreWriter_nodeData, | |
r = n[e], | |
i = []; | |
if (r) | |
for (var o in r) { | |
var s = a(o); | |
if (s === t) { | |
var l = n[r[o].__dataID__]; | |
l && l.__range__ && l.__range__ instanceof h && l.__filterCalls__ ? i.push({ | |
rangeID: l.__dataID__, | |
range: l.__range__, | |
calls: l.__filterCalls__ | |
}) : u.warn("Found a field matching connectionName with no range") | |
} | |
} | |
return i | |
}, o.prototype.$GraphQLStoreWriter_notifyOnChange = function(e) { | |
e && this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(e) | |
}, o.prototype.$GraphQLStoreWriter_writeData = function(e, t, n) { | |
e[t] !== n && (e[t] = n, this.$GraphQLStoreWriter_notifyOnChange(e.__dataID__)) | |
}, o.prototype.$GraphQLStoreWriter_writePointer = function(e, t, n) { | |
e[t] && n === e[t].__dataID__ || (e[t] = m.createPointerWithID(n), this.$GraphQLStoreWriter_notifyOnChange(e.__dataID__)) | |
}, o.prototype.$GraphQLStoreWriter_getNodeSink = function() { | |
return this.$GraphQLStoreWriter_isOptimisticUpdate ? this.$GraphQLStoreWriter_queuedData : this.$GraphQLStoreWriter_nodeData | |
}, i.exports = o | |
}), __d("generateClientID", ["crc32", "performanceNow"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
return u + l++ | |
} | |
var a = t("crc32"), | |
s = t("performanceNow"), | |
l = 1, | |
u = "client:" + a("" + s()); | |
i.exports = o | |
}), __d("generateClientEdgeID", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
return "client:" + e + ":" + t | |
} | |
i.exports = o | |
}), __d("generateForceIndex", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
return a++ | |
} | |
var a = 1; | |
i.exports = o | |
}), __d("PromiseMap", ["PublicPromise", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.$PromiseMap_deferred = {} | |
} | |
function a(e, t) { | |
return e.hasOwnProperty(t) || (e[t] = new s), e[t] | |
} | |
var s = t("PublicPromise"), | |
l = t("invariant"); | |
o.prototype.get = function(e) { | |
return a(this.$PromiseMap_deferred, e).getPromise() | |
}, o.prototype.resolveKey = function(e, t) { | |
var n = a(this.$PromiseMap_deferred, e); | |
n.isSettled() && l(0, "PromiseMap: Already settled `%s`.", e), n.resolve(t) | |
}, o.prototype.rejectKey = function(e, t) { | |
var n = a(this.$PromiseMap_deferred, e); | |
n.isSettled() && l(0, "PromiseMap: Already settled `%s`.", e), n.reject(t) | |
}, i.exports = o | |
}), __d("PublicPromise", ["Promise"], function(e, t, n, r, i) { | |
function o() { | |
"use strict"; | |
this.$PublicPromise_aborted = !1, this.$PublicPromise_settled = !1, this.$PublicPromise_promise = new a(function(e, t) { | |
this.$PublicPromise_resolve = e, this.$PublicPromise_reject = t | |
}.bind(this)) | |
} | |
var a = t("Promise"); | |
o.prototype.getPromise = function() { | |
"use strict"; | |
return this.$PublicPromise_promise | |
}, o.prototype.resolve = function(e) { | |
"use strict"; | |
this.$PublicPromise_aborted || (this.$PublicPromise_settled = !0, this.$PublicPromise_resolve(e)) | |
}, o.prototype.reject = function(e) { | |
"use strict"; | |
this.$PublicPromise_aborted || (this.$PublicPromise_settled = !0, this.$PublicPromise_reject(e)) | |
}, o.prototype.then = function() { | |
"use strict"; | |
return a.prototype.then.apply(this.$PublicPromise_promise, arguments) | |
}, o.prototype.done = function() { | |
"use strict"; | |
return a.prototype.done.apply(this.$PublicPromise_promise, arguments) | |
}, o.prototype.abort = function() { | |
"use strict"; | |
this.$PublicPromise_aborted = !0 | |
}, o.prototype.isSettled = function() { | |
"use strict"; | |
return this.$PublicPromise_settled | |
}, o.prototype.isAborted = function() { | |
"use strict"; | |
return this.$PublicPromise_aborted | |
}, i.exports = o | |
}), __d("containsQueryRootCall", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
if (e.getName() !== t.getName() && !a(e, t)) return !1; | |
var n = e.getArgs(); | |
return t.getArgs().every(function(e) { | |
for (var t = 0; t < n.length; t++) | |
if (e.equals(n[t])) return !0; | |
return !1 | |
}) | |
} | |
function a(e, t) { | |
return "nodes" === e.getName() && "node" === t.getName() | |
} | |
i.exports = o | |
}), __d("extendArray", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
return Array.prototype.push.apply(e, t), e | |
} | |
i.exports = o | |
}), __d("fetchRQL", ["DliteProfiler", "PublicPromise", "RQLRequest", "fetchBatchedRQL", "setImmediate"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
h.length || (h = [], d(a)); | |
var t = new u; | |
return h.push({ | |
query: e, | |
promise: t | |
}), t.getPromise() | |
} | |
function a() { | |
var e = l.instrumentAsync("fetchRQL.processPending"); | |
p(h.map(s.bind(null, e.stop))), h.length = 0 | |
} | |
function s(e, t) { | |
var n = t.query, | |
r = t.promise; | |
return new c(n.getQuery().getID(), n, function(t, n) { | |
n ? (e(), r.resolve({ | |
error: t, | |
response: n | |
})) : r.reject(t) | |
}) | |
} | |
var l = t("DliteProfiler"), | |
u = t("PublicPromise"), | |
c = t("RQLRequest"), | |
p = t("fetchBatchedRQL"), | |
d = t("setImmediate"), | |
h = []; | |
i.exports = o | |
}), __d("RQLRequest", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
this.$RQLRequest_name = e, this.$RQLRequest_query = t, this.$RQLRequest_callback = n | |
} | |
o.prototype.getName = function() { | |
return this.$RQLRequest_name | |
}, o.prototype.getQuery = function() { | |
return this.$RQLRequest_query | |
}, o.prototype.getCallback = function() { | |
return this.$RQLRequest_callback | |
}, i.exports = o | |
}), __d("fetchBatchedRQL", ["DliteAPIConfig", "DliteAPIRequest", "DliteLog", "DliteLogger", "GraphQLCodedError", "RQLError", "RQLRequest", "RQLTimeoutError", "createRQLError", "ex", "forEachObject", "getCrossOriginTransport"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t, n = {}; | |
e.forEach(function(e) { | |
var r = e.getQuery().getQuery(); | |
t = t || r.getQueryName(), n[e.getName()] = { | |
q: r.toString(), | |
ref_params: r.rootCall().getRefParams() | |
} | |
}); | |
var r = { | |
access_token: l.accessToken, | |
pretty: !!__DEV__, | |
flush: 1, | |
method: "GET", | |
batch_name: t, | |
queries: JSON.stringify(n) | |
}, | |
i = {}; | |
e.forEach(function(e) { | |
i[e.getName()] = e.getCallback() | |
}); | |
var o = p.logClientEvent("fetchBatchedRQL"), | |
v = {}, | |
S = function(e, t, n, r) { | |
o && (o.stop(), o = null); | |
var s = {}; | |
try { | |
s = JSON.parse(e) | |
} catch (l) { | |
var u = new h(g("JSON.parse(...) failed on: %s\nLengths: %s\nResponse:\n%s", e, JSON.stringify(r.lengths), r.rawText)); | |
c.warn(u.message), _(i, function(e) { | |
return e(u) | |
}), i = {} | |
} | |
if (n) { | |
_(i, function(e) { | |
e(new h("GraphQL: no results for query")) | |
}), i = {}; | |
var p = a(s, Object.keys(v).length); | |
p && c.warn(p.message) | |
} else _(s, function(e, t) { | |
if (i.hasOwnProperty(t)) { | |
var n = null; | |
e.error && (n = new d(e.error)); | |
var r = e.response; | |
r && (v[t] = !0), i[t](n, r), delete i[t] | |
} | |
}) | |
}; | |
new u(l.graphBatchURI).setMethod("POST").setData(r).setTransportBuilder(y).setRequestHeader("Content-Type", "application/x-www-form-urlencoded").setErrorHandler(function(e) { | |
_(i, function(t) { | |
t(m(e), null) | |
}) | |
}).setTimeoutHandler(function() { | |
_(i, function(e) { | |
e(new f, null) | |
}) | |
}).setResponseFilter(s).setResponseChunkHandler(S).send() | |
} | |
function a(e, t) { | |
return e.error ? m({ | |
errorType: e.error.type, | |
errorCode: e.error.code, | |
errorMsg: e.error.message | |
}) : void 0 === e.successful_results || void 0 == e.skipped_results ? new h(g("fetchBatchedRQL(...): Result count is undefined, successful_results: %s skipped_results: %s", e.successful_results, e.skipped_results)) : e.successful_results + e.skipped_results !== t ? new h(g("fetchBatchedRQL(...): Expected a total of %s responses, parsed %s total responses.", e.successful_results + e.skipped_results, t)) : void 0 | |
} | |
function s(e) { | |
return e.trim() | |
} | |
var l = t("DliteAPIConfig"), | |
u = t("DliteAPIRequest"), | |
c = t("DliteLog"), | |
p = t("DliteLogger"), | |
d = t("GraphQLCodedError"), | |
h = t("RQLError"), | |
f = (t("RQLRequest"), t("RQLTimeoutError")), | |
m = t("createRQLError"), | |
g = t("ex"), | |
_ = t("forEachObject"), | |
y = t("getCrossOriginTransport"); | |
__DEV__ && (o.mockSendRequest = function() { | |
throw new Error("Deprecated! Use `DliteAPIRequest.mockResponseHandler`.") | |
}, o.unmockSendRequest = function() { | |
throw new Error("Deprecated! Use `DliteAPIRequest.unmockResponseHandler`.") | |
}), i.exports = o | |
}), __d("DliteAPIConfig", ["DliteAPIConfigDefaults"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DliteAPIConfigDefaults"), | |
a = Object.assign({}, o, { | |
setLocale: function(e) { | |
a.graphBatchURI.setQueryData({ | |
locale: e | |
}), a.graphURI.setQueryData({ | |
locale: e | |
}) | |
} | |
}); | |
i.exports = a | |
}), __d("DliteAPIConfigDefaults", ["NativeModules", "URI"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeModules").DliteAPIConfig || {}, | |
a = t("URI"); | |
o.graphBatchURI = new a(o.graphBatchURI), o.graphURI = new a(o.graphURI), i.exports = o | |
}), __d("DliteAPIRequest", ["DliteAPIConfig", "DliteLog", "URI", "XHRHttpError", "XHRRequest", "createChunkedResponseParser", "getSameOriginTransport", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return e === p.HTTP_TRANSPORT_ERROR || e === p.HTTP_SERVER_ERROR | |
} | |
function a(e) { | |
this.$DliteAPIRequest_sent = !1, this.setURI(e), this.setMethod("POST"), this.setTransportBuilder(f) | |
} | |
function s(e, t, n) { | |
e.setResponseHandler(n).setData(t).send() | |
} | |
var l = t("DliteAPIConfig"), | |
u = t("DliteLog"), | |
c = t("URI"), | |
p = t("XHRHttpError"), | |
d = t("XHRRequest"), | |
h = t("createChunkedResponseParser"), | |
f = t("getSameOriginTransport"), | |
m = t("invariant"); | |
a.prototype.setURI = function(e) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setURI(...): Already sent request."), this.$DliteAPIRequest_uri = new c(e), this | |
}, a.prototype.setMethod = function(e) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setMethod(...): Already sent request."), this.$DliteAPIRequest_method = e, this | |
}, a.prototype.setData = function(e) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setData(...): Already sent request."), this.$DliteAPIRequest_data = e, this | |
}, a.prototype.setRequestHeader = function(e, t) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setRequestHeader(...): Already sent."), this.$DliteAPIRequest_headers = this.$DliteAPIRequest_headers || {}, this.$DliteAPIRequest_headers && (this.$DliteAPIRequest_headers[e] = t), this | |
}, a.prototype.setTransportBuilder = function(e) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setTransportBuilder(...): Already sent request."), this.$DliteAPIRequest_transportBuilder = e, this | |
}, a.prototype.setResponseFilter = function(e) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setResponseFilter(...): Already sent request."), this.$DliteAPIRequest_responseFilter = e, this | |
}, a.prototype.setResponseChunkHandler = function(e) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setResponseChunkHandler(...): Already sent request."), this.$DliteAPIRequest_responseChunkHandler = e, this | |
}, a.prototype.setErrorHandler = function(e) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setErrorHandler(...): Already sent request."), this.$DliteAPIRequest_errorHandler = e, this | |
}, a.prototype.setTimeoutHandler = function(e) { | |
return this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.setTimeoutHandler(...): Already sent request."), this.$DliteAPIRequest_timeoutHandler = e, this | |
}, a.prototype.send = function() { | |
function e() { | |
return n <= l.retryDelays.length | |
} | |
function t() { | |
var e = l.retryDelays[n - 1], | |
t = r + e; | |
setTimeout(i, t - Date.now()) | |
} | |
this.$DliteAPIRequest_sent && m(0, "DliteAPIRequest.send(): Can only send once."), this.$DliteAPIRequest_sent = !0; | |
var n = 0, | |
r = 0, | |
i = function() { | |
n++, r = Date.now(); | |
var i; | |
this.$DliteAPIRequest_responseChunkHandler && (i = h(this.$DliteAPIRequest_responseChunkHandler, this.$DliteAPIRequest_responseFilter)); | |
var a = this.$DliteAPIRequest_errorHandler, | |
s = function(n) { | |
e() && o(n.errorCode) ? (u.warn("DliteAPIRequest: Transient HTTP error, retrying. %s %s %s", n.errorType || "", n.errorCode || "", n.errorMsg || ""), t()) : a && a(n) | |
}, | |
c = this.$DliteAPIRequest_timeoutHandler, | |
p = function() { | |
e() ? (u.warn("DliteAPIRequest: HTTP timeout, retrying."), t()) : c && c() | |
}, | |
f = new d(this.$DliteAPIRequest_uri).setMethod(this.$DliteAPIRequest_method).setTransportBuilder(this.$DliteAPIRequest_transportBuilder).setErrorHandler(s).setTimeoutHandler(p).setTimeout(l.fetchTimeout); | |
if (this.$DliteAPIRequest_headers) | |
for (var m in this.$DliteAPIRequest_headers) f.setRequestHeader(m, this.$DliteAPIRequest_headers[m]); | |
g(f, this.$DliteAPIRequest_data, i) | |
}.bind(this); | |
i() | |
}; | |
var g = s; | |
__DEV__ && (a.mockSendRequest = function(e) { | |
g = e | |
}, a.unmockSendRequest = function() { | |
g = s | |
}), i.exports = a | |
}), __d("XHRHttpError", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
if (0 === t) { | |
var n = e.getProtocol(); | |
return "file" === n || "ftp" === n ? null : u | |
} | |
return t >= 100 && 200 > t ? s : t >= 200 && 300 > t ? null : t >= 400 && 500 > t ? a : t >= 500 && 600 > t ? l : t >= 12001 && 12156 > t ? u : c | |
} | |
var a = "HTTP_CLIENT_ERROR", | |
s = "HTTP_PROXY_ERROR", | |
l = "HTTP_SERVER_ERROR", | |
u = "HTTP_TRANSPORT_ERROR", | |
c = "HTTP_UNKNOWN_ERROR"; | |
i.exports = { | |
getErrorCode: o, | |
HTTP_CLIENT_ERROR: a, | |
HTTP_PROXY_ERROR: s, | |
HTTP_SERVER_ERROR: l, | |
HTTP_TRANSPORT_ERROR: u, | |
HTTP_UNKNOWN_ERROR: c | |
} | |
}), __d("XHRRequest", ["ErrorUtils", "URI", "XHRHttpError", "getSameOriginTransport", "invariant", "xhrSimpleDataSerializer"], function(e, t, n, r, i) { | |
function o(e) { | |
"use strict"; | |
this.setURI(e), this.setMethod("POST"), this.setIsAsynchronous(!0), this.setTransportBuilder(u), this.setDataSerializer(p), this.$XHRRequest_onreadystatechange = this.$XHRRequest_onreadystatechange.bind(this) | |
} | |
var a = t("ErrorUtils"), | |
s = t("URI"), | |
l = t("XHRHttpError"), | |
u = t("getSameOriginTransport"), | |
c = t("invariant"), | |
p = t("xhrSimpleDataSerializer"), | |
d = { | |
errorCode: null, | |
errorMsg: null, | |
errorType: null | |
}, | |
h = { | |
loadedBytes: null, | |
totalBytes: null | |
}; | |
o.prototype.setURI = function(e) { | |
"use strict"; | |
return this.$XHRRequest_uri = new s(e), this | |
}, o.prototype.getURI = function() { | |
"use strict"; | |
return this.$XHRRequest_uri | |
}, o.prototype.setMethod = function(e) { | |
"use strict"; | |
return this.$XHRRequest_method = e, this | |
}, o.prototype.getMethod = function() { | |
"use strict"; | |
return this.$XHRRequest_method | |
}, o.prototype.setData = function(e) { | |
"use strict"; | |
return this.$XHRRequest_data = e, this | |
}, o.prototype.getData = function() { | |
"use strict"; | |
return this.$XHRRequest_data | |
}, o.prototype.setRawData = function(e) { | |
"use strict"; | |
return this.$XHRRequest_rawData = e, this | |
}, o.prototype.setRequestHeader = function(e, t) { | |
"use strict"; | |
return this.$XHRRequest_headers || (this.$XHRRequest_headers = {}), this.$XHRRequest_headers[e] = t, this | |
}, o.prototype.setTimeout = function(e) { | |
"use strict"; | |
return this.$XHRRequest_timeout = e, this | |
}, o.prototype.setResponseHandler = function(e) { | |
"use strict"; | |
return this.$XHRRequest_responseHandler = e, this | |
}, o.prototype.setErrorHandler = function(e) { | |
"use strict"; | |
return this.$XHRRequest_errorHandler = e, this | |
}, o.prototype.setAbortHandler = function(e) { | |
"use strict"; | |
return this.$XHRRequest_abortHandler = e, this | |
}, o.prototype.setTimeoutHandler = function(e) { | |
"use strict"; | |
return this.$XHRRequest_timeoutHandler = e, this | |
}, o.prototype.setUploadProgressHandler = function(e) { | |
"use strict"; | |
return this.$XHRRequest_uploadProgressHandler = e, this | |
}, o.prototype.setIsAsynchronous = function(e) { | |
"use strict"; | |
return this.$XHRRequest_isAsynchronous = e, this | |
}, o.prototype.setTransportBuilder = function(e) { | |
"use strict"; | |
return this.$XHRRequest_transportBuilder = e, this | |
}, o.prototype.setDataSerializer = function(e) { | |
"use strict"; | |
return this.$XHRRequest_dataSerializer = e, this | |
}, o.prototype.send = function() { | |
"use strict"; | |
var e = this.$XHRRequest_timeout, | |
t = this.$XHRRequest_transportBuilder(), | |
n = this.getURI(); | |
this.$XHRRequest_pendingTransport = t; | |
var r; | |
if ("POST" !== this.$XHRRequest_method && this.$XHRRequest_rawData && c(0, "Must send raw data on post. Data: %s URI: %s", this.$XHRRequest_rawData, n), "GET" === this.$XHRRequest_method || this.$XHRRequest_rawData ? (n.addQueryData(this.$XHRRequest_data), r = this.$XHRRequest_rawData) : r = this.$XHRRequest_dataSerializer(this.$XHRRequest_data), t.onreadystatechange = this.$XHRRequest_onreadystatechange, t.upload && this.$XHRRequest_uploadProgressHandler && (t.upload.onprogress = this.$XHRRequest_onuploadprogress.bind(this)), e && (this.$XHRRequest_timeoutTimer = setTimeout(this.$XHRRequest_ontimeout.bind(this), e)), t.open(this.$XHRRequest_method, n.toString(), this.$XHRRequest_isAsynchronous), this.$XHRRequest_headers) | |
for (var i in this.$XHRRequest_headers) t.setRequestHeader(i, this.$XHRRequest_headers[i]); | |
t.send(r), this.$XHRRequest_isAsynchronous || t.onreadystatechange(null, !0) | |
}, o.prototype.abort = function() { | |
"use strict"; | |
this.$XHRRequest_abort(), this.$XHRRequest_abortHandler && a.applyWithGuard(this.$XHRRequest_abortHandler, null, null, null, "XHRRequest:_abortHandler") | |
}, o.prototype.$XHRRequest_abort = function() { | |
"use strict"; | |
var e = this.$XHRRequest_pendingTransport; | |
e && (e.onreadystatechange = null, e.abort()), this.$XHRRequest_cleanup() | |
}, o.prototype.$XHRRequest_ontimeout = function() { | |
"use strict"; | |
this.$XHRRequest_abort(), this.$XHRRequest_timeoutHandler && a.applyWithGuard(this.$XHRRequest_timeoutHandler, null, null, null, "XHRRequest:_abortHandler") | |
}, o.prototype.$XHRRequest_onreadystatechange = function(e, t) { | |
"use strict"; | |
if (this.$XHRRequest_isAsynchronous || t === !0) { | |
var n = this.$XHRRequest_pendingTransport, | |
r = n, | |
i = r.readyState; | |
if (i >= 2) { | |
var o = 4 === i, | |
s = this.getURI(), | |
u = l.getErrorCode(s, n.status), | |
c = this.$XHRRequest_responseHandler; | |
if (null !== u) o && (d.errorCode = u, d.errorMsg = n.responseText, d.errorType = "HTTP", this.$XHRRequest_errorHandler && a.applyWithGuard(this.$XHRRequest_errorHandler, null, [d], null, "XHRRequest:_errorHandler")); | |
else if (c) { | |
var p = null; | |
c.includeHeaders && (p = n.getAllResponseHeaders()), (o || c.parseStreaming && 3 === i) && a.applyWithGuard(c, null, [n.responseText, p, o], null, "XHRRequest:handler") | |
} | |
o && this.$XHRRequest_cleanup() | |
} | |
} | |
}, o.prototype.$XHRRequest_onuploadprogress = function(e) { | |
"use strict"; | |
h.loadedBytes = e.loaded, h.totalBytes = e.total, this.$XHRRequest_uploadProgressHandler && a.applyWithGuard(this.$XHRRequest_uploadProgressHandler, null, [h], null, "XHRRequest:_uploadProgressHandler") | |
}, o.prototype.$XHRRequest_cleanup = function() { | |
"use strict"; | |
clearTimeout(this.$XHRRequest_timeoutTimer), delete this.$XHRRequest_pendingTransport | |
}, i.exports = o | |
}), __d("getSameOriginTransport", ["ex"], function(e, t, n, r, i) { | |
function o() { | |
try { | |
return e.XMLHttpRequest ? new e.XMLHttpRequest : new ActiveXObject("MSXML2.XMLHTTP.3.0") | |
} catch (t) { | |
throw new Error(a("getSameOriginTransport: %s", t.message)) | |
} | |
} | |
var a = t("ex"); | |
i.exports = o | |
}), __d("xhrSimpleDataSerializer", [], function(e, t, n, r, i) { | |
function o(e) { | |
var t, n = []; | |
for (t in e) n.push(encodeURIComponent(t) + "=" + encodeURIComponent(e[t])); | |
return n.join("&") | |
} | |
i.exports = o | |
}), __d("createChunkedResponseParser", ["invariant"], function(e, t, n, r, i) { | |
function o(e, t) { | |
var n = 0, | |
r = { | |
lengths: [], | |
rawText: "" | |
}, | |
i = function(i, o, u) { | |
if (r.rawText = i, r.lengths.push(i.length), t && (i = t(i), null != i && "string" != typeof i && a(0, "createChunkedResponseParser: Filtered response must be a ?string")), i) | |
for (var c = i.length; c > n;) { | |
var p = i.indexOf(s, n); | |
if (0 > p) { | |
if (!u) break; | |
p = c | |
} | |
var d = i.slice(n, p); | |
n += d.length + l, e(d, o, u && n >= c, r) | |
} else u && e("", o, !0, r) | |
}; | |
return i.parseStreaming = !0, i | |
} | |
var a = t("invariant"), | |
s = "\r\n", | |
l = 2; | |
i.exports = o | |
}), __d("RQLError", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
this.name = "RQLError", this.message = e, this.type = "mustfix", Error.captureStackTrace ? Error.captureStackTrace(this) : this.stack = (new Error).stack, __DEV__ && (this.message += " -- Check your console.log or slog!") | |
} | |
for (var a in Error) Error.hasOwnProperty(a) && (o[a] = Error[a]); | |
var s = null === Error ? null : Error.prototype; | |
o.prototype = Object.create(s), o.prototype.constructor = o, o.__superConstructor__ = Error, i.exports = o | |
}), __d("RQLTimeoutError", ["RQLError"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.name = "RQLTimeoutError", this.message = "Request timed out", this.type = "warn" | |
} | |
var a = t("RQLError"); | |
for (var s in a) a.hasOwnProperty(s) && (o[s] = a[s]); | |
var l = null === a ? null : a.prototype; | |
o.prototype = Object.create(l), o.prototype.constructor = o, o.__superConstructor__ = a, i.exports = o | |
}), __d("createRQLError", ["XHRHttpError", "RQLError", "RQLOAuthError", "RQLTransportError", "ex"], function(e, t, n, r, i) { | |
function o(e, t) { | |
var n = e.errorCode === a.HTTP_CLIENT_ERROR, | |
r = e.errorCode === a.HTTP_TRANSPORT_ERROR; | |
return t = t || c("HTTP error: %s %s: %s", e.errorType, e.errorCode, e.errorMsg), r ? new u(t) : n && /OAuthException/.test(e.errorMsg || "") ? new l(t) : new s(t) | |
} | |
var a = t("XHRHttpError"), | |
s = t("RQLError"), | |
l = t("RQLOAuthError"), | |
u = t("RQLTransportError"), | |
c = t("ex"); | |
i.exports = o | |
}), __d("RQLOAuthError", ["RQLError"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
this.message = "OAuth Exception", this.name = "RQLOAuthError", this.type = "mustfix" | |
} | |
var a = t("RQLError"); | |
for (var s in a) a.hasOwnProperty(s) && (o[s] = a[s]); | |
var l = null === a ? null : a.prototype; | |
o.prototype = Object.create(l), o.prototype.constructor = o, o.__superConstructor__ = a, i.exports = o | |
}), __d("RQLTransportError", ["RQLError"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
this.name = "RQLTransportError", this.message = e, this.type = "warn" | |
} | |
var a = t("RQLError"); | |
for (var s in a) a.hasOwnProperty(s) && (o[s] = a[s]); | |
var l = null === a ? null : a.prototype; | |
o.prototype = Object.create(l), o.prototype.constructor = o, o.__superConstructor__ = a, i.exports = o | |
}), __d("getCrossOriginTransport", ["ex", "invariant"], function(e, t, n, r, i) { | |
function o() { | |
try { | |
var e = new XMLHttpRequest; | |
return "withCredentials" in e || "undefined" == typeof XDomainRequest || (e = new XDomainRequest), e | |
} catch (t) { | |
throw new Error(a("getCrossOriginTransport: %s", t.message)) | |
} | |
} | |
var a = t("ex"), | |
s = t("invariant"); | |
o.withCredentials = function() { | |
var e = o(); | |
"withCredentials" in e || s(0, "getCrossOriginTransport: Client does not support `withCredentials`."); | |
var t = e.open; | |
return e.open = function() { | |
t.apply(this, arguments), this.withCredentials = !0 | |
}, e | |
}, i.exports = o | |
}), __d("splitDeferredQueries", ["GraphQL_EXPERIMENTAL", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = e.getQuery(), | |
n = t.getID(), | |
r = null, | |
i = null, | |
o = a(t), | |
u = o.required, | |
d = o.deferred; | |
r = u === t ? [e] : u ? d.some(function(e) { | |
return e instanceof c | |
}) ? [s(u)] : [new p.QueryWithValues(u)] : []; | |
for (var h = 0; h < d.length; h++) { | |
if (d[h] instanceof p.Field) i = l(t, d[h], null); | |
else if (d[h] instanceof p.QueryFragment) { | |
if (!d[h].hasFields()) continue; | |
i = l(t, null, d[h]) | |
} else i = d[h].createQuery(n); | |
r.push(i) | |
} | |
return r | |
} | |
function a(e) { | |
var t, n, r = null, | |
i = null, | |
o = null, | |
s = null, | |
l = u(e), | |
d = e.getOwnFields(); | |
for (t = 0; t < d.length; t++) { | |
var f = d[t]; | |
for (s = a(f), (r || s.required !== f) && (r = r || d.slice(0, t), s.required && r.push(s.required)), n = 0; n < s.deferred.length; n++) o = o || [], o.push(s.deferred[n] instanceof p.Field ? f.shallowClone([s.deferred[n]], null) : s.deferred[n] instanceof p.QueryFragment ? f.shallowClone(null, [s.deferred[n]]) : s.deferred[n]) | |
} | |
if (e instanceof p.Field && o) | |
for (t = 0; t < o.length; t++) o[t] instanceof c && o[t].prependNodeToPath(e); | |
var m = e.getFragments(); | |
for (t = 0; t < m.length; t++) { | |
var g = m[t]; | |
if (g.isDeferred()) { | |
if (o = o || [], l) { | |
var _ = e.getInferredPrimaryKey(); | |
o.push(new c(l, e, e.getOwnUnaliasedFields(_), [g.shallowClone(g.getOwnFields(), g.getFragments())])) | |
} else o.push(g); | |
i = i || m.slice(0, t) | |
} else | |
for (s = a(g), (i || s.required !== g) && (i = i || m.slice(0, t), s.required && i.push(s.required)), n = 0; n < s.deferred.length; n++) o = o || [], o.push(s.deferred[n] instanceof p.Field ? g.shallowClone([s.deferred[n]], null) : s.deferred[n] instanceof p.QueryFragment ? l ? new c(l, e, h, [g.shallowClone(null, [s.deferred[n]])]) : g.shallowClone(null, [s.deferred[n]]) : s.deferred[n]) | |
} | |
var y; | |
return y = r || i ? 0 === (r || d).length && 0 === (i || m).length ? null : e instanceof p.Query ? e.shallowCloneWithSameID(r || d, i || m) : e.shallowClone(r || d, i || m) : e, { | |
required: y, | |
deferred: o || h | |
} | |
} | |
function s(e) { | |
return new p.QueryWithValues(e.shallowCloneWithSameID(e.getOwnFields(), e.getFragments(), { | |
isRefQueryDependency: !0 | |
})) | |
} | |
function l(e, t, n) { | |
var r = e.getOwnUnaliasedFields("id"), | |
i = null; | |
if (n) { | |
var o = Object.keys(n.getDeferredFragmentNames()); | |
1 !== o.length && d(0, "Only one fragment should be returned"), i = o[0] | |
} | |
return i = i || e.getQueryName() + "_defer", new p.QueryWithValues(e.shallowClone(t ? r.concat(t) : r, n ? [n] : null, { | |
isDeferred: !0 | |
}, i)) | |
} | |
function u(e) { | |
return e instanceof p.Field ? e.getInferredRootCallName() : null | |
} | |
function c(e, t, n, r) { | |
this.$RefQueryDescriptor_rootCallName = e, this.$RefQueryDescriptor_node = t, this.$RefQueryDescriptor_fields = n, this.$RefQueryDescriptor_fragments = r, this.$RefQueryDescriptor_path = [this.$RefQueryDescriptor_getJSONPathComponent(t), t.getInferredPrimaryKey()] | |
} | |
var p = t("GraphQL_EXPERIMENTAL"), | |
d = t("invariant"), | |
h = []; | |
c.prototype.createQuery = function(e) { | |
return new p.QueryWithValues(new p.Query(this.$RefQueryDescriptor_rootCallName, [new p.BatchCallVariable(e, "$.*." + this.$RefQueryDescriptor_path.join("."))], this.$RefQueryDescriptor_fields, this.$RefQueryDescriptor_fragments, { | |
isDeferred: !0 | |
}, null)) | |
}, c.prototype.prependNodeToPath = function(e) { | |
var t = this.$RefQueryDescriptor_getJSONPathComponent(e); | |
this.$RefQueryDescriptor_path.unshift(t) | |
}, c.prototype.$RefQueryDescriptor_getJSONPathComponent = function(e) { | |
return (e.getAlias() || e.getGeneratedAlias()) + (e.isPlural() ? ".*" : "") | |
}, i.exports = o | |
}), __d("subtractQuery", ["GraphQL_EXPERIMENTAL"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
var n = e.getQuery(), | |
r = t.getQuery(); | |
if (!f(n, r)) return e; | |
var i = n.isRefQueryDependency(), | |
o = a(n, [r], i); | |
return o === n ? e : o ? !i && l(o) ? null : new g.QueryWithValues(o) : null | |
} | |
function a(e, t, n) { | |
var r = e.getOwnFields(), | |
i = m(r, function(e) { | |
return s(e, t, n) | |
}), | |
o = e.getFragments(), | |
l = m(o, function(e) { | |
return a(e, t, n) | |
}); | |
return !n && i && 1 === i.length && "id" === i[0].getFieldName() && (i = null), r === i && o === l ? e : i && 0 !== i.length || l && 0 !== l.length ? e.shallowClone(i, l) : null | |
} | |
function s(e, t, n) { | |
var r = e.getFieldName(); | |
if (e.hasOwnFields() || e.getFragments().length) { | |
var i; | |
if (t.forEach(function(t) { | |
u(t, r, function(t) { | |
p(e, t) && (i = i || [], i.push(t)) | |
}) | |
}), i) return a(e, i, n) | |
} else if (!e.isRequisite() && "id" !== r) { | |
var o = t.some(function(t) { | |
return c(t, r, function(t) { | |
return p(e, t) | |
}) | |
}); | |
if (o) return null | |
} | |
return e | |
} | |
function l(e) { | |
var t = e.getOwnFields(), | |
n = e.getFragments(); | |
return t.length || n.length ? t.every(l) && n.every(l) : "id" === e.getFieldName() || e.isRequisite() | |
} | |
function u(e, t, n) { | |
c(e, t, function() { | |
n.apply(this, arguments) | |
}) | |
} | |
function c(e, t, n) { | |
for (var r, i = [e]; r = i.shift();) { | |
if (r.getOwnUnaliasedFields(t).some(n)) return !0; | |
_.apply(i, r.getFragments()) | |
} | |
return !1 | |
} | |
function p(e, t) { | |
var n = e.getCalls(), | |
r = t.getCalls(), | |
i = n.length; | |
if (i !== r.length) return !1; | |
if (i) | |
for (var o = e.isConnection() ? d : h, a = 0; i > a; a++) { | |
var s = n[a], | |
l = r[a]; | |
if (s.getName() !== l.getName() || !o(s, l)) return !1 | |
} | |
return !0 | |
} | |
function d(e, t) { | |
var n = e.getName(); | |
return "first" === n || "last" === n ? e.getArgs()[0] <= t.getArgs()[0] : h(e, t) | |
} | |
function h(e, t) { | |
var n = e.getArgs(), | |
r = t.getArgs(), | |
i = n.length; | |
if (i !== r.length) return !1; | |
for (var o = 0; i > o; o++) | |
if (!n[o].equals(r[o])) return !1; | |
return !0 | |
} | |
function f(e, t) { | |
return e.rootCall().equals(t.rootCall()) | |
} | |
function m(e, t) { | |
if (0 === e.length) return e; | |
var n = null; | |
return e.forEach(function(r, i) { | |
var o = t(r); | |
o !== r && (n = n || e.slice(0, i)), null !== n && null !== o && n.push(o) | |
}), n ? 0 === n.length ? null : n : e | |
} | |
var g = t("GraphQL_EXPERIMENTAL"), | |
_ = Array.prototype.push; | |
i.exports = o | |
}), __d("FBSpinner", ["NativeMethodsMixin", "React", "ReactIOSViewAttributes", "StyleSheet", "View", "createReactIOSNativeComponentClass", "keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeMethodsMixin"), | |
a = t("React"), | |
s = t("ReactIOSViewAttributes"), | |
l = t("StyleSheet"), | |
u = t("View"), | |
c = t("createReactIOSNativeComponentClass"), | |
p = t("keyMirror"), | |
d = p({ | |
large: null, | |
small: null | |
}), | |
h = a.createClass({ | |
displayName: "FBSpinner", | |
propTypes: { | |
size: a.PropTypes.oneOf(Object.keys(d)) | |
}, | |
statics: { | |
LARGE: d.large, | |
SMALL: d.small | |
}, | |
mixins: [o], | |
viewConfig: { | |
uiViewClassName: "FBActivityIndicatorView", | |
validAttributes: s.UIView | |
}, | |
getDefaultProps: function() { | |
return { | |
size: d.small | |
} | |
}, | |
render: function() { | |
return a.createElement(u, { | |
style: [f.container, this.props.style] | |
}, a.createElement(g, { | |
style: [m[this.props.size], f.transparent] | |
})) | |
} | |
}), | |
f = l.create({ | |
container: { | |
alignItems: "center", | |
justifyContent: "center" | |
}, | |
transparent: { | |
backgroundColor: "transparent" | |
}, | |
sizeSmall: { | |
height: 20, | |
width: 20 | |
}, | |
sizeLarge: { | |
height: 36, | |
width: 36 | |
} | |
}), | |
m = {}; | |
m[d.large] = f.sizeLarge, m[d.small] = f.sizeSmall; | |
var g = c({ | |
validAttributes: s.UIView, | |
uiViewClassName: "FBActivityIndicatorView" | |
}); | |
i.exports = h | |
}), __d("StyleSheet", ["ImageStylePropTypes", "ReactPropTypeLocations", "StyleSheetRegistry", "TextStylePropTypes", "ViewStylePropTypes", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() {} | |
var a = t("ImageStylePropTypes"), | |
s = t("ReactPropTypeLocations"), | |
l = t("StyleSheetRegistry"), | |
u = t("TextStylePropTypes"), | |
c = t("ViewStylePropTypes"), | |
p = t("invariant"); | |
o.create = function(e) { | |
var t = {}; | |
for (var n in e) o.validateStyle(n, e), t[n] = l.registerStyle(e[n]); | |
return t | |
}, o.validateStyleProp = function(e, t, n) { | |
if (__DEV__) { | |
if (void 0 === h[e]) { | |
var r = '"' + e + '" is not a valid style property.', | |
i = "\nValid style props: " + JSON.stringify(Object.keys(h), null, " "); | |
d(r, t, n, i) | |
} | |
var o = h[e](t, e, n, s.prop); | |
o && d(o.message, t, n) | |
} | |
}, o.validateStyle = function(e, t) { | |
if (__DEV__) | |
for (var n in t[e]) o.validateStyleProp(n, t[e], "StyleSheet " + e) | |
}, o.addValidStylePropTypes = function(e) { | |
for (var t in e) void 0 !== h[t] && h[t] !== e[t] && p(0, 'Attemped to redefine existing style prop type "' + t + '".'), h[t] = e[t] | |
}; | |
var d = function(e, t, n, r) { | |
p(0, e + "\n" + (n || "<<unknown>>") + ": " + JSON.stringify(t, null, " ") + (r || "")) | |
}, | |
h = {}; | |
o.addValidStylePropTypes(a), o.addValidStylePropTypes(u), o.addValidStylePropTypes(c), i.exports = o | |
}), __d("ImageStylePropTypes", ["ImageResizeMode", "LayoutPropTypes", "ReactPropTypes", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ImageResizeMode"), | |
a = t("LayoutPropTypes"), | |
s = t("ReactPropTypes"), | |
l = t("merge"), | |
u = l(a, { | |
resizeMode: s.oneOf(Object.keys(o)), | |
backgroundColor: s.string, | |
borderColor: s.string, | |
borderWidth: s.number, | |
borderRadius: s.number, | |
tintColor: s.string, | |
opacity: s.number | |
}), | |
c = Object.keys({ | |
padding: null, | |
paddingTop: null, | |
paddingLeft: null, | |
paddingRight: null, | |
paddingBottom: null, | |
paddingVertical: null, | |
paddingHorizontal: null | |
}); | |
for (var p in c) delete u[p]; | |
i.exports = u | |
}), __d("ImageResizeMode", ["keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("keyMirror"), | |
a = o({ | |
contain: null, | |
cover: null, | |
stretch: null | |
}); | |
i.exports = a | |
}), __d("View", ["NativeMethodsMixin", "NativeModules", "ReactPropTypes", "React", "ReactIOSViewAttributes", "StyleSheetPropType", "ViewStylePropTypes", "createReactIOSNativeComponentClass"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeMethodsMixin"), | |
a = t("NativeModules"), | |
s = t("ReactPropTypes"), | |
l = t("React"), | |
u = t("ReactIOSViewAttributes"), | |
c = t("StyleSheetPropType"), | |
p = t("ViewStylePropTypes"), | |
d = a.RKUIManager.StyleConstants, | |
h = t("createReactIOSNativeComponentClass"), | |
f = c(p), | |
m = l.createClass({ | |
displayName: "View", | |
statics: { | |
pointerEvents: d.PointerEventsValues, | |
stylePropType: f | |
}, | |
mixins: [o], | |
viewConfig: { | |
uiViewClassName: "RCTView", | |
validAttributes: u.RKView | |
}, | |
propTypes: { | |
accessible: s.bool, | |
testID: s.string, | |
onResponderGrant: s.func, | |
onResponderReject: s.func, | |
onResponderMove: s.func, | |
onResponderRelease: s.func, | |
onResponderTerminate: s.func, | |
onResponderTerminationRequest: s.func, | |
onMoveShouldSetResponder: s.func, | |
onStartShouldSetResponder: s.func, | |
onStartShouldSetResponderCapture: s.func, | |
pointerEvents: s.oneOf([d.PointerEventsValues.boxNone, d.PointerEventsValues.none, d.PointerEventsValues.boxOnly, d.PointerEventsValues.unspecified]), | |
style: f, | |
removeClippedSubviews: s.bool | |
}, | |
render: function() { | |
return l.createElement(g, Object.assign({}, this.props)) | |
} | |
}), | |
g = h({ | |
validAttributes: u.RKView, | |
uiViewClassName: "RCTView" | |
}), | |
_ = g; | |
__DEV__ && (_ = m), _.pointerEvents = m.pointerEvents, _.stylePropType = f, i.exports = _ | |
}), __d("StyleSheetPropType", ["createStrictShapeTypeChecker", "flattenStyle"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = a(e); | |
return function(e, n, r, i) { | |
var o = e; | |
return e[n] && (o = {}, o[n] = s(e[n])), t(o, n, r, i) | |
} | |
} | |
var a = t("createStrictShapeTypeChecker"), | |
s = t("flattenStyle"); | |
i.exports = o | |
}), __d("createStrictShapeTypeChecker", ["ReactPropTypeLocationNames", "invariant", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
function t(t, n, r, i, o) { | |
if (!n[r]) return void(t && s(0, "Required object `" + r + "` was not specified in " + ("`" + i + "`."))); | |
var u = n[r], | |
c = typeof u, | |
p = a[o]; | |
"object" !== c && s(0, "Invalid " + p + " `" + r + "` of type `" + c + "` " + ("supplied to `" + i + "`, expected `object`.")); | |
var d = l(n[r], e); | |
for (var h in d) { | |
var f = e[h]; | |
f || s(0, "Invalid props." + r + " key `" + h + "` supplied to `" + i + "`.\nBad object: " + JSON.stringify(n[r], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(e), null, " ")); | |
var m = f(u, h, i, o); | |
if (m) return s(0, m.message + "\nBad object: " + JSON.stringify(n[r], null, " ")), m | |
} | |
} | |
var n = t.bind(null, !1); | |
return n.isRequired = t.bind(null, !0), n | |
} | |
var a = t("ReactPropTypeLocationNames"), | |
s = t("invariant"), | |
l = t("merge"); | |
i.exports = o | |
}), __d("TimerMixin", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function(e, t, n) { | |
return function(r, i) { | |
var o = e(function() { | |
t.call(this, o), r.apply(this, arguments) | |
}.bind(this), i); | |
return this[n] ? this[n].push(o) : this[n] = [o], o | |
} | |
}, | |
a = function(e, t) { | |
return function(n) { | |
if (this[t]) { | |
var r = this[t].indexOf(n); - 1 !== r && this[t].splice(r, 1) | |
} | |
e(n) | |
} | |
}, | |
s = "TimerMixin_timeouts", | |
l = a(clearTimeout, s), | |
u = o(setTimeout, l, s), | |
c = "TimerMixin_intervals", | |
p = a(clearInterval, c), | |
d = o(setInterval, function() {}, c), | |
h = "TimerMixin_immediates", | |
f = a(clearImmediate, h), | |
m = o(setImmediate, f, h), | |
g = "TimerMixin_rafs", | |
_ = a(cancelAnimationFrame, g), | |
y = o(requestAnimationFrame, _, g), | |
v = { | |
componentWillUnmount: function() { | |
this[s] && this[s].forEach(this.clearTimeout), this[c] && this[c].forEach(this.clearInterval), this[h] && this[h].forEach(this.clearImmediate), this[g] && this[g].forEach(this.cancelAnimationFrame) | |
}, | |
setTimeout: u, | |
clearTimeout: l, | |
setInterval: d, | |
clearInterval: p, | |
setImmediate: m, | |
clearImmediate: f, | |
requestAnimationFrame: y, | |
cancelAnimationFrame: _ | |
}; | |
i.exports = v | |
}), __d("GroupRoute", ["DliteRoute"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DliteRoute"), | |
a = o.create({ | |
name: "GroupRoute", | |
path: "/{group}", | |
paramDefinitions: { | |
group: { | |
type: "String", | |
required: !0 | |
} | |
}, | |
queries: { | |
group: function(e, t, n) { | |
return function(e, t) { | |
var r = n.__GraphQL; | |
return new r.Query("node", [n.__var(e)], [new r.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], [n.__frag(t)], null, "GroupRoute_group") | |
}(e, t) | |
} | |
} | |
}); | |
i.exports = a | |
}), __d("THGroupView", ["LayoutAnimation", "FBSpinner", "FeedbackPoller", "GraphQL_EXPERIMENTAL", "GraphQLStore", "Image", "ListView", "ListViewDataSource", "NativeModules", "React", "ReactGraphQL", "RCTDeviceEventEmitter", "Dimensions", "RCTNativeAppEventEmitter", "StyleSheet", "Subscribable", "Text", "THColors", "THDockedInputContainer", "THFeedbackView", "THFeedUnitView", "THPinnedPostView", "TimerMixin", "TouchableHighlight", "View", "deepDiffer", "fbt", "fetchRQL", "invariant", "isEmpty", "ix", "keyOf", "merge", "rql", "uniqueKey"], function(e, t, n, r, i) { | |
"use strict"; { | |
var o = t("LayoutAnimation"), | |
a = t("FBSpinner"), | |
s = t("FeedbackPoller"), | |
l = t("GraphQL_EXPERIMENTAL"), | |
u = t("GraphQLStore"), | |
c = t("Image"), | |
p = t("ListView"), | |
d = t("ListViewDataSource"), | |
h = t("NativeModules"), | |
f = t("React"), | |
m = t("ReactGraphQL"), | |
g = t("RCTDeviceEventEmitter"), | |
_ = t("Dimensions"), | |
y = t("RCTNativeAppEventEmitter"), | |
v = t("StyleSheet"), | |
S = t("Subscribable"), | |
b = t("Text"), | |
R = t("THColors"), | |
w = t("THDockedInputContainer"), | |
C = t("THFeedbackView"), | |
E = t("THFeedUnitView"), | |
D = t("THPinnedPostView"), | |
T = t("TimerMixin"), | |
x = (t("TouchableHighlight"), t("View")), | |
P = t("deepDiffer"), | |
I = t("fbt"), | |
F = t("fetchRQL"), | |
L = t("invariant"), | |
M = t("isEmpty"), | |
Q = t("ix"), | |
A = t("keyOf"), | |
k = t("merge"), | |
O = t("rql"), | |
N = t("uniqueKey"), | |
G = A({ | |
dockedReplyContainerRef: null | |
}), | |
$ = h.RKUIManager, | |
B = h.RKTreehouseManager, | |
H = 5, | |
V = 36, | |
q = 70, | |
U = "gk_catalyst_th_live_update", | |
j = "th_group_comment_tti", | |
W = f.createClass({ | |
displayName: "THGroupView", | |
propTypes: { | |
navigator: f.PropTypes.object, | |
topInset: f.PropTypes.number, | |
bottomInset: f.PropTypes.number | |
}, | |
getDefaultProps: function() { | |
return { | |
topInset: 0, | |
bottomInset: 0 | |
} | |
}, | |
mixins: [m.Mixin, S.Mixin, T], | |
statics: { | |
queryParams: { | |
count: H | |
}, | |
queries: { | |
viewer: function(e, t) { | |
return function(e, n, r, i) { | |
var o = t.__GraphQL; | |
return new o.QueryFragment("THGroupView_viewer", "Viewer", [new o.Field("__configs__", [new o.Field("edges", [new o.Field("node", [new o.Field("name"), new o.Field("enabled")])], null, null, null, null, { | |
plural: !0, | |
edgesID: "THGroupView_viewer_1" | |
})], null, [new o.Callv("named", [t.__var(n)], { | |
varargs: 1 | |
})], null, null, { | |
connection: !0, | |
nonLimitable: !0, | |
nonFindable: !0 | |
})], [t.__frag(e), t.__frag(r), t.__frag(i)], { | |
scope: "THGroupView_viewer" | |
}) | |
}(E.getQuery("viewer"), U, C.getQuery("viewer"), D.getQuery("viewer")) | |
}, | |
group: function(e, t, n) { | |
return function(e, n, r, i) { | |
var o = t.__GraphQL; | |
return new o.QueryFragment("THGroupView_group", "Group", [new o.Field("id"), new o.Field("admin_aware_group", [new o.Field("group_stories", [new o.Field("edges", [new o.Field("cursor", null, null, null, null, null, { | |
requisite: !0 | |
}), new o.Field("node", [new o.Field("id", null, null, null, null, null, { | |
requisite: !0 | |
}), new o.Field("feedback", [new o.Field("id", null, null, null, null, null, { | |
requisite: !0 | |
}), new o.Field("top_level_comments", [new o.Field("last_view_time"), new o.Field("unread_count")], null, null, "top_level_comment_counts", null, { | |
connection: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new o.Field("creation_time")], [t.__frag(n)], null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
requisite: !0 | |
})], null, null, null, null, { | |
plural: !0, | |
edgesID: "THGroupView_group_1" | |
}), new o.Field("page_info", [new o.Field("has_next_page", null, null, null, null, null, { | |
requisite: !0 | |
}), new o.Field("has_previous_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
requisite: !0 | |
})], null, [new o.Callv("first", [t.__var(e)])], null, null, { | |
connection: !0 | |
}), new o.Field("group_pinned_stories", [new o.Field("count")], null, null, null, null, { | |
connection: !0 | |
}), new o.Field("visibility"), new o.Field("viewer_join_state"), new o.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
})], [t.__frag(r), t.__frag(i)], { | |
scope: "THGroupView_group" | |
}) | |
}(n.count, E.getQuery("story"), D.getQuery("group"), E.getQuery("group")) | |
} | |
}, | |
navItemTitle: function() { | |
return "Group" | |
}, | |
getFakeStoryView: function() { | |
var e = _.get("window").width; | |
return f.createElement(x, { | |
style: K.backdrop | |
}, f.createElement(x, { | |
style: K.divider | |
}), f.createElement(x, { | |
style: K.grayPadding | |
}), f.createElement(x, { | |
style: K.divider | |
}), f.createElement(x, { | |
style: K.fakeStoryCell | |
}, f.createElement(x, { | |
style: K.fakeStoryHeader | |
}, f.createElement(x, { | |
style: K.fakeStoryProfilePicture | |
}), f.createElement(x, null, f.createElement(x, { | |
style: [K.fakeStoryTextBlock, { | |
width: 120, | |
marginBottom: 10 | |
}] | |
}), f.createElement(x, { | |
style: [K.fakeStoryTextBlock, { | |
width: 100 | |
}] | |
}))), f.createElement(x, { | |
style: [K.fakeStoryTextBlock, { | |
width: e - 60, | |
marginTop: 8 | |
}] | |
}), f.createElement(x, { | |
style: [K.fakeStoryTextBlock, { | |
width: e - 70 | |
}] | |
}), f.createElement(x, { | |
style: [K.fakeStoryTextBlock, { | |
width: e - 90 | |
}] | |
}), f.createElement(x, { | |
style: [K.fakeStoryTextBlock, { | |
width: e - 70 | |
}] | |
}), f.createElement(x, { | |
style: [K.fakeStoryTextBlock, { | |
width: e - 90 | |
}] | |
}), f.createElement(x, { | |
style: [K.fakeStoryTextBlock, { | |
width: e - 60 | |
}] | |
}))) | |
}, | |
getNewDataSource: function() { | |
return new d({ | |
getRowData: function(e, t, n) { | |
return e[t][n] | |
}, | |
getSectionHeaderData: function(e, t) { | |
return e[t] | |
}, | |
rowHasChanged: function(e, t) { | |
return e.node !== t.node || P(e, t) | |
}, | |
sectionHeaderHasChanged: P | |
}) | |
} | |
}, | |
getInitialState: function() { | |
return { | |
dataSource: W.getNewDataSource(), | |
listData: {}, | |
submitCallback: null, | |
abortCallback: null, | |
hidePinnedPostSection: !1, | |
keyboardHeight: 0, | |
tappedFeedUnitHandle: null, | |
tappedUnitKey: null, | |
permalinkContentInsets: null, | |
contentInsets: { | |
top: this.props.topInset, | |
bottom: this.props.bottomInset | |
}, | |
olderPostsDividerKey: null | |
} | |
}, | |
getUpdatedDataSource: function(e) { | |
var t = [], | |
n = []; | |
for (var r in e) t.push(r), n.push(Object.keys(e[r])); | |
return this.state.dataSource.cloneWithRowsAndSections(e) | |
}, | |
getAdjacentKeys: function(e, t) { | |
var n, r, i = {}; | |
for (var o in t) { | |
if (r) return i[o] = o, i; | |
o === e && (n && (i[n] = n), r = !0), n = o | |
} | |
return i | |
}, | |
clearPermalinkMode: function() { | |
if (this.refs[G].enableScrollResponderAutoInsets(!0), this.state.tappedUnitKey in this.state.listData.storiesSection) { | |
var e = this.state.listData.storiesSection, | |
t = this.getAdjacentKeys(this.state.tappedUnitKey, e); | |
t[this.state.tappedUnitKey] = this.state.tappedUnitKey; | |
var n = {}; | |
for (var r in e) n[r] = r in t ? k(e[r], { | |
hideSeparator: !1, | |
hideAll: !1 | |
}) : e[r]; | |
var i = {}; | |
this.state.listData.pinnedPostSection && (i.pinnedPostSection = this.state.listData.pinnedPostSection), i.storiesSection = n, this.setState({ | |
listData: i, | |
dataSource: this.getUpdatedDataSource(i) | |
}) | |
} | |
this.setState({ | |
tappedFeedUnitHandle: null, | |
permalinkContentInsets: null, | |
tappedUnitKey: null | |
}) | |
}, | |
permalinkInsetsError: function(e) { | |
console.error("Error calculating insets for the permalink mode: ", e) | |
}, | |
onSetInsetFailure: function() { | |
console.error("Unable to set contentInsets when focusing story") | |
}, | |
renderFooter: function() { | |
return this.props.group && "CLOSED" === this.props.group.admin_aware_group.visibility && "MEMBER" !== this.props.group.admin_aware_group.viewer_join_state ? f.createElement(x, { | |
style: K.nonMemberView | |
}, f.createElement(c, { | |
style: K.lockIcon, | |
source: Q("thLockIcon") | |
}), f.createElement(x, { | |
style: K.nonMemberTextContainer | |
}, f.createElement(b, { | |
style: K.nonMemberText | |
}, I({ | |
type: "text", | |
texts: ["Only members can see posts"], | |
desc: "Explanation for why no group stories are shown" | |
})))) : this.props.group && this.props.group.admin_aware_group.group_stories && !this.props.group.admin_aware_group.group_stories.page_info.has_next_page ? f.createElement(x, { | |
style: K.tailLoadingIndicator | |
}, f.createElement(c, { | |
style: K.endDot, | |
source: Q("newsfeedEnd") | |
})) : this.state.listData.storiesSection ? f.createElement(x, { | |
style: K.tailLoadingIndicator | |
}, f.createElement(a, null)) : W.getFakeStoryView() | |
}, | |
renderRow: function(e, t, n) { | |
var r, i, o, a, s = e; | |
return "pinnedPostSection" === t ? r = f.createElement(D, { | |
key: n, | |
group: this.props.group, | |
navigator: this.props.navigator, | |
onInputRequested: this.handleInputRequested, | |
onPinUnpinStory: this.onPinUnpinStory, | |
onDeletePinnedStory: this.onDeletePinnedStory, | |
viewer: this.props.viewer | |
}) : "storiesSection" === t ? (s.hideAll ? a = K.hide : s.hideSeparator && (o = K.hide), s.node.id === this.state.olderPostsDividerKey && (i = f.createElement(x, { | |
style: [K.olderPostsHeader, o] | |
}, f.createElement(b, { | |
style: K.olderPostsText | |
}, I({ | |
type: "text", | |
texts: ["OLDER POSTS"], | |
desc: "Header for older group posts" | |
})))), r = f.createElement(E, { | |
onInputRequested: this.handleInputRequested, | |
story: s.node, | |
group: this.props.group, | |
viewer: this.props.viewer, | |
navigator: this.props.navigator, | |
key: n, | |
context: { | |
isGroupStream: !0 | |
}, | |
canCommentInline: !1, | |
onPinUnpinStory: this.onPinUnpinStory | |
})) : console.warn("Unrecognized sectionID: ", t), this.state.initialInsertionComplete, f.createElement(x, { | |
style: [K.backdrop, a] | |
}, f.createElement(x, { | |
style: [K.divider, o] | |
}), f.createElement(x, { | |
style: [K.grayPadding, o] | |
}), i, f.createElement(x, { | |
style: [K.divider, o] | |
}), r) | |
}, | |
isStoryUnread: function(e) { | |
var t = e.node.feedback.top_level_comment_counts; | |
if (!t) return !1; | |
var n = t.last_view_time ? e.node.creation_time > t.last_view_time : !1; | |
return n || t.unread_count > 0 | |
}, | |
handleInputRequested: function(e, t, n) { | |
this.setState({ | |
submitCallback: t, | |
abortCallback: n, | |
tappedFeedUnitHandle: e.tappedFeedUnitHandle, | |
tappedUnitKey: N(e.tappedFeedUnitID) | |
}), this.refs[G].initiateDockedInput(e), B && B.logEventWithDuration && this.requestAnimationFrame(function() { | |
var t = ((new Date).getTime() - e.tappedTime) / 1e3; | |
B.logEventWithDuration(j, t) | |
}) | |
}, | |
handleDidDock: function() { | |
this.enablePermalinkMode() | |
}, | |
enablePermalinkMode: function() { | |
this.state.tappedFeedUnitHandle && (this.refs[G].enableScrollResponderAutoInsets(!1), $.measureLayout(this.state.tappedFeedUnitHandle, this.refs[G].getScrollResponder().getNativeNode(), this.permalinkInsetsError, this.handleMeasureLayoutForPermalink)) | |
}, | |
handleMeasureLayoutForPermalink: function(e, t, n, r) { | |
var i = this.refs[G]; | |
$.getScrollViewContentSize(i.getScrollResponder().getNativeNode(), function(e) { | |
var n = i.getBarHeight() - i.getInitialBarHeight(), | |
o = this.state.keyboardHeight + n + r, | |
a = o + t - e.height, | |
s = _.get("modalFullscreenView").height, | |
l = q - t, | |
u = s - o - q; | |
if (u > 0 && (l += u), this.state.tappedFeedUnitHandle && !this.state.permalinkContentInsets) this.requestAnimationFrame(this.enablePermalinkMode); | |
else if (this.state.tappedUnitKey in this.state.listData.storiesSection) { | |
var c = this.state.listData.storiesSection, | |
p = this.getAdjacentKeys(this.state.tappedUnitKey, c), | |
d = {}; | |
for (var h in c) c[h].node || L(0, "Adjacent keys must have corresponding nodes."), d[h] = h in p ? k(c[h], { | |
hideSeparator: !1, | |
hideAll: !0 | |
}) : c[h]; | |
d[this.state.tappedUnitKey] = k(c[this.state.tappedUnitKey], { | |
hideSeparator: !0, | |
hideAll: !1 | |
}); | |
var f = {}; | |
this.state.listData.pinnedPostSection && (f.pinnedPostSection = this.state.listData.pinnedPostSection), f.storiesSection = d, this.setState({ | |
listData: f, | |
dataSource: this.getUpdatedDataSource(f) | |
}) | |
} | |
this.setState({ | |
permalinkContentInsets: { | |
top: l, | |
bottom: a | |
} | |
}) | |
}.bind(this), this.onSetInsetFailure) | |
}, | |
reloadFeedViewForGroup: function(e) { | |
this.props.group.id === e && this.props.forceUpdate({}) | |
}, | |
onPinUnpinStory: function() { | |
this.setState({ | |
hidePinnedPostSection: !1 | |
}) | |
}, | |
onDeletePinnedStory: function() { | |
this.setState({ | |
hidePinnedPostSection: !0 | |
}) | |
}, | |
cancelComment: function() { | |
this.clearPermalinkMode(), this.refs[G].cancelDockedInput() | |
}, | |
handleDockedReplyBarHeightChange: function() { | |
this.enablePermalinkMode() | |
}, | |
handleConfirmedNewPost: function() { | |
var e = this.props.group.admin_aware_group.group_stories.edges[0].cursor, | |
t = W.getQueriesForRoute(this.context.route), | |
n = t.group.getQuery().getUnaliasedFields("admin_aware_group")[0].getUnaliasedFields("group_stories")[0], | |
r = new l.QueryFragment("GroupStoriesFragment", "GroupStoriesConnection", n.getOwnFields(), n.getFragments()), | |
i = new l.QueryWithValues(function(e, t, n, r) { | |
var i = O.__GraphQL; | |
return new i.Query("node", [O.__var(e)], [new i.Field("admin_aware_group", [new i.Field("group_stories", null, [O.__frag(r)], [new i.Callv("before", [O.__var(t)]), new i.Callv("first", [O.__var(n)])], null, null, { | |
connection: !0 | |
}), new i.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id" | |
}), new i.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, "THGroupView_q0") | |
}(this.props.group.id, e, this.queryParams.count, r), {}); | |
F(i).then(function(e) { | |
if (e.errors && e.errors.length) console.error("Error from fetching new story: ", e.errors[0]); | |
else { | |
var t = e.response; | |
u.handleUpdate(t, i); | |
var n = t[this.props.group.id], | |
r = Object.keys(n), | |
o = n[r[0]].edges.length; | |
this.setQueryParams({ | |
count: this.queryParams.count + o | |
}) | |
} | |
}.bind(this)) | |
}, | |
updateFeedbackPollerForRange: function() {}, | |
handleKeyboardWillShow: function(e) { | |
var t = _.get("modalFullscreenView").height - e.endCoordinates.screenY; | |
t !== this.state.keyboardHeight && this.setState({ | |
keyboardHeight: t | |
}) | |
}, | |
componentWillMount: function() { | |
this.addListenerOn(y, "handleConfirmedNewPost", this.handleConfirmedNewPost), this.addListenerOn(y, "reloadFeedViewForGroup", this.reloadFeedViewForGroup), this.addListenerOn(y, "cancelComment", this.cancelComment), this.addListenerOn(g, "keyboardWillShow", this.handleKeyboardWillShow), this._setupGroupStories(this.props) | |
}, | |
componentWillReceiveProps: function(e) { | |
this._setupGroupStories(e) | |
}, | |
componentDidUpdate: function() { | |
this.props.group && B && B.groupViewComponentDidUpdate && B.groupViewComponentDidUpdate(this.props.group.id) | |
}, | |
componentDidMount: function() { | |
if (this.props.group) { | |
var e = this.refs[G].getScrollResponder(); | |
e.setNativeProps({ | |
contentOffset: { | |
y: -this.props.topInset | |
} | |
}), B && this.requestAnimationFrame(function() { | |
B.groupViewComponentDidUpdate && B.groupViewComponentDidUpdate(this.props.group.id), B.logEventEnded && (B.logEventEnded(this.props.groupProfileLoadTTI), B.logEventEnded(this.props.groupPostNotifTTI)) | |
}.bind(this)), this._pollingStories = {}, this.enablePollerIfNeeded(this.props) | |
} | |
}, | |
componentWillUnmount: function() { | |
for (var e in this._pollingStories) s.unregister(e) | |
}, | |
enablePollerIfNeeded: function(e) { | |
var t = e.viewer && e.viewer.__configs__ && e.viewer.__configs__.edges; | |
if (t) { | |
var n = t.filter(function(e) { | |
return e.node.name === U | |
}); | |
M(n) || s.enablePoller(n[0].node.enabled) | |
} | |
}, | |
_onChangeVisibleRows: function(e, t) { | |
for (var n in t) { | |
var r = t[n], | |
i = this.state.listData[n]; | |
for (var o in r) { | |
var a = i[o]; | |
if (a && a.node && a.node.feedback) { | |
var l = a.node.feedback.id; | |
r[o] && !this._pollingStories[l] ? (s.register(l), this._pollingStories[l] = !0) : !r[o] && this._pollingStories[l] && (s.unregister(l), delete this._pollingStories[l]) | |
} | |
} | |
} | |
}, | |
_setupGroupStories: function(e) { | |
if (this.enablePollerIfNeeded(e), e.group && e.group.admin_aware_group.group_stories) { | |
for (var t, n = e.group.admin_aware_group.group_stories.edges, r = {}, i = this.state.olderPostsDividerKey, o = 0; o < n.length; o++) { | |
var a = { | |
node: n[o].node | |
}, | |
s = N(a.node.id); | |
this.state.tappedUnitKey ? s === this.state.tappedUnitKey ? (t && (r[t].hideAll = !0), a.hideSeparator = !0) : t === this.state.tappedUnitKey && (a.hideAll = !0) : (a.hideAll = !1, a.hideSeparator = !1), null === i && t && this.isStoryUnread(r[t]) && !this.isStoryUnread(a) && (i = a.node.id), a.local_id = s, r[s] = a, t = s | |
} | |
this.setState({ | |
olderPostsDividerKey: i | |
}); | |
var l = {}; | |
if (e.group.admin_aware_group.group_pinned_stories.count > 0 && !this.state.hidePinnedPostSection && ("MEMBER" === e.group.admin_aware_group.viewer_join_state || "OPEN" === e.group.admin_aware_group.visibility)) { | |
var u = N("PINNED_POST_KEY"); | |
l[u] = {} | |
} | |
var c = {}; | |
M(l) || (c.pinnedPostSection = l), c.storiesSection = r, this.setState({ | |
listData: c, | |
dataSource: this.getUpdatedDataSource(c) | |
}) | |
} | |
}, | |
handleDockedCommentSubmit: function(e, t) { | |
this.clearPermalinkMode(), this.state.submitCallback(e, t) | |
}, | |
handleDockedCommentAbort: function(e) { | |
this.clearPermalinkMode(), this.state.abortCallback && this.state.abortCallback(e) | |
}, | |
hasMoreToLoad: function() { | |
return this.props.group && this.props.group.admin_aware_group.group_stories && this.props.group.admin_aware_group.group_stories.page_info.has_next_page | |
}, | |
loadMoreIfNeeded: function() { | |
this.hasMoreToLoad() && this.setQueryParams({ | |
count: this.queryParams.count + H | |
}) | |
}, | |
render: function() { | |
if (!this.props.group) return f.createElement(x, null); | |
var e = this.state.contentInsets; | |
null !== this.state.permalinkContentInsets && (e = this.state.permalinkContentInsets); | |
var t = f.createElement(p, { | |
dataSource: this.state.dataSource, | |
renderRow: this.renderRow, | |
renderFooter: this.renderFooter, | |
onChangeVisibleRows: this._onChangeVisibleRows, | |
onEndReached: this.loadMoreIfNeeded, | |
onEndReachedDistance: 100, | |
showsVerticalScrollIndicator: !1, | |
contentInset: e, | |
scrollIndicatorInsets: e, | |
removeClippedSubviews: !0 | |
}); | |
return f.createElement(w, { | |
ref: G, | |
groupID: this.props.group.id, | |
scrollResponder: t, | |
onDockedCommentSubmit: this.handleDockedCommentSubmit, | |
onDockedCommentAbort: this.handleDockedCommentAbort, | |
onDidDock: this.handleDidDock, | |
onHeightChange: this.handleDockedReplyBarHeightChange | |
}) | |
} | |
}), | |
K = v.create({ | |
backdrop: { | |
backgroundColor: R.backgroundColor, | |
overflow: "hidden" | |
}, | |
divider: { | |
height: .5, | |
backgroundColor: R.borderColor | |
}, | |
endDot: { | |
width: 10, | |
height: 10 | |
}, | |
fakeStoryCell: { | |
justifyContent: "space-between", | |
alignItems: "flex-start", | |
paddingLeft: 16, | |
height: 140, | |
marginBottom: 30, | |
marginTop: 20, | |
backgroundColor: R.backgroundColor | |
}, | |
fakeStoryHeader: { | |
flexDirection: "row", | |
alignItems: "center" | |
}, | |
fakeStoryProfilePicture: { | |
width: V, | |
height: V, | |
borderRadius: V / 2, | |
marginRight: 12, | |
backgroundColor: R.fakeStoryTextBlock | |
}, | |
fakeStoryTextBlock: { | |
height: 5, | |
backgroundColor: R.fakeStoryTextBlock | |
}, | |
grayPadding: { | |
height: 11, | |
backgroundColor: R.backgroundWash | |
}, | |
hide: { | |
opacity: 0 | |
}, | |
lockIcon: { | |
height: 30, | |
width: 30 | |
}, | |
nonMemberText: { | |
fontSize: 17, | |
color: R.feedbackFadedText | |
}, | |
nonMemberTextContainer: { | |
paddingTop: 10 | |
}, | |
nonMemberView: { | |
backgroundColor: R.backgroundWash, | |
alignItems: "center", | |
paddingTop: 46 | |
}, | |
olderPostsHeader: { | |
alignItems: "center", | |
backgroundColor: R.backgroundWash, | |
flexDirection: "row", | |
height: 24, | |
paddingLeft: 16 | |
}, | |
olderPostsText: { | |
color: R.feedbackFadedText, | |
fontSize: 12 | |
}, | |
tailLoadingIndicator: { | |
backgroundColor: R.backgroundWash, | |
paddingTop: 0, | |
height: 52, | |
justifyContent: "center", | |
alignItems: "center" | |
} | |
}); | |
({ | |
layout: { | |
renderPost: { | |
duration: .3, | |
create: { | |
type: o.Types.easeInEaseOut, | |
property: o.Properties.opacity | |
}, | |
update: { | |
type: o.Types.easeInEaseOut | |
} | |
} | |
} | |
}) | |
} | |
i.exports = W | |
}), __d("LayoutAnimation", ["ReactPropTypes", "NativeModules", "createStrictShapeTypeChecker", "keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactPropTypes"), | |
a = t("NativeModules").RKUIManager, | |
s = t("createStrictShapeTypeChecker"), | |
l = t("keyMirror"), | |
u = l({ | |
spring: !0, | |
linear: !0, | |
easeInEaseOut: !0, | |
easeIn: !0, | |
easeOut: !0 | |
}), | |
c = l({ | |
opacity: !0, | |
scaleXY: !0 | |
}), | |
p = s({ | |
duration: o.number, | |
delay: o.number, | |
springDamping: o.number, | |
initialVelocity: o.number, | |
type: o.oneOf(Object.keys(u)), | |
property: o.oneOf(Object.keys(c)) | |
}), | |
d = s({ | |
duration: o.number.isRequired, | |
create: p, | |
update: p, | |
"delete": p | |
}), | |
h = { | |
configureNext: function(e, t, n) { | |
d({ | |
config: e | |
}, "config", "LayoutAnimation.configureNext"), a.configureNextLayoutAnimation(e, t, n) | |
}, | |
create: function(e, t, n) { | |
return { | |
duration: e, | |
create: { | |
type: t, | |
property: n | |
}, | |
update: { | |
type: t | |
} | |
} | |
}, | |
Types: u, | |
Properties: c, | |
configChecker: d | |
}; | |
h.Presets = { | |
easeInEaseOut: h.create(.3, u.easeInEaseOut, c.opacity), | |
linear: h.create(.5, u.linear, c.opacity), | |
spring: { | |
duration: .7, | |
create: { | |
type: u.linear, | |
property: c.opacity | |
}, | |
update: { | |
type: u.spring, | |
springDamping: .4 | |
} | |
} | |
}, i.exports = h | |
}), __d("FeedbackPoller", ["ErrorUtils", "GraphQL_EXPERIMENTAL", "GraphQLConstants", "GraphQLMutatorConstants", "GraphQLStore", "RQLRequest", "isEmpty", "fetchBatchedRQL", "rql"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() { | |
if (g(R) || !C) return s(), void(w = null); | |
var e = function(e, t, n) { | |
t ? console.error("Error from feedback poller: ", t) : f.handleUpdate(n, e, h.POLLER_UPDATE) | |
}, | |
t = []; | |
for (var n in R) { | |
var r = u(n), | |
i = l(n, r), | |
o = new p.QueryWithValues(i, {}); | |
t.push(new m(n, o, c.guard(e.bind(null, o), "FeedbackPoller:handleResponse"))) | |
} | |
t.length > 0 && _(t), a() | |
} | |
function a() { | |
C && (w = setTimeout(c.guard(o, "FeedbackPoller:schedule"), b)) | |
} | |
function s() { | |
w = null, R = {}, clearTimeout(w) | |
} | |
function l(e, t) { | |
var n = R[e], | |
r = null; | |
return t && t !== S && (r = function(e, t, n) { | |
var r = y.__GraphQL; | |
return new r.QueryFragment("FeedbackPoller_f0", "Node", [new r.Field("top_level_comments", null, [y.__frag(n)], [new r.Callv("before", [y.__var(e)]), new r.Callv("first", [y.__var(t)])], null, null, { | |
connection: !0 | |
}), new r.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})]) | |
}(t, v, n)), | |
function(e, t) { | |
var n = y.__GraphQL; | |
return new n.Query("node", [y.__var(e)], [new n.Field("likers", [new n.Field("count")], null, null, null, null, { | |
connection: !0, | |
nonFindable: !0 | |
}), new n.Field("does_viewer_like"), new n.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], [y.__frag(t)], null, "FeedbackPoller_q0") | |
}(e, r) | |
} | |
function u(e) { | |
var t = function(e) { | |
var t = y.__GraphQL; | |
return new t.Query("node", [y.__var(e)], [new t.Field("top_level_comments", [new t.Field("edges", [new t.Field("cursor", null, null, null, null, null, { | |
requisite: !0 | |
}), new t.Field("node", [new t.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
rootCall: "node", | |
pk: "id", | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
plural: !0 | |
}), new t.Field("page_info", [new t.Field("has_next_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
}), new t.Field("has_previous_page", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, [new t.Callv("first", ["1"])], null, null, { | |
connection: !0 | |
}), new t.Field("id", null, null, null, null, null, { | |
generated: !0, | |
requisite: !0 | |
})], null, null, "FeedbackPoller_q0") | |
}(e), | |
n = f.resolveQueryFromStore(new p.QueryWithValues(t, {})); | |
return n && n[e] && n[e].top_level_comments && n[e].top_level_comments.edges[0] && n[e].top_level_comments.edges[0].cursor | |
} | |
var c = t("ErrorUtils"), | |
p = t("GraphQL_EXPERIMENTAL"), | |
d = t("GraphQLConstants"), | |
h = t("GraphQLMutatorConstants"), | |
f = t("GraphQLStore"), | |
m = t("RQLRequest"), | |
g = t("isEmpty"), | |
_ = t("fetchBatchedRQL"), | |
y = t("rql"), | |
v = 10, | |
S = d.DUMMY_CURSOR_ID, | |
b = 15e3, | |
R = {}, | |
w = null, | |
C = !1, | |
E = { | |
enablePoller: function(e) { | |
C !== e && (C = e, C || s()) | |
}, | |
register: function(e) { | |
if (C && e) { | |
if (!R[e]) { | |
var t = f.getTrackedQueryByID(e), | |
n = t.getUnaliasedFields("top_level_comments"); | |
n = n.filter(function(e) { | |
return "top_level_comment_counts" !== e.getAlias() | |
}, n); | |
var r = n.map(function(e) { | |
return new p.QueryFragment("FeedbackPollerFragment", "CommentsConnection", e.getOwnFields(), e.getFragments()) | |
}); | |
R[e] = new p.QueryFragment("FeedbackPoller", "CommentsConnection", null, r) | |
} | |
w || a() | |
} | |
}, | |
unregister: function(e) { | |
e && delete R[e] | |
} | |
}; | |
i.exports = E | |
}), __d("Image", ["EdgeInsetsPropType", "NativeMethodsMixin", "NativeModulesDeprecated", "ReactPropTypes", "ImageResizeMode", "ImageSourcePropType", "ImageStylePropTypes", "React", "ReactIOSViewAttributes", "StyleSheet", "StyleSheetPropType", "createReactIOSNativeComponentClass", "flattenStyle", "insetsDiffer", "invariant", "merge", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("EdgeInsetsPropType"), | |
a = t("NativeMethodsMixin"), | |
s = t("NativeModulesDeprecated"), | |
l = t("ReactPropTypes"), | |
u = t("ImageResizeMode"), | |
c = t("ImageSourcePropType"), | |
p = t("ImageStylePropTypes"), | |
d = t("React"), | |
h = t("ReactIOSViewAttributes"), | |
f = t("StyleSheet"), | |
m = t("StyleSheetPropType"), | |
g = t("createReactIOSNativeComponentClass"), | |
_ = t("flattenStyle"), | |
y = t("insetsDiffer"), | |
v = t("invariant"), | |
S = t("merge"), | |
b = t("warning"), | |
R = d.createClass({ | |
displayName: "Image", | |
propTypes: { | |
source: c, | |
accessible: l.bool, | |
accessibilityLabel: l.string, | |
capInsets: o, | |
style: m(p), | |
testID: l.string | |
}, | |
statics: { | |
resizeMode: u, | |
sourcePropType: c | |
}, | |
mixins: [a], | |
viewConfig: { | |
uiViewClassName: "UIView", | |
validAttributes: h.UIView | |
}, | |
render: function() { | |
var e = _([w.base, this.props.style]), | |
t = this.props.source, | |
n = t.uri && t.uri.match(/^https?:/); | |
n && t.isStatic && v(0, 'static image uris cannot start with "http": "' + t.uri + '"'); | |
var r = !t.isStatic && !n, | |
i = n ? D : E; | |
this.props.style && this.props.style.tintColor && b(i === E, "tintColor style only supported on static images."); | |
var o, a = s.RKUIManager.UIView.ContentMode; | |
o = e.resizeMode === u.stretch ? a.ScaleToFill : e.resizeMode === u.contain ? a.ScaleAspectFit : a.ScaleAspectFill; | |
var l = S(this.props, { | |
style: e, | |
resizeMode: o, | |
tintColor: e.tintColor | |
}); | |
return r ? l.imageTag = t.uri : l.src = t.uri, d.createElement(i, Object.assign({}, l)) | |
} | |
}), | |
w = f.create({ | |
base: { | |
overflow: "hidden" | |
} | |
}), | |
C = S(h.UIView, { | |
accessible: !0, | |
accessibilityLabel: !0, | |
capInsets: { | |
diff: y | |
}, | |
imageTag: !0, | |
resizeMode: !0, | |
src: !0, | |
testID: l.string | |
}), | |
E = g({ | |
validAttributes: S(C, { | |
tintColor: !0 | |
}), | |
uiViewClassName: "RCTStaticImage" | |
}), | |
D = g({ | |
validAttributes: S(C, { | |
defaultImageSrc: !0 | |
}), | |
uiViewClassName: "RCTNetworkImageView" | |
}); | |
i.exports = R | |
}), __d("EdgeInsetsPropType", ["ReactPropTypes", "createStrictShapeTypeChecker", "insetsDiffer"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactPropTypes"), | |
a = t("createStrictShapeTypeChecker"), | |
s = t("insetsDiffer"), | |
l = a({ | |
top: o.number, | |
left: o.number, | |
bottom: o.number, | |
right: o.number | |
}); | |
l.differ = s, i.exports = l | |
}), __d("insetsDiffer", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
top: void 0, | |
left: void 0, | |
right: void 0, | |
bottom: void 0 | |
}, | |
a = function(e, t) { | |
return e = e || o, t = t || o, e !== t && (e.top !== t.top || e.left !== t.left || e.right !== t.right || e.bottom !== t.bottom) | |
}; | |
i.exports = a | |
}), __d("ImageSourcePropType", ["React"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("React"), | |
a = o.PropTypes, | |
s = a.shape({ | |
uri: a.string.isRequired, | |
width: a.number, | |
height: a.number | |
}); | |
i.exports = s | |
}), __d("ListView", ["ListViewDataSource", "React", "NativeModules", "ScrollView", "ScrollResponder", "StaticRenderer", "TimerMixin", "logError", "merge", "isEmpty"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ListViewDataSource"), | |
a = t("React"), | |
s = t("NativeModules").RKUIManager, | |
l = t("ScrollView"), | |
u = t("ScrollResponder"), | |
c = t("StaticRenderer"), | |
p = t("TimerMixin"), | |
d = t("logError"), | |
h = t("merge"), | |
f = t("isEmpty"), | |
m = a.PropTypes, | |
g = 1, | |
_ = 10, | |
y = 1e3, | |
v = 1e3, | |
S = 50, | |
b = 20, | |
R = "listviewscroll", | |
w = a.createClass({ | |
displayName: "ListView", | |
mixins: [u.Mixin, p], | |
propTypes: h(l.PropTypes, { | |
dataSource: m.instanceOf(o).isRequired, | |
renderRow: m.func.isRequired, | |
initialListSize: m.number, | |
onEndReached: m.func, | |
onEndReachedThreshold: m.number, | |
pageSize: m.number, | |
renderFooter: m.func, | |
renderHeader: m.func, | |
renderSectionHeader: m.func, | |
scrollRenderAheadDistance: a.PropTypes.number, | |
onChangeVisibleRows: a.PropTypes.func, | |
removeClippedSubviews: a.PropTypes.bool | |
}), | |
getMetrics: function() { | |
return { | |
contentHeight: this.scrollProperties.contentHeight, | |
totalRows: this.props.dataSource.getRowCount(), | |
renderedRows: this.state.curRenderedRowsCount, | |
visibleRows: Object.keys(this._visibleRows).length | |
} | |
}, | |
getScrollResponder: function() { | |
return this.refs[R] | |
}, | |
setNativeProps: function(e) { | |
this.refs[R].setNativeProps(e) | |
}, | |
getDefaultProps: function() { | |
return { | |
initialListSize: _, | |
pageSize: g, | |
scrollRenderAheadDistance: y, | |
onEndReachedThreshold: v | |
} | |
}, | |
getInitialState: function() { | |
return { | |
curRenderedRowsCount: this.props.initialListSize, | |
prevRenderedRowsCount: 0 | |
} | |
}, | |
componentWillMount: function() { | |
this.scrollProperties = { | |
visibleHeight: null, | |
contentHeight: null, | |
offsetY: 0 | |
}, this._childFrames = [], this._visibleRows = {} | |
}, | |
componentDidMount: function() { | |
this.requestAnimationFrame(function() { | |
this._measureAndUpdateScrollProps(), this.setInterval(this._renderMoreRowsIfNeeded, b) | |
}.bind(this)) | |
}, | |
componentWillReceiveProps: function(e) { | |
this.props.dataSource !== e.dataSource && this.setState({ | |
prevRenderedRowsCount: 0 | |
}) | |
}, | |
render: function() { | |
for (var e = [], t = this.props.dataSource, n = t.rowIdentities, r = 0, i = [], o = this.props.renderHeader && this.props.renderHeader(), s = this.props.renderFooter && this.props.renderFooter(), u = o ? 1 : 0, p = 0; p < n.length; p++) { | |
var d = t.sectionIdentities[p], | |
f = n[p]; | |
if (0 !== f.length) { | |
if (this.props.renderSectionHeader) { | |
var m = r >= this.state.prevRenderedRowsCount && t.sectionHeaderShouldUpdate(p); | |
e.push(a.createElement(c, { | |
key: "s_" + d, | |
shouldUpdate: !!m, | |
render: this.props.renderSectionHeader.bind(null, t.getSectionHeaderData(p), d) | |
})), i.push(u++) | |
} | |
for (var g = 0; g < f.length; g++) { | |
var _ = f[g], | |
y = d + _, | |
v = r >= this.state.prevRenderedRowsCount && t.rowShouldUpdate(p, g), | |
b = a.createElement(c, { | |
key: "r_" + y, | |
shouldUpdate: !!v, | |
render: this.props.renderRow.bind(null, t.getRowData(p, g), d, _) | |
}); | |
if (e.push(b), u++, ++r === this.state.curRenderedRowsCount) break | |
} | |
if (r >= this.state.curRenderedRowsCount) break | |
} | |
} | |
var w = h(this.props, { | |
onScroll: this._onScroll, | |
stickyHeaderIndices: i | |
}); | |
return w.throttleScrollCallbackMS || (w.throttleScrollCallbackMS = S), a.createElement(l, Object.assign({}, w, { | |
ref: R | |
}), o, e, s) | |
}, | |
_measureAndUpdateScrollProps: function() { | |
s.measureLayout(this.refs[R].getInnerViewNode(), this.refs[R].getNodeHandle(), d, this._setScrollContentHeight), s.measureLayoutRelativeToParent(this.refs[R].getNodeHandle(), d, this._setScrollVisibleHeight) | |
}, | |
_setScrollContentHeight: function(e, t, n, r) { | |
this.scrollProperties.contentHeight = r | |
}, | |
_setScrollVisibleHeight: function(e, t, n, r) { | |
this.scrollProperties.visibleHeight = r, this._updateVisibleRows() | |
}, | |
_renderMoreRowsIfNeeded: function() { | |
if (null !== this.scrollProperties.contentHeight && null !== this.scrollProperties.visibleHeight && this.state.curRenderedRowsCount !== this.props.dataSource.getRowCount()) { | |
var e = this._getDistanceFromEnd(this.scrollProperties); | |
e < this.props.scrollRenderAheadDistance && this._pageInNewRows() | |
} | |
}, | |
_pageInNewRows: function() { | |
var e = Math.min(this.state.curRenderedRowsCount + this.props.pageSize, this.props.dataSource.getRowCount()); | |
this.setState({ | |
prevRenderedRowsCount: this.state.curRenderedRowsCount, | |
curRenderedRowsCount: e | |
}, function() { | |
this._measureAndUpdateScrollProps(), this.setState({ | |
prevRenderedRowsCount: this.state.curRenderedRowsCount | |
}) | |
}.bind(this)) | |
}, | |
_getDistanceFromEnd: function(e) { | |
return e.contentHeight - e.visibleHeight - e.offsetY | |
}, | |
_updateVisibleRows: function(e) { | |
if (this.props.onChangeVisibleRows) { | |
var t = e && e.nativeEvent.updatedChildFrames; | |
t && t.forEach(function(e) { | |
this._childFrames[e.index] = h(e) | |
}.bind(this)); | |
for (var n = this.props.dataSource, r = this.scrollProperties.offsetY, i = r + this.scrollProperties.visibleHeight, o = n.rowIdentities, a = this.props.renderHeader && this.props.renderHeader(), s = a ? 1 : 0, l = !1, u = {}, c = 0; c < o.length; c++) { | |
var p = o[c]; | |
if (0 !== p.length) { | |
var d = n.sectionIdentities[c]; | |
this.props.renderSectionHeader && s++; | |
var m = this._visibleRows[d]; | |
m || (m = {}); | |
for (var g = 0; g < p.length; g++) { | |
var _ = p[g], | |
y = this._childFrames[s]; | |
if (s++, !y) break; | |
var v = m[_], | |
S = y.y, | |
b = S + y.height; | |
S > i || r > b ? v && (l = !0, delete m[_], u[d] || (u[d] = {}), u[d][_] = !1) : v || (l = !0, m[_] = !0, u[d] || (u[d] = {}), u[d][_] = !0) | |
} | |
f(m) ? this._visibleRows[d] && delete this._visibleRows[d] : this._visibleRows[d] = m | |
} | |
} | |
l && this.props.onChangeVisibleRows(this._visibleRows, u) | |
} | |
}, | |
_onScroll: function(e) { | |
this.scrollProperties.visibleHeight = e.nativeEvent.layoutMeasurement.height, this.scrollProperties.contentHeight = e.nativeEvent.contentSize.height, this.scrollProperties.offsetY = e.nativeEvent.contentOffset.y, this._updateVisibleRows(e); | |
var t = this._getDistanceFromEnd(this.scrollProperties) < this.props.onEndReachedThreshold; | |
t && this.props.onEndReached && this.scrollProperties.contentHeight !== this._sentEndForContentHeight && this.state.curRenderedRowsCount === this.props.dataSource.getRowCount() ? (this._sentEndForContentHeight = this.scrollProperties.contentHeight, this.props.onEndReached(e)) : this._renderMoreRowsIfNeeded(), this.props.onScroll && this.props.onScroll(e) | |
} | |
}); | |
i.exports = w | |
}), __d("ListViewDataSource", ["invariant", "isEmpty", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
return e[t][n] | |
} | |
function a(e, t) { | |
return e[t] | |
} | |
function s(e) { | |
e && "function" == typeof e.rowHasChanged || c(0, "Must provide a rowHasChanged function."), this.$ListViewDataSource_rowHasChanged = e.rowHasChanged, this.$ListViewDataSource_getRowData = e.getRowData || o, this.$ListViewDataSource_sectionHeaderHasChanged = e.sectionHeaderHasChanged, this.$ListViewDataSource_getSectionHeaderData = e.getSectionHeaderData || a, this.$ListViewDataSource_dataBlob = null, this.$ListViewDataSource_dirtyRows = [], this.$ListViewDataSource_dirtySections = [], this.$ListViewDataSource_cachedRowCount = 0, this.rowIdentities = [], this.sectionIdentities = [] | |
} | |
function l(e) { | |
for (var t = 0, n = 0; n < e.length; n++) { | |
var r = e[n]; | |
t += r.length | |
} | |
return t | |
} | |
function u(e) { | |
if (p(e)) return {}; | |
for (var t = {}, n = 0; n < e.length; n++) { | |
var r = e[n]; | |
d(!t[r], "Value appears more than once in array: " + r), t[r] = !0 | |
} | |
return t | |
} | |
var c = t("invariant"), | |
p = t("isEmpty"), | |
d = t("warning"); | |
s.prototype.cloneWithRows = function(e, t) { | |
var n = t ? [t] : null; | |
return this.$ListViewDataSource_sectionHeaderHasChanged || (this.$ListViewDataSource_sectionHeaderHasChanged = function() { | |
return !1 | |
}), this.cloneWithRowsAndSections({ | |
s1: e | |
}, ["s1"], n) | |
}, s.prototype.cloneWithRowsAndSections = function(e, t, n) { | |
"function" != typeof this.$ListViewDataSource_sectionHeaderHasChanged && c(0, "Must provide a sectionHeaderHasChanged function with section data."); | |
var r = new s({ | |
getRowData: this.$ListViewDataSource_getRowData, | |
getSectionHeaderData: this.$ListViewDataSource_getSectionHeaderData, | |
rowHasChanged: this.$ListViewDataSource_rowHasChanged, | |
sectionHeaderHasChanged: this.$ListViewDataSource_sectionHeaderHasChanged | |
}); | |
return r.$ListViewDataSource_dataBlob = e, r.sectionIdentities = t ? t : Object.keys(e), n ? r.rowIdentities = n : (r.rowIdentities = [], r.sectionIdentities.forEach(function(t) { | |
r.rowIdentities.push(Object.keys(e[t])) | |
})), r.$ListViewDataSource_cachedRowCount = l(r.rowIdentities), r.$ListViewDataSource_calculateDirtyArrays(this.$ListViewDataSource_dataBlob, this.sectionIdentities, this.rowIdentities), r | |
}, s.prototype.getRowCount = function() { | |
return this.$ListViewDataSource_cachedRowCount | |
}, s.prototype.rowShouldUpdate = function(e, t) { | |
var n = this.$ListViewDataSource_dirtyRows[e][t]; | |
return d(void 0 !== n, "missing dirtyBit for section, row: " + e + ", " + t), n | |
}, s.prototype.getRowData = function(e, t) { | |
var n = this.sectionIdentities[e], | |
r = this.rowIdentities[e][t]; | |
return d(void 0 !== n && void 0 !== r, "rendering invalid section, row: " + e + ", " + t), this.$ListViewDataSource_getRowData(this.$ListViewDataSource_dataBlob, n, r) | |
}, s.prototype.getRowIDForFlatIndex = function(e) { | |
for (var t = e, n = 0; n < this.sectionIdentities.length; n++) { | |
if (!(t >= this.rowIdentities[n].length)) return this.rowIdentities[n][t]; | |
t -= this.rowIdentities[n].length | |
} | |
}, s.prototype.getSectionIDForFlatIndex = function(e) { | |
for (var t = e, n = 0; n < this.sectionIdentities.length; n++) { | |
if (!(t >= this.rowIdentities[n].length)) return this.sectionIdentities[n]; | |
t -= this.rowIdentities[n].length | |
} | |
}, s.prototype.getSectionLengths = function() { | |
for (var e = [], t = 0; t < this.sectionIdentities.length; t++) e.push(this.rowIdentities[t].length); | |
return e | |
}, s.prototype.sectionHeaderShouldUpdate = function(e) { | |
var t = this.$ListViewDataSource_dirtySections[e]; | |
return d(void 0 !== t, "missing dirtyBit for section: " + e), t | |
}, s.prototype.getSectionHeaderData = function(e) { | |
if (!this.$ListViewDataSource_getSectionHeaderData) return null; | |
var t = this.sectionIdentities[e]; | |
return d(void 0 !== t, "renderSection called on invalid section: " + e), this.$ListViewDataSource_getSectionHeaderData(this.$ListViewDataSource_dataBlob, t) | |
}, s.prototype.$ListViewDataSource_calculateDirtyArrays = function(e, t, n) { | |
for (var r = u(t), i = {}, o = 0; o < n.length; o++) { | |
var a = t[o]; | |
d(!i[a], "SectionID appears more than once: " + a), i[a] = u(n[o]) | |
} | |
this.$ListViewDataSource_dirtySections = [], this.$ListViewDataSource_dirtyRows = []; | |
for (var s, l = 0; l < this.sectionIdentities.length; l++) { | |
var a = this.sectionIdentities[l]; | |
s = !r[a]; | |
var c = this.$ListViewDataSource_sectionHeaderHasChanged; | |
!s && c && (s = c(this.$ListViewDataSource_getSectionHeaderData(e, a), this.$ListViewDataSource_getSectionHeaderData(this.$ListViewDataSource_dataBlob, a))), this.$ListViewDataSource_dirtySections.push(!!s), this.$ListViewDataSource_dirtyRows[l] = []; | |
for (var p = 0; p < this.rowIdentities[l].length; p++) { | |
var h = this.rowIdentities[l][p]; | |
s = !r[a] || !i[a][h] || this.$ListViewDataSource_rowHasChanged(this.$ListViewDataSource_getRowData(e, a, h), this.$ListViewDataSource_getRowData(this.$ListViewDataSource_dataBlob, a, h)), this.$ListViewDataSource_dirtyRows[l].push(!!s) | |
} | |
} | |
}, i.exports = s | |
}), __d("ScrollView", ["ArrayOfPropType", "React", "ReactIOSViewAttributes", "ReactIOSTagHandles", "NativeModules", "NativeModulesDeprecated", "ScrollResponder", "ScrollViewPropTypes", "StyleSheetPropType", "StyleSheet", "View", "ViewStylePropTypes", "createReactIOSNativeComponentClass", "flattenStyle", "invariant", "merge", "nativePropType", "validAttributesFromPropTypes", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ArrayOfPropType"), | |
a = t("React"), | |
s = t("ReactIOSViewAttributes"), | |
l = t("ReactIOSTagHandles"), | |
u = t("NativeModules").RKUIManager.RCTScrollView, | |
c = u.Constants, | |
p = t("NativeModulesDeprecated").RKUIManager, | |
d = t("ScrollResponder"), | |
h = t("ScrollViewPropTypes"), | |
f = t("StyleSheetPropType"), | |
m = t("StyleSheet"), | |
g = t("View"), | |
_ = t("ViewStylePropTypes"), | |
y = t("createReactIOSNativeComponentClass"), | |
v = t("flattenStyle"), | |
S = t("invariant"), | |
b = t("merge"), | |
R = t("nativePropType"), | |
w = t("validAttributesFromPropTypes"), | |
C = t("warning"), | |
E = a.PropTypes, | |
D = "ScrollView", | |
T = "InnerScrollView", | |
x = b(h, { | |
alwaysBounceHorizontal: R(E.bool), | |
alwaysBounceVertical: R(E.bool), | |
centerContent: R(E.bool), | |
contentContainerStyle: f(_), | |
decelerationRate: R(E.number), | |
horizontal: E.bool, | |
keyboardDismissMode: R(E.oneOf([c.KeyboardDismissMode.None, c.KeyboardDismissMode.Interactive, c.KeyboardDismissMode.OnDrag])), | |
keyboardShouldPersistTaps: R(E.bool), | |
maximumZoomScale: R(E.number), | |
minimumZoomScale: R(E.number), | |
pagingEnabled: R(E.bool), | |
scrollsToTop: R(E.bool), | |
stickyHeaderIndices: R(o(E.number)), | |
removeClippedSubviews: E.bool, | |
zoomScale: R(E.number) | |
}), | |
P = a.createClass({ | |
displayName: "ScrollView", | |
statics: { | |
PropTypes: x, | |
keyboardDismissMode: c.KeyboardDismissMode | |
}, | |
propTypes: x, | |
mixins: [d.Mixin], | |
getInitialState: function() { | |
return this.scrollResponderMixinGetInitialState() | |
}, | |
setNativeProps: function(e) { | |
this.refs[D].setNativeProps(e) | |
}, | |
getInnerViewNode: function() { | |
return this.refs[T].getNodeHandle() | |
}, | |
scrollTo: function(e, t) { | |
p.scrollTo(l.rootNodeIDToTag[this._rootNodeID], t, e) | |
}, | |
render: function() { | |
var e = [this.props.horizontal && I.contentContainerHorizontal, this.props.contentContainerStyle]; | |
if (__DEV__ && this.props.style) { | |
var t = v(this.props.style), | |
n = ["alignItems", "justifyContent"].filter(function(e) { | |
return void 0 !== t[e] | |
}); | |
0 !== n.length && S(0, "ScrollView child layout (" + JSON.stringify(n) + ") must by applied through the contentContainerStyle prop.") | |
} | |
__DEV__ && C(this.props.onScroll && !this.props.throttleScrollCallbackMS, "You specified `onScroll` on a <ScrollView> but not `throttleScrollCallbackMS`. You will only receive one event. Using `16` you get all the events but be aware that it may cause frame drops, use a bigger number if you don't need as much precision."); | |
var r = a.createElement(g, { | |
ref: T, | |
style: e, | |
removeClippedSubviews: this.props.removeClippedSubviews | |
}, this.props.children), | |
i = void 0 !== this.props.alwaysBounceHorizontal ? this.props.alwaysBounceHorizontal : this.props.horizontal, | |
o = void 0 !== this.props.alwaysBounceVertical ? this.props.alwaysBounceVertical : !this.props.horizontal, | |
s = b(this.props, { | |
alwaysBounceHorizontal: i, | |
alwaysBounceVertical: o, | |
style: [I.base, this.props.style], | |
onTouchStart: this.scrollResponderHandleTouchStart, | |
onTouchMove: this.scrollResponderHandleTouchMove, | |
onTouchEnd: this.scrollResponderHandleTouchEnd, | |
onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag, | |
onScrollEndDrag: this.scrollResponderHandleScrollEndDrag, | |
onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin, | |
onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd, | |
onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder, | |
onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture, | |
onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder, | |
onScroll: this.scrollResponderHandleScroll, | |
onResponderGrant: this.scrollResponderHandleResponderGrant, | |
onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest, | |
onResponderTerminate: this.scrollResponderHandleTerminate, | |
onResponderRelease: this.scrollResponderHandleResponderRelease, | |
onResponderReject: this.scrollResponderHandleResponderReject | |
}); | |
return a.createElement(u, Object.assign({}, s, { | |
ref: D | |
}), r) | |
} | |
}), | |
I = m.create({ | |
base: { | |
flex: 1 | |
}, | |
contentContainerHorizontal: { | |
alignSelf: "flex-start", | |
flexDirection: "row" | |
} | |
}), | |
u = y({ | |
validAttributes: b(s.UIView, w(P.propTypes)), | |
uiViewClassName: "RCTScrollView" | |
}); | |
i.exports = P | |
}), __d("ArrayOfPropType", ["ReactPropTypes", "deepDiffer"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactPropTypes"), | |
a = t("deepDiffer"), | |
s = function(e, t) { | |
var n = o.arrayOf(e); | |
return n.differ = t ? t : a, n | |
}; | |
i.exports = s | |
}), __d("ScrollResponder", ["NativeModules", "NativeModulesDeprecated", "RCTDeviceEventEmitter", "Subscribable", "TextInputState", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeModules"), | |
a = t("NativeModulesDeprecated"), | |
s = t("RCTDeviceEventEmitter"), | |
l = t("Subscribable"), | |
u = t("TextInputState"), | |
c = o.RKUIManager, | |
p = a.RKUIManager, | |
d = c.RCTScrollView.Constants, | |
h = t("warning"), | |
f = 16, | |
m = { | |
mixins: [l.Mixin], | |
statics: d, | |
scrollResponderMixinGetInitialState: function() { | |
return { | |
isTouching: !1, | |
lastMomentumScrollBeginTime: 0, | |
lastMomentumScrollEndTime: 0, | |
observedScrollSinceBecomingResponder: !1, | |
becameResponderWhileAnimating: !1 | |
} | |
}, | |
scrollResponderHandleScrollShouldSetResponder: function() { | |
return this.state.isTouching | |
}, | |
scrollResponderHandleStartShouldSetResponder: function() { | |
return !1 | |
}, | |
scrollResponderHandleStartShouldSetResponderCapture: function(e) { | |
var t = u.currentlyFocusedField(); | |
return this.props.keyboardShouldPersistTaps || null == t || e.target == t ? this.scrollResponderIsAnimating() : !0 | |
}, | |
scrollResponderHandleResponderReject: function() { | |
h(!1, "ScrollView doesn't take rejection well - scrolls anyway") | |
}, | |
scrollResponderHandleTerminationRequest: function() { | |
return !this.state.observedScrollSinceBecomingResponder | |
}, | |
scrollResponderHandleTouchEnd: function(e) { | |
var t = e.nativeEvent; | |
this.state.isTouching = 0 !== t.touches.length, this.props.onTouchEnd && this.props.onTouchEnd(e) | |
}, | |
scrollResponderHandleResponderRelease: function(e) { | |
this.props.onResponderRelease && this.props.onResponderRelease(e); | |
var t = u.currentlyFocusedField(); | |
this.props.keyboardShouldPersistTaps || null == t || e.target == t || this.state.observedScrollSinceBecomingResponder || this.state.becameResponderWhileAnimating || (this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e), u.blurTextInput(t)) | |
}, | |
scrollResponderHandleScroll: function(e) { | |
this.state.observedScrollSinceBecomingResponder = !0, this.props.onScroll && this.props.onScroll(e) | |
}, | |
scrollResponderHandleResponderGrant: function(e) { | |
this.state.observedScrollSinceBecomingResponder = !1, this.props.onResponderGrant && this.props.onResponderGrant(e), this.state.becameResponderWhileAnimating = this.scrollResponderIsAnimating() | |
}, | |
scrollResponderHandleScrollBeginDrag: function(e) { | |
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e) | |
}, | |
scrollResponderHandleScrollEndDrag: function(e) { | |
this.props.onScrollEndDrag && this.props.onScrollEndDrag(e) | |
}, | |
scrollResponderHandleMomentumScrollBegin: function(e) { | |
this.state.lastMomentumScrollBeginTime = Date.now(), this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e) | |
}, | |
scrollResponderHandleMomentumScrollEnd: function(e) { | |
this.state.lastMomentumScrollEndTime = Date.now(), this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e) | |
}, | |
scrollResponderHandleTouchStart: function(e) { | |
this.state.isTouching = !0, this.props.onTouchStart && this.props.onTouchStart(e) | |
}, | |
scrollResponderHandleTouchMove: function(e) { | |
this.props.onTouchMove && this.props.onTouchMove(e) | |
}, | |
scrollResponderIsAnimating: function() { | |
var e = Date.now(), | |
t = e - this.state.lastMomentumScrollEndTime, | |
n = f > t || this.state.lastMomentumScrollEndTime < this.state.lastMomentumScrollBeginTime; | |
return n | |
}, | |
scrollResponderScrollTo: function(e, t) { | |
p.scrollTo(this.getNodeHandle(), e, t) | |
}, | |
scrollResponderZoomTo: function(e) { | |
p.zoomToRect(this.getNodeHandle(), e) | |
}, | |
scrollResponderScrollNativeHandleToKeyboard: function(e, t) { | |
this.additionalScrollOffset = t || 0, c.measureLayout(e, this.getNodeHandle(), this.scrollResponderTextInputFocusError, this.scrollResponderInputMeasureAndScrollToKeyboard) | |
}, | |
scrollResponderInputMeasureAndScrollToKeyboard: function(e, t, n, r) { | |
if (this.keyboardWillOpenTo) { | |
var i = t - this.keyboardWillOpenTo.endCoordinates.screenY + r + this.additionalScrollOffset; | |
this.scrollResponderScrollTo(0, i) | |
} | |
this.additionalOffset = 0 | |
}, | |
scrollResponderTextInputFocusError: function(e) { | |
console.error("Error measuring text field: ", e) | |
}, | |
componentWillMount: function() { | |
this.keyboardWillOpenTo = null, this.additionalScrollOffset = 0, this.addListenerOn(s, "keyboardWillShow", this.scrollResponderKeyboardWillShow), this.addListenerOn(s, "keyboardWillHide", this.scrollResponderKeyboardWillHide), this.addListenerOn(s, "keyboardDidShow", this.scrollResponderKeyboardDidShow), this.addListenerOn(s, "keyboardDidHide", this.scrollResponderKeyboardDidHide) | |
}, | |
scrollResponderKeyboardWillShow: function(e) { | |
this.keyboardWillOpenTo = e, this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e) | |
}, | |
scrollResponderKeyboardWillHide: function(e) { | |
this.keyboardWillOpenTo = null, this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e) | |
}, | |
scrollResponderKeyboardDidShow: function() { | |
this.keyboardWillOpenTo = null, this.props.onKeyboardDidShow && this.props.onKeyboardDidShow() | |
}, | |
scrollResponderKeyboardDidHide: function() { | |
this.keyboardWillOpenTo = null, this.props.onKeyboardDidHide && this.props.onKeyboardDidHide() | |
} | |
}, | |
g = { | |
Mixin: m | |
}; | |
i.exports = g | |
}), __d("Subscribable", ["EventEmitter", "invariant", "logError"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n, r) { | |
this.$Subscribable_internalEmitter = new a, this.$Subscribable_eventMapping = n || function(e) { | |
return e | |
}, this.$Subscribable_upstreamSubscription = e.addListener(t, this.$Subscribable_handleEmit, this), r && r(this.$Subscribable_handleInitData.bind(this), l) | |
} | |
var a = t("EventEmitter"), | |
s = t("invariant"), | |
l = t("logError"), | |
u = "subscriptionEvent"; | |
o.prototype.get = function() { | |
return this.$Subscribable_lastData | |
}, o.prototype.cleanup = function() { | |
this.$Subscribable_upstreamSubscription && this.$Subscribable_upstreamSubscription.remove() | |
}, o.prototype.subscribe = function(e, t, n) { | |
"function" != typeof e.addUnmountCallback && s(0, "Must provide a valid lifespan, which provides a way to add a callback for when subscription can be cleaned up. This is used automatically by Subscribable.Mixin"), "function" != typeof t && s(0, "Must provide a valid subscription handler."); | |
var r = this.$Subscribable_internalEmitter.addListener(u, t, n); | |
return e.addUnmountCallback(function() { | |
r.remove() | |
}), r | |
}, o.prototype.$Subscribable_handleInitData = function(e) { | |
var t = this.$Subscribable_eventMapping(e); | |
this.$Subscribable_lastData = t, this.$Subscribable_internalEmitter.emit(u, t) | |
}, o.prototype.$Subscribable_handleEmit = function(e) { | |
var t = this.$Subscribable_eventMapping(e); | |
this.$Subscribable_lastData = t, this.$Subscribable_internalEmitter.emit(u, t) | |
}, o.Mixin = { | |
_getSubscribableLifespan: function() { | |
return this._subscribableLifespan || (this._subscribableLifespan = { | |
addUnmountCallback: function(e) { | |
this._endSubscribableLifespanCallbacks.push(e) | |
}.bind(this) | |
}), this._subscribableLifespan | |
}, | |
_endSubscribableLifespan: function() { | |
this._endSubscribableLifespanCallbacks.forEach(function(e) { | |
return e() | |
}) | |
}, | |
subscribeTo: function(e, t, n) { | |
return e instanceof o || s(0, "Must provide a Subscribable"), e.subscribe(this._getSubscribableLifespan(), t, n) | |
}, | |
provideSubscribable: function(e, t, n, r) { | |
return this._localSubscribables = this._localSubscribables || {}, this._localSubscribables[e] = this._localSubscribables[e] || {}, this._localSubscribables[e][t] || (this._localSubscribables[e][t] = new o(e, t, n, r)), this._localSubscribables[e][t] | |
}, | |
_cleanupLocalSubscribables: function() { | |
if (this._localSubscribables) { | |
var e; | |
Object.keys(this._localSubscribables).forEach(function(t) { | |
e = this._localSubscribables[t], Object.keys(e).forEach(function(t) { | |
e[t].cleanup() | |
}) | |
}.bind(this)), this._localSubscribables = null | |
} | |
}, | |
componentWillMount: function() { | |
this._endSubscribableLifespanCallbacks = [], this._subscribableSubscriptions = [] | |
}, | |
componentWillUnmount: function() { | |
this._endSubscribableLifespan && this._endSubscribableLifespan(), this._cleanupLocalSubscribables(), this._subscribableSubscriptions.forEach(function(e) { | |
return e.remove() | |
}), this._subscribableSubscriptions = null | |
}, | |
addListenerOn: function(e, t, n, r) { | |
this._subscribableSubscriptions.push(e.addListener(t, n, r)) | |
} | |
}, i.exports = o | |
}), __d("logError", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = function() { | |
if (1 === arguments.length && arguments[0] instanceof Error) { | |
var e = arguments[0]; | |
console.error('Error: "' + e.message + '". Stack:\n' + e.stack) | |
} else console.error.apply(console, arguments) | |
}; | |
i.exports = o | |
}), __d("ScrollViewPropTypes", ["EdgeInsetsPropType", "PointPropType", "ReactPropTypes", "StyleSheetPropType", "ViewStylePropTypes", "nativePropType"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("EdgeInsetsPropType"), | |
a = t("PointPropType"), | |
s = t("ReactPropTypes"), | |
l = t("StyleSheetPropType"), | |
u = t("ViewStylePropTypes"), | |
c = t("nativePropType"), | |
p = { | |
automaticallyAdjustContentInsets: c(s.bool), | |
contentInset: c(o), | |
contentOffset: c(a), | |
onScroll: s.func, | |
onScrollAnimationEnd: s.func, | |
scrollEnabled: c(s.bool), | |
scrollIndicatorInsets: c(o), | |
showsHorizontalScrollIndicator: c(s.bool), | |
showsVerticalScrollIndicator: c(s.bool), | |
style: l(u), | |
throttleScrollCallbackMS: c(s.number) | |
}; | |
i.exports = p | |
}), __d("PointPropType", ["ReactPropTypes", "createStrictShapeTypeChecker", "pointsDiffer"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactPropTypes"), | |
a = t("createStrictShapeTypeChecker"), | |
s = t("pointsDiffer"), | |
l = a({ | |
x: o.number, | |
y: o.number | |
}); | |
l.differ = s, i.exports = l | |
}), __d("pointsDiffer", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
x: void 0, | |
y: void 0 | |
}, | |
a = function(e, t) { | |
return e = e || o, t = t || o, e !== t && (e.x !== t.x || e.y !== t.y) | |
}; | |
i.exports = a | |
}), __d("nativePropType", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return e.isNative = !0, e | |
} | |
i.exports = o | |
}), __d("validAttributesFromPropTypes", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = {}; | |
for (var n in e) { | |
var r = e[n]; | |
if (r && r.isNative) { | |
var i = r.differ; | |
t[n] = i ? { | |
diff: i | |
} : !0 | |
} | |
} | |
return t | |
} | |
i.exports = o | |
}), __d("StaticRenderer", ["React"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("React"), | |
a = o.createClass({ | |
displayName: "StaticRenderer", | |
propTypes: { | |
shouldUpdate: o.PropTypes.bool.isRequired, | |
render: o.PropTypes.func.isRequired | |
}, | |
shouldComponentUpdate: function(e) { | |
return e.shouldUpdate | |
}, | |
render: function() { | |
return this.props.render() | |
} | |
}); | |
i.exports = a | |
}), __d("ReactGraphQL", ["DliteDebugger", "DliteProfiler", "DliteReactQueryParamCache", "DliteRoute", "DliteRouteQueryCache", "DliteRouteContext", "ErrorUtils", "GraphQLDeferredQueryTracker", "GraphQLQueryRunner", "GraphQLStore", "GraphQLCodedError", "GraphQLStoreChangeEmitter", "GraphQLStoreDataHandler", "GraphQLStoreQueryResolver", "Map", "ReactGraphQLComparators", "ReactGraphQLQueryBuilder", "ReactInstanceMap", "ReactUpdates", "forEachObject", "invariant", "mapObject", "mixInEventEmitter"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
C(e.queries, function(n, r) { | |
var i = e.getQuery(r); | |
i && t(i, r) | |
}) | |
} | |
function a(e, t) { | |
return e + "." + t | |
} | |
var s = t("DliteDebugger"), | |
l = t("DliteProfiler"), | |
u = t("DliteReactQueryParamCache"), | |
c = (t("DliteRoute"), t("DliteRouteQueryCache")), | |
p = t("DliteRouteContext"), | |
d = t("ErrorUtils"), | |
h = t("GraphQLDeferredQueryTracker"), | |
f = t("GraphQLQueryRunner"), | |
m = t("GraphQLStore"), | |
g = (t("GraphQLCodedError"), t("GraphQLStoreChangeEmitter")), | |
_ = t("GraphQLStoreDataHandler"), | |
y = t("GraphQLStoreQueryResolver"), | |
v = t("Map"), | |
S = t("ReactGraphQLComparators"), | |
b = t("ReactGraphQLQueryBuilder"), | |
R = t("ReactInstanceMap"), | |
w = t("ReactUpdates"), | |
C = t("forEachObject"), | |
E = t("invariant"), | |
D = t("mapObject"), | |
T = t("mixInEventEmitter"); | |
g.injectBatchingStrategy(w.batchedUpdates); | |
var x = {}, | |
P = Object.freeze({}), | |
I = { | |
Mixin: { | |
statics: { | |
getQueriesForRoute: function(e) { | |
var t = this, | |
n = c.get(t, e); | |
if (n) return n; | |
var r = D(t.queries, function(n, r) { | |
if (e.hasQuery(r)) { | |
var i = t.getQuery(r); | |
return e.getQuery(r, i) | |
} | |
return null | |
}); | |
return c.set(t, e, r), r | |
}, | |
getQuery: function(e, t) { | |
var n = this; | |
return b.get(n, e, t) | |
} | |
}, | |
mixins: [p.Mixin, S.Mixin], | |
setQueryParams: function(e, t, n) { | |
var r, i = this._unresolvedQueryParams || this._resolvableQueryParams || this.queryParams; | |
for (var a in e) | |
if (i[a] !== e[a]) { | |
r = Object.assign({}, i, e); | |
break | |
} | |
if (t && this._queryParamSuccessCallbacks.push(t), n && this._queryParamFailureCallbacks.push(n), r) { | |
__DEV__ && I.emit("beginQueryParamChange", this.constructor.displayName, r), this._abortPendingQueryParamsRun(); | |
var s = {}; | |
o(this.constructor, function(e, t) { | |
var n = this.props[t]; | |
if (n) { | |
var i = e.getQueryFragment(this.context.route, r); | |
i && (s[t] = m.buildFragmentQueryForDataID(i, _.getID(n))) | |
} | |
}.bind(this)), this._pendingQueryParamsRun = f.run(s, { | |
onBlockingRequest: null, | |
onFailure: function(e) { | |
w.batchedUpdates(function() { | |
this._queryParamFailureCallbacks.forEach(function(t) { | |
return t(e) | |
}), this._clearQueryParamCallbacks() | |
}.bind(this)) | |
}.bind(this), | |
onResolvable: null, | |
onSuccess: d.guard(function() { | |
this._unresolvedQueryParams = null, this._resolvableQueryParams = r, this._pendingQueryParamsRun = null, this._instrumentedUpdate(), __DEV__ && I.emit("endQueryParamChange", this.constructor.displayName, r) | |
}.bind(this), "ReactGraphQL:setQueryParams") | |
}), this._unresolvedQueryParams = r | |
} else this._resolvableQueryParams = i, this._instrumentedUpdate() | |
}, | |
_instrumentedUpdate: function() { | |
var e = l.instrumentAsync("React.setPropsInternal.onSuccess"); | |
R.get(this)._setPropsInternal(x, e.stop) | |
}, | |
getQueryError: function(e, t) { | |
if (!this._deferredQueryErrors) return null; | |
var n = e.getQueryFragment(this.context.route), | |
r = _.getID(t), | |
i = a(r, n.getName()); | |
return this._deferredQueryErrors[i] | |
}, | |
hasQueryData: function(e, t) { | |
if (!f.hasPendingQueries() && !this._deferredQueryErrors) return !0; | |
var n = e.getQueryFragment(this.context.route), | |
r = _.getID(t); | |
r || E(0, "ReactGraphQL.hasQueryData: must provide a valid prop value. Ex: for <DeferredChild viewer={this.props.viewer} />, use hasQueryData(DeferredChild.getQuery('viewer'), this.props.viewer)\""); | |
var i = m.buildFragmentQueryForDataID(n, r), | |
o = !h.isQueryPending(i), | |
s = n.getName(), | |
l = a(r, s); | |
return o ? this._deferredQueryErrors && this._deferredQueryErrors.hasOwnProperty(l) && (o = !1) : (this._deferredQuerySubscriptions || (this._deferredQuerySubscriptions = {}), this._deferredQuerySubscriptions.hasOwnProperty(l) || (this._deferredQuerySubscriptions[l] = h.addListenerForFragment(r, s, { | |
onSuccess: this._handleDeferredQuerySuccess, | |
onFailure: this._handleDeferredQueryFailure | |
}))), o | |
}, | |
getInitialState: function() { | |
return this.constructor.queries || E(0, "ReactGraphQL.Mixin: %s must provide a valid object for queries.", this.constructor.displayName), __DEV__ && (Object.keys(this.constructor.queries).length || console.warn("ReactGraphQL.Mixin is unnecessary for %s if no queries are defined.", this.constructor.displayName)), this._queryParamSuccessCallbacks = [], this._queryParamFailureCallbacks = [], this._unresolvedQueryParams = null, this._resolvableQueryParams = null, this._pendingQueryParamsRun = null, this.queryParams = this._getInitialQueryParams(), this._queryFragments = null, this._updateQueryFragments(this.context.route, this.queryParams), this._queryResolvers = null, this._processQueryProps(this.context.route, this.queryParams, this.props), this._originalShouldComponentUpdate = this.shouldComponentUpdate, this.shouldComponentUpdate = this._shouldComponentUpdate, {} | |
}, | |
componentWillReceiveProps: function(e, t) { | |
var n = this._resolvableQueryParams || this.queryParams; | |
if (this._updateQueryFragments(t.route, n), this._processQueryProps(t.route, n, e), this._resolvableQueryParams) { | |
var r = this.queryParams; | |
this.queryParams = this._resolvableQueryParams, this._resolvableQueryParams = null, u.set(this, this.queryParams), this._queryParamSuccessCallbacks.forEach(function(e) { | |
return e(r) | |
}), this._clearQueryParamCallbacks() | |
} | |
}, | |
_shouldComponentUpdate: function(e, t, n) { | |
return this._hasStaleQueryData ? (this._hasStaleQueryData = !1, !0) : this._hasNewDeferredData ? (this._hasNewDeferredData = !1, !0) : this._originalShouldComponentUpdate && this._originalShouldComponentUpdate.apply(this, arguments) ? !0 : this._originalShouldComponentUpdate ? !this.areDlitePropsEqualTo(e) || !this.isDliteContextEqualTo(n) : !this.arePropsEqualTo(e) || !this.isStateEqualTo(t) || !this.isContextEqualTo(n) | |
}, | |
componentWillMount: function() { | |
__DEV__ && s.installIntoComponent(this) | |
}, | |
componentWillUnmount: function() { | |
this._queryResolvers && (this._queryResolvers.forEach(function(e) { | |
return e.reset() | |
}), this._queryResolvers = null), this._deferredQuerySubscriptions && (C(this._deferredQuerySubscriptions, function(e) { | |
e && e.remove() | |
}), this._deferredQuerySubscriptions = null), this._queryParamFailureCallbacks = null, this._queryParamSuccessCallbacks = null, this._deferredQueryErrors = null, this._unresolvedQueryParams = null, this._resolvableQueryParams = null, this._abortPendingQueryParamsRun() | |
}, | |
_processQueryProps: function(e, t, n) { | |
var r = !this._queryResolvers; | |
r && (this._queryResolvers = new v, o(this.constructor, function(e, t) { | |
var n = new y(this._handleQueryPropChange); | |
this._queryResolvers.set(t, n) | |
}.bind(this))), this._queryResolvers.forEach(function(e, t) { | |
var i, o = this._queryFragments && this._queryFragments[t]; | |
if (o) { | |
var a = n[t]; | |
i = e.resolve(o, a), r || this.props[t] === i || (this._hasStaleQueryData = !0) | |
} else i = null; | |
n[t] = i | |
}.bind(this)) | |
}, | |
_handleQueryPropChange: function() { | |
var e = l.instrumentAsync("React.setPropsInternal.onSubscription"); | |
R.get(this)._setPropsInternal(x, e.stop) | |
}, | |
_handleDeferredQuerySuccess: function(e, t) { | |
var n = a(e, t); | |
if (this._deferredQuerySubscriptions && this._deferredQuerySubscriptions.hasOwnProperty(n) && (this._hasNewDeferredData = !0, this._deferredQuerySubscriptions[n].remove(), delete this._deferredQuerySubscriptions[n], this.isMounted())) { | |
var r = l.instrumentAsync("React.setPropsInternal.onSubscription"); | |
R.get(this)._setPropsInternal(x, r.stop) | |
} | |
}, | |
_handleDeferredQueryFailure: function(e, t, n) { | |
var r = a(e, t); | |
if (this._deferredQueryErrors || (this._deferredQueryErrors = {}), this._hasNewDeferredData = !0, this._deferredQueryErrors[r] = n, this.isMounted()) { | |
var i = l.instrumentAsync("React.setPropsInternal.onSubscription"); | |
R.get(this)._setPropsInternal(x, i.stop) | |
} | |
}, | |
_abortPendingQueryParamsRun: function() { | |
this._pendingQueryParamsRun && (this._pendingQueryParamsRun.abort(), this._pendingQueryParamsRun = null) | |
}, | |
_clearQueryParamCallbacks: function() { | |
this._queryParamSuccessCallbacks.length = 0, this._queryParamFailureCallbacks.length = 0 | |
}, | |
_updateQueryFragments: function(e, t) { | |
this._queryFragments && this.queryParams === t && this.context.route.getCacheKey() === e.getCacheKey() || (this._queryFragments = null, o(this.constructor, function(n, r) { | |
var i = n.getQueryFragment(e, t); | |
i && (this._queryFragments = this._queryFragments || {}, this._queryFragments[r] = i) | |
}.bind(this))) | |
}, | |
_getInitialQueryParams: function() { | |
var e = this.constructor.queryParams, | |
t = u.get(this); | |
if (!t && e) { | |
var n; | |
for (var r in e) r in this.props && (n = n || Object.assign({}, e), n[r] = this.props[r]); | |
t = n || e | |
} | |
return t || P | |
} | |
} | |
}; | |
T(I, { | |
beginQueryParamChange: !0, | |
endQueryParamChange: !0 | |
}), l.instrumentMethods(I.Mixin.statics, { | |
getQueriesForRoute: "ReactGraphQL.getQueriesForRoute" | |
}), l.instrumentMethods(I.Mixin, { | |
getInitialState: "ReactGraphQL.getInitialState", | |
componentWillReceiveProps: "ReactGraphQL.componentWillReceiveProps", | |
_shouldComponentUpdate: "ReactGraphQL.shouldComponentUpdate" | |
}), i.exports = I | |
}), __d("DliteDebugger", ["GraphQL_EXPERIMENTAL", "GraphQLStore", "GraphQLStoreDataHandler", "filterObject", "mapObject"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
var n = e.constructor.getQuery(t).getQueryFragment(e.context.route, e.queryParams); | |
if (n instanceof d.QueryFragment) { | |
var r = f.getID(e.props[t]); | |
n = h.buildFragmentQueryForDataID(n, r) | |
} | |
return n | |
} | |
function a(e) { | |
var t = e.constructor, | |
n = g(t.queries, function(t, n) { | |
return e.props[n] | |
}); | |
return m(n, function(e) { | |
return e && Object.keys(e).some(function(e) { | |
return !e.startsWith("__") | |
}) | |
}) | |
} | |
function s(e) { | |
var t = a(e); | |
t && (t.component = e.constructor.displayName); | |
var n; | |
return e._renderedComponent ? n = s(e._renderedComponent) : e._renderedChildren && (n = Object.keys(e._renderedChildren).map(function(t) { | |
return s(e._renderedChildren[t]) | |
}).filter(function(e) { | |
return e | |
})), Array.isArray(n) && (1 === n.length ? n = n[0] : n.length || (n = null)), t && n && (t.children = n), t || n | |
} | |
function l(e, t) { | |
var n = e.props[t]; | |
return !!(n && "object" == typeof n && !Array.isArray(n) && f.getID(n) && e.constructor.getQuery && e.constructor.getQuery(t)) | |
} | |
function u(e, t) { | |
var n = {}; | |
for (var r in e.props) l(e, r) && (n[r] = t(e, r)); | |
return n | |
} | |
function c(e, t) { | |
var n = o(e, t).getQuery(), | |
r = s(e), | |
i = r[t]; | |
console.log(t, i, _ + encodeURIComponent(n)) | |
} | |
function p(e, t, n) { | |
Object.defineProperty(e, t, { | |
configurable: !0, | |
enumerable: !0, | |
get: n | |
}) | |
} | |
var d = t("GraphQL_EXPERIMENTAL"), | |
h = t("GraphQLStore"), | |
f = t("GraphQLStoreDataHandler"), | |
m = t("filterObject"), | |
g = t("mapObject"), | |
_ = "https://our.intern.facebook.com/intern/graphiql?query=", | |
y = { | |
getQueries: function(e) { | |
return u(e, o) | |
}, | |
getProps: function(e) { | |
return s(e) | |
}, | |
logProps: function(e) { | |
Object.keys(e.props).filter(function(t) { | |
return l(e, t) | |
}).forEach(function(t) { | |
return c(e, t) | |
}) | |
}, | |
installIntoComponent: function(e) { | |
p(e, "debugQueries", function() { | |
return g(y.getQueries(e), function(e) { | |
return e.getQuery().toString() | |
}) | |
}), p(e, "debugProps", function() { | |
return g(y.getProps(e), function(e) { | |
return JSON.stringify(e, null, " ") | |
}) | |
}), p(e, "debugConsole", function() { | |
return y.logProps(e), "Info logged to console..." | |
}) | |
} | |
}; | |
i.exports = y | |
}), __d("filterObject", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
if (!e) return null; | |
var r = {}; | |
for (var i in e) e.hasOwnProperty(i) && t.call(n, e[i], i) && (r[i] = e[i]); | |
return r | |
} | |
i.exports = o | |
}), __d("DliteReactQueryParamCache", ["createComponentCacheKey", "emptyFunction"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("createComponentCacheKey"), | |
a = t("emptyFunction"), | |
s = a, | |
l = { | |
injectStorageStrategy: function(e) { | |
s = e | |
}, | |
set: function(e, t) { | |
var n = s(); | |
if (n) { | |
var r = o(e); | |
n.addQueryParams(t, r) | |
} | |
}, | |
get: function(e) { | |
var t = s(), | |
n = null; | |
if (t && t.hasQueryParams()) { | |
var r = o(e); | |
n = t.copyQueryParams(r) | |
} | |
return n | |
} | |
}; | |
i.exports = l | |
}), __d("createComponentCacheKey", ["ReactInstanceMap", "ReactInstanceHandles", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = e.getPublicInstance(), | |
n = t.tagName || t.constructor.displayName; | |
return n || c(0, "Cannot create cache key for component without `displayName` or `tagName`."), n | |
} | |
function a(e) { | |
var t = e._rootNodeID, | |
n = u.getReactRootIDFromNodeID(t); | |
return t.substr(n.length) | |
} | |
function s(e) { | |
var t = e.mountComponent ? e : l.get(e); | |
t._rootNodeID || c(0, "Cannot create cache key for component unless it is mounting or mounted."); | |
var n = []; | |
do { | |
var r = o(t), | |
i = a(t); | |
n.unshift("(" + r + ")" + i), t = t._currentElement._owner | |
} while (t); | |
return n.join(":") | |
} | |
var l = t("ReactInstanceMap"), | |
u = t("ReactInstanceHandles"), | |
c = t("invariant"); | |
i.exports = s | |
}), __d("ReactInstanceMap", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
get: function(e) { | |
return e | |
} | |
}; | |
i.exports = o | |
}), __d("DliteRouteQueryCache", ["DliteRoute"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = (t("DliteRoute"), { | |
get: function(e, t) { | |
var n = t.getCacheKey(); | |
if (e.__queryCache) { | |
var r = e.__queryCache[n]; | |
if (r) return r | |
} | |
return null | |
}, | |
set: function(e, t, n) { | |
var r = t.getCacheKey(); | |
e.__queryCache || (e.__queryCache = {}), e.__queryCache[r] = n | |
} | |
}); | |
i.exports = o | |
}), __d("DliteRouteContext", ["DliteRoute", "React"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DliteRoute"), | |
a = t("React"), | |
s = { | |
Mixin: { | |
contextTypes: { | |
route: a.PropTypes.instanceOf(o).isRequired | |
} | |
} | |
}; | |
i.exports = s | |
}), __d("GraphQLStoreQueryResolver", ["DliteProfiler", "GraphQLStore", "GraphQLStoreChangeEmitter", "GraphQLStoreDataHandler", "GraphQLStoreRangeUtils", "forEachObject", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
this.reset(), this.$GraphQLStoreQueryResolver_callback = e | |
} | |
function a(e) { | |
this.reset(), this.$GraphQLStorePluralQueryResolver_callback = e | |
} | |
function s(e) { | |
this.reset(), this.$GraphQLStoreSingleQueryResolver_callback = e | |
} | |
function l(e, t, n) { | |
var r, i = d.getDeepNodeFromData(e, t, function(t) { | |
return !t.getScope() || e.getScope() === t.getScope() | |
}, n); | |
return i && (r = u(i)), [i, r] | |
} | |
function u(e) { | |
function t(e) { | |
Array.isArray(e) ? r.push.apply(r, e) : r.push(e) | |
} | |
for (var n = {}, r = [e]; r.length;) { | |
var i = r.shift(); | |
if (i && "object" == typeof i) { | |
var o = f.getID(i); | |
null != o && (n[o] = null), g(i, t) | |
} | |
} | |
return n | |
} | |
function c(e) { | |
var t = m.parseRangeClientID(e); | |
return t ? t.dataID : e | |
} | |
var p = t("DliteProfiler"), | |
d = t("GraphQLStore"), | |
h = t("GraphQLStoreChangeEmitter"), | |
f = t("GraphQLStoreDataHandler"), | |
m = t("GraphQLStoreRangeUtils"), | |
g = t("forEachObject"), | |
_ = t("invariant"); | |
o.prototype.reset = function() { | |
this.$GraphQLStoreQueryResolver_callback = null, this.$GraphQLStoreQueryResolver_resolver && this.$GraphQLStoreQueryResolver_resolver.reset(), this.$GraphQLStoreQueryResolver_resolver = null, this.$GraphQLStoreQueryResolver_isPluralResolver = null | |
}, o.prototype.resolve = function(e, t) { | |
var n = null === this.$GraphQLStoreQueryResolver_isPluralResolver; | |
return n ? (this.$GraphQLStoreQueryResolver_isPluralResolver = e.isPlural(), this.$GraphQLStoreQueryResolver_resolver = this.$GraphQLStoreQueryResolver_isPluralResolver ? new a(this.$GraphQLStoreQueryResolver_callback) : new s(this.$GraphQLStoreQueryResolver_callback)) : this.$GraphQLStoreQueryResolver_isPluralResolver !== e.isPlural() && _(0, "GraphQLStoreQueryResolver: Expected a %s query fragment. Got a %s query fragment instead.", this.$GraphQLStoreQueryResolver_isPluralResolver ? "plural" : "single", e.isPlural() ? "plural" : "single"), this.$GraphQLStoreQueryResolver_resolver.resolve(e, t) | |
}, a.prototype.reset = function() { | |
this.$GraphQLStorePluralQueryResolver_resolvers ? (this.$GraphQLStorePluralQueryResolver_resolvers.forEach(function(e) { | |
return e.reset() | |
}), this.$GraphQLStorePluralQueryResolver_resolvers.length = 0) : this.$GraphQLStorePluralQueryResolver_resolvers = [], this.$GraphQLStorePluralQueryResolver_callback = null, this.$GraphQLStorePluralQueryResolver_results = [] | |
}, a.prototype.resolve = function(e, t) { | |
null == t || Array.isArray(t) || _(0, "GraphQLStoreQueryResolver: Plural fragment can only resolve an array of pointers."); | |
for (var n, r = this.$GraphQLStorePluralQueryResolver_results, i = r.length, o = t ? t.length : 0, a = this.$GraphQLStorePluralQueryResolver_resolvers; a.length < o;) a.push(new s(this.$GraphQLStorePluralQueryResolver_callback)); | |
for (; a.length > o;) a.pop().reset(); | |
i !== o && (n = []); | |
for (var l = 0; o > l; l++) { | |
var u = a[l].resolve(e, t[l]); | |
(n || l >= i || u !== r[l]) && (n = n || r.slice(0, l), n.push(u)) | |
} | |
return n && (this.$GraphQLStorePluralQueryResolver_results = n), this.$GraphQLStorePluralQueryResolver_results | |
}, s.prototype.reset = function() { | |
this.$GraphQLStoreSingleQueryResolver_subscription && (this.$GraphQLStoreSingleQueryResolver_subscription.remove(), this.$GraphQLStoreSingleQueryResolver_subscription = null), this.$GraphQLStoreSingleQueryResolver_queryFragment = null, this.$GraphQLStoreSingleQueryResolver_callback = null, this.$GraphQLStoreSingleQueryResolver_isDirty = !1, this.$GraphQLStoreSingleQueryResolver_resultID = null, this.$GraphQLStoreSingleQueryResolver_result = null | |
}, s.prototype.resolve = function(e, t) { | |
Array.isArray(t) && _(0, "GraphQLStoreQueryResolver: Singular fragment cannot resolve an array of pointers."); | |
var n, r, i, o = this.$GraphQLStoreSingleQueryResolver_resultID, | |
a = this.$GraphQLStoreSingleQueryResolver_result, | |
s = this.$GraphQLStoreSingleQueryResolver_queryFragment; | |
if (t) { | |
if (r = f.getID(t), null != o && null != r && c(o) === c(r)) | |
if (this.$GraphQLStoreSingleQueryResolver_isDirty || o != r || s !== e) { | |
var u = l(e, t, a); | |
i = u[0], n = u[1] | |
} else i = a; | |
else { | |
var p = l(e, t), | |
d = p[0], | |
m = p[1]; | |
null != r && (n = m), i = d | |
} | |
this.$GraphQLStoreSingleQueryResolver_isDirty = !1 | |
} else i = t; | |
return a !== i && (this.$GraphQLStoreSingleQueryResolver_subscription && (this.$GraphQLStoreSingleQueryResolver_subscription.remove(), this.$GraphQLStoreSingleQueryResolver_subscription = null), n && (this.$GraphQLStoreSingleQueryResolver_subscription = h.addListenerForIDs(Object.keys(n), this.$GraphQLStoreSingleQueryResolver_handleChange.bind(this))), this.$GraphQLStoreSingleQueryResolver_resultID = r, this.$GraphQLStoreSingleQueryResolver_result = i), this.$GraphQLStoreSingleQueryResolver_queryFragment = e, this.$GraphQLStoreSingleQueryResolver_result | |
}, s.prototype.$GraphQLStoreSingleQueryResolver_handleChange = function() { | |
this.$GraphQLStoreSingleQueryResolver_isDirty || (this.$GraphQLStoreSingleQueryResolver_isDirty = !0, this.$GraphQLStoreSingleQueryResolver_callback()) | |
}, p.instrumentMethods(o.prototype, { | |
resolve: "GraphQLStoreQueryResolver.resolve" | |
}), i.exports = o | |
}), __d("ReactGraphQLComparators", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n, r) { | |
var i; | |
for (i in t) | |
if (!(r && !r.hasOwnProperty(i) || !t.hasOwnProperty(i) || n.hasOwnProperty(i) && e(t[i], n[i], i))) return !1; | |
for (i in n) | |
if ((!r || r.hasOwnProperty(i)) && n.hasOwnProperty(i) && !t.hasOwnProperty(i)) return !1; | |
return !0 | |
} | |
function a(e, t) { | |
return e === t && (null === e || "object" != typeof e) | |
} | |
function s(e, t, n) { | |
return n in l ? e === t : a(e, t) | |
} | |
var l = { | |
route: !0 | |
}, | |
u = { | |
Mixin: { | |
isStateEqualTo: function(e) { | |
return o(a, this.state, e) | |
}, | |
isContextEqualTo: function(e) { | |
return o(s, this.context, e) | |
}, | |
isDliteContextEqualTo: function(e) { | |
return o(s, this.context, e, l) | |
}, | |
arePropsEqualTo: function(e) { | |
return o(this._isPropEqual, this.props, e) | |
}, | |
areDlitePropsEqualTo: function(e) { | |
return o(this._isPropEqual, this.props, e, this.constructor.queries) | |
}, | |
_isPropEqual: function(e, t, n) { | |
return this.constructor.queries.hasOwnProperty(n) ? e === t : a(e, t) | |
} | |
} | |
}; | |
i.exports = u | |
}), __d("Dimensions", ["NativeModules", "invariant", "mergeInto"], function(e, t, n, r, i) { | |
"use strict"; | |
function o() {} | |
var a = t("NativeModules"), | |
s = t("invariant"), | |
l = t("mergeInto"), | |
u = a.RKUIManager.Dimensions; | |
o.set = function(e) { | |
return l(u, e), !0 | |
}, o.get = function(e) { | |
return u[e] || s(0, "No dimension set for key " + e), u[e] | |
}, i.exports = o | |
}), __d("mergeInto", [], function(e, t, n, r, i) { | |
"use strict"; | |
i.exports = Object.assign | |
}), __d("RCTNativeAppEventEmitter", ["EventEmitter"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("EventEmitter"), | |
a = new o; | |
i.exports = a | |
}), __d("Text", ["NativeMethodsMixin", "React", "ReactIOSViewAttributes", "StyleSheetPropType", "TextStylePropTypes", "Touchable", "createReactIOSNativeComponentClass", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeMethodsMixin"), | |
a = t("React"), | |
s = t("ReactIOSViewAttributes"), | |
l = t("StyleSheetPropType"), | |
u = t("TextStylePropTypes"), | |
c = t("Touchable"), | |
p = t("createReactIOSNativeComponentClass"), | |
d = t("merge"), | |
h = l(u), | |
f = { | |
validAttributes: d(s.UIView, { | |
isHighlighted: !0, | |
numberOfLines: !0 | |
}), | |
uiViewClassName: "RCTText" | |
}, | |
m = a.createClass({ | |
displayName: "Text", | |
mixins: [c.Mixin, o], | |
statics: { | |
stylePropType: h | |
}, | |
propTypes: { | |
numberOfLines: a.PropTypes.number, | |
onPress: a.PropTypes.func, | |
suppressHighlighting: a.PropTypes.bool, | |
style: h | |
}, | |
viewConfig: f, | |
getInitialState: function() { | |
return d(this.touchableGetInitialState(), { | |
isHighlighted: !1 | |
}) | |
}, | |
onStartShouldSetResponder: function() { | |
var e = this.props.onStartShouldSetResponder && this.props.onStartShouldSetResponder(); | |
return e || !!this.props.onPress | |
}, | |
handleResponderTerminationRequest: function() { | |
var e = this.touchableHandleResponderTerminationRequest(); | |
return e && this.props.onResponderTerminationRequest && (e = this.props.onResponderTerminationRequest()), e | |
}, | |
handleResponderGrant: function(e, t) { | |
this.touchableHandleResponderGrant(e, t), this.props.onResponderGrant && this.props.onResponderGrant.apply(this, arguments) | |
}, | |
handleResponderMove: function(e) { | |
this.touchableHandleResponderMove(e), this.props.onResponderMove && this.props.onResponderMove.apply(this, arguments) | |
}, | |
handleResponderRelease: function(e) { | |
this.touchableHandleResponderRelease(e), this.props.onResponderRelease && this.props.onResponderRelease.apply(this, arguments) | |
}, | |
handleResponderTerminate: function(e) { | |
this.touchableHandleResponderTerminate(e), this.props.onResponderTerminate && this.props.onResponderTerminate.apply(this, arguments) | |
}, | |
touchableHandleActivePressIn: function() { | |
!this.props.suppressHighlighting && this.props.onPress && this.setState({ | |
isHighlighted: !0 | |
}) | |
}, | |
touchableHandleActivePressOut: function() { | |
!this.props.suppressHighlighting && this.props.onPress && this.setState({ | |
isHighlighted: !1 | |
}) | |
}, | |
touchableHandlePress: function() { | |
this.props.onPress && this.props.onPress() | |
}, | |
touchableGetPressRectOffset: function() { | |
return g | |
}, | |
render: function() { | |
var e = {}; | |
for (var t in this.props) e[t] = this.props[t]; | |
return e.ref = this.getNodeHandle(), e.accessible !== !1 && (e.accessible = !0), e.isHighlighted = this.state.isHighlighted, e.onStartShouldSetResponder = this.onStartShouldSetResponder, e.onResponderTerminationRequest = this.handleResponderTerminationRequest, e.onResponderGrant = this.handleResponderGrant, e.onResponderMove = this.handleResponderMove, e.onResponderRelease = this.handleResponderRelease, e.onResponderTerminate = this.handleResponderTerminate, a.createElement(_, Object.assign({}, e)) | |
} | |
}), | |
g = { | |
top: 20, | |
left: 20, | |
right: 20, | |
bottom: 30 | |
}, | |
_ = p(f); | |
i.exports = m | |
}), __d("Touchable", ["BoundingDimensions", "Position", "TouchEventUtils", "keyMirror", "queryLayoutByID"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("BoundingDimensions"), | |
a = t("Position"), | |
s = t("TouchEventUtils"), | |
l = t("keyMirror"), | |
u = t("queryLayoutByID"), | |
c = l({ | |
NOT_RESPONDER: null, | |
RESPONDER_INACTIVE_PRESS_IN: null, | |
RESPONDER_INACTIVE_PRESS_OUT: null, | |
RESPONDER_ACTIVE_PRESS_IN: null, | |
RESPONDER_ACTIVE_PRESS_OUT: null, | |
RESPONDER_ACTIVE_LONG_PRESS_IN: null, | |
RESPONDER_ACTIVE_LONG_PRESS_OUT: null, | |
ERROR: null | |
}), | |
p = { | |
RESPONDER_ACTIVE_PRESS_OUT: !0, | |
RESPONDER_ACTIVE_PRESS_IN: !0 | |
}, | |
d = { | |
RESPONDER_INACTIVE_PRESS_IN: !0, | |
RESPONDER_ACTIVE_PRESS_IN: !0, | |
RESPONDER_ACTIVE_LONG_PRESS_IN: !0 | |
}, | |
h = { | |
RESPONDER_ACTIVE_LONG_PRESS_IN: !0 | |
}, | |
f = l({ | |
DELAY: null, | |
RESPONDER_GRANT: null, | |
RESPONDER_RELEASE: null, | |
RESPONDER_TERMINATED: null, | |
ENTER_PRESS_RECT: null, | |
LEAVE_PRESS_RECT: null, | |
LONG_PRESS_DETECTED: null | |
}), | |
m = { | |
NOT_RESPONDER: { | |
DELAY: c.ERROR, | |
RESPONDER_GRANT: c.RESPONDER_INACTIVE_PRESS_IN, | |
RESPONDER_RELEASE: c.ERROR, | |
RESPONDER_TERMINATED: c.ERROR, | |
ENTER_PRESS_RECT: c.ERROR, | |
LEAVE_PRESS_RECT: c.ERROR, | |
LONG_PRESS_DETECTED: c.ERROR | |
}, | |
RESPONDER_INACTIVE_PRESS_IN: { | |
DELAY: c.RESPONDER_ACTIVE_PRESS_IN, | |
RESPONDER_GRANT: c.ERROR, | |
RESPONDER_RELEASE: c.NOT_RESPONDER, | |
RESPONDER_TERMINATED: c.NOT_RESPONDER, | |
ENTER_PRESS_RECT: c.RESPONDER_INACTIVE_PRESS_IN, | |
LEAVE_PRESS_RECT: c.RESPONDER_INACTIVE_PRESS_OUT, | |
LONG_PRESS_DETECTED: c.ERROR | |
}, | |
RESPONDER_INACTIVE_PRESS_OUT: { | |
DELAY: c.RESPONDER_ACTIVE_PRESS_OUT, | |
RESPONDER_GRANT: c.ERROR, | |
RESPONDER_RELEASE: c.NOT_RESPONDER, | |
RESPONDER_TERMINATED: c.NOT_RESPONDER, | |
ENTER_PRESS_RECT: c.RESPONDER_INACTIVE_PRESS_IN, | |
LEAVE_PRESS_RECT: c.RESPONDER_INACTIVE_PRESS_OUT, | |
LONG_PRESS_DETECTED: c.ERROR | |
}, | |
RESPONDER_ACTIVE_PRESS_IN: { | |
DELAY: c.ERROR, | |
RESPONDER_GRANT: c.ERROR, | |
RESPONDER_RELEASE: c.NOT_RESPONDER, | |
RESPONDER_TERMINATED: c.NOT_RESPONDER, | |
ENTER_PRESS_RECT: c.RESPONDER_ACTIVE_PRESS_IN, | |
LEAVE_PRESS_RECT: c.RESPONDER_ACTIVE_PRESS_OUT, | |
LONG_PRESS_DETECTED: c.RESPONDER_ACTIVE_LONG_PRESS_IN | |
}, | |
RESPONDER_ACTIVE_PRESS_OUT: { | |
DELAY: c.ERROR, | |
RESPONDER_GRANT: c.ERROR, | |
RESPONDER_RELEASE: c.NOT_RESPONDER, | |
RESPONDER_TERMINATED: c.NOT_RESPONDER, | |
ENTER_PRESS_RECT: c.RESPONDER_ACTIVE_PRESS_IN, | |
LEAVE_PRESS_RECT: c.RESPONDER_ACTIVE_PRESS_OUT, | |
LONG_PRESS_DETECTED: c.ERROR | |
}, | |
RESPONDER_ACTIVE_LONG_PRESS_IN: { | |
DELAY: c.ERROR, | |
RESPONDER_GRANT: c.ERROR, | |
RESPONDER_RELEASE: c.NOT_RESPONDER, | |
RESPONDER_TERMINATED: c.NOT_RESPONDER, | |
ENTER_PRESS_RECT: c.RESPONDER_ACTIVE_LONG_PRESS_IN, | |
LEAVE_PRESS_RECT: c.RESPONDER_ACTIVE_LONG_PRESS_OUT, | |
LONG_PRESS_DETECTED: c.RESPONDER_ACTIVE_LONG_PRESS_IN | |
}, | |
RESPONDER_ACTIVE_LONG_PRESS_OUT: { | |
DELAY: c.ERROR, | |
RESPONDER_GRANT: c.ERROR, | |
RESPONDER_RELEASE: c.NOT_RESPONDER, | |
RESPONDER_TERMINATED: c.NOT_RESPONDER, | |
ENTER_PRESS_RECT: c.RESPONDER_ACTIVE_LONG_PRESS_IN, | |
LEAVE_PRESS_RECT: c.RESPONDER_ACTIVE_LONG_PRESS_OUT, | |
LONG_PRESS_DETECTED: c.ERROR | |
}, | |
error: { | |
DELAY: c.NOT_RESPONDER, | |
RESPONDER_GRANT: c.RESPONDER_INACTIVE_PRESS_IN, | |
RESPONDER_RELEASE: c.NOT_RESPONDER, | |
RESPONDER_TERMINATED: c.NOT_RESPONDER, | |
ENTER_PRESS_RECT: c.NOT_RESPONDER, | |
LEAVE_PRESS_RECT: c.NOT_RESPONDER, | |
LONG_PRESS_DETECTED: c.NOT_RESPONDER | |
} | |
}, | |
g = 130, | |
_ = 20, | |
y = 500, | |
v = 10, | |
S = { | |
touchableGetInitialState: function() { | |
return { | |
touchable: { | |
touchState: void 0, | |
responderID: null | |
} | |
} | |
}, | |
touchableHandleResponderTerminationRequest: function() { | |
return !this.props.rejectResponderTermination | |
}, | |
touchableHandleStartShouldSetResponder: function() { | |
return !0 | |
}, | |
touchableLongPressCancelsPress: function() { | |
return !0 | |
}, | |
touchableHandleResponderGrant: function(e, t) { | |
e.persist(), this.state.touchable.touchState = c.NOT_RESPONDER, this.state.touchable.responderID = t, this._receiveSignal(f.RESPONDER_GRANT, e); | |
var n = void 0 !== this.touchableGetHighlightDelayMS ? this.touchableGetHighlightDelayMS() : g; | |
0 !== n ? this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), n) : this._handleDelay(e), this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), y - n) | |
}, | |
touchableHandleResponderRelease: function(e) { | |
this._receiveSignal(f.RESPONDER_RELEASE, e) | |
}, | |
touchableHandleResponderTerminate: function(e) { | |
this._receiveSignal(f.RESPONDER_TERMINATED, e) | |
}, | |
touchableHandleResponderMove: function(e) { | |
if (this.state.touchable.touchState !== c.RESPONDER_INACTIVE_PRESS_IN && this.state.touchable.positionOnActivate) { | |
var t = this.state.touchable.positionOnActivate, | |
n = this.state.touchable.dimensionsOnActivate, | |
r = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : null, | |
i = null != r.left ? r.left : _, | |
o = null != r.top ? r.top : _, | |
a = null != r.right ? r.right : _, | |
l = null != r.bottom ? r.bottom : _, | |
u = s.extractSingleTouch(e.nativeEvent), | |
p = u && u.pageX, | |
d = u && u.pageY; | |
if (this.pressInLocation) { | |
var h = this._getDistanceBetweenPoints(p, d, this.pressInLocation.pageX, this.pressInLocation.pageY); | |
h > v && this._cancelLongPressDelayTimeout() | |
} | |
var m = p > t.left - i && d > t.top - o && p < t.left + n.width + a && d < t.top + n.height + l; | |
m ? this._receiveSignal(f.ENTER_PRESS_RECT, e) : this._receiveSignal(f.LEAVE_PRESS_RECT, e) | |
} | |
}, | |
_remeasureMetricsOnActivation: function() { | |
u(this.state.touchable.responderID, null, this._handleQueryLayout) | |
}, | |
_handleQueryLayout: function(e, t, n, r, i, s) { | |
this.state.touchable.positionOnActivate && a.release(this.state.touchable.positionOnActivate), this.state.touchable.dimensionsOnActivate && o.release(this.state.touchable.dimensionsOnActivate), this.state.touchable.positionOnActivate = a.getPooled(i, s), this.state.touchable.dimensionsOnActivate = o.getPooled(n, r) | |
}, | |
_handleDelay: function(e) { | |
this.touchableDelayTimeout = null, this._receiveSignal(f.DELAY, e) | |
}, | |
_handleLongDelay: function(e) { | |
this.longPressDelayTimeout = null, this._receiveSignal(f.LONG_PRESS_DETECTED, e) | |
}, | |
_receiveSignal: function(e, t) { | |
var n = this.state.touchable.touchState; | |
if (!m[n] || !m[n][e]) throw new Error("Unrecognized signal `" + e + "` or state `" + n + "` for Touchable responder `" + this.state.touchable.responderID + "`"); | |
var r = m[n][e]; | |
if (r === c.ERROR) throw new Error("Touchable cannot transition from `" + n + "` to `" + e + "` for responder `" + this.state.touchable.responderID + "`"); | |
n !== r && (this._performSideEffectsForTransition(n, r, e, t), this.state.touchable.touchState = r) | |
}, | |
_cancelLongPressDelayTimeout: function() { | |
this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout), this.longPressDelayTimeout = null | |
}, | |
_isHighlight: function(e) { | |
return e === c.RESPONDER_ACTIVE_PRESS_IN || e === c.RESPONDER_ACTIVE_LONG_PRESS_IN | |
}, | |
_savePressInLocation: function(e) { | |
var t = s.extractSingleTouch(e.nativeEvent), | |
n = t && t.pageX, | |
r = t && t.pageY; | |
this.pressInLocation = { | |
pageX: n, | |
pageY: r | |
} | |
}, | |
_getDistanceBetweenPoints: function(e, t, n, r) { | |
var i = e - n, | |
o = t - r; | |
return Math.sqrt(i * i + o * o) | |
}, | |
_performSideEffectsForTransition: function(e, t, n, r) { | |
var i = this._isHighlight(e), | |
o = this._isHighlight(t), | |
a = n === f.RESPONDER_TERMINATED || n === f.RESPONDER_RELEASE; | |
if (a && this._cancelLongPressDelayTimeout(), !p[e] && p[t] && this._remeasureMetricsOnActivation(), d[e] && n === f.LONG_PRESS_DETECTED && this.touchableHandleLongPress && this.touchableHandleLongPress(), o && !i ? (this._savePressInLocation(r), this.touchableHandleActivePressIn && this.touchableHandleActivePressIn()) : !o && i && this.touchableHandleActivePressOut && this.touchableHandleActivePressOut(), d[e] && n === f.RESPONDER_RELEASE) { | |
var s = !!this.touchableHandleLongPress, | |
l = h[e] && (!s || !this.touchableLongPressCancelsPress()), | |
u = !h[e] || l; | |
u && this.touchableHandlePress && this.touchableHandlePress(r) | |
} | |
this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout), this.touchableDelayTimeout = null | |
} | |
}, | |
b = { | |
Mixin: S | |
}; | |
i.exports = b | |
}), __d("BoundingDimensions", ["PooledClass"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
this.width = e, this.height = t | |
} | |
var a = t("PooledClass"), | |
s = a.twoArgumentPooler; | |
o.getPooledFromElement = function(e) { | |
return o.getPooled(e.offsetWidth, e.offsetHeight) | |
}, a.addPoolingTo(o, s), i.exports = o | |
}), __d("Position", ["PooledClass"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
this.left = e, this.top = t | |
} | |
var a = t("PooledClass"), | |
s = a.twoArgumentPooler; | |
a.addPoolingTo(o, s), i.exports = o | |
}), __d("TouchEventUtils", [], function(e, t, n, r, i) { | |
var o = { | |
extractSingleTouch: function(e) { | |
var t = e.touches, | |
n = e.changedTouches, | |
r = t && t.length > 0, | |
i = n && n.length > 0; | |
return !r && i ? n[0] : r ? t[0] : e | |
} | |
}; | |
i.exports = o | |
}), __d("queryLayoutByID", ["ReactIOSTagHandles", "NativeModulesDeprecated"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactIOSTagHandles"), | |
a = t("NativeModulesDeprecated").RKUIManager, | |
s = function(e, t, n) { | |
a.measure(o.rootNodeIDToTag[e], n) | |
}; | |
i.exports = s | |
}), __d("THColors", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
backgroundColor: "#ffffff", | |
backgroundWash: "#f5f6f7", | |
borderColor: "#e4e7e7", | |
buttonColor: "#eeeeee", | |
darkerDivider: "#cacdce", | |
divider: "#e1e4e5", | |
fadedText: "#d3d6db", | |
fakeStoryTextBlock: "#ecebec", | |
feedbackFadedText: "#adb2bb", | |
feedbackText: "#898f9c", | |
groupsAccent: "#2891f7", | |
lightBackgroundWash: "#f5f6f7", | |
lightBlue: "#2ea2ff", | |
mediumGray: "#333333", | |
reportedText: "#6a7180", | |
timestamp: "#b9b9b9", | |
unlikedGray: "#b9b9b9" | |
}; | |
i.exports = o | |
}), __d("THDockedInputContainer", ["DocumentContent", "LayoutAnimation", "NativeModulesDeprecated", "POPAnimation", "POPAnimationMixin", "React", "Dimensions", "StyleSheet", "Subscribable", "THAnimations", "THColors", "THInputBarView", "View", "cloneWithProps", "keyMirror", "logError"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DocumentContent"), | |
a = t("LayoutAnimation"), | |
s = t("NativeModulesDeprecated"), | |
l = t("POPAnimation"), | |
u = t("POPAnimationMixin"), | |
c = t("React"), | |
p = t("Dimensions"), | |
d = t("StyleSheet"), | |
h = t("Subscribable"), | |
f = t("THAnimations"), | |
m = t("THColors"), | |
g = t("THInputBarView"), | |
_ = t("View"), | |
y = t("cloneWithProps"), | |
v = t("keyMirror"), | |
S = t("logError"), | |
b = "scroll_responder", | |
R = "comment_input", | |
w = "comment_input_wash", | |
C = s.RKUIManager, | |
E = { | |
property: l.Properties.translationY, | |
toValue: 280, | |
velocity: 20 | |
}, | |
D = { | |
property: l.Properties.translationY, | |
dynamicsTension: 0, | |
toValue: 0, | |
velocity: 100 | |
}, | |
T = { | |
property: l.Properties.opacity, | |
toValue: 0, | |
duration: .3 | |
}, | |
x = { | |
property: l.Properties.opacity, | |
toValue: .5, | |
duration: .3 | |
}, | |
P = { | |
property: l.Properties.opacity, | |
toValue: 1, | |
duration: .3 | |
}, | |
I = c.createClass({ | |
displayName: "THDockedInputContainer", | |
propTypes: { | |
scrollResponder: c.PropTypes.object.isRequired, | |
onDockedCommentSubmit: c.PropTypes.func, | |
onDockedCommentAbort: c.PropTypes.func, | |
onDidDock: c.PropTypes.func, | |
groupID: c.PropTypes.string | |
}, | |
statics: { | |
Mode: v({ | |
partialWash: !0, | |
fullHide: !0 | |
}), | |
contentPaddingHorizontal: 16 | |
}, | |
mixins: [h.Mixin, u], | |
getInitialState: function() { | |
return { | |
initialText: new o, | |
getTappedNodeHandle: null, | |
recentKeyboardMovement: null, | |
inputWashTop: 0 | |
} | |
}, | |
handleDockAnimateOutComplete: function() { | |
this.refs[w].setNativeProps({ | |
style: { | |
opacity: 0 | |
} | |
}), this.startAnimation(w, l.createLinearAnimation(D)) | |
}, | |
handleKeyboardWillHide: function(e) { | |
if (this.state.recentKeyboardMovement = e, this.state.getTappedNodeHandle) { | |
var t = [{ | |
ref: w, | |
anim: l.createEaseOutAnimation(E) | |
}, { | |
ref: w, | |
anim: l.createLinearAnimation(T) | |
}], | |
n = this.state.getTappedNodeHandle(); | |
n && (this.refs[b].scrollResponderScrollNativeHandleToKeyboard(n, this.state.mode === I.Mode.partialWash ? this.refs[R].getBarHeight() : 0), t.push({ | |
nodeHandle: n, | |
anim: l.createLinearAnimation(P) | |
})), this.startAnimations(t, this.handleDockAnimateOutComplete, S), this.state.getTappedNodeHandle = null, this.refs[R].blurInput() | |
} | |
}, | |
handleKeyboardDidShow: function() { | |
this.state.getTappedNodeHandle && (this.refs[b].setNativeProps({ | |
scrollEnabled: !0 | |
}), this.props.onDidDock && this.props.onDidDock(), this.startAnimations([{ | |
ref: w, | |
anim: l.createLinearAnimation(P) | |
}, { | |
nodeHandle: this.state.getTappedNodeHandle(), | |
anim: l.createLinearAnimation(this.state.mode === I.Mode.partialWash ? x : T) | |
}])) | |
}, | |
handleKeyboardWillShow: function(e) { | |
if (this.state.getTappedNodeHandle) { | |
var t = this.getBarHeight(); | |
this.refs[b].scrollResponderScrollNativeHandleToKeyboard(this.state.getTappedNodeHandle(), this.state.mode === I.Mode.partialWash ? t : 0), this.state.recentKeyboardMovement = e, this.updateDockedInputLocation(t) | |
} | |
}, | |
getInitialBarHeight: function() { | |
return this.refs[R].getInitialBarHeight() | |
}, | |
getBarHeight: function() { | |
return this.refs[R].getBarHeight() | |
}, | |
handleInputBarHeightChange: function(e) { | |
this.updateDockedInputLocation(e), this.props.onHeightChange && this.props.onHeightChange(e) | |
}, | |
updateDockedInputLocation: function(e) { | |
var t = this.state.recentKeyboardMovement.endCoordinates.screenY - e; | |
this.setState({ | |
inputWashTop: t | |
}) | |
}, | |
enableScrollResponderAutoInsets: function(e) { | |
this.refs[b].setNativeProps({ | |
automaticallyAdjustContentInsets: e | |
}) | |
}, | |
initiateDockedInput: function(e) { | |
var t = e.getTappedNodeHandle, | |
n = e.mode, | |
r = e.initialText, | |
i = e.comparisonTextForCanPost, | |
o = e.photoSource, | |
a = e.isEditing; | |
this.setState({ | |
getTappedNodeHandle: t, | |
mode: n, | |
initialText: r, | |
text: r, | |
comparisonTextForCanPost: i, | |
photoSource: o, | |
isEditing: a | |
}), this.refs[b].setNativeProps({ | |
scrollEnabled: !1 | |
}), this.refs[R].focusInput() | |
}, | |
componentDidMount: function() { | |
C.setMainScrollViewTag(this.refs[b].getNodeHandle()) | |
}, | |
componentDidUnmount: function() { | |
C.setMainScrollViewTag(0) | |
}, | |
handleTextChange: function(e) { | |
a.configureNext(f.layout.inputButtons), this.setState({ | |
text: e | |
}) | |
}, | |
handlePhotoChange: function(e) { | |
this.setState({ | |
photoSource: e | |
}) | |
}, | |
getScrollResponder: function() { | |
return this.refs[b] | |
}, | |
cancelDockedInput: function() { | |
this.refs[R].blurInput() | |
}, | |
render: function() { | |
var e = y(this.props.scrollResponder, { | |
ref: b, | |
onKeyboardWillShow: this.handleKeyboardWillShow, | |
onKeyboardDidShow: this.handleKeyboardDidShow, | |
onKeyboardWillHide: this.handleKeyboardWillHide, | |
onScrollResponderKeyboardDismissed: this.props.onDockedCommentAbort.bind(null, { | |
text: this.state.text, | |
getTappedNodeHandle: this.state.getTappedNodeHandle, | |
initialText: this.state.initialText, | |
photoSource: this.state.photoSource | |
}) | |
}); | |
return c.createElement(_, { | |
style: F.container | |
}, e, c.createElement(_, { | |
style: [F.inputWash, { | |
top: this.state.inputWashTop | |
}], | |
ref: w | |
}, c.createElement(g, { | |
canComment: !0, | |
canCommentInline: !0, | |
isEditing: this.state.isEditing, | |
photoSource: this.state.photoSource, | |
ref: R, | |
groupID: this.props.groupID, | |
initialText: this.state.initialText, | |
comparisonTextForCanPost: this.state.comparisonTextForCanPost, | |
onTextChange: this.handleTextChange, | |
onPhotoChange: this.handlePhotoChange, | |
onHeightChange: this.handleInputBarHeightChange, | |
onCommentSubmit: this.props.onDockedCommentSubmit, | |
paddingHorizontal: I.contentPaddingHorizontal | |
}))) | |
} | |
}), | |
F = d.create({ | |
container: { | |
height: p.get("window").height, | |
width: p.get("window").width, | |
backgroundColor: m.backgroundWash | |
}, | |
inputWash: { | |
height: 600, | |
opacity: 0, | |
position: "absolute", | |
backgroundColor: m.backgroundColor, | |
right: 0, | |
left: 0 | |
} | |
}); | |
i.exports = I | |
}), __d("DocumentContent", ["DocumentCharacters", "fillArray", "invariant", "ComposedBlockType", "ComposedInlineStyle"], function(e, t, n, r, i) { | |
function o(e, t) { | |
return t.length !== l(e) && d(0, "Length of block array must match number of blocks in text."), t | |
} | |
function a(e, t) { | |
return t.length != e.length && d(0, "Length of inline style array must match text length."), t | |
} | |
function s(e, t) { | |
return t.length !== e.length && d(0, "Length of entity array must match text length."), t | |
} | |
function l(e, t) { | |
return null != t && (e = e.substr(0, t)), e.split(h).length | |
} | |
function u(e, t, n, r) { | |
"use strict"; | |
this.$DocumentContent_version = 1, this.$DocumentContent_text = e || "", this.$DocumentContent_inlines = t ? a(this.$DocumentContent_text, t) : p(this.$DocumentContent_text.length, m.NONE), this.$DocumentContent_blocks = n ? o(this.$DocumentContent_text, n) : p(l(this.$DocumentContent_text), f.UNSTYLED), this.$DocumentContent_entities = r ? s(this.$DocumentContent_text, r) : p(this.$DocumentContent_text.length, null), this.$DocumentContent_undoStack = [], this.$DocumentContent_redoStack = [] | |
} | |
var c = t("DocumentCharacters"), | |
p = t("fillArray"), | |
d = t("invariant"), | |
h = c.BLOCK_DELIMITER, | |
f = t("ComposedBlockType"), | |
m = t("ComposedInlineStyle"); | |
u.prototype.bumpVersion = function() { | |
"use strict"; | |
this.$DocumentContent_version++ | |
}, u.prototype.getVersion = function() { | |
"use strict"; | |
return "v" + this.$DocumentContent_version | |
}, u.prototype.getText = function() { | |
"use strict"; | |
return this.$DocumentContent_text | |
}, u.prototype.getInlineStyles = function() { | |
"use strict"; | |
return this.$DocumentContent_inlines | |
}, u.prototype.getBlockStyles = function() { | |
"use strict"; | |
return this.$DocumentContent_blocks | |
}, u.prototype.getBlockStylesAroundRange = function(e, t) { | |
"use strict"; | |
var n = l(this.$DocumentContent_text, e) - 1, | |
r = l(this.$DocumentContent_text, t); | |
return this.$DocumentContent_blocks.slice(n, r) | |
}, u.prototype.getEntities = function() { | |
"use strict"; | |
return this.$DocumentContent_entities | |
}, u.prototype.getFragment = function(e, t) { | |
"use strict"; | |
return { | |
text: this.$DocumentContent_text.slice(e, t), | |
inlines: this.$DocumentContent_inlines.slice(e, t), | |
blocks: this.getBlockStylesAroundRange(e, t), | |
entities: this.$DocumentContent_entities.slice(e, t) | |
} | |
}, u.prototype.getData = function() { | |
"use strict"; | |
return { | |
text: this.$DocumentContent_text, | |
inlines: this.$DocumentContent_inlines, | |
blocks: this.$DocumentContent_blocks, | |
entities: this.$DocumentContent_entities | |
} | |
}, u.prototype.update = function(e, t, n, r) { | |
"use strict"; | |
s(e, r), a(e, t), o(e, n), this.$DocumentContent_text = e, this.$DocumentContent_inlines = t, this.$DocumentContent_blocks = n, this.$DocumentContent_entities = r, this.$DocumentContent_version++ | |
}, u.prototype.addForwardTransaction = function(e) { | |
"use strict"; | |
this.$DocumentContent_undoStack.push(e), this.$DocumentContent_redoStack.length = 0 | |
}, u.prototype.getUndoDiffs = function() { | |
"use strict"; | |
if (this.$DocumentContent_undoStack.length > 0) { | |
var e = this.$DocumentContent_undoStack.pop(); | |
return this.$DocumentContent_redoStack.push(e), e | |
} | |
return [] | |
}, u.prototype.getRedoDiffs = function() { | |
"use strict"; | |
if (this.$DocumentContent_redoStack.length > 0) { | |
var e = this.$DocumentContent_redoStack.pop(); | |
return this.$DocumentContent_undoStack.push(e), e | |
} | |
return [] | |
}, i.exports = u | |
}), __d("DocumentCharacters", [], function(e, t, n, r, i) { | |
var o = { | |
BLOCK_DELIMITER: "\r", | |
SOFT_NEWLINE: "\n", | |
PHOTO: "", | |
VIDEO: "" | |
}; | |
i.exports = o | |
}), __d("fillArray", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
for (var n = new Array(e), r = 0; e > r; r++) n[r] = t; | |
return n | |
} | |
i.exports = o | |
}), __d("ComposedBlockType", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
UNSTYLED: 0, | |
PARAGRAPH: 1, | |
UNORDERED_LIST_ITEM: 2, | |
ORDERED_LIST_ITEM: 3, | |
BLOCKQUOTE: 4, | |
HEADER_ONE: 5, | |
HEADER_TWO: 6, | |
CODE: 7, | |
MEDIA: 8 | |
}; | |
i.exports = o | |
}), __d("ComposedInlineStyle", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
NONE: 0, | |
BOLD: 1, | |
ITALIC: 2, | |
UNDERLINE: 4, | |
CODE: 8 | |
}; | |
i.exports = o | |
}), __d("POPAnimation", ["ReactPropTypes", "NativeModules", "createStrictShapeTypeChecker", "getObjectValues", "invariant", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("ReactPropTypes"), | |
a = t("NativeModules").RKPOPAnimationManager, | |
s = t("createStrictShapeTypeChecker"), | |
l = t("getObjectValues"), | |
u = t("invariant"), | |
c = t("merge"), | |
p = a.Types, | |
d = a.Properties, | |
h = { | |
bounds: d.bounds, | |
opacity: d.opacity, | |
position: d.position, | |
positionX: d.positionX, | |
positionY: d.positionY, | |
zPosition: d.zPosition, | |
rotation: d.rotation, | |
rotationX: d.rotationX, | |
rotationY: d.rotationY, | |
scaleX: d.scaleX, | |
scaleXY: d.scaleXY, | |
scaleY: d.scaleY, | |
shadowColor: d.shadowColor, | |
shadowOffset: d.shadowOffset, | |
shadowOpacity: d.shadowOpacity, | |
shadowRadius: d.shadowRadius, | |
size: d.size, | |
subscaleXY: d.subscaleXY, | |
subtranslationX: d.subtranslationX, | |
subtranslationXY: d.subtranslationXY, | |
subtranslationY: d.subtranslationY, | |
subtranslationZ: d.subtranslationZ, | |
translationX: d.translationX, | |
translationXY: d.translationXY, | |
translationY: d.translationY, | |
translationZ: d.translationZ | |
}, | |
f = { | |
decay: p.decay, | |
easeIn: p.easeIn, | |
easeInEaseOut: p.easeInEaseOut, | |
easeOut: p.easeOut, | |
linear: p.linear, | |
spring: p.spring | |
}, | |
m = { | |
Types: f, | |
Properties: h, | |
attributeChecker: s({ | |
type: o.oneOf(l(f)), | |
property: o.oneOf(l(h)), | |
fromValue: o.any, | |
toValue: o.any, | |
duration: o.any, | |
velocity: o.any, | |
deceleration: o.any, | |
springBounciness: o.any, | |
dynamicsFriction: o.any, | |
dynamicsMass: o.any, | |
dynamicsTension: o.any | |
}), | |
lastUsedTag: 0, | |
allocateTagForAnimation: function() { | |
return ++this.lastUsedTag | |
}, | |
createAnimation: function(e, t) { | |
var n = this.allocateTagForAnimation(); | |
return __DEV__ && (m.attributeChecker({ | |
attrs: t | |
}, "attrs", "POPAnimation.createAnimation"), m.attributeChecker({ | |
attrs: { | |
type: e | |
} | |
}, "attrs", "POPAnimation.createAnimation")), a.createAnimationInternal(n, e, t), n | |
}, | |
createSpringAnimation: function(e) { | |
return this.createAnimation(this.Types.spring, e) | |
}, | |
createDecayAnimation: function(e) { | |
return this.createAnimation(this.Types.decay, e) | |
}, | |
createLinearAnimation: function(e) { | |
return this.createAnimation(this.Types.linear, e) | |
}, | |
createEaseInAnimation: function(e) { | |
return this.createAnimation(this.Types.easeIn, e) | |
}, | |
createEaseOutAnimation: function(e) { | |
return this.createAnimation(this.Types.easeOut, e) | |
}, | |
createEaseInEaseOutAnimation: function(e) { | |
return this.createAnimation(this.Types.easeInEaseOut, e) | |
} | |
}; | |
if (__DEV__) { | |
var g = c(a.Properties, a.Properties); | |
for (var _ in g) m.Properties[_] !== a.Properties[_] && u(0, "POPAnimation doesn't copy property " + _ + " correctly"); | |
var y = c(a.Types, a.Types); | |
for (var _ in y) m.Types[_] !== a.Types[_] && u(0, "POPAnimation doesn't copy type " + _ + " correctly") | |
} | |
i.exports = m | |
}), __d("getObjectValues", [], function(e, t, n, r, i) { | |
function o(e) { | |
var t = []; | |
for (var n in e) t.push(e[n]); | |
return t | |
} | |
i.exports = o | |
}), __d("POPAnimationMixin", ["NativeModulesDeprecated", "POPAnimation", "invariant", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeModulesDeprecated"), | |
a = t("POPAnimation"), | |
s = t("invariant"), | |
l = t("warning"), | |
u = o.RKPOPAnimationManager, | |
c = { | |
AnimationTypes: a.Types, | |
AnimationProperties: a.Properties, | |
getInitialState: function() { | |
return { | |
_currentAnimationsByNodeHandle: {} | |
} | |
}, | |
_ensureBookkeepingSetup: function(e) { | |
this.state._currentAnimationsByNodeHandle[e] || (this.state._currentAnimationsByNodeHandle[e] = []) | |
}, | |
startAnimation: function(e, t, n) { | |
var r = 0; | |
"number" == typeof t ? r = t : (t instanceof Object && void 0 !== t.type && void 0 !== t.property || s(0, "Animation definitions must specify a type of animation and a property to animate."), r = a.createAnimation(t.type, t)), this.refs[e] || s(0, "Invalid refKey " + e + " for anim:\n" + JSON.stringify(t) + "\nvalid refs: " + JSON.stringify(Object.keys(this.refs))); | |
var i = this.refs[e].getNodeHandle(); | |
this.startAnimationWithNodeHandle(i, r, n) | |
}, | |
startAnimationWithNodeHandle: function(e, t, n) { | |
this._ensureBookkeepingSetup(e); | |
var r = this.state._currentAnimationsByNodeHandle[e], | |
i = r.length; | |
r.push(t); | |
var o = function(t) { | |
if (this.isMounted()) { | |
r[i] = 0; | |
for (var o = !0, a = 0; a < r.length; a++) | |
if (r[a]) { | |
o = !1; | |
break | |
} | |
o && (this.state._currentAnimationsByNodeHandle[e] = void 0), n && n(t) | |
} | |
}.bind(this); | |
u.addAnimation(e, t, o) | |
}, | |
startAnimations: function(e, t) { | |
var n = 0, | |
r = 0, | |
i = e.length, | |
o = function(e) { | |
e && ++r, ++n === i && t && t(r === i) | |
}; | |
e.forEach(function(e) { | |
l(null != e.ref || null != e.nodeHandle && !e.ref != !e.nodeHandle, "Animations must be specified with either ref xor nodeHandle"), e.ref ? this.startAnimation(e.ref, e.anim, o) : e.nodeHandle && this.startAnimationWithNodeHandle(e.nodeHandle, e.anim, o) | |
}.bind(this)) | |
}, | |
stopNodeHandleAnimations: function(e) { | |
if (this.state._currentAnimationsByNodeHandle[e]) { | |
for (var t = this.state._currentAnimationsByNodeHandle[e], n = 0; n < t.length; n++) { | |
var r = t[n]; | |
r && u.removeAnimation(+e, r) | |
} | |
this.state._currentAnimationsByNodeHandle[e] = void 0 | |
} | |
}, | |
stopAnimations: function(e) { | |
this.refs[e] || s(0, "invalid ref"), this.stopNodeHandleAnimations(this.refs[e].getNodeHandle()) | |
}, | |
stopAllAnimations: function() { | |
for (var e in this.state._currentAnimationsByNodeHandle) this.stopNodeHandleAnimations(e) | |
}, | |
animateToFrame: function(e, t, n, r, i) { | |
var o = { | |
x: t.left + t.width / 2, | |
y: t.top + t.height / 2, | |
w: t.width, | |
h: t.height | |
}; | |
t = void 0; | |
var r = r || [0, 0], | |
s = a.createAnimation(n, { | |
property: a.Properties.position, | |
toValue: [o.x, o.y], | |
velocity: r | |
}), | |
l = a.createAnimation(n, { | |
property: a.Properties.size, | |
toValue: [o.w, o.h] | |
}); | |
this.startAnimation(e, s, i), this.startAnimation(e, l) | |
}, | |
componentWillUnmount: function() { | |
this.stopAllAnimations() | |
} | |
}; | |
i.exports = c | |
}), __d("THAnimations", ["LayoutAnimation", "mergeDeep"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("LayoutAnimation"), | |
a = t("mergeDeep"), | |
s = { | |
duration: .3, | |
create: { | |
type: o.Types.easeInEaseOut, | |
property: o.Properties.opacity | |
}, | |
update: { | |
type: o.Types.easeInEaseOut | |
} | |
}, | |
l = { | |
layout: { | |
like: s, | |
likeWithComment: a(s, { | |
create: { | |
property: o.Properties.scaleXY | |
} | |
}), | |
likeWithNoComments: s, | |
moreComments: s, | |
openPinnedPost: s, | |
photoCommentPreview: a(s, { | |
duration: .25, | |
create: { | |
type: o.Types.easeOut, | |
property: o.Properties.scaleXY | |
} | |
}), | |
inputButtons: a(s, { | |
duration: .25, | |
create: { | |
type: o.Types.easeOut | |
}, | |
update: { | |
property: o.Properties.opacity | |
} | |
}) | |
} | |
}; | |
for (var u in l.layout) o.configChecker(l.layout, u, "Animation.create"); | |
i.exports = l | |
}), __d("mergeDeep", ["mergeHelpers", "mergeDeepInto"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("mergeHelpers"), | |
a = t("mergeDeepInto"), | |
s = o.checkArrayStrategy, | |
l = o.checkMergeObjectArgs, | |
u = o.normalizeMergeArg, | |
c = function(e, t, n) { | |
var r = u(e), | |
i = u(t); | |
l(r, i), s(n); | |
var o = {}; | |
return a(o, r, n), a(o, i, n), o | |
}; | |
i.exports = c | |
}), __d("mergeHelpers", ["invariant", "keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = t("keyMirror"), | |
s = 36, | |
l = function(e) { | |
return "object" != typeof e || null === e | |
}, | |
u = { | |
MAX_MERGE_DEPTH: s, | |
isTerminal: l, | |
normalizeMergeArg: function(e) { | |
return void 0 === e || null === e ? {} : e | |
}, | |
checkMergeArrayArgs: function(e, t) { | |
Array.isArray(e) && Array.isArray(t) || o(0, "Tried to merge arrays, instead got %s and %s.", e, t) | |
}, | |
checkMergeObjectArgs: function(e, t) { | |
u.checkMergeObjectArg(e), u.checkMergeObjectArg(t) | |
}, | |
checkMergeObjectArg: function(e) { | |
(l(e) || Array.isArray(e)) && o(0, "Tried to merge an object, instead got %s.", e) | |
}, | |
checkMergeIntoObjectArg: function(e) { | |
(l(e) && "function" != typeof e || Array.isArray(e)) && o(0, "Tried to merge into an object, instead got %s.", e) | |
}, | |
checkMergeLevel: function(e) { | |
s > e || o(0, "Maximum deep merge depth exceeded. You may be attempting to merge circular structures in an unsupported way.") | |
}, | |
checkArrayStrategy: function(e) { | |
void 0 === e || e in u.ArrayStrategies || o(0, "You must provide an array strategy to deep merge functions to instruct the deep merge how to resolve merging two arrays.") | |
}, | |
ArrayStrategies: a({ | |
Clobber: !0, | |
IndexByIndex: !0 | |
}) | |
}; | |
i.exports = u | |
}), __d("mergeDeepInto", ["invariant", "mergeHelpers"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = t("mergeHelpers"), | |
s = a.ArrayStrategies, | |
l = a.checkArrayStrategy, | |
u = a.checkMergeArrayArgs, | |
c = a.checkMergeLevel, | |
p = a.checkMergeObjectArgs, | |
d = a.isTerminal, | |
h = a.normalizeMergeArg, | |
f = function(e, t, n, r) { | |
p(e, t), c(r); | |
for (var i = t ? Object.keys(t) : [], o = 0; o < i.length; o++) { | |
var a = i[o]; | |
g(e, t, a, n, r) | |
} | |
}, | |
m = function(e, t, n, r) { | |
u(e, t), c(r); | |
for (var i = Math.max(e.length, t.length), o = 0; i > o; o++) g(e, t, o, n, r) | |
}, | |
g = function(e, t, n, r, i) { | |
var a = t[n], | |
l = t.hasOwnProperty(n), | |
u = l && d(a), | |
c = l && Array.isArray(a), | |
p = l && !c && !c, | |
h = e[n], | |
g = e.hasOwnProperty(n), | |
_ = g && d(h), | |
y = g && Array.isArray(h), | |
v = g && !y && !y; | |
_ ? u ? e[n] = a : c ? (e[n] = [], m(e[n], a, r, i + 1)) : p ? (e[n] = {}, f(e[n], a, r, i + 1)) : l || (e[n] = h) : y ? u ? e[n] = a : c ? (s[r] || o(0, "mergeDeepInto(...): Attempted to merge two arrays, but a valid ArrayStrategy was not specified."), r === s.Clobber && (h.length = 0), m(h, a, r, i + 1)) : p && (e[n] = {}, f(e[n], a, r, i + 1)) : v ? u ? e[n] = a : c ? (e[n] = [], m(e[n], a, r, i + 1)) : p && f(h, a, r, i + 1) : g || (u ? e[n] = a : c ? (e[n] = [], m(e[n], a, r, i + 1)) : p && (e[n] = {}, f(e[n], a, r, i + 1))) | |
}, | |
_ = function(e, t, n) { | |
var r = h(t); | |
l(n), f(e, r, n, 0) | |
}; | |
i.exports = _ | |
}), __d("THInputBarView", ["LayoutAnimation", "Dimensions", "DocumentContent", "DocumentSelectionState", "FIGColors", "FBStickerInputView", "Image", "MentionsInput.react", "MentionsInputTypeaheadView.react", "NativeModulesDeprecated", "React", "StyleSheet", "TimerMixin", "Text", "THAnimations", "THColors", "THCommentPhotoAttachmentPreview", "THSounds", "TouchableBounce", "TouchableOpacity", "TouchableHighlight", "TouchableWithoutFeedback", "View", "clamp", "copyDocumentContent", "documentContentsAreEqual", "fbt", "getMentionsSearchSource", "getTextWithEntitiesFromDocument", "ix"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("LayoutAnimation"), | |
a = t("Dimensions"), | |
s = t("DocumentContent"), | |
l = t("DocumentSelectionState"), | |
u = t("FIGColors"), | |
c = t("FBStickerInputView"), | |
p = t("Image"), | |
d = t("MentionsInput.react"), | |
h = t("MentionsInputTypeaheadView.react"), | |
f = t("NativeModulesDeprecated"), | |
m = t("React"), | |
g = t("StyleSheet"), | |
_ = t("TimerMixin"), | |
y = t("Text"), | |
v = t("THAnimations"), | |
S = t("THColors"), | |
b = t("THCommentPhotoAttachmentPreview"), | |
R = t("THSounds"), | |
w = t("TouchableBounce"), | |
C = t("TouchableOpacity"), | |
E = t("TouchableHighlight"), | |
D = t("TouchableWithoutFeedback"), | |
T = t("View"), | |
x = t("clamp"), | |
P = t("copyDocumentContent"), | |
I = t("documentContentsAreEqual"), | |
F = t("fbt"), | |
L = t("getMentionsSearchSource"), | |
M = t("getTextWithEntitiesFromDocument"), | |
Q = t("ix"), | |
A = f.RKTreehouseManager, | |
k = "stickerInputView", | |
O = "keyboardInputView", | |
N = "inputRow", | |
G = "inputField", | |
$ = a.get("window").width, | |
B = 35, | |
H = 100, | |
V = 6, | |
q = .5, | |
U = 12, | |
j = 13, | |
W = 14, | |
K = function(e) { | |
return e + 2 * V + q | |
}, | |
z = F({ | |
type: "text", | |
texts: ["Write a comment..."], | |
desc: "Placeholder text for comment input" | |
}), | |
X = F({ | |
type: "text", | |
texts: ["Post"], | |
desc: "Post a comment" | |
}), | |
Y = F({ | |
type: "text", | |
texts: ["Update"], | |
desc: "Button label to save edits made to a comment" | |
}), | |
J = m.createClass({ | |
displayName: "THInputBarView", | |
mixins: [_], | |
propTypes: { | |
canCommentInline: m.PropTypes.bool, | |
onCommentInputRequested: m.PropTypes.func, | |
onCommentSubmit: m.PropTypes.func, | |
initialText: m.PropTypes.instanceOf(s), | |
isEditing: m.PropTypes.bool, | |
comparisonTextForCanPost: m.PropTypes.instanceOf(s), | |
hideInputButtons: m.PropTypes.bool, | |
groupID: m.PropTypes.string, | |
paddingHorizontal: m.PropTypes.number, | |
photoSource: m.PropTypes.object, | |
showPlaceholder: m.PropTypes.bool | |
}, | |
focusInput: function() { | |
this.refs[G].focus() | |
}, | |
blurInput: function() { | |
this.refs[G].blur(), this.setState({ | |
inputView: O | |
}) | |
}, | |
getDefaultProps: function() { | |
return { | |
initialText: new s, | |
hideInputButtons: !1, | |
comparisonTextForCanPost: null, | |
photoSource: null, | |
isEditing: !1 | |
} | |
}, | |
getInitialState: function() { | |
return { | |
documentContent: P(this.props.initialText), | |
selectionState: new l(0, 0), | |
submittingComment: !1, | |
inputFieldHeight: B, | |
mentionsSource: this.props.canCommentInline && L(this.props.groupID), | |
inputView: O, | |
photoSource: this.props.photoSource | |
} | |
}, | |
getInitialBarHeight: function() { | |
return K(B) | |
}, | |
getBarHeight: function() { | |
return K(this.state.inputFieldHeight) | |
}, | |
getPhotoSource: function() { | |
return this.state.photoSource ? this.state.photoSource : null | |
}, | |
handleChange: function(e) { | |
if (e) { | |
var t = e.nativeEvent.contentSize, | |
n = x(B, t.height, H); | |
this.state.inputFieldHeight !== n && (this.state.documentContent.bumpVersion(), this.setState({ | |
inputFieldHeight: n | |
}), this.props.onHeightChange && this.props.onHeightChange(K(n))) | |
} | |
this.props.onTextChange && this.props.onTextChange(this.state.documentContent) | |
}, | |
handleActiveInputPress: function() { | |
this.props.canCommentInline && this.setState({ | |
inputView: O | |
}) | |
}, | |
handleInactiveInputPress: function() { | |
this.props.onCommentInputRequested && this.props.onCommentInputRequested(function() { | |
return this.isMounted() && this.refs[N].getNodeHandle() | |
}.bind(this)) | |
}, | |
handleCommentSubmit: function() { | |
var e = null; | |
this.state.photoSource && (e = { | |
style_list: ["photo"], | |
media: { | |
image: this.state.photoSource | |
} | |
}), A && A.playSound(R.commentCompleted), this.setState({ | |
submittingComment: !0, | |
photoSource: null | |
}), this.refs[G] && this.blurInput(), this.props.onCommentSubmit && this.requestAnimationFrame(function() { | |
var t = M(this.state.documentContent); | |
t ? this.props.onCommentSubmit(t, e) : console.error("Should not be submitting empty comment.") | |
}.bind(this)) | |
}, | |
handlePhotoPickerSelect: function(e) { | |
o.configureNext(v.layout.photoCommentPreview), this.setState({ | |
photoSource: e | |
}), this.props.onPhotoChange && this.props.onPhotoChange(e) | |
}, | |
handleCameraButtonPress: function() { | |
A ? (A.openPhotoPicker(this.handlePhotoPickerSelect), this.setState({ | |
inputView: O | |
})) : console.warn("Photo picker not available") | |
}, | |
handleStickerKeyboardSwitch: function() { | |
this.setState(this.state.inputView === O ? { | |
inputView: k | |
} : { | |
inputView: O | |
}), this.focusInput() | |
}, | |
handleStickerCommentSubmit: function(e) { | |
A && A.playSound(R.commentCompleted), this.setState({ | |
submittingComment: !0 | |
}), this.refs[G] && this.blurInput(); | |
var t = e.nativeEvent.stickerFBID, | |
n = M(this.state.documentContent); | |
if (n && t) { | |
var r = { | |
style_list: ["sticker"], | |
media: { | |
id: t.toString() | |
} | |
}; | |
this.props.onCommentSubmit(n, r) | |
} else console.error("Should not be submitting invalid sticker.") | |
}, | |
componentWillReceiveProps: function(e) { | |
var t = this.props.initialText; | |
this.props = e, e.initialText !== t && this.resetCommentField(), this.setState({ | |
photoSource: this.props.photoSource | |
}) | |
}, | |
resetCommentField: function() { | |
var e = this.props.initialText || new s; | |
this.state.documentContent.update(e.getText(), e.getInlineStyles().slice(0), e.getBlockStyles().slice(0), e.getEntities().slice(0)), this.setState({ | |
submittingComment: !1 | |
}) | |
}, | |
removePhotoAttachment: function() { | |
o.configureNext(v.layout.photoCommentPreview), this.setState({ | |
photoSource: null | |
}), this.props.onPhotoChange && this.props.onPhotoChange(null) | |
}, | |
renderPhotoAttachment: function() { | |
var e = this.removePhotoAttachment; | |
return this.state.photoSource && !this.props.canCommentInline && (e = null), this.state.photoSource && !this.props.isEditing ? m.createElement(b, { | |
photoSource: this.state.photoSource, | |
onRemoveAttachment: e, | |
style: Z.thumbnailPhoto, | |
wrapperStyle: Z.previewContainer | |
}) : null | |
}, | |
renderStickerButton: function() { | |
if (this.props.isEditing) return null; | |
var e; | |
e = Q(this.state.inputView === k ? "thSmileGlyphSelected" : "thSmileGlyphNormal"); | |
var t = m.createElement(p, { | |
source: e, | |
style: Z.icon | |
}), | |
n = [Z.stickerButton]; | |
return (this.isPostButtonActive() || this.props.hideInputButtons) && n.push(Z.offscreenButton), m.createElement(D, { | |
onPress: this.handleStickerKeyboardSwitch | |
}, m.createElement(T, { | |
style: n | |
}, t)) | |
}, | |
renderCameraButton: function() { | |
if (!this.props.canCommentInline || this.props.hideInputButtons || this.state.photoSource || this.props.isEditing) return null; | |
var e = m.createElement(p, { | |
source: Q("thCameraGlyph"), | |
style: Z.icon | |
}); | |
return m.createElement(C, { | |
onPress: this.handleCameraButtonPress | |
}, m.createElement(T, { | |
style: Z.cameraButton | |
}, e)) | |
}, | |
renderPostButton: function() { | |
var e = [Z.postButton], | |
t = Z.postButtonText, | |
n = X, | |
r = this.handleCommentSubmit; | |
return this.props.isEditing ? (n = Y, this.isPostButtonActive() || (t = Z.inactivePostButtonText, r = null)) : (!this.isPostButtonActive() || this.props.hideInputButtons && !this.state.photoSource) && (e.push(Z.offscreenButton), r = null), m.createElement(w, { | |
onPress: r | |
}, m.createElement(T, { | |
style: e | |
}, m.createElement(y, { | |
style: t | |
}, n))) | |
}, | |
isPostButtonActive: function() { | |
var e = !this.state.documentContent.getText().trim(); | |
return this.props.isEditing ? !(this.state.submittingComment || e && !this.state.photoSource || I(this.props.comparisonTextForCanPost, this.state.documentContent)) : !this.state.submittingComment && (!e || this.state.photoSource) | |
}, | |
render: function() { | |
var e = null, | |
t = null; | |
switch (this.state.inputView) { | |
case O: | |
e = null; | |
break; | |
case k: | |
e = m.createElement(c, { | |
onStickerSelect: this.handleStickerCommentSubmit | |
}), t = m.createElement(D, { | |
onPress: this.handleActiveInputPress | |
}, m.createElement(T, { | |
style: Z.inputFieldOverlay | |
})); | |
break; | |
default: | |
e = null | |
} | |
var n, r, i, o; | |
this.props.canCommentInline ? (n = S.darkerDivider, r = W, i = this.state.inputFieldHeight, o = T.pointerEvents.unspecified) : (n = S.divider, r = j, i = B, o = T.pointerEvents.boxOnly); | |
var a = [Z.commentBox, { | |
height: i, | |
fontSize: r | |
}], | |
s = this.state.documentContent.getText() || this.props.canCommentInline && !this.props.showPlaceholder ? null : z, | |
l = m.createElement(d, { | |
ref: G, | |
documentContent: this.state.documentContent, | |
placeholder: s, | |
placeholderTextColor: S.feedbackFadedText, | |
selectionState: this.state.selectionState, | |
mentionsSource: this.state.mentionsSource || void 0, | |
typeaheadView: h, | |
textInputStyle: a, | |
onInputFocus: this.resetCommentField, | |
multiline: !0, | |
onChange: this.handleChange, | |
inputView: e | |
}); | |
return m.createElement(T, { | |
ref: N | |
}, m.createElement(T, { | |
key: "divReply", | |
style: [Z.divider, { | |
backgroundColor: n | |
}] | |
}), m.createElement(T, { | |
style: [Z.buttonsContainer, { | |
paddingHorizontal: this.props.paddingHorizontal | |
}] | |
}, this.renderPhotoAttachment(), m.createElement(E, { | |
activeOpacity: 1, | |
style: Z.touchableInputWrapper, | |
onPress: this.handleInactiveInputPress | |
}, m.createElement(T, { | |
pointerEvents: o | |
}, l)), t, this.renderCameraButton(), this.renderPostButton(), this.renderStickerButton())) | |
} | |
}), | |
Z = g.create({ | |
touchableInputWrapper: { | |
flex: 1 | |
}, | |
buttonsContainer: { | |
paddingTop: V, | |
paddingBottom: V, | |
flexDirection: "row", | |
justifyContent: "flex-end", | |
alignItems: "flex-start", | |
marginHorizontal: -4 | |
}, | |
commentBox: { | |
backgroundColor: S.backgroundColor, | |
color: u.mediumText | |
}, | |
divider: { | |
height: q | |
}, | |
postButtonText: { | |
fontSize: 17, | |
fontWeight: "bold", | |
color: S.groupsAccent | |
}, | |
inactivePostButtonText: { | |
fontSize: 17, | |
fontWeight: "bold", | |
color: S.fadedText | |
}, | |
postButton: { | |
backgroundColor: "transparent", | |
justifyContent: "center", | |
alignItems: "center", | |
height: B, | |
paddingLeft: U | |
}, | |
stickerButton: { | |
backgroundColor: "transparent", | |
justifyContent: "center", | |
alignItems: "center", | |
height: B, | |
paddingLeft: U | |
}, | |
cameraButton: { | |
backgroundColor: "transparent", | |
justifyContent: "center", | |
alignItems: "center", | |
height: B, | |
paddingHorizontal: U | |
}, | |
offscreenButton: { | |
left: $, | |
position: "absolute", | |
opacity: .5 | |
}, | |
inputFieldOverlay: { | |
position: "absolute", | |
height: B, | |
left: 0, | |
right: 0 | |
}, | |
icon: { | |
width: 24, | |
height: 24 | |
}, | |
previewContainer: { | |
justifyContent: "center", | |
alignItems: "center", | |
height: B, | |
paddingRight: 10 | |
}, | |
thumbnailPhoto: { | |
height: B - 4, | |
width: B - 4 | |
} | |
}); | |
i.exports = J | |
}), __d("DocumentSelectionState", ["mixInEventEmitter"], function(e, t, n, r, i) { | |
function o(e, t) { | |
"use strict"; | |
this.$DocumentSelectionState_anchorOffset = e, this.$DocumentSelectionState_focusOffset = t, this.$DocumentSelectionState_hasFocus = !1 | |
} | |
var a = t("mixInEventEmitter"); | |
o.prototype.update = function(e, t) { | |
"use strict"; | |
(this.$DocumentSelectionState_anchorOffset !== e || this.$DocumentSelectionState_focusOffset !== t) && (this.$DocumentSelectionState_anchorOffset = e, this.$DocumentSelectionState_focusOffset = t, this.emit("update")) | |
}, o.prototype.constrainLength = function(e) { | |
"use strict"; | |
this.update(Math.min(this.$DocumentSelectionState_anchorOffset, e), Math.min(this.$DocumentSelectionState_focusOffset, e)) | |
}, o.prototype.focus = function() { | |
"use strict"; | |
this.$DocumentSelectionState_hasFocus || (this.$DocumentSelectionState_hasFocus = !0, this.emit("focus")) | |
}, o.prototype.blur = function() { | |
"use strict"; | |
this.$DocumentSelectionState_hasFocus && (this.$DocumentSelectionState_hasFocus = !1, this.emit("blur")) | |
}, o.prototype.hasFocus = function() { | |
"use strict"; | |
return this.$DocumentSelectionState_hasFocus | |
}, o.prototype.isCollapsed = function() { | |
"use strict"; | |
return this.$DocumentSelectionState_anchorOffset === this.$DocumentSelectionState_focusOffset | |
}, o.prototype.isBackward = function() { | |
"use strict"; | |
return this.$DocumentSelectionState_anchorOffset > this.$DocumentSelectionState_focusOffset | |
}, o.prototype.getAnchorOffset = function() { | |
"use strict"; | |
return this.$DocumentSelectionState_hasFocus ? this.$DocumentSelectionState_anchorOffset : null | |
}, o.prototype.getFocusOffset = function() { | |
"use strict"; | |
return this.$DocumentSelectionState_hasFocus ? this.$DocumentSelectionState_focusOffset : null | |
}, o.prototype.getStartOffset = function() { | |
"use strict"; | |
return this.$DocumentSelectionState_hasFocus ? Math.min(this.$DocumentSelectionState_anchorOffset, this.$DocumentSelectionState_focusOffset) : null | |
}, o.prototype.getEndOffset = function() { | |
"use strict"; | |
return this.$DocumentSelectionState_hasFocus ? Math.max(this.$DocumentSelectionState_anchorOffset, this.$DocumentSelectionState_focusOffset) : null | |
}, o.prototype.overlaps = function(e, t) { | |
"use strict"; | |
return this.hasFocus() && this.getStartOffset() <= t && e <= this.getEndOffset() | |
}, a(o, { | |
blur: !0, | |
focus: !0, | |
update: !0 | |
}), i.exports = o | |
}), __d("FIGColors", ["cssVar", "rgbToHex", "hsvToHex"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("cssVar"), | |
a = t("rgbToHex"), | |
s = t("hsvToHex"), | |
l = { | |
accentBlue: a(88, 144, 255), | |
attachmentBorder: "#cccccc", | |
backgroundWash: a(233, 234, 237), | |
blueGreyText: a(55, 62, 77), | |
darkText: a(20, 24, 35), | |
facebookBlue: a(59, 89, 152), | |
green: a(70, 168, 0), | |
lightBlueWashColor: a(236, 239, 245), | |
lightDivider: a(200, 203, 208), | |
lightGreyWash: a(246, 247, 248), | |
lightText: a(173, 178, 187), | |
linkText: a(78, 105, 162), | |
mediumText: a(106, 113, 128), | |
mobileWash: a(211, 214, 219), | |
modalNavigationBarTint: a(246, 247, 248), | |
navigationBarTint: s(156, 172, 128), | |
red: a(218, 41, 41), | |
selectedBlue: a(118, 165, 249), | |
separator: a(242, 242, 242), | |
tabBar: a(71, 124, 230), | |
washColor: o("fbui-bluegray-5") | |
}; | |
l.opaqueNavigationBarTint = l.facebookBlue, i.exports = l | |
}), __d("cssVar", ["invariant", "CSSVarConfig"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("invariant"), | |
a = t("CSSVarConfig"), | |
s = function(e) { | |
return a[e] || o(0, "invalid css variable " + e), a[e] | |
}; | |
i.exports = s | |
}), __d("CSSVarConfig", [], function(e, t, n, r, i) { | |
"use strict"; | |
i.exports = { | |
"fbui-accent-blue": "#5890ff", | |
"fbui-blue-90": "#4e69a2", | |
"fbui-blue-80": "#627aad", | |
"fbui-blue-70": "#758ab7", | |
"fbui-blue-60": "#899bc1", | |
"fbui-blue-50": "#9daccb", | |
"fbui-blue-40": "#b1bdd6", | |
"fbui-blue-30": "#c4cde0", | |
"fbui-blue-20": "#d8deea", | |
"fbui-blue-10": "#ebeef4", | |
"fbui-blue-5": "#f5f7fa", | |
"fbui-blue-2": "#fbfcfd", | |
"fbui-blueblack-90": "#06090f", | |
"fbui-blueblack-80": "#0c121e", | |
"fbui-blueblack-70": "#121b2e", | |
"fbui-blueblack-60": "#18243d", | |
"fbui-blueblack-50": "#1e2d4c", | |
"fbui-blueblack-40": "#23355b", | |
"fbui-blueblack-30": "#293e6b", | |
"fbui-blueblack-20": "#2f477a", | |
"fbui-blueblack-10": "#355089", | |
"fbui-blueblack-5": "#385490", | |
"fbui-blueblack-2": "#3a5795", | |
"fbui-bluegray-90": "#080a10", | |
"fbui-bluegray-80": "#141823", | |
"fbui-bluegray-70": "#232937", | |
"fbui-bluegray-60": "#373e4d", | |
"fbui-bluegray-50": "#4e5665", | |
"fbui-bluegray-40": "#6a7180", | |
"fbui-bluegray-30": "#9197a3", | |
"fbui-bluegray-20": "#bdc1c9", | |
"fbui-bluegray-10": "#dcdee3", | |
"fbui-bluegray-5": "#e9eaed", | |
"fbui-bluegray-2": "#f6f7f8", | |
"fbui-gray-90": "#191919", | |
"fbui-gray-80": "#333333", | |
"fbui-gray-70": "#4c4c4c", | |
"fbui-gray-60": "#666666", | |
"fbui-gray-50": "#7f7f7f", | |
"fbui-gray-40": "#999999", | |
"fbui-gray-30": "#b2b2b2", | |
"fbui-gray-20": "#cccccc", | |
"fbui-gray-10": "#e5e5e5", | |
"fbui-gray-5": "#f2f2f2", | |
"fbui-gray-2": "#fafafa", | |
"fbui-red": "#da2929", | |
"fbui-error": "#ce0d24", | |
"x-mobile-dark-text": "#4e5665", | |
"x-mobile-medium-text": "#6a7180", | |
"x-mobile-light-text": "#9197a3", | |
"x-mobile-base-wash": "#dcdee3" | |
} | |
}), __d("rgbToHex", [], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = Math.round(e).toString(16); | |
return 1 === t.length ? "0" + t : t | |
} | |
function a(e, t, n) { | |
return "#" + o(e) + o(t) + o(n) | |
} | |
i.exports = a | |
}), __d("hsvToHex", ["rgbToHex"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t, n) { | |
e /= 255, t /= 255, n /= 255; | |
var r = Math.floor(6 * e), | |
i = 6 * e - r, | |
o = n * (1 - t), | |
s = n * (1 - i * t), | |
l = n * (1 - (1 - i) * t); | |
switch (n *= 255, l *= 255, o *= 255, s *= 255, r % 6) { | |
case 0: | |
return a(n, l, o); | |
case 1: | |
return a(s, n, o); | |
case 2: | |
return a(o, n, l); | |
case 3: | |
return a(o, s, n); | |
case 4: | |
return a(l, o, n); | |
case 5: | |
return a(n, o, s) | |
} | |
} | |
var a = t("rgbToHex"); | |
i.exports = o | |
}), __d("FBStickerInputView", ["NativeMethodsMixin", "React", "ReactIOSViewAttributes", "StyleSheet", "View", "createReactIOSNativeComponentClass"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeMethodsMixin"), | |
a = t("React"), | |
s = t("ReactIOSViewAttributes"), | |
l = t("StyleSheet"), | |
u = (t("View"), t("createReactIOSNativeComponentClass")), | |
c = a.createClass({ | |
displayName: "FBStickerInputView", | |
propTypes: { | |
onStickerSelect: a.PropTypes.func | |
}, | |
mixins: [o], | |
viewConfig: { | |
uiViewClassName: "UIView", | |
validAttributes: s.UIView | |
}, | |
onStickerSelect: function(e) { | |
this.props.onStickerSelect && this.props.onStickerSelect(e) | |
}, | |
render: function() { | |
return a.createElement(d, { | |
style: p.inputViewStyle, | |
onStickerSelect: this.onStickerSelect | |
}) | |
} | |
}), | |
p = l.create({ | |
inputViewStyle: { | |
position: "absolute", | |
backgroundColor: "#f8f8f8" | |
} | |
}), | |
d = u({ | |
validAttributes: s.UIView, | |
uiViewClassName: "RCTStickerInputView" | |
}); | |
i.exports = c | |
}), __d("MentionsInput.react", ["AbstractMentionsTextEditor.react", "DocumentCharacters", "DocumentCompositeDecorator", "DocumentContent", "DocumentDecorator", "ComposedEntityType", "DocumentSelectionState", "DocumentView", "MentionSpan", "MentionSpan", "MentionsTextEditorMixin", "ReactPropTypes", "React", "MentionSpan", "View", "cx", "emptyFunction", "getDefaultKeyBinding", "getEntityMatcher", "getHashtagMatches"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("AbstractMentionsTextEditor.react"), | |
a = t("DocumentCharacters"), | |
s = t("DocumentCompositeDecorator"), | |
l = t("DocumentContent"), | |
u = t("DocumentDecorator"), | |
c = t("ComposedEntityType"), | |
p = t("DocumentSelectionState"), | |
d = t("DocumentView"), | |
h = t("MentionSpan"), | |
f = t("MentionSpan"), | |
m = t("MentionsTextEditorMixin"), | |
g = t("ReactPropTypes"), | |
_ = t("React"), | |
y = t("MentionSpan"), | |
v = t("View"), | |
S = t("cx"), | |
b = t("emptyFunction"), | |
R = t("getDefaultKeyBinding"), | |
w = t("getEntityMatcher"), | |
C = t("getHashtagMatches"), | |
E = b.thatReturns(""), | |
D = b.thatReturns(""), | |
T = c.MENTION, | |
x = new s([new u(w(function(e) { | |
var t = e.getData(); | |
return e.getType() === T && t && t.isWeak | |
}), y), new u(w(function(e) { | |
return e.getType() === T | |
}), f), new u(C, h)]), | |
P = _.createClass({ | |
displayName: "MentionsInput", | |
mixins: [m], | |
propTypes: { | |
documentContent: g.instanceOf(l).isRequired, | |
selectionState: g.instanceOf(p).isRequired, | |
mentionsSource: g.object, | |
typeaheadView: g.func.isRequired, | |
typeaheadViewProps: g.object, | |
spellCheck: g.bool, | |
placeholder: g.string, | |
placeholderTextColor: g.string, | |
className: g.string, | |
autoflip: g.bool, | |
handleReturn: g.func, | |
handleDroppedFiles: g.func, | |
handlePastedFiles: g.func, | |
onAddMention: g.func, | |
onShowMentions: g.func, | |
onChange: g.func, | |
onInputFocus: g.func, | |
onInputBlur: g.func, | |
onFile: g.func, | |
inputView: g.renderable | |
}, | |
focus: function() { | |
this.refs.textEditor.focus() | |
}, | |
blur: function() { | |
this.refs.textEditor.blur() | |
}, | |
_onReturn: function(e) { | |
this.props.handleReturn && this.props.handleReturn(e) || this.onCharacters(a.BLOCK_DELIMITER) | |
}, | |
_onBlur: function(e) { | |
this.onBlur(e), this.props.onInputBlur && this.props.onInputBlur(e) | |
}, | |
_onFocus: function(e) { | |
this.onFocus(e), this.props.onInputFocus && this.props.onInputFocus(e) | |
}, | |
_onClick: function() { | |
this.refs.textEditor.focus() | |
}, | |
_onTextInput: function(e) { | |
var t = e.nativeEvent, | |
n = t.range.start, | |
r = t.range.end, | |
i = t.text; | |
0 === i.length && r - n === 1 && this.props.selectionState.isCollapsed() && this.props.selectionState.getStartOffset() === n + 1 ? this.onBackspace() : this.onAlter(n, t.previousText, i) | |
}, | |
_getStateForDocument: function(e) { | |
return { | |
documentView: new d(e, x) | |
} | |
}, | |
componentWillReceiveProps: function(e) { | |
this.props.documentContent !== e.documentContent && this.setState(this._getStateForDocument(e.documentContent)) | |
}, | |
getInitialState: function() { | |
return this._getStateForDocument(this.props.documentContent) | |
}, | |
render: function() { | |
return _.createElement(v, { | |
style: this.props.style, | |
className: S("uiMentionsInput/root"), | |
onClick: this._onClick, | |
onFocus: this._onFocus | |
}, _.createElement(o, { | |
ref: "textEditor", | |
className: S("public/uiMentionsInput/input"), | |
documentView: this.state.documentView, | |
placeholder: this.props.placeholder, | |
placeholderTextColor: this.props.placeholderTextColor, | |
autoFocus: this.props.autoFocus, | |
selectionState: this.props.selectionState, | |
mentionsSource: this.props.mentionsSource, | |
typeaheadView: this.props.typeaheadView, | |
typeaheadViewProps: this.props.typeaheadViewProps, | |
keyBindingFn: R, | |
blockStyleFn: E, | |
inlineStyleFn: D, | |
inputView: this.props.inputView, | |
textInputStyle: this.props.textInputStyle, | |
spellCheck: this.props.spellCheck, | |
autoflip: this.props.autoflip, | |
onShowMentions: this.onShowMentions, | |
onAddMention: this.onAddMention, | |
onCharacters: this.onCharacters, | |
onAlter: this.onAlter, | |
onCut: this.onCut, | |
onPasteFragment: this.onPasteFragment, | |
onDelete: this.onDelete, | |
onDropFiles: this.onDropFiles, | |
onDropSelection: this.onDropSelection, | |
onDropText: this.onDropText, | |
onKeyCommand: this.onKeyCommand, | |
onPasteFiles: this.onPasteFiles, | |
onSelect: this.onSelect, | |
onTextInput: this._onTextInput, | |
onReturn: this._onReturn, | |
onBlur: this._onBlur, | |
onFocus: this._onFocus, | |
onChange: this.props.onChange, | |
handleDroppedFiles: this.props.handleDroppedFiles, | |
handlePastedFiles: this.props.handlePastedFiles | |
})) | |
} | |
}); | |
i.exports = P | |
}), __d("AbstractMentionsTextEditor.react", ["AbstractTextEditor.react", "AbstractTextEditorProps", "ModalFullscreenView", "getMentionableRect", "Locale", "ReactPropTypes", "React", "TimerMixin", "TypeaheadNavigation", "View", "copyProperties"], function(e, t, n, r, i) { | |
"use strict"; | |
var o, a, s = t("AbstractTextEditor.react"), | |
l = t("AbstractTextEditorProps"), | |
u = t("ModalFullscreenView"), | |
c = t("getMentionableRect"), | |
p = t("Locale"), | |
d = t("ReactPropTypes"), | |
h = t("React"), | |
f = t("TimerMixin"), | |
m = t("TypeaheadNavigation"), | |
g = t("View"), | |
_ = t("copyProperties"), | |
y = p.isRTL(), | |
v = 20, | |
S = 5, | |
b = h.createClass({ | |
displayName: "AbstractMentionsTextEditor", | |
mixins: [f], | |
propTypes: _({}, l.propTypes, { | |
autoflip: d.bool, | |
mentionsSource: d.object, | |
excludedEntries: d.object, | |
onShowMentions: d.func.isRequired, | |
onAddMention: d.func.isRequired, | |
typeaheadView: d.func.isRequired, | |
typeaheadViewProps: d.object, | |
inputView: d.renderable | |
}), | |
getDefaultProps: l.getDefaultProps, | |
componentWillMount: function() { | |
var e = function() { | |
this.setTimeout(this._searchIfCollapsed, 0) | |
}.bind(this); | |
this._listeners = [this.props.selectionState.addListener("focus", e), this.props.selectionState.addListener("update", e)] | |
}, | |
componentWillUnmount: function() { | |
this._listeners.forEach(function(e) { | |
e.remove() | |
}), this._listeners = null | |
}, | |
getInitialState: function() { | |
return { | |
contextualBounds: null, | |
highlightedMentionable: null, | |
mentionableEntries: null | |
} | |
}, | |
_onShowMentions: function(e, t) { | |
var n = e && e.length; | |
if (n || this.state.mentionableEntries) { | |
var r = n ? e.slice(0, v) : null; | |
if (r) { | |
var i = this.props.typeaheadViewProps; | |
i && i.mentionSortFn && r.sort(i.mentionSortFn), this.props.onShowMentions(r, t) | |
} | |
this.setState({ | |
contextualBounds: n ? c(t, y) : null, | |
highlightedMentionable: n ? e[0] : null, | |
mentionableEntries: r | |
}) | |
} | |
}, | |
_onBlur: function(e) { | |
this.setState(this.getInitialState()), this.props.onBlur(e) | |
}, | |
_onFocus: function(e) { | |
this.props.mentionsSource && this.props.mentionsSource.bootstrap(), this.props.onFocus(e) | |
}, | |
_onReturn: function(e) { | |
this.state.highlightedMentionable && !e.nativeEvent.getModifiers().any ? this._onMentionSelect(this.state.highlightedMentionable, e) : this.props.onReturn(e) | |
}, | |
_onTab: function(e) { | |
this.state.highlightedMentionable ? (e.preventDefault(), this._onMentionSelect(this.state.highlightedMentionable, e)) : this.props.onTab && this.props.onTab(e) | |
}, | |
_onEscape: function(e) { | |
this.state.highlightedMentionable ? this.setState(this.getInitialState()) : this.props.onEscape && this.props.onEscape(e) | |
}, | |
_onUpArrow: function(e) { | |
this.state.mentionableEntries ? (e.preventDefault(), m.moveUp(this.state.mentionableEntries, this.state.highlightedMentionable, this._onMentionHighlight)) : this.props.onUpArrow && this.props.onUpArrow(e) | |
}, | |
_onDownArrow: function(e) { | |
this.state.mentionableEntries ? (e.preventDefault(), m.moveDown(this.state.mentionableEntries, this.state.highlightedMentionable, this._onMentionHighlight)) : this.props.onDownArrow && this.props.onDownArrow(e) | |
}, | |
_onMentionHighlight: function(e) { | |
this.setState({ | |
highlightedMentionable: e | |
}) | |
}, | |
_onMentionSelect: function(e, t) { | |
this.props.onAddMention(e, t), this.setState(this.getInitialState()) | |
}, | |
_searchIfCollapsed: function() { | |
var e = this.props.selectionState; | |
e.hasFocus() && e.isCollapsed() && this.props.mentionsSource && this.props.mentionsSource.search(this.props.documentView.getContent(), e.getStartOffset(), this._onShowMentions) | |
}, | |
focus: function() { | |
this.refs.abstractTextEditor.focus() | |
}, | |
blur: function() { | |
this.refs.abstractTextEditor.blur() | |
}, | |
renderLayers: function() { | |
var e = this.state.mentionableEntries, | |
t = this.props.selectionState, | |
n = this.props.typeaheadView, | |
r = t.isCollapsed() && t.hasFocus() && e && e.length, | |
i = {}; | |
return this.props.autoflip && (i.ContextualLayerAutoFlip = o, i.ContextualLayerUpdateOnScroll = a), { | |
entries: h.createElement(u, { | |
shown: r, | |
contextRef: "container", | |
contextBounds: this.state.contextualBounds, | |
offsetY: S, | |
position: "above", | |
behaviors: i | |
}, h.createElement(n, { | |
viewProps: this.props.typeaheadViewProps, | |
highlightedEntry: this.state.highlightedMentionable, | |
entries: e || [], | |
onSelect: this._onMentionSelect, | |
onHighlight: this._onMentionHighlight | |
})) | |
} | |
}, | |
render: function() { | |
return h.createElement(g, { | |
ref: "container", | |
className: this.props.className, | |
tabIndex: "-2" | |
}, this.transferPropsTo(h.createElement(s, { | |
ref: "abstractTextEditor", | |
autoFocus: this.props.autoFocus, | |
inputView: this.props.inputView, | |
onBlur: this._onBlur, | |
onFocus: this._onFocus, | |
onReturn: this._onReturn, | |
onTab: this._onTab, | |
onEscape: this._onEscape, | |
onDownArrow: this._onDownArrow, | |
onUpArrow: this._onUpArrow, | |
onChange: this.props.onChange, | |
textInputStyle: this.props.textInputStyle | |
})), this.renderLayers()) | |
} | |
}); | |
i.exports = b | |
}), __d("AbstractTextEditor.react", ["AbstractTextEditorProps", "ExecutionEnvironment", "React", "StyleSheet", "Text", "TextEditorBlock.react", "TextEditorCompositionHandler", "TextEditorCompositionState", "TextEditorEditHandler", "TextEditorDragHandler", "TextEditorModes", "TextInput", "View", "cx", "extendArray", "requestAnimationFrame", "ComposedInlineStyle"], function(e, t, n, r, i) { | |
function o(e) { | |
return function(t) { | |
var n = this._handler && this._handler[e]; | |
n && n.call(this, t) | |
} | |
} | |
function a(e) { | |
switch (e) { | |
case _.EDIT: | |
return m; | |
case _.COMPOSITE: | |
return h; | |
case _.DRAG: | |
return g; | |
case _.CUT: | |
case _.RENDER: | |
return null | |
} | |
} | |
var s = t("AbstractTextEditorProps"), | |
l = t("ExecutionEnvironment"), | |
u = t("React"), | |
c = t("StyleSheet"), | |
p = t("Text"), | |
d = t("TextEditorBlock.react"), | |
h = t("TextEditorCompositionHandler"), | |
f = t("TextEditorCompositionState"), | |
m = t("TextEditorEditHandler"), | |
g = t("TextEditorDragHandler"), | |
_ = t("TextEditorModes"), | |
y = t("TextInput"), | |
v = t("View"), | |
S = t("cx"), | |
b = t("extendArray"), | |
R = t("requestAnimationFrame"), | |
w = (t("ComposedInlineStyle"), "b"), | |
C = "d", | |
E = "l", | |
D = e.MutationObserver || e.WebKitMutationObserver, | |
T = u.createClass({ | |
displayName: "AbstractTextEditor", | |
propTypes: s.propTypes, | |
getDefaultProps: s.getDefaultProps, | |
_onBlur: o("onBlur"), | |
_onFocus: o("onFocus"), | |
_onSelect: o("onSelect"), | |
_onKeyDown: o("onKeyDown"), | |
_onKeyUp: o("onKeyUp"), | |
_onKeyPress: o("onKeyPress"), | |
_onMouseDown: o("onMouseDown"), | |
_onMouseUp: o("onMouseUp"), | |
_onCharacterData: o("onCharacterData"), | |
_onCompositionStart: o("onCompositionStart"), | |
_onCompositionEnd: o("onCompositionEnd"), | |
_onDragStart: o("onDragStart"), | |
_onDragOver: o("onDragOver"), | |
_onDragEnd: o("onDragEnd"), | |
_onDrop: o("onDrop"), | |
_onCut: o("onCut"), | |
_onCopy: o("onCopy"), | |
_onPaste: o("onPaste"), | |
_onBeforeInput: o("onBeforeInput"), | |
_onTextInput: function(e) { | |
this.props.onTextInput && this.props.onTextInput(e) | |
}, | |
_renderContents: function() { | |
function e(e, t) { | |
var n = e + (t ? t.charCodeAt(0) : 0), | |
r = n; | |
return f.hasOwnProperty(r) ? r += "-" + f[r] ++ : f[r] = 0, h[r] = !0, r | |
} | |
function t(t, n, r, o) { | |
i = []; | |
var a = this.props.BlockComponent || d, | |
p = s.substr(n, r - n), | |
h = e(w, p); | |
c.push(u.createElement(a, { | |
key: h, | |
offsetKey: t, | |
text: p, | |
blockProps: this.props.blockProps, | |
blockStyleFn: this.props.blockStyleFn, | |
style: o, | |
direction: l[c.length] | |
}, i)) | |
} | |
function n(t, n, r, l) { | |
if (l) { | |
o = []; | |
var c = this.props.documentView.getEntities()[n], | |
p = s.substr(n, r - n), | |
d = e(C, p); | |
i.push(u.createElement(l, { | |
key: d, | |
offsetKey: t, | |
decoratorProps: this.props.decoratorProps, | |
documentView: a, | |
selectionState: this.props.selectionState, | |
entityKey: c, | |
text: p | |
}, o)) | |
} else o = i | |
} | |
function r(t, n, r) { | |
var i = s.substr(n, r - n), | |
a = e(E, i); | |
o.push(u.createElement(p, { | |
key: a | |
}, i)) | |
} | |
var i, o, a = this.props.documentView, | |
s = a.getText(), | |
l = a.getBlockDirections(), | |
c = [], | |
h = {}, | |
f = {}; | |
return this.props.documentView.iterate(t.bind(this), n.bind(this), r.bind(this)), c | |
}, | |
_attachMutationObserver: function() { | |
if (D) { | |
var e = [], | |
t = function() { | |
e.length && (this._onCharacterData(e), e.length = 0) | |
}.bind(this); | |
this._mutationObserver = new D(function(n) { | |
this._guardAgainstRender || (0 === e.length && R(t), b(e, n)) | |
}.bind(this)), this._mutationObserver && this._mutationObserver.observe(this.refs.editorContainer.getDOMNode(), { | |
characterDataOldValue: !0, | |
characterData: !0, | |
subtree: !0 | |
}) | |
} | |
}, | |
_disconnectMutationObserver: function() { | |
this._mutationObserver && (this._mutationObserver.disconnect(), this._mutationObserver = null) | |
}, | |
_renderPlaceholder: function() { | |
var e = this.props.placeholder && !this.props.documentView.getText(); | |
return e ? u.createElement(AbstractTextEditorPlaceholder, { | |
text: this.props.placeholder, | |
selectionState: this.props.selectionState, | |
compositionState: this._compositionState | |
}) : void 0 | |
}, | |
render: function() { | |
return u.createElement(v, { | |
className: S("AbstractTextEditor/root") | |
}, u.createElement(v, { | |
className: S("AbstractTextEditor/editorContainer"), | |
ref: "editorContainer" | |
}, u.createElement(y, { | |
multiline: !0, | |
lineHeight: 1, | |
autoFocus: this.props.autoFocus, | |
style: [x.textBox, this.props.textInputStyle], | |
ref: "editor", | |
role: "textbox", | |
className: S("public/AbstractTextEditor/content"), | |
placeholder: this.props.placeholder, | |
placeholderTextColor: this.props.placeholderTextColor, | |
onBlur: this._onBlur, | |
onFocus: this._onFocus, | |
onSelect: this._onSelect, | |
onMouseUp: this._onMouseUp, | |
onKeyDown: this._onKeyDown, | |
onKeyUp: this._onKeyUp, | |
onKeyPress: this._onKeyPress, | |
onCut: this._onCut, | |
onCopy: this._onCopy, | |
onPaste: this._onPaste, | |
onDragStart: this._onDragStart, | |
onDragOver: this._onDragOver, | |
onDragEnd: this._onDragEnd, | |
onDrop: this._onDrop, | |
onCompositionStart: this._onCompositionStart, | |
onCompositionEnd: this._onCompositionEnd, | |
onBeforeInput: this._onBeforeInput, | |
onTextInput: this._onTextInput, | |
onChange: this.props.onChange, | |
selectionState: this.props.selectionState, | |
spellCheck: this.props.spellCheck, | |
contentEditable: !this.props.disabled, | |
inputView: this.props.inputView | |
}, this._renderContents()))) | |
}, | |
focus: function() { | |
var e = this.props.selectionState.hasFocus(); | |
if (!e) { | |
if (!this.refs.editor.getDOMNode) return void this.refs.editor.focus(); | |
var t = this.props.documentView.getText().length; | |
this.props.selectionState.update(t, t), this.forceUpdate() | |
} | |
}, | |
blur: function() { | |
this.refs.editor.getDOMNode ? this.refs.editor.getDOMNode().blur() : this.refs.editor.blur() | |
}, | |
componentDidMount: function() { | |
this._renderedVersion = null, this._clonedEditor = null, this._guardAgainstRender = !1, this._handler = m; | |
var e = this.props.documentView.getBlockDirections(); | |
this._renderedDirections = e.join(""), l.canUseDOM && this._attachMutationObserver() | |
}, | |
shouldComponentUpdate: function(e) { | |
var t = e.documentView.getBlockDirections(); | |
return !this._guardAgainstRender && (e.documentView.getVersion() !== this._renderedVersion || t.join("") !== this._renderedDirections || this.props.disabled !== e.disabled || this.props.inputView !== e.inputView) | |
}, | |
componentWillUpdate: function() { | |
this.setMode(_.RENDER) | |
}, | |
componentDidUpdate: function() { | |
this.exitCurrentMode(), this._renderedVersion = this.props.documentView.getVersion(); | |
var e = this.props.documentView.getBlockDirections(); | |
this._renderedDirections = e.join("") | |
}, | |
componentWillMount: function() { | |
this._compositionState = new f(!1), this._selectionListener = this.props.selectionState.addListener("focus", this.focus) | |
}, | |
componentWillUnmount: function() { | |
this._disconnectMutationObserver(), this._selectionListener && (this._selectionListener.remove(), this._selectionListener = null) | |
}, | |
expectDuplicateMutation: function() { | |
this._renderedVersion = this.props.documentView.getVersion() | |
}, | |
resetRenderedVersion: function() { | |
this._renderedVersion = null, this._renderedDirections = null | |
}, | |
setMode: function(e) { | |
this._handler = a(e) | |
}, | |
exitCurrentMode: function() { | |
this.setMode(_.EDIT) | |
}, | |
captureEditorDOM: function() { | |
this._clonedEditor = this.refs.editor.getDOMNode().cloneNode(!0) | |
}, | |
restoreEditorDOM: function() { | |
var e = this.refs.editorContainer.getDOMNode(); | |
e.innerHTML = "", e.appendChild(this._clonedEditor), this.focus(), this._clonedEditor = null | |
}, | |
setRenderGuard: function() { | |
this._guardAgainstRender = !0 | |
}, | |
removeRenderGuard: function() { | |
this._guardAgainstRender = !1 | |
} | |
}), | |
x = c.create({ | |
textBox: { | |
backgroundColor: "transparent", | |
fontSize: 14, | |
height: 30 | |
} | |
}); | |
i.exports = T | |
}), __d("AbstractTextEditorProps", ["DocumentSelectionState", "DocumentView", "ReactPropTypes"], function(e, t, n, r, i) { | |
var o = t("DocumentSelectionState"), | |
a = t("DocumentView"), | |
s = t("ReactPropTypes"), | |
l = { | |
propTypes: { | |
documentView: s.instanceOf(a).isRequired, | |
selectionState: s.instanceOf(o).isRequired, | |
placeholder: s.string, | |
blockStyleFn: s.func.isRequired, | |
inlineStyleFn: s.func.isRequired, | |
keyBindingFn: s.func.isRequired, | |
spellCheck: s.bool, | |
onReturn: s.func.isRequired, | |
onEscape: s.func, | |
onTab: s.func, | |
onUpArrow: s.func, | |
onDownArrow: s.func, | |
onCharacters: s.func.isRequired, | |
onAlter: s.func.isRequired, | |
onCut: s.func.isRequired, | |
onPasteFragment: s.func.isRequired, | |
onPasteFiles: s.func, | |
onDelete: s.func.isRequired, | |
onDropSelection: s.func.isRequired, | |
onDropText: s.func.isRequired, | |
onDropFiles: s.func, | |
onSelect: s.func.isRequired, | |
onBlur: s.func.isRequired, | |
onFocus: s.func.isRequired, | |
inputView: s.renderable | |
}, | |
getDefaultProps: function() { | |
return { | |
spellCheck: !1 | |
} | |
} | |
}; | |
i.exports = l | |
}), __d("DocumentView", ["DocumentIterator", "DocumentOffsetCache", "UnicodeBidi", "createArrayFrom", "emptyFunction"], function(e, t, n, r, i) { | |
function o(e, t) { | |
"use strict"; | |
this.$DocumentView_content = e, this.$DocumentView_decorator = t, this.$DocumentView_currentFingerprint = [], this.$DocumentView_iteratedVersion = null, this.$DocumentView_blockDirections = [], this.$DocumentView_iterator = new a(this.$DocumentView_content, this.$DocumentView_decorator), this.$DocumentView_offsets = new s(this.$DocumentView_iterator) | |
} | |
var a = t("DocumentIterator"), | |
s = t("DocumentOffsetCache"), | |
l = t("UnicodeBidi"), | |
u = t("createArrayFrom"), | |
c = t("emptyFunction"); | |
o.prototype.getContent = function() { | |
"use strict"; | |
return this.$DocumentView_content | |
}, o.prototype.getText = function() { | |
"use strict"; | |
return this.$DocumentView_content.getText() | |
}, o.prototype.getEntities = function() { | |
"use strict"; | |
return this.$DocumentView_content.getEntities() | |
}, o.prototype.getFragment = function(e, t) { | |
"use strict"; | |
return this.$DocumentView_content.getFragment(e, t) | |
}, o.prototype.getVersion = function() { | |
"use strict"; | |
return this.$DocumentView_content.getVersion() | |
}, o.prototype.getBlockDirections = function() { | |
"use strict"; | |
return this.$DocumentView_fillCaches(), this.$DocumentView_blockDirections | |
}, o.prototype.getFingerprint = function() { | |
"use strict"; | |
return this.$DocumentView_fillCaches(), this.$DocumentView_currentFingerprint.join(":") | |
}, o.prototype.getOffset = function(e) { | |
"use strict"; | |
return this.$DocumentView_fillCaches(), this.$DocumentView_offsets.getOffset(e) | |
}, o.prototype.getKey = function(e) { | |
"use strict"; | |
return this.$DocumentView_fillCaches(), this.$DocumentView_offsets.getKey(e) | |
}, o.prototype.iterate = function(e, t, n) { | |
"use strict"; | |
function r(t, n) { | |
a.nextBlock(t), p(t, n), e(a.getCurrentKey(), t, n, u[l++]) | |
} | |
function i(e, n, r) { | |
var i = null; | |
a.nextDecoration(e), null !== r && (c("D", r, n - e), i = s.getComponentForKey(r)), t(a.getCurrentKey(), e, n, i) | |
} | |
function o(e, t, r) { | |
a.nextLeaf(e), c("L", r), n(a.getCurrentKey(), e, t, r) | |
} | |
this.$DocumentView_iteratedVersion = this.getVersion(), this.$DocumentView_currentFingerprint.length = 0, this.$DocumentView_blockDirections.length = 0, this.$DocumentView_offsets.reset(); | |
var a = this.$DocumentView_offsets, | |
s = this.$DocumentView_decorator, | |
l = 0, | |
u = this.$DocumentView_content.getBlockStyles(), | |
c = this.$DocumentView_recordFingerprint.bind(this), | |
p = this.$DocumentView_recordBlockDirection.bind(this); | |
this.$DocumentView_iterator.process(r, i, o) | |
}, o.prototype.$DocumentView_fillCaches = function() { | |
"use strict"; | |
this.$DocumentView_iteratedVersion !== this.getVersion() && this.iterate(c, c, c) | |
}, o.prototype.$DocumentView_recordFingerprint = function() { | |
"use strict"; | |
this.$DocumentView_currentFingerprint.push(u(arguments).join("-")) | |
}, o.prototype.$DocumentView_recordBlockDirection = function(e, t) { | |
"use strict"; | |
var n = this.$DocumentView_content.getText().slice(e, t), | |
r = this.$DocumentView_blockDirections, | |
i = l.getDirection(n, r[r.length - 1]); | |
this.$DocumentView_blockDirections.push(i) | |
}, i.exports = o | |
}), __d("DocumentIterator", ["DocumentCharacters"], function(e, t, n, r, i) { | |
function o(e, t) { | |
"use strict"; | |
this.$DocumentIterator_content = e, this.$DocumentIterator_decorator = t | |
} | |
var a = t("DocumentCharacters"), | |
s = a.BLOCK_DELIMITER; | |
o.prototype.process = function(e, t, n) { | |
"use strict"; | |
this.$DocumentIterator_blockFn = e, this.$DocumentIterator_decorationFn = t, this.$DocumentIterator_inlineFn = n, this.$DocumentIterator_text = this.$DocumentIterator_content.getText(), this.$DocumentIterator_inlines = this.$DocumentIterator_content.getInlineStyles(), this.$DocumentIterator_decorations = this.$DocumentIterator_decorator.getDecorations(this.$DocumentIterator_content), this.$DocumentIterator_processDocument() | |
}, o.prototype.$DocumentIterator_processDocument = function() { | |
"use strict"; | |
for (var e, t = this.$DocumentIterator_text.split(s), n = 0, r = 0; r < t.length; r++) e = n + t[r].length, this.$DocumentIterator_processBlock(n, e), n = e + s.length | |
}, o.prototype.$DocumentIterator_processBlock = function(e, t) { | |
"use strict"; | |
this.$DocumentIterator_blockFn.call(null, e, t), this.$DocumentIterator_iterateSequence(this.$DocumentIterator_decorations, e, t, this.$DocumentIterator_processDecoration.bind(this)) | |
}, o.prototype.$DocumentIterator_processDecoration = function(e, t, n) { | |
"use strict"; | |
this.$DocumentIterator_decorationFn.call(null, e, t, n), this.$DocumentIterator_iterateSequence(this.$DocumentIterator_inlines, e, t, this.$DocumentIterator_processInline.bind(this)) | |
}, o.prototype.$DocumentIterator_processInline = function(e, t, n) { | |
"use strict"; | |
this.$DocumentIterator_inlineFn.call(null, e, t, n) | |
}, o.prototype.$DocumentIterator_iterateSequence = function(e, t, n, r) { | |
"use strict"; | |
for (var i = t, o = t; n > o; o++) e[o] !== e[o + 1] && (r(i, o + 1, e[i]), i = o + 1); | |
t === n ? r(t, n, null) : i !== n && r(i, n, e[i]) | |
}, i.exports = o | |
}), __d("DocumentOffsetCache", [], function(e, t, n, r, i) { | |
function o(e) { | |
return 0 > e ? 0 : e | |
} | |
function a() { | |
"use strict"; | |
this.reset() | |
} | |
a.prototype.reset = function() { | |
"use strict"; | |
this.$DocumentOffsetCache_block = -1, this.$DocumentOffsetCache_decoration = -1, this.$DocumentOffsetCache_leaf = -1, this.$DocumentOffsetCache_cachedOffsets = {} | |
}, a.prototype.nextBlock = function(e) { | |
"use strict"; | |
this.$DocumentOffsetCache_block++, this.$DocumentOffsetCache_decoration = -1, this.$DocumentOffsetCache_leaf = -1, this.$DocumentOffsetCache_recordOffset(e) | |
}, a.prototype.nextDecoration = function(e) { | |
"use strict"; | |
this.$DocumentOffsetCache_decoration++, this.$DocumentOffsetCache_leaf = -1, this.$DocumentOffsetCache_recordOffset(e) | |
}, a.prototype.nextLeaf = function(e) { | |
"use strict"; | |
this.$DocumentOffsetCache_leaf++, this.$DocumentOffsetCache_recordOffset(e) | |
}, a.prototype.getCurrentKey = function() { | |
"use strict"; | |
return o(this.$DocumentOffsetCache_block) + "." + o(this.$DocumentOffsetCache_decoration) + "." + o(this.$DocumentOffsetCache_leaf) | |
}, a.prototype.getOffset = function(e) { | |
"use strict"; | |
return this.$DocumentOffsetCache_cachedOffsets[e] | |
}, a.prototype.getKey = function(e) { | |
"use strict"; | |
var t = null, | |
n = null; | |
for (var r in this.$DocumentOffsetCache_cachedOffsets) { | |
var i = this.$DocumentOffsetCache_cachedOffsets[r], | |
o = e - i; | |
if (!(0 > o)) { | |
if (0 === o) return r; | |
(t > o || null === t) && (t = o, n = r) | |
} | |
} | |
return n | |
}, a.prototype.$DocumentOffsetCache_recordOffset = function(e) { | |
"use strict"; | |
this.$DocumentOffsetCache_cachedOffsets[this.getCurrentKey()] = e | |
}, i.exports = a | |
}), __d("UnicodeBidi", ["Locale", "UnicodeBidiDirection"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
var t = m.exec(e); | |
if (!t) return p.NEUTRAL; | |
var n = g.exec(t[0]); | |
return n ? p.RTL : p.LTR | |
} | |
function a(e, t) { | |
if (t = t || p.NEUTRAL, !e.length) return t; | |
var n = o(e); | |
return n === p.NEUTRAL ? t : n | |
} | |
function s(e, t) { | |
return t && p.isStrong(t) || (t = c.getDirection()), a(e, t) | |
} | |
function l(e, t) { | |
return s(e, t) === p.LTR | |
} | |
function u(e, t) { | |
return s(e, t) === p.RTL | |
} | |
var c = t("Locale"), | |
p = t("UnicodeBidiDirection"), | |
d = { | |
L: "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ--︀--", | |
R: "־׀׃׆א-תװ-ײ׳-״߀-߉ߊ-ߪߴ-ߵߺࠀ-ࠕࠚࠤࠨ࠰-࠾ࡀ-ࡘ࡞יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏ", | |
AL: "؈؋؍؛؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍ܐܒ-ܯݍ-ޥޱࢠࢢ-ࢬﭐ-ﮱ﮲-﯁ﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ﷼ﹰ-ﹴﹶ-ﻼ" | |
}, | |
h = d.L + d.R + d.AL, | |
f = d.R + d.AL, | |
m = new RegExp("[" + h + "]"), | |
g = new RegExp("[" + f + "]"), | |
_ = { | |
firstStrongCharDir: o, | |
resolveBlockDir: a, | |
getDirection: s, | |
isDirectionLTR: l, | |
isDirectionRTL: u | |
}; | |
i.exports = _ | |
}), __d("Locale", ["Style", "ExecutionEnvironment", "UnicodeBidiDirection"], function(e, t, n, r, i) { | |
function o() { | |
return u.canUseDOM ? void 0 === s && (s = "rtl" === l.get(document.body, "direction")) : s = !1, s | |
} | |
function a() { | |
return o() ? c.RTL : c.LTR | |
} | |
var s, l = t("Style"), | |
u = t("ExecutionEnvironment"), | |
c = t("UnicodeBidiDirection"), | |
p = { | |
isRTL: o, | |
getDirection: a | |
}; | |
i.exports = p | |
}), __d("Style", [], function(e, t, n, r, i) { | |
"use strict"; | |
i.exports = {} | |
}), __d("UnicodeBidiDirection", ["keyMirror"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("keyMirror"), | |
a = o({ | |
NEUTRAL: !0, | |
LTR: !0, | |
RTL: !0 | |
}); | |
a.isStrong = function(e) { | |
return e === a.LTR || e === a.RTL | |
}, i.exports = a | |
}), __d("createArrayFrom", ["toArray"], function(e, t, n, r, i) { | |
function o(e) { | |
return !!e && ("object" == typeof e || "function" == typeof e) && "length" in e && !("setInterval" in e) && "number" != typeof e.nodeType && (Array.isArray(e) || "callee" in e || "item" in e) | |
} | |
function a(e) { | |
return o(e) ? Array.isArray(e) ? e.slice() : s(e) : [e] | |
} | |
var s = t("toArray"); | |
i.exports = a | |
}), __d("toArray", ["invariant"], function(e, t, n, r, i) { | |
function o(e) { | |
var t = e.length; | |
if ((Array.isArray(e) || "object" != typeof e && "function" != typeof e) && a(0, "toArray: Array-like object expected"), "number" != typeof t && a(0, "toArray: Object needs a length property"), 0 === t || t - 1 in e || a(0, "toArray: Object should have keys for indices"), e.hasOwnProperty) try { | |
return Array.prototype.slice.call(e) | |
} catch (n) {} | |
for (var r = Array(t), i = 0; t > i; i++) r[i] = e[i]; | |
return r | |
} | |
var a = t("invariant"); | |
i.exports = o | |
}), __d("TextEditorBlock.react", ["UnicodeBidiDirection", "ReactPropTypes", "React", "Text", "cx", "joinClasses", "mergeInto"], function(e, t, n, r, i) { | |
var o = t("UnicodeBidiDirection"), | |
a = t("ReactPropTypes"), | |
s = t("React"), | |
l = t("Text"), | |
u = (t("cx"), t("joinClasses"), t("mergeInto")), | |
c = o.LTR, | |
p = o.RTL, | |
d = s.createClass({ | |
displayName: "TextEditorBlock", | |
propTypes: { | |
offsetKey: a.string.isRequired, | |
text: a.string.isRequired, | |
blockProps: a.object, | |
blockStyleFn: a.func.isRequired, | |
style: a.number, | |
direction: a.string.isRequired | |
}, | |
render: function() { | |
var e = this.props.direction === p, | |
t = this.props.direction === c, | |
n = e ? "right" : t ? "left" : "auto", | |
r = e ? "rtl" : t ? "ltr" : "auto", | |
i = { | |
style: [this.props.style, { | |
writingDirection: r, | |
textAlign: n | |
}] | |
}; | |
return u(i, this.props.blockProps), s.createElement(l, Object.assign({}, i), this.props.children) | |
} | |
}); | |
i.exports = d | |
}), __d("cx", [], function(e, t, n, r, i) { | |
function o(e) { | |
return "object" == typeof e ? Object.keys(e).filter(function(t) { | |
return e[t] | |
}).join(" ") : Array.prototype.join.call(arguments, " ") | |
} | |
i.exports = o | |
}), __d("TextEditorCompositionHandler", ["Keys", "isSelectionAtLeafStart"], function(e, t, n, r, i) { | |
var o = t("Keys"), | |
a = t("isSelectionAtLeafStart"), | |
s = { | |
onBeforeInput: function(e) { | |
this._textInputData = (this._textInputData || "") + e.data | |
}, | |
onCompositionStart: function() { | |
this._compositionState.continueSession() | |
}, | |
onCompositionEnd: function() { | |
this._compositionState.pauseSession(), setTimeout(s.resolveComposition.bind(this), 0) | |
}, | |
onKeyDown: function(e) { | |
(e.which === o.RIGHT || e.which === o.LEFT) && e.preventDefault() | |
}, | |
onKeyPress: function(e) { | |
e.which === o.RETURN && e.preventDefault() | |
}, | |
resolveComposition: function() { | |
if (!this._compositionState.inCompositionSession()) { | |
var e = this._textInputData; | |
this._textInputData = "", this._compositionState.terminateSession(); | |
var t = !e || a(this.props.documentView, this.props.selectionState); | |
t && this.restoreEditorDOM(), this.exitCurrentMode(), this.removeRenderGuard(), e ? this.props.onCharacters(e) : t && (this.resetRenderedVersion(), this.forceUpdate()) | |
} | |
} | |
}; | |
i.exports = s | |
}), __d("Keys", [], function(e, t, n, r, i) { | |
i.exports = { | |
BACKSPACE: 8, | |
TAB: 9, | |
RETURN: 13, | |
ALT: 18, | |
ESC: 27, | |
SPACE: 32, | |
PAGE_UP: 33, | |
PAGE_DOWN: 34, | |
END: 35, | |
HOME: 36, | |
LEFT: 37, | |
UP: 38, | |
RIGHT: 39, | |
DOWN: 40, | |
DELETE: 46, | |
COMMA: 188 | |
} | |
}), __d("isSelectionAtLeafStart", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
var n = t.getStartOffset(), | |
r = e.getKey(n); | |
return e.getOffset(r) === n | |
} | |
i.exports = o | |
}), __d("TextEditorCompositionState", ["mixInEventEmitter"], function(e, t, n, r, i) { | |
function o(e) { | |
"use strict"; | |
this.$TextEditorCompositionState_composing = e | |
} | |
var a = t("mixInEventEmitter"); | |
o.prototype.startSession = function() { | |
"use strict"; | |
this.$TextEditorCompositionState_composing = !0, this.emit("change") | |
}, o.prototype.continueSession = function() { | |
"use strict"; | |
this.$TextEditorCompositionState_composing = !0 | |
}, o.prototype.pauseSession = function() { | |
"use strict"; | |
this.$TextEditorCompositionState_composing = !1 | |
}, o.prototype.terminateSession = function() { | |
"use strict"; | |
this.$TextEditorCompositionState_composing = !1, this.emit("change") | |
}, o.prototype.inCompositionSession = function() { | |
"use strict"; | |
return this.$TextEditorCompositionState_composing | |
}, a(o, { | |
change: !0 | |
}), i.exports = o | |
}), __d("TextEditorEditHandler", ["DataTransfer", "DocumentCharacters", "Keys", "TextEditorModes", "TextEditorPasteHandler", "UserAgent", "findAncestorOffsetKey", "getChangedCharactersFromMutation", "getDocumentSelection", "isSelectionAtLeafStart"], function(e, t, n, r, i) { | |
function o(e) { | |
return b && (e == v || e == S) | |
} | |
function a(e, t) { | |
var n = e.selectionState; | |
if (!n.isCollapsed()) { | |
var r = n.getStartOffset(), | |
i = n.getEndOffset(); | |
t(e.documentView.getFragment(r, i), r, i) | |
} | |
} | |
var s = t("DataTransfer"), | |
l = t("DocumentCharacters"), | |
u = t("Keys"), | |
c = t("TextEditorModes"), | |
p = t("TextEditorPasteHandler"), | |
d = t("UserAgent"), | |
h = t("findAncestorOffsetKey"), | |
f = t("getChangedCharactersFromMutation"), | |
m = t("getDocumentSelection"), | |
g = t("isSelectionAtLeafStart"), | |
_ = l.BLOCK_DELIMITER, | |
y = l.SOFT_NEWLINE, | |
v = "'", | |
S = "/", | |
b = !!d.firefox(), | |
R = { | |
onBeforeInput: function(e) { | |
var t = e.data; | |
if (t) { | |
var n = this.props.documentView, | |
r = this.props.selectionState; | |
if (r.isCollapsed() && !g(n, r)) { | |
var i = n.getFingerprint(); | |
if (this.props.onCharacters(t), !o(t) && i === n.getFingerprint()) return void this.expectDuplicateMutation() | |
} else this.props.onCharacters(t); | |
e.preventDefault() | |
} | |
}, | |
onKeyDown: function(e) { | |
var t = e.nativeEvent.keyCode; | |
switch (t) { | |
case u.RETURN: | |
return e.preventDefault(), void this.props.onReturn(e); | |
case u.ESC: | |
return e.preventDefault(), void(this.props.onEscape && this.props.onEscape(e)); | |
case u.TAB: | |
return void(this.props.onTab && this.props.onTab(e)); | |
case u.UP: | |
return void(this.props.onUpArrow && this.props.onUpArrow(e)); | |
case u.DOWN: | |
return void(this.props.onDownArrow && this.props.onDownArrow(e)) | |
} | |
var n = this.props.keyBindingFn.call(null, e); | |
n && (e.preventDefault(), this.props.onKeyCommand(n)) | |
}, | |
normalizeAndHandleSelect: function(e, t, n, r, i) { | |
null !== e && null !== t && (t += this.props.documentView.getOffset(e)), null !== n && null !== r && (r += this.props.documentView.getOffset(n)), t && i && this.resetRenderedVersion(), this.props.onSelect(t, r, !!i) | |
}, | |
onSelect: function() { | |
m(this.refs.editorContainer.getDOMNode().firstChild, R.normalizeAndHandleSelect.bind(this)) | |
}, | |
onBlur: function(e) { | |
this.props.onBlur(e) | |
}, | |
onFocus: function(e) { | |
this.props.onFocus(e) | |
}, | |
onCharacterData: function(e) { | |
var t = f(e); | |
if (t) { | |
var n = h(t.node), | |
r = this.props.documentView.getOffset(n); | |
this.props.onAlter(r + t.offset, t.oldText, t.newText) | |
} | |
}, | |
onDragStart: function() { | |
this._internalDrag = !0, this.setMode(c.DRAG) | |
}, | |
onDragOver: function(e) { | |
this._internalDrag = !1, this.setMode(c.DRAG), e.preventDefault() | |
}, | |
onCompositionStart: function() { | |
this.setRenderGuard(), this.captureEditorDOM(), this.setMode(c.COMPOSITE), this._compositionState.startSession() | |
}, | |
onCut: function(e) { | |
return this.props.selectionState.isCollapsed() ? void e.preventDefault() : (this.setRenderGuard(), this.captureEditorDOM(), void a(this.props, function(e, t, n) { | |
this._clipboard = e, this.setMode(c.CUT), setTimeout(function() { | |
this.restoreEditorDOM(), this.removeRenderGuard(), this.exitCurrentMode(), this.props.onCut(t, n) | |
}.bind(this), 0) | |
}.bind(this))) | |
}, | |
onCopy: function() { | |
a(this.props, function(e) { | |
this._clipboard = e | |
}.bind(this)) | |
}, | |
onPaste: function(e) { | |
e.preventDefault(); | |
var t = new s(e.clipboardData); | |
if (!t.isRichText()) { | |
var n = t.getFiles(); | |
if (n.length > 0) return void(this.props.onPasteFiles && this.props.onPasteFiles(n)) | |
} | |
var r = t.getText(); | |
if (r && (r = r.replace(new RegExp(y, "g"), _)), this._clipboard && r === this._clipboard.text) return void this.props.onPasteFragment(this._clipboard); | |
var i = t.getHTML(); | |
if (i) { | |
var o = p.processHTML(i); | |
if (o) return void this.props.onPasteFragment(o) | |
} | |
this._clipboard = null, this.props.onPasteFragment(p.processText(r)) | |
} | |
}; | |
i.exports = R | |
}), __d("DataTransfer", ["PhotosMimeType", "createArrayFrom", "emptyFunction"], function(e, t, n, r, i) { | |
function o(e) { | |
return "file" == e.kind ? e.getAsFile() : void 0 | |
} | |
function a(e) { | |
"use strict"; | |
this.data = e, this.types = e.types ? l(e.types) : [] | |
} | |
var s = t("PhotosMimeType"), | |
l = t("createArrayFrom"), | |
u = t("emptyFunction"), | |
c = new RegExp("\r\n", "g"), | |
p = "\n", | |
d = { | |
"text/rtf": 1, | |
"text/html": 1 | |
}; | |
a.prototype.isRichText = function() { | |
"use strict"; | |
return this.types.some(function(e) { | |
return d[e] | |
}) | |
}, a.prototype.getText = function() { | |
"use strict"; | |
var e; | |
return this.data.getData && (this.types.length ? -1 != this.types.indexOf("text/plain") && (e = this.data.getData("text/plain")) : e = this.data.getData("Text")), e ? e.replace(c, p) : null | |
}, a.prototype.getHTML = function() { | |
"use strict"; | |
if (this.data.getData) { | |
if (!this.types.length) return this.data.getData("Text"); | |
if (-1 != this.types.indexOf("text/html")) return this.data.getData("text/html") | |
} | |
}, a.prototype.isImage = function() { | |
"use strict"; | |
var e = this.types.some(function(e) { | |
return -1 != e.indexOf("application/x-moz-file") | |
}); | |
if (e) return !0; | |
for (var t = this.getFiles(), n = 0; n < t.length; n++) { | |
var r = t[n].type; | |
if (!s(r).isImage()) return !1 | |
} | |
return !0 | |
}, a.prototype.getCount = function() { | |
"use strict"; | |
return this.data.hasOwnProperty("items") ? this.data.items.length : this.data.hasOwnProperty("mozItemCount") ? this.data.mozItemCount : this.data.files ? this.data.files.length : null | |
}, a.prototype.getFiles = function() { | |
"use strict"; | |
return this.data.items ? Array.prototype.slice.call(this.data.items).map(o).filter(u.thatReturnsArgument) : this.data.files ? Array.prototype.slice.call(this.data.files) : [] | |
}, a.prototype.hasFiles = function() { | |
"use strict"; | |
return this.getFiles().length > 0 | |
}, i.exports = a | |
}), __d("PhotosMimeType", [], function(e, t, n, r, i) { | |
function o(e) { | |
"use strict"; | |
return this instanceof o == !1 ? new o(e) : void(this.$PhotosMimeType_parts = e.split("/")) | |
} | |
o.prototype.isImage = function() { | |
"use strict"; | |
return "image" === this.$PhotosMimeType_parts[0] | |
}, o.prototype.isJpeg = function() { | |
"use strict"; | |
return this.isImage() && ("jpeg" === this.$PhotosMimeType_parts[1] || "pjpeg" === this.$PhotosMimeType_parts[1]) | |
}, i.exports = o | |
}), __d("TextEditorModes", [], function(e, t, n, r, i) { | |
var o = { | |
EDIT: 0, | |
COMPOSITE: 1, | |
DRAG: 2, | |
RENDER: 3, | |
CUT: 4 | |
}; | |
i.exports = o | |
}), __d("TextEditorPasteHandler", ["DocumentCharacters", "ComposedBlockType", "ComposedInlineStyle", "arrayContains", "fillArray", "getSafeBodyFromHTML"], function(e, t, n, r, i) { | |
function o() { | |
return { | |
text: "", | |
inlines: [], | |
blocks: [] | |
} | |
} | |
function a() { | |
return { | |
text: y, | |
inlines: [p.NONE], | |
blocks: [] | |
} | |
} | |
function s() { | |
return { | |
text: _, | |
inlines: [p.NONE], | |
blocks: [] | |
} | |
} | |
function l(e) { | |
return { | |
text: m, | |
inlines: [p.NONE], | |
blocks: [e] | |
} | |
} | |
var u = t("DocumentCharacters"), | |
c = t("ComposedBlockType"), | |
p = t("ComposedInlineStyle"), | |
d = t("arrayContains"), | |
h = t("fillArray"), | |
f = t("getSafeBodyFromHTML"), | |
m = u.BLOCK_DELIMITER, | |
g = " ", | |
_ = u.SOFT_NEWLINE, | |
y = " ", | |
v = c.UNSTYLED, | |
S = ["p", "h1", "h2", "h3", "li", "blockquote"], | |
b = { | |
strong: p.BOLD, | |
b: p.BOLD, | |
em: p.ITALIC, | |
i: p.ITALIC, | |
u: p.UNDERLINE | |
}, | |
R = { | |
processBlockTag: function(e, t) { | |
switch (e) { | |
case "h1": | |
return c.HEADER_ONE; | |
case "h2": | |
return c.HEADER_TWO; | |
case "li": | |
return "ol" === t ? c.ORDERED_LIST_ITEM : c.UNORDERED_LIST_ITEM; | |
case "blockquote": | |
return c.BLOCKQUOTE; | |
default: | |
return c.UNSTYLED | |
} | |
}, | |
processInlineTag: function(e, t) { | |
var n = b[e], | |
r = !!(t & n); | |
return n && !r && (t += n), t | |
}, | |
joinChunks: function(e, t) { | |
return e.text.slice(-1) === m && t.text.slice(0, 1) === m && (e.text = e.text.slice(0, -1), e.inlines.pop(), e.blocks.pop()), e.text.slice(-1) !== m || t.text !== y && t.text !== _ ? { | |
text: e.text + t.text, | |
inlines: e.inlines.concat(t.inlines), | |
blocks: e.blocks.concat(t.blocks) | |
} : e | |
}, | |
genFragment: function(e, t, n, r, i) { | |
var u = e.nodeName.toLowerCase(), | |
c = !1; | |
if ("#text" === u) { | |
var p = e.textContent; | |
return "" === p.trim() ? a() : { | |
text: p, | |
inlines: h(p.length, t), | |
blocks: [] | |
} | |
} | |
if ("br" === u) return s(); | |
var f, m = o(); | |
for (t = this.processInlineTag(u, t), ("ul" === u || "ol" === u) && (n = u), !r && d(i, u) && (m = l(this.processBlockTag(u, n)), r = !0, c = !0), e = e.firstChild; e;) f = this.genFragment(e, t, n, r, i), m = this.joinChunks(m, f), e = e.nextSibling; | |
return c && (m = this.joinChunks(m, l(v))), m | |
}, | |
containsSemanticBlockMarkup: function(e) { | |
return S.some(function(t) { | |
return -1 !== e.indexOf("<" + t) | |
}) | |
}, | |
processHTML: function(e) { | |
e = e.trim().split(m).join("").split(_).join(y).split(g).join(y); | |
var t = f(e); | |
if (!t) return null; | |
var n = this.containsSemanticBlockMarkup(e) ? S : ["div"], | |
r = this.genFragment(t, 0, "ul", !1, n); | |
return 0 === r.text.indexOf(m) && (r = { | |
text: r.text.slice(1), | |
inlines: r.inlines.slice(1), | |
blocks: r.blocks | |
}), r.text.slice(-1) === m && (r.text = r.text.slice(0, -1), r.inlines = r.inlines.slice(0, -1), r.blocks.pop()), 0 === r.blocks.length && r.blocks.push(v), r.text.split(m).length === r.blocks.length + 1 && r.blocks.unshift(v), r | |
}, | |
processText: function(e) { | |
return { | |
text: e, | |
inlines: h(e.length, p.NONE), | |
blocks: h(e.split(m).length, v) | |
} | |
} | |
}; | |
i.exports = R | |
}), __d("arrayContains", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
return -1 != e.indexOf(t) | |
} | |
i.exports = o | |
}), __d("getSafeBodyFromHTML", [], function(e, t, n, r, i) { | |
function o(e) { | |
var t, n = null; | |
return document.implementation && document.implementation.createHTMLDocument && (t = document.implementation.createHTMLDocument("foo"), t.documentElement.innerHTML = e, n = t.getElementsByTagName("body")[0]), n | |
} | |
i.exports = o | |
}), __d("UserAgent", [], function(e, t, n, r, i) { | |
function o() { | |
if (!b && (b = !0, "undefined" != typeof navigator)) { | |
var e = navigator.userAgent, | |
t = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e), | |
n = /(Mac OS X)|(Windows)|(Linux)/.exec(e); | |
if (_ = /\b(iPhone|iP[ao]d)/.exec(e), y = /\b(iP[ao]d)/.exec(e), m = /Android/i.exec(e), v = /FBAN\/\w+;/i.exec(e), S = /Mobile/i.exec(e), g = !!/Win64/.exec(e), t) { | |
a = t[1] ? parseFloat(t[1]) : t[5] ? parseFloat(t[5]) : 0 / 0, a && document && document.documentMode && (a = document.documentMode); | |
var r = /(?:Trident\/(\d+.\d+))/.exec(e); | |
p = r ? parseFloat(r[1]) + 4 : a, s = t[2] ? parseFloat(t[2]) : 0 / 0, l = t[3] ? parseFloat(t[3]) : 0 / 0, u = t[4] ? parseFloat(t[4]) : 0 / 0, u ? (t = /(?:Chrome\/(\d+\.\d+))/.exec(e), c = t && t[1] ? parseFloat(t[1]) : 0 / 0) : c = 0 / 0 | |
} else a = s = l = c = u = 0 / 0; | |
if (n) { | |
if (n[1]) { | |
var i = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e); | |
d = i ? parseFloat(i[1].replace("_", ".")) : !0 | |
} else d = !1; | |
h = !!n[2], f = !!n[3] | |
} else d = h = f = !1 | |
} | |
} | |
var a, s, l, u, c, p, d, h, f, m, g, _, y, v, S, b = !1, | |
R = { | |
ie: function() { | |
return o() || a | |
}, | |
ieCompatibilityMode: function() { | |
return o() || p > a | |
}, | |
ie64: function() { | |
return R.ie() && g | |
}, | |
firefox: function() { | |
return o() || s | |
}, | |
opera: function() { | |
return o() || l | |
}, | |
webkit: function() { | |
return o() || u | |
}, | |
safari: function() { | |
return R.webkit() | |
}, | |
chrome: function() { | |
return o() || c | |
}, | |
windows: function() { | |
return o() || h | |
}, | |
osx: function() { | |
return o() || d | |
}, | |
linux: function() { | |
return o() || f | |
}, | |
iphone: function() { | |
return o() || _ | |
}, | |
mobile: function() { | |
return o() || _ || y || m || S | |
}, | |
nativeApp: function() { | |
return o() || v | |
}, | |
android: function() { | |
return o() || m | |
}, | |
ipad: function() { | |
return o() || y | |
} | |
}; | |
i.exports = R | |
}), __d("findAncestorOffsetKey", ["getSelectionOffsetKeyForNode"], function(e, t, n, r, i) { | |
function o(e) { | |
for (; e && e !== document.documentElement;) { | |
var t = a(e); | |
if (null != t) return t; | |
e = e.parentNode | |
} | |
return null | |
} | |
var a = t("getSelectionOffsetKeyForNode"); | |
i.exports = o | |
}), __d("getSelectionOffsetKeyForNode", [], function(e, t, n, r, i) { | |
function o(e) { | |
return e.getAttribute && e.getAttribute("data-offset-key") | |
} | |
i.exports = o | |
}), __d("getChangedCharactersFromMutation", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
var n, r = Math.min(e.length, t.length), | |
i = r, | |
o = r; | |
for (n = 0; r > n; n++) | |
if (e.charAt(n) !== t.charAt(n)) { | |
i = n; | |
break | |
} | |
for (n = 0; r > n; n++) | |
if (e.charAt(e.length - n - 1) !== t.charAt(t.length - n - 1)) { | |
o = n; | |
break | |
} | |
return { | |
prefix: i, | |
suffix: o | |
} | |
} | |
function a(e, t, n) { | |
for (var r = 0; n > r; r++) t.charAt(e.prefix - 1).match(/^\s?$/) ? e.suffix-- : e.prefix-- | |
} | |
function s(e, t) { | |
return e.substr(t.prefix, e.length - t.prefix - t.suffix) | |
} | |
function l(e) { | |
var t, n; | |
if (3 === e.length) t = e[1], n = e[2]; | |
else { | |
if (2 !== e.length) return; | |
t = e[0], n = e[1] | |
} | |
if (t.target === n.target) { | |
var r = t.oldValue, | |
i = n.oldValue, | |
l = n.target.data; | |
if (l !== r && l.length > i.length && r.length > i.length) { | |
var u = o(r, i), | |
c = o(l, i), | |
p = u.prefix < c.prefix ? u : c, | |
d = r.length - p.prefix - p.suffix, | |
h = r.length - i.length; | |
return a(p, r, h - d), { | |
node: n.target, | |
offset: p.prefix, | |
oldText: s(r, p), | |
newText: s(l, p) | |
} | |
} | |
} | |
} | |
i.exports = l | |
}), __d("getDocumentSelection", ["binarySearch", "findAncestorOffsetKey", "getSelectionOffsetKeyForNode", "invariant"], function(e, t, n, r, i) { | |
function o(e) { | |
for (; e.firstChild && m(e.firstChild);) e = e.firstChild; | |
return e | |
} | |
function a(e) { | |
for (; e.lastChild && m(e.lastChild);) e = e.lastChild; | |
return e | |
} | |
function s(e, t) { | |
var n = document.selection, | |
r = n.createRange(), | |
i = r.text, | |
o = l(e, r, _), | |
a = o; | |
null !== o && i.length > 0 && (a = l(e, r, y)), o && a ? t(o.key, o.offset, a.key, a.offset) : t(null, null, null, null) | |
} | |
function l(e, t, n) { | |
for (var r = t.duplicate(), i = function(e) { | |
return r.moveToElementText(e), u(r, t, n) | |
}; e && e.childNodes;) { | |
var o = h(e.childNodes, i); | |
if (-1 === o) break; | |
e = e.childNodes[o]; | |
var a = m(e); | |
if (null !== a) return r.moveToElementText(e), r.setEndPoint("EndTo" + n, t), { | |
key: a, | |
offset: r.text.length | |
} | |
} | |
return null | |
} | |
function u(e, t, n) { | |
return 1 == e.compareEndPoints("StartTo" + n, t) ? 1 : -1 == e.compareEndPoints("EndTo" + n, t) ? -1 : 0 | |
} | |
function c(e, t, n) { | |
var r = f(t); | |
if (null == r && e !== t && g(0, "Unknown node in selection range."), 0 === n) return { | |
key: r || m(o(t)), | |
offset: 0 | |
}; | |
var i, s, l = t.childNodes[n - 1]; | |
if (m(l)) { | |
var u = a(l); | |
i = m(u), s = u.textContent.length | |
} else i = r, s = l.textContent.length; | |
return { | |
key: i, | |
offset: s | |
} | |
} | |
function p(t, n) { | |
var r = e.getSelection(); | |
if (0 === r.rangeCount) return void n(null, null, null, null); | |
var i = r.anchorNode, | |
o = r.focusNode, | |
a = r.anchorOffset, | |
s = r.focusOffset, | |
l = i.nodeType === Node.TEXT_NODE, | |
u = o.nodeType === Node.TEXT_NODE; | |
if (l && u) return void n(f(i), a, f(o), s); | |
var p = null, | |
d = null; | |
l ? (p = { | |
key: f(i), | |
offset: a | |
}, d = c(t, o, s)) : u ? (d = { | |
key: f(o), | |
offset: s | |
}, p = c(t, i, a)) : (p = c(t, i, a), d = c(t, o, s)), n(p.key, p.offset, d.key, d.offset, !0) | |
} | |
function d(e, t) { | |
document.selection ? s(e, t) : p(e, t) | |
} | |
var h = t("binarySearch"), | |
f = t("findAncestorOffsetKey"), | |
m = t("getSelectionOffsetKeyForNode"), | |
g = t("invariant"), | |
_ = "Start", | |
y = "End"; | |
i.exports = d | |
}), __d("binarySearch", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
if (__DEV__ && "number" != typeof e.length) throw new TypeError("binarySearch() must be passed array-like object."); | |
for (var n = 0, r = e.length - 1; r >= n;) { | |
var i = Math.floor((r + n) / 2), | |
o = t(e[i], i); | |
if (0 === o) return i; | |
o > 0 ? r = i - 1 : n = i + 1 | |
} | |
return -1 | |
} | |
i.exports = o | |
}), __d("TextEditorDragHandler", ["DataTransfer"], function(e, t, n, r, i) { | |
function o(e, t) { | |
var n, r; | |
if (document.caretRangeFromPoint) { | |
var i = document.caretRangeFromPoint(t.x, t.y); | |
n = i.startContainer, r = i.startOffset | |
} else t.rangeParent && (n = t.rangeParent, r = t.rangeOffset); | |
if (n) { | |
var o = document.createRange(); | |
o.setStart(e, 0), o.setEnd(n, r); | |
var a = o.toString().length; | |
return o.detach(), a | |
} | |
} | |
var a = t("DataTransfer"), | |
s = { | |
onDragEnd: function() { | |
this.exitCurrentMode() | |
}, | |
onDrop: function(e) { | |
var t = new a(e.nativeEvent.dataTransfer), | |
n = o(this.refs.editorContainer.getDOMNode(), e.nativeEvent); | |
if (null != n) { | |
var r = t.getFiles(); | |
this.props.onDropFiles && r.length > 0 ? this.props.onDropFiles(n, r) : this._internalDrag ? this.props.onDropSelection(n) : this.props.onDropText(n, t.getText()) | |
} | |
e.preventDefault(), this.exitCurrentMode() | |
} | |
}; | |
i.exports = s | |
}), __d("TextInput", ["DocumentSelectionState", "EventEmitter", "NativeMethodsMixin", "NativeModulesDeprecated", "ReactPropTypes", "React", "ReactChildren", "ReactIOSViewAttributes", "StyleSheet", "Subscribable", "Text", "TextInputState", "TimerMixin", "TouchableWithoutFeedback", "createReactIOSNativeComponentClass", "emptyFunction", "getObjectValues", "invariant", "merge"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("DocumentSelectionState"), | |
a = t("EventEmitter"), | |
s = t("NativeMethodsMixin"), | |
l = t("NativeModulesDeprecated"), | |
u = t("ReactPropTypes"), | |
c = t("React"), | |
p = t("ReactChildren"), | |
d = t("ReactIOSViewAttributes"), | |
h = t("StyleSheet"), | |
f = t("Subscribable"), | |
m = t("Text"), | |
g = t("TextInputState"), | |
_ = t("TimerMixin"), | |
y = t("TouchableWithoutFeedback"), | |
v = t("createReactIOSNativeComponentClass"), | |
S = t("emptyFunction"), | |
b = t("getObjectValues"), | |
R = t("invariant"), | |
w = t("merge"), | |
C = l.RKUIManager.UIText.AutocapitalizationType, | |
E = { | |
none: C.None, | |
sentences: C.Sentences, | |
words: C.Words, | |
characters: C.AllCharacters | |
}, | |
D = { | |
"default": "default", | |
numeric: "numeric" | |
}, | |
T = w(d.UIView, { | |
autoCorrect: !0, | |
autoCapitalize: !0, | |
color: !0, | |
editable: !0, | |
fontSize: !0, | |
fontWeight: !0, | |
keyboardType: !0, | |
mostRecentEventCounter: !0, | |
placeholder: !0, | |
placeholderTextColor: !0, | |
text: !0 | |
}), | |
x = w(T, { | |
caretHidden: !0, | |
enabled: !0 | |
}), | |
P = { | |
onSelectionChange: !0, | |
onTextInput: !0, | |
children: !0 | |
}, | |
I = { | |
onSubmitEditing: !0 | |
}, | |
F = c.createClass({ | |
displayName: "TextInput", | |
statics: { | |
autoCapitalizeMode: E, | |
keyboardType: D | |
}, | |
propTypes: { | |
autoCapitalize: u.oneOf(b(E)), | |
autoCorrect: u.bool, | |
autoFocus: u.bool, | |
editable: u.bool, | |
keyboardType: u.oneOf(b(D)), | |
multiline: u.bool, | |
onBlur: u.func, | |
onFocus: u.func, | |
onChangeText: u.func, | |
onEndEditing: u.func, | |
onSubmitEditing: u.func, | |
placeholder: u.string, | |
placeholderTextColor: u.string, | |
selectionState: u.instanceOf(o), | |
value: u.string, | |
bufferDelay: u.number, | |
controlled: u.bool, | |
style: m.stylePropType | |
}, | |
mixins: [s, _, f.Mixin], | |
viewConfig: { | |
uiViewClassName: "RCTTextField", | |
validAttributes: x | |
}, | |
isFocused: function() { | |
return g.currentlyFocusedField() === this.refs.input.getNativeNode() | |
}, | |
getDefaultProps: function() { | |
return { | |
bufferDelay: 100 | |
} | |
}, | |
getInitialState: function() { | |
return { | |
mostRecentEventCounter: 0, | |
bufferedValue: this.props.value | |
} | |
}, | |
contextTypes: { | |
onFocusRequested: c.PropTypes.func, | |
focusEmitter: c.PropTypes.instanceOf(a) | |
}, | |
componentDidMount: function() { | |
return this.context.focusEmitter ? (this.addListenerOn(this.context.focusEmitter, "focus", function(e) { | |
this === e ? this.requestAnimationFrame(this.focus) : this.isFocused() && this.blur() | |
}.bind(this)), void(this.props.autoFocus && this.context.onFocusRequested(this))) : void(this.props.autoFocus && this.requestAnimationFrame(this.focus)) | |
}, | |
componentWillReceiveProps: function(e) { | |
e.value !== this.props.value && (this.isFocused() ? (this.clearTimeout(this._bufferTimeout), this._bufferTimeout = this.setTimeout(function() { | |
return this.setState({ | |
bufferedValue: e.value | |
}) | |
}.bind(this), this.props.bufferDelay)) : this.setState({ | |
bufferedValue: e.value | |
})) | |
}, | |
render: function() { | |
var e; | |
if (this.props.multiline) { | |
for (var t in I) | |
if (this.props[t]) throw new Error("TextInput prop `" + t + "` cannot be used with multiline."); | |
var n = this.props.children, | |
r = 0; | |
p.forEach(n, function() { | |
return ++r | |
}), this.props.value && r && R(0, "Cannot specify both value and children."), r > 1 && (n = c.createElement(m, null, n)), this.props.inputView && (n = [n, this.props.inputView]), e = c.createElement(M, { | |
ref: "input", | |
style: [L.input, this.props.style], | |
children: n, | |
mostRecentEventCounter: this.state.mostRecentEventCounter, | |
editable: this.props.editable, | |
onFocus: this._onFocus, | |
onBlur: this._onBlur, | |
onChange: this._onChange, | |
onEndEditing: this.props.onEndEditing, | |
onSelectionChange: this._onSelectionChange, | |
onTextInput: this._onTextInput, | |
onSelectionChangeShouldSetResponder: S.thatReturnsTrue, | |
placeholder: this.props.placeholder, | |
placeholderTextColor: this.props.placeholderTextColor, | |
text: this.state.bufferedValue, | |
autoCapitalize: this.props.autoCapitalize, | |
autoCorrect: this.props.autoCorrect | |
}) | |
} else { | |
for (var t in P) | |
if (this.props[t]) throw new Error("TextInput prop `" + t + "` is only supported with multiline."); | |
e = c.createElement(Q, { | |
ref: "input", | |
style: [L.input, this.props.style], | |
enabled: this.props.editable, | |
keyboardType: this.props.keyboardType, | |
onFocus: this._onFocus, | |
onBlur: this._onBlur, | |
onChange: this._onChange, | |
onEndEditing: this.props.onEndEditing, | |
onSubmitEditing: this.props.onSubmitEditing, | |
onSelectionChangeShouldSetResponder: function() { | |
return !0 | |
}, | |
placeholder: this.props.placeholder, | |
text: this.state.bufferedValue, | |
autoCapitalize: this.props.autoCapitalize, | |
autoCorrect: this.props.autoCorrect | |
}) | |
} | |
return c.createElement(y, { | |
onPress: this._onPress, | |
rejectResponderTermination: !0 | |
}, e) | |
}, | |
_onFocus: function(e) { | |
this.props.onFocus && this.props.onFocus(e) | |
}, | |
_onPress: function() { | |
this.focus() | |
}, | |
_onChange: function(e) { | |
this.props.controlled && e.nativeEvent.text !== this.props.value && this.refs.input.setNativeProps({ | |
text: this.props.value | |
}), this.props.onChange && this.props.onChange(e), this.props.onChangeText && this.props.onChangeText(e.nativeEvent.text) | |
}, | |
_onBlur: function(e) { | |
this.blur(), this.props.onBlur && this.props.onBlur(e) | |
}, | |
_onSelectionChange: function(e) { | |
if (this.props.selectionState) { | |
var t = e.nativeEvent.selection; | |
this.props.selectionState.update(t.start, t.end) | |
} | |
this.props.onSelectionChange && this.props.onSelectionChange(e) | |
}, | |
_onTextInput: function(e) { | |
this.props.onTextInput && this.props.onTextInput(e); | |
var t = e.nativeEvent.eventCounter; | |
t > this.state.mostRecentEventCounter && this.setState({ | |
mostRecentEventCounter: t | |
}) | |
} | |
}), | |
L = h.create({ | |
input: { | |
alignSelf: "stretch" | |
} | |
}), | |
M = v({ | |
validAttributes: T, | |
uiViewClassName: "RCTTextView" | |
}), | |
Q = v({ | |
validAttributes: x, | |
uiViewClassName: "RCTTextField" | |
}); | |
i.exports = F | |
}), __d("ReactChildren", ["PooledClass", "traverseAllChildren", "warning"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e, t) { | |
this.forEachFunction = e, this.forEachContext = t | |
} | |
function a(e, t, n, r) { | |
var i = e; | |
i.forEachFunction.call(i.forEachContext, t, r) | |
} | |
function s(e, t, n) { | |
if (null == e) return e; | |
var r = o.getPooled(t, n); | |
f(e, a, r), o.release(r) | |
} | |
function l(e, t, n) { | |
this.mapResult = e, this.mapFunction = t, this.mapContext = n | |
} | |
function u(e, t, n, r) { | |
var i = e, | |
o = i.mapResult, | |
a = !o.hasOwnProperty(n); | |
if (m(a, "ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.", n), a) { | |
var s = i.mapFunction.call(i.mapContext, t, r); | |
o[n] = s | |
} | |
} | |
function c(e, t, n) { | |
if (null == e) return e; | |
var r = {}, | |
i = l.getPooled(r, t, n); | |
return f(e, u, i), l.release(i), r | |
} | |
function p() { | |
return null | |
} | |
function d(e) { | |
return f(e, p, null) | |
} | |
var h = t("PooledClass"), | |
f = t("traverseAllChildren"), | |
m = t("warning"), | |
g = h.twoArgumentPooler, | |
_ = h.threeArgumentPooler; | |
h.addPoolingTo(o, g), h.addPoolingTo(l, _); | |
var y = { | |
forEach: s, | |
map: c, | |
count: d | |
}; | |
i.exports = y | |
}), __d("TouchableWithoutFeedback", ["React", "Touchable", "View", "copyProperties", "onlyChild"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("React"), | |
a = t("Touchable"), | |
s = (t("View"), t("copyProperties")), | |
l = t("onlyChild"), | |
u = { | |
top: 20, | |
left: 20, | |
right: 20, | |
bottom: 30 | |
}, | |
c = o.createClass({ | |
displayName: "TouchableWithoutFeedback", | |
mixins: [a.Mixin], | |
propTypes: { | |
onPress: o.PropTypes.func, | |
onPressIn: o.PropTypes.func, | |
onPressOut: o.PropTypes.func, | |
onLongPress: o.PropTypes.func | |
}, | |
getInitialState: function() { | |
return this.touchableGetInitialState() | |
}, | |
touchableHandlePress: function(e) { | |
this.props.onPress && this.props.onPress(e) | |
}, | |
touchableHandleActivePressIn: function() { | |
this.props.onPressIn && this.props.onPressIn() | |
}, | |
touchableHandleActivePressOut: function() { | |
this.props.onPressOut && this.props.onPressOut() | |
}, | |
touchableHandleLongPress: function() { | |
this.props.onLongPress && this.props.onLongPress() | |
}, | |
touchableGetPressRectOffset: function() { | |
return u | |
}, | |
touchableGetHighlightDelayMS: function() { | |
return 0 | |
}, | |
render: function() { | |
var e = l(this.props.children); | |
return s(e.props, { | |
accessible: !0, | |
testID: this.props.testID, | |
onStartShouldSetResponder: this.touchableHandleStartShouldSetResponder, | |
onResponderTerminationRequest: this.touchableHandleResponderTerminationRequest, | |
onResponderGrant: this.touchableHandleResponderGrant, | |
onResponderMove: this.touchableHandleResponderMove, | |
onResponderRelease: this.touchableHandleResponderRelease, | |
onResponderTerminate: this.touchableHandleResponderTerminate | |
}), e | |
} | |
}); | |
i.exports = c | |
}), __d("onlyChild", ["ReactElement", "invariant"], function(e, t, n, r, i) { | |
"use strict"; | |
function o(e) { | |
return a.isValidElement(e) || s(0, "onlyChild must be passed a children with exactly one child."), e | |
} | |
var a = t("ReactElement"), | |
s = t("invariant"); | |
i.exports = o | |
}), __d("requestAnimationFrame", ["emptyFunction", "nativeRequestAnimationFrame"], function(e, t, n, r, i) { | |
var o = t("emptyFunction"), | |
a = t("nativeRequestAnimationFrame"), | |
s = 0, | |
l = a || function(t) { | |
var n = Date.now(), | |
r = Math.max(0, 16 - (n - s)); | |
return s = n + r, e.setTimeout(function() { | |
t(Date.now()) | |
}, r) | |
}; | |
l(o), i.exports = l | |
}), __d("nativeRequestAnimationFrame", [], function(e, t, n, r, i) { | |
var o = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame; | |
i.exports = o | |
}), __d("ModalFullscreenView", ["NativeModulesDeprecated", "React", "ReactIOSViewAttributes", "Dimensions", "StyleSheet", "createReactIOSNativeComponentClass"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("NativeModulesDeprecated"), | |
a = t("React"), | |
s = t("ReactIOSViewAttributes"), | |
l = t("Dimensions"), | |
u = t("StyleSheet"), | |
c = t("createReactIOSNativeComponentClass"), | |
p = c({ | |
validAttributes: s.UIView, | |
uiViewClassName: "RCTModalFullscreenView" | |
}), | |
d = u.create({ | |
modalContainer: { | |
backgroundColor: "transparent", | |
position: "absolute", | |
left: 0, | |
top: 0, | |
right: 0, | |
bottom: 0 | |
} | |
}), | |
h = a.createClass({ | |
displayName: "ModalFullscreenView", | |
statics: { | |
width: l.get("modalFullscreenView").width, | |
height: l.get("modalFullscreenView").height, | |
style: d.modalContainer | |
}, | |
getInitialState: function() { | |
return { | |
isOpen: !1 | |
} | |
}, | |
open: function() { | |
this.state.isOpen || (this.setState({ | |
isOpen: !0 | |
}), o.RKModalFullscreenViewManager.open()) | |
}, | |
close: function() { | |
this.state.isOpen && (this.setState({ | |
isOpen: !1 | |
}), o.RKModalFullscreenViewManager.close()) | |
}, | |
render: function() { | |
var e = { | |
position: "absolute", | |
left: 0, | |
top: 0, | |
width: l.get("modalFullscreenView").width, | |
height: l.get("modalFullscreenView").height | |
}; | |
return a.createElement(p, { | |
style: e, | |
onStartShouldSetResponder: this._shouldSetResponder | |
}, this.props.children) | |
}, | |
_shouldSetResponder: function() { | |
return !0 | |
} | |
}); | |
i.exports = h | |
}), __d("getMentionableRect", [], function(e, t, n, r, i) { | |
"use strict"; | |
i.exports = function() { | |
return null | |
} | |
}), __d("TypeaheadNavigation", [], function(e, t, n, r, i) { | |
var o = { | |
moveUp: function(e, t, n) { | |
var r = e.indexOf(t), | |
i = -1 == r ? e.length - 1 : r - 1; | |
n(-1 == i ? null : e[i]) | |
}, | |
moveDown: function(e, t, n) { | |
var r = e.indexOf(t) + 1; | |
n(r == e.length ? null : e[r]) | |
} | |
}; | |
i.exports = o | |
}), __d("DocumentCompositeDecorator", ["fillArray"], function(e, t, n, r, i) { | |
function o(e) { | |
"use strict"; | |
this.$DocumentCompositeDecorator_decorators = e.slice(), this.$DocumentCompositeDecorator_componentMap = {} | |
} | |
function a(e, t, n) { | |
for (var r = t; n > r; r++) | |
if (null != e[r]) return !1; | |
return !0 | |
} | |
function s(e, t, n, r) { | |
for (var i = t; n > i; i++) e[i] = r | |
} | |
var l = t("fillArray"); | |
o.prototype.getDecorations = function(e) { | |
"use strict"; | |
var t = l(e.getText().length, null), | |
n = 0, | |
r = this.$DocumentCompositeDecorator_componentMap; | |
return this.$DocumentCompositeDecorator_decorators.forEach(function(i) { | |
var o = i.getStrategy(), | |
l = i.getComponent(); | |
o(e, function(e, i) { | |
a(t, e, i) && (r[n] = l, s(t, e, i, n), n++) | |
}) | |
}), t | |
}, o.prototype.getComponentForKey = function(e) { | |
"use strict"; | |
return this.$DocumentCompositeDecorator_componentMap[e] | |
}, i.exports = o | |
}), __d("DocumentDecorator", [], function(e, t, n, r, i) { | |
function o(e, t) { | |
"use strict"; | |
this.$DocumentDecorator_strategy = e, this.$DocumentDecorator_component = t | |
} | |
o.prototype.getStrategy = function() { | |
"use strict"; | |
return this.$DocumentDecorator_strategy | |
}, o.prototype.getComponent = function() { | |
"use strict"; | |
return this.$DocumentDecorator_component | |
}, i.exports = o | |
}), __d("ComposedEntityType", [], function(e, t, n, r, i) { | |
"use strict"; | |
var o = { | |
MENTION: 0, | |
LINK: 1, | |
IMAGE: 2, | |
VIDEO: 3 | |
}; | |
i.exports = o | |
}), __d("MentionSpan", ["React", "StyleSheet", "Text"], function(e, t, n, r, i) { | |
"use strict"; | |
var o = t("React"), | |
a = t("StyleSheet"), | |
s = t("Text"), | |
l = o.createClass({ | |
displayName: "MentionSpan", | |
render: function() { | |
return o.createElement(s, { | |
style: u.text | |
}, this.props.children) | |
} | |
}), | |
u = a.create({ | |
text: { | |
backgroundColor: "#ccddff" | |
} | |
}); | |
i.exports = l | |
}), __d("MentionsTextEditorMixin", ["BaseTextEditorMixin", "DocumentEntity", "ComposedEntityType", "ComposedEntityMutability", "DocumentModifier", "getCurrentInlineStyle", "merge"], function(e, t, n, r, i) { | |
function o(e, t, n) { | |
for (var r = n; r <= t.length; r++) e.substr(-r) == t.substr(0, r) && (n = r); | |
return n | |
} | |
function a(e) { | |
var t = "user" === e.getType().toLowerCase() ? c.SEGMENTED : c.IMMUTABLE, | |
n = e.getAuxiliaryData(); | |
return l.create(u.MENTION, t, { | |
id: e.getUniqueID(), | |
isWeak: n && "non_member" === n.renderType | |
}) | |
} | |
var s = t("BaseTextEditorMixin"), | |
l = t("DocumentEntity"), | |
u = t("ComposedEntityType"), | |
c = t("ComposedEntityMutability"), | |
p = t("DocumentModifier"), | |
d = t("getCurrentInlineStyle"), | |
h = t("merge"), | |
f = { | |
onShowMentions: function(e, t) { | |
this._mentionOffset = t, this.props.onShowMentions && this.props.onShowMentions(e, t) | |
}, | |
onAddMention: function(e, t) { | |
var n = this.props.selectionState, | |
r = n.getStartOffset(), | |
i = r - o(this.props.documentContent.getText().substr(0, r), e.getTitle(), this._mentionOffset); | |
p.replaceText(this.props.documentContent, e.getTitle(), d(this.props.documentContent, n), a(e), i, r, this.updateDocumentAndCollapseSelection), this.props.onAddMention && this.props.onAddMention(e, t) | |
} | |
}, | |
m = h(s, f); | |
i.exports = m | |
}), __d("BaseTextEditorMixin", ["DocumentCharacters", "DocumentCommands", "DocumentModifier", "DocumentRemovableWord", "emptyFunction", "getActiveElement", "getCurrentInlineStyle", "getCurrentInlineStyleForOffset", "getTextContentFromFiles"], function(e, t, n, r, i) { | |
var o = t("DocumentCharacters"), | |
a = t("DocumentCommands"), | |
s = t("DocumentModifier"), | |
l = t("DocumentRemovableWord"), | |
u = t("emptyFunction"), | |
c = t("getActiveElement"), | |
p = t("getCurrentInlineStyle"), | |
d = t("getCurrentInlineStyleForOffset"), | |
h = t("getTextContentFromFiles"), | |
f = o.BLOCK_DELIMITER, | |
m = o.SOFT_NEWLINE, | |
g = { | |
getHandlerForCommand: function(e) { | |
switch (e) { | |
case a.UNDO: | |
return this.undo; | |
case a.REDO: | |
return this.redo; | |
case a.DELETE: | |
return this.onDelete; | |
case a.DELETE_WORD: | |
return this.onDeleteWord; | |
case a.DELETE_TO_END_OF_BLOCK: | |
return this.onDeleteToEndOfBlock; | |
case a.BACKSPACE: | |
return this.onBackspace; | |
case a.BACKSPACE_WORD: | |
return this.onBackspaceWord; | |
case a.BACKSPACE_TO_END_OF_BLOCK: | |
return this.onBackspaceToEndOfBlock; | |
case a.INSERT_BLOCK_DELIMITER: | |
return this.onInsertNewline; | |
case a.TRANSPOSE_CHARACTERS: | |
return this.onTransposeCharacters; | |
case a.MOVE_SELECTION_TO_START_OF_BLOCK: | |
return this.moveSelectionToStartOfBlock; | |
case a.MOVE_SELECTION_TO_END_OF_BLOCK: | |
return this.moveSelectionToEndOfBlock; | |
default: | |
return u | |
} | |
}, | |
componentWillReceiveProps: function(e) { | |
var t = e.documentContent, | |
n = this.props.documentContent; | |
if (t && n != t) this.props.selectionState.update(0, 0); | |
else { | |
var r = n.getText().length; | |
this.props.selectionState.constrainLength(r) | |
} | |
}, | |
onFocus: function() { | |
this.props.selectionState.focus() | |
}, | |
onBlur: function() { | |
e.getSelection && c() === document.body && e.getSelection().removeAllRanges(), this.props.selectionState.blur() | |
}, | |
onSelect: function(e, t, n) { | |
if (!this._blockSelectEvents) { | |
var r = this.props.selectionState; | |
null === e ? (r.update(0, 0), r.blur()) : n ? this.updateDocument(e, t) : r.update(e, t) | |
} | |
}, | |
updateDocument: function(e, t) { | |
this.props.selectionState.update(e, t), this._blockSelectEvents = !0, this.forceUpdate(function() { | |
this.props.onChange && this.props.onChange(), this._blockSelectEvents = !1 | |
}.bind(this)) | |
}, | |
updateDocumentAndCollapseSelection: function(e, t) { | |
this.updateDocument(t, t) | |
}, | |
undo: function() { | |
s.undo(this.props.documentContent, this.updateDocument) | |
}, | |
redo: function() { | |
s.redo(this.props.documentContent, this.updateDocument) | |
}, | |
onKeyCommand: function(e) { | |
var t = this.getHandlerForCommand(e); | |
t() | |
}, | |
onCut: function(e, t) { | |
s.removeRange(this.props.documentContent, e, t, this.updateDocument) | |
}, | |
onPasteFragment: function(e) { | |
var t = this.props.selectionState; | |
s.insertFragment(this.props.documentContent, e, t.getStartOffset(), t.getEndOffset(), this.updateDocumentAndCollapseSelection) | |
}, | |
_removeTextWithStrategy: function(e) { | |
var t = this.props.selectionState, | |
n = t.getEndOffset(); | |
if (t.isCollapsed()) { | |
var r = e(n); | |
if (r) { | |
var i = 0 > r; | |
return void s.removeRange(this.props.documentContent, i ? n + r : n, i ? n : n + r, this.updateDocumentAndCollapseSelection) | |
} | |
} | |
this._removeRange() | |
}, | |
onDelete: function() { | |
var e = this.props.selectionState; | |
e.isCollapsed() ? s.removeCharacterForward(this.props.documentContent, e.getAnchorOffset(), this.updateDocumentAndCollapseSelection) : this._removeRange() | |
}, | |
onDeleteWord: function() { | |
var e = this.props.selectionState.getStartOffset(), | |
t = this.props.documentContent; | |
return e < t.getText().length && t.getEntities()[e] ? void this.onDelete() : void this._removeTextWithStrategy(function(e) { | |
var t = this.props.documentContent.getText(), | |
n = l.getForward(t.slice(e)); | |
return n ? n.length : null | |
}.bind(this)) | |
}, | |
onDeleteToEndOfBlock: function() { | |
this._removeTextWithStrategy(function(e) { | |
var t = this.props.documentContent.getText(), | |
n = t.indexOf(f, e); | |
return -1 === n ? n = t.length : n === e && n++, n - e | |
}.bind(this)) | |
}, | |
onBackspace: function() { | |
var e = this.props.selectionState; | |
e.isCollapsed() ? s.removeCharacterBackward(this.props.documentContent, e.getAnchorOffset(), this.updateDocumentAndCollapseSelection) : this._removeRange() | |
}, | |
onBackspaceWord: function() { | |
var e = this.props.selectionState.getStartOffset(), | |
t = this.props.documentContent; | |
return e > 0 && t.getEntities()[e - 1] ? void this.onBackspace() : void this._removeTextWithStrategy(function(e) { | |
var t = this.props.documentContent.getText(), | |
n = l.getBackward(t.slice(0, e)); | |
return n ? -n.length : null | |
}.bind(this)) | |
}, | |
onBackspaceToEndOfBlock: function() { | |
this._removeTextWithStrategy(function(e) { | |
var t = this.props.documentContent.getText(), | |
n = t.slice(0, e).lastIndexOf(f); | |
return -1 === n ? n = 0 : e - 1 > n && n++, n - e | |
}.bind(this)) | |
}, | |
moveSelectionToStartOfBlock: function() { | |
this._moveSelectionToBlockEndpoint(!0) | |
}, | |
moveSelectionToEndOfBlock: function() { | |
this._moveSelectionToBlockEndpoint(!1) | |
}, | |
_moveSelectionToBlockEndpoint: function(e) { | |
for (var t = this.props.documentContent, n = this.props.selectionState.getStartOffset(), r = t.getText(), i = e ? r.substr(0, n).split("").reverse().join("") : r.substr(n), o = i.length, a = 0; a < i.length; a++) | |
if (i[a] === f || i[a] === m) { | |
o = a; | |
break | |
} | |
if (o > 0) { | |
var s = e ? n - o : n + o; | |
t.bumpVersion(), this.updateDocument(s, s) | |
} | |
}, | |
_removeRange: function() { | |
var e = this.props.selectionState; | |
s.removeRange(this.props.documentContent, e.getStartOffset(), e.getEndOffset(), this.updateDocumentAndCollapseSelection) | |
}, | |
onReturn: function(e) { | |
e.shiftKey ? this.onInsertSoftNewline() : this.onInsertNewline() | |
}, | |
onInsertSoftNewline: function() { | |
this.onCharacters(m) | |
}, | |
onInsertNewline: function() { | |
this.onCharacters(f) | |
}, | |
onTransposeCharacters: function() { | |
var e = this.props.selectionState, | |
t = e.getStartOffset(), | |
n = this.props.documentContent.getText(); | |
e.isCollapsed() && 0 !== t && t !== n.length && s.moveText(this.props.documentContent, t - 1, t, t + 1, this.updateDocumentAndCollapseSelection) | |
}, | |
onCharacters: function(e) { | |
var t, n = this.props.selectionState; | |
t = null != this.state.inlineStyleOverride ? this.state.inlineStyleOverride : p(this.props.documentContent, n), s.replaceText(this.props.documentContent, e, t, null, n.getStartOffset(), n.getEndOffset(), this.updateDocumentAndCollapseSelection) | |
}, | |
onAlter: function(e, t, n) { | |
var r = this.props.selectionState.getEndOffset(), | |
i = e, | |
o = e + t.length; | |
s.replaceText(this.props.documentContent, n, d(this.props.documentContent, i), null, i, o, function() { | |
r !== i + n.length && (r += n.length - t.length), this.updateDocument(r, r) | |
}.bind(this)) | |
}, | |
onDropSelection: function(e) { | |
var t = this.props.selectionState; | |
s.moveText(this.props.documentContent, t.getStartOffset(), t.getEndOffset(), e, this.updateDocument) | |
}, | |
onDropText: function(e, t) { | |
this._insertTextAtOffset(e, t) | |
}, | |
onDropFiles: function(e, t) { | |
this.props.handleDroppedFiles && this.props.handleDroppedFiles(e, t) || h(t, function(t) { | |
t && this._insertTextAtOffset(e, t) | |
}.bind(this)) | |
}, | |
onPasteFiles: function(e) { | |
if (!this.props.handlePastedFiles || !this.props.handlePastedFiles(e)) { | |
var t = this.props.selectionState.getStartOffset(); | |
h(e, function(e) { | |
e && this._insertTextAtOffset(t, e) | |
}.bind(this)) | |
} | |
}, | |
_insertTextAtOffset: function(e, t) { | |
var n = this.props.documentContent; | |
s.replaceText(n, t, d(n, e), null, e, e, this.updateDocument) | |
} | |
}; | |
i.exports = g | |
}), __d("DocumentCommands", ["keyMirror"], function(e, t, n, r, i) { | |
var o = t("keyMirror"), | |
a = o({ | |
UNDO: !0, | |
REDO: !0, | |
DELETE: !0, | |
DELETE_WORD: !0, | |
DELETE_TO_END_OF_BLOCK: !0, | |
BACKSPACE: !0, | |
BACKSPACE_WORD: !0, | |
BACKSPACE_TO_END_OF_BLOCK: !0, | |
BOLD: !0, | |
ITALIC: !0, | |
UNDERLINE: !0, | |
CODE: !0, | |
INSERT_BLOCK_DELIMITER: !0, | |
TRANSPOSE_CHARACTERS: !0, | |
MOVE_SELECTION_TO_START_OF_BLOCK: !0, | |
MOVE_SELECTION_TO_END_OF_BLOCK: !0 | |
}); | |
i.exports = a | |
}), __d("DocumentModifier", ["ComposedBlockType", "ComposedEntityMutability", "DocumentCharacters", "DocumentEntity", "DocumentModifierDiffs", "DocumentRemovalDirection", "emptyFunction", "fillArray", "getCharacterRemovalRange"], function(e, t, n, r, i) { | |
function o() { | |
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]); | |
return Array.prototype.concat.apply(C, e) | |
} | |
function a(e, t) { | |
return null != t && (e = e.substr(0, t)), e.split(S).length | |
} | |
function s(e, t, n) { | |
t = t.filter(_.thatReturnsArgument), t.length && (e.addForwardTransaction(t), l(e, t, !0, n)) | |
} | |
function l(e, t, n, r) { | |
if (t.length) { | |
for (var i, o, a, s = e.getData(), l = 0; l < t.length; l++) n ? (i = t[l], o = i.from, a = i.to) : (i = t[t.length - 1 - l], o = i.to, a = i.from), u(s, o, a); | |
e.update(s.text, s.inlines, s.blocks, s.entities), r(a.start, a.end) | |
} | |
} | |
function u(e, t, n) { | |
var r = t.start, | |
i = t.end, | |
o = e.text.slice(0, r), | |
s = e.text.slice(i); | |
if (void 0 !== t.text && void 0 !== n.text && (e.text = o + n.text + s), void 0 !== t.inlines && void 0 !== n.inlines) { | |
var l = e.inlines.slice(0, r), | |
u = e.inlines.slice(i); | |
e.inlines = l.concat(n.inlines, u) | |
} | |
if (void 0 !== t.blocks && void 0 !== n.blocks) { | |
var c = a(o) - 1, | |
p = e.blocks.slice(0, c), | |
d = e.blocks.slice(c + t.blocks.length); | |
e.blocks = p.concat(n.blocks, d) | |
} | |
if (void 0 !== t.entities && void 0 !== n.entities) { | |
var h = e.entities.slice(0, r), | |
f = e.entities.slice(i); | |
e.entities = h.concat(n.entities, f) | |
} | |
} | |
function c(e, t, n, r) { | |
var i = v(e, t, n), | |
o = m.removeText(e, i.start, i.end); | |
s(e, [o], r) | |
} | |
var p = t("ComposedBlockType"), | |
d = t("ComposedEntityMutability"), | |
h = t("DocumentCharacters"), | |
f = t("DocumentEntity"), | |
m = t("DocumentModifierDiffs"), | |
g = t("DocumentRemovalDirection"), | |
_ = t("emptyFunction"), | |
y = t("fillArray"), | |
v = t("getCharacterRemovalRange"), | |
S = h.BLOCK_DELIMITER, | |
b = d.MUTABLE, | |
R = g.FORWARD, | |
w = g.BACKWARD, | |
C = [], | |
E = { | |
insertFragment: function(e, t, n, r, i) { | |
var a = t.entities, | |
l = !0, | |
u = e.getEntities(), | |
c = u[n - 1], | |
p = u[r]; | |
if (c && c === p) { | |
var d = f.get(c); | |
d.getMutability() === b && void 0 === a && (a = y(t.text.length, c), l = !1) | |
} | |
var h = null; | |
l && (h = m.removeEntities(e, n, r)); | |
var g = m.removeText(e, n, r), | |
_ = e.getBlockStylesAroundRange(n, n)[0], | |
v = m.insertText(e, n, t.text, t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment