"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[58163],{78853(e,t,r){r.d(t,{A:()=>v});var n,l=r(592563),a=r(296540),c=r(469733),i=r(217439),s=r(187483),o=r(916537),m=r(689965),E=r(86571),A=r(801081);!function(e){e.OPEN_MODAL="openModal"}(n||(n={}));const u=(0,A.Mz)(s.zn,e=>void 0!==e[n.OPEN_MODAL]);var _=r(856632),d=r(957866);const p=({uidbDevice:e})=>{const t=(0,c.useSelector)(s.zn),r=t?.[n.OPEN_MODAL];return r?a.createElement(l.A,{onClick:()=>r(e)},a.createElement(i.A,{size:"medium",color:"inherit"},a.createElement(o.sA,{id:"DEVICE_SHOW_DETAILS"}))):null},x=({shortname:e})=>{(0,d.A)();const t=(0,c.useSelector)((0,a.useMemo)(()=>(0,_.$E)(e),[e]));return t?.compliance?a.createElement(m.A,{type:m.I.ACCORDION,items:[{id:"compliance",label:a.createElement(E.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>a.createElement(p,{uidbDevice:t}),openByDefault:!0}]}):null},v=({shortname:e})=>(0,c.useSelector)(u)?a.createElement(x,{shortname:e}):null},782558(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(217439),a=r(137298),c=r(916537),i=r(360113);const s=({rx_rate:e})=>e>0?n.createElement(i.A,null,n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"COMMON_RX_RATE"})),n.createElement(l.A,{color:"text-3",size:"medium"},(0,a.Up)(e))):null},150556(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(217439),a=r(137298),c=r(916537),i=r(360113);const s=({tx_rate:e})=>e>0?n.createElement(i.A,null,n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"COMMON_TX_RATE"})),n.createElement(l.A,{color:"text-3",size:"medium"},(0,a.Up)(e))):null},53715(e,t,r){r.d(t,{A:()=>v});var n=r(469733),l=r(296540),a=r(217439),c=r(758649),i=r(71479),s=r(132196),o=r(968906),m=r(398300),E=r(566723),A=r(845030),u=r(916537),_=r(360113);const d=(0,i.A)(c.A)`
  height: 24px;
  display: block;
  padding: 0;
`,p=s.AH`
  margin-left: ${E.kc};
  overflow: hidden;
`,x=s.AH`
  display: inline-block !important;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
