"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[22106],{147433(e,t,s){s.d(t,{A:()=>i});const i={PCAP:4194304,HWOFFLOAD_QOS_AND_SMART_QUEUE:2147483648,SUPPORT_FILE:65536}},602381(e,t,s){var i,n;s.d(t,{Z:()=>n,e:()=>i}),function(e){e.WIRED="WIRED",e.WIRELESS="WIRELESS"}(i||(i={})),function(e){e.CAPTURING="CAPTURING",e.STOP_CAPTURING="STOP_CAPTURING",e.UPLOADING="UPLOADING",e.READY_TO_DOWNLOAD="READY_TO_DOWNLOAD",e.TIMEOUT="TIMEOUT"}(n||(n={}))},358935(e,t,s){s.d(t,{X2:()=>u,lX:()=>_,uC:()=>A});var i=s(571766),n=s(29472),r=s(159469),a=s(774366);const o=`${s(290454).w}/device/:mac:`,l=`${o}/replacement-candidates`,d=`${o}/replace?replacementDeviceMac=:replacement-mac:`,c=`${o}/replace`,_=(e={},t={})=>(0,n.Kd)("replacementCandidates",`${l.replace(":mac:",e.queryParams?.mac)}`,e.queryParams?.mac,e,{...t,idField:"mac"}),A=(e,t)=>s=>s((0,n.vB)(i.aC,null,null,a.A.POST,d.replace(":mac:",e).replace(":replacement-mac:",t),{},null,{})),u=e=>t=>t((0,n.vB)(i.aC,null,null,a.A.DELETE,c.replace(":mac:",e),{},null,{failureToast:()=>({icon:r.C.danger,message:"COMMON_UNKNOWN_ERROR"})}))},752104(e,t,s){s.d(t,{A:()=>n,Q:()=>r});var i=s(765567);const n="_",r=[i.ZM,i.Je]},453007(e,t,s){s.d(t,{A:()=>a});var i=s(938984),n=s(247816),r=s(291508);const a=(0,n.A)(i.A,(0,r.A)("colorOverride"))`
  ${({colorOverride:e})=>e?`color: ${e} !important`:""};
`},216082(e,t,s){s.d(t,{A:()=>j});var i,n=s(274934),r=s(954702),a=s(602086),o=s(977872),l=s(938984),d=s(976458),c=s(470070),_=s(535322),A=s(376892),u=s(222102);!function(e){e.OPEN_MODAL="openModal"}(i||(i={}));const m=(0,u.Mz)(d.zn,e=>void 0!==e[i.OPEN_MODAL]);var x=s(828373),E=s(367821);const p=({uidbDevice:e})=>{const t=(0,o.d4)(d.zn),s=t?.[i.OPEN_MODAL];return s?(0,n.jsx)(r.A,{onClick:()=>s(e),children:(0,n.jsx)(l.A,{size:"medium",color:"inherit",children:(0,n.jsx)(c.sA,{id:"DEVICE_SHOW_DETAILS"})})}):null},h=({shortname:e})=>{(0,E.A)();const t=(0,o.d4)((0,a.useMemo)(()=>(0,x.$E)(e),[e]));return t?.compliance?(0,n.jsx)(_.A,{type:_.I.ACCORDION,items:[{id:"compliance",label:(0,n.jsx)(A.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>(0,n.jsx)(p,{uidbDevice:t}),openByDefault:!0}]}):null},j=({shortname:e})=>(0,o.d4)(m)?(0,n.jsx)(h,{shortname:e}):null},189042(e,t,s){s.d(t,{A:()=>b});var i=s(274934),n=s(977872),r=s(602086),a=s(244081),o=s(586566),l=s(441318),d=s(996077),c=s(539453),_=s(553732),A=s(897166),u=s(147433),m=s(247816),x=s(669439),E=s(648175),p=s(470070),h=s(956978),j=s(434521),C=s(45978),I=s(147045);const O=(0,m.A)("span")`
  width: 100%;
`,N=({activeItem:e,onClick:t,disabledWithReason:s,[I.L]:n})=>{const r=(e=>{const t=(0,j.S9)(e);return e.disabled||t!==C.g.CONNECTED||!(0,h.sc7)(t)?"DEVICE_PCAP_DISABLED_TOOLTIP":null})(e)||s;return(0,i.jsx)(x.A,{description:r?(0,i.jsx)(p.sA,{id:r}):void 0,children:(0,i.jsx)(O,{...n&&{[I.L]:n},children:(0,i.jsx)(E.A,{onClick:t,isDisabled:!!r,width:"full",children:(0,i.jsx)(p.sA,{id:"COMMON_PACKET_CAPTURE"})})})})};var v=s(205521),M=s(449339),R=s(590979),T=s(231083),g=s(409844),P=s(309130),S=s(100978);const D=g.AH`
  &:empty {
    display: none;
  }
`,f=(0,m.A)("div")`
  flex: 1 1 0;
  min-width: 33%;
  box-sizing: border-box;
  padding-right: ${P.kc};

  &:last-child {
    padding-right: 0;
  }
