"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[17765],{32100:(e,t,r)=>{r.d(t,{A:()=>x});var n=r(469733),a=r(296540),l=r(325898),i=r(592510),c=r(282556),m=r(582724),o=r(595763),s=r(566723),E=r(11001),d=r(294303),A=r(689965),u=r(248951),_=r(602021),p=r(198494),h=r(780811),O=r(801081),C=r(25553),M=r(87485);const N=({queryParams:e},{queryParams:t})=>e?.mac===t?.mac,y="deviceDailyTxRetries",T="mac",g=e=>(0,O.Mz)((e=>({models:t})=>(0,C.JC)(y,t,{queryParams:{mac:e}},{idField:T,compareFunction:N}))(e),e=>(0,M.kh)(e)[0]);var R=r(691189);var b=r(863489),I=r(866487),S=r(231460);const w={},D=({stat:e,mac:t,uplink:r,uptime:i,last_seen:m,deviceState:u})=>{const C=(0,n.useDispatch)(),{motif:M}=(0,l.A)(),D=(0,n.useSelector)(_.hq),x=(0,n.useSelector)(c.zi),f=(0,n.useSelector)(p.BQ),v=(0,a.useMemo)(()=>(0,b.lD)(e),[e]),{translationKey:L,textColor:z}=(0,a.useMemo)(()=>(0,b.QS)(M,v),[v,M]),P=(0,a.useMemo)(()=>(0,h.aK8)(u),[u]),F=(0,n.useSelector)((0,a.useMemo)(()=>(e=>(0,O.Mz)(g(e),e=>e?.historical_scores||[]))(t),[t])),K=(0,a.useMemo)(()=>(0,b.bW)(F,M),[F,M]),k=(0,a.useMemo)(()=>K.every(({not_reported:e})=>e),[K]);return(0,a.useEffect)(()=>{(!w[t]||Date.now()-w[t]>=3e5)&&C(((e,t={},r={})=>(0,R.An)([{model:y,payload:t=>[{...t,[T]:e}]}],"/v2/api/site/{site}/device/:mac:/24hr-tx-retries".replace(":mac:",e),{queryParams:{mac:e},...t},{idField:T,compareFunction:N,...r}))(t)).then(()=>{w[t]=Date.now()})},[C,t]),a.createElement(A.A,null,a.createElement(S.hW,{score:v,headerTranslationKey:"COMMON_TX_RETRIES",scoreTranslationKey:k?"COMMON_FALLBACK":L,hideScore:k,color:k?I.PC[M][o.Jm.NOT_REPORTED]:z}),a.createElement(d.A,{flexDirection:"column",marginTop:s.Ln,gap:s.YC},a.createElement(S.dC,{stackedBarItems:K,labelTranslationKey:"COMMON_TX_RETRIES",siteTimezone:D,language:x,selfHourCycle:f}),a.createElement(S.XG,{siteTimezone:D,selfHourCycle:f,language:x,startTime:F[0]?.timestamp})),a.createElement(d.A,{width:"100%",justifyContent:"space-between"},a.createElement(d.A,null,r?a.createElement(a.Fragment,null,a.createElement(E.A,{style:{marginRight:"6px"},bytesPerSecond:P?0:r["rx_bytes-r"]||0,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),a.createElement(E.A,{bytesPerSecond:P?0:r["tx_bytes-r"]||0,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})):null),P?null:a.createElement(S.kD,{uptime:i,last_seen:m})))},x=e=>(0,m.A)([(0,u.P)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})],a.createElement(D,{...e}))},66648:(e,t,r)=>{r.d(t,{Ay:()=>y,KK:()=>M,gJ:()=>N});var n=r(296540),a=r(217439),l=r(822336),i=r(71479),c=r(860631),m=r(596441),o=r(943805),s=r(522453),E=r(699784),d=r(564985),A=r(765562),u=r(861951),_=r(811015),p=r(349107),h=r(294303),O=r(720572),C=r(115829);const M={CHANNEL:220,MIMO:40,STANDARD:55,CLIENTS:66},N=(0,i.A)(h.A)`
  height: ${m.I.ROW_HEIGHT-1}px;
  border-bottom: ${({theme:{themeName:e}})=>l.Ay[`desktop-border-divider-${e}`]};
  align-items: center;
  justify-content: space-between;
