"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[43891],{66648:(e,t,a)=>{a.d(t,{Ay:()=>y,KK:()=>M,gJ:()=>O});var n=a(296540),r=a(217439),i=a(822336),l=a(71479),c=a(860631),m=a(596441),o=a(943805),s=a(522453),E=a(699784),d=a(564985),u=a(765562),A=a(861951),_=a(811015),h=a(349107),p=a(294303),N=a(720572),C=a(115829);const M={CHANNEL:220,MIMO:40,STANDARD:55,CLIENTS:66},O=(0,l.A)(p.A)`
  height: ${m.I.ROW_HEIGHT-1}px;
  border-bottom: ${({theme:{themeName:e}})=>i.Ay[`desktop-border-divider-${e}`]};
  align-items: center;
  justify-content: space-between;
`,y=({channel:e,ht:t,radio:a,mimo:i,standard:l,disabled:m,mac:y,children:I,is_device_afc_supported:T,afc_enabled:g,afc_done:w,afc_initialize_timeout_at:f,is_device_outdoor_mode_supported:D,has_enabled_6Ghz:b,is_disabled_all_6ghz_radios:v,isMesh:L})=>{let R=null;const S=(0,c.gR)({afc_initialize_timeout_at:f});return a===d.sx.RADIO_6E&&D&&T&&m&&v&&b?R=n.createElement(E.sA,{id:"DEVICE_TRANSMIT_POWER_DISABLED_6GHZ_WARNING",values:{link:n.createElement(A.A,{mac:y},n.createElement(E.sA,{id:"COMMON_CLICK_TO_ENABLE"})),br:E.br}}):a===d.sx.RADIO_6E&&D&&T&&g&&void 0!==w&&!w&&!S&&!m&&b?R=n.createElement(E.sA,{id:"DEVICE_DID_NOT_RECEIVE_AFC_RESPONSE_WARNING",values:{link:n.createElement(h.A,{id:"COMMON_LEARN_MORE",href:u.A.afcArticle})}}):m&&(R=n.createElement(E.sA,{id:"DEVICE_RADIO_DISABLED_WARNING",values:{link:n.createElement(N.A,{mac:y,band:a},n.createElement(E.sA,{id:"COMMON_CLICK_TO_ENABLE"}))}})),n.createElement(s.Ay,{disableWithWarning:R},n.createElement(O,{width:"100%"},n.createElement(p.A,{width:M.CHANNEL},n.createElement(r.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," (",a&&o.A[a.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"}),")"),L?n.createElement(_.A,null):null),n.createElement(p.A,{width:M.MIMO},n.createElement(r.A,null,i||n.createElement(E.sA,{id:"COMMON_FALLBACK"}))),n.createElement(p.A,{width:M.STANDARD},n.createElement(r.A,null,l||n.createElement(E.sA,{id:"COMMON_FALLBACK"}))),I))}},104154:(e,t,a)=>{a.d(t,{A:()=>c});var n=a(469733),r=a(296540),i=a(691294),l=a(239417);const c=({client:{id:e,type:t,status:a,blocked:c},props:m,children:o})=>{const s=(0,r.useMemo)(()=>t===i.sK.VPN?i.N7.VPN:t===i.sK.TELEPORT?i.N7.TELEPORT:c?i.N7.BLOCKED:a===i.S2.OFFLINE?i.N7.OFFLINE:i.N7.ACTIVE,[t,c,a]);return o((0,n.useSelector)((0,r.useMemo)(()=>(0,l.kV)(e,m,s),[e,m,s])))}},231460:(e,t,a)=>{a.d(t,{FN:()=>L,XG:()=>f,ZP:()=>D,dC:()=>w,hW:()=>I,kD:()=>R,mb:()=>y,pm:()=>T});var n=a(296540),r=a(271856),i=a(773412),l=a(217439),c=a(705145),m=a(71479),o=a(903216),s=a(90757),E=a(945132),d=a(566723),u=a(424095),A=a(11001),_=a(294303),h=a(699784),p=a(907157),N=a(104154),C=a(691294),M=a(863489);const O=(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};
  }
`,I=({score:e,headerTranslationKey:t,scoreTranslationKey:a,color:r,hideScore:i})=>n.createElement(_.A,{justifyContent:"space-between"},n.createElement(l.A,{color:"text-1",size:"medium",weight:"bold"},n.createElement(h.sA,{id:t})),n.createElement(l.A,{size:"medium",style:{color:r}},n.createElement(h.sA,{id:a}),e>=0&&e<=100&&!i&&n.createElement(n.Fragment,null," (",e,"%)"))),T=({wiredRateMbps:e,motif:t})=>n.createElement(_.A,{justifyContent:"space-between"},n.createElement(l.A,{size:"medium",weight:"bold"},n.createElement(h.sA,{id:"CLIENTS_HEADER_WIRED_EXPERIENCE"})),n.createElement(l.A,{size:"medium",...e>0?{style:{color:(0,M.xe)(e,t)}}:{color:"disabled"}},e>0?(0,o.ir)(e):n.createElement(h.sA,{id:"COMMON_FALLBACK"}))),g=({color:e,tooltipColor:t,labelTranslationKey:a,scoreTranslationKey:r,score:i,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(l.A,{weight:"bold",color:"text-1"},n.createElement(h.sA,{id:a})),n.createElement(l.A,{style:{color:t||e}},n.createElement(h.sA,{id:o?"COMMON_NOT_REPORTED":r,values:{value:m?m<1e3?m:m/1e3:0}}),i>=0&&i<=100&&!o&&!c&&n.createElement(n.Fragment,null," (",i,"%)"))),n.createElement(_.A,{justifyContent:"space-between"},n.createElement(_.A,{marginRight:d.Ln},n.createElement(l.A,{color:"text-1"},n.createElement(h.sA,{id:"COMMON_TIME"}))),n.createElement(l.A,null,s," - ",E))),w=(0,n.memo)(({stackedBarItems:e,siteTimezone:t,language:a,selfHourCycle:r,hideScore:l=!1,wiredRateMbps:c,labelTranslationKey:m})=>n.createElement(O,null,n.createElement(i.A,{items:e,rounded:!0,itemTooltip:({score:e,color:i,tooltipColor:o,translationKey:s,timestamp:E,nextTimestamp:d,not_reported:u})=>({animate:!1,delay:.2,message:n.createElement(g,{color:i,tooltipColor:o,labelTranslationKey:m,scoreTranslationKey:s,score:e,hideScore:l,not_reported:u,wiredRateMbps:c,from:new Intl.DateTimeFormat(a,{timeZone:t,hourCycle:r,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(E),to:new Intl.DateTimeFormat(a,{timeZone:t,hourCycle:r,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(d)}),width:"auto",maxWidth:"auto"})}))),f=({siteTimezone:e,selfHourCycle:t,startTime:a,language:r})=>n.createElement(_.A,{justifyContent:"space-between",marginBottom:d.kc},n.createElement(l.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(r,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(a||Date.now()-432e5)),n.createElement(l.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(r,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(a?a+432e5:Date.now())),n.createElement(l.A,{color:"text-3",size:"small"},n.createElement(h.sA,{id:"COMMON_NOW"}))),D=({activeItem:e,isUnifiDeviceClient:t=!1})=>{const a=(0,n.useMemo)(()=>t?p.A:N.A,[t]);return n.createElement(a,{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(A.A,{style:{marginRight:"6px"},bytesPerSecond:e,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),n.createElement(A.A,{bytesPerSecond:t,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})))},b=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],v=(0,n.memo)(({id:e,startTimestamp:t})=>n.createElement(r.A,{width:100,description:n.createElement(c.A,{size:"small",color:"text-1",isCentered:!0,style:{width:"100%"}},n.createElement(h.sA,{id:e}))},n.createElement(l.A,{size:"medium",color:"text-2"},n.createElement(u.A,{startTimestamp:t,uptimeParams:b(t)})))),L=(0,n.memo)(({status:e,assoc_time:t,last_seen:a})=>e===C.S2.ONLINE&&t?n.createElement(v,{id:"COMMON_UPTIME",startTimestamp:t}):e===C.S2.OFFLINE&&a?n.createElement(v,{id:"COMMON_LAST_SEEN",startTimestamp:a}):null),R=({uptime:e,last_seen:t})=>e>=0?n.createElement(r.A,{description:n.createElement(h.sA,{id:"COMMON_UPTIME"})},n.createElement(l.A,{size:"medium"},(0,s.Ay)(e))):t?n.createElement(_.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end"},n.createElement(l.A,{size:"medium"},n.createElement(h.sA,{id:"COMMON_LAST_SEEN"}))," ",n.createElement(l.A,{size:"medium",color:"inherit"},n.createElement(u.A,{startTimestamp:t,uptimeParams:b(t)}))):null},424095:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(296540),r=a(90757),i=a(573531);const l=({startTimestamp:e,uptimeParams:t})=>{const a=(0,n.useRef)(null),l=(0,n.useRef)(null),c=(0,n.useCallback)(t=>{a.current&&(a.current.innerText=e?(0,r.Ay)(Math.floor(Date.now()/1e3)-e,t).join(" "):i.L,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{c(t)},1e3))},[e]);return(0,n.useEffect)(()=>(e&&c(t),()=>{l.current&&clearTimeout(l.current)}),[e,t,c]),n.createElement("span",{ref:a})}},522453:(e,t,a)=>{a.d(t,{Ay:()=>p,v$:()=>h});var n=a(469733),r=a(296540),i=a(271856),l=a(71479),c=a(132196),m=a(811822),o=a(955161),s=a(699784),E=a(602021),d=a(566723);const u=(0,l.A)("div")`
  pointer-events: none;
`,A=c.AH`
  opacity: ${d.xN};
`,_=({warning:e,children:t})=>{return e?r.createElement(o.A,{condition:!!e,wrapper:(a=e,e=>r.createElement(i.A,{description:(0,m.Kg)(a)?r.createElement(s.sA,{id:a}):a,portal:!0,isInteractive:!(0,m.Kg)(a)},r.createElement(u,null,e)))},t):r.createElement(r.Fragment,null,t);var a},h=({disabled:e,children:t})=>e?r.createElement(u,{className:A,style:{width:"100%"}},t):r.createElement(r.Fragment,null,t),p=({disableWithWarning:e,children:t})=>{const a=(0,n.useSelector)(E.EL);return r.createElement(_,{warning:e},e?r.createElement("div",{className:a?void 0:A},t):t)}},596441:(e,t,a)=>{a.d(t,{I:()=>n});const n={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,a,n){return Math.min((n||this.ROW_HEIGHT)*e+(a??this.HEADER_HEIGHT),(n||this.ROW_HEIGHT)*t+(a??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,a){return Math.min((a||this.EDIT_FIELD_HEIGHT)*e,(a||this.EDIT_FIELD_HEIGHT)*t)}}},743891:(e,t,a)=>{a.d(t,{A:()=>q});var n=a(469733),r=a(296540),i=a(325898),l=a(998837),c=a(132196),m=a(628291),o=a(282556),s=a(566723),E=a(294303),d=a(689965),u=a(602021),A=a(198494),_=a(801081),h=a(25553),p=a(87485);const N=({queryParams:e},{queryParams:t})=>e?.mac===t?.mac,C="clientsDailySatisfaction",M="mac",O=e=>(0,_.Mz)((e=>({models:t})=>(0,h.JC)(C,t,{queryParams:{mac:e}},{idField:M,compareFunction:N}))(e),e=>(0,p.kh)(e)[0]),y=e=>(0,_.Mz)(O(e),e=>e?.historical_scores||[]);var I=a(691189);const T=(e,t={},a={})=>(0,I.An)([{model:C,payload:t=>[{...t,[M]:e}]}],"/v2/api/site/{site}/client/:mac:/24hr-satisfaction".replace(":mac:",e),{queryParams:{mac:e},...t},{idField:M,compareFunction:N,...a}),g=({queryParams:e},{queryParams:t})=>e?.mac===t?.mac,w="clientsDailyActivity",f="mac",D=e=>(0,_.Mz)((e=>({models:t})=>(0,h.JC)(w,t,{queryParams:{mac:e}},{idField:f,compareFunction:g}))(e),e=>(0,p.kh)(e)[0]),b=e=>(0,_.Mz)(D(e),e=>e?.historical_activity||[]),v=(e,t={},a={})=>(0,I.An)([{model:w,payload:t=>[{...t,[f]:e}]}],"/v2/api/site/{site}/client/:mac:/24hr-activity".replace(":mac:",e),{queryParams:{mac:e},...t},{idField:f,compareFunction:g,...a});var L=a(951106),R=a(691294),S=a(863489),H=a(927099),F=a(38937),x=a(66648),P=a(699784),z=a(104154);const K=({signal:e})=>r.createElement(E.A,{alignItems:"center",justifyContent:"flex-end"},r.createElement(H.A,{size:"body",color:(0,F.b5)(e)},e," ",r.createElement(P.sA,{id:"COMMON_UNIT_DBM"}))),k=({radio:e,channel:t,channel_width:a,mimo:n,radio_proto:i,signal:l,children:c})=>e||t||a?r.createElement(x.Ay,{radio:e,channel:t,ht:a,mimo:n?(0,L.iP)(n):null,standard:i?(0,L.z0)(i):null},l?r.createElement(K,{signal:l}):c):null,W=({activeItem:e,activeItem:{radio:t,channel:a,channel_width:n,mimo:i,radio_proto:l}})=>"is_mlo"in e&&e.is_mlo?r.createElement(z.A,{client:e,props:["mlo_details"]},({mlo_details:e=[]})=>r.createElement(E.A,{flexDirection:"column"},e.map(({channel_width:e,...t})=>r.createElement(k,{key:t.radio,channel_width:+e,...t})))):r.createElement(k,{radio:t,channel:a,channel_width:n,mimo:i,radio_proto:l},r.createElement(z.A,{client:e,props:["signal"]},({signal:e=null})=>e?r.createElement(K,{signal:e}):null));var B=a(231460);const G=c.AH`
  &:empty {
    display: none;
  }
`,U={},j=({activeItem:e,motif:t})=>{const{motifPalette:{text04:a}}=(0,l.u)(),{satisfaction:n,translationKey:i}=(0,L.eg)(e.type,e.wifi_experience_score)||{satisfaction:0,translationKey:"COMMON_UNKNOWN"},c=e.status===R.S2.OFFLINE||e.blocked;return r.createElement(B.hW,{score:n,scoreTranslationKey:n>0?i:"COMMON_NO_EXP",headerTranslationKey:"COMMON_WIFI_EXP",color:c?a:(0,m.L)(n,t),hideScore:0===n})},q=({activeItem:e,isWired:t=!1,hideChannels:a=!1})=>{const l=(0,n.useDispatch)(),{motif:c}=(0,i.A)(),m=(0,n.useSelector)(u.hq),_=(0,n.useSelector)(o.zi),h=(0,n.useSelector)(A.BQ),p=(0,r.useMemo)(()=>(t?b:y)(e.mac),[e.mac,t]),N=(0,n.useSelector)(p),C=e.wired_rate_mbps,M=(0,r.useMemo)(()=>t?(0,S.mQ)(N,c,C):(0,S.l9)(N,c),[N,c,t,C]);return(0,r.useEffect)(()=>{(!U[e.mac]||Date.now()-U[e.mac]>=3e5)&&l((t?v:T)(e.mac)).then(()=>{U[e.mac]=Date.now()})},[l,e.mac,t]),r.createElement(d.A,null,t?r.createElement(B.pm,{wiredRateMbps:C,motif:c}):r.createElement(j,{activeItem:e,motif:c}),r.createElement(E.A,{flexDirection:"column",marginTop:s.Ln},r.createElement(B.dC,{stackedBarItems:M,labelTranslationKey:t?"CLIENTS_HEADER_WIRED_EXPERIENCE":"COMMON_WIFI_EXP",siteTimezone:m,language:_,selfHourCycle:h,hideScore:t,wiredRateMbps:C}),r.createElement(B.XG,{siteTimezone:m,selfHourCycle:h,language:_,startTime:N[0]?.timestamp})),r.createElement(E.A,{width:"100%",justifyContent:"space-between",marginTop:s.YC},r.createElement(B.ZP,{activeItem:e}),r.createElement(B.FN,{status:e.status,assoc_time:"assoc_time"in e?e.assoc_time:null,last_seen:"last_seen"in e?e.last_seen:null})),e.status!==R.S2.ONLINE||t||a?null:r.createElement(E.A,{width:"100%",marginTop:s.Ln,className:G},r.createElement(W,{activeItem:e})))}},811015:(e,t,a)=>{a.d(t,{A:()=>E});var n=a(296540),r=a(822336),i=a(705145),l=a(57527),c=a(71479),m=a(566723),o=a(699784);const s=(0,c.A)(l.A)`
  background-color: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-green-06-${e}`]};
  margin-right: ${m.YC};
`,E=()=>n.createElement(s,null,n.createElement(i.A,{size:"small",color:"neutral-inverse"},n.createElement(o.sA,{id:"COMMON_MESH"})))},907157:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(469733),r=a(296540),i=a(435325);const l=({mac:e,props:t,children:a})=>a((0,n.useSelector)((0,r.useMemo)(()=>(0,i.eu)(e,t),[e,t])))}}]);