135 lines
5.4 KiB
TypeScript
135 lines
5.4 KiB
TypeScript
/* Metro module 9521; source: modules/quests/native/AppStoreOverlayTelemetryManager.tsx; dependencies: [6, 7, 15, 17, 18, 661, 477, 676, 4860, 2] */
|
|
function _fun74283(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:6, offset: 0x01d88cc3, size: 284 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
|
value = _fun74287(value);
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/AppStoreOverlayTelemetryManager.tsx');
|
|
exports.default = value;
|
|
exports.setAppStoreOverlayOpen = function(a0) {
|
|
env0_8 = a0;
|
|
};
|
|
exports.clearAppStoreOverlayOpen = function() {
|
|
env0_8 = null;
|
|
env0_9 = null;
|
|
};
|
|
}
|
|
|
|
function _isNativeReflectConstruct_74284() { // fn#74284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:173, offset: 0x01d88ddf, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_74284_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun74287(a0) { // fn#74287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:394, offset: 0x01d88e41, size: 72 bytes, params: 2, frame: 15
|
|
const closure = AppStoreOverlayTelemetryManager;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'handleAppStateUpdate', value: value_74290}]);
|
|
}
|
|
|
|
function AppStoreOverlayTelemetryManager(a0) { // fn#74288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:406, offset: 0x01d88e89, size: 152 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_2;
|
|
binding(this, AppStoreOverlayTelemetryManager);
|
|
const items = [];
|
|
arraySpread(items, value, 0, items);
|
|
value = env1_5(AppStoreOverlayTelemetryManager);
|
|
binding = env1_4;
|
|
if (_isNativeReflectConstruct_74284()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items, env1_5(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.actions = {APP_STATE_UPDATE: APP_STATE_UPDATE_74289};
|
|
return value;
|
|
}
|
|
|
|
function value_74290({state}) { // fn#74290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:858, offset: 0x01d88f21, size: 259 bytes, params: 2, frame: 18
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
const AppStates = (require(676) /* metro dependency 676: ConstantsIOS */).AppStates;
|
|
var BACKGROUND;
|
|
var value4;
|
|
var binding;
|
|
const value = environment.__proto__;
|
|
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
|
if (isAndroid2) {
|
|
r0 = !isAndroid2;
|
|
} else {
|
|
value3 = env1_8 != null;
|
|
if (value3) {
|
|
if (state !== AppStates.ACTIVE) {
|
|
BACKGROUND = AppStates.BACKGROUND;
|
|
value4 = false;
|
|
if (state !== BACKGROUND) {
|
|
r1 = value4;
|
|
} else {
|
|
binding = env1_8;
|
|
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
|
|
env1_9 = global.Date.now();
|
|
r1 = value4;
|
|
}
|
|
} else if (env1_9 != null) {
|
|
binding = env1_8;
|
|
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED, global.Date.now() - env1_9);
|
|
r1 = false;
|
|
} else {
|
|
BACKGROUND = AppStates.BACKGROUND;
|
|
value4 = false;
|
|
if (state !== BACKGROUND) {
|
|
r1 = value4;
|
|
} else {
|
|
binding = env1_8;
|
|
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
|
|
env1_9 = global.Date.now();
|
|
r1 = value4;
|
|
}
|
|
}
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|