`,y=({channel:e,ht:t,radio:r,mimo:l,standard:i,disabled:m,mac:y,children:T,is_device_afc_supported:g,afc_enabled:R,afc_done:b,afc_initialize_timeout_at:I,is_device_outdoor_mode_supported:S,has_enabled_6Ghz:w,is_disabled_all_6ghz_radios:D,isMesh:x})=>{let f=null;const v=(0,c.gR)({afc_initialize_timeout_at:I});return r===d.sx.RADIO_6E&&S&&g&&m&&D&&w?f=n.createElement(E.sA,{id:"DEVICE_TRANSMIT_POWER_DISABLED_6GHZ_WARNING",values:{link:n.createElement(u.A,{mac:y},n.createElement(E.sA,{id:"COMMON_CLICK_TO_ENABLE"})),br:E.br}}):r===d.sx.RADIO_6E&&S&&g&&R&&void 0!==b&&!b&&!v&&!m&&w?f=n.createElement(E.sA,{id:"DEVICE_DID_NOT_RECEIVE_AFC_RESPONSE_WARNING",values:{link:n.createElement(p.A,{id:"COMMON_LEARN_MORE",href:A.A.afcArticle})}}):m&&(f=n.createElement(E.sA,{id:"DEVICE_RADIO_DISABLED_WARNING",values:{link:n.createElement(O.A,{mac:y,band:r},n.createElement(E.sA,{id:"COMMON_CLICK_TO_ENABLE"}))}})),n.createElement(s.Ay,{disableWithWarning:f},n.createElement(N,{width:"100%"},n.createElement(h.A,{width:M.CHANNEL},n.createElement(a.A,{weight:"bold"},void 0!==e?n.createElement(E.sA,{id:"COMMON_CHANNEL_RADIO_CHANNEL",values:{channel:e}}):n.createElement(E.sA,{id:"COMMON_FALLBACK"})),n.createElement(C.A,null," (",r&&o.A[r.toUpperCase()]?.frequency||n.createElement(E.sA,{id:"COMMON_FALLBACK"}),", ",t||n.createElement(E.sA,{id:"COMMON_FALLBACK"})," ",n.createElement(E.sA,{id:"COMMON_UNIT_MHZ"}),")"),x?n.createElement(_.A,null):null),n.createElement(h.A,{width:M.MIMO},n.createElement(a.A,null,l||n.createElement(E.sA,{id:"COMMON_FALLBACK"}))),n.createElement(h.A,{width:M.STANDARD},n.createElement(a.A,null,i||n.createElement(E.sA,{id:"COMMON_FALLBACK"}))),T))}},104154:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(469733),a=r(296540),l=r(691294),i=r(239417);const c=({client:{id:e,type:t,status:r,blocked:c},props:m,children:o})=>{const s=(0,a.useMemo)(()=>t===l.sK.VPN?l.N7.VPN:t===l.sK.TELEPORT?l.N7.TELEPORT:c?l.N7.BLOCKED:r===l.S2.OFFLINE?l.N7.OFFLINE:l.N7.ACTIVE,[t,c,r]);return o((0,n.useSelector)((0,a.useMemo)(()=>(0,i.kV)(e,m,s),[e,m,s])))}},150556:(e,t,r)=>{r.d(t,{A:()=>m});var n=r(296540),a=r(927099),l=r(137298),i=r(699784),c=r(360113);const m=({tx_rate:e})=>e>0?n.createElement(c.A,null,n.createElement(a.A,{color:"secondary",size:"body"},n.createElement(i.sA,{id:"COMMON_TX_RATE"})),n.createElement(a.A,{color:"tertiary",size:"body"},(0,l.Up)(e))):null},205830:(e,t,r)=>{r.d(t,{A:()=>E});var n=r(296540),a=r(217439),l=r(83438),i=r(566723),c=r(294303),m=r(699784),o=r(780811),s=r(360113);const E=({sys_stats:e,flexProps:t,withTooltip:r,compact:E=!1})=>{const d=(0,o.eiG)(e);return d?n.createElement(s.A,{flexProps:t,compact:E},n.createElement(a.A,{color:"text-2",size:"medium"},n.createElement(m.sA,{id:"COMMON_LOAD_AVERAGE"})),r?n.createElement(c.A,{alignItems:"center",gap:i.YC},n.createElement(a.A,{color:"text-3",size:"medium"},d),n.createElement(l.A,{description:n.createElement(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),placement:"top left"})):n.createElement(a.A,{color:"text-3",size:"medium"},d)):null}},231460:(e,t,r)=>{r.d(t,{FN:()=>x,XG:()=>I,ZP:()=>S,dC:()=>b,hW:()=>T,kD:()=>f,mb:()=>y,pm:()=>g});var n=r(296540),a=r(271856),l=r(773412),i=r(217439),c=r(705145),m=r(71479),o=r(903216),s=r(90757),E=r(945132),d=r(566723),A=r(424095),u=r(11001),_=r(294303),p=r(699784),h=r(907157),O=r(104154),C=r(691294),M=r(863489);const N=(0,m.A)(_.A)`
  > div > div {
    height: 8px;
    margin: 0;
    div {
      height: inherit !important;
    }
  }
