Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,63 @@
|
||||
/* Metro module 7693; source: modules/user_affinities/UserAffinitiesActionCreators.tsx; dependencies: [5078, 5221, 661, 694, 507, 2] */
|
||||
function _fun61450(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:6, offset: 0x01b40263, size: 164 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const consentStore = importDefault(5078) /* metro dependency 5078: ConsentStore */;
|
||||
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = constantsModule.Endpoints;
|
||||
const env0_6 = constantsModule.Consents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/UserAffinitiesActionCreators.tsx');
|
||||
exports.fetchUserAffinitiesV2 = fetchUserAffinitiesV2;
|
||||
}
|
||||
|
||||
function fetchUserAffinitiesV2() { // fn#61451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:267, offset: 0x01b40307, size: 221 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
var value2;
|
||||
var HTTP;
|
||||
let value = a0;
|
||||
if (UserAffinitiesV2Store.shouldFetch()) {
|
||||
if (ConsentStore.hasConsented(Consents.PERSONALIZATION)) {
|
||||
value2 = 3;
|
||||
importDefault(dependencyMap[value2]).dispatch({type: 'LOAD_USER_AFFINITIES_V2'});
|
||||
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
value = 0;
|
||||
value = HTTP.get({url: Endpoints.USER_AFFINITIES_V2,
|
||||
retries: !(value !== undefined) || value ? value2 : value,
|
||||
oldFormErrors: true, rejectWithError: false});
|
||||
value = value.then(_fun61452, _fun61454);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = global.Promise.resolve();
|
||||
}
|
||||
} else {
|
||||
r0 = global.Promise.resolve();
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun61452({body}) { // fn#61452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:515, offset: 0x01b403e4, size: 87 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
const dispatch = value.dispatch;
|
||||
const object2 = {type: 'LOAD_USER_AFFINITIES_V2_SUCCESS'};
|
||||
const user_affinities = body.user_affinities;
|
||||
object2.affineUsers = user_affinities.map(_fun61453);
|
||||
Reflect.apply(dispatch, value, [object2]);
|
||||
}
|
||||
|
||||
function _fun61454() { // fn#61454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:1168, offset: 0x01b40544, size: 49 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_USER_AFFINITIES_V2_FAILURE'});
|
||||
}
|
||||
|
||||
function _fun61453({other_user_id, user_segment, other_user_segment, is_friend, dm_probability, dm_rank, vc_probability, vc_rank, server_message_probability, server_message_rank, communication_probability, communication_rank}) { // fn#61453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:620, offset: 0x01b4043b, size: 265 bytes, params: 2, frame: 7
|
||||
return {otherUserId: other_user_id, userSegment: user_segment, otherUserSegment: other_user_segment,
|
||||
isFriend: is_friend, dmProbability: dm_probability ?? 0, dmRank: dm_rank ?? 0,
|
||||
vcProbability: vc_probability ?? 0, vcRank: vc_rank ?? 0,
|
||||
serverMessageProbability: server_message_probability ?? 0, serverMessageRank: server_message_rank ?? 0,
|
||||
communicationProbability: communication_probability ?? 0, communicationRank: communication_rank ?? 0};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 5222; source: modules/user_affinities/UserAffinitiesConstants.tsx; dependencies: [672, 2] */
|
||||
function _fun46236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5400:6, offset: 0x011a347c, size: 112 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const HOUR = Millis.HOUR;
|
||||
const value = 8 * HOUR;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/UserAffinitiesConstants.tsx');
|
||||
exports.USER_AFFINITY_TTL = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/* Metro module 5221; source: modules/user_affinities/UserAffinitiesV2Store.tsx; dependencies: [6, 7, 15, 17, 18, 3793, 5222, 566, 694, 2] */
|
||||
function _fun46213(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:6, offset: 0x011a2e60, size: 443 bytes, params: 8, frame: 21
|
||||
let 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 relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const env0_6 = (require(5222) /* metro dependency 5222: UserAffinitiesConstants */).USER_AFFINITY_TTL;
|
||||
const Map = global.Map;
|
||||
let map = new Map();
|
||||
Object = global.Object;
|
||||
copyDataProperties({}, Object.freeze({userAffinities: [], lastFetched: 0}), undefined);
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
map = _fun46220(PersistedStore);
|
||||
map.displayName = 'UserAffinitiesV2Store';
|
||||
map.persistKey = 'UserAffinitiesStoreV2';
|
||||
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {LOAD_USER_AFFINITIES_V2: function() {
|
||||
env0_8 = true;
|
||||
}, LOAD_USER_AFFINITIES_V2_SUCCESS: LOAD_USER_AFFINITIES_V2_SUCCESS, LOAD_USER_AFFINITIES_V2_FAILURE: function() {
|
||||
env0_8 = false;
|
||||
}, LOGOUT: LOGOUT_46235});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/UserAffinitiesV2Store.tsx');
|
||||
exports.default = map;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_46214() { // fn#46214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:187, offset: 0x011a301b, 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_46214_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function recomputeAffinities() { // fn#46217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:459, offset: 0x011a3079, size: 81 bytes, params: 1, frame: 14
|
||||
const Map = global.Map;
|
||||
const userAffinities = env0_10.userAffinities;
|
||||
const value2 = userAffinities.filter(function(a0) {
|
||||
return !RelationshipStore.isBlockedOrIgnored(a0.otherUserId);
|
||||
});
|
||||
let map = value2.map;
|
||||
map = new Map(Reflect.apply(map, value2, [function(a0) {
|
||||
return [a0.otherUserId, a0];
|
||||
}]));
|
||||
}
|
||||
|
||||
function _fun46220(a0) { // fn#46220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:602, offset: 0x011a3101, size: 277 bytes, params: 2, frame: 16
|
||||
const closure = UserAffinitiesV2Store;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'initialize', value: value_46222}, {key: 'shouldFetch', value: value_46223},
|
||||
{key: 'isFetching', value: value_46224}, {key: 'getUserAffinities', value: value_46225},
|
||||
{key: 'getUserAffinitiesMap', value: value_46226}, {key: 'compare', value: value_46227},
|
||||
{key: 'compareByDmProbability', value: value_46228}, {key: 'getUserAffinity', value: value_46229},
|
||||
{key: 'getState', value: value_46230}, {key: 'isHighlyAffinedVCUser', value: value_46231}]);
|
||||
}
|
||||
|
||||
function LOAD_USER_AFFINITIES_V2_SUCCESS({affineUsers}) { // fn#46233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:2176, offset: 0x011a33ee, size: 67 bytes, params: 2, frame: 12
|
||||
const binding = env0_10;
|
||||
const Date = global.Date;
|
||||
binding.lastFetched = Date.now();
|
||||
env0_10.userAffinities = affineUsers;
|
||||
recomputeAffinities();
|
||||
}
|
||||
|
||||
function LOGOUT_46235() { // fn#46235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:2394, offset: 0x011a343e, size: 62 bytes, params: 1, frame: 12
|
||||
copyDataProperties({}, env0_9, undefined);
|
||||
const Map = global.Map;
|
||||
const map = new Map();
|
||||
}
|
||||
|
||||
function value_46222(a0) { // fn#46222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:937, offset: 0x011a3216, size: 104 bytes, params: 2, frame: 14
|
||||
var binding;
|
||||
this.waitFor(RelationshipStore);
|
||||
if (a0 != null) {
|
||||
binding = env1_10;
|
||||
binding.userAffinities = a0.userAffinities;
|
||||
binding = env1_10;
|
||||
binding.lastFetched = a0.lastFetched;
|
||||
recomputeAffinities();
|
||||
}
|
||||
this.syncWith([RelationshipStore], recomputeAffinities);
|
||||
}
|
||||
|
||||
function value_46223() { // fn#46223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1126, offset: 0x011a327e, size: 55 bytes, params: 1, frame: 10
|
||||
if (env1_8) {
|
||||
return undefined;
|
||||
}
|
||||
const Date = global.Date;
|
||||
return Date.now() - env1_10.lastFetched > USER_AFFINITY_TTL;
|
||||
}
|
||||
|
||||
function value_46225() { // fn#46225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1256, offset: 0x011a32b5, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.userAffinities;
|
||||
}
|
||||
|
||||
function value_46227(a0, a1) { // fn#46227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1370, offset: 0x011a32c4, size: 99 bytes, params: 3, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const value2 = env1_7.get(a1);
|
||||
const value3 = undefined;
|
||||
const communicationProbability = value2 == null ? value3 : value2.communicationProbability;
|
||||
const value4 = 0;
|
||||
const r0 = communicationProbability ?? value4;
|
||||
value = env1_7.get(a0);
|
||||
return r0 - ((value == null ? value3 : value.communicationProbability) ?? value4);
|
||||
}
|
||||
|
||||
function value_46228(a0, a1) { // fn#46228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1578, offset: 0x011a3327, size: 99 bytes, params: 3, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const value2 = env1_7.get(a1);
|
||||
const value3 = undefined;
|
||||
const dmProbability = value2 == null ? value3 : value2.dmProbability;
|
||||
const value4 = 0;
|
||||
const r0 = dmProbability ?? value4;
|
||||
value = env1_7.get(a0);
|
||||
return r0 - ((value == null ? value3 : value.dmProbability) ?? value4);
|
||||
}
|
||||
|
||||
function value_46231(a0) { // fn#46231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1866, offset: 0x011a33a0, size: 65 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (env1_7.get(a0)?.vcProbability ?? 0) > 0.5;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Metro module 8321; source: modules/user_affinities/VoiceUserAffinityExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun66262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8506:6, offset: 0x01bf5482, size: 218 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'kind': 'user', 'name': '2025-08-voice-user-affinity',
|
||||
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false, sortType: undefined}, [1]: {'enabled': true,
|
||||
'sortType': 'vc_probability'}, [2]: {'enabled': true, 'sortType': 'communication_probability'}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/VoiceUserAffinityExperiment.tsx');
|
||||
exports.default = value;
|
||||
exports.getVoiceUserAffinitySortType = getVoiceUserAffinitySortType;
|
||||
exports.useVoiceUserAffinitySortType = useVoiceUserAffinitySortType;
|
||||
}
|
||||
|
||||
function getVoiceUserAffinitySortType(a0) { // fn#66263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8506:481, offset: 0x01bf555c, size: 35 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
const getConfig = binding.getConfig;
|
||||
return Reflect.apply(getConfig, binding, [{location: a0}]).sortType;
|
||||
}
|
||||
|
||||
function useVoiceUserAffinitySortType(a0) { // fn#66264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8506:596, offset: 0x01bf557f, size: 35 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
const useConfig = binding.useConfig;
|
||||
return Reflect.apply(useConfig, binding, [{location: a0}]).sortType;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 8320; source: modules/user_affinities/maybeSortByProbability.tsx; dependencies: [8321, 2] */
|
||||
function _fun66258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:6, offset: 0x01bf52b8, size: 96 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/maybeSortByProbability.tsx');
|
||||
exports.maybeSortByProbability = maybeSortByProbability;
|
||||
}
|
||||
|
||||
function maybeSortByProbability(a0, a1, a2) { // fn#66259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:202, offset: 0x01bf5318, size: 144 bytes, params: 4, frame: 17
|
||||
var r1;
|
||||
var r0;
|
||||
var items2;
|
||||
let value = a0;
|
||||
const env0_0 = a1;
|
||||
const voiceUserAffinitySortType = (require(8321) /* metro dependency 8321: VoiceUserAffinityExperiment */).getVoiceUserAffinitySortType(a2);
|
||||
if (voiceUserAffinitySortType == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
if (voiceUserAffinitySortType === 'vc_probability') {
|
||||
items2 = [];
|
||||
arraySpread(items2, value, 0, undefined);
|
||||
value = items2.sort(_fun66260);
|
||||
r1 = value;
|
||||
} else {
|
||||
items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = items2.sort(_fun66261);
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66260({id}, {id}) { // fn#66260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:338, offset: 0x01bf53a8, size: 109 bytes, params: 3, frame: 15
|
||||
return (require.get(id)?.vcProbability ?? 0) - (require.get(id)?.vcProbability ?? 0);
|
||||
}
|
||||
|
||||
function _fun66261({id}, {id}) { // fn#66261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:502, offset: 0x01bf5415, size: 109 bytes, params: 3, frame: 15
|
||||
return (require.get(id)?.communicationProbability ?? 0) - (require.get(id)?.communicationProbability ?? 0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user