260 lines
18 KiB
TypeScript
260 lines
18 KiB
TypeScript
/* Metro module 15697; source: modules/feedback/native/FeedbackManager.tsx; dependencies: [7, 6, 15, 17, 18, 4234, 1379, 4294, 4395, 9906, 4285, 15698, 1962, 5459, 4080, 3774, 15702, 15705, 15707, 15711, 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 ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
|
|
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
|
|
import StreamRTCConnectionStore from '../../../stores/StreamRTCConnectionStore.tsx'; /* Metro dependency 4395 */
|
|
import FeedbackManager from '../FeedbackManager.tsx'; /* Metro dependency 15711 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as EmbeddedActivityLocationUtilsModule from '../../activities/utils/embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 9906 */
|
|
|
|
function _fun120476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:6, offset: 0x0252c12f, size: 316 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = FeedbackManager;
|
|
value = _fun120480(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/FeedbackManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_120477() { // fn#120477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:211, offset: 0x0252c26b, 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_120477_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun120480(a0) { // fn#120480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:414, offset: 0x0252c2cd, size: 42 bytes, params: 2, frame: 14
|
|
const FeedbackManager_1204812 = FeedbackManager_120481;
|
|
Inherits(FeedbackManager_1204812, a0);
|
|
return CreateClass(FeedbackManager_1204812);
|
|
function FeedbackManager_120481(a0) { // fn#120481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:426, offset: 0x0252c2f7, size: 244 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_4;
|
|
binding(this, FeedbackManager_120481);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_6(FeedbackManager_120481);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_120477()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.actions = {VOICE_CHANNEL_SHOW_FEEDBACK: VOICE_CHANNEL_SHOW_FEEDBACK, STREAM_CLOSE: STREAM_CLOSE_120483,
|
|
EMBEDDED_ACTIVITY_CLOSE: EMBEDDED_ACTIVITY_CLOSE_120484,
|
|
IN_APP_REPORTS_SHOW_FEEDBACK: IN_APP_REPORTS_SHOW_FEEDBACK};
|
|
value.handleShowStreamFeedback = handleShowStreamFeedback;
|
|
value.handleShowActivityFeedback = handleShowActivityFeedback;
|
|
value.handleShowVoiceFeedback = function({analyticsData}) {
|
|
var binding = analyticsData;
|
|
var VOICE = FeedbackType.VOICE;
|
|
binding.possiblyShowFeedbackModal(VOICE, _fun120493);
|
|
};
|
|
value.handleInAppReportsFeedback = function({reportId, reportType}) {
|
|
var binding = reportId;
|
|
var IN_APP_REPORTS = FeedbackType.IN_APP_REPORTS;
|
|
binding.possiblyShowFeedbackModal(IN_APP_REPORTS, _fun120496);
|
|
};
|
|
return value;
|
|
function VOICE_CHANNEL_SHOW_FEEDBACK(a0) { // fn#120482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:696, owner: FeedbackManager_120481.VOICE_CHANNEL_SHOW_FEEDBACK, offset: 0x0252c3eb, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleShowVoiceFeedback(a0);
|
|
}
|
|
|
|
function FeedbackManager_120481STREAM_CLOSE(a0) { // fn#120483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:741, owner: FeedbackManager_120481.STREAM_CLOSE, offset: 0x0252c402, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleShowStreamFeedback(a0);
|
|
}
|
|
|
|
function FeedbackManager_120481EMBEDDED_ACTIVITY_CLOSE(a0) { // fn#120484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:798, owner: FeedbackManager_120481.EMBEDDED_ACTIVITY_CLOSE, offset: 0x0252c419, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleShowActivityFeedback(a0);
|
|
}
|
|
|
|
function IN_APP_REPORTS_SHOW_FEEDBACK(a0) { // fn#120485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:862, owner: FeedbackManager_120481.IN_APP_REPORTS_SHOW_FEEDBACK, offset: 0x0252c430, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleInAppReportsFeedback(a0);
|
|
}
|
|
|
|
function handleShowStreamFeedback(a0) { // fn#120486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:925, owner: FeedbackManager_120481.handleShowStreamFeedback, offset: 0x0252c447, size: 67 bytes, params: 2, frame: 13
|
|
var environment;
|
|
var value;
|
|
var streamKey;
|
|
var possiblyShowFeedbackModal;
|
|
if (a0.canShowFeedback) {
|
|
streamKey = a0.streamKey;
|
|
possiblyShowFeedbackModal = streamKey.possiblyShowFeedbackModal;
|
|
value = environment.__proto__.__proto__;
|
|
Reflect.apply(possiblyShowFeedbackModal, streamKey, [FeedbackType.STREAM, _fun120487]);
|
|
}
|
|
function _fun120487() { // fn#120487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1002, offset: 0x0252c48a, size: 277 bytes, params: 1, frame: 17
|
|
var environment;
|
|
var r4;
|
|
var streamRTCConnectionStoreBinding;
|
|
var object;
|
|
var getMediaSessionId;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
const moduleValue = require(dependencyMap[10]);
|
|
const channel = ChannelStore.getChannel(moduleValue.decodeStreamKey(streamKey).channelId);
|
|
if (channel == null) {
|
|
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
|
|
r4 = streamRTCConnectionStoreBinding.getVideoStats(streamKey) ?? ({});
|
|
object = {};
|
|
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
|
|
getMediaSessionId = streamRTCConnectionStoreBinding.getMediaSessionId;
|
|
streamKeyBinding = streamKey;
|
|
object.media_session_id = Reflect.apply(getMediaSessionId, streamRTCConnectionStoreBinding, [streamKeyBinding]);
|
|
object.rtc_connection_id = streamRTCConnectionStoreBinding.getRtcConnectionId(streamKeyBinding);
|
|
object.stream_region = streamRTCConnectionStoreBinding.getRegion(streamKeyBinding);
|
|
object.max_viewers = streamRTCConnectionStoreBinding.getMaxViewers(streamKeyBinding);
|
|
copyDataProperties(object, r4, streamRTCConnectionStoreBinding);
|
|
value = require(dependencyMap[12]);
|
|
var env0_2 = value(dependencyMap[11], dependencyMap.paths);
|
|
value = require(dependencyMap[13]);
|
|
value.runAfterInteractions(_fun120488);
|
|
} else if (!channel.isGuildStageVoice()) {
|
|
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
|
|
r4 = streamRTCConnectionStoreBinding.getVideoStats(streamKey) ?? ({});
|
|
object = {};
|
|
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
|
|
getMediaSessionId = streamRTCConnectionStoreBinding.getMediaSessionId;
|
|
streamKeyBinding = streamKey;
|
|
object.media_session_id = Reflect.apply(getMediaSessionId, streamRTCConnectionStoreBinding, [streamKeyBinding]);
|
|
object.rtc_connection_id = streamRTCConnectionStoreBinding.getRtcConnectionId(streamKeyBinding);
|
|
object.stream_region = streamRTCConnectionStoreBinding.getRegion(streamKeyBinding);
|
|
object.max_viewers = streamRTCConnectionStoreBinding.getMaxViewers(streamKeyBinding);
|
|
copyDataProperties(object, r4, streamRTCConnectionStoreBinding);
|
|
value = require(dependencyMap[12]);
|
|
var env0_2 = value(dependencyMap[11], dependencyMap.paths);
|
|
value = require(dependencyMap[13]);
|
|
value.runAfterInteractions(_fun120488);
|
|
}
|
|
function _fun120488() { // fn#120488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1355, offset: 0x0252c59f, size: 98 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
|
value.openLazy(env0_2, 'StreamFeedback' + streamKey, {stream: env0_0, analyticsData: env0_1});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleShowActivityFeedback({applicationId, location, showFeedback}) { // fn#120489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1466, owner: FeedbackManager_120481.handleShowActivityFeedback, offset: 0x0252c601, size: 155 bytes, params: 2, frame: 17
|
|
var binding;
|
|
const applicationId2 = applicationId;
|
|
const application = ApplicationStore.getApplication(applicationId);
|
|
const env0_3 = ChannelStore.getChannel((EmbeddedActivityLocationUtilsModule).getEmbeddedActivityLocationChannelId(location));
|
|
if (application != null && showFeedback) {
|
|
binding = applicationId2;
|
|
binding.possiblyShowFeedbackModal(FeedbackType.ACTIVITY, _fun120490);
|
|
}
|
|
function _fun120490() { // fn#120490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1661, offset: 0x0252c69c, size: 121 bytes, params: 1, frame: 17
|
|
var environment;
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
const env0_0 = require(dependencyMap[12])(dependencyMap[16], dependencyMap.paths);
|
|
const object = {};
|
|
const rtcConnectionStoreBinding = RTCConnectionStore;
|
|
object.media_session_id = rtcConnectionStoreBinding.getMediaSessionId();
|
|
object.rtc_connection_id = rtcConnectionStoreBinding.getRTCConnectionId();
|
|
require(dependencyMap[13]).runAfterInteractions(_fun120491);
|
|
function _fun120491() { // fn#120491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1811, offset: 0x0252c715, size: 121 bytes, params: 1, frame: 21
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
|
const openLazy = value.openLazy;
|
|
const binding = env0_0;
|
|
const locationBinding = location;
|
|
Reflect.apply(openLazy, value, [binding, 'ActivityFeedback' + locationBinding.id + applicationId,
|
|
{analyticsData: env0_1, activityApplication: env1_2, channel: env1_3,
|
|
embeddedActivityLocation: locationBinding}]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleShowVoiceFeedback({analyticsData}) { // fn#120492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1977, owner: FeedbackManager_120481.handleShowVoiceFeedback, offset: 0x0252c78e, size: 58 bytes, params: 2, frame: 13
|
|
const binding = analyticsData;
|
|
const possiblyShowFeedbackModal = binding.possiblyShowFeedbackModal;
|
|
const VOICE = FeedbackType.VOICE;
|
|
Reflect.apply(possiblyShowFeedbackModal, binding, [VOICE, _fun120493]);
|
|
function _fun120493() { // fn#120493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2036, offset: 0x0252c7c8, size: 81 bytes, params: 1, frame: 16
|
|
var environment;
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
const env0_0 = require(dependencyMap[12])(dependencyMap[17], dependencyMap.paths);
|
|
require(dependencyMap[13]).runAfterInteractions(_fun120494);
|
|
function _fun120494() { // fn#120494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2102, offset: 0x0252c819, size: 90 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
|
const openLazy = value.openLazy;
|
|
const binding = env0_0;
|
|
const analyticsDataBinding = analyticsData;
|
|
Reflect.apply(openLazy, value, [binding, 'VoiceFeedback' + analyticsDataBinding.channel_id,
|
|
{analyticsData: analyticsDataBinding}]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleInAppReportsFeedback({reportId, reportType}) { // fn#120495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2213, owner: FeedbackManager_120481.handleInAppReportsFeedback, offset: 0x0252c873, size: 68 bytes, params: 2, frame: 13
|
|
const binding = reportId;
|
|
const possiblyShowFeedbackModal = binding.possiblyShowFeedbackModal;
|
|
const IN_APP_REPORTS = FeedbackType.IN_APP_REPORTS;
|
|
Reflect.apply(possiblyShowFeedbackModal, binding, [IN_APP_REPORTS, _fun120496]);
|
|
function _fun120496() { // fn#120496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2289, offset: 0x0252c8b7, size: 81 bytes, params: 1, frame: 16
|
|
var environment;
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
const env0_0 = require(dependencyMap[12])(dependencyMap[18], dependencyMap.paths);
|
|
require(dependencyMap[13]).runAfterInteractions(_fun120497);
|
|
function _fun120497() { // fn#120497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2355, offset: 0x0252c908, size: 120 bytes, params: 1, frame: 19
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
|
value.openLazy(env0_0, 'ReportingFeedback' + reportType + (reportId ?? ''), {reportId: reportId,
|
|
reportType: reportType});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun120476, 15697, [7, 6, 15, 17, 18, 4234, 1379, 4294, 4395, 9906, 4285, 15698, 1962, 5459, 4080, 3774,
|
|
15702, 15705, 15707, 15711,
|
|
2]) /* metro module 15697, dependencies: [7, 6, 15, 17, 18, 4234, 1379, 4294, 4395, 9906, 4285, 15698, 1962, 5459, 4080, 3774, 15702, 15705, 15707, 15711, 2] */;
|