`,w=({children:e,...t})=>(0,i.jsx)(S.A,{marginTop:P.kc,className:D,...t,children:r.Children.map(e,e=>e?(0,i.jsx)(f,{className:D,children:e}):null)}),b=({activeItem:e,showPortsButton:t,showCaptureButton:s})=>{const m=(0,n.wA)(),x=(0,n.d4)(A.vc),E=(0,n.d4)(l.ar),p=s&&x===e.mac&&E&&(0,o.W4)(e,u.A.PCAP),h=t&&e.port_table?.length>0;(0,r.useEffect)(()=>{m((0,_.Sk)(void 0,{crudCacheStrategy:{type:a.e.CACHE}})),m((0,c.hh)(void 0,{crudCacheStrategy:{type:a.e.CACHE}}))},[m]);const j=(0,r.useCallback)(()=>{m((0,v.XP)({type:M.H.PACKET_CAPTURE,id:e.mac,customData:{captureDeviceType:d.X.GATEWAY}}))},[m,e.mac]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(w,{children:[h?(0,i.jsx)(T.A,{mac:e.mac}):null,p?(0,i.jsx)(N,{activeItem:e,captureDeviceType:d.X.GATEWAY,onClick:j,...R.A.addDataTestId(R.A.TestId.SIDE_PANEL_TRIGGER)}):null]})})}},721398(e,t,s){s.d(t,{A:()=>o});var i=s(274934),n=s(125799),r=s(853777),a=s(470070);const o=({messageId:e,tooltipClassName:t,values:s,isInteractive:o,portal:l,variant:d="twoTone",size:c="medium"})=>(0,i.jsx)(n.A,{description:(0,i.jsx)(a.sA,{id:e,values:s}),width:210,isInteractive:o,portal:l,tooltipClassName:t,children:(0,i.jsx)(r.A,{isActive:!0,omitSvgMargin:!0,variant:d,size:c})})},996077(e,t,s){var i,n;s.d(t,{A:()=>i,X:()=>n}),function(e){e.DEFAULT="default",e.IN_PROGRESS="inProgress",e.READY="ready",e.DOWNLOADING="downloading",e.STOPPING="stopping"}(i||(i={})),function(e){e.AP="ap",e.GATEWAY="gateway"}(n||(n={}))},441318(e,t,s){s.d(t,{VQ:()=>v,ar:()=>R,ax:()=>T,r8:()=>g});var i=s(222102),n=s(430328),r=s(197719),a=s(254590),o=s(243436),l=s(910577),d=s(407386),c=s(423564),_=s(581814),A=s(197571),u=s(267142),m=s(644533),x=s(754924),E=s(544691),p=s(602381),h=s(996077);const j=[_.rR.CORPORATE,_.rR.GUEST],C=e=>void 0===e||e,I=({_id:e,name:t,enabled:s,ip_subnet:i,ipv6_subnet:n,wan_networkgroup:r,vpn_type:o,purpose:l,l2tp_interface:d,openvpn_interface:_,wireguard_interface:A,ipsec_interface:m,sdwan_hub_spoke_local_wan_id:x},E)=>({_id:e,enabled:C(s),name:t||a.L,ip_subnet:E?a.L:(0,c.Qe)({ip_subnet:i,ipv6_subnet:n},u.L),wan_networkgroup:r,vpn_type:o,ipsec_interface:m,l2tp_interface:d,openvpn_interface:_,purpose:l,sdwan_hub_spoke_local_wan_id:x,wireguard_interface:A}),O=(e,t)=>e?e===r.C.WAN?t.wan1:t[e.toLocaleLowerCase()]||{}:{},N=(e,t=p.e.WIRELESS)=>(0,i.Mz)(A.Ct,l.Ag,(0,E.a5)(e),x.fq,x.Dx,(e,s,i,n,r)=>{const a=s.reduce((e,{enabled:t,networkconf_id:s,ap_group_ids:n=[]})=>(t&&i.some(({_id:e})=>n.includes(e))&&e.push(s),e),[]);return e.reduce((e,s)=>(m.A.includes(s.purpose)&&(a.includes(s._id)||t===p.e.WIRED)&&e.push(I(s,(0,o.cH)({gateway_device:s.gateway_device,purpose:s.purpose},n,r))),e),[])}),v=(e,t=p.e.WIRELESS)=>(0,i.Mz)(N(e,t),e=>Boolean(e.length)),M=(0,n.WY)()((0,i.Mz)(A.Ct,x.U$,d.$D,x.AL,(e,t,s,i)=>[...e.reduce((e,s)=>(s&&t.network_table?.some(({_id:e})=>e===s._id)&&C(s.enabled)&&s.gateway_type!==_.xk.SWITCH&&j.includes(s.purpose)&&e.push(I(s)),e),[]),...s.reduce((e,{configuration:s={}})=>{if((({purpose:e,wan_networkgroup:t},s)=>{if(e!==_.rR.WAN)return!1;if(t===r.C.WAN_LTE_FAILOVER)return!0;const i=O(t,s);return!!i?.up})(s,t)){let n;if(s.wan_networkgroup===r.C.WAN_LTE_FAILOVER)n=i?.lte_ip;else{const e=O(s.wan_networkgroup,t);n=e?.ip}e.push({...I(s),...n?{ip_subnet:n}:{}})}return e},[])]),e=>e),R=(0,n.WY)()((0,i.Mz)(M,e=>Boolean(e.length)),e=>e),T=(e,t,s)=>{switch(t){case h.X.AP:return s===p.e.WIRELESS?N(e,s):(e=>(0,i.Mz)((0,x.tG)(e),A.Ct,x.fq,x.Dx,(e,t,s,i)=>{if(!e.connection_network_id)return[];const n=t.find(({_id:t})=>t===e.connection_network_id);return n?[I(n,(0,o.cH)({gateway_device:n.gateway_device,purpose:n.purpose},s,i))]:[]}))(e);case h.X.GATEWAY:return M;default:return()=>[]}},g=e=>(0,i.Mz)(l.Ag,t=>{const s=t.filter(t=>t.networkconf_id===e);return[...new Set(s.flatMap(e=>e.wlan_bands))]})},664613(e,t,s){s.d(t,{A:()=>_});var i=s(274934),n=s(938984),r=s(703639),a=s(309130),o=s(100978),l=s(470070),d=s(956978),c=s(664092);const _=({sys_stats:e,flexProps:t,withTooltip:s,compact:_=!1})=>{const A=(0,d.eiG)(e);return A?(0,i.jsxs)(c.A,{flexProps:t,compact:_,children:[(0,i.jsx)(n.A,{color:"text-2",size:"medium",children:(0,i.jsx)(l.sA,{id:"COMMON_LOAD_AVERAGE"})}),s?(0,i.jsxs)(o.A,{alignItems:"center",gap:a.YC,children:[(0,i.jsx)(n.A,{color:"text-3",size:"medium",children:A}),(0,i.jsx)(r.A,{description:(0,i.jsx)(l.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),placement:"top start"})]}):(0,i.jsx)(n.A,{color:"text-3",size:"medium",children:A})]}):null}},948803(e,t,s){s.d(t,{A:()=>l});var i=s(274934),n=s(938984),r=s(347625),a=s(470070),o=s(664092);const l=({model:e})=>(0,i.jsxs)(o.A,{children:[(0,i.jsx)(n.A,{color:"text-2",size:"medium",children:(0,i.jsx)(a.sA,{id:"COMMON_MODEL"})}),(0,i.jsx)(n.A,{color:"text-3",size:"medium",children:(0,r.Lm)(e)})]})},382583(e,t,s){s.d(t,{A:()=>A});var i=s(274934),n=s(602086),r=s(938984),a=s(95032),o=s(977872),l=s(421314),d=s(470070),c=s(197571),_=s(664092);const A=({connection_network_id:e})=>{const t=(0,o.d4)(c.Tn),s=(0,n.useMemo)(()=>e?t.find(t=>t._id===e):void 0,[t,e]);return s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(_.A,{children:[(0,i.jsx)(r.A,{color:"text-2",size:"medium",children:(0,i.jsx)(d.sA,{id:"COMMON_NETWORK"})}),(0,i.jsx)(l.A,{color:"text-3",size:"medium",flexProps:{justifyContent:"flex-end"},children:s.name})]}),null!=s.vlan?(0,i.jsxs)(_.A,{children:[(0,i.jsx)(r.A,{color:"text-2",size:"medium",children:(0,i.jsx)(d.sA,{id:"COMMON_VLAN_ID"})}),(0,i.jsx)(a.A,{color:"text-3",size:"medium",isTruncated:!0,children:s.vlan})]}):null]}):null}},919304(e,t,s){s.d(t,{A:()=>d});var i=s(274934),n=s(602086),r=s(938984),a=s(470070),o=s(314229),l=s(664092);const d=({psu_table:e})=>{const t=(0,n.useMemo)(()=>(0,o.Rj)(e),[e]);return(0,i.jsx)(i.Fragment,{children:t.map(({status:e,statusColor:t,source:s,id:n},o)=>(0,i.jsxs)(l.A,{children:[(0,i.jsx)(r.A,{size:"medium",children:(0,i.jsx)(a.sA,{id:s,..."COMMON_POWER_SUPPLY_UNIT"===s&&{values:{psuIndex:o+1}}})}),(0,i.jsx)(r.A,{size:"medium",color:t,children:(0,i.jsx)(a.sA,{id:e})})]},n))})}},203071(e,t,s){s.d(t,{A:()=>M});var i=s(274934),n=s(602086),r=s(43009),a=s(125799),o=s(814557),l=s(367551),d=s(900302),c=s(938984),_=s(600191),A=s(247816),u=s(263705),m=s(662986),x=s(309130),E=s(100978),p=s(453007),h=s(470070),j=s(314229),C=s(820510);const I=(0,A.A)(E.A)`
  justify-content: space-between;
`,O=(0,A.A)(d.A)`
  margin: 0 6px;
  height: 10px;
`,N=(0,A.A)(_.A)`
  margin: 0 6px;
