"use strict";(self.webpackChunkkeybase=self.webpackChunkkeybase||[]).push([[2710,4309],{12418(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(22024),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(67926),_container__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(77773),_react_navigation_core__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(64078),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(20390);let _everFocused=!1;const Deferred=react__WEBPACK_IMPORTED_MODULE_1__.memo(function Deferred(){const $=(0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__.c)(10),[visible,setVisible]=react__WEBPACK_IMPORTED_MODULE_1__.useState(_everFocused),isFocused=(0,_react_navigation_core__WEBPACK_IMPORTED_MODULE_3__.jH)(),navKey=(0,_react_navigation_core__WEBPACK_IMPORTED_MODULE_3__.FR)(_temp);let t0,t1,t2,t3,t4;return $[0]!==isFocused?(t0=()=>{_everFocused=_everFocused||isFocused},t1=[isFocused],$[0]=isFocused,$[1]=t0,$[2]=t1):(t0=$[1],t1=$[2]),react__WEBPACK_IMPORTED_MODULE_1__.useEffect(t0,t1),$[3]!==isFocused||$[4]!==visible?(t2=()=>{if(!isFocused||visible)return;const id=setTimeout(()=>{setVisible(!0)},100);return()=>{clearTimeout(id)}},t3=[isFocused,visible],$[3]=isFocused,$[4]=visible,$[5]=t2,$[6]=t3):(t2=$[5],t3=$[6]),react__WEBPACK_IMPORTED_MODULE_1__.useEffect(t2,t3),$[7]!==navKey||$[8]!==visible?(t4=visible?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_container__WEBPACK_IMPORTED_MODULE_2__.A,{navKey}):null,$[7]=navKey,$[8]=visible,$[9]=t4):t4=$[9],t4}),__WEBPACK_DEFAULT_EXPORT__=()=>{const $=(0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__.c)(1);let t0;return $[0]===Symbol.for("react.memo_cache_sentinel")?(t0=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Deferred,{}),$[0]=t0):t0=$[0],t0};function _temp(state){return state.key}},74309(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Cl:()=>useHumans,H4:()=>useTeamHumans,NH:()=>infoPanelWidthTablet,ZF:()=>infoPanelWidth,lY:()=>infoPanelWidthElectron});var react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(22024),_constants_teams__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(27002),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(67926),_styles__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(88874);const infoPanelWidthElectron=320,infoPanelWidthPhone=_styles__WEBPACK_IMPORTED_MODULE_3__.dimensionWidth,infoPanelWidthTablet=350;function infoPanelWidth(){return _styles__WEBPACK_IMPORTED_MODULE_3__.isTablet?infoPanelWidthTablet:_styles__WEBPACK_IMPORTED_MODULE_3__.isMobile?infoPanelWidthPhone:infoPanelWidthElectron}const useTeamHumans=teamID=>{const $=(0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__.c)(7),[lastTID,setLastTID]=react__WEBPACK_IMPORTED_MODULE_2__.useState(""),getMembers=(0,_constants_teams__WEBPACK_IMPORTED_MODULE_1__.useTeamsState)(_temp);let t0;lastTID!==teamID&&(setLastTID(teamID),getMembers(teamID)),$[0]!==teamID?(t0=s_0=>s_0.teamIDToMembers.get(teamID),$[0]=teamID,$[1]=t0):t0=$[1];const teamMembers=(0,_constants_teams__WEBPACK_IMPORTED_MODULE_1__.useTeamsState)(t0);let ret;$[2]!==teamMembers?(ret=new Set,teamMembers?.forEach((t1,username)=>{const{type}=t1;return(type=>"bot"===type||"restrictedbot"===type)(type)&&ret.add(username)}),$[2]=teamMembers,$[3]=ret):ret=$[3];const bots=ret,teamHumanCount=(teamMembers?.size??0)-bots.size;let t1;return $[4]!==bots||$[5]!==teamHumanCount?(t1={bots,teamHumanCount},$[4]=bots,$[5]=teamHumanCount,$[6]=t1):t1=$[6],t1},useHumans=(participantInfo,meta)=>{const $=(0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__.c)(8),{teamType,teamID}=meta,{bots,teamHumanCount}=useTeamHumans(teamID);let t0;$[0]!==bots||$[1]!==participantInfo.all||$[2]!==participantInfo.name||$[3]!==teamType?(t0="adhoc"===teamType?participantInfo.name:participantInfo.all.filter(username=>!bots.has(username)),$[0]=bots,$[1]=participantInfo.all,$[2]=participantInfo.name,$[3]=teamType,$[4]=t0):t0=$[4];const channelHumans=t0;let t1;return $[5]!==channelHumans||$[6]!==teamHumanCount?(t1={channelHumans,teamHumanCount},$[5]=channelHumans,$[6]=teamHumanCount,$[7]=t1):t1=$[7],t1};function _temp(s){return s.dispatch.getMembers}}}]);
//# sourceMappingURL=2710.bundle.js.map