171 lines
10 KiB
TypeScript
171 lines
10 KiB
TypeScript
/* Metro module 1219; source: modules/telemetry_ring/native/TelemetryRingLifecycle.tsx; dependencies: [6, 7, 15, 17, 18, 1220, 1878, 7030, 661, 12833, 12835, 5256, 694, 4561, 2] */
|
|
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import ApexExperimentStore from '../../experiments/apex/ApexExperimentStore.tsx'; /* Metro dependency 1220 */
|
|
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import LifecycleManager from '../../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
|
|
import ProcessUtilsNative from '../../../utils/ProcessUtils.native.tsx'; /* Metro dependency 5256 */
|
|
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
|
|
import TelemetryRingNativeAndroid from './TelemetryRingNative.android.tsx'; /* Metro dependency 12833 */
|
|
import ZoomedInTelemetry from './channels/ZoomedInTelemetry.tsx'; /* Metro dependency 12835 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun13567(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:6, offset: 0x00def12a, size: 292 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = LifecycleManager;
|
|
value = _fun13571(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/telemetry_ring/native/TelemetryRingLifecycle.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_13568() { // fn#13568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:198, offset: 0x00def24e, size: 94 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_13568_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun13571(a0) { // fn#13571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:401, offset: 0x00def2ac, size: 114 bytes, params: 2, frame: 16
|
|
const TelemetryRingLifecycleImpl2 = TelemetryRingLifecycleImpl;
|
|
Inherits(TelemetryRingLifecycleImpl2, a0);
|
|
return CreateClass(TelemetryRingLifecycleImpl2, [{key: '_updateZoomedInExport', value: value_13575}, {key: '_initialize',
|
|
value: value_13576}, {key: '_terminate', value: value_13578}]);
|
|
function TelemetryRingLifecycleImpl(a0) { // fn#13572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:413, offset: 0x00def31e, size: 170 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_2;
|
|
binding(this, TelemetryRingLifecycleImpl);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_5(TelemetryRingLifecycleImpl);
|
|
binding = env1_4;
|
|
if (_isNativeReflectConstruct_13568()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_5(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value._initialized = false;
|
|
value._experimentUnsubscribe = null;
|
|
value._handleEligibilityChange = _handleEligibilityChange;
|
|
value._handleLogout = _handleLogout;
|
|
return value;
|
|
function _handleEligibilityChange() { // fn#13573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:752, owner: TelemetryRingLifecycleImpl._handleEligibilityChange, offset: 0x00def3c8, size: 21 bytes, params: 1, frame: 9
|
|
env0_0._updateZoomedInExport();
|
|
}
|
|
|
|
function _handleLogout() { // fn#13574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:800, owner: TelemetryRingLifecycleImpl._handleLogout, offset: 0x00def3dd, size: 59 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
(TelemetryRingNativeAndroid).clear();
|
|
(ZoomedInTelemetry).reset();
|
|
}
|
|
|
|
}
|
|
|
|
function value_13575() { // fn#13575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:945, offset: 0x00def418, size: 176 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
const state = AppStateStore.getState();
|
|
let ACTIVE = AppStates.ACTIVE;
|
|
(importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).setShouldCollectHermesInstrumentedStats(state === ACTIVE && (importDefault(12835) /* metro dependency 12835: ZoomedInTelemetry */).shouldRun());
|
|
ACTIVE = AppStates.ACTIVE;
|
|
if (state === ACTIVE) {
|
|
(importDefault(12835) /* metro dependency 12835: ZoomedInTelemetry */).start();
|
|
} else {
|
|
(importDefault(12835) /* metro dependency 12835: ZoomedInTelemetry */).stop();
|
|
}
|
|
}
|
|
|
|
function value_13576() { // fn#13576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:1137, offset: 0x00def4c8, size: 186 bytes, params: 1, frame: 19
|
|
var environment;
|
|
var value;
|
|
var defaultImport;
|
|
var appStateStoreBinding;
|
|
var addChangeListener;
|
|
var _handleEligibilityChange;
|
|
var userStoreBinding;
|
|
var apexExperimentStoreBinding;
|
|
if (!this._initialized) {
|
|
this._initialized = true;
|
|
value = environment.__proto__;
|
|
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
defaultImport.subscribe('LOGOUT', this._handleLogout);
|
|
appStateStoreBinding = AppStateStore;
|
|
addChangeListener = appStateStoreBinding.addChangeListener;
|
|
_handleEligibilityChange = this._handleEligibilityChange;
|
|
Reflect.apply(addChangeListener, appStateStoreBinding, [_handleEligibilityChange]);
|
|
userStoreBinding = UserStore;
|
|
addChangeListener = userStoreBinding.addChangeListener;
|
|
_handleEligibilityChange = this._handleEligibilityChange;
|
|
Reflect.apply(addChangeListener, userStoreBinding, [_handleEligibilityChange]);
|
|
apexExperimentStoreBinding = ApexExperimentStore;
|
|
addChangeListener = apexExperimentStoreBinding.addChangeListener;
|
|
_handleEligibilityChange = this._handleEligibilityChange;
|
|
Reflect.apply(addChangeListener, apexExperimentStoreBinding, [_handleEligibilityChange]);
|
|
this._experimentUnsubscribe = _experimentUnsubscribe;
|
|
value = importDefault(12835) /* metro dependency 12835: ZoomedInTelemetry */;
|
|
value.initialize();
|
|
this._updateZoomedInExport();
|
|
}
|
|
function _experimentUnsubscribe() { // fn#13577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:1418, owner: value_13576._experimentUnsubscribe, offset: 0x00def582, size: 35 bytes, params: 1, frame: 11
|
|
const apexExperimentStoreBinding = ApexExperimentStore;
|
|
apexExperimentStoreBinding.removeChangeListener(env0_0._handleEligibilityChange);
|
|
}
|
|
|
|
}
|
|
|
|
function value_13578() { // fn#13578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1346:1556, offset: 0x00def5a5, size: 183 bytes, params: 1, frame: 16
|
|
const value = environment.__proto__;
|
|
const defaultImport = Dispatcher;
|
|
defaultImport.unsubscribe('LOGOUT', this._handleLogout);
|
|
const appStateStoreBinding = AppStateStore;
|
|
appStateStoreBinding.removeChangeListener(this._handleEligibilityChange);
|
|
const userStoreBinding = UserStore;
|
|
userStoreBinding.removeChangeListener(this._handleEligibilityChange);
|
|
if (this._experimentUnsubscribe != null) {
|
|
this._experimentUnsubscribe();
|
|
this._experimentUnsubscribe = null;
|
|
}
|
|
(ZoomedInTelemetry).stop();
|
|
(ProcessUtilsNative).setShouldCollectHermesInstrumentedStats(false);
|
|
this._initialized = false;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun13567, 1219, [6, 7, 15, 17, 18, 1220, 1878, 7030, 661, 12833, 12835, 5256, 694, 4561,
|
|
2]) /* metro module 1219, dependencies: [6, 7, 15, 17, 18, 1220, 1878, 7030, 661, 12833, 12835, 5256, 694, 4561, 2] */;
|