`,y=(0,m.A)(c.A)`
  :hover {
    color: ${({theme:e})=>e.motifPalette.uBlue06};
  }
`,T=({score:e,headerTranslationKey:t,scoreTranslationKey:r,color:a,hideScore:l})=>n.createElement(_.A,{justifyContent:"space-between"},n.createElement(i.A,{color:"text-1",size:"medium",weight:"bold"},n.createElement(p.sA,{id:t})),n.createElement(i.A,{size:"medium",style:{color:a}},n.createElement(p.sA,{id:r}),e>=0&&e<=100&&!l&&n.createElement(n.Fragment,null," (",e,"%)"))),g=({wiredRateMbps:e,motif:t})=>n.createElement(_.A,{justifyContent:"space-between"},n.createElement(i.A,{size:"medium",weight:"bold"},n.createElement(p.sA,{id:"CLIENTS_HEADER_WIRED_EXPERIENCE"})),n.createElement(i.A,{size:"medium",...e>0?{style:{color:(0,M.xe)(e,t)}}:{color:"disabled"}},e>0?(0,o.ir)(e):n.createElement(p.sA,{id:"COMMON_FALLBACK"}))),R=({color:e,tooltipColor:t,labelTranslationKey:r,scoreTranslationKey:a,score:l,hideScore:c=!1,wiredRateMbps:m,not_reported:o,from:s,to:E})=>n.createElement(_.A,{flexDirection:"column",whiteSpace:"nowrap"},n.createElement(_.A,{justifyContent:"space-between"},n.createElement(i.A,{weight:"bold",color:"text-1"},n.createElement(p.sA,{id:r})),n.createElement(i.A,{style:{color:t||e}},n.createElement(p.sA,{id:o?"COMMON_NOT_REPORTED":a,values:{value:m?m<1e3?m:m/1e3:0}}),l>=0&&l<=100&&!o&&!c&&n.createElement(n.Fragment,null," (",l,"%)"))),n.createElement(_.A,{justifyContent:"space-between"},n.createElement(_.A,{marginRight:d.Ln},n.createElement(i.A,{color:"text-1"},n.createElement(p.sA,{id:"COMMON_TIME"}))),n.createElement(i.A,null,s," - ",E))),b=(0,n.memo)(({stackedBarItems:e,siteTimezone:t,language:r,selfHourCycle:a,hideScore:i=!1,wiredRateMbps:c,labelTranslationKey:m})=>n.createElement(N,null,n.createElement(l.A,{items:e,rounded:!0,itemTooltip:({score:e,color:l,tooltipColor:o,translationKey:s,timestamp:E,nextTimestamp:d,not_reported:A})=>({animate:!1,delay:.2,message:n.createElement(R,{color:l,tooltipColor:o,labelTranslationKey:m,scoreTranslationKey:s,score:e,hideScore:i,not_reported:A,wiredRateMbps:c,from:new Intl.DateTimeFormat(r,{timeZone:t,hourCycle:a,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(E),to:new Intl.DateTimeFormat(r,{timeZone:t,hourCycle:a,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(d)}),width:"auto",maxWidth:"auto"})}))),I=({siteTimezone:e,selfHourCycle:t,startTime:r,language:a})=>n.createElement(_.A,{justifyContent:"space-between",marginBottom:d.kc},n.createElement(i.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(a,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(r||Date.now()-432e5)),n.createElement(i.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(a,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(r?r+432e5:Date.now())),n.createElement(i.A,{color:"text-3",size:"small"},n.createElement(p.sA,{id:"COMMON_NOW"}))),S=({activeItem:e,isUnifiDeviceClient:t=!1})=>{const r=(0,n.useMemo)(()=>t?h.A:O.A,[t]);return n.createElement(r,{mac:e.mac,client:e,props:["tx_bytes-r","rx_bytes-r"]},({"tx_bytes-r":e=0,"rx_bytes-r":t=0})=>n.createElement(_.A,null,n.createElement(u.A,{style:{marginRight:"6px"},bytesPerSecond:e,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),n.createElement(u.A,{bytesPerSecond:t,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})))},w=e=>[s.Au.HOURS,s.Au.MINUTES,Math.floor((Date.now()-new Date(1e3*e).getTime())/E.jU)<1?s.Au.SECONDS:s.Au.DAYS],D=(0,n.memo)(({id:e,startTimestamp:t})=>n.createElement(a.A,{width:100,description:n.createElement(c.A,{size:"small",color:"text-1",isCentered:!0,style:{width:"100%"}},n.createElement(p.sA,{id:e}))},n.createElement(i.A,{size:"medium",color:"text-2"},n.createElement(A.A,{startTimestamp:t,uptimeParams:w(t)})))),x=(0,n.memo)(({status:e,assoc_time:t,last_seen:r})=>e===C.S2.ONLINE&&t?n.createElement(D,{id:"COMMON_UPTIME",startTimestamp:t}):e===C.S2.OFFLINE&&r?n.createElement(D,{id:"COMMON_LAST_SEEN",startTimestamp:r}):null),f=({uptime:e,last_seen:t})=>e>=0?n.createElement(a.A,{description:n.createElement(p.sA,{id:"COMMON_UPTIME"})},n.createElement(i.A,{size:"medium"},(0,s.Ay)(e))):t?n.createElement(_.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end"},n.createElement(i.A,{size:"medium"},n.createElement(p.sA,{id:"COMMON_LAST_SEEN"}))," ",n.createElement(i.A,{size:"medium",color:"inherit"},n.createElement(A.A,{startTimestamp:t,uptimeParams:w(t)}))):null},336549:(e,t,r)=>{r.d(t,{A:()=>o,c:()=>m});var n=r(296540),a=r(217439),l=r(38937),i=r(699784),c=r(360113);const m=({signal:e,color:t,size:r})=>n.createElement(a.A,{size:r||"medium",color:t||(0,l.a5)(e)},e," ",n.createElement(i.sA,{id:"COMMON_UNIT_DBM"})),o=(0,n.memo)(e=>n.createElement(c.A,null,n.createElement(a.A,{color:"text-2",size:"medium"},n.createElement(i.sA,{id:"COMMON_SIGNAL"})),n.createElement(m,{...e})))},400242:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(296540),a=r(927099),l=r(699784),i=r(360113);const c=({ip:e,lan_ip:t,wan:r=!1,lan:c=!1,compact:m=!1})=>t||e?n.createElement(i.A,{compact:m},n.createElement(a.A,{color:"secondary",size:"body"},n.createElement(l.sA,{id:r?"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS":c?"DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS":"COMMON_IP_ADDRESS"})),n.createElement(a.A,{color:"tertiary",size:"body"},t||e)):null},424095:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(296540),a=r(90757),l=r(573531);const i=({startTimestamp:e,uptimeParams:t})=>{const r=(0,n.useRef)(null),i=(0,n.useRef)(null),c=(0,n.useCallback)(t=>{r.current&&(r.current.innerText=e?(0,a.Ay)(Math.floor(Date.now()/1e3)-e,t).join(" "):l.L,i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{c(t)},1e3))},[e]);return(0,n.useEffect)(()=>(e&&c(t),()=>{i.current&&clearTimeout(i.current)}),[e,t,c]),n.createElement("span",{ref:r})}},522453:(e,t,r)=>{r.d(t,{Ay:()=>h,v$:()=>p});var n=r(469733),a=r(296540),l=r(271856),i=r(71479),c=r(132196),m=r(811822),o=r(955161),s=r(699784),E=r(602021),d=r(566723);const A=(0,i.A)("div")`
  pointer-events: none;
