Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,362 @@
|
||||
/* Metro module 7129; source: modules/clips/ClipAnalyticsUtils.tsx; dependencies: [4399, 4492, 4395, 4265, 4284, 4654, 4285, 7130, 2] */
|
||||
function _fun56991(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7307:6, offset: 0x013d7e5e, size: 253 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_56994 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = getClipType;
|
||||
const closure2 = function(a0) {
|
||||
var object = {};
|
||||
object.clip_type = getClipType(a0);
|
||||
object.num_clip_participants = a0.users.length;
|
||||
object.clip_session_id = a0.gameSessionId;
|
||||
object.is_candidate = a0.isCandidate;
|
||||
return object;
|
||||
};
|
||||
const closure3 = getClipContextProperties;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const applicationStreamingSettingsStore = importDefault(4399) /* metro dependency 4399: ApplicationStreamingSettingsStore */;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const streamRTCConnectionStore = importDefault(4395) /* metro dependency 4395: StreamRTCConnectionStore */;
|
||||
const clipsStore = importDefault(4265) /* metro dependency 4265: ClipsStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/clips/ClipAnalyticsUtils.tsx');
|
||||
exports.getClipType = closure;
|
||||
exports.getClipBaseProperties = closure2;
|
||||
exports.getClipContextProperties = closure3;
|
||||
exports.getClipSignalTypes = getClipSignalTypes;
|
||||
exports.getPreSaveClipAnalytics = getPreSaveClipAnalytics;
|
||||
exports.getPostSaveClipAnalytics = getPostSaveClipAnalytics;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_56992(a0, a1) { // fn#56992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7307:140, offset: 0x013d7f5b, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun56993;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_56994(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_56994(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_56994(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun56993;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function getClipType({decision}) { // fn#56995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7307:1050, offset: 0x013d80cd, size: 211 bytes, params: 2, frame: 14
|
||||
const type = decision == null || decision.signal == null ? undefined : decision.signal.type;
|
||||
const ClipSignalTypes = (require(4284) /* metro dependency 4284: ClipsTypes */).ClipSignalTypes;
|
||||
const MANUAL = ClipSignalTypes.MANUAL;
|
||||
if (MANUAL === type) {
|
||||
return 'manual';
|
||||
}
|
||||
const DISTRIBUTED = ClipSignalTypes.DISTRIBUTED;
|
||||
if (DISTRIBUTED === type) {
|
||||
return 'distributed';
|
||||
}
|
||||
const LAUGHTER = ClipSignalTypes.LAUGHTER;
|
||||
if (LAUGHTER === type) {
|
||||
return 'auto_ml';
|
||||
}
|
||||
const GAME_EVENT = ClipSignalTypes.GAME_EVENT;
|
||||
if (GAME_EVENT === type) {
|
||||
return 'auto_ml';
|
||||
}
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
function getClipContextProperties(a0) { // fn#56997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7307:1541, offset: 0x013d81e8, size: 85 bytes, params: 2, frame: 14
|
||||
const object2 = {};
|
||||
const value2 = undefined;
|
||||
object2.clip_runtime = (require(4654) /* metro dependency 4654: ClipsV3RuntimeExperiment */).getClipsRuntime(a0);
|
||||
const currentClipsSession = ClipsStore.getCurrentClipsSession();
|
||||
object2.current_clip_session_id = currentClipsSession == null ? value2 : currentClipsSession.id;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getClipSignalTypes({timeline}) { // fn#56998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7307:1926, offset: 0x013d823d, size: 314 bytes, params: 2, frame: 23
|
||||
var r2;
|
||||
var value4;
|
||||
var signal;
|
||||
var type;
|
||||
const ClipSignalTypes = (require(4284) /* metro dependency 4284: ClipsTypes */).ClipSignalTypes;
|
||||
var MANUAL;
|
||||
var DISTRIBUTED;
|
||||
var LAUGHTER;
|
||||
var GAME_EVENT;
|
||||
var push;
|
||||
var eventType;
|
||||
var value5;
|
||||
const items2 = [];
|
||||
const value2 = _createForOfIteratorHelperLoose_56992(timeline);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r2 = value3;
|
||||
while (true) {
|
||||
value4 = r2.value;
|
||||
signal = value4.signal;
|
||||
type = signal.type;
|
||||
MANUAL = ClipSignalTypes.MANUAL;
|
||||
if (MANUAL !== type) {
|
||||
DISTRIBUTED = ClipSignalTypes.DISTRIBUTED;
|
||||
if (DISTRIBUTED === type) {
|
||||
items2.push('distributed');
|
||||
break;
|
||||
}
|
||||
LAUGHTER = ClipSignalTypes.LAUGHTER;
|
||||
if (LAUGHTER === type) {
|
||||
items2.push('laughter');
|
||||
break;
|
||||
}
|
||||
GAME_EVENT = ClipSignalTypes.GAME_EVENT;
|
||||
if (GAME_EVENT !== type) {
|
||||
break;
|
||||
}
|
||||
push = items2.push;
|
||||
signal = value4.signal;
|
||||
eventType = signal.eventType;
|
||||
Reflect.apply(push, items2, ['game_event:' + eventType]);
|
||||
break;
|
||||
}
|
||||
items2.push('manual');
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r2 = value5;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function getPreSaveClipAnalytics(a0) { // fn#56999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7307:2386, offset: 0x013d8377, size: 298 bytes, params: 2, frame: 19
|
||||
var r9;
|
||||
var r2;
|
||||
var getRTCConnection;
|
||||
var moduleValue;
|
||||
const currentUserActiveStream = ApplicationStreamingStore.getCurrentUserActiveStream();
|
||||
const value3 = null;
|
||||
if (value3 != currentUserActiveStream) {
|
||||
getRTCConnection = StreamRTCConnectionStore.getRTCConnection;
|
||||
moduleValue = require(4285) /* metro dependency 4285: StreamKeyUtils */;
|
||||
r2 = Reflect.apply(getRTCConnection, StreamRTCConnectionStore,
|
||||
[moduleValue.encodeStreamKey(currentUserActiveStream)]);
|
||||
r9 = require;
|
||||
} else {
|
||||
r2 = value3;
|
||||
}
|
||||
const object2 = {};
|
||||
const getClipBasePropertiesBinding = getClipBaseProperties;
|
||||
const value5 = undefined;
|
||||
copyDataProperties(object2, getClipBasePropertiesBinding(a0), r9);
|
||||
copyDataProperties(object2, getClipContextProperties('getPreSaveClipAnalytics'), r9);
|
||||
object2['rtc_connection_id'] = value3 == r2 ? value5 : r2.getRTCConnectionId();
|
||||
object2['media_session_id'] = value3 == r2 ? value5 : r2.getMediaSessionId();
|
||||
object2['parent_media_session_id'] = value3 == r2 ? value5 : r2.parentMediaSessionId;
|
||||
object2['guild_id'] = a0.guildId;
|
||||
object2['channel_id'] = a0.channelId;
|
||||
object2['application_id'] = a0.applicationId;
|
||||
object2['application_name'] = a0.applicationName;
|
||||
object2['clip_uuid'] = a0.id;
|
||||
object2['clip_event_timeline_size'] = a0.timeline.length;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getPostSaveClipAnalytics(a0, a1) { // fn#57000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7307:2980, offset: 0x013d84a1, size: 1513 bytes, params: 3, frame: 26
|
||||
var r16;
|
||||
var r12;
|
||||
var propertyName;
|
||||
var framesEncodedByEncoder2;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var encoder;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
const Map = global.Map;
|
||||
let map = new Map();
|
||||
for (propertyName in a1.framesEncodedByEncoder) {
|
||||
framesEncodedByEncoder2 = a1.framesEncodedByEncoder;
|
||||
property = framesEncodedByEncoder2[propertyName];
|
||||
moduleValue = require(7130) /* metro dependency 7130: VideoQualityStats */;
|
||||
encoder = moduleValue.parseEncoder(propertyName);
|
||||
value3 = map.get(encoder);
|
||||
value4 = value3 != null;
|
||||
value5 = 0;
|
||||
if (value4) {
|
||||
r12 = value3;
|
||||
continue;
|
||||
}
|
||||
r12 = value5;
|
||||
continue;
|
||||
map.set(encoder, r12 + property);
|
||||
r16 = value4;
|
||||
}
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, r16);
|
||||
let get = map.get;
|
||||
const Encoders = (require(7130) /* metro dependency 7130: VideoQualityStats */).Encoders;
|
||||
const NVIDIA_CUDA = Encoders.NVIDIA_CUDA;
|
||||
const value6 = Reflect.apply(get, map, [NVIDIA_CUDA]);
|
||||
const value7 = 0;
|
||||
let r6 = value6 ?? value7;
|
||||
object2['frames_encoded_nvidia_cuda'] = r6;
|
||||
get = map.get;
|
||||
const NVIDIA_DIRECT_3D = Encoders.NVIDIA_DIRECT_3D;
|
||||
object2['frames_encoded_nvidia_direct3d'] = Reflect.apply(get, map, [NVIDIA_DIRECT_3D]) ?? value7;
|
||||
get = map.get;
|
||||
const OPENH264 = Encoders.OPENH264;
|
||||
object2['frames_encoded_openh264'] = Reflect.apply(get, map, [OPENH264]) ?? value7;
|
||||
get = map.get;
|
||||
const VIDEOTOOLBOX = Encoders.VIDEOTOOLBOX;
|
||||
object2['frames_encoded_videotoolbox'] = Reflect.apply(get, map, [VIDEOTOOLBOX]) ?? value7;
|
||||
get = map.get;
|
||||
const AMD_DIRECT_3D = Encoders.AMD_DIRECT_3D;
|
||||
object2['frames_encoded_amd_direct3d'] = Reflect.apply(get, map, [AMD_DIRECT_3D]) ?? value7;
|
||||
get = map.get;
|
||||
const AMD_VAAPI = Encoders.AMD_VAAPI;
|
||||
object2['frames_encoded_amd_vaapi'] = Reflect.apply(get, map, [AMD_VAAPI]) ?? value7;
|
||||
get = map.get;
|
||||
const INTEL = Encoders.INTEL;
|
||||
object2['frames_encoded_intel'] = Reflect.apply(get, map, [INTEL]) ?? value7;
|
||||
get = map.get;
|
||||
const INTEL_DIRECT_3D = Encoders.INTEL_DIRECT_3D;
|
||||
object2['frames_encoded_intel_direct3d'] = Reflect.apply(get, map, [INTEL_DIRECT_3D]) ?? value7;
|
||||
get = map.get;
|
||||
let WMF_DIRECT_3D_INTEL = Encoders.WMF_DIRECT_3D_INTEL;
|
||||
object2['frames_encoded_wmf_direct3d_intel'] = Reflect.apply(get, map, [WMF_DIRECT_3D_INTEL]) ?? value7;
|
||||
get = map.get;
|
||||
let WMF_DIRECT_3D_NVIDIA = Encoders.WMF_DIRECT_3D_NVIDIA;
|
||||
object2['frames_encoded_wmf_direct3d_nvidia'] = Reflect.apply(get, map, [WMF_DIRECT_3D_NVIDIA]) ?? value7;
|
||||
get = map.get;
|
||||
let WMF_DIRECT_3D_AMD = Encoders.WMF_DIRECT_3D_AMD;
|
||||
object2['frames_encoded_wmf_direct3d_amd'] = Reflect.apply(get, map, [WMF_DIRECT_3D_AMD]) ?? value7;
|
||||
get = map.get;
|
||||
const WMF_DIRECT_3D = Encoders.WMF_DIRECT_3D;
|
||||
r6 = Reflect.apply(get, map, [WMF_DIRECT_3D]) ?? value7;
|
||||
get = map.get;
|
||||
WMF_DIRECT_3D_INTEL = Encoders.WMF_DIRECT_3D_INTEL;
|
||||
const value20 = r6 + (Reflect.apply(get, map, [WMF_DIRECT_3D_INTEL]) ?? value7);
|
||||
get = map.get;
|
||||
WMF_DIRECT_3D_NVIDIA = Encoders.WMF_DIRECT_3D_NVIDIA;
|
||||
const value22 = value20 + (Reflect.apply(get, map, [WMF_DIRECT_3D_NVIDIA]) ?? value7);
|
||||
get = map.get;
|
||||
WMF_DIRECT_3D_AMD = Encoders.WMF_DIRECT_3D_AMD;
|
||||
object2['frames_encoded_wmf_direct3d'] = value22 + (Reflect.apply(get, map, [WMF_DIRECT_3D_AMD]) ?? value7);
|
||||
get = map.get;
|
||||
const UNCATEGORIZED = Encoders.UNCATEGORIZED;
|
||||
object2['frames_encoded_uncategorized'] = Reflect.apply(get, map, [UNCATEGORIZED]) ?? value7;
|
||||
get = map.get;
|
||||
const UNKNOWN = Encoders.UNKNOWN;
|
||||
map = Reflect.apply(get, map, [UNKNOWN]);
|
||||
object2['frames_encoded_unknown'] = map ?? value7;
|
||||
object2['frames_submitted'] = a1.framesSubmitted;
|
||||
object2['frames_submitted_during_clip'] = a1.framesSubmittedDuringClip;
|
||||
object2['frames_encoded'] = a1.framesEncoded;
|
||||
object2['frames_encoded_during_clip'] = a1.framesEncodedDuringClip;
|
||||
object2['frames_dropped'] = a1.framesDropped;
|
||||
object2['frames_dropped_during_clip'] = a1.framesDroppedDuringClip;
|
||||
const getSettings = ClipsStore.getSettings;
|
||||
object2['clip_duration_setting'] = Reflect.apply(getSettings, ClipsStore, []).clipsLength;
|
||||
object2['clip_duration'] = a1.clipDuration;
|
||||
object2['clip_resolution_width'] = a1.clipResolutionWidth;
|
||||
object2['clip_resolution_height'] = a1.clipResolutionHeight;
|
||||
object2['min_fps'] = a1.minFps;
|
||||
object2['max_fps'] = a1.maxFps;
|
||||
object2['submitted_fps'] = a1.submittedFps;
|
||||
const getState = ApplicationStreamingSettingsStore.getState;
|
||||
object2['target_fps'] = Reflect.apply(getState, ApplicationStreamingSettingsStore, []).fps;
|
||||
object2['audio_track_count'] = a1.audioTrackCount;
|
||||
object2['saved_at'] = a1.savedAt;
|
||||
return object2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user