Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Code loaded from https://static.xx.fbcdn.net - versions are reused across multiple sites
/**
* Code pulled from https://static.xx.fbcdn.net/rsrc.php/v3iSgH4/y6/l/en_US/Hd9DSuyOZWy.js
* Originally loaded from allenbwest.com
* Details in this post: https://funnymonkey.com/2017/adtech-and-misinformation-the-middlemen-who-sell-to-all-sides
*/
if (self.CavalryLogger) {
CavalryLogger.start_js(["Z3urS"]);
}
self.__DEV__ = self.__DEV__ || 0;
'use strict';
if (!Array.from) Array.from = function(a) {
if (a == null) throw new TypeError('Object is null or undefined');
var b = arguments[1],
c = arguments[2],
d = this,
e = Object(a),
f = typeof Symbol === 'function' ? typeof Symbol === 'function' ? Symbol.iterator : '@@iterator' : '@@iterator',
g = typeof b === 'function',
h = typeof e[f] === 'function',
i = 0,
j, k;
if (h) {
j = typeof d === 'function' ? new d() : [];
var l = e[f](),
m;
while (!(m = l.next()).done) {
k = m.value;
if (g) k = b.call(c, k, i);
j[i] = k;
i += 1;
}
j.length = i;
return j;
}
var n = e.length;
if (isNaN(n) || n < 0) n = 0;
j = typeof d === 'function' ? new d(n) : new Array(n);
while (i < n) {
k = e[i];
if (g) k = b.call(c, k, i);
j[i] = k;
i += 1;
}
j.length = i;
return j;
};
'use strict';
(function(a) {
function b(c, d) {
if (this == null) throw new TypeError('Array.prototype.findIndex called on null or undefined');
if (typeof c !== 'function') throw new TypeError('predicate must be a function');
var e = Object(this),
f = e.length >>> 0;
for (var g = 0; g < f; g++)
if (c.call(d, e[g], g, e)) return g;
return -1;
}
if (!Array.prototype.findIndex) Array.prototype.findIndex = b;
if (!Array.prototype.find) Array.prototype.find = function(c, d) {
if (this == null) throw new TypeError('Array.prototype.find called on null or undefined');
var e = b.call(this, c, d);
return e === -1 ? a : this[e];
};
if (!Array.prototype.fill) Array.prototype.fill = function(c) {
if (this == null) throw new TypeError('Array.prototype.fill called on null or undefined');
var d = Object(this),
e = d.length >>> 0,
f = arguments[1],
g = f >> 0,
h = g < 0 ? Math.max(e + g, 0) : Math.min(g, e),
i = arguments[2],
j = i === a ? e : i >> 0,
k = j < 0 ? Math.max(e + j, 0) : Math.min(j, e);
while (h < k) {
d[h] = c;
h++;
}
return d;
};
})();
(function() {
'use strict';
var a = Array.prototype.indexOf;
if (!Array.prototype.includes) Array.prototype.includes = function(e) {
'use strict';
if (e !== undefined && Array.isArray(this) && !Number.isNaN(e)) return a.apply(this, arguments) !== -1;
var f = Object(this),
g = f.length ? b(f.length) : 0;
if (g === 0) return false;
var h = arguments.length > 1 ? c(arguments[1]) : 0,
i = h < 0 ? Math.max(g + h, 0) : h,
j = Number.isNaN(e);
while (i < g) {
var k = f[i];
if (k === e || j && Number.isNaN(k)) return true;
i++;
}
return false;
};
function b(e) {
return Math.min(Math.max(c(e), 0), Number.MAX_SAFE_INTEGER);
}
function c(e) {
var f = Number(e);
return Number.isFinite(f) && f !== 0 ? d(f) * Math.floor(Math.abs(f)) : f;
}
function d(e) {
return e >= 0 ? 1 : -1;
}
})();
(function() {
var a = {},
b = function i(j, k) {
if (!j && !k) return null;
var l = {};
if (typeof j !== 'undefined') l.type = j;
if (typeof k !== 'undefined') l.signature = k;
return l;
},
c = function i(j, k) {
return b(j && /^[A-Z]/.test(j) ? j : undefined, k && (k.params && k.params.length || k.returns) ? 'function(' + (k.params ? k.params.map(function(l) {
return /\?/.test(l) ? '?' + l.replace('?', '') : l;
}).join(',') : '') + ')' + (k.returns ? ':' + k.returns : '') : undefined);
},
d = function i(j, k, l) {
return j;
},
e = function i(j, k, l) {
if ('sourcemeta' in __transform_includes) j.__SMmeta = k;
if ('typechecks' in __transform_includes) {
var m = c(k ? k.name : undefined, l);
if (m) __w(j, m);
}
return j;
},
f = function i(j, k, l) {
return l.apply(j, k);
},
g = function i(j, k, l, m) {
if (m && m.params) __t.apply(j, m.params);
var n = l.apply(j, k);
if (m && m.returns) __t([n, m.returns]);
return n;
},
h = function i(j, k, l, m, n) {
if (n) {
if (!n.callId) n.callId = n.module + ':' + (n.line || 0) + ':' + (n.column || 0);
var o = n.callId;
a[o] = (a[o] || 0) + 1;
}
return l.apply(j, k);
};
if (typeof __transform_includes === 'undefined') {
__annotator = d;
__bodyWrapper = f;
} else {
__annotator = e;
if ('codeusage' in __transform_includes) {
__annotator = d;
__bodyWrapper = h;
__bodyWrapper.getCodeUsage = function() {
return a;
};
__bodyWrapper.clearCodeUsage = function() {
a = {};
};
} else if ('typechecks' in __transform_includes) {
__bodyWrapper = g;
} else __bodyWrapper = f;
}
})();
__t = function(a) {
return a[0];
};
__w = function(a) {
return a;
};
(function() {
if (Object.assign) return;
var a = Object.prototype.hasOwnProperty,
b;
if (Object.keys && Object.keys.name !== 'object_keys_polyfill') {
b = function c(d, e) {
var f = Object.keys(e);
for (var g = 0; g < f.length; g++) d[f[g]] = e[f[g]];
};
} else b = function c(d, e) {
for (var f in e)
if (a.call(e, f)) d[f] = e[f];
};
Object.assign = function(c, d) {
if (c == null) throw new TypeError('Object.assign target cannot be null or undefined');
var e = Object(c);
for (var f = 1; f < arguments.length; f++) {
var g = arguments[f];
if (g != null) b(e, Object(g));
}
return e;
};
})();
(function(a, b) {
var c = 'keys',
d = 'values',
e = 'entries',
f = function() {
var l = h(Array),
m = void 0;
if (!l) m = function() {
function n(o, p) {
'use strict';
this.$ArrayIterator1 = o;
this.$ArrayIterator2 = p;
this.$ArrayIterator3 = 0;
}
n.prototype.next = function() {
'use strict';
if (this.$ArrayIterator1 == null) return {
value: b,
done: true
};
var o = this.$ArrayIterator1,
p = this.$ArrayIterator1.length,
q = this.$ArrayIterator3,
r = this.$ArrayIterator2;
if (q >= p) {
this.$ArrayIterator1 = b;
return {
value: b,
done: true
};
}
this.$ArrayIterator3 = q + 1;
if (r === c) {
return {
value: q,
done: false
};
} else if (r === d) {
return {
value: o[q],
done: false
};
} else if (r === e) return {
value: [q, o[q]],
done: false
};
};
n.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function() {
'use strict';
return this;
};
return n;
}();
return {
keys: l ? function(n) {
return n.keys();
} : function(n) {
return new m(n, c);
},
values: l ? function(n) {
return n.values();
} : function(n) {
return new m(n, d);
},
entries: l ? function(n) {
return n.entries();
} : function(n) {
return new m(n, e);
}
};
}(),
g = function() {
var l = h(String),
m = void 0;
if (!l) m = function() {
function n(o) {
'use strict';
this.$StringIterator1 = o;
this.$StringIterator2 = 0;
}
n.prototype.next = function() {
'use strict';
if (this.$StringIterator1 == null) return {
value: b,
done: true
};
var o = this.$StringIterator2,
p = this.$StringIterator1,
q = p.length;
if (o >= q) {
this.$StringIterator1 = b;
return {
value: b,
done: true
};
}
var r = void 0,
s = p.charCodeAt(o);
if (s < 55296 || s > 56319 || o + 1 === q) {
r = p[o];
} else {
var t = p.charCodeAt(o + 1);
if (t < 56320 || t > 57343) {
r = p[o];
} else r = p[o] + p[o + 1];
}
this.$StringIterator2 = o + r.length;
return {
value: r,
done: false
};
};
n.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function() {
'use strict';
return this;
};
return n;
}();
return {
keys: function n() {
throw TypeError('Strings default iterator doesn\'t implement keys.');
},
values: l ? function(n) {
return n[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();
} : function(n) {
return new m(n);
},
entries: function n() {
throw TypeError('Strings default iterator doesn\'t implement entries.');
}
};
}();
function h(l) {
return typeof l.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] === 'function' && typeof l.prototype.values === 'function' && typeof l.prototype.keys === 'function' && typeof l.prototype.entries === 'function';
}
function i(l, m) {
'use strict';
this.$ObjectIterator1 = l;
this.$ObjectIterator2 = m;
this.$ObjectIterator3 = Object.keys(l);
this.$ObjectIterator4 = 0;
}
i.prototype.next = function() {
'use strict';
var l = this.$ObjectIterator3.length,
m = this.$ObjectIterator4,
n = this.$ObjectIterator2,
o = this.$ObjectIterator3[m];
if (m >= l) {
this.$ObjectIterator1 = b;
return {
value: b,
done: true
};
}
this.$ObjectIterator4 = m + 1;
if (n === c) {
return {
value: o,
done: false
};
} else if (n === d) {
return {
value: this.$ObjectIterator1[o],
done: false
};
} else if (n === e) return {
value: [o, this.$ObjectIterator1[o]],
done: false
};
};
i.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function() {
'use strict';
return this;
};
var j = {
keys: function l(m) {
return new i(m, c);
},
values: function l(m) {
return new i(m, d);
},
entries: function l(m) {
return new i(m, e);
}
};
function k(l, m) {
if (typeof l === 'string') {
return g[m || d](l);
} else if (Array.isArray(l)) {
return f[m || d](l);
} else if (l[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']) {
return l[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();
} else return j[m || e](l);
}
Object.assign(k, {
KIND_KEYS: c,
KIND_VALUES: d,
KIND_ENTRIES: e,
keys: function l(m) {
return k(m, c);
},
values: function l(m) {
return k(m, d);
},
entries: function l(m) {
return k(m, e);
},
generic: j.entries
});
a.FB_enumerate = k;
})(typeof global === 'undefined' ? this : global);
(function(a, b) {
var c = a.window || a;
function d() {
return 'f' + (Math.random() * (1 << 30)).toString(16).replace('.', '');
}
function e(j) {
var k = j ? j.ownerDocument || j : document,
l = k.defaultView || c;
return !!(j && (typeof l.Node === 'function' ? j instanceof l.Node : typeof j === 'object' && typeof j.nodeType === 'number' && typeof j.nodeName === 'string'));
}
function f(j) {
var k = c[j];
if (k == null) return true;
if (typeof c.Symbol !== 'function') return true;
var l = k.prototype;
return k == null || typeof k !== 'function' || typeof l.clear !== 'function' || new k().size !== 0 || typeof l.keys !== 'function' || typeof l['for' + 'Each'] !== 'function';
}
var g = a.FB_enumerate,
h = function() {
if (!f('Map')) return c.Map;
var j = 'key',
k = 'value',
l = 'key+value',
m = '$map_',
n = void 0,
o = 'IE_HASH_';
function p(ba) {
'use strict';
if (!u(this)) throw new TypeError('Wrong map object type.');
t(this);
if (ba != null) {
var ca = g(ba),
da = void 0;
while (!(da = ca.next()).done) {
if (!u(da.value)) throw new TypeError('Expected iterable items to be pair objects.');
this.set(da.value[0], da.value[1]);
}
}
}
p.prototype.clear = function() {
'use strict';
t(this);
};
p.prototype.has = function(ba) {
'use strict';
var ca = r(this, ba);
return !!(ca != null && this._mapData[ca]);
};
p.prototype.set = function(ba, ca) {
'use strict';
var da = r(this, ba);
if (da != null && this._mapData[da]) {
this._mapData[da][1] = ca;
} else {
da = this._mapData.push([ba, ca]) - 1;
s(this, ba, da);
this.size += 1;
}
return this;
};
p.prototype.get = function(ba) {
'use strict';
var ca = r(this, ba);
if (ca == null) {
return b;
} else return this._mapData[ca][1];
};
p.prototype['delete'] = function(ba) {
'use strict';
var ca = r(this, ba);
if (ca != null && this._mapData[ca]) {
s(this, ba, b);
this._mapData[ca] = b;
this.size -= 1;
return true;
} else return false;
};
p.prototype.entries = function() {
'use strict';
return new q(this, l);
};
p.prototype.keys = function() {
'use strict';
return new q(this, j);
};
p.prototype.values = function() {
'use strict';
return new q(this, k);
};
p.prototype.forEach = function(ba, ca) {
'use strict';
if (typeof ba !== 'function') throw new TypeError('Callback must be callable.');
var da = ba.bind(ca || b),
ea = this._mapData;
for (var fa = 0; fa < ea.length; fa++) {
var ga = ea[fa];
if (ga != null) da(ga[1], ga[0], this);
}
};
p.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function() {
'use strict';
return this.entries();
};
function q(ba, ca) {
'use strict';
if (!(u(ba) && ba._mapData)) throw new TypeError('Object is not a map.');
if ([j, l, k].indexOf(ca) === -1) throw new Error('Invalid iteration kind.');
this._map = ba;
this._nextIndex = 0;
this._kind = ca;
}
q.prototype.next = function() {
'use strict';
if (!this instanceof p) throw new TypeError('Expected to be called on a MapIterator.');
var ba = this._map,
ca = this._nextIndex,
da = this._kind;
if (ba == null) return v(b, true);
var ea = ba._mapData;
while (ca < ea.length) {
var fa = ea[ca];
ca += 1;
this._nextIndex = ca;
if (fa)
if (da === j) {
return v(fa[0], false);
} else if (da === k) {
return v(fa[1], false);
} else if (da) return v(fa, false);
}
this._map = b;
return v(b, true);
};
q.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function() {
'use strict';
return this;
};
function r(ba, ca) {
if (u(ca)) {
var da = z(ca);
return da ? ba._objectIndex[da] : b;
} else {
var ea = m + ca;
if (typeof ca === 'string') {
return ba._stringIndex[ea];
} else return ba._otherIndex[ea];
}
}
function s(ba, ca, da) {
var ea = da == null;
if (u(ca)) {
var fa = z(ca);
if (!fa) fa = aa(ca);
if (ea) {
delete ba._objectIndex[fa];
} else ba._objectIndex[fa] = da;
} else {
var ga = m + ca;
if (typeof ca === 'string') {
if (ea) {
delete ba._stringIndex[ga];
} else ba._stringIndex[ga] = da;
} else if (ea) {
delete ba._otherIndex[ga];
} else ba._otherIndex[ga] = da;
}
}
function t(ba) {
ba._mapData = [];
ba._objectIndex = {};
ba._stringIndex = {};
ba._otherIndex = {};
ba.size = 0;
}
function u(ba) {
return ba != null && (typeof ba === 'object' || typeof ba === 'function');
}
function v(ba, ca) {
return {
value: ba,
done: ca
};
}
p.__isES5 = function() {
try {
Object.defineProperty({}, '__.$#x', {});
return true;
} catch (ba) {
return false;
}
}();
function w(ba) {
if (!p.__isES5 || !Object.isExtensible) {
return true;
} else return Object.isExtensible(ba);
}
function x(ba) {
var ca = void 0;
switch (ba.nodeType) {
case 1:
ca = ba.uniqueID;
break;
case 9:
ca = ba.documentElement.uniqueID;
break;
default:
return null;
}
if (ca) {
return o + ca;
} else return null;
}
var y = d();
function z(ba) {
if (ba[y]) {
return ba[y];
} else if (!p.__isES5 && ba.propertyIsEnumerable && ba.propertyIsEnumerable[y]) {
return ba.propertyIsEnumerable[y];
} else if (!p.__isES5 && e(ba) && x(ba)) {
return x(ba);
} else if (!p.__isES5 && ba[y]) return ba[y];
}
var aa = function() {
var ba = Object.prototype.propertyIsEnumerable,
ca = 0;
return function da(ea) {
if (w(ea)) {
ca += 1;
if (p.__isES5) {
Object.defineProperty(ea, y, {
enumerable: false,
writable: false,
configurable: false,
value: ca
});
} else if (ea.propertyIsEnumerable) {
ea.propertyIsEnumerable = function() {
return ba.apply(this, arguments);
};
ea.propertyIsEnumerable[y] = ca;
} else if (e(ea)) {
ea[y] = ca;
} else throw new Error('Unable to set a non-enumerable property on object.');
return ca;
} else throw new Error('Non-extensible objects are not allowed as keys.');
};
}();
return __annotator(p, {
name: 'Map'
});
}(),
i = function() {
if (!f('Set')) return c.Set;
function j(l) {
'use strict';
if (this == null || typeof this !== 'object' && typeof this !== 'function') throw new TypeError('Wrong set object type.');
k(this);
if (l != null) {
var m = g(l),
n = void 0;
while (!(n = m.next()).done) this.add(n.value);
}
}
j.prototype.add = function(l) {
'use strict';
this._map.set(l, l);
this.size = this._map.size;
return this;
};
j.prototype.clear = function() {
'use strict';
k(this);
};
j.prototype['delete'] = function(l) {
'use strict';
var m = this._map['delete'](l);
this.size = this._map.size;
return m;
};
j.prototype.entries = function() {
'use strict';
return this._map.entries();
};
j.prototype.forEach = function(l) {
'use strict';
var m = arguments[1],
n = this._map.keys(),
o = void 0;
while (!(o = n.next()).done) l.call(m, o.value, o.value, this);
};
j.prototype.has = function(l) {
'use strict';
return this._map.has(l);
};
j.prototype.values = function() {
'use strict';
return this._map.values();
};
j.prototype.keys = function() {
'use strict';
return this.values();
};
j.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function() {
'use strict';
return this.values();
};
function k(l) {
l._map = new h();
l.size = l._map.size;
}
return __annotator(j, {
name: 'Set'
});
}();
a.Map = h;
a.Set = i;
})(typeof global === 'undefined' ? this : global);
if (typeof window !== 'undefined' && window.JSON && JSON.stringify(['\u2028\u2029']) === '["\u2028\u2029"]') JSON.stringify = function(a) {
var b = /\u2028/g,
c = /\u2029/g;
return function d(e, f, g) {
var h = a.call(this, e, f, g);
if (h) {
if (-1 < h.indexOf('\u2028')) h = h.replace(b, '\\u2028');
if (-1 < h.indexOf('\u2029')) h = h.replace(c, '\\u2029');
}
return h;
};
}(JSON.stringify);
(function() {
var a = Object.prototype.hasOwnProperty;
if (typeof Object.entries !== 'function') Object.entries = function(b) {
if (b == null) throw new TypeError('Object.entries called on non-object');
var c = [];
for (var d in b)
if (a.call(b, d)) c.push([d, b[d]]);
return c;
};
if (typeof Object.values !== 'function') Object.values = function(b) {
if (b == null) throw new TypeError('Object.values called on non-object');
var c = [];
for (var d in b)
if (a.call(b, d)) c.push(b[d]);
return c;
};
})();
(function(a) {
a.__m = function(b, c) {
b.__SMmeta = c;
return b;
};
})(this);
if (typeof String.fromCodePoint !== 'function') String.fromCodePoint = function() {
var a = [];
for (var b = arguments.length, c = Array(b), d = 0; d < b; d++) c[d] = arguments[d];
for (var e = 0; e < c.length; e++) {
var f = Number(c[e]);
if (!isFinite(f) || Math.floor(f) != f || f < 0 || 1114111 < f) throw RangeError('Invalid code point ' + f);
if (f < 65536) {
a.push(String.fromCharCode(f));
} else {
f -= 65536;
a.push(String.fromCharCode((f >> 10) + 55296), String.fromCharCode(f % 1024 + 56320));
}
}
return a.join('');
};
if (!String.prototype.startsWith) String.prototype.startsWith = function(a) {
"use strict";
if (this == null) throw TypeError();
var b = String(this),
c = arguments.length > 1 ? Number(arguments[1]) || 0 : 0,
d = Math.min(Math.max(c, 0), b.length);
return b.indexOf(String(a), c) == d;
};
if (!String.prototype.endsWith) String.prototype.endsWith = function(a) {
"use strict";
if (this == null) throw TypeError();
var b = String(this),
c = b.length,
d = String(a),
e = arguments.length > 1 ? Number(arguments[1]) || 0 : c,
f = Math.min(Math.max(e, 0), c),
g = f - d.length;
if (g < 0) return false;
return b.lastIndexOf(d, g) == g;
};
if (!String.prototype.includes) String.prototype.includes = function(a) {
"use strict";
if (this == null) throw TypeError();
var b = String(this),
c = arguments.length > 1 ? Number(arguments[1]) || 0 : 0;
return b.indexOf(String(a), c) != -1;
};
if (!String.prototype.repeat) String.prototype.repeat = function(a) {
"use strict";
if (this == null) throw TypeError();
var b = String(this);
a = Number(a) || 0;
if (a < 0 || a === Infinity) throw RangeError();
if (a === 1) return b;
var c = '';
while (a) {
if (a & 1) c += b;
if (a >>= 1) b += b;
}
return c;
};
if (!String.prototype.codePointAt) String.prototype.codePointAt = function(a) {
'use strict';
if (this == null) throw TypeError('Invalid context: ' + this);
var b = String(this),
c = b.length;
a = Number(a) || 0;
if (a < 0 || c <= a) return undefined;
var d = b.charCodeAt(a);
if (55296 <= d && d <= 56319 && c > a + 1) {
var e = b.charCodeAt(a + 1);
if (56320 <= e && e <= 57343) return (d - 55296) * 1024 + e - 56320 + 65536;
}
return d;
};
if (!String.prototype.contains) String.prototype.contains = String.prototype.includes;
if (!String.prototype.trimLeft) String.prototype.trimLeft = function() {
return this.replace(/^\s+/, '');
};
if (!String.prototype.trimRight) String.prototype.trimRight = function() {
return this.replace(/\s+$/, '');
};
(function(a) {
var b = a.babelHelpers = {},
c = Object.prototype.hasOwnProperty;
b.inherits = function(d, e) {
Object.assign(d, e);
d.prototype = Object.create(e && e.prototype);
d.prototype.constructor = d;
d.__superConstructor__ = e;
return e;
};
b._extends = Object.assign;
b['extends'] = b._extends;
b.objectWithoutProperties = function(d, e) {
var f = {};
for (var g in d) {
if (!c.call(d, g) || e.indexOf(g) >= 0) continue;
f[g] = d[g];
}
return f;
};
b.taggedTemplateLiteralLoose = function(d, e) {
d.raw = e;
return d;
};
b.bind = Function.prototype.bind;
})(typeof global === 'undefined' ? self : global);
(function(a) {
var b = a.performance;
if (b && b.setResourceTimingBufferSize) {
b.setResourceTimingBufferSize(100000);
b.setResourceTimingBufferSize = function() {};
}
})(this);
(function a(b) {
if (b.require) return;
var c = {},
d = {},
e = {},
f = {},
g = 0,
h = 1,
i = 2,
j = 4,
k = {},
l = Object.prototype.hasOwnProperty,
m = Object.prototype.toString;
function n(ta) {
var ua = Array.prototype.slice.call(ta),
va = {},
wa, xa, ya, za;
while (ua.length) {
xa = ua.shift();
if (va[xa]) continue;
va[xa] = true;
ya = c[xa];
if (!ya || !ya.waiting) continue;
for (wa = 0; wa < ya.dependencies.length; wa++) {
za = ya.dependencies[wa];
if (!c[za] || c[za].waiting) ua.push(za);
}
}
for (xa in va)
if (l.call(va, xa)) ua.push(xa);
var ab = [];
for (wa = 0; wa < ua.length; wa++) {
xa = ua[wa];
var bb = xa;
ya = c[xa];
if (!ya) {
bb += ' is not defined';
} else if (!ya.waiting) {
bb += ' is ready';
} else {
var cb = [];
for (var db = 0; db < ya.dependencies.length; db++) {
za = ya.dependencies[db];
if (!c[za] || c[za].waiting) cb.push(za);
}
bb += ' is waiting for ' + cb.join(', ');
}
ab.push(bb);
}
return ab.join('\n');
}
function o(ta) {
this.name = 'ModuleError';
this.message = ta;
this.stack = Error(ta).stack;
this.framesToPop = 2;
}
o.prototype = Object.create(Error.prototype);
o.prototype.constructor = o;
var p = (b.Env || {}).profile_require_factories,
q = b.performance || b.msPerformance || b.webkitPerformance || {},
r;
if (q.now && q.timing && q.timing.navigationStart) {
var s = q.timing.navigationStart;
r = function ta() {
return q.now() + s;
};
} else r = function ta() {
return Date.now();
};
var t = 0,
u = 0;
function v(ta) {
u++;
var ua = c[ta];
if (ua && ua.exports != null) {
if (ua.refcount-- === 1) c[ta] = void 0;
return ua.exports;
}
return x(ta);
}
function w(ta) {
var ua = c[ta],
va = d[ta];
if (ua.factoryLength === -1) {
var wa = p && b.ProfilingCounters,
xa, ya;
if (wa) xa = wa.startTiming('FACTORY_COMPILE_TIME');
ua.factoryLength = ua.factory.length;
if (xa != null) {
ya = wa.stopTiming(xa);
va.compileTime += ya;
}
}
return ua.factoryLength;
}
function x(ta) {
if (b.ErrorUtils && !b.ErrorUtils.inGuard()) return b.ErrorUtils.applyWithGuard(x, null, [ta]);
var ua = c[ta];
if (!ua) {
var va = 'Requiring unknown module "' + ta + '"';
throw new o(va);
}
if (ua.hasError) throw new o('Requiring module "' + ta + '" which threw an exception');
if (ua.waiting) throw new o('Requiring module "' + ta + '" with unresolved dependencies: ' + n([ta]));
var wa = ua.exports = {},
xa = ua.factory;
if (m.call(xa) === '[object Function]') {
var ya = ua.dependencies,
za = ya.length,
ab;
try {
try {
la(ua);
} catch (bb) {
y(bb, ta);
}
var cb = [],
db = za;
if (ua.special & i) {
var eb = w(ta);
db = Math.min(za, eb);
}
for (var fb = 0; fb < za; fb++) {
var gb = ya[fb];
if (cb.length < db) cb.push(gb === 'module' ? ua : gb === 'exports' ? wa : v.call(null, gb));
}++t;
var hb = p && b.ProfilingCounters,
ib;
if (hb) {
hb.incrementCounter('FACTORY_COUNT', 1);
ib = hb.startTiming('FACTORY_EXEC_TIME');
}
try {
ab = xa.apply(ua.context || b, cb);
} catch (bb) {
y(bb, ta);
} finally {
if (p) {
var jb = r(),
kb = 0;
if (ib != null) kb = hb.stopTiming(ib);
var lb = d[ua.id];
lb.factoryTime = kb;
lb.factoryEnd = jb;
if (xa.__SMmeta)
for (var mb in xa.__SMmeta)
if (xa.__SMmeta.hasOwnProperty(mb)) lb[mb] = xa.__SMmeta[mb];
}
}
} catch (bb) {
ua.hasError = true;
ua.exports = null;
throw bb;
}
if (ab) ua.exports = ab;
if (typeof ua.exports === 'function') {
var nb = ua.exports,
ob = nb.__superConstructor__;
if (!nb.displayName || ob && ob.displayName === nb.displayName) nb.displayName = (nb.name || '(anonymous)') + ' [from ' + ta + ']';
}
ua.factoryFinished = true;
} else ua.exports = xa;
var pb = '__isRequired__' + ta;
if (e[pb]) ea(pb, k);
if (ua.refcount-- === 1) c[ta] = void 0;
return ua.exports;
}
function y(ta, ua) {
if (!(ta instanceof Error)) ta = new Error(ta);
if (c.ex && c.erx) {
var va = v.call(null, 'ex'),
wa = v.call(null, 'erx'),
xa = wa(ta.message);
if (xa[0].indexOf(' from module "%s"') < 0) {
xa[0] += ' from module "%s"';
xa[xa.length] = ua;
}
ta.message = va.apply(null, xa);
}
throw ta;
}
function z() {
var ta = 0;
for (var ua in d)
if (d.hasOwnProperty(ua)) ta += d[ua].factoryTime;
return ta;
}
function aa() {
var ta = 0;
for (var ua in d)
if (d.hasOwnProperty(ua)) ta += d[ua].compileTime;
return ta;
}
function ba() {
return t;
}
function ca() {
return u;
}
function da() {
var ta = {};
for (var ua in d)
if (d.hasOwnProperty(ua)) ta[ua] = d[ua];
return ta;
}
function ea(ta, ua, va, wa, xa, ya, za) {
if (ua === undefined) {
ua = [];
va = ta;
ta = ia();
} else if (va === undefined) {
va = ua;
if (m.call(ta) === '[object Array]') {
ua = ta;
ta = ia(ua.join(','));
} else ua = [];
}
var ab = {
cancel: ga.bind(this, ta)
},
bb = c[ta];
if (bb) {
if (ya) bb.refcount += ya;
return ab;
} else if (!ua && !va && ya) {
f[ta] = (f[ta] || 0) + ya;
return ab;
}
var cb = (f[ta] || 0) + (ya || 0);
delete f[ta];
bb = new fa(ta, cb, null, va, ua, xa, wa);
c[ta] = bb;
d[ta] = {
id: ta,
dependencies: ua,
meta: za,
category: wa,
defined: p ? r() : null,
compileTime: null,
factoryTime: null,
factoryEnd: null
};
ka(ta);
return ab;
}
function fa(ta, ua, va, wa, xa, ya, za) {
this.id = ta;
this.refcount = ua;
this.exports = va || null;
this.factory = wa;
this.factoryLength = -1;
this.factoryFinished = false;
this.dependencies = xa;
this.context = ya;
this.special = za || 0;
this.waitingMap = {};
this.waiting = 0;
this.hasError = false;
this.ranRecursiveSideEffects = false;
this.sideEffectDependencyException = null;
}
function ga(ta) {
if (!c[ta]) return;
var ua = c[ta];
c[ta] = void 0;
for (var va in ua.waitingMap)
if (ua.waitingMap[va]) delete e[va][ta];
for (var wa = 0; wa < ua.dependencies.length; wa++) {
va = ua.dependencies[wa];
if (c[va]) {
if (c[va].refcount-- === 1) ga(va);
} else if (f[va]) f[va]--;
}
}
function ha(ta, ua, va) {
return ea('__requireLazy__' + (ta.length > 0 ? ta.join(',') + '__' : '') + g++, ta, sa()(ua, 'requireLazy'), h, va, 1);
}
function ia(ta) {
return '__mod__' + (ta ? ta + '__' : '') + g++;
}
function ja(ta, ua) {
if (!ta.waitingMap[ua] && ta.id !== ua) {
ta.waiting++;
ta.waitingMap[ua] = 1;
e[ua] || (e[ua] = {});
e[ua][ta.id] = 1;
}
}
function ka(ta) {
var ua = [],
va = c[ta],
wa, xa, ya;
for (xa = 0; xa < va.dependencies.length; xa++) {
wa = va.dependencies[xa];
if (!c[wa]) {
ja(va, wa);
} else if (c[wa].waiting)
for (ya in c[wa].waitingMap)
if (c[wa].waitingMap[ya]) ja(va, ya);
}
if (va.waiting === 0 && va.special & h) ua.push(ta);
if (e[ta]) {
var za = e[ta],
ab;
e[ta] = undefined;
for (wa in za) {
ab = c[wa];
for (ya in va.waitingMap)
if (va.waitingMap[ya]) ja(ab, ya);
if (ab.waitingMap[ta]) {
ab.waitingMap[ta] = 0;
ab.waiting--;
}
if (ab.waiting === 0 && ab.special & h) ua.push(wa);
}
}
for (xa = 0; xa < ua.length; xa++) v.call(null, ua[xa]);
}
function la(ta) {
if (ta.sideEffectDependencyException) throw ta.sideEffectDependencyException;
if (ta.ranRecursiveSideEffects) return;
ta.ranRecursiveSideEffects = true;
var ua = ta.dependencies;
if (ua)
for (var va = 0; va < ua.length; va++) {
var wa = ua[va],
xa = c[wa];
try {
la(xa);
} catch (ya) {
ta.sideEffectDependencyException = ya;
throw ya;
}
if (xa.special & j) try {
v.call(null, wa);
} catch (ya) {
ta.sideEffectDependencyException = ya;
throw ya;
}
}
}
function ma(ta, ua) {
c[ta] = new fa(ta, 0, ua);
d[ta] = {
id: ta,
dependencies: [],
category: 0,
compileTime: null,
factoryLengthAccessTime: null,
factoryTime: null,
factoryEnd: null
};
}
ma('module', 0);
ma('exports', 0);
ma('define', ea);
ma('global', b);
ma('require', v);
ma('requireDynamic', na);
ma('requireLazy', ha);
ma('requireWeak', oa);
ma('ifRequired', pa);
ea.amd = {};
b.define = ea;
b.require = v;
b.requireDynamic = na;
b.requireLazy = ha;
function na(ta, ua) {
throw new ReferenceError('requireDynamic is not defined');
}
function oa(ta, ua) {
pa.call(null, ta, function(va) {
ua(va);
}, function() {
ea('__requireWeak__' + ta + '__' + g++, ['__isRequired__' + ta], sa()(function() {
ua(c[ta].exports);
}, 'requireWeak'), h, null, 1);
});
}
function pa(ta, ua, va) {
var wa = c[ta];
if (wa && wa.factoryFinished) {
if (typeof ua === 'function') return ua(wa.exports);
} else if (typeof va === 'function') return va();
}
var qa = {
getModules: function ta() {
var ua = {};
for (var va in c)
if (c[va] && c.hasOwnProperty(va)) ua[va] = c[va];
return ua;
},
modulesMap: c,
deps: e,
printDependencyInfo: function ta() {
if (!b.console) return;
var ua = Object.keys(qa.deps);
b.console.log(n(ua));
},
debugUnresolvedDependencies: n
};
function ra(ta) {
return ta;
}
function sa() {
return b.TimeSlice && b.TimeSlice.guard || ra;
}
ma('__getFactoryTime', z);
ma('__getCompileTime', aa);
ma('__getTotalFactories', ba);
ma('__getTotalRequireCalls', ca);
ma('__getModuleTimeDetails', da);
ma('__debug', qa);
b.__d = function(ta, ua, va, wa) {
var xa = ['global', 'require', 'requireDynamic', 'requireLazy', 'module', 'exports'];
sa()(function ya() {
ea(ta, xa.concat(ua), va, wa || i, null, null);
}, 'define ' + ta, {
root: true
})();
};
})(this);
__d("Env", [], (function a(b, c, d, e, f, g) {
var h = {
start: Date.now(),
nocatch: b.FB_GKS && b.FB_GKS.js_nocatch
};
if (b.Env) Object.assign(h, b.Env);
b.Env = h;
f.exports = h;
}), null);
__d('eprintf', [], (function a(b, c, d, e, f, g) {
function h(i) {
for (var j = arguments.length, k = Array(j > 1 ? j - 1 : 0), l = 1; l < j; l++) k[l - 1] = arguments[l];
var m = k.map(function(p) {
return String(p);
}),
n = i.split('%s').length - 1;
if (n !== m.length) return h('eprintf args number mismatch: %s', JSON.stringify([i].concat(m)));
var o = 0;
return i.replace(/%s/g, function() {
return String(m[o++]);
});
}
f.exports = h;
}), null);
__d('ex', ['eprintf'], (function a(b, c, d, e, f, g) {
function h(i) {
for (var j = arguments.length, k = Array(j > 1 ? j - 1 : 0), l = 1; l < j; l++) k[l - 1] = arguments[l];
var m = k.map(function(o) {
return String(o);
}),
n = i.split('%s').length - 1;
if (n !== m.length) return h('ex args number mismatch: %s', JSON.stringify([i].concat(m)));
return h._prefix + JSON.stringify([i].concat(m)) + h._suffix;
}
h._prefix = '<![EX[';
h._suffix = ']]>';
f.exports = h;
}), null);
__d('erx', ['ex'], (function a(b, c, d, e, f, g) {
function h(i) {
if (typeof i !== 'string') return i;
var j = i.indexOf(c('ex')._prefix),
k = i.lastIndexOf(c('ex')._suffix);
if (j < 0 || k < 0) return [i];
var l = j + c('ex')._prefix.length,
m = k + c('ex')._suffix.length;
if (l >= k) return ['erx slice failure: %s', i];
var n = i.substring(0, j),
o = i.substring(m);
i = i.substring(l, k);
try {
var q = JSON.parse(i);
q[0] = n + q[0] + o;
return q;
} catch (p) {
return ['erx parse failure: %s', i];
}
}
f.exports = h;
}), null);
__d("removeFromArray", [], (function a(b, c, d, e, f, g) {
function h(i, j) {
var k = i.indexOf(j);
if (k !== -1) i.splice(k, 1);
}
f.exports = h;
}), null);
__d('ErrorUtils', ['Env', 'eprintf', 'erx', 'removeFromArray'], (function a(b, c, d, e, f, g) {
var h = '<anonymous guard>',
i = '<generated guard>',
j = typeof window === 'undefined' ? '<self.onerror>' : '<window.onerror>',
k = /^https?:\/\//i,
l = /^Type Mismatch for/,
m = /(.*)[@\s][^\s]+$/,
n = [],
o = void 0,
p = [],
q = 50,
r = [],
s = false,
t = false,
u = location.search.indexOf('nocatch') !== -1,
v = ['Unknown script code', 'Function code', 'eval code'];
if (c('Env').long_stack_traces && Error.stackTraceLimit != null) Error.stackTraceLimit = 100;
function w(ha) {
var ia = ha.columnNumber || ha.column;
return ia != null ? String(ia) : '';
}
function x(ha) {
return ha[0] && ha[0].column || '';
}
function y(ha) {
for (var ia = 0; ia < v.length; ia++) {
var ja = ' ' + v[ia];
if (ha.endsWith(ja)) return [ha, ha.substring(0, ha.length - ja.length)];
}
return null;
}
function z(ha) {
var ia = ha.lineNumber || ha.line;
return ia != null ? String(ia) : '';
}
function aa(ha) {
return ha[0] && ha[0].line || '';
}
function ba(ha) {
var ia = ha.fileName || ha.sourceURL;
return ia != null ? String(ia) : '';
}
function ca(ha) {
return ha[0] && ha[0].script || '';
}
function da(ha) {
if (!ha) return [];
return ha.split(/\n\n/)[0].replace(/[\(\)]|\[.*?\]|^[\w \.]+:\s.*?\n/g, '').split('\n').map(function(ia) {
ia = ia.trim();
var ja = void 0,
ka = void 0,
la = ia.match(/:(\d+)(?::(\d+))?$/);
if (la) {
ja = la[1];
ka = la[2];
ia = ia.slice(0, -la[0].length);
}
var ma = void 0,
na = y(ia) || ia.match(m);
if (na) {
ia = ia.substring(na[1].length + 1);
var oa = na[1].match(/(?:at)?\s*(.*)(?:[^\s]+|$)/);
ma = oa ? oa[1] : '';
}
if (ia.includes('charset=utf-8;base64,')) ia = '<inlined-file>';
var pa = {
column: ka,
identifier: ma,
line: ja,
script: ia
};
if (o) o(pa);
var qa = ' at' + (pa.identifier ? ' ' + pa.identifier + ' (' : ' ') + pa.script + (pa.line ? ':' + pa.line : '') + (pa.column ? ':' + pa.column : '') + (pa.identifier ? ')' : '');
return babelHelpers['extends']({}, pa, {
text: qa
});
});
}
function ea(ha) {
r.unshift(ha);
s = true;
}
function fa() {
r.shift();
s = r.length !== 0;
}
var ga = {
ANONYMOUS_GUARD_TAG: h,
GENERATED_GUARD_TAG: i,
GLOBAL_ERROR_HANDLER_TAG: j,
history: p,
addListener: function ha(ia) {
var ja = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
n.push(ia);
if (!ja) p.forEach(ia);
},
removeListener: function ha(ia) {
c('removeFromArray')(n, ia);
},
setSourceResolver: function ha(ia) {
o = ia;
},
applyWithGuard: function ha(ia, ja, ka, la, ma) {
ea(ma || h);
if (c('Env').nocatch) u = true;
if (u) {
var na = void 0;
try {
na = ia.apply(ja, ka || []);
} finally {
fa();
}
return na;
}
try {
return ia.apply(ja, ka || []);
} catch (oa) {
var pa = ga.normalizeError(oa);
if (la) la(pa);
if (ia) pa.callee = ia.toString().substring(0, 100);
if (ka) pa.args = Array.from(ka).toString().substring(0, 100);
pa.guard = r[0];
pa.guardList = r.slice();
ga.reportError(pa);
} finally {
fa();
}
},
guard: function ha(ia, ja, ka) {
ja = ja || ia.name || i;
function la() {
return ga.applyWithGuard(ia, ka || this, arguments, null, ja);
}
if (ia.__SMmeta) la.__SMmeta = ia.__SMmeta;
return la;
},
inGuard: function ha() {
return s;
},
normalizeError: function ha(ia) {
if (ia._originalError) return ia;
var ja = da(ia.stackTrace || ia.stack),
ka = false;
if (ia.framesToPop) {
var la = ia.framesToPop,
ma = void 0;
while (la > 0 && ja.length > 0) {
ma = ja.shift();
la--;
ka = true;
}
if (l.test(ia.message) && ia.framesToPop === 2 && ma)
if (k.test(ma.script)) ia.message += ' at ' + ma.script + (ma.line ? ':' + ma.line : '') + (ma.column ? ':' + ma.column : '');
}
var na = {
_originalError: ia,
column: ka ? x(ja) : w(ia) || x(ja),
extra: ia.extra,
guard: ia.guard,
guardList: ia.guardList,
line: ka ? aa(ja) : z(ia) || aa(ja),
message: ia.message,
messageWithParams: ia.messageWithParams,
name: ia.name,
script: ka ? ca(ja) : ba(ia) || ca(ja),
snapshot: ia.snapshot,
stack: ja.map(function(pa) {
return pa.text;
}).join('\n'),
stackFrames: ja,
type: ia.type
};
if (typeof na.message === 'string') {
na.messageWithParams = na.messageWithParams || c('erx')(na.message);
} else {
na.messageObject = na.message;
na.message = String(na.message) + ' (' + typeof na.message + ')';
}
if (na.messageWithParams) na.message = c('eprintf').apply(undefined, na.messageWithParams);
if (typeof window !== 'undefined' && window && window.location) na.windowLocationURL = window.location.href;
if (o) o(na);
for (var oa in na)
if (na[oa] == null) delete na[oa];
return na;
},
onerror: function ha(ia, ja, ka, la, ma) {
ma = ma || {};
ma.message = ma.message || ia;
ma.script = ma.script || ja;
ma.line = ma.line || ka;
ma.column = ma.column || la;
ma.guard = j;
ma.guardList = [j];
ga.reportError(ma, true);
},
reportError: function ha(ia) {
var ja = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
if (t) return false;
if (r.length > 0) {
ia.guard = ia.guard || r[0];
ia.guardList = r.slice();
}
var ka = ga.normalizeError(ia);
!ja;
if (p.length > q) p.splice(q / 2, 1);
p.push(ka);
t = true;
for (var la = 0; la < n.length; la++) try {
n[la](ka);
} catch (ma) {}
t = false;
return true;
}
};
b.onerror = ga.onerror;
f.exports = b.ErrorUtils = ga;
if (typeof __t === 'function' && __t.setHandler) __t.setHandler(ga.reportError);
}), 3);
__d('CallbackDependencyManager', ['ErrorUtils'], (function a(b, c, d, e, f, g) {
function h() {
'use strict';
this.$CallbackDependencyManager1 = {};
this.$CallbackDependencyManager2 = {};
this.$CallbackDependencyManager3 = 1;
this.$CallbackDependencyManager4 = {};
}
h.prototype.$CallbackDependencyManager5 = function(i, j) {
'use strict';
var k = 0,
l = {};
for (var m = 0, n = j.length; m < n; m++) l[j[m]] = 1;
for (var o in l) {
if (this.$CallbackDependencyManager4[o]) continue;
k++;
if (this.$CallbackDependencyManager1[o] === undefined) this.$CallbackDependencyManager1[o] = {};
this.$CallbackDependencyManager1[o][i] = (this.$CallbackDependencyManager1[o][i] || 0) + 1;
}
return k;
};
h.prototype.$CallbackDependencyManager6 = function(i) {
'use strict';
if (!this.$CallbackDependencyManager1[i]) return;
for (var j in this.$CallbackDependencyManager1[i]) {
this.$CallbackDependencyManager1[i][j]--;
if (this.$CallbackDependencyManager1[i][j] <= 0) delete this.$CallbackDependencyManager1[i][j];
this.$CallbackDependencyManager2[j].$CallbackDependencyManager7--;
if (this.$CallbackDependencyManager2[j].$CallbackDependencyManager7 <= 0) {
var k = this.$CallbackDependencyManager2[j].$CallbackDependencyManager8;
delete this.$CallbackDependencyManager2[j];
c('ErrorUtils').applyWithGuard(k);
}
}
};
h.prototype.addDependenciesToExistingCallback = function(i, j) {
'use strict';
if (!this.$CallbackDependencyManager2[i]) return null;
var k = this.$CallbackDependencyManager5(i, j);
this.$CallbackDependencyManager2[i].$CallbackDependencyManager7 += k;
return i;
};
h.prototype.isPersistentDependencySatisfied = function(i) {
'use strict';
return !!this.$CallbackDependencyManager4[i];
};
h.prototype.satisfyPersistentDependency = function(i) {
'use strict';
this.$CallbackDependencyManager4[i] = 1;
this.$CallbackDependencyManager6(i);
};
h.prototype.satisfyNonPersistentDependency = function(i) {
'use strict';
var j = this.$CallbackDependencyManager4[i] === 1;
if (!j) this.$CallbackDependencyManager4[i] = 1;
this.$CallbackDependencyManager6(i);
if (!j) delete this.$CallbackDependencyManager4[i];
};
h.prototype.registerCallback = function(i, j) {
'use strict';
var k = this.$CallbackDependencyManager3;
this.$CallbackDependencyManager3++;
var l = this.$CallbackDependencyManager5(k, j);
if (l === 0) {
c('ErrorUtils').applyWithGuard(i);
return null;
}
this.$CallbackDependencyManager2[k] = {
$CallbackDependencyManager8: i,
$CallbackDependencyManager7: l
};
return k;
};
h.prototype.unsatisfyPersistentDependency = function(i) {
'use strict';
delete this.$CallbackDependencyManager4[i];
};
f.exports = h;
}), null);
__d('EventSubscription', [], (function a(b, c, d, e, f, g) {
'use strict';
function h(i) {
this.subscriber = i;
}
h.prototype.remove = function() {
if (this.subscriber) {
this.subscriber.removeSubscription(this);
this.subscriber = null;
}
};
f.exports = h;
}), null);
__d('EmitterSubscription', ['EventSubscription'], (function a(b, c, d, e, f, g) {
'use strict';
var h, i;
h = babelHelpers.inherits(j, c('EventSubscription'));
i = h && h.prototype;
function j(k, l, m) {
i.constructor.call(this, k);
this.listener = l;
this.context = m;
}
f.exports = j;
}), null);
__d("sprintf", [], (function a(b, c, d, e, f, g) {
function h(i) {
for (var j = arguments.length, k = Array(j > 1 ? j - 1 : 0), l = 1; l < j; l++) k[l - 1] = arguments[l];
var m = 0;
return i.replace(/%s/g, function() {
return String(k[m++]);
});
}
f.exports = h;
}), null);
__d('invariant', ['ex', 'sprintf'], (function a(b, c, d, e, f, g) {
'use strict';
var h = c('ex');
function i(j, k) {
if (!j) {
var l = void 0;
if (k === undefined) {
l = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
for (var m = arguments.length, n = Array(m > 2 ? m - 2 : 0), o = 2; o < m; o++) n[o - 2] = arguments[o];
l = new Error(h.apply(undefined, [k].concat(n)));
l.name = 'Invariant Violation';
l.messageWithParams = [k].concat(n);
}
l.framesToPop = 1;
throw l;
}
}
f.exports = i;
}), null);
__d('EventSubscriptionVendor', ['invariant'], (function a(b, c, d, e, f, g, h) {
'use strict';
function i() {
this.$EventSubscriptionVendor1 = {};
}
i.prototype.addSubscription = function(j, k) {
k.subscriber === this || h(0);
if (!this.$EventSubscriptionVendor1[j]) this.$EventSubscriptionVendor1[j] = [];
var l = this.$EventSubscriptionVendor1[j].length;
this.$EventSubscriptionVendor1[j].push(k);
k.eventType = j;
k.key = l;
return k;
};
i.prototype.removeAllSubscriptions = function(j) {
if (j === undefined) {
this.$EventSubscriptionVendor1 = {};
} else delete this.$EventSubscriptionVendor1[j];
};
i.prototype.removeSubscription = function(j) {
var k = j.eventType,
l = j.key,
m = this.$EventSubscriptionVendor1[k];
if (m) delete m[l];
};
i.prototype.getSubscriptionsForType = function(j) {
return this.$EventSubscriptionVendor1[j];
};
f.exports = i;
}), null);
__d("emptyFunction", [], (function a(b, c, d, e, f, g) {
function h(j) {
return function() {
return j;
};
}
var i = function j() {};
i.thatReturns = h;
i.thatReturnsFalse = h(false);
i.thatReturnsTrue = h(true);
i.thatReturnsNull = h(null);
i.thatReturnsThis = function() {
return this;
};
i.thatReturnsArgument = function(j) {
return j;
};
f.exports = i;
}), null);
__d('BaseEventEmitter', ['invariant', 'EmitterSubscription', 'ErrorUtils', 'EventSubscriptionVendor', 'emptyFunction'], (function a(b, c, d, e, f, g, h) {
function i() {
'use strict';
this.$BaseEventEmitter2 = new(c('EventSubscriptionVendor'))();
this.$BaseEventEmitter1 = null;
}
i.prototype.addListener = function(j, k, l) {
'use strict';
return this.$BaseEventEmitter2.addSubscription(j, new(c('EmitterSubscription'))(this.$BaseEventEmitter2, k, l));
};
i.prototype.once = function(j, k, l) {
'use strict';
var m = this;
return this.addListener(j, function() {
m.removeCurrentListener();
k.apply(l, arguments);
});
};
i.prototype.removeAllListeners = function(j) {
'use strict';
this.$BaseEventEmitter2.removeAllSubscriptions(j);
};
i.prototype.removeCurrentListener = function() {
'use strict';
!!this.$BaseEventEmitter1 || h(0);
this.$BaseEventEmitter2.removeSubscription(this.$BaseEventEmitter1);
};
i.prototype.listeners = function(j) {
'use strict';
var k = this.$BaseEventEmitter2.getSubscriptionsForType(j);
return k ? k.filter(c('emptyFunction').thatReturnsTrue).map(function(l) {
return l.listener;
}) : [];
};
i.prototype.emit = function(j) {
'use strict';
var k = this.$BaseEventEmitter2.getSubscriptionsForType(j);
if (k) {
var l = Object.keys(k),
m;
for (var n = 0; n < l.length; n++) {
var o = l[n],
p = k[o];
if (p) {
this.$BaseEventEmitter1 = p;
if (m == null) {
m = [p];
for (var q = 0, r = arguments.length; q < r; q++) m[q + 1] = arguments[q];
} else m[0] = p;
this.__emitToSubscription.apply(this, m);
}
}
this.$BaseEventEmitter1 = null;
}
};
i.prototype.__emitToSubscription = function(j, k) {
'use strict';
for (var l = arguments.length, m = Array(l > 2 ? l - 2 : 0), n = 2; n < l; n++) m[n - 2] = arguments[n];
c('ErrorUtils').applyWithGuard(j.listener, j.context, m, null, 'EventEmitter ' + k + ' event');
};
f.exports = i;
}), null);
__d('EventEmitter', ['BaseEventEmitter'], (function a(b, c, d, e, f, g) {
var h, i;
h = babelHelpers.inherits(j, c('BaseEventEmitter'));
i = h && h.prototype;
function j() {
'use strict';
h.apply(this, arguments);
}
f.exports = j;
}), null);
__d('EventEmitterWithHolding', [], (function a(b, c, d, e, f, g) {
'use strict';
function h(i, j) {
this.$EventEmitterWithHolding1 = i;
this.$EventEmitterWithHolding2 = j;
this.$EventEmitterWithHolding3 = null;
this.$EventEmitterWithHolding4 = [];
this.$EventEmitterWithHolding5 = 0;
}
h.prototype.addListener = function(i, j, k) {
return this.$EventEmitterWithHolding1.addListener(i, j, k);
};
h.prototype.once = function(i, j, k) {
return this.$EventEmitterWithHolding1.once(i, j, k);
};
h.prototype.addRetroactiveListener = function(i, j, k) {
var l = this.$EventEmitterWithHolding1.addListener(i, j, k),
m = this.$EventEmitterWithHolding4;
m.push(false);
this.$EventEmitterWithHolding5++;
this.$EventEmitterWithHolding2.emitToListener(i, j, k);
this.$EventEmitterWithHolding5--;
if (m[m.length - 1]) l.remove();
m.pop();
return l;
};
h.prototype.removeAllListeners = function(i) {
this.$EventEmitterWithHolding1.removeAllListeners(i);
};
h.prototype.removeCurrentListener = function() {
if (this.$EventEmitterWithHolding5) {
var i = this.$EventEmitterWithHolding4;
i[i.length - 1] = true;
} else this.$EventEmitterWithHolding1.removeCurrentListener();
};
h.prototype.listeners = function(i) {
return this.$EventEmitterWithHolding1.listeners(i);
};
h.prototype.emit = function(i, j, k, l, m, n, o) {
this.$EventEmitterWithHolding1.emit(i, j, k, l, m, n, o);
};
h.prototype.emitAndHold = function(i, j, k, l, m, n, o) {
this.$EventEmitterWithHolding3 = this.$EventEmitterWithHolding2.holdEvent(i, j, k, l, m, n, o);
this.$EventEmitterWithHolding1.emit(i, j, k, l, m, n, o);
this.$EventEmitterWithHolding3 = null;
};
h.prototype.releaseCurrentEvent = function() {
if (this.$EventEmitterWithHolding3 !== null) {
this.$EventEmitterWithHolding2.releaseEvent(this.$EventEmitterWithHolding3);
} else if (!!this.$EventEmitterWithHolding5) this.$EventEmitterWithHolding2.releaseCurrentEvent();
};
h.prototype.releaseHeldEventType = function(i) {
this.$EventEmitterWithHolding2.releaseEventType(i);
};
f.exports = h;
}), null);
__d('EventHolder', ['invariant'], (function a(b, c, d, e, f, g, h) {
'use strict';
function i() {
this.$EventHolder1 = {};
this.$EventHolder2 = [];
}
i.prototype.holdEvent = function(j, k, l, m, n, o, p) {
this.$EventHolder1[j] = this.$EventHolder1[j] || [];
var q = this.$EventHolder1[j],
r = {
eventType: j,
index: q.length
};
q.push([k, l, m, n, o, p]);
return r;
};
i.prototype.emitToListener = function(j, k, l) {
var m = this.$EventHolder1[j];
if (!m) return;
m.forEach(function(n, o) {
if (!n) return;
this.$EventHolder2.push({
eventType: j,
index: o
});
k.apply(l, n);
this.$EventHolder2.pop();
}.bind(this));
};
i.prototype.releaseCurrentEvent = function() {
this.$EventHolder2.length || h(0);
this.releaseEvent(this.$EventHolder2[this.$EventHolder2.length - 1]);
};
i.prototype.releaseEvent = function(j) {
delete this.$EventHolder1[j.eventType][j.index];
};
i.prototype.releaseEventType = function(j) {
this.$EventHolder1[j] = [];
};
f.exports = i;
}), null);
__d('Arbiter', ['invariant', 'CallbackDependencyManager', 'ErrorUtils', 'EventEmitter', 'EventEmitterWithHolding', 'EventHolder'], (function a(b, c, d, e, f, g, h) {
'use strict';
var i, j;
function k(o) {
return Array.isArray(o) ? o : [o];
}
function l() {
var o = new(c('EventEmitter'))();
this.$Arbiter1 = new m();
this.$Arbiter2 = new(c('EventEmitterWithHolding'))(o, this.$Arbiter1);
this.$Arbiter3 = new(c('CallbackDependencyManager'))();
this.$Arbiter4 = [];
}
l.prototype.subscribe = function(o, p, q) {
o = k(o);
o.forEach(function(s) {
s && typeof s === 'string' || h(0);
});
typeof p === 'function' || h(0);
q = q || l.SUBSCRIBE_ALL;
q === l.SUBSCRIBE_NEW || q === l.SUBSCRIBE_ALL || h(0);
var r = o.map(function(s) {
var t = this.$Arbiter5.bind(this, p, s);
t.__SMmeta = p.__SMmeta;
if (q === l.SUBSCRIBE_NEW) return this.$Arbiter2.addListener(s, t);
this.$Arbiter4.push({});
var u = this.$Arbiter2.addRetroactiveListener(s, t);
this.$Arbiter4.pop();
return u;
}, this);
return new n(this, r);
};
l.prototype.$Arbiter5 = function(o, p, q) {
var r = this.$Arbiter4[this.$Arbiter4.length - 1];
if (r[p] === false) return;
var s = c('ErrorUtils').applyWithGuard(o, null, [p, q]);
if (s === false) this.$Arbiter2.releaseCurrentEvent();
r[p] = s;
};
l.prototype.unsubscribeCurrentSubscription = function() {
this.$Arbiter2.removeCurrentListener();
};
l.prototype.releaseCurrentPersistentEvent = function() {
this.$Arbiter2.releaseCurrentEvent();
};
l.prototype.subscribeOnce = function(o, p, q) {
var r = this.subscribe(o, function(s, t) {
this.unsubscribeCurrentSubscription();
return p(s, t);
}.bind(this), q);
return r;
};
l.prototype.unsubscribe = function(o) {
o.isForArbiterInstance(this) || h(0);
o.unsubscribe();
};
l.prototype.inform = function(o, p, q) {
var r = Array.isArray(o);
o = k(o);
q = q || l.BEHAVIOR_EVENT;
var s = q === l.BEHAVIOR_STATE || q === l.BEHAVIOR_PERSISTENT;
this.$Arbiter4.push({});
for (var t = 0; t < o.length; t++) {
var u = o[t];
u || h(0);
this.$Arbiter1.setHoldingBehavior(u, q);
this.$Arbiter2.emitAndHold(u, p);
this.$Arbiter6(u, p, s);
}
var v = this.$Arbiter4.pop();
return r ? v : v[o[0]];
};
l.prototype.query = function(o) {
var p = this.$Arbiter1.getHoldingBehavior(o);
!p || p === l.BEHAVIOR_STATE || h(0);
var q = null;
this.$Arbiter1.emitToListener(o, function(r) {
q = r;
});
return q;
};
l.prototype.registerCallback = function(o, p) {
if (typeof o === 'function') {
return this.$Arbiter3.registerCallback(o, p);
} else return this.$Arbiter3.addDependenciesToExistingCallback(o, p);
};
l.prototype.$Arbiter6 = function(o, p, q) {
if (p === null) return;
if (q) {
this.$Arbiter3.satisfyPersistentDependency(o);
} else this.$Arbiter3.satisfyNonPersistentDependency(o);
};
i = babelHelpers.inherits(m, c('EventHolder'));
j = i && i.prototype;
function m() {
j.constructor.call(this);
this.$ArbiterEventHolder1 = {};
}
m.prototype.setHoldingBehavior = function(o, p) {
this.$ArbiterEventHolder1[o] = p;
};
m.prototype.getHoldingBehavior = function(o) {
return this.$ArbiterEventHolder1[o];
};
m.prototype.holdEvent = function(o, p, q, r, s) {
var t = this.$ArbiterEventHolder1[o];
if (t !== l.BEHAVIOR_PERSISTENT) this.$ArbiterEventHolder2(o);
if (t !== l.BEHAVIOR_EVENT) return j.holdEvent.call(this, o, p, q, r, s);
};
m.prototype.$ArbiterEventHolder2 = function(o) {
this.emitToListener(o, this.releaseCurrentEvent, this);
};
m.prototype.releaseEvent = function(o) {
if (o) j.releaseEvent.call(this, o);
};
Object.assign(l, {
SUBSCRIBE_NEW: 'new',
SUBSCRIBE_ALL: 'all',
BEHAVIOR_EVENT: 'event',
BEHAVIOR_STATE: 'state',
BEHAVIOR_PERSISTENT: 'persistent'
});
function n(o, p) {
this.$ArbiterToken1 = o;
this.$ArbiterToken2 = p;
}
n.prototype.unsubscribe = function() {
for (var o = 0; o < this.$ArbiterToken2.length; o++) this.$ArbiterToken2[o].remove();
this.$ArbiterToken2.length = 0;
};
n.prototype.isForArbiterInstance = function(o) {
this.$ArbiterToken1 || h(0);
return this.$ArbiterToken1 === o;
};
Object.keys(l.prototype).forEach(function(o) {
l[o] = function() {
var p = this instanceof l ? this : l;
return l.prototype[o].apply(p, arguments);
};
});
l.call(l);
f.exports = l;
}), null);
__d('CSRFGuard', [], (function a(b, c, d, e, f, g) {
'use strict';
var h = 'for (;;);',
i = /^for ?\(;;\);/,
j = {
length: h.length,
regex: i,
exists: function k(l) {
return !!l.match(i);
},
clean: function k(l) {
var m = l.match(i);
return m ? l.substr(m[0].length) : m;
}
};
f.exports = j;
}), null);
__d('JSLog', ['ErrorUtils', 'ex', 'sprintf'], (function a(b, c, d, e, f, g) {
'use strict';
var h = c('ex'),
i = ['error', 'warn', 'info'];
function j(l, m) {
if (m === undefined) {
k.error('JSLog.%s requires an error message argument', l);
return;
}
for (var n = arguments.length, o = Array(n > 2 ? n - 2 : 0), p = 2; p < n; p++) o[p - 2] = arguments[p];
var q = new Error(h.apply(undefined, [m].concat(o)));
q.name = c('sprintf')('JSLog.%s', l);
q.type = l;
q.messageWithParams = [m].concat(o);
q.framesToPop = 1;
c('ErrorUtils').reportError(q);
}
var k = i.reduce(function(l, m) {
l[m] = j.bind(l, m);
return l;
}, {});
f.exports = k;
}), null);
__d('CircularBuffer', ['invariant'], (function a(b, c, d, e, f, g, h) {
function i(j) {
'use strict';
j > 0 || h(0);
this.$CircularBuffer1 = j;
this.$CircularBuffer2 = 0;
this.$CircularBuffer3 = [];
}
i.prototype.write = function(j) {
'use strict';
if (this.$CircularBuffer3.length < this.$CircularBuffer1) {
this.$CircularBuffer3.push(j);
} else {
this.$CircularBuffer3[this.$CircularBuffer2] = j;
this.$CircularBuffer2++;
this.$CircularBuffer2 %= this.$CircularBuffer1;
}
return this;
};
i.prototype.read = function() {
'use strict';
return this.$CircularBuffer3.slice(this.$CircularBuffer2).concat(this.$CircularBuffer3.slice(0, this.$CircularBuffer2));
};
i.prototype.clear = function() {
'use strict';
this.$CircularBuffer2 = 0;
this.$CircularBuffer3 = [];
return this;
};
f.exports = i;
}), null);
__d('LogBuffer', ['CircularBuffer'], (function a(b, c, d, e, f, g) {
var h = b.setTimeout.nativeBackup || b.setTimeout,
i = 5000,
j = {},
k = {},
l = {
write: function m(n, o) {
var p = j[n] = j[n] || new(c('CircularBuffer'))(i);
p.write(o);
if (k[n]) k[n].forEach(function(q) {
try {
q(o);
} catch (r) {}
});
},
read: function m(n) {
if (!j[n]) {
return [];
} else return j[n].read();
},
tail: function m(n, o) {
if (typeof o !== 'function') return;
k[n] = k[n] || [];
k[n].push(o);
if (j[n]) {
var p = j[n];
p.read().forEach(function(q) {
try {
o(q);
} catch (r) {}
});
}
},
clear: function m(n) {
if (j[n]) h(function() {
j[n].clear();
}, 0);
}
};
f.exports = l;
}), null);
__d('ExecutionEnvironment', [], (function a(b, c, d, e, f, g) {
'use strict';
var h = !!(typeof window !== 'undefined' && window.document && window.document.createElement),
i = {
canUseDOM: h,
canUseWorkers: typeof Worker !== 'undefined',
canUseEventListeners: h && !!(window.addEventListener || window.attachEvent),
canUseViewport: h && !!window.screen,
isInWorker: !h
};
f.exports = i;
}), null);
__d('performance', ['ExecutionEnvironment'], (function a(b, c, d, e, f, g) {
'use strict';
var h = void 0;
if (c('ExecutionEnvironment').canUseDOM) h = window.performance || window.msPerformance || window.webkitPerformance;
f.exports = h || {};
}), null);
__d('performanceAbsoluteNow', ['performance'], (function a(b, c, d, e, f, g) {
var h;
if (c('performance').now && c('performance').timing && c('performance').timing.navigationStart) {
var i = c('performance').timing.navigationStart;
h = function j() {
return c('performance').now() + i;
};
} else h = function j() {
return Date.now();
};
f.exports = h;
}), null);
__d('ProfilingCounters', ['performanceAbsoluteNow'], (function a(b, c, d, e, f, g) {
c('performanceAbsoluteNow')();
function h() {
'use strict';
this.$ProfilingCounters1 = [];
this.$ProfilingCounters2 = {};
this.$ProfilingCounters3 = {};
this.$ProfilingCounters4 = {};
}
h.startCapturing = function() {
'use strict';
h.$ProfilingCounters6.push(new h());
};
h.stopCapturing = function() {
'use strict';
var i = h.$ProfilingCounters6.pop();
if (!i) throw new Error('Called ProfilingCounters.stopCapturing too many times.');
};
h.$ProfilingCounters7 = function() {
'use strict';
var i = h.$ProfilingCounters6.length;
if (i === 0) throw new Error('Must call ProfilingCounters.startCapturing first.');
return h.$ProfilingCounters6[i - 1];
};
h.startTiming = function(i) {
'use strict';
return h.$ProfilingCounters7().$ProfilingCounters8(i);
};
h.prototype.$ProfilingCounters8 = function(i) {
'use strict';
var j = h.$ProfilingCounters5++,
k = {
value: 0,
counter: i,
id: j,
lastStartTime: 0
};
this.$ProfilingCounters2[j] = this.$ProfilingCounters1.length;
this.$ProfilingCounters1.push(k);
var l = c('performanceAbsoluteNow')();
k.lastStartTime = l;
if (this.$ProfilingCounters1.length > 1) {
var m = this.$ProfilingCounters1[this.$ProfilingCounters1.length - 2];
m.value += l - m.lastStartTime;
}
return j;
};
h.stopTiming = function(i) {
'use strict';
return h.$ProfilingCounters7().$ProfilingCounters9(i);
};
h.prototype.$ProfilingCounters9 = function(i) {
'use strict';
var j = c('performanceAbsoluteNow')(),
k = this.$ProfilingCounters2[i];
delete this.$ProfilingCounters2[i];
if (k == null || this.$ProfilingCounters1[k] == null) return 0;
var l = null,
m = 0;
while (this.$ProfilingCounters1.length - 1 > k) {
var n = this.$ProfilingCounters1.pop();
m += n.value;
delete this.$ProfilingCounters2[n.id];
if (l == null && n.lastStartTime != null) l = n.lastStartTime;
}
var o = this.$ProfilingCounters1.pop();
o.value += j - (l || o.lastStartTime);
o.value += m;
this.$ProfilingCounters4[o.counter] = this.$ProfilingCounters4[o.counter] || 0;
this.$ProfilingCounters4[o.counter] += o.value;
if (this.$ProfilingCounters1.length > 0) this.$ProfilingCounters1[this.$ProfilingCounters1.length - 1].lastStartTime = j;
return o.value;
};
h.incrementCounter = function(i, j) {
'use strict';
h.$ProfilingCounters7().$ProfilingCounters10(i, j);
};
h.prototype.$ProfilingCounters10 = function(i, j) {
'use strict';
this.$ProfilingCounters3[i] = this.$ProfilingCounters3[i] || 0;
this.$ProfilingCounters3[i] += j;
};
h.getTotals = function() {
'use strict';
return h.$ProfilingCounters7().$ProfilingCounters11();
};
h.prototype.$ProfilingCounters11 = function() {
'use strict';
return babelHelpers['extends']({}, this.$ProfilingCounters4, this.$ProfilingCounters3);
};
h.$ProfilingCounters6 = [];
h.$ProfilingCounters5 = 1;
h.startCapturing();
b.ProfilingCounters = h;
f.exports = h;
}), 3);
__d('TimeSliceRefCountingWrapper', [], (function a(b, c, d, e, f, g) {
var h = [],
i = null,
j = null,
k = 1,
l = {},
m = {};
function n(p, q, r, s) {
if (p == null || p.length === 0) return;
var t = 0,
u = 0,
v = [];
while (u < p.length) {
var w = p[u],
x = true;
if (!(s !== null && s !== w.rootContext && q)) {
w.refCount--;
if (w.refCount === 0) {
w.callbacks.forEach(function(y) {
return v.push(y);
});
w.callbacks = [];
x = false;
}
}
if (x) {
p[t] = w;
t++;
}
u++;
}
p.splice(t, u - t);
if (j != null) j.scheduleCallbacks(v);
}
var o = {
wrapWithReferenceCounting: function p(q, r, s, t) {
var u = null,
v = false;
if (s && h.length > 0) {
h.forEach(function(z) {
return z.refCount++;
});
u = h;
}
var w = false,
x = k++,
y = function z() {
w = true;
var aa = m[x];
if (aa) {
delete l[aa];
delete m[x];
}
var ba = h;
if (u != null) h = u;
var ca = r.apply(this, arguments),
da = t.getLastCompletedTimeSliceContextID(),
ea = i != null && i.rootContext === da;
if (u != null || ea) {
n(h, v, q, t.getLastCompletedTimeSliceContextID());
h = ba;
}
v = true;
return ca;
};
y.__creationID = x;
y.__cancelCallback = function() {
if (u != null && !w) {
w = true;
n(u, v, q, null);
v = true;
}
};
return y;
},
getCurrentActiveReferenceRootIds: function p() {
return h.map(function(q) {
return q.rootContext;
});
},
addOrCreateRefCounter: function p(q, r) {
if (i != null && i.rootContext === r) {
i.callbacks.push(q);
} else {
i = {
refCount: 1,
callbacks: [q],
rootContext: r
};
h = h.slice();
h.push(i);
}
},
registerForCancelling: function p(q, r) {
if (l[q] != null) {
return;
} else if (!q) return;
l[q] = r;
m[r.__creationID] = q;
},
cancelTimeSlice: function p(q) {
var r = l[q];
if (r) {
delete l[q];
delete m[r.__creationID];
r.__cancelCallback();
}
},
isValidCancellationToken: function p(q) {
return l[q] != null;
},
registerRefCountingCallbackManager: function p(q) {
j = q;
}
};
f.exports = o;
}), null);
__d('wrapFunction', [], (function a(b, c, d, e, f, g) {
var h = {},
i = function j(k, l, m) {
var n = l || 'default';
return function() {
var o = n in h ? h[n](k, m) : k;
return o.apply(this, arguments);
};
};
i.setWrapper = function(j) {
var k = arguments.length <= 1 || arguments[1] === undefined ? 'default' : arguments[1];
h[k] = j;
};
f.exports = i;
}), null);
__d('TimeSlice', ['invariant', 'CircularBuffer', 'ErrorUtils', 'Env', 'LogBuffer', 'ProfilingCounters', 'TimeSliceRefCountingWrapper', 'performanceAbsoluteNow', 'wrapFunction'], (function a(b, c, d, e, f, g, h) {
var i = 1,
j = false,
k = void 0,
l = void 0,
m = void 0,
n = 0,
o = 1,
p = 2,
q = n,
r = new(c('CircularBuffer'))(100),
s = 0,
t = 0,
u = c('Env').shouldLogCounters,
v = 'stackTraceLimit' in Error,
w = 60000,
x = 240000,
y = null,
z = false,
aa = 0,
ba = [],
ca = {
_enabled: false,
_lastEnabledStartTimeMs: null,
_firstEnabledStartTimeMs: null,
_delayMs: 33,
_idleGapThresholdMs: 60,
_lastEvent: {
type: 'unknown',
timeMs: null
},
_intervalHandle: null,
_ignoredTimesliceNames: {},
_expectedNextHeartbeatMs: null,
_activeHeartbeatHandles: {},
enable: function ea() {
var fa, ga = this,
ha = c('performanceAbsoluteNow')();
if (!this._enabled) {
var ia = c('Env').timeslice_heartbeat_config || {};
this._enabled = true;
this._delayMs = ia.pollIntervalMs || this._delayMs;
this._idleGapThresholdMs = ia.idleGapThresholdMs || this._idleGapThresholdMs;
this._ignoredTimesliceNames = ia.ignoredTimesliceNames || this._ignoredTimesliceNames;
this._intervalHandle = setInterval(this._beat.bind(this), this._delayMs);
this._expectedNextHeartbeatMs = ha + this._delayMs;
if (this._firstEnabledStartTimeMs == null) this._firstEnabledStartTimeMs = ha;
}
if (z) {
return null;
} else if (ha - this._firstEnabledStartTimeMs > x) {
z = true;
return null;
} else {
var fa = function() {
ga._lastEnabledStartTimeMs = ha;
var ja = aa++,
ka = {
disable: function() {
if (this._activeHeartbeatHandles[ja] != null) {
delete this._activeHeartbeatHandles[ja];
this._checkShouldDisable();
}
}.bind(ga),
enabledTime: ga._lastEnabledStartTimeMs
};
ga._activeHeartbeatHandles[ja] = ka;
return {
v: ka
};
}();
if (typeof fa === "object") return fa.v;
}
},
_checkShouldDisable: function ea() {
var fa, ga = this;
if (this._enabled)(function() {
var ha = c('performanceAbsoluteNow')(),
ia = false;
Object.keys(ga._activeHeartbeatHandles).forEach(function(ja) {
if (ha - this._activeHeartbeatHandles[ja].enabledTime > w) {
delete this._activeHeartbeatHandles[ja];
} else ia = true;
}.bind(ga));
if (!ia) {
ga._enabled = false;
clearInterval(ga._intervalHandle);
ga._intervalHandle = null;
ga._firstEnabledStartTimeMs = null;
}
})();
},
updateExecution: function ea(fa, ga, ha) {
if (!this._enabled) return;
if (this._ignoredTimesliceNames[ha]) {
this._updateState({
type: 'ignored_exec',
timeMs: fa
}, true);
this._updateState({
type: 'ignored_exec',
timeMs: ga
}, false);
} else {
this._updateState({
type: 'exec',
timeMs: fa
}, true);
this._updateState({
type: 'exec',
timeMs: ga
}, false);
}
},
_isIdleMarker: function ea(event) {
return event.type == 'beat' || event.type == 'ignored_exec';
},
_updateState: function ea(fa, ga) {
var ha = this._lastEvent.timeMs,
ia = fa.timeMs;
if (ga) {
var ja = this._expectedNextHeartbeatMs + this._idleGapThresholdMs,
ka = ia > ja;
if (this._lastEvent.type === 'exec') {
if (fa.type === 'exec') {
this._outputBrowserBlock(ha, ia, ka ? 'likely_btwn_exec' : 'btwn_exec');
} else if (this._isIdleMarker(fa)) this._outputBrowserBlock(ha, ia, ka ? 'likely_post_exec' : 'post_exec');
} else if (this._isIdleMarker(this._lastEvent))
if (fa.type === 'exec') {
this._outputBrowserBlock(ha, ia, ka ? 'likely_pre_exec' : 'pre_exec');
} else if (this._isIdleMarker(fa) && ka) {
var la = fa.type === 'beat' ? 'delayed_beat' : 'delayed_beat_btwn_ignored';
this._outputBrowserBlock(ha, ia, la);
}
}
this._lastEvent = fa;
},
_outputBrowserBlock: function ea(fa, ga, ha) {
if (fa < ga) c('LogBuffer').write('time_slice_heartbeat', {
begin: fa,
end: ga,
id: i++,
parentID: null,
guard: 'browser time: ' + ha
});
},
_beat: function ea() {
var fa = c('performanceAbsoluteNow')();
if (!this._enabled) {
return;
} else if (fa - this._lastEnabledStartTimeMs > w) {
this._activeHeartbeatHandles = {};
this._checkShouldDisable();
return;
}
this._updateState({
type: 'beat',
timeMs: fa
}, true);
this._expectedNextHeartbeatMs = fa + this._delayMs;
},
isOn: function ea() {
return this._enabled;
}
},
da = {
guard: function ea(fa, ga, ha) {
typeof fa === 'function' || h(0);
typeof ga === 'string' || h(0);
if (fa.__tsGuarded) return fa;
if (!ha || !ha.root) da.checkCoverage();
var ia = void 0;
if (j) ia = k;
var ja = function ka() {
var la = void 0;
ba.push(ga);
var ma = k;
k = i++;
if (j) {
la = fa.apply(this, arguments);
} else {
var na = 'TimeSlice' + (ga ? ': ' + ga : '');
c('ProfilingCounters').startCapturing();
var oa = c('performanceAbsoluteNow')();
j = true;
m = ga;
la = c('ErrorUtils').applyWithGuard(fa, this, arguments, null, na);
j = false;
var pa = c('performanceAbsoluteNow')();
t += pa - oa;
c('LogBuffer').write('time_slice', babelHelpers['extends']({
begin: oa,
end: pa,
id: k,
parentID: ia,
guard: ga,
counters: u ? c('ProfilingCounters').getTotals() : null,
activeRefTreeIds: c('TimeSliceRefCountingWrapper').getCurrentActiveReferenceRootIds()
}, ha, fa.__SMmeta));
c('ProfilingCounters').stopCapturing();
ca.updateExecution(oa, pa, ga);
}
l = k;
k = ma;
ba.pop();
return la;
};
ja = c('TimeSliceRefCountingWrapper').wrapWithReferenceCounting(ga, ja, ha != null && ha.isContinuation, da);
ja.__tsGuarded = true;
return ja;
},
inGuard: function ea() {
return j;
},
checkCoverage: function ea() {
var fa = void 0;
if (q !== p && !j) {
if (v) {
fa = Error.stackTraceLimit;
Error.stackTraceLimit = 50;
}
var ga = new Error('Missing TimeSlice coverage');
if (v) Error.stackTraceLimit = fa;
ga.type = 'warn';
if (q === o && Math.random() < s) {
c('ErrorUtils').reportError(ga);
} else if (q === n) r.write(ga);
}
},
setLogging: function ea(fa, ga) {
if (q !== n) return;
s = ga;
if (fa) {
q = o;
r.read().forEach(function(ha) {
if (Math.random() < s) c('ErrorUtils').reportError(ha);
});
} else q = p;
r.clear();
r = undefined;
},
enableHeartbeat: function ea() {
return ca.enable();
},
disablePageHeartbeat: function ea() {
if (y != null) y.disable();
},
isHeartbeatOn: function ea() {
return ca.isOn();
},
getContext: function ea() {
if (!j) return null</