Files
2026-07-28 01:06:53 +03:00

77 lines
4.6 KiB
TypeScript

/* Metro module 4692; source: lib/uploader/UploadTargets.tsx; dependencies: [6, 7, 1379, 661, 4655, 4651, 4693, 4695, 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 ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as FileUtilsModule from '../../utils/FileUtils.tsx'; /* Metro dependency 4655 */
function _fun40570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:6, offset: 0x0110535c, size: 256 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_9 = _fun40571();
object = {MESSAGE_ATTACHMENT: 0};
object[0] = 'MESSAGE_ATTACHMENT';
object.GUILD_PRODUCT_ATTACHMENT = 1;
object[1] = 'GUILD_PRODUCT_ATTACHMENT';
object.GRAVITY_ATTACHMENT = 2;
object[2] = 'GRAVITY_ATTACHMENT';
(FileImportTrackerModule).fileFinishedImporting('lib/uploader/UploadTargets.tsx');
exports.UploadTargets = object;
exports.getUploadTarget = getUploadTarget;
function _fun40571() { // fn#40571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:173, offset: 0x0110545c, size: 176 bytes, params: 1, frame: 15
return CreateClass(MessageAttachmentUploadTarget, [{key: 'getCreateAttachmentURL', value: function(a0) {
return Endpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(a0);
}}, {key: 'getDeleteUploadURL', value: function(a0) {
return Endpoints.MESSAGE_DELETE_UPLOAD(a0);
}}, {key: 'getMaxFileSize', value: value_40575}, {key: 'getMaxAttachmentsCount', value: function() {
return MAX_UPLOAD_COUNT;
}}, {key: 'getMaxTotalAttachmentSize', value: function() {
return require(dependencyMap[5]).MAX_TOTAL_ATTACHMENT_SIZE;
}}, {key: 'shouldReactNativeCompressUploads', get: function() {
return true;
}}]);
function MessageAttachmentUploadTarget() { // fn#40572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:194, offset: 0x00c8063e, size: 27 bytes, params: 1, frame: 13
env1_4(this, MessageAttachmentUploadTarget);
}
function value_40575(a0) { // fn#40575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:479, offset: 0x0110553a, size: 70 bytes, params: 2, frame: 13
let value = environment.__proto__;
const basicChannel = ChannelStore.getBasicChannel(a0);
value = undefined;
return FileUtilsModule.maxFileSize(basicChannel == null ? value : basicChannel.guild_id);
}
}
function getUploadTarget(a0) { // fn#40579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:1077, offset: 0x011055a1, size: 158 bytes, params: 2, frame: 12
var value3;
var value4;
var value;
const GUILD_PRODUCT_ATTACHMENT = env0_10.GUILD_PRODUCT_ATTACHMENT;
if (GUILD_PRODUCT_ATTACHMENT === a0) {
value = importDefault(4693) /* metro dependency 4693: GuildProductAttachmentUploadTarget */;
value4 = Object.create(value.prototype, {constructor: {value: value}});
value = new value();
return value instanceof Object ? value : value4;
}
const GRAVITY_ATTACHMENT = env0_10.GRAVITY_ATTACHMENT;
if (GRAVITY_ATTACHMENT === a0) {
value = importDefault(4695) /* metro dependency 4695: ICYMIAttachmentUploadTarget */;
value3 = Object.create(value.prototype, {constructor: {value: value}});
value = new value();
return value instanceof Object ? value : value3;
}
env0_10.MESSAGE_ATTACHMENT;
const binding = env0_9;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
}
global.__d(_fun40570, 4692, [6, 7, 1379, 661, 4655, 4651, 4693, 4695,
2]) /* metro module 4692, dependencies: [6, 7, 1379, 661, 4655, 4651, 4693, 4695, 2] */;