/* Metro module 9281; source: modules/rtc/hooks/useSecureFramesPairwiseFingerprint.tsx; dependencies: [5, 57, 31, 1226, 4259, 4294, 9277, 4291, 566, 44, 206, 9260, 2] */ function _fun72593(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:6, offset: 0x01d4b3eb, size: 245 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 = importDefault(57) /* metro dependency 57 */; const env0_5 = importAll(31) /* metro dependency 31 */; const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */; const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */; const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */; const env0_9 = (require(9277) /* metro dependency 9277: SecureFramesConstants */).SECURE_FRAMES_GENERATE_FINGERPRINT_VERSION; const env0_10 = (require(4291) /* metro dependency 4291: Constants */).Features; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rtc/hooks/useSecureFramesPairwiseFingerprint.tsx'); exports.useSecureFramesPairwiseFingerprint = useSecureFramesPairwiseFingerprint; } function useSecureFramesPairwiseFingerprint({userId}) { // fn#72594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:356, offset: 0x01d4b4e0, size: 423 bytes, params: 2, frame: 26 const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() { return AuthenticationStore.getId(); }); (importDefault(44) /* metro dependency 44 */)(id !== userId, '[useSecureFramesPairwiseFingerprint] Should not pass current user id.'); const binding = env0_5; let useState = binding.useState; const value2 = Reflect.apply(useState, binding, [null]); const binding2 = env0_4; const value3 = binding2(value2, 2); const property = value3[0]; const env0_3 = value3[1]; useState = binding.useState; const value4 = binding2(Reflect.apply(useState, binding, [false]), 2); const property2 = value4[0]; var env0_5 = value4[1]; const secureFramesRosterMapEntry = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], function() { return RTCConnectionStore.getSecureFramesRosterMapEntry(userId); }); const secureFramesRosterMapEntry2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], function() { return RTCConnectionStore.getSecureFramesRosterMapEntry(id); }); value = binding.useCallback(_fun72598, []); value = binding.useCallback(_fun72599(), [value]); const env0_10 = binding.useRef(null); binding.useEffect(_fun72604, [id, secureFramesRosterMapEntry2, value, userId, secureFramesRosterMapEntry]); return binding.useMemo(_fun72607, [property, property2, secureFramesRosterMapEntry]); } function _fun72598(a0) { // fn#72598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:806, offset: 0x01d4b6bd, size: 64 bytes, params: 2, frame: 14 const binding = env0_3; const defaultImport = importDefault(206) /* metro dependency 206 */; binding(defaultImport.fromByteArray(a0)); env0_5(false); } function _fun72599() { // fn#72599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:867, offset: 0x01d4b6fd, size: 36 bytes, params: 1, frame: 12 const env0_0 = env1_3(_fun72601); return _fun72603; } function _fun72604() { // fn#72604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:1250, offset: 0x01d4b847, size: 113 bytes, params: 1, frame: 16 if (secureFramesRosterMapEntry != null && secureFramesRosterMapEntry != null && env0_10.current == null) { env0_5(true); env0_10.current = global.setTimeout(_fun72605, 0); } const env0_0 = env0_10.current; return function() { if (current != null) { global.clearTimeout(current); } }; } function _fun72607() { // fn#72607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:1418, offset: 0x01d4b8fb, size: 34 bytes, params: 1, frame: 3 return {fingerprint: env0_2, userKey: secureFramesRosterMapEntry, loading: env0_4}; } function* _fun72601(a0, a1, a2, a3) { // fn#72601, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:887, offset: 0x01d4b72c, size: 236 bytes, params: 5, frame: 23 var environment; var rTCConnection; if (true) { value = environment.__proto__.__proto__.__proto__; var binding = env3_7; var supports = binding.supports; var MLS_PAIRWISE_FINGERPRINTS = env3_10.MLS_PAIRWISE_FINGERPRINTS; if (Reflect.apply(supports, binding, [MLS_PAIRWISE_FINGERPRINTS])) { rTCConnection = env3_8.getRTCConnection(); if (rTCConnection != null) { rTCConnection.getMLSPairwiseFingerprint(env3_9, a2, _fun72602); } } else { binding = env3_0; var value3 = binding(env3_2[11]); var generatePairwiseFingerprint = value3.generatePairwiseFingerprint; binding = env3_9; var Uint8Array = global.Uint8Array; var prototype = Uint8Array.prototype; value = Object.create(prototype, {constructor: {value: Uint8Array}}); var uint8Array = new Uint8Array(a1); value = uint8Array instanceof Object ? uint8Array : value; Uint8Array = global.Uint8Array; prototype = Uint8Array.prototype; var value4 = Object.create(prototype, {constructor: {value: Uint8Array}}); uint8Array = new Uint8Array(a3); yield Reflect.apply(generatePairwiseFingerprint, value3, [binding, value, a0, uint8Array instanceof Object ? uint8Array : value4, a2]); value = undefined; if (false) { return value; } RTCConnectionStore(value); } } } function _fun72605() { // fn#72605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:1319, offset: 0x01d4b8b8, size: 31 bytes, params: 1, frame: 17 return env1_9(id, secureFramesRosterMapEntry, userId, secureFramesRosterMapEntry); } function _fun72602(a0) { // fn#72602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9467:1021, offset: 0x01d4b818, size: 47 bytes, params: 2, frame: 12 const value = environment.__proto__.__proto__.__proto__; const Uint8Array = global.Uint8Array; RTCConnectionStore(new Uint8Array(a0)); }