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EACf,EAEC6I,EAAgDrQ,IAClD,IAAI3G,EAAIC,EAAIiJ,EACZ,MAAO,CACHpN,GAAI6K,EAAO7K,GACX4N,YAAa/C,EAAO+C,YACpBT,WAAmC,QAAtBjJ,EAAK2G,EAAOwC,YAAyB,IAAPnJ,OAAgB,EAASA,EAAGiJ,WACvEgO,cAAsC,QAAtBhX,EAAK0G,EAAOwC,YAAyB,IAAPlJ,OAAgB,EAASA,EAAGsT,OAE1EvK,YAAoC,QAAtBE,EAAKvC,EAAOwC,YAAyB,IAAPD,OAAgB,EAASA,EAAGF,YAExEkO,WAAYvQ,EAAOuQ,WACtB,EAGQC,GAA0B,QAAW,CAACvb,EAAY+F,EAAaV,EAASF,EAAmB6N,EAAgET,KACpK,IAAInO,EAAIC,EACR,MAAO,CACH4B,OAAQjG,EACR+F,YAAaA,QAAiDA,EAAc,GAC5EV,QAASA,EACTF,kBAAmBA,EACnBsP,YAAa,CACT3G,cAAekF,EACf3F,WAAiH,QAApGjJ,EAAK4O,aAA2D,EAASA,EAAiBzF,YAAyB,IAAPnJ,OAAgB,EAASA,EAAGiJ,WACrJgO,cAAoH,QAApGhX,EAAK2O,aAA2D,EAASA,EAAiBzF,YAAyB,IAAPlJ,OAAgB,EAASA,EAAGsT,QAG5JpF,WAAYA,EACd,G","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/common.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/cssUtils.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/identifier.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/localizationUtils.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/logEvent.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/memoizeFnAll.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/safeStringify.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/telemetry.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/acs-ui-common/src/telemetryVersion.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/baseSelectors.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/captionsSelector.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/participantListSelector.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/participantsButtonSelector.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/providers/CallClientProvider.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/utils/SelectorUtils.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n * Converts units of rem to units of pixels\n * @param rem - units of rem\n * @returns units of pixels\n */\nexport const _convertRemToPx = (rem) => {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n/**\n * @internal\n * Converts units of pixels to units of rem\n * @param px - units of px\n * @returns units of rem\n */\nexport const _convertPxToRem = (px) => {\n return px / parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n/**\n * @internal\n * Disable dismiss on resize to work around a couple Fluent UI bugs\n * - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this\n * happens when we change the VideoGallery layout, or even when the video stream element is internally resized\n * by the headless SDK.\n * - We also want to prevent dismiss when chat pane is scrolling especially a new message is added.\n * A side effect of this workaround is that the context menu stays open when window is resized, and may\n * get detached from original target visually. That bug is preferable to the bug when this value is not set -\n * The Callout (frequently) gets dismissed automatically.\n */\nexport const _preventDismissOnEvent = (ev) => {\n return ev.type === 'resize' || ev.type === 'scroll';\n};\n//# sourceMappingURL=common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n * Converts px value to rem value.\n * For example, an input of `16` will return `1rem`.\n */\nexport const _pxToRem = (px) => `${px / 16}rem`;\n//# sourceMappingURL=cssUtils.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createIdentifierFromRawId, getIdentifierRawId, isCommunicationUserIdentifier, isMicrosoftTeamsUserIdentifier, isPhoneNumberIdentifier, isUnknownIdentifier } from '@azure/communication-common';\n/**\n * A string representation of a {@link @azure/communication-common#CommunicationIdentifier}.\n *\n * This string representation of CommunicationIdentifier is guaranteed to be stable for\n * a unique Communication user. Thus,\n * - it can be used to persist a user's identity in external databases.\n * - it can be used as keys into a Map to store data for the user.\n *\n * @public\n */\nexport const toFlatCommunicationIdentifier = (identifier) => {\n return getIdentifierRawId(identifier);\n};\n/**\n * Reverse operation of {@link toFlatCommunicationIdentifier}.\n *\n * @public\n */\nexport const fromFlatCommunicationIdentifier = (id) => {\n // if the id passed is a phone number we need to build the rawId to pass in\n const rawId = id.indexOf('+') === 0 ? '4:' + id : id;\n return createIdentifierFromRawId(rawId);\n};\n/**\n * Returns a CommunicationIdentifier.\n * @internal\n */\nexport const _toCommunicationIdentifier = (id) => {\n if (typeof id === 'string') {\n return fromFlatCommunicationIdentifier(id);\n }\n return id;\n};\n/**\n * Check if an object is identifier.\n *\n * @internal\n */\nexport const _isValidIdentifier = (identifier) => {\n return isCommunicationUserIdentifier(identifier) || isPhoneNumberIdentifier(identifier) || isMicrosoftTeamsUserIdentifier(identifier) || isUnknownIdentifier(identifier);\n};\n//# sourceMappingURL=identifier.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n *\n * Replace the pattern \"\\{\\}\" in str with the values passed in as vars\n *\n * @example\n * ```ts\n * _formatString(\"hello {name}. '{name}' is a rare name.\", {name: \"Foo\"});\n * // returns \"hello Foo. 'Foo' is a rare name.\"\n * ```\n * @param str - The string to be formatted\n * @param variables - Variables to use to format the string\n * @returns a formatted string\n */\nexport const _formatString = (str, vars) => {\n if (!str) {\n return '';\n }\n if (!vars) {\n return str;\n }\n // regex to search for the pattern \"\\{\\}\"\n const placeholdersRegex = /{(\\w+)}/g;\n return str.replace(placeholdersRegex, (_, k) => vars[k] || `{${k}}`);\n};\n//# sourceMappingURL=localizationUtils.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { _safeJSONStringify } from './safeStringify';\n/**\n * @internal\n * This is a log function to log structural data for easier parse in telemetry\n */\nexport const _logEvent = (logger, event) => {\n logger[event.level](_safeJSONStringify(event));\n};\n//# sourceMappingURL=logEvent.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nconst argsCmp = (args1, args2, objCmp) => {\n return args1.length === args2.length && args1.every((arg1, index) => objCmp(args2[index], arg1));\n};\n/**\n * The function memoize a series of function calls in a single pass,\n * it memoizes all the args and return in a single run of the callback function, and read it in the next round of execution\n * note: this is a memory opimized function which will only memoize one round of bulk calls\n * @param fnToMemoize - the function needs to be bulk memorized and a key key paramter needs to be provided as cache id\n * @param shouldCacheUpdate - the validate function for comparing 2 argument, return true when 2 args are equal\n * @returns callback function includes a series calls of memoizedFn, and each call will get cache result if args are the same(according to shouldCacheUpdate fn)\n * @example\n * ```ts\n * const items = [{id:1, value:3}];\n * const heavyFn = (_key, value) => { // key is not used in the function, but it is a cache id\n * // assume this is a heavy caculation\n * return value+1;\n * }\n *\n * const memoizeHeavyFnAll = memoizeFnAll(heavyFn);\n * const generateValueArray = (memoizedHeavyFn) => (\n * items.map(item => {\n * memoizedHeavyFn(item.id, item.value);\n * })\n * );\n *\n * const result = memoizeHeavyFnAll(generateValueArray); // Cache: {}, nextCache: {1: 4 *new}, heavyFn call times: 1\n *\n * // Argument changed\n * items[0].value = 2\n * const result0 = memoizeHeavyFnAll(generateValueArray); // Cache: {1: 4}, nextCache: {1: 3 *new}, heavyFn call times: 1\n *\n * // Cache added\n * items.push({id:3, value:4});\n * const result1 = memoizeHeavyFnAll(generateValueArray); // Cache: {1: 3 *hit}, nextCache: {1: 3, 3: 5 *new}, heavyFn call times: 1\n *\n * // Cache removed\n * delete items[0];\n * const result2 = memoizeHeavyFnAll(generateValueArray); // Cache: {1: 3, 3: 5 *hit}, nextCache: {3: 5}, heavyFn call times: 0\n * ```\n *\n * @public\n */\nexport const memoizeFnAll = (fnToMemoize, shouldCacheUpdate = Object.is) => {\n let cache = new Map();\n let nextCache = new Map();\n return (callback) => {\n const memoizedFn = (key, ...args) => {\n const value = cache.get(key);\n if (value) {\n const [preArgs, ret] = value;\n if (argsCmp(preArgs, args, shouldCacheUpdate)) {\n nextCache.set(key, [args, ret]);\n return ret;\n }\n }\n const ret = fnToMemoize(key, ...args);\n nextCache.set(key, [args, ret]);\n return ret;\n };\n const retValue = callback(memoizedFn);\n cache = nextCache;\n nextCache = new Map();\n return retValue;\n };\n};\n//# sourceMappingURL=memoizeFnAll.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Wrap JSON.stringify in a try-catch as JSON.stringify throws an exception if it fails.\n *\n * Use this only in areas where the JSON.stringify is non-critical and OK for the JSON.stringify to fail, such as logging.\n *\n * @internal\n */\nexport const _safeJSONStringify = (value, replacer = createSafeReplacer(), space) => {\n try {\n return JSON.stringify(value, replacer, space);\n }\n catch (e) {\n console.error(e);\n return undefined;\n }\n};\n// Log all visited refs to avoid circular ref\nconst createSafeReplacer = () => {\n const visited = new Set();\n return function replacer(key, value) {\n if (typeof value !== 'object') {\n return value;\n }\n if (visited.has(value)) {\n return 'Visited-Ref';\n }\n else {\n visited.add(value);\n return value;\n }\n };\n};\n//# sourceMappingURL=safeStringify.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport * as telemetryVersion from './telemetryVersion';\n/**\n * @private\n */\n// Removes long suffixes that don't fit the constraints for telemetry application ID.\n// e.g., the build suffix is dropped for alpha package versions.\nexport const sanitize = (version) => {\n const alphaIndex = version.search(/alpha/);\n if (alphaIndex >= 0) {\n return version.substring(0, alphaIndex + 5);\n }\n return version;\n};\n/**\n * Application ID to be included in telemetry data from the UI library.\n * Template: acXYYY/\n * Where:\n * - X describes a platform, [r: web, i: iOS, a: Android]\n * - YYY describes what's running on this platform (optional, currently unused by this library):\n * Y[0] is high-level artifact,\n * [0: undefined, 1: AzureCommunicationLibrary, 2: ACS SampleApp]\n * Y[1] is specific implementation,\n * [0: undefined, 1: Call Composite, 2: Chat Composite, 3: CallWithChatComposite, 4: UI Components]\n * Y[2] is reserved for implementation details,\n * [0: undefined]\n *\n * @internal\n */\nexport const _getApplicationId = () => {\n const version = telemetryVersion['default'];\n return sanitize(`acr/${version}`);\n};\n//# sourceMappingURL=telemetry.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n// GENERATED FILE. DO NOT EDIT MANUALLY.\nmodule.exports = '1.10.0';\n//# sourceMappingURL=telemetryVersion.js.map","import { toFlatCommunicationIdentifier } from \"../../acs-ui-common/src\";\n/**\n * @private\n */\nexport const getDeviceManager = (state) => state.deviceManager;\n/**\n * @private\n */\nexport const getRole = (state, props) => {\n return 'Unknown';\n};\n/**\n * @private\n */\nexport const isHideAttendeeNamesEnabled = (state, props) => {\n return false;\n};\n/* @conditional-compile-remove(capabilities) */\n/**\n * @private\n */\nexport const getCapabilites = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities; };\n/**\n * @private\n */\nexport const getCallExists = (state, props) => !!state.calls[props.callId];\n/**\n * @private\n */\nexport const getDominantSpeakers = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.dominantSpeakers; };\n/**\n * @private\n */\nexport const getRemoteParticipants = (state, props) => {\n var _a;\n return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.remoteParticipants;\n};\n/* @conditional-compile-remove(raise-hand) */\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (state, props) => {\n var _a, _b;\n return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.raiseHand) === null || _b === void 0 ? void 0 : _b.localParticipantRaisedHand;\n};\n/**\n * @private\n */\nexport const getIsScreenSharingOn = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn; };\n/**\n * @private\n */\nexport const getIsMuted = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.isMuted; };\n/* @conditional-compile-remove(optimal-video-count) */\n/**\n * @private\n */\nexport const getOptimalVideoCount = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.optimalVideoCount.maxRemoteVideoStreams; };\n/**\n * @private\n */\nexport const getLocalVideoStreams = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.localVideoStreams; };\n/**\n * @private\n */\nexport const getScreenShareRemoteParticipant = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.screenShareRemoteParticipant; };\n/**\n * @private\n */\nexport const getDisplayName = (state) => { var _a; return (_a = state.callAgent) === null || _a === void 0 ? void 0 : _a.displayName; };\n/**\n * @private\n */\nexport const getIdentifier = (state) => toFlatCommunicationIdentifier(state.userId);\n/**\n * @private\n */\nexport const getLatestErrors = (state) => state.latestErrors;\n/**\n * @private\n */\nexport const getDiagnostics = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.diagnostics; };\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(raise-hand) */\n/**\n * @private\n */\nexport const getCallState = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.state; };\n/**\n * @private\n */\nexport const getEnvironmentInfo = (state) => {\n return undefined;\n};\n/** @private */\nexport const getParticipantCount = (state, props) => {\n return undefined;\n};\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCaptions = (state, props) => {\n var _a;\n return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.captions;\n};\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCaptionsStatus = (state, props) => {\n var _a;\n return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.isCaptionsFeatureActive;\n};\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getStartCaptionsInProgress = (state, props) => {\n var _a;\n return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.startCaptionsInProgress;\n};\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCurrentCaptionLanguage = (state, props) => {\n var _a;\n return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentCaptionLanguage;\n};\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCurrentSpokenLanguage = (state, props) => {\n var _a;\n return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentSpokenLanguage;\n};\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getSupportedCaptionLanguages = (state, props) => {\n var _a;\n return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedCaptionLanguages;\n};\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getSupportedSpokenLanguages = (state, props) => {\n var _a;\n return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedSpokenLanguages;\n};\n//# sourceMappingURL=baseSelectors.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* @conditional-compile-remove(close-captions) */\nimport { getStartCaptionsInProgress, getSupportedCaptionLanguages } from './baseSelectors';\n/* @conditional-compile-remove(close-captions) */\nimport { getCaptions, getCaptionsStatus, getCurrentCaptionLanguage, getCurrentSpokenLanguage, getSupportedSpokenLanguages } from './baseSelectors';\n/* @conditional-compile-remove(close-captions) */\nimport * as reselect from 'reselect';\n/* @conditional-compile-remove(close-captions) */\nimport { toFlatCommunicationIdentifier } from \"../../acs-ui-common/src\";\n/* @conditional-compile-remove(close-captions) */\n/**\n * Selector for {@link StartCaptionsButton} component.\n *\n * @internal\n */\nexport const _startCaptionsButtonSelector = reselect.createSelector([getCaptionsStatus, getCurrentCaptionLanguage, getCurrentSpokenLanguage], (isCaptionsFeatureActive, currentCaptionLanguage, currentSpokenLanguage) => {\n return {\n checked: isCaptionsFeatureActive !== null && isCaptionsFeatureActive !== void 0 ? isCaptionsFeatureActive : false,\n currentCaptionLanguage: currentCaptionLanguage !== null && currentCaptionLanguage !== void 0 ? currentCaptionLanguage : '',\n currentSpokenLanguage: currentSpokenLanguage !== null && currentSpokenLanguage !== void 0 ? currentSpokenLanguage : 'en-us'\n };\n});\n/* @conditional-compile-remove(close-captions) */\n/**\n * Selector for Changing caption language and spoken language\n *\n * @internal\n */\nexport const _captionSettingsSelector = reselect.createSelector([getSupportedCaptionLanguages, getCurrentCaptionLanguage, getSupportedSpokenLanguages, getCurrentSpokenLanguage, getCaptionsStatus], (supportedCaptionLanguages, currentCaptionLanguage, supportedSpokenLanguages, currentSpokenLanguage, isCaptionsFeatureActive) => {\n return {\n supportedCaptionLanguages: supportedCaptionLanguages !== null && supportedCaptionLanguages !== void 0 ? supportedCaptionLanguages : [],\n currentCaptionLanguage: currentCaptionLanguage !== null && currentCaptionLanguage !== void 0 ? currentCaptionLanguage : '',\n supportedSpokenLanguages: supportedSpokenLanguages !== null && supportedSpokenLanguages !== void 0 ? supportedSpokenLanguages : ['en-us'],\n currentSpokenLanguage: currentSpokenLanguage !== null && currentSpokenLanguage !== void 0 ? currentSpokenLanguage : 'en-us',\n isCaptionsFeatureActive: isCaptionsFeatureActive !== null && isCaptionsFeatureActive !== void 0 ? isCaptionsFeatureActive : false\n };\n});\n/* @conditional-compile-remove(close-captions) */\n/**\n * Selector for {@link CaptionsBanner} component.\n *\n * @internal\n */\nexport const _captionsBannerSelector = reselect.createSelector([getCaptions, getCaptionsStatus, getStartCaptionsInProgress], (captions, isCaptionsFeatureActive, startCaptionsInProgress) => {\n // Following Teams app logic, no matter how many 'Partial' captions come,\n // we only pick first one according to start time, and all the other partial captions will be filtered out\n // This will give customers a stable captions experience when others talking over the dominant speaker\n const captionsToRender = captions === null || captions === void 0 ? void 0 : captions.filter(captions => captions.resultType === 'Final');\n const firstPartialCaptions = captions === null || captions === void 0 ? void 0 : captions.filter(captions => captions.resultType === 'Partial').sort(captionsComparator)[0];\n firstPartialCaptions && (captionsToRender === null || captionsToRender === void 0 ? void 0 : captionsToRender.push(firstPartialCaptions));\n const captionsInfo = captionsToRender === null || captionsToRender === void 0 ? void 0 : captionsToRender.map(c => {\n var _a, _b;\n const userId = getCaptionsSpeakerIdentifier(c);\n return {\n id: c.timestamp.getTime() + userId + c.speaker.displayName,\n displayName: (_a = c.speaker.displayName) !== null && _a !== void 0 ? _a : 'Unnamed Participant',\n captionText: (_b = c.captionText) !== null && _b !== void 0 ? _b : '',\n userId\n };\n });\n return {\n captions: captionsInfo !== null && captionsInfo !== void 0 ? captionsInfo : [],\n isCaptionsOn: isCaptionsFeatureActive !== null && isCaptionsFeatureActive !== void 0 ? isCaptionsFeatureActive : false,\n startCaptionsInProgress: startCaptionsInProgress !== null && startCaptionsInProgress !== void 0 ? startCaptionsInProgress : false\n };\n});\n/* @conditional-compile-remove(close-captions) */\nconst captionsComparator = (captionsA, captionsB) => {\n return captionsA.timestamp.getTime() - captionsB.timestamp.getTime() || getCaptionsSpeakerIdentifier(captionsA).localeCompare(getCaptionsSpeakerIdentifier(captionsB));\n};\n/* @conditional-compile-remove(close-captions) */\nconst getCaptionsSpeakerIdentifier = (captions) => {\n return captions.speaker.identifier ? toFlatCommunicationIdentifier(captions.speaker.identifier) : '';\n};\n//# sourceMappingURL=captionsSelector.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { LocalVideoStream } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from \"../../../acs-ui-common/src\";\nimport memoizeOne from 'memoize-one';\nimport { disposeAllLocalPreviewViews, _isInCall, _isInLobbyOrConnecting, _isPreviewOn } from '../utils/callUtils';\n/* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { Features } from '@azure/communication-calling';\n/**\n * @private\n */\nexport const areStreamsEqual = (prevStream, newStream) => {\n return !!prevStream && !!newStream && prevStream.source.id === newStream.source.id;\n};\n/**\n * Create the common implementation of {@link CallingHandlers} for all types of Call\n *\n * @private\n */\nexport const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager, call, options) => {\n const onStartLocalVideo = () => __awaiter(void 0, void 0, void 0, function* () {\n // Before the call object creates a stream, dispose of any local preview streams.\n // @TODO: is there any way to parent the unparented view to the call object instead\n // of disposing and creating a new stream?\n yield disposeAllLocalPreviewViews(callClient);\n const callId = call === null || call === void 0 ? void 0 : call.id;\n let videoDeviceInfo = callClient.getState().deviceManager.selectedCamera;\n if (!videoDeviceInfo) {\n const cameras = yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getCameras());\n videoDeviceInfo = cameras && cameras.length > 0 ? cameras[0] : undefined;\n videoDeviceInfo && (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.selectCamera(videoDeviceInfo));\n }\n if (!callId || !videoDeviceInfo) {\n return;\n }\n const stream = new LocalVideoStream(videoDeviceInfo);\n if (call && !call.localVideoStreams.find(s => areStreamsEqual(s, stream))) {\n yield call.startVideo(stream);\n }\n });\n const onStopLocalVideo = (stream) => __awaiter(void 0, void 0, void 0, function* () {\n const callId = call === null || call === void 0 ? void 0 : call.id;\n if (!callId) {\n return;\n }\n if (call && call.localVideoStreams.find(s => areStreamsEqual(s, stream))) {\n yield call.stopVideo(stream);\n }\n });\n const onToggleCamera = (options) => __awaiter(void 0, void 0, void 0, function* () {\n const previewOn = _isPreviewOn(callClient.getState().deviceManager);\n if (previewOn && call && call.state === 'Connecting') {\n // This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.\n // The root cause of the issue is caused by never transitioning the unparented view to the\n // call object when going from configuration page (disconnected call state) to connecting.\n //\n // Currently the only time the local video stream is moved from unparented view to the call\n // object is when we transition from connecting -> call state. If the camera was on,\n // inside the MediaGallery we trigger toggleCamera. This triggers onStartLocalVideo which\n // destroys the unparentedView and creates a new stream in the call - so all looks well.\n //\n // However, if someone turns off their camera during the lobbyOrConnecting screen, the\n // call.localVideoStreams will be empty (as the stream is currently stored in the unparented\n // views and was never transitioned to the call object) and thus we incorrectly try to create\n // a new video stream for the call object, instead of only stopping the unparented view.\n //\n // The correct fix for this is to ensure that callAgent.onStartCall is called with the\n // localvideostream as a videoOption. That will mean call.onLocalVideoStreamsUpdated will\n // be triggered when the call is in connecting state, which we can then transition the\n // local video stream to the stateful call client and get into a clean state.\n yield onDisposeLocalStreamView();\n return;\n }\n if (call && (_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {\n const stream = call.localVideoStreams.find(stream => stream.mediaStreamType === 'Video');\n if (stream) {\n yield onStopLocalVideo(stream);\n }\n else {\n yield onStartLocalVideo();\n }\n }\n else {\n const selectedCamera = callClient.getState().deviceManager.selectedCamera;\n if (selectedCamera) {\n if (previewOn) {\n yield onDisposeLocalStreamView();\n }\n else {\n yield callClient.createView(undefined, undefined, {\n source: selectedCamera,\n mediaStreamType: 'Video'\n }, options);\n }\n }\n }\n });\n const onSelectMicrophone = (device) => __awaiter(void 0, void 0, void 0, function* () {\n if (!deviceManager) {\n return;\n }\n return deviceManager.selectMicrophone(device);\n });\n const onSelectSpeaker = (device) => __awaiter(void 0, void 0, void 0, function* () {\n if (!deviceManager) {\n return;\n }\n return deviceManager.selectSpeaker(device);\n });\n const onSelectCamera = (device, options) => __awaiter(void 0, void 0, void 0, function* () {\n if (!deviceManager) {\n return;\n }\n if (call && _isInCall(call.state)) {\n deviceManager.selectCamera(device);\n const stream = call.localVideoStreams.find(stream => stream.mediaStreamType === 'Video');\n return stream === null || stream === void 0 ? void 0 : stream.switchSource(device);\n }\n else {\n const previewOn = _isPreviewOn(callClient.getState().deviceManager);\n if (!previewOn) {\n deviceManager.selectCamera(device);\n return;\n }\n yield onDisposeLocalStreamView();\n deviceManager.selectCamera(device);\n yield callClient.createView(undefined, undefined, {\n source: device,\n mediaStreamType: 'Video'\n }, options);\n }\n });\n /* @conditional-compile-remove(raise-hand) */\n const onRaiseHand = () => __awaiter(void 0, void 0, void 0, function* () { var _a; return yield ((_a = call === null || call === void 0 ? void 0 : call.feature(Features.RaiseHand)) === null || _a === void 0 ? void 0 : _a.raiseHand()); });\n /* @conditional-compile-remove(raise-hand) */\n const onLowerHand = () => __awaiter(void 0, void 0, void 0, function* () { var _b; return yield ((_b = call === null || call === void 0 ? void 0 : call.feature(Features.RaiseHand)) === null || _b === void 0 ? void 0 : _b.lowerHand()); });\n /* @conditional-compile-remove(raise-hand) */\n const onToggleRaiseHand = () => __awaiter(void 0, void 0, void 0, function* () {\n const raiseHandFeature = call === null || call === void 0 ? void 0 : call.feature(Features.RaiseHand);\n const localUserId = callClient.getState().userId;\n const isLocalRaisedHand = raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.getRaisedHands().find(publishedState => toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId));\n if (isLocalRaisedHand) {\n yield (raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.lowerHand());\n }\n else {\n yield (raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.raiseHand());\n }\n });\n const onToggleMicrophone = () => __awaiter(void 0, void 0, void 0, function* () {\n if (!call || !_isInCall(call.state)) {\n throw new Error(`Please invoke onToggleMicrophone after call is started`);\n }\n return call.isMuted ? yield call.unmute() : yield call.mute();\n });\n const onStartScreenShare = () => __awaiter(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });\n const onStopScreenShare = () => __awaiter(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });\n const onToggleScreenShare = () => __awaiter(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });\n const onHangUp = (forEveryone) => __awaiter(void 0, void 0, void 0, function* () {\n return yield (call === null || call === void 0 ? void 0 : call.hangUp({\n forEveryone: forEveryone === true ? true : false\n }));\n });\n const onCreateLocalStreamView = (options = {\n scalingMode: 'Crop',\n isMirrored: true\n }) => __awaiter(void 0, void 0, void 0, function* () {\n var _c;\n if (!call || call.localVideoStreams.length === 0) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n return;\n }\n const localStream = callState.localVideoStreams.find(item => item.mediaStreamType === 'Video');\n if (!localStream) {\n return;\n }\n const { view } = (_c = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _c !== void 0 ? _c : {};\n return view ? {\n view\n } : undefined;\n });\n const onCreateRemoteStreamView = (userId, options = {\n scalingMode: 'Crop'\n }) => __awaiter(void 0, void 0, void 0, function* () {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n const participant = Object.values(callState.remoteParticipants).find(participant => toFlatCommunicationIdentifier(participant.identifier) === userId);\n if (!participant || !participant.videoStreams) {\n return;\n }\n // Find the first available stream, if there is none, then get the first stream\n const remoteVideoStream = Object.values(participant.videoStreams).find(i => i.mediaStreamType === 'Video' && i.isAvailable) || Object.values(participant.videoStreams).find(i => i.mediaStreamType === 'Video');\n const screenShareStream = Object.values(participant.videoStreams).find(i => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) || Object.values(participant.videoStreams).find(i => i.mediaStreamType === 'ScreenSharing');\n let createViewResult = undefined;\n if (remoteVideoStream && remoteVideoStream.isAvailable && !remoteVideoStream.view) {\n createViewResult = yield callClient.createView(call.id, participant.identifier, remoteVideoStream, options);\n }\n if (screenShareStream && screenShareStream.isAvailable && !screenShareStream.view) {\n // Hardcoded `scalingMode` since it is highly unlikely that CONTOSO would ever want to use a different scaling mode for screenshare.\n // Using `Crop` would crop the contents of screenshare and `Stretch` would warp it.\n // `Fit` is the only mode that maintains the integrity of the screen being shared.\n createViewResult = yield callClient.createView(call.id, participant.identifier, screenShareStream, {\n scalingMode: 'Fit'\n });\n }\n return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? {\n view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view\n } : undefined;\n });\n const onDisposeRemoteStreamView = (userId) => __awaiter(void 0, void 0, void 0, function* () {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n const participant = Object.values(callState.remoteParticipants).find(participant => toFlatCommunicationIdentifier(participant.identifier) === userId);\n if (!participant || !participant.videoStreams) {\n return;\n }\n const remoteVideoStream = Object.values(participant.videoStreams).find(i => i.mediaStreamType === 'Video');\n const screenShareStream = Object.values(participant.videoStreams).find(i => i.mediaStreamType === 'ScreenSharing');\n if (remoteVideoStream && remoteVideoStream.view) {\n callClient.disposeView(call.id, participant.identifier, remoteVideoStream);\n }\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, participant.identifier, screenShareStream);\n }\n });\n const onDisposeRemoteVideoStreamView = (userId) => __awaiter(void 0, void 0, void 0, function* () {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n const participant = Object.values(callState.remoteParticipants).find(participant => toFlatCommunicationIdentifier(participant.identifier) === userId);\n if (!participant || !participant.videoStreams) {\n return;\n }\n const remoteVideoStream = Object.values(participant.videoStreams).find(i => i.mediaStreamType === 'Video');\n if (remoteVideoStream && remoteVideoStream.view) {\n callClient.disposeView(call.id, participant.identifier, remoteVideoStream);\n }\n });\n const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter(void 0, void 0, void 0, function* () {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n const participant = Object.values(callState.remoteParticipants).find(participant => toFlatCommunicationIdentifier(participant.identifier) === userId);\n if (!participant || !participant.videoStreams) {\n return;\n }\n const screenShareStream = Object.values(participant.videoStreams).find(i => i.mediaStreamType === 'ScreenSharing');\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, participant.identifier, screenShareStream);\n }\n });\n const onDisposeLocalStreamView = () => __awaiter(void 0, void 0, void 0, function* () {\n // If the user is currently in a call, dispose of the local stream view attached to that call.\n const callState = call && callClient.getState().calls[call.id];\n const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find(item => item.mediaStreamType === 'Video');\n if (call && callState && localStream) {\n callClient.disposeView(call.id, undefined, localStream);\n }\n // If the user is not in a call we currently assume any unparented view is a LocalPreview and stop all\n // since those are only used for LocalPreview currently.\n // TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.\n yield disposeAllLocalPreviewViews(callClient);\n });\n const notImplemented = () => {\n throw new Error('Not implemented, cannot call a method from an abstract object');\n };\n /* @conditional-compile-remove(video-background-effects) */\n const onRemoveVideoBackgroundEffects = () => __awaiter(void 0, void 0, void 0, function* () {\n const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find(stream => stream.mediaStreamType === 'Video')) || (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find(stream => stream.mediaStreamType === 'Video'));\n if (stream) {\n if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {\n throw new Error(`Video background effects dependency not resolved`);\n }\n else {\n return stream.feature(Features.VideoEffects).stopEffects();\n }\n }\n });\n /* @conditional-compile-remove(video-background-effects) */\n const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter(void 0, void 0, void 0, function* () {\n var _d;\n const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find(stream => stream.mediaStreamType === 'Video')) || (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find(stream => stream.mediaStreamType === 'Video'));\n if (stream) {\n if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {\n throw new Error(`Video background effects dependency not resolved`);\n }\n const createEffect = (options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency) && ((_d = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _d === void 0 ? void 0 : _d.createBackgroundBlurEffect);\n return createEffect && stream.feature(Features.VideoEffects).startEffects(createEffect(backgroundBlurConfig));\n }\n });\n /* @conditional-compile-remove(video-background-effects) */\n const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter(void 0, void 0, void 0, function* () {\n var _e;\n const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find(stream => stream.mediaStreamType === 'Video')) || (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find(stream => stream.mediaStreamType === 'Video'));\n if (stream) {\n if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {\n throw new Error(`Video background effects dependency not resolved`);\n }\n const createEffect = (options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency) && ((_e = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _e === void 0 ? void 0 : _e.createBackgroundReplacementEffect);\n return createEffect && stream.feature(Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig));\n }\n });\n /* @conditional-compile-remove(close-captions) */\n const onStartCaptions = (options) => __awaiter(void 0, void 0, void 0, function* () {\n const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(Features.Captions).captions;\n yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.startCaptions(options));\n });\n /* @conditional-compile-remove(close-captions) */\n const onStopCaptions = () => __awaiter(void 0, void 0, void 0, function* () {\n const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(Features.Captions).captions;\n yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.stopCaptions());\n });\n /* @conditional-compile-remove(close-captions) */\n const onSetSpokenLanguage = (language) => __awaiter(void 0, void 0, void 0, function* () {\n const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(Features.Captions).captions;\n yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.setSpokenLanguage(language));\n });\n /* @conditional-compile-remove(close-captions) */\n const onSetCaptionLanguage = (language) => __awaiter(void 0, void 0, void 0, function* () {\n const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(Features.Captions).captions;\n yield captionsFeature.setCaptionLanguage(language);\n });\n return {\n onHangUp,\n onSelectCamera,\n onSelectMicrophone,\n onSelectSpeaker,\n onStartScreenShare,\n onStopScreenShare,\n onToggleCamera,\n onToggleMicrophone,\n onToggleScreenShare,\n onCreateLocalStreamView,\n onCreateRemoteStreamView,\n onStartLocalVideo,\n onDisposeRemoteStreamView,\n onDisposeLocalStreamView,\n onDisposeRemoteScreenShareStreamView,\n onDisposeRemoteVideoStreamView,\n /* @conditional-compile-remove(raise-hand) */\n onRaiseHand,\n /* @conditional-compile-remove(raise-hand) */\n onLowerHand,\n /* @conditional-compile-remove(raise-hand) */\n onToggleRaiseHand,\n onRemoveParticipant: notImplemented,\n onStartCall: notImplemented,\n /* @conditional-compile-remove(video-background-effects) */\n onRemoveVideoBackgroundEffects,\n /* @conditional-compile-remove(video-background-effects) */\n onBlurVideoBackground,\n /* @conditional-compile-remove(video-background-effects) */\n onReplaceVideoBackground,\n /* @conditional-compile-remove(close-captions) */\n onStartCaptions,\n /* @conditional-compile-remove(close-captions) */\n onStopCaptions,\n /* @conditional-compile-remove(close-captions) */\n onSetCaptionLanguage,\n /* @conditional-compile-remove(close-captions) */\n onSetSpokenLanguage\n };\n});\n//# sourceMappingURL=createCommonHandlers.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { _toCommunicationIdentifier } from \"../../../acs-ui-common/src\";\nimport memoizeOne from 'memoize-one';\nimport { isACSCallParticipants } from '../utils/callUtils';\nimport { createDefaultCommonCallingHandlers } from './createCommonHandlers';\n/**\n * Create the default implementation of {@link CallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultCallingHandlers = memoizeOne((...args) => {\n const [callClient, callAgent, deviceManager, call, /* @conditional-compile-remove(video-background-effects) */ options] = args;\n return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call, /* @conditional-compile-remove(video-background-effects) */ options)), { \n // FIXME: onStartCall API should use string, not the underlying SDK types.\n onStartCall: (participants, options) => {\n if (!isACSCallParticipants(participants)) {\n throw new Error('TeamsUserIdentifier in Teams call is not supported!');\n }\n return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);\n }, onRemoveParticipant: (userId) => __awaiter(void 0, void 0, void 0, function* () {\n const participant = _toCommunicationIdentifier(userId);\n yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));\n }) });\n});\n//# sourceMappingURL=createHandlers.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { _isACSCallAgent } from \"../../../calling-stateful-client/src\";\nimport React, { createContext, useContext } from 'react';\n/**\n * @private\n */\nexport const CallAgentContext = createContext(undefined);\nconst CallAgentProviderBase = (props) => {\n const { callAgent } = props;\n const initialState = {\n callAgent\n };\n return React.createElement(CallAgentContext.Provider, { value: initialState }, props.children);\n};\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}.\n *\n * Calling components from this package must be wrapped with a {@link CallAgentProvider}.\n *\n * @public\n */\nexport const CallAgentProvider = (props) => React.createElement(CallAgentProviderBase, Object.assign({}, props));\n/**\n * Hook to obtain {@link @azure/communication-calling#CallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useCallAgent = () => {\n var _a;\n const callAgent = (_a = useContext(CallAgentContext)) === null || _a === void 0 ? void 0 : _a.callAgent;\n if (callAgent && !_isACSCallAgent(callAgent)) {\n throw new Error('TeamsCallAgent object was provided, try useTeamsCall() instead');\n }\n return callAgent;\n};\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @beta\n */\nexport const useTeamsCallAgent = () => {\n var _a;\n const callAgent = (_a = useContext(CallAgentContext)) === null || _a === void 0 ? void 0 : _a.callAgent;\n if (callAgent && _isACSCallAgent(callAgent)) {\n throw new Error('Regular CallAgent object was provided, try useCall() instead');\n }\n return callAgent;\n};\n//# sourceMappingURL=CallAgentProvider.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { useContext } from 'react';\nimport { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from \"../../../calling-stateful-client/src\";\nimport { createDefaultCallingHandlersForComponent } from '../handlers/createDefaultCallingHandlersForComponent';\nimport { CallAgentContext, CallClientContext, CallContext, useDeviceManager } from '../providers';\n/**\n * Hook to obtain a handler for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = (component) => {\n var _a, _b, _c;\n const callClient = (_a = useContext(CallClientContext)) === null || _a === void 0 ? void 0 : _a.callClient;\n const deviceManager = useDeviceManager();\n const call = (_b = useContext(CallContext)) === null || _b === void 0 ? void 0 : _b.call;\n const callAgent = (_c = useContext(CallAgentContext)) === null || _c === void 0 ? void 0 : _c.callAgent;\n if (!callClient) {\n return undefined;\n }\n // Handle edge case, validate if call and callAgent are the same type (ACS/Teams)\n if (callAgent && _isTeamsCallAgent(callAgent)) {\n if (call && !_isTeamsCall(call)) {\n throw new Error('A TeamsCall must be provided when callAgent is TeamsCallAgent');\n }\n }\n if (callAgent && _isACSCallAgent(callAgent)) {\n if (call && !_isACSCall(call)) {\n throw new Error('A regular ACS Call must be provided when callAgent is regular CallAgent');\n }\n }\n return createDefaultCallingHandlersForComponent(callClient, callAgent, deviceManager, call, component);\n};\n//# sourceMappingURL=useHandlers.js.map","import { _isACSCall, _isACSCallAgent } from \"../../../calling-stateful-client/src\";\nimport { createDefaultCallingHandlers } from './createHandlers';\n/**\n * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with\n * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and\n * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.\n *\n * @param callClient - StatefulCallClient returned from\n * {@link @azure/communication-react#createStatefulCallClient}.\n * @param callAgent - Instance of {@link @azure/communication-calling#CallClient}.\n * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.\n * @param call - Instance of {@link @azure/communication-calling#Call}.\n * @param _ - React component that you want to generate handlers for.\n *\n * @public\n */\nexport const createDefaultCallingHandlersForComponent = (callClient, callAgent, deviceManager, call, _Component) => {\n if (!callAgent && !call && !deviceManager) {\n return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call);\n }\n if (callAgent && _isACSCallAgent(callAgent) && (!call || call && _isACSCall(call))) {\n return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call);\n }\n throw new Error('CallAgent type and Call type are not compatible!');\n};\n//# sourceMappingURL=createDefaultCallingHandlersForComponent.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport * as reselect from 'reselect';\nimport { getCallExists, getDeviceManager, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams } from './baseSelectors';\n/* @conditional-compile-remove(capabilities) */\nimport { getCapabilites, getRole } from './baseSelectors';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(raise-hand) */\nimport { getCallState } from './baseSelectors';\nimport { _isPreviewOn } from './utils/callUtils';\n/* @conditional-compile-remove(raise-hand) */\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n/**\n * Selector for {@link MicrophoneButton} component.\n *\n * @public\n */\nexport const microphoneButtonSelector = reselect.createSelector([getCallExists, getIsMuted, getDeviceManager, /* @conditional-compile-remove(capabilities) */ getCapabilites, /* @conditional-compile-remove(capabilities) */ getRole], (callExists, isMuted, deviceManager, /* @conditional-compile-remove(capabilities) */ capabilities, /* @conditional-compile-remove(capabilities) */ role) => {\n const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;\n /* @conditional-compile-remove(capabilities) */\n const incapable = (capabilities === null || capabilities === void 0 ? void 0 : capabilities.unmuteMic.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.unmuteMic.reason) !== 'NotInitialized' || role === 'Consumer';\n return {\n disabled: !callExists || !permission || /* @conditional-compile-remove(capabilities) */ incapable,\n checked: callExists ? !isMuted : false,\n microphones: deviceManager.microphones,\n speakers: deviceManager.speakers,\n selectedMicrophone: deviceManager.selectedMicrophone,\n selectedSpeaker: deviceManager.selectedSpeaker\n };\n});\n/**\n * Selector for {@link CameraButton} component.\n *\n * @public\n */\nexport const cameraButtonSelector = reselect.createSelector([getLocalVideoStreams, getDeviceManager, /* @conditional-compile-remove(capabilities) */ getCapabilites, /* @conditional-compile-remove(capabilities) */ getRole], (localVideoStreams, deviceManager, /* @conditional-compile-remove(capabilities) */ capabilities, /* @conditional-compile-remove(capabilities) */ role) => {\n const previewOn = _isPreviewOn(deviceManager);\n const localVideoFromCall = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find(stream => stream.mediaStreamType === 'Video');\n const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;\n /* @conditional-compile-remove(capabilities) */\n const incapable = (capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOn.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOn.reason) !== 'NotInitialized' || role === 'Consumer';\n return {\n disabled: !deviceManager.selectedCamera || !permission || !deviceManager.cameras.length || /* @conditional-compile-remove(capabilities) */ incapable,\n checked: localVideoStreams !== undefined && localVideoStreams.length > 0 ? !!localVideoFromCall : previewOn,\n cameras: deviceManager.cameras,\n selectedCamera: deviceManager.selectedCamera\n };\n});\n/* @conditional-compile-remove(raise-hand) */\n/**\n * Selector for {@link RaiseHandButton} component.\n *\n * @public\n */\nexport const raiseHandButtonSelector = reselect.createSelector([getLocalParticipantRaisedHand, getCallState], (raisedHand, callState) => {\n var _a;\n return {\n checked: raisedHand ? true : false,\n disabled: callState === 'InLobby' ? true : (_a = callState === 'Connecting') !== null && _a !== void 0 ? _a : false\n };\n});\n/**\n * Selector for {@link ScreenShareButton} component.\n *\n * @public\n */\nexport const screenShareButtonSelector = reselect.createSelector([getIsScreenSharingOn, /* @conditional-compile-remove(capabilities) */ getCapabilites, /* @conditional-compile-remove(capabilities) */ getRole], (isScreenSharingOn, /* @conditional-compile-remove(capabilities) */ capabilities, /* @conditional-compile-remove(capabilities) */ role) => {\n let disabled = undefined;\n /* @conditional-compile-remove(capabilities) */\n disabled = disabled || (capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.reason) !== 'NotInitialized' || role === 'Consumer' || role === 'Attendee';\n return {\n checked: isScreenSharingOn,\n disabled\n };\n});\n/**\n * Selector for {@link DevicesButton} component.\n *\n * @public\n */\nexport const devicesButtonSelector = reselect.createSelector([getDeviceManager], deviceManager => {\n return {\n microphones: removeBlankNameDevices(deviceManager.microphones),\n speakers: removeBlankNameDevices(deviceManager.speakers),\n cameras: removeBlankNameDevices(deviceManager.cameras),\n selectedMicrophone: deviceManager.selectedMicrophone,\n selectedSpeaker: deviceManager.selectedSpeaker,\n selectedCamera: deviceManager.selectedCamera\n };\n});\nfunction removeBlankNameDevices(devices) {\n return devices.filter(device => device.name !== '');\n}\n//# sourceMappingURL=callControlSelectors.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { toFlatCommunicationIdentifier } from \"../../acs-ui-common/src\";\nimport { createSelector } from 'reselect';\nimport { getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRemoteParticipants, getScreenShareRemoteParticipant } from './baseSelectors';\n/* @conditional-compile-remove(optimal-video-count) */\nimport { getOptimalVideoCount } from './baseSelectors';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant } from './utils/videoGalleryUtils';\n/* @conditional-compile-remove(raise-hand) */\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector = createSelector([getScreenShareRemoteParticipant, getRemoteParticipants, getLocalVideoStreams, getIsMuted, getIsScreenSharingOn, getDisplayName, getIdentifier, getDominantSpeakers,\n getOptimalVideoCount,\n getLocalParticipantRaisedHand], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers, /* @conditional-compile-remove(optimal-video-count) */ optimalVideoCount, /* @conditional-compile-remove(raise-hand) */ raisedHand) => {\n const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants ? remoteParticipants[screenShareRemoteParticipantId] : undefined;\n const localVideoStream = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find(i => i.mediaStreamType === 'Video');\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap = {};\n dominantSpeakerIds === null || dominantSpeakerIds === void 0 ? void 0 : dominantSpeakerIds.forEach((speaker, idx) => dominantSpeakersMap[speaker] = idx);\n const noRemoteParticipants = [];\n return {\n screenShareParticipant: screenShareRemoteParticipant ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, /* @conditional-compile-remove(raise-hand) */ screenShareRemoteParticipant.raisedHand) : undefined,\n localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(raise-hand) */ raisedHand),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants)),\n dominantSpeakers: dominantSpeakerIds,\n /* @conditional-compile-remove(optimal-video-count) */\n maxRemoteVideoStreams: optimalVideoCount\n };\n});\nconst updateUserDisplayNamesTrampoline = (remoteParticipants) => {\n return remoteParticipants;\n};\n//# sourceMappingURL=videoGallerySelector.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier, memoizeFnAll } from \"../../../acs-ui-common/src\";\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipants = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers) => {\n return convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers);\n});\nconst convertRemoteParticipantToParticipantListParticipant = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers) => {\n const identifier = fromFlatCommunicationIdentifier(userId);\n return {\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n // ACS users can not remove Teams users.\n // Removing unknown types of users is undefined.\n isRemovable: (getIdentifierKind(identifier).kind === 'communicationUser' || getIdentifierKind(identifier).kind === 'phoneNumber') && localUserCanRemoveOthers\n };\n};\n/* @conditional-compile-remove(raise-hand) */\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {\n return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers);\n});\n/* @conditional-compile-remove(raise-hand) */\nconst convertRemoteParticipantToParticipantListParticipantBeta = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {\n return Object.assign(Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers)), { raisedHand });\n};\n//# sourceMappingURL=participantListSelectorUtils.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createSelector } from 'reselect';\nimport { getIdentifier, getDisplayName, getRemoteParticipants, getIsScreenSharingOn, getIsMuted } from './baseSelectors';\nimport { getRole } from './baseSelectors';\nimport { _isRingingPSTNParticipant } from './utils/callUtils';\nimport { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';\n/* @conditional-compile-remove(raise-hand) */\nimport { memoizedConvertAllremoteParticipantsBeta } from './utils/participantListSelectorUtils';\n/* @conditional-compile-remove(raise-hand) */\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { toFlatCommunicationIdentifier } from \"../../acs-ui-common/src\";\nimport { getParticipantCount } from './baseSelectors';\nimport { isMicrosoftTeamsAppIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';\nconst convertRemoteParticipantsToParticipantListParticipants = (remoteParticipants, localUserCanRemoveOthers, isHideAttendeeNamesEnabled, localUserRole) => {\n /* eslint-disable @typescript-eslint/explicit-function-return-type */\n const conversionCallback = memoizeFn => {\n return remoteParticipants\n // Filter out MicrosoftBot participants\n .filter((participant) => {\n return !isMicrosoftTeamsAppIdentifier(participant.identifier);\n return true;\n })\n /**\n * hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.\n * phone users will be in the connecting state until they are connected to the call.\n */ .filter(participant => {\n return !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) || isPhoneNumberIdentifier(participant.identifier);\n }).map((participant) => {\n const isScreenSharing = Object.values(participant.videoStreams).some(videoStream => videoStream.mediaStreamType === 'ScreenSharing' && videoStream.isAvailable);\n /**\n * We want to check the participant to see if they are a PSTN participant joining the call\n * and mapping their state to be 'Ringing'\n */\n const state = _isRingingPSTNParticipant(participant);\n let displayName = participant.displayName;\n return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking, /* @conditional-compile-remove(raise-hand) */ participant.raisedHand, localUserCanRemoveOthers);\n }).sort((a, b) => {\n var _a, _b;\n const nameA = ((_a = a.displayName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';\n const nameB = ((_b = b.displayName) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || '';\n if (nameA < nameB) {\n return -1;\n }\n else if (nameA > nameB) {\n return 1;\n }\n else {\n return 0;\n }\n });\n };\n /* @conditional-compile-remove(raise-hand) */\n return memoizedConvertAllremoteParticipantsBeta(conversionCallback);\n return memoizedConvertAllremoteParticipants(conversionCallback);\n};\n/**\n * Selects data that drives {@link ParticipantList} component.\n *\n * @public\n */\nexport const participantListSelector = createSelector([getIdentifier, getDisplayName, getRemoteParticipants, getIsScreenSharingOn, getIsMuted, /* @conditional-compile-remove(raise-hand) */ getLocalParticipantRaisedHand, getRole, getParticipantCount], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, /* @conditional-compile-remove(raise-hand) */ raisedHand, role, partitipantCount) => {\n const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);\n const participants = remoteParticipants ? convertRemoteParticipantsToParticipantListParticipants(updateUserDisplayNamesTrampoline(Object.values(remoteParticipants)), localUserCanRemoveOthers) : [];\n participants.push({\n userId: userId,\n displayName: displayName,\n isScreenSharing: isScreenSharingOn,\n isMuted: isMuted,\n /* @conditional-compile-remove(raise-hand) */\n raisedHand: raisedHand,\n state: 'Connected',\n // Local participant can never remove themselves.\n isRemovable: false\n });\n return {\n participants: participants,\n myUserId: userId\n };\n});\nconst updateUserDisplayNamesTrampoline = (remoteParticipants) => {\n return remoteParticipants;\n};\nconst localUserCanRemoveOthersTrampoline = (role) => {\n return true;\n};\n//# sourceMappingURL=participantListSelector.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { participantListSelector } from './participantListSelector';\nimport { createSelector } from 'reselect';\n/**\n * Selects data that drives {@link ParticipantsButton} component.\n *\n * @public\n */\nexport const participantsButtonSelector = createSelector([participantListSelector], (participantListProps) => {\n return participantListProps;\n});\n//# sourceMappingURL=participantsButtonSelector.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getDeviceManager, getDiagnostics, getLatestErrors, getEnvironmentInfo } from './baseSelectors';\nimport { createSelector } from 'reselect';\nimport { DiagnosticQuality } from '@azure/communication-calling';\n/**\n * Select the first 3 active errors from the state for the `ErrorBar` component.\n *\n * In case there are many errors, only the first three errors are returned to avoid\n * filling up the UI with too many errors.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const errorBarSelector = createSelector([getLatestErrors, getDiagnostics, getDeviceManager, getEnvironmentInfo], (latestErrors, diagnostics, deviceManager, environmentInfo) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;\n // The order in which the errors are returned is significant: The `ErrorBar` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages = [];\n const isSafari = () => {\n return /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);\n };\n const isMacOS = () => {\n return false;\n };\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n if (((_a = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.network.latest.networkReceiveQuality) === null || _a === void 0 ? void 0 : _a.value) === DiagnosticQuality.Bad || ((_b = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.network.latest.networkReceiveQuality) === null || _b === void 0 ? void 0 : _b.value) === DiagnosticQuality.Poor) {\n activeErrorMessages.push({\n type: 'callNetworkQualityLow'\n });\n }\n if (((_c = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.noSpeakerDevicesEnumerated) === null || _c === void 0 ? void 0 : _c.value) === true) {\n activeErrorMessages.push({\n type: 'callNoSpeakerFound'\n });\n }\n if (((_d = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.noMicrophoneDevicesEnumerated) === null || _d === void 0 ? void 0 : _d.value) === true) {\n activeErrorMessages.push({\n type: 'callNoMicrophoneFound'\n });\n }\n if (((_e = deviceManager.deviceAccess) === null || _e === void 0 ? void 0 : _e.audio) === false && isSafari()) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDeniedSafari'\n });\n }\n if (((_f = deviceManager.deviceAccess) === null || _f === void 0 ? void 0 : _f.audio) === false && !isSafari()) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDenied'\n });\n }\n if (((_g = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.microphonePermissionDenied) === null || _g === void 0 ? void 0 : _g.value) === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsMicrophoneAccessDenied'\n });\n }\n else if (((_h = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.microphonePermissionDenied) === null || _h === void 0 ? void 0 : _h.value) === true) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDenied'\n });\n }\n const microphoneMuteUnexpectedlyDiagnostic = (diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.microphoneMuteUnexpectedly) || (diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.microphoneNotFunctioning);\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({\n type: 'callMicrophoneMutedBySystem'\n });\n }\n else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({\n type: 'callMicrophoneUnmutedBySystem'\n });\n }\n }\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({\n type: 'callVideoStoppedBySystem'\n });\n }\n else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({\n type: 'callVideoRecoveredBySystem'\n });\n }\n }\n if (((_j = deviceManager.deviceAccess) === null || _j === void 0 ? void 0 : _j.video) === false && isSafari()) {\n activeErrorMessages.push({\n type: 'callCameraAccessDeniedSafari'\n });\n }\n else if (((_k = deviceManager.deviceAccess) === null || _k === void 0 ? void 0 : _k.video) === false) {\n activeErrorMessages.push({\n type: 'callCameraAccessDenied'\n });\n }\n else {\n if (((_l = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.cameraFreeze) === null || _l === void 0 ? void 0 : _l.value) === true) {\n activeErrorMessages.push({\n type: 'cameraFrozenForRemoteParticipants'\n });\n }\n }\n /**\n * show the Mac specific strings if the platform is detected as mac\n */\n if (((_m = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.cameraPermissionDenied) === null || _m === void 0 ? void 0 : _m.value) === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsCameraAccessDenied'\n });\n }\n /**\n * This UFD only works on mac still so we should only see it fire on mac.\n */\n if (((_o = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.screenshareRecordingDisabled) === null || _o === void 0 ? void 0 : _o.value) === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsScreenShareAccessDenied'\n });\n }\n else if (((_p = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.screenshareRecordingDisabled) === null || _p === void 0 ? void 0 : _p.value) === true) {\n activeErrorMessages.push({\n type: 'startScreenShareGeneric'\n });\n }\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n if (((_q = latestErrors['Call.startVideo']) === null || _q === void 0 ? void 0 : _q.message) === 'Call.startVideo: Video operation failure SourceUnavailableError') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAlreadyInUse');\n }\n else if (((_r = latestErrors['Call.startVideo']) === null || _r === void 0 ? void 0 : _r.message) === 'Call.startVideo: Video operation failure permissionDeniedError') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAccessDenied');\n }\n else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n }\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n /* @conditional-compile-remove(video-background-effects) */\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'VideoEffectsFeature.startEffects', 'unableToStartVideoEffect');\n if (((_s = latestErrors['CallAgent.join']) === null || _s === void 0 ? void 0 : _s.message) === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallInvalidMeetingLink');\n }\n else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n // We only return the first few errors to avoid filling up the UI with too many `MessageBar`s.\n activeErrorMessages.splice(maxErrorCount);\n return {\n activeErrorMessages: activeErrorMessages\n };\n});\nconst appendActiveErrorIfDefined = (activeErrorMessages, latestErrors, target, activeErrorType) => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};\nconst maxErrorCount = 3;\n//# sourceMappingURL=errorBarSelector.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton, ParticipantList, ScreenShareButton, VideoGallery } from \"../../../react-components/src\";\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButton } from \"../../../react-components/src\";\n/* @conditional-compile-remove(raise-hand) */\nimport { raiseHandButtonSelector } from '../callControlSelectors';\nimport { cameraButtonSelector, microphoneButtonSelector, devicesButtonSelector, screenShareButtonSelector } from '../callControlSelectors';\nimport { videoGallerySelector } from '../videoGallerySelector';\nimport { participantListSelector } from '../participantListSelector';\nimport { participantsButtonSelector } from '../participantsButtonSelector';\nimport { useHandlers } from './useHandlers';\nimport { useSelector } from './useSelector';\nimport { ParticipantsButton } from \"../../../react-components/src\";\nimport { errorBarSelector } from '../errorBarSelector';\n/**\n * Primary hook to get all hooks necessary for a calling Component.\n *\n * Most straightforward usage of calling components looks like:\n *\n * @example\n * ```\n * import { ParticipantList, usePropsFor } from '@azure/communication-react';\n *\n * const App = (): JSX.Element => {\n * // ... code to setup Providers ...\n *\n * return \n * }\n * ```\n *\n * @public\n */\nexport const usePropsFor = (component) => {\n const selector = getSelector(component);\n const props = useSelector(selector);\n const handlers = useHandlers(component);\n if (props !== undefined) {\n return Object.assign(Object.assign({}, props), handlers);\n }\n return undefined;\n};\nconst emptySelector = () => ({});\n/**\n * Get the selector for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getSelector = (component) => {\n /* @conditional-compile-remove(raise-hand) */\n if (component === RaiseHandButton) {\n return findConditionalCompiledSelector(component);\n }\n return findSelector(component);\n};\nconst findSelector = (component) => {\n switch (component) {\n case VideoGallery:\n return videoGallerySelector;\n case MicrophoneButton:\n return microphoneButtonSelector;\n case CameraButton:\n return cameraButtonSelector;\n case ScreenShareButton:\n return screenShareButtonSelector;\n case DevicesButton:\n return devicesButtonSelector;\n case ParticipantList:\n return participantListSelector;\n case ParticipantsButton:\n return participantsButtonSelector;\n case EndCallButton:\n return emptySelector;\n case ErrorBar:\n return errorBarSelector;\n }\n return undefined;\n};\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(raise-hand) */\nconst findConditionalCompiledSelector = (component) => {\n switch (component) {\n /* @conditional-compile-remove(raise-hand) */\n case RaiseHandButton:\n /* @conditional-compile-remove(raise-hand) */\n return raiseHandButtonSelector;\n }\n};\n//# sourceMappingURL=usePropsFor.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { CallClientContext, CallContext } from '../providers';\nimport { useState, useEffect, useRef, useMemo, useContext } from 'react';\n/**\n * Hook to obtain a selector for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useSelector = (selector, selectorProps) => {\n var _a, _b, _c;\n const callClient = (_a = useContext(CallClientContext)) === null || _a === void 0 ? void 0 : _a.callClient;\n const callId = (_c = (_b = useContext(CallContext)) === null || _b === void 0 ? void 0 : _b.call) === null || _c === void 0 ? void 0 : _c.id;\n // Keeps track of whether the current component is mounted or not. If it has unmounted, make sure we do not modify the\n // state or it will cause React warnings in the console. https://skype.visualstudio.com/SPOOL/_workitems/edit/2453212\n const mounted = useRef(false);\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n });\n const callIdConfigProps = useMemo(() => ({\n callId\n }), [callId]);\n const [props, setProps] = useState(callClient && selector ? selector(callClient.getState(), selectorProps !== null && selectorProps !== void 0 ? selectorProps : callIdConfigProps) : undefined);\n const propRef = useRef(props);\n propRef.current = props;\n useEffect(() => {\n if (!callClient || !selector) {\n return;\n }\n const onStateChange = (state) => {\n if (!mounted.current) {\n return;\n }\n const newProps = selector(state, selectorProps !== null && selectorProps !== void 0 ? selectorProps : callIdConfigProps);\n if (propRef.current !== newProps) {\n setProps(newProps);\n }\n };\n callClient.onStateChange(onStateChange);\n return () => {\n callClient.offStateChange(onStateChange);\n };\n }, [callClient, selector, selectorProps, callIdConfigProps, mounted]);\n return selector ? props : undefined;\n};\n//# sourceMappingURL=useSelector.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { createContext, useContext, useEffect, useState } from 'react';\n/**\n * @private\n */\nexport const CallClientContext = createContext(undefined);\n/**\n * @private\n */\nconst CallClientProviderBase = (props) => {\n const { callClient } = props;\n const [deviceManager, setDeviceManager] = useState(undefined);\n /**\n * Initialize the DeviceManager inside CallClientState\n */\n useEffect(() => {\n callClient.getDeviceManager().then(manager => {\n manager.getCameras();\n manager.getMicrophones();\n manager.getSpeakers();\n setDeviceManager(manager);\n }).catch(error => {\n throw new Error(error);\n });\n }, [callClient]);\n const initialState = {\n callClient,\n deviceManager\n };\n return React.createElement(CallClientContext.Provider, { value: initialState }, props.children);\n};\n/**\n * A {@link React.Context} that stores a {@link StatefulCallClient}.\n *\n * Calling components from this package must be wrapped with a {@link CallClientProvider}.\n *\n * @public\n */\nexport const CallClientProvider = (props) => React.createElement(CallClientProviderBase, Object.assign({}, props));\n/**\n * Hook to obtain {@link StatefulCallClient} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useCallClient = () => {\n const context = useContext(CallClientContext);\n if (context === undefined) {\n throw new Error('CallClient Context is undefined');\n }\n return context.callClient;\n};\n/**\n * Hook to obtain {@link StatefulDeviceManager} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useDeviceManager = () => {\n var _a;\n return (_a = useContext(CallClientContext)) === null || _a === void 0 ? void 0 : _a.deviceManager;\n};\n//# sourceMappingURL=CallClientProvider.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { useContext, createContext } from 'react';\nimport { _isACSCall } from \"../../../calling-stateful-client/src\";\n/**\n * @private\n */\nexport const CallContext = createContext(undefined);\n/**\n * @private\n */\nconst CallProviderBase = (props) => {\n const { children, call } = props;\n const initialState = {\n call\n };\n return React.createElement(CallContext.Provider, { value: initialState }, children);\n};\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#Call}.\n *\n * Calling components from this package must be wrapped with a {@link CallProvider}.\n *\n * @public\n */\nexport const CallProvider = (props) => React.createElement(CallProviderBase, Object.assign({}, props));\n/**\n * Hook to obtain {@link @azure/communication-calling#Call} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a Call object to use this hook\n *\n * @public\n */\nexport const useCall = () => {\n var _a;\n const call = (_a = useContext(CallContext)) === null || _a === void 0 ? void 0 : _a.call;\n if (call && !_isACSCall(call)) {\n throw new Error('Incorrect call type: Must provide a Regular Call object.');\n }\n return call;\n};\n//# sourceMappingURL=CallProvider.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @private\n */\nexport const checkIsSpeaking = (participant) => participant.isSpeaking && !participant.isMuted;\n//# sourceMappingURL=SelectorUtils.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { isCommunicationUserIdentifier, isMicrosoftTeamsUserIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from \"../../../acs-ui-common/src\";\n/**\n * Check if the call state represents being in the call\n *\n * @internal\n */\nexport const _isInCall = (callStatus) => !!callStatus && !['None', 'Disconnected', 'Connecting', 'Ringing', 'EarlyMedia', 'Disconnecting'].includes(callStatus);\n/**\n * Check if the call state represents being in the lobby or waiting to be admitted.\n *\n * @internal\n */\nexport const _isInLobbyOrConnecting = (callStatus) => !!callStatus && ['Connecting', 'Ringing', 'InLobby', 'EarlyMedia'].includes(callStatus);\n/**\n * Check if the device manager local video is on when not part of a call\n * i.e. do unparented views exist.\n *\n * @internal\n */\nexport const _isPreviewOn = (deviceManager) => {\n // TODO: we should take in a LocalVideoStream that developer wants to use as their 'Preview' view. We should also\n // handle cases where 'Preview' view is in progress and not necessary completed.\n return deviceManager.unparentedViews.length > 0 && deviceManager.unparentedViews[0].view !== undefined;\n};\n/**\n * Dispose of all preview views\n * We assume all unparented views are local preview views.\n *\n * @private\n */\nexport const disposeAllLocalPreviewViews = (callClient) => __awaiter(void 0, void 0, void 0, function* () {\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n for (const view of unparentedViews) {\n yield callClient.disposeView(undefined, undefined, view);\n }\n});\n/**\n * Update the users displayNames based on the type of user they are\n *\n * @internal\n */\nexport const _updateUserDisplayNames = (participants) => {\n if (participants) {\n return memoizedUpdateDisplayName(memoizedFn => {\n return Object.values(participants).map(p => {\n const pid = toFlatCommunicationIdentifier(p.identifier);\n return memoizedFn(pid, p);\n });\n });\n }\n else {\n return [];\n }\n};\nconst memoizedUpdateDisplayName = memoizeFnAll((participantId, participant) => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return Object.assign(Object.assign({}, participant), { displayName: participant.identifier.phoneNumber });\n }\n else {\n return participant;\n }\n});\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for Teams call\n */\nexport const isTeamsCallParticipants = (participants) => {\n return participants.every(p => !isCommunicationUserIdentifier(p));\n};\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for ACS call\n */\nexport const isACSCallParticipants = (participants) => {\n return participants.every(p => !isMicrosoftTeamsUserIdentifier(p));\n};\n/**\n * @private\n * Checks whether the user is a 'Ringing' PSTN user.\n */\nexport const _isRingingPSTNParticipant = (participant) => {\n return isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting' ? 'Ringing' : participant.state;\n};\n/**\n * @private\n * Changes the display name of the participant based on the local and remote user's role.\n */\nexport const maskDisplayNameWithRole = (displayName, localUserRole, participantRole, isHideAttendeeNamesEnabled) => {\n let maskedDisplayName = displayName;\n if (isHideAttendeeNamesEnabled && participantRole && participantRole === 'Attendee') {\n if (localUserRole && localUserRole === 'Attendee') {\n maskedDisplayName = '{AttendeeRole}';\n }\n if (localUserRole && (localUserRole === 'Presenter' || localUserRole === 'Co-organizer' || localUserRole === 'Organizer')) {\n maskedDisplayName = `{AttendeeRole}(${displayName})`;\n }\n }\n return maskedDisplayName;\n};\n//# sourceMappingURL=callUtils.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from \"../../../acs-ui-common/src\";\nimport memoizeOne from 'memoize-one';\nimport { _isRingingPSTNParticipant } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers) => {\n var _a;\n return (_a = dominantSpeakers === null || dominantSpeakers === void 0 ? void 0 : dominantSpeakers.speakersList) === null || _a === void 0 ? void 0 : _a.map(toFlatCommunicationIdentifier);\n};\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo = (remoteParticipants, isHideAttendeeNamesEnabled, localUserRole) => {\n if (!remoteParticipants) {\n return [];\n }\n return memoizedAllConvertRemoteParticipant(memoizedFn => {\n return Object.values(remoteParticipants)\n /**\n * hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.\n * phone users will be in the connecting state until they are connected to the call.\n */ .filter((participant) => {\n return !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) || isPhoneNumberIdentifier(participant.identifier);\n }).map((participant) => {\n const state = _isRingingPSTNParticipant(participant);\n let displayName = participant.displayName;\n return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName, /* @conditional-compile-remove(raise-hand) */ participant.raisedHand);\n });\n });\n};\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand) => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand);\n});\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand) => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream = undefined;\n let screenShareStream = undefined;\n const sdkRemoteVideoStream = Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'Video' && i.isAvailable) || Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'Video');\n const sdkScreenShareStream = Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) || Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'ScreenSharing');\n if (sdkRemoteVideoStream) {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(sdkRemoteVideoStream);\n }\n if (sdkScreenShareStream) {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(sdkScreenShareStream);\n }\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n /* @conditional-compile-remove(raise-hand) */\n raisedHand: raisedHand\n };\n};\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream) => {\n var _a, _b, _c;\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n isMirrored: (_a = stream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,\n renderElement: (_b = stream.view) === null || _b === void 0 ? void 0 : _b.target,\n /* @conditional-compile-remove(pinned-participants) */\n scalingMode: (_c = stream.view) === null || _c === void 0 ? void 0 : _c.scalingMode,\n /* @conditional-compile-remove(pinned-participants) */\n streamSize: stream.streamSize\n };\n};\n/** @private */\nexport const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(raise-hand) */ raisedHand) => {\n var _a, _b;\n return ({\n userId: identifier,\n displayName: displayName !== null && displayName !== void 0 ? displayName : '',\n isMuted: isMuted,\n isScreenSharingOn: isScreenSharingOn,\n videoStream: {\n isAvailable: !!localVideoStream,\n isMirrored: (_a = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,\n renderElement: (_b = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _b === void 0 ? void 0 : _b.target\n },\n /* @conditional-compile-remove(raise-hand) */\n raisedHand: raisedHand\n });\n});\n//# sourceMappingURL=videoGalleryUtils.js.map"],"names":["_convertRemToPx","rem","parseFloat","getComputedStyle","document","documentElement","fontSize","_convertPxToRem","px","_preventDismissOnEvent","ev","type","_pxToRem","toFlatCommunicationIdentifier","identifier","fromFlatCommunicationIdentifier","id","rawId","indexOf","_toCommunicationIdentifier","_isValidIdentifier","_formatString","str","vars","replace","_","k","_logEvent","logger","event","level","memoizeFnAll","fnToMemoize","shouldCacheUpdate","Object","is","cache","Map","nextCache","callback","retValue","key","args","value","get","preArgs","ret","args2","objCmp","args1","length","every","arg1","index","set","_safeJSONStringify","replacer","createSafeReplacer","space","JSON","stringify","e","console","error","visited","Set","has","add","_getApplicationId","version","alphaIndex","search","substring","sanitize","module","exports","getDeviceManager","state","deviceManager","getRole","props","getCapabilites","_a","_b","calls","callId","capabilitiesFeature","capabilities","getCallExists","getDominantSpeakers","dominantSpeakers","getRemoteParticipants","remoteParticipants","getLocalParticipantRaisedHand","raiseHand","localParticipantRaisedHand","getIsScreenSharingOn","isScreenSharingOn","getIsMuted","isMuted","getOptimalVideoCount","optimalVideoCount","maxRemoteVideoStreams","getLocalVideoStreams","localVideoStreams","getScreenShareRemoteParticipant","screenShareRemoteParticipant","getDisplayName","callAgent","displayName","getIdentifier","userId","getLatestErrors","latestErrors","getDiagnostics","diagnostics","getCallState","getEnvironmentInfo","getParticipantCount","getCaptions","captionsFeature","captions","getCaptionsStatus","isCaptionsFeatureActive","getStartCaptionsInProgress","startCaptionsInProgress","getCurrentCaptionLanguage","currentCaptionLanguage","getCurrentSpokenLanguage","currentSpokenLanguage","getSupportedCaptionLanguages","supportedCaptionLanguages","getSupportedSpokenLanguages","supportedSpokenLanguages","_startCaptionsButtonSelector","checked","_captionSettingsSelector","_captionsBannerSelector","captionsToRender","filter","resultType","firstPartialCaptions","sort","captionsComparator","push","captionsInfo","map","c","getCaptionsSpeakerIdentifier","timestamp","getTime","speaker","captionText","isCaptionsOn","captionsA","captionsB","localeCompare","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","result","done","then","apply","areStreamsEqual","prevStream","newStream","source","createDefaultCommonCallingHandlers","callClient","call","options","onStartLocalVideo","videoDeviceInfo","getState","selectedCamera","cameras","getCameras","undefined","selectCamera","stream","LocalVideoStream","find","s","startVideo","onStartScreenShare","startScreenSharing","onStopScreenShare","stopScreenSharing","onDisposeLocalStreamView","callState","localStream","item","mediaStreamType","disposeView","notImplemented","Error","onHangUp","forEveryone","hangUp","onSelectCamera","device","switchSource","createView","onSelectMicrophone","selectMicrophone","onSelectSpeaker","selectSpeaker","onToggleCamera","previewOn","stopVideo","onStopLocalVideo","onToggleMicrophone","unmute","mute","onToggleScreenShare","onCreateLocalStreamView","scalingMode","isMirrored","_c","view","onCreateRemoteStreamView","participant","values","videoStreams","remoteVideoStream","i","isAvailable","screenShareStream","createViewResult","onDisposeRemoteStreamView","onDisposeRemoteScreenShareStreamView","onDisposeRemoteVideoStreamView","onRaiseHand","feature","Features","onLowerHand","lowerHand","onToggleRaiseHand","raiseHandFeature","localUserId","getRaisedHands","publishedState","onRemoveParticipant","onStartCall","onRemoveVideoBackgroundEffects","getUnparentedVideoStreams","onResolveVideoBackgroundEffectsDependency","stopEffects","onBlurVideoBackground","backgroundBlurConfig","_d","createEffect","createBackgroundBlurEffect","startEffects","onReplaceVideoBackground","backgroundReplacementConfig","_e","createBackgroundReplacementEffect","onStartCaptions","startCaptions","onStopCaptions","stopCaptions","onSetCaptionLanguage","language","setCaptionLanguage","onSetSpokenLanguage","setSpokenLanguage","createDefaultCallingHandlers","assign","participants","startCall","removeParticipant","CallAgentContext","createContext","useHandlers","component","useContext","_Component","createDefaultCallingHandlersForComponent","microphoneButtonSelector","callExists","role","permission","deviceAccess","audio","incapable","unmuteMic","isPresent","reason","disabled","microphones","speakers","selectedMicrophone","selectedSpeaker","cameraButtonSelector","localVideoFromCall","video","turnVideoOn","raiseHandButtonSelector","raisedHand","screenShareButtonSelector","shareScreen","devicesButtonSelector","removeBlankNameDevices","devices","name","videoGallerySelector","screenShareRemoteParticipantId","localVideoStream","dominantSpeakerIds","dominantSpeakersMap","forEach","idx","screenShareParticipant","localParticipant","updateUserDisplayNamesTrampoline","isScreenSharing","isSpeaking","localUserCanRemoveOthers","convertRemoteParticipantToParticipantListParticipant","isRemovable","kind","memoizedConvertAllremoteParticipantsBeta","convertRemoteParticipantToParticipantListParticipantBeta","participantListSelector","partitipantCount","localUserCanRemoveOthersTrampoline","isHideAttendeeNamesEnabled","localUserRole","conversionCallback","memoizeFn","includes","some","videoStream","a","b","nameA","toLowerCase","nameB","convertRemoteParticipantsToParticipantListParticipants","myUserId","participantsButtonSelector","participantListProps","errorBarSelector","ge","environmentInfo","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","_r","_s","activeErrorMessages","isSafari","test","navigator","userAgent","network","latest","networkReceiveQuality","DiagnosticQuality","media","noSpeakerDevicesEnumerated","noMicrophoneDevicesEnumerated","microphonePermissionDenied","microphoneMuteUnexpectedlyDiagnostic","microphoneMuteUnexpectedly","microphoneNotFunctioning","cameraStoppedUnexpectedlyDiagnostic","cameraStoppedUnexpectedly","cameraFreeze","cameraPermissionDenied","screenshareRecordingDisabled","appendActiveErrorIfDefined","message","splice","maxErrorCount","target","activeErrorType","emptySelector","getSelector","RaiseHandButton","findConditionalCompiledSelector","findSelector","VideoGallery","MicrophoneButton","M","CameraButton","ScreenShareButton","DevicesButton","D","ParticipantList","ParticipantsButton","EndCallButton","ErrorBar","useSelector","selector","selectorProps","mounted","useRef","useEffect","current","callIdConfigProps","useMemo","setProps","useState","propRef","onStateChange","newProps","offStateChange","CallClientContext","useDeviceManager","CallContext","checkIsSpeaking","_isInCall","callStatus","_isInLobbyOrConnecting","_isPreviewOn","unparentedViews","disposeAllLocalPreviewViews","isACSCallParticipants","participantId","phoneNumber","p","_isRingingPSTNParticipant","_dominantSpeakersWithFlatId","speakersList","_videoGalleryRemoteParticipantsMemo","memoizedAllConvertRemoteParticipant","memoizedFn","convertRemoteParticipantToVideoGalleryRemoteParticipant","rawVideoStreamsArray","sdkRemoteVideoStream","sdkScreenShareStream","convertRemoteVideoStreamToVideoGalleryStream","renderElement","streamSize","memoizeLocalParticipant"],"sourceRoot":""}