/* Metro module 10660; source: modules/video_calls/native/VoiceCallOverlayUtils.tsx; dependencies: [7716, 694, 2] */ function _fun81988(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:6, offset: 0x01ee658d, size: 272 bytes, params: 8, frame: 21 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const {MIN_MARGIN_BETWEEN_OVERLAYS, VoiceCallOverlayType} = require(7716) /* metro dependency 7716: ChannelCallConstants */; const closure = doRectanglesIntersectWorklet; closure.__closure = {}; closure.__workletHash = 16149528537623; closure.__initData = {code: 'function VoiceCallOverlayUtilsTsx1(rectA,rectB,minMarginBetweenOverlays){if(rectA==null||rectA.x==null||rectA.y==null||rectA.width==null||rectA.height==null||rectB==null||rectB.x==null||rectB.y==null||rectB.width==null||rectB.height==null){return false;}const minAx=rectA.x-minMarginBetweenOverlays;const maxAx=rectA.x+rectA.width+minMarginBetweenOverlays;const minAy=rectA.y-minMarginBetweenOverlays;const maxAy=rectA.y+rectA.height+minMarginBetweenOverlays;const minBx=rectB.x;const maxBx=rectB.x+rectB.width;const minBy=rectB.y;const maxBy=rectB.y+rectB.height;const aLeftOfB=maxAxmaxBx;const aBelowB=minAy>maxBy;const aAboveB=maxAy value5; r0 = !r0 ? value4 < y : r0; r0 = !r0 ? value3 > value6 : r0; return !r0; } function doesTargetPositionIntersectOtherOverlaysWorklet(a0, a1, a2) { // fn#81990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:2305, offset: 0x01ee6794, size: 177 bytes, params: 4, frame: 17 const VOICE_CONTROLS_TOGGLE_BUTTON = VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON; if (VOICE_CONTROLS_TOGGLE_BUTTON === a1) { if (a0[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE].isVisible) { if (doRectanglesIntersectWorklet(a2, a0[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE], MIN_MARGIN_BETWEEN_OVERLAYS)) { return true; } return false; } } else { if (VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE !== a1) { return false; } if (a0[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON].isVisible) { if (doRectanglesIntersectWorklet(a2, a0[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON], MIN_MARGIN_BETWEEN_OVERLAYS)) { return true; } return false; } } return false; } function updateVoiceCallOverlayLayoutState(a0, a1) { // fn#81991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:2973, offset: 0x01ee6845, size: 65 bytes, params: 3, frame: 13 (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VOICE_CALL_OVERLAY_LAYOUT_STATE_UPDATE', voiceCallOverlayType: a0, voiceCallOverlayLayoutState: a1}); } function setPipEnabledWhileFocusedOnActivityOrStream(a0) { // fn#81992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:3187, offset: 0x01ee6886, size: 57 bytes, params: 2, frame: 13 (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VOICE_CALL_SET_PIP_ENABLED_FOR_ACTIVITY_OR_STREAM', pipEnabledWhileFocusedOnActivityOrStream: a0}); }