"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[10147],{662965(e,t,a){a.d(t,{A:()=>r});var n=a(296540),l=a(629318);const r=(0,a(51946).w)(e=>(0,n.createElement)("svg",(0,l.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,n.createElement)("path",{d:"M9.724 15 3 7.917 9.724 5 16 7.917 9.724 15Z",fill:"currentColor",className:e.twotonedclassname}),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.063 8a.479.479 0 0 1-.035.648.53.53 0 0 1-.773-.044A7.453 7.453 0 0 0 9.585 6a7.472 7.472 0 0 0-5.673 2.601.527.527 0 0 1-.766.046A.476.476 0 0 1 3.11 8a8.474 8.474 0 0 1 6.476-3 8.475 8.475 0 0 1 6.476 3Zm-2.454 2.531a.455.455 0 0 1-.056.592c-.229.228-.614.172-.813-.082a4 4 0 0 0-6.433.167c-.126.18-.386.217-.541.062-.246-.246-.293-.633-.075-.903A4.99 4.99 0 0 1 9.586 8.5c1.651 0 3.115.8 4.023 2.031ZM9.636 15a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z",fill:"currentColor",className:e.baseclassname}),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.418 7.597c.267.275.244.71-.027.98-.315.316-.833.282-1.148-.033A6.97 6.97 0 0 0 10.298 6.5a6.945 6.945 0 0 0-4.934 2.043c-.315.316-.833.35-1.148.035-.27-.271-.294-.706-.028-.981A8.478 8.478 0 0 1 10.298 5c2.407 0 4.574.998 6.12 2.597Zm-4.58 5.903a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm2.099-2.468c.25-.25.286-.647.049-.907A4.98 4.98 0 0 0 10.298 8.5c-1.45 0-2.764.626-3.681 1.616-.24.26-.206.658.043.91.33.333.887.263 1.226-.06A3.476 3.476 0 0 1 10.299 10c.94 0 1.787.367 2.415.968.338.323.892.394 1.223.064Z",fill:"currentColor",className:e.fillclassname})))},619066(e,t,a){var n,l,r,i,o,s;a.d(t,{CF:()=>r,MZ:()=>o,cb:()=>i,oe:()=>l,y1:()=>n,zt:()=>s}),function(e){e.AP="ap",e.CLIENT="client",e.APP="app"}(n||(n={})),function(e){e.MODEL="model",e.NAME="name",e.TYPE="type"}(l||(l={})),function(e){e.AP_DETAILS="ap_details",e.MAC="mac",e.RECEIVED_BYTES="received_bytes",e.SATISFACTION="satisfaction",e.TOTAL_BYTES="total_bytes",e.TRANSMITTED_BYTES="transmitted_bytes",e.TYPE="type"}(r||(r={})),function(e){e.DISPLAY_NAME="display_name",e.FINGERPRINT="fingerprint",e.MAC="mac",e.RECEIVED_BYTES="received_bytes",e.SATISFACTION="satisfaction",e.TOTAL_BYTES="total_bytes",e.TRANSMITTED_BYTES="transmitted_bytes",e.TYPE="type"}(i||(i={})),function(e){e.APPLICATION="application",e.CATEGORY="category",e.CLIENT_COUNT="client_count",e.RECEIVED_BYTES="received_bytes",e.TOTAL_BYTES="total_bytes",e.TRANSMITTED_BYTES="transmitted_bytes",e.TYPE="type"}(o||(o={})),function(e){e.USAGE_BY="usage_by"}(s||(s={}))},281837(e,t,a){a.d(t,{L6:()=>d,Rz:()=>A,_S:()=>h,df:()=>E,nH:()=>p,pn:()=>C,uS:()=>_,uc:()=>u});var n=a(822336),l=a(705145),r=a(71479),i=a(825032),o=a(566723),s=a(294303),c=a(311785),m=a(360146);const d=(0,r.A)(s.A)`
  width: 100%;
  gap: ${m.g1}px;
`,E=(0,r.A)(s.A)`
  width: 100%;
  gap: ${m.ur}px;
`,A=(0,r.A)(s.A)`
  flex-direction: column;
  gap: ${o.kc};
  > span {
    cursor: pointer;
    white-space: nowrap;
  }
`,u=(0,r.A)(s.A)`
  width: ${m.Yk}px;
  position: relative;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