`,v=({index:e,item:t})=>(0,i.jsxs)(C.m,{children:[(0,i.jsx)(C.Y,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:""},children:e+1}),t.temp?Object.entries(t.temp).map(([e,t])=>(0,i.jsxs)(C.Y,{id:"DEVICE_TEMPERATURE_SENSOR",values:{index:+e+1},children:[t?.toFixed(1)||(0,i.jsx)(h.sA,{id:"COMMON_FALLBACK"})," ",(0,i.jsx)(h.sA,{id:"COMMON_UNIT_CELSIUS"})]},e)):null,t.fanSpeed?(0,i.jsxs)(C.Y,{id:"DEVICE_FAN_SPEED",children:[t.fanSpeed," ",(0,i.jsx)(h.sA,{id:"COMMON_UNIT_RPM"})]}):null]}),M=({psuTable:e=[],marginBottom:t})=>{const{themeName:s,motifPalette:d}=(0,u.u)(),{motif:_}=(0,r.A)(),{formatMessage:A}=(0,h.tz)(),C=(0,n.useMemo)(()=>e.map(({power:t,power_capacity:n,temp:r,fan:u,present:x,online:C,label:M},R)=>{const T=n||550,g=Math.ceil(Number.parseFloat(t)/T*100),P={variant:(0,j.NH)(g),value:g,temp:r,fanSpeed:u?.[0],online:C,present:x},S=e?.[R]?.power;return(0,i.jsxs)(E.A,{flexDirection:"column",children:[(0,i.jsxs)(I,{children:[(0,i.jsx)(c.A,{color:"text-2",size:"medium",children:(0,i.jsx)(h.sA,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:R+1}})}),(0,i.jsx)(E.A,{justifyContent:"space-between",alignItems:"center",children:P.present?(0,i.jsxs)(i.Fragment,{children:[P.online||P.value?null:(0,i.jsx)(a.A,{description:A({id:"DEVICE_USW_MC_PSU_OFFLINE_TOOLTIP"},{index:R+1}),portal:!0,children:(0,i.jsx)(N,{size:"original",variant:"fill",color:o.Ay[`desktop-color-orange-06-${s}`],fill:o.Ay[`desktop-color-neutral-00-${s}`]})}),P.online?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.A,{color:"text-3",size:"medium",children:(0,i.jsx)(h.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:`${Math.ceil(Number.parseFloat(S))}/${T}`}})}),(0,i.jsx)(O,{orientation:"vertical",color:o.Ay[`desktop-color-neutral-04-${s}`]}),(0,i.jsx)(p.A,{size:"medium",colorOverride:P.value?d[P.variant]:o.Ay[`desktop-color-text-3-${_}`],children:(0,m.A)(P.value)})]}):null]}):(0,i.jsx)(c.A,{color:"text-3",size:"medium",children:(0,i.jsx)(h.sA,{id:"DEVICE_NOT_INSTALLED"})})})]}),(0,i.jsx)(a.A,{description:P.present?(0,i.jsx)(v,{index:R,item:P}):null,width:250,children:(0,i.jsx)(l.A,{items:[P],rounded:!0})})]},M)}),[e]);return(0,i.jsx)(E.A,{flexDirection:"column",marginBottom:t??x.kI,gap:x.kc,children:C})}},956021(e,t,s){s.d(t,{A:()=>x});var i=s(274934),n=s(602086),r=s(938984),a=s(662986),o=s(331472),l=s(470070),d=s(561614),c=s(927316),_=s(664092);const A={[d.sx.RADIO_NG]:"2.4",[d.sx.RADIO_NA]:"5",[d.sx.RADIO_6E]:"6",[d.sx.RADIO_AD]:"60"},u=e=>{const t=Math.min(e,100);return(0,i.jsx)(r.A,{size:"medium",color:(0,o.Ld)(t),children:(0,a.l)(t)})},m=(e,t=" / ")=>(0,i.jsx)("div",{children:e.map((s,r)=>(0,i.jsxs)(n.Fragment,{children:[u(s),r!==e.length-1?t:null]},`${s}-pos-${String(r)}`))}),x=(0,n.memo)(({satisfaction:e,vap_table:t,radio_table:s,radio_table_stats:a})=>{const u=(0,n.useMemo)(()=>void 0!==e&&(0,o.Oq)(e),[e]),{na:x,ng:E,sixe:p,naNumSta:h,ngNumSta:j,sixeNumSta:C}=(0,n.useMemo)(()=>(0,c.VM)({vap_table:t,radio_table:s,radio_table_stats:a,satisfaction:e}),[e,t,s,a]),I=[{radio:d.sx.RADIO_NG,satisfaction:E,numSta:j},{radio:d.sx.RADIO_NA,satisfaction:x,numSta:h},{radio:d.sx.RADIO_6E,satisfaction:p,numSta:C}].filter(({satisfaction:e,numSta:t})=>((e,t)=>0!==e&&!!t)(e,t));return u&&0!==I.length?(0,i.jsxs)(_.A,{children:[(0,i.jsx)(r.A,{color:"text-2",size:"medium",children:(0,i.jsx)(l.sA,{id:"DEVICE_WIFI_EXPERIENCE",values:{band:I.map(({radio:e})=>A[e]).join("/")}})}),m(I.map(({satisfaction:e})=>e))]}):null})},999837(e,t,s){s.d(t,{A:()=>B});var i=s(274934),n=s(977872),r=s(602086),a=s(696264),o=s(599110),l=s(159469),d=s(706925),c=s(700444),_=s(470070),A=s(222102),u=s(656466),m=s(401042),x=s(358935);var E,p,h=s(857780),j=s(570866);!function(e){e.EXISTING="existing",e.NEW="new"}(E||(E={})),function(e){e.MAC="mac",e.TYPE="type",e.MODEL="model"}(p||(p={}));var C,I=s(990330),O=s(125799),N=s(843615),v=s(853777),M=s(489714),R=s(947414);!function(e){e.DEVICE_REPLACEMENT_MODE="deviceReplacementMode",e.SET_DEVICE_REPLACEMENT_MODE="setDeviceReplacementMode",e.NEW_MAC="newMac",e.SET_NEW_MAC="setNewMac",e.EXISTING_MAC="existingMac",e.SET_EXISTING_MAC="setExistingMac",e.REPLACEMENT_CANDIDATES="replacementCandidates",e.ERROR="error",e.RESET_ERROR="resetError"}(C||(C={}));const T=(0,r.createContext)({[C.DEVICE_REPLACEMENT_MODE]:void 0,[C.SET_DEVICE_REPLACEMENT_MODE]:R.P1,[C.NEW_MAC]:void 0,[C.SET_NEW_MAC]:R.P1,[C.EXISTING_MAC]:void 0,[C.SET_EXISTING_MAC]:R.P1,[C.REPLACEMENT_CANDIDATES]:[],[C.ERROR]:void 0,[C.RESET_ERROR]:R.P1}),g=s(409844).AH`
  height: 54px;
`;var P=s(247816),S=s(309130),D=s(100978);const f=(0,P.A)(D.A)`
  align-items: center;
  gap: ${S.YC};
`,w=(0,r.memo)(()=>{const{newMac:e,setNewMac:t,error:s,resetError:n}=(0,r.useContext)(T),a=(0,r.useCallback)(({target:{value:e}})=>{t((0,M.Z)(e)),n()},[t,n]);return(0,i.jsx)(N.A,{className:g,value:e,onChange:a,onFocus:n,variant:"secondary",label:(0,i.jsxs)(f,{children:[(0,i.jsx)(_.sA,{id:"COMMON_MAC_ADDRESS"}),(0,i.jsx)(O.A,{portal:!0,width:"100%",maxWidth:248,description:(0,i.jsx)(_.sA,{id:"DEVICE_REPLACEMENT_MAC_LOCATION"}),children:(0,i.jsx)(v.A,{isActive:!0})})]}),width:"100%",invalid:s})});var b=s(237887),y=s(974390);const L=(0,r.memo)(()=>{const{replacementCandidates:e,existingMac:t,setExistingMac:s,error:n,resetError:a}=(0,r.useContext)(T),o=(0,r.useMemo)(()=>e.map(({mac:e,model:t,name:s})=>({label:s,value:e,image:(0,i.jsx)(y.A,{model:t}),additionalInfo:e})),[e]),l=(0,r.useCallback)(({value:e})=>{s(String(e)),a()},[s,a]);return(0,i.jsx)(b.A.Sorted,{value:t,label:(0,i.jsx)(_.sA,{id:"COMMON_DEVICE"}),width:"100%",searchable:!0,onChange:l,onFocus:a,maxHeight:228,options:o,invalid:n})}),k=(0,P.A)(D.A)`
  flex-direction: column;
  gap: ${S.kc};
