296 lines
16 KiB
TypeScript
296 lines
16 KiB
TypeScript
/* Metro module 691; source: stores/DeveloperOptionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 561, 672, 507, 692, 693, 587, 1216, 566, 694, 2] */
|
|
function _fun8402(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:6, offset: 0x00d3fc63, size: 583 bytes, params: 8, frame: 26
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_9 = (require(661) /* metro dependency 661: Constants */).UserFlags;
|
|
const env0_10 = '' + global.location.protocol + '//' + global.location.host + '/__development/source_maps';
|
|
let value = importDefault(561) /* metro dependency 561: Backoff */;
|
|
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
|
const SECOND = Millis.SECOND;
|
|
const value2 = 5 * SECOND;
|
|
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
|
const MINUTE = Millis.MINUTE;
|
|
value = new value(value2, 1 * MINUTE, true);
|
|
object = {set: set_8411};
|
|
copyDataProperties({}, {'trace': false, 'canary': false, 'logGatewayEvents': false, 'logOverlayEvents': false,
|
|
'logAnalyticsEvents': false, 'sourceMapsEnabled': false, 'axeEnabled': false, 'cssDebuggingEnabled': false,
|
|
'layoutDebuggingEnabled': false, 'bugReporterEnabled': true, 'idleStatusIndicatorEnabled': false,
|
|
'onlyShowPreviewAppCollections': false, 'disableAppCollectionsCache': false,
|
|
'isStreamInfoOverlayEnabled': false, 'preventPopoutClose': false, 'logKeyboardMismatches': false,
|
|
'alertStartupMetrics': false, 'logQuestEvents': false}, true);
|
|
const env0_19 = [];
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun8412(Store).displayName = 'DeveloperOptionsStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT,
|
|
CONNECTION_OPEN: CONNECTION_OPEN, DEVELOPER_OPTIONS_UPDATE_SETTINGS: function({settings}) {
|
|
setOptions(settings);
|
|
}, DEVELOPER_OPTIONS_SET_ROUTING_KEY: function({tags}) {
|
|
setRoutingKeyTags(tags);
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/DeveloperOptionsStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_8403() { // fn#8403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:168, offset: 0x00d3feaa, 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_8403_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function setOptions(a0) { // fn#8406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1559, offset: 0x00d3ff08, size: 114 bytes, params: 2, frame: 14
|
|
const object2 = {};
|
|
copyDataProperties(object2, env0_16, undefined);
|
|
copyDataProperties(object2, env0_17, undefined);
|
|
copyDataProperties(object2, a0, undefined);
|
|
env0_17 = object2;
|
|
const binding = env0_14;
|
|
binding.set(object2.sourceMapsEnabled);
|
|
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
|
Storage.set(env0_15, env0_17);
|
|
}
|
|
|
|
function setRoutingKeyTags(a0) { // fn#8407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1654, offset: 0x00d3ff7a, size: 59 bytes, params: 2, frame: 14
|
|
env0_19 = a0;
|
|
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
|
Storage.set(env0_18, env0_19);
|
|
}
|
|
|
|
function y() { // fn#8408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:521, offset: 0x00d3ffb5, size: 125 bytes, params: 1, frame: 18
|
|
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
const put = HTTP.put;
|
|
const object3 = {url: env0_10};
|
|
const object4 = {};
|
|
object4.Authorization = (importAll(692) /* metro dependency 692: TokenManager */).getToken();
|
|
object3.headers = object4;
|
|
object3.oldFormErrors = true;
|
|
object3.rejectWithError = true;
|
|
Reflect.apply(put, HTTP, [object3]).then(_fun8409, _fun8410);
|
|
}
|
|
|
|
function set_8411(a0) { // fn#8411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:912, offset: 0x00d4015a, size: 174 bytes, params: 2, frame: 19
|
|
var HTTP;
|
|
var del;
|
|
var object3;
|
|
var object4;
|
|
if (a0 !== (env0_11 != null)) {
|
|
if (a0) {
|
|
env0_11 = global.setTimeout(y, 0);
|
|
} else {
|
|
global.clearTimeout(env0_11);
|
|
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
del = HTTP.del;
|
|
object3 = {url: env0_10};
|
|
object4 = {};
|
|
object4.Authorization = (importAll(692) /* metro dependency 692: TokenManager */).getToken();
|
|
object3.headers = object4;
|
|
object3.oldFormErrors = true;
|
|
object3.rejectWithError = true;
|
|
Reflect.apply(del, HTTP, [object3]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun8412(a0) { // fn#8412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1720, offset: 0x00d40208, size: 561 bytes, params: 2, frame: 16
|
|
const closure = DeveloperOptionsStore;
|
|
env0_8(closure, a0);
|
|
return env0_5(closure, [{key: 'initialize', value: value_8414}, {key: 'isTracingRequests', get: get_8415},
|
|
{key: 'isForcedCanary', get: get_8416}, {key: 'isLoggingGatewayEvents', get: get_8417},
|
|
{key: 'isLoggingOverlayEvents', get: get_8418}, {key: 'isLoggingAnalyticsEvents', get: get_8419},
|
|
{key: 'isAxeEnabled', get: get_8420}, {key: 'cssDebuggingEnabled', get: get_8421},
|
|
{key: 'layoutDebuggingEnabled', get: get_8422}, {key: 'sourceMapsEnabled', get: get_8423},
|
|
{key: 'isBugReporterEnabled', get: get_8424}, {key: 'isIdleStatusIndicatorEnabled', get: get_8425},
|
|
{key: 'onlyShowPreviewAppCollections', get: get_8426}, {key: 'disableAppCollectionsCache', get: get_8427},
|
|
{key: 'isStreamInfoOverlayEnabled', get: get_8428}, {key: 'preventPopoutClose', get: get_8429},
|
|
{key: 'logKeyboardMismatches', get: get_8430}, {key: 'alertStartupMetrics', get: get_8431},
|
|
{key: 'isLoggingQuestEvents', get: get_8432}, {key: 'getDebugOptionsHeaderValue', value: value_8433},
|
|
{key: 'routingKeyTags', get: get_8436}, {key: 'getRoutingKeyHeaderValue', value: value_8437}]);
|
|
}
|
|
|
|
function LOGOUT(a0) { // fn#8438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3918, offset: 0x00d406d3, size: 33 bytes, params: 2, frame: 12
|
|
setOptions(env0_16);
|
|
setRoutingKeyTags([]);
|
|
}
|
|
|
|
function CONNECTION_OPEN(a0) { // fn#8439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3996, offset: 0x00d406f4, size: 153 bytes, params: 2, frame: 14
|
|
var binding;
|
|
const user = a0.user;
|
|
let r5 = user.flags ?? 0;
|
|
let STAFF = UserFlags.STAFF;
|
|
const value2 = r5 & STAFF;
|
|
STAFF = UserFlags.STAFF;
|
|
const value3 = value2 === STAFF;
|
|
r5 = value3 || a0.user.personal_connection_id != null;
|
|
if (value3) {
|
|
binding = env0_14;
|
|
binding.set(env0_17.sourceMapsEnabled);
|
|
}
|
|
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
|
|
const setTags = value.setTags;
|
|
const object2 = {};
|
|
object2.isStaff = r5.toString();
|
|
Reflect.apply(setTags, value, [object2]);
|
|
}
|
|
|
|
function _fun8409(a0) { // fn#8409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:637, offset: 0x00d40032, size: 253 bytes, params: 2, frame: 16
|
|
var value;
|
|
var setTimeout;
|
|
if (a0.status === 401) {
|
|
value = environment.__proto__;
|
|
value = require(693) /* metro dependency 693: DeveloperOptionsActionCreators */;
|
|
value.setDeveloperOptionSettings({sourceMapsEnabled: false});
|
|
} else if (a0.status === 403) {
|
|
value = environment.__proto__;
|
|
value = require(693) /* metro dependency 693: DeveloperOptionsActionCreators */;
|
|
value.setDeveloperOptionSettings({sourceMapsEnabled: false});
|
|
} else if (a0.status !== 200) {
|
|
setTimeout = global.setTimeout;
|
|
value = environment.__proto__;
|
|
env1_11 = setTimeout(y, env1_12.fail());
|
|
} else {
|
|
value = environment.__proto__;
|
|
env1_12.succeed();
|
|
env1_11 = global.setTimeout(y,
|
|
a0.body.sourceMapCookieTTLSeconds * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND * 0.75);
|
|
}
|
|
}
|
|
|
|
function _fun8410() { // fn#8410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:873, offset: 0x00d4012f, size: 43 bytes, params: 1, frame: 14
|
|
env1_11 = global.setTimeout(y, env1_12.fail());
|
|
}
|
|
|
|
function value_8414() { // fn#8414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2055, offset: 0x00d404aa, size: 125 bytes, params: 1, frame: 16
|
|
var object2;
|
|
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
|
const value2 = Storage.get(env1_15);
|
|
if (value2 != null) {
|
|
object2 = {};
|
|
copyDataProperties(object2, value2, copyDataProperties(object2, env1_16, undefined));
|
|
}
|
|
if (Storage.get(env1_18) == null) {
|
|
}
|
|
}
|
|
|
|
function get_8415() { // fn#8415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2208, offset: 0x00d40527, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.trace;
|
|
}
|
|
|
|
function get_8416() { // fn#8416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2262, offset: 0x00d40536, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.canary;
|
|
}
|
|
|
|
function get_8417() { // fn#8417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2325, offset: 0x00d40545, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.logGatewayEvents;
|
|
}
|
|
|
|
function get_8418() { // fn#8418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2398, offset: 0x00d40554, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.logOverlayEvents;
|
|
}
|
|
|
|
function get_8419() { // fn#8419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2473, offset: 0x00d40563, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.logAnalyticsEvents;
|
|
}
|
|
|
|
function get_8420() { // fn#8420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2538, offset: 0x00d40572, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.axeEnabled;
|
|
}
|
|
|
|
function get_8421() { // fn#8421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2602, offset: 0x00d40581, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.cssDebuggingEnabled;
|
|
}
|
|
|
|
function get_8422() { // fn#8422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2678, offset: 0x00d40590, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.layoutDebuggingEnabled;
|
|
}
|
|
|
|
function get_8423() { // fn#8423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2752, offset: 0x00d4059f, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.sourceMapsEnabled;
|
|
}
|
|
|
|
function get_8424() { // fn#8424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2824, offset: 0x00d405ae, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.bugReporterEnabled;
|
|
}
|
|
|
|
function get_8425() { // fn#8425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2905, offset: 0x00d405bd, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.idleStatusIndicatorEnabled;
|
|
}
|
|
|
|
function get_8426() { // fn#8426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2995, offset: 0x00d405cc, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.onlyShowPreviewAppCollections;
|
|
}
|
|
|
|
function get_8427() { // fn#8427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3085, offset: 0x00d405db, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.disableAppCollectionsCache;
|
|
}
|
|
|
|
function get_8428() { // fn#8428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3172, offset: 0x00d405ea, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.isStreamInfoOverlayEnabled;
|
|
}
|
|
|
|
function get_8429() { // fn#8429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3251, offset: 0x00d405f9, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.preventPopoutClose;
|
|
}
|
|
|
|
function get_8430() { // fn#8430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3325, offset: 0x00d40608, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.logKeyboardMismatches;
|
|
}
|
|
|
|
function get_8431() { // fn#8431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3400, offset: 0x00d40617, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.alertStartupMetrics;
|
|
}
|
|
|
|
function get_8432() { // fn#8432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3474, offset: 0x00d40626, size: 15 bytes, params: 1, frame: 1
|
|
return env1_17.logQuestEvents;
|
|
}
|
|
|
|
function value_8433() { // fn#8433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3551, offset: 0x00d40635, size: 93 bytes, params: 1, frame: 14
|
|
var environment;
|
|
let Object = global.Object;
|
|
const keys = Object.keys;
|
|
let value = environment.__proto__;
|
|
Reflect.apply(keys, Object, [env1_17]).map(_fun8434);
|
|
Object = global.Object;
|
|
value = Object.keys(env1_17);
|
|
value = value.filter(_fun8435);
|
|
return value.join(',');
|
|
}
|
|
|
|
function value_8437() { // fn#8437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3757, offset: 0x00d406ab, size: 40 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
return env1_19.length === 0 ? null : env1_19.join(',');
|
|
}
|
|
|
|
function _fun8434(a0) { // fn#8434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3609, offset: 0x00d40692, size: 16 bytes, params: 2, frame: 2
|
|
return env2_17[a0];
|
|
}
|
|
|