`,_=(0,r.A)(s.A,(0,c.A)("dimension","outlineOverride","header"))`
  position: relative;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 8px;
  margin-bottom: ${o.YC};
  ${({theme:{themeName:e},dimension:t=m.Yk,outlineOverride:a,header:l})=>`\n    border: ${m.jo}px solid ${n.Ay[a||`desktop-color-ublue-${e===i.S.DARK?"02":"04"}-${e}`]};\n    background: ${e===i.S.DARK?n.Ay["desktop-color-depth-bg-2-dark"]:n.Ay["desktop-color-neutral-00-light"]};\n    width: ${t}px;\n    min-width: ${t}px;\n    height: ${t}px;\n    min-height: ${t}px;\n      ${l?`&:after {\n              content: '${l}';\n              font-size: 10px;\n              color: ${n.Ay[`desktop-color-text-3-${e}`]};\n              position: absolute;\n              top: -${o.kc};\n              background: ${n.Ay[`desktop-color-neutral-01-${e}`]};\n              border-radius: ${n.Ay["desktop-radius-base"]};\n              padding: 0 ${o.YC};\n            }`:""}\n  `}
`,p=e=>(0,r.A)(e,(0,c.A)("margin"))`
  ${({device:e,client:t})=>e?"\n        width: 100%;\n        height: 100%;\n        margin: 0 auto;\n      ":t?"max-width: 80%; max-height: 80%;":""};
  ${({margin:e})=>`\n    ${e?`margin: ${e} !important;`:""};\n  `}
`,h=(0,r.A)("div")`
  position: absolute;
  top: -${m.Yk/2}px;
  left: -${m.Yk/2}px;
  width: ${m.Yk}px;
  height: ${m.Yk}px;
  z-index: 1;
`,C=(0,r.A)(l.A)`
  width: calc(${m.Yk}px + ${m.Yk/2/2}px);
`},360146(e,t,a){a.d(t,{P4:()=>o,WC:()=>m,Yk:()=>l,f$:()=>s,g1:()=>i,jo:()=>n,oT:()=>c,ur:()=>r});const n=2,l=40,r=16,i=2*r,o=16,s=2*n,c=24,m={cursorType:"pointer",portal:!0,width:252}},713570(e,t,a){a.d(t,{A:()=>E});var n=a(296540),l=a(822336),r=a(71479),i=a(825032),o=a(311785),s=a(360146),c=a(132196);const m=(0,r.A)("svg",(0,o.A)("dimension"))`
  position: absolute;
  border-radius: 8px;
  ${({dimension:e=s.Yk})=>`\n    width: ${e}px;\n    height: ${e}px;\n  `}
`,d=(0,r.A)("rect",(0,o.A)("offset","totalLength","dimension","strokeDashOffset"))`
  ${({theme:{themeName:e},offset:t,totalLength:a,dimension:n=s.Yk,strokeDashOffset:r=s.P4})=>`\n    stroke: ${l.Ay[`desktop-color-ublue-${e===i.S.DARK?"04":"06"}-${e}`]};\n    stroke-dasharray: 0, ${4*n};\n    ${t&&a?`animation: ${((e,t)=>c.i7` 0% { stroke-dasharray: 0, ${e}; } 100% { stroke-dasharray: ${e*t}, ${e*(1-t)}; }`)(a,t)} 0.75s linear 0.15s forwards;`:""}\n    width: ${n}px;\n    height: ${n}px;\n    stroke-dashoffset: -${r};\n  `};
  fill: none;
  stroke-width: ${s.f$}px;
`,E=(0,n.memo)(({offset:e,dimension:t,strokeDashOffset:a})=>n.createElement(m,{dimension:t},n.createElement(d,{x:"0",y:"0",rx:"8",totalLength:4*s.Yk-14,offset:100*e/100,dimension:t,strokeDashOffset:a})))},482572(e,t,a){a.d(t,{K5:()=>c,Se:()=>o,UI:()=>i,zd:()=>s});var n=a(71479),l=a(566723),r=a(294303);const i=(0,n.A)(r.A)`
  flex-direction: column;
  gap: ${l.kc};
`,o=(0,n.A)(r.A)`
  flex-direction: column;
  gap: ${l.YC};
`,s=(0,n.A)(r.A)`
  width: 100%;
  justify-content: space-between;
`,c=(0,n.A)(r.A)`
  align-items: center;
  gap: ${l.YC};