`,z=(0,r.memo)(()=>{const{replacementCandidates:e,deviceReplacementMode:t,setDeviceReplacementMode:s,resetError:n}=(0,r.useContext)(T),a=(0,r.useMemo)(()=>e.length?[{id:E.EXISTING,children:(0,i.jsx)(_.sA,{id:"COMMON_EXISTING"}),onChange:()=>{s(E.EXISTING),n()},checked:t===E.EXISTING},{id:E.NEW,children:(0,i.jsx)(_.sA,{id:"COMMON_NEW"}),onChange:()=>{s(E.NEW),n()},checked:t===E.NEW}]:[],[e.length,t,s,n]);return(0,i.jsxs)(k,{children:[(0,i.jsx)(I.A,{direction:"row",items:a}),t===E.EXISTING?(0,i.jsx)(L,{}):null,t===E.NEW?(0,i.jsx)(w,{}):null]})}),W=(0,P.A)(D.A)`
  align-items: center;
  gap: ${S.YC};
  width: fit-content;
`;var V=s(721398);const U={[h.gQ.INCOMPATIBLE_REPLACEMENT]:"DEVICE_REPLACEMENT_DEVICE_INCOMPATIBLE_REPLACEMENT_ERROR",[h.gQ.REPLACEMENT_ALREADY_ASSIGNED]:"DEVICE_REPLACEMENT_DEVICE_REPLACEMENT_ALREADY_ASSIGNED_ERROR"},G=({mac:e,hideTooltip:t=!1})=>{const{formatMessage:s}=(0,_.tz)(),d=(0,n.wA)(),[p,I]=(0,r.useState)(!1),[O,N]=(0,r.useState)(!1),[v,M]=(0,r.useState)(E.NEW),[R,g]=(0,r.useState)(""),[P,S]=(0,r.useState)(""),[D,f]=(0,r.useState)(void 0),w=(0,n.d4)((0,r.useMemo)(()=>(e=>(0,A.Mz)((e=>(0,u.uh)((0,x.lX)({queryParams:{mac:e}})))(e),e=>(0,m.i6)(e)?.devices||[]))(e),[e])),b=(0,r.useCallback)(()=>{I(!0)},[]),y=(0,r.useCallback)(()=>{I(!1),g(""),S(""),N(!1),M(E.NEW),f(void 0)},[]),L=(0,r.useCallback)(()=>{switch(v){case E.EXISTING:return P;case E.NEW:return R;default:return}},[v,P,R]),k=(0,r.useCallback)(()=>{d((0,c.ox)({icon:l.C.success,message:"DEVICE_REPLACEMENT_DEVICE_SET",duration:3e3})),y()},[d,y]),G=(0,r.useCallback)(e=>{switch(e.apiData?.replacement_state){case h.gQ.INCOMPATIBLE_REPLACEMENT:case h.gQ.REPLACEMENT_ALREADY_ASSIGNED:f(s({id:U[e.apiData.replacement_state]}));break;default:d((0,c.ox)({icon:l.C.danger,message:"DEVICE_FAILED_TO_SET_REPLACEMENT_DEVICE",duration:3e3}))}},[d,s]),B=(0,r.useCallback)(()=>{N(!1)},[]),F=(0,r.useCallback)(()=>{N(!0),d((0,x.uC)(e,L())).then(k).catch(G).finally(B)},[d,k,G,e,L,B]),Y=(0,r.useMemo)(()=>Boolean(L().match(j.b8)),[L]),$=(0,r.useMemo)(()=>[{text:(0,i.jsx)(_.sA,{id:"COMMON_ACTION_CANCEL"}),variant:"tertiary",onClick:y},{text:(0,i.jsx)(_.sA,{id:"COMMON_ACTION_APPLY"}),variant:"primary",onClick:F,disabled:!Y||O,loader:O?"spinner":void 0}],[y,F,Y,O]),X=(0,r.useCallback)(()=>{f(void 0)},[f]),K=(0,r.useMemo)(()=>({[C.DEVICE_REPLACEMENT_MODE]:v,[C.SET_DEVICE_REPLACEMENT_MODE]:M,[C.NEW_MAC]:R,[C.SET_NEW_MAC]:g,[C.EXISTING_MAC]:P,[C.SET_EXISTING_MAC]:S,[C.REPLACEMENT_CANDIDATES]:w,[C.ERROR]:D,[C.RESET_ERROR]:X}),[v,R,P,w,D,X]);return(0,r.useEffect)(()=>{d((0,x.lX)({queryParams:{mac:e}}))},[d,e]),(0,i.jsx)(T.Provider,{value:K,children:(0,i.jsx)(a.A,{allowOverflow:!0,title:(0,i.jsx)(_.sA,{id:"DEVICE_SET_REPLACEMENT_DEVICE"}),body:(0,i.jsx)(z,{}),position:"top",portal:!0,actions:$,isOpen:p,onRequestClose:y,children:(0,i.jsxs)(W,{children:[(0,i.jsx)(o.A,{type:"button",variant:"inline",size:"medium",onClick:b,children:(0,i.jsx)(_.sA,{id:"DEVICE_SET_REPLACEMENT_DEVICE"})}),t?null:(0,i.jsx)(V.A,{messageId:"DEVICE_SET_REPLACEMENT_DEVICE_DESCRIPTION",variant:"outline"})]})})})},B=(0,r.memo)(({model:e,type:t,...s})=>(0,d.G)({type:t,model:e})?(0,i.jsx)(G,{type:t,model:e,...s}):null)},384780(e,t,s){s.d(t,{A:()=>W});var i=s(274934),n=s(814557),r=s(977872),a=s(602086),o=s(125799),l=s(792929),d=s(600191),c=s(263705),_=s(244081),A=s(112104),u=s(61322),m=s(449339),x=s(974390),E=s(650632),p=s(535322),h=s(205521),j=s(347625),C=s(754924),I=s(223597),O=s(34118),N=s(239627),v=s(645682),M=s(254590),R=s(857780);const T=({name:e,mac:t,model:s})=>e===t&&s?s:e,g=e=>{switch(e?.uplink?.type){case R.au.WIRE:return e?.connection_network_name||M.L;case R.au.WIRELESS:return e?.connection_network_name||e?.uplink?.essid||M.L;default:return M.L}};var P,S=s(599110),D=s(594005),f=s(309130),w=s(421314);!function(e){e.NAME="name",e.PORT="port",e.NETWORK="network"}(P||(P={}));const b={[P.NAME]:"COMMON_NAME",[P.PORT]:"COMMON_PORT",[P.NETWORK]:"COMMON_NETWORK"};var y=s(100978),L=s(470070),k=s(850352);const z=({port:e,mac:t})=>{const{handleGoToPortsPage:s}=(0,k.e)();return(0,i.jsx)(S.A,{variant:"inline",type:"button",size:"medium",onClick:()=>{s(t,e)},children:e})},W=({activeItem:e})=>{const{themeName:t}=(0,c.u)(),s=(0,r.wA)(),M=(0,r.d4)(C.ID),R=(0,a.useMemo)(()=>((e,t)=>(e||[]).map(e=>{const s=t.find(({mac:t})=>t===e.mac||t===e.ap_mac);return s?{...e,id:s._id,name:(0,j.Q)(s),activeItem:s,model:(0,j.Lm)(s.model)}:null}).filter(Boolean))(e.downlink_table,M),[e.downlink_table,M]),S=(0,r.d4)((0,O.Ax)(e.mac)).filter(e=>e.type===I.sK.WIRED);(0,a.useEffect)(()=>{s((0,N.$3)(void 0,{crudCacheStrategy:{type:_.e.CACHE}}))},[s]);const k=(0,a.useMemo)(()=>S.map(e=>({id:`${e.id}${e.sw_port}`,name:e.display_name,mac:e.mac,network:e.network_name,port:e.sw_port,image:(0,i.jsx)(E.A,{client:e}),isClient:!0})),[S]),W=(0,a.useMemo)(()=>R.map(({id:e,name:s,mac:r,port_idx:a,activeItem:l})=>({id:`${e}${a}`,name:T({name:s,mac:l.mac,model:l.model}),mac:r,network:g(l),port:a,image:(0,i.jsx)(x.A,{model:l.model}),isClient:!1,warning:l.detailed_states?.negotiated_low_uplink_port_speed?(0,i.jsx)(o.A,{portal:!0,description:(0,i.jsx)(v.A,{color:"text-1"}),children:(0,i.jsx)(d.A,{size:"medium",color:n.Ay[`desktop-color-orange-06-${t}`]})}):void 0,stacking_group_id:l.stacking_group_id})),[R,n.Ay[`desktop-color-orange-06-${t}`]]),V=(0,a.useMemo)(()=>Array.prototype.concat.apply([],[k,W]),[W,k]),U=(0,a.useMemo)(()=>(({mac:e})=>[{id:P.NAME,label:(0,i.jsx)(L.sA,{id:b[P.NAME]}),renderCell:({image:e,name:t})=>(0,i.jsxs)(y.A,{alignItems:"center",justifyContent:"center",width:"100%",children:[(0,i.jsx)(y.A,{alignItems:"center",justifyContent:"center",height:"20px",width:"20px",children:e}),(0,i.jsx)(w.A,{color:"inherit",size:"medium",style:{width:"170px",paddingLeft:"6px",paddingRight:"6px"},children:t})]}),width:170,compare:(0,D.l0)(({name:e})=>e)},{id:P.NETWORK,label:(0,i.jsx)(L.sA,{id:b[P.NETWORK]}),renderCell:({network:e})=>(0,i.jsx)(w.A,{color:"inherit",size:"medium",children:e}),width:112,compare:(0,D.l0)(({network:e})=>e)},{id:P.PORT,align:"right",label:(0,i.jsx)(L.sA,{id:b[P.PORT]}),renderCell:({port:t,warning:s})=>(0,i.jsxs)(y.A,{justifyContent:"flex-end",alignItems:"center",flexGrow:1,children:[(0,i.jsx)(y.A,{marginTop:-2,marginRight:f.YC,children:s}),(0,i.jsx)(z,{port:t,mac:e})]}),width:54,compare:(0,D.l0)(({port:e})=>e)}])({mac:e.mac}),[e.mac]),G=(0,a.useCallback)(({mac:e,isClient:t,stacking_group_id:i})=>{s((0,h.XP)({type:t?m.H.CLIENT:i?m.H.STACKING:m.H.DEVICE,id:i||e}))},[s]),{rowLimit:B,renderFooter:F}=(0,A.A)(V.length,{defaultCount:10});return V.length?(0,i.jsx)(p.A,{children:(0,i.jsx)(l.A,{items:V,columns:U,idField:"id",initialSortBy:"port",initiallySortAscending:!0,disableColumnFilters:!0,rowOffset:0,disableSelection:!0,onRowClick:G,rowLimit:B,renderFooter:()=>F,rowHeight:u.I.ROW_HEIGHT,truncateHeaderCells:!0})}):null}},23377(e,t,s){s.d(t,{A:()=>S});var i=s(274934),n=s(977872),r=s(602086),a=s(383061),o=s(237887),l=s(733360),d=s(197719),c=s(309130),_=s(100978),A=s(535322),u=s(470070),m=s(407386),x=s(51411),E=s(853109),p=s(886140),h=s(127347);var j=s(87052),C=s(938984),I=s(878151),O=s(320509),N=s(570203),v=s(635187),M=s(664092),R=s(631692),T=s(924453),g=s(906701);const P=({uplinkAttrs:e,configuration:t={wan_dns1:void 0,wan_dns2:void 0,wan_dhcpv6_pd_size:void 0,wan_type_v6:void 0,wan_prefixlen:void 0},details:s={},gatewayPort:{ipv6:n=[]}={}})=>{const{ip:r,speed:a,rx_packets:o,rx_bytes:l,tx_packets:d,tx_bytes:c,"rx_bytes-r":A,"tx_bytes-r":m,mac:x}=e||{};return(0,i.jsxs)(_.A,{height:"100%",flexDirection:"column",children:[r?(0,i.jsxs)(M.A,{children:[(0,i.jsx)(C.A,{size:"medium",children:(0,i.jsx)(u.sA,{id:"COMMON_IP_ADDRESS"})}),(0,i.jsx)(C.A,{size:"medium",color:"text-3",children:r})]}):null,n.length?(0,i.jsx)(g.A,{ipv6_address:n,wan_dhcpv6_pd_size:t.wan_type_v6===N.c.SLAAC||t.wan_type_v6===N.c.DHCPV6?t.wan_dhcpv6_pd_size:void 0}):null,(0,i.jsx)(T.A,{mac:x}),(0,i.jsx)(R.A,{portSpeed:a}),s.service_provider?.name?(0,i.jsxs)(M.A,{children:[(0,i.jsx)(C.A,{size:"medium",children:(0,i.jsx)(u.sA,{id:"COMMON_ISP"})}),(0,i.jsx)(C.A,{size:"medium",color:"text-3",children:s.service_provider.name})]}):null,(0,i.jsxs)(i.Fragment,{children:[t.wan_dns1?(0,i.jsxs)(M.A,{children:[(0,i.jsx)(C.A,{color:"text-2",size:"medium",children:(0,i.jsx)(u.sA,{id:"COMMON_DNS_SERVER_N",values:{n:1}})}),(0,i.jsx)(C.A,{color:"text-3",size:"medium",children:t.wan_dns1})]}):null,t.wan_dns2?(0,i.jsxs)(M.A,{children:[(0,i.jsx)(C.A,{color:"text-2",size:"medium",children:(0,i.jsx)(u.sA,{id:"COMMON_DNS_SERVER_N",values:{n:2}})}),(0,i.jsx)(C.A,{color:"text-3",size:"medium",children:t.wan_dns2})]}):null]}),o&&l?(0,i.jsxs)(M.A,{children:[(0,i.jsx)(C.A,{size:"medium",children:(0,i.jsx)(u.sA,{id:"COMMON_DOWN_PKTS_BYTES"})}),(0,i.jsxs)(C.A,{size:"medium",color:"text-3",children:[(0,j.A)(o,{spacer:v.HY})," / ",(0,O.z3)(l)]})]}):null,d&&c?(0,i.jsxs)(M.A,{children:[(0,i.jsx)(C.A,{size:"medium",children:(0,i.jsx)(u.sA,{id:"COMMON_UP_PKTS_BYTES"})}),(0,i.jsxs)(C.A,{size:"medium",color:"text-3",children:[(0,j.A)(d,{spacer:v.HY})," / ",(0,O.z3)(c)]})]}):null,(0,i.jsxs)(M.A,{children:[(0,i.jsx)(C.A,{size:"medium",children:(0,i.jsx)(u.sA,{id:"DEVICE_PROPERTY_UPLINK_DOWN_ACTIVITY"})}),(0,i.jsx)(C.A,{size:"medium",color:"text-3",children:void 0!==A?(0,i.jsx)(I.A,{type:"bytes",input:A,options:"bitrate",size:"body",color:"inherit"}):(0,i.jsx)(u.sA,{id:"COMMON_FALLBACK"})})]}),(0,i.jsxs)(M.A,{children:[(0,i.jsx)(C.A,{size:"medium",children:(0,i.jsx)(u.sA,{id:"DEVICE_PROPERTY_UPLINK_UP_ACTIVITY"})}),(0,i.jsx)(C.A,{size:"medium",color:"text-3",children:void 0!==m?(0,i.jsx)(I.A,{type:"bytes",input:m,options:"bitrate",size:"body",color:"inherit"}):(0,i.jsx)(u.sA,{id:"COMMON_FALLBACK"})})]})]})},S=({activeItem:e})=>{const{formatMessage:t}=(0,u.tz)(),s=((e,t)=>{const s=(e.port_table||[]).filter(({up:e})=>e);return Object.values(h.s).reduce((i,n)=>{const r=1===(0,l.si)(n)?d.C.WAN:n.toUpperCase();if(s.find(({ifname:t})=>t===(0,x.KF)(r,{ethernet_overrides:e.ethernet_overrides,model:e.model,usg_caps:e.usg_caps,usg2_caps:e.usg2_caps}))||(a=e[n],a?.type===p.YT)){const s=(0,E.q$)(e,n);s&&i.push({wanNetworkGroup:r,uplinkAttrs:s,...(()=>{const{configuration:e={},details:s={}}=t.find(({configuration:{wan_networkgroup:e}})=>e===r)||{};return{configuration:e,details:s}})(),gatewayPort:e[n]})}var a;return i},[])})(e,(0,n.d4)(m.ht)),j=(0,r.useMemo)(()=>s.map(({wanNetworkGroup:e})=>({id:e,label:t({id:"COMMON_NETWORK_PURPOSE_WANX"},{number:(0,l.si)(e)})})),[t,s]),C=(0,r.useMemo)(()=>s.map(({wanNetworkGroup:e,configuration:t={}})=>({value:e,label:t.name||"",additionalInfo:(0,i.jsx)(u.sA,{id:"COMMON_NETWORK_PURPOSE_WANX",values:{number:(0,l.si)(e)}})})),[s]),[I,O]=(0,r.useState)(s?.[0]?.wanNetworkGroup||d.C.WAN),N=s.length<=4,v=(0,r.useMemo)(()=>s.find(({wanNetworkGroup:e})=>e===I)||{},[s,I]),M=(0,r.useMemo)(()=>[{id:"wan",openByDefault:!0,label:(0,i.jsx)(u.sA,1===j.length?{id:"COMMON_NETWORK_PURPOSE_WANX",values:{number:1}}:{id:"COMMON_NETWORK_PURPOSE_WAN"}),renderContent:()=>(0,i.jsxs)(i.Fragment,{children:[j.length>1?(0,i.jsx)(_.A,{paddingBottom:c.kc,inline:N,children:N?(0,i.jsx)(a.A,{tabs:j,variant:"filter",onSelectTab:({id:e})=>{O(e)},selectedTab:I}):(0,i.jsx)(o.A,{options:C,width:"100%",variant:"secondary",value:I,onChange:({value:e})=>{O(e)}})}):null,(0,i.jsx)(P,{...v})]})}],[j,N,C,I,O,v]);return v?(0,i.jsx)(A.A,{type:A.I.ACCORDION,items:M}):null}},872926(e,t,s){s.d(t,{A:()=>A});var i=s(274934),n=s(977872),r=s(810024),a=s(589650),o=s(748094),l=s(470070),d=s(754924),c=s(726831);const _=({adopted:e})=>(0,i.jsx)(o.A,{link:c.A.virtualNetworkConnectivity,children:(0,i.jsx)(l.sA,{id:e?"DEVICE_FALLBACK_IP_ADOPTED_WITH_UNIFI_GATEWAY_WARNING":"DEVICE_FALLBACK_IP_NOT_ADOPTED_WARNING",values:{bold:(0,i.jsx)("strong",{children:(0,i.jsx)(l.sA,{id:e?"DEVICE_WARNING_FALLBACK_IP":"DEVICE_WARNING_ADOPTION_FAILED"})})}})}),A=({ip:e,adopted:t,config_network:s})=>(0,n.d4)(d.m9)&&(0,r.W5)(e)&&s?.type===a.NL.DHCP?(0,i.jsx)(_,{adopted:t}):null},585062(e,t,s){s.r(t),s.d(t,{default:()=>pe});var i=s(274934),n=s(808202),r=s(872926),a=s(376892),o=s(535322),l=s(919304);const d=({psu_table:e})=>e?.length>0?(0,i.jsx)(o.A,{type:o.I.ACCORDION,items:[{id:"powerSource",openByDefault:!0,label:(0,i.jsx)(a.A,{id:"DEVICE_PROPERTY_OVERVIEW_POWER_SOURCE"}),renderContent:()=>(0,i.jsx)(l.A,{psu_table:e})}]}):null;var c=s(23377),_=s(189042),A=s(384780),u=s(383550),m=s(602086),x=s(43009),E=s(938984),p=s(898809),h=s(455425),j=s(347500),C=s(907488),I=s(100978),O=s(470070),N=s(128066),v=s(646077);const M=e=>[p.Au.HOURS,p.Au.MINUTES,Math.floor((Date.now()-new Date(1e3*e).getTime())/h.jU)<1?p.Au.SECONDS:p.Au.DAYS],R=({uptime:e,last_seen:t})=>e>=0?(0,i.jsx)(E.A,{size:"medium",children:(0,p.Ay)(e)}):t?(0,i.jsxs)(I.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end",children:[(0,i.jsx)(E.A,{size:"medium",children:(0,i.jsx)(O.sA,{id:"COMMON_LAST_SEEN"})})," ",(0,i.jsx)(E.A,{size:"medium",color:"inherit",children:(0,i.jsx)(j.A,{startTimestamp:t,uptimeParams:M(t)})})]}):null,T=({stat:e,uplink:t,uptime:s,last_seen:n})=>{const{motif:r}=(0,x.A)(),a=(0,m.useMemo)(()=>(0,N.lD)(e),[e]),{translationKey:l,textColor:d}=(0,m.useMemo)(()=>(0,N.QS)(r,a),[r,a]);return a>=0?(0,i.jsxs)(o.A,{children:[(0,i.jsx)(v.hW,{score:a,headerTranslationKey:"COMMON_TX_RETRIES",scoreTranslationKey:l,color:d}),(0,i.jsxs)(I.A,{width:"100%",justifyContent:"space-between",marginTop:4,children:[(0,i.jsx)(I.A,{children:t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.A,{style:{marginRight:"6px"},bytesPerSecond:t["rx_bytes-r"]||0,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),(0,i.jsx)(C.A,{bytesPerSecond:t["tx_bytes-r"]||0,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})]}):null}),(0,i.jsx)(R,{uptime:s,last_seen:n})]})]}):null};var g=s(686318),P=s(241615),S=s(247816),D=s(409844),f=s(513458),w=s(443502),b=s(309130);const y=(0,S.A)(f.A)`
  margin-right: ${b.YC};
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 0;
`,L=e=>D.AH`
  background-color: ${e};
