Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,84 @@
|
||||
/* Metro module 13462; source: modules/auth_sessions/AuthSessionsActionCreators.tsx; dependencies: [5, 661, 507, 694, 2] */
|
||||
function _fun102370(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13652:6, offset: 0x022394f7, size: 188 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth_sessions/AuthSessionsActionCreators.tsx');
|
||||
exports.fetchAuthSessions = function() {
|
||||
return _fetchAuthSessions.apply(this, arguments);
|
||||
};
|
||||
exports.clearAuthSessions = clearAuthSessions;
|
||||
exports.logOutSessions = function() {
|
||||
return _logOutSessions.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _fetchAuthSessions() { // fn#102371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13652:126, offset: 0x022395b3, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun102373).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _logOutSessions() { // fn#102374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13652:454, offset: 0x022396b2, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun102376).apply(this, arguments);
|
||||
}
|
||||
|
||||
function clearAuthSessions() { // fn#102378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13652:1009, offset: 0x022397d1, size: 58 bytes, params: 1, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FETCH_AUTH_SESSIONS_SUCCESS',
|
||||
sessions: []});
|
||||
}
|
||||
|
||||
function* _fun102373() { // fn#102373, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13652:185, offset: 0x022395f0, size: 194 bytes, params: 1, frame: 17
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_0;
|
||||
const value3 = undefined;
|
||||
const HTTP = binding(env2_2[2]).HTTP;
|
||||
const get = HTTP.get;
|
||||
const AUTH_SESSIONS = env2_4.AUTH_SESSIONS;
|
||||
yield Reflect.apply(get, HTTP, [{url: AUTH_SESSIONS, rejectWithError: false}]);
|
||||
const value4 = undefined;
|
||||
if (true) {
|
||||
var r3 = value4 != null && value4.ok;
|
||||
r3 = r3 && (value4.body == null ? value3 : value4.body.user_sessions) != null;
|
||||
if (r3) {
|
||||
env2_1(env2_2[3]).dispatch({type: 'FETCH_AUTH_SESSIONS_SUCCESS', sessions: value4.body.user_sessions});
|
||||
}
|
||||
}
|
||||
return value4;
|
||||
}
|
||||
|
||||
function* _fun102376(a0) { // fn#102376, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13652:507, offset: 0x022396ef, size: 226 bytes, params: 2, frame: 17
|
||||
var r5;
|
||||
var HTTP;
|
||||
let value = a0;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(value)) {
|
||||
if (value.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
r5 = value;
|
||||
value = environment.__proto__.__proto__;
|
||||
HTTP = env2_0(env2_2[2]).HTTP;
|
||||
yield HTTP.post({url: env2_4.AUTH_SESSIONS_LOGOUT, body: {session_id_hashes: r5}, rejectWithError: false});
|
||||
} else {
|
||||
r5 = [value];
|
||||
value = environment.__proto__.__proto__;
|
||||
HTTP = env2_0(env2_2[2]).HTTP;
|
||||
yield HTTP.post({url: env2_4.AUTH_SESSIONS_LOGOUT, body: {session_id_hashes: r5}, rejectWithError: false});
|
||||
}
|
||||
const value4 = undefined;
|
||||
if (true) {
|
||||
if (value4 != null && value4.ok) {
|
||||
value = env2_1(env2_2[3]);
|
||||
value.dispatch({type: 'LOGOUT_AUTH_SESSIONS_SUCCESS', sessionIdHashes: r5});
|
||||
}
|
||||
}
|
||||
return value4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
/* Metro module 13259; source: modules/auth_sessions/AuthSessionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
|
||||
function _fun101098(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13449:6, offset: 0x0220812c, size: 328 bytes, params: 8, frame: 19
|
||||
const _arrayLikeToArray_101104 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = function() {
|
||||
env0_5 = [];
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
||||
let env0_5 = [];
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun101106(Store);
|
||||
value.displayName = 'AuthSessionsStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: closure,
|
||||
LOGIN_SUCCESS: closure, FETCH_AUTH_SESSIONS_SUCCESS: function({sessions}) {
|
||||
env0_5 = sessions.map(_fun101110);
|
||||
}, LOGOUT_AUTH_SESSIONS_SUCCESS: LOGOUT_AUTH_SESSIONS_SUCCESS});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth_sessions/AuthSessionsStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_101099() { // fn#101099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13449:150, offset: 0x02208274, 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_101099_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_101102(a0, a1) { // fn#101102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13449:343, offset: 0x022082d6, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun101103;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_101104(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_101104(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_101104(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun101103;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _fun101106(a0) { // fn#101106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13449:1295, offset: 0x0220844a, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = AuthSessionsStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'getSessions', value: value_101108}]);
|
||||
}
|
||||
|
||||
function FETCH_AUTH_SESSIONS_SUCCESS({sessions}) { // fn#101109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13449:1777, offset: 0x02208492, size: 39 bytes, params: 2, frame: 11
|
||||
const value = sessions.map(function(a0) {
|
||||
var r3;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r3);
|
||||
var Date = global.Date;
|
||||
object['approx_last_used_time'] = new Date(a0.approx_last_used_time);
|
||||
return object;
|
||||
});
|
||||
}
|
||||
|
||||
function LOGOUT_AUTH_SESSIONS_SUCCESS({sessionIdHashes}) { // fn#101111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13449:1940, offset: 0x022084f5, size: 111 bytes, params: 2, frame: 20
|
||||
var r6;
|
||||
var value4;
|
||||
var value5;
|
||||
arraySpread([], env0_5, 0, undefined);
|
||||
const closure = LOGOUT_AUTH_SESSIONS_SUCCESS_loop;
|
||||
const value2 = _createForOfIteratorHelperLoose_101102(sessionIdHashes);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r6 = value3;
|
||||
reducibleLoop1: while (true) {
|
||||
value4 = r6.value;
|
||||
closure(value4);
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break reducibleLoop1;
|
||||
}
|
||||
r6 = value5;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function LOGOUT_AUTH_SESSIONS_SUCCESS_loop(a0) { // fn#101112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13449:2032, owner: LOGOUT_AUTH_SESSIONS_SUCCESS._loop, offset: 0x02208564, size: 69 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
const index = env0_0.findIndex(_fun101113);
|
||||
if (index >= 0) {
|
||||
env0_0.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/* Metro module 13258; source: modules/auth_sessions/AuthSessionsUtils.tsx; dependencies: [31, 1226, 13259, 566, 1244, 3738, 2] */
|
||||
function _fun101091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13448:6, offset: 0x02207ea6, size: 166 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const authSessionsStore = importDefault(13259) /* metro dependency 13259: AuthSessionsStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth_sessions/AuthSessionsUtils.tsx');
|
||||
exports.useAuthSessions = useAuthSessions;
|
||||
exports.formatDate = formatDate;
|
||||
}
|
||||
|
||||
function useAuthSessions() { // fn#101092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13448:223, offset: 0x02207f4c, size: 94 bytes, params: 1, frame: 15
|
||||
return env0_3.useMemo(_fun101094,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([AuthSessionsStore], function() {
|
||||
return AuthSessionsStore.getSessions();
|
||||
})]);
|
||||
}
|
||||
|
||||
function formatDate(a0) { // fn#101097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13448:611, offset: 0x02208085, size: 167 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var intl;
|
||||
const Date = global.Date;
|
||||
let value = Date.now();
|
||||
value -= a0.valueOf();
|
||||
if (value / 1000 / 60 / 60 < 1) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TXCmfL);
|
||||
} else {
|
||||
value = (importDefault(3738) /* metro dependency 3738 */)(a0);
|
||||
value = value.fromNow();
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun101094() { // fn#101094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13448:334, offset: 0x02207fbd, size: 136 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
var r2;
|
||||
const binding = env0_0;
|
||||
const items2 = [];
|
||||
arraySpread(items2, binding, 0, undefined);
|
||||
let value = environment.__proto__;
|
||||
value = AuthenticationStore.getAuthSessionIdHash();
|
||||
const value2 = null;
|
||||
if (value2 != value) {
|
||||
value = items2.findIndex(_fun101095);
|
||||
r2 = value >= 0 ? items2.splice(value, 1)[0] : value2;
|
||||
} else {
|
||||
r2 = value2;
|
||||
}
|
||||
items2.sort(function(a0, a1) {
|
||||
return a1.approx_last_used_time.valueOf() - a0.approx_last_used_time.valueOf();
|
||||
});
|
||||
return {currentSession: r2, otherSessions: items2};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user