`},580427(e,t,a){a.d(t,{D:()=>n});const n="2x"},646189(e,t,a){a.d(t,{A:()=>u});var n=a(822336),l=a(296540),r=a(469733),i=a(71479),o=a(132196),s=a(801081),c=a(189601),m=a(609298),d=a(311785);const E=o.i7`
  0% {
    opacity: 0.0;
    transform: scale(0.3);
  }
  // fadein
  20% {
    opacity: 0.8;
  }
  // grow
  70% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  // fadeout
  100% {
    opacity: 0.0;
    transform: scale(1.0);
  }
`,A=(0,i.A)("div",(0,d.A)("size","animationName","delay"))`
  position: absolute;
  border-radius: 50%;
  ${({size:e,theme:{themeName:t},delay:a,animationName:l})=>`\n    width: ${e}px;\n    height: ${e}px;\n    background: ${n.Ay[`desktop-color-ublue-03-${t}`]};\n    animation-delay: ${a}ms;\n    animation-name: ${l};\n  `}
  animation-duration: ${2e3}ms;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0, 0.3, 0.1, 0);
  z-index: -1;
  opacity: 0;
  transform: scale(0);
`,u=(0,l.memo)(({size:e,mac:t})=>(0,r.useSelector)((0,l.useMemo)(()=>(e=>(0,c.WY)()((0,s.Mz)(({models:t})=>t[m.G.SESSION_METADATA]?.byId?.[e],e=>Boolean(e)),e=>e))(t),[t]))?l.createElement(l.Fragment,null,l.createElement(A,{size:e,animationName:E,delay:-500}),l.createElement(A,{size:e,animationName:E,delay:-1500})):null)},876773(e,t,a){a.d(t,{A:()=>i});var n=a(296540),l=a(758649),r=a(196010);const i=e=>n.createElement(l.A,{component:r.A,variant:"inline",size:"medium",...e})},708719(e,t,a){a.d(t,{A:()=>s});var n=a(469733),l=a(296540),r=a(602021),i=a(876773),o=a(294303);const s=({allowReadOnly:e,...t})=>{const a=(0,n.useSelector)(r.EL)&&!e;return l.createElement(o.A,{alignItems:"center"},l.createElement(i.A,{size:"medium",type:"button",...t,disabled:a||t.isDisabled}))}},151931(e,t,a){a.d(t,{A:()=>f});var n=a(296540),l=a(71479),r=a(943887),i=a(566723),o=a(217439),s=a(294303),c=a(916537),m=a(360113);const d=({id:e,isDisabledRadio:t})=>n.createElement(s.A,{marginBottom:t?0:i.kc},n.createElement(m.A,null,n.createElement(o.A,{weight:"bold",size:"medium"},n.createElement(c.sA,{id:e})),t?n.createElement(o.A,{color:"text-3",size:"medium"},n.createElement(c.sA,{id:"COMMON_DISABLED"})):null));var E=a(689965),A=a(564985),u=a(170459),_=a(178233);const p=({radio_table_item:e,type:t,stat:a})=>{const{retryPercentage:l,droppedPercentage:r}=(0,n.useMemo)(()=>(0,u.GI)(t,e,"tx",a),[e,t,a]);return n.createElement(m.A,null,n.createElement(o.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"})),n.createElement(o.A,{color:"text-3",size:"medium"},(0,_.l)(l)," / ",(0,_.l)(r)))},h=({radio_table_item:e,type:t,stat:a})=>{const{totalPackets:l,totalBytes:r}=(0,n.useMemo)(()=>(0,u.GI)(t,e,"tx",a),[t,e,a]);return n.createElement(m.A,null,n.createElement(o.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"})),n.createElement(o.A,{color:"text-3",size:"medium"},l??n.createElement(c.sA,{id:"COMMON_FALLBACK"})," /"," ",r??n.createElement(c.sA,{id:"COMMON_FALLBACK"})))},C=({radio_table_stats:e,radio_table_stats_item:t})=>{const{formatMessage:a}=(0,c.tz)(),l=(0,n.useMemo)(()=>(0,u.ZJ)(e,t,a),[e,t,a]);return l?n.createElement(m.A,null,n.createElement(o.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_EIRP"})),n.createElement(o.A,{color:"text-3",size:"medium"},l)):null},y=({radio_table_item:e,type:t,stat:a})=>{const{retryPercentage:l,droppedPercentage:r}=(0,n.useMemo)(()=>(0,u.GI)(t,e,"rx",a),[e,t,a]);return n.createElement(m.A,null,n.createElement(o.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"})),n.createElement(o.A,{color:"text-3",size:"medium"},(0,_.l)(l)," / ",(0,_.l)(r)))},g=({radio_table_item:e,type:t,stat:a})=>{const{totalPackets:l,totalBytes:r}=(0,n.useMemo)(()=>(0,u.GI)(t,e,"rx",a),[t,e,a]);return n.createElement(m.A,null,n.createElement(o.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"})),n.createElement(o.A,{color:"text-3",size:"medium"},l??n.createElement(c.sA,{id:"COMMON_FALLBACK"})," /"," ",r??n.createElement(c.sA,{id:"COMMON_FALLBACK"})))},b=({radio_table_stats:e,radio_table_item:t,flexProps:a})=>{const l=(0,n.useMemo)(()=>(0,u.Lm)(e,t),[e,t]);return l?n.createElement(m.A,{flexProps:a},n.createElement(o.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"})),n.createElement(o.A,{color:"text-3",size:"medium"},`${l.total}% / ${l.selfRx}% / ${l.selfTx}%`)):null};var T=a(86571);const O=(0,l.A)(s.A)`
  &:not(:last-child) {
    margin-bottom: ${i.Ln};
  }