`,k=({ChannelBars:e})=>(0,i.jsxs)(i.Fragment,{children:[e,(0,i.jsxs)(I.A,{justifyContent:"flex-start",children:[(0,i.jsxs)(I.A,{flex:"0 1 27%",children:[(0,i.jsx)(y,{className:L(w.XT.blue)}),(0,i.jsx)(E.A,{color:"text-3",size:"small",children:(0,i.jsx)(O.sA,{id:"DEVICE_PROPERTIES_VALUES_RX_FRAMES"})})]}),(0,i.jsxs)(I.A,{flex:"0 1 27%",children:[(0,i.jsx)(y,{className:L(w.sJ)}),(0,i.jsx)(E.A,{color:"text-3",size:"small",children:(0,i.jsx)(O.sA,{id:"DEVICE_PROPERTIES_VALUES_TX_FRAMES"})})]}),(0,i.jsxs)(I.A,{flex:"0 1 27%",children:[(0,i.jsx)(y,{className:L(w.z3)}),(0,i.jsx)(E.A,{color:"text-3",size:"small",children:(0,i.jsx)(O.sA,{id:"COMMON_INTERFERENCE"})})]})]})]});var z=s(125799),W=s(814557),V=s(367551),U=s(878151),G=s(758654),B=s(134123),F=s(92684),Y=s(927316),$=s(662986);const X=(0,S.A)("tr")`
  white-space: nowrap;
  font-size: ${({theme:e})=>e.fontSizes[1]}px;
