{"version":3,"sources":["constants/action-types.js","state/mainLayout/reducer.js","state/organization/reducer.js","state/userPresence/reducer.js","state/notifications/reducer.js","state/nursePooling/reducer.js","state/index.js","store/configureStore.js","constants/auth-constants.js","constants/global-variables.js","api/roles.js","constants/enums.js","api/users.js","infrastructure/auth.js","providers/authProvider.js","components/Loader.js","components/Grid.js","components/auth/callback.js","views/UserError.js","state/mainLayout/actions.js","components/LeftNavigation.js","infrastructure/helpers/commonHelpers.js","components/Common/Layout.js","components/Alert.js","components/Avatar.js","components/Badge.js","components/Breadcrumb.js","components/Button.js","components/CallButton.js","components/CallCorrelationInfo.js","components/CallEndReason.js","components/Checkbox.js","components/DescriptionBox.js","components/Dropdown.js","components/Form.js","components/HelloFeatureBlock.js","components/Input.js","components/ListGroup.js","components/Modal.js","components/Select.js","components/Call/ConnectionStatus.js","components/Call/ActiveConference.js","components/Call/AnotherNursePickedUp.js","components/SkeletonLoader.js","components/SmallModal.js","components/StreamPermissions.js","components/Table.js","components/Tabs.js","components/Tilt.js","components/Toggle.js","components/TopParticipant.js","components/Participant.js","io-client/SocketContext.js","components/TreeView.js","constants/socket-events.js","components/AudioOutputs.js","components/TvControls.js","api/healthSystems.js","api/organization.js","state/organization/actions.js","api/notifications.js","state/userPresence/actions.js","api/userPresence.js","state/notifications/actions.js","infrastructure/helpers/dateHelper.js","infrastructure/helpers/notificationsChannel.js","api/nursePooling.js","containers/PoolingFlow/style.js","containers/PoolingFlow/index.js","components/EditPoolingModal.js","api/user.js","components/UserSettings/UserSettingsModal.js","components/Common/Header.js","views/PoolingFlowWrapper.js","routes/privateRoute.js","components/Common/EditHealthSystemModal.js","components/Common/SectorList.js","components/Common/AssignDeviceModal.js","views/Organization/Partials/CallPatient.js","components/Common/EditSectorModal.js","api/devices.js","components/Common/CsvExport.js","components/RebootLogExport.js","components/Common/CheckBox.js","components/NursePooling/DeviceSelection.js","components/Common/VoiceCommandCallingModal.js","components/PullDeviceLogs.js","views/Organization/Partials/Hospital.js","views/Organization/Partials/Department.js","views/Organization/Partials/Floor.js","views/Organization/Partials/Room.js","views/UnassignedNurse.js","views/Organization/Organization.js","owt/p2p/Emitter.js","owt/p2p/sc.websocket.js","owt/base/event.js","owt/p2p/error.js","owt/base/utils.js","owt/base/publication.js","owt/base/stream.js","owt/base/logger.js","owt/base/sdputils.js","owt/p2p/peerconnection-channel.js","owt/base/conference.js","owt/p2p/p2pclient.js","owt/base/mediaformat.js","owt/base/mediastream-factory.js","components/CallSounds.js","api/iceServers.js","api/callStats.js","infrastructure/callStats/callStats.js","infrastructure/helpers/appInsightsTelemetry.js","owt/p2p/logger.js","owt/p2p/CallManager.js","components/Monitoring/Notes.js","components/Monitoring/LocalMicButton.js","components/Monitoring/VideoFeed.js","components/Common/CameraControls.js","views/Monitoring.js","api/calllogs.js","components/Common/Pagination.js","components/CallLogs/CallDetails.js","components/CallLogs/List/PastCallsList.js","components/CallLogs/List/OngoingCallsList.js","containers/Dashboard.js","views/CallLogs.js","components/Common/CallDuration.js","components/Common/NightVisionControl.js","components/Common/CallStats.js","containers/PeerStats.js","views/Call.js","views/PatientFeed.js","components/Common/FormElements/Input.js","components/UserManagement/InviteAdmins.js","components/Common/FormElements/MultiSelect.js","components/UserManagement/InviteNurses.js","components/UserManagement/Lists/InvitedUsersList.js","components/UserManagement/AssignDropdown.js","components/Common/FormElements/Select.js","components/UserManagement/Lists/EditUser/ManageHealthSystems.js","components/ProfilePicture.js","components/UserManagement/Lists/EditUser/UserInformation.js","components/UserManagement/Lists/EditUser/SuperUserHealthSystem.js","components/UserManagement/Lists/UsersList.js","components/UserManagement/InviteSuperUsers.js","views/Users.js","views/Login.js","views/CreateHealthSystem.js","views/LogOutUser.js","views/CompleteProfile.js","views/Help.js","views/Recover.js","views/ResetPassword.js","api/userIdleConfigurations.js","components/Configurations/UserIdleForm.js","components/Configurations/UserIdleTimeout.js","api/teamConfigurationProfiles.js","components/Configurations/DeviceConfig.js","api/activeDirectories.js","components/Configurations/ActiveDirectoryForm.js","components/Configurations/ActiveDirectory.js","api/ntpConfig.js","components/Configurations/NetworkConfig.js","views/Configurations.js","views/ConfigurationsHistory.js","routes/jwtAuthenticatedRoute.js","views/TimeError.js","routes/routes.js","components/auth/logout.js","components/auth/logoutCallback.js","components/auth/silentRenew.js","io-client/Socket.js","views/IncomingCall.js","infrastructure/helpers/userIdleChannel.js","containers/UserIdleCheck.js","components/AppInsightsTelemetryProvider.js","components/StreamPermissionsModal.js","App.js","registerServiceWorker.js","index.js"],"names":["OverviewActionTypes","UserPresenceActionTypes","NotificationsCounterActionTypes","NursePoolingActionTypes","initialState","userInfo","isLefNavigationExpanded","breadcrumb","allHealthSystems","currentHospitalId","currentHealthSystemId","currentHealthSystemName","currentRegionId","treeData","tree","preSelected","activeMonitoringFeeds","currentHelloDevice","currentSectorLocation","showAssignDeviceModalData","show","deviceId","assignCompleted","streamPermission","organization","state","action","type","payload","healthSystems","currentHealthSystem","push","icon","isNewOption","subOptions","newTreeData","slice","hospitalTree","presenceStatusTypeId","customMessage","defaultMessage","updatingUserPresence","fetchingUserPresence","notificationsCounter","fetchingNotificationCounter","combineReducers","mainLayout","userPresence","data","notifications","nursePooling","middleware","thunk","logger","promise","IDENTITY_CONFIG","authority","window","__env__","REACT_APP_IDSRV_URL","client_id","REACT_APP_IDSRV_CLIENT_ID","redirect_uri","REACT_APP_IDSRV_REDIRECT_URL","login","silent_redirect_uri","REACT_APP_SILENT_REDIRECT_URL","post_logout_redirect_uri","REACT_APP_LOGOUT_URL","public_uri","REACT_APP_PUBLIC_URL","client_secret","REACT_APP_IDSRV_CLIENT_SECRET","METADATA_OIDC","issuer","jwks_uri","authorization_endpoint","token_endpoint","userinfo_endpoint","end_session_endpoint","check_session_iframe","revocation_endpoint","introspection_endpoint","APP_CONFIG","URL","gatewayApiBasePath","REACT_APP_GATEWAY_API_BASE_URL","legacyApiBasePath","REACT_APP_LEGACY_API_BASE_URL","localApiBasePath","companyId","REACT_APP_BANYAN_COMP_ID","profilePicBaseUrl","REACT_APP_PROFILE_PIC_BASE_URL","buildNumber","REACT_APP_BUILD_NUMBER","releaseName","REACT_APP_RELEASE_NAME","useCallStats","REACT_APP_USE_CALLSTATS","sendCallStatsOnMonitoring","REACT_APP_SEND_CALLSTATS_ON_MONITORING","sendCallStatsInterval","REACT_APP_SEND_CALLSTATS_INTERVAL","versionCheckInterval","REACT_APP_VERSION_CHECK_INTERVAL","deviceAppId","REACT_APP_DEVICE_APP_ID","aiInstrumentationKey","REACT_APP_APPINSIGHTS_INSTRUMENTATIONKEY","sendCallClientLogs","REACT_APP_SEND_CALL_CLIENT_LOGS","isDevelopment","opts","baseURL","timeout","transformRequest","headers","accessToken","localStorage","getItem","JSON","stringify","legacyOpts","Object","assign","localOpts","successHandler","response","Promise","resolve","reject","errorHandler","error","a","status","signinSilent","passwordRegEx","gatewayApi","axios","create","legacyApi","localApi","interceptors","use","getRoles","userId","res","rej","url","get","then","roles","catch","e","updateRole","memberId","put","GeneralErrorCodes","OrganizationErrorCodes","CallTypes","AUDIO","VIDEO","SCREENSHARE","SECURITYCAM","LIVEBROADCAST","MONITORING","BanyanCallTypesMessage","ObjectType","MediaTypes","MediaPermissions","MediaInputs","CallStatus","message","InviteStatuses","InviteTypes","SectorTypes","PresenceStatusType","PresenceStatusTypeLabels","1","2","UserTypes","UserRoles","ADMIN","NURSE","VIRTUALSITTER","SUPERUSER","ZoomDirection","CameraTiltDirection","UP","DOWN","RIGHT","LEFT","CameraTiltAction","DeviceStatus","DeviceListLevel","HEALTHSYSTEM","REGION","HOSPITAL","DEPARTMENT","FLOOR","ROOM","ORGANIZATION","SerialTVCommands","INITIAL_TV_POWER","POWER","POWER_ON","POWER_OFF","HDMI","SWITCH_HDMI1","SWITCH_HDMI2","SWITCH_HDMI3","ParticipantState","CONNECTING","CONNECTED","BUSY","DECLINED","OFFLINE","LEFT_CALL","NOT_ANSWERING","CANT_CONNECT","DISRUPTED","RECONNECTING","DISCONNECTED","REMOVED","FAILED_TO_GET_INFO","INVITE_DENIED","ParticipantRemoveReason","UNDEFINED","PARTICIPANT_LEAVE","PARTICIPANT_FORCED_LEAVE","CLEAR_PARTICIPANT_OLD_CONFERENCES","PARTICIPANT_CLEANUP","PASSWORD_CHANGED","IDLE","CONFERENCE_TERMINATED_BY_ADMINISTRATOR","DISCONNECTED_PARTICIPANT_CLEANUP","SOMEONE_ELSE_ANSWERED","HIGHER_PRIORITY_CALL","ConferenceEndReason","PARTICIPANT_OFFLINE","PARTICIPANT_BUSY","INITIATOR_LEFT","PARTICIPANT_NOT_ANSWERING","PARTICIPANT_DECLINED","PARTICIPANT_LEFT","OWNER_LEFT","ABORTED","DROPPED","PARTICIPANT_PASSWORD_CHANGED","PARTICIPANT_IDLE","TERMINATED_BY_ADMINISTRATOR","PARTICIPANT_INVITE_DENIED","PARTICIPANT_INVITE_FAILED","FAILED_TO_GET_INITIATOR_INFO","UNAUTHORIZED","E2EE_FAILED","ANSWERED_ELSEWHERE","TRANSFERRED_TO_ANOTHER_CLIENT","HAS_ACTIVE_CONFERENCE","INITIATOR_BUSY","CLEANUP","StartConferenceFailureReason","InviteParticipantFailureReason","ChangePasswordUseCases","DeviceStatusMessages","FeedColors","StreamError","SCREEN_SHARE_CANCELED","CANT_ACCESS_MEDIA_STREAM","BROWSER_NOT_SUPPORTED","EXTENSION_NOT_INSTALLED","DEVICE_NOT_FOUND","STREAM_NOT_ALLOWED","PERMISSION_DISMISSED","NOT_READABLE_ERROR","ONLY_SCREEN_FOUND","SCREEN_SHARE_NOT_SUPPORTED","CAMERA_BLOCKED","MICROPHONE_BLOCKED","CAM_AND_MIC_BLOCKED","MICROPHONE_NOT_FOUND","CAMERA_NOT_FOUND","SocketState","DeviceCommands","ConferenceErrorType","CameraType","CameraZoomLevels","CameraEventTypes","RTCPeerConnectionEnum","NEW","FAILED","CLOSED","CHECKING","COMPLETED","JoinConferenceFailureReasonEnum","ToggleFailureReasonEnum","TeamTypes","TerminateRequestFailureReasonEnum","UNHANDLED_EXCEPTION","NULL_CONFERENCE","TERMINATE_IN_PROGRESS","NULL_TERMINATE_REQUEST","NULL_CONNECTED_USER_PARTICIPANT","NO_PERMISSION","TerminateRequestFailureReasonMessages","ClientTypes","Roles","id","value","VIRTUALCAREPROVIDER","AudioOutputDevice","ConfigHistoryTypes","TVs","TelehealthTv","label","StreamTypes","AndroidVersions","codeName","versionNum","apiLevel","NursePoolingOptions","NO_ANSWER","YES","NO","DeviceSettings","TeamConfigurationIntegrationType","KeyCodes","PERIOD","NUMPAD_PERIOD","MINUS","NUMPAD_SUBTRACT","NUMPAD_ADD","PLUS","LETTER_E","NUMPAD_MINUS","LETTER_A","LETTER_Z","ENTER","SPACE","BACK_SPACE","LEFT_ARROW","UP_ARROW","RIGHT_ARROW","DOWN_ARROW","TvBrands","TvControlsEnums","getHealthSystems","getOrgTeamChildren","teamId","children","getHealthSystemSubTree","healthSystemId","regions","forEach","region","regionIndex","name","hospitals","hospital","hospitalIndex","regionId","departments","department","departmentIndex","hospitalId","floors","floor","floorIndex","departmentId","rooms","room","roomIndex","floorId","helloDeviceId","Number","getMembers","pageSize","pageIndex","searchValue","params","getHealthSystemMembers","getInvitedMembers","getHealthSystemInvitedUsers","registerUser","values","inviteId","post","Type","OrganizationInviteData","CompanyId","InviteId","ClientType","LogInData","SignInEmail","email","SignInPassword","password","SignUpModel","FirstName","firstName","LastName","lastName","Email","Password","createInvite","emails","inviteTypeId","users","InviteTypeId","InviteInfo","Users","createNurseInvite","channels","hs","Id","Name","Channels","assignMember","companyUserId","CompanyUserId","deleteMember","delete","getInvite","checkUserAccount","result","checkIfCompanyMemberExists","exists","acceptInvite","getNurseHealthSystems","updateNurse","guidUserId","roleId","CompanyName","JobTitle","jobTitle","WorkExperienceId","NurseUserGuid","getNurseProfileInfo","Result","sendRecoveryEmail","recoveryInviteId","r","sendPasswordRecoveredEmail","code","Code","OrganizationId","getHealthSystemSubTreeBasic","getNursesList","search","Log","setLogger","console","setLevel","DEBUG","userManager","UserManager","userStore","WebStorageStateStore","store","metadata","setUser","userRole","memberExistsInCompany","userRoleId","setItem","sub","setTokens","authResult","idToken","setCurrentHealthSystem","length","currentHealthSystemInfo","navigateToApp","redirectUri","location","replace","fetchUserProfile","err","swapToken","token","Logger","info","checkMember","signinRedirectCallback","log","includes","href","logout","signoutRedirect","id_token_hint","clearStaleState","signoutRedirectCallback","removeItem","parseJwt","base64","split","parse","atob","isAuthenticated","memberExists","signinRedirect","isJWTRoute","localAzJwt","hash","pathname","jwt","substring","args","claims","preferred_username","login_hint","acr_values","isAzureAuthentication","userToken","endsWith","signinSilentCallback","createSigninRequest","getAccessToken","Error","getUserId","getUserProfile","setUserProfile","newProfile","getUserRole","getUserRoleId","setUserInfo","userProfile","role","scope","response_type","user","events","addUserLoaded","access_token","id_token","indexOf","addSilentRenewError","addAccessTokenExpired","addAccessTokenExpiring","AuthContext","React","createContext","isAzureJWT","AuthConsumer","Consumer","AuthProvider","props","authService","Provider","this","Component","Loader","className","Grid","style","display","gridTemplateRows","rows","width","gridTemplateColumns","columns","gridGap","justifyItems","horizAlign","alignItems","vertAlign","height","stretch","backgroundColor","Callback","textAlign","signOut","UserError","src","alt","onClick","actionCreators","toggleLeftNavigation","dispatch","getState","addNewUserRole","updateUserRole","LeftNavigation","classNames","expanded","data-cy","links","map","item","index","key","NavLink","to","linkTo","exact","activeClassName","event","onItemClicked","title","getCurrentHealthSystemInfo","askForPermission","permissionFor","navigator","mediaDevices","getUserMedia","permission","checkForPermission","permissions","query","checkIfMediaDevicesPlugged","enumerateDevices","devices","pluggedDevices","microphone","camera","device","kind","getHierarchyFromBreadcrumb","hierarchy","findSectorById","arr","reduce","accumulator","roomId","findDeviceById","getHierarchyByHelloDeviceId","searchSectors","sectors","splice","toLowerCase","hidden","matchesSearch","decodeHtml","txt","Entities","require","AllHtmlEntities","decode","mapSectionsToRender","sector","toggleEditSectorModal","initDeleteOrg","selectedSector","sectorType","edit","sectorName","level","getParentSector","element","parent","isValidSector","currentSector","sameLevelSectors","filter","s","undefined","entries","some","buildTreeModel","assignMode","isMonitoring","baseurl","firstHospitalId","link","tooltip","treeLocation","hasDevice","isOnline","deviceBusy","callState","getLevelRoomsWithDevices","option","getNursePoolingStatus","sortByRoomName","array","collator","Intl","Collator","numeric","sensitivity","sort","b","compare","roomName","getPort","parts","port","parseInt","isNaN","handleOnKeyDownNumeric","allowPeriod","which","preventDefault","Layout","onLeftNavigationItemClicked","leftNavigationItems","isPoolingPage","Boolean","getLeftNavigationItems","isSecondColumnCollapsed","twoColumns","connect","bindActionCreators","Alert","alertSelector","variant","position","fixed","persist","hideCloseButton","onClose","defaultProps","Avatar","initialsColor","letter","obj","color","trim","getInitialsColor","fullName","condition","data-test-id","size","fullNameSplit","getInitialsFromFullName","toUpperCase","Badge","text","withRouter","onBreadcrumbClick","Link","buttonTypes","Button","isLoading","isDisabled","justifySelf","background","borderColor","borderRadius","marginRight","CallButton","setWrapperRef","node","wrapperRef","handleClickOutside","contains","target","isDropdownOpen","toggleDropdown","setState","isCallButtonClicked","setTimeout","document","addEventListener","removeEventListener","ref","isActive","data-tooltip","data-position","tooltipPosition","buttonSelector","iconColor","CallCorrelationInfo","copied","copyToClipboard","textArea","createElement","correlationId","body","appendChild","select","execCommand","remove","correlationIdRef","createRef","CallEndReason","reason","onPatientBusyNurse","Checkbox","checked","DescriptionBox","description","Dropdown","onDropdownItemsClick","closeDropdownOnItemClick","getDropdownItems","dropdownChildrenRef","isDropdownTitleVisible","dropdownInnerTitle","bind","dropdownRef","isPortal","current","dropdownRefProperties","getBoundingClientRect","reverse","imageUrl","ReactDOM","createPortal","zIndex","right","innerWidth","top","innerHeight","bottom","getElementById","Form","onSubmit","HelloFeatureBlock","Input","marginBottom","bottomSpace","onChange","onKeyUp","placeholder","readOnly","readonly","minLength","validationOptions","maxLength","required","pattern","disabled","autocomplete","autoComplete","ListGroups","onScroll","onScrollClick","lists","component","onItemClick","onListClick","subLists","ListGroup","Modal","handleKeyPress","onModalClose","handleOutsideClick","modalClass","modalReference","classList","closest","modalSelector","hideActionButtons","evt","closeButtonText","submitButtonText","onModalSubmit","isSubmitDisabled","Select","onSelect","items","selectedIndex","defaultValue","ConnectionStatus","peerConnectionState","ActiveConference","AnotherNursePickedUp","SkeletonLoader","padding","Array","SmallModal","StreamPermissions","platform","Table","isEditable","header","row","keys","tableEmptyText","Tabs","setActiveComponent","componentIndex","active","onTabClick","onTabChange","findIndex","tab","components","Tilt","isMouseDown","sendTiltEvent","direction","cameraType","disabledDirections","previousTiltAction","tiltHandler","onMouseDown","onMouseUp","onMouseOut","zoomUpperLimit","onBlur","onHuddleCamReboot","cameraZoomLevel","updateZoomLevel","Toggle","toggledOn","onToggle","toggleOnText","toggleOffText","TopParticipant","videoRef","videoSrcObjectHandler","prevProps","topParticipantFeed","srcObject","mediaStream","isTopParticipantVideoActive","video","autoPlay","muted","Participant","videoCamActive","participantFeed","participantAvatar","avatarName","SocketContext","subtype","OptionName","useState","tooltipStyle","setTooltipStyle","roomStatusRef","useRef","toggleTooltip","roomStatusEl","left","onMouseEnter","onMouseLeave","getDeviceBeingUsedMessage","OptionsList","options","expandedOptions","onAdd","onLinkClick","onAddDevice","selectedSectorId","setSelectedId","expandAll","onSendCheckDeviceActiveConferences","findProperId","prefix","childrenHidden","every","childrenMatchSearch","toggleExpand","selectedOptionId","isAddingSection","i","toggleOptions","handleSubOptionsListChange","optionId","subSelections","selectOption","isSelected","checkDeviceActiveConferences","activeConferences","conference","callType","isInvitedByHost","addSectorTooltip","selection","addNewOptionOnEnter","autoFocus","onMouseOver","onFocus","isCreatingSector","customActionIcon","TreeView","sectorId","contextType","SocketEvents","Client","AUTHORIZE","UPDATE_USER_PRESENCE","PING","ON_USER_ONLINE","ON_USER_OFFLINE","ON_AUTHENTICATED","ON_UNAUTHORIZED","ON_CONNECT","ON_CONNECT_FAILED","ON_RECONNECT","ON_RECONNECTING","ON_DISCONNECT","ON_DEVICE_ONLINE","ON_DEVICE_OFFLINE","ON_UPDATED_USER_PRESENCE","ON_NOTIFY_UPDATED_USER_PRESENCE","Conference","START","JOIN","LEAVE","END","TOGGLE_STREAMS","AUDIO_TRACK_TOGGLED","ERROR","SEND_OFFER","SEND_ANSWER","SEND_ICE_CANDIDATE","CLOSING_CLIENT","DECLINE","SDP","TRACK_TOGGLE","TRACKS_ADDED","TRACKS_REMOVED","UA","DATA_RECEIVED","HELLODEVICE_LEAVE","INVITE_PARTICIPANTS","REMOVE_PARTICIPANT","PARTICIPANT_RECONNECT","PARTICIAPNT_CHANGE_BITRATE","PEER_CONNECTION_STATE_CHANGED","ICE_GATHERING_STATE_CHANGED","ICE_CONNECTION_STATE_CHANGED","LOG","TERMINATE_REQUEST","TERMINATE_REQUEST_ACCEPT","TERMINATE_REQUEST_CANCEL","FORCE_TERIMATE","PARTICIPANT_FORCE_TERMINATE","ALERT_PATIENT_AT_RISK","ALERT_PATIENT_AT_RISK_RESPONSE","ON_PARTICIPANT_NOT_ANSWERING","ON_PARTICIPANT_DECLINED","ON_PARTICIPANT_LEFT","ON_PARTICIPANT_STREAMS_TOGGLED","ON_NEW_ANSWER","ON_NEW_OFFER","ON_NEW_ICE_CANDIDATE","ON_NEW_PARTICIPANT","ON_REMOVE_SCREENSHARE_PEER","ON_RINGING","ON_INCOMING","ON_PARTICIPANT_OFFLINE","ON_PARTICIPANT_BUSY","ON_INITIATOR_LEFT","ON_UPDATE_PARTICIPANTS","ON_MISSED_CALL","ON_DEVICE_CONTROLS_LOCKED","ON_ENDED","ON_ANSWERED_ELSEWHERE","ON_PARTICIPANT_REMOVED","ON_TRANSFERRED_TO_ANOTHER_CLIENT","ON_TERMINATE_REQUEST","ON_TERMINATE_REQUEST_ACCEPTED","HelloDevice","MOVE_CAMERA","ZOOM_CAMERA","SWITCH_CAMERA","COMMAND","DATA_CHANNEL_OFFER","DATA_CHANNEL_ANSWER","NEW_ICE_CANDIDATE","STOP_PEER_CONNECTION","TOGGLE_NIGHTVISION","CHECK_DEVICE_IN_CONFERENCE","ON_CALL_STATE_CHANGED","ON_TOGGLE_TV","ON_OFFLINE","ON_BUSY","ON_CAMERA_RESPONSE","ON_INITIAL_STATE","ON_UPDATE","ON_TV_RESPONSE","ON_AUDIO_OUTPUT_DEVICE","User","NOTIFICATIONS_UPDATED","ON_PASSWORD_CHANGED","AudioOutputs","socket","changeAudioOutput","participantId","conferenceId","dynamicData","audioOutputDevice","emit","command","audioOutputDeviceButtons","callButtonIcon","selectedAudioOutputDevice","TvControls","context","serialCommandsTv","commandType","volumeRange","tvPowerStatus","powerTv","callManager","volumeTimeout","clearTimeout","changeVolume","increaseVolume","onHdmiTypeChanged","hdmiType","tvCommandsResponseListener","isSuccessful","tvState","isVolume","tvStatus","prevVolumeRange","powerToolTip","hdmiTypeIcon","hdmiTypeButtons","find","hdmiIcon","prevVolInitPower","tvBrand","callManagerInstance","hdmiStatus","volumeStatus","min","max","stopPropagation","createHealthSystem","healthSystemName","healthSystemRegions","editHealthSystemName","newHealthSystemName","editRegionName","newRegionName","createNewRegion","deleteOrgUnit","reAssignDevice","getTreeData","healthSystem","uploadLogo","fileInput","x","y","formData","FormData","append","toFixed","method","Authorization","saveLogo","getLogoUrl","picture","getHopsitalDepartments","setRoomDetails","getRoomDetails","getRoomLocation","updateRoomLocation","deleteRoomLocation","getHealthSystemHospitals","toggleSwitchHealthSystemModal","toggleAssignDeviceModal","setStreamPermissionMessage","addNewRoom","createNewHospital","setCurrentSectorLocation","updateBreadcrumb","setCurrentHealthSystemInfo","setTreeData","setActiveMonitoringFeeds","setCurrentHospitalId","getAllHealthSystems","currentHs","createHospital","createDepartment","createFloor","createRoom","getHospitalTree","getUserNotifications","appType","pageNo","changeNotificationReadStatus","unreadNotifications","patch","fetchUserPresenceSucceeded","fetchUserPresence","presence","getUserPresence","userPresenceUpdateSucceeded","updateUserPresence","putUserPresence","fetchNotificationCounter","total","notificationCounter","formatDate","dateObj","month","getMonth","day","getDate","year","getFullYear","join","utcToLocalTime","date","stillUtc","moment","utc","toDate","getDateDifference","start","end","startDate","startOf","endDate","duration","diff","asDays","secondsToHHMMSS","seconds","Math","padStart","channel","BroadcastChannel","deleteMemberCallAvailability","addOrUpdateMemberCallAvailability","teams","getNurseHealthSystemAvailabilities","Wrapper","styled","div","HealthSystemsListItem","TreeViewListWrapper","processTreeData","getNode","mapChildren","nodes","PoolingFlow","page","setPage","nursePoolingStatus","setNursePoolingStatus","setHealthSystems","selectedHealthSystem","setSelectedHealthSystem","setNodes","filteredText","setFilteredText","nodesFiltered","setFilteredNodes","setChecked","setExpanded","setIsLoading","initialValues","setInitialValues","alertErrorText","setAlertErrorText","useSelector","answerExists","useDispatch","_socket","useContext","useEffect","mapped","isChecked","isEdit","changePage","fetchData","nurseAvailabilities","resetData","getTree","hsList","acc","checkedTeamIds","prevState","prevHs","initialValue","val","teamIds","filterNodes","filtered","toLocaleLowerCase","setNoReceiveCalls","setCheckedBasedOnHs","itemIds","prevChecked","checkedItem","prev","flatMapArray","flat","isAvailable","submit","flattedNewParams","elem","checkedHealthSystems","foundHealthSystemIndex","toString","hsItem","setHealthSystemsList","onCheck","onExpand","ModalWrapper","EditPoolingModal","toggleEditPoolingModal","changePassword","UserSettingsModal","componentDidMount","locations","getUserLocations","virtualRoleKey","virtualRoles","profilePicUrl","profilePicture","virtualRole","userWorkExperienceId","jobId","saveAccountSettings","selectedTab","TABS","EDIT_PROFILE","editProfile","CHANGE_PASSWORD","companyName","COMPANY_INFO","NAME","fromDate","STARTED","jobDescription","isCurrent","showCompanyOnPage","userHasRole","mainLayoutActions","idUserCompanyId","entityData","IdUserCompanies","toggleAccountSettingsModal","changeVirtualRole","validatePassword","currentPassword","newPassword","newConfirmedPassword","test","resetPasswordFields","passwordData","setPasswordErrorMessage","toggleConfirmPasswordDialog","savePasswordChanges","oldpassword","newpassword","HasSucceed","passwordInfo","passwordAlertVariant","isConfirmPasswordChangeModalOpen","msg","setInputValue","history","isAccountSettingsModalOpen","userProfileLoading","flexDirection","onCloseAlert","Header","precautions","userPresenceDropdownRef","breadcrumbIndex","organizationActions","loadUserNotifications","isPreview","postMessage","hasMoreNotifications","notificationsPageNo","formatTime","localDate","now","Date","setHours","isAfter","format","notificationsPageSize","timeAgo","dateCreated","n","el","callerName","checkIfScrolledAtBottom","ceil","scrollTop","scrollHeight","offsetHeight","onAvailabilityDropdownClick","available","isSwitchPresenceModalVisible","onUserDropdownClick","onCustomMessageChanged","onCustomMessageKeyUp","isEditPoolingModalOpen","isVCPRoleModalOpen","organizationActionCreators","mainLayoutActionCreators","PoolingFlowWrapper","PrivateRoute","rest","Route","render","canAccessRoute","match","EditHealthSystemModal","editHealthSystemActions","healthSystemActionsEnum","EDIT_HEALTH_SYSTEM","EDIT_REGION_NAME","CREATE_NEW_REGION","DELETE_HEALTH_SYSTEM","DELETE_REGION","setHealthSystemInputValue","hasPressedEnter","saveHealthSystemName","checkIfHealthSystemExists","healthSystemNameError","onHealthSystemNameChange","toggleAlert","setRegionInputValue","keyPressed","inputVal","currentRegions","regionError","regionExist","saveRegionName","regionName","isNewRegion","removeRegion","currentRegion","addNewRegion","getTime","deleteSelected","isRegionSelected","selectedRegionId","isCurrentRegion","moveToAnotherRegion","onHealthSystemDelete","toggleConfirmDeleteModal","newHealthSystemInfo","onCurrentRegionDelete","isConfirmDeleteRegionModalOpen","activeElement","HTMLElement","blur","showSuccessAlert","showErrorAlert","healthSystemData","isOpen","isEditSystemModalLoading","SectorList","hasHospitals","getSelectedSectorFromUrl","getSelectedSectorId","updateHealthSystemList","componentDidUpdate","isSwitchHealthSystemModalOpen","treeItems","getExpandedOptions","treeViewKey","treeObj","transformHealthSystemArr","transformRegionsArr","currentHealthSystemIndex","currentRegionIndex","isSwitchHealthSystemModalLoading","onNewSector","createNewSector","hasNoSectors","healthSystemIndex","firstRegion","toggleEditHealthSystemModal","isEditHealthSystemModalOpen","onTreeViewLinkClick","changeHealthSystem","changeRegion","isSwitchModal","expandAllTreeItems","sectorSearchValue","addFeed","handleHealthSystemOptions","switchHealthSystem","firstHealthSystem","updateHealthSystemName","toggleFeedsLimitModal","showFeedsLimitModal","setSearchValue","sendCheckDeviceActiveConferences","objectId","objectType","_","cloneDeep","healthSystemOptions","AssignDeviceModal","isAddDeviceModalLoading","assignDevice","CallPatient","toggleDeviceUnavailable","isDeviceUnavailableModalOpen","checkIfRoomAvailable","redirect","encodeURIComponent","open","viewPatient","micStatus","audio","talkToPatient","permissionRes","onDevicePermissionChange","camStatus","onchange","helloBlocksMessages","getCurrentRoom","margin","setError","sectorNameError","setSectorNameError","unit","bed","adtRoomLocation","setAdtRoomLocation","adtRoomLocationError","setAdtRoomLocationError","uploadLogoInputRef","getRoomDetail","sectorData","all","roomDetails","roomLocation","responseError","getLocationIdentificationInformation","detailUnit","detailRoom","detailBed","editRoomDetails","emptyUnit","emptyRoom","emptyBed","onEditSector","editSectorName","enableReinitialize","validationSchema","Yup","shape","formikProps","errors","handleChange","handleSubmit","isEditSectorModalOpen","hospitalLogo","accept","onFileInputFocus","onSelectFile","fileError","parentSectorType","parentSectorName","getDeviceList","getAllowList","solHelloId","deleteDevice","sendCommand","getLatestAppRelease","appId","short_version","version","uploaded_at","install_url","min_os","getDeviceRebootLogs","deviceCommandLogs","addDeviceSettings","settings","settingTypeId","getDeviceLogsCommand","CsvExport","asyncExportMethod","disable","fileName","csvData","setCsvData","csvInstance","click","newCsvData","filename","hasNameChanges","logs","hasChanges","currentName","exportLogsAsCsv","Info","report","Device","sn","createdDate","Reason","RebootLogExport","solHelloDeviceId","serialNumber","handleCheckBoxChange","poolDevices","allDevicesSelected","voiceCommandCalling","getCheckBoxId","getLevelDevices","CheckBox","DeviceSelection","VoiceCommandCallingModal","changedDevices","setChangedDevices","setLoading","setHasErrors","changeVoiceCommandCalling","settingValue","toggleVoiceCommandCallingModal","isVoiceCommandCallingModalOpen","newDevices","updateVoiceCommandCallingList","sectorDevices","PullDeviceLogs","hasErrors","modal","setModal","sendPullLogsCommand","Hospital","loadHospital","getCodeNameByOsVersion","osVersion","latestAppRelease","deviceList","d","displayDevices","firmwareRevision","appVersion","macAddress","ipAddress","actions","toggleRebootDeviceModal","toggleDeleteDeviceModal","selectedOrg","toggleDeleteOrgUnitModal","unAssignDevice","selectedDevice","isDeleteDeviceModalLoading","rebootDevice","rebootReason","forceUpdateDevice","latestAppVersion","toggleUpdateDeviceModal","deleteOrgUnitSubmit","toggleHospitalModal","isHospitalModalOpen","getCurrentHealthSystem","sectorParent","isDeleteDeviceModalOpen","isRebootDeviceModalOpen","isUpdateDeviceModalOpen","isDeleteOrgUnitModalOpen","setInputValues","updateTree","input","file","files","reader","FileReader","readAsDataURL","isUploadLogoModalOpen","onImageLoaded","image","imageRef","onCropChange","crop","makeClientCrop","isHospitalLogoModalLoading","imageData","logoData","originalUrl","getImageCrop","errorStateParameters","request","xScale","naturalWidth","yScale","naturalHeight","toggleHospitalLogoCrop","updateVCCList","solHelloDeviceIds","androidVersion","hospitalName","getCurrentHospital","sections","exportAsCsv","ruleOfThirds","EditSectorModal","Department","loadDepartment","sectorLocation","moveToParentSector","currentSectorId","parentSector","toggleDepartmentModal","isDepartmentModalOpen","departmentName","getCurrentDepartment","Floor","loadFloor","floorName","getCurrentFloor","onTabIconClick","toggleModal","Room","loadRoom","devicesList","allowListList","fetchUnassociatedDevices","fetchDeviceData","fetchLatestAppRelease","deviceData","unassociatedDevicesRes","showErrorMessage","uid","isRoomLoaded","unassociatedDevicesToSelect","isVoiceCommandCallingModalLoading","displayAllowlist","domainUrl","isAllowed","protocol","number","requestAllowlist","allowListReason","hasSucceeded","showSuccessMessage","isVoiceCommandCallingOpen","findSelectedDeviceById","setDeviceId","isAddDeviceModalSubmitDisabled","deviceIdInput","errorMessage","success","toggleDevicesModal","voiceCommandCallingSubmit","setting","toggleRoomModal","isRoomModalOpen","isDevicesModalOpen","toggleVoiceCommandCalling","handleCsvDropdownClick","exportDeviceDetailsRef","exportAllowlistRef","csvDropdownItems","ID","Allowed","Protocol","Response","exportAllowlistCsv","list","UnassignedNurse","Organization","hasHealthSystems","isRoomURL","pathName","path","Emitter","fn","isFunction","listeners","_fn","SignalingChannel","onMessage","wsServer","bindOn","callback","on","debug","socketId","send","_data","newData","from","candidate","sdp","sdpMid","sdpMLineIndex","streamInfo","EventDispatcher","spec","dispatcher","eventListeners","eventType","listener","clearEventListener","dispatchEvent","OwtEvent","MessageEvent","init","origin","P2P_CONN_SERVER_UNKNOWN","P2P_CONN_SERVER_UNAVAILABLE","P2P_CONN_SERVER_BUSY","P2P_CONN_SERVER_NOT_SUPPORTED","P2P_CONN_CLIENT_UNKNOWN","P2P_CONN_CLIENT_NOT_INITIALIZED","P2P_CONN_AUTH_UNKNOWN","P2P_CONN_AUTH_FAILED","P2P_MESSAGING_TARGET_UNREACHABLE","P2P_CLIENT_DENIED","P2P_CLIENT_UNKNOWN","P2P_CLIENT_UNSUPPORTED_METHOD","P2P_CLIENT_ILLEGAL_ARGUMENT","P2P_CLIENT_INVALID_STATE","P2P_CLIENT_NOT_ALLOWED","P2P_WEBRTC_UNKNOWN","P2P_WEBRTC_SDP","getErrorByCode","errorCode","2100","2101","2102","2103","2110","2111","2120","2121","2201","2400","2401","2402","2403","2404","2500","2501","P2PError","isFirefox","userAgent","isChrome","isSafari","createUuid","c","random","Publication","stop","getStats","mute","unmute","defineProperty","configurable","writable","Utils","isAllowedValue","allowedValues","ele","StreamSourceInfo","audioSourceInfo","videoSourceInfo","TypeError","Stream","stream","sourceInfo","attributes","MediaStream","getAudioTracks","getVideoTracks","LocalStream","RemoteStream","capabilities","StreamEvent","noOp","that","TRACE","INFO","WARNING","NONE","bindType","setLogLevel","trace","warning","setCodecParam","codec","param","sdpLines","fmtpLineIndex","findFmtpLine","fmtpObj","findLine","getCodecPayloadTypeFromLine","pt","writeFmtpLine","parseFmtpLine","fmtpLine","spacePos","keyValues","RegExp","pair","hasOwnProperty","getCodecPayloadType","substr","findLineInRange","startLine","endLine","realEndLine","sdpLine","audioCodecWhiteList","videoCodecWhiteList","removeCodecFramALine","reorderCodecs","codecs","concat","mLineIndex","originPayloads","payloads","appendRtxPayloads","mLine","newLine","setCodecOrder","setMaxBitrate","encodingParametersList","encodingParameters","maxBitrate","Event","DataChannelLabel","sysInfo","sdk","exec","runtime","os","continualIceGathering","unifiedPlan","streamRemovable","P2PPeerConnectionChannel","config","localId","remoteId","signaling","removeTrackById","trackId","offer","rtcPeerConnection","getRTCPeerConnection","getSenders","sender","track","removeTrack","_onNegotiationneeded","_config","_localId","_remoteId","_signaling","_pc","_publishedStreams","Map","_pendingStreams","_publishingStreams","_pendingUnpublishStreams","_myStreamInfo","_remoteStreamInfo","_remoteStreams","_remoteTrackSourceInfo","_publishPromises","_unpublishPromises","_publishingStreamTracks","_publishedStreamTracks","_isNegotiationNeeded","_remoteSideSupportsRemoveStream","_remoteSideSupportsPlanB","_remoteSideSupportsUnifiedPlan","_remoteIceCandidates","_dataChannels","_pendingMessages","_dataSeq","_sendDataPromises","_addedTrackIds","_isCaller","_infoSent","_disposed","_createPeerConnection","actioneeParticipantId","_polite","_ignoredOffer","_offering","offerInterval","lastOffer","errorType","_sendSignalingMessage","iceConnectionState","reconnectingPublish","setMyStreamInfo","senders","sendersId","tracks","getTracks","addTransceiver","tracksId","reuseAudioTransceiver","getTransceivers","t","mid","reuseVideoTransceiver","replaceTrack","addTrack","startsWith","transceiver","maxFramerate","rtcRtpSendParameters","getParameters","encodingParameterList","encodings","setParameters","wsEvent","set","has","_createDataChannel","_sendClosedMsgIfNecessary","_sendSysInfoIfNecessary","readyState","_stop","tracksStatsReports","_getStats","ErrorModule","mediaStreamTrack","reportsResult","statsReport","_SignalingMesssageHandler","sendSignalingMessage","_handleRemoteCapability","ON_TRACK_SOURCES","_trackSourcesHandler","ON_STREAM_INFO","_streamInfoHandler","_tracksAddedHandler","_tracksRemovedHandler","_sdpHandler","_chatClosedHandler","ids","mediaTrackIds","mediaStreamId","warn","targetStreamIndex","targetStream","publication","_unpublish","_onOffer","_onAnswer","_onRemoteIceCandidate","source","trackIds","signalingState","_setRtpSenderOptions","_setCodecOrder","sessionDescription","RTCSessionDescription","collision","setRemoteDescription","_createAndSendAnswer","publishConferenceError","_drainPendingMessages","_sendSdp","streams","_setStreamToRemoteStreamInfo","_checkIceConnectionStateAndFireEvent","audioTrackSource","videoTrackSource","StreamModule","streamEvent","_streamRemoved","_doNegotiate","candidateInfo","RTCIceCandidate","remoteDescription","addIceCandidate","currentTarget","clearInterval","_negotiating","_drainPendingStreams","_drainPendingRemoteIceCandidates","setInterval","connectionState","peerConnection","iceGatheringState","messageEvent","pcConfiguration","rtcConfiguration","sdpSemantics","RTCPeerConnection","ontrack","_onRemoteTrackAdded","apply","onicecandidate","_onLocalIceCandidate","ondatachannel","_bindEventsToDataChannel","onsignalingstatechange","_onSignalingStateChange","oniceconnectionstatechange","_onIceConnectionStateChange","onicegatheringstatechange","_onIceGatheringStateChange","negotiationNeeded","shift","j","removeStream","dc","trackInfoData","streamInfoData","TRACK_SOURCES","STREAM_INFO","ua","_createAndSendOffer","audioEncoding","SdpUtils","videoEncoding","minBitrate","audioEncodings","startBitrate","_setMinBitrate","_setMaxBitrate","_setStartBitrate","newOffer","localDesc","iceRestart","createOffer","desc","_setRtpReceiverOptions","setLocalDescription","pop","finally","ignore","createAnswer","_logCurrentAndPendingLocalDescription","answerPayload","currentLocalDescription","pendingLocalDescription","mozGetUserMedia","createDataChannel","onmessage","_onDataChannelMessage","onopen","_onDataChannelOpen","onclose","_onDataChannelClose","onerror","notifyRemote","promiseError","close","clear","pcRemoteStream","getRemoteStreams","_isUnifiedPlan","mediaStreams","_getStreamByTrack","_areAllTracksEnded","_onRemoteStreamRemoved","_createStreamInfo","Offer","forScreenShare","isAudio","isVideo","isScreen","toScreenSharingSocket","ConferenceInfo","conferenceName","conversationId","fromUser","isChat","isDirectToHello","isMeetingRoom","isMultiparty","participants","inputDevices","isSecurityCam","tenantId","FromUser","objectGuidId","friendlyUrl","ConferenceParticipant","ConnectionState","P2PClientConfiguration","P2PClient","configuration","signalingChannel","onPeerConnectionCreated","setPrototypeOf","myId","self","WsEvents","getOrCreateChannel","allowedRemoteIds","errCode","disconnect","publish","sendMessageToSignaling","signalingForChannel","pcc","peerConnObj","ev","getChannel","hasPeerConnectionChannelForRemoteId","AudioSourceInfo","MIC","SCREENCAST","FILE","MIXED","VideoSourceInfo","CAMERA","AudioTrackConstraints","MediaFormatModule","v","VideoTrackConstraints","resolution","frameRate","StreamConstraints","audioConstraints","videoConstraints","isVideoConstrainsForScreenCast","constraints","MediaStreamFactory","utils","mediaConstraints","ideal","aspectRatio","facingMode","mediaSource","getDisplayMedia","getIceServers","prepareICEList","iceServers","server","urls","isDeleted","returnServer","credential","playSound","audioUrl","loop","Audio","currentTime","play","stopSound","pause","busySound","dropSound","outGoingCallSound","stopOutgoingCallSound","sendStats","retries","CallStats","addPeerConnection","pcObject","pushInterval","remoteParticipantId","startSendingStats","getStatsInterval","removePeerConnection","stats","pushStats","flushInterval","outgoingMetricsBuffer","batch","prepareBatch","batchSize","timeStamp","generateTimeStamp","round","clickPluginInstance","ClickAnalyticsPlugin","reactPlugin","ReactPlugin","appInsights","ApplicationInsights","maxBatchInterval","disableFetchTracking","extensions","extensionConfig","identifier","dataTags","customDataPrefix","aiBlobAttributeTag","parentDataTag","donotTrackDataTag","captureAllMetaDataContent","useDefaultContentNameOrId","defaultRightClickBhvr","ai","initialize","instrumentationKey","browserHistory","loadAppInsights","addTelemetryInitializer","envelope","tags","consoleMethod","isInitialized","trackEvent","properties","conferenceData","printConsole","trackException","exception","CallManager","eventCallback","socketListeners","unbindTimeouts","cameraEventTimeout","addDeviceToMonitoring","inviteParticipantPayload","participant","startOutGoingCallTimerForParticipant","p2p","removeDeviceFromMonitoring","actioneeParticipant","getParticipantByParticipantId","clearMonitoringReAddInterval","reAddInterval","reAddToMonitoringIntervals","startMonitoring","startConferenceInfo","conferenceInfo","setConferenceData","setP2pClient","hasActiveConference","clearManager","ok","failureReason","endReason","deniedParticipant","callStartedOrJoined","endingCall","failedInvites","failedInvitationToParticipants","p2pClientConfiguration","bindP2pEvents","startConference","socketAuthorizationPromise","initMediaStream","setTrackIdsInConferenceInfo","closeSocket","callerParticipantId","helloDeviceName","localSrc","audioTrackId","videoTrackId","localScreenSrc","screenTrackId","joinConference","joinConferenceInfo","bindOnTrackEndedEventListener","audioStream","p2pChannel","addStreamToPendingStreams","anotherNursePickedUp","getInputStreamsStatus","validateStreamStatus","getStream","handelMediaStreamError","checkForStreamPermissions","mic","cam","audioCall","videoCall","videoStream","cameraFeedCall","localStream","monitoringSendOffer","streamSourceInfo","screenShare","togglingScreenShare","screenStream","screenTrack","toggleInfo","toggleEvent","eventResponse","handleEventFailureResponse","activeSrc","videoTracks","toggleAudio","audioTrack","enabled","streamType","toggleVideo","togglingVideo","hasCameraTrack","videoTrack","screensharingTrack","hasVideoTrack","_streamType","_isAudio","_isVideo","_isScreen","_actioneeParticipantId","requestToChangeBitrate","hasAudioTrack","peerSrc","ping","isIoConnected","pong","promiseTimeout","ms","race","checkIfConnectedToSignaling","checkIfConnected","handleReconnectingWithParticipant","p","endCall","onTrackEndedEventListener","trackDeviceNotFound","groupId","getSettings","trackType","localTrack","publishConferenceLog","sendLeaveEvent","leaveData","stopTracks","shouldCloseSocket","leaveReason","removeAllListeners","clearAndDeleteTimers","timers","outGoingCallTimer","_useCallStats","_callStats","toggleParticipantTrack","isTrackMuted","panTiltCamera","returnData","sendCameraEvent","cameraEventInProgress","serialCommand","toggleNightVision","nightVisionMode","togglePatientAtRiskAlert","isScreenshare","audioConstraintsForMic","streamConstraints","videoConstraintsForCamera","createMediaStream","startReAddFeedInterval","byPassStateCheck","retryParticipantStates","bindSocketEventListeners","updateParticipantStatus","clearOutGoingCallTimerForParticipant","isSwitchSuccessful","socketState","reconnectTimer","socketAuthorizationResolve","socketDisconnectReason","ON_CONNECT_ERROR","off","unbindSocketEventListeners","cb","streamInterval","connected","pccObj","REACT_APP_EXPOSE_PEERCONNECTIONS","peerConnections","_sendCallStatsInterval","onconnectionstatechange","onConnectionStateChange","reconnecting","participantObjectId","rebootHuddleCam","monitoringTrackToggled","isEnabled","hasAudio","NotesWrapper","section","isHidden","css","Notes","note","setNote","noteFontSize","setNoteFontSize","fontSize","LocalMicBtn","toggle","htmlAttributes","setIsMyMicActive","data-custom-isactive","VideoFeed","setFeedColor","onSetFeedColor","isFeedExpanded","onExpandClick","checkIsColorActive","feedColors","getTooltipElement","toolTipElementProperties","maxWidth","boxShadow","fontFamily","PortalTooltip","showMicPortal","showCamPortal","micBtnRef","camBtnRef","setVideoRefSource","disableButtons","removeReason","showFeed","showButtons","VideoFeedWrapper","feedColor","isMicPrivacyOn","isCameraPrivacyOn","onToggleNightVision","isNightVisionActive","onCloseClick","isAlarmActive","VideoFeedColorsWrapper","isAnyFeedExpanded","VideoFeedBottomOptions","data-custom-id","data-custom-conference","data-custom-room","onToggleAlarm","localAudioTrack","onToggleMyMicrophone","isPeerSpeakerActive","onTogglePeerSpeaker","getDeviceStatus","CameraControls","onRebootHuddleCamClick","isRebootCameraModalOpen","onRebootHuddleCam","shouldDisableTilt","showPTZ","onPanTiltCamera","onZoomCamera","disabledTiltDirections","onToggleCameraSwitch","isHuddleCamConnected","Monitoring","changeRoomsAndDevicesIcons","setActiveVideoFeeds","videoFeeds","mappedIds","toggleMonitoringMic","beforeUnloadEvent","returnValue","prepareStartConferenceInfo","v4","hasPermissionForMonitoring","getFailedFeed","failedParticipants","nFeed","failedFeed","f","conferenceEndReason","changeRoomAddDeviceIcon","newFeed","zoomLevel","dateAdded","roomHasDeviceAssigned","currentRoomName","initiatorInfoFailed","removeFeed","feed","endMonitoring","isFeedZoomed","handleBitrateChange","useHighBitrate","useLowBitrate","videoFeedsLength","expandedFeed","lowerBitrateFeedCountThreshold","deviceAdded","deviceIds","dep","toggleExpandFeed","previousExpandedFeed","currentFeed","deviceControlsLocked","showDeviceControlsLockedModal","togglePeerSpeaker","previousFeeds","videoFeed","previousFeed","toggleAlarm","onAlertPatientResponse","statAlarmError","toggleMyMicrophone","selectedFeed","prevFeed","setFeedAudioTrackAndDisablePrevious","newVideoFeeds","colors","foundIndex","collapseSecondColumn","onDeviceLockedEventHandler","stateToSet","doSendPanTiltCameraEvent","feeds","cameraResponseListener","shouldShowSwitchToHelloCamError","getConferenceEndedText","getVideoFeedByParticipantId","onAudioTrackToggled","onLocalAudioError","deviceStatusChanged","toggleSecondColumnButton","showAllowMicrophoneModal","previousParticipantId","statusResponse","ac","initialCallType","monitoringNurse","isNightVision","newState","bindWindowListeners","property","allFeeds","shouldShowConferenceEnded","debounce","Prompt","when","reload","getDeviceOngoingConferencesByLevel","exportCallLogs","timezone","DateTimeFormat","resolvedOptions","timeZone","getPastCallLogs","getNurseCallsForDashboard","nurseId","getKpisForDashboard","Pagination","pageSizeChanged","goToNextPage","goToPrevPage","totalNumberOfPages","parseFloat","totalCount","menuPlacement","classNamePrefix","DropdownIndicator","CallDetails","roomFeatureUsed","vcpFeatureUsed","selectedConference","nurse","devicesFeatures","audioUsed","isFeatureUsed","usedAudio","videoUsed","usedVideo","screenUsed","usedScreen","features","constructor","vcp","getCallDetails","PastCallsList","loading","selectedRegion","selectedHospital","selectedDepartment","selectedFloor","selectedRoom","currentLevel","currentTeamId","showCallQueueModal","showCallDetailsModal","showListOfRoomsModal","currentCallLogQueue","isExportLogsModalOpen","dateError","isExportLogsModalLoading","hasExportLogsModalErrors","allObj","startExportTask","getLogs","conferences","handleFromChange","daysDiff","handleToChange","showFromMonth","handleResetClick","openListOfRoomsModal","showListOfRooms","getParticipantState","healthSystemsOptions","unshift","onInitPastCallLogs","filterByLevel","regionsOptions","initiator","getMonitoredRooms","getPatientRoom","getVirtualCareProvider","getCallStatus","startedAt","endedAt","isInitiator","provider","isSuccessfulCall","getCallType","callDuration","queue","roomCount","textDecoration","cursor","getStatusBadge","details","openCallDetailsModal","openCallLogQueueModal","getDayPicker","showMonth","isInit","oneDayBefore","setDate","formattedStart","formattedEnd","hospitalOptions","h","departmentOptions","floorOptions","roomOptions","unavailableNurses","modifiers","getTableRows","onHealthSystemSelected","onRegionSelected","onHospitalSelected","onDepartmentSelected","onFloorSelected","onRoomSelected","parseDate","dayPickerProps","selectedDays","disabledDays","after","toMonth","numberOfMonths","onDayClick","getInput","focus","onDayChange","before","fromMonth","showListOfUnavailableNurses","OngoingCallsList","onTerminateRequestAcceptedHandler","selectedConferenceId","clearTerminateRequestTimeout","removeConferenceFromLogs","isTerminateCallModalLoading","terminateRequestSubmitButtonText","terminateRequestInProgress","terminateRequestCloseButtonText","closeParticipantTerminalCallModal","sendTerminateRequestCloseEvent","showParticipantTerminateCallModal","terminateRequestFailureReason","selectedParticipantId","closeTerminalCallModal","showTerminateCallModal","onForceTerminalCallModalSubmit","onParticipantForceTerminalCallModalSubmit","changeStatusOfParticipantLogs","onTerminalCallModalSubmit","terminateRequestTimeout","conferenceIndex","tableHeaders","terminateCall","openParticipantForceTerminateCallModal","bindSocketEvents","bindWindowEventListener","unbindSocketEvents","openForceTerminateCallModal","Dashboard","labels","datasets","chartData","setChartData","vcpCount","roomsObserved","numberOfCalls","monitoring","averageDuration","kpis","setKpis","setRegions","setHospitals","nurses","setNurses","setSelectedRegion","setSelectedHospital","selectedNurse","setSelectedNurse","setFrom","setTo","setCurrentLevel","searchedNurse","setSearchedNurse","toInput","getHealthSystemOptions","regionsList","nursesList","companyUsers","firstname","lastname","fetchNurses","getKpisTalkToPatientCallNumber","kpisResponse","callTypesCount","object","count","getKpisTalkToPatientAverageDuration","callTypesDuration","getDashboardTalkToPatientData","callTypes","kpisObj","_item","hospitalsList","chart","responsive","maintainAspectRatio","plugins","legend","elements","bar","borderWidth","scales","ticks","grid","onInputChange","CallLogs","CallDuration","getDuration","initial","add","asMilliseconds","startDurationInterval","durationInterval","callStartTime","timeDiff","abs","NightVisionControl","showButton","toggleNightvisionHandler","connectionQualityColor","PeerStats","videoBytesSent","audioBytesSent","videoBytesRec","audioBytesRec","transportType","previousStats","outbound","inbound","currentStats","videoResolution","videoOutboundResolution","audioCodec","videoCodec","videoOutboundCodec","audioOutboundCodec","RTCStatsType","OUTBOUND","INBOUND","TRACK","CODEC","REMOTE_CANDIDATE","RTCMediaType","fetchTimeInSeconds","byteToKilobit","currInboundReports","currOutboundReports","newStats","isLocalSrc","getDifference","framesEncoded","bytesSent","isMyMicOff","bytesReceived","isPeerMicPrivacyOn","getInboundFrameRate","componentWillUnmount","codecReport","codecId","remoteSource","trackReport","transportReport","transportId","candidatePair","selectedCandidatePairId","remoteCandidate","remoteCandidateId","setCurrentStats","frameHeight","frameWidth","mimeType","candidateType","outboundTrack","framesDecoded","TrackType","Call","getRoomNamePath","healthSystemPath","togglePeerCamera","isPeerVideoCamActive","isMyVideoCamActive","changeActiveSource","showTopParticipant","isMyVideoSelected","isScreenSharingSelected","onMicPermissionChange","micActive","onCamPermissionChange","toggleMyMic","toggleMyVideo","toggleMyStream","toggleMyScreenSharing","debouncedToggleStream","leading","trailing","startCloseTabTimeout","closeTabTimeout","activeSrcHandle","buildListFromStates","onMyMediaToggleClicked","onPeerMediaToggleClicked","peerMicActive","togglePTZ","shouldShowPatientCameraToggledOff","isVideoCall","setAudioSrcObject","audioRef","shouldShowStateComponents","shouldShowConnectionStatus","sendPanTiltCameraEvent","callerObjectId","renderCallStates","myAvatarUrl","getPrivacyButtonsErrorMessage","shouldShowPrivacyButtonsErrorMessage","toggleRightColumn","showRightColumn","onLocalVideoError","patientId","decodeURIComponent","avatarUrl","roomNamePath","tvHdmiPort","incoming","topParticipantAvatar","replaceAll","PatientFeed","playVideo","videoPlayPromise","checkVideoPlayingTimeout","soundPermission","fromUserInfo","toggleHandler","peerAudioMuted","setCallStartTime","handleSoundPermission","toggleNightvision","InputFeedback","field","form","touched","touch","InviteAdmins","addExtraInputField","updatedExtraFields","extraFields","displayExtraFields","table","schema","isValid","validateOnBlur","email0","email1","email2","email3","resetForm","onLoading","onSuccess","checkEmail","val1","bindSubmitForm","submitForm","loaded","MultiSelect","handleBlur","isMulti","isClearable","backspaceRemovesValue","InviteNurses","healthSystemsArr","inviteType","emailObjs","nullable","setFieldValue","setFieldTouched","getRole","InvitedUsersList","handleSearchChanges","invitedMembers","companyInvites","handleCancelInvite","statusId","inviteIndex","invite","currentInviteId","StatusId","inviteStatusId","isCancelModalOpen","handleResendInvite","isResendModalOpen","invitationInfo","emailBox","getEmailBox","invitedBy","getProfileBox","companyUser","getLocation","getStatus","getInviteType","getEditButtons","legnth","teamName","openModal","displayInvitedUsers","toggleSendInvitationsModal","selectedOptions","onSelectLocation","selectedId","AssignDropdown","wordBreak","selected","ManageHealthSystems","Assignation","currentUserSubTree","preselected","getSectorPath","unassigned","fetchingSubTree","assigningUser","healthsystems","showHealthSystemForm","loadingHealthSystems","member","assignation","deleteHealthSystem","deleteHealthSystemMember","subtree","assignedHealthSystems","usersTableHeaders","displayHealthSystems","paddingTop","ProfilePicture","charAt","UserInformation","healthSystemInputTypes","SINGLE","MULTI","roleHealthSystemTypes","currentMemberObj","profileInfo","workExperience","getBanyanRole","workExperiences","ex","showOnBC","company","getSelectedHealthSystems","healthSystemInputType","updateNurseProps","workExperienceId","userUpdated","onError","getValidationForm","validation","isMemberTitleEnabled","validateOnChange","SuperUserHealthSystem","superCompanyUserId","pastHealthSystemId","pastHealthSystem","UsersList","handleSubmitMyForm","submitMyForm","handleDeleteMember","deletingMember","currentMemberId","members","isDeleteModalOpen","onRecoverPassword","tokenId","accountRecoveryMailSent","accountRecoveryMailFailed","toggleAccountRecoveryModal","getInviter","inviter","m","userIndex","handleUpdatedMemberPresence","showAccountRecoveryModal","sendNewLink","isEditMemberModalOpen","editingMember","manageUsersSelectedTab","healthSystemAddition","presenceColor","isOwner","profileBox","dateInvited","healthsystem","pendingRecoveryInviteToken","openEditMemberModal","openDeleteMemberModal","displayUsers","isAdmin","isVirtualCarer","InviteSuperUsers","sendInvitations","isSendInvitationsModalOpen","displayInviteForm","Login","Redirect","minContent","CreateHealthSystem","newRegionNames","regionNames","deleteRegion","setHealthSystemName","getHealthSystemRegions","hsName","hasDuplicate","Set","hasRegionsValidLength","isHealthSystemCreated","handleCancelClick","LogOutUser","CompleteProfile","inviteValidation","successResponse","submitUserRegistration","queryString","cid","accountResponse","accountExists","existingUser","getAppropriateErrorMessage","passwordConfirm","matches","oneOf","Help","Recover","ResetPassword","getUserIdleConfigurations","addUserIdleConfiguration","healthSystemIds","timeoutMinutes","respnse","getUserIdleConfigurationHistory","getUserIdleConfigurationMinutes","getTeamConfigurations","addDeviceConfiguration","getDeviceConfigurationHistory","deleteTVDeviceConfiguration","getUserIdleConfigurationHealthSystems","UserIdleForm","isSuccessfulAlertOn","isErrorsAlertOn","setSubmitting","minutes","onSucceeded","onCloseModal","isSuperUser","positive","isSubmitting","isModalOpen","UserIdleTimeout","userIdleConfigurations","totalUserIdleConfigs","editConfig","transformTypes","WithValues","WithLabels","userIdleHeaders","getConfigurations","selectedRole","onRoleSelected","setSelectedRole","onPaginationChange","isSubmitted","healthSystemsWithConfigs","transformArray","isHealthSystem","propName","newArray","openEditModal","team","getButtons","onHistoryClick","transformUserIdleConfigurations","createdBy","userCreated","getTeamConfigurationProfiles","teamTypeId","addTeamConfigurationProfile","teamType","updateTeamConfigurationProfile","getTeamConfigurationProfilesHisotry","deleteTeamConfigurationProfile","DeviceConfig","initialConfigurationFormData","hdmiPorts","endCallSource","tvs","integrationTypes","selectedHealthSystemValue","selectedHospitalValue","selectedHdmiPortValue","selectedTVValue","selectedEndCallSource","selectedDepartmentValue","selectedTeamProfileValue","selectedTeamProfile","ringtoneVolumeValue","selectedIntegrationTypeValue","profileName","hsSecret","userName","healthSystemError","hospitalError","departmentError","hdmiPortError","endCallSourceError","ringtoneVolumeError","profileNameError","urlError","portError","hsSecretError","teamProfileError","tvError","isSecretChanged","newSecret","isHospitalLoading","isDepartmentLoading","showConfigurationModal","teamProfiles","isHospitalDropdownDisabled","isDepartmentDropdownDisabled","configurations","healthSystemConfigs","isFormLoading","totalConfigs","isDeleteConfigModalOpen","deleteConfig","configurationFormData","deviceConfigHeaders","healthSystemConfigHeaders","activeSubTab","HealthSystem","TV","0","3","getTeamProfiles","selectedHospitalId","selectedDepartmentId","teamConfigurationProfiles","getHospitals","getDepartments","hsId","getDeviceConfigurations","deviceConfigurations","Value","getHealthSystemConfigs","transformHealthSystemsForSelect","firstHSHospitals","onHospitalSelect","onDepartmentSelect","setSelectedDepartment","getHospitalConfigurations","onHealthSystemSelect","onFormHealthSystemSelect","hsHospitals","onFormHospitalSelect","onFormDepartmentSelect","onFormTeamProfileSelect","profile","onFormHdmiPortSelect","onEndCallSourceSelect","onFormTVSelect","tv","onFormRingtoneVolumeChange","hasError","ringtoneVolumeNumber","hdmiPort","teamConfigurationProfileId","defaultSource","ringtoneVolume","resetAddConfigurationModal","userNameError","newSecretKey","secretKeyWoSpaces","secret","btoa","integrationTypeId","transformConfigs","teamConfigurationProfile","pushFiltersToQueryString","toggleConfigurationModal","openDeleteModal","ds","isBase64","decodedSecret","userData","tabIndex","onSubTabChange","getTabsConfigurations","onFormTextChange","deleteTeamProfile","typeId","selectIntegrationType","htmlFor","step","getActiveDirectories","getActiveDirectoriesHistory","getADGroupRoles","updateActiveDirectory","activeDirectory","addActiveDirectory","addGroupRole","groupRole","group","updateGroupRole","deleteActiveDirectory","deleteGroupRole","ActiveDirectoryForm","isPasswordChanged","hospitalIds","activeTab","domain","validGroupName","adClientSecret","adClientId","username","fullPassword","getValidationSchema","onHealthSystemChange","ActiveDirectory","formHospitals","isModalHospitalsLoading","activeDirectories","totalADs","groupRoles","totalGroupRoles","isHospitalDisabled","ADs","GroupRoles","activeDirectoriesHeaders","groupRoleHeaders","adGroupRoles","shouldAppendAll","toggleConfigModal","getADButtons","getGroupRoleButtons","setFormHospitals","transformActiveDirectories","getNtpConfigurations","addNtpConfiguration","ntpUrls","deleteNtpConfiguration","getNtpConfigurationHistory","editNtpConfiguration","NetworkConfig","selectedHospitalName","selectedHealthSystemName","ntpUrl1","ntpUrl2","ntpPort1","ntpPort2","configurationId","setShowConfigurationModal","setIsHospitalDropdownDisabled","setConfigurations","setIsFormLoading","setTotalConfigs","setConfigurationFormData","setIsDeleteConfigModalOpen","setDeleteConfig","setEditConfig","orgProps","transformItemsForSelect","healthSystemsList","setHealthSystemsAndConfigs","getHospitalsByHealthSystemId","getActionButtons","getHospitalsList","useCallback","configs","teamNetworkNtpConfigurations","ntpUrl","newConfigurationFormData","setDeviceConfiguration","configId","firstUrlPort","secondUrlPort","editParams","lastIndexOf","submitDeleteConfig","onKeyDown","Configurations","queryParams","setStateFromQueryString","hasQueryChanged","currentParams","prevParams","validPageSize","onRoleChange","onHospitalChange","onDepartmentChange","tabs","USER_IDLE_TIMEOUT","DEVICE","ACTIVE_DIRECTORY","NETWORK","ConfigurationsHistory","teamProfileHeaders","ntpConfigHeaders","teamProfile","ntpConfigurations","getConfigurationHistory","userIdleConfiguration","deviceConfiguration","teamNetworkNtpConfiguration","getClassName","transformConfigurations","editedBy","userEdited","dateEdited","getHeaders","back","marginLeft","JWTAuthenticatedRoute","TimeError","Routes","Switch","Socket","signalingUrl","REACT_APP_SIGNALING_URL","io","secure","transports","initSocketListeners","myClientInfo","mySocketId","clearConferences","clientType","versionName","oldSocketId","incomingCallsDisabled","shouldDisableIncomingCalls","handleUserPresence","setStatusDevice","fetchNotificationsCounter","setDeviceCallState","newTree","userSocketsLength","notFirstConnect","sessionStorage","changeUserPresence","IncomingCall","startIncomingCallTimer","incomingCallTimer","incomingConferenceInfo","sendMissedCallNotification","hideIncomingCall","addOnUnloadEvent","onAnsweredElsewhere","onInitiatorLeft","onIncomingCall","incomingCallAudio","paused","showSelf","incomingCallNotification","sendIncomingCallNotification","addSocketListeners","removeSocketListeners","declineIncomingCall","acceptIncomingCall","openCallWindow","notification","getDeviceName","sendNotification","tag","renotify","querySelector","onClickCallback","Notification","notificationPermission","GRANTED","requestPermission","newNotification","onclick","clearIncomingCallTimer","DENIED","pulseAnimation","postUserIdleMessage","UserIdleCheck","userIdleTimeout","alertDisplayTime","postMessages","CONFIRMED","IN_CALL","unbindListeners","getUserIdleConfiguration","startTimeout","bindListeners","resetTimeout","logoutInterval","setActiveUser","isLogoutAlertOn","handler","tabsListener","resetActivity","openLogoutAlert","secondCounter","closeAlert","AppInsightsTelemetryProvider","initialized","appInsightsInstrumentationKey","AppInsightsContext","withAITracking","StreamPermissionsModal","App","startVersionTimeout","getTokensIfCall","startApplication","versionTimeout","versionTimeoutInterval","compareVersions","fetch","configText","displayContentUpdatedAlert","newSocketConnectionState","socketConnectionState","displaySocketConnectionAlert","socketStateTimeout","BrowserRouter","basename","hostname","enhancers","createStore","rootReducer","compose","applyMiddleware","configureStore","rootElement","serviceWorker","ready","registration","unregister"],"mappings":"uWAMaA,EAGmB,4BAHnBA,EAIa,6BAJbA,EAKU,yBALVA,EAMA,eANAA,EAOM,oBAPNA,EAQS,yBARTA,EAUC,gBAVDA,EAWO,sBAXPA,EAYK,oBAZLA,EAagB,gCAbhBA,EAcU,0BAdVA,EAeC,gBAfDA,EAgBc,8BAhBdA,EAiBgB,gCAjBhBA,EAkBc,8BAGdC,EACY,yBADZA,EAEiB,8BAFjBA,EAGiB,8BAHjBA,EAKY,yBALZA,EAMkB,+BANlBA,EAOkB,+BAGlBC,EACoB,iCADpBA,EAEyB,sCAFzBA,EAGyB,sCAGzBC,EACc,2BC1CrBC,EAAe,CACpBC,SAAU,KACVC,yBAAyB,GCFpBF,EAAe,CACpBG,WAAY,GACZC,iBAAkB,GAClBC,kBAAmB,KACnBC,sBAAuB,KACvBC,wBAAyB,GACzBC,gBAAiB,KACjBC,SAAU,CACTC,KAAM,GACNC,YAAa,IAEdC,sBAAuB,GACvBC,mBAAoB,KACpBC,sBAAuB,GACvBC,0BAA2B,CAC1BC,MAAM,EACNC,SAAU,KACVC,iBAAiB,GAElBC,iBAAkB,MAmFJC,EAhFM,SAACC,EAAOC,GAE5B,GADAD,EAAQA,GAASrB,EACbsB,EAAOC,OAAS3B,EACnB,OAAO,eAAKyB,EAAZ,CAAmBlB,WAAYmB,EAAOE,UAGvC,GAAIF,EAAOC,OAAS3B,EACnB,OAAO,eACHyB,EADJ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BA,UAAU+3F,cAAcC,MAAMp0G,MAAK,SAAAq0G,GAClCA,EAAaC,kB","file":"static/js/main.7f074cd5.chunk.js","sourcesContent":["export const CallLogsActionTypes = {\n\tFETCHING_CALL_LOGS: 'FETCHING_CALL_LOGS',\n\tFETCHING_CALL_LOGS_SUCCESS: 'FETCHING_CALL_LOGS_SUCCESS',\n\tFETCHING_CALL_LOGS_FAILURE: 'FETCHING_CALL_LOGS_FAILURE',\n};\n\nexport const OverviewActionTypes = {\n\ttoggleUsersModal: 'TOGGLE_USERS_MODAL',\n\ttoggleDeviceModal: 'TOGGLE_DEVICE_MODAL',\n\ttoggleSwitchHealthSystemModal: 'TOGGLE_HEALTH_SYTEM_MODAL',\n\ttoggleAssignDeviceModal: 'TOGGLE_ASSIGN_DEVICE_MODAL',\n\ttoggleLeftNavigation: 'TOGGLE_LEFT_NAVIGATION',\n\taddNewRoom: 'ADD_NEW_ROOM',\n\tupdateBreadcrumb: 'UPDATE_BREADCRUMB',\n\tsetAllHealthSystems: 'SET_ALL_HEALTH_SYSTEMS',\n\tsetHealthSystem: 'SET_HEALTH_SYSTEM',\n\tsetTreeData: 'SET_TREE_DATA',\n\tcreateNewHospital: 'CREATE_NEW_HOSPITAL',\n\tsetHospitalTree: 'SET_HOSPITAL_TREE',\n\tsetCurrentHealthSystemInfo: 'SET_CURRENT_HEALTH_SYTEM_INFO',\n\tsetCurrentHospitalId: 'SET_CURRENT_HOSPITAL_ID',\n\tsetUserInfo: 'SET_USER_INFO',\n\tsetCurrentSectorLocation: 'SET_CURRENT_SECTOR_LOCATION',\n\tsetStreamPermissionMessage: 'SET_STREAM_PERMISSION_MESSAGE',\n\tsetActiveMonitoringFeeds: 'SET_ACTIVE_MONITORING_FEEDS',\n};\n\nexport const UserPresenceActionTypes = {\n\tFETCHING_USER_PRESENCE: 'FETCHING_USER_PRESENCE',\n\tFETCH_USER_PRESENCE_SUCCESS: 'FETCH_USER_PRESENCE_SUCCESS',\n\tFETCH_USER_PRESENCE_FAILURE: 'FETCH_USER_PRESENCE_FAILURE',\n\n\tUPDATING_USER_PRESENCE: 'UPDATING_USER_PRESENCE',\n\tUPDATE_USER_PRESENCE_SUCCESS: 'UPDATE_USER_PRESENCE_SUCCESS',\n\tUPDATE_USER_PRESENCE_FAILURE: 'UPDATE_USER_PRESENCE_FAILURE',\n};\n\nexport const NotificationsCounterActionTypes = {\n\tFETCHING_NOTIFICATIONS_COUNTER: 'FETCHING_NOTIFICATIONS_COUNTER',\n\tFETCH_NOTIFICATIONS_COUNTER_SUCCESS: 'FETCH_NOTIFICATIONS_COUNTER_SUCCESS',\n\tFETCH_NOTIFICATIONS_COUNTER_FAILURE: 'FETCH_NOTIFICATIONS_COUNTER_FAILURE',\n};\n\nexport const NursePoolingActionTypes = {\n\tSET_CURRENT_HEALTH_SYTEM: 'SET_CURRENT_HEALTH_SYTEM',\n};\n","import { OverviewActionTypes } from '../../constants/action-types';\n\nconst initialState = {\n\tuserInfo: null,\n\tisLefNavigationExpanded: false,\n};\n\nexport const mainLayout = (state, action) => {\n\tstate = state || initialState;\n\n\tif (action.type === OverviewActionTypes.setUserInfo) {\n\t\treturn { ...state, userInfo: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.toggleLeftNavigation) {\n\t\treturn { ...state, isLefNavigationExpanded: !state.isLefNavigationExpanded };\n\t}\n\n\treturn state;\n};\n","import { OverviewActionTypes } from 'constants/action-types';\n\nconst initialState = {\n\tbreadcrumb: [],\n\tallHealthSystems: [],\n\tcurrentHospitalId: null,\n\tcurrentHealthSystemId: null,\n\tcurrentHealthSystemName: '',\n\tcurrentRegionId: null,\n\ttreeData: {\n\t\ttree: [],\n\t\tpreSelected: [],\n\t},\n\tactiveMonitoringFeeds: [],\n\tcurrentHelloDevice: null,\n\tcurrentSectorLocation: [],\n\tshowAssignDeviceModalData: {\n\t\tshow: false,\n\t\tdeviceId: null,\n\t\tassignCompleted: false,\n\t},\n\tstreamPermission: null,\n};\n\nconst organization = (state, action) => {\n\tstate = state || initialState;\n\tif (action.type === OverviewActionTypes.updateBreadcrumb) {\n\t\treturn { ...state, breadcrumb: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.toggleAssignDeviceModal) {\n\t\treturn {\n\t\t\t...state,\n\t\t\tshowAssignDeviceModalData: {\n\t\t\t\tshow: action.payload.show,\n\t\t\t\tdeviceId: action.payload.deviceId,\n\t\t\t\tassignCompleted: action.payload.assignCompleted,\n\t\t\t},\n\t\t};\n\t}\n\n\tif (action.type === OverviewActionTypes.setAllHealthSystems) {\n\t\treturn {\n\t\t\t...state,\n\t\t\tallHealthSystems: action.payload.healthSystems,\n\t\t\tcurrentHealthSystemId: action.payload.currentHealthSystem.currentHealthSystemId,\n\t\t\tcurrentRegionId: action.payload.currentHealthSystem.currentRegionId,\n\t\t\tcurrentHealthSystemName: action.payload.currentHealthSystem.currentHealthSystemName,\n\t\t};\n\t}\n\n\tif (action.type === OverviewActionTypes.setCurrentHealthSystemInfo) {\n\t\treturn {\n\t\t\t...state,\n\t\t\tcurrentHealthSystemId: action.payload.currentHealthSystemId,\n\t\t\tcurrentRegionId: action.payload.currentRegionId,\n\t\t\tcurrentHealthSystemName: action.payload.currentHealthSystemName,\n\t\t};\n\t}\n\n\tif (action.type === OverviewActionTypes.createNewHospital) {\n\t\tstate.treeData.tree.push({\n\t\t\ticon: 'business',\n\t\t\ttype: 'hospital',\n\t\t\tisNewOption: true,\n\t\t\tsubOptions: [],\n\t\t});\n\n\t\tconst newTreeData = state.treeData.tree.slice();\n\t\treturn {\n\t\t\t...state,\n\t\t\ttreeData: {\n\t\t\t\ttree: newTreeData,\n\t\t\t},\n\t\t};\n\t}\n\n\tif (action.type === OverviewActionTypes.setStreamPermissionMessage) {\n\t\treturn { ...state, streamPermission: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setActiveMonitoringFeeds) {\n\t\treturn { ...state, activeMonitoringFeeds: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setCurrentHospitalId) {\n\t\treturn { ...state, currentHospitalId: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setHospitalTree) {\n\t\treturn { ...state, hospitalTree: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setTreeData) {\n\t\treturn { ...state, treeData: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setCurrentSectorLocation) {\n\t\treturn { ...state, currentSectorLocation: action.payload };\n\t}\n\n\treturn state;\n};\n\nexport default organization;\n","import { UserPresenceActionTypes } from 'constants/action-types';\n\nconst initialState = {\n\tpresenceStatusTypeId: 0,\n\tcustomMessage: '',\n\tdefaultMessage: '',\n\n\tupdatingUserPresence: false,\n\tfetchingUserPresence: false,\n};\n\nexport const userPresence = (state, action) => {\n\tstate = state || initialState;\n\n\tswitch (action.type) {\n\t\tcase UserPresenceActionTypes.UPDATING_USER_PRESENCE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tupdatingUserPresence: true,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.UPDATE_USER_PRESENCE_FAILURE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tupdatingUserPresence: false,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.UPDATE_USER_PRESENCE_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tupdatingUserPresence: false,\n\t\t\t\t...action.data,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.FETCHING_USER_PRESENCE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingUserPresence: true,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.FETCH_USER_PRESENCE_FAILURE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingUserPresence: false,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.FETCH_USER_PRESENCE_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingUserPresence: false,\n\t\t\t\t...action.data,\n\t\t\t};\n\t}\n\n\treturn state;\n};\n","import { NotificationsCounterActionTypes } from 'constants/action-types';\n\nconst initialState = {\n\tnotificationsCounter: 0,\n\n\tfetchingNotificationCounter: false,\n};\n\nexport const notifications = (state, action) => {\n\tstate = state || initialState;\n\n\tswitch (action.type) {\n\t\tcase NotificationsCounterActionTypes.FETCHING_NOTIFICATIONS_COUNTER:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingNotificationCounter: true,\n\t\t\t};\n\t\tcase NotificationsCounterActionTypes.FETCH_NOTIFICATIONS_COUNTER_FAILURE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingNotificationCounter: false,\n\t\t\t};\n\t\tcase NotificationsCounterActionTypes.FETCH_NOTIFICATIONS_COUNTER_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingNotificationCounter: false,\n\t\t\t\tnotificationsCounter: action.data,\n\t\t\t};\n\t}\n\n\treturn state;\n};\n","import { NursePoolingActionTypes } from 'constants/action-types';\n\nconst initialState = {\n\tcurrentHealthSystem: null,\n};\n\nexport const nursePooling = (state, action) => {\n\tstate = state || initialState;\n\n\tif (action.type === NursePoolingActionTypes.SET_CURRENT_HEALTH_SYTEM) {\n\t\treturn { ...state, currentHealthSystem: action.payload };\n\t}\n\n\treturn state;\n};\n","import { combineReducers } from 'redux';\nimport { mainLayout } from './mainLayout/reducer';\nimport organization from './organization/reducer';\nimport { userPresence } from './userPresence/reducer';\nimport { notifications } from './notifications/reducer';\nimport { nursePooling } from './nursePooling/reducer';\n\nexport default combineReducers({\n\tmainLayout,\n\torganization,\n\tuserPresence,\n\tnotifications,\n\tnursePooling,\n});\n","import { applyMiddleware, compose, createStore } from 'redux';\nimport rootReducer from '../state/index';\nimport thunk from 'redux-thunk';\nimport logger from 'redux-logger';\nimport promise from 'redux-promise-middleware';\n\nexport const middleware = [thunk, logger, promise];\n\nexport default function configureStore(initialState) {\n\t// In development, use the browser's Redux dev tools extension if installed\n\tconst enhancers = [];\n\tconst isDevelopment = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';\n\tif (isDevelopment && typeof window !== 'undefined' && window.devToolsExtension) {\n\t\tenhancers.push(window.devToolsExtension());\n\t}\n\n\treturn createStore(rootReducer, initialState, compose(applyMiddleware(...middleware), ...enhancers));\n}\n","export const IDENTITY_CONFIG = {};\n\nIDENTITY_CONFIG.automaticSilentRenew = true;\nIDENTITY_CONFIG.loadUserInfo = false;\nIDENTITY_CONFIG.response_type = 'code';\nIDENTITY_CONFIG.response_mode = 'query';\nIDENTITY_CONFIG.scope = 'openid profile email sol.user api.gateway API';\nif (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n\tIDENTITY_CONFIG.authority = process.env.REACT_APP_IDSRV_URL;\n\tIDENTITY_CONFIG.client_id = process.env.REACT_APP_IDSRV_CLIENT_ID;\n\tIDENTITY_CONFIG.redirect_uri = process.env.REACT_APP_IDSRV_REDIRECT_URL;\n\tIDENTITY_CONFIG.login = process.env.REACT_APP_IDSRV_URL + '/login';\n\tIDENTITY_CONFIG.silent_redirect_uri = process.env.REACT_APP_SILENT_REDIRECT_URL;\n\tIDENTITY_CONFIG.post_logout_redirect_uri = process.env.REACT_APP_LOGOUT_URL;\n\tIDENTITY_CONFIG.public_uri = process.env.REACT_APP_PUBLIC_URL;\n\tIDENTITY_CONFIG.client_secret = process.env.REACT_APP_IDSRV_CLIENT_SECRET;\n} else {\n\tIDENTITY_CONFIG.authority = window.__env__.REACT_APP_IDSRV_URL;\n\tIDENTITY_CONFIG.client_id = window.__env__.REACT_APP_IDSRV_CLIENT_ID;\n\tIDENTITY_CONFIG.redirect_uri = window.__env__.REACT_APP_IDSRV_REDIRECT_URL;\n\tIDENTITY_CONFIG.login = window.__env__.REACT_APP_IDSRV_URL + '/login';\n\tIDENTITY_CONFIG.silent_redirect_uri = window.__env__.REACT_APP_SILENT_REDIRECT_URL;\n\tIDENTITY_CONFIG.post_logout_redirect_uri = window.__env__.REACT_APP_LOGOUT_URL;\n\tIDENTITY_CONFIG.public_uri = window.__env__.REACT_APP_PUBLIC_URL;\n\tIDENTITY_CONFIG.client_secret = window.__env__.REACT_APP_IDSRV_CLIENT_SECRET;\n}\n\nexport const METADATA_OIDC = {};\nif (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n\tMETADATA_OIDC.issuer = process.env.REACT_APP_IDSRV_URL;\n\tMETADATA_OIDC.jwks_uri = process.env.REACT_APP_IDSRV_URL + '/.well-known/jwks';\n\tMETADATA_OIDC.authorization_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/authorize';\n\tMETADATA_OIDC.token_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/token';\n\tMETADATA_OIDC.userinfo_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/userinfo';\n\tMETADATA_OIDC.end_session_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/endsession';\n\tMETADATA_OIDC.check_session_iframe = process.env.REACT_APP_IDSRV_URL + '/connect/checksession';\n\tMETADATA_OIDC.revocation_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/revocation';\n\tMETADATA_OIDC.introspection_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/introspect';\n} else {\n\tMETADATA_OIDC.issuer = window.__env__.REACT_APP_IDSRV_URL;\n\tMETADATA_OIDC.jwks_uri = window.__env__.REACT_APP_IDSRV_URL + '/.well-known/jwks';\n\tMETADATA_OIDC.authorization_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/authorize';\n\tMETADATA_OIDC.token_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/token';\n\tMETADATA_OIDC.userinfo_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/userinfo';\n\tMETADATA_OIDC.end_session_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/endsession';\n\tMETADATA_OIDC.check_session_iframe = window.__env__.REACT_APP_IDSRV_URL + '/connect/checksession';\n\tMETADATA_OIDC.revocation_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/revocation';\n\tMETADATA_OIDC.introspection_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/introspect';\n}\n","import axios from 'axios';\nimport { signinSilent } from 'infrastructure/auth';\n\nexport const BanyanClientType = 0;\nexport const BanyanAppType = 3;\nexport const IdentityClientType = 2;\n\nexport const APP_CONFIG = { URL: {} };\nif (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n\tAPP_CONFIG.URL.gatewayApiBasePath = process.env.REACT_APP_GATEWAY_API_BASE_URL;\n\tAPP_CONFIG.URL.legacyApiBasePath = process.env.REACT_APP_LEGACY_API_BASE_URL;\n\tAPP_CONFIG.URL.localApiBasePath = process.env.REACT_APP_SERVER_PUBLIC_URL;\n\tAPP_CONFIG.companyId = process.env.REACT_APP_BANYAN_COMP_ID;\n\tAPP_CONFIG.profilePicBaseUrl = process.env.REACT_APP_PROFILE_PIC_BASE_URL;\n\tAPP_CONFIG.buildNumber = process.env.REACT_APP_BUILD_NUMBER;\n\tAPP_CONFIG.releaseName = process.env.REACT_APP_RELEASE_NAME;\n\tAPP_CONFIG.useCallStats = process.env.REACT_APP_USE_CALLSTATS === 'true';\n\tAPP_CONFIG.sendCallStatsOnMonitoring = process.env.REACT_APP_SEND_CALLSTATS_ON_MONITORING === 'true';\n\tAPP_CONFIG.sendCallStatsInterval = process.env.REACT_APP_SEND_CALLSTATS_INTERVAL;\n\tAPP_CONFIG.versionCheckInterval = process.env.REACT_APP_VERSION_CHECK_INTERVAL;\n\tAPP_CONFIG.deviceAppId = process.env.REACT_APP_DEVICE_APP_ID;\n\tAPP_CONFIG.sendCallClientLogs = process.env.REACT_APP_SEND_CALL_CLIENT_LOGS;\n\tAPP_CONFIG.isDevelopment = true;\n} else {\n\tAPP_CONFIG.URL.gatewayApiBasePath = window.__env__.REACT_APP_GATEWAY_API_BASE_URL;\n\tAPP_CONFIG.URL.legacyApiBasePath = window.__env__.REACT_APP_LEGACY_API_BASE_URL;\n\tAPP_CONFIG.URL.localApiBasePath = window.__env__.REACT_APP_PUBLIC_URL;\n\tAPP_CONFIG.companyId = window.__env__.REACT_APP_BANYAN_COMP_ID;\n\tAPP_CONFIG.profilePicBaseUrl = window.__env__.REACT_APP_PROFILE_PIC_BASE_URL;\n\tAPP_CONFIG.buildNumber = window.__env__.REACT_APP_BUILD_NUMBER;\n\tAPP_CONFIG.releaseName = window.__env__.REACT_APP_RELEASE_NAME;\n\tAPP_CONFIG.useCallStats = window.__env__.REACT_APP_USE_CALLSTATS === 'true';\n\tAPP_CONFIG.sendCallStatsOnMonitoring = window.__env__.REACT_APP_SEND_CALLSTATS_ON_MONITORING === 'true';\n\tAPP_CONFIG.sendCallStatsInterval = window.__env__.REACT_APP_SEND_CALLSTATS_INTERVAL;\n\tAPP_CONFIG.versionCheckInterval = window.__env__.REACT_APP_VERSION_CHECK_INTERVAL;\n\tAPP_CONFIG.deviceAppId = window.__env__.REACT_APP_DEVICE_APP_ID;\n\tAPP_CONFIG.aiInstrumentationKey = window.__env__.REACT_APP_APPINSIGHTS_INSTRUMENTATIONKEY;\n\tAPP_CONFIG.sendCallClientLogs = window.__env__.REACT_APP_SEND_CALL_CLIENT_LOGS;\n\tAPP_CONFIG.isDevelopment = false;\n}\n\nconst opts = {\n\tbaseURL: APP_CONFIG.URL.gatewayApiBasePath,\n\ttimeout: 100000,\n\ttransformRequest: [\n\t\tfunction(data, headers) {\n\t\t\tconst accessToken = localStorage.getItem('access_token');\n\t\t\tif (accessToken) {\n\t\t\t\theaders['Authorization'] = `Bearer ${accessToken}`;\n\t\t\t}\n\t\t\treturn JSON.stringify(data);\n\t\t},\n\t],\n\theaders: {\n\t\t'Content-Type': 'application/json',\n\t},\n};\n\nconst legacyOpts = Object.assign({}, opts, { baseURL: APP_CONFIG.URL.legacyApiBasePath });\nconst localOpts = Object.assign({}, opts, { baseURL: APP_CONFIG.URL.localApiBasePath });\n\nconst successHandler = response => {\n\treturn new Promise((resolve, reject) => {\n\t\tresolve(response);\n\t});\n};\n\nconst errorHandler = async error => {\n\tif (error.response && error.response.status !== 401) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\treject(error);\n\t\t});\n\t}\n\n\tsigninSilent();\n\n\treturn new Promise((resolve, reject) => {\n\t\treject(error);\n\t});\n};\n\nexport const passwordRegEx = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*\\(\\)_\\+\\-\\={}<>,\\.\\|\"\"'~`:;\\\\?\\/\\[\\] ]){8,}/;\nexport const treeSectorNameMaxCharacters = 127;\nexport const defaultDocumentTitle = 'Banyan Medical Systems';\nexport const gatewayApi = axios.create(opts);\nexport const legacyApi = axios.create(legacyOpts);\nexport const localApi = axios.create(localOpts);\n\ngatewayApi.interceptors.response.use(\n\tresponse => successHandler(response),\n\terror => errorHandler(error)\n);\nlegacyApi.interceptors.response.use(\n\tresponse => successHandler(response),\n\terror => errorHandler(error)\n);\nlocalApi.interceptors.response.use(\n\tresponse => successHandler(response),\n\terror => errorHandler(error)\n);\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport function getRoles(companyId, userId) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/companies/organizations/${companyId}/members/${userId}/roles`;\n\t\tgatewayApi\n\t\t\t.get(url)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.roles);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateRole(memberId, data) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/companies/${APP_CONFIG.companyId}/members/${memberId}/nurse-role`;\n\t\tgatewayApi\n\t\t\t.put(url, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","export const GeneralErrorCodes = {\n\tNotFound: 1000,\n\tServerError: 1001,\n\tValidationError: 1003,\n\tBadRequest: 1004,\n\tUnauthorized: 1005,\n\tForbidden: 1006,\n};\n\nexport const OrganizationErrorCodes = {\n\tUserExists: 3000,\n\tCompanyNotFound: 3001,\n\tMemberNotFound: 3002,\n\tInsufficientPermissions: 3003,\n\tTeamNotFound: 3004,\n\tChannelNotFound: 3005,\n\tActionNotPermitted: 3006,\n\tTeamMemberNotFound: 3007,\n\tInviteNotFound: 3008,\n\tUserNotFound: 3009,\n\tTeamMemberExists: 3010,\n\tInviteCancelled: 3011,\n\tInviteAlreadyAccepted: 3012,\n\tInviteExpired: 3013,\n};\n\nexport const CallTypes = {\n\tAUDIO: 1,\n\tVIDEO: 2,\n\tSCREENSHARE: 3,\n\tSECURITYCAM: 4,\n\tLIVEBROADCAST: 5,\n\tMONITORING: 6,\n};\n\nexport const BanyanCallTypesMessage = {\n\tTALK_TO_PATIENT: 'Talk To Patient',\n\tTALK_TO_NURSE: 'Talk To Nurse',\n\tVIDEO_CALL: 'Video Call',\n\tPATIENT_VIEW: 'Patient View',\n\tMONITORING: 'Monitoring',\n};\n\nexport const VirtualCareProviderRoles = {\n\tVirtualNurse: 1,\n\tVirtualCaseManager: 2,\n\tVirtualSitter: 3,\n\tVirtualIntensivist: 4,\n};\n\nexport const ObjectType = {\n\tUSER: 0,\n\tHELLO_DEVICE: 1,\n\tSIP_USER: 999,\n};\n\nexport const MediaTypes = {\n\tCAMERA: 'camera',\n\tMICROPHONE: 'microphone',\n};\n\nexport const MediaPermissions = {\n\tDENIED: 'denied',\n\tGRANTED: 'granted',\n\tPROMPT: 'prompt',\n};\n\nexport const MediaInputs = {\n\tAUDIO_INPUT: 'audioinput',\n\tVIDEO_INPUT: 'videoinput',\n};\n\nexport const CallStatus = {\n\tUNDEFINED: {\n\t\ttype: 0,\n\t\tmessage: 'Undefined',\n\t},\n\tSUCCESSFUL: {\n\t\ttype: 1,\n\t\tmessage: 'Successful',\n\t},\n\tPARTIALLYSUCCESSFUL: {\n\t\ttype: 2,\n\t\tmessage: 'PartiallySuccessful',\n\t},\n\tFAILED: {\n\t\ttype: 3,\n\t\tmessage: 'Failed',\n\t},\n\tDISRUPTED: {\n\t\ttype: 4,\n\t\tmessage: 'Disrupted',\n\t},\n\tPARTIALLYDISRUPTED: {\n\t\ttype: 5,\n\t\tmessage: 'Partially Disrupted',\n\t},\n\tMISSED: {\n\t\ttype: 6,\n\t\tmessage: 'Missed',\n\t},\n\tABORTED: {\n\t\ttype: 7,\n\t\tmessage: 'Aborted',\n\t},\n\tDROPPED: {\n\t\ttype: 8,\n\t\tmessage: 'Dropped',\n\t},\n};\n\nexport const InviteStatuses = {\n\tSENT: {\n\t\ttype: 1,\n\t\tmessage: 'Sent',\n\t},\n\tACCEPTED: {\n\t\ttype: 2,\n\t\tmessage: 'Accepted',\n\t},\n\tPENDING: {\n\t\ttype: 3,\n\t\tmessage: 'Pending',\n\t},\n\tCANCELLED: {\n\t\ttype: 4,\n\t\tmessage: 'Cancelled',\n\t},\n\tFAILED: {\n\t\ttype: 5,\n\t\tmessage: 'Failed',\n\t},\n};\n\nexport const InviteTypes = {\n\tUSER: {\n\t\ttype: 1,\n\t\tmessage: 'User',\n\t},\n\tGUEST: {\n\t\ttype: 2,\n\t\tmessage: 'Guest',\n\t},\n\tADMIN: {\n\t\ttype: 3,\n\t\tmessage: 'Admin',\n\t},\n\tVIRTUALCAREPROVIDER: {\n\t\ttype: 4,\n\t\tmessage: 'Virtual Care Provider',\n\t},\n\tVIRTUALSITTER: {\n\t\ttype: 5,\n\t\tmessage: 'Virtual Sitter',\n\t},\n\tSUPERUSER: {\n\t\ttype: 6,\n\t\tmessage: 'Super User',\n\t},\n\tADUSER: {\n\t\ttype: 7,\n\t\tmessage: 'AD User',\n\t},\n};\n\nexport const SectorTypes = {\n\tHEALTHSYSTEM: 'health system',\n\tREGION: 'region',\n\tHOSPITAL: 'hospital',\n\tDEPARTMENT: 'department',\n\tFLOOR: 'floor',\n\tROOM: 'room',\n};\n\nexport const PresenceStatusType = {\n\tAVAILABLE: 1,\n\tUNAVAILABLE: 2,\n};\n\nexport const PresenceStatusTypeLabels = {\n\t1: 'Available',\n\t2: 'Unavailable',\n};\n\nexport const CallStatuses = {\n\tACCEPTED: 0,\n\tDECLINED: 0,\n};\n\nexport const UserTypes = {\n\tOWNER: 1,\n\tADMIN: 2,\n\tVIRTUALCAREPROVIDER: 6,\n\tVIRTUALSITTER: 7,\n\tSUPERUSER: 8,\n};\n\nexport const UserRoles = {\n\tADMIN: 'Admin',\n\tNURSE: 'VirtualCareProvider',\n\tVIRTUALSITTER: 'VirtualSitter',\n\tSUPERUSER: 'SuperUser',\n};\n\nexport const ZoomDirection = {\n\tINCREASE: '+',\n\tDECREASE: '-',\n\tRESET: 0,\n};\n\nexport const CameraTiltDirection = {\n\tUP: '1',\n\tDOWN: '2',\n\tRIGHT: '3',\n\tLEFT: '4',\n};\n\nexport const CameraTiltAction = {\n\tSTART: 'start',\n\tSTOP: 'stop',\n};\n\nexport const DeviceStatus = {\n\tONLINE: 'online',\n\tOFFLINE: 'offline',\n};\n\nexport const DeviceListLevel = {\n\tHEALTHSYSTEM: 0,\n\tREGION: 1,\n\tHOSPITAL: 2,\n\tDEPARTMENT: 3,\n\tFLOOR: 4,\n\tROOM: 5,\n\tORGANIZATION: 6,\n};\n\nexport const SerialTVCommands = {\n\tINITIAL_TV_POWER: 0,\n\tPOWER: {\n\t\tPOWER_ON: 1,\n\t\tPOWER_OFF: 2,\n\t},\n\tHDMI: {\n\t\tSWITCH_HDMI1: 3,\n\t\tSWITCH_HDMI2: 4,\n\t\tSWITCH_HDMI3: 5,\n\t},\n};\n\nexport const ParticipantState = {\n\tCONNECTING: {\n\t\ttype: 0,\n\t\tmessage: 'Connecting',\n\t},\n\tCONNECTED: {\n\t\ttype: 1,\n\t\tmessage: 'Connected',\n\t},\n\tBUSY: {\n\t\ttype: 2,\n\t\tmessage: 'Busy',\n\t},\n\tDECLINED: {\n\t\ttype: 3,\n\t\tmessage: 'Declined',\n\t},\n\tOFFLINE: {\n\t\ttype: 4,\n\t\tmessage: 'Offline',\n\t},\n\tLEFT_CALL: {\n\t\ttype: 5,\n\t\tmessage: 'Left the call',\n\t},\n\tNOT_ANSWERING: {\n\t\ttype: 6,\n\t\tmessage: 'Not answering',\n\t},\n\tCANT_CONNECT: {\n\t\ttype: 7,\n\t\tmessage: 'Cant connect',\n\t},\n\tDISRUPTED: {\n\t\ttype: 8,\n\t\tmessage: 'Disrupted',\n\t},\n\tRECONNECTING: {\n\t\ttype: 9,\n\t\tmessage: 'Reconnecting',\n\t},\n\tDISCONNECTED: {\n\t\ttype: 10,\n\t\tmessage: 'Disconnected',\n\t},\n\tREMOVED: {\n\t\ttype: 11,\n\t\tmessage: 'Removed',\n\t},\n\tFAILED_TO_GET_INFO: {\n\t\ttype: 98,\n\t\tmessage: 'Failed to get info',\n\t},\n\tINVITE_DENIED: {\n\t\ttype: 99,\n\t\tmessage: 'Invite denied',\n\t},\n};\n\nexport const ParticipantRemoveReason = {\n\tUNDEFINED: 0,\n\tPARTICIPANT_LEAVE: 1,\n\tDISCONNECTED: 2,\n\tPARTICIPANT_FORCED_LEAVE: 3,\n\tCLEAR_PARTICIPANT_OLD_CONFERENCES: 4,\n\tPARTICIPANT_CLEANUP: 5,\n\tPASSWORD_CHANGED: 6,\n\tIDLE: 7,\n\tCONFERENCE_TERMINATED_BY_ADMINISTRATOR: 8,\n\tDISCONNECTED_PARTICIPANT_CLEANUP: 9,\n\tSOMEONE_ELSE_ANSWERED: 10,\n\tHIGHER_PRIORITY_CALL: 11,\n\tFAILED_TO_GET_INFO: 12,\n};\n\nexport const ConferenceEndReason = {\n\tUNDEFINED: 0,\n\tPARTICIPANT_OFFLINE: 1,\n\tPARTICIPANT_BUSY: 2,\n\tINITIATOR_LEFT: 3,\n\tPARTICIPANT_NOT_ANSWERING: 4,\n\tPARTICIPANT_DECLINED: 5,\n\tPARTICIPANT_LEFT: 6,\n\tOWNER_LEFT: 7,\n\tABORTED: 8,\n\tDROPPED: 9,\n\tPARTICIPANT_PASSWORD_CHANGED: 10,\n\tPARTICIPANT_IDLE: 11,\n\tTERMINATED_BY_ADMINISTRATOR: 12,\n\tPARTICIPANT_INVITE_DENIED: 13,\n\tPARTICIPANT_INVITE_FAILED: 14,\n\tFAILED_TO_GET_INITIATOR_INFO: 991,\n\tREMOVED: 992,\n\tUNAUTHORIZED: 993,\n\tE2EE_FAILED: 994,\n\tANSWERED_ELSEWHERE: 995,\n\tTRANSFERRED_TO_ANOTHER_CLIENT: 996,\n\tHAS_ACTIVE_CONFERENCE: 997,\n\tINITIATOR_BUSY: 998,\n\tCLEANUP: 999,\n};\n\nexport const StartConferenceFailureReason = {\n\tEXPIRED_TOKEN: 'startConferenceFailureReason.expiredToken',\n\tGET_INITIATOR_INFO_FAILED: 'startConferenceFailureReason.getInitiatorInfoFailed',\n};\n\nexport const InviteParticipantFailureReason = {\n\tINVITE_DENIED: 'inviteParticipant.denied',\n\tFAILED_TO_GET_INFO: 'inviteParticipant.failedToGetInfo',\n};\n\nexport const ChangePasswordUseCases = {\n\tpasswordInfo:\n\t\t'Passwords are case-sensitive and must be at least 8 characters. A strong password should contain a mix of capital and lower-case letters, numbers and symbols.',\n\tcurrentPassEmpty: 'Please enter your current password, cannot be left blank.',\n\tnewPassEmpty: 'Please enter a new password, it cannot be left blank.',\n\tconfirmNewPassEmpty: 'Please re-enter password, it cannot be left blank.',\n\tminLengthRequired: 'New password must contain minimum 8 characters.',\n\tnewPasswordsDoNotMatch: 'Passwords do not match, please re-enter.',\n\tnewPassSameAsCurrent: 'New password is same as the current password.',\n\tnewPassSaved: 'Your password has been changed.',\n\tnewPassSet: 'Your password has been set.',\n\tcurrentPasswordIncorrect: 'Your current password was incorrectly typed.',\n\tstrongPasswordCheck: 'Password should have at least one uppercase letter, one lowercase letter, one number and one special character:',\n};\n\nexport const DeviceStatusMessages = {\n\tdeviceOnCall: 'Device on another call.',\n\tdeviceOnCallWithNurse: 'This device is being monitored by',\n\tdeviceOffline: 'Device offline',\n\tinitiatingMonitoring: 'Initiating...',\n\tnotAnswering: \"Can't connect to this device. Please try again.\",\n\tleftCall: 'Failed to reconnect.',\n\tdisconnected: 'Patient is disconnected from the call.',\n\treconnecting: 'Please wait…attempting to reconnect to the network.',\n\tremoved: 'This session was ended by a Banyan admin.',\n\tparticipantInviteDenied: \"You don't have sufficient permissions to call this participant. Please contact your administrator.\",\n\tparticipantInviteFailed: 'Failed to get participant information. Please try again.',\n\tfailedToGetInitiatorInformation: 'Failed to get your information. Please try again.',\n};\n\nexport const FeedColors = {\n\tred: '#e84118',\n\tblue: '#00a8ff',\n\torange: '#ff9f43',\n\tyellow: '#fbc531',\n\tpink: '#f368e0',\n\tblack: '#000',\n\tcyan: '#6BDCFF',\n\tpurple: '#852FC8',\n\tdarkBlue: '#5e75aa',\n\tgray: '#d3d3d3',\n\tlightBlue: '#add8e6',\n};\n\nexport const StreamError = {\n\tSCREEN_SHARE_CANCELED: {\n\t\ttype: 0,\n\t\tmessage: 'Screen share canceled',\n\t},\n\tCANT_ACCESS_MEDIA_STREAM: {\n\t\ttype: 1,\n\t\tmessage: `Can't access media stream`,\n\t},\n\tBROWSER_NOT_SUPPORTED: {\n\t\ttype: 2,\n\t\tmessage: 'Browser not supported',\n\t},\n\tEXTENSION_NOT_INSTALLED: {\n\t\ttype: 3,\n\t\tmessage: 'Extension not installed',\n\t},\n\tDEVICE_NOT_FOUND: {\n\t\ttype: 4,\n\t\tmessage: 'Device not found',\n\t},\n\tSTREAM_NOT_ALLOWED: {\n\t\ttype: 5,\n\t\tmessage: 'Stream not allowed',\n\t},\n\tPERMISSION_DISMISSED: {\n\t\ttype: 6,\n\t\tmessage: 'Permission dismissed',\n\t},\n\tNOT_READABLE_ERROR: {\n\t\ttype: 7,\n\t\tmessage: 'Not readable error',\n\t},\n\tONLY_SCREEN_FOUND: {\n\t\ttype: 8,\n\t\tmessage: 'Only screen found',\n\t},\n\tSCREEN_SHARE_NOT_SUPPORTED: {\n\t\ttype: 9,\n\t\tmessage: 'Screen share not supported',\n\t},\n\tCAMERA_BLOCKED: {\n\t\ttype: 10,\n\t\tmessage: 'Camera permission is blocked',\n\t},\n\tMICROPHONE_BLOCKED: {\n\t\ttype: 11,\n\t\tmessage: 'Microphone permission is blocked',\n\t},\n\tCAM_AND_MIC_BLOCKED: {\n\t\ttype: 12,\n\t\tmessage: 'Camera and microphone permission is blocked',\n\t},\n\tMICROPHONE_NOT_FOUND: {\n\t\ttype: 13,\n\t\tmessage: 'Microphone not found',\n\t},\n\tCAMERA_NOT_FOUND: {\n\t\ttype: 14,\n\t\tmessage: 'Camera not found',\n\t},\n};\n\nexport const SocketState = {\n\tCONNECTED: {\n\t\ttype: 0,\n\t\tmessage: 'Connected',\n\t},\n\tRECONNECTING: {\n\t\ttype: 1,\n\t\tmessage: 'Reconnecting...',\n\t},\n\tDISCONNECTED: {\n\t\ttype: 2,\n\t\tmessage: 'Connection is lost',\n\t},\n};\n\nexport const DeviceCommands = {\n\tREBOOT: 0,\n\tSHUTDOWN: 1,\n\tENABLE_METRICS: 2,\n\tFACTORY_RESET: 3,\n\tFORCE_UPDATE: 4,\n\tPULL_LOGS: 5,\n\tREBOOT_HUDDLE_CAM: 6,\n\tSWITCH_AUDIO_OUTPUT: 7,\n\tREQUEST_ALLOWLIST_CHECK: 10,\n};\n\nexport const ConferenceErrorType = {\n\tSIGNALING_ERROR: 0, // failures or errors during the signaling procedure\n\tMEDIA_SOURCE_ERROR: 1, // failure to get access to media device (mic, camera, screen-capture)\n\tSDP_GENERATION_ERROR: 2, // SDP generation error occur either when generating an offer or answer with incorrect configuration parameters\n\tNEGOTIATION_FAILURE: 3, // negotiation errors during SDP offer/answer, they mainly occur due ti differing media and network configuration between endpoints\n\tICE_CONNECTION_FAILURE: 4, // ICE failures occur when NAT/firewall traversal fails\n\tTRANSPORT_FAILURE: 5, // call drops after the connection establishment\n};\n\nexport const CameraType = {\n\tHELLO: 'Hello',\n\tHUDDLE: 'Banyan',\n};\n\nexport const CameraZoomLevels = {\n\tHELLO_MAX: 100,\n\tHUDDLE_MAX: 400,\n};\n\nexport const CameraEventTypes = {\n\tZOOM: 'zoom',\n\tSWITCH: 'switch',\n\tTILT: 'tilt',\n\tHUDDLE_CONNECTED_STATE: 'huddleCamConnectionState',\n\tNIGHT_VISION: 'nightVision',\n\tHELLO_CAMERA_PRIVACY_STATE: 'helloCameraPrivacyState',\n\tHELLO_MIC_PRIVACY_STATE: 'helloMicPrivacyState',\n};\n\nexport const RTCPeerConnectionEnum = {\n\tCONNECTION_STATE: {\n\t\tNEW: 'new',\n\t\tCONNECTING: 'connecting',\n\t\tCONNECTED: 'connected',\n\t\tDISCONNECTED: 'disconnected',\n\t\tFAILED: 'failed',\n\t\tCLOSED: 'closed',\n\t},\n\tSIGNALING_STATE: {\n\t\tSTABLE: 'stable',\n\t\tHAVE_LOCAL_OFFER: 'have-local-offer',\n\t\tHAVE_REMOTE_OFFER: 'have-remote-offer',\n\t\tHAVE_LOCAL_PRANSWER: 'have-local-pranswer',\n\t\tHAVE_REMOTE_PRANSWER: 'have-remote-pranswer',\n\t\tCLOSED: 'closed',\n\t},\n\tICE_CONNECTION_STATE: {\n\t\tNEW: 'new',\n\t\tCHECKING: 'checking',\n\t\tCONNECTED: 'connected',\n\t\tCOMPLETED: 'completed',\n\t\tFAILED: 'failed',\n\t\tDISCONNECTED: 'disconnected',\n\t\tCLOSED: 'closed',\n\t},\n\tICE_GATHERING_STATE: {\n\t\tNEW: 'new',\n\t\tGATHERING: 'gathering',\n\t\tCOMPLETE: 'complete',\n\t},\n};\n\nexport const JoinConferenceFailureReasonEnum = {\n\tUNHANDLED_EXCEPTION: 'joinConferenceFailureReason.unhandledException',\n\tNULL_CONFERENCE: 'joinConferenceFailureReason.nullConference',\n\tWRONG_PARTICIPANT_STATE: 'joinConferenceFailureReason.wrongParticipantState',\n\tFAILED_TO_GET_PARTICIPANT_INFO: 'joinConferenceFailureReason.failedToGetParticipantInfo',\n};\n\nexport const ToggleFailureReasonEnum = {\n\tDEVICE_LOCKED: 'toggleFailureReason.deviceLocked',\n};\n\nexport const TeamTypes = {\n\tHEALTHSYSTEM: 4,\n\tREGION: 5,\n\tHOSPITAL: 6,\n\tDEPARTMENT: 7,\n\tFLOOR: 8,\n};\n\nexport const TerminateRequestFailureReasonEnum = {\n\tUNHANDLED_EXCEPTION: 'terminateRequestFailureReason.unhandledException',\n\tNULL_CONFERENCE: 'terminateRequestFailureReason.nullConference',\n\tTERMINATE_IN_PROGRESS: 'terminateRequestFailureReason.terminateInProgress',\n\tNULL_TERMINATE_REQUEST: 'terminateRequestFailureReason.nullTerminateRequest',\n\tNULL_CONNECTED_USER_PARTICIPANT: 'terminateRequestFailureReason.nullConnectedUserParticipant',\n\tNO_PERMISSION: 'terminateRequestFailureReason.noPermission',\n};\n\nexport const TerminateRequestFailureReasonMessages = {\n\t[TerminateRequestFailureReasonEnum.UNHANDLED_EXCEPTION]: 'Something went wrong. Please retry again.',\n\t[TerminateRequestFailureReasonEnum.NULL_CONFERENCE]: 'This session has already been ended.',\n\t[TerminateRequestFailureReasonEnum.TERMINATE_IN_PROGRESS]: 'Termination for this session is initiated by another administrator.',\n\t[TerminateRequestFailureReasonEnum.NULL_CONNECTED_USER_PARTICIPANT]: 'Something went wrong. Please retry again.',\n\t[TerminateRequestFailureReasonEnum.NO_PERMISSION]: 'You have no permission to terminate this session.',\n};\n\nexport const ClientTypes = {\n\tBANYAN: 2,\n};\n\nexport const Roles = {\n\tADMIN: { id: 2, value: 'Admin' },\n\tVIRTUALCAREPROVIDER: { id: 6, value: 'Virtual Care Provider' },\n\tVIRTUALSITTER: { id: 7, value: 'Virtual Sitter' },\n\tSUPERUSER: { id: 8, value: 'Super user' },\n};\n\nexport const AudioOutputDevice = {\n\tHELLO: 0,\n\tTV: 1,\n};\n\nexport const NursePoolRolePriorities = {\n\tPRIMARY: {\n\t\ttype: 1,\n\t\tmessage: 'Primary',\n\t},\n\tSECONDARY: {\n\t\ttype: 2,\n\t\tmessage: 'Secondary',\n\t},\n};\n\nexport const ConfigHistoryTypes = {\n\tUserIdle: '1',\n\tDevices: '2',\n\tADs: '3',\n\tTeamConfigurationProfiles: '4',\n\tNtpConfiguration: '5',\n};\n\nexport const TVs = {\n\tLG: 'LG (MPI)',\n\tSAMSUNG: 'Samsung (Exlink)',\n\tTELEHEALTH_CONTROLLED: 'Telehealth-Controlled',\n\tPCARE: 'pCare',\n\tCEC: 'CEC',\n};\n\nexport const TelehealthTv = {\n\tid: 3,\n\tlabel: 'Telehealth',\n\tvalue: TVs.TELEHEALTH_CONTROLLED,\n};\n\nexport const StreamTypes = {\n\tAUDIO: 1,\n\tVIDEO: 2,\n\tSCREEN_SHARE: 3,\n};\n\nexport const AndroidVersions = [\n\t{ codeName: 'No codename', versionNum: '1.0', apiLevel: [1] },\n\t{ codeName: 'No codename', versionNum: '1.1', apiLevel: [2] },\n\t{ codeName: 'Cupcake', versionNum: '1.5', apiLevel: [3] },\n\t{ codeName: 'Donut', versionNum: '1.6', apiLevel: [4] },\n\t{ codeName: 'Eclair', versionNum: '2.0 - 2.1', apiLevel: [5, 6, 7] },\n\t{ codeName: 'Froyo', versionNum: '2.2 - 2.2.3', apiLevel: [8] },\n\t{ codeName: 'Gingerbread', versionNum: '2.3 - 2.3.7', apiLevel: [9, 10] },\n\t{ codeName: 'Honeycomb', versionNum: '3.0 - 3.2.6', apiLevel: [11, 12, 13] },\n\t{ codeName: 'Ice Cream Sandwich', versionNum: '4.0 - 4.0.4', apiLevel: [14, 15] },\n\t{ codeName: 'Jelly Bean', versionNum: '4.1 - 4.3.1', apiLevel: [16, 17, 18] },\n\t{ codeName: 'KitKat', versionNum: '4.4 - 4.4.4', apiLevel: [19, 20] },\n\t{ codeName: 'Lollipop', versionNum: '5.0 - 5.1.1', apiLevel: [21, 22] },\n\t{ codeName: 'Marshmallow', versionNum: '6.0 - 6.0.1', apiLevel: [23] },\n\t{ codeName: 'Nougat', versionNum: '\t7.0', apiLevel: [24] },\n\t{ codeName: 'Nougat', versionNum: '7.1.0 - 7.1.2', apiLevel: [25] },\n\t{ codeName: 'Oreo', versionNum: '8.0', apiLevel: [26] },\n\t{ codeName: 'Oreo', versionNum: '8.1', apiLevel: [27] },\n\t{ codeName: 'Pie', versionNum: '9.0', apiLevel: [28] },\n\t{ codeName: 'Android 10', versionNum: '10.0', apiLevel: [29] },\n\t{ codeName: 'Android 11', versionNum: '11', apiLevel: [30] },\n];\n\nexport const NursePoolingOptions = {\n\tNO_ANSWER: 0,\n\tYES: 1,\n\tNO: 2,\n};\n\nexport const DeviceSettings = {\n\tVoiceCommandCalling: 14, // Currently we only care about this\n};\n\nexport const TeamConfigurationIntegrationType = {\n\tTELEHEALTH: 1,\n\tPCARE: 2,\n};\n\nexport const KeyCodes = {\n\tPERIOD: 190,\n\tNUMPAD_PERIOD: 110,\n\tMINUS: 189,\n\tNUMPAD_SUBTRACT: 109,\n\tNUMPAD_ADD: 107,\n\tPLUS: 187,\n\tLETTER_E: 69,\n\tNUMPAD_MINUS: 109,\n\tLETTER_A: 65,\n\tLETTER_Z: 90,\n\tENTER: 13,\n\tSPACE: 32,\n\tBACK_SPACE: 8,\n\tLEFT_ARROW: 37,\n\tUP_ARROW: 38,\n\tRIGHT_ARROW: 39,\n\tDOWN_ARROW: 40,\n};\n\nexport const TvBrands = {\n\tUNKNOWN: -1,\n\tSAMSUNG: 0,\n\tLG: 1,\n\tCEC_TV: 2,\n};\n\nexport const TvControlsEnums = {\n\tPOWER: 'Power',\n\tVOLUME: 'Volume',\n};\n","import { gatewayApi, APP_CONFIG, legacyApi, IdentityClientType, localApi } from 'constants/global-variables';\nimport { SectorTypes, ClientTypes } from 'constants/enums';\nimport { func } from 'prop-types';\n\nexport function getHealthSystems() {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.healthSystems);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getOrgTeamChildren(teamId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/teams/${teamId}/children`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.children);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemRegions(healthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.healthSystem.regions);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemSubTree(healthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/full`)\n\t\t\t.then(response => {\n\t\t\t\tconst regions = response.data.regions;\n\t\t\t\tlet treeData = [];\n\t\t\t\tregions.forEach((region, regionIndex) => {\n\t\t\t\t\ttreeData.push({\n\t\t\t\t\t\tname: region.name,\n\t\t\t\t\t\ticon: 'local_hospital',\n\t\t\t\t\t\ttype: SectorTypes.REGION,\n\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\tid: region.id,\n\t\t\t\t\t});\n\n\t\t\t\t\tregion.hospitals.forEach((hospital, hospitalIndex) => {\n\t\t\t\t\t\ttreeData[regionIndex].subOptions.push({\n\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\ticon: 'business',\n\t\t\t\t\t\t\ttype: SectorTypes.HOSPITAL,\n\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\tid: hospital.id,\n\t\t\t\t\t\t\tregionId: region.id,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\thospital.departments.forEach((department, departmentIndex) => {\n\t\t\t\t\t\t\ttreeData[regionIndex].subOptions[hospitalIndex].subOptions.push({\n\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\ticon: 'account_balance',\n\t\t\t\t\t\t\t\ttype: SectorTypes.DEPARTMENT,\n\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t\tid: department.id,\n\t\t\t\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\t\t\t\tregionId: region.id,\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tdepartment.floors.forEach((floor, floorIndex) => {\n\t\t\t\t\t\t\t\ttreeData[regionIndex].subOptions[hospitalIndex].subOptions[departmentIndex].subOptions.push({\n\t\t\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\t\t\ticon: 'money',\n\t\t\t\t\t\t\t\t\ttype: SectorTypes.FLOOR,\n\t\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t\t\tid: floor.id,\n\t\t\t\t\t\t\t\t\tdepartmentId: department.id,\n\t\t\t\t\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\t\t\t\t\tregionId: region.id,\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tfloor.rooms.forEach((room, roomIndex) => {\n\t\t\t\t\t\t\t\t\ttreeData[regionIndex].subOptions[hospitalIndex].subOptions[departmentIndex].subOptions[floorIndex].subOptions.push({\n\t\t\t\t\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\t\t\t\t\ticon: 'meeting_room',\n\t\t\t\t\t\t\t\t\t\ttype: SectorTypes.ROOM,\n\t\t\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t\t\t\tfloorId: floor.id,\n\t\t\t\t\t\t\t\t\t\tdepartmentId: department.id,\n\t\t\t\t\t\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\t\t\t\t\t\tregionId: region.id,\n\t\t\t\t\t\t\t\t\t\tid: room.id,\n\t\t\t\t\t\t\t\t\t\troomIndex: roomIndex,\n\t\t\t\t\t\t\t\t\t\tstatus: 'online',\n\t\t\t\t\t\t\t\t\t\thelloDeviceId: room.helloDeviceId ? Number(room.helloDeviceId) : null,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tres(treeData);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getMembers(pageSize = 10, pageIndex = 0, searchValue) {\n\tlet params = {\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tsearchValue: searchValue,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/organizations/${APP_CONFIG.companyId}/members`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemMembers(healthSystemId, pageSize = 10, pageIndex = 0, searchValue) {\n\tlet params = {\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tsearchValue: searchValue,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/members`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getInvitedMembers(pageSize = 10, pageIndex = 0, searchValue) {\n\tlet params = {\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tsearchValue: searchValue,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/organization-invites`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemInvitedUsers(healthSystemId, pageSize = 10, pageIndex = 0, searchValue) {\n\tlet params = {\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tsearchValue: searchValue,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/organization-invites`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\n// sign up, activate and accept invitation\nexport function registerUser(values, inviteId, companyId) {\n\treturn new Promise((res, rej) => {\n\t\tlocalApi\n\t\t\t.post(`v2.0/api/organization/signup`, {\n\t\t\t\tType: 21,\n\t\t\t\tOrganizationInviteData: {\n\t\t\t\t\tCompanyId: companyId,\n\t\t\t\t\tInviteId: inviteId,\n\t\t\t\t\tClientType: IdentityClientType,\n\t\t\t\t},\n\t\t\t\tLogInData: {\n\t\t\t\t\tSignInEmail: values.email,\n\t\t\t\t\tSignInPassword: values.password,\n\t\t\t\t},\n\t\t\t\tSignUpModel: {\n\t\t\t\t\tFirstName: values.firstName,\n\t\t\t\t\tLastName: values.lastName,\n\t\t\t\t\tEmail: values.email,\n\t\t\t\t\tPassword: values.password,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function createInvite(emails, inviteTypeId) {\n\tvar users = [];\n\n\temails.forEach(email => {\n\t\tusers.push({ Email: email, InviteTypeId: inviteTypeId });\n\t});\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/companies/${APP_CONFIG.companyId}/organization-invites`, {\n\t\t\t\tInviteInfo: null,\n\t\t\t\tUsers: users,\n\t\t\t\tClientType: ClientTypes.BANYAN,\n\t\t\t})\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function createNurseInvite(emails, inviteTypeId, healthSystems) {\n\tconst users = [];\n\tconst channels = [];\n\temails.forEach(email => {\n\t\tusers.push({ Email: email, InviteTypeId: inviteTypeId });\n\t});\n\thealthSystems.forEach(hs => {\n\t\tchannels.push({ Id: hs.value, Name: hs.label });\n\t});\n\n\tconst data = {\n\t\tUsers: users,\n\t\tInviteInfo: {\n\t\t\tChannels: channels,\n\t\t},\n\t\tClientType: ClientTypes.BANYAN,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/companies/${APP_CONFIG.companyId}/organization-invites`, data)\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function assignMember(healthSystemId, teamId, companyUserId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/levels/${teamId}/assign`, {\n\t\t\t\tCompanyUserId: companyUserId,\n\t\t\t})\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function createAdInvite(emails, inviteTypeId, hospitalId, healthSystem) {\n\tlet users = [];\n\tconst channels = [];\n\n\temails.forEach(email => {\n\t\tusers.push({ Email: email, InviteTypeId: inviteTypeId });\n\t});\n\n\tchannels.push({ Id: healthSystem, Name: '' });\n\n\tconsole.log('channels', channels);\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/companies/${APP_CONFIG.companyId}/ad-organization-invites`, {\n\t\t\t\tInviteInfo: {\n\t\t\t\t\tChannels: channels,\n\t\t\t\t},\n\t\t\t\tUsers: users,\n\t\t\t\tClientType: ClientTypes.BANYAN,\n\t\t\t\thospitalId,\n\t\t\t})\n\t\t\t.then(response => res(response))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteMember(memberId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/companies/${APP_CONFIG.companyId}/members/${memberId}`)\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getInvite(inviteId, email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/invites/${inviteId}`, {\n\t\t\t\tparams: {\n\t\t\t\t\temail: email,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => res(response.data))\n\t\t\t.catch(e => rej(e.response.data));\n\t});\n}\n\nexport function updateInviteStatus(inviteId, statusId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/companies/${APP_CONFIG.companyId}/invites/${inviteId}/status`, {\n\t\t\t\tStatusId: statusId,\n\t\t\t})\n\t\t\t.then(response => res(response.data))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function checkUserAccount(email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/users/${email}/exists`)\n\t\t\t.then(response => res(response.data.result))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function checkIfCompanyMemberExists(email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/members/${email}/exists`)\n\t\t\t.then(response => {\n\t\t\t\tif (response.data.exists) res(response.data.exists);\n\t\t\t\telse rej(response.data.exists);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function acceptInvite(inviteId, email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/companies/${APP_CONFIG.companyId}/organization-invites/${inviteId}/accept`, {\n\t\t\t\tEmail: email,\n\t\t\t})\n\t\t\t.then(response => res(response.data))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addToHealthSystem(healthSystemId, memberId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/organizations/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/vcp-members`, {\n\t\t\t\tId: memberId,\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\tres();\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteHealthSystemMember(healthSystemId, memberId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/organizations/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/vcp-members/${memberId}`)\n\t\t\t.then(() => {\n\t\t\t\tres();\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getNurseHealthSystems(memberId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/vcp-members/${memberId}/healthsystems`)\n\t\t\t.then(response => res(response.data.healthSystems))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateNurse(values, userId, guidUserId, roleId) {\n\treturn new Promise((res, rej) => {\n\t\tlegacyApi\n\t\t\t.put(`v2.1/api/profile/nurse/${userId}`, {\n\t\t\t\tFirstName: values.firstName,\n\t\t\t\tLastName: values.lastName,\n\t\t\t\tCompanyName: 'Banyan',\n\t\t\t\tJobTitle: values.jobTitle ? values.jobTitle : '',\n\t\t\t\tWorkExperienceId: roleId,\n\t\t\t\tNurseUserGuid: guidUserId,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getNurseProfileInfo(userId) {\n\treturn new Promise((res, rej) => {\n\t\tlegacyApi\n\t\t\t.get(`/v2.0/api/profiles/${userId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.Result);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function sendOrganizationPasswordRecoveryEmail(email) {\n\treturn new Promise((res, rej) => {\n\t\tlocalApi\n\t\t\t.post('v2.0/api/organization-account/recover', {\n\t\t\t\temail,\n\t\t\t\tcompanyId: APP_CONFIG.companyId,\n\t\t\t\trecoveryInviteId: null,\n\t\t\t\tuserId: null,\n\t\t\t})\n\t\t\t.then(r => res(r))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function sendRecoveryEmail(email, userId, recoveryInviteId) {\n\treturn new Promise((res, rej) => {\n\t\tlegacyApi\n\t\t\t.post('v2.0/api/organization-account/recover', {\n\t\t\t\temail,\n\t\t\t\tcompanyId: APP_CONFIG.companyId,\n\t\t\t\trecoveryInviteId,\n\t\t\t\tuserId,\n\t\t\t})\n\t\t\t.then(r => res(r.data))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function sendPasswordRecoveredEmail(email, password, code) {\n\treturn new Promise((res, rej) => {\n\t\tlocalApi\n\t\t\t.post('api/account/password-reset', {\n\t\t\t\tEmail: email,\n\t\t\t\tPassword: password,\n\t\t\t\tCode: code,\n\t\t\t\tOrganizationId: APP_CONFIG.companyId,\n\t\t\t})\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function editSuperUserHealthSystem(superCompanyUserId, healthSystemId, pastHealthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/organizations/${APP_CONFIG.companyId}/super-users/${superCompanyUserId}/health-system`, {\n\t\t\t\thealthSystemId,\n\t\t\t\tpastHealthSystemId,\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\tres();\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemSubTreeBasic(healthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/full`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport const getNursesList = async (search = '') => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`/v1/companies/${APP_CONFIG.companyId}/nurses${search ? `?searchPattern=${search}` : ''}`);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import { IDENTITY_CONFIG, METADATA_OIDC } from 'constants/auth-constants';\nimport { localApi, APP_CONFIG, gatewayApi } from 'constants/global-variables';\n// @ts-ignore\nimport { Log, Logger, UserManager, WebStorageStateStore } from 'oidc-client-ts';\nimport { getRoles } from 'api/roles';\nimport { getHealthSystems } from 'api/users';\nimport { UserRoles, UserTypes } from 'constants/enums';\n\nLog.setLogger(console);\n// @ts-ignore\nLog.setLevel(Log.DEBUG);\n\nconst userManager = new UserManager({\n\t...IDENTITY_CONFIG,\n\tuserStore: new WebStorageStateStore({ store: window.localStorage }),\n\tmetadata: {\n\t\t...METADATA_OIDC,\n\t},\n});\n\nfunction clearLocalStorage() {\n\tlocalStorage.removeItem('access_token');\n\tlocalStorage.removeItem('id_token');\n\tlocalStorage.removeItem('userId');\n\tlocalStorage.removeItem('userProfile');\n\tlocalStorage.removeItem('userRole');\n\tlocalStorage.removeItem('memberExists');\n\tlocalStorage.removeItem('userRoleId');\n\tlocalStorage.removeItem('currentHealthSystemInfo');\n\tlocalStorage.removeItem('isRedirectCalled');\n\tlocalStorage.removeItem('nursePoolingStatus');\n}\n\nfunction setUser(data, userInfo, userRole, memberExistsInCompany, userRoleId) {\n\tlocalStorage.setItem('userId', data.sub);\n\tlocalStorage.setItem('userProfile', JSON.stringify(userInfo));\n\tlocalStorage.setItem('userRole', userRole);\n\tlocalStorage.setItem('userRoleId', userRoleId);\n\tlocalStorage.setItem('memberExists', memberExistsInCompany);\n}\n\nexport function setTokens(authResult) {\n\tlocalStorage.setItem('access_token', authResult.accessToken);\n\tlocalStorage.setItem('id_token', authResult.idToken);\n}\n\nasync function setCurrentHealthSystem() {\n\tlet allHealthSystems = await getHealthSystems();\n\tif (allHealthSystems.length !== 0) {\n\t\tlet currentHealthSystemInfo = {\n\t\t\tcurrentHealthSystemId: allHealthSystems[0].id,\n\t\t\tcurrentRegionId: allHealthSystems[0].regions[0].id,\n\t\t};\n\t\tlocalStorage.setItem('currentHealthSystemInfo', JSON.stringify(currentHealthSystemInfo));\n\t}\n}\n\nfunction navigateToApp() {\n\tconst redirectUri = localStorage.getItem('redirectUri') ? localStorage.getItem('redirectUri') : '/';\n\twindow.location.replace(redirectUri);\n}\n\nasync function fetchUserProfile() {\n\ttry {\n\t\tconst response = await localApi.get('/api/profile');\n\t\treturn { data: response.data, err: false };\n\t} catch (ex) {\n\t\treturn { err: true };\n\t}\n}\n\nfunction swapToken(token) {\n\treturn new Promise((res, rej) => {\n\t\tlocalApi\n\t\t\t.post('/api/swap-token', { token: token })\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tLogger.info(e);\n\t\t\t\trej(e);\n\t\t\t});\n\t});\n}\n\nfunction checkMember(email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/members/${email}/exists`)\n\t\t\t.then(response => res(response.data.exists))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport async function signinRedirectCallback() {\n\ttry {\n\t\tawait userManager.signinRedirectCallback();\n\t\tconsole.log('Successfully signed in');\n\t} catch (ex) {\n\t\tconsole.error('Signin redirect call failed, ', ex);\n\t\tif (ex.message.includes('iat is in the future') || ex.message.includes('exp is in the past')) {\n\t\t\twindow.location.href = '/time-error';\n\t\t\treturn;\n\t\t}\n\t\tnavigateToApp();\n\t}\n}\n\nexport function logout() {\n\tuserManager.signoutRedirect({\n\t\tid_token_hint: localStorage.getItem('id_token'),\n\t});\n\tuserManager.clearStaleState();\n}\n\nexport function signoutRedirectCallback() {\n\tuserManager.signoutRedirectCallback().then(() => {\n\t\tclearLocalStorage();\n\t\twindow.location.replace(IDENTITY_CONFIG.public_uri);\n\t});\n\n\tuserManager.clearStaleState();\n}\n\nfunction parseJwt(token) {\n\tconst base64Url = token.split('.')[1];\n\tconst base64 = base64Url.replace('-', '+').replace('_', '/');\n\treturn JSON.parse(window.atob(base64));\n}\n\nexport function isAuthenticated() {\n\tconst accessToken = localStorage.getItem('access_token');\n\treturn !!accessToken;\n}\n\nexport function memberExists() {\n\tconst val = localStorage.getItem('memberExists');\n\treturn val === 'true';\n}\n\nexport function signinRedirect(isJWTRoute = false) {\n\tconst localAzJwt = localStorage.getItem('azure_jwt');\n\n\tif (isJWTRoute || (!isJWTRoute && localAzJwt)) {\n\t\t// We don't the redirectUri to get overridden\n\t\tif (!(!window.location.hash && localAzJwt)) {\n\t\t\t// In case we are dealing with AZURE JWT, thats the case we need the reidrectUri to get set.\n\t\t\tlocalStorage.setItem('redirectUri', window.location.pathname);\n\t\t}\n\t} else {\n\t\t// For every other case, just override the redirectUri\n\t\tlocalStorage.setItem('redirectUri', window.location.pathname);\n\t}\n\n\tif (window.location.hash || localAzJwt) {\n\t\tconst hash = window.location.hash.substring(1);\n\t\tlet jwt;\n\t\tif (hash) {\n\t\t\t[, jwt] = hash.split('=');\n\t\t} else {\n\t\t\tjwt = localAzJwt;\n\t\t}\n\t\tswapToken(jwt).then(response => {\n\t\t\tconst args = {};\n\t\t\tconst claims = parseJwt(jwt);\n\t\t\tif (claims.preferred_username) {\n\t\t\t\targs.login_hint = claims.preferred_username;\n\t\t\t}\n\t\t\tif (response) {\n\t\t\t\targs.acr_values = `sol_ref:${response}`;\n\t\t\t}\n\t\t\tlocalStorage.removeItem('azure_jwt'); // Remove JWT so we can logout without getting redirected\n\t\t\tuserManager.signinRedirect(args);\n\t\t});\n\t} else {\n\t\tuserManager.signinRedirect({});\n\t}\n}\n\n// NOTE: This function works with Sol.Identity authentication as well.\nexport function isAzureAuthentication() {\n\tif (isAuthenticated()) {\n\t\tconst localAzJwt = localStorage.getItem('azure_jwt');\n\t\tif (window.location.hash || localAzJwt) {\n\t\t\tlet jwt;\n\t\t\tconst hash = window.location.hash.substring(1);\n\t\t\tif (hash) {\n\t\t\t\t[, jwt] = hash.split('=');\n\t\t\t} else {\n\t\t\t\tjwt = localAzJwt;\n\t\t\t}\n\t\t\tconst userToken = parseJwt(jwt);\n\t\t\tconst userInfo = JSON.parse(localStorage.getItem('userProfile'));\n\t\t\tconst shouldLogout = userInfo.email !== userToken.preferred_username; // Different user\n\t\t\tif (shouldLogout) {\n\t\t\t\tlocalStorage.setItem('azure_jwt', jwt);\n\t\t\t\tlogout();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\twindow.location.hash = '';\n\t\tif (window.location.href.endsWith('#')) {\n\t\t\twindow.location.href = window.location.href.slice(0, -1);\n\t\t}\n\t\treturn true; // Same user\n\t}\n\treturn false;\n}\n\nexport function signinSilentCallback() {\n\tuserManager.signinSilentCallback();\n}\nexport function createSigninRequest() {\n\treturn userManager.createSigninRequest();\n}\n\nexport async function getUser() {\n\tconst user = await userManager.getUser();\n\tif (!user) {\n\t\treturn userManager.signinRedirectCallback();\n\t}\n\treturn user;\n}\n\nexport function getAccessToken() {\n\tif (!localStorage.getItem('access_token')) {\n\t\tthrow new Error('Attempted to access unloaded access token');\n\t}\n\n\treturn localStorage.getItem('access_token');\n}\n\nexport function getUserId() {\n\tif (!localStorage.getItem('userId')) {\n\t\tthrow new Error('Attempted to access unloaded userId');\n\t}\n\n\tlet userId = localStorage.getItem('userId');\n\treturn userId;\n}\n\nexport function hasUserProfile() {\n\treturn !!localStorage.getItem('userProfile');\n}\n\nexport function getUserProfile() {\n\tif (!localStorage.getItem('userProfile')) {\n\t\tthrow new Error('Attempted to access unloaded userInfo');\n\t}\n\n\tlet userInfo = localStorage.getItem('userProfile');\n\treturn JSON.parse(userInfo);\n}\n\nexport function setUserProfile(newProfile) {\n\tlocalStorage.setItem('userProfile', JSON.stringify(newProfile));\n}\n\nexport function getUserRole() {\n\tif (!localStorage.getItem('userRole')) {\n\t\tthrow new Error('Attempted to access non-existing userRole');\n\t}\n\n\tconst userRole = localStorage.getItem('userRole');\n\tswitch (userRole) {\n\t\tcase UserRoles.ADMIN:\n\t\t\treturn UserRoles.ADMIN;\n\t\tcase UserRoles.NURSE:\n\t\t\treturn UserRoles.NURSE;\n\t\tcase UserRoles.VIRTUALSITTER:\n\t\t\treturn UserRoles.VIRTUALSITTER;\n\t\tcase UserRoles.SUPERUSER:\n\t\t\treturn UserRoles.SUPERUSER;\n\t\tdefault:\n\t\t\tthrow new Error('Invalid user role');\n\t}\n}\n\nexport function getUserRoleId() {\n\treturn localStorage.getItem('userRoleId');\n}\n\nexport async function setUserInfo() {\n\tlet accessToken = localStorage.getItem('access_token');\n\tconst data = parseJwt(accessToken);\n\n\tconst { data: userProfile, err } = await fetchUserProfile();\n\n\tif (err) {\n\t\tlocalStorage.setItem('memberExists', 'false');\n\t} else {\n\t\tlet exists = await checkMember(userProfile.email);\n\t\tlet userRole = UserRoles.NURSE;\n\t\tlet userRoleId = UserTypes.VIRTUALCAREPROVIDER;\n\n\t\tif (exists) {\n\t\t\tlet userRoles = await getRoles(APP_CONFIG.companyId, data.sub);\n\t\t\tuserRoles.forEach(role => {\n\t\t\t\tif (role.name === UserRoles.ADMIN) {\n\t\t\t\t\tuserRole = UserRoles.ADMIN;\n\t\t\t\t\tuserRoleId = UserTypes.ADMIN;\n\t\t\t\t} else if (role.name === UserRoles.VIRTUALSITTER) {\n\t\t\t\t\tuserRole = UserRoles.VIRTUALSITTER;\n\t\t\t\t\tuserRoleId = UserTypes.VIRTUALSITTER;\n\t\t\t\t} else if (role.name === UserRoles.SUPERUSER) {\n\t\t\t\t\tuserRole = UserRoles.SUPERUSER;\n\t\t\t\t\tuserRoleId = UserTypes.SUPERUSER;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tsetUser(data, userProfile, userRole, exists, userRoleId);\n\t\tif (exists && !localStorage.getItem('currentHealthSystemInfo')) {\n\t\t\tawait setCurrentHealthSystem();\n\t\t}\n\t}\n}\n\nexport function signinSilent() {\n\tuserManager\n\t\t.signinSilent({ scope: IDENTITY_CONFIG.scope, response_type: IDENTITY_CONFIG.response_type })\n\t\t.then(user => {\n\t\t\tLogger.info('signed in', user);\n\t\t})\n\t\t.catch(err => {\n\t\t\tLogger.error('signinSilent error thrown.', err);\n\t\t\tif (err.message === 'login_required') {\n\t\t\t\tLogger.info('Session on identity has expired. Login is required');\n\t\t\t\tLogger.info('Invoking signoutRedirectCallback()...');\n\t\t\t\tsignoutRedirectCallback();\n\t\t\t} else if (err.message === 'IFrame timed out without a response') {\n\t\t\t\tLogger.info('Frame window timed out');\n\t\t\t\tLogger.info('Invoking signoutRedirectCallback()...');\n\t\t\t\tsignoutRedirectCallback();\n\t\t\t} else if (err.message.includes('iat is in the future') || err.message.includes('exp is in the past')) {\n\t\t\t\tconst isRedirectCalled = localStorage.getItem('isRedirectCalled');\n\t\t\t\t// Temporary Fix. We need to check why this component is being rendered twice.\n\t\t\t\tif (!isRedirectCalled) {\n\t\t\t\t\tlocalStorage.setItem('isRedirectCalled', 'true');\n\t\t\t\t\twindow.location.href = '/time-error';\n\t\t\t\t} else {\n\t\t\t\t\tlocalStorage.removeItem('isRedirectCalled');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n}\n\nuserManager.events.addUserLoaded(user => {\n\tlocalStorage.setItem('access_token', user.access_token);\n\tlocalStorage.setItem('id_token', user.id_token);\n\n\tsetUserInfo().then(() => {\n\t\tif (window.location.href.indexOf('signin-oidc') !== -1) {\n\t\t\tnavigateToApp();\n\t\t}\n\t});\n});\n\nuserManager.events.addSilentRenewError(e => {\n\tLogger.info('silent renew error', e.message);\n});\n\nuserManager.events.addAccessTokenExpired(() => {\n\tLogger.info('token expired');\n\tsigninSilent();\n});\n\nuserManager.events.addAccessTokenExpiring(() => {\n\tLogger.info('token expiring');\n\tsigninSilent();\n});\n","import React, { Component } from 'react';\nimport {\n\tsigninRedirectCallback,\n\tlogout,\n\tsignoutRedirectCallback,\n\tisAuthenticated,\n\tsigninRedirect,\n\tsigninSilentCallback,\n\tcreateSigninRequest,\n\tisAzureAuthentication,\n} from 'infrastructure/auth';\n\nconst AuthContext = React.createContext({\n\tsigninRedirectCallback: () => ({}),\n\tlogout: () => ({}),\n\tsignoutRedirectCallback: () => ({}),\n\tisAuthenticated: () => ({}),\n\tsigninRedirect: isAzureJWT => ({}),\n\tsigninSilentCallback: () => ({}),\n\tcreateSigninRequest: () => ({}),\n\tisAzureAuthentication: () => ({}),\n});\n\nexport const AuthConsumer = AuthContext.Consumer;\n\nexport class AuthProvider extends Component {\n\tauthService;\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.authService = {\n\t\t\tsigninRedirectCallback: signinRedirectCallback,\n\t\t\tlogout: logout,\n\t\t\tsignoutRedirectCallback: signoutRedirectCallback,\n\t\t\tisAuthenticated: isAuthenticated,\n\t\t\tsigninRedirect: signinRedirect,\n\t\t\tsigninSilentCallback: signinSilentCallback,\n\t\t\tcreateSigninRequest: createSigninRequest,\n\t\t\tisAzureAuthentication: isAzureAuthentication,\n\t\t};\n\t}\n\n\trender() {\n\t\treturn {this.props.children};\n\t}\n}\n","import React from 'react';\n\nconst Loader = props => ;\n\nexport default Loader;\n","import React from 'react';\n\nconst Grid = props => (\n\t\n\t\t{props.children}\n\t\n);\n\nexport default Grid;\n","import React from 'react';\nimport { AuthConsumer } from '../../providers/authProvider';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\n\nconst Callback = () => (\n\t\n\t\t{({ signinRedirectCallback }) => {\n\t\t\tconst isRedirectCalled = localStorage.getItem('isRedirectCalled');\n\t\t\t// Temporary Fix. We need to check why this component is being rendered twice.\n\t\t\tif (!isRedirectCalled) {\n\t\t\t\tlocalStorage.setItem('isRedirectCalled', 'true');\n\t\t\t\tsigninRedirectCallback();\n\t\t\t} else {\n\t\t\t\tlocalStorage.removeItem('isRedirectCalled');\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}}\n\t
\n);\n\nexport default Callback;\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nfunction signOut() {\n\twindow.location.href = '/logout';\n}\n\nconst UserError = props => (\n\t\n\t\t
\n\t\t\t

You are not authorized to access this page.

\n\t\t\tmember-error\n\t\t\t

If you think there has been a mistake, please contact your administrator.

\n\t\t\t\n\t\t\t\tClick here to login with another account.\n\t\t\t\n\t\t
\n\t
\n);\n\nexport default UserError;\n","import { gatewayApi, legacyApi, APP_CONFIG } from 'constants/global-variables';\nimport { UserRoles } from 'constants/enums';\nimport { OverviewActionTypes } from 'constants/action-types';\n\nexport const actionCreators = {\n\ttoggleLeftNavigation: () => ({ type: OverviewActionTypes.toggleLeftNavigation }),\n\tsetUserInfo: data => async (dispatch, getState) => {\n\t\tconst userId = localStorage.getItem('userId');\n\t\tconst url = `/v1/companies/organizations/${APP_CONFIG.companyId}/members/${userId}/roles`;\n\t\tconst response = await gatewayApi.get(url);\n\n\t\tlet userRole = UserRoles.NURSE;\n\t\tresponse.data.roles.forEach(role => {\n\t\t\tif (role.name === UserRoles.ADMIN) {\n\t\t\t\tuserRole = UserRoles.ADMIN;\n\t\t\t\treturn;\n\t\t\t} else if (role.name === UserRoles.VIRTUALSITTER) {\n\t\t\t\tuserRole = UserRoles.VIRTUALSITTER;\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\n\t\tlet userInfo = {\n\t\t\trole: userRole,\n\t\t};\n\n\t\tdispatch({ type: OverviewActionTypes.setUserInfo, payload: userInfo });\n\t},\n\taddNewUserRole: data => async (dispatch, getState) => {\n\t\tconst url = `/v1.1/api/profile/UpdateUserWorkExperience`;\n\t\treturn await legacyApi.post(url, data);\n\t},\n\tupdateUserRole: data => async (dispatch, getState) => {\n\t\tconst url = `/v1.1/api/profile/SaveUserCompany`;\n\t\treturn await legacyApi.post(url, data);\n\t},\n};\n","import React, { Component } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport classNames from 'classnames/bind';\n\nclass LeftNavigation extends Component {\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default LeftNavigation;\n","import { UserTypes, DeviceListLevel, SectorTypes, UserRoles, ParticipantState, MediaPermissions, MediaInputs, KeyCodes } from 'constants/enums';\nimport React from 'react';\nimport { getUserProfile, getUserRole } from 'infrastructure/auth';\n\nexport function isLoggedInUserAdmin() {\n\tconst userProfile = getUserProfile();\n\tlet isAdmin = userProfile.roles.some(role => {\n\t\treturn role.id === UserTypes.ADMIN;\n\t});\n\n\treturn isAdmin;\n}\n\nexport function getCurrentHealthSystemInfo() {\n\tlet currentHealthSystem = localStorage.getItem('currentHealthSystemInfo');\n\treturn JSON.parse(currentHealthSystem);\n}\n\nexport async function askForPermission(permissionFor) {\n\ttry {\n\t\tconst response = await navigator.mediaDevices.getUserMedia(permissionFor);\n\t\treturn { permission: MediaPermissions.GRANTED, response };\n\t} catch (error) {\n\t\treturn { error };\n\t}\n}\n\n/**\n * @returns {Promise}\n */\nexport async function checkForPermission(permissionFor) {\n\ttry {\n\t\treturn await navigator.permissions.query({ name: permissionFor });\n\t} catch (error) {\n\t\treturn { error };\n\t}\n}\n\nexport async function checkIfMediaDevicesPlugged() {\n\ttry {\n\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\tlet pluggedDevices = {\n\t\t\tmicrophone: false,\n\t\t\tcamera: false,\n\t\t};\n\n\t\tdevices.forEach(device => {\n\t\t\tif (device.kind === MediaInputs.AUDIO_INPUT) {\n\t\t\t\tpluggedDevices.microphone = true;\n\t\t\t}\n\n\t\t\tif (device.kind === MediaInputs.VIDEO_INPUT) {\n\t\t\t\tpluggedDevices.camera = true;\n\t\t\t}\n\t\t});\n\t\treturn pluggedDevices;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n}\n\nexport function isMacintosh() {\n\treturn navigator.platform.includes('Mac');\n}\n\nexport function getHierarchyFromBreadcrumb(breadcrumb) {\n\tlet hierarchy = '';\n\tbreadcrumb.forEach(({ name }, index) => {\n\t\tif (index > 2) {\n\t\t\thierarchy = hierarchy + ' - ' + name;\n\t\t} else {\n\t\t\thierarchy = hierarchy + ', ' + name;\n\t\t}\n\t});\n\treturn hierarchy.substring(2);\n}\n\nexport function findSectorById(arr, id) {\n\treturn arr.reduce((accumulator, item) => {\n\t\tif (accumulator) {\n\t\t\treturn accumulator;\n\t\t}\n\t\t//comparing whether the id given as argument is equal to any of the items declared in the array.\n\t\tif ([item.regionId, item.hospitalId, item.departmentId, item.floorId, item.roomId, item.id, item.helloDeviceId].includes(id)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (item.subOptions) {\n\t\t\treturn findSectorById(item.subOptions, id);\n\t\t}\n\t}, null);\n}\n\nexport function findDeviceById(arr, id) {\n\treturn arr.reduce((accumulator, item) => {\n\t\tif (accumulator) {\n\t\t\treturn accumulator;\n\t\t}\n\t\tif (+item.helloDeviceId === +id) {\n\t\t\treturn item;\n\t\t}\n\t\tif (item.subOptions) {\n\t\t\treturn findDeviceById(item.subOptions, +id);\n\t\t}\n\t}, null);\n}\n\nexport function sortArrayByProperty(array, property) {\n\treturn array.sort((a, b) => a[property] - b[property]);\n}\n\nexport function getHierarchyByHelloDeviceId(arr, id) {\n\treturn arr.reduce((accumulator, item) => {\n\t\tif (accumulator) {\n\t\t\treturn accumulator;\n\t\t}\n\n\t\tif (+item.helloDeviceId === +id) {\n\t\t\treturn getHierarchyFromBreadcrumb(item.breadcrumb);\n\t\t}\n\t\tif (item.subOptions) {\n\t\t\treturn getHierarchyByHelloDeviceId(item.subOptions, id);\n\t\t}\n\t}, null);\n}\n\nexport function searchSectors(arr, name, sectors = []) {\n\tarr.forEach((item, index) => {\n\t\tif (item.isNewOption) {\n\t\t\tarr.splice(index, 1);\n\t\t\treturn;\n\t\t}\n\t\tif (!name) {\n\t\t\titem.hidden = false;\n\t\t\titem.matchesSearch = false;\n\t\t} else if (item.name.toLowerCase().includes(name.toLowerCase())) {\n\t\t\titem.hidden = false;\n\t\t\titem.matchesSearch = true;\n\t\t\tsectors.push(item);\n\t\t} else {\n\t\t\titem.hidden = true;\n\t\t\titem.matchesSearch = false;\n\t\t}\n\t\tif (item.subOptions) {\n\t\t\tsearchSectors(item.subOptions, name, sectors);\n\t\t}\n\t});\n\treturn sectors;\n}\n\nexport function showPath(tree, arr) {\n\tarr.forEach(item => {\n\t\tif (item.hospitalId) {\n\t\t\tlet hospital = findSectorById(tree, item.hospitalId);\n\t\t\thospital.hidden = false;\n\t\t\thospital.matchesSearch = true;\n\t\t}\n\n\t\tif (item.departmentId) {\n\t\t\tlet department = findSectorById(tree, item.departmentId);\n\t\t\tdepartment.hidden = false;\n\t\t\tdepartment.matchesSearch = true;\n\t\t}\n\n\t\tif (item.floorId) {\n\t\t\tlet floor = findSectorById(tree, item.floorId);\n\t\t\tfloor.hidden = false;\n\t\t\tfloor.matchesSearch = true;\n\t\t}\n\t});\n}\n\nexport function getInitialsColor(letter) {\n\tconst obj = {};\n\tif (!letter) {\n\t\tobj.color = `4772f3`;\n\t\tobj.backgroundColor = `d0e2fd`;\n\t\treturn obj;\n\t}\n\tswitch (letter.toLowerCase().trim()) {\n\t\tcase 'a':\n\t\tcase 'n':\n\t\tcase '0': {\n\t\t\tobj.color = `4772f3`;\n\t\t\tobj.backgroundColor = `d0e2fd`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'b':\n\t\tcase 'o':\n\t\tcase '1': {\n\t\t\tobj.color = `e361c9`;\n\t\t\tobj.backgroundColor = `edd2fc`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'c':\n\t\tcase 'p':\n\t\tcase '2': {\n\t\t\tobj.color = `eb605e`;\n\t\t\tobj.backgroundColor = `f9dcd2`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'd':\n\t\tcase 'q':\n\t\tcase '3': {\n\t\t\tobj.color = `15a6ff`;\n\t\t\tobj.backgroundColor = `d2f0fc`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'e':\n\t\tcase 'r':\n\t\tcase '4': {\n\t\t\tobj.color = `44ccb5`;\n\t\t\tobj.backgroundColor = `d2f7ec`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'f':\n\t\tcase 's':\n\t\tcase '5': {\n\t\t\tobj.color = `dd995b`;\n\t\t\tobj.backgroundColor = `f7e4d2`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'g':\n\t\tcase 't':\n\t\tcase '6': {\n\t\t\tobj.color = `e2619c`;\n\t\t\tobj.backgroundColor = `f9d2f8`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'h':\n\t\tcase 'u':\n\t\tcase '7': {\n\t\t\tobj.color = `73c140`;\n\t\t\tobj.backgroundColor = `d2f7d6`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'i':\n\t\tcase 'v':\n\t\tcase '8': {\n\t\t\tobj.color = `8a64dd`;\n\t\t\tobj.backgroundColor = `e2d2f9`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'j':\n\t\tcase 'w':\n\t\tcase '9': {\n\t\t\tobj.color = `d3f4e8`;\n\t\t\tobj.backgroundColor = `41837a`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'k':\n\t\tcase 'x': {\n\t\t\tobj.color = `b94557`;\n\t\t\tobj.backgroundColor = `f4d3d3`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'l':\n\t\tcase 'y': {\n\t\t\tobj.color = `3c9045`;\n\t\t\tobj.backgroundColor = `d2f7d6`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'm':\n\t\tcase 'z': {\n\t\t\tobj.color = `70a8b5`;\n\t\t\tobj.backgroundColor = `e8f5f9`;\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t}\n\treturn obj;\n}\n\nexport function decodeHtml(txt) {\n\tconst Entities = require('html-entities').AllHtmlEntities;\n\n\tconst entities = new Entities();\n\n\treturn entities.decode(txt);\n}\n\nexport function mapSectionsToRender(hospitals, sector, toggleEditSectorModal, initDeleteOrg) {\n\tlet result = {\n\t\thospitals: [],\n\t\tdepartments: [],\n\t\tfloors: [],\n\t\trooms: [],\n\t};\n\tif (!hospitals || hospitals.length === 0) {\n\t\treturn result;\n\t}\n\tlet selectedSector = findSectorById(hospitals, sector[sector.sectorType + 'Id']);\n\tif (!selectedSector) {\n\t\treturn result;\n\t}\n\n\tconst userRole = getUserRole();\n\tif (sector.sectorType === SectorTypes.HOSPITAL) {\n\t\tselectedSector.subOptions.forEach(department => {\n\t\t\tresult.departments.push({\n\t\t\t\tname: department.name,\n\t\t\t\tid: department.departmentId,\n\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\tsectorName: department.name,\n\t\t\t\t\t\t\t\t\tsectorType: department.type,\n\t\t\t\t\t\t\t\t\thospitalId: department.hospitalId,\n\t\t\t\t\t\t\t\t\tdepartmentId: department.departmentId,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t \n\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.DEPARTMENT, id: department.departmentId, name: department.name })}>\n\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t),\n\t\t\t});\n\t\t\tdepartment.subOptions.forEach(floor => {\n\t\t\t\tresult.floors.push({\n\t\t\t\t\tname: floor.name,\n\t\t\t\t\tid: floor.floorId,\n\t\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\t\tsectorName: floor.name,\n\t\t\t\t\t\t\t\t\t\tsectorType: floor.type,\n\t\t\t\t\t\t\t\t\t\thospitalId: floor.hospitalId,\n\t\t\t\t\t\t\t\t\t\tdepartmentId: department.departmentId,\n\t\t\t\t\t\t\t\t\t\tfloorId: floor.floorId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.FLOOR, id: floor.floorId, name: floor.name })}>\n\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t\tfloor.subOptions.forEach(room => {\n\t\t\t\t\tresult.rooms.push({\n\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\tid: room.roomId,\n\t\t\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\t\t\tsectorName: room.name,\n\t\t\t\t\t\t\t\t\t\t\tsectorType: room.type,\n\t\t\t\t\t\t\t\t\t\t\thospitalId: floor.hospitalId,\n\t\t\t\t\t\t\t\t\t\t\tdepartmentId: department.departmentId,\n\t\t\t\t\t\t\t\t\t\t\tfloorId: floor.floorId,\n\t\t\t\t\t\t\t\t\t\t\troomId: room.roomId,\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.ROOM, id: room.roomId, name: room.name })}>\n\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t),\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tif (sector.sectorType === SectorTypes.DEPARTMENT) {\n\t\tselectedSector.subOptions.forEach(floor => {\n\t\t\tresult.floors.push({\n\t\t\t\tname: floor.name,\n\t\t\t\tid: floor.floorId,\n\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\tsectorName: floor.name,\n\t\t\t\t\t\t\t\t\tsectorType: floor.type,\n\t\t\t\t\t\t\t\t\thospitalId: floor.hospitalId,\n\t\t\t\t\t\t\t\t\tdepartmentId: floor.departmentId,\n\t\t\t\t\t\t\t\t\tfloorId: floor.floorId,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t \n\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.FLOOR, id: floor.floorId, name: floor.name })}>\n\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t),\n\t\t\t});\n\t\t\tfloor.subOptions.forEach(room => {\n\t\t\t\tresult.rooms.push({\n\t\t\t\t\tname: room.name,\n\t\t\t\t\tid: room.roomId,\n\t\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\t\tsectorName: room.name,\n\t\t\t\t\t\t\t\t\t\tsectorType: room.type,\n\t\t\t\t\t\t\t\t\t\thospitalId: floor.hospitalId,\n\t\t\t\t\t\t\t\t\t\tdepartmentId: room.departmentId,\n\t\t\t\t\t\t\t\t\t\tfloorId: floor.floorId,\n\t\t\t\t\t\t\t\t\t\troomId: room.roomId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.ROOM, id: room.roomId, name: room.name })}>\n\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tif (sector.sectorType === SectorTypes.FLOOR) {\n\t\tselectedSector.subOptions.forEach(room => {\n\t\t\tresult.rooms.push({\n\t\t\t\tname: room.name,\n\t\t\t\tid: room.roomId,\n\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\tsectorName: room.name,\n\t\t\t\t\t\t\t\t\tsectorType: room.type,\n\t\t\t\t\t\t\t\t\thospitalId: room.hospitalId,\n\t\t\t\t\t\t\t\t\tdepartmentId: room.departmentId,\n\t\t\t\t\t\t\t\t\tfloorId: room.floorId,\n\t\t\t\t\t\t\t\t\troomId: room.roomId,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t \n\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.ROOM, id: room.roomId, name: room.name })}>\n\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t),\n\t\t\t});\n\t\t});\n\t}\n\n\treturn result;\n}\n\nexport function getParentSector(arr, element) {\n\tlet parent = {};\n\tif (element.type === SectorTypes.ROOM) {\n\t\tparent = findSectorById(arr, element.floorId);\n\t}\n\tif (element.type === SectorTypes.FLOOR) {\n\t\tparent = findSectorById(arr, element.departmentId);\n\t}\n\tif (element.type === SectorTypes.DEPARTMENT) {\n\t\tparent = findSectorById(arr, element.hospitalId);\n\t}\n\treturn parent;\n}\n\nexport function isValidSector(currentSector, tree, sectorName) {\n\tlet sameLevelSectors;\n\tif (currentSector.type === SectorTypes.HOSPITAL) {\n\t\tsameLevelSectors = tree.filter(s => s.isNewOption === undefined);\n\t\tlet hospitalExists = Object.entries(sameLevelSectors[0]).length > 0;\n\t\tif (!hospitalExists) {\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\tsameLevelSectors = getParentSector(tree, currentSector).subOptions.filter(s => s.isNewOption === undefined);\n\t}\n\n\treturn !sameLevelSectors.some(s => s.name.toLowerCase() === sectorName.toLowerCase());\n}\n\nexport function getSectorPath(sector) {\n\tlet result = {};\n\tif (!sector) {\n\t\treturn result;\n\t}\n\tif (sector.type === SectorTypes.HOSPITAL) {\n\t\tresult[sector.regionId] = {};\n\t}\n\tif (sector.type === SectorTypes.DEPARTMENT) {\n\t\tresult[sector.regionId] = {};\n\t\tresult[sector.regionId][sector.hospitalId] = {};\n\t}\n\tif (sector.type === SectorTypes.FLOOR) {\n\t\tresult[sector.regionId] = {};\n\t\tresult[sector.regionId][sector.hospitalId] = {};\n\t\tresult[sector.regionId][sector.hospitalId][sector.departmentId] = {};\n\t}\n\tif (sector.type === SectorTypes.ROOM) {\n\t\tresult[sector.regionId] = {};\n\t\tresult[sector.regionId][sector.hospitalId] = {};\n\t\tresult[sector.regionId][sector.hospitalId][sector.departmentId] = {};\n\t\tresult[sector.regionId][sector.hospitalId][sector.departmentId][sector.floorId] = {};\n\t}\n\treturn result;\n}\n\nexport function buildTreeModel(hospitals, assignMode) {\n\tlet treeData = [];\n\tlet baseurl = '/health-system';\n\tlet isMonitoring;\n\tlet userRole = getUserRole();\n\tif (window.location.pathname.includes('monitoring')) {\n\t\tisMonitoring = true;\n\t\tbaseurl = '/monitoring';\n\t}\n\n\tfunction tooltipOptions(hasDevice) {\n\t\tif (isMonitoring && hasDevice) {\n\t\t\treturn 'Add to monitoring view';\n\t\t}\n\n\t\tif (assignMode && !hasDevice) {\n\t\t\treturn 'Assign device';\n\t\t}\n\t\treturn '';\n\t}\n\n\thospitals.forEach((hospital, hospitalIndex) => {\n\t\tif (hospitalIndex === 0) {\n\t\t\ttreeData.firstHospitalId = hospital.id;\n\t\t}\n\n\t\ttreeData.push({\n\t\t\tname: hospital.name,\n\t\t\ticon: 'business',\n\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\ttooltip: userRole === UserRoles.ADMIN ? 'Add Department' : false,\n\t\t\ttype: 'hospital',\n\t\t\tsubOptions: [],\n\t\t\thospitalId: hospital.id,\n\t\t\tbreadcrumb: [\n\t\t\t\t{\n\t\t\t\t\tname: hospital.name,\n\t\t\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\t\t},\n\t\t\t],\n\t\t});\n\n\t\thospital.departments.forEach((department, departmentIndex) => {\n\t\t\ttreeData[hospitalIndex].subOptions.push({\n\t\t\t\tname: department.name,\n\t\t\t\ticon: 'account_balance',\n\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}`,\n\t\t\t\ttooltip: userRole === UserRoles.ADMIN ? 'Add Floor' : false,\n\t\t\t\ttype: 'department',\n\t\t\t\tsubOptions: [],\n\t\t\t\tdepartmentId: department.id,\n\t\t\t\thospitalId: hospital.id,\n\t\t\t\tbreadcrumb: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\ttreeLocation: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\ticon: 'business',\n\t\t\t\t\t\ttype: 'hospital',\n\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\ticon: 'account_balance',\n\t\t\t\t\t\t\t\ttype: 'department',\n\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t});\n\t\t\tdepartment.floors.forEach((floor, floorIndex) => {\n\t\t\t\ttreeData[hospitalIndex].subOptions[departmentIndex].subOptions.push({\n\t\t\t\t\tname: floor.name,\n\t\t\t\t\ticon: 'money',\n\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}`,\n\t\t\t\t\ttooltip: userRole === UserRoles.ADMIN ? 'Add Room' : false,\n\t\t\t\t\ttype: 'floor',\n\t\t\t\t\tsubOptions: [],\n\t\t\t\t\tfloorId: floor.id,\n\t\t\t\t\tdepartmentId: department.id,\n\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\tbreadcrumb: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\ttreeLocation: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\ticon: 'business',\n\t\t\t\t\t\t\ttype: 'hospital',\n\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\t\ticon: 'account_balance',\n\t\t\t\t\t\t\t\t\ttype: 'department',\n\t\t\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\t\t\t\t\ticon: 'meeting_room',\n\t\t\t\t\t\t\t\t\t\t\ttype: 'room',\n\t\t\t\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t});\n\n\t\t\t\tfloor.rooms.forEach((room, roomIndex) => {\n\t\t\t\t\ttreeData[hospitalIndex].subOptions[departmentIndex].subOptions[floorIndex].subOptions.push({\n\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\ticon: 'meeting_room',\n\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}/room/${room.id}`,\n\t\t\t\t\t\ttype: 'room',\n\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\troomId: room.id,\n\t\t\t\t\t\troomIndex: roomIndex,\n\t\t\t\t\t\tfloorId: floor.id,\n\t\t\t\t\t\tdepartmentId: department.id,\n\t\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\t\ttooltip: tooltipOptions(room.helloDeviceId),\n\t\t\t\t\t\tbreadcrumb: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}/room/${room.id}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tstatus: room.isOnline ? 'online' : 'offline',\n\t\t\t\t\t\tdeviceBusy: room.callState === ParticipantState.CONNECTED.type,\n\t\t\t\t\t\thelloDeviceId: room.helloDeviceId,\n\t\t\t\t\t\ttreeLocation: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\t\ticon: 'business',\n\t\t\t\t\t\t\t\ttype: 'hospital',\n\t\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\t\t\ticon: 'account_balance',\n\t\t\t\t\t\t\t\t\t\ttype: 'department',\n\t\t\t\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\t\t\t\t\t\ticon: 'money',\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'floor',\n\t\t\t\t\t\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon: 'meeting_room',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}/room/${room.id}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype: 'room',\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n\n\treturn treeData;\n}\n\nexport function getLevelDevices(option) {\n\tlet devices = [];\n\tswitch (option.type) {\n\t\tcase 'hospital': {\n\t\t\tconst departments = option.subOptions;\n\t\t\tdepartments.forEach(department => {\n\t\t\t\tconst floors = department.subOptions;\n\t\t\t\tfloors.forEach(floor => {\n\t\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\t\trooms.forEach(room => {\n\t\t\t\t\t\tif (room.helloDeviceId !== undefined) {\n\t\t\t\t\t\t\tdevices.push(room.helloDeviceId);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tcase 'department': {\n\t\t\tconst floors = option.subOptions;\n\t\t\tfloors.forEach(floor => {\n\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\trooms.forEach(room => {\n\t\t\t\t\tif (room.helloDeviceId !== undefined) {\n\t\t\t\t\t\tdevices.push(room.helloDeviceId);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tcase 'floor': {\n\t\t\tconst rooms = option.subOptions;\n\t\t\trooms.forEach(room => {\n\t\t\t\tif (room.helloDeviceId !== undefined) {\n\t\t\t\t\tdevices.push(room.helloDeviceId);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tdefault:\n\t\t\treturn devices;\n\t}\n}\n\nexport function getDeviceAssignedRoom(tree, deviceId) {\n\tconst option = {};\n\ttree.forEach(region => {\n\t\tconst hospitals = region.subOptions;\n\t\thospitals.forEach(hospital => {\n\t\t\tconst departments = hospital.subOptions;\n\t\t\tdepartments.forEach(department => {\n\t\t\t\tconst floors = department.subOptions;\n\t\t\t\tfloors.forEach(floor => {\n\t\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\t\trooms.forEach(room => {\n\t\t\t\t\t\tif (room.helloDeviceId === deviceId) {\n\t\t\t\t\t\t\toption.roomName = room.name;\n\t\t\t\t\t\t\toption.floorName = floor.name;\n\t\t\t\t\t\t\toption.departmentName = department.name;\n\t\t\t\t\t\t\toption.hospitalName = hospital.name;\n\t\t\t\t\t\t\toption.regionName = region.name;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n\n\treturn option;\n}\n\nexport function getLevelRoomsWithDevices(option) {\n\tlet devices = [];\n\tswitch (option.type) {\n\t\tcase 'hospital': {\n\t\t\tconst departments = option.subOptions;\n\t\t\tdepartments.forEach(department => {\n\t\t\t\tconst floors = department.subOptions;\n\t\t\t\tfloors.forEach(floor => {\n\t\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\t\trooms.forEach(room => {\n\t\t\t\t\t\tif (room.helloDeviceId) devices.push(room);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tcase 'department': {\n\t\t\tconst floors = option.subOptions;\n\t\t\tfloors.forEach(floor => {\n\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\trooms.forEach(room => {\n\t\t\t\t\tif (room.helloDeviceId) devices.push(room);\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tcase 'floor': {\n\t\t\tconst rooms = option.subOptions;\n\t\t\trooms.forEach(room => {\n\t\t\t\tif (room.helloDeviceId) devices.push(room);\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tdefault:\n\t\t\treturn devices;\n\t}\n}\n\nexport function getNursePoolingStatus() {\n\treturn localStorage.getItem('nursePoolingStatus');\n}\n\nexport function sortByRoomName(array) {\n\tconst collator = new Intl.Collator(undefined, {\n\t\tnumeric: true,\n\t\tsensitivity: 'base',\n\t});\n\treturn array.sort((a, b) => collator.compare(a.roomName, b.roomName));\n}\n\nexport const getPort = url => {\n\tconst parts = url.split(':');\n\tconst port = parseInt(parts[parts.length - 1], 10);\n\tif (parts[0] === 'http' && (Number.isNaN(port) || parts.length < 3)) {\n\t\treturn '';\n\t}\n\tif (parts[0] === 'https' && (Number.isNaN(port) || parts.length < 3)) {\n\t\treturn '';\n\t}\n\tif (parts.length === 1 || Number.isNaN(port)) return '';\n\treturn port;\n};\n\nexport const handleOnKeyDownNumeric = (event, allowPeriod = false) => {\n\tif (\n\t\t[\n\t\t\tKeyCodes.MINUS,\n\t\t\tKeyCodes.NUMPAD_PERIOD,\n\t\t\tKeyCodes.NUMPAD_ADD,\n\t\t\tKeyCodes.NUMPAD_SUBTRACT,\n\t\t\t!allowPeriod && KeyCodes.PERIOD,\n\t\t\tKeyCodes.PLUS,\n\t\t\tKeyCodes.LETTER_E,\n\t\t].includes(event.which)\n\t) {\n\t\tevent.preventDefault();\n\t}\n};\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/mainLayout/actions';\nimport LeftNavigation from 'components/LeftNavigation';\nimport Grid from 'components/Grid';\nimport { getUserRole } from 'infrastructure/auth';\nimport { UserRoles } from 'constants/enums';\nimport { getNursePoolingStatus } from 'infrastructure/helpers/commonHelpers';\n\nclass Layout extends Component {\n\tonLeftNavigationItemClicked = (item, event) => {\n\t\tif (item.role === 'toggleLeftNavigation') {\n\t\t\tevent.preventDefault();\n\t\t\tthis.props.toggleLeftNavigation();\n\t\t}\n\t};\n\n\tgetLeftNavigationItems() {\n\t\tlet leftNavigationItems = [];\n\n\t\tconst isPoolingPage = getUserRole() === UserRoles.NURSE && !getNursePoolingStatus();\n\n\t\tswitch (getUserRole()) {\n\t\t\tcase UserRoles.SUPERUSER: {\n\t\t\t\tleftNavigationItems = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'panorama_fish_eye',\n\t\t\t\t\t\tlinkTo: '/health-system',\n\t\t\t\t\t\ttitle: 'Organization',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'person',\n\t\t\t\t\t\tlinkTo: '/users',\n\t\t\t\t\t\ttitle: 'User Management',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'assessment',\n\t\t\t\t\t\tlinkTo: '/calllogs',\n\t\t\t\t\t\ttitle: 'Call logs',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'unfold_more',\n\t\t\t\t\t\tlinkTo: '#',\n\t\t\t\t\t\ttitle: 'Collapse',\n\t\t\t\t\t\trole: 'toggleLeftNavigation',\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase UserRoles.ADMIN: {\n\t\t\t\tleftNavigationItems = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'panorama_fish_eye',\n\t\t\t\t\t\tlinkTo: '/health-system',\n\t\t\t\t\t\ttitle: 'Organization',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'person',\n\t\t\t\t\t\tlinkTo: '/users',\n\t\t\t\t\t\ttitle: 'User Management',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'assessment',\n\t\t\t\t\t\tlinkTo: '/calllogs',\n\t\t\t\t\t\ttitle: 'Call logs',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'build',\n\t\t\t\t\t\tlinkTo: '/configurations',\n\t\t\t\t\t\ttitle: 'Configurations',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'unfold_more',\n\t\t\t\t\t\tlinkTo: '#',\n\t\t\t\t\t\ttitle: 'Collapse',\n\t\t\t\t\t\trole: 'toggleLeftNavigation',\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase UserRoles.NURSE:\n\t\t\t\tleftNavigationItems = [\n\t\t\t\t\t...(!isPoolingPage\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ticon: 'panorama_fish_eye',\n\t\t\t\t\t\t\t\t\tlinkTo: '/health-system',\n\t\t\t\t\t\t\t\t\ttitle: 'Organization',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ticon: 'remove_red_eye',\n\t\t\t\t\t\t\t\t\tlinkTo: '/monitoring',\n\t\t\t\t\t\t\t\t\ttitle: 'Monitoring',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: []),\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'unfold_more',\n\t\t\t\t\t\tlinkTo: '#',\n\t\t\t\t\t\ttitle: 'Collapse',\n\t\t\t\t\t\trole: 'toggleLeftNavigation',\n\t\t\t\t\t},\n\t\t\t\t].filter(Boolean);\n\n\t\t\t\tbreak;\n\t\t\tcase UserRoles.VIRTUALSITTER: {\n\t\t\t\tleftNavigationItems = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'remove_red_eye',\n\t\t\t\t\t\tlinkTo: '/monitoring',\n\t\t\t\t\t\ttitle: 'Monitoring',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'unfold_more',\n\t\t\t\t\t\tlinkTo: '#',\n\t\t\t\t\t\ttitle: 'Collapse',\n\t\t\t\t\t\trole: 'toggleLeftNavigation',\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tleftNavigationItems = [];\n\t\t\t}\n\t\t}\n\n\t\treturn leftNavigationItems;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.mainLayout,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(Layout);\n","import React from 'react';\nimport classNames from 'classnames/bind';\n\nconst Alert = props => (\n\t\n\t\t{props.message}\n\t\t{!props.hideCloseButton && (\n\t\t\t\n\t\t\t\tclose\n\t\t\t\n\t\t)}\n\t\n);\n\nAlert.defaultProps = {\n\tpersist: false,\n};\n\nexport default Alert;\n","import React from 'react';\nimport classNames from 'classnames/bind';\nimport { If, Then, Else } from 'react-if';\nimport { getInitialsColor } from 'infrastructure/helpers/commonHelpers';\n\nconst getInitialsFromFullName = fullName => {\n\tif (!!fullName.length) {\n\t\tlet fullNameSplit = fullName.split(/\\b\\s+/);\n\t\treturn `${fullNameSplit[0] ? fullNameSplit[0][0] : ''}${fullNameSplit[1] ? fullNameSplit[1][0] : ''}`;\n\t}\n};\n\nconst Avatar = props => {\n\tconst initialsColor = getInitialsColor(props.fullName[0]);\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getInitialsFromFullName(props.fullName)?.toUpperCase()}\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\nexport default Avatar;\n","import React from 'react';\nimport classNames from 'classnames/bind';\n\nconst Badge = props => (\n\t
\n\t\t{props.text}\n\t\t{props.icon && {props.icon}}\n\t
\n);\n\nexport default Badge;\n","import React from 'react';\nimport classNames from 'classnames/bind';\nimport { withRouter, Link } from 'react-router-dom';\n\nconst Breadcrumb = props => (\n\t
    \n\t\t{props.links?.map((link, index) => (\n\t\t\t
  • props.onBreadcrumbClick(props.links, index)}>\n\t\t\t\t{link.name}\n\t\t\t
  • \n\t\t))}\n\t
\n);\n\nexport default withRouter(Breadcrumb);\n","import React from 'react';\nimport classNames from 'classnames/bind';\nimport { If, Then, Else } from 'react-if';\n\nconst buttonTypes = {\n\tSUBMIT: 'submit',\n};\n\nconst Button = props => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t{props.icon && {props.icon}}\n\t\t\t\t{props.text}\n\t\t\t\n\t\t\n\t\n);\n\nexport default Button;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\n\nclass CallButton extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisDropdownOpen: false,\n\t\t};\n\t\tthis.isCallButtonClicked = false;\n\t}\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('mousedown', this.handleClickOutside);\n\t}\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('mousedown', this.handleClickOutside);\n\t}\n\tsetWrapperRef = node => {\n\t\tthis.wrapperRef = node;\n\t};\n\thandleClickOutside = event => {\n\t\tif (this.wrapperRef && !this.wrapperRef.contains(event.target)) {\n\t\t\tif (this.state.isDropdownOpen) {\n\t\t\t\tthis.toggleDropdown();\n\t\t\t}\n\t\t}\n\t};\n\ttoggleDropdown = () => {\n\t\tif (this.props.children) {\n\t\t\tthis.setState({\n\t\t\t\tisDropdownOpen: !this.state.isDropdownOpen,\n\t\t\t});\n\t\t} else {\n\t\t\t// Delay toggle event for half a second before it can be clicked again\n\t\t\tif (!this.isCallButtonClicked) {\n\t\t\t\tthis.isCallButtonClicked = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.props.onClick(this.props.name);\n\t\t\t\t\tthis.isCallButtonClicked = false;\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t this.toggleDropdown()}\n\t\t\t\tdata-tooltip={this.props.tooltip}\n\t\t\t\tdata-position={this.props.tooltipPosition}>\n\t\t\t\t\n\t\t\t\t\t{this.props.icon}\n\t\t\t\t\n\t\t\t\t{this.state.isDropdownOpen && this.props.children}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default CallButton;\n","import React from 'react';\nimport classNames from 'classnames';\n\nexport default class CallCorrelationInfo extends React.Component {\n\tstate = {\n\t\tcopied: false,\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.correlationIdRef = React.createRef();\n\t}\n\n\tcopyToClipboard = () => {\n\t\tlet textArea = document.createElement('textarea');\n\t\ttextArea.value = this.props.correlationId;\n\t\tdocument.body.appendChild(textArea);\n\t\ttextArea.select();\n\t\tdocument.execCommand('Copy');\n\t\ttextArea.remove();\n\n\t\tthis.setState({\n\t\t\tcopied: true,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\tcopied: false,\n\t\t\t});\n\t\t}, 3000);\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{this.props.correlationId && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{this.state.copied ? 'Copied!' : this.props.correlationId}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\n\t\t\t\t\t{!this.props.correlationId && n/a}\n\n\t\t\t\t\t{this.props.correlationId && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tfile_copy\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n}\n","import React from 'react';\nimport Grid from 'components/Grid';\nimport Avatar from 'components/Avatar';\nimport { ConferenceEndReason, ParticipantState } from 'constants/enums';\n\nconst CallEndReason = props => (\n\t
\n\t\t\n\t\t\t
\n\t\t\t\t\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_BUSY && (\n\t\t\t\t\t

\n\t\t\t\t\t\t{props.onPatientBusyNurse && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{props.onPatientBusyNurse.state === ParticipantState.CONNECTING.type && `This device has initiated a call. Try again later.`}\n\t\t\t\t\t\t\t\t{[ParticipantState.CONNECTED.type, ParticipantState.RECONNECTING.type].includes(props.onPatientBusyNurse.state) &&\n\t\t\t\t\t\t\t\t\t`This device is currently on a call with ${props.onPatientBusyNurse.name}. Try again later.`}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!props.onPatientBusyNurse && `This device is currently on a call. Try again later.`}\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_OFFLINE && (\n\t\t\t\t\t

\n\t\t\t\t\t\tThis device is offline. Try again later.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{(props.reason === ConferenceEndReason.PARTICIPANT_LEFT ||\n\t\t\t\t\tprops.reason === ConferenceEndReason.INITIATOR_LEFT ||\n\t\t\t\t\tprops.reason === ConferenceEndReason.OWNER_LEFT) && (\n\t\t\t\t\t

\n\t\t\t\t\t\tCall ended.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_DECLINED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tCall has been declined.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_NOT_ANSWERING && (\n\t\t\t\t\t

\n\t\t\t\t\t\tCan't connect to this device. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.ABORTED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tCall has ended. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.DROPPED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tFailed to reconnect to the network. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_PASSWORD_CHANGED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tThe password for this account has been changed. Please login using the new credentials.\n\t\t\t\t\t

\n\t\t\t\t)}\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_IDLE && (\n\t\t\t\t\t

\n\t\t\t\t\t\tYou have been idle for too long. Call is ended.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR && (\n\t\t\t\t\t

\n\t\t\t\t\t\tThis session was ended by a Banyan admin.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_INVITE_DENIED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tYou don't have sufficient permissions to call this participant. Please contact your administrator.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.FAILED_TO_GET_INITIATOR_INFO && (\n\t\t\t\t\t

\n\t\t\t\t\t\tFailed to get your information. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_INVITE_FAILED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tFailed to get participant information. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\t\t\t
\n\t\t
\n\t
\n);\n\nexport default CallEndReason;\n","import React from 'react';\n\nconst Checkbox = props => (\n\t\n);\n\nexport default Checkbox;\n","import React from 'react';\n\nconst DescriptionBox = props => (\n\t
    \n\t\t{props.data.map((data, index) => (\n\t\t\t
  • \n\t\t\t\t{data.title && data.title + ':'}\n\t\t\t\t{data.description}\n\t\t\t
  • \n\t\t))}\n\t
\n);\n\nexport default DescriptionBox;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\nimport ReactDOM from 'react-dom';\n\nclass Dropdown extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.setWrapperRef = this.setWrapperRef.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t\tthis.dropdownChildrenRef = React.createRef();\n\t\tthis.dropdownRef = React.createRef();\n\n\t\tthis.state = {\n\t\t\tisDropdownOpen: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('mousedown', this.handleClickOutside);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('mousedown', this.handleClickOutside);\n\t}\n\n\tsetWrapperRef(node) {\n\t\tthis.wrapperRef = node;\n\t}\n\n\thandleClickOutside(event) {\n\t\tif (this.wrapperRef && !this.wrapperRef.contains(event.target)) {\n\t\t\tif (\n\t\t\t\tthis.state.isDropdownOpen &&\n\t\t\t\t((this.props.isPortal && this.dropdownChildrenRef && !this.dropdownChildrenRef.current.contains(event.target)) || !this.props.isPortal)\n\t\t\t) {\n\t\t\t\tthis.toggleDropdown(false);\n\t\t\t}\n\t\t}\n\t}\n\n\ttoggleDropdown = isDropdownOpen => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisDropdownOpen: isDropdownOpen === false ? isDropdownOpen : !this.state.isDropdownOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.props.isDropdownOpen) {\n\t\t\t\t\tthis.props.isDropdownOpen(isDropdownOpen === false ? isDropdownOpen : this.state.isDropdownOpen);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tonDropdownItemsClick = () => {\n\t\tif (this.props.closeDropdownOnItemClick) {\n\t\t\tthis.toggleDropdown(false);\n\t\t}\n\t};\n\n\tgetDropdownItems = style => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{this.props.isDropdownTitleVisible && (\n\t\t\t\t\t
\n\t\t\t\t\t\t

{this.props.dropdownInnerTitle}

\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t)}\n\t\t\t\t{this.props.children}\n\t\t\t
\n\t\t);\n\t};\n\n\trender() {\n\t\tconst dropdownRefProperties = this.dropdownRef.current?.getBoundingClientRect();\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{this.props.imageUrl && ddl-img}\n\t\t\t\t\t{this.props.title}\n\t\t\t\t\t{this.props.icon && {this.props.icon}}\n\t\t\t\t\n\t\t\t\t{this.props.isPortal &&\n\t\t\t\t\tthis.state.isDropdownOpen &&\n\t\t\t\t\tReactDOM.createPortal(\n\t\t\t\t\t\tthis.getDropdownItems({\n\t\t\t\t\t\t\tzIndex: 999999,\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\tright: window.innerWidth - dropdownRefProperties?.right,\n\t\t\t\t\t\t\t...(dropdownRefProperties.top < window.innerHeight / 2 && { top: dropdownRefProperties?.top }),\n\t\t\t\t\t\t\t...(dropdownRefProperties.top > window.innerHeight / 2 && { bottom: window.innerHeight - dropdownRefProperties?.bottom + 30 }),\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tdocument.getElementById('portal-root')\n\t\t\t\t\t)}\n\t\t\t\t{!this.props.isPortal && this.getDropdownItems()}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default Dropdown;\n","import React from 'react';\n\nconst Form = props => (\n\t
\n\t\t

{props.title}

\n\t\t{props.children}\n\t
\n);\n\nexport default Form;\n","import React from 'react';\n\nconst HelloFeatureBlock = props => (\n\t
\n\t\t{props.icon}\n\t\t

{props.title}

\n\t\t\n\t\t\tinfo\n\t\t\n\t
\n);\n\nexport default HelloFeatureBlock;\n","import React from 'react';\nimport classNames from 'classnames/bind';\n\nconst Input = props => {\n\treturn (\n\t\t
\n\t\t\t

{props.label}

\n\t\t\t

{props.description}

\n\t\t\t{props.type && (\n\t\t\t\t\n\t\t\t)}\n\t\t\t{props.error}\n\t\t
\n\t);\n};\n\nexport default Input;\n","import React, { Component } from 'react';\nimport { If, Then, Else } from 'react-if';\nimport classNames from 'classnames/bind';\n\nconst ListGroups = props => {\n\tconst onListClick = (event, item) => {\n\t\tif (props.onItemClick) {\n\t\t\tprops.onItemClick(event, item);\n\t\t}\n\t};\n\n\tconst onScrollClick = (...args) => {\n\t\tif (props.onScroll) {\n\t\t\tprops.onScroll(...args);\n\t\t}\n\t};\n\n\treturn (\n\t\t {\n\t\t\t\tonScrollClick(e);\n\t\t\t}}>\n\t\t\t{props.lists.map((item, index) => (\n\t\t\t\t
  • \n\t\t\t\t\t\n\t\t\t\t\t\t{item.component}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t onListClick(e, item)}>\n\t\t\t\t\t\t\t\t{item.icon && {item.icon}}\n\t\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t\t\t{item.subLists && }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
  • \n\t\t\t))}\n\t\t\n\t);\n};\n\nclass ListGroup extends Component {\n\trender() {\n\t\treturn ;\n\t}\n}\n\nexport default ListGroup;\n","import React, { Component } from 'react';\nimport Button from 'components/Button';\nimport classNames from 'classnames/bind';\nimport { If, Then, Else } from 'react-if';\nimport Loader from 'components/Loader';\n\nclass Modal extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.modalReference = React.createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('keydown', this.handleKeyPress);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('keydown', this.handleKeyPress);\n\t}\n\n\thandleKeyPress = event => {\n\t\tif (event.key === 'Escape' && this.props.display === true) {\n\t\t\tthis.props.onModalClose();\n\t\t}\n\t};\n\n\thandleOutsideClick = event => {\n\t\tlet modalClass = `.${this.modalReference.current.classList[0]}`;\n\t\tif (!event.target.closest(modalClass)) {\n\t\t\tthis.props.onModalClose();\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t this.handleOutsideClick(evt)}>\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t
    \n\n\t\t\t\t\t{!this.props.hideCloseButton && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{!this.props.hideActionButtons && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{!this.props.hideCloseButton && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{this.props.submitButtonText !== '' && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\n\t\t);\n\t}\n}\n\nexport default Modal;\n","import React from 'react';\n\nconst Select = props => (\n\t
    \n\t\t

    {props.label}

    \n\t\t

    {props.description}

    \n\t\t\n\t\t{props.error}\n\t
    \n);\n\nexport default Select;\n","import React from 'react';\nimport Grid from 'components/Grid';\nimport Avatar from 'components/Avatar';\nimport { RTCPeerConnectionEnum } from 'constants/enums';\n\nconst ConnectionStatus = props => (\n\t
    \n\t\t\n\t\t\t
    \n\t\t\t\t\n\n\t\t\t\t{(props.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED ||\n\t\t\t\t\tprops.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED) && (\n\t\t\t\t\t

    \n\t\t\t\t\t\tPlease wait…attempting to reconnect to the network.\n\t\t\t\t\t

    \n\t\t\t\t)}\n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default ConnectionStatus;\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nconst ActiveConference = () => (\n\t
    \n\t\t\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\tYou're already in a call or monitoring patients.
    \n\t\t\t\t\tPlease try again after you end that session.\n\t\t\t\t

    \n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default ActiveConference;\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nconst AnotherNursePickedUp = () => (\n\t
    \n\t\t\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\tAnother nurse picked up this call.\n\t\t\t\t

    \n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default AnotherNursePickedUp;\n","import React from 'react';\n\nconst SkeletonLoader = props => (\n\t
    \n\t\t{[...Array(props.rows)].map((option, index) => (\n\t\t\t
    \n\t\t))}\n\t
    \n);\n\nexport default SkeletonLoader;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\n\nclass SmallModal extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.setWrapperRef = this.setWrapperRef.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('mousedown', this.handleClickOutside);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('mousedown', this.handleClickOutside);\n\t}\n\n\tsetWrapperRef(node) {\n\t\tthis.wrapperRef = node;\n\t}\n\n\thandleClickOutside(event) {\n\t\tif (this.wrapperRef && !this.wrapperRef.contains(event.target)) {\n\t\t\tthis.props.onModalClose();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    {this.props.children}
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default SmallModal;\n","import React from 'react';\nimport Grid from 'components/Grid';\nimport { StreamError } from 'constants/enums';\nimport { isMacintosh } from 'infrastructure/helpers/commonHelpers';\n\nconst StreamPermissions = props => (\n\t
    \n\t\t\n\t\t\t
    \n\t\t\t\t{props.reason.type === StreamError.PERMISSION_DISMISSED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Allow Banyan to use your microphone

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    Banyan needs access to your microphone so patients can hear you. Check the top left of the screen and click Allow.

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.STREAM_NOT_ALLOWED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Turn on Microphone and Camera

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    To make a call on Banyan, you need to allow permissions for microphone and camera.

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.DEVICE_NOT_FOUND.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Device not found

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tTo make a video call on Banyan, you need to turn on your camera. For\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tan audio call, you need to turn on your microphone. Try again by refreshing\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tthe page.\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.NOT_READABLE_ERROR.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Device may be in use

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tCamera or microphone may be in use by another application.\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tPlease close the other application and refresh the page.\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.MICROPHONE_NOT_FOUND.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Can’t find your microphone

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tPlease check on your system if a mic has been plugged in and you have allowed mic permissions. If not, plug one in or allow permissions and\n\t\t\t\t\t\t\trestart your browser. Patients won’t be able to hear you until you do that.\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.CAMERA_BLOCKED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\tCamera permission\n\t\t\t\t\t\t

    Your Camera is blocked

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t• Click the Camera blocked icon on the top right of your screen\n\t\t\t\t\t\t\t
    • Allow access and refresh the page\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.MICROPHONE_BLOCKED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t

    Your Microphone is blocked

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t• Click the Microphone blocked icon on the top right of your screen\n\t\t\t\t\t\t\t
    • Allow access and refresh the page\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.CAM_AND_MIC_BLOCKED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\tMicrophone and camera permission\n\t\t\t\t\t\t

    Your Camera and Microphone are blocked

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t• Click the camera blocked icon on the top right of your screen\n\t\t\t\t\t\t\t
    • Allow access and refresh the page\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default StreamPermissions;\n","import React from 'react';\nimport Checkbox from 'components/Checkbox';\nimport Grid from 'components/Grid';\nimport SkeletonLoader from 'components/SkeletonLoader';\nimport { If, Then, Else } from 'react-if';\n\nconst Table = props => (\n\t
    \n\t\t
    {props.children}
    \n\t\t
    \n\t\t\t{props.isEditable ? : ''}\n\t\t\t{props.headers.map((header, index) => (\n\t\t\t\t
    {header.title}
    \n\t\t\t))}\n\t\t
    \n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{props.rows.map((row, index) => (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{props.isEditable ? : ''}\n\t\t\t\t\t\t\t{Object.keys(row).map((key, index) => (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    {row[key]}
    {' '}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t
    \n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{props.tableEmptyText || 'No data'}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default Table;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\n\nclass Tabs extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tcomponentIndex: null,\n\t\t\tlinks: this.props.links,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst componentIndex = this.state.links.findIndex(item => item.active);\n\t\tthis.setState({\n\t\t\tcomponentIndex,\n\t\t});\n\t}\n\n\tsetActiveComponent = componentIndex => {\n\t\tconst links = this.state.links.map((item, index) => {\n\t\t\tif (item.active) {\n\t\t\t\titem.active = false;\n\t\t\t}\n\n\t\t\tif (componentIndex === index) {\n\t\t\t\titem.active = true;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...item,\n\t\t\t\tactive: componentIndex === index,\n\t\t\t};\n\t\t});\n\n\t\tthis.setState({\n\t\t\tcomponentIndex: componentIndex,\n\t\t\tlinks,\n\t\t});\n\n\t\tif (this.props.onTabClick) {\n\t\t\tthis.props.onTabClick(componentIndex);\n\t\t}\n\t};\n\n\tonTabChange = index => {\n\t\tthis.setActiveComponent(index);\n\t\tif (this.props.onTabChange) {\n\t\t\tthis.props.onTabChange(index);\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
      \n\t\t\t\t\t{this.state.links.map((tab, index) => (\n\t\t\t\t\t\t
    • this.onTabChange(index)}>\n\t\t\t\t\t\t\t{tab.link}\n\t\t\t\t\t\t
    • \n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t\t{this.props.components && this.props.components[this.state.componentIndex]}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default Tabs;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { CameraTiltDirection, ZoomDirection, CameraType, CameraZoomLevels, CameraTiltAction } from 'constants/enums';\nimport classNames from 'classnames/bind';\n\nclass Tilt extends Component {\n\tpreviousTiltAction;\n\n\tisMouseDown = false;\n\n\tsendTiltEvent = (direction, action) => {\n\t\tif (\n\t\t\tthis.props.disabled ||\n\t\t\t(this.props.cameraType === CameraType.HELLO && this.props.disabledDirections[direction]) ||\n\t\t\t(this.previousTiltAction === CameraTiltAction.STOP && action === CameraTiltAction.STOP)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.props.tiltHandler(direction, action);\n\t\tthis.previousTiltAction = action;\n\t};\n\n\tonMouseDown = (direction, action) => {\n\t\tthis.isMouseDown = true;\n\t\tthis.sendTiltEvent(direction, action);\n\t};\n\n\tonMouseUp = (direction, action) => {\n\t\tthis.isMouseDown = false;\n\t\tthis.sendTiltEvent(direction, action);\n\t};\n\n\tonMouseOut = (direction, action) => {\n\t\tif (this.isMouseDown) {\n\t\t\tthis.sendTiltEvent(direction, action);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst zoomUpperLimit = this.props.cameraType === CameraType.HELLO ? CameraZoomLevels.HELLO_MAX : CameraZoomLevels.HUDDLE_MAX;\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.onMouseDown(CameraTiltDirection.UP, CameraTiltAction.START);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseUp={() => {\n\t\t\t\t\t\t\t\tthis.onMouseUp(CameraTiltDirection.UP, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseOut={() => {\n\t\t\t\t\t\t\t\tthis.onMouseOut(CameraTiltDirection.UP, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={() => {}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.onMouseDown(CameraTiltDirection.RIGHT, CameraTiltAction.START);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseUp={() => {\n\t\t\t\t\t\t\t\tthis.onMouseUp(CameraTiltDirection.RIGHT, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseOut={() => {\n\t\t\t\t\t\t\t\tthis.onMouseOut(CameraTiltDirection.RIGHT, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={() => {}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.onMouseDown(CameraTiltDirection.LEFT, CameraTiltAction.START);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseUp={() => {\n\t\t\t\t\t\t\t\tthis.onMouseUp(CameraTiltDirection.LEFT, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseOut={() => {\n\t\t\t\t\t\t\t\tthis.onMouseOut(CameraTiltDirection.LEFT, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={() => {}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.onMouseDown(CameraTiltDirection.DOWN, CameraTiltAction.START);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseUp={() => {\n\t\t\t\t\t\t\t\tthis.onMouseUp(CameraTiltDirection.DOWN, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseOut={() => {\n\t\t\t\t\t\t\t\tthis.onMouseOut(CameraTiltDirection.DOWN, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={() => {}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{this.props.cameraType === CameraType.HUDDLE && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (this.props.cameraZoomLevel === 0 || this.props.disabled) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.props.updateZoomLevel(ZoomDirection.DECREASE);\n\t\t\t\t\t\t}}>\n\t\t\t\t\t\tremove\n\t\t\t\t\t\n\t\t\t\t\t

    Zoom {this.props.cameraZoomLevel !== 0 ? `x${this.props.cameraZoomLevel / 20}` : ''}

    \n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (this.props.cameraZoomLevel === zoomUpperLimit || this.props.disabled) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.props.updateZoomLevel(ZoomDirection.INCREASE);\n\t\t\t\t\t\t}}>\n\t\t\t\t\t\tadd\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nTilt.defaultProps = {\n\tdisabledDirections: {},\n};\n\nTilt.propTypes = {\n\ttiltHandler: PropTypes.func,\n\tcameraZoomLevel: PropTypes.number,\n\tcameraType: PropTypes.string,\n\tupdateZoomLevel: PropTypes.func,\n\tdisabled: PropTypes.bool,\n};\n\nexport default Tilt;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\nimport PropTypes from 'prop-types';\n\nconst Toggle = props => {\n\treturn (\n\t\t\n\t);\n};\n\nToggle.propTypes = {\n\ttoggleOnText: PropTypes.string,\n\ttoggleOffText: PropTypes.string,\n\ttoggledOn: PropTypes.bool,\n\tclassName: PropTypes.string,\n\tonToggle: PropTypes.func,\n\tdisabled: PropTypes.bool,\n};\nexport default Toggle;\n","import React, { Component } from 'react';\nimport Avatar from 'components/Avatar';\n\nclass TopParticipant extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.videoRef = null;\n\t\tthis.videoSrcObjectHandler = this.videoSrcObjectHandler.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.videoSrcObjectHandler();\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tconst streamHasChanged =\n\t\t\tprevProps.topParticipantFeed && this.props.topParticipantFeed && prevProps.topParticipantFeed.id !== this.props.topParticipantFeed.id;\n\n\t\tif (streamHasChanged || (this.videoRef && this.videoRef.srcObject == null)) {\n\t\t\tthis.videoSrcObjectHandler();\n\t\t}\n\t}\n\n\tvideoSrcObjectHandler() {\n\t\tif (this.videoRef) {\n\t\t\tthis.videoRef.srcObject = this.props.topParticipantFeed.mediaStream;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{this.props.topParticipantFeed && this.props.isTopParticipantVideoActive ? (\n\t\t\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default TopParticipant;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Avatar from 'components/Avatar';\n\nclass Participant extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.videoRef = null;\n\t\tthis.videoSrcObjectHandler = this.videoSrcObjectHandler.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.videoSrcObjectHandler();\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (prevProps.videoCamActive !== this.props.videoCamActive || prevProps.participantFeed.id !== this.props.participantFeed.id) {\n\t\t\tthis.videoSrcObjectHandler();\n\t\t}\n\t}\n\n\tvideoSrcObjectHandler() {\n\t\tif (this.videoRef) {\n\t\t\tthis.videoRef.srcObject = this.props.participantFeed.mediaStream;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    {this.props.name}

    \n\t\t\t\t\t
    {this.props.children}
    \n\t\t\t\t
    \n\t\t\t\t
    this.props.onClick(this.props.participantFeed.id)}>\n\t\t\t\t\t{this.props.participantFeed && this.props.videoCamActive ? (\n\t\t\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nParticipant.propTypes = {\n\taudioMute: PropTypes.bool,\n\tvideoCamActive: PropTypes.bool,\n\tparticipantFeed: PropTypes.object,\n\tonClick: PropTypes.func,\n\tname: PropTypes.string,\n\tchildren: PropTypes.node,\n\tparticipantAvatar: PropTypes.string,\n};\n\nexport default Participant;\n","import React from 'react';\n\nexport const SocketContext = React.createContext({});\n","import React, { Component, useRef, useState, useEffect } from 'react';\nimport { Link } from 'react-router-dom';\nimport { If, Then, Else } from 'react-if';\nimport classNames from 'classnames/bind';\nimport { SectorTypes, CallTypes } from 'constants/enums';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { treeSectorNameMaxCharacters } from 'constants/global-variables';\n\nlet sectors = {\n\thospital: {\n\t\tsubtype: 'department',\n\t\ticon: 'account_balance',\n\t},\n\tdepartment: {\n\t\tsubtype: 'floor',\n\t\ticon: 'money',\n\t},\n\tfloor: {\n\t\tsubtype: 'room',\n\t\ticon: 'meeting_room',\n\t},\n};\n\nconst OptionName = props => {\n\tconst { option } = props;\n\tconst [tooltipStyle, setTooltipStyle] = useState(null);\n\tconst roomStatusRef = useRef(null);\n\tconst toggleTooltip = show => {\n\t\tconst roomStatusEl = roomStatusRef.current?.getBoundingClientRect();\n\t\tif (show && roomStatusEl) {\n\t\t\tsetTooltipStyle({\n\t\t\t\tdisplay: 'block',\n\t\t\t\ttop: roomStatusEl.top,\n\t\t\t\tleft: roomStatusEl.left,\n\t\t\t});\n\t\t} else {\n\t\t\tsetTooltipStyle(null);\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{option.name}\n\t\t\t{option.helloDeviceId && fiber_manual_record}\n\t\t\t{option.helloDeviceId && option.deviceBusy && (\n\t\t\t\t<>\n\t\t\t\t\t toggleTooltip(true)}\n\t\t\t\t\t\tonMouseLeave={() => toggleTooltip(false)}\n\t\t\t\t\t\tclassName={classNames('material-icons-round', 'room-status', 'on-call')}>\n\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{props.getDeviceBeingUsedMessage(option)}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n};\n\nconst OptionsList = ({\n\toptions,\n\texpandedOptions,\n\tonChange,\n\tonAdd,\n\tonLinkClick,\n\tonAddDevice,\n\tisMonitoring,\n\tselectedSectorId,\n\tsetSelectedId,\n\texpandAll,\n\tonSendCheckDeviceActiveConferences,\n}) => {\n\tconst findProperId = item => {\n\t\tlet prefix = item.type;\n\t\treturn item[`${prefix}Id`];\n\t};\n\n\tconst childrenHidden = option => {\n\t\treturn option.subOptions.every(item => item.hidden === true);\n\t};\n\n\tconst childrenMatchSearch = option => {\n\t\treturn option.subOptions.some(item => item.matchesSearch === true);\n\t};\n\n\tconst toggleOptions = option => {\n\t\tif ((childrenHidden(option) && !childrenMatchSearch(option)) || !childrenMatchSearch(option)) {\n\t\t\toption.subOptions.forEach(item => {\n\t\t\t\titem.hidden = !item.hidden;\n\t\t\t});\n\t\t} else {\n\t\t\toption.subOptions\n\t\t\t\t.filter(i => i.matchesSearch)\n\t\t\t\t.forEach(item => {\n\t\t\t\t\titem.hidden = !item.hidden;\n\t\t\t\t});\n\t\t}\n\t};\n\n\tconst toggleExpand = (selectedOptionId, isAddingSection, option) => {\n\t\tif (expandedOptions[selectedOptionId] && !isAddingSection) {\n\t\t\tdelete expandedOptions[selectedOptionId];\n\t\t} else {\n\t\t\texpandedOptions[selectedOptionId] = {};\n\t\t}\n\t\tif (expandAll) {\n\t\t\ttoggleOptions(option);\n\t\t}\n\t\tonChange(expandedOptions);\n\t};\n\n\tconst addNewOptionClick = selection => {\n\t\tif (selection.type === SectorTypes.ROOM) {\n\t\t\tonAddDevice(selection);\n\t\t\treturn;\n\t\t}\n\n\t\tselection.subOptions.push({\n\t\t\t...selection,\n\t\t\ticon: sectors[selection.type].icon,\n\t\t\ttype: sectors[selection.type].subtype,\n\t\t\tisNewOption: true,\n\t\t\tsubOptions: [],\n\t\t});\n\t\thandleSubOptionsListChange();\n\t\ttoggleExpand(findProperId(selection), true, selection);\n\t};\n\n\tconst addNewOptionOnEnter = (event, selection) => {\n\t\tif (event.which === 13) {\n\t\t\tif (event.target.value.length > treeSectorNameMaxCharacters) {\n\t\t\t\tselection.error = `Cannot add ${selection.type} with more than ${treeSectorNameMaxCharacters} characters`;\n\t\t\t\ttoggleExpand(findProperId(selection), false, selection);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tselection.name = event.target.value;\n\t\t\thandleSubOptionsListChange();\n\t\t\tonAdd(selection);\n\t\t}\n\t};\n\n\tconst handleSubOptionsListChange = (optionId, subSelections) => {\n\t\texpandedOptions[optionId] = subSelections;\n\t\tonChange(expandedOptions);\n\t};\n\n\tconst selectOption = (event, option) => {\n\t\tsetSelectedId(option[`${option.type}Id`]);\n\t\toption.isSelected = true;\n\t\tif (onLinkClick) {\n\t\t\tonLinkClick(option, event);\n\t\t}\n\t\ttoggleExpand(findProperId(option), true, option);\n\t};\n\n\tconst checkDeviceActiveConferences = async option => {\n\t\tif (!option.helloDeviceId || !option.deviceBusy || (option.activeConferences && option.activeConferences.length > 0)) {\n\t\t\treturn;\n\t\t}\n\n\t\tonSendCheckDeviceActiveConferences(+option.helloDeviceId);\n\t};\n\n\tconst getDeviceBeingUsedMessage = option => {\n\t\tconst { helloDeviceId, activeConferences } = option;\n\t\tif (!helloDeviceId || !activeConferences || !activeConferences.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet message = '';\n\t\tif (activeConferences.length === 1) {\n\t\t\tconst [conference] = activeConferences;\n\t\t\tif (conference.callType === CallTypes.MONITORING) {\n\t\t\t\tmessage = 'Device being used by Virtual Sitter';\n\t\t\t} else if (!conference.isInvitedByHost) {\n\t\t\t\tmessage = 'Patient is calling VCP';\n\t\t\t} else {\n\t\t\t\tmessage = 'Device being used by Virtual Care Provider';\n\t\t\t}\n\t\t} else if (activeConferences.some(conference => !conference.isInvitedByHost)) {\n\t\t\tmessage = 'Device being used by Virtual Sitter and patient is calling VCP';\n\t\t} else {\n\t\t\tmessage = 'Device being used by Virtual Care Provider and Virtual Sitter';\n\t\t}\n\n\t\treturn message;\n\t};\n\n\tconst addSectorTooltip = option => {\n\t\tif (isMonitoring && option.activeConferences && option.activeConferences.some(conference => conference.callType === CallTypes.MONITORING)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn option.tooltip;\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t{options.map((option, index) => (\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t{option.icon}\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\taddNewOptionOnEnter(event, option);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\ttype='text'\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={`Add ${option.type}`}\n\t\t\t\t\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t

    {option.error}

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    checkDeviceActiveConferences(option)} onFocus={() => {}}>\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\ttoggleExpand(findProperId(option), false, option);\n\t\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t\t{expandedOptions[findProperId(option)] || (expandAll && !childrenHidden(option)) ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{option.icon}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectOption(event, option);\n\t\t\t\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectOption(event, option);\n\t\t\t\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{option.tooltip && !option.isCreatingSector && (\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\taddNewOptionClick(option);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tdata-tooltip={addSectorTooltip(option)}\n\t\t\t\t\t\t\t\t\t\t\tdata-position='left'>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t{option.customActionIcon ? option.customActionIcon.icon : 'add_box'}{' '}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t{option.subOptions && expandAll && (\n\t\t\t\t\t\t handleSubOptionsListChange(findProperId(option), subSelections)}\n\t\t\t\t\t\t\tonAdd={onAdd}\n\t\t\t\t\t\t\tonLinkClick={onLinkClick}\n\t\t\t\t\t\t\tonAddDevice={onAddDevice}\n\t\t\t\t\t\t\tisMonitoring={isMonitoring}\n\t\t\t\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\t\t\t\tsetSelectedId={setSelectedId}\n\t\t\t\t\t\t\texpandAll={expandAll}\n\t\t\t\t\t\t\tonSendCheckDeviceActiveConferences={onSendCheckDeviceActiveConferences}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{option.subOptions && expandedOptions[findProperId(option)] && !expandAll && (\n\t\t\t\t\t\t handleSubOptionsListChange(findProperId(option), subSelections)}\n\t\t\t\t\t\t\tonAdd={onAdd}\n\t\t\t\t\t\t\tonLinkClick={onLinkClick}\n\t\t\t\t\t\t\tonAddDevice={onAddDevice}\n\t\t\t\t\t\t\tisMonitoring={isMonitoring}\n\t\t\t\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\t\t\t\tsetSelectedId={setSelectedId}\n\t\t\t\t\t\t\texpandAll={expandAll}\n\t\t\t\t\t\t\tonSendCheckDeviceActiveConferences={onSendCheckDeviceActiveConferences}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t))}\n\t\t\n\t);\n};\n\nclass TreeView extends Component {\n\tstate = {\n\t\tselectedSectorId: this.props.selectedSectorId,\n\t\texpandedOptions: this.props.preSelected ? this.props.preSelected : {},\n\t};\n\n\tsetSelectedId = sectorId => {\n\t\tthis.setState({ selectedSectorId: sectorId });\n\t};\n\n\trender() {\n\t\tlet { selectedSectorId, expandedOptions } = this.state;\n\t\treturn (\n\t\t\t this.setState({ expandedOptions })}\n\t\t\t\texpandedOptions={this.state.expandedOptions}\n\t\t\t\tisMonitoring={this.props.isMonitoring}\n\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\tsetSelectedId={this.setSelectedId}\n\t\t\t\texpandAll={this.props.expandAll}\n\t\t\t\tonSendCheckDeviceActiveConferences={this.props.onSendCheckDeviceActiveConferences}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nTreeView.contextType = SocketContext;\nexport default TreeView;\n","const SocketEvents = {\n\tClient: {\n\t\tAUTHORIZE: 'client.authorize',\n\t\tUPDATE_USER_PRESENCE: 'client.updateUserPresence',\n\t\tPING: 'client.ping',\n\n\t\t// subscribers\n\t\tON_USER_ONLINE: 'client.userOnline',\n\t\tON_USER_OFFLINE: 'client.userOffline',\n\t\tON_AUTHENTICATED: 'client.authenticated',\n\t\tON_UNAUTHORIZED: 'client.unauthorized',\n\t\tON_CONNECT: 'connect',\n\t\tON_CONNECT_FAILED: 'connect_failed',\n\t\tON_RECONNECT: 'reconnect',\n\t\tON_RECONNECTING: 'reconnecting',\n\t\tON_DISCONNECT: 'disconnect',\n\t\tON_DEVICE_ONLINE: 'client.deviceOnline',\n\t\tON_DEVICE_OFFLINE: 'client.deviceOffline',\n\t\tON_UPDATED_USER_PRESENCE: 'client.updatedUserPresence',\n\t\tON_NOTIFY_UPDATED_USER_PRESENCE: 'client.notifyUpdatedUserPresence',\n\t},\n\tConference: {\n\t\tSTART: 'conference.start',\n\t\tJOIN: 'conference.join',\n\t\tLEAVE: 'conference.leave',\n\t\tEND: 'conference.end',\n\t\tTOGGLE_STREAMS: 'conference.toggleStreams',\n\t\tAUDIO_TRACK_TOGGLED: 'conference.audioTrackToggled',\n\t\tERROR: 'conference.error',\n\t\tSEND_OFFER: 'conference.sendOffer',\n\t\tSEND_ANSWER: 'conference.sendAnswer',\n\t\tSEND_ICE_CANDIDATE: 'conference.sendIceCandidate',\n\t\tNOT_ANSWERING: 'conference.notAnswering',\n\t\tCLOSING_CLIENT: 'conference.closingClient',\n\t\tDECLINE: 'conference.decline',\n\t\tBROWSER_NOT_SUPPORTED: 'conference.browserNotSupported',\n\t\tSDP: 'conference.sdp',\n\t\tTRACK_TOGGLE: 'conference.toggleParticipantTrack',\n\t\tTRACKS_ADDED: 'conference.tracks.added',\n\t\tTRACKS_REMOVED: 'conference.tracks.removed',\n\t\tUA: 'conference.ua',\n\t\tDATA_RECEIVED: 'conference.data.received',\n\t\tCLOSED: 'conference.closed',\n\t\tHELLODEVICE_LEAVE: 'conference.helloDevice.leave',\n\t\tINVITE_PARTICIPANTS: 'conference.inviteParticipants',\n\t\tREMOVE_PARTICIPANT: 'conference.removeParticipant',\n\t\tPARTICIPANT_RECONNECT: 'conference.participantReconnect',\n\t\tPARTICIAPNT_CHANGE_BITRATE: 'conference.requestToChangeBitrate',\n\t\tPEER_CONNECTION_STATE_CHANGED: 'conference.peerConnectionStateChanged',\n\t\tICE_GATHERING_STATE_CHANGED: 'conference.iceGatheringStateChanged',\n\t\tICE_CONNECTION_STATE_CHANGED: 'conference.iceConnectionStateChanged',\n\t\tLOG: 'conference.log',\n\t\tTERMINATE_REQUEST: 'conference.terminateRequest',\n\t\tTERMINATE_REQUEST_ACCEPT: 'conference.terminateRequest.accept',\n\t\tTERMINATE_REQUEST_CANCEL: 'conference.terminateRequest.cancel',\n\t\tFORCE_TERIMATE: 'conference.forceTerminate',\n\t\tPARTICIPANT_FORCE_TERMINATE: 'conference.participantForceTerminate',\n\t\tALERT_PATIENT_AT_RISK: 'conference.helloDevice.alertPatientAtRisk',\n\t\tALERT_PATIENT_AT_RISK_RESPONSE: 'conference.helloDevice.alertPatientAtRisk.response',\n\n\t\t// subscribers\n\t\tON_PARTICIPANT_NOT_ANSWERING: 'conference.participantNotAnswering',\n\t\tON_PARTICIPANT_DECLINED: 'conference.participantDeclined',\n\t\tON_PARTICIPANT_LEFT: 'conference.participantLeft',\n\t\tON_PARTICIPANT_STREAMS_TOGGLED: 'conference.participantStreamsToggled',\n\t\tON_NEW_ANSWER: 'conference.newAnswer',\n\t\tON_NEW_OFFER: 'conference.newOffer',\n\t\tON_NEW_ICE_CANDIDATE: 'conference.newIceCandidate',\n\t\tON_NEW_PARTICIPANT: 'conference.newParticipant',\n\t\tON_REMOVE_SCREENSHARE_PEER: 'conference.helloDevice.removeScreenSharePeer',\n\t\tON_RINGING: 'conference.ringing',\n\t\tON_INCOMING: 'conference.incoming',\n\t\tON_PARTICIPANT_OFFLINE: 'conference.participantOffline',\n\t\tON_PARTICIPANT_BUSY: 'conference.participantBusy',\n\t\tON_INITIATOR_LEFT: 'conference.initiatorLeft',\n\t\tON_UPDATE_PARTICIPANTS: 'conference.updateParticipants',\n\t\tON_MISSED_CALL: 'conference.missedCall',\n\t\tON_DEVICE_CONTROLS_LOCKED: 'conference.deviceControlsLocked',\n\t\tON_ENDED: 'conference.ended',\n\t\tON_ANSWERED_ELSEWHERE: 'conference.answeredElsewhere',\n\t\tON_PARTICIPANT_REMOVED: 'conference.participantRemoved',\n\t\tON_TRANSFERRED_TO_ANOTHER_CLIENT: 'conference.transferredToAnotherClient',\n\t\tON_TERMINATE_REQUEST: 'conference.newTerminateRequest',\n\t\tON_TERMINATE_REQUEST_ACCEPTED: 'conference.terminateRequest.accepted',\n\t},\n\tHelloDevice: {\n\t\tMOVE_CAMERA: 'helloDevice.moveCamera',\n\t\tZOOM_CAMERA: 'helloDevice.zoomCamera',\n\t\tSWITCH_CAMERA: 'helloDevice.switchCamera',\n\t\tCOMMAND: 'helloDevice.command',\n\t\tDATA_CHANNEL_OFFER: 'helloDevice.dataChannelOffer',\n\t\tDATA_CHANNEL_ANSWER: 'helloDevice.dataChannelAnswer',\n\t\tNEW_ICE_CANDIDATE: 'helloDevice.newIceCandidate',\n\t\tSEND_ICE_CANDIDATE: 'helloDevice.sendIceCandidate',\n\t\tSTOP_PEER_CONNECTION: 'helloDevice.stopPeerConnection',\n\t\tTOGGLE_NIGHTVISION: 'helloDevice.toggleNightVision',\n\t\tCHECK_DEVICE_IN_CONFERENCE: 'helloDevice.checkDeviceInConferences',\n\n\t\t// subscribers\n\t\tON_CALL_STATE_CHANGED: 'helloDevice.callStateChange',\n\t\tON_TOGGLE_TV: 'helloDevice.toggleTv',\n\t\tON_OFFLINE: 'helloDevice.offline',\n\t\tON_BUSY: 'helloDevice.busy',\n\t\tON_CAMERA_RESPONSE: 'helloDevice.cameraEventResponse',\n\t\tON_INITIAL_STATE: 'helloDevice.initialState',\n\t\tON_UPDATE: 'helloDevice.updateName',\n\t\tON_TV_RESPONSE: 'helloDevice.tvEventResponse',\n\t\tON_AUDIO_OUTPUT_DEVICE: 'helloDevice.audioOutputDevice',\n\t},\n\tUser: {\n\t\tNOTIFICATIONS_UPDATED: 'user.notificationsUpdated',\n\t\tON_PASSWORD_CHANGED: 'user.passwordChanged',\n\t},\n};\n\nexport default SocketEvents;\n","import React, { Component } from 'react';\nimport { DeviceCommands, AudioOutputDevice } from 'constants/enums';\nimport SocketEvents from 'constants/socket-events';\nimport { SocketContext } from 'io-client/SocketContext';\nimport CallButton from 'components/CallButton';\nimport ListGroup from 'components/ListGroup';\n\nclass AudioOutputs extends Component {\n\tconstructor(props, socket) {\n\t\tsuper(props);\n\t\tthis.socket = socket;\n\t\tthis.audioOutputDeviceButtons = [\n\t\t\t{\n\t\t\t\ttitle: 'Banyan Bridge',\n\t\t\t\ticon: 'radio_button_unchecked',\n\t\t\t\taudioOutputDevice: AudioOutputDevice.HELLO,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: 'Pillow Speaker',\n\t\t\t\ticon: 'tv',\n\t\t\t\taudioOutputDevice: AudioOutputDevice.TV,\n\t\t\t},\n\t\t];\n\t}\n\n\tchangeAudioOutput = (event, item) => {\n\t\tconst { helloDeviceId, participantId, conferenceId } = this.props;\n\t\tconst dynamicData = JSON.stringify({ audioOutputDevice: item.audioOutputDevice });\n\t\tthis.socket.emit(SocketEvents.HelloDevice.COMMAND, {\n\t\t\tcommand: DeviceCommands.SWITCH_AUDIO_OUTPUT,\n\t\t\thelloDeviceId,\n\t\t\tconferenceId,\n\t\t\tparticipantId,\n\t\t\tdynamicData,\n\t\t});\n\t};\n\n\trender() {\n\t\tconst callButtonIcon = this.props.selectedAudioOutputDevice === AudioOutputDevice.HELLO ? 'radio_button_unchecked' : 'tv';\n\t\treturn (\n\t\t\t {}} tooltip='Audio Output' tooltipPosition='top' isDisabled={this.props.isDisabled}>\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nAudioOutputs.contextType = SocketContext;\nexport default AudioOutputs;\n","import React, { Component } from 'react';\nimport CallButton from 'components/CallButton';\nimport ListGroup from 'components/ListGroup';\nimport AudioOutputs from 'components/AudioOutputs';\nimport { SerialTVCommands, TvBrands, TvControlsEnums } from 'constants/enums';\nimport { SocketContext } from 'io-client/SocketContext';\nimport Alert from 'components/Alert';\n\nexport class TvControls extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\n\t\tthis.state = {\n\t\t\tprevVolumeRange: 0,\n\t\t\tvolumeRange: this.props.tvBrand === 0 ? 1 : 0,\n\t\t\tpowerTv: false,\n\t\t\tpowerToolTip: \"Toggle patient's TV power off\",\n\t\t\thdmiIcon: 'looks_one',\n\t\t\tdeviceId: 0,\n\t\t};\n\n\t\tthis.callManager = props.callManagerInstance;\n\n\t\tthis.hdmiTypeButtons = [\n\t\t\t{\n\t\t\t\ttitle: \"Toggle patient's TV to HDMI1\",\n\t\t\t\ticon: 'looks_one',\n\t\t\t\thdmiType: SerialTVCommands.HDMI.SWITCH_HDMI1,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: \"Toggle patient's TV to HDMI2\",\n\t\t\t\ticon: 'looks_two',\n\t\t\t\thdmiType: SerialTVCommands.HDMI.SWITCH_HDMI2,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: \"Toggle patient's TV to HDMI3\",\n\t\t\t\ticon: 'looks_3',\n\t\t\t\thdmiType: SerialTVCommands.HDMI.SWITCH_HDMI3,\n\t\t\t},\n\t\t];\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.hdmiStatus) {\n\t\t\tthis.tvCommandsResponseListener(this.props.hdmiStatus);\n\t\t}\n\n\t\tif (this.props.tvStatus) {\n\t\t\tthis.tvCommandsResponseListener(this.props.tvStatus);\n\t\t}\n\n\t\tif (this.props.volumeStatus) {\n\t\t\tthis.tvCommandsResponseListener(this.props.volumeStatus);\n\t\t}\n\t\tthis.setState({ deviceId: this.props.helloDeviceId });\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (JSON.stringify(this.props.tvStatus) !== JSON.stringify(prevProps.tvStatus)) {\n\t\t\tthis.tvCommandsResponseListener(this.props.tvStatus);\n\t\t}\n\n\t\tif (JSON.stringify(this.props.hdmiStatus) !== JSON.stringify(prevProps.hdmiStatus)) {\n\t\t\tthis.tvCommandsResponseListener(this.props.hdmiStatus);\n\t\t}\n\n\t\tif (JSON.stringify(this.props.volumeStatus) !== JSON.stringify(prevProps.volumeStatus)) {\n\t\t\tthis.tvCommandsResponseListener(this.props.volumeStatus);\n\t\t}\n\t}\n\n\tserialCommandsTv = async (commandType, volumeRange) => {\n\t\tswitch (commandType) {\n\t\t\tcase TvControlsEnums.POWER: {\n\t\t\t\tlet tvPowerStatus = this.state.powerTv ? SerialTVCommands.POWER.POWER_OFF : SerialTVCommands.POWER.POWER_ON;\n\t\t\t\tawait this.callManager.serialCommandsTv(tvPowerStatus, false, this.state.deviceId, this.props.conferenceId, this.props.participantId);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase TvControlsEnums.VOLUME: {\n\t\t\t\tthis.setState({\n\t\t\t\t\tvolumeRange: +volumeRange,\n\t\t\t\t});\n\n\t\t\t\tif (this.volumeTimeout) {\n\t\t\t\t\tclearTimeout(this.volumeTimeout);\n\t\t\t\t}\n\t\t\t\t// Delays this function call when we adjust the volume to prevent sending many requests\n\t\t\t\tthis.volumeTimeout = setTimeout(() => {\n\t\t\t\t\tthis.callManager.serialCommandsTv(this.state.volumeRange, true, this.state.deviceId, this.props.conferenceId, this.props.participantId);\n\t\t\t\t}, 1000);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tchangeVolume = increaseVolume => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tvolumeRange: increaseVolume ? 1 : 0,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.serialCommandsTv(TvControlsEnums.VOLUME, this.state.volumeRange);\n\t\t\t}\n\t\t);\n\t};\n\n\tonHdmiTypeChanged = async (event, item) => {\n\t\tawait this.callManager.serialCommandsTv(\n\t\t\titem.hdmiType || SerialTVCommands.HDMI.SWITCH_HDMI1,\n\t\t\tfalse,\n\t\t\tthis.state.deviceId,\n\t\t\tthis.props.conferenceId,\n\t\t\tthis.props.participantId\n\t\t);\n\t};\n\n\ttvCommandsResponseListener = data => {\n\t\tif (data.isSuccessful) {\n\t\t\tif (!data.tvState.isVolume) {\n\t\t\t\tswitch (data.tvState.tvStatus) {\n\t\t\t\t\tcase SerialTVCommands.INITIAL_TV_POWER: {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tpowerTv: true,\n\t\t\t\t\t\t\tpowerToolTip: \"Toggle patient's TV power off\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_OFF:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_ON: {\n\t\t\t\t\t\tconst tvPowerStatus = data.tvState.tvStatus !== SerialTVCommands.POWER.POWER_OFF;\n\t\t\t\t\t\tconst powerToolTip = tvPowerStatus === false ? \"Toggle patient's TV power on\" : \"Toggle patient's TV power off\";\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tpowerTv: tvPowerStatus,\n\t\t\t\t\t\t\tpowerToolTip: powerToolTip,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI1:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI2:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI3: {\n\t\t\t\t\t\tconst hdmiTypeIcon = this.hdmiTypeButtons.find(item => item.hdmiType === data.tvState.tvStatus).icon;\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\thdmiIcon: hdmiTypeIcon,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\tvolumeRange: data.tvState.tvStatus,\n\t\t\t\t\tprevVolumeRange: this.state.volumeRange,\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tconst prevVolInitPower = {};\n\n\t\t\tif (data.tvState.isVolume) {\n\t\t\t\tprevVolInitPower.volumeRange = this.state.prevVolumeRange;\n\t\t\t}\n\t\t\tif (data.tvState.tvStatus === SerialTVCommands.INITIAL_TV_POWER) {\n\t\t\t\tprevVolInitPower.powerTv = false;\n\t\t\t\tprevVolInitPower.powerToolTip = \"Toggle patient's TV power on\";\n\t\t\t}\n\n\t\t\tthis.setState(prevVolInitPower);\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t 0 && this.props.tvBrand !== TvBrands.CEC_TV}\n\t\t\t\t\tpersist={true}\n\t\t\t\t\tmessage='TV is muted or OFF. Please make sure the patient can hear you.'\n\t\t\t\t\tvariant='error'\n\t\t\t\t\tposition='top'\n\t\t\t\t\thideCloseButton={true}\n\t\t\t\t/>\n\t\t\t\t {\n\t\t\t\t\t\tthis.serialCommandsTv(TvControlsEnums.POWER);\n\t\t\t\t\t}}\n\t\t\t\t\ttooltip={this.state.powerToolTip}\n\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\tisDisabled={this.props.isDisabled}\n\t\t\t\t/>\n\t\t\t\t{this.props.tvBrand !== TvBrands.CEC_TV && (\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{this.state.volumeRange > 0 ? this.state.volumeRange : 0}\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.serialCommandsTv(TvControlsEnums.VOLUME, event.target.value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{this.state.volumeRange > 0 ? 'volume_up' : 'volume_off'} \n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{this.props.tvBrand === TvBrands.CEC_TV && (\n\t\t\t\t\t\n\t\t\t\t\t\t
    e.stopPropagation()}>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tVolume\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{this.props.tvBrand !== TvBrands.CEC_TV && (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.onHdmiTypeChanged.bind(this);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ttooltip=\"Switch patient's HDMI\"\n\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\tisDisabled={this.props.isDisabled}>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{this.props.tvBrand === TvBrands.CEC_TV && (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tawait this.callManager.serialCommandsTv(\n\t\t\t\t\t\t\t\tSerialTVCommands.HDMI.SWITCH_HDMI1,\n\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\tthis.state.deviceId,\n\t\t\t\t\t\t\t\tthis.props.conferenceId,\n\t\t\t\t\t\t\t\tthis.props.participantId\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ttooltip='Switch to HELLO Source'\n\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\tisDisabled={this.props.isDisabled}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nTvControls.contextType = SocketContext;\nexport default TvControls;\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\n/**\n * @function getAllHealthSystems\n * @desc Gets the user's health systems\n */\nexport function getAllHealthSystems() {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems`;\n\t\tgatewayApi\n\t\t\t.get(url)\n\t\t\t.then(response => res(response.data))\n\t\t\t.catch(error => rej(error));\n\t});\n}\n\n/**\n * @function createHealthSystem\n * @desc Creates a new health system\n * @param {string} healthSystemName, Name of the new health system example: \"Florida Health System\"\n * @param {Array} healthSystemRegions, Regions of new health systems example: [{name: \"South Region\"}, {name: \"Norht Region\"}]\n */\nexport async function createHealthSystem(healthSystemName, healthSystemRegions) {\n\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems`;\n\tawait gatewayApi.post(url, {\n\t\tname: healthSystemName,\n\t\tregions: healthSystemRegions,\n\t});\n}\n\nexport async function editHealthSystemName(healthSystemId, newHealthSystemName) {\n\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}`;\n\tawait gatewayApi.put(url, {\n\t\tname: newHealthSystemName,\n\t});\n}\n\nexport async function editRegionName(healthSystemId, regionId, newRegionName) {\n\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/regions/${regionId}`;\n\tawait gatewayApi.put(url, {\n\t\tname: newRegionName,\n\t});\n}\n\nexport async function createNewRegion(healthSystemId, newRegionName) {\n\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/regions`;\n\tlet response = await gatewayApi.post(url, {\n\t\tname: newRegionName,\n\t});\n\treturn response.data.region;\n}\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\nimport axios from 'axios';\n\nexport function deleteOrgUnit(level, id) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/organizations/${APP_CONFIG.companyId}/level/${level}/id/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function reAssignDevice({ hospitalId, departmentId, floorId, roomId, deviceId }) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(\n\t\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/devices/${deviceId}/re-assign`\n\t\t\t)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getTreeData(currentHealthSystemId, currentRegionId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/regions/${currentRegionId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.organization.healthSystem.hospitals);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function uploadLogo(fileInput, { x, y, width, height }) {\n\tconst formData = new FormData();\n\tformData.append('file', fileInput, fileInput.name);\n\tformData.append('cropOffsetX', x.toFixed());\n\tformData.append('cropOffsetY', y.toFixed());\n\tformData.append('cropWidth', width.toFixed());\n\tformData.append('cropHeight', height.toFixed());\n\n\tconst accessToken = localStorage.getItem('access_token');\n\treturn new Promise(res => {\n\t\taxios({\n\t\t\tmethod: 'post',\n\t\t\tbaseURL: APP_CONFIG.URL.gatewayApiBasePath,\n\t\t\turl: '/v1/media/pictures/organization-logo',\n\t\t\tdata: formData,\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'multipart/form-data',\n\t\t\t\tAuthorization: `Bearer ${accessToken}`,\n\t\t\t},\n\t\t})\n\t\t\t.then(({ data }) => res({ data }))\n\t\t\t.catch(error => res({ error }));\n\t});\n}\n\nexport async function saveLogo(teamId, data) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/companies/${APP_CONFIG.companyId}/teams/${teamId}/picture`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport async function getLogoUrl(teamId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/teams/${teamId}/picture`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.picture);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHopsitalDepartments(healthSystemId, hospitalId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport const setRoomDetails = async (healthSystemId, hospitalId, departmentId, floorId, roomId, params) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.put(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}`,\n\t\t\tparams\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getRoomDetails = async (healthSystemId, hospitalId, departmentId, floorId, roomId) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}`\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getRoomLocation = async (healthSystemId, hospitalId, departmentId, floorId, roomId) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/locations`\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const updateRoomLocation = async (healthSystemId, hospitalId, departmentId, floorId, roomId, params) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.put(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/locations`,\n\t\t\tparams\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const deleteRoomLocation = async (healthSystemId, hospitalId, departmentId, floorId, roomId) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.delete(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/locations`\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getHealthSystemHospitals = async healthSystemId => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`/v1/organizations/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/hospitals`);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\nimport { OverviewActionTypes } from 'constants/action-types';\nimport { getCurrentHealthSystemInfo, buildTreeModel } from 'infrastructure/helpers/commonHelpers';\nimport { getAllHealthSystems } from 'api/healthSystems';\nimport { getTreeData } from 'api/organization';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const actionCreators = {\n\ttoggleSwitchHealthSystemModal: () => ({ type: OverviewActionTypes.toggleSwitchHealthSystemModal }),\n\ttoggleAssignDeviceModal: payload => dispatch => {\n\t\tdispatch({\n\t\t\ttype: OverviewActionTypes.toggleAssignDeviceModal,\n\t\t\tpayload,\n\t\t});\n\t},\n\tsetStreamPermissionMessage: data => ({ type: OverviewActionTypes.setStreamPermissionMessage, payload: data }),\n\taddNewRoom: () => ({ type: OverviewActionTypes.addNewRoom }),\n\tcreateNewHospital: () => ({ type: OverviewActionTypes.createNewHospital }),\n\tsetCurrentSectorLocation: data => ({ type: OverviewActionTypes.setCurrentSectorLocation, payload: data }),\n\tupdateBreadcrumb: data => ({ type: OverviewActionTypes.updateBreadcrumb, payload: data }),\n\tsetCurrentHealthSystemInfo: data => ({ type: OverviewActionTypes.setCurrentHealthSystemInfo, payload: data }),\n\tsetTreeData: data => ({ type: OverviewActionTypes.setTreeData, payload: data }),\n\tsetActiveMonitoringFeeds: data => ({ type: OverviewActionTypes.setActiveMonitoringFeeds, payload: data }),\n\tsetCurrentHospitalId: id => ({ type: OverviewActionTypes.setCurrentHospitalId, payload: id }),\n\tgetAllHealthSystems: () => async dispatch => {\n\t\tlet response = await getAllHealthSystems();\n\t\t// TO DO: Don't set current HS in this function, make a new one!\n\t\t// TEMP Solution\n\t\tlet currentHs = localStorage.getItem('currentHealthSystemInfo');\n\t\tif (currentHs) {\n\t\t\tcurrentHs = JSON.parse(currentHs);\n\t\t} else if (response.healthSystems.length > 0) {\n\t\t\tconst [hs] = response.healthSystems;\n\t\t\t// @ts-ignore\n\t\t\tcurrentHs = {\n\t\t\t\tcurrentHealthSystemId: hs.id,\n\t\t\t\tcurrentHealthSystemName: hs.name,\n\t\t\t\tcurrentRegionId: hs.regions[0].id,\n\t\t\t};\n\t\t}\n\t\tif (currentHs && response.healthSystems.length > 0) {\n\t\t\tdispatch({ type: OverviewActionTypes.setAllHealthSystems, payload: { healthSystems: response.healthSystems, currentHealthSystem: currentHs } });\n\t\t}\n\t},\n\tcreateHospital: name => async () => {\n\t\tconst { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals`;\n\t\tawait gatewayApi.post(url, {\n\t\t\tregionId: currentRegionId,\n\t\t\tname: name,\n\t\t});\n\t},\n\tcreateDepartment: (hospitalId, name) => async () => {\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments`;\n\t\tawait gatewayApi.post(url, {\n\t\t\tname: name,\n\t\t});\n\t},\n\tcreateFloor: (hospitalId, departmentId, name) => async () => {\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors`;\n\t\tawait gatewayApi.post(url, {\n\t\t\tname: name,\n\t\t});\n\t},\n\tcreateRoom: (hospitalId, departmentId, floorId, name) => async () => {\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms`;\n\t\tawait gatewayApi.post(url, {\n\t\t\tname: name,\n\t\t});\n\t},\n\tgetHospitalTree: hospitalId => async dispatch => {\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments`;\n\t\tconst response = await gatewayApi.get(url);\n\t\tdispatch({ type: OverviewActionTypes.setHospitalTree, payload: response.data.hospital });\n\t},\n\tgetTreeData: () => async dispatch => {\n\t\tconst { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tconst hospitals = await getTreeData(currentHealthSystemId, currentRegionId);\n\t\tlet treeData = buildTreeModel(hospitals);\n\t\tlet preSelected = {};\n\t\tif (treeData.length) {\n\t\t\tdispatch({ type: OverviewActionTypes.setCurrentHospitalId, payload: treeData.firstHospitalId });\n\t\t}\n\t\tdispatch({\n\t\t\ttype: OverviewActionTypes.setTreeData,\n\t\t\tpayload: {\n\t\t\t\ttree: treeData.length ? treeData : [{}],\n\t\t\t\tpreSelected: preSelected,\n\t\t\t},\n\t\t});\n\t},\n};\n","import { gatewayApi } from '../constants/global-variables';\n\nexport function getUserNotifications(userId, appType, pageNo, pageSize = 10) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/notifications`;\n\t\tgatewayApi\n\t\t\t.get(url, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize: pageSize,\n\t\t\t\t\tpageIndex: pageNo,\n\t\t\t\t\tappType: appType,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getMissedCallsNotificationsCounter(userId, appType) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/notifications/count`;\n\t\tgatewayApi\n\t\t\t.get(url, {\n\t\t\t\tparams: {\n\t\t\t\t\tappType: appType,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.total);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function changeNotificationReadStatus(userId, unreadNotifications) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/notifications/status`;\n\t\tgatewayApi\n\t\t\t.patch(url, unreadNotifications)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import { UserPresenceActionTypes } from 'constants/action-types';\nimport { getUserPresence, putUserPresence } from 'api/userPresence';\n\nfunction fetchingUserPresence() {\n\treturn {\n\t\ttype: UserPresenceActionTypes.FETCHING_USER_PRESENCE,\n\t};\n}\n\nexport function fetchUserPresenceSucceeded(data) {\n\treturn {\n\t\ttype: UserPresenceActionTypes.FETCH_USER_PRESENCE_SUCCESS,\n\t\tdata: data,\n\t};\n}\n\nfunction fetchUserPresenceFailed() {\n\treturn {\n\t\ttype: UserPresenceActionTypes.FETCH_USER_PRESENCE_FAILURE,\n\t};\n}\n\nexport function fetchUserPresence() {\n\treturn dispatch => {\n\t\tdispatch(fetchingUserPresence());\n\t\tconst userId = localStorage.getItem('userId');\n\n\t\treturn getUserPresence(userId)\n\t\t\t.then(userPresence => {\n\t\t\t\tdispatch(fetchUserPresenceSucceeded(userPresence));\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tdispatch(fetchUserPresenceFailed());\n\t\t\t});\n\t};\n}\n\nfunction updatingUserPresence() {\n\treturn {\n\t\ttype: UserPresenceActionTypes.UPDATING_USER_PRESENCE,\n\t};\n}\n\nexport function userPresenceUpdateSucceeded(userId, customMessage, presenceStatusTypeId) {\n\treturn {\n\t\ttype: UserPresenceActionTypes.UPDATE_USER_PRESENCE_SUCCESS,\n\t\tdata: {\n\t\t\tcustomMessage: customMessage,\n\t\t\tpresenceStatusTypeId: presenceStatusTypeId,\n\t\t},\n\t};\n}\n\nfunction userPresenceUpdateFailed() {\n\treturn {\n\t\ttype: UserPresenceActionTypes.UPDATE_USER_PRESENCE_FAILURE,\n\t};\n}\n\nexport function updateUserPresence(userId, customMessage, presenceStatusTypeId) {\n\treturn dispatch => {\n\t\tdispatch(updatingUserPresence());\n\n\t\treturn putUserPresence(userId, customMessage, presenceStatusTypeId)\n\t\t\t.then(() => {\n\t\t\t\tlocalStorage.setItem('presenceStatusTypeId', presenceStatusTypeId);\n\t\t\t\tdispatch(userPresenceUpdateSucceeded(userId, customMessage, presenceStatusTypeId));\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tdispatch(userPresenceUpdateFailed());\n\t\t\t});\n\t};\n}\n","import { gatewayApi } from 'constants/global-variables';\n\nexport function getUserPresence(userId) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/presence`;\n\t\tgatewayApi\n\t\t\t.get(url)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.presence);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconsole.log(e);\n\t\t\t\trej(e);\n\t\t\t});\n\t});\n}\n\nexport function putUserPresence(userId, customMessage, presenceStatusTypeId) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/presence`;\n\t\tgatewayApi\n\t\t\t.put(url, {\n\t\t\t\tcustomMessage: customMessage,\n\t\t\t\tpresenceStatusTypeId: presenceStatusTypeId,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import { NotificationsCounterActionTypes } from 'constants/action-types';\nimport { getMissedCallsNotificationsCounter } from 'api/notifications';\nimport { getUserProfile } from 'infrastructure/auth';\nimport { BanyanAppType } from 'constants/global-variables';\n\nfunction fetchingNotificationCounter() {\n\treturn {\n\t\ttype: NotificationsCounterActionTypes.FETCHING_NOTIFICATIONS_COUNTER,\n\t};\n}\n\nfunction fetchNotificationCounterSucceeded(data) {\n\treturn {\n\t\ttype: NotificationsCounterActionTypes.FETCH_NOTIFICATIONS_COUNTER_SUCCESS,\n\t\tdata: data,\n\t};\n}\n\nfunction fetchNotificationCounterFailed() {\n\treturn {\n\t\ttype: NotificationsCounterActionTypes.FETCH_NOTIFICATIONS_COUNTER_FAILURE,\n\t};\n}\n\nexport function fetchNotificationCounter() {\n\treturn dispatch => {\n\t\tdispatch(fetchingNotificationCounter());\n\t\tconst userProfile = getUserProfile();\n\n\t\treturn getMissedCallsNotificationsCounter(userProfile.userId, BanyanAppType)\n\t\t\t.then(notificationCounter => {\n\t\t\t\tdispatch(fetchNotificationCounterSucceeded(notificationCounter));\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tdispatch(fetchNotificationCounterFailed());\n\t\t\t});\n\t};\n}\n","import moment from 'moment';\n\nexport function formatDate(dateObj) {\n\tlet month = '' + (dateObj.getMonth() + 1);\n\tlet day = '' + dateObj.getDate();\n\tlet year = dateObj.getFullYear();\n\n\tif (month.length < 2) month = '0' + month;\n\tif (day.length < 2) day = '0' + day;\n\n\treturn [month, day, year].join('/');\n}\n\nexport function formatTime(dateObj) {\n\tlet h = '' + dateObj.getHours();\n\tlet m = '' + dateObj.getMinutes();\n\n\tif (h.length < 2) h = '0' + h;\n\tif (m.length < 2) m = '0' + m;\n\n\treturn h + ':' + m;\n}\n\nexport function formatDateTime(dateTimeObj) {\n\tlet month = '' + (dateTimeObj.getMonth() + 1);\n\tlet day = '' + dateTimeObj.getDate();\n\tlet year = dateTimeObj.getFullYear();\n\tlet hour = '' + dateTimeObj.getHours();\n\tlet minutes = '' + dateTimeObj.getMinutes();\n\n\tif (month.length < 2) month = '0' + month;\n\tif (day.length < 2) day = '0' + day;\n\tif (hour.length < 2) hour = '0' + hour;\n\tif (minutes.length < 2) minutes = '0' + minutes;\n\n\treturn [day, month, year].join('/') + '-' + hour + ':' + minutes;\n}\n\nexport function calculateDuration(startedAt, endedAt) {\n\tvar delta = Math.abs(startedAt - endedAt) / 1000;\n\n\tvar days = Math.floor(delta / 86400);\n\tdelta -= days * 86400;\n\n\tvar hours = Math.floor(delta / 3600) % 24;\n\tdelta -= hours * 3600;\n\n\tvar minutes = Math.floor(delta / 60) % 60;\n\tdelta -= minutes * 60;\n\n\tvar seconds = Math.round(delta % 60);\n\n\tif (hours < 10) hours = '0' + hours;\n\tif (minutes < 10) minutes = '0' + minutes;\n\tif (seconds < 10) seconds = '0' + seconds;\n\n\treturn hours + ':' + minutes + ':' + seconds;\n}\n\nexport function durationUntilNow(utcDateTime) {\n\tconst k = moment(moment.utc().format()).diff(moment.utc(utcDateTime));\n\tconst days = Math.floor(k / 1000 / 86400);\n\tconst f = days > 0 ? `${days}[d] HH:mm:ss` : 'HH:mm:ss';\n\treturn moment.utc(moment(moment.utc().format()).diff(moment.utc(utcDateTime))).format(f);\n}\n\nexport function utcToLocalTime(date) {\n\tconst stillUtc = moment.utc(date).toDate();\n\tconst localDate = moment(stillUtc);\n\treturn localDate;\n}\n\nexport const getDateDifference = (start, end) => {\n\tconst startDate = moment(start).startOf('day');\n\tconst endDate = moment(end).startOf('day');\n\treturn moment.duration(endDate.diff(startDate)).asDays();\n};\n\nexport const secondsToHHMMSS = seconds => {\n\tconst HH = `${Math.floor(seconds / 3600)}`.padStart(2, '0');\n\tconst MM = `${Math.floor(seconds / 60) % 60}`.padStart(2, '0');\n\tconst SS = `${Math.floor(seconds % 60)}`.padStart(2, '0');\n\treturn [HH, MM, SS].join(':');\n};\n","const channel = new BroadcastChannel('notifications');\n\nexport const postMessage = msg => {\n\tchannel.postMessage(msg);\n};\n\nexport const onMessage = handler => {\n\tchannel.onmessage = handler;\n};\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport const deleteMemberCallAvailability = async () => {\n\ttry {\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/members/call-availability`;\n\t\tconst { data } = await gatewayApi.delete(url);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const addOrUpdateMemberCallAvailability = async teams => {\n\ttry {\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/members/call-availability`;\n\t\tconst { data } = await gatewayApi.post(url, { teams });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getNurseHealthSystemAvailabilities = async () => {\n\ttry {\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/members/call-availability`;\n\t\tconst { data } = await gatewayApi.get(url);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import styled from 'styled-components';\n\nexport const Wrapper = styled.div`\n\tbackground: var(--gray-1);\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: flex;\n\tpadding-top: var(--spacing-sl);\n\tjustify-content: center;\n\n\t.flex {\n\t\tdisplay: flex;\n\t}\n\n\t> div {\n\t\twidth: 400px;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tmax-width: 90%;\n\t\tpadding-bottom: var(--spacing-l);\n\n\t\th3,\n\t\tp,\n\t\th4 {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\n\t\th3 {\n\t\t\tfont-size: 20px;\n\t\t\tfont-weight: 500;\n\n\t\t\t&:nth-of-type(2) {\n\t\t\t\tmargin-top: var(--spacing-l);\n\t\t\t}\n\t\t}\n\n\t\th4 {\n\t\t\tfont-size: 18px;\n\t\t\tfont-weight: 500;\n\t\t}\n\n\t\tp {\n\t\t\tfont-size: 14px;\n\t\t\tcolor: var(--gray-4);\n\t\t\tmargin-top: var(--spacing-s);\n\t\t}\n\n\t\th4 {\n\t\t\ttext-align: left;\n\t\t\tmargin-top: var(--spacing-l);\n\t\t}\n\n\t\t.select-wrapper {\n\t\t\tposition: relative;\n\n\t\t\tselect {\n\t\t\t\tmargin: var(--spacing-m) 0;\n\t\t\t\tpadding: var(--spacing-m);\n\t\t\t\tborder-radius: var(--spacing-s);\n\t\t\t\tborder: 1px solid var(--gray-2);\n\t\t\t\t-webkit-appearance: none;\n\t\t\t\tappearance: none;\n\t\t\t\twidth: 100%;\n\n\t\t\t\t&:hover {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:after {\n\t\t\t\tcontent: '▼';\n\t\t\t\tfont-size: 10px;\n\t\t\t\ttop: 50%;\n\t\t\t\tright: var(--spacing-m);\n\t\t\t\ttransform: translate(0, -50%);\n\t\t\t\tposition: absolute;\n\t\t\t}\n\t\t}\n\t}\n\n\tbutton:not(.rct-collapse-btn),\n\ta.button {\n\t\twidth: 100%;\n\t\tborder: 0;\n\t\tpadding: var(--spacing-m);\n\t\tborder-radius: var(--spacing-s);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tmargin-top: var(--spacing-m);\n\t\tmargin-bottom: var(--spacing-m);\n\t}\n\n\ta.button + a.button {\n\t\tmargin-left: var(--spacing-m);\n\t\tmargin-right: 0;\n\t}\n`;\n\nexport const HealthSystemsListItem = styled.label`\n\tmargin-bottom: var(--spacing-m);\n\tpadding: var(--spacing-m);\n\tborder-radius: var(--spacing-s);\n\tborder: 1px solid var(--gray-2);\n\tbackground: var(--gray-0);\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tfont-size: 14px;\n\n\t&:first-of-type {\n\t\tmargin-top: var(--spacing-m);\n\t}\n`;\n\nexport const TreeViewListWrapper = styled.div`\n\tinput[type='text'] {\n\t\tpadding: var(--spacing-m);\n\t\twidth: 100%;\n\t\tborder: none;\n\t\tborder: 1px solid var(--gray-2);\n\t\tfont-size: 14px;\n\t\tcolor: var(--gray-5);\n\t\tmargin-top: var(--spacing-m);\n\t}\n\n\t.circle-loader {\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t}\n\n\tlabel {\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t}\n\n\t.react-checkbox-tree {\n\t\tinput {\n\t\t\tdisplay: initial !important;\n\t\t}\n\n\t\tlabel {\n\t\t\t&:hover {\n\t\t\t\tbackground: none;\n\t\t\t}\n\t\t}\n\t\t.rct-icon.rct-icon-check,\n\t\t.rct-checkbox {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t> div {\n\t\t> ol {\n\t\t\tli {\n\t\t\t\tbackground: var(--gray-0);\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: var(--spacing-m);\n\t\t\t\tpadding: var(--spacing-m);\n\n\t\t\t\t.rct-node-icon > i {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\ttop: 1px;\n\t\t\t\t}\n\n\t\t\t\ti {\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tfont-size: 18px;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\tmargin-right: var(--spacing-s);\n\t\t\t\t\tcolor: var(--gray-4);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n`;\n","import React, { useEffect, useState, useRef, useContext } from 'react';\nimport { getUserId, getUserProfile } from 'infrastructure/auth';\nimport { Alert, Button, Loader } from 'components';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { getHealthSystemSubTreeBasic } from 'api/users';\nimport CheckboxTree from 'react-checkbox-tree';\nimport 'react-checkbox-tree/lib/react-checkbox-tree.css';\nimport { deleteMemberCallAvailability, addOrUpdateMemberCallAvailability, getNurseHealthSystemAvailabilities } from 'api/nursePooling';\nimport { NursePoolingOptions, PresenceStatusType } from 'constants/enums';\nimport { Wrapper, HealthSystemsListItem, TreeViewListWrapper } from 'containers/PoolingFlow/style';\nimport { getNursePoolingStatus } from 'infrastructure/helpers/commonHelpers';\nimport SocketEvents from 'constants/socket-events';\nimport { SocketContext } from 'io-client/SocketContext';\n\nconst processTreeData = hospitals => {\n\tconst getNode = (node, icon) => ({\n\t\tvalue: node.id,\n\t\tlabel: node.name,\n\t\ticon: {icon},\n\t\t...(node.children && node.children.length > 0 && { children: node.children || [] }),\n\t});\n\n\tconst mapChildren = (nodes, icon) => nodes.map(item => getNode(item, icon));\n\n\treturn hospitals.map(hospital => {\n\t\tconst departments = hospital.departments.map(department => ({\n\t\t\t...department,\n\t\t\tchildren: mapChildren(department.floors, 'money'),\n\t\t}));\n\n\t\treturn {\n\t\t\t...getNode(hospital, 'business'),\n\t\t\t...(departments && departments.length > 0 && { children: mapChildren(departments, 'account_balance') }),\n\t\t};\n\t});\n};\n\nconst PoolingFlow = props => {\n\tconst [userProfile] = useState(getUserProfile);\n\tconst [page, setPage] = useState(0);\n\tconst [nursePoolingStatus, setNursePoolingStatus] = useState('');\n\tconst [healthSystems, setHealthSystems] = useState([]);\n\tconst [selectedHealthSystem, setSelectedHealthSystem] = useState(null);\n\tconst [nodes, setNodes] = useState([]);\n\tconst [filteredText, setFilteredText] = useState('');\n\tconst [nodesFiltered, setFilteredNodes] = useState([]);\n\tconst [checked, setChecked] = useState([]);\n\tconst [expanded, setExpanded] = useState([]);\n\tconst [isLoading, setIsLoading] = useState(false);\n\tconst [initialValues, setInitialValues] = useState([]);\n\tconst [alertErrorText, setAlertErrorText] = useState(null);\n\n\tconst organization = useSelector(state => state.organization);\n\tconst dispatch = useDispatch();\n\n\tconst { current: answerExists } = useRef(getNursePoolingStatus());\n\n\tconst _socket = useContext(SocketContext);\n\n\tuseEffect(() => {\n\t\tconst organizations = [...organization.allHealthSystems];\n\t\tconst mapped = organizations.map(item => ({\n\t\t\t...item,\n\t\t\tisChecked: false,\n\t\t}));\n\t\tsetHealthSystems(mapped);\n\t}, [organization.allHealthSystems]);\n\n\tuseEffect(() => {\n\t\tif (answerExists && !props.isEdit) {\n\t\t\tprops.changePage();\n\t\t}\n\t}, [props.isEdit, props.changePage]);\n\n\tuseEffect(() => {\n\t\tconst fetchData = async () => {\n\t\t\tconst res = await getNurseHealthSystemAvailabilities();\n\t\t\tif (res.error) {\n\t\t\t\tsetAlertErrorText('Something went wrong!');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetNursePoolingStatus(answerExists);\n\t\t\tsetInitialValues(res.nurseAvailabilities);\n\t\t};\n\t\tconst resetData = async () => {\n\t\t\tconst deleteRes = await deleteMemberCallAvailability();\n\t\t\tif (deleteRes.error) {\n\t\t\t\tsetAlertErrorText('Something went wrong!');\n\t\t\t}\n\n\t\t\tsetInitialValues([]);\n\t\t};\n\t\tif (!answerExists && !props.isEdit) {\n\t\t\tresetData();\n\t\t}\n\t\tif (answerExists && props.isEdit) {\n\t\t\tfetchData();\n\t\t}\n\t}, [props.isEdit]);\n\n\tconst getTree = async hsList => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\tconst tree = await getHealthSystemSubTreeBasic(hsList.id);\n\t\t\tsetNodes(processTreeData(tree.regions.reduce((acc, value) => [...acc, ...value.hospitals], [])));\n\t\t\tsetFilteredNodes(processTreeData(tree.regions.reduce((acc, value) => [...acc, ...value.hospitals], [])));\n\t\t} catch (error) {\n\t\t\tsetAlertErrorText('Something went wrong!');\n\t\t}\n\t\tsetIsLoading(false);\n\t};\n\n\tuseEffect(() => {\n\t\tif (initialValues.length > 0) {\n\t\t\tconst checkedTeamIds = [...checked];\n\n\t\t\tsetHealthSystems(prevState => {\n\t\t\t\tconst prevHs = [...prevState];\n\n\t\t\t\tprevHs.forEach(hs => {\n\t\t\t\t\tconst initialValue = initialValues.find(val => val.healthSystemId === hs.id);\n\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\ths.isChecked = initialValue.teams.length > 0;\n\t\t\t\t\tif (hs.isChecked) {\n\t\t\t\t\t\tcheckedTeamIds.push({ healthSystemId: initialValue.healthSystemId, teamIds: initialValue.teams });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn prevHs;\n\t\t\t});\n\t\t\tsetChecked(checkedTeamIds);\n\t\t}\n\t}, [initialValues]);\n\n\tconst filterNodes = (filtered, element) => {\n\t\tconst children = (element.children || []).reduce(filterNodes, []);\n\n\t\tif (element.label.toLocaleLowerCase().indexOf(filteredText.toLocaleLowerCase()) > -1 || children.length) {\n\t\t\tfiltered.push({ ...element, ...(children && children.length > 0 && { children }) });\n\t\t}\n\n\t\treturn filtered;\n\t};\n\n\tuseEffect(() => {\n\t\tif (!filteredText) {\n\t\t\tsetFilteredNodes([...nodes]);\n\t\t\treturn;\n\t\t}\n\n\t\tsetFilteredNodes([...nodes].reduce(filterNodes, []));\n\t}, [filteredText]);\n\n\tuseEffect(() => {\n\t\tif (selectedHealthSystem) {\n\t\t\tgetTree(selectedHealthSystem);\n\t\t\tsetFilteredText('');\n\t\t}\n\t}, [selectedHealthSystem]);\n\n\tconst setNoReceiveCalls = async () => {\n\t\tconst deleteRes = await deleteMemberCallAvailability();\n\n\t\tif (deleteRes.error) {\n\t\t\tsetAlertErrorText('Something went wrong. Please try again!');\n\t\t\treturn;\n\t\t}\n\n\t\tlocalStorage.setItem('nursePoolingStatus', nursePoolingStatus);\n\t\tconst data = {\n\t\t\tuserId: getUserId(),\n\t\t\tpresenceStatusTypeId: PresenceStatusType.UNAVAILABLE,\n\t\t\tcustomMessage: null,\n\t\t};\n\n\t\t_socket.emit(SocketEvents.Client.UPDATE_USER_PRESENCE, data);\n\n\t\tprops.changePage();\n\t\tsetChecked([]);\n\t};\n\n\tconst setCheckedBasedOnHs = (itemIds, hs) => {\n\t\tsetChecked(prevState => {\n\t\t\tconst prevChecked = [...prevState];\n\n\t\t\tconst checkedItem = prevChecked.find(prev => prev.healthSystemId === hs.id);\n\t\t\tif (!checkedItem) {\n\t\t\t\tprevChecked.push({\n\t\t\t\t\thealthSystemId: hs.id,\n\t\t\t\t\tteamIds: itemIds,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcheckedItem.teamIds = itemIds;\n\t\t\t}\n\t\t\treturn prevChecked;\n\t\t});\n\t};\n\n\tconst setHealthSystemsList = item => {\n\t\tsetHealthSystems(prevState => {\n\t\t\tconst hsList = [...prevState];\n\n\t\t\tconst hs = hsList.find(hsItem => hsItem === item);\n\t\t\ths.isChecked = !hs.isChecked;\n\t\t\tif (!hs.isChecked) {\n\t\t\t\tsetCheckedBasedOnHs([], hs);\n\t\t\t}\n\n\t\t\treturn hsList;\n\t\t});\n\t};\n\n\tconst flatMapArray = arr =>\n\t\tarr.flat().map(item => ({\n\t\t\tteamId: item,\n\t\t\tisAvailable: true,\n\t\t}));\n\n\tconst submit = async () => {\n\t\tconst flattedNewParams = flatMapArray([...checked].map(item => item.teamIds));\n\t\tconst flattedInitialValues = flatMapArray([...initialValues].map(item => item.teams));\n\t\tflattedInitialValues.forEach(item => {\n\t\t\tif (!flattedNewParams.some(elem => elem.teamId === item.teamId)) {\n\t\t\t\tflattedNewParams.push({\n\t\t\t\t\tteamId: item.teamId,\n\t\t\t\t\tisAvailable: false,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tif (flattedNewParams.length > 0) {\n\t\t\tconst submitRes = await addOrUpdateMemberCallAvailability(flattedNewParams);\n\t\t\tif (submitRes.error) {\n\t\t\t\tsetAlertErrorText('Something went wrong. Please try again!');\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tconst deleteRes = await deleteMemberCallAvailability();\n\n\t\t\tif (deleteRes.error) {\n\t\t\t\tsetAlertErrorText('Something went wrong. Please try again!');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tlocalStorage.setItem('nursePoolingStatus', nursePoolingStatus);\n\n\t\tconst data = {\n\t\t\tuserId: getUserId(),\n\t\t\tpresenceStatusTypeId: flattedNewParams.length > 0 ? PresenceStatusType.AVAILABLE : PresenceStatusType.UNAVAILABLE,\n\t\t\tcustomMessage: null,\n\t\t};\n\n\t\t_socket.emit(SocketEvents.Client.UPDATE_USER_PRESENCE, data);\n\n\t\tprops.changePage();\n\t\tsetPage(0);\n\t\tif (!props.isEdit) {\n\t\t\tsetChecked([]);\n\t\t}\n\t};\n\n\tconst showHealthSystems = () => {\n\t\tsetPage(prev => prev + 1);\n\t\tconst checkedHealthSystems = healthSystems.filter(item => item.isChecked);\n\t\tif (checkedHealthSystems.length > 0) {\n\t\t\tsetSelectedHealthSystem(checkedHealthSystems[0]);\n\t\t}\n\t};\n\n\tconst goBackToHsSelection = () => {\n\t\tsetPage(prev => prev - 1);\n\t\tsetSelectedHealthSystem(null);\n\t\tsetNodes([]);\n\t\tsetFilteredNodes([]);\n\t};\n\n\tconst canSubmitAvailability = () => flatMapArray([...checked].map(item => item.teamIds)).length > 0;\n\n\tconst checkedHealthSystems = healthSystems.filter(item => item.isChecked);\n\tconst foundHealthSystemIndex = checkedHealthSystems.findIndex(item => selectedHealthSystem?.id === item.id);\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{page === 0 && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tHi, {userProfile.firstName} {userProfile.lastName}\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t

    Select whether you will be receiving calls from patients.

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t{nursePoolingStatus === NursePoolingOptions.YES.toString() && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Select Health Systems

    \n\t\t\t\t\t\t\t\t

    Select the health systems you will be receiving calls from.

    \n\n\t\t\t\t\t\t\t\t{healthSystems.map(item => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{item.name} setHealthSystemsList(item)} checked={item.isChecked} />\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{nursePoolingStatus !== NursePoolingOptions.NO.toString() && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{page === 1 && selectedHealthSystem && (\n\t\t\t\t\t\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t{checkedHealthSystems.length > 1 && `Health Systems [${foundHealthSystemIndex + 1} / ${checkedHealthSystems.length}]`}\n\t\t\t\t\t\t\t{checkedHealthSystems.length === 1 && 'Health System'}\n\t\t\t\t\t\t

    \n\n\t\t\t\t\t\t

    Select the level from which you will be receiving calls.

    \n\t\t\t\t\t\t{isLoading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!isLoading && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    {selectedHealthSystem.name}

    \n\t\t\t\t\t\t\t\t setFilteredText(event.target.value)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t item.healthSystemId === selectedHealthSystem.id)?.teamIds || []}\n\t\t\t\t\t\t\t\t\texpanded={expanded}\n\t\t\t\t\t\t\t\t\tonCheck={itemIds => setCheckedBasedOnHs(itemIds, selectedHealthSystem)}\n\t\t\t\t\t\t\t\t\tonExpand={data => setExpanded(data)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{foundHealthSystemIndex + 1 === 1 &&
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t\t setAlertErrorText(null)} />\n\t\t\n\t);\n};\n\nexport default PoolingFlow;\n","import React from 'react';\nimport { Modal } from 'components';\nimport PoolingFlow from 'containers/PoolingFlow/index';\nimport styled from 'styled-components';\n\nconst EditPoolingModal = props => (\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n);\n\nconst ModalWrapper = styled.div`\n\t.modal.right {\n\t\t.modal__content {\n\t\t\theight: 100vh;\n\t\t\tbackground: var(--gray-1);\n\t\t\tpadding-bottom: var(--spacing-m);\n\t\t}\n\t}\n\n\t.modal__actions {\n\t\tdisplay: none;\n\t}\n`;\n\nexport default EditPoolingModal;\n","import { legacyApi } from 'constants/global-variables';\n\n/**\n * @param {{ oldpassword: string; newpassword: string; }} data\n */\n// eslint-disable-next-line import/prefer-default-export\nexport function changePassword(data) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v2.1/api/account/password`;\n\t\tlegacyApi\n\t\t\t.post(url, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import React, { Component } from 'react';\nimport { Form, Modal, Input, Select, Tabs, Avatar, DescriptionBox, Alert } from 'components';\nimport { getUserProfile, setUserProfile } from 'infrastructure/auth';\nimport { changePassword } from 'api/user';\nimport { ChangePasswordUseCases } from 'constants/enums';\nimport { passwordRegEx } from 'constants/global-variables';\n\nclass UserSettingsModal extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tuserProfile: {},\n\t\t\tvirtualRoles: [{ value: 'Virtual Nurse' }, { value: 'Virtual Case Manager' }, { value: 'Virtual Sitter' }, { value: 'Virtual Intensivist' }],\n\t\t\tcurrentPassword: '',\n\t\t\tnewPassword: '',\n\t\t\tnewConfirmedPassword: '',\n\t\t\tpasswordInfo: ChangePasswordUseCases.passwordInfo,\n\t\t\tpasswordAlertVariant: 'neutral',\n\t\t\tisConfirmPasswordChangeModalOpen: false,\n\t\t\tselectedTab: 0,\n\t\t};\n\n\t\tthis.COMPANY_INFO = {\n\t\t\tSTARTED: 'Mon Mar 12 2018 00:00:00',\n\t\t\tNAME: 'Banyan',\n\t\t};\n\n\t\tthis.TABS = {\n\t\t\tEDIT_PROFILE: 0,\n\t\t\tCHANGE_PASSWORD: 1,\n\t\t};\n\t}\n\n\tcomponentDidMount = () => {\n\t\tconst locations = this.getUserLocations();\n\t\tconst userProfile = getUserProfile();\n\t\tconst virtualRoleKey = this.state.virtualRoles.findIndex(r => r.value === userProfile.jobTitle);\n\t\tthis.setState({\n\t\t\tuserProfile: {\n\t\t\t\tfullName: `${userProfile.firstName} ${userProfile.lastName}`,\n\t\t\t\tprofilePicUrl: userProfile.profilePicture.url,\n\t\t\t\tvirtualRole: userProfile.jobTitle,\n\t\t\t\tvirtualRoleKey: virtualRoleKey,\n\t\t\t\tuserWorkExperienceId: userProfile.jobId,\n\t\t\t\tlocations: locations,\n\t\t\t},\n\t\t});\n\t};\n\n\tgetUserLocations() {\n\t\tlet locations = [];\n\t\tthis.props.organization.allHealthSystems.forEach(healthSystem => locations.push({ description: healthSystem.name }));\n\t\treturn locations;\n\t}\n\n\tsaveAccountSettings = () => {\n\t\tif (this.state.selectedTab === this.TABS.EDIT_PROFILE) {\n\t\t\tthis.editProfile();\n\t\t} else if (this.state.selectedTab === this.TABS.CHANGE_PASSWORD) {\n\t\t\tthis.changePassword();\n\t\t}\n\t};\n\n\teditProfile = async () => {\n\t\tconst userProfile = getUserProfile();\n\t\tconst { virtualRole, userWorkExperienceId } = this.state.userProfile;\n\t\tconst data = {\n\t\t\tcompanyName: this.COMPANY_INFO.NAME,\n\t\t\tfromDate: this.COMPANY_INFO.STARTED,\n\t\t\tjobDescription: virtualRole,\n\t\t\tjobTitle: virtualRole,\n\t\t\tisCurrent: true,\n\t\t\tshowCompanyOnPage: true,\n\t\t\ttoDate: null,\n\t\t};\n\n\t\tlet response;\n\t\tlet userHasRole = userWorkExperienceId !== 0;\n\t\tif (userHasRole) {\n\t\t\tresponse = await this.props.mainLayoutActions.updateUserRole(data);\n\t\t} else {\n\t\t\tresponse = await this.props.mainLayoutActions.addNewUserRole({\n\t\t\t\t...data,\n\t\t\t\tidUserCompanyId: userWorkExperienceId,\n\t\t\t});\n\t\t}\n\n\t\tsetUserProfile({\n\t\t\t...userProfile,\n\t\t\tjobTitle: response.data.entityData.JobTitle,\n\t\t\tjobId: userHasRole ? response.data.entityData.IdUserCompanies : null,\n\t\t});\n\t\tthis.props.toggleAccountSettingsModal();\n\t};\n\n\tchangeVirtualRole = (selection, index) => {\n\t\tlet user = this.state.userProfile;\n\t\tthis.setState({\n\t\t\tuserProfile: {\n\t\t\t\t...user,\n\t\t\t\tvirtualRole: selection.value,\n\t\t\t\tvirtualRoleKey: index,\n\t\t\t},\n\t\t});\n\t};\n\n\tvalidatePassword = () => {\n\t\tlet { currentPassword, newPassword, newConfirmedPassword } = this.state;\n\t\tlet message;\n\t\tif (currentPassword === '') {\n\t\t\tmessage = ChangePasswordUseCases.currentPassEmpty;\n\t\t} else if (newPassword === '') {\n\t\t\tmessage = ChangePasswordUseCases.newPassEmpty;\n\t\t} else if (newPassword.length < 8) {\n\t\t\tmessage = ChangePasswordUseCases.minLengthRequired;\n\t\t} else if (newConfirmedPassword === '') {\n\t\t\tmessage = ChangePasswordUseCases.confirmNewPassEmpty;\n\t\t} else if (newPassword !== newConfirmedPassword) {\n\t\t\tmessage = ChangePasswordUseCases.newPasswordsDoNotMatch;\n\t\t} else if (currentPassword === newPassword) {\n\t\t\tmessage = ChangePasswordUseCases.newPassSameAsCurrent;\n\t\t} else if (passwordRegEx.test(newPassword) === false || passwordRegEx.test(newConfirmedPassword) === false) {\n\t\t\tmessage = ChangePasswordUseCases.strongPasswordCheck;\n\t\t}\n\t\treturn message;\n\t};\n\n\tresetPasswordFields = () => {\n\t\tthis.setState({\n\t\t\tpasswordData: {\n\t\t\t\t...this.state.passwordData,\n\t\t\t\tnewPassword: '',\n\t\t\t\tnewConfirmedPassword: '',\n\t\t\t},\n\t\t});\n\t};\n\n\tchangePassword = () => {\n\t\tlet message = this.validatePassword();\n\t\tif (message) {\n\t\t\tif (message === ChangePasswordUseCases.newPasswordsDoNotMatch) {\n\t\t\t\tthis.resetPasswordFields();\n\t\t\t}\n\t\t\tthis.setPasswordErrorMessage(message);\n\t\t} else {\n\t\t\tthis.toggleConfirmPasswordDialog();\n\t\t}\n\t};\n\n\tsavePasswordChanges = async () => {\n\t\ttry {\n\t\t\tconst response = await changePassword({\n\t\t\t\toldpassword: this.state.currentPassword,\n\t\t\t\tnewpassword: this.state.newPassword,\n\t\t\t});\n\t\t\tif (response.HasSucceed) {\n\t\t\t\tthis.setState(\n\t\t\t\t\t{\n\t\t\t\t\t\tpasswordInfo: ChangePasswordUseCases.newPassSaved,\n\t\t\t\t\t},\n\t\t\t\t\t() => {\n\t\t\t\t\t\tthis.signOut();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.setState({\n\t\t\t\tpasswordInfo: ChangePasswordUseCases.currentPasswordIncorrect,\n\t\t\t\tpasswordAlertVariant: 'error',\n\t\t\t\tcurrentPassword: '',\n\t\t\t\tnewPassword: '',\n\t\t\t\tnewConfirmedPassword: '',\n\t\t\t\tisConfirmPasswordChangeModalOpen: false,\n\t\t\t});\n\t\t}\n\t};\n\n\tsetPasswordErrorMessage = msg => {\n\t\tthis.setState({\n\t\t\tpasswordInfo: msg,\n\t\t\tpasswordAlertVariant: 'neutral',\n\t\t});\n\t};\n\n\ttoggleConfirmPasswordDialog = () => {\n\t\tthis.setState({\n\t\t\tisConfirmPasswordChangeModalOpen: !this.state.isConfirmPasswordChangeModalOpen,\n\t\t});\n\t};\n\n\tsetInputValue = event => {\n\t\tthis.setState({\n\t\t\t[event.target.name]: event.target.value,\n\t\t});\n\t};\n\n\tsignOut = () => {\n\t\tthis.props.history.push('/logout');\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t this.setState({ selectedTab: index })}\n\t\t\t\t\t\tcomponents={[\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    {this.state.userProfile.fullName}

    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Health Systems

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,\n\t\t\t\t\t\t]}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Are you sure you want to change your password? You will be logged out of your account and must login with your new credentials.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default UserSettingsModal;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { actionCreators as mainLayoutActionCreators } from 'state/mainLayout/actions';\nimport { withRouter } from 'react-router-dom';\nimport { UserRoles, PresenceStatusType, PresenceStatusTypeLabels, FeedColors } from 'constants/enums';\nimport { getUserNotifications, changeNotificationReadStatus } from 'api/notifications';\nimport { getUserProfile, getUserId, getUserRole } from 'infrastructure/auth';\nimport { ListGroup, Badge, Breadcrumb, Dropdown, Input, Avatar, Modal, Form } from 'components';\nimport { updateUserPresence, fetchUserPresence } from 'state/userPresence/actions';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { postMessage } from 'infrastructure/helpers/notificationsChannel';\nimport moment from 'moment';\nimport { BanyanAppType } from 'constants/global-variables';\nimport { getCurrentHealthSystemInfo, getNursePoolingStatus } from 'infrastructure/helpers/commonHelpers';\nimport EditPoolingModal from 'components/EditPoolingModal';\nimport UserSettingsModal from 'components/UserSettings/UserSettingsModal';\n\nclass Header extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.userPresenceDropdownRef = React.createRef();\n\t\tthis.state = {\n\t\t\tcustomMessage: '',\n\t\t\tuserProfile: {},\n\t\t\tnotifications: [],\n\t\t\tnotificationsPageNo: 0,\n\t\t\tnotificationsPageSize: 10,\n\t\t\thasMoreNotifications: true,\n\t\t\tisAccountSettingsModalOpen: false,\n\t\t\tisEditPoolingModalOpen: false,\n\t\t\tisVCPRoleModalOpen: false,\n\t\t\tisSwitchPresenceModalVisible: false,\n\t\t};\n\t}\n\n\tprecautions = [\n\t\t{\n\t\t\ttitle: 'Suspicious Behavior',\n\t\t\tcolor: FeedColors.purple,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Suicide Watch',\n\t\t\tcolor: FeedColors.cyan,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Falls',\n\t\t\tcolor: FeedColors.yellow,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Isolation',\n\t\t\tcolor: FeedColors.red,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Seizure',\n\t\t\tcolor: FeedColors.pink,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Hospice',\n\t\t\tcolor: FeedColors.black,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Detox',\n\t\t\tcolor: FeedColors.orange,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Pulling O2',\n\t\t\tcolor: FeedColors.lightBlue,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Impulsive/Confused',\n\t\t\tcolor: FeedColors.gray,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Non-redirectable',\n\t\t\tcolor: FeedColors.blue,\n\t\t},\n\t];\n\n\tcomponentDidMount = async () => {\n\t\tconst userProfile = getUserProfile();\n\t\tconst user = {\n\t\t\tfullName: `${userProfile.firstName} ${userProfile.lastName}`,\n\t\t\tprofilePicUrl: userProfile.profilePicture.url,\n\t\t\tvirtualRole: userProfile.jobTitle,\n\t\t\tvirtualRoleKey: null,\n\t\t\tuserWorkExperienceId: 0,\n\t\t\tlocations: [],\n\t\t};\n\t\tthis.setState({\n\t\t\tuserProfile: user,\n\t\t});\n\t\tthis.props.fetchNotificationCounter();\n\t};\n\n\tcomponentWillUnmount() {\n\t\tthis.props.organizationActions.updateBreadcrumb([]);\n\t}\n\n\tupdateUserPresence = key => {\n\t\tthis.userPresenceDropdownRef.current.toggleDropdown(false);\n\t\tif (key === this.props.userPresence.presenceStatusTypeId && this.state.customMessage === this.props.userPresence.customMessage) {\n\t\t\treturn;\n\t\t}\n\t\tthis.props.updateUserPresence(getUserId(), this.state.customMessage, key);\n\t};\n\n\tonBreadcrumbClick = (options, breadcrumbIndex) => {\n\t\tlet breadcrumb = [];\n\t\toptions.forEach((option, index) => {\n\t\t\tif (breadcrumbIndex + 1 > index) {\n\t\t\t\tbreadcrumb.push(option);\n\t\t\t}\n\t\t});\n\t\tthis.props.organizationActions.updateBreadcrumb(breadcrumb);\n\t};\n\n\tloadUserNotifications = async isDropdownOpen => {\n\t\tif (!isDropdownOpen) {\n\t\t\tconst userProfile = getUserProfile();\n\n\t\t\tlet unreadNotifications = [];\n\t\t\tthis.state.notifications.forEach(i => {\n\t\t\t\tif (i.isPreview) {\n\t\t\t\t\t// isPreview means it hasn't been read yet\n\t\t\t\t\tunreadNotifications.push(i.id);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (unreadNotifications.length > 0) {\n\t\t\t\tawait changeNotificationReadStatus(userProfile.userId, unreadNotifications);\n\t\t\t\tthis.props.fetchNotificationCounter();\n\t\t\t}\n\t\t\tpostMessage('Update notifications');\n\t\t\tthis.setState({\n\t\t\t\tnotifications: [],\n\t\t\t\thasMoreNotifications: true,\n\t\t\t\tnotificationsPageNo: 0,\n\t\t\t});\n\t\t} else {\n\t\t\tawait this.getUserNotifications();\n\t\t\tthis.setState({\n\t\t\t\tnotificationsPageNo: this.state.notificationsPageNo + 1,\n\t\t\t});\n\t\t}\n\t};\n\n\tformatTime = date => {\n\t\tlet localDate = utcToLocalTime(date);\n\t\tlet now = new Date();\n\t\tnow.setHours(0, 0, 0, 0);\n\t\tconst isNowAfterTheDate = moment(now).isAfter(localDate);\n\t\treturn isNowAfterTheDate ? moment(localDate).format('dddd, MMMM DD, YYYY - h:mm A') : `Today - ${moment(localDate).format('h:mm A')}`;\n\t};\n\n\tgetUserNotifications = async () => {\n\t\tconst userProfile = getUserProfile();\n\t\tconst response = await getUserNotifications(userProfile.userId, BanyanAppType, this.state.notificationsPageNo, this.state.notificationsPageSize);\n\n\t\tlet { notifications } = this.state;\n\t\tlet hasMoreNotifications;\n\n\t\tresponse.notifications.forEach(i => {\n\t\t\ti.timeAgo = this.formatTime(i.dateCreated);\n\t\t\treturn i;\n\t\t});\n\n\t\tif (response === null) {\n\t\t\tnotifications.push({\n\t\t\t\ttitle: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    An error ocurred trying to fetch notifications!

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t});\n\t\t} else if (response.notifications.length === 0 && this.state.notifications.length === 0) {\n\t\t\tnotifications.push({\n\t\t\t\ttitle: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    You don't have any notifications!

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t});\n\t\t} else {\n\t\t\thasMoreNotifications = response.total < this.state.notificationsPageNo * 10 ? false : true;\n\t\t\tresponse.notifications.forEach(n => {\n\t\t\t\tconst el = {\n\t\t\t\t\tid: n.id,\n\t\t\t\t\tisPreview: n.isPreview,\n\t\t\t\t\ttitle: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{n.isPreview ? (\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\tMissed call from {n.callerName}\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t

    Missed call from {n.callerName}

    \n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{n.timeAgo}\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t\tnotifications.push(el);\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({\n\t\t\tnotifications: notifications,\n\t\t\thasMoreNotifications: hasMoreNotifications,\n\t\t});\n\t};\n\n\tcheckIfScrolledAtBottom = ({ target }) => {\n\t\tconst hasScrolledAtBottom = Math.ceil(target.scrollTop) >= target.scrollHeight - target.offsetHeight;\n\t\tif (!hasScrolledAtBottom || !this.state.hasMoreNotifications) {\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tnotificationsPageNo: this.state.notificationsPageNo + 1,\n\t\t});\n\t\tthis.getUserNotifications();\n\t};\n\n\tonAvailabilityDropdownClick = (evt, { available }) => {\n\t\tif (available) {\n\t\t\tconst noCallsShouldBeReceived = '2';\n\t\t\tif (\n\t\t\t\tgetUserRole() === UserRoles.NURSE &&\n\t\t\t\t(!localStorage.getItem('nursePoolingStatus') || localStorage.getItem('nursePoolingStatus') === noCallsShouldBeReceived)\n\t\t\t) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisSwitchPresenceModalVisible: true,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.updateUserPresence(PresenceStatusType.AVAILABLE);\n\t\t} else {\n\t\t\tthis.updateUserPresence(PresenceStatusType.UNAVAILABLE);\n\t\t}\n\t};\n\n\tonUserDropdownClick = (evt, { id }) => {\n\t\tif (id === 'account_settings') {\n\t\t\tthis.toggleAccountSettingsModal();\n\t\t} else if (id === 'log_out') {\n\t\t\tthis.signOut();\n\t\t}\n\t};\n\n\tonCustomMessageChanged = evt => {\n\t\tthis.setState({\n\t\t\tcustomMessage: evt.target.value,\n\t\t});\n\t};\n\n\tonCustomMessageKeyUp = evt => {\n\t\tif (evt.which === 13) {\n\t\t\tthis.props.updateUserPresence(getUserId(), this.state.customMessage, this.props.userPresence.presenceStatusTypeId);\n\t\t\tthis.setState({\n\t\t\t\tcustomMessage: '',\n\t\t\t});\n\t\t}\n\t};\n\n\ttoggleAccountSettingsModal = () => {\n\t\tthis.setState({\n\t\t\tisAccountSettingsModalOpen: !this.state.isAccountSettingsModalOpen,\n\t\t});\n\t};\n\n\ttoggleEditPoolingModal = () => {\n\t\tthis.setState({\n\t\t\tisEditPoolingModalOpen: !this.state.isEditPoolingModalOpen,\n\t\t});\n\t};\n\n\tsignOut = () => {\n\t\tthis.props.history.push('/logout');\n\t};\n\n\trender() {\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.props.isMonitoring && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{this.precautions.map(item => (\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.props.isMonitoring && }\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tisSwitchPresenceModalVisible: false,\n\t\t\t\t\t\t\tisEditPoolingModalOpen: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tonModalClose={() => {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tisSwitchPresenceModalVisible: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t}}>\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    To switch your presence to “Available“ please make sure you select option “I will be receiving calls“.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\n\t\t\t\t{this.state.isEditPoolingModalOpen && }\n\t\t\t
    \n\t\t);\n\t}\n}\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t\tuserPresence: state.userPresence,\n\t\tnotifications: state.notifications,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tmainLayoutActions: bindActionCreators(mainLayoutActionCreators, dispatch),\n\t\tfetchUserPresence: () => dispatch(fetchUserPresence()),\n\t\tupdateUserPresence: (userId, customMessage, presenceStatusTypeId) => dispatch(updateUserPresence(userId, customMessage, presenceStatusTypeId)),\n\t\tfetchNotificationCounter: () => dispatch(fetchNotificationCounter()),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(Header));\n","import React from 'react';\nimport Layout from 'components/Common/Layout';\nimport { Grid } from 'components';\nimport Header from 'components/Common/Header';\nimport PoolingFlow from 'containers/PoolingFlow/index';\n\nconst PoolingFlowWrapper = props => (\n\t\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t props.history.push('/health-system')} />\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default PoolingFlowWrapper;\n","import React from 'react';\nimport { Route } from 'react-router-dom';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\nimport { memberExists, getUserRole } from 'infrastructure/auth';\nimport UserError from 'views/UserError';\nimport { UserRoles } from 'constants/enums';\nimport PoolingFlowWrapper from 'views/PoolingFlowWrapper';\nimport { getNursePoolingStatus } from 'infrastructure/helpers/commonHelpers';\nimport { AuthConsumer } from '../providers/authProvider';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const PrivateRoute = ({ component, roles, ...rest }) => {\n\tconst renderFn = Component => props => (\n\t\t\n\t\t\t{({ isAuthenticated, signinRedirect }) => {\n\t\t\t\tif (!!Component && isAuthenticated()) {\n\t\t\t\t\tlet canAccessRoute = true;\n\t\t\t\t\tif (roles) {\n\t\t\t\t\t\tcanAccessRoute = roles.some(r => r === getUserRole());\n\t\t\t\t\t}\n\t\t\t\t\tif ((memberExists() || props.match.url === '/logout') && canAccessRoute) {\n\t\t\t\t\t\tif (getUserRole() === UserRoles.NURSE && !getNursePoolingStatus()) {\n\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\n\t\t\t\tsigninRedirect();\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t);\n\t\t\t}}\n\t\t
    \n\t);\n\n\treturn ;\n};\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { Modal, Form, Input, Alert } from 'components';\nimport { deleteOrgUnit } from 'api/organization';\nimport { editRegionName, createNewRegion, editHealthSystemName } from 'api/healthSystems';\nimport { DeviceListLevel } from 'constants/enums';\nimport { getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\nimport { setTimeout } from 'timers';\nimport { treeSectorNameMaxCharacters } from 'constants/global-variables';\n\nclass EditHealthSystemModal extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisConfirmDeleteRegionModalOpen: false,\n\t\t\tcurrentRegions: [],\n\t\t\thealthSystemName: '',\n\t\t\thealthSystemId: '',\n\t\t\tisRegionSelected: false,\n\t\t\tshowSuccessAlert: false,\n\t\t\tshowErrorAlert: false,\n\t\t\tregionError: '',\n\t\t\thealthSystemNameError: '',\n\t\t};\n\t\tthis.hasPressedEnter = 13;\n\t\tthis.healthSystemActionsEnum = {\n\t\t\tEDIT_HEALTH_SYSTEM: 0,\n\t\t\tEDIT_REGION_NAME: 1,\n\t\t\tCREATE_NEW_REGION: 2,\n\t\t\tDELETE_HEALTH_SYSTEM: 3,\n\t\t\tDELETE_REGION: 4,\n\t\t};\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tlet currentRegionsChanged = JSON.stringify(this.props.currentRegions) !== JSON.stringify(prevProps.currentRegions);\n\t\tif (currentRegionsChanged) {\n\t\t\tthis.setState({\n\t\t\t\tcurrentRegions: this.props.currentRegions,\n\t\t\t\thealthSystemName: this.props.healthSystemData.currentHealthSystemName,\n\t\t\t\thealthSystemId: this.props.healthSystemData.currentHealthSystemId,\n\t\t\t});\n\t\t}\n\t}\n\n\teditHealthSystemActions = async data => {\n\t\tswitch (data.action) {\n\t\t\tcase this.healthSystemActionsEnum.EDIT_HEALTH_SYSTEM:\n\t\t\t\tawait editHealthSystemName(data.healthSystemId, data.newHealthSystemName);\n\t\t\t\tbreak;\n\t\t\tcase this.healthSystemActionsEnum.EDIT_REGION_NAME:\n\t\t\t\tawait editRegionName(data.healthSystemId, data.regionId, data.newRegionName);\n\t\t\t\tbreak;\n\t\t\tcase this.healthSystemActionsEnum.CREATE_NEW_REGION:\n\t\t\t\treturn createNewRegion(data.healthSystemId, data.newRegionName);\n\t\t\tcase this.healthSystemActionsEnum.DELETE_HEALTH_SYSTEM:\n\t\t\t\tawait deleteOrgUnit(DeviceListLevel.HEALTHSYSTEM, data.healthSystemId);\n\t\t\t\tbreak;\n\t\t\tcase this.healthSystemActionsEnum.DELETE_REGION:\n\t\t\t\tawait deleteOrgUnit(DeviceListLevel.REGION, data.regionId);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tsetHealthSystemInputValue = evt => {\n\t\tthis.setState({\n\t\t\t[evt.target.name]: evt.target.value,\n\t\t});\n\n\t\tif (evt.which === this.hasPressedEnter) {\n\t\t\tthis.saveHealthSystemName(evt.target.value);\n\t\t}\n\t};\n\n\tsaveHealthSystemName = async healthSystemName => {\n\t\tif (this.checkIfHealthSystemExists()) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemNameError: 'Health system with this name already exists',\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.state.healthSystemName.length > treeSectorNameMaxCharacters) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemNameError: `Name can't be longer than ${treeSectorNameMaxCharacters} characters`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tlet { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tawait this.editHealthSystemActions({\n\t\t\taction: this.healthSystemActionsEnum.EDIT_HEALTH_SYSTEM,\n\t\t\thealthSystemId: currentHealthSystemId,\n\t\t\tnewHealthSystemName: healthSystemName,\n\t\t});\n\t\tthis.props.onHealthSystemNameChange(healthSystemName);\n\t\tthis.toggleAlert('showSuccessAlert');\n\t\tthis.setState({\n\t\t\thealthSystemNameError: '',\n\t\t});\n\t};\n\n\tsetRegionInputValue = async (evt, region) => {\n\t\tconst keyPressed = evt.which;\n\t\tconst inputVal = evt.target.value;\n\t\tregion.name = inputVal;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tcurrentRegions: this.state.currentRegions,\n\t\t\t\tregionError: '',\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (keyPressed === this.hasPressedEnter) {\n\t\t\t\t\tif (this.regionExist(region)) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tregionError: 'Location with this name already exists.',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (region.name.length > treeSectorNameMaxCharacters) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tregionError: `Location(s) name can't be longer than ${treeSectorNameMaxCharacters} characters`,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.saveRegionName(region, inputVal);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tcheckIfHealthSystemExists = () =>\n\t\tthis.props.allHealthSystems.some(healthSystem => healthSystem.name.toLowerCase() === this.state.healthSystemName.toLowerCase());\n\n\tregionExist = region => {\n\t\treturn this.state.currentRegions.some(r => r.name === region.name && r.id !== region.id);\n\t};\n\n\tsaveRegionName = async (region, regionName) => {\n\t\tlet { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tif (region.isNewRegion) {\n\t\t\tlet response = await this.editHealthSystemActions({\n\t\t\t\taction: this.healthSystemActionsEnum.CREATE_NEW_REGION,\n\t\t\t\thealthSystemId: currentHealthSystemId,\n\t\t\t\tnewRegionName: regionName,\n\t\t\t});\n\n\t\t\tregion.id = response.id;\n\t\t\tregion.isNewRegion = false;\n\t\t} else {\n\t\t\tawait this.editHealthSystemActions({\n\t\t\t\taction: this.healthSystemActionsEnum.EDIT_REGION_NAME,\n\t\t\t\thealthSystemId: currentHealthSystemId,\n\t\t\t\tregionId: region.id,\n\t\t\t\tnewRegionName: regionName,\n\t\t\t});\n\t\t}\n\t\tthis.toggleAlert('showSuccessAlert');\n\t};\n\n\tremoveRegion = regionId => {\n\t\tlet regions = this.state.currentRegions.filter(currentRegion => currentRegion.id !== regionId);\n\t\tthis.setState({\n\t\t\tcurrentRegions: regions,\n\t\t});\n\t};\n\n\taddNewRegion = () => {\n\t\tlet regions = this.state.currentRegions.map(currentRegion => ({ ...currentRegion }));\n\t\tregions.push({\n\t\t\tisNewRegion: true,\n\t\t\tname: '',\n\t\t\tid: JSON.stringify(new Date().getTime()),\n\t\t});\n\n\t\tthis.setState({\n\t\t\tcurrentRegions: regions,\n\t\t});\n\t};\n\n\tdeleteSelected = async () => {\n\t\tlet { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tif (this.state.isRegionSelected) {\n\t\t\tlet { isNewRegion } = this.state.currentRegions.find(currentRegion => currentRegion.id === this.state.selectedRegionId);\n\t\t\tif (!isNewRegion) {\n\t\t\t\tawait this.editHealthSystemActions({\n\t\t\t\t\taction: this.healthSystemActionsEnum.DELETE_REGION,\n\t\t\t\t\tregionId: this.state.selectedRegionId,\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst isCurrentRegion = this.state.currentRegions.some(({ id }) => id === currentRegionId);\n\t\t\tthis.removeRegion(this.state.selectedRegionId);\n\t\t\tif (isCurrentRegion) {\n\t\t\t\tthis.moveToAnotherRegion();\n\t\t\t}\n\t\t} else {\n\t\t\tawait this.editHealthSystemActions({\n\t\t\t\taction: this.healthSystemActionsEnum.DELETE_HEALTH_SYSTEM,\n\t\t\t\thealthSystemId: currentHealthSystemId,\n\t\t\t});\n\t\t\tthis.props.onHealthSystemDelete();\n\t\t}\n\t\tthis.toggleConfirmDeleteModal();\n\t};\n\n\tmoveToAnotherRegion = () => {\n\t\tlet newHealthSystemInfo = {\n\t\t\tcurrentHealthSystemId: this.state.healthSystemId,\n\t\t\tcurrentRegionId: this.state.currentRegions[0].id,\n\t\t\tcurrentHealthSystemName: this.state.healthSystemName,\n\t\t};\n\n\t\tlocalStorage.setItem('currentHealthSystemInfo', JSON.stringify(newHealthSystemInfo));\n\t\tthis.props.onCurrentRegionDelete(this.state.currentRegions[0].id, 0);\n\t};\n\n\ttoggleConfirmDeleteModal = regionId => {\n\t\tif (regionId && this.state.currentRegions.length < 2) {\n\t\t\tthis.toggleAlert('showErrorAlert');\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tisConfirmDeleteRegionModalOpen: !this.state.isConfirmDeleteRegionModalOpen,\n\t\t\t\tisRegionSelected: !!regionId,\n\t\t\t\tselectedRegionId: regionId,\n\t\t\t});\n\t\t}\n\t};\n\n\ttoggleAlert = type => {\n\t\tthis.setState({\n\t\t\t[type]: true,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\t[type]: false,\n\t\t\t});\n\t\t}, 3000);\n\n\t\tif (document.activeElement instanceof HTMLElement) {\n\t\t\tdocument.activeElement.blur();\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{this.state.currentRegions.map(region => (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t this.setRegionInputValue(evt, region)}\n\t\t\t\t\t\t\t\t\tonChange={evt => this.setRegionInputValue(evt, region)}\n\t\t\t\t\t\t\t\t\ttype='text'\n\t\t\t\t\t\t\t\t\tvalue={region.name}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t this.toggleConfirmDeleteModal(region.id)}>\n\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t))}\n\t\t\t\t\t\t

    {this.state.regionError}

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tPress enter to save\n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t+ Add new location\n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t this.toggleConfirmDeleteModal()}>\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to delete {this.state.isRegionSelected ? 'location' : 'health system'}?

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(EditHealthSystemModal);\n","import React, { Component } from 'react';\nimport _ from 'lodash';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter } from 'react-router-dom';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { getCurrentHealthSystemInfo, findSectorById, isValidSector, searchSectors, showPath, findDeviceById } from 'infrastructure/helpers/commonHelpers';\nimport { Dropdown, ListGroup, TreeView, Grid, SkeletonLoader, Form, Select, Modal, Input } from 'components';\nimport { getUserRole } from 'infrastructure/auth';\nimport EditHealthSystemModal from 'components/Common/EditHealthSystemModal';\nimport { SectorTypes, UserRoles, ObjectType } from 'constants/enums';\nimport SocketEvents from 'constants/socket-events';\n\nclass SectorList extends Component {\n\tstatic defaultProps = {\n\t\tisMonitoring: false,\n\t};\n\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\thealthSystems: [],\n\t\t\tcurrentRegions: [],\n\t\t\tisSwitchHealthSystemModalOpen: false,\n\t\t\tisSwitchHealthSystemModalLoading: true,\n\t\t\tisEditHealthSystemModalOpen: false,\n\t\t\ttreeItems: {},\n\t\t\tshowFeedsLimitModal: false,\n\t\t\tsectorSearchValue: '',\n\t\t\texpandAllTreeItems: false,\n\t\t};\n\n\t\tthis.healthSystemOptions =\n\t\t\tgetUserRole() === UserRoles.ADMIN\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: 'Switch Health System',\n\t\t\t\t\t\t\ticon: 'compare_arrows',\n\t\t\t\t\t\t\tid: 'switch_hs',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: 'Create New Health System',\n\t\t\t\t\t\t\ticon: 'add_circle_outline',\n\t\t\t\t\t\t\tlinkTo: '/create',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: 'Edit Health System',\n\t\t\t\t\t\t\tid: 'edit_hs',\n\t\t\t\t\t\t\ticon: 'edit',\n\t\t\t\t\t\t},\n\t\t\t\t ]\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: 'Switch Location',\n\t\t\t\t\t\t\ticon: 'compare_arrows',\n\t\t\t\t\t\t\tid: 'switch_hs',\n\t\t\t\t\t\t},\n\t\t\t\t ];\n\t\tthis.socket = context;\n\t}\n\n\tcomponentDidMount = async () => {\n\t\tlet currentHealthSystemInfo = getCurrentHealthSystemInfo();\n\t\tlet currentHealthSystemName = this.props.allHealthSystems.filter(healthSystem => {\n\t\t\treturn currentHealthSystemInfo.currentHealthSystemId === healthSystem.id;\n\t\t});\n\n\t\tthis.setState({\n\t\t\t...currentHealthSystemInfo,\n\t\t\tcurrentHealthSystemName: currentHealthSystemName[0].name,\n\t\t});\n\n\t\tawait this.props.getTreeData();\n\t\tconst hasHospitals = this.hasHospitals();\n\t\tif (window.location.pathname === '/health-system' && [UserRoles.ADMIN, UserRoles.SUPERUSER].includes(getUserRole()) && hasHospitals) {\n\t\t\tthis.props.history.push(`/health-system/${this.props.currentHospitalId}`);\n\t\t} else if (!this.props.isMonitoring && !hasHospitals) {\n\t\t\tthis.props.history.push(`/health-system`);\n\t\t}\n\t\tthis.getSelectedSectorFromUrl();\n\t\tlet selectedSectorId = this.getSelectedSectorId();\n\t\tif (selectedSectorId && hasHospitals) {\n\t\t\tlet selectedSector = findSectorById(this.props.treeData.tree, selectedSectorId);\n\t\t\tif (selectedSector !== null) this.props.updateBreadcrumb(selectedSector.breadcrumb);\n\t\t\telse {\n\t\t\t\tthis.props.history.push(`/health-system/${this.props.currentHospitalId}`);\n\t\t\t}\n\t\t}\n\t\tthis.updateHealthSystemList();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tlet isHealthSystemListUpdated = JSON.stringify(this.props.allHealthSystems) !== JSON.stringify(prevProps.allHealthSystems);\n\t\tif (isHealthSystemListUpdated && this.state.isSwitchHealthSystemModalOpen) {\n\t\t\tthis.updateHealthSystemList();\n\t\t}\n\n\t\tif (JSON.stringify(this.props.breadcrumb) !== JSON.stringify(prevProps.breadcrumb)) {\n\t\t\tthis.getSelectedSectorFromUrl();\n\t\t}\n\t};\n\n\tgetSelectedSectorFromUrl = () => {\n\t\tthis.setState({\n\t\t\ttreeItems: this.getExpandedOptions(),\n\t\t\ttreeViewKey: +new Date(),\n\t\t});\n\t};\n\n\tgetExpandedOptions = () => {\n\t\tlet { healthSystem, department, floor, room } = this.props.match.params;\n\t\tlet treeObj = {};\n\t\tif (healthSystem) {\n\t\t\ttreeObj = { [healthSystem]: {} };\n\t\t}\n\t\tif (department) {\n\t\t\ttreeObj = {\n\t\t\t\t[healthSystem]: { [department]: {} },\n\t\t\t};\n\t\t}\n\t\tif (floor) {\n\t\t\ttreeObj = {\n\t\t\t\t[healthSystem]: {\n\t\t\t\t\t[department]: { [floor]: {} },\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tif (room) {\n\t\t\ttreeObj = {\n\t\t\t\t[healthSystem]: {\n\t\t\t\t\t[department]: {\n\t\t\t\t\t\t[floor]: { [room]: {} },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn treeObj;\n\t};\n\n\tgetSelectedSectorId = () => {\n\t\tlet { healthSystem, department, floor, room } = this.props.match.params;\n\t\tlet selectedSectorId;\n\t\tif (healthSystem) {\n\t\t\tselectedSectorId = healthSystem;\n\t\t}\n\t\tif (department) {\n\t\t\tselectedSectorId = department;\n\t\t}\n\t\tif (floor) {\n\t\t\tselectedSectorId = floor;\n\t\t}\n\t\tif (room) {\n\t\t\tselectedSectorId = room;\n\t\t}\n\t\treturn selectedSectorId;\n\t};\n\n\tupdateHealthSystemList = () => {\n\t\tlet healthSystems = this.transformHealthSystemArr(this.props.allHealthSystems);\n\t\tlet regions = this.transformRegionsArr(this.props.allHealthSystems[healthSystems.currentHealthSystemIndex].regions);\n\t\tthis.setState({\n\t\t\thealthSystems: healthSystems.allHealthSystems,\n\t\t\tcurrentHealthSystem: healthSystems.allHealthSystems[healthSystems.currentHealthSystemIndex],\n\t\t\tcurrentHealthSystemIndex: healthSystems.currentHealthSystemIndex,\n\t\t\tcurrentRegionId: healthSystems.allHealthSystems[healthSystems.currentHealthSystemIndex].regions[regions.currentRegionIndex].id,\n\t\t\tcurrentRegions: regions.currentRegions,\n\t\t\tcurrentRegionIndex: regions.currentRegionIndex,\n\t\t\tisSwitchHealthSystemModalLoading: false,\n\t\t});\n\t};\n\n\tonNewSector = async sector => {\n\t\tlet isValid = isValidSector(sector, this.props.treeData.tree, sector.name);\n\t\tif (!isValid) {\n\t\t\tsector.error = `${sector.type} with this name already exists`;\n\t\t\treturn;\n\t\t}\n\t\tsector.isNewOption = false;\n\t\tsector.subOptions = [];\n\t\tsector.tooltip = `Add ${sector.type}`;\n\t\tsector.isCreatingSector = true;\n\t\tthis.createNewSector(sector);\n\t};\n\n\tcreateNewSector = async sector => {\n\t\tif (sector.type === SectorTypes.HOSPITAL) {\n\t\t\tawait this.props.createHospital(sector.name);\n\t\t} else if (sector.type === SectorTypes.DEPARTMENT) {\n\t\t\tawait this.props.createDepartment(sector.hospitalId, sector.name);\n\t\t} else if (sector.type === SectorTypes.FLOOR) {\n\t\t\tawait this.props.createFloor(sector.hospitalId, sector.departmentId, sector.name);\n\t\t} else if (sector.type === SectorTypes.ROOM) {\n\t\t\tawait this.props.createRoom(sector.hospitalId, sector.departmentId, sector.floorId, sector.name);\n\t\t}\n\t\tthis.props.getTreeData();\n\t};\n\n\thasNoSectors = () => {\n\t\treturn (\n\t\t\tthis.props.treeData.tree.filter(sector => {\n\t\t\t\treturn !sector.isNewOption && sector.name;\n\t\t\t}).length <= 0\n\t\t);\n\t};\n\n\thasHospitals = () => {\n\t\treturn Object.keys(this.props.treeData.tree[0]).length > 0;\n\t};\n\n\tcreateNewHospital = () => {\n\t\tthis.props.createNewHospital();\n\t};\n\n\ttransformRegionsArr = regions => {\n\t\tlet currentRegions = [];\n\t\tlet currentRegionIndex = 0;\n\t\tregions.forEach((region, regionIndex) => {\n\t\t\tif (region.id === this.state.currentRegionId) {\n\t\t\t\tcurrentRegionIndex = regionIndex;\n\t\t\t}\n\t\t\tcurrentRegions.push({\n\t\t\t\tvalue: region.name,\n\t\t\t\tid: region.id,\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tcurrentRegions,\n\t\t\tcurrentRegionIndex,\n\t\t};\n\t};\n\n\ttransformHealthSystemArr = healthSystems => {\n\t\tlet allHealthSystems = [];\n\t\tlet currentHealthSystemIndex = 0;\n\t\thealthSystems.forEach((healthSystem, healthSystemIndex) => {\n\t\t\tif (healthSystem.id === this.state.currentHealthSystemId) {\n\t\t\t\tcurrentHealthSystemIndex = healthSystemIndex;\n\t\t\t}\n\t\t\tallHealthSystems.push({\n\t\t\t\tvalue: healthSystem.name,\n\t\t\t\tname: healthSystem.name,\n\t\t\t\tid: healthSystem.id,\n\t\t\t\tfirstRegion: healthSystem.regions[0],\n\t\t\t\tregions: healthSystem.regions,\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tallHealthSystems,\n\t\t\tcurrentHealthSystemIndex,\n\t\t};\n\t};\n\n\ttoggleSwitchHealthSystemModal = async () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisSwitchHealthSystemModalOpen: !this.state.isSwitchHealthSystemModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.getAllHealthSystems();\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleEditHealthSystemModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditHealthSystemModalOpen: !this.state.isEditHealthSystemModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isEditHealthSystemModalOpen) {\n\t\t\t\t\tlet currentHealthSystem = this.props.allHealthSystems.filter(healthSystem => {\n\t\t\t\t\t\treturn healthSystem.id === this.state.currentHealthSystemId;\n\t\t\t\t\t});\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tcurrentRegions: currentHealthSystem[0].regions,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tonTreeViewLinkClick = option => {\n\t\tthis.props.setCurrentSectorLocation(option.treeLocation);\n\n\t\tif (this.props.isMonitoring) {\n\t\t\tthis.props.onTreeViewLinkClick(option);\n\t\t} else {\n\t\t\tthis.props.updateBreadcrumb(option.breadcrumb);\n\t\t}\n\t};\n\n\tchangeHealthSystem = (healthSystem, healthSystemIndex) => {\n\t\tlet regions = this.transformRegionsArr(healthSystem.regions);\n\t\tthis.setState({\n\t\t\tcurrentHealthSystem: healthSystem,\n\t\t\tcurrentHealthSystemIndex: healthSystemIndex,\n\t\t\tcurrentRegions: regions.currentRegions,\n\t\t\tcurrentRegionId: healthSystem.firstRegion.id,\n\t\t\tcurrentRegionIndex: 0,\n\t\t});\n\t};\n\n\tchangeRegion = (region, regionIndex) => {\n\t\tthis.setState({\n\t\t\tcurrentRegionId: region.id,\n\t\t\tcurrentRegionIndex: regionIndex,\n\t\t});\n\t};\n\n\tsetCurrentHealthSystemInfo = async (isSwitchModal = true) => {\n\t\tthis.setState({\n\t\t\tisSwitchHealthSystemModalLoading: true,\n\t\t\texpandAllTreeItems: false,\n\t\t});\n\n\t\tlet newHealthSystemInfo = {\n\t\t\tcurrentHealthSystemId: this.state.currentHealthSystem.id,\n\t\t\tcurrentRegionId: this.state.currentRegionId,\n\t\t\tcurrentHealthSystemName: this.state.currentHealthSystem.name,\n\t\t};\n\n\t\tlocalStorage.setItem('currentHealthSystemInfo', JSON.stringify(newHealthSystemInfo));\n\t\tawait this.props.getTreeData();\n\t\tif (isSwitchModal) {\n\t\t\tthis.toggleSwitchHealthSystemModal();\n\t\t}\n\t\tthis.setState({\n\t\t\tcurrentHealthSystemName: this.state.currentHealthSystem.name,\n\t\t\tcurrentHealthSystemId: this.state.currentHealthSystem.id,\n\t\t\tisSwitchHealthSystemModalLoading: false,\n\t\t\tsectorSearchValue: '',\n\t\t});\n\n\t\tif ([UserRoles.ADMIN, UserRoles.SUPERUSER].includes(getUserRole()) && this.hasHospitals()) {\n\t\t\tthis.props.history.push(`/health-system/${this.props.currentHospitalId}`);\n\t\t} else if (!this.props.isMonitoring) {\n\t\t\tthis.props.history.push(`/health-system`);\n\t\t}\n\t\tthis.props.updateBreadcrumb([]);\n\t\tthis.props.setCurrentHealthSystemInfo(newHealthSystemInfo);\n\t};\n\n\tonAddDevice = selection => {\n\t\tthis.props.addFeed(selection);\n\t};\n\n\thandleHealthSystemOptions = (event, item) => {\n\t\tif (item.id === 'switch_hs') {\n\t\t\tthis.toggleSwitchHealthSystemModal();\n\t\t}\n\n\t\tif (item.id === 'edit_hs') {\n\t\t\tthis.toggleEditHealthSystemModal();\n\t\t}\n\t};\n\n\tswitchHealthSystem = () => {\n\t\tlet firstHealthSystem = this.props.allHealthSystems[0];\n\t\tthis.setState({\n\t\t\tcurrentHealthSystem: firstHealthSystem,\n\t\t\tcurrentHealthSystemId: firstHealthSystem.id,\n\t\t\tcurrentRegionId: firstHealthSystem.regions[0].id,\n\t\t\tcurrentHealthSystemName: firstHealthSystem.name,\n\t\t\tisEditHealthSystemModalOpen: false,\n\t\t});\n\t\tthis.setCurrentHealthSystemInfo(false);\n\t};\n\n\tupdateHealthSystemName = name => {\n\t\tthis.setState({\n\t\t\tcurrentHealthSystemName: name,\n\t\t});\n\t};\n\n\ttoggleFeedsLimitModal = () => {\n\t\tthis.setState({\n\t\t\tshowFeedsLimitModal: !this.state.showFeedsLimitModal,\n\t\t});\n\t};\n\n\tsetSearchValue = event => {\n\t\tconst { target } = event;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\t[target.name]: target.value,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (target.value.length > 1) {\n\t\t\t\t\tlet sectors = searchSectors(this.props.treeData.tree, target.value);\n\t\t\t\t\tshowPath(this.props.treeData.tree, sectors);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\texpandAllTreeItems: true,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tsearchSectors(this.props.treeData.tree, '');\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\texpandAllTreeItems: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tsendCheckDeviceActiveConferences = objectId => {\n\t\tthis.socket.emit(SocketEvents.HelloDevice.CHECK_DEVICE_IN_CONFERENCE, { objectId, objectType: ObjectType.HELLO_DEVICE }, ({ activeConferences }) => {\n\t\t\tconst tree = _.cloneDeep(this.props.treeData.tree);\n\t\t\tconst room = findDeviceById(tree, objectId);\n\n\t\t\troom.deviceBusy = activeConferences.length > 0;\n\t\t\troom.activeConferences = activeConferences;\n\t\t\tthis.props.setTreeData({\n\t\t\t\ttree,\n\t\t\t\tpreSelected: this.props.treeData.preSelected,\n\t\t\t});\n\t\t});\n\t};\n\n\tonCurrentRegionDelete = async (id, index) => {\n\t\tthis.changeRegion(id, index);\n\t\tawait this.props.getTreeData();\n\t\tthis.props.history.push('/health-system');\n\t};\n\n\trender() {\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{this.props.treeData.tree.length > 0 && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{this.state.currentHealthSystemName}\n\t\t\t\t\t\t\t{[UserRoles.ADMIN, UserRoles.SUPERUSER].includes(userRole) && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t{[UserRoles.ADMIN].includes(userRole) && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{[UserRoles.NURSE, UserRoles.VIRTUALSITTER].includes(userRole) && (\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ isSwitchHealthSystemModalOpen: true });\n\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\tcompare_arrows\n\t\t\t\t\t\t\t\tSwitch Health System\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.hasHospitals() && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{!this.props.treeData.tree.length && (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t{userRole !== UserRoles.SUPERUSER && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    You have reached the maximum number of rooms to monitor. You can close one of them in order to add another.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.onCurrentRegionDelete(id, index)}\n\t\t\t\t\tisOpen={this.state.isEditHealthSystemModalOpen}\n\t\t\t\t\tonModalClose={this.toggleEditHealthSystemModal}\n\t\t\t\t\thealthSystemData={{ currentHealthSystemName: this.state.currentHealthSystemName, currentHealthSystemId: this.state.currentHealthSystemId }}\n\t\t\t\t\tcurrentRegions={this.state.currentRegions}\n\t\t\t\t/>\n\t\t\t\n\t\t);\n\t}\n}\n\nSectorList.contextType = SocketContext;\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(SectorList));\n","import React, { Component } from 'react';\nimport { Modal, Form, Select, TreeView } from 'components';\nimport { SectorTypes } from 'constants/enums';\nimport { getTreeData, reAssignDevice } from 'api/organization';\nimport { buildTreeModel, getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\n\nclass AssignDeviceModal extends Component {\n\tstate = {\n\t\tcurrentHealthSystem: null,\n\t\tcurrentRegionId: null,\n\t\thealthSystems: [],\n\t\tcurrentRegions: [],\n\t\tisAddDeviceModalLoading: false,\n\t\ttree: [],\n\t};\n\n\tcomponentDidMount = async () => {\n\t\tawait this.updateHealthSystemList();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (!prevProps.showAssignDeviceModalData.show && this.props.showAssignDeviceModalData.show) {\n\t\t\tthis.updateHealthSystemList();\n\t\t\tconst index = this.state.healthSystems.findIndex(({ id }) => getCurrentHealthSystemInfo().currentHealthSystemId === id);\n\t\t\tthis.changeHealthSystem(this.state.healthSystems[index], index);\n\t\t\tthis.getTree();\n\t\t}\n\t};\n\n\ttransformHealthSystemArr = healthSystems => {\n\t\tlet allHealthSystems = [];\n\t\tlet currentHealthSystemIndex = 0;\n\t\thealthSystems.forEach((healthSystem, healthSystemIndex) => {\n\t\t\tif (healthSystem.id === this.state.currentHealthSystemId) {\n\t\t\t\tcurrentHealthSystemIndex = healthSystemIndex;\n\t\t\t}\n\t\t\tallHealthSystems.push({\n\t\t\t\tvalue: healthSystem.name,\n\t\t\t\tname: healthSystem.name,\n\t\t\t\tid: healthSystem.id,\n\t\t\t\tfirstRegion: healthSystem.regions[0],\n\t\t\t\tregions: healthSystem.regions,\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tallHealthSystems,\n\t\t\tcurrentHealthSystemIndex,\n\t\t};\n\t};\n\n\tupdateHealthSystemList = () => {\n\t\tlet healthSystems = this.transformHealthSystemArr(this.props.allHealthSystems);\n\t\tlet regions = this.transformRegionsArr(this.props.allHealthSystems[healthSystems.currentHealthSystemIndex].regions);\n\t\tthis.setState({\n\t\t\thealthSystems: healthSystems.allHealthSystems,\n\t\t\tcurrentHealthSystem: healthSystems.allHealthSystems[healthSystems.currentHealthSystemIndex],\n\t\t\tcurrentHealthSystemIndex: healthSystems.currentHealthSystemIndex,\n\t\t\tcurrentRegionId: healthSystems.allHealthSystems[healthSystems.currentHealthSystemIndex].regions[regions.currentRegionIndex].id,\n\t\t\tcurrentRegions: regions.currentRegions,\n\t\t\tcurrentRegionIndex: regions.currentRegionIndex,\n\t\t});\n\t};\n\n\tchangeHealthSystem = (healthSystem, healthSystemIndex) => {\n\t\tlet regions = this.transformRegionsArr(healthSystem.regions);\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tcurrentHealthSystem: healthSystem,\n\t\t\t\tcurrentHealthSystemIndex: healthSystemIndex,\n\t\t\t\tcurrentRegions: regions.currentRegions,\n\t\t\t\tcurrentRegionId: healthSystem.firstRegion.id,\n\t\t\t\tcurrentRegionIndex: 0,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.getTree();\n\t\t\t}\n\t\t);\n\t};\n\n\ttransformRegionsArr = regions => {\n\t\tlet currentRegions = [];\n\t\tlet currentRegionIndex = 0;\n\t\tregions.forEach((region, regionIndex) => {\n\t\t\tif (region.id === this.state.currentRegionId) {\n\t\t\t\tcurrentRegionIndex = regionIndex;\n\t\t\t}\n\t\t\tcurrentRegions.push({\n\t\t\t\tvalue: region.name,\n\t\t\t\tid: region.id,\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tcurrentRegions,\n\t\t\tcurrentRegionIndex,\n\t\t};\n\t};\n\n\tchangeRegion = (region, regionIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tcurrentRegionId: region.id,\n\t\t\t\tcurrentRegionIndex: regionIndex,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.getTree();\n\t\t\t}\n\t\t);\n\t};\n\n\tgetTree = async () => {\n\t\tconst hospitals = await getTreeData(this.state.currentHealthSystem.id, this.state.currentRegionId);\n\t\tconst tree = buildTreeModel(hospitals, true);\n\t\tthis.setState({\n\t\t\ttree,\n\t\t});\n\t};\n\n\tonNewSector = async selection => {\n\t\tif (selection.type === SectorTypes.HOSPITAL) {\n\t\t\tawait this.props.createHospital(selection.name);\n\t\t} else if (selection.type === SectorTypes.DEPARTMENT) {\n\t\t\tawait this.props.createDepartment(selection.hospitalId, selection.name);\n\t\t} else if (selection.type === SectorTypes.FLOOR) {\n\t\t\tawait this.props.createFloor(selection.hospitalId, selection.departmentId, selection.name);\n\t\t} else if (selection.type === SectorTypes.ROOM) {\n\t\t\tawait this.props.createRoom(selection.hospitalId, selection.departmentId, selection.floorId, selection.name);\n\t\t}\n\t\tthis.getTree();\n\t\tthis.props.getTreeData();\n\t};\n\n\tassignDevice = async ({ hospitalId, departmentId, floorId, roomId }) => {\n\t\tthis.setState({\n\t\t\tisAddDeviceModalLoading: true,\n\t\t});\n\t\tawait reAssignDevice({ hospitalId, departmentId, floorId, roomId, deviceId: this.props.showAssignDeviceModalData.deviceId });\n\t\tthis.setState({\n\t\t\tisAddDeviceModalLoading: false,\n\t\t});\n\t\tthis.props.getTreeData();\n\t\tthis.props.toggleAssignDeviceModal({ show: false, assignCompleted: true });\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t null}\n\t\t\t\tposition='right'\n\t\t\t\tsubmitButtonText=''\n\t\t\t\tonModalClose={() => this.props.toggleAssignDeviceModal({ show: false, assignCompleted: false })}>\n\t\t\t\t
    evt.preventDefault()}>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t

    Select room

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default AssignDeviceModal;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport Grid from 'components/Grid';\nimport HelloFeatureBlock from 'components/HelloFeatureBlock';\nimport Modal from 'components/Modal';\nimport Form from 'components/Form';\nimport { withRouter } from 'react-router-dom';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { DeviceStatus, MediaPermissions, MediaTypes, StreamError } from 'constants/enums';\nimport { If, Then, Else } from 'react-if';\nimport { findSectorById, askForPermission, checkForPermission, checkIfMediaDevicesPlugged } from 'infrastructure/helpers/commonHelpers';\n\nclass CallPatient extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\tisDeviceUnavailableModalOpen: false,\n\t\t};\n\n\t\tthis.camStatus = null;\n\t\tthis.micStatus = null;\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.camStatus = await checkForPermission(MediaTypes.CAMERA);\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.camStatus.onchange = this.onDevicePermissionChange;\n\t\tthis.micStatus.onchange = this.onDevicePermissionChange;\n\t}\n\n\ttoggleDeviceUnavailable = () => {\n\t\tthis.setState({\n\t\t\tisDeviceUnavailableModalOpen: !this.state.isDeviceUnavailableModalOpen,\n\t\t});\n\t};\n\n\tcheckIfRoomAvailable = () => {\n\t\tconst room = findSectorById(this.props.treeData.tree, this.props.match.params.roomId);\n\t\tif (!room) {\n\t\t\treturn null;\n\t\t}\n\t\tif (room.status === DeviceStatus.OFFLINE) {\n\t\t\tthis.setState({ isDeviceUnavailableModalOpen: true });\n\t\t\treturn null;\n\t\t}\n\t\treturn room;\n\t};\n\n\tredirect = ({ to, helloDeviceId, roomName }) => {\n\t\tlet link = '';\n\t\tif (to === 'patient-feed') {\n\t\t\tlink = `/patient-feed/${helloDeviceId}/${encodeURIComponent(roomName)}`;\n\t\t}\n\t\tif (to === 'audio') {\n\t\t\tlink = `/call/audio/${helloDeviceId}/${encodeURIComponent(roomName)}/start`;\n\t\t}\n\t\twindow.open(link, '_blank');\n\t};\n\n\tgetCurrentRoom() {\n\t\tlet room = findSectorById(this.props.treeData.tree, this.props.match.params.roomId);\n\t\treturn {\n\t\t\tsectorName: room ? room.name : '',\n\t\t\troomName: room ? room.name : '',\n\t\t\thelloDeviceId: room ? room.helloDeviceId : null,\n\t\t};\n\t}\n\n\tviewPatient = async () => {\n\t\tconst room = this.checkIfRoomAvailable();\n\t\tif (!room) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (this.micStatus.state === MediaPermissions.PROMPT && pluggedDevices.microphone) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t\tawait askForPermission({ audio: true });\n\t\t}\n\t\tthis.props.setStreamPermissionMessage(null);\n\t\tthis.redirect({\n\t\t\tto: 'patient-feed',\n\t\t\troomName: room.name,\n\t\t\thelloDeviceId: room.helloDeviceId,\n\t\t});\n\t};\n\n\ttalkToPatient = async () => {\n\t\tconst room = this.checkIfRoomAvailable();\n\t\tif (!room) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.camera || !pluggedDevices.microphone) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: !pluggedDevices.camera ? StreamError.CAMERA_NOT_FOUND.type : StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t}\n\t\tlet permissionRes = await askForPermission({ audio: true });\n\t\tif (permissionRes.error) {\n\t\t\tif (permissionRes.error.name === 'NotReadableError') {\n\t\t\t\tif (permissionRes.error.message.includes('audio')) {\n\t\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'popup',\n\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (this.micStatus.state === MediaPermissions.GRANTED) {\n\t\t\tthis.redirect({\n\t\t\t\tto: 'audio',\n\t\t\t\troomName: room.name,\n\t\t\t\thelloDeviceId: room.helloDeviceId,\n\t\t\t});\n\t\t}\n\t};\n\n\tonDevicePermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst helloBlocksMessages = {\n\t\t\tpatientView:\n\t\t\t\t\"This option will enable you to see and hear the patient; the patient won't be able to see or hear you unless you enable it during the feed.\",\n\t\t\ttalkToPatient:\n\t\t\t\t\"This option will initiate an audio call to the patient, they will be able to hear you and you will be able to hear them. During the call, you can switch your or patient's camera on, or even share your screen.\",\n\t\t};\n\t\tconst { roomName, helloDeviceId } = this.getCurrentRoom();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    {roomName}

    \n\t\t\t\t\t

    {this.props.description}

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\tThis room doesn't have any assigned devices.\n\t\t\t\t\t\t\t\t
    Please contact your administrator.\n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Call could not be started from {roomName}. Device offline. Please try again later.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(CallPatient));\nCallPatient.contextType = SocketContext;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { Modal, Form, Input, Alert } from 'components';\nimport { findSectorById, getCurrentHealthSystemInfo, isValidSector } from 'infrastructure/helpers/commonHelpers';\nimport { SectorTypes } from 'constants/enums';\nimport { deleteRoomLocation, getRoomDetails, getRoomLocation, setRoomDetails, updateRoomLocation } from 'api/organization';\nimport { APP_CONFIG, gatewayApi, treeSectorNameMaxCharacters } from 'constants/global-variables';\nimport { Formik } from 'formik';\nimport * as Yup from 'yup';\n\nconst EditSector = props => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\tconst [error, setError] = useState('');\n\tconst [sectorNameError, setSectorNameError] = useState('');\n\tconst [adtRoomLocation, setAdtRoomLocation] = useState({ unit: '', room: '', bed: '' });\n\tconst [adtRoomLocationError, setAdtRoomLocationError] = useState({ unit: '', room: '', bed: '' });\n\tconst uploadLogoInputRef = useRef(null);\n\n\tuseEffect(() => {\n\t\tconst getRoomDetail = async () => {\n\t\t\tconst { hospitalId, departmentId, floorId, roomId } = props.sectorData;\n\t\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\t\tif (!hospitalId) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetIsLoading(true);\n\t\t\tconst [roomDetails, roomLocation] = await Promise.all([\n\t\t\t\tgetRoomDetails(currentHealthSystemId, hospitalId, departmentId, floorId, roomId),\n\t\t\t\tgetRoomLocation(currentHealthSystemId, hospitalId, departmentId, floorId, roomId),\n\t\t\t]);\n\t\t\tconst responseError = roomDetails.error || roomLocation.error;\n\t\t\tif (responseError) {\n\t\t\t\tsetError(responseError.message);\n\t\t\t\tsetIsLoading(false);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetAdtRoomLocation(prevState => ({\n\t\t\t\t...prevState,\n\t\t\t\tunit: roomLocation.result?.unit,\n\t\t\t\troom: roomLocation.result?.room,\n\t\t\t\tbed: roomLocation.result?.bed,\n\t\t\t}));\n\t\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t\t\tsetIsLoading(false);\n\t\t};\n\t\tif (SectorTypes.ROOM === props.sectorData.sectorType) {\n\t\t\tgetRoomDetail();\n\t\t}\n\t}, [props.sectorData]);\n\n\tconst getLocationIdentificationInformation = values => ({\n\t\tunit: values.detailUnit,\n\t\troom: values.detailRoom,\n\t\tbed: values.detailBed,\n\t});\n\n\tconst editRoomDetails = async values => {\n\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst { hospitalId, departmentId, floorId, roomId } = props.sectorData;\n\t\tconst emptyUnit = !values.detailUnit || values.detailUnit?.trim() === '';\n\t\tconst emptyRoom = !values.detailRoom || values.detailRoom?.trim() === '';\n\t\tconst emptyBed = !values.detailBed || values.detailBed?.trim() === '';\n\n\t\tif (!emptyUnit || !emptyRoom || !emptyBed) {\n\t\t\tif (emptyUnit) {\n\t\t\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, unit: 'Unit cannot be empty' }));\n\t\t\t}\n\t\t\tif (emptyRoom) {\n\t\t\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, room: 'Room cannot be empty' }));\n\t\t\t}\n\t\t\tif (emptyBed) {\n\t\t\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, bed: 'Bed cannot be empty' }));\n\t\t\t}\n\t\t\tif (emptyUnit || emptyRoom || emptyBed) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tsetIsLoading(true);\n\n\t\tlet response = null;\n\n\t\tresponse = await setRoomDetails(currentHealthSystemId, hospitalId, departmentId, floorId, roomId, { name: values.sectorName });\n\n\t\tif (!emptyUnit && !emptyRoom && !emptyBed) {\n\t\t\tresponse = updateRoomLocation(currentHealthSystemId, hospitalId, departmentId, floorId, roomId, getLocationIdentificationInformation(values));\n\t\t}\n\n\t\tif (emptyUnit && emptyRoom && emptyBed) {\n\t\t\tresponse = deleteRoomLocation(currentHealthSystemId, hospitalId, departmentId, floorId, roomId);\n\t\t}\n\n\t\tif (response.error) {\n\t\t\tsetError(response.error.message);\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\t\tprops.onEditSector();\n\t\tsetIsLoading(false);\n\t\tsetAdtRoomLocation(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t};\n\n\tconst editSectorName = async values => {\n\t\tconst sector = findSectorById(props.treeData.tree, props.sectorData[`${props.sectorData.sectorType}Id`]);\n\t\tconst isValid = isValidSector(sector, props.treeData.tree, values.sectorName);\n\t\tif (!isValid && values.sectorName !== props.sectorData.sectorName) {\n\t\t\tsetSectorNameError(`${props.sectorData.sectorType} with this name already exists`);\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\t\tconst { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tconst { hospitalId, departmentId, floorId, roomId, sectorType } = props.sectorData;\n\t\tlet url;\n\t\tif (sectorType !== SectorTypes.ROOM) {\n\t\t\tswitch (sectorType) {\n\t\t\t\tcase SectorTypes.HOSPITAL: {\n\t\t\t\t\turl = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/regions/${currentRegionId}/hospitals/${hospitalId}`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SectorTypes.DEPARTMENT: {\n\t\t\t\t\turl = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SectorTypes.FLOOR: {\n\t\t\t\t\turl = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SectorTypes.ROOM: {\n\t\t\t\t\turl = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tsetError('Wrong Sector type');\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait gatewayApi.put(url, {\n\t\t\t\tname: values.sectorName,\n\t\t\t});\n\t\t\tprops.onEditSector();\n\t\t}\n\t\tif (sectorType === SectorTypes.ROOM) {\n\t\t\teditRoomDetails(values);\n\t\t}\n\t\tsetError('');\n\t\tsetIsLoading(false);\n\t};\n\n\tconst onModalClose = () => {\n\t\tsetAdtRoomLocation(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t\tsetError('');\n\t\tprops.onModalClose();\n\t};\n\n\tconst getInitialData = () => ({\n\t\tsectorName: props.sectorData.sectorName || '',\n\t\tdetailUnit: adtRoomLocation.unit,\n\t\tdetailRoom: adtRoomLocation.room,\n\t\tdetailBed: adtRoomLocation.bed,\n\t});\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{formikProps => {\n\t\t\t\t\tconst { values, errors, handleChange, handleSubmit } = formikProps;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{props.sectorData.sectorType === SectorTypes.HOSPITAL && (\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t{props.hospitalLogo && logo}\n\t\t\t\t\t\t\t\t\t\t

    Upload hospital image

    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\tPicture size can't exceed 600KB and file type should be .PNG.\n\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{props.parentSectorType === 'floor' && money}\n\t\t\t\t\t\t\t\t\t{props.parentSectorType === 'department' && account_balance}\n\t\t\t\t\t\t\t\t\t{props.parentSectorType === 'hospital' && business}\n\t\t\t\t\t\t\t\t\t{props.parentSectorName}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{props.sectorData.sectorType === SectorTypes.ROOM && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    ADT Room Location

    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(EditSector);\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\nimport { DeviceCommands, DeviceSettings } from 'constants/enums';\n\nexport function getUnassociatedDevices() {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/unassociated-devices`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getDeviceList(level, id) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/level/${level}/id/${id}/devices`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getAllowList(solHelloId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`v1/devices/${solHelloId}/allowlist/logs`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.result.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteDevice(deviceId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/organizations/${APP_CONFIG.companyId}/devices/${deviceId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function sendCommand(deviceId, command, reason = null) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/devices/${deviceId}/command`, {\n\t\t\t\tcommand,\n\t\t\t\treason,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getLatestAppRelease(appId) {\n\t// DO NOT REMOVE. Returning default value until we decide to include force update in production\n\treturn new Promise((res, rej) => {\n\t\tres({\n\t\t\tid: 0,\n\t\t\tshort_version: '',\n\t\t\tversion: '',\n\t\t\tuploaded_at: '',\n\t\t\tinstall_url: '',\n\t\t\tmin_os: '',\n\t\t});\n\t});\n\t// return new Promise((res, rej) => {\n\t// \tgatewayApi\n\t// \t\t.get(`v1/device-apps/apps/${appId}/version/latest`)\n\t// \t\t.then(response => {\n\t// \t\t\tres(response.data);\n\t// \t\t})\n\t// \t\t.catch(e => rej(e));\n\t// });\n}\n\n/**\n * Send device force update command to Hello\n * @method forceUpdateDevice\n * @param {object} data\n * @param {number} data.deviceId\n * @param {string} data.dynamicData\n */\nexport function forceUpdateDevice(data) {\n\t// DO NOT REMOVE. Commented until we decide to include force update in production\n\t// return new Promise((res, rej) => {\n\t// \tgatewayApi\n\t// \t\t.post(`/v1/devices/${data.deviceId}/command`, {\n\t// \t\t\tcommand: DeviceCommands.FORCE_UPDATE,\n\t// \t\t\t...data,\n\t// \t\t})\n\t// \t\t.then(response => {\n\t// \t\t\tres(response);\n\t// \t\t})\n\t// \t\t.catch(e => rej(e));\n\t// });\n}\n\nexport function getDeviceRebootLogs(deviceId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/devices/${deviceId}/logs/type/command`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.deviceCommandLogs);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport const addDeviceSettings = async settings => {\n\ttry {\n\t\tconst { data } = await gatewayApi.post(`/v1/organizations/${APP_CONFIG.companyId}/device-settings`, {\n\t\t\tsettings,\n\t\t\tsettingTypeId: DeviceSettings.VoiceCommandCalling,\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getDeviceLogsCommand = async deviceId => {\n\ttry {\n\t\tconst { data } = await gatewayApi.post(`/v1/devices/${deviceId}/command`, {\n\t\t\tcommand: DeviceCommands.PULL_LOGS,\n\t\t\tdynamicData: 'logcat',\n\t\t\tdeviceId,\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import React, { useState, useEffect, useRef } from 'react';\nimport propsTypes from 'prop-types';\nimport { CSVLink } from 'react-csv';\n\nconst CsvExport = ({ asyncExportMethod, children, disable, fileName = undefined, className = 'button download' }) => {\n\tconst [csvData, setCsvData] = useState(null);\n\tconst csvInstance = useRef();\n\tuseEffect(() => {\n\t\tif (csvData && csvInstance.current && csvInstance.current.link) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tcsvInstance.current.link.click();\n\t\t\t\tsetCsvData(null);\n\t\t\t});\n\t\t}\n\t}, [csvData]);\n\treturn (\n\t\t<>\n\t\t\t {\n\t\t\t\t\tif (disable) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst newCsvData = await asyncExportMethod();\n\t\t\t\t\tsetCsvData(newCsvData);\n\t\t\t\t}}>\n\t\t\t\t{children}\n\t\t\t\n\t\t\t{csvData !== null ? : undefined}\n\t\t\n\t);\n};\n\nexport default CsvExport;\n\nCsvExport.defaultProps = {\n\tchildren: undefined,\n\tasyncExportMethod: () => null,\n\tdisable: false,\n};\n\nCsvExport.propTypes = {\n\tchildren: propsTypes.node,\n\tasyncExportMethod: propsTypes.func,\n\tdisable: propsTypes.bool,\n};\n","import React from 'react';\nimport { getDeviceRebootLogs } from 'api/devices';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport CsvExport from './Common/CsvExport';\n\nconst hasNameChanges = logs => {\n\tlet hasChanges = {\n\t\tuser: false,\n\t\tdevice: false,\n\t};\n\tlogs.forEach(log => {\n\t\tif (!hasChanges.user) {\n\t\t\tif (log.user.fullName !== log.user.currentName) {\n\t\t\t\thasChanges.user = true;\n\t\t\t}\n\t\t}\n\t\tif (!hasChanges.device) {\n\t\t\tif (log.device.name !== log.device.currentName) {\n\t\t\t\thasChanges.device = true;\n\t\t\t}\n\t\t}\n\t});\n\n\treturn hasChanges;\n};\n\nconst exportLogsAsCsv = async deviceId => {\n\tconst logs = await getDeviceRebootLogs(deviceId);\n\tif (logs.length === 0) {\n\t\treturn [{ Info: 'This device has no reboot logs yet.' }];\n\t}\n\tconst hasChanges = hasNameChanges(logs);\n\n\treturn logs.map(log => {\n\t\tconst user = log.user.fullName !== log.user.currentName ? `${log.user.fullName}` : '';\n\t\tconst device = log.device.name !== log.device.currentName ? `${log.device.name}` : '';\n\t\tlet report = {\n\t\t\tUser: log.user.currentName,\n\t\t};\n\t\tif (hasChanges.user) {\n\t\t\treport['Old user name'] = user;\n\t\t}\n\t\treport.Device = log.device.currentName;\n\t\tif (hasChanges.device) {\n\t\t\treport['Old device name'] = device;\n\t\t}\n\n\t\treport['Serial number'] = log.device.sn;\n\t\treport.Date = moment(utcToLocalTime(log.createdDate)).format('MM/DD/YYYY-hh:mm A');\n\t\treport.Reason = log.reason || 'Not specified';\n\t\treturn report;\n\t});\n};\n\nconst RebootLogExport = ({ solHelloDeviceId, serialNumber }) => (\n\t exportLogsAsCsv(solHelloDeviceId)} fileName={`${serialNumber}-${(+new Date()).toString()}.csv`} className=''>\n\t\t\n\t\t\tget_app\n\t\t\n\t\n);\n\nexport default RebootLogExport;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Checkbox = ({ type = 'checkbox', name, id, checked = false, onChange }) => (\n\t\n);\n\nCheckbox.propTypes = {\n\ttype: PropTypes.string,\n\tname: PropTypes.string.isRequired,\n\tchecked: PropTypes.bool,\n\tonChange: PropTypes.func.isRequired,\n};\n\nexport default Checkbox;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\nimport { SectorTypes } from 'constants/enums';\nimport CheckBox from 'components/Common/CheckBox';\nimport { getLevelDevices, getLevelRoomsWithDevices } from 'infrastructure/helpers/commonHelpers';\n\nconst OptionName = props => {\n\tconst { option } = props;\n\treturn (\n\t\t<>\n\t\t\t{option.name}\n\t\t\t{option.helloDeviceId && fiber_manual_record}\n\t\t\n\t);\n};\n\nconst OptionsList = ({ options, expandedOptions, onChange, selectedSectorId, setSelectedId, handleCheckBoxChange, poolDevices }) => {\n\tconst findProperId = item => {\n\t\tconst prefix = item.type;\n\t\treturn item[`${prefix}Id`];\n\t};\n\n\tconst toggleExpand = (selectedOptionId, isAddingSection) => {\n\t\tif (expandedOptions[selectedOptionId] && !isAddingSection) {\n\t\t\tdelete expandedOptions[selectedOptionId];\n\t\t} else {\n\t\t\texpandedOptions[selectedOptionId] = {};\n\t\t}\n\t\tonChange(expandedOptions);\n\t};\n\n\tconst handleSubOptionsListChange = (optionId, subSelections) => {\n\t\texpandedOptions[optionId] = subSelections;\n\t\tonChange(expandedOptions);\n\t};\n\n\tconst allDevicesSelected = option => {\n\t\tconst rooms = getLevelRoomsWithDevices(option);\n\t\treturn rooms.every(x => x.voiceCommandCalling === true);\n\t};\n\n\tconst getCheckBoxId = option => {\n\t\tswitch (option.type) {\n\t\t\tcase 'hospital':\n\t\t\t\treturn option.hospitalId;\n\t\t\tcase 'deaprtment':\n\t\t\t\treturn option.departmentId;\n\t\t\tcase 'floor':\n\t\t\t\treturn option.floorId;\n\t\t}\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t{options.map((option, index) => (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\ttoggleExpand(findProperId(option));\n\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t{expandedOptions[findProperId(option)] ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{option.icon}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{option.type !== 'room' && getLevelDevices(option).length !== 0 && (\n\t\t\t\t\t\t\t\t handleCheckBoxChange(option, e)} />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{option.type === 'room' && option.helloDeviceId !== undefined && (\n\t\t\t\t\t\t\t\t handleCheckBoxChange(option, e)} />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t{option.subOptions && expandedOptions[findProperId(option)] && (\n\t\t\t\t\t\t handleSubOptionsListChange(findProperId(option), subSelections)}\n\t\t\t\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\t\t\t\tsetSelectedId={setSelectedId}\n\t\t\t\t\t\t\thandleCheckBoxChange={handleCheckBoxChange}\n\t\t\t\t\t\t\tpoolDevices={poolDevices}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t))}\n\t\t
    \n\t);\n};\n\nclass DeviceSelection extends Component {\n\tstate = {\n\t\tselectedSectorId: this.props.selectedSectorId,\n\t\texpandedOptions: this.props.preSelected ? this.props.preSelected : {},\n\t};\n\n\tsetSelectedId = sectorId => {\n\t\tthis.setState({ selectedSectorId: sectorId });\n\t};\n\n\trender() {\n\t\tconst { selectedSectorId, expandedOptions } = this.state;\n\t\treturn (\n\t\t\t this.setState({ expandedOptions })}\n\t\t\t\texpandedOptions={this.state.expandedOptions}\n\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\tsetSelectedId={this.setSelectedId}\n\t\t\t\thandleCheckBoxChange={this.props.handleCheckBoxChange}\n\t\t\t\tpoolDevices={this.props.poolDevices}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport default DeviceSelection;\n","import React, { useState } from 'react';\nimport { Modal, Form, Loader } from 'components';\nimport DeviceSelection from 'components/NursePooling/DeviceSelection';\nimport { getLevelRoomsWithDevices } from 'infrastructure/helpers/commonHelpers';\nimport { addDeviceSettings } from 'api/devices';\n\nconst VoiceCommandCallingModal = props => {\n\tconst [changedDevices, setChangedDevices] = useState([]);\n\tconst [isLoading, setLoading] = useState(false);\n\tconst [, setHasErrors] = useState(null);\n\n\tconst handleCheckBoxChange = (option, e) => {\n\t\tconst isChecked = !!e.target.checked;\n\n\t\tconst newDevices = [...changedDevices];\n\t\tif (option.type === 'room') {\n\t\t\tconst exists = newDevices.find(x => x.solHelloDeviceId === option.helloDeviceId);\n\t\t\tif (!exists) {\n\t\t\t\tnewDevices.push({ solHelloDeviceId: option.helloDeviceId, settingValue: isChecked });\n\t\t\t} else {\n\t\t\t\texists.settingValue = isChecked;\n\t\t\t}\n\n\t\t\tsetChangedDevices(newDevices);\n\t\t\tprops.updateVoiceCommandCallingList([option.helloDeviceId], isChecked);\n\t\t} else {\n\t\t\tconst sectorDevices = [];\n\t\t\tconst rooms = getLevelRoomsWithDevices(option);\n\t\t\trooms.forEach(r => {\n\t\t\t\tif (r.voiceCommandCalling !== isChecked) {\n\t\t\t\t\tconst exists = newDevices.find(x => x.solHelloDeviceId === r.helloDeviceId);\n\t\t\t\t\tsectorDevices.push({ solHelloDeviceId: r.helloDeviceId, settingValue: isChecked });\n\t\t\t\t\tif (!exists) {\n\t\t\t\t\t\tnewDevices.push({ solHelloDeviceId: r.helloDeviceId, settingValue: isChecked });\n\t\t\t\t\t} else {\n\t\t\t\t\t\texists.settingValue = isChecked;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetChangedDevices(newDevices);\n\t\t\tprops.updateVoiceCommandCallingList(\n\t\t\t\tsectorDevices.map(x => x.solHelloDeviceId),\n\t\t\t\tisChecked\n\t\t\t);\n\t\t}\n\t};\n\n\tconst changeVoiceCommandCalling = async () => {\n\t\tif (changedDevices.length) {\n\t\t\tsetLoading(true);\n\t\t\tconst settings = changedDevices.map(s => ({ solHelloDeviceId: +s.solHelloDeviceId, settingValue: `${s.settingValue}` }));\n\t\t\tconst { error } = await addDeviceSettings(settings);\n\t\t\tif (error) {\n\t\t\t\tsetHasErrors(true);\n\t\t\t}\n\t\t}\n\n\t\tsetLoading(false);\n\t\tsetHasErrors(false);\n\n\t\tprops.toggleVoiceCommandCallingModal();\n\t};\n\n\tconst toggleModal = () => {\n\t\tsetChangedDevices([]);\n\t\tprops.toggleVoiceCommandCallingModal();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t

    \n\t\t\t\t\t\tYou can use this option to activate voice command calling in different levels of a hospital. Through this option patient will be able to call nurses\n\t\t\t\t\t\tby saying \"Call Nurse\" or \"Call the nurse\".\n\t\t\t\t\t

    \n\t\t\t\t\t{isLoading && }\n\t\t\t\t\t{!isLoading && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Devices

    \n\t\t\t\t\t\t\t

    Select the devices you wish to activate this feature

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport default VoiceCommandCallingModal;\n","import React, { useState } from 'react';\nimport { getDeviceLogsCommand } from 'api/devices';\nimport Modal from 'components/Modal';\n\nconst PullDeviceLogs = ({ deviceId, isOnline }) => {\n\tconst [modal, setModal] = useState({\n\t\tisOpen: false,\n\t\thasErrors: null,\n\t});\n\n\tconst sendPullLogsCommand = async () => {\n\t\tif (isOnline) {\n\t\t\tconst response = await getDeviceLogsCommand(deviceId);\n\t\t\tsetModal({\n\t\t\t\tisOpen: true,\n\t\t\t\thasErrors: !!response.error,\n\t\t\t});\n\t\t} else {\n\t\t\tsetModal({\n\t\t\t\tisOpen: true,\n\t\t\t\thasErrors: null,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst getModalText = () => {\n\t\tif (!isOnline) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{' '}\n\t\t\t\t\tFailed to get device logs.
    Device is offline.\n\t\t\t\t
    \n\t\t\t);\n\t\t}\n\t\tif (modal.hasErrors) {\n\t\t\treturn Something went wrong, please try again.;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\tDevice logs registered on Solaborate system.
    You can close this message.\n\t\t\t
    \n\t\t);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\tassessment\n\t\t\t\n\t\t\t setModal({ isOpen: false, hasErrors: null })}>\n\t\t\t\t
    \n\t\t\t\t\t

    Device logs

    \n\t\t\t\t\t{getModalText()}\n\t\t\t\t
    \n\t\t\t\n\t\t\n\t);\n};\n\nexport default PullDeviceLogs;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter } from 'react-router-dom';\nimport { Button, Table, Tabs, DescriptionBox, Modal, Form, Input } from 'components';\nimport { deleteOrgUnit, uploadLogo, saveLogo, getLogoUrl } from 'api/organization';\nimport { DeviceListLevel, SectorTypes, DeviceCommands, UserRoles, AndroidVersions } from 'constants/enums';\nimport EditSectorModal from 'components/Common/EditSectorModal';\nimport { getDeviceList, deleteDevice, sendCommand, forceUpdateDevice, getLatestAppRelease } from 'api/devices';\nimport {\n\tmapSectionsToRender,\n\tfindSectorById,\n\tgetParentSector,\n\tgetCurrentHealthSystemInfo,\n\tgetHierarchyByHelloDeviceId,\n\tfindDeviceById,\n\tsortByRoomName,\n} from 'infrastructure/helpers/commonHelpers';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { CSVLink } from 'react-csv';\nimport ReactCrop from 'react-image-crop';\nimport 'react-image-crop/dist/ReactCrop.css';\nimport { getUserRole } from 'infrastructure/auth';\nimport RebootLogExport from 'components/RebootLogExport';\nimport VoiceCommandCallingModal from 'components/Common/VoiceCommandCallingModal';\nimport PullDeviceLogs from 'components/PullDeviceLogs';\nimport _ from 'lodash';\n\nclass Hospital extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdevices: [],\n\t\t\tisHospitalModalOpen: false,\n\t\t\tselectedDevice: {},\n\t\t\tselectedOrg: {},\n\t\t\tisDeleteDeviceModalOpen: false,\n\t\t\tisRebootDeviceModalOpen: false,\n\t\t\tisUpdateDeviceModalOpen: false,\n\t\t\tisDeleteOrgUnitModalOpen: false,\n\t\t\tsectorData: {},\n\t\t\trebootReason: '',\n\t\t\tparentSectorName: '',\n\t\t\tparentSectorType: '',\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t\tlatestAppRelease: null,\n\t\t\tisVoiceCommandCallingModalOpen: false,\n\t\t\tisUploadLogoModalOpen: false,\n\t\t\tsrc: '',\n\t\t\tcrop: {\n\t\t\t\twidth: 200,\n\t\t\t\theight: 200,\n\t\t\t},\n\t\t\thospitalLogo: '',\n\t\t\tisHospitalLogoModalLoading: false,\n\t\t\tcurrentSector: [],\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.loadHospital();\n\t}\n\n\tcomponentDidUpdate = prevProps => {\n\t\tconst { hospitalId } = this.props.match.params;\n\t\tif (\n\t\t\thospitalId !== prevProps.match.params.hospitalId ||\n\t\t\t(!prevProps.showAssignDeviceModalData.assignCompleted && this.props.showAssignDeviceModalData.assignCompleted)\n\t\t) {\n\t\t\tthis.loadHospital();\n\t\t}\n\t};\n\n\texportAsCsv() {\n\t\treturn this.state.devices.map(({ roomName, serialNumber, macAddress, appVersion, osVersion, firmwareRevision, solHelloDeviceId, ipAddress }) => ({\n\t\t\troomName,\n\t\t\tserialNumber,\n\t\t\troom: getHierarchyByHelloDeviceId(this.props.treeData.tree, solHelloDeviceId),\n\t\t\tmacAddress,\n\t\t\tappVersion,\n\t\t\tosVersion: firmwareRevision,\n\t\t\tandroidVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\tipAddress,\n\t\t}));\n\t}\n\n\tgetCurrentHospital() {\n\t\tlet hospitals = this.props.treeData.tree;\n\t\tlet hospital = hospitals.find(item => item.hospitalId === this.props.match.params.hospitalId);\n\t\treturn {\n\t\t\tsectorName: hospital ? hospital.name : '',\n\t\t\tsectorId: hospital ? hospital.hospitalId : '',\n\t\t\thospitalName: hospital ? hospital.name : '',\n\t\t\thospitalId: hospital ? hospital.hospitalId : '',\n\t\t\tsectorType: hospital ? hospital.type : '',\n\t\t};\n\t}\n\n\tgetCodeNameByOsVersion = osVersion => {\n\t\tlet version = AndroidVersions.find(({ apiLevel }) => apiLevel.includes(+osVersion));\n\t\treturn version?.codeName ?? 'N/A';\n\t};\n\n\tloadHospital = async () => {\n\t\tconst devices = await getDeviceList(DeviceListLevel.HOSPITAL, this.props.match.params.hospitalId);\n\t\tconst latestAppRelease = await getLatestAppRelease(APP_CONFIG.deviceAppId);\n\t\tconst currentSector = findSectorById(this.props.treeData.tree, this.props.match.params.hospitalId);\n\t\tlet deviceList = [];\n\t\tif (currentSector?.subOptions) {\n\t\t\tdeviceList = devices.map(d => {\n\t\t\t\tconst roomName = findSectorById(this.props.treeData.tree, d.solHelloDeviceId.toString())?.name ?? '';\n\t\t\t\tconst device = findDeviceById(currentSector.subOptions, d.solHelloDeviceId);\n\t\t\t\tif (device) {\n\t\t\t\t\tdevice.voiceCommandCalling = d.voiceCommandCalling;\n\t\t\t\t}\n\t\t\t\treturn { ...d, roomName };\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({\n\t\t\tdevices: sortByRoomName(deviceList),\n\t\t\tlatestAppRelease,\n\t\t\tcurrentSector: currentSector ? [currentSector] : [],\n\t\t});\n\t};\n\n\tdisplayDevices = () => {\n\t\tif (!this.state.devices.length) {\n\t\t\treturn [];\n\t\t}\n\t\tconst userRole = getUserRole();\n\t\treturn this.state.devices.map(\n\t\t\t({ roomName, serialNumber, solHelloDeviceId, firmwareRevision, appVersion, osVersion, macAddress, isOnline, voiceCommandCalling, ipAddress }) => {\n\t\t\t\treturn {\n\t\t\t\t\troomName: roomName ?? '',\n\t\t\t\t\tserialNumber: serialNumber ?? 'N/A',\n\t\t\t\t\tmacAddress: macAddress ?? 'N/A',\n\t\t\t\t\tappVersion:
    {appVersion || 'N/A'}
    ,\n\t\t\t\t\tfirmwareRevision: firmwareRevision ?? 'N/A',\n\t\t\t\t\tosVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\t\t\tipAddress,\n\t\t\t\t\tvoiceCommandCalling: voiceCommandCalling ? 'Active' : 'Not active',\n\t\t\t\t\tactions: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t this.toggleRebootDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t this.props.toggleAssignDeviceModal({ deviceId: solHelloDeviceId, show: true })}>\n\t\t\t\t\t\t\t\t\t\tswap_vert\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.toggleDeleteDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t};\n\n\tinitDeleteOrg = data => {\n\t\tthis.setState({\n\t\t\tselectedOrg: data,\n\t\t});\n\t\tthis.toggleDeleteOrgUnitModal();\n\t};\n\n\tunAssignDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tthis.setState({\n\t\t\t\tisDeleteDeviceModalLoading: true,\n\t\t\t});\n\n\t\t\tawait deleteDevice(deviceId);\n\t\t}\n\n\t\tthis.loadHospital();\n\t\tthis.toggleDeleteDeviceModal();\n\t\tthis.props.getTreeData();\n\n\t\tthis.setState({\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t});\n\t};\n\n\trebootDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tawait sendCommand(deviceId, DeviceCommands.REBOOT, this.state.rebootReason);\n\t\t}\n\n\t\tthis.toggleRebootDeviceModal();\n\t};\n\n\tforceUpdateDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId, appVersion },\n\t\t\tlatestAppRelease: { install_url: appInstallUrl, short_version: latestAppVersion },\n\t\t} = this.state;\n\n\t\tif (appVersion && latestAppVersion && appVersion !== latestAppVersion) {\n\t\t\tawait forceUpdateDevice({\n\t\t\t\tdeviceId,\n\t\t\t\tdynamicData: appInstallUrl,\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleUpdateDeviceModal();\n\t};\n\n\tdeleteOrgUnitSubmit = async () => {\n\t\tawait deleteOrgUnit(this.state.selectedOrg.level, this.state.selectedOrg.id);\n\t\tthis.toggleDeleteOrgUnitModal();\n\t\tthis.props.getTreeData();\n\t\tif (this.state.selectedOrg.level === DeviceListLevel.HOSPITAL) {\n\t\t\tthis.props.history.push('/health-system');\n\t\t\tthis.props.updateBreadcrumb([]);\n\t\t}\n\t};\n\n\ttoggleHospitalModal = () => {\n\t\tthis.setState({\n\t\t\tisHospitalModalOpen: !this.state.isHospitalModalOpen,\n\t\t});\n\t};\n\n\ttoggleEditSectorModal = data => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditSectorModalOpen: !this.state.isEditSectorModalOpen,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tif (this.state.isEditSectorModalOpen) {\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlet sector = findSectorById(this.props.treeData.tree, data[`${data.sectorType}Id`]);\n\t\t\t\t\tthis.props.setCurrentSectorLocation(sector.treeLocation);\n\t\t\t\t\tlet currentHealthSystem = this.getCurrentHealthSystem(this.props.allHealthSystems, getCurrentHealthSystemInfo().currentHealthSystemId);\n\t\t\t\t\tlet sectorParent =\n\t\t\t\t\t\tdata.sectorType === SectorTypes.HOSPITAL\n\t\t\t\t\t\t\t? { type: SectorTypes.HEALTHSYSTEM, name: currentHealthSystem.name }\n\t\t\t\t\t\t\t: getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tlet hospitalLogo = await getLogoUrl(data.hospitalId);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsectorData: data,\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t\thospitalLogo,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.setState({ fileError: false });\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleVoiceCommandCallingModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisVoiceCommandCallingModalOpen: !this.state.isVoiceCommandCallingModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.loadHospital();\n\t\t\t}\n\t\t);\n\t};\n\n\tgetCurrentHealthSystem = (healthSystems, currentHealthSystemId) => {\n\t\treturn healthSystems.find(({ id }) => id === currentHealthSystemId);\n\t};\n\n\ttoggleDeleteDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisDeleteDeviceModalOpen: !this.state.isDeleteDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleRebootDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisRebootDeviceModalOpen: !this.state.isRebootDeviceModalOpen,\n\t\t\trebootReason: '',\n\t\t});\n\t};\n\n\ttoggleUpdateDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisUpdateDeviceModalOpen: !this.state.isUpdateDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleDeleteOrgUnitModal = () => {\n\t\tthis.setState({\n\t\t\tisDeleteOrgUnitModalOpen: !this.state.isDeleteOrgUnitModalOpen,\n\t\t});\n\t};\n\n\tsetInputValues = event => {\n\t\tthis.setState({\n\t\t\t[event.target.name]: event.target.value,\n\t\t});\n\t};\n\n\tupdateTree = async () => {\n\t\tthis.props.getTreeData();\n\t\tthis.toggleEditSectorModal();\n\t};\n\n\tonSelectFile = ({ target }) => {\n\t\tconst input = target;\n\t\tconst [file] = input.files;\n\t\tif (!file) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (file.size > 600000 || !file.type.includes('png')) {\n\t\t\tthis.setState({ fileError: true });\n\t\t\tinput.value = '';\n\t\t\treturn;\n\t\t}\n\n\t\tconst reader = new FileReader();\n\t\treader.addEventListener('load', () => this.setState({ src: reader.result }));\n\t\treader.readAsDataURL(file);\n\n\t\tthis.setState({\n\t\t\tisUploadLogoModalOpen: true,\n\t\t\tisEditSectorModalOpen: false,\n\t\t\tfile,\n\t\t});\n\t};\n\n\tonImageLoaded = image => {\n\t\tthis.imageRef = image;\n\t};\n\n\tonCropChange = crop => {\n\t\tthis.setState({ crop });\n\t};\n\n\tmakeClientCrop = async () => {\n\t\tthis.setState({\n\t\t\tisHospitalLogoModalLoading: true,\n\t\t\tcrop: {\n\t\t\t\twidth: 200,\n\t\t\t\theight: 200,\n\t\t\t},\n\t\t\tisEditSectorModalOpen: true,\n\t\t});\n\t\tif (this.imageRef && this.state.crop.width && this.state.crop.height) {\n\t\t\tconst imageData = await this.uploadLogo();\n\t\t\tif (imageData) {\n\t\t\t\tconst logoData = {\n\t\t\t\t\tpicture: imageData.originalUrl,\n\t\t\t\t};\n\t\t\t\tsaveLogo(this.state.sectorData.hospitalId, logoData);\n\t\t\t}\n\t\t}\n\t};\n\n\tuploadLogo = async () => {\n\t\tconst { data, error } = await uploadLogo(this.state.file, this.getImageCrop());\n\t\tlet errorStateParameters = {};\n\n\t\tif (error) {\n\t\t\terrorStateParameters = {\n\t\t\t\tfileError: error.request.status === 400,\n\t\t\t\tisEditSectorModalOpen: true,\n\t\t\t};\n\t\t}\n\n\t\tthis.setState({\n\t\t\tisHospitalLogoModalLoading: false,\n\t\t\tisUploadLogoModalOpen: false,\n\t\t\tsrc: '',\n\t\t\t...errorStateParameters,\n\t\t});\n\n\t\treturn data;\n\t};\n\n\tgetImageCrop = () => {\n\t\tconst { crop } = this.state;\n\n\t\tconst image = this.imageRef;\n\t\tconst xScale = image.naturalWidth > image.width ? image.naturalWidth / image.width : 1;\n\t\tconst yScale = image.naturalHeight > image.height ? image.naturalHeight / image.height : 1;\n\n\t\treturn {\n\t\t\twidth: crop.width * xScale,\n\t\t\theight: crop.height * yScale,\n\t\t\tx: crop.x * xScale,\n\t\t\ty: crop.y * yScale,\n\t\t};\n\t};\n\n\ttoggleHospitalLogoCrop = () => {\n\t\tthis.setState({\n\t\t\tisUploadLogoModalOpen: !this.state.isUploadLogoModalOpen,\n\t\t\tcrop: {\n\t\t\t\twidth: 200,\n\t\t\t\theight: 200,\n\t\t\t},\n\t\t});\n\t};\n\n\tupdateVCCList = (solHelloDeviceIds, isChecked) => {\n\t\tconst currentSector = _.cloneDeep(this.state.currentSector);\n\t\tsolHelloDeviceIds.forEach(solHelloDeviceId => {\n\t\t\tconst device = findDeviceById(currentSector, solHelloDeviceId);\n\t\t\tif (device) {\n\t\t\t\tdevice.voiceCommandCalling = isChecked;\n\t\t\t}\n\t\t});\n\t\tthis.setState({ currentSector });\n\t};\n\n\trender() {\n\t\tconst hospital = this.getCurrentHospital();\n\t\tconst sections = mapSectionsToRender(this.props.treeData.tree, hospital, this.toggleEditSectorModal, this.initDeleteOrg);\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{hospital.hospitalName}\n\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t

    \n\t\t\t\t\n\t\t\t\t,\n\t\t\t\t\t\t,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to unassign device {this.state.selectedDevice.serialNumber}? Neither you or patient won't be able to make any calls.

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Why do you want to reboot device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\t this.setState({ rebootReason: e.target.value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to force update device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tAre you sure you want to delete {this.state.selectedOrg.name}? Any devices related to it will be deleted and neither Virtual Care Providers or\n\t\t\t\t\t\t\tpatients won't be able to make any calls.\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t{this.state.src && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t\n\n\t\t\t\t this.setState({ fileError: false })}\n\t\t\t\t\thospitalLogo={this.state.hospitalLogo}\n\t\t\t\t\tfileError={this.state.fileError}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Hospital));\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter } from 'react-router-dom';\nimport { Button, Table, Tabs, DescriptionBox, Modal, Form, Input } from 'components';\nimport { getDeviceList, deleteDevice, sendCommand, getLatestAppRelease, forceUpdateDevice } from 'api/devices';\nimport { deleteOrgUnit } from 'api/organization';\nimport { DeviceListLevel, DeviceCommands, UserRoles, AndroidVersions } from 'constants/enums';\nimport EditSectorModal from 'components/Common/EditSectorModal';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport {\n\tfindSectorById,\n\tmapSectionsToRender,\n\tgetParentSector,\n\tgetHierarchyByHelloDeviceId,\n\tfindDeviceById,\n\tsortByRoomName,\n} from 'infrastructure/helpers/commonHelpers';\nimport { CSVLink } from 'react-csv';\nimport { getUserRole } from 'infrastructure/auth';\nimport RebootLogExport from 'components/RebootLogExport';\nimport VoiceCommandCallingModal from 'components/Common/VoiceCommandCallingModal';\nimport PullDeviceLogs from 'components/PullDeviceLogs';\nimport _ from 'lodash';\n\nclass Department extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdevices: [],\n\t\t\tisDepartmentModalOpen: false,\n\t\t\tselectedDevice: {},\n\t\t\tselectedOrg: {},\n\t\t\tisDeleteDeviceModalOpen: false,\n\t\t\tisRebootDeviceModalOpen: false,\n\t\t\trebootReason: '',\n\t\t\tisUpdateDeviceModalOpen: false,\n\t\t\tisDeleteOrgUnitModalOpen: false,\n\t\t\tsectorData: {},\n\t\t\tisEditSectorModalOpen: false,\n\t\t\tparentSectorName: '',\n\t\t\tparentSectorType: '',\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t\tlatestAppRelease: null,\n\t\t\tisVoiceCommandCallingModalOpen: false,\n\t\t\tcurrentSector: [],\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.loadDepartment();\n\t}\n\n\tcomponentDidUpdate = prevProps => {\n\t\tconst { departmentId } = this.props.match.params;\n\t\tif (\n\t\t\tdepartmentId !== prevProps.match.params.departmentId ||\n\t\t\t(!prevProps.showAssignDeviceModalData.assignCompleted && this.props.showAssignDeviceModalData.assignCompleted)\n\t\t) {\n\t\t\tthis.loadDepartment();\n\t\t}\n\t};\n\n\texportAsCsv() {\n\t\treturn this.state.devices.map(({ roomName, serialNumber, macAddress, appVersion, firmwareRevision, osVersion, solHelloDeviceId, ipAddress }) => ({\n\t\t\troomName,\n\t\t\tserialNumber,\n\t\t\troom: getHierarchyByHelloDeviceId(this.props.treeData.tree, solHelloDeviceId),\n\t\t\tmacAddress,\n\t\t\tappVersion,\n\t\t\tosVersion: firmwareRevision,\n\t\t\tandroidVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\tipAddress,\n\t\t}));\n\t}\n\n\tgetCurrentDepartment() {\n\t\tlet hospitals = this.props.treeData.tree;\n\t\tlet department = findSectorById(hospitals, this.props.match.params.departmentId);\n\t\treturn {\n\t\t\tsectorName: department ? department.name : '',\n\t\t\tsectorId: department ? department.departmentId : '',\n\t\t\tdepartmentName: department ? department.name : '',\n\t\t\thospitalId: department ? department.hospitalId : '',\n\t\t\tdepartmentId: department ? department.departmentId : '',\n\t\t\tsectorType: department ? department.type : '',\n\t\t};\n\t}\n\n\tloadDepartment = async () => {\n\t\tconst devices = await getDeviceList(DeviceListLevel.DEPARTMENT, this.props.match.params.departmentId);\n\t\tconst latestAppRelease = await getLatestAppRelease(APP_CONFIG.deviceAppId);\n\t\tconst currentSector = findSectorById(this.props.treeData.tree, this.props.match.params.departmentId);\n\t\tlet deviceList = [];\n\t\tif (currentSector?.subOptions) {\n\t\t\tdeviceList = devices.map(d => {\n\t\t\t\tconst roomName = findSectorById(this.props.treeData.tree, d.solHelloDeviceId.toString())?.name ?? '';\n\t\t\t\tconst device = findDeviceById(currentSector.subOptions, d.solHelloDeviceId);\n\t\t\t\tif (device) {\n\t\t\t\t\tdevice.voiceCommandCalling = d.voiceCommandCalling;\n\t\t\t\t}\n\t\t\t\treturn { ...d, roomName };\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({\n\t\t\tdevices: sortByRoomName(deviceList),\n\t\t\tlatestAppRelease,\n\t\t\tcurrentSector: currentSector ? [currentSector] : [],\n\t\t});\n\t};\n\n\ttoggleEditSectorModal = data => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditSectorModalOpen: !this.state.isEditSectorModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isEditSectorModalOpen) {\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlet sector = findSectorById(this.props.treeData.tree, data[data.sectorType + 'Id']);\n\t\t\t\t\tthis.props.setCurrentSectorLocation(sector.treeLocation);\n\t\t\t\t\tlet sectorParent = getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsectorType: data.sectorType,\n\t\t\t\t\t\tsectorName: data.sectorName,\n\t\t\t\t\t\tsectorData: data,\n\t\t\t\t\t\tsectorLocation: sector.treeLocation,\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tinitDeleteOrg = data => {\n\t\tthis.setState({\n\t\t\tselectedOrg: data,\n\t\t});\n\t\tthis.toggleDeleteOrgUnitModal();\n\t};\n\n\tunAssignDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tthis.setState({\n\t\t\t\tisDeleteDeviceModalLoading: true,\n\t\t\t});\n\n\t\t\tawait deleteDevice(deviceId);\n\t\t}\n\n\t\tthis.loadDepartment();\n\t\tthis.toggleDeleteDeviceModal();\n\t\tthis.props.getTreeData();\n\n\t\tthis.setState({\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t});\n\t};\n\n\trebootDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tawait sendCommand(deviceId, DeviceCommands.REBOOT, this.state.rebootReason);\n\t\t}\n\n\t\tthis.toggleRebootDeviceModal();\n\t};\n\n\tforceUpdateDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId, appVersion },\n\t\t\tlatestAppRelease: { install_url: appInstallUrl, short_version: latestAppVersion },\n\t\t} = this.state;\n\n\t\tif (appVersion && latestAppVersion && appVersion !== latestAppVersion) {\n\t\t\tawait forceUpdateDevice({\n\t\t\t\tdeviceId,\n\t\t\t\tdynamicData: appInstallUrl,\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleUpdateDeviceModal();\n\t};\n\n\tdeleteOrgUnitSubmit = async () => {\n\t\tawait deleteOrgUnit(this.state.selectedOrg.level, this.state.selectedOrg.id);\n\t\tthis.moveToParentSector(this.state.selectedOrg.id);\n\t\tthis.toggleDeleteOrgUnitModal();\n\t\tthis.props.getTreeData();\n\t};\n\n\tmoveToParentSector = currentSectorId => {\n\t\tlet selectedSector = findSectorById(this.props.treeData.tree, currentSectorId);\n\t\tlet parentSector = getParentSector(this.props.treeData.tree, selectedSector);\n\t\tparentSector.isSelected = true;\n\t\tthis.props.history.push(parentSector.link);\n\t\tthis.props.updateBreadcrumb(parentSector.breadcrumb);\n\t};\n\n\ttoggleDeleteDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisDeleteDeviceModalOpen: !this.state.isDeleteDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleRebootDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisRebootDeviceModalOpen: !this.state.isRebootDeviceModalOpen,\n\t\t\trebootReason: '',\n\t\t});\n\t};\n\n\ttoggleUpdateDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisUpdateDeviceModalOpen: !this.state.isUpdateDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleDeleteOrgUnitModal = () => {\n\t\tthis.setState({\n\t\t\tisDeleteOrgUnitModalOpen: !this.state.isDeleteOrgUnitModalOpen,\n\t\t});\n\t};\n\n\ttoggleDepartmentModal = () => {\n\t\tthis.setState({\n\t\t\tisDepartmentModalOpen: !this.state.isDepartmentModalOpen,\n\t\t});\n\t};\n\n\tgetCodeNameByOsVersion = osVersion => {\n\t\tlet version = AndroidVersions.find(({ apiLevel }) => apiLevel.includes(+osVersion));\n\t\treturn version?.codeName ?? 'N/A';\n\t};\n\n\tdisplayDevices = () => {\n\t\tif (!this.state.devices.length) {\n\t\t\treturn [];\n\t\t}\n\t\tconst userRole = getUserRole();\n\t\treturn this.state.devices.map(\n\t\t\t({ roomName, serialNumber, solHelloDeviceId, firmwareRevision, appVersion, osVersion, macAddress, isOnline, voiceCommandCalling, ipAddress }) => {\n\t\t\t\treturn {\n\t\t\t\t\troomName: roomName ?? 'N/A',\n\t\t\t\t\tserialNumber: serialNumber ?? 'N/A',\n\t\t\t\t\tmacAddress: macAddress ?? 'N/A',\n\t\t\t\t\tappVersion:
    {appVersion || 'N/A'}
    ,\n\t\t\t\t\tfirmwareRevision: firmwareRevision ?? 'N/A',\n\t\t\t\t\tosVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\t\t\tipAddress,\n\t\t\t\t\tvoiceCommandCalling: voiceCommandCalling ? 'Active' : 'Not active',\n\t\t\t\t\tactions: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t this.toggleRebootDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t this.props.toggleAssignDeviceModal({ deviceId: solHelloDeviceId, show: true })}>\n\t\t\t\t\t\t\t\t\t\tswap_vert\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.toggleDeleteDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t};\n\n\tupdateTree = () => {\n\t\tthis.props.getTreeData();\n\t\tthis.toggleEditSectorModal();\n\t};\n\n\tgetActiveDevices() {\n\t\treturn this.state.devices.filter(device => device.isOnline);\n\t}\n\n\ttoggleVoiceCommandCallingModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisVoiceCommandCallingModalOpen: !this.state.isVoiceCommandCallingModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.loadDepartment();\n\t\t\t}\n\t\t);\n\t};\n\n\tupdateVCCList = (solHelloDeviceIds, isChecked) => {\n\t\tconst currentSector = _.cloneDeep(this.state.currentSector);\n\t\tsolHelloDeviceIds.forEach(solHelloDeviceId => {\n\t\t\tconst device = findDeviceById(currentSector, solHelloDeviceId);\n\t\t\tif (device) {\n\t\t\t\tdevice.voiceCommandCalling = isChecked;\n\t\t\t}\n\t\t});\n\t\tthis.setState({ currentSector });\n\t};\n\n\trender() {\n\t\tconst department = this.getCurrentDepartment();\n\t\tconst sections = mapSectionsToRender(this.props.treeData.tree, department, this.toggleEditSectorModal, this.initDeleteOrg);\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{department.departmentName}\n\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t

    \n\t\t\t\t\n\t\t\t\t,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to unassign device {this.state.selectedDevice.serialNumber}? Neither you or patient won't be able to make any calls.

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Why do you want to reboot device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\t this.setState({ rebootReason: e.target.value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to force update device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tAre you sure you want to delete {this.state.selectedOrg.name}? Any devices related to it will be deleted and neither Virtual Care Providers or\n\t\t\t\t\t\t\tpatients won't be able to make any calls.\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Department));\n","import React, { Component } from 'react';\nimport { Button, Table, Tabs, Form, Modal, DescriptionBox, Input } from 'components';\nimport { withRouter } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { getDeviceList, deleteDevice, sendCommand, getLatestAppRelease, forceUpdateDevice } from 'api/devices';\nimport { deleteOrgUnit } from 'api/organization';\nimport { DeviceListLevel, DeviceCommands, UserRoles, AndroidVersions } from 'constants/enums';\nimport EditSectorModal from 'components/Common/EditSectorModal';\nimport {\n\tfindSectorById,\n\tmapSectionsToRender,\n\tgetParentSector,\n\tgetHierarchyByHelloDeviceId,\n\tfindDeviceById,\n\tsortByRoomName,\n} from 'infrastructure/helpers/commonHelpers';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { CSVLink } from 'react-csv';\nimport { getUserRole } from 'infrastructure/auth';\nimport RebootLogExport from 'components/RebootLogExport';\nimport VoiceCommandCallingModal from 'components/Common/VoiceCommandCallingModal';\nimport PullDeviceLogs from 'components/PullDeviceLogs';\nimport _ from 'lodash';\n\nclass Floor extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdevices: [],\n\t\t\tpreSelected: null,\n\t\t\tselectedDevice: {},\n\t\t\tselectedOrg: {},\n\t\t\tisDeleteDeviceModalOpen: false,\n\t\t\tisRebootDeviceModalOpen: false,\n\t\t\tisUpdateDeviceModalOpen: false,\n\t\t\tisDeleteOrgUnitModalOpen: false,\n\t\t\tisEditSectorModalOpen: false,\n\t\t\tsectorData: {},\n\t\t\tsectorLocation: [],\n\t\t\tparentSectorName: '',\n\t\t\tparentSectorType: '',\n\t\t\trebootReason: '',\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t\tlatestAppRelease: null,\n\t\t\tisVoiceCommandCallingModalOpen: false,\n\t\t\tcurrentSector: [],\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.loadFloor();\n\t}\n\n\tcomponentDidUpdate = (prevProps, prevState) => {\n\t\tconst { floorId } = this.props.match.params;\n\t\tif (\n\t\t\tfloorId !== prevProps.match.params.floorId ||\n\t\t\t(!prevProps.showAssignDeviceModalData.assignCompleted && this.props.showAssignDeviceModalData.assignCompleted)\n\t\t) {\n\t\t\tthis.loadFloor();\n\t\t}\n\t};\n\n\texportAsCsv() {\n\t\treturn this.state.devices.map(({ roomName, serialNumber, macAddress, appVersion, firmwareRevision, osVersion, solHelloDeviceId, ipAddress }) => ({\n\t\t\troomName,\n\t\t\tserialNumber,\n\t\t\troom: getHierarchyByHelloDeviceId(this.props.treeData.tree, solHelloDeviceId),\n\t\t\tmacAddress,\n\t\t\tappVersion,\n\t\t\tosVersion: firmwareRevision,\n\t\t\tandroidVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\tipAddress,\n\t\t}));\n\t}\n\n\tgetCodeNameByOsVersion = osVersion => {\n\t\tlet version = AndroidVersions.find(({ apiLevel }) => apiLevel.includes(+osVersion));\n\t\treturn version?.codeName ?? 'N/A';\n\t};\n\n\tgetCurrentFloor() {\n\t\tlet hospitals = this.props.treeData.tree;\n\t\tlet floor = findSectorById(hospitals, this.props.match.params.floorId);\n\t\treturn {\n\t\t\tsectorName: floor ? floor.name : '',\n\t\t\tsectorId: floor ? floor.floorId : '',\n\t\t\tfloorName: floor ? floor.name : '',\n\t\t\thospitalId: floor ? floor.hospitalId : '',\n\t\t\tdepartmentId: floor ? floor.departmentId : '',\n\t\t\tfloorId: floor ? floor.floorId : '',\n\t\t\tsectorType: floor ? floor.type : '',\n\t\t};\n\t}\n\n\tloadFloor = async () => {\n\t\tconst devices = await getDeviceList(DeviceListLevel.FLOOR, this.props.match.params.floorId);\n\t\tconst latestAppRelease = await getLatestAppRelease(APP_CONFIG.deviceAppId);\n\t\tconst currentSector = findSectorById(this.props.treeData.tree, this.props.match.params.floorId);\n\t\tlet deviceList = [];\n\t\tif (currentSector?.subOptions) {\n\t\t\tdeviceList = devices.map(d => {\n\t\t\t\tconst roomName = findSectorById(this.props.treeData.tree, d.solHelloDeviceId.toString())?.name ?? '';\n\t\t\t\tconst device = findDeviceById(currentSector.subOptions, d.solHelloDeviceId);\n\t\t\t\tif (device) {\n\t\t\t\t\tdevice.voiceCommandCalling = d.voiceCommandCalling;\n\t\t\t\t}\n\t\t\t\treturn { ...d, roomName };\n\t\t\t});\n\t\t}\n\t\tthis.setState({\n\t\t\tdevices: sortByRoomName(deviceList),\n\t\t\tlatestAppRelease,\n\t\t\tcurrentSector: currentSector ? [currentSector] : [],\n\t\t});\n\t};\n\n\tdisplayDevices = () => {\n\t\tif (!this.state.devices.length) {\n\t\t\treturn [];\n\t\t}\n\t\tconst userRole = getUserRole();\n\t\treturn this.state.devices.map(\n\t\t\t({ roomName, serialNumber, solHelloDeviceId, firmwareRevision, appVersion, osVersion, macAddress, isOnline, voiceCommandCalling, ipAddress }) => {\n\t\t\t\treturn {\n\t\t\t\t\troomName: roomName ?? 'N/A',\n\t\t\t\t\tserialNumber: serialNumber ?? 'N/A',\n\t\t\t\t\tmacAddress: macAddress ?? 'N/A',\n\t\t\t\t\tappVersion:
    {appVersion || 'N/A'}
    ,\n\t\t\t\t\tfirmwareRevision: firmwareRevision ?? 'N/A',\n\t\t\t\t\tosVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\t\t\tipAddress,\n\t\t\t\t\tvoiceCommandCalling: voiceCommandCalling ? 'Active' : 'Not active',\n\t\t\t\t\tactions: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t this.toggleRebootDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t this.props.toggleAssignDeviceModal({ deviceId: solHelloDeviceId, show: true })}>\n\t\t\t\t\t\t\t\t\tswap_vert\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t this.toggleDeleteDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleEditSectorModal = data => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditSectorModalOpen: !this.state.isEditSectorModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isEditSectorModalOpen) {\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlet sector = findSectorById(this.props.treeData.tree, data[data.sectorType + 'Id']);\n\t\t\t\t\tthis.props.setCurrentSectorLocation(sector.treeLocation);\n\t\t\t\t\tlet sectorParent = getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsectorType: data.sectorType,\n\t\t\t\t\t\tsectorName: data.sectorName,\n\t\t\t\t\t\tsectorData: data,\n\t\t\t\t\t\tsectorLocation: sector.treeLocation,\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tinitDeleteOrg = data => {\n\t\tthis.setState({\n\t\t\tselectedOrg: data,\n\t\t});\n\t\tthis.toggleDeleteOrgUnitModal();\n\t};\n\n\tunAssignDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tthis.setState({\n\t\t\t\tisDeleteDeviceModalLoading: true,\n\t\t\t});\n\n\t\t\tawait deleteDevice(deviceId);\n\t\t}\n\n\t\tthis.loadFloor();\n\t\tthis.toggleDeleteDeviceModal();\n\t\tthis.props.getTreeData();\n\n\t\tthis.setState({\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t});\n\t};\n\n\trebootDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tawait sendCommand(deviceId, DeviceCommands.REBOOT, this.state.rebootReason);\n\t\t}\n\n\t\tthis.toggleRebootDeviceModal();\n\t};\n\n\tforceUpdateDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId, appVersion },\n\t\t\tlatestAppRelease: { install_url: appInstallUrl, short_version: latestAppVersion },\n\t\t} = this.state;\n\n\t\tif (appVersion && latestAppVersion && appVersion !== latestAppVersion) {\n\t\t\tawait forceUpdateDevice({\n\t\t\t\tdeviceId,\n\t\t\t\tdynamicData: appInstallUrl,\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleUpdateDeviceModal();\n\t};\n\n\tdeleteOrgUnitSubmit = async () => {\n\t\tawait deleteOrgUnit(this.state.selectedOrg.level, this.state.selectedOrg.id);\n\t\tthis.moveToParentSector(this.state.selectedOrg.id);\n\t\tthis.toggleDeleteOrgUnitModal();\n\t\tthis.props.getTreeData();\n\t};\n\n\tmoveToParentSector = currentSectorId => {\n\t\tlet selectedSector = findSectorById(this.props.treeData.tree, currentSectorId);\n\t\tlet parentSector = getParentSector(this.props.treeData.tree, selectedSector);\n\t\tparentSector.isSelected = true;\n\t\tthis.props.history.push(parentSector.link);\n\t\tthis.props.updateBreadcrumb(parentSector.breadcrumb);\n\t};\n\n\ttoggleDeleteDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisDeleteDeviceModalOpen: !this.state.isDeleteDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleRebootDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisRebootDeviceModalOpen: !this.state.isRebootDeviceModalOpen,\n\t\t\trebootReason: '',\n\t\t});\n\t};\n\n\ttoggleUpdateDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisUpdateDeviceModalOpen: !this.state.isUpdateDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleDeleteOrgUnitModal = () => {\n\t\tthis.setState({\n\t\t\tisDeleteOrgUnitModalOpen: !this.state.isDeleteOrgUnitModalOpen,\n\t\t});\n\t};\n\n\tsetInputValues = event => {\n\t\tthis.setState({\n\t\t\t[event.target.name]: event.target.value,\n\t\t});\n\t};\n\n\tupdateTree = () => {\n\t\tthis.props.getTreeData();\n\t\tthis.toggleEditSectorModal();\n\t};\n\n\ttoggleVoiceCommandCallingModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisVoiceCommandCallingModalOpen: !this.state.isVoiceCommandCallingModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.loadFloor();\n\t\t\t}\n\t\t);\n\t};\n\n\tupdateVCCList = (solHelloDeviceIds, isChecked) => {\n\t\tconst currentSector = _.cloneDeep(this.state.currentSector);\n\t\tsolHelloDeviceIds.forEach(solHelloDeviceId => {\n\t\t\tconst device = findDeviceById(currentSector, solHelloDeviceId);\n\t\t\tif (device) {\n\t\t\t\tdevice.voiceCommandCalling = isChecked;\n\t\t\t}\n\t\t});\n\t\tthis.setState({ currentSector });\n\t};\n\n\trender() {\n\t\tconst floor = this.getCurrentFloor();\n\t\tconst sections = mapSectionsToRender(this.props.treeData.tree, floor, this.toggleEditSectorModal, this.initDeleteOrg);\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{floor.floorName}\n\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t

    \n\t\t\t\t\n\t\t\t\t,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to unassign device {this.state.selectedDevice.serialNumber}? Neither you or patient won't be able to make any calls.

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Why do you want to reboot device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\t this.setState({ rebootReason: e.target.value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to force update device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tAre you sure you want to delete {this.state.selectedOrg.name}? Any devices related to it will be deleted and neither Virtual Care Providers or\n\t\t\t\t\t\t\tpatients won't be able to make any calls.\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Floor));\n","import React, { Component } from 'react';\nimport Table from 'components/Table';\nimport Tabs from 'components/Tabs';\nimport Button from 'components/Button';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter } from 'react-router-dom';\nimport { If, Then, Else } from 'react-if';\nimport { Modal, Form, Alert, Input, DescriptionBox, SkeletonLoader, TreeView, Dropdown, ListGroup, Badge } from 'components';\nimport { DeviceListLevel, DeviceCommands, UserRoles, AndroidVersions } from 'constants/enums';\nimport { gatewayApi, APP_CONFIG } from 'constants/global-variables';\nimport {\n\tgetUnassociatedDevices,\n\tdeleteDevice,\n\tsendCommand,\n\tgetLatestAppRelease,\n\tforceUpdateDevice,\n\taddDeviceSettings,\n\tgetDeviceList,\n\tgetAllowList,\n} from 'api/devices';\nimport { deleteOrgUnit } from 'api/organization';\nimport { findSectorById, getParentSector, getHierarchyFromBreadcrumb } from 'infrastructure/helpers/commonHelpers';\nimport { CSVLink } from 'react-csv';\nimport EditSectorModal from 'components/Common/EditSectorModal';\nimport { getUserRole } from 'infrastructure/auth';\nimport RebootLogExport from 'components/RebootLogExport';\nimport PullDeviceLogs from 'components/PullDeviceLogs';\nimport CheckBox from 'components/Common/CheckBox';\nimport moment from 'moment';\n\nclass Room extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.exportAllowlistRef = React.createRef();\n\t\tthis.exportDeviceDetailsRef = React.createRef();\n\n\t\tthis.state = {\n\t\t\tisEditSectorModalOpen: false,\n\t\t\tisDevicesModalOpen: false,\n\t\t\tisVoiceCommandCallingOpen: false,\n\t\t\tisRoomLoaded: false,\n\t\t\tpreSelected: null,\n\t\t\tdevices: [],\n\t\t\tallowListList: [],\n\t\t\thelloDeviceId: null,\n\t\t\tunassociatedDevicesToSelect: [],\n\t\t\tisAddDeviceModalLoading: true,\n\t\t\tselectedDevice: {},\n\t\t\tselectedOrg: {},\n\t\t\tisDeleteDeviceModalOpen: false,\n\t\t\tisRebootDeviceModalOpen: false,\n\t\t\tisUpdateDeviceModalOpen: false,\n\t\t\tisDeleteOrgUnitModalOpen: false,\n\t\t\tparentSectorName: '',\n\t\t\trebootReason: '',\n\t\t\tparentSectorType: '',\n\t\t\tisAddDeviceModalSubmitDisabled: true,\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t\tlatestAppRelease: null,\n\t\t\tdeviceIdInput: '',\n\t\t\terror: '',\n\t\t\tsuccess: '',\n\t\t\tisVoiceCommandCallingModalLoading: false,\n\t\t\tsectorData: {},\n\t\t};\n\n\t\tthis.csvDropdownItems = [\n\t\t\t{\n\t\t\t\ttitle: 'Device Details CSV',\n\t\t\t\ticon: 'save',\n\t\t\t\tid: 'save_device_csv',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: 'Endpoints Whitelist CSV',\n\t\t\t\ticon: 'check_box',\n\t\t\t\tid: 'save_allowlist_csv',\n\t\t\t},\n\t\t];\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.loadRoom();\n\t}\n\n\tcomponentDidUpdate = (prevProps, prevState) => {\n\t\tconst { roomId } = this.props.match.params;\n\t\tif (\n\t\t\troomId !== prevProps.match.params.roomId ||\n\t\t\t(!prevProps.showAssignDeviceModalData.assignCompleted && this.props.showAssignDeviceModalData.assignCompleted)\n\t\t) {\n\t\t\tthis.loadRoom();\n\t\t}\n\t};\n\n\tgetCodeNameByOsVersion = osVersion => {\n\t\tconst version = AndroidVersions.find(({ apiLevel }) => apiLevel.includes(+osVersion));\n\t\treturn version?.codeName ?? 'N/A';\n\t};\n\n\texportAsCsv() {\n\t\tconst room = getHierarchyFromBreadcrumb(this.props.breadcrumb);\n\t\treturn this.state.devices.map(({ serialNumber, macAddress, appVersion, osVersion, firmwareRevision, ipAddress }) => ({\n\t\t\t'Serial Number': serialNumber,\n\t\t\tRoom: room,\n\t\t\t'Mac Address': macAddress,\n\t\t\t'App Version:': appVersion,\n\t\t\t'Os Version': firmwareRevision,\n\t\t\t'Android Version': this.getCodeNameByOsVersion(osVersion),\n\t\t\t'Ip Addres': ipAddress,\n\t\t}));\n\t}\n\n\texportAllowlistCsv() {\n\t\treturn this.state.allowListList.map(({ id, domainUrl, createdDate, isAllowed, protocol, response }) => ({\n\t\t\tID: id,\n\t\t\t'Domain Url': domainUrl,\n\t\t\t'Reported On': moment(createdDate).format('YYYY/MM/DD - HH:mm'),\n\t\t\tAllowed: isAllowed ? 'Allowed' : 'Denied',\n\t\t\tProtocol: protocol,\n\t\t\tResponse: response,\n\t\t}));\n\t}\n\n\tloadRoom = async () => {\n\t\tconst devicesList = [];\n\t\tlet allowListList = [];\n\t\tconst fetchUnassociatedDevices = getUnassociatedDevices();\n\t\tconst fetchDeviceData = getDeviceList(DeviceListLevel.ROOM, this.props.match.params.roomId);\n\t\tconst fetchLatestAppRelease = getLatestAppRelease(APP_CONFIG.deviceAppId);\n\n\t\tconst [deviceData, unassociatedDevicesRes, latestAppRelease] = await Promise.all([fetchDeviceData, fetchUnassociatedDevices, fetchLatestAppRelease]);\n\n\t\tif (deviceData.length > 0) {\n\t\t\tconst { solHelloDeviceId } = deviceData[0];\n\t\t\tconst response = await getAllowList(solHelloDeviceId);\n\t\t\tif (response.error) {\n\t\t\t\tthis.showErrorMessage(response.error.message);\n\t\t\t} else {\n\t\t\t\tallowListList = response;\n\t\t\t}\n\t\t}\n\n\t\tconst currentSector = this.props.currentSectorLocation;\n\t\tlet preSelected = {};\n\t\tif (currentSector.length) {\n\t\t\tpreSelected = {\n\t\t\t\t[currentSector[0].name]: {\n\t\t\t\t\t[currentSector[0].subOptions[0].name]: {\n\t\t\t\t\t\t[currentSector[0].subOptions[0].subOptions[0].name]: {\n\t\t\t\t\t\t\t[currentSector[0].subOptions[0].subOptions[0].subOptions[0]]: {},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tunassociatedDevicesRes.map(device => {\n\t\t\tdevicesList.push({\n\t\t\t\tvalue: device.uid,\n\t\t\t\tid: device.solHelloDeviceId,\n\t\t\t});\n\t\t});\n\n\t\tthis.setState({\n\t\t\tisRoomLoaded: true,\n\t\t\tpreSelected,\n\t\t\tdevices: deviceData,\n\t\t\tallowListList: allowListList.reverse(),\n\t\t\tunassociatedDevicesToSelect: devicesList,\n\t\t\tisAddDeviceModalLoading: false,\n\t\t\tlatestAppRelease,\n\t\t\tisVoiceCommandCallingModalLoading: false,\n\t\t});\n\t};\n\n\tdisplayDevices = () => {\n\t\tif (!this.state.devices.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst userRole = getUserRole();\n\t\treturn this.state.devices.map(\n\t\t\t({ serialNumber, solHelloDeviceId, appVersion, osVersion, firmwareRevision, macAddress, isOnline, voiceCommandCalling, ipAddress }) => {\n\t\t\t\treturn {\n\t\t\t\t\troomName: this.getCurrentRoom()?.roomName ?? 'N/A',\n\t\t\t\t\tserialNumber: serialNumber ?? 'N/A',\n\t\t\t\t\tmacAddress: macAddress ?? 'N/A',\n\t\t\t\t\tappVersion:
    {appVersion || 'N/A'}
    ,\n\t\t\t\t\tfirmwareRevision: firmwareRevision ?? 'N/A',\n\t\t\t\t\tosVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\t\t\tipAddress,\n\t\t\t\t\tvoiceCommandCalling: voiceCommandCalling ? 'Active' : 'Not active',\n\t\t\t\t\tactions: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t this.toggleVoiceCommandCallingModal({ deviceId: solHelloDeviceId, serialNumber, voiceCommandCalling })}>\n\t\t\t\t\t\t\t\t\tsupervisor_account\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t this.toggleRebootDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t this.props.toggleAssignDeviceModal({ deviceId: solHelloDeviceId, show: true })}>\n\t\t\t\t\t\t\t\t\t\tswap_vert\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.toggleDeleteDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t};\n\n\tdisplayAllowlist = () => {\n\t\tif (!this.state.allowListList.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn this.state.allowListList.map(({ id, domainUrl, createdDate, isAllowed, protocol, response }) => ({\n\t\t\tnumber: id,\n\t\t\tdomainUrl,\n\t\t\tcreatedDate: moment(createdDate).format('YYYY/MM/DD - HH:mm'),\n\t\t\tisAllowed: isAllowed ? 'Allowed' : 'Denied',\n\t\t\tprotocol,\n\t\t\tresponse,\n\t\t}));\n\t};\n\n\tunAssignDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tthis.setState({\n\t\t\t\tisDeleteDeviceModalLoading: true,\n\t\t\t});\n\t\t\tawait deleteDevice(deviceId);\n\t\t}\n\n\t\tthis.loadRoom();\n\t\tthis.toggleDeleteDeviceModal();\n\t\tthis.props.getTreeData();\n\n\t\tthis.setState({\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t});\n\t};\n\n\trebootDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tawait sendCommand(deviceId, DeviceCommands.REBOOT, this.state.rebootReason);\n\t\t}\n\n\t\tthis.toggleRebootDeviceModal();\n\t};\n\n\trequestAllowlist = async () => {\n\t\tconst deviceId = this.state.devices[0].solHelloDeviceId;\n\n\t\tif (deviceId) {\n\t\t\tconst response = await sendCommand(deviceId, DeviceCommands.REQUEST_ALLOWLIST_CHECK, this.state.allowListReason);\n\t\t\tif (!response.data.hasSucceeded) {\n\t\t\t\tthis.showErrorMessage('Something went wrong');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthis.showSuccessMessage('Your request for endpoint whitelisting is being processed. Please refresh the page to see the updated version.');\n\t\tthis.loadRoom();\n\t};\n\n\tforceUpdateDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId, appVersion },\n\t\t\tlatestAppRelease: { install_url: appInstallUrl, short_version: latestAppVersion },\n\t\t} = this.state;\n\n\t\tif (appVersion && latestAppVersion && appVersion !== latestAppVersion) {\n\t\t\tawait forceUpdateDevice({\n\t\t\t\tdeviceId,\n\t\t\t\tdynamicData: appInstallUrl,\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleUpdateDeviceModal();\n\t};\n\n\tdeleteOrgUnitSubmit = async () => {\n\t\tawait deleteOrgUnit(this.state.selectedOrg.level, this.state.selectedOrg.id);\n\t\tthis.moveToParentSector(this.state.selectedOrg.id);\n\t\tthis.toggleDeleteOrgUnitModal();\n\t\tthis.props.getTreeData();\n\t};\n\n\tmoveToParentSector = currentSectorId => {\n\t\tconst selectedSector = findSectorById(this.props.treeData.tree, currentSectorId);\n\t\tconst parentSector = getParentSector(this.props.treeData.tree, selectedSector);\n\t\tparentSector.isSelected = true;\n\t\tthis.props.history.push(parentSector.link);\n\t\tthis.props.updateBreadcrumb(parentSector.breadcrumb);\n\t};\n\n\ttoggleDeleteDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisDeleteDeviceModalOpen: !this.state.isDeleteDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleRebootDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisRebootDeviceModalOpen: !this.state.isRebootDeviceModalOpen,\n\t\t\trebootReason: '',\n\t\t});\n\t};\n\n\ttoggleVoiceCommandCallingModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisVoiceCommandCallingOpen: !this.state.isVoiceCommandCallingOpen,\n\t\t});\n\t};\n\n\ttoggleUpdateDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisUpdateDeviceModalOpen: !this.state.isUpdateDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleDeleteOrgUnitModal = (selectedOrg = {}) => {\n\t\tthis.setState({\n\t\t\tselectedOrg,\n\t\t\tisDeleteOrgUnitModalOpen: !this.state.isDeleteOrgUnitModalOpen,\n\t\t});\n\t};\n\n\tfindSelectedDeviceById = (devices, id) => {\n\t\tlet device;\n\t\tdevices.forEach((item, index) => {\n\t\t\tif (item.value === id) {\n\t\t\t\tdevice = {\n\t\t\t\t\tid: item.id,\n\t\t\t\t\tvalue: item.value,\n\t\t\t\t\tindex: index,\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t\treturn device;\n\t};\n\n\tsetDeviceId = event => {\n\t\tconst device = this.findSelectedDeviceById(this.state.unassociatedDevicesToSelect, event.target.value);\n\t\tif (!device) {\n\t\t\tthis.setState({\n\t\t\t\thelloDeviceId: null,\n\t\t\t\tisAddDeviceModalSubmitDisabled: false,\n\t\t\t\tdeviceIdInput: event.target.value,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\thelloDeviceId: device.id,\n\t\t\tisAddDeviceModalSubmitDisabled: false,\n\t\t\tdeviceIdInput: event.target.value,\n\t\t});\n\t};\n\n\tshowErrorMessage = (errorMessage = 'Device ID not found') => {\n\t\tthis.setState({\n\t\t\terror: errorMessage,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\terror: '',\n\t\t\t});\n\t\t}, 3000);\n\t};\n\n\tshowSuccessMessage = (message = 'Successful ') => {\n\t\tthis.setState({\n\t\t\tsuccess: message,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\tsuccess: '',\n\t\t\t});\n\t\t}, 6000);\n\t};\n\n\tassignDevice = async evt => {\n\t\tevt.preventDefault();\n\t\tif (!this.state.helloDeviceId) {\n\t\t\tthis.showErrorMessage();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tisAddDeviceModalLoading: true,\n\t\t});\n\t\tconst { hospitalId, departmentId, floorId, roomId } = this.props.match.params;\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/devices`;\n\t\tawait gatewayApi.put(url, {\n\t\t\tdevices: [this.state.helloDeviceId],\n\t\t});\n\t\tthis.setState({\n\t\t\tisAddDeviceModalLoading: false,\n\t\t\tdeviceIdInput: '',\n\t\t});\n\t\tthis.toggleDevicesModal();\n\t\tthis.props.getTreeData();\n\t\tthis.loadRoom();\n\t};\n\n\tvoiceCommandCallingSubmit = async () => {\n\t\tthis.setState({\n\t\t\tisVoiceCommandCallingModalLoading: true,\n\t\t});\n\n\t\tconst { selectedDevice } = this.state;\n\n\t\tconst setting = { solHelloDeviceId: +selectedDevice.deviceId, settingValue: `${selectedDevice.voiceCommandCalling}` };\n\t\tawait addDeviceSettings([setting]);\n\t\tthis.loadRoom();\n\t\tthis.toggleVoiceCommandCallingModal();\n\t};\n\n\ttoggleRoomModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisRoomModalOpen: !this.state.isRoomModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isRoomModalOpen) {\n\t\t\t\t\tconst sector = findSectorById(this.props.treeData.tree, this.props.match.params.roomId);\n\t\t\t\t\tconst sectorParent = getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleDevicesModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisDevicesModalOpen: !this.state.isDevicesModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isDevicesModalOpen) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisAddDeviceModalSubmitDisabled: true,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tdeviceIdInput: '',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tsetInputValues = event => {\n\t\tthis.setState({\n\t\t\t[event.target.name]: event.target.value,\n\t\t});\n\t};\n\n\tgetCurrentRoom() {\n\t\tconst hospitals = this.props.treeData.tree;\n\t\tconst room = findSectorById(hospitals, this.props.match.params.roomId);\n\t\treturn {\n\t\t\tsectorName: room ? room.name : '',\n\t\t\tsectorId: room ? room.roomId : '',\n\t\t\troomName: room ? room.name : '',\n\t\t\thospitalId: room ? room.hospitalId : '',\n\t\t\tdepartmentId: room ? room.departmentId : '',\n\t\t\tfloorId: room ? room.floorId : '',\n\t\t\troomId: room ? room.roomId : '',\n\t\t\tsectorType: room ? room.type : '',\n\t\t};\n\t}\n\n\ttoggleEditSectorModal = data => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditSectorModalOpen: !this.state.isEditSectorModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isEditSectorModalOpen) {\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst sector = findSectorById(this.props.treeData.tree, data[`${data.sectorType}Id`]);\n\t\t\t\t\tthis.props.setCurrentSectorLocation(sector.treeLocation);\n\t\t\t\t\tconst sectorParent = getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsectorData: data,\n\t\t\t\t\t\tsectorLocation: sector.treeLocation,\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tupdateTree = () => {\n\t\tthis.props.getTreeData();\n\t\tthis.toggleEditSectorModal();\n\t};\n\n\ttoggleVoiceCommandCalling = () => {\n\t\tconst { selectedDevice } = this.state;\n\t\tselectedDevice.voiceCommandCalling = !selectedDevice.voiceCommandCalling;\n\t\tthis.setState({ selectedDevice });\n\t};\n\n\thandleCsvDropdownClick = item => {\n\t\tif (item.id === 'save_device_csv') {\n\t\t\tthis.exportDeviceDetailsRef.current.link.click();\n\t\t} else if (item.id === 'save_allowlist_csv') {\n\t\t\tthis.exportAllowlistRef.current.link.click();\n\t\t}\n\t};\n\n\trender() {\n\t\tconst room = this.getCurrentRoom();\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t{room.roomName}\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Assign Device

    \n\t\t\t\t\t\t\t

    Select a serial number to associate with this room.

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.state.unassociatedDevicesToSelect.map(({ value, id }) => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.preSelected && }\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tYou can use this option to activate voice command calling in different levels of a hospital. Through this option patient will be able to call\n\t\t\t\t\t\t\tnurses by saying "Call Nurse" or "Call the nurse".\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to unassign device {this.state.selectedDevice.serialNumber}? Neither you or patient won't be able to make any calls.

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Why do you want to reboot device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\t this.setState({ rebootReason: e.target.value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to force update device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tAre you sure you want to delete {this.state.selectedOrg.name}? Any devices related to it will be deleted and neither Virtual Care Providers or\n\t\t\t\t\t\t\tpatients won't be able to make any calls.\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Room));\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nfunction signOut() {\n\twindow.location.href = '/logout';\n}\n\nconst UnassignedNurse = props => (\n\t\n\t\t
    \n\t\t\t

    You are currently not assigned to any health system.

    \n\t\t\tmember-error\n\t\t\t

    If you think there has been a mistake, please contact your administrator.

    \n\t\t\t\n\t\t\t\tClick here to login with another account.\n\t\t\t\n\t\t
    \n\t
    \n);\n\nexport default UnassignedNurse;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter, Route } from 'react-router-dom';\nimport { If, Then, Else } from 'react-if';\nimport { UserRoles } from 'constants/enums';\n\nimport Grid from 'components/Grid';\nimport Layout from 'components/Common/Layout';\nimport Header from 'components/Common/Header';\nimport SectorList from 'components/Common/SectorList';\n\nimport AssignDeviceModal from 'components/Common/AssignDeviceModal';\n\nimport CallPatient from 'views/Organization/Partials/CallPatient';\nimport Hospital from 'views/Organization/Partials/Hospital';\nimport Department from 'views/Organization/Partials/Department';\nimport Floor from 'views/Organization/Partials/Floor';\nimport Room from 'views/Organization/Partials/Room';\nimport UnassignedNurse from 'views/UnassignedNurse';\n\nimport { getUserRole } from 'infrastructure/auth';\n\nclass Organization extends Component {\n\thasHealthSystems = () => {\n\t\treturn this.props.allHealthSystems.length > 0;\n\t};\n\n\tisRoomURL = () => {\n\t\tlet pathName = window.location.pathname.split('/');\n\t\treturn pathName.some((path, index) => path.toLowerCase() === 'room' && pathName[index + 1]);\n\t};\n\n\trender() {\n\t\tif (!this.hasHealthSystems()) {\n\t\t\treturn ;\n\t\t}\n\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{!this.isRoomURL() && (\n\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\tIn order to communicate with a room,
    \n\t\t\t\t\t\t\t\t\t\t\tplease open a hospital, choose the department,
    \n\t\t\t\t\t\t\t\t\t\t\tclick on a floor, and select a room.\n\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{this.props.treeData.tree.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t } />\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Organization));\n\nexport { Organization }; //Exported for Unit Tests only!\n","import _ from 'lodash';\n\nclass Emitter {\n\tconstructor() {\n\t\tthis.events = {};\n\t}\n\n\temit(event, ...args) {\n\t\tif (this.events[event]) {\n\t\t\tthis.events[event].forEach(fn => fn(...args));\n\t\t}\n\t\treturn this;\n\t}\n\n\ton(event, fn) {\n\t\tif (this.events[event]) this.events[event].push(fn);\n\t\telse this.events[event] = [fn];\n\t\treturn this;\n\t}\n\n\toff(event, fn) {\n\t\tif (event && _.isFunction(fn)) {\n\t\t\tconst listeners = this.events[event];\n\t\t\tconst index = listeners.findIndex(_fn => _fn === fn);\n\t\t\tlisteners.splice(index, 1);\n\t\t} else this.events[event] = [];\n\t\treturn this;\n\t}\n}\n\nexport default Emitter;\n","import SocketEvents from 'constants/socket-events';\n\n/**\n * @class SignalingChannel\n * @classDesc Signaling module for Open WebRTC Toolkit P2P chat\n */\nexport default function SignalingChannel(socket, logger) {\n\tthis.onMessage = null;\n\tconst wsServer = socket;\n\n\tconst bindOn = (event, callback) => {\n\t\twsServer.on(event, data => {\n\t\t\tlogger.debug(`WS:ON:${event}`, { socketId: wsServer?.id }, data);\n\t\t\tcallback(data);\n\t\t});\n\t};\n\n\tthis.send = function(event, message) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlogger.debug(`WS:EMIT:${event}`, { socketId: wsServer?.id }, message);\n\t\t\twsServer.emit(event, message, data => {\n\t\t\t\tif (data) {\n\t\t\t\t\tresolve(data);\n\t\t\t\t} else {\n\t\t\t\t\treject();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\tbindOn(SocketEvents.Conference.ON_NEW_ICE_CANDIDATE, _data => {\n\t\tconst newData = {\n\t\t\tfrom: _data.participantId,\n\t\t\tdata: {\n\t\t\t\ttype: SocketEvents.Conference.SDP,\n\t\t\t\tdata: {\n\t\t\t\t\ttype: 'candidate',\n\t\t\t\t\tcandidate: _data.candidate.sdp,\n\t\t\t\t\tsdpMid: _data.candidate.sdpMid,\n\t\t\t\t\tsdpMLineIndex: _data.candidate.sdpMLineIndex,\n\t\t\t\t\tstreamInfo: null,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tif (this.onMessage) this.onMessage(newData.from, newData.data);\n\t});\n\n\tbindOn(SocketEvents.Conference.ON_NEW_ANSWER, _data => {\n\t\tconst newData = {\n\t\t\tfrom: _data.participantId,\n\t\t\tdata: {\n\t\t\t\ttype: SocketEvents.Conference.SDP,\n\t\t\t\tdata: _data.sdp,\n\t\t\t\tstreamInfo: _data.streamInfo,\n\t\t\t},\n\t\t};\n\n\t\tif (this.onMessage) {\n\t\t\tthis.onMessage(newData.from, newData.data);\n\t\t}\n\t});\n\n\tbindOn(SocketEvents.Conference.ON_NEW_OFFER, _data => {\n\t\tconst newData = {\n\t\t\tfrom: _data.participantId,\n\t\t\tdata: {\n\t\t\t\ttype: SocketEvents.Conference.SDP,\n\t\t\t\tdata: _data.sdp,\n\t\t\t\tstreamInfo: _data.streamInfo,\n\t\t\t},\n\t\t};\n\n\t\tif (this.onMessage) {\n\t\t\tthis.onMessage(newData.from, newData.data);\n\t\t}\n\t});\n}\n","// MIT License\n//\n// Copyright (c) 2012 Universidad Politécnica de Madrid\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is borrowed from lynckia/licode with some modifications.\n\n/**\n * @class EventDispatcher\n * @classDesc A shim for EventTarget. Might be changed to EventTarget later.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport const EventDispatcher = function() {\n\t// Private vars\n\tconst spec = {};\n\tspec.dispatcher = {};\n\tspec.dispatcher.eventListeners = {};\n\n\t/**\n\t * @function addEventListener\n\t * @desc This function registers a callback function as a handler for the corresponding event. It's shortened form is on(eventType, listener). See the event description in the following table.\n\t * @instance\n\t * @memberof Owt.Base.EventDispatcher\n\t * @param {string} eventType Event string.\n\t * @param {function} listener Callback function.\n\t */\n\tthis.addEventListener = function(eventType, listener) {\n\t\tif (spec.dispatcher.eventListeners[eventType] === undefined) {\n\t\t\tspec.dispatcher.eventListeners[eventType] = [];\n\t\t}\n\t\tspec.dispatcher.eventListeners[eventType].push(listener);\n\t};\n\n\t/**\n\t * @function removeEventListener\n\t * @desc This function removes a registered event listener.\n\t * @instance\n\t * @memberof Owt.Base.EventDispatcher\n\t * @param {string} eventType Event string.\n\t * @param {function} listener Callback function.\n\t */\n\tthis.removeEventListener = function(eventType, listener) {\n\t\tif (!spec.dispatcher.eventListeners[eventType]) {\n\t\t\treturn;\n\t\t}\n\t\tconst index = spec.dispatcher.eventListeners[eventType].indexOf(listener);\n\t\tif (index !== -1) {\n\t\t\tspec.dispatcher.eventListeners[eventType].splice(index, 1);\n\t\t}\n\t};\n\n\t/**\n\t * @function clearEventListener\n\t * @desc This function removes all event listeners for one type.\n\t * @instance\n\t * @memberof Owt.Base.EventDispatcher\n\t * @param {string} eventType Event string.\n\t */\n\tthis.clearEventListener = function(eventType) {\n\t\tspec.dispatcher.eventListeners[eventType] = [];\n\t};\n\n\t// It dispatch a new event to the event listeners, based on the type\n\t// of event. All events are intended to be LicodeEvents.\n\tthis.dispatchEvent = function(event) {\n\t\tif (!spec.dispatcher.eventListeners[event.type]) {\n\t\t\treturn;\n\t\t}\n\t\tspec.dispatcher.eventListeners[event.type].map(function(listener) {\n\t\t\tlistener(event);\n\t\t});\n\t};\n};\n\n/**\n * @class OwtEvent\n * @classDesc Class OwtEvent represents a generic Event in the library.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type) {\n\t\tthis.type = type;\n\t}\n}\n\n/**\n * @class MessageEvent\n * @classDesc Class MessageEvent represents a message Event in the library.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class MessageEvent extends OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type, init) {\n\t\tsuper(type);\n\t\t/**\n\t\t * @member {string} origin\n\t\t * @instance\n\t\t * @memberof Owt.Base.MessageEvent\n\t\t * @desc ID of the remote endpoint who published this stream.\n\t\t */\n\t\tthis.origin = init.origin;\n\t\t/**\n\t\t * @member {string} message\n\t\t * @instance\n\t\t * @memberof Owt.Base.MessageEvent\n\t\t */\n\t\tthis.message = init.message;\n\t\t/**\n\t\t * @member {string} to\n\t\t * @instance\n\t\t * @memberof Owt.Base.MessageEvent\n\t\t * @desc Values could be \"all\", \"me\" in conference mode, or undefined in P2P mode..\n\t\t */\n\t\tthis.to = init.to;\n\t}\n}\n\n/**\n * @class ErrorEvent\n * @classDesc Class ErrorEvent represents an error Event in the library.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class ErrorEvent extends OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type, init) {\n\t\tsuper(type);\n\t\t/**\n\t\t * @member {Error} error\n\t\t * @instance\n\t\t * @memberof Owt.Base.ErrorEvent\n\t\t */\n\t\tthis.error = init.error;\n\t}\n}\n\n/**\n * @class MuteEvent\n * @classDesc Class MuteEvent represents a mute or unmute event.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class MuteEvent extends OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type, init) {\n\t\tsuper(type);\n\t\t/**\n\t\t * @member {Owt.Base.TrackKind} kind\n\t\t * @instance\n\t\t * @memberof Owt.Base.MuteEvent\n\t\t */\n\t\tthis.kind = init.kind;\n\t}\n}\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\nexport const errors = {\n\t// 2100-2999 for P2P errors\n\t// 2100-2199 for connection errors\n\t// 2100-2109 for server errors\n\tP2P_CONN_SERVER_UNKNOWN: {\n\t\tcode: 2100,\n\t\tmessage: 'Server unknown error.',\n\t},\n\tP2P_CONN_SERVER_UNAVAILABLE: {\n\t\tcode: 2101,\n\t\tmessage: 'Server is unavaliable.',\n\t},\n\tP2P_CONN_SERVER_BUSY: {\n\t\tcode: 2102,\n\t\tmessage: 'Server is too busy.',\n\t},\n\tP2P_CONN_SERVER_NOT_SUPPORTED: {\n\t\tcode: 2103,\n\t\tmessage: 'Method has not been supported by server.',\n\t},\n\t// 2110-2119 for client errors\n\tP2P_CONN_CLIENT_UNKNOWN: {\n\t\tcode: 2110,\n\t\tmessage: 'Client unknown error.',\n\t},\n\tP2P_CONN_CLIENT_NOT_INITIALIZED: {\n\t\tcode: 2111,\n\t\tmessage: 'Connection is not initialized.',\n\t},\n\t// 2120-2129 for authentication errors\n\tP2P_CONN_AUTH_UNKNOWN: {\n\t\tcode: 2120,\n\t\tmessage: 'Authentication unknown error.',\n\t},\n\tP2P_CONN_AUTH_FAILED: {\n\t\tcode: 2121,\n\t\tmessage: 'Wrong username or token.',\n\t},\n\t// 2200-2299 for message transport errors\n\tP2P_MESSAGING_TARGET_UNREACHABLE: {\n\t\tcode: 2201,\n\t\tmessage: 'Remote user cannot be reached.',\n\t},\n\tP2P_CLIENT_DENIED: {\n\t\tcode: 2202,\n\t\tmessage: 'User is denied.',\n\t},\n\t// 2301-2399 for chat room errors\n\t// 2401-2499 for client errors\n\tP2P_CLIENT_UNKNOWN: {\n\t\tcode: 2400,\n\t\tmessage: 'Unknown errors.',\n\t},\n\tP2P_CLIENT_UNSUPPORTED_METHOD: {\n\t\tcode: 2401,\n\t\tmessage: 'This method is unsupported in current browser.',\n\t},\n\tP2P_CLIENT_ILLEGAL_ARGUMENT: {\n\t\tcode: 2402,\n\t\tmessage: 'Illegal argument.',\n\t},\n\tP2P_CLIENT_INVALID_STATE: {\n\t\tcode: 2403,\n\t\tmessage: 'Invalid peer state.',\n\t},\n\tP2P_CLIENT_NOT_ALLOWED: {\n\t\tcode: 2404,\n\t\tmessage: 'Remote user is not allowed.',\n\t},\n\t// 2501-2599 for WebRTC erros.\n\tP2P_WEBRTC_UNKNOWN: {\n\t\tcode: 2500,\n\t\tmessage: 'WebRTC error.',\n\t},\n\tP2P_WEBRTC_SDP: {\n\t\tcode: 2502,\n\t\tmessage: 'SDP error.',\n\t},\n};\n\n/**\n * @function getErrorByCode\n * @desc Get error object by error code.\n * @param {string} errorCode Error code.\n * @return {Owt.P2P.Error} Error object\n * @private\n */\nexport function getErrorByCode(errorCode) {\n\tconst codeErrorMap = {\n\t\t2100: errors.P2P_CONN_SERVER_UNKNOWN,\n\t\t2101: errors.P2P_CONN_SERVER_UNAVAILABLE,\n\t\t2102: errors.P2P_CONN_SERVER_BUSY,\n\t\t2103: errors.P2P_CONN_SERVER_NOT_SUPPORTED,\n\t\t2110: errors.P2P_CONN_CLIENT_UNKNOWN,\n\t\t2111: errors.P2P_CONN_CLIENT_NOT_INITIALIZED,\n\t\t2120: errors.P2P_CONN_AUTH_UNKNOWN,\n\t\t2121: errors.P2P_CONN_AUTH_FAILED,\n\t\t2201: errors.P2P_MESSAGING_TARGET_UNREACHABLE,\n\t\t2400: errors.P2P_CLIENT_UNKNOWN,\n\t\t2401: errors.P2P_CLIENT_UNSUPPORTED_METHOD,\n\t\t2402: errors.P2P_CLIENT_ILLEGAL_ARGUMENT,\n\t\t2403: errors.P2P_CLIENT_INVALID_STATE,\n\t\t2404: errors.P2P_CLIENT_NOT_ALLOWED,\n\t\t2500: errors.P2P_WEBRTC_UNKNOWN,\n\t\t2501: errors.P2P_WEBRTC_SDP,\n\t};\n\treturn codeErrorMap[errorCode];\n}\n\n/**\n * @class P2PError\n * @classDesc The P2PError object represents an error in P2P mode.\n * @memberOf Owt.P2P\n * @hideconstructor\n */\nexport class P2PError extends Error {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(error, message) {\n\t\tsuper(message);\n\t\tif (typeof error === 'number') {\n\t\t\tthis.code = error;\n\t\t} else {\n\t\t\tthis.code = error.code;\n\t\t}\n\t}\n}\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/* global navigator, window */\nconst sdkVersion = '4.2.1';\n\n// eslint-disable-next-line require-jsdoc\nexport function isFirefox() {\n\treturn window.navigator.userAgent.match('Firefox') !== null;\n}\n// eslint-disable-next-line require-jsdoc\nexport function isChrome() {\n\treturn window.navigator.userAgent.match('Chrome') !== null;\n}\n// eslint-disable-next-line require-jsdoc\nexport function isSafari() {\n\treturn /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);\n}\n// eslint-disable-next-line require-jsdoc\nexport function isEdge() {\n\treturn window.navigator.userAgent.match(/Edge\\/(\\d+).(\\d+)$/) !== null;\n}\n// eslint-disable-next-line require-jsdoc\nexport function createUuid() {\n\treturn 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n\t\tconst r = (Math.random() * 16) | 0;\n\t\tconst v = c === 'x' ? r : (r & 0x3) | 0x8;\n\t\treturn v.toString(16);\n\t});\n}\n\n// Returns system information.\n// Format: {sdk:{version:**, type:**}, runtime:{version:**, name:**}, os:{version:**, name:**}};\n// eslint-disable-next-line require-jsdoc\nexport function sysInfo() {\n\tconst info = Object.create({});\n\tinfo.sdk = {\n\t\tversion: sdkVersion,\n\t\ttype: 'JavaScript',\n\t};\n\t// Runtime info.\n\tconst userAgent = navigator.userAgent;\n\tconst firefoxRegex = /Firefox\\/([0-9\\.]+)/;\n\tconst chromeRegex = /Chrome\\/([0-9\\.]+)/;\n\tconst edgeRegex = /Edge\\/([0-9\\.]+)/;\n\tconst safariVersionRegex = /Version\\/([0-9\\.]+) Safari/;\n\tlet result = chromeRegex.exec(userAgent);\n\tif (result) {\n\t\tinfo.runtime = {\n\t\t\tname: 'Chrome',\n\t\t\tversion: result[1],\n\t\t};\n\t} else if ((result = firefoxRegex.exec(userAgent))) {\n\t\tinfo.runtime = {\n\t\t\tname: 'Firefox',\n\t\t\tversion: result[1],\n\t\t};\n\t} else if ((result = edgeRegex.exec(userAgent))) {\n\t\tinfo.runtime = {\n\t\t\tname: 'Edge',\n\t\t\tversion: result[1],\n\t\t};\n\t} else if (isSafari()) {\n\t\tresult = safariVersionRegex.exec(userAgent);\n\t\tinfo.runtime = {\n\t\t\tname: 'Safari',\n\t\t};\n\t\tinfo.runtime.version = result ? result[1] : 'Unknown';\n\t} else {\n\t\tinfo.runtime = {\n\t\t\tname: 'Unknown',\n\t\t\tversion: 'Unknown',\n\t\t};\n\t}\n\t// OS info.\n\tconst windowsRegex = /Windows NT ([0-9\\.]+)/;\n\tconst macRegex = /Intel Mac OS X ([0-9_\\.]+)/;\n\tconst iPhoneRegex = /iPhone OS ([0-9_\\.]+)/;\n\tconst linuxRegex = /X11; Linux/;\n\tconst androidRegex = /Android( ([0-9\\.]+))?/;\n\tconst chromiumOsRegex = /CrOS/;\n\tif ((result = windowsRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Windows NT',\n\t\t\tversion: result[1],\n\t\t};\n\t} else if ((result = macRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Mac OS X',\n\t\t\tversion: result[1].replace(/_/g, '.'),\n\t\t};\n\t} else if ((result = iPhoneRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'iPhone OS',\n\t\t\tversion: result[1].replace(/_/g, '.'),\n\t\t};\n\t} else if ((result = linuxRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Linux',\n\t\t\tversion: 'Unknown',\n\t\t};\n\t} else if ((result = androidRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Android',\n\t\t\tversion: result[1] || 'Unknown',\n\t\t};\n\t} else if ((result = chromiumOsRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Chrome OS',\n\t\t\tversion: 'Unknown',\n\t\t};\n\t} else {\n\t\tinfo.os = {\n\t\t\tname: 'Unknown',\n\t\t\tversion: 'Unknown',\n\t\t};\n\t}\n\tinfo.capabilities = {\n\t\tcontinualIceGathering: false,\n\t\tunifiedPlan: true,\n\t\tstreamRemovable: info.runtime.name !== 'Firefox',\n\t};\n\treturn info;\n}\n","// @ts-nocheck\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n/* eslint-disable max-classes-per-file */\nimport * as Utils from './utils';\nimport { EventDispatcher } from '../base/event';\n\n/**\n * @class AudioPublicationSettings\n * @memberOf Owt.Base\n * @classDesc The audio settings of a publication.\n * @hideconstructor\n */\nexport class AudioPublicationSettings {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(codec) {\n\t\t/**\n\t\t * @member {?Owt.Base.AudioCodecParameters} codec\n\t\t * @instance\n\t\t * @memberof Owt.Base.AudioPublicationSettings\n\t\t */\n\t\tthis.codec = codec;\n\t}\n}\n\n/**\n * @class VideoPublicationSettings\n * @memberOf Owt.Base\n * @classDesc The video settings of a publication.\n * @hideconstructor\n */\nexport class VideoPublicationSettings {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(codec, resolution, frameRate, bitrate, keyFrameInterval) {\n\t\t/**\n\t\t * @member {?Owt.Base.VideoCodecParameters} codec\n\t\t * @instance\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.codec = codec;\n\t\t/**\n\t\t * @member {?Owt.Base.Resolution} resolution\n\t\t * @instance\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.resolution = resolution;\n\t\t/**\n\t\t * @member {?number} frameRates\n\t\t * @instance\n\t\t * @classDesc Frames per second.\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.frameRate = frameRate;\n\t\t/**\n\t\t * @member {?number} bitrate\n\t\t * @instance\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.bitrate = bitrate;\n\t\t/**\n\t\t * @member {?number} keyFrameIntervals\n\t\t * @instance\n\t\t * @classDesc The time interval between key frames. Unit: second.\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.keyFrameInterval = keyFrameInterval;\n\t}\n}\n\n/**\n * @class PublicationSettings\n * @memberOf Owt.Base\n * @classDesc The settings of a publication.\n * @hideconstructor\n */\nexport class PublicationSettings {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(audio, video) {\n\t\t/**\n\t\t * @member {Owt.Base.AudioPublicationSettings} audio\n\t\t * @instance\n\t\t * @memberof Owt.Base.PublicationSettings\n\t\t */\n\t\tthis.audio = audio;\n\t\t/**\n\t\t * @member {Owt.Base.VideoPublicationSettings} video\n\t\t * @instance\n\t\t * @memberof Owt.Base.PublicationSettings\n\t\t */\n\t\tthis.video = video;\n\t}\n}\n\n/**\n * @class Publication\n * @extends Owt.Base.EventDispatcher\n * @memberOf Owt.Base\n * @classDesc Publication represents a sender for publishing a stream. It\n * handles the actions on a LocalStream published to a conference.\n * Events:\n *\n * | Event Name | Argument Type | Fired when |\n * | ----------------| ---------------- | ---------------- |\n * | ended | Event | Publication is ended. |\n * | error | ErrorEvent | An error occurred on the publication. |\n * | mute | MuteEvent | Publication is muted. Client stopped sending audio and/or video data to remote endpoint. |\n * | unmute | MuteEvent | Publication is unmuted. Client continued sending audio and/or video data to remote endpoint. |\n *\n * @hideconstructor\n */\nexport class Publication extends EventDispatcher {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(id, stop, getStats, mute, unmute) {\n\t\tsuper();\n\t\t/**\n\t\t * @member {string} id\n\t\t * @instance\n\t\t * @memberof Owt.Base.Publication\n\t\t */\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: id ? id : Utils.createUuid(),\n\t\t});\n\t\t/**\n\t\t * @function stop\n\t\t * @instance\n\t\t * @desc Stop certain publication. Once a subscription is stopped, it cannot be recovered.\n\t\t * @memberof Owt.Base.Publication\n\t\t * @returns {undefined}\n\t\t */\n\t\tthis.stop = stop;\n\t\t/**\n\t\t * @function getStats\n\t\t * @instance\n\t\t * @desc Get stats of underlying PeerConnection.\n\t\t * @memberof Owt.Base.Publication\n\t\t * @returns {Promise}\n\t\t */\n\t\tthis.getStats = getStats;\n\t\t/**\n\t\t * @function mute\n\t\t * @instance\n\t\t * @desc Stop sending data to remote endpoint.\n\t\t * @memberof Owt.Base.Publication\n\t\t * @param {Owt.Base.TrackKind } kind Kind of tracks to be muted.\n\t\t * @returns {Promise}\n\t\t */\n\t\tthis.mute = mute;\n\t\t/**\n\t\t * @function unmute\n\t\t * @instance\n\t\t * @desc Continue sending data to remote endpoint.\n\t\t * @memberof Owt.Base.Publication\n\t\t * @param {Owt.Base.TrackKind } kind Kind of tracks to be unmuted.\n\t\t * @returns {Promise}\n\t\t */\n\t\tthis.unmute = unmute;\n\t}\n}\n\n/**\n * @class PublishOptions\n * @memberOf Owt.Base\n * @classDesc PublishOptions defines options for publishing a Owt.Base.LocalStream.\n */\nexport class PublishOptions {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(audio, video) {\n\t\t/**\n\t\t * @member {?Array} audio\n\t\t * @instance\n\t\t * @memberof Owt.Base.PublishOptions\n\t\t */\n\t\tthis.audio = audio;\n\t\t/**\n\t\t * @member {?Array} video\n\t\t * @instance\n\t\t * @memberof Owt.Base.PublishOptions\n\t\t */\n\t\tthis.video = video;\n\t}\n}\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { OwtEvent } from './event.js';\nimport * as Utils from './utils.js';\nimport { EventDispatcher } from './event.js';\n\n// eslint-disable-next-line require-jsdoc\nfunction isAllowedValue(obj, allowedValues) {\n\treturn allowedValues.some(ele => {\n\t\treturn ele === obj;\n\t});\n}\n/**\n * @class StreamSourceInfo\n * @memberOf Owt.Base\n * @classDesc Information of a stream's source.\n * @constructor\n * @description Audio source info or video source info could be undefined if a stream does not have audio/video track.\n * @param {?string} audioSourceInfo Audio source info. Accepted values are: \"mic\", \"screen-cast\", \"file\", \"mixed\" or undefined.\n * @param {?string} videoSourceInfo Video source info. Accepted values are: \"camera\", \"screen-cast\", \"file\", \"mixed\" or undefined.\n */\nexport class StreamSourceInfo {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(audioSourceInfo, videoSourceInfo) {\n\t\tif (!isAllowedValue(audioSourceInfo, [undefined, 'mic', 'screen-cast', 'file', 'mixed'])) {\n\t\t\tthrow new TypeError('Incorrect value for audioSourceInfo');\n\t\t}\n\t\tif (!isAllowedValue(videoSourceInfo, [undefined, 'camera', 'screen-cast', 'file', 'encoded-file', 'raw-file', 'mixed'])) {\n\t\t\tthrow new TypeError('Incorrect value for videoSourceInfo');\n\t\t}\n\t\tthis.audio = audioSourceInfo;\n\t\tthis.video = videoSourceInfo;\n\t}\n}\n/**\n * @class Stream\n * @memberOf Owt.Base\n * @classDesc Base class of streams.\n * @extends Owt.Base.EventDispatcher\n * @hideconstructor\n */\nexport class Stream extends EventDispatcher {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(stream, sourceInfo, attributes) {\n\t\tsuper();\n\t\tif ((stream && !(stream instanceof MediaStream)) || typeof sourceInfo !== 'object') {\n\t\t\tthrow new TypeError('Invalid stream or sourceInfo.');\n\t\t}\n\t\tif (stream && ((stream.getAudioTracks().length > 0 && !sourceInfo.audio) || (stream.getVideoTracks().length > 0 && !sourceInfo.video))) {\n\t\t\tthrow new TypeError('Missing audio source info or video source info.');\n\t\t}\n\t\t/**\n\t\t * @member {?MediaStream} mediaStream\n\t\t * @instance\n\t\t * @memberof Owt.Base.Stream\n\t\t * @see {@link https://www.w3.org/TR/mediacapture-streams/#mediastream|MediaStream API of Media Capture and Streams}.\n\t\t */\n\t\tObject.defineProperty(this, 'mediaStream', {\n\t\t\tconfigurable: false,\n\t\t\twritable: true,\n\t\t\tvalue: stream,\n\t\t});\n\t\t/**\n\t\t * @member {Owt.Base.StreamSourceInfo} source\n\t\t * @instance\n\t\t * @memberof Owt.Base.Stream\n\t\t * @desc Source info of a stream.\n\t\t */\n\t\tObject.defineProperty(this, 'source', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: sourceInfo,\n\t\t});\n\t\t/**\n\t\t * @member {object} attributes\n\t\t * @instance\n\t\t * @memberof Owt.Base.Stream\n\t\t * @desc Custom attributes of a stream.\n\t\t */\n\t\tObject.defineProperty(this, 'attributes', {\n\t\t\tconfigurable: true,\n\t\t\twritable: false,\n\t\t\tvalue: attributes,\n\t\t});\n\t}\n}\n/**\n * @class LocalStream\n * @classDesc Stream captured from current endpoint.\n * @memberOf Owt.Base\n * @extends Owt.Base.Stream\n * @constructor\n * @param {MediaStream} stream Underlying MediaStream.\n * @param {Owt.Base.StreamSourceInfo} sourceInfo Information about stream's source.\n * @param {object} attributes Custom attributes of the stream.\n */\nexport class LocalStream extends Stream {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(stream, sourceInfo, attributes) {\n\t\tif (!(stream instanceof MediaStream)) {\n\t\t\tthrow new TypeError('Invalid stream.');\n\t\t}\n\t\tsuper(stream, sourceInfo, attributes);\n\t\t/**\n\t\t * @member {string} id\n\t\t * @instance\n\t\t * @memberof Owt.Base.LocalStream\n\t\t */\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: Utils.createUuid(),\n\t\t});\n\t}\n}\n/**\n * @class RemoteStream\n * @classDesc Stream sent from a remote endpoint.\n * Events:\n *\n * | Event Name | Argument Type | Fired when |\n * | ----------------| ---------------- | ------------------ |\n * | ended | Event | Stream is ended. |\n * | updated | Event | Stream is updated. |\n *\n * @memberOf Owt.Base\n * @extends Owt.Base.Stream\n * @hideconstructor\n */\nexport class RemoteStream extends Stream {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(id, origin, stream, sourceInfo, attributes) {\n\t\tsuper(stream, sourceInfo, attributes);\n\t\t/**\n\t\t * @member {string} id\n\t\t * @instance\n\t\t * @memberof Owt.Base.RemoteStream\n\t\t */\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: id ? id : Utils.createUuid(),\n\t\t});\n\t\t/**\n\t\t * @member {string} origin\n\t\t * @instance\n\t\t * @memberof Owt.Base.RemoteStream\n\t\t * @desc ID of the remote endpoint who published this stream.\n\t\t */\n\t\tObject.defineProperty(this, 'origin', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: origin,\n\t\t});\n\t\t/**\n\t\t * @member {Owt.Base.PublicationSettings} settings\n\t\t * @instance\n\t\t * @memberof Owt.Base.RemoteStream\n\t\t * @desc Original settings for publishing this stream. This property is only valid in conference mode.\n\t\t */\n\t\tthis.settings = undefined;\n\t\t/**\n\t\t * @member {Owt.Conference.SubscriptionCapabilities} capabilities\n\t\t * @instance\n\t\t * @memberof Owt.Base.RemoteStream\n\t\t * @desc Capabilities remote endpoint provides for subscription. This property is only valid in conference mode.\n\t\t */\n\t\tthis.capabilities = undefined;\n\t}\n}\n\n/**\n * @class StreamEvent\n * @classDesc Event for Stream.\n * @extends Owt.Base.OwtEvent\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class StreamEvent extends OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type, init) {\n\t\tsuper(type);\n\t\t/**\n\t\t * @member {Owt.Base.Stream} stream\n\t\t * @instance\n\t\t * @memberof Owt.Base.StreamEvent\n\t\t */\n\t\tthis.stream = init.stream;\n\t}\n}\n","// MIT License\n//\n// Copyright (c) 2012 Universidad Politécnica de Madrid\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is borrowed from lynckia/licode with some modifications.\n\n/* global window */\n\n/*\n * API to write logs based on traditional logging mechanisms: debug, trace,\n * info, warning, error\n */\nconst Logger = (function() {\n\tconst DEBUG = 0;\n\tconst TRACE = 1;\n\tconst INFO = 2;\n\tconst WARNING = 3;\n\tconst ERROR = 4;\n\tconst NONE = 5;\n\n\tconst noOp = function() {};\n\n\t// |that| is the object to be returned.\n\tconst that = {\n\t\tDEBUG: DEBUG,\n\t\tTRACE: TRACE,\n\t\tINFO: INFO,\n\t\tWARNING: WARNING,\n\t\tERROR: ERROR,\n\t\tNONE: NONE,\n\t};\n\n\tthat.log = window.console.log.bind(window.console);\n\n\tconst bindType = function(type) {\n\t\tif (typeof window.console[type] === 'function') {\n\t\t\treturn window.console[type].bind(window.console);\n\t\t} else {\n\t\t\treturn window.console.log.bind(window.console);\n\t\t}\n\t};\n\n\tconst setLogLevel = function(level) {\n\t\tif (level <= DEBUG) {\n\t\t\tthat.debug = bindType('log');\n\t\t} else {\n\t\t\tthat.debug = noOp;\n\t\t}\n\t\tif (level <= TRACE) {\n\t\t\tthat.trace = bindType('trace');\n\t\t} else {\n\t\t\tthat.trace = noOp;\n\t\t}\n\t\tif (level <= INFO) {\n\t\t\tthat.info = bindType('info');\n\t\t} else {\n\t\t\tthat.info = noOp;\n\t\t}\n\t\tif (level <= WARNING) {\n\t\t\tthat.warning = bindType('warn');\n\t\t} else {\n\t\t\tthat.warning = noOp;\n\t\t}\n\t\tif (level <= ERROR) {\n\t\t\tthat.error = bindType('error');\n\t\t} else {\n\t\t\tthat.error = noOp;\n\t\t}\n\t};\n\n\tsetLogLevel(DEBUG); // Default level is debug.\n\n\tthat.setLogLevel = setLogLevel;\n\n\treturn that;\n})();\n\nexport default Logger;\n","/*\n * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n\n/* More information about these options at jshint.com/docs/options */\n\n/* eslint-disable */\n\n/* globals adapter, trace */\n/* exported setCodecParam, iceCandidateType, formatTypePreference,\n maybeSetOpusOptions, maybePreferAudioReceiveCodec,\n maybePreferAudioSendCodec, maybeSetAudioReceiveBitRate,\n maybeSetAudioSendBitRate, maybePreferVideoReceiveCodec,\n maybePreferVideoSendCodec, maybeSetVideoReceiveBitRate,\n maybeSetVideoSendBitRate, maybeSetVideoSendInitialBitRate,\n maybeRemoveVideoFec, mergeConstraints, removeCodecParam*/\n\n/* This file is borrowed from apprtc with some modifications. */\n/* Commit hash: c6af0c25e9af527f71b3acdd6bfa1389d778f7bd + PR 530 */\n\nimport Logger from './logger.js';\n\nfunction mergeConstraints(cons1, cons2) {\n\tif (!cons1 || !cons2) {\n\t\treturn cons1 || cons2;\n\t}\n\tconst merged = cons1;\n\tfor (const key in cons2) {\n\t\tmerged[key] = cons2[key];\n\t}\n\treturn merged;\n}\n\nfunction iceCandidateType(candidateStr) {\n\treturn candidateStr.split(' ')[7];\n}\n\n// Turns the local type preference into a human-readable string.\n// Note that this mapping is browser-specific.\nfunction formatTypePreference(pref) {\n\tif (adapter.browserDetails.browser === 'chrome') {\n\t\tswitch (pref) {\n\t\t\tcase 0:\n\t\t\t\treturn 'TURN/TLS';\n\t\t\tcase 1:\n\t\t\t\treturn 'TURN/TCP';\n\t\t\tcase 2:\n\t\t\t\treturn 'TURN/UDP';\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t} else if (adapter.browserDetails.browser === 'firefox') {\n\t\tswitch (pref) {\n\t\t\tcase 0:\n\t\t\t\treturn 'TURN/TCP';\n\t\t\tcase 5:\n\t\t\t\treturn 'TURN/UDP';\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn '';\n}\n\nfunction maybeSetOpusOptions(sdp, params) {\n\t// Set Opus in Stereo, if stereo is true, unset it, if stereo is false, and\n\t// do nothing if otherwise.\n\tif (params.opusStereo === 'true') {\n\t\tsdp = setCodecParam(sdp, 'opus/48000', 'stereo', '1');\n\t} else if (params.opusStereo === 'false') {\n\t\tsdp = removeCodecParam(sdp, 'opus/48000', 'stereo');\n\t}\n\n\t// Set Opus FEC, if opusfec is true, unset it, if opusfec is false, and\n\t// do nothing if otherwise.\n\tif (params.opusFec === 'true') {\n\t\tsdp = setCodecParam(sdp, 'opus/48000', 'useinbandfec', '1');\n\t} else if (params.opusFec === 'false') {\n\t\tsdp = removeCodecParam(sdp, 'opus/48000', 'useinbandfec');\n\t}\n\n\t// Set Opus DTX, if opusdtx is true, unset it, if opusdtx is false, and\n\t// do nothing if otherwise.\n\tif (params.opusDtx === 'true') {\n\t\tsdp = setCodecParam(sdp, 'opus/48000', 'usedtx', '1');\n\t} else if (params.opusDtx === 'false') {\n\t\tsdp = removeCodecParam(sdp, 'opus/48000', 'usedtx');\n\t}\n\n\t// Set Opus maxplaybackrate, if requested.\n\tif (params.opusMaxPbr) {\n\t\tsdp = setCodecParam(sdp, 'opus/48000', 'maxplaybackrate', params.opusMaxPbr);\n\t}\n\treturn sdp;\n}\n\nfunction maybeSetAudioSendBitRate(sdp, params) {\n\tif (!params.audioSendBitrate) {\n\t\treturn sdp;\n\t}\n\tLogger.debug('Prefer audio send bitrate: ' + params.audioSendBitrate);\n\treturn preferBitRate(sdp, params.audioSendBitrate, 'audio');\n}\n\nfunction maybeSetAudioReceiveBitRate(sdp, params) {\n\tif (!params.audioRecvBitrate) {\n\t\treturn sdp;\n\t}\n\tLogger.debug('Prefer audio receive bitrate: ' + params.audioRecvBitrate);\n\treturn preferBitRate(sdp, params.audioRecvBitrate, 'audio');\n}\n\nfunction maybeSetVideoSendBitRate(sdp, params) {\n\tif (!params.videoSendBitrate) {\n\t\treturn sdp;\n\t}\n\tLogger.debug('Prefer video send bitrate: ' + params.videoSendBitrate);\n\treturn preferBitRate(sdp, params.videoSendBitrate, 'video');\n}\n\nfunction maybeSetVideoReceiveBitRate(sdp, params) {\n\tif (!params.videoRecvBitrate) {\n\t\treturn sdp;\n\t}\n\tLogger.debug('Prefer video receive bitrate: ' + params.videoRecvBitrate);\n\treturn preferBitRate(sdp, params.videoRecvBitrate, 'video');\n}\n\n// Add a b=AS:bitrate line to the m=mediaType section.\nfunction preferBitRate(sdp, bitrate, mediaType) {\n\tconst sdpLines = sdp.split('\\r\\n');\n\n\t// Find m line for the given mediaType.\n\tconst mLineIndex = findLine(sdpLines, 'm=', mediaType);\n\tif (mLineIndex === null) {\n\t\tLogger.debug('Failed to add bandwidth line to sdp, as no m-line found');\n\t\treturn sdp;\n\t}\n\n\t// Find next m-line if any.\n\tlet nextMLineIndex = findLineInRange(sdpLines, mLineIndex + 1, -1, 'm=');\n\tif (nextMLineIndex === null) {\n\t\tnextMLineIndex = sdpLines.length;\n\t}\n\n\t// Find c-line corresponding to the m-line.\n\tconst cLineIndex = findLineInRange(sdpLines, mLineIndex + 1, nextMLineIndex, 'c=');\n\tif (cLineIndex === null) {\n\t\tLogger.debug('Failed to add bandwidth line to sdp, as no c-line found');\n\t\treturn sdp;\n\t}\n\n\t// Check if bandwidth line already exists between c-line and next m-line.\n\tconst bLineIndex = findLineInRange(sdpLines, cLineIndex + 1, nextMLineIndex, 'b=AS');\n\tif (bLineIndex) {\n\t\tsdpLines.splice(bLineIndex, 1);\n\t}\n\n\t// Create the b (bandwidth) sdp line.\n\tconst bwLine = 'b=AS:' + bitrate;\n\t// As per RFC 4566, the b line should follow after c-line.\n\tsdpLines.splice(cLineIndex + 1, 0, bwLine);\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\n// Add an a=fmtp: x-google-min-bitrate=kbps line, if videoSendInitialBitrate\n// is specified. We'll also add a x-google-min-bitrate value, since the max\n// must be >= the min.\nfunction maybeSetVideoSendInitialBitRate(sdp, params) {\n\tlet initialBitrate = parseInt(params.videoSendInitialBitrate);\n\tif (!initialBitrate) {\n\t\treturn sdp;\n\t}\n\n\t// Validate the initial bitrate value.\n\tlet maxBitrate = parseInt(initialBitrate);\n\tconst bitrate = parseInt(params.videoSendBitrate);\n\tif (bitrate) {\n\t\tif (initialBitrate > bitrate) {\n\t\t\tLogger.debug('Clamping initial bitrate to max bitrate of ' + bitrate + ' kbps.');\n\t\t\tinitialBitrate = bitrate;\n\t\t\tparams.videoSendInitialBitrate = initialBitrate;\n\t\t}\n\t\tmaxBitrate = bitrate;\n\t}\n\n\tconst sdpLines = sdp.split('\\r\\n');\n\n\t// Search for m line.\n\tconst mLineIndex = findLine(sdpLines, 'm=', 'video');\n\tif (mLineIndex === null) {\n\t\tLogger.debug('Failed to find video m-line');\n\t\treturn sdp;\n\t}\n\t// Figure out the first codec payload type on the m=video SDP line.\n\tconst videoMLine = sdpLines[mLineIndex];\n\tconst pattern = new RegExp('m=video\\\\s\\\\d+\\\\s[A-Z/]+\\\\s');\n\tconst sendPayloadType = videoMLine.split(pattern)[1].split(' ')[0];\n\tconst fmtpLine = sdpLines[findLine(sdpLines, 'a=rtpmap', sendPayloadType)];\n\tconst codecName = fmtpLine.split('a=rtpmap:' + sendPayloadType)[1].split('/')[0];\n\n\t// Use codec from params if specified via URL param, otherwise use from SDP.\n\tconst codec = params.videoSendCodec || codecName;\n\tsdp = setCodecParam(sdp, codec, 'x-google-min-bitrate', params.videoSendInitialBitrate.toString());\n\tsdp = setCodecParam(sdp, codec, 'x-google-max-bitrate', maxBitrate.toString());\n\n\treturn sdp;\n}\n\nfunction removePayloadTypeFromMline(mLine, payloadType) {\n\tmLine = mLine.split(' ');\n\tfor (let i = 0; i < mLine.length; ++i) {\n\t\tif (mLine[i] === payloadType.toString()) {\n\t\t\tmLine.splice(i, 1);\n\t\t}\n\t}\n\treturn mLine.join(' ');\n}\n\nfunction removeCodecByName(sdpLines, codec) {\n\tconst index = findLine(sdpLines, 'a=rtpmap', codec);\n\tif (index === null) {\n\t\treturn sdpLines;\n\t}\n\tconst payloadType = getCodecPayloadTypeFromLine(sdpLines[index]);\n\tsdpLines.splice(index, 1);\n\n\t// Search for the video m= line and remove the codec.\n\tconst mLineIndex = findLine(sdpLines, 'm=', 'video');\n\tif (mLineIndex === null) {\n\t\treturn sdpLines;\n\t}\n\tsdpLines[mLineIndex] = removePayloadTypeFromMline(sdpLines[mLineIndex], payloadType);\n\treturn sdpLines;\n}\n\nfunction removeCodecByPayloadType(sdpLines, payloadType) {\n\tconst index = findLine(sdpLines, 'a=rtpmap', payloadType.toString());\n\tif (index === null) {\n\t\treturn sdpLines;\n\t}\n\tsdpLines.splice(index, 1);\n\n\t// Search for the video m= line and remove the codec.\n\tconst mLineIndex = findLine(sdpLines, 'm=', 'video');\n\tif (mLineIndex === null) {\n\t\treturn sdpLines;\n\t}\n\tsdpLines[mLineIndex] = removePayloadTypeFromMline(sdpLines[mLineIndex], payloadType);\n\treturn sdpLines;\n}\n\nfunction maybeRemoveVideoFec(sdp, params) {\n\tif (params.videoFec !== 'false') {\n\t\treturn sdp;\n\t}\n\n\tlet sdpLines = sdp.split('\\r\\n');\n\n\tlet index = findLine(sdpLines, 'a=rtpmap', 'red');\n\tif (index === null) {\n\t\treturn sdp;\n\t}\n\tconst redPayloadType = getCodecPayloadTypeFromLine(sdpLines[index]);\n\tsdpLines = removeCodecByPayloadType(sdpLines, redPayloadType);\n\n\tsdpLines = removeCodecByName(sdpLines, 'ulpfec');\n\n\t// Remove fmtp lines associated with red codec.\n\tindex = findLine(sdpLines, 'a=fmtp', redPayloadType.toString());\n\tif (index === null) {\n\t\treturn sdp;\n\t}\n\tconst fmtpLine = parseFmtpLine(sdpLines[index]);\n\tconst rtxPayloadType = fmtpLine.pt;\n\tif (rtxPayloadType === null) {\n\t\treturn sdp;\n\t}\n\tsdpLines.splice(index, 1);\n\n\tsdpLines = removeCodecByPayloadType(sdpLines, rtxPayloadType);\n\treturn sdpLines.join('\\r\\n');\n}\n\n// Promotes |audioSendCodec| to be the first in the m=audio line, if set.\nfunction maybePreferAudioSendCodec(sdp, params) {\n\treturn maybePreferCodec(sdp, 'audio', 'send', params.audioSendCodec);\n}\n\n// Promotes |audioRecvCodec| to be the first in the m=audio line, if set.\nfunction maybePreferAudioReceiveCodec(sdp, params) {\n\treturn maybePreferCodec(sdp, 'audio', 'receive', params.audioRecvCodec);\n}\n\n// Promotes |videoSendCodec| to be the first in the m=audio line, if set.\nfunction maybePreferVideoSendCodec(sdp, params) {\n\treturn maybePreferCodec(sdp, 'video', 'send', params.videoSendCodec);\n}\n\n// Promotes |videoRecvCodec| to be the first in the m=audio line, if set.\nfunction maybePreferVideoReceiveCodec(sdp, params) {\n\treturn maybePreferCodec(sdp, 'video', 'receive', params.videoRecvCodec);\n}\n\n// Sets |codec| as the default |type| codec if it's present.\n// The format of |codec| is 'NAME/RATE', e.g. 'opus/48000'.\nfunction maybePreferCodec(sdp, type, dir, codec) {\n\tconst str = type + ' ' + dir + ' codec';\n\tif (!codec) {\n\t\tLogger.debug('No preference on ' + str + '.');\n\t\treturn sdp;\n\t}\n\n\tLogger.debug('Prefer ' + str + ': ' + codec);\n\n\tconst sdpLines = sdp.split('\\r\\n');\n\n\t// Search for m line.\n\tconst mLineIndex = findLine(sdpLines, 'm=', type);\n\tif (mLineIndex === null) {\n\t\treturn sdp;\n\t}\n\n\t// If the codec is available, set it as the default in m line.\n\tlet payload = null;\n\tfor (let i = 0; i < sdpLines.length; i++) {\n\t\tconst index = findLineInRange(sdpLines, i, -1, 'a=rtpmap', codec);\n\t\tif (index !== null) {\n\t\t\tpayload = getCodecPayloadTypeFromLine(sdpLines[index]);\n\t\t\tif (payload) {\n\t\t\t\tsdpLines[mLineIndex] = setDefaultCodec(sdpLines[mLineIndex], payload);\n\t\t\t}\n\t\t}\n\t}\n\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\n// Set fmtp param to specific codec in SDP. If param does not exists, add it.\nfunction setCodecParam(sdp, codec, param, value) {\n\tlet sdpLines = sdp.split('\\r\\n');\n\t// SDPs sent from MCU use \\n as line break.\n\tif (sdpLines.length <= 1) {\n\t\tsdpLines = sdp.split('\\n');\n\t}\n\n\tconst fmtpLineIndex = findFmtpLine(sdpLines, codec);\n\n\tlet fmtpObj = {};\n\tif (fmtpLineIndex === null) {\n\t\tconst index = findLine(sdpLines, 'a=rtpmap', codec);\n\t\tif (index === null) {\n\t\t\treturn sdp;\n\t\t}\n\t\tconst payload = getCodecPayloadTypeFromLine(sdpLines[index]);\n\t\tfmtpObj.pt = payload.toString();\n\t\tfmtpObj.params = {};\n\t\tfmtpObj.params[param] = value;\n\t\tsdpLines.splice(index + 1, 0, writeFmtpLine(fmtpObj));\n\t} else {\n\t\tfmtpObj = parseFmtpLine(sdpLines[fmtpLineIndex]);\n\t\tfmtpObj.params[param] = value;\n\t\tsdpLines[fmtpLineIndex] = writeFmtpLine(fmtpObj);\n\t}\n\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\n// Remove fmtp param if it exists.\nfunction removeCodecParam(sdp, codec, param) {\n\tconst sdpLines = sdp.split('\\r\\n');\n\n\tconst fmtpLineIndex = findFmtpLine(sdpLines, codec);\n\tif (fmtpLineIndex === null) {\n\t\treturn sdp;\n\t}\n\n\tconst map = parseFmtpLine(sdpLines[fmtpLineIndex]);\n\tdelete map.params[param];\n\n\tconst newLine = writeFmtpLine(map);\n\tif (newLine === null) {\n\t\tsdpLines.splice(fmtpLineIndex, 1);\n\t} else {\n\t\tsdpLines[fmtpLineIndex] = newLine;\n\t}\n\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\n// Split an fmtp line into an object including 'pt' and 'params'.\nfunction parseFmtpLine(fmtpLine) {\n\tconst fmtpObj = {};\n\tconst spacePos = fmtpLine.indexOf(' ');\n\tconst keyValues = fmtpLine.substring(spacePos + 1).split(';');\n\n\tconst pattern = new RegExp('a=fmtp:(\\\\d+)');\n\tconst result = fmtpLine.match(pattern);\n\tif (result && result.length === 2) {\n\t\tfmtpObj.pt = result[1];\n\t} else {\n\t\treturn null;\n\t}\n\n\tconst params = {};\n\tfor (let i = 0; i < keyValues.length; ++i) {\n\t\tconst pair = keyValues[i].split('=');\n\t\tif (pair.length === 2) {\n\t\t\tparams[pair[0]] = pair[1];\n\t\t}\n\t}\n\tfmtpObj.params = params;\n\n\treturn fmtpObj;\n}\n\n// Generate an fmtp line from an object including 'pt' and 'params'.\nfunction writeFmtpLine(fmtpObj) {\n\tif (!fmtpObj.hasOwnProperty('pt') || !fmtpObj.hasOwnProperty('params')) {\n\t\treturn null;\n\t}\n\tconst pt = fmtpObj.pt;\n\tconst params = fmtpObj.params;\n\tconst keyValues = [];\n\tlet i = 0;\n\tfor (const key in params) {\n\t\tkeyValues[i] = key + '=' + params[key];\n\t\t++i;\n\t}\n\tif (i === 0) {\n\t\treturn null;\n\t}\n\treturn 'a=fmtp:' + pt.toString() + ' ' + keyValues.join(';');\n}\n\n// Find fmtp attribute for |codec| in |sdpLines|.\nfunction findFmtpLine(sdpLines, codec) {\n\t// Find payload of codec.\n\tconst payload = getCodecPayloadType(sdpLines, codec);\n\t// Find the payload in fmtp line.\n\treturn payload ? findLine(sdpLines, 'a=fmtp:' + payload.toString()) : null;\n}\n\n// Find the line in sdpLines that starts with |prefix|, and, if specified,\n// contains |substr| (case-insensitive search).\nfunction findLine(sdpLines, prefix, substr) {\n\treturn findLineInRange(sdpLines, 0, -1, prefix, substr);\n}\n\n// Find the line in sdpLines[startLine...endLine - 1] that starts with |prefix|\n// and, if specified, contains |substr| (case-insensitive search).\nfunction findLineInRange(sdpLines, startLine, endLine, prefix, substr) {\n\tconst realEndLine = endLine !== -1 ? endLine : sdpLines.length;\n\tfor (let i = startLine; i < realEndLine; ++i) {\n\t\tif (sdpLines[i].indexOf(prefix) === 0) {\n\t\t\tif (!substr || sdpLines[i].toLowerCase().indexOf(substr.toLowerCase()) !== -1) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\n\n// Gets the codec payload type from sdp lines.\nfunction getCodecPayloadType(sdpLines, codec) {\n\tconst index = findLine(sdpLines, 'a=rtpmap', codec);\n\treturn index ? getCodecPayloadTypeFromLine(sdpLines[index]) : null;\n}\n\n// Gets the codec payload type from an a=rtpmap:X line.\nfunction getCodecPayloadTypeFromLine(sdpLine) {\n\tconst pattern = new RegExp('a=rtpmap:(\\\\d+) [a-zA-Z0-9-]+\\\\/\\\\d+');\n\tconst result = sdpLine.match(pattern);\n\treturn result && result.length === 2 ? result[1] : null;\n}\n\n// Returns a new m= line with the specified codec as the first one.\nfunction setDefaultCodec(mLine, payload) {\n\tconst elements = mLine.split(' ');\n\n\t// Just copy the first three parameters; codec order starts on fourth.\n\tconst newLine = elements.slice(0, 3);\n\n\t// Put target payload first and copy in the rest.\n\tnewLine.push(payload);\n\tfor (let i = 3; i < elements.length; i++) {\n\t\tif (elements[i] !== payload) {\n\t\t\tnewLine.push(elements[i]);\n\t\t}\n\t}\n\treturn newLine.join(' ');\n}\n\n/* Below are newly added functions */\n\n// Following codecs will not be removed from SDP event they are not in the\n// user-specified codec list.\nconst audioCodecWhiteList = ['CN', 'telephone-event'];\nconst videoCodecWhiteList = ['red', 'ulpfec'];\n\n// Returns a new m= line with the specified codec order.\nfunction setCodecOrder(mLine, payloads) {\n\tconst elements = mLine.split(' ');\n\n\t// Just copy the first three parameters; codec order starts on fourth.\n\tlet newLine = elements.slice(0, 3);\n\n\t// Concat payload types.\n\tnewLine = newLine.concat(payloads);\n\n\treturn newLine.join(' ');\n}\n\n// Append RTX payloads for existing payloads.\nfunction appendRtxPayloads(sdpLines, payloads) {\n\tfor (const payload of payloads) {\n\t\tconst index = findLine(sdpLines, 'a=fmtp', 'apt=' + payload);\n\t\tif (index !== null) {\n\t\t\tconst fmtpLine = parseFmtpLine(sdpLines[index]);\n\t\t\tpayloads.push(fmtpLine.pt);\n\t\t}\n\t}\n\treturn payloads;\n}\n\n// Remove a codec with all its associated a lines.\nfunction removeCodecFramALine(sdpLines, payload) {\n\tconst pattern = new RegExp('a=(rtpmap|rtcp-fb|fmtp):' + payload + '\\\\s');\n\tfor (let i = sdpLines.length - 1; i > 0; i--) {\n\t\tif (sdpLines[i].match(pattern)) {\n\t\t\tsdpLines.splice(i, 1);\n\t\t}\n\t}\n\treturn sdpLines;\n}\n\n// Reorder codecs in m-line according the order of |codecs|. Remove codecs from\n// m-line if it is not present in |codecs|\n// The format of |codec| is 'NAME/RATE', e.g. 'opus/48000'.\nexport function reorderCodecs(sdp, type, codecs) {\n\tif (!codecs || codecs.length === 0) {\n\t\treturn sdp;\n\t}\n\n\tcodecs = type === 'audio' ? codecs.concat(audioCodecWhiteList) : codecs.concat(videoCodecWhiteList);\n\n\tlet sdpLines = sdp.split('\\r\\n');\n\n\t// Search for m line.\n\tconst mLineIndex = findLine(sdpLines, 'm=', type);\n\tif (mLineIndex === null) {\n\t\treturn sdp;\n\t}\n\n\tconst originPayloads = sdpLines[mLineIndex].split(' ');\n\toriginPayloads.splice(0, 3);\n\n\t// If the codec is available, set it as the default in m line.\n\tlet payloads = [];\n\tfor (const codec of codecs) {\n\t\tfor (let i = 0; i < sdpLines.length; i++) {\n\t\t\tconst index = findLineInRange(sdpLines, i, -1, 'a=rtpmap', codec);\n\t\t\tif (index !== null) {\n\t\t\t\tconst payload = getCodecPayloadTypeFromLine(sdpLines[index]);\n\t\t\t\tif (payload) {\n\t\t\t\t\tpayloads.push(payload);\n\t\t\t\t\ti = index;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tpayloads = appendRtxPayloads(sdpLines, payloads);\n\tsdpLines[mLineIndex] = setCodecOrder(sdpLines[mLineIndex], payloads);\n\n\t// Remove a lines.\n\tfor (const payload of originPayloads) {\n\t\tif (payloads.indexOf(payload) === -1) {\n\t\t\tsdpLines = removeCodecFramALine(sdpLines, payload);\n\t\t}\n\t}\n\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\nexport function setMinBitrate(sdp, encodingParametersList) {\n\tfor (const encodingParameters of encodingParametersList) {\n\t\tif (encodingParameters.minBitrate) {\n\t\t\tsdp = setCodecParam(sdp, encodingParameters.codec.name, 'x-google-min-bitrate', encodingParameters.minBitrate.toString());\n\t\t}\n\t}\n\treturn sdp;\n}\n\nexport function setMaxBitrate(sdp, encodingParametersList) {\n\tfor (const encodingParameters of encodingParametersList) {\n\t\tif (encodingParameters.maxBitrate) {\n\t\t\tsdp = setCodecParam(sdp, encodingParameters.codec.name, 'x-google-max-bitrate', encodingParameters.maxBitrate.toString());\n\t\t}\n\t}\n\treturn sdp;\n}\n\nexport function setStartBitrate(sdp, encodingParametersList) {\n\tfor (const encodingParameters of encodingParametersList) {\n\t\tif (encodingParameters.startBitrate) {\n\t\t\tsdp = setCodecParam(sdp, encodingParameters.codec.name, 'x-google-start-bitrate', encodingParameters.startBitrate.toString());\n\t\t}\n\t}\n\treturn sdp;\n}\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n// This file doesn't have public APIs.\n/* eslint-disable valid-jsdoc, max-classes-per-file, require-jsdoc */\n// eslint-disable-next-line no-redeclare\n/* global Event, Map, Promise, RTCIceCandidate */\nimport SocketEvents from 'constants/socket-events';\nimport { ConferenceErrorType, CallTypes } from 'constants/enums';\nimport { EventDispatcher, MessageEvent, OwtEvent } from '../base/event';\nimport { Publication } from '../base/publication';\nimport * as Utils from '../base/utils';\nimport * as ErrorModule from './error';\nimport * as StreamModule from '../base/stream';\nimport * as SdpUtils from '../base/sdputils';\n\n/**\n * @class P2PPeerConnectionChannelEvent\n * @desc Event for Stream.\n * @memberOf Owt.P2P\n * @private\n * */\nexport class P2PPeerConnectionChannelEvent extends Event {\n\t/* eslint-disable-next-line require-jsdoc */\n\tconstructor(init) {\n\t\tsuper(init);\n\t\tthis.stream = init.stream;\n\t}\n}\n\nconst DataChannelLabel = {\n\tMESSAGE: 'message',\n\tFILE: 'file',\n};\n\nconst sysInfo = Utils.sysInfo();\n\n/**\n * @class P2PPeerConnectionChannel\n * @desc A P2PPeerConnectionChannel handles all interactions between this endpoint and a remote endpoint.\n * @memberOf Owt.P2P\n * @private\n */\nclass P2PPeerConnectionChannel extends EventDispatcher {\n\t// |signaling| is an object has a method |sendSignalingMessage|.\n\t/* eslint-disable-next-line require-jsdoc */\n\tconstructor({ config, localId, remoteId, signaling, logger }) {\n\t\tsuper();\n\t\tthis._config = config;\n\t\tthis._localId = localId;\n\t\tthis._remoteId = remoteId;\n\t\tthis._signaling = signaling;\n\t\tthis._pc = null;\n\t\tthis._publishedStreams = new Map(); // Key is streams published, value is its publication.\n\t\tthis._pendingStreams = []; // Streams going to be added to PeerConnection.\n\t\tthis._publishingStreams = []; // Streams have been added to PeerConnection, but does not receive ack from remote side.\n\t\tthis._pendingUnpublishStreams = []; // Streams going to be removed.\n\t\tthis._myStreamInfo = [];\n\t\t// Key is MediaStream's ID, value is an object {source:{audio:string, video:string}, attributes: object, stream: RemoteStream, mediaStream: MediaStream}.\n\t\t// `stream` and `mediaStream` will be set when `track` event is fired on `RTCPeerConnection`.\n\t\t// `mediaStream` will be `null` after `streamadded` event is fired on `P2PClient`.\n\t\t// Other propertes will be set upon `STREAM_INFO` event from signaling channel.\n\t\tthis._remoteStreamInfo = new Map();\n\t\tthis._remoteStreams = [];\n\t\tthis._remoteTrackSourceInfo = new Map(); // Key is MediaStreamTrack's ID, value is source info.\n\t\tthis._publishPromises = new Map(); // Key is MediaStream's ID, value is an object has |resolve| and |reject|.\n\t\tthis._unpublishPromises = new Map(); // Key is MediaStream's ID, value is an object has |resolve| and |reject|.\n\t\tthis._publishingStreamTracks = new Map(); // Key is MediaStream's ID, value is an array of the ID of its MediaStreamTracks that haven't been acked.\n\t\tthis._publishedStreamTracks = new Map(); // Key is MediaStream's ID, value is an array of the ID of its MediaStreamTracks that haven't been removed.\n\t\tthis._isNegotiationNeeded = false;\n\t\tthis._remoteSideSupportsRemoveStream = true;\n\t\tthis._remoteSideSupportsPlanB = true;\n\t\tthis._remoteSideSupportsUnifiedPlan = true;\n\t\tthis._remoteIceCandidates = [];\n\t\tthis._dataChannels = new Map(); // Key is data channel's label, value is a RTCDataChannel.\n\t\tthis._pendingMessages = [];\n\t\tthis._dataSeq = 1; // Sequence number for data channel messages.\n\t\tthis._sendDataPromises = new Map(); // Key is data sequence number, value is an object has |resolve| and |reject|.\n\t\tthis._addedTrackIds = []; // Tracks that have been added after receiving remote SDP but before connection is established. Draining these messages when ICE connection state is connected.\n\t\tthis._isCaller = true;\n\t\tthis._infoSent = false;\n\t\tthis._disposed = false;\n\t\tthis.logger = logger;\n\t\tthis._createPeerConnection();\n\t\tthis.participantId = null;\n\t\tthis.conferenceId = null;\n\t\tthis.actioneeParticipantId = null;\n\t\tthis.helloDeviceId = null;\n\t\tthis._polite = true;\n\t\tthis._ignoredOffer = false;\n\t\tthis._offering = false;\n\t\tthis.offerInterval = null;\n\t\tthis.lastOffer = null;\n\t}\n\n\t/**\n\t * @function publishConferenceError\n\t * @desc Publish a conference error\n\t * @private\n\t */\n\tpublishConferenceError(message, method, errorType) {\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.ERROR, {\n\t\t\tmessage: message,\n\t\t\tactioneeParticipantId: this.actioneeParticipantId,\n\t\t\tparticipantId: this.participantId,\n\t\t\tconferenceId: this.conferenceId,\n\t\t\tpeerConnectionState: this._pc.iceConnectionState,\n\t\t\tmethod: method,\n\t\t\terrorType: errorType,\n\t\t});\n\t}\n\n\t/**\n\t * @function publish\n\t * @desc Publish a stream to the remote endpoint.\n\t * @private\n\t */\n\tpublish(stream, offer, reconnectingPublish) {\n\t\tthis.conferenceId = offer.conferenceId;\n\t\tthis.participantId = offer.participantId;\n\t\tthis.actioneeParticipantId = offer.actioneeParticipantId;\n\t\tthis.setMyStreamInfo(stream);\n\t\treturn new Promise(resolve => {\n\t\t\t// Replace |addStream| with PeerConnection.addTrack when all browsers are ready.\n\t\t\tlet senders = this._pc.getSenders();\n\t\t\tlet sendersId = senders.reduce((result, sender) => {\n\t\t\t\tif (sender.track != null) {\n\t\t\t\t\tresult.push(sender.track.id);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}, []);\n\n\t\t\tlet tracks = stream.mediaStream.getTracks();\n\n\t\t\tif (!reconnectingPublish && !tracks.length && (offer.callType === CallTypes.SECURITYCAM || offer.callType === CallTypes.MONITORING)) {\n\t\t\t\t// on monitoring / camera feed we need to notify the other part ex. hello\n\t\t\t\t// that we will recive RTP for both audio and video ...\n\t\t\t\tthis._pc.addTransceiver('audio', { direction: 'recvonly' });\n\t\t\t\tthis._pc.addTransceiver('video', { direction: 'recvonly' });\n\t\t\t}\n\n\t\t\tlet tracksId = tracks.map(track => track.id);\n\t\t\tif (sendersId.length < tracks.length) {\n\t\t\t\tconst reuseAudioTransceiver = this._pc.getTransceivers().find(t => t.mid === '0');\n\t\t\t\t// video would be always at position 1 or 2 (because the calls always start as audio first);\n\t\t\t\tconst reuseVideoTransceiver = this._pc.getTransceivers().find(t => (t.mid === '1' || t.mid === '2') && t.direction === 'recvonly');\n\t\t\t\ttracks.forEach(track => {\n\t\t\t\t\tif (!sendersId.includes(track.id)) {\n\t\t\t\t\t\tif (track.kind !== 'audio' && reuseVideoTransceiver) {\n\t\t\t\t\t\t\tthis.logger.debug(`Reusing ${track.kind} transceiver \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\t\t\t\t\t\treuseVideoTransceiver.direction = 'sendrecv';\n\t\t\t\t\t\t\treuseVideoTransceiver.sender.replaceTrack(track);\n\t\t\t\t\t\t} else if (track.kind === 'audio' && reuseAudioTransceiver) {\n\t\t\t\t\t\t\tthis.logger.debug(`Reusing ${track.kind} transceiver \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\t\t\t\t\t\treuseAudioTransceiver.direction = 'sendrecv';\n\t\t\t\t\t\t\treuseAudioTransceiver.sender.replaceTrack(track);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.logger.debug(`Adding track to peer connection... \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\t\t\t\t\t\tthis._pc.addTrack(track, stream.mediaStream);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (sendersId.length > tracks.length && !!sendersId.length) {\n\t\t\t\tsenders.forEach((sender, i) => {\n\t\t\t\t\tif (sender.track != null && !tracksId.includes(sender.track.id)) {\n\t\t\t\t\t\tthis._pc.removeTrack(senders[i]);\n\t\t\t\t\t\tsenders.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._onNegotiationneeded(offer).then(() => {\n\t\t\t\tresolve();\n\t\t\t});\n\t\t});\n\t}\n\n\t_getVideoTransceivers() {\n\t\treturn this._pc.getTransceivers().find(t => (t.mid === '1' || t.mid === '2') && t.sender.track != null && !t.sender.track.label.startsWith('screen'));\n\t}\n\n\t_setEncodingParmeters(transceiver, maxBitrate, maxFramerate) {\n\t\tconst rtcRtpSendParameters = transceiver.sender.getParameters();\n\t\tconst encodingParameterList = rtcRtpSendParameters.encodings.map(e => {\n\t\t\tif (e.active) {\n\t\t\t\te.maxBitrate = maxBitrate;\n\t\t\t\te.maxFramerate = maxFramerate;\n\t\t\t}\n\t\t\treturn e;\n\t\t});\n\t\trtcRtpSendParameters.encodings = encodingParameterList;\n\t\ttransceiver.sender.setParameters(rtcRtpSendParameters);\n\t}\n\n\t/**\n\t * @function send\n\t * @desc Send a message to the remote endpoint.\n\t * @private\n\t */\n\tsend(message, offer, wsEvent) {\n\t\tif (!(typeof message === 'string')) {\n\t\t\treturn Promise.reject(new TypeError('Invalid message.'));\n\t\t}\n\n\t\tif (offer) {\n\t\t\tthis.participantId = offer.participantId;\n\t\t\tthis.helloDeviceId = offer.helloDeviceId;\n\t\t}\n\t\tconst data = {\n\t\t\tid: this._dataSeq++,\n\t\t\tdata: message,\n\t\t};\n\t\tconst promise = new Promise((resolve, reject) => {\n\t\t\tthis._sendDataPromises.set(data.id, {\n\t\t\t\tresolve: resolve,\n\t\t\t\treject: reject,\n\t\t\t});\n\t\t});\n\t\tif (!this._dataChannels.has(DataChannelLabel.MESSAGE)) {\n\t\t\tthis._createDataChannel(DataChannelLabel.MESSAGE, offer, wsEvent);\n\t\t}\n\n\t\tthis._sendClosedMsgIfNecessary().catch(err => {\n\t\t\tthis.logger.debug(`Failed to send closed message. ${err.message}`);\n\t\t});\n\n\t\tthis._sendSysInfoIfNecessary().catch(err => {\n\t\t\tthis.logger.debug(`Failed to send sysInfo. ${err.message}`);\n\t\t});\n\n\t\tconst dc = this._dataChannels.get(DataChannelLabel.MESSAGE);\n\t\tif (dc.readyState === 'open') {\n\t\t\tthis._dataChannels.get(DataChannelLabel.MESSAGE).send(JSON.stringify(data));\n\t\t} else {\n\t\t\tthis._pendingMessages.push(data);\n\t\t}\n\t\treturn promise;\n\t}\n\n\t/**\n\t * @function stop\n\t * @desc Stop the connection with remote endpoint.\n\t * @private\n\t */\n\tstop() {\n\t\tthis._stop(undefined, true);\n\t}\n\n\t/**\n\t * @function getStats\n\t * @desc Get stats for a specific MediaStream.\n\t * @private\n\t */\n\tgetStats(mediaStream) {\n\t\tif (this._pc) {\n\t\t\tif (mediaStream === undefined) {\n\t\t\t\treturn this._pc.getStats();\n\t\t\t}\n\n\t\t\tconst tracksStatsReports = [];\n\t\t\treturn Promise.all([\n\t\t\t\tmediaStream.getTracks().forEach(track => {\n\t\t\t\t\tthis._getStats(track, tracksStatsReports);\n\t\t\t\t}),\n\t\t\t]).then(() => {\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tresolve(tracksStatsReports);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE));\n\t}\n\n\t_getStats(mediaStreamTrack, reportsResult) {\n\t\treturn this._pc.getStats(mediaStreamTrack).then(statsReport => {\n\t\t\treportsResult.push(statsReport);\n\t\t});\n\t}\n\n\t/**\n\t * @function onMessage\n\t * @desc This method is called by P2PClient when there is new signaling message arrived.\n\t * @private\n\t */\n\tonMessage(message) {\n\t\tthis._SignalingMesssageHandler(message);\n\t}\n\n\t_sendSdp(sdp, event) {\n\t\treturn this._signaling.sendSignalingMessage(event, sdp);\n\t}\n\n\t_sendSignalingMessage(type, message) {\n\t\treturn this._signaling.sendSignalingMessage(type, message);\n\t}\n\n\t_SignalingMesssageHandler(message) {\n\t\tif (message?.type !== SocketEvents.Conference.SDP) {\n\t\t\tthis.logger.debug(`Channel received message`, message);\n\t\t}\n\t\tswitch (message.type) {\n\t\t\tcase SocketEvents.Conference.UA:\n\t\t\t\tthis._handleRemoteCapability(message.data);\n\t\t\t\tthis._sendSysInfoIfNecessary();\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.ON_TRACK_SOURCES:\n\t\t\t\tthis._trackSourcesHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.ON_STREAM_INFO:\n\t\t\t\tthis._streamInfoHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.TRACKS_ADDED:\n\t\t\t\tthis._tracksAddedHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.TRACKS_REMOVED:\n\t\t\t\tthis._tracksRemovedHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.SDP:\n\t\t\t\tthis._sdpHandler(message.data, message.streamInfo);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.CLOSED:\n\t\t\t\tthis._chatClosedHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.logger.error(`Invalid signaling message received. Type: ${message.type}`);\n\t\t}\n\t}\n\n\t/**\n\t * @function _tracksAddedHandler\n\t * @desc Handle track added event from remote side.\n\t * @private\n\t */\n\t_tracksAddedHandler(ids) {\n\t\t// Currently, |ids| contains all track IDs of a MediaStream. Following algorithm also handles |ids| is a part of a MediaStream's tracks.\n\t\tids.forEach(id => {\n\t\t\t// It could be a problem if there is a track published with different MediaStreams.\n\t\t\tthis._publishingStreamTracks.forEach((mediaTrackIds, mediaStreamId) => {\n\t\t\t\tfor (let i = 0; i < mediaTrackIds.length; i += 1) {\n\t\t\t\t\tif (mediaTrackIds[i] === id) {\n\t\t\t\t\t\t// Move this track from publishing tracks to published tracks.\n\t\t\t\t\t\tif (!this._publishedStreamTracks.has(mediaStreamId)) {\n\t\t\t\t\t\t\tthis._publishedStreamTracks.set(mediaStreamId, []);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._publishedStreamTracks.get(mediaStreamId).push(mediaTrackIds[i]);\n\t\t\t\t\t\tmediaTrackIds.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t\t// Resolving certain publish promise when remote endpoint received all tracks of a MediaStream.\n\t\t\t\t\tif (mediaTrackIds.length === 0) {\n\t\t\t\t\t\tif (!this._publishPromises.has(mediaStreamId)) {\n\t\t\t\t\t\t\tthis.logger.warn(`Cannot find the promise for publishing ${mediaStreamId}`);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst targetStreamIndex = this._publishingStreams.findIndex(element => element.mediaStream.id === mediaStreamId);\n\t\t\t\t\t\tconst targetStream = this._publishingStreams[targetStreamIndex];\n\t\t\t\t\t\tthis._publishingStreams.splice(targetStreamIndex, 1);\n\t\t\t\t\t\tconst publication = new Publication(\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tthis._unpublish(targetStream).then(\n\t\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\t\tpublication.dispatchEvent(new OwtEvent('ended'));\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\terr => {\n\t\t\t\t\t\t\t\t\t\t// Use debug mode because this error usually doesn't block stopping a publication.\n\t\t\t\t\t\t\t\t\t\tthis.logger.debug(`Something wrong happened during stopping a publication. ${err.message}`);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tif (!targetStream || !targetStream.mediaStream) {\n\t\t\t\t\t\t\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE, 'Publication is not available.'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn this.getStats(targetStream.mediaStream);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis._publishedStreams.set(targetStream, publication);\n\t\t\t\t\t\tthis._publishPromises.get(mediaStreamId).resolve(publication);\n\t\t\t\t\t\tthis._publishPromises.delete(mediaStreamId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * @function _tracksRemovedHandler\n\t * @desc Handle track removed event from remote side.\n\t * @private\n\t */\n\t_tracksRemovedHandler(ids) {\n\t\t// Currently, |ids| contains all track IDs of a MediaStream. Following algorithm also handles |ids| is a part of a MediaStream's tracks.\n\t\tids.forEach(id => {\n\t\t\t// It could be a problem if there is a track published with different MediaStreams.\n\t\t\tthis._publishedStreamTracks.forEach((mediaTrackIds, mediaStreamId) => {\n\t\t\t\tfor (let i = 0; i < mediaTrackIds.length; i += 1) {\n\t\t\t\t\tif (mediaTrackIds[i] === id) {\n\t\t\t\t\t\tmediaTrackIds.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * @function _dataReceivedHandler\n\t * @desc Handle data received event from remote side.\n\t * @private\n\t */\n\t_dataReceivedHandler(id) {\n\t\tif (!this._sendDataPromises.has(id)) {\n\t\t\tthis.logger.warn(`Received unknown data received message. ID: ${id}`);\n\t\t} else {\n\t\t\tthis._sendDataPromises.get(id).resolve();\n\t\t}\n\t}\n\n\t/**\n\t * @function _sdpHandler\n\t * @desc Handle SDP received event from remote side.\n\t * @private\n\t */\n\t_sdpHandler(sdp, streamInfo) {\n\t\tif (sdp.type === 'offer') {\n\t\t\tthis._streamInfoHandler(streamInfo);\n\t\t\tthis._onOffer(sdp);\n\t\t} else if (sdp.type === 'answer') {\n\t\t\tthis._streamInfoHandler(streamInfo);\n\t\t\tthis._onAnswer(sdp);\n\t\t} else if (sdp.type === 'candidate') {\n\t\t\tthis._onRemoteIceCandidate(sdp);\n\t\t}\n\t}\n\n\t/**\n\t * @function _trackSourcesHandler\n\t * @desc Received track source information from remote side.\n\t * @private\n\t */\n\t_trackSourcesHandler(data) {\n\t\tdata.forEach(info => {\n\t\t\tthis._remoteTrackSourceInfo.set(info.id, info.source);\n\t\t});\n\t}\n\n\t/**\n\t * @function _streamInfoHandler\n\t * @desc Received stream information from remote side.\n\t * @private\n\t */\n\t_streamInfoHandler(data) {\n\t\tif (!data) {\n\t\t\tthis.logger.warn('Unexpected stream info', data);\n\t\t\treturn;\n\t\t}\n\t\tthis._remoteStreamInfo.set(data.id, {\n\t\t\tsource: data.source,\n\t\t\tattributes: data.attributes,\n\t\t\tstream: null,\n\t\t\tmediaStream: null,\n\t\t\ttrackIds: data.tracks, // Track IDs may not match at sender and receiver sides. Keep it for legacy porposes.\n\t\t});\n\t}\n\n\t/**\n\t * @function _chatClosedHandler\n\t * @desc Received chat closed event from remote side.\n\t * @private\n\t */\n\t_chatClosedHandler(data) {\n\t\tthis._disposed = true;\n\t\tthis._stop(data, false);\n\t}\n\n\t_onOffer(sdp) {\n\t\tthis.logger.debug(`About to set remote description. Signaling state: ${this._pc.signalingState} \\nactioneeParticipantId ${this.actioneeParticipantId}`, {\n\t\t\tsdp,\n\t\t});\n\t\tsdp.sdp = this._setRtpSenderOptions(sdp.sdp, this._config);\n\t\t// Firefox only has one codec in answer, which does not truly reflect its\n\t\t// decoding capability. So we set codec preference to remote offer, and let\n\t\t// Firefox choose its preferred codec.\n\t\t// Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=814227.\n\t\tif (Utils.isFirefox()) {\n\t\t\tsdp.sdp = this._setCodecOrder(sdp.sdp);\n\t\t}\n\t\tconst sessionDescription = new RTCSessionDescription(sdp);\n\t\tconst collision = this._pc.signalingState !== 'stable' || this._offering;\n\t\tthis._ignoredOffer = !this._polite && collision;\n\t\tif (this._ignoredOffer) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pc.setRemoteDescription(sessionDescription).then(\n\t\t\t() => {\n\t\t\t\tthis._createAndSendAnswer();\n\t\t\t\tthis.dispatchEvent(new OwtEvent('remoteDescriptionSet'));\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tthis.logger.error(`Set remote description failed. Message: ${error.message} \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tthis.publishConferenceError(error.message, 'setRemoteDescription -> _onOffer', ConferenceErrorType.MEDIA_SOURCE_ERROR);\n\t\t\t\tthis._stop(error, true);\n\t\t\t}\n\t\t);\n\t}\n\n\t_onAnswer(sdp) {\n\t\tif (this._pc.signalingState !== 'have-local-offer') {\n\t\t\treturn;\n\t\t}\n\t\tthis.logger.debug(`About to set remote description. Signaling state: ${this._pc.signalingState} \\nactioneeParticipantId ${this.actioneeParticipantId}`, {\n\t\t\tsdp,\n\t\t});\n\t\tsdp.sdp = this._setRtpSenderOptions(sdp.sdp, this._config);\n\t\tconst sessionDescription = new RTCSessionDescription(sdp);\n\t\tthis._pc.setRemoteDescription(new RTCSessionDescription(sessionDescription)).then(\n\t\t\t() => {\n\t\t\t\tthis._drainPendingMessages();\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tthis.logger.error(`Set remote description failed. Message: ${error.message} \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tthis.publishConferenceError(error.message, 'setRemoteDescription -> _onAnswer', ConferenceErrorType.MEDIA_SOURCE_ERROR);\n\t\t\t\tthis._stop(error, true);\n\t\t\t}\n\t\t);\n\t}\n\n\t_onLocalIceCandidate(event) {\n\t\tif (event.candidate) {\n\t\t\tlet data = {\n\t\t\t\tparticipantId: this.participantId,\n\t\t\t\tactioneeParticipantId: this.actioneeParticipantId,\n\t\t\t\tconferenceId: this.conferenceId,\n\t\t\t\tcandidate: {\n\t\t\t\t\tsdp: event.candidate.candidate,\n\t\t\t\t\tsdpMid: event.candidate.sdpMid,\n\t\t\t\t\tsdpMLineIndex: event.candidate.sdpMLineIndex,\n\t\t\t\t},\n\t\t\t};\n\t\t\tlet eventType = SocketEvents.Conference.SEND_ICE_CANDIDATE;\n\n\t\t\tthis._sendSdp(data, eventType).catch(e => {\n\t\t\t\tthis.publishConferenceError(e.message, '_onLocalIceCandidate', ConferenceErrorType.NEGOTIATION_FAILURE);\n\t\t\t\tthis.logger.error(`Failed to send candidate \\nactioneeParticipantId ${this.actioneeParticipantId}`, { data });\n\t\t\t});\n\t\t}\n\t}\n\n\t_onRemoteTrackAdded(event) {\n\t\tthis.logger.debug(`Remote track added \\nactioneeParticipantId ${this.actioneeParticipantId}`, { streams: event?.streams });\n\t\tevent.streams.forEach(stream => {\n\t\t\tif (!this._remoteStreamInfo.has(stream.id)) {\n\t\t\t\tthis.logger.warn('Missing stream info.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._remoteStreamInfo.get(stream.id).stream) {\n\t\t\t\tthis._setStreamToRemoteStreamInfo(stream);\n\t\t\t}\n\t\t});\n\t\tif (this._pc.iceConnectionState === 'connected' || this._pc.iceConnectionState === 'completed') {\n\t\t\tthis._checkIceConnectionStateAndFireEvent();\n\t\t} else {\n\t\t\tthis._addedTrackIds.concat(event.track.id);\n\t\t}\n\t}\n\n\t_onRemoteStreamAdded(event) {\n\t\tthis.logger.debug(`Remote stream added \\nactioneeParticipantId ${this.actioneeParticipantId}`, { streams: event?.streams });\n\t\tif (!this._remoteStreamInfo.has(event.stream.id)) {\n\t\t\tthis.logger.warn(`Cannot find source info for stream ${event.stream.id} \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\treturn;\n\t\t}\n\t\tif (this._pc.iceConnectionState === 'connected' || this._pc.iceConnectionState === 'completed') {\n\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACKS_ADDED, this._remoteStreamInfo.get(event.stream.id).trackIds);\n\t\t} else {\n\t\t\tthis._addedTrackIds = this._addedTrackIds.concat(this._remoteStreamInfo.get(event.stream.id).trackIds);\n\t\t}\n\t\tconst audioTrackSource = this._remoteStreamInfo.get(event.stream.id).source.audio;\n\t\tconst videoTrackSource = this._remoteStreamInfo.get(event.stream.id).source.video;\n\t\tconst sourceInfo = new StreamModule.StreamSourceInfo(audioTrackSource, videoTrackSource);\n\t\tif (Utils.isSafari()) {\n\t\t\tif (!sourceInfo.audio) {\n\t\t\t\tevent.stream.getAudioTracks().forEach(track => {\n\t\t\t\t\tevent.stream.removeTrack(track);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!sourceInfo.video) {\n\t\t\t\tevent.stream.getVideoTracks().forEach(track => {\n\t\t\t\t\tevent.stream.removeTrack(track);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst { attributes } = this._remoteStreamInfo.get(event.stream.id);\n\t\tconst stream = new StreamModule.RemoteStream(undefined, this._remoteId, event.stream, sourceInfo, attributes);\n\t\tif (stream) {\n\t\t\tthis._remoteStreams.push(stream);\n\t\t\tconst streamEvent = new StreamModule.StreamEvent('streamadded', {\n\t\t\t\tstream: stream,\n\t\t\t});\n\t\t\tthis.dispatchEvent(streamEvent);\n\t\t}\n\t}\n\n\t_onRemoteStreamRemoved(event) {\n\t\tthis.logger.debug(`Remote stream removed \\nactioneeParticipantId ${this.actioneeParticipantId}`, { streams: event?.streams });\n\t\tconst i = this._remoteStreams.findIndex(s => {\n\t\t\treturn s.mediaStream.id === event.stream.id;\n\t\t});\n\t\tif (i !== -1) {\n\t\t\tconst stream = this._remoteStreams[i];\n\t\t\tthis._streamRemoved(stream);\n\t\t\tthis._remoteStreams.splice(i, 1);\n\t\t}\n\t}\n\n\t_onNegotiationneeded(offer, wsEvent) {\n\t\t// This is intented to be executed when onnegotiationneeded event is fired.\n\t\t// However, onnegotiationneeded may fire mutiple times when more than one\n\t\t// track is added/removed. So we manually execute this function after\n\t\t// adding/removing track and creating data channel.\n\t\tthis.logger.debug(`On negotiation needed \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\treturn this._doNegotiate(offer, wsEvent);\n\t}\n\n\t_onRemoteIceCandidate(candidateInfo) {\n\t\tconst candidate = new RTCIceCandidate({\n\t\t\tcandidate: candidateInfo.candidate,\n\t\t\tsdpMid: candidateInfo.sdpMid,\n\t\t\tsdpMLineIndex: candidateInfo.sdpMLineIndex,\n\t\t});\n\n\t\tif (this._pc.remoteDescription && this._pc.remoteDescription.sdp !== '') {\n\t\t\tthis._pc.addIceCandidate(candidate).catch(error => {\n\t\t\t\tthis.logger.error(`Error processing remote ICE candidate: ${error.message} \\nactioneeParticipantId ${this.actioneeParticipantId}`, { candidate });\n\t\t\t\tthis.publishConferenceError(\n\t\t\t\t\t`${error.message}, state: ${this._pc.signalingState}, ice: ${candidate.candidate}`,\n\t\t\t\t\t'onAddIceCandidate -> _onRemoteIceCandidate',\n\t\t\t\t\tConferenceErrorType.ICE_CONNECTION_FAILURE\n\t\t\t\t);\n\t\t\t\tif (!this._ignoredOffer) throw error;\n\t\t\t});\n\t\t} else {\n\t\t\tthis._remoteIceCandidates.push(candidate);\n\t\t}\n\t}\n\n\t_onSignalingStateChange(event) {\n\t\tthis.logger.debug(`Signaling state changed \"${event.currentTarget.signalingState}\" \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tif (this._pc.signalingState === 'closed') {\n\t\t\tclearInterval(this.offerInterval);\n\t\t\tthis.lastOffer = null;\n\t\t\t// stopChatLocally(peer, peer.id);\n\t\t} else if (this._pc.signalingState === 'stable') {\n\t\t\tclearInterval(this.offerInterval);\n\t\t\tthis.lastOffer = null;\n\t\t\tthis._negotiating = false;\n\t\t\tif (this._isNegotiationNeeded) {\n\t\t\t\tthis._onNegotiationneeded();\n\t\t\t} else {\n\t\t\t\tthis._drainPendingStreams();\n\t\t\t\tthis._drainPendingMessages();\n\t\t\t}\n\t\t} else if (this._pc.signalingState === 'have-remote-offer') {\n\t\t\tthis._drainPendingRemoteIceCandidates();\n\t\t} else if (this._pc.signalingState === 'have-local-offer') {\n\t\t\tthis.offerInterval = setInterval(() => {\n\t\t\t\tconst { connectionState } = this._pc;\n\n\t\t\t\tif (connectionState === 'closed') {\n\t\t\t\t\tclearInterval(this.offerInterval);\n\t\t\t\t}\n\n\t\t\t\tthis._sendSdp(this.lastOffer, SocketEvents.Conference.SEND_OFFER);\n\t\t\t}, 5000);\n\t\t}\n\t}\n\n\t_onIceConnectionStateChange(event) {\n\t\tthis.logger.debug(`Ice connection state changed \"${event.currentTarget.iceConnectionState}\" \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.ICE_CONNECTION_STATE_CHANGED, {\n\t\t\tconferenceId: this.conferenceId,\n\t\t\tparticipantId: this.participantId,\n\t\t\tactioneeParticipantId: this.actioneeParticipantId,\n\t\t\tstate: event.currentTarget.iceConnectionState,\n\t\t\tpeerConnection: this._pc,\n\t\t});\n\n\t\tif (event.currentTarget.iceConnectionState === 'closed' || event.currentTarget.iceConnectionState === 'failed') {\n\t\t\tconst error = new ErrorModule.P2PError(ErrorModule.errors.P2P_WEBRTC_UNKNOWN, 'ICE connection failed or closed.');\n\t\t\tthis._stop(error, true);\n\t\t} else if (event.currentTarget.iceConnectionState === 'connected' || event.currentTarget.iceConnectionState === 'completed') {\n\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACKS_ADDED, this._addedTrackIds);\n\t\t\tthis._addedTrackIds = [];\n\t\t\tthis._checkIceConnectionStateAndFireEvent();\n\t\t}\n\t}\n\n\t_onIceGatheringStateChange(event) {\n\t\tthis.logger.debug(`Ice Gathering state changed \"${event.currentTarget.iceGatheringState}\" \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.ICE_GATHERING_STATE_CHANGED, {\n\t\t\tconferenceId: this.conferenceId,\n\t\t\tparticipantId: this.participantId,\n\t\t\tactioneeParticipantId: this.actioneeParticipantId,\n\t\t\tstate: event.currentTarget.iceGatheringState,\n\t\t\tpeerConnection: this._pc,\n\t\t});\n\t}\n\n\t_onDataChannelMessage(event) {\n\t\tconst message = JSON.parse(event.data);\n\t\tthis.logger.debug(`Data channel message received ${message.data}`);\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.DATA_RECEIVED, message.id);\n\t\tconst messageEvent = new MessageEvent('messagereceived', {\n\t\t\tmessage: message.data,\n\t\t\torigin: this._remoteId,\n\t\t});\n\t\tthis.dispatchEvent(messageEvent);\n\t}\n\n\t_onDataChannelOpen(event) {\n\t\tthis.logger.debug('Data Channel is opened.');\n\t\tif (event.target.label === DataChannelLabel.MESSAGE) {\n\t\t\tthis.logger.debug('Data channel for messages is opened.');\n\t\t\tthis._drainPendingMessages();\n\t\t}\n\t}\n\n\t_onDataChannelClose(event) {\n\t\tthis.logger.debug('Data Channel is closed.');\n\t}\n\n\t_streamRemoved(stream) {\n\t\tif (!this._remoteStreamInfo.has(stream.mediaStream.id)) {\n\t\t\tthis.logger.warn('Cannot find stream info', { stream });\n\t\t}\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACKS_REMOVED, this._remoteStreamInfo.get(stream.mediaStream.id).trackIds);\n\t\tconst event = new OwtEvent('ended');\n\t\tstream.dispatchEvent(event);\n\t}\n\n\t_isUnifiedPlan() {\n\t\tif (Utils.isFirefox() && Utils.isChrome()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t_createPeerConnection() {\n\t\tthis.logger.debug(`Creating new peer connection \\nactioneeParticipantId ${this._remoteId}`);\n\t\tconst pcConfiguration = this._config.rtcConfiguration || {};\n\t\tif (Utils.isChrome()) {\n\t\t\tpcConfiguration.sdpSemantics = 'unified-plan';\n\t\t}\n\t\tthis._pc = new RTCPeerConnection(pcConfiguration);\n\n\t\tthis.logger.debug(`Signaling state: ${this._pc.signalingState} \\nactioneeParticipantId ${this._remoteId}`);\n\t\tthis.logger.debug(`Connection state: ${this._pc.connectionState} \\nactioneeParticipantId ${this._remoteId}`);\n\t\tthis.logger.debug(`Ice connection state: ${this._pc.iceConnectionState} \\nactioneeParticipantId ${this._remoteId}`);\n\t\tthis.logger.debug(`Ice gathering state: ${this._pc.iceGatheringState} \\nactioneeParticipantId ${this._remoteId}`);\n\n\t\t// Firefox 59 implemented addTransceiver. However, mid in SDP will differ from track's ID in this case. And transceiver's mid is null.\n\t\tif (typeof this._pc.addTransceiver === 'function' && Utils.isSafari()) {\n\t\t\tthis._pc.addTransceiver('audio');\n\t\t\tthis._pc.addTransceiver('video');\n\t\t}\n\n\t\tthis._pc.ontrack = event => {\n\t\t\tthis._onRemoteTrackAdded.apply(this, [event]);\n\t\t};\n\t\tthis._pc.onicecandidate = event => {\n\t\t\tthis._onLocalIceCandidate.apply(this, [event]);\n\t\t};\n\t\tthis._pc.ondatachannel = event => {\n\t\t\tthis.logger.debug('On data channel.');\n\t\t\t// Save remote created data channel.\n\t\t\tif (!this._dataChannels.has(event.channel.label)) {\n\t\t\t\tthis._dataChannels.set(event.channel.label, event.channel);\n\t\t\t\tthis.logger.debug('Save remote created data channel.');\n\t\t\t}\n\t\t\tthis._bindEventsToDataChannel(event.channel);\n\t\t};\n\t\tthis._pc.onsignalingstatechange = event => {\n\t\t\tthis._onSignalingStateChange.apply(this, [event]);\n\t\t};\n\t\tthis._pc.oniceconnectionstatechange = event => {\n\t\t\tthis._onIceConnectionStateChange.apply(this, [event]);\n\t\t};\n\t\tthis._pc.onicegatheringstatechange = event => {\n\t\t\tthis._onIceGatheringStateChange.apply(this, [event]);\n\t\t};\n\t}\n\n\t_drainPendingStreams() {\n\t\tlet negotiationNeeded = false;\n\t\tthis.logger.debug(`Draining pending streams \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tif (this._pc && (this._pc.signalingState === 'stable' || this._pc.signalingState === 'have-remote-offer')) {\n\t\t\tthis.logger.debug(`Peer connection is ready for draining pending streams \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\tfor (let i = 0; i < this._pendingStreams.length; i += 1) {\n\t\t\t\tconst stream = this._pendingStreams[i];\n\t\t\t\t// OnNegotiationNeeded event will be triggered immediately after adding stream to PeerConnection in Firefox.\n\t\t\t\t// And OnNegotiationNeeded handler will execute drainPendingStreams. To avoid add the same stream multiple times,\n\t\t\t\t// shift it from pending stream list before adding it to PeerConnection.\n\t\t\t\tthis._pendingStreams.shift();\n\t\t\t\tif (!stream.mediaStream) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstream.mediaStream.getTracks().forEach(track => {\n\t\t\t\t\tthis._pc.addTrack(track, stream.mediaStream);\n\t\t\t\t\tif (this._pc.signalingState !== 'have-remote-offer') {\n\t\t\t\t\t\tnegotiationNeeded = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.logger.debug(`Added stream to peer connection \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tthis._publishingStreams.push(stream);\n\t\t\t}\n\t\t\tthis._pendingStreams.length = 0;\n\t\t\tfor (let j = 0; j < this._pendingUnpublishStreams.length; j += 1) {\n\t\t\t\tif (!this._pendingUnpublishStreams[j].mediaStream) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthis._pc.removeStream(this._pendingUnpublishStreams[j].mediaStream);\n\t\t\t\tif (this._pc.signalingState !== 'have-remote-offer') {\n\t\t\t\t\tnegotiationNeeded = true;\n\t\t\t\t}\n\t\t\t\tthis._unpublishPromises.get(this._pendingUnpublishStreams[j].mediaStream.id).resolve();\n\t\t\t\tthis._publishedStreams.delete(this._pendingUnpublishStreams[j]);\n\t\t\t\tthis.logger.debug(`Remove stream \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t}\n\t\t\tthis._pendingUnpublishStreams.length = 0;\n\t\t}\n\t\tif (negotiationNeeded) {\n\t\t\tthis._onNegotiationneeded();\n\t\t}\n\t}\n\n\t_drainPendingRemoteIceCandidates() {\n\t\tfor (let i = 0; i < this._remoteIceCandidates.length; i += 1) {\n\t\t\tthis.logger.debug(`Draining pending remote ice candidates \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\tthis._pc.addIceCandidate(this._remoteIceCandidates[i]).catch(error => {\n\t\t\t\tthis.logger.warn(`Error processing ICE candidate: ${error} \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t});\n\t\t}\n\t\tthis._remoteIceCandidates.length = 0;\n\t}\n\n\t_drainPendingMessages() {\n\t\tthis.logger.debug(`Draining pending messages \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tif (this._pendingMessages.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst dc = this._dataChannels.get(DataChannelLabel.MESSAGE);\n\t\tif (dc && dc.readyState === 'open') {\n\t\t\tfor (let i = 0; i < this._pendingMessages.length; i += 1) {\n\t\t\t\tthis.logger.debug(`Sending message via data channel: ${this._pendingMessages[i]}`);\n\t\t\t\tdc.send(JSON.stringify(this._pendingMessages[i]));\n\t\t\t}\n\t\t\tthis._pendingMessages.length = 0;\n\t\t} else if (this._pc && !dc) {\n\t\t\tthis._createDataChannel(DataChannelLabel.MESSAGE);\n\t\t}\n\t}\n\n\t_sendStreamInfo(stream, data) {\n\t\tif (!stream || !stream.mediaStream) {\n\t\t\treturn new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_ILLEGAL_ARGUMENT);\n\t\t}\n\t\tconst info = [];\n\t\tstream.mediaStream.getTracks().forEach(track => {\n\t\t\tinfo.push({\n\t\t\t\tid: track.id,\n\t\t\t\tsource: stream.source[track.kind],\n\t\t\t});\n\t\t});\n\n\t\tlet trackInfoData = {\n\t\t\tdata: info,\n\t\t\ttype: SocketEvents.Conference.ON_TRACK_SOURCES,\n\t\t\tparticipantId: data.participantId,\n\t\t\tconferenceId: data.conferenceId,\n\t\t};\n\n\t\tlet streamInfoData = {\n\t\t\tdata: {\n\t\t\t\tid: stream.mediaStream.id,\n\t\t\t\tsource: stream.source,\n\t\t\t\ttracks: Array.from(info, item => item.id),\n\t\t\t},\n\t\t\ttype: SocketEvents.Conference.ON_STREAM_INFO,\n\t\t\tparticipantId: data.participantId,\n\t\t\tconferenceId: data.conferenceId,\n\t\t};\n\t\treturn Promise.all([\n\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACK_SOURCES, trackInfoData),\n\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.STREAM_INFO, streamInfoData),\n\t\t]);\n\t}\n\n\t_createStreamInfo(stream) {\n\t\tif (!stream || !stream.mediaStream) {\n\t\t\tthis.logger.error('Error while creating the stream info!', { stream });\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst tracks = stream.mediaStream.getTracks();\n\t\tconst streamInfoData = {\n\t\t\tid: stream.mediaStream.id,\n\t\t\tsource: stream.source,\n\t\t\ttracks: Array.from(tracks, item => item.id),\n\t\t};\n\t\treturn streamInfoData;\n\t}\n\n\t_sendSysInfoIfNecessary() {\n\t\tif (this._infoSent) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\t\tthis._infoSent = true;\n\t\treturn this._sendSignalingMessage(SocketEvents.Conference.UA, sysInfo);\n\t}\n\n\t_sendClosedMsgIfNecessary() {\n\t\tif (this._pc.remoteDescription === null || this._pc.remoteDescription.sdp === '') {\n\t\t\treturn this._sendSignalingMessage(SocketEvents.Conference.CLOSED);\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\n\t_handleRemoteCapability(ua) {\n\t\tif (ua.sdk && ua.sdk && ua.sdk.type === 'JavaScript' && ua.runtime && ua.runtime.name === 'Firefox') {\n\t\t\tthis._remoteSideSupportsRemoveStream = false;\n\t\t\tthis._remoteSideSupportsPlanB = false;\n\t\t\tthis._remoteSideSupportsUnifiedPlan = true;\n\t\t} else {\n\t\t\t// Remote side is iOS/Android/C++ which uses Google's WebRTC stack.\n\t\t\tthis._remoteSideSupportsRemoveStream = true;\n\t\t\tthis._remoteSideSupportsPlanB = true;\n\t\t\tthis._remoteSideSupportsUnifiedPlan = false;\n\t\t}\n\t}\n\n\t_doNegotiate(offer, wsEvent) {\n\t\treturn this._createAndSendOffer(offer, wsEvent);\n\t}\n\n\t_setCodecOrder(sdp) {\n\t\tif (this._config.audioEncoding) {\n\t\t\tconst audioCodecNames = Array.from(this._config.audioEncoding, encodingParameters => encodingParameters.codec.name);\n\t\t\tsdp = SdpUtils.reorderCodecs(sdp, 'audio', audioCodecNames);\n\t\t}\n\t\tif (this._config.videoEncoding) {\n\t\t\tconst videoCodecNames = Array.from(this._config.videoEncoding, encodingParameters => encodingParameters.codec.name);\n\t\t\tsdp = SdpUtils.reorderCodecs(sdp, 'video', videoCodecNames);\n\t\t}\n\t\treturn sdp;\n\t}\n\n\t_setMinBitrate(sdp, options) {\n\t\tif (typeof options.videoEncoding === 'object') {\n\t\t\tsdp = SdpUtils.setMinBitrate(sdp, options.videoEncoding);\n\t\t}\n\t\treturn sdp;\n\t}\n\n\t_setMaxBitrate(sdp, options) {\n\t\tif (typeof options.audioEncoding === 'object') {\n\t\t\tsdp = SdpUtils.setMaxBitrate(sdp, options.audioEncodings);\n\t\t}\n\t\tif (typeof options.videoEncoding === 'object') {\n\t\t\tsdp = SdpUtils.setMaxBitrate(sdp, options.videoEncoding);\n\t\t}\n\t\treturn sdp;\n\t}\n\n\t_setStartBitrate(sdp, options) {\n\t\tif (typeof options.videoEncoding === 'object') {\n\t\t\tsdp = SdpUtils.setStartBitrate(sdp, options.videoEncoding);\n\t\t}\n\t\treturn sdp;\n\t}\n\n\t_setRtpSenderOptions(sdp, options) {\n\t\tsdp = this._setMinBitrate(sdp, options);\n\t\tsdp = this._setMaxBitrate(sdp, options);\n\t\tsdp = this._setStartBitrate(sdp, options);\n\t\treturn sdp;\n\t}\n\n\t_setRtpReceiverOptions(sdp) {\n\t\tsdp = this._setCodecOrder(sdp);\n\t\treturn sdp;\n\t}\n\n\t_createAndSendOffer(offer, wsEvent) {\n\t\tif (!this._pc) {\n\t\t\tthis.logger.error(`Peer connection has not been created \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\t\treturn undefined;\n\t\t}\n\t\tconst newOffer = { ...offer };\n\t\tthis._isNegotiationNeeded = false;\n\t\tthis._isCaller = true;\n\t\tconst iceRestart = newOffer.iceRestart || false;\n\t\tdelete newOffer.iceRestart;\n\t\tlet localDesc;\n\t\treturn this._pc\n\t\t\t.createOffer({\n\t\t\t\ticeRestart,\n\t\t\t})\n\t\t\t.then(desc => {\n\t\t\t\tdesc.sdp = this._setRtpReceiverOptions(desc.sdp);\n\t\t\t\tlocalDesc = desc;\n\t\t\t\tif (this._pc.signalingState === 'stable') {\n\t\t\t\t\tthis._offering = true;\n\t\t\t\t\treturn this._pc\n\t\t\t\t\t\t.setLocalDescription(desc)\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\tconst streamInfo = this._myStreamInfo.pop();\n\t\t\t\t\t\t\tObject.assign(newOffer, streamInfo && { streamInfo });\n\t\t\t\t\t\t\tObject.assign(newOffer, { sdp: localDesc });\n\n\t\t\t\t\t\t\tthis.lastOffer = { ...newOffer };\n\n\t\t\t\t\t\t\tthis._sendSdp(newOffer, wsEvent || SocketEvents.Conference.SEND_OFFER);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\t\tthis._offering = false;\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconst ignore = this._pc.signalingState === 'have-local-offer';\n\t\t\t\tthis.logger.error(`${e.message} Please check your codec settings \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tconst error = new ErrorModule.P2PError(ErrorModule.errors.P2P_WEBRTC_SDP, e.message);\n\t\t\t\tthis.publishConferenceError(`${e.message}, ignored: ${ignore}`, '_createAndSendOffer', ConferenceErrorType.SDP_GENERATION_ERROR);\n\t\t\t\tif (ignore) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._stop(error, true);\n\t\t\t});\n\t}\n\n\t_createAndSendAnswer() {\n\t\tthis._drainPendingStreams();\n\t\tthis._isNegotiationNeeded = false;\n\t\tthis._isCaller = false;\n\t\tlet localDesc;\n\t\tthis._pc\n\t\t\t.createAnswer()\n\t\t\t.then(desc => {\n\t\t\t\tdesc.sdp = this._setRtpReceiverOptions(desc.sdp);\n\t\t\t\tlocalDesc = desc;\n\t\t\t\tthis._logCurrentAndPendingLocalDescription();\n\t\t\t\treturn this._pc.setLocalDescription(desc);\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\tconst { participantId, conferenceId, actioneeParticipantId } = this;\n\t\t\t\tconst answerPayload = {\n\t\t\t\t\tparticipantId,\n\t\t\t\t\tconferenceId,\n\t\t\t\t\tactioneeParticipantId,\n\t\t\t\t\tsdp: localDesc,\n\t\t\t\t};\n\t\t\t\tconst streamInfo = this._myStreamInfo.pop();\n\t\t\t\tObject.assign(answerPayload, streamInfo && { streamInfo });\n\t\t\t\treturn this._sendSdp(answerPayload, SocketEvents.Conference.SEND_ANSWER);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tthis.logger.error(`${e.message} Please check your codec settings \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tconst error = new ErrorModule.P2PError(ErrorModule.errors.P2P_WEBRTC_SDP, e.message);\n\t\t\t\tthis.publishConferenceError(error.message, '_createAndSendAnswer', ConferenceErrorType.SDP_GENERATION_ERROR);\n\t\t\t\tthis._stop(error, true);\n\t\t\t});\n\t}\n\n\t_logCurrentAndPendingLocalDescription() {\n\t\tthis.logger.debug(`Current description \\nactioneeParticipantId ${this.actioneeParticipantId}`, this._pc.currentLocalDescription);\n\t\tthis.logger.debug(`Pending description \\nactioneeParticipantId ${this.actioneeParticipantId}`, this._pc.pendingLocalDescription);\n\t}\n\n\t_getAndDeleteTrackSourceInfo(tracks) {\n\t\tif (tracks.length > 0) {\n\t\t\tconst trackId = tracks[0].id;\n\t\t\tif (this._remoteTrackSourceInfo.has(trackId)) {\n\t\t\t\tconst sourceInfo = this._remoteTrackSourceInfo.get(trackId);\n\t\t\t\tthis._remoteTrackSourceInfo.delete(trackId);\n\t\t\t\treturn sourceInfo;\n\t\t\t}\n\n\t\t\tthis.logger.warn(`Cannot find source info for ${trackId}`);\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t_unpublish(stream) {\n\t\tif (navigator.mozGetUserMedia || !this._remoteSideSupportsRemoveStream) {\n\t\t\t// Actually unpublish is supported. It is a little bit complex since Firefox implemented WebRTC spec while Chrome implemented an old API.\n\t\t\tthis.logger.error('Stopping a publication is not supported on Firefox. Please use P2PClient.stop() to stop the connection with remote endpoint.');\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_UNSUPPORTED_METHOD));\n\t\t}\n\t\tif (!this._publishedStreams.has(stream)) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_ILLEGAL_ARGUMENT));\n\t\t}\n\t\tthis._pendingUnpublishStreams.push(stream);\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._unpublishPromises.set(stream.mediaStream.id, {\n\t\t\t\tresolve: resolve,\n\t\t\t\treject: reject,\n\t\t\t});\n\t\t\tthis._drainPendingStreams();\n\t\t});\n\t}\n\n\t// Make sure |_pc| is available before calling this method.\n\t_createDataChannel(label, offer, wsEvent) {\n\t\tif (this._dataChannels.has(label)) {\n\t\t\tthis.logger.warn(`Data channel labeled ${label} already exists.`);\n\t\t\treturn;\n\t\t}\n\t\tif (!this._pc) {\n\t\t\tthis.logger.debug('PeerConnection is not available before creating DataChannel.');\n\t\t\treturn;\n\t\t}\n\t\tthis.logger.debug('Create data channel.');\n\t\tconst dc = this._pc.createDataChannel(label);\n\t\tthis._bindEventsToDataChannel(dc);\n\t\tthis._dataChannels.set(DataChannelLabel.MESSAGE, dc);\n\t\tif (offer && wsEvent) {\n\t\t\tthis._onNegotiationneeded(offer, wsEvent);\n\t\t} else {\n\t\t\tthis._onNegotiationneeded();\n\t\t}\n\t}\n\n\t_bindEventsToDataChannel(dc) {\n\t\tdc.onmessage = event => {\n\t\t\tthis._onDataChannelMessage.apply(this, [event]);\n\t\t};\n\t\tdc.onopen = event => {\n\t\t\tthis._onDataChannelOpen.apply(this, [event]);\n\t\t};\n\t\tdc.onclose = event => {\n\t\t\tthis._onDataChannelClose.apply(this, [event]);\n\t\t};\n\t\tdc.onerror = error => {\n\t\t\tthis.logger.debug('Data Channel Error:', error);\n\t\t};\n\t}\n\n\t// Returns all MediaStreams it belongs to.\n\t_getStreamByTrack(mediaStreamTrack) {\n\t\tconst streams = [];\n\t\tfor (const [id, info] of this._remoteStreamInfo) {\n\t\t\tif (!info.stream || !info.stream.mediaStream) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (const track of info.stream.mediaStream.getTracks()) {\n\t\t\t\tif (mediaStreamTrack === track) {\n\t\t\t\t\tstreams.push(info.stream.mediaStream);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn streams;\n\t}\n\n\t_areAllTracksEnded(mediaStream) {\n\t\tfor (const track of mediaStream.getTracks()) {\n\t\t\tif (track.readyState === 'live') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t_stop(error, notifyRemote) {\n\t\tlet promiseError = error;\n\t\tif (!promiseError) {\n\t\t\tpromiseError = new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_UNKNOWN);\n\t\t}\n\t\tfor (const [label, dc] of this._dataChannels) {\n\t\t\tdc.close();\n\t\t}\n\t\tthis._dataChannels.clear();\n\t\tif (this._pc && this._pc.iceConnectionState !== 'closed') {\n\t\t\tclearInterval(this.offerInterval);\n\t\t\tthis._pc.close();\n\t\t}\n\t\tfor (const [id, promise] of this._publishPromises) {\n\t\t\tpromise.reject(promiseError);\n\t\t}\n\t\tthis._publishPromises.clear();\n\t\tfor (const [id, promise] of this._unpublishPromises) {\n\t\t\tpromise.reject(promiseError);\n\t\t}\n\t\tthis._unpublishPromises.clear();\n\t\tfor (const [id, promise] of this._sendDataPromises) {\n\t\t\tpromise.reject(promiseError);\n\t\t}\n\t\tthis._sendDataPromises.clear();\n\t\t// Fire ended event if publication or remote stream exists.\n\t\tthis._publishedStreams.forEach(publication => {\n\t\t\tpublication.dispatchEvent(new OwtEvent('ended'));\n\t\t});\n\t\tthis._publishedStreams.clear();\n\t\tthis._remoteStreams.forEach(stream => {\n\t\t\tstream.dispatchEvent(new OwtEvent('ended'));\n\t\t});\n\t\tthis._remoteStreams = [];\n\t\tif (!this._disposed) {\n\t\t\tif (notifyRemote) {\n\t\t\t\tlet sendError;\n\t\t\t\tif (error) {\n\t\t\t\t\tsendError = JSON.parse(JSON.stringify(error));\n\t\t\t\t\t// Avoid to leak detailed error to remote side.\n\t\t\t\t\tsendError.message = 'Error happened at remote side.';\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.dispatchEvent(new Event('ended'));\n\t\t}\n\t}\n\n\t_setStreamToRemoteStreamInfo(mediaStream) {\n\t\tconst info = this._remoteStreamInfo.get(mediaStream.id);\n\t\tconst { attributes } = info;\n\t\tconst sourceInfo = new StreamModule.StreamSourceInfo(\n\t\t\tthis._remoteStreamInfo.get(mediaStream.id).source.audio,\n\t\t\tthis._remoteStreamInfo.get(mediaStream.id).source.video\n\t\t);\n\t\tinfo.stream = new StreamModule.RemoteStream(undefined, this._remoteId, mediaStream, sourceInfo, attributes);\n\t\tinfo.mediaStream = mediaStream;\n\t\tconst { stream } = info;\n\t\tif (stream) {\n\t\t\tthis._remoteStreams.push(stream);\n\t\t} else {\n\t\t\tthis.logger.warn('Failed to create RemoteStream', { mediaStream });\n\t\t}\n\t}\n\n\t_checkIceConnectionStateAndFireEvent() {\n\t\tif (this._pc.iceConnectionState === 'connected' || this._pc.iceConnectionState === 'completed') {\n\t\t\tfor (const [id, info] of this._remoteStreamInfo) {\n\t\t\t\t// Set _remoteStreamInfo.mediaStream and _remoteStreamInfo.stream if mediaStream exists on peer connection\n\t\t\t\t// but is null not set on _remoteStreamInfo\n\t\t\t\tconst pcRemoteStream = this._pc.getRemoteStreams().find(stream => stream.id === id);\n\t\t\t\tif (!info.mediaStream && pcRemoteStream) {\n\t\t\t\t\tthis._setStreamToRemoteStreamInfo(pcRemoteStream);\n\t\t\t\t}\n\t\t\t\tif (info.mediaStream) {\n\t\t\t\t\tconst streamEvent = new StreamModule.StreamEvent('streamadded', {\n\t\t\t\t\t\tstream: info.stream,\n\t\t\t\t\t});\n\t\t\t\t\tif (this._isUnifiedPlan()) {\n\t\t\t\t\t\tfor (const track of info.mediaStream.getTracks()) {\n\t\t\t\t\t\t\ttrack.addEventListener('ended', event => {\n\t\t\t\t\t\t\t\tconst mediaStreams = this._getStreamByTrack(event.target);\n\t\t\t\t\t\t\t\tfor (const mediaStream of mediaStreams) {\n\t\t\t\t\t\t\t\t\tif (this._areAllTracksEnded(mediaStream)) {\n\t\t\t\t\t\t\t\t\t\tthis._onRemoteStreamRemoved(mediaStream);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACKS_ADDED, info.trackIds);\n\t\t\t\t\tthis._remoteStreamInfo.get(info.mediaStream.id).mediaStream = null;\n\t\t\t\t\tthis.dispatchEvent(streamEvent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tgetRTCPeerConnection() {\n\t\treturn this._pc;\n\t}\n\n\taddStreamToPendingStreams(stream) {\n\t\tif (!stream) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pendingStreams.push(stream);\n\t}\n\n\tsetMyStreamInfo(stream) {\n\t\tconst streamInfoData = this._createStreamInfo(stream);\n\t\tif (streamInfoData) {\n\t\t\tthis._myStreamInfo.push(streamInfoData);\n\t\t}\n\t}\n\n\tremoveTrackById = (trackId, offer) => {\n\t\tconst rtcPeerConnection = this.getRTCPeerConnection();\n\n\t\trtcPeerConnection.getSenders().forEach(sender => {\n\t\t\tconst { track } = sender;\n\t\t\tif (track && track.id === trackId) {\n\t\t\t\trtcPeerConnection.removeTrack(sender);\n\t\t\t\tthis._onNegotiationneeded(offer);\n\t\t\t}\n\t\t});\n\t};\n}\n\nexport default P2PPeerConnectionChannel;\n","// eslint-disable-next-line max-classes-per-file\nimport { APP_CONFIG } from 'constants/global-variables';\n\nexport class Offer {\n\tconstructor(actioneeParticipantId, callType, conferenceId, forScreenShare, isAudio, isVideo, isScreen, toScreenSharingSocket, participantId) {\n\t\tthis.actioneeParticipantId = actioneeParticipantId;\n\n\t\tthis.callType = callType;\n\n\t\tthis.conferenceId = conferenceId;\n\n\t\tthis.forScreenShare = forScreenShare;\n\n\t\tthis.isAudio = isAudio;\n\n\t\tthis.isVideo = isVideo;\n\n\t\tthis.isScreen = isScreen;\n\n\t\tthis.toScreenSharingSocket = toScreenSharingSocket;\n\n\t\tthis.participantId = participantId;\n\t}\n}\n\nexport class ConferenceInfo {\n\tconstructor(\n\t\tcallType,\n\t\tconferenceId,\n\t\tconferenceName,\n\t\tconversationId,\n\t\tfromUser,\n\t\tisAudio,\n\t\tisChat,\n\t\tisDirectToHello,\n\t\tisMeetingRoom,\n\t\tisMultiparty,\n\t\tisScreen,\n\t\tisVideo,\n\t\tparticipantId,\n\t\tparticipants,\n\t\tinputDevices,\n\t\tisSecurityCam = false,\n\t\tsource = 'WEB'\n\t) {\n\t\tthis.callType = callType;\n\n\t\tthis.conferenceId = conferenceId;\n\n\t\tthis.conferenceName = conferenceName;\n\n\t\tthis.conversationId = conversationId;\n\n\t\tthis.from = fromUser;\n\n\t\tthis.isAudio = isAudio;\n\n\t\tthis.isChat = isChat;\n\n\t\tthis.isDirectToHello = isDirectToHello;\n\n\t\tthis.isMeetingRoom = isMeetingRoom;\n\n\t\tthis.isMultiparty = isMultiparty;\n\n\t\tthis.isScreen = isScreen;\n\n\t\tthis.isVideo = isVideo;\n\n\t\tthis.participantId = participantId;\n\n\t\tthis.participants = participants;\n\n\t\tthis.inputDevices = inputDevices;\n\n\t\tthis.isSecurityCam = isSecurityCam;\n\n\t\tthis.source = source;\n\n\t\tthis.tenantId = APP_CONFIG.companyId;\n\t}\n}\n\nexport class FromUser {\n\tconstructor(name, jobTitle, picture, objectGuidId, friendlyUrl) {\n\t\tthis.name = name;\n\n\t\tthis.jobTitle = jobTitle;\n\n\t\tthis.picture = picture;\n\n\t\tthis.objectGuidId = objectGuidId;\n\n\t\tthis.friendlyUrl = friendlyUrl;\n\t}\n}\n\nexport class ConferenceParticipant {\n\tconstructor(objectId, objectType) {\n\t\tthis.objectId = objectId;\n\n\t\tthis.objectType = objectType;\n\t}\n}\n","// @ts-nocheck\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/* global Map, Promise */\nimport { EventDispatcher } from '../base/event.js';\nimport * as ErrorModule from './error.js';\nimport P2PPeerConnectionChannel from './peerconnection-channel.js';\nimport SocketEvents from '../../constants/socket-events';\nimport { Offer } from 'owt/base/conference.js';\n\nconst ConnectionState = {\n\tREADY: 1,\n\tCONNECTING: 2,\n\tCONNECTED: 3,\n};\n\n/* eslint-disable no-unused-vars */\n/**\n * @class P2PClientConfiguration\n * @classDesc Configuration for P2PClient.\n * @memberOf Owt.P2P\n * @hideconstructor\n */\nexport const P2PClientConfiguration = function() {\n\t/**\n\t * @member {?Array} audioEncoding\n\t * @instance\n\t * @desc Encoding parameters for publishing audio tracks.\n\t * @memberof Owt.P2P.P2PClientConfiguration\n\t */\n\tthis.audioEncoding = undefined;\n\t/**\n\t * @member {?Array} videoEncoding\n\t * @instance\n\t * @desc Encoding parameters for publishing video tracks.\n\t * @memberof Owt.P2P.P2PClientConfiguration\n\t */\n\tthis.videoEncoding = undefined;\n\t/**\n\t * @member {?RTCConfiguration} rtcConfiguration\n\t * @instance\n\t * @memberof Owt.P2P.P2PClientConfiguration\n\t * @desc It will be used for creating PeerConnection.\n\t * @see {@link https://www.w3.org/TR/webrtc/#rtcconfiguration-dictionary|RTCConfiguration Dictionary of WebRTC 1.0}.\n\t * @example\n\t * // Following object can be set to p2pClientConfiguration.rtcConfiguration.\n\t * {\n\t * iceServers: [{\n\t * urls: \"stun:example.com:3478\"\n\t * }, {\n\t * urls: [\n\t * \"turn:example.com:3478?transport=udp\",\n\t * \"turn:example.com:3478?transport=tcp\"\n\t * ],\n\t * credential: \"password\",\n\t * username: \"username\"\n\t * }\n\t * }\n\t */\n\tthis.rtcConfiguration = undefined;\n};\n/* eslint-enable no-unused-vars */\n\n/**\n * @class P2PClient\n * @classDesc The P2PClient handles PeerConnections between different clients.\n * Events:\n *\n * | Event Name | Argument Type | Fired when |\n * | --------------------- | ---------------- | ---------------- |\n * | streamadded | StreamEvent | A new stream is sent from remote endpoint. |\n * | messagereceived | MessageEvent | A new message is received. |\n * | socketdisconnected | OwtEvent | Disconnected from signaling server. |\n *\n * @memberof Owt.P2P\n * @extends Owt.Base.EventDispatcher\n * @constructor\n * @param {?Owt.P2P.P2PClientConfiguration } configuration Configuration for Owt.P2P.P2PClient.\n * @param {Object} signalingChannel A channel for sending and receiving signaling messages.\n */\n// @ts-ignore\nexport const P2PClient = function({ configuration, signalingChannel, onPeerConnectionCreated, logger }) {\n\tObject.setPrototypeOf(this, new EventDispatcher());\n\tconst config = configuration;\n\tconst signaling = signalingChannel;\n\t/** @type {Map} */\n\tconst channels = new Map(); // Map of PeerConnectionChannels.\n\tconst self = this;\n\tlet state = ConnectionState.CONNECTED; // ConnectionState.READY;\n\tlet myId;\n\tlet init;\n\n\tconst WsEvents = {\n\t\tON_CHAT_CLOSED: 'chat-closed',\n\t};\n\n\tsignaling.onMessage = function(origin, message) {\n\t\tswitch (message.type) {\n\t\t\tcase WsEvents.ON_CHAT_CLOSED:\n\t\t\t\tif (channels.has(origin)) {\n\t\t\t\t\tgetOrCreateChannel(origin).onMessage(message);\n\t\t\t\t\tchannels.delete(origin);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (self.allowedRemoteIds.indexOf(origin) >= 0) {\n\t\t\tgetOrCreateChannel(origin).onMessage(message);\n\t\t} else {\n\t\t\tsendSignalingMessage(WsEvents.ON_CHAT_CLOSED, ErrorModule.errors.P2P_CLIENT_DENIED);\n\t\t}\n\t};\n\n\t/**\n\t * @member {array} allowedRemoteIds\n\t * @memberof Owt.P2P.P2PClient\n\t * @instance\n\t * @desc Only allowed remote endpoint IDs are able to publish stream or send message to current endpoint. Removing an ID from allowedRemoteIds does stop existing connection with certain endpoint. Please call stop to stop the PeerConnection.\n\t */\n\tthis.allowedRemoteIds = [];\n\n\t/**\n\t * @function connect\n\t * @instance\n\t * @desc Connect to signaling server. Since signaling can be customized, this method does not define how a token looks like. SDK passes token to signaling channel without changes.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} token A token for connecting to signaling server. The format of this token depends on signaling server's requirement.\n\t * @return {Promise} It returns a promise resolved with an object returned by signaling channel once signaling channel reports connection has been established.\n\t */\n\tthis.connect = function(token) {\n\t\tif (state === ConnectionState.READY) {\n\t\t\tstate = ConnectionState.CONNECTING;\n\t\t} else {\n\t\t\tlogger.warn(`Invalid connection state: ${state}`);\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE));\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsignaling.connect(token).then(\n\t\t\t\tid => {\n\t\t\t\t\tmyId = id;\n\t\t\t\t\tstate = ConnectionState.CONNECTED;\n\t\t\t\t\tresolve(myId);\n\t\t\t\t},\n\t\t\t\terrCode => {\n\t\t\t\t\treject(new ErrorModule.P2PError(ErrorModule.getErrorByCode(errCode)));\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t};\n\n\t/**\n\t * @function disconnect\n\t * @instance\n\t * @desc Disconnect from the signaling channel. It stops all existing sessions with remote endpoints.\n\t * @memberof Owt.P2P.P2PClient\n\t * @returns {Promise}\n\t */\n\tthis.disconnect = function() {\n\t\tif (state === ConnectionState.READY) {\n\t\t\treturn;\n\t\t}\n\t\tchannels.forEach(channel => {\n\t\t\tchannel.stop();\n\t\t});\n\t\tchannels.clear();\n\t\tsignaling.disconnect();\n\t};\n\n\t/**\n\t * @function publish\n\t * @instance\n\t * @desc Publish a stream to a remote endpoint.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @param {Owt.Base.LocalStream} stream An Owt.Base.LocalStream to be published.\n\t * @param {Offer} offer A Conference.Offer to be sent to peer.\n\t * @param {boolean} reconnectingPublish boolean indicating this is a publish for reconnecting to participant\n\t * @return {Promise} A promised that resolves when remote side received the certain stream. However, remote endpoint may not display this stream, or ignore it.\n\t */\n\tthis.publish = function(remoteId, stream, offer, reconnectingPublish = false) {\n\t\tif (state !== ConnectionState.CONNECTED) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE, 'P2P Client is not connected to signaling channel.'));\n\t\t}\n\t\tif (this.allowedRemoteIds.indexOf(remoteId) < 0) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_NOT_ALLOWED));\n\t\t}\n\n\t\treturn Promise.resolve(getOrCreateChannel(remoteId).publish(stream, offer, reconnectingPublish));\n\t};\n\n\t/**\n\t * @function send\n\t * @instance\n\t * @desc Send a message to remote endpoint.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @param {string} message Message to be sent. It should be a string.\n\t * @return {Promise} It returns a promise resolved when remote endpoint received certain message.\n\t */\n\tthis.send = function(remoteId, message, offer) {\n\t\tif (state !== ConnectionState.CONNECTED) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE, 'P2P Client is not connected to signaling channel.'));\n\t\t}\n\t\tif (this.allowedRemoteIds.indexOf(remoteId) < 0) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_NOT_ALLOWED));\n\t\t}\n\t\treturn Promise.resolve(getOrCreateChannel(remoteId).send(message, offer, SocketEvents.HelloDevice.DATA_CHANNEL_OFFER));\n\t};\n\n\t/**\n\t * @function stop\n\t * @instance\n\t * @desc Clean all resources associated with given remote endpoint.\n\t * It may include RTCPeerConnection, RTCRtpTransceiver and RTCDataChannel.\n\t * It still possible to publish a stream, or send a message to given remote endpoint after stop.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @return {undefined}\n\t */\n\tthis.stop = function(remoteId) {\n\t\tif (!channels.has(remoteId)) {\n\t\t\tlogger.warn('No PeerConnection between current endpoint and specific remote endpoint.', { remoteId });\n\t\t\treturn;\n\t\t}\n\n\t\tchannels.get(remoteId).stop();\n\t\tchannels.delete(remoteId);\n\t\tconst index = this.allowedRemoteIds.findIndex(id => id === remoteId);\n\t\tthis.allowedRemoteIds.splice(index, 1);\n\t};\n\n\t/**\n\t * @function removeTrack\n\t * @instance\n\t * @desc Remove peer connection track by trackID\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @param {string} trackId Track ID.\n\t * @param {Offer} offer Offer to re-negotiate.\n\t * @return {undefined}\n\t */\n\tthis.removeTrack = function(remoteId, trackId, offer) {\n\t\tif (!channels.has(remoteId)) {\n\t\t\tlogger.warn('No PeerConnection between current endpoint and specific remote endpoint.', { remoteId });\n\t\t\treturn;\n\t\t}\n\n\t\tconst channel = channels.get(remoteId);\n\t\tchannel.removeTrackById(trackId, offer);\n\t};\n\n\t/**\n\t * @function getStats\n\t * @instance\n\t * @desc Get stats of underlying PeerConnection.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @return {Promise} It returns a promise resolved with an RTCStatsReport or reject with an Error if there is no connection with specific user.\n\t */\n\tthis.getStats = function(remoteId) {\n\t\tif (!channels.has(remoteId)) {\n\t\t\treturn Promise.reject(\n\t\t\t\tnew ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE, 'No PeerConnection between current endpoint and specific remote ' + 'endpoint.')\n\t\t\t);\n\t\t}\n\t\treturn channels.get(remoteId).getStats();\n\t};\n\n\tthis.sendMessageToSignaling = function(event, message) {\n\t\treturn sendSignalingMessage(event, message);\n\t};\n\n\tconst sendSignalingMessage = function(event, message) {\n\t\treturn signaling.send(event, message).catch(e => {\n\t\t\tif (typeof e === 'number') {\n\t\t\t\tthrow ErrorModule.getErrorByCode(e);\n\t\t\t}\n\t\t});\n\t};\n\n\tconst getOrCreateChannel = function(remoteId) {\n\t\tif (!channels.has(remoteId)) {\n\t\t\t// Construct an signaling sender/receiver for P2PPeerConnection.\n\t\t\tconst signalingForChannel = Object.create(EventDispatcher);\n\t\t\tsignalingForChannel.sendSignalingMessage = sendSignalingMessage;\n\n\t\t\tconst pcc = new P2PPeerConnectionChannel({\n\t\t\t\tconfig: config,\n\t\t\t\tlocalId: myId,\n\t\t\t\tremoteId: remoteId,\n\t\t\t\tsignaling: signalingForChannel,\n\t\t\t\tlogger,\n\t\t\t});\n\n\t\t\tif (typeof onPeerConnectionCreated === 'function') {\n\t\t\t\tconst peerConnObj = pcc.getRTCPeerConnection();\n\t\t\t\tif (peerConnObj !== null) {\n\t\t\t\t\tonPeerConnectionCreated(peerConnObj, remoteId);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpcc.addEventListener('streamadded', streamEvent => {\n\t\t\t\tself.dispatchEvent(streamEvent);\n\t\t\t});\n\t\t\tpcc.addEventListener('messagereceived', messageEvent => {\n\t\t\t\tself.dispatchEvent(messageEvent);\n\t\t\t});\n\t\t\tpcc.addEventListener('remoteDescriptionSet', ev => {\n\t\t\t\tself.dispatchEvent({ ...ev, origin: remoteId });\n\t\t\t});\n\t\t\tpcc.addEventListener('ended', () => {\n\t\t\t\tchannels.delete(remoteId);\n\t\t\t});\n\t\t\tchannels.set(remoteId, pcc);\n\t\t}\n\t\treturn channels.get(remoteId);\n\t};\n\n\tthis.getChannel = remoteId => {\n\t\tif (!remoteId) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn getOrCreateChannel(remoteId);\n\t};\n\n\tthis.hasPeerConnectionChannelForRemoteId = remoteId => {\n\t\treturn channels.has(remoteId);\n\t};\n};\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @class AudioSourceInfo\n * @classDesc Source info about an audio track. Values: 'mic', 'screen-cast', 'file', 'mixed'.\n * @memberOf Owt.Base\n * @readonly\n * @enum {string}\n */\nexport const AudioSourceInfo = {\n\tMIC: 'mic',\n\tSCREENCAST: 'screen-cast',\n\tFILE: 'file',\n\tMIXED: 'mixed',\n};\n\n/**\n * @class VideoSourceInfo\n * @classDesc Source info about a video track. Values: 'camera', 'screen-cast', 'file', 'mixed'.\n * @memberOf Owt.Base\n * @readonly\n * @enum {string}\n */\nexport const VideoSourceInfo = {\n\tCAMERA: 'camera',\n\tSCREENCAST: 'screen-cast',\n\tFILE: 'file',\n\tMIXED: 'mixed',\n};\n\n/**\n * @class TrackKind\n * @classDesc Kind of a track. Values: 'audio' for audio track, 'video' for video track, 'av' for both audio and video tracks.\n * @memberOf Owt.Base\n * @readonly\n * @enum {string}\n */\nexport const TrackKind = {\n\t/**\n\t * Audio tracks.\n\t * @type string\n\t */\n\tAUDIO: 'audio',\n\t/**\n\t * Video tracks.\n\t * @type string\n\t */\n\tVIDEO: 'video',\n\t/**\n\t * Both audio and video tracks.\n\t * @type string\n\t */\n\tAUDIO_AND_VIDEO: 'av',\n};\n/**\n * @class Resolution\n * @memberOf Owt.Base\n * @classDesc The Resolution defines the size of a rectangle.\n * @constructor\n * @param {number} width\n * @param {number} height\n */\nexport class Resolution {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(width, height) {\n\t\t/**\n\t\t * @member {number} width\n\t\t * @instance\n\t\t * @memberof Owt.Base.Resolution\n\t\t */\n\t\tthis.width = width;\n\t\t/**\n\t\t * @member {number} height\n\t\t * @instance\n\t\t * @memberof Owt.Base.Resolution\n\t\t */\n\t\tthis.height = height;\n\t}\n}\n","/* eslint-disable max-classes-per-file */\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/* global Promise, navigator */\n\nimport * as utils from './utils';\nimport * as MediaFormatModule from './mediaformat';\n\n/**\n * @class AudioTrackConstraints\n * @classDesc Constraints for creating an audio MediaStreamTrack.\n * @memberof Owt.Base\n * @constructor\n * @param {Owt.Base.AudioSourceInfo} source Source info of this audio track.\n */\nexport class AudioTrackConstraints {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(source) {\n\t\tif (!Object.values(MediaFormatModule.AudioSourceInfo).some(v => v === source)) {\n\t\t\tthrow new TypeError('Invalid source.');\n\t\t}\n\t\t/**\n\t\t * @member {string} source\n\t\t * @memberof Owt.Base.AudioTrackConstraints\n\t\t * @desc Values could be \"mic\", \"screen-cast\", \"file\" or \"mixed\".\n\t\t * @instance\n\t\t */\n\t\tthis.source = source;\n\t\t/**\n\t\t * @member {string} deviceId\n\t\t * @memberof Owt.Base.AudioTrackConstraints\n\t\t * @desc Do not provide deviceId if source is not \"mic\".\n\t\t * @instance\n\t\t * @see https://w3c.github.io/mediacapture-main/#def-constraint-deviceId\n\t\t */\n\t\tthis.deviceId = undefined;\n\t}\n}\n\n/**\n * @class VideoTrackConstraints\n * @classDesc Constraints for creating a video MediaStreamTrack.\n * @memberof Owt.Base\n * @constructor\n * @param {Owt.Base.VideoSourceInfo} source Source info of this video track.\n */\nexport class VideoTrackConstraints {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(source) {\n\t\tif (!Object.values(MediaFormatModule.VideoSourceInfo).some(v => v === source)) {\n\t\t\tthrow new TypeError('Invalid source.');\n\t\t}\n\t\t/**\n\t\t * @member {string} source\n\t\t * @memberof Owt.Base.VideoTrackConstraints\n\t\t * @desc Values could be \"camera\", \"screen-cast\", \"file\" or \"mixed\".\n\t\t * @instance\n\t\t */\n\t\tthis.source = source;\n\t\t/**\n\t\t * @member {string} deviceId\n\t\t * @memberof Owt.Base.VideoTrackConstraints\n\t\t * @desc Do not provide deviceId if source is not \"camera\".\n\t\t * @instance\n\t\t * @see https://w3c.github.io/mediacapture-main/#def-constraint-deviceId\n\t\t */\n\n\t\tthis.deviceId = undefined;\n\n\t\t/**\n\t\t * @member {Owt.Base.Resolution} resolution\n\t\t * @memberof Owt.Base.VideoTrackConstraints\n\t\t * @instance\n\t\t */\n\t\tthis.resolution = undefined;\n\n\t\t/**\n\t\t * @member {number} frameRate\n\t\t * @memberof Owt.Base.VideoTrackConstraints\n\t\t * @instance\n\t\t */\n\t\tthis.frameRate = undefined;\n\t}\n}\n/**\n * @class StreamConstraints\n * @classDesc Constraints for creating a MediaStream from screen mic and camera.\n * @memberof Owt.Base\n * @constructor\n * @param {?Owt.Base.AudioTrackConstraints} audioConstraints\n * @param {?Owt.Base.VideoTrackConstraints} videoConstraints\n */\nexport class StreamConstraints {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(audioConstraints = false, videoConstraints = false) {\n\t\t/**\n\t\t * @member {Owt.Base.MediaStreamTrackDeviceConstraintsForAudio} audio\n\t\t * @memberof Owt.Base.MediaStreamDeviceConstraints\n\t\t * @instance\n\t\t */\n\t\tthis.audio = audioConstraints;\n\t\t/**\n\t\t * @member {Owt.Base.MediaStreamTrackDeviceConstraintsForVideo} Video\n\t\t * @memberof Owt.Base.MediaStreamDeviceConstraints\n\t\t * @instance\n\t\t */\n\t\tthis.video = videoConstraints;\n\t}\n}\n\n// eslint-disable-next-line require-jsdoc\nfunction isVideoConstrainsForScreenCast(constraints) {\n\treturn typeof constraints.video === 'object' && constraints.video.source === MediaFormatModule.VideoSourceInfo.SCREENCAST;\n}\n\n/**\n * @class MediaStreamFactory\n * @classDesc A factory to create MediaStream. You can also create MediaStream by yourself.\n * @memberof Owt.Base\n */\nexport class MediaStreamFactory {\n\t/**\n\t * @function createMediaStream\n\t * @static\n\t * @desc Create a MediaStream with given constraints. If you want to create a MediaStream for screen cast, please make sure both audio and video's source are \"screen-cast\".\n\t * @memberof Owt.Base.MediaStreamFactory\n\t * @returns {Promise} Return a promise that is resolved when stream is successfully created, or rejected if one of the following error happened:\n\t * - One or more parameters cannot be satisfied.\n\t * - Specified device is busy.\n\t * - Cannot obtain necessary permission or operation is canceled by user.\n\t * - Video source is screen cast, while audio source is not.\n\t * - Audio source is screen cast, while video source is disabled.\n\t * @param {Owt.Base.StreamConstraints} constraints\n\t */\n\tstatic createMediaStream(constraints) {\n\t\tif (typeof constraints !== 'object' || (!constraints.audio && !constraints.video)) {\n\t\t\treturn Promise.reject(new TypeError('Invalid constrains'));\n\t\t}\n\t\tif (\n\t\t\t!isVideoConstrainsForScreenCast(constraints) &&\n\t\t\ttypeof constraints.audio === 'object' &&\n\t\t\tconstraints.audio.source === MediaFormatModule.AudioSourceInfo.SCREENCAST\n\t\t) {\n\t\t\treturn Promise.reject(new TypeError('Cannot share screen without video.'));\n\t\t}\n\t\tif (isVideoConstrainsForScreenCast(constraints) && !utils.isChrome() && !utils.isFirefox()) {\n\t\t\treturn Promise.reject(new TypeError('Screen sharing only supports Chrome and Firefox.'));\n\t\t}\n\t\tif (\n\t\t\tisVideoConstrainsForScreenCast(constraints) &&\n\t\t\ttypeof constraints.audio === 'object' &&\n\t\t\tconstraints.audio.source !== MediaFormatModule.AudioSourceInfo.SCREENCAST\n\t\t) {\n\t\t\treturn Promise.reject(new TypeError('Cannot capture video from screen cast while capture audio from' + ' other source.'));\n\t\t}\n\n\t\t// Check and convert constraints.\n\t\tif (!constraints.audio && !constraints.video) {\n\t\t\treturn Promise.reject(new TypeError('At least one of audio and video must be requested.'));\n\t\t}\n\t\tconst mediaConstraints = Object.create({});\n\t\tif (typeof constraints.audio === 'object' && constraints.audio.source === MediaFormatModule.AudioSourceInfo.MIC) {\n\t\t\tmediaConstraints.audio = Object.create({});\n\t\t\tif (utils.isEdge()) {\n\t\t\t\tmediaConstraints.audio.deviceId = constraints.audio.deviceId;\n\t\t\t} else {\n\t\t\t\tmediaConstraints.audio.deviceId = {\n\t\t\t\t\texact: constraints.audio.deviceId,\n\t\t\t\t};\n\t\t\t}\n\t\t} else if (constraints.audio.source === MediaFormatModule.AudioSourceInfo.SCREENCAST) {\n\t\t\tmediaConstraints.audio = true;\n\t\t} else {\n\t\t\tmediaConstraints.audio = constraints.audio;\n\t\t}\n\n\t\tif (typeof constraints.video === 'object') {\n\t\t\tmediaConstraints.video = Object.create({});\n\t\t\tif (typeof constraints.video.frameRate === 'number') {\n\t\t\t\tmediaConstraints.video.frameRate = constraints.video.frameRate;\n\t\t\t}\n\t\t\tif (constraints.video.resolution && constraints.video.resolution.width && constraints.video.resolution.height) {\n\t\t\t\tif (constraints.video.source === MediaFormatModule.VideoSourceInfo.SCREENCAST) {\n\t\t\t\t\tmediaConstraints.video.width = constraints.video.resolution.width;\n\t\t\t\t\tmediaConstraints.video.height = constraints.video.resolution.height;\n\t\t\t\t} else {\n\t\t\t\t\tmediaConstraints.video.width = Object.create({});\n\t\t\t\t\tmediaConstraints.video.width.ideal = constraints.video.resolution.width;\n\t\t\t\t\tmediaConstraints.video.height = Object.create({});\n\t\t\t\t\tmediaConstraints.video.height.ideal = constraints.video.resolution.height;\n\t\t\t\t\tmediaConstraints.video.aspectRatio = Object.create({});\n\t\t\t\t\tmediaConstraints.video.aspectRatio.ideal = 1.7777777778;\n\t\t\t\t\tmediaConstraints.video.facingMode = Object.create({});\n\t\t\t\t\tmediaConstraints.video.facingMode.ideal = ['user'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof constraints.video.deviceId === 'string') {\n\t\t\t\tmediaConstraints.video.deviceId = { exact: constraints.video.deviceId };\n\t\t\t}\n\t\t\tif (utils.isFirefox() && constraints.video.source === MediaFormatModule.VideoSourceInfo.SCREENCAST) {\n\t\t\t\tmediaConstraints.video.mediaSource = 'screen';\n\t\t\t}\n\t\t} else {\n\t\t\tmediaConstraints.video = constraints.video;\n\t\t}\n\n\t\tif (isVideoConstrainsForScreenCast(constraints)) {\n\t\t\treturn navigator.mediaDevices.getDisplayMedia(mediaConstraints);\n\t\t}\n\n\t\treturn navigator.mediaDevices.getUserMedia(mediaConstraints);\n\t}\n}\n","/***\n * Used for saving the audio sound that it is playing and stopping it afterwards\n * */\nlet audio;\n\n/**\n * Method used to play a sound depending on audio url\n * @param {string} audioUrl the string url for the audio to be played\n * @param {Object} options\n * @param {boolean} options.muted used to mute or unmute the audio\n * @param {boolean} options.loop used to loop through the audio\n */\nexport const playSound = async (audioUrl, options) => {\n\tconst { muted, loop } = options;\n\taudio = new Audio(audioUrl);\n\n\taudio.muted = muted;\n\taudio.loop = loop;\n\taudio.currentTime = 0;\n\n\ttry {\n\t\tawait audio.play();\n\n\t\treturn audio;\n\t} catch (error) {\n\t\tconsole.log('Autoplay failed:', error);\n\t}\n};\n\n/**\n * Method used to stop a sound depending on audio object\n */\nexport const stopSound = () => {\n\tif (!!audio) {\n\t\taudio.pause();\n\t\taudio.currentTime = 0;\n\t}\n};\n\n/**\n * Method used to play a busy sound\n */\nexport const busySound = () => {\n\treturn playSound('https://static.solaborate.com/global/brand/calls/busy.mp3', { muted: false, loop: false });\n};\n\n/**\n * Method used to play a drop sound\n */\nexport const dropSound = () => {\n\treturn playSound('https://static.solaborate.com/global/brand/calls/call_drop.mp3', { muted: false, loop: false });\n};\n\n/**\n * Method used to play the incoming call sound eg. when receiving a call\n */\nexport const incomingCallSound = () => {\n\treturn playSound('https://static.solaborate.com/global/brand/calls/ring.mp3', { muted: false, loop: true });\n};\n\n/**\n * Method used to play the outgoing call sound eg. when calling someone\n */\nexport const outGoingCallSound = () => {\n\treturn playSound('https://static.solaborate.com/global/brand/calls/call_ringing.mp3', { muted: false, loop: true });\n};\n\n/**\n * Method used to stop the incoming call sound eg. when user answeres the call\n */\nexport const stopIncomingCallSound = () => {\n\tstopSound();\n};\n\n/**\n * Method used to stop the outgoing call sound eg. when user answeres the call\n */\nexport const stopOutgoingCallSound = () => {\n\tstopSound();\n};\n","import { gatewayApi } from '../constants/global-variables';\n\nexport async function getIceServers() {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`/v1/ice-server?provider=twilio`);\n\t\tif (data.hasSucceeded && data.result !== null) {\n\t\t\treturn prepareICEList(data.result.iceServers);\n\t\t}\n\t} catch (error) {\n\t\tconsole.warn('Failed to get ice servers!', error);\n\t}\n}\n\nfunction prepareICEList(iceServers) {\n\t// example:\n\t// iceServers: [{\n\t// urls: [\n\t// 'turn:global.turn.twilio.com:3478?transport=udp',\n\t// 'turn:global.turn.twilio.com:3478?transport=tcp',\n\t// 'turn:global.turn.twilio.com:443?transport=tcp'\n\t// ],\n\t// username: \"3d7f3e4fafba9b1ab42bb9644ac9f33ce98fc99575bbcd5d56d643d491889488\",\n\t// credential: \"ybTn5WxASjj7saN7aKRK8bOug/tiH8RITApVCIgwVL8=\",\n\t// },\n\t// {\n\t// urls: [\"stun:global.stun.twilio.com:3478?transport=udp\"]\n\t// }]\n\treturn iceServers.map(server => {\n\t\tserver.urls = server.urls.map(url => `${server.type}:${url}`);\n\t\tconst { id, isDeleted, type, ...returnServer } = server;\n\n\t\tif (returnServer.password) {\n\t\t\treturnServer.credential = returnServer.password;\n\t\t\tdelete returnServer.password;\n\t\t}\n\t\treturn returnServer;\n\t});\n}\n","import { gatewayApi } from 'constants/global-variables';\n\n// eslint-disable-next-line import/prefer-default-export\nexport async function sendStats(data, retries = 5) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `v1/callmetrics`;\n\t\tgatewayApi\n\t\t\t.post(url, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconsole.error('error while sending call stats logs', e);\n\t\t\t\tif (retries > 0) {\n\t\t\t\t\tsendStats(data, retries - 1);\n\t\t\t\t}\n\t\t\t\trej(e);\n\t\t\t});\n\t});\n}\n","import { sendStats } from 'api/callStats';\n\nclass CallStats {\n\tconstructor() {\n\t\tthis.outgoingMetricsBuffer = [];\n\t\tthis.flushInterval = 30000; // ms\n\t\t// this.batchSize = 10;\n\t}\n\n\taddPeerConnection = async ({ pcObject, pushInterval, conferenceId, participantId, remoteParticipantId, userId }) => {\n\t\tthis.startSendingStats();\n\n\t\tconst getStatsInterval = setInterval(async () => {\n\t\t\tif (pcObject.connectionState === 'closed') {\n\t\t\t\tthis.removePeerConnection(getStatsInterval);\n\t\t\t\tthis.stop();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst stats = await pcObject.getStats();\n\n\t\t\tthis.pushStats({ stats, conferenceId, participantId, remoteParticipantId, userId });\n\t\t}, pushInterval);\n\t};\n\n\tstop = () => {\n\t\t// Send the remaining stats\n\t\tthis.sendStats();\n\t};\n\n\tremovePeerConnection = getStatsInterval => {\n\t\tclearInterval(getStatsInterval);\n\t};\n\n\tstartSendingStats = () => {\n\t\tsetTimeout(this.sendStats, this.flushInterval);\n\t};\n\n\tsendStats = async () => {\n\t\tif (this.outgoingMetricsBuffer.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst batch = this.prepareBatch();\n\n\t\ttry {\n\t\t\tawait sendStats(batch);\n\t\t} catch (ex) {\n\t\t\tconsole.error('error while sending call stats logs', ex);\n\t\t} finally {\n\t\t\tsetTimeout(this.sendStats, this.flushInterval);\n\t\t}\n\t};\n\n\tprepareBatch = () => {\n\t\tconst batchSize = this.outgoingMetricsBuffer.length;\n\t\treturn {\n\t\t\tdata: { values: this.outgoingMetricsBuffer.splice(0, batchSize) },\n\t\t};\n\t};\n\n\tpushStats = ({ stats, conferenceId, participantId, remoteParticipantId, userId }) => {\n\t\tlet result = [];\n\n\t\tstats.forEach(report => {\n\t\t\tif (report.type === 'certificate') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresult.push(report);\n\t\t});\n\n\t\tthis.outgoingMetricsBuffer.push({\n\t\t\tconferenceId: conferenceId,\n\t\t\tuserId: userId,\n\t\t\tparticipantId: participantId,\n\t\t\tremoteParticipantId: remoteParticipantId,\n\t\t\ttimeStamp: this.generateTimeStamp(),\n\t\t\tstats: result,\n\t\t});\n\t};\n\n\tgenerateTimeStamp = () => {\n\t\treturn Math.round(new Date().getTime());\n\t};\n}\n\nexport default CallStats;\n","import { ApplicationInsights } from '@microsoft/applicationinsights-web';\nimport { ReactPlugin } from '@microsoft/applicationinsights-react-js';\nimport { ClickAnalyticsPlugin } from '@microsoft/applicationinsights-clickanalytics-js';\n\nconst clickPluginInstance = new ClickAnalyticsPlugin();\nconst clickPluginConfig = {\n\tdataTags: {\n\t\tcustomDataPrefix: 'data-custom-',\n\t\taiBlobAttributeTag: 'customblob',\n\t\tparentDataTag: 'parent-group',\n\t\tdonotTrackDataTag: 'dnt',\n\t\tcaptureAllMetaDataContent: true,\n\t\tuseDefaultContentNameOrId: true,\n\t},\n\tdefaultRightClickBhvr: 'rc',\n};\n\nconst reactPlugin = new ReactPlugin();\n\nconst appInsights = new ApplicationInsights({\n\tconfig: {\n\t\tmaxBatchInterval: 0,\n\t\tdisableFetchTracking: false,\n\t\textensions: [reactPlugin, clickPluginInstance],\n\t\textensionConfig: {\n\t\t\t[clickPluginInstance.identifier]: clickPluginConfig,\n\t\t},\n\t},\n});\n\nconst createTelemetryService = () => {\n\t/**\n\t * Initialize the Application Insights class\n\t * @param {string} instrumentationKey - Application Insights Instrumentation Key\n\t * @param {Object} browserHistory - client's browser history, supplied by the withRouter HOC\n\t * @return {void}\n\t */\n\tconst initialize = (instrumentationKey, browserHistory) => {\n\t\tif (!browserHistory) {\n\t\t\tthrow new Error('Could not initialize Telemetry Service');\n\t\t}\n\t\tif (!instrumentationKey) {\n\t\t\tthrow new Error('Instrumentation key not provided in ./src/telemetry-provider.jsx');\n\t\t}\n\n\t\tappInsights.config.instrumentationKey = instrumentationKey;\n\t\tappInsights.config.extensionConfig = {\n\t\t\t...appInsights.config.extensionConfig,\n\t\t\t[reactPlugin.identifier]: {\n\t\t\t\thistory: browserHistory,\n\t\t\t},\n\t\t};\n\n\t\tappInsights.loadAppInsights();\n\n\t\tconst telemetryInitializer = envelope => {\n\t\t\tconst { tags } = envelope;\n\t\t\ttags['ai.cloud.role'] = 'banyan.web';\n\t\t};\n\t\tappInsights.addTelemetryInitializer(telemetryInitializer);\n\t};\n\n\treturn { reactPlugin, appInsights, initialize };\n};\n\nexport const ai = createTelemetryService();\nexport const getAppInsights = () => appInsights;\n","/* eslint-disable no-console */\nimport { APP_CONFIG } from 'constants/global-variables';\n\nclass Logger {\n\t/**\n\t * @param {object} data\n\t * @param {string} data.name\n\t * @param {import('@microsoft/applicationinsights-web').ApplicationInsights} data.appInsights\n\t */\n\tconstructor({ name, appInsights }) {\n\t\tthis.name = name;\n\t\tthis.appInsights = appInsights;\n\n\t\tthis.conferenceData = null;\n\t\tthis.sendCallClientLogs = APP_CONFIG.sendCallClientLogs === 'true';\n\t\tthis.printConsole = APP_CONFIG.isDevelopment || !this.sendCallClientLogs;\n\t}\n\n\t/**\n\t * @param {{ conferenceId?: string; participantId?: string; }} data\n\t */\n\tsetConferenceData(data) {\n\t\tthis.conferenceData = {\n\t\t\t...this.conferenceData,\n\t\t\t...data,\n\t\t};\n\t}\n\n\t/**\n\t * @param {'log' | 'info' | 'debug' | 'warn'} type\n\t * @param {string} message\n\t * @param {...any} rest\n\t */\n\tconsoleMethod = (type, message, ...rest) => {\n\t\tconst args = rest.filter(val => val !== undefined);\n\n\t\tif (this.appInsights?.appInsights?.isInitialized() && this.sendCallClientLogs) {\n\t\t\tthis.appInsights.trackEvent({ name: this.name, properties: { type, message, args, ...(this.conferenceData ? this.conferenceData : null) } });\n\t\t}\n\t\tif (this.printConsole) {\n\t\t\tconsole[type](message, ...args);\n\t\t}\n\t};\n\n\tlog(message, ...rest) {\n\t\tthis.consoleMethod('log', message, ...rest);\n\t}\n\n\tinfo(message, ...rest) {\n\t\tthis.consoleMethod('info', message, ...rest);\n\t}\n\n\tdebug(message, ...rest) {\n\t\tthis.consoleMethod('debug', message, ...rest);\n\t}\n\n\twarn(message, ...rest) {\n\t\tthis.consoleMethod('warn', message, ...rest);\n\t}\n\n\terror = (message, ...rest) => {\n\t\tconst args = rest.filter(val => val !== undefined);\n\n\t\tif (this.appInsights?.appInsights?.isInitialized()) {\n\t\t\tthis.appInsights.trackException({\n\t\t\t\texception: new Error(message),\n\t\t\t\tproperties: { name: this.name, message, args, ...(this.conferenceData ? this.conferenceData : null) },\n\t\t\t});\n\t\t}\n\t\tif (this.printConsole) {\n\t\t\tconsole.error(message, ...args);\n\t\t}\n\t};\n}\n\nexport default Logger;\n","import Emitter from 'owt/p2p/Emitter';\nimport SignalingChannel from 'owt/p2p/sc.websocket';\nimport { P2PClient, P2PClientConfiguration } from 'owt/p2p/p2pclient';\nimport { Offer, FromUser } from 'owt/base/conference';\nimport { LocalStream, StreamSourceInfo } from 'owt/base/stream';\nimport { AudioTrackConstraints, MediaStreamFactory, StreamConstraints, VideoTrackConstraints } from 'owt/base/mediastream-factory';\nimport { AudioSourceInfo, VideoSourceInfo } from 'owt/base/mediaformat';\nimport SocketEvents from 'constants/socket-events';\nimport {\n\tCallTypes,\n\tParticipantState,\n\tStreamError,\n\tConferenceEndReason,\n\tSocketState,\n\tRTCPeerConnectionEnum,\n\tDeviceCommands,\n\tJoinConferenceFailureReasonEnum,\n\tParticipantRemoveReason,\n\tTerminateRequestFailureReasonEnum,\n\tAudioOutputDevice,\n\tStreamTypes,\n\tObjectType,\n\tToggleFailureReasonEnum,\n\tStartConferenceFailureReason,\n} from 'constants/enums';\nimport { getIceServers } from 'api/iceServers';\nimport { busySound, dropSound, outGoingCallSound, stopOutgoingCallSound } from 'components/CallSounds';\nimport CallStats from 'infrastructure/callStats/callStats';\nimport { getUserProfile } from 'infrastructure/auth';\nimport { ai } from 'infrastructure/helpers/appInsightsTelemetry';\nimport Logger from 'owt/p2p/logger';\n\nclass CallManager extends Emitter {\n\tconstructor(socket, options) {\n\t\tsuper();\n\n\t\tthis.participants = {};\n\t\tthis.socket = socket;\n\t\tthis.p2p = null;\n\t\tthis.outGoingCallTimer = {};\n\t\tthis._callStats = new CallStats();\n\t\tthis._useCallStats = options.useCallStats;\n\t\tthis._sendCallStatsInterval = options.sendCallStatsInterval;\n\t\tthis.reconnectTimer = null;\n\t\tthis.cameraEventInProgress = false;\n\t\tthis.cameraEventTimeout = null;\n\t\tthis.endingCall = false;\n\t\tthis.callStartedOrJoined = false;\n\t\tthis.socketAuthorizationPromise = new Promise(resolve => {\n\t\t\tthis.socketAuthorizationResolve = resolve;\n\t\t});\n\t\tthis.socketListeners = {};\n\n\t\tthis.reAddToMonitoringIntervals = new Map();\n\t\tthis.logger = new Logger({ name: 'CallLogs', appInsights: ai.appInsights });\n\t\tthis.deniedParticipant = {};\n\t}\n\n\tbindOn = (event, callback) => {\n\t\tconst eventCallback = data => {\n\t\t\tthis.logger.debug(`WS:ON:${event}`, { socketId: this.socket.id }, data);\n\t\t\tcallback(data);\n\t\t};\n\t\tthis.socketListeners[event] = eventCallback;\n\t\tthis.socket.on(event, eventCallback);\n\t\treturn this;\n\t};\n\n\tunbindTimeouts = () => {\n\t\tif (this.cameraEventTimeout) {\n\t\t\tclearTimeout(this.cameraEventTimeout);\n\t\t}\n\t};\n\n\t/**\n\t * Method to send payload to signaling to invite new device\n\t * @typedef InviteResponse\n\t * @property {string} id\n\t * @property {string} name\n\t * @property {number} objectId\n\t * @property {number} objectType\n\t * @property {string} reason\n\t * @param {Object} data\n\t * @param {Object} data.participant\n\t * @param {number} data.participant.objectId\n\t * @param {number} data.participant.objectType\n\t * @param {String} data.conferenceId\n\t * @param {String} data.participantId\n\t * @return {Promise<{failedInvitationToParticipants: InviteResponse[]}>}\n\t */\n\taddDeviceToMonitoring = async data => {\n\t\tconst inviteParticipantPayload = {\n\t\t\tparticipants: [data.participant],\n\t\t\tconferenceId: data.conferenceId,\n\t\t\tparticipantId: data.participantId,\n\t\t};\n\n\t\tthis.startOutGoingCallTimerForParticipant({\n\t\t\tobjectId: data.participant.objectId,\n\t\t});\n\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.INVITE_PARTICIPANTS, inviteParticipantPayload);\n\t};\n\n\tremoveDeviceFromMonitoring = async ({ conferenceId, participantId, actioneeParticipantId }) => {\n\t\tconst actioneeParticipant = this.getParticipantByParticipantId(actioneeParticipantId);\n\t\tif (actioneeParticipant) {\n\t\t\tthis.clearMonitoringReAddInterval(actioneeParticipant.objectId);\n\t\t\tdelete this.participants[actioneeParticipant.objectId];\n\t\t\tthis.p2p.sendMessageToSignaling(SocketEvents.Conference.REMOVE_PARTICIPANT, {\n\t\t\t\tconferenceId,\n\t\t\t\tparticipantId,\n\t\t\t\tactioneeParticipantId,\n\t\t\t});\n\n\t\t\tconst hasPeerConnectionChannelForRemoteId = this.p2p.hasPeerConnectionChannelForRemoteId(actioneeParticipantId);\n\t\t\tif (hasPeerConnectionChannelForRemoteId) {\n\t\t\t\tthis.p2p.stop(actioneeParticipantId);\n\t\t\t}\n\t\t}\n\t};\n\n\tclearMonitoringReAddInterval = objectId => {\n\t\tconst reAddInterval = this.reAddToMonitoringIntervals.get(objectId);\n\t\tif (reAddInterval) {\n\t\t\tclearInterval(reAddInterval);\n\t\t\tthis.reAddToMonitoringIntervals.delete(objectId);\n\t\t}\n\t};\n\n\tstartMonitoring = async startConferenceInfo => {\n\t\tthis.conferenceInfo = startConferenceInfo;\n\n\t\tthis.logger.setConferenceData({\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t});\n\n\t\tawait this.setP2pClient();\n\n\t\tthis.startOutGoingCallTimerForParticipant({\n\t\t\tobjectId: startConferenceInfo.participants[0].objectId,\n\t\t});\n\n\t\tconst data = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.START, startConferenceInfo);\n\t\tif (data.hasActiveConference) {\n\t\t\tthis.emit('end-call', { hasActiveConference: true });\n\t\t\tthis.clearManager();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!data.ok && data.failureReason === StartConferenceFailureReason.GET_INITIATOR_INFO_FAILED) {\n\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.FAILED_TO_GET_INITIATOR_INFO });\n\t\t\tthis.clearManager();\n\t\t\treturn;\n\t\t}\n\n\t\t// if monitoring fails to start because of denied invitation\n\t\t// reset the value in order to be able to add other feeds\n\t\tif (Object.entries(this.deniedParticipant).length > 0) {\n\t\t\tthis.deniedParticipant = {};\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callStartedOrJoined = true;\n\t\tthis.endingCall = false;\n\t\tthis.emit('call-started', { conferenceInfo: startConferenceInfo, failedInvites: data.failedInvitationToParticipants });\n\t};\n\n\tsetP2pClient = async () => {\n\t\tif (this.p2p) {\n\t\t\treturn;\n\t\t}\n\t\tconst iceServers = await getIceServers();\n\t\tif (!iceServers) return;\n\t\tconst p2pClientConfiguration = Object.assign(new P2PClientConfiguration(), {\n\t\t\t// videoEncoding: [\n\t\t\t// new VideoEncodingParameters(new VideoCodecParameters(VideoCodec.H264)),\n\t\t\t// new VideoEncodingParameters(new VideoCodecParameters(VideoCodec.VP8)),\n\t\t\t// ],\n\t\t\trtcConfiguration: { iceServers },\n\t\t});\n\n\t\tthis.p2p = new P2PClient({\n\t\t\tconfiguration: p2pClientConfiguration,\n\t\t\tsignalingChannel: new SignalingChannel(this.socket, this.logger),\n\t\t\tonPeerConnectionCreated: this.onPeerConnectionCreated,\n\t\t\tlogger: this.logger,\n\t\t});\n\n\t\tthis.bindP2pEvents();\n\t};\n\n\tstartConference = async startConferenceInfo => {\n\t\tawait this.socketAuthorizationPromise;\n\n\t\tthis.conferenceInfo = startConferenceInfo;\n\n\t\tthis.logger.setConferenceData({\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t});\n\n\t\tawait this.setP2pClient();\n\n\t\tlet { isAudio, isVideo, isScreen, callType } = startConferenceInfo;\n\t\t// manually changed isAudio and isVideo to false\n\t\t// because the conference in patient view(securitycam) starts with isAudio and isVideo -> true\n\t\tif (callType === CallTypes.SECURITYCAM) {\n\t\t\tisAudio = false;\n\t\t\tisVideo = false;\n\t\t}\n\t\tawait this.initMediaStream(isAudio, isVideo, isScreen);\n\t\tthis.setTrackIdsInConferenceInfo({\n\t\t\tisAudio,\n\t\t\tisVideo,\n\t\t\tisScreen,\n\t\t});\n\n\t\tthis.startOutGoingCallTimerForParticipant({\n\t\t\tobjectId: startConferenceInfo.participants[0].objectId,\n\t\t});\n\n\t\tconst data = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.START, startConferenceInfo);\n\n\t\tif (data.hasActiveConference) {\n\t\t\tthis.emit('end-call', { hasActiveConference: true });\n\t\t\tthis.clearManager();\n\t\t\tthis.closeSocket();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!data.ok && data.failureReason === StartConferenceFailureReason.GET_INITIATOR_INFO_FAILED) {\n\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.FAILED_TO_GET_INITIATOR_INFO });\n\t\t\tthis.clearManager();\n\t\t\tthis.closeSocket();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callStartedOrJoined = true;\n\t\tthis.callerParticipantId = data.participants[0].id;\n\t\tthis.p2p.allowedRemoteIds = [data.participants[0].id];\n\t\tthis.endingCall = false;\n\t\tthis.emit('call-started', {\n\t\t\tconferenceId: startConferenceInfo.conferenceId,\n\t\t\tparticipantId: startConferenceInfo.participantId,\n\t\t\thelloDeviceName: data.participants[0].name,\n\t\t});\n\t};\n\n\tsetTrackIdsInConferenceInfo = ({ isAudio, isVideo, isScreen }) => {\n\t\tif (isAudio && this.localSrc) {\n\t\t\tthis.conferenceInfo.audioTrackId = this.localSrc.mediaStream.getAudioTracks()[0].id;\n\t\t}\n\t\tif (isVideo && this.localSrc) {\n\t\t\tthis.conferenceInfo.videoTrackId = this.localSrc.mediaStream.getVideoTracks()[0].id;\n\t\t}\n\t\tif (isScreen && this.localScreenSrc) {\n\t\t\tthis.conferenceInfo.screenTrackId = this.localScreenSrc.mediaStream.getVideoTracks()[0].id;\n\t\t}\n\t};\n\n\tjoinConference = async joinConferenceInfo => {\n\t\tawait this.socketAuthorizationPromise;\n\n\t\tthis.conferenceInfo = joinConferenceInfo;\n\n\t\tthis.logger.setConferenceData({\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t});\n\n\t\tawait this.setP2pClient();\n\t\t// joining a conference will be an audio call\n\t\t// change should be here if use case changes\n\t\tawait this.initMediaStream(true, false, false);\n\t\tthis.localSrc.mediaStream.getTracks().forEach(track => this.bindOnTrackEndedEventListener(track, this.conferenceInfo.from.id));\n\n\t\tthis.setTrackIdsInConferenceInfo({\n\t\t\tisAudio: true,\n\t\t\tisVideo: false,\n\t\t\tisScreen: false,\n\t\t});\n\t\tthis.emit('audio-call', { audioStream: this.localSrc });\n\n\t\tthis.participants[this.conferenceInfo.from.objectId] = this.conferenceInfo.from;\n\t\tthis.p2p.allowedRemoteIds.push(this.conferenceInfo.from.id);\n\t\tconst p2pChannel = this.p2p.getChannel(this.conferenceInfo.from.id);\n\t\tp2pChannel.addStreamToPendingStreams(this.localSrc);\n\t\tp2pChannel.setMyStreamInfo(this.localSrc);\n\t\tp2pChannel.actioneeParticipantId = this.conferenceInfo.from.id;\n\t\tp2pChannel.participantId = this.conferenceInfo.participantId;\n\t\tp2pChannel.conferenceId = this.conferenceInfo.conferenceId;\n\n\t\tthis.callerParticipantId = this.conferenceInfo.from.id;\n\t\tconst userProfile = getUserProfile();\n\t\tconst fromUser = new FromUser(`${userProfile.firstName} ${userProfile.lastName}`, userProfile.jobTitle, userProfile.profilePicture.url);\n\t\tconst data = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.JOIN, {\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tcallType: this.conferenceInfo.callType,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tfrom: fromUser,\n\t\t\tinputDevices: this.conferenceInfo.inputDevices,\n\t\t});\n\n\t\t// check if false because it can be undefined\n\t\tif (data.ok === false) {\n\t\t\tswitch (data.failureReason) {\n\t\t\t\tcase JoinConferenceFailureReasonEnum.FAILED_TO_GET_PARTICIPANT_INFO:\n\t\t\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.PARTICIPANT_INVITE_FAILED });\n\t\t\t\t\tbreak;\n\t\t\t\tcase JoinConferenceFailureReasonEnum.WRONG_PARTICIPANT_STATE:\n\t\t\t\t\tthis.emit('end-call', { anotherNursePickedUp: true });\n\t\t\t\t\tbreak;\n\t\t\t\tcase JoinConferenceFailureReasonEnum.UNHANDLED_EXCEPTION:\n\t\t\t\tcase JoinConferenceFailureReasonEnum.NULL_CONFERENCE:\n\t\t\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.ABORTED });\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.clearManager();\n\t\t\tthis.closeSocket();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.logger.setConferenceData({\n\t\t\tparticipantId: data.participantId,\n\t\t});\n\n\t\tthis.callStartedOrJoined = true;\n\t\tObject.assign(this.conferenceInfo, data);\n\t\tthis.emit('call-started', {\n\t\t\tconferenceId: data.conferenceId,\n\t\t\tparticipantId: data.participantId,\n\t\t\thelloDeviceName: this.conferenceInfo.from.name,\n\t\t});\n\t};\n\n\tnewOffer = (isAudio, isVideo, isScreen) => {\n\t\tconst { callerParticipantId, conferenceInfo } = this;\n\n\t\treturn new Offer(\n\t\t\tcallerParticipantId,\n\t\t\tconferenceInfo.callType,\n\t\t\tconferenceInfo.conferenceId,\n\t\t\tconferenceInfo.forScreenShare,\n\t\t\tisAudio,\n\t\t\tisVideo,\n\t\t\tisScreen,\n\t\t\tconferenceInfo.toScreenSharingSocket,\n\t\t\tconferenceInfo.participantId\n\t\t);\n\t};\n\n\tinitMediaStream = async (isAudio, isVideo, isScreen) => {\n\t\tif (isAudio || isVideo) {\n\t\t\t// check for permissions to show the 'allow permission dialog' if needed\n\t\t\tconst status = await this.getInputStreamsStatus();\n\t\t\tconst streamPermission = this.validateStreamStatus(isAudio, isVideo, status);\n\t\t\tif (streamPermission) {\n\t\t\t\tthis.emit('stream-permission', streamPermission);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tthis.localSrc = await this.getStream(isAudio, isVideo, isScreen);\n\t\t\tthis.emit('stream-permission', null);\n\t\t} catch (err) {\n\t\t\tconst errorType = this.handelMediaStreamError(err);\n\t\t\tthis.emit('stream-permission', errorType);\n\t\t\tif (errorType.type !== StreamError.PERMISSION_DISMISSED.type && errorType.type !== StreamError.STREAM_NOT_ALLOWED.type) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\t// start a lisener to check if the user gives stream permission (mic & cam)\n\t\t\tawait this.checkForStreamPermissions({ isAudio, isVideo });\n\t\t\t// we call initMediaStream because we need to set the stream to the this.localSrc after the user granted the permissions\n\t\t\tawait this.initMediaStream(isAudio, isVideo, isScreen);\n\t\t}\n\t};\n\n\tvalidateStreamStatus = (isAudio, isVideo, status) => {\n\t\tlet streamPermission;\n\t\tif (isAudio && !isVideo) {\n\t\t\t// audio call\n\t\t\tif (!status.mic.available) {\n\t\t\t\tstreamPermission = StreamError.DEVICE_NOT_FOUND;\n\t\t\t}\n\t\t\tif (!status.mic.permission) {\n\t\t\t\tstreamPermission = StreamError.MICROPHONE_BLOCKED;\n\t\t\t}\n\t\t} else if (isAudio && isVideo) {\n\t\t\t// video call\n\t\t\tif (!status.mic.available || !status.cam.available) {\n\t\t\t\tstreamPermission = StreamError.DEVICE_NOT_FOUND;\n\t\t\t}\n\t\t\tif (!status.mic.permission) {\n\t\t\t\tstreamPermission = StreamError.MICROPHONE_BLOCKED;\n\t\t\t}\n\t\t\tif (!status.mic.permission || !status.cam.permission) {\n\t\t\t\tstreamPermission = StreamError.PERMISSION_DISMISSED;\n\t\t\t}\n\t\t}\n\t\treturn streamPermission;\n\t};\n\n\taudioCall = async () => {\n\t\tconst offer = this.newOffer(true, false, false);\n\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\tthis.emit('audio-call', { audioStream: this.localSrc, actioneeParticipantId: offer.actioneeParticipantId });\n\t};\n\n\tvideoCall = async () => {\n\t\tconst offer = this.newOffer(true, true, false);\n\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\tthis.emit('video-call', { videoStream: this.localSrc, actioneeParticipantId: offer.actioneeParticipantId });\n\t};\n\n\tcameraFeedCall = async () => {\n\t\tconst offer = this.newOffer(true, true, false);\n\t\tthis.emit('feed-call', { localStream: this.localSrc, actioneeParticipantId: offer.actioneeParticipantId });\n\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t};\n\n\tmonitoringSendOffer = async participantId => {\n\t\tconst offer = this.newOffer(true, true, false);\n\t\toffer.actioneeParticipantId = participantId;\n\t\tconst streamSourceInfo = new StreamSourceInfo(undefined, undefined);\n\t\tconst mediaStream = new MediaStream();\n\t\tconst localStream = new LocalStream(mediaStream, streamSourceInfo);\n\t\tthis.localSrc = localStream;\n\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t};\n\n\tscreenShare = async () => {\n\t\tif (this.togglingScreenShare) {\n\t\t\treturn;\n\t\t}\n\t\tthis.togglingScreenShare = true;\n\t\tconst offer = this.newOffer(false, false, true);\n\t\tif (!this.localScreenSrc) {\n\t\t\ttry {\n\t\t\t\tconst screenStream = await this.getStream(false, false, true);\n\t\t\t\tthis.localScreenSrc = screenStream;\n\t\t\t\tconst screenTrack = screenStream.mediaStream.getVideoTracks()[0];\n\t\t\t\tthis.conferenceInfo.screenTrackId = screenTrack.id;\n\t\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.SCREEN_SHARE, false, false, true);\n\n\t\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\t\tif (!eventResponse.ok) {\n\t\t\t\t\tthis.conferenceInfo.screenTrackId = null;\n\t\t\t\t\tthis.conferenceInfo.isScreen = false;\n\t\t\t\t\tscreenTrack.stop();\n\t\t\t\t\treturn this.handleEventFailureResponse(eventResponse);\n\t\t\t\t}\n\n\t\t\t\tthis.bindOnTrackEndedEventListener(screenTrack);\n\t\t\t\tthis.localSrc.mediaStream.addTrack(screenTrack);\n\t\t\t\tthis.localSrc.source.video = 'screen-cast';\n\n\t\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\t\t\tthis.emit('screensharing', { localSrc: this.localSrc, activeSrc: this.localScreenSrc, localScreenSrc: this.localScreenSrc });\n\t\t\t} catch (err) {\n\t\t\t\tthis.handelMediaStreamError(err);\n\t\t\t} finally {\n\t\t\t\tthis.togglingScreenShare = false;\n\t\t\t}\n\t\t} else {\n\t\t\tconst videoTracks = this.localSrc.mediaStream.getVideoTracks();\n\t\t\tconst screenTrack = this.localScreenSrc.mediaStream.getVideoTracks()[0];\n\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.SCREEN_SHARE, false, false, true);\n\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\tif (!eventResponse.ok) {\n\t\t\t\tthis.conferenceInfo.screenTrackId = screenTrack.id;\n\t\t\t\tthis.conferenceInfo.isScreen = true;\n\t\t\t\treturn this.handleEventFailureResponse(eventResponse);\n\t\t\t}\n\n\t\t\tfor (let i = 0; i < videoTracks.length; i += 1) {\n\t\t\t\tif (videoTracks[i].id === screenTrack.id) {\n\t\t\t\t\tthis.localScreenSrc.mediaStream.getVideoTracks()[0].stop();\n\t\t\t\t\tthis.localSrc.mediaStream.getVideoTracks()[i].stop();\n\t\t\t\t\tthis.localScreenSrc = null;\n\t\t\t\t\tthis.localSrc.mediaStream.removeTrack(this.localSrc.mediaStream.getVideoTracks()[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\t\tthis.emit('screensharing', { localSrc: this.localSrc, activeSrc: this.localSrc, localScreenSrc: this.localScreenSrc });\n\t\t\tthis.togglingScreenShare = false;\n\t\t}\n\t};\n\n\ttoggleAudio = async () => {\n\t\tif (this.localSrc.mediaStream.getAudioTracks().length && this.conferenceInfo.callType !== CallTypes.MONITORING) {\n\t\t\tconst audioTrack = this.localSrc.mediaStream.getAudioTracks()[0];\n\t\t\tif (!audioTrack.enabled) {\n\t\t\t\t// check if user changed permissions for mic during the call\n\t\t\t\tconst status = await this.getInputStreamsStatus();\n\t\t\t\tif (!status.mic.available || !status.mic.permission) {\n\t\t\t\t\tthis.logger.error('No mic or permission available on audio toggle');\n\t\t\t\t\treturn {\n\t\t\t\t\t\terror: 'No mic or permission available',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.conferenceInfo.isAudio) {\n\t\t\t\tthis.conferenceInfo.audioTrackId = audioTrack.id;\n\t\t\t}\n\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.AUDIO, true, false, false);\n\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\tif (!eventResponse.ok) {\n\t\t\t\tthis.conferenceInfo.isAudio = !this.conferenceInfo.isAudio;\n\t\t\t\tthis.conferenceInfo.audioTrackId = this.conferenceInfo.isAudio ? audioTrack.id : null;\n\t\t\t\treturn this.handleEventFailureResponse(eventResponse.failureReason);\n\t\t\t}\n\t\t\taudioTrack.enabled = !audioTrack.enabled;\n\t\t\tthis.emit('toggle-audio');\n\t\t} else {\n\t\t\t// case for patient view because the call starts with no tracks so we need to add the audio track\n\t\t\ttry {\n\t\t\t\tconst audioStream = await this.getStream(true, false, false);\n\t\t\t\tconst audioTrack = audioStream.mediaStream.getAudioTracks()[0];\n\t\t\t\tlet stream = audioStream;\n\n\t\t\t\tconst offer = this.newOffer(true, false, false);\n\t\t\t\t// created manually the toggle info object because with each feed we need the toggle info like this\n\t\t\t\tconst toggleInfo = {\n\t\t\t\t\tstreamType: StreamTypes.AUDIO,\n\t\t\t\t\tisAudio: true,\n\t\t\t\t\tisVideo: false,\n\t\t\t\t\tisScreen: false,\n\t\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\t\tactioneeParticipantId: offer.actioneeParticipantId,\n\t\t\t\t\taudioTrackId: audioTrack.id,\n\t\t\t\t\tvideoTrackId: null,\n\t\t\t\t\tscreenTrackId: null,\n\t\t\t\t};\n\t\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\t\tif (!eventResponse.ok) {\n\t\t\t\t\taudioTrack.stop();\n\t\t\t\t\tif (eventResponse.failureReason === ToggleFailureReasonEnum.DEVICE_LOCKED) {\n\t\t\t\t\t\treturn { error: eventResponse };\n\t\t\t\t\t}\n\t\t\t\t\treturn this.handleEventFailureResponse(eventResponse);\n\t\t\t\t}\n\n\t\t\t\tif (this.conferenceInfo.callType !== CallTypes.MONITORING) {\n\t\t\t\t\tthis.localSrc.mediaStream.addTrack(audioStream.mediaStream.getAudioTracks()[0]);\n\t\t\t\t\tthis.localSrc.source.audio = 'mic';\n\t\t\t\t\tstream = this.localSrc;\n\t\t\t\t\tthis.emit('toggle-audio');\n\t\t\t\t}\n\n\t\t\t\tthis.bindOnTrackEndedEventListener(audioTrack, offer.actioneeParticipantId);\n\n\t\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, stream, offer);\n\t\t\t\treturn audioStream;\n\t\t\t} catch (err) {\n\t\t\t\treturn {\n\t\t\t\t\terror: this.handelMediaStreamError(err),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t};\n\n\ttoggleVideo = async () => {\n\t\tif (this.togglingVideo) {\n\t\t\treturn;\n\t\t}\n\t\tthis.togglingVideo = true;\n\t\tconst offer = this.newOffer(false, true, false);\n\t\tif (!this.hasCameraTrack()) {\n\t\t\ttry {\n\t\t\t\tconst videoStream = await this.getStream(false, true, false);\n\t\t\t\tconst videoTrack = videoStream.mediaStream.getVideoTracks()[0];\n\t\t\t\tthis.conferenceInfo.videoTrackId = videoTrack.id;\n\t\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.VIDEO, false, true);\n\t\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\t\tif (!eventResponse.ok) {\n\t\t\t\t\tthis.conferenceInfo.videoTrackId = null;\n\t\t\t\t\tthis.conferenceInfo.isVideo = false;\n\t\t\t\t\tvideoTrack.stop();\n\t\t\t\t\tthis.handleEventFailureResponse(eventResponse);\n\t\t\t\t\treturn {\n\t\t\t\t\t\terror: 'camera blocked',\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tthis.localSrc.mediaStream.addTrack(videoStream.mediaStream.getVideoTracks()[0]);\n\t\t\t\tthis.localSrc.source.video = 'camera';\n\n\t\t\t\t// if there are 2 tracks, perform this to change positions of the track\n\t\t\t\tif (this.localSrc.mediaStream.getVideoTracks().length === 2) {\n\t\t\t\t\tconst screensharingTrack = this.localSrc.mediaStream.getVideoTracks()[0];\n\t\t\t\t\tthis.localSrc.mediaStream.removeTrack(screensharingTrack);\n\t\t\t\t\tthis.localSrc.mediaStream.addTrack(screensharingTrack);\n\t\t\t\t}\n\n\t\t\t\tthis.bindOnTrackEndedEventListener(videoTrack, offer.actioneeParticipantId);\n\n\t\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\t\t\tthis.emit('toggle-video', { hasVideoTrack: true });\n\t\t\t} catch (err) {\n\t\t\t\treturn {\n\t\t\t\t\terror: this.handelMediaStreamError(err),\n\t\t\t\t};\n\t\t\t} finally {\n\t\t\t\tthis.togglingVideo = false;\n\t\t\t}\n\t\t} else {\n\t\t\tconst videoTrack = this.localSrc.mediaStream.getVideoTracks()[0];\n\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.VIDEO, false, true);\n\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\tif (!eventResponse.ok) {\n\t\t\t\tthis.conferenceInfo.videoTrackId = videoTrack.id;\n\t\t\t\tthis.conferenceInfo.isVideo = true;\n\t\t\t\tthis.handleEventFailureResponse(eventResponse);\n\t\t\t\treturn {\n\t\t\t\t\terror: 'camera blocked',\n\t\t\t\t};\n\t\t\t}\n\t\t\tthis.localSrc.mediaStream.getVideoTracks()[0].stop();\n\t\t\tthis.localSrc.mediaStream.removeTrack(this.localSrc.mediaStream.getVideoTracks()[0]);\n\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\t\tthis.emit('toggle-video', { hasVideoTrack: false });\n\t\t\tthis.togglingVideo = false;\n\t\t}\n\t};\n\n\t/**\n\t * Method checks if there is a camera track\n\t * @returns {boolean}\n\t * */\n\thasCameraTrack() {\n\t\tconst { localSrc, localScreenSrc } = this;\n\n\t\t// if no screensharing, video track should be in localSrc\n\t\tif (!localScreenSrc) return !!localSrc.mediaStream.getVideoTracks().length;\n\n\t\t// if yes screensharing, check the tracks in localSrc if there exists one with different track id\n\t\tif (localSrc) {\n\t\t\tconst screenTrack = localScreenSrc.mediaStream.getVideoTracks()[0];\n\t\t\tconst videoTracks = localSrc.mediaStream.getVideoTracks();\n\t\t\tfor (let i = 0; i < videoTracks.length; i++) {\n\t\t\t\tif (screenTrack.id !== videoTracks[i].id) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\thandleEventFailureResponse = eventResponse => {\n\t\tthis.emit('event-failure', eventResponse);\n\t\tthis.logger.warn('Event failure response', { eventResponse });\n\t\treturn null;\n\t};\n\n\ttoggleEvent = (_streamType, _isAudio, _isVideo, _isScreen, _actioneeParticipantId) => {\n\t\tif (_isAudio) this.conferenceInfo.isAudio = !this.conferenceInfo.isAudio;\n\t\tif (_isVideo) this.conferenceInfo.isVideo = !this.conferenceInfo.isVideo;\n\t\tif (_isScreen) this.conferenceInfo.isScreen = !this.conferenceInfo.isScreen;\n\n\t\tif (!this.conferenceInfo.isAudio) {\n\t\t\tthis.conferenceInfo.audioTrackId = null;\n\t\t}\n\t\tif (!this.conferenceInfo.isVideo) {\n\t\t\tthis.conferenceInfo.videoTrackId = null;\n\t\t}\n\t\tif (!this.conferenceInfo.isScreen) {\n\t\t\tthis.conferenceInfo.screenTrackId = null;\n\t\t}\n\n\t\tconst toggleInfo = {\n\t\t\tstreamType: _streamType,\n\t\t\tisAudio: this.conferenceInfo.isAudio,\n\t\t\tisVideo: this.conferenceInfo.isVideo,\n\t\t\tisScreen: this.conferenceInfo.isScreen,\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: _actioneeParticipantId,\n\t\t\taudioTrackId: this.conferenceInfo.audioTrackId,\n\t\t\tvideoTrackId: this.conferenceInfo.videoTrackId,\n\t\t\tscreenTrackId: this.conferenceInfo.screenTrackId,\n\t\t};\n\n\t\treturn toggleInfo;\n\t};\n\n\trequestToChangeBitrate = data => {\n\t\tthis.p2p.sendMessageToSignaling(SocketEvents.Conference.PARTICIAPNT_CHANGE_BITRATE, data);\n\t};\n\n\tbindP2pEvents = () => {\n\t\tconst { p2p } = this;\n\t\tp2p.addEventListener('streamadded', e => {\n\t\t\tif (e.stream.source.audio || e.stream.source.video) {\n\t\t\t\tconst hasAudioTrack = e.stream.mediaStream.getAudioTracks().length > 0;\n\t\t\t\tconst hasVideoTrack = e.stream.mediaStream.getVideoTracks().length > 0;\n\t\t\t\tconst participant = this.getParticipantByParticipantId(e.stream.origin);\n\t\t\t\tObject.assign(this.participants[participant.objectId], {\n\t\t\t\t\thasAudioTrack,\n\t\t\t\t\thasVideoTrack,\n\t\t\t\t});\n\n\t\t\t\tthis.emit('peer-stream', { peerSrc: e.stream, activeSrc: e.stream, participantId: e.origin });\n\t\t\t}\n\t\t});\n\n\t\tp2p.addEventListener('remoteDescriptionSet', ({ origin }) => {\n\t\t\tthis.emit('remoteStreamChanged', origin);\n\t\t});\n\t};\n\n\tping = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (!this.isIoConnected()) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\treject();\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t\tthis.socket.emit(SocketEvents.Client.PING, ({ pong }) => {\n\t\t\t\t\tresolve(pong);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tpromiseTimeout = (ms, promise) => {\n\t\t// Create a promise that rejects in milliseconds\n\t\tlet timeout = new Promise((resolve, reject) => {\n\t\t\tlet id = setTimeout(() => {\n\t\t\t\tclearTimeout(id);\n\t\t\t\treject();\n\t\t\t}, ms);\n\t\t});\n\n\t\t// Returns a race between our timeout and the passed in promise\n\t\treturn Promise.race([promise, timeout]);\n\t};\n\n\tcheckIfConnectedToSignaling = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst checkIfConnected = async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst pong = await this.promiseTimeout(1000, this.ping());\n\t\t\t\t\tif (pong) {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject();\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tcheckIfConnected();\n\t\t\t\t}\n\t\t\t};\n\t\t\tcheckIfConnected();\n\t\t});\n\t};\n\n\thandleReconnectingWithParticipant = async (participantId, stream = this.localSrc) => {\n\t\t// check for network and signaling\n\t\t// if connection state failed because of network then execute reconnect when the network is up\n\t\tawait this.checkIfConnectedToSignaling();\n\t\tif (this.conferenceInfo) {\n\t\t\tconst response = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.PARTICIPANT_RECONNECT, {\n\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\tisAudio: this.conferenceInfo.isAudio,\n\t\t\t\tisVideo: this.conferenceInfo.isVideo,\n\t\t\t\tisScreen: this.conferenceInfo.isScreen,\n\t\t\t});\n\n\t\t\tif (response.isActive) {\n\t\t\t\tconst participant = response.participants.find(p => p.id === participantId);\n\t\t\t\tif (participant.state === ParticipantState.CONNECTING.type || participant.state === ParticipantState.CONNECTED.type) {\n\t\t\t\t\tconst p2pChannel = this.p2p.getChannel(participant.id);\n\t\t\t\t\tconst rtcPeerConnection = p2pChannel.getRTCPeerConnection();\n\t\t\t\t\tconst { connectionState, iceConnectionState } = rtcPeerConnection;\n\t\t\t\t\tif (connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED || connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CLOSED) {\n\t\t\t\t\t\t// close this peer connection and make a new one after with the same participant\n\t\t\t\t\t\tif (connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CLOSED) {\n\t\t\t\t\t\t\tthis.logger.debug(`Close peer connection and create a new one on reconnect \\nactioneeParticipantId ${participant.id}`);\n\t\t\t\t\t\t\tthis.p2p.stop(participant.id);\n\t\t\t\t\t\t\tthis.p2p.allowedRemoteIds.push(participant.id);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.callerParticipantId = participant.id;\n\t\t\t\t\t\tconst offer = this.newOffer(this.conferenceInfo.isAudio, this.conferenceInfo.isVideo, this.conferenceInfo.isScreen);\n\t\t\t\t\t\tif (iceConnectionState === RTCPeerConnectionEnum.ICE_CONNECTION_STATE.DISCONNECTED) {\n\t\t\t\t\t\t\tthis.logger.debug(`ICE restart on reconnect \\nactioneeParticipantId ${participant.id}`);\n\t\t\t\t\t\t\tObject.assign(offer, { iceRestart: true });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (stream) {\n\t\t\t\t\t\t\tthis.p2p.publish(participant.id, stream, offer, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.emit('participant-status', {\n\t\t\t\t\t\tstatus: participant.state,\n\t\t\t\t\t\tobjectId: participant.objectId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.DROPPED });\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Method used to bind MediaStreamTrack.ended event to local track\n\t * @function onTrackEndedEventListener\n\t * @param {MediaStreamTrack} track\n\t * @param {string} [actioneeParticipantId] Remote id\n\t */\n\tbindOnTrackEndedEventListener = (track, actioneeParticipantId) => {\n\t\ttrack.removeEventListener('ended', () => this.onTrackEndedEventListener(track, actioneeParticipantId));\n\t\ttrack.addEventListener('ended', () => this.onTrackEndedEventListener(track, actioneeParticipantId));\n\t};\n\n\tonTrackEndedEventListener = async (track, actioneeParticipantId) => {\n\t\tif (this.conferenceInfo.isScreen && !!this.localScreenSrc) {\n\t\t\tthis.screenShare();\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputDevices = (await navigator.mediaDevices.enumerateDevices()).filter(device => device.kind === `${track.kind}input`);\n\t\tconst trackDeviceNotFound = !inputDevices.some(device => device.groupId === track.getSettings().groupId);\n\n\t\tconst trackType = track.kind === 'audio' ? 'Audio' : 'Video';\n\t\tconst localTrack = this.localSrc.mediaStream[`get${trackType}Tracks`]().find(t => t.id === track.id);\n\t\tif (localTrack) {\n\t\t\tlocalTrack.stop();\n\t\t\tthis.localSrc.mediaStream.removeTrack(localTrack);\n\t\t}\n\t\tthis.removeTrackById(actioneeParticipantId, track.id);\n\t\tthis.emit(`local-${track.kind}-error`, { participantId: actioneeParticipantId, inputDevices, trackDeviceNotFound });\n\n\t\tlet message = `${trackType} track has ended.`;\n\t\tif (trackDeviceNotFound) {\n\t\t\tmessage += ` ${trackType} input device that was being used is not found!`;\n\t\t} else if (!trackDeviceNotFound && inputDevices.length) {\n\t\t\tmessage += ` ${trackType} input devices disabled!`;\n\t\t} else if (!inputDevices.length) {\n\t\t\tmessage += ` No ${trackType} input device found!`;\n\t\t}\n\n\t\tthis.publishConferenceLog(message, { actioneeParticipantId, inputDevices });\n\t};\n\n\t/**\n\t * Send leave conference event\n\t * @param {object} leaveData\n\t * @param {string} leaveData.participantId\n\t * @param {string} leaveData.conferenceId\n\t * @param {number} [leaveData.leaveReason]\n\t * @returns {Promise} Ack promise\n\t */\n\tsendLeaveEvent = leaveData => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.LEAVE, leaveData);\n\t};\n\n\tstopTracks = stream => {\n\t\tif (stream && stream.mediaStream) {\n\t\t\tconst tracks = stream.mediaStream.getTracks();\n\t\t\tfor (const track of tracks) {\n\t\t\t\ttrack.stop();\n\t\t\t}\n\t\t}\n\t};\n\n\tendCall = ({ endReason }) => {\n\t\tthis.logger.debug(`Trying to end the call`, { endReason, endingCall: this.endingCall });\n\t\tif (!this.endingCall) {\n\t\t\tthis.endingCall = true;\n\t\t\tconst shouldCloseSocket = this.conferenceInfo.callType !== CallTypes.MONITORING || endReason === ConferenceEndReason.DROPPED;\n\t\t\tconst leaveData = {\n\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t};\n\n\t\t\tif (endReason === ConferenceEndReason.PARTICIPANT_PASSWORD_CHANGED) {\n\t\t\t\tleaveData.leaveReason = ParticipantRemoveReason.PASSWORD_CHANGED;\n\t\t\t} else if (endReason === ConferenceEndReason.PARTICIPANT_IDLE) {\n\t\t\t\tleaveData.leaveReason = ParticipantRemoveReason.IDLE;\n\t\t\t} else if (endReason === ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR) {\n\t\t\t\tleaveData.leaveReason = ParticipantRemoveReason.CONFERENCE_TERMINATED_BY_ADMINISTRATOR;\n\t\t\t}\n\n\t\t\tthis.clearManager();\n\t\t\tthis.sendLeaveEvent(leaveData);\n\t\t\tif (shouldCloseSocket) {\n\t\t\t\tthis.closeSocket();\n\t\t\t}\n\t\t\tthis.emit('end-call', { endReason });\n\t\t}\n\t};\n\n\tcloseSocket = () => {\n\t\tif (this.conferenceInfo?.callType === CallTypes.MONITORING) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Disable this tab from receiveing any more calls by closing it's socket\n\t\tthis.logger.info('Disconnecting socket...', { id: this.socket.id });\n\t\tthis.socket.removeAllListeners();\n\t\tthis.socket.close();\n\t};\n\n\tclearManager = () => {\n\t\tthis.conferenceInfo = null;\n\t\tthis.callStartedOrJoined = false;\n\t\tthis.stopTracks(this.localSrc);\n\t\tthis.stopTracks(this.localScreenSrc);\n\t\tthis.clearAndDeleteTimers({ timers: this.outGoingCallTimer });\n\t\tthis.reAddToMonitoringIntervals.clear();\n\t\tif (this._useCallStats) {\n\t\t\tthis._callStats.stop();\n\t\t}\n\t\tObject.values(this.participants).forEach(participant => {\n\t\t\tthis.p2p.stop(participant.id);\n\t\t});\n\t\tthis.participants = {};\n\t};\n\n\t/**\n\t * Method used to clear and delete timers\n\t * @function clearAndDeleteTimers\n\t * @param {Object} data\n\t * @param {Object} data.timers\n\t */\n\tclearAndDeleteTimers = data => {\n\t\tconst { timers } = data;\n\n\t\tif (timers) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const key in timers) {\n\t\t\tclearTimeout(timers[key]);\n\t\t\tdelete timers[key];\n\t\t}\n\t};\n\n\ttoggleParticipantTrack = async (trackType, isTrackMuted, actioneeParticipantId = this.callerParticipantId) => {\n\t\t// only updating hasAudioTrack and hasVideoTrack for participant when isTrackMuted is true because streamAdded won't be called after the participant removes a track\n\t\t// if isTrackMuted is false than streamAdded will be called and hasAudioTrack and hasVideoTrack will be updated\n\t\tif (isTrackMuted) {\n\t\t\tconst participant = this.getParticipantByParticipantId(actioneeParticipantId);\n\t\t\tif (trackType === CallTypes.AUDIO) {\n\t\t\t\tthis.participants[participant.objectId].hasAudioTrack = false;\n\t\t\t} else {\n\t\t\t\tthis.participants[participant.objectId].hasVideoTrack = false;\n\t\t\t}\n\t\t}\n\n\t\tconst data = {\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tactioneeParticipantId,\n\t\t\ttype: trackType,\n\t\t\tmuted: isTrackMuted,\n\t\t};\n\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.TRACK_TOGGLE, data);\n\t};\n\n\t/**\n\t * Method used to send move camera event\n\t * @function panTiltCamera\n\t * @param {object} data\n\t * @param {string} data.direction\n\t * @param {string} data.action\n\t * @param {string} data.participantId\n\t * @param {string} data.conferenceId\n\t * @param {number} data.helloDeviceId\n\t * @param {number} [data.level]\n\t */\n\tpanTiltCamera = async data => {\n\t\ttry {\n\t\t\tconst response = await this.p2p.sendMessageToSignaling(SocketEvents.HelloDevice.MOVE_CAMERA, data);\n\n\t\t\treturn response;\n\t\t} catch (error) {\n\t\t\tconst returnData = { error };\n\t\t\tthis.logger.warn('Camera tilt event send failed!', returnData);\n\t\t\treturn returnData;\n\t\t}\n\t};\n\n\t/**\n\t * Method used to send zoom or switch camera event\n\t * @function sendCameraEvent\n\t * @param {string} eventType\n\t * @param {object} data\n\t * @param {string} data.participantId\n\t * @param {string} data.conferenceId\n\t * @param {number} data.helloDeviceId\n\t * @param {number} [data.level]\n\t */\n\tsendCameraEvent = async (eventType, data) => {\n\t\tif (this.cameraEventInProgress) {\n\t\t\treturn { cameraEventInProgress: true };\n\t\t}\n\n\t\tthis.cameraEventInProgress = true;\n\n\t\t// If no ack is received from camera enable the controls after 3 seconds\n\t\tif (this.cameraEventTimeout) {\n\t\t\tclearTimeout(this.cameraEventTimeout);\n\t\t}\n\t\tthis.cameraEventTimeout = setTimeout(() => {\n\t\t\tif (this.cameraEventInProgress) {\n\t\t\t\tthis.cameraEventInProgress = false;\n\t\t\t}\n\t\t}, 3000);\n\n\t\ttry {\n\t\t\tconst response = await this.p2p.sendMessageToSignaling(eventType, data);\n\n\t\t\treturn response;\n\t\t} catch (error) {\n\t\t\tconst returnData = { error };\n\t\t\tthis.logger.warn(`'${eventType}'`, 'event send failed!', returnData);\n\t\t\treturn returnData;\n\t\t}\n\t};\n\n\tserialCommandsTv = (serialCommand, isVolume, deviceId, conferenceId, participantId) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.HelloDevice.ON_TOGGLE_TV, {\n\t\t\ttvStatus: serialCommand,\n\t\t\tisVolume: isVolume,\n\t\t\thelloDeviceId: deviceId,\n\t\t\tconferenceId: conferenceId,\n\t\t\tparticipantId: participantId,\n\t\t});\n\t};\n\n\ttoggleNightVision = (nightVisionMode, deviceId, conferenceId, participantId) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.HelloDevice.TOGGLE_NIGHTVISION, {\n\t\t\thelloDeviceId: deviceId,\n\t\t\ttoggleNightVision: nightVisionMode,\n\t\t\tconferenceId: conferenceId,\n\t\t\tparticipantId: participantId,\n\t\t});\n\t};\n\n\ttogglePatientAtRiskAlert = ({ conferenceId, participantId, actioneeParticipantId, data }) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.ALERT_PATIENT_AT_RISK, {\n\t\t\tconferenceId,\n\t\t\tparticipantId,\n\t\t\tactioneeParticipantId,\n\t\t\tdata,\n\t\t});\n\t};\n\n\t/**\n\t * This method is used to get the stream for these cases:\n\t * F,F,F -> monitoring or patient view\n\t * F,F,T -> only screenshare\n\t * F,T,F -> only video\n\t * F,T,T -> we don't support this case (video && screenshare)\n\t * T,F,F -> only audio\n\t * T,F,T -> we don't support this case (audio && screenshare)\n\t * T,T,F -> audio and video\n\t * T,T,T -> we don't support this case (audio && video && screenshare)\n\t * @param {boolean} isAudio\n\t * @param {boolean} isVideo\n\t * @param {boolean} isScreenshare\n\t * @returns {LocalStream}\n\t */\n\tgetStream = (isAudio, isVideo, isScreenshare) => {\n\t\treturn new Promise(async (resolve, reject) => {\n\t\t\tif ((isAudio && isScreenshare) || (isVideo && isScreenshare) || (isAudio && isVideo && isScreenshare)) {\n\t\t\t\treject(`Can't get this stream!`);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet streamSourceInfo;\n\t\t\tlet streamConstraints;\n\n\t\t\tif (isAudio && !isVideo) {\n\t\t\t\t// only audio\n\t\t\t\tconst audioConstraintsForMic = new AudioTrackConstraints(AudioSourceInfo.MIC);\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo('mic', undefined);\n\t\t\t\tstreamConstraints = new StreamConstraints(audioConstraintsForMic);\n\t\t\t} else if (isAudio && isVideo) {\n\t\t\t\t// audio and video\n\t\t\t\tconst audioConstraintsForMic = new AudioTrackConstraints(AudioSourceInfo.MIC);\n\t\t\t\tconst videoConstraintsForCamera = new VideoTrackConstraints(VideoSourceInfo.CAMERA);\n\t\t\t\tvideoConstraintsForCamera.resolution = { width: 1280, height: 720 };\n\t\t\t\tvideoConstraintsForCamera.frameRate = 30;\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo('mic', 'camera');\n\t\t\t\tstreamConstraints = new StreamConstraints(audioConstraintsForMic, videoConstraintsForCamera);\n\t\t\t} else if (isVideo) {\n\t\t\t\t// only video\n\t\t\t\tconst videoConstraintsForCamera = new VideoTrackConstraints(VideoSourceInfo.CAMERA);\n\t\t\t\tvideoConstraintsForCamera.resolution = { width: 1280, height: 720 };\n\t\t\t\tvideoConstraintsForCamera.frameRate = 30;\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo(undefined, 'camera');\n\t\t\t\tstreamConstraints = new StreamConstraints(undefined, videoConstraintsForCamera);\n\t\t\t} else if (isScreenshare) {\n\t\t\t\t// only screenshare\n\t\t\t\tconst videoConstraintsForCamera = new VideoTrackConstraints(VideoSourceInfo.SCREENCAST);\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo(undefined, 'screen-cast');\n\t\t\t\tstreamConstraints = new StreamConstraints(false, videoConstraintsForCamera);\n\t\t\t} else {\n\t\t\t\t// monitoring or patient view\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo(undefined, undefined);\n\t\t\t\tconst mediaStream = new MediaStream();\n\t\t\t\tconst stream = new LocalStream(mediaStream, streamSourceInfo);\n\t\t\t\tresolve(stream);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst mediaStream = await MediaStreamFactory.createMediaStream(streamConstraints);\n\t\t\t\tconst stream = new LocalStream(mediaStream, streamSourceInfo);\n\t\t\t\tresolve(stream);\n\t\t\t\treturn;\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t};\n\n\thandelMediaStreamError = error => {\n\t\tthis.logger.error('GET USER MEDIA ERROR:', { error });\n\t\tlet errorType = StreamError.CANT_ACCESS_MEDIA_STREAM;\n\n\t\tif (error.name === 'NotFoundError' || error.name === 'DevicesNotFoundError') {\n\t\t\terrorType = StreamError.DEVICE_NOT_FOUND;\n\t\t} else if (error.name === 'NotReadableError') {\n\t\t\terrorType = error.message.includes('audio') ? StreamError.MICROPHONE_NOT_FOUND : StreamError.CAMERA_NOT_FOUND;\n\t\t} else if (error.name === 'TrackStartError') {\n\t\t\terrorType = StreamError.NOT_READABLE_ERROR;\n\t\t} else if (error.name === 'NotAllowedError') {\n\t\t\terrorType = StreamError.STREAM_NOT_ALLOWED;\n\t\t} else if (error.name === 'PermissionDismissedError') {\n\t\t\terrorType = StreamError.PERMISSION_DISMISSED;\n\t\t}\n\n\t\treturn errorType;\n\t};\n\n\tstartReAddFeedInterval = ({ id, objectId, state = null }, byPassStateCheck = false) => {\n\t\tconst retryParticipantStates = [ParticipantState.LEFT_CALL.type, ParticipantState.DISCONNECTED.type];\n\t\tif (byPassStateCheck && !retryParticipantStates.includes(state)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.p2p.allowedRemoteIds.push(id);\n\n\t\tthis.emit('re-add-feed', { objectId });\n\n\t\tthis.addDeviceToMonitoring({\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tparticipant: {\n\t\t\t\tobjectType: ObjectType.HELLO_DEVICE,\n\t\t\t\tobjectId,\n\t\t\t},\n\t\t});\n\n\t\tif (!this.reAddToMonitoringIntervals.get(objectId)) {\n\t\t\tthis.reAddToMonitoringIntervals.set(\n\t\t\t\tobjectId,\n\t\t\t\tsetInterval(() => {\n\t\t\t\t\tif (!this.conferenceInfo || (byPassStateCheck && !retryParticipantStates.includes(state))) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.addDeviceToMonitoring({\n\t\t\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\t\t\tparticipant: {\n\t\t\t\t\t\t\tobjectType: ObjectType.HELLO_DEVICE,\n\t\t\t\t\t\t\tobjectId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}, 10000)\n\t\t\t);\n\t\t}\n\t};\n\n\t/**\n\t * This function binds socket listeners needed in a call\n\t */\n\tbindSocketEventListeners = (playSound = true, shouldCloseSocket = true) => {\n\t\tthis.bindOn(SocketEvents.Conference.ON_RINGING, async () => {\n\t\t\tif (playSound) {\n\t\t\t\tawait outGoingCallSound();\n\t\t\t}\n\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_TRANSFERRED_TO_ANOTHER_CLIENT, data => {\n\t\t\t\tif (this.conferenceInfo && this.conferenceInfo.conferenceId === data.conferenceId) {\n\t\t\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.ABORTED });\n\t\t\t\t\tthis.clearManager();\n\t\t\t\t\tif (shouldCloseSocket) {\n\t\t\t\t\t\tthis.closeSocket();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_DECLINED, data => {\n\t\t\t\tthis.stopTracks(this.localSrc);\n\t\t\t\tstopOutgoingCallSound();\n\t\t\t\tthis.updateParticipantStatus(ParticipantState.DECLINED.type, data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_OFFLINE, this.updateParticipantStatus.bind(this, ParticipantState.OFFLINE.type))\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_OFFLINE, this.updateParticipantStatus.bind(this, ParticipantState.OFFLINE.type))\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_BUSY, data => {\n\t\t\t\tthis.emit('participant-busy', data);\n\t\t\t\tif (data.objectId) {\n\t\t\t\t\tthis.clearOutGoingCallTimerForParticipant({ objectId: data.objectId });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_LEFT, data => {\n\t\t\t\tconst { conferenceId, participantId, reason } = data;\n\n\t\t\t\tconst participant = this.getParticipantByParticipantId(participantId);\n\t\t\t\tif (!this.conferenceInfo || this.conferenceInfo.conferenceId !== conferenceId || !participant) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tparticipant.state = ParticipantState.LEFT_CALL.type;\n\t\t\t\tthis.p2p.stop(participant.id);\n\n\t\t\t\tif (\n\t\t\t\t\tthis.conferenceInfo.callType === CallTypes.MONITORING &&\n\t\t\t\t\t[ParticipantRemoveReason.DISCONNECTED, ParticipantRemoveReason.DISCONNECTED_PARTICIPANT_CLEANUP].includes(reason) &&\n\t\t\t\t\tparticipant.isOnline\n\t\t\t\t) {\n\t\t\t\t\tthis.startReAddFeedInterval(participant);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.updateParticipantStatus(ParticipantState.LEFT_CALL.type, { objectId: participant.objectId, reason });\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_TV_RESPONSE, data => {\n\t\t\t\tthis.emit('tv-commands', data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_CAMERA_RESPONSE, data => {\n\t\t\t\tthis.cameraEventInProgress = false;\n\t\t\t\tthis.emit('camera-response', data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_INITIAL_STATE, data => {\n\t\t\t\tthis.emit('initial-device-state', data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_AUDIO_OUTPUT_DEVICE, data => {\n\t\t\t\t// just for loging the error\n\t\t\t\tif (!data.isSwitchSuccessful) {\n\t\t\t\t\tthis.logger.error(\n\t\t\t\t\t\t`Switch was not successful! Current audio device is ${AudioOutputDevice.HELLO === data.audioOutputDevice ? 'Banyan Bridge' : 'Pillow Speaker'}`,\n\t\t\t\t\t\t{ data }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthis.emit('audio-output-changed', data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_ENDED, async data => {\n\t\t\t\t// if conferenceInfo exists on conference ended event it means that the remote peer ended the call\n\t\t\t\t// so we need only to clean up and we don't need to send a leave event\n\t\t\t\tif (this.conferenceInfo && this.conferenceInfo.conferenceId === data.conferenceId) {\n\t\t\t\t\tif (data.reason === ConferenceEndReason.PARTICIPANT_INVITE_DENIED) {\n\t\t\t\t\t\t// if we're only trying to invite the participant with insufficient permissions\n\t\t\t\t\t\t// the call will end and only one participant will on the list of participants\n\t\t\t\t\t\tthis.deniedParticipant = { ...Object.values(this.conferenceInfo.participants)[0] };\n\t\t\t\t\t}\n\t\t\t\t\tthis.emit('end-call', {\n\t\t\t\t\t\tendReason: data.reason,\n\t\t\t\t\t\t...(data.reason === ConferenceEndReason.PARTICIPANT_INVITE_DENIED && { deniedParticipant: this.deniedParticipant }),\n\t\t\t\t\t});\n\t\t\t\t\tthis.clearManager();\n\t\t\t\t\tif (shouldCloseSocket) {\n\t\t\t\t\t\tthis.closeSocket();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (playSound) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\tConferenceEndReason.PARTICIPANT_OFFLINE,\n\t\t\t\t\t\t\t\tConferenceEndReason.PARTICIPANT_BUSY,\n\t\t\t\t\t\t\t\tConferenceEndReason.PARTICIPANT_NOT_ANSWERING,\n\t\t\t\t\t\t\t\tConferenceEndReason.PARTICIPANT_DECLINED,\n\t\t\t\t\t\t\t].indexOf(data.reason) !== -1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tawait busySound();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tawait dropSound();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_REMOVED, data => {\n\t\t\t\tconst { actioneeParticipantId } = data;\n\t\t\t\tconst participant = this.getParticipantByParticipantId(actioneeParticipantId);\n\t\t\t\tif (participant) {\n\t\t\t\t\tthis.updateParticipantStatus(ParticipantState.REMOVED.type, { objectId: participant.objectId });\n\t\t\t\t}\n\n\t\t\t\tconst hasPeerConnectionChannelForRemoteId = this.p2p.hasPeerConnectionChannelForRemoteId(actioneeParticipantId);\n\t\t\t\tif (hasPeerConnectionChannelForRemoteId) {\n\t\t\t\t\tthis.p2p.stop(actioneeParticipantId);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_NEW_PARTICIPANT, data => {\n\t\t\t\tconst { conferenceInfo } = this;\n\t\t\t\tconst { participant } = data;\n\t\t\t\tif (!this.outGoingCallTimer[participant.objectId]) {\n\t\t\t\t\tthis.logger.info('Out going call timer has been executed!', { data });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.clearOutGoingCallTimerForParticipant({ objectId: participant.objectId });\n\n\t\t\t\tif (conferenceInfo.callType === CallTypes.SECURITYCAM) {\n\t\t\t\t\tthis.cameraFeedCall();\n\t\t\t\t} else if (conferenceInfo.callType === CallTypes.MONITORING) {\n\t\t\t\t\tthis.clearMonitoringReAddInterval(participant.objectId);\n\t\t\t\t\tthis.monitoringSendOffer(participant.id);\n\t\t\t\t} else if (conferenceInfo.callType === CallTypes.AUDIO) {\n\t\t\t\t\tthis.audioCall();\n\t\t\t\t} else if (conferenceInfo.callType === CallTypes.VIDEO) {\n\t\t\t\t\tthis.videoCall();\n\t\t\t\t}\n\n\t\t\t\tconst { mediaStream } = this.localSrc;\n\t\t\t\tif (mediaStream) {\n\t\t\t\t\tmediaStream.getTracks().forEach(track => this.bindOnTrackEndedEventListener(track, participant.id));\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_UPDATE_PARTICIPANTS, data => {\n\t\t\t\tconst { conferenceInfo } = this;\n\t\t\t\tconst { allowedRemoteIds } = this.p2p;\n\t\t\t\tconst { conferenceId, participants } = data;\n\t\t\t\tif (conferenceInfo && conferenceId !== conferenceInfo.conferenceId) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (participants.length === 0) {\n\t\t\t\t\tthis.logger.warn('No participant to update', { data });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// we choose updateParticipants event to insert the new participants because those are all invited participants\n\t\t\t\t// even if they don't join we still get the information about the participant being invited for a call\n\t\t\t\t// we will use participant data to send leave or remove event later during the call\n\t\t\t\tconst participant = participants[0];\n\t\t\t\t// don't update the state for participant that left the call\n\t\t\t\tif (\n\t\t\t\t\tthis.participants[participant.objectId] &&\n\t\t\t\t\t(this.participants[participant.objectId].state === ParticipantState.DISCONNECTED.type ||\n\t\t\t\t\t\t(this.participants[participant.objectId].state === ParticipantState.LEFT_CALL.type && conferenceInfo.callType !== CallTypes.MONITORING))\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!allowedRemoteIds.includes(participant.id)) {\n\t\t\t\t\tthis.p2p.allowedRemoteIds.push(participant.id);\n\t\t\t\t}\n\t\t\t\t// add new participant or overwrite participant with the updates values\n\t\t\t\tif (!this.participants[participant.objectId]) {\n\t\t\t\t\tthis.participants[participant.objectId] = participant;\n\t\t\t\t} else {\n\t\t\t\t\tObject.assign(this.participants[participant.objectId], participant);\n\t\t\t\t}\n\t\t\t\tthis.emit('update-participant', participants);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Client.ON_CONNECT, async () => {\n\t\t\t\tthis.emit('socket-state', { socketState: SocketState.CONNECTED });\n\t\t\t\tif (this.reconnectTimer !== null) {\n\t\t\t\t\tclearTimeout(this.reconnectTimer);\n\t\t\t\t\tthis.reconnectTimer = null;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Client.ON_AUTHENTICATED, async () => {\n\t\t\t\tthis.socketAuthorizationResolve();\n\n\t\t\t\tif (this.conferenceInfo && this.callStartedOrJoined) {\n\t\t\t\t\tconst data = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.PARTICIPANT_RECONNECT, {\n\t\t\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\t\t\tisAudio: this.conferenceInfo.isAudio,\n\t\t\t\t\t\tisVideo: this.conferenceInfo.isVideo,\n\t\t\t\t\t\tisScreen: this.conferenceInfo.isScreen,\n\t\t\t\t\t});\n\t\t\t\t\tif (!data.isActive) {\n\t\t\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.DROPPED });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t// .off(SocketEvents.Client.ON_DISCONNECT)\n\t\t\t.bindOn(SocketEvents.Client.ON_DISCONNECT, reason => {\n\t\t\t\tthis.emit('socket-state', { socketState: SocketState.DISCONNECTED });\n\t\t\t\tthis.socketDisconnectReason = reason;\n\t\t\t\tif (reason === 'io client disconnect') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (reason === 'io server disconnect') {\n\t\t\t\t\tthis.socket.connect();\n\t\t\t\t}\n\n\t\t\t\t// if after 60 seconds we still don't have a connection than show view connection lost\n\t\t\t\tthis.reconnectTimer = setTimeout(() => {\n\t\t\t\t\tclearTimeout(this.reconnectTimer);\n\t\t\t\t\tthis.reconnectTimer = null;\n\t\t\t\t\tif (this.conferenceInfo) {\n\t\t\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.DROPPED });\n\t\t\t\t\t}\n\t\t\t\t}, 60000);\n\t\t\t})\n\t\t\t// .off(SocketEvents.Client.ON_RECONNECT)\n\t\t\t// .off(SocketEvents.Client.ON_RECONNECTING)\n\t\t\t// .off(SocketEvents.Client.ON_CONNECT_ERROR)\n\t\t\t.bindOn(SocketEvents.Client.ON_CONNECT_ERROR, () => {\n\t\t\t\tthis.logger.error('Socket server not responding', { id: this.socket.id });\n\t\t\t})\n\t\t\t.off(SocketEvents.User.ON_PASSWORD_CHANGED)\n\t\t\t.bindOn(SocketEvents.User.ON_PASSWORD_CHANGED, () => {\n\t\t\t\tif (!this.conferenceInfo) {\n\t\t\t\t\twindow.location.href = '/logout';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { callType } = this.conferenceInfo;\n\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.PARTICIPANT_PASSWORD_CHANGED });\n\t\t\t\tif (callType === CallTypes.MONITORING) {\n\t\t\t\t\twindow.location.href = '/logout';\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_TERMINATE_REQUEST, async data => {\n\t\t\t\tif (data.conferenceId === this.conferenceInfo.conferenceId) {\n\t\t\t\t\tconst response = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TERMINATE_REQUEST_ACCEPT, { conferenceId: data.conferenceId });\n\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\tif (response.failureReason === TerminateRequestFailureReasonEnum.NULL_TERMINATE_REQUEST) {\n\t\t\t\t\t\t\t// Terminate request was canceled\n\t\t\t\t\t\t\tthis.logger.warn('Terminate request was canceled', { data });\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Client.ON_DEVICE_ONLINE, ({ helloDeviceId: objectId }) => {\n\t\t\t\tconst participant = this.participants[objectId];\n\n\t\t\t\tif (!participant) {\n\t\t\t\t\tthis.emit('feed-is-online', { objectId });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tparticipant.isOnline = true;\n\n\t\t\t\tif (this.conferenceInfo.callType === CallTypes.MONITORING) {\n\t\t\t\t\tthis.startReAddFeedInterval(participant);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Client.ON_DEVICE_OFFLINE, ({ helloDeviceId: objectId }) => {\n\t\t\t\tconst participant = this.participants[objectId];\n\n\t\t\t\tif (!participant) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tparticipant.isOnline = false;\n\t\t\t});\n\n\t\treturn this;\n\t};\n\n\tunbindSocketEventListeners = () => {\n\t\tObject.entries(this.socketListeners).forEach(([event, cb]) => this.socket.off(event, cb));\n\n\t\treturn this;\n\t};\n\n\tupdateParticipantStatus = (status, data) => {\n\t\tconst objectId = data.objectId || data.helloDeviceId;\n\t\tthis.emit('participant-status', { status, objectId, reason: data?.reason });\n\t\tif (objectId) {\n\t\t\tconst participant = this.participants[objectId];\n\t\t\tif (participant && status === ParticipantState.OFFLINE.type) {\n\t\t\t\tparticipant.isOnline = false;\n\t\t\t}\n\t\t\tthis.clearOutGoingCallTimerForParticipant({ objectId });\n\t\t}\n\t};\n\n\tgetInputStreamsStatus = async () => {\n\t\tif (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n\t\t\tthis.logger.warn('enumerateDevices() not supported.');\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\t\tconst status = {\n\t\t\t\tmic: {\n\t\t\t\t\tavailable: false,\n\t\t\t\t\tpermission: false,\n\t\t\t\t},\n\t\t\t\tcam: {\n\t\t\t\t\tavailable: false,\n\t\t\t\t\tpermission: false,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tdevices.forEach(device => {\n\t\t\t\tif (device.kind === 'audioinput') {\n\t\t\t\t\tstatus.mic.available = true;\n\t\t\t\t\tif (device.label) {\n\t\t\t\t\t\tstatus.mic.permission = true;\n\t\t\t\t\t}\n\t\t\t\t} else if (device.kind === 'videoinput') {\n\t\t\t\t\tstatus.cam.available = true;\n\t\t\t\t\tif (device.label) {\n\t\t\t\t\t\tstatus.cam.permission = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn status;\n\t\t} catch (err) {\n\t\t\tthis.logger.error(`Can't enumerate devices. ${err.message}`);\n\t\t}\n\t};\n\n\tcheckForStreamPermissions = options => {\n\t\treturn new Promise(resolve => {\n\t\t\tconst { isAudio, isVideo } = options;\n\t\t\tconst streamInterval = setInterval(async () => {\n\t\t\t\tconst status = await this.getInputStreamsStatus();\n\t\t\t\tconst streamPermission = this.validateStreamStatus(isAudio, isVideo, status);\n\t\t\t\tif (!streamPermission) {\n\t\t\t\t\tthis.emit('stream-permission', null);\n\t\t\t\t\tclearInterval(streamInterval);\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t});\n\t};\n\n\t/**\n\t * Method used to start outgoing call timer for a participant\n\t * @function startOutGoingCallTimerForParticipant\n\t * @param {Object} data\n\t * @param {Number} data.objectId\n\t */\n\tstartOutGoingCallTimerForParticipant = data => {\n\t\tconst { objectId } = data;\n\n\t\tif (!objectId) {\n\t\t\tthis.logger.warn('Missing participant object id.');\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.outGoingCallTimer[objectId]) {\n\t\t\tclearTimeout(this.outGoingCallTimer[objectId]);\n\t\t}\n\n\t\tthis.outGoingCallTimer[objectId] = setTimeout(() => {\n\t\t\tstopOutgoingCallSound();\n\t\t\t// clearOutGoingCallTimerForParticipant will be cleared in updateParticipantStatus function\n\t\t\tthis.updateParticipantStatus(ParticipantState.NOT_ANSWERING.type, { objectId });\n\n\t\t\tconst participant = this.participants[objectId];\n\t\t\tif (!participant) {\n\t\t\t\tthis.logger.warn('Participant was not found in participants', { objectId });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.conferenceInfo.callType !== CallTypes.MONITORING) {\n\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.PARTICIPANT_NOT_ANSWERING });\n\t\t\t} else {\n\t\t\t\tthis.removeDeviceFromMonitoring({\n\t\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\t\tactioneeParticipantId: participant.id,\n\t\t\t\t});\n\t\t\t}\n\t\t}, 60000);\n\t};\n\n\t/**\n\t * Method used to clear the timer for outgoing call timer for a participant\n\t * @function clearOutGoingCallTimerForParticipant\n\t * @param {Object} data\n\t * @param {Number} data.objectId\n\t */\n\tclearOutGoingCallTimerForParticipant = data => {\n\t\tconst { objectId } = data;\n\n\t\tif (this.outGoingCallTimer && this.outGoingCallTimer[objectId]) {\n\t\t\tclearTimeout(this.outGoingCallTimer[objectId]);\n\t\t\tdelete this.outGoingCallTimer[objectId];\n\t\t}\n\t};\n\n\t/**\n\t * Remove peer connection channel track by id\n\t * @function removeTrackById\n\t * @param {string} participantId\n\t * @param {string} trackId\n\t */\n\tremoveTrackById = (participantId, trackId) => {\n\t\tconst offer = this.newOffer(this.conferenceInfo.isAudio, this.conferenceInfo.isVideo, this.conferenceInfo.isScreen);\n\t\tif (this.conferenceInfo.callType === CallTypes.MONITORING) {\n\t\t\toffer.isAudio = true;\n\t\t\toffer.actioneeParticipantId = participantId;\n\t\t}\n\n\t\tthis.p2p.removeTrack(participantId, trackId, offer);\n\t};\n\n\tgetStats = () => {\n\t\treturn this.p2p.getStats(this.callerParticipantId);\n\t};\n\n\tisIoConnected = () => {\n\t\treturn this.socket !== null && this.socket.connected;\n\t};\n\n\tonPeerConnectionCreated = (pccObj, remoteParticipantId) => {\n\t\tconst exposePeerconnections =\n\t\t\tprocess.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test'\n\t\t\t\t? process.env.REACT_APP_EXPOSE_PEERCONNECTIONS\n\t\t\t\t: window.__env__.REACT_APP_EXPOSE_PEERCONNECTIONS;\n\t\tif (exposePeerconnections === 'true') {\n\t\t\tif (!window.peerConnections) {\n\t\t\t\twindow.peerConnections = [];\n\t\t\t}\n\t\t\twindow.peerConnections.push(pccObj);\n\t\t}\n\n\t\tif (this._useCallStats) {\n\t\t\tthis._callStats.addPeerConnection({\n\t\t\t\tpcObject: pccObj,\n\t\t\t\tpushInterval: this._sendCallStatsInterval,\n\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\tremoteParticipantId: remoteParticipantId,\n\t\t\t\tuserId: localStorage.getItem('userId'),\n\t\t\t});\n\t\t}\n\n\t\tpccObj.onconnectionstatechange = event => this.onConnectionStateChange(event, remoteParticipantId);\n\t};\n\n\tonConnectionStateChange = (event, remoteParticipantId, stream) => {\n\t\tthis.p2p.sendMessageToSignaling(SocketEvents.Conference.PEER_CONNECTION_STATE_CHANGED, {\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: remoteParticipantId,\n\t\t\tstate: event.currentTarget.connectionState,\n\t\t\tpeerConnection: event.currentTarget,\n\t\t});\n\n\t\tconst { connectionState } = event.currentTarget;\n\t\tthis.logger.debug(`Peer connection state changed \"${connectionState}\" \\nactioneeParticipantId ${remoteParticipantId}`);\n\n\t\tconst { objectId } = this.getParticipantByParticipantId(remoteParticipantId);\n\n\t\tthis.participants[objectId].peerConnectionState = connectionState;\n\t\tif (connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED && !this.participants[objectId].reconnecting) {\n\t\t\tthis.participants[objectId].reconnecting = true;\n\t\t\tif (this.conferenceInfo.callType !== CallTypes.MONITORING) {\n\t\t\t\tthis.handleReconnectingWithParticipant(remoteParticipantId, stream);\n\t\t\t}\n\t\t} else if (connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED && this.participants[objectId].reconnecting) {\n\t\t\tthis.participants[objectId].reconnecting = false;\n\t\t}\n\t\tthis.emit('peer-connection-state', {\n\t\t\tparticipantObjectId: objectId,\n\t\t\tpeerConnectionState: connectionState,\n\t\t});\n\t};\n\n\t/**\n\t * Get participant from participants by participant id\n\t * @function getParticipantById\n\t * @param {string} participantId\n\t * @returns {Object} participant\n\t */\n\tgetParticipantByParticipantId = participantId => {\n\t\tconst participant = Object.values(this.participants).find(p => p.id.toString() === participantId);\n\t\treturn participant;\n\t};\n\n\trebootHuddleCam = ({ conferenceId, participantId, helloDeviceId }) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.HelloDevice.COMMAND, {\n\t\t\tconferenceId,\n\t\t\tparticipantId,\n\t\t\thelloDeviceId,\n\t\t\tcommand: DeviceCommands.REBOOT_HUDDLE_CAM,\n\t\t});\n\t};\n\n\t/**\n\t * @param {string} message Message to log\n\t * @param {object} [rest] Metadata\n\t * @returns {Promise}\n\t */\n\tpublishConferenceLog = (message, rest = {}) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.LOG, {\n\t\t\tmessage: message,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t...rest,\n\t\t});\n\t};\n\n\tmonitoringTrackToggled = async (isEnabled, actioneeParticipantId) => {\n\t\tconst toggleInfo = {\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: actioneeParticipantId,\n\t\t\thasAudio: isEnabled,\n\t\t};\n\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.AUDIO_TRACK_TOGGLED, toggleInfo);\n\t};\n}\n\nexport default CallManager;\n","import React, { useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport PropTypes from 'prop-types';\n\nconst NotesWrapper = styled.section`\n\tposition: relative;\n\twidth: 100%;\n\theight: 60px;\n\n\t${props =>\n\t\tprops.isHidden &&\n\t\tcss`\n\t\t\tdisplay: none;\n\t\t`}\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: -9px;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 10px;\n\t\tbackground: linear-gradient(to top, rgba(0, 0, 0, 0.05), transparent);\n\t}\n\n\ttextarea {\n\t\tresize: none;\n\t\twidth: 100%;\n\t\tborder: none;\n\t\toutline: none;\n\t\tpadding: var(--spacing-m);\n\t\tcolor: var(--gray-5);\n\t\tbox-shadow: 0 1px 2px rgb(0 0 0 / 10%);\n\t\theight: 100%;\n\t\tpadding-right: calc(var(--spacing-sssl) + var(--spacing-m));\n\t}\n\n\ttextarea::placeholder {\n\t\tcolor: var(--gray-3);\n\t}\n\n\ttextarea:focus {\n\t\toutline: none;\n\t}\n\n\t> div:first-of-type {\n\t\tposition: absolute;\n\t\ttop: var(--spacing-m);\n\t\tright: var(--spacing-m);\n\n\t\tbutton {\n\t\t\tmargin-left: var(--spacing-m);\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\n\t\t\ti {\n\t\t\t\tfont-size: 18px;\n\t\t\t\tcursor: pointer;\n\t\t\t\tcolor: var(--gray-4);\n\t\t\t\tuser-select: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t> div:last-of-type {\n\t\tposition: absolute;\n\t\tright: var(--spacing-m);\n\t\tbottom: var(--spacing-s);\n\t\tfont-size: 12px;\n\t\tcolor: var(--gray-3);\n\t}\n`;\n\nconst Notes = props => {\n\tconst [note, setNote] = useState('');\n\tconst [noteFontSize, setNoteFontSize] = useState(14);\n\n\tconst minFontSize = 10;\n\tconst maxFontSize = 14;\n\tconst maxCharacters = 250;\n\treturn (\n\t\t\n\t\t\t setNote(e.target.value)}\n\t\t\t\tvalue={note}\n\t\t\t\tname='note'\n\t\t\t\trows={2}\n\t\t\t\tplaceholder='Enter note here'\n\t\t\t/>\n\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tif (noteFontSize > minFontSize) {\n\t\t\t\t\t\t\tsetNoteFontSize(prevState => prevState - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={noteFontSize === minFontSize ? 'disabled' : ''}>\n\t\t\t\t\ttext_decrease\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tif (noteFontSize < maxFontSize) {\n\t\t\t\t\t\t\tsetNoteFontSize(prevState => prevState + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={noteFontSize === maxFontSize ? 'disabled' : ''}>\n\t\t\t\t\ttext_increase\n\t\t\t\t\n\t\t\t
    \n\t\t\t
    {`${note.length}/${maxCharacters}`}
    \n\t\t
    \n\t);\n};\n\nNotes.propTypes = {\n\tisHidden: PropTypes.bool,\n};\n\nexport default Notes;\n","import React, { useEffect, useState } from 'react';\nimport classNames from 'classnames';\n\n/**\n * @typedef {React.ButtonHTMLAttributes & { audioTrack: any, toggle: (isActive: boolean) => void }} HTMLAttributesWithProps\n */\nconst LocalMicBtn = (/** @type {HTMLAttributesWithProps} */ { audioTrack, toggle, ...htmlAttributes }) => {\n\tconst [isActive, setIsMyMicActive] = useState(false);\n\n\tuseEffect(() => {\n\t\tsetIsMyMicActive(audioTrack && audioTrack.enabled);\n\t}, [audioTrack, audioTrack?.enabled]);\n\n\treturn (\n\t\t toggle(!isActive)}>\n\t\t\t\n\t\t\t\t{isActive ? 'mic' : 'mic_off'}\n\t\t\t\n\t\t\n\t);\n};\n\nexport default LocalMicBtn;\n","import React, { Component } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Loader, Dropdown, ListGroup } from 'components';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames/bind';\nimport { ParticipantState, DeviceStatusMessages, FeedColors, ParticipantRemoveReason } from 'constants/enums';\nimport Notes from 'components/Monitoring/Notes';\nimport ReactDOM from 'react-dom';\nimport LocalMicBtn from 'components/Monitoring/LocalMicButton';\n\nclass VideoFeed extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisFeedExpanded: false,\n\t\t\tshowMicPortal: false,\n\t\t\tshowCamPortal: false,\n\t\t};\n\n\t\tthis.videoRef = null;\n\t\tthis.micBtnRef = React.createRef();\n\t\tthis.camBtnRef = React.createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setVideoRefSource();\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (\n\t\t\tthis.props.src &&\n\t\t\t(!prevProps.src ||\n\t\t\t\t(prevProps.src && prevProps.src.id !== this.props.src.id) ||\n\t\t\t\tprevProps.peerConnectionState !== this.props.peerConnectionState ||\n\t\t\t\tprevProps.disableButtons !== this.props.disableButtons)\n\t\t) {\n\t\t\tthis.setVideoRefSource();\n\t\t}\n\t}\n\n\tsetVideoRefSource() {\n\t\tif (this.videoRef) {\n\t\t\tthis.videoRef.srcObject = this.props.src.mediaStream;\n\t\t}\n\t}\n\n\tgetDeviceStatus() {\n\t\tswitch (this.props.status) {\n\t\t\tcase ParticipantState.BUSY.type:\n\t\t\t\tif (this.props.onPatientBusyNurse && this.props.onPatientBusyNurse.name) {\n\t\t\t\t\treturn `${DeviceStatusMessages.deviceOnCallWithNurse} ${this.props.onPatientBusyNurse.name}.`;\n\t\t\t\t}\n\t\t\t\treturn DeviceStatusMessages.deviceOnCall;\n\t\t\tcase ParticipantState.OFFLINE.type:\n\t\t\t\treturn DeviceStatusMessages.deviceOffline;\n\t\t\tcase ParticipantState.NOT_ANSWERING.type:\n\t\t\t\treturn DeviceStatusMessages.notAnswering;\n\t\t\tcase ParticipantState.DISCONNECTED.type:\n\t\t\tcase ParticipantState.LEFT_CALL.type:\n\t\t\t\treturn this.props.removeReason === ParticipantRemoveReason.FAILED_TO_GET_INFO\n\t\t\t\t\t? DeviceStatusMessages.participantInviteFailed\n\t\t\t\t\t: DeviceStatusMessages.leftCall;\n\t\t\tcase ParticipantState.RECONNECTING.type:\n\t\t\t\treturn DeviceStatusMessages.reconnecting;\n\t\t\tcase ParticipantState.REMOVED.type:\n\t\t\t\treturn DeviceStatusMessages.removed;\n\t\t\tcase ParticipantState.INVITE_DENIED.type:\n\t\t\t\treturn DeviceStatusMessages.participantInviteDenied;\n\t\t\tcase ParticipantState.FAILED_TO_GET_INFO.type:\n\t\t\t\treturn DeviceStatusMessages.participantInviteFailed;\n\t\t\tdefault:\n\t\t\t\treturn DeviceStatusMessages.initiatingMonitoring;\n\t\t}\n\t}\n\n\tsetFeedColor = (event, item) => {\n\t\tthis.props.onSetFeedColor(item.color);\n\t};\n\n\ttoggleExpand = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisFeedExpanded: !this.state.isFeedExpanded,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.onExpandClick();\n\t\t\t}\n\t\t);\n\t};\n\n\tcheckIsColorActive = color => {\n\t\treturn this.props.feedColors && this.props.feedColors.length > 0 && this.props.feedColors.find(item => item === color);\n\t};\n\n\tgetTooltipElement = (ref, text) => {\n\t\tconst toolTipElementProperties = ref.getBoundingClientRect();\n\n\t\tconst style = {\n\t\t\tzIndex: 999999,\n\t\t\tposition: 'absolute',\n\t\t\tbackground: 'var(--gray-5)',\n\t\t\tmaxWidth: '300px',\n\t\t\tfontSize: '12px',\n\t\t\tcolor: 'var(--gray-0)',\n\t\t\tboxShadow: '0 1px 2px rgb(0 0 0 / 10%)',\n\t\t\tborderRadius: 'var(--border-radius)',\n\t\t\tfontFamily: 'var(--font-family)',\n\t\t\tright: window.innerWidth - toolTipElementProperties?.right,\n\t\t\t...{ top: toolTipElementProperties?.top + 25 },\n\t\t};\n\t\treturn {text};\n\t};\n\n\trender() {\n\t\tconst showFeed = this.props.src !== null && this.props.status === ParticipantState.CONNECTED.type;\n\t\tconst showButtons = !this.props.disableButtons && this.props.status === ParticipantState.CONNECTED.type;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t

    {this.props.title}

    \n\t\t\t\t\t\t{showButtons && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSuspicious Behavior\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.purple) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.purple,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSuicide Watch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.cyan) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.cyan,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFalls\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.yellow) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.yellow,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIsolation\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.red) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.red,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSeizure\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.pink) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.pink,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tHospice\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.black) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.black,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDetox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.orange) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.orange,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPulling O2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.lightBlue) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.lightBlue,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tImpulsive/Confused\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.gray) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.gray,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNon-redirectable\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.blue) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.blue,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\tonItemClick={this.setFeedColor}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{this.props.isMicPrivacyOn && (\n\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t this.setState({ showMicPortal: true })}\n\t\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => this.setState({ showMicPortal: false })}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tmic_off\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t{this.micBtnRef?.current &&\n\t\t\t\t\t\t\t\t\t\t\t\tthis.state.showMicPortal &&\n\t\t\t\t\t\t\t\t\t\t\t\tReactDOM.createPortal(\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.getTooltipElement(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.micBtnRef?.current,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'You are not hearing the patient because the physical mic privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('tooltip-root')\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{this.props.isCameraPrivacyOn && (\n\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t this.setState({ showCamPortal: true })}\n\t\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => this.setState({ showCamPortal: false })}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tvideocam_off\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t{this.camBtnRef?.current &&\n\t\t\t\t\t\t\t\t\t\t\t\tthis.state.showCamPortal &&\n\t\t\t\t\t\t\t\t\t\t\t\tReactDOM.createPortal(\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.getTooltipElement(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.camBtnRef?.current,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'You are not seeing the patient because the physical camera privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('tooltip-root')\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!showButtons && (\n\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\t{showFeed && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t
    \n\t\t\t\t{}\n\n\t\t\t\t{!showFeed && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    {this.getDeviceStatus()}

    \n\t\t\t\t\t\t{this.props.status === ParticipantState.CONNECTING.type && }\n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t\t{this.props.children}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nconst VideoFeedWrapper = styled.div`\n\tbackground: var(--gray-5);\n\tposition: relative;\n\tmax-height: calc(100vh - 115px);\n\tdisplay: flex;\n\tflex-direction: column;\n\n\tmain {\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\tposition: relative;\n\t}\n\n\tli {\n\t\tlist-style: none;\n\t\tdisplay: flex;\n\n\t\tbutton {\n\t\t\t&::before {\n\t\t\t\twhite-space: normal;\n\t\t\t\twidth: 200px;\n\t\t\t}\n\t\t}\n\n\t\t[data-tooltip],\n\t\t[data-tooltip] i {\n\t\t\tcursor: default;\n\t\t}\n\t}\n\n\theader {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding: var(--spacing-s) var(--spacing-m);\n\t\theight: 30px;\n\t\tz-index: 1;\n\t\tbackground: var(--gray-3);\n\n\t\tul {\n\t\t\tdisplay: flex;\n\n\t\t\tli {\n\t\t\t\tbutton.mic-cam-btn {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\t&::after {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t\t&:hover {\n\t\t\t\t\t\t&::after {\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\tcontent: '';\n\t\t\t\t\t\t\tbackground: var(--gray-5);\n\t\t\t\t\t\t\tpadding: 4px;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\ttop: calc(100% + var(--spacing-s));\n\t\t\t\t\t\t\ttransform: translate(-50%, -50%) rotate(45deg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tpadding: var(--spacing-m);\n\n\t\t\t\t\t> i {\n\t\t\t\t\t\tpadding-right: var(--spacing-s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbutton i,\n\t\t.dropdown i {\n\t\t\tcolor: var(--gray-0);\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 18px;\n\t\t\tmargin-right: 0 !important;\n\t\t}\n\n\t\t.dropdown ul li a span {\n\t\t\tmargin-right: var(--spacing-s);\n\t\t}\n\n\t\t.dropdown ul li a span + i {\n\t\t\tcolor: var(--gray-5);\n\t\t\tmargin-left: auto;\n\t\t\tfont-size: 16px;\n\t\t}\n\n\t\tbutton {\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tfont-size: 0;\n\t\t}\n\t}\n\n\t.center-loader {\n\t\ttop: calc(50% + 15px);\n\t\twidth: calc(100% - var(--spacing-m));\n\t}\n\n\t.center-loader p {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\t.center-loader {\n\t\ttop: calc(50% + 15px);\n\t\twidth: calc(100% - var(--spacing-m));\n\t}\n\n\t.center-loader p {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\th1 {\n\t\tfont-size: 14px;\n\t\tcolor: var(--gray-0);\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\tflex: 1;\n\t\ttext-align: left;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t> div {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tmargin-left: auto;\n\t}\n\n\t.dropdown__items a > i {\n\t\tmargin: 0;\n\t}\n\n\tvideo {\n\t\twidth: 100%;\n\t\theight: calc(100% - 30px);\n\t}\n\n\t.dropdown {\n\t\tpadding: 0;\n\t}\n`;\n\nconst VideoFeedBottomOptions = styled.div`\n\tposition: absolute;\n\tbottom: var(--spacing-m);\n\twidth: 100%;\n\tfont-size: 0;\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tpadding-right: var(--spacing-m);\n\n\tbutton {\n\t\tborder: none;\n\t\tbackground: var(--red-1);\n\t\tpadding: var(--spacing-s);\n\t\tborder-radius: 100%;\n\t\ti {\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--gray-0) !important;\n\t\t\tfont-size: 16px;\n\t\t\tmargin-right: 0px;\n\t\t}\n\n\t\t&.active {\n\t\t\tbackground: var(--blue-2);\n\t\t}\n\t}\n\n\tbutton + button {\n\t\tmargin-right: 0;\n\t}\n\n\t.call-button:not(:last-child) {\n\t\tmargin-right: var(--spacing-s);\n\t}\n`;\n\nconst VideoFeedColorsWrapper = styled.div`\n\tdisplay: flex;\n\theight: 5px;\n\twidth: 100%;\n\tposition: absolute;\n\tz-index: 1;\n\tbottom: -5px;\n\n\t${props =>\n\t\t!props.isFeedExpanded &&\n\t\tprops.isAnyFeedExpanded &&\n\t\tcss`\n\t\t\tbottom: 0;\n\t\t`}\n\n\tdiv {\n\t\tflex: 1;\n\t\theight: 100%;\n\t}\n`;\n\nconst PortalTooltip = styled.div`\n\tpadding: var(--spacing-l);\n\tbackground: var(--gray-6);\n`;\n\nVideoFeed.propTypes = {\n\tsrc: PropTypes.object,\n\ttitle: PropTypes.string,\n\tonCloseClick: PropTypes.func,\n\tsocketState: PropTypes.object,\n\tonIncreaseBitrate: PropTypes.func,\n\tisFeedExpanded: PropTypes.bool,\n\tisAnyFeedExpanded: PropTypes.bool,\n};\n\nexport default VideoFeed;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Toggle, Tilt } from 'components';\nimport { CameraType } from 'constants/enums';\nimport Modal from 'components/Modal';\nimport Form from 'components/Form';\n\nclass CameraControls extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\n\t\tthis.state = {\n\t\t\tisRebootCameraModalOpen: false,\n\t\t};\n\t}\n\n\tonRebootHuddleCamClick = async () => {\n\t\tif (!this.state.isRebootCameraModalOpen) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.props.onRebootHuddleCam();\n\n\t\tthis.setState({ isRebootCameraModalOpen: false });\n\t};\n\n\trender() {\n\t\tconst { state, props } = this;\n\t\tconst shouldDisableTilt = props.isDisabled || (props.isCameraPrivacyOn && props.cameraType === CameraType.HELLO);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{props.showPTZ && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t this.setState({ isRebootCameraModalOpen: true })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\t{props.cameraType === CameraType.HUDDLE && (\n\t\t\t\t\t\t\t this.setState({ isRebootCameraModalOpen: false })}>\n\t\t\t\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t\t\t\t

    Are you sure you want to reboot huddle cam?

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n}\n\nCameraControls.defaultProps = {\n\tshowPTZ: true,\n\tcameraType: CameraType.HELLO,\n\tcameraZoomLevel: 0,\n\tisHuddleCamConnected: true,\n};\n\nCameraControls.propTypes = {\n\tshowPTZ: PropTypes.bool,\n\tcameraType: PropTypes.string,\n\tcameraZoomLevel: PropTypes.number,\n\tonToggleCameraSwitch: PropTypes.func,\n\tonZoomCamera: PropTypes.func,\n\tonPanTiltCamera: PropTypes.func,\n\tonRebootHuddleCam: PropTypes.func,\n\tdisabledTiltDirections: PropTypes.object,\n\tisHuddleCamConnected: PropTypes.bool,\n};\n\nexport default CameraControls;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport v4 from 'uuid';\nimport { Prompt } from 'react-router-dom';\nimport _ from 'lodash';\nimport classNames from 'classnames/bind';\n\nimport { actionCreators } from 'state/organization/actions';\nimport { SocketContext } from 'io-client/SocketContext';\nimport CallManager from 'owt/p2p/CallManager';\nimport { ConferenceInfo, ConferenceParticipant, FromUser } from 'owt/base/conference';\nimport { Grid, Modal, Form, Alert } from 'components';\nimport VideoFeed from 'components/Monitoring/VideoFeed';\nimport Layout from 'components/Common/Layout';\nimport SectorList from 'components/Common/SectorList';\nimport Header from 'components/Common/Header';\nimport CameraControls from 'components/Common/CameraControls';\nimport StreamPermissions from 'components/StreamPermissions';\nimport {\n\tCallTypes,\n\tObjectType,\n\tParticipantState,\n\tSectorTypes,\n\tSocketState,\n\tConferenceEndReason,\n\tRTCPeerConnectionEnum,\n\tCameraType,\n\tCameraEventTypes,\n\tCameraTiltDirection,\n\tCameraTiltAction,\n\tZoomDirection,\n\tMediaPermissions,\n\tMediaTypes,\n\tStreamError,\n\tParticipantRemoveReason,\n\tToggleFailureReasonEnum,\n\tInviteParticipantFailureReason,\n} from 'constants/enums';\nimport { findSectorById, sortArrayByProperty, askForPermission, checkForPermission, checkIfMediaDevicesPlugged } from 'infrastructure/helpers/commonHelpers';\nimport SocketEvents from 'constants/socket-events';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { getUserProfile } from 'infrastructure/auth';\nimport UnassignedNurse from './UnassignedNurse';\n\nclass Monitoring extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\tvideoFeeds: {},\n\t\t\tparticipants: {},\n\t\t\tconferenceInfo: null,\n\t\t\tisFeedZoomed: false,\n\t\t\troomHasDeviceAssigned: true,\n\t\t\tcurrentRoomName: '',\n\t\t\tisSecondColumnCollapsed: false,\n\t\t\tshowDeviceControlsLockedModal: false,\n\t\t\tsocketState: SocketState.CONNECTED,\n\t\t\thasActiveConference: false,\n\t\t\tconferenceEndReason: null,\n\t\t\tshouldShowSwitchToHelloCamError: false,\n\t\t\tshowAllowMicrophoneModal: false,\n\t\t\tstatAlarmError: '',\n\t\t\tdeniedParticipant: null,\n\t\t\tinitiatorInfoFailed: false,\n\t\t};\n\t\tthis.lowerBitrateFeedCountThreshold = 4;\n\t\tthis.micStatus = null;\n\t\tthis.camStatus = null;\n\t\tthis.previousParticipantId = null;\n\t\tthis.callManager = new CallManager(this.context, {\n\t\t\tuseCallStats: APP_CONFIG.useCallStats && APP_CONFIG.sendCallStatsOnMonitoring,\n\t\t\tsendCallStatsInterval: APP_CONFIG.sendCallStatsInterval,\n\t\t});\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.camStatus = await checkForPermission(MediaTypes.CAMERA);\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.micStatus.onchange = this.onDevicePermissionChange;\n\t\tthis.callManager\n\t\t\t.on('peer-stream', data => {\n\t\t\t\tconst { origin } = data.peerSrc;\n\t\t\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\n\t\t\t\tconst feed = this.getVideoFeedByParticipantId(origin, videoFeeds);\n\t\t\t\tif (!feed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfeed.conference = conferenceInfo;\n\t\t\t\tfeed.src = data.peerSrc;\n\t\t\t\tfeed.status = ParticipantState.CONNECTED.type;\n\n\t\t\t\tthis.handleBitrateChange();\n\t\t\t\tthis.setState({ videoFeeds });\n\t\t\t})\n\t\t\t.on('update-participant', data => {\n\t\t\t\tconst { participants, videoFeeds } = this.state;\n\t\t\t\tdata.forEach(p => {\n\t\t\t\t\tparticipants[p.id] = {\n\t\t\t\t\t\tid: p.id,\n\t\t\t\t\t\tobjectId: p.objectId,\n\t\t\t\t\t};\n\t\t\t\t\tconst feed = videoFeeds[p.objectId];\n\t\t\t\t\tif (!!feed) {\n\t\t\t\t\t\tfeed.participantId = p.id;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.setState({ participants });\n\t\t\t})\n\t\t\t.on('call-started', data => {\n\t\t\t\tif (data.failedInvites) {\n\t\t\t\t\tconst { videoFeeds } = this.state;\n\t\t\t\t\tObject.values(videoFeeds).forEach(v => {\n\t\t\t\t\t\tconst newFeed = { ...v };\n\t\t\t\t\t\tconst failedFeed = data.failedInvites.find(f => f.objectId === v.deviceId);\n\t\t\t\t\t\tif (failedFeed.reason === InviteParticipantFailureReason.INVITE_DENIED) {\n\t\t\t\t\t\t\tnewFeed.status = ParticipantState.INVITE_DENIED.type;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (failedFeed.reason === InviteParticipantFailureReason.FAILED_TO_GET_INFO) {\n\t\t\t\t\t\t\tnewFeed.status = ParticipantState.FAILED_TO_GET_INFO.type;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvideoFeeds[v.deviceId] = newFeed;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis.setState({ conferenceInfo: data.conferenceInfo, hasActiveConference: false });\n\t\t\t})\n\t\t\t.on('participant-status', statusResponse => {\n\t\t\t\tconst { status, objectId, reason } = statusResponse;\n\t\t\t\tconst { videoFeeds } = this.state;\n\n\t\t\t\tconst feed = videoFeeds[objectId];\n\t\t\t\tif (feed) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t(feed.status === ParticipantState.LEFT_CALL.type && status !== ParticipantState.REMOVED.type) ||\n\t\t\t\t\t\tfeed.status === ParticipantState.DISCONNECTED.type ||\n\t\t\t\t\t\t(status === ParticipantState.LEFT_CALL.type &&\n\t\t\t\t\t\t\t[ParticipantRemoveReason.DISCONNECTED, ParticipantRemoveReason.DISCONNECTED_PARTICIPANT_CLEANUP].includes(reason))\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfeed.status = status;\n\t\t\t\t\tfeed.removeReason = reason;\n\t\t\t\t\tthis.setState({ videoFeeds });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('participant-busy', data => {\n\t\t\t\tconst videoFeeds = { ...this.state.videoFeeds };\n\t\t\t\tconst feed = videoFeeds[data.objectId];\n\t\t\t\tif (feed) {\n\t\t\t\t\tconst { activeConferences } = data;\n\t\t\t\t\tif (!activeConferences || activeConferences.length === 0) {\n\t\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active conference was found');\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst conference = activeConferences.find(ac => ac.initialCallType === CallTypes.MONITORING);\n\t\t\t\t\tif (!conference) {\n\t\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active patient view or talk to patient conference was found');\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\t// there should be only one participant with ObjectType User\n\t\t\t\t\tconst monitoringNurse = conference.participants.find(p => p.objectType === ObjectType.USER);\n\t\t\t\t\tif (!monitoringNurse) {\n\t\t\t\t\t\tthis.callManager.logger.warn('On participant busy - monitoring nurse is missing from participants');\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tfeed.status = ParticipantState.BUSY.type;\n\t\t\t\t\tfeed.onPatientBusyNurse = monitoringNurse;\n\t\t\t\t\tthis.setState({ videoFeeds });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('camera-response', this.cameraResponseListener)\n\t\t\t.on('initial-device-state', ({ helloDeviceId, isNightVision, zoomLevel, isHuddleCamConnected, cameraType, isCameraPrivacyOn, isMicPrivacyOn }) => {\n\t\t\t\tconst { videoFeeds } = this.state;\n\t\t\t\tconst feed = videoFeeds[helloDeviceId];\n\n\t\t\t\tif (!feed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfeed.zoomLevel = zoomLevel;\n\t\t\t\tfeed.cameraType = cameraType;\n\t\t\t\tfeed.isNightVisionActive = isNightVision;\n\t\t\t\tfeed.isHuddleCamConnected = isHuddleCamConnected;\n\t\t\t\tfeed.isCameraPrivacyOn = isCameraPrivacyOn;\n\t\t\t\tfeed.isMicPrivacyOn = isMicPrivacyOn;\n\n\t\t\t\tthis.setState({ videoFeeds });\n\t\t\t})\n\t\t\t.on('socket-state', ({ socketState }) => {\n\t\t\t\tif (this.state.socketState.type === socketState.type) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst newState = { socketState };\n\t\t\t\tswitch (socketState.type) {\n\t\t\t\t\tcase SocketState.DISCONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SocketState.CONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t})\n\t\t\t.on('peer-connection-state', ({ peerConnectionState, participantObjectId }) => {\n\t\t\t\tconst { videoFeeds } = this.state;\n\n\t\t\t\tconst newVideoFeeds = { ...videoFeeds };\n\t\t\t\tnewVideoFeeds[participantObjectId].peerConnectionState = peerConnectionState;\n\t\t\t\tswitch (peerConnectionState) {\n\t\t\t\t\tcase RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED:\n\t\t\t\t\t\tnewVideoFeeds[participantObjectId].status = ParticipantState.CONNECTED.type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED:\n\t\t\t\t\t\tnewVideoFeeds[participantObjectId].status = ParticipantState.RECONNECTING.type;\n\t\t\t\t\t\tif (newVideoFeeds[participantObjectId]?.isAlarmActive) {\n\t\t\t\t\t\t\tnewVideoFeeds[participantObjectId].isAlarmActive = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RTCPeerConnectionEnum.CONNECTION_STATE.FAILED:\n\t\t\t\t\t\tnewVideoFeeds[participantObjectId].status = ParticipantState.RECONNECTING.type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.setState({ videoFeeds: newVideoFeeds });\n\t\t\t})\n\t\t\t.on('end-call', data => {\n\t\t\t\tObject.keys(this.state.videoFeeds).forEach(key => {\n\t\t\t\t\tthis.changeRoomAddDeviceIcon(false, this.state.videoFeeds[key].roomId);\n\t\t\t\t});\n\t\t\t\tconst deniedParticipant = Object.values(this.state.videoFeeds).find(f => f.deviceId === data.deniedParticipant?.objectId);\n\t\t\t\tconst initiatorInfoFailed = data.endReason === ConferenceEndReason.FAILED_TO_GET_INITIATOR_INFO || false;\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tvideoFeeds: {},\n\t\t\t\t\tparticipants: {},\n\t\t\t\t\tconferenceInfo: null,\n\t\t\t\t\tisFeedZoomed: false,\n\t\t\t\t\troomHasDeviceAssigned: true,\n\t\t\t\t\tisSecondColumnCollapsed: false,\n\t\t\t\t\tshowDeviceControlsLockedModal: false,\n\t\t\t\t\thasActiveConference: data.hasActiveConference,\n\t\t\t\t\tconferenceEndReason: data.endReason,\n\t\t\t\t\tinitiatorInfoFailed,\n\t\t\t\t\tdeniedParticipant,\n\t\t\t\t});\n\t\t\t\tthis.setActiveVideoFeeds([]);\n\t\t\t})\n\t\t\t.on('local-audio-error', this.onLocalAudioError)\n\t\t\t.on('re-add-feed', this.deviceStatusChanged)\n\t\t\t.on('feed-is-online', ({ objectId }) => {\n\t\t\t\tconst feed = this.state.videoFeeds?.[objectId];\n\t\t\t\tif (!feed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.callManager.startReAddFeedInterval(\n\t\t\t\t\t{\n\t\t\t\t\t\tid: feed.id,\n\t\t\t\t\t\tobjectId,\n\t\t\t\t\t},\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t})\n\t\t\t.bindSocketEventListeners(false, false);\n\n\t\tthis.bindWindowListeners();\n\t\tthis.context.on(SocketEvents.Conference.ON_DEVICE_CONTROLS_LOCKED, this.onDeviceLockedEventHandler);\n\t\tthis.context.on(SocketEvents.Conference.AUDIO_TRACK_TOGGLED, this.onAudioTrackToggled);\n\t\tthis.context.on(SocketEvents.Conference.ALERT_PATIENT_AT_RISK_RESPONSE, this.onAlertPatientResponse);\n\t}\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (prevProps.currentHealthSystemId !== this.props.currentHealthSystemId) {\n\t\t\tthis.changeRoomsAndDevicesIcons();\n\t\t}\n\t};\n\n\tcomponentWillUnmount() {\n\t\tthis.callManager.unbindSocketEventListeners().unbindTimeouts();\n\n\t\tthis.context.off(SocketEvents.Conference.ON_DEVICE_CONTROLS_LOCKED, this.onDeviceLockedEventHandler);\n\t\tthis.context.off(SocketEvents.Conference.AUDIO_TRACK_TOGGLED, this.onAudioTrackToggled);\n\t\tthis.context.off(SocketEvents.Conference.ALERT_PATIENT_AT_RISK_RESPONSE, this.onAlertPatientResponse);\n\n\t\tif (Object.keys(this.state.videoFeeds).length) {\n\t\t\tthis.endMonitoring();\n\t\t}\n\n\t\tthis.setActiveVideoFeeds([]);\n\t}\n\n\tsetActiveVideoFeeds = videoFeeds => {\n\t\tconst mappedIds = Object.keys(videoFeeds).map(key => ({ helloDeviceId: videoFeeds[key].deviceId, roomId: videoFeeds[key].roomId }));\n\t\tthis.props.setActiveMonitoringFeeds(mappedIds);\n\t};\n\n\tonDevicePermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t} else {\n\t\t\tconst { videoFeeds } = this.state;\n\t\t\tObject.keys(videoFeeds).forEach(key => {\n\t\t\t\tif (videoFeeds[key].audioTrack?.enabled) {\n\t\t\t\t\tthis.toggleMonitoringMic(videoFeeds[key]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.callManager.publishConferenceLog(`Microphone permission state is changed to ${res.target.state}.`);\n\t};\n\n\tbeforeUnloadEvent = event => {\n\t\tif (this.state.conferenceInfo) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.returnValue = '';\n\t\t}\n\t};\n\n\tbindWindowListeners() {\n\t\twindow.addEventListener('beforeunload', this.beforeUnloadEvent);\n\t\twindow.addEventListener('unload', () => {\n\t\t\tif (this.state.conferenceInfo) {\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_LEFT });\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('message', message => {\n\t\t\tif (message.data === 'IN_CALL') {\n\t\t\t\tif (this.state.conferenceInfo) {\n\t\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_IDLE });\n\t\t\t\t}\n\t\t\t\twindow.location.href = '/logout';\n\t\t\t}\n\t\t});\n\t}\n\n\tprepareStartConferenceInfo = async deviceId => {\n\t\tconst userProfile = getUserProfile();\n\t\tconst fromUser = new FromUser(`${userProfile.firstName} ${userProfile.lastName}`, userProfile.jobTitle, userProfile.profilePicture.url);\n\t\tconst participant = new ConferenceParticipant(deviceId, ObjectType.HELLO_DEVICE);\n\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\tconst inputDevices = {\n\t\t\tdevices,\n\t\t\tpermissions: {\n\t\t\t\tcamera: this.camStatus.state,\n\t\t\t\tmicrophone: this.micStatus.state,\n\t\t\t},\n\t\t};\n\n\t\treturn new ConferenceInfo(\n\t\t\tCallTypes.MONITORING,\n\t\t\tv4(),\n\t\t\t'Monitoring',\n\t\t\tnull,\n\t\t\tfromUser,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tv4(),\n\t\t\t[participant],\n\t\t\tinputDevices,\n\t\t\ttrue\n\t\t);\n\t};\n\n\thasPermissionForMonitoring = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (this.micStatus.error) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (this.micStatus.state) {\n\t\t\tcase MediaPermissions.DENIED:\n\t\t\t\tawait askForPermission({ audio: true });\n\t\t\t\treturn true;\n\t\t\tcase MediaPermissions.PROMPT && pluggedDevices.microphone:\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t});\n\t\t\t\tawait askForPermission({ audio: true });\n\t\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn true;\n\t\t}\n\t};\n\n\tgetFailedFeed = (videoFeeds, helloDeviceId, failedParticipants) =>\n\t\tObject.values(videoFeeds).forEach(v => {\n\t\t\tconst nFeed = { ...v };\n\t\t\tif (nFeed.deviceId === helloDeviceId) {\n\t\t\t\tconst failedFeed = failedParticipants.find(f => f.objectId === helloDeviceId);\n\t\t\t\tif (failedFeed.reason === InviteParticipantFailureReason.INVITE_DENIED) {\n\t\t\t\t\tnFeed.status = ParticipantState.INVITE_DENIED.type;\n\t\t\t\t}\n\t\t\t\tif (failedFeed.reason === InviteParticipantFailureReason.FAILED_TO_GET_INFO) {\n\t\t\t\t\tnFeed.status = ParticipantState.FAILED_TO_GET_INFO.type;\n\t\t\t\t}\n\t\t\t\tvideoFeeds[v.deviceId] = nFeed;\n\t\t\t}\n\t\t});\n\n\taddFeed = async data => {\n\t\tif (this.state.deniedParticipant) {\n\t\t\tthis.setState({ conferenceEndReason: null, deniedParticipant: null });\n\t\t}\n\t\tconst hasPermission = await this.hasPermissionForMonitoring();\n\n\t\tif (!hasPermission) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\n\t\tlet { name } = findSectorById(this.props.treeData.tree, data.hospitalId);\n\n\t\tif (videoFeeds[data.helloDeviceId]) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Object.keys(videoFeeds).length === 16) {\n\t\t\tthis.setState({\n\t\t\t\tshowFeedsLimitModal: true,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis.changeRoomAddDeviceIcon(true, data.roomId);\n\n\t\tconst newFeed = {\n\t\t\tsrc: null,\n\t\t\troomName: `${name} > ${data.name}`,\n\t\t\tdeviceId: +data.helloDeviceId,\n\t\t\thospitalId: data.hospitalId,\n\t\t\tdepartmentId: data.departmentId,\n\t\t\tfloorId: data.floorId,\n\t\t\troomId: data.roomId,\n\t\t\tstatus: ParticipantState.CONNECTING.type,\n\t\t\thospitalName: name,\n\t\t\tisPeerSpeakerActive: false,\n\t\t\tpeerConnectionState: RTCPeerConnectionEnum.CONNECTION_STATE.NEW,\n\t\t\tzoomLevel: 0,\n\t\t\tcameraType: CameraType.HELLO,\n\t\t\tdisabledTiltDirections: {},\n\t\t\tisCameraPrivacyOn: false,\n\t\t\tisMicPrivacyOn: false,\n\t\t\tdateAdded: +new Date(),\n\t\t\tisOnline: true,\n\t\t};\n\n\t\tvideoFeeds[newFeed.deviceId] = newFeed;\n\n\t\tif (!conferenceInfo) {\n\t\t\tif (Object.keys(videoFeeds).length === 1) {\n\t\t\t\tthis.callManager.startMonitoring(await this.prepareStartConferenceInfo(+data.helloDeviceId));\n\t\t\t} else if (Object.keys(videoFeeds).length > 1) {\n\t\t\t\tthis.changeRoomAddDeviceIcon(false, data.roomId);\n\t\t\t\tdelete videoFeeds[newFeed.deviceId];\n\t\t\t}\n\t\t} else {\n\t\t\tconst response = await this.callManager.addDeviceToMonitoring({\n\t\t\t\tconferenceId: this.state.conferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.state.conferenceInfo.participantId,\n\t\t\t\tparticipant: {\n\t\t\t\t\tobjectType: ObjectType.HELLO_DEVICE,\n\t\t\t\t\tobjectId: +data.helloDeviceId,\n\t\t\t\t},\n\t\t\t});\n\t\t\tif (response?.failedInvitationToParticipants?.length) {\n\t\t\t\tthis.getFailedFeed(videoFeeds, +data.helloDeviceId, response.failedInvitationToParticipants);\n\t\t\t}\n\t\t}\n\t\tthis.setState({\n\t\t\tvideoFeeds,\n\t\t\troomHasDeviceAssigned: !!data.helloDeviceId,\n\t\t\tcurrentRoomName: data.name,\n\t\t\tinitiatorInfoFailed: false,\n\t\t});\n\t\tthis.setActiveVideoFeeds(videoFeeds);\n\t};\n\n\tremoveFeed = key => {\n\t\tlet { videoFeeds, conferenceInfo } = this.state;\n\n\t\tconst feed = videoFeeds[key];\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (feed.audioTrack) {\n\t\t\tfeed.audioTrack.stop();\n\t\t}\n\n\t\tconst { roomId, participantId } = feed;\n\t\tthis.changeRoomAddDeviceIcon(false, roomId);\n\t\tdelete videoFeeds[key];\n\n\t\tthis.callManager.removeDeviceFromMonitoring({\n\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\tparticipantId: conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: participantId,\n\t\t});\n\n\t\tif (Object.keys(videoFeeds).length === 0) {\n\t\t\tthis.endMonitoring();\n\t\t\tconferenceInfo = null;\n\t\t}\n\n\t\tlet { isFeedExpanded } = feed;\n\n\t\tthis.setState({\n\t\t\tvideoFeeds,\n\t\t\tconferenceInfo,\n\t\t\tisFeedZoomed: isFeedExpanded ? !isFeedExpanded : this.state.isFeedZoomed,\n\t\t});\n\t\tthis.handleBitrateChange();\n\t\tthis.setActiveVideoFeeds(videoFeeds);\n\t};\n\n\tendMonitoring = () => {\n\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.INITIATOR_LEFT });\n\t};\n\n\tuseHighBitrate = deviceId => {\n\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\t\tconst feed = videoFeeds[deviceId];\n\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { participantId } = feed;\n\t\tthis.callManager.requestToChangeBitrate({\n\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\tparticipantId: conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: participantId,\n\t\t\tsettings: {\n\t\t\t\tminBitrate: 700,\n\t\t\t\tmaxBitrate: 900,\n\t\t\t},\n\t\t});\n\t};\n\n\tuseLowBitrate = deviceId => {\n\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\t\tconst feed = videoFeeds[deviceId];\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { participantId } = feed;\n\n\t\tthis.callManager.requestToChangeBitrate({\n\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\tparticipantId: conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: participantId,\n\t\t\tsettings: {\n\t\t\t\tminBitrate: 400,\n\t\t\t\tmaxBitrate: 600,\n\t\t\t},\n\t\t});\n\t};\n\n\thandleBitrateChange = () => {\n\t\tlet { videoFeeds } = this.state;\n\t\tlet videoFeedsLength = Object.keys(videoFeeds).length;\n\t\tlet expandedFeed = Object.values(videoFeeds).find(v => v.isFeedExpanded);\n\n\t\tif (expandedFeed) {\n\t\t\tObject.keys(videoFeeds).forEach(key => {\n\t\t\t\tif (expandedFeed.deviceId !== videoFeeds[key].deviceId) {\n\t\t\t\t\tthis.useLowBitrate(videoFeeds[key].deviceId);\n\t\t\t\t} else {\n\t\t\t\t\tthis.useHighBitrate(videoFeeds[key].deviceId);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (videoFeedsLength <= this.lowerBitrateFeedCountThreshold) {\n\t\t\tObject.keys(videoFeeds).forEach(key => {\n\t\t\t\tthis.useHighBitrate(videoFeeds[key].deviceId);\n\t\t\t});\n\t\t} else if (videoFeedsLength > this.lowerBitrateFeedCountThreshold) {\n\t\t\tObject.keys(videoFeeds).forEach(key => {\n\t\t\t\tthis.useLowBitrate(videoFeeds[key].deviceId);\n\t\t\t});\n\t\t}\n\t};\n\n\tchangeRoomAddDeviceIcon = (deviceAdded, roomId) => {\n\t\tconst treeData = { ...this.props.treeData };\n\t\tconst sector = findSectorById(treeData.tree, roomId);\n\n\t\tif (deviceAdded) {\n\t\t\tsector.customActionIcon = {\n\t\t\t\ticonColor: '#4cd137',\n\t\t\t\ticon: 'check_circle',\n\t\t\t};\n\t\t} else if (sector) {\n\t\t\tdelete sector.customActionIcon;\n\t\t}\n\n\t\tthis.props.setTreeData(treeData);\n\t};\n\n\tchangeRoomsAndDevicesIcons = () => {\n\t\tconst deviceIds = Object.keys(this.state.videoFeeds);\n\t\tif (deviceIds.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst treeData = { ...this.props.treeData };\n\t\ttreeData.tree.forEach(hospital => {\n\t\t\thospital.subOptions.forEach(dep => {\n\t\t\t\tdep.subOptions.forEach(floor => {\n\t\t\t\t\tfloor.subOptions.forEach(room => {\n\t\t\t\t\t\tif (deviceIds.includes(room.helloDeviceId)) {\n\t\t\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\t\t\troom.customActionIcon = {\n\t\t\t\t\t\t\t\ticonColor: '#4cd137',\n\t\t\t\t\t\t\t\ticon: 'check_circle',\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\tthis.props.setTreeData(treeData);\n\t};\n\n\ttoggleExpandFeed = feed => {\n\t\tlet videoFeeds = { ...this.state.videoFeeds };\n\t\tlet previousExpandedFeed = Object.values(videoFeeds).find(v => v.isFeedExpanded) || {};\n\t\tlet currentFeed = Object.values(videoFeeds).find(f => feed.deviceId === f.deviceId);\n\t\tif (previousExpandedFeed.deviceId !== currentFeed.deviceId) {\n\t\t\tpreviousExpandedFeed.isFeedExpanded = false;\n\t\t}\n\t\tcurrentFeed.isFeedExpanded = !currentFeed.isFeedExpanded;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisFeedZoomed: currentFeed.isFeedExpanded,\n\t\t\t\tvideoFeeds: videoFeeds,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.handleBitrateChange();\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleNightVision = async feed => {\n\t\tconst { conferenceInfo } = this.state;\n\t\tconst nightVisionMode = !feed.isNightVisionActive;\n\n\t\ttry {\n\t\t\tconst toggleResponse = await this.callManager.toggleNightVision(nightVisionMode, feed.deviceId, conferenceInfo.conferenceId, feed.participantId);\n\n\t\t\tif (toggleResponse.deviceControlsLocked) {\n\t\t\t\tthis.setState({ showDeviceControlsLockedModal: true });\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tthis.callManager.logger.error(`Toggle nightvision failed ${err}`);\n\t\t}\n\t};\n\n\ttogglePeerSpeaker = async feed => {\n\t\tconst { videoFeeds } = this.state;\n\n\t\tthis.callManager.callerParticipantId = feed.participantId;\n\t\tconst response = await this.callManager.toggleParticipantTrack(CallTypes.AUDIO, feed.isPeerSpeakerActive);\n\t\t// check if peer(hello) is in another call\n\t\tif (response.deviceControlsLocked) {\n\t\t\tthis.setState({ showDeviceControlsLockedModal: true });\n\t\t\treturn;\n\t\t}\n\n\t\tvideoFeeds[feed.deviceId].isPeerSpeakerActive = !videoFeeds[feed.deviceId].isPeerSpeakerActive;\n\t\t// if peer(hello) is not in another call than disable speaker to the previous hellos\n\t\tconst previousFeeds = Object.values(videoFeeds).filter(videoFeed => videoFeed.participantId !== feed.participantId && videoFeed.isPeerSpeakerActive);\n\t\tif (previousFeeds && previousFeeds.length) {\n\t\t\tpreviousFeeds.forEach(previousFeed => {\n\t\t\t\tthis.callManager.toggleParticipantTrack(CallTypes.AUDIO, true, previousFeed.participantId);\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\ttoggleAlarm = feed => {\n\t\tconst { conferenceInfo } = this.state;\n\n\t\tconst currentFeed = Object.values(this.state.videoFeeds).find(f => feed.deviceId === f.deviceId);\n\n\t\tif (!currentFeed) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callManager.togglePatientAtRiskAlert({\n\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\tparticipantId: conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: feed.participantId,\n\t\t\tdata: !currentFeed.isAlarmActive,\n\t\t});\n\t};\n\n\tonAlertPatientResponse = result => {\n\t\tconst videoFeeds = { ...this.state.videoFeeds };\n\t\tconst currentFeed = Object.values(videoFeeds).find(f => result.participantId === f.participantId);\n\t\tif (!currentFeed) {\n\t\t\treturn;\n\t\t}\n\t\tif (!result.isSuccessful) {\n\t\t\tthis.setState({\n\t\t\t\tstatAlarmError: `There was an error toggling stat alarm of ${currentFeed.roomName}. Please try again!`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentFeed.isAlarmActive = result.data;\n\t\tthis.setState({\n\t\t\tstatAlarmError: '',\n\t\t\tvideoFeeds: videoFeeds,\n\t\t});\n\t};\n\n\ttoggleMyMicrophone = async (feed, enabled) => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.microphone) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.DENIED) {\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'popup',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.toggleMonitoringMic(feed, enabled);\n\n\t\treturn true;\n\t};\n\n\ttoggleMonitoringMic = async (feed, enabled) => {\n\t\tconst selectedFeed = feed;\n\n\t\tif (selectedFeed.audioTrack) {\n\t\t\tif (this.prevFeed && this.prevFeed.audioTrack && this.prevFeed.audioTrack.id !== selectedFeed.audioTrack.id) {\n\t\t\t\tthis.prevFeed.audioTrack.enabled = false;\n\t\t\t\tthis.callManager.monitoringTrackToggled(false, this.prevFeed.participantId);\n\t\t\t}\n\n\t\t\tthis.prevFeed = selectedFeed;\n\t\t\tselectedFeed.audioTrack.enabled = enabled;\n\t\t\tthis.callManager.monitoringTrackToggled(selectedFeed.audioTrack.enabled, selectedFeed.participantId);\n\t\t\tthis.setFeedAudioTrackAndDisablePrevious(selectedFeed);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callManager.callerParticipantId = selectedFeed.participantId;\n\n\t\tconst audioStream = await this.callManager.toggleAudio();\n\n\t\tif (!audioStream || audioStream.error) {\n\t\t\t// Unsure what this part of functionality was added for, looks like we need to remove it\n\t\t\t// if (this.prevFeed && this.prevFeed.audioTrack?.enabled) {\n\t\t\t// \tconst videoFeeds = { ...this.state.videoFeeds };\n\t\t\t// \tthis.setState({\n\t\t\t// \t\tshowDeviceControlsLockedModal: !audioStream,\n\t\t\t// \t\tvideoFeeds: Object.keys(videoFeeds).reduce((acc, key) => {\n\t\t\t// \t\t\tconst newFeed = { ...acc[key] };\n\t\t\t// \t\t\tif (newFeed.participantId === this.prevFeed.participantId) {\n\t\t\t// \t\t\t\tnewFeed.audioTrack.enabled = false;\n\t\t\t// \t\t\t}\n\t\t\t// \t\t\tacc[key] = newFeed;\n\t\t\t// \t\t\treturn acc;\n\t\t\t// \t\t}, videoFeeds),\n\t\t\t// \t});\n\t\t\t// } else {\n\t\t\t// this.setState({ showDeviceControlsLockedModal: !audioStream });\n\t\t\t// }\n\n\t\t\tif (audioStream?.error?.failureReason === ToggleFailureReasonEnum.DEVICE_LOCKED) {\n\t\t\t\tthis.setState({ showDeviceControlsLockedModal: true });\n\t\t\t} else if (audioStream?.error) {\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis.prevFeed = selectedFeed;\n\t\tconst audioTrack = audioStream.mediaStream.getAudioTracks()[0];\n\t\tselectedFeed.audioTrack = audioTrack;\n\t\tthis.setFeedAudioTrackAndDisablePrevious(selectedFeed);\n\t};\n\n\tsetFeedAudioTrackAndDisablePrevious = currentFeed => {\n\t\tconst videoFeeds = { ...this.state.videoFeeds };\n\n\t\tconst newVideoFeeds = Object.keys(videoFeeds).reduce((acc, key) => {\n\t\t\tconst newFeed = { ...acc[key] };\n\t\t\tif (newFeed.participantId === currentFeed?.participantId) {\n\t\t\t\tnewFeed.audioTrack = currentFeed.audioTrack;\n\t\t\t} else if (newFeed.participantId !== currentFeed?.participantId && newFeed.audioTrack?.enabled) {\n\t\t\t\tnewFeed.audioTrack.enabled = false;\n\t\t\t}\n\t\t\tacc[key] = newFeed;\n\n\t\t\treturn acc;\n\t\t}, videoFeeds);\n\n\t\tthis.setState({\n\t\t\tvideoFeeds: newVideoFeeds,\n\t\t});\n\t};\n\n\tsetFeedColor = (feedColor, participantId) => {\n\t\tconst { videoFeeds } = this.state;\n\t\tObject.values(videoFeeds).forEach(videoFeed => {\n\t\t\tif (videoFeed.participantId === participantId && feedColor) {\n\t\t\t\tif (!videoFeed.colors || videoFeed.colors.length === 0) {\n\t\t\t\t\tvideoFeed.colors = [feedColor];\n\t\t\t\t} else {\n\t\t\t\t\tconst foundIndex = videoFeed.colors.findIndex(item => item === feedColor);\n\t\t\t\t\tif (foundIndex === -1) {\n\t\t\t\t\t\tvideoFeed.colors.push(feedColor);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvideoFeed.colors.splice(foundIndex, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\tonTreeViewLinkClick = sector => {\n\t\tif (Object.values(this.state.videoFeeds).length) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (sector.type === SectorTypes.ROOM) {\n\t\t\tthis.setState({\n\t\t\t\troomHasDeviceAssigned: !!sector.helloDeviceId,\n\t\t\t\tcurrentRoomName: sector.name,\n\t\t\t});\n\t\t}\n\t};\n\n\tcollapseSecondColumn = () => {\n\t\tthis.setState({\n\t\t\tisSecondColumnCollapsed: !this.state.isSecondColumnCollapsed,\n\t\t});\n\t};\n\n\tonDeviceLockedEventHandler = async data => {\n\t\tconst { deviceId } = data;\n\t\tconst newVideoFeeds = { ...this.state.videoFeeds };\n\t\tconst feed = newVideoFeeds[deviceId];\n\t\tlet showDeviceControlsLockedModal = false;\n\t\tlet stateToSet = {};\n\n\t\tif (feed?.audioTrack) {\n\t\t\tshowDeviceControlsLockedModal = feed.audioTrack.enabled;\n\t\t\tthis.callManager.removeTrackById(feed.participantId, feed.audioTrack.id);\n\t\t\tfeed.audioTrack.stop();\n\t\t\tdelete feed.audioTrack;\n\t\t\tstateToSet = { videoFeeds: newVideoFeeds };\n\t\t}\n\n\t\tif (feed?.isPeerSpeakerActive) {\n\t\t\tshowDeviceControlsLockedModal = true;\n\t\t\t// handle only ui because track will be removed from hello side\n\t\t\tfeed.isPeerSpeakerActive = false;\n\t\t}\n\n\t\tif (showDeviceControlsLockedModal) {\n\t\t\tthis.setState({ ...stateToSet, showDeviceControlsLockedModal });\n\t\t}\n\t};\n\n\thasHealthSystems = () => {\n\t\treturn this.props.allHealthSystems.length > 0;\n\t};\n\n\tsendCameraEvent = async (eventType, data) => {\n\t\tlet deviceControlsLocked;\n\t\tswitch (eventType) {\n\t\t\tcase SocketEvents.HelloDevice.MOVE_CAMERA:\n\t\t\t\t({ deviceControlsLocked } = await this.doSendPanTiltCameraEvent(data));\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.HelloDevice.COMMAND:\n\t\t\t\t({ deviceControlsLocked } = await this.callManager.rebootHuddleCam(data));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t({ deviceControlsLocked } = await this.callManager.sendCameraEvent(eventType, data));\n\t\t}\n\n\t\tif (deviceControlsLocked) {\n\t\t\tthis.setState({ showDeviceControlsLockedModal: true });\n\t\t}\n\t};\n\n\tdoSendPanTiltCameraEvent = async ({ direction, action }) => {\n\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\t\tconst feeds = Object.values(videoFeeds);\n\t\tlet expandedFeed = feeds.length === 1 ? feeds[0] : feeds.find(feed => feed.isFeedExpanded);\n\n\t\tif (!expandedFeed) {\n\t\t\treturn {};\n\t\t}\n\n\t\tconst { conferenceId } = conferenceInfo;\n\t\tconst { participantId, deviceId } = expandedFeed;\n\n\t\treturn this.callManager.panTiltCamera({ direction, helloDeviceId: deviceId, action, conferenceId, participantId });\n\t};\n\n\tcameraResponseListener = ({ event, message, isSuccessful, objectId }) => {\n\t\tconst { videoFeeds } = this.state;\n\t\tlet feed = videoFeeds[objectId];\n\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (event) {\n\t\t\tcase CameraEventTypes.SWITCH:\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tfeed.cameraType = message;\n\t\t\t\t\tfeed.zoomLevel = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.ZOOM:\n\t\t\t\tfeed.zoomLevel = +message;\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.TILT: {\n\t\t\t\tconst { disabledTiltDirections } = feed;\n\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tif ([CameraTiltDirection.UP, CameraTiltDirection.DOWN].includes(message)) {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.UP] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.DOWN] = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.LEFT] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.RIGHT] = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdisabledTiltDirections[message] = true;\n\t\t\t\t\tthis.doSendPanTiltCameraEvent({ direction: message, action: CameraTiltAction.STOP });\n\t\t\t\t}\n\n\t\t\t\tfeed.disabledTiltDirections = disabledTiltDirections;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CameraEventTypes.HUDDLE_CONNECTED_STATE:\n\t\t\t\tfeed.isHuddleCamConnected = isSuccessful;\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.NIGHT_VISION:\n\t\t\t\tfeed.isNightVisionActive = isSuccessful;\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_CAMERA_PRIVACY_STATE: {\n\t\t\t\tfeed.isCameraPrivacyOn = isSuccessful;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CameraEventTypes.HELLO_MIC_PRIVACY_STATE: {\n\t\t\t\tfeed.isMicPrivacyOn = isSuccessful;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t}\n\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\tonToggleCameraSwitch = feed => {\n\t\tconst { participantId, deviceId, cameraType, isCameraPrivacyOn } = feed;\n\t\tconst { conferenceId } = this.state.conferenceInfo;\n\n\t\tconst notAllowedToSwitchToHelloCam = cameraType === CameraType.HUDDLE && isCameraPrivacyOn;\n\t\tif (notAllowedToSwitchToHelloCam) {\n\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: true });\n\t\t\treturn;\n\t\t}\n\n\t\tthis.sendCameraEvent(SocketEvents.HelloDevice.SWITCH_CAMERA, { participantId, conferenceId, helloDeviceId: deviceId });\n\t};\n\n\tgetConferenceEndedText = conferenceEndReason => {\n\t\tif (conferenceEndReason === ConferenceEndReason.DROPPED) {\n\t\t\treturn 'Failed to reconnect to the network.';\n\t\t}\n\n\t\tif (conferenceEndReason === ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR) {\n\t\t\treturn 'This session was ended by a Banyan admin.';\n\t\t}\n\n\t\tif (conferenceEndReason === ConferenceEndReason.PARTICIPANT_INVITE_DENIED) {\n\t\t\treturn \"You don't have sufficient permissions to call this participant. Please contact your administrator.\";\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\tgetVideoFeedByParticipantId = (participantId, videoFeeds) => {\n\t\tconst participant = this.state.participants[participantId];\n\t\tif (!participant) {\n\t\t\tthis.callManager.logger.warn('Participant not found for remote ID:', origin);\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { objectId } = participant;\n\t\tif (!objectId) {\n\t\t\tthis.callManager.logger.warn('objectId not set for participant!');\n\t\t\treturn null;\n\t\t}\n\n\t\tconst feed = videoFeeds[objectId];\n\t\tif (!feed) {\n\t\t\tthis.callManager.logger.warn('Video feed or source not found for objectId: ', objectId);\n\t\t\treturn null;\n\t\t}\n\n\t\treturn feed;\n\t};\n\n\tonAudioTrackToggled = data => {\n\t\tif (!data) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { participantId, hasAudio } = data;\n\t\tconst { videoFeeds } = this.state;\n\t\tconst feed = this.getVideoFeedByParticipantId(participantId, videoFeeds);\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tfeed.isPeerSpeakerActive = hasAudio;\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\tonLocalAudioError = ({ participantId, trackDeviceNotFound, inputDevices }) => {\n\t\tconst { videoFeeds } = this.state;\n\t\tconst feed = this.getVideoFeedByParticipantId(participantId, videoFeeds);\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (feed.audioTrack?.enabled && (!trackDeviceNotFound || !inputDevices.length)) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\n\t\tdelete feed.audioTrack;\n\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\tdeviceStatusChanged = ({ objectId }) => {\n\t\tconst { videoFeeds } = this.state;\n\n\t\tconst feed = videoFeeds[objectId];\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (feed.audioTrack) {\n\t\t\tfeed.audioTrack.stop();\n\t\t\tdelete feed.audioTrack;\n\t\t}\n\t\tfeed.isPeerSpeakerActive = false;\n\t\tfeed.status = ParticipantState.RECONNECTING.type;\n\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\ttoggleSecondColumnButton = () => (\n\t\t\n\t);\n\n\trender() {\n\t\tif (!this.hasHealthSystems()) {\n\t\t\treturn ;\n\t\t}\n\n\t\tconst { videoFeeds, conferenceInfo, roomHasDeviceAssigned, disableButtons, conferenceEndReason, hasActiveConference, deniedParticipant } = this.state;\n\n\t\tconst allFeeds = Object.values(videoFeeds);\n\t\tconst feeds = sortArrayByProperty(allFeeds, 'dateAdded');\n\t\tconst shouldShowConferenceEnded = [ConferenceEndReason.DROPPED, ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR].includes(conferenceEndReason);\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{!shouldShowConferenceEnded && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{!hasActiveConference && (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t{roomHasDeviceAssigned && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{feeds.map(feed => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t this.removeFeed(feed.deviceId)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonExpandClick={() => this.toggleExpandFeed(feed)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonToggleNightVision={() => this.toggleNightVision(feed)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonToggleMyMicrophone={_.debounce(enabled => this.toggleMyMicrophone(feed, enabled), 200)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonToggleAlarm={_.debounce(() => this.toggleAlarm(feed), 500)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonTogglePeerSpeaker={_.debounce(() => this.togglePeerSpeaker(feed), 500)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSetFeedColor={color => this.setFeedColor(color, feed.participantId)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisableButtons={disableButtons}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpeerConnectionState={feed.peerConnectionState}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId={conferenceInfo && conferenceInfo.conferenceId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnyFeedExpanded={this.state.isFeedZoomed}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(feed.isFeedExpanded || (feeds.length === 1 && feeds[0].src)) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceInfo &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfeed.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfeed.status === ParticipantState.CONNECTED.type && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t this.onToggleCameraSwitch(feed)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonZoomCamera={direction => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst level = direction === ZoomDirection.INCREASE ? feed.zoomLevel + 20 : feed.zoomLevel - 20;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.sendCameraEvent(SocketEvents.HelloDevice.ZOOM_CAMERA, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlevel,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tparticipantId: feed.participantId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thelloDeviceId: feed.deviceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonPanTiltCamera={(direction, action) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.sendCameraEvent(SocketEvents.HelloDevice.MOVE_CAMERA, { direction, action })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonRebootHuddleCam={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.sendCameraEvent(SocketEvents.HelloDevice.COMMAND, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tparticipantId: feed.participantId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thelloDeviceId: feed.deviceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!Object.values(videoFeeds).length && !this.state.deniedParticipant && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    {this.state.currentRoomName}

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIn order to monitor rooms, please
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topen a hospital, choose the department,
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclick on a floor, and select a room.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!!this.state.deniedParticipant && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    {this.state.currentRoomName}

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou don't have sufficient permissions to call {deniedParticipant?.roomName}.
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPlease contact your administrator.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t{!roomHasDeviceAssigned && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    {this.state.currentRoomName}

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis room doesn't have any assigned devices.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    Please contact your administrator.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t{hasActiveConference && (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou're already in a call or monitoring patients.
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPlease try again after you end that session.\n\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{shouldShowConferenceEnded && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t{this.getConferenceEndedText(conferenceEndReason)}
    \n\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.state.isSecondColumnCollapsed ? 'keyboard_arrow_right' : 'keyboard_arrow_left'}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: false });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\tmessage={`You can't switch back to Banyan Bridge because the physical privacy buttons have been enabled. These buttons can be disabled only manually. Please contact your administrator.`}\n\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ statAlarmError: '' });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\tmessage={this.state.statAlarmError}\n\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ initiatorInfoFailed: false });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\tmessage='Failed to get your information. Please try again.'\n\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState({ showDeviceControlsLockedModal: false });\n\t\t\t\t\t}}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    A Virtual Care Provider is in a call with this device. You will be able to use these controls as soon as the call ends.

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}}\n\t\t\t\t\thideActionButtons={true}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Please refresh the page.

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{this.state.streamPermission && }\n\t\t\t
    \n\t\t);\n\t}\n}\n\nMonitoring.contextType = SocketContext;\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(Monitoring);\n","import { gatewayApi, APP_CONFIG } from '../constants/global-variables';\n\nexport function getDeviceConferencesByLevel(level, id, pageSize = 10, pageIndex = 0, start, end) {\n\tlet params = {\n\t\tlevel: level,\n\t\tid: id || APP_CONFIG.companyId,\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tstart: start ? new Date(start).getTime() / 1000 : undefined,\n\t\tend: end ? new Date(end).getTime() / 1000 : undefined,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1.2/conferences/organization-devices/${APP_CONFIG.companyId}`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getDeviceOngoingConferencesByLevel(level, id, pageSize = 10, pageIndex = 0) {\n\tlet params = {\n\t\tlevel: level,\n\t\tid: id || APP_CONFIG.companyId,\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/conferences/ongoing/organization-devices/${APP_CONFIG.companyId}`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport const startExportLogsTask = async ({ level, id, start, end }) => {\n\ttry {\n\t\tlet params = {\n\t\t\tlevel: level,\n\t\t\tid: id || APP_CONFIG.companyId,\n\t\t\tstart: Math.round(new Date(start).getTime() / 1000),\n\t\t\tend: Math.round(new Date(end).getTime() / 1000),\n\t\t\ttimezone: Intl.DateTimeFormat().resolvedOptions().timeZone\n\t\t};\n\n\t\tconst { data } = await gatewayApi.get(`v1/tasks/companies/${APP_CONFIG.companyId}/conferences`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const exportCallLogs = async ({ start, end, healthSystemId, regionId, hospitalId, departmentId, floorId, roomId }) => {\n\ttry {\n\t\tconst params = {\n\t\t\tstart,\n\t\t\tend,\n\t\t\thealthSystemId,\n\t\t\tregionId,\n\t\t\thospitalId,\n\t\t\tdepartmentId,\n\t\t\tfloorId,\n\t\t\troomId,\n\t\t\ttimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n\t\t};\n\t\tconst { data } = await gatewayApi.get(`/v1.1/tasks/companies/${APP_CONFIG.companyId}/conferences`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getPastCallLogs = async ({ start, end, healthSystemId, regionId, hospitalId, departmentId, floorId, roomId, pageSize, pageIndex }) => {\n\ttry {\n\t\tconst params = {\n\t\t\tstart,\n\t\t\tend,\n\t\t\thealthSystemId,\n\t\t\tregionId,\n\t\t\thospitalId,\n\t\t\tdepartmentId,\n\t\t\tfloorId,\n\t\t\troomId,\n\t\t\tpageSize,\n\t\t\tpageIndex,\n\t\t};\n\t\tconst { data } = await gatewayApi.get(`/v1/conferences/past/organization/${APP_CONFIG.companyId}`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getNurseCallsForDashboard = async ({ healthSystemId, regionId, hospitalId, nurseId, start, end }) => {\n\ttry {\n\t\tconst params = {\n\t\t\thealthSystemId,\n\t\t\tregionId,\n\t\t\thospitalId,\n\t\t\tnurseId,\n\t\t\tstart,\n\t\t\tend,\n\t\t};\n\t\tconst { data } = await gatewayApi.get(`/v1/organizations/${APP_CONFIG.companyId}/callstats/nurses/call-count`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getKpisForDashboard = async ({ healthSystemId, regionId, hospitalId, nurseId, start, end }) => {\n\ttry {\n\t\tconst params = {\n\t\t\thealthSystemId,\n\t\t\tregionId,\n\t\t\thospitalId,\n\t\t\tnurseId,\n\t\t\tstart,\n\t\t\tend,\n\t\t};\n\t\tconst { data } = await gatewayApi.get(`/v1/organizations/${APP_CONFIG.companyId}/callstats/kpis`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import React, { Component } from 'react';\nimport Select from 'react-select';\n\nclass Pagination extends Component {\n\tpageSizeChanged = pageSize => {\n\t\tthis.props.onChange(pageSize, 0);\n\t};\n\n\tgoToNextPage = () => {\n\t\tthis.props.onChange(this.props.pageSize, this.props.pageIndex + 1);\n\t};\n\n\tgoToPrevPage = () => {\n\t\tthis.props.onChange(this.props.pageSize, this.props.pageIndex - 1);\n\t};\n\n\ttotalNumberOfPages = () => {\n\t\tlet pages = parseInt(Math.ceil(parseFloat(this.props.totalCount / this.props.pageSize.value)));\n\t\treturn pages || 1;\n\t};\n\n\trender() {\n\t\tconst options = [\n\t\t\t{ value: 10, label: '10' },\n\t\t\t{ value: 25, label: '25' },\n\t\t\t{ value: 50, label: '50' },\n\t\t];\n\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\tRows per page:\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t{this.props.pageIndex + 1} of {this.totalNumberOfPages()}{' '}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{this.props.pageIndex !== 0 && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.props.pageIndex + 1 !== this.totalNumberOfPages() && this.totalNumberOfPages() !== 0 && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default Pagination;\n","import React, { Component } from 'react';\nimport Table from 'components/Table';\nimport { ObjectType } from 'constants/enums';\n\nclass CallDetails extends Component {\n\tisFeatureUsed(roomFeatureUsed, vcpFeatureUsed) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\tPatient: \n\t\t\t\t\t{roomFeatureUsed ? 'Yes' : 'No'}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tNurse: \n\t\t\t\t\t{vcpFeatureUsed ? 'Yes' : 'No'}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n\n\tgetCallDetails() {\n\t\tlet log = this.props.selectedConference;\n\n\t\tif (log.callType === 'Monitoring') {\n\t\t\tconst headers = [{ title: 'Room' }, { title: 'Audio Used' }, { title: 'Video Used' }, { title: 'Screen Used' }];\n\n\t\t\tlet nurse = log.participants.find(participant => participant.objectType === ObjectType.USER);\n\t\t\tlet devices = log.participants.filter(participant => participant.objectType === ObjectType.HELLO_DEVICE);\n\t\t\tlet devicesFeatures = devices.map(device => {\n\t\t\t\treturn {\n\t\t\t\t\tname: device.name,\n\t\t\t\t\taudioUsed: this.isFeatureUsed(device.usedAudio, nurse.usedAudio),\n\t\t\t\t\tvideoUsed: this.isFeatureUsed(device.usedVideo, nurse.usedVideo),\n\t\t\t\t\tscreenUsed: this.isFeatureUsed(device.usedScreen, nurse.usedScreen),\n\t\t\t\t};\n\t\t\t});\n\n\t\t\treturn
    ;\n\t\t} else {\n\t\t\tconst headers = [{ title: 'Audio Used' }, { title: 'Video Used' }, { title: 'Screen Used' }];\n\n\t\t\tlet features =\n\t\t\t\tObject.entries(log).length !== 0 && log.constructor === Object\n\t\t\t\t\t? {\n\t\t\t\t\t\t\taudioUsed: this.isFeatureUsed(log.usedAudio.room, log.usedAudio.vcp),\n\t\t\t\t\t\t\tvideoUsed: this.isFeatureUsed(log.usedVideo.room, log.usedVideo.vcp),\n\t\t\t\t\t\t\tscreenUsed: this.isFeatureUsed(log.usedScreen.room, log.usedScreen.vcp),\n\t\t\t\t\t }\n\t\t\t\t\t: {};\n\n\t\t\treturn
    ;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    Call Details

    \n\t\t\t\t{this.getCallDetails()}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default CallDetails;\n","import React, { Component } from 'react';\nimport moment from 'moment';\nimport { parseDate } from 'react-day-picker/moment';\nimport Select from 'react-select';\nimport DayPickerInput from 'react-day-picker/DayPickerInput';\nimport 'react-day-picker/lib/style.css';\nimport { exportCallLogs, getPastCallLogs } from 'api/calllogs';\nimport { getHealthSystems, getOrgTeamChildren } from 'api/users';\nimport { Table, Grid, Badge, Modal } from 'components';\nimport Pagination from 'components/Common/Pagination';\nimport CallDetails from 'components/CallLogs/CallDetails';\nimport { formatDate, getDateDifference, utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { ObjectType, CallStatus, DeviceListLevel, CallTypes, ParticipantState, UserRoles, BanyanCallTypesMessage } from 'constants/enums';\nimport { getUserProfile, getUserRole } from 'infrastructure/auth';\n\nclass PastCallsList extends Component {\n\tstate = {\n\t\tlogs: [],\n\t\tloading: false,\n\t\tpageSize: { value: 10, label: '10' },\n\t\tpageIndex: 0,\n\t\ttotalCount: 0,\n\t\tfrom: undefined,\n\t\tto: undefined,\n\t\tselectedHealthSystem: null,\n\t\tselectedRegion: null,\n\t\tselectedHospital: null,\n\t\tselectedDepartment: null,\n\t\tselectedFloor: null,\n\t\tselectedRoom: null,\n\t\thealthSystems: [],\n\t\tregions: [],\n\t\thospitals: [],\n\t\tdepartments: [],\n\t\tfloors: [],\n\t\trooms: [],\n\t\tcurrentLevel: DeviceListLevel.ORGANIZATION,\n\t\tcurrentTeamId: null,\n\t\tshowCallQueueModal: false,\n\t\tshowCallDetailsModal: false,\n\t\tshowListOfRoomsModal: false,\n\t\tcurrentCallLogQueue: [],\n\t\tselectedConference: {},\n\t\tisExportLogsModalOpen: false,\n\t\tdateError: '',\n\t\tisExportLogsModalLoading: false,\n\t\thasExportLogsModalErrors: false,\n\t};\n\n\tuserProfile = getUserProfile();\n\n\tallObj = { label: 'All', value: null };\n\n\tasync componentDidMount() {\n\t\tconst healthSystems = await getHealthSystems();\n\t\tconst healthSystemsOptions = healthSystems.map(hs => {\n\t\t\treturn { value: hs.id, label: hs.name };\n\t\t});\n\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\thealthSystemsOptions.unshift(this.allObj);\n\t\t}\n\n\t\tthis.setState({\n\t\t\thealthSystems: healthSystemsOptions,\n\t\t});\n\n\t\tthis.onInitPastCallLogs();\n\n\t\tif (getUserRole() !== UserRoles.ADMIN) {\n\t\t\tthis.filterByLevel(healthSystems[0].id, DeviceListLevel.HEALTHSYSTEM);\n\n\t\t\tconst regions = await getOrgTeamChildren(healthSystems[0].id);\n\t\t\tconst regionsOptions = regions.map(r => {\n\t\t\t\treturn { value: r.id, label: r.name };\n\t\t\t});\n\t\t\tregionsOptions.unshift(this.allObj);\n\n\t\t\tthis.setState({\n\t\t\t\tselectedHealthSystem: { value: healthSystems[0].id, label: healthSystems[0].name },\n\t\t\t\tcurrentLevel: DeviceListLevel.HEALTHSYSTEM,\n\t\t\t\tcurrentTeamId: healthSystems[0].id,\n\t\t\t\thealthSystems: healthSystemsOptions,\n\t\t\t\tregions: regionsOptions,\n\t\t\t});\n\t\t}\n\t}\n\n\tgetCallType(callType, initiator) {\n\t\tif (callType === CallTypes.AUDIO && initiator === 'Virtual Care Provider') {\n\t\t\treturn BanyanCallTypesMessage.TALK_TO_PATIENT;\n\t\t}\n\t\tif (callType === CallTypes.AUDIO && initiator === 'Patient') {\n\t\t\treturn BanyanCallTypesMessage.TALK_TO_NURSE;\n\t\t}\n\t\tif (callType === CallTypes.VIDEO) {\n\t\t\treturn BanyanCallTypesMessage.VIDEO_CALL;\n\t\t}\n\t\tif (callType === CallTypes.SECURITYCAM) {\n\t\t\treturn BanyanCallTypesMessage.PATIENT_VIEW;\n\t\t}\n\t\tif (callType === CallTypes.MONITORING) {\n\t\t\treturn BanyanCallTypesMessage.MONITORING;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tisSuccessfulCall(status) {\n\t\tif (status === CallStatus.FAILED.type || status === CallStatus.MISSED.type || status === CallStatus.ABORTED.type) return false;\n\n\t\treturn true;\n\t}\n\n\tgetLogs(conferences) {\n\t\treturn conferences.map(conference => {\n\t\t\tconst room =\n\t\t\t\tconference.callType === CallTypes.MONITORING ? this.getMonitoredRooms(conference.participants) : this.getPatientRoom(conference.participants);\n\t\t\tconst vcp = this.getVirtualCareProvider(conference.participants, conference.status);\n\t\t\tconst status = this.getCallStatus(conference.status);\n\t\t\tconst startedAt = moment(utcToLocalTime(conference.startedAt)).format('MM/DD/YYYY-hh:mm A');\n\t\t\tconst endedAt = moment(utcToLocalTime(conference.endedAt)).format('MM/DD/YYYY-hh:mm A');\n\t\t\tconst initiator = vcp?.isInitiator ? 'Virtual Care Provider' : 'Patient';\n\t\t\tconst rooms = conference.participants.filter(p => p.objectType === ObjectType.HELLO_DEVICE);\n\t\t\treturn {\n\t\t\t\tid: conference.id,\n\t\t\t\tinitiator: initiator,\n\t\t\t\tprovider: (conference.callType !== CallTypes.MONITORING && room.isInitiator && !this.isSuccessfulCall(conference.status)) || !vcp ? 'N/A' : vcp.name,\n\t\t\t\troom: conference.callType === CallTypes.MONITORING ? room : room.name,\n\t\t\t\tstartedAt: startedAt,\n\t\t\t\tendedAt: endedAt,\n\t\t\t\torigin: vcp?.isInitiator ? 'Outgoing' : 'Incoming',\n\t\t\t\tstatus: status,\n\t\t\t\tcallType: this.getCallType(conference.callType, initiator),\n\t\t\t\tduration: conference.callDuration,\n\t\t\t\tusedAudio: { room: room.usedAudio, vcp: vcp?.usedAudio },\n\t\t\t\tusedVideo: { room: room.usedVideo, vcp: vcp?.usedVideo },\n\t\t\t\tusedScreen: { room: room.usedScreen, vcp: vcp?.usedScreen },\n\t\t\t\tparticipants: conference.participants,\n\t\t\t\tqueue: room.isInitiator ? conference.participants.filter(participant => participant.objectType === ObjectType.USER) : [],\n\t\t\t\troomCount: rooms.length,\n\t\t\t};\n\t\t});\n\t}\n\n\tgetMonitoredRooms(participants) {\n\t\tconst rooms = participants.reduce((acc, value) => {\n\t\t\tif (value.objectType === ObjectType.HELLO_DEVICE) {\n\t\t\t\treturn `${acc}${acc && ','}${value.name}`;\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, '');\n\n\t\treturn rooms;\n\t}\n\n\tgetTableRows() {\n\t\tif (this.state.logs.length === 0) return [];\n\t\treturn this.state.logs.map(log => {\n\t\t\treturn {\n\t\t\t\tconferenceId: log.id,\n\t\t\t\tinitiator: log.initiator,\n\t\t\t\tprovider: log.provider,\n\t\t\t\troom:\n\t\t\t\t\tlog.callType === BanyanCallTypesMessage.MONITORING ? (\n\t\t\t\t\t\t this.openListOfRoomsModal(log)}>\n\t\t\t\t\t\t\tView All\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\tlog.room\n\t\t\t\t\t),\n\t\t\t\tdate: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t{log.startedAt}\n\t\t\t\t\t\t{log.endedAt}\n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t\torigin: log.origin,\n\t\t\t\tstatus: this.getStatusBadge(log.status),\n\t\t\t\tduration: log.duration,\n\t\t\t\tcallType: log.callType,\n\t\t\t\tdetails: (\n\t\t\t\t\t this.openCallDetailsModal(log)}>\n\t\t\t\t\t\tView Details\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\tqueue:\n\t\t\t\t\tlog.queue.length > 0 ? (\n\t\t\t\t\t\t this.openCallLogQueueModal(log.queue)}>\n\t\t\t\t\t\t\tView All\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t'N/A'\n\t\t\t\t\t),\n\t\t\t};\n\t\t});\n\t}\n\n\topenCallLogQueueModal(participants) {\n\t\tthis.setState({\n\t\t\tshowCallQueueModal: true,\n\t\t\tcurrentCallLogQueue: participants,\n\t\t});\n\t}\n\n\topenCallDetailsModal(conference) {\n\t\tthis.setState({\n\t\t\tshowCallDetailsModal: true,\n\t\t\tselectedConference: conference,\n\t\t});\n\t}\n\n\tstartExportTask = async () => {\n\t\tthis.setState({\n\t\t\tisExportLogsModalLoading: true,\n\t\t});\n\t\tconst { error } = await exportCallLogs({\n\t\t\tstart: Math.round(new Date(this.state.from).getTime() / 1000),\n\t\t\tend: Math.round(new Date(this.state.to).getTime() / 1000),\n\t\t\thealthSystemId: this.state.selectedHealthSystem?.value ?? null,\n\t\t\tregionId: this.state.selectedRegion?.value ?? null,\n\t\t\thospitalId: this.state.selectedHospital?.value ?? null,\n\t\t\tdepartmentId: this.state.selectedDepartment?.value ?? null,\n\t\t\tfloorId: this.state.selectedFloor?.value ?? null,\n\t\t\troomId: this.state.selectedRoom?.value ?? null,\n\t\t});\n\n\t\tthis.setState({\n\t\t\tisExportLogsModalLoading: false,\n\t\t\thasExportLogsModalErrors: !!error,\n\t\t\tisExportLogsModalOpen: !!error,\n\t\t});\n\t};\n\n\tgetVirtualCareProvider(participants, status) {\n\t\tif (status === CallStatus.SUCCESSFUL.type && participants.length > 2) {\n\t\t\treturn participants.find(participant => {\n\t\t\t\treturn participant.objectType === ObjectType.USER && participant.isInitiator;\n\t\t\t});\n\t\t}\n\n\t\treturn participants.find(participant => {\n\t\t\treturn participant.objectType === ObjectType.USER;\n\t\t});\n\t}\n\n\tgetPatientRoom(participants) {\n\t\treturn participants.find(participant => {\n\t\t\treturn participant.objectType === ObjectType.HELLO_DEVICE;\n\t\t});\n\t}\n\n\tgetCallStatus(status) {\n\t\tswitch (status) {\n\t\t\tcase CallStatus.UNDEFINED.type: {\n\t\t\t\treturn CallStatus.UNDEFINED.message;\n\t\t\t}\n\t\t\tcase CallStatus.SUCCESSFUL.type: {\n\t\t\t\treturn CallStatus.SUCCESSFUL.message;\n\t\t\t}\n\t\t\tcase CallStatus.PARTIALLYSUCCESSFUL.type: {\n\t\t\t\treturn CallStatus.PARTIALLYSUCCESSFUL.message;\n\t\t\t}\n\t\t\tcase CallStatus.FAILED.type: {\n\t\t\t\treturn CallStatus.FAILED.message;\n\t\t\t}\n\t\t\tcase CallStatus.DISRUPTED.type: {\n\t\t\t\treturn CallStatus.DISRUPTED.message;\n\t\t\t}\n\t\t\tcase CallStatus.PARTIALLYDISRUPTED.type: {\n\t\t\t\treturn CallStatus.PARTIALLYDISRUPTED.message;\n\t\t\t}\n\t\t\tcase CallStatus.MISSED.type: {\n\t\t\t\treturn CallStatus.MISSED.message;\n\t\t\t}\n\t\t\tcase CallStatus.ABORTED.type: {\n\t\t\t\treturn CallStatus.ABORTED.message;\n\t\t\t}\n\t\t\tcase CallStatus.DROPPED.type: {\n\t\t\t\treturn CallStatus.DROPPED.message;\n\t\t\t}\n\t\t\t// no default\n\t\t}\n\t}\n\n\tgetStatusBadge(status) {\n\t\treturn ;\n\t}\n\n\tonChange = async (pageSize, pageIndex, start, end) => {\n\t\tconst startDate = start || this.state.from;\n\t\tconst endDate = end || this.state.to;\n\t\tconst result = await getPastCallLogs({\n\t\t\tstart: startDate ? Math.round(new Date(startDate).getTime() / 1000) : null,\n\t\t\tend: endDate ? Math.round(new Date(endDate).getTime() / 1000) : null,\n\t\t\thealthSystemId: this.state.selectedHealthSystem?.value,\n\t\t\tregionId: this.state.selectedRegion?.value,\n\t\t\thospitalId: this.state.selectedHospital?.value,\n\t\t\tdepartmentId: this.state.selectedDepartment?.value,\n\t\t\tfloorId: this.state.selectedFloor?.value,\n\t\t\troomId: this.state.selectedRoom?.value,\n\t\t\tpageSize: this.state.pageSize?.value,\n\t\t\tpageIndex: this.state.pageIndex,\n\t\t});\n\t\tif (result.error) {\n\t\t\treturn;\n\t\t}\n\t\tconst logs = this.getLogs(result.conferences);\n\t\tthis.setState({\n\t\t\tlogs,\n\t\t\tloading: false,\n\t\t\tpageSize,\n\t\t\tpageIndex,\n\t\t\ttotalCount: result.totalCount,\n\t\t});\n\t};\n\n\tshowFromMonth() {\n\t\tconst { from, to } = this.state;\n\t\tif (!from) {\n\t\t\treturn;\n\t\t}\n\t\tif (moment(to).diff(moment(from), 'months') < 2) {\n\t\t\tthis.to.getDayPicker().showMonth(from);\n\t\t}\n\t}\n\n\thandleFromChange = from => {\n\t\tconst daysDiff = this.state.selectedHealthSystem === this.allObj ? 1 : 90;\n\t\tconst diff = getDateDifference(from, this.state.to);\n\t\tif (diff > daysDiff) {\n\t\t\tthis.setState({\n\t\t\t\tdateError: `Date difference cant be more than ${daysDiff} days`,\n\t\t\t\tfrom,\n\t\t\t});\n\t\t} else {\n\t\t\tthis.setState({ from, dateError: '' });\n\t\t\tif (from && !this.state.to) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.onChange(this.state.pageSize, 0, this.state.to?.setHours(0, 0, 0, 0), from?.setHours(23, 59, 59));\n\t\t}\n\t};\n\n\thandleToChange = to => {\n\t\tconst daysDiff = this.state.selectedHealthSystem === this.allObj ? 1 : 90;\n\t\tconst diff = getDateDifference(this.state.from, to);\n\t\tif (diff > daysDiff) {\n\t\t\tthis.setState({\n\t\t\t\tdateError: `Date difference cant be more than ${daysDiff} days`,\n\t\t\t\tto,\n\t\t\t});\n\t\t} else {\n\t\t\tthis.setState({ to, dateError: '' }, this.showFromMonth);\n\t\t\tif (!this.state.from && to) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.onChange(this.state.pageSize, 0, this.state.from?.setHours(0, 0, 0, 0), to?.setHours(23, 59, 59));\n\t\t}\n\t};\n\n\thandleResetClick = () => {\n\t\tthis.setState({ from: undefined, to: undefined });\n\t};\n\n\tasync filterByLevel(value, type, isInit = false) {\n\t\tthis.setState({\n\t\t\tloading: true,\n\t\t\tpageIndex: 0,\n\t\t\tdateError: '',\n\t\t});\n\n\t\tlet start = this.state.from ? Math.round(new Date(this.state.from).getTime() / 1000) : null;\n\t\tlet end = this.state.to ? Math.round(new Date(this.state.to).getTime() / 1000) : null;\n\n\t\tif (type === DeviceListLevel.ORGANIZATION && isInit) {\n\t\t\tconst oneDayBefore = new Date();\n\t\t\toneDayBefore.setDate(oneDayBefore.getDate() - 1);\n\t\t\tconst endDate = new Date();\n\t\t\tconst formattedStart = oneDayBefore.setHours(0, 0, 0, 0);\n\t\t\tconst formattedEnd = endDate.setHours(23, 59, 59, 999);\n\t\t\tstart = Math.round(new Date(formattedStart).getTime() / 1000);\n\t\t\tend = Math.round(new Date(formattedEnd).getTime() / 1000);\n\n\t\t\tthis.setState({\n\t\t\t\tfrom: oneDayBefore,\n\t\t\t\tto: endDate,\n\t\t\t});\n\t\t}\n\n\t\tconst result = await getPastCallLogs({\n\t\t\tstart,\n\t\t\tend,\n\t\t\thealthSystemId: type === DeviceListLevel.HEALTHSYSTEM ? value : this.state.selectedHealthSystem?.value,\n\t\t\tregionId: type === DeviceListLevel.REGION ? value : this.state.selectedRegion?.value,\n\t\t\thospitalId: type === DeviceListLevel.HOSPITAL ? value : this.state.selectedHospital?.value,\n\t\t\tdepartmentId: type === DeviceListLevel.DEPARTMENT ? value : this.state.selectedDepartment?.value,\n\t\t\tfloorId: type === DeviceListLevel.FLOOR ? value : this.state.selectedFloor?.value,\n\t\t\troomId: type === DeviceListLevel.ROOM ? value : this.state.selectedRoom?.value,\n\t\t\tpageSize: this.state.pageSize.value,\n\t\t\tpageIndex: this.state.pageIndex,\n\t\t});\n\t\tif (result.error) {\n\t\t\treturn;\n\t\t}\n\t\tconst logs = this.getLogs(result.conferences);\n\t\tthis.setState({\n\t\t\tlogs: logs,\n\t\t\tloading: false,\n\t\t\ttotalCount: result.totalCount,\n\t\t});\n\t}\n\n\tasync onHealthSystemSelected(value) {\n\t\tif (!value?.value) {\n\t\t\tthis.onInitPastCallLogs();\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tselectedHealthSystem: value,\n\t\t\tselectedRegion: this.allObj,\n\t\t\tselectedHospital: null,\n\t\t\tselectedDepartment: null,\n\t\t\tselectedFloor: null,\n\t\t\tselectedRoom: null,\n\t\t\tregions: [],\n\t\t\thospitals: [],\n\t\t\tdepartments: [],\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.HEALTHSYSTEM,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.HEALTHSYSTEM);\n\n\t\tconst regions = await getOrgTeamChildren(value.value);\n\t\tconst regionsOptions = regions.map(r => {\n\t\t\treturn { value: r.id, label: r.name };\n\t\t});\n\t\tregionsOptions.unshift(this.allObj);\n\t\tthis.setState({ regions: regionsOptions });\n\t}\n\n\tasync onInitPastCallLogs() {\n\t\tif (this.state.from && this.state.to) {\n\t\t\tconst diff = getDateDifference(this.state.from, this.state.to);\n\t\t\tif (diff > 1) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdateError: `Date difference cant be more than 1 day`,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.setState({\n\t\t\tselectedHealthSystem: this.allObj,\n\t\t\tselectedRegion: null,\n\t\t\tselectedHospital: null,\n\t\t\tselectedDepartment: null,\n\t\t\tselectedFloor: null,\n\t\t\tselectedRoom: null,\n\t\t\tregions: [],\n\t\t\thospitals: [],\n\t\t\tdepartments: [],\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tdateError: false,\n\t\t});\n\n\t\tthis.filterByLevel(null, DeviceListLevel.ORGANIZATION, true);\n\t}\n\n\tasync onRegionSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedRegion: value,\n\t\t\tselectedHospital: this.allObj,\n\t\t\tselectedDepartment: null,\n\t\t\tselectedFloor: null,\n\t\t\tselectedRoom: null,\n\t\t\thospitals: [],\n\t\t\tdepartments: [],\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.REGION,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.REGION);\n\n\t\tconst hospitals = await getOrgTeamChildren(value.value);\n\t\tconst hospitalOptions = hospitals.map(h => {\n\t\t\treturn { value: h.id, label: h.name };\n\t\t});\n\t\thospitalOptions.unshift(this.allObj);\n\t\tthis.setState({ hospitals: hospitalOptions });\n\t}\n\n\tasync onHospitalSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedHospital: value,\n\t\t\tselectedDepartment: this.allObj,\n\t\t\tselectedFloor: null,\n\t\t\tselectedRoom: null,\n\t\t\tdepartments: [],\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.HOSPITAL,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.HOSPITAL);\n\n\t\tconst departments = await getOrgTeamChildren(value.value);\n\t\tconst departmentOptions = departments.map(d => {\n\t\t\treturn { value: d.id, label: d.name };\n\t\t});\n\t\tthis.setState({ departments: departmentOptions });\n\t}\n\n\tasync onDepartmentSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedDepartment: value,\n\t\t\tselectedFloor: this.allObj,\n\t\t\tselectedRoom: null,\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.DEPARTMENT,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.DEPARTMENT);\n\n\t\tconst floors = await getOrgTeamChildren(value.value);\n\t\tconst floorOptions = floors.map(f => {\n\t\t\treturn { value: f.id, label: f.name };\n\t\t});\n\t\tfloorOptions.unshift(this.allObj);\n\t\tthis.setState({ floors: floorOptions });\n\t}\n\n\tasync onFloorSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedFloor: value,\n\t\t\tselectedRoom: this.allObj,\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.FLOOR,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.FLOOR);\n\n\t\tconst rooms = await getOrgTeamChildren(value.value);\n\t\tconst roomOptions = rooms.map(r => {\n\t\t\treturn { value: r.id, label: r.name };\n\t\t});\n\t\troomOptions.unshift(this.allObj);\n\t\tthis.setState({ rooms: roomOptions });\n\t}\n\n\tasync onRoomSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedRoom: value,\n\t\t\tcurrentLevel: DeviceListLevel.ROOM,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.ROOM);\n\t}\n\n\tshowListOfUnavailableNurses() {\n\t\tconst headers = [{ title: 'Name' }, { title: 'Status' }];\n\n\t\tconst unavailableNurses = this.state.currentCallLogQueue.map(nurse => {\n\t\t\treturn {\n\t\t\t\tname: nurse.name,\n\t\t\t\tstatus: this.getParticipantState(nurse.state),\n\t\t\t};\n\t\t});\n\n\t\treturn ;\n\t}\n\n\tgetParticipantState(state) {\n\t\tswitch (state) {\n\t\t\tcase ParticipantState.CONNECTING.type: {\n\t\t\t\treturn ParticipantState.CONNECTING.message;\n\t\t\t}\n\t\t\tcase ParticipantState.CONNECTED.type: {\n\t\t\t\treturn ParticipantState.CONNECTED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.BUSY.type: {\n\t\t\t\treturn ParticipantState.BUSY.message;\n\t\t\t}\n\t\t\tcase ParticipantState.DECLINED.type: {\n\t\t\t\treturn ParticipantState.DECLINED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.OFFLINE.type: {\n\t\t\t\treturn ParticipantState.OFFLINE.message;\n\t\t\t}\n\t\t\tcase ParticipantState.LEFT_CALL.type: {\n\t\t\t\treturn ParticipantState.LEFT_CALL.message;\n\t\t\t}\n\t\t\tcase ParticipantState.NOT_ANSWERING.type: {\n\t\t\t\treturn ParticipantState.NOT_ANSWERING.message;\n\t\t\t}\n\t\t\tcase ParticipantState.CANT_CONNECT.type: {\n\t\t\t\treturn ParticipantState.CANT_CONNECT.message;\n\t\t\t}\n\t\t\tcase ParticipantState.DISRUPTED.type: {\n\t\t\t\treturn ParticipantState.DISRUPTED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.REMOVED.type: {\n\t\t\t\treturn ParticipantState.REMOVED.message;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\treturn 'N/A';\n\t\t\t}\n\t\t}\n\t}\n\n\topenListOfRoomsModal = conference => {\n\t\tthis.setState({\n\t\t\tselectedConference: conference,\n\t\t\tshowListOfRoomsModal: true,\n\t\t});\n\t};\n\n\tshowListOfRooms = () => {\n\t\tconst headers = [{ title: 'Room' }, { title: 'Status' }];\n\t\tconst conference = this.state.selectedConference;\n\t\tif (!conference || !conference.participants) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\treturn console.error('Error while getting list of participants!');\n\t\t}\n\n\t\tconst rooms = conference.participants.reduce((acc, participant) => {\n\t\t\tif (participant.objectType === ObjectType.HELLO_DEVICE) {\n\t\t\t\tacc.push({\n\t\t\t\t\troom: participant.name,\n\t\t\t\t\tstatus: this.getParticipantState(participant.state),\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\treturn
    ;\n\t};\n\n\trender() {\n\t\tconst tableHeaders = [\n\t\t\t{ title: 'ID' },\n\t\t\t{ title: 'Call Initiator' },\n\t\t\t{ title: 'Virtual Care Provider' },\n\t\t\t{ title: 'Room' },\n\t\t\t{ title: 'Date/Time' },\n\t\t\t{ title: 'Call Origin' },\n\t\t\t{ title: 'Call Status' },\n\t\t\t{ title: 'Call Duration' },\n\t\t\t{ title: 'Call Type' },\n\t\t\t{ title: 'Details' },\n\t\t\t{ title: 'Queue' },\n\t\t];\n\t\tconst { from, to } = this.state;\n\t\tconst modifiers = { start: from, end: to };\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t this.onHealthSystemSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onRegionSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onHospitalSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onDepartmentSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onFloorSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onRoomSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tdate_range\n\t\t\t\t\t\t\t\t this.to.getInput().focus(),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonDayChange={this.handleFromChange}\n\t\t\t\t\t\t\t\t/>{' '}\n\t\t\t\t\t\t\t\t-{' '}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t (this.to = el)}\n\t\t\t\t\t\t\t\t\t\tvalue={to}\n\t\t\t\t\t\t\t\t\t\tplaceholder='--/--/----'\n\t\t\t\t\t\t\t\t\t\tformat='LL'\n\t\t\t\t\t\t\t\t\t\tformatDate={formatDate}\n\t\t\t\t\t\t\t\t\t\tparseDate={parseDate}\n\t\t\t\t\t\t\t\t\t\tdayPickerProps={{\n\t\t\t\t\t\t\t\t\t\t\tselectedDays: [from, { from, to }],\n\t\t\t\t\t\t\t\t\t\t\tdisabledDays: { before: from },\n\t\t\t\t\t\t\t\t\t\t\tmodifiers,\n\t\t\t\t\t\t\t\t\t\t\tmonth: from,\n\t\t\t\t\t\t\t\t\t\t\tfromMonth: from,\n\t\t\t\t\t\t\t\t\t\t\tnumberOfMonths: 2,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonDayChange={this.handleToChange}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarrow_drop_down\n\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t{this.state.dateError &&

    {this.state.dateError}

    }\n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.setState({ isExportLogsModalOpen: true });\n\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\tattach_emailExport to CSV\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t this.onChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.setState({ showCallQueueModal: false, currentCallLogQueue: [] })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Queue of nurses that were called

    \n\t\t\t\t\t\t{this.showListOfUnavailableNurses()}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.setState({ showCallDetailsModal: false, selectedConference: {} })}>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t this.setState({ showListOfRoomsModal: false, selectedConference: {} })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    List of Rooms

    \n\t\t\t\t\t\t{this.state.showListOfRoomsModal && this.showListOfRooms()}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.setState({ isExportLogsModalOpen: false, isExportLogsModalLoading: false, hasExportLogsModalErrors: false })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Export CSV Logs

    \n\t\t\t\t\t\t{!this.state.hasExportLogsModalErrors && (\n\t\t\t\t\t\t\t

    {`The CSV export will be created in the background. Once finished, it will be sent to ${this.userProfile.email} in an attachment.`}

    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.hasExportLogsModalErrors &&

    Something went wrong. Please try again later

    }\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default PastCallsList;\n","import React, { Component } from 'react';\nimport moment from 'moment';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { getUserProfile, getUserRole } from 'infrastructure/auth';\nimport { Table, Modal, Grid, Button } from 'components';\nimport Pagination from 'components/Common/Pagination';\nimport {\n\tObjectType,\n\tCallStatus,\n\tDeviceListLevel,\n\tCallTypes,\n\tParticipantState,\n\tUserRoles,\n\tTerminateRequestFailureReasonMessages,\n\tTerminateRequestFailureReasonEnum,\n\tBanyanCallTypesMessage,\n} from 'constants/enums';\nimport SocketEvents from 'constants/socket-events';\nimport { getDeviceOngoingConferencesByLevel } from 'api/calllogs';\nimport { getHealthSystems } from 'api/users';\n\nexport class OngoingCallsList extends Component {\n\tconstructor(props, socket) {\n\t\tsuper(props);\n\t\tthis.socket = socket;\n\t\tthis.state = {\n\t\t\tlogs: [],\n\t\t\tloading: true,\n\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\tpageIndex: 0,\n\t\t\ttotalCount: 0,\n\t\t\tcurrentLevel: DeviceListLevel.ORGANIZATION,\n\t\t\tcurrentTeamId: null,\n\t\t\tshowListOfRoomsModal: false,\n\t\t\tshowTerminateCallModal: false,\n\t\t\tshowParticipantTerminateCallModal: false,\n\t\t\tisTerminateCallModalLoading: false,\n\t\t\tterminateRequestFailureReason: null,\n\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\tterminateRequestCloseButtonText: 'Cancel',\n\t\t\tterminateRequestInProgress: false,\n\t\t\tselectedConferenceId: null,\n\t\t\tselectedParticipantId: null,\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.bindSocketEvents();\n\t\tthis.bindWindowEventListener();\n\t\tconst userRole = getUserRole();\n\t\tconst healthSystems = await getHealthSystems();\n\t\t// uncomment this if you need to use it\n\t\t// const healthSystemsOptions = healthSystems.map(hs => {\n\t\t// \treturn { value: hs.id, label: hs.name };\n\t\t// });\n\n\t\tlet currentLevel = DeviceListLevel.ORGANIZATION;\n\t\tlet currentTeamId;\n\t\tif (userRole !== UserRoles.ADMIN) {\n\t\t\tcurrentLevel = DeviceListLevel.HEALTHSYSTEM;\n\t\t\tcurrentTeamId = healthSystems[0].id;\n\t\t}\n\n\t\tconst result = await getDeviceOngoingConferencesByLevel(currentLevel, currentTeamId);\n\t\tconst logs = this.getLogs(result.conferences);\n\t\tthis.setState({\n\t\t\tlogs,\n\t\t\tloading: false,\n\t\t\ttotalCount: result.totalCount,\n\t\t\tpageIndex: result.pageIndex,\n\t\t\tcurrentLevel,\n\t\t\tcurrentTeamId,\n\t\t\t// healthSystems: healthSystemsOptions, // uncomment this if you need to use it\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.clearTerminateRequestTimeout();\n\t\tthis.unbindSocketEvents();\n\t}\n\n\tonTerminateRequestAcceptedHandler = data => {\n\t\tif (this.state.selectedConferenceId === data.conferenceId) {\n\t\t\t// stop the timeout for terminate request\n\t\t\tthis.clearTerminateRequestTimeout();\n\n\t\t\t// remove conference from logs\n\t\t\tconst logs = this.removeConferenceFromLogs(data.conferenceId);\n\t\t\tthis.setState({\n\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\t\tlogs,\n\t\t\t});\n\t\t}\n\t};\n\n\tbindSocketEvents() {\n\t\tthis.socket.on(SocketEvents.Conference.ON_TERMINATE_REQUEST_ACCEPTED, this.onTerminateRequestAcceptedHandler);\n\t}\n\n\tunbindSocketEvents() {\n\t\tthis.socket.off(SocketEvents.Conference.ON_TERMINATE_REQUEST_ACCEPTED, this.onTerminateRequestAcceptedHandler);\n\t}\n\n\tbindWindowEventListener() {\n\t\twindow.addEventListener('beforeunload', event => {\n\t\t\tif (this.state.terminateRequestInProgress) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\tevent.returnValue = '';\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('unload', () => {\n\t\t\tif (this.state.terminateRequestInProgress) {\n\t\t\t\tthis.sendTerminateRequestCloseEvent();\n\t\t\t}\n\t\t});\n\t}\n\n\tgetCallType(callType, initiator) {\n\t\tif (callType === CallTypes.AUDIO && initiator === 'Virtual Care Provider') {\n\t\t\treturn BanyanCallTypesMessage.TALK_TO_PATIENT;\n\t\t}\n\t\tif (callType === CallTypes.AUDIO && initiator === 'Patient') {\n\t\t\treturn BanyanCallTypesMessage.TALK_TO_NURSE;\n\t\t}\n\t\tif (callType === CallTypes.VIDEO) {\n\t\t\treturn BanyanCallTypesMessage.VIDEO_CALL;\n\t\t}\n\t\tif (callType === CallTypes.SECURITYCAM) {\n\t\t\treturn BanyanCallTypesMessage.PATIENT_VIEW;\n\t\t}\n\t\tif (callType === CallTypes.MONITORING) {\n\t\t\treturn BanyanCallTypesMessage.MONITORING;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tisSuccessfulCall(status) {\n\t\tif (status === CallStatus.FAILED.type || status === CallStatus.MISSED.type || status === CallStatus.ABORTED.type) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tgetVirtualCareProvider(participants, status) {\n\t\tif (status === CallStatus.SUCCESSFUL.type && participants.length > 2) {\n\t\t\treturn participants.find(participant => {\n\t\t\t\treturn (\n\t\t\t\t\tparticipant.objectType === ObjectType.USER &&\n\t\t\t\t\t(participant.state === ParticipantState.CONNECTED.type ||\n\t\t\t\t\t\tparticipant.state === ParticipantState.LEFT_CALL.type ||\n\t\t\t\t\t\tparticipant.state === ParticipantState.CONNECTING.type ||\n\t\t\t\t\t\tparticipants.state === ParticipantState.DISRUPTED.type)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn participants.find(participant => {\n\t\t\treturn participant.objectType === ObjectType.USER;\n\t\t});\n\t}\n\n\tgetPatientRoom(participants) {\n\t\treturn participants.find(participant => {\n\t\t\treturn participant.objectType === ObjectType.HELLO_DEVICE;\n\t\t});\n\t}\n\n\tgetCallStatus(status) {\n\t\tlet result;\n\t\tswitch (status) {\n\t\t\tcase CallStatus.UNDEFINED.type: {\n\t\t\t\tresult = CallStatus.UNDEFINED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.SUCCESSFUL.type: {\n\t\t\t\tresult = CallStatus.SUCCESSFUL.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.PARTIALLYSUCCESSFUL.type: {\n\t\t\t\tresult = CallStatus.PARTIALLYSUCCESSFUL.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.FAILED.type: {\n\t\t\t\tresult = CallStatus.FAILED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.DISRUPTED.type: {\n\t\t\t\tresult = CallStatus.DISRUPTED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.PARTIALLYDISRUPTED.type: {\n\t\t\t\tresult = CallStatus.PARTIALLYDISRUPTED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.MISSED.type: {\n\t\t\t\tresult = CallStatus.MISSED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.ABORTED.type: {\n\t\t\t\tresult = CallStatus.ABORTED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.DROPPED.type: {\n\t\t\t\tresult = CallStatus.DROPPED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tgetLogs(conferences) {\n\t\tconst filtered = conferences.filter(conference => {\n\t\t\treturn typeof this.getVirtualCareProvider(conference.participants, conference.status) !== 'undefined';\n\t\t});\n\t\treturn filtered.map(conference => {\n\t\t\tconst room = this.getPatientRoom(conference.participants);\n\t\t\tconst vcp = this.getVirtualCareProvider(conference.participants, conference.status);\n\t\t\tconst status = this.getCallStatus(conference.status);\n\t\t\tconst startedAt = moment(utcToLocalTime(conference.startedAt)).format('MM/DD/YYYY-hh:mm A');\n\t\t\tconst initiator = vcp?.isInitiator ? 'Virtual Care Provider' : 'Patient';\n\t\t\treturn {\n\t\t\t\tid: conference.id,\n\t\t\t\tinitiator: initiator,\n\t\t\t\tprovider: room?.isInitiator && !this.isSuccessfulCall(conference.status) ? 'N/A' : vcp?.name,\n\t\t\t\troom: room?.name ?? 'N/A',\n\t\t\t\tstartedAt: startedAt,\n\t\t\t\torigin: vcp?.isInitiator ? 'Outgoing' : 'Incoming',\n\t\t\t\tstatus: status,\n\t\t\t\tcallType: this.getCallType(conference.callType, initiator),\n\t\t\t\tduration: conference.callDuration,\n\t\t\t\tusedAudio: { room: room?.usedAudio ?? 'N/A', vcp: vcp?.usedAudio ?? 'N/A' },\n\t\t\t\tusedVideo: { room: room?.usedVideo ?? 'N/A', vcp: vcp?.usedVideo ?? 'N/A' },\n\t\t\t\tusedScreen: { room: room?.usedScreen ?? 'N/A', vcp: vcp?.usedScreen ?? 'N/A' },\n\t\t\t\tparticipants: conference.participants,\n\t\t\t\tqueue: room?.isInitiator ? conference.participants.filter(participant => participant.objectType === ObjectType.USER) : [],\n\t\t\t};\n\t\t});\n\t}\n\n\tgetTableRows() {\n\t\tif (this.state.logs.length === 0) return [];\n\t\treturn this.state.logs.map(log => {\n\t\t\treturn {\n\t\t\t\tconferenceId: log.id,\n\t\t\t\tinitiator: log.initiator,\n\t\t\t\tprovider: log.provider,\n\t\t\t\troom:\n\t\t\t\t\tlog.callType === BanyanCallTypesMessage.MONITORING ? (\n\t\t\t\t\t\t this.openListOfRoomsModal(log.id)}>\n\t\t\t\t\t\t\tView All\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\tlog.room\n\t\t\t\t\t),\n\t\t\t\tdate: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t{log.startedAt}\n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t\torigin: log.origin,\n\t\t\t\tduration: log.duration,\n\t\t\t\tcallType: log.callType,\n\t\t\t\tterminateCall: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t this.openForceTerminateCallModal(log.id)}>\n\t\t\t\t\t\t\thighlight_off\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t};\n\t\t});\n\t}\n\n\tonChange(pageSize, pageIndex) {\n\t\tthis.setState({ loading: true }, () => {\n\t\t\tgetDeviceOngoingConferencesByLevel(\n\t\t\t\tthis.state.currentLevel,\n\t\t\t\tthis.state.currentTeamId ? this.state.currentTeamId : undefined,\n\t\t\t\tpageSize.value,\n\t\t\t\tpageIndex\n\t\t\t).then(result => {\n\t\t\t\tconst logs = this.getLogs(result.conferences);\n\t\t\t\tthis.setState({\n\t\t\t\t\tlogs: logs,\n\t\t\t\t\tloading: false,\n\t\t\t\t\tpageSize: pageSize,\n\t\t\t\t\tpageIndex: pageIndex,\n\t\t\t\t\ttotalCount: result.totalCount,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\topenForceTerminateCallModal(conferenceId) {\n\t\tthis.setState({\n\t\t\tshowTerminateCallModal: true,\n\t\t\tterminateRequestSubmitButtonText: 'End call',\n\t\t\tselectedConferenceId: conferenceId,\n\t\t});\n\t}\n\n\topenParticipantForceTerminateCallModal(conferenceId, participantId) {\n\t\tthis.setState({\n\t\t\tshowParticipantTerminateCallModal: true,\n\t\t\tterminateRequestSubmitButtonText: 'End call for room',\n\t\t\tselectedParticipantId: participantId,\n\t\t\tselectedConferenceId: conferenceId,\n\t\t\tshowListOfRoomsModal: false,\n\t\t});\n\t}\n\n\tcloseParticipantTerminalCallModal = () => {\n\t\tif (this.state.terminateRequestInProgress) {\n\t\t\tthis.sendTerminateRequestCloseEvent();\n\t\t}\n\t\tthis.clearTerminateRequestTimeout();\n\t\tthis.setState({\n\t\t\tshowParticipantTerminateCallModal: false,\n\t\t\tisTerminateCallModalLoading: false,\n\t\t\tterminateRequestFailureReason: null,\n\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\tterminateRequestInProgress: false,\n\t\t\tselectedParticipantId: null,\n\t\t});\n\t};\n\n\tcloseTerminalCallModal = () => {\n\t\tif (this.state.terminateRequestInProgress) {\n\t\t\tthis.sendTerminateRequestCloseEvent();\n\t\t}\n\t\tthis.clearTerminateRequestTimeout();\n\t\tthis.setState({\n\t\t\tshowTerminateCallModal: false,\n\t\t\tisTerminateCallModalLoading: false,\n\t\t\tterminateRequestFailureReason: null,\n\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\tterminateRequestInProgress: false,\n\t\t\tselectedConferenceId: null,\n\t\t});\n\t};\n\n\tonForceTerminalCallModalSubmit = async () => {\n\t\tthis.setState({\n\t\t\tisTerminateCallModalLoading: true,\n\t\t\tterminateRequestSubmitButtonText: 'Retry',\n\t\t\tterminateRequestInProgress: true,\n\t\t});\n\n\t\tconst userProfile = getUserProfile();\n\t\tconst user = {\n\t\t\tfullName: `${userProfile.firstName} ${userProfile.lastName}`,\n\t\t};\n\t\tthis.socket.emit(SocketEvents.Conference.FORCE_TERIMATE, { conferenceId: this.state.selectedConferenceId, user }, response => {\n\t\t\tif (!response.ok) {\n\t\t\t\tthis.clearTerminateRequestTimeout();\n\t\t\t\tconst newState = {\n\t\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\t\tterminateRequestFailureReason: response.failureReason, // shows the reason\n\t\t\t\t\tterminateRequestSubmitButtonText: '', // hides submit the button\n\t\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\t};\n\t\t\t\tif (response.failureReason === TerminateRequestFailureReasonEnum.NULL_CONFERENCE) {\n\t\t\t\t\t// remove conference from logs\n\t\t\t\t\tconst logs = this.removeConferenceFromLogs(this.state.selectedConferenceId);\n\t\t\t\t\tObject.assign(newState, { logs });\n\t\t\t\t\tObject.assign(newState, { terminateRequestCloseButtonText: 'Close' });\n\t\t\t\t} else if (\n\t\t\t\t\t[TerminateRequestFailureReasonEnum.UNHANDLED_EXCEPTION, TerminateRequestFailureReasonEnum.NULL_CONNECTED_USER_PARTICIPANT].includes(\n\t\t\t\t\t\tresponse.failureReason\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tObject.assign(newState, { terminateRequestSubmitButtonText: 'Retry' });\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst logs = this.removeConferenceFromLogs(this.state.selectedConferenceId);\n\t\t\tthis.setState({\n\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\t\tlogs,\n\t\t\t});\n\t\t});\n\t};\n\n\tonParticipantForceTerminalCallModalSubmit = () => {\n\t\tthis.setState({\n\t\t\tisTerminateCallModalLoading: true,\n\t\t\tterminateRequestSubmitButtonText: 'Retry',\n\t\t\tterminateRequestInProgress: true,\n\t\t});\n\n\t\tconst userProfile = getUserProfile();\n\t\tconst user = {\n\t\t\tfullName: `${userProfile.firstName} ${userProfile.lastName}`,\n\t\t};\n\t\tthis.socket.emit(SocketEvents.Conference.PARTICIPANT_FORCE_TERMINATE, { participantId: this.state.selectedParticipantId, user }, response => {\n\t\t\tif (!response.ok) {\n\t\t\t\tthis.clearTerminateRequestTimeout();\n\t\t\t\tconst newState = {\n\t\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\t\tterminateRequestFailureReason: response.failureReason, // shows the reason\n\t\t\t\t\tterminateRequestSubmitButtonText: '', // hides submit the button\n\t\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\t};\n\t\t\t\tif (response.failureReason === TerminateRequestFailureReasonEnum.NULL_CONFERENCE) {\n\t\t\t\t\t// remove conference from logs\n\t\t\t\t\tconst logs = this.removeConferenceFromLogs(this.state.selectedConferenceId);\n\t\t\t\t\tObject.assign(newState, { logs });\n\t\t\t\t\tObject.assign(newState, { terminateRequestCloseButtonText: 'Close' });\n\t\t\t\t} else if (\n\t\t\t\t\t[TerminateRequestFailureReasonEnum.UNHANDLED_EXCEPTION, TerminateRequestFailureReasonEnum.NULL_CONNECTED_USER_PARTICIPANT].includes(\n\t\t\t\t\t\tresponse.failureReason\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tObject.assign(newState, { terminateRequestSubmitButtonText: 'Retry' });\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst logs = this.changeStatusOfParticipantLogs(this.state.selectedParticipantId);\n\t\t\tthis.setState({\n\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\t\tlogs,\n\t\t\t});\n\t\t});\n\t};\n\n\tonTerminalCallModalSubmit = async () => {\n\t\tthis.setState({\n\t\t\tisTerminateCallModalLoading: true,\n\t\t\tterminateRequestSubmitButtonText: 'Retry',\n\t\t\tterminateRequestInProgress: true,\n\t\t});\n\n\t\tthis.socket.emit(SocketEvents.Conference.TERMINATE_REQUEST, { conferenceId: this.state.selectedConferenceId }, response => {\n\t\t\tif (!response.ok) {\n\t\t\t\tthis.clearTerminateRequestTimeout();\n\t\t\t\tconst newState = {\n\t\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\t\tterminateRequestFailureReason: response.failureReason, // shows the reason\n\t\t\t\t\tterminateRequestSubmitButtonText: '', // hides submit the button\n\t\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\t};\n\t\t\t\tif (response.failureReason === TerminateRequestFailureReasonEnum.NULL_CONFERENCE) {\n\t\t\t\t\t// remove conference from logs\n\t\t\t\t\tconst logs = this.removeConferenceFromLogs(this.state.selectedConferenceId);\n\t\t\t\t\tObject.assign(newState, { logs });\n\t\t\t\t\tObject.assign(newState, { terminateRequestCloseButtonText: 'Close' });\n\t\t\t\t} else if (\n\t\t\t\t\t[TerminateRequestFailureReasonEnum.UNHANDLED_EXCEPTION, TerminateRequestFailureReasonEnum.NULL_CONNECTED_USER_PARTICIPANT].includes(\n\t\t\t\t\t\tresponse.failureReason\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tObject.assign(newState, { terminateRequestSubmitButtonText: 'Retry' });\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tthis.terminateRequestTimeout = setTimeout(() => {\n\t\t\t\tthis.clearTerminateRequestTimeout();\n\t\t\t\tthis.setState({\n\t\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\t});\n\t\t\t}, 30000);\n\t\t\treturn undefined;\n\t\t});\n\t};\n\n\tclearTerminateRequestTimeout = () => {\n\t\tif (this.terminateRequestTimeout) {\n\t\t\tclearTimeout(this.terminateRequestTimeout);\n\t\t\tthis.terminateRequestTimeout = null;\n\t\t}\n\t};\n\n\tsendTerminateRequestCloseEvent = () => {\n\t\tthis.socket.emit(SocketEvents.Conference.TERMINATE_REQUEST_CANCEL, { conferenceId: this.state.selectedConferenceId });\n\t};\n\n\tremoveConferenceFromLogs = conferenceId => {\n\t\t// remove conference from logs\n\t\tconst logs = [...this.state.logs];\n\t\tconst conferenceIndex = logs.findIndex(conference => conference.id === conferenceId);\n\t\tif (conferenceIndex !== -1) {\n\t\t\tlogs.splice(conferenceIndex, 1);\n\t\t}\n\t\treturn logs;\n\t};\n\n\tchangeStatusOfParticipantLogs = participantId => {\n\t\tconst logs = [...this.state.logs];\n\t\tconst log = logs.find(conference => conference.id === this.state.selectedConferenceId);\n\t\tconst participant = log.participants.find(x => x.id === participantId);\n\t\tparticipant.state = ParticipantState.REMOVED.type;\n\t\treturn logs;\n\t};\n\n\ttableHeaders = [\n\t\t{ title: 'ID' },\n\t\t{ title: 'Call Initiator' },\n\t\t{ title: 'Virtual Care Provider' },\n\t\t{ title: 'Room' },\n\t\t{ title: 'Date/Time' },\n\t\t{ title: 'Call Origin' },\n\t\t{ title: 'Call Duration (so far)' },\n\t\t{ title: 'Call Type' },\n\t\t{ edit: '' },\n\t];\n\n\tgetParticipantState(state) {\n\t\tswitch (state) {\n\t\t\tcase ParticipantState.CONNECTING.type: {\n\t\t\t\treturn ParticipantState.CONNECTING.message;\n\t\t\t}\n\t\t\tcase ParticipantState.CONNECTED.type: {\n\t\t\t\treturn ParticipantState.CONNECTED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.BUSY.type: {\n\t\t\t\treturn ParticipantState.BUSY.message;\n\t\t\t}\n\t\t\tcase ParticipantState.DECLINED.type: {\n\t\t\t\treturn ParticipantState.DECLINED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.OFFLINE.type: {\n\t\t\t\treturn ParticipantState.OFFLINE.message;\n\t\t\t}\n\t\t\tcase ParticipantState.LEFT_CALL.type: {\n\t\t\t\treturn ParticipantState.LEFT_CALL.message;\n\t\t\t}\n\t\t\tcase ParticipantState.NOT_ANSWERING.type: {\n\t\t\t\treturn ParticipantState.NOT_ANSWERING.message;\n\t\t\t}\n\t\t\tcase ParticipantState.CANT_CONNECT.type: {\n\t\t\t\treturn ParticipantState.CANT_CONNECT.message;\n\t\t\t}\n\t\t\tcase ParticipantState.DISRUPTED.type: {\n\t\t\t\treturn ParticipantState.DISRUPTED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.REMOVED.type: {\n\t\t\t\treturn ParticipantState.REMOVED.message;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\treturn 'N/A';\n\t\t\t}\n\t\t}\n\t}\n\n\topenListOfRoomsModal = conferenceId => {\n\t\tthis.setState({\n\t\t\tselectedConferenceId: conferenceId,\n\t\t\tshowListOfRoomsModal: true,\n\t\t});\n\t};\n\n\tshowListOfRooms = () => {\n\t\tconst headers = [{ title: 'Room' }, { title: 'Status' }, { title: '' }];\n\t\tconst conference = this.state.logs.find(c => c.id === this.state.selectedConferenceId);\n\t\tif (!conference || !conference.participants) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\treturn console.error('Error while getting list of rooms!');\n\t\t}\n\n\t\tconst rooms = conference.participants.reduce((acc, participant) => {\n\t\t\tif (participant.objectType === ObjectType.HELLO_DEVICE) {\n\t\t\t\tacc.push({\n\t\t\t\t\tname: participant.name,\n\t\t\t\t\tstatus: this.getParticipantState(participant.state),\n\t\t\t\t\tterminateCall: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{participant.state !== ParticipantState.REMOVED.type && (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t this.openParticipantForceTerminateCallModal(conference.id, participant.id)}>\n\t\t\t\t\t\t\t\t\t\thighlight_off\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\treturn ;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\n\t\t\t\t this.onChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.terminateRequestFailureReason === null && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === 'End call' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t\t\t\t\t

    Are you sure you want to terminate this session? This will end the call between the care provider and the patient.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === 'Retry' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Terminate request timeout

    \n\t\t\t\t\t\t\t\t\t\t

    Do you want to retry? This will end the call between the care provider and the patient.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === '' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Done

    \n\t\t\t\t\t\t\t\t\t\t

    Session has been terminated successfully.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.terminateRequestFailureReason !== null && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Error

    \n\t\t\t\t\t\t\t\t

    {TerminateRequestFailureReasonMessages[this.state.terminateRequestFailureReason]}

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\n\n\t\t\t\t{/* room force terminate */}\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.terminateRequestFailureReason === null && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === 'End call for room' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t\t\t\t\t

    Are you sure you want to terminate this room session? This will end the call between the care provider and the patient.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === 'Retry' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Terminate request timeout

    \n\t\t\t\t\t\t\t\t\t\t

    Do you want to retry? This will end the call between the care provider and the patient.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === '' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Done

    \n\t\t\t\t\t\t\t\t\t\t

    Room session has been terminated successfully.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.terminateRequestFailureReason !== null && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Error

    \n\t\t\t\t\t\t\t\t

    {TerminateRequestFailureReasonMessages[this.state.terminateRequestFailureReason]}

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\n\n\t\t\t\t this.setState({ showListOfRoomsModal: false, selectedConferenceId: null })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    List of Rooms

    \n\t\t\t\t\t\t{this.state.showListOfRoomsModal && this.showListOfRooms()}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nOngoingCallsList.contextType = SocketContext;\n\nexport default OngoingCallsList;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { Chart } from 'primereact/chart';\nimport { Grid, SkeletonLoader, Table } from 'components';\nimport { getKpisForDashboard, getNurseCallsForDashboard } from 'api/calllogs';\nimport Select from 'react-select';\nimport { getHealthSystems, getNursesList, getOrgTeamChildren } from 'api/users';\nimport { getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\nimport { CallTypes, DeviceListLevel, UserRoles } from 'constants/enums';\nimport DayPickerInput from 'react-day-picker/DayPickerInput';\nimport { parseDate } from 'react-day-picker/moment';\nimport { formatDate, secondsToHHMMSS } from 'infrastructure/helpers/dateHelper';\nimport { getUserRole } from 'infrastructure/auth';\n\nconst Dashboard = () => {\n\tconst getFirstDayOfMonth = (year, month) => new Date(year, month, 1);\n\tconst date = new Date();\n\tconst [isLoading, setIsLoading] = useState(true);\n\tconst [chartData, setChartData] = useState({\n\t\tlabels: [],\n\t\tdatasets: [\n\t\t\t{\n\t\t\t\tlabel: 'Talk to Patient',\n\t\t\t\tbackgroundColor: '#42A5F5',\n\t\t\t\tdata: [],\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'View Patient',\n\t\t\t\tbackgroundColor: '#CCC',\n\t\t\t\tdata: [],\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Monitoring',\n\t\t\t\tbackgroundColor: '#FFA726',\n\t\t\t\tdata: [],\n\t\t\t},\n\t\t],\n\t});\n\tconst [kpis, setKpis] = useState({\n\t\ttotalCount: 0,\n\t\tvcpCount: 0,\n\t\troomsObserved: 0,\n\t\tnumberOfCalls: {\n\t\t\ttalkToPatient: 0,\n\t\t\tmonitoring: 0,\n\t\t\tviewPatient: 0,\n\t\t},\n\t\taverageDuration: {\n\t\t\ttalkToPatient: 0,\n\t\t\tmonitoring: 0,\n\t\t\tviewPatient: 0,\n\t\t},\n\t});\n\tconst [healthSystems, setHealthSystems] = useState([]);\n\tconst [regions, setRegions] = useState([]);\n\tconst [hospitals, setHospitals] = useState([]);\n\tconst [nurses, setNurses] = useState([]);\n\tconst [selectedHealthSystem, setSelectedHealthSystem] = useState(null);\n\tconst [selectedRegion, setSelectedRegion] = useState(null);\n\tconst [selectedHospital, setSelectedHospital] = useState(null);\n\tconst [selectedNurse, setSelectedNurse] = useState(null);\n\tconst [from, setFrom] = useState(new Date(getFirstDayOfMonth(date.getFullYear(), date.getMonth())));\n\tconst [to, setTo] = useState(new Date());\n\tconst [currentLevel, setCurrentLevel] = useState(null);\n\tconst [searchedNurse, setSearchedNurse] = useState('');\n\tconst toInput = useRef(null);\n\n\tuseEffect(() => {\n\t\tconst getHealthSystemOptions = hsList => {\n\t\t\tconst healthSystemsOptions = hsList.map(hs => {\n\t\t\t\treturn { value: hs.id, label: hs.name };\n\t\t\t});\n\t\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\t\thealthSystemsOptions.unshift({ label: 'All', value: null });\n\t\t\t}\n\t\t\treturn healthSystemsOptions;\n\t\t};\n\n\t\tconst fetchData = async () => {\n\t\t\tconst hsList = await getHealthSystems();\n\t\t\tconst healthSystemsOptions = getHealthSystemOptions(hsList);\n\n\t\t\tsetHealthSystems(healthSystemsOptions);\n\t\t\tlet current = null;\n\t\t\tif (getUserRole() === UserRoles.SUPERUSER) {\n\t\t\t\t[current] = healthSystemsOptions;\n\t\t\t} else {\n\t\t\t\tcurrent = healthSystemsOptions.find(item => item.value === getCurrentHealthSystemInfo().currentHealthSystemId);\n\t\t\t}\n\n\t\t\tif (current) {\n\t\t\t\tsetSelectedHealthSystem(current);\n\t\t\t\tsetCurrentLevel(DeviceListLevel.HEALTHSYSTEM);\n\t\t\t\tconst regionsList = await getOrgTeamChildren(current.value);\n\t\t\t\tif (regionsList.error) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst regionsOptions = regionsList.map(region => ({ value: region.id, label: region.name }));\n\t\t\t\tregionsOptions.unshift({ label: 'All', value: null });\n\t\t\t\tsetRegions(regionsOptions);\n\t\t\t}\n\t\t};\n\t\tfetchData();\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst fetchNurses = async () => {\n\t\t\tconst response = await getNursesList(searchedNurse);\n\t\t\tif (!response.error) {\n\t\t\t\tconst nursesList = response.companyUsers.map(nurse => {\n\t\t\t\t\treturn { value: nurse.userId, label: `${nurse.firstname} ${nurse.lastname}` };\n\t\t\t\t});\n\t\t\t\tnursesList.unshift({\n\t\t\t\t\tlabel: 'All',\n\t\t\t\t\tvalue: null,\n\t\t\t\t});\n\t\t\t\tsetNurses(nursesList);\n\t\t\t}\n\t\t};\n\t\tif (searchedNurse) {\n\t\t\tfetchNurses();\n\t\t} else {\n\t\t\tsetNurses([\n\t\t\t\t{\n\t\t\t\t\tlabel: 'All',\n\t\t\t\t\tvalue: null,\n\t\t\t\t},\n\t\t\t]);\n\t\t}\n\t}, [searchedNurse]);\n\n\tconst getFilteredNursesBasedOnCallsCount = arr => {\n\t\tarr.sort((a, b) => {\n\t\t\tif (a.count < b.count) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (a.count > b.count) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\t\treturn arr.filter((_item, i) => i < 10);\n\t};\n\n\tuseEffect(() => {\n\t\tconst getKpisTalkToPatientCallNumber = kpisResponse =>\n\t\t\tkpisResponse.callTypesCount.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType)).length\n\t\t\t\t? kpisResponse.callTypesCount\n\t\t\t\t\t\t.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType))\n\t\t\t\t\t\t.reduce((accumulator, object) => {\n\t\t\t\t\t\t\treturn accumulator + object.count;\n\t\t\t\t\t\t}, 0)\n\t\t\t\t: 0;\n\n\t\tconst getKpisTalkToPatientAverageDuration = kpisResponse =>\n\t\t\tkpisResponse.callTypesDuration.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType)).length\n\t\t\t\t? kpisResponse.callTypesDuration\n\t\t\t\t\t\t.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType))\n\t\t\t\t\t\t.reduce((accumulator, object) => {\n\t\t\t\t\t\t\treturn accumulator + object.duration;\n\t\t\t\t\t\t}, 0)\n\t\t\t\t: 0;\n\n\t\tconst getDashboardTalkToPatientData = filtered =>\n\t\t\tfiltered.map(item =>\n\t\t\t\titem.callTypes.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType)).length\n\t\t\t\t\t? item.callTypes\n\t\t\t\t\t\t\t.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType))\n\t\t\t\t\t\t\t.reduce((accumulator, object) => {\n\t\t\t\t\t\t\t\treturn accumulator + object.count;\n\t\t\t\t\t\t\t}, 0)\n\t\t\t\t\t: 0\n\t\t\t);\n\n\t\tconst filterByLevel = async () => {\n\t\t\tsetIsLoading(true);\n\t\t\tconst params = {\n\t\t\t\thealthSystemId: selectedHealthSystem.value,\n\t\t\t\tregionId: selectedRegion ? selectedRegion.value : null,\n\t\t\t\thospitalId: selectedHospital ? selectedHospital.value : null,\n\t\t\t\tnurseId: selectedNurse ? selectedNurse.value : null,\n\t\t\t\tstart: Math.round(new Date(from).getTime()),\n\t\t\t\tend: Math.round(new Date(to).getTime()),\n\t\t\t};\n\t\t\tconst [response, kpisResponse] = await Promise.all([getNurseCallsForDashboard(params), getKpisForDashboard(params)]);\n\n\t\t\tif (!response.error && !kpisResponse.error) {\n\t\t\t\tlet labels = [];\n\t\t\t\tlet datasets = [];\n\n\t\t\t\tconst kpisObj = {\n\t\t\t\t\ttotalCount: kpisResponse.totalCount,\n\t\t\t\t\tvcpCount: kpisResponse.vcpCount,\n\t\t\t\t\troomsObserved: kpisResponse.roomsObserved,\n\t\t\t\t\tnumberOfCalls: {\n\t\t\t\t\t\ttalkToPatient: getKpisTalkToPatientCallNumber(kpisResponse),\n\t\t\t\t\t\tmonitoring: kpisResponse.callTypesCount.find(item => item.callType === CallTypes.MONITORING)?.count || 0,\n\t\t\t\t\t\tviewPatient: kpisResponse.callTypesCount.find(item => item.callType === CallTypes.SECURITYCAM)?.count || 0,\n\t\t\t\t\t},\n\t\t\t\t\taverageDuration: {\n\t\t\t\t\t\ttalkToPatient: getKpisTalkToPatientAverageDuration(kpisResponse),\n\t\t\t\t\t\tmonitoring: kpisResponse.callTypesDuration.find(item => item.callType === CallTypes.MONITORING)?.duration || 0,\n\t\t\t\t\t\tviewPatient: kpisResponse.callTypesDuration.find(item => item.callType === CallTypes.SECURITYCAM)?.duration || 0,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tsetKpis(kpisObj);\n\n\t\t\t\tif (response.data.length) {\n\t\t\t\t\tconst filtered = getFilteredNursesBasedOnCallsCount(response.data);\n\t\t\t\t\tlabels = filtered.map(item => item.name);\n\t\t\t\t\tdatasets = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Talk to Patient',\n\t\t\t\t\t\t\tbackgroundColor: '#42A5F5',\n\t\t\t\t\t\t\tdata: getDashboardTalkToPatientData(filtered),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'View Patient',\n\t\t\t\t\t\t\tbackgroundColor: '#CCC',\n\t\t\t\t\t\t\tdata: filtered.map(item => item.callTypes.find(x => x.callType === CallTypes.SECURITYCAM)?.count || 0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Monitoring',\n\t\t\t\t\t\t\tbackgroundColor: '#FFA726',\n\t\t\t\t\t\t\tdata: filtered.map(item => item.callTypes.find(x => x.callType === CallTypes.MONITORING)?.count || 0),\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\tlabels = [];\n\t\t\t\t\tdatasets = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Talk to Patient',\n\t\t\t\t\t\t\tbackgroundColor: '#42A5F5',\n\t\t\t\t\t\t\tdata: [],\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'View Patient',\n\t\t\t\t\t\t\tbackgroundColor: '#CCC',\n\t\t\t\t\t\t\tdata: [],\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Monitoring',\n\t\t\t\t\t\t\tbackgroundColor: '#FFA726',\n\t\t\t\t\t\t\tdata: [],\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\tsetChartData({\n\t\t\t\t\tlabels,\n\t\t\t\t\tdatasets,\n\t\t\t\t});\n\t\t\t}\n\t\t\tsetIsLoading(false);\n\t\t};\n\t\tif ([DeviceListLevel.HEALTHSYSTEM, DeviceListLevel.REGION, DeviceListLevel.HOSPITAL].includes(currentLevel)) {\n\t\t\tfilterByLevel();\n\t\t}\n\t}, [currentLevel, selectedHealthSystem, selectedRegion, selectedHospital, selectedNurse, from, to]);\n\n\tconst onHealthSystemSelected = async healthSystem => {\n\t\tsetSelectedHealthSystem(healthSystem);\n\t\tsetRegions([]);\n\t\tsetSelectedRegion(null);\n\t\tsetHospitals([]);\n\t\tsetSelectedHospital(null);\n\t\tsetCurrentLevel(DeviceListLevel.HEALTHSYSTEM);\n\t\tif (healthSystem.value) {\n\t\t\tconst regionsList = await getOrgTeamChildren(healthSystem.value);\n\t\t\tif (regionsList.error) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst regionsOptions = regionsList.map(region => ({ value: region.id, label: region.name }));\n\t\t\tregionsOptions.unshift({ label: 'All', value: null });\n\t\t\tsetRegions(regionsOptions);\n\t\t}\n\t};\n\n\tconst onRegionSelected = async region => {\n\t\tsetSelectedRegion(region);\n\t\tsetHospitals([]);\n\t\tsetSelectedHospital(null);\n\t\tsetCurrentLevel(region.value ? DeviceListLevel.REGION : DeviceListLevel.HEALTHSYSTEM);\n\t\tif (region.value) {\n\t\t\tconst hospitalsList = await getOrgTeamChildren(region.value);\n\t\t\tif (hospitalsList.error) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst hospitalOptions = hospitalsList.map(hospital => ({ value: hospital.id, label: hospital.name }));\n\t\t\thospitalOptions.unshift({ label: 'All', value: null });\n\t\t\tsetHospitals(hospitalOptions);\n\t\t}\n\t};\n\n\tconst onHospitalSelected = hospital => {\n\t\tsetSelectedHospital(hospital);\n\t\tsetCurrentLevel(hospital.value ? DeviceListLevel.HOSPITAL : DeviceListLevel.REGION);\n\t};\n\n\tconst onNurseSelected = nurse => {\n\t\tsetSelectedNurse(nurse);\n\t};\n\n\tconst DropdownIndicator = () => {\n\t\treturn arrow_drop_down;\n\t};\n\n\tconst modifiers = { start: from, end: to };\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t]}>\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t onHealthSystemSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t onRegionSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t onHospitalSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t onNurseSelected(value)}\n\t\t\t\t\t\t\tonInputChange={value => {\n\t\t\t\t\t\t\t\tsetSearchedNurse(value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tdate_range\n\t\t\t\t\t\t\t\t toInput.current.getInput().focus(),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonDayChange={e => setFrom(e)}\n\t\t\t\t\t\t\t\t/>{' '}\n\t\t\t\t\t\t\t\t-{' '}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t setTo(e)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarrow_drop_down\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t{isLoading && }\n\t\t\t\t\t{!isLoading && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tTotal number of nurses\n\t\t\t\t\t\t\t\t

    {kpis.vcpCount}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tTotal Calls\n\t\t\t\t\t\t\t\t

    {kpis.totalCount}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tNumber of rooms observed\n\t\t\t\t\t\t\t\t

    {kpis.roomsObserved}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tNumber of Talk to patient calls\n\t\t\t\t\t\t\t\t

    {kpis.numberOfCalls.talkToPatient}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tNumber of Monitoring calls\n\t\t\t\t\t\t\t\t

    {kpis.numberOfCalls.monitoring}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tNumber of View patient calls\n\t\t\t\t\t\t\t\t

    {kpis.numberOfCalls.viewPatient}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tAverage time of Talk to patient calls\n\t\t\t\t\t\t\t\t

    {secondsToHHMMSS(kpis.averageDuration.talkToPatient)}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tAverage time of Monitoring calls\n\t\t\t\t\t\t\t\t

    {secondsToHHMMSS(kpis.numberOfCalls.monitoring)}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tAverage time of View patient calls\n\t\t\t\t\t\t\t\t

    {secondsToHHMMSS(kpis.numberOfCalls.viewPatient)}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\n\t\t
    \n\t);\n};\n\nexport default Dashboard;\n","import React from 'react';\nimport 'react-day-picker/lib/style.css';\nimport Layout from 'components/Common/Layout';\nimport Header from 'components/Common/Header';\nimport { Tabs, Grid } from 'components';\n\nimport PastCallsList from 'components/CallLogs/List/PastCallsList';\nimport OngoingCallsList from 'components/CallLogs/List/OngoingCallsList';\nimport Dashboard from 'containers/Dashboard';\n\nfunction CallLogs() {\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t
    \n\t\t
    \n\t);\n}\n\nexport default CallLogs;\n","import React, { Component } from 'react';\nimport moment from 'moment';\nimport PropTypes from 'prop-types';\n\nclass CallDuration extends Component {\n\tstatic defaultProps = {\n\t\tformat: 'HH:mm:ss',\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tlet duration = moment.duration(0, 's');\n\t\tif (props.callStartTime) {\n\t\t\tconst timeDiff = Math.abs(new Date().getTime() - props.callStartTime.getTime());\n\t\t\tduration = moment.duration(Math.floor(timeDiff / 1000), 's');\n\t\t}\n\n\t\tthis.state = {\n\t\t\tduration,\n\t\t\tcallDuration: null,\n\t\t};\n\n\t\tthis.durationInterval = null;\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.startDurationInterval();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (this.durationInterval) {\n\t\t\tclearInterval(this.durationInterval);\n\t\t}\n\t}\n\n\tgetDuration = (initial = false) => {\n\t\tlet callDuration;\n\n\t\tif (this.props.format === 'HH:mm:ss') {\n\t\t\tif (!initial) {\n\t\t\t\tthis.state.duration.add(1, 'seconds');\n\t\t\t}\n\t\t\tcallDuration = moment.utc(this.state.duration.asMilliseconds()).format(this.props.format);\n\t\t}\n\t\tif (this.props.format === 'MM/DD/YY hh:mm A') {\n\t\t\tcallDuration = moment().format(this.props.format);\n\t\t}\n\n\t\treturn callDuration;\n\t};\n\n\tstartDurationInterval = () => {\n\t\tthis.durationInterval = setInterval(() => {\n\t\t\tthis.setState({ callDuration: this.getDuration() });\n\t\t}, 1000);\n\t};\n\n\trender() {\n\t\treturn

    {this.state.callDuration || this.getDuration(true)}

    ;\n\t}\n}\n\nCallDuration.propTypes = {\n\tformat: PropTypes.string,\n};\n\nexport default CallDuration;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport CallButton from 'components/CallButton';\n\nconst NightVisionControl = props => {\n\treturn (\n\t\t<>\n\t\t\t{props.showButton && (\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n};\n\nNightVisionControl.defaultProps = {\n\tshowButton: true,\n};\n\nNightVisionControl.propTypes = {\n\tnightVisionMode: PropTypes.bool,\n\tshowButton: PropTypes.bool,\n\tisDisabled: PropTypes.bool,\n\ttoggleNightvisionHandler: PropTypes.func,\n};\n\nexport default NightVisionControl;\n","import React from 'react';\n\nconst CallStats = ({ stats, connectionQualityColor }) => (\n\t
    \n\t\t\n\t\t\t\n\t\t\t\tbar_chart\n\t\t\t\n\t\t\n\t\t
    \n\t\t\t{stats.map(({ key, value }) => (\n\t\t\t\t

    \n\t\t\t\t\t{key}: {value}\n\t\t\t\t

    \n\t\t\t))}\n\t\t
    \n\t
    \n);\n\nexport default CallStats;\n","import React, { Component } from 'react';\nimport CallStats from 'components/Common/CallStats';\n\nclass PeerStats extends Component {\n\tstate = {\n\t\tvideoBytesSent: null,\n\t\taudioBytesSent: null,\n\t\tvideoBytesRec: null,\n\t\taudioBytesRec: null,\n\t\tframeRate: null,\n\t\tresolution: { width: 0, height: 0 },\n\t\tcodec: null,\n\t\ttransportType: null,\n\t};\n\n\tpreviousStats = {\n\t\toutbound: {},\n\t\tinbound: {},\n\t};\n\n\tcurrentStats = {\n\t\toutbound: {},\n\t\tinbound: {},\n\t\tvideoResolution: undefined,\n\t\tvideoOutboundResolution: undefined,\n\t\taudioCodec: undefined,\n\t\tvideoCodec: undefined,\n\t\tvideoOutboundCodec: undefined,\n\t\taudioOutboundCodec: undefined,\n\t\ttransportType: undefined,\n\t};\n\n\tRTCStatsType = {\n\t\tOUTBOUND: 'outbound-rtp',\n\t\tINBOUND: 'inbound-rtp',\n\t\tTRACK: 'track',\n\t\tCODEC: 'codec',\n\t\tREMOTE_CANDIDATE: 'remote-candidate',\n\t};\n\n\tRTCMediaType = {\n\t\tAUDIO: 'audio',\n\t\tVIDEO: 'video',\n\t};\n\n\tfetchTimeInSeconds = 3;\n\n\tbyteToKilobit = 125;\n\n\tgetStatsInterval = null;\n\n\tcurrInboundReports = [];\n\n\tcurrOutboundReports = [];\n\n\tcomponentDidMount = async () => {\n\t\tthis.getStatsInterval = setInterval(async () => {\n\t\t\tawait this.getStats();\n\t\t\tconst newStats = JSON.parse(JSON.stringify(this.currentStats));\n\t\t\tthis.setState(this.getState(), () => {\n\t\t\t\tthis.previousStats = newStats;\n\t\t\t});\n\t\t}, this.fetchTimeInSeconds * 1000);\n\t};\n\n\tgetState = () => {\n\t\tif (!this.props.isLocalSrc) {\n\t\t\treturn {\n\t\t\t\tvideoBytesSent:\n\t\t\t\t\tthis.currentStats.outbound.video && this.previousStats.outbound.video\n\t\t\t\t\t\t? this.getDifference(this.currentStats.outbound.video.bytesSent, this.previousStats.outbound.video.bytesSent) /\n\t\t\t\t\t\t this.fetchTimeInSeconds /\n\t\t\t\t\t\t this.byteToKilobit\n\t\t\t\t\t\t: null,\n\t\t\t\taudioBytesSent:\n\t\t\t\t\tthis.currentStats.outbound.audio && this.previousStats.outbound.audio && !this.props.isMyMicOff\n\t\t\t\t\t\t? this.getDifference(this.currentStats.outbound.audio.bytesSent, this.previousStats.outbound.audio.bytesSent) /\n\t\t\t\t\t\t this.fetchTimeInSeconds /\n\t\t\t\t\t\t this.byteToKilobit\n\t\t\t\t\t\t: null,\n\t\t\t\tvideoBytesRec:\n\t\t\t\t\tthis.currentStats.inbound.video && this.previousStats.inbound.video\n\t\t\t\t\t\t? this.getDifference(this.currentStats.inbound.video.bytesReceived, this.previousStats.inbound.video.bytesReceived) /\n\t\t\t\t\t\t this.fetchTimeInSeconds /\n\t\t\t\t\t\t this.byteToKilobit\n\t\t\t\t\t\t: null,\n\t\t\t\taudioBytesRec:\n\t\t\t\t\tthis.currentStats.inbound.audio && this.previousStats.inbound.audio && !this.props.isPeerMicPrivacyOn\n\t\t\t\t\t\t? this.getDifference(this.currentStats.inbound.audio.bytesReceived, this.previousStats.inbound.audio.bytesReceived) /\n\t\t\t\t\t\t this.fetchTimeInSeconds /\n\t\t\t\t\t\t this.byteToKilobit\n\t\t\t\t\t\t: null,\n\t\t\t\tframeRate: this.getInboundFrameRate(),\n\t\t\t\tresolution: this.getInboundFrameRate() && this.currentStats.videoResolution ? this.currentStats.videoResolution : { width: 0, height: 0 },\n\t\t\t\tcodec:\n\t\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\t\t!this.currentStats.videoCodec && !this.currentStats.audioCodec\n\t\t\t\t\t\t? 'N/A'\n\t\t\t\t\t\t: this.currentStats.videoCodec\n\t\t\t\t\t\t? `${this.currentStats.audioCodec}\\\\${this.currentStats.videoCodec}`\n\t\t\t\t\t\t: `${this.currentStats.audioCodec}`,\n\t\t\t\ttransportType: this.currentStats.transportType ? this.currentStats.transportType : 'N/A',\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tframeRate:\n\t\t\t\tthis.currentStats.outbound.video && this.previousStats.outbound.video\n\t\t\t\t\t? this.getDifference(this.currentStats.outbound.video.framesEncoded, this.previousStats.outbound.video.framesEncoded) / this.fetchTimeInSeconds\n\t\t\t\t\t: null,\n\t\t\tresolution: this.currentStats.videoOutboundResolution ? this.currentStats.videoOutboundResolution : { width: 0, height: 0 },\n\t\t\tcodec:\n\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\t!this.currentStats.videoOutboundCodec && !this.currentStats.audioOutboundCodec\n\t\t\t\t\t? 'N/A'\n\t\t\t\t\t: this.currentStats.videoOutboundCodec\n\t\t\t\t\t? `${this.currentStats.audioOutboundCodec}\\\\${this.currentStats.videoOutboundCodec}`\n\t\t\t\t\t: `${this.currentStats.audioOutboundCodec}`,\n\t\t};\n\t};\n\n\tgetDifference = (a, b) => {\n\t\treturn a - b >= 0 ? a - b : 0;\n\t};\n\n\tcomponentWillUnmount = () => {\n\t\tif (this.getStatsInterval) {\n\t\t\tclearInterval(this.getStatsInterval);\n\t\t\tthis.getStatsInterval = null;\n\t\t}\n\t};\n\n\tgetStats = async () => {\n\t\tconst stats = await this.props.callManager.getStats();\n\n\t\tthis.currInboundReports = [];\n\t\tthis.currOutboundReports = [];\n\n\t\tstats.forEach(report => {\n\t\t\tif (report.type === this.RTCStatsType.INBOUND) {\n\t\t\t\tthis.currInboundReports.push(report);\n\t\t\t\tconst codecReport = stats.get(report.codecId);\n\t\t\t\tif (codecReport) {\n\t\t\t\t\tcodecReport.kind = report.kind;\n\t\t\t\t\tcodecReport.remoteSource = true;\n\t\t\t\t\tthis.currInboundReports.push(codecReport);\n\t\t\t\t}\n\t\t\t\tif (report.kind === this.RTCMediaType.VIDEO) {\n\t\t\t\t\tconst trackReport = stats.get(report.trackId);\n\t\t\t\t\tif (trackReport) {\n\t\t\t\t\t\ttrackReport.kind = report.kind;\n\t\t\t\t\t\tthis.currInboundReports.push(trackReport);\n\t\t\t\t\t}\n\t\t\t\t} else if (report.kind === this.RTCMediaType.AUDIO) {\n\t\t\t\t\tconst transportReport = stats.get(report.transportId);\n\t\t\t\t\tif (transportReport) {\n\t\t\t\t\t\tconst candidatePair = stats.get(transportReport.selectedCandidatePairId);\n\t\t\t\t\t\tif (candidatePair) {\n\t\t\t\t\t\t\tconst remoteCandidate = stats.get(candidatePair.remoteCandidateId);\n\t\t\t\t\t\t\tif (remoteCandidate) {\n\t\t\t\t\t\t\t\tremoteCandidate.kind = report.kind;\n\t\t\t\t\t\t\t\tthis.currInboundReports.push(remoteCandidate);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (report.type === this.RTCStatsType.OUTBOUND) {\n\t\t\t\tthis.currOutboundReports.push(report);\n\t\t\t\tconst codecReport = stats.get(report.codecId);\n\t\t\t\tif (codecReport) {\n\t\t\t\t\tcodecReport.kind = report.kind;\n\t\t\t\t\tcodecReport.remoteSource = false;\n\t\t\t\t\tthis.currOutboundReports.push(codecReport);\n\t\t\t\t}\n\n\t\t\t\tif (report.kind === this.RTCMediaType.VIDEO) {\n\t\t\t\t\tconst trackReport = stats.get(report.trackId);\n\t\t\t\t\tif (trackReport) {\n\t\t\t\t\t\ttrackReport.kind = report.kind;\n\t\t\t\t\t\tthis.currOutboundReports.push(trackReport);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.setCurrentStats();\n\t};\n\n\tsetCurrentStats = () => {\n\t\t// Inbound\n\t\t[this.currentStats.inbound.video] = this.currInboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.INBOUND)\n\t\t\t.sort((a, b) => (a.trackId > b.trackId ? -1 : 1));\n\n\t\tconst [track] = this.currInboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.TRACK && x.remoteSource === true)\n\t\t\t.sort((a, b) => (a.id > b.id ? -1 : 1));\n\n\t\tif (track && track.frameHeight) {\n\t\t\tthis.currentStats.videoResolution = { width: track.frameWidth, height: track.frameHeight };\n\t\t} else {\n\t\t\tthis.currentStats.videoResolution = { width: 0, height: 0 };\n\t\t}\n\n\t\tconst videoCodec = this.currInboundReports.find(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.CODEC && x.remoteSource === true);\n\n\t\tif (videoCodec) {\n\t\t\tthis.currentStats.videoCodec = videoCodec.mimeType.replace('video/', '');\n\t\t}\n\t\tconst audioCodec = this.currInboundReports.find(x => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.CODEC && x.remoteSource === true);\n\n\t\tif (audioCodec) {\n\t\t\tthis.currentStats.audioCodec = audioCodec.mimeType.replace('audio/', '').toUpperCase();\n\t\t}\n\n\t\t[this.currentStats.inbound.audio] = this.currInboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.INBOUND)\n\t\t\t.sort((a, b) => (a.trackId > b.trackId ? -1 : 1));\n\n\t\tconst remoteCandidate = this.currInboundReports.find(x => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.REMOTE_CANDIDATE);\n\t\tif (remoteCandidate) {\n\t\t\tthis.currentStats.transportType = remoteCandidate.candidateType === 'relay' ? 'Relay' : 'P2P';\n\t\t}\n\n\t\t// Outbound\n\t\t[this.currentStats.outbound.video] = this.currOutboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.OUTBOUND && x.trackId)\n\t\t\t.sort((a, b) => (a.trackId > b.trackId ? -1 : 1));\n\n\t\t[this.currentStats.outbound.audio] = this.currOutboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.OUTBOUND)\n\t\t\t.sort((a, b) => (a.trackId > b.trackId ? -1 : 1));\n\n\t\tconst [outboundTrack] = this.currOutboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.TRACK && x.remoteSource === false)\n\t\t\t.sort((a, b) => (a.id > b.id ? -1 : 1));\n\n\t\tif (outboundTrack && outboundTrack.frameWidth) {\n\t\t\tthis.currentStats.videoOutboundResolution = {\n\t\t\t\twidth: outboundTrack.frameWidth,\n\t\t\t\theight: outboundTrack.frameHeight,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.currentStats.videoOutboundResolution = {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0,\n\t\t\t};\n\t\t}\n\n\t\tconst videoOutboundCodec = this.currOutboundReports.find(\n\t\t\tx => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.CODEC && x.remoteSource === false\n\t\t);\n\n\t\tif (videoOutboundCodec) {\n\t\t\tthis.currentStats.videoOutboundCodec = videoOutboundCodec.mimeType.replace('video/', '');\n\t\t}\n\t\tconst audioOutboundCodec = this.currOutboundReports.find(\n\t\t\tx => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.CODEC && x.remoteSource === false\n\t\t);\n\n\t\tif (audioOutboundCodec) {\n\t\t\tthis.currentStats.audioOutboundCodec = audioOutboundCodec.mimeType.replace('audio/', '').toUpperCase();\n\t\t}\n\t};\n\n\tgetInboundFrameRate = () => {\n\t\treturn this.currentStats.inbound.video && this.previousStats.inbound.video\n\t\t\t? this.getDifference(this.currentStats.inbound.video.framesDecoded, this.previousStats.inbound.video.framesDecoded) / this.fetchTimeInSeconds\n\t\t\t: null;\n\t};\n\n\trender() {\n\t\tconst { audioBytesSent, videoBytesSent, videoBytesRec, audioBytesRec, frameRate, resolution, codec, transportType } = this.state;\n\n\t\tlet stats;\n\t\tif (!this.props.isLocalSrc) {\n\t\t\tstats = [\n\t\t\t\t{ key: 'Video', value: `${Math.round(videoBytesSent)}kbs↑ ${Math.round(videoBytesRec)}kbs↓` },\n\t\t\t\t{ key: 'Audio', value: `${Math.round(audioBytesSent)}kbs↑ ${Math.round(audioBytesRec)}kbs↓` },\n\t\t\t\t{ key: 'Codec', value: codec },\n\t\t\t\t{ key: 'Framerate', value: `${Math.round(frameRate)} FPS` },\n\t\t\t\t{ key: 'Resolution', value: `${resolution.width}x${resolution.height}` },\n\t\t\t\t{ key: 'TT', value: transportType },\n\t\t\t];\n\t\t} else {\n\t\t\tstats = [\n\t\t\t\t{ key: 'Framerate', value: `${Math.round(frameRate)} FPS` },\n\t\t\t\t{ key: 'Resolution', value: `${resolution.width}x${resolution.height}` },\n\t\t\t\t{ key: 'Codec', value: codec },\n\t\t\t];\n\t\t}\n\n\t\treturn ;\n\t}\n}\n\nexport default PeerStats;\n","import React, { Component } from 'react';\nimport v4 from 'uuid';\nimport _ from 'lodash';\nimport classNames from 'classnames/bind';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport Grid from 'components/Grid';\nimport Dropdown from 'components/Dropdown';\nimport ListGroup from 'components/ListGroup';\nimport TopParticipant from 'components/TopParticipant';\nimport Participant from 'components/Participant';\nimport CallButton from 'components/CallButton';\nimport CallEndReason from 'components/CallEndReason';\nimport ActiveConference from 'components/Call/ActiveConference';\nimport AnotherNursePickedUp from 'components/Call/AnotherNursePickedUp';\nimport ConnectionStatus from 'components/Call/ConnectionStatus';\nimport StreamPermissions from 'components/StreamPermissions';\nimport Button from 'components/Button';\nimport Loader from 'components/Loader';\nimport TvControls from 'components/TvControls';\nimport CameraControls from 'components/Common/CameraControls';\nimport CallDuration from 'components/Common/CallDuration';\nimport NightVisionControl from 'components/Common/NightVisionControl';\nimport { stopOutgoingCallSound } from 'components/CallSounds';\nimport CallCorrelationInfo from 'components/CallCorrelationInfo';\nimport Alert from 'components/Alert';\nimport { getCurrentHealthSystemInfo, checkIfMediaDevicesPlugged, checkForPermission, askForPermission } from 'infrastructure/helpers/commonHelpers';\nimport { getUserProfile } from 'infrastructure/auth';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport SocketEvents from 'constants/socket-events';\nimport {\n\tCallTypes,\n\tObjectType,\n\tConferenceEndReason,\n\tRTCPeerConnectionEnum,\n\tCameraType,\n\tCameraEventTypes,\n\tCameraTiltDirection,\n\tCameraTiltAction,\n\tZoomDirection,\n\tSocketState,\n\tSerialTVCommands,\n\tAudioOutputDevice,\n\tStreamError,\n\tMediaTypes,\n\tMediaPermissions,\n} from 'constants/enums';\nimport CallManager from 'owt/p2p/CallManager';\nimport { ConferenceInfo, ConferenceParticipant, FromUser } from 'owt/base/conference';\nimport PeerStats from 'containers/PeerStats';\n\nconst TrackType = {\n\tAUDIO: 'audio',\n\tVIDEO: 'video',\n\tSCREEN: 'screen',\n};\n\nexport class Call extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\tcallerObjectId: parseInt(props.match.params.patientId, 10),\n\t\t\thealthSystemPath: null,\n\t\t\troomName: decodeURIComponent(props.match.params.roomName),\n\t\t\tlocalSrc: null,\n\t\t\tlocalScreenSrc: null,\n\t\t\tpeerSrc: null,\n\t\t\tactiveSrc: null,\n\t\t\tmicActive: true,\n\t\t\tisMyVideoCamActive: true,\n\t\t\tisPeerVideoCamActive: true,\n\t\t\tisVideoCall: false,\n\t\t\tpeerMicActive: true,\n\t\t\tshowPTZ: false,\n\t\t\tconferenceId: null,\n\t\t\tparticipantId: null,\n\t\t\tinitialCallType: null,\n\t\t\tconferenceEndReason: null,\n\t\t\tsocketState: SocketState.CONNECTED,\n\t\t\tstreamPermission: null,\n\t\t\ttvStatus: null,\n\t\t\thdmiStatus: null,\n\t\t\ttvBrand: null,\n\t\t\tvolumeStatus: null,\n\t\t\tnightVisionMode: false,\n\t\t\tcameraZoomLevel: 0,\n\t\t\tcameraType: CameraType.HELLO,\n\t\t\tisHuddleCamConnected: true,\n\t\t\tisCameraPrivacyOn: false,\n\t\t\tisMicPrivacyOn: false,\n\t\t\tdisabledTiltDirections: {},\n\t\t\tcallStartTime: null,\n\t\t\tpeerConnectionState: RTCPeerConnectionEnum.CONNECTION_STATE.NEW,\n\t\t\tdisableButtons: false,\n\t\t\thasActiveConference: false,\n\t\t\tanotherNursePickedUp: false,\n\t\t\tonPatientBusyNurse: null, // this is the name of the nurse that the hello is talking already when we get the busy participant event\n\t\t\tshowRightColumn: true,\n\t\t\tshouldShowSwitchToHelloCamError: false,\n\t\t\taudioOutputDevice: AudioOutputDevice.HELLO,\n\t\t};\n\n\t\tthis.myAvatarUrl = '';\n\t\tthis.userInfo = {};\n\t\tthis.camStatus = null;\n\t\tthis.micStatus = null;\n\n\t\tthis.callManager = new CallManager(this.context, {\n\t\t\tuseCallStats: APP_CONFIG.useCallStats,\n\t\t\tsendCallStatsInterval: APP_CONFIG.sendCallStatsInterval,\n\t\t});\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.props.fetchNotificationCounter();\n\t\tconst userProfile = getUserProfile();\n\t\tconst avatarUrl = userProfile.profilePicture.url;\n\t\tthis.userInfo = userProfile;\n\t\tthis.myAvatarUrl = avatarUrl?.includes('duser') ? '' : avatarUrl;\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.camStatus = await checkForPermission(MediaTypes.CAMERA);\n\t\tthis.micStatus.onchange = this.onMicPermissionChange;\n\t\tthis.camStatus.onchange = this.onCamPermissionChange;\n\t\tthis.callManager\n\t\t\t.on('call-started', data => {\n\t\t\t\tlet roomNamePath = this.getRoomNamePath(data);\n\t\t\t\tthis.setState({\n\t\t\t\t\tconferenceId: data.conferenceId,\n\t\t\t\t\tparticipantId: data.participantId,\n\t\t\t\t\t...roomNamePath,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('audio-call', data => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tlocalSrc: data.audioStream,\n\t\t\t\t\tactiveSrc: data.audioStream,\n\t\t\t\t\tisMyVideoCamActive: false,\n\t\t\t\t\tisPeerVideoCamActive: false,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('video-call', data => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tlocalSrc: data.videoStream,\n\t\t\t\t\tactiveSrc: data.videoStream,\n\t\t\t\t\tisMyVideoCamActive: true,\n\t\t\t\t\tisPeerVideoCamActive: true,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('screensharing', data => {\n\t\t\t\tlet { localSrc, activeSrc, localScreenSrc } = data;\n\t\t\t\tconst { peerSrc } = this.state;\n\n\t\t\t\tif (localScreenSrc === null && !!peerSrc.mediaStream.getVideoTracks().length) {\n\t\t\t\t\tactiveSrc = peerSrc;\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tlocalSrc: localSrc,\n\t\t\t\t\tactiveSrc: activeSrc,\n\t\t\t\t\tlocalScreenSrc: localScreenSrc,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('toggle-audio', () => {\n\t\t\t\tthis.setState({ micActive: !this.state.micActive });\n\t\t\t})\n\t\t\t.on('toggle-video', data => {\n\t\t\t\tthis.setState({ isVideoCall: data.hasVideoTrack ? true : this.state.isVideoCall, isMyVideoCamActive: data.hasVideoTrack }, () => {\n\t\t\t\t\tconst { isMyVideoCamActive, isPeerVideoCamActive, peerSrc, localSrc } = this.state;\n\n\t\t\t\t\tif (!isMyVideoCamActive && isPeerVideoCamActive && peerSrc) {\n\t\t\t\t\t\t// Switch to patient if i have toggled my camera off\n\t\t\t\t\t\tthis.activeSrcHandle(this.state.peerSrc.id);\n\t\t\t\t\t} else if (isMyVideoCamActive && localSrc && (this.isMyVideoSelected() || !isPeerVideoCamActive)) {\n\t\t\t\t\t\t// Show my video as active\n\t\t\t\t\t\tthis.activeSrcHandle(this.state.localSrc.id);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('peer-stream', data => {\n\t\t\t\tconst { peerSrc, activeSrc } = data;\n\t\t\t\tlet newState = {};\n\t\t\t\tif (this.state.isPeerVideoCamActive) {\n\t\t\t\t\tObject.assign(newState, { peerSrc, activeSrc, isVideoCall: true });\n\t\t\t\t} else {\n\t\t\t\t\tObject.assign(newState, { peerSrc });\n\t\t\t\t}\n\n\t\t\t\tif (!this.state.callStartTime) {\n\t\t\t\t\tObject.assign(newState, { callStartTime: new Date() });\n\t\t\t\t}\n\n\t\t\t\tstopOutgoingCallSound();\n\t\t\t\tthis.setState(newState, () => {\n\t\t\t\t\tif (this.audioRef) {\n\t\t\t\t\t\tthis.audioRef.srcObject = null;\n\t\t\t\t\t\tthis.audioRef.srcObject = peerSrc.mediaStream;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('end-call', data => {\n\t\t\t\tthis.startCloseTabTimeout();\n\t\t\t\tthis.setState({\n\t\t\t\t\tlocalSrc: null,\n\t\t\t\t\tlocalScreenSrc: null,\n\t\t\t\t\tpeerSrc: null,\n\t\t\t\t\tactiveSrc: null,\n\t\t\t\t\tconferenceEndReason: data.endReason,\n\t\t\t\t\thasActiveConference: data.hasActiveConference,\n\t\t\t\t\tanotherNursePickedUp: data.anotherNursePickedUp,\n\t\t\t\t\tconferenceId: null,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('stream-permission', status => {\n\t\t\t\tif (status && status.type === StreamError.STREAM_NOT_ALLOWED.type) {\n\t\t\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\t\t\tcomponent: 'popup',\n\t\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t\t});\n\t\t\t\t\tthis.setState({ streamPermission: null });\n\t\t\t\t} else {\n\t\t\t\t\tthis.setState({ streamPermission: status });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('tv-commands', data => {\n\t\t\t\tif (data.tvState.isVolume) {\n\t\t\t\t\tthis.setState({ volumeStatus: data });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tswitch (data.tvState.tvStatus) {\n\t\t\t\t\tcase SerialTVCommands.INITIAL_TV_POWER:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_ON:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_OFF:\n\t\t\t\t\t\tthis.setState({ tvStatus: data });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI1:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI2:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI3:\n\t\t\t\t\t\tthis.setState({ hdmiStatus: data });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('initial-device-state', data => {\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst {\n\t\t\t\t\tcameraType,\n\t\t\t\t\tzoomLevel: cameraZoomLevel,\n\t\t\t\t\tisNightVision: nightVisionMode,\n\t\t\t\t\tisHuddleCamConnected,\n\t\t\t\t\tisCameraPrivacyOn,\n\t\t\t\t\tisMicPrivacyOn,\n\t\t\t\t\ttvHdmiPort,\n\t\t\t\t\taudioOutputDevice,\n\t\t\t\t\ttvBrand,\n\t\t\t\t} = data;\n\t\t\t\tlet hdmiStatus = null;\n\n\t\t\t\tif (tvHdmiPort) {\n\t\t\t\t\thdmiStatus = { isSuccessful: true, tvState: { isVolume: false, tvStatus: SerialTVCommands.HDMI[`SWITCH_HDMI${tvHdmiPort}`] } };\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tcameraType,\n\t\t\t\t\tcameraZoomLevel,\n\t\t\t\t\tnightVisionMode,\n\t\t\t\t\tisHuddleCamConnected,\n\t\t\t\t\tisCameraPrivacyOn,\n\t\t\t\t\tisMicPrivacyOn,\n\t\t\t\t\thdmiStatus,\n\t\t\t\t\taudioOutputDevice,\n\t\t\t\t\ttvBrand,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('audio-output-changed', data => {\n\t\t\t\tthis.setState({ audioOutputDevice: data.audioOutputDevice });\n\t\t\t})\n\t\t\t.on('camera-response', this.cameraResponseListener)\n\t\t\t.on('socket-state', ({ socketState }) => {\n\t\t\t\tif (this.state.socketState.type === socketState.type) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst newState = { socketState };\n\t\t\t\tswitch (socketState.type) {\n\t\t\t\t\tcase SocketState.DISCONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SocketState.CONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState, () => {\n\t\t\t\t\tthis.setAudioSrcObject();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('peer-connection-state', ({ peerConnectionState }) => {\n\t\t\t\tthis.setState({ peerConnectionState }, () => {\n\t\t\t\t\tthis.setAudioSrcObject();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('participant-busy', data => {\n\t\t\t\tconst { activeConferences } = data;\n\t\t\t\tif (!activeConferences || activeConferences.length === 0) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active conference was found');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst conference = activeConferences.find(ac => ac.initialCallType === CallTypes.SECURITYCAM || ac.initialCallType === CallTypes.AUDIO);\n\t\t\t\tif (!conference) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active patient view or talk to patient conference was found');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// conference participants are only the active participants(connected, connecting or reconnecting)\n\t\t\t\t// there should be only one active participant in patient view or talk to patient\n\t\t\t\tif (conference.participants.length > 1) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - more then one participants were found in the active conference');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst onPatientBusyNurse = conference.participants[0];\n\t\t\t\tthis.setState({ onPatientBusyNurse });\n\t\t\t})\n\t\t\t.on('local-audio-error', this.onLocalAudioError)\n\t\t\t.on('local-video-error', this.onLocalVideoError)\n\t\t\t.bindSocketEventListeners();\n\t\tthis.bindWindowListeners();\n\t\tlet isStartConference = this.props.match.params.incoming === 'start';\n\t\tif (isStartConference) {\n\t\t\tconst isVideo = this.props.match.params.callType && this.props.match.params.callType === 'video';\n\t\t\tif (isVideo) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisVideoCall: false,\n\t\t\t\t\tisPeerVideoCamActive: true,\n\t\t\t\t\tinitialCallType: CallTypes.VIDEO,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\tinitialCallType: CallTypes.AUDIO,\n\t\t\t\t\tisPeerVideoCamActive: false,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\t\tconst inputDevices = {\n\t\t\t\tdevices,\n\t\t\t\tpermissions: {\n\t\t\t\t\tcamera: this.camStatus.state,\n\t\t\t\t\tmicrophone: this.micStatus.state,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst fromUser = new FromUser(`${userProfile.firstName} ${userProfile.lastName}`, userProfile.jobTitle, userProfile.profilePicture.url, undefined);\n\t\t\tconst participants = [new ConferenceParticipant(parseInt(this.state.callerObjectId, 10), ObjectType.HELLO_DEVICE)];\n\t\t\tconst startConferenceInfo = new ConferenceInfo(\n\t\t\t\tisVideo ? CallTypes.VIDEO : CallTypes.AUDIO,\n\t\t\t\tv4(),\n\t\t\t\t'Videocall',\n\t\t\t\tnull,\n\t\t\t\tfromUser,\n\t\t\t\ttrue,\n\t\t\t\tfalse,\n\t\t\t\ttrue,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\tisVideo,\n\t\t\t\tv4(),\n\t\t\t\tparticipants,\n\t\t\t\tinputDevices\n\t\t\t);\n\t\t\tthis.callManager.startConference(startConferenceInfo);\n\t\t} else {\n\t\t\tconst conferenceInfo = JSON.parse(localStorage.getItem('incomingConferenceInfo'));\n\t\t\tlocalStorage.removeItem('incomingConferenceInfo');\n\t\t\tif (!conferenceInfo) {\n\t\t\t\tthis.startCloseTabTimeout();\n\t\t\t\tthis.setState({ conferenceEndReason: ConferenceEndReason.ABORTED });\n\t\t\t} else {\n\t\t\t\tthis.callManager.joinConference(conferenceInfo);\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.callManager.unbindSocketEventListeners();\n\t\tthis.callManager.unbindTimeouts();\n\t\tif (this.closeTabTimeout) {\n\t\t\tclearTimeout(this.closeTabTimeout);\n\t\t\tthis.closeTabTimeout = null;\n\t\t}\n\t}\n\n\tbeforeUnloadEvent = event => {\n\t\tif (this.state.conferenceId) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.returnValue = '';\n\t\t}\n\t};\n\n\tbindWindowListeners() {\n\t\twindow.addEventListener('beforeunload', this.beforeUnloadEvent);\n\n\t\twindow.addEventListener('unload', () => {\n\t\t\tif (this.state.conferenceId) {\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_LEFT });\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('message', message => {\n\t\t\tif (message.data === 'IN_CALL') {\n\t\t\t\twindow.removeEventListener('beforeunload', this.beforeUnloadEvent);\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_IDLE });\n\t\t\t}\n\t\t});\n\t}\n\n\tgetRoomNamePath = data => {\n\t\tlet healthSystemPath;\n\t\tlet { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tthis.props.organization.allHealthSystems.forEach(healthSystem => {\n\t\t\tif (healthSystem.id === currentHealthSystemId) {\n\t\t\t\thealthSystemPath = `${healthSystem.name} > `;\n\n\t\t\t\thealthSystem.regions.forEach(region => {\n\t\t\t\t\tif (currentRegionId === region.id) {\n\t\t\t\t\t\thealthSystemPath = `${healthSystemPath}${region.name}`;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tlet roomName = data.helloDeviceName.replace(/[,]/g, ' >').replace(/[-]/g, '>');\n\n\t\treturn {\n\t\t\thealthSystemPath: healthSystemPath,\n\t\t\troomName: roomName,\n\t\t};\n\t};\n\n\ttogglePeerCamera = () => {\n\t\tconst { isPeerVideoCamActive, initialCallType, isMyVideoCamActive, localSrc, activeSrc, peerSrc } = this.state;\n\t\tthis.callManager.toggleParticipantTrack(CallTypes.VIDEO, isPeerVideoCamActive);\n\n\t\tif (!isPeerVideoCamActive && initialCallType === CallTypes.AUDIO) {\n\t\t\tthis.setState({\n\t\t\t\tisPeerVideoCamActive: !isPeerVideoCamActive,\n\t\t\t\tinitialCallType: CallTypes.VIDEO,\n\t\t\t\tshowPTZ: isPeerVideoCamActive ? false : this.state.showPTZ,\n\t\t\t});\n\t\t} else if (isPeerVideoCamActive && isMyVideoCamActive) {\n\t\t\tthis.setState({\n\t\t\t\tisPeerVideoCamActive: !isPeerVideoCamActive,\n\t\t\t\tactiveSrc: localSrc,\n\t\t\t\tshowPTZ: isPeerVideoCamActive ? false : this.state.showPTZ,\n\t\t\t});\n\t\t} else {\n\t\t\tconst changeActiveSource = !!peerSrc.mediaStream.getVideoTracks().length && !isPeerVideoCamActive && localSrc.id === activeSrc.id;\n\t\t\tthis.setState({\n\t\t\t\tisPeerVideoCamActive: !isPeerVideoCamActive,\n\t\t\t\tactiveSrc: changeActiveSource ? peerSrc : localSrc,\n\t\t\t\tshowPTZ: isPeerVideoCamActive ? false : this.state.showPTZ,\n\t\t\t});\n\t\t}\n\t};\n\n\tshowTopParticipant = () => {\n\t\tconst { isMyVideoCamActive, isPeerVideoCamActive } = this.state,\n\t\t\tisMyVideoSelected = this.isMyVideoSelected();\n\n\t\tif (isMyVideoSelected && !isMyVideoCamActive) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isMyVideoSelected && !this.isScreenSharingSelected() && !isPeerVideoCamActive) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\tonMicPermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t} else if (this.state.micActive && this.state.localSrc) {\n\t\t\tthis.callManager.toggleAudio();\n\t\t}\n\t\tthis.callManager.publishConferenceLog(`Microphone permission state is changed to ${res.target.state}.`);\n\t};\n\n\tonCamPermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t} else if (this.state.isMyVideoCamActive) {\n\t\t\tthis.toggleVideo();\n\t\t}\n\t\tthis.callManager.publishConferenceLog(`Camera permission state is changed to ${res.target.state}.`);\n\t};\n\n\ttoggleMyMic = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.microphone) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.DENIED) {\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'popup',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t} else {\n\t\t\tconst audioStream = await this.callManager.toggleAudio();\n\t\t\tif (audioStream && audioStream.error) {\n\t\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\ttoggleMyVideo = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.camera) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.camStatus.state === MediaPermissions.DENIED) {\n\t\t\tawait askForPermission({ video: true });\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'popup',\n\t\t\t\ttype: StreamError.CAMERA_BLOCKED.type,\n\t\t\t});\n\t\t} else if (this.camStatus.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.CAMERA_BLOCKED.type,\n\t\t\t});\n\t\t\tconst permissionRes = await askForPermission({ video: true });\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t\tif (permissionRes.permission === MediaPermissions.GRANTED) {\n\t\t\t\tthis.toggleVideo();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.toggleVideo();\n\t\t}\n\t};\n\n\ttoggleMyStream = streamType => {\n\t\tif (streamType === TrackType.VIDEO) {\n\t\t\tthis.toggleMyVideo();\n\t\t} else if (streamType === TrackType.SCREEN) {\n\t\t\tthis.toggleMyScreenSharing();\n\t\t} else {\n\t\t\tthis.toggleMyMic();\n\t\t}\n\t};\n\n\tdebouncedToggleStream = _.debounce(this.toggleMyStream, 500, {\n\t\tleading: true,\n\t\ttrailing: false,\n\t});\n\n\ttoggleVideo = async () => {\n\t\tconst videoStream = await this.callManager.toggleVideo();\n\t\tif (videoStream && videoStream.error) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.CAMERA_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\t\treturn videoStream;\n\t};\n\n\ttoggleMyScreenSharing = () => {\n\t\tthis.callManager.screenShare();\n\t};\n\n\tendCall = () => {\n\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.INITIATOR_LEFT });\n\t};\n\n\tstartCloseTabTimeout = () => {\n\t\tthis.closeTabTimeout = setTimeout(() => {\n\t\t\tclearTimeout(this.closeTabTimeout);\n\t\t\tthis.closeTabTimeout = null;\n\t\t\twindow.close();\n\t\t}, 5000);\n\t};\n\n\tactiveSrcHandle = mediaStreamId => {\n\t\tlet { activeSrc } = this.state;\n\t\tif (activeSrc !== null && activeSrc.id === mediaStreamId) return;\n\n\t\tswitch (mediaStreamId) {\n\t\t\tcase this.state.localSrc.id:\n\t\t\t\tactiveSrc = this.state.localSrc;\n\t\t\t\tbreak;\n\t\t\tcase this.state.peerSrc.id:\n\t\t\t\tactiveSrc = this.state.peerSrc;\n\t\t\t\tbreak;\n\t\t\tcase this.state.localScreenSrc.id:\n\t\t\t\tactiveSrc = this.state.localScreenSrc;\n\t\t\t\tbreak;\n\t\t\tcase this.state.isMyVideoCamActive:\n\t\t\t\tactiveSrc = this.state.peerSrc;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tthis.setState({ activeSrc });\n\t};\n\n\tisMyVideoSelected = () => {\n\t\tconst { localSrc, activeSrc } = this.state;\n\n\t\tif (!localSrc) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (activeSrc && activeSrc.id === localSrc.id) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tisScreenSharingSelected = () => {\n\t\tconst { localScreenSrc, activeSrc } = this.state;\n\n\t\tif (!localScreenSrc) return false;\n\n\t\tif (activeSrc && activeSrc.id === localScreenSrc.id) return true;\n\n\t\treturn false;\n\t};\n\n\tbuildListFromStates = (isPeerVideoCamActive, micActive) => {\n\t\tlet lists = [\n\t\t\t{\n\t\t\t\tid: 'toggle_video',\n\t\t\t\ttitle: 'Camera Off',\n\t\t\t\ticon: 'videocam_off',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'toggle_audio',\n\t\t\t\ttitle: 'Mute Audio',\n\t\t\t\ticon: 'volume_up',\n\t\t\t},\n\t\t];\n\t\tif (!isPeerVideoCamActive) {\n\t\t\tlists[0].title = 'Camera On';\n\t\t\tlists[0].icon = 'videocam';\n\t\t}\n\t\tif (!micActive) {\n\t\t\tlists[1].title = 'Unmute Audio';\n\t\t\tlists[1].icon = 'volume_off';\n\t\t}\n\t\treturn lists;\n\t};\n\n\tonMyMediaToggleClicked = (event, item) => {\n\t\tif (item.id === 'toggle_video') {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tisMyVideoCamActive: !this.state.isMyVideoCamActive,\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tif (!this.state.isMyVideoCamActive && this.state.isPeerVideoCamActive && this.state.peerSrc) {\n\t\t\t\t\t\tthis.activeSrcHandle(this.state.peerSrc.id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t} else if (item.id === 'toggle_audio') {\n\t\t\tthis.setState({\n\t\t\t\tmicActive: !this.state.micActive,\n\t\t\t});\n\t\t}\n\t};\n\n\tonPeerMediaToggleClicked = (event, item) => {\n\t\tif (this.state.disableButtons) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (item.id === 'toggle_video') {\n\t\t\tthis.togglePeerCamera();\n\t\t}\n\t\tif (item.id === 'toggle_audio') {\n\t\t\tthis.callManager.toggleParticipantTrack(CallTypes.AUDIO, this.state.peerMicActive);\n\t\t\tthis.setState({\n\t\t\t\tpeerMicActive: !this.state.peerMicActive,\n\t\t\t});\n\t\t}\n\t};\n\n\ttogglePTZ = () => {\n\t\tthis.setState({\n\t\t\tshowPTZ: !this.state.showPTZ,\n\t\t});\n\t};\n\n\tshouldShowPatientCameraToggledOff = () => {\n\t\tconst { isVideoCall, isPeerVideoCamActive } = this.state;\n\n\t\tif (this.isMyVideoSelected()) return false;\n\n\t\tif (this.isScreenSharingSelected()) return false;\n\n\t\treturn isVideoCall && !isPeerVideoCamActive;\n\t};\n\n\tsetAudioSrcObject = () => {\n\t\tif (\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED &&\n\t\t\tthis.state.socketState.type === SocketState.CONNECTED.type &&\n\t\t\tthis.audioRef\n\t\t) {\n\t\t\tthis.audioRef.srcObject = null;\n\t\t\tthis.audioRef.srcObject = this.state.peerSrc.mediaStream;\n\t\t}\n\t};\n\n\tshouldShowStateComponents = () => {\n\t\treturn (\n\t\t\tthis.state.hasActiveConference ||\n\t\t\tthis.state.anotherNursePickedUp ||\n\t\t\tthis.state.conferenceEndReason ||\n\t\t\tthis.state.streamPermission ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED\n\t\t);\n\t};\n\n\tshouldShowConnectionStatus = () => {\n\t\treturn (\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED\n\t\t);\n\t};\n\n\tsendPanTiltCameraEvent = (direction, action) => {\n\t\tconst { participantId, conferenceId, callerObjectId } = this.state;\n\t\tthis.callManager.panTiltCamera({ direction, helloDeviceId: callerObjectId, action, conferenceId, participantId });\n\t};\n\n\tcameraResponseListener = ({ event, message, isSuccessful }) => {\n\t\tswitch (event) {\n\t\t\tcase CameraEventTypes.SWITCH:\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tcameraType: message,\n\t\t\t\t\t\tcameraZoomLevel: 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.ZOOM:\n\t\t\t\tthis.setState({\n\t\t\t\t\tcameraZoomLevel: +message,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.TILT: {\n\t\t\t\tconst { disabledTiltDirections } = this.state;\n\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tif ([CameraTiltDirection.UP, CameraTiltDirection.DOWN].includes(message)) {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.UP] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.DOWN] = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.LEFT] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.RIGHT] = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdisabledTiltDirections[message] = true;\n\t\t\t\t\tthis.sendPanTiltCameraEvent(message, CameraTiltAction.STOP);\n\t\t\t\t}\n\n\t\t\t\tthis.setState(disabledTiltDirections);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CameraEventTypes.HUDDLE_CONNECTED_STATE:\n\t\t\t\tthis.setState({\n\t\t\t\t\tisHuddleCamConnected: isSuccessful,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.NIGHT_VISION:\n\t\t\t\tthis.setState({ nightVisionMode: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_CAMERA_PRIVACY_STATE:\n\t\t\t\tthis.setState({ isCameraPrivacyOn: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_MIC_PRIVACY_STATE:\n\t\t\t\tthis.setState({ isMicPrivacyOn: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t}\n\t};\n\n\trenderCallStates = () => {\n\t\tif (this.state.hasActiveConference) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.anotherNursePickedUp) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.conferenceEndReason) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.streamPermission) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.peerConnectionState) {\n\t\t\treturn ;\n\t\t}\n\t};\n\n\tgetPrivacyButtonsErrorMessage = () => {\n\t\tconst { isMicPrivacyOn, isCameraPrivacyOn, cameraType } = this.state;\n\n\t\tif (isMicPrivacyOn && (!isCameraPrivacyOn || !this.state.isPeerVideoCamActive || cameraType !== CameraType.HELLO)) {\n\t\t\treturn `You are not hearing the patient because the physical mic privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\n\t\tif (!isMicPrivacyOn && isCameraPrivacyOn && this.state.isPeerVideoCamActive && cameraType === CameraType.HELLO) {\n\t\t\treturn `You are not seeing the patient because the physical camera privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\n\t\tif (isMicPrivacyOn && isCameraPrivacyOn && this.state.isPeerVideoCamActive && cameraType === CameraType.HELLO) {\n\t\t\treturn `You are not seeing or hearing the patient because the physical privacy buttons have been enabled on Banyan Bridge. These buttons can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\t};\n\n\tshouldShowPrivacyButtonsErrorMessage = () => {\n\t\treturn this.state.isMicPrivacyOn || (this.state.isCameraPrivacyOn && this.state.isPeerVideoCamActive && this.state.cameraType === CameraType.HELLO);\n\t};\n\n\ttoggleRightColumn = () => {\n\t\tthis.setState({\n\t\t\tshowRightColumn: !this.state.showRightColumn,\n\t\t});\n\t};\n\n\tonToggleCameraSwitch = () => {\n\t\tconst { participantId, conferenceId, callerObjectId, cameraType, isCameraPrivacyOn } = this.state;\n\n\t\tconst notAllowedToSwitchToHelloCam = cameraType === CameraType.HUDDLE && isCameraPrivacyOn;\n\t\tif (notAllowedToSwitchToHelloCam) {\n\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: true });\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callManager.sendCameraEvent(SocketEvents.HelloDevice.SWITCH_CAMERA, { participantId, conferenceId, helloDeviceId: callerObjectId });\n\t};\n\n\tonLocalAudioError = ({ trackDeviceNotFound, inputDevices }) => {\n\t\tif (!trackDeviceNotFound || !inputDevices.length) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({ micActive: false });\n\t};\n\n\tonLocalVideoError = ({ trackDeviceNotFound, inputDevices }) => {\n\t\tif (!trackDeviceNotFound || !inputDevices.length) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.CAMERA_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({ isMyVideoCamActive: false });\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tactiveSrc,\n\t\t\tpeerSrc,\n\t\t\tlocalSrc,\n\t\t\tlocalScreenSrc,\n\t\t\tpeerMicActive,\n\t\t\tmicActive,\n\t\t\tparticipantId,\n\t\t\tconferenceId,\n\t\t\tisMyVideoCamActive,\n\t\t\tisVideoCall,\n\t\t\tisPeerVideoCamActive,\n\t\t\tshowPTZ,\n\t\t\tcallerObjectId,\n\t\t\troomName,\n\t\t\ttvStatus,\n\t\t\thdmiStatus,\n\t\t\tvolumeStatus,\n\t\t\taudioOutputDevice,\n\t\t\tnightVisionMode,\n\t\t\tconferenceEndReason,\n\t\t\tstreamPermission,\n\t\t\tdisableButtons,\n\t\t\tcameraZoomLevel,\n\t\t\tcameraType,\n\t\t\tdisabledTiltDirections,\n\t\t\tisHuddleCamConnected,\n\t\t\tisCameraPrivacyOn,\n\t\t\tshowRightColumn,\n\t\t} = this.state;\n\n\t\tconst shouldShowStateComponents = this.shouldShowStateComponents();\n\t\tconst shouldShowPatientCameraToggledOff = this.shouldShowPatientCameraToggledOff();\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t{shouldShowStateComponents && this.renderCallStates()}\n\n\t\t\t\t\t{!shouldShowStateComponents && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{shouldShowPatientCameraToggledOff && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t

    You have toggled patient's camera off.

    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{!shouldShowPatientCameraToggledOff && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: false });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\tmessage={`You can't switch back to Banyan Bridge because the physical privacy buttons have been enabled. These buttons can be disabled only manually. Please contact your administrator.`}\n\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t this.onToggleCameraSwitch()}\n\t\t\t\t\t\t\t\tonZoomCamera={direction => {\n\t\t\t\t\t\t\t\t\tconst level = direction === ZoomDirection.INCREASE ? cameraZoomLevel + 20 : cameraZoomLevel - 20;\n\t\t\t\t\t\t\t\t\tthis.callManager.sendCameraEvent(SocketEvents.HelloDevice.ZOOM_CAMERA, {\n\t\t\t\t\t\t\t\t\t\tlevel,\n\t\t\t\t\t\t\t\t\t\thelloDeviceId: callerObjectId,\n\t\t\t\t\t\t\t\t\t\tconferenceId,\n\t\t\t\t\t\t\t\t\t\tparticipantId,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonPanTiltCamera={this.sendPanTiltCameraEvent}\n\t\t\t\t\t\t\t\tonRebootHuddleCam={() =>\n\t\t\t\t\t\t\t\t\tthis.callManager.rebootHuddleCam({\n\t\t\t\t\t\t\t\t\t\tconferenceId,\n\t\t\t\t\t\t\t\t\t\tparticipantId,\n\t\t\t\t\t\t\t\t\t\thelloDeviceId: callerObjectId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{!peerSrc && (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t

    Initiating Call

    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t
    \n\n\t\t\t\t{peerSrc && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    ${this.state.roomName}`} data-position='top'>\n\t\t\t\t\t\t\t\t\t{roomName}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t{!!conferenceId && }\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t this.debouncedToggleStream(TrackType.SCREEN)}\n\t\t\t\t\t\t\t\t\ttooltip={localScreenSrc ? 'Stop screensharing' : 'Start screensharing'}\n\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\tisDisabled={disableButtons}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t this.debouncedToggleStream(TrackType.VIDEO)}\n\t\t\t\t\t\t\t\t\ttooltip={isMyVideoCamActive ? 'Turn off camera' : 'Turn on camera'}\n\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\tisDisabled={disableButtons}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t this.debouncedToggleStream(TrackType.AUDIO)}\n\t\t\t\t\t\t\t\t\ttooltip={micActive ? 'Turn off mic' : 'Turn on mic'}\n\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\tisDisabled={disableButtons}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t this.callManager.toggleNightVision(!nightVisionMode, callerObjectId, conferenceId, participantId)}\n\t\t\t\t\t\t\t\t\tisDisabled={this.state.cameraType === CameraType.HUDDLE || disableButtons}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nCall.contextType = SocketContext;\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tfetchNotificationCounter: () => dispatch(fetchNotificationCounter()),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Call);\n","import React, { Component } from 'react';\nimport v4 from 'uuid';\nimport { SocketContext } from 'io-client/SocketContext';\nimport CallManager from 'owt/p2p/CallManager';\nimport { ConferenceInfo, ConferenceParticipant, FromUser } from 'owt/base/conference';\nimport { isChrome } from 'owt/base/utils';\nimport { Grid, CallButton, Loader, TvControls, CallEndReason, CallCorrelationInfo, ConnectionStatus, Button } from 'components';\nimport CameraControls from 'components/Common/CameraControls';\nimport NightVisionControl from 'components/Common/NightVisionControl';\nimport CallDuration from 'components/Common/CallDuration';\nimport ActiveConference from 'components/Call/ActiveConference';\nimport Alert from 'components/Alert';\nimport PeerStats from 'containers/PeerStats';\nimport {\n\tCallTypes,\n\tObjectType,\n\tConferenceEndReason,\n\tSerialTVCommands,\n\tSocketState,\n\tRTCPeerConnectionEnum,\n\tCameraType,\n\tCameraEventTypes,\n\tCameraTiltDirection,\n\tCameraTiltAction,\n\tZoomDirection,\n\tMediaPermissions,\n\tMediaTypes,\n\tStreamError,\n} from 'constants/enums';\nimport SocketEvents from 'constants/socket-events';\nimport { getCurrentHealthSystemInfo, checkForPermission, checkIfMediaDevicesPlugged, askForPermission } from 'infrastructure/helpers/commonHelpers';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { getUserProfile } from 'infrastructure/auth';\n\nclass PatientFeed extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\n\t\tthis.state = {\n\t\t\tcallerObjectId: parseInt(props.match.params.patientId, 10),\n\t\t\troomName: decodeURIComponent(props.match.params.roomName),\n\t\t\thealthSystemPath: null,\n\t\t\tpeerSrc: null,\n\t\t\tmicActive: false,\n\t\t\tpeerAudioMuted: false,\n\t\t\tconferenceId: null,\n\t\t\tparticipantId: null,\n\t\t\tconferenceEndReason: null,\n\t\t\tsocketState: SocketState.CONNECTED,\n\t\t\ttvStatus: null,\n\t\t\thdmiStatus: null,\n\t\t\ttvBrand: null,\n\t\t\tvolumeStatus: null,\n\t\t\tnightVisionMode: false,\n\t\t\tcameraZoomLevel: 0,\n\t\t\tcameraType: CameraType.HELLO,\n\t\t\tisHuddleCamConnected: true,\n\t\t\tisCameraPrivacyOn: false,\n\t\t\tisMicPrivacyOn: false,\n\t\t\tdisabledTiltDirections: {},\n\t\t\tcallStartTime: null,\n\t\t\tsoundPermission: true,\n\t\t\tpeerConnectionState: RTCPeerConnectionEnum.CONNECTION_STATE.NEW,\n\t\t\tdisableButtons: false,\n\t\t\thasActiveConference: false,\n\t\t\tonPatientBusyNurse: null, // this is the name of the nurse that the hello is talking already when we get the busy participant event\n\t\t\tshouldShowSwitchToHelloCamError: false,\n\t\t};\n\n\t\tthis.myAvatarUrl = '';\n\t\tthis.camStatus = null;\n\t\tthis.micStatus = null;\n\n\t\tthis.callManager = new CallManager(this.context, {\n\t\t\tuseCallStats: APP_CONFIG.useCallStats,\n\t\t\tsendCallStatsInterval: APP_CONFIG.sendCallStatsInterval,\n\t\t});\n\t\tthis.videoRef = React.createRef();\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.props.fetchNotificationCounter();\n\t\tthis.camStatus = await checkForPermission(MediaTypes.CAMERA);\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.micStatus.onchange = this.onDevicePermissionChange;\n\t\tthis.callManager\n\t\t\t.on('call-started', data => {\n\t\t\t\tlet roomNamePath = this.getRoomNamePath(data);\n\t\t\t\tthis.setState({\n\t\t\t\t\tconferenceId: data.conferenceId,\n\t\t\t\t\tparticipantId: data.participantId,\n\t\t\t\t\t...roomNamePath,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('feed-call', data => {\n\t\t\t\tconst { localStream } = data;\n\t\t\t\tif (!!localStream.mediaStream.getAudioTracks().length) {\n\t\t\t\t\tlocalStream.mediaStream.getAudioTracks()[0].enabled = false;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('peer-stream', data => {\n\t\t\t\tconst { peerSrc } = data;\n\t\t\t\tlet newState = {};\n\n\t\t\t\tObject.assign(newState, { peerSrc });\n\n\t\t\t\tif (!this.state.callStartTime) {\n\t\t\t\t\tObject.assign(newState, { callStartTime: new Date() });\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t})\n\t\t\t.on('end-call', data => {\n\t\t\t\tthis.startCloseTabTimeout();\n\t\t\t\tthis.setState({\n\t\t\t\t\tpeerSrc: null,\n\t\t\t\t\tconferenceEndReason: data.endReason,\n\t\t\t\t\thasActiveConference: data.hasActiveConference,\n\t\t\t\t\tconferenceId: null,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('toggle-audio', () => {\n\t\t\t\tthis.setState({ micActive: !this.state.micActive });\n\t\t\t})\n\t\t\t.on('tv-commands', data => {\n\t\t\t\tif (data.tvState.isVolume) {\n\t\t\t\t\tthis.setState({ volumeStatus: data });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tswitch (data.tvState.tvStatus) {\n\t\t\t\t\tcase SerialTVCommands.INITIAL_TV_POWER:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_ON:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_OFF:\n\t\t\t\t\t\tthis.setState({ tvStatus: data });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI1:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI2:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI3:\n\t\t\t\t\t\tthis.setState({ hdmiStatus: data });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('initial-device-state', data => {\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst {\n\t\t\t\t\tcameraType,\n\t\t\t\t\tzoomLevel: cameraZoomLevel,\n\t\t\t\t\tisNightVision: nightVisionMode,\n\t\t\t\t\tisHuddleCamConnected,\n\t\t\t\t\tisCameraPrivacyOn,\n\t\t\t\t\tisMicPrivacyOn,\n\t\t\t\t\ttvHdmiPort,\n\t\t\t\t\ttvBrand,\n\t\t\t\t} = data;\n\t\t\t\tlet hdmiStatus = null;\n\n\t\t\t\tif (tvHdmiPort) {\n\t\t\t\t\thdmiStatus = { isSuccessful: true, tvState: { isVolume: false, tvStatus: SerialTVCommands.HDMI[`SWITCH_HDMI${tvHdmiPort}`] } };\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tcameraType,\n\t\t\t\t\tcameraZoomLevel,\n\t\t\t\t\tnightVisionMode,\n\t\t\t\t\tisHuddleCamConnected,\n\t\t\t\t\tisCameraPrivacyOn,\n\t\t\t\t\tisMicPrivacyOn,\n\t\t\t\t\thdmiStatus,\n\t\t\t\t\ttvBrand,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('camera-response', this.cameraResponseListener)\n\t\t\t.on('socket-state', ({ socketState }) => {\n\t\t\t\tif (this.state.socketState.type === socketState.type) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst newState = { socketState };\n\t\t\t\tswitch (socketState.type) {\n\t\t\t\t\tcase SocketState.DISCONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SocketState.CONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState, () => {\n\t\t\t\t\tthis.playVideo();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('peer-connection-state', ({ peerConnectionState }) => {\n\t\t\t\tthis.setState({ peerConnectionState }, () => {\n\t\t\t\t\tthis.playVideo();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('participant-busy', data => {\n\t\t\t\tconst { activeConferences, objectId } = data;\n\t\t\t\tif (!activeConferences || activeConferences.length === 0) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active conference was found');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst conference = activeConferences.find(ac => ac.initialCallType === CallTypes.SECURITYCAM || ac.initialCallType === CallTypes.AUDIO);\n\t\t\t\tif (!conference) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active patient view or talk to patient conference was found');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// only active participants\n\t\t\t\t// there should be only one active participant in patient view or talk to patient\n\t\t\t\tif (conference.participants.length > 1) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - more then one participants were found in the active conference');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst onPatientBusyNurse = conference.participants[0];\n\t\t\t\tthis.setState({ onPatientBusyNurse });\n\t\t\t})\n\t\t\t.on('local-audio-error', this.onLocalAudioError)\n\t\t\t.bindSocketEventListeners(false);\n\n\t\tthis.bindWindowListeners();\n\t\tthis.callManager.startConference(await this.prepareStartConferenceInfo());\n\t}\n\n\tonDevicePermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t} else if (this.state.micActive) {\n\t\t\tthis.toggleMyMicrophone();\n\t\t}\n\t\tthis.callManager.publishConferenceLog(`Microphone permission state is changed to ${res.target.state}.`);\n\t};\n\n\tbeforeUnloadEvent = event => {\n\t\tif (this.state.conferenceId) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.returnValue = '';\n\t\t}\n\t};\n\n\tbindWindowListeners() {\n\t\twindow.addEventListener('beforeunload', this.beforeUnloadEvent);\n\n\t\twindow.addEventListener('unload', () => {\n\t\t\tif (this.state.conferenceId) {\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_LEFT });\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('message', message => {\n\t\t\tif (message.data === 'IN_CALL') {\n\t\t\t\twindow.removeEventListener('beforeunload', this.beforeUnloadEvent);\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_IDLE });\n\t\t\t}\n\t\t});\n\t}\n\n\tplayVideo = () => {\n\t\tif (\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED &&\n\t\t\tthis.state.socketState.type === SocketState.CONNECTED.type &&\n\t\t\tthis.state.peerSrc &&\n\t\t\tthis.videoRef &&\n\t\t\tthis.videoRef.current\n\t\t) {\n\t\t\tthis.videoRef.current.srcObject = null;\n\t\t\tthis.videoRef.current.srcObject = this.state.peerSrc.mediaStream;\n\t\t\t// playVideo is called from multiple places for different scenarius\n\t\t\t// make sure the promise to play the video is resolved to trigger the next play\n\t\t\tif (!this.videoPlayPromise) {\n\t\t\t\tif (this.checkVideoPlayingTimeout) {\n\t\t\t\t\tclearTimeout(this.checkVideoPlayingTimeout);\n\t\t\t\t\tthis.checkVideoPlayingTimeout = null;\n\t\t\t\t}\n\t\t\t\tthis.checkVideoPlayingTimeout = setTimeout(() => {\n\t\t\t\t\tclearTimeout(this.checkVideoPlayingTimeout);\n\t\t\t\t\tthis.checkVideoPlayingTimeout = null;\n\t\t\t\t\tif (this.videoPlayPromise) {\n\t\t\t\t\t\tconst message = `PatientFeed: playVideo: Video is taking to long to be played more then 5 sec`;\n\t\t\t\t\t\tthis.callManager.publishConferenceLog(message);\n\t\t\t\t\t}\n\t\t\t\t}, 5000);\n\n\t\t\t\tthis.videoPlayPromise = this.videoRef.current.play();\n\t\t\t\tthis.videoPlayPromise\n\t\t\t\t\t.then(() => {\n\t\t\t\t\t\tconst message = `PatientFeed: playVideo: Video is playing`;\n\t\t\t\t\t\tthis.callManager.publishConferenceLog(message);\n\t\t\t\t\t})\n\t\t\t\t\t.catch(e => {\n\t\t\t\t\t\tconst message = `PatientFeed: playVideo: Can not play video: ${e}`;\n\t\t\t\t\t\tthis.callManager.publishConferenceLog(message);\n\t\t\t\t\t\tthis.callManager.logger.error(message);\n\t\t\t\t\t\tthis.setState({ soundPermission: false });\n\t\t\t\t\t})\n\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\tclearTimeout(this.checkVideoPlayingTimeout);\n\t\t\t\t\t\tthis.checkVideoPlayingTimeout = null;\n\t\t\t\t\t\tthis.videoPlayPromise = null;\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\tcomponentWillUnmount() {\n\t\tthis.callManager.unbindSocketEventListeners();\n\t\tthis.callManager.unbindTimeouts();\n\t\tif (this.closeTabTimeout) {\n\t\t\tclearTimeout(this.closeTabTimeout);\n\t\t\tthis.closeTabTimeout = null;\n\t\t}\n\t}\n\n\tgetRoomNamePath = data => {\n\t\tlet healthSystemPath;\n\t\tlet { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tthis.props.organization.allHealthSystems.forEach(healthSystem => {\n\t\t\tif (healthSystem.id === currentHealthSystemId) {\n\t\t\t\thealthSystemPath = healthSystem.name + ' > ';\n\n\t\t\t\thealthSystem.regions.forEach(region => {\n\t\t\t\t\tif (currentRegionId === region.id) {\n\t\t\t\t\t\thealthSystemPath = healthSystemPath + region.name;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tlet roomName = data.helloDeviceName.replace(/[,]/g, ' >').replace(/[-]/g, '>');\n\n\t\treturn {\n\t\t\thealthSystemPath: healthSystemPath,\n\t\t\troomName: roomName,\n\t\t};\n\t};\n\n\tprepareStartConferenceInfo = async () => {\n\t\tconst user = getUserProfile();\n\t\tconst fromUserInfo = new FromUser(`${user.firstName} ${user.lastName}`, user.jobTitle, user.profilePicture.url, undefined);\n\t\tconst participants = [new ConferenceParticipant(+this.state.callerObjectId, ObjectType.HELLO_DEVICE)];\n\n\t\tthis.myAvatarUrl = user.profilePicture.url;\n\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\tconst inputDevices = {\n\t\t\tdevices,\n\t\t\tpermissions: {\n\t\t\t\tcamera: this.camStatus.state,\n\t\t\t\tmicrophone: this.micStatus.state,\n\t\t\t},\n\t\t};\n\n\t\treturn new ConferenceInfo(\n\t\t\tCallTypes.SECURITYCAM,\n\t\t\tv4(),\n\t\t\t'Patient Feed',\n\t\t\tnull,\n\t\t\tfromUserInfo,\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tv4(),\n\t\t\tparticipants,\n\t\t\tinputDevices,\n\t\t\ttrue\n\t\t);\n\t};\n\n\ttoggleAudio = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.microphone) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.GRANTED) {\n\t\t\tthis.toggleMyMicrophone();\n\t\t} else if (this.micStatus.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tif (this.micStatus.state === MediaPermissions.GRANTED) {\n\t\t\t\tconst audioStream = this.toggleMyMicrophone();\n\t\t\t\tif (audioStream && audioStream.error) return;\n\t\t\t}\n\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t} else {\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'popup',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t}\n\t};\n\n\ttoggleMyMicrophone = async () => {\n\t\tconst audioStream = await this.callManager.toggleAudio();\n\t\tif (audioStream && audioStream.error) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\t\treturn audioStream;\n\t};\n\n\ttoggleHandler = async type => {\n\t\tswitch (type) {\n\t\t\tcase 'mic':\n\t\t\t\tthis.toggleAudio();\n\t\t\t\tbreak;\n\t\t\tcase 'peer-audio':\n\t\t\t\tconst muted = !this.state.peerAudioMuted;\n\t\t\t\tthis.setState({ peerAudioMuted: muted });\n\n\t\t\t\tthis.callManager.toggleParticipantTrack(CallTypes.AUDIO, muted);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tendCall = () => {\n\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.INITIATOR_LEFT });\n\t};\n\n\tstartCloseTabTimeout = () => {\n\t\tthis.closeTabTimeout = setTimeout(() => {\n\t\t\tclearTimeout(this.closeTabTimeout);\n\t\t\tthis.closeTabTimeout = null;\n\t\t\twindow.close();\n\t\t}, 5000);\n\t};\n\n\tsetCallStartTime = () => {\n\t\tif (!this.state.callStartTime) {\n\t\t\tthis.setState({ callStartTime: new Date() });\n\t\t}\n\t};\n\n\thandleSoundPermission = () => {\n\t\tthis.setState({ soundPermission: true }, () => {\n\t\t\tthis.videoRef.current.srcObject = null;\n\t\t\tthis.videoRef.current.srcObject = this.state.peerSrc.mediaStream;\n\t\t\tthis.playVideo();\n\t\t});\n\t};\n\n\tshouldShowStateComponents = () => {\n\t\treturn (\n\t\t\tthis.state.hasActiveConference ||\n\t\t\tthis.state.conferenceEndReason ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED\n\t\t);\n\t};\n\n\tsendPanTiltCameraEvent = (direction, action) => {\n\t\tconst { participantId, conferenceId, callerObjectId } = this.state;\n\t\tthis.callManager.panTiltCamera({ direction, helloDeviceId: callerObjectId, action, conferenceId, participantId });\n\t};\n\n\ttoggleNightvision = () => {\n\t\tthis.callManager.toggleNightVision(!this.state.nightVisionMode, this.state.callerObjectId, this.state.conferenceId, this.state.participantId);\n\t};\n\n\tcameraResponseListener = ({ event, message, isSuccessful }) => {\n\t\tswitch (event) {\n\t\t\tcase CameraEventTypes.SWITCH:\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tcameraType: message,\n\t\t\t\t\t\tcameraZoomLevel: 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.ZOOM:\n\t\t\t\tthis.setState({\n\t\t\t\t\tcameraZoomLevel: +message,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.TILT: {\n\t\t\t\tconst { disabledTiltDirections } = this.state;\n\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tif ([CameraTiltDirection.UP, CameraTiltDirection.DOWN].includes(message)) {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.UP] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.DOWN] = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.LEFT] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.RIGHT] = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdisabledTiltDirections[message] = true;\n\t\t\t\t\tthis.sendPanTiltCameraEvent(message, CameraTiltAction.STOP);\n\t\t\t\t}\n\n\t\t\t\tthis.setState(disabledTiltDirections);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CameraEventTypes.HUDDLE_CONNECTED_STATE:\n\t\t\t\tthis.setState({ isHuddleCamConnected: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.NIGHT_VISION:\n\t\t\t\tthis.setState({ nightVisionMode: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_CAMERA_PRIVACY_STATE:\n\t\t\t\tthis.setState({ isCameraPrivacyOn: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_MIC_PRIVACY_STATE:\n\t\t\t\tthis.setState({ isMicPrivacyOn: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t}\n\t};\n\n\trenderCallStates = () => {\n\t\tif (this.state.hasActiveConference) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.conferenceEndReason) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.peerConnectionState) {\n\t\t\treturn ;\n\t\t}\n\t};\n\n\tgetPrivacyButtonsErrorMessage = () => {\n\t\tconst { isMicPrivacyOn, isCameraPrivacyOn, cameraType } = this.state;\n\n\t\tif (isMicPrivacyOn && (!isCameraPrivacyOn || cameraType !== CameraType.HELLO)) {\n\t\t\treturn `You are not hearing the patient because the physical mic privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\t\tif (!isMicPrivacyOn && isCameraPrivacyOn && cameraType === CameraType.HELLO) {\n\t\t\treturn `You are not seeing the patient because the physical camera privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\n\t\tif (isMicPrivacyOn && isCameraPrivacyOn && cameraType === CameraType.HELLO) {\n\t\t\treturn `You are not seeing or hearing the patient because the physical privacy buttons have been enabled on Banyan Bridge. These buttons can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\t};\n\n\tshouldShowPrivacyButtonsErrorMessage = () => {\n\t\treturn this.state.isMicPrivacyOn || (this.state.isCameraPrivacyOn && this.state.cameraType === CameraType.HELLO);\n\t};\n\n\tonToggleCameraSwitch = () => {\n\t\tconst { participantId, conferenceId, callerObjectId, cameraType, isCameraPrivacyOn } = this.state;\n\n\t\tconst notAllowedToSwitchToHelloCam = cameraType === CameraType.HUDDLE && isCameraPrivacyOn;\n\t\tif (notAllowedToSwitchToHelloCam) {\n\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: true });\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callManager.sendCameraEvent(SocketEvents.HelloDevice.SWITCH_CAMERA, { participantId, conferenceId, helloDeviceId: callerObjectId });\n\t};\n\n\tonLocalAudioError = ({ trackDeviceNotFound, inputDevices }) => {\n\t\tif (!trackDeviceNotFound || !inputDevices.length) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({ micActive: false });\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tcallerObjectId,\n\t\t\tcameraType,\n\t\t\tcameraZoomLevel,\n\t\t\tdisabledTiltDirections,\n\t\t\tisHuddleCamConnected,\n\t\t\tdisableButtons,\n\t\t\tconferenceId,\n\t\t\tparticipantId,\n\t\t\tisCameraPrivacyOn,\n\t\t} = this.state;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{this.shouldShowStateComponents() && this.renderCallStates()}\n\t\t\t\t{!this.shouldShowStateComponents() && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{!this.state.peerSrc && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t

    Initiating Call

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.peerSrc && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{!this.state.soundPermission && (\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\tAllow Banyan to play sound on your browser\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\tPlease allow permissions for sound so you can hear the patient.\n\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{this.state.soundPermission && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: false });\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\t\t\t\t\tmessage={`You can't switch back to Banyan Bridge because the physical privacy buttons have been enabled. These buttons can be disabled only manually. Please contact your administrator.`}\n\t\t\t\t\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t

    ${this.state.roomName}`} data-position='top'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{this.state.roomName}\n\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.toggleHandler('mic');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip={this.state.micActive ? 'Turn off mic' : 'Turn on mic'}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDisabled={this.state.disableButtons}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.toggleHandler('peer-audio');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip={!this.state.peerAudioMuted ? 'Mute Audio' : 'Unmute Audio'}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDisabled={this.state.disableButtons}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t this.onToggleCameraSwitch()}\n\t\t\t\t\t\t\t\t\t\t\tonZoomCamera={direction => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst level = direction === ZoomDirection.INCREASE ? cameraZoomLevel + 20 : cameraZoomLevel - 20;\n\t\t\t\t\t\t\t\t\t\t\t\tthis.callManager.sendCameraEvent(SocketEvents.HelloDevice.ZOOM_CAMERA, {\n\t\t\t\t\t\t\t\t\t\t\t\t\tlevel,\n\t\t\t\t\t\t\t\t\t\t\t\t\thelloDeviceId: this.state.callerObjectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tparticipantId,\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tonPanTiltCamera={this.sendPanTiltCameraEvent}\n\t\t\t\t\t\t\t\t\t\t\tonRebootHuddleCam={() =>\n\t\t\t\t\t\t\t\t\t\t\t\tthis.callManager.rebootHuddleCam({\n\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tparticipantId,\n\t\t\t\t\t\t\t\t\t\t\t\t\thelloDeviceId: callerObjectId,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nPatientFeed.contextType = SocketContext;\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tfetchNotificationCounter: () => dispatch(fetchNotificationCounter()),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PatientFeed);\n","import React from 'react';\nimport classNames from 'classnames/bind';\n\nconst InputFeedback = ({ children }) => {children};\n\nconst Input = ({ field: { name, ...field }, form: { touched, errors }, ...props }) => {\n\tconst error = errors ? errors[name] : '';\n\tconst touch = touched ? touched[name] : '';\n\treturn (\n\t\t
    \n\t\t\t

    {props.label}

    \n\t\t\t

    {props.description}

    \n\t\t\t\n\t\t\t{touch && error && {error}}\n\t\t
    \n\t);\n};\n\nexport default Input;\n","import React, { Component } from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport { createInvite, checkUserAccount, checkIfCompanyMemberExists } from 'api/users';\nimport { If, Then, Else } from 'react-if';\nimport Alert from 'components/Alert';\n\nclass InviteAdmins extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\textraFields: 0,\n\t\t};\n\t}\n\n\taddExtraInputField = () => {\n\t\tvar updatedExtraFields = this.state.extraFields + 1;\n\t\tthis.setState({ extraFields: updatedExtraFields });\n\t};\n\n\tdisplayExtraFields = () => {\n\t\tlet table = [];\n\t\tfor (let i = 0; i < this.state.extraFields; i++) {\n\t\t\ttable.push();\n\t\t}\n\t\treturn table;\n\t};\n\n\tasync checkEmail(val) {\n\t\tif (!val) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet response = false;\n\t\tlet schema = Yup.string()\n\t\t\t.email()\n\t\t\t.required();\n\t\tif (await schema.isValid(val)) {\n\t\t\ttry {\n\t\t\t\tawait checkIfCompanyMemberExists(val)\n\t\t\t\t\t.then(() => (response = false))\n\t\t\t\t\t.catch(() => (response = true));\n\t\t\t} catch (error) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tthis.props.onLoading();\n\t\t\t\t\t\tlet emails = Object.values(values).filter(val => {\n\t\t\t\t\t\t\treturn val !== '';\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcreateInvite(emails, this.props.inviteTypeId).then(() => {\n\t\t\t\t\t\t\tthis.props.onSuccess();\n\t\t\t\t\t\t\tresetForm({\n\t\t\t\t\t\t\t\temail: '',\n\t\t\t\t\t\t\t\temail0: '',\n\t\t\t\t\t\t\t\temail1: '',\n\t\t\t\t\t\t\t\temail2: '',\n\t\t\t\t\t\t\t\temail3: '',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t.required('Email is required!')\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail0: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val1 => this.checkEmail(val1)),\n\t\t\t\t\t\temail1: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail2: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail3: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t})}>\n\t\t\t\t\t{formikProps => {\n\t\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Add Admin Users

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.displayExtraFields()}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tYou can only invite a maximum of 5 people at once!\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t this.addExtraInputField()}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-tooltip={'Add New Field'}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-position='right'>\n\t\t\t\t\t\t\t\t\t\t\t\tadd_box\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default InviteAdmins;\n","import React, { Component } from 'react';\nimport Select from 'react-select';\n\nclass MultiSelect extends Component {\n\thandleChange = value => {\n\t\tconst { onChange, name } = this.props;\n\n\t\tonChange(name, value);\n\t};\n\n\thandleBlur = () => {\n\t\tconst { onBlur, name } = this.props;\n\n\t\tonBlur(name, true);\n\t};\n\n\trender() {\n\t\tconst { id, name, label, placeholder, options, value, isMulti, isDisabled, description, touched, error, isClearable, backspaceRemovesValue } = this.props;\n\t\tconst InputFeedback = ({ children }) => {children};\n\t\tconst DropdownIndicator = () => arrow_drop_down;\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    {label}

    \n\t\t\t\t

    {description}

    \n\t\t\t\t\n\t\t\t\t{touched && error && {error}}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default MultiSelect;\n","import React, { Component } from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport { createNurseInvite, checkIfCompanyMemberExists } from 'api/users';\n\nimport { If, Then, Else } from 'react-if';\nimport Alert from 'components/Alert';\nimport { InviteTypes } from 'constants/enums';\nimport MultiSelect from 'components/Common/FormElements/MultiSelect';\n\nclass InviteNurses extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tconst healthSystemsArr = this.props.healthSystems.map(hs => {\n\t\t\treturn { value: hs.id, label: hs.value };\n\t\t});\n\n\t\tthis.state = {\n\t\t\textraFields: 0,\n\t\t\thealthSystemsArr,\n\t\t};\n\t}\n\n\taddExtraInputField = () => {\n\t\tvar updatedExtraFields = this.state.extraFields + 1;\n\t\tthis.setState({ extraFields: updatedExtraFields });\n\t};\n\n\tdisplayExtraFields = () => {\n\t\tlet table = [];\n\t\tfor (let i = 0; i < this.state.extraFields; i++) {\n\t\t\ttable.push();\n\t\t}\n\t\treturn table;\n\t};\n\n\tasync checkEmail(val) {\n\t\tif (!val) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet response = false;\n\t\tconst schema = Yup.string()\n\t\t\t.email()\n\t\t\t.required();\n\t\tif (await schema.isValid(val)) {\n\t\t\ttry {\n\t\t\t\tawait checkIfCompanyMemberExists(val)\n\t\t\t\t\t.then(() => (response = false))\n\t\t\t\t\t.catch(() => (response = true));\n\t\t\t} catch (error) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}\n\n\tgetRole(inviteType) {\n\t\tswitch (inviteType) {\n\t\t\tcase InviteTypes.VIRTUALCAREPROVIDER.type:\n\t\t\t\treturn InviteTypes.VIRTUALCAREPROVIDER.message;\n\t\t\tcase InviteTypes.VIRTUALSITTER.type:\n\t\t\t\treturn InviteTypes.VIRTUALSITTER.message;\n\t\t\tcase InviteTypes.SUPERUSER.type:\n\t\t\t\treturn InviteTypes.SUPERUSER.message;\n\t\t\t//no default\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tthis.props.onLoading();\n\t\t\t\t\t\tvar emailObjs = [];\n\t\t\t\t\t\tfor (const key of Object.keys(values)) {\n\t\t\t\t\t\t\tif (key !== 'healthSystems' && values[key] !== '') emailObjs.push(values[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcreateNurseInvite(emailObjs, this.props.inviteTypeId, values.healthSystems).then(() => {\n\t\t\t\t\t\t\tthis.props.onSuccess();\n\t\t\t\t\t\t\tresetForm({\n\t\t\t\t\t\t\t\thealthSystems: [],\n\t\t\t\t\t\t\t\temail: '',\n\t\t\t\t\t\t\t\temail0: '',\n\t\t\t\t\t\t\t\temail1: '',\n\t\t\t\t\t\t\t\temail2: '',\n\t\t\t\t\t\t\t\temail3: '',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t.required('Email is required!')\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail0: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val1 => this.checkEmail(val1)),\n\t\t\t\t\t\temail1: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail2: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail3: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\thealthSystems: Yup.string()\n\t\t\t\t\t\t\t.required('Health system is required!')\n\t\t\t\t\t\t\t.nullable(),\n\t\t\t\t\t})}>\n\t\t\t\t\t{formikProps => {\n\t\t\t\t\t\tconst { values, touched, errors, setFieldValue, setFieldTouched } = formikProps;\n\t\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\t\t\t\t\t\tconst role = this.getRole(this.props.inviteTypeId);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Add {role}

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.displayExtraFields()}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tYou can only invite a maximum of 5 people at once!\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t this.addExtraInputField()}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-tooltip={'Add New Field'}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-position='right'>\n\t\t\t\t\t\t\t\t\t\t\t\tadd_box\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default InviteNurses;\n","import React, { Component } from 'react';\n\nimport Pagination from 'components/Common/Pagination';\nimport { Grid, Input, Table, Button, Badge, Modal } from 'components';\n\nimport { getInvitedMembers, updateInviteStatus, createInvite, createNurseInvite, getHealthSystemInvitedUsers } from 'api/users';\nimport { InviteStatuses, InviteTypes, UserRoles } from 'constants/enums';\nimport { formatDate } from 'infrastructure/helpers/dateHelper';\nimport { decodeHtml, getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\nimport { getUserProfile, getUserRole } from 'infrastructure/auth';\n\nclass InvitedUsersList extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\tpageIndex: 0,\n\t\t\ttotalCount: 0,\n\t\t\tinvitedMembers: [],\n\t\t\tloading: true,\n\t\t\tsearchValue: '',\n\t\t\tisCancelModalOpen: false,\n\t\t\tisResendModalOpen: false,\n\t\t\tcurrentInviteId: null,\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tlet response = {};\n\t\tlet healthSystem = getCurrentHealthSystemInfo();\n\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tresponse = await getInvitedMembers();\n\t\t} else {\n\t\t\tresponse = await getHealthSystemInvitedUsers(healthSystem.currentHealthSystemId);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\ttotalCount: response.totalCount,\n\t\t\tinvitedMembers: response.companyInvites,\n\t\t\tcurrentHealthSystemId: healthSystem.currentHealthSystemId,\n\t\t});\n\t}\n\n\tasync onChange(pageSize, pageIndex) {\n\t\tthis.setState({ loading: true });\n\n\t\tlet response = {};\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tresponse = await getInvitedMembers(pageSize.value, pageIndex, this.state.searchValue);\n\t\t} else {\n\t\t\tresponse = await getHealthSystemInvitedUsers(this.state.currentHealthSystemId, pageSize.value, pageIndex, this.state.searchValue);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\tinvitedMembers: response.companyInvites,\n\t\t\tpageSize: pageSize,\n\t\t\tpageIndex: pageIndex,\n\t\t\ttotalCount: response.totalCount,\n\t\t});\n\t}\n\n\tdisplayInvitedUsers() {\n\t\tif (this.state.invitedMembers.length === 0) return [];\n\n\t\treturn this.state.invitedMembers.map(user => {\n\t\t\treturn {\n\t\t\t\temailBox: this.getEmailBox(user.email),\n\t\t\t\tdate: formatDate(new Date(user.dateCreated)),\n\t\t\t\tinvitedBy:\n\t\t\t\t\tuser.inviteTypeId === InviteTypes.ADUSER.type\n\t\t\t\t\t\t? 'AD User'\n\t\t\t\t\t\t: this.getProfileBox(\n\t\t\t\t\t\t\t\tdecodeHtml(`${user.sender.companyUser.firstName} ${user.sender.companyUser.lastName}`),\n\t\t\t\t\t\t\t\tgetUserProfile().userId === user.sender.companyUser.userId\n\t\t\t\t\t\t ),\n\t\t\t\tlocation: user.invitationInfo ? this.getLocation(user.invitationInfo) : 'N/A',\n\t\t\t\tstatus: this.getStatus(user.inviteStatusId),\n\t\t\t\trole: this.getInviteType(user.inviteTypeId),\n\t\t\t\tedit: user.inviteStatusId !== InviteStatuses.ACCEPTED.type && this.getEditButtons(user.id),\n\t\t\t};\n\t\t});\n\t}\n\n\tgetLocation(invitationInfo) {\n\t\tif (invitationInfo.channels && invitationInfo.channels.legnth !== 0) {\n\t\t\treturn invitationInfo.channels\n\t\t\t\t.map(location => {\n\t\t\t\t\treturn location.name;\n\t\t\t\t})\n\t\t\t\t.join(',');\n\t\t}\n\n\t\treturn invitationInfo.teamName;\n\t}\n\n\tgetEditButtons(inviteId) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t this.openModal('isResendModalOpen', inviteId)}>\n\t\t\t\t\t\temail\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t \n\t\t\t\t
    \n\t\t\t\t\t this.openModal('isCancelModalOpen', inviteId)}>\n\t\t\t\t\t\tremove\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n\n\topenModal(type, inviteId) {\n\t\tthis.setState({\n\t\t\t[type]: true,\n\t\t\tcurrentInviteId: inviteId,\n\t\t});\n\t}\n\n\tgetEmailBox(email) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{email}\n\t\t\t
    \n\t\t);\n\t}\n\n\tgetProfileBox(name, current) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t{name} {current && '(You)'}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n\n\tgetInviteType(inviteTypeId) {\n\t\tswitch (inviteTypeId) {\n\t\t\tcase InviteTypes.ADMIN.type: {\n\t\t\t\treturn InviteTypes.ADMIN.message;\n\t\t\t}\n\t\t\tcase InviteTypes.VIRTUALCAREPROVIDER.type: {\n\t\t\t\treturn InviteTypes.VIRTUALCAREPROVIDER.message;\n\t\t\t}\n\t\t\tcase InviteTypes.VIRTUALSITTER.type: {\n\t\t\t\treturn InviteTypes.VIRTUALSITTER.message;\n\t\t\t}\n\t\t\tcase InviteTypes.SUPERUSER.type: {\n\t\t\t\treturn InviteTypes.SUPERUSER.message;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t}\n\n\tgetStatus(inviteStatusId) {\n\t\tswitch (inviteStatusId) {\n\t\t\tcase InviteStatuses.SENT.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase InviteStatuses.ACCEPTED.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase InviteStatuses.PENDING.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase InviteStatuses.CANCELLED.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase InviteStatuses.FAILED.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t}\n\n\thandleSearchChanges = async event => {\n\t\tlet searchValue = event.target.value;\n\t\tthis.setState({ loading: true, pageIndex: 0, searchValue: searchValue });\n\n\t\tif (this.timeout) clearTimeout(this.timeout);\n\t\tthis.timeout = setTimeout(\n\t\t\tasync function() {\n\t\t\t\tlet response = await getInvitedMembers(this.state.pageSize.value, 0, searchValue);\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\tinvitedMembers: response.companyInvites,\n\t\t\t\t\ttotalCount: response.totalCount,\n\t\t\t\t});\n\t\t\t}.bind(this),\n\t\t\t500\n\t\t);\n\t};\n\n\thandleCancelInvite = () => {\n\t\tlet inviteIndex = this.state.invitedMembers.findIndex(invite => invite.id === this.state.currentInviteId);\n\n\t\tupdateInviteStatus(this.state.currentInviteId, InviteStatuses.CANCELLED.type).then(() => {\n\t\t\tlet items = [...this.state.invitedMembers];\n\t\t\tlet item = {\n\t\t\t\t...items[inviteIndex],\n\t\t\t\tinviteStatusId: InviteStatuses.CANCELLED.type,\n\t\t\t};\n\n\t\t\titems[inviteIndex] = item;\n\t\t\tthis.setState({ invitedMembers: items, currentInviteId: null, isCancelModalOpen: false });\n\t\t});\n\t};\n\n\thandleResendInvite = () => {\n\t\tlet inviteIndex = this.state.invitedMembers.findIndex(invite => invite.id === this.state.currentInviteId);\n\t\tlet invite = this.state.invitedMembers.find(i => i.id === this.state.currentInviteId);\n\n\t\tif (invite.inviteTypeId === InviteTypes.ADMIN.type) {\n\t\t\tcreateInvite([invite.email], invite.inviteTypeId).then(() => {\n\t\t\t\tlet items = [...this.state.invitedMembers];\n\t\t\t\tlet item = {\n\t\t\t\t\t...items[inviteIndex],\n\t\t\t\t\tinviteStatusId: InviteStatuses.SENT.type,\n\t\t\t\t};\n\n\t\t\t\titems[inviteIndex] = item;\n\t\t\t\tthis.setState({ invitedMembers: items, currentInviteId: null, isResendModalOpen: false });\n\t\t\t});\n\t\t} else {\n\t\t\tlet healthSystems =\n\t\t\t\tinvite.invitationInfo && invite.invitationInfo.channels\n\t\t\t\t\t? invite.invitationInfo.channels.map(hs => {\n\t\t\t\t\t\t\treturn { value: hs.id, label: hs.name };\n\t\t\t\t\t })\n\t\t\t\t\t: [invite.invitationInfo.teamId];\n\t\t\tcreateNurseInvite([invite.email], invite.inviteTypeId, healthSystems).then(() => {\n\t\t\t\tlet items = [...this.state.invitedMembers];\n\t\t\t\tlet item = {\n\t\t\t\t\t...items[inviteIndex],\n\t\t\t\t\tinviteStatusId: InviteStatuses.SENT.type,\n\t\t\t\t};\n\n\t\t\t\titems[inviteIndex] = item;\n\t\t\t\tthis.setState({ invitedMembers: items, currentInviteId: null, isResendModalOpen: false });\n\t\t\t});\n\t\t}\n\t};\n\n\trender() {\n\t\tconst invitedUsersTableHeaders = [\n\t\t\t{ title: 'Email' },\n\t\t\t{ title: 'Date Sent' },\n\t\t\t{ title: 'Invited By' },\n\t\t\t{ title: 'Health System' },\n\t\t\t{ title: 'Status' },\n\t\t\t{ title: 'Role' },\n\t\t\t{ title: '' },\n\t\t];\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t this.props.toggleSendInvitationsModal(InviteTypes.VIRTUALSITTER.type)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.props.toggleSendInvitationsModal(InviteTypes.VIRTUALCAREPROVIDER.type)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t this.onChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.handleCancelInvite()}\n\t\t\t\t\tonModalClose={() => this.setState({ isCancelModalOpen: false })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Confirmation

    \n\t\t\t\t\t\t

    Are you sure you want to cancel this invitation? The link sent to this invited user will be deactivated and cannot be used any longer.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.handleResendInvite()}\n\t\t\t\t\tonModalClose={() => this.setState({ isResendModalOpen: false })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t

    Are you sure you want to resend this invitation? The user you are inviting will receive another email asking them to join Banyan.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default InvitedUsersList;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\nimport { SectorTypes } from 'constants/enums';\n\nconst OptionsList = ({ options, selectedOptions, onChange, onSelectLocation, selectedId }) => {\n\tconst toggleExpand = (selectedOptionId, isAddingSection) => {\n\t\tif (selectedOptions[selectedOptionId] && !isAddingSection) {\n\t\t\tdelete selectedOptions[selectedOptionId];\n\t\t} else {\n\t\t\tselectedOptions[selectedOptionId] = {};\n\t\t}\n\t\tonChange(selectedOptions);\n\t};\n\n\tconst handleSubOptionsListChange = (optionId, subSelections) => {\n\t\tselectedOptions[optionId] = subSelections;\n\t\tonChange(selectedOptions);\n\t};\n\n\tconst selectOption = option => {\n\t\tonSelectLocation(option);\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t{options.map((option, index) => (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\ttoggleExpand(option.id);\n\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t{selectedOptions[option.id] ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{option.icon}\n\t\t\t\t\t\t\t selectOption(option) : undefined}>\n\t\t\t\t\t\t\t\t{option.name}\n\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t{option.subOptions && selectedOptions[option.id] && (\n\t\t\t\t\t\t handleSubOptionsListChange(option.id, subSelections)}\n\t\t\t\t\t\t\tonSelectLocation={onSelectLocation}\n\t\t\t\t\t\t\tselectedId={selectedId}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t))}\n\t\t
    \n\t);\n};\n\nclass AssignDropdown extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tselectedOptions: this.props.preSelected,\n\t\t};\n\t}\n\n\trender() {\n\t\tvar { selectedOptions } = this.state;\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{this.props.data.length !== 0 ? (\n\t\t\t\t\t
    \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.setState({ selectedOptions });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tselectedOptions={selectedOptions}\n\t\t\t\t\t\t\tselectedId={this.props.selectedId}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t) : (\n\t\t\t\t\t
    \n\t\t\t\t\t\tThis health system does not have any created hospitals. Make sure to create them before assigning nurses!\n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default AssignDropdown;\n","import React from 'react';\n\nconst InputFeedback = ({ children }) => {children};\n\nconst Select = ({ field: { name, onChange, ...field }, form: { touched, errors, setFieldValue }, ...props }) => {\n\tconst error = errors ? errors[name] : '';\n\tconst touch = touched ? touched[name] : '';\n\tfunction _handleChange(e) {\n\t\tsetFieldValue(name, e.target.value);\n\t\tif (props.onChange) {\n\t\t\tprops.onChange(e);\n\t\t}\n\t}\n\treturn (\n\t\t
    \n\t\t\t

    {props.label}

    \n\t\t\t

    {props.description}

    \n\t\t\t\n\t\t\t{touch && error && {error}}\n\t\t
    \n\t);\n};\n\nexport default Select;\n","import React, { Component } from 'react';\nimport Table from 'components/Table';\nimport { findSectorById, getSectorPath } from 'infrastructure/helpers/commonHelpers';\nimport SmallModal from 'components/SmallModal';\nimport AssignDropdown from 'components/UserManagement/AssignDropdown';\nimport { If, Then, Else } from 'react-if';\nimport Grid from 'components/Grid';\nimport Loader from 'components/Loader';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\nimport Select from 'components/Common/FormElements/Select';\nimport Alert from 'components/Alert';\nimport classNames from 'classnames/bind';\nimport { addToHealthSystem, getNurseHealthSystems, getHealthSystemSubTree, assignMember, deleteHealthSystemMember } from 'api/users';\n\nclass ManageHealthSystems extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\thealthsystems: [],\n\t\t\tshowHealthSystemForm: false,\n\t\t\tloadingHealthSystems: false,\n\t\t\tcurrentHealthSystem: {},\n\t\t\tcurrentUserSubTree: [],\n\t\t\tassigningUser: false,\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.setState({ loadingHealthSystems: true });\n\t\tlet healthsystems = await getNurseHealthSystems(this.props.member.memberId);\n\t\tthis.setState({\n\t\t\thealthsystems: healthsystems,\n\t\t\tloadingHealthSystems: false,\n\t\t});\n\t}\n\n\tdisplayHealthSystems() {\n\t\treturn this.state.healthsystems.map(hs => {\n\t\t\treturn {\n\t\t\t\tname: hs.name,\n\t\t\t\tassignation: this.Assignation(hs),\n\t\t\t\tedit: this.getEditButtons(hs.id),\n\t\t\t};\n\t\t});\n\t}\n\n\tgetEditButtons(healthSystemId) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t this.deleteHealthSystem(healthSystemId)}>\n\t\t\t\t\tdelete\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n\n\tdeleteHealthSystem(healthSystemId) {\n\t\tdeleteHealthSystemMember(healthSystemId, this.props.member.memberId).then(() => {\n\t\t\tthis.setState({\n\t\t\t\thealthsystems: this.state.healthsystems.filter(hs => {\n\t\t\t\t\treturn hs.id !== healthSystemId;\n\t\t\t\t}),\n\t\t\t});\n\t\t});\n\t}\n\n\tAssignation = healthSystem => {\n\t\tlet sector = healthSystem.location ? findSectorById(this.state.currentUserSubTree, healthSystem.location.id) : null;\n\t\tlet preselected = !!sector ? getSectorPath(sector) : {};\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    this.getTree(healthSystem)}>\n\t\t\t\t\t{healthSystem.location ? (\n\t\t\t\t\t\thealthSystem.location.name\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\thow_to_regAssign Level\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\t{this.state.currentHealthSystem.id === healthSystem.id && (\n\t\t\t\t\t this.setState({ currentHealthSystem: {} })}>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t this.onSelectLocation(level)}\n\t\t\t\t\t\t\t\t\tdata={this.state.currentUserSubTree}\n\t\t\t\t\t\t\t\t\tpreSelected={preselected}\n\t\t\t\t\t\t\t\t\tselectedId={healthSystem.location ? healthSystem.location.id : null}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t};\n\n\tasync onSelectLocation(level) {\n\t\tthis.setState({ assigningUser: true });\n\t\tlet userId = this.props.member.userInfo.id;\n\t\tlet healthSystemIndex = this.state.healthsystems.findIndex(hs => hs.id === this.state.currentHealthSystem.id);\n\n\t\tassignMember(this.state.currentHealthSystem.id, level.id, userId)\n\t\t\t.then(() => {\n\t\t\t\tlet items = [...this.state.healthsystems];\n\t\t\t\tlet item = {\n\t\t\t\t\t...items[healthSystemIndex],\n\t\t\t\t\tlocation: {\n\t\t\t\t\t\t...items[healthSystemIndex].location,\n\t\t\t\t\t\tid: level.id,\n\t\t\t\t\t\tname: level.name,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\titems[healthSystemIndex] = item;\n\t\t\t\tthis.setState({ healthsystems: items, currentHealthSystem: {}, assigningUser: false });\n\t\t\t})\n\t\t\t.catch(error => console.log(error));\n\t}\n\n\tasync getTree(healthSystem) {\n\t\tthis.setState({ currentHealthSystem: healthSystem, fetchingSubTree: true });\n\t\tlet subtree = await getHealthSystemSubTree(healthSystem.id);\n\t\tthis.setState({ fetchingSubTree: false, currentUserSubTree: subtree });\n\t}\n\n\tgetHealthSystems(allHealthSystems, assignedHealthSystems) {\n\t\treturn allHealthSystems.filter(function(e) {\n\t\t\tlet f = assignedHealthSystems.find(a => a.id == e.id);\n\t\t\treturn f ? false : true;\n\t\t});\n\t}\n\n\trender() {\n\t\tlet usersTableHeaders = [{ title: 'Health System' }, { title: 'Assignation' }, { edit: '' }];\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tif (this.state.showHealthSystemForm) {\n\t\t\t\t\t\tthis.props.onLoading('healthSystemAddition');\n\t\t\t\t\t\taddToHealthSystem(values.healthSystem, this.props.member.memberId).then(res => {\n\t\t\t\t\t\t\tlet healthSystemName = this.props.healthSystems.find(hs => hs.id == values.healthSystem).value;\n\t\t\t\t\t\t\tthis.props.onSuccess('healthSystemAddition');\n\t\t\t\t\t\t\tthis.setState(prevState => ({\n\t\t\t\t\t\t\t\thealthsystems: [...prevState.healthsystems, { id: values.healthSystem, name: healthSystemName }],\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tresetForm({\n\t\t\t\t\t\t\t\thealthSystem: '',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.props.onSuccess('healthSystemAddition');\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tvalidationSchema={() => {\n\t\t\t\t\tif (this.state.showHealthSystemForm) {\n\t\t\t\t\t\treturn Yup.object().shape({\n\t\t\t\t\t\t\thealthSystem: Yup.string().required('Health system is required'),\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}}>\n\t\t\t\t{formikProps => {\n\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Manage Health Systems

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ showHealthSystemForm: !this.state.showHealthSystemForm });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-tooltip={'Add New Health System'}\n\t\t\t\t\t\t\t\tdata-position='right'>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tadd_box\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{this.state.showHealthSystemForm && !this.state.loadingHealthSystems && (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t this.props.onCloseAlert('healthSystemAddition')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t this.props.onCloseAlert('healthSystemAddition')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default ManageHealthSystems;\n","import React from 'react';\nimport { APP_CONFIG } from 'constants/global-variables';\n\nexport const ProfilePicture = props => {\n\treturn (\n\t\t\n\t);\n};\n","import React, { Component } from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\n\nimport { updateNurse, getNurseProfileInfo } from 'api/users';\nimport { decodeHtml } from 'infrastructure/helpers/commonHelpers';\n\nimport { ProfilePicture } from 'components/ProfilePicture';\nimport { Alert, Loader } from 'components';\nimport Select from 'components/Common/FormElements/Select';\nimport Input from 'components/Common/FormElements/Input';\nimport { UserTypes, Roles } from 'constants/enums';\nimport { updateRole } from 'api/roles';\nimport MultiSelect from 'components/Common/FormElements/MultiSelect';\n\nclass UserInformation extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tloading: false,\n\t\t\thealthSystemInputType: this.healthSystemInputTypes.NONE,\n\t\t\tisMemberTitleEnabled: this.props.currentMemberObj.roles[0].id === UserTypes.VIRTUALCAREPROVIDER,\n\t\t\trole: {},\n\t\t};\n\t}\n\n\thealthSystemInputTypes = {\n\t\tNONE: 0,\n\t\tSINGLE: 1,\n\t\tMULTI: 2,\n\t};\n\n\troleHealthSystemTypes = {\n\t\t[Roles.ADMIN.id]: this.healthSystemInputTypes.NONE,\n\t\t[Roles.SUPERUSER.id]: this.healthSystemInputTypes.SINGLE,\n\t\t[Roles.VIRTUALCAREPROVIDER.id]: this.healthSystemInputTypes.MULTI,\n\t\t[Roles.VIRTUALSITTER.id]: this.healthSystemInputTypes.MULTI,\n\t};\n\n\troles = [Roles.VIRTUALCAREPROVIDER, Roles.VIRTUALSITTER, Roles.ADMIN, Roles.SUPERUSER];\n\n\tcomponentDidMount = async () => {\n\t\tlet profileInfo = await getNurseProfileInfo(this.props.currentMemberObj.userInfo.userId);\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\trole: profileInfo.workExperience.length !== 0 ? this.getBanyanRole(profileInfo.workExperience) : {},\n\t\t});\n\t};\n\n\tgetBanyanRole = workExperiences => {\n\t\treturn workExperiences.find(ex => ex.showOnBC && ex.company === 'Banyan');\n\t};\n\n\tgetSelectedHealthSystems = (values, roleId) => {\n\t\tif (roleId === UserTypes.ADMIN) return [];\n\n\t\tif (this.state.healthSystemInputType === this.healthSystemInputTypes.SINGLE) {\n\t\t\treturn [this.props.healthSystems.find(x => x.id === values.healthSystem)];\n\t\t}\n\n\t\treturn values.healthSystems.map(x => ({ id: x.value, value: x.label }));\n\t};\n\n\tonSubmit = async values => {\n\t\tthis.props.onLoading('updateNurse');\n\n\t\ttry {\n\t\t\tconst roleId = parseInt(values.role, 10);\n\t\t\tlet teamIds = null;\n\t\t\tif (this.state.healthSystemInputType === this.healthSystemInputTypes.SINGLE) {\n\t\t\t\tteamIds = [values.healthSystem];\n\t\t\t} else if (this.state.healthSystemInputType === this.healthSystemInputTypes.MULTI) {\n\t\t\t\tteamIds = values.healthSystems.map(x => x.value);\n\t\t\t}\n\n\t\t\tif (parseInt(this.props.currentMemberObj.roles[0].id, 10) !== parseInt(values.role, 10)) {\n\t\t\t\tawait updateRole(this.props.currentMemberObj.memberId, { roleId, teamIds });\n\t\t\t}\n\n\t\t\tconst updateNurseProps = {\n\t\t\t\tfirstName: values.firstName,\n\t\t\t\tlastName: values.lastName,\n\t\t\t\tjobTitle: parseInt(values.role, 10) === UserTypes.VIRTUALCAREPROVIDER ? values.jobTitle : '',\n\t\t\t\trole: values.role,\n\t\t\t};\n\t\t\tawait updateNurse(\n\t\t\t\tupdateNurseProps,\n\t\t\t\tthis.props.currentMemberObj.userInfo.userId,\n\t\t\t\tthis.props.currentMemberObj.userInfo.id,\n\t\t\t\tthis.state.role ? this.state.role.workExperienceId : 0\n\t\t\t);\n\n\t\t\tthis.props.userUpdated(\n\t\t\t\tthis.props.currentMemberObj.userInfo.userId,\n\t\t\t\tvalues.firstName,\n\t\t\t\tvalues.lastName,\n\t\t\t\tthis.roles.find(x => x.id === roleId),\n\t\t\t\tthis.getSelectedHealthSystems(values, roleId)\n\t\t\t);\n\t\t\tthis.props.onSuccess('updateNurse');\n\t\t} catch (e) {\n\t\t\tthis.props.onError('updateNurse');\n\t\t}\n\t};\n\n\tgetValidationForm = () => {\n\t\tlet validation = {\n\t\t\tfirstName: Yup.string()\n\t\t\t\t.trim()\n\t\t\t\t.required('First name cannot be empty')\n\t\t\t\t.min(2, 'First name must be at least two characters')\n\t\t\t\t.max(50, 'First name can have a maximum of 50 characters'),\n\t\t\tlastName: Yup.string()\n\t\t\t\t.trim()\n\t\t\t\t.required('Last name cannot be empty')\n\t\t\t\t.min(2, 'Last name must be at least two characters')\n\t\t\t\t.max(50, 'Last name can have a maximum of 50 characters'),\n\t\t};\n\n\t\tif (this.state.healthSystemInputType === this.healthSystemInputTypes.SINGLE) {\n\t\t\tvalidation.healthSystem = Yup.string().required();\n\t\t} else if (this.state.healthSystemInputType === this.healthSystemInputTypes.MULTI) {\n\t\t\tvalidation.healthSystems = Yup.string().required();\n\t\t}\n\n\t\treturn Yup.object().shape(validation);\n\t};\n\n\tgetRole = id => {\n\t\tswitch (id) {\n\t\t\tcase UserTypes.OWNER: {\n\t\t\t\treturn 'Owner';\n\t\t\t}\n\t\t\tcase UserTypes.ADMIN: {\n\t\t\t\treturn 'Admin';\n\t\t\t}\n\t\t\tcase UserTypes.VIRTUALCAREPROVIDER: {\n\t\t\t\treturn 'Virtual Care Provider';\n\t\t\t}\n\t\t\tcase UserTypes.VIRTUALSITTER: {\n\t\t\t\treturn 'Virtual Sitter';\n\t\t\t}\n\t\t\tcase UserTypes.SUPERUSER: {\n\t\t\t\treturn 'Super User';\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t};\n\n\trender() {\n\t\tif (this.state.loading) {\n\t\t\treturn ;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{formikProps => {\n\t\t\t\t\tconst { values, touched, errors, setFieldValue, setFieldTouched } = formikProps;\n\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Modify {this.getRole(this.props.currentMemberObj.roles[0].id)} Information

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

    {decodeHtml(`${this.props.currentMemberObj.userInfo.firstName} ${this.props.currentMemberObj.userInfo.lastName}`)}

    \n\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t{(this.props.currentMemberObj.roles[0].id === UserTypes.VIRTUALCAREPROVIDER ||\n\t\t\t\t\t\t\t\tthis.props.currentMemberObj.roles[0].id === UserTypes.VIRTUALSITTER) && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\thealthSystemInputType:\n\t\t\t\t\t\t\t\t\t\t\tthis.props.currentMemberObj.roles[0].id === parseInt(value, 10) ? this.healthSystemInputTypes.NONE : this.roleHealthSystemTypes[value],\n\t\t\t\t\t\t\t\t\t\tisMemberTitleEnabled: parseInt(value, 10) === UserTypes.VIRTUALCAREPROVIDER,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tcomponent={Select}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{this.state.healthSystemInputType === this.healthSystemInputTypes.SINGLE && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.state.healthSystemInputType === this.healthSystemInputTypes.MULTI && (\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\treturn { value: hs.id, label: hs.value };\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\tvalue={values.healthSystems}\n\t\t\t\t\t\t\t\t\tisMulti={true}\n\t\t\t\t\t\t\t\t\tonChange={setFieldValue}\n\t\t\t\t\t\t\t\t\tonBlur={setFieldTouched}\n\t\t\t\t\t\t\t\t\ttouched={touched.healthSystems}\n\t\t\t\t\t\t\t\t\terror={errors.healthSystems}\n\t\t\t\t\t\t\t\t\tisClearable={true}\n\t\t\t\t\t\t\t\t\tbackspaceRemovesValue={true}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{this.state.isMemberTitleEnabled && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t this.props.onCloseAlert('updateNurse')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t this.props.onCloseAlert('updateNurse')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default UserInformation;\n","import React from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\n\nimport { editSuperUserHealthSystem } from 'api/users';\nimport { Alert } from 'components';\nimport Select from 'components/Common/FormElements/Select';\nimport { Roles } from 'constants/enums';\n\nconst SuperUserHealthSystem = props => (\n\t
    \n\t\t {\n\t\t\t\tprops.onLoading('healthSystemAddition');\n\t\t\t\tconst pastHealthSystem = props.member.healthSystems.length !== 0 ? props.member.healthSystems[0].id : null;\n\t\t\t\teditSuperUserHealthSystem(props.member.userInfo.id, values.healthSystem, pastHealthSystem).then(res => {\n\t\t\t\t\tprops.userUpdated(props.member.userInfo.userId, props.member.userInfo.firstName, props.member.userInfo.lastName, Roles.SUPERUSER, [\n\t\t\t\t\t\tprops.healthSystems.find(x => x.id === values.healthSystem),\n\t\t\t\t\t]);\n\t\t\t\t\tprops.onSuccess('healthSystemAddition');\n\t\t\t\t});\n\t\t\t}}\n\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\thealthSystem: Yup.string().required('Health system is required!'),\n\t\t\t})}>\n\t\t\t{formikProps => {\n\t\t\t\t// bind the submission handler remotely\n\t\t\t\tprops.bindSubmitForm(formikProps.submitForm);\n\n\t\t\t\treturn (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Edit Super User's Health System

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t props.onCloseAlert('healthSystemAddition')}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t props.onCloseAlert('healthSystemAddition')}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}}\n\t\t\n\t
    \n);\n\nexport default SuperUserHealthSystem;\n","import React, { Component } from 'react';\n\nimport Pagination from 'components/Common/Pagination';\nimport { Grid, Input, Table, Tabs, Button, Badge, Modal } from 'components';\n\nimport { getMembers, deleteMember, getHealthSystemMembers, sendRecoveryEmail } from 'api/users';\nimport { UserTypes, InviteTypes, UserRoles } from 'constants/enums';\nimport { decodeHtml, getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { getUserProfile, getUserRole, getUserId } from 'infrastructure/auth';\nimport moment from 'moment';\n\nimport ManageHealthSystems from 'components/UserManagement/Lists/EditUser/ManageHealthSystems';\nimport UserInformation from 'components/UserManagement/Lists/EditUser/UserInformation';\nimport { SocketContext } from 'io-client/SocketContext';\nimport SocketEvents from 'constants/socket-events';\nimport SuperUserHealthSystem from 'components/UserManagement/Lists/EditUser/SuperUserHealthSystem';\n\nclass UsersList extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\n\t\tthis.state = {\n\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\tpageIndex: 0,\n\t\t\ttotalCount: 0,\n\t\t\tmembers: [],\n\t\t\tloading: true,\n\t\t\tcurrentMemberObj: null,\n\t\t\tcurrentMemberId: null,\n\t\t\tsearchValue: '',\n\t\t\tisDeleteModalOpen: false,\n\t\t\tdeletingMember: false,\n\t\t\tisEditMemberModalOpen: false,\n\t\t\teditingMember: false,\n\t\t\tmanageUsersSelectedTab: 0,\n\t\t\thealthSystemAddition: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t\tupdateNurse: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t\tshowAccountRecoveryModal: false,\n\t\t\taccountRecoveryMailSent: false,\n\t\t\tmemberId: null,\n\t\t\taccountRecoveryMailFailed: false,\n\t\t};\n\n\t\tthis.submitMyForm = null;\n\t\tthis.socket = context;\n\t}\n\n\tasync componentDidMount() {\n\t\tlet response = {};\n\t\tlet healthSystem = getCurrentHealthSystemInfo();\n\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tresponse = await getMembers();\n\t\t} else {\n\t\t\tresponse = await getHealthSystemMembers(healthSystem.currentHealthSystemId);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\tmembers: response.members,\n\t\t\ttotalCount: response.totalCount,\n\t\t\tcurrentHealthSystemId: healthSystem.currentHealthSystemId,\n\t\t});\n\n\t\tthis.socket.on(SocketEvents.Client.ON_NOTIFY_UPDATED_USER_PRESENCE, this.handleUpdatedMemberPresence);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.socket.off(SocketEvents.Client.ON_NOTIFY_UPDATED_USER_PRESENCE, this.handleUpdatedMemberPresence);\n\t}\n\n\thandleSubmitMyForm = e => {\n\t\tif (this.submitMyForm) {\n\t\t\tthis.submitMyForm(e);\n\t\t}\n\t};\n\n\tbindSubmitForm = submitForm => {\n\t\tthis.submitMyForm = submitForm;\n\t};\n\n\thandleDeleteMember = async () => {\n\t\tthis.setState({ deletingMember: true });\n\t\tdeleteMember(this.state.currentMemberId).then(() => {\n\t\t\tthis.setState({\n\t\t\t\tmembers: this.state.members.filter(member => {\n\t\t\t\t\treturn member.memberId !== this.state.currentMemberId;\n\t\t\t\t}),\n\t\t\t\tcurrentMemberId: null,\n\t\t\t\tdeletingMember: false,\n\t\t\t\tisDeleteModalOpen: false,\n\t\t\t});\n\t\t});\n\t};\n\n\tasync onChange(pageSize, pageIndex) {\n\t\tthis.setState({ loading: true });\n\n\t\tlet members = {};\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tmembers = await getMembers(pageSize.value, pageIndex, this.state.searchValue);\n\t\t} else {\n\t\t\tmembers = await getHealthSystemMembers(this.state.currentHealthSystemId, pageSize.value, pageIndex, this.state.searchValue);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\tmembers: members.members,\n\t\t\tpageSize: pageSize,\n\t\t\tpageIndex: pageIndex,\n\t\t\ttotalCount: members.totalCount,\n\t\t});\n\t}\n\n\tgetLocations(locations) {\n\t\tif (locations.length === 0) return 'N/A';\n\n\t\treturn locations\n\t\t\t.map(location => {\n\t\t\t\treturn location.name;\n\t\t\t})\n\t\t\t.join(',');\n\t}\n\n\tgetRoles(roles) {\n\t\tif (roles.length === 1) return this.getRole(roles[0].id);\n\t\treturn roles.map(role => this.getRole(role.id)).join(', ');\n\t}\n\n\tgetRole(id) {\n\t\tswitch (id) {\n\t\t\tcase UserTypes.OWNER: {\n\t\t\t\treturn 'Owner';\n\t\t\t}\n\t\t\tcase UserTypes.ADMIN: {\n\t\t\t\treturn 'Admin';\n\t\t\t}\n\t\t\tcase UserTypes.VIRTUALCAREPROVIDER: {\n\t\t\t\treturn 'Virtual Care Provider';\n\t\t\t}\n\t\t\tcase UserTypes.VIRTUALSITTER: {\n\t\t\t\treturn 'Virtual Sitter';\n\t\t\t}\n\t\t\tcase UserTypes.SUPERUSER: {\n\t\t\t\treturn 'Super User';\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t}\n\n\tisVirtualCarer(roles) {\n\t\tconst vcp = roles.find(role => role.id === UserTypes.VIRTUALCAREPROVIDER || role.id === UserTypes.VIRTUALSITTER);\n\t\tif (typeof vcp === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tisAdmin(roles) {\n\t\tconst admin = roles.find(role => role.id === UserTypes.ADMIN);\n\t\tif (typeof admin === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tonRecoverPassword = async (email, memberId, tokenId) => {\n\t\tconst response = await sendRecoveryEmail(email, memberId, tokenId);\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\taccountRecoveryMailSent: !!response.Result,\n\t\t\t\tmemberId,\n\t\t\t\temail,\n\t\t\t\ttokenId,\n\t\t\t\taccountRecoveryMailFailed: false,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.toggleAccountRecoveryModal();\n\t\t\t}\n\t\t);\n\t};\n\n\tgetInviter = user => {\n\t\tif (user.inviteTypeId === InviteTypes.ADUSER.type) return 'AD User';\n\t\treturn user.inviter\n\t\t\t? this.getProfileBox(decodeHtml(`${user.inviter.firstName} ${user.inviter.lastName}`), getUserProfile().userId === user.inviter.userId)\n\t\t\t: 'N/A';\n\t};\n\n\tdisplayUsers() {\n\t\tif (this.state.members.length === 0) return [];\n\t\treturn this.state.members.map(user => {\n\t\t\tlet presence;\n\t\t\tlet presenceColor;\n\t\t\tif (user.userInfo.presenceStatusTypeId === 1) {\n\t\t\t\tpresence = 'Available';\n\t\t\t\tpresenceColor = 'green';\n\t\t\t} else {\n\t\t\t\tpresence = 'Unavailable';\n\t\t\t\tpresenceColor = 'red';\n\t\t\t}\n\t\t\tconst current = getUserProfile().userId === user.userInfo.userId;\n\t\t\tconst isOwner = user.roles.some(role => role.id === UserTypes.OWNER);\n\t\t\treturn {\n\t\t\t\tprofileBox: this.getProfileBox(decodeHtml(`${user.userInfo.firstName} ${user.userInfo.lastName}`), current),\n\t\t\t\temail: user.userInfo.email,\n\t\t\t\tinvitedBy: this.getInviter(user),\n\t\t\t\tdateInvited: user.dateInvited ? moment(utcToLocalTime(user.dateInvited)).format('MM/DD/YYYY-hh:mm A') : 'N/A',\n\t\t\t\tdateAdded: user.dateAdded ? moment(utcToLocalTime(user.dateAdded)).format('MM/DD/YYYY-hh:mm A') : 'N/A',\n\t\t\t\thealthsystem: user.healthSystems.length > 0 ? this.displayHealthSystems(user.healthSystems) : 'N/A',\n\t\t\t\tstatus: ,\n\t\t\t\trole: this.getRoles(user.roles),\n\t\t\t\tedit:\n\t\t\t\t\t!current &&\n\t\t\t\t\tgetUserRole() === UserRoles.ADMIN &&\n\t\t\t\t\t!isOwner &&\n\t\t\t\t\tthis.getEditButtons(user.memberId, user.roles, user.pendingRecoveryInviteToken, user.userInfo.email, user.inviteTypeId),\n\t\t\t};\n\t\t});\n\t}\n\n\tdisplayHealthSystems(healthsystems) {\n\t\treturn healthsystems.map(hs => hs.name).join(', ');\n\t}\n\n\tgetProfileBox(name, current) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t{name} {current && '(You)'}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n\n\tgetEditButtons(memberId, roles, pendingRecoveryInviteToken, email, inviteTypeId) {\n\t\tconst userId = getUserId();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{pendingRecoveryInviteToken && (\n\t\t\t\t\t this.onRecoverPassword(email, userId, pendingRecoveryInviteToken)}\n\t\t\t\t\t\tdata-tooltip='Send reset password link'\n\t\t\t\t\t\tdata-position='top'>\n\t\t\t\t\t\temail\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{inviteTypeId !== InviteTypes.ADUSER.type && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t this.openEditMemberModal(memberId)}>\n\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t\n\t\t\t\t\t\t this.openDeleteMemberModal(memberId)}>\n\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n\n\topenEditMemberModal(memberId) {\n\t\tlet member = this.state.members.find(m => m.memberId === memberId);\n\t\tthis.setState({\n\t\t\tisEditMemberModalOpen: true,\n\t\t\tcurrentMemberId: memberId,\n\t\t\tcurrentMemberObj: member,\n\t\t\tupdateNurse: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t\thealthSystemAddition: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t});\n\t}\n\n\topenDeleteMemberModal(memberId) {\n\t\tthis.setState({ isDeleteModalOpen: true, currentMemberId: memberId });\n\t}\n\n\thandleSearchChanges = async event => {\n\t\tlet searchValue = event.target.value;\n\t\tthis.setState({ loading: true, pageIndex: 0, searchValue: searchValue });\n\n\t\tif (this.timeout) clearTimeout(this.timeout);\n\t\tthis.timeout = setTimeout(\n\t\t\tasync function() {\n\t\t\t\tlet response = {};\n\t\t\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\t\t\tresponse = await getMembers(this.state.pageSize.value, 0, searchValue);\n\t\t\t\t} else {\n\t\t\t\t\tresponse = await getHealthSystemMembers(this.state.currentHealthSystemId, this.state.pageSize.value, 0, searchValue);\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\tmembers: response.members,\n\t\t\t\t\ttotalCount: response.totalCount,\n\t\t\t\t});\n\t\t\t}.bind(this),\n\t\t\t500\n\t\t);\n\t};\n\n\tonLoading = tab => {\n\t\tthis.setState({\n\t\t\t[tab]: {\n\t\t\t\t...this.state[tab],\n\t\t\t\tloading: true,\n\t\t\t},\n\t\t});\n\t};\n\n\tonSuccess = async tab => {\n\t\tthis.setState({\n\t\t\tloading: true,\n\t\t});\n\t\tlet members = {};\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tmembers = await getMembers(this.state.pageSize.value, this.state.pageIndex, this.state.searchValue);\n\t\t} else {\n\t\t\tmembers = await getHealthSystemMembers(this.state.currentHealthSystemId, this.state.pageSize.value, this.state.pageIndex, this.state.searchValue);\n\t\t}\n\t\tthis.setState({\n\t\t\t[tab]: {\n\t\t\t\t...this.state[tab],\n\t\t\t\tloading: false,\n\t\t\t\tloaded: true,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t\tloading: false,\n\t\t\tmembers: members.members,\n\t\t\ttotalCount: members.totalCount,\n\t\t\tcurrentMemberObj: this.state.members.find(m => m.memberId === this.state.currentMemberObj.memberId),\n\t\t});\n\t};\n\n\tonError = tab => {\n\t\tthis.setState({\n\t\t\t[tab]: {\n\t\t\t\t...this.state[tab],\n\t\t\t\tloading: false,\n\t\t\t\terror: true,\n\t\t\t},\n\t\t});\n\t};\n\n\tonCloseAlert = tab => {\n\t\tthis.setState({\n\t\t\t[tab]: {\n\t\t\t\t...this.state[tab],\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t});\n\t};\n\n\tuserUpdated = (userId, firstName, lastName, role, healthSystems) => {\n\t\tlet userIndex = this.state.members.findIndex(member => member.userInfo.userId === userId);\n\n\t\tlet items = [...this.state.members];\n\t\tconst roles = [role];\n\n\t\tlet item = {\n\t\t\t...items[userIndex],\n\t\t\tuserInfo: {\n\t\t\t\t...items[userIndex].userInfo,\n\t\t\t\tfirstName: firstName,\n\t\t\t\tlastName: lastName,\n\t\t\t},\n\t\t\troles,\n\t\t\thealthSystems,\n\t\t};\n\n\t\titems[userIndex] = item;\n\t\tthis.setState({\n\t\t\tmembers: items,\n\t\t\tcurrentMemberObj: {\n\t\t\t\t...this.state.currentMemberObj,\n\t\t\t\tuserInfo: {\n\t\t\t\t\t...this.state.currentMemberObj.userInfo,\n\t\t\t\t\tfirstName: firstName,\n\t\t\t\t\tlastName: lastName,\n\t\t\t\t},\n\t\t\t\thealthSystems,\n\t\t\t},\n\t\t});\n\t};\n\n\thandleUpdatedMemberPresence = ({ objectId, presenceStatusTypeId }) => {\n\t\tconst { members } = this.state;\n\n\t\tconst member = members.find(({ userInfo }) => userInfo.userId === +objectId);\n\t\tif (!member) {\n\t\t\treturn;\n\t\t}\n\n\t\tmember.userInfo.presenceStatusTypeId = presenceStatusTypeId;\n\n\t\tthis.setState({ members });\n\t};\n\n\ttoggleAccountRecoveryModal = () => {\n\t\tthis.setState({\n\t\t\tshowAccountRecoveryModal: !this.state.showAccountRecoveryModal,\n\t\t});\n\t};\n\n\tsendNewLink = async () => {\n\t\ttry {\n\t\t\tawait sendRecoveryEmail(this.state.email, this.state.memberId, this.state.tokenId);\n\t\t\tthis.toggleAccountRecoveryModal();\n\t\t\tthis.setState({\n\t\t\t\taccountRecoveryMailFailed: false,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthis.setState({\n\t\t\t\taccountRecoveryMailFailed: true,\n\t\t\t});\n\t\t}\n\t};\n\n\trender() {\n\t\tconst usersTableHeaders = [\n\t\t\t{ title: 'User Name' },\n\t\t\t{ title: 'Email' },\n\t\t\t{ title: 'Invited By' },\n\t\t\t{ title: 'Date Invited' },\n\t\t\t{ title: 'Date Added' },\n\t\t\t{ title: 'Health Systems' },\n\t\t\t{ title: 'Status' },\n\t\t\t{ title: 'Role' },\n\t\t\t{ edit: '' },\n\t\t];\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t this.props.toggleSendInvitationsModal(InviteTypes.VIRTUALSITTER.type)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.props.toggleSendInvitationsModal(InviteTypes.VIRTUALCAREPROVIDER.type)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t this.onChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.handleDeleteMember()}\n\t\t\t\t\tonModalClose={() => this.setState({ isDeleteModalOpen: false })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t

    Are you sure you want to delete this member? This member will be removed from all health systems and devices associated with them.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.sendNewLink()}\n\t\t\t\t\tonModalClose={() => this.toggleAccountRecoveryModal()}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.accountRecoveryMailFailed && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Error

    \n\t\t\t\t\t\t\t\t

    Sending the recovery link failed.

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.accountRecoveryMailSent && !this.state.accountRecoveryMailFailed && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Info

    \n\t\t\t\t\t\t\t\t

    A recovery link was already sent. Would you like to send another?

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.state.accountRecoveryMailSent && !this.state.accountRecoveryMailFailed && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Account recovery

    \n\t\t\t\t\t\t\t\t

    Reset password link sent successfully.

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.setState({ isEditMemberModalOpen: false, currentMemberId: null, currentMemberObj: null })}\n\t\t\t\t\tonModalSubmit={this.handleSubmitMyForm}\n\t\t\t\t\tisLoading={this.state.healthSystemAddition.loading || this.state.updateNurse.loading}>\n\t\t\t\t\t{this.state.currentMemberObj !== null &&\n\t\t\t\t\t\t(this.isAdmin(this.state.currentMemberObj.roles) ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t this.setState({ manageUsersSelectedTab: index })}\n\t\t\t\t\t\t\t\tcomponents={[\n\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\tthis.isVirtualCarer(this.state.currentMemberObj.roles) ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nUsersList.contextType = SocketContext;\nexport default UsersList;\n","import React, { Component } from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport { createNurseInvite, checkIfCompanyMemberExists } from 'api/users';\n\nimport { If, Then, Else } from 'react-if';\nimport Select from 'components/Common/FormElements/Select';\nimport Alert from 'components/Alert';\n\nclass InviteSuperUsers extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\textraFields: 0,\n\t\t};\n\t}\n\n\taddExtraInputField = () => {\n\t\tconst updatedExtraFields = this.state.extraFields + 1;\n\t\tthis.setState({ extraFields: updatedExtraFields });\n\t};\n\n\tdisplayExtraFields = () => {\n\t\tconst table = [];\n\t\tfor (let i = 0; i < this.state.extraFields; i++) {\n\t\t\ttable.push();\n\t\t}\n\t\treturn table;\n\t};\n\n\tcheckEmail = async val => {\n\t\tif (!val) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet response = false;\n\t\tconst schema = Yup.string()\n\t\t\t.email()\n\t\t\t.required();\n\t\tif (await schema.isValid(val)) {\n\t\t\ttry {\n\t\t\t\tawait checkIfCompanyMemberExists(val)\n\t\t\t\t\t.then(() => (response = false))\n\t\t\t\t\t.catch(() => (response = true));\n\t\t\t} catch (error) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tthis.props.onLoading();\n\t\t\t\t\t\tconst emailObjs = [];\n\t\t\t\t\t\tObject.keys(values).forEach(key => {\n\t\t\t\t\t\t\tif (key !== 'healthSystem' && values[key] !== '') emailObjs.push(values[key]);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconst healthSystem = this.props.healthSystems.find(hs => hs.id === values.healthSystem);\n\t\t\t\t\t\tcreateNurseInvite(emailObjs, this.props.inviteTypeId, [{ value: healthSystem.id, label: healthSystem.value }]).then(() => {\n\t\t\t\t\t\t\tthis.props.onSuccess();\n\t\t\t\t\t\t\tresetForm({\n\t\t\t\t\t\t\t\thealthSystem: '',\n\t\t\t\t\t\t\t\temail: '',\n\t\t\t\t\t\t\t\temail0: '',\n\t\t\t\t\t\t\t\temail1: '',\n\t\t\t\t\t\t\t\temail2: '',\n\t\t\t\t\t\t\t\temail3: '',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t.required('Email is required!')\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail0: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val1 => this.checkEmail(val1)),\n\t\t\t\t\t\temail1: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail2: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail3: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\thealthSystem: Yup.string().required('Health system is required!'),\n\t\t\t\t\t})}>\n\t\t\t\t\t{formikProps => {\n\t\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Add Super User

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.displayExtraFields()}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tYou can only invite a maximum of 5 people at once!\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t this.addExtraInputField()}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-tooltip={'Add New Field'}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-position='right'>\n\t\t\t\t\t\t\t\t\t\t\t\tadd_box\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default InviteSuperUsers;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as mainLayoutActionCreators } from 'state/mainLayout/actions';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\n\nimport { Grid, Tabs, Modal } from 'components';\nimport InviteAdmins from 'components/UserManagement/InviteAdmins';\nimport Layout from 'components/Common/Layout';\nimport Header from 'components/Common/Header';\nimport InviteNurses from 'components/UserManagement/InviteNurses';\nimport InvitedUsersList from 'components/UserManagement/Lists/InvitedUsersList';\nimport UsersList from 'components/UserManagement/Lists/UsersList';\n\nimport { getHealthSystems } from 'api/users';\nimport { InviteTypes } from 'constants/enums';\nimport InviteSuperUsers from 'components/UserManagement/InviteSuperUsers';\n\nclass Users extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\thealthSystems: [],\n\t\t\tisSendInvitationsModalOpen: false,\n\t\t\tinviteTypeId: 0,\n\t\t\tsendInvitations: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tlet healthSystems = (await getHealthSystems()).map(hs => {\n\t\t\treturn { id: hs.id, value: hs.name };\n\t\t});\n\n\t\tthis.setState({ healthSystems: healthSystems });\n\t}\n\n\tsubmitMyForm = null;\n\n\thandleSubmitMyForm = e => {\n\t\tif (this.submitMyForm) {\n\t\t\tthis.submitMyForm(e);\n\t\t}\n\t};\n\n\tbindSubmitForm = submitForm => {\n\t\tthis.submitMyForm = submitForm;\n\t};\n\n\tonSuccess = () => {\n\t\tthis.setState({\n\t\t\tsendInvitations: {\n\t\t\t\t...this.state.sendInvitations,\n\t\t\t\tloading: false,\n\t\t\t\tloaded: true,\n\t\t\t},\n\t\t});\n\t};\n\n\tonCloseAlert = () => {\n\t\tthis.setState({\n\t\t\tsendInvitations: {\n\t\t\t\t...this.state.sendInvitations,\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t});\n\t};\n\n\tonLoading = () => {\n\t\tthis.setState({\n\t\t\tsendInvitations: {\n\t\t\t\t...this.state.sendInvitations,\n\t\t\t\tloading: true,\n\t\t\t},\n\t\t});\n\t};\n\n\tonModalClose = () => {\n\t\tthis.setState({\n\t\t\tisSendInvitationsModalOpen: !this.state.isSendInvitationsModalOpen,\n\t\t\tinviteTypeId: 0,\n\t\t\tsendInvitations: {\n\t\t\t\t...this.state.sendInvitations,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t});\n\t};\n\n\ttoggleSendInvitationsModal = type => {\n\t\tthis.setState({\n\t\t\tisSendInvitationsModalOpen: !this.state.isSendInvitationsModalOpen,\n\t\t\tinviteTypeId: type,\n\t\t});\n\t};\n\n\tdisplayInviteForm = () => {\n\t\tif (this.state.inviteTypeId === InviteTypes.ADMIN.type) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\tif (this.state.inviteTypeId === InviteTypes.SUPERUSER.type) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    User Management

    \n\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\n\t\t\t\t\n\t\t\t\t\t{this.state.healthSystems.length !== 0 && this.state.inviteTypeId !== 0 && this.displayInviteForm()}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nconst mapStateToProps = state => {\n\treturn {\n\t\tmainLayout: state.mainLayout,\n\t\torganization: state.organization,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\tmainLayoutActions: bindActionCreators(mainLayoutActionCreators, dispatch),\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Users);\n\nexport { Users }; // Exported for unit tests only\n","import React, { Component } from 'react';\nimport Grid from 'components/Grid';\nimport Form from 'components/Form';\nimport Input from 'components/Input';\nimport Button from 'components/Button';\nimport { Redirect } from 'react-router-dom';\nimport { getUserRole } from 'infrastructure/auth';\nimport { UserRoles } from 'constants/enums';\nimport { isAuthenticated, memberExists } from '../infrastructure/auth';\n\nclass Login extends Component {\n\trender() {\n\t\tif (isAuthenticated() && memberExists) {\n\t\t\tif (getUserRole() === UserRoles.VIRTUALSITTER) return ;\n\t\t\treturn ;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tlogo\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tForgot password?\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default Login;\n","import React, { Component } from 'react';\nimport { If, Then, Else } from 'react-if';\n\nimport { Grid, Form, Input, Button } from 'components';\nimport { withRouter } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { bindActionCreators } from 'redux';\nimport { createHealthSystem } from 'api/healthSystems';\nimport { treeSectorNameMaxCharacters } from 'constants/global-variables';\n\nclass CreateHealthSystem extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\thealthSystemName: '',\n\t\t\thealthSystemNameError: '',\n\t\t\thealthSystemRegions: [],\n\t\t\tregionNames: [''],\n\t\t\tisHealthSystemCreated: false,\n\t\t\tisLoading: false,\n\t\t\tregionError: '',\n\t\t};\n\t}\n\n\taddNewRegion = () => {\n\t\tlet newRegionNames = [...this.state.regionNames];\n\t\tnewRegionNames.push('');\n\t\tthis.setState({\n\t\t\tregionNames: newRegionNames,\n\t\t});\n\t};\n\n\tdeleteRegion = index => {\n\t\tlet healthSystemRegions = [...this.state.healthSystemRegions];\n\t\tlet regionNames = [...this.state.regionNames];\n\t\tregionNames[index] = '';\n\t\thealthSystemRegions.splice(index, 1);\n\n\t\tif (this.state.regionNames.length > 1) {\n\t\t\tregionNames.splice(index, 1);\n\t\t}\n\t\tthis.setState({\n\t\t\thealthSystemRegions: healthSystemRegions,\n\t\t\tregionNames: regionNames,\n\t\t\tregionError: '',\n\t\t});\n\t};\n\n\tsetRegions = event => {\n\t\tlet healthSystemRegions = [...this.state.healthSystemRegions];\n\t\tlet regionNames = [...this.state.regionNames];\n\n\t\thealthSystemRegions[event.target.name] = event.target.value;\n\t\tregionNames[event.target.name] = event.target.value;\n\n\t\tthis.setState({\n\t\t\thealthSystemRegions: healthSystemRegions,\n\t\t\tregionNames: regionNames,\n\t\t});\n\t};\n\n\tsetHealthSystemName = event => {\n\t\tthis.setState({\n\t\t\thealthSystemName: event.target.value,\n\t\t});\n\t};\n\n\tgetHealthSystemRegions = () => this.state.healthSystemRegions.map(value => ({ name: value }));\n\n\tcheckIfHealthSystemExists = hsName => this.props.allHealthSystems.some(healthSystem => healthSystem.name.toLowerCase() === hsName.toLowerCase());\n\n\thasDuplicate = () => this.state.healthSystemRegions.length !== new Set(this.state.healthSystemRegions).size;\n\n\thasRegionsValidLength = () => this.state.healthSystemRegions.every(region => region.length <= treeSectorNameMaxCharacters);\n\n\tcreateHealthSystem = async event => {\n\t\tevent.preventDefault();\n\t\tif (this.checkIfHealthSystemExists(this.state.healthSystemName)) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemNameError: 'Health system with this name already exists',\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.state.healthSystemName.length > treeSectorNameMaxCharacters) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemNameError: `Name can't be longer than ${treeSectorNameMaxCharacters} characters`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.hasDuplicate()) {\n\t\t\tthis.setState({\n\t\t\t\tregionError: `Location(s) name can't be duplicated`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.hasRegionsValidLength()) {\n\t\t\tthis.setState({\n\t\t\t\tregionError: `Location(s) name can't be longer than ${treeSectorNameMaxCharacters} characters`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tisLoading: true,\n\t\t});\n\t\tconst healthSystemRegions = this.getHealthSystemRegions();\n\t\tawait createHealthSystem(this.state.healthSystemName, healthSystemRegions);\n\t\tthis.setState({\n\t\t\tisHealthSystemCreated: true,\n\t\t\thealthSystemNameError: '',\n\t\t\tisLoading: false,\n\t\t});\n\t};\n\n\thandleCancelClick = () => {\n\t\tthis.props.history.push('/');\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t
    this.createHealthSystem(event)}>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    Add locations for this health system

    \n\t\t\t\t\t\t\t{this.state.regionNames.map((item, index) => (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.deleteRegion(index)}>\n\t\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t

    {this.state.regionError}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\n\t\t\t\t\t\t

    Your health system profile has been created successfully.

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(CreateHealthSystem));\n","import React from 'react';\nimport Grid from 'components/Grid';\nimport { getUserProfile } from 'infrastructure/auth';\nimport { decodeHtml } from 'infrastructure/helpers/commonHelpers';\nimport { Avatar } from 'components';\n\nfunction signOut() {\n\twindow.location.href = '/logout';\n}\n\nconst LogOutUser = props => (\n\t\n\t\t
    \n\t\t\t

    You are currently logged in as:

    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t

    {decodeHtml(getUserProfile().firstName + ' ' + getUserProfile().lastName)}

    \n\t\t\t
    \n\t\t\t

    Please log out from this account and go back to your email to accept this invitation.

    \n\t\t\t\n\t\t\t\t{' '}\n\t\t\t\tLog out here\n\t\t\t\n\t\t
    \n\t
    \n);\n\nexport default LogOutUser;\n","import React, { Component } from 'react';\nimport * as Yup from 'yup';\nimport { Form, Formik, Field } from 'formik';\nimport queryString from 'query-string';\n\nimport { Grid, Button, Loader } from 'components';\nimport Input from 'components/Common/FormElements/Input';\nimport { Redirect } from 'react-router-dom';\nimport { registerUser, getInvite, checkUserAccount, acceptInvite, sendPasswordRecoveredEmail } from 'api/users';\nimport { OrganizationErrorCodes, GeneralErrorCodes, ChangePasswordUseCases } from 'constants/enums';\nimport { isAuthenticated, getUserProfile } from 'infrastructure/auth';\nimport { passwordRegEx } from 'constants/global-variables';\nimport LogOutUser from './LogOutUser';\n\nclass CompleteProfile extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tinviteId: 0,\n\t\t\temail: '',\n\t\t\tinviteValidation: {\n\t\t\t\tloading: false,\n\t\t\t\tsuccessResponse: {},\n\t\t\t\terror: null,\n\t\t\t},\n\t\t\tsubmitUserRegistration: {\n\t\t\t\tloading: false,\n\t\t\t\terror: false,\n\t\t\t\tsuccess: false,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tconst params = queryString.parse(window.location.search);\n\t\tconst inviteId = params.id;\n\t\tconst email = params.e;\n\t\tconst companyId = params.cid;\n\t\tconst code = params.code ? params.code : '';\n\n\t\tthis.setState({\n\t\t\tinviteId,\n\t\t\temail,\n\t\t\tcompanyId,\n\t\t\tcode,\n\t\t\tinviteValidation: {\n\t\t\t\t...this.state.inviteValidation,\n\t\t\t\tloading: true,\n\t\t\t},\n\t\t});\n\n\t\tif (!isAuthenticated()) {\n\t\t\tgetInvite(inviteId, email)\n\t\t\t\t.then(async response => {\n\t\t\t\t\tconst accountResponse = await checkUserAccount(email);\n\t\t\t\t\tif (accountResponse.exists) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tinviteValidation: {\n\t\t\t\t\t\t\t\t...this.state.inviteValidation,\n\t\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t\t\taccountExists: true,\n\t\t\t\t\t\t\t\texistingUser: accountResponse.user,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tinviteValidation: {\n\t\t\t\t\t\t\t\t...this.state.inviteValidation,\n\t\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t\t\taccountExists: false,\n\t\t\t\t\t\t\t\tresponse: response,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tinviteValidation: {\n\t\t\t\t\t\t\t...this.state.inviteValidation,\n\t\t\t\t\t\t\terror: error.code,\n\t\t\t\t\t\t\terrorMessage: error.message,\n\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t}\n\t}\n\n\tasync submitForm(values) {\n\t\tthis.setState({\n\t\t\tsubmitUserRegistration: {\n\t\t\t\t...this.state.submitUserRegistration,\n\t\t\t\tloading: true,\n\t\t\t},\n\t\t});\n\n\t\tif (!this.state.inviteValidation.accountExists) {\n\t\t\tregisterUser(values, this.state.inviteId, this.state.companyId)\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsubmitUserRegistration: {\n\t\t\t\t\t\t\t...this.state.submitUserRegistration,\n\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsubmitUserRegistration: {\n\t\t\t\t\t\t\t...this.state.submitUserRegistration,\n\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t} else {\n\t\t\tawait Promise.all([acceptInvite(this.state.inviteId, this.state.email), sendPasswordRecoveredEmail(this.state.email, values.password, this.state.code)]);\n\n\t\t\tthis.setState({\n\t\t\t\tsubmitUserRegistration: {\n\t\t\t\t\t...this.state.submitUserRegistration,\n\t\t\t\t\tloading: false,\n\t\t\t\t\tsuccess: true,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tgetAppropriateErrorMessage(error) {\n\t\tswitch (error) {\n\t\t\tcase GeneralErrorCodes.BadRequest: {\n\t\t\t\treturn (\n\t\t\t\t\t

    This is not a valid invitation. Go back to your email and make sure that the link you have clicked is valid, or contact your administrator.

    \n\t\t\t\t);\n\t\t\t}\n\t\t\tcase OrganizationErrorCodes.InviteCancelled: {\n\t\t\t\treturn

    This invitation has been cancelled by the system's administrator. Ask the administrator to reinvite you.

    ;\n\t\t\t}\n\t\t\tcase OrganizationErrorCodes.InviteAlreadyAccepted: {\n\t\t\t\treturn

    This invitation has already been accepted.

    ;\n\t\t\t}\n\t\t\tcase OrganizationErrorCodes.InviteExpired: {\n\t\t\t\treturn

    This invitation has expired. Ask the system's administrator to invite you again.

    ;\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tif (isAuthenticated() && this.state.email === getUserProfile().email) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (isAuthenticated()) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.submitUserRegistration.loading) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t

    Your account is being created. This may take a few minutes!

    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}\n\n\t\tif (this.state.inviteValidation.loading) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\tif (this.state.submitUserRegistration.success) {\n\t\t\treturn ;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tbanyan-logo\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.inviteValidation.error && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\twarning\n\t\t\t\t\t\t\t\t

    {this.state.inviteValidation.errorMessage}

    \n\t\t\t\t\t\t\t\t{this.getAppropriateErrorMessage(this.state.inviteValidation.error)}\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.state.inviteValidation.error && !this.state.inviteValidation.loading && (\n\t\t\t\t\t\t\t this.submitForm(values)}\n\t\t\t\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\t\t\t\tfirstName: Yup.string().required('First name is required'),\n\t\t\t\t\t\t\t\t\tlastName: Yup.string().required('Last name is required'),\n\t\t\t\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t\t\t\t.email()\n\t\t\t\t\t\t\t\t\t\t.required('Email is required'),\n\t\t\t\t\t\t\t\t\tpassword: Yup.string()\n\t\t\t\t\t\t\t\t\t\t.required('Password is required')\n\t\t\t\t\t\t\t\t\t\t.min(8, 'At least 8 characters!')\n\t\t\t\t\t\t\t\t\t\t.max(64, 'No more than 64 characters!')\n\t\t\t\t\t\t\t\t\t\t.matches(passwordRegEx, ChangePasswordUseCases.strongPasswordCheck),\n\t\t\t\t\t\t\t\t\tpasswordConfirm: Yup.string()\n\t\t\t\t\t\t\t\t\t\t.required('Password confirmation is required')\n\t\t\t\t\t\t\t\t\t\t.oneOf([Yup.ref('password')], 'Must match password')\n\t\t\t\t\t\t\t\t\t\t.matches(passwordRegEx, ChangePasswordUseCases.strongPasswordCheck),\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\trender={() => (\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default CompleteProfile;\n","import React from 'react';\n\nconst Help = () => (\n\t
    \n\t\t
    \n\t\t\tBanyan logo\n\t\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\ticon\n\t\t\t\t

    24/7 Support

    \n\t\t\t\t

    If you're encountering any issues, please contact us on the live chat or via email at support@solaborate.com

    \n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default Help;\n","import React, { Component } from 'react';\nimport * as Yup from 'yup';\nimport { Form, Formik, Field } from 'formik';\nimport queryString from 'query-string';\n\nimport Grid from 'components/Grid';\nimport Input from 'components/Common/FormElements/Input';\nimport Button from 'components/Button';\nimport Loader from 'components/Loader';\nimport { sendOrganizationPasswordRecoveryEmail } from 'api/users';\n\nclass Recover extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tloading: false,\n\t\t\tloaded: false,\n\t\t\terror: false,\n\t\t};\n\t}\n\n\tsubmitForm(values) {\n\t\tthis.setState({ loading: true });\n\t\tsendOrganizationPasswordRecoveryEmail(values.email)\n\t\t\t.then(response => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\tloaded: true,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\terror: true,\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tbanyan-logo\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.loading && !this.state.loaded && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.loaded && !this.state.loading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\terror_outline\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tA message with link to reset your password was sent to your email account. Please go to your email account to reset your password.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tIf you don't receive instructions within a minute or two, check your spam and junk filters, or try\n\t\t\t\t\t\t\t\t\t\t this.setState({ loaded: false })}>\n\t\t\t\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t\t\t\tresending your request\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.state.loaded && !this.state.loading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\terror_outline\n\t\t\t\t\t\t\t\t\tPlease enter the email address you used to create your Banyan account, and we will send you a link to reset your password.\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t this.submitForm(values)}\n\t\t\t\t\t\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t\t\t\t\t\t.email()\n\t\t\t\t\t\t\t\t\t\t\t\t.required('Email is required'),\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\trender={() => (\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default Recover;\n","import React, { Component } from 'react';\nimport * as Yup from 'yup';\nimport { Form, Formik, Field } from 'formik';\nimport queryString from 'query-string';\n\nimport Grid from 'components/Grid';\nimport Input from 'components/Common/FormElements/Input';\nimport Button from 'components/Button';\nimport Loader from 'components/Loader';\nimport { sendPasswordRecoveredEmail } from 'api/users';\nimport { Link } from 'react-router-dom';\nimport { passwordRegEx } from 'constants/global-variables';\nimport { ChangePasswordUseCases } from 'constants/enums';\n\nclass ResetPassword extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tloading: false,\n\t\t\tloaded: false,\n\t\t\terror: false,\n\t\t\temail: '',\n\t\t\tc: '',\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst params = queryString.parse(window.location.search);\n\t\tthis.setState({\n\t\t\tc: params.c,\n\t\t\te: params.e,\n\t\t});\n\t}\n\n\tsubmitForm(values) {\n\t\tthis.setState({ loading: true });\n\t\tsendPasswordRecoveredEmail(this.state.e, values.password, this.state.c)\n\t\t\t.then(() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\tloaded: true,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\terror: true,\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tbanyan-logo\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.loading && !this.state.loaded && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.loaded && !this.state.loading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\terror_outline\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tYour Banyan password was successfully changed. Please login again using your new password\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tClick here to go to login page\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.state.loaded && !this.state.loading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\terror_outline\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tTo verify your new password, please enter it once in each field below. Password are case-sensitive and must be at least 8 characters long. A\n\t\t\t\t\t\t\t\t\t\tgood password should contain a mix of capital and lower-case letters, numbers and symbols.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t this.submitForm(values)}\n\t\t\t\t\t\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\t\t\t\t\t\tpassword: Yup.string()\n\t\t\t\t\t\t\t\t\t\t\t\t.required('Password is required')\n\t\t\t\t\t\t\t\t\t\t\t\t.min(8, 'At least 8 characters!')\n\t\t\t\t\t\t\t\t\t\t\t\t.max(64, 'No more than 64 characters!')\n\t\t\t\t\t\t\t\t\t\t\t\t.matches(passwordRegEx, ChangePasswordUseCases.strongPasswordCheck),\n\t\t\t\t\t\t\t\t\t\t\tpasswordConfirm: Yup.string()\n\t\t\t\t\t\t\t\t\t\t\t\t.required('Password confirmation is required')\n\t\t\t\t\t\t\t\t\t\t\t\t.oneOf([Yup.ref('password')], 'Must match password')\n\t\t\t\t\t\t\t\t\t\t\t\t.matches(passwordRegEx, ChangePasswordUseCases.strongPasswordCheck),\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\trender={() => (\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default ResetPassword;\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport function getUserIdleConfigurations({ pageSize = 10, pageIndex = 0, healthSystemId = null, roleId = null }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/user-idle`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t\thealthSystemId,\n\t\t\t\t\troleId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addUserIdleConfiguration(healthSystemIds, roleId, timeoutMinutes) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tconst config = {\n\t\t\thealthSystemIds,\n\t\t\troleId,\n\t\t\ttimeoutMinutes,\n\t\t};\n\t\tgatewayApi\n\t\t\t.post(`v1/healthcare/organizations/${companyId}/configurations/user-idle`, config)\n\t\t\t.then(respnse => {\n\t\t\t\tres(respnse.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getUserIdleConfigurationHistory({ id, pageSize = 10, pageIndex = 0 }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/user-idle/${id}/history`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getUserIdleConfigurationMinutes(healthSystemId, roleId) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`/v1/healthcare/organizations/${companyId}/health-systems/${healthSystemId}/configurations/user-idle/minutes?roleId=${roleId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemHospitals(healthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/organizations/${companyId}/healthsystems/${healthSystemId}/hospitals`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getTeamConfigurations(params) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${APP_CONFIG.companyId}/configurations/tv-device`, {\n\t\t\t\tparams,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addDeviceConfiguration(teamId, data) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`v1/healthcare/organizations/${APP_CONFIG.companyId}/team/${teamId}/configurations/tv-device`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getDeviceConfigurationHistory(teamId, params) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${APP_CONFIG.companyId}/team/${teamId}/configurations/tv-device/history`, {\n\t\t\t\tparams,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteTVDeviceConfiguration(teamId, id) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/team/${teamId}/configurations/tv-device/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getUserIdleConfigurationHealthSystems() {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`/v1/healthcare/organizations/${companyId}/health-systems/configurations/user-idle`, {\n\t\t\t\tparams: {\n\t\t\t\t\tcompanyId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import React from 'react';\nimport { Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport Select from 'components/Common/FormElements/Select';\nimport { Form, Modal, Alert } from 'components';\nimport { addUserIdleConfiguration } from 'api/userIdleConfigurations';\n\nexport default class UserIdleForm extends React.Component {\n\tstate = {\n\t\tisSuccessfulAlertOn: false,\n\t\tisErrorsAlertOn: false,\n\t};\n\n\thandleSubmitMyForm = async (values, { resetForm, setSubmitting }) => {\n\t\tsetSubmitting(true);\n\t\ttry {\n\t\t\tconst healthSystemIds = values.healthSystem === '0' ? this.props.healthSystems.filter(x => x.id !== '0').map(x => x.id) : [values.healthSystem];\n\t\t\tconst roleId = values.role === '0' ? null : parseInt(values.role, 10);\n\t\t\tconst { minutes } = values;\n\n\t\t\tconst res = await addUserIdleConfiguration(healthSystemIds, roleId, minutes);\n\n\t\t\tif (res.hasSucceeded) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisSuccessfulAlertOn: true,\n\t\t\t\t});\n\t\t\t\tthis.props.onSucceeded();\n\n\t\t\t\tif (!this.props.initialValues) {\n\t\t\t\t\tresetForm();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tthis.setState({\n\t\t\t\tisErrorsAlertOn: true,\n\t\t\t});\n\t\t}\n\t\tsetSubmitting(false);\n\t};\n\n\tonCloseModal = () => {\n\t\tthis.setState({\n\t\t\tisSuccessfulAlertOn: false,\n\t\t\tisErrorsAlertOn: false,\n\t\t});\n\t\tthis.props.toggleModal();\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t x.id === this.props.initialValues.healthSystem) ? this.props.initialValues.healthSystem : '',\n\t\t\t\t\t\t\t\trole: this.props.initialValues.role,\n\t\t\t\t\t\t\t\tminutes: this.props.initialValues.minutes,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: { healthSystem: this.props.isSuperUser ? this.props.healthSystems[0].id : '', role: '', minutes: '' }\n\t\t\t\t}\n\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\thealthSystem: Yup.string().required('Health system is required'),\n\t\t\t\t\trole: Yup.string().required('Role is required'),\n\t\t\t\t\tminutes: Yup.number()\n\t\t\t\t\t\t.positive('Minutes must be greater than 0')\n\t\t\t\t\t\t.max(480)\n\t\t\t\t\t\t.required('Minutes are required'),\n\t\t\t\t})}\n\t\t\t\tonSubmit={this.handleSubmitMyForm}>\n\t\t\t\t{props => {\n\t\t\t\t\tconst { handleSubmit, isSubmitting } = props;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    User needs to sign in again after a period of inactivity

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t this.setState({ isSuccessfulAlertOn: false })}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t this.setState({ isErrorsAlertOn: false })}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t);\n\t}\n}\n","import React from 'react';\nimport { Table, Grid, Button } from 'components';\nimport Select from 'react-select';\nimport { getUserIdleConfigurations, getUserIdleConfigurationHealthSystems } from 'api/userIdleConfigurations';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport Pagination from 'components/Common/Pagination';\nimport { Link } from 'react-router-dom';\nimport { getUserRole } from 'infrastructure/auth';\nimport { ConfigHistoryTypes, Roles, UserRoles } from 'constants/enums';\nimport UserIdleForm from './UserIdleForm';\n\nexport default class UserIdleTimeout extends React.Component {\n\tstate = {\n\t\tisLoading: true,\n\t\tisModalOpen: false,\n\t\tuserIdleConfigurations: [],\n\t\ttotalUserIdleConfigs: 0,\n\t\teditConfig: null,\n\t};\n\n\ttransformTypes = {\n\t\tWithValues: 1,\n\t\tWithLabels: 2,\n\t};\n\n\tuserIdleHeaders = [\n\t\t{ title: 'Health System' },\n\t\t{ title: 'Role' },\n\t\t{ title: 'Timeout Minutes' },\n\t\t{ title: 'Created by' },\n\t\t{ title: 'Date Created' },\n\t\t{ title: '' },\n\t];\n\n\trole = null;\n\n\troles = Object.values(Roles);\n\n\tcomponentDidMount = () => {\n\t\tthis.role = getUserRole();\n\t\tthis.getConfigurations();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (\n\t\t\tthis.props.pageIndex !== prevProps.pageIndex ||\n\t\t\tthis.props.selectedHealthSystem !== prevProps.selectedHealthSystem ||\n\t\t\tthis.props.selectedRole !== prevProps.selectedRole\n\t\t) {\n\t\t\tthis.getConfigurations();\n\t\t}\n\t};\n\n\tonHealthSystemSelected = selectedHealthSystem => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedHealthSystem(selectedHealthSystem);\n\t\t\t}\n\t\t);\n\t};\n\n\tonRoleSelected = selectedRole => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedRole(selectedRole);\n\t\t\t}\n\t\t);\n\t};\n\n\tonPaginationChange = (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.onPaginationChange(pageSize, pageIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\tgetConfigurations = async (isSubmitted = false) => {\n\t\tif (this.props.isLoading) {\n\t\t\treturn;\n\t\t}\n\t\tif (isSubmitted) {\n\t\t\tthis.setState({\n\t\t\t\tisLoading: true,\n\t\t\t});\n\t\t}\n\n\t\tconst { userIdleConfigurations, total } = await getUserIdleConfigurations({\n\t\t\tpageSize: this.props.pageSize.value,\n\t\t\tpageIndex: this.props.pageIndex,\n\t\t\thealthSystemId: this.props.selectedHealthSystem.value === '0' ? null : this.props.selectedHealthSystem.value,\n\t\t\troleId: this.props.selectedRole.value === '0' ? null : this.props.selectedRole.value,\n\t\t});\n\n\t\tconst newState = {\n\t\t\tuserIdleConfigurations,\n\t\t\ttotalUserIdleConfigs: total,\n\t\t\tisLoading: false,\n\t\t};\n\n\t\tif (isSubmitted) {\n\t\t\tconst result = await getUserIdleConfigurationHealthSystems();\n\t\t\tnewState.healthSystemsWithConfigs = result.healthSystems;\n\t\t}\n\n\t\tthis.setState(newState);\n\t};\n\n\ttransformArray = (array, type, isHealthSystem = false, propName = 'name') => {\n\t\tif (type === this.transformTypes.WithValues) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { id: item.id, value: item[propName] };\n\t\t\t});\n\t\t\tif (isHealthSystem) {\n\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\tif (type === this.transformTypes.WithLabels) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { value: item.id, label: item[propName] };\n\t\t\t});\n\t\t\tif (isHealthSystem) {\n\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\treturn [];\n\t};\n\n\topenEditModal = config => {\n\t\tthis.setState({\n\t\t\teditConfig: {\n\t\t\t\thealthSystem: config.team.id,\n\t\t\t\trole: config.role.id,\n\t\t\t\tminutes: config.timeoutMinutes,\n\t\t\t},\n\t\t\tisModalOpen: true,\n\t\t});\n\t};\n\n\tgetButtons = config => {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tlist_alt\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t this.openEditModal(config)}>\n\t\t\t\t\tcreate\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t};\n\n\ttransformUserIdleConfigurations = () => {\n\t\treturn this.state.userIdleConfigurations.map(item => {\n\t\t\treturn {\n\t\t\t\thealthSystem: item.team.name,\n\t\t\t\trole: item.role.name,\n\t\t\t\ttimeoutMinutes: item.timeoutMinutes,\n\t\t\t\tcreatedBy: `${item.userCreated.firstName} ${item.userCreated.lastName}`,\n\t\t\t\tdateCreated: moment(utcToLocalTime(item.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tedit: this.getButtons(item),\n\t\t\t};\n\t\t});\n\t};\n\n\trender() {\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t this.onHealthSystemSelected(hs)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onRoleSelected(role)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t this.onPaginationChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.setState({ isModalOpen: !this.state.isModalOpen, editConfig: null })}\n\t\t\t\t\tonSucceeded={() => this.getConfigurations(true)}\n\t\t\t\t/>\n\t\t\t
    \n\t\t);\n\t}\n}\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport function getTeamConfigurationProfiles({ pageSize = 10, pageIndex = 0, teamId = null, teamTypeId = 4 }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/team-profiles`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t\tteamId,\n\t\t\t\t\tteamTypeId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addTeamConfigurationProfile(teamId, teamType, data) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configuration-profiles`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateTeamConfigurationProfile(teamId, teamType, id, data) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configuration-profiles/${id}`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getTeamConfigurationProfilesHisotry({ id, pageSize = 10, pageIndex = 0 }) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/configurations/team-profiles/${id}/history`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteTeamConfigurationProfile(teamId, teamType, id) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configuration-profiles/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import React from 'react';\nimport { Table, Grid, Button, Modal, Form, Input, Select as SelectTag, Loader } from 'components';\nimport Select from 'react-select';\nimport Pagination from 'components/Common/Pagination';\nimport { getHealthSystemHospitals, getTeamConfigurations, addDeviceConfiguration, deleteTVDeviceConfiguration } from 'api/userIdleConfigurations';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { UserRoles, TeamTypes, ConfigHistoryTypes, TVs, TeamConfigurationIntegrationType, TelehealthTv } from 'constants/enums';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { If, Then, Else } from 'react-if';\nimport _ from 'lodash';\nimport { getUserRole } from 'infrastructure/auth';\nimport { Link } from 'react-router-dom';\nimport {\n\taddTeamConfigurationProfile,\n\tdeleteTeamConfigurationProfile,\n\tgetTeamConfigurationProfiles,\n\tupdateTeamConfigurationProfile,\n} from 'api/teamConfigurationProfiles';\nimport { getHopsitalDepartments } from 'api/organization';\n\nclass DeviceConfig extends React.Component {\n\tinitialConfigurationFormData = {\n\t\thealthSystems: this.props.healthSystems,\n\t\thospitals: [],\n\t\tdepartments: [],\n\t\thdmiPorts: [\n\t\t\t{ id: 1, value: 'HDMI 1' },\n\t\t\t{ id: 2, value: 'HDMI 2' },\n\t\t\t{ id: 3, value: 'HDMI 3' },\n\t\t],\n\t\tendCallSource: [\n\t\t\t{ id: 0, value: 'TV Channels' },\n\t\t\t{ id: 1, value: 'HDMI 1' },\n\t\t\t{ id: 2, value: 'HDMI 2' },\n\t\t\t{ id: 3, value: 'HDMI 3' },\n\t\t],\n\t\ttvs: [\n\t\t\t{ id: 1, value: TVs.LG },\n\t\t\t{ id: 2, value: TVs.SAMSUNG },\n\t\t\t{ id: 3, value: TelehealthTv.label },\n\t\t\t{ id: 4, value: TVs.PCARE },\n\t\t\t{ id: 5, value: TVs.CEC },\n\t\t],\n\t\tintegrationTypes: [\n\t\t\t{ id: 0, value: 'TeleHealth' },\n\t\t\t{ id: 1, value: 'pCare' },\n\t\t],\n\t\tselectedHealthSystemValue: -1,\n\t\tselectedHealthSystem: null,\n\n\t\tselectedHospitalValue: -1,\n\t\tselectedHospital: null,\n\n\t\tselectedHdmiPortValue: -1,\n\t\tselectedTVValue: -1,\n\n\t\tselectedEndCallSource: -1,\n\n\t\tselectedDepartment: null,\n\t\tselectedDepartmentValue: -1,\n\n\t\tselectedTeamProfileValue: -1,\n\t\tselectedTeamProfile: null,\n\n\t\tringtoneVolumeValue: 0,\n\t\tselectedId: null,\n\t\tselectedIntegrationTypeValue: 0,\n\t\tprofileName: '',\n\t\turl: '',\n\t\tport: '',\n\t\thsSecret: '',\n\t\tuserName: '',\n\n\t\tisEdit: false,\n\t\terrors: {\n\t\t\thealthSystemError: null,\n\t\t\thospitalError: null,\n\t\t\tdepartmentError: null,\n\t\t\thdmiPortError: null,\n\t\t\tendCallSourceError: null,\n\t\t\tringtoneVolumeError: null,\n\t\t\tprofileNameError: null,\n\t\t\turlError: null,\n\t\t\tportError: null,\n\t\t\thsSecretError: null,\n\t\t\tteamProfileError: null,\n\t\t\ttvError: null,\n\t\t},\n\n\t\tisSecretChanged: false,\n\t\tnewSecret: '',\n\t\tisHospitalLoading: false,\n\t\tisDepartmentLoading: false,\n\t};\n\n\tstate = {\n\t\tisLoading: true,\n\t\tshowConfigurationModal: false,\n\t\thospitals: [],\n\t\tdepartments: [],\n\t\tteamProfiles: [],\n\t\tisHospitalDropdownDisabled: true,\n\t\tisDepartmentDropdownDisabled: true,\n\t\tconfigurations: [],\n\t\thealthSystemConfigs: [],\n\t\tisFormLoading: false,\n\t\ttotalConfigs: null,\n\t\tisDeleteConfigModalOpen: false,\n\t\tdeleteConfig: null,\n\t\tconfigurationFormData: _.cloneDeep(this.initialConfigurationFormData),\n\t};\n\n\tdeviceConfigHeaders = [\n\t\t{ title: 'Health System' },\n\t\t{ title: 'Hospital' },\n\t\t{ title: 'Department' },\n\t\t{ title: 'HDMI Port' },\n\t\t{ title: 'Default Source' },\n\t\t{ title: 'Ringtone Volume' },\n\t\t{ title: 'TV' },\n\t\t{ title: 'Profile Name' },\n\t\t{ title: 'Created by' },\n\t\t{ title: 'Date Created' },\n\t\t{ title: '' },\n\t];\n\n\thealthSystemConfigHeaders = [\n\t\t{ title: 'Health System' },\n\t\t{ title: 'Profile Name' },\n\t\t{ title: 'URL' },\n\t\t{ title: 'Port' },\n\t\t{ title: 'Date Created' },\n\t\t{ title: '' },\n\t];\n\n\trole = null;\n\n\ttransformTypes = {\n\t\tWithValues: 1,\n\t\tWithLabels: 2,\n\t};\n\n\tactiveSubTab = {\n\t\tHealthSystem: 0,\n\t\tTV: 1,\n\t};\n\n\tendCallSource = {\n\t\t0: 'TV Channels',\n\t\t1: 'HDMI 1',\n\t\t2: 'HDMI 2',\n\t\t3: 'HDMI 3',\n\t};\n\n\tcomponentDidMount = () => {\n\t\tthis.role = getUserRole();\n\t\tthis.getTeamProfiles();\n\t\tthis.getConfigurations();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (\n\t\t\tthis.props.pageIndex !== prevProps.pageIndex ||\n\t\t\tthis.props.selectedHealthSystem !== prevProps.selectedHealthSystem ||\n\t\t\tthis.props.selectedHospitalId !== prevProps.selectedHospitalId ||\n\t\t\tthis.props.selectedDepartmentId !== prevProps.selectedDepartmentId ||\n\t\t\tthis.props.activeSubTab !== prevProps.activeSubTab\n\t\t) {\n\t\t\tthis.getConfigurations();\n\t\t\tthis.getTeamProfiles();\n\t\t}\n\t};\n\n\tgetTeamProfiles = async () => {\n\t\tconst response = await getTeamConfigurationProfiles({\n\t\t\tpageSize: 999, // TO DO: Apply pagination\n\t\t\tpageIndex: 0,\n\t\t\tteamTypeId: TeamTypes.HEALTHSYSTEM,\n\t\t});\n\n\t\tthis.setState({\n\t\t\tteamProfiles: response.teamConfigurationProfiles.map(config => ({ id: config.id, value: config.profileName })),\n\t\t});\n\t};\n\n\tgetHospitals = async healthSystem => {\n\t\tlet hospitals;\n\t\tif (healthSystem.value !== '0') {\n\t\t\thospitals = await this.getHealthSystemHospitals(healthSystem.value);\n\t\t\thospitals.unshift({ value: 0, label: 'All' });\n\t\t}\n\t\tthis.setState({\n\t\t\tisHospitalDropdownDisabled: healthSystem.value === '0',\n\t\t\tisDepartmentDropdownDisabled: healthSystem.value === '0' ? true : this.state.isDepartmentDropdownDisabled,\n\t\t\thospitals,\n\t\t});\n\t};\n\n\tgetDepartments = async (healthSystem, hospitalId) => {\n\t\tlet departments;\n\t\tif (healthSystem.value !== '0' && hospitalId !== 0) {\n\t\t\tconst { hospital } = await getHopsitalDepartments(healthSystem.value, hospitalId);\n\t\t\tdepartments = hospital.departments.map(department => ({ value: department.id, label: department.name }));\n\t\t\tdepartments.unshift({ value: 0, label: 'All' });\n\t\t}\n\t\tthis.setState({\n\t\t\tisDepartmentDropdownDisabled: healthSystem.value === '0' || hospitalId === 0,\n\t\t\tdepartments,\n\t\t});\n\t};\n\n\tgetConfigurations = async () => {\n\t\tif (this.props.isLoading) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { selectedHealthSystem, selectedHospitalId, selectedDepartmentId } = this.props;\n\t\tlet hsId = null;\n\t\tif (selectedHealthSystem && selectedHealthSystem.value !== '0') {\n\t\t\thsId = selectedHealthSystem.value;\n\t\t}\n\n\t\tif (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\tconst response = await getTeamConfigurations({\n\t\t\t\thealthSystemId: hsId,\n\t\t\t\thospitalId: selectedHospitalId || null,\n\t\t\t\tdepartmentId: selectedDepartmentId || null,\n\t\t\t\tpageSize: this.props.pageSize.value,\n\t\t\t\tpageIndex: this.props.pageIndex,\n\t\t\t\tteamTypeId: TeamTypes.HOSPITAL,\n\t\t\t});\n\t\t\tif (selectedHealthSystem) {\n\t\t\t\tawait this.getHospitals(selectedHealthSystem);\n\t\t\t}\n\t\t\tif (selectedHealthSystem && selectedHospitalId) {\n\t\t\t\tawait this.getDepartments(selectedHealthSystem, selectedHospitalId);\n\t\t\t}\n\n\t\t\tthis.getDeviceConfigurations(response.deviceConfigurations);\n\t\t\tthis.setState({\n\t\t\t\ttotalConfigs: response.total,\n\t\t\t});\n\t\t} else {\n\t\t\tconst response = await getTeamConfigurationProfiles({\n\t\t\t\tpageSize: this.props.pageSize.Value,\n\t\t\t\tpageIndex: this.props.pageIndex,\n\t\t\t\tteamId: hsId,\n\t\t\t\tteamTypeId: TeamTypes.HEALTHSYSTEM,\n\t\t\t});\n\n\t\t\tthis.getHealthSystemConfigs(response.teamConfigurationProfiles);\n\t\t\tthis.setState({\n\t\t\t\ttotalConfigs: response.total,\n\t\t\t});\n\t\t}\n\t};\n\n\ttransformHealthSystemsForSelect = healthSystems => {\n\t\treturn healthSystems.map(healthSystem => {\n\t\t\treturn { label: healthSystem.name, value: healthSystem.id };\n\t\t});\n\t};\n\n\tgetHealthSystemHospitals = async healthSystemId => {\n\t\tconst firstHSHospitals = await getHealthSystemHospitals(healthSystemId);\n\t\treturn this.transformHealthSystemsForSelect(firstHSHospitals);\n\t};\n\n\tonHospitalSelect = async selection => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedHospital(selection);\n\t\t\t}\n\t\t);\n\t};\n\n\tonDepartmentSelect = async selection => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedDepartment(selection);\n\t\t\t}\n\t\t);\n\t};\n\n\tgetHospitalConfigurations = async (healthSystemId, hospitalId, pageSize, pageIndex = 0) => {\n\t\tconst response = await getTeamConfigurations({\n\t\t\thealthSystemId: healthSystemId,\n\t\t\tteamId: hospitalId,\n\t\t\tpageSize: pageSize || 10,\n\t\t\tpageIndex: pageIndex,\n\t\t\tteamTypeId: TeamTypes.HOSPITAL,\n\t\t});\n\t\treturn response;\n\t};\n\n\tonHealthSystemSelect = async selection => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedHealthSystem(selection);\n\t\t\t}\n\t\t);\n\t};\n\n\tonFormHealthSystemSelect = async ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\t\tif (configurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData: { ...configurationFormData, isHospitalLoading: true },\n\t\t});\n\n\t\tconfigurationFormData.selectedHealthSystemValue = configurationFormData.healthSystems.findIndex(hs => id === hs.id);\n\t\tconfigurationFormData.selectedHealthSystem = configurationFormData.healthSystems.find(hs => id === hs.id);\n\t\tconfigurationFormData.isHospitalLoading = false;\n\t\tif (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\tconst hsHospitals = await getHealthSystemHospitals(id);\n\t\t\tconfigurationFormData.hospitals = hsHospitals.map(hospital => ({ id: hospital.id, value: hospital.name }));\n\t\t\tconfigurationFormData.selectedHospital = null;\n\t\t\tconfigurationFormData.selectedHospitalValue = -1;\n\t\t\tconfigurationFormData.selectedDepartment = null;\n\t\t\tconfigurationFormData.selectedDepartmentValue = -1;\n\t\t}\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormHospitalSelect = async ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\t\tif (configurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tconfigurationFormData: { ...configurationFormData, isDepartmentLoading: true },\n\t\t});\n\t\tconfigurationFormData.selectedHospitalValue = configurationFormData.hospitals.findIndex(hospital => id === hospital.id);\n\t\tconfigurationFormData.errors.hospitalError = null;\n\n\t\tconst { hospital } = await getHopsitalDepartments(configurationFormData.selectedHealthSystem.id, id);\n\n\t\tconfigurationFormData.departments = hospital.departments.map(department => ({ id: department.id, value: department.name }));\n\t\tconfigurationFormData.selectedDepartment = null;\n\t\tconfigurationFormData.selectedDepartmentValue = -1;\n\t\tconfigurationFormData.isDepartmentLoading = false;\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormDepartmentSelect = ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\t\tif (configurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\n\t\tconfigurationFormData.selectedDepartmentValue = configurationFormData.departments.findIndex(dep => id === dep.id);\n\t\tconfigurationFormData.selectedDepartment = configurationFormData.departments.find(hs => id === hs.id);\n\t\tconfigurationFormData.errors.departmentError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormTeamProfileSelect = ({ id }) => {\n\t\tconst { configurationFormData, teamProfiles } = this.state;\n\t\tconfigurationFormData.selectedTeamProfileValue = teamProfiles.findIndex(profile => id === profile.id);\n\t\tconfigurationFormData.selectedTeamProfile = teamProfiles.find(profile => id === profile.id);\n\t\tconfigurationFormData.errors.teamProfileError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormHdmiPortSelect = event => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData.selectedHdmiPortValue = +event.target.value;\n\t\tconfigurationFormData.errors.hdmiPortError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonEndCallSourceSelect = event => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData.selectedEndCallSource = +event.target.value;\n\t\tconfigurationFormData.errors.endCallSourceError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormTVSelect = ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData.selectedTVValue = configurationFormData.tvs.findIndex(tv => id === tv.id);\n\t\tconfigurationFormData.errors.tvError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormRingtoneVolumeChange = event => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData.ringtoneVolumeValue = event.target.value;\n\n\t\tconfigurationFormData.errors.ringtoneVolumeError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\taddDeviceConfiguration = async () => {\n\t\tconst { configurationFormData } = this.state;\n\t\tlet hasError = false;\n\n\t\tif (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\tif (!configurationFormData.isEdit) {\n\t\t\t\tif (configurationFormData.selectedHospitalValue === -1 && !configurationFormData.selectedHospital) {\n\t\t\t\t\tconfigurationFormData.errors.hospitalError = 'Please select a hospital.';\n\t\t\t\t\thasError = true;\n\t\t\t\t}\n\n\t\t\t\tif (configurationFormData.selectedDepartmentValue === -1 && !configurationFormData.selectedDepartment) {\n\t\t\t\t\tconfigurationFormData.errors.departmentError = 'Please select a department.';\n\t\t\t\t\thasError = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (configurationFormData.selectedHdmiPortValue === -1) {\n\t\t\t\tconfigurationFormData.errors.hdmiPortError = 'Please select a HDMI port.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tif (configurationFormData.selectedTVValue === -1) {\n\t\t\t\tconfigurationFormData.errors.tvError = 'Please select a TV.';\n\t\t\t\thasError = true;\n\t\t\t}\n\t\t\tconst ringtoneVolumeNumber = +configurationFormData.ringtoneVolumeValue;\n\t\t\tif (Number.isNaN(ringtoneVolumeNumber) || ringtoneVolumeNumber < 0 || ringtoneVolumeNumber > 100) {\n\t\t\t\tconfigurationFormData.errors.ringtoneVolumeError = 'Ringtone volume must be in between 0 and 100.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tif (configurationFormData.selectedEndCallSource === -1) {\n\t\t\t\tconfigurationFormData.errors.endCallSourceError = 'Please select a TV End Call Source.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tif (hasError) {\n\t\t\t\tthis.setState({ configurationFormData });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst hdmiPort = configurationFormData.selectedHdmiPortValue;\n\t\t\tconst departmentId = configurationFormData.selectedDepartment.id;\n\t\t\tconst teamConfigurationProfileId = configurationFormData.selectedTeamProfile ? configurationFormData.selectedTeamProfile.id : null;\n\t\t\tconst { id: defaultSource } = configurationFormData.endCallSource[configurationFormData.selectedEndCallSource];\n\t\t\tconst tv =\n\t\t\t\tconfigurationFormData.selectedTVValue + 1 === TelehealthTv.id\n\t\t\t\t\t? TelehealthTv.value\n\t\t\t\t\t: configurationFormData.tvs[configurationFormData.selectedTVValue].value;\n\n\t\t\tthis.setState({ isFormLoading: true });\n\n\t\t\tconst { hasSucceeded } = await addDeviceConfiguration(departmentId, {\n\t\t\t\tteamTypeId: TeamTypes.DEPARTMENT,\n\t\t\t\tdefaultSource,\n\t\t\t\thdmiPort,\n\t\t\t\tringtoneVolume: ringtoneVolumeNumber,\n\t\t\t\tteamConfigurationProfileId: teamConfigurationProfileId,\n\t\t\t\ttv,\n\t\t\t});\n\n\t\t\tif (!hasSucceeded) {\n\t\t\t\tthis.setState({ isFormLoading: false });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tawait this.resetAddConfigurationModal();\n\t\t} else {\n\t\t\tif (!configurationFormData.isEdit) {\n\t\t\t\tif (configurationFormData.selectedHealthSystemValue === -1) {\n\t\t\t\t\tconfigurationFormData.errors.healthSystemError = 'Please select a health system.';\n\t\t\t\t\thasError = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (configurationFormData.profileName === '') {\n\t\t\t\tconfigurationFormData.errors.profileNameError = 'Please set a profile name.';\n\t\t\t\thasError = true;\n\t\t\t}\n\t\t\tif (configurationFormData.userName === '' && configurationFormData.selectedIntegrationTypeValue === 1) {\n\t\t\t\tconfigurationFormData.errors.userNameError = 'Please set a username.';\n\t\t\t\thasError = true;\n\t\t\t}\n\t\t\tif (configurationFormData.url === '') {\n\t\t\t\tconfigurationFormData.errors.urlError = 'Please set a URL.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tlet newSecretKey = configurationFormData.newSecret;\n\n\t\t\tif (!newSecretKey) {\n\t\t\t\tnewSecretKey = '';\n\t\t\t}\n\n\t\t\tconst secretKeyWoSpaces = newSecretKey.trim();\n\n\t\t\tif ((!configurationFormData.hsSecret && !secretKeyWoSpaces) || (configurationFormData.isSecretChanged && !secretKeyWoSpaces)) {\n\t\t\t\tconfigurationFormData.errors.hsSecretError = 'Please set a secret.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tlet port = null;\n\t\t\tif (configurationFormData.port) {\n\t\t\t\tport = +configurationFormData.port;\n\t\t\t}\n\t\t\tif (!port) {\n\t\t\t\tconfigurationFormData.errors.portError = 'Port is required';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tif (hasError) {\n\t\t\t\tthis.setState({ configurationFormData });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.setState({ isFormLoading: true });\n\n\t\t\tif (!configurationFormData.isEdit) {\n\t\t\t\tconst response = await addTeamConfigurationProfile(configurationFormData.selectedHealthSystem.id, TeamTypes.HEALTHSYSTEM, {\n\t\t\t\t\tprofileName: configurationFormData.profileName,\n\t\t\t\t\turl: configurationFormData.url,\n\t\t\t\t\tport: parseInt(configurationFormData.port, 10),\n\t\t\t\t\tsecret: window.btoa(`${configurationFormData.userName}:${configurationFormData.newSecret}`),\n\t\t\t\t\tintegrationTypeId:\n\t\t\t\t\t\tconfigurationFormData.selectedIntegrationTypeValue === 0 ? TeamConfigurationIntegrationType.TELEHEALTH : TeamConfigurationIntegrationType.PCARE,\n\t\t\t\t});\n\n\t\t\t\tif (!response.hasSucceeded || response.error) {\n\t\t\t\t\tthis.setState({ isFormLoading: false });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst { hasSucceeded } = await updateTeamConfigurationProfile(\n\t\t\t\t\tconfigurationFormData.selectedHealthSystem.id,\n\t\t\t\t\tTeamTypes.HEALTHSYSTEM,\n\t\t\t\t\tconfigurationFormData.selectedId,\n\t\t\t\t\t{\n\t\t\t\t\t\tprofileName: configurationFormData.profileName,\n\t\t\t\t\t\turl: configurationFormData.url,\n\t\t\t\t\t\tport: parseInt(configurationFormData.port, 10),\n\t\t\t\t\t\tsecret: configurationFormData.isSecretChanged\n\t\t\t\t\t\t\t? window.btoa(`${configurationFormData.userName}:${configurationFormData.newSecret}`)\n\t\t\t\t\t\t\t: window.btoa(`${configurationFormData.userName}:${configurationFormData.hsSecret}`),\n\t\t\t\t\t\tintegrationTypeId:\n\t\t\t\t\t\t\tconfigurationFormData.selectedIntegrationTypeValue === 0 ? TeamConfigurationIntegrationType.TELEHEALTH : TeamConfigurationIntegrationType.PCARE,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif (!hasSucceeded) {\n\t\t\t\t\tthis.setState({ isFormLoading: false });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait this.resetAddConfigurationModal();\n\t\t}\n\t\tthis.getConfigurations();\n\t};\n\n\tresetAddConfigurationModal = () => {\n\t\treturn new Promise(res => {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tconfigurationFormData: _.cloneDeep(this.initialConfigurationFormData),\n\t\t\t\t\tshowConfigurationModal: false,\n\t\t\t\t\tisFormLoading: false,\n\t\t\t\t},\n\t\t\t\t() => res()\n\t\t\t);\n\t\t});\n\t};\n\n\tgetDeviceConfigurations = configurations => {\n\t\tif (!configurations.length) {\n\t\t\tthis.setState({\n\t\t\t\tconfigurations: [],\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst transformConfigs = configurations.map(config => ({\n\t\t\thealthSystem: config.team.healthSystemName,\n\t\t\thospitalName: config.team.hospitalName,\n\t\t\thospital: config.team.name, // Department\n\t\t\thdmiPort: config.hdmiPort,\n\t\t\tdefaultSource: this.endCallSource[config.defaultSource],\n\t\t\tringtoneVolume: config.ringtoneVolume,\n\t\t\ttv: config.tv === TelehealthTv.value ? TelehealthTv.label : config.tv,\n\t\t\tprofileName: config.teamConfigurationProfile ? config.teamConfigurationProfile.profileName : '',\n\t\t\tcreatedBy: `${config.userCreated.firstName} ${config.userCreated.lastName}`,\n\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\tactions: (\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tlist_alt\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t this.toggleConfigurationModal(config)}>\n\t\t\t\t\t\tcreate\n\t\t\t\t\t\n\t\t\t\t\t this.openDeleteModal(config)}>\n\t\t\t\t\t\tdelete\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t),\n\t\t}));\n\t\tthis.setState({\n\t\t\tconfigurations: transformConfigs,\n\t\t\tisLoading: false,\n\t\t});\n\t};\n\n\ttoggleConfigurationModal = async (config = null) => {\n\t\tconst { showConfigurationModal, configurationFormData, teamProfiles } = this.state;\n\t\tif (!showConfigurationModal) {\n\t\t\tthis.props.pushFiltersToQueryString();\n\t\t\tconfigurationFormData.isEdit = !!config;\n\t\t\tconfigurationFormData.healthSystems = this.props.allHealthSystems.map(hs => ({ id: hs.id, value: hs.name }));\n\t\t\tif (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\t\tif (this.role === UserRoles.SUPERUSER) {\n\t\t\t\t\tthis.onFormHealthSystemSelect(configurationFormData.healthSystems[0]);\n\t\t\t\t}\n\n\t\t\t\tif (configurationFormData.isEdit) {\n\t\t\t\t\t//\n\t\t\t\t\tconfigurationFormData.selectedDepartment = config.team;\n\t\t\t\t\tconfigurationFormData.selectedHdmiPortValue = configurationFormData.hdmiPorts.find(port => config.hdmiPort === port.id).id;\n\t\t\t\t\tconfigurationFormData.selectedEndCallSource = configurationFormData.endCallSource.find(ds => config.defaultSource === ds.id).id;\n\t\t\t\t\tconfigurationFormData.ringtoneVolumeValue = config.ringtoneVolume;\n\t\t\t\t\tconfigurationFormData.selectedTeamProfileValue = teamProfiles.findIndex(p => config.teamConfigurationProfileId === p.id);\n\t\t\t\t\tconfigurationFormData.selectedTeamProfile = teamProfiles.find(p => config.teamConfigurationProfileId === p.id);\n\t\t\t\t\tconfigurationFormData.selectedTVValue = configurationFormData.tvs.findIndex(t =>\n\t\t\t\t\t\tconfig.tv === TelehealthTv.value ? TelehealthTv.label === t.value : config.tv === t.value\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tconfigurationFormData,\n\t\t\t\t\tshowConfigurationModal: !showConfigurationModal,\n\t\t\t\t});\n\t\t\t} else if (configurationFormData.isEdit) {\n\t\t\t\tconst isBase64 = /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/;\n\t\t\t\tif (config.secret.match(isBase64)) {\n\t\t\t\t\tconst decodedSecret = window.atob(config.secret);\n\t\t\t\t\tconst userData = decodedSecret.split(':');\n\t\t\t\t\tif (!userData || window.atob(config.secret).split(':').length < 2) {\n\t\t\t\t\t\tconfigurationFormData.newSecret = '';\n\t\t\t\t\t\tconfigurationFormData.hsSecret = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t[configurationFormData.userName, configurationFormData.hsSecret] = userData;\n\t\t\t\t\t\tconfigurationFormData.newSecret = `${userData[1].slice(0, 3)}************`;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconfigurationFormData.hsSecret = config.secret;\n\t\t\t\t\tconfigurationFormData.newSecret = `${config.secret.slice(0, 3)}************`;\n\t\t\t\t}\n\t\t\t\tconfigurationFormData.selectedHealthSystem = config.team;\n\t\t\t\tconfigurationFormData.profileName = config.profileName;\n\t\t\t\tconfigurationFormData.port = config.port;\n\t\t\t\tconfigurationFormData.url = config.url;\n\t\t\t\tconfigurationFormData.selectedId = config.id;\n\t\t\t\tconfigurationFormData.selectedIntegrationTypeValue = config.integrationTypeId === TeamConfigurationIntegrationType.TELEHEALTH ? 0 : 1;\n\t\t\t\tthis.setState({\n\t\t\t\t\tconfigurationFormData,\n\t\t\t\t\tshowConfigurationModal: !showConfigurationModal,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\tshowConfigurationModal: !showConfigurationModal,\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tthis.resetAddConfigurationModal();\n\t\t}\n\t};\n\n\tonPaginationChange = async (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.onPaginationChange(pageSize, pageIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\ttransformArray = (array, type, isHealthSystem) => {\n\t\tif (type === this.transformTypes.WithValues) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { id: item.id, value: item.name };\n\t\t\t});\n\t\t\tif (isHealthSystem) {\n\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\tif (type === this.transformTypes.WithLabels) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { value: item.id, label: item.name };\n\t\t\t});\n\t\t\tif (isHealthSystem) {\n\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\treturn [];\n\t};\n\n\tonTabChange = tabIndex => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.onSubTabChange(tabIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\tgetTabsConfigurations = () => {\n\t\tif (this.props.activeSubTab === this.activeSubTab.HealthSystem) {\n\t\t\treturn this.state.healthSystemConfigs;\n\t\t}\n\t\treturn this.state.configurations;\n\t};\n\n\tonFormTextChange = event => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData[event.target.name] = event.target.value;\n\t\tconfigurationFormData.errors[`${event.target.name}Error`] = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\topenDeleteModal = deleteConfig => {\n\t\tthis.props.pushFiltersToQueryString();\n\t\tthis.setState({\n\t\t\tdeleteConfig,\n\t\t\tisDeleteConfigModalOpen: true,\n\t\t});\n\t};\n\n\tgetHealthSystemConfigs = configurations => {\n\t\tif (!configurations.length) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemConfigs: [],\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst transformConfigs = configurations.map(config => ({\n\t\t\thealthSystem: config.team.name,\n\t\t\tprofileName: config.profileName,\n\t\t\turl: config.url,\n\t\t\tport: config.port,\n\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\tactions: (\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tlist_alt\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t this.toggleConfigurationModal(config)}>\n\t\t\t\t\t\tcreate\n\t\t\t\t\t\n\t\t\t\t\t this.openDeleteModal(config)}>\n\t\t\t\t\t\tdelete\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t),\n\t\t}));\n\t\tthis.setState({\n\t\t\thealthSystemConfigs: transformConfigs,\n\t\t\tisLoading: false,\n\t\t});\n\t};\n\n\tdeleteTeamProfile = async () => {\n\t\tthis.setState({\n\t\t\tisLoading: true,\n\t\t\tisDeleteConfigModalOpen: false,\n\t\t});\n\n\t\tconst { deleteConfig } = this.state;\n\n\t\tif (this.props.activeSubTab === this.activeSubTab.HealthSystem) {\n\t\t\tawait deleteTeamConfigurationProfile(deleteConfig.team.id, deleteConfig.team.typeId, deleteConfig.id);\n\t\t} else if (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\tawait deleteTVDeviceConfiguration(deleteConfig.team.id, deleteConfig.id);\n\t\t}\n\t\tthis.getConfigurations();\n\t};\n\n\tselectIntegrationType = ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\t\tconfigurationFormData.selectedIntegrationTypeValue = id;\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\trender() {\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\n\t\tconst { configurationFormData, isFormLoading, isLoading } = this.state;\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{this.props.activeSubTab === this.activeSubTab.TV && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t x.value === this.props.selectedHospitalId) : null}\n\t\t\t\t\t\t\t\t\tisDisabled={this.state.isHospitalDropdownDisabled}\n\t\t\t\t\t\t\t\t\tclassNamePrefix='custom-select'\n\t\t\t\t\t\t\t\t\toptions={this.state.hospitals}\n\t\t\t\t\t\t\t\t\tcomponents={{ DropdownIndicator }}\n\t\t\t\t\t\t\t\t\tonChange={this.onHospitalSelect}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t x.value === this.props.selectedDepartmentId) : null}\n\t\t\t\t\t\t\t\t\tisDisabled={this.state.isDepartmentDropdownDisabled}\n\t\t\t\t\t\t\t\t\tclassNamePrefix='custom-select'\n\t\t\t\t\t\t\t\t\toptions={this.state.departments}\n\t\t\t\t\t\t\t\t\tcomponents={{ DropdownIndicator }}\n\t\t\t\t\t\t\t\t\tonChange={this.onDepartmentSelect}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t this.toggleConfigurationModal()}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t this.onTabChange(this.activeSubTab.HealthSystem)}>Health System\n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t this.onTabChange(this.activeSubTab.TV)}>TV \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.onPaginationChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.toggleConfigurationModal()}\n\t\t\t\t\tisLoading={isFormLoading}>\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t -1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? configurationFormData.healthSystems[configurationFormData.selectedHealthSystemValue].value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidationOptions={{}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    Select the HDMI port where Banyan Bridge will be plugged into.

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t{configurationFormData.hdmiPorts.map(item => (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{configurationFormData.errors.hdmiPortError}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    Select the option where TV will go back after call ends.

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t{configurationFormData.endCallSource.map(item => (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{configurationFormData.errors.endCallSourceError}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    This setting will be applied to all the devices under this hospital.

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{configurationFormData.ringtoneVolumeValue || 0}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{configurationFormData.errors.ringtoneVolumeError}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t -1\n\t\t\t\t\t\t\t\t\t\t\t\t\t? configurationFormData.healthSystems[configurationFormData.selectedHealthSystemValue].value\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tvalidationOptions={{}}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{configurationFormData.selectedIntegrationTypeValue === 1 && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tconst { value } = e.target;\n\n\t\t\t\t\t\t\t\t\t\tif (!configurationFormData.isSecretChanged) {\n\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\tconfigurationFormData: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...configurationFormData,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnewSecret: value[value.length - 1] !== '*' ? value[value.length - 1] : '',\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSecretChanged: true,\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\tconfigurationFormData: { ...configurationFormData, newSecret: value },\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tvalidationOptions={{}}\n\t\t\t\t\t\t\t\t\terror={configurationFormData.errors.hsSecretError}\n\t\t\t\t\t\t\t\t\tbottomSpace='20px'\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.deleteTeamProfile()}\n\t\t\t\t\tonModalClose={() => this.setState({ isDeleteConfigModalOpen: false, deleteConfig: null })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t

    Are you sure you want to delete this configuration ?

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(DeviceConfig);\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport function getActiveDirectories({ pageSize = 10, pageIndex = 0, healthSystemId = null, hospitalId = null }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/active-directories`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t\thealthSystemId,\n\t\t\t\t\thospitalId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getActiveDirectoriesHistory(id, { pageSize = 10, pageIndex = 0 }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/active-directories/${id}/history`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getADGroupRoles({ pageSize = 10, pageIndex = 0, healthSystemId = null, hospitalId = null }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/active-directories/group-roles`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t\thealthSystemId,\n\t\t\t\t\thospitalId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateActiveDirectory(id, activeDirectory) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.put(`v1/healthcare/organizations/${companyId}/configurations/active-directories/${id}`, activeDirectory)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addActiveDirectory(activeDirectory) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.post(`v1/healthcare/organizations/${companyId}/configurations/active-directories`, activeDirectory)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addGroupRole(groupRole) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\n\t\tconst roleId = parseInt(groupRole.roleId, 10);\n\t\tconst data = {\n\t\t\thospitalId: groupRole.hospitalId,\n\t\t\troleId,\n\t\t\tgroup: groupRole.group,\n\t\t};\n\t\tgatewayApi\n\t\t\t.post(`v1/healthcare/organizations/${companyId}/configurations/active-directories/group-roles`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateGroupRole(id, groupRole) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\n\t\tconst roleId = parseInt(groupRole.roleId, 10);\n\t\tconst data = {\n\t\t\thospitalId: groupRole.hospitalId,\n\t\t\troleId,\n\t\t\tgroup: groupRole.group,\n\t\t};\n\t\tgatewayApi\n\t\t\t.put(`v1/healthcare/organizations/${companyId}/configurations/active-directories/group-roles/${id}`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteActiveDirectory(id) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.delete(`v1/healthcare/organizations/${companyId}/configurations/active-directories/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteGroupRole(id) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.delete(`v1/healthcare/organizations/${companyId}/configurations/active-directories/group-roles/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import React from 'react';\nimport { Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport Select from 'components/Common/FormElements/Select';\nimport { Form, Modal, Alert } from 'components';\nimport Loader from 'components/Loader';\nimport { addActiveDirectory, addGroupRole, updateActiveDirectory, updateGroupRole } from 'api/activeDirectories';\n\nexport default class ActiveDirectoryForm extends React.Component {\n\tstate = {\n\t\tisSuccessfulAlertOn: false,\n\t\tisErrorsAlertOn: false,\n\t\tisPasswordChanged: false,\n\t};\n\n\thandleSubmitMyForm = async (values, { setSubmitting }) => {\n\t\tsetSubmitting(true);\n\t\ttry {\n\t\t\tconst hospitalIds = [values.hospital];\n\t\t\tlet res = null;\n\t\t\tif (this.props.activeTab === 0) {\n\t\t\t\tconst { domain, validGroupName, adClientSecret, adClientId } = values;\n\t\t\t\tif (this.props.initialValues) {\n\t\t\t\t\tres = await updateActiveDirectory(this.props.initialValues.id, {\n\t\t\t\t\t\tdomain,\n\t\t\t\t\t\tvalidGroupName,\n\t\t\t\t\t\tusername: adClientId,\n\t\t\t\t\t\tpassword: this.state.isPasswordChanged ? adClientSecret : this.props.initialValues.fullPassword,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst [hospitalId] = hospitalIds;\n\t\t\t\t\tres = await addActiveDirectory({ hospitalId, domain, validGroupName, username: adClientId, password: adClientSecret });\n\t\t\t\t}\n\t\t\t\tif (res.hasSucceeded) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisSuccessfulAlertOn: true,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst [roleId] = [values.role];\n\t\t\t\tconst { group } = values;\n\n\t\t\t\tif (this.props.initialValues) {\n\t\t\t\t\tres = await updateGroupRole(this.props.initialValues.id, { roleId, group });\n\t\t\t\t} else {\n\t\t\t\t\tconst [hospitalId] = hospitalIds;\n\t\t\t\t\tres = await addGroupRole({ hospitalId, roleId, group });\n\t\t\t\t}\n\t\t\t\tif (!res.exists) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisSuccessfulAlertOn: true,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.props.onSucceeded();\n\t\t} catch (e) {\n\t\t\tthis.setState({\n\t\t\t\tisErrorsAlertOn: true,\n\t\t\t});\n\t\t}\n\t\tsetSubmitting(false);\n\t};\n\n\tonCloseModal = () => {\n\t\tthis.setState({\n\t\t\tisSuccessfulAlertOn: false,\n\t\t\tisErrorsAlertOn: false,\n\t\t\tisPasswordChanged: false,\n\t\t});\n\n\t\tthis.props.toggleModal();\n\t};\n\n\tgetValidationSchema = () => {\n\t\tconst validation = {};\n\t\tif (!this.props.initialValues) {\n\t\t\tvalidation.healthSystem = Yup.string().required('Health system is required');\n\t\t\tvalidation.hospital = Yup.string().required('Hospital is required');\n\t\t}\n\t\tif (this.props.activeTab === 0) {\n\t\t\tvalidation.domain = Yup.string().required('Domain is required');\n\t\t\tvalidation.validGroupName = Yup.string().required('Valid group name is required');\n\t\t\tvalidation.adClientId = Yup.string().required('ClientId is required');\n\t\t\tvalidation.adClientSecret = Yup.string().required('Client Secret is required');\n\t\t} else {\n\t\t\tvalidation.role = Yup.string().required('Role is required');\n\t\t\tvalidation.group = Yup.string().required('Group is required');\n\t\t}\n\n\t\treturn validation;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{props => {\n\t\t\t\t\tconst { handleSubmit, isSubmitting, setFieldValue } = props;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    {this.props.activeTab === 0 ? 'Active directory' : 'Group roles'}

    \n\t\t\t\t\t\t\t\t{!this.props.initialValues ? (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{this.props.isHospitalLoading ? (\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{this.props.activeTab === 0 ? (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tconst { value } = e.target;\n\t\t\t\t\t\t\t\t\t\t\t\tif (!this.state.isPasswordChanged) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisPasswordChanged: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tsetFieldValue('adClientSecret', !this.state.isPasswordChanged ? value[value.length - 1] : value);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t this.setState({ isSuccessfulAlertOn: false, isErrorsAlertOn: false })}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t);\n\t}\n}\n","import React from 'react';\nimport { Table, Grid, Button, Modal } from 'components';\nimport Select from 'react-select';\nimport { getHealthSystemHospitals } from 'api/userIdleConfigurations';\nimport { getUserRole } from 'infrastructure/auth';\nimport { ConfigHistoryTypes, UserRoles, Roles } from 'constants/enums';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { getActiveDirectories, getADGroupRoles, deleteActiveDirectory, deleteGroupRole } from 'api/activeDirectories';\nimport Pagination from 'components/Common/Pagination';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { Link } from 'react-router-dom';\nimport ActiveDirectoryForm from './ActiveDirectoryForm';\n\nclass ActiveDirectory extends React.Component {\n\tstate = {\n\t\tisLoading: true,\n\t\thospitals: [],\n\t\tformHospitals: [],\n\t\tisModalHospitalsLoading: false,\n\t\tactiveDirectories: [],\n\t\ttotalADs: 0,\n\t\tgroupRoles: [],\n\t\ttotalGroupRoles: 0,\n\t\teditConfig: null,\n\t\tisModalOpen: false,\n\t\tisHospitalDisabled: true,\n\t\tisDeleteConfigModalOpen: false,\n\t};\n\n\trole = null;\n\n\tactiveSubTab = {\n\t\tADs: 0,\n\t\tGroupRoles: 1,\n\t};\n\n\ttransformTypes = {\n\t\tWithValues: 1,\n\t\tWithLabels: 2,\n\t};\n\n\tactiveDirectoriesHeaders = [\n\t\t{ title: 'Hospital' },\n\t\t{ title: 'Domain' },\n\t\t{ title: 'Valid Group Name' },\n\t\t{ title: 'Created by' },\n\t\t{ title: 'Date Created' },\n\t\t{ title: '' },\n\t];\n\n\tgroupRoleHeaders = [{ title: 'Hospital' }, { title: 'Role' }, { title: 'Group' }, { title: 'Created by' }, { title: 'Date Created' }, { title: '' }];\n\n\tcomponentDidMount = async () => {\n\t\tthis.role = getUserRole();\n\t\tthis.getConfigurations();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (\n\t\t\tthis.props.pageIndex !== prevProps.pageIndex ||\n\t\t\tthis.props.pageSize !== prevProps.pageSize ||\n\t\t\tthis.props.selectedHealthSystem !== prevProps.selectedHealthSystem ||\n\t\t\tthis.props.selectedHospitalId !== prevProps.selectedHospitalId ||\n\t\t\tthis.props.activeSubTab !== prevProps.activeSubTab\n\t\t) {\n\t\t\tthis.getConfigurations();\n\t\t}\n\t};\n\n\tgetHospitals = async healthSystem => {\n\t\tlet hospitals;\n\t\tif (healthSystem.value !== '0') {\n\t\t\thospitals = await this.getHealthSystemHospitals(healthSystem.value);\n\t\t\thospitals.unshift({ value: 0, label: 'All' });\n\t\t}\n\t\tthis.setState({\n\t\t\tisHospitalDisabled: healthSystem.value === '0',\n\t\t\thospitals,\n\t\t});\n\t};\n\n\tgetConfigurations = async () => {\n\t\tif (this.props.isLoading) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { selectedHealthSystem, selectedHospitalId } = this.props;\n\t\tlet hsId = null;\n\t\tif (selectedHealthSystem && selectedHealthSystem.value !== '0') {\n\t\t\thsId = selectedHealthSystem.value;\n\t\t}\n\n\t\tconst newState = {\n\t\t\tisLoading: false,\n\t\t};\n\n\t\tif (this.props.activeSubTab === this.activeSubTab.ADs) {\n\t\t\tconst { activeDirectories, total } = await getActiveDirectories({\n\t\t\t\tpageSize: this.props.pageSize.value,\n\t\t\t\tpageIndex: this.props.pageIndex,\n\t\t\t\thealthSystemId: hsId,\n\t\t\t\thospitalId: selectedHospitalId || null,\n\t\t\t});\n\t\t\tnewState.activeDirectories = activeDirectories;\n\t\t\tnewState.totalADs = total;\n\t\t} else {\n\t\t\tconst { adGroupRoles, total } = await getADGroupRoles({\n\t\t\t\tpageSize: this.props.pageSize.value,\n\t\t\t\tpageIndex: this.props.pageIndex,\n\t\t\t\thealthSystemId: hsId,\n\t\t\t\thospitalId: selectedHospitalId || null,\n\t\t\t});\n\t\t\tnewState.groupRoles = adGroupRoles;\n\t\t\tnewState.totalGroupRoles = total;\n\t\t}\n\t\tif (selectedHealthSystem) {\n\t\t\tawait this.getHospitals(selectedHealthSystem);\n\t\t}\n\t\tthis.setState(newState);\n\t};\n\n\tgetHealthSystemHospitals = async healthSystemId => {\n\t\tconst firstHSHospitals = await getHealthSystemHospitals(healthSystemId);\n\t\treturn this.transformHealthSystemsForSelect(firstHSHospitals);\n\t};\n\n\ttransformHealthSystemsForSelect = healthSystems => {\n\t\treturn healthSystems.map(healthSystem => {\n\t\t\treturn { label: healthSystem.name, value: healthSystem.id };\n\t\t});\n\t};\n\n\tonHospitalSelect = selection => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.setSelectedHospital(selection);\n\t\t\t}\n\t\t);\n\t};\n\n\tonHealthSystemSelect = healthSystem => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.setSelectedHealthSystem(healthSystem);\n\t\t\t}\n\t\t);\n\t};\n\n\tonHealthSystemChange = async e => {\n\t\tconst { value } = e.target;\n\t\tthis.setState({\n\t\t\tisModalHospitalsLoading: true,\n\t\t});\n\t\tconst hsHospitals = value !== '0' ? await getHealthSystemHospitals(value) : [];\n\t\tconst formHospitals = hsHospitals.map(hospital => ({ id: hospital.id, value: hospital.name }));\n\t\tthis.setState({\n\t\t\tformHospitals,\n\t\t\tisModalHospitalsLoading: false,\n\t\t});\n\t};\n\n\ttransformArray = (array, type, isHealthSystem, shouldAppendAll = true, propName = 'name') => {\n\t\tif (type === this.transformTypes.WithValues) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { id: item.id, value: item[propName] };\n\t\t\t});\n\t\t\tif (shouldAppendAll) {\n\t\t\t\tif (isHealthSystem) {\n\t\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn newArray;\n\t\t}\n\t\tif (type === this.transformTypes.WithLabels) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { value: item.id, label: item[propName] };\n\t\t\t});\n\t\t\tif (shouldAppendAll) {\n\t\t\t\tif (isHealthSystem) {\n\t\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\treturn [];\n\t};\n\n\ttoggleConfigModal = () => {\n\t\tthis.setState({\n\t\t\tisModalOpen: !this.state.isModalOpen,\n\t\t});\n\t};\n\n\topenDeleteModal = editConfig => {\n\t\tthis.setState({\n\t\t\teditConfig,\n\t\t\tisDeleteConfigModalOpen: true,\n\t\t});\n\t};\n\n\tgetADButtons = config => {\n\t\tconst password = `${config.password.slice(0, 3)}************`;\n\n\t\tconst editConfig = {\n\t\t\tid: config.id,\n\t\t\thospital: config.team.name,\n\t\t\tdomain: config.domain,\n\t\t\tvalidGroupName: config.validGroupName,\n\t\t\tadClientId: config.username,\n\t\t\tadClientSecret: password,\n\t\t\tfullPassword: config.password,\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tlist_alt\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t this.openEditModal(editConfig)}>\n\t\t\t\t\tcreate\n\t\t\t\t\n\t\t\t\t this.openDeleteModal(editConfig)}>\n\t\t\t\t\tdelete\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t};\n\n\tgetGroupRoleButtons = config => {\n\t\tconst editConfig = {\n\t\t\tid: config.id,\n\t\t\thospital: config.team.name,\n\t\t\trole: config.role.id,\n\t\t\tgroup: config.group,\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t this.openEditModal(editConfig)}>\n\t\t\t\t\tcreate\n\t\t\t\t\n\t\t\t\t this.openDeleteModal(editConfig)}>\n\t\t\t\t\tdelete\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t};\n\n\topenEditModal = editConfig => {\n\t\tthis.setState({\n\t\t\teditConfig,\n\t\t\tisModalOpen: true,\n\t\t});\n\t};\n\n\tsetFormHospitals = async id => {\n\t\tthis.setState({\n\t\t\tisModalHospitalsLoading: true,\n\t\t});\n\t\tconst hsHospitals = await getHealthSystemHospitals(id);\n\t\tconst formHospitals = hsHospitals.map(hospital => ({ id: hospital.id, value: hospital.name }));\n\t\tthis.setState({\n\t\t\tformHospitals,\n\t\t\tisModalHospitalsLoading: false,\n\t\t});\n\t};\n\n\ttransformActiveDirectories = () => {\n\t\tif (this.props.activeSubTab === this.activeSubTab.ADs) {\n\t\t\treturn this.state.activeDirectories.map(item => {\n\t\t\t\treturn {\n\t\t\t\t\thospital: item.team.name,\n\t\t\t\t\tdomain: item.domain,\n\t\t\t\t\tvalidGroupName: item.validGroupName,\n\t\t\t\t\tcreatedBy: `${item.userCreated.firstName} ${item.userCreated.lastName}`,\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(item.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tedit: this.getADButtons(item),\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t\treturn this.state.groupRoles.map(item => {\n\t\t\treturn {\n\t\t\t\thospital: item.team.name,\n\t\t\t\trole: item.role.name,\n\t\t\t\tgroup: item.group,\n\t\t\t\tcreatedBy: `${item.userCreated.firstName} ${item.userCreated.lastName}`,\n\t\t\t\tdateCreated: moment(utcToLocalTime(item.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tedit: this.getGroupRoleButtons(item),\n\t\t\t};\n\t\t});\n\t};\n\n\tonPaginationChange = (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.onPaginationChange(pageSize, pageIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\tonTabChange = tabIndex => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.onSubTabChange(tabIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\tdeleteActiveDirectory = async () => {\n\t\tthis.setState({\n\t\t\tisLoading: true,\n\t\t\tisDeleteConfigModalOpen: false,\n\t\t});\n\t\tif (this.props.activeSubTab === this.activeSubTab.ADs) {\n\t\t\tawait deleteActiveDirectory(this.state.editConfig.id);\n\t\t} else if (this.props.activeSubTab === this.activeSubTab.GroupRoles) {\n\t\t\tawait deleteGroupRole(this.state.editConfig.id);\n\t\t}\n\t\tthis.getConfigurations();\n\t};\n\n\trender() {\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t x.value === this.props.selectedHospitalId) : null}\n\t\t\t\t\t\t\tisDisabled={this.state.isHospitalDisabled}\n\t\t\t\t\t\t\tclassNamePrefix='custom-select'\n\t\t\t\t\t\t\toptions={this.state.hospitals}\n\t\t\t\t\t\t\tcomponents={{ DropdownIndicator }}\n\t\t\t\t\t\t\tonChange={this.onHospitalSelect}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.toggleConfigModal()}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\n\t\t\t\t\t
    \n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t this.onTabChange(this.activeSubTab.ADs)}>AD \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t this.onTabChange(this.activeSubTab.GroupRoles)}>Group roles \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.onPaginationChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.setState({ isModalOpen: !this.state.isModalOpen, editConfig: null })}\n\t\t\t\t\tonSucceeded={this.getConfigurations}\n\t\t\t\t\thospitals={this.state.formHospitals}\n\t\t\t\t\tisHospitalLoading={this.state.isModalHospitalsLoading}\n\t\t\t\t\tonHealthSystemChange={this.onHealthSystemChange}\n\t\t\t\t/>\n\t\t\t\t this.deleteActiveDirectory()}\n\t\t\t\t\tonModalClose={() => this.setState({ isDeleteConfigModalOpen: false, editConfig: null })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t

    {`Are you sure you want to delete this active directory ${this.props.activeSubTab === this.activeSubTab.ADs ? '' : 'group role'} ? `}

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(ActiveDirectory);\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport const getNtpConfigurations = async ({ pageSize, pageIndex, teamId, teamType }) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`v1/healthcare/organizations/${APP_CONFIG.companyId}/configurations/ntp`, {\n\t\t\tparams: { pageSize, pageIndex, teamId, teamType },\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const addNtpConfiguration = async (teamId, teamType, ntpUrls) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.post(`v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configurations/ntp`, {\n\t\t\tntpUrls,\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const deleteNtpConfiguration = async (teamId, teamType, id) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.delete(\n\t\t\t`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configurations/ntp/${id}`\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getNtpConfigurationHistory = async ({ id, pageSize = 10, pageIndex = 0 }) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/configurations/ntp/${id}/history`, {\n\t\t\tparams: {\n\t\t\t\tpageSize,\n\t\t\t\tpageIndex,\n\t\t\t},\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const editNtpConfiguration = async ({ teamId, teamType, id, ntpUrls }) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.put(\n\t\t\t`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configurations/ntp/${id}`,\n\n\t\t\t{ ntpUrls }\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { Table, Grid, Button, Modal, Form, Input, Select as SelectTag, Alert } from 'components';\nimport Select from 'react-select';\nimport Pagination from 'components/Common/Pagination';\nimport { UserRoles, TeamTypes, ConfigHistoryTypes } from 'constants/enums';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport _ from 'lodash';\nimport { getUserRole } from 'infrastructure/auth';\nimport { getHealthSystemHospitals } from 'api/organization';\nimport { addNtpConfiguration, deleteNtpConfiguration, editNtpConfiguration, getNtpConfigurations } from 'api/ntpConfig';\nimport { getPort, handleOnKeyDownNumeric } from 'infrastructure/helpers/commonHelpers';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nconst NetworkConfig = props => {\n\tconst defaultPortValue = '123';\n\tconst initialConfigurationFormData = {\n\t\thealthSystems: props.healthSystems,\n\t\thospitals: [],\n\t\tselectedHealthSystemValue: -1,\n\t\tselectedHospitalValue: -1,\n\t\tselectedHospital: null,\n\t\tselectedHealthSystem: null,\n\t\tselectedHospitalName: '',\n\t\tselectedHealthSystemName: '',\n\t\tisEdit: false,\n\t\tntpUrl1: '',\n\t\tntpUrl2: '',\n\t\tntpPort1: defaultPortValue,\n\t\tntpPort2: defaultPortValue,\n\t\tconfigurationId: '',\n\t\terrors: {\n\t\t\thealthSystemError: null,\n\t\t\thospitalError: null,\n\t\t\tntpUrl1: null,\n\t\t\tntpUrl2: null,\n\t\t\tntpPort1: null,\n\t\t\tntpPort2: null,\n\t\t},\n\t};\n\n\tconst [isLoading, setIsLoading] = useState(true);\n\tconst [healthSystems, setHealthSystems] = useState([{ value: '0', label: 'All' }]);\n\tconst [showConfigurationModal, setShowConfigurationModal] = useState(false);\n\tconst [hospitals, setHospitals] = useState([]);\n\tconst [isHospitalDropdownDisabled, setIsHospitalDropdownDisabled] = useState(true);\n\tconst [configurations, setConfigurations] = useState([]);\n\tconst [isFormLoading, setIsFormLoading] = useState(false);\n\tconst [totalConfigs, setTotalConfigs] = useState(null);\n\tconst [configurationFormData, setConfigurationFormData] = useState(_.cloneDeep(initialConfigurationFormData));\n\tconst [isDeleteConfigModalOpen, setIsDeleteConfigModalOpen] = useState(false);\n\tconst [deleteConfig, setDeleteConfig] = useState(null);\n\tconst [editConfig, setEditConfig] = useState(null);\n\tconst [error, setError] = useState('');\n\n\tconst ntpConfigHeaders = [{ title: 'Name' }, { title: 'Type' }, { title: 'NTP Endpoint' }, { title: 'Created By' }, { title: 'Date Created' }, { title: '' }];\n\n\tconst orgProps = useSelector(state => state.organization);\n\n\tconst role = getUserRole();\n\n\tconst transformItemsForSelect = arr => arr.map(item => ({ label: item.name, value: item.id }));\n\n\tuseEffect(() => {\n\t\tconst setHealthSystemsAndConfigs = async () => {\n\t\t\tconst healthSystemsList = transformItemsForSelect(orgProps.allHealthSystems);\n\t\t\thealthSystemsList.unshift({ value: '0', label: 'All' });\n\n\t\t\tsetHealthSystems(healthSystemsList);\n\t\t};\n\t\tsetHealthSystemsAndConfigs();\n\t}, []);\n\n\tconst getHospitalsByHealthSystemId = async healthSystemId => {\n\t\tconst response = await getHealthSystemHospitals(healthSystemId);\n\t\tif (!response.error) {\n\t\t\treturn transformItemsForSelect(response);\n\t\t}\n\t\treturn [];\n\t};\n\n\tconst openDeleteModal = config => {\n\t\tsetDeleteConfig(config);\n\t\tsetIsDeleteConfigModalOpen(true);\n\t};\n\n\tconst getActionButtons = config => (\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\t\tlist_alt\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    \n\t);\n\n\tuseEffect(() => {\n\t\tconst getHospitalsList = async () => {\n\t\t\tlet hospitalsList = [];\n\t\t\tif (props.selectedHealthSystem.value.toString() !== '0') {\n\t\t\t\tconst response = await getHealthSystemHospitals(props.selectedHealthSystem.value);\n\t\t\t\tif (!response.error) {\n\t\t\t\t\thospitalsList = transformItemsForSelect(response);\n\t\t\t\t\thospitalsList.unshift({ value: '0', label: 'All' });\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetIsHospitalDropdownDisabled(props.selectedHealthSystem.value.toString() === '0');\n\t\t\tsetHospitals(hospitalsList);\n\t\t};\n\t\tgetHospitalsList();\n\t}, [props.selectedHealthSystem]);\n\n\tconst getConfigurations = useCallback(async () => {\n\t\tlet hsId = null;\n\t\tlet teamType = null;\n\n\t\tif (props.selectedHealthSystem && props.selectedHealthSystem.value !== '0') {\n\t\t\thsId = props.selectedHealthSystem.value;\n\t\t\tteamType = TeamTypes.HEALTHSYSTEM;\n\t\t}\n\n\t\tif (props.selectedHospitalId && props.selectedHospitalId !== '0') {\n\t\t\thsId = props.selectedHospitalId;\n\t\t\tteamType = TeamTypes.HOSPITAL;\n\t\t}\n\n\t\tconst configs = await getNtpConfigurations({\n\t\t\tpageSize: props.pageSize?.value,\n\t\t\tpageIndex: props.pageIndex,\n\t\t\tteamId: hsId,\n\t\t\tteamType,\n\t\t});\n\t\tif (configs.error) {\n\t\t\tsetError('Something went wrong!');\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\t\tif (!configs.teamNetworkNtpConfigurations.length) {\n\t\t\tsetConfigurations([]);\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst transformConfigs = configs.teamNetworkNtpConfigurations.map(config => ({\n\t\t\tname: config.team.name,\n\t\t\ttype: config.team.typeId === TeamTypes.HEALTHSYSTEM ? 'Health System' : 'Hospital',\n\t\t\tntpUrl: config.ntpUrls.map(el => (\n\t\t\t\t<>\n\t\t\t\t\t{el}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t)),\n\t\t\tcreatedBy: `${config.userCreated.firstName} ${config.userCreated.lastName}`,\n\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\tactions: getActionButtons(config),\n\t\t}));\n\t\tsetTotalConfigs(configs.total);\n\t\tsetConfigurations(transformConfigs);\n\t\tsetIsLoading(false);\n\t}, [props.pageSize, props.pageIndex, props.selectedHealthSystem, props.selectedHospitalId]);\n\n\tuseEffect(() => {\n\t\tgetConfigurations();\n\t}, [getConfigurations]);\n\n\tconst onHealthSystemSelect = async selection => {\n\t\tsetIsLoading(true);\n\t\tawait props.setSelectedHealthSystem(selection);\n\t};\n\n\tconst onHospitalSelect = async selection => {\n\t\tawait props.setSelectedHospital(selection);\n\t};\n\n\tuseEffect(() => {\n\t\tif (role === UserRoles.SUPERUSER && healthSystems.length > 1) {\n\t\t\tonHealthSystemSelect(healthSystems[1]);\n\t\t}\n\t}, [healthSystems]);\n\n\tconst onFormHealthSystemSelect = async ({ id }) => {\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tif (newConfigurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\t\tnewConfigurationFormData.errors.healthSystemError = null;\n\t\tnewConfigurationFormData.selectedHealthSystemValue = newConfigurationFormData.healthSystems.findIndex(hs => id === hs.id);\n\t\tnewConfigurationFormData.selectedHealthSystem = id;\n\t\tnewConfigurationFormData.selectedHospital = null;\n\t\tnewConfigurationFormData.selectedHospitalValue = -1;\n\n\t\tconst response = await getHospitalsByHealthSystemId(id);\n\t\tif (!response.error) {\n\t\t\tconst newArray = response.map(item => ({ id: item.value, value: item.label }));\n\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\tnewConfigurationFormData.hospitals = newArray;\n\t\t}\n\t\tsetConfigurationFormData(newConfigurationFormData);\n\t};\n\n\tconst onFormHospitalSelect = ({ id }) => {\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tif (newConfigurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\n\t\tnewConfigurationFormData.selectedHospital = id;\n\t\tnewConfigurationFormData.selectedHospitalValue = newConfigurationFormData.hospitals.findIndex(item => id === item.id);\n\t\tnewConfigurationFormData.errors.hospitalError = null;\n\n\t\tsetConfigurationFormData(newConfigurationFormData);\n\t};\n\n\tconst resetAddConfigurationModal = async () => {\n\t\tif (editConfig) {\n\t\t\tsetEditConfig(null);\n\t\t}\n\n\t\tsetConfigurationFormData(_.cloneDeep(initialConfigurationFormData));\n\t\tsetIsFormLoading(false);\n\t};\n\n\tconst setDeviceConfiguration = async () => {\n\t\tconst maximumPortNumber = 65535;\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tconst { isEdit, selectedHealthSystemValue, errors, ntpUrl1, ntpUrl2, ntpPort1, ntpPort2 } = newConfigurationFormData;\n\t\tlet hasError = false;\n\n\t\tif (!isEdit && selectedHealthSystemValue === -1) {\n\t\t\terrors.healthSystemError = 'Please select a health system.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tconst URL = /^((https?|ftp):\\/\\/)?(www.)?(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i;\n\n\t\tif (ntpUrl1 && !URL.test(ntpUrl1)) {\n\t\t\terrors.ntpUrl1 = 'Please enter valid URL.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpUrl2 && !URL.test(ntpUrl2)) {\n\t\t\terrors.ntpUrl2 = 'Please enter valid URL.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (!ntpUrl1 && !ntpUrl2) {\n\t\t\terrors.ntpUrl1 = 'Please set at least 1 NTP Endpoint.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpUrl1 && !ntpPort1) {\n\t\t\terrors.ntpPort1 = 'Please set the NTP Port.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpPort1 && +ntpPort1 > maximumPortNumber) {\n\t\t\terrors.ntpPort1 = `Maximum port number is ${maximumPortNumber}.`;\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpPort1 && +ntpPort1 < 0) {\n\t\t\terrors.ntpPort1 = 'Port cannot be a negative number.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpUrl2 && !ntpPort2) {\n\t\t\terrors.ntpPort2 = 'Please set the NTP Port.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpPort2 && +ntpPort2 > maximumPortNumber) {\n\t\t\terrors.ntpPort2 = `Maximum port number is ${maximumPortNumber}.`;\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpPort2 && +ntpPort2 < 0) {\n\t\t\terrors.ntpPort2 = `Port cannot be a negative number.`;\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpUrl1 && ntpUrl2 && ntpPort1 && ntpPort2 && ntpUrl1 === ntpUrl2 && ntpPort1 === ntpPort2) {\n\t\t\terrors.ntpUrl2 = 'Endpoint + port fields should be unique';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (hasError) {\n\t\t\tsetConfigurationFormData(newConfigurationFormData);\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsFormLoading(true);\n\t\tconst teamId =\n\t\t\tnewConfigurationFormData.selectedHospital && newConfigurationFormData.selectedHospital !== '0'\n\t\t\t\t? newConfigurationFormData.selectedHospital\n\t\t\t\t: newConfigurationFormData.selectedHealthSystem;\n\t\tconst teamTypeId =\n\t\t\tnewConfigurationFormData.selectedHospital && newConfigurationFormData.selectedHospital !== '0' ? TeamTypes.HOSPITAL : TeamTypes.HEALTHSYSTEM;\n\t\tconst configId = newConfigurationFormData.configurationId;\n\n\t\tconst ntpUrls = [];\n\t\tif (newConfigurationFormData.ntpUrl1) {\n\t\t\tconst firstUrlPort = `${newConfigurationFormData.ntpUrl1}:${newConfigurationFormData.ntpPort1}`;\n\t\t\tntpUrls.push(firstUrlPort);\n\t\t}\n\t\tif (newConfigurationFormData.ntpUrl2) {\n\t\t\tconst secondUrlPort = `${newConfigurationFormData.ntpUrl2}:${newConfigurationFormData.ntpPort2}`;\n\t\t\tntpUrls.push(secondUrlPort);\n\t\t}\n\n\t\tconst editParams = {\n\t\t\tteamId,\n\t\t\tteamType: teamTypeId,\n\t\t\tid: configId,\n\t\t\tntpUrls,\n\t\t};\n\n\t\tconst { hasSucceeded } = !newConfigurationFormData.isEdit ? await addNtpConfiguration(teamId, teamTypeId, ntpUrls) : await editNtpConfiguration(editParams);\n\n\t\tif (!hasSucceeded) {\n\t\t\tsetIsFormLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tresetAddConfigurationModal();\n\t\tsetShowConfigurationModal(false);\n\t\tgetConfigurations();\n\t};\n\n\tconst toggleConfigurationModal = async (config = null) => {\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tif (!showConfigurationModal) {\n\t\t\tnewConfigurationFormData.healthSystems = orgProps.allHealthSystems.map(hs => ({ id: hs.id, value: hs.name }));\n\t\t\tnewConfigurationFormData.isEdit = !!config;\n\t\t\tif (!newConfigurationFormData.isEdit) {\n\t\t\t\tsetEditConfig(null);\n\t\t\t}\n\n\t\t\tif (role === UserRoles.SUPERUSER && !newConfigurationFormData.isEdit) {\n\t\t\t\tnewConfigurationFormData.selectedHealthSystemValue = 0;\n\t\t\t\tonFormHealthSystemSelect(newConfigurationFormData.healthSystems[0]);\n\t\t\t}\n\n\t\t\tif (newConfigurationFormData.isEdit) {\n\t\t\t\tif (config.team.typeId === TeamTypes.HEALTHSYSTEM) {\n\t\t\t\t\tnewConfigurationFormData.selectedHealthSystem = config.team.id;\n\t\t\t\t\tnewConfigurationFormData.selectedHealthSystemName = config.team.name;\n\t\t\t\t}\n\t\t\t\tif (config.team.typeId === TeamTypes.HOSPITAL) {\n\t\t\t\t\tnewConfigurationFormData.selectedHospital = config.team.id;\n\t\t\t\t\tnewConfigurationFormData.selectedHospitalName = config.team.name;\n\t\t\t\t}\n\t\t\t\tnewConfigurationFormData.ntpUrl1 = config.ntpUrls[0].substr(0, config.ntpUrls[0].lastIndexOf(':'));\n\t\t\t\tnewConfigurationFormData.ntpPort1 = getPort(config.ntpUrls[0]).toString();\n\t\t\t\tnewConfigurationFormData.ntpUrl2 = config.ntpUrls.length > 1 ? config.ntpUrls[1].substr(0, config.ntpUrls[1].lastIndexOf(':')) : '';\n\t\t\t\tnewConfigurationFormData.ntpPort2 = config.ntpUrls.length > 1 ? getPort(config.ntpUrls[1]).toString() : defaultPortValue;\n\t\t\t\tnewConfigurationFormData.configurationId = config.id;\n\t\t\t}\n\n\t\t\tsetConfigurationFormData(newConfigurationFormData);\n\t\t} else {\n\t\t\tresetAddConfigurationModal();\n\t\t}\n\t\tsetShowConfigurationModal(prevState => !prevState);\n\t};\n\n\tuseEffect(() => {\n\t\tif (editConfig) {\n\t\t\ttoggleConfigurationModal(editConfig);\n\t\t}\n\t}, [editConfig]);\n\n\tconst onPaginationChange = async (size, index) => {\n\t\tsetIsLoading(true);\n\t\tawait props.onPaginationChange(size, index);\n\t};\n\n\tconst submitDeleteConfig = async () => {\n\t\tsetError('');\n\t\tsetIsLoading(true);\n\t\tsetIsDeleteConfigModalOpen(false);\n\n\t\tconst deleteRes = await deleteNtpConfiguration(deleteConfig.team.id, deleteConfig.team.typeId, deleteConfig.id);\n\n\t\tif (deleteRes.error) {\n\t\t\tsetError('Something went wrong! Please try again.');\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tgetConfigurations();\n\t};\n\n\tconst onDeleteModal = () => {\n\t\tsetIsDeleteConfigModalOpen(false);\n\t\tsetDeleteConfig(null);\n\t};\n\n\tconst DropdownIndicator = () => {\n\t\treturn arrow_drop_down;\n\t};\n\n\tconst onInputChange = e => {\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tnewConfigurationFormData[e.target.name] = e.target.value;\n\t\tnewConfigurationFormData.errors[e.target.name] = null;\n\t\tsetConfigurationFormData(newConfigurationFormData);\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t x.value === props.selectedHospitalId) : null}\n\t\t\t\t\t\tisDisabled={isHospitalDropdownDisabled}\n\t\t\t\t\t\tclassNamePrefix='custom-select'\n\t\t\t\t\t\toptions={hospitals}\n\t\t\t\t\t\tcomponents={{ DropdownIndicator }}\n\t\t\t\t\t\tonChange={onHospitalSelect}\n\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t onPaginationChange(size, index)} />\n\t\t\t toggleConfigurationModal()}\n\t\t\t\tisLoading={isFormLoading}>\n\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t{!configurationFormData.isEdit && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{role === UserRoles.SUPERUSER && (\n\t\t\t\t\t\t\t\t -1\n\t\t\t\t\t\t\t\t\t\t\t? configurationFormData.healthSystems[configurationFormData.selectedHealthSystemValue].value\n\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvalidationOptions={{}}\n\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{role !== UserRoles.SUPERUSER && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{configurationFormData.isEdit && (\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t

    Warning

    \n\t\t\t\t\t

    Are you sure you want to delete this configuration ?

    \n\t\t\t\t
    \n\t\t\t\n\t\t\t\n\t\t
    \n\t);\n};\n\nexport default NetworkConfig;\n","import React from 'react';\nimport Layout from 'components/Common/Layout';\nimport { Grid, Tabs } from 'components';\nimport Header from 'components/Common/Header';\nimport UserIdleTimeout from 'components/Configurations/UserIdleTimeout';\nimport DeviceConfig from 'components/Configurations/DeviceConfig';\nimport { getHealthSystems } from 'api/users';\nimport { getUserRole } from 'infrastructure/auth';\nimport queryString from 'query-string';\nimport ActiveDirectory from 'components/Configurations/ActiveDirectory';\nimport { Roles } from 'constants/enums';\nimport NetworkConfig from 'components/Configurations/NetworkConfig';\n\nclass Configurations extends React.Component {\n\tstate = {\n\t\tisLoading: true,\n\t\tactiveTab: 0,\n\t\thealthSystems: [],\n\t\tselectedHealthSystem: { value: '0', label: 'All' },\n\t\tselectedHospitalId: null,\n\t\tselectedDepartmentId: null,\n\t\tselectedRole: { value: '0', label: 'All' },\n\t\tpageSize: { value: 10, label: '10' },\n\t\tpageIndex: 0,\n\t\tactiveSubTab: 0,\n\t};\n\n\trole = null;\n\n\tcomponentDidMount = async () => {\n\t\tconst result = await getHealthSystems();\n\t\tthis.role = getUserRole();\n\t\tconst queryParams = queryString.parse(this.props.location.search);\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\thealthSystems: result,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.setStateFromQueryString(queryParams);\n\t\t\t}\n\t\t);\n\t};\n\n\tcomponentDidUpdate(prevProps) {\n\t\tconst currentParams = queryString.parse(this.props.location.search);\n\t\tconst prevParams = queryString.parse(prevProps.location.search);\n\t\tif (this.hasQueryChanged(currentParams, prevParams)) {\n\t\t\tthis.setStateFromQueryString(currentParams);\n\t\t}\n\t}\n\n\thasQueryChanged = (currentParams, prevParams) => {\n\t\treturn (\n\t\t\tcurrentParams.pageIndex !== prevParams.pageIndex ||\n\t\t\tcurrentParams.pageSize !== prevParams.pageSize ||\n\t\t\tcurrentParams.activeTab !== prevParams.activeTab ||\n\t\t\tcurrentParams.healthSystem !== prevParams.healthSystem ||\n\t\t\tcurrentParams.hospital !== prevParams.hospital ||\n\t\t\tcurrentParams.role !== prevParams.role\n\t\t);\n\t};\n\n\tsetStateFromQueryString = queryParams => {\n\t\tconst { pageIndex, activeTab, healthSystem, hospital, department, role, activeSubTab, pageSize } = queryParams;\n\t\tconst hs = healthSystem ? this.state.healthSystems.find(x => x.id === healthSystem) : null;\n\t\tconst selectedRole = role ? Object.values(Roles).find(x => x.id === parseInt(role, 10)) : null;\n\n\t\tconst validPageSize = { value: 10, label: '10' };\n\t\tif (pageSize === '25' || pageSize === '50') {\n\t\t\tvalidPageSize.value = parseInt(pageSize, 10);\n\t\t\tvalidPageSize.label = pageSize;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tpageIndex: pageIndex ? parseInt(pageIndex, 10) : 0,\n\t\t\tpageSize: validPageSize,\n\t\t\tactiveTab: activeTab ? parseInt(activeTab, 10) : 0,\n\t\t\tselectedHealthSystem: hs ? { value: hs.id, label: hs.name } : { value: '0', label: 'All' },\n\t\t\tselectedRole: selectedRole ? { value: selectedRole.id, label: selectedRole.value } : { value: '0', label: 'All' },\n\t\t\tselectedHospitalId: hospital,\n\t\t\tselectedDepartmentId: department,\n\t\t\tactiveSubTab: activeSubTab ? parseInt(activeSubTab, 10) : 0,\n\t\t\tisLoading: false,\n\t\t});\n\t};\n\n\tonHealthSystemChange = selectedHealthSystem => {\n\t\tthis.setState({\n\t\t\tselectedHospitalId: null,\n\t\t\tselectedDepartmentId: null,\n\t\t\tselectedHealthSystem,\n\t\t\tpageIndex: 0,\n\t\t});\n\t};\n\n\tonRoleChange = selectedRole => {\n\t\tthis.setState({\n\t\t\tselectedRole,\n\t\t});\n\t};\n\n\tonPaginationChange = (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tpageSize,\n\t\t\t\tpageIndex,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.pushFiltersToQueryString();\n\t\t\t}\n\t\t);\n\t};\n\n\tonSubTabChange = activeSubTab => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tactiveSubTab,\n\t\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\t\tpageIndex: 0,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.pushFiltersToQueryString();\n\t\t\t}\n\t\t);\n\t};\n\n\tonHospitalChange = selectedHospital => {\n\t\tthis.setState({\n\t\t\tselectedHospitalId: selectedHospital.value,\n\t\t\tselectedDepartmentId: null,\n\t\t\tpageIndex: 0,\n\t\t});\n\t};\n\n\tonDepartmentChange = selectedDepartment => {\n\t\tthis.setState({\n\t\t\tselectedDepartmentId: selectedDepartment.value,\n\t\t});\n\t};\n\n\tonTabChange = async index => {\n\t\tthis.setState({\n\t\t\tisLoading: true,\n\t\t});\n\t\tconst healthSystems = await getHealthSystems();\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\thealthSystems,\n\t\t\t\tselectedHospitalId: null,\n\t\t\t\tselectedDepartmentId: null,\n\t\t\t\tselectedRole: { value: '0', label: 'All' },\n\t\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\t\tpageIndex: 0,\n\t\t\t\tactiveSubTab: 0,\n\t\t\t\tactiveTab: parseInt(index, 10),\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.pushFiltersToQueryString();\n\t\t\t\tthis.setState({\n\t\t\t\t\tisLoading: false,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t};\n\n\tpushFiltersToQueryString = () => {\n\t\tconst queryParams = {};\n\t\tif (this.state.pageIndex > 0) {\n\t\t\tqueryParams.pageIndex = this.state.pageIndex.toString();\n\t\t}\n\t\tif (this.state.pageSize.value > 10) {\n\t\t\tqueryParams.pageSize = this.state.pageSize.value.toString();\n\t\t}\n\t\tif (this.state.activeTab > 0) {\n\t\t\tqueryParams.activeTab = this.state.activeTab.toString();\n\t\t}\n\t\tif (this.state.selectedHealthSystem !== null && this.state.selectedHealthSystem.value !== '0') {\n\t\t\tqueryParams.healthSystem = this.state.selectedHealthSystem.value;\n\t\t}\n\t\tif (this.state.selectedHospitalId !== null && this.state.selectedHospitalId !== '0' && this.state.selectedHospitalId !== 0) {\n\t\t\tqueryParams.hospital = this.state.selectedHospitalId;\n\t\t}\n\t\tif (this.state.selectedDepartmentId !== null && this.state.selectedDepartmentId !== '0' && this.state.selectedDepartmentId !== 0) {\n\t\t\tqueryParams.department = this.state.selectedDepartmentId;\n\t\t}\n\t\tif (this.state.selectedRole !== null && this.state.selectedRole.value !== '0') {\n\t\t\tqueryParams.role = this.state.selectedRole.value.toString();\n\t\t}\n\t\tif (this.state.activeSubTab > 0) {\n\t\t\tqueryParams.activeSubTab = this.state.activeSubTab.toString();\n\t\t}\n\t\tthis.props.history.push({ search: queryString.stringify(queryParams) });\n\t};\n\n\ttabs = {\n\t\tUSER_IDLE_TIMEOUT: 0,\n\t\tDEVICE: 1,\n\t\tACTIVE_DIRECTORY: 2,\n\t\tNETWORK: 3,\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    Configurations

    \n\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\tonTabChange={this.onTabChange}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\nexport default Configurations;\n","import React from 'react';\nimport Layout from 'components/Common/Layout';\nimport { Grid, Table } from 'components';\nimport Header from 'components/Common/Header';\nimport Pagination from 'components/Common/Pagination';\nimport { getUserIdleConfigurationHistory, getDeviceConfigurationHistory } from 'api/userIdleConfigurations';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { ConfigHistoryTypes, TeamTypes, TelehealthTv } from 'constants/enums';\nimport { getActiveDirectoriesHistory } from 'api/activeDirectories';\nimport { getTeamConfigurationProfilesHisotry } from 'api/teamConfigurationProfiles';\nimport { getNtpConfigurationHistory } from 'api/ntpConfig';\n\nexport default class ConfigurationsHistory extends React.Component {\n\tstate = {\n\t\tisLoading: true,\n\t\tpageSize: { value: 10, label: '10' },\n\t\tpageIndex: 0,\n\t\ttotalConfigs: 0,\n\t\tconfigs: [],\n\t\ttitle: '',\n\t};\n\n\tuserIdleHeaders = [{ title: 'Health System' }, { title: 'Role' }, { title: 'Timeout Minutes' }, { title: 'Edited by' }, { title: 'Date Edited' }];\n\n\tdeviceConfigHeaders = [\n\t\t{ title: 'Department' },\n\t\t{ title: 'HDMI Port' },\n\t\t{ title: 'Default Source' },\n\t\t{ title: 'Ringtone Volume' },\n\t\t{ title: 'TV' },\n\t\t{ title: 'Profile name' },\n\t\t{ title: 'Edited by' },\n\t\t{ title: 'Date Edited' },\n\t];\n\n\tactiveDirectoriesHeaders = [{ title: 'Hospital' }, { title: 'Domain' }, { title: 'Valid Group Name' }, { title: 'Edited by' }, { title: 'Date Edited' }];\n\n\tteamProfileHeaders = [\n\t\t{ title: 'Health System' },\n\t\t{ title: 'Profile Name' },\n\t\t{ title: 'URL' },\n\t\t{ title: 'Port' },\n\t\t{ title: 'Edited by' },\n\t\t{ title: 'Date Edited' },\n\t];\n\n\tntpConfigHeaders = [{ title: 'Name' }, { title: 'Type' }, { title: 'NTP Endpoint' }, { title: 'Edited By' }, { title: 'Date Edited' }];\n\n\tendCallSource = {\n\t\t0: 'TV Channels',\n\t\t1: 'HDMI 1',\n\t\t2: 'HDMI 2',\n\t\t3: 'HDMI 3',\n\t};\n\n\tactiveDirectory = null;\n\n\tteamProfile = null;\n\n\tntpConfigurations = null;\n\n\tcomponentDidMount = () => {\n\t\tthis.getConfigurationHistory();\n\t};\n\n\tgetConfigurationHistory = async () => {\n\t\tconst { id, type } = this.props.match.params;\n\t\tconst params = { id: id, pageSize: this.state.pageSize.value, pageIndex: this.state.pageIndex };\n\n\t\tif (type === ConfigHistoryTypes.UserIdle) {\n\t\t\tconst result = await getUserIdleConfigurationHistory(params);\n\t\t\tthis.setState({\n\t\t\t\tconfigs: result.history,\n\t\t\t\ttotalConfigs: result.total,\n\t\t\t\ttitle: `History for ${result.userIdleConfiguration.team.name}, role ${result.userIdleConfiguration.role.name}`,\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t} else if (type === ConfigHistoryTypes.Devices) {\n\t\t\tconst result = await getDeviceConfigurationHistory(id, {\n\t\t\t\tpageSize: this.state.pageSize.value,\n\t\t\t\tpageIndex: this.state.pageIndex,\n\t\t\t\tteamTypeId: TeamTypes.DEPARTMENT,\n\t\t\t});\n\n\t\t\tthis.setState({\n\t\t\t\tconfigs: result.deviceConfigurations,\n\t\t\t\ttotalConfigs: result.total,\n\t\t\t\ttitle: `History for ${result.deviceConfiguration.team.name}`,\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t} else if (type === ConfigHistoryTypes.ADs) {\n\t\t\tconst result = await getActiveDirectoriesHistory(id, {\n\t\t\t\tpageSize: this.state.pageSize.value,\n\t\t\t\tpageIndex: this.state.pageIndex,\n\t\t\t});\n\n\t\t\tthis.activeDirectory = result.activeDirectory;\n\n\t\t\tthis.setState({\n\t\t\t\tconfigs: result.history,\n\t\t\t\ttotalConfigs: result.total,\n\t\t\t\ttitle: `History for ${result.activeDirectory.team.name}, domain: ${result.activeDirectory.domain}, valid group name: ${result.activeDirectory.validGroupName}`,\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t} else if (type === ConfigHistoryTypes.TeamConfigurationProfiles) {\n\t\t\tconst result = await getTeamConfigurationProfilesHisotry({\n\t\t\t\tid,\n\t\t\t\tpageSize: this.state.pageSize.value,\n\t\t\t\tpageIndex: this.state.pageIndex,\n\t\t\t});\n\n\t\t\tthis.teamProfile = result.teamConfigurationProfile;\n\t\t\tthis.setState({\n\t\t\t\tconfigs: result.history,\n\t\t\t\ttotalConfigs: result.total,\n\t\t\t\ttitle: `History for ${result.teamConfigurationProfile.team.name}`,\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t} else if (type === ConfigHistoryTypes.NtpConfiguration) {\n\t\t\tconst result = await getNtpConfigurationHistory({\n\t\t\t\tid,\n\t\t\t\tpageSize: this.state.pageSize.value,\n\t\t\t\tpageIndex: this.state.pageIndex,\n\t\t\t});\n\n\t\t\tif (!result.error) {\n\t\t\t\tthis.ntpConfigurations = result.teamNetworkNtpConfiguration;\n\t\t\t\tthis.setState({\n\t\t\t\t\tconfigs: result.history,\n\t\t\t\t\ttotalConfigs: result.total,\n\t\t\t\t\ttitle: `Ntp Configuration history for ${result.teamNetworkNtpConfiguration.team.name}`,\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.setState({\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t}\n\t};\n\n\tonPaginationChange = (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t\tpageSize,\n\t\t\t\tpageIndex,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.getConfigurationHistory();\n\t\t\t}\n\t\t);\n\t};\n\n\tgetClassName = config => {\n\t\tif (config.isActive) {\n\t\t\treturn 'active-configuration';\n\t\t}\n\t\tif (config.isDeleted) {\n\t\t\treturn 'deleted-configuration';\n\t\t}\n\t\treturn '';\n\t};\n\n\ttransformConfigurations = () => {\n\t\tconst configs = this.state.configs.map(config => {\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.UserIdle) {\n\t\t\t\treturn {\n\t\t\t\t\thealthSystem: config.team.name,\n\t\t\t\t\trole: config.role.name,\n\t\t\t\t\ttimeoutMinutes: config.timeoutMinutes,\n\t\t\t\t\tcreatedBy: `${config.userCreated.firstName} ${config.userCreated.lastName}`,\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: config.isActive ? 'active-configuration' : '',\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.Devices) {\n\t\t\t\treturn {\n\t\t\t\t\thospital: config.team.name,\n\t\t\t\t\thdmiPort: config.hdmiPort,\n\t\t\t\t\tdefaultSource: this.endCallSource[config.defaultSource],\n\t\t\t\t\tringtoneVolume: config.ringtoneVolume,\n\t\t\t\t\ttv: config.tv === TelehealthTv.value ? TelehealthTv.label : config.tv,\n\t\t\t\t\tprofileName: config.teamConfigurationProfile ? config.teamConfigurationProfile.profileName : '',\n\t\t\t\t\tcreatedBy: `${config.userCreated.firstName} ${config.userCreated.lastName}`,\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: this.getClassName(config),\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.ADs) {\n\t\t\t\treturn {\n\t\t\t\t\thospital: config.team.name,\n\t\t\t\t\tdomain: config.domain,\n\t\t\t\t\tvalidGroupName: config.validGroupName,\n\t\t\t\t\teditedBy: config.userEdited ? `${config.userEdited.firstName} ${config.userEdited.lastName}` : '',\n\t\t\t\t\tdateEdited: moment(utcToLocalTime(config.dateEdited)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: '',\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.TeamConfigurationProfiles) {\n\t\t\t\treturn {\n\t\t\t\t\thealthSystem: config.team.name,\n\t\t\t\t\tprofileName: config.profileName,\n\t\t\t\t\turl: config.url,\n\t\t\t\t\tport: config.port,\n\t\t\t\t\tcreatedBy: config.userEdited ? `${config.userEdited.firstName} ${config.userEdited.lastName}` : '',\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(config.dateEdited)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: config.isActive ? 'active-configuration' : '',\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.NtpConfiguration) {\n\t\t\t\treturn {\n\t\t\t\t\tname: config.team.name,\n\t\t\t\t\ttype: config.team.typeId === TeamTypes.HEALTHSYSTEM ? 'Health System' : 'Hospital',\n\t\t\t\t\tntpUrl: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{config.ntpUrls.map(el => (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{el}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t\tcreatedBy: `${config.userEdited.firstName} ${config.userEdited.lastName}`,\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(config.dateEdited)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: this.getClassName(config),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\n\t\tif (this.props.match.params.type === ConfigHistoryTypes.ADs) {\n\t\t\tconfigs.unshift({\n\t\t\t\thospital: this.activeDirectory.team.name,\n\t\t\t\tdomain: this.activeDirectory.domain,\n\t\t\t\tvalidGroupName: this.activeDirectory.validGroupName,\n\t\t\t\teditedBy: `${this.activeDirectory.userCreated.firstName} ${this.activeDirectory.userCreated.lastName}`,\n\t\t\t\tdateEdited: moment(utcToLocalTime(this.activeDirectory.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tclassName: 'active-configuration',\n\t\t\t});\n\t\t} else if (this.props.match.params.type === ConfigHistoryTypes.TeamConfigurationProfiles) {\n\t\t\tconfigs.unshift({\n\t\t\t\thealthSystem: this.teamProfile.team.name,\n\t\t\t\tprofileName: this.teamProfile.profileName,\n\t\t\t\turl: this.teamProfile.url,\n\t\t\t\tport: this.teamProfile.port,\n\t\t\t\tcreatedBy: `${this.teamProfile.userCreated.firstName} ${this.teamProfile.userCreated.lastName}`,\n\t\t\t\tdateCreated: moment(utcToLocalTime(this.teamProfile.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tclassName: 'active-configuration',\n\t\t\t});\n\t\t} else if (this.props.match.params.type === ConfigHistoryTypes.NtpConfiguration) {\n\t\t\tconfigs.unshift({\n\t\t\t\tname: this.ntpConfigurations.team.name,\n\t\t\t\ttype: this.ntpConfigurations.team.typeId === TeamTypes.HEALTHSYSTEM ? 'Health System' : 'Hospital',\n\t\t\t\tntpUrl: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{this.ntpConfigurations.ntpUrls.map(el => (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{el}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\tcreatedBy: `${this.ntpConfigurations.userCreated.firstName} ${this.ntpConfigurations.userCreated.lastName}`,\n\t\t\t\tdateCreated: moment(utcToLocalTime(this.ntpConfigurations.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tclassName: this.getClassName(this.ntpConfigurations),\n\t\t\t});\n\t\t}\n\t\treturn configs;\n\t};\n\n\tgetHeaders = () => {\n\t\tswitch (this.props.match.params.type) {\n\t\t\tcase ConfigHistoryTypes.UserIdle:\n\t\t\t\treturn this.userIdleHeaders;\n\t\t\tcase ConfigHistoryTypes.Devices:\n\t\t\t\treturn this.deviceConfigHeaders;\n\t\t\tcase ConfigHistoryTypes.ADs:\n\t\t\t\treturn this.activeDirectoriesHeaders;\n\t\t\tcase ConfigHistoryTypes.TeamConfigurationProfiles:\n\t\t\t\treturn this.teamProfileHeaders;\n\t\t\tcase ConfigHistoryTypes.NtpConfiguration:\n\t\t\t\treturn this.ntpConfigHeaders;\n\t\t\tdefault:\n\t\t\t\treturn [];\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t window.history.back()}>\n\t\t\t\t\t\t\t\t\t\t\tkeyboard_arrow_left\n\t\t\t\t\t\t\t\t\t\t\tGo back to configurations\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t

    {this.state.title}

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.onPaginationChange(pageSize, pageIndex)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n","import React from 'react';\nimport { Route } from 'react-router-dom';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\nimport { memberExists } from 'infrastructure/auth';\nimport UserError from 'views/UserError';\nimport { AuthConsumer } from 'providers/authProvider';\n\nconst JWTAuthenticatedRoute = ({ component, ...rest }) => {\n\tconst renderFn = Component => props => (\n\t\t\n\t\t\t{({ isAzureAuthentication, signinRedirect }) => {\n\t\t\t\tif (!!Component && isAzureAuthentication()) {\n\t\t\t\t\tif (memberExists() || props.match.url === '/logout') {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t}\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\n\t\t\t\tsigninRedirect(true);\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t);\n\t\t\t}}\n\t\t
    \n\t);\n\n\treturn ;\n};\n\nexport default JWTAuthenticatedRoute;\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nconst TimeError = () => (\n\t\n\t\t
    \n\t\t\t

    Invalid datetime of token.

    \n\t\t\tmember-error\n\t\t\t

    The token seems to be invalid. Please make sure your machine has the current time zone and/or Date and time and try again.

    \n\t\t\t {\n\t\t\t\t\twindow.location.href = '/logout';\n\t\t\t\t}}>\n\t\t\t\tClick here to go back to login screen.\n\t\t\t\n\t\t
    \n\t
    \n);\n\nexport default TimeError;\n","import * as React from 'react';\nimport { Route, Switch } from 'react-router-dom';\n\nimport Callback from 'components/auth/callback';\nimport { Logout } from 'components/auth/logout';\nimport { LogoutCallback } from 'components/auth/logoutCallback';\nimport { PrivateRoute } from 'routes/privateRoute';\n// import { Register } from \"components/auth/register\";\nimport { SilentRenew } from 'components/auth/silentRenew';\nimport Organization from 'views/Organization/Organization';\nimport Monitoring from 'views/Monitoring';\nimport CallLogs from 'views/CallLogs';\nimport Call from 'views/Call';\nimport PatientFeed from 'views/PatientFeed';\nimport Users from 'views/Users';\nimport Login from 'views/Login';\nimport CreateHealthSystem from 'views/CreateHealthSystem';\nimport CompleteProfile from 'views/CompleteProfile';\nimport Help from 'views/Help';\nimport Recover from 'views/Recover';\nimport ResetPassword from 'views/ResetPassword';\nimport { UserRoles } from 'constants/enums';\nimport Configurations from 'views/Configurations';\nimport ConfigurationsHistory from 'views/ConfigurationsHistory';\nimport JWTAuthenticatedRoute from 'routes/jwtAuthenticatedRoute';\nimport TimeError from 'views/TimeError';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const Routes = (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import React from 'react';\nimport { AuthConsumer } from '../../providers/authProvider';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\n\nexport const Logout = () => (\n\t\n\t\t{({ logout }) => {\n\t\t\tlogout();\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}}\n\t
    \n);\n","import React from 'react';\nimport { AuthConsumer } from '../../providers/authProvider';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\n\nexport const LogoutCallback = () => (\n\t\n\t\t{({ signoutRedirectCallback }) => {\n\t\t\tsignoutRedirectCallback();\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}}\n\t
    \n);\n","import React from 'react';\nimport { AuthConsumer } from '../../providers/authProvider';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\n\nexport const SilentRenew = () => (\n\t\n\t\t{({ signinSilentCallback }) => {\n\t\t\tsigninSilentCallback();\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}}\n\t
    \n);\n","import React from 'react';\nimport io from 'socket.io-client';\nimport _ from 'lodash';\nimport SocketEvents from 'constants/socket-events';\nimport { PresenceStatusType, SocketState, DeviceStatus, ParticipantState, UserRoles } from 'constants/enums';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { isAuthenticated, getAccessToken, getUserId, hasUserProfile, getUserProfile, memberExists, getUserRole } from 'infrastructure/auth';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { fetchUserPresence, fetchUserPresenceSucceeded, userPresenceUpdateSucceeded } from 'state/userPresence/actions';\nimport { APP_CONFIG, BanyanClientType, BanyanAppType } from 'constants/global-variables';\nimport { SocketContext } from './SocketContext';\nimport { findDeviceById } from 'infrastructure/helpers/commonHelpers';\n\nclass Socket extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.connect();\n\t}\n\n\tconnect = () => {\n\t\tif (!isAuthenticated() || !memberExists()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst signalingUrl = `${\n\t\t\tprocess.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test' ? process.env.REACT_APP_SIGNALING_URL : window.__env__.REACT_APP_SIGNALING_URL\n\t\t}banyan`;\n\n\t\tthis._socket = io.connect(signalingUrl, {\n\t\t\tsecure: true,\n\t\t\ttransports: ['websocket'],\n\t\t});\n\n\t\tthis.initSocketListeners();\n\t};\n\n\tinitSocketListeners = () => {\n\t\tconst { _socket } = this;\n\t\tlet myClientInfo = null;\n\t\tlet mySocketId = null;\n\n\t\t_socket.on(SocketEvents.Client.ON_CONNECT, () => {\n\t\t\t// change socket state to SocketState.CONNECTED only if it's from re-connection\n\t\t\tif (mySocketId) {\n\t\t\t\tthis.props.onConnectionStateChange(SocketState.CONNECTED);\n\t\t\t}\n\n\t\t\tmyClientInfo = {\n\t\t\t\ttoken: getAccessToken(),\n\t\t\t\tclearConferences: false,\n\t\t\t\tclientType: BanyanClientType,\n\t\t\t\tappType: BanyanAppType,\n\t\t\t\tversionName: APP_CONFIG.buildNumber,\n\t\t\t\toldSocketId: mySocketId,\n\t\t\t\tincomingCallsDisabled: this.props.shouldDisableIncomingCalls(),\n\t\t\t};\n\n\t\t\tmySocketId = _socket.id;\n\t\t\t_socket.emit(SocketEvents.Client.AUTHORIZE, myClientInfo, this.handleUserPresence);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_DISCONNECT, reason => {\n\t\t\tif (reason === 'io server disconnect') {\n\t\t\t\t// the disconnection was initiated by the server, you need to reconnect manually\n\t\t\t\t_socket.connect();\n\t\t\t}\n\n\t\t\tthis.props.onConnectionStateChange(SocketState.DISCONNECTED);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_RECONNECTING, () => {\n\t\t\tthis.props.onConnectionStateChange(SocketState.RECONNECTING);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_DEVICE_OFFLINE, _data => {\n\t\t\tif (!this.props.organization.treeData.tree) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.setStatusDevice(_data.helloDeviceId, false);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_DEVICE_ONLINE, _data => {\n\t\t\tif (!this.props.organization.treeData.tree) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setStatusDevice(_data.helloDeviceId, true);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_UPDATED_USER_PRESENCE, data => {\n\t\t\tconst isCurrentUser = data.objectId === getUserProfile().userId;\n\t\t\tif (isCurrentUser) {\n\t\t\t\tthis.props.fetchUserPresenceSucceeded(data);\n\t\t\t}\n\t\t\tthis.props.userPresenceUpdateSucceeded(getUserId(), data.customMessage, data.presenceStatusTypeId);\n\t\t});\n\n\t\t_socket.on(SocketEvents.HelloDevice.ON_UPDATE, _data => {\n\t\t\tif (!this.props.organization.treeData.tree) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setStatusDevice(_data.id, _data.status);\n\t\t});\n\n\t\t_socket.on('error', function(err) {\n\t\t\tconsole.error(`Socket.IO error: ${err}`);\n\t\t});\n\n\t\t_socket.on(SocketEvents.User.NOTIFICATIONS_UPDATED, () => {\n\t\t\tthis.props.fetchNotificationsCounter();\n\t\t});\n\n\t\t_socket.on(SocketEvents.User.ON_PASSWORD_CHANGED, () => {\n\t\t\twindow.location.href = '/logout';\n\t\t});\n\n\t\t_socket.on(SocketEvents.HelloDevice.ON_CALL_STATE_CHANGED, data => {\n\t\t\tthis.setDeviceCallState(data);\n\t\t});\n\t};\n\n\tsetStatusDevice = (deviceId, isOnline) => {\n\t\tconst newTree = JSON.parse(JSON.stringify(this.props.organization.treeData.tree));\n\t\tconst room = findDeviceById(newTree, deviceId);\n\n\t\tif (room) {\n\t\t\troom.status = isOnline ? DeviceStatus.ONLINE : DeviceStatus.OFFLINE;\n\t\t\tif (!isOnline) {\n\t\t\t\troom.deviceBusy = false;\n\t\t\t\troom.activeConferences = [];\n\t\t\t}\n\t\t\tthis.props.organizationActions.setTreeData({\n\t\t\t\ttree: newTree,\n\t\t\t\tpreSelected: this.props.organization.treeData.preSelected,\n\t\t\t});\n\t\t}\n\t};\n\n\tsetDeviceCallState = ({ deviceId, activeConferences }) => {\n\t\tconst tree = _.cloneDeep(this.props.organization.treeData.tree);\n\t\tconst room = findDeviceById(tree, deviceId);\n\n\t\tif (!room) {\n\t\t\treturn;\n\t\t}\n\n\t\troom.deviceBusy = activeConferences.length > 0;\n\t\troom.activeConferences = activeConferences;\n\t\tthis.props.organizationActions.setTreeData({\n\t\t\ttree,\n\t\t\tpreSelected: this.props.organization.treeData.preSelected,\n\t\t});\n\t};\n\n\thandleUserPresence = data => {\n\t\tconst noCallsShouldBeReceived = '2';\n\t\tif (\n\t\t\tgetUserRole() === UserRoles.NURSE &&\n\t\t\t(!localStorage.getItem('nursePoolingStatus') || localStorage.getItem('nursePoolingStatus') === noCallsShouldBeReceived)\n\t\t) {\n\t\t\tthis.changeUserPresence(PresenceStatusType.UNAVAILABLE);\n\t\t\treturn;\n\t\t}\n\t\tif (data && data.userSocketsLength === 1) {\n\t\t\tconst presenceStatusTypeId = localStorage.getItem('presenceStatusTypeId');\n\t\t\tconst notFirstConnect = sessionStorage.getItem('notFirstConnect');\n\n\t\t\tif (presenceStatusTypeId && notFirstConnect) {\n\t\t\t\tconst a = JSON.parse(presenceStatusTypeId);\n\n\t\t\t\tthis.changeUserPresence(a);\n\t\t\t} else {\n\t\t\t\tthis.changeUserPresence(PresenceStatusType.AVAILABLE);\n\t\t\t\tif (presenceStatusTypeId) {\n\t\t\t\t\tlocalStorage.removeItem('presenceStatusTypeId');\n\t\t\t\t}\n\t\t\t}\n\t\t\tsessionStorage.setItem('notFirstConnect', 'true');\n\t\t} else {\n\t\t\tthis.props.fetchUserPresence();\n\t\t}\n\t};\n\n\tchangeUserPresence = presenceStatusTypeId => {\n\t\tconst data = {\n\t\t\tuserId: getUserId(),\n\t\t\tpresenceStatusTypeId: presenceStatusTypeId,\n\t\t\tcustomMessage: null,\n\t\t};\n\t\tthis._socket.emit(SocketEvents.Client.UPDATE_USER_PRESENCE, data);\n\t};\n\n\trender() {\n\t\treturn {this.props.children};\n\t}\n}\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tfetchNotificationsCounter: () => dispatch(fetchNotificationCounter()),\n\t\tfetchUserPresence: () => dispatch(fetchUserPresence()),\n\t\tfetchUserPresenceSucceeded: () => dispatch(fetchUserPresenceSucceeded()),\n\t\tuserPresenceUpdateSucceeded: (userId, customMessage, presenceStatusTypeId) =>\n\t\t\tdispatch(userPresenceUpdateSucceeded(userId, customMessage, presenceStatusTypeId)),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Socket);\n","import React, { Component } from 'react';\nimport { Grid, Button, Avatar } from 'components';\nimport { SocketContext } from 'io-client/SocketContext';\nimport SocketEvents from 'constants/socket-events';\nimport { incomingCallSound, stopIncomingCallSound, dropSound } from 'components/CallSounds';\nimport { connect } from 'react-redux';\nimport { defaultDocumentTitle } from 'constants/global-variables';\nimport { getUserProfile, setUserProfile } from 'infrastructure/auth';\nimport { MediaPermissions, StreamError, MediaTypes } from 'constants/enums';\nimport { askForPermission, checkForPermission, checkIfMediaDevicesPlugged } from 'infrastructure/helpers/commonHelpers';\n\nclass IncomingCall extends Component {\n\tconstructor(props, socket) {\n\t\tsuper(props, socket);\n\t\tthis.state = {\n\t\t\tshowSelf: false,\n\t\t};\n\t\tthis.socket = socket;\n\t\tthis.incomingConferenceInfo = null;\n\t\tthis.incomingCallNotification = null;\n\t\tthis.notificationPermission = {\n\t\t\tGRANTED: 'granted',\n\t\t\tDENIED: 'denied',\n\t\t};\n\t\tthis.micStatus = null;\n\t\tthis.incomingCallAudio = null;\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.micStatus.onchange = this.onDevicePermissionChange;\n\t\tthis.addOnUnloadEvent();\n\t\tthis.addSocketListeners();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.removeSocketListeners();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tif (this.state.showSelf) {\n\t\t\tdocument.title = `Patient is calling - ${defaultDocumentTitle}`;\n\t\t} else {\n\t\t\tdocument.title = `${this.props.notifications.notificationsCounter ? `(${this.props.notifications.notificationsCounter})` : ''} ${defaultDocumentTitle}`;\n\t\t}\n\t}\n\n\tstartIncomingCallTimer = () => {\n\t\tthis.incomingCallTimer = setTimeout(() => {\n\t\t\tif (this.incomingConferenceInfo) {\n\t\t\t\tthis.socket.emit(SocketEvents.Conference.NOT_ANSWERING, {\n\t\t\t\t\tparticipantId: this.incomingConferenceInfo.participantId,\n\t\t\t\t\tconferenceId: this.incomingConferenceInfo.conferenceId,\n\t\t\t\t});\n\t\t\t\tthis.sendMissedCallNotification();\n\t\t\t}\n\t\t\tthis.hideIncomingCall();\n\t\t}, 15000);\n\t};\n\n\taddOnUnloadEvent = () => {\n\t\twindow.addEventListener('beforeunload', () => {\n\t\t\tif (this.incomingConferenceInfo) {\n\t\t\t\tthis.socket.emit(SocketEvents.Conference.DECLINE, {\n\t\t\t\t\tconferenceId: this.incomingConferenceInfo.conferenceId,\n\t\t\t\t\tparticipantId: this.incomingConferenceInfo.participantId,\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.hideIncomingCall();\n\t\t});\n\t};\n\n\tonAnsweredElsewhere = () => {\n\t\tthis.hideIncomingCall();\n\t};\n\n\tonInitiatorLeft = async () => {\n\t\tthis.hideIncomingCall();\n\t\tawait dropSound();\n\t};\n\n\tonIncomingCall = async conferenceInfo => {\n\t\tif (!this.incomingCallAudio || !this.incomingCallAudio.paused) {\n\t\t\tthis.incomingCallAudio = await incomingCallSound();\n\t\t}\n\t\tthis.incomingConferenceInfo = conferenceInfo;\n\t\tthis.setState({ showSelf: true }, () => {\n\t\t\tthis.startIncomingCallTimer();\n\t\t\tthis.incomingCallNotification = this.sendIncomingCallNotification();\n\t\t});\n\t};\n\n\taddSocketListeners = () => {\n\t\tif (!this.socket) return;\n\n\t\tthis.socket\n\t\t\t.on(SocketEvents.Conference.ON_ANSWERED_ELSEWHERE, this.onAnsweredElsewhere)\n\t\t\t.on(SocketEvents.Conference.ON_INITIATOR_LEFT, this.onInitiatorLeft)\n\t\t\t.on(SocketEvents.Conference.ON_INCOMING, this.onIncomingCall);\n\t};\n\n\tremoveSocketListeners = () => {\n\t\tif (!this.socket) return;\n\n\t\tthis.socket\n\t\t\t.off(SocketEvents.Conference.ON_ANSWERED_ELSEWHERE, this.onAnsweredElsewhere)\n\t\t\t.off(SocketEvents.Conference.ON_INITIATOR_LEFT, this.onInitiatorLeft)\n\t\t\t.off(SocketEvents.Conference.ON_INCOMING, this.onIncomingCall);\n\t};\n\n\tonDevicePermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t}\n\t};\n\n\tdeclineIncomingCall = () => {\n\t\tif (this.incomingConferenceInfo) {\n\t\t\tthis.socket.emit(SocketEvents.Conference.DECLINE, {\n\t\t\t\tconferenceId: this.incomingConferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.incomingConferenceInfo.participantId,\n\t\t\t});\n\t\t}\n\t\tthis.hideIncomingCall();\n\t};\n\n\tacceptIncomingCall = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.camera || !pluggedDevices.microphone) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: !pluggedDevices.camera ? StreamError.CAMERA_NOT_FOUND.type : StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tlet permissionRes = await askForPermission({ audio: true });\n\t\tif (permissionRes.error) {\n\t\t\tif (permissionRes.error.name === 'NotReadableError') {\n\t\t\t\tif (permissionRes.error.message.includes('audio')) {\n\t\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.openCallWindow();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'popup',\n\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (permissionRes.permission === MediaPermissions.GRANTED) {\n\t\t\tthis.openCallWindow();\n\t\t} else {\n\t\t\tif (this.micStatus.state === MediaPermissions.GRANTED) {\n\t\t\t\tthis.openCallWindow();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.micStatus.state === MediaPermissions.PROMPT && this.micStatus.state !== MediaPermissions.DENIED) {\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.micStatus.state === MediaPermissions.PROMPT) {\n\t\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t\t}\n\t\t}\n\t};\n\n\topenCallWindow = () => {\n\t\tconst conferenceName = this.incomingConferenceInfo.conferenceName.split('-')[1].trim();\n\t\tlocalStorage.setItem('incomingConferenceInfo', JSON.stringify(this.incomingConferenceInfo));\n\n\t\tlet userInfo = getUserProfile();\n\t\tuserInfo = { ...userInfo, incomingCallsDisabled: true };\n\t\tsetUserProfile(userInfo);\n\n\t\twindow.open(`call/audio/${this.incomingConferenceInfo.from.objectId}/${encodeURIComponent(conferenceName)}/join`, '_blank');\n\t\tthis.hideIncomingCall();\n\t\tthis.incomingCallNotification.then(notification => {\n\t\t\tif (notification) {\n\t\t\t\tnotification.close();\n\t\t\t}\n\t\t});\n\t};\n\n\tgetDeviceName = () => {\n\t\treturn this.incomingConferenceInfo.from.name.replace(/[,]/g, ' >').replace(/[-]/g, '>');\n\t};\n\n\tsendIncomingCallNotification = () => {\n\t\treturn this.sendNotification({\n\t\t\ttitle: 'Incoming call',\n\t\t\tbody: this.getDeviceName(),\n\t\t\ttag: `incoming-${this.incomingConferenceInfo.conferenceId}`,\n\t\t\trenotify: true,\n\t\t});\n\t};\n\n\tsendMissedCallNotification = () => {\n\t\tthis.sendNotification(\n\t\t\t{\n\t\t\t\ttitle: 'Missed call',\n\t\t\t\tbody: this.getDeviceName(),\n\t\t\t\ttag: `missed-${this.incomingConferenceInfo.conferenceId}`,\n\t\t\t\trenotify: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\t//Its only a temporary solution since solution with redux requires some refactoring\n\t\t\t\tdocument.querySelector('#notifications > a').click();\n\t\t\t}\n\t\t);\n\t};\n\n\tsendNotification = async (options, onClickCallback) => {\n\t\tlet newNotification;\n\t\tif (Notification.permission !== this.notificationPermission.GRANTED) {\n\t\t\tawait Notification.requestPermission();\n\t\t}\n\t\tif (Notification.permission === this.notificationPermission.GRANTED) {\n\t\t\tnewNotification = new Notification(options.title, {\n\t\t\t\tbody: options.body,\n\t\t\t\ttag: options.tag,\n\t\t\t\trenotify: options.renotify,\n\t\t\t});\n\t\t\tnewNotification.onclick = function() {\n\t\t\t\twindow.focus();\n\t\t\t\tonClickCallback();\n\t\t\t};\n\t\t}\n\t\treturn newNotification;\n\t};\n\n\tclearIncomingCallTimer = () => {\n\t\tif (this.incomingCallTimer) {\n\t\t\tclearTimeout(this.incomingCallTimer);\n\t\t\tthis.incomingCallTimer = null;\n\t\t}\n\t};\n\n\thideIncomingCall = () => {\n\t\tif (this.incomingConferenceInfo) {\n\t\t\tthis.incomingConferenceInfo = null;\n\t\t\tthis.clearIncomingCallTimer();\n\t\t\tthis.setState({ showSelf: false });\n\t\t}\n\n\t\tstopIncomingCallSound();\n\t\tthis.incomingCallAudio = null;\n\t};\n\n\trender() {\n\t\tconst { showSelf } = this.state;\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{showSelf && (\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    {this.incomingConferenceInfo.from.name}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nIncomingCall.contextType = SocketContext;\n\nexport default connect(state => state)(IncomingCall);\n","const channel = new BroadcastChannel('userIdle');\n\nexport const postUserIdleMessage = msg => {\n\tchannel.postMessage(msg);\n};\n\nexport const onUserIdleMessage = handler => {\n\tchannel.onmessage = handler;\n};\n\nexport const closeUserIdleChannel = () => {\n\tif (channel) {\n\t\tchannel.close();\n\t}\n};\n","import React from 'react';\nimport { Modal } from 'components';\nimport { postUserIdleMessage, onUserIdleMessage, closeUserIdleChannel } from 'infrastructure/helpers/userIdleChannel';\nimport { getUserRoleId } from 'infrastructure/auth';\nimport { getUserIdleConfigurationMinutes } from 'api/userIdleConfigurations';\n\nexport default class UserIdleCheck extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisLogoutAlertOn: false,\n\t\t\tsecondCounter: null,\n\t\t\tminutes: null,\n\t\t};\n\t}\n\n\tuserIdleTimeout = null;\n\n\talertDisplayTime = 30; // seconds\n\n\tpostMessages = {\n\t\tCONFIRMED: 'CONFIRMED',\n\t\tIN_CALL: 'IN_CALL',\n\t};\n\n\tcomponentDidMount = async () => {\n\t\tconst roleId = getUserRoleId();\n\t\tif (this.props.healthSystemId && roleId) {\n\t\t\tthis.unbindListeners();\n\t\t\tawait this.getUserIdleConfiguration(this.props.healthSystemId, roleId);\n\t\t\tthis.startTimeout();\n\t\t\tthis.bindListeners();\n\t\t}\n\t};\n\n\tcomponentDidUpdate = async prevProps => {\n\t\tif (prevProps.healthSystemId !== this.props.healthSystemId) {\n\t\t\tconst roleId = getUserRoleId();\n\t\t\tawait this.getUserIdleConfiguration(this.props.healthSystemId, roleId);\n\t\t\tthis.startTimeout();\n\t\t\tthis.resetTimeout();\n\t\t}\n\t};\n\n\tgetUserIdleConfiguration = async (healthSystemId, roleId) => {\n\t\ttry {\n\t\t\tconst result = await getUserIdleConfigurationMinutes(healthSystemId, roleId);\n\t\t\tthis.setState({\n\t\t\t\tminutes: result ? result.minutes : null,\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthis.setState({\n\t\t\t\tminutes: null,\n\t\t\t});\n\t\t}\n\t};\n\n\tcomponentWillUnmount = () => {\n\t\tthis.unbindListeners();\n\t\tclearTimeout(this.userIdleTimeout);\n\t\tclearInterval(this.logoutInterval);\n\t\tcloseUserIdleChannel();\n\t};\n\n\tsetActiveUser = () => {\n\t\tpostUserIdleMessage();\n\t\tthis.resetTimeout();\n\t};\n\n\tresetTimeout = () => {\n\t\tif (this.userIdleTimeout && !this.state.isLogoutAlertOn) {\n\t\t\tclearTimeout(this.userIdleTimeout);\n\t\t\tthis.startTimeout();\n\t\t}\n\t};\n\n\tbindListeners = () => {\n\t\twindow.addEventListener('mousemove', this.setActiveUser);\n\t\twindow.addEventListener('scroll', this.setActiveUser);\n\t\twindow.addEventListener('keydown', this.setActiveUser);\n\t\twindow.addEventListener('resize', this.setActiveUser);\n\t\twindow.addEventListener('click', this.setActiveUser);\n\t\tonUserIdleMessage(this.tabsListener);\n\t};\n\n\ttabsListener = message => {\n\t\tif (message.data === this.postMessages.CONFIRMED) {\n\t\t\tthis.resetActivity();\n\t\t} else {\n\t\t\tthis.resetTimeout();\n\t\t}\n\t};\n\n\tunbindListeners = () => {\n\t\twindow.removeEventListener('mousemove', this.setActiveUser);\n\t\twindow.removeEventListener('scroll', this.setActiveUser);\n\t\twindow.removeEventListener('keydown', this.setActiveUser);\n\t\twindow.removeEventListener('resize', this.setActiveUser);\n\t\twindow.removeEventListener('click', this.setActiveUser);\n\t};\n\n\tstartTimeout = () => {\n\t\tif (this.state.minutes) {\n\t\t\tthis.userIdleTimeout = setTimeout(() => {\n\t\t\t\tthis.openLogoutAlert();\n\t\t\t}, this.state.minutes * 60000);\n\t\t}\n\t};\n\n\topenLogoutAlert = () => {\n\t\tclearTimeout(this.userIdleTimeout);\n\t\tclearInterval(this.logoutInterval);\n\n\t\tthis.setState({ isLogoutAlertOn: true, secondCounter: this.alertDisplayTime });\n\n\t\tthis.logoutInterval = setInterval(() => {\n\t\t\tconst { secondCounter } = this.state;\n\t\t\tif (secondCounter > 0) {\n\t\t\t\tthis.setState({ secondCounter: this.state.secondCounter - 1 }, () => {\n\t\t\t\t\tif (this.state.secondCounter === 0) {\n\t\t\t\t\t\tclearInterval(this.logoutInterval);\n\t\t\t\t\t\tconst { pathname } = window.location;\n\t\t\t\t\t\tif (pathname.startsWith('/call/') || pathname.startsWith('/patient-feed/') || pathname === '/monitoring') {\n\t\t\t\t\t\t\tthis.setState({ isLogoutAlertOn: false });\n\t\t\t\t\t\t\twindow.postMessage(this.postMessages.IN_CALL, window.location.href);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twindow.location.href = '/logout';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, 1000);\n\t};\n\n\tcloseAlert = () => {\n\t\tpostUserIdleMessage(this.postMessages.CONFIRMED);\n\t\tthis.resetActivity();\n\t};\n\n\tresetActivity = () => {\n\t\tthis.setState({\n\t\t\tisLogoutAlertOn: false,\n\t\t});\n\t\tclearInterval(this.logoutInterval);\n\t\tthis.setActiveUser();\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t<>\n\t\t\t\t\t

    You have been idle for {this.state.minutes} minutes

    \n\t\t\t\t\t

    You will be logged out in case you don’t confirm your presence within the next {this.state.secondCounter} seconds

    \n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n","import React, { Component } from 'react';\nimport { AppInsightsContext, withAITracking } from '@microsoft/applicationinsights-react-js';\nimport { withRouter } from 'react-router-dom';\nimport { ai } from 'infrastructure/helpers/appInsightsTelemetry';\nimport { APP_CONFIG } from 'constants/global-variables';\n\nclass AppInsightsTelemetryProvider extends Component {\n\tstate = {\n\t\tinitialized: false,\n\t};\n\n\tcomponentDidMount() {\n\t\tconst { history } = this.props;\n\t\tconst { initialized } = this.state;\n\t\tconst appInsightsInstrumentationKey = APP_CONFIG.aiInstrumentationKey;\n\n\t\tif (!initialized && !!appInsightsInstrumentationKey && !!history) {\n\t\t\tai.initialize(appInsightsInstrumentationKey, history);\n\t\t\tthis.setState({ initialized: true });\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { children } = this.props;\n\t\treturn {children};\n\t}\n}\n\nexport default withRouter(withAITracking(ai.reactPlugin, AppInsightsTelemetryProvider));\n","import React from 'react';\nimport Modal from 'components/Modal';\nimport { StreamError } from 'constants/enums';\nimport Form from 'components/Form';\n\nconst StreamPermissionsModal = ({ setStreamPermissionMessage, reason }) => (\n\t {\n\t\t\tsetStreamPermissionMessage(null);\n\t\t}}>\n\t\t{(reason.type === StreamError.CAMERA_BLOCKED.type ||\n\t\t\treason.type === StreamError.MICROPHONE_BLOCKED.type ||\n\t\t\treason.type === StreamError.CAM_AND_MIC_BLOCKED.type) && (\n\t\t\t\n\t\t\t\t

    \n\t\t\t\t\tBanyan needs access to your{' '}\n\t\t\t\t\t{reason.type === StreamError.CAM_AND_MIC_BLOCKED.type\n\t\t\t\t\t\t? 'camera and microphone'\n\t\t\t\t\t\t: (reason.type === StreamError.CAMERA_BLOCKED.type && 'camera') || (reason.type === StreamError.MICROPHONE_BLOCKED.type && 'microphone')}{' '}\n\t\t\t\t\tso patients can hear you. Check the top left of the screen and click Allow.\n\t\t\t\t

    \n\t\t\t\n\t\t)}\n\t\t{(reason.type === StreamError.MICROPHONE_NOT_FOUND.type || reason.type === StreamError.CAMERA_NOT_FOUND.type) && (\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{reason.type === StreamError.MICROPHONE_NOT_FOUND.type\n\t\t\t\t\t\t? 'Please check on your system if a mic has been plugged in and you have allowed mic permissions. If not, plug one in or allow permissions and restart your browser. Patients won’t be able to hear you until you do that.'\n\t\t\t\t\t\t: 'Please check on your system if a camera has been plugged in and you have allowed camera permissions. If not, plug one in or allow permissions and restart your browser. Patients won’t be able to see you until you do that.'}\n\t\t\t\t

    \n\t\t\t\n\t\t)}\n\t\n);\n\nexport default StreamPermissionsModal;\n","import React, { Component } from 'react';\nimport { AuthProvider } from 'providers/authProvider';\nimport { BrowserRouter } from 'react-router-dom';\nimport { Routes } from 'routes/routes';\nimport Socket from 'io-client/Socket';\nimport { isAuthenticated, memberExists, setUserInfo, setTokens } from 'infrastructure/auth';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { Loader, Grid, Button, Alert } from 'components';\nimport { getCurrentHealthSystemInfo, findSectorById } from 'infrastructure/helpers/commonHelpers';\nimport { onMessage } from 'infrastructure/helpers/notificationsChannel';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { If, Then, Else } from 'react-if';\nimport IncomingCall from 'views/IncomingCall';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { SocketState } from 'constants/enums';\nimport queryString from 'query-string';\nimport UserIdleCheck from 'containers/UserIdleCheck';\nimport AppInsightsTelemetryProvider from 'components/AppInsightsTelemetryProvider';\nimport StreamPermissions from 'components/StreamPermissions';\nimport StreamPermissionsModal from 'components/StreamPermissionsModal';\n\nclass App extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tstartApplication: false,\n\t\t\tdisplayContentUpdatedAlert: false,\n\t\t\tdisplaySocketConnectionAlert: false,\n\t\t\tsocketConnectionState: SocketState.CONNECTED,\n\t\t};\n\n\t\tthis.versionTimeout = null;\n\t\tthis.socketStateTimeout = null;\n\t}\n\n\tcomponentDidMount = async () => {\n\t\tif (isAuthenticated()) {\n\t\t\tif (memberExists()) {\n\t\t\t\tlet healthSystemExists = await this.checkIfHealthSystemExists();\n\t\t\t\tif (!healthSystemExists && this.props.organization.allHealthSystems.length !== 0) {\n\t\t\t\t\tlet currentHealthSystemInfo = {\n\t\t\t\t\t\tcurrentHealthSystemId: this.props.organization.allHealthSystems[0].id,\n\t\t\t\t\t\tcurrentRegionId: this.props.organization.allHealthSystems[0].regions[0].id,\n\t\t\t\t\t};\n\t\t\t\t\tlocalStorage.setItem('currentHealthSystemInfo', JSON.stringify(currentHealthSystemInfo));\n\t\t\t\t}\n\t\t\t}\n\t\t\tonMessage(() => {\n\t\t\t\tthis.props.fetchNotificationCounter();\n\t\t\t});\n\t\t\tthis.startVersionTimeout();\n\t\t}\n\t\t// If tokens are provided and the url contains call\n\t\t// then set tokens along with the other data on localStorage\n\t\t// in order to bypass identity auth and get directly to call\n\t\tconst authResult = this.getTokensIfCall();\n\t\tif (authResult) {\n\t\t\tsetTokens(authResult);\n\t\t\tawait setUserInfo();\n\t\t}\n\t\tthis.setState({\n\t\t\tstartApplication: true,\n\t\t});\n\t};\n\n\tcheckIfHealthSystemExists = async () => {\n\t\tawait this.props.organizationActions.getAllHealthSystems();\n\t\tlet currentHealthSystemInfo = getCurrentHealthSystemInfo();\n\t\tif (currentHealthSystemInfo) {\n\t\t\tlet { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\t\treturn this.props.organization.allHealthSystems.some(healthSystem => {\n\t\t\t\treturn healthSystem.id === currentHealthSystemId;\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t};\n\n\tstartVersionTimeout = () => {\n\t\tif (this.versionTimeout) {\n\t\t\tclearTimeout(this.versionTimeout);\n\t\t}\n\n\t\tconst versionTimeoutInterval = +APP_CONFIG.versionCheckInterval || 10;\n\t\tthis.versionTimeout = setTimeout(async () => {\n\t\t\tthis.compareVersions();\n\t\t}, 1000 * 60 * versionTimeoutInterval);\n\t};\n\n\tcompareVersions = async () => {\n\t\ttry {\n\t\t\tconst response = await fetch('/env/react-config.js');\n\t\t\tlet configText = await response.text();\n\n\t\t\tconfigText = configText.replace(/'/g, `\"`);\n\n\t\t\tconst { REACT_APP_BUILD_NUMBER } = JSON.parse(configText.substring(configText.indexOf('{'), configText.lastIndexOf('}') + 1));\n\n\t\t\tif (APP_CONFIG.buildNumber && REACT_APP_BUILD_NUMBER && APP_CONFIG.buildNumber !== REACT_APP_BUILD_NUMBER) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdisplayContentUpdatedAlert: true,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(error);\n\t\t}\n\n\t\tthis.startVersionTimeout();\n\t};\n\n\tonConnectionStateChange = async newSocketConnectionState => {\n\t\tif (this.state.socketConnectionState.type === newSocketConnectionState.type) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tdisplaySocketConnectionAlert: true,\n\t\t\tsocketConnectionState: newSocketConnectionState,\n\t\t});\n\t\tif (newSocketConnectionState.type === SocketState.CONNECTED.type) {\n\t\t\tif (this.socketStateTimeout) {\n\t\t\t\tclearTimeout(this.socketStateTimeout);\n\t\t\t}\n\t\t\tthis.socketStateTimeout = setTimeout(() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdisplaySocketConnectionAlert: false,\n\t\t\t\t});\n\t\t\t}, 2000);\n\t\t\tawait this.props.organizationActions.getTreeData();\n\t\t\tthis.props.organization.activeMonitoringFeeds.forEach(({ roomId }) => {\n\t\t\t\tthis.changeRoomAddDeviceIcon(roomId);\n\t\t\t});\n\t\t\tthis.props.organizationActions.setTreeData({ ...this.props.organization.treeData });\n\t\t}\n\t};\n\n\tchangeRoomAddDeviceIcon = roomId => {\n\t\tconst sector = findSectorById(this.props.organization.treeData.tree, roomId);\n\t\tsector.customActionIcon = {\n\t\t\ticonColor: '#4cd137',\n\t\t\ticon: 'check_circle',\n\t\t};\n\t};\n\n\tshouldDisableIncomingCalls = () => {\n\t\tconst pathname = window.location.pathname.split('/');\n\t\tif (pathname.length > 1) {\n\t\t\tconst isCallView = pathname[1] === 'call';\n\n\t\t\treturn isCallView;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tgetTokensIfCall = () => {\n\t\tconst { search, pathname } = window.location;\n\t\tconst query = queryString.parse(search);\n\t\tif (query.accessToken && query.idToken && pathname.startsWith('/call/')) {\n\t\t\treturn { accessToken: query.accessToken, idToken: query.idToken };\n\t\t}\n\t\treturn undefined;\n\t};\n\n\trender() {\n\t\tconst { startApplication, socketConnectionState, displaySocketConnectionAlert, displayContentUpdatedAlert } = this.state;\n\t\tconst currentHealthSystem = getCurrentHealthSystemInfo();\n\t\tconst currentHealthSystemId = currentHealthSystem ? currentHealthSystem.currentHealthSystemId : null;\n\t\tconst { streamPermission } = this.props.organization;\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{Routes}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{APP_CONFIG.buildNumber}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tNew version of the app is available{' '}\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location.reload(true);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tsize='small'\n\t\t\t\t\t\t\t\t\t\t\t\ttext='Refresh'\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\tdisplayContentUpdatedAlert: false,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\tdisplaySocketConnectionAlert: false,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{streamPermission && streamPermission.component === 'popup' && }\n\t\t\t\t\t\t\t{streamPermission && streamPermission.component === 'modal' && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t\tnotifications: state.notifications,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tfetchNotificationCounter: () => dispatch(fetchNotificationCounter()),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(App);\n","// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nimport { IDENTITY_CONFIG } from 'constants/auth-constants';\n\nconst isLocalhost = Boolean(\n\twindow.location.hostname === 'localhost' ||\n\t\t// [::1] is the IPv6 localhost address.\n\t\twindow.location.hostname === '[::1]' ||\n\t\t// 127.0.0.1/8 is considered localhost for IPv4.\n\t\twindow.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\nfunction registerValidSW(swUrl) {\n\tnavigator.serviceWorker\n\t\t.register(swUrl)\n\t\t.then(registration => {\n\t\t\tregistration.onupdatefound = () => {\n\t\t\t\tconst installingWorker = registration.installing;\n\t\t\t\tinstallingWorker.onstatechange = () => {\n\t\t\t\t\tif (installingWorker.state === 'installed') {\n\t\t\t\t\t\tif (navigator.serviceWorker.controller) {\n\t\t\t\t\t\t\t// At this point, the old content will have been purged and\n\t\t\t\t\t\t\t// the fresh content will have been added to the cache.\n\t\t\t\t\t\t\t// It's the perfect time to display a \"New content is\n\t\t\t\t\t\t\t// available; please refresh.\" message in your web app.\n\t\t\t\t\t\t\tconsole.log('New content is available; please refresh.');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// At this point, everything has been precached.\n\t\t\t\t\t\t\t// It's the perfect time to display a\n\t\t\t\t\t\t\t// \"Content is cached for offline use.\" message.\n\t\t\t\t\t\t\tconsole.log('Content is cached for offline use.');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t})\n\t\t.catch(error => {\n\t\t\tconsole.error('Error during service worker registration:', error);\n\t\t});\n}\n\nfunction checkValidServiceWorker(swUrl) {\n\t// Check if the service worker can be found. If it can't reload the page.\n\tfetch(swUrl)\n\t\t.then(response => {\n\t\t\t// Ensure service worker exists, and that we really are getting a JS file.\n\t\t\tif (response.status === 404 || response.headers.get('content-type').indexOf('javascript') === -1) {\n\t\t\t\t// No service worker found. Probably a different app. Reload the page.\n\t\t\t\tnavigator.serviceWorker.ready.then(registration => {\n\t\t\t\t\tregistration.unregister().then(() => {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Service worker found. Proceed as normal.\n\t\t\t\tregisterValidSW(swUrl);\n\t\t\t}\n\t\t})\n\t\t.catch(() => {\n\t\t\tconsole.log('No internet connection found. App is running in offline mode.');\n\t\t});\n}\n\nexport default function register() {\n\tif (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n\t\t// The URL constructor is available in all browsers that support SW.\n\t\tconst publicUrl = new URL(IDENTITY_CONFIG.public_uri, window.location);\n\t\tif (publicUrl.origin !== window.location.origin) {\n\t\t\t// Our service worker won't work if PUBLIC_URL is on a different origin\n\t\t\t// from what our page is served on. This might happen if a CDN is used to\n\t\t\t// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n\t\t\treturn;\n\t\t}\n\n\t\twindow.addEventListener('load', () => {\n\t\t\tconst swUrl = `${IDENTITY_CONFIG.public_uri}service-worker.js`;\n\n\t\t\tif (isLocalhost) {\n\t\t\t\t// This is running on localhost. Lets check if a service worker still exists or not.\n\t\t\t\tcheckValidServiceWorker(swUrl);\n\t\t\t} else {\n\t\t\t\t// Is not local host. Just register service worker\n\t\t\t\tregisterValidSW(swUrl);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport function unregister() {\n\tif ('serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.ready.then(registration => {\n\t\t\tregistration.unregister();\n\t\t});\n\t}\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport configureStore from 'store/configureStore';\nimport App from './App';\nimport { unregister as unregisterServiceWorker } from './registerServiceWorker';\n\nimport 'font-awesome/css/font-awesome.min.css';\nimport 'css/reset.css';\nimport 'css/typography.css';\nimport 'css/utilities.css';\nimport 'css/components.css';\nimport 'css/main.css';\n\nconst store = configureStore();\nconst rootElement = document.getElementById('root');\n\nReactDOM.render(\n\t\n\t\t\n\t,\n\trootElement\n);\n\nunregisterServiceWorker();\n"],"sourceRoot":""}