`,f=(0,n.memo)(({radio_table:e,radio_table_stats:t,type:a,stat:l,support_wifi6e:i})=>{const o=(0,n.useMemo)(()=>[...e||[]].sort(u.j3),[e]);return o.length?n.createElement(E.A,{type:E.I.ACCORDION,items:[{id:"airStats",label:n.createElement(T.A,{id:"DEVICE_PROPERTY_AIR_STATS"}),openByDefault:!0,renderContent:()=>o.map(({radio:o,name:c})=>{const m=t?.find(e=>e.radio===o&&e.name===c),E=e?.find(e=>e.radio===o&&e.name===c),_=(0,u.Ww)(E);return o!==A.sx.RADIO_6E||i?n.createElement(O,{flexDirection:"column",key:`${o}-${c}`},n.createElement(d,{id:(0,r.dI)(o),isDisabledRadio:_}),_?void 0:n.createElement(s.A,{height:"100%",flexDirection:"column"},n.createElement(C,{radio_table_stats:t,radio_table_stats_item:m}),n.createElement(h,{radio_table_item:E,type:a,stat:l}),n.createElement(g,{radio_table_item:E,type:a,stat:l}),n.createElement(p,{radio_table_item:E,type:a,stat:l}),n.createElement(y,{radio_table_item:E,type:a,stat:l}),n.createElement(b,{radio_table_stats:t,radio_table_item:E}))):null})}]}):null})},69976(e,t,a){a.d(t,{S:()=>D});var n=a(469733),l=a(296540),r=a(963070),i=a(71479),o=a(592510),s=a(422969),c=a(86571),m=a(689965),d=a(294591),E=a(564985),A=a(328403),u=a(801081),_=a(960407),p=a(477544),h=a(180830);const C=(0,u.Mz)(h.K8,p.Ag,_.gm,(e,t,a)=>e.filter(({device_macs:e,for_wlanconf:t})=>e.includes(a)&&!t).map(e=>{const a=[];return((t||[]).filter(t=>t?.ap_group_ids?.includes(e._id))||[]).forEach(t=>{(t?.wlan_bands||[]).forEach(n=>{a.push({...t,id:`${t._id}-${e._id}-${n}`,wlan_band:n})}),a.length||a.push({...t,id:t._id+e._id})}),{...e,id:e._id,children:a}}));var y=a(271856),g=a(705145),b=a(662965),T=a(955161),O=a(916537),f=a(983329);const x=(0,i.A)(b.A)`
  margin-right: 7px;
  margin-bottom: 2px;