`,K=(0,S.A)("td")`
  vertical-align: top;
`,H=(0,S.A)("td")`
  padding-left: 12px;
  padding-bottom: 2px;
  text-align: right;
  vertical-align: top;
`,q=({type:e,radio:t,channelUtilization:s,stat:n})=>{const{totalPacketsRx:r,totalBytesRx:a,droppedPercentageRx:o,retryPercentageRx:l,totalPacketsTx:d,totalBytesTx:c,droppedPercentageTx:_,retryPercentageTx:A}=(0,m.useMemo)(()=>(({totalPackets:e,totalBytes:t,droppedPercentage:s,retryPercentage:i},{totalPackets:n,totalBytes:r,droppedPercentage:a,retryPercentage:o})=>({totalPacketsRx:e,totalBytesRx:t,droppedPercentageRx:s,retryPercentageRx:i,totalPacketsTx:n,totalBytesTx:r,droppedPercentageTx:a,retryPercentageTx:o}))((0,Y.GI)(e,t,"rx",n),(0,Y.GI)(e,t,"tx",n)),[e,t,n]);return(0,i.jsx)("table",{children:(0,i.jsxs)("tbody",{children:[(0,i.jsxs)(X,{children:[(0,i.jsx)(K,{children:(0,i.jsx)(E.A,{color:"text-2",children:(0,i.jsx)(O.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"})})}),(0,i.jsx)(H,{children:(0,i.jsxs)(E.A,{color:"text-2",children:[d??(0,i.jsx)(O.sA,{id:"COMMON_FALLBACK"})," /"," ",c??(0,i.jsx)(O.sA,{id:"COMMON_FALLBACK"})]})})]}),(0,i.jsxs)(X,{children:[(0,i.jsx)(K,{children:(0,i.jsx)(E.A,{color:"text-2",children:(0,i.jsx)(O.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"})})}),(0,i.jsx)(H,{children:(0,i.jsxs)(E.A,{color:"text-2",children:[r??(0,i.jsx)(O.sA,{id:"COMMON_FALLBACK"})," /"," ",a??(0,i.jsx)(O.sA,{id:"COMMON_FALLBACK"})]})})]}),(0,i.jsxs)(X,{children:[(0,i.jsx)(K,{children:(0,i.jsx)(E.A,{color:"text-2",children:(0,i.jsx)(O.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"})})}),(0,i.jsx)(H,{children:(0,i.jsxs)(E.A,{color:"text-2",children:[(0,$.l)(A)," / ",(0,$.l)(_)]})})]}),(0,i.jsxs)(X,{children:[(0,i.jsx)(K,{children:(0,i.jsx)(E.A,{color:"text-2",children:(0,i.jsx)(O.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"})})}),(0,i.jsx)(H,{children:(0,i.jsxs)(E.A,{color:"text-2",children:[(0,$.l)(l)," / ",(0,$.l)(o)]})})]}),s?(0,i.jsxs)(X,{children:[(0,i.jsx)(K,{children:(0,i.jsx)(E.A,{color:"text-2",children:(0,i.jsx)(O.sA,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"})})}),(0,i.jsx)(H,{children:(0,i.jsx)(E.A,{color:"text-2",children:`${s.total}% / ${s.selfRx}% / ${s.selfTx}%`})})]}):null]})})},Q=(0,S.A)("div")`
  flex: 1;

  .radioText {
    color: ${({theme:{motifPalette:{text02:e}}})=>e};
    font-weight: ${W.Ay["desktop-font-weight-semibold"]};
  }
