Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,415 @@
|
||||
/* Metro module 11467; source: modules/media_channel/MediaChannelActionCreators.tsx; dependencies: [5, 661, 694, 507, 4131, 2] */
|
||||
function _fun87787(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:6, offset: 0x01fcb43c, 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/media_channel/MediaChannelActionCreators.tsx');
|
||||
exports.dismissMediaPostSharePrompt = dismissMediaPostSharePrompt;
|
||||
exports.fetchMediaPostEmbed = function() {
|
||||
return _fetchMediaPostEmbed.apply(this, arguments);
|
||||
};
|
||||
exports.unfurlEmbedUrl = function() {
|
||||
return _unfurlEmbedUrl.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _fetchMediaPostEmbed() { // fn#87788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:128, offset: 0x01fcb4f8, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87790).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _unfurlEmbedUrl() { // fn#87791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:558, offset: 0x01fcb636, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87793).apply(this, arguments);
|
||||
}
|
||||
|
||||
function dismissMediaPostSharePrompt(a0) { // fn#87794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:909, offset: 0x01fcb71c, size: 57 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DISMISS_MEDIA_POST_SHARE_PROMPT',
|
||||
threadId: a0});
|
||||
}
|
||||
|
||||
function* _fun87790(a0) { // fn#87790, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:191, offset: 0x01fcb535, size: 257 bytes, params: 2, frame: 19
|
||||
var object2;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var HTTP;
|
||||
var get;
|
||||
var MEDIA_POST_RESHARE_GET_PREVIEW;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var body;
|
||||
var binding3;
|
||||
var value9;
|
||||
var error;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_1;
|
||||
var value3 = binding(env2_2[2]);
|
||||
var dispatch = value3.dispatch;
|
||||
Reflect.apply(dispatch, value3, [{type: 'MEDIA_POST_EMBED_FETCH', threadId: a0}]);
|
||||
reducibleJoin3: while (true) {
|
||||
reduciblePort36: while (true) {
|
||||
exceptionLanding35: while (true) {
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[2]);
|
||||
dispatch = value.dispatch;
|
||||
Reflect.apply(dispatch, value, [{type: 'MEDIA_POST_EMBED_FETCH_FAILURE', threadId: a0}]);
|
||||
break reduciblePort36;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
property = binding2[3];
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
HTTP = value4.HTTP;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
get = HTTP.get;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
MEDIA_POST_RESHARE_GET_PREVIEW = binding.MEDIA_POST_RESHARE_GET_PREVIEW;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(MEDIA_POST_RESHARE_GET_PREVIEW, binding, [a0]);
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
object2.url = value5;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
object2.rejectWithError = true;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
value6 = Reflect.apply(get, HTTP, [object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
yield value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
if (value8) {
|
||||
return value7;
|
||||
}
|
||||
try {
|
||||
body = value7.body;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
property = binding3[2];
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
value9 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
dispatch = value9.dispatch;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
object2.type = 'MEDIA_POST_EMBED_FETCH_SUCCESS';
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
object2.threadId = a0;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
object2.mediaPostEmbed = body;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(dispatch, value9, [object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun87793(a0) { // fn#87793, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:611, offset: 0x01fcb673, size: 169 bytes, params: 2, frame: 14
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value3;
|
||||
var HTTP;
|
||||
var post;
|
||||
var object3;
|
||||
var UNFURL_EMBED_URLS;
|
||||
var object4;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var body;
|
||||
var error;
|
||||
var APIError;
|
||||
var prototype;
|
||||
var aPIError;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
property = binding2[3];
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value3 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
HTTP = value3.HTTP;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
post = HTTP.post;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
UNFURL_EMBED_URLS = binding.UNFURL_EMBED_URLS;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.url = UNFURL_EMBED_URLS;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object4 = {};
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object4.urls = a0;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.body = object4;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.rejectWithError = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value4 = Reflect.apply(post, HTTP, [object3]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
yield value4;
|
||||
try {
|
||||
value5 = undefined;
|
||||
value6 = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
if (value6) {
|
||||
return value5;
|
||||
}
|
||||
try {
|
||||
body = value5.body;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_2[4]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 9084; source: modules/media_channel/MediaChannelExperimentUtils.tsx; dependencies: [661, 2] */
|
||||
function _fun70998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9269:6, offset: 0x01d118db, size: 109 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/MediaChannelExperimentUtils.tsx');
|
||||
exports.useGuildEligibleForMediaChannels = useGuildEligibleForMediaChannels;
|
||||
}
|
||||
|
||||
function useGuildEligibleForMediaChannels(a0) { // fn#70999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9269:242, offset: 0x01d11948, size: 130 bytes, params: 2, frame: 13
|
||||
if (a0?.id == null) {
|
||||
return false;
|
||||
}
|
||||
const features = a0.features;
|
||||
let has = features.has;
|
||||
const CREATOR_MONETIZABLE = GuildFeatures.CREATOR_MONETIZABLE;
|
||||
let r0 = Reflect.apply(has, features,
|
||||
[CREATOR_MONETIZABLE]) || features.has(GuildFeatures.CREATOR_MONETIZABLE_PROVISIONAL);
|
||||
has = features.has;
|
||||
const COMMUNITY = GuildFeatures.COMMUNITY;
|
||||
r0 = r0 && Reflect.apply(has, features, [COMMUNITY]);
|
||||
r0 = !r0 ? features.has(GuildFeatures.INTERNAL_EMPLOYEE_ONLY) : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/* Metro module 16138; source: modules/media_channel/MediaPostEmbedManager.tsx; dependencies: [6, 7, 15, 17, 18, 1936, 1226, 1945, 10604, 661, 678, 4803, 1391, 11467, 15767, 4860, 2] */
|
||||
function _fun124610(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:6, offset: 0x025bf0ba, size: 376 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const resolveMediaPostEmbeds = function(a0) {
|
||||
var r3;
|
||||
var env0_0 = a0;
|
||||
var embeds = a0.embeds;
|
||||
var value = undefined;
|
||||
r3 = embeds == null ? value : embeds.filter(_fun124615);
|
||||
if (r3 != null && r3.length !== 0) {
|
||||
r3.forEach(_fun124616);
|
||||
}
|
||||
return value;
|
||||
};
|
||||
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 gatedChannelStore = importDefault(1936) /* metro dependency 1936: GatedChannelStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const mediaPostEmbedStore = importDefault(10604) /* metro dependency 10604: MediaPostEmbedStore */;
|
||||
const env0_12 = (require(10604) /* metro dependency 10604: MediaPostEmbedStore */).FetchState;
|
||||
const env0_13 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
set = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
set = _fun124617(set);
|
||||
set = new set();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/MediaPostEmbedManager.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_124611() { // fn#124611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:232, offset: 0x025bf232, 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_124611_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function resolveMediaPostEmbeds(a0) { // fn#124614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:439, offset: 0x025bf294, size: 85 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
const embeds = a0.embeds;
|
||||
const value = undefined;
|
||||
const r3 = embeds == null ? value : embeds.filter(function({type}) {
|
||||
return type === require(dependencyMap[10]).MessageEmbedTypes.POST_PREVIEW;
|
||||
});
|
||||
if (r3 != null && r3.length !== 0) {
|
||||
r3.forEach(_fun124616);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun124617(a0) { // fn#124617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:1086, offset: 0x025bf4ab, size: 99 bytes, params: 2, frame: 16
|
||||
const closure = MediaPostEmbedManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'handleLoadThreadsSuccess', value: value_124620}, {key: 'handleLoadForumPosts',
|
||||
value: value_124622}]);
|
||||
}
|
||||
|
||||
function _fun124616(a0) { // fn#124616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:606, offset: 0x025bf31c, size: 399 bytes, params: 2, frame: 19
|
||||
var guildId;
|
||||
var r2;
|
||||
var value;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var value3;
|
||||
var binding;
|
||||
var id;
|
||||
var isMember;
|
||||
var isMember2;
|
||||
var isChannelGated;
|
||||
var isChannelGated2;
|
||||
var moduleValue2;
|
||||
var hasFlag2;
|
||||
if (a0.url != null) {
|
||||
value = environment.__proto__;
|
||||
value2 = undefined;
|
||||
moduleValue = require(4803) /* metro dependency 4803: MediaPostEmbedUtils */;
|
||||
value3 = moduleValue.getMediaPostEmbedChannelPath(a0.url);
|
||||
if (value3 != null) {
|
||||
if ((value3 == null ? value2 : value3.threadId) != null) {
|
||||
if ((value3 == null ? value2 : value3.channelId) != null) {
|
||||
if (MediaPostEmbedStore.getEmbedFetchState(value3.threadId) === FetchState.NOT_FETCHED) {
|
||||
binding = env1_14;
|
||||
if (!binding.has(value3.threadId)) {
|
||||
binding = env1_14;
|
||||
binding.add(value3.threadId);
|
||||
id = AuthenticationStore.getId();
|
||||
isMember = GuildMemberStore.isMember;
|
||||
guildId = value3 == null ? value2 : value3.guildId;
|
||||
isMember2 = Reflect.apply(isMember, GuildMemberStore, [guildId, id]);
|
||||
isChannelGated = GatedChannelStore.isChannelGated;
|
||||
guildId = value3.guildId;
|
||||
isChannelGated2 = Reflect.apply(isChannelGated, GatedChannelStore, [guildId,
|
||||
value3.channelId]);
|
||||
moduleValue2 = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
hasFlag2 = moduleValue2.hasFlag(env0_0.flags ?? 0, MessageFlags.IS_CROSSPOST);
|
||||
r2 = isMember2 && isChannelGated2 === false;
|
||||
r2 = !r2 ? !isMember2 && hasFlag2 : r2;
|
||||
if (!r2) {
|
||||
value = require(11467) /* metro dependency 11467: MediaChannelActionCreators */;
|
||||
value.fetchMediaPostEmbed(value3.threadId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function MediaPostEmbedManager() { // fn#124618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:1098, offset: 0x025bf50e, size: 198 bytes, params: 1, frame: 20
|
||||
env1_3(this, MediaPostEmbedManager);
|
||||
const value3 = env1_6(MediaPostEmbedManager);
|
||||
const value6 = env1_5(this, _isNativeReflectConstruct_124611() ? global.Reflect.construct(value3, [],
|
||||
env1_6(this).constructor) : value3.apply(this, undefined));
|
||||
value6.actions = {LOAD_THREADS_SUCCESS: value6.handleLoadThreadsSuccess,
|
||||
LOAD_ARCHIVED_THREADS_SUCCESS: value6.handleLoadThreadsSuccess, LOAD_FORUM_POSTS: value6.handleLoadForumPosts};
|
||||
(importDefault(15767) /* metro dependency 15767: setupLoadFromMessageManagerHandlers */)(value6,
|
||||
resolveMediaPostEmbeds, {onBeforeBatch: onBeforeBatch});
|
||||
return value6;
|
||||
}
|
||||
|
||||
function value_124620({firstMessages}) { // fn#124620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:1657, offset: 0x025bf5e7, size: 63 bytes, params: 2, frame: 12
|
||||
if (firstMessages == null) {
|
||||
return false;
|
||||
}
|
||||
env1_14.clear();
|
||||
if (firstMessages != null) {
|
||||
firstMessages.forEach(function(a0) {
|
||||
resolveMediaPostEmbeds(a0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function value_124622({threads}) { // fn#124622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:1802, offset: 0x025bf639, size: 67 bytes, params: 2, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_14.clear();
|
||||
const Object = global.Object;
|
||||
Object.values(threads).map(_fun124623);
|
||||
}
|
||||
|
||||
function onBeforeBatch() { // fn#124619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:1542, owner: MediaPostEmbedManager.onBeforeBatch, offset: 0x025bf5d4, size: 19 bytes, params: 1, frame: 9
|
||||
return env2_14.clear();
|
||||
}
|
||||
|
||||
function _fun124623({first_message}) { // fn#124623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16346:1856, offset: 0x025bf67c, size: 36 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var resolveMediaPostEmbedsBinding;
|
||||
let value = first_message != null;
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__;
|
||||
resolveMediaPostEmbedsBinding = resolveMediaPostEmbeds;
|
||||
value = undefined;
|
||||
resolveMediaPostEmbedsBinding(first_message);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/* Metro module 10604; source: modules/media_channel/MediaPostEmbedStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
|
||||
function _fun81731(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10790:6, offset: 0x01edc4af, size: 399 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
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 */;
|
||||
object2 = {NOT_FETCHED: 0};
|
||||
object2[0] = 'NOT_FETCHED';
|
||||
object2.FETCHING = 1;
|
||||
object2[1] = 'FETCHING';
|
||||
object2.FETCHED = 2;
|
||||
object2[2] = 'FETCHED';
|
||||
object2.FAILED = 3;
|
||||
object2[3] = 'FAILED';
|
||||
let env0_6 = {};
|
||||
let env0_7 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun81735(Store);
|
||||
value.displayName = 'MediaPostEmbedStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
|
||||
env0_6 = {};
|
||||
env0_7 = {};
|
||||
}, MEDIA_POST_EMBED_FETCH: MEDIA_POST_EMBED_FETCH, MEDIA_POST_EMBED_FETCH_SUCCESS: MEDIA_POST_EMBED_FETCH_SUCCESS,
|
||||
MEDIA_POST_EMBED_FETCH_FAILURE: MEDIA_POST_EMBED_FETCH_FAILURE, LOGOUT: LOGOUT_81744});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/MediaPostEmbedStore.tsx');
|
||||
exports.default = value;
|
||||
exports.FetchState = object2;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_81732() { // fn#81732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10790:148, offset: 0x01edc63e, 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_81732_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun81735(a0) { // fn#81735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10790:497, offset: 0x01edc6a0, size: 126 bytes, params: 2, frame: 16
|
||||
const closure = MediaPostEmbedStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'getMediaPostEmbed', value: value_81737}, {key: 'getEmbedFetchState',
|
||||
value: value_81738}, {key: 'getMediaPostEmbeds', value: value_81739}]);
|
||||
}
|
||||
|
||||
function MEDIA_POST_EMBED_FETCH({threadId}) { // fn#81741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10790:1167, offset: 0x01edc758, size: 34 bytes, params: 2, frame: 3
|
||||
const binding = env0_7;
|
||||
const FETCHING = env0_5.FETCHING;
|
||||
binding[threadId] = FETCHING;
|
||||
}
|
||||
|
||||
function MEDIA_POST_EMBED_FETCH_SUCCESS({threadId, mediaPostEmbed}) { // fn#81742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10790:1264, offset: 0x01edc77a, size: 62 bytes, params: 2, frame: 14
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_6, undefined);
|
||||
object2[threadId] = mediaPostEmbed;
|
||||
const binding = env0_7;
|
||||
const FETCHED = env0_5.FETCHED;
|
||||
binding[threadId] = FETCHED;
|
||||
}
|
||||
|
||||
function MEDIA_POST_EMBED_FETCH_FAILURE({threadId}) { // fn#81743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10790:1399, offset: 0x01edc7b8, size: 34 bytes, params: 2, frame: 3
|
||||
const binding = env0_7;
|
||||
const FAILED = env0_5.FAILED;
|
||||
binding[threadId] = FAILED;
|
||||
}
|
||||
|
||||
function LOGOUT_81744(a0) { // fn#81744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10790:1472, offset: 0x01edc7da, size: 31 bytes, params: 2, frame: 2
|
||||
if (!a0.isSwitchingAccount) {
|
||||
env0_6 = {};
|
||||
env0_7 = {};
|
||||
}
|
||||
}
|
||||
|
||||
function value_81738(a0) { // fn#81738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10790:898, offset: 0x01edc738, size: 32 bytes, params: 2, frame: 3
|
||||
return env1_7[a0] ?? env1_5.NOT_FETCHED;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/* Metro module 4803; source: modules/media_channel/MediaPostEmbedUtils.tsx; dependencies: [1867, 3793, 1878, 661, 4503, 4804, 1244, 4617, 1423, 4805, 4096, 4246, 2] */
|
||||
function _fun41610(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4981:6, offset: 0x01123713, size: 229 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = getMediaPostEmbedChannelPath;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
const env0_7 = (require(4503) /* metro dependency 4503: MessageConstants */).SPOILER_ATTACHMENT_PREFIX;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/MediaPostEmbedUtils.tsx');
|
||||
exports.getMediaPostEmbedCommonData = getMediaPostEmbedCommonData;
|
||||
exports.getMediaPostEmbedChannelId = getMediaPostEmbedChannelId;
|
||||
exports.getMediaPostEmbedChannelPath = closure;
|
||||
exports.canUseMediaPostEmbed = canUseMediaPostEmbed;
|
||||
}
|
||||
|
||||
function getMediaPostEmbedChannelPath(a0) { // fn#41611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4981:186, offset: 0x011237f8, size: 118 bytes, params: 2, frame: 15
|
||||
if (a0 != null) {
|
||||
var value;
|
||||
var uRLSafely = (require(4096) /* metro dependency 4096: findCodedLinks */).parseURLSafely(a0);
|
||||
if (uRLSafely == null) {
|
||||
return undefined;
|
||||
}
|
||||
var value2 = (require(4096) /* metro dependency 4096: findCodedLinks */).remainingPathFromDiscordHostMatch(uRLSafely);
|
||||
if (value2 != null) {
|
||||
return (require(4246) /* metro dependency 4246: LinkUtils */).tryParseChannelPath(value2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getMediaPostEmbedCommonData({mediaPostEmbedData, guild, parentChannel, postThread, user, selectedGuildId, canAccess}) { // fn#41612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4981:498, offset: 0x0112386e, size: 813 bytes, params: 2, frame: 31
|
||||
var r8;
|
||||
var r1;
|
||||
var r5;
|
||||
var defaultImport;
|
||||
var height;
|
||||
var width;
|
||||
let value = undefined;
|
||||
canAccess = !(canAccess === value) && canAccess;
|
||||
if (mediaPostEmbedData == null) {
|
||||
return null;
|
||||
}
|
||||
const mediaPostThumbnailUtilsModule = require(4804) /* metro dependency 4804: MediaPostThumbnailUtils */;
|
||||
const getThumbnailImage = mediaPostThumbnailUtilsModule.getThumbnailImage;
|
||||
let thumbnail = mediaPostEmbedData.thumbnail;
|
||||
const value4 = Reflect.apply(getThumbnailImage, mediaPostThumbnailUtilsModule, [thumbnail]);
|
||||
const r6 = !canAccess && mediaPostEmbedData.has_media_attachment;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r16 = canAccess ? Reflect.apply(string, intl, [t.UsZEBI]) : Reflect.apply(string, intl, [t.ReFzYZ]);
|
||||
if (user != null) {
|
||||
defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
|
||||
r8 = defaultImport.getName(mediaPostEmbedData.guild_id, mediaPostEmbedData.channel_id, user);
|
||||
} else {
|
||||
r8 = value;
|
||||
}
|
||||
let r7 = user == null ? value : user.getAvatarURL(guild == null ? value : guild.id, 40);
|
||||
r7 = !(r7 != null && selectedGuildId === mediaPostEmbedData.guild_id) ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: mediaPostEmbedData.guild_id,
|
||||
icon: mediaPostEmbedData.guild_icon, size: 40, canAnimate: false}) : r7;
|
||||
thumbnail = mediaPostEmbedData.thumbnail;
|
||||
if (thumbnail == null) {
|
||||
r5 = false;
|
||||
} else {
|
||||
height = thumbnail.height;
|
||||
width = thumbnail.width;
|
||||
r1 = height != null && width != null;
|
||||
r1 = r1 && height >= width;
|
||||
r5 = r1;
|
||||
}
|
||||
r5 = r5 && !r6;
|
||||
thumbnail = mediaPostEmbedData.thumbnail;
|
||||
const r4 = (thumbnail == null ? value : thumbnail.filename) != null && (mediaPostEmbedData.thumbnail == null || mediaPostEmbedData.thumbnail.filename == null ? value : mediaPostEmbedData.thumbnail.filename.startsWith(SPOILER_ATTACHMENT_PREFIX));
|
||||
const object2 = {};
|
||||
object2.title = mediaPostEmbedData.title ?? '';
|
||||
object2.subtitle = mediaPostEmbedData.description;
|
||||
object2.ctaText = r16;
|
||||
object2.coverImage = value4;
|
||||
object2.coverImageOverlayText = r6 ? intl.string(t.Yonlia) : value;
|
||||
object2.parentChannelId = mediaPostEmbedData.parent_channel_id;
|
||||
object2.threadId = mediaPostEmbedData.channel_id;
|
||||
object2.postThread = postThread;
|
||||
object2.messageId = mediaPostEmbedData.message_id;
|
||||
object2.canAccess = canAccess;
|
||||
object2.guildId = mediaPostEmbedData.guild_id;
|
||||
object2.guildName = (guild == null ? value : guild.name) ?? mediaPostEmbedData.guild_name;
|
||||
object2.authorId = mediaPostEmbedData == null ? value : mediaPostEmbedData.author_id;
|
||||
object2.authorName = r8;
|
||||
if (parentChannel != null) {
|
||||
value = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
value = value.computeChannelName(parentChannel, UserStore, RelationshipStore);
|
||||
r8 = value;
|
||||
} else {
|
||||
r8 = value;
|
||||
}
|
||||
object2.channelName = r8;
|
||||
object2.avatarUrl = r7;
|
||||
object2.shouldShowBlurredThumbnailImage = r6;
|
||||
object2.shouldContainMediaWithBackground = r5;
|
||||
object2.shouldSpoiler = r4;
|
||||
object2.obscureAwaitingScan = false;
|
||||
object2.flags = mediaPostEmbedData.flags;
|
||||
object2.contentScanVersion = mediaPostEmbedData.content_scan_version;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getMediaPostEmbedChannelId(a0) { // fn#41613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4981:1943, offset: 0x01123b9b, size: 51 bytes, params: 2, frame: 12
|
||||
const mediaPostEmbedChannelPath = getMediaPostEmbedChannelPath(a0);
|
||||
if (mediaPostEmbedChannelPath == null) {
|
||||
return undefined;
|
||||
}
|
||||
const r0 = mediaPostEmbedChannelPath.threadId ?? mediaPostEmbedChannelPath.channelId;
|
||||
return r0 === mediaPostEmbedChannelPath.messageId ? r0 : undefined;
|
||||
}
|
||||
|
||||
function canUseMediaPostEmbed(a0, a1) { // fn#41614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4981:2188, offset: 0x01123bce, size: 117 bytes, params: 3, frame: 14
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
if (guild == null) {
|
||||
return false;
|
||||
}
|
||||
if (a1 == null) {
|
||||
return false;
|
||||
}
|
||||
const features = guild.features;
|
||||
const has = features.has;
|
||||
const CREATOR_MONETIZABLE = GuildFeatures.CREATOR_MONETIZABLE;
|
||||
const r1 = Reflect.apply(has, features,
|
||||
[CREATOR_MONETIZABLE]) || guild.features.has(GuildFeatures.CREATOR_MONETIZABLE_PROVISIONAL);
|
||||
let value = a1.isMediaChannel();
|
||||
value = value === true;
|
||||
return value && r1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/* Metro module 8185; source: modules/media_channel/MediaPostSharePromptStore.tsx; dependencies: [6, 7, 15, 17, 18, 1936, 1226, 1379, 8186, 21, 566, 694, 2] */
|
||||
function _fun65654(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:6, offset: 0x01bd8a72, size: 393 bytes, params: 8, frame: 20
|
||||
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 gatedChannelStore = importDefault(1936) /* metro dependency 1936: GatedChannelStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
let Set = global.Set;
|
||||
let set = new Set();
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun65658(Store).displayName = 'MediaPostSharePromptStore';
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
|
||||
var Set = global.Set;
|
||||
env0_11 = new Set();
|
||||
}, MESSAGE_CREATE: MESSAGE_CREATE_65663, DISMISS_MEDIA_POST_SHARE_PROMPT: DISMISS_MEDIA_POST_SHARE_PROMPT,
|
||||
LOGOUT: LOGOUT_65665});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/MediaPostSharePromptStore.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_65655() { // fn#65655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:178, offset: 0x01bd8bfb, 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_65655_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun65658(a0) { // fn#65658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:391, offset: 0x01bd8c5d, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = MediaPostSharePromptStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(AuthenticationStore, ChannelStore, GatedChannelStore);
|
||||
}}, {key: 'shouldDisplayPrompt', value: value_65661}]);
|
||||
}
|
||||
|
||||
function MESSAGE_CREATE_65663(a0) { // fn#65663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:999, offset: 0x01bd8ce5, size: 235 bytes, params: 2, frame: 18
|
||||
var message;
|
||||
var value;
|
||||
var moduleValue;
|
||||
var value4;
|
||||
var binding;
|
||||
var add;
|
||||
if (!a0.isPushNotification) {
|
||||
message = a0.message;
|
||||
if (AuthenticationStore.getId() === message.author?.id) {
|
||||
moduleValue = require(8186) /* metro dependency 8186: useIsFirstMessageInMediaPost */;
|
||||
if (moduleValue.isFirstMessageIdInMediaPost(message.id, message.channel_id)) {
|
||||
value4 = ChannelStore.getChannel(message.channel_id);
|
||||
if (value4 != null) {
|
||||
if (value4.parent_id != null) {
|
||||
if (GatedChannelStore.isChannelGated(value4.guild_id, value4.parent_id)) {
|
||||
binding = env0_11;
|
||||
add = binding.add;
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
Reflect.apply(add, binding, [value.castMessageIdAsChannelId(a0.message.id)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DISMISS_MEDIA_POST_SHARE_PROMPT({threadId}) { // fn#65664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:1378, offset: 0x01bd8dd0, size: 30 bytes, params: 2, frame: 11
|
||||
env0_11.delete(threadId);
|
||||
}
|
||||
|
||||
function LOGOUT_65665() { // fn#65665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:1455, offset: 0x01bd8dee, size: 21 bytes, params: 1, frame: 9
|
||||
env0_11.clear();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 4804; source: modules/media_channel/MediaPostThumbnailUtils.tsx; dependencies: [4631, 2] */
|
||||
function _fun41615(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4982:6, offset: 0x01123c43, size: 129 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/media_channel/MediaPostThumbnailUtils.tsx');
|
||||
exports.MAX_THUMBNAIL_COUNT = 4;
|
||||
exports.getEmbedPreviewImageUrl = function(a0) {
|
||||
if (a0 != null) {
|
||||
var property = a0.thumbnail;
|
||||
var image = a0.image;
|
||||
if (property != null) {
|
||||
return property.proxy_url ?? property.url;
|
||||
}
|
||||
if (image != null) {
|
||||
return image.proxy_url ?? image.url;
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.getBackgroundImageUrl = function(a0) {
|
||||
var value = a0;
|
||||
return require(dependencyMap[0]).isAnimatedImageUrl(value) || require(dependencyMap[0]).isVideoUrl(value) ? '' + value + '?format=webp' : value;
|
||||
};
|
||||
exports.getThumbnailImage = getThumbnailImage;
|
||||
}
|
||||
|
||||
function getThumbnailImage(a0) { // fn#41618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4982:563, offset: 0x01123d71, size: 113 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var url;
|
||||
var proxy_url;
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
url = a0.url;
|
||||
proxy_url = a0.proxy_url;
|
||||
if (url == null) {
|
||||
r0 = url;
|
||||
} else if (proxy_url == null) {
|
||||
r0 = url;
|
||||
} else {
|
||||
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
||||
r0 = value.isVideoUrl(url) ? '' + proxy_url + '?format=webp' : proxy_url;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 11557; source: modules/media_channel/native/MediaPostGridThumbnail.tsx; dependencies: [31, 27, 33, 11555, 5475, 477, 2] */
|
||||
function _fun88568(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11743:6, offset: 0x01fe8c77, size: 211 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.ImageBackground;
|
||||
const env0_4 = value.StyleSheet;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = value.Fragment;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/native/MediaPostGridThumbnail.tsx');
|
||||
exports.default = MediaPostGridThumbnail;
|
||||
}
|
||||
|
||||
function MediaPostGridThumbnailAndroid(a0) { // fn#88569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11743:189, offset: 0x01fe8d4a, size: 324 bytes, params: 2, frame: 24
|
||||
const shouldSpoiler = a0.shouldSpoiler;
|
||||
const blurTheme = a0.blurTheme;
|
||||
const source = a0.source;
|
||||
const androidStyle = a0.androidStyle;
|
||||
const backgroundImagesource = a0.backgroundImagesource;
|
||||
return backgroundImagesource == null ? <ImageBackground style={androidStyle} source={source} blurRadius={shouldSpoiler ? 10 : 0} resizeMode="cover">{((ForumPostMediaSpoiler) => <ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaSpoiler)}</ImageBackground> : <ImageBackground style={androidStyle} source={backgroundImagesource} resizeMode="cover" imageStyle={{opacity: 0.2}}>{((Component) => <Component style={StyleSheet.absoluteFill} source={source} resizeMode={a0.resizeMode} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}{((ForumPostMediaSpoiler) => <ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaSpoiler)}</ImageBackground>;
|
||||
}
|
||||
|
||||
function MediaPostGridThumbnailIOS({shouldSpoiler, blurTheme, source, iosStyle, backgroundImagesource, resizeMode}) { // fn#88570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11743:665, offset: 0x01fe8e8e, size: 367 bytes, params: 2, frame: 29
|
||||
var object;
|
||||
var items2;
|
||||
var items3;
|
||||
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
if (backgroundImagesource == null) {
|
||||
items3 = [((Component) => <Component style={iosStyle} source={source} resizeMode={resizeMode} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
items3[1] = ((ForumPostMediaSpoiler) => <ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaSpoiler);
|
||||
object = {children: items3};
|
||||
} else {
|
||||
items2 = [((Component) => <Component style={[StyleSheet.absoluteFill,
|
||||
{opacity: 0.2}]} source={backgroundImagesource} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
items2[1] = ((Component) => <Component style={iosStyle} source={source} resizeMode={resizeMode} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
items2[2] = ((ForumPostMediaSpoiler) => <ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaSpoiler);
|
||||
object = {children: items2};
|
||||
}
|
||||
return ((Fragment) => <Fragment {...object} />)(jsxRuntimeEnv0_7Binding);
|
||||
}
|
||||
|
||||
function MediaPostGridThumbnail(a0) { // fn#88571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11743:1222, offset: 0x01fe8ffd, size: 168 bytes, params: 2, frame: 16
|
||||
var r1;
|
||||
var source;
|
||||
if (a0.isPortrait === true && a0.shouldSpoiler === false) {
|
||||
source = a0.source;
|
||||
r1 = 'contain';
|
||||
} else {
|
||||
r1 = 'cover';
|
||||
source = undefined;
|
||||
}
|
||||
const mediaPostGridThumbnailIOSProps = {...a0};
|
||||
mediaPostGridThumbnailIOSProps['backgroundImagesource'] = source;
|
||||
mediaPostGridThumbnailIOSProps['resizeMode'] = r1;
|
||||
return (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? <MediaPostGridThumbnailAndroid {...mediaPostGridThumbnailIOSProps} /> : <MediaPostGridThumbnailIOS {...mediaPostGridThumbnailIOSProps} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* Metro module 11020; source: modules/media_channel/native/MediaPostMultipleThumbnailActionSheet.tsx; dependencies: [31, 27, 1376, 33, 4501, 697, 1585, 6275, 6277, 4573, 1244, 1305, 4578, 2] */
|
||||
function _fun84406(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11206:6, offset: 0x01f48b6b, size: 449 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.container = {'flex': 1, 'backgroundColor': null, 'padding': 24, backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
const object5 = {'flex': 1, 'width': '100%', 'paddingVertical': 40, 'paddingHorizontal': 12};
|
||||
const TEXT_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING;
|
||||
object5.backgroundColor = TEXT_FEEDBACK_WARNING;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.topContainer = object5;
|
||||
const object6 = {'flex': 1, 'flexDirection': 'row', 'padding': 12, 'width': '100%', 'backgroundColor': null,
|
||||
'borderRadius': null, 'alignItems': 'center', 'justifyContent': 'space-between'};
|
||||
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
|
||||
object6.backgroundColor = BACKGROUND_MOD_NORMAL;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.setAsThumbnailContainer = object6;
|
||||
object2.contentContainer = {'alignItems': 'center', 'flex': 1};
|
||||
object2.title = {marginTop: 24};
|
||||
object2.description = {textAlign: 'center'};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/native/MediaPostMultipleThumbnailActionSheet.tsx');
|
||||
exports.default = MediaPostThumbnailActionSheet;
|
||||
}
|
||||
|
||||
function MediaPostThumbnailActionSheet({markAsDismissed}) { // fn#84407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11206:876, offset: 0x01f48d2c, size: 746 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
const items2 = [styles.contentContainer];
|
||||
items2[1] = {paddingBottom: bottom};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
let value = <Text variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.ews2pj])}</Text>;
|
||||
const Checkbox = (require(1305) /* metro dependency 1305: native */).Checkbox;
|
||||
value = <View style={styles.topContainer}><View style={styles.setAsThumbnailContainer}>{value}<Checkbox selected /></View></View>;
|
||||
const items3 = [value];
|
||||
string = intl.string;
|
||||
const WJisip = (require(1244) /* metro dependency 1244: indexNative */).t.WJisip;
|
||||
items3[1] = <Text variant="heading-lg/semibold" color="mobile-text-heading-primary" style={styles.title}>{Reflect.apply(string,
|
||||
intl, [WJisip])}</Text>;
|
||||
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
|
||||
items3[2] = <Spacer size={12} />;
|
||||
string = intl.string;
|
||||
const X6ZH6d = (require(1244) /* metro dependency 1244: indexNative */).t.X6ZH6d;
|
||||
items3[3] = <Text variant="text-md/normal" color="text-default" style={styles.description}>{Reflect.apply(string,
|
||||
intl, [X6ZH6d])}</Text>;
|
||||
items3[4] = <Spacer size={48} />;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items3[5] = <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])} grow onPress={function() {
|
||||
return markAsDismissed(ContentDismissActionType.UNKNOWN);
|
||||
}} />;
|
||||
return (
|
||||
<BottomSheet
|
||||
backdropOpacity={0.8}
|
||||
onDismiss={function() {
|
||||
return markAsDismissed(ContentDismissActionType.UNKNOWN);
|
||||
}}
|
||||
>
|
||||
<View style={styles.container}>
|
||||
<BottomSheetScrollView contentContainerStyle={items2}>
|
||||
{items3}
|
||||
</BottomSheetScrollView>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
/* Metro module 10603; source: modules/media_channel/native/createMediaPostPreviewEmbedContent.tsx; dependencies: [27, 4649, 1379, 1867, 3969, 1878, 10604, 4803, 4246, 1244, 8205, 8207, 697, 4631, 10605, 4821, 4813, 4804, 2] */
|
||||
function _fun81729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10789:6, offset: 0x01edbd47, size: 249 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Image;
|
||||
const env0_4 = value.processColor;
|
||||
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const mediaPostEmbedStore = importDefault(10604) /* metro dependency 10604: MediaPostEmbedStore */;
|
||||
const env0_11 = (require(10604) /* metro dependency 10604: MediaPostEmbedStore */).FetchState;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/native/createMediaPostPreviewEmbedContent.tsx');
|
||||
exports.default = createMediaPostPreviewEmbedContent;
|
||||
}
|
||||
|
||||
function createMediaPostPreviewEmbedContent(a0, a1, a2) { // fn#81730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10789:326, offset: 0x01edbe40, size: 1647 bytes, params: 4, frame: 28
|
||||
var r4;
|
||||
var r7;
|
||||
var moduleValue4;
|
||||
var value13;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToParts;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var mCytFr;
|
||||
var moduleValue5;
|
||||
var shouldSpoiler;
|
||||
var value24;
|
||||
var value27;
|
||||
let value = a3;
|
||||
const value2 = undefined;
|
||||
const r6 = value !== value2 ? value : false;
|
||||
const mediaPostEmbedChannelId = (require(4803) /* metro dependency 4803: MediaPostEmbedUtils */).getMediaPostEmbedChannelId(a2);
|
||||
if (mediaPostEmbedChannelId == null) {
|
||||
return null;
|
||||
}
|
||||
const embedFetchState = MediaPostEmbedStore.getEmbedFetchState(mediaPostEmbedChannelId);
|
||||
const FETCHED = FetchState.FETCHED;
|
||||
if (embedFetchState !== FETCHED) {
|
||||
return null;
|
||||
}
|
||||
const mediaPostEmbed = MediaPostEmbedStore.getMediaPostEmbed(mediaPostEmbedChannelId);
|
||||
const media = mediaPostEmbed == null ? value2 : mediaPostEmbed.media;
|
||||
if (media == null) {
|
||||
return null;
|
||||
}
|
||||
const guild = GuildStore.getGuild(media.guild_id);
|
||||
const user = UserStore.getUser(media.author_id);
|
||||
const channel = ChannelStore.getChannel(media.parent_channel_id);
|
||||
const channel2 = ChannelStore.getChannel(media.channel_id);
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
const r5 = channel != null && (require(4246) /* metro dependency 4246: LinkUtils */).canViewChannel(channel);
|
||||
const mediaPostEmbedUtilsModule = require(4803) /* metro dependency 4803: MediaPostEmbedUtils */;
|
||||
const getMediaPostEmbedCommonData = mediaPostEmbedUtilsModule.getMediaPostEmbedCommonData;
|
||||
let object2 = {mediaPostEmbedData: media, guild: guild, parentChannel: channel, postThread: channel2, user: user,
|
||||
selectedGuildId: guildId, canAccess: r5};
|
||||
const value12 = Reflect.apply(getMediaPostEmbedCommonData, mediaPostEmbedUtilsModule, [object2]);
|
||||
if (value12 == null) {
|
||||
return null;
|
||||
}
|
||||
if (value12.authorName == null) {
|
||||
r4 = intl.formatToParts(t.p4VdWJ, {guildName: value12.guildName});
|
||||
} else if (value12.channelName == null) {
|
||||
r4 = intl.formatToParts(t.p4VdWJ, {guildName: value12.guildName});
|
||||
} else if (user == null) {
|
||||
r4 = intl.formatToParts(t.p4VdWJ, {guildName: value12.guildName});
|
||||
} else {
|
||||
moduleValue4 = require(8205) /* metro dependency 8205: useAuthorWithProcessedColor */;
|
||||
value13 = moduleValue4.getUserAuthorWithProcessedColor(user, value12.postThread);
|
||||
formatToParts = intl.formatToParts;
|
||||
mCytFr = t.mCytFr;
|
||||
object2 = {};
|
||||
object2.username = value12.authorName;
|
||||
object2.usernameOnClick = (importDefault(8207) /* metro dependency 8207: formatUsernameOnClick */)({userId: user.id,
|
||||
|
||||
message: a0, author: value13, roleStyle: a1, messageChannelId: value12.threadId});
|
||||
object2.channelName = value12.channelName;
|
||||
r4 = Reflect.apply(formatToParts, intl, [mCytFr, object2]);
|
||||
}
|
||||
const r3 = value12.canAccess === false ? processColor((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.TEAL_430) : processColor((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500);
|
||||
const value18 = value12.coverImage != null;
|
||||
if (value18) {
|
||||
moduleValue5 = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
||||
r7 = moduleValue5.isAnimatedImageUrl(value12.coverImage);
|
||||
} else {
|
||||
r7 = value18;
|
||||
}
|
||||
let r1 = value12.coverImage != null && !value12.shouldShowBlurredThumbnailImage && r7 && r6;
|
||||
if (r1) {
|
||||
value12.coverImage = '' + value12.coverImage + '?format=webp';
|
||||
}
|
||||
if (value12.shouldShowBlurredThumbnailImage) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value12, undefined);
|
||||
object2['blurredCoverImage'] = Image.resolveAssetSource(importDefault(10605) /* metro dependency 10605 */).uri;
|
||||
object2['footer'] = r4;
|
||||
object2['ctaButtonColor'] = r3;
|
||||
return object2;
|
||||
}
|
||||
let r9 = DevSettingsStore.get('obscure_blur_effect_explicit_content_enabled') || DevSettingsStore.get('obscure_blur_effect_gore_content_enabled');
|
||||
r9 = !r9 ? DevSettingsStore.get('obscure_blur_effect_self_harm_content_enabled') : r9;
|
||||
const explicitMediaRedactionUtilsModule = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
|
||||
const isPendingScanVersion2 = explicitMediaRedactionUtilsModule.isPendingScanVersion(value12.contentScanVersion);
|
||||
const r11 = r9 && explicitMediaRedactionUtilsModule.shouldAgeVerifyForExplicitMedia();
|
||||
const r10 = r9 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
|
||||
if (value12.shouldContainMediaWithBackground) {
|
||||
if (value12.coverImage != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value12, undefined);
|
||||
object2['footer'] = r4;
|
||||
shouldSpoiler = value12.shouldSpoiler;
|
||||
value27 = '';
|
||||
object2['spoiler'] = shouldSpoiler !== true ? value27 : intl.string(t['F+x38C']).toUpperCase();
|
||||
object2['obscure'] = r9 ? intl.string(t.SpxcUR) : value27;
|
||||
object2['obscureAwaitingScan'] = isPendingScanVersion2;
|
||||
object2['verifyAge'] = r11;
|
||||
object2['obscureHideControls'] = r10;
|
||||
object2['obscureIsOpaque'] = r9;
|
||||
object2['ctaButtonColor'] = r3;
|
||||
value = require(4804) /* metro dependency 4804: MediaPostThumbnailUtils */;
|
||||
value = value.getBackgroundImageUrl(value12.coverImage);
|
||||
object2['backgroundImage'] = value;
|
||||
r1 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value12, undefined);
|
||||
object2['footer'] = r4;
|
||||
shouldSpoiler = value12.shouldSpoiler;
|
||||
value24 = '';
|
||||
object2['spoiler'] = shouldSpoiler !== true ? value24 : intl.string(t['F+x38C']).toUpperCase();
|
||||
object2['obscure'] = r9 ? intl.string(t.SpxcUR) : value24;
|
||||
object2['obscureAwaitingScan'] = isPendingScanVersion2;
|
||||
object2['verifyAge'] = r11;
|
||||
object2['obscureHideControls'] = r10;
|
||||
object2['obscureIsOpaque'] = r9;
|
||||
object2['ctaButtonColor'] = r3;
|
||||
r1 = object2;
|
||||
}
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value12, undefined);
|
||||
object2['footer'] = r4;
|
||||
shouldSpoiler = value12.shouldSpoiler;
|
||||
value24 = '';
|
||||
object2['spoiler'] = shouldSpoiler !== true ? value24 : intl.string(t['F+x38C']).toUpperCase();
|
||||
object2['obscure'] = r9 ? intl.string(t.SpxcUR) : value24;
|
||||
object2['obscureAwaitingScan'] = isPendingScanVersion2;
|
||||
object2['verifyAge'] = r11;
|
||||
object2['obscureHideControls'] = r10;
|
||||
object2['obscureIsOpaque'] = r9;
|
||||
object2['ctaButtonColor'] = r3;
|
||||
r1 = object2;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Metro module 11134; source: modules/media_channel/native/useSetMediaPostThumbnail.tsx; dependencies: [31, 4645, 4644, 632, 4650, 7879, 4080, 2] */
|
||||
function _fun85175(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11320:6, offset: 0x01f66210, size: 159 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 env0_4 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/native/useSetMediaPostThumbnail.tsx');
|
||||
exports.default = useSetMediaPostThumbnail;
|
||||
}
|
||||
|
||||
function useSetMediaPostThumbnail(a0, a1) { // fn#85176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11320:237, offset: 0x01f662af, size: 115 bytes, params: 3, frame: 17
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return env0_3.useCallback(_fun85179,
|
||||
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UploadAttachmentStore],
|
||||
_fun85177), a0, a1]);
|
||||
}
|
||||
|
||||
function _fun85177() { // fn#85177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11320:314, offset: 0x01f66322, size: 70 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const getUploads = UploadAttachmentStore.getUploads;
|
||||
const binding = env0_0;
|
||||
const ChannelMessage = DraftType.ChannelMessage;
|
||||
value = Reflect.apply(getUploads, UploadAttachmentStore, [binding, ChannelMessage]);
|
||||
value = value.find(function(a0) {
|
||||
return (a0 == null || a0.item == null ? undefined : a0.item.platform) === require(dependencyMap[4]).UploadPlatform.REACT_NATIVE && a0.isThumbnail === true;
|
||||
});
|
||||
const value3 = null;
|
||||
return value3 != value ? value : value3;
|
||||
}
|
||||
|
||||
function _fun85179() { // fn#85179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11320:536, offset: 0x01f663c4, size: 319 bytes, params: 1, frame: 21
|
||||
var isThumbnail;
|
||||
var r8;
|
||||
var value5;
|
||||
var defaultImport;
|
||||
var value7;
|
||||
var defaultImport2;
|
||||
const value2 = undefined;
|
||||
if ((require == null ? value2 : require.id) != null) {
|
||||
if (env0_2 != null && env0_2.id !== (require == null ? value2 : require.id)) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
|
||||
defaultImport.update(env0_0, env0_2.id, DraftType.ChannelMessage, {thumbnail: false});
|
||||
}
|
||||
isThumbnail = require == null ? value2 : require.isThumbnail;
|
||||
r8 = isThumbnail != null && isThumbnail;
|
||||
value7 = environment.__proto__;
|
||||
defaultImport2 = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
|
||||
defaultImport2.update(env0_0, require == null ? value2 : require.id, DraftType.ChannelMessage, {thumbnail: !r8,
|
||||
spoiler: false});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 11133; source: modules/media_channel/useCanSetThumbnail.tsx; dependencies: [1379, 632, 2] */
|
||||
function _fun85172(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11319:6, offset: 0x01f6612c, size: 114 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/useCanSetThumbnail.tsx');
|
||||
exports.default = useCanSetThumbnail;
|
||||
}
|
||||
|
||||
function useCanSetThumbnail(a0, a1) { // fn#85173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11319:194, offset: 0x01f6619e, size: 114 bytes, params: 3, frame: 16
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
|
||||
_fun85174);
|
||||
return (channel == null ? value2 : channel.isMediaChannel()) && (a1 == null ? value2 : a1.isImage) === true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 8186; source: modules/media_channel/useIsFirstMessageInMediaPost.tsx; dependencies: [1379, 632, 21, 2] */
|
||||
function _fun65666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8371:6, offset: 0x01bd8e03, size: 156 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = isFirstMessageInMediaPost;
|
||||
const closure2 = isFirstMessageIdInMediaPost;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/useIsFirstMessageInMediaPost.tsx');
|
||||
exports.useIsFirstMessageInMediaPost = useIsFirstMessageInMediaPost;
|
||||
exports.isFirstMessageInMediaPost = closure;
|
||||
exports.isFirstMessageIdInMediaPost = closure2;
|
||||
}
|
||||
|
||||
function isFirstMessageInMediaPost(a0) { // fn#65667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8371:106, offset: 0x01bd8e9f, size: 39 bytes, params: 2, frame: 14
|
||||
return a0 != null && isFirstMessageIdInMediaPost(a0.id, a0.channel_id);
|
||||
}
|
||||
|
||||
function isFirstMessageIdInMediaPost(a0, a1) { // fn#65668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8371:207, offset: 0x01bd8ec6, size: 134 bytes, params: 3, frame: 13
|
||||
var r1;
|
||||
var value;
|
||||
if (a0 === (importDefault(21) /* metro dependency 21: SnowflakeUtils */).castChannelIdAsMessageId(a1)) {
|
||||
var channel = ChannelStore.getChannel(a1);
|
||||
if (channel == null) {
|
||||
return false;
|
||||
}
|
||||
if (channel.isForumPost()) {
|
||||
value = ChannelStore.getChannel(channel.parent_id);
|
||||
if (value == null) {
|
||||
r1 = undefined;
|
||||
} else {
|
||||
value = value.isMediaChannel();
|
||||
r1 = value;
|
||||
}
|
||||
return r1 === true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function useIsFirstMessageInMediaPost(a0) { // fn#65669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8371:559, offset: 0x01bd8f4c, size: 67 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([], _fun65670, [a0]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Metro module 9810; source: modules/media_channel/useShouldHideMediaOptions.tsx; dependencies: [1379, 1386, 632, 2] */
|
||||
function _fun76836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9996:6, offset: 0x01de6ef1, size: 136 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_3 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/useShouldHideMediaOptions.tsx');
|
||||
exports.default = useShouldHideMediaOptions;
|
||||
}
|
||||
|
||||
function useShouldHideMediaOptions(a0) { // fn#76837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9996:224, offset: 0x01de6f79, size: 102 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
|
||||
_fun76838);
|
||||
return (value3 == null ? value2 : value3.hasFlag(ChannelFlags.HIDE_MEDIA_DOWNLOAD_OPTIONS)) === true;
|
||||
}
|
||||
|
||||
function _fun76838() { // fn#76838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9996:300, offset: 0x01de6fdf, size: 96 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const channel = ChannelStore.getChannel(env0_0);
|
||||
const value4 = null;
|
||||
const value5 = undefined;
|
||||
return value4 != (value4 == channel ? value5 : channel.parent_id) && channel.isForumPost() ? ChannelStore.getChannel(value4 == channel ? value5 : channel.parent_id) : value4;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user