Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,50 @@
|
||||
/* Metro module 13386; source: modules/harvester/DataHarvestActionCreators.tsx; dependencies: [661, 694, 507, 7620, 2] */
|
||||
function _fun101929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13576:6, offset: 0x02224093, size: 139 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/harvester/DataHarvestActionCreators.tsx');
|
||||
exports.getDataHarvestStatus = getDataHarvestStatus;
|
||||
exports.requestDataHarvest = requestDataHarvest;
|
||||
}
|
||||
|
||||
function getDataHarvestStatus() { // fn#101930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13576:220, offset: 0x0222411e, size: 143 bytes, params: 1, frame: 16
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_DATA_HARVEST_TYPE_START'});
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const get = HTTP.get;
|
||||
const USER_HARVEST = Endpoints.USER_HARVEST;
|
||||
let value = Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
|
||||
url: USER_HARVEST}]);
|
||||
value = value.then(_fun101931);
|
||||
return value.catch(_fun101932);
|
||||
}
|
||||
|
||||
function requestDataHarvest(a0) { // fn#101933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13576:576, offset: 0x02224223, size: 60 bytes, params: 2, frame: 11
|
||||
let value = require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */;
|
||||
value = value.requestHarvest(a0);
|
||||
return value.then(_fun101934);
|
||||
}
|
||||
|
||||
function _fun101931({body}) { // fn#101931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13576:396, offset: 0x022241ad, size: 62 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPDATE_DATA_HARVEST_TYPE',
|
||||
harvestType: body});
|
||||
}
|
||||
|
||||
function _fun101932(a0) { // fn#101932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13576:481, offset: 0x022241eb, size: 56 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_DATA_HARVEST_TYPE_FAILURE',
|
||||
error: a0});
|
||||
}
|
||||
|
||||
function _fun101934(a0) { // fn#101934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13576:646, offset: 0x0222425f, size: 83 bytes, params: 2, frame: 13
|
||||
let value = a0 != null;
|
||||
if (value && a0.body != null) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'UPDATE_DATA_HARVEST_TYPE', harvestType: a0.body});
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Metro module 12554; source: modules/harvester/DataHarvestStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
|
||||
function _fun96050(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12744:6, offset: 0x02153ffa, size: 329 bytes, params: 8, frame: 18
|
||||
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 */;
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun96054(Store);
|
||||
value.displayName = 'DataHarvestStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
|
||||
env0_6 = undefined;
|
||||
}, UPDATE_DATA_HARVEST_TYPE: function({harvestType}) {
|
||||
env0_5 = false;
|
||||
env0_6 = harvestType;
|
||||
}, LOAD_DATA_HARVEST_TYPE_START: function() {
|
||||
env0_5 = true;
|
||||
}, LOAD_DATA_HARVEST_TYPE_FAILURE: function() {
|
||||
env0_5 = false;
|
||||
}, LOGOUT: function() {
|
||||
env0_5 = false;
|
||||
env0_6 = null;
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/harvester/DataHarvestStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_96051() { // fn#96051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12744:148, offset: 0x02154143, 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_96051_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun96054(a0) { // fn#96054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12744:365, offset: 0x021541a5, size: 99 bytes, params: 2, frame: 16
|
||||
const closure = DataHarvestStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'harvestType', get: get_96056}, {key: 'requestingHarvest', get: get_96057}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 13383; source: modules/harvester/HarvesterConstants.tsx; dependencies: [2] */
|
||||
function _fun101915(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13573:6, offset: 0x02223498, size: 97 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/harvester/HarvesterConstants.tsx');
|
||||
exports.REQUEST_DATA_LIMIT_DAYS = 30;
|
||||
exports.REQUEST_DATA_LIMIT_MS = 2592000000;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/* Metro module 13382; source: modules/harvester/HarvesterUtils.tsx; dependencies: [57, 31, 1878, 12554, 13383, 566, 2] */
|
||||
function _fun101906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13572:6, offset: 0x0222310a, size: 202 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const dataHarvestStore = importDefault(12554) /* metro dependency 12554: DataHarvestStore */;
|
||||
const env0_6 = (require(13383) /* metro dependency 13383: HarvesterConstants */).REQUEST_DATA_LIMIT_MS;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/harvester/HarvesterUtils.tsx');
|
||||
exports.harvestDisabled = harvestDisabled;
|
||||
exports.useRequestHarvestStatus = useRequestHarvestStatus;
|
||||
}
|
||||
|
||||
function harvestDisabled(a0, a1) { // fn#101907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13572:256, offset: 0x022231d4, size: 128 bytes, params: 3, frame: 16
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var Date;
|
||||
var created_at;
|
||||
var date;
|
||||
const verified = a1.verified;
|
||||
let value = !verified;
|
||||
if (verified) {
|
||||
value = a1.isStaff();
|
||||
if (value) {
|
||||
r1 = !!value;
|
||||
} else {
|
||||
value = a0 != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
value = Date.now();
|
||||
Date = global.Date;
|
||||
created_at = a0.created_at;
|
||||
date = new Date();
|
||||
value = REQUEST_DATA_LIMIT_MS > value - date.getTime();
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useRequestHarvestStatus() { // fn#101908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13572:404, offset: 0x02223254, size: 407 bytes, params: 1, frame: 19
|
||||
var r5;
|
||||
var Date;
|
||||
var created_at;
|
||||
var value4;
|
||||
var date;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const harvestType = (require(566) /* metro dependency 566: flux */).useStateFromStores([DataHarvestStore],
|
||||
function() {
|
||||
return DataHarvestStore.harvestType;
|
||||
});
|
||||
let binding = env0_3;
|
||||
const [property, env0_0] = env0_2(binding.useState(function() {
|
||||
var Date = global.Date;
|
||||
return Date.now();
|
||||
}), 2);
|
||||
if (harvestType == null) {
|
||||
r5 = property;
|
||||
} else {
|
||||
Date = global.Date;
|
||||
created_at = harvestType.created_at;
|
||||
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
r5 = (date instanceof Object ? date : value4).getTime() + REQUEST_DATA_LIMIT_MS;
|
||||
}
|
||||
binding = env0_3;
|
||||
var env0_2 = binding.useRef(null);
|
||||
binding.useEffect(_fun101912, [r5]);
|
||||
return currentUser == null ? {'allowed': false,
|
||||
'reason': 'not_verified'} : currentUser.verified ? currentUser.isStaff() ? {'allowed': false,
|
||||
'reason': 'staff'} : harvestType == null ? {allowed: true} : r5 > property ? {'allowed': false,
|
||||
'reason': 'rate_limited', nextAllowed: new global.Date()} : {allowed: true} : {'allowed': false,
|
||||
'reason': 'not_verified'};
|
||||
}
|
||||
|
||||
function _fun101912() { // fn#101912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13572:694, offset: 0x022233fa, size: 96 bytes, params: 1, frame: 16
|
||||
var value3;
|
||||
const binding = env0_1;
|
||||
const Date = global.Date;
|
||||
const value2 = binding - Date.now();
|
||||
if (value2 > 0) {
|
||||
value3 = global.setTimeout(_fun101913, value2);
|
||||
global.clearTimeout(env0_2.current);
|
||||
env0_2.current = value3;
|
||||
}
|
||||
return _fun101914;
|
||||
}
|
||||
|
||||
function _fun101913() { // fn#101913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13572:744, offset: 0x0222345a, size: 33 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_0;
|
||||
const Date = global.Date;
|
||||
return binding(Date.now());
|
||||
}
|
||||
|
||||
function _fun101914() { // fn#101914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13572:808, offset: 0x0222347b, size: 29 bytes, params: 1, frame: 11
|
||||
return global.clearTimeout(env1_2.current);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user