`,M=e=>t=>l.createElement(y.A,{description:l.createElement(l.Fragment,null,e.map(e=>l.createElement(l.Fragment,{key:e},l.createElement(O.sA,{id:"COMMON_BSSID"})," ",e))),width:167,portal:!0},t),N=[{id:"name",label:l.createElement(O.sA,{id:"DEVICE_PROPERTIES_AP_GROUP_TABLE_HEADER_NAME"}),renderCell:({name:e,attr_no_delete:t,children:a,wlan_band:n,bssids:r})=>a?l.createElement(g.A,{isTruncated:!0,color:"inherit",size:"medium"},(0,f.K5)({attr_no_delete:t})?l.createElement(l.Fragment,null,e," (",l.createElement(O.sA,{id:"COMMON_DEFAULT"}),")"):e):l.createElement(T.A,{condition:!!r?.length,wrapper:M(r||[])},l.createElement(g.A,{isTruncated:!0,color:"inherit",size:"medium"},n===d._$.NG?l.createElement(l.Fragment,null,l.createElement(x,null),e," (",l.createElement(O.sA,{id:"COMMON_RADIO_BAND_NG"}),")"):null,n===d._$.NA?l.createElement(l.Fragment,null,l.createElement(x,null),e," (",l.createElement(O.sA,{id:"COMMON_RADIO_BAND_NA"}),")"):null,n===d._$.AX?l.createElement(l.Fragment,null,l.createElement(x,null),e," (",l.createElement(O.sA,{id:"COMMON_RADIO_BAND_6E"}),")"):null))}],I=(0,i.A)("div")`
  table thead {
    display: none;
  }