`,u=c.AH`
  opacity: ${d.xN};
`,_=({warning:e,children:t})=>{return e?a.createElement(o.A,{condition:!!e,wrapper:(r=e,e=>a.createElement(l.A,{description:(0,m.Kg)(r)?a.createElement(s.sA,{id:r}):r,portal:!0,isInteractive:!(0,m.Kg)(r)},a.createElement(A,null,e)))},t):a.createElement(a.Fragment,null,t);var r},p=({disabled:e,children:t})=>e?a.createElement(A,{className:u,style:{width:"100%"}},t):a.createElement(a.Fragment,null,t),h=({disableWithWarning:e,children:t})=>{const r=(0,n.useSelector)(E.EL);return a.createElement(_,{warning:e},e?a.createElement("div",{className:r?void 0:u},t):t)}},782558:(e,t,r)=>{r.d(t,{A:()=>m});var n=r(296540),a=r(927099),l=r(137298),i=r(699784),c=r(360113);const m=({rx_rate:e})=>e>0?n.createElement(c.A,null,n.createElement(a.A,{color:"secondary",size:"body"},n.createElement(i.sA,{id:"COMMON_RX_RATE"})),n.createElement(a.A,{color:"tertiary",size:"body"},(0,l.Up)(e))):null},811015:(e,t,r)=>{r.d(t,{A:()=>E});var n=r(296540),a=r(822336),l=r(705145),i=r(57527),c=r(71479),m=r(566723),o=r(699784);const s=(0,c.A)(i.A)`
  background-color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-green-06-${e}`]};
  margin-right: ${m.YC};
`,E=()=>n.createElement(s,null,n.createElement(l.A,{size:"small",color:"neutral-inverse"},n.createElement(o.sA,{id:"COMMON_MESH"})))},907157:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(469733),a=r(296540),l=r(435325);const i=({mac:e,props:t,children:r})=>r((0,n.useSelector)((0,a.useMemo)(()=>(0,l.eu)(e,t),[e,t])))},939701:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(296540),a=r(699784),l=r(170459);const i=({name:e,radio_table:t,radio_table_stats:r})=>{const i=(0,l.ry)({name:e,radio_table:t,radio_table_stats:r});return n.createElement(n.Fragment,null,i&&"auto"!==i?i:n.createElement(a.sA,{id:"COMMON_AUTO"}))}}}]);