This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,61 +1,64 @@
/* Metro module 8055; source: modules/interactions/InteractionActionCreators.tsx; dependencies: [5, 661, 694, 507, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun63897(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:6, offset: 0x01b9504c, size: 180 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/interactions/InteractionActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interactions/InteractionActionCreators.tsx');
exports.queueInteractionComponentState = queueInteractionComponentState;
exports.addQueued = addQueued;
exports.setFailed = setFailed;
exports.fetchMessageInteractionData = function() {
return _fetchMessageInteractionData.apply(this, arguments);
};
}
function _fetchMessageInteractionData() { // fn#63898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:126, offset: 0x01b95100, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun63900).apply(this, arguments);
function* _fun63900(a0, a1) { // fn#63900, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:205, offset: 0x01b95139, size: 181 bytes, params: 3, frame: 19
var body;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[3]).HTTP;
const get = HTTP.get;
const object = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object.url = env2_4.MESSAGE_INTERACTION_DATA(a0, a1);
yield Reflect.apply(get, HTTP, [object]);
const value3 = undefined;
if (false) {
return value3;
}
if (value3.ok) {
body = value3.body;
value = env2_1(env2_2[2]);
value.dispatch({type: 'LOAD_MESSAGE_INTERACTION_DATA_SUCCESS', channelId: a0, messageId: a1,
interactionData: body});
return body;
}
return null;
}
function _fetchMessageInteractionData() { // fn#63898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:126, offset: 0x01b95100, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun63900).apply(this, arguments);
}
function queueInteractionComponentState(a0, a1, a2, a3) { // fn#63901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:617, offset: 0x01b951ee, size: 79 bytes, params: 5, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'QUEUE_INTERACTION_COMPONENT_STATE',
messageId: a0, nonce: a1, state: a2, componentId: a3});
}
function addQueued(a0, {data, messageId, preflight, onCreate, onSuccess, onFailure}) { // fn#63902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:782, offset: 0x01b9523d, size: 120 bytes, params: 3, frame: 19
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'INTERACTION_QUEUE', data: data, nonce: a0, messageId: messageId, preflight: preflight,
onCreate: onCreate, onSuccess: onSuccess, onFailure: onFailure});
}
function setFailed(a0, a1, a2, a3) { // fn#63903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:1004, offset: 0x01b952b5, size: 78 bytes, params: 5, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'INTERACTION_FAILURE', nonce: a0,
errorMessage: a2, errorCode: a1, status: a3});
}
function* _fun63900(a0, a1) { // fn#63900, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:205, offset: 0x01b95139, size: 181 bytes, params: 3, frame: 19
var body;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[3]).HTTP;
const get = HTTP.get;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object2.url = env2_4.MESSAGE_INTERACTION_DATA(a0, a1);
yield Reflect.apply(get, HTTP, [object2]);
const value3 = undefined;
if (false) {
return value3;
function queueInteractionComponentState(a0, a1, a2, a3) { // fn#63901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:617, offset: 0x01b951ee, size: 79 bytes, params: 5, frame: 13
(Dispatcher).dispatch({type: 'QUEUE_INTERACTION_COMPONENT_STATE',
messageId: a0, nonce: a1, state: a2, componentId: a3});
}
if (value3.ok) {
body = value3.body;
value = env2_1(env2_2[2]);
value.dispatch({type: 'LOAD_MESSAGE_INTERACTION_DATA_SUCCESS', channelId: a0, messageId: a1,
interactionData: body});
return body;
function addQueued(a0, {data, messageId, preflight, onCreate, onSuccess, onFailure}) { // fn#63902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:782, offset: 0x01b9523d, size: 120 bytes, params: 3, frame: 19
Dispatcher.dispatch({type: 'INTERACTION_QUEUE', data: data, nonce: a0, messageId: messageId, preflight: preflight,
onCreate: onCreate, onSuccess: onSuccess, onFailure: onFailure});
}
return null;
function setFailed(a0, a1, a2, a3) { // fn#63903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8233:1004, offset: 0x01b952b5, size: 78 bytes, params: 5, frame: 13
(Dispatcher).dispatch({type: 'INTERACTION_FAILURE', nonce: a0,
errorMessage: a2, errorCode: a1, status: a3});
}
}
global.__d(_fun63897, 8055, [5, 661, 694, 507, 2]) /* metro module 8055, dependencies: [5, 661, 694, 507, 2] */;
+362 -338
View File
@@ -1,16 +1,21 @@
/* Metro module 8057; source: modules/interactions/InteractionStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 1226, 1379, 672, 4629, 1909, 7067, 566, 694, 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 Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as InteractionTypesModule from './InteractionTypes.tsx'; /* Metro dependency 4629 */
function _fun63924(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:6, offset: 0x01b96662, size: 563 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = importDefault(57) /* metro dependency 57 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const MINUTE = Millis.MINUTE;
const value = 5 * MINUTE;
@@ -21,7 +26,7 @@ function _fun63924(global, require, importDefault, importAll, module, exports, d
const env0_14 = {};
const env0_15 = {};
const env0_18 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
const value3 = _fun63930(Store);
value3.displayName = 'InteractionStore';
const value6 = new value3(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_63939,
@@ -40,357 +45,376 @@ function _fun63924(global, require, importDefault, importAll, module, exports, d
}, INTERACTION_MODAL_CREATE: function({nonce}) {
markInteractionByNonceCompleted(nonce);
}, EMBEDDED_ACTIVITY_UPDATE_V2: EMBEDDED_ACTIVITY_UPDATE_V2_63951});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interactions/InteractionStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interactions/InteractionStore.tsx');
exports.default = value6;
exports.STALE_INTERACTION_INTERVAL = value;
exports.STALE_INTERACTION_DURATION = value2;
}
function _isNativeReflectConstruct_63925() { // fn#63925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:178, offset: 0x01b96895, 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_63925_isNativeReflectConstruct = function() {
return !!result;
})();
}
function markInteractionByNonceCompleted(a0) { // fn#63928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:466, offset: 0x01b968f3, size: 65 bytes, params: 2, frame: 13
if (a0 == null) {
return false;
}
const property = env0_13[a0];
if (property == null) {
return false;
}
if (property.onSuccess != null) {
property.onSuccess();
}
deleteNonce(a0);
}
function deleteNonce(a0) { // fn#63929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:609, offset: 0x01b96934, size: 124 bytes, params: 2, frame: 14
var property;
var property2;
var binding;
var object2;
if (env0_18[a0] == null) {
property = env0_13[a0];
delete env0_13[a0];
property2 = env0_15[a0];
if (property2 != null) {
delete env0_14[property2];
function _isNativeReflectConstruct_63925() { // fn#63925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:178, offset: 0x01b96895, 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) {
}
delete env0_15[a0];
binding = env0_18;
object2 = {};
object2.insertedAt = global.Date.now();
object2.nonce = a0;
object2.messageId = property2;
object2.interaction = property;
binding[a0] = object2;
} else {
delete env0_18[a0];
return (_isNativeReflectConstruct_63925_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function _fun63930(a0) { // fn#63930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:801, offset: 0x01b969b0, size: 216 bytes, params: 2, frame: 16
const closure = InteractionStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, ChannelStore);
}}, {key: 'getInteraction', value: value_63933}, {key: 'getMessageInteractionStates', value: value_63934},
{key: 'canQueueInteraction', value: value_63935}, {key: 'getIFrameModalApplicationId', value: value_63936},
{key: 'getIFrameModalKey', value: value_63937}, {key: 'getInteractionDebugContext', value: value_63938}]);
}
function LOGOUT_63939() { // fn#63939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2003, offset: 0x01b96c41, size: 56 bytes, params: 1, frame: 13
env0_13 = {};
env0_14 = {};
env0_15 = {};
env0_18 = {};
global.setInterval(_fun63940, env0_11);
}
function INTERACTION_QUEUE({nonce, messageId, data, onCreate, onCancel, onSuccess, onFailure}) { // fn#63941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2209, offset: 0x01b96cf8, size: 145 bytes, params: 2, frame: 19
if (messageId != null) {
env0_14[messageId] = nonce;
env0_15[nonce] = messageId;
}
const binding = env0_13;
const InteractionState = (require(4629) /* metro dependency 4629: InteractionTypes */).InteractionState;
const QUEUED = InteractionState.QUEUED;
binding[nonce] = {state: QUEUED, data: data, onCreate: onCreate, onCancel: onCancel, onSuccess: onSuccess,
onFailure: onFailure};
}
function INTERACTION_CREATE({nonce, interactionId}) { // fn#63942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2460, offset: 0x01b96d89, size: 145 bytes, params: 2, frame: 17
if (nonce == null) {
return false;
}
const property = env0_13[nonce];
if (property == null) {
return false;
}
const state = property.state;
const InteractionState = (require(4629) /* metro dependency 4629: InteractionTypes */).InteractionState;
const QUEUED = InteractionState.QUEUED;
if (state !== QUEUED) {
return false;
}
const CREATED = InteractionState.CREATED;
property.state = CREATED;
if (property.onCreate != null) {
property.onCreate(interactionId);
}
}
function INTERACTION_FAILURE_63944({nonce, errorCode, errorMessage, status, reasonCode}) { // fn#63944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2809, offset: 0x01b96e33, size: 243 bytes, params: 2, frame: 21
var r11;
var binding;
var object2;
if (nonce == null) {
return false;
}
const property = env0_13[nonce];
if (property == null) {
return false;
}
if (property.onFailure != null) {
property.onFailure(errorCode, errorMessage, status, reasonCode);
r11 = status;
}
const interactionType = property.data.interactionType;
const InteractionTypes = (require(1909) /* metro dependency 1909: Server */).InteractionTypes;
const APPLICATION_COMMAND = InteractionTypes.APPLICATION_COMMAND;
if (interactionType === APPLICATION_COMMAND) {
deleteNonce(nonce);
} else {
binding = env0_13;
object2 = {};
copyDataProperties(object2, property, r11);
object2['state'] = (require(4629) /* metro dependency 4629: InteractionTypes */).InteractionState.FAILED;
object2['errorCode'] = errorCode;
object2['errorMessage'] = errorMessage;
binding[nonce] = object2;
}
}
function MESSAGE_CREATE_63945({message}) { // fn#63945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:3173, offset: 0x01b96f26, size: 88 bytes, params: 2, frame: 13
if (message.nonce == null) {
return false;
}
const property = env0_13[message.nonce];
if (property == null) {
return false;
}
if (property.onSuccess != null) {
property.onSuccess();
}
deleteNonce(message.nonce);
}
function CHANNEL_SELECT_63946({channelId}) { // fn#63946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:3348, offset: 0x01b96f7e, size: 171 bytes, params: 2, frame: 21
var r2;
var property;
var value5;
var state;
var InteractionState;
var FAILED;
var value6;
if (ChannelStore.getChannel(channelId) == null) {
return false;
}
const Object = global.Object;
const value3 = Object.entries(env0_13);
let length = value3.length;
if (0 < length) {
r2 = 0;
while (true) {
property = value3[r2];
value5 = env0_8(property, 2);
property = value5[0];
state = value5[1].state;
InteractionState = (require(4629) /* metro dependency 4629: InteractionTypes */).InteractionState;
FAILED = InteractionState.FAILED;
if (state === FAILED) {
deleteNonce(property);
}
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value3.length;
if (value6 < length) {
r2 = value6;
continue;
}
break;
function markInteractionByNonceCompleted(a0) { // fn#63928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:466, offset: 0x01b968f3, size: 65 bytes, params: 2, frame: 13
if (a0 == null) {
return false;
}
const property = env0_13[a0];
if (property == null) {
return false;
}
if (property.onSuccess != null) {
property.onSuccess();
}
deleteNonce(a0);
}
}
function EMBEDDED_ACTIVITY_UPDATE_V2_63951({participants}) { // fn#63951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:4010, offset: 0x01b97073, size: 246 bytes, params: 2, frame: 18
var r0;
var r4;
var nonce;
var binding;
var property;
var messageId;
var value;
const env0_0 = AuthenticationStore.getSessionId();
const env0_1 = AuthenticationStore.getId();
const value2 = participants.find(_fun63952);
if (value2 != null) {
nonce = value2.nonce;
if (nonce != null) {
function deleteNonce(a0) { // fn#63929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:609, offset: 0x01b96934, size: 124 bytes, params: 2, frame: 14
var property;
var property2;
var binding;
var object;
if (env0_18[a0] == null) {
property = env0_13[a0];
delete env0_13[a0];
property2 = env0_15[a0];
if (property2 != null) {
delete env0_14[property2];
}
delete env0_15[a0];
binding = env0_18;
nonce = value2.nonce;
property = binding[nonce];
if (property == null) {
binding = env0_15;
nonce = value2.nonce;
property = binding[nonce];
binding = env0_13;
nonce = value2.nonce;
r0 = binding[nonce];
r4 = property;
} else {
messageId = property.messageId;
r0 = property.interaction;
r4 = messageId;
object = {};
object.insertedAt = global.Date.now();
object.nonce = a0;
object.messageId = property2;
object.interaction = property;
binding[a0] = object;
} else {
delete env0_18[a0];
}
}
function _fun63930(a0) { // fn#63930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:801, offset: 0x01b969b0, size: 216 bytes, params: 2, frame: 16
const InteractionStore2 = InteractionStore;
Inherits(InteractionStore2, a0);
return CreateClass(InteractionStore2, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, ChannelStore);
}}, {key: 'getInteraction', value: value_63933}, {key: 'getMessageInteractionStates', value: value_63934},
{key: 'canQueueInteraction', value: value_63935}, {key: 'getIFrameModalApplicationId', value: value_63936},
{key: 'getIFrameModalKey', value: value_63937}, {key: 'getInteractionDebugContext', value: value_63938}]);
function InteractionStore() { // fn#63931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:813, offset: 0x00e07435, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, InteractionStore);
const value3 = env1_6(InteractionStore);
return env1_5(this, _isNativeReflectConstruct_63925() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_63933({id}) { // fn#63933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:1170, offset: 0x01b96aa6, size: 38 bytes, params: 2, frame: 4
const property = env1_14[id];
return property != null ? env1_13[property] : null;
}
function value_63934() { // fn#63934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:1264, offset: 0x01b96acc, size: 111 bytes, params: 1, frame: 21
var r2;
var property;
var value4;
var property2;
var state;
var value5;
const object = {};
const Object = global.Object;
const value2 = Object.entries(env1_13);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
r2 = value3;
while (true) {
property = value2[r2];
value4 = env1_8(property, 2);
property = value4[value3];
property2 = value4[1];
property = env1_15[property];
if (property != null) {
state = property2.state;
object[property] = state;
}
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value2.length;
if (value5 < length) {
r2 = value5;
continue;
}
break;
}
}
if (r0 != null && r4 != null) {
deleteNonce(value2.nonce);
if (r4 != null && 'channelId' in r0.data) {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.deleteMessage(r0.data.channelId, r4, true);
return object;
}
function value_63935(a0, a1) { // fn#63935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:1437, offset: 0x01b96b3b, size: 169 bytes, params: 3, frame: 16
const InteractionState = (InteractionTypesModule).InteractionState;
const value = environment.__proto__;
const property = env1_14[a0];
let r0 = property != null && env1_13[property] != null && env1_13[property].state !== InteractionState.FAILED;
r0 = !r0 ? env1_13[a1] != null && env1_13[a1].state !== InteractionState.FAILED : r0;
return !r0;
}
function value_63936() { // fn#63936, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
function value_63937() { // fn#63937, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function value_63938(a0) { // fn#63938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:1753, offset: 0x01b96be4, size: 93 bytes, params: 2, frame: 7
var value;
var property;
if (a0 != null) {
value = environment.__proto__;
property = env1_13[a0];
if (property != null) {
return {interaction: property, messageId: env1_15[a0]};
}
property = env1_18[a0];
value = undefined;
return property != null ? {interaction: property.interaction, messageId: property.messageId} : value;
}
}
}
function LOGOUT_63939() { // fn#63939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2003, offset: 0x01b96c41, size: 56 bytes, params: 1, frame: 13
env0_13 = {};
env0_14 = {};
env0_15 = {};
env0_18 = {};
global.setInterval(_fun63940, env0_11);
function _fun63940() { // fn#63940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2058, offset: 0x01b96c79, size: 127 bytes, params: 1, frame: 20
var r2;
var property;
var value5;
var insertedAt;
var value6;
var value7;
const Date = global.Date;
const value = Date.now();
const Object = global.Object;
const value3 = Object.entries(env1_18);
let length = value3.length;
const value4 = 0;
if (value4 < length) {
r2 = value4;
while (true) {
property = value3[r2];
value5 = env1_8(property, 2);
property = value5[value4];
insertedAt = value5[1].insertedAt;
value6 = value - insertedAt;
if (value6 > env1_12) {
delete env1_18[property];
}
value7 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value3.length;
if (value7 < length) {
r2 = value7;
continue;
}
break;
}
}
}
}
}
function value_63933({id}) { // fn#63933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:1170, offset: 0x01b96aa6, size: 38 bytes, params: 2, frame: 4
const property = env1_14[id];
return property != null ? env1_13[property] : null;
}
function INTERACTION_QUEUE({nonce, messageId, data, onCreate, onCancel, onSuccess, onFailure}) { // fn#63941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2209, offset: 0x01b96cf8, size: 145 bytes, params: 2, frame: 19
if (messageId != null) {
env0_14[messageId] = nonce;
env0_15[nonce] = messageId;
}
const binding = env0_13;
const InteractionState = (InteractionTypesModule).InteractionState;
const QUEUED = InteractionState.QUEUED;
binding[nonce] = {state: QUEUED, data: data, onCreate: onCreate, onCancel: onCancel, onSuccess: onSuccess,
onFailure: onFailure};
}
function value_63934() { // fn#63934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:1264, offset: 0x01b96acc, size: 111 bytes, params: 1, frame: 21
var r2;
var property;
var value4;
var property2;
var state;
var value5;
const object2 = {};
const Object = global.Object;
const value2 = Object.entries(env1_13);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
r2 = value3;
while (true) {
property = value2[r2];
value4 = env1_8(property, 2);
property = value4[value3];
property2 = value4[1];
property = env1_15[property];
if (property != null) {
state = property2.state;
object2[property] = state;
}
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value2.length;
if (value5 < length) {
r2 = value5;
continue;
}
break;
function INTERACTION_CREATE({nonce, interactionId}) { // fn#63942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2460, offset: 0x01b96d89, size: 145 bytes, params: 2, frame: 17
if (nonce == null) {
return false;
}
const property = env0_13[nonce];
if (property == null) {
return false;
}
const state = property.state;
const InteractionState = (InteractionTypesModule).InteractionState;
const QUEUED = InteractionState.QUEUED;
if (state !== QUEUED) {
return false;
}
const CREATED = InteractionState.CREATED;
property.state = CREATED;
if (property.onCreate != null) {
property.onCreate(interactionId);
}
}
return object2;
}
function value_63935(a0, a1) { // fn#63935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:1437, offset: 0x01b96b3b, size: 169 bytes, params: 3, frame: 16
const InteractionState = (require(4629) /* metro dependency 4629: InteractionTypes */).InteractionState;
const value = environment.__proto__;
const property = env1_14[a0];
let r0 = property != null && env1_13[property] != null && env1_13[property].state !== InteractionState.FAILED;
r0 = !r0 ? env1_13[a1] != null && env1_13[a1].state !== InteractionState.FAILED : r0;
return !r0;
}
function value_63938(a0) { // fn#63938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:1753, offset: 0x01b96be4, size: 93 bytes, params: 2, frame: 7
var value;
var property;
if (a0 != null) {
value = environment.__proto__;
property = env1_13[a0];
if (property != null) {
return {interaction: property, messageId: env1_15[a0]};
function INTERACTION_FAILURE_63944({nonce, errorCode, errorMessage, status, reasonCode}) { // fn#63944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2809, offset: 0x01b96e33, size: 243 bytes, params: 2, frame: 21
var r11;
var binding;
var object;
if (nonce == null) {
return false;
}
property = env1_18[a0];
value = undefined;
return property != null ? {interaction: property.interaction, messageId: property.messageId} : value;
}
}
function _fun63940() { // fn#63940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:2058, offset: 0x01b96c79, size: 127 bytes, params: 1, frame: 20
var r2;
var property;
var value5;
var insertedAt;
var value6;
var value7;
const Date = global.Date;
const value = Date.now();
const Object = global.Object;
const value3 = Object.entries(env1_18);
let length = value3.length;
const value4 = 0;
if (value4 < length) {
r2 = value4;
while (true) {
property = value3[r2];
value5 = env1_8(property, 2);
property = value5[value4];
insertedAt = value5[1].insertedAt;
value6 = value - insertedAt;
if (value6 > env1_12) {
delete env1_18[property];
}
value7 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value3.length;
if (value7 < length) {
r2 = value7;
continue;
}
break;
const property = env0_13[nonce];
if (property == null) {
return false;
}
if (property.onFailure != null) {
property.onFailure(errorCode, errorMessage, status, reasonCode);
r11 = status;
}
const interactionType = property.data.interactionType;
const InteractionTypes = (ServerModule).InteractionTypes;
const APPLICATION_COMMAND = InteractionTypes.APPLICATION_COMMAND;
if (interactionType === APPLICATION_COMMAND) {
deleteNonce(nonce);
} else {
binding = env0_13;
object = {};
copyDataProperties(object, property, r11);
object['state'] = (require(4629) /* metro dependency 4629: InteractionTypes */).InteractionState.FAILED;
object['errorCode'] = errorCode;
object['errorMessage'] = errorMessage;
binding[nonce] = object;
}
}
function MESSAGE_CREATE_63945({message}) { // fn#63945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:3173, offset: 0x01b96f26, size: 88 bytes, params: 2, frame: 13
if (message.nonce == null) {
return false;
}
const property = env0_13[message.nonce];
if (property == null) {
return false;
}
if (property.onSuccess != null) {
property.onSuccess();
}
deleteNonce(message.nonce);
}
function CHANNEL_SELECT_63946({channelId}) { // fn#63946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:3348, offset: 0x01b96f7e, size: 171 bytes, params: 2, frame: 21
var r2;
var property;
var value5;
var state;
var InteractionState;
var FAILED;
var value6;
if (ChannelStore.getChannel(channelId) == null) {
return false;
}
const Object = global.Object;
const value3 = Object.entries(env0_13);
let length = value3.length;
if (0 < length) {
r2 = 0;
while (true) {
property = value3[r2];
value5 = Module00057(property, 2);
property = value5[0];
state = value5[1].state;
InteractionState = (require(4629) /* metro dependency 4629: InteractionTypes */).InteractionState;
FAILED = InteractionState.FAILED;
if (state === FAILED) {
deleteNonce(property);
}
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value3.length;
if (value6 < length) {
r2 = value6;
continue;
}
break;
}
}
}
function EMBEDDED_ACTIVITY_UPDATE_V2_63951({participants}) { // fn#63951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:4010, offset: 0x01b97073, size: 246 bytes, params: 2, frame: 18
var r0;
var r4;
var nonce;
var binding;
var property;
var messageId;
var value;
const authenticationStoreBinding = AuthenticationStore;
const env0_0 = authenticationStoreBinding.getSessionId();
const env0_1 = authenticationStoreBinding.getId();
const value2 = participants.find(_fun63952);
if (value2 != null) {
nonce = value2.nonce;
if (nonce != null) {
binding = env0_18;
nonce = value2.nonce;
property = binding[nonce];
if (property == null) {
binding = env0_15;
nonce = value2.nonce;
property = binding[nonce];
binding = env0_13;
nonce = value2.nonce;
r0 = binding[nonce];
r4 = property;
} else {
messageId = property.messageId;
r0 = property.interaction;
r4 = messageId;
}
if (r0 != null && r4 != null) {
deleteNonce(value2.nonce);
if (r4 != null && 'channelId' in r0.data) {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.deleteMessage(r0.data.channelId, r4, true);
}
}
}
}
function _fun63952(a0) { // fn#63952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:4113, offset: 0x01b97169, size: 39 bytes, params: 2, frame: 4
const user_id = a0.user_id;
return user_id === env0_1 && a0.session_id === env0_0;
}
}
}
function _fun63952(a0) { // fn#63952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8235:4113, offset: 0x01b97169, size: 39 bytes, params: 2, frame: 4
const user_id = a0.user_id;
return user_id === env0_1 && a0.session_id === env0_0;
}
global.__d(_fun63924, 8057, [6, 7, 15, 17, 18, 57, 1226, 1379, 672, 4629, 1909, 7067, 566, 694,
2]) /* metro module 8057, dependencies: [6, 7, 15, 17, 18, 57, 1226, 1379, 672, 4629, 1909, 7067, 566, 694, 2] */;
@@ -1,15 +1,17 @@
/* Metro module 4629; source: modules/interactions/InteractionTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun39839(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4807:6, offset: 0x010ed593, size: 128 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {QUEUED: 0};
object2[0] = 'QUEUED';
object2.CREATED = 1;
object2[1] = 'CREATED';
object2.FAILED = 2;
object2[2] = 'FAILED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interactions/InteractionTypes.tsx');
exports.InteractionState = object2;
object = {QUEUED: 0};
object[0] = 'QUEUED';
object.CREATED = 1;
object[1] = 'CREATED';
object.FAILED = 2;
object[2] = 'FAILED';
(FileImportTrackerModule).fileFinishedImporting('modules/interactions/InteractionTypes.tsx');
exports.InteractionState = object;
}
global.__d(_fun39839, 4629, [2]) /* metro module 4629, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
+49 -46
View File
@@ -1,63 +1,66 @@
/* Metro module 8058; source: modules/interactions/SkemaUtils.tsx; dependencies: [57, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun63953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8236:6, offset: 0x01b97190, size: 121 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interactions/SkemaUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interactions/SkemaUtils.tsx');
exports.getFirstSkemaError = function(a0) {
return getFirstSkemaFieldError(a0, undefined);
};
}
function getFirstSkemaFieldError(a0, a1) { // fn#63954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8236:118, offset: 0x01b97209, size: 173 bytes, params: 3, frame: 23
var r8;
var Array;
var value5;
var property2;
var value6;
const value = a1;
let property = a0[env0_1];
if (property != null) {
Array = global.Array;
reducibleJoin2: while (true) {
if (Array.isArray(property)) {
return property[0];
function getFirstSkemaFieldError(a0, a1) { // fn#63954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8236:118, offset: 0x01b97209, size: 173 bytes, params: 3, frame: 23
var r8;
var Array;
var value5;
var property2;
var value6;
const value = a1;
let property = a0[env0_1];
if (property != null) {
Array = global.Array;
reducibleJoin2: while (true) {
if (Array.isArray(property)) {
return property[0];
}
break reducibleJoin2;
}
break reducibleJoin2;
}
}
const Object = global.Object;
const value3 = Object.entries(a0);
let length = value3.length;
const value4 = 0;
if (value4 < length) {
r8 = value4;
reducibleLoop3: while (true) {
property = value3[r8];
value5 = env0_0(property, 2);
property = value5[value4];
property2 = value5[1];
if (property !== env0_1) {
reducibleJoin6: while (true) {
if (property2 == null) {
const Object = global.Object;
const value3 = Object.entries(a0);
let length = value3.length;
const value4 = 0;
if (value4 < length) {
r8 = value4;
reducibleLoop3: while (true) {
property = value3[r8];
value5 = Module00057(property, 2);
property = value5[value4];
property2 = value5[1];
if (property !== env0_1) {
reducibleJoin6: while (true) {
if (property2 == null) {
break reducibleJoin6;
}
if (typeof property2 === 'object') {
break reducibleLoop3;
}
break reducibleJoin6;
}
if (typeof property2 === 'object') {
break reducibleLoop3;
}
break reducibleJoin6;
}
value6 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
length = value3.length;
if (!(value6 < length)) {
return null;
}
r8 = value6;
continue reducibleLoop3;
}
value6 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
length = value3.length;
if (!(value6 < length)) {
return null;
}
r8 = value6;
continue reducibleLoop3;
return getFirstSkemaFieldError(property2, value ?? property);
}
return getFirstSkemaFieldError(property2, value ?? property);
return null;
}
return null;
}
global.__d(_fun63953, 8058, [57, 2]) /* metro module 8058, dependencies: [57, 2] */;