`,S={[d._$.NG]:E.sx.RADIO_NG,[d._$.NA]:E.sx.RADIO_NA,[d._$.AX]:E.sx.RADIO_6E},$=({vap_table:e=[],radio_table:t=[]})=>{const a=(0,n.useSelector)(C),i=(0,l.useMemo)(()=>t?.reduce((e,t)=>(e[t.radio]=t,e),{}),[t]),c=(0,l.useMemo)(()=>a.map(t=>({...t,children:(t.children||[]).filter(e=>e.wlan_band&&i?.[S[e.wlan_band]]).map(t=>({...t,bssids:e?.filter(e=>t.wlan_band&&e.wlanconf_id===t._id&&e.radio===S[t.wlan_band]).map(e=>e?.bssid||"")}))})),[a,i,e]);return(0,s.A)([(0,A.Yo)(void 0,{crudCacheStrategy:{type:o.e.CACHE}})],l.createElement(I,null,l.createElement(r.A,{truncateHeaderCells:!0,items:c,columns:N,disableColumnFilters:!0,disableSelection:!0,disableTextPointer:!0})))},D=(0,l.memo)(({vap_table:e,radio_table:t})=>e?.length?l.createElement(m.A,{type:m.I.ACCORDION,items:[{id:"apGroups",label:l.createElement(c.A,{id:"COMMON_AP_GROUPS"}),renderContent:()=>l.createElement($,{vap_table:e,radio_table:t}),openByDefault:!0}]}):null)},32100(e,t,a){a.d(t,{A:()=>R});var n=a(469733),l=a(296540),r=a(325898),i=a(592510),o=a(282556),s=a(422969),c=a(595763),m=a(566723),d=a(11001),E=a(294303),A=a(689965),u=a(248951),_=a(602021),p=a(198494),h=a(780811),C=a(801081),y=a(25553),g=a(87485);const b=({queryParams:e},{queryParams:t})=>e?.mac===t?.mac;var T=a(771805);const O="deviceDailyTxRetries",f=`${T.w}/device/:mac:/24hr-tx-retries`,x="mac";var M=a(691189),N=a(863489),I=a(866487),S=a(231460);const $={},D=({stat:e,mac:t,uplink:a,uptime:i,last_seen:s,deviceState:u})=>{const T=(0,n.useDispatch)(),{motif:D}=(0,r.A)(),R=(0,n.useSelector)(_.hq),w=(0,n.useSelector)(o.zi),L=(0,n.useSelector)(p.BQ),P=(0,l.useMemo)(()=>(0,N.lD)(e),[e]),{translationKey:z,textColor:k}=(0,l.useMemo)(()=>(0,N.QS)(D,P),[P,D]),v=(0,l.useMemo)(()=>(0,h.aK8)(u),[u]),Y=(0,n.useSelector)((0,l.useMemo)(()=>(e=>(0,C.Mz)((e=>(0,C.Mz)((e=>({models:t})=>(0,y.JC)(O,t,{queryParams:{mac:e}},{idField:x,compareFunction:b}))(e),e=>(0,g.kh)(e)[0]))(e),e=>e?.historical_scores||[]))(t),[t])),B=(0,l.useMemo)(()=>(0,N.bW)(Y,D),[Y,D]),F=(0,l.useMemo)(()=>B.every(({not_reported:e})=>e),[B]);return(0,l.useEffect)(()=>{(!$[t]||Date.now()-$[t]>=3e5)&&T(((e,t={},a={})=>(0,M.An)([{model:O,payload:t=>[{...t,[x]:e}]}],f.replace(":mac:",e),{queryParams:{mac:e},...t},{idField:x,compareFunction:b,...a}))(t)).then(()=>{$[t]=Date.now()})},[T,t]),l.createElement(A.A,null,l.createElement(S.hW,{score:P,headerTranslationKey:"COMMON_TX_RETRIES",scoreTranslationKey:F?"COMMON_FALLBACK":z,hideScore:F,color:F?I.PC[D][c.Jm.NOT_REPORTED]:k}),l.createElement(E.A,{flexDirection:"column",marginTop:m.Ln,gap:m.YC},l.createElement(S.dC,{stackedBarItems:B,labelTranslationKey:"COMMON_TX_RETRIES",siteTimezone:R,language:w,selfHourCycle:L}),l.createElement(S.XG,{siteTimezone:R,selfHourCycle:L,language:w,startTime:Y[0]?.timestamp})),l.createElement(E.A,{width:"100%",justifyContent:"space-between"},l.createElement(E.A,null,a?l.createElement(l.Fragment,null,l.createElement(d.A,{style:{marginRight:"6px"},bytesPerSecond:v?0:a["rx_bytes-r"]||0,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),l.createElement(d.A,{bytesPerSecond:v?0:a["tx_bytes-r"]||0,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})):null),v?null:l.createElement(S.kD,{uptime:i,last_seen:s})))},R=e=>(0,s.A)([(0,u.P)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})],l.createElement(D,{...e}))},943393(e,t,a){a.d(t,{A:()=>W});var n=a(469733),l=a(296540),r=a(271856),i=a(217439),o=a(968906),s=a(592510),c=a(422969),m=a(15095),d=a(398300),E=a(566723),A=a(646189),u=a(708719),_=a(294303),p=a(703447),h=a(689965),C=a(845030),y=a(627440),g=a(916537),b=a(580427),T=a(713570),O=a(360146),f=a(281837),x=a(239417),M=a(984652),N=a(619066),I=a(343651),S=a(705145),$=a(592563),D=a(903216),R=a(943805),w=a(501103),L=a(445772),P=a(482572),z=a(691294),k=a(336549),v=a(668995),Y=a(664967),B=a(601242),F=a(411502),K=a(89716),G=a(987309),H=a(584916);const{startDate:V,endDate:U}=Y.E[H.l.ONE_DAY].getRange(new Date),X=(0,l.memo)(({mac:e})=>{const t=(0,n.useDispatch)(),a=V.getTime(),r=U.getTime(),o=(0,n.useSelector)((0,l.useMemo)(()=>(0,K.Fr)({start:a,end:r,includeUnidentified:!0,mac:e}),[e,a,r])),c=(0,l.useMemo)(()=>(o?.usage_by_app||[]).reduce((e,{total_bytes:t,category:a,application:n})=>e+((0,B.ez)((0,v.h)(a,n)).toLowerCase()!==F.HV?t:0),0)||0,[o?.usage_by_app]);return(0,l.useEffect)(()=>{t((0,G.m)({start:a,end:r,includeUnidentified:!0,mac:e},void 0,{crudCacheStrategy:{type:s.e.CACHE}}))},[t,r,e,a]),l.createElement(P.zd,null,l.createElement(i.A,{size:"small",color:"text-1"},l.createElement(g.sA,{id:"COMMON_24H_INTERNET_ACTIVITY"})),l.createElement(i.A,{size:"small",color:"text-2"},(0,D.FI)(c)))}),Z=({client:e})=>{const{navigateToApClients:t,openClientPropertyPanel:a}=(0,I.A)(),n=(0,l.useCallback)(()=>{t(),a(e.mac)},[t,a,e.mac]);return l.createElement(P.UI,null,l.createElement(P.Se,null,l.createElement(P.K5,null,l.createElement(p.A,{size:b.D,width:O.oT,height:O.oT,client:e}),l.createElement(S.A,{size:"medium",weight:"bold",color:"text-1",isTruncated:!0},e.display_name||l.createElement(g.sA,{id:"COMMON_UNKNOWN"})))),l.createElement(P.Se,null,l.createElement(P.zd,null,l.createElement(i.A,{size:"small",color:"text-1"},l.createElement(S.A,{variant:"caption",color:"text-1",isTruncated:!0},l.createElement(g.sA,void 0!==e.channel?{id:"COMMON_CHANNEL_RADIO_CHANNEL",values:{channel:e.channel}}:{id:"COMMON_FALLBACK"})," (",e.radio&&R.A[e.radio.toUpperCase()]?.frequency||l.createElement(g.sA,{id:"COMMON_FALLBACK"}),", ",e.channel_width||l.createElement(g.sA,{id:"COMMON_FALLBACK"})," ",l.createElement(g.sA,{id:"COMMON_UNIT_MHZ"}),")")),void 0!==e.signal?l.createElement(k.c,{signal:e.signal,size:"small"}):l.createElement(g.sA,{id:"COMMON_FALLBACK"})),l.createElement(P.zd,null,l.createElement(i.A,{size:"small",color:"text-1"},l.createElement(g.sA,{id:"COMMON_DOWNLOAD"})),l.createElement(P.K5,null,l.createElement(L.A.Icon,{size:"small"}),l.createElement(i.A,{size:"small",color:"traffic-down"},(0,D.FI)(e["rx_bytes-r"]||0)))),l.createElement(P.zd,null,l.createElement(i.A,{size:"small",color:"text-1"},l.createElement(g.sA,{id:"COMMON_UPLOAD"})),l.createElement(P.K5,null,l.createElement(w.A.Icon,{size:"small"}),l.createElement(i.A,{size:"small",color:"traffic-up"},(0,D.FI)(e["tx_bytes-r"]||0)))),e.status===z.S2.ONLINE?l.createElement(X,{mac:e.mac}):null),l.createElement(P.Se,null,l.createElement(P.zd,null,l.createElement($.A,{onPress:n},l.createElement(g.sA,{id:"COMMON_VIEW_IN_CLIENTS"})))))},j=({headerTranslationKey:e,scoreTranslationKey:t,onSeeAllClick:a})=>{const n=(0,m.A)(y.VO.CLIENTS);return l.createElement(_.A,{justifyContent:"space-between"},l.createElement(i.A,{color:"text-1",size:"medium",weight:"bold"},l.createElement(g.sA,{id:e})),l.createElement(u.A,{allowReadOnly:!0,to:n,onClick:a},l.createElement(g.sA,{id:t})))},W=({mac:e})=>{const t=(0,n.useDispatch)(),{navigateToApClients:a}=(0,I.g)(),i=(0,n.useSelector)((0,l.useMemo)(()=>(0,x.A5)(e),[e])),m=(0,l.useCallback)(e=>()=>{t((0,C.XP)({type:d.H.CLIENT,id:e}))},[t]),u=(0,l.useCallback)(()=>{a([e],[])},[e,a]),y=i.length;return(0,c.A)([(0,M.$3)(void 0,{crudCacheStrategy:{type:s.e.CACHE}})],y>0?l.createElement(h.A,null,l.createElement(j,{headerTranslationKey:"DEVICE_HEADER_MOST_ACTIVE_CLIENTS",scoreTranslationKey:"COMMON_SEE_ALL",onSeeAllClick:u}),l.createElement(_.A,{flexDirection:"column",marginTop:E.Ln},l.createElement(_.A,{flexDirection:"row",justifyContent:y>=7?"space-between":void 0,gap:y<7?E.kc:void 0},i.sort((e,t)=>t.usage_bytes-e.usage_bytes).slice(0,7).map(e=>l.createElement(r.A,{width:240,description:e?l.createElement(Z,{client:e}):null,key:e.mac,portal:!0,isInteractive:!0},l.createElement(f.uc,{onClick:m(e[N.cb.MAC]),...o.A.addDataTestId(o.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(f._S,null,l.createElement(A.A,{size:2*O.Yk,mac:e[N.cb.MAC]})),l.createElement(f.uS,null,(0,l.createElement)((0,f.nH)(p.A),{client:e,width:O.oT,height:O.oT,size:b.D}),l.createElement(T.A,{offset:i?.[0]?.usage_bytes?e.usage_bytes/i[0].usage_bytes:0})),l.createElement(f.pn,{size:"xsmall",color:"text-3",isCentered:!0,isTruncated:!0,style:{width:`${O.Yk}px`}},e?.display_name))))))):null)}},668995(e,t,a){a.d(t,{h:()=>n});const n=(e,t)=>(e<<16)+t}}]);