`,Z=(0,S.A)(E.A)`
  margin-left: ${b.YC};
`,J=(0,S.A)("div")`
  width: 100%;
`;var ee=s(203071);const te=({activeItem:{radio_table:e,radio_table_stats:t,model:s,vap_table:n,stat:r,type:l,psu_table:d}})=>{const c=(0,m.useMemo)(()=>(({radio_table:e,radio_table_stats:t,model:s,vap_table:n,type:r,stat:a})=>[...e||[]].sort(G.Rm).map(o=>{const l=(0,Y.Lm)(t,o),d=(0,Y.d_)(e,t,s,o?.name,n?.find(({radio_name:e})=>e===o.name));if(!l)return null;const{selfRx:c,selfTx:_,interference:A,total:u}=l,m=d?.state===B.A.INIT;return(0,i.jsxs)(I.A,{flexDirection:"column",marginBottom:b.kc,children:[(0,i.jsxs)(I.A,{justifyContent:"space-between",children:[(0,i.jsx)(Q,{children:(0,i.jsx)(F.A,{radio_table:e,radio_table_stats:t,model:s,vap_table:n,radio:o,hideDivider:!0,hideDfsInfo:!0,hideHtInfo:!0,hidePowerInfo:!0,hideChannelTooltip:!0,hideDisabledInfo:!0,textColor:"text-3"})}),m?(0,i.jsx)(E.A,{color:"text-3",size:"medium",children:(0,i.jsx)(O.sA,{id:"COMMON_DISABLED"})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(U.A,{size:"body",color:"tertiary",type:"percent",input:Math.min(u,100)/100}),(0,i.jsx)(Z,{color:"text-3",children:(0,i.jsx)(E.A,{color:"text-3",size:"medium",children:(0,i.jsx)(O.sA,{id:"DEVICE_PROPERTIES_VALUES_UTILIZED"})})})]})]}),(0,i.jsx)(J,{children:(0,i.jsx)(z.A,{description:(0,i.jsx)(q,{type:r,stat:a,radio:o,channelUtilization:l}),portal:!0,maxWidth:350,children:(0,i.jsx)(V.A,{items:[{color:w.XT.blue,value:c},{color:w.sJ,value:_},{color:w.z3,value:A}],height:8,rounded:!0})})}),(0,i.jsx)(E.A,{color:"text-3",size:"medium",children:(0,Y.rT)(e,s,o)})]},o.name)}))({radio_table:e,radio_table_stats:t,model:s,vap_table:n,type:l,stat:r}),[e,t,s,n,l,r]);return(0,i.jsx)(o.A,{type:o.I.ACCORDION,items:[{id:"deviceInsights",openByDefault:!0,label:(0,i.jsx)(a.A,{id:"COMMON_INSIGHTS"}),renderContent:()=>(0,i.jsxs)(i.Fragment,{children:[d?.length?(0,i.jsx)(ee.A,{psuTable:d}):null,c.length?(0,i.jsx)(k,{ChannelBars:c}):null]})}]})};var se=s(956021),ie=s(893762),ne=s(382583),re=s(948803),ae=s(725870),oe=s(924453),le=s(664613),de=s(331472),ce=s(664092);const _e=({satisfaction:e,guestNumSta:t})=>(0,de.Oq)(e)?(0,i.jsxs)(ce.A,{children:[(0,i.jsx)(E.A,{color:"text-2",size:"medium",children:(0,i.jsx)(O.sA,{id:"DEVICE_HEADER_GUESTS"})}),(0,i.jsx)(E.A,{color:"text-3",size:"medium",children:t||0})]}):null;var Ae=s(643334);const ue=({satisfaction:e,userNumSta:t})=>(0,de.Oq)(e)?(0,i.jsxs)(ce.A,{children:[(0,i.jsx)(E.A,{color:"text-2",size:"medium",children:(0,i.jsx)(O.sA,{id:"COMMON_CLIENTS"})}),(0,i.jsx)(E.A,{color:"text-3",size:"medium",children:t||0})]}):null;var me=s(597377);const xe=({name:e,satisfaction:t,vap_table:s,radio_table:n,radio_table_stats:r,model:a,displayable_version:l,mac:d,connection_network_id:c,uptime:_,ip:A,lan_ip:u,ethernet_overrides:m,port_table:x,sys_stats:E,"system-stats":p,"user-num_sta":h,"guest-num_sta":j,type:C,deviceState:O,uplink:N,device_mode_override:v})=>(0,i.jsx)(o.A,{children:(0,i.jsxs)(I.A,{flexDirection:"column",children:[(0,i.jsx)(se.A,{satisfaction:t,vap_table:s,radio_table:n,radio_table_stats:r}),(0,i.jsx)(re.A,{model:a}),(0,i.jsx)(me.A,{ip:A,lan_ip:u,ethernet_overrides:m,port_table:x,type:C,uplink:N,device_mode_override:v}),(0,i.jsx)(ne.A,{connection_network_id:c}),(0,i.jsx)(oe.A,{mac:d}),(0,i.jsx)(Ae.A,{name:e,model:a,mac:d,type:C,displayable_version:l,uptime:_,deviceState:O}),(0,i.jsx)(ie.A,{uptime:_}),(0,i.jsx)(ae.A,{systemStatsMem:p?.mem}),(0,i.jsx)(le.A,{sys_stats:E}),(0,i.jsx)(ue,{satisfaction:t,userNumSta:h}),(0,i.jsx)(_e,{satisfaction:t,guestNumSta:j})]})});var Ee=s(216082);const pe=({activeItem:e,activeItem:{adopted:t,name:s,type:a,mac:o,ip:l,uplink:m,uptime:x,radio_table:E,radio_table_stats:p,vap_table:h,stat:j,total_used_power:C,total_max_power:I,detailed_states:{device_near_power_limit:O}={device_near_power_limit:!1},support_wifi6e:N,config_network:v,last_seen:M,psu_table:R,satisfaction:S,model:D,lan_ip:f,ethernet_overrides:w,port_table:b,displayable_version:y,sys_stats:L,"system-stats":k,"user-num_sta":z,"guest-num_sta":W,shortname:V,device_mode_override:U}})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.A,{activeItem:e,showPortOverview:!0,hidePortsButton:!0,children:(0,i.jsx)(_.A,{activeItem:e,showPortsButton:!0,showCaptureButton:!0})}),(0,i.jsx)(r.A,{ip:l,adopted:t,config_network:v}),(0,i.jsx)(T,{stat:j,uplink:m,uptime:x,last_seen:M}),(0,i.jsx)(n.A,{mac:o,type:a,model:D,device_near_power_limit:O,total_used_power:C,total_max_power:I}),(0,i.jsx)(A.A,{activeItem:e}),(0,i.jsx)(xe,{name:s,type:a,satisfaction:S,vap_table:h,radio_table:E,radio_table_stats:p,model:D,displayable_version:y,mac:o,connection_network_id:e.connection_network_id,uptime:x,ip:l,lan_ip:f,ethernet_overrides:w,port_table:b,sys_stats:L,"system-stats":k,"user-num_sta":z,"guest-num_sta":W,uplink:m,device_mode_override:U}),(0,i.jsx)(c.A,{activeItem:e}),(0,i.jsx)(P.A,{radio_table:E,radio_table_stats:p,type:a,stat:j,support_wifi6e:N}),(0,i.jsx)(g.S,{vap_table:h,radio_table:E}),(0,i.jsx)(d,{psu_table:R}),(0,i.jsx)(te,{activeItem:e}),(0,i.jsx)(Ee.A,{shortname:V})]})},696049(e,t,s){s.d(t,{H:()=>i});const i=""},367821(e,t,s){s.d(t,{A:()=>l});var i=s(602086),n=s(977872),r=s(726831),a=s(575478),o=s(828373);const l=()=>{const e=(0,n.wA)(),t=(0,n.d4)(o.eo);return(0,i.useEffect)(()=>{t||(async()=>{const t=await fetch(r.A.fingerprintPublicDatabasePath),s=await t.json();e((0,a.$)(s))})()},[t,e]),t}},571829(e,t,s){s.d(t,{I:()=>n});var i=s(561614);const n=[i.sx.RADIO_NG,i.sx.RADIO_NA,i.sx.RADIO_6E,i.sx.RADIO_AD]},758654(e,t,s){s.d(t,{Rm:()=>a,fU:()=>r,uQ:()=>n});var i=s(571829);const n=e=>{const t=(t,s)=>e.indexOf(t)-e.indexOf(s);return{orderRadios:t,orderByRadio:(e,s)=>t(e.radio,s.radio)}},{orderRadios:r,orderByRadio:a}=n(i.I)},828373(e,t,s){s.d(t,{$E:()=>c,eo:()=>l});var i=s(222102),n=s(271656),r=s(720770),a=s(172205);const o=e=>e[a.U.UIDB]||(0,n.A)(),l=(0,i.Mz)(o,({version:e})=>Boolean(e)),d=(0,i.Mz)(o,({devices:e})=>e||(0,r.A)()),c=e=>(0,i.Mz)(d,t=>t.find(({shortnames:t})=>e&&(t||[]).includes(e))||(0,n.A)());(0,i.Mz)(d,e=>{const t=new Map;for(let s=0;s<e.length;s+=1){const i=e[s].power?.baseConsumption;if(void 0!==i){const{shortnames:n}=e[s];for(let e=0;e<(n||[]).length;e+=1)t.set(n[e],i)}}return t})},706925(e,t,s){s.d(t,{G:()=>o});var i=s(956978),n=s(857780);const r=[n.bq.USW,n.bq.UAP,n.bq.USP],a=[n.W4.UDBA69F],o=({type:e,model:t})=>(r.includes(e)||a.includes(t))&&!(0,i.tNJ)({model:t})},237887(e,t,s){s.d(t,{A:()=>A});var i=s(274934),n=s(602086),r=s(977872),a=s(693371),o=s(767822),l=s(820633),d=s(308111);const c=e=>(0,i.jsx)(a.A,{renderOption:o.q,...e}),_=e=>(0,i.jsx)(c,{...e});_.Sorted=e=>{const t=(0,r.d4)(l.zi),s=(0,n.useMemo)(()=>(0,d.k)(t),[t]);return(0,i.jsx)(c,{...e,sortBy:s})};const A=_},308111(e,t,s){s.d(t,{R:()=>_,k:()=>A});var i=s(696049),n=s(350068),r=s(177173),a=s(752104),o=s(64222),l=s(332530);const d=[...new Set([i.H,a.Q.join(a.A),r.Zt,o.F,n.nc,l.Vr])],c={numeric:!0,sensitivity:"base"},_=(e,t)=>{const s=[];for(let i=e;i<=t;i+=1)s.push({value:i,label:String(i)});return s},A=e=>({value:t,label:s},{value:i,label:n})=>d.includes(t?.toString())||d.includes(i?.toString())?1/0:s?.toString().localeCompare(n?.toString(),e,c)??-1},489714(e,t,s){s.d(t,{Z:()=>n});var i=s(570866);const n=e=>e?e.replace(i.SD,"").replace(i.fA,"$&:").substring(0,17).toLowerCase():e}}]);