mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 04:45:08 +01:00
1 line
177 KiB
Plaintext
1 line
177 KiB
Plaintext
{"version":3,"file":"512.7ee413c336c81ea3581e.js","mappings":";kTAuBAA,EAAAA,EAAAA,IAAiB,kBAAkBC,MAAOC,EAAQC,EAASC,KACzD,MAAM,cACJC,EADI,cACWC,EADX,aAC0BC,EAD1B,OACwCC,GAC1CJ,GAAW,GACTK,GAAYC,EAAAA,EAAAA,IAAsBR,GACnCO,KAILE,EAAAA,EAAAA,KAAUC,EAAAA,EAAAA,IAAsBV,EAAQ,CAAEW,gBAAiB,gBAAkBJ,EAAUK,kBAAoB,UAErGC,EAAAA,EAAAA,IAAQ,iBAAkB,CAC9BC,KAAMP,IAGJH,SACIS,EAAAA,EAAAA,IAAQ,mBAAoB,CAChCC,KAAMP,IAIVP,GAASe,EAAAA,EAAAA,MACLV,IACFL,GAASgB,EAAAA,EAAAA,IAAgBhB,EAAQO,EAAUU,MAG7CC,EAAAA,EAAAA,OAEAT,EAAAA,EAAAA,IAAU,IACLT,EACHmB,WAAY,IACPnB,EAAOmB,WACVC,uBAAmBC,GAErBC,wBAAoBD,IAGjBlB,IACHoB,EAAAA,EAAAA,kBAGEjB,GACFL,EAAQuB,cAAclB,QAI1BR,EAAAA,EAAAA,IAAiB,wBAAwBC,MAAAA,IACvC,MAAMQ,GAAYC,EAAAA,EAAAA,IAAsBR,GAClCyB,GAAOC,EAAAA,EAAAA,IAAW1B,EAAQA,EAAO2B,eAClCF,GAASlB,UAIRqB,EAAAA,EAAAA,cAAa,eAEbf,EAAAA,EAAAA,IAAQ,2BAA4B,CACxCC,KAAMP,EACNsB,eAAeC,EAAAA,EAAAA,iBAAgB,SAC/BC,YAAaN,SAIjB3B,EAAAA,EAAAA,IAAiB,kBAAkB,CAACE,EAAQC,EAASC,KACnD,MAAM,MAAE8B,GAAU9B,GAAW,CAAE8B,OAAO,GAChCzB,GAAYC,EAAAA,EAAAA,IAAsBR,GAClCyB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GH,EAAEC,EAAEE,EAAE,CAAC7U,gCAAgC,IAAIgH,EAAEhH,gCAAgC7C,mBAAmB,IAAI6J,EAAE7J,mBAAmBnB,cAAc,IAAIgL,EAAEhL,cAAcuiB,WAAW,IAAIvX,EAAEuX,WAAW/T,eAAe,IAAIxD,EAAEwD,eAAe5N,UAAU,IAAIoK,EAAEpK,UAAUN,gBAAgB,IAAI0K,EAAE1K,gBAAgBF,aAAa,IAAI4K,EAAE5K,aAAaL,eAAe,IAAIiL,EAAEjL,eAAe+D,kCAAkC,IAAIkH,EAAElH,kCAAkC+P,kBAAkB,IAAI7I,EAAE6I,kBAAkBC,cAAc,IAAI9I,EAAE8I,cAAc4O,uBAAuB,IAAI1X,EAAE0X,uBAAuBjd,cAAc,IAAIgT,EAAEhT,cAAcK,wBAAwB,IAAI2S,EAAE3S,wBAAwB8P,WAAW,IAAI6C,EAAE7C,WAAWgB,gBAAgB,IAAI6B,EAAE7B,gBAAgB5T,cAAc,IAAIyV,EAAEzV,cAAcsU,qBAAqB,IAAImB,EAAEnB,qBAAqB/D,yBAAyB,IAAIwF,EAAExF,yBAAyB7G,UAAU,IAAIqM,EAAErM,YAAY,IAAI1B,EAAE0N,EAAE,wBAAwBD,EAAEC,EAAE,gBAAgBK,GAAGL,EAAE,uBAAuBA,EAAE,mBAAmBA,EAAE,mBAA79B,GAAm/B,IAAIK,EAAEX,EAAEgN,EAAQ,IAAIrM,KAAKF,EAAET,EAAEW,GAAGF,EAAEE,GAAGF,EAAE8M,YAAYzhB,OAAOmhB,eAAejN,EAAE,aAAa,CAAC5X,OAAM,KAAtvvB","sources":["webpack://telegram-t/./src/global/actions/api/calls.async.ts","webpack://telegram-t/./src/util/phoneCallEmojiConstants.ts","webpack://telegram-t/./src/global/actions/apiUpdaters/calls.async.ts","webpack://telegram-t/./src/util/vibrate.ts","webpack://telegram-t/./src/components/common/AnimatedIcon.tsx","webpack://telegram-t/./src/components/calls/group/MicrophoneButton.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipantMenu.tsx","webpack://telegram-t/./src/hooks/useThrottle.ts","webpack://telegram-t/./src/components/calls/group/OutlinedMicrophoneIcon.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipant.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipantList.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipantVideo.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipantStreams.tsx","webpack://telegram-t/./src/components/calls/group/GroupCall.tsx","webpack://telegram-t/./src/components/calls/ActiveCallHeader.tsx","webpack://telegram-t/./src/components/calls/phone/PhoneCallButton.module.scss?9dea","webpack://telegram-t/./src/components/calls/phone/PhoneCallButton.tsx","webpack://telegram-t/./src/components/calls/phone/PhoneCall.module.scss?a250","webpack://telegram-t/./src/components/calls/phone/PhoneCall.tsx","webpack://telegram-t/./src/components/calls/phone/RatePhoneCallModal.module.scss?64f6","webpack://telegram-t/./src/components/calls/phone/RatePhoneCallModal.tsx","webpack://telegram-t/./src/lib/secret-sauce/index.js"],"sourcesContent":["import { addActionHandler, getGlobal, setGlobal } from '../../index';\nimport {\n joinGroupCall,\n startSharingScreen,\n leaveGroupCall,\n toggleStream,\n isStreamEnabled,\n setVolume, stopPhoneCall,\n} from '../../../lib/secret-sauce';\n\nimport { GROUP_CALL_VOLUME_MULTIPLIER } from '../../../config';\nimport { callApi } from '../../../api/gramjs';\nimport { selectChat, selectUser } from '../../selectors';\nimport {\n selectActiveGroupCall, selectPhoneCallUser,\n} from '../../selectors/calls';\nimport {\n removeGroupCall,\n updateActiveGroupCall,\n} from '../../reducers/calls';\nimport { getGroupCallAudioContext, getGroupCallAudioElement, removeGroupCallAudioElement } from '../ui/calls';\nimport { loadFullChat } from './chats';\n\naddActionHandler('leaveGroupCall', async (global, actions, payload) => {\n const {\n isFromLibrary, shouldDiscard, shouldRemove, rejoin,\n } = payload || {};\n const groupCall = selectActiveGroupCall(global);\n if (!groupCall) {\n return;\n }\n\n setGlobal(updateActiveGroupCall(global, { connectionState: 'disconnected' }, groupCall.participantsCount - 1));\n\n await callApi('leaveGroupCall', {\n call: groupCall,\n });\n\n if (shouldDiscard) {\n await callApi('discardGroupCall', {\n call: groupCall,\n });\n }\n\n global = getGlobal();\n if (shouldRemove) {\n global = removeGroupCall(global, groupCall.id);\n }\n\n removeGroupCallAudioElement();\n\n setGlobal({\n ...global,\n groupCalls: {\n ...global.groupCalls,\n activeGroupCallId: undefined,\n },\n isCallPanelVisible: undefined,\n });\n\n if (!isFromLibrary) {\n leaveGroupCall();\n }\n\n if (rejoin) {\n actions.joinGroupCall(rejoin);\n }\n});\n\naddActionHandler('toggleGroupCallVideo', async (global) => {\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, global.currentUserId!);\n if (!user || !groupCall) {\n return;\n }\n\n await toggleStream('video');\n\n await callApi('editGroupCallParticipant', {\n call: groupCall,\n videoStopped: !isStreamEnabled('video'),\n participant: user,\n });\n});\n\naddActionHandler('requestToSpeak', (global, actions, payload) => {\n const { value } = payload || { value: true };\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, global.currentUserId!);\n if (!user || !groupCall) {\n return;\n }\n\n void callApi('editGroupCallParticipant', {\n call: groupCall,\n raiseHand: value,\n participant: user,\n });\n});\n\naddActionHandler('setGroupCallParticipantVolume', (global, actions, payload) => {\n const { participantId, volume } = payload!;\n\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, participantId);\n if (!user || !groupCall) {\n return;\n }\n\n setVolume(participantId, Math.floor(volume / GROUP_CALL_VOLUME_MULTIPLIER) / 100);\n\n void callApi('editGroupCallParticipant', {\n call: groupCall,\n volume: Number(volume),\n participant: user,\n });\n});\n\naddActionHandler('toggleGroupCallMute', async (global, actions, payload) => {\n const { participantId, value } = payload || {};\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, participantId || global.currentUserId!);\n if (!user || !groupCall) {\n return;\n }\n\n const muted = value === undefined ? isStreamEnabled('audio', user.id) : value;\n\n if (!participantId) {\n await toggleStream('audio');\n } else {\n setVolume(participantId, muted ? 0 : 1);\n }\n\n await callApi('editGroupCallParticipant', {\n call: groupCall,\n muted,\n participant: user,\n });\n});\n\naddActionHandler('toggleGroupCallPresentation', async (global, actions, payload) => {\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, global.currentUserId!);\n if (!user || !groupCall) {\n return;\n }\n\n const value = payload?.value !== undefined ? payload?.value : !isStreamEnabled('presentation');\n if (value) {\n const params = await startSharingScreen();\n if (!params) {\n return;\n }\n\n await callApi('joinGroupCallPresentation', {\n call: groupCall,\n params,\n });\n } else {\n await toggleStream('presentation', false);\n await callApi('leaveGroupCallPresentation', {\n call: groupCall,\n });\n }\n\n await callApi('editGroupCallParticipant', {\n call: groupCall,\n presentationPaused: !isStreamEnabled('presentation'),\n participant: user,\n });\n});\n\naddActionHandler('connectToActiveGroupCall', async (global, actions) => {\n const groupCall = selectActiveGroupCall(global);\n if (!groupCall) return;\n\n if (groupCall.connectionState === 'discarded') {\n actions.showNotification({ message: 'This voice chat is not active' });\n return;\n }\n\n const audioElement = getGroupCallAudioElement();\n const audioContext = getGroupCallAudioContext();\n\n if (!audioElement || !audioContext) {\n return;\n }\n\n const {\n currentUserId,\n } = global;\n\n if (!currentUserId) return;\n\n const params = await joinGroupCall(currentUserId, audioContext, audioElement, actions.apiUpdate);\n\n const result = await callApi('joinGroupCall', {\n call: groupCall,\n params,\n inviteHash: groupCall.inviteHash,\n });\n\n if (!result) return;\n\n actions.loadMoreGroupCallParticipants();\n\n if (groupCall.chatId) {\n const chat = selectChat(getGlobal(), groupCall.chatId);\n if (!chat) return;\n await loadFullChat(chat);\n }\n});\n\naddActionHandler('connectToActivePhoneCall', async (global) => {\n const { phoneCall } = global;\n\n if (!phoneCall) return;\n\n const user = selectPhoneCallUser(global);\n\n if (!user) return;\n\n const dhConfig = await callApi('getDhConfig');\n\n if (!dhConfig) return;\n\n await callApi('createPhoneCallState', [true]);\n\n const gAHash = await callApi('requestPhoneCall', [dhConfig])!;\n\n await callApi('requestCall', { user, gAHash, isVideo: phoneCall.isVideo });\n});\n\naddActionHandler('acceptCall', async (global) => {\n const { phoneCall } = global;\n\n if (!phoneCall) return;\n\n const dhConfig = await callApi('getDhConfig');\n if (!dhConfig) return;\n\n await callApi('createPhoneCallState', [false]);\n\n const gB = await callApi('acceptPhoneCall', [dhConfig])!;\n callApi('acceptCall', { call: phoneCall, gB });\n});\n\naddActionHandler('sendSignalingData', (global, actions, payload) => {\n const { phoneCall } = global;\n if (!phoneCall) {\n return;\n }\n\n const data = JSON.stringify(payload);\n\n (async () => {\n const encodedData = await callApi('encodePhoneCallData', [data]);\n\n if (!encodedData) return;\n\n callApi('sendSignalingData', { data: encodedData, call: phoneCall });\n })();\n});\n\naddActionHandler('closeCallRatingModal', (global) => {\n return {\n ...global,\n ratingPhoneCall: undefined,\n };\n});\n\naddActionHandler('setCallRating', (global, actions, payload) => {\n const { ratingPhoneCall } = global;\n if (!ratingPhoneCall) {\n return undefined;\n }\n\n const { rating, comment } = payload;\n\n callApi('setCallRating', { call: ratingPhoneCall, rating, comment });\n\n return {\n ...global,\n ratingPhoneCall: undefined,\n };\n});\n\naddActionHandler('hangUp', (global) => {\n const { phoneCall } = global;\n\n if (!phoneCall) return undefined;\n\n if (phoneCall.state === 'discarded') {\n callApi('destroyPhoneCallState');\n stopPhoneCall();\n return {\n ...global,\n phoneCall: undefined,\n isCallPanelVisible: undefined,\n };\n }\n\n callApi('destroyPhoneCallState');\n stopPhoneCall();\n callApi('discardCall', { call: phoneCall });\n\n if (phoneCall.state === 'requesting') {\n return {\n ...global,\n phoneCall: undefined,\n isCallPanelVisible: undefined,\n };\n }\n\n return undefined;\n});\n","export const EMOJI_DATA = new Uint16Array([\n 0xd83d, 0xde09, 0xd83d, 0xde0d, 0xd83d, 0xde1b, 0xd83d, 0xde2d, 0xd83d, 0xde31, 0xd83d, 0xde21,\n 0xd83d, 0xde0e, 0xd83d, 0xde34, 0xd83d, 0xde35, 0xd83d, 0xde08, 0xd83d, 0xde2c, 0xd83d, 0xde07,\n 0xd83d, 0xde0f, 0xd83d, 0xdc6e, 0xd83d, 0xdc77, 0xd83d, 0xdc82, 0xd83d, 0xdc76, 0xd83d, 0xdc68,\n 0xd83d, 0xdc69, 0xd83d, 0xdc74, 0xd83d, 0xdc75, 0xd83d, 0xde3b, 0xd83d, 0xde3d, 0xd83d, 0xde40,\n 0xd83d, 0xdc7a, 0xd83d, 0xde48, 0xd83d, 0xde49, 0xd83d, 0xde4a, 0xd83d, 0xdc80, 0xd83d, 0xdc7d,\n 0xd83d, 0xdca9, 0xd83d, 0xdd25, 0xd83d, 0xdca5, 0xd83d, 0xdca4, 0xd83d, 0xdc42, 0xd83d, 0xdc40,\n 0xd83d, 0xdc43, 0xd83d, 0xdc45, 0xd83d, 0xdc44, 0xd83d, 0xdc4d, 0xd83d, 0xdc4e, 0xd83d, 0xdc4c,\n 0xd83d, 0xdc4a, 0x270c, 0x270b, 0xd83d, 0xdc50, 0xd83d, 0xdc46, 0xd83d, 0xdc47, 0xd83d, 0xdc49,\n 0xd83d, 0xdc48, 0xd83d, 0xde4f, 0xd83d, 0xdc4f, 0xd83d, 0xdcaa, 0xd83d, 0xdeb6, 0xd83c, 0xdfc3,\n 0xd83d, 0xdc83, 0xd83d, 0xdc6b, 0xd83d, 0xdc6a, 0xd83d, 0xdc6c, 0xd83d, 0xdc6d, 0xd83d, 0xdc85,\n 0xd83c, 0xdfa9, 0xd83d, 0xdc51, 0xd83d, 0xdc52, 0xd83d, 0xdc5f, 0xd83d, 0xdc5e, 0xd83d, 0xdc60,\n 0xd83d, 0xdc55, 0xd83d, 0xdc57, 0xd83d, 0xdc56, 0xd83d, 0xdc59, 0xd83d, 0xdc5c, 0xd83d, 0xdc53,\n 0xd83c, 0xdf80, 0xd83d, 0xdc84, 0xd83d, 0xdc9b, 0xd83d, 0xdc99, 0xd83d, 0xdc9c, 0xd83d, 0xdc9a,\n 0xd83d, 0xdc8d, 0xd83d, 0xdc8e, 0xd83d, 0xdc36, 0xd83d, 0xdc3a, 0xd83d, 0xdc31, 0xd83d, 0xdc2d,\n 0xd83d, 0xdc39, 0xd83d, 0xdc30, 0xd83d, 0xdc38, 0xd83d, 0xdc2f, 0xd83d, 0xdc28, 0xd83d, 0xdc3b,\n 0xd83d, 0xdc37, 0xd83d, 0xdc2e, 0xd83d, 0xdc17, 0xd83d, 0xdc34, 0xd83d, 0xdc11, 0xd83d, 0xdc18,\n 0xd83d, 0xdc3c, 0xd83d, 0xdc27, 0xd83d, 0xdc25, 0xd83d, 0xdc14, 0xd83d, 0xdc0d, 0xd83d, 0xdc22,\n 0xd83d, 0xdc1b, 0xd83d, 0xdc1d, 0xd83d, 0xdc1c, 0xd83d, 0xdc1e, 0xd83d, 0xdc0c, 0xd83d, 0xdc19,\n 0xd83d, 0xdc1a, 0xd83d, 0xdc1f, 0xd83d, 0xdc2c, 0xd83d, 0xdc0b, 0xd83d, 0xdc10, 0xd83d, 0xdc0a,\n 0xd83d, 0xdc2b, 0xd83c, 0xdf40, 0xd83c, 0xdf39, 0xd83c, 0xdf3b, 0xd83c, 0xdf41, 0xd83c, 0xdf3e,\n 0xd83c, 0xdf44, 0xd83c, 0xdf35, 0xd83c, 0xdf34, 0xd83c, 0xdf33, 0xd83c, 0xdf1e, 0xd83c, 0xdf1a,\n 0xd83c, 0xdf19, 0xd83c, 0xdf0e, 0xd83c, 0xdf0b, 0x26a1, 0x2614, 0x2744, 0x26c4, 0xd83c, 0xdf00,\n 0xd83c, 0xdf08, 0xd83c, 0xdf0a, 0xd83c, 0xdf93, 0xd83c, 0xdf86, 0xd83c, 0xdf83, 0xd83d, 0xdc7b,\n 0xd83c, 0xdf85, 0xd83c, 0xdf84, 0xd83c, 0xdf81, 0xd83c, 0xdf88, 0xd83d, 0xdd2e, 0xd83c, 0xdfa5,\n 0xd83d, 0xdcf7, 0xd83d, 0xdcbf, 0xd83d, 0xdcbb, 0x260e, 0xd83d, 0xdce1, 0xd83d, 0xdcfa, 0xd83d,\n 0xdcfb, 0xd83d, 0xdd09, 0xd83d, 0xdd14, 0x23f3, 0x23f0, 0x231a, 0xd83d, 0xdd12, 0xd83d, 0xdd11,\n 0xd83d, 0xdd0e, 0xd83d, 0xdca1, 0xd83d, 0xdd26, 0xd83d, 0xdd0c, 0xd83d, 0xdd0b, 0xd83d, 0xdebf,\n 0xd83d, 0xdebd, 0xd83d, 0xdd27, 0xd83d, 0xdd28, 0xd83d, 0xdeaa, 0xd83d, 0xdeac, 0xd83d, 0xdca3,\n 0xd83d, 0xdd2b, 0xd83d, 0xdd2a, 0xd83d, 0xdc8a, 0xd83d, 0xdc89, 0xd83d, 0xdcb0, 0xd83d, 0xdcb5,\n 0xd83d, 0xdcb3, 0x2709, 0xd83d, 0xdceb, 0xd83d, 0xdce6, 0xd83d, 0xdcc5, 0xd83d, 0xdcc1, 0x2702,\n 0xd83d, 0xdccc, 0xd83d, 0xdcce, 0x2712, 0x270f, 0xd83d, 0xdcd0, 0xd83d, 0xdcda, 0xd83d, 0xdd2c,\n 0xd83d, 0xdd2d, 0xd83c, 0xdfa8, 0xd83c, 0xdfac, 0xd83c, 0xdfa4, 0xd83c, 0xdfa7, 0xd83c, 0xdfb5,\n 0xd83c, 0xdfb9, 0xd83c, 0xdfbb, 0xd83c, 0xdfba, 0xd83c, 0xdfb8, 0xd83d, 0xdc7e, 0xd83c, 0xdfae,\n 0xd83c, 0xdccf, 0xd83c, 0xdfb2, 0xd83c, 0xdfaf, 0xd83c, 0xdfc8, 0xd83c, 0xdfc0, 0x26bd, 0x26be,\n 0xd83c, 0xdfbe, 0xd83c, 0xdfb1, 0xd83c, 0xdfc9, 0xd83c, 0xdfb3, 0xd83c, 0xdfc1, 0xd83c, 0xdfc7,\n 0xd83c, 0xdfc6, 0xd83c, 0xdfca, 0xd83c, 0xdfc4, 0x2615, 0xd83c, 0xdf7c, 0xd83c, 0xdf7a, 0xd83c,\n 0xdf77, 0xd83c, 0xdf74, 0xd83c, 0xdf55, 0xd83c, 0xdf54, 0xd83c, 0xdf5f, 0xd83c, 0xdf57, 0xd83c,\n 0xdf71, 0xd83c, 0xdf5a, 0xd83c, 0xdf5c, 0xd83c, 0xdf61, 0xd83c, 0xdf73, 0xd83c, 0xdf5e, 0xd83c,\n 0xdf69, 0xd83c, 0xdf66, 0xd83c, 0xdf82, 0xd83c, 0xdf70, 0xd83c, 0xdf6a, 0xd83c, 0xdf6b, 0xd83c,\n 0xdf6d, 0xd83c, 0xdf6f, 0xd83c, 0xdf4e, 0xd83c, 0xdf4f, 0xd83c, 0xdf4a, 0xd83c, 0xdf4b, 0xd83c,\n 0xdf52, 0xd83c, 0xdf47, 0xd83c, 0xdf49, 0xd83c, 0xdf53, 0xd83c, 0xdf51, 0xd83c, 0xdf4c, 0xd83c,\n 0xdf50, 0xd83c, 0xdf4d, 0xd83c, 0xdf46, 0xd83c, 0xdf45, 0xd83c, 0xdf3d, 0xd83c, 0xdfe1, 0xd83c,\n 0xdfe5, 0xd83c, 0xdfe6, 0x26ea, 0xd83c, 0xdff0, 0x26fa, 0xd83c, 0xdfed, 0xd83d, 0xddfb, 0xd83d,\n 0xddfd, 0xd83c, 0xdfa0, 0xd83c, 0xdfa1, 0x26f2, 0xd83c, 0xdfa2, 0xd83d, 0xdea2, 0xd83d, 0xdea4,\n 0x2693, 0xd83d, 0xde80, 0x2708, 0xd83d, 0xde81, 0xd83d, 0xde82, 0xd83d, 0xde8b, 0xd83d, 0xde8e,\n 0xd83d, 0xde8c, 0xd83d, 0xde99, 0xd83d, 0xde97, 0xd83d, 0xde95, 0xd83d, 0xde9b, 0xd83d, 0xdea8,\n 0xd83d, 0xde94, 0xd83d, 0xde92, 0xd83d, 0xde91, 0xd83d, 0xdeb2, 0xd83d, 0xdea0, 0xd83d, 0xde9c,\n 0xd83d, 0xdea6, 0x26a0, 0xd83d, 0xdea7, 0x26fd, 0xd83c, 0xdfb0, 0xd83d, 0xddff, 0xd83c, 0xdfaa,\n 0xd83c, 0xdfad, 0xd83c, 0xddef, 0xd83c, 0xddf5, 0xd83c, 0xddf0, 0xd83c, 0xddf7, 0xd83c, 0xdde9,\n 0xd83c, 0xddea, 0xd83c, 0xdde8, 0xd83c, 0xddf3, 0xd83c, 0xddfa, 0xd83c, 0xddf8, 0xd83c, 0xddeb,\n 0xd83c, 0xddf7, 0xd83c, 0xddea, 0xd83c, 0xddf8, 0xd83c, 0xddee, 0xd83c, 0xddf9, 0xd83c, 0xddf7,\n 0xd83c, 0xddfa, 0xd83c, 0xddec, 0xd83c, 0xdde7, 0x0031, 0x20e3, 0x0032, 0x20e3, 0x0033, 0x20e3,\n 0x0034, 0x20e3, 0x0035, 0x20e3, 0x0036, 0x20e3, 0x0037, 0x20e3, 0x0038, 0x20e3, 0x0039, 0x20e3,\n 0x0030, 0x20e3, 0xd83d, 0xdd1f, 0x2757, 0x2753, 0x2665, 0x2666, 0xd83d, 0xdcaf, 0xd83d, 0xdd17,\n 0xd83d, 0xdd31, 0xd83d, 0xdd34, 0xd83d, 0xdd35, 0xd83d, 0xdd36, 0xd83d, 0xdd37,\n]);\n\nexport const EMOJI_OFFSETS = [\n 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22,\n 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46,\n 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70,\n 72, 74, 76, 78, 80, 82, 84, 86, 87, 88, 90, 92,\n 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116,\n 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140,\n 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164,\n 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188,\n 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212,\n 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236,\n 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 259,\n 260, 261, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280,\n 282, 284, 286, 288, 290, 292, 294, 295, 297, 299, 301, 303,\n 305, 306, 307, 308, 310, 312, 314, 316, 318, 320, 322, 324,\n 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348,\n 350, 351, 353, 355, 357, 359, 360, 362, 364, 365, 366, 368,\n 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392,\n 394, 396, 398, 400, 402, 404, 406, 407, 408, 410, 412, 414,\n 416, 418, 420, 422, 424, 426, 427, 429, 431, 433, 435, 437,\n 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461,\n 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 485,\n 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, 508,\n 510, 511, 513, 515, 517, 519, 521, 522, 524, 526, 528, 529,\n 531, 532, 534, 536, 538, 540, 542, 544, 546, 548, 550, 552,\n 554, 556, 558, 560, 562, 564, 566, 567, 569, 570, 572, 574,\n 576, 578, 582, 586, 590, 594, 598, 602, 606, 610, 614, 618,\n 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 641,\n 642, 643, 644, 646, 648, 650, 652, 654, 656, 658,\n];\n","import { addActionHandler, getGlobal, setGlobal } from '../../index';\nimport { selectActiveGroupCall, selectGroupCallParticipant, selectPhoneCallUser } from '../../selectors/calls';\nimport { updateGroupCall, updateGroupCallParticipant } from '../../reducers/calls';\nimport { omit } from '../../../util/iteratees';\nimport {\n ApiCallProtocol,\n handleUpdateGroupCallConnection,\n handleUpdateGroupCallParticipants,\n joinPhoneCall, processSignalingMessage,\n} from '../../../lib/secret-sauce';\nimport { ApiPhoneCall } from '../../../api/types';\nimport { ARE_CALLS_SUPPORTED } from '../../../util/environment';\nimport { callApi } from '../../../api/gramjs';\nimport * as langProvider from '../../../util/langProvider';\nimport { EMOJI_DATA, EMOJI_OFFSETS } from '../../../util/phoneCallEmojiConstants';\n\naddActionHandler('apiUpdate', (global, actions, update) => {\n const { activeGroupCallId } = global.groupCalls;\n\n switch (update['@type']) {\n case 'updateGroupCallLeavePresentation': {\n actions.toggleGroupCallPresentation({ value: false });\n break;\n }\n case 'updateGroupCallStreams': {\n if (!update.userId || !activeGroupCallId) break;\n if (!selectGroupCallParticipant(global, activeGroupCallId, update.userId)) break;\n\n return updateGroupCallParticipant(global, activeGroupCallId, update.userId, omit(update, ['@type', 'userId']));\n }\n case 'updateGroupCallConnectionState': {\n if (!activeGroupCallId) break;\n\n if (update.connectionState === 'disconnected') {\n actions.leaveGroupCall({ isFromLibrary: true });\n break;\n }\n\n return updateGroupCall(global, activeGroupCallId, {\n connectionState: update.connectionState,\n isSpeakerDisabled: update.isSpeakerDisabled,\n });\n }\n case 'updateGroupCallParticipants': {\n const { groupCallId, participants } = update;\n if (activeGroupCallId === groupCallId) {\n void handleUpdateGroupCallParticipants(participants);\n }\n break;\n }\n case 'updateGroupCallConnection': {\n if (update.data.stream) {\n actions.showNotification({ message: 'Big live streams are not yet supported' });\n actions.leaveGroupCall();\n break;\n }\n void handleUpdateGroupCallConnection(update.data, update.presentation);\n\n const groupCall = selectActiveGroupCall(global);\n if (groupCall?.participants && Object.keys(groupCall.participants).length > 0) {\n void handleUpdateGroupCallParticipants(Object.values(groupCall.participants));\n }\n break;\n }\n case 'updatePhoneCallMediaState':\n return {\n ...global,\n phoneCall: {\n ...global.phoneCall,\n ...omit(update, ['@type']),\n } as ApiPhoneCall,\n };\n case 'updatePhoneCall': {\n if (!ARE_CALLS_SUPPORTED) return undefined;\n const { phoneCall, currentUserId } = global;\n\n const call: ApiPhoneCall = {\n ...phoneCall,\n ...update.call,\n };\n\n const isOutgoing = phoneCall?.adminId === currentUserId;\n\n global = {\n ...global,\n phoneCall: call,\n };\n\n if (phoneCall && phoneCall.id && call.id !== phoneCall.id) {\n if (call.state !== 'discarded') {\n callApi('discardCall', {\n call,\n isBusy: true,\n });\n }\n return undefined;\n }\n\n const {\n accessHash, state, connections, gB,\n } = call;\n\n if (state === 'active' || state === 'accepted') {\n if (!verifyPhoneCallProtocol(call.protocol)) {\n const user = selectPhoneCallUser(global);\n actions.hangUp();\n actions.showNotification({ message: langProvider.getTranslation('VoipPeerIncompatible', user?.firstName) });\n return undefined;\n }\n }\n\n if (state === 'discarded') {\n // Discarded from other device\n if (!phoneCall) return undefined;\n\n return {\n ...global,\n ...(call.needRating && { ratingPhoneCall: call }),\n isCallPanelVisible: undefined,\n };\n } else if (state === 'accepted' && accessHash && gB) {\n (async () => {\n const { gA, keyFingerprint, emojis } = await callApi('confirmPhoneCall', [gB, EMOJI_DATA, EMOJI_OFFSETS])!;\n\n global = getGlobal();\n const newCall = {\n ...global.phoneCall,\n emojis,\n } as ApiPhoneCall;\n\n setGlobal({\n ...global,\n phoneCall: newCall,\n });\n\n callApi('confirmCall', {\n call, gA, keyFingerprint,\n });\n })();\n } else if (state === 'active' && connections && phoneCall?.state !== 'active') {\n if (!isOutgoing) {\n callApi('receivedCall', { call });\n (async () => {\n const { emojis } = await callApi('confirmPhoneCall', [call!.gAOrB!, EMOJI_DATA, EMOJI_OFFSETS])!;\n\n global = getGlobal();\n const newCall = {\n ...global.phoneCall,\n emojis,\n } as ApiPhoneCall;\n\n setGlobal({\n ...global,\n phoneCall: newCall,\n });\n })();\n }\n void joinPhoneCall(\n connections, actions.sendSignalingData, isOutgoing, Boolean(call?.isVideo), actions.apiUpdate,\n );\n }\n\n return global;\n }\n case 'updatePhoneCallConnectionState': {\n const { connectionState } = update;\n\n if (!global.phoneCall) return global;\n\n if (connectionState === 'closed' || connectionState === 'disconnected' || connectionState === 'failed') {\n actions.hangUp();\n return undefined;\n }\n\n return {\n ...global,\n phoneCall: {\n ...global.phoneCall,\n isConnected: connectionState === 'connected',\n },\n };\n }\n case 'updatePhoneCallSignalingData': {\n const { phoneCall } = global;\n\n if (!phoneCall) {\n break;\n }\n\n callApi('decodePhoneCallData', [update.data])?.then(processSignalingMessage);\n break;\n }\n }\n\n return undefined;\n});\n\nfunction verifyPhoneCallProtocol(protocol?: ApiCallProtocol) {\n return protocol?.libraryVersions.some((version) => {\n return version === '4.0.0' || version === '4.0.1';\n });\n}\n","export const vibrateShort = () => {\n navigator.vibrate?.(50);\n};\n","import React, {\n FC, memo, useEffect, useState,\n} from '../../lib/teact/teact';\n\nimport getAnimationData, { ANIMATED_STICKERS_PATHS } from './helpers/animatedAssets';\n\nimport AnimatedSticker from './AnimatedSticker';\n\ntype OwnProps = {\n name: keyof typeof ANIMATED_STICKERS_PATHS;\n size: number;\n playSegment?: [number, number];\n color?: [number, number, number];\n};\n\nconst AnimatedIcon: FC<OwnProps> = ({\n size,\n name,\n playSegment,\n color,\n}) => {\n const [iconData, setIconData] = useState<string>();\n\n useEffect(() => {\n getAnimationData(name).then(setIconData);\n }, [name]);\n\n return (\n <AnimatedSticker\n id={name}\n play\n noLoop\n playSegment={playSegment}\n size={size}\n speed={1}\n animationData={iconData}\n color={color}\n />\n );\n};\n\nexport default memo(AnimatedIcon);\n","import { GroupCallConnectionState } from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useEffect, useMemo, useRef, useState,\n} from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\n\nimport buildClassName from '../../../util/buildClassName';\nimport { vibrateShort } from '../../../util/vibrate';\nimport usePrevious from '../../../hooks/usePrevious';\nimport { selectActiveGroupCall, selectGroupCallParticipant } from '../../../global/selectors/calls';\nimport useLang from '../../../hooks/useLang';\n\nimport AnimatedIcon from '../../common/AnimatedIcon';\n\nimport './MicrophoneButton.scss';\n\nconst CONNECTION_STATE_DEFAULT = 'discarded';\n\ntype StateProps = {\n connectionState?: GroupCallConnectionState;\n hasRequestedToSpeak: boolean;\n isMuted?: boolean;\n canSelfUnmute?: boolean;\n noAudioStream: boolean;\n};\n\nconst REQUEST_TO_SPEAK_THROTTLE = 3000;\nconst HOLD_TO_SPEAK_TIME = 200;\nconst ICON_SIZE = 48;\n\nconst MicrophoneButton: FC<StateProps> = ({\n noAudioStream,\n canSelfUnmute,\n isMuted,\n hasRequestedToSpeak,\n connectionState,\n}) => {\n const {\n toggleGroupCallMute,\n requestToSpeak,\n playGroupCallSound,\n } = getActions();\n\n const lang = useLang();\n const muteMouseDownState = useRef('up');\n\n const [isRequestingToSpeak, setIsRequestingToSpeak] = useState(false);\n const isConnecting = connectionState !== 'connected';\n const shouldRaiseHand = !canSelfUnmute && isMuted;\n const prevShouldRaiseHand = usePrevious(shouldRaiseHand);\n\n useEffect(() => {\n if (prevShouldRaiseHand && !shouldRaiseHand) {\n playGroupCallSound({ sound: 'allowTalk' });\n }\n }, [playGroupCallSound, prevShouldRaiseHand, shouldRaiseHand]);\n\n // Voice mini\n // unmuted -> muted [69, 99]\n // muted -> unmuted [36, 69]\n // raise -> muted [0, 36]\n // muted -> raise [99, 136]\n // unmuted -> raise [136, 172]\n // TODO should probably move to other component\n const playSegment: [number, number] = useMemo(() => {\n if (isRequestingToSpeak) {\n const r = Math.floor(Math.random() * 100);\n return (r < 32 ? [0, 120]\n : (r < 64 ? [120, 240]\n : (r < 97 ? [240, 420]\n : [420, 540]\n )\n )\n );\n }\n if (!prevShouldRaiseHand && shouldRaiseHand) {\n return noAudioStream ? [99, 135] : [136, 172];\n }\n if (prevShouldRaiseHand && !shouldRaiseHand) {\n return [0, 36];\n }\n if (!shouldRaiseHand) {\n return noAudioStream ? [69, 99] : [36, 69];\n }\n return [0, 0];\n }, [prevShouldRaiseHand, isRequestingToSpeak, noAudioStream, shouldRaiseHand]);\n\n const animatedIconName = isRequestingToSpeak ? 'HandFilled' : 'VoiceMini';\n\n const toggleMute = () => {\n vibrateShort();\n toggleGroupCallMute();\n };\n\n const handleMouseDownMute = () => {\n if (shouldRaiseHand) {\n if (isRequestingToSpeak) return;\n vibrateShort();\n requestToSpeak();\n setIsRequestingToSpeak(true);\n setTimeout(() => {\n setIsRequestingToSpeak(false);\n }, REQUEST_TO_SPEAK_THROTTLE);\n return;\n }\n muteMouseDownState.current = 'down';\n if (noAudioStream) {\n setTimeout(() => {\n if (muteMouseDownState.current === 'down') {\n muteMouseDownState.current = 'hold';\n toggleMute();\n }\n }, HOLD_TO_SPEAK_TIME);\n }\n };\n\n const handleMouseUpMute = () => {\n if (shouldRaiseHand) {\n return;\n }\n toggleMute();\n muteMouseDownState.current = 'up';\n };\n\n const buttonText = useMemo(() => {\n return lang(\n hasRequestedToSpeak ? 'VoipMutedTapedForSpeak' : (\n shouldRaiseHand ? 'VoipMutedByAdmin' : (\n noAudioStream ? 'VoipUnmute' : 'VoipTapToMute'\n )\n ),\n );\n }, [hasRequestedToSpeak, noAudioStream, lang, shouldRaiseHand]);\n\n return (\n <div className=\"button-wrapper microphone-wrapper\">\n <button\n className={buildClassName(\n 'MicrophoneButton',\n noAudioStream && 'crossed',\n canSelfUnmute && 'can-self-unmute',\n isConnecting && 'is-connecting',\n shouldRaiseHand && 'muted-by-admin',\n )}\n onMouseDown={handleMouseDownMute}\n onMouseUp={handleMouseUpMute}\n >\n <AnimatedIcon\n name={animatedIconName}\n size={ICON_SIZE}\n playSegment={playSegment}\n />\n </button>\n <div className=\"button-text\">\n {buttonText}\n </div>\n </div>\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => {\n const groupCall = selectActiveGroupCall(global);\n\n const { connectionState } = groupCall || {};\n const meParticipant = groupCall && selectGroupCallParticipant(global, groupCall.id, global.currentUserId!);\n\n const {\n raiseHandRating, hasAudioStream, canSelfUnmute, isMuted,\n } = meParticipant || {};\n\n return {\n connectionState: connectionState || CONNECTION_STATE_DEFAULT,\n hasRequestedToSpeak: Boolean(raiseHandRating),\n noAudioStream: !hasAudioStream,\n canSelfUnmute,\n isMuted,\n };\n },\n)(MicrophoneButton));\n","import { GroupCallParticipant } from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useCallback, useEffect, useState,\n} from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\n\nimport { IAnchorPosition } from '../../../types';\n\nimport buildClassName from '../../../util/buildClassName';\nimport useThrottle from '../../../hooks/useThrottle';\nimport useFlag from '../../../hooks/useFlag';\nimport useLang from '../../../hooks/useLang';\nimport { selectIsAdminInActiveGroupCall } from '../../../global/selectors/calls';\nimport { GROUP_CALL_DEFAULT_VOLUME, GROUP_CALL_VOLUME_MULTIPLIER } from '../../../config';\n\nimport Menu from '../../ui/Menu';\nimport MenuItem from '../../ui/MenuItem';\nimport AnimatedIcon from '../../common/AnimatedIcon';\nimport DeleteMemberModal from '../../right/DeleteMemberModal';\n\nimport './GroupCallParticipantMenu.scss';\n\nconst SPEAKER_ICON_DISABLED_SEGMENT: [number, number] = [0, 17];\nconst SPEAKER_ICON_ENABLED_SEGMENT: [number, number] = [17, 34];\n\ntype OwnProps = {\n participant?: GroupCallParticipant;\n closeDropdown: VoidFunction;\n isDropdownOpen: boolean;\n anchor?: IAnchorPosition;\n};\n\ntype StateProps = {\n isAdmin: boolean;\n};\n\nconst VOLUME_ZERO = 0;\nconst VOLUME_LOW = 50;\nconst VOLUME_MEDIUM = 100;\nconst VOLUME_NORMAL = 150;\n\nconst VOLUME_CHANGE_THROTTLE = 500;\n\nconst SPEAKER_ICON_SIZE = 24;\n\nconst GroupCallParticipantMenu: FC<OwnProps & StateProps> = ({\n participant,\n closeDropdown,\n isDropdownOpen,\n anchor,\n isAdmin,\n}) => {\n const {\n toggleGroupCallMute,\n setGroupCallParticipantVolume,\n toggleGroupCallPanel,\n openChat,\n requestToSpeak,\n } = getActions();\n\n const lang = useLang();\n const [isDeleteUserModalOpen, openDeleteUserModal, closeDeleteUserModal] = useFlag();\n\n const id = participant?.id;\n const {\n isMutedByMe, isMuted, isSelf, canSelfUnmute,\n } = participant || {};\n const isRaiseHand = Boolean(participant?.raiseHandRating);\n const shouldRaiseHand = !canSelfUnmute && isMuted;\n\n const [localVolume, setLocalVolume] = useState(\n isMutedByMe ? VOLUME_ZERO : ((participant?.volume || GROUP_CALL_DEFAULT_VOLUME) / GROUP_CALL_VOLUME_MULTIPLIER),\n );\n\n useEffect(() => {\n setLocalVolume(isMutedByMe\n ? VOLUME_ZERO\n : ((participant?.volume || GROUP_CALL_DEFAULT_VOLUME) / GROUP_CALL_VOLUME_MULTIPLIER));\n // We only want to initialize local volume when switching participants and ignore following updates from server\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [id]);\n\n const runThrottled = useThrottle(VOLUME_CHANGE_THROTTLE);\n\n const handleRemove = useCallback((e: React.SyntheticEvent<any>) => {\n e.stopPropagation();\n openDeleteUserModal();\n closeDropdown();\n }, [openDeleteUserModal, closeDropdown]);\n\n const handleCancelRequestToSpeak = useCallback((e: React.SyntheticEvent<any>) => {\n e.stopPropagation();\n requestToSpeak({\n value: false,\n });\n closeDropdown();\n }, [requestToSpeak, closeDropdown]);\n\n const handleMute = useCallback((e: React.SyntheticEvent<any>) => {\n e.stopPropagation();\n closeDropdown();\n\n if (!isAdmin) {\n setLocalVolume(isMutedByMe ? GROUP_CALL_DEFAULT_VOLUME / GROUP_CALL_VOLUME_MULTIPLIER : VOLUME_ZERO);\n }\n\n toggleGroupCallMute({\n participantId: id,\n value: isAdmin ? !shouldRaiseHand : !isMutedByMe,\n });\n }, [closeDropdown, toggleGroupCallMute, id, isAdmin, shouldRaiseHand, isMutedByMe]);\n\n const handleOpenProfile = useCallback((e: React.SyntheticEvent<any>) => {\n e.stopPropagation();\n toggleGroupCallPanel();\n openChat({\n id,\n });\n closeDropdown();\n }, [toggleGroupCallPanel, closeDropdown, openChat, id]);\n\n const isLocalVolumeZero = localVolume === VOLUME_ZERO;\n const speakerIconPlaySegment = isLocalVolumeZero ? SPEAKER_ICON_DISABLED_SEGMENT : SPEAKER_ICON_ENABLED_SEGMENT;\n\n const handleChangeVolume = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = Number(e.target.value);\n setLocalVolume(value);\n runThrottled(() => {\n if (value === VOLUME_ZERO) {\n toggleGroupCallMute({\n participantId: id,\n value: true,\n });\n } else {\n setGroupCallParticipantVolume({\n participantId: id,\n volume: Math.floor(value * GROUP_CALL_VOLUME_MULTIPLIER),\n });\n }\n });\n };\n\n return (\n <div>\n <Menu\n isOpen={isDropdownOpen}\n positionX=\"right\"\n autoClose\n style={anchor ? `right: 1rem; top: ${anchor.y}px;` : undefined}\n onClose={closeDropdown}\n className=\"participant-menu\"\n >\n {!isSelf && !shouldRaiseHand && (\n <div className=\"group\">\n <div className={buildClassName(\n 'volume-control',\n localVolume < VOLUME_LOW && 'low',\n localVolume >= VOLUME_LOW && localVolume < VOLUME_MEDIUM && 'medium',\n localVolume >= VOLUME_MEDIUM && localVolume < VOLUME_NORMAL && 'normal',\n localVolume >= VOLUME_NORMAL && 'high',\n )}\n >\n <input\n type=\"range\"\n min=\"0\"\n max=\"200\"\n value={localVolume}\n onChange={handleChangeVolume}\n />\n <div className=\"info\">\n <AnimatedIcon\n name=\"Speaker\"\n playSegment={speakerIconPlaySegment}\n size={SPEAKER_ICON_SIZE}\n />\n <span>{localVolume}%</span>\n </div>\n </div>\n </div>\n )}\n <div className=\"group\">\n {(isRaiseHand && isSelf) && (\n <MenuItem\n icon=\"stop-raising-hand\"\n onClick={handleCancelRequestToSpeak}\n >\n {lang('VoipGroupCancelRaiseHand')}\n </MenuItem>\n )}\n {!isSelf && <MenuItem icon=\"user\" onClick={handleOpenProfile}>{lang('VoipGroupOpenProfile')}</MenuItem>}\n {!isSelf && (\n // TODO cross mic\n <MenuItem\n icon={isMuted ? (isAdmin ? 'allow-speak' : 'microphone-alt') : 'microphone-alt'}\n onClick={handleMute}\n >\n {isAdmin\n ? lang(shouldRaiseHand ? 'VoipGroupAllowToSpeak' : 'VoipMute')\n : lang(isMutedByMe ? 'VoipGroupUnmuteForMe' : 'VoipGroupMuteForMe')}\n </MenuItem>\n )}\n {!isSelf && isAdmin && (\n // TODO replace with hand\n <MenuItem icon=\"delete-user\" destructive onClick={handleRemove}>\n {lang('VoipGroupUserRemove')}\n </MenuItem>\n )}\n </div>\n </Menu>\n\n {!isSelf && isAdmin && (\n <DeleteMemberModal\n isOpen={isDeleteUserModalOpen}\n userId={id}\n onClose={closeDeleteUserModal}\n />\n )}\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global): StateProps => {\n return {\n isAdmin: selectIsAdminInActiveGroupCall(global),\n };\n },\n)(GroupCallParticipantMenu));\n","import { useMemo } from '../lib/teact/teact';\n\nimport { throttle } from '../util/schedulers';\n\nconst useThrottle = (ms: number, noFirst = false) => {\n return useMemo(() => {\n return throttle((cb) => cb(), ms, !noFirst);\n }, [ms, noFirst]);\n};\n\nexport default useThrottle;\n","import { GroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';\nimport React, { FC, memo, useMemo } from '../../../lib/teact/teact';\nimport AnimatedIcon from '../../common/AnimatedIcon';\nimport usePrevious from '../../../hooks/usePrevious';\n\ntype OwnProps = {\n participant: GroupCallParticipant;\n noColor?: boolean;\n};\n\nconst OutlinedMicrophoneIcon: FC<OwnProps> = ({\n participant,\n noColor,\n}) => {\n const { isMuted, isMutedByMe } = participant;\n const isSpeaking = (participant.amplitude || 0) > THRESHOLD;\n const isRaiseHand = Boolean(participant.raiseHandRating);\n const prevIsRaiseHand = usePrevious(isRaiseHand);\n const canSelfUnmute = Boolean(participant?.canSelfUnmute);\n const shouldRaiseHand = !canSelfUnmute && isMuted;\n const prevIsMuted = usePrevious(isMuted);\n\n const playSegment: [number, number] = useMemo(() => {\n if (isMuted && !prevIsMuted) {\n return [43, 64];\n }\n\n if (!isMuted && prevIsMuted) {\n return [22, 42];\n }\n\n if (isRaiseHand && !prevIsRaiseHand) {\n return [65, 84];\n }\n\n if (!shouldRaiseHand && prevIsRaiseHand) {\n return [0, 21];\n }\n\n // TODO cancel request to speak should play in reverse\n // if (!isRaiseHand && prevIsRaiseHand) {\n // return [84, 65];\n // }\n\n return isMuted ? [22, 23] : [43, 44];\n // eslint-disable-next-line\n }, [isMuted, shouldRaiseHand, isRaiseHand]);\n\n const microphoneColor: [number, number, number] | undefined = useMemo(() => {\n return noColor ? [0xff, 0xff, 0xff] : (\n isRaiseHand ? [0x4d, 0xa6, 0xe0]\n : (shouldRaiseHand || isMutedByMe ? [0xFF, 0x70, 0x6F] : (\n isSpeaking ? [0x57, 0xBC, 0x6C] : [0x84, 0x8D, 0x94]\n ))\n );\n }, [noColor, isRaiseHand, shouldRaiseHand, isMutedByMe, isSpeaking]);\n\n return (\n <AnimatedIcon\n name=\"VoiceOutlined\"\n playSegment={playSegment}\n size={28}\n color={microphoneColor}\n />\n );\n};\n\nexport default memo(OutlinedMicrophoneIcon);\n","import { GroupCallParticipant as TypeGroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useMemo, useRef,\n} from '../../../lib/teact/teact';\nimport { withGlobal } from '../../../global';\n\nimport { ApiChat, ApiUser } from '../../../api/types';\n\nimport buildClassName from '../../../util/buildClassName';\nimport { selectChat, selectUser } from '../../../global/selectors';\nimport useLang from '../../../hooks/useLang';\nimport { GROUP_CALL_DEFAULT_VOLUME, GROUP_CALL_VOLUME_MULTIPLIER } from '../../../config';\n\nimport Avatar from '../../common/Avatar';\nimport OutlinedMicrophoneIcon from './OutlinedMicrophoneIcon';\n\nimport './GroupCallParticipant.scss';\n\ntype OwnProps = {\n participant: TypeGroupCallParticipant;\n openParticipantMenu: (anchor: HTMLDivElement, participant: TypeGroupCallParticipant) => void;\n};\n\ntype StateProps = {\n user?: ApiUser;\n chat?: ApiChat;\n};\n\nconst GroupCallParticipant: FC<OwnProps & StateProps> = ({\n openParticipantMenu,\n participant,\n user,\n chat,\n}) => {\n // eslint-disable-next-line no-null/no-null\n const anchorRef = useRef<HTMLDivElement>(null);\n const lang = useLang();\n\n const { isSelf, isMutedByMe, isMuted } = participant;\n const isSpeaking = (participant.amplitude || 0) > THRESHOLD;\n const isRaiseHand = Boolean(participant.raiseHandRating);\n\n const handleOnClick = () => {\n if (isSelf) return;\n openParticipantMenu(anchorRef.current!, participant);\n };\n\n const [aboutText, aboutColor] = useMemo(() => {\n if (isSelf) {\n return [lang('ThisIsYou'), 'blue'];\n }\n if (isMutedByMe) {\n return [lang('VoipGroupMutedForMe'), 'red'];\n }\n return isRaiseHand\n ? [lang('WantsToSpeak'), 'blue']\n : (!isMuted && isSpeaking ? [\n participant.volume && participant.volume !== GROUP_CALL_DEFAULT_VOLUME\n ? lang('SpeakingWithVolume',\n (participant.volume / GROUP_CALL_VOLUME_MULTIPLIER).toString())\n .replace('%%', '%') : lang('Speaking'),\n 'green',\n ]\n : (participant.about ? [participant.about, ''] : [lang('Listening'), 'blue']));\n }, [isSpeaking, participant.volume, lang, isSelf, isMutedByMe, isRaiseHand, isMuted, participant.about]);\n\n if (!user && !chat) {\n return undefined;\n }\n\n const name = user ? `${user.firstName || ''} ${user.lastName || ''}` : chat?.title;\n\n return (\n <div\n className={buildClassName(\n 'GroupCallParticipant',\n participant.canSelfUnmute && 'can-self-unmute',\n )}\n onClick={handleOnClick}\n ref={anchorRef}\n >\n <Avatar user={user} chat={chat} size=\"medium\" />\n <div className=\"info\">\n <span className=\"name\">{name}</span>\n <span className={buildClassName('about', aboutColor)}>{aboutText}</span>\n </div>\n <div className=\"microphone\">\n <OutlinedMicrophoneIcon participant={participant} />\n </div>\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global, { participant }): StateProps => {\n return {\n user: participant.isUser ? selectUser(global, participant.id) : undefined,\n chat: !participant.isUser ? selectChat(global, participant.id) : undefined,\n };\n },\n)(GroupCallParticipant));\n","import { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce';\nimport React, { FC, memo, useMemo } from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\n\nimport useLang from '../../../hooks/useLang';\nimport { selectActiveGroupCall } from '../../../global/selectors/calls';\nimport useInfiniteScroll from '../../../hooks/useInfiniteScroll';\n\nimport GroupCallParticipant from './GroupCallParticipant';\nimport InfiniteScroll from '../../ui/InfiniteScroll';\n\ntype OwnProps = {\n openParticipantMenu: (anchor: HTMLDivElement, participant: TypeGroupCallParticipant) => void;\n};\n\ntype StateProps = {\n participantsCount: number;\n participants?: Record<string, TypeGroupCallParticipant>;\n canInvite?: boolean;\n};\n\nconst GroupCallParticipantList: FC<OwnProps & StateProps> = ({\n participants,\n participantsCount,\n openParticipantMenu,\n}) => {\n const {\n createGroupCallInviteLink,\n loadMoreGroupCallParticipants,\n } = getActions();\n\n const lang = useLang();\n\n const participantsIds = useMemo(() => {\n return Object.keys(participants || {});\n }, [participants]);\n\n const [viewportIds, getMore] = useInfiniteScroll(\n loadMoreGroupCallParticipants,\n participantsIds,\n participantsIds.length >= participantsCount,\n );\n\n return (\n <div className=\"participants\">\n <div className=\"invite-btn\" onClick={createGroupCallInviteLink}>\n <div className=\"icon\">\n <i className=\"icon-add-user\" />\n </div>\n <div className=\"text\">{lang('VoipGroupInviteMember')}</div>\n </div>\n\n <InfiniteScroll\n items={viewportIds}\n onLoadMore={getMore}\n >\n {viewportIds?.map(\n (participantId) => (\n participants![participantId] && (\n <GroupCallParticipant\n key={participantId}\n openParticipantMenu={openParticipantMenu}\n participant={participants![participantId]}\n />\n )\n ),\n )}\n </InfiniteScroll>\n\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global): StateProps => {\n const { participantsCount, participants } = selectActiveGroupCall(global) || {};\n\n return {\n participants,\n participantsCount: participantsCount || 0,\n };\n },\n)(GroupCallParticipantList));\n","import { getUserStreams, GroupCallParticipant as TypeGroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';\nimport React, { FC, memo, useCallback } from '../../../lib/teact/teact';\nimport { withGlobal } from '../../../global';\n\nimport { ApiChat, ApiUser } from '../../../api/types';\n\nimport buildClassName from '../../../util/buildClassName';\nimport { selectChat, selectUser } from '../../../global/selectors';\nimport useLang from '../../../hooks/useLang';\nimport { ENABLE_THUMBNAIL_VIDEO } from '../../../config';\n\nimport Avatar from '../../common/Avatar';\n\nimport './GroupCallParticipantVideo.scss';\n\ntype OwnProps = {\n participant: TypeGroupCallParticipant;\n type: 'video' | 'presentation';\n onClick?: (id: string, type: 'video' | 'presentation') => void;\n isFullscreen?: boolean;\n};\n\ntype StateProps = {\n user?: ApiUser;\n chat?: ApiChat;\n currentUserId?: string;\n isActive?: boolean;\n};\n\nconst GroupCallParticipantVideo: FC<OwnProps & StateProps> = ({\n type,\n onClick,\n user,\n chat,\n isActive,\n isFullscreen,\n}) => {\n const lang = useLang();\n\n const handleClick = useCallback(() => {\n if (onClick) {\n onClick(user?.id || chat!.id, type);\n }\n }, [chat, onClick, type, user?.id]);\n\n if (!user && !chat) return undefined;\n\n const streams = getUserStreams(user?.id || chat!.id);\n\n return (\n <div\n className={buildClassName('GroupCallParticipantVideo', isActive && 'active')}\n onClick={handleClick}\n >\n {isFullscreen && (\n <button className=\"back-button\">\n <i className=\"icon-arrow-left\" />\n {lang('Back')}\n </button>\n )}\n <Avatar user={user} chat={chat} className=\"thumbnail-avatar\" />\n {ENABLE_THUMBNAIL_VIDEO && (\n <div className=\"thumbnail-wrapper\">\n <video className=\"thumbnail\" muted autoPlay playsInline srcObject={streams?.[type]} />\n </div>\n )}\n <video className=\"video\" muted autoPlay playsInline srcObject={streams?.[type]} />\n <div className=\"info\">\n <i className=\"icon-microphone-alt\" />\n <span className=\"name\">{user?.firstName || chat?.title}</span>\n {type === 'presentation' && <i className=\"last-icon icon-active-sessions\" />}\n </div>\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global, { participant }): StateProps => {\n return {\n currentUserId: global.currentUserId,\n user: participant.isUser ? selectUser(global, participant.id) : undefined,\n chat: !participant.isUser ? selectChat(global, participant.id) : undefined,\n isActive: (participant.amplitude || 0) > THRESHOLD,\n };\n },\n)(GroupCallParticipantVideo));\n","import { GroupCallParticipant } from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useCallback, useMemo, useState,\n} from '../../../lib/teact/teact';\nimport { withGlobal } from '../../../global';\nimport GroupCallParticipantVideo from './GroupCallParticipantVideo';\nimport { selectActiveGroupCall } from '../../../global/selectors/calls';\nimport buildClassName from '../../../util/buildClassName';\n\ntype OwnProps = {\n onDoubleClick?: VoidFunction;\n};\n\ntype StateProps = {\n participants?: Record<string, GroupCallParticipant>;\n};\n\ntype SelectedVideo = {\n type: 'video' | 'presentation';\n id: string;\n};\n\nconst GroupCallParticipantStreams: FC<OwnProps & StateProps> = ({\n participants,\n onDoubleClick,\n}) => {\n const [selectedVideo, setSelectedVideo] = useState<SelectedVideo | undefined>(undefined);\n const presentationParticipants = useMemo(() => {\n return Object.values(participants || {}).filter((l) => l.hasPresentationStream);\n }, [participants]);\n const videoParticipants = useMemo(() => {\n return Object.values(participants || {}).filter((l) => l.hasVideoStream);\n }, [participants]);\n\n const totalVideoCount = videoParticipants.length + presentationParticipants.length;\n // TODO replace with more adequate solution.\n // There's a max of 30 videos or so right now\n const columnCount = totalVideoCount <= 2 ? 1 : (\n totalVideoCount <= 6 ? 2 : (\n totalVideoCount <= 9 ? 3 : 4\n )\n );\n\n const shouldSpanLastVideo = totalVideoCount === 3 || (columnCount === 2 && totalVideoCount % 2 !== 0);\n\n const handleClickVideo = useCallback((id: string, type: 'video' | 'presentation') => {\n if (!selectedVideo || (id !== selectedVideo.id || type !== selectedVideo.type)) {\n setSelectedVideo({\n id,\n type,\n });\n } else {\n setSelectedVideo(undefined);\n }\n }, [selectedVideo]);\n\n return (\n <div className=\"streams\" onDoubleClick={onDoubleClick}>\n <div\n className={buildClassName(\n 'videos',\n shouldSpanLastVideo && 'span-last-video',\n )}\n style={`--column-count: ${selectedVideo ? 1 : columnCount}`}\n >\n {selectedVideo && (\n <GroupCallParticipantVideo\n key={selectedVideo.id}\n isFullscreen\n onClick={handleClickVideo}\n participant={participants![selectedVideo.id]}\n type={selectedVideo.type}\n />\n )}\n\n {!selectedVideo ? presentationParticipants.map((participant) => (\n <GroupCallParticipantVideo\n key={participant.id}\n onClick={handleClickVideo}\n participant={participant}\n type=\"presentation\"\n />\n )) : undefined}\n {!selectedVideo ? videoParticipants.map((participant) => (\n <GroupCallParticipantVideo\n key={participant.id}\n onClick={handleClickVideo}\n participant={participant}\n type=\"video\"\n />\n )) : undefined}\n </div>\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global): StateProps => {\n const { participants } = selectActiveGroupCall(global) || {};\n return {\n participants,\n };\n },\n)(GroupCallParticipantStreams));\n","import {\n GroupCallConnectionState, GroupCallParticipant as TypeGroupCallParticipant,\n IS_SCREENSHARE_SUPPORTED, switchCameraInput, toggleSpeaker,\n} from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useCallback, useEffect, useMemo, useRef, useState,\n} from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\nimport '../../../global/actions/calls';\n\nimport { IAnchorPosition } from '../../../types';\n\nimport {\n IS_ANDROID,\n IS_IOS,\n IS_REQUEST_FULLSCREEN_SUPPORTED,\n IS_SINGLE_COLUMN_LAYOUT,\n} from '../../../util/environment';\nimport buildClassName from '../../../util/buildClassName';\nimport {\n selectGroupCall,\n selectGroupCallParticipant,\n selectIsAdminInActiveGroupCall,\n} from '../../../global/selectors/calls';\nimport useFlag from '../../../hooks/useFlag';\nimport useLang from '../../../hooks/useLang';\n\nimport Loading from '../../ui/Loading';\nimport Button from '../../ui/Button';\nimport DropdownMenu from '../../ui/DropdownMenu';\nimport MenuItem from '../../ui/MenuItem';\nimport Modal from '../../ui/Modal';\nimport MicrophoneButton from './MicrophoneButton';\nimport AnimatedIcon from '../../common/AnimatedIcon';\nimport Checkbox from '../../ui/Checkbox';\nimport GroupCallParticipantMenu from './GroupCallParticipantMenu';\nimport GroupCallParticipantList from './GroupCallParticipantList';\nimport GroupCallParticipantStreams from './GroupCallParticipantStreams';\n\nimport './GroupCall.scss';\n\nconst CAMERA_FLIP_PLAY_SEGMENT: [number, number] = [0, 10];\nconst PARTICIPANT_HEIGHT = 60;\n\nexport type OwnProps = {\n groupCallId: string;\n};\n\ntype StateProps = {\n isCallPanelVisible: boolean;\n connectionState: GroupCallConnectionState;\n title?: string;\n meParticipant?: TypeGroupCallParticipant;\n participantsCount?: number;\n isSpeakerEnabled?: boolean;\n isAdmin: boolean;\n participants: Record<string, TypeGroupCallParticipant>;\n};\n\nconst GroupCall: FC<OwnProps & StateProps> = ({\n groupCallId,\n isCallPanelVisible,\n connectionState,\n isSpeakerEnabled,\n title,\n meParticipant,\n isAdmin,\n participants,\n\n}) => {\n const {\n toggleGroupCallVideo,\n toggleGroupCallPresentation,\n leaveGroupCall,\n toggleGroupCallPanel,\n connectToActiveGroupCall,\n playGroupCallSound,\n } = getActions();\n\n const lang = useLang();\n // eslint-disable-next-line no-null/no-null\n const containerRef = useRef<HTMLDivElement>(null);\n\n const [isLeaving, setIsLeaving] = useState(false);\n const [isFullscreen, openFullscreen, closeFullscreen] = useFlag();\n const [isSidebarOpen, openSidebar, closeSidebar] = useFlag(true);\n const hasVideoParticipants = participants && Object.values(participants).some((l) => l.video || l.presentation);\n const isLandscape = isFullscreen && !IS_SINGLE_COLUMN_LAYOUT && hasVideoParticipants;\n\n const [participantMenu, setParticipantMenu] = useState<{\n participant: TypeGroupCallParticipant;\n anchor: IAnchorPosition;\n } | undefined>();\n const [isParticipantMenuOpen, openParticipantMenu, closeParticipantMenu] = useFlag();\n\n const [isConfirmLeaveModalOpen, openConfirmLeaveModal, closeConfirmLeaveModal] = useFlag();\n const [isEndGroupCallModal, setIsEndGroupCallModal] = useState(false);\n const [shouldEndGroupCall, setShouldEndGroupCall] = useState(false);\n\n const hasVideo = meParticipant?.hasVideoStream;\n const hasPresentation = meParticipant?.hasPresentationStream;\n const isConnecting = connectionState !== 'connected';\n const canSelfUnmute = meParticipant?.canSelfUnmute;\n const shouldRaiseHand = !canSelfUnmute && meParticipant?.isMuted;\n\n const handleOpenParticipantMenu = useCallback((anchor: HTMLDivElement, participant: TypeGroupCallParticipant) => {\n const rect = anchor.getBoundingClientRect();\n const container = containerRef.current!;\n\n setParticipantMenu({\n anchor: { x: rect.left, y: rect.top - container.offsetTop + PARTICIPANT_HEIGHT },\n participant,\n });\n\n openParticipantMenu();\n }, [openParticipantMenu]);\n\n useEffect(() => {\n if (connectionState === 'connected') {\n playGroupCallSound({ sound: 'join' });\n } else if (connectionState === 'reconnecting') {\n playGroupCallSound({ sound: 'connecting' });\n }\n }, [connectionState, playGroupCallSound]);\n\n const handleCloseConfirmLeaveModal = useCallback(() => {\n closeConfirmLeaveModal();\n setIsEndGroupCallModal(false);\n }, [closeConfirmLeaveModal]);\n\n const MainButton: FC<{ onTrigger: () => void; isOpen?: boolean }> = useMemo(() => {\n return ({ onTrigger, isOpen }) => (\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n className={isOpen ? 'active' : undefined}\n onClick={onTrigger}\n ariaLabel={lang('AccDescrMoreOptions')}\n >\n <i className=\"icon-more\" />\n </Button>\n );\n }, [lang]);\n\n const handleToggleFullscreen = useCallback(() => {\n if (!containerRef.current) return;\n\n if (isFullscreen) {\n document.exitFullscreen().then(closeFullscreen);\n } else {\n containerRef.current.requestFullscreen().then(openFullscreen);\n }\n }, [closeFullscreen, isFullscreen, openFullscreen]);\n\n const handleToggleSidebar = useCallback(() => {\n if (isSidebarOpen) {\n closeSidebar();\n } else {\n openSidebar();\n }\n }, [closeSidebar, isSidebarOpen, openSidebar]);\n\n const handleStreamsDoubleClick = useCallback(() => {\n if (!IS_REQUEST_FULLSCREEN_SUPPORTED) return;\n\n if (!isFullscreen) {\n closeSidebar();\n handleToggleFullscreen();\n } else {\n handleToggleFullscreen();\n }\n }, [closeSidebar, handleToggleFullscreen, isFullscreen]);\n\n const toggleFullscreen = useCallback(() => {\n if (isFullscreen) {\n closeFullscreen();\n } else {\n openFullscreen();\n }\n }, [closeFullscreen, isFullscreen, openFullscreen]);\n\n const handleClose = useCallback(() => {\n toggleGroupCallPanel();\n if (isFullscreen) {\n closeFullscreen();\n }\n }, [closeFullscreen, isFullscreen, toggleGroupCallPanel]);\n\n useEffect(() => {\n if (!IS_REQUEST_FULLSCREEN_SUPPORTED) return undefined;\n const container = containerRef.current;\n if (!container) return undefined;\n\n container.addEventListener('fullscreenchange', toggleFullscreen);\n\n return () => {\n container.removeEventListener('fullscreenchange', toggleFullscreen);\n };\n }, [toggleFullscreen]);\n\n const handleClickVideoOrSpeaker = () => {\n if (shouldRaiseHand) {\n toggleSpeaker();\n } else {\n toggleGroupCallVideo();\n }\n };\n\n useEffect(() => {\n connectToActiveGroupCall();\n }, [connectToActiveGroupCall, groupCallId]);\n\n const endGroupCall = useCallback(() => {\n setIsEndGroupCallModal(true);\n setShouldEndGroupCall(true);\n openConfirmLeaveModal();\n if (isFullscreen) {\n handleToggleFullscreen();\n }\n }, [handleToggleFullscreen, isFullscreen, openConfirmLeaveModal]);\n\n const handleLeaveGroupCall = useCallback(() => {\n if (isAdmin && !isConfirmLeaveModalOpen) {\n openConfirmLeaveModal();\n if (isFullscreen) {\n handleToggleFullscreen();\n }\n return;\n }\n playGroupCallSound({ sound: 'leave' });\n setIsLeaving(true);\n closeConfirmLeaveModal();\n }, [\n closeConfirmLeaveModal, handleToggleFullscreen, isAdmin, isConfirmLeaveModalOpen, isFullscreen,\n openConfirmLeaveModal, playGroupCallSound,\n ]);\n\n const handleCloseAnimationEnd = useCallback(() => {\n if (isLeaving) {\n leaveGroupCall({\n shouldDiscard: shouldEndGroupCall,\n });\n }\n }, [isLeaving, leaveGroupCall, shouldEndGroupCall]);\n\n return (\n <Modal\n isOpen={!isCallPanelVisible && !isLeaving}\n onClose={toggleGroupCallPanel}\n className={buildClassName(\n 'GroupCall',\n IS_SINGLE_COLUMN_LAYOUT && 'single-column',\n isLandscape && 'landscape',\n !isSidebarOpen && 'no-sidebar',\n )}\n dialogRef={containerRef}\n onCloseAnimationEnd={handleCloseAnimationEnd}\n >\n <div className=\"header\">\n <h3>{title || lang('VoipGroupVoiceChat')}</h3>\n {IS_REQUEST_FULLSCREEN_SUPPORTED && (\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleToggleFullscreen}\n ariaLabel={lang(isFullscreen ? 'AccExitFullscreen' : 'AccSwitchToFullscreen')}\n >\n <i className={isFullscreen ? 'icon-smallscreen' : 'icon-fullscreen'} />\n </Button>\n )}\n {isLandscape && (\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleToggleSidebar}\n >\n <i className=\"icon-sidebar\" />\n </Button>\n )}\n {((IS_SCREENSHARE_SUPPORTED && !shouldRaiseHand) || isAdmin) && (\n <DropdownMenu\n positionX=\"right\"\n trigger={MainButton}\n >\n {IS_SCREENSHARE_SUPPORTED && !shouldRaiseHand && (\n <MenuItem\n icon=\"share-screen-outlined\"\n onClick={toggleGroupCallPresentation}\n >\n {lang(hasPresentation ? 'VoipChatStopScreenCapture' : 'VoipChatStartScreenCapture')}\n </MenuItem>\n )}\n {isAdmin && (\n <MenuItem\n icon=\"phone-discard-outline\"\n onClick={endGroupCall}\n destructive\n >\n {lang('VoipGroupLeaveAlertEndChat')}\n </MenuItem>\n )}\n </DropdownMenu>\n )}\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleClose}\n >\n <i className=\"icon-close\" />\n </Button>\n </div>\n\n <div className=\"scrollable custom-scroll\">\n <GroupCallParticipantStreams onDoubleClick={handleStreamsDoubleClick} />\n\n {(!isLandscape || isSidebarOpen)\n && <GroupCallParticipantList openParticipantMenu={handleOpenParticipantMenu} />}\n </div>\n\n <GroupCallParticipantMenu\n participant={participantMenu?.participant}\n anchor={participantMenu?.anchor}\n isDropdownOpen={isParticipantMenuOpen}\n closeDropdown={closeParticipantMenu}\n />\n\n <div className=\"buttons\">\n {isConnecting && <Loading />}\n\n <div className=\"button-wrapper\">\n <div className=\"video-buttons\">\n {hasVideo && (IS_ANDROID || IS_IOS) && (\n <button className=\"smaller-button\" onClick={switchCameraInput}>\n <AnimatedIcon name=\"CameraFlip\" playSegment={CAMERA_FLIP_PLAY_SEGMENT} size={24} />\n </button>\n )}\n <button\n className={buildClassName(\n 'small-button',\n shouldRaiseHand ? 'speaker' : 'camera',\n (hasVideo || (shouldRaiseHand && isSpeakerEnabled)) && 'active',\n )}\n onClick={handleClickVideoOrSpeaker}\n >\n <i className={shouldRaiseHand ? 'icon-speaker' : (hasVideo ? 'icon-video-stop' : 'icon-video')} />\n </button>\n </div>\n\n <div className=\"button-text\">\n {lang(shouldRaiseHand ? 'VoipSpeaker' : 'VoipCamera')}\n </div>\n </div>\n\n <MicrophoneButton />\n\n <div className=\"button-wrapper\">\n <button className=\"small-button leave\" onClick={handleLeaveGroupCall}>\n <i className=\"icon-phone-discard\" />\n </button>\n\n <div className=\"button-text\">\n {lang('VoipGroupLeave')}\n </div>\n </div>\n </div>\n\n <Modal\n isOpen={isConfirmLeaveModalOpen}\n onClose={handleCloseConfirmLeaveModal}\n className=\"error\"\n title={lang(isEndGroupCallModal ? 'VoipGroupEndAlertTitle' : 'VoipGroupLeaveAlertTitle')}\n >\n <p>{lang(isEndGroupCallModal ? 'VoipGroupEndAlertText' : 'VoipGroupLeaveAlertText')}</p>\n {!isEndGroupCallModal && (\n <Checkbox\n label={lang('VoipGroupEndChat')}\n checked={shouldEndGroupCall}\n onCheck={setShouldEndGroupCall}\n />\n )}\n <Button isText className=\"confirm-dialog-button\" onClick={handleLeaveGroupCall}>\n {lang(isEndGroupCallModal ? 'VoipGroupEnd' : 'VoipGroupLeave')}\n </Button>\n <Button isText className=\"confirm-dialog-button\" onClick={handleCloseConfirmLeaveModal}>\n {lang('Cancel')}\n </Button>\n </Modal>\n </Modal>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global, { groupCallId }): StateProps => {\n const {\n connectionState, title, isSpeakerDisabled, participants, participantsCount,\n } = selectGroupCall(global, groupCallId)! || {};\n\n return {\n connectionState,\n title,\n isSpeakerEnabled: !isSpeakerDisabled,\n participantsCount,\n meParticipant: selectGroupCallParticipant(global, groupCallId, global.currentUserId!),\n isCallPanelVisible: Boolean(global.isCallPanelVisible),\n isAdmin: selectIsAdminInActiveGroupCall(global),\n participants,\n };\n },\n)(GroupCall));\n","import React, {\n FC, memo, useEffect,\n} from '../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../global';\n\nimport { ApiGroupCall, ApiUser } from '../../api/types';\n\nimport { selectActiveGroupCall, selectPhoneCallUser } from '../../global/selectors/calls';\nimport buildClassName from '../../util/buildClassName';\nimport useLang from '../../hooks/useLang';\n\nimport './ActiveCallHeader.scss';\n\ntype StateProps = {\n isCallPanelVisible?: boolean;\n groupCall?: ApiGroupCall;\n phoneCallUser?: ApiUser;\n};\n\nconst ActiveCallHeader: FC<StateProps> = ({\n groupCall,\n phoneCallUser,\n isCallPanelVisible,\n}) => {\n const { toggleGroupCallPanel } = getActions();\n\n const lang = useLang();\n\n useEffect(() => {\n document.body.classList.toggle('has-call-header', Boolean(isCallPanelVisible));\n\n return () => {\n document.body.classList.toggle('has-call-header', false);\n };\n }, [isCallPanelVisible]);\n\n if (!groupCall && !phoneCallUser) return undefined;\n\n return (\n <div\n className={buildClassName(\n 'ActiveCallHeader',\n isCallPanelVisible && 'open',\n )}\n onClick={toggleGroupCallPanel}\n >\n <span className=\"title\">{phoneCallUser?.firstName || groupCall?.title || lang('VoipGroupVoiceChat')}</span>\n </div>\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => {\n return {\n groupCall: selectActiveGroupCall(global),\n isCallPanelVisible: global.isCallPanelVisible,\n phoneCallUser: selectPhoneCallUser(global),\n };\n },\n)(ActiveCallHeader));\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"src-components-calls-phone-PhoneCallButton-module__root\",\"button\":\"src-components-calls-phone-PhoneCallButton-module__button\",\"active\":\"src-components-calls-phone-PhoneCallButton-module__active\",\"button-text\":\"src-components-calls-phone-PhoneCallButton-module__button-text\",\"buttonText\":\"src-components-calls-phone-PhoneCallButton-module__button-text\"};","import React, { FC, memo } from '../../../lib/teact/teact';\n\nimport buildClassName from '../../../util/buildClassName';\n\nimport Button from '../../ui/Button';\n\nimport styles from './PhoneCallButton.module.scss';\n\ntype OwnProps = {\n onClick: VoidFunction;\n label: string;\n icon?: string;\n iconClassName?: string;\n customIcon?: React.ReactNode;\n className?: string;\n isDisabled?: boolean;\n isActive?: boolean;\n};\n\nconst PhoneCallButton: FC<OwnProps> = ({\n onClick,\n label,\n customIcon,\n icon,\n iconClassName,\n className,\n isDisabled,\n isActive,\n}) => {\n return (\n <div className={styles.root}>\n <Button\n round\n className={buildClassName(className, styles.button, isActive && styles.active)}\n onClick={onClick}\n disabled={isDisabled}\n >\n {customIcon || <i className={buildClassName(iconClassName, `icon-${icon}`)} />}\n </Button>\n <div className={styles.buttonText}>{label}</div>\n </div>\n );\n};\n\nexport default memo(PhoneCallButton);\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"src-components-calls-phone-PhoneCall-module__root\",\"blurred\":\"src-components-calls-phone-PhoneCall-module__blurred\",\"single-column\":\"src-components-calls-phone-PhoneCall-module__single-column\",\"singleColumn\":\"src-components-calls-phone-PhoneCall-module__single-column\",\"header\":\"src-components-calls-phone-PhoneCall-module__header\",\"close-button\":\"src-components-calls-phone-PhoneCall-module__close-button\",\"closeButton\":\"src-components-calls-phone-PhoneCall-module__close-button\",\"emojis-backdrop\":\"src-components-calls-phone-PhoneCall-module__emojis-backdrop\",\"emojisBackdrop\":\"src-components-calls-phone-PhoneCall-module__emojis-backdrop\",\"open\":\"src-components-calls-phone-PhoneCall-module__open\",\"emojis\":\"src-components-calls-phone-PhoneCall-module__emojis\",\"emoji-tooltip\":\"src-components-calls-phone-PhoneCall-module__emoji-tooltip\",\"emojiTooltip\":\"src-components-calls-phone-PhoneCall-module__emoji-tooltip\",\"user-info\":\"src-components-calls-phone-PhoneCall-module__user-info\",\"userInfo\":\"src-components-calls-phone-PhoneCall-module__user-info\",\"buttons\":\"src-components-calls-phone-PhoneCall-module__buttons\",\"leave\":\"src-components-calls-phone-PhoneCall-module__leave\",\"accept\":\"src-components-calls-phone-PhoneCall-module__accept\",\"accept-icon\":\"src-components-calls-phone-PhoneCall-module__accept-icon\",\"acceptIcon\":\"src-components-calls-phone-PhoneCall-module__accept-icon\",\"main-video\":\"src-components-calls-phone-PhoneCall-module__main-video\",\"mainVideo\":\"src-components-calls-phone-PhoneCall-module__main-video\",\"second-video\":\"src-components-calls-phone-PhoneCall-module__second-video\",\"secondVideo\":\"src-components-calls-phone-PhoneCall-module__second-video\",\"visible\":\"src-components-calls-phone-PhoneCall-module__visible\",\"fullscreen\":\"src-components-calls-phone-PhoneCall-module__fullscreen\"};","import React, {\n FC, memo, useCallback, useEffect, useMemo, useRef,\n} from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\nimport '../../../global/actions/calls';\n\nimport { ApiPhoneCall, ApiUser } from '../../../api/types';\n\nimport {\n IS_ANDROID,\n IS_IOS,\n IS_REQUEST_FULLSCREEN_SUPPORTED,\n IS_SINGLE_COLUMN_LAYOUT,\n} from '../../../util/environment';\nimport buildClassName from '../../../util/buildClassName';\nimport { selectPhoneCallUser } from '../../../global/selectors/calls';\nimport useLang from '../../../hooks/useLang';\nimport renderText from '../../common/helpers/renderText';\nimport useFlag from '../../../hooks/useFlag';\nimport { formatMediaDuration } from '../../../util/dateFormat';\nimport {\n getStreams, IS_SCREENSHARE_SUPPORTED, switchCameraInputP2p, toggleStreamP2p,\n} from '../../../lib/secret-sauce';\nimport useInterval from '../../../hooks/useInterval';\nimport useForceUpdate from '../../../hooks/useForceUpdate';\n\nimport Modal from '../../ui/Modal';\nimport Avatar from '../../common/Avatar';\nimport Button from '../../ui/Button';\nimport PhoneCallButton from './PhoneCallButton';\nimport AnimatedIcon from '../../common/AnimatedIcon';\n\nimport styles from './PhoneCall.module.scss';\n\ntype StateProps = {\n user?: ApiUser;\n phoneCall?: ApiPhoneCall;\n isOutgoing: boolean;\n isCallPanelVisible?: boolean;\n};\n\nconst PhoneCall: FC<StateProps> = ({\n user,\n isOutgoing,\n phoneCall,\n isCallPanelVisible,\n}) => {\n const lang = useLang();\n const {\n hangUp, acceptCall, playGroupCallSound, toggleGroupCallPanel, connectToActivePhoneCall,\n } = getActions();\n // eslint-disable-next-line no-null/no-null\n const containerRef = useRef<HTMLDivElement>(null);\n\n const [isFullscreen, openFullscreen, closeFullscreen] = useFlag();\n\n const toggleFullscreen = useCallback(() => {\n if (isFullscreen) {\n closeFullscreen();\n } else {\n openFullscreen();\n }\n }, [closeFullscreen, isFullscreen, openFullscreen]);\n\n const handleToggleFullscreen = useCallback(() => {\n if (!containerRef.current) return;\n\n if (isFullscreen) {\n document.exitFullscreen().then(closeFullscreen);\n } else {\n containerRef.current.requestFullscreen().then(openFullscreen);\n }\n }, [closeFullscreen, isFullscreen, openFullscreen]);\n\n useEffect(() => {\n if (!IS_REQUEST_FULLSCREEN_SUPPORTED) return undefined;\n const container = containerRef.current;\n if (!container) return undefined;\n\n container.addEventListener('fullscreenchange', toggleFullscreen);\n\n return () => {\n container.removeEventListener('fullscreenchange', toggleFullscreen);\n };\n }, [toggleFullscreen]);\n\n const handleClose = useCallback(() => {\n toggleGroupCallPanel();\n if (isFullscreen) {\n closeFullscreen();\n }\n }, [closeFullscreen, isFullscreen, toggleGroupCallPanel]);\n\n const isDiscarded = phoneCall?.state === 'discarded';\n const isBusy = phoneCall?.reason === 'busy';\n\n const isIncomingRequested = phoneCall?.state === 'requested' && !isOutgoing;\n const isOutgoingRequested = (phoneCall?.state === 'requested' || phoneCall?.state === 'waiting') && isOutgoing;\n const isActive = phoneCall?.state === 'active';\n const isConnected = phoneCall?.isConnected;\n\n useEffect(() => {\n if (isIncomingRequested) {\n playGroupCallSound({ sound: 'incoming' });\n } else if (isBusy) {\n playGroupCallSound({ sound: 'busy' });\n } else if (isDiscarded) {\n playGroupCallSound({ sound: 'end' });\n } else if (isOutgoingRequested) {\n playGroupCallSound({ sound: 'ringing' });\n } else if (isConnected) {\n playGroupCallSound({ sound: 'connect' });\n }\n }, [isBusy, isDiscarded, isIncomingRequested, isOutgoingRequested, isConnected, playGroupCallSound]);\n\n const [isHangingUp, startHangingUp, stopHangingUp] = useFlag();\n const handleHangUp = useCallback(() => {\n startHangingUp();\n hangUp();\n }, [hangUp, startHangingUp]);\n\n useEffect(() => {\n if (phoneCall?.id) {\n stopHangingUp();\n } else {\n connectToActivePhoneCall();\n }\n }, [connectToActivePhoneCall, phoneCall?.id, stopHangingUp]);\n\n const forceUpdate = useForceUpdate();\n\n useInterval(() => {\n forceUpdate();\n }, isConnected ? 1000 : undefined);\n\n const callStatus = useMemo(() => {\n const state = phoneCall?.state;\n if (isHangingUp) {\n return lang('lng_call_status_hanging');\n }\n if (isBusy) return 'busy';\n if (state === 'requesting') {\n return lang('lng_call_status_requesting');\n } else if (state === 'requested') {\n return isOutgoing ? lang('lng_call_status_ringing') : lang('lng_call_status_incoming');\n } else if (state === 'waiting') {\n return lang('lng_call_status_waiting');\n } else if (state === 'active' && isConnected) {\n return undefined;\n } else {\n return lang('lng_call_status_exchanging');\n }\n }, [isBusy, isConnected, isHangingUp, isOutgoing, lang, phoneCall?.state]);\n\n const hasVideo = phoneCall?.videoState === 'active';\n const hasPresentation = phoneCall?.screencastState === 'active';\n\n const streams = getStreams();\n const hasOwnAudio = streams?.ownAudio?.getTracks()[0].enabled;\n const hasOwnPresentation = streams?.ownPresentation?.getTracks()[0].enabled;\n const hasOwnVideo = streams?.ownVideo?.getTracks()[0].enabled;\n\n const [isHidingPresentation, startHidingPresentation, stopHidingPresentation] = useFlag();\n const [isHidingVideo, startHidingVideo, stopHidingVideo] = useFlag();\n\n const handleTogglePresentation = useCallback(() => {\n if (hasOwnPresentation) {\n startHidingPresentation();\n }\n if (hasOwnVideo) {\n startHidingVideo();\n }\n setTimeout(async () => {\n await toggleStreamP2p('presentation');\n stopHidingPresentation();\n stopHidingVideo();\n }, 250);\n }, [\n hasOwnPresentation, hasOwnVideo, startHidingPresentation, startHidingVideo, stopHidingPresentation, stopHidingVideo,\n ]);\n\n const handleToggleVideo = useCallback(() => {\n if (hasOwnVideo) {\n startHidingVideo();\n }\n if (hasOwnPresentation) {\n startHidingPresentation();\n }\n setTimeout(async () => {\n await toggleStreamP2p('video');\n stopHidingPresentation();\n stopHidingVideo();\n }, 250);\n }, [\n hasOwnPresentation, hasOwnVideo, startHidingPresentation, startHidingVideo, stopHidingPresentation, stopHidingVideo,\n ]);\n\n const handleToggleAudio = useCallback(() => {\n void toggleStreamP2p('audio');\n }, []);\n\n const [isEmojiOpen, openEmoji, closeEmoji] = useFlag();\n\n const [isFlipping, startFlipping, stopFlipping] = useFlag();\n\n const handleFlipCamera = useCallback(() => {\n startFlipping();\n switchCameraInputP2p();\n setTimeout(stopFlipping, 250);\n }, [startFlipping, stopFlipping]);\n\n const timeElapsed = phoneCall?.startDate && (Number(new Date()) / 1000 - phoneCall.startDate);\n\n useEffect(() => {\n if (phoneCall?.state === 'discarded') {\n setTimeout(hangUp, 250);\n }\n }, [hangUp, phoneCall?.reason, phoneCall?.state]);\n\n return (\n <Modal\n isOpen={phoneCall && phoneCall?.state !== 'discarded' && !isCallPanelVisible}\n onClose={handleClose}\n className={buildClassName(\n styles.root,\n IS_SINGLE_COLUMN_LAYOUT && styles.singleColumn,\n )}\n dialogRef={containerRef}\n >\n <Avatar user={user} size=\"jumbo\" className={hasVideo || hasPresentation ? styles.blurred : ''} />\n {phoneCall?.screencastState === 'active' && streams?.presentation\n && <video className={styles.mainVideo} muted autoPlay playsInline srcObject={streams.presentation} />}\n {phoneCall?.videoState === 'active' && streams?.video\n && <video className={styles.mainVideo} muted autoPlay playsInline srcObject={streams.video} />}\n <video\n className={buildClassName(\n styles.secondVideo,\n !isHidingPresentation && hasOwnPresentation && styles.visible,\n isFullscreen && styles.fullscreen,\n )}\n muted\n autoPlay\n playsInline\n srcObject={streams?.ownPresentation}\n />\n <video\n className={buildClassName(\n styles.secondVideo,\n !isHidingVideo && hasOwnVideo && styles.visible,\n isFullscreen && styles.fullscreen,\n )}\n muted\n autoPlay\n playsInline\n srcObject={streams?.ownVideo}\n />\n <div className={styles.header}>\n {IS_REQUEST_FULLSCREEN_SUPPORTED && (\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleToggleFullscreen}\n ariaLabel={lang(isFullscreen ? 'AccExitFullscreen' : 'AccSwitchToFullscreen')}\n >\n <i className={isFullscreen ? 'icon-smallscreen' : 'icon-fullscreen'} />\n </Button>\n )}\n\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleClose}\n className={styles.closeButton}\n >\n <i className=\"icon-close\" />\n </Button>\n </div>\n <div\n className={buildClassName(styles.emojisBackdrop, isEmojiOpen && styles.open)}\n onClick={!isEmojiOpen ? openEmoji : closeEmoji}\n >\n <div className={buildClassName(styles.emojis, isEmojiOpen && styles.open)}>\n {phoneCall?.isConnected && phoneCall?.emojis && renderText(phoneCall.emojis, ['emoji'])}\n </div>\n <div className={buildClassName(styles.emojiTooltip, isEmojiOpen && styles.open)}>\n {lang('CallEmojiKeyTooltip', user?.firstName).replace('%%', '%')}\n </div>\n </div>\n <div className={styles.userInfo}>\n <h1>{user?.firstName}</h1>\n <span className={styles.status}>{callStatus || formatMediaDuration(timeElapsed || 0)}</span>\n </div>\n <div className={styles.buttons}>\n <PhoneCallButton\n onClick={handleToggleAudio}\n icon=\"microphone\"\n isDisabled={!isActive}\n isActive={hasOwnAudio}\n label={lang(hasOwnAudio ? 'lng_call_mute_audio' : 'lng_call_unmute_audio')}\n />\n <PhoneCallButton\n onClick={handleToggleVideo}\n icon=\"video\"\n isDisabled={!isActive}\n isActive={hasOwnVideo}\n label={lang(hasOwnVideo ? 'lng_call_stop_video' : 'lng_call_start_video')}\n />\n {hasOwnVideo && (IS_ANDROID || IS_IOS) && (\n <PhoneCallButton\n onClick={handleFlipCamera}\n customIcon={\n <AnimatedIcon name=\"CameraFlip\" playSegment={!isFlipping ? [0, 1] : [0, 10]} size={32} />\n }\n isDisabled={!isActive}\n label={lang('VoipFlip')}\n />\n )}\n {IS_SCREENSHARE_SUPPORTED && (\n <PhoneCallButton\n onClick={handleTogglePresentation}\n icon=\"share-screen\"\n isDisabled={!isActive}\n isActive={hasOwnPresentation}\n label={lang('lng_call_screencast')}\n />\n )}\n {isIncomingRequested && (\n <PhoneCallButton\n onClick={acceptCall}\n icon=\"phone-discard\"\n isDisabled={isDiscarded}\n label={lang('lng_call_accept')}\n className={styles.accept}\n iconClassName={styles.acceptIcon}\n />\n )}\n <PhoneCallButton\n onClick={handleHangUp}\n icon=\"phone-discard\"\n isDisabled={isDiscarded}\n label={lang(isIncomingRequested ? 'lng_call_decline' : 'lng_call_end_call')}\n className={styles.leave}\n />\n </div>\n </Modal>\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => {\n const { phoneCall, currentUserId } = global;\n\n return {\n isCallPanelVisible: Boolean(global.isCallPanelVisible),\n user: selectPhoneCallUser(global),\n isOutgoing: phoneCall?.adminId === currentUserId,\n phoneCall,\n };\n },\n)(PhoneCall));\n","// extracted by mini-css-extract-plugin\nexport default {\"stars\":\"src-components-calls-phone-RatePhoneCallModal-module__stars\",\"star\":\"src-components-calls-phone-RatePhoneCallModal-module__star\",\"isFilled\":\"src-components-calls-phone-RatePhoneCallModal-module__isFilled\",\"comment\":\"src-components-calls-phone-RatePhoneCallModal-module__comment\",\"visible\":\"src-components-calls-phone-RatePhoneCallModal-module__visible\"};","import React, {\n FC, memo, useRef, useState,\n} from '../../../lib/teact/teact';\nimport { getActions } from '../../../global';\n\nimport useLang from '../../../hooks/useLang';\nimport buildClassName from '../../../util/buildClassName';\n\nimport Modal from '../../ui/Modal';\nimport Button from '../../ui/Button';\nimport InputText from '../../ui/InputText';\n\nimport styles from './RatePhoneCallModal.module.scss';\n\nexport type OwnProps = {\n isOpen?: boolean;\n};\n\nconst RatePhoneCallModal: FC<OwnProps> = ({\n isOpen,\n}) => {\n const { closeCallRatingModal, setCallRating } = getActions();\n\n // eslint-disable-next-line no-null/no-null\n const inputRef = useRef<HTMLInputElement>(null);\n\n const lang = useLang();\n const [rating, setRating] = useState<number | undefined>();\n\n function handleSend() {\n if (!rating) {\n closeCallRatingModal();\n return;\n }\n setCallRating({\n rating: rating + 1,\n comment: inputRef.current?.value || '',\n });\n }\n\n function handleClickStar(index: number) {\n return () => setRating(rating === index ? undefined : index);\n }\n\n return (\n <Modal title={lang('lng_call_rate_label')} className=\"narrow\" onClose={closeCallRatingModal} isOpen={isOpen}>\n <div className={styles.stars}>\n {new Array(5).fill(undefined).map((_, i) => {\n const isFilled = rating !== undefined && rating >= i;\n return (\n <i\n className={buildClassName(\n isFilled ? 'icon-favorite-filled' : 'icon-favorite',\n isFilled && styles.isFilled,\n styles.star,\n )}\n onClick={handleClickStar(i)}\n />\n );\n })}\n </div>\n <InputText\n ref={inputRef}\n placeholder={lang('lng_call_rate_comment')}\n className={buildClassName(styles.comment, rating !== 4 && rating !== undefined && styles.visible)}\n />\n\n {/* eslint-disable-next-line react/jsx-no-bind */}\n <Button className=\"confirm-dialog-button\" isText onClick={handleSend}>\n {lang('Send')}\n </Button>\n <Button className=\"confirm-dialog-button\" isText onClick={closeCallRatingModal}>{lang('Cancel')}</Button>\n </Modal>\n );\n};\n\nexport default memo(RatePhoneCallModal);\n","/*! For license information please see index.js.LICENSE.txt */\n(()=>{\"use strict\";var e={\"./src/blacksilence.ts\":(e,t,a)=>{a.r(t),a.d(t,{silence:()=>n,black:()=>s});const n=e=>{const t=e.createOscillator(),a=t.connect(e.createMediaStreamDestination());return t.start(),new MediaStream([Object.assign(a.stream.getAudioTracks()[0],{enabled:!1})])},s=({width:e=640,height:t=480}={})=>{const a=Object.assign(document.createElement(\"canvas\"),{width:e,height:t}),n=a.getContext(\"2d\");if(!n)throw Error(\"Cannot create canvas ctx\");n.fillRect(0,0,e,t);const s=a.captureStream();return new MediaStream([Object.assign(s.getVideoTracks()[0],{enabled:!1})])}},\"./src/buildSdp.ts\":(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var n=a(\"./src/utils.ts\");const s=(e,t=!1,a=!1,s=!1)=>{const i=[],r=e=>{i.push(e)},{sessionId:o,ssrcs:c,audioExtensions:d,videoExtensions:p,audioPayloadTypes:u,videoPayloadTypes:l,transport:{ufrag:m,pwd:f,fingerprints:g,candidates:v}}=e;r(\"v=0\"),r(`o=- ${o} 2 IN IP4 0.0.0.0`),r(\"s=-\"),r(\"t=0 0\"),r(\"a=ice-options:trickle\"),r(\"a=msid-semantic:WMS *\"),r(`a=group:BUNDLE ${c.map((e=>e.endpoint)).join(\" \")}${a?\"\":\" \"+(s?\"3\":\"2\")}`),s||r(\"a=ice-lite\");const S=e=>{if(e.sdpString)r(`a=${e.sdpString}`);else{let t=\"\";t+=\"a=candidate:\",t+=`${e.foundation} ${e.component} ${e.protocol} ${e.priority} ${e.ip} ${e.port} typ ${e.type}`,\"rel-addr\"in e&&(t+=` raddr ${e[\"rel-addr\"]} rport ${e[\"rel-port\"]}`),t+=` generation ${e.generation}`,r(t)}},y=()=>{r(`a=ice-ufrag:${m}`),r(`a=ice-pwd:${f}`),g.forEach((e=>{r(`a=fingerprint:${e.hash} ${e.fingerprint}`),r(`a=setup:${s?e.setup:\"passive\"}`)})),v.forEach(S)},h=e=>{const{channels:t,id:a,name:n,clockrate:s,parameters:i}=e;var o=t?`/${t}`:\"\";r(`a=rtpmap:${a} ${n}/${s}${o}`),i&&(o=Object.keys(i).map((e=>`${e}=${i[e]};`)).join(\" \"),r(`a=fmtp:${a} ${o}`)),e[\"rtcp-fbs\"]?.forEach((e=>{r(`a=rtcp-fb:${a} ${e.type}${e.subtype?` ${e.subtype}`:\"\"}`)}))};return e=e=>{const a=e.isVideo?l:u;var i=e.isVideo?\"video\":\"audio\";if(r(`m=${i} ${e.isMain?1:0} RTP/SAVPF ${a.map((e=>e.id)).join(\" \")}`),r(\"c=IN IP4 0.0.0.0\"),r(\"b=AS:1300\"),r(`a=mid:${e.endpoint}`),r(\"a=rtcp-mux\"),a.forEach(h),r(\"a=rtcp:1 IN IP4 0.0.0.0\"),e.isVideo&&r(\"a=rtcp-rsize\"),(e.isVideo?p:d).forEach((({id:e,uri:t})=>{r(`a=extmap:${e} ${t}`)})),e.isRemoved)r(\"a=inactive\");else{if(y(),s)r(\"a=sendrecv\"),r(\"a=bundle-only\");else{if(t)return void r(\"a=recvonly\");e.isMain?r(\"a=sendrecv\"):(r(\"a=sendonly\"),r(\"a=bundle-only\"))}e.sourceGroups.forEach((t=>{r(`a=ssrc-group:${t.semantics} ${t.sources.map(n.fromTelegramSource).join(\" \")}`),t.sources.forEach((t=>{t=(0,n.fromTelegramSource)(t),r(`a=ssrc:${t} cname:${e.endpoint}`),r(`a=ssrc:${t} msid:${e.endpoint} ${e.endpoint}`),r(`a=ssrc:${t} mslabel:${e.endpoint}`),r(`a=ssrc:${t} label:${e.endpoint}`)}))}))}},s?c.filter(e):c.filter((e=>\"0\"===e.endpoint||\"1\"===e.endpoint)).map(e),a||(r(\"m=application 1 UDP/DTLS/SCTP webrtc-datachannel\"),r(\"c=IN IP4 0.0.0.0\"),y(),r(\"a=ice-options:trickle\"),r(\"a=mid:\"+(s?\"3\":a?\"1\":\"2\")),r(\"a=sctp-port:5000\"),r(\"a=max-message-size:262144\")),s||c.filter((e=>\"0\"!==e.endpoint&&\"1\"!==e.endpoint)).map(e),`${i.join(\"\\n\")}\\n`}},\"./src/p2p.ts\":(e,t,a)=>{a.r(t),a.d(t,{getStreams:()=>function(){return o?.streams},switchCameraInputP2p:()=>async function(){if(o&&o.facingMode){const e=o.streams.ownVideo;if(e){const t=e.getTracks()[0];if(t){const e=o.connection.getSenders().find((e=>t.id===e.track?.id));if(e){o.facingMode=\"environment\"===o.facingMode?\"user\":\"environment\";try{const t=await d(\"video\",o.facingMode);await e.replaceTrack(t.getTracks()[0]),o.streams.ownVideo=t,c()}catch(e){}}}}}},toggleStreamP2p:()=>p,joinPhoneCall:()=>async function(e,t,a,i,r){const d=new RTCPeerConnection({iceServers:e.map((e=>({urls:[e.isTurn&&`turn:${e.ip}:${e.port}`,e.isStun&&`stun:${e.ip}:${e.port}`].filter(Boolean),username:e.username,credentialType:\"password\",credential:e.password}))),iceCandidatePoolSize:2}),u=(0,n.silence)(new AudioContext),l=(0,n.black)({width:640,height:480}),g=(0,n.black)({width:640,height:480});d.addTrack(u.getTracks()[0],u),d.addTrack(l.getTracks()[0],l),d.addTrack(g.getTracks()[0],g),d.onicecandidate=e=>{e.candidate&&t({\"@type\":\"Candidates\",candidates:[{sdpString:e.candidate.candidate}]})},d.onconnectionstatechange=()=>{r({\"@type\":\"updatePhoneCallConnectionState\",connectionState:d.connectionState})},d.ontrack=e=>{var t;o&&(t=e.streams[0],\"audio\"===e.track.kind?(o.audio.srcObject=t,o.audio.play().catch(),o.streams.audio=t):\"1\"===e.transceiver.mid?o.streams.video=t:o.streams.presentation=t,c())};const v=d.createDataChannel(\"data\",{id:0,negotiated:!0});v.onmessage=e=>{f(JSON.parse(e.data))},e=new Audio,o={audio:e,connection:d,emitSignalingData:t,isOutgoing:a,candidates:[],onUpdate:r,streams:{ownVideo:l,ownAudio:u,ownPresentation:g},mediaState:{isBatteryLow:!1,screencastState:\"inactive\",videoState:\"inactive\",videoRotation:0,isMuted:!0},blackVideo:l,blackPresentation:g,silence:u,dataChannel:v};try{i&&p(\"video\",!0),p(\"audio\",!0)}catch(e){}a&&(a=await d.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0}),await d.setLocalDescription(a),m((0,s.default)(a,!0)))},stopPhoneCall:()=>function(){o&&(o.streams.ownVideo?.getTracks().forEach((e=>e.stop())),o.streams.ownPresentation?.getTracks().forEach((e=>e.stop())),o.streams.ownAudio?.getTracks().forEach((e=>e.stop())),o.dataChannel.close(),o.connection.close(),o=void 0)},processSignalingMessage:()=>f});var n=a(\"./src/blacksilence.ts\"),s=a(\"./src/parseSdp.ts\"),i=a(\"./src/utils.ts\"),r=a(\"./src/buildSdp.ts\");let o;function c(){o?.onUpdate({...o.mediaState,\"@type\":\"updatePhoneCallMediaState\"})}function d(e,t=\"user\"){return\"presentation\"===e?navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0}):navigator.mediaDevices.getUserMedia({audio:\"audio\"===e&&{...i.IS_ECHO_CANCELLATION_SUPPORTED&&{echoCancellation:!0},...i.IS_NOISE_SUPPRESSION_SUPPORTED&&{noiseSuppression:!0}},video:\"video\"===e&&{facingMode:t}})}async function p(e,t){if(o){const a=\"audio\"===e?o.streams.ownAudio:\"video\"===e?o.streams.ownVideo:o.streams.ownPresentation;if(a){const n=a.getTracks()[0];if(n){const a=o.connection.getSenders().find((e=>n.id===e.track?.id));if(a){t=void 0===t?!n.enabled:t;try{if(t&&!n.enabled){const t=await d(e);t.getTracks()[0].onended=()=>{p(e,!1)},await a.replaceTrack(t.getTracks()[0]),\"audio\"===e?o.streams.ownAudio=t:\"video\"===e?(o.streams.ownVideo=t,o.facingMode=\"user\"):o.streams.ownPresentation=t,\"video\"!==e&&\"presentation\"!==e||p(\"video\"===e?\"presentation\":\"video\",!1)}else if(!t&&n.enabled){n.stop();const t=\"audio\"===e?o.silence:\"video\"===e?o.blackVideo:o.blackPresentation;if(!t)return;await a.replaceTrack(t.getTracks()[0]),\"audio\"===e?o.streams.ownAudio=t:\"video\"===e?o.streams.ownVideo=t:o.streams.ownPresentation=t}c(),u()}catch(e){}}}}}}function u(){if(o){const{emitSignalingData:e,streams:t}=o;e({\"@type\":\"MediaState\",videoRotation:0,isMuted:!t.ownAudio?.getTracks()[0].enabled,isBatteryLow:!0,videoState:t.ownVideo?.getTracks()[0].enabled?\"active\":\"inactive\",screencastState:t.ownPresentation?.getTracks()[0].enabled?\"active\":\"inactive\"})}}function l(e){if(!o||o.isOutgoing)return e;const t=e.payloadTypes;var a=t.findIndex((e=>\"VP8\"===e.name));const n=t[a];var s=t.findIndex((e=>Number(e.parameters?.apt)===n.id));return e.payloadTypes=[t[a],t[s]],e}function m(e){if(o){const t=o.emitSignalingData;e.ssrc&&e[\"ssrc-groups\"]&&e[\"ssrc-groups\"][0]&&e[\"ssrc-groups\"][1]&&t({\"@type\":\"InitialSetup\",fingerprints:e.fingerprints,ufrag:e.ufrag,pwd:e.pwd,audio:{ssrc:(0,i.fromTelegramSource)(e.ssrc).toString(),ssrcGroups:[],payloadTypes:e.audioPayloadTypes,rtpExtensions:e.audioExtmap},video:l({ssrc:(0,i.fromTelegramSource)(e[\"ssrc-groups\"][0].sources[0]).toString(),ssrcGroups:[{semantics:e[\"ssrc-groups\"][0].semantics,ssrcs:e[\"ssrc-groups\"][0].sources.map(i.fromTelegramSource)}],payloadTypes:e.videoPayloadTypes,rtpExtensions:e.videoExtmap}),screencast:l({ssrc:(0,i.fromTelegramSource)(e[\"ssrc-groups\"][1].sources[0]).toString(),ssrcGroups:[{semantics:e[\"ssrc-groups\"][1].semantics,ssrcs:e[\"ssrc-groups\"][1].sources.map(i.fromTelegramSource)}],payloadTypes:e.screencastPayloadTypes,rtpExtensions:e.screencastExtmap})})}}async function f(e){if(o&&o.connection)switch(e[\"@type\"]){case\"MediaState\":o.mediaState=e,c(),u();break;case\"Candidates\":var{candidates:t,gotInitialSetup:a}=o;if(!t)return;e.candidates.forEach((e=>{o.candidates.push(e.sdpString)})),a&&await Promise.all(o.candidates.map((e=>o.connection.addIceCandidate({candidate:e,sdpMLineIndex:0}))));break;case\"InitialSetup\":{const{connection:t,isOutgoing:n}=o;if(!t)return;if(a={transport:{candidates:[],ufrag:e.ufrag,pwd:e.pwd,fingerprints:e.fingerprints,\"rtcp-mux\":!1,xmlns:\"\"},sessionId:Date.now(),ssrcs:[e.audio&&{isVideo:!1,isMain:!1,userId:\"123\",endpoint:\"0\",sourceGroups:[{semantics:\"FID\",sources:[e.audio.ssrc]}]},e.video&&{isVideo:!0,isPresentation:!1,isMain:!1,userId:\"123\",endpoint:\"1\",sourceGroups:e.video.ssrcGroups.map((e=>({semantics:e.semantics,sources:e.ssrcs})))},e.screencast&&{isVideo:!0,isPresentation:!0,isMain:!1,userId:\"123\",endpoint:\"2\",sourceGroups:e.screencast.ssrcGroups.map((e=>({semantics:e.semantics,sources:e.ssrcs})))}],audioPayloadTypes:e.audio.payloadTypes?.map(i.p2pPayloadTypeToConference)||[],audioExtensions:e.audio.rtpExtensions,videoPayloadTypes:l(e.video).payloadTypes?.map(i.p2pPayloadTypeToConference)||[],videoExtensions:e.video.rtpExtensions},await t.setRemoteDescription({sdp:(0,r.default)(a,n,void 0,!0),type:n?\"answer\":\"offer\"}),o.conference=a,!n){if(a=await t.createAnswer(),!a)return;await t.setLocalDescription(a),m((0,s.default)(a,!0))}o.gotInitialSetup=!0,await Promise.all(o.candidates.map((e=>t.addIceCandidate({candidate:e,sdpMLineIndex:0}))));break}}}},\"./src/p2pMessage.ts\":(e,t,a)=>{a.r(t)},\"./src/parseSdp.ts\":(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var n=a(\"./src/utils.ts\");const s=(e,t=!1)=>{if(!e||!e.sdp)throw Error(\"Failed parsing SDP: session description is null\");const a=e.sdp.split(\"\\r\\nm=\").map(((e,t)=>0===t?e:`m=${e}`)).reduce(((e,t)=>{var a=t.match(/^m=(.+?)\\s/)?.[1]||\"header\";return e[e.hasOwnProperty(a)&&\"video\"===a?\"screencast\":a]=t.split(\"\\r\\n\").filter(Boolean),e}),{});var s=(e,t)=>t?a[t]?.find((t=>t.startsWith(e)))?.substr(e.length):Object.values(a).map((t=>t.find((t=>t.startsWith(e)))?.substr(e.length))).filter(Boolean)[0],i=e=>a[e].filter((e=>e.startsWith(\"a=extmap\"))).map((e=>{var[,t,e]=e.match(/extmap:(\\d+)(?:\\/.+)?\\s(.+)/);return{id:Number(t),uri:e}})),r=e=>{const t=a[e].filter((e=>e.startsWith(\"a=rtpmap\"))).map((e=>{const[,t,a]=e.match(/:(\\d+)\\s(.+)/)||[];var[n,s,e]=a.split(\"/\");return{id:Number(t),name:n,clockrate:Number(s),...e&&{channels:Number(e)}}})),n=a[e].filter((e=>e.startsWith(\"a=rtcp-fb\"))).map((e=>{const[,t,a]=e.match(/:(\\d+)\\s(.+)/)||[];var[n,e]=a.split(\" \");return{id:Number(t),type:n,subtype:e||\"\"}})),s=a[e].filter((e=>e.startsWith(\"a=fmtp\"))).map((e=>{const[,t,a]=e.match(/:(\\d+)\\s(.+)/)||[];if(e=a.split(\";\").reduce(((e,t)=>{var[a,t]=t.split(\"=\");return e[a]=t,e}),{}),!Object.values(e).some((e=>!e)))return{id:Number(t),data:e}})).filter(Boolean);return t.map((e=>{var t=s.filter((t=>t.id===e.id)).map((e=>e.data)).reduce(((e,t)=>Object.assign(e,t)),{}),a=n.filter((t=>t.id===e.id)).map((e=>({type:e.type,subtype:e.subtype})));return{...e,...0<Object.keys(t).length&&{parameters:t},...0<a.length&&{feedbackTypes:a}}}))};const o=s(\"a=ssrc:\",\"audio\");var c=o&&Number(o.split(\" \")[0]);const d=s(\"a=ssrc-group:\",\"video\")?.split(\" \")||void 0,p=s(\"a=ssrc-group:\",\"screencast\")?.split(\" \")||void 0;if(!d)throw Error(\"Failed parsing SDP: no video ssrc\");var[u,l]=s(\"a=fingerprint:\")?.split(\" \")||[],m=s(\"a=setup:\");if(!u||!l)throw Error(\"Failed parsing SDP: no fingerprint\");if(console.log(a),e=s(\"a=ice-ufrag:\"),s=s(\"a=ice-pwd:\"),!e||!s)throw Error(\"Failed parsing SDP: no ICE ufrag or pwd\");return{fingerprints:[{fingerprint:l,hash:u,setup:t?m:\"active\"}],pwd:s,ufrag:e,...c&&{ssrc:(0,n.toTelegramSource)(c)},...d&&{\"ssrc-groups\":[{semantics:d[0],sources:d.slice(1,d.length).map(Number).map(n.toTelegramSource)},t&&p&&{semantics:p[0],sources:p.slice(1,p.length).map(Number).map(n.toTelegramSource)}].filter(Boolean)},...t&&{audioExtmap:i(\"audio\"),videoExtmap:i(\"video\"),screencastExtmap:i(\"screencast\"),audioPayloadTypes:r(\"audio\"),videoPayloadTypes:r(\"video\"),screencastPayloadTypes:r(\"screencast\")}}}},\"./src/secretsauce.ts\":(e,t,a)=>{a.r(t),a.d(t,{getDevices:()=>async function(e,t=!0){return(await navigator.mediaDevices.enumerateDevices()).filter((a=>a.kind===`${e}${t?\"input\":\"output\"}`))},toggleSpeaker:()=>function(){o&&(o.isSpeakerDisabled=!o.isSpeakerDisabled,o?.onUpdate?.({\"@type\":\"updateGroupCallConnectionState\",connectionState:\"connected\",isSpeakerDisabled:o.isSpeakerDisabled}),o.participantFunctions&&Object.values(o.participantFunctions).forEach((e=>{e.toggleMute?.(!!o?.isSpeakerDisabled)})))},toggleNoiseSuppression:()=>function(){if(o&&o.myId&&o.streams){const a=o.streams[o.myId].audio;if(a){const n=a.getTracks()[0];var e,t;n&&(({echoCancellation:e,noiseSuppression:t}=n.getConstraints()),n.applyConstraints({echoCancellation:!e,noiseSuppression:!t}))}}},getUserStreams:()=>d,setVolume:()=>function(e,t){const a=o?.participantFunctions?.[e];a&&a.setVolume?.(t)},isStreamEnabled:()=>p,switchCameraInput:()=>async function(){if(o?.myId&&o.connection&&o.streams&&o.facingMode){const e=d(o.myId)?.video;if(e){const t=e.getTracks()[0];if(t){const e=o.connection.getSenders().find((e=>t.id===e.track?.id));if(e){o.facingMode=\"environment\"===o.facingMode?\"user\":\"environment\";try{const t=await l(\"video\",o.facingMode);await e.replaceTrack(t.getTracks()[0]),o.streams[o.myId].video=t}catch(e){}}}}}},toggleStream:()=>m,leaveGroupCall:()=>g,handleUpdateGroupCallParticipants:()=>async function(e){if(o){const{participants:n,conference:i,connection:r,myId:c}=o;if(n&&i&&r&&i.ssrcs&&i.transport&&c)if(e.find((e=>e.isSelf&&e.source!==o?.conference?.ssrcs?.find((e=>e.isMain&&!e.isVideo))?.sourceGroups[0].sources[0])))g();else{const n=[];if(e.forEach((e=>{if(e.isSelf)e.isMuted&&!e.canSelfUnmute&&(m(\"audio\",!1),m(\"video\",!1),m(\"presentation\",!1));else{var t=e.isLeft;const a=e.isMuted||e.isMutedByMe,s=!e.isVideoJoined||!e.video||t,r=!e.presentation||t;let o=!1,c=!1,d=!1;i.ssrcs.filter((t=>t.userId===e.id)).forEach((t=>{t.isVideo||(t.sourceGroups[0].sources[0]===e.source&&(c=!0),t.isRemoved=a),t.isVideo&&(t.isPresentation||(e.video&&t.endpoint===e.video.endpoint&&(o=!0),t.isRemoved=s),t.isPresentation&&(e.presentation&&t.endpoint===e.presentation.endpoint&&(d=!0),t.isRemoved=r))})),a||c||i.ssrcs.push({userId:e.id,isMain:!1,endpoint:`audio${e.source}`,isVideo:!1,sourceGroups:[{semantics:\"FID\",sources:[e.source]}]}),s||o||!e.video||(n.push(e.video.endpoint),i.ssrcs.push({userId:e.id,isMain:!1,endpoint:e.video.endpoint,isVideo:!0,sourceGroups:e.video.sourceGroups})),r||d||!e.presentation||i.ssrcs.push({isPresentation:!0,userId:e.id,isMain:!1,endpoint:e.presentation.endpoint,isVideo:!0,sourceGroups:e.presentation.sourceGroups})}})),o.updatingParticipantsQueue)o.updatingParticipantsQueue.push(i);else{o.updatingParticipantsQueue=[],e=(0,s.default)(i),await r.setRemoteDescription({type:\"offer\",sdp:e});try{var t=await r.createAnswer();if(await r.setLocalDescription(t),u(c),0<o.updatingParticipantsQueue.length)for(const e of o.updatingParticipantsQueue){await r.setRemoteDescription({type:\"offer\",sdp:(0,s.default)(e)});var a=await r.createAnswer();await r.setLocalDescription(a),u(c)}o.updatingParticipantsQueue=void 0}catch(e){console.error(e)}}}}},handleUpdateGroupCallConnection:()=>async function(e,t){if(o){var a=t?o.screenshareConference:o.conference;const i=t?o.screenshareConnection:o.connection;if(a&&i&&a.ssrcs){var n=Date.now();e={...a,transport:e.transport,sessionId:n,audioExtensions:e.audio?.[\"rtp-hdrexts\"],audioPayloadTypes:e.audio?.[\"payload-types\"],videoExtensions:e.video?.[\"rtp-hdrexts\"],videoPayloadTypes:e.video?.[\"payload-types\"]};o={...o,...t?{screenshareConference:e}:{conference:e}};try{await i.setRemoteDescription({type:\"answer\",sdp:(0,s.default)(e,!0,t)})}catch(e){console.error(e)}}}},startSharingScreen:()=>async function(){if(o)try{const e=await l(\"presentation\");return e?(e.getTracks()[0].onended=()=>{o&&o.myId&&(o.streams?.[o.myId].presentation,u(o.myId),c())},new Promise((t=>{var{connection:a,dataChannel:t}=y([e],t,!0);o={...o,screenshareConnection:a,screenshareDataChannel:t}}))):void 0}catch(e){return}},joinGroupCall:()=>function(e,t,a,n){if(o)throw Error(\"Already in call\");f(\"connecting\");var s=new MediaStream;return a.srcObject=s,a.play().catch((e=>console.warn(e))),o={onUpdate:n,participants:[],myId:e,speaking:{},silence:(0,i.silence)(t),black:(0,i.black)({width:640,height:480}),analyserInterval:setInterval(v,1e3),audioElement:a,audioContext:t,mediaStream:s},new Promise((e=>{o={...o,...y([o.silence,o.black],e)}}))}});var n=a(\"./src/parseSdp.ts\"),s=a(\"./src/buildSdp.ts\"),i=a(\"./src/blacksilence.ts\"),r=a(\"./src/utils.ts\");let o;function c(e){o&&(o.screenshareDataChannel?.close(),o.screenshareConnection?.close(),e||o.onUpdate?.({\"@type\":\"updateGroupCallLeavePresentation\"}))}function d(e){return o?.streams?.[e]}function p(e,t){const a=(t=t||o?.myId)&&d(t)?.[e];return!!a&&a.getTracks()[0]?.enabled}function u(e){o?.onUpdate?.({\"@type\":\"updateGroupCallStreams\",userId:e,hasAudioStream:p(\"audio\",e),hasVideoStream:p(\"video\",e),hasPresentationStream:p(\"presentation\",e),amplitude:o.speaking?.[e]})}function l(e,t=\"user\"){return\"presentation\"===e?navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0}):navigator.mediaDevices.getUserMedia({audio:\"audio\"===e&&{...r.IS_ECHO_CANCELLATION_SUPPORTED&&{echoCancellation:!0},...r.IS_NOISE_SUPPRESSION_SUPPORTED&&{noiseSuppression:!0}},video:\"video\"===e&&{facingMode:t}})}async function m(e,t){if(o&&o.myId&&o.connection&&o.streams){const a=d(o.myId)?.[e];if(a){const n=a.getTracks()[0];if(n){const a=[...o.connection.getSenders(),...o.screenshareConnection?.getSenders()||[]].find((e=>n.id===e.track?.id));if(a){t=void 0===t?!n.enabled:t;try{if(t&&!n.enabled){const t=await l(e);if(await a.replaceTrack(t.getTracks()[0]),o.streams[o.myId][e]=t,\"video\"===e)o.facingMode=\"user\";else if(\"audio\"===e){const e=o.audioContext;if(!e)return;const a=e.createMediaStreamSource(t),n=e.createAnalyser();n.minDecibels=-100,n.maxDecibels=-30,n.smoothingTimeConstant=.05,n.fftSize=1024,a.connect(n),o={...o,participantFunctions:{...o.participantFunctions,[o.myId]:{...o.participantFunctions?.[o.myId],getCurrentAmplitude:()=>{var e=new Uint8Array(n.frequencyBinCount);return n.getByteFrequencyData(e),(0,r.getAmplitude)(e,1.5)}}}}}}else if(!t&&n.enabled){n.stop();const t=\"audio\"===e?o.silence:o.black;if(!t)return;await a.replaceTrack(t.getTracks()[0]),o.streams[o.myId][e]=t,\"video\"===e&&(o.facingMode=void 0)}u(o.myId),\"presentation\"!==e||t||c(!0)}catch(e){}}}}}}function f(e){o?.onUpdate?.({\"@type\":\"updateGroupCallConnectionState\",connectionState:e})}function g(){o&&(o.myId&&o.streams?.[o.myId]&&Object.values(o.streams[o.myId]||{}).forEach((e=>{e?.getTracks().forEach((e=>{e.stop()}))})),c(!0),o.dataChannel?.close(),o.connection?.close(),f(\"disconnected\"),o.analyserInterval&&clearInterval(o.analyserInterval),o=void 0)}function v(){o&&o.participantFunctions&&Object.keys(o.participantFunctions).forEach((e=>{const t=o.participantFunctions[Number(e)].getCurrentAmplitude;var a,n;t&&(a=t(),n=o.speaking[e]||0,((o.speaking[e]=a)>r.THRESHOLD&&n<=r.THRESHOLD||a<=r.THRESHOLD&&n>r.THRESHOLD)&&u(e))}))}function S(e){if(o&&o.audioElement&&o.audioContext&&o.mediaStream){var t=o.conference?.ssrcs?.find((t=>t.endpoint===e.track.id));if(t&&t.userId){const{userId:n,isPresentation:s}=t;var a=o.participants?.find((e=>e.id===n));const i=\"video\"===e.track.kind?s?\"presentation\":\"video\":\"audio\";if(e.track.onended=()=>{o?.streams?.[n][i],u(n)},t=e.streams[0],\"audio\"===e.track.kind){const e=o.mediaStream,s=new window.AudioContext,i=s.createMediaStreamSource(t),c=s.createGain();c.gain.value=(a?.volume||1e4)/1e4;const d=s.createGain();c.gain.value=1;const p=s.createAnalyser();p.minDecibels=-100,p.maxDecibels=-30,p.smoothingTimeConstant=.05,p.fftSize=1024,i.connect(p).connect(d).connect(c).connect(s.destination),e.addTrack(i.mediaStream.getAudioTracks()[0]);const u=new Audio;u.srcObject=t,u.muted=!0,u.remove(),o={...o,participantFunctions:{...o.participantFunctions,[n]:{...o.participantFunctions?.[n],setVolume:e=>{c.gain.value=1<e?2*e:e},toggleMute:e=>{d.gain.value=e?0:1},getCurrentAmplitude:()=>{var e=new Uint8Array(p.frequencyBinCount);return p.getByteFrequencyData(e),(0,r.getAmplitude)(e,1.5)}}}}}o={...o,streams:{...o.streams,[n]:{...o.streams?.[n],[i]:t}}},u(n)}}}function y(e,t,a=!1){const s=new RTCPeerConnection;var i=a?void 0:function(e){const t=e.createDataChannel(\"data\",{id:0});return t.onopen=()=>{},t.onmessage=e=>{JSON.parse(e.data).colibriClass},t.onerror=e=>{console.log(\"%conerror\",\"background: green; font-size: 5em\"),console.error(e)},t}(s);return e.forEach((e=>e.getTracks().forEach((t=>{s.addTrack(t,e)})))),a||(s.oniceconnectionstatechange=()=>{var e=s.iceConnectionState;\"connected\"===e||\"completed\"===e?f(\"connected\"):\"checking\"===e||\"new\"===e?f(\"connecting\"):\"disconnected\"===s.iceConnectionState&&f(\"reconnecting\")}),s.ontrack=S,s.onnegotiationneeded=async()=>{if(o){var i=o.myId;if(i){var r=await s.createOffer({offerToReceiveVideo:!0,offerToReceiveAudio:!a});if(await s.setLocalDescription(r),r.sdp){var c=(0,n.default)(r),d=a?void 0:{userId:\"\",sourceGroups:[{semantics:\"FID\",sources:[c.ssrc||0]}],isRemoved:a,isMain:!0,isVideo:!1,isPresentation:a,endpoint:a?\"1\":\"0\"},p=c[\"ssrc-groups\"]&&{isPresentation:a,userId:\"\",sourceGroups:c[\"ssrc-groups\"],isMain:!0,isVideo:!0,endpoint:a?\"0\":\"1\"};r=a?o.screenshareConference:o.conference;const s=[];a?(p&&s.push(p),d&&s.push(d)):(d&&s.push(d),p&&s.push(p)),d=e.find((e=>\"audio\"===e.getTracks()[0].kind)),p=e.find((e=>\"video\"===e.getTracks()[0].kind)),o={...o,...a?{screenshareConference:{...r,ssrcs:s}}:{conference:{...r,ssrcs:s}},streams:{...o.streams,[i]:{...o.streams?.[i],...d&&{audio:d},...!a&&p?{video:p}:{presentation:p}}}},u(i),t(c)}}}},{connection:s,dataChannel:i}}},\"./src/types.ts\":(e,t,a)=>{a.r(t)},\"./src/utils.ts\":(e,t,a)=>{a.r(t),a.d(t,{toTelegramSource:()=>function(e){return e<<0},fromTelegramSource:()=>function(e){return e>>>0},getAmplitude:()=>function(e,t=3){if(!e)return 0;var a=e.length;let n=0;for(let t=0;t<a;t++)n+=e[t]*e[t];var s=Math.sqrt(n/a)/255;return Math.min(1,s*t)},p2pPayloadTypeToConference:()=>function(e){return{id:e.id,name:e.name,\"rtcp-fbs\":e.feedbackTypes,clockrate:e.clockrate,parameters:e.parameters,channels:e.channels}},THRESHOLD:()=>n,IS_SCREENSHARE_SUPPORTED:()=>s,IS_ECHO_CANCELLATION_SUPPORTED:()=>i,IS_NOISE_SUPPRESSION_SUPPORTED:()=>r});const n=.1,s=\"getDisplayMedia\"in(navigator?.mediaDevices||{}),i=navigator?.mediaDevices?.getSupportedConstraints().echoCancellation,r=navigator?.mediaDevices?.getSupportedConstraints().noiseSuppression}},t={};function a(n){var s=t[n];return void 0!==s||(s=t[n]={exports:{}},e[n](s,s.exports,a)),s.exports}a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var n={};(()=>{a.r(n),a.d(n,{handleUpdateGroupCallConnection:()=>e.handleUpdateGroupCallConnection,startSharingScreen:()=>e.startSharingScreen,joinGroupCall:()=>e.joinGroupCall,getDevices:()=>e.getDevices,getUserStreams:()=>e.getUserStreams,setVolume:()=>e.setVolume,isStreamEnabled:()=>e.isStreamEnabled,toggleStream:()=>e.toggleStream,leaveGroupCall:()=>e.leaveGroupCall,handleUpdateGroupCallParticipants:()=>e.handleUpdateGroupCallParticipants,switchCameraInput:()=>e.switchCameraInput,toggleSpeaker:()=>e.toggleSpeaker,toggleNoiseSuppression:()=>e.toggleNoiseSuppression,joinPhoneCall:()=>t.joinPhoneCall,processSignalingMessage:()=>t.processSignalingMessage,getStreams:()=>t.getStreams,toggleStreamP2p:()=>t.toggleStreamP2p,stopPhoneCall:()=>t.stopPhoneCall,switchCameraInputP2p:()=>t.switchCameraInputP2p,IS_SCREENSHARE_SUPPORTED:()=>s.IS_SCREENSHARE_SUPPORTED,THRESHOLD:()=>s.THRESHOLD});var e=a(\"./src/secretsauce.ts\"),t=a(\"./src/p2p.ts\"),s=(a(\"./src/p2pMessage.ts\"),a(\"./src/utils.ts\"));a(\"./src/types.ts\")})();var s,i=exports;for(s in n)i[s]=n[s];n.__esModule&&Object.defineProperty(i,\"__esModule\",{value:!0})})();"],"names":["addActionHandler","async","global","actions","payload","isFromLibrary","shouldDiscard","shouldRemove","rejoin","groupCall","selectActiveGroupCall","setGlobal","updateActiveGroupCall","connectionState","participantsCount","callApi","call","getGlobal","removeGroupCall","id","removeGroupCallAudioElement","groupCalls","activeGroupCallId","undefined","isCallPanelVisible","leaveGroupCall","joinGroupCall","user","selectUser","currentUserId","toggleStream","videoStopped","isStreamEnabled","participant","value","raiseHand","participantId","volume","setVolume","Math","floor","GROUP_CALL_VOLUME_MULTIPLIER","Number","muted","params","startSharingScreen","presentationPaused","showNotification","message","audioElement","getGroupCallAudioElement","audioContext","getGroupCallAudioContext","apiUpdate","inviteHash","loadMoreGroupCallParticipants","chatId","chat","selectChat","loadFullChat","phoneCall","selectPhoneCallUser","dhConfig","gAHash","isVideo","gB","data","JSON","stringify","encodedData","ratingPhoneCall","rating","comment","state","stopPhoneCall","EMOJI_DATA","Uint16Array","EMOJI_OFFSETS","update","toggleGroupCallPresentation","userId","selectGroupCallParticipant","updateGroupCallParticipant","omit","updateGroupCall","isSpeakerDisabled","groupCallId","participants","handleUpdateGroupCallParticipants","stream","handleUpdateGroupCallConnection","presentation","Object","keys","length","values","ARE_CALLS_SUPPORTED","isOutgoing","adminId","isBusy","accessHash","connections","protocol","libraryVersions","some","version","hangUp","langProvider","firstName","needRating","gA","keyFingerprint","emojis","newCall","gAOrB","joinPhoneCall","sendSignalingData","Boolean","isConnected","then","processSignalingMessage","vibrateShort","navigator","vibrate","memo","size","name","playSegment","color","iconData","setIconData","useState","useEffect","getAnimationData","AnimatedSticker","play","noLoop","speed","animationData","withGlobal","meParticipant","raiseHandRating","hasAudioStream","canSelfUnmute","isMuted","hasRequestedToSpeak","noAudioStream","toggleGroupCallMute","requestToSpeak","playGroupCallSound","getActions","lang","useLang","muteMouseDownState","useRef","isRequestingToSpeak","setIsRequestingToSpeak","isConnecting","shouldRaiseHand","prevShouldRaiseHand","usePrevious","sound","useMemo","r","random","animatedIconName","toggleMute","buttonText","className","buildClassName","onMouseDown","setTimeout","current","onMouseUp","SPEAKER_ICON_DISABLED_SEGMENT","SPEAKER_ICON_ENABLED_SEGMENT","isAdmin","selectIsAdminInActiveGroupCall","closeDropdown","isDropdownOpen","anchor","setGroupCallParticipantVolume","toggleGroupCallPanel","openChat","isDeleteUserModalOpen","openDeleteUserModal","closeDeleteUserModal","useFlag","isMutedByMe","isSelf","isRaiseHand","localVolume","setLocalVolume","GROUP_CALL_DEFAULT_VOLUME","runThrottled","ms","noFirst","throttle","cb","useThrottle","handleRemove","useCallback","e","stopPropagation","handleCancelRequestToSpeak","handleMute","handleOpenProfile","speakerIconPlaySegment","Menu","isOpen","positionX","autoClose","style","y","onClose","type","min","max","onChange","target","MenuItem","icon","onClick","destructive","DeleteMemberModal","noColor","isSpeaking","amplitude","THRESHOLD","prevIsRaiseHand","prevIsMuted","microphoneColor","isUser","openParticipantMenu","anchorRef","aboutText","aboutColor","toString","replace","about","lastName","title","ref","Avatar","createGroupCallInviteLink","participantsIds","viewportIds","getMore","useInfiniteScroll","InfiniteScroll","items","onLoadMore","map","key","isActive","isFullscreen","handleClick","streams","getUserStreams","ENABLE_THUMBNAIL_VIDEO","autoPlay","playsInline","srcObject","onDoubleClick","selectedVideo","setSelectedVideo","presentationParticipants","filter","l","hasPresentationStream","videoParticipants","hasVideoStream","totalVideoCount","columnCount","shouldSpanLastVideo","handleClickVideo","CAMERA_FLIP_PLAY_SEGMENT","selectGroupCall","isSpeakerEnabled","toggleGroupCallVideo","connectToActiveGroupCall","containerRef","isLeaving","setIsLeaving","openFullscreen","closeFullscreen","isSidebarOpen","openSidebar","closeSidebar","hasVideoParticipants","video","isLandscape","IS_SINGLE_COLUMN_LAYOUT","participantMenu","setParticipantMenu","isParticipantMenuOpen","closeParticipantMenu","isConfirmLeaveModalOpen","openConfirmLeaveModal","closeConfirmLeaveModal","isEndGroupCallModal","setIsEndGroupCallModal","shouldEndGroupCall","setShouldEndGroupCall","hasVideo","hasPresentation","handleOpenParticipantMenu","rect","getBoundingClientRect","container","x","left","top","offsetTop","handleCloseConfirmLeaveModal","MainButton","onTrigger","Button","round","ariaLabel","handleToggleFullscreen","document","exitFullscreen","requestFullscreen","handleToggleSidebar","handleStreamsDoubleClick","IS_REQUEST_FULLSCREEN_SUPPORTED","toggleFullscreen","handleClose","addEventListener","removeEventListener","endGroupCall","handleLeaveGroupCall","handleCloseAnimationEnd","Modal","dialogRef","onCloseAnimationEnd","IS_SCREENSHARE_SUPPORTED","DropdownMenu","trigger","Loading","IS_ANDROID","IS_IOS","switchCameraInput","toggleSpeaker","Checkbox","label","checked","onCheck","isText","phoneCallUser","body","classList","toggle","customIcon","iconClassName","isDisabled","disabled","acceptCall","connectToActivePhoneCall","isDiscarded","reason","isIncomingRequested","isOutgoingRequested","isHangingUp","startHangingUp","stopHangingUp","handleHangUp","forceUpdate","useForceUpdate","useInterval","callStatus","videoState","screencastState","getStreams","hasOwnAudio","ownAudio","getTracks","enabled","hasOwnPresentation","ownPresentation","hasOwnVideo","ownVideo","isHidingPresentation","startHidingPresentation","stopHidingPresentation","isHidingVideo","startHidingVideo","stopHidingVideo","handleTogglePresentation","toggleStreamP2p","handleToggleVideo","handleToggleAudio","isEmojiOpen","openEmoji","closeEmoji","isFlipping","startFlipping","stopFlipping","handleFlipCamera","switchCameraInputP2p","timeElapsed","startDate","Date","styles","renderText","formatMediaDuration","closeCallRatingModal","setCallRating","inputRef","setRating","Array","fill","_","i","isFilled","index","InputText","placeholder","t","a","d","silence","n","black","s","createOscillator","connect","createMediaStreamDestination","start","MediaStream","assign","getAudioTracks","width","height","createElement","getContext","Error","fillRect","captureStream","getVideoTracks","default","push","sessionId","o","ssrcs","c","audioExtensions","videoExtensions","p","audioPayloadTypes","u","videoPayloadTypes","transport","ufrag","m","pwd","f","fingerprints","g","candidates","v","endpoint","join","S","sdpString","foundation","component","priority","ip","port","generation","forEach","hash","fingerprint","setup","h","channels","clockrate","parameters","subtype","isMain","uri","isRemoved","sourceGroups","semantics","sources","fromTelegramSource","facingMode","connection","getSenders","find","track","replaceTrack","RTCPeerConnection","iceServers","urls","isTurn","isStun","username","credentialType","credential","password","iceCandidatePoolSize","AudioContext","addTrack","onicecandidate","candidate","onconnectionstatechange","ontrack","kind","audio","catch","transceiver","mid","createDataChannel","negotiated","onmessage","parse","Audio","emitSignalingData","onUpdate","mediaState","isBatteryLow","videoRotation","blackVideo","blackPresentation","dataChannel","createOffer","offerToReceiveAudio","offerToReceiveVideo","setLocalDescription","stop","close","mediaDevices","getDisplayMedia","getUserMedia","IS_ECHO_CANCELLATION_SUPPORTED","echoCancellation","IS_NOISE_SUPPRESSION_SUPPORTED","noiseSuppression","onended","payloadTypes","findIndex","apt","ssrc","ssrcGroups","rtpExtensions","audioExtmap","videoExtmap","screencast","screencastPayloadTypes","screencastExtmap","gotInitialSetup","Promise","all","addIceCandidate","sdpMLineIndex","xmlns","now","isPresentation","p2pPayloadTypeToConference","setRemoteDescription","sdp","conference","createAnswer","split","reduce","match","hasOwnProperty","startsWith","substr","feedbackTypes","console","log","toTelegramSource","slice","getDevices","enumerateDevices","participantFunctions","toggleNoiseSuppression","myId","getConstraints","applyConstraints","source","isLeft","isVideoJoined","updatingParticipantsQueue","error","screenshareConference","screenshareConnection","screenshareDataChannel","warn","speaking","analyserInterval","setInterval","mediaStream","createMediaStreamSource","createAnalyser","minDecibels","maxDecibels","smoothingTimeConstant","fftSize","getCurrentAmplitude","Uint8Array","frequencyBinCount","getByteFrequencyData","getAmplitude","clearInterval","window","createGain","gain","destination","remove","onopen","colibriClass","onerror","oniceconnectionstatechange","iceConnectionState","onnegotiationneeded","sqrt","getSupportedConstraints","exports","defineProperty","enumerable","get","prototype","Symbol","toStringTag","__esModule"],"sourceRoot":""} |