208 lines
6.9 KiB
React
208 lines
6.9 KiB
React
/* Metro module 1074; source: unknown; dependencies: [826, 1047] */
|
|
function _fun11238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#11238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1201:6, offset: 0x00da5f39, size: 95 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const closure = instrumentHistory;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.addHistoryInstrumentationHandler = function(a0) {
|
|
require(dependencyMap[0]).addHandler('history', a0);
|
|
require(dependencyMap[0]).maybeInstrument('history', instrumentHistory);
|
|
};
|
|
exports.instrumentHistory = closure;
|
|
}
|
|
|
|
function instrumentHistory() { // fn#11239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1201:36, offset: 0x00da5f98, size: 189 bytes, params: 1, frame: 20
|
|
var fill;
|
|
var history;
|
|
const closure = function(a0) {
|
|
var env0_0 = a0;
|
|
return _fun11241;
|
|
};
|
|
var value;
|
|
const WINDOW = (require(1047) /* metro dependency 1047 */).WINDOW;
|
|
WINDOW.addEventListener('popstate', _fun11242);
|
|
const moduleValue = require(826) /* metro dependency 826 */;
|
|
if (moduleValue.supportsHistory()) {
|
|
value = moduleValue;
|
|
fill = value.fill;
|
|
history = WINDOW.history;
|
|
Reflect.apply(fill, value, [history, 'pushState', closure]);
|
|
value = require(826) /* metro dependency 826 */;
|
|
fill = value.fill;
|
|
history = WINDOW.history;
|
|
Reflect.apply(fill, value, [history, 'replaceState', closure]);
|
|
}
|
|
}
|
|
|
|
function historyReplacementFunction(a0) { // fn#11240, owner: instrumentHistory.historyReplacementFunction, offset: 0x00da6055, size: 16 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return _fun11241;
|
|
}
|
|
|
|
function _fun11242() { // fn#11242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1201:522, offset: 0x00da6187, size: 101 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
const WINDOW = (require(1047) /* metro dependency 1047 */).WINDOW;
|
|
const href = WINDOW.location.href;
|
|
const binding = env1_2;
|
|
if (binding !== href) {
|
|
(require(826) /* metro dependency 826 */).triggerHandlers('history', {from: binding, to: href});
|
|
}
|
|
}
|
|
|
|
function _fun11241() { // fn#11241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1201:111, offset: 0x00da6065, size: 290 bytes, params: 1, frame: 21
|
|
var r0;
|
|
var r8;
|
|
var r1;
|
|
var value6;
|
|
var property;
|
|
var value7;
|
|
var binding;
|
|
var URL;
|
|
var moduleValue;
|
|
var WINDOW;
|
|
var location;
|
|
var origin;
|
|
var uRL;
|
|
var value10;
|
|
var toString;
|
|
var value11;
|
|
var error;
|
|
var object2;
|
|
var triggerHandlers;
|
|
var apply;
|
|
let value = undefined;
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
let prototype = Array.prototype;
|
|
const value3 = Object.create(prototype, {constructor: {value: Array}});
|
|
const array = new Array(length);
|
|
const value4 = array instanceof Object ? array : value3;
|
|
const value5 = 0;
|
|
if (value5 < length) {
|
|
r0 = value5;
|
|
reducibleLoop1: while (true) {
|
|
value4[r0] = arguments[r0];
|
|
value6 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
|
|
if (value6 < length) {
|
|
r0 = value6;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (value4.length > 2) {
|
|
property = value4[2];
|
|
r8 = property;
|
|
break reducibleJoin4;
|
|
}
|
|
r8 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
if (r8) {
|
|
value7 = environment.__proto__.__proto__;
|
|
binding = env2_2;
|
|
reducibleJoin7: while (true) {
|
|
reduciblePort24: while (true) {
|
|
exceptionLanding23: while (true) {
|
|
try {
|
|
URL = global.URL;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
break reducibleJoin7;
|
|
}
|
|
r1 = global.String(r8);
|
|
break reduciblePort24;
|
|
}
|
|
env2_2 = r1;
|
|
if (binding === r1) {
|
|
value = environment;
|
|
binding = env0_0;
|
|
return binding.apply(this, value4);
|
|
}
|
|
object2 = {from: binding, to: r1};
|
|
value = require(dependencyMap[value5]);
|
|
triggerHandlers = value.triggerHandlers;
|
|
Reflect.apply(triggerHandlers, value, ['history', object2]);
|
|
value = environment;
|
|
binding = env0_0;
|
|
apply = binding.apply;
|
|
return Reflect.apply(apply, binding, [this, value4]);
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
property = dependencyMap[1];
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
moduleValue = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
WINDOW = moduleValue.WINDOW;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
location = WINDOW.location;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
origin = location.origin;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
prototype = URL.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
uRL = new URL();
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
value10 = uRL instanceof Object ? uRL : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
toString = value10.toString;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
try {
|
|
value11 = Reflect.apply(toString, value10, []);
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
r1 = value11;
|
|
if (binding === r1) {
|
|
return env0_0.apply(this, value4);
|
|
}
|
|
object2 = {from: binding, to: r1};
|
|
value = require(dependencyMap[value5]);
|
|
value.triggerHandlers('history', object2);
|
|
}
|
|
return env0_0.apply(this, value4);
|
|
}
|
|
|