`,v=(0,l.memo)(({uplinkMac:e,uplinkName:t,label:r="COMMON_DEVICE"})=>{const c=(0,n.useDispatch)(),i=(0,l.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),c((0,A.XP)({type:m.H.DEVICE,id:e}))},[c,e]);return l.createElement(_.A,null,l.createElement(a.A,{color:"text-2",size:"medium"},l.createElement(u.sA,{id:r})),l.createElement(d,{variant:"link",size:"medium",onClick:i,wrapClassName:p,contentClassName:x,...o.A.addDataTestId(o.A.TestId.SIDE_PANEL_TRIGGER)},t))})},400242(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(217439),a=r(916537),c=r(780811),i=r(360113);const s=({ip:e,lan_ip:t,ethernet_overrides:r,port_table:s,type:o,wan:m=!1,lan:E=!1,compact:A=!1})=>{const u=(0,c.o_Q)({type:o,ip:e,lan_ip:t,ethernet_overrides:r,port_table:s}),_=(0,n.useMemo)(()=>m?"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS":E?"DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS":"COMMON_IP_ADDRESS",[m,E]);return u?n.createElement(i.A,{compact:A},n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(a.sA,{id:_})),n.createElement(l.A,{color:"text-3",size:"medium"},u)):null}},205830(e,t,r){r.d(t,{A:()=>E});var n=r(296540),l=r(217439),a=r(83438),c=r(566723),i=r(294303),s=r(916537),o=r(780811),m=r(360113);const E=({sys_stats:e,flexProps:t,withTooltip:r,compact:E=!1})=>{const A=(0,o.eiG)(e);return A?n.createElement(m.A,{flexProps:t,compact:E},n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(s.sA,{id:"COMMON_LOAD_AVERAGE"})),r?n.createElement(i.A,{alignItems:"center",gap:c.YC},n.createElement(l.A,{color:"text-3",size:"medium"},A),n.createElement(a.A,{description:n.createElement(s.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),placement:"top start"})):n.createElement(l.A,{color:"text-3",size:"medium"},A)):null}},329708(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(217439),a=r(6510),c=r(916537),i=r(360113);const s=({model:e})=>n.createElement(i.A,null,n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"COMMON_MODEL"})),n.createElement(l.A,{color:"text-3",size:"medium"},(0,a.Lm)(e)))},120401(e,t,r){r.d(t,{A:()=>o});var n=r(296540),l=r(217439),a=r(777916),c=r(137298),i=r(916537),s=r(360113);const o=(0,n.memo)(({rx_packets:e,rx_bytes:t})=>n.createElement(s.A,null,n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(i.sA,{id:"COMMON_DOWN_PKTS_BYTES"})),n.createElement(l.A,{color:"text-3",size:"medium"},e&&t?n.createElement(n.Fragment,null,n.createElement(a.A,{size:"body",type:"number",input:e,color:"tertiary"})," / ",(0,c.z3)(t)):"- / -")))},336549(e,t,r){r.d(t,{A:()=>o,c:()=>s});var n=r(296540),l=r(217439),a=r(38937),c=r(916537),i=r(360113);const s=({signal:e,color:t,size:r})=>n.createElement(l.A,{size:r||"medium",color:t||(0,a.b5)(e)},e," ",n.createElement(c.sA,{id:"COMMON_UNIT_DBM"})),o=(0,n.memo)(e=>n.createElement(i.A,null,n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(c.sA,{id:"COMMON_SIGNAL"})),n.createElement(s,{...e})))},123786(e,t,r){r.d(t,{A:()=>o});var n=r(296540),l=r(217439),a=r(777916),c=r(137298),i=r(916537),s=r(360113);const o=(0,n.memo)(({tx_packets:e,tx_bytes:t})=>n.createElement(s.A,null,n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(i.sA,{id:"COMMON_UP_PKTS_BYTES"})),n.createElement(l.A,{color:"text-3",size:"medium"},e&&t?n.createElement(n.Fragment,null,n.createElement(a.A,{size:"body",type:"number",input:e,color:"tertiary"})," / ",(0,c.z3)(t)):"- / -")))},20379(e,t,r){r.d(t,{A:()=>u});var n=r(296540),l=r(231755),a=r(294303),c=r(566723),i=r(247324),s=r(217439),o=r(916537),m=r(842916),E=r(360113);const A=({radio:e})=>n.createElement(E.A,{flexProps:{marginTop:c.kc}},n.createElement(s.A,{variant:"heading-medium",color:"text-2"},n.createElement(o.sA,{id:m.U[e]})," (",n.createElement(o.sA,{id:"COMMON_MLO"}),")")),u=({mlo_links:e})=>n.createElement(n.Fragment,null,n.createElement(l.A,null),n.createElement(a.A,{flexDirection:"column",marginTop:c.kc},(e||[]).map(e=>n.createElement(n.Fragment,{key:`${e.name}-${e.radio}`},n.createElement(A,{radio:e.radio}),n.createElement(i.A,{stats:e})))))},560595(e,t,r){r.d(t,{A:()=>k});var n=r(469733),l=r(296540),a=r(294303),c=r(916537),i=r(927806),s=r(768195),o=r(532419),m=r(123786),E=r(217439),A=r(360113);const u=({activeItem:e,devices:t})=>{const{poe_power:r}=(0,i.$Y)({device:e,devices:t})||{poe_power:void 0};return l.createElement(A.A,null,l.createElement(E.A,{color:"text-2",size:"medium"},l.createElement(c.sA,{id:"DEVICE_PROPERTY_UPLINK_POWER"})),l.createElement(E.A,{color:"text-3",size:"medium"},l.createElement(c.sA,{...+r>0?{id:"COMMON_UNIT_WATTS_SHORT",values:{value:r}}:{id:"COMMON_FALLBACK"}})))};var _=r(258117),d=r(120401),p=r(53715),x=r(20379),v=r(247324);const O=(e=[])=>e.map(e=>({name:e.name||"",radio:e.radio||"",signal:e.signal||0,tx_rate:e.tx_rate||0,rx_rate:e.rx_rate||0,rx_packets:e.rx_packets||0,tx_packets:e.tx_packets||0,rx_bytes:e.rx_bytes||0,tx_bytes:e.tx_bytes||0})),M=({uplink:e,activeItem:t,devices:r})=>l.createElement(l.Fragment,null,l.createElement(_.A,{uplink:e}),l.createElement(u,{activeItem:t,devices:r}),l.createElement(d.A,{rx_packets:e.rx_packets,rx_bytes:e.rx_bytes}),l.createElement(m.A,{tx_packets:e.tx_packets,tx_bytes:e.tx_bytes})),k=({activeItem:e,devices:t})=>{const{formatMessage:r}=(0,c.tz)(),m=(0,n.useSelector)((0,l.useMemo)(()=>(0,o.I4)(e.mac),[e.mac])),E=(0,i.q$)(e)||{},A=(0,l.useMemo)(()=>(0,i.Uj)({type:E.type,mlo_links:E.mlo_links}),[E.type,E.mlo_links]);return l.createElement(a.A,{height:"100%",flexDirection:"column"},m?.mac?l.createElement(p.A,{uplinkMac:m.mac,uplinkName:(0,i.Jz)(e,m,r),label:"COMMON_DEVICE"}):null,E.type===s.au.WIRE?l.createElement(M,{uplink:E,activeItem:e,devices:t}):null,E.type!==s.au.WIRELESS||A?null:l.createElement(v.A,{stats:{signal:E.signal,tx_rate:E.tx_rate,rx_rate:E.rx_rate,rx_packets:E.rx_packets,tx_packets:E.tx_packets,rx_bytes:E.rx_bytes,tx_bytes:E.tx_bytes}}),E.type===s.au.WIRELESS&&A?l.createElement(x.A,{mlo_links:O(E.mlo_links)}):null)}},247324(e,t,r){r.d(t,{A:()=>o});var n=r(296540),l=r(782558),a=r(150556),c=r(120401),i=r(336549),s=r(123786);const o=({stats:{signal:e,tx_rate:t,rx_rate:r,rx_packets:o,tx_packets:m,rx_bytes:E,tx_bytes:A}})=>n.createElement(n.Fragment,null,e?n.createElement(i.A,{signal:e}):null,n.createElement(a.A,{tx_rate:t}),n.createElement(l.A,{rx_rate:r}),n.createElement(c.A,{rx_packets:o,rx_bytes:E}),n.createElement(s.A,{tx_packets:m,tx_bytes:A}))},766624(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(271856),a=r(709690),c=r(284428),i=r(566723);const s=({description:e,isInteractive:t,portal:r=!0,cursorType:s,title:o,position:m,width:E,iconProps:A,disabled:u=!1})=>{const _=(0,c.Im)()||u,d=(0,c.q)();return n.createElement(l.A,{description:e,portal:r,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:s,title:o,position:m,width:E,disableHover:d},n.createElement(a.A,{isActive:!0,size:"original",opacity:_?i.xN:void 0,...A}))}},451449(e,t,r){r.d(t,{I:()=>n});const n=(0,r(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},284428(e,t,r){r.d(t,{Im:()=>s,iL:()=>o,mQ:()=>c,pv:()=>a,q:()=>i});var n=r(296540),l=r(451449);function a(){return(0,n.useContext)(l.I)}function c(){return a().fields}function i(){return a().tooltipPopovers}function s(){return a().tooltipIcons}function o(){return a().labels}},957866(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(469733),a=r(765562),c=r(79871),i=r(856632);const s=()=>{const e=(0,l.useDispatch)(),t=(0,l.useSelector)(i.eo);return(0,n.useEffect)(()=>{t||(async()=>{const t=await fetch(a.A.fingerprintPublicDatabasePath),r=await t.json();e((0,c.$)(r))})()},[t,e]),t}},856632(e,t,r){r.d(t,{$E:()=>m,eo:()=>s});var n=r(801081),l=r(523275),a=r(840279),c=r(919952);const i=e=>e[c.U.UIDB]||(0,l.A)(),s=(0,n.Mz)(i,({version:e})=>Boolean(e)),o=(0,n.Mz)(i,({devices:e})=>e||(0,a.A)()),m=e=>(0,n.Mz)(o,t=>t.find(({shortnames:t})=>e&&(t||[]).includes(e))||(0,l.A)());(0,n.Mz)(o,e=>{const t=new Map;for(let r=0;r<e.length;r+=1){const n=e[r].power?.baseConsumption;if(void 0!==n){const{shortnames:l}=e[r];for(let e=0;e<(l||[]).length;e+=1)t.set(l[e],n